gnu: randomjungle: Update homepage and sourc.
[jackhill/guix/guix.git] / gnu / packages / python.scm
1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2013 Nikita Karetnikov <nikita@karetnikov.org>
3 ;;; Copyright © 2013, 2014, 2015, 2016, 2017, 2018 Ludovic Courtès <ludo@gnu.org>
4 ;;; Copyright © 2013, 2014, 2015, 2016 Andreas Enge <andreas@enge.fr>
5 ;;; Copyright © 2014, 2015 Mark H Weaver <mhw@netris.org>
6 ;;; Copyright © 2014, 2017 Eric Bavier <bavier@member.fsf.org>
7 ;;; Copyright © 2014, 2015 Federico Beffa <beffa@fbengineering.ch>
8 ;;; Copyright © 2015 Omar Radwan <toxemicsquire4@gmail.com>
9 ;;; Copyright © 2015 Pierre-Antoine Rault <par@rigelk.eu>
10 ;;; Copyright © 2015, 2016, 2017, 2018 Ricardo Wurmus <rekado@elephly.net>
11 ;;; Copyright © 2015, 2016 Christopher Allan Webber <cwebber@dustycloud.org>
12 ;;; Copyright © 2015 Eric Dvorsak <eric@dvorsak.fr>
13 ;;; Copyright © 2015, 2016 David Thompson <davet@gnu.org>
14 ;;; Copyright © 2015, 2016, 2017 Leo Famulari <leo@famulari.name>
15 ;;; Copyright © 2015, 2017 Ben Woodcroft <donttrustben@gmail.com>
16 ;;; Copyright © 2015, 2016 Erik Edrosa <erik.edrosa@gmail.com>
17 ;;; Copyright © 2015, 2016, 2017, 2018 Efraim Flashner <efraim@flashner.co.il>
18 ;;; Copyright © 2015, 2017 Kyle Meyer <kyle@kyleam.com>
19 ;;; Copyright © 2015, 2016 Chris Marusich <cmmarusich@gmail.com>
20 ;;; Copyright © 2016 Danny Milosavljevic <dannym+a@scratchpost.org>
21 ;;; Copyright © 2016 Lukas Gradl <lgradl@openmailbox.org>
22 ;;; Copyright © 2016, 2018 Hartmut Goebel <h.goebel@crazy-compilers.com>
23 ;;; Copyright © 2016 Daniel Pimentel <d4n1@d4n1.org>
24 ;;; Copyright © 2016 Sou Bunnbu <iyzsong@gmail.com>
25 ;;; Copyright © 2016, 2017 Troy Sankey <sankeytms@gmail.com>
26 ;;; Copyright © 2016, 2017 Nils Gillmann <ng0@n0.is>
27 ;;; Copyright © 2016 Dylan Jeffers <sapientech@sapientech@openmailbox.org>
28 ;;; Copyright © 2016 David Craven <david@craven.ch>
29 ;;; Copyright © 2016, 2017, 2018 Marius Bakke <mbakke@fastmail.com>
30 ;;; Copyright © 2016, 2017 Stefan Reichör <stefan@xsteve.at>
31 ;;; Copyright © 2016 Dylan Jeffers <sapientech@sapientech@openmailbox.org>
32 ;;; Copyright © 2016, 2017 Alex Vong <alexvong1995@gmail.com>
33 ;;; Copyright © 2016, 2017, 2018 Arun Isaac <arunisaac@systemreboot.net>
34 ;;; Copyright © 2016, 2017, 2018 Julien Lepiller <julien@lepiller.eu>
35 ;;; Copyright © 2016, 2017, 2018 Tobias Geerinckx-Rice <me@tobias.gr>
36 ;;; Copyright © 2016, 2017 Thomas Danckaert <post@thomasdanckaert.be>
37 ;;; Copyright © 2017 Carlo Zancanaro <carlo@zancanaro.id.au>
38 ;;; Copyright © 2017 Frederick M. Muriithi <fredmanglis@gmail.com>
39 ;;; Copyright © 2017, 2018 Adriano Peluso <catonano@gmail.com>
40 ;;; Copyright © 2017 Ben Sturmfels <ben@sturm.com.au>
41 ;;; Copyright © 2017, 2018 Mathieu Othacehe <m.othacehe@gmail.com>
42 ;;; Copyright © 2017 José Miguel Sánchez García <jmi2k@openmailbox.org>
43 ;;; Copyright © 2017 Roel Janssen <roel@gnu.org>
44 ;;; Copyright © 2017, 2018 Kei Kebreau <kkebreau@posteo.net>
45 ;;; Copyright © 2017 Rutger Helling <rhelling@mykolab.com>
46 ;;; Copyright © 2017 Muriithi Frederick Muriuki <fredmanglis@gmail.com>
47 ;;; Copyright © 2017 Brendan Tildesley <brendan.tildesley@openmailbox.org>
48 ;;; Copyright © 2018 Ethan R. Jones <ethanrjones97@gmail.com
49 ;;; Copyright © 2018 Fis Trivial <ybbs.daans@hotmail.com>
50 ;;; Copyright © 2018 Vijayalakshmi Vedantham <vijimay12@gmail.com>
51 ;;; Copyright © 2018 Mathieu Lirzin <mthl@gnu.org>
52 ;;; Copyright © 2018 Adam Massmann <massmannak@gmail.com>
53 ;;; Copyright © 2016, 2018 Tomáš Čech <sleep_walker@gnu.org>
54 ;;; Copyright © 2018 Nicolas Goaziou <mail@nicolasgoaziou.fr>
55 ;;; Copyright © 2018 Oleg Pykhalov <go.wigust@gmail.com>
56 ;;; Copyright © 2018 Clément Lassieur <clement@lassieur.org>
57 ;;; Copyright © 2018 Maxim Cournoyer <maxim.cournoyer@gmail.com>
58 ;;; Copyright © 2018 Luther Thompson <lutheroto@gmail.com>
59 ;;;
60 ;;; This file is part of GNU Guix.
61 ;;;
62 ;;; GNU Guix is free software; you can redistribute it and/or modify it
63 ;;; under the terms of the GNU General Public License as published by
64 ;;; the Free Software Foundation; either version 3 of the License, or (at
65 ;;; your option) any later version.
66 ;;;
67 ;;; GNU Guix is distributed in the hope that it will be useful, but
68 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
69 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
70 ;;; GNU General Public License for more details.
71 ;;;
72 ;;; You should have received a copy of the GNU General Public License
73 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
74
75 (define-module (gnu packages python)
76 #:use-module ((guix licenses) #:prefix license:)
77 #:use-module (gnu packages)
78 #:use-module (gnu packages algebra)
79 #:use-module (gnu packages adns)
80 #:use-module (gnu packages attr)
81 #:use-module (gnu packages backup)
82 #:use-module (gnu packages bash)
83 #:use-module (gnu packages check)
84 #:use-module (gnu packages compression)
85 #:use-module (gnu packages crypto)
86 #:use-module (gnu packages databases)
87 #:use-module (gnu packages file)
88 #:use-module (gnu packages fontutils)
89 #:use-module (gnu packages gcc)
90 #:use-module (gnu packages geo)
91 #:use-module (gnu packages ghostscript)
92 #:use-module (gnu packages gl)
93 #:use-module (gnu packages glib)
94 #:use-module (gnu packages graphviz)
95 #:use-module (gnu packages graphics)
96 #:use-module (gnu packages gstreamer)
97 #:use-module (gnu packages gtk)
98 #:use-module (gnu packages icu4c)
99 #:use-module (gnu packages image)
100 #:use-module (gnu packages imagemagick)
101 #:use-module (gnu packages libevent)
102 #:use-module (gnu packages libffi)
103 #:use-module (gnu packages linux)
104 #:use-module (gnu packages llvm)
105 #:use-module (gnu packages machine-learning)
106 #:use-module (gnu packages man)
107 #:use-module (gnu packages maths)
108 #:use-module (gnu packages multiprecision)
109 #:use-module (gnu packages networking)
110 #:use-module (gnu packages ncurses)
111 #:use-module (gnu packages openstack)
112 #:use-module (gnu packages pcre)
113 #:use-module (gnu packages perl)
114 #:use-module (gnu packages pkg-config)
115 #:use-module (gnu packages python-crypto)
116 #:use-module (gnu packages python-web)
117 #:use-module (gnu packages qt)
118 #:use-module (gnu packages readline)
119 #:use-module (gnu packages sdl)
120 #:use-module (gnu packages search)
121 #:use-module (gnu packages shells)
122 #:use-module (gnu packages ssh)
123 #:use-module (gnu packages statistics)
124 #:use-module (gnu packages terminals)
125 #:use-module (gnu packages tex)
126 #:use-module (gnu packages texinfo)
127 #:use-module (gnu packages time)
128 #:use-module (gnu packages tls)
129 #:use-module (gnu packages version-control)
130 #:use-module (gnu packages video)
131 #:use-module (gnu packages web)
132 #:use-module (gnu packages base)
133 #:use-module (gnu packages xml)
134 #:use-module (gnu packages xorg)
135 #:use-module (gnu packages xdisorg)
136 #:use-module (gnu packages tcl)
137 #:use-module (gnu packages bdw-gc)
138 #:use-module (guix packages)
139 #:use-module (guix download)
140 #:use-module (guix git-download)
141 #:use-module (guix utils)
142 #:use-module (guix build-system gnu)
143 #:use-module (guix build-system cmake)
144 #:use-module (guix build-system python)
145 #:use-module (guix build-system trivial)
146 #:use-module (srfi srfi-1))
147
148 (define-public python-2.7
149 (package
150 (name "python2")
151 (version "2.7.14")
152 (replacement python-2/fixed)
153 (source
154 (origin
155 (method url-fetch)
156 (uri (string-append "https://www.python.org/ftp/python/"
157 version "/Python-" version ".tar.xz"))
158 (sha256
159 (base32
160 "0rka541ys16jwzcnnvjp2v12m4cwgd2jp6wj4kj511p715pb5zvi"))
161 (patches (search-patches "python-2.7-search-paths.patch"
162 "python-2-deterministic-build-info.patch"
163 "python-2.7-site-prefixes.patch"
164 "python-2.7-source-date-epoch.patch"
165 "python-2.7-adjust-tests.patch"))
166 (modules '((guix build utils)))
167 ;; suboptimal to delete failing tests here, but if we delete them in the
168 ;; arguments then we need to make sure to strip out that phase when it
169 ;; gets inherited by python and python-minimal.
170 (snippet
171 '(begin
172 (for-each delete-file
173 '("Lib/test/test_compileall.py"
174 "Lib/test/test_ctypes.py" ; fails on mips64el
175 "Lib/test/test_distutils.py"
176 "Lib/test/test_import.py"
177 "Lib/test/test_shutil.py"
178 "Lib/test/test_socket.py"
179 "Lib/test/test_subprocess.py"))
180 #t))))
181 (outputs '("out"
182 "tk")) ;tkinter; adds 50 MiB to the closure
183 (build-system gnu-build-system)
184 (arguments
185 `(;; 356 tests OK.
186 ;; 6 tests failed:
187 ;; test_compileall test_distutils test_import test_shutil test_socket
188 ;; test_subprocess
189 ;; 39 tests skipped:
190 ;; test_aepack test_al test_applesingle test_bsddb test_bsddb185
191 ;; test_bsddb3 test_cd test_cl test_codecmaps_cn test_codecmaps_hk
192 ;; test_codecmaps_jp test_codecmaps_kr test_codecmaps_tw test_curses
193 ;; test_dl test_gdb test_gl test_imageop test_imgfile test_ioctl
194 ;; test_kqueue test_linuxaudiodev test_macos test_macostools
195 ;; test_msilib test_ossaudiodev test_scriptpackages test_smtpnet
196 ;; test_socketserver test_startfile test_sunaudiodev test_timeout
197 ;; test_tk test_ttk_guionly test_urllib2net test_urllibnet
198 ;; test_winreg test_winsound test_zipfile64
199 ;; 4 skips unexpected on linux2:
200 ;; test_bsddb test_bsddb3 test_gdb test_ioctl
201 #:test-target "test"
202 #:configure-flags
203 (list "--enable-shared" ;allow embedding
204 "--with-system-ffi" ;build ctypes
205 "--with-ensurepip=install" ;install pip and setuptools
206 "--enable-unicode=ucs4"
207 (string-append "LDFLAGS=-Wl,-rpath="
208 (assoc-ref %outputs "out") "/lib"))
209
210 #:modules ((ice-9 ftw) (ice-9 match)
211 (guix build utils) (guix build gnu-build-system))
212 #:phases
213 (modify-phases %standard-phases
214 (add-before
215 'configure 'patch-lib-shells
216 (lambda _
217 ;; Filter for existing files, since some may not exist in all
218 ;; versions of python that are built with this recipe.
219 (substitute* (filter file-exists?
220 '("Lib/subprocess.py"
221 "Lib/popen2.py"
222 "Lib/distutils/tests/test_spawn.py"
223 "Lib/test/support/__init__.py"
224 "Lib/test/test_subprocess.py"))
225 (("/bin/sh") (which "sh")))
226
227 ;; Use zero as the timestamp in .pyc files so that builds are
228 ;; deterministic. TODO: Remove it when this variable is set in
229 ;; gnu-build-system.scm.
230 (setenv "SOURCE_DATE_EPOCH" "1")
231 #t))
232 (add-before 'configure 'do-not-record-configure-flags
233 (lambda* (#:key configure-flags #:allow-other-keys)
234 ;; Remove configure flags from the installed '_sysconfigdata.py'
235 ;; and 'Makefile' so we don't end up keeping references to the
236 ;; build tools.
237 ;;
238 ;; Preserve at least '--with-system-ffi' since otherwise the
239 ;; thing tries to build libffi, fails, and we end up with a
240 ;; Python that lacks ctypes.
241 (substitute* "configure"
242 (("^CONFIG_ARGS=.*$")
243 (format #f "CONFIG_ARGS='~a'\n"
244 (if (member "--with-system-ffi" configure-flags)
245 "--with-system-ffi"
246 ""))))
247 #t))
248 (add-before
249 'check 'pre-check
250 (lambda _
251 ;; 'Lib/test/test_site.py' needs a valid $HOME
252 (setenv "HOME" (getcwd))
253 #t))
254 (add-after
255 'unpack 'set-source-file-times-to-1980
256 ;; XXX One of the tests uses a ZIP library to pack up some of the
257 ;; source tree, and fails with "ZIP does not support timestamps
258 ;; before 1980". Work around this by setting the file times in the
259 ;; source tree to sometime in early 1980.
260 (lambda _
261 (let ((circa-1980 (* 10 366 24 60 60)))
262 (ftw "." (lambda (file stat flag)
263 (utime file circa-1980 circa-1980)
264 #t))
265 #t)))
266 (add-after 'install 'remove-tests
267 ;; Remove 25 MiB of unneeded unit tests. Keep test_support.*
268 ;; because these files are used by some libraries out there.
269 (lambda* (#:key outputs #:allow-other-keys)
270 (let ((out (assoc-ref outputs "out")))
271 (match (scandir (string-append out "/lib")
272 (lambda (name)
273 (string-prefix? "python" name)))
274 ((pythonX.Y)
275 (let ((testdir (string-append out "/lib/" pythonX.Y
276 "/test")))
277 (with-directory-excursion testdir
278 (for-each delete-file-recursively
279 (scandir testdir
280 (match-lambda
281 ((or "." "..") #f)
282 (file
283 (not
284 (string-prefix? "test_support."
285 file))))))
286 (call-with-output-file "__init__.py" (const #t))
287 #t)))))))
288 (add-before 'strip 'make-libraries-writable
289 (lambda* (#:key outputs #:allow-other-keys)
290 ;; Make .so files writable so they can be stripped.
291 (let ((out (assoc-ref outputs "out")))
292 (for-each (lambda (file)
293 (chmod file #o755))
294 (find-files (string-append out "/lib")
295 "\\.so"))
296 #t)))
297 (add-after 'install 'move-tk-inter
298 (lambda* (#:key outputs #:allow-other-keys)
299 ;; When Tkinter support is built move it to a separate output so
300 ;; that the main output doesn't contain a reference to Tcl/Tk.
301 (let ((out (assoc-ref outputs "out"))
302 (tk (assoc-ref outputs "tk")))
303 (when tk
304 (match (find-files out "tkinter.*\\.so")
305 ((tkinter.so)
306 ;; The .so is in OUT/lib/pythonX.Y/lib-dynload, but we
307 ;; want it under TK/lib/pythonX.Y/site-packages.
308 (let* ((len (string-length out))
309 (target (string-append
310 tk "/"
311 (string-drop
312 (dirname (dirname tkinter.so))
313 len)
314 "/site-packages")))
315 (install-file tkinter.so target)
316 (delete-file tkinter.so)))))
317 #t))))))
318 (inputs
319 `(("bzip2" ,bzip2)
320 ("gdbm" ,gdbm)
321 ("libffi" ,libffi) ; for ctypes
322 ("sqlite" ,sqlite) ; for sqlite extension
323 ("openssl" ,openssl)
324 ("readline" ,readline)
325 ("zlib" ,zlib)
326 ("tcl" ,tcl)
327 ("tk" ,tk))) ; for tkinter
328 (native-inputs
329 `(("pkg-config" ,pkg-config)))
330 (native-search-paths
331 (list (search-path-specification
332 (variable "PYTHONPATH")
333 (files '("lib/python2.7/site-packages")))))
334 (home-page "https://www.python.org")
335 (synopsis "High-level, dynamically-typed programming language")
336 (description
337 "Python is a remarkably powerful dynamic programming language that
338 is used in a wide variety of application domains. Some of its key
339 distinguishing features include: clear, readable syntax; strong
340 introspection capabilities; intuitive object orientation; natural
341 expression of procedural code; full modularity, supporting hierarchical
342 packages; exception-based error handling; and very high level dynamic
343 data types.")
344 (license license:psfl)))
345
346 ;; Current 2.x version.
347 (define-public python-2 python-2.7)
348
349 (define python-2/fixed
350 (package
351 (inherit python-2)
352 (source (origin
353 (inherit (package-source python-2))
354 (patches (append
355 (origin-patches (package-source python-2))
356 (search-patches "python2-CVE-2018-1060.patch"
357 "python2-CVE-2018-1061.patch"
358 "python2-CVE-2018-14647.patch"
359 "python2-CVE-2018-1000802.patch")))))))
360
361 (define-public python2-called-python
362 ;; Both 2.x and 3.x used to be called "python". In commit
363 ;; a7714d42de2c3082f3609d1e63c83d703fb39cf9 (March 2018), we renamed the
364 ;; Python 2.x package to "python2".
365 (package
366 (inherit python-2)
367 (name "python")
368 (properties `((superseded . ,python-2)))))
369
370 (define-public python-3.6
371 (package (inherit python-2)
372 (name "python")
373 (version "3.6.5")
374 (replacement python-3/fixed)
375 (source (origin
376 (method url-fetch)
377 (uri (string-append "https://www.python.org/ftp/python/"
378 version "/Python-" version ".tar.xz"))
379 (patches (search-patches
380 "python-fix-tests.patch"
381 "python-3-fix-tests.patch"
382 "python-3-deterministic-build-info.patch"
383 "python-3-search-paths.patch"))
384 (patch-flags '("-p0"))
385 (sha256
386 (base32
387 "19l7inxm056jjw33zz97z0m02hsi7jnnx5kyb76abj5ml4xhad7l"))
388 (snippet
389 '(begin
390 (for-each delete-file
391 '("Lib/ctypes/test/test_structures.py" ; fails on aarch64
392 "Lib/ctypes/test/test_win32.py" ; fails on aarch64
393 "Lib/test/test_fcntl.py")) ; fails on aarch64
394 #t))))
395 (arguments
396 (substitute-keyword-arguments (package-arguments python-2)
397 ((#:tests? _) #t)
398 ((#:phases phases)
399 `(modify-phases ,phases
400 (add-after 'unpack 'patch-timestamp-for-pyc-files
401 (lambda _
402 ;; We set DETERMINISTIC_BUILD to only override the mtime when
403 ;; building with Guix, lest we break auto-compilation in
404 ;; environments.
405 (setenv "DETERMINISTIC_BUILD" "1")
406 (substitute* "Lib/py_compile.py"
407 (("source_stats\\['mtime'\\]")
408 "(1 if 'DETERMINISTIC_BUILD' in os.environ else source_stats['mtime'])"))
409
410 ;; Use deterministic hashes for strings, bytes, and datetime
411 ;; objects.
412 (setenv "PYTHONHASHSEED" "0")
413
414 ;; Reset mtime when validating bytecode header.
415 (substitute* "Lib/importlib/_bootstrap_external.py"
416 (("source_mtime = int\\(source_stats\\['mtime'\\]\\)")
417 "source_mtime = 1"))
418 #t))
419 ;; These tests fail because of our change to the bytecode
420 ;; validation. They fail because expected exceptions do not get
421 ;; thrown. This seems to be no problem.
422 (add-after 'unpack 'disable-broken-bytecode-tests
423 (lambda _
424 (substitute* "Lib/test/test_importlib/source/test_file_loader.py"
425 (("test_bad_marshal")
426 "disable_test_bad_marshal")
427 (("test_no_marshal")
428 "disable_test_no_marshal")
429 (("test_non_code_marshal")
430 "disable_test_non_code_marshal"))
431 #t))
432 ;; Unset DETERMINISTIC_BUILD to allow for tests that check that
433 ;; stale pyc files are rebuilt.
434 (add-before 'check 'allow-non-deterministic-compilation
435 (lambda _ (unsetenv "DETERMINISTIC_BUILD") #t))
436 ;; We need to rebuild all pyc files for three different
437 ;; optimization levels to replace all files that were not built
438 ;; deterministically.
439
440 ;; FIXME: Without this phase we have close to 2000 files that
441 ;; differ across different builds of this package. With this phase
442 ;; there are about 500 files left that differ.
443 (add-after 'install 'rebuild-bytecode
444 (lambda* (#:key outputs #:allow-other-keys)
445 (setenv "DETERMINISTIC_BUILD" "1")
446 (let ((out (assoc-ref outputs "out")))
447 (for-each
448 (lambda (opt)
449 (format #t "Compiling with optimization level: ~a\n"
450 (if (null? opt) "none" (car opt)))
451 (for-each (lambda (file)
452 (apply invoke
453 `(,(string-append out "/bin/python3")
454 ,@opt
455 "-m" "compileall"
456 "-f" ; force rebuild
457 ;; Don't build lib2to3, because it's Python 2 code.
458 ;; Also don't build obviously broken test code.
459 "-x" "(lib2to3|test/bad.*)"
460 ,file)))
461 (find-files out "\\.py$")))
462 (list '() '("-O") '("-OO")))
463 #t)))))))
464 (native-search-paths
465 (list (search-path-specification
466 (variable "PYTHONPATH")
467 (files (list (string-append "lib/python"
468 (version-major+minor version)
469 "/site-packages"))))))))
470
471 ;; Current 3.x version.
472 (define-public python-3 python-3.6)
473
474 (define python-3/fixed
475 (package
476 (inherit python-3)
477 (source (origin
478 (inherit (package-source python-3))
479 (patches (append (origin-patches (package-source python-3))
480 (search-patches "python-CVE-2018-14647.patch")))))
481 (arguments
482 (substitute-keyword-arguments (package-arguments python-3)
483 ((#:phases phases)
484 `(modify-phases ,phases
485 (add-after 'unpack 'delete-broken-test
486 (lambda _
487 ;; Delete test which fails on recent kernels:
488 ;; <https://bugs.python.org/issue34587>.
489 (delete-file "Lib/test/test_socket.py")
490 #t))))))))
491
492 ;; Current major version.
493 (define-public python python-3)
494
495 ;; Minimal variants of Python, mostly used to break the cycle between Tk and
496 ;; Python (Tk -> libxcb -> Python.)
497
498 (define-public python2-minimal
499 (package/inherit python-2
500 (name "python2-minimal")
501 (outputs '("out"))
502
503 ;; Keep zlib, which is used by 'pip' (via the 'zipimport' module), which
504 ;; is invoked upon 'make install'. 'pip' also expects 'ctypes' and thus
505 ;; libffi.
506 (inputs `(("libffi" ,libffi)
507 ("zlib" ,zlib)))))
508
509 (define-public python-minimal
510 (package/inherit python
511 (name "python-minimal")
512 (outputs '("out"))
513
514 ;; Build fails due to missing ctypes without libffi.
515 ;; OpenSSL is a mandatory dependency of Python 3.x, for urllib;
516 ;; zlib is required by 'zipimport', used by pip.
517 (inputs `(("libffi" ,libffi)
518 ("openssl" ,openssl)
519 ("zlib" ,zlib)))))
520
521 (define-public python-debug
522 (package/inherit python
523 (name "python-debug")
524 (outputs '("out" "debug"))
525 (build-system gnu-build-system)
526 (arguments
527 (substitute-keyword-arguments (package-arguments python)
528 ((#:configure-flags flags '())
529 `(cons "--with-pydebug" ,flags))))
530 (synopsis
531 "High-level, dynamically-typed programming language (for debugging)")
532 (description
533 "This variant of Python provides an interpreter built with
534 @code{--with-pydebug} to help develop and debug extensions. See
535 @url{https://pythonextensionpatterns.readthedocs.io/en/latest/debugging/debug.html},
536 for more information.")))
537
538 (define* (wrap-python3 python
539 #:optional
540 (name (string-append (package-name python) "-wrapper")))
541 (package/inherit python
542 (name name)
543 (source #f)
544 (build-system trivial-build-system)
545 (outputs '("out"))
546 (inputs `(("bash" ,bash)))
547 (propagated-inputs `(("python" ,python)))
548 (arguments
549 `(#:modules ((guix build utils))
550 #:builder
551 (begin
552 (use-modules (guix build utils))
553 (let ((bin (string-append (assoc-ref %outputs "out") "/bin"))
554 (python (string-append (assoc-ref %build-inputs "python") "/bin/")))
555 (mkdir-p bin)
556 (for-each
557 (lambda (old new)
558 (symlink (string-append python old)
559 (string-append bin "/" new)))
560 `("python3" ,"pydoc3" ,"idle3" ,"pip3")
561 `("python" ,"pydoc" ,"idle" ,"pip"))
562 ;; python-config outputs search paths based upon its location,
563 ;; use a bash wrapper to avoid changing its outputs.
564 (let ((bash (string-append (assoc-ref %build-inputs "bash")
565 "/bin/bash"))
566 (old (string-append python "python3-config"))
567 (new (string-append bin "/python-config")))
568 (with-output-to-file new
569 (lambda ()
570 (format #t "#!~a~%" bash)
571 (format #t "exec \"~a\" \"$@\"~%" old)
572 (chmod new #o755)
573 #t)))))))
574 (synopsis "Wrapper for the Python 3 commands")
575 (description
576 "This package provides wrappers for the commands of Python@tie{}3.x such
577 that they can be invoked under their usual name---e.g., @command{python}
578 instead of @command{python3}.")))
579
580 (define-public python-wrapper (wrap-python3 python))
581 (define-public python-minimal-wrapper (wrap-python3 python-minimal))
582
583 (define-public python-psutil
584 (package
585 (name "python-psutil")
586 (version "5.4.3")
587 (source
588 (origin
589 (method url-fetch)
590 (uri (pypi-uri "psutil" version))
591 (sha256
592 (base32
593 "063v69x7spyclyaxrd3gmzj3p16q5ayg97xqhwb1kyn22a9pwip2"))))
594 (build-system python-build-system)
595 (arguments
596 ;; FIXME: some tests does not return and times out.
597 '(#:tests? #f))
598 (home-page "https://www.github.com/giampaolo/psutil")
599 (synopsis "Library for retrieving information on running processes")
600 (description
601 "psutil (Python system and process utilities) is a library for retrieving
602 information on running processes and system utilization (CPU, memory, disks,
603 network) in Python. It is useful mainly for system monitoring, profiling and
604 limiting process resources and management of running processes. It implements
605 many functionalities offered by command line tools such as: ps, top, lsof,
606 netstat, ifconfig, who, df, kill, free, nice, ionice, iostat, iotop, uptime,
607 pidof, tty, taskset, pmap.")
608 (properties `((python2-variant . ,(delay python2-psutil))))
609 (license license:bsd-3)))
610
611 (define-public python2-psutil
612 (let ((base (package-with-python2 (strip-python2-variant python-psutil))))
613 (package
614 (inherit base)
615 (propagated-inputs
616 `(("python2-enum34" ,python2-enum34) ;optional
617 ,@(package-propagated-inputs base))))))
618
619 (define-public python-shapely
620 (package
621 (name "python-shapely")
622 (version "1.6.3")
623 (source
624 (origin
625 (method url-fetch)
626 (uri (pypi-uri "Shapely" version))
627 (sha256
628 (base32
629 "0svc58dzcw9gj92b4sgq35sdxkf85z0qwlzxarkzq4bp3h8jy58l"))))
630 (build-system python-build-system)
631 (native-inputs
632 `(("python-cython" ,python-cython)
633 ("python-matplotlib" ,python-matplotlib)
634 ("python-pytest" ,python-pytest)
635 ("python-pytest-cov" ,python-pytest-cov)))
636 (inputs
637 `(("geos" ,geos)))
638 (propagated-inputs
639 `(("python-numpy" ,python-numpy)))
640 (arguments
641 `(#:phases
642 (modify-phases %standard-phases
643 (add-after 'unpack 'patch-geos-path
644 (lambda* (#:key inputs #:allow-other-keys)
645 (let ((geos (assoc-ref inputs "geos"))
646 (glibc (assoc-ref inputs ,(if (%current-target-system)
647 "cross-libc" "libc"))))
648 (substitute* "shapely/geos.py"
649 (("_lgeos = load_dll\\('geos_c', fallbacks=.*\\)")
650 (string-append "_lgeos = load_dll('geos_c', fallbacks=['"
651 geos "/lib/libgeos_c.so'])"))
652 (("free = load_dll\\('c'\\)\\.free")
653 (string-append "free = load_dll('c', fallbacks=['"
654 glibc "/lib/libc.so.6']).free"))))
655 #t)))))
656 (home-page "https://github.com/Toblerity/Shapely")
657 (synopsis "Library for the manipulation and analysis of geometric objects")
658 (description "Shapely is a Python package for manipulation and analysis of
659 planar geometric objects. It is based on the @code{GEOS} library.")
660 (license license:bsd-3)))
661
662 (define-public python-logwrap
663 (package
664 (name "python-logwrap")
665 (version "3.2.1")
666 (source
667 (origin
668 (method url-fetch)
669 (uri (pypi-uri "logwrap" version ".zip"))
670 (sha256
671 (base32
672 "1d2k0hvpbi51vl410y8fbs5m0nxnlh2k7gr2nrh3k81ibhzscsra"))))
673 (build-system python-build-system)
674 (propagated-inputs
675 `(("python-six" ,python-six)
676 ("python-typing" ,python-typing)))
677 (native-inputs
678 `(("unzip" ,unzip)
679 ("python-cython" ,python-cython)
680 ("python-pytest" ,python-pytest)
681 ("python-pytest-cov" ,python-pytest-cov)
682 ("python-pytest-runner" ,python-pytest-runner)))
683 (home-page "https://github.com/penguinolog/logwrap")
684 (synopsis "Decorator for logging function arguments")
685 (description "This package provides a decorator to log function arguments
686 and function call return values in a human-readable way.")
687 (license license:asl2.0)))
688
689 (define-public python2-shapely
690 (package-with-python2 python-shapely))
691
692 (define-public python-clyent
693 (package
694 (name "python-clyent")
695 (version "1.2.1")
696 (source
697 (origin
698 (method url-fetch)
699 (uri (pypi-uri "clyent" version))
700 (sha256
701 (base32
702 "1r9987qmy1pz3hq54160bapqsywpq14waw4w9x3ly8hmq7kpgfbj"))))
703 (build-system python-build-system)
704 (native-inputs
705 `(("python-mock" ,python-mock)))
706 (home-page "https://github.com/binstar/clyent")
707 (synopsis "Command line client library")
708 (description "Clyent is a Python command line utiliy library. It is used
709 by @code{binstar}, @code{binstar-build} and @code{chalmers}.")
710 (license license:bsd-3)))
711
712 (define-public python2-clyent
713 (package-with-python2 python-clyent))
714
715 (define-public python-babel
716 (package
717 (name "python-babel")
718 (version "2.3.4")
719 (source
720 (origin
721 (method url-fetch)
722 (uri (pypi-uri "Babel" version))
723 (sha256
724 (base32
725 "0x98qqqw35xllpcama013a9788ly84z8dm1w2wwfpxh2710c8df5"))))
726 (build-system python-build-system)
727 (propagated-inputs
728 `(("python-pytz" ,python-pytz)))
729 (arguments `(#:tests? #f)) ; no test target
730 (home-page "http://babel.pocoo.org/")
731 (synopsis
732 "Tools for internationalizing Python applications")
733 (description
734 "Babel is composed of two major parts:
735 - tools to build and work with gettext message catalogs
736 - a Python interface to the CLDR (Common Locale Data Repository), providing
737 access to various locale display names, localized number and date formatting,
738 etc. ")
739 (license license:bsd-3)))
740
741 (define-public python2-babel
742 (package-with-python2 python-babel))
743
744 (define-public python2-backport-ssl-match-hostname
745 (package
746 (name "python2-backport-ssl-match-hostname")
747 (version "3.5.0.1")
748 (source
749 (origin
750 (method url-fetch)
751 (uri (string-append
752 "https://pypi.python.org/packages/source/b/"
753 "backports.ssl_match_hostname/backports.ssl_match_hostname-"
754 version ".tar.gz"))
755 (sha256
756 (base32
757 "1wndipik52cyqy0677zdgp90i435pmvwd89cz98lm7ri0y3xjajh"))))
758 (build-system python-build-system)
759 (arguments
760 `(#:python ,python-2
761 #:tests? #f)) ; no test target
762 (home-page "https://bitbucket.org/brandon/backports.ssl_match_hostname")
763 (synopsis "Backport of ssl.match_hostname() function from Python 3.5")
764 (description
765 "This backport brings the ssl.match_hostname() function to users of
766 earlier versions of Python. The function checks the hostname in the
767 certificate returned by the server to which a connection has been established,
768 and verifies that it matches the intended target hostname.")
769 (license license:psfl)))
770
771 (define-public python-hdf4
772 (package
773 (name "python-hdf4")
774 (version "0.9")
775 (source
776 (origin
777 (method url-fetch)
778 (uri (pypi-uri name version))
779 (sha256
780 (base32
781 "1hjiyrxvxk9817qyqky3nar4y3fs4z8wxz0n884zzb5wi6skrjks"))))
782 (build-system python-build-system)
783 (native-inputs `(("nose" ,python-nose)))
784 (propagated-inputs `(("numpy" ,python-numpy)))
785 (inputs
786 `(("hdf4" ,hdf4)
787 ("libjpeg" ,libjpeg)
788 ("zlib" ,zlib)))
789 (arguments
790 `(#:phases
791 (modify-phases %standard-phases
792 (replace 'check
793 (lambda _
794 ;; The 'runexamples' script sets PYTHONPATH to CWD, then goes
795 ;; on to import numpy. Somehow this works on their CI system.
796 ;; Let's just manage PYTHONPATH here instead.
797 (substitute* "runexamples.sh"
798 (("export PYTHONPATH=.*") ""))
799 (setenv "PYTHONPATH"
800 (string-append (getcwd) ":"
801 (getenv "PYTHONPATH")))
802 (invoke "./runexamples.sh")
803 (invoke "nosetests" "-v"))))))
804 (home-page "https://github.com/fhs/python-hdf4")
805 (synopsis "Python interface to the NCSA HDF4 library")
806 (description
807 "Python-HDF4 is a python wrapper around the NCSA HDF version 4 library,
808 which implements the SD (Scientific Dataset), VS (Vdata) and V (Vgroup) API’s.
809 NetCDF files can also be read and modified. Python-HDF4 is a fork of
810 @url{http://hdfeos.org/software/pyhdf.php,pyhdf}.")
811 (license license:expat)))
812
813 (define-public python2-hdf4
814 (package-with-python2 python-hdf4))
815
816 (define-public python-h5py
817 (package
818 (name "python-h5py")
819 (version "2.8.0")
820 (source
821 (origin
822 (method url-fetch)
823 (uri (pypi-uri "h5py" version))
824 (sha256
825 (base32
826 "0mdr6wrq02ac93m1aqx9kad0ppfzmm4imlxqgyy1x4l7hmdcc9p6"))))
827 (build-system python-build-system)
828 (arguments
829 `(#:tests? #f ; no test target
830 #:phases
831 (modify-phases %standard-phases
832 (add-after 'unpack 'fix-hdf5-paths
833 (lambda* (#:key inputs #:allow-other-keys)
834 (let ((prefix (assoc-ref inputs "hdf5")))
835 (substitute* "setup_build.py"
836 (("\\['/opt/local/lib', '/usr/local/lib'\\]")
837 (string-append "['" prefix "/lib" "']"))
838 (("'/opt/local/include', '/usr/local/include'")
839 (string-append "'" prefix "/include" "'")))
840 (substitute* "setup_configure.py"
841 (("\\['/usr/local/lib', '/opt/local/lib'\\]")
842 (string-append "['" prefix "/lib" "']")))
843 #t))))))
844 (propagated-inputs
845 `(("python-six" ,python-six)
846 ("python-numpy" ,python-numpy)))
847 (inputs
848 `(("hdf5" ,hdf5)))
849 (native-inputs
850 `(("python-cython" ,python-cython)
851 ("python-pkgconfig" ,python-pkgconfig)))
852 (home-page "http://www.h5py.org/")
853 (synopsis "Read and write HDF5 files from Python")
854 (description
855 "The h5py package provides both a high- and low-level interface to the
856 HDF5 library from Python. The low-level interface is intended to be a
857 complete wrapping of the HDF5 API, while the high-level component supports
858 access to HDF5 files, datasets and groups using established Python and NumPy
859 concepts.")
860 (license license:bsd-3)))
861
862 (define-public python2-h5py
863 (package-with-python2 python-h5py))
864
865 (define-public python-netcdf4
866 (package
867 (name "python-netcdf4")
868 (version "1.2.9")
869 (source
870 (origin
871 (method url-fetch)
872 (uri (pypi-uri "netCDF4" version))
873 (sha256
874 (base32
875 "1h6jq338amlbk0ilzvjyl7cck80i0bah9a5spn9in71vy2qxm7i5"))))
876 (build-system python-build-system)
877 (native-inputs
878 `(("python-cython" ,python-cython)))
879 (propagated-inputs
880 `(("python-numpy" ,python-numpy)))
881 (inputs
882 `(("netcdf" ,netcdf)
883 ("hdf4" ,hdf4)
884 ("hdf5" ,hdf5)))
885 (arguments
886 '(#:phases
887 (modify-phases %standard-phases
888 (replace 'check
889 (lambda _
890 (setenv "NO_NET" "1") ; disable opendap tests
891 (with-directory-excursion "test"
892 (setenv "PYTHONPATH" ; find and add the library we just built
893 (string-append
894 (car (find-files "../build" "lib.*"
895 #:directories? #:t
896 #:fail-on-error? #:t))
897 ":" (getenv "PYTHONPATH")))
898 (zero? (system* "python" "run_all.py"))))))))
899 (home-page
900 "https://github.com/Unidata/netcdf4-python")
901 (synopsis "Python/numpy interface to the netCDF library")
902 (description "Netcdf4-python is a Python interface to the netCDF C
903 library. netCDF version 4 has many features not found in earlier
904 versions of the library and is implemented on top of HDF5. This module
905 can read and write files in both the new netCDF 4 and the old netCDF 3
906 format, and can create files that are readable by HDF5 clients. The
907 API is modelled after @code{Scientific.IO.NetCDF}, and should be familiar
908 to users of that module.")
909 ;; The software is mainly ISC, but includes some files covered
910 ;; by the Expat license.
911 (license (list license:isc license:expat))))
912
913 (define-public python2-netcdf4
914 (package-with-python2 python-netcdf4))
915
916 (define-public python-lockfile
917 (package
918 (name "python-lockfile")
919 (version "0.12.2")
920 (source
921 (origin
922 (method url-fetch)
923 (uri (string-append "https://pypi.python.org/packages/source/l/lockfile/"
924 "lockfile-" version ".tar.gz"))
925 (sha256
926 (base32
927 "16gpx5hm73ah5n1079ng0vy381hl802v606npkx4x8nb0gg05vba"))))
928 (build-system python-build-system)
929 (arguments '(#:test-target "check"))
930 (native-inputs
931 `(("python-pbr" ,python-pbr)))
932 (home-page "https://launchpad.net/pylockfile")
933 (synopsis "Platform-independent file locking module")
934 (description
935 "The lockfile package exports a LockFile class which provides a simple
936 API for locking files.")
937 (license license:expat)))
938
939 (define-public python2-lockfile
940 (package-with-python2 python-lockfile))
941
942 (define-public python-semantic-version
943 (package
944 (name "python-semantic-version")
945 (version "2.6.0")
946 (source
947 (origin
948 (method url-fetch)
949 (uri (pypi-uri "semantic_version" version))
950 (sha256
951 (base32
952 "1h2l9xyg1zzsda6kjcmfcgycbvrafwci283vcr1v5sbk01l2hhra"))))
953 (build-system python-build-system)
954 (arguments
955 `(#:tests? #f)) ; PyPI tarball lacks tests
956 (home-page "https://github.com/rbarrois/python-semanticversion")
957 (synopsis "Semantic versioning module for Python")
958 (description
959 "The @code{semantic_version} class is a small library for handling
960 @uref{https://semver.org/, semantic versioning} (@dfn{SemVer}) in Python.
961
962 It can compare versions, generate a new version that represents a bump in one of
963 the version levels, and check whether any given string is a proper semantic
964 version identifier.")
965 (license license:bsd-3)))
966
967 (define-public python2-semantic-version
968 (package-with-python2 python-semantic-version))
969
970 (define-public python-setuptools
971 (package
972 (name "python-setuptools")
973 (version "31.0.0")
974 (source
975 (origin
976 (method url-fetch)
977 (uri (pypi-uri "setuptools" version))
978 (sha256
979 (base32
980 "0ypybh4hx3bv4vhg2dc74xpj1g56ggnaffm87k4abhwjwq6wq608"))
981 (modules '((guix build utils)))
982 (snippet
983 '(begin
984 ;; Remove included binaries which are used to build self-extracting
985 ;; installers for Windows.
986 ;; TODO: Find some way to build them ourself so we can include them.
987 (for-each delete-file (find-files "setuptools" "^(cli|gui).*\\.exe$"))
988 #t))))
989 (build-system python-build-system)
990 ;; FIXME: Tests require pytest, which itself relies on setuptools.
991 ;; One could bootstrap with an internal untested setuptools.
992 (arguments
993 `(#:tests? #f))
994 (home-page "https://pypi.python.org/pypi/setuptools")
995 (synopsis
996 "Library designed to facilitate packaging Python projects")
997 (description
998 "Setuptools is a fully-featured, stable library designed to facilitate
999 packaging Python projects, where packaging includes:
1000 Python package and module definitions,
1001 distribution package metadata,
1002 test hooks,
1003 project installation,
1004 platform-specific details,
1005 Python 3 support.")
1006 ;; TODO: setuptools now bundles the following libraries:
1007 ;; packaging, pyparsing, six and appdirs. How to unbundle?
1008 (license (list license:psfl ; setuptools itself
1009 license:expat ; six, appdirs, pyparsing
1010 license:asl2.0 ; packaging is dual ASL2/BSD-2
1011 license:bsd-2))))
1012
1013 (define-public python2-setuptools
1014 (package-with-python2 python-setuptools))
1015
1016 (define-public python-uniseg
1017 (package
1018 (name "python-uniseg")
1019 (version "0.7.1")
1020 (source
1021 (origin
1022 (method url-fetch)
1023 (uri (pypi-uri "uniseg" version ".zip"))
1024 (sha256
1025 (base32
1026 "05jsazvz6nbmh6l3v1rph5ydkqn1hzx1pyggdyvgp2qgmgrnmiz2"))))
1027 (build-system python-build-system)
1028 (arguments
1029 '(#:tests? #f)) ; The test suite requires network access.
1030 (native-inputs
1031 `(("unzip" ,unzip)))
1032 (home-page
1033 "https://bitbucket.org/emptypage/uniseg-python")
1034 (synopsis
1035 "Python library to determine Unicode text segmentations")
1036 (description
1037 "Uniseg is a Python package used to determine Unicode text segmentations.
1038 Supported segmentations include:
1039 @enumerate
1040 @item @dfn{Code point} (any value in the Unicode codespace)
1041 @item @dfn{Grapheme cluster} (user-perceived character made of a single or
1042 multiple Unicode code points, e.g. \"G\" + acute-accent)
1043 @item Word break
1044 @item Sentence break
1045 @item Line break
1046 @end enumerate")
1047 (license license:expat)))
1048
1049 (define-public python2-uniseg
1050 (package-with-python2 python-uniseg))
1051
1052 (define-public python-humanfriendly
1053 (package
1054 (name "python-humanfriendly")
1055 (version "4.4.1")
1056 (source
1057 (origin
1058 (method url-fetch)
1059 (uri (pypi-uri "humanfriendly" version))
1060 (sha256
1061 (base32
1062 "0pisgizjql86785jchfjv217g0lsgk114g2lja5j4y3lsc3b9szi"))))
1063 (build-system python-build-system)
1064 (arguments
1065 `(;; XXX: Tests depend on coloredlogs, which in turn depends on humanfriendly.
1066 #:tests? #f))
1067 (propagated-inputs
1068 `(("python-monotonic" ,python-monotonic)))
1069 (home-page "https://humanfriendly.readthedocs.io")
1070 (synopsis "Human-friendly input and output in Python")
1071 (description
1072 "The functions and classes in @code{humanfriendly} can be used to make
1073 text interfaces more user-friendly. It includes tools to parse and format
1074 numbers, file sizes, and timespans, timers for long-running operations, menus
1075 to allow the user to choose from a list of options, and terminal interaction
1076 helpers.")
1077 (license license:expat)))
1078
1079 (define-public python2-humanfriendly
1080 (package-with-python2 python-humanfriendly))
1081
1082 (define-public python-capturer
1083 (package
1084 (name "python-capturer")
1085 (version "2.4")
1086 (source
1087 (origin
1088 (method url-fetch)
1089 (uri (pypi-uri "capturer" version))
1090 (sha256
1091 (base32
1092 "05d6ji4j8ipiq0br7bwam38qc6hd9l1djmfxlzrxx19ziyjl4089"))))
1093 (build-system python-build-system)
1094 (arguments
1095 `(#:tests? #f))
1096 (propagated-inputs
1097 `(("python-humanfriendly" ,python-humanfriendly)))
1098 (home-page "https://capturer.readthedocs.io")
1099 (synopsis "Capture stdout and stderr streams of the current process")
1100 (description
1101 "The capturer package makes it easy to capture the stdout and stderr
1102 streams of the current process and subprocesses. Output can be relayed
1103 to the terminal in real time but is also available to the Python program
1104 for additional processing.")
1105 (license license:expat)))
1106
1107 (define-public python2-capturer
1108 (package-with-python2 python-capturer))
1109
1110 (define-public python-verboselogs
1111 (package
1112 (name "python-verboselogs")
1113 (version "1.7")
1114 (source
1115 (origin
1116 (method url-fetch)
1117 (uri (pypi-uri "verboselogs" version))
1118 (sha256
1119 (base32
1120 "09z4d1jiasn7k1hs5af2ckmnrd0i1d1m04bhfjhv7z6svzfdwgg3"))))
1121 (build-system python-build-system)
1122 (native-inputs
1123 `(("python-mock" ,python-mock)
1124 ("python-astroid" ,python-astroid)
1125 ("python-pylint" ,python-pylint)))
1126 (home-page "https://verboselogs.readthedocs.io")
1127 (synopsis "Verbose logging level for Python's logging module")
1128 (description
1129 "The @code{verboselogs} package extends Python's @code{logging} module to
1130 add the log levels NOTICE, SPAM, SUCCESS and VERBOSE.")
1131 (license license:expat)))
1132
1133 (define-public python2-verboselogs
1134 (package-with-python2 python-verboselogs))
1135
1136 (define-public python-coloredlogs
1137 (package
1138 (name "python-coloredlogs")
1139 (version "7.3")
1140 (source
1141 (origin
1142 (method url-fetch)
1143 (uri (pypi-uri "coloredlogs" version))
1144 (sha256
1145 (base32
1146 "1blcann6dyg5dhps9pg12rn0q0rjrlajpmmil0gy0j4cbvnl2il9"))))
1147 (build-system python-build-system)
1148 (arguments
1149 `(;Tests require some updated modules
1150 #:tests? #f))
1151 (propagated-inputs
1152 `(("python-capturer" ,python-capturer)))
1153 (home-page "https://coloredlogs.readthedocs.io")
1154 (synopsis "Colored stream handler for Python's logging module")
1155 (description
1156 "The @code{coloredlogs} package enables colored terminal output for
1157 Python's logging module. The @code{ColoredFormatter} class inherits from
1158 @code{logging.Formatter} and uses ANSI escape sequences to render your logging
1159 messages in color.")
1160 (license license:expat)))
1161
1162 (define-public python2-coloredlogs
1163 (package-with-python2 python-coloredlogs))
1164
1165 (define-public python-eventlet
1166 (package
1167 (name "python-eventlet")
1168 (version "0.20.1")
1169 (source
1170 (origin
1171 (method url-fetch)
1172 (uri (pypi-uri "eventlet" version))
1173 (sha256
1174 (base32
1175 "0f3q55mq4n021wb7qa53pz3ix6i2py64sap66vsaqm2scjw83m9s"))))
1176 (build-system python-build-system)
1177 (propagated-inputs
1178 `(("python-greenlet" ,python-greenlet)))
1179 (arguments
1180 ;; TODO: Requires unpackaged 'enum-compat'.
1181 '(#:tests? #f))
1182 (home-page "http://eventlet.net")
1183 (synopsis "Concurrent networking library for Python")
1184 (description
1185 "Eventlet is a concurrent networking library for Python that
1186 allows you to change how you run your code, not how you write it.
1187 It uses @code{epoll} or @code{libevent} for highly scalable non-blocking I/O.
1188 Coroutines ensure that the developer uses a blocking style of programming
1189 that is similar to threading, but provide the benefits of non-blocking I/O.
1190 The event dispatch is implicit, which means you can easily use @code{Eventlet}
1191 from the Python interpreter, or as a small part of a larger application.")
1192 (license license:expat)))
1193
1194 (define-public python2-eventlet
1195 (let ((base (package-with-python2
1196 (strip-python2-variant python-eventlet))))
1197 (package (inherit base)
1198 (propagated-inputs
1199 `(("python2-enum34" ,python2-enum34)
1200 ,@(package-propagated-inputs base))))))
1201
1202 (define-public python-six
1203 (package
1204 (name "python-six")
1205 (version "1.11.0")
1206 (source
1207 (origin
1208 (method url-fetch)
1209 (uri (pypi-uri "six" version))
1210 (sha256
1211 (base32
1212 "1scqzwc51c875z23phj48gircqjgnn3af8zy2izjwmnlxrxsgs3h"))))
1213 (build-system python-build-system)
1214 (arguments
1215 `(#:phases
1216 (modify-phases %standard-phases
1217 (replace 'check
1218 (lambda _
1219 (invoke "py.test" "-v"))))))
1220 (native-inputs
1221 `(("python-py" ,python-py)
1222 ("python-pytest" ,python-pytest-bootstrap)))
1223 (home-page "https://pypi.python.org/pypi/six/")
1224 (synopsis "Python 2 and 3 compatibility utilities")
1225 (description
1226 "Six is a Python 2 and 3 compatibility library. It provides utility
1227 functions for smoothing over the differences between the Python versions with
1228 the goal of writing Python code that is compatible on both Python versions.
1229 Six supports every Python version since 2.5. It is contained in only one
1230 Python file, so it can be easily copied into your project.")
1231 (license license:x11)))
1232
1233 (define-public python2-six
1234 (package-with-python2 python-six))
1235
1236 (define-public python-six-bootstrap
1237 (package
1238 (inherit python-six)
1239 (name "python-six-bootstrap")
1240 (native-inputs `())
1241 (arguments `(#:tests? #f))))
1242
1243 (define-public python2-six-bootstrap
1244 (package-with-python2 python-six-bootstrap))
1245
1246 (define-public python-schedule
1247 (package
1248 (name "python-schedule")
1249 (version "0.4.3")
1250 (source
1251 (origin
1252 (method url-fetch)
1253 (uri (pypi-uri "schedule" version))
1254 (sha256
1255 (base32
1256 "0vplyjcbfrq50sphlwya749z8p2pcyi2nycw3518i0qpd9a6189i"))))
1257 (build-system python-build-system)
1258 (native-inputs
1259 `(("python-pytest" ,python-pytest)
1260 ("python-mock" ,python-mock)))
1261 (home-page "https://github.com/dbader/schedule")
1262 (synopsis "Schedule periodic function calls in Python")
1263 (description
1264 "Schedule is an in-process scheduler for periodic jobs that uses the
1265 builder pattern for configuration. Schedule lets you run Python functions (or
1266 any other callable) periodically at pre-determined intervals using a simple,
1267 human-friendly syntax.")
1268 (license license:expat)))
1269
1270 (define-public python2-schedule
1271 (package-with-python2 python-schedule))
1272
1273 (define-public python-pandas
1274 (package
1275 (name "python-pandas")
1276 (version "0.23.1")
1277 (source
1278 (origin
1279 (method url-fetch)
1280 (uri (pypi-uri "pandas" version))
1281 (sha256
1282 (base32 "142nvwb01r2wv42y2cz40bx33hd8ffh6s6gynapg859fmzr2mdah"))))
1283 (build-system python-build-system)
1284 (arguments
1285 `(#:modules ((guix build utils)
1286 (guix build python-build-system)
1287 (ice-9 ftw)
1288 (srfi srfi-26))
1289 #:phases (modify-phases %standard-phases
1290 (replace 'check
1291 (lambda _
1292 (let ((build-directory
1293 (string-append
1294 (getcwd) "/build/"
1295 (car (scandir "build"
1296 (cut string-prefix? "lib." <>))))))
1297 (with-directory-excursion build-directory
1298 ;; Delete tests that require "moto" which is not yet in Guix.
1299 (for-each delete-file
1300 '("pandas/tests/io/conftest.py"
1301 "pandas/tests/io/json/test_compression.py"
1302 "pandas/tests/io/test_excel.py"
1303 "pandas/tests/io/test_parquet.py"))
1304 (invoke "pytest" "-v" "pandas" "-k"
1305 (string-append
1306 "not network and not disabled"
1307 ;; XXX: Due to the deleted tests above.
1308 " and not test_read_s3_jsonl")))))))))
1309 (propagated-inputs
1310 `(("python-numpy" ,python-numpy)
1311 ("python-pytz" ,python-pytz)
1312 ("python-dateutil" ,python-dateutil)))
1313 (native-inputs
1314 `(("python-cython" ,python-cython)
1315 ("python-beautifulsoup4" ,python-beautifulsoup4)
1316 ("python-lxml" ,python-lxml)
1317 ("python-html5lib" ,python-html5lib)
1318 ("python-nose" ,python-nose)
1319 ("python-pytest" ,python-pytest)))
1320 (home-page "https://pandas.pydata.org")
1321 (synopsis "Data structures for data analysis, time series, and statistics")
1322 (description
1323 "Pandas is a Python package providing fast, flexible, and expressive data
1324 structures designed to make working with structured (tabular,
1325 multidimensional, potentially heterogeneous) and time series data both easy
1326 and intuitive. It aims to be the fundamental high-level building block for
1327 doing practical, real world data analysis in Python.")
1328 (license license:bsd-3)))
1329
1330 (define-public python2-pandas
1331 (package-with-python2 python-pandas))
1332
1333 (define-public python2-mechanize
1334 (package
1335 (name "python2-mechanize")
1336 (version "0.2.5")
1337 (source
1338 (origin
1339 (method url-fetch)
1340 (uri (string-append "https://pypi.python.org/packages/source/m/mechanize/mechanize-"
1341 version ".tar.gz"))
1342 (sha256
1343 (base32
1344 "0rj7r166i1dyrq0ihm5rijfmvhs8a04im28lv05c0c3v206v4rrf"))))
1345 (build-system python-build-system)
1346 (arguments
1347 `(#:python ,python-2 ; apparently incompatible with Python 3
1348 #:tests? #f))
1349 ;; test fails with message
1350 ;; AttributeError: 'module' object has no attribute 'test_pullparser'
1351 ;; (python-3.3.2) or
1352 ;; AttributeError: 'module' object has no attribute 'test_urllib2_localnet'
1353 ;; (python-2.7.5).
1354 ;; The source code is from March 2011 and probably not up-to-date
1355 ;; with respect to python unit tests.
1356 (home-page "http://wwwsearch.sourceforge.net/mechanize/")
1357 (synopsis
1358 "Stateful programmatic web browsing in Python")
1359 (description
1360 "Mechanize implements stateful programmatic web browsing in Python,
1361 after Andy Lester’s Perl module WWW::Mechanize.")
1362 (license (license:non-copyleft
1363 "file://COPYING"
1364 "See COPYING in the distribution."))))
1365
1366
1367 (define-public python-simplejson
1368 (package
1369 (name "python-simplejson")
1370 (version "3.14.0")
1371 (source
1372 (origin
1373 (method url-fetch)
1374 (uri (pypi-uri "simplejson" version))
1375 (sha256
1376 (base32
1377 "1lkv3xlf7ryzi69zqfdbkvpxdfy1rg1rq2yzcnxgf4km5m6difqy"))))
1378 (build-system python-build-system)
1379 (home-page "http://simplejson.readthedocs.org/en/latest/")
1380 (synopsis
1381 "Json library for Python")
1382 (description
1383 "JSON (JavaScript Object Notation) is a subset of JavaScript
1384 syntax (ECMA-262 3rd edition) used as a lightweight data interchange
1385 format.
1386
1387 Simplejson exposes an API familiar to users of the standard library marshal
1388 and pickle modules. It is the externally maintained version of the json
1389 library contained in Python 2.6, but maintains compatibility with Python 2.5
1390 and (currently) has significant performance advantages, even without using
1391 the optional C extension for speedups. Simplejson is also supported on
1392 Python 3.3+.")
1393 (license license:x11)))
1394
1395 (define-public python2-simplejson
1396 (package-with-python2 python-simplejson))
1397
1398
1399 (define-public python-pyicu
1400 (package
1401 (name "python-pyicu")
1402 (version "1.9.8")
1403 (source
1404 (origin
1405 (method url-fetch)
1406 (uri (pypi-uri "PyICU" version))
1407 (sha256
1408 (base32
1409 "05nz4p2dpkhwj6y9kik24xbvmfxji39nl0xw0sc0nvp9fgzf6xnd"))))
1410 (build-system python-build-system)
1411 (inputs
1412 `(("icu4c" ,icu4c)))
1413 (native-inputs
1414 `(("python-pytest" ,python-pytest)
1415 ("python-six" ,python-six)))
1416 (home-page "https://github.com/ovalhub/pyicu")
1417 (synopsis "Python extension wrapping the ICU C++ API")
1418 (description
1419 "PyICU is a python extension wrapping the ICU C++ API.")
1420 (properties `((python2-variant . ,(delay python2-pyicu))))
1421 (license license:x11)))
1422
1423 (define-public python2-pyicu
1424 (let ((base (package-with-python2
1425 (strip-python2-variant python-pyicu))))
1426 (package
1427 (inherit base)
1428 (arguments
1429 `(,@(package-arguments base)
1430 #:phases
1431 (modify-phases %standard-phases
1432 (add-before 'check 'delete-failing-test
1433 (λ _
1434 ;; XXX: This fails due to Unicode issues unique to Python 2,
1435 ;; it seems: <https://github.com/ovalhub/pyicu/issues/61>.
1436 (delete-file "test/test_Script.py")
1437 #t))))))))
1438
1439 (define-public python2-dogtail
1440 ;; Python 2 only, as it leads to "TabError: inconsistent use of tabs and
1441 ;; spaces in indentation" with Python 3.
1442 (package
1443 (name "python2-dogtail")
1444 (version "0.9.9")
1445 (source (origin
1446 (method url-fetch)
1447 (uri (pypi-uri "dogtail" version))
1448 (sha256
1449 (base32
1450 "0p5wfssvzr9w0bvhllzbbd8fnp4cca2qxcpcsc33dchrmh5n552x"))))
1451 (build-system python-build-system)
1452 (arguments `(#:python ,python-2
1453 #:tests? #f)) ; invalid command "test"
1454 ;; Currently no offical homepage.
1455 (home-page "https://pypi.python.org/pypi/dogtail/")
1456 (synopsis "GUI test tool and automation framework written in Python")
1457 (description
1458 "Dogtail is a GUI test tool and automation framework written in Python.
1459 It uses Accessibility (a11y) technologies to communicate with desktop
1460 applications. dogtail scripts are written in Python and executed like any
1461 other Python program.")
1462 (license license:gpl2+)))
1463
1464 (define-public python-empy
1465 (package
1466 (name "python-empy")
1467 (version "3.3")
1468 (source (origin
1469 (method url-fetch)
1470 (uri (string-append "http://www.alcyone.com/software/empy/empy-"
1471 version ".tar.gz"))
1472 (sha256
1473 (base32
1474 "01g8mmkfnvjdmlhsihwyx56lrg7r5m5d2fg6mnxsvy6g0dnl69f6"))))
1475 (build-system python-build-system)
1476 (arguments
1477 `(#:tests? #f)) ;python2 only
1478 (home-page "http://www.alcyone.com/software/empy/")
1479 (synopsis "Templating system for Python")
1480 (description
1481 "EmPy is a system for embedding Python expressions and statements in
1482 template text; it takes an EmPy source file, processes it, and produces
1483 output. This is accomplished via expansions, which are special signals to the
1484 EmPy system and are set off by a special prefix (by default the at sign, @@).
1485 EmPy can expand arbitrary Python expressions and statements in this way, as
1486 well as a variety of special forms. Textual data not explicitly delimited in
1487 this way is sent unaffected to the output, allowing Python to be used in
1488 effect as a markup language. Also supported are callbacks via hooks,
1489 recording and playback via diversions, and dynamic, chainable filters. The
1490 system is highly configurable via command line options and embedded
1491 commands.")
1492 (license license:lgpl2.1+)))
1493
1494 (define-public python2-empy
1495 (package-with-python2 python-empy))
1496
1497 (define-public python2-element-tree
1498 (package
1499 (name "python2-element-tree")
1500 (version "1.2.6")
1501 (source (origin
1502 (method url-fetch)
1503 (uri (string-append
1504 "http://effbot.org/media/downloads/elementtree-"
1505 version "-20050316.tar.gz"))
1506 (sha256
1507 (base32
1508 "016bphqnlg0l4vslahhw4r0aanw95bpypy65r1i1acyb2wj5z7dj"))))
1509 (build-system python-build-system)
1510 (arguments
1511 `(#:python ,python-2 ; seems to be part of Python 3
1512 #:tests? #f)) ; no 'test' sub-command
1513 (synopsis "Toolkit for XML processing in Python")
1514 (description
1515 "ElementTree is a Python library supporting lightweight XML processing.")
1516 (home-page "http://effbot.org/zone/element-index.htm")
1517 (license (license:x11-style
1518 "http://docs.python.org/2/license.html"
1519 "Like \"CWI LICENSE AGREEMENT FOR PYTHON 0.9.0 THROUGH 1.2\"."))))
1520
1521 (define-public python2-pybugz
1522 (package
1523 (name "python2-pybugz")
1524 (version "0.6.11")
1525 (source (origin
1526 (method url-fetch)
1527 (uri (string-append
1528 "http://bits.liquidx.net/projects/pybugz/pybugz-"
1529 version ".tar.gz"))
1530 (sha256
1531 (base32
1532 "17ni00p08gp5lkxlrrcnvi3x09fmajnlbz4da03qcgl9q21ym4jd"))
1533 (patches (search-patches "pybugz-stty.patch"
1534 "pybugz-encode-error.patch"))))
1535 (build-system python-build-system)
1536 (arguments
1537 `(#:python ,python-2 ; SyntaxError with Python 3
1538 #:tests? #f)) ; no 'test' sub-command
1539 (propagated-inputs
1540 `(("element-tree" ,python2-element-tree)))
1541 (synopsis "Python and command-line interface to Bugzilla")
1542 (description
1543 "PyBugz is a Python library and command-line tool to query the Bugzilla
1544 bug tracking system. It is meant as an aid to speed up interaction with the
1545 bug tracker.")
1546 (home-page "http://www.liquidx.net/pybugz/")
1547 (license license:gpl2)))
1548
1549 (define-public python2-enum
1550 (package
1551 (name "python2-enum")
1552 (version "0.4.6")
1553 (source (origin
1554 (method url-fetch)
1555 (uri (pypi-uri "enum" version))
1556 (sha256
1557 (base32
1558 "13lk3yrwj42vl30kw3c194f739nrfrdg64s6i0v2p636n4k8brsl"))))
1559 (build-system python-build-system)
1560 (arguments
1561 `(#:python ,python-2))
1562 (home-page "http://pypi.python.org/pypi/enum/")
1563 (synopsis "Robust enumerated type support in Python")
1564 (description
1565 "This provides a module for robust enumerations in Python. It has
1566 been superseded by the Python standard library and is provided only for
1567 compatibility.")
1568 ;; Choice of either license.
1569 (license (list license:gpl3+ license:psfl))))
1570
1571 (define-public python-enum34
1572 (package
1573 (name "python-enum34")
1574 (version "1.1.6")
1575 (source
1576 (origin
1577 (method url-fetch)
1578 (uri (pypi-uri "enum34" version))
1579 (sha256
1580 (base32
1581 "1cgm5ng2gcfrkrm3hc22brl6chdmv67b9zvva9sfs7gn7dwc9n4a"))))
1582 (build-system python-build-system)
1583 (home-page "https://pypi.python.org/pypi/enum34")
1584 (synopsis "Backported Python 3.4 Enum")
1585 (description
1586 "Enum34 is the new Python stdlib enum module available in Python 3.4
1587 backported for previous versions of Python from 2.4 to 3.3.")
1588 (license license:bsd-3)))
1589
1590 (define-public python2-enum34
1591 (package-with-python2 python-enum34))
1592
1593 (define-public python-parse-type
1594 (package
1595 (name "python-parse-type")
1596 (version "0.4.2")
1597 (source
1598 (origin
1599 (method url-fetch)
1600 (uri (pypi-uri "parse_type" version))
1601 (sha256
1602 (base32
1603 "0g3b6gsdwnm8dpkh2vn34q6dzxm9gl908ggyzcv31n9xbp3vv5pm"))))
1604 (build-system python-build-system)
1605 (propagated-inputs
1606 `(("python-six" ,python-six)
1607 ("python-parse" ,python-parse)))
1608 (native-inputs
1609 `(("python-pytest" ,python-pytest)
1610 ("python-pytest-runner" ,python-pytest-runner)))
1611 (home-page "https://github.com/jenisys/parse_type")
1612 (synopsis "Extended parse module")
1613 (description
1614 "Parse_type extends the python parse module.")
1615 (properties
1616 `((python2-variant . ,(delay python2-parse-type))))
1617 (license license:bsd-3)))
1618
1619 (define-public python2-parse-type
1620 (let ((base (package-with-python2
1621 (strip-python2-variant python-parse-type))))
1622 (package (inherit base)
1623 (propagated-inputs
1624 `(("python2-enum34" ,python2-enum34)
1625 ,@(package-propagated-inputs base))))))
1626
1627 (define-public python-parse
1628 (package
1629 (name "python-parse")
1630 (version "1.8.4")
1631 (source
1632 (origin
1633 (method url-fetch)
1634 (uri (pypi-uri "parse" version))
1635 (sha256
1636 (base32
1637 "0f8997xr8nq2nq35iiviq8ningd1zvy59fg503xfpbi2dwhgdkf3"))))
1638 (build-system python-build-system)
1639 (arguments
1640 `(#:phases
1641 (modify-phases %standard-phases
1642 (replace 'check
1643 (lambda _ (invoke "python" "test_parse.py"))))))
1644 (home-page "https://github.com/r1chardj0n3s/parse")
1645 (synopsis "Parse strings")
1646 (description
1647 "Parse strings using a specification based on the Python @code{format()}
1648 syntax.")
1649 (license license:x11)))
1650
1651 (define-public python-polib
1652 (package
1653 (name "python-polib")
1654 (version "1.0.8")
1655 (source (origin
1656 (method url-fetch)
1657 (uri (pypi-uri "polib" version))
1658 (sha256
1659 (base32
1660 "1pq2hbm3m2q0cjdszk8mc4qa1vl3wcblh5nfyirlfnzb2pcy7zss"))))
1661 (build-system python-build-system)
1662 (home-page "https://bitbucket.org/izi/polib/wiki/Home")
1663 (synopsis "Manipulate, create and modify gettext files")
1664 (description "Polib can manipulate any gettext format (po, pot and mo)
1665 files. It can be used to create po files from scratch or to modify
1666 existing ones.")
1667 (license license:expat)))
1668
1669 (define-public python2-polib
1670 (let ((base (package-with-python2 (strip-python2-variant python-polib))))
1671 (package
1672 (inherit base)
1673 (arguments `(,@(package-arguments base)
1674 ;; Tests don't work with python2.
1675 #:tests? #f)))))
1676
1677 (define-public scons
1678 (package
1679 (name "scons")
1680 (version "3.0.1")
1681 (source (origin
1682 (method url-fetch)
1683 (uri (string-append "mirror://sourceforge/scons/scons/" version
1684 "/scons-" version ".tar.gz"))
1685 (sha256
1686 (base32
1687 "0wzid419mlwqw9llrg8gsx4nkzhqy16m4m40r0xnh6cwscw5wir4"))))
1688 (build-system python-build-system)
1689 (arguments
1690 `(#:use-setuptools? #f ; still relies on distutils
1691 #:tests? #f)) ; no 'python setup.py test' command
1692 (home-page "http://scons.org/")
1693 (synopsis "Software construction tool written in Python")
1694 (description
1695 "SCons is a software construction tool. Think of SCons as an improved,
1696 cross-platform substitute for the classic Make utility with integrated
1697 functionality similar to autoconf/automake and compiler caches such as ccache.
1698 In short, SCons is an easier, more reliable and faster way to build
1699 software.")
1700 (license license:x11)))
1701
1702 (define-public scons-python2
1703 (package
1704 (inherit (package-with-python2 scons))
1705 (name "scons-python2")))
1706
1707 (define-public python-extras
1708 (package
1709 (name "python-extras")
1710 (version "1.0.0")
1711 (source
1712 (origin
1713 (method url-fetch)
1714 (uri (pypi-uri "extras" version))
1715 (sha256
1716 (base32
1717 "0khvm08rcwm62wc47j8niyl6h13f8w51c8669ifivjdr23g3cbhk"))))
1718 (build-system python-build-system)
1719 (arguments
1720 ;; FIXME: Circular dependency on testtools.
1721 '(#:tests? #f))
1722 (home-page "https://github.com/testing-cabal/extras")
1723 (synopsis "Useful extensions to the Python standard library")
1724 (description
1725 "Extras is a set of extensions to the Python standard library.")
1726 (license license:expat)))
1727
1728 (define-public python2-extras
1729 (package-with-python2 python-extras))
1730
1731 (define-public python-mimeparse
1732 (package
1733 (name "python-mimeparse")
1734 (version "1.6.0")
1735 (source
1736 (origin
1737 (method url-fetch)
1738 (uri (string-append
1739 "https://pypi.python.org/packages/source/p/python-mimeparse/python-mimeparse-"
1740 version ".tar.gz"))
1741 (sha256
1742 (base32
1743 "0y2g6cl660bpz11srgqyvvm8gmywpgyx8g0xfvbiyr0af0yv1r3n"))))
1744 (build-system python-build-system)
1745 (arguments
1746 '(#:phases
1747 (modify-phases %standard-phases
1748 (replace 'check
1749 (lambda _
1750 (invoke "./mimeparse_test.py"))))))
1751 (home-page
1752 "https://github.com/dbtsai/python-mimeparse")
1753 (synopsis "Python library for parsing MIME types")
1754 (description
1755 "Mimeparse provides basic functions for parsing MIME type names and
1756 matching them against a list of media-ranges.")
1757 (license license:expat)))
1758
1759 (define-public python2-mimeparse
1760 (package-with-python2 python-mimeparse))
1761
1762 (define-public python-pafy
1763 (package
1764 (name "python-pafy")
1765 (version "0.5.3.1")
1766 (source
1767 (origin
1768 (method url-fetch)
1769 (uri (pypi-uri "pafy" version))
1770 (sha256
1771 (base32
1772 "1a7dxi95m1043rxx1r5x3ngb66nwlq6aqcasyqqjzmmmjps4zrim"))))
1773 (build-system python-build-system)
1774 (arguments
1775 `(#:tests? #f)) ; Currently pafy can not find itself in the tests
1776 (propagated-inputs
1777 ;; Youtube-dl is a python package which is imported in the file
1778 ;; "backend_youtube_dl.py", therefore it needs to be propagated.
1779 `(("youtube-dl" ,youtube-dl)))
1780 (home-page "https://np1.github.io/pafy/")
1781 (synopsis "Retrieve YouTube content and metadata")
1782 (description
1783 "@code{pafy} is a python library to retrieve YouTube content and metadata.")
1784 (license license:lgpl3+)))
1785
1786 (define-public python2-funcsigs
1787 (package
1788 (name "python2-funcsigs")
1789 (version "1.0.2")
1790 (source (origin
1791 (method url-fetch)
1792 (uri (pypi-uri "funcsigs" version))
1793 (sha256
1794 (base32
1795 "0l4g5818ffyfmfs1a924811azhjj8ax9xd1cffr1mzd3ycn0zfx7"))))
1796 (build-system python-build-system)
1797 (arguments
1798 `(#:python ,python-2))
1799 (native-inputs
1800 `(("python2-unittest2" ,python2-unittest2)))
1801 (home-page "http://funcsigs.readthedocs.org")
1802 (synopsis "Python function signatures from PEP362")
1803 (description
1804 "Backport of @code{funcsigs} which was introduced in Python 3.3.")
1805 (license license:asl2.0)))
1806
1807 (define-public python2-funcsigs-bootstrap
1808 (package
1809 (inherit python2-funcsigs)
1810 (name "python2-funcsigs-bootstrap")
1811 (native-inputs `())
1812 (arguments
1813 `(#:tests? #f
1814 ,@(package-arguments python2-funcsigs)))))
1815
1816 (define-public python-py
1817 (package
1818 (name "python-py")
1819 (version "1.5.3")
1820 (source
1821 (origin
1822 (method url-fetch)
1823 (uri (pypi-uri "py" version))
1824 (sha256
1825 (base32
1826 "10gq2lckvgwlk9w6yzijhzkarx44hsaknd0ypa08wlnpjnsgmj99"))))
1827 (build-system python-build-system)
1828 (arguments
1829 ;; FIXME: "ImportError: 'test' module incorrectly imported from
1830 ;; '/gnu/store/...-python-pytest-mimimal-3.0.5/lib/python3.5/site-packages'.
1831 ;; Expected '/tmp/guix-build-python-py-1.4.31.drv-0/py-1.4.31/py'.
1832 ;; Is this module globally installed?"
1833 '(#:tests? #f))
1834 (home-page "https://pylib.readthedocs.io/")
1835 (synopsis "Python library for parsing, I/O, instrospection, and logging")
1836 (description
1837 "Py is a Python library for file name parsing, .ini file parsing, I/O,
1838 code introspection, and logging.")
1839 (license license:expat)))
1840
1841 (define-public python2-py
1842 (package-with-python2 python-py))
1843
1844 ;; Recent versions of python-fixtures and python-testrepository need
1845 ;; python-pbr for packaging, which itself needs these two packages for
1846 ;; testing.
1847 ;; To fix this circular dependency, we use a build of python-pbr, based on the
1848 ;; same source, just without any test dependencies and with tests disabled.
1849 ;; python-pbr-minmal is then used to package python-fixtures and
1850 ;; python-testrepository.
1851 ;; Strictly speaking we currently could remove the test-requirements from the
1852 ;; normal python-pbr package (and save this package) since test are disabled
1853 ;; there anyway. But this may change in future.
1854 (define-public python-pbr-minimal
1855 (package
1856 (name "python-pbr-minimal")
1857 (version "3.0.1")
1858 (source
1859 (origin
1860 (method url-fetch)
1861 (uri (pypi-uri "pbr" version))
1862 (sha256
1863 (base32
1864 "14fs5acnalnb3h62s7q7av239j541fk0n0z0lawh4h09b1s93s6p"))))
1865 (build-system python-build-system)
1866 (arguments
1867 `(#:tests? #f))
1868 (home-page "http://docs.openstack.org/developer/pbr/")
1869 (synopsis "Minimal build of python-pbr used for bootstrapping")
1870 (description
1871 "Used only for bootstrapping python2-pbr, you should not need this.")
1872 (license license:asl2.0)))
1873
1874 (define-public python2-pbr-minimal
1875 (package-with-python2 python-pbr-minimal))
1876
1877 (define-public python-pbr
1878 (package
1879 (inherit python-pbr-minimal)
1880 (name "python-pbr")
1881 (arguments
1882 `(#:tests? #f)) ;; Most tests seem to use the Internet.
1883 (propagated-inputs
1884 `(("git" ,git))) ;; pbr actually uses the "git" binary.
1885 (native-inputs
1886 `(("python-fixtures" ,python-fixtures-bootstrap)
1887 ;; discover, coverage, hacking, subunit
1888 ("python-mock" ,python-mock)
1889 ("python-six" ,python-six)
1890 ("python-sphinx" ,python-sphinx)
1891 ("python-testrepository" ,python-testrepository-bootstrap)
1892 ("python-testresources" ,python-testresources-bootstrap)
1893 ("python-testscenarios" ,python-testscenarios-bootstrap)
1894 ("python-testtools" ,python-testtools-bootstrap)
1895 ("python-virtualenv" ,python-virtualenv)))
1896 (synopsis "Enhance the default behavior of Python’s setuptools")
1897 (description
1898 "Python Build Reasonableness (PBR) is a library that injects some useful
1899 and sensible default behaviors into your setuptools run. It will set
1900 versions, process requirements files and generate AUTHORS and ChangeLog file
1901 from git information.
1902 ")))
1903
1904 (define-public python2-pbr
1905 (package-with-python2 python-pbr))
1906
1907 (define-public python-exif-read
1908 (package
1909 (name "python-exif-read")
1910 (version "2.1.2")
1911 (source (origin
1912 (method url-fetch)
1913 (uri (pypi-uri "ExifRead" version))
1914 (sha256
1915 (base32
1916 "1b90jf6m9vxh9nanhpyvqdq7hmfx5iggw1l8kq10jrs6xgr49qkr"))))
1917 (build-system python-build-system)
1918 (arguments `(#:tests? #f)) ; no tests
1919 (home-page "https://github.com/ianare/exif-py")
1920 (synopsis "Python library to extract EXIF data from image files")
1921 (description
1922 "ExifRead is a Python library to extract EXIF data from tiff and jpeg
1923 files.")
1924 (license license:bsd-3)))
1925
1926 (define-public python2-exif-read
1927 (package-with-python2 python-exif-read))
1928
1929 (define-public python-pyld
1930 (package
1931 (name "python-pyld")
1932 (version "1.0.3")
1933 (source (origin
1934 (method url-fetch)
1935 (uri (pypi-uri "PyLD" version))
1936 (sha256
1937 (base32
1938 "12i2g6xdj30k7xxcibg3sc5y76snwq8l6n8fy9lyi577kgy0h2pm"))))
1939 (build-system python-build-system)
1940 (home-page "https://github.com/digitalbazaar/pyld")
1941 (synopsis "Python implementation of the JSON-LD specification")
1942 (description
1943 "PyLD is an implementation of the JSON-LD specification.")
1944 (license license:bsd-3)))
1945
1946 (define-public python2-pyld
1947 (package-with-python2 python-pyld))
1948
1949 (define-public python-click
1950 (package
1951 (name "python-click")
1952 (version "6.7")
1953 (source
1954 (origin
1955 (method url-fetch)
1956 (uri (pypi-uri "click" version))
1957 (sha256
1958 (base32
1959 "02qkfpykbq35id8glfgwc38yc430427yd05z1wc5cnld8zgicmgi"))))
1960 (build-system python-build-system)
1961 (arguments
1962 `(;; The tests are fragile, depending on a specific version of pytest:
1963 ;; <https://github.com/pallets/click/issues/823>
1964 #:tests? #f
1965 #:phases
1966 (modify-phases %standard-phases
1967 (add-after 'unpack 'fix-paths
1968 (lambda* (#:key inputs #:allow-other-keys)
1969 (let ((glibc (assoc-ref inputs ,(if (%current-target-system)
1970 "cross-libc" "libc"))))
1971 (substitute* "click/_unicodefun.py"
1972 (("'locale'")
1973 (string-append "'" glibc "/bin/locale'"))))
1974 #t)))))
1975 (native-inputs
1976 `(("python-pytest" ,python-pytest)))
1977 (home-page "http://click.pocoo.org")
1978 (synopsis "Command line library for Python")
1979 (description
1980 "Click is a Python package for creating command line interfaces in a
1981 composable way with as little code as necessary. Its name stands for
1982 \"Command Line Interface Creation Kit\". It's highly configurable but comes
1983 with sensible defaults out of the box.")
1984 (license license:bsd-3)))
1985
1986 (define-public python2-click
1987 (package-with-python2 python-click))
1988
1989 (define-public python-wheel
1990 (package
1991 (name "python-wheel")
1992 (version "0.30.0a0")
1993 (source
1994 (origin
1995 (method url-fetch)
1996 (uri (pypi-uri "wheel" version))
1997 (sha256
1998 (base32
1999 "1nm6mn8isny0hr86rhbfrpfj867c0phf001xgsd69xfp9ady1wwq"))))
2000 (build-system python-build-system)
2001 (native-inputs
2002 `(("python-jsonschema" ,python-jsonschema)
2003 ("python-pytest-cov" ,python-pytest-cov)))
2004 (home-page "https://bitbucket.org/pypa/wheel/")
2005 (synopsis "Format for built Python packages")
2006 (description
2007 "A wheel is a ZIP-format archive with a specially formatted filename and
2008 the @code{.whl} extension. It is designed to contain all the files for a PEP
2009 376 compatible install in a way that is very close to the on-disk format. Many
2010 packages will be properly installed with only the @code{Unpack} step and the
2011 unpacked archive preserves enough information to @code{Spread} (copy data and
2012 scripts to their final locations) at any later time. Wheel files can be
2013 installed with a newer @code{pip} or with wheel's own command line utility.")
2014 (license license:expat)
2015 (properties `((python2-variant . ,(delay python2-wheel))))))
2016
2017 (define-public python2-wheel
2018 (let ((wheel (package-with-python2
2019 (strip-python2-variant python-wheel))))
2020 (package (inherit wheel)
2021 (native-inputs `(("python2-functools32" ,python2-functools32)
2022 ,@(package-native-inputs wheel))))))
2023
2024 (define-public python-vcversioner
2025 (package
2026 (name "python-vcversioner")
2027 (version "2.16.0.0")
2028 (source
2029 (origin
2030 (method url-fetch)
2031 (uri (pypi-uri "vcversioner" version))
2032 (sha256
2033 (base32
2034 "16z10sm78jd7ca3jbkgc3q5i8a8q7y1h21q1li21yy3rlhbhrrns"))))
2035 (build-system python-build-system)
2036 (synopsis "Python library for version number discovery")
2037 (description "Vcversioner is a Python library that inspects tagging
2038 information in a variety of version control systems in order to discover
2039 version numbers.")
2040 (home-page "https://github.com/habnabit/vcversioner")
2041 (license license:isc)))
2042
2043 (define-public python2-vcversioner
2044 (package-with-python2 python-vcversioner))
2045
2046 (define-public python-jsonschema
2047 (package
2048 (name "python-jsonschema")
2049 (version "2.6.0")
2050 (source (origin
2051 (method url-fetch)
2052 (uri
2053 (string-append
2054 "https://pypi.python.org/packages/source/j/jsonschema/jsonschema-"
2055 version ".tar.gz"))
2056 (sha256
2057 (base32
2058 "00kf3zmpp9ya4sydffpifn0j0mzm342a2vzh82p6r0vh10cg7xbg"))))
2059 (build-system python-build-system)
2060 (arguments
2061 '(#:phases
2062 (modify-phases %standard-phases
2063 (replace 'check (lambda _ (zero? (system* "nosetests")))))))
2064 (native-inputs
2065 `(("python-nose" ,python-nose)
2066 ("python-vcversioner" ,python-vcversioner)))
2067 (home-page "https://github.com/Julian/jsonschema")
2068 (synopsis "Implementation of JSON Schema for Python")
2069 (description
2070 "Jsonschema is an implementation of JSON Schema for Python.")
2071 (license license:expat)
2072 (properties `((python2-variant . ,(delay python2-jsonschema))))))
2073
2074 (define-public python2-jsonschema
2075 (let ((jsonschema (package-with-python2
2076 (strip-python2-variant python-jsonschema))))
2077 (package (inherit jsonschema)
2078 (native-inputs
2079 `(("python2-mock" ,python2-mock)
2080 ,@(package-native-inputs jsonschema)))
2081 (propagated-inputs
2082 `(("python2-functools32" ,python2-functools32))))))
2083
2084 (define-public python-schema
2085 (package
2086 (name "python-schema")
2087 (version "0.6.6")
2088 (source
2089 (origin
2090 (method url-fetch)
2091 (uri (pypi-uri "schema" version))
2092 (sha256
2093 (base32
2094 "1lw28j9w9vxyigg7vkfkvi6ic9lgjkdnfvnxdr7pklslqvzmk2vm"))))
2095 (build-system python-build-system)
2096 (native-inputs
2097 `(("python-pytest" ,python-pytest)))
2098 (home-page "https://github.com/keleshev/schema")
2099 (synopsis "Simple data validation library")
2100 (description
2101 "@code{python-schema} is a library for validating Python data
2102 structures, such as those obtained from config-files, forms, external
2103 services or command-line parsing, converted from JSON/YAML (or
2104 something else) to Python data-types.")
2105 (license license:psfl)))
2106
2107 (define-public python2-schema
2108 (package-with-python2 python-schema))
2109
2110 (define-public python-schema-0.5
2111 (package (inherit python-schema)
2112 (version "0.5.0")
2113 (source
2114 (origin
2115 (method url-fetch)
2116 (uri (pypi-uri "schema" version))
2117 (sha256
2118 (base32
2119 "10zqvpaky51kgb8nd42bk7jwl8cn2zvayxjpdc1wwmpybj92x67s"))))))
2120
2121 (define-public python2-schema-0.5
2122 (package-with-python2 python-schema-0.5))
2123
2124 (define-public python-kitchen
2125 (package
2126 (name "python-kitchen")
2127 (version "1.2.5")
2128 (source
2129 (origin
2130 (method url-fetch)
2131 (uri (pypi-uri "kitchen" version))
2132 (sha256
2133 (base32
2134 "1zakh6l0yjvwic9p0nkvmbidpnkygkxbigh2skmb5gccyrhbp7xg"))))
2135 (build-system python-build-system)
2136 (propagated-inputs
2137 `(("python-chardet" ,python-chardet)))
2138 (home-page "https://github.com/fedora-infra/kitchen")
2139 (synopsis "Python API for snippets")
2140 (description "@code{kitchen} module provides a python API for all sorts of
2141 little useful snippets of code that everybody ends up writing for their projects
2142 but never seem big enough to build an independent release. Use kitchen and stop
2143 cutting and pasting that code over and over.")
2144 (license (list license:lgpl2.1+
2145 ;; subprocess.py, test_subprocess.py,
2146 ;; kitchen/pycompat25/defaultdict.py:
2147 license:psfl))))
2148
2149 (define-public python2-kitchen
2150 (package-with-python2 python-kitchen))
2151
2152 (define-public python-unidecode
2153 (package
2154 (name "python-unidecode")
2155 (version "0.04.21")
2156 (source (origin
2157 (method url-fetch)
2158 (uri (pypi-uri "Unidecode" version))
2159 (sha256
2160 (base32
2161 "0lfhp9c5xrbpjvbpr12ji52g1lx04404bzzdg6pvabhzisw6l2i8"))))
2162 (build-system python-build-system)
2163 (home-page "https://pypi.python.org/pypi/Unidecode")
2164 (synopsis "ASCII transliterations of Unicode text")
2165 (description
2166 "Unidecode provides ASCII transliterations of Unicode text. Unidecode is
2167 useful when integrating with legacy code that doesn't support Unicode, or for
2168 ease of entry of non-Roman names on a US keyboard, or when constructing ASCII
2169 machine identifiers from human-readable Unicode strings that should still be
2170 somewhat intelligible.")
2171 (license license:gpl2+)))
2172
2173 (define-public python2-unidecode
2174 (package-with-python2 python-unidecode))
2175
2176 (define-public python-pyjwt
2177 (package
2178 (name "python-pyjwt")
2179 (version "1.5.3")
2180 (source
2181 (origin
2182 (method url-fetch)
2183 (uri (pypi-uri "PyJWT" version))
2184 (sha256
2185 (base32
2186 "1rxsg14i33vm2i6lz0my628108c81k43v10n4h3p0gx62xdyf2sh"))
2187 (modules '((guix build utils)))
2188 (snippet
2189 '(begin
2190 (for-each delete-file-recursively
2191 (find-files "." "\\.pyc$"))
2192 #t))))
2193 (build-system python-build-system)
2194 (native-inputs
2195 `(("python-pytest" ,python-pytest)
2196 ("python-pytest-cov" ,python-pytest-cov)
2197 ("python-pytest-runner" ,python-pytest-runner)))
2198 (home-page "https://github.com/progrium/pyjwt")
2199 (synopsis "JSON Web Token implementation in Python")
2200 (description
2201 "PyJWT is a JSON Web Token implementation written in Python.")
2202 (license license:expat)))
2203
2204 (define-public python2-pyjwt
2205 (package-with-python2 python-pyjwt))
2206
2207 (define-public python-pykka
2208 (package
2209 (name "python-pykka")
2210 (version "1.2.1")
2211 (source
2212 (origin
2213 (method url-fetch)
2214 (uri (pypi-uri "Pykka" version))
2215 (sha256
2216 (base32
2217 "049w3r0mdnnw7xv19jiq7rvls9k7xs73x05b4qs5d6z4vvmgyiz8"))))
2218 (build-system python-build-system)
2219 (native-inputs
2220 `(("python-mock" ,python-mock)
2221 ("python-nose" ,python-nose)
2222 ("python-gevent" ,python-gevent)
2223 ("python-eventlet" ,python-eventlet)))
2224 (home-page "https://www.pykka.org/")
2225 (synopsis "Pykka is a Python implementation of the actor model")
2226 (description
2227 "Pykka is a Python implementation of the actor model.
2228 The actor model introduces some simple rules to control the sharing
2229 of state and cooperation between execution units, which makes it
2230 easier to build concurrent applications.")
2231 (license license:asl2.0)))
2232
2233 (define-public python2-pykka
2234 (package-with-python2 python-pykka))
2235
2236 (define-public python-itsdangerous
2237 (package
2238 (name "python-itsdangerous")
2239 (version "0.24")
2240 (source
2241 (origin
2242 (method url-fetch)
2243 (uri (string-append
2244 "https://pypi.python.org/packages/source/i/itsdangerous/itsdangerous-"
2245 version ".tar.gz"))
2246 (sha256
2247 (base32
2248 "06856q6x675ly542ig0plbqcyab6ksfzijlyf1hzhgg3sgwgrcyb"))))
2249 (build-system python-build-system)
2250 (home-page "https://github.com/mitsuhiko/itsdangerous")
2251 (synopsis "Python library for passing data to/from untrusted environments")
2252 (description
2253 "Itsdangerous provides various helpers to pass trusted data to untrusted
2254 environments and back.")
2255 (license license:bsd-3)))
2256
2257 (define-public python2-itsdangerous
2258 (package-with-python2 python-itsdangerous))
2259
2260 (define-public python-pyyaml
2261 (package
2262 (name "python-pyyaml")
2263 (version "3.13")
2264 (source
2265 (origin
2266 (method url-fetch)
2267 (uri (pypi-uri "PyYAML" version))
2268 (sha256
2269 (base32
2270 "1gx603g484z46cb74j9rzr6sjlh2vndxayicvlyhxdz98lhhkwry"))))
2271 (build-system python-build-system)
2272 (inputs
2273 `(("libyaml" ,libyaml)))
2274 (home-page "http://pyyaml.org/wiki/PyYAML")
2275 (synopsis "YAML parser and emitter for Python")
2276 (description
2277 "PyYAML is a YAML parser and emitter for Python. PyYAML features a
2278 complete YAML 1.1 parser, Unicode support, pickle support, capable extension
2279 API, and sensible error messages. PyYAML supports standard YAML tags and
2280 provides Python-specific tags that allow to represent an arbitrary Python
2281 object.")
2282 (license license:expat)))
2283
2284 (define-public python2-pyyaml
2285 (package-with-python2 python-pyyaml))
2286
2287 (define-public python-virtualenv
2288 (package
2289 (name "python-virtualenv")
2290 (version "15.0.3")
2291 (source
2292 (origin
2293 (method url-fetch)
2294 (uri (pypi-uri "virtualenv" version))
2295 (sha256
2296 (base32
2297 "07cbajzk8l05k5zhlw0b9wbf2is65bl9v6zrn2a0iyn57w6pd73d"))))
2298 (build-system python-build-system)
2299 (arguments
2300 `(#:phases
2301 (modify-phases %standard-phases
2302 (replace 'check
2303 (lambda _
2304 ;; Disable failing test. See upstream bug report
2305 ;; https://github.com/pypa/virtualenv/issues/957
2306 (substitute* "tests/test_virtualenv.py"
2307 (("skipif.*") "skipif(True, reason=\"Guix\")\n"))
2308 (zero? (system* "py.test")))))))
2309 (native-inputs
2310 `(("python-mock" ,python-mock)
2311 ("python-pytest" ,python-pytest)))
2312 (home-page "https://virtualenv.pypa.io/")
2313 (synopsis "Virtual Python environment builder")
2314 (description
2315 "Virtualenv is a tool to create isolated Python environments.")
2316 (license license:expat)))
2317
2318 (define-public python2-virtualenv
2319 (package-with-python2 python-virtualenv))
2320
2321 (define-public python-markupsafe
2322 (package
2323 (name "python-markupsafe")
2324 (version "0.23")
2325 (source
2326 (origin
2327 (method url-fetch)
2328 (uri (string-append
2329 "https://pypi.python.org/packages/source/M/MarkupSafe/MarkupSafe-"
2330 version ".tar.gz"))
2331 (sha256
2332 (base32
2333 "1hvip33wva3fnmvfp9x5klqri7hpl1hkgqmjbss18nmrb7zimv54"))))
2334 (build-system python-build-system)
2335 (home-page "https://github.com/mitsuhiko/markupsafe")
2336 (synopsis "XML/HTML/XHTML markup safe string implementation for Python")
2337 (description
2338 "Markupsafe provides an XML/HTML/XHTML markup safe string implementation
2339 for Python.")
2340 (license license:bsd-3)))
2341
2342 (define-public python2-markupsafe
2343 (package-with-python2 python-markupsafe))
2344
2345 (define-public python-jinja2
2346 (package
2347 (name "python-jinja2")
2348 (version "2.9.6")
2349 (source
2350 (origin
2351 (method url-fetch)
2352 (uri (pypi-uri "Jinja2" version))
2353 (sha256
2354 (base32
2355 "1zzrkywhziqffrzks14kzixz7nd4yh2vc0fb04a68vfd2ai03anx"))))
2356 (build-system python-build-system)
2357 (propagated-inputs
2358 `(("python-markupsafe" ,python-markupsafe)))
2359 (home-page "http://jinja.pocoo.org/")
2360 (synopsis "Python template engine")
2361 (description
2362 "Jinja2 is a small but fast and easy to use stand-alone template engine
2363 written in pure Python.")
2364 (license license:bsd-3)))
2365
2366 (define-public python2-jinja2
2367 (package-with-python2 python-jinja2))
2368
2369 (define-public python-pystache
2370 (package
2371 (name "python-pystache")
2372 (version "0.5.4")
2373 (source (origin
2374 (method url-fetch)
2375 (uri (pypi-uri "pystache" version))
2376 (sha256
2377 (base32
2378 "0nmqsfmiw4arjxqkmf9z66ml950pcdjk6aq4gin4sywmzdjw5fzp"))))
2379 (build-system python-build-system)
2380 (arguments
2381 '(#:tests? #f)) ; FIXME: Python 3 tests are failing.
2382 (home-page "http://defunkt.io/pystache/")
2383 (synopsis "Python logic-less template engine")
2384 (description
2385 "Pystache is a Python implementation of the framework agnostic,
2386 logic-free templating system Mustache.")
2387 (license license:expat)
2388 (properties `((python2-variant . ,(delay python2-pystache))))))
2389
2390 (define-public python2-pystache
2391 (package (inherit (package-with-python2
2392 (strip-python2-variant python-pystache)))
2393 (arguments
2394 `(#:python ,python-2
2395 #:phases
2396 (modify-phases %standard-phases
2397 (replace 'check
2398 (lambda _
2399 (zero? (system* "python" "test_pystache.py")))))))))
2400
2401 (define-public python-joblib
2402 (package
2403 (name "python-joblib")
2404 (version "0.13.0")
2405 (source (origin
2406 (method url-fetch)
2407 (uri (pypi-uri "joblib" version))
2408 (sha256
2409 (base32
2410 "0612nazad8dxmn3xghfrmjax6456l4xy6hn9cngs7vydi14ds7v5"))))
2411 (build-system python-build-system)
2412 (arguments
2413 `(#:phases
2414 (modify-phases %standard-phases
2415 (replace 'check
2416 (lambda _ (invoke "pytest" "-v" "joblib"))))))
2417 (native-inputs
2418 `(("python-pytest" ,python-pytest)))
2419 (home-page "https://joblib.readthedocs.io/")
2420 (synopsis "Using Python functions as pipeline jobs")
2421 (description
2422 "Joblib is a set of tools to provide lightweight pipelining in Python.
2423 In particular, joblib offers: transparent disk-caching of the output values
2424 and lazy re-evaluation (memoize pattern), easy simple parallel computing
2425 logging and tracing of the execution.")
2426 (license license:bsd-3)))
2427
2428 (define-public python2-joblib
2429 (package-with-python2 python-joblib))
2430
2431 (define-public python-docutils
2432 (package
2433 (name "python-docutils")
2434 (version "0.14")
2435 (source
2436 (origin
2437 (method url-fetch)
2438 (uri (pypi-uri "docutils" version))
2439 (sha256
2440 (base32
2441 "0x22fs3pdmr42kvz6c654756wja305qv6cx1zbhwlagvxgr4xrji"))))
2442 (build-system python-build-system)
2443 (arguments
2444 '(#:tests? #f)) ; no setup.py test command
2445 (home-page "http://docutils.sourceforge.net/")
2446 (synopsis "Python Documentation Utilities")
2447 (description
2448 "Docutils is a modular system for processing documentation into useful
2449 formats, such as HTML, XML, and LaTeX. For input Docutils supports
2450 reStructuredText.")
2451 ;; Most of the source code is public domain, but some source files are
2452 ;; licensed under the PFSL, BSD 2-clause, and GPLv3+ licenses.
2453 (license (list license:public-domain license:psfl license:bsd-2 license:gpl3+))))
2454
2455 (define-public python2-docutils
2456 (package-with-python2 python-docutils))
2457
2458 (define-public python-pygments
2459 (package
2460 (name "python-pygments")
2461 (version "2.2.0")
2462 (source
2463 (origin
2464 (method url-fetch)
2465 (uri (pypi-uri "Pygments" version))
2466 (sha256
2467 (base32
2468 "1k78qdvir1yb1c634nkv6rbga8wv4289xarghmsbbvzhvr311bnv"))))
2469 (build-system python-build-system)
2470 (arguments
2471 ;; FIXME: Tests require sphinx, which depends on this.
2472 '(#:tests? #f))
2473 (home-page "http://pygments.org/")
2474 (synopsis "Syntax highlighting")
2475 (description
2476 "Pygments is a syntax highlighting package written in Python.")
2477 (license license:bsd-2)))
2478
2479 (define-public python2-pygments
2480 (package-with-python2 python-pygments))
2481
2482 (define-public python-sphinxcontrib-websupport
2483 (package
2484 (name "python-sphinxcontrib-websupport")
2485 (version "1.0.1")
2486 (source (origin
2487 (method url-fetch)
2488 (uri (pypi-uri "sphinxcontrib-websupport" version))
2489 (sha256
2490 (base32
2491 "1f9f0wjpi9nhikbyaz6d19s7qvzdf1nq2g5dsh640fma4q9rd1bs"))))
2492 (build-system python-build-system)
2493 (propagated-inputs
2494 `(("python-mock" ,python-mock)
2495 ("python-pytest" ,python-pytest)
2496 ("python-xapian-bindings" ,python-xapian-bindings)))
2497 ;; Needed for running the test suite
2498 (native-inputs
2499 `(("python-six" ,python-six)
2500 ("python-jinja2" ,python-jinja2)
2501 ("python-docutils" ,python-docutils)
2502 ("python-sphinx" ,python-sphinx)
2503 ("python-sqlalchemy" ,python-sqlalchemy)
2504 ("python-whoosh" ,python-whoosh)))
2505 (home-page "http://sphinx-doc.org/")
2506 (synopsis "Sphinx API for web applications")
2507 (description "This package provides a Python API to easily integrate
2508 Sphinx documentation into your web application. It provides tools to
2509 integrate Sphinx documents in web templates and to handle searches.")
2510 (license license:bsd-3)))
2511
2512 (define-public python-sphinx
2513 (package
2514 (name "python-sphinx")
2515 (version "1.5.1")
2516 (source
2517 (origin
2518 (method url-fetch)
2519 (uri (pypi-uri "Sphinx" version))
2520 (sha256
2521 (base32
2522 "1i8p9idnli4gr0y4x67yakbdk5w6a0xjzhrg6bg51y9d1fi7fslf"))))
2523 (build-system python-build-system)
2524 (arguments
2525 `(#:phases
2526 (modify-phases %standard-phases
2527 (replace 'check
2528 (lambda _
2529 ;; Requires Internet access.
2530 (delete-file "tests/test_build_linkcheck.py")
2531 (zero? (system* "make" "test")))))))
2532 (propagated-inputs
2533 `(("python-imagesize" ,python-imagesize)
2534 ("python-sphinx-alabaster-theme"
2535 ,python-sphinx-alabaster-theme)
2536 ("python-babel" ,python-babel)
2537 ("python-snowballstemmer" ,python-snowballstemmer)
2538 ("python-docutils" ,python-docutils)
2539 ("python-jinja2" ,python-jinja2)
2540 ("python-pygments" ,python-pygments)
2541 ("python-requests" ,python-requests)
2542 ("python-six" ,python-six)))
2543 (native-inputs
2544 `(("graphviz" ,graphviz)
2545 ("python-html5lib" ,python-html5lib)
2546 ("python-mock" ,python-mock)
2547 ("python-nose" ,python-nose)))
2548 (home-page "http://sphinx-doc.org/")
2549 (synopsis "Python documentation generator")
2550 (description "Sphinx is a tool that makes it easy to create documentation
2551 for Python projects or other documents consisting of multiple reStructuredText
2552 sources.")
2553 (license license:bsd-3)
2554 (properties `((python2-variant . ,(delay python2-sphinx))))))
2555
2556 (define-public python-sphinx-1.6
2557 (package (inherit python-sphinx)
2558 (name "python-sphinx")
2559 (version "1.6.4")
2560 (source (origin
2561 (method url-fetch)
2562 (uri (pypi-uri "Sphinx" version))
2563 (sha256
2564 (base32
2565 "0gjakw9fv5pwqb5yyclxycs36sapxizk1vx6mkcdizmzgzcfy0gi"))))
2566 (arguments
2567 `(#:phases
2568 (modify-phases %standard-phases
2569 (replace 'check
2570 (lambda _
2571 ;; Requires Internet access.
2572 (delete-file "tests/test_build_linkcheck.py")
2573 (substitute* "tests/test_build_latex.py"
2574 (("@pytest.mark.sphinx\\('latex', testroot='images'\\)")
2575 "@pytest.mark.skip()"))
2576 (zero? (system* "make" "test")))))))
2577 (propagated-inputs
2578 `(("python-sphinxcontrib-websupport" ,python-sphinxcontrib-websupport)
2579 ,@(package-propagated-inputs python-sphinx)))
2580 (native-inputs
2581 `(("python-pytest" ,python-pytest)
2582 ("imagemagick" ,imagemagick) ; for "convert"
2583 ,@(package-native-inputs python-sphinx)))
2584 (properties `((python2-variant . ,(delay python2-sphinx-1.6))))))
2585
2586 (define-public python2-sphinx-1.6
2587 (let ((base (package-with-python2 (strip-python2-variant python-sphinx-1.6))))
2588 (package
2589 (inherit base)
2590 (propagated-inputs
2591 `(("python2-typing" ,python2-typing)
2592 ,@(package-propagated-inputs base)))
2593 (native-inputs `(("python2-enum34" ,python2-enum34)
2594 ,@(package-native-inputs base))))))
2595
2596 (define-public python-sphinx-1.5.3
2597 (package
2598 (inherit python-sphinx)
2599 (name "python-sphinx")
2600 (version "1.5.3")
2601 (source
2602 (origin
2603 (method url-fetch)
2604 (uri (pypi-uri "Sphinx" version))
2605 (sha256
2606 (base32
2607 "0kw1axswbvaavr8ggyf4qr6hnisnrzlbkkcdada69vk1x9xjassg"))))
2608 (native-inputs
2609 `(("python-pytest" ,python-pytest)
2610 ,@(package-native-inputs python-sphinx)))))
2611
2612 (define-public python2-sphinx
2613 (let ((base (package-with-python2 (strip-python2-variant python-sphinx))))
2614 (package
2615 (inherit base)
2616 (native-inputs `(("python2-mock" ,python2-mock)
2617 ("python2-enum34" ,python2-enum34)
2618 ,@(package-native-inputs base)))
2619 (propagated-inputs `(("python2-pytz" ,python2-pytz)
2620 ,@(package-propagated-inputs base))))))
2621
2622 (define-public python-sphinx-gallery
2623 (package
2624 (name "python-sphinx-gallery")
2625 (version "0.1.13")
2626 (source (origin
2627 (method url-fetch)
2628 (uri (string-append "https://github.com/sphinx-gallery/sphinx-gallery"
2629 "/archive/v" version ".tar.gz"))
2630 (file-name (string-append name "-" version ".tar.gz"))
2631 (sha256
2632 (base32
2633 "03fs99mcb1r7qp0xixqv07vcz98sk21yq19ffdysi0infdcpzfkd"))))
2634 (build-system python-build-system)
2635 (arguments
2636 ;; FIXME: Tests attempt to download <https://docs.python.org/3/objects.inv>,
2637 ;; <https://docs.scipy.org/doc/numpy/objects.inv>, and
2638 ;; <https://matplotlib.org/objects.inv>.
2639 `(#:tests? #f))
2640 (native-inputs
2641 `(("python-pytest-runner" ,python-pytest-runner)))
2642 (home-page "https://sphinx-gallery.github.io/")
2643 (synopsis "Generate an examples gallery automatically")
2644 (description
2645 "@code{sphinx_gallery} is a Sphinx extension that builds an HTML version
2646 from any set of Python scripts and puts it into an examples gallery.")
2647 (license license:bsd-3)))
2648
2649 (define-public python2-sphinx-gallery
2650 (package-with-python2 python-sphinx-gallery))
2651
2652 (define-public python-sphinx-rtd-theme
2653 (package
2654 (name "python-sphinx-rtd-theme")
2655 (version "0.2.4")
2656 (source
2657 (origin
2658 (method url-fetch)
2659 (uri (pypi-uri "sphinx_rtd_theme" version))
2660 (sha256
2661 (base32
2662 "05rlhjzdyapr2w74jjs7mrm8hi69qskcr5vya9f9drpsys7lpxrd"))))
2663 (build-system python-build-system)
2664 (arguments '(#:tests? #f)) ; No tests.
2665 (propagated-inputs
2666 `(("python-sphinx" ,python-sphinx)))
2667 (home-page "https://github.com/snide/sphinx_rtd_theme/")
2668 (synopsis "ReadTheDocs.org theme for Sphinx")
2669 (description "A theme for Sphinx used by ReadTheDocs.org.")
2670 (license license:expat)))
2671
2672 (define-public python2-sphinx-rtd-theme
2673 (package-with-python2 python-sphinx-rtd-theme))
2674
2675 (define-public python-guzzle-sphinx-theme
2676 (package
2677 (name "python-guzzle-sphinx-theme")
2678 (version "0.7.11")
2679 (source
2680 (origin
2681 (method url-fetch)
2682 (uri (pypi-uri "guzzle_sphinx_theme" version))
2683 (sha256
2684 (base32
2685 "1rnkzrrsbnifn3vsb4pfaia3nlvgvw6ndpxp7lzjrh23qcwid34v"))))
2686 (build-system python-build-system)
2687 (propagated-inputs
2688 `(("python-sphinx" ,python-sphinx)))
2689 (home-page "https://github.com/guzzle/guzzle_sphinx_theme")
2690 (synopsis "Sphinx theme used by Guzzle")
2691 (description "This package provides guzzle_sphinx_theme, a theme for the
2692 Sphinx documentation system, used by @uref{http://docs.guzzlephp.org, Guzzle}
2693 and several other projects.")
2694 (license license:expat)))
2695
2696 (define-public python2-guzzle-sphinx-theme
2697 (package-with-python2 python-guzzle-sphinx-theme))
2698
2699 (define-public python-rst.linker
2700 (package
2701 (name "python-rst.linker")
2702 (version "1.10")
2703 (source
2704 (origin
2705 (method url-fetch)
2706 (uri (pypi-uri "rst.linker" version))
2707 (sha256
2708 (base32
2709 "0iqaacp7pj1s8avs4kc0qg0r7dscywaq37y6l9j14glqdikk0wdj"))))
2710 (build-system python-build-system)
2711 (propagated-inputs
2712 `(("python-dateutil" ,python-dateutil)
2713 ("python-six" ,python-six)))
2714 (native-inputs
2715 `(("python-setuptools-scm" ,python-setuptools-scm)))
2716 ;; Test would require path.py, which would introduce a cyclic dependence.
2717 (arguments `(#:tests? #f))
2718 ;; Note: As of version 1.7 the documentation is not worth building.
2719 (home-page "https://github.com/jaraco/rst.linker")
2720 (synopsis "Sphinx plugin to add links and timestamps")
2721 (description "rst.linker allows to automatically replace text by a
2722 reStructuredText external reference or timestamps. It's primary purpose is to
2723 augment the changelog, but it can be used for other documents, too.")
2724 (license license:expat)))
2725
2726 (define-public python2-rst.linker
2727 (package-with-python2 python-rst.linker))
2728
2729 (define-public python-feedgenerator
2730 (package
2731 (name "python-feedgenerator")
2732 (version "1.9")
2733 (source
2734 (origin
2735 (method url-fetch)
2736 (uri (pypi-uri "feedgenerator" version))
2737 (sha256
2738 (base32
2739 "01mirwkm7xfx539hmvj7g9da1j51gw5lsx74dr0glizskjm5vq2s"))
2740 (modules '((guix build utils)))
2741 (snippet
2742 '(begin
2743 ;; Remove pre-compiled .pyc files from source.
2744 (for-each delete-file-recursively
2745 (find-files "." "__pycache__" #:directories? #t))
2746 (for-each delete-file (find-files "." "\\.pyc$"))
2747 #t))))
2748 (build-system python-build-system)
2749 (propagated-inputs
2750 `(("python-pytz" ,python-pytz)
2751 ("python-six" ,python-six)))
2752 (home-page "https://github.com/getpelican/feedgenerator")
2753 (synopsis
2754 "Standalone version of Django's Atom/RSS feed generator")
2755 (description
2756 "Feedgenerator-py3k is a standalone version of Django's feedgenerator,
2757 which can produce feeds in RSS 2.0, RSS 0.91, and Atom formats.")
2758 (license license:bsd-3)))
2759
2760 (define-public python2-feedgenerator
2761 (package-with-python2 python-feedgenerator))
2762
2763 (define-public python-toml
2764 (package
2765 (name "python-toml")
2766 (version "0.9.4")
2767 (source
2768 (origin
2769 (method url-fetch)
2770 (uri (pypi-uri "toml" version))
2771 (sha256
2772 (base32
2773 "0bdbpbip67wdm6c7xwc6mmbmskyradj4cdxn1iibj4fcx1nbv1lf"))))
2774 (build-system python-build-system)
2775 (arguments
2776 `(#:tests? #f)) ;no tests suite in release
2777 (home-page "https://github.com/uiri/toml")
2778 (synopsis "Library for TOML")
2779 (description
2780 "@code{toml} is a library for parsing and creating Tom's Obvious, Minimal
2781 Language (TOML) configuration files.")
2782 (license license:expat)))
2783
2784 (define-public python-black
2785 (package
2786 (name "python-black")
2787 (version "18.6b4")
2788 (source
2789 (origin
2790 (method url-fetch)
2791 (uri (pypi-uri "black" version))
2792 (sha256
2793 (base32
2794 "0i4sfqgz6w15vd50kbhi7g7rifgqlf8yfr8y78rypd56q64qn592"))))
2795 (build-system python-build-system)
2796 (arguments
2797 `(#:phases
2798 (modify-phases %standard-phases
2799 (add-after 'patch-source-shebangs 'patch-extra-shebangs
2800 (lambda _
2801 (let ((python3 (which "python3")))
2802 (substitute* '("tests/data/fmtonoff.py"
2803 "tests/data/string_prefixes.py"
2804 "tests/data/function.py")
2805 (("#!/usr/bin/env python3(\\.[0-9]+)?" _ minor-version)
2806 (string-append "#!" python3 (if (string? minor-version)
2807 minor-version
2808 ""))))))))))
2809 (propagated-inputs
2810 `(("python-click" ,python-click)
2811 ("python-attrs" ,python-attrs)
2812 ("python-appdirs" ,python-appdirs)
2813 ("python-toml" ,python-toml)))
2814 (home-page "https://github.com/ambv/black")
2815 (synopsis "The uncompromising code formatter")
2816 (description "Black is the uncompromising Python code formatter.")
2817 (license license:expat)))
2818
2819 (define-public python-blinker
2820 (package
2821 (name "python-blinker")
2822 (version "1.4")
2823 (source
2824 (origin
2825 (method url-fetch)
2826 (uri (pypi-uri "blinker" version))
2827 (sha256
2828 (base32
2829 "1dpq0vb01p36jjwbhhd08ylvrnyvcc82yxx3mwjx6awrycjyw6j7"))))
2830 (build-system python-build-system)
2831 (home-page "http://pythonhosted.org/blinker/")
2832 (synopsis "Fast, simple object-to-object and broadcast signaling")
2833 (description
2834 "Blinker provides a fast dispatching system that allows any number of
2835 interested parties to subscribe to events, or \"signals\".")
2836 (license license:expat)))
2837
2838 (define-public python2-blinker
2839 (package-with-python2 python-blinker))
2840
2841 (define-public pelican
2842 (package
2843 (name "pelican")
2844 (version "3.7.1")
2845 (source
2846 (origin
2847 (method url-fetch)
2848 (uri (pypi-uri "pelican" version))
2849 (sha256
2850 (base32
2851 "12spygavv9b6xpb5pgp7f0p3z0mms60nx6zrpx1yfkj68zz4flra"))))
2852 (build-system python-build-system)
2853 (propagated-inputs
2854 `(("python-feedgenerator" ,python-feedgenerator)
2855 ("python-jinja2" ,python-jinja2)
2856 ("python-pygments" ,python-pygments)
2857 ("python-docutils" ,python-docutils)
2858 ("python-pytz" ,python-pytz)
2859 ("python-blinker" ,python-blinker)
2860 ("python-unidecode" ,python-unidecode)
2861 ("python-six" ,python-six)
2862 ("python-dateutil" ,python-dateutil)
2863 ("python-markdown" ,python-markdown)))
2864 (home-page "https://getpelican.com/")
2865 (arguments
2866 `(;; XXX Requires a lot more packages to do unit tests :P
2867 #:tests? #f
2868 #:phases (modify-phases %standard-phases
2869 (add-before
2870 'install 'adjust-requires
2871 ;; Since feedgenerator is installed from git, it doesn't
2872 ;; conform to the version requirements.
2873 ;;
2874 ;; We *do have* "feedgenerator >= 1.6", but strip off the
2875 ;; version requirement so setuptools doesn't get confused.
2876 (lambda _
2877 (substitute* "setup.py"
2878 (("['\"]feedgenerator.*?['\"]")
2879 "'feedgenerator'")))))))
2880 (synopsis "Python-based static site publishing system")
2881 (description
2882 "Pelican is a tool to generate a static blog from reStructuredText,
2883 Markdown input files, and more. Pelican uses Jinja2 for templating
2884 and is very extensible.")
2885 (license license:agpl3+)))
2886
2887 (define-public python-scikit-image
2888 (package
2889 (name "python-scikit-image")
2890 (version "0.11.3")
2891 (source
2892 (origin
2893 (method url-fetch)
2894 (uri (string-append
2895 "https://pypi.python.org/packages/source/s/scikit-image/scikit-image-"
2896 version ".tar.gz"))
2897 (sha256
2898 (base32 "0jz416fqvpahqyffw8plmszzfj669w8wvf3y9clnr5lr6a7md3kn"))))
2899 (build-system python-build-system)
2900 (arguments
2901 ;; TODO: Some tests require running X11 server. Disable them?
2902 '(#:tests? #f))
2903 ;; See DEPENDS.txt for the list of build and run time requiremnts
2904 (propagated-inputs
2905 `(("python-matplotlib" ,python-matplotlib)
2906 ("python-networkx" ,python-networkx)
2907 ("python-scipy" ,python-scipy)
2908 ("python-pillow" ,python-pillow)))
2909 (native-inputs
2910 `(("python-numpy" ,python-numpy)
2911 ("python-cython" ,python-cython)
2912 ("python-six" ,python-six)))
2913 (home-page "http://scikit-image.org/")
2914 (synopsis "Image processing in Python")
2915 (description
2916 "Scikit-image is a collection of algorithms for image processing.")
2917 (license license:bsd-3)))
2918
2919 (define-public python2-scikit-image
2920 (package-with-python2 python-scikit-image))
2921
2922 (define-public python-cython
2923 (package
2924 (name "python-cython")
2925 (version "0.28.4")
2926 (source
2927 (origin
2928 (method url-fetch)
2929 (uri (pypi-uri "Cython" version))
2930 (sha256
2931 (base32
2932 "0imw9s2rbrh32clbl10csnwmig9p3nzkrd2baxxxfmnrsc42pb3n"))))
2933 (build-system python-build-system)
2934 ;; we need the full python package and not just the python-wrapper
2935 ;; because we need libpython3.3m.so
2936 (inputs
2937 `(("python" ,python)))
2938 (arguments
2939 `(#:phases
2940 (modify-phases %standard-phases
2941 (add-before 'check 'set-HOME
2942 ;; some tests require access to "$HOME/.cython"
2943 (lambda _ (setenv "HOME" "/tmp") #t))
2944
2945 ;; FIXME: These tests started failing on armhf after the 0.28 update
2946 ;; (commit c69d11c5930), both with an error such as this:
2947 ;; compiling (cpp) and running dictcomp ...
2948 ;; === C/C++ compiler error output: ===
2949 ;; ‘
2950 ;; dictcomp.cpp:5221: confused by earlier errors, bailing out
2951 ;; See <https://hydra.gnu.org/build/2948724> for logs.
2952 ,@(if (target-arm32?)
2953 `((add-before 'check 'disable-failing-tests
2954 (lambda _
2955 (let ((disabled-tests (open-file "tests/bugs.txt" "a")))
2956 (for-each (lambda (test)
2957 (format disabled-tests "~a\n" test))
2958 '("memslice" "dictcomp"))
2959 (close-port disabled-tests)))))
2960 '())
2961
2962 (replace 'check
2963 (lambda _ (invoke "python" "runtests.py" "-vv"))))))
2964 (home-page "http://cython.org/")
2965 (synopsis "C extensions for Python")
2966 (description "Cython is an optimising static compiler for both the Python
2967 programming language and the extended Cython programming language. It makes
2968 writing C extensions for Python as easy as Python itself.")
2969 (license license:asl2.0)
2970 (properties `((python2-variant . ,(delay python2-cython))))))
2971
2972 (define-public python2-cython
2973 (package (inherit (package-with-python2
2974 (strip-python2-variant python-cython)))
2975 (name "python2-cython")
2976 (inputs
2977 `(("python-2" ,python-2))))) ; this is not automatically changed
2978
2979 ;; The RPython toolchain currently does not support Python 3.
2980 (define-public python2-rpython
2981 (package
2982 (name "python2-rpython")
2983 (version "0.2.1")
2984 (source
2985 (origin
2986 (method url-fetch)
2987 (uri (pypi-uri "rpython" version))
2988 (sha256
2989 (base32
2990 "02z9cvxf0y41dcvwnvf2zn0albhhw1drvjjbq27m6i1piw1k6fc0"))))
2991 (build-system python-build-system)
2992 (arguments `(#:python ,python-2))
2993 (native-inputs
2994 `(("python2-pytest" ,python2-pytest))) ; needed for running tests
2995 (home-page "https://rpython.readthedocs.org")
2996 (synopsis "Framework for implementing interpreters and virtual machines")
2997 (description "RPython is a translation and support framework for
2998 producing implementations of dynamic languages, emphasizing a clean separation
2999 between language specification and implementation aspects.")
3000 (license license:expat)))
3001
3002 ;; NOTE: when upgrading numpy please make sure that python-pandas and
3003 ;; python-scipy still build, as these three packages are often used together.
3004 (define-public python-numpy
3005 (package
3006 (name "python-numpy")
3007 (version "1.14.6")
3008 (source
3009 (origin
3010 (method url-fetch)
3011 (uri (string-append
3012 "https://github.com/numpy/numpy/releases/download/v"
3013 version "/numpy-" version ".tar.gz"))
3014 (sha256
3015 (base32
3016 "1k426vnmmd4pds09zgn75g6w92823ry75zrzwjhzjvg7s63ipc31"))))
3017 (build-system python-build-system)
3018 (inputs
3019 `(("openblas" ,openblas)
3020 ("lapack" ,lapack)))
3021 (native-inputs
3022 `(("python-cython" ,python-cython)
3023 ("python-nose" ,python-nose)
3024 ("gfortran" ,gfortran)))
3025 (arguments
3026 `(#:phases
3027 (modify-phases %standard-phases
3028 (add-before 'build 'configure-blas-lapack
3029 (lambda* (#:key inputs #:allow-other-keys)
3030 (call-with-output-file "site.cfg"
3031 (lambda (port)
3032 (format port
3033 "[openblas]
3034 libraries = openblas
3035 library_dirs = ~a/lib
3036 include_dirs = ~a/include
3037
3038 # backslash-n to make emacs happy
3039 \n[lapack]
3040 lapack_libs = lapack
3041 library_dirs = ~a/lib
3042 include_dirs = ~a/include
3043 "
3044 (assoc-ref inputs "openblas")
3045 (assoc-ref inputs "openblas")
3046 (assoc-ref inputs "lapack")
3047 (assoc-ref inputs "lapack"))))
3048 #t))
3049 (add-before 'build 'fix-executable-paths
3050 (lambda* (#:key inputs #:allow-other-keys)
3051 ;; Make /gnu/store/...-bash-.../bin/sh the default shell,
3052 ;; instead of /bin/sh.
3053 (substitute* "numpy/distutils/exec_command.py"
3054 (("(os.environ.get\\('SHELL', ')(/bin/sh'\\))" match match-start match-end)
3055 (string-append match-start (assoc-ref inputs "bash") match-end)))
3056 ;; Use "gcc" executable, not "cc".
3057 (substitute* "numpy/distutils/system_info.py"
3058 (("c = distutils\\.ccompiler\\.new_compiler\\(\\)")
3059 "c = distutils.ccompiler.new_compiler(); c.set_executables(compiler='gcc',compiler_so='gcc',linker_exe='gcc',linker_so='gcc -shared')"))
3060 #t))
3061 ;; Tests can only be run after the library has been installed and not
3062 ;; within the source directory.
3063 (delete 'check)
3064 (add-after 'install 'check
3065 (lambda* (#:key outputs inputs #:allow-other-keys)
3066 ;; Make installed package available for running the tests
3067 (add-installed-pythonpath inputs outputs)
3068 (with-directory-excursion "/tmp"
3069 (zero? (system* "python" "-c"
3070 "import numpy; numpy.test(verbose=2)"))))))))
3071 (home-page "http://www.numpy.org/")
3072 (synopsis "Fundamental package for scientific computing with Python")
3073 (description "NumPy is the fundamental package for scientific computing
3074 with Python. It contains among other things: a powerful N-dimensional array
3075 object, sophisticated (broadcasting) functions, tools for integrating C/C++
3076 and Fortran code, useful linear algebra, Fourier transform, and random number
3077 capabilities.")
3078 (license license:bsd-3)))
3079
3080 (define-public python2-numpy
3081 (package-with-python2 python-numpy))
3082
3083 ;; NOTE: NumPy 1.8 is packaged only for Python 2 because it is of
3084 ;; interest only for legacy code going back to NumPy's predecessor
3085 ;; Numeric.
3086 (define-public python2-numpy-1.8
3087 (package (inherit python2-numpy)
3088 (version "1.8.2")
3089 (source
3090 (origin
3091 (method url-fetch)
3092 (uri (string-append
3093 "https://github.com/numpy/numpy/archive/v" version ".tar.gz"))
3094 (file-name (string-append "python2-numpy-" version ".tar.gz"))
3095 (sha256
3096 (base32
3097 "0sc20gz1b17xnyrkp5frca3ql5qfalpv916hfg2kqxpwr6jg0f1g"))))
3098 (arguments
3099 (substitute-keyword-arguments (package-arguments python2-numpy)
3100 ((#:phases phases)
3101 `(modify-phases ,phases
3102 (replace 'configure-blas-lapack
3103 (lambda* (#:key inputs #:allow-other-keys)
3104 (call-with-output-file "site.cfg"
3105 (lambda (port)
3106 (format port
3107 "[openblas]
3108 libraries = openblas,lapack
3109 library_dirs = ~a/lib:~a/lib
3110 include_dirs = ~a/include:~a/include
3111 "
3112 (assoc-ref inputs "openblas")
3113 (assoc-ref inputs "lapack")
3114 (assoc-ref inputs "openblas")
3115 (assoc-ref inputs "lapack"))))
3116 #t))))))
3117 (description "NumPy is the fundamental package for scientific computing
3118 with Python. It contains among other things: a powerful N-dimensional array
3119 object, sophisticated (broadcasting) functions, tools for integrating C/C++
3120 and Fortran code, useful linear algebra, Fourier transform, and random number
3121 capabilities. Version 1.8 is the last one to contain the numpy.oldnumeric API
3122 that includes the compatibility layer numpy.oldnumeric with NumPy's predecessor
3123 Numeric.")
3124 (license license:bsd-3)))
3125
3126 (define-public python-munch
3127 (package
3128 (name "python-munch")
3129 (version "2.0.4")
3130 (source
3131 (origin
3132 (method url-fetch)
3133 (uri (pypi-uri "munch" version))
3134 (sha256
3135 (base32
3136 "1cmqg91xnqx8gvnh4pmp0bfl1dfcm65d5p9mg73zz8pkjhx6h80l"))))
3137 (build-system python-build-system)
3138 (home-page "https://github.com/Infinidat/munch")
3139 (synopsis "Dot-accessible dictionary")
3140 (description "Munch is a dot-accessible dictionary similar to JavaScript
3141 objects.")
3142 (license license:expat)))
3143
3144 (define-public python2-munch
3145 (package-with-python2 python-munch))
3146
3147 (define-public python-colormath
3148 (package
3149 (name "python-colormath")
3150 (version "3.0.0")
3151 (source
3152 (origin
3153 (method url-fetch)
3154 (uri (pypi-uri "colormath" version))
3155 (sha256
3156 (base32
3157 "05qjycgxp3p2f9n6lmic68sxmsyvgnnlyl4z9w7dl9s56jphaiix"))))
3158 (build-system python-build-system)
3159 (propagated-inputs
3160 `(("python-networkx" ,python-networkx)
3161 ("python-numpy" ,python-numpy)))
3162 (home-page "https://github.com/gtaylor/python-colormath")
3163 (synopsis "Color math and conversion library")
3164 (description
3165 "This is a Python library for color math and conversions.")
3166 (license license:bsd-3)))
3167
3168 (define-public python2-colormath
3169 (package-with-python2 python-colormath))
3170
3171 (define-public python-spectra
3172 (package
3173 (name "python-spectra")
3174 (version "0.0.11")
3175 (source
3176 (origin
3177 (method url-fetch)
3178 (uri (pypi-uri "spectra" version))
3179 (sha256
3180 (base32
3181 "1f322x914bhkg6r5gv1vmnir3iy0k5kih0fd2gp3rdkw32jn5cwf"))))
3182 (build-system python-build-system)
3183 (arguments
3184 `(#:phases
3185 (modify-phases %standard-phases
3186 (replace 'check
3187 (lambda _
3188 (zero? (system* "nosetests" "-v")))))))
3189 (propagated-inputs
3190 `(("python-colormath" ,python-colormath)))
3191 (native-inputs
3192 `(("python-nose" ,python-nose)))
3193 (home-page "https://github.com/jsvine/spectra")
3194 (synopsis "Color scales and color conversion")
3195 (description
3196 "This package provides a Python library intended to make color math,
3197 color scales, and color space conversion easy. It has support for:
3198
3199 @enumerate
3200 @item Color scales
3201 @item Color ranges
3202 @item Color blending
3203 @item Brightening/darkening colors
3204 @item Saturating/desaturating colors
3205 @item Conversion to/from multiple color spaces.
3206 @end enumerate\n")
3207 (license license:expat)))
3208
3209 (define-public python2-spectra
3210 (package-with-python2 python-spectra))
3211
3212 (define-public python2-fastlmm
3213 (package
3214 (name "python2-fastlmm")
3215 (version "0.2.21")
3216 (source
3217 (origin
3218 (method url-fetch)
3219 (uri (pypi-uri "fastlmm" version ".zip"))
3220 (sha256
3221 (base32
3222 "1q8c34rpmwkfy3r4d5172pzdkpfryj561897z9r3x22gq7813x1m"))))
3223 (build-system python-build-system)
3224 (arguments
3225 `(#:python ,python-2)) ; only Python 2.7 is supported
3226 (propagated-inputs
3227 `(("python2-numpy" ,python2-numpy)
3228 ("python2-scipy" ,python2-scipy)
3229 ("python2-matplotlib" ,python2-matplotlib)
3230 ("python2-pandas" ,python2-pandas)
3231 ("python2-scikit-learn" ,python2-scikit-learn)
3232 ("python2-pysnptools" ,python2-pysnptools)))
3233 (native-inputs
3234 `(("unzip" ,unzip)
3235 ("python2-cython" ,python2-cython)
3236 ("python2-mock" ,python2-mock)
3237 ("python2-nose" ,python2-nose)))
3238 (home-page "http://research.microsoft.com/en-us/um/redmond/projects/mscompbio/fastlmm/")
3239 (synopsis "Perform genome-wide association studies on large data sets")
3240 (description
3241 "FaST-LMM, which stands for Factored Spectrally Transformed Linear Mixed
3242 Models, is a program for performing both single-SNP and SNP-set genome-wide
3243 association studies (GWAS) on extremely large data sets.")
3244 (license license:asl2.0)))
3245
3246 (define-public python-numpy-documentation
3247 (package
3248 (name "python-numpy-documentation")
3249 (version (package-version python-numpy))
3250 (source (package-source python-numpy))
3251 (build-system python-build-system)
3252 (native-inputs
3253 `(("python-matplotlib" ,python-matplotlib)
3254 ("python-numpy" ,python-numpy)
3255 ("pkg-config" ,pkg-config)
3256 ("python-sphinx" ,python-sphinx)
3257 ("python-numpydoc" ,python-numpydoc)
3258 ("texlive" ,(texlive-union (list texlive-fonts-amsfonts
3259 texlive-fonts-ec
3260 texlive-generic-ifxetex
3261 texlive-generic-pdftex
3262 texlive-latex-amsfonts
3263 texlive-latex-capt-of
3264 texlive-latex-cmap
3265 texlive-latex-environ
3266 texlive-latex-eqparbox
3267 texlive-latex-etoolbox
3268 texlive-latex-expdlist
3269 texlive-latex-fancyhdr
3270 texlive-latex-fancyvrb
3271 texlive-latex-fncychap
3272 texlive-latex-float
3273 texlive-latex-framed
3274 texlive-latex-geometry
3275 texlive-latex-graphics
3276 texlive-latex-hyperref
3277 texlive-latex-mdwtools
3278 texlive-latex-multirow
3279 texlive-latex-oberdiek
3280 texlive-latex-parskip
3281 texlive-latex-preview
3282 texlive-latex-tabulary
3283 texlive-latex-threeparttable
3284 texlive-latex-titlesec
3285 texlive-latex-trimspaces
3286 texlive-latex-ucs
3287 texlive-latex-upquote
3288 texlive-latex-url
3289 texlive-latex-varwidth
3290 texlive-latex-wrapfig)))
3291 ("texinfo" ,texinfo)
3292 ("perl" ,perl)
3293 ("scipy-sphinx-theme"
3294 ,(origin ; The build script expects scipy-sphinx-theme as a git submodule
3295 (method git-fetch)
3296 (uri (git-reference
3297 (url "https://github.com/scipy/scipy-sphinx-theme.git")
3298 (commit "c466764e2231ba132c09826b5b138fffa1cfcec3")))
3299 (sha256
3300 (base32
3301 "0q2y87clwlsgc7wvlsn9pzyssybcq10plwhq2w1ydykfsyyqbmkl"))))
3302 ,@(package-native-inputs python-numpy)))
3303 (arguments
3304 `(#:tests? #f ; we're only generating the documentation
3305 #:phases
3306 (modify-phases %standard-phases
3307 (delete 'build)
3308 (replace 'install
3309 (lambda* (#:key inputs outputs #:allow-other-keys)
3310 (let* ((data (string-append (assoc-ref outputs "out") "/share"))
3311 (doc (string-append
3312 data "/doc/" ,name "-"
3313 ,(package-version python-numpy)))
3314 (info-reader (string-append data "/info"))
3315 (html (string-append doc "/html"))
3316 (scipy-sphinx-theme "scipy-sphinx-theme")
3317 (sphinx-theme-checkout (assoc-ref inputs scipy-sphinx-theme))
3318 (pyver ,(string-append "PYVER=")))
3319
3320 ;; FIXME: this is needed to for texlive-union to generate
3321 ;; fonts, which are not found.
3322 (setenv "HOME" "/tmp")
3323
3324 (with-directory-excursion "doc"
3325 (copy-recursively sphinx-theme-checkout scipy-sphinx-theme)
3326 (mkdir-p html)
3327 (system* "make" "html" pyver)
3328 (system* "make" "latex" "PAPER=a4" pyver)
3329 (system* "make" "-C" "build/latex"
3330 "all-pdf" "PAPER=a4" pyver)
3331 ;; FIXME: Generation of the info file fails.
3332 ;; (system* "make" "info" pyver)
3333 ;; (mkdir-p info)
3334 ;; (copy-file "build/texinfo/numpy.info"
3335 ;; (string-append info "/numpy.info"))
3336 (for-each (lambda (file)
3337 (copy-file (string-append "build/latex" file)
3338 (string-append doc file)))
3339 '("/numpy-ref.pdf" "/numpy-user.pdf"))
3340 (with-directory-excursion "build/html"
3341 (for-each (lambda (file)
3342 (let* ((dir (dirname file))
3343 (tgt-dir (string-append html "/" dir)))
3344 (unless (equal? "." dir)
3345 (mkdir-p tgt-dir))
3346 (install-file file html)))
3347 (find-files "." ".*")))))
3348 #t)))))
3349 (home-page (package-home-page python-numpy))
3350 (synopsis "Documentation for the python-numpy package")
3351 (description (package-description python-numpy))
3352 (license (package-license python-numpy))))
3353
3354 (define-public python2-numpy-documentation
3355 (let ((numpy-documentation (package-with-python2 python-numpy-documentation)))
3356 (package
3357 (inherit numpy-documentation)
3358 (native-inputs `(("python2-functools32" ,python2-functools32)
3359 ,@(package-native-inputs numpy-documentation))))))
3360
3361 (define-public python-pygit2
3362 (package
3363 (name "python-pygit2")
3364 (version "0.26.4")
3365 (source
3366 (origin
3367 (method url-fetch)
3368 (uri (pypi-uri "pygit2" version))
3369 (sha256
3370 (base32
3371 "145k3fsd21274swia7mcc7n3kzlbd47xmg55mxsjdb5d9b7fr858"))))
3372 (build-system python-build-system)
3373 (propagated-inputs
3374 `(("python-six" ,python-six)
3375 ("python-cffi" ,python-cffi)
3376 ("libgit2" ,libgit2)
3377 ("python-tox" ,python-tox)))
3378 (home-page "https://github.com/libgit2/pygit2")
3379 (synopsis "Python bindings for libgit2")
3380 (description "Pygit2 is a set of Python bindings to the libgit2 shared
3381 library, libgit2 implements Git plumbing.")
3382 ;; GPL2.0 only, with linking exception.
3383 (license license:gpl2)))
3384
3385 (define-public python2-pygit2
3386 (package-with-python2 python-pygit2))
3387
3388 (define-public python-pyparsing
3389 (package
3390 (name "python-pyparsing")
3391 (version "2.2.1")
3392 (source
3393 (origin
3394 (method url-fetch)
3395 (uri (pypi-uri "pyparsing" version))
3396 (sha256
3397 (base32 "06dgd0iilvf8m0ssmfpcbh8l6jf0zkp8adbb84llksg17crfx4zl"))))
3398 (build-system python-build-system)
3399 (outputs '("out" "doc"))
3400 (arguments
3401 `(#:tests? #f ; no test target
3402 #:phases
3403 (modify-phases %standard-phases
3404 (add-after 'install 'install-doc
3405 (lambda* (#:key outputs #:allow-other-keys)
3406 (let* ((doc (string-append (assoc-ref outputs "doc")
3407 "/share/doc/" ,name "-" ,version))
3408 (html-doc (string-append doc "/html"))
3409 (examples (string-append doc "/examples")))
3410 (mkdir-p html-doc)
3411 (mkdir-p examples)
3412 (for-each
3413 (lambda (dir tgt)
3414 (map (lambda (file)
3415 (install-file file tgt))
3416 (find-files dir ".*")))
3417 (list "docs" "htmldoc" "examples")
3418 (list doc html-doc examples))
3419 #t))))))
3420 (home-page "https://github.com/pyparsing/pyparsing")
3421 (synopsis "Python parsing class library")
3422 (description
3423 "The pyparsing module is an alternative approach to creating and
3424 executing simple grammars, vs. the traditional lex/yacc approach, or the use
3425 of regular expressions. The pyparsing module provides a library of classes
3426 that client code uses to construct the grammar directly in Python code.")
3427 (license license:expat)))
3428
3429 (define-public python2-pyparsing
3430 (package-with-python2 python-pyparsing))
3431
3432 (define-public python-numpydoc
3433 (package
3434 (name "python-numpydoc")
3435 (version "0.5")
3436 (source
3437 (origin
3438 (method url-fetch)
3439 (uri (string-append
3440 "https://pypi.python.org/packages/source/n/numpydoc/numpydoc-"
3441 version ".tar.gz"))
3442 (sha256
3443 (base32
3444 "0d4dnifaxkll50jx6czj05y8cb4ny60njd2wz299sj2jxfy51w4k"))
3445 (modules '((guix build utils)))
3446 (snippet
3447 '(begin
3448 ;; Drop a test requiring matplotlib, which we cannot add as an
3449 ;; input since it would create a circular dependency: Extend the
3450 ;; test for Python 3, where it is already dropped, to Python 2.
3451 (substitute* "numpydoc/tests/test_plot_directive.py"
3452 (("3") "2"))
3453 #t))))
3454 (build-system python-build-system)
3455 (propagated-inputs
3456 `(("python-sphinx" ,python-sphinx)))
3457 (native-inputs
3458 `(("python-nose" ,python-nose)))
3459 (home-page "https://pypi.python.org/pypi/numpydoc")
3460 (synopsis
3461 "Numpy's Sphinx extensions")
3462 (description
3463 "Sphinx extension to support docstrings in Numpy format.")
3464 (license license:bsd-2)))
3465
3466 (define-public python2-numpydoc
3467 (package-with-python2 python-numpydoc))
3468
3469 (define-public python-numexpr
3470 (package
3471 (name "python-numexpr")
3472 (version "2.6.5")
3473 (source
3474 (origin
3475 (method url-fetch)
3476 (uri (pypi-uri "numexpr" version))
3477 (sha256
3478 (base32
3479 "1frnbcwmsi312154x274xl28xazr1k8vjby83fwyla2n10a81bgq"))))
3480 (build-system python-build-system)
3481 (arguments `(#:tests? #f)) ; no tests included
3482 (propagated-inputs
3483 `(("python-numpy" ,python-numpy)))
3484 (home-page "https://github.com/pydata/numexpr")
3485 (synopsis "Fast numerical expression evaluator for NumPy")
3486 (description
3487 "Numexpr is a fast numerical expression evaluator for NumPy. With it,
3488 expressions that operate on arrays are accelerated and use less memory than
3489 doing the same calculation in Python. In addition, its multi-threaded
3490 capabilities can make use of all your cores, which may accelerate
3491 computations, most specially if they are not memory-bounded (e.g. those using
3492 transcendental functions).")
3493 (license license:expat)))
3494
3495 (define-public python2-numexpr
3496 (package-with-python2 python-numexpr))
3497
3498 (define-public python-cycler
3499 (package
3500 (name "python-cycler")
3501 (version "0.10.0")
3502 (source (origin
3503 (method url-fetch)
3504 (uri (pypi-uri "cycler" version))
3505 (sha256
3506 (base32
3507 "1n69n23fak1gjxlrbhqisi2b9pv3ckrfj98llx3p53953082syyd"))))
3508 (build-system python-build-system)
3509 (arguments
3510 ;; XXX: The current version requires 'coveralls' which we don't have.
3511 ;; Enable this for the next release which uses 'python-pytest'.
3512 '(#:tests? #f))
3513 (propagated-inputs
3514 `(("python-six" ,python-six)))
3515 (home-page "http://matplotlib.org/cycler/")
3516 (synopsis "Composable keyword argument iterator")
3517 (description
3518 "When using @code{matplotlib} and plotting more than one line, it is
3519 common to want to be able to want to be able to cycle over one or more artist
3520 styles; but the plotting logic can quickly become involved.
3521 To address this and enable easy cycling over arbitrary @code{kwargs}, the
3522 @code{Cycler} class was developed.")
3523 (license license:bsd-3)))
3524
3525 (define-public python2-cycler
3526 (package-with-python2 python-cycler))
3527
3528 (define-public python-colorspacious
3529 (package
3530 (name "python-colorspacious")
3531 (version "1.1.0")
3532 (source
3533 (origin
3534 (method url-fetch)
3535 (uri (string-append "https://github.com/njsmith/colorspacious/archive/v"
3536 version ".tar.gz"))
3537 (file-name (string-append name "-" version))
3538 (sha256
3539 (base32 "1vflh5jm32qb0skza2i8pjacv09w6gq84fqpp2nj77s0rbmzgr4k"))))
3540 (build-system python-build-system)
3541 (propagated-inputs
3542 `(("python-numpy" ,python-numpy)))
3543 (native-inputs
3544 `(("python-nose" ,python-nose)))
3545 (arguments
3546 `(#:phases
3547 (modify-phases %standard-phases
3548 (replace 'check
3549 (lambda _
3550 (zero? (system* "nosetests" "--all-modules" "-v" "colorspacious")))))))
3551 (home-page "https://github.com/njsmith/colorspacious")
3552 (synopsis "Python library for colorspace conversions")
3553 (description "@code{colorspacious} is a Python library that lets you
3554 convert between colorspaces like sRGB, XYZ, CIEL*a*b*, CIECAM02, CAM02-UCS, etc.")
3555 (license license:expat)))
3556
3557 (define-public python2-colorspacious
3558 (package-with-python2 python-colorspacious))
3559
3560 (define-public python-matplotlib
3561 (package
3562 (name "python-matplotlib")
3563 (version "2.2.3")
3564 (source
3565 (origin
3566 (method url-fetch)
3567 (uri (pypi-uri "matplotlib" version))
3568 (sha256
3569 (base32
3570 "1rcc7x9ig3hpchkc4cwdvym3y451w74275fxr455zkfagrsvymbk"))))
3571 (build-system python-build-system)
3572 (propagated-inputs ; the following packages are all needed at run time
3573 `(("python-cycler" ,python-cycler)
3574 ("python-kiwisolver" ,python-kiwisolver)
3575 ("python-pyparsing" ,python-pyparsing)
3576 ("python-pygobject" ,python-pygobject)
3577 ("gobject-introspection" ,gobject-introspection)
3578 ("python-tkinter" ,python "tk")
3579 ("python-dateutil" ,python-dateutil)
3580 ("python-numpy" ,python-numpy)
3581 ("python-pillow" ,python-pillow)
3582 ("python-pytz" ,python-pytz)
3583 ("python-six" ,python-six)
3584 ;; The 'gtk+' package (and 'gdk-pixbuf', 'atk' and 'pango' propagated
3585 ;; from 'gtk+') provides the required 'typelib' files used by
3586 ;; 'gobject-introspection'. The location of these files is set with the
3587 ;; help of the environment variable GI_TYPELIB_PATH. At build time this
3588 ;; is done automatically by a 'native-search-path' procedure. However,
3589 ;; at run-time the user must set this variable as follows:
3590 ;;
3591 ;; export GI_TYPELIB_PATH=~/.guix-profile/lib/girepository-1.0
3592 ("gtk+" ,gtk+)
3593 ;; From version 1.4.0 'matplotlib' makes use of 'cairocffi' instead of
3594 ;; 'pycairo'. However, 'pygobject' makes use of a 'pycairo' 'context'
3595 ;; object. For this reason we need to import both libraries.
3596 ;; https://pythonhosted.org/cairocffi/cffi_api.html#converting-pycairo
3597 ("python-pycairo" ,python-pycairo)
3598 ;; XXX: qtwebkit cannot be built reliably.
3599 ("python-pyqt" ,python-pyqt-without-qtwebkit)
3600 ("python-cairocffi" ,python-cairocffi)))
3601 (inputs
3602 `(("libpng" ,libpng)
3603 ("imagemagick" ,imagemagick)
3604 ("freetype" ,freetype)
3605 ("cairo" ,cairo)
3606 ("glib" ,glib)
3607 ;; FIXME: Add backends when available.
3608 ;("python-wxpython" ,python-wxpython)
3609 ("tcl" ,tcl)
3610 ("tk" ,tk)))
3611 (native-inputs
3612 `(("pkg-config" ,pkg-config)
3613 ("python-nose" ,python-nose)
3614 ("python-mock" ,python-mock)))
3615 (arguments
3616 `(#:phases
3617 (modify-phases %standard-phases
3618 (add-before 'build 'configure-environment
3619 (lambda* (#:key outputs inputs #:allow-other-keys)
3620 (let ((cairo (assoc-ref inputs "cairo"))
3621 (gtk+ (assoc-ref inputs "gtk+")))
3622 ;; Setting these directories in the 'basedirlist' of 'setup.cfg'
3623 ;; has not effect.
3624 (setenv "LD_LIBRARY_PATH"
3625 (string-append cairo "/lib:" gtk+ "/lib"))
3626 (setenv "HOME" (getcwd))
3627 (call-with-output-file "setup.cfg"
3628 (lambda (port)
3629 (format port "[directories]~%
3630 basedirlist = ~a,~a~%
3631 [rc_options]~%
3632 backend = TkAgg~%"
3633 (assoc-ref inputs "tcl")
3634 (assoc-ref inputs "tk")))))
3635 #t)))))
3636 (home-page "http://matplotlib.org")
3637 (synopsis "2D plotting library for Python")
3638 (description
3639 "Matplotlib is a Python 2D plotting library which produces publication
3640 quality figures in a variety of hardcopy formats and interactive environments
3641 across platforms. Matplotlib can be used in Python scripts, the python and
3642 ipython shell, web application servers, and six graphical user interface
3643 toolkits.")
3644 (license license:psfl)
3645 (properties `((python2-variant . ,(delay python2-matplotlib))))))
3646
3647 (define-public python2-matplotlib
3648 (let ((matplotlib (package-with-python2
3649 (strip-python2-variant python-matplotlib))))
3650 (package (inherit matplotlib)
3651 ;; Make sure to use special packages for Python 2 instead
3652 ;; of those automatically rewritten by package-with-python2.
3653 (propagated-inputs
3654 `(("python2-pycairo" ,python2-pycairo)
3655 ("python2-backports-functools-lru-cache"
3656 ,python2-backports-functools-lru-cache)
3657 ("python2-functools32" ,python2-functools32)
3658 ("python2-pygobject-2" ,python2-pygobject-2)
3659 ("python2-subprocess32" ,python2-subprocess32)
3660 ("python2-tkinter" ,python-2 "tk")
3661 ,@(fold alist-delete (package-propagated-inputs matplotlib)
3662 '("python-pycairo" "python-pygobject" "python-tkinter")))))))
3663
3664 (define-public python-matplotlib-documentation
3665 (package
3666 (name "python-matplotlib-documentation")
3667 (version (package-version python-matplotlib))
3668 (source (package-source python-matplotlib))
3669 (build-system python-build-system)
3670 (native-inputs
3671 `(("python-matplotlib" ,python-matplotlib)
3672 ("python-colorspacious" ,python-colorspacious)
3673 ("python-sphinx" ,python-sphinx-1.6)
3674 ("python-sphinx-gallery" ,python-sphinx-gallery)
3675 ("python-numpydoc" ,python-numpydoc)
3676 ("python-ipython" ,python-ipython)
3677 ("python-mock" ,python-mock)
3678 ("graphviz" ,graphviz)
3679 ("texlive" ,texlive)
3680 ("texinfo" ,texinfo)
3681 ,@(package-native-inputs python-matplotlib)))
3682 (arguments
3683 `(#:tests? #f ; we're only generating documentation
3684 #:phases
3685 (modify-phases %standard-phases
3686 (replace 'build
3687 (lambda _
3688 (chdir "doc")
3689 ;; Produce pdf in 'A4' format.
3690 (substitute* "conf.py"
3691 (("latex_paper_size = 'letter'") "")
3692 ;; latex_paper_size is deprecated -> set paper size using
3693 ;; latex_elements
3694 (("latex_elements\\['pointsize'\\] = '11pt'" match)
3695 ;; insert at a point where latex_elements{} is defined:
3696 (string-append match "\nlatex_elements['papersize'] = 'a4paper'")))
3697 (invoke "make" "SPHINXBUILD=sphinx-build" "html" "latex" "texinfo")))
3698 (replace 'install
3699 (lambda* (#:key inputs outputs #:allow-other-keys)
3700 (let* ((data (string-append (assoc-ref outputs "out") "/share"))
3701 (doc (string-append data "/doc/python-matplotlib-" ,version))
3702 (info (string-append data "/info"))
3703 (html (string-append doc "/html")))
3704 (mkdir-p html)
3705 (mkdir-p info)
3706 (copy-recursively "build/html" html)
3707 (symlink (string-append html "/_images")
3708 (string-append info "/matplotlib-figures"))
3709 (with-directory-excursion "build/texinfo"
3710 (substitute* "matplotlib.texi"
3711 (("@image\\{([^,]*)" all file)
3712 (string-append "@image{matplotlib-figures/" file)))
3713 (symlink (string-append html "/_images")
3714 "./matplotlib-figures")
3715 (system* "makeinfo" "--no-split"
3716 "-o" "matplotlib.info" "matplotlib.texi"))
3717 (copy-file "build/texinfo/matplotlib.info"
3718 (string-append info "/matplotlib.info"))
3719 (copy-file "build/latex/Matplotlib.pdf"
3720 (string-append doc "/Matplotlib.pdf")))
3721 #t)))))
3722 (home-page (package-home-page python-matplotlib))
3723 (synopsis "Documentation for the python-matplotlib package")
3724 (description (package-description python-matplotlib))
3725 (license (package-license python-matplotlib))))
3726
3727 (define-public python2-matplotlib-documentation
3728 (package-with-python2 python-matplotlib-documentation))
3729
3730 (define-public python2-pysnptools
3731 (package
3732 (name "python2-pysnptools")
3733 (version "0.3.9")
3734 (source
3735 (origin
3736 (method url-fetch)
3737 (uri (pypi-uri "pysnptools" version ".zip"))
3738 (sha256
3739 (base32
3740 "1wybggjzz8zw7aav4pjsg2h22xp17a1lghrprza1pxwlm7wf96y2"))))
3741 (build-system python-build-system)
3742 (arguments
3743 `(#:python ,python-2)) ; only Python 2.7 is supported
3744 (propagated-inputs
3745 `(("python2-numpy" ,python2-numpy)
3746 ("python2-scipy" ,python2-scipy)
3747 ("python2-pandas" ,python2-pandas)))
3748 (native-inputs
3749 `(("python2-cython" ,python2-cython)))
3750 (native-inputs
3751 `(("unzip" ,unzip)))
3752 (home-page "http://research.microsoft.com/en-us/um/redmond/projects/mscompbio/")
3753 (synopsis "Library for reading and manipulating genetic data")
3754 (description
3755 "PySnpTools is a library for reading and manipulating genetic data. It
3756 can, for example, efficiently read whole PLINK *.bed/bim/fam files or parts of
3757 those files. It can also efficiently manipulate ranges of integers using set
3758 operators such as union, intersection, and difference.")
3759 (license license:asl2.0)))
3760
3761 (define-public python-rpy2
3762 (package
3763 (name "python-rpy2")
3764 (version "2.9.4")
3765 (source
3766 (origin
3767 (method url-fetch)
3768 (uri (pypi-uri "rpy2" version))
3769 (sha256
3770 (base32
3771 "0bl1d2qhavmlrvalir9hmkjh74w21vzkvc2sg3cbb162s10zfmxy"))))
3772 (build-system python-build-system)
3773 (arguments
3774 '(#:modules ((ice-9 ftw)
3775 (srfi srfi-1)
3776 (srfi srfi-26)
3777 (guix build utils)
3778 (guix build python-build-system))
3779 #:phases
3780 (modify-phases %standard-phases
3781 (replace 'check
3782 (lambda* (#:key outputs inputs #:allow-other-keys)
3783 (let ((cwd (getcwd)))
3784 (setenv "PYTHONPATH"
3785 (string-append cwd "/build/"
3786 (find (cut string-prefix? "lib" <>)
3787 (scandir (string-append cwd "/build")))
3788 ":"
3789 (getenv "PYTHONPATH"))))
3790 (invoke "python" "-m" "rpy2.tests" "-v"))))))
3791 (propagated-inputs
3792 `(("python-six" ,python-six)
3793 ("python-jinja2" ,python-jinja2)
3794 ("python-pytz" ,python-pytz)))
3795 (inputs
3796 `(("readline" ,readline)
3797 ("icu4c" ,icu4c)
3798 ("pcre" ,pcre)
3799 ("r-minimal" ,r-minimal)
3800 ("r-survival" ,r-survival)
3801 ("r-ggplot2" ,r-ggplot2)
3802 ("r-rsqlite" ,r-rsqlite)
3803 ("r-dplyr" ,r-dplyr)
3804 ("r-dbplyr" ,r-dbplyr)
3805 ("python-numpy" ,python-numpy)))
3806 (native-inputs
3807 `(("zlib" ,zlib)))
3808 (home-page "https://rpy2.bitbucket.io/")
3809 (synopsis "Python interface to the R language")
3810 (description "rpy2 is a redesign and rewrite of rpy. It is providing a
3811 low-level interface to R from Python, a proposed high-level interface,
3812 including wrappers to graphical libraries, as well as R-like structures and
3813 functions.")
3814 ;; Any of these licenses can be picked for the R interface. The whole
3815 ;; project is released under GPLv2+ according to the license declaration
3816 ;; in "setup.py".
3817 (license (list license:mpl2.0 license:gpl2+ license:lgpl2.1+))))
3818
3819 (define-public python-scipy
3820 (package
3821 (name "python-scipy")
3822 (version "1.0.1")
3823 (source
3824 (origin
3825 (method url-fetch)
3826 (uri (pypi-uri "scipy" version))
3827 (sha256
3828 (base32
3829 "1fj0r7bg0cfk5clvl57ga06y9bfh05iwlv1dqqs1r6pd89wccfc7"))))
3830 (build-system python-build-system)
3831 (propagated-inputs
3832 `(("python-numpy" ,python-numpy)
3833 ("python-matplotlib" ,python-matplotlib)
3834 ("python-pyparsing" ,python-pyparsing)))
3835 (inputs
3836 `(("lapack" ,lapack)
3837 ("openblas" ,openblas)))
3838 (native-inputs
3839 `(("python-cython" ,python-cython)
3840 ("python-pytest" ,python-pytest)
3841 ("python-sphinx" ,python-sphinx)
3842 ("python-numpydoc" ,python-numpydoc)
3843 ("gfortran" ,gfortran)
3844 ("perl" ,perl)
3845 ("which" ,which)))
3846 (outputs '("out" "doc"))
3847 (arguments
3848 `(#:phases
3849 (modify-phases %standard-phases
3850 (add-after 'unpack 'disable-broken-tests
3851 (lambda _
3852 (substitute* "scipy/sparse/linalg/dsolve/tests/test_linsolve.py"
3853 (("^( +)def test_threads_parallel\\(self\\):" m indent)
3854 (string-append indent
3855 "@pytest.mark.skip(reason=\"Disabled by Guix\")\n"
3856 m)))
3857 (substitute* "scipy/sparse/linalg/eigen/arpack/tests/test_arpack.py"
3858 (("^def test_parallel_threads\\(\\):" m)
3859 (string-append "@pytest.mark.skip(reason=\"Disabled by Guix\")\n"
3860 m)))
3861 #t))
3862 (add-before 'build 'configure-openblas
3863 (lambda* (#:key inputs #:allow-other-keys)
3864 (call-with-output-file "site.cfg"
3865 (lambda (port)
3866 (format port
3867 "[blas]
3868 libraries = openblas
3869 library_dirs = ~a/lib
3870 include_dirs = ~a/include
3871
3872 # backslash-n to make emacs happy
3873 \n[atlas]
3874 library_dirs = ~a/lib
3875 atlas_libs = openblas
3876 "
3877 (assoc-ref inputs "openblas")
3878 (assoc-ref inputs "openblas")
3879 (assoc-ref inputs "openblas"))))
3880 #t))
3881 (add-after 'install 'install-doc
3882 (lambda* (#:key inputs outputs #:allow-other-keys)
3883 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
3884 (doc (string-append data "/doc/" ,name "-" ,version))
3885 (html (string-append doc "/html"))
3886 (pyver ,(string-append "PYVER=" (version-major+minor
3887 (package-version python))))
3888 ;; By default it tries to run sphinx-build through the Python
3889 ;; interpreter which won't work with our shell wrapper.
3890 (sphinxbuild "SPHINXBUILD=LANG=C sphinx-build"))
3891 ;; Make installed package available for building the
3892 ;; documentation
3893 (add-installed-pythonpath inputs outputs)
3894 (with-directory-excursion "doc"
3895 ;; Fix generation of images for mathematical expressions.
3896 (substitute* (find-files "source" "conf\\.py")
3897 (("pngmath_use_preview = True")
3898 "pngmath_use_preview = False"))
3899 (mkdir-p html)
3900 (invoke "make" "html" pyver sphinxbuild)
3901 (with-directory-excursion "build/html"
3902 (for-each (lambda (file)
3903 (let* ((dir (dirname file))
3904 (tgt-dir (string-append html "/" dir)))
3905 (install-file file html)))
3906 (find-files "." ".*")))))
3907 #t))
3908 ;; Tests can only be run after the library has been installed and not
3909 ;; within the source directory.
3910 (delete 'check)
3911 (add-after 'install 'check
3912 (lambda* (#:key inputs outputs #:allow-other-keys)
3913 (add-installed-pythonpath inputs outputs)
3914 (with-directory-excursion "/tmp"
3915 (invoke "python" "-c"
3916 "import scipy; scipy.test(verbose=2)")))))))
3917 (home-page "https://www.scipy.org/")
3918 (synopsis "The Scipy library provides efficient numerical routines")
3919 (description "The SciPy library is one of the core packages that make up
3920 the SciPy stack. It provides many user-friendly and efficient numerical
3921 routines such as routines for numerical integration and optimization.")
3922 (properties `((python2-variant . ,(delay python2-scipy))))
3923 (license license:bsd-3)))
3924
3925 (define-public python2-scipy
3926 (package-with-python2
3927 (strip-python2-variant python-scipy)))
3928
3929 (define-public python-socksipy-branch
3930 (package
3931 (name "python-socksipy-branch")
3932 (version "1.01")
3933 (source
3934 (origin
3935 (method url-fetch)
3936 (uri (pypi-uri "SocksiPy-branch" version))
3937 (sha256
3938 (base32
3939 "01l41v4g7fy9fzvinmjxy6zcbhgqaif8dhdqm4w90fwcw9h51a8p"))))
3940 (build-system python-build-system)
3941 (arguments
3942 `(#:tests? #f)) ; There are no tests
3943 (home-page "https://code.google.com/archive/p/socksipy-branch/")
3944 (synopsis "Python SOCKS module")
3945 (description
3946 "SocksiPy - A Python SOCKS client module. It provides a
3947 socket-like interface that supports connections to any TCP
3948 service through the use of a SOCKS4, SOCKS5 or HTTP proxy.
3949 The original version was developed by Dan Haim, this is a
3950 branch created by Mario Vilas to address some open issues,
3951 as the original project seems to have been abandoned circa 2007.")
3952 (license license:bsd-3)))
3953
3954 (define-public python2-socksipy-branch
3955 (package-with-python2 python-socksipy-branch))
3956
3957 (define-public python-pycodestyle
3958 (package
3959 (name "python-pycodestyle")
3960 (version "2.3.1")
3961 (source
3962 (origin
3963 (method url-fetch)
3964 (uri (pypi-uri "pycodestyle" version))
3965 (sha256
3966 (base32
3967 "0rk78b66p57ala26mdldl9lafr48blv5s659sah9q50qnfjmc8k8"))))
3968 (build-system python-build-system)
3969 (home-page "https://pycodestyle.readthedocs.io/")
3970 (synopsis "Python style guide checker")
3971 (description "@code{pycodestyle} (formerly pep8) is a tool to check
3972 Python code against some of the style conventions in
3973 @url{http://www.python.org/dev/peps/pep-0008/,PEP 8}.")
3974 (license license:expat)))
3975
3976 (define-public python2-pycodestyle
3977 (package-with-python2 python-pycodestyle))
3978
3979 (define-public python-multidict
3980 (package
3981 (name "python-multidict")
3982 (version "4.2.0")
3983 (source
3984 (origin
3985 (method url-fetch)
3986 (uri (pypi-uri "multidict" version))
3987 (sha256
3988 (base32
3989 "1vf5bq8hn5a9rvhr5v4fwbmarfsp35hhr8gs74kqfijy34j2f194"))))
3990 (build-system python-build-system)
3991 (native-inputs
3992 `(("python-pytest" ,python-pytest)
3993 ("python-pytest-runner" ,python-pytest-runner)))
3994 (home-page "https://github.com/aio-libs/multidict/")
3995 (synopsis "Multidict implementation")
3996 (description "Multidict is dict-like collection of key-value pairs
3997 where key might be occurred more than once in the container.")
3998 (license license:asl2.0)))
3999
4000 (define-public python-orderedmultidict
4001 (package
4002 (name "python-orderedmultidict")
4003 (version "0.7.11")
4004 (source
4005 (origin
4006 (method url-fetch)
4007 (uri (pypi-uri "orderedmultidict" version))
4008 (sha256
4009 (base32
4010 "0dls862ibm7qbq4fnvwx0xn1v9hwyzywbff8xjjdr42dd75208yw"))))
4011 (build-system python-build-system)
4012 (arguments
4013 `(#:phases
4014 (modify-phases %standard-phases
4015 (add-after 'unpack 'fix-tests
4016 (lambda _
4017 ;; The package uses nosetest for running the tests.
4018 ;; Adding this initfile allows to run the test suite
4019 ;; without requiring nosetest.
4020 (zero? (system* "touch" "tests/__init__.py")))))))
4021 (propagated-inputs
4022 `(("python-six" ,python-six)))
4023 (native-inputs
4024 `(("python-pycodestyle" ,python-pycodestyle)))
4025 (home-page "https://github.com/gruns/orderedmultidict")
4026 (synopsis "Python Ordered Multivalue Dictionary - omdict")
4027 (description "This package contains a library for ordered multivalue
4028 dictionaries. A multivalue dictionary is a dictionary that can store
4029 multiple values for the same key. An ordered multivalue dictionary is a
4030 multivalue dictionary that retains the order of insertions and deletions.")
4031 (license license:unlicense)))
4032
4033 (define-public python2-orderedmultidict
4034 (package-with-python2 python-orderedmultidict))
4035
4036 (define-public python-autopep8
4037 (package
4038 (name "python-autopep8")
4039 (version "1.3.5")
4040 (source
4041 (origin
4042 (method url-fetch)
4043 (uri (pypi-uri "autopep8" version))
4044 (sha256
4045 (base32
4046 "192bvhzi4d0claqxgzymvv7k3qnj627742bc8sgxpzjj42pd9112"))))
4047 (build-system python-build-system)
4048 (propagated-inputs
4049 `(("python-pycodestyle" ,python-pycodestyle)))
4050 (home-page "https://github.com/hhatto/autopep8")
4051 (synopsis "Format Python code according to the PEP 8 style guide")
4052 (description
4053 "@code{autopep8} automatically formats Python code to conform to
4054 the PEP 8 style guide. It uses the pycodestyle utility to determine
4055 what parts of the code needs to be formatted. @code{autopep8} is
4056 capable of fixing most of the formatting issues that can be reported
4057 by pycodestyle.")
4058 (license (license:non-copyleft
4059 "https://github.com/hhatto/autopep8/blob/master/LICENSE"))))
4060
4061 (define-public python2-autopep8
4062 (package-with-python2 python-autopep8))
4063
4064 (define-public python-distutils-extra
4065 (package
4066 (name "python-distutils-extra")
4067 (version "2.38")
4068 (source
4069 (origin
4070 (method url-fetch)
4071 (uri (string-append "https://launchpad.net/python-distutils-extra/trunk/"
4072 version "/+download/python-distutils-extra-"
4073 version ".tar.gz"))
4074 (sha256
4075 (base32
4076 "0lx15kcbby9zisx33p2h5hgakgwh2bvh0ibag8z0px4j6ifhs41x"))))
4077 (build-system python-build-system)
4078 (home-page "https://launchpad.net/python-distutils-extra/")
4079 (synopsis "Enhancements to Python's distutils")
4080 (description
4081 "The python-distutils-extra module enables you to easily integrate
4082 gettext support, themed icons, and scrollkeeper-based documentation into
4083 Python's distutils.")
4084 (license license:gpl2)))
4085
4086 (define-public python2-distutils-extra
4087 (package-with-python2 python-distutils-extra))
4088
4089 (define-public python2-elib.intl
4090 (package
4091 (name "python2-elib.intl")
4092 (version "0.0.3")
4093 (source
4094 (origin
4095 ;; This project doesn't tag releases or publish tarballs, so we take
4096 ;; source from a (semi-arbitrary, i.e. latest as of now) git commit.
4097 (method git-fetch)
4098 (uri (git-reference
4099 (url "https://github.com/dieterv/elib.intl.git")
4100 (commit "d09997cfef")))
4101 (file-name (string-append name "-" version "-checkout"))
4102 (sha256
4103 (base32
4104 "0y7vzff9xgbnaay7m0va1arl6g68ncwrvbgwl7jqlclsahzzb09d"))))
4105 (build-system python-build-system)
4106 (arguments
4107 ;; incompatible with Python 3 (exception syntax)
4108 `(#:python ,python-2
4109 #:tests? #f))
4110 (home-page "https://github.com/dieterv/elib.intl")
4111 (synopsis "Enhanced internationalization for Python")
4112 (description
4113 "The elib.intl module provides enhanced internationalization (I18N)
4114 services for your Python modules and applications.")
4115 (license license:lgpl3+)))
4116
4117 (define-public python-olefile
4118 (package
4119 (name "python-olefile")
4120 (version "0.44")
4121 (source
4122 (origin
4123 (method url-fetch)
4124 (uri (string-append "https://github.com/decalage2/olefile/archive/v"
4125 version ".tar.gz"))
4126 (file-name (string-append name "-" version ".tar.gz"))
4127 (sha256
4128 (base32
4129 "1wmxbrhyqjry2000zx0zdhqdqxhgi06nz7sbzjlh222q2zjv1gpj"))))
4130 (build-system python-build-system)
4131 (home-page
4132 "https://www.decalage.info/python/olefileio")
4133 (synopsis "Read and write Microsoft OLE2 files.")
4134 (description
4135 "@code{olefile} can parse, read and write Microsoft OLE2 files (Structured
4136 Storage or Compound Document, Microsoft Office). It is an improved version of
4137 the OleFileIO module from PIL, the Python Image Library.")
4138 (license license:bsd-3)))
4139
4140 (define-public python2-olefile
4141 (package-with-python2 python-olefile))
4142
4143 (define-public python-pillow
4144 (package
4145 (name "python-pillow")
4146 (version "4.3.0")
4147 (source
4148 (origin
4149 (method url-fetch)
4150 (uri (pypi-uri "Pillow" version))
4151 (sha256
4152 (base32
4153 "09xmn7rl6840sli2iz1k3fgxfgmri2nqz6vkinmb9mgg8ifp2z59"))
4154 (patch-flags '("-p1" "--binary"))
4155 (patches (search-patches "python-pillow-fix-failing-tests.patch"))))
4156 (build-system python-build-system)
4157 (native-inputs
4158 `(("python-nose" ,python-nose)))
4159 (inputs
4160 `(("freetype" ,freetype)
4161 ("lcms" ,lcms)
4162 ("zlib" ,zlib)
4163 ("libjpeg" ,libjpeg)
4164 ("openjpeg" ,openjpeg)
4165 ("libtiff" ,libtiff)
4166 ("libwebp" ,libwebp)))
4167 (propagated-inputs
4168 `(("python-olefile" ,python-olefile)))
4169 (arguments
4170 `(#:phases (modify-phases %standard-phases
4171 (add-after
4172 'install 'check-installed
4173 (lambda* (#:key outputs inputs #:allow-other-keys)
4174 (begin
4175 (setenv "HOME" (getcwd))
4176 ;; Make installed package available for running the
4177 ;; tests
4178 (add-installed-pythonpath inputs outputs)
4179 (and (zero? (system* "python" "selftest.py"
4180 "--installed"))
4181 (zero? (system* "python" "test-installed.py"))))))
4182 (delete 'check))))
4183 (home-page "https://pypi.python.org/pypi/Pillow")
4184 (synopsis "Fork of the Python Imaging Library")
4185 (description
4186 "The Python Imaging Library adds image processing capabilities to your
4187 Python interpreter. This library provides extensive file format support, an
4188 efficient internal representation, and fairly powerful image processing
4189 capabilities. The core image library is designed for fast access to data
4190 stored in a few basic pixel formats. It should provide a solid foundation for
4191 a general image processing tool.")
4192 (license (license:x11-style
4193 "http://www.pythonware.com/products/pil/license.htm"
4194 "The PIL Software License"))))
4195
4196 (define-public python2-pillow
4197 (package-with-python2 python-pillow))
4198
4199 (define-public python-pycparser
4200 (package
4201 (name "python-pycparser")
4202 (version "2.17")
4203 (source
4204 (origin
4205 (method url-fetch)
4206 (uri (pypi-uri "pycparser" version))
4207 (sha256
4208 (base32
4209 "1dkkjri0miidqb1zcqhqljfa34fcy9k5akasgwsv6k622zlk3b0a"))))
4210 (outputs '("out" "doc"))
4211 (build-system python-build-system)
4212 (native-inputs
4213 `(("pkg-config" ,pkg-config)))
4214 (arguments
4215 `(#:phases
4216 (modify-phases %standard-phases
4217 (replace 'check
4218 (lambda _
4219 (with-directory-excursion "tests"
4220 (zero? (system* "python" "all_tests.py")))))
4221 (add-after 'install 'install-doc
4222 (lambda* (#:key outputs #:allow-other-keys)
4223 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4224 (doc (string-append data "/doc/" ,name "-" ,version))
4225 (examples (string-append doc "/examples")))
4226 (mkdir-p examples)
4227 (for-each (lambda (file)
4228 (copy-file (string-append "." file)
4229 (string-append doc file)))
4230 '("/README.rst" "/CHANGES" "/LICENSE"))
4231 (copy-recursively "examples" examples)))))))
4232 (home-page "https://github.com/eliben/pycparser")
4233 (synopsis "C parser in Python")
4234 (description
4235 "Pycparser is a complete parser of the C language, written in pure Python
4236 using the PLY parsing library. It parses C code into an AST and can serve as
4237 a front-end for C compilers or analysis tools.")
4238 (license license:bsd-3)))
4239
4240 (define-public python2-pycparser
4241 (package-with-python2 python-pycparser))
4242
4243 (define-public python-xcffib
4244 (package
4245 (name "python-xcffib")
4246 (version "0.5.1")
4247 (source
4248 (origin
4249 (method url-fetch)
4250 (uri (pypi-uri "xcffib" version))
4251 (sha256
4252 (base32
4253 "09gbnmr5vn58mm8xi3fmd7fz6743cks6c46dphnxzwax6zsxmy60"))))
4254 (build-system python-build-system)
4255 (inputs
4256 `(("libxcb" ,libxcb)))
4257 (propagated-inputs
4258 `(("python-cffi" ,python-cffi) ; used at run time
4259 ("python-six" ,python-six)))
4260 (arguments
4261 `(;; FIXME: Tests need more work. See ".travis.yml" in the repository.
4262 #:tests? #f
4263 #:phases
4264 (modify-phases %standard-phases
4265 (add-after 'unpack 'fix-libxcb-path
4266 (lambda* (#:key inputs #:allow-other-keys)
4267 (let ((libxcb (assoc-ref inputs "libxcb")))
4268 (substitute* '("xcffib/__init__.py")
4269 (("^soname = \"") (string-append "soname = \"" libxcb "/lib/")))
4270 #t)))
4271 (add-after 'install 'install-doc
4272 (lambda* (#:key outputs #:allow-other-keys)
4273 (let ((doc (string-append (assoc-ref outputs "out") "/share"
4274 "/doc/" ,name "-" ,version)))
4275 (mkdir-p doc)
4276 (copy-file "README.md"
4277 (string-append doc "/README.md"))
4278 #t))))))
4279 (home-page "https://github.com/tych0/xcffib")
4280 (synopsis "XCB Python bindings")
4281 (description
4282 "Xcffib is a replacement for xpyb, an XCB Python bindings. It adds
4283 support for Python 3 and PyPy. It is based on cffi.")
4284 (license license:expat)))
4285
4286 (define-public python2-xcffib
4287 (package-with-python2 python-xcffib))
4288
4289 (define-public python-cairocffi
4290 (package
4291 (name "python-cairocffi")
4292 (version "0.8.0")
4293 (source
4294 (origin
4295 (method url-fetch)
4296 ;; The archive on pypi is missing the 'utils' directory!
4297 (uri (string-append "https://github.com/Kozea/cairocffi/archive/v"
4298 version ".tar.gz"))
4299 (file-name (string-append name "-" version ".tar.gz"))
4300 (sha256
4301 (base32
4302 "1rk2dvy3fxrga6bvvxc2fi5lbaynm5h4a0w0aaxyn3bc77rszjg9"))
4303 (patches (search-patches "python-cairocffi-dlopen-path.patch"))))
4304 (build-system python-build-system)
4305 (outputs '("out" "doc"))
4306 (inputs
4307 `(("glib" ,glib)
4308 ("gtk+" ,gtk+)
4309 ("gdk-pixbuf" ,gdk-pixbuf)
4310 ("cairo" ,cairo)
4311 ("pango" ,pango)))
4312 (native-inputs
4313 `(("pkg-config" ,pkg-config)
4314 ("python-pytest" ,python-pytest)
4315 ("python-sphinx" ,python-sphinx)
4316 ("python-docutils" ,python-docutils)))
4317 (propagated-inputs
4318 `(("python-xcffib" ,python-xcffib))) ; used at run time
4319 (arguments
4320 `(;; FIXME: Tests cannot find 'libcairo.so.2'.
4321 #:tests? #t
4322 #:phases
4323 (modify-phases %standard-phases
4324 (add-after 'unpack 'patch-paths
4325 (lambda* (#:key inputs outputs #:allow-other-keys)
4326 (substitute* (find-files "." "\\.py$")
4327 (("dlopen\\(ffi, 'cairo'")
4328 (string-append "dlopen(ffi, '" (assoc-ref inputs "cairo")
4329 "/lib/libcairo.so.2'"))
4330 (("dlopen\\(ffi, 'gdk-3'")
4331 (string-append "dlopen(ffi, '" (assoc-ref inputs "gtk+")
4332 "/lib/libgtk-3.so.0'"))
4333 (("dlopen\\(ffi, 'gdk_pixbuf-2.0'")
4334 (string-append "dlopen(ffi, '" (assoc-ref inputs "gdk-pixbuf")
4335 "/lib/libgdk_pixbuf-2.0.so.0'"))
4336 (("dlopen\\(ffi, 'glib-2.0'")
4337 (string-append "dlopen(ffi, '" (assoc-ref inputs "glib")
4338 "/lib/libglib-2.0.so.0'"))
4339 (("dlopen\\(ffi, 'gobject-2.0'")
4340 (string-append "dlopen(ffi, '" (assoc-ref inputs "glib")
4341 "/lib/libgobject-2.0.so.0'"))
4342 (("dlopen\\(ffi, 'pangocairo-1.0'")
4343 (string-append "dlopen(ffi, '" (assoc-ref inputs "pango")
4344 "/lib/libpangocairo-1.0.so.0'"))
4345 (("dlopen\\(ffi, 'pango-1.0'")
4346 (string-append "dlopen(ffi, '" (assoc-ref inputs "pango")
4347 "/lib/libpango-1.0.so.0'")))
4348 #t))
4349 (add-after 'install 'install-doc
4350 (lambda* (#:key inputs outputs #:allow-other-keys)
4351 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4352 (doc (string-append data "/doc/" ,name "-" ,version))
4353 (html (string-append doc "/html")))
4354 (setenv "LD_LIBRARY_PATH"
4355 (string-append (assoc-ref inputs "cairo") "/lib" ":"
4356 (assoc-ref inputs "gdk-pixbuf") "/lib"))
4357 (setenv "LANG" "en_US.UTF-8")
4358 (mkdir-p html)
4359 (for-each (lambda (file)
4360 (copy-file (string-append "." file)
4361 (string-append doc file)))
4362 '("/README.rst" "/CHANGES" "/LICENSE"))
4363 (system* "python" "setup.py" "build_sphinx")
4364 (copy-recursively "docs/_build/html" html)
4365 #t))))))
4366 (home-page "https://github.com/Kozea/cairocffi")
4367 (synopsis "Python bindings and object-oriented API for Cairo")
4368 (description
4369 "Cairocffi is a CFFI-based drop-in replacement for Pycairo, a set of
4370 Python bindings and object-oriented API for cairo. Cairo is a 2D vector
4371 graphics library with support for multiple backends including image buffers,
4372 PNG, PostScript, PDF, and SVG file output.")
4373 (license license:bsd-3)))
4374
4375 (define-public python2-cairocffi
4376 (package-with-python2 python-cairocffi))
4377
4378 (define-public python-decorator
4379 (package
4380 (name "python-decorator")
4381 (version "4.3.0")
4382 (source
4383 (origin
4384 (method url-fetch)
4385 (uri (pypi-uri "decorator" version))
4386 (sha256
4387 (base32 "0308djallnh00v112y5b7nadl657ysmkp6vc8xn51d6yzc9zm7n3"))))
4388 (build-system python-build-system)
4389 (home-page "https://pypi.python.org/pypi/decorator/")
4390 (synopsis "Python module to simplify usage of decorators")
4391 (description
4392 "The aim of the decorator module is to simplify the usage of decorators
4393 for the average programmer, and to popularize decorators usage giving examples
4394 of useful decorators, such as memoize, tracing, redirecting_stdout, locked,
4395 etc. The core of this module is a decorator factory.")
4396 (license license:expat)))
4397
4398 (define-public python2-decorator
4399 (package-with-python2 python-decorator))
4400
4401 (define-public python-drmaa
4402 (package
4403 (name "python-drmaa")
4404 (version "0.7.7")
4405 (source
4406 (origin
4407 (method url-fetch)
4408 (uri (pypi-uri "drmaa" version))
4409 (sha256
4410 (base32 "0xzqriqyvk5b8hszbavsyxd29wm3sxirm8zvvdm73rs2iq7w4hkx"))))
4411 (build-system python-build-system)
4412 ;; The test suite requires libdrmaa which is provided by the cluster
4413 ;; environment. At runtime the environment variable DRMAA_LIBRARY_PATH
4414 ;; should be set to the path of the libdrmaa library.
4415 (arguments '(#:tests? #f))
4416 (native-inputs
4417 `(("python-nose" ,python-nose)))
4418 (home-page "https://pypi.python.org/pypi/drmaa")
4419 (synopsis "Python bindings for the DRMAA library")
4420 (description
4421 "A Python package for Distributed Resource Management (DRM) job
4422 submission and control. This package is an implementation of the DRMAA 1.0
4423 Python language binding specification.")
4424 (license license:bsd-3)))
4425
4426 (define-public python2-drmaa
4427 (package-with-python2 python-drmaa))
4428
4429 (define-public python-grako
4430 (package
4431 (name "python-grako")
4432 (version "3.99.9")
4433 (source
4434 (origin
4435 (method url-fetch)
4436 (uri
4437 (pypi-uri "grako" version ".zip"))
4438 (sha256
4439 (base32
4440 "0r63i68wcnv63rfjkasq1ah81frz61a6mzbcnaxhrkdpx84p7hzw"))))
4441 (build-system python-build-system)
4442 (arguments '(#:tests? #f)) ; Test file 'grako.ebnf' is missing from archive.
4443 (native-inputs
4444 `(("unzip" ,unzip)
4445 ("python-pytest" ,python-pytest)
4446 ("python-pytest-runner" ,python-pytest-runner)))
4447 (home-page "https://bitbucket.org/neogeny/grako")
4448 (synopsis "EBNF parser generator")
4449 (description
4450 "Grako takes a grammar in a variation of EBNF as input, and outputs a
4451 memoizing PEG/Packrat parser in Python.")
4452 (license license:bsd-3)))
4453
4454 (define-public python2-grako
4455 (package-with-python2 python-grako))
4456
4457 (define-public python-gridmap
4458 (package
4459 (name "python-gridmap")
4460 (version "0.13.0")
4461 (source
4462 (origin
4463 (method url-fetch)
4464 (uri (string-append
4465 "https://github.com/pygridtools/gridmap/archive/v"
4466 version ".tar.gz"))
4467 (file-name (string-append name "-" version ".tar.gz"))
4468 (sha256
4469 (base32 "1gzjg2k6f14i1msm2b0ax8d9ds1hvk6qd5nlaivg8m4cxqp4cp1x"))))
4470 (build-system python-build-system)
4471 (arguments
4472 '(#:tests? #f)) ; FIXME: Requires python-cherrypy.
4473 (propagated-inputs
4474 `(("python-psutil" ,python-psutil)
4475 ("python-drmaa" ,python-drmaa)
4476 ("python-pyzmq" ,python-pyzmq)))
4477 (home-page "https://github.com/pygridtools/gridmap")
4478 (synopsis "Create jobs on a cluster directly from Python")
4479 (description
4480 "Gridmap is a Python package to allow you to easily create jobs on the
4481 cluster directly from Python. You can directly map Python functions onto the
4482 cluster without needing to write any wrapper code yourself.")
4483 (license license:gpl3+)))
4484
4485 (define-public python2-gridmap
4486 (package-with-python2 python-gridmap))
4487
4488 (define-public python-honcho
4489 (package
4490 (name "python-honcho")
4491 (version "1.0.1")
4492 (source
4493 (origin
4494 (method url-fetch)
4495 (uri (string-append
4496 "https://github.com/nickstenning/honcho/archive/v"
4497 version ".tar.gz"))
4498 (file-name (string-append name "-" version ".tar.gz"))
4499 (sha256
4500 (base32 "0zizn61n5z5hq421hkypk9pw8s6fpxw30f4hsg7k4ivwzy3gjw9j"))))
4501 (build-system python-build-system)
4502 (native-inputs
4503 `(("python-pytest" ,python-pytest)
4504 ("python-mock" ,python-mock)
4505 ("python-tox" ,python-tox)
4506 ("which" ,which))) ;for tests
4507 (propagated-inputs
4508 `(("python-jinja2" ,python-jinja2)))
4509 (arguments
4510 `(#:phases
4511 (modify-phases %standard-phases
4512 (delete 'check)
4513 (add-after 'install 'check
4514 (lambda* (#:key outputs inputs #:allow-other-keys)
4515 ;; fix honcho path in testsuite
4516 (substitute* "tests/conftest.py"
4517 (("'honcho'") (string-append "'" (assoc-ref outputs "out")
4518 "/bin/honcho" "'")))
4519 ;; It's easier to run tests after install.
4520 ;; Make installed package available for running the tests
4521 (add-installed-pythonpath inputs outputs)
4522 (zero? (system* "py.test" "-v")))))))
4523 (home-page "https://github.com/nickstenning/honcho")
4524 (synopsis "Manage Procfile-based applications")
4525 (description
4526 "A Procfile is a file which describes how to run an application
4527 consisting of serveral processes. honcho starts all listed processes.
4528 The output of all running processes is collected by honcho and
4529 displayed.")
4530 (license license:expat)))
4531
4532 (define-public python2-honcho
4533 (package-with-python2 python-honcho))
4534
4535 (define-public python-pexpect
4536 (package
4537 (name "python-pexpect")
4538 (version "4.2.1")
4539 (source
4540 (origin
4541 (method url-fetch)
4542 (uri (pypi-uri "pexpect" version))
4543 (sha256
4544 (base32 "14ls7k99pwvl21zqv65kzrhccv50j89m5ij1hf0slmsvlxjj84rx"))))
4545 (build-system python-build-system)
4546 (arguments
4547 `(#:phases
4548 (modify-phases %standard-phases
4549 (add-before 'check 'prepare-tests
4550 (lambda _
4551 (substitute* (find-files "tests")
4552 (("/bin/ls") (which "ls"))
4553 (("/bin/echo") (which "echo"))
4554 (("/bin/which") (which "which"))
4555 ;; Many tests try to use the /bin directory which
4556 ;; is not present in the build environment.
4557 ;; Use one that's non-empty and unlikely to change.
4558 (("/bin'") "/dev'"))
4559 ;; XXX: Socket connection test gets "Connection reset by peer".
4560 ;; Why does it not work? Delete for now.
4561 (delete-file "tests/test_socket.py")
4562 #t))
4563 (replace 'check (lambda _ (invoke "nosetests" "-v"))))))
4564 (native-inputs
4565 `(("python-nose" ,python-nose)
4566 ("python-pytest" ,python-pytest)
4567 ("man-db" ,man-db)
4568 ("which" ,which)
4569 ("bash-full" ,bash))) ;full Bash for 'test_replwrap.py'
4570 (propagated-inputs
4571 `(("python-ptyprocess" ,python-ptyprocess)))
4572 (home-page "http://pexpect.readthedocs.org/")
4573 (synopsis "Controlling interactive console applications")
4574 (description
4575 "Pexpect is a pure Python module for spawning child applications;
4576 controlling them; and responding to expected patterns in their output.
4577 Pexpect works like Don Libes’ Expect. Pexpect allows your script to spawn a
4578 child application and control it as if a human were typing commands.")
4579 (license license:isc)))
4580
4581 (define-public python2-pexpect
4582 (package-with-python2 python-pexpect))
4583
4584 (define-public python-setuptools-scm
4585 (package
4586 (name "python-setuptools-scm")
4587 (version "1.15.6")
4588 (source (origin
4589 (method url-fetch)
4590 (uri (pypi-uri "setuptools_scm" version))
4591 (sha256
4592 (base32
4593 "0pzvfmx8s20yrgkgwfbxaspz2x1g38qv61jpm0ns91lrb22ldas9"))))
4594 (build-system python-build-system)
4595 (home-page "https://github.com/pypa/setuptools_scm/")
4596 (synopsis "Manage Python package versions in SCM metadata")
4597 (description
4598 "Setuptools_scm handles managing your Python package versions in
4599 @dfn{software configuration management} (SCM) metadata instead of declaring
4600 them as the version argument or in a SCM managed file.")
4601 (license license:expat)))
4602
4603 (define-public python2-setuptools-scm
4604 (package-with-python2 python-setuptools-scm))
4605
4606 (define-public python-pathpy
4607 (package
4608 (name "python-pathpy")
4609 (version "11.0.1")
4610 (source
4611 (origin
4612 (method url-fetch)
4613 (uri (pypi-uri "path.py" version))
4614 (sha256
4615 (base32 "07x15v8c7ry9bvycw294c9yq6ky9v2b0dalvgi6rn38ilh69vsz7"))))
4616 ;; (outputs '("out" "doc"))
4617 (build-system python-build-system)
4618 (propagated-inputs
4619 `(("python-appdirs" ,python-appdirs)))
4620 (native-inputs
4621 `(("python-setuptools-scm" ,python-setuptools-scm)
4622 ("python-sphinx" ,python-sphinx)
4623 ("python-rst.linker" ,python-rst.linker)
4624 ("python-pytest" ,python-pytest)
4625 ("python-pytest-runner" ,python-pytest-runner)))
4626 (arguments
4627 ;; FIXME: Documentation and tests require "jaraco.packaging".
4628 `(#:tests? #f))
4629 ;; #:phases
4630 ;; (modify-phases %standard-phases
4631 ;; (add-after 'build 'build-doc
4632 ;; (lambda _
4633 ;; (setenv "LANG" "en_US.UTF-8")
4634 ;; (zero? (system* "python" "setup.py" "build_sphinx"))))
4635 ;; (add-after 'install 'install-doc
4636 ;; (lambda* (#:key outputs #:allow-other-keys)
4637 ;; (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4638 ;; (doc (string-append data "/doc/" ,name "-" ,version))
4639 ;; (html (string-append doc "/html")))
4640 ;; (mkdir-p html)
4641 ;; (for-each (lambda (file)
4642 ;; (copy-file file (string-append doc "/" file)))
4643 ;; '("README.rst" "CHANGES.rst"))
4644 ;; (copy-recursively "build/sphinx/html" html)))))))
4645 (home-page "https://github.com/jaraco/path.py")
4646 (synopsis "Python module wrapper for built-in os.path")
4647 (description
4648 "@code{path.py} implements path objects as first-class entities, allowing
4649 common operations on files to be invoked on those path objects directly.")
4650 (license license:expat)))
4651
4652 (define-public python2-pathpy
4653 (package-with-python2 python-pathpy))
4654
4655 (define-public python-simplegeneric
4656 (package
4657 (name "python-simplegeneric")
4658 (version "0.8.1")
4659 (source
4660 (origin
4661 (method url-fetch)
4662 (uri (string-append "https://pypi.python.org/packages/source/s/"
4663 "simplegeneric/simplegeneric-" version ".zip"))
4664 (sha256
4665 (base32 "0wwi1c6md4vkbcsfsf8dklf3vr4mcdj4mpxkanwgb6jb1432x5yw"))))
4666 (build-system python-build-system)
4667 (native-inputs
4668 `(("unzip" ,unzip)))
4669 (home-page "http://cheeseshop.python.org/pypi/simplegeneric")
4670 (synopsis "Python module for simple generic functions")
4671 (description
4672 "The simplegeneric module lets you define simple single-dispatch generic
4673 functions, akin to Python’s built-in generic functions like @code{len()},
4674 @code{iter()} and so on. However, instead of using specially-named methods,
4675 these generic functions use simple lookup tables, akin to those used by
4676 e.g. @code{pickle.dump()} and other generic functions found in the Python
4677 standard library.")
4678 (license license:zpl2.1)))
4679
4680 (define-public python2-simplegeneric
4681 (package-with-python2 python-simplegeneric))
4682
4683 (define-public python-ipython-genutils
4684 ;; TODO: This package is retired, check if can be removed, see description.
4685 (package
4686 (name "python-ipython-genutils")
4687 (version "0.1.0")
4688 (source
4689 (origin
4690 (method url-fetch)
4691 (uri (string-append "https://pypi.python.org/packages/source/i/"
4692 "ipython_genutils/ipython_genutils-"
4693 version ".tar.gz"))
4694 (sha256
4695 (base32 "19l2pp1c64ansr89l3cqh19jdi2ixhssdzx0vz4n6r52a6i281is"))))
4696 (build-system python-build-system)
4697 (arguments `(#:tests? #f)) ; no tests
4698 (home-page "https://ipython.org")
4699 (synopsis "Vestigial utilities from IPython")
4700 (description
4701 "This package provides retired utilities from IPython. No packages
4702 outside IPython/Jupyter should depend on it.
4703
4704 This package shouldn't exist. It contains some common utilities shared by
4705 Jupyter and IPython projects during The Big Split. As soon as possible, those
4706 packages will remove their dependency on this, and this package will go
4707 away.")
4708 (license license:bsd-3)))
4709
4710 (define-public python2-ipython-genutils
4711 (package-with-python2 python-ipython-genutils))
4712
4713 (define-public python-traitlets
4714 (package
4715 (name "python-traitlets")
4716 (version "4.2.0")
4717 (source
4718 (origin
4719 (method url-fetch)
4720 (uri (pypi-uri "traitlets" version))
4721 (sha256
4722 (base32
4723 "1afy08sa5n9gnkvh3da49c16zkyv598vchv0p1hp7zzjy8895hz4"))))
4724 (build-system python-build-system)
4725 (arguments
4726 `(#:phases
4727 (modify-phases %standard-phases
4728 (replace 'check (lambda _ (zero? (system* "nosetests")))))))
4729 (propagated-inputs
4730 `(("python-ipython-genutils" ,python-ipython-genutils)
4731 ("python-decorator" ,python-decorator)))
4732 (native-inputs
4733 `(("python-mock" ,python-mock)
4734 ("python-nose" ,python-nose)))
4735 (home-page "https://ipython.org")
4736 (synopsis "Configuration system for Python applications")
4737 (description
4738 "Traitlets is a framework that lets Python classes have attributes with
4739 type checking, dynamically calculated default values, and ‘on change’
4740 callbacks. The package also includes a mechanism to use traitlets for
4741 configuration, loading values from files or from command line arguments. This
4742 is a distinct layer on top of traitlets, so you can use traitlets in your code
4743 without using the configuration machinery.")
4744 (license license:bsd-3)))
4745
4746 (define-public python2-traitlets
4747 (package-with-python2 python-traitlets))
4748
4749 (define-public python-jupyter-core
4750 (package
4751 (name "python-jupyter-core")
4752 (version "4.4.0")
4753 (source
4754 (origin
4755 (method url-fetch)
4756 (uri (string-append (pypi-uri "jupyter_core" version)))
4757 (sha256
4758 (base32
4759 "1dy083rarba8prn9f9srxq3c7n7vyql02ycrqq306c40lr57aw5s"))))
4760 (build-system python-build-system)
4761 ;; FIXME: not sure how to run the tests
4762 (arguments `(#:tests? #f))
4763 (propagated-inputs
4764 `(("python-traitlets" ,python-traitlets)))
4765 (home-page "http://jupyter.org/")
4766 (synopsis "Jupyter base package")
4767 (description
4768 "Jupyter core is the base package on which Jupyter projects rely.")
4769 (license license:bsd-3)))
4770
4771 (define-public python2-jupyter-core
4772 (package-with-python2 python-jupyter-core))
4773
4774 (define-public python-jupyter-client
4775 (package
4776 (name "python-jupyter-client")
4777 (version "4.4.0")
4778 (source
4779 (origin
4780 (method url-fetch)
4781 (uri (pypi-uri "jupyter_client" version))
4782 (sha256
4783 (base32
4784 "1vjjrpjw7k5sh982pbjnslv7byfbfazjw9g92jvs7dz5qbx556n9"))))
4785 (build-system python-build-system)
4786 ;; Tests fail because of missing native python kernel which I assume is
4787 ;; provided by the ipython package, which we cannot use because it would
4788 ;; cause a dependency cycle.
4789 (arguments `(#:tests? #f))
4790 (propagated-inputs
4791 `(("python-pyzmq" ,python-pyzmq)
4792 ("python-traitlets" ,python-traitlets)
4793 ("python-jupyter-core" ,python-jupyter-core)))
4794 (home-page "http://jupyter.org/")
4795 (synopsis "Jupyter protocol implementation and client libraries")
4796 (description
4797 "The @code{jupyter_client} package contains the reference implementation
4798 of the Jupyter protocol. It also provides client and kernel management APIs
4799 for working with kernels, and the @code{jupyter kernelspec} entrypoint for
4800 installing @code{kernelspec}s for use with Jupyter frontends.")
4801 (license license:bsd-3)))
4802
4803 (define-public python2-jupyter-client
4804 (package-with-python2 python-jupyter-client))
4805
4806 (define-public python-ipykernel
4807 (package
4808 (name "python-ipykernel")
4809 (version "4.5.2")
4810 (source
4811 (origin
4812 (method url-fetch)
4813 (uri (pypi-uri "ipykernel" version))
4814 (sha256
4815 (base32 "0qllv0k6zzv1r1cj1x2ygxmlrrqhbslzj8rc6r6fg3kc1rgz4m2s"))))
4816 (build-system python-build-system)
4817 ;; The tests load a submodule of IPython. However, IPython itself depends
4818 ;; on ipykernel.
4819 (arguments `(#:tests? #f))
4820 (propagated-inputs
4821 ;; imported at runtime during connect
4822 `(("python-jupyter-client" ,python-jupyter-client)))
4823 (home-page "https://ipython.org")
4824 (synopsis "IPython Kernel for Jupyter")
4825 (description
4826 "This package provides the IPython kernel for Jupyter.")
4827 (license license:bsd-3)))
4828
4829 (define-public python2-ipykernel
4830 (package-with-python2 python-ipykernel))
4831
4832 (define-public python-ipython
4833 (package
4834 (name "python-ipython")
4835 (version "5.5.0")
4836 (source
4837 (origin
4838 (method url-fetch)
4839 (uri (pypi-uri "ipython" version ".tar.gz"))
4840 (sha256
4841 (base32 "03qmzpfy00if10i9k8fjkam1s4xg22j73f933x5d228z9n4rwik6"))))
4842 (build-system python-build-system)
4843 (outputs '("out" "doc"))
4844 (propagated-inputs
4845 `(("python-pyzmq" ,python-pyzmq)
4846 ("python-prompt-toolkit" ,python-prompt-toolkit)
4847 ("python-terminado" ,python-terminado)
4848 ("python-matplotlib" ,python-matplotlib)
4849 ("python-numpy" ,python-numpy)
4850 ("python-numpydoc" ,python-numpydoc)
4851 ("python-jinja2" ,python-jinja2)
4852 ("python-jupyter-console"
4853 ;; The python-ipython and python-jupyter-console require each
4854 ;; other. To get the functionality in both packages working, strip
4855 ;; down the python-jupyter-console package when using it as an input
4856 ;; to python-ipython.
4857 ,python-jupyter-console-minimal)
4858 ("python-mistune" ,python-mistune)
4859 ("python-pexpect" ,python-pexpect)
4860 ("python-pickleshare" ,python-pickleshare)
4861 ("python-simplegeneric" ,python-simplegeneric)
4862 ("python-jsonschema" ,python-jsonschema)
4863 ("python-traitlets" ,python-traitlets)
4864 ("python-ipykernel" ,python-ipykernel)
4865 ("python-nbformat" ,python-nbformat)
4866 ("python-pygments" ,python-pygments)))
4867 (inputs
4868 `(("readline" ,readline)
4869 ("which" ,which)))
4870 (native-inputs
4871 `(("graphviz" ,graphviz)
4872 ("pkg-config" ,pkg-config)
4873 ("python-requests" ,python-requests) ;; for tests
4874 ("python-testpath" ,python-testpath)
4875 ("python-nose" ,python-nose)
4876 ("python-sphinx" ,python-sphinx)
4877 ("python-shpinx-rtd-theme" ,python-sphinx-rtd-theme)
4878 ;; FIXME: It's possible that a smaller union would work just as well.
4879 ("texlive" ,(texlive-union (list texlive-fonts-amsfonts
4880 texlive-fonts-ec
4881 texlive-generic-ifxetex
4882 texlive-generic-pdftex
4883 texlive-latex-amsfonts
4884 texlive-latex-capt-of
4885 texlive-latex-cmap
4886 texlive-latex-environ
4887 texlive-latex-eqparbox
4888 texlive-latex-etoolbox
4889 texlive-latex-expdlist
4890 texlive-latex-fancyhdr
4891 texlive-latex-fancyvrb
4892 texlive-latex-fncychap
4893 texlive-latex-float
4894 texlive-latex-framed
4895 texlive-latex-geometry
4896 texlive-latex-graphics
4897 texlive-latex-hyperref
4898 texlive-latex-mdwtools
4899 texlive-latex-multirow
4900 texlive-latex-oberdiek
4901 texlive-latex-parskip
4902 texlive-latex-preview
4903 texlive-latex-tabulary
4904 texlive-latex-threeparttable
4905 texlive-latex-titlesec
4906 texlive-latex-trimspaces
4907 texlive-latex-ucs
4908 texlive-latex-upquote
4909 texlive-latex-url
4910 texlive-latex-varwidth
4911 texlive-latex-wrapfig)))
4912 ("texinfo" ,texinfo)))
4913 (arguments
4914 `(#:phases
4915 (modify-phases %standard-phases
4916 (add-after
4917 'install 'install-doc
4918 (lambda* (#:key inputs outputs #:allow-other-keys)
4919 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4920 (doc (string-append data "/doc/" ,name "-" ,version))
4921 (html (string-append doc "/html"))
4922 (man1 (string-append data "/man/man1"))
4923 (info (string-append data "/info"))
4924 (examples (string-append doc "/examples"))
4925 (python-arg (string-append "PYTHON=" (which "python"))))
4926 (setenv "LANG" "en_US.utf8")
4927 ;; Make installed package available for running the tests
4928 (add-installed-pythonpath inputs outputs)
4929 (with-directory-excursion "docs"
4930 ;; FIXME: pdf fails to build
4931 ;;(system* "make" "pdf" "PAPER=a4")
4932 (system* "make" python-arg "html")
4933 (system* "make" python-arg "info"))
4934 (copy-recursively "docs/man" man1)
4935 (copy-recursively "examples" examples)
4936 (copy-recursively "docs/build/html" html)
4937 ;; (copy-file "docs/build/latex/ipython.pdf"
4938 ;; (string-append doc "/ipython.pdf"))
4939 (mkdir-p info)
4940 (copy-file "docs/build/texinfo/ipython.info"
4941 (string-append info "/ipython.info"))
4942 (copy-file "COPYING.rst" (string-append doc "/COPYING.rst")))))
4943 ;; Tests can only be run after the library has been installed and not
4944 ;; within the source directory.
4945 (delete 'check)
4946 (add-after
4947 'install 'check
4948 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
4949 (if tests?
4950 (with-directory-excursion "/tmp"
4951 ;; Make installed package available for running the tests
4952 (add-installed-pythonpath inputs outputs)
4953 (setenv "HOME" "/tmp/") ;; required by a test
4954 (zero? (system* (string-append (assoc-ref outputs "out")
4955 "/bin/iptest"))))
4956 #t)))
4957 (add-before
4958 'install 'fix-tests
4959 (lambda* (#:key inputs #:allow-other-keys)
4960 (substitute* "./IPython/utils/_process_posix.py"
4961 (("/usr/bin/env', 'which") (which "which")))
4962 (substitute* "./IPython/core/tests/test_inputtransformer.py"
4963 (("#!/usr/bin/env python")
4964 (string-append "#!" (which "python"))))
4965 ;; Disable 1 failing test
4966 (substitute* "./IPython/core/tests/test_magic.py"
4967 (("def test_dirops\\(\\):" all)
4968 (string-append "@dec.skipif(True)\n" all))))))))
4969 (home-page "https://ipython.org")
4970 (synopsis "IPython is a tool for interactive computing in Python")
4971 (description
4972 "IPython provides a rich architecture for interactive computing with:
4973 Powerful interactive shells, a browser-based notebook, support for interactive
4974 data visualization, embeddable interpreters and tools for parallel
4975 computing.")
4976 (license license:bsd-3)
4977 (properties `((python2-variant . ,(delay python2-ipython))))))
4978
4979 (define-public python2-ipython
4980 (let ((ipython (package-with-python2 (strip-python2-variant python-ipython))))
4981 (package
4982 (inherit ipython)
4983 ;; FIXME: add pyreadline once available.
4984 (propagated-inputs
4985 `(("python2-backports-shutil-get-terminal-size"
4986 ,python2-backports-shutil-get-terminal-size)
4987 ("python2-pathlib2" ,python2-pathlib2)
4988 ,@(package-propagated-inputs ipython)))
4989 (native-inputs
4990 `(("python2-mock" ,python2-mock)
4991 ,@(package-native-inputs ipython))))))
4992
4993 (define-public python-urwid
4994 (package
4995 (name "python-urwid")
4996 (version "2.0.1")
4997 (source
4998 (origin
4999 (method url-fetch)
5000 (uri (pypi-uri "urwid" version))
5001 (sha256
5002 (base32
5003 "1g6cpicybvbananpjikmjk8npmjk4xvak1wjzji62wc600wkwkb4"))))
5004 (build-system python-build-system)
5005 (home-page "http://urwid.org")
5006 (synopsis "Console user interface library for Python")
5007 (description
5008 "Urwid is a curses-based UI/widget library for Python. It includes many
5009 features useful for text console applications.")
5010 (license license:lgpl2.1+)))
5011
5012 (define-public python2-urwid
5013 (package-with-python2 python-urwid))
5014
5015 (define-public python-urwidtrees
5016 (package
5017 (name "python-urwidtrees")
5018 (version "1.0.2")
5019 (source
5020 (origin
5021 (method url-fetch)
5022 ;; package author intends on distributing via github rather than pypi:
5023 ;; https://github.com/pazz/alot/issues/877#issuecomment-230173331
5024 (uri (string-append "https://github.com/pazz/urwidtrees/archive/"
5025 version ".tar.gz"))
5026 (file-name (string-append name "-" version ".tar.gz"))
5027 (sha256
5028 (base32
5029 "0d30lyd3s2a97rhqfax5w9ssqds2z6aydqx3c6j2c2lk3cb4ngvh"))))
5030 (build-system python-build-system)
5031 (arguments
5032 '(#:tests? #f)) ; no tests
5033 (propagated-inputs `(("python-urwid" ,python-urwid)))
5034 (home-page "https://github.com/pazz/urwidtrees")
5035 (synopsis "Tree widgets for urwid")
5036 (description "Urwidtrees is a Widget Container API for the @code{urwid}
5037 toolkit. Use it to build trees of widgets.")
5038 (license license:gpl3+)))
5039
5040 (define-public python2-urwidtrees
5041 (package-with-python2 python-urwidtrees))
5042
5043 (define-public python-ua-parser
5044 (package
5045 (name "python-ua-parser")
5046 (version "0.8.0")
5047 (source
5048 (origin
5049 (method url-fetch)
5050 (uri (pypi-uri "ua-parser" version))
5051 (sha256
5052 (base32
5053 "1jwdf58rhchjzzrad405pviv0iq24xa2xmmmdgcm2c8s6b4wzfwp"))))
5054 (build-system python-build-system)
5055 (arguments
5056 `(#:tests? #f)) ;no test suite in release
5057 (native-inputs
5058 `(("python-pyyaml" ,python-pyyaml)))
5059 (home-page "https://github.com/ua-parser/uap-python")
5060 (synopsis "User agent parser")
5061 (description
5062 "@code{ua-parser} is a Python port of Browserscope's user agent parser.")
5063 (license license:asl2.0)))
5064
5065 (define-public python2-ua-parser
5066 (package-with-python2 python-ua-parser))
5067
5068 (define-public python-user-agents
5069 (package
5070 (name "python-user-agents")
5071 (version "1.1.0")
5072 (source
5073 (origin
5074 (method url-fetch)
5075 (uri (pypi-uri "user-agents" version))
5076 (sha256
5077 (base32
5078 "0fc00cd3j8dahq1zzn8pkgfgd7lq37bp2scmdma2n1c049vicgb4"))))
5079 (build-system python-build-system)
5080 (arguments
5081 `(#:tests? #f)) ;missing devices.json test file in release
5082 (propagated-inputs
5083 `(("python-ua-parser" ,python-ua-parser)))
5084 (home-page "https://github.com/selwin/python-user-agents")
5085 (synopsis "User Agent strings parsing library")
5086 (description
5087 "A library to identify devices (phones, tablets) and their capabilities by
5088 parsing (browser/HTTP) user agent strings.")
5089 (license license:expat)))
5090
5091 (define-public python2-user-agents
5092 (package-with-python2 python-user-agents))
5093
5094 (define-public python-dbus
5095 (package
5096 (name "python-dbus")
5097 (version "1.2.0")
5098 (source
5099 (origin
5100 (method url-fetch)
5101 (uri (string-append
5102 "https://dbus.freedesktop.org/releases/dbus-python/dbus-python-"
5103 version ".tar.gz"))
5104 (sha256
5105 (base32 "1py62qir966lvdkngg0v8k1khsqxwk5m4s8nflpk1agk5f5nqb71"))))
5106 (build-system gnu-build-system)
5107 (arguments
5108 '(#:phases
5109 (modify-phases %standard-phases
5110 (add-before
5111 'check 'pre-check
5112 (lambda _
5113 ;; XXX: For the missing '/etc/machine-id'.
5114 (substitute* "test/run-test.sh"
5115 (("DBUS_FATAL_WARNINGS=1")
5116 "DBUS_FATAL_WARNINGS=0"))
5117 #t)))))
5118 (native-inputs
5119 `(("pkg-config" ,pkg-config)))
5120 (inputs
5121 `(("python" ,python)
5122 ("dbus-glib" ,dbus-glib)))
5123 (synopsis "Python bindings for D-bus")
5124 (description "python-dbus provides bindings for libdbus, the reference
5125 implementation of D-Bus.")
5126 (home-page "https://www.freedesktop.org/wiki/Software/DBusBindings/")
5127 (license license:expat)))
5128
5129 (define-public python2-dbus
5130 (package (inherit python-dbus)
5131 (name "python2-dbus")
5132 (inputs `(("python" ,python-2)
5133 ,@(alist-delete "python"
5134 (package-inputs python-dbus)
5135 equal?)))
5136 ;; FIXME: on Python 2, the test_utf8 fails with:
5137 ;; "ValueError: unichr() arg not in range(0x10000) (narrow Python build)"
5138 (arguments `(#:tests? #f))))
5139
5140 (define-public python-lxml
5141 (package
5142 (name "python-lxml")
5143 (version "3.8.0")
5144 (source
5145 (origin
5146 (method url-fetch)
5147 (uri (pypi-uri "lxml" version))
5148 (sha256
5149 (base32
5150 "15nvf6n285n282682qyw3wihsncb0x5amdhyi4b83bfa2nz74vvk"))))
5151 (build-system python-build-system)
5152 (inputs
5153 `(("libxml2" ,libxml2)
5154 ("libxslt" ,libxslt)))
5155 (home-page "http://lxml.de/")
5156 (synopsis
5157 "Python XML processing library")
5158 (description
5159 "The lxml XML toolkit is a Pythonic binding for the C libraries
5160 libxml2 and libxslt.")
5161 (license license:bsd-3))) ; and a few more, see LICENSES.txt
5162
5163 (define-public python2-lxml
5164 (package-with-python2 python-lxml))
5165
5166 ;; beautifulsoup4 has a totally different namespace than 3.x,
5167 ;; and pypi seems to put it under its own name, so I guess we should too
5168 (define-public python-beautifulsoup4
5169 (package
5170 (name "python-beautifulsoup4")
5171 (version "4.5.3")
5172 (source
5173 (origin
5174 (method url-fetch)
5175 (uri (pypi-uri "beautifulsoup4" version))
5176 (sha256
5177 (base32
5178 "0glaw1vyxnbp03fni7h5496n6iib0n5iim4gax1n0ngscs9s075j"))))
5179 (build-system python-build-system)
5180 (arguments
5181 `(#:phases
5182 (modify-phases %standard-phases
5183 ;; The Python 2 source is the definitive source of beautifulsoup4. We
5184 ;; must use this conversion script when building with Python 3. The
5185 ;; conversion script also runs the tests.
5186 ;; For more information, see the file 'convert-py3k' in the source
5187 ;; distribution.
5188 (replace 'check
5189 (lambda _ (zero? (system* "./convert-py3k")))))))
5190 (home-page
5191 "https://www.crummy.com/software/BeautifulSoup/bs4/")
5192 (synopsis
5193 "Python screen-scraping library")
5194 (description
5195 "Beautiful Soup is a Python library designed for rapidly setting up
5196 screen-scraping projects. It offers Pythonic idioms for navigating,
5197 searching, and modifying a parse tree, providing a toolkit for
5198 dissecting a document and extracting what you need. It automatically
5199 converts incoming documents to Unicode and outgoing documents to UTF-8.")
5200 (license license:expat)
5201 (properties `((python2-variant . ,(delay python2-beautifulsoup4))))))
5202
5203 (define-public python2-beautifulsoup4
5204 (package
5205 (inherit (package-with-python2
5206 (strip-python2-variant python-beautifulsoup4)))
5207 (arguments `(#:python ,python-2))))
5208
5209 (define-public python-netifaces
5210 (package
5211 (name "python-netifaces")
5212 (version "0.10.7")
5213 (source
5214 (origin
5215 (method url-fetch)
5216 (uri (pypi-uri "netifaces" version))
5217 (sha256
5218 (base32
5219 "1gccklrcplbbqh81g1mdgpa5y8na7kkf29cq2ka3f5a2fp5hyndx"))))
5220 (build-system python-build-system)
5221 (home-page "https://github.com/al45tair/netifaces")
5222 (synopsis
5223 "Python module for portable network interface information")
5224 (description
5225 "Netifaces is a Python module providing information on network
5226 interfaces in an easy and portable manner.")
5227 (license license:expat)))
5228
5229 (define-public python2-netifaces
5230 (package-with-python2 python-netifaces))
5231
5232 (define-public python-networkx
5233 (package
5234 (name "python-networkx")
5235 (version "2.2")
5236 (source
5237 (origin
5238 (method url-fetch)
5239 (uri (pypi-uri "networkx" version ".zip"))
5240 (sha256
5241 (base32 "12swxb15299v9vqjsq4z8rgh5sdhvpx497xwnhpnb0gynrx6zra5"))))
5242 (build-system python-build-system)
5243 ;; python-decorator is needed at runtime.
5244 (propagated-inputs
5245 `(("python-decorator" ,python-decorator)))
5246 (native-inputs
5247 `(("python-nose" ,python-nose)
5248 ("unzip" ,unzip)))
5249 (home-page "https://networkx.github.io/")
5250 (synopsis "Python module for creating and manipulating graphs and networks")
5251 (description
5252 "NetworkX is a Python package for the creation, manipulation, and study
5253 of the structure, dynamics, and functions of complex networks.")
5254 (license license:bsd-3)))
5255
5256 (define-public python2-networkx
5257 (package-with-python2 python-networkx))
5258
5259 ;; Define new package, because the current version of python-colormath does
5260 ;; not build against 2.0.
5261 (define-public python-networkx2
5262 (package (inherit python-networkx)
5263 (name "python-networkx2")
5264 (version "2.0")
5265 (source
5266 (origin
5267 (method url-fetch)
5268 (uri (pypi-uri "networkx" version ".zip"))
5269 (sha256
5270 (base32
5271 "1ajl2jp8qry9nyjzzkqpy0vmsr14d23z1qk7y0vr5iwjbpvzhpyd"))
5272 (patches
5273 (search-patches "python-networkx2-reproducible-build.patch"))))))
5274
5275 (define-public python2-networkx2
5276 (package-with-python2 python-networkx2))
5277
5278 (define-public python-datrie
5279 (package
5280 (name "python-datrie")
5281 (version "0.7.1")
5282 (source
5283 (origin
5284 (method url-fetch)
5285 (uri (pypi-uri "datrie" version))
5286 (sha256
5287 (base32
5288 "08r0if7dry2q7p34gf7ffyrlnf4bdvnprxgydlfxgfnvq8f3f4bs"))))
5289 (build-system python-build-system)
5290 (native-inputs
5291 `(("python-cython" ,python-cython)
5292 ("python-hypothesis" ,python-hypothesis)
5293 ("python-pytest" ,python-pytest)
5294 ("python-pytest-runner" ,python-pytest-runner)))
5295 (home-page "https://github.com/kmike/datrie")
5296 (synopsis "Fast, efficiently stored trie for Python")
5297 (description
5298 "This package provides a fast, efficiently stored trie implementation for
5299 Python.")
5300 (license license:lgpl2.1+)))
5301
5302 (define-public snakemake
5303 (package
5304 (name "snakemake")
5305 (version "5.2.4")
5306 (source
5307 (origin
5308 (method url-fetch)
5309 (uri (pypi-uri "snakemake" version))
5310 (sha256
5311 (base32 "0gj0xxgiq3mp9qyyrbfzldiaq1giliqw0in64nqiz7vx49myqj7z"))))
5312 (build-system python-build-system)
5313 (arguments
5314 ;; TODO: Package missing test dependencies.
5315 '(#:tests? #f
5316 #:phases
5317 (modify-phases %standard-phases
5318 ;; For cluster execution Snakemake will call Python. Since there is
5319 ;; no suitable PYTHONPATH set, cluster execution will fail. We fix
5320 ;; this by calling the snakemake wrapper instead.
5321 (add-after 'unpack 'call-wrapper-not-wrapped-snakemake
5322 (lambda* (#:key outputs #:allow-other-keys)
5323 (substitute* "snakemake/executors.py"
5324 (("\\{sys.executable\\} -m snakemake")
5325 (string-append (assoc-ref outputs "out")
5326 "/bin/snakemake")))
5327 #t)))))
5328 (propagated-inputs
5329 `(("python-gitpython" ,python-gitpython)
5330 ("python-wrapt" ,python-wrapt)
5331 ("python-requests" ,python-requests)
5332 ("python-appdirs" ,python-appdirs)
5333 ("python-configargparse" ,python-configargparse)
5334 ("python-datrie" ,python-datrie)
5335 ("python-docutils" ,python-docutils)
5336 ("python-jinja2" ,python-jinja2)
5337 ("python-jsonschema" ,python-jsonschema)
5338 ("python-networkx" ,python-networkx)
5339 ("python-pyyaml" ,python-pyyaml)
5340 ("python-ratelimiter" ,python-ratelimiter)))
5341 (home-page "https://snakemake.readthedocs.io")
5342 (synopsis "Python-based execution environment for make-like workflows")
5343 (description
5344 "Snakemake aims to reduce the complexity of creating workflows by
5345 providing a clean and modern domain specific specification language (DSL) in
5346 Python style, together with a fast and comfortable execution environment.")
5347 (license license:expat)))
5348
5349 ;; This is currently needed for the pigx-* packages.
5350 (define-public snakemake-4
5351 (package (inherit snakemake)
5352 (version "4.4.0")
5353 (source
5354 (origin
5355 (method url-fetch)
5356 (uri (pypi-uri "snakemake" version))
5357 (sha256
5358 (base32 "0g0paia4z7w3srnqdmavq3hrb2x7qnpf81jx50njl0p7y4y0j8jv"))))
5359 (propagated-inputs
5360 `(("python-wrapt" ,python-wrapt)
5361 ("python-requests" ,python-requests)
5362 ("python-appdirs" ,python-appdirs)
5363 ("python-configargparse" ,python-configargparse)
5364 ("python-pyyaml" ,python-pyyaml)
5365 ("python-ratelimiter" ,python-ratelimiter)))))
5366
5367 (define-public python-pyqrcode
5368 (package
5369 (name "python-pyqrcode")
5370 (version "1.2.1")
5371 (source
5372 (origin
5373 (method url-fetch)
5374 (uri (pypi-uri "PyQRCode" version))
5375 (sha256
5376 (base32
5377 "1m9ln8k9v7dfbh1i81225hx5mdsh8mpf9g7r4wpbfmiyfcs7dgzx"))))
5378 (build-system python-build-system)
5379 (home-page
5380 "https://github.com/mnooner256/pyqrcode")
5381 (synopsis "QR code generator")
5382 (description
5383 "Pyqrcode is a QR code generator written purely in Python with
5384 SVG, EPS, PNG and terminal output.")
5385 (license license:bsd-3)))
5386
5387 (define-public python-seaborn
5388 (package
5389 (name "python-seaborn")
5390 (version "0.9.0")
5391 (source
5392 (origin
5393 (method url-fetch)
5394 (uri (pypi-uri "seaborn" version))
5395 (sha256
5396 (base32 "0bqysi3fxfjl1866m5jq8z7mynhqbqnikim74dmzn8539iwkzj3n"))))
5397 (build-system python-build-system)
5398 (arguments
5399 `(#:phases
5400 (modify-phases %standard-phases
5401 (add-before 'check 'start-xserver
5402 (lambda* (#:key inputs #:allow-other-keys)
5403 (let ((xorg-server (assoc-ref inputs "xorg-server")))
5404 ;; There must be a running X server and make check doesn't
5405 ;; start one. Therefore we must do it.
5406 (system (format #f "~a/bin/Xvfb :1 &" xorg-server))
5407 (setenv "DISPLAY" ":1")
5408 #t)))
5409 (replace 'check (lambda _ (invoke "pytest" "seaborn") #t)))))
5410 (propagated-inputs
5411 `(("python-pandas" ,python-pandas)
5412 ("python-matplotlib" ,python-matplotlib)
5413 ("python-numpy" ,python-numpy)
5414 ("python-scipy" ,python-scipy)))
5415 (native-inputs
5416 `(("python-pytest" ,python-pytest)
5417 ("xorg-server" ,xorg-server)))
5418 (home-page "http://stanford.edu/~mwaskom/software/seaborn/")
5419 (synopsis "Statistical data visualization")
5420 (description
5421 "Seaborn is a library for making attractive and informative statistical
5422 graphics in Python. It is built on top of matplotlib and tightly integrated
5423 with the PyData stack, including support for numpy and pandas data structures
5424 and statistical routines from scipy and statsmodels.")
5425 (license license:bsd-3)))
5426
5427 (define-public python2-seaborn
5428 (package-with-python2 python-seaborn))
5429
5430 (define-public python-mpmath
5431 (package
5432 (name "python-mpmath")
5433 (version "0.19")
5434 (source (origin
5435 (method url-fetch)
5436 (uri (string-append "http://mpmath.org/files/mpmath-"
5437 version ".tar.gz"))
5438 (sha256
5439 (base32
5440 "08ijsr4ifrqv3cjc26mkw0dbvyygsa99in376hr4b96ddm1gdpb8"))))
5441 (build-system python-build-system)
5442 (arguments
5443 '(#:phases
5444 (modify-phases %standard-phases
5445 (replace 'check
5446 (lambda _
5447 (zero?
5448 (system* "python" "mpmath/tests/runtests.py" "-local")))))))
5449 (home-page "http://mpmath.org")
5450 (synopsis "Arbitrary-precision floating-point arithmetic in python")
5451 (description
5452 "@code{mpmath} can be used as an arbitrary-precision substitute for
5453 Python's float/complex types and math/cmath modules, but also does much
5454 more advanced mathematics.")
5455 (license license:bsd-3)))
5456
5457 (define-public python2-mpmath
5458 (package-with-python2 python-mpmath))
5459
5460 (define-public python-bigfloat
5461 (package
5462 (name "python-bigfloat")
5463 (version "0.3.0")
5464 (source
5465 (origin
5466 (method url-fetch)
5467 (uri (pypi-uri "bigfloat" version))
5468 (sha256
5469 (base32 "0xd7q4l7v0f463diznjv4k9wlaks80pn9drdqmfifi7zx8qvybi6"))))
5470 (build-system python-build-system)
5471 (inputs
5472 `(("mpfr" ,mpfr)))
5473 (home-page "https://github.com/mdickinson/bigfloat")
5474 (synopsis "Arbitrary precision floating-point arithmetic for Python")
5475 (description
5476 "This packages provides a Python interface to the MPFR library for
5477 multiprecision arithmetic.")
5478 (license license:lgpl3+)))
5479
5480 (define-public python2-bigfloat
5481 (package-with-python2 python-bigfloat))
5482
5483 (define-public python-sympy
5484 (package
5485 (name "python-sympy")
5486 (version "1.1.1")
5487 (source
5488 (origin
5489 (method url-fetch)
5490 (uri (string-append
5491 "https://github.com/sympy/sympy/releases/download/sympy-"
5492 version "/sympy-" version ".tar.gz"))
5493 (sha256
5494 (base32 "190n29sppw7g8ihilc5451y7jlfcaw56crqiqbf1jff43dlmfnxc"))))
5495 (build-system python-build-system)
5496 (arguments
5497 `(#:phases
5498 (modify-phases %standard-phases
5499 ;; Run the core tests after installation. By default it would run
5500 ;; *all* tests, which take a very long time to complete and are known
5501 ;; to be flaky.
5502 (delete 'check)
5503 (add-after 'install 'check
5504 (lambda* (#:key outputs #:allow-other-keys)
5505 (invoke "python3" "-c" "import sympy; sympy.test(\"/core\")")
5506 #t)))))
5507 (propagated-inputs
5508 `(("python-mpmath" ,python-mpmath)))
5509 (home-page "http://www.sympy.org/")
5510 (synopsis "Python library for symbolic mathematics")
5511 (description
5512 "SymPy is a Python library for symbolic mathematics. It aims to become a
5513 full-featured computer algebra system (CAS) while keeping the code as simple
5514 as possible in order to be comprehensible and easily extensible.")
5515 (license license:bsd-3)))
5516
5517 (define-public python2-sympy
5518 (package
5519 (inherit (package-with-python2 python-sympy))
5520 (arguments
5521 `(#:phases
5522 (modify-phases %standard-phases
5523 ;; Run the core tests after installation. By default it would run
5524 ;; *all* tests, which take a very long time to complete and are known
5525 ;; to be flaky.
5526 (delete 'check)
5527 (add-after 'install 'check
5528 (lambda* (#:key outputs #:allow-other-keys)
5529 (invoke "python" "-c" "import sympy; sympy.test(\"/core\")")
5530 #t)))))))
5531
5532 (define-public python-q
5533 (package
5534 (name "python-q")
5535 (version "2.6")
5536 (source
5537 (origin
5538 (method url-fetch)
5539 (uri (pypi-uri "q" version))
5540 (sha256
5541 (base32
5542 "1mgfazh8fkizh6walra2zv885f3lcgr3nb02v1frfm4p8ddcy3yy"))))
5543 (build-system python-build-system)
5544 (home-page "https://github.com/zestyping/q")
5545 (synopsis "Quick-and-dirty debugging output for tired programmers")
5546 (description
5547 "q is a Python module for \"print\" style of debugging Python code. It
5548 provides convenient short API for print out of values, tracebacks, and
5549 falling into the Python interpreter.")
5550 (license license:asl2.0)))
5551
5552 (define-public python2-q
5553 (package-with-python2 python-q))
5554
5555 (define-public python2-xlib
5556 (package
5557 (name "python2-xlib")
5558 (version "0.14")
5559 (source (origin
5560 (method url-fetch)
5561 (uri (string-append "mirror://sourceforge/python-xlib/python-xlib"
5562 "/" version "/"
5563 "python-xlib-" version ".tar.gz"))
5564 (sha256
5565 (base32
5566 "1sv0447j0rx8cgs3jhjl695p5pv13ihglcjlrrz1kq05lsvb0wa7"))))
5567 (build-system python-build-system)
5568 (arguments
5569 `(#:python ,python-2 ;Python 2 only
5570 #:tests? #f)) ;no tests
5571 (home-page "http://python-xlib.sourceforge.net/")
5572 (synopsis "Python X11 client library")
5573 (description
5574 "The Python X Library is intended to be a fully functional X client
5575 library for Python programs. It is useful to implement low-level X clients.
5576 It is written entirely in Python.")
5577 (license license:gpl2+)))
5578
5579 (define-public python-singledispatch
5580 (package
5581 (name "python-singledispatch")
5582 (version "3.4.0.3")
5583 (source
5584 (origin
5585 (method url-fetch)
5586 (uri (pypi-uri "singledispatch" version))
5587 (sha256
5588 (base32
5589 "171b7ip0hsq5qm83np40h3phlr36ym18w0lay0a8v08kvy3sy1jv"))))
5590 (build-system python-build-system)
5591 (native-inputs
5592 `(("python-six" ,python-six))) ; required for conversion, not at run-time
5593 (home-page
5594 "http://docs.python.org/3/library/functools.html#functools.singledispatch")
5595 (synopsis "Backport of singledispatch feature from Python 3.4")
5596 (description
5597 "This library brings functools.singledispatch from Python 3.4 to Python
5598 2.6-3.3.")
5599 (license license:expat)))
5600
5601 (define-public python2-singledispatch
5602 (package-with-python2 python-singledispatch))
5603
5604 ;; the python- version can be removed with python-3.5
5605 (define-public python-backports-abc
5606 (package
5607 (name "python-backports-abc")
5608 (version "0.5")
5609 (source
5610 (origin
5611 (method url-fetch)
5612 (uri (pypi-uri "backports_abc" version))
5613 (sha256
5614 (base32
5615 "1pkv8d1zxj5f9i227dxbjczncbv7ks7ywnjwyxfjagm02i2yafq3"))))
5616 (build-system python-build-system)
5617 (home-page "https://github.com/cython/backports_abc")
5618 (synopsis "Backport of additions to the 'collections.abc' module")
5619 (description
5620 "Python-backports-abc provides a backport of additions to the
5621 'collections.abc' module in Python-3.5.")
5622 (license license:psfl)))
5623
5624 (define-public python2-backports-abc
5625 (package-with-python2 python-backports-abc))
5626
5627 (define-public python-backports-csv
5628 (package
5629 (name "python-backports-csv")
5630 (version "1.0.5")
5631 (source
5632 (origin
5633 (method url-fetch)
5634 (uri (pypi-uri "backports.csv" version))
5635 (sha256
5636 (base32
5637 "1imzbrradkfn8s2m1qcimyn74dn1mz2p3j381jljn166rf2i6hlc"))))
5638 (build-system python-build-system)
5639 (home-page "https://github.com/ryanhiebert/backports.csv")
5640 (synopsis "Backport of Python 3's csv module for Python 2")
5641 (description
5642 "Provides a backport of Python 3's @code{csv} module for parsing
5643 comma separated values. The API of the @code{csv} module in Python 2
5644 is drastically different from the @code{csv} module in Python 3.
5645 This is due, for the most part, to the difference between str in
5646 Python 2 and Python 3.")
5647 (license license:psfl)))
5648
5649 (define-public python2-backports-csv
5650 (package-with-python2 python-backports-csv))
5651
5652 (define-public python2-backports-shutil-get-terminal-size
5653 (package
5654 (name "python2-backports-shutil-get-terminal-size")
5655 (version "1.0.0")
5656 (source
5657 (origin
5658 (method url-fetch)
5659 (uri (pypi-uri "backports.shutil_get_terminal_size" version))
5660 (sha256
5661 (base32
5662 "107cmn7g3jnbkp826zlj8rrj19fam301qvaqf0f3905f5217lgki"))))
5663 (build-system python-build-system)
5664 (arguments
5665 `(#:python ,python-2
5666 #:phases
5667 (modify-phases %standard-phases
5668 (replace 'check
5669 (lambda _
5670 (zero? (system* "py.test" "-v")))))))
5671 (native-inputs
5672 `(("python2-pytest" ,python2-pytest)))
5673 (home-page "https://github.com/chrippa/backports.shutil_get_terminal_size")
5674 (synopsis "Backport of Python 3.3's @code{shutil.get_terminal_size}")
5675 (description
5676 "This package provides a backport of the @code{get_terminal_size
5677 function} from Python 3.3's @code{shutil}.
5678 Unlike the original version it is written in pure Python rather than C,
5679 so it might be a tiny bit slower.")
5680 (license license:expat)))
5681
5682 (define-public python-waf
5683 (package
5684 (name "python-waf")
5685 (version "1.9.8")
5686 (source (origin
5687 (method url-fetch)
5688 (uri (string-append "https://waf.io/"
5689 "waf-" version ".tar.bz2"))
5690 (sha256
5691 (base32
5692 "0wl4cnmp06lfxqjxaan58bqxn27smhydz0sg5prrfbl3bsw4gv6q"))))
5693 (build-system python-build-system)
5694 (arguments
5695 '(#:phases
5696 (modify-phases %standard-phases
5697 (replace 'build
5698 (lambda _
5699 (invoke "python" "waf-light" "configure" "build")))
5700 (replace 'check
5701 (lambda _
5702 (invoke "python" "waf" "--version")))
5703 (replace 'install
5704 (lambda* (#:key outputs #:allow-other-keys)
5705 (let ((out (assoc-ref outputs "out")))
5706 (install-file "waf" (string-append out "/bin")))
5707 #t))
5708 ;; waf breaks when it is wrapped.
5709 (delete 'wrap))))
5710 (home-page "https://waf.io/")
5711 (synopsis "Python-based build system")
5712 (description
5713 "Waf is a Python-based framework for configuring, compiling and installing
5714 applications.")
5715 (license license:bsd-3)))
5716
5717 (define-public python2-waf
5718 (package-with-python2 python-waf))
5719
5720 (define-public python-pyzmq
5721 (package
5722 (name "python-pyzmq")
5723 (version "15.1.0")
5724 (source
5725 (origin
5726 (method url-fetch)
5727 (uri (pypi-uri "pyzmq" version))
5728 (sha256
5729 (base32 "13fhwnlvsvxv72kfhqbpn6qi7msh8mc8377mpabv32skk2cjfnxx"))))
5730 (build-system python-build-system)
5731 (arguments
5732 `(#:configure-flags
5733 (list (string-append "--zmq=" (assoc-ref %build-inputs "zeromq")))
5734 ;; FIXME: You must build pyzmq with 'python setup.py build_ext
5735 ;; --inplace' for 'python setup.py test' to work.
5736 #:tests? #f))
5737 (inputs
5738 `(("zeromq" ,zeromq)))
5739 (native-inputs
5740 `(("pkg-config" ,pkg-config)
5741 ("python-nose" ,python-nose)))
5742 (home-page "https://github.com/zeromq/pyzmq")
5743 (synopsis "Python bindings for 0MQ")
5744 (description
5745 "PyZMQ is the official Python binding for the ZeroMQ messaging library.")
5746 (license license:bsd-4)))
5747
5748 (define-public python2-pyzmq
5749 (package-with-python2 python-pyzmq))
5750
5751 (define-public python-pep8
5752 ;; This package has been renamed to ‘pycodestyle’ and is no longer updated.
5753 ;; Its last release (1.7.1) adds only a scary warning to this effect, breaking
5754 ;; some dependents' test suites, and nothing more.
5755 (package
5756 (name "python-pep8")
5757 (version "1.7.0")
5758 (source
5759 (origin
5760 (method url-fetch)
5761 (uri (pypi-uri "pep8" version))
5762 (sha256
5763 (base32
5764 "002rkl4lsn6x2mxmf8ar00l0m8i3mzrc6pnzz77blyksmpsxa4x1"))))
5765 (build-system python-build-system)
5766 (home-page "https://pep8.readthedocs.org/")
5767 (synopsis "Python style guide checker")
5768 (description
5769 "This tools checks Python code against some of the style conventions in
5770 PEP 8.")
5771 (license license:expat)))
5772
5773 (define-public python2-pep8
5774 (package-with-python2 python-pep8))
5775
5776 (define-public python-pyflakes
5777 (package
5778 (name "python-pyflakes")
5779 (version "1.5.0")
5780 (source
5781 (origin
5782 (method url-fetch)
5783 (uri (pypi-uri "pyflakes" version))
5784 (sha256
5785 (base32
5786 "1x1pcca4a24k4pw8x1c77sgi58cg1wl2k38mp8a25k608pzls3da"))))
5787 (build-system python-build-system)
5788 (home-page
5789 "https://github.com/pyflakes/pyflakes")
5790 (synopsis "Passive checker of Python programs")
5791 (description
5792 "Pyflakes statically checks Python source code for common errors.")
5793 (license license:expat)))
5794
5795 (define-public python2-pyflakes
5796 (package-with-python2 python-pyflakes))
5797
5798 (define-public python-mccabe
5799 (package
5800 (name "python-mccabe")
5801 (version "0.6.1")
5802 (source
5803 (origin
5804 (method url-fetch)
5805 (uri (pypi-uri "mccabe" version))
5806 (sha256
5807 (base32
5808 "07w3p1qm44hgxf3vvwz84kswpsx6s7kvaibzrsx5dzm0hli1i3fx"))))
5809 (build-system python-build-system)
5810 (native-inputs
5811 `(("python-pytest" ,python-pytest-bootstrap)
5812 ("python-pytest-runner" ,python-pytest-runner)))
5813 (home-page "https://github.com/flintwork/mccabe")
5814 (synopsis "McCabe checker, plugin for flake8")
5815 (description
5816 "This package provides a Flake8 plug-in to compute the McCabe cyclomatic
5817 complexity of Python source code.")
5818 (license license:expat)))
5819
5820 (define-public python2-mccabe
5821 (package-with-python2 python-mccabe))
5822
5823 (define-public python-mccabe-0.2.1
5824 (package (inherit python-mccabe)
5825 (version "0.2.1")
5826 (source
5827 (origin
5828 (method url-fetch)
5829 (uri (pypi-uri "mccabe" version))
5830 (sha256
5831 (base32
5832 "0fi4a81kr5bcv5p4xgibqr595hyj5dafkqgsmfk96mfy8w71fajs"))))))
5833
5834 (define-public python2-mccabe-0.2.1
5835 (package-with-python2 python-mccabe-0.2.1))
5836
5837 ;; Flake8 2.4.1 requires an older version of pep8.
5838 ;; This should be removed ASAP.
5839 (define-public python-pep8-1.5.7
5840 (package (inherit python-pep8)
5841 (version "1.5.7")
5842 (source
5843 (origin
5844 (method url-fetch)
5845 (uri (string-append
5846 "https://pypi.python.org/packages/source/p/pep8/pep8-"
5847 version
5848 ".tar.gz"))
5849 (sha256
5850 (base32
5851 "12b9bbdbwnspxgak14xg58c130x2n0blxzlms5jn2dszn8qj3d0m"))))
5852 (arguments
5853 ;; XXX Tests not compatible with Python 3.5.
5854 '(#:tests? #f))))
5855
5856 (define-public python2-pep8-1.5.7
5857 (package-with-python2 python-pep8-1.5.7))
5858
5859 ;; Flake8 2.4.1 requires an older version of pyflakes.
5860 ;; This should be removed ASAP.
5861 (define-public python-pyflakes-0.8.1
5862 (package (inherit python-pyflakes)
5863 (version "0.8.1")
5864 (source
5865 (origin
5866 (method url-fetch)
5867 (uri (string-append
5868 "https://pypi.python.org/packages/source/p/pyflakes/pyflakes-"
5869 version
5870 ".tar.gz"))
5871 (sha256
5872 (base32
5873 "0sbpq6pqm1i9wqi41mlfrsc5rk92jv4mskvlyxmnhlbdnc80ma1z"))))
5874 (arguments
5875 ;; XXX Tests not compatible with Python 3.5.
5876 '(#:tests? #f))))
5877
5878 (define-public python2-pyflakes-0.8.1
5879 (package-with-python2 python-pyflakes-0.8.1))
5880
5881 (define-public python-flake8
5882 (package
5883 (name "python-flake8")
5884 (version "3.4.1")
5885 (source
5886 (origin
5887 (method url-fetch)
5888 (uri (pypi-uri "flake8" version))
5889 (sha256
5890 (base32
5891 "1n0i38592vy3q0x2a9bf8z6rhhn04i30wsn5i5zzcj7qkxvl8062"))))
5892 (build-system python-build-system)
5893 (arguments
5894 `(#:phases
5895 (modify-phases %standard-phases
5896 (delete 'check)
5897 (add-after 'install 'check
5898 (lambda* (#:key inputs outputs #:allow-other-keys)
5899 (add-installed-pythonpath inputs outputs)
5900 (zero? (system* "pytest" "-v")))))))
5901 (propagated-inputs
5902 `(("python-pycodestyle" ,python-pycodestyle)
5903 ("python-pyflakes" ,python-pyflakes)
5904 ;; flake8 depends on a newer setuptools than provided by python.
5905 ("python-setuptools" ,python-setuptools)
5906 ("python-mccabe" ,python-mccabe)))
5907 (native-inputs
5908 `(("python-mock" ,python-mock) ; TODO: only required for < 3.3
5909 ("python-pytest" ,python-pytest-bootstrap)
5910 ("python-pytest-runner" ,python-pytest-runner)))
5911 (home-page "https://gitlab.com/pycqa/flake8")
5912 (synopsis
5913 "The modular source code checker: pep8, pyflakes and co")
5914 (description
5915 "Flake8 is a wrapper around PyFlakes, pep8 and python-mccabe.")
5916 (properties `((python2-variant . ,(delay python2-flake8))))
5917 (license license:expat)))
5918
5919 (define-public python2-flake8
5920 (let ((base (package-with-python2 (strip-python2-variant python-flake8))))
5921 (package (inherit base)
5922 (propagated-inputs
5923 `(("python2-configparser" ,python2-configparser)
5924 ("python2-enum34" ,python2-enum34)
5925 ,@(package-propagated-inputs base))))))
5926
5927 ;; python-hacking requires flake8 <2.6.0.
5928 (define-public python-flake8-2.5
5929 (package
5930 (inherit python-flake8)
5931 (version "2.5.5")
5932 (source (origin
5933 (method url-fetch)
5934 (uri (pypi-uri "flake8" version))
5935 (sha256
5936 (base32
5937 "1snylqwbmrylbx3r1wpz8ggk98f6bcag4441ag8mm2l7wyn58sij"))))
5938 (propagated-inputs
5939 `(("python-pep8" ,python-pep8)
5940 ,@(package-propagated-inputs python-flake8)))
5941 (properties `((python2-variant . ,(delay python2-flake8-2.5))))))
5942
5943 (define-public python2-flake8-2.5
5944 (package
5945 (inherit python2-flake8)
5946 (version (package-version python-flake8-2.5))
5947 (source (origin
5948 (inherit (package-source python-flake8-2.5))))
5949 (propagated-inputs
5950 `(("python2-pep8" ,python2-pep8)
5951 ,@(package-propagated-inputs python2-flake8)))))
5952
5953 (define-public python-flake8-polyfill
5954 (package
5955 (name "python-flake8-polyfill")
5956 (version "1.0.2")
5957 (source
5958 (origin
5959 (method url-fetch)
5960 (uri (pypi-uri "flake8-polyfill" version))
5961 (sha256
5962 (base32
5963 "1nlf1mkqw856vi6782qcglqhaacb23khk9wkcgn55npnjxshhjz4"))))
5964 (build-system python-build-system)
5965 (arguments
5966 '(#:phases
5967 (modify-phases %standard-phases
5968 (replace 'check
5969 (lambda _
5970 (setenv "PYTHONPATH"
5971 (string-append (getcwd) "/build/lib:"
5972 (getenv "PYTHONPATH")))
5973 (zero? (system* "py.test" "-v")))))))
5974 (native-inputs
5975 `(("python-flake8" ,python-flake8)
5976 ("python-mock" ,python-mock)
5977 ("python-pep8" ,python-pep8)
5978 ("python-pycodestyle" ,python-pycodestyle)
5979 ("python-pytest" ,python-pytest)))
5980 (home-page "https://gitlab.com/pycqa/flake8-polyfill")
5981 (synopsis "Polyfill package for Flake8 plugins")
5982 (description
5983 "This package that provides some compatibility helpers for Flake8
5984 plugins that intend to support Flake8 2.x and 3.x simultaneously.")
5985 (license license:expat)))
5986
5987 (define-public python2-flake8-polyfill
5988 (package-with-python2 python-flake8-polyfill))
5989
5990 (define-public python-mistune
5991 (package
5992 (name "python-mistune")
5993 (version "0.8.4")
5994 (source
5995 (origin
5996 (method url-fetch)
5997 (uri (pypi-uri "mistune" version))
5998 (sha256
5999 (base32
6000 "0vkmsh0x480rni51lhyvigfdf06b9247z868pk3bal1wnnfl58sr"))))
6001 (build-system python-build-system)
6002 (native-inputs
6003 `(("python-nose" ,python-nose)
6004 ("python-cython" ,python-cython)))
6005 (home-page "https://github.com/lepture/mistune")
6006 (synopsis "Markdown parser in pure Python")
6007 (description "This package provides a fast markdown parser in pure
6008 Python.")
6009 (license license:bsd-3)))
6010
6011 (define-public python2-mistune
6012 (package-with-python2 python-mistune))
6013
6014 (define-public python-markdown
6015 (package
6016 (name "python-markdown")
6017 (version "3.0.1")
6018 (source
6019 (origin
6020 (method url-fetch)
6021 (uri (pypi-uri "Markdown" version))
6022 (sha256
6023 (base32
6024 "0z6v8649sr434d5r5zmrhydka7v7f9yas4bwcgkcs0650jdhybnh"))))
6025 (build-system python-build-system)
6026 (native-inputs
6027 `(("python-nose" ,python-nose)
6028 ("python-pyyaml" ,python-pyyaml)))
6029 (home-page "https://python-markdown.github.io/")
6030 (synopsis "Python implementation of Markdown")
6031 (description
6032 "This package provides a Python implementation of John Gruber's
6033 Markdown. The library features international input, various Markdown
6034 extensions, and several HTML output formats. A command line wrapper
6035 markdown_py is also provided to convert Markdown files to HTML.")
6036 (license license:bsd-3)))
6037
6038 (define-public python2-markdown
6039 (package-with-python2 python-markdown))
6040
6041 (define-public python-ptyprocess
6042 (package
6043 (name "python-ptyprocess")
6044 (version "0.5.2")
6045 (source
6046 (origin
6047 (method url-fetch)
6048 (uri (pypi-uri "ptyprocess" version))
6049 (sha256
6050 (base32
6051 "0ra31k10v3629xq0kdn8lwmfbi97anmk48r03yvh7mks0kq96hg6"))))
6052 (build-system python-build-system)
6053 (native-inputs
6054 `(("python-nose" ,python-nose)))
6055 (arguments
6056 `(#:phases
6057 (modify-phases %standard-phases
6058 (replace 'check
6059 (lambda _
6060 (zero? (system* "nosetests")))))))
6061 (home-page "https://github.com/pexpect/ptyprocess")
6062 (synopsis "Run a subprocess in a pseudo terminal")
6063 (description
6064 "This package provides a Python library used to launch a subprocess in a
6065 pseudo terminal (pty), and interact with both the process and its pty.")
6066 (license license:isc)))
6067
6068 (define-public python2-ptyprocess
6069 (package-with-python2 python-ptyprocess))
6070
6071 (define-public python-cram
6072 (package
6073 (name "python-cram")
6074 (version "0.7")
6075 (home-page "https://bitheap.org/cram/")
6076 (source (origin
6077 (method url-fetch)
6078 (uri (list (string-append home-page "cram-"
6079 version ".tar.gz")
6080 (pypi-uri "cram" version)))
6081 (sha256
6082 (base32
6083 "0bvz6fwdi55rkrz3f50zsy35gvvwhlppki2yml5bj5ffy9d499vx"))))
6084 (arguments
6085 '(#:phases
6086 (modify-phases %standard-phases
6087 (add-after 'unpack 'patch-source
6088 (lambda _
6089 (substitute* (find-files "cram" ".*\\.py$")
6090 ;; Replace default shell path.
6091 (("/bin/sh") (which "sh")))
6092 (substitute* (find-files "tests" ".*\\.t$")
6093 (("md5") "md5sum")
6094 (("/bin/bash") (which "bash"))
6095 (("/bin/sh") (which "sh")))
6096 (substitute* "cram/_test.py"
6097 ;; This hack works around a bug triggered by substituting
6098 ;; the /bin/sh paths. "tests/usage.t" compares the output of
6099 ;; "cram -h", which breaks the output at 80 characters. This
6100 ;; causes the line showing the default shell to break into two
6101 ;; lines, but the test expects a single line...
6102 (("env\\['COLUMNS'\\] = '80'")
6103 "env['COLUMNS'] = '160'"))
6104 #t))
6105 (delete 'check)
6106 (add-after 'install 'check
6107 ;; The test phase uses the built library and executable.
6108 ;; It's easier to run it after install since the build
6109 ;; directory contains version-specific PATH.
6110 (lambda* (#:key inputs outputs #:allow-other-keys)
6111 (add-installed-pythonpath inputs outputs)
6112 (setenv "PATH" (string-append (getenv "PATH") ":"
6113 (assoc-ref outputs "out") "/bin"))
6114 (zero? (system* "make" "test")))))))
6115 (build-system python-build-system)
6116 (native-inputs
6117 `(("python-coverage" ,python-coverage)
6118 ("which" ,which)))
6119 (synopsis "Simple testing framework for command line applications")
6120 (description
6121 "Cram is a functional testing framework for command line applications.
6122 Cram tests look like snippets of interactive shell sessions. Cram runs each
6123 command and compares the command output in the test with the command’s actual
6124 output.")
6125 (license license:gpl2+)))
6126
6127 (define-public python2-cram
6128 (package-with-python2 python-cram))
6129
6130 (define-public python-straight-plugin
6131 (package
6132 (name "python-straight-plugin")
6133 (version "1.4.1")
6134 (source
6135 (origin
6136 (method url-fetch)
6137 (uri (pypi-uri "straight.plugin" version))
6138 (sha256
6139 (base32
6140 "069pjll4383p4kkgvcc40hgyvf79j2wdbpgwz77yigzxksh1gj62"))))
6141 (build-system python-build-system)
6142 (home-page "https://github.com/ironfroggy/straight.plugin")
6143 (synopsis "Simple namespaced plugin facility")
6144 (description "Straight Plugin provides a type of plugin you can create from
6145 almost any existing Python modules, and an easy way for outside developers to
6146 add functionality and customization to your projects with their own plugins.")
6147 (license license:expat)))
6148
6149 (define-public python2-straight-plugin
6150 (package-with-python2 python-straight-plugin))
6151
6152 (define-public python-fonttools
6153 (package
6154 (name "python-fonttools")
6155 (version "3.15.1")
6156 (source (origin
6157 (method url-fetch)
6158 (uri (pypi-uri "fonttools" version ".zip"))
6159 (sha256
6160 (base32
6161 "1hhj97izwliy0vybmza72d90l5d4mcn50y8akq7kyccfl82vdx4d"))))
6162 (build-system python-build-system)
6163 (arguments
6164 '(#:test-target "check"
6165 #:phases
6166 (modify-phases %standard-phases
6167 (add-after 'unpack 'patch-setuppy
6168 ;; Remove the undocumented "extra_path" argument, which adds an
6169 ;; intervening directories between site-packages and the package
6170 ;; directory.
6171 (lambda _
6172 (substitute* "setup.py"
6173 (("^[ \t]*extra_path *= *'FontTools',") ""))
6174 #t)))))
6175 (native-inputs
6176 `(("unzip" ,unzip)))
6177 (home-page "https://github.com/behdad/fonttools")
6178 (synopsis "Tools to manipulate font files")
6179 (description
6180 "FontTools/TTX is a library to manipulate font files from Python. It
6181 supports reading and writing of TrueType/OpenType fonts, reading and writing
6182 of AFM files, reading (and partially writing) of PS Type 1 fonts. The package
6183 also contains a tool called “TTX” which converts TrueType/OpenType fonts to and
6184 from an XML-based format.")
6185 (license (license:non-copyleft
6186 "file://LICENSE.txt"
6187 "See LICENSE.txt in the distribution."))))
6188
6189 (define-public python2-fonttools
6190 (package-with-python2 python-fonttools))
6191
6192 (define-public python-ly
6193 (package
6194 (name "python-ly")
6195 (version "0.9.5")
6196 (source
6197 (origin
6198 (method url-fetch)
6199 (uri (pypi-uri name version))
6200 (sha256
6201 (base32
6202 "0x98dv7p8mg26p4816yy8hz4f34zf6hpnnfmr56msgh9jnsm2qfl"))))
6203 (build-system python-build-system)
6204 (arguments
6205 ;; FIXME: Some tests need network access.
6206 '(#:tests? #f))
6207 (synopsis "Tool and library for manipulating LilyPond files")
6208 (description "This package provides a Python library to parse, manipulate
6209 or create documents in LilyPond format. A command line program ly is also
6210 provided that can be used to do various manipulations with LilyPond files.")
6211 (home-page "https://pypi.python.org/pypi/python-ly")
6212 (license license:gpl2+)))
6213
6214 (define-public python-appdirs
6215 (package
6216 (name "python-appdirs")
6217 (version "1.4.3")
6218 (source
6219 (origin
6220 (method url-fetch)
6221 (uri (pypi-uri "appdirs" version))
6222 (sha256
6223 (base32
6224 "14id6wxi12lgyw0mg3bcfnf888ad07jz9yj46gfzhn186z8rcn4y"))))
6225 (build-system python-build-system)
6226 (home-page "https://github.com/ActiveState/appdirs")
6227 (synopsis
6228 "Determine platform-specific dirs, e.g. a \"user data dir\"")
6229 (description
6230 "This module provides a portable way of finding out where user data
6231 should be stored on various operating systems.")
6232 (license license:expat)))
6233
6234 (define-public python2-appdirs
6235 (package-with-python2 python-appdirs))
6236
6237 (define-public python-llfuse
6238 (package
6239 (name "python-llfuse")
6240 (version "1.3.3")
6241 (source (origin
6242 (method url-fetch)
6243 (uri (pypi-uri "llfuse" version ".tar.bz2"))
6244 (sha256
6245 (base32
6246 "1rqww632y2zz71xmr6ch7yq80kvza9mhqr2z773k0d8l1lwzl575"))))
6247 (build-system python-build-system)
6248 (inputs
6249 `(("fuse" ,fuse)
6250 ("attr" ,attr)))
6251 (native-inputs
6252 `(("pkg-config" ,pkg-config)))
6253 (synopsis "Python bindings for FUSE")
6254 (description
6255 "Python-LLFUSE is a set of Python bindings for the low level FUSE API.")
6256 (home-page "https://bitbucket.org/nikratio/python-llfuse/")
6257 (license license:lgpl2.0+)
6258 (properties `((python2-variant . ,(delay python2-llfuse))))))
6259
6260 (define-public python2-llfuse
6261 (package (inherit (package-with-python2
6262 (strip-python2-variant python-llfuse)))
6263 (propagated-inputs `(("python2-contextlib2" ,python2-contextlib2)))))
6264
6265 ;; For attic-0.16
6266 (define-public python-llfuse-0.41
6267 (package (inherit python-llfuse)
6268 (version "0.41.1")
6269 (source (origin
6270 (method url-fetch)
6271 (uri (string-append
6272 "https://bitbucket.org/nikratio/python-llfuse/downloads/"
6273 "llfuse-" version ".tar.bz2"))
6274 (sha256
6275 (base32
6276 "1imlqw9b73086y97izr036f58pgc5akv4ihc2rrf8j5h75jbrlaa"))))
6277 ;; Python-LLFUSE < 0.42 includes underscore.js, which is MIT (expat)
6278 ;; licensed. The rest of the package is licensed under LGPL2.0 or later.
6279 (license (list license:expat license:lgpl2.0+))))
6280
6281 (define-public python-msgpack
6282 (package
6283 (name "python-msgpack")
6284 (version "0.5.6")
6285 (source (origin
6286 (method url-fetch)
6287 (uri (pypi-uri "msgpack" version))
6288 (sha256
6289 (base32
6290 "1hz2dba1nvvn52afg34liijsm7kn65cmn06dl0xbwld6bb4cis0f"))))
6291 (build-system python-build-system)
6292 (arguments
6293 `(#:modules ((guix build utils)
6294 (guix build python-build-system)
6295 (ice-9 ftw)
6296 (srfi srfi-1)
6297 (srfi srfi-26))
6298 #:phases
6299 (modify-phases %standard-phases
6300 (replace 'check
6301 (lambda _
6302 (let ((cwd (getcwd)))
6303 (setenv "PYTHONPATH"
6304 (string-append cwd "/build/"
6305 (find (cut string-prefix? "lib" <>)
6306 (scandir (string-append cwd "/build")))
6307 ":"
6308 (getenv "PYTHONPATH")))
6309 (invoke "pytest" "-v" "test")))))))
6310 (native-inputs
6311 `(("python-pytest" ,python-pytest)))
6312 (synopsis "MessagePack (de)serializer")
6313 (description "MessagePack is a fast, compact binary serialization format,
6314 suitable for similar data to JSON. This package provides CPython bindings for
6315 reading and writing MessagePack data.")
6316 (home-page "https://pypi.python.org/pypi/msgpack/")
6317 (license license:asl2.0)))
6318
6319 ;; This msgpack library's name changed from "python-msgpack" to "msgpack" with
6320 ;; release 0.5. Some packages like borg still call it by the old name for now.
6321 ;; <https://bugs.gnu.org/30662>
6322 (define-public python-msgpack-transitional
6323 (package
6324 (inherit python-msgpack)
6325 (name "python-msgpack-transitional")
6326 (arguments
6327 (substitute-keyword-arguments (package-arguments python-msgpack)
6328 ((#:phases phases)
6329 `(modify-phases ,phases
6330 (add-after 'unpack 'configure-transitional
6331 (lambda _
6332 ;; Keep using the old name.
6333 (substitute* "setup.py"
6334 (("TRANSITIONAL = False")
6335 "TRANSITIONAL = 1"))
6336 #t))))))))
6337
6338 (define-public python2-msgpack
6339 (package-with-python2 python-msgpack))
6340
6341 (define-public python-netaddr
6342 (package
6343 (name "python-netaddr")
6344 (version "0.7.19")
6345 (source
6346 (origin
6347 (method url-fetch)
6348 (uri (pypi-uri "netaddr" version))
6349 (sha256
6350 (base32
6351 "1zdfadvpq4lmcqzr383gywxn4xyn355kj1n3lk9q2l03vmyfrbiq"))))
6352 (build-system python-build-system)
6353 (arguments `(#:tests? #f)) ;; No tests.
6354 (home-page "https://github.com/drkjam/netaddr/")
6355 (synopsis "Pythonic manipulation of network addresses")
6356 (description
6357 "A Python library for representing and manipulating IPv4, IPv6, CIDR, EUI
6358 and MAC network addresses.")
6359 (license license:bsd-3)))
6360
6361 (define-public python2-netaddr
6362 (package-with-python2 python-netaddr))
6363
6364 (define-public python-wrapt
6365 (package
6366 (name "python-wrapt")
6367 (version "1.10.11")
6368 (source
6369 (origin
6370 (method url-fetch)
6371 (uri (pypi-uri "wrapt" version))
6372 (sha256
6373 (base32
6374 "1ip3dwib39xhp79kblskgvz3fjzcwxgx3fs3ahdixhpjg7a61mfl"))))
6375 (build-system python-build-system)
6376 (arguments
6377 ;; Tests are not included in the tarball, they are only available in the
6378 ;; git repository.
6379 `(#:tests? #f))
6380 (home-page "https://github.com/GrahamDumpleton/wrapt")
6381 (synopsis "Module for decorators, wrappers and monkey patching")
6382 (description
6383 "The aim of the wrapt module is to provide a transparent object proxy for
6384 Python, which can be used as the basis for the construction of function
6385 wrappers and decorator functions.")
6386 (license license:bsd-2)))
6387
6388 (define-public python2-wrapt
6389 (package-with-python2 python-wrapt))
6390
6391 (define-public python-xlrd
6392 (package
6393 (name "python-xlrd")
6394 (version "1.0.0")
6395 (source (origin
6396 (method url-fetch)
6397 (uri (pypi-uri "xlrd" version))
6398 (sha256
6399 (base32
6400 "0s8hjiz01vbhy85xalrz0qlsmd9ypf36zjqrf97hh984spapvy0g"))))
6401 (build-system python-build-system)
6402 (arguments
6403 `(#:phases
6404 (modify-phases %standard-phases
6405 ;; Current test in setup.py does not work as of 1.0.0, so use nose to
6406 ;; run tests instead for now.
6407 (replace 'check (lambda _ (zero? (system* "nosetests")))))))
6408 (native-inputs `(("python-nose" ,python-nose)))
6409 (home-page "http://www.python-excel.org/")
6410 (synopsis "Library for extracting data from Excel files")
6411 (description "This packages provides a library to extract data from
6412 spreadsheets using Microsoft Excel proprietary file formats @samp{.xls} and
6413 @samp{.xlsx} (versions 2.0 onwards). It has support for Excel dates and is
6414 Unicode-aware. It is not intended as an end-user tool.")
6415 (license license:bsd-3)))
6416
6417 (define-public python2-xlrd
6418 (package-with-python2 python-xlrd))
6419
6420 (define-public python-prettytable
6421 (package
6422 (name "python-prettytable")
6423 (version "0.7.2")
6424 (source
6425 (origin
6426 (method url-fetch)
6427 (uri (string-append
6428 "https://pypi.python.org/packages/source/P/PrettyTable/"
6429 "prettytable-" version ".tar.bz2"))
6430 (sha256
6431 (base32
6432 "0diwsicwmiq2cpzpxri7cyl5fmsvicafw6nfqf6p6p322dji2g45"))))
6433 (build-system python-build-system)
6434 (home-page "http://code.google.com/p/prettytable/")
6435 (synopsis "Display tabular data in an ASCII table format")
6436 (description
6437 "A library designed to represent tabular data in visually appealing ASCII
6438 tables. PrettyTable allows for selection of which columns are to be printed,
6439 independent alignment of columns (left or right justified or centred) and
6440 printing of sub-tables by specifying a row range.")
6441 (license license:bsd-3)))
6442
6443 (define-public python2-prettytable
6444 (package-with-python2 python-prettytable))
6445
6446 (define-public python-tables
6447 (package
6448 (name "python-tables")
6449 (version "3.4.4")
6450 (source
6451 (origin
6452 (method url-fetch)
6453 (uri (pypi-uri "tables" version))
6454 (sha256
6455 (base32
6456 "0affz7k8babh8wdmsgrz5jxrd569by2w8ffimcxs9wiaf5rw1idx"))
6457 (modules '((guix build utils)))
6458 (snippet
6459 '(begin
6460 ;; Remove pre-compiled .pyc files from source.
6461 (for-each delete-file-recursively
6462 (find-files "." "__pycache__" #:directories? #t))
6463 (for-each delete-file (find-files "." "\\.pyc$"))
6464 #t))))
6465 (build-system python-build-system)
6466 (arguments
6467 `(;; FIXME: python-build-system does not pass configure-flags to "build"
6468 ;; or "check", so we must override the build and check phases.
6469 #:phases
6470 (modify-phases %standard-phases
6471 (add-after 'unpack 'use-gcc
6472 (lambda _
6473 (substitute* "setup.py"
6474 (("compiler = new_compiler\\(\\)" line)
6475 (string-append line
6476 "\ncompiler.set_executables(compiler='gcc',"
6477 "compiler_so='gcc',"
6478 "linker_exe='gcc',"
6479 "linker_so='gcc -shared')")))
6480 #t))
6481 (replace 'build
6482 (lambda* (#:key inputs #:allow-other-keys)
6483 (zero? (system* "python" "setup.py" "build"
6484 (string-append "--hdf5="
6485 (assoc-ref inputs "hdf5"))))))
6486 (replace 'check
6487 (lambda* (#:key inputs #:allow-other-keys)
6488 (zero? (system* "python" "setup.py" "check"
6489 (string-append "--hdf5="
6490 (assoc-ref inputs "hdf5")))))))))
6491 (propagated-inputs
6492 `(("python-numexpr" ,python-numexpr)
6493 ("python-numpy" ,python-numpy)))
6494 (native-inputs
6495 `(("python-cython" ,python-cython)
6496 ("pkg-config" ,pkg-config)))
6497 (inputs
6498 `(("hdf5" ,hdf5)
6499 ("bzip2" ,bzip2)
6500 ("zlib" ,zlib)))
6501 (home-page "http://www.pytables.org/")
6502 (synopsis "Hierarchical datasets for Python")
6503 (description "PyTables is a package for managing hierarchical datasets and
6504 designed to efficiently cope with extremely large amounts of data.")
6505 (license license:bsd-3)))
6506
6507 (define-public python2-tables
6508 (package-with-python2 python-tables))
6509
6510 (define-public python-pyasn1
6511 (package
6512 (name "python-pyasn1")
6513 (version "0.4.3")
6514 (source
6515 (origin
6516 (method url-fetch)
6517 (uri (pypi-uri "pyasn1" version))
6518 (sha256
6519 (base32
6520 "1z5h38anjzzrxpraa9iq9llffyx2zs8gx0q6dc1g029miwnn50gv"))))
6521 (build-system python-build-system)
6522 (home-page "http://pyasn1.sourceforge.net/")
6523 (synopsis "ASN.1 types and codecs")
6524 (description
6525 "This is an implementation of ASN.1 types and codecs in Python. It is
6526 suitable for a wide range of protocols based on the ASN.1 specification.")
6527 (license license:bsd-2)))
6528
6529 (define-public python2-pyasn1
6530 (package-with-python2 python-pyasn1))
6531
6532 (define-public python-pyasn1-modules
6533 (package
6534 (name "python-pyasn1-modules")
6535 (version "0.2.2")
6536 (source
6537 (origin
6538 (method url-fetch)
6539 (uri (pypi-uri "pyasn1-modules" version))
6540 (sha256
6541 (base32
6542 "0ivm850yi7ajjbi8j115qpsj95bgxdsx48nbjzg0zip788c3xkx0"))))
6543 (build-system python-build-system)
6544 (propagated-inputs
6545 `(("python-pyasn1" ,python-pyasn1)))
6546 (home-page "https://sourceforge.net/projects/pyasn1/")
6547 (synopsis "ASN.1 codec implementations")
6548 (description
6549 "Pyasn1-modules is a collection of Python modules providing ASN.1 types and
6550 implementations of ASN.1-based codecs and protocols.")
6551 (license license:bsd-3)))
6552
6553 (define-public python2-pyasn1-modules
6554 (package-with-python2 python-pyasn1-modules))
6555
6556 (define-public python-ipaddress
6557 (package
6558 (name "python-ipaddress")
6559 (version "1.0.19")
6560 (source (origin
6561 (method url-fetch)
6562 (uri (pypi-uri "ipaddress" version))
6563 (sha256
6564 (base32
6565 "10agaa1cys1bk1ycpl2w8lky9vjx8h1xh1z29mg0niqx0638c390"))))
6566 (build-system python-build-system)
6567 (home-page "https://github.com/phihag/ipaddress")
6568 (synopsis "IP address manipulation library")
6569 (description
6570 "This package provides a fast, lightweight IPv4/IPv6 manipulation library
6571 in Python. This library is used to create, poke at, and manipulate IPv4 and
6572 IPv6 addresses and networks. This is a port of the Python 3.3 ipaddress
6573 module to older versions of Python.")
6574 (license license:psfl)))
6575
6576 (define-public python2-ipaddress
6577 (package-with-python2 python-ipaddress))
6578
6579 (define-public python2-ipaddr
6580 (package
6581 (name "python2-ipaddr")
6582 (version "2.1.11")
6583 (source
6584 (origin
6585 (method url-fetch)
6586 (uri (pypi-uri "ipaddr" version))
6587 (sha256
6588 (base32 "1dwq3ngsapjc93fw61rp17fvzggmab5x1drjzvd4y4q0i255nm8v"))))
6589 (build-system python-build-system)
6590 (arguments
6591 `(#:python ,python-2 ;version 2 only
6592 #:phases
6593 (modify-phases %standard-phases
6594 (replace 'check
6595 (lambda* _
6596 (zero? (system* "python" "ipaddr_test.py")))))))
6597 (home-page "https://github.com/google/ipaddr-py")
6598 (synopsis "IP address manipulation library")
6599 (description
6600 "Ipaddr is a Python@tie{}2 library for creating and manupilating IPv4 and
6601 IPv6 addresses and networks.
6602
6603 For new implementations you may prefer to use the standard module
6604 @code{ipaddress}, which was introduced in Python 3.3 and backported to older
6605 versions of Python.")
6606 (license license:asl2.0)))
6607
6608 (define-public python-idna
6609 (package
6610 (name "python-idna")
6611 (version "2.6")
6612 (source
6613 (origin
6614 (method url-fetch)
6615 (uri (pypi-uri "idna" version))
6616 (sha256
6617 (base32
6618 "13qaab6d0s15gknz8v3zbcfmbj6v86hn9pjxgkdf62ch13imssic"))))
6619 (build-system python-build-system)
6620 (home-page "https://github.com/kjd/idna")
6621 (synopsis "Internationalized domain names in applications")
6622 (description
6623 "This is a library to support the Internationalised Domain Names in
6624 Applications (IDNA) protocol as specified in RFC 5891. This version of the
6625 protocol is often referred to as “IDNA2008” and can produce different results
6626 from the earlier standard from 2003. The library is also intended to act as a
6627 suitable drop-in replacement for the “encodings.idna” module that comes with
6628 the Python standard library but currently only supports the older 2003
6629 specification.")
6630 (license license:bsd-4)))
6631
6632 (define-public python2-idna
6633 (package-with-python2 python-idna))
6634
6635 (define-public python-idna-ssl
6636 (package
6637 (name "python-idna-ssl")
6638 (version "1.0.1")
6639 (source
6640 (origin
6641 (method url-fetch)
6642 (uri (pypi-uri "idna-ssl" version))
6643 (sha256
6644 (base32
6645 "0ydrc8hpg9mdr5hqq1lqfsfbn6sjq69slwpfrnlrm3k0phqg14qj"))))
6646 (build-system python-build-system)
6647 (arguments
6648 `(#:tests? #f)) ;circular dependency with python-aiohttp
6649 (home-page "https://github.com/aio-libs/idna-ssl")
6650 (synopsis "Patch @code{ssl.match_hostname} for Unicode(idna) domains support")
6651 (description "Patch @code{ssl.match_hostname} for Unicode(idna)
6652 domains support.")
6653 (license license:expat)))
6654
6655 (define-public python-pretend
6656 (package
6657 (name "python-pretend")
6658 (version "1.0.9")
6659 (source
6660 (origin
6661 (method url-fetch)
6662 (uri (string-append "https://pypi.python.org/packages/source/p/"
6663 "pretend/pretend-" version ".tar.gz"))
6664 (sha256
6665 (base32
6666 "040vm94lcbscg5p81g1icmwwwa2jm7wrd1ybmxnv1sz8rl8bh3n9"))))
6667 (build-system python-build-system)
6668 (home-page "https://github.com/alex/pretend")
6669 (synopsis "Library for stubbing in Python")
6670 (description
6671 "Pretend is a library to make stubbing with Python easier. Stubbing is a
6672 technique for writing tests. You may hear the term mixed up with mocks,
6673 fakes, or doubles. Basically, a stub is an object that returns pre-canned
6674 responses, rather than doing any computation.")
6675 (license license:bsd-3)))
6676
6677 (define-public python2-pretend
6678 (package-with-python2 python-pretend))
6679
6680 (define-public python-pip
6681 (package
6682 (name "python-pip")
6683 (version "9.0.1")
6684 (source
6685 (origin
6686 (method url-fetch)
6687 (uri (pypi-uri "pip" version))
6688 (sha256
6689 (base32
6690 "03clr9c1dih5n9c00c592zzvf6r1ffimywkaq9agcqdllzhl7wh9"))))
6691 (build-system python-build-system)
6692 (arguments
6693 '(#:tests? #f)) ; there are no tests in the pypi archive.
6694 (home-page "https://pip.pypa.io/")
6695 (synopsis "Package manager for Python software")
6696 (description
6697 "Pip is a package manager for Python software, that finds packages on the
6698 Python Package Index (PyPI).")
6699 (license license:expat)))
6700
6701 (define-public python2-pip
6702 (package-with-python2 python-pip))
6703
6704 (define-public python-tlsh
6705 (package
6706 (name "python-tlsh")
6707 (version "3.4.5")
6708 (home-page "https://github.com/trendmicro/tlsh")
6709 (source (origin
6710 (method url-fetch)
6711 (uri (string-append "https://github.com/trendmicro/tlsh/archive/v"
6712 version ".tar.gz"))
6713 (sha256
6714 (base32
6715 "1x1vahd4zg5kpyr9h9hs3fvh460p25rjy4cclwdnbbw8x3vc30q3"))
6716 (file-name (string-append name "-" version ".tar.gz"))))
6717 (build-system cmake-build-system)
6718 (arguments
6719 '(#:out-of-source? #f
6720 #:phases (modify-phases %standard-phases
6721 (replace
6722 'install
6723 (lambda* (#:key outputs #:allow-other-keys)
6724 ;; Build and install the Python bindings. The underlying
6725 ;; C++ library is apparently not meant to be installed.
6726 (let ((out (assoc-ref outputs "out")))
6727 (with-directory-excursion "py_ext"
6728 (and (system* "python" "setup.py" "build")
6729 (system* "python" "setup.py" "install"
6730 (string-append "--prefix=" out))))))))))
6731 (inputs `(("python" ,python-wrapper))) ;for the bindings
6732 (synopsis "Fuzzy matching library for Python")
6733 (description
6734 "Trend Micro Locality Sensitive Hash (TLSH) is a fuzzy matching library.
6735 Given a byte stream with a minimum length of 256 bytes, TLSH generates a hash
6736 value which can be used for similarity comparisons. Similar objects have
6737 similar hash values, which allows for the detection of similar objects by
6738 comparing their hash values. The byte stream should have a sufficient amount
6739 of complexity; for example, a byte stream of identical bytes will not generate
6740 a hash value.")
6741 (license license:asl2.0)))
6742
6743 (define-public python2-tlsh
6744 (package
6745 (inherit python-tlsh)
6746 (name "python2-tlsh")
6747 (inputs `(("python" ,python-2)))))
6748
6749 (define-public python-termcolor
6750 (package
6751 (name "python-termcolor")
6752 (version "1.1.0")
6753 (source
6754 (origin
6755 (method url-fetch)
6756 (uri (pypi-uri "termcolor" version))
6757 (sha256
6758 (base32
6759 "0fv1vq14rpqwgazxg4981904lfyp84mnammw7y046491cv76jv8x"))))
6760 (build-system python-build-system)
6761 (arguments
6762 ;; There are no tests.
6763 `(#:tests? #f))
6764 (home-page "https://pypi.python.org/pypi/termcolor")
6765 (synopsis "ANSII Color formatting for terminal output")
6766 (description
6767 "This package provides ANSII Color formatting for output in terminals.")
6768 (license license:expat)))
6769
6770 (define-public python2-termcolor
6771 (package-with-python2 python-termcolor))
6772
6773 (define-public python-libarchive-c
6774 (package
6775 (name "python-libarchive-c")
6776 (version "2.8")
6777 (source (origin
6778 (method url-fetch)
6779 (uri (pypi-uri "libarchive-c" version))
6780 (sha256
6781 (base32
6782 "0qg0v1s9c1xdk9philhnv8k6c6nicvnvfwlc0j9srg90jmdlvm06"))))
6783 (build-system python-build-system)
6784 (arguments
6785 '(#:phases (modify-phases %standard-phases
6786 (add-before
6787 'build 'reference-libarchive
6788 (lambda* (#:key inputs #:allow-other-keys)
6789 ;; Retain the absolute file name of libarchive.so.
6790 (let ((libarchive (assoc-ref inputs "libarchive")))
6791 (substitute* "libarchive/ffi.py"
6792 (("find_library\\('archive'\\)")
6793 (string-append "'" libarchive
6794 "/lib/libarchive.so'"))))))
6795 (replace 'check
6796 (lambda _ (invoke "pytest" "-vv"))))))
6797 (native-inputs
6798 `(("python-mock" ,python-mock)
6799 ("python-pytest" ,python-pytest)))
6800 (inputs
6801 `(("libarchive" ,libarchive)))
6802 (home-page "https://github.com/Changaco/python-libarchive-c")
6803 (synopsis "Python interface to libarchive")
6804 (description
6805 "This package provides Python bindings to libarchive, a C library to
6806 access possibly compressed archives in many different formats. It uses
6807 Python's @code{ctypes} foreign function interface (FFI).")
6808 (license license:lgpl2.0+)))
6809
6810 (define-public python2-libarchive-c
6811 (package-with-python2 python-libarchive-c))
6812
6813 (define-public python-file
6814 (package
6815 (inherit file)
6816 (name "python-file")
6817 (build-system python-build-system)
6818 (arguments
6819 '(#:tests? #f ;no tests
6820 #:configure-flags '("--single-version-externally-managed" "--root=/")
6821 #:phases (modify-phases %standard-phases
6822 (add-before 'build 'change-directory
6823 (lambda _
6824 (chdir "python")
6825 #t))
6826 (add-before 'build 'set-library-file-name
6827 (lambda* (#:key inputs #:allow-other-keys)
6828 (let ((file (assoc-ref inputs "file")))
6829 (substitute* "magic.py"
6830 (("find_library\\('magic'\\)")
6831 (string-append "'" file "/lib/libmagic.so'")))
6832 #t))))))
6833 (inputs `(("file" ,file)))
6834 (self-native-input? #f)
6835 (synopsis "Python bindings to the libmagic file type guesser. Note that
6836 this module and the python-magic module both provide a \"magic.py\" file;
6837 these two modules, which are different and were developed separately, both
6838 serve the same purpose: provide Python bindings for libmagic.")))
6839
6840 (define-public python2-file
6841 (package-with-python2 python-file))
6842
6843 (define-public python-debian
6844 (package
6845 (name "python-debian")
6846 (home-page "https://salsa.debian.org/python-debian-team/python-debian")
6847 (version "0.1.28")
6848 (source
6849 (origin
6850 (method url-fetch)
6851 (uri (pypi-uri name version))
6852 (sha256
6853 (base32
6854 "0i15f0xzx679sd0ldq2sls9pnnps9fv6vhqvnv9dzf4qhma42i0y"))))
6855 (build-system python-build-system)
6856 (propagated-inputs
6857 `(("python-six" ,python-six)))
6858 (synopsis "Debian package related modules")
6859 (description
6860 ;; XXX: Use @enumerate instead of @itemize to work around
6861 ;; <http://bugs.gnu.org/21772>.
6862 "This package provides Python modules that abstract many formats of
6863 Debian-related files, such as:
6864
6865 @enumerate
6866 @item Debtags information;
6867 @item @file{debian/changelog} files;
6868 @item packages files, pdiffs;
6869 @item control files of single or multiple RFC822-style paragraphs---e.g.
6870 @file{debian/control}, @file{.changes}, @file{.dsc};
6871 @item Raw @file{.deb} and @file{.ar} files, with (read-only) access to
6872 contained files and meta-information.
6873 @end enumerate\n")
6874
6875 ;; Modules are either GPLv2+ or GPLv3+.
6876 (license license:gpl3+)))
6877
6878 (define-public python2-debian
6879 (package-with-python2 python-debian))
6880
6881 (define-public python-nbformat
6882 (package
6883 (name "python-nbformat")
6884 (version "4.4.0")
6885 (source
6886 (origin
6887 (method url-fetch)
6888 (uri (pypi-uri "nbformat" version))
6889 (sha256
6890 (base32
6891 "00nlf08h8yc4q73nphfvfhxrcnilaqanb8z0mdy6nxk0vzq4wjgp"))))
6892 (build-system python-build-system)
6893 (arguments `(#:tests? #f)) ; no test target
6894 (propagated-inputs
6895 `(("python-ipython-genutils" ,python-ipython-genutils)
6896 ("python-jsonschema" ,python-jsonschema)
6897 ("python-jupyter-core" ,python-jupyter-core)
6898 ("python-traitlets" ,python-traitlets)))
6899 (home-page "http://jupyter.org")
6900 (synopsis "Jupyter Notebook format")
6901 (description "This package provides the reference implementation of the
6902 Jupyter Notebook format and Python APIs for working with notebooks.")
6903 (license license:bsd-3)))
6904
6905 (define-public python2-nbformat
6906 (package-with-python2 python-nbformat))
6907
6908 (define-public python-bleach
6909 (package
6910 (name "python-bleach")
6911 (version "1.4.3")
6912 (source
6913 (origin
6914 (method url-fetch)
6915 (uri (pypi-uri "bleach" version))
6916 (sha256
6917 (base32
6918 "0jvg3jxrvnx7xmm9gj262v60ib452xlnwlb0navyp7jsvcd0d4qj"))))
6919 (build-system python-build-system)
6920 (propagated-inputs
6921 `(("python-html5lib" ,python-html5lib-0.9)
6922 ("python-six" ,python-six)))
6923 (native-inputs
6924 `(("python-nose" ,python-nose)))
6925 (home-page "https://github.com/jsocol/bleach")
6926 (synopsis "Whitelist-based HTML-sanitizing tool")
6927 (description "Bleach is an easy whitelist-based HTML-sanitizing tool.")
6928 (license license:asl2.0)))
6929
6930 (define-public python2-bleach
6931 (package-with-python2 python-bleach))
6932
6933 (define-public python-entrypoints
6934 (package
6935 (name "python-entrypoints")
6936 (version "0.2.3")
6937 (source
6938 (origin
6939 (method url-fetch)
6940 (uri (string-append "https://github.com/takluyver/entrypoints/archive/"
6941 version ".tar.gz"))
6942 (file-name (string-append name "-" version ".tar.gz"))
6943 (sha256
6944 (base32
6945 "1pdvgfr5bxyvnfvxbsd3zi0dh3il71pc4k6rinx6zpps91b84a56"))))
6946 (build-system python-build-system)
6947 ;; The package does not come with a setup.py file, so we have to generate
6948 ;; one ourselves.
6949 (arguments
6950 `(#:tests? #f
6951 #:phases
6952 (modify-phases %standard-phases
6953 (add-after 'unpack 'create-setup.py
6954 (lambda _
6955 (call-with-output-file "setup.py"
6956 (lambda (port)
6957 (format port "\
6958 from setuptools import setup
6959 setup(name='entrypoints', version='~a', py_modules=['entrypoints'])
6960 " ,version))))))))
6961 (home-page "https://github.com/takluyver/entrypoints")
6962 (synopsis "Discover and load entry points from installed Python packages")
6963 (description "Entry points are a way for Python packages to advertise
6964 objects with some common interface. The most common examples are
6965 @code{console_scripts} entry points, which define shell commands by
6966 identifying a Python function to run. The @code{entrypoints} module contains
6967 functions to find and load entry points.")
6968 (license license:expat)))
6969
6970 (define-public python2-entrypoints
6971 (package-with-python2 python-entrypoints))
6972
6973 (define-public python-nbconvert
6974 (package
6975 (name "python-nbconvert")
6976 (version "5.0.0b1")
6977 (source
6978 (origin
6979 (method url-fetch)
6980 (uri (pypi-uri "nbconvert" version))
6981 (sha256
6982 (base32
6983 "0brclbb18l4nmd5qy3dl9wn05rjdh1fz4rmzdlfqacj12rcdvdgp"))))
6984 (build-system python-build-system)
6985 (arguments
6986 `(;; The "bdist_egg" target is disabled by default, causing the installation
6987 ;; to fail.
6988 #:configure-flags (list "bdist_egg")
6989 ;; FIXME: 5 failures, 40 errors.
6990 #:tests? #f))
6991 ;; #:phases
6992 ;; (modify-phases %standard-phases
6993 ;; (replace 'check
6994 ;; (lambda _
6995 ;; (zero? (system* "py.test" "-v")))))
6996 (native-inputs
6997 `(("python-pytest" ,python-pytest)))
6998 (propagated-inputs
6999 `(("python-bleach" ,python-bleach)
7000 ("python-entrypoints" ,python-entrypoints)
7001 ("python-jinja2" ,python-jinja2)
7002 ("python-jupyter-core" ,python-jupyter-core)
7003 ("python-mistune" ,python-mistune)
7004 ("python-nbformat" ,python-nbformat)
7005 ("python-pygments" ,python-pygments)
7006 ("python-traitlets" ,python-traitlets)))
7007 (home-page "http://jupyter.org")
7008 (synopsis "Converting Jupyter Notebooks")
7009 (description "The @code{nbconvert} tool, @{jupyter nbconvert}, converts
7010 notebooks to various other formats via Jinja templates. It allows you to
7011 convert an @code{.ipynb} notebook file into various static formats including:
7012
7013 @enumerate
7014 @item HTML
7015 @item LaTeX
7016 @item PDF
7017 @item Reveal JS
7018 @item Markdown (md)
7019 @item ReStructured Text (rst)
7020 @item executable script
7021 @end enumerate\n")
7022 (license license:bsd-3)))
7023
7024 (define-public python2-nbconvert
7025 (package-with-python2 python-nbconvert))
7026
7027 (define-public python-notebook
7028 (package
7029 (name "python-notebook")
7030 (version "4.2.3")
7031 (source (origin
7032 (method url-fetch)
7033 (uri (pypi-uri "notebook" version))
7034 (sha256
7035 (base32
7036 "0laq5c2f21frq6xcdckgq7raqhznbjb0qs0357g612z87wyn1a9r"))))
7037 (build-system python-build-system)
7038 (arguments
7039 `(#:phases
7040 (modify-phases %standard-phases
7041 (replace 'check
7042 (lambda _
7043 ;; HOME must be set for tests
7044 (setenv "HOME" "/tmp")
7045 (zero? (system* "nosetests")))))))
7046 (propagated-inputs
7047 `(("python-jupyter-core" ,python-jupyter-core)
7048 ("python-nbformat" ,python-nbformat)
7049 ("python-nbconvert" ,python-nbconvert)
7050 ("python-ipython" ,python-ipython)))
7051 (native-inputs
7052 `(("python-nose" ,python-nose)
7053 ("python-sphinx" ,python-sphinx)
7054 ("python-requests" ,python-requests)))
7055 (home-page "http://jupyter.org/")
7056 (synopsis "Web-based notebook environment for interactive computing")
7057 (description
7058 "The Jupyter HTML notebook is a web-based notebook environment for
7059 interactive computing.")
7060 (properties `((python2-variant . ,(delay python2-notebook))))
7061 (license license:bsd-3)))
7062
7063 (define-public python2-notebook
7064 (let ((base (package-with-python2
7065 (strip-python2-variant python-notebook))))
7066 (package (inherit base)
7067 (native-inputs
7068 `(("python2-mock" ,python2-mock)
7069 ,@(package-native-inputs base)))
7070 (arguments
7071 (substitute-keyword-arguments (package-arguments base)
7072 ((#:phases phases)
7073 `(modify-phases ,phases
7074 (add-before 'check 'disable-test-case
7075 ;; The test requires network access to localhost. Curiously it
7076 ;; fails with Python 2 only. Simply make the test-case return
7077 ;; immediately.
7078 (lambda _
7079 (substitute*
7080 "notebook/services/nbconvert/tests/test_nbconvert_api.py"
7081 (("formats = self.nbconvert_api") "return #")))))))))))
7082
7083 (define-public python-widgetsnbextension
7084 (package
7085 (name "python-widgetsnbextension")
7086 (version "1.2.6")
7087 (source
7088 (origin
7089 (method url-fetch)
7090 (uri (pypi-uri "widgetsnbextension" version))
7091 (sha256
7092 (base32
7093 "0lff2mrwrgsa1mxmwx3phl9xvy0jqfpg6khbmxy53jbq56rwy666"))))
7094 (build-system python-build-system)
7095 (propagated-inputs
7096 `(("python-notebook" ,python-notebook)))
7097 (native-inputs
7098 `(("python-certifi" ,python-certifi)
7099 ("python-nose" ,python-nose)))
7100 (home-page "https://ipython.org")
7101 (synopsis "IPython HTML widgets for Jupyter")
7102 (description "This package provides interactive HTML widgets for Jupyter
7103 notebooks.")
7104 (license license:bsd-3)))
7105
7106 (define-public python2-widgetsnbextension
7107 (package-with-python2 python-widgetsnbextension))
7108
7109 (define-public python-ipywidgets
7110 (package
7111 (name "python-ipywidgets")
7112 (version "5.2.2")
7113 (source
7114 (origin
7115 (method url-fetch)
7116 (uri (pypi-uri "ipywidgets" version))
7117 (sha256
7118 (base32
7119 "1lk0qrr5l9a0z7qkkn30hv5832whxwxymf1l576fmmad0n7hkxms"))))
7120 (build-system python-build-system)
7121 ;; FIXME: it's not clear how to run the tests.
7122 (arguments `(#:tests? #f))
7123 (propagated-inputs
7124 `(("python-ipykernel" ,python-ipykernel)
7125 ("python-ipython" ,python-ipython)
7126 ("python-traitlets" ,python-traitlets)
7127 ("python-widgetsnbextension" ,python-widgetsnbextension)))
7128 (home-page "https://ipython.org")
7129 (synopsis "IPython HTML widgets for Jupyter")
7130 (description "Ipywidgets are interactive HTML widgets for Jupyter
7131 notebooks and the IPython kernel. Notebooks come alive when interactive
7132 widgets are used. Users gain control of their data and can visualize changes
7133 in the data.")
7134 (license license:bsd-3)))
7135
7136 (define-public python2-ipywidgets
7137 (package-with-python2 python-ipywidgets))
7138
7139 (define-public python-jupyter-console
7140 (package
7141 (name "python-jupyter-console")
7142 (version "5.2.0")
7143 (source
7144 (origin
7145 (method url-fetch)
7146 (uri (pypi-uri "jupyter_console" version))
7147 (sha256
7148 (base32
7149 "1kam1qzgwr7srhm5r6aj90di5sws4bq0jmiw15452ddamb9yspal"))))
7150 (build-system python-build-system)
7151 ;; FIXME: it's not clear how to run the tests.
7152 (arguments `(#:tests? #f))
7153 (propagated-inputs
7154 `(("python-ipykernel" ,python-ipykernel)
7155 ("python-ipython" ,python-ipython)
7156 ("python-jupyter-client" ,python-jupyter-client)
7157 ("python-prompt-toolkit" ,python-prompt-toolkit)
7158 ("python-pygments" ,python-pygments)))
7159 (home-page "https://jupyter.org")
7160 (synopsis "Jupyter terminal console")
7161 (description "This package provides a terminal-based console frontend for
7162 Jupyter kernels. It also allows for console-based interaction with non-Python
7163 Jupyter kernels such as IJulia and IRKernel.")
7164 (license license:bsd-3)))
7165
7166 (define-public python2-jupyter-console
7167 (package-with-python2 python-jupyter-console))
7168
7169 ;; The python-ipython and python-jupyter-console require each other. To get
7170 ;; the functionality in both packages working, strip down the
7171 ;; python-jupyter-console package when using it as an input to python-ipython.
7172 (define python-jupyter-console-minimal
7173 (package
7174 (inherit python-jupyter-console)
7175 (name "python-jupyter-console-minimal")
7176 (arguments
7177 (substitute-keyword-arguments
7178 (package-arguments python-jupyter-console)
7179 ((#:phases phases)
7180 `(modify-phases ,phases
7181 (add-after 'install 'delete-bin
7182 (lambda* (#:key outputs #:allow-other-keys)
7183 ;; Delete the bin files, to avoid conflicts in profiles
7184 ;; where python-ipython and python-jupyter-console are
7185 ;; both present.
7186 (delete-file-recursively
7187 (string-append
7188 (assoc-ref outputs "out") "/bin"))))))))
7189 ;; Remove the python-ipython propagated input, to avoid the cycle
7190 (propagated-inputs
7191 (alist-delete
7192 "python-ipython"
7193 (package-propagated-inputs python-jupyter-console)))))
7194
7195 (define-public jupyter
7196 (package
7197 (name "jupyter")
7198 (version "1.0.0")
7199 (source
7200 (origin
7201 (method url-fetch)
7202 (uri (pypi-uri "jupyter" version))
7203 (sha256
7204 (base32
7205 "0pwf3pminkzyzgx5kcplvvbvwrrzd3baa7lmh96f647k30rlpp6r"))))
7206 (build-system python-build-system)
7207 ;; FIXME: it's not clear how to run the tests.
7208 (arguments `(#:tests? #f))
7209 (propagated-inputs
7210 `(("python-ipykernel" ,python-ipykernel)
7211 ("python-ipywidgets" ,python-ipywidgets)
7212 ("python-jupyter-console" ,python-jupyter-console)
7213 ("python-nbconvert" ,python-nbconvert)
7214 ("python-notebook" ,python-notebook)))
7215
7216 (native-search-paths
7217 (list (search-path-specification
7218 (variable "JUPYTER_PATH")
7219 (files '("share/jupyter")))))
7220
7221 (home-page "http://jupyter.org")
7222 (synopsis "Web application for interactive documents")
7223 (description
7224 "The Jupyter Notebook is a web application that allows you to create and
7225 share documents that contain live code, equations, visualizations and
7226 explanatory text. Uses include: data cleaning and transformation, numerical
7227 simulation, statistical modeling, machine learning and much more.")
7228 (license license:bsd-3)))
7229
7230 (define-public python-chardet
7231 (package
7232 (name "python-chardet")
7233 (version "3.0.4")
7234 (source
7235 (origin
7236 (method url-fetch)
7237 (uri (pypi-uri "chardet" version))
7238 (sha256
7239 (base32
7240 "1bpalpia6r5x1kknbk11p1fzph56fmmnp405ds8icksd3knr5aw4"))))
7241 (native-inputs
7242 `(("python-hypothesis" ,python-hypothesis)
7243 ("python-pytest" ,python-pytest)
7244 ("python-pytest-runner" ,python-pytest-runner)))
7245 (build-system python-build-system)
7246 (home-page "https://github.com/chardet/chardet")
7247 (synopsis "Universal encoding detector for Python 2 and 3")
7248 (description
7249 "This package provides @code{chardet}, a Python module that can
7250 automatically detect a wide range of file encodings.")
7251 (license license:lgpl2.1+)))
7252
7253 (define-public python2-chardet
7254 (package-with-python2 python-chardet))
7255
7256 (define-public python-docopt
7257 (package
7258 (name "python-docopt")
7259 (version "0.6.2")
7260 (source
7261 (origin
7262 (method url-fetch)
7263 ;; The release on PyPI does not include tests.
7264 (uri (string-append
7265 "https://github.com/docopt/docopt/archive/"
7266 version ".tar.gz"))
7267 (file-name (string-append name "-" version ".tar.gz"))
7268 (sha256
7269 (base32
7270 "16bf890xbdz3m30rsv2qacklh2rdn1zrfspfnwzx9g7vwz8yw4r1"))))
7271 (build-system python-build-system)
7272 (native-inputs
7273 `(("python-pytest" ,python-pytest)))
7274 (arguments
7275 `(#:phases
7276 (modify-phases %standard-phases
7277 (replace 'check
7278 (lambda _ (zero? (system* "py.test")))))))
7279 (home-page "http://docopt.org")
7280 (synopsis "Command-line interface description language for Python")
7281 (description "This library allows the user to define a command-line
7282 interface from a program's help message rather than specifying it
7283 programatically with command-line parsers like @code{getopt} and
7284 @code{argparse}.")
7285 (license license:expat)))
7286
7287 (define-public python2-docopt
7288 (package-with-python2 python-docopt))
7289
7290 (define-public python-pythondialog
7291 (package
7292 (name "python-pythondialog")
7293 (version "3.4.0")
7294 (source
7295 (origin
7296 (method url-fetch)
7297 (uri (pypi-uri "pythondialog" version))
7298 (sha256
7299 (base32
7300 "1728ghsran47jczn9bhlnkvk5bvqmmbihabgif5h705b84r1272c"))))
7301 (build-system python-build-system)
7302 (arguments
7303 `(#:phases
7304 (modify-phases %standard-phases
7305 (add-after 'unpack 'patch-path
7306 (lambda* (#:key inputs #:allow-other-keys)
7307 (let* ((dialog (assoc-ref inputs "dialog")))
7308 ;; Since this library really wants to grovel the search path, we
7309 ;; must hardcode dialog's store path into it.
7310 (substitute* "dialog.py"
7311 (("os.getenv\\(\"PATH\", \":/bin:/usr/bin\"\\)")
7312 (string-append "os.getenv(\"PATH\") + \":" dialog "/bin\"")))
7313 #t))))
7314 #:tests? #f)) ; no test suite
7315 (propagated-inputs
7316 `(("dialog" ,dialog)))
7317 (home-page "http://pythondialog.sourceforge.net/")
7318 (synopsis "Python interface to the UNIX dialog utility")
7319 (description "A Python wrapper for the dialog utility. Its purpose is to
7320 provide an easy to use, pythonic and comprehensive Python interface to dialog.
7321 This allows one to make simple text-mode user interfaces on Unix-like systems")
7322 (license license:lgpl2.1)
7323 (properties `((python2-variant . ,(delay python2-pythondialog))))))
7324
7325 (define-public python2-pythondialog
7326 (let ((base (package-with-python2 (strip-python2-variant python-pythondialog))))
7327 (package
7328 (inherit base)
7329 (version (package-version python-pythondialog))
7330 (source (origin
7331 (method url-fetch)
7332 (uri (pypi-uri "python2-pythondialog" version))
7333 (sha256
7334 (base32
7335 "0d8k7lxk50imdyx85lv8j98i4c93a71iwpapnl1506rpkbm9qvd9")))))))
7336
7337 (define-public python-configobj
7338 (package
7339 (name "python-configobj")
7340 (version "5.0.6")
7341 (source (origin
7342 (method url-fetch)
7343 (uri (string-append
7344 "https://pypi.python.org/packages/source/c/configobj/"
7345 "configobj-" version ".tar.gz"))
7346 (sha256
7347 (base32
7348 "00h9rcmws03xvdlfni11yb60bz3kxfvsj6dg6nrpzj71f03nbxd2"))
7349 ;; Patch setup.py so it looks for python-setuptools, which is
7350 ;; required to parse the keyword 'install_requires' in setup.py.
7351 (patches (search-patches "python-configobj-setuptools.patch"))))
7352 (build-system python-build-system)
7353 (propagated-inputs
7354 `(("python-six" ,python-six)))
7355 (synopsis "Config file reading, writing and validation")
7356 (description "ConfigObj is a simple but powerful config file reader and
7357 writer: an ini file round tripper. Its main feature is that it is very easy to
7358 use, with a straightforward programmer’s interface and a simple syntax for
7359 config files.")
7360 (home-page "https://github.com/DiffSK/configobj")
7361 (license license:bsd-3)))
7362
7363 (define-public python2-configobj
7364 (package-with-python2 python-configobj))
7365
7366 (define-public python-configargparse
7367 (package
7368 (name "python-configargparse")
7369 (version "0.12.0")
7370 (source (origin
7371 (method url-fetch)
7372 (uri (pypi-uri "ConfigArgParse" version))
7373 (sha256
7374 (base32
7375 "0fgkiqh6r3rbkdq3k8c48m85g52k96686rw3a6jg4lcncrkpvk98"))))
7376 (build-system python-build-system)
7377 (native-inputs
7378 `(("python-pyyaml" ,python-pyyaml)))
7379 (arguments
7380 `(#:phases
7381 (modify-phases %standard-phases
7382 (replace 'check
7383 (lambda _
7384 ;; Bypass setuptools-shim because one test relies on "setup.py"
7385 ;; being the first argument passed to the python call.
7386 ;;
7387 ;; NOTE: Many tests do not run because they rely on Python's
7388 ;; built-in test.test_argparse, but we remove the unit tests from
7389 ;; our Python installation.
7390 (zero? (system* "python" "setup.py" "test")))))))
7391 (synopsis "Replacement for argparse")
7392 (description "A drop-in replacement for argparse that allows options to also
7393 be set via config files and/or environment variables.")
7394 (home-page "https://github.com/bw2/ConfigArgParse")
7395 (license license:expat)))
7396
7397 (define-public python2-configargparse
7398 (package-with-python2 python-configargparse))
7399
7400 (define-public python-argparse-manpage
7401 (package
7402 (name "python-argparse-manpage")
7403 (version "1.1")
7404 (source
7405 (origin
7406 (method url-fetch)
7407 (uri (pypi-uri "argparse-manpage" version))
7408 (sha256
7409 (base32
7410 "0blh31zns68anina9lba5wh81d1414s97p60zw5l0d0shhh0wj5p"))))
7411 (build-system python-build-system)
7412 (home-page "https://github.com/praiskup/argparse-manpage")
7413 (synopsis "Build manual page from Python's ArgumentParser object")
7414 (description
7415 "This package provides tools to build manual pages from Python's
7416 @code{ArgumentParser} object.")
7417 (license license:asl2.0)))
7418
7419 (define-public python-contextlib2
7420 (package
7421 (name "python-contextlib2")
7422 (version "0.4.0")
7423 (source
7424 (origin
7425 (method url-fetch)
7426 (uri (pypi-uri "contextlib2" version))
7427 (sha256
7428 (base32
7429 "0cmp131dlh0d0zvw0aza1zd13glvngzk8lb4avks0hm7yxwdr9am"))))
7430 (build-system python-build-system)
7431 (arguments
7432 `(#:phases
7433 (modify-phases %standard-phases
7434 (replace 'check
7435 (lambda _ (zero?
7436 (system*
7437 "python" "test_contextlib2.py" "-v")))))))
7438 (home-page "http://contextlib2.readthedocs.org/")
7439 (synopsis "Tools for decorators and context managers")
7440 (description "This module is primarily a backport of the Python
7441 3.2 contextlib to earlier Python versions. Like contextlib, it
7442 provides utilities for common tasks involving decorators and context
7443 managers. It also contains additional features that are not part of
7444 the standard library.")
7445 (license license:psfl)))
7446
7447 (define-public python2-contextlib2
7448 (package-with-python2 python-contextlib2))
7449
7450 (define-public python-texttable
7451 (package
7452 (name "python-texttable")
7453 (version "0.8.7")
7454 (source
7455 (origin
7456 (method url-fetch)
7457 (uri (pypi-uri "texttable" version))
7458 (sha256
7459 (base32
7460 "1liiiydgkg37i46a418aw19fyf6z3ds51wdwwpyjbs12x0phhf4a"))))
7461 (build-system python-build-system)
7462 (arguments '(#:tests? #f)) ; no tests
7463 (home-page "https://github.com/foutaise/texttable/")
7464 (synopsis "Python module for creating simple ASCII tables")
7465 (description "Texttable is a Python module for creating simple ASCII
7466 tables.")
7467 (license license:lgpl2.1+)))
7468
7469 (define-public python2-texttable
7470 (package-with-python2 python-texttable))
7471
7472 (define-public python-atomicwrites
7473 (package
7474 (name "python-atomicwrites")
7475 (version "1.1.5")
7476 (source (origin
7477 (method url-fetch)
7478 (uri (pypi-uri "atomicwrites" version))
7479 (sha256
7480 (base32
7481 "11bm90fwm2avvf4f3ib8g925w7jr4m11vcsinn1bi6ns4bm32214"))))
7482 (build-system python-build-system)
7483 (synopsis "Atomic file writes in Python")
7484 (description "Library for atomic file writes using platform dependent tools
7485 for atomic file system operations.")
7486 (home-page "https://github.com/untitaker/python-atomicwrites")
7487 (license license:expat)))
7488
7489 (define-public python2-atomicwrites
7490 (package-with-python2 python-atomicwrites))
7491
7492 (define-public python-click-threading
7493 (package
7494 (name "python-click-threading")
7495 (version "0.4.4")
7496 (source (origin
7497 (method url-fetch)
7498 (uri (pypi-uri "click-threading" version))
7499 (sha256
7500 (base32
7501 "1rsxc2fbkxlhwhlmxsdjzq3spn284l6rvjfcz9mbb17ibgdgmc5j"))))
7502 (build-system python-build-system)
7503 (propagated-inputs
7504 `(("python-click" ,python-click)))
7505 (synopsis "Utilities for multithreading in Click")
7506 (description "This package provides utilities for multithreading in Click
7507 applications.")
7508 (home-page "https://github.com/click-contrib/click-threading")
7509 (license license:expat)))
7510
7511 (define-public python-click-log
7512 (package
7513 (name "python-click-log")
7514 (version "0.3.2")
7515 (source (origin
7516 (method url-fetch)
7517 (uri (pypi-uri "click-log" version))
7518 (sha256
7519 (base32
7520 "091i03bhxyzsdbc6kilxhivfda2f8ymz3b33xa6cj5kbzjiirz8n"))))
7521 (build-system python-build-system)
7522 (propagated-inputs
7523 `(("python-click" ,python-click)))
7524 (synopsis "Logging for click applications")
7525 (description "This package provides a Python library for logging Click
7526 applications.")
7527 (home-page "https://github.com/click-contrib/click-log")
7528 (license license:expat)))
7529
7530 (define-public python-apipkg
7531 (package
7532 (name "python-apipkg")
7533 (version "1.4")
7534 (source (origin
7535 (method url-fetch)
7536 (uri (pypi-uri "apipkg" version))
7537 (sha256
7538 (base32
7539 "1iks5701qnp3dlr3q1d9qm68y2plp2m029irhpz92a44psfkjf1f"))))
7540 (build-system python-build-system)
7541 (native-inputs
7542 `(("python-pytest" ,python-pytest)))
7543 (synopsis "Namespace control and lazy-import mechanism")
7544 (description "With apipkg you can control the exported namespace of a Python
7545 package and greatly reduce the number of imports for your users. It is a small
7546 pure Python module that works on virtually all Python versions.")
7547 (home-page "https://github.com/pytest-dev/apipkg")
7548 (license license:expat)))
7549
7550 (define-public python2-apipkg
7551 (package-with-python2 python-apipkg))
7552
7553 (define-public python-execnet
7554 (package
7555 (name "python-execnet")
7556 (version "1.4.1")
7557 (source (origin
7558 (method url-fetch)
7559 (uri (pypi-uri "execnet" version))
7560 (sha256
7561 (base32
7562 "1rpk1vyclhg911p3hql0m0nrpq7q7mysxnaaw6vs29cpa6kx8vgn"))))
7563 (build-system python-build-system)
7564 (arguments
7565 `(;; 2 failed, 275 passed, 670 skipped, 4 xfailed
7566 ;; The two test failures are caused by the lack of an `ssh` executable.
7567 ;; The test suite can be run with pytest after the 'install' phase.
7568 #:tests? #f))
7569 (native-inputs
7570 `(("python-pytest" ,python-pytest)
7571 ("python-setuptools-scm" ,python-setuptools-scm)))
7572 (propagated-inputs
7573 `(("python-apipkg" ,python-apipkg)))
7574 (synopsis "Rapid multi-Python deployment")
7575 (description "Execnet provides a share-nothing model with
7576 channel-send/receive communication for distributing execution across many
7577 Python interpreters across version, platform and network barriers. It has a
7578 minimal and fast API targeting the following uses:
7579 @enumerate
7580 @item distribute tasks to (many) local or remote CPUs
7581 @item write and deploy hybrid multi-process applications
7582 @item write scripts to administer multiple environments
7583 @end enumerate")
7584 (home-page "http://codespeak.net/execnet/")
7585 (license license:expat)))
7586
7587 (define-public python2-execnet
7588 (package-with-python2 python-execnet))
7589
7590 (define-public python-icalendar
7591 (package
7592 (name "python-icalendar")
7593 (version "4.0.2")
7594 (source (origin
7595 (method url-fetch)
7596 (uri (pypi-uri "icalendar" version))
7597 (sha256
7598 (base32
7599 "13003kw2vbas1ha146vv3x2rdg9k7w38rdzxj63vi1i67jgjldl0"))))
7600 (build-system python-build-system)
7601 (propagated-inputs
7602 `(("python-dateutil" ,python-dateutil)
7603 ("python-pytz" ,python-pytz)))
7604 (synopsis "Python library for parsing iCalendar files")
7605 (description "The icalendar package is a parser/generator of iCalendar
7606 files for use with Python.")
7607 (home-page "https://github.com/collective/icalendar")
7608 (license license:bsd-2)))
7609
7610 (define-public python-sphinxcontrib-newsfeed
7611 (package
7612 (name "python-sphinxcontrib-newsfeed")
7613 (version "0.1.4")
7614 (source (origin
7615 (method url-fetch)
7616 (uri (pypi-uri "sphinxcontrib-newsfeed" version))
7617 (sha256
7618 (base32
7619 "1d7gam3mn8v4in4p16yn3v10vps7nnaz6ilw99j4klij39dqd37p"))))
7620 (arguments '(#:tests? #f)) ; No tests.
7621 (build-system python-build-system)
7622 (propagated-inputs
7623 `(("python-sphinx" ,python-sphinx)))
7624 (synopsis "News Feed extension for Sphinx")
7625 (description "Sphinxcontrib-newsfeed is an extension for adding a simple
7626 Blog, News or Announcements section to a Sphinx website.")
7627 (home-page "https://bitbucket.org/prometheus/sphinxcontrib-newsfeed")
7628 (license license:bsd-2)))
7629
7630 (define-public python-args
7631 (package
7632 (name "python-args")
7633 (version "0.1.0")
7634 (source (origin
7635 (method url-fetch)
7636 (uri (pypi-uri "args" version))
7637 (sha256
7638 (base32
7639 "057qzi46h5dmxdqknsbrssn78lmqjlnm624iqdhrnpk26zcbi1d7"))))
7640 (build-system python-build-system)
7641 (home-page "https://github.com/kennethreitz/args")
7642 (synopsis "Command-line argument parser")
7643 (description
7644 "This library provides a Python module to parse command-line arguments.")
7645 (license license:bsd-3)))
7646
7647 (define-public python2-args
7648 (package-with-python2 python-args))
7649
7650 (define-public python-clint
7651 (package
7652 (name "python-clint")
7653 (version "0.5.1")
7654 (source (origin
7655 (method url-fetch)
7656 (uri (pypi-uri "clint" version))
7657 (sha256
7658 (base32
7659 "1an5lkkqk1zha47198p42ji3m94xmzx1a03dn7866m87n4r4q8h5"))))
7660 (build-system python-build-system)
7661 (arguments
7662 '(#:phases
7663 (modify-phases %standard-phases
7664 (replace 'check
7665 (lambda _
7666 (zero? (system* "py.test" "-v")))))))
7667 (native-inputs
7668 `(("python-pytest" ,python-pytest)))
7669 (propagated-inputs
7670 `(("python-args" ,python-args)))
7671 (home-page "https://github.com/kennethreitz/clint")
7672 (synopsis "Command-line interface tools")
7673 (description
7674 "Clint is a Python module filled with a set of tools for developing
7675 command-line applications, including tools for colored and indented
7676 output, progress bar display, and pipes.")
7677 (license license:isc)))
7678
7679 (define-public python2-clint
7680 (package-with-python2 python-clint))
7681
7682 (define-public python-astor
7683 (package
7684 (name "python-astor")
7685 (version "0.5")
7686 (source (origin
7687 (method url-fetch)
7688 (uri (pypi-uri "astor" version))
7689 (sha256
7690 (base32
7691 "1fdafq5hkis1fxqlmhw0sn44zp2ar46nxhbc22cvwg7hsd8z5gsa"))))
7692 (build-system python-build-system)
7693 (home-page "https://github.com/berkerpeksag/astor")
7694 (synopsis "Read and write Python ASTs")
7695 (description
7696 "Astor is designed to allow easy manipulation of Python source via the
7697 Abstract Syntax Tree.")
7698 (license license:bsd-3)))
7699
7700 (define-public python2-astor
7701 (package-with-python2 python-astor))
7702
7703 (define-public python-rply
7704 (package
7705 (name "python-rply")
7706 (version "0.7.5")
7707 (source (origin
7708 (method url-fetch)
7709 (uri (pypi-uri "rply" version))
7710 (sha256
7711 (base32
7712 "0lv428895zxsz43968qx0q9bimwqnfykndz4dpjbq515w2gvzhjh"))))
7713 (build-system python-build-system)
7714 (propagated-inputs
7715 `(("python-appdirs" ,python-appdirs)))
7716 (home-page "https://github.com/alex/rply")
7717 (synopsis "Parser generator for Python")
7718 (description
7719 "This package provides a pure Python based parser generator, that also
7720 works with RPython. It is a more-or-less direct port of David Bazzley's PLY,
7721 with a new public API, and RPython support.")
7722 (license license:bsd-3)))
7723
7724 (define-public python2-rply
7725 (package-with-python2 python-rply))
7726
7727 (define-public python-hy
7728 (package
7729 (name "python-hy")
7730 (version "0.13.0")
7731 (source (origin
7732 (method url-fetch)
7733 (uri (pypi-uri "hy" version))
7734 (sha256
7735 (base32
7736 "19sfymaksx9jhksfnb15ahid46mzrhdfzz6yy2craz2qnzvpmky8"))))
7737 (build-system python-build-system)
7738 (arguments
7739 '(#:phases
7740 (modify-phases %standard-phases
7741 (replace 'check
7742 (lambda _
7743 ;; Tests require write access to HOME.
7744 (setenv "HOME" "/tmp")
7745 (zero? (system* "nosetests")))))))
7746 (native-inputs
7747 `(("python-coverage" ,python-coverage)
7748 ("python-nose" ,python-nose)))
7749 (propagated-inputs
7750 `(("python-astor" ,python-astor)
7751 ("python-clint" ,python-clint)
7752 ("python-rply" ,python-rply)))
7753 (home-page "http://hylang.org/")
7754 (synopsis "Lisp frontend to Python")
7755 (description
7756 "Hy is a dialect of Lisp that's embedded in Python. Since Hy transforms
7757 its Lisp code into the Python Abstract Syntax Tree, you have the whole world of
7758 Python at your fingertips, in Lisp form.")
7759 (license license:expat)))
7760
7761 (define-public python2-hy
7762 (package-with-python2 python-hy))
7763
7764 (define-public python2-functools32
7765 (package
7766 (name "python2-functools32")
7767 (version "3.2.3-2")
7768 (source
7769 (origin
7770 (method url-fetch)
7771 (uri (pypi-uri "functools32" version))
7772 (sha256
7773 (base32
7774 "0v8ya0b58x47wp216n1zamimv4iw57cxz3xxhzix52jkw3xks9gn"))))
7775 (build-system python-build-system)
7776 (arguments
7777 `(#:python ,python-2
7778 #:tests? #f)) ; no test target
7779 (home-page "https://github.com/MiCHiLU/python-functools32")
7780 (synopsis
7781 "Backport of the functools module from Python 3.2.3")
7782 (description
7783 "This package is a backport of the @code{functools} module from Python
7784 3.2.3 for use with older versions of Python and PyPy.")
7785 (license license:expat)))
7786
7787 (define-public python2-subprocess32
7788 (package
7789 (name "python2-subprocess32")
7790 (version "3.2.7")
7791 (source (origin
7792 (method url-fetch)
7793 (uri (pypi-uri "subprocess32" version))
7794 (sha256
7795 (base32
7796 "14350dhhlhyz5gqzi3lihn9m6lvskx5mcb20srx1kgsk9i50li8y"))
7797 (patches
7798 (search-patches "python2-subprocess32-disable-input-test.patch"))))
7799 (build-system python-build-system)
7800 (arguments
7801 `(#:python ,python-2
7802 ;; The test suite fails with Python > 2.7.13:
7803 ;; import test.support
7804 ;; ImportError: No module named support
7805 #:tests? #f
7806 #:phases
7807 (modify-phases %standard-phases
7808 (add-after 'unpack 'patch-/bin/sh
7809 (lambda _
7810 (substitute* '("subprocess32.py"
7811 "test_subprocess32.py")
7812 (("/bin/sh") (which "sh")))
7813 #t)))))
7814 (home-page "https://github.com/google/python-subprocess32")
7815 (synopsis "Backport of the subprocess module from Python 3.2")
7816 (description
7817 "This is a backport of the @code{subprocess} standard library module
7818 from Python 3.2 and 3.3 for use on Python 2. It includes bugfixes and some
7819 new features. On POSIX systems it is guaranteed to be reliable when used
7820 in threaded applications. It includes timeout support from Python 3.3 but
7821 otherwise matches 3.2’s API.")
7822 (license license:psfl)))
7823
7824 (define-public python2-futures
7825 (package
7826 (name "python2-futures")
7827 (version "3.0.5")
7828 (source
7829 (origin
7830 (method url-fetch)
7831 (uri (pypi-uri "futures" version))
7832 (sha256
7833 (base32
7834 "1pw1z4329xvlabdpwqa6b7v2fxf7hl64m4cgr22ckbym8m8m4hh5"))))
7835 (build-system python-build-system)
7836 (arguments `(#:python ,python-2))
7837 (home-page "https://github.com/agronholm/pythonfutures")
7838 (synopsis
7839 "Backport of the concurrent.futures package from Python 3.2")
7840 (description
7841 "The concurrent.futures module provides a high-level interface for
7842 asynchronously executing callables. This package backports the
7843 concurrent.futures package from Python 3.2")
7844 (license license:bsd-3)))
7845
7846 (define-public python-promise
7847 (package
7848 (name "python-promise")
7849 (version "0.4.2")
7850 (source
7851 (origin
7852 (method url-fetch)
7853 (uri (pypi-uri "promise" version))
7854 (sha256
7855 (base32
7856 "1k19ms8l3d5jzjh557rgkxb5sg4mqgfc315rn4hx1z3n8qq6lr3h"))))
7857 (build-system python-build-system)
7858 ;; Tests wants python-futures, which is a python2 only program, and
7859 ;; can't be found by python-promise at test time.
7860 (arguments `(#:tests? #f))
7861 (home-page "https://github.com/syrusakbary/promise")
7862 (synopsis "Promises/A+ implementation for Python")
7863 (description
7864 "Promises/A+ implementation for Python")
7865 (properties `((python2-variant . ,(delay python2-promise))))
7866 (license license:expat)))
7867
7868 (define-public python2-promise
7869 (let ((promise (package-with-python2
7870 (strip-python2-variant python-promise))))
7871 (package (inherit promise)
7872 (arguments (substitute-keyword-arguments (package-arguments promise)
7873 ((#:tests? _) #t)))
7874 (native-inputs
7875 `(("python2-futures" ,python2-futures)
7876 ("python2-pytest" ,python2-pytest)
7877 ,@(package-native-inputs promise))))))
7878
7879 (define-public python-colorama
7880 (package
7881 (name "python-colorama")
7882 (version "0.3.9")
7883 (source
7884 (origin
7885 (method url-fetch)
7886 (uri (pypi-uri "colorama" version))
7887 (sha256
7888 (base32
7889 "1wd1szk0z3073ghx26ynw43gnc140ibln1safgsis6s6z3s25ss8"))))
7890 (build-system python-build-system)
7891 (synopsis "Colored terminal text rendering for Python")
7892 (description "Colorama is a Python library for rendering colored terminal
7893 text.")
7894 (home-page "https://pypi.python.org/pypi/colorama")
7895 (license license:bsd-3)))
7896
7897 (define-public python2-colorama
7898 (package-with-python2 python-colorama))
7899
7900 (define-public python-rsa
7901 (package
7902 (name "python-rsa")
7903 (version "3.4.2")
7904 (source
7905 (origin
7906 (method url-fetch)
7907 (uri (pypi-uri "rsa" version))
7908 (sha256
7909 (base32
7910 "1dcxvszbikgzh99ybdc7jq0zb9wspy2ds8z9mjsqiyv3q884xpr5"))))
7911 (build-system python-build-system)
7912 (propagated-inputs
7913 `(("python-pyasn1" ,python-pyasn1)))
7914 (synopsis "Pure-Python RSA implementation")
7915 (description "Python-RSA is a pure-Python RSA implementation. It supports
7916 encryption and decryption, signing and verifying signatures, and key
7917 generation according to PKCS#1 version 1.5. It can be used as a Python
7918 library as well as on the command line.")
7919 (home-page "https://stuvel.eu/rsa")
7920 (license license:asl2.0)))
7921
7922 (define-public python2-rsa
7923 (package-with-python2 python-rsa))
7924
7925 (define-public python-pluggy
7926 (package
7927 (name "python-pluggy")
7928 (version "0.6.0")
7929 (source
7930 (origin
7931 (method url-fetch)
7932 (uri (pypi-uri "pluggy" version))
7933 (sha256
7934 (base32
7935 "1zqckndfn85l1cd8pndw212zg1bq9fkg1nnj32kp2mppppsyg2kz"))))
7936 (build-system python-build-system)
7937 (synopsis "Plugin and hook calling mechanism for Python")
7938 (description "Pluggy is an extraction of the plugin manager as used by
7939 Pytest but stripped of Pytest specific details.")
7940 (home-page "https://pypi.python.org/pypi/pluggy")
7941 (license license:expat)))
7942
7943 (define-public python2-pluggy
7944 (package-with-python2 python-pluggy))
7945
7946 (define-public python-tox
7947 (package
7948 (name "python-tox")
7949 (version "2.8.1")
7950 (source
7951 (origin
7952 (method url-fetch)
7953 (uri (pypi-uri "tox" version))
7954 (sha256
7955 (base32
7956 "1drp6mwm8wdypjym15ia8lwjxbhcksb9vzxg4ay5dh4ji57by2ny"))))
7957 (build-system python-build-system)
7958 (arguments
7959 ;; FIXME: Tests require pytest-timeout, which itself requires
7960 ;; pytest>=2.8.0 for installation.
7961 '(#:tests? #f))
7962 (propagated-inputs
7963 `(("python-pluggy" ,python-pluggy) ; >=0.3.0,<0.4.0
7964 ("python-py" ,python-py)
7965 ("python-virtualenv" ,python-virtualenv)))
7966 (native-inputs
7967 `(; FIXME: Missing: ("python-pytest-timeout" ,python-pytest-timeout)
7968 ("python-pytest" ,python-pytest) ; >= 2.3.5
7969 ("python-setuptools-scm" ,python-setuptools-scm)))
7970 (home-page "http://tox.testrun.org/")
7971 (synopsis "Virtualenv-based automation of test activities")
7972 (description "Tox is a generic virtualenv management and test command line
7973 tool. It can be used to check that a package installs correctly with
7974 different Python versions and interpreters, or run tests in each type of
7975 supported environment, or act as a frontend to continuous integration
7976 servers.")
7977 (license license:expat)))
7978
7979 (define-public python2-tox
7980 (package-with-python2 python-tox))
7981
7982 (define-public python-jmespath
7983 (package
7984 (name "python-jmespath")
7985 (version "0.9.3")
7986 (source
7987 (origin
7988 (method url-fetch)
7989 (uri (pypi-uri "jmespath" version))
7990 (sha256
7991 (base32
7992 "0r7wc7fsxmlwzxx9j1j7rms06c6xs6d4sysirdhz1jk2mb4x90ba"))))
7993 (build-system python-build-system)
7994 (native-inputs
7995 `(("python-nose" ,python-nose)))
7996 (synopsis "JSON Matching Expressions")
7997 (description "JMESPath (pronounced “james path”) is a Python library that
7998 allows one to declaratively specify how to extract elements from a JSON
7999 document.")
8000 (home-page "https://github.com/jmespath/jmespath.py")
8001 (license license:expat)))
8002
8003 (define-public python2-jmespath
8004 (package-with-python2 python-jmespath))
8005
8006 (define-public python-botocore
8007 (package
8008 (name "python-botocore")
8009 (version "1.8.43")
8010 (source
8011 (origin
8012 (method url-fetch)
8013 (uri (pypi-uri "botocore" version))
8014 (sha256
8015 (base32
8016 "12cqpbnz3vfv41mp9admvciw7bc7hz57sjpqs2bxaw9wnfmbw5lg"))))
8017 (build-system python-build-system)
8018 (arguments
8019 ;; FIXME: Many tests are failing.
8020 '(#:tests? #f))
8021 (propagated-inputs
8022 `(("python-dateutil" ,python-dateutil)
8023 ("python-docutils" ,python-docutils)
8024 ("python-jmespath" ,python-jmespath)))
8025 (native-inputs
8026 `(("python-mock" ,python-mock)
8027 ("python-nose" ,python-nose)
8028 ("behave" ,behave)
8029 ("python-tox" ,python-tox)
8030 ("python-wheel" ,python-wheel)))
8031 (home-page "https://github.com/boto/botocore")
8032 (synopsis "Low-level interface to AWS")
8033 (description "Botocore is a Python library that provides a low-level
8034 interface to the Amazon Web Services (AWS) API.")
8035 (license license:asl2.0)))
8036
8037 (define-public python2-botocore
8038 (package-with-python2 python-botocore))
8039
8040 (define-public python-xdo
8041 (package
8042 (name "python-xdo")
8043 (version "0.3")
8044 (source (origin
8045 (method url-fetch)
8046 (uri (string-append
8047 "http://http.debian.net/debian/pool/main/p/python-xdo/"
8048 "python-xdo_" version ".orig.tar.gz"))
8049 (sha256
8050 (base32
8051 "1vqh1n5yy5dhnq312kwrl90fnck4v26is3lq3lxdvcn60vv19da0"))))
8052 (build-system python-build-system)
8053 (arguments
8054 '(#:phases
8055 (modify-phases %standard-phases
8056 (add-before 'install 'patch-libxdo-path
8057 ;; Hardcode the path of dynamically loaded libxdo library.
8058 (lambda* (#:key inputs #:allow-other-keys)
8059 (let ((libxdo (string-append
8060 (assoc-ref inputs "xdotool")
8061 "/lib/libxdo.so")))
8062 (substitute* "xdo/_xdo.py"
8063 (("find_library\\(\"xdo\"\\)")
8064 (simple-format #f "\"~a\"" libxdo)))
8065 #t))))
8066 #:tests? #f)) ; no tests provided
8067 (propagated-inputs
8068 `(("python-six" ,python-six)))
8069 (inputs
8070 `(("xdotool" ,xdotool)
8071 ("libX11" ,libx11)))
8072 (home-page "https://tracker.debian.org/pkg/python-xdo")
8073 (synopsis "Python library for simulating X11 keyboard/mouse input")
8074 (description "Provides bindings to libxdo for manipulating X11 via simulated
8075 input. (Note that this is mostly a legacy library; you may wish to look at
8076 python-xdo for newer bindings.)")
8077 (license license:bsd-3)))
8078
8079 (define-public python2-xdo
8080 (package-with-python2 python-xdo))
8081
8082 (define-public python-mako
8083 (package
8084 (name "python-mako")
8085 (version "1.0.7")
8086 (source
8087 (origin
8088 (method url-fetch)
8089 (uri (pypi-uri "Mako" version))
8090 (sha256
8091 (base32
8092 "1bi5gnr8r8dva06qpyx4kgjc6spm2k1y908183nbbaylggjzs0jf"))))
8093 (build-system python-build-system)
8094 (propagated-inputs
8095 `(("python-markupsafe" ,python-markupsafe)))
8096 (native-inputs
8097 `(("python-mock" ,python-mock)
8098 ("python-nose" ,python-nose)
8099 ("python-pytest" ,python-pytest)))
8100 (home-page "http://www.makotemplates.org/")
8101 (synopsis "Templating language for Python")
8102 (description "Mako is a templating language for Python that compiles
8103 templates into Python modules.")
8104 (license license:expat)))
8105
8106 (define-public python2-mako
8107 (package-with-python2 python-mako))
8108
8109 (define-public python-waitress
8110 (package
8111 (name "python-waitress")
8112 (version "1.1.0")
8113 (source
8114 (origin
8115 (method url-fetch)
8116 (uri (pypi-uri "waitress" version))
8117 (patches (search-patches "python-waitress-fix-tests.patch"))
8118 (sha256
8119 (base32
8120 "1a85gyji0kajc3p0s1pwwfm06w4wfxjkvvl4rnrz3h164kbd6g6k"))))
8121 (build-system python-build-system)
8122 (home-page "https://github.com/Pylons/waitress")
8123 (synopsis "Waitress WSGI server")
8124 (description "Waitress is meant to be a production-quality pure-Python WSGI
8125 server with very acceptable performance.")
8126 (license license:zpl2.1)))
8127
8128 (define-public python2-waitress
8129 (package-with-python2 python-waitress))
8130
8131 (define-public python-pyquery
8132 (package
8133 (name "python-pyquery")
8134 (version "1.2.17")
8135 (source
8136 (origin
8137 (method url-fetch)
8138 (uri (pypi-uri "pyquery" version))
8139 (sha256
8140 (base32
8141 "1xia20wm0vx5dk85kcwgh13bylz8qh47ffjxssd2586r60xi783a"))))
8142 (build-system python-build-system)
8143 (native-inputs
8144 `(("python-webob" ,python-webob)
8145 ("python-webtest" ,python-webtest)))
8146 (propagated-inputs
8147 `(("python-lxml" ,python-lxml)
8148 ("python-cssselect" ,python-cssselect)))
8149 (home-page "https://github.com/gawel/pyquery")
8150 (synopsis "Make jQuery-like queries on xml documents")
8151 (description "pyquery allows you to make jQuery queries on xml documents.
8152 The API is as much as possible the similar to jQuery. pyquery uses lxml for
8153 fast xml and html manipulation.")
8154 (license license:bsd-3)))
8155
8156 (define-public python2-pyquery
8157 (package-with-python2 python-pyquery))
8158
8159 (define-public python-anyjson
8160 (package
8161 (name "python-anyjson")
8162 (version "0.3.3")
8163 (source
8164 (origin
8165 (method url-fetch)
8166 (uri (pypi-uri "anyjson" version))
8167 (sha256
8168 (base32
8169 "1fjph4alvcscsl5d4b6qpv1yh31jy05jxi1l0xff7lws7j32v09p"))))
8170 (build-system python-build-system)
8171 (arguments
8172 `(;; We could possibly get tests working, but on Python 3 it's not so easy.
8173 ;; Very strangely, 2to3 is run *during setup.py install* (or bdist, or
8174 ;; whatever) so this transformation needs to be done before the tests
8175 ;; can be run. Maybe we could add a build step to transform beforehand
8176 ;; but it could be annoying/difficult.
8177 ;; We can enable tests for the Python 2 version, though, and do below.
8178 #:tests? #f))
8179 (home-page "https://bitbucket.org/runeh/anyjson/")
8180 (synopsis
8181 "Wraps best available JSON implementation in a common interface")
8182 (description
8183 "Anyjson loads whichever is the fastest JSON module installed
8184 and provides a uniform API regardless of which JSON implementation is used.")
8185 (license license:bsd-3)
8186 (properties `((python2-variant . ,(delay python2-anyjson))))))
8187
8188 (define-public python2-anyjson
8189 (let ((anyjson (package-with-python2
8190 (strip-python2-variant python-anyjson))))
8191 (package
8192 (inherit anyjson)
8193 (arguments `(;; Unlike the python 3 variant, we do run tests. See above!
8194 #:tests? #t
8195 ,@(package-arguments anyjson)))
8196 (native-inputs `(("python2-nose" ,python2-nose))))))
8197
8198 (define-public python-amqp
8199 (package
8200 (name "python-amqp")
8201 (version "1.4.9")
8202 (source
8203 (origin
8204 (method url-fetch)
8205 (uri (pypi-uri "amqp" version))
8206 (sha256
8207 (base32
8208 "06n6q0kxhjnbfz3vn8x9yz09lwmn1xi9d6wxp31h5jbks0b4vsid"))))
8209 (build-system python-build-system)
8210 (native-inputs
8211 `(("python-nose" ,python-nose)
8212 ("python-mock" ,python-mock)))
8213 (home-page "https://github.com/celery/py-amqp")
8214 (synopsis
8215 "Low-level AMQP client for Python (fork of amqplib)")
8216 (description
8217 "This is a fork of amqplib which was originally written by Barry Pederson.
8218 It is maintained by the Celery project, and used by kombu as a pure python
8219 alternative when librabbitmq is not available.")
8220 (license license:lgpl2.1+)
8221 (properties `((python2-variant . ,(delay python2-amqp))))))
8222
8223 (define-public python2-amqp
8224 (let ((amqp (package-with-python2
8225 (strip-python2-variant python-amqp))))
8226 (package
8227 (inherit amqp)
8228 (arguments `(;; Tries to run coverage tests with nose-cover3, which seems
8229 ;; unmaintained. Weirdly, does not do this on the python 3
8230 ;; version?
8231 #:tests? #f
8232 ,@(package-arguments amqp))))))
8233
8234 (define-public python-txamqp
8235 (package
8236 (name "python-txamqp")
8237 (version "0.8.2")
8238 (source
8239 (origin
8240 (method url-fetch)
8241 (uri (pypi-uri "txAMQP" version))
8242 (sha256
8243 (base32
8244 "0jd9864k3csc06kipiwzjlk9mq4054s8kzk5q1cfnxj8572s4iv4"))))
8245 (build-system python-build-system)
8246 (propagated-inputs
8247 `(("python-six" ,python-six)
8248 ("python-twisted" ,python-twisted)))
8249 (home-page "https://github.com/txamqp/txamqp")
8250 (synopsis "Communicate with AMQP peers and brokers using Twisted")
8251 (description
8252 "This package provides a Python library for communicating with AMQP peers
8253 and brokers using the asynchronous networking framework Twisted. It contains
8254 all the necessary code to connect, send and receive messages to/from an
8255 AMQP-compliant peer or broker (Qpid, OpenAMQ, RabbitMQ) using Twisted. It
8256 also includes support for using Thrift RPC over AMQP in Twisted
8257 applications.")
8258 (license license:asl2.0)))
8259
8260 (define-public python2-txamqp
8261 (package-with-python2 python-txamqp))
8262
8263 (define-public python-kombu
8264 (package
8265 (name "python-kombu")
8266 (version "3.0.37")
8267 (source
8268 (origin
8269 (method url-fetch)
8270 (uri (pypi-uri "kombu" version))
8271 (sha256
8272 (base32
8273 "0l16chb314gpq2v7fh94a22c30lcv6w3ylmhsa60bldlcq6a0r70"))))
8274 (build-system python-build-system)
8275 (native-inputs
8276 `(("python-mock" ,python-mock)
8277 ("python-nose" ,python-nose)))
8278 (propagated-inputs
8279 `(("python-anyjson" ,python-anyjson)
8280 ("python-amqp" ,python-amqp)
8281 ("python-redis" ,python-redis)))
8282 (home-page "http://kombu.readthedocs.org")
8283 (synopsis "Message passing library for Python")
8284 (description "The aim of Kombu is to make messaging in Python as easy as
8285 possible by providing an idiomatic high-level interface for the AMQ protocol,
8286 and also provide proven and tested solutions to common messaging problems.
8287 AMQP is the Advanced Message Queuing Protocol, an open standard protocol for
8288 message orientation, queuing, routing, reliability and security, for which the
8289 RabbitMQ messaging server is the most popular implementation.")
8290 (license license:bsd-3)
8291 (properties `((python2-variant . ,(delay python2-kombu))))))
8292
8293 (define-public python2-kombu
8294 (let ((kombu (package-with-python2
8295 (strip-python2-variant python-kombu))))
8296 (package
8297 (inherit kombu)
8298 (arguments `(;; FIXME: 'TestTransport.test_del_sync' fails on python2.
8299 ;; It works fine on the python3 variant.
8300 #:tests? #f
8301 ,@(package-arguments kombu)))
8302 (native-inputs `(("python2-unittest2" ,python2-unittest2)
8303 ,@(package-native-inputs kombu))))))
8304
8305 (define-public python-billiard
8306 (package
8307 (name "python-billiard")
8308 (version "3.3.0.23")
8309 (source
8310 (origin
8311 (method url-fetch)
8312 (uri (pypi-uri "billiard" version))
8313 (sha256
8314 (base32
8315 "02wxsc6bhqvzh8j6w758kvgqbnj14l796mvmrcms8fgfamd2lak9"))))
8316 (build-system python-build-system)
8317 (native-inputs
8318 `(("python-nose" ,python-nose)))
8319 (home-page "https://github.com/celery/billiard")
8320 (synopsis
8321 "Python multiprocessing fork with improvements and bugfixes")
8322 (description
8323 "Billiard is a fork of the Python 2.7 multiprocessing package. The
8324 multiprocessing package itself is a renamed and updated version of R Oudkerk's
8325 pyprocessing package. This standalone variant is intended to be compatible with
8326 Python 2.4 and 2.5, and will draw its fixes/improvements from python-trunk.")
8327 (license license:bsd-3)
8328 (properties `((python2-variant . ,(delay python2-billiard))))))
8329
8330 (define-public python2-billiard
8331 (let ((billiard (package-with-python2
8332 (strip-python2-variant python-billiard))))
8333 (package
8334 (inherit billiard)
8335 (native-inputs `(("python2-unittest2" ,python2-unittest2)
8336 ("python2-mock" ,python2-mock)
8337 ,@(package-native-inputs billiard))))))
8338
8339 (define-public python-celery
8340 (package
8341 (name "python-celery")
8342 (version "3.1.24")
8343 (source
8344 (origin
8345 (method url-fetch)
8346 (uri (pypi-uri "celery" version))
8347 (sha256
8348 (base32
8349 "0yh2prhdnx2dgkb67a5drj12hh2zvzx5f611p7mqqg01ydghif4r"))))
8350 (build-system python-build-system)
8351 (arguments
8352 `(#:phases
8353 (modify-phases %standard-phases
8354 ;; These tests break with Python 3.5:
8355 ;; https://github.com/celery/celery/issues/2897#issuecomment-253066295
8356 (replace 'check
8357 (lambda _
8358 (zero?
8359 (system* "nosetests" "--exclude=^test_safe_to_remove.*")))))))
8360 (native-inputs
8361 `(("python-nose" ,python-nose)))
8362 (propagated-inputs
8363 `(("python-pytz" ,python-pytz)
8364 ("python-billiard" ,python-billiard)
8365 ("python-kombu" ,python-kombu)))
8366 (home-page "http://celeryproject.org")
8367 (synopsis "Distributed Task Queue")
8368 (description "Celery is an asynchronous task queue/job queue based on
8369 distributed message passing. It is focused on real-time operation, but
8370 supports scheduling as well. The execution units, called tasks, are executed
8371 concurrently on a single or more worker servers using multiprocessing,
8372 Eventlet, or gevent. Tasks can execute asynchronously (in the background) or
8373 synchronously (wait until ready).")
8374 (license license:bsd-3)
8375 (properties `((python2-variant . ,(delay python2-celery))))))
8376
8377 (define-public python2-celery
8378 (let ((celery (package-with-python2
8379 (strip-python2-variant python-celery))))
8380 (package
8381 (inherit celery)
8382 (native-inputs `(("python2-unittest2" ,python2-unittest2)
8383 ("python2-mock" ,python2-mock)
8384 ,@(package-native-inputs celery))))))
8385
8386 (define-public python-translitcodec
8387 (package
8388 (name "python-translitcodec")
8389 (version "0.4.0")
8390 (source
8391 (origin
8392 (method url-fetch)
8393 (uri (pypi-uri "translitcodec" version))
8394 (sha256
8395 (base32
8396 "10x6pvblkzky1zhjs8nmx64nb9jdzxad4bxhq4iwv0j4z2aqjnki"))))
8397 (build-system python-build-system)
8398 (arguments
8399 `(#:tests? #f)) ; no tests provided
8400 (home-page
8401 "https://github.com/claudep/translitcodec")
8402 (synopsis
8403 "Unicode to 8-bit charset transliteration codec")
8404 (description
8405 "This package contains codecs for transliterating ISO 10646 texts into
8406 best-effort representations using smaller coded character sets (ASCII,
8407 ISO 8859, etc.).")
8408 (license license:expat)))
8409
8410 (define-public python2-translitcodec
8411 (package-with-python2 python-translitcodec))
8412
8413 (define-public python-editor
8414 (package
8415 (name "python-editor")
8416 (version "0.5")
8417 (source
8418 (origin
8419 (method url-fetch)
8420 (uri (pypi-uri "python-editor" version))
8421 (sha256
8422 (base32
8423 "1ypnpgvzpkbwsg4rdvy4sy51j28b5xq9v8pnkwxncn07vqz06p7n"))))
8424 (build-system python-build-system)
8425 (home-page
8426 "https://github.com/fmoo/python-editor")
8427 (synopsis
8428 "Programmatically open an editor, capture the result")
8429 (description
8430 "python-editor is a library that provides the editor module for
8431 programmatically interfacing with your system's $EDITOR.")
8432 (license license:asl2.0)))
8433
8434 (define-public python2-editor
8435 (package-with-python2 python-editor))
8436
8437 (define-public python-sphinxcontrib-programoutput
8438 (package
8439 (name "python-sphinxcontrib-programoutput")
8440 (version "0.10")
8441 (source (origin
8442 (method url-fetch)
8443 (uri (pypi-uri "sphinxcontrib-programoutput" version))
8444 (sha256
8445 (base32
8446 "153hhnlbx4688zj9wd64819ps5znc2jlyp5crkgzvn5hxgy99vpx"))))
8447 (build-system python-build-system)
8448 (arguments
8449 ;; FIXME: Many tests are failing and the upstream is gone.
8450 '(#:tests? #f))
8451 (propagated-inputs
8452 `(("python-sphinx" ,python-sphinx)))
8453 (synopsis "Sphinx extension to include program output")
8454 (description "A Sphinx extension to literally insert the output of arbitrary
8455 commands into documents, helping you to keep your command examples up to date.")
8456 (home-page "https://github.com/lunaryorn/sphinxcontrib-programoutput")
8457 (license license:bsd-2)))
8458
8459 (define-public python2-sphinxcontrib-programoutput
8460 (package-with-python2 python-sphinxcontrib-programoutput))
8461
8462 (define-public python-sphinx-repoze-autointerface
8463 (package
8464 (name "python-sphinx-repoze-autointerface")
8465 (version "0.8")
8466 (source (origin
8467 (method url-fetch)
8468 (uri (pypi-uri "repoze.sphinx.autointerface" version))
8469 (sha256
8470 (base32
8471 "08ycivzf7bh4a1zcyp31hbyqs1b2c9r26raa3vxjwwmbfqr3iw4f"))))
8472 (build-system python-build-system)
8473 (arguments '(#:tests? #f)) ; No tests.
8474 (propagated-inputs
8475 `(("python-sphinx" ,python-sphinx)
8476 ("python-zope-interface" ,python-zope-interface)))
8477 (synopsis "Auto-generate Sphinx API docs from Zope interfaces")
8478 (description "This package defines an extension for the Sphinx documentation
8479 system. The extension allows generation of API documentation by
8480 introspection of @code{zope.interface} instances in code.")
8481 (home-page "https://github.com/repoze/repoze.sphinx.autointerface")
8482 (license license:repoze)))
8483
8484 (define-public python2-sphinx-repoze-autointerface
8485 (package-with-python2 python-sphinx-repoze-autointerface))
8486
8487 (define-public python-vobject
8488 (package
8489 (name "python-vobject")
8490 (version "0.9.5")
8491 (source (origin
8492 (method url-fetch)
8493 (uri (pypi-uri "vobject" version))
8494 (sha256
8495 (base32
8496 "0hqjgf3ay1m5w1c0k00g5yfpdz1zni5qnr5rh9b8fg9hjvhwlmhg"))))
8497 (build-system python-build-system)
8498 (arguments
8499 '(;; The test suite relies on some non-portable Windows interfaces.
8500 #:tests? #f))
8501 (propagated-inputs
8502 `(("python-dateutil" ,python-dateutil)
8503 ("python-pyicu" ,python-pyicu)))
8504 (synopsis "Parse and generate vCard and vCalendar files")
8505 (description "Vobject is intended to be a full featured Python package for
8506 parsing and generating vCard and vCalendar files. Currently, iCalendar files
8507 are supported and well tested. vCard 3.0 files are supported, and all data
8508 should be imported, but only a few components are understood in a sophisticated
8509 way.")
8510 (home-page "http://eventable.github.io/vobject/")
8511 (license license:asl2.0)))
8512
8513 (define-public python2-vobject
8514 (package-with-python2 python-vobject))
8515
8516 (define-public python-munkres
8517 (package
8518 (name "python-munkres")
8519 (version "1.0.8")
8520 (source (origin
8521 (method url-fetch)
8522 (uri (pypi-uri "munkres" version))
8523 (sha256
8524 (base32
8525 "0mbspx4zv8id4x6pim6ybsa1xh96qwpbqj7skbqz4c9c9nf1lpqq"))))
8526 (build-system python-build-system)
8527 (arguments
8528 '(#:tests? #f)) ; no test suite
8529 (home-page "http://software.clapper.org/munkres/")
8530 (synopsis "Implementation of the Munkres algorithm")
8531 (description "The Munkres module provides an implementation of the Munkres
8532 algorithm (also called the Hungarian algorithm or the Kuhn-Munkres algorithm),
8533 useful for solving the Assignment Problem.")
8534 (license license:bsd-3)))
8535
8536 (define-public python2-munkres
8537 (package-with-python2 python-munkres))
8538
8539 (define-public python-whoosh
8540 (package
8541 (name "python-whoosh")
8542 (version "2.7.4")
8543 (source
8544 (origin
8545 (method url-fetch)
8546 (uri (pypi-uri "Whoosh" version))
8547 (sha256
8548 (base32
8549 "10qsqdjpbc85fykc1vgcs8xwbgn4l2l52c8d83xf1q59pwyn79bw"))))
8550 (build-system python-build-system)
8551 (native-inputs
8552 `(("python-pytest" ,python-pytest)))
8553 (home-page "https://bitbucket.org/mchaput/whoosh")
8554 (synopsis "Full text indexing, search, and spell checking library")
8555 (description
8556 "Whoosh is a fast, pure-Python full text indexing, search, and spell
8557 checking library.")
8558 (license license:bsd-2)))
8559
8560 (define-public python2-whoosh
8561 (let ((whoosh (package-with-python2 (strip-python2-variant python-whoosh))))
8562 (package (inherit whoosh)
8563 (propagated-inputs
8564 `(("python2-backport-ssl-match-hostname"
8565 ,python2-backport-ssl-match-hostname)
8566 ,@(package-propagated-inputs whoosh))))))
8567
8568 (define-public python-pathlib
8569 (package
8570 (name "python-pathlib")
8571 (version "1.0.1")
8572 (source (origin
8573 (method url-fetch)
8574 (uri (pypi-uri "pathlib" version))
8575 (sha256
8576 (base32
8577 "17zajiw4mjbkkv6ahp3xf025qglkj0805m9s41c45zryzj6p2h39"))))
8578 (build-system python-build-system)
8579 ;; The tests depend on the internal "test" module, which does not provide
8580 ;; a stable interface.
8581 (arguments `(#:tests? #f))
8582 (home-page "https://pathlib.readthedocs.org/")
8583 (synopsis "Object-oriented file system paths")
8584 (description "Pathlib offers a set of classes to handle file system paths.
8585 It offers the following advantages over using string objects:
8586
8587 @enumerate
8588 @item No more cumbersome use of os and os.path functions. Everything can
8589 be done easily through operators, attribute accesses, and method calls.
8590 @item Embodies the semantics of different path types. For example,
8591 comparing Windows paths ignores casing.
8592 @item Well-defined semantics, eliminating any inconsistencies or
8593 ambiguities (forward vs. backward slashes, etc.).
8594 @end enumerate
8595
8596 Note: In Python 3.4, pathlib is now part of the standard library. For other
8597 Python versions please consider python-pathlib2 instead, which tracks the
8598 standard library module. This module (python-pathlib) isn't maintained
8599 anymore.")
8600 (license license:expat)))
8601
8602 (define-public python2-pathlib
8603 (package-with-python2 python-pathlib))
8604
8605 (define-public python2-pathlib2
8606 (package
8607 (name "python2-pathlib2")
8608 (version "2.3.2")
8609 (source (origin
8610 (method url-fetch)
8611 (uri (pypi-uri "pathlib2" version))
8612 (sha256
8613 (base32
8614 "10yb0iv5x2hs631rcppkhbddx799d3h8pcwmkbh2a66ns3w71ccf"))))
8615 (build-system python-build-system)
8616 ;; We only need the the Python 2 variant, since for Python 3 our minimum
8617 ;; version is 3.4 which already includes this package as part of the
8618 ;; standard library.
8619 (arguments
8620 `(#:python ,python-2))
8621 (propagated-inputs
8622 `(("python2-scandir" ,python2-scandir)
8623 ("python2-six" ,python2-six)))
8624 (home-page "https://pypi.python.org/pypi/pathlib2/")
8625 (synopsis "Object-oriented file system paths - backport of standard
8626 pathlib module")
8627 (description "The goal of pathlib2 is to provide a backport of standard
8628 pathlib module which tracks the standard library module, so all the newest
8629 features of the standard pathlib can be used also on older Python versions.
8630
8631 Pathlib offers a set of classes to handle file system paths. It offers the
8632 following advantages over using string objects:
8633
8634 @enumerate
8635 @item No more cumbersome use of os and os.path functions. Everything can
8636 be done easily through operators, attribute accesses, and method calls.
8637 @item Embodies the semantics of different path types. For example,
8638 comparing Windows paths ignores casing.
8639 @item Well-defined semantics, eliminating any inconsistencies or
8640 ambiguities (forward vs. backward slashes, etc.).
8641 @end enumerate")
8642 (license license:expat)))
8643
8644 (define-public python-jellyfish
8645 (package
8646 (name "python-jellyfish")
8647 (version "0.5.6")
8648 (source (origin
8649 (method url-fetch)
8650 (uri (pypi-uri "jellyfish" version))
8651 (sha256
8652 (base32
8653 "1j9rplb16ba2prjj6mip46z0w9pnhnqpwgiwi0x93vnas14rlyl8"))))
8654 (build-system python-build-system)
8655 (native-inputs
8656 `(("python-pytest" ,python-pytest)))
8657 (home-page "https://github.com/jamesturk/jellyfish")
8658 (synopsis "Approximate and phonetic matching of strings")
8659 (description "Jellyfish uses a variety of string comparison and phonetic
8660 encoding algorithms to do fuzzy string matching.")
8661 (license license:bsd-2)
8662 (properties `((python2-variant . ,(delay python2-jellyfish))))))
8663
8664 (define-public python2-jellyfish
8665 (let ((jellyfish (package-with-python2
8666 (strip-python2-variant python-jellyfish))))
8667 (package (inherit jellyfish)
8668 (native-inputs `(("python2-unicodecsv" ,python2-unicodecsv)
8669 ,@(package-native-inputs jellyfish))))))
8670
8671 (define-public python2-unicodecsv
8672 (package
8673 (name "python2-unicodecsv")
8674 (version "0.14.1")
8675 (source (origin
8676 (method url-fetch)
8677 ;; The test suite is not included in the PyPi release.
8678 ;; https://github.com/jdunck/python-unicodecsv/issues/19
8679 (uri (string-append "https://github.com/jdunck/python-unicodecsv/"
8680 "archive/" version ".tar.gz"))
8681 (file-name (string-append name "-" version ".tar.gz"))
8682 (sha256
8683 (base32
8684 "087nqanfcyp6mlfbbr5lva5f3w6iz1bybls9xlrb8icmc474wh4w"))))
8685 (build-system python-build-system)
8686 (arguments
8687 `(;; It supports Python 3, but Python 3 can already do Unicode CSV.
8688 #:python ,python-2))
8689 (native-inputs
8690 `(("python2-unittest2" ,python2-unittest2)))
8691 (home-page "https://github.com/jdunck/python-unicodecsv")
8692 (synopsis "Unicode CSV module for Python 2")
8693 (description "Unicodecsv is a drop-in replacement for Python 2.7's CSV
8694 module, adding support for Unicode strings.")
8695 (license license:bsd-2)))
8696
8697 (define-public python-rarfile
8698 (package
8699 (name "python-rarfile")
8700 (version "2.8")
8701 (source (origin
8702 (method url-fetch)
8703 (uri (pypi-uri "rarfile" version))
8704 (sha256
8705 (base32
8706 "0qfad483kcbga0bn4qmcz953xjk16r52fahiy46zzn56v80y89ra"))))
8707 (build-system python-build-system)
8708 (arguments
8709 '(#:phases
8710 (modify-phases %standard-phases
8711 (replace 'check
8712 ;; Many tests fail, but the installation proceeds.
8713 (lambda _ (zero? (system* "make" "-C" "test" "test")))))))
8714 (native-inputs
8715 `(("which" ,which))) ; required for tests
8716 (propagated-inputs
8717 `(("libarchive" ,libarchive)))
8718 (home-page "https://github.com/markokr/rarfile")
8719 (synopsis "RAR archive reader for Python")
8720 (description "This is Python module for RAR archive reading. The interface
8721 is made as zipfile like as possible.")
8722 (license license:isc)))
8723
8724 (define-public python2-rarfile
8725 (package-with-python2 python-rarfile))
8726
8727 (define-public python-magic
8728 (package
8729 (name "python-magic")
8730 (version "0.4.15")
8731 (source
8732 (origin
8733 (method url-fetch)
8734 (uri (pypi-uri "python-magic" version))
8735 (sha256
8736 (base32
8737 "1mgwig9pnzgkf86q9ji9pnc99bngms15lfszq5rgqb9db07mqxpk"))
8738 (file-name (string-append name "-" version "-checkout"))))
8739 (build-system python-build-system)
8740 (arguments
8741 ;; The tests are unreliable, so don't run them. The tests fail
8742 ;; under Python3 because they were written for Python2 and
8743 ;; contain import statements that do not work in Python3. One of
8744 ;; the tests fails under Python2 because its assertions are
8745 ;; overly stringent; it relies on comparing output strings which
8746 ;; are brittle and can change depending on the version of
8747 ;; libmagic being used and the system on which the test is
8748 ;; running. In my case, under GuixSD 0.10.0, only one test
8749 ;; failed, and it seems to have failed only because the version
8750 ;; of libmagic that is packaged in Guix outputs a slightly
8751 ;; different (but not wrong) string than the one that the test
8752 ;; expected.
8753 '(#:tests? #f
8754 #:phases (modify-phases %standard-phases
8755 ;; Replace a specific method call with a hard-coded
8756 ;; path to the necessary libmagic.so file in the
8757 ;; store. If we don't do this, then the method call
8758 ;; will fail to find the libmagic.so file, which in
8759 ;; turn will cause any application using
8760 ;; python-magic to fail.
8761 (add-before 'build 'hard-code-path-to-libmagic
8762 (lambda* (#:key inputs #:allow-other-keys)
8763 (let ((file (assoc-ref inputs "file")))
8764 (substitute* "magic.py"
8765 (("ctypes.util.find_library\\('magic'\\)")
8766 (string-append "'" file "/lib/libmagic.so'")))
8767 #t)))
8768 (add-before 'install 'disable-egg-compression
8769 (lambda _
8770 (let ((port (open-file "setup.cfg" "a")))
8771 (display "\n[easy_install]\nzip_ok = 0\n"
8772 port)
8773 (close-port port)
8774 #t))))))
8775 (inputs
8776 ;; python-magic needs to be able to find libmagic.so.
8777 `(("file" ,file)))
8778 (home-page
8779 "https://github.com/ahupp/python-magic")
8780 (synopsis
8781 "File type identification using libmagic")
8782 (description
8783 "This module uses ctypes to access the libmagic file type
8784 identification library. It makes use of the local magic database and
8785 supports both textual and MIME-type output. Note that this module and
8786 the python-file module both provide a \"magic.py\" file; these two
8787 modules, which are different and were developed separately, both serve
8788 the same purpose: to provide Python bindings for libmagic.")
8789 (license license:expat)))
8790
8791 (define-public python2-magic
8792 (package-with-python2 python-magic))
8793
8794 (define-public python2-s3cmd
8795 (package
8796 (name "python2-s3cmd")
8797 (version "1.6.1")
8798 (source
8799 (origin
8800 (method url-fetch)
8801 (uri (string-append "mirror://sourceforge/s3tools/s3cmd/" version "/"
8802 "s3cmd-" version ".tar.gz"))
8803 (sha256
8804 (base32
8805 "0ki1rzhm5icvi9ry5jswi4b22yqwyj0d2wsqsgilwx6qhi7pjxa6"))))
8806 (build-system python-build-system)
8807 (arguments
8808 ;; s3cmd is written for python2 only and contains no tests.
8809 `(#:python ,python-2
8810 #:tests? #f))
8811 (propagated-inputs
8812 `(("python2-dateutil" ,python2-dateutil)
8813 ;; The python-file package also provides a magic.py module.
8814 ;; This is an unfortunate state of affairs; however, s3cmd
8815 ;; fails to install if it cannot find specifically the
8816 ;; python-magic package. Thus we include it, instead of using
8817 ;; python-file. Ironically, s3cmd sometimes works better
8818 ;; without libmagic bindings at all:
8819 ;; https://github.com/s3tools/s3cmd/issues/198
8820 ("python2-magic" ,python2-magic)))
8821 (home-page "http://s3tools.org/s3cmd")
8822 (synopsis "Command line tool for S3-compatible storage services")
8823 (description
8824 "S3cmd is a command line tool for uploading, retrieving and managing data
8825 in storage services that are compatible with the Amazon Simple Storage
8826 Service (S3) protocol, including S3 itself. It supports rsync-like backup,
8827 GnuPG encryption, and more. It also supports management of Amazon's
8828 CloudFront content delivery network.")
8829 (license license:gpl2+)))
8830
8831 (define-public python-pkgconfig
8832 (package
8833 (name "python-pkgconfig")
8834 (version "1.3.1")
8835 (source
8836 (origin
8837 (method url-fetch)
8838 (uri (pypi-uri "pkgconfig" version))
8839 (sha256
8840 (base32
8841 "107x2wmchlch8saixb488cgjz9n6inl38wi7nxkb942rbaapxiqb"))))
8842 (build-system python-build-system)
8843 (native-inputs
8844 `(("python-nose" ,python-nose)))
8845 (inputs
8846 `(("pkg-config" ,pkg-config)))
8847 (arguments
8848 `(#:phases
8849 (modify-phases %standard-phases
8850 (add-before 'build 'patch
8851 ;; Hard-code the path to pkg-config.
8852 (lambda _
8853 (substitute* "pkgconfig/pkgconfig.py"
8854 (("cmd = 'pkg-config")
8855 (string-append "cmd = '" (which "pkg-config"))))
8856 #t))
8857 (replace 'check
8858 (lambda _
8859 (invoke "nosetests" "test.py"))))))
8860 (home-page "https://github.com/matze/pkgconfig")
8861 (synopsis "Python interface for pkg-config")
8862 (description "This module provides a Python interface to pkg-config. It
8863 can be used to find all pkg-config packages, check if a package exists,
8864 check if a package meets certain version requirements, query CFLAGS and
8865 LDFLAGS and parse the output to build extensions with setup.py.")
8866 (license license:expat)))
8867
8868 (define-public python2-pkgconfig
8869 (package-with-python2 python-pkgconfig))
8870
8871 (define-public python-bz2file
8872 (package
8873 (name "python-bz2file")
8874 (version "0.98")
8875 (source
8876 (origin
8877 (method url-fetch)
8878 (uri (pypi-uri "bz2file" version))
8879 (sha256
8880 (base32
8881 "126s53fkpx04f33a829yqqk8fj4png3qwg4m66cvlmhmwc8zihb4"))))
8882 (build-system python-build-system)
8883 (arguments
8884 `(#:tests? #f)) ; Tests use deprecated python modules.
8885 (home-page "https://github.com/nvawda/bz2file")
8886 (synopsis "Read and write bzip2-compressed files")
8887 (description
8888 "Bz2file is a Python library for reading and writing bzip2-compressed
8889 files. It contains a drop-in replacement for the I/O interface in the
8890 standard library's @code{bz2} module, including features from the latest
8891 development version of CPython that are not available in older releases.")
8892 (license license:asl2.0)
8893 (properties `((python2-variant . ,(delay python2-bz2file))))))
8894
8895 (define-public python2-bz2file
8896 (let ((base (package-with-python2
8897 (strip-python2-variant python-bz2file))))
8898 (package
8899 (inherit base)
8900 (arguments
8901 `(#:python ,python-2
8902 #:phases
8903 (modify-phases %standard-phases
8904 ;; 'python setup.py test' does not work as of 0.98.
8905 ;; There is only the one test file, so we run it directly.
8906 (replace 'check
8907 (lambda _ (zero? (system* "python"
8908 "test_bz2file.py"))))))))))
8909
8910 (define-public python-future
8911 (package
8912 (name "python-future")
8913 (version "0.16.0")
8914 (source
8915 (origin
8916 (method url-fetch)
8917 (uri (pypi-uri "future" version))
8918 (sha256
8919 (base32
8920 "1nzy1k4m9966sikp0qka7lirh8sqrsyainyf8rk97db7nwdfv773"))))
8921 (build-system python-build-system)
8922 ;; Many tests connect to the network or are otherwise flawed.
8923 ;; https://github.com/PythonCharmers/python-future/issues/210
8924 (arguments
8925 `(#:tests? #f))
8926 (home-page "http://python-future.org")
8927 (synopsis "Single-source support for Python 3 and 2")
8928 (description
8929 "@code{python-future} is the missing compatibility layer between Python 2 and
8930 Python 3. It allows you to use a single, clean Python 3.x-compatible codebase
8931 to support both Python 2 and Python 3 with minimal overhead.")
8932 (license license:expat)))
8933
8934 (define-public python2-future
8935 (package-with-python2 python-future))
8936
8937 (define-public python-cysignals
8938 (package
8939 (name "python-cysignals")
8940 (version "1.1.0")
8941 (source
8942 (origin
8943 (method url-fetch)
8944 (uri (pypi-uri "cysignals" version ".tar.bz2"))
8945 (sha256
8946 (base32
8947 "14cbyd9znlz6cxy1s3g6v6dv5jj45hn27pywkidd9b1zanaysqc6"))))
8948 (build-system python-build-system)
8949 (native-inputs
8950 `(("python-cython" ,python-cython)
8951 ("python-sphinx" ,python-sphinx)))
8952 (inputs
8953 `(("pari-gp" ,pari-gp)))
8954 (arguments
8955 `(#:modules ((guix build python-build-system)
8956 ((guix build gnu-build-system) #:prefix gnu:)
8957 (guix build utils))
8958 ;; FIXME: Tests are executed after installation and currently fail
8959 ;; when not installing into standard locations; the author is working
8960 ;; on a fix.
8961 #:tests? #f
8962 #:phases
8963 (modify-phases %standard-phases
8964 (add-before
8965 'build 'configure
8966 (assoc-ref gnu:%standard-phases 'configure)))))
8967 (home-page
8968 "https://github.com/sagemath/cysignals")
8969 (synopsis
8970 "Handling of interrupts and signals for Cython")
8971 (description
8972 "The cysignals package provides mechanisms to handle interrupts (and
8973 other signals and errors) in Cython code, using two related approaches,
8974 for mixed Cython/Python code or external C libraries and pure Cython code,
8975 respectively.")
8976 (license license:lgpl3+)))
8977
8978 (define-public python2-cysignals
8979 (package-with-python2 python-cysignals))
8980
8981 (define-public python2-shedskin
8982 (package
8983 (name "python2-shedskin")
8984 (version "0.9.4")
8985 (source
8986 (origin
8987 (method url-fetch)
8988 (uri (string-append "https://github.com/shedskin/shedskin/"
8989 "releases/download/v" version
8990 "/shedskin-" version ".tgz"))
8991 (sha256
8992 (base32
8993 "0nzwrzgw1ga8rw6f0ryq7zr9kkiavd1cqz5hzxkcbicl1dk7kz41"))))
8994 (build-system python-build-system)
8995 (arguments
8996 `(#:python ,python-2
8997 #:phases (modify-phases %standard-phases
8998 (add-after 'unpack 'fix-resulting-include-libs
8999 (lambda* (#:key inputs #:allow-other-keys)
9000 (let ((libgc (assoc-ref inputs "libgc"))
9001 (pcre (assoc-ref inputs "pcre")))
9002 (substitute* "shedskin/makefile.py"
9003 (("variable == 'CCFLAGS':[ ]*")
9004 (string-append "variable == 'CCFLAGS':\n"
9005 " line += ' -I " pcre "/include"
9006 " -I " libgc "/include'"))
9007 (("variable == 'LFLAGS':[ ]*")
9008 (string-append "variable == 'LFLAGS':\n"
9009 " line += ' -L" pcre "/lib"
9010 " -L " libgc "/lib'")))
9011 #t))))))
9012 (inputs `(("pcre" ,pcre)
9013 ("libgc" ,libgc)))
9014 (home-page "https://shedskin.github.io/")
9015 (synopsis "Experimental Python-2 to C++ Compiler")
9016 (description (string-append "This is an experimental compiler for a subset of
9017 Python. It generates C++ code and a Makefile."))
9018 (license (list license:gpl3 license:bsd-3 license:expat))))
9019
9020 (define-public python2-rope
9021 (package
9022 (name "python2-rope")
9023 (version "0.10.3")
9024 (source
9025 (origin
9026 (method url-fetch)
9027 (uri (pypi-uri "rope" version))
9028 (sha256
9029 (base32
9030 "18k5znhpwvrfck3yp0jmhd5j8r0f0s8bk1zh5yhs2cfgmfhbwigb"))))
9031 (arguments
9032 ;; Rope is currently python-2 only.
9033 ;; https://github.com/python-rope/rope/issues/57
9034 `(#:python ,python-2))
9035 (build-system python-build-system)
9036 (native-inputs
9037 `(("python2-unittest2" ,python2-unittest2)))
9038 (home-page "https://github.com/python-rope/rope")
9039 (synopsis "Refactoring library for Python")
9040 (description "Rope is a refactoring library for Python. It facilitates
9041 the renaming, moving and extracting of attributes, functions, modules, fields
9042 and parameters in Python 2 source code. These refactorings can also be applied
9043 to occurrences in strings and comments.")
9044 (license license:gpl2)))
9045
9046 (define-public python-py3status
9047 (package
9048 (name "python-py3status")
9049 (version "3.7")
9050 (source
9051 (origin
9052 (method url-fetch)
9053 (uri (pypi-uri "py3status" version))
9054 (sha256
9055 (base32
9056 "0shxcfz4wcczj0mhwp4w0dvwd2fdd9bgprq8slim1519iiqzgwhq"))))
9057 (build-system python-build-system)
9058 (inputs
9059 `(("file" ,file)))
9060 (arguments
9061 '(#:phases
9062 (modify-phases %standard-phases
9063 ;; 'file' is used for detection of configuration file encoding
9064 ;; let's make link the dependency to particular input
9065 (add-before 'build 'patch-file-path
9066 (lambda* (#:key inputs #:allow-other-keys)
9067 (let ((file-path (assoc-ref inputs "file")))
9068 (substitute* "py3status/parse_config.py"
9069 (("\\['file', '-b'")
9070 (string-append "['" file-path "/bin/file', '-b'")))
9071 #t))))
9072 #:tests? #f)) ; TODO: Requires many libraries not in Guix.
9073 (home-page "https://github.com/ultrabug/py3status")
9074 (synopsis "Extensible i3status wrapper written in Python")
9075 (description "py3status is an i3status wrapper which extends i3status
9076 functionality in a modular way, allowing you to extend your panel with your
9077 own code, responding to click events and updating clock every second.")
9078 (license license:bsd-3)))
9079
9080 (define-public python-tblib
9081 (package
9082 (name "python-tblib")
9083 (version "1.3.2")
9084 (source (origin
9085 (method url-fetch)
9086 (uri (pypi-uri "tblib" version))
9087 (sha256 (base32
9088 "1rsg8h069kqgncyv8fgzyj6qflk6j10cb78pa5jk34ixwq044vj3"))))
9089 (build-system python-build-system)
9090 (arguments
9091 `(#:phases
9092 (modify-phases %standard-phases
9093 (replace 'check
9094 (lambda _
9095 ;; Upstream runs tests after installation and the package itself
9096 ;; resides in a subdirectory. Extend PYTHONPATH so it will be
9097 ;; found.
9098 (setenv "PYTHONPATH"
9099 (string-append (getcwd) "/build/lib:"
9100 (getenv "PYTHONPATH")))
9101 (zero? (system* "py.test" "-vv" "tests" "README.rst")))))))
9102 (native-inputs
9103 `(("python-pytest" ,python-pytest)
9104 ("python-six" ,python-six)))
9105 (home-page "https://github.com/ionelmc/python-tblib")
9106 (synopsis "Traceback serialization library")
9107 (description
9108 "Traceback serialization allows you to:
9109
9110 @enumerate
9111 @item Pickle tracebacks and raise exceptions with pickled tracebacks in
9112 different processes. This allows better error handling when running code over
9113 multiple processes (imagine multiprocessing, billiard, futures, celery etc).
9114
9115 @item Parse traceback strings and raise with the parsed tracebacks.
9116 @end enumerate\n")
9117 (license license:bsd-3)))
9118
9119 (define-public python2-tblib
9120 (package-with-python2 python-tblib))
9121
9122 (define-public python-greenlet
9123 (package
9124 (name "python-greenlet")
9125 (version "0.4.11")
9126 (source (origin
9127 (method url-fetch)
9128 (uri (pypi-uri "greenlet" version))
9129 (sha256
9130 (base32
9131 "1xhik26j4f3kc4qw9xmj0c567rb5h1zryb4ijwqnqwwjvfhbv59h"))))
9132 (build-system python-build-system)
9133 (home-page "https://greenlet.readthedocs.io/")
9134 (synopsis "Lightweight in-process concurrent programming")
9135 (description
9136 "Greenlet package is a spin-off of Stackless, a version of CPython
9137 that supports micro-threads called \"tasklets\". Tasklets run
9138 pseudo-concurrently (typically in a single or a few OS-level threads) and
9139 are synchronized with data exchanges on \"channels\".")
9140 (license (list license:psfl license:expat))))
9141
9142 (define-public python2-greenlet
9143 (package-with-python2 python-greenlet))
9144
9145 (define-public python-gevent
9146 (package
9147 (name "python-gevent")
9148 (version "1.2.2")
9149 (source (origin
9150 (method url-fetch)
9151 (uri (pypi-uri "gevent" version))
9152 (sha256
9153 (base32
9154 "0bbbjvi423y9k9xagrcsimnayaqymg6f2dj76m9z3mjpkjpci4a7"))
9155 (modules '((guix build utils)))
9156 (snippet
9157 '(begin
9158 ;; unbunding libev and c-ares
9159 (delete-file-recursively "deps")
9160 #t))))
9161 (build-system python-build-system)
9162 (arguments
9163 `(#:modules ((ice-9 ftw)
9164 (srfi srfi-26)
9165 (guix build utils)
9166 (guix build python-build-system))
9167 #:phases (modify-phases %standard-phases
9168 (add-after 'unpack 'unpack-libev
9169 (lambda* (#:key inputs #:allow-other-keys)
9170 (mkdir-p "deps/libev")
9171 ;; FIXME: gevent requires building libev, even though
9172 ;; it only links against the proper one.
9173 (invoke "tar" "-xf" (assoc-ref inputs "libev-source")
9174 "--strip-components=1" "-C" "deps/libev")))
9175 (add-before 'patch-source-shebangs 'patch-hard-coded-paths
9176 (lambda _
9177 (substitute* "src/gevent/subprocess.py"
9178 (("/bin/sh") (which "sh")))
9179 (for-each (lambda (file)
9180 (substitute* file
9181 (("/bin/sh") (which "sh"))
9182 (("/bin/true") (which "true"))))
9183 (find-files "src/greentest" "\\.py$"))
9184 #t))
9185 (add-before 'build 'do-not-use-bundled-sources
9186 (lambda _
9187 (setenv "CONFIG_SHELL" (which "bash"))
9188 (setenv "LIBEV_EMBED" "false")
9189 (setenv "CARES_EMBED" "false")
9190 (setenv "EMBED" "false")
9191 #t))
9192 (replace 'check
9193 (lambda _
9194 ;; Make sure the build directory is on PYTHONPATH.
9195 (setenv "PYTHONPATH"
9196 (string-append
9197 (getenv "PYTHONPATH") ":"
9198 (getcwd) "/build/"
9199 (car (scandir "build" (cut string-prefix? "lib." <>)))))
9200 (with-directory-excursion "src/greentest"
9201 ;; XXX: Many tests require network access. Instead we only
9202 ;; run known-good tests. Unfortunately we cannot use
9203 ;; recursion here since this directory also contains
9204 ;; Python-version-specific subfolders.
9205 (apply invoke "python" "testrunner.py" "--config"
9206 "known_failures.py"
9207 (scandir "." (cut regexp-exec
9208 (make-regexp "test_+(subprocess|core)")
9209 <>)))))))))
9210 (propagated-inputs
9211 `(("python-greenlet" ,python-greenlet)))
9212 (native-inputs
9213 `(("libev-source" ,(package-source libev))
9214 ("python-six" ,python-six)))
9215 (inputs
9216 `(("c-ares" ,c-ares)
9217 ("libev" ,libev)))
9218 (home-page "http://www.gevent.org/")
9219 (synopsis "Coroutine-based network library")
9220 (description
9221 "gevent is a coroutine-based Python networking library that uses greenlet
9222 to provide a high-level synchronous API on top of the libev event loop.")
9223 (license license:expat)))
9224
9225 (define-public python2-gevent
9226 (package-with-python2 python-gevent))
9227
9228 (define-public python-fastimport
9229 (package
9230 (name "python-fastimport")
9231 (version "0.9.6")
9232 (source
9233 (origin
9234 (method url-fetch)
9235 (uri (pypi-uri "fastimport" version))
9236 (sha256
9237 (base32 "1aqjsin4rmqm7ln4j0p73fzxifws6c6ikgyhav7r137m2ixsxl43"))))
9238 (build-system python-build-system)
9239 (home-page "https://github.com/jelmer/python-fastimport")
9240 (synopsis "VCS fastimport parser and generator in Python")
9241 (description "This package provides a parser for and generator of the Git
9242 @url{https://www.kernel.org/pub/software/scm/git/docs/git-fast-import.html,fastimport}
9243 format.")
9244 (license license:gpl2+)))
9245
9246 (define-public python2-fastimport
9247 (package-with-python2 python-fastimport))
9248
9249 (define-public python-twisted
9250 (package
9251 (name "python-twisted")
9252 (version "17.1.0")
9253 (source (origin
9254 (method url-fetch)
9255 (uri (pypi-uri "Twisted" version ".tar.bz2"))
9256 (sha256
9257 (base32
9258 "1p245mg15hkxp7hy5cyq2fgvlgjkb4cg0gwkwd148nzy1bbi3wnv"))))
9259 (build-system python-build-system)
9260 (arguments
9261 '(#:tests? #f)) ; FIXME: Some tests are failing.
9262 ;; #:phases
9263 ;; (modify-phases %standard-phases
9264 ;; (replace 'check
9265 ;; (lambda _
9266 ;; (zero? (system* "./bin/trial" "twisted")))))
9267 (propagated-inputs
9268 `(("python-zope-interface" ,python-zope-interface)
9269 ("python-incremental" ,python-incremental)
9270 ("python-constantly" ,python-constantly)
9271 ("python-automat" ,python-automat)))
9272 (home-page "https://twistedmatrix.com/")
9273 (synopsis "Asynchronous networking framework written in Python")
9274 (description
9275 "Twisted is an extensible framework for Python programming, with special
9276 focus on event-based network programming and multiprotocol integration.")
9277 (license license:expat)))
9278
9279 (define-public python2-twisted
9280 (package-with-python2 python-twisted))
9281
9282 (define-public python-pika
9283 (package
9284 (name "python-pika")
9285 (version "0.10.0")
9286 (source
9287 (origin
9288 (method url-fetch)
9289 (uri (pypi-uri "pika" version))
9290 (sha256
9291 (base32
9292 "0nb4h08di432lv7dy2v9kpwgk0w92f24sqc2hw2s9vwr5b8v8xvj"))))
9293 (build-system python-build-system)
9294 (native-inputs
9295 `(("python-pyev" ,python-pyev)
9296 ("python-tornado" ,python-tornado)
9297 ("python-twisted" ,python-twisted)))
9298 (home-page "https://pika.readthedocs.org")
9299 (synopsis "Pure Python AMQP Client Library")
9300 (description
9301 "Pika is a pure-Python implementation of the AMQP (Advanced Message Queuing
9302 Protocol) 0-9-1 protocol that tries to stay fairly independent of the underlying
9303 network support library.")
9304 (license license:bsd-3)))
9305
9306 (define-public python2-pika
9307 (package-with-python2 python-pika))
9308
9309 (define-public python-ply
9310 (package
9311 (name "python-ply")
9312 (version "3.10")
9313 (source
9314 (origin
9315 (method url-fetch)
9316 (uri (pypi-uri "ply" version))
9317 (sha256
9318 (base32
9319 "1jxsr1d2f732r6ljhvm827113dckwl6qwakfvpbdhcbhvpvlmscn"))))
9320 (build-system python-build-system)
9321 (home-page "http://www.dabeaz.com/ply/")
9322 (synopsis "Python Lex & Yacc")
9323 (description "PLY is a @code{lex}/@code{yacc} implemented purely in Python.
9324 It uses LR parsing and does extensive error checking.")
9325 (license license:bsd-3)))
9326
9327 (define-public python2-ply
9328 (package-with-python2 python-ply))
9329
9330 (define-public python-tabulate
9331 (package
9332 (name "python-tabulate")
9333 (version "0.7.7")
9334 (source (origin
9335 (method url-fetch)
9336 (uri (pypi-uri "tabulate" version))
9337 (sha256
9338 (base32
9339 "1inqhspd4frxnp08c32yndr0lc4px1xfkqah184i5w09gkhvi843"))))
9340 (build-system python-build-system)
9341 (arguments
9342 ;; FIXME: The pypi release tarball is missing a 'test/common.py'
9343 ;; and the latest release is not tagged in the upstream repository.
9344 '(#:tests? #f))
9345 (home-page "https://bitbucket.org/astanin/python-tabulate")
9346 (synopsis "Pretty-print tabular data")
9347 (description
9348 "Tabulate is a library and command-line utility to pretty-print tabular
9349 data in Python.")
9350 (license license:expat)))
9351
9352 (define-public python2-tabulate
9353 (package-with-python2 python-tabulate))
9354
9355 (define-public python-kazoo
9356 (package
9357 (name "python-kazoo")
9358 (version "2.4.0")
9359 (source
9360 (origin
9361 (method url-fetch)
9362 (uri (pypi-uri "kazoo" version))
9363 (sha256
9364 (base32
9365 "16y213k7r8shyn2zw1k6lkzjgcrvm441pqv8scvcjixhvpbx3hm7"))))
9366 (build-system python-build-system)
9367 (arguments '(#:tests? #f)) ; XXX: needs zookeeper
9368 (propagated-inputs
9369 `(("python-six" ,python-six)))
9370 (home-page "https://kazoo.readthedocs.org")
9371 (synopsis "High-level Zookeeper client library")
9372 (description
9373 "Kazoo is a Python client library for the Apache Zookeeper distributed
9374 application service. It is designed to be easy to use and to avoid common
9375 programming errors.")
9376 (license license:asl2.0)))
9377
9378 (define-public python2-kazoo
9379 (package-with-python2 python-kazoo))
9380
9381 (define-public python-pykafka
9382 (package
9383 (name "python-pykafka")
9384 (version "2.4.0")
9385 (source (origin
9386 (method url-fetch)
9387 (uri (string-append
9388 "https://pypi.python.org/packages/8b/3e/"
9389 "384eeff406b06315738b62483fd2126c6e4f544167116b17cc04ea7d2a59/"
9390 "pykafka-" version ".tar.gz"))
9391 (sha256
9392 (base32
9393 "1id6sr159p6aa13bxcqyr9gln8sqg1l0ddzns5iws8kk5q1p5cfv"))))
9394 (build-system python-build-system)
9395 (arguments '(#:tests? #f)) ; XXX: needs zookeeper, kafka, etc.
9396 (propagated-inputs
9397 `(("python-gevent" ,python-gevent)
9398 ("python-kazoo" ,python-kazoo)
9399 ("python-tabulate" ,python-tabulate)))
9400 (inputs
9401 `(("librdkafka" ,librdkafka)))
9402 (home-page "https://pykafka.readthedocs.io/")
9403 (synopsis "Apache Kafka client for Python")
9404 (description
9405 "PyKafka is a client for the Apache Kafka distributed messaging system.
9406 It includes Python implementations of Kafka producers and consumers, which
9407 are optionally backed by a C extension built on librdkafka.")
9408 (license license:asl2.0)))
9409
9410 (define-public python2-pykafka
9411 (package-with-python2 python-pykafka))
9412
9413 (define-public python-wcwidth
9414 (package
9415 (name "python-wcwidth")
9416 (version "0.1.7")
9417 (source
9418 (origin
9419 (method url-fetch)
9420 (uri (pypi-uri "wcwidth" version))
9421 (sha256
9422 (base32
9423 "0pn6dflzm609m4r3i8ik5ni9ijjbb5fa3vg1n7hn6vkd49r77wrx"))))
9424 (build-system python-build-system)
9425 (home-page "https://github.com/jquast/wcwidth")
9426 (synopsis "Measure number of terminal column cells of wide-character codes")
9427 (description "Wcwidth measures the number of terminal column cells of
9428 wide-character codes. It is useful for those implementing a terminal emulator,
9429 or programs that carefully produce output to be interpreted by one. It is a
9430 Python implementation of the @code{wcwidth} and @code{wcswidth} C functions
9431 specified in POSIX.1-2001 and POSIX.1-2008.")
9432 (license license:expat)))
9433
9434 (define-public python2-wcwidth
9435 (package-with-python2 python-wcwidth))
9436
9437 (define-public python2-jsonrpclib
9438 (package
9439 (name "python2-jsonrpclib")
9440 (version "0.1.7")
9441 (source (origin
9442 (method url-fetch)
9443 (uri (string-append
9444 "https://pypi.python.org/packages/source/j/jsonrpclib/"
9445 "jsonrpclib-" version ".tar.gz"))
9446 (sha256
9447 (base32
9448 "02vgirw2bcgvpcxhv5hf3yvvb4h5wzd1lpjx8na5psdmaffj6l3z"))))
9449 (build-system python-build-system)
9450 (arguments
9451 `(#:tests? #f
9452 #:python ,python-2))
9453 (home-page "https://github.com/joshmarshall/jsonrpclib/")
9454 (synopsis "Implementation of JSON-RPC specification for Python")
9455 (description
9456 "This library is an implementation of the JSON-RPC specification.
9457 It supports both the original 1.0 specification, as well as the
9458 new (proposed) 2.0 spec, which includes batch submission, keyword arguments,
9459 etc.")
9460 (license license:asl2.0)))
9461
9462 (define-public python-chai
9463 (package
9464 (name "python-chai")
9465 (version "1.1.2")
9466 (source (origin
9467 (method url-fetch)
9468 (uri (pypi-uri "chai" version))
9469 (sha256
9470 (base32
9471 "1k6n6zbgrrs83crp6mr3yqj9zlv40b8rpisyrliwsq7naml2p3gz"))))
9472 (build-system python-build-system)
9473 (home-page "https://github.com/agoragames/chai")
9474 (synopsis "Mocking framework for Python")
9475 (description
9476 "Chai provides an api for mocking, stubbing and spying your python
9477 objects, patterned after the Mocha library for Ruby.")
9478 (license license:bsd-3)))
9479
9480 (define-public python2-chai
9481 (package-with-python2 python-chai))
9482
9483 (define-public python-inflection
9484 (package
9485 (name "python-inflection")
9486 (version "0.3.1")
9487 (source
9488 (origin (method url-fetch)
9489 (uri (pypi-uri "inflection" version))
9490 (sha256
9491 (base32
9492 "1jhnxgnw8y3mbzjssixh6qkc7a3afc4fygajhqrqalnilyvpzshq"))))
9493 (build-system python-build-system)
9494 (native-inputs
9495 `(("python-pytest" ,python-pytest)))
9496 (home-page "https://github.com/jpvanhal/inflection")
9497 (synopsis "Python string transformation library")
9498 (description
9499 "Inflection is a string transformation library. It singularizes
9500 and pluralizes English words, and transforms strings from CamelCase to
9501 underscored string.")
9502 (license license:expat)))
9503
9504 (define-public python2-inflection
9505 (package-with-python2 python-inflection))
9506
9507 (define-public python-pylev
9508 (package
9509 (name "python-pylev")
9510 (version "1.3.0")
9511 (source (origin
9512 (method url-fetch)
9513 (uri (pypi-uri "pylev" version))
9514 (sha256
9515 (base32
9516 "1hz1x9blsbxya1y9nnhnwwdnqmakxi9mc0jkwj0rn6b1h44i0f86"))))
9517 (build-system python-build-system)
9518 (home-page "https://github.com/toastdriven/pylev")
9519 (synopsis "Levenshtein distance implementation in Python")
9520 (description "Pure Python Levenshtein implementation, based off the
9521 Wikipedia code samples at
9522 @url{http://en.wikipedia.org/wiki/Levenshtein_distance}.")
9523 (license license:bsd-3)))
9524
9525 (define-public python2-pylev
9526 (package-with-python2 python-pylev))
9527
9528 (define-public python-cleo
9529 (package
9530 (name "python-cleo")
9531 (version "0.6.1")
9532 (source (origin
9533 (method url-fetch)
9534 (uri (pypi-uri "cleo" version))
9535 (sha256
9536 (base32
9537 "0q1cf0szr0d54am4pypzwdnm74zpladdsinad94c2fz5i06fdpf7"))))
9538 (build-system python-build-system)
9539 (native-inputs
9540 `(;; For testing
9541 ("python-mock" ,python-mock)
9542 ("python-pytest-mock" ,python-pytest-mock)
9543 ("python-pytest" ,python-pytest)))
9544 (propagated-inputs
9545 `(("python-backpack" ,python-backpack)
9546 ("python-pastel" ,python-pastel)
9547 ("python-pylev" ,python-pylev)))
9548 (home-page "https://github.com/sdispater/cleo")
9549 (synopsis "Command-line arguments library for Python")
9550 (description
9551 "Cleo allows you to create command-line commands with signature in
9552 docstring and colored output.")
9553 (license license:expat)))
9554
9555 (define-public python2-cleo
9556 (package-with-python2 python-cleo))
9557
9558 (define-public python-lazy-object-proxy
9559 (package
9560 (name "python-lazy-object-proxy")
9561 (version "1.3.1")
9562 (source (origin
9563 (method url-fetch)
9564 (uri (pypi-uri "lazy-object-proxy" version))
9565 (sha256
9566 (base32
9567 "0yha7q9bhw857fwaby785d63mffhngl9npwzlk9i0pwlkwvbx4gb"))))
9568 (build-system python-build-system)
9569 (home-page "https://github.com/ionelmc/python-lazy-object-proxy")
9570 (synopsis "Lazy object proxy for python")
9571 (description
9572 "Lazy object proxy is an object that wraps a callable but defers the call
9573 until the object is actually required, and caches the result of said call.")
9574 (license license:bsd-2)))
9575
9576 (define-public python2-lazy-object-proxy
9577 (package-with-python2 python-lazy-object-proxy))
9578
9579 (define-public python-dnspython
9580 (package
9581 (name "python-dnspython")
9582 (version "1.15.0")
9583 (source (origin
9584 (method url-fetch)
9585 (uri (string-append "http://www.dnspython.org/kits/"
9586 version "/dnspython-" version ".tar.gz"))
9587 (sha256
9588 (base32
9589 "0jr4v2pd90i6l1xxbss2m05psbjaxvyvvvpq44wycijpfgjqln8i"))))
9590 (build-system python-build-system)
9591 (arguments '(#:tests? #f)) ; XXX: requires internet access
9592 (home-page "http://www.dnspython.org")
9593 (synopsis "DNS toolkit for Python")
9594 (description
9595 "dnspython is a DNS toolkit for Python. It supports almost all record
9596 types. It can be used for queries, zone transfers, and dynamic updates.
9597 It supports TSIG authenticated messages and EDNS0.")
9598 (license license:expat)))
9599
9600 (define-public python2-dnspython
9601 (package-with-python2 python-dnspython))
9602
9603 (define-public python-email-validator
9604 (package
9605 (name "python-email-validator")
9606 (version "1.0.2")
9607 (source
9608 (origin (method url-fetch)
9609 (uri (pypi-uri "email_validator" version))
9610 (sha256
9611 (base32
9612 "1ja9149l9ck5n45a72h3is7v476hjny5ybxbcamx1nw6iplsm7k6"))))
9613 (build-system python-build-system)
9614 (arguments
9615 '(#:phases
9616 (modify-phases %standard-phases
9617 (add-before 'build 'use-dnspython
9618 (lambda _
9619 (substitute* "setup.py"
9620 (("dnspython3") "dnspython"))
9621 #t)))))
9622 (propagated-inputs
9623 `(("python-dnspython" ,python-dnspython)
9624 ("python-idna" ,python-idna)))
9625 (home-page "https://github.com/JoshData/python-email-validator")
9626 (synopsis "Email address validation library for Python")
9627 (description
9628 "This library validates email address syntax and deliverability.")
9629 (license license:cc0)))
9630
9631 (define-public python2-email-validator
9632 (package-with-python2 python-email-validator))
9633
9634 (define-public python-ukpostcodeparser
9635 (package
9636 (name "python-ukpostcodeparser")
9637 (version "1.0.3")
9638 (source (origin
9639 (method url-fetch)
9640 (uri (pypi-uri "UkPostcodeParser" version))
9641 (sha256
9642 (base32
9643 "1jwg9z4rz51mcka1821rwgycsd0mcicyp1kiwjfa2kvg8bm9p2qd"))))
9644 (build-system python-build-system)
9645 (home-page "https://github.com/hamstah/ukpostcodeparser")
9646 (synopsis "UK Postcode parser for Python")
9647 (description
9648 "This library provides the @code{parse_uk_postcode} function for
9649 parsing UK postcodes.")
9650 (license license:expat)))
9651
9652 (define-public python2-ukpostcodeparser
9653 (package-with-python2 python-ukpostcodeparser))
9654
9655 (define-public python-faker
9656 (package
9657 (name "python-faker")
9658 (version "0.7.9")
9659 (source (origin
9660 (method url-fetch)
9661 (uri (pypi-uri "Faker" version))
9662 (sha256
9663 (base32
9664 "1fh2p2yz0fsdr4fqwxgddwbvfb6qn6vp8yx0qwqzra27yq5d1wsm"))
9665 (patches
9666 (search-patches "python-faker-fix-build-32bit.patch"))
9667 (modules '((guix build utils)))
9668 (snippet
9669 '(begin
9670 (for-each delete-file (find-files "." "\\.pyc$"))
9671 #t))))
9672 (build-system python-build-system)
9673 (arguments
9674 '(#:phases
9675 (modify-phases %standard-phases
9676 (replace 'check
9677 (lambda _
9678 (zero? (system* "python" "-m" "unittest" "-v" "tests")))))))
9679 (native-inputs
9680 `(;; For testing
9681 ("python-email-validator" ,python-email-validator)
9682 ("python-mock" ,python-mock)
9683 ("python-ukpostcodeparser" ,python-ukpostcodeparser)))
9684 (propagated-inputs
9685 `(("python-dateutil" ,python-dateutil)
9686 ("python-six" ,python-six)))
9687 (home-page "https://github.com/joke2k/faker")
9688 (synopsis "Python package that generates fake data")
9689 (description
9690 "Faker is a Python package that generates fake data such as names,
9691 addresses, and phone numbers.")
9692 (license license:expat)
9693 (properties `((python2-variant . ,(delay python2-faker))))))
9694
9695 (define-public python2-faker
9696 (let ((base (package-with-python2 (strip-python2-variant
9697 python-faker))))
9698 (package
9699 (inherit base)
9700 (propagated-inputs
9701 `(("python2-ipaddress" ,python2-ipaddress)
9702 ,@(package-propagated-inputs base))))))
9703
9704 (define-public python-pyaml
9705 (package
9706 (name "python-pyaml")
9707 (version "17.7.2")
9708 (source (origin
9709 (method url-fetch)
9710 (uri (pypi-uri "pyaml" version))
9711 (sha256
9712 (base32
9713 "132grrw0ajq4nrappi3ldbkb952k7yn9b6c7csi2rmvzm1g6ppp2"))))
9714 (build-system python-build-system)
9715 (native-inputs
9716 `(("python-unidecode" ,python-unidecode)))
9717 (propagated-inputs
9718 `(("python-pyyaml" ,python-pyyaml)))
9719 (home-page "https://github.com/mk-fg/pretty-yaml")
9720 (synopsis "YAML pretty-print library for Python")
9721 (description
9722 "pyaml is a PyYAML based python module to produce pretty and readable
9723 YAML-serialized data.")
9724 (license (license:non-copyleft "http://www.wtfpl.net/txt/copying/"))))
9725
9726 (define-public python2-pyaml
9727 (package-with-python2 python-pyaml))
9728
9729 (define-public python-backpack
9730 (package
9731 (name "python-backpack")
9732 (version "0.1")
9733 (source
9734 (origin
9735 (method url-fetch)
9736 (uri (pypi-uri "backpack" version))
9737 (sha256
9738 (base32
9739 "14rq1mvm0jda90lcx9gyyby9dvq4x3js2cmxvd6vl4686ixwyqh1"))))
9740 (build-system python-build-system)
9741 (native-inputs
9742 `(("python-pytest" ,python-pytest)
9743 ("python-nose" ,python-nose)))
9744 (propagated-inputs
9745 `(("python-simplejson" ,python-simplejson)))
9746 (home-page "https://github.com/sdispater/backpack")
9747 (synopsis "Utilities for working with Python collections")
9748 (description "Backpack provides some useful utilities for working with
9749 collections of data.")
9750 (license license:expat)))
9751
9752 (define-public python2-backpack
9753 (package-with-python2 python-backpack))
9754
9755 (define-public python-prompt-toolkit
9756 (package
9757 (name "python-prompt-toolkit")
9758 (version "1.0.15")
9759 (source
9760 (origin
9761 (method url-fetch)
9762 (uri (pypi-uri "prompt_toolkit" version ".tar.gz"))
9763 (sha256
9764 (base32
9765 "05v9h5nydljwpj5nm8n804ms0glajwfy1zagrzqrg91wk3qqi1c5"))))
9766 (build-system python-build-system)
9767 (arguments
9768 '(#:tests? #f)) ; The test suite uses some Windows-specific data types.
9769 (propagated-inputs
9770 `(("python-wcwidth" ,python-wcwidth)
9771 ("python-six" ,python-six)
9772 ("python-pygments" ,python-pygments)))
9773 (home-page "https://github.com/jonathanslenders/python-prompt-toolkit")
9774 (synopsis "Library for building command line interfaces in Python")
9775 (description
9776 "Prompt-Toolkit is a library for building interactive command line
9777 interfaces in Python. It's like GNU Readline but it also features syntax
9778 highlighting while typing, out-of-the-box multi-line input editing, advanced
9779 code completion, incremental search, support for Chinese double-width
9780 characters, mouse support, and auto suggestions.")
9781 (license license:bsd-3)))
9782
9783 (define-public python2-prompt-toolkit
9784 (package-with-python2 python-prompt-toolkit))
9785
9786 (define-public python-jedi
9787 (package
9788 (name "python-jedi")
9789 (version "0.12.1")
9790 (source
9791 (origin
9792 (method url-fetch)
9793 (uri (pypi-uri "jedi" version))
9794 (sha256
9795 (base32
9796 "1h8ypnjisn57kiv1zqrkj1im6sbfnhxllqaa8znh39qkd47ys2dl"))))
9797 (build-system python-build-system)
9798 (arguments
9799 `(#:phases
9800 (modify-phases %standard-phases
9801 (replace 'check (lambda _
9802 (invoke "py.test" "-vv"))))))
9803 (native-inputs
9804 `(("python-pytest" ,python-pytest)
9805 ("python-docopt" ,python-docopt)))
9806 (propagated-inputs
9807 `(("python-parso" ,python-parso)))
9808 (home-page "https://github.com/davidhalter/jedi")
9809 (synopsis "Autocompletion and static analysis library for Python")
9810 (description
9811 "Jedi is a static analysis tool for Python that can be used in Integrated
9812 Development Environments (@dfn{IDE}s) and text editors. It understands Python
9813 on a deeper level than many other static analysis frameworks for Python.
9814
9815 Jedi understands docstrings and you can use Jedi autocompletion in your REPL as
9816 well.")
9817 (license license:expat)))
9818
9819 (define-public python2-jedi
9820 (package-with-python2 python-jedi))
9821
9822 (define-public ptpython
9823 (package
9824 (name "ptpython")
9825 (version "0.34")
9826 (source (origin
9827 (method url-fetch)
9828 (uri (pypi-uri "ptpython" version))
9829 (sha256
9830 (base32
9831 "1mmbiyzf0n8hm7z2a562x7w5cbl6jc0zsk6vp40q1z4cyblv1k13"))))
9832 (build-system python-build-system)
9833 (arguments
9834 '(#:tests? #f)) ; FIXME: No tests in pypi tarball.
9835 (propagated-inputs
9836 `(("python-docopt" ,python-docopt)
9837 ("python-jedi" ,python-jedi)
9838 ("python-prompt-toolkit" ,python-prompt-toolkit)
9839 ("python-pygments" ,python-pygments)))
9840 (home-page "https://github.com/jonathanslenders/ptpython")
9841 (synopsis "Python Read-Eval-Print-Loop with nice IDE-like features")
9842 (description
9843 "ptpython is a Python read-eval-print loop with IDE-like features.
9844 It supports syntax highlighting, multiline editing, autocompletion, mouse,
9845 color schemes, bracketed paste, Vi and Emacs keybindings, Chinese characters
9846 etc.")
9847 (license license:bsd-3)
9848 (properties `((python2-variant . ,(delay ptpython-2))))))
9849
9850 (define-public ptpython-2
9851 (let ((base (package-with-python2 (strip-python2-variant ptpython))))
9852 (package
9853 (inherit base)
9854 (name "ptpython2"))))
9855
9856 (define-public python-stem
9857 (package
9858 (name "python-stem")
9859 (version "1.6.0")
9860 (source
9861 (origin
9862 (method url-fetch)
9863 (uri (pypi-uri "stem" version))
9864 (sha256
9865 (base32
9866 "1va9p3ij7lxg6ixfsvaql06dn11l3fgpxmss1dhlvafm7sqizznp"))))
9867 (build-system python-build-system)
9868 (arguments
9869 `(#:phases
9870 (modify-phases %standard-phases
9871 (add-before 'check 'fix-test-environment
9872 (lambda _
9873 ;; Fixes: FileNotFoundError: [Errno 2] No such file or directory:
9874 ;; '/tmp/guix-build-python-stem-1.6.0.drv-0/stem-1.6.0/.gitignore'.
9875 (with-output-to-file ".gitignore"
9876 (lambda _ (format #t "%")))
9877 #t))
9878 (replace 'check
9879 (lambda _
9880 (invoke "./run_tests.py" "--unit")
9881 #t)))))
9882 (native-inputs
9883 `(("python-mock" ,python-mock)
9884 ("python-pep8" ,python-pep8)
9885 ("python-pyflakes" ,python-pyflakes)))
9886 (home-page "https://stem.torproject.org/")
9887 (synopsis
9888 "Python controller library that allows applications to interact with Tor")
9889 (description
9890 "Stem is a Python controller library for Tor. With it you can use Tor's
9891 control protocol to script against the Tor process and read descriptor data
9892 relays publish about themselves.")
9893 (license license:lgpl3)))
9894
9895 (define-public python2-stem
9896 (package-with-python2 python-stem))
9897
9898 (define-public python-pyserial
9899 (package
9900 (name "python-pyserial")
9901 (version "3.1.1")
9902 (source
9903 (origin
9904 (method url-fetch)
9905 (uri (pypi-uri "pyserial" version))
9906 (sha256
9907 (base32
9908 "0k1nfdrxxkdlv4zgaqsdv8li0pj3gbh2pyxw8q2bsg6f9490amyn"))))
9909 (build-system python-build-system)
9910 (arguments
9911 '(#:tests? #f)) ; FIXME: 3/49 tests are failing.
9912 ;; #:phases
9913 ;; (modify-phases %standard-phases
9914 ;; (replace 'check
9915 ;; (lambda _
9916 ;; (zero? (system* "python" "test/run_all_tests.py" "loop://")))))))
9917 (home-page
9918 "https://github.com/pyserial/pyserial")
9919 (synopsis "Python Serial Port Bindings")
9920 (description "@code{pyserial} provide serial port bindings for Python. It
9921 supports different byte sizes, stop bits, parity and flow control with RTS/CTS
9922 and/or Xon/Xoff. The port is accessed in RAW mode.")
9923 (license license:bsd-3)))
9924
9925 (define-public python2-pyserial
9926 (package-with-python2 python-pyserial))
9927
9928 (define-public python-kivy
9929 (package
9930 (name "python-kivy")
9931 (version "1.10.1")
9932 (source
9933 (origin
9934 (method url-fetch)
9935 (uri (pypi-uri "Kivy" version))
9936 (file-name (string-append name "-" version ".tar.gz"))
9937 (sha256
9938 (base32
9939 "1zzxjdp78hfjjiklzr82l4zwibwcq4j6kgicspqs6iyyfn5yisbw"))))
9940 (build-system python-build-system)
9941 (arguments
9942 `(#:tests? #f ; Tests require many optional packages
9943 #:phases
9944 (modify-phases %standard-phases
9945 (add-after 'patch-generated-file-shebangs 'set-sdl-paths
9946 (lambda* (#:key inputs #:allow-other-keys)
9947 (setenv "KIVY_SDL2_PATH"
9948 (string-append (assoc-ref inputs "sdl-union")
9949 "/include/SDL2"))
9950 #t)))))
9951 (native-inputs
9952 `(("git" ,git)
9953 ("pkg-config" ,pkg-config)
9954 ("python-cython" ,python-cython)))
9955 (inputs
9956 `(("gstreamer" ,gstreamer)
9957 ("mesa" ,mesa)
9958 ("sdl-union"
9959 ,(sdl-union (list sdl2 sdl2-image sdl2-mixer sdl2-ttf)))))
9960 (home-page "http://kivy.org")
9961 (synopsis
9962 "Multitouch application framework")
9963 (description
9964 "A software library for rapid development of
9965 hardware-accelerated multitouch applications.")
9966 (license license:expat)))
9967
9968 (define-public python2-kivy
9969 (package-with-python2 python-kivy))
9970
9971 (define-public python-kivy-next
9972 (let ((commit "a988c5e7a47da56263ff39514264a3de516ef2fe")
9973 (revision "1"))
9974 (package (inherit python-kivy)
9975 (name "python-kivy-next")
9976 (version (string-append "1.9.1-" revision "."
9977 (string-take commit 7)))
9978 (source
9979 (origin
9980 (method git-fetch)
9981 (uri (git-reference
9982 (url "https://github.com/kivy/kivy")
9983 (commit commit)))
9984 (file-name (string-append name "-" version "-checkout"))
9985 (sha256
9986 (base32
9987 "0jk92b4a8l7blkvkgkjihk171s0dfnq582cckff5srwc8kal5m0p")))))))
9988
9989 (define-public python2-kivy-next
9990 (package-with-python2 python-kivy-next))
9991
9992 (define-public python-binaryornot
9993 (package
9994 (name "python-binaryornot")
9995 (version "0.4.4")
9996 (source (origin
9997 (method url-fetch)
9998 (uri (pypi-uri "binaryornot" version))
9999 (sha256
10000 (base32
10001 "0qc006986rb6bcbmiymwgcl1mns2jphr1j7sr7nk41nlr7gh359m"))))
10002 (build-system python-build-system)
10003 (propagated-inputs
10004 `(("python-chardet" ,python-chardet)
10005 ("python-hypothesis" ,python-hypothesis)))
10006 (home-page "https://github.com/audreyr/binaryornot")
10007 (synopsis "Package to check if a file is binary or text")
10008 (description "Ultra-lightweight pure Python package to check if a file is
10009 binary or text.")
10010 (license license:bsd-3)
10011 (properties `((python2-variant . ,(delay python2-binaryornot))))))
10012
10013 (define-public python2-binaryornot
10014 (let ((base (package-with-python2 (strip-python2-variant python-binaryornot))))
10015 (package (inherit base)
10016 (propagated-inputs
10017 `(("python2-enum34" ,python2-enum34)
10018 ,@(package-propagated-inputs base))))))
10019
10020 (define-public python-nltk
10021 (package
10022 (name "python-nltk")
10023 (version "3.2.1")
10024 (source (origin
10025 (method url-fetch)
10026 (uri (pypi-uri "nltk" version))
10027 (sha256
10028 (base32
10029 "0skxbhnymwlspjkzga0f7x1hg3y50fwpfghs8g8k7fh6f4nknlym"))))
10030 (build-system python-build-system)
10031 (arguments
10032 '(;; The tests require some extra resources to be downloaded.
10033 ;; TODO Try packaging these resources.
10034 #:tests? #f))
10035 (home-page "http://nltk.org/")
10036 (synopsis "Natural Language Toolkit")
10037 (description "It provides interfaces to over 50 corpora and lexical
10038 resources such as WordNet, along with a suite of text processing libraries
10039 for classification, tokenization, stemming, tagging, parsing, and semantic
10040 reasoning, wrappers for natural language processing libraries.")
10041 (license license:asl2.0)))
10042
10043 (define-public python2-nltk
10044 (package-with-python2 python-nltk))
10045
10046 (define-public python-pymongo
10047 (package
10048 (name "python-pymongo")
10049 (version "3.7.2")
10050 (source (origin
10051 (method url-fetch)
10052 (uri (pypi-uri "pymongo" version))
10053 (sha256
10054 (base32
10055 "0zis4707r9hdg5qgkhp3wss9camr9h56ixyfc8n9dxwlnnly4x4c"))))
10056 (build-system python-build-system)
10057 (propagated-inputs
10058 `(("python-certifi" ,python-certifi)))
10059 (home-page "https://github.com/mongodb/mongo-python-driver")
10060 (synopsis "Python driver for MongoDB")
10061 (description "Python driver for MongoDB.")
10062 (license license:asl2.0)))
10063
10064 (define-public python2-pymongo
10065 (package-with-python2 python-pymongo))
10066
10067 (define-public python-sh
10068 (package
10069 (name "python-sh")
10070 (version "1.11")
10071 (source (origin
10072 (method url-fetch)
10073 (uri (pypi-uri "sh" version))
10074 (sha256
10075 (base32
10076 "192r0mpv6dmkysjzhc43ddffiwb5g7c76bgr1mb1z2xz9awbj3sr"))))
10077 (build-system python-build-system)
10078 (arguments
10079 `(#:tests? #f)) ; no tests
10080 (home-page "https://github.com/amoffat/sh")
10081 (synopsis "Python subprocess interface")
10082 (description "Abstracts process invocation by providing a function
10083 interface for programs.")
10084 (license license:expat)))
10085
10086 (define-public python2-sh
10087 (package-with-python2 python-sh))
10088
10089 (define-public python-consul
10090 (package
10091 (name "python-consul")
10092 (version "0.6.1")
10093 (source
10094 (origin
10095 (method url-fetch)
10096 (uri (pypi-uri "python-consul" version))
10097 (sha256
10098 (base32
10099 "0rfyxcy4cr3x848vhx876ifalxd5ghq6l5x813m49h4vq2d4jiq8"))))
10100 (build-system python-build-system)
10101 (arguments
10102 '(#:tests? #f)) ; The tests are not distributed
10103 (propagated-inputs
10104 `(("python-requests" ,python-requests)
10105 ("python-six" ,python-six)))
10106 (home-page "https://github.com/cablehead/python-consul")
10107 (synopsis "Python client for Consul")
10108 (description
10109 "Python client for @url{http://www.consul.io/,Consul}, a tool for service
10110 discovery, monitoring and configuration.")
10111 (license license:expat)))
10112
10113 (define-public python2-consul
10114 (package-with-python2 python-consul))
10115
10116 (define-public python-schematics
10117 (package
10118 (name "python-schematics")
10119 (version "1.1.1")
10120 (source
10121 (origin
10122 (method url-fetch)
10123 (uri (string-append
10124 "https://github.com/schematics/schematics/archive/v" version ".tar.gz"))
10125 (file-name (string-append name "-" version ".tar.gz"))
10126 (sha256
10127 (base32
10128 "19v1i69bf3bzarfxmbv0v6ivpcn758x3shvbiy9l2hy0lvqwnp6l"))))
10129 (build-system python-build-system)
10130 (propagated-inputs
10131 `(("python-six" ,python-six)))
10132 (arguments
10133 `(#:tests? #f)) ; requires a bunch of not very nice packages with fixed
10134 ; version requirements (eg python-coveralls)
10135 (home-page "https://github.com/schematics/schematics")
10136 (synopsis "Python Data Structures for Humans")
10137 (description "Python Data Structures for Humans.")
10138 (license license:bsd-3)))
10139
10140 (define-public python2-schematics
10141 (package-with-python2 python-schematics))
10142
10143 (define-public python-odfpy
10144 (package
10145 (name "python-odfpy")
10146 (version "1.3.3")
10147 (source (origin
10148 (method url-fetch)
10149 (uri (pypi-uri "odfpy" version))
10150 (sha256
10151 (base32
10152 "1a6ms0w9zfhhkqhvrnynwwbxrivw6hgjc0s5k7j06npc7rq0blxw"))))
10153 (arguments
10154 `(#:modules ((srfi srfi-1)
10155 (guix build python-build-system)
10156 (guix build utils))
10157 #:phases
10158 (modify-phases %standard-phases
10159 (replace 'check
10160 ;; The test runner invokes python2 and python3 for test*.py.
10161 ;; To avoid having both in inputs, we replicate it here.
10162 (lambda _
10163 (every (lambda (test-file)
10164 (zero? (system* "python" test-file)))
10165 (find-files "tests" "^test.*\\.py$")))))))
10166 (build-system python-build-system)
10167 (home-page "https://github.com/eea/odfpy")
10168 (synopsis "Python API and tools to manipulate OpenDocument files")
10169 (description "Collection of libraries and utility programs written in
10170 Python to manipulate OpenDocument 1.2 files.")
10171 (license
10172 ;; The software is mainly dual GPL2+ and ASL2.0, but includes a
10173 ;; number of files with other licenses.
10174 (list license:gpl2+ license:asl2.0 license:lgpl2.1+ license:cc-by-sa3.0))))
10175
10176 (define-public python2-odfpy
10177 (package-with-python2 python-odfpy))
10178
10179 (define-public python-natsort
10180 (package
10181 (name "python-natsort")
10182 (version "5.4.1")
10183 (source (origin
10184 (method url-fetch)
10185 (uri (pypi-uri "natsort" version))
10186 (sha256
10187 (base32
10188 "0i732amg6yzkx4g4c9j09jmqq39q377x9cl2nbkm5hax2c2v0wxf"))))
10189 (build-system python-build-system)
10190 (arguments
10191 `(#:modules ((guix build utils)
10192 (guix build python-build-system)
10193 (srfi srfi-1)
10194 (srfi srfi-26)
10195 (ice-9 ftw))
10196 #:phases
10197 (modify-phases %standard-phases
10198 (add-before 'check 'set-cachedir
10199 ;; Tests require write access to $HOME by default
10200 (lambda _ (setenv "PYTHON_EGG_CACHE" "/tmp") #t))
10201 (replace 'check
10202 (lambda _
10203 (let ((cwd (getcwd)))
10204 (setenv "PYTHONPATH"
10205 (string-append
10206 cwd "/build/"
10207 (find (cut string-prefix? "lib" <>)
10208 (scandir (string-append cwd "/build")))
10209 ":"
10210 (getenv "PYTHONPATH")))
10211 (invoke "pytest" "-v")))))))
10212 (native-inputs
10213 `(("python-hypothesis" ,python-hypothesis)
10214 ("python-pytest-cov" ,python-pytest-cov)
10215 ("python-pytest-mock" ,python-pytest-mock)
10216 ("python-pytest" ,python-pytest)))
10217 (propagated-inputs ; TODO: Add python-fastnumbers.
10218 `(("python-pyicu" ,python-pyicu)))
10219 (home-page "https://github.com/SethMMorton/natsort")
10220 (synopsis "Natural sorting for python and shell")
10221 (description
10222 "Natsort lets you apply natural sorting on lists instead of
10223 lexicographical. If you use the built-in @code{sorted} method in python
10224 on a list such as @code{['a20', 'a9', 'a1', 'a4', 'a10']}, it would be
10225 returned as @code{['a1', 'a10', 'a20', 'a4', 'a9']}. Natsort provides a
10226 function @code{natsorted} that identifies numbers and sorts them separately
10227 from strings. It can also sort version numbers, real numbers, mixed types
10228 and more, and comes with a shell command @command{natsort} that exposes this
10229 functionality in the command line.")
10230 (license license:expat)
10231 (properties `((python2-variant . ,(delay python2-natsort))))))
10232
10233 (define-public python2-natsort
10234 (let ((base (package-with-python2 (strip-python2-variant python-natsort))))
10235 (package (inherit base)
10236 (native-inputs
10237 `(("python2-pathlib" ,python2-pathlib)
10238 ,@(package-native-inputs base))))))
10239
10240 (define-public python-glances
10241 (package
10242 (name "python-glances")
10243 (version "3.0.2")
10244 (source
10245 (origin
10246 (method url-fetch)
10247 (uri (pypi-uri "Glances" version))
10248 (sha256
10249 (base32
10250 "09fxysfp1n16csqvzvawy74qm6a94nvwjf3vcf5gkqp4i6k4vjjy"))))
10251 (build-system python-build-system)
10252 (propagated-inputs
10253 `(("python-psutil" ,python-psutil)))
10254 (home-page
10255 "https://github.com/nicolargo/glances")
10256 (synopsis
10257 "A cross-platform curses-based monitoring tool")
10258 (description
10259 "Glances is a curses-based monitoring tool for a wide variety of platforms.
10260 Glances uses the PsUtil library to get information from your system. It monitors
10261 CPU, load, memory, network bandwidth, disk I/O, disk use, and more.")
10262 (license license:lgpl3+)))
10263
10264 (define-public python2-glances
10265 (package-with-python2 python-glances))
10266
10267 (define-public python-graphql-core
10268 (package
10269 (name "python-graphql-core")
10270 (version "0.5.3")
10271 (source
10272 (origin
10273 (method url-fetch)
10274 (uri (pypi-uri "graphql-core" version))
10275 (sha256
10276 (base32
10277 "0rsaarx2sj4xnw9966rhh4haiqaapm4lm2mfqm48ywd51j5vh1a0"))))
10278 (build-system python-build-system)
10279 (arguments
10280 `(#:tests? #f ; Tests require the unpackaged pytest-benchmark.
10281 #:phases
10282 (modify-phases %standard-phases
10283 (add-after 'unpack 'patch-hardcoded-version
10284 (lambda _ (substitute*
10285 "setup.py"
10286 (("'gevent==1.1rc1'") "'gevent'"))
10287 #t)))))
10288 (native-inputs
10289 `(("python-gevent" ,python-gevent)
10290 ("python-mock" ,python-mock)
10291 ("python-pytest-mock" ,python-pytest-mock)))
10292 (propagated-inputs
10293 `(("python-promise" ,python-promise)
10294 ("python-six" ,python-six)))
10295 (home-page "https://github.com/graphql-python/graphql-core")
10296 (synopsis "GraphQL implementation for Python")
10297 (description
10298 "GraphQL implementation for Python. GraphQL is a data query language and
10299 runtime designed and used to request and deliver data to mobile and web apps.
10300 This library is a port of @url{https://github.com/graphql/graphql-js,graphql-js}
10301 to Python.")
10302 (license license:expat)))
10303
10304 (define-public python2-graphql-core
10305 (package-with-python2 python-graphql-core))
10306
10307 (define-public python-graphql-relay
10308 (package
10309 (name "python-graphql-relay")
10310 (version "0.4.5")
10311 (source
10312 (origin
10313 (method url-fetch)
10314 (uri (pypi-uri "graphql-relay" version))
10315 (sha256
10316 (base32
10317 "1nv5dxcj59zv31qvl8bd142njmxcmymny2dz3br1l2cpbljbf5i7"))))
10318 (build-system python-build-system)
10319 (arguments
10320 '(#:tests? #f)) ; The tests are not distributed
10321 (propagated-inputs
10322 `(("python-graphql-core" ,python-graphql-core)
10323 ("python-promise" ,python-promise)
10324 ("python-six" ,python-six)))
10325 (home-page "https://github.com/graphql-python/graphql-relay-py")
10326 (synopsis "Relay implementation for Python")
10327 (description
10328 "This is a library to allow the easy creation of Relay-compliant servers
10329 using the GraphQL Python reference implementation of a GraphQL server. It
10330 should be noted that the code is a exact port of the original
10331 @url{https://github.com/graphql/graphql-relay-js,graphql-relay js implementation}
10332 from Facebook.")
10333 (license license:expat)))
10334
10335 (define-public python2-graphql-relay
10336 (package-with-python2 python-graphql-relay))
10337
10338 (define-public python-graphene
10339 (package
10340 (name "python-graphene")
10341 (version "0.10.2")
10342 (source
10343 (origin
10344 (method url-fetch)
10345 (uri (pypi-uri "graphene" version))
10346 (sha256
10347 (base32
10348 "09zhac7igh9ixdz0ay6csy35b40l1jwbf2wrbxmgxwfhy51iy06q"))))
10349 (build-system python-build-system)
10350 (propagated-inputs
10351 `(("python-graphql-core" ,python-graphql-core)
10352 ("python-graphql-relay" ,python-graphql-relay)
10353 ("python-iso8601" ,python-iso8601)
10354 ("python-promise" ,python-promise)
10355 ("python-six" ,python-six)))
10356 (arguments
10357 `(#:tests? #f)) ; no tests/ in the PyPI tarball
10358 (home-page "http://graphene-python.org/")
10359 (synopsis "GraphQL Framework for Python")
10360 (description
10361 "Graphene is a Python library for building GraphQL schemas/types.
10362 A GraphQL schema describes your data model, and provides a GraphQL server
10363 with an associated set of resolve methods that know how to fetch data.")
10364 (properties `((python2-variant . ,(delay python2-graphene))))
10365 (license license:expat)))
10366
10367 (define-public python2-graphene
10368 (let ((base (package-with-python2
10369 (strip-python2-variant python-graphene))))
10370 (package (inherit base)
10371 (native-inputs
10372 `(("python2-sqlalchemy" ,python2-sqlalchemy)
10373 ,@(package-native-inputs base))))))
10374
10375 (define-public python-nautilus
10376 (package
10377 (name "python-nautilus")
10378 (version "0.4.9")
10379 (source
10380 (origin
10381 (method url-fetch)
10382 (uri (pypi-uri "nautilus" version))
10383 (sha256
10384 (base32
10385 "01hwzjc1zshk4vvxrcghm398fpy4jls66dyz06g07mrwqif8878p"))))
10386 (build-system python-build-system)
10387 (arguments `(#:tests? #f)) ; fails to import test modules
10388 (propagated-inputs
10389 `(("python-bcrypt" ,python-bcrypt)
10390 ("python-click" ,python-click)
10391 ("python-consul" ,python-consul)
10392 ("python-graphene" ,python-graphene)
10393 ("python-jinja2" ,python-jinja2)
10394 ("python-peewee" ,python-peewee)
10395 ("python-pika" ,python-pika)
10396 ("python-tornado" ,python-tornado)
10397 ("python-wtforms" ,python-wtforms)))
10398 (native-inputs
10399 `(("python-nose2" ,python-nose2)))
10400 (home-page "https://github.com/AlecAivazis/nautilus")
10401 (synopsis "Library for creating microservice applications")
10402 (description
10403 "Nautilus is a framework for flux based microservices that looks to
10404 provide extendible implementations of common aspects of a cloud so that you can
10405 focus on building massively scalable web applications.")
10406 (license license:expat)))
10407
10408 (define-public python-snowballstemmer
10409 (package
10410 (name "python-snowballstemmer")
10411 (version "1.2.1")
10412 (source (origin
10413 (method url-fetch)
10414 (uri (pypi-uri "snowballstemmer" version))
10415 (sha256
10416 (base32
10417 "0a0idq4y5frv7qsg2x62jd7rd272749xk4x99misf5rcifk2d7wi"))))
10418 (build-system python-build-system)
10419 (arguments
10420 `(;; No tests exist
10421 #:tests? #f))
10422 (home-page "https://github.com/shibukawa/snowball_py")
10423 (synopsis "Snowball stemming library collection for Python")
10424 (description "This package provides 16 word stemmer algorithms generated
10425 from Snowball algorithms. It includes the 15 original ones plus the Poerter
10426 English stemmer.")
10427 (license license:bsd-3)))
10428
10429 (define-public python2-snowballstemmer
10430 (package-with-python2 python-snowballstemmer))
10431
10432 (define-public python-sphinx-cloud-sptheme
10433 (package
10434 (name "python-sphinx-cloud-sptheme")
10435 (version "1.8.0")
10436 (source (origin
10437 (method url-fetch)
10438 (uri (pypi-uri "cloud_sptheme" version))
10439 (sha256
10440 (base32
10441 "1dniqb6a39yh786f86c4jn666rwnyi1jvzn4616zhcchb7sfdshd"))))
10442 (build-system python-build-system)
10443 ;; FIXME: The 'pypi' release archive does not contain tests.
10444 (arguments '(#:tests? #f))
10445 (native-inputs
10446 `(("python-sphinx" ,python-sphinx)))
10447 (home-page "https://bitbucket.org/ecollins/cloud_sptheme")
10448 (synopsis "'Cloud' theme for Sphinx documenter")
10449 (description "This package contains the \"Cloud\" theme for Sphinx and some
10450 related extensions.")
10451 (license license:bsd-3)))
10452
10453 (define-public python2-sphinx-cloud-sptheme
10454 (package-with-python2 python-sphinx-cloud-sptheme))
10455
10456 (define-public python-sphinx-alabaster-theme
10457 (package
10458 (name "python-sphinx-alabaster-theme")
10459 (version "0.7.9")
10460 (source (origin
10461 (method url-fetch)
10462 (uri (pypi-uri "alabaster" version))
10463 (sha256
10464 (base32
10465 "027anxzcb951gjlcc43y3rbn9qrw36d16vj9wd2smv5410xx9bs7"))))
10466 (build-system python-build-system)
10467 (propagated-inputs
10468 `(("python-pygments" ,python-pygments)))
10469 (home-page "https://alabaster.readthedocs.io/")
10470 (synopsis "Configurable sidebar-enabled Sphinx theme")
10471 (description "Alabaster is a visually (c)lean, responsive, configurable
10472 theme for the Sphinx documentation system. It's the default theme of Sphinx.")
10473 (license license:bsd-3)))
10474
10475 (define-public python2-sphinx-alabaster-theme
10476 (package-with-python2 python-sphinx-alabaster-theme))
10477
10478 (define-public python-setproctitle
10479 (package
10480 (name "python-setproctitle")
10481 (version "1.1.10")
10482 (source
10483 (origin
10484 (method url-fetch)
10485 (uri (pypi-uri "setproctitle" version))
10486 (sha256
10487 (base32
10488 "163kplw9dcrw0lffq1bvli5yws3rngpnvrxrzdw89pbphjjvg0v2"))))
10489 (build-system python-build-system)
10490 (arguments
10491 '(#:phases
10492 (modify-phases %standard-phases
10493 (add-before 'check 'patch-Makefile
10494 ;; Stricly this is only required for the python2 variant.
10495 ;; But adding a phase in an inherited package seems to be
10496 ;; cumbersum. So we patch even for python3.
10497 (lambda _
10498 (let ((nose (assoc-ref %build-inputs "python2-nose")))
10499 (when nose
10500 (substitute* "Makefile"
10501 (("\\$\\(PYTHON\\) [^ ]which nosetests[^ ] ")
10502 (string-append nose "/bin/nosetests "))))
10503 #t)))
10504 (replace 'check
10505 (lambda _
10506 (setenv "PYTHON" (or (which "python3") (which "python")))
10507 (setenv "PYCONFIG" (or (which "python3-config")
10508 (which "python-config")))
10509 (setenv "CC" "gcc")
10510 ;; No need to extend PYTHONPATH to find the built package, since
10511 ;; the Makefile will build anyway
10512 (invoke "make" "check"))))))
10513 (native-inputs
10514 `(("procps" ,procps))) ; required for tests
10515 (home-page
10516 "https://github.com/dvarrazzo/py-setproctitle")
10517 (synopsis
10518 "Setproctitle implementation for Python to customize the process title")
10519 (description "The library allows a process to change its title (as displayed
10520 by system tools such as ps and top).
10521
10522 Changing the title is mostly useful in multi-process systems, for
10523 example when a master process is forked: changing the children's title
10524 allows to identify the task each process is busy with. The technique
10525 is used by PostgreSQL and the OpenSSH Server for example.")
10526 (license license:bsd-3)
10527 (properties `((python2-variant . ,(delay python2-setproctitle))))))
10528
10529 (define-public python2-setproctitle
10530 (let ((base (package-with-python2
10531 (strip-python2-variant python-setproctitle))))
10532 (package
10533 (inherit base)
10534 (native-inputs `(("python2-nose" ,python2-nose)
10535 ,@(package-native-inputs base))))))
10536
10537 (define-public python-validictory
10538 (package
10539 (name "python-validictory")
10540 (version "1.0.1")
10541 (source
10542 (origin
10543 (method url-fetch)
10544 (uri (pypi-uri "validictory" version))
10545 (sha256
10546 (base32
10547 "1zf1g9sw47xzp5f80bd94pb42j9yqv82lcrgcvdwr6nkaphfi37q"))))
10548 (build-system python-build-system)
10549 (arguments
10550 '(#:phases
10551 (modify-phases %standard-phases
10552 (add-after 'unpack 'bootstrap
10553 ;; Move the tests out of the package directory to avoid
10554 ;; packaging them.
10555 (lambda* _
10556 (rename-file "validictory/tests" "tests")
10557 (delete-file "tests/__init__.py")))
10558 (replace 'check
10559 (lambda _
10560 ;; Extend PYTHONPATH so the built package will be found.
10561 (setenv "PYTHONPATH"
10562 (string-append (getcwd) "/build/lib:"
10563 (getenv "PYTHONPATH")))
10564 (zero? (system* "py.test" "-vv" )))))))
10565 (native-inputs
10566 `(("python-pytest" ,python-pytest)))
10567 (home-page
10568 "https://github.com/jamesturk/validictory")
10569 (synopsis "General purpose Python data validator")
10570 (description "It allows validation of arbitrary Python data structures.
10571
10572 The schema format is based on the JSON Schema
10573 proposal (http://json-schema.org), so combined with json the library is also
10574 useful as a validator for JSON data.")
10575 (license license:expat)))
10576
10577 (define-public python2-validictory
10578 (package-with-python2 python-validictory))
10579
10580 (define-public python-pyelftools
10581 (package
10582 (name "python-pyelftools")
10583 (version "0.25")
10584 (source
10585 (origin
10586 (method url-fetch)
10587 (uri (pypi-uri "pyelftools" version))
10588 (sha256
10589 (base32
10590 "090vdksbz341f7ljvr0zswblw4lspa8qaiikzyjkf318arpxmil9"))))
10591 (build-system python-build-system)
10592 ;; Test suite requires python-setuptools
10593 (native-inputs
10594 `(("python-setuptools" ,python-setuptools)))
10595 (home-page
10596 "https://github.com/eliben/pyelftools")
10597 (synopsis
10598 "Analyze binary and library file information")
10599 (description "This Python library provides interfaces for parsing and
10600 analyzing two binary and library file formats; the Executable and Linking
10601 Format (ELF), and debugging information in the Debugging With Attributed
10602 Record Format (DWARF).")
10603 (license license:public-domain)))
10604
10605 (define-public python-pyev
10606 (package
10607 (name "python-pyev")
10608 (version "0.9.0")
10609 (source
10610 (origin
10611 (method url-fetch)
10612 (uri (pypi-uri "pyev" version))
10613 (sha256
10614 (base32
10615 "0rf603lc0s6zpa1nb25vhd8g4y337wg2wyz56i0agsdh7jchl0sx"))))
10616 (build-system python-build-system)
10617 (arguments
10618 `(#:tests? #f ; no test suite
10619 #:phases
10620 (modify-phases %standard-phases
10621 (add-after 'unpack 'patch
10622 (lambda* (#:key inputs #:allow-other-keys)
10623 (let ((libev (string-append (assoc-ref inputs "libev")
10624 "/lib/libev.so.4")))
10625 (substitute* "setup.py"
10626 (("libev_dll_name = find_library\\(\\\"ev\\\"\\)")
10627 (string-append "libev_dll_name = \"" libev "\"")))))))))
10628 (inputs
10629 `(("libev" ,libev)))
10630 (home-page "http://pythonhosted.org/pyev/")
10631 (synopsis "Python libev interface")
10632 (description "Pyev provides a Python interface to libev.")
10633 (license license:gpl3)))
10634
10635 (define-public python2-pyev
10636 (package-with-python2 python-pyev))
10637
10638 (define-public python-imagesize
10639 (package
10640 (name "python-imagesize")
10641 (version "0.7.1")
10642 (source
10643 (origin
10644 (method url-fetch)
10645 (uri (pypi-uri "imagesize" version))
10646 (sha256
10647 (base32
10648 "0qk07k0z4241lkzzjji7z4da04pcvg7bfc4xz1934zlqhwmwdcha"))))
10649 (build-system python-build-system)
10650 (arguments
10651 '(;; Test files are not distributed on PyPi:
10652 ;; https://github.com/shibukawa/imagesize_py/issues/7
10653 #:tests? #f))
10654 (home-page "https://github.com/shibukawa/imagesize_py")
10655 (synopsis "Gets image size of files in variaous formats in Python")
10656 (description
10657 "This package allows determination of image size from
10658 PNG, JPEG, JPEG2000 and GIF files in pure Python.")
10659 (license license:expat)))
10660
10661 (define-public python2-imagesize
10662 (package-with-python2 python-imagesize))
10663
10664 (define-public python-termstyle
10665 (package
10666 (name "python-termstyle")
10667 (version "0.1.11")
10668 (source
10669 (origin
10670 (method url-fetch)
10671 (uri (pypi-uri "termstyle" version))
10672 (sha256
10673 (base32
10674 "17wzkkcqy5zc0g68xlad3kcv66iw14d2pwqc0h9420gak0vbhx7g"))))
10675 (build-system python-build-system)
10676 (arguments
10677 '(#:phases
10678 (modify-phases %standard-phases
10679 (replace 'check
10680 (lambda _
10681 (zero? (system* "python" "test3.py")))))))
10682 (home-page "https://github.com/gfxmonk/termstyle")
10683 (synopsis "Console text coloring for Python")
10684 (description "This package provides console text coloring for Python.")
10685 (license license:bsd-3)))
10686
10687 (define-public python-argcomplete
10688 (package
10689 (name "python-argcomplete")
10690 (version "1.7.0")
10691 (source
10692 (origin
10693 (method url-fetch)
10694 (uri (pypi-uri "argcomplete" version))
10695 (sha256
10696 (base32
10697 "11bwiw6j0nilgz81xnw6f1npyga3prp8asjqrm87cdr3ria5l03x"))))
10698 (build-system python-build-system)
10699 (native-inputs
10700 `(("python-pexpect" ,python-pexpect)
10701 ("tcsh" ,tcsh)
10702 ("bash-full" ,bash))) ;full Bash for 'test_file_completion'
10703 (home-page "https://github.com/kislyuk/argcomplete")
10704 (synopsis "Shell tab completion for Python argparse")
10705 (description "argcomplete provides extensible command line tab completion
10706 of arguments and options for Python scripts using @code{argparse}. It's
10707 particularly useful for programs with many options or sub-parsers that can
10708 dynamically suggest completions; for example, when browsing resources over the
10709 network.")
10710 (license license:asl2.0)))
10711
10712 (define-public python2-argcomplete
10713 (package-with-python2 python-argcomplete))
10714
10715 (define-public python-xopen
10716 (package
10717 (name "python-xopen")
10718 (version "0.3.3")
10719 (source
10720 (origin
10721 (method url-fetch)
10722 (uri (pypi-uri "xopen" version))
10723 (sha256
10724 (base32
10725 "1a0wbil552wsmklwd89ssmgz3pjd86qa9i7jh8wqb9wslc8a2qjr"))
10726 (file-name (string-append name "-" version ".tar.gz"))))
10727 (build-system python-build-system)
10728 (home-page "https://github.com/marcelm/xopen/")
10729 (synopsis "Open compressed files transparently")
10730 (description "This module provides an @code{xopen} function that works like
10731 Python's built-in @code{open} function, but can also deal with compressed files.
10732 Supported compression formats are gzip, bzip2 and, xz, and are automatically
10733 recognized by their file extensions. The focus is on being as efficient as
10734 possible on all supported Python versions.")
10735 (license license:expat)))
10736
10737 (define-public python2-xopen
10738 (let ((base (package-with-python2
10739 (strip-python2-variant python-xopen))))
10740 (package
10741 (inherit base)
10742 (propagated-inputs `(("python2-bz2file" ,python2-bz2file)
10743 ,@(package-propagated-inputs base))))))
10744
10745 (define-public python2-cheetah
10746 (package
10747 (name "python2-cheetah")
10748 (version "2.4.4")
10749 (source
10750 (origin
10751 (method url-fetch)
10752 (uri (pypi-uri "Cheetah" version))
10753 (sha256
10754 (base32
10755 "0l5mm4lnysjkzpjr95q5ydm9xc8bv43fxmr79ypybrf1y0lq4c5y"))))
10756 (build-system python-build-system)
10757 (arguments
10758 `(#:python ,python-2))
10759 (propagated-inputs
10760 `(("python2-markdown" ,python2-markdown)))
10761 (home-page "https://pythonhosted.org/Cheetah/")
10762 (synopsis "Template engine")
10763 (description "Cheetah is a text-based template engine and Python code
10764 generator.
10765
10766 Cheetah can be used as a standalone templating utility or referenced as
10767 a library from other Python applications. It has many potential uses,
10768 but web developers looking for a viable alternative to ASP, JSP, PHP and
10769 PSP are expected to be its principle user group.
10770
10771 Features:
10772 @enumerate
10773 @item Generates HTML, SGML, XML, SQL, Postscript, form email, LaTeX, or any other
10774 text-based format.
10775 @item Cleanly separates content, graphic design, and program code.
10776 @item Blends the power and flexibility of Python with a simple template language
10777 that non-programmers can understand.
10778 @item Gives template writers full access to any Python data structure, module,
10779 function, object, or method in their templates.
10780 @item Makes code reuse easy by providing an object-orientated interface to
10781 templates that is accessible from Python code or other Cheetah templates.
10782 One template can subclass another and selectively reimplement sections of it.
10783 @item Provides a simple, yet powerful, caching mechanism that can dramatically
10784 improve the performance of a dynamic website.
10785 @item Compiles templates into optimized, yet readable, Python code.
10786 @end enumerate")
10787 (license (license:x11-style "file://LICENSE"))))
10788
10789 (define-public python-dulwich
10790 (package
10791 (name "python-dulwich")
10792 (version "0.18.6")
10793 (source
10794 (origin
10795 (method url-fetch)
10796 (uri (list (string-append "https://www.dulwich.io/releases/"
10797 "dulwich-" version ".tar.gz")
10798 (pypi-uri "dulwich" version)))
10799 (sha256
10800 (base32
10801 "1aa1xfrxkc3j9s4xi0llhf5gndyi9ryprcxsqfa5fcb8ph34981q"))))
10802 (build-system python-build-system)
10803 (arguments
10804 `(#:phases
10805 (modify-phases %standard-phases
10806 (add-before 'check 'fix-tests
10807 (lambda* (#:key inputs #:allow-other-keys)
10808 ;; The tests use Popen with a custom environment which doesn't
10809 ;; include PATH.
10810 (substitute* "dulwich/tests/compat/utils.py"
10811 (("'git'") (string-append "'"
10812 (which "git")
10813 "'")))
10814 (substitute* '("dulwich/tests/test_repository.py"
10815 "dulwich/tests/test_hooks.py")
10816 (("#!/bin/sh") (string-append "#!" (which "sh"))))
10817 (setenv "TEST_RUNNER" "unittest")
10818 (setenv "PYTHONHASHSEED" "random")
10819 #t)))))
10820 (propagated-inputs
10821 `(("python-fastimport" ,python-fastimport)))
10822 (native-inputs
10823 `(("python-mock" ,python-mock)
10824 ("python-geventhttpclient" ,python-geventhttpclient)
10825 ("git" ,git)))
10826 (home-page "https://www.dulwich.io/")
10827 (synopsis "Git implementation in Python")
10828 (description "Dulwich is an implementation of the Git file formats and
10829 protocols written in pure Python.")
10830 ;; Can be used with either license.
10831 (license (list license:asl2.0 license:gpl2+))))
10832
10833 (define-public python2-dulwich
10834 (package-with-python2 python-dulwich))
10835
10836 (define-public python-pbkdf2
10837 (package
10838 (name "python-pbkdf2")
10839 (version "1.3")
10840 (source
10841 (origin
10842 (method url-fetch)
10843 (uri (pypi-uri "pbkdf2" version))
10844 (sha256
10845 (base32
10846 "0yb99rl2mbsaamj571s1mf6vgniqh23v98k4632150hjkwv9fqxc"))))
10847 (build-system python-build-system)
10848 (arguments
10849 '(#:phases
10850 (modify-phases %standard-phases
10851 (replace 'check
10852 (lambda _
10853 (setenv "PYTHONPATH"
10854 (string-append (getcwd) "/build/lib:"
10855 (getenv "PYTHONPATH")))
10856 (zero? (system* "python" "test/test_pbkdf2.py")))))))
10857 (propagated-inputs
10858 `(("python-pycrypto" ,python-pycrypto))) ; optional
10859 (home-page "https://www.dlitz.net/software/python-pbkdf2/")
10860 (synopsis "Password-based key derivation")
10861 (description "This module implements the password-based key derivation
10862 function, PBKDF2, specified in RSA PKCS#5 v2.0.
10863
10864 PKCS#5 v2.0 Password-Based Key Derivation is a key derivation function which
10865 is part of the RSA Public Key Cryptography Standards series. The provided
10866 implementation takes a password or a passphrase and a salt value (and
10867 optionally a iteration count, a digest module, and a MAC module) and provides
10868 a file-like object from which an arbitrarly-sized key can be read.")
10869 (license license:expat)))
10870
10871 (define-public python2-pbkdf2
10872 (package-with-python2 python-pbkdf2))
10873
10874 (define-public python-qrcode
10875 (package
10876 (name "python-qrcode")
10877 (version "6.0")
10878 (source
10879 (origin
10880 (method url-fetch)
10881 (uri (pypi-uri "qrcode" version))
10882 (sha256
10883 (base32
10884 "1gz1g2n9kqwqkak78aavr354z1v3yyiksk7q6xp5hi1zr6s0syq3"))))
10885 (build-system python-build-system)
10886 (arguments
10887 ;; FIXME: Tests require packaging 'pymaging'.
10888 '(#:tests? #f))
10889 (propagated-inputs
10890 `(("python-lxml" ,python-lxml) ; for SVG output
10891 ("python-pillow" ,python-pillow) ; for PNG output
10892 ("python-six" ,python-six)))
10893 (inputs
10894 `(;; The setup.cfg file needs to be used, and support for this requires
10895 ;; at least version 30.3.0 of setuptools
10896 ("python-setuptools" ,python-setuptools)))
10897 (home-page "https://github.com/lincolnloop/python-qrcode")
10898 (synopsis "QR Code image generator")
10899 (description "This package provides a pure Python QR Code generator
10900 module. It uses the Python Imaging Library (PIL) to allow for the generation
10901 of QR Codes.
10902
10903 In addition this package provides a command line tool to generate QR codes and
10904 either write these QR codes to a file or do the output as ascii art at the
10905 console.")
10906 (license license:bsd-3)))
10907
10908 (define-public python2-qrcode
10909 (package-with-python2 python-qrcode))
10910
10911 (define-public python-rst2ansi
10912 (package
10913 (name "python-rst2ansi")
10914 (version "0.1.5")
10915 (source
10916 (origin
10917 (method url-fetch)
10918 (uri (pypi-uri "rst2ansi" version))
10919 (sha256
10920 (base32
10921 "0vzy6gd60l79ff750scl0sz48r1laalkl6md6dwzah4dcadgn5qv"))))
10922 (build-system python-build-system)
10923 (propagated-inputs
10924 `(("python-docutils" ,python-docutils)))
10925 (home-page "https://github.com/Snaipe/python-rst-to-ansi")
10926 (synopsis "Convert RST to ANSI-decorated console output")
10927 (description
10928 "Python module dedicated to rendering RST (reStructuredText) documents
10929 to ansi-escaped strings suitable for display in a terminal.")
10930 (license license:expat)))
10931
10932 (define-public python-ansi2html
10933 (package
10934 (name "python-ansi2html")
10935 (version "1.2.0")
10936 (source
10937 (origin
10938 (method url-fetch)
10939 (uri (pypi-uri "ansi2html" version))
10940 (sha256
10941 (base32
10942 "1wa00zffprb78w1mqq90dk47czz1knanys2a40zbw2vyapd5lp9y"))))
10943 (build-system python-build-system)
10944 (native-inputs
10945 `(("python-mock" ,python-mock)
10946 ("python-nose" ,python-nose)))
10947 (propagated-inputs
10948 `(("python-six" ,python-six)))
10949 (home-page "https://github.com/ralphbean/ansi2html")
10950 (synopsis "Convert ANSI-decorated console output to HTML")
10951 (description
10952 "@command{ansi2html} is a Python library and command line utility for
10953 convering text with ANSI color codes to HTML or LaTeX.")
10954 (license license:gpl3+)))
10955
10956 (define-public python2-ansi2html
10957 (package-with-python2 python-ansi2html))
10958
10959 (define-public python-ddt
10960 (package
10961 (name "python-ddt")
10962 (version "1.1.3")
10963 (source
10964 (origin
10965 (method url-fetch)
10966 (uri (pypi-uri "ddt" version))
10967 (sha256
10968 (base32
10969 "1lw17420iimhghkgzgax85nn8d1an2d6k2cfvb7j5kwn2dqlr1vk"))))
10970 (build-system python-build-system)
10971 (native-inputs
10972 `(("python-mock" ,python-mock)
10973 ("python-nose" ,python-nose)))
10974 (propagated-inputs
10975 `(("python-six" ,python-six)
10976 ("python-pyyaml" ,python-pyyaml)))
10977 (home-page "https://github.com/txels/ddt")
10978 (synopsis "Data-Driven Tests")
10979 (description
10980 "Data-Driven Tests (@dfn{DDT}) allow you to multiply one test case by
10981 running it with different test data, and make it appear as multiple test
10982 cases.")
10983 (license license:expat)))
10984
10985 (define-public python2-ddt
10986 (package-with-python2 python-ddt))
10987
10988 (define-public python-pycountry
10989 (package
10990 (name "python-pycountry")
10991 (version "18.5.26")
10992 (source
10993 (origin
10994 (method url-fetch)
10995 (uri (pypi-uri "pycountry" version))
10996 (sha256
10997 (base32
10998 "15q9j047s3yc9cfcxq1ch8b71f81na44cr6dydd5gxk0ki9a4akz"))))
10999 (build-system python-build-system)
11000 (home-page "https://bitbucket.org/flyingcircus/pycountry")
11001 (synopsis "ISO databases for languages, countries, currencies, etc.")
11002 (description
11003 "@code{pycountry} provides the ISO databases for the standards:
11004 @enumerate
11005 @item 639-3 (Languages)
11006 @item 3166 (Countries)
11007 @item 3166-3 (Deleted Countries)
11008 @item 3166-2 (Subdivisions of countries)
11009 @item 4217 (Currencies)
11010 @item 15924 (Scripts)
11011 @end enumerate
11012 It includes a copy from Debian’s pkg-isocodes and makes the data accessible
11013 through a Python API.")
11014 (license license:lgpl2.1+)))
11015
11016 (define-public python2-pycountry
11017 (package-with-python2 python-pycountry))
11018
11019 (define-public python-pycosat
11020 (package
11021 (name "python-pycosat")
11022 (version "0.6.1")
11023 (source
11024 (origin
11025 (method url-fetch)
11026 (uri (pypi-uri "pycosat" version))
11027 (sha256
11028 (base32
11029 "1kl3wh1f47rc712n4bmwplbx3fqz3x9i1b587jrbpmvdva4c8f6l"))))
11030 ;; TODO: Unundle picosat. http://fmv.jku.at/picosat/
11031 (build-system python-build-system)
11032 (home-page "https://github.com/ContinuumIO/pycosat")
11033 (synopsis "Bindings to picosat (a SAT solver)")
11034 (description
11035 "This package provides efficient Python bindings to @code{picosat} on
11036 the C level. When importing pycosat, the @code{picosat} solver becomes part
11037 of the Python process itself. @code{picosat} is a @dfn{Boolean Satisfiability
11038 Problem} (SAT) solver.")
11039 (license license:expat)))
11040
11041 (define-public python2-pycosat
11042 (package-with-python2 python-pycosat))
11043
11044 (define-public python2-ruamel.ordereddict
11045 (package
11046 (name "python2-ruamel.ordereddict")
11047 (version "0.4.9")
11048 (source
11049 (origin
11050 (method url-fetch)
11051 (uri (pypi-uri "ruamel.ordereddict" version))
11052 (sha256
11053 (base32
11054 "1xmkl8v9l9inm2pyxgc1fm5005yxm7fkd5gv74q7lj1iy5qc8n3h"))))
11055 (build-system python-build-system)
11056 (arguments
11057 `(#:python ,python-2
11058 #:phases
11059 (modify-phases %standard-phases
11060 (delete 'check)
11061 (add-after 'install 'check
11062 (lambda* (#:key inputs outputs #:allow-other-keys)
11063 (add-installed-pythonpath inputs outputs)
11064 (zero? (system* "python" "test/testordereddict.py")))))))
11065 (home-page "https://bitbucket.org/ruamel/ordereddict")
11066 (synopsis "Version of dict that keeps keys in insertion order")
11067 (description
11068 "This is an implementation of an ordered dictionary with @dfn{Key
11069 Insertion Order} (KIO: updates of values do not affect the position of the
11070 key), @dfn{Key Value Insertion Order} (KVIO, an existing key's position is
11071 removed and put at the back). The standard library module @code{OrderedDict},
11072 implemented later, implements a subset of @code{ordereddict} functionality.
11073 Sorted dictionaries are also provided. Currently only with @dfn{Key Sorted
11074 Order} (KSO, no sorting function can be specified, but a transform can be
11075 specified to apply on the key before comparison (e.g. @code{string.lower})).")
11076 (license license:expat)))
11077
11078 (define-public python-pypeg2
11079 (package
11080 (name "python-pypeg2")
11081 (version "2.15.2")
11082 (source
11083 (origin
11084 (method url-fetch)
11085 (uri (pypi-uri "pyPEG2" version))
11086 (sha256
11087 (base32
11088 "0v8ziaam2r637v94ra4dbjw6jzxz99gs5x4i585kgag1v204yb9b"))))
11089 (build-system python-build-system)
11090 (propagated-inputs `(("python-lxml" ,python-lxml)))
11091 (arguments
11092 ;;https://bitbucket.org/fdik/pypeg/issues/36/test-failures-on-py35
11093 '(#:tests? #f))
11094 (home-page "https://fdik.org/pyPEG/")
11095 (synopsis "Parsering Expression Grammars in Python")
11096 (description "PyPEG is an intrinsic parser interpreter framework for
11097 Python. It is based on Parsing Expression Grammars, PEG. With pyPEG you can
11098 parse many formal languages.")
11099 (license license:gpl2)))
11100
11101 (define-public python-incremental
11102 (package
11103 (name "python-incremental")
11104 (version "17.5.0")
11105 (source
11106 (origin
11107 (method url-fetch)
11108 (uri (pypi-uri "incremental" version))
11109 (sha256
11110 (base32
11111 "1cylxdz1cnkm5g3pklna3h2n0i0rks95ir1pnpxfnvpkmab1cxbv"))))
11112 (build-system python-build-system)
11113 (home-page "https://github.com/hawkowl/incremental")
11114 (synopsis "Library for versioning Python projects")
11115 (description "Incremental is a small library that versions your Python
11116 projects.")
11117 (license license:expat)))
11118
11119 (define-public python2-incremental
11120 (package-with-python2 python-incremental))
11121
11122 (define-public python-automat
11123 (package
11124 (name "python-automat")
11125 (version "0.6.0")
11126 (source (origin
11127 (method url-fetch)
11128 (uri (pypi-uri "Automat" version))
11129 (sha256
11130 (base32
11131 "1a7nsrljysfmdqmpn2apfa1gg6rfah4y9sizvns8gb08rx7d07rw"))))
11132 (build-system python-build-system)
11133 ;; We disable the tests because they require python-twisted, while
11134 ;; python-twisted depends on python-automat. Twisted is optional, but the
11135 ;; tests fail if it is not available. Also see
11136 ;; <https://github.com/glyph/automat/issues/71>.
11137 (arguments '(#:tests? #f))
11138 (native-inputs
11139 `(("python-m2r" ,python-m2r)
11140 ("python-setuptools-scm" ,python-setuptools-scm)
11141 ("python-graphviz" ,python-graphviz)))
11142 (propagated-inputs
11143 `(("python-six" ,python-six)
11144 ("python-attrs" ,python-attrs)))
11145 (home-page "https://github.com/glyph/Automat")
11146 (synopsis "Self-service finite-state machines")
11147 (description "Automat is a library for concise, idiomatic Python
11148 expression of finite-state automata (particularly deterministic finite-state
11149 transducers).")
11150 (license license:expat)))
11151
11152 (define-public python2-automat
11153 (package-with-python2 python-automat))
11154
11155 (define-public python-m2r
11156 (package
11157 (name "python-m2r")
11158 (version "0.1.12")
11159 (source (origin
11160 (method url-fetch)
11161 (uri (pypi-uri "m2r" version))
11162 (sha256
11163 (base32
11164 "1axrwnf425sz4qz3c0qc7yhhki4myzb8rki7pczcsgzznzmqdyxd"))))
11165 (build-system python-build-system)
11166 (propagated-inputs
11167 `(("python-docutils" ,python-docutils)
11168 ("python-mistune" ,python-mistune)))
11169 (native-inputs
11170 `(("python-pygments" ,python-pygments)
11171 ("python-mock" ,python-mock)))
11172 (home-page "https://github.com/miyakogi/m2r")
11173 (synopsis "Markdown to reStructuredText converter")
11174 (description "M2R converts a markdown file including reST markups to valid
11175 reST format.")
11176 (license license:expat)))
11177
11178 (define-public python2-m2r
11179 (package-with-python2 python-m2r))
11180
11181 (define-public python-constantly
11182 (package
11183 (name "python-constantly")
11184 (version "15.1.0")
11185 (source (origin
11186 (method url-fetch)
11187 (uri (pypi-uri "constantly" version))
11188 (sha256
11189 (base32
11190 "0dgwdla5kfpqz83hfril716inm41hgn9skxskvi77605jbmp4qsq"))))
11191 (build-system python-build-system)
11192 (home-page "https://github.com/twisted/constantly")
11193 (synopsis "Symbolic constants in Python")
11194 (description "Constantly is a Python library that provides symbolic
11195 constant support. It includes collections and constants with text, numeric,
11196 and bit flag values.")
11197 (license license:expat)))
11198
11199 (define-public python2-constantly
11200 (package-with-python2 python-constantly))
11201
11202 (define-public python-attrs
11203 (package
11204 (name "python-attrs")
11205 (version "17.4.0")
11206 (source (origin
11207 (method url-fetch)
11208 (uri (pypi-uri "attrs" version))
11209 (sha256
11210 (base32
11211 "1jafnn1kzd6qhxgprhx6y6ik1r5m2rilx25syzcmq03azp660y8w"))))
11212 (build-system python-build-system)
11213 (native-inputs
11214 `(("python-coverage" ,python-coverage)
11215 ("python-hypothesis" ,python-hypothesis)
11216 ("python-pytest" ,python-pytest)
11217 ("python-six" ,python-six)
11218 ("python-sphinx" ,python-sphinx)
11219 ("python-zope-interface" ,python-zope-interface)))
11220 (home-page "https://github.com/python-attrs/attrs/")
11221 (synopsis "Attributes without boilerplate")
11222 (description "@code{attrs} is a Python package with class decorators that
11223 ease the chores of implementing the most common attribute-related object
11224 protocols.")
11225 (license license:expat)))
11226
11227 (define-public python2-attrs
11228 (package-with-python2 python-attrs))
11229
11230 (define-public python-attrs-bootstrap
11231 (package
11232 (inherit python-attrs)
11233 (name "python-attrs-bootstrap")
11234 (native-inputs `())
11235 (arguments `(#:tests? #f))))
11236
11237 (define-public python2-attrs-bootstrap
11238 (package-with-python2 python-attrs-bootstrap))
11239
11240 (define-public python2-cliapp
11241 (package
11242 (name "python2-cliapp")
11243 (version "1.20170823")
11244 (source
11245 (origin
11246 (method url-fetch)
11247 (uri (string-append
11248 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/cliapp/snapshot/cliapp-"
11249 version ".tar.gz"))
11250 (sha256
11251 (base32
11252 "1i9gik0xrj6jmi95s5w988jl1y265baz5xm5pbqdyvsh8h9ln6yq"))))
11253 (build-system python-build-system)
11254 (arguments
11255 `(#:python ,python-2
11256 #:phases
11257 (modify-phases %standard-phases
11258 ;; check phase needs to be run before the build phase. If not,
11259 ;; coverage-test-runner looks for tests for the built source files,
11260 ;; and fails.
11261 (delete 'check)
11262 (add-before 'build 'check
11263 (lambda _
11264 ;; Disable python3 tests
11265 (substitute* "check"
11266 (("python3") "# python3"))
11267 (zero? (system* "./check")))))))
11268 (native-inputs
11269 `(("python2-coverage-test-runner" ,python2-coverage-test-runner)
11270 ("python2-pep8" ,python2-pep8)))
11271 (propagated-inputs
11272 `(("python2-pyaml" ,python2-pyaml)))
11273 (home-page "https://liw.fi/cliapp/")
11274 (synopsis "Python framework for command line programs")
11275 (description "@code{python2-cliapp} is a python framework for
11276 command line programs. It contains the typical stuff such programs
11277 need to do, such as parsing the command line for options, and
11278 iterating over input files.")
11279 (license license:gpl2+)))
11280
11281 (define-public python2-ttystatus
11282 (package
11283 (name "python2-ttystatus")
11284 (version "0.35")
11285 (source
11286 (origin
11287 (method url-fetch)
11288 (uri (string-append
11289 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/ttystatus/snapshot/ttystatus-"
11290 version ".tar.gz"))
11291 (sha256
11292 (base32
11293 "0vivqbw7ddhsq1zj3g9cvvv4f0phl0pis2smsnwcr2szz2fk3hl6"))))
11294 (build-system python-build-system)
11295 (native-inputs
11296 `(("python2-coverage-test-runner" ,python2-coverage-test-runner)
11297 ("python2-pep8" ,python2-pep8)))
11298 (arguments
11299 `(#:python ,python-2
11300 #:phases
11301 (modify-phases %standard-phases
11302 ;; check phase needs to be run before the build phase. If not,
11303 ;; coverage-test-runner looks for tests for the built source files,
11304 ;; and fails.
11305 (delete 'check)
11306 (add-before 'build 'check
11307 (lambda _
11308 (zero? (system* "make" "check")))))))
11309 (home-page "https://liw.fi/ttystatus/")
11310 (synopsis "Python library for showing progress reporting and
11311 status updates on terminals")
11312 (description "@code{python2-ttystatus} is a python library for
11313 showing progress reporting and status updates on terminals, for
11314 command line programs. Output is automatically adapted to the width
11315 of the terminal: truncated if it does not fit, and resized if the
11316 terminal size changes.")
11317 (license license:gpl3+)))
11318
11319 (define-public python2-tracing
11320 (package
11321 (name "python2-tracing")
11322 (version "0.10")
11323 (source
11324 (origin
11325 (method url-fetch)
11326 (uri (string-append
11327 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/python-tracing/snapshot/tracing-"
11328 version ".tar.gz"))
11329 (sha256
11330 (base32
11331 "06cw4zg42fsvqy372vi2whj26w56vzg5axhzwdjc2bgwf03garbw"))))
11332 (build-system python-build-system)
11333 (arguments
11334 `(#:python ,python-2))
11335 (home-page "https://liw.fi/tracing/")
11336 (synopsis "Python debug logging helper")
11337 (description "@code{python2-tracing} is a python library for
11338 logging debug messages. It provides a way to turn debugging messages
11339 on and off, based on the filename they occur in. It is much faster
11340 than using @code{logging.Filter} to accomplish the same thing, which
11341 matters when code is run in production mode. The actual logging still
11342 happens using the @code{logging} library.")
11343 (license license:gpl3+)))
11344
11345 (define-public python2-larch
11346 (package
11347 (name "python2-larch")
11348 (version "1.20151025")
11349 (source
11350 (origin
11351 (method url-fetch)
11352 (uri (string-append
11353 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/larch/snapshot/larch-"
11354 version ".tar.gz"))
11355 (patches (search-patches
11356 "python2-larch-coverage-4.0a6-compatibility.patch"))
11357 (sha256
11358 (base32
11359 "1p4knkkavlqymgciz2wbcnfrdgdbafhg14maplnk4vbw0q8xs663"))))
11360 (build-system python-build-system)
11361 (arguments
11362 `(#:python ,python-2
11363 #:phases
11364 (modify-phases %standard-phases
11365 ;; check phase needs to be run before the build phase. If not,
11366 ;; coverage-test-runner looks for tests for the built source files,
11367 ;; and fails.
11368 (delete 'check)
11369 (add-before 'build 'check
11370 (lambda _
11371 (zero? (system* "make" "check")))))))
11372 (native-inputs
11373 `(("cmdtest" ,cmdtest)
11374 ("python2-coverage-test-runner" ,python2-coverage-test-runner)))
11375 (propagated-inputs
11376 `(("python2-tracing" ,python2-tracing)))
11377 (home-page "https://liw.fi/larch/")
11378 (synopsis "Python copy-on-write B-tree library")
11379 (description "@code{python2-larch} is an implementation of
11380 particular kind of B-tree, based on research by Ohad Rodeh. See
11381 @url{http://liw.fi/larch/ohad-btrees-shadowing-clones.pdf} for details
11382 on the data structure.
11383
11384 The distinctive feature of this B-tree is that a node is never
11385 (conceptually) modified. Instead, all updates are done by
11386 copy-on-write. This makes it easy to clone a tree, and modify only the
11387 clone, while other processes access the original tree.")
11388 (license license:gpl3+)))
11389
11390 (define-public python-astroid
11391 (package
11392 (name "python-astroid")
11393 (version "1.5.3")
11394 (source
11395 (origin
11396 (method url-fetch)
11397 (uri (string-append
11398 "https://github.com/PyCQA/astroid/archive/astroid-"
11399 version ".tar.gz"))
11400 (sha256
11401 (base32
11402 "0isn5p7f9n48hmksgbrj7dkm9dyglnayzn5jngk37qywg8a74ngn"))))
11403 (build-system python-build-system)
11404 (propagated-inputs
11405 `(("python-lazy-object-proxy" ,python-lazy-object-proxy)
11406 ("python-six" ,python-six)
11407 ("python-wrapt" ,python-wrapt)))
11408 (arguments
11409 `(#:phases
11410 (modify-phases %standard-phases
11411 (replace 'check
11412 (lambda _
11413 (zero? (system* "python" "-m" "unittest" "discover"
11414 "-p" "unittest*.py")))))))
11415 (home-page "https://github.com/PyCQA/astroid")
11416 (synopsis "Common base representation of python source code for pylint and
11417 other projects")
11418 (description "@code{python-astroid} provides a common base representation
11419 of python source code for projects such as pychecker, pyreverse, pylint, etc.
11420
11421 It provides a compatible representation which comes from the _ast module. It
11422 rebuilds the tree generated by the builtin _ast module by recursively walking
11423 down the AST and building an extended ast. The new node classes have
11424 additional methods and attributes for different usages. They include some
11425 support for static inference and local name scopes. Furthermore, astroid
11426 builds partial trees by inspecting living objects.")
11427 (license license:lgpl2.1+)
11428 (properties `((python2-variant . ,(delay python2-astroid))))))
11429
11430 (define-public python2-astroid
11431 (let ((base (package-with-python2
11432 (strip-python2-variant python-astroid))))
11433 (package (inherit base)
11434 (propagated-inputs
11435 `(("python2-backports-functools-lru-cache"
11436 ,python2-backports-functools-lru-cache)
11437 ("python2-enum34" ,python2-enum34)
11438 ("python2-singledispatch" ,python2-singledispatch)
11439 ,@(package-propagated-inputs base))))))
11440
11441 (define-public python-isort
11442 (package
11443 (name "python-isort")
11444 (version "4.2.5")
11445 (source
11446 (origin
11447 (method url-fetch)
11448 (uri (string-append
11449 "https://github.com/timothycrosley/isort/archive/"
11450 version ".tar.gz"))
11451 (file-name (string-append name "-" version ".tar.gz"))
11452 (sha256
11453 (base32
11454 "0zsrgkb0krn5476yncy5dd56k7dk34zqb4bnlvwy44ixgilyjmfh"))))
11455 (build-system python-build-system)
11456 (native-inputs
11457 `(("python-mock" ,python-mock)
11458 ("python-pytest" ,python-pytest)))
11459 (home-page "https://github.com/timothycrosley/isort")
11460 (synopsis "Python utility/library to sort python imports")
11461 (description "@code{python-isort} is a python utility/library to sort
11462 imports alphabetically, and automatically separated into sections. It
11463 provides a command line utility, a python library and plugins for various
11464 editors.")
11465 (license license:expat)))
11466
11467 (define-public python2-isort
11468 (package-with-python2 python-isort))
11469
11470 (define-public python2-backports-functools-lru-cache
11471 (package
11472 (name "python2-backports-functools-lru-cache")
11473 (version "1.5")
11474 (source
11475 (origin
11476 (method url-fetch)
11477 ;; only the pypi tarballs contain the necessary metadata
11478 (uri (pypi-uri "backports.functools_lru_cache" version))
11479 (sha256
11480 (base32
11481 "06jgv8gib4fhky0p5cmxdghvsgjyzcdgk48k8pxb1ccf11znk64x"))))
11482 (build-system python-build-system)
11483 (native-inputs
11484 `(("python2-setuptools-scm" ,python2-setuptools-scm)))
11485 (arguments
11486 `(#:python ,python-2))
11487 (home-page "https://github.com/jaraco/backports.functools_lru_cache")
11488 (synopsis "Backport of functools.lru_cache from Python 3.3")
11489 (description "@code{python2-backports-functools-lru-cache} is a backport
11490 of @code{functools.lru_cache} from python 3.3.")
11491 (license license:expat)))
11492
11493 (define-public python-configparser
11494 (package
11495 (name "python-configparser")
11496 (version "3.5.0")
11497 (source
11498 (origin
11499 (method url-fetch)
11500 (uri (string-append
11501 "https://bitbucket.org/ambv/configparser/get/"
11502 version ".tar.bz2"))
11503 (file-name (string-append name "-" version ".tar.gz"))
11504 (sha256
11505 (base32
11506 "0waq40as14abwzbb321hfz4vr1fi363nscy32ga14qvfygrg96wa"))))
11507 (build-system python-build-system)
11508 (home-page "http://docs.python.org/py3k/library/configparser.html")
11509 (synopsis "Backport of configparser from python 3.5")
11510 (description "@code{python-configparser} is a backport of
11511 @code{configparser} from Python 3.5 so that it can be used directly
11512 in other versions.")
11513 (license license:expat)))
11514
11515 (define-public python2-configparser
11516 (package-with-python2 python-configparser))
11517
11518 (define-public python-mando
11519 (package
11520 (name "python-mando")
11521 (version "0.6.4")
11522 (source (origin
11523 (method url-fetch)
11524 (uri (pypi-uri "mando" version))
11525 (sha256
11526 (base32
11527 "0q6rl085q1hw1wic52pqfndr0x3nirbxnhqj9akdm5zhq2fv3zkr"))))
11528 (build-system python-build-system)
11529 (propagated-inputs
11530 `(("python-rst2ansi" ,python-rst2ansi)
11531 ("python-six" ,python-six)))
11532 (native-inputs
11533 `(("python-pytest" ,python-pytest)))
11534 (home-page "https://mando.readthedocs.org/")
11535 (synopsis
11536 "Wrapper around argparse, allowing creation of complete CLI applications")
11537 (description
11538 "This package is a wrapper around argparse, allowing you to write complete CLI
11539 applications in seconds while maintaining all the flexibility.")
11540 (license license:expat)))
11541
11542 (define-public python2-mando
11543 (package-with-python2 python-mando))
11544
11545 (define-public python-fudge
11546 (package
11547 (name "python-fudge")
11548 ;; 0.9.6 is the latest version suitable for testing the "fabric" Python 2
11549 ;; package, which is currently the only use of this package.
11550 (version "0.9.6")
11551 (source
11552 (origin
11553 (method url-fetch)
11554 (uri (pypi-uri "fudge" version))
11555 (sha256
11556 (base32
11557 "185ia3vr3qk4f2s1a9hdxb8ci4qc0x0xidrad96pywg8j930qs9l"))))
11558 (build-system python-build-system)
11559 (arguments
11560 `(#:tests? #f)) ;XXX: Tests require the NoseJS Python package.
11561 (home-page "https://github.com/fudge-py/fudge")
11562 (synopsis "Replace real objects with fakes/mocks/stubs while testing")
11563 (description
11564 "Fudge is a Python module for using fake objects (mocks and stubs) to
11565 test real ones.
11566
11567 In readable Python code, you declare the methods available on your fake object
11568 and how they should be called. Then you inject that into your application and
11569 start testing. This declarative approach means you don’t have to record and
11570 playback actions and you don’t have to inspect your fakes after running code.
11571 If the fake object was used incorrectly then you’ll see an informative
11572 exception message with a traceback that points to the culprit.")
11573 (license license:expat)))
11574
11575 (define-public python2-fudge
11576 (package-with-python2 python-fudge))
11577
11578 (define-public python-mwclient
11579 (package
11580 (name "python-mwclient")
11581 (version "0.8.4")
11582 (source
11583 (origin
11584 (method url-fetch)
11585 ;; The PyPI version wouldn't contain tests.
11586 (uri (string-append "https://github.com/mwclient/mwclient/archive/"
11587 "v" version ".tar.gz"))
11588 (file-name (string-append name "-" version ".tar.gz"))
11589 (sha256
11590 (base32
11591 "1jj0yhilkjir00719fc7w133x7hdyhkxhk6xblla4asig45klsfv"))))
11592 (build-system python-build-system)
11593 (propagated-inputs
11594 `(("python-requests" ,python-requests)
11595 ("python-requests-oauthlib"
11596 ,python-requests-oauthlib)
11597 ("python-six" ,python-six)))
11598 (native-inputs
11599 `(("python-mock" ,python-mock)
11600 ("python-pytest" ,python-pytest)
11601 ("python-pytest-pep8" ,python-pytest-pep8)
11602 ("python-pytest-cache" ,python-pytest-cache)
11603 ("python-pytest-cov" ,python-pytest-cov)
11604 ("python-responses" ,python-responses)))
11605 (home-page "https://github.com/btongminh/mwclient")
11606 (synopsis "MediaWiki API client")
11607 (description "This package provides a MediaWiki API client.")
11608 (license license:expat)))
11609
11610 (define-public python2-mwclient
11611 (package-with-python2 python-mwclient))
11612
11613 (define-public python-utils
11614 (package
11615 (name "python-utils")
11616 (version "2.1.0")
11617 (source (origin
11618 (method url-fetch)
11619 (uri (pypi-uri "python-utils" version))
11620 (sha256
11621 (base32
11622 "1mcsy6q5am4ya72rgkpb6kax6vv7c93cfkkas89xnpa4sj9zf28p"))))
11623 (build-system python-build-system)
11624 (native-inputs
11625 `(("pytest-runner" ,python-pytest-runner)
11626 ("pytest" ,python-pytest)
11627 ("six" ,python-six)))
11628 (home-page "https://github.com/WoLpH/python-utils")
11629 (synopsis "Convenient utilities not included with the standard Python install")
11630 (description
11631 "Python Utils is a collection of small Python functions and classes which
11632 make common patterns shorter and easier.")
11633 (license license:bsd-2)))
11634
11635 (define-public python2-utils
11636 (package-with-python2 python-utils))
11637
11638 (define-public python-sphinx-me
11639 (package
11640 (name "python-sphinx-me")
11641 (version "0.3")
11642 (source
11643 (origin
11644 (method url-fetch)
11645 (uri (pypi-uri "sphinx-me" version))
11646 (sha256
11647 (base32
11648 "06jzgp213zihnvpcy2y5jy3ykid3apc2ncp2pg6a2g05lhiziglq"))))
11649 (build-system python-build-system)
11650 (home-page "https://github.com/stephenmcd/sphinx-me")
11651 (synopsis "Create a Sphinx documentation shell")
11652 (description
11653 "Create a Sphinx documentation shell for your project and include the
11654 README file as the documentation index. It handles extracting the required
11655 meta data such as the project name, author and version from your project for
11656 use in your Sphinx docs.")
11657 (license license:bsd-2)))
11658
11659 (define-public python2-sphinx-me
11660 (package-with-python2 python-sphinx-me))
11661
11662 (define-public python-diff-match-patch
11663 (package
11664 (name "python-diff-match-patch")
11665 (version "20121119")
11666 (source
11667 (origin
11668 (method url-fetch)
11669 (uri (pypi-uri "diff-match-patch" version))
11670 (sha256
11671 (base32
11672 "0k1f3v8nbidcmmrk65m7h8v41jqi37653za9fcs96y7jzc8mdflx"))))
11673 (build-system python-build-system)
11674 (home-page "https://code.google.com/p/google-diff-match-patch")
11675 (synopsis "Synchronize plain text")
11676 (description "Diff Match and Patch libraries offer robust algorithms to
11677 perform the operations required for synchronizing plain text.")
11678 (license license:asl2.0)))
11679
11680 (define-public python2-diff-match-patch
11681 (package-with-python2 python-diff-match-patch))
11682
11683 (define-public python-dirsync
11684 (package
11685 (name "python-dirsync")
11686 (version "2.2.3")
11687 (source
11688 (origin
11689 (method url-fetch)
11690 (uri (pypi-uri "dirsync" version))
11691 (sha256
11692 (base32
11693 "1r40fkanksagcszf1ag85mdr8w7rgc7196n6s1qlsk2abw6i7v0z"))))
11694 (build-system python-build-system)
11695 (propagated-inputs
11696 `(("six" ,python-six)))
11697 (home-page "https://bitbucket.org/tkhyn/dirsync")
11698 (synopsis "Advanced directory tree synchronisation tool")
11699 (description "Advanced directory tree synchronisation tool.")
11700 (license license:expat)))
11701
11702 (define-public python2-dirsync
11703 (package-with-python2 python-dirsync))
11704
11705 (define-public python-levenshtein
11706 (package
11707 (name "python-levenshtein")
11708 (version "0.12.0")
11709 (source
11710 (origin
11711 (method url-fetch)
11712 (uri (pypi-uri "python-Levenshtein" version))
11713 (sha256
11714 (base32
11715 "1c9ybqcja31nghfcc8xxbbz9h60s9qi12b9hr4jyl69xbvg12fh3"))))
11716 (build-system python-build-system)
11717 (home-page "https://github.com/ztane/python-Levenshtein")
11718 (synopsis "Fast computation of Levenshtein distance and string similarity")
11719 (description
11720 "The Levenshtein Python C extension module contains functions for fast computation of
11721 @enumerate
11722 @item Levenshtein (edit) distance, and edit operations
11723 @item string similarity
11724 @item approximate median strings, and generally string averaging
11725 @item string sequence and set similarity
11726 @end enumerate
11727 It supports both normal and Unicode strings.")
11728 (license license:gpl2+)))
11729
11730 (define-public python2-levenshtein
11731 (package-with-python2 python-levenshtein))
11732
11733 (define-public python-scandir
11734 (package
11735 (name "python-scandir")
11736 (version "1.7")
11737 (source
11738 (origin
11739 (method url-fetch)
11740 (uri (pypi-uri "scandir" version))
11741 (sha256
11742 (base32 "0gbnhjzg42rj87ljv9kb648rfxph69ly3c8r9841dxy4d7l5pmdj"))))
11743 (build-system python-build-system)
11744 (arguments
11745 `(#:phases (modify-phases %standard-phases
11746 (replace 'check
11747 (lambda _
11748 (invoke "python" "test/run_tests.py"))))))
11749 (home-page "https://github.com/benhoyt/scandir")
11750 (synopsis "Directory iteration function")
11751 (description
11752 "Directory iteration function like os.listdir(), except that instead of
11753 returning a list of bare filenames, it yields DirEntry objects that include
11754 file type and stat information along with the name. Using scandir() increases
11755 the speed of os.walk() by 2-20 times (depending on the platform and file
11756 system) by avoiding unnecessary calls to os.stat() in most cases.
11757
11758 This package is part of the Python standard library since version 3.5.")
11759 (license license:bsd-3)))
11760
11761 (define-public python2-scandir
11762 (package-with-python2 python-scandir))
11763
11764 (define-public python2-stemming
11765 (package
11766 (name "python2-stemming")
11767 (version "1.0.1")
11768 (source
11769 (origin
11770 (method url-fetch)
11771 (uri (pypi-uri "stemming" version))
11772 (sha256
11773 (base32 "0ldwa24gnnxhniv0fhygkpc2mwgd93q10ag8rvzayv6hw418frsr"))))
11774 (build-system python-build-system)
11775 (arguments
11776 `(#:python ,python-2))
11777 (home-page "https://bitbucket.org/mchaput/stemming/overview")
11778 (synopsis "Python implementations of various stemming algorithms")
11779 (description
11780 "Python implementations of the Porter, Porter2, Paice-Husk, and Lovins
11781 stemming algorithms for English. These implementations are straightforward and
11782 efficient, unlike some Python versions of the same algorithms available on the
11783 Web. This package is an extraction of the stemming code included in the Whoosh
11784 search engine.")
11785 (license license:public-domain)))
11786
11787 (define-public python-factory-boy
11788 (package
11789 (name "python-factory-boy")
11790 (version "2.8.1")
11791 (source
11792 (origin
11793 (method url-fetch)
11794 (uri (pypi-uri "factory_boy" version))
11795 (sha256
11796 (base32 "1fvin6san5xsjh2c4y18caj2lnmwxlylyqm8mh1yc6rp38wlwr56"))))
11797 (build-system python-build-system)
11798 (arguments
11799 ;; Tests are not included in the tarball.
11800 `(#:tests? #f))
11801 (propagated-inputs
11802 `(("faker" ,python-faker)))
11803 (home-page "https://github.com/benhoyt/scandir")
11804 (synopsis "Versatile test fixtures replacement")
11805 (description
11806 "Factory_boy is a fixtures replacement based on thoughtbot’s factory_girl.
11807
11808 As a fixtures replacement tool, it aims to replace static, hard to maintain
11809 fixtures with easy-to-use factories for complex object.
11810
11811 Instead of building an exhaustive test setup with every possible combination
11812 of corner cases, factory_boy allows you to use objects customized for the
11813 current test, while only declaring the test-specific fields")
11814 (license license:expat)))
11815
11816 (define-public python2-factory-boy
11817 (package-with-python2 python-factory-boy))
11818
11819 (define-public python-translate-toolkit
11820 (package
11821 (name "python-translate-toolkit")
11822 (version "2.1.0")
11823 (source
11824 (origin
11825 (method url-fetch)
11826 (uri (pypi-uri "translate-toolkit" version ".tar.bz2"))
11827 (sha256
11828 (base32 "1vlkwrg83vb17jc36pmwh2b7jphwf390lz0jw8hakcg16qhwypvq"))))
11829 (build-system python-build-system)
11830 (native-inputs
11831 `(("python-pytest" ,python-pytest)
11832 ("python-sphinx" ,python-sphinx)))
11833 (propagated-inputs
11834 `(("python-babel" ,python-babel)
11835 ("python-beautifulsoup4" ,python-beautifulsoup4)
11836 ("python-chardet" ,python-chardet)
11837 ("python-diff-match-patch" ,python-diff-match-patch)
11838 ("python-levenshtein" ,python-levenshtein)
11839 ("python-lxml" ,python-lxml)
11840 ("python-six" ,python-six)
11841 ("python-vobject" ,python-vobject)
11842 ("python-pyyaml" ,python-pyyaml)))
11843 (arguments
11844 ;; TODO: tests are not run, because they end with
11845 ;; TypeError: parse() missing 2 required positional arguments: 'tree' and
11846 ;; 'parse_funcs'
11847 ;; during test setup.
11848 `(#:tests? #f))
11849 (home-page "http://toolkit.translatehouse.org")
11850 (synopsis "Tools and API for translation and localization engineering")
11851 (description
11852 "Tools and API for translation and localization engineering. It contains
11853 several utilities, as well as an API for building localization tools.")
11854 (license license:gpl2+)))
11855
11856 (define-public python2-translate-toolkit
11857 (package-with-python2 python-translate-toolkit))
11858
11859 (define-public python-packaging
11860 (package
11861 (name "python-packaging")
11862 (version "16.8")
11863 (source
11864 (origin
11865 (method url-fetch)
11866 (uri (pypi-uri "packaging" version))
11867 (sha256
11868 (base32
11869 "17k1xbjshackwvbsnxqixbph8rbqhz4bf4g3al5xyzhavxgq6l2x"))))
11870 (build-system python-build-system)
11871 (native-inputs
11872 `(("python-pretend" ,python-pretend)
11873 ("python-pytest" ,python-pytest)))
11874 (propagated-inputs
11875 `(("python-pyparsing" ,python-pyparsing)
11876 ("python-six" ,python-six)))
11877 (home-page "https://github.com/pypa/packaging")
11878 (synopsis "Core utilities for Python packages")
11879 (description "Packaging is a Python module for dealing with Python packages.
11880 It offers an interface for working with package versions, names, and dependency
11881 information.")
11882 ;; From 'LICENSE': This software is made available under the terms of
11883 ;; *either* of the licenses found in LICENSE.APACHE or LICENSE.BSD.
11884 ;; Contributions to this software is made under the terms of *both* these
11885 ;; licenses.
11886 (license (list license:asl2.0 license:bsd-2))))
11887
11888 (define-public python2-packaging
11889 (package-with-python2 python-packaging))
11890
11891 (define-public python-relatorio
11892 (package
11893 (name "python-relatorio")
11894 (version "0.8.0")
11895 (source
11896 (origin
11897 (method url-fetch)
11898 (uri (pypi-uri "relatorio" version))
11899 (sha256
11900 (base32
11901 "1na6hlhz1awi1hbjg1gyclq0khz42iz90wvdjw7mmj655788bpxx"))))
11902 (build-system python-build-system)
11903 (propagated-inputs
11904 `(("python-lxml" ,python-lxml)
11905 ("python-genshi" ,python-genshi)))
11906 (native-inputs
11907 `(("python-magic" ,python-magic)))
11908 (home-page "https://relatorio.tryton.org/")
11909 (synopsis "Templating library able to output ODT and PDF files")
11910 (description "Relatorio is a templating library which provides a way to
11911 easily output ODT, ODS, PNG, SVG and several other kinds of files. Support
11912 for more filetypes can be easily added by creating plugins for them.")
11913 (license license:gpl3+)))
11914
11915 (define-public python2-relatorio
11916 (package-with-python2 python-relatorio))
11917
11918 (define-public python-radon
11919 (package
11920 (name "python-radon")
11921 (version "2.2.0")
11922 (source
11923 (origin
11924 (method url-fetch)
11925 (uri (pypi-uri "radon" version))
11926 (sha256
11927 (base32
11928 "07gq5hq4nrffxnlnksws9hrx7fd001gam63j62i82gyfr23gvdym"))))
11929 (build-system python-build-system)
11930 (arguments
11931 `(#:phases (modify-phases %standard-phases
11932 (replace 'check
11933 (lambda _
11934 (invoke "python" "radon/tests/run.py"))))))
11935 (propagated-inputs
11936 `(("python-colorama" ,python-colorama)
11937 ("python-flake8-polyfill" ,python-flake8-polyfill)
11938 ("python-mando" ,python-mando)))
11939 (native-inputs
11940 `(("python-pytest" ,python-pytest)
11941 ("python-pytest-mock" ,python-pytest-mock)))
11942 (home-page "https://radon.readthedocs.org/")
11943 (synopsis "Code Metrics in Python")
11944 (description "Radon is a Python tool which computes various code metrics.
11945 Supported metrics are:
11946 @itemize @bullet
11947 @item raw metrics: SLOC, comment lines, blank lines, &c.
11948 @item Cyclomatic Complexity (i.e. McCabe’s Complexity)
11949 @item Halstead metrics (all of them)
11950 @item the Maintainability Index (a Visual Studio metric)
11951 @end itemize")
11952 (license license:expat)))
11953
11954 (define-public python2-radon
11955 (package-with-python2 python-radon))
11956
11957 (define-public python-sure
11958 (package
11959 (name "python-sure")
11960 (version "1.4.11")
11961 (source
11962 (origin
11963 (method url-fetch)
11964 (uri (pypi-uri "sure" version))
11965 (sha256
11966 (base32
11967 "1and0drq8w9iplsic22n2h7hkpyq03a1mbqk4sgcdqhqzdqm539w"))))
11968 (build-system python-build-system)
11969 (propagated-inputs
11970 `(("python-mock" ,python-mock)
11971 ("python-six" ,python-six)))
11972 (native-inputs
11973 `(("python-nose" ,python-nose)))
11974 (home-page "https://github.com/gabrielfalcao/sure")
11975 (synopsis "Automated testing library in python for python")
11976 (description
11977 "Sure is a python library that leverages a DSL for writing assertions.
11978 Sure is heavily inspired by @code{RSpec Expectations} and @code{should.js}.")
11979 (license license:gpl3+)))
11980
11981 (define-public python2-sure
11982 (package-with-python2 python-sure))
11983
11984 (define-public python2-couleur
11985 ;; This package does not seem to support python3 at all, hence,
11986 ;; only the python2 variant definition is provided.
11987 (package
11988 (name "python2-couleur")
11989 (version "0.6.2")
11990 (source
11991 (origin
11992 (method url-fetch)
11993 (uri (pypi-uri "couleur" version))
11994 (sha256
11995 (base32
11996 "1qqaxyqz74wvid0cr119dhcwz0h0if5b5by44zl49pd5z65v58k1"))))
11997 (build-system python-build-system)
11998 (arguments
11999 `(#:python ,python-2))
12000 (home-page "https://github.com/gabrielfalcao/couleur")
12001 (synopsis
12002 "ANSI terminal tool for python, colored shell and other handy fancy features")
12003 (description
12004 "@code{Couleur} provides python programs a way to use the ANSI features in a unix
12005 terminal such as coloured output in the shell, overwriting output, indentation, etc.")
12006 ;; README.md says ASL2.0, but all source code headers are LGPL3+.
12007 ;; https://github.com/gabrielfalcao/couleur/issues/11
12008 (license license:lgpl3+)))
12009
12010 (define-public python-misaka
12011 (package
12012 (name "python-misaka")
12013 (version "2.1.0")
12014 (source
12015 (origin
12016 (method url-fetch)
12017 (uri (pypi-uri "misaka" version))
12018 (sha256
12019 (base32
12020 "1yqrq3a5rracirmvk52n28nn6ckdaz897gnigv89a9gmyn87sqw7"))))
12021 (build-system python-build-system)
12022 (arguments
12023 `(;; Line 37 of setup.py calls self.run_command('develop')
12024 ;; in the 'check' phase. This command seems to be trying
12025 ;; to write to
12026 ;; /gnu/store/...-python-<version>/lib/python<version>/site-packages/
12027 ;; for which it does not have the permission to write.
12028 #:tests? #f))
12029 (propagated-inputs
12030 `(("python-cffi" ,python-cffi)))
12031 (home-page "https://github.com/FSX/misaka")
12032 (synopsis "Python binding for Hoedown")
12033 (description
12034 "@code{Misaka} is a CFFI-based binding for @code{Hoedown}, a fast markdown processing
12035 library written in C. It features a fast HTML renderer and functionality to make custom
12036 renderers (e.g. man pages or LaTeX).")
12037 (license license:expat)))
12038
12039 (define-public python2-misaka
12040 (package-with-python2 python-misaka))
12041
12042 (define-public python2-steadymark
12043 ;; This is forced into being a python2 only variant
12044 ;; due to its dependence on couleur that has no support
12045 ;; for python3
12046 (package
12047 (name "python2-steadymark")
12048 (version "0.7.3")
12049 (source
12050 (origin
12051 (method url-fetch)
12052 (uri (pypi-uri "steadymark" version))
12053 (sha256
12054 (base32
12055 "1640i9g8dycql3cc8j0bky0jkzj0q39blfbp4lsgpkprkfgcdk8v"))))
12056 (build-system python-build-system)
12057 (native-inputs
12058 `(("python-couleur" ,python2-couleur)
12059 ("python-sure" ,python2-sure)
12060 ("python-misaka" ,python2-misaka)))
12061 (arguments
12062 `(#:python ,python-2
12063 #:phases
12064 (modify-phases %standard-phases
12065 (add-before 'build 'patch-setup-py
12066 (lambda _
12067 ;; Update requirements from dependency==version
12068 ;; to dependency>=version
12069 (substitute* "setup.py"
12070 (("==") ">="))
12071 #t)))))
12072 (home-page "https://github.com/gabrielfalcao/steadymark")
12073 (synopsis "Markdown-based test runner for python")
12074 (description
12075 "@code{Steadymark} allows documentation to be written in github-flavoured
12076 markdown. The documentation may contain snippets of code surrounded by python
12077 code blocks and @code{Steadymark} will find these snippets and run them, making
12078 sure that there are no old malfunctional examples in the documentation examples.")
12079 (license license:expat)))
12080
12081 (define-public python-jsonpointer
12082 (package
12083 (name "python-jsonpointer")
12084 (version "1.10")
12085 (source
12086 (origin
12087 (method url-fetch)
12088 (uri (pypi-uri "jsonpointer" version))
12089 (sha256
12090 (base32
12091 "1cg0gvgqjysydv6p45v4jywg1jb3v48c7m3cbpi57zgf6nndr9cz"))))
12092 (build-system python-build-system)
12093 (home-page "https://github.com/stefankoegl/python-json-pointer")
12094 (synopsis "Identify specific nodes in a JSON document")
12095 (description "@code{jsonpointer} allows you to access specific nodes
12096 by path in a JSON document (see RFC 6901).")
12097 (license license:bsd-3)))
12098
12099 (define-public python2-jsonpointer
12100 (package-with-python2 python-jsonpointer))
12101
12102 (define-public python-jsonpatch
12103 (package
12104 (name "python-jsonpatch")
12105 (version "1.16")
12106 (source
12107 (origin
12108 (method url-fetch)
12109 ;; pypi version lacks tests.js
12110 (uri (string-append "https://github.com/stefankoegl/python-json-patch/"
12111 "archive/v" version ".tar.gz"))
12112 (file-name (string-append name "-" version ".tar.gz"))
12113 (sha256
12114 (base32
12115 "085ykisl8v7mv9h7hvhdy3l2fjzs4214gx32r5k6nx4f76hbv6y5"))))
12116 (build-system python-build-system)
12117 (native-inputs
12118 `(("python-jsonpointer" ,python-jsonpointer)))
12119 (home-page "https://github.com/stefankoegl/python-json-patch")
12120 (synopsis "Applying JSON Patches in Python 2.6+ and 3.x")
12121 (description "@code{jsonpatch} is a library and program that allows
12122 applying JSON Patches according to RFC 6902.")
12123 (license license:bsd-3)))
12124
12125 (define-public python2-jsonpatch
12126 (package-with-python2 python-jsonpatch))
12127
12128 (define-public python-jsonpatch-0.4
12129 (package (inherit python-jsonpatch)
12130 (name "python-jsonpatch")
12131 (version "0.4")
12132 (source
12133 (origin
12134 (method url-fetch)
12135 (uri (string-append "https://github.com/stefankoegl/python-json-patch/"
12136 "archive/v" version ".tar.gz"))
12137 (file-name (string-append name "-" version ".tar.gz"))
12138 (sha256
12139 (base32
12140 "0j0cd9z9zyp8kppp464jxrfgrnbgkzl1yi10i5gsv8yz6d95929d"))))))
12141
12142 (define-public python2-jsonpatch-0.4
12143 (package-with-python2 python-jsonpatch-0.4))
12144
12145 (define-public python-rfc3986
12146 (package
12147 (name "python-rfc3986")
12148 (version "1.1.0")
12149 (source (origin
12150 (method url-fetch)
12151 (uri (pypi-uri "rfc3986" version))
12152 (sha256
12153 (base32
12154 "06wlmysw83f75ff84zr1yr6n0shvc2xn1n1sb4iwzqap9hf5fn44"))))
12155 (build-system python-build-system)
12156 (arguments
12157 `(#:modules ((guix build utils)
12158 (guix build python-build-system)
12159 (ice-9 ftw)
12160 (srfi srfi-1)
12161 (srfi srfi-26))
12162 #:phases
12163 (modify-phases %standard-phases
12164 (replace 'check
12165 (lambda _
12166 (let ((cwd (getcwd)))
12167 (setenv "PYTHONPATH"
12168 (string-append cwd "/build/"
12169 (find (cut string-prefix? "lib" <>)
12170 (scandir (string-append cwd "/build")))
12171 ":"
12172 (getenv "PYTHONPATH")))
12173 (invoke "pytest" "-v")))))))
12174 (native-inputs
12175 `(("python-pytest" ,python-pytest)))
12176 (home-page "https://rfc3986.readthedocs.io/")
12177 (synopsis "Parse and validate URI references")
12178 (description
12179 "@code{rfc3986} is a Python implementation of RFC@tie{}3986 including
12180 validation and authority parsing. This module also supports RFC@tie{}6874
12181 which adds support for zone identifiers to IPv6 addresses.")
12182 (license license:asl2.0)))
12183
12184 (define-public python2-rfc3986
12185 (package-with-python2 python-rfc3986))
12186
12187 (define-public python-rfc3987
12188 (package
12189 (name "python-rfc3987")
12190 (version "1.3.7")
12191 (source
12192 (origin
12193 (method url-fetch)
12194 (uri (pypi-uri "rfc3987" version))
12195 (sha256
12196 (base32
12197 "192pclzs2y0yaywqkrlvd0x73740q310kvqvm6jldhi619mq59wi"))))
12198 (build-system python-build-system)
12199 (home-page "https://pypi.python.org/pypi/rfc3987")
12200 (synopsis "Parsing and validation of URIs (RFC 3986) and IRIs (RFC 3987)")
12201 (description "@code{rfc3987} provides routines for parsing and
12202 validation of URIs (see RFC 3986) and IRIs (see RFC 3987).")
12203 (license license:gpl3+)))
12204
12205 (define-public python2-rfc3987
12206 (package-with-python2 python-rfc3987))
12207
12208 (define-public python-validate-email
12209 (package
12210 (name "python-validate-email")
12211 (version "1.3")
12212 (source
12213 (origin
12214 (method url-fetch)
12215 (uri (pypi-uri "validate_email" version))
12216 (sha256
12217 (base32
12218 "1bxffaf5yz2cph8ki55vdvdypbwkvn2xr1firlcy62vqbzf1jivq"))))
12219 (build-system python-build-system)
12220 (home-page "https://github.com/syrusakbary/validate_email")
12221 (synopsis "Verifies if an email address is valid and really exists")
12222 (description "@code{validate_email} can be used to verify if an email
12223 address is valid and really exists.")
12224 (license license:lgpl3+)))
12225
12226 (define-public python2-validate-email
12227 (package-with-python2 python-validate-email))
12228
12229 (define-public python-flex
12230 (package
12231 (name "python-flex")
12232 (version "6.10.0")
12233 (source
12234 (origin
12235 (method url-fetch)
12236 (uri (pypi-uri "flex" version))
12237 (sha256
12238 (base32
12239 "00pamnwla3khk8nyla7y28dq9jnh69swd7f4jfsl7sn1izs8n8zk"))))
12240 (build-system python-build-system)
12241 (propagated-inputs
12242 `(("python-click" ,python-click)
12243 ("python-iso8601" ,python-iso8601)
12244 ("python-jsonpointer" ,python-jsonpointer)
12245 ("python-pyyaml" ,python-pyyaml)
12246 ("python-requests" ,python-requests)
12247 ("python-rfc3987" ,python-rfc3987)
12248 ("python-six" ,python-six)
12249 ("python-validate-email" ,python-validate-email)))
12250 (home-page "https://github.com/pipermerriam/flex")
12251 (synopsis "Validates Swagger schemata")
12252 (description "@code{flex} can be used to validate Swagger schemata.")
12253 (license license:bsd-3)))
12254
12255 (define-public python2-flex
12256 (package-with-python2 python-flex))
12257
12258 (define-public python-marshmallow
12259 (package
12260 (name "python-marshmallow")
12261 (version "3.0.0b14")
12262 (source
12263 (origin
12264 (method url-fetch)
12265 (uri (pypi-uri "marshmallow" version))
12266 (sha256
12267 (base32
12268 "1digk3f5cfk7wmlka65mc7bzsd96pbsgcsvp6pimd5b4ff9zb5p3"))))
12269 (build-system python-build-system)
12270 (propagated-inputs
12271 `(("python-dateutil" ,python-dateutil)
12272 ("python-simplejson" ,python-simplejson)))
12273 (native-inputs
12274 `(("python-pytest" ,python-pytest)
12275 ("python-pytz" ,python-pytz)))
12276 (home-page "https://github.com/marshmallow-code/marshmallow")
12277 (synopsis "Convert complex datatypes to and from native
12278 Python datatypes.")
12279 (description "@code{marshmallow} provides a library for converting
12280 complex datatypes to and from native Python datatypes.")
12281 (license license:expat)))
12282
12283 (define-public python2-marshmallow
12284 (package-with-python2 python-marshmallow))
12285
12286 (define-public python-apispec
12287 (package
12288 (name "python-apispec")
12289 (version "0.25.3")
12290 (source
12291 (origin
12292 (method url-fetch)
12293 (uri (pypi-uri "apispec" version))
12294 (sha256
12295 (base32
12296 "0kxa8723zbisx10363yh4mmmn4higxrspymbjfz5zq8f644zagm9"))))
12297 (build-system python-build-system)
12298 (propagated-inputs
12299 `(("python-pyyaml" ,python-pyyaml)))
12300 (native-inputs
12301 `(("python-pytest" ,python-pytest)
12302 ("python-flask" ,python-flask)
12303 ("python-marshmallow" ,python-marshmallow)
12304 ("python-tornado" ,python-tornado)
12305 ("python-bottle" ,python-bottle)
12306 ("python-mock" ,python-mock)))
12307 (home-page "https://github.com/marshmallow-code/apispec")
12308 (synopsis "Swagger 2.0 API specification generator")
12309 (description "@code{python-apispec} is a pluggable API specification
12310 generator. Currently supports the OpenAPI specification (f.k.a.
12311 Swagger 2.0).")
12312 (license license:expat)))
12313
12314 (define-public python2-apispec
12315 (package-with-python2 python-apispec))
12316
12317 (define-public python-flasgger
12318 (package
12319 (name "python-flasgger")
12320 (version "0.6.3")
12321 (source
12322 (origin
12323 (method url-fetch)
12324 (uri (string-append "https://github.com/rochacbruno/flasgger/archive/"
12325 version ".tar.gz"))
12326 (file-name (string-append name "-" version ".tar.gz"))
12327 (sha256
12328 (base32
12329 "1gqzlm0rb55fdpsy5ipkganlx9cnpi454fqyycr03jm22zql14ay"))))
12330 (build-system python-build-system)
12331 (arguments
12332 `(#:phases
12333 (modify-phases %standard-phases
12334 (replace 'check
12335 (lambda* (#:key inputs outputs #:allow-other-keys)
12336 (substitute* "Makefile"
12337 (("flake8 flasgger --ignore=F403")
12338 "flake8 flasgger --ignore=E731,F403"))
12339 (setenv "PYTHONPATH" (string-append (getcwd)
12340 ":"
12341 (getenv "PYTHONPATH")))
12342 (zero? (system* "py.test")))))))
12343 (propagated-inputs
12344 `(("python-flask" ,python-flask)
12345 ("python-pyyaml" ,python-pyyaml)
12346 ("python-jsonschema" ,python-jsonschema)
12347 ("python-mistune" ,python-mistune)
12348 ("python-six" ,python-six)))
12349 (native-inputs
12350 `(("python-decorator" ,python-decorator)
12351 ("python-flake8" ,python-flake8)
12352 ("python-flask-restful" ,python-flask-restful)
12353 ("python-flex" ,python-flex)
12354 ("python-pytest" ,python-pytest)
12355 ("python-pytest-cov" ,python-pytest-cov)
12356 ("python-marshmallow" ,python-marshmallow)
12357 ("python-apispec" ,python-apispec)))
12358 (home-page "https://github.com/rochacbruno/flasgger/")
12359 (synopsis "Extract Swagger specs from your Flask project")
12360 (description "@code{python-flasgger} allows extracting Swagger specs
12361 from your Flask project. It is a fork of Flask-Swagger.")
12362 (license license:expat)))
12363
12364 (define-public python2-flasgger
12365 (package-with-python2 python-flasgger))
12366
12367 (define-public python-swagger-spec-validator
12368 (package
12369 (name "python-swagger-spec-validator")
12370 (version "2.1.0")
12371 (source
12372 (origin
12373 (method url-fetch)
12374 (uri (pypi-uri "swagger-spec-validator" version))
12375 (sha256
12376 (base32
12377 "13hkpn2lycwr0468yqhjb3kwszqf7hjwlq61w7vdxq1caz31k4nw"))))
12378 (build-system python-build-system)
12379 (propagated-inputs
12380 `(("python-jsonschema" ,python-jsonschema)
12381 ("python-six" ,python-six)))
12382 (home-page
12383 "https://github.com/Yelp/swagger_spec_validator")
12384 (synopsis "Validation of Swagger specifications")
12385 (description "@code{swagger_spec_validator} provides a library for
12386 validating Swagger API specifications.")
12387 (license license:asl2.0)))
12388
12389 (define-public python2-swagger-spec-validator
12390 (package-with-python2 python-swagger-spec-validator))
12391
12392 (define-public python-apache-libcloud
12393 (package
12394 (name "python-apache-libcloud")
12395 (version "2.3.0")
12396 (source
12397 (origin
12398 (method url-fetch)
12399 (uri (pypi-uri "apache-libcloud" version))
12400 (sha256
12401 (base32
12402 "15xg79ad4g2xrk081ylvj41k5hmg9hl1xvbmb5hd0fqn08wfwbhf"))))
12403 (build-system python-build-system)
12404 (arguments
12405 `(#:phases
12406 (modify-phases %standard-phases
12407 (add-after 'unpack 'patch-ssh
12408 (lambda* (#:key inputs #:allow-other-keys)
12409 (substitute* "libcloud/compute/ssh.py"
12410 (("'ssh'") (string-append "'" (assoc-ref inputs "openssh")
12411 "/bin/ssh" "'")))
12412 #t))
12413 (add-after 'unpack 'patch-tests
12414 (lambda _
12415 (substitute* "./libcloud/test/test_file_fixtures.py"
12416 ;; See <https://issues.apache.org/jira/browse/LIBCLOUD-923>.
12417 (("def _ascii") "def _raw_data(self, method, url, body, headers):
12418 return (httplib.OK,
12419 \"1234abcd\",
12420 {\"test\": \"value\"},
12421 httplib.responses[httplib.OK])
12422 def _ascii"))
12423 (substitute* "libcloud/test/compute/test_ssh_client.py"
12424 (("class ShellOutSSHClientTests")
12425 "@unittest.skip(\"Guix container doesn't have ssh service\")
12426 class ShellOutSSHClientTests")
12427 ;; See <https://issues.apache.org/jira/browse/LIBCLOUD-924>.
12428 (("'.xf0.x90.x8d.x88'") "b'\\xF0\\x90\\x8D\\x88'")
12429 (("'.xF0', '.x90', '.x8D', '.x88'")
12430 "b'\\xF0', b'\\x90', b'\\x8D', b'\\x88'"))
12431 #t))
12432 (add-before 'check 'copy-secret
12433 (lambda _
12434 (copy-file "libcloud/test/secrets.py-dist"
12435 "libcloud/test/secrets.py")
12436 #t)))))
12437 (inputs
12438 `(("openssh" ,openssh)))
12439 (propagated-inputs
12440 `(("python-paramiko" ,python-paramiko)
12441 ("python-requests" ,python-requests)))
12442 (native-inputs
12443 `(("python-lockfile" ,python-lockfile)
12444 ("python-mock" ,python-mock)
12445 ("python-pytest" ,python-pytest)
12446 ("python-pytest-runner" ,python-pytest-runner)
12447 ("python-requests-mock" ,python-requests-mock)))
12448 (home-page "https://libcloud.apache.org/")
12449 (synopsis "Unified Cloud API")
12450 (description "@code{libcloud} is a Python library for interacting with
12451 many of the popular cloud service providers using a unified API.")
12452 (license license:asl2.0)))
12453
12454 (define-public python2-apache-libcloud
12455 (package-with-python2 python-apache-libcloud))
12456
12457 (define-public python-smmap2
12458 (package
12459 (name "python-smmap2")
12460 (version "2.0.3")
12461 (source
12462 (origin
12463 (method url-fetch)
12464 (uri (pypi-uri "smmap2" version))
12465 (sha256
12466 (base32
12467 "1hvn28p3zvxa98sbi9lrqvv2ps4q284j4jq9a619zw0m7yv0sly7"))))
12468 (build-system python-build-system)
12469 (native-inputs
12470 `(("python-nosexcover" ,python-nosexcover)))
12471 (home-page "https://github.com/Byron/smmap")
12472 (synopsis "Python sliding window memory map manager")
12473 (description "@code{smmap2} is a pure Python implementation of a sliding
12474 window memory map manager.")
12475 (license license:bsd-3)))
12476
12477 (define-public python2-smmap2
12478 (package-with-python2 python-smmap2))
12479
12480 (define-public python-regex
12481 (package
12482 (name "python-regex")
12483 (version "2017.06.07")
12484 (source (origin
12485 (method url-fetch)
12486 (uri (pypi-uri "regex" version))
12487 (sha256
12488 (base32
12489 "06r6b7yigikbj3a72whl85r2b64pj1r0ypmw9yalmkm0wnxq8mz4"))))
12490 (build-system python-build-system)
12491 (home-page "https://bitbucket.org/mrabarnett/mrab-regex")
12492 (synopsis "Alternative regular expression module")
12493 (description "This regular expression implementation is backwards-
12494 compatible with the standard @code{re} module, but offers additional
12495 functionality like full case-folding for case-insensitive matches in Unicode.")
12496 (license license:psfl)))
12497
12498 (define-public python2-regex
12499 (package-with-python2 python-regex))
12500
12501 (define-public python2-pyopengl
12502 (package
12503 (name "python2-pyopengl")
12504 (version "3.1.0")
12505 (source
12506 (origin
12507 (method url-fetch)
12508 (uri (pypi-uri "PyOpenGL" version))
12509 (sha256
12510 (base32
12511 "1byxjj6a8rwzhxhjqlc588zdad2qwxdd7vlam2653ylll31waiwv"))))
12512 (arguments
12513 `(#:python ,python-2))
12514 (build-system python-build-system)
12515 (home-page "http://pyopengl.sourceforge.net")
12516 (synopsis "Standard OpenGL bindings for Python")
12517 (description
12518 "PyOpenGL is the most common cross platform Python binding to OpenGL and
12519 related APIs. The binding is created using the standard @code{ctypes}
12520 library.")
12521 (license license:bsd-3)))
12522
12523 (define-public python2-pyopengl-accelerate
12524 (package
12525 (inherit python2-pyopengl)
12526 (name "python2-pyopengl-accelerate")
12527 (version "3.1.0")
12528 (source
12529 (origin
12530 (method url-fetch)
12531 (uri (pypi-uri "PyOpenGL-accelerate" version))
12532 (sha256
12533 (base32
12534 "0464c1ifzk0k92lyndikmvzjgnx1y25r7bkkc8pnxm4kp1q4czwj"))))
12535 (synopsis "Acceleration code for PyOpenGL")
12536 (description
12537 "This is the Cython-coded accelerator module for PyOpenGL.")))
12538
12539 (define-public python-rencode
12540 (package
12541 (name "python-rencode")
12542 (version "1.0.5")
12543 (source
12544 (origin
12545 (method url-fetch)
12546 (uri (pypi-uri "rencode" version))
12547 (sha256
12548 (base32
12549 "0mzwdq1is7kyyr32i5k4iz6g5xxdvmiyc132jnc60p9m6lnwjrpv"))))
12550 (build-system python-build-system)
12551 (arguments
12552 `(#:phases
12553 (modify-phases %standard-phases
12554 (add-before 'check 'delete-bogus-test
12555 ;; This test requires /home/aresch/Downloads, which is not provided by
12556 ;; the build environment.
12557 (lambda _
12558 (delete-file "rencode/t.py")
12559 #t)))))
12560 (native-inputs `(("pkg-config" ,pkg-config)
12561 ("python-cython" ,python-cython)))
12562 (home-page "https://github.com/aresch/rencode")
12563 (synopsis "Serialization of heterogeneous data structures")
12564 (description
12565 "The @code{rencode} module is a data structure serialization library,
12566 similar to @code{bencode} from the BitTorrent project. For complex,
12567 heterogeneous data structures with many small elements, r-encoding stake up
12568 significantly less space than b-encodings. This version of rencode is a
12569 complete rewrite in Cython to attempt to increase the performance over the
12570 pure Python module.")
12571 (license license:bsd-3)))
12572
12573 (define-public python2-rencode
12574 (package-with-python2 python-rencode))
12575
12576 (define-public python-xenon
12577 (package
12578 (name "python-xenon")
12579 (version "0.5.4")
12580 (source
12581 (origin
12582 (method url-fetch)
12583 (uri (pypi-uri "xenon" version))
12584 (sha256
12585 (base32
12586 "029cbhysg2vr5n4jz8gpg2793f8wkwnqpr1qgv6c1dn685vy31mc"))))
12587 (build-system python-build-system)
12588 (native-inputs
12589 `(("python-pyyaml" ,python-pyyaml)
12590 ("python-radon" ,python-radon)
12591 ("python-requests" ,python-requests)
12592 ("python-flake8" ,python-flake8)
12593 ("python-tox" ,python-tox)))
12594 (arguments
12595 `(#:phases
12596 (modify-phases %standard-phases
12597 (add-before 'build 'patch-test-requirements
12598 (lambda _
12599 ;; Remove httpretty dependency for tests.
12600 (substitute* "setup.py"
12601 (("httpretty") ""))
12602 #t)))))
12603 (home-page "https://xenon.readthedocs.org/")
12604 (synopsis "Monitor code metrics for Python on your CI server")
12605 (description
12606 "Xenon is a monitoring tool based on Radon. It monitors code complexity.
12607 Ideally, @code{xenon} is run every time code is committed. Through command
12608 line options, various thresholds can be set for the complexity of code. It
12609 will fail (i.e. it will exit with a non-zero exit code) when any of these
12610 requirements is not met.")
12611 (license license:expat)))
12612
12613 (define-public python2-xenon
12614 (package-with-python2 python-xenon))
12615
12616 (define-public python-pysocks
12617 (package
12618 (name "python-pysocks")
12619 (version "1.6.7")
12620 (source
12621 (origin
12622 (method url-fetch)
12623 (uri (pypi-uri "PySocks" version))
12624 (sha256
12625 (base32
12626 "1krkiss578zqwcg4c8iqz1hwscwhsvy2djp3xyvps5gsgvr2j0yh"))))
12627 (build-system python-build-system)
12628 (arguments `(#:tests? #f))
12629 (home-page "https://github.com/Anorov/PySocks")
12630 (synopsis "SOCKS client module")
12631 (description "@code{pysocks} is an updated and semi-actively maintained
12632 version of @code{SocksiPy} with bug fixes and extra features.")
12633 (license license:bsd-3)))
12634
12635 (define-public python2-pysocks
12636 (package-with-python2 python-pysocks))
12637
12638 (define-public python-pydiff
12639 (package
12640 (name "python-pydiff")
12641 (version "0.2")
12642 (source
12643 (origin
12644 (method url-fetch)
12645 (uri (pypi-uri "pydiff" version))
12646 (sha256
12647 (base32
12648 "1als83h9w0gab24ipyna6khm390qmpnpkc5jksmdbs2xc8hp2z44"))))
12649 (build-system python-build-system)
12650 (home-page "https://github.com/myint/pydiff")
12651 (synopsis "Library to diff two Python files at the bytecode level")
12652 (description
12653 "@code{pydiff} makes it easy to look for actual code changes while
12654 ignoring formatting changes.")
12655 (license license:expat)))
12656
12657 (define-public python2-pydiff
12658 (package-with-python2 python-pydiff))
12659
12660 (define-public python-tqdm
12661 (package
12662 (name "python-tqdm")
12663 (version "4.19.6")
12664 (source
12665 (origin
12666 (method url-fetch)
12667 (uri (pypi-uri "tqdm" version))
12668 (sha256
12669 (base32
12670 "1pw0ngm0zn9papdmkwipi3yih5c3di6d0w849bdmrraq4d2d9h2y"))))
12671 (build-system python-build-system)
12672 (native-inputs
12673 `(("python-flake8" ,python-flake8)
12674 ("python-nose" ,python-nose)
12675 ("python-coverage" ,python-coverage)))
12676 (home-page "https://github.com/tqdm/tqdm")
12677 (synopsis "Fast, extensible progress meter")
12678 (description
12679 "Make loops show a progress bar on the console by just wrapping any
12680 iterable with @code{|tqdm(iterable)|}. Offers many options to define
12681 design and layout.")
12682 (license (list license:mpl2.0 license:expat))))
12683
12684 (define-public python2-tqdm
12685 (package-with-python2 python-tqdm))
12686
12687 (define-public python-pkginfo
12688 (package
12689 (name "python-pkginfo")
12690 (version "1.4.2")
12691 (source
12692 (origin
12693 (method url-fetch)
12694 (uri (pypi-uri "pkginfo" version))
12695 (sha256
12696 (base32
12697 "0x6lm17p1ks031mj6pajyp4rkq74vpqq8qwjb7ikgwmkli1day2q"))))
12698 (build-system python-build-system)
12699 (arguments
12700 ;; The tests are broken upstream.
12701 '(#:tests? #f))
12702 (home-page
12703 "https://code.launchpad.net/~tseaver/pkginfo/trunk")
12704 (synopsis
12705 "Query metadatdata from sdists, bdists, and installed packages")
12706 (description
12707 "API to query the distutils metadata written in @file{PKG-INFO} inside a
12708 source distriubtion (an sdist) or a binary distribution (e.g., created by
12709 running bdist_egg). It can also query the EGG-INFO directory of an installed
12710 distribution, and the *.egg-info stored in a \"development checkout\" (e.g,
12711 created by running @code{python setup.py develop}).")
12712 (license license:expat)))
12713
12714 (define-public python2-pkginfo
12715 (package-with-python2 python-pkginfo))
12716
12717 (define-public python-twine
12718 (package
12719 (name "python-twine")
12720 (version "1.9.1")
12721 (source
12722 (origin
12723 (method url-fetch)
12724 (uri (pypi-uri "twine" version))
12725 (sha256
12726 (base32
12727 "1ay1b6kdq6k4bfbjsvf6ymj41wrgpvinhxndb09355pwhxwmp96a"))))
12728 (build-system python-build-system)
12729 (propagated-inputs
12730 `(("python-tqdm" ,python-tqdm)
12731 ("python-pkginfo" ,python-pkginfo)
12732 ("python-requests" ,python-requests)
12733 ("python-requests-toolbelt" ,python-requests-toolbelt)))
12734 (home-page "https://github.com/pypa/twine")
12735 (synopsis "Collection of utilities for interacting with PyPI")
12736 (description
12737 "@code{twine} currently supports registering projects and uploading
12738 distributions. It authenticates the user over HTTPS, allows them to pre-sign
12739 their files and supports any packaging format (including wheels).")
12740 (license license:asl2.0)))
12741
12742 (define-public python2-twine
12743 (package-with-python2 python-twine))
12744
12745 (define-public python-linecache2
12746 (package
12747 (name "python-linecache2")
12748 (version "1.0.0")
12749 (source
12750 (origin
12751 (method url-fetch)
12752 (uri (pypi-uri "linecache2" version))
12753 (sha256
12754 (base32
12755 "0z79g3ds5wk2lvnqw0y2jpakjf32h95bd9zmnvp7dnqhf57gy9jb"))))
12756 (build-system python-build-system)
12757 (arguments
12758 `(;; The tests depend on unittest2, and our version is a bit too old.
12759 #:tests? #f))
12760 (native-inputs
12761 `(("python-pbr" ,python-pbr-minimal)))
12762 (home-page
12763 "https://github.com/testing-cabal/linecache2")
12764 (synopsis "Backports of the linecache module")
12765 (description
12766 "The linecache module allows one to get any line from any file, while
12767 attempting to optimize internally, using a cache, the common case where many
12768 lines are read from a single file.")
12769 (license license:psfl)))
12770
12771 (define-public python2-linecache2
12772 (package-with-python2 python-linecache2))
12773
12774 (define-public python-traceback2
12775 (package
12776 (name "python-traceback2")
12777 (version "1.4.0")
12778 (source
12779 (origin
12780 (method url-fetch)
12781 (uri (pypi-uri "traceback2" version))
12782 (sha256
12783 (base32
12784 "0c1h3jas1jp1fdbn9z2mrgn3jj0hw1x3yhnkxp7jw34q15xcdb05"))))
12785 (build-system python-build-system)
12786 (arguments
12787 `(;; python-traceback2 and python-unittest2 depend on one another.
12788 #:tests? #f))
12789 (native-inputs
12790 `(("python-pbr" ,python-pbr-minimal)))
12791 (propagated-inputs
12792 `(("python-linecache2" ,python-linecache2)))
12793 (home-page
12794 "https://github.com/testing-cabal/traceback2")
12795 (synopsis "Backports of the traceback module")
12796 (description
12797 "This module provides a standard interface to extract, format and print
12798 stack traces of Python programs. It exactly mimics the behavior of the Python
12799 interpreter when it prints a stack trace.")
12800 (license license:psfl)))
12801
12802 (define-public python2-traceback2
12803 (package-with-python2 python-traceback2))
12804
12805 (define-public python-ratelimiter
12806 (package
12807 (name "python-ratelimiter")
12808 (version "1.2.0")
12809 (source
12810 (origin
12811 (method url-fetch)
12812 (uri (pypi-uri "ratelimiter" version))
12813 (sha256
12814 (base32
12815 "1dhz85mj5bqd2mij84ncs6pz32hgidr79hay4aqfmzaa4rbb497p"))))
12816 (build-system python-build-system)
12817 (arguments
12818 '(#:tests? #f)) ; There are no tests in the pypi archive.
12819 (home-page "https://github.com/RazerM/ratelimiter")
12820 (synopsis "Simple rate limiting object")
12821 (description
12822 "The @code{ratelimiter} module ensures that an operation will not be
12823 executed more than a given number of times during a given period.")
12824 (license license:asl2.0)))
12825
12826 (define-public python2-ratelimiter
12827 (package-with-python2 python-ratelimiter))
12828
12829 (define-public python-dukpy
12830 (package
12831 (name "python-dukpy")
12832 (version "0.3")
12833 (source
12834 (origin
12835 (method url-fetch)
12836 (uri (string-append "https://github.com/kovidgoyal/dukpy/archive/v"
12837 version ".tar.gz"))
12838 (file-name (string-append name "-" version ".tar.gz"))
12839 (sha256
12840 (base32
12841 "0pj39rfwlzivqm5hkrsza7gssg6ggpxlq5ivc8f3h7x5pfgc6y6c"))))
12842 (build-system python-build-system)
12843 (home-page "https://github.com/kovidgoyal/dukpy")
12844 (synopsis "Run JavaScript in python")
12845 (description
12846 "dukpy is a JavaScript runtime environment for Python using the duktape
12847 embeddable JavaScript engine.")
12848 ;; Dukpy is licensed under MIT like the embedded duktape library,
12849 ;; with 'errors.c' as GPL3.
12850 (license (list license:expat license:gpl3))))
12851
12852 (define-public python2-dukpy
12853 (package-with-python2 python-dukpy))
12854
12855 (define-public python-jsonrpclib-pelix
12856 (package
12857 (name "python-jsonrpclib-pelix")
12858 (version "0.3.2")
12859 (source
12860 (origin
12861 (method url-fetch)
12862 (uri (pypi-uri "jsonrpclib-pelix" version))
12863 (sha256
12864 (base32
12865 "0f83z5zi7w32vprhk1dyc94ir1bh4hdd57bjdbwkq9ykng8qilhl"))))
12866 (build-system python-build-system)
12867 (arguments
12868 `(#:tests? #f)) ; no tests in PyPI tarball
12869 (home-page "https://github.com/tcalmant/jsonrpclib/")
12870 (synopsis "JSON-RPC 2.0 client library for Python")
12871 (description
12872 "This library implements the JSON-RPC v2.0
12873 specification (backwards-compatible) as a client library for Python. This
12874 version is a fork of jsonrpclib by Josh Marshall, usable with Pelix remote
12875 services.")
12876 (license license:asl2.0)))
12877
12878 (define-public python2-jsonrpclib-pelix
12879 (package-with-python2 python-jsonrpclib-pelix))
12880
12881 (define-public python-setuptools-scm-git-archive
12882 (package
12883 (name "python-setuptools-scm-git-archive")
12884 (version "1.0")
12885 (source
12886 (origin
12887 (method url-fetch)
12888 (uri (pypi-uri "setuptools_scm_git_archive" version))
12889 (sha256
12890 (base32
12891 "1nii1sz5jq75ilf18bjnr11l9rz1lvdmyk66bxl7q90qan85yhjj"))))
12892 (build-system python-build-system)
12893 (native-inputs
12894 `(("python-pytest" ,python-pytest)))
12895 (propagated-inputs
12896 `(("python-setuptools-scm" ,python-setuptools-scm)))
12897 (home-page "https://github.com/Changaco/setuptools_scm_git_archive/")
12898 (synopsis "Setuptools_scm plugin for git archives")
12899 (description
12900 "The setuptools_scm_git_archive package is a plugin to
12901 setuptools_scm, which supports obtaining versions from git archives that
12902 belong to tagged versions.")
12903 (license license:expat)))
12904
12905 (define-public python2-setuptools-scm-git-archive
12906 (package-with-python2 python-setuptools-scm-git-archive))
12907
12908 (define-public python-pyclipper
12909 (package
12910 (name "python-pyclipper")
12911 (version "1.0.6")
12912 (source
12913 (origin
12914 (method url-fetch)
12915 (uri (pypi-uri "pyclipper" version ".zip"))
12916 (sha256
12917 (base32
12918 "1zpmwv3bya3j984y5cf9x9d5108kf6mxldcba68wiq0frv5qrssw"))))
12919 (build-system python-build-system)
12920 (arguments
12921 `(#:tests? #f)); 8 Tests fail, 37 succeed
12922 (propagated-inputs
12923 `(("python-setuptools-scm-git-archive" ,python-setuptools-scm-git-archive)))
12924 (native-inputs
12925 `(("unzip" ,unzip)))
12926 (home-page "https://github.com/greginvm/pyclipper")
12927 (synopsis "Wrapper for Angus Johnson's Clipper library")
12928 (description
12929 "Pyclipper is a Cython wrapper for the C++ translation of the
12930 Angus Johnson's polygon clipping Clipper library (ver. 6.2.1).")
12931 (license license:expat)))
12932
12933 (define-public python2-pyclipper
12934 (package-with-python2 python-pyclipper))
12935
12936 (define-public python2-booleanoperations
12937 (package
12938 (name "python2-booleanoperations")
12939 (version "0.7.1")
12940 (source
12941 (origin
12942 (method url-fetch)
12943 (uri (pypi-uri "booleanOperations" version ".zip"))
12944 (sha256
12945 (base32
12946 "1hw42fazdpvsn77glx96hwsj9l17mvx37sc5707s08y5w6fx16mn"))))
12947 (build-system python-build-system)
12948 (arguments
12949 `(#:python ,python-2))
12950 (native-inputs
12951 `(("unzip" ,unzip)
12952 ("python2-pytest" ,python2-pytest)
12953 ("python2-pytest-runner" ,python2-pytest-runner)))
12954 (propagated-inputs
12955 `(("python-fonttools" ,python2-fonttools)
12956 ("python-pyclipper" ,python2-pyclipper)
12957 ("python-ufolib" ,python2-ufolib)))
12958 (home-page "https://github.com/typemytype/booleanOperations")
12959 (synopsis "Boolean operations on paths")
12960 (description
12961 "BooleanOperations provides a Python library that enables
12962 boolean operations on paths.")
12963 (license license:expat)))
12964
12965 (define-public python-tempdir
12966 (package
12967 (name "python-tempdir")
12968 (version "0.7.1")
12969 (source
12970 (origin
12971 (method url-fetch)
12972 (uri (pypi-uri "tempdir" version))
12973 (sha256
12974 (base32
12975 "13msyyxqbicr111a294x7fsqbkl6a31fyrqflx3q7k547gnq15k8"))))
12976 (build-system python-build-system)
12977 (home-page "https://pypi.org/project/tempdir/")
12978 (arguments
12979 ;; the package has no tests
12980 '(#:tests? #f))
12981 (synopsis "Python library for managing temporary directories")
12982 (description
12983 "This library manages temporary directories that are automatically
12984 deleted with all their contents when they are no longer needed. It is
12985 particularly convenient for use in tests.")
12986 (license license:expat)))
12987
12988 (define-public python2-tempdir
12989 (package-with-python2 python-tempdir))
12990
12991 (define-public python-activepapers
12992 (package
12993 (name "python-activepapers")
12994 (version "0.2.2")
12995 (source
12996 (origin
12997 (method url-fetch)
12998 (uri (pypi-uri "ActivePapers.Py" version))
12999 (sha256
13000 (base32
13001 "12wkhjh90ffipjzv10swndp2xv9hd7xrxvg6v0n4n3i411pj4xb8"))))
13002 (build-system python-build-system)
13003 (arguments
13004 `(#:modules ((ice-9 ftw)
13005 (srfi srfi-1)
13006 (guix build utils)
13007 (guix build python-build-system))
13008
13009 #:phases
13010 (modify-phases %standard-phases
13011 (add-after 'unpack 'delete-python2-code
13012 (lambda _
13013 (for-each delete-file
13014 '("lib/activepapers/builtins2.py"
13015 "lib/activepapers/standardlib2.py"
13016 "lib/activepapers/utility2.py"))))
13017 (replace 'check
13018 (lambda _
13019 ;; Deactivate the test cases that download files
13020 (setenv "NO_NETWORK_ACCESS" "1")
13021 ;; For some strange reason, some tests fail if nosetests runs all
13022 ;; test modules in a single execution. They pass if each test
13023 ;; module is run individually.
13024 (for-each (lambda (filename)
13025 (invoke "nosetests"
13026 (string-append "tests/" filename)))
13027 (scandir "tests"
13028 (lambda (filename)
13029 (string-suffix? ".py" filename)))))))))
13030 (native-inputs
13031 `(("python-tempdir" ,python-tempdir)
13032 ("python-nose" ,python-nose)))
13033 (propagated-inputs
13034 `(("python-h5py" ,python-h5py)))
13035 (home-page "http://www.activepapers.org/")
13036 (synopsis "Executable papers for scientific computing")
13037 (description
13038 "ActivePapers is a tool for working with executable papers, which
13039 combine data, code, and documentation in single-file packages,
13040 suitable for publication as supplementary material or on repositories
13041 such as figshare or Zenodo.")
13042 (properties `((python2-variant . ,(delay python2-activepapers))))
13043 (license license:bsd-3)))
13044
13045 (define-public python2-activepapers
13046 (let ((base (package-with-python2
13047 (strip-python2-variant python-activepapers))))
13048 (package
13049 (inherit base)
13050 (arguments
13051 (substitute-keyword-arguments (package-arguments base)
13052 ((#:phases phases)
13053 `(modify-phases ,phases
13054 (delete 'delete-python2-code)
13055 (add-after 'unpack 'delete-python3-code
13056 (lambda _
13057 (for-each delete-file
13058 '("lib/activepapers/builtins3.py"
13059 "lib/activepapers/standardlib3.py"
13060 "lib/activepapers/utility3.py")))))))))))
13061
13062 (define-public python-semver
13063 (package
13064 (name "python-semver")
13065 (version "2.7.9")
13066 (source
13067 (origin
13068 (method url-fetch)
13069 (uri (pypi-uri "semver" version))
13070 (sha256
13071 (base32
13072 "0hhgqppchv59rqj0yzi1prdg2nfsywqmjsqy2rycyxm0hvxmbyqz"))))
13073 (build-system python-build-system)
13074 (arguments
13075 `(#:phases
13076 (modify-phases %standard-phases
13077 (add-after 'unpack 'patch-test-requirements
13078 (lambda _
13079 (substitute* "setup.py"
13080 ;; Our Python is new enough.
13081 (("'virtualenv<14\\.0\\.0'") "'virtualenv'"))
13082 #t)))))
13083 (native-inputs
13084 `(("python-tox" ,python-tox)
13085 ("python-virtualenv" ,python-virtualenv)))
13086 (home-page "https://github.com/k-bx/python-semver")
13087 (synopsis "Python helper for Semantic Versioning")
13088 (description "This package provides a Python library for
13089 @url{Semantic Versioning, http://semver.org/}.")
13090 (license license:bsd-3)))
13091
13092 (define-public python2-semver
13093 (package-with-python2 python-semver))
13094
13095 (define-public python2-pyro
13096 (package
13097 (name "python2-pyro")
13098 (version "3.16")
13099 (source
13100 (origin
13101 (method url-fetch)
13102 (uri (pypi-uri "Pyro" version))
13103 (file-name (string-append "Pyro-" version ".tar.gz"))
13104 (sha256
13105 (base32
13106 "0y75wzdqbjy565rpxaxscav4j8xg060sa90lnmb7aypgaf251v8v"))))
13107 (build-system python-build-system)
13108 (arguments
13109 ;; Pyro is not compatible with Python 3
13110 `(#:python ,python-2
13111 ;; Pyro has no test cases for automatic execution
13112 #:tests? #f))
13113 (home-page "http://pythonhosted.org/Pyro/")
13114 (synopsis "Distributed object manager for Python")
13115 (description "Pyro is a Distributed Object Technology system
13116 written in Python that is designed to be easy to use. It resembles
13117 Java's Remote Method Invocation (RMI). It has less similarity to CORBA,
13118 which is a system and language independent Distributed Object Technology
13119 and has much more to offer than Pyro or RMI. Pyro 3.x is no
13120 longer maintained. New projects should use Pyro4 instead, which
13121 is the new Pyro version that is actively developed.")
13122 (license license:expat)))
13123
13124 (define-public python2-scientific
13125 (package
13126 (name "python2-scientific")
13127 (version "2.9.4")
13128 (source
13129 (origin
13130 (method url-fetch)
13131 (uri (string-append "https://bitbucket.org/khinsen/"
13132 "scientificpython/downloads/ScientificPython-"
13133 version ".tar.gz"))
13134 (file-name (string-append "ScientificPython-" version ".tar.gz"))
13135 (sha256
13136 (base32
13137 "0fc69zhlsn9d2jvbzyjl9ah53vj598h84nkq230c83ahfvgzx5y3"))))
13138 (build-system python-build-system)
13139 (inputs
13140 `(("netcdf" ,netcdf)))
13141 (propagated-inputs
13142 `(("python-numpy" ,python2-numpy-1.8)
13143 ("python-pyro" ,python2-pyro)))
13144 (arguments
13145 ;; ScientificPython is not compatible with Python 3
13146 `(#:python ,python-2
13147 #:tests? #f ; No test suite
13148 #:phases
13149 (modify-phases %standard-phases
13150 (replace 'build
13151 (lambda* (#:key inputs #:allow-other-keys)
13152 (zero? (system* "python" "setup.py" "build"
13153 (string-append "--netcdf_prefix="
13154 (assoc-ref inputs "netcdf")))))))))
13155 (home-page "https://bitbucket.org/khinsen/scientificpython")
13156 (synopsis "Python modules for scientific computing")
13157 (description "ScientificPython is a collection of Python modules that are
13158 useful for scientific computing. Most modules are rather general (Geometry,
13159 physical units, automatic derivatives, ...) whereas others are more
13160 domain-specific (e.g. netCDF and PDB support). The library is currently
13161 not actively maintained and works only with Python 2 and NumPy < 1.9.")
13162 (license license:cecill-c)))
13163
13164 (define-public python2-mmtk
13165 (package
13166 (name "python2-mmtk")
13167 (version "2.7.11")
13168 (source
13169 (origin
13170 (method url-fetch)
13171 (uri (string-append "https://bitbucket.org/khinsen/"
13172 "mmtk/downloads/MMTK-" version ".tar.gz"))
13173 (file-name (string-append "MMTK-" version ".tar.gz"))
13174 (sha256
13175 (base32
13176 "1d0nnjx4lwsvh8f99vv1r6gi50d93yba0adkz8b4zgv4za4c5862"))))
13177 (build-system python-build-system)
13178 (native-inputs
13179 `(("netcdf" ,netcdf)))
13180 (propagated-inputs
13181 `(("python-scientific" ,python2-scientific)
13182 ("python-tkinter" ,python-2 "tk")))
13183 (arguments
13184 `(#:python ,python-2
13185 #:tests? #f
13186 #:phases
13187 (modify-phases %standard-phases
13188 (add-before 'build 'includes-from-scientific
13189 (lambda* (#:key inputs #:allow-other-keys)
13190 (mkdir-p "Include/Scientific")
13191 (copy-recursively
13192 (string-append
13193 (assoc-ref inputs "python-scientific")
13194 "/include/python2.7/Scientific")
13195 "Include/Scientific"))))))
13196 (home-page "http://dirac.cnrs-orleans.fr/MMTK")
13197 (synopsis "Python library for molecular simulation")
13198 (description "MMTK is a library for molecular simulations with an emphasis
13199 on biomolecules. It provides widely used methods such as Molecular Dynamics
13200 and normal mode analysis, but also basic routines for implementing new methods
13201 for simulation and analysis. The library is currently not actively maintained
13202 and works only with Python 2 and NumPy < 1.9.")
13203 (license license:cecill-c)))
13204
13205 (define-public python-phonenumbers
13206 (package
13207 (name "python-phonenumbers")
13208 (version "8.9.1")
13209 (source
13210 (origin
13211 (method url-fetch)
13212 (uri (pypi-uri "phonenumbers" version))
13213 (sha256
13214 (base32
13215 "03fmrgb4r8x3ykmddjs9i3zhs703in8smikj3a6447blqpimwyh1"))))
13216 (build-system python-build-system)
13217 (home-page
13218 "https://github.com/daviddrysdale/python-phonenumbers")
13219 (synopsis
13220 "Python library for dealing with international phone numbers")
13221 (description
13222 "This package provides a Python port of Google's libphonenumber library.")
13223 (license license:asl2.0)))
13224
13225 (define-public python2-phonenumbers
13226 (package-with-python2 python-phonenumbers))
13227
13228 (define-public python-send2trash
13229 (package
13230 (name "python-send2trash")
13231 (version "1.4.2")
13232 (source
13233 (origin (method url-fetch)
13234 ;; Source tarball on PyPI doesn't include tests.
13235 (uri (string-append "https://github.com/hsoft/send2trash/archive/"
13236 version ".tar.gz"))
13237 (file-name (string-append name "-" version ".tar.gz"))
13238 (sha256
13239 (base32
13240 "0ffyhwjyx61slkdy38iwjc4gmj7fj9gs2q58f075gwvq630pzm9z"))))
13241 (build-system python-build-system)
13242 (arguments
13243 '(#:phases
13244 (modify-phases %standard-phases
13245 (add-before 'check 'pre-check
13246 (lambda _
13247 (mkdir-p "/tmp/foo")
13248 (setenv "HOME" "/tmp/foo")
13249 #t)))))
13250 (home-page "https://github.com/hsoft/send2trash")
13251 (synopsis "Send files to the user's @file{~/Trash} directory")
13252 (description "This package provides a Python library to send files to the
13253 user's @file{~/Trash} directory.")
13254 (license license:bsd-3)))
13255
13256 (define-public python2-send2trash
13257 (package
13258 (inherit (package-with-python2 python-send2trash))
13259 (arguments
13260 (substitute-keyword-arguments (package-arguments python-send2trash)
13261 ((#:phases phases)
13262 `(modify-phases ,phases
13263 (add-before 'check 'setenv
13264 (lambda _
13265 (setenv "PYTHONPATH"
13266 (string-append (getcwd) ":" (getenv "PYTHONPATH")))
13267 #t))))))
13268 (properties `((python2-variant . ,(delay python-send2trash))))))
13269
13270 (define-public python-yapf
13271 (package
13272 (name "python-yapf")
13273 (version "0.21.0")
13274 (source
13275 (origin
13276 (method url-fetch)
13277 (uri (pypi-uri "yapf" version))
13278 (sha256
13279 (base32
13280 "144gc7d6b1415vh02409rnb8qd5kxi6mxlr7y64d5cizgxbf72kx"))))
13281 (build-system python-build-system)
13282 (home-page "https://github.com/google/yapf")
13283 (synopsis "Formatter for Python code")
13284 (description "YAPF is a formatter for Python code. It's based off of
13285 @dfn{clang-format}, developed by Daniel Jasper. In essence, the algorithm
13286 takes the code and reformats it to the best formatting that conforms to the
13287 style guide, even if the original code didn't violate the style guide.")
13288 (license license:asl2.0)))
13289
13290 (define-public python2-yapf
13291 (package-with-python2 python-yapf))
13292
13293 (define-public python-gyp
13294 (let ((commit "5e2b3ddde7cda5eb6bc09a5546a76b00e49d888f")
13295 (revision "0"))
13296 (package
13297 (name "python-gyp")
13298 ;; Google does not release versions,
13299 ;; based on second most recent commit date.
13300 (version (git-version "0.0.0" revision commit))
13301 (source
13302 (origin
13303 ;; Google does not release tarballs,
13304 ;; git checkout is needed.
13305 (method git-fetch)
13306 (uri (git-reference
13307 (url "https://chromium.googlesource.com/external/gyp")
13308 (commit commit)))
13309 (file-name (git-file-name name version))
13310 (sha256
13311 (base32
13312 "0fr7nxcrk292djmxzpcjaphnsd123k31gp8jnd91vwknhq6snmv9"))))
13313 (build-system python-build-system)
13314 (home-page "https://gyp.gsrc.io/")
13315 (synopsis "GYP is a Meta-Build system")
13316 (description
13317 "GYP builds build systems for large, cross platform applications.
13318 It can be used to generate XCode projects, Visual Studio projects, Ninja build
13319 files, and Makefiles.")
13320 (license license:bsd-3))))
13321
13322 (define-public python2-gyp
13323 (package-with-python2 python-gyp))
13324
13325 (define-public python-whatever
13326 (package
13327 (name "python-whatever")
13328 (version "0.5")
13329 (source
13330 (origin
13331 (method url-fetch)
13332 (uri (string-append "https://github.com/Suor/whatever/archive/" version
13333 ".tar.gz"))
13334 (sha256
13335 (base32
13336 "1iqvnaf0zpc6b4rvbqq4xy45mszcscyzpzknv8wg6j84pbp22sap"))
13337 (file-name (string-append name "-" version ".tar.gz"))))
13338 (build-system python-build-system)
13339 (arguments
13340 `(#:phases
13341 (modify-phases %standard-phases
13342 (replace 'check
13343 (lambda _
13344 (invoke "py.test"))))))
13345 (native-inputs
13346 `(("python-pytest" ,python-pytest)))
13347 (home-page "http://github.com/Suor/whatever")
13348 (synopsis "Make anonymous functions by partial application of operators")
13349 (description "@code{whatever} provides an easy way to make anonymous
13350 functions by partial application of operators.")
13351 (license license:bsd-3)))
13352
13353 (define-public python2-whatever
13354 (package-with-python2 python-whatever))
13355
13356 (define-public python-funcy
13357 (package
13358 (name "python-funcy")
13359 (version "1.10")
13360 (source
13361 (origin
13362 (method url-fetch)
13363 (uri (string-append "https://github.com/Suor/funcy/archive/" version
13364 ".tar.gz"))
13365 (sha256
13366 (base32
13367 "1fanxivsip29vgarw6dn39xym3q4pbxcpa11plpp548lvxajpahz"))
13368 (file-name (string-append name "-" version ".tar.gz"))))
13369 (build-system python-build-system)
13370 (arguments
13371 `(#:phases
13372 (modify-phases %standard-phases
13373 (replace 'check
13374 (lambda _
13375 (invoke "py.test"))))))
13376 (native-inputs
13377 `(("python-pytest" ,python-pytest)
13378 ("python-whatever" ,python-whatever)))
13379 (home-page "http://github.com/Suor/funcy")
13380 (synopsis "Functional tools")
13381 (description "@code{funcy} is a library that provides functional tools.
13382 Examples are:
13383 @enumerate
13384 @item merge - Merges collections of the same type
13385 @item walk - Type-preserving map
13386 @item select - Selects a part of a collection
13387 @item take - Takes the first n items of a collection
13388 @item first - Takes the first item of a collection
13389 @item remove - Predicated-removes items of a collection
13390 @item concat - Concatenates two collections
13391 @item flatten - Flattens a collection with subcollections
13392 @item distinct - Returns only distinct items
13393 @item split - Predicated-splits a collection
13394 @item split_at - Splits a collection at a given item
13395 @item group_by - Groups items by group
13396 @item pairwise - Pairs off adjacent items
13397 @item partial - Partially-applies a function
13398 @item curry - Curries a function
13399 @item compose - Composes functions
13400 @item complement - Complements a predicate
13401 @item all_fn - \"all\" with predicate
13402 @end enumerate")
13403 (license license:bsd-3)))
13404
13405 (define-public python2-funcy
13406 (package-with-python2 python-funcy))
13407
13408 (define-public python-isoweek
13409 (package
13410 (name "python-isoweek")
13411 (version "1.3.3")
13412 (source
13413 (origin
13414 (method url-fetch)
13415 (uri (pypi-uri "isoweek" version))
13416 (sha256
13417 (base32
13418 "1s7zsf0pab0l9gn6456qadnz5i5h90hafcjwnhx5mq23qjxggwvk"))))
13419 (build-system python-build-system)
13420 (home-page "https://github.com/gisle/isoweek")
13421 (synopsis "Objects representing a week")
13422 (description "The @code{isoweek} module provide the class Week that
13423 implements the week definition of ISO 8601. This standard also defines
13424 a notation for identifying weeks; yyyyWww (where the W is a literal).
13425 Week instances stringify to this form.")
13426 (license license:bsd-3)))
13427
13428 (define-public python2-isoweek
13429 (package-with-python2 python-isoweek))
13430
13431 (define-public python-tokenize-rt
13432 (package
13433 (name "python-tokenize-rt")
13434 (version "2.0.1")
13435 (source
13436 (origin
13437 (method url-fetch)
13438 (uri (pypi-uri "tokenize-rt" version))
13439 (sha256
13440 (base32
13441 "1yjvbz7rvrz31zjyax1cgy3xhf4wb3j18jwnj4bnl77ca4gliyiw"))))
13442 (build-system python-build-system)
13443 (home-page "https://github.com/asottile/tokenize-rt")
13444 (synopsis "Wrapper around the stdlib tokenize which roundtrips.")
13445 (description
13446 "This Python library is a wrapper around @code{tokenize} from the Python
13447 standard library. It provides two additional tokens @code{ESCAPED_NL} and
13448 @code{UNIMPORTANT_WS}, and a @code{Token} data type. Use @code{src_to_tokens}
13449 and @code{tokens_to_src} to roundtrip.")
13450 (license license:expat)))
13451
13452 (define-public python-future-fstrings
13453 (package
13454 (name "python-future-fstrings")
13455 (version "0.4.1")
13456 (source
13457 (origin
13458 (method url-fetch)
13459 (uri (pypi-uri "future_fstrings" version))
13460 (sha256
13461 (base32
13462 "0ydxqz2dvns44g55p8ix2x18qkfk3aaz0m0dc70f3g6n8js35h47"))))
13463 (build-system python-build-system)
13464 (propagated-inputs
13465 `(("python-tokenize-rt" ,python-tokenize-rt)))
13466 (home-page "https://github.com/asottile/future-fstrings")
13467 (synopsis "Backport of fstrings to Python < 3.6")
13468 (description
13469 "This package provides a UTF-8 compatible encoding
13470 @code{future_fstrings}, which performs source manipulation. It decodes the
13471 source bytes using the UTF-8 encoding and then rewrites Python 3.6 style
13472 @code{f} strings.")
13473 (license license:expat)))
13474
13475 (define-public python-typing
13476 (package
13477 (name "python-typing")
13478 (version "3.6.6")
13479 (source
13480 (origin
13481 (method url-fetch)
13482 (uri (pypi-uri "typing" version))
13483 (sha256
13484 (base32
13485 "0ba9acs4awx15bf9v3nrs781msbd2nx826906nj6fqks2bvca9s0"))))
13486 (build-system python-build-system)
13487 (home-page "https://docs.python.org/3/library/typing.html")
13488 (synopsis "Type hints for Python")
13489 (description "This is a backport of the standard library @code{typing}
13490 module to Python versions older than 3.5. Typing defines a standard notation
13491 for Python function and variable type annotations. The notation can be used
13492 for documenting code in a concise, standard format, and it has been designed
13493 to also be used by static and runtime type checkers, static analyzers, IDEs
13494 and other tools.")
13495 (license license:psfl)))
13496
13497 (define-public python2-typing
13498 (package-with-python2 python-typing))
13499
13500 (define-public bpython
13501 (package
13502 (name "bpython")
13503 (version "0.17.1")
13504 (source
13505 (origin
13506 (method url-fetch)
13507 (uri (pypi-uri "bpython" version))
13508 (sha256
13509 (base32
13510 "0bxhxi5zxdkrf8b4gwn0d363kdz3qnypjwhm1aydki53ph8ca1w9"))))
13511 (build-system python-build-system)
13512 (arguments
13513 `(#:phases
13514 (modify-phases %standard-phases
13515 (add-after 'unpack 'remove-failing-test
13516 (lambda _
13517 ;; Remove failing test. FIXME: make it pass
13518 (delete-file "bpython/test/test_args.py")
13519 #t))
13520 (add-after 'wrap 'add-aliases
13521 ;; for symmetry to bpython2, add symlinks bypthon3, bpdb3, etc.
13522 (lambda* (#:key outputs #:allow-other-keys)
13523 (let ((out (assoc-ref outputs "out")))
13524 (for-each
13525 (lambda (old new)
13526 (symlink old (string-append out "/bin/" new)))
13527 '("bpython" "bpython-curses" "bpython-urwid" "bpdb")
13528 '("bpython3" "bpython3-curses" "bpython3-urwid" "bpdb3")))
13529 #t)))))
13530 (propagated-inputs
13531 `(("python-pygments" ,python-pygments)
13532 ("python-requests" ,python-requests)
13533 ("python-babel" ,python-babel) ; optional, for internationalization
13534 ("python-curtsies" ,python-curtsies) ; >= 0.1.18
13535 ("python-greenlet" ,python-greenlet)
13536 ("python-urwid" ,python-urwid) ; for bpython-urwid only
13537 ("python-six" ,python-six)))
13538 (native-inputs
13539 `(("python-sphinx" ,python-sphinx)
13540 ("python-mock" ,python-mock)))
13541 (home-page "https://bpython-interpreter.org/")
13542 (synopsis "Fancy interface to the Python interpreter")
13543 (description "Bpython is a fancy interface to the Python
13544 interpreter. bpython's main features are
13545
13546 @enumerate
13547 @item in-line syntax highlighting,
13548 @item readline-like autocomplete with suggestions displayed as you type,
13549 @item expected parameter list for any Python function,
13550 @item \"rewind\" function to pop the last line of code from memory and
13551 re-evaluate,
13552 @item send the code you've entered off to a pastebin,
13553 @item save the code you've entered to a file, and
13554 @item auto-indentation.
13555 @end enumerate")
13556 (license license:expat)))
13557
13558 (define-public bpython2
13559 (let ((base (package-with-python2
13560 (strip-python2-variant bpython))))
13561 (package (inherit base)
13562 (name "bpython2")
13563 (arguments
13564 `(#:python ,python-2
13565 #:phases
13566 (modify-phases %standard-phases
13567 (add-after 'unpack 'remove-failing-test
13568 (lambda _
13569 ;; Remove failing test. FIXME: make it pass
13570 (delete-file "bpython/test/test_args.py")
13571 ;; Disable failing test-cases (renaming inhibits they are
13572 ;; discovered)
13573 (substitute* "bpython/test/test_curtsies_repl.py"
13574 (("^(\\s*def )(test_get_last_word_with_prev_line\\W)" _ a b)
13575 (string-append a "xxx_off_" b))
13576 (("^(\\s*def )(test_complex\\W)" _ a b)
13577 (string-append a "xxx_off_" b)))
13578 #t))
13579 (add-before 'build 'rename-scripts
13580 ;; rename the scripts to bypthon2, bpdb2, etc.
13581 (lambda _
13582 (substitute* "setup.py"
13583 (("^(\\s+'bpdb)(\\s+=.*',?)\\s*?$" _ name rest)
13584 (string-append name "2" rest "\n"))
13585 (("^(\\s+'bpython)(-\\S+)?(\\s+=.*',?)\\s*?$" _ name sub rest)
13586 (string-append name "2" (or sub "") rest "\n")))
13587 #t))))))))
13588
13589 (define-public python-pyinotify
13590 (package
13591 (name "python-pyinotify")
13592 (version "0.9.6")
13593 (source (origin
13594 (method url-fetch)
13595 (uri (pypi-uri "pyinotify" version))
13596 (sha256
13597 (base32
13598 "1x3i9wmzw33fpkis203alygfnrkcmq9w1aydcm887jh6frfqm6cw"))))
13599 (build-system python-build-system)
13600 (arguments `(#:tests? #f)) ;no tests
13601 (home-page "https://github.com/seb-m/pyinotify")
13602 (synopsis "Python library for monitoring inotify events")
13603 (description
13604 "@code{pyinotify} provides a Python interface for monitoring
13605 file system events on Linux.")
13606 (license license:expat)))
13607
13608 (define-public python2-pyinotify
13609 (package-with-python2 python-pyinotify))
13610
13611 ;; Ada parser uses this version.
13612 (define-public python2-quex-0.67.3
13613 (package
13614 (name "python2-quex")
13615 (version "0.67.3")
13616 (source
13617 (origin
13618 (method url-fetch)
13619 (uri (string-append "mirror://sourceforge/quex/HISTORY/"
13620 (version-major+minor version)
13621 "/quex-" version ".zip"))
13622 (sha256
13623 (base32
13624 "14gv8ll3ipqv4kyc2xiy891nrmjl4ic823zfyx8hassagyclyppw"))))
13625 (build-system python-build-system)
13626 (native-inputs
13627 `(("unzip" ,unzip)))
13628 (arguments
13629 `(#:python ,python-2
13630 #:tests? #f
13631 #:phases
13632 (modify-phases %standard-phases
13633 (delete 'configure)
13634 (delete 'build)
13635 (replace 'install
13636 (lambda* (#:key outputs #:allow-other-keys)
13637 (let* ((out (assoc-ref outputs "out"))
13638 (share/quex (string-append out "/share/quex"))
13639 (bin (string-append out "/bin")))
13640 (copy-recursively "." share/quex)
13641 (mkdir-p bin)
13642 (symlink (string-append share/quex "/quex-exe.py")
13643 (string-append bin "/quex"))
13644 #t))))))
13645 (native-search-paths
13646 (list (search-path-specification
13647 (variable "QUEX_PATH")
13648 (files '("share/quex")))))
13649 (home-page "http://quex.sourceforge.net/")
13650 (synopsis "Lexical analyzer generator in Python")
13651 (description "@code{quex} is a lexical analyzer generator in Python.")
13652 (license license:lgpl2.1+))) ; Non-military
13653
13654 (define-public python2-quex
13655 (package (inherit python2-quex-0.67.3)
13656 (name "python2-quex")
13657 (version "0.68.1")
13658 (source
13659 (origin
13660 (method url-fetch)
13661 (uri (string-append "mirror://sourceforge/quex/DOWNLOAD/quex-" version ".tar.gz"))
13662 (sha256
13663 (base32
13664 "0svc9nla3b9145d6b7fb9dizx412l3difzqw0ilh9lz52nsixw8j"))
13665 (file-name (string-append name "-" version ".tar.gz"))))))
13666
13667 (define-public python-more-itertools
13668 (package
13669 (name "python-more-itertools")
13670 (version "4.1.0")
13671 (source
13672 (origin
13673 (method url-fetch)
13674 (uri (pypi-uri "more-itertools" version))
13675 (sha256
13676 (base32
13677 "0i3ch700g5fyjp692gprlnzbysl8w0sa2vijbp3s40drvk67xkn9"))))
13678 (build-system python-build-system)
13679 (propagated-inputs
13680 `(("python-six" ,python-six-bootstrap)))
13681 (home-page "https://github.com/erikrose/more-itertools")
13682 (synopsis "More routines for operating on iterables, beyond itertools")
13683 (description "Python's built-in @code{itertools} module implements a
13684 number of iterator building blocks inspired by constructs from APL, Haskell,
13685 and SML. @code{more-itertools} includes additional building blocks for
13686 working with iterables.")
13687 (license license:expat)))
13688
13689 (define-public python2-more-itertools
13690 (package-with-python2 python-more-itertools))
13691
13692 (define-public python-latexcodec
13693 (package
13694 (name "python-latexcodec")
13695 (version "1.0.5")
13696 (source
13697 (origin
13698 (method url-fetch)
13699 (uri (pypi-uri "latexcodec" version))
13700 (sha256
13701 (base32
13702 "0zdd1gf24i83ykadx0y30n3001j43scqr2saql3vckk5c39dj1wn"))))
13703 (build-system python-build-system)
13704 (inputs
13705 `(("python-six" ,python-six)))
13706 (home-page "https://readthedocs.org/projects/latexcodec/")
13707 (synopsis "Work with LaTeX code in Python")
13708 (description "Lexer and codec to work with LaTeX code in Python.")
13709 (license license:expat)))
13710
13711 (define-public python-pybtex
13712 (package
13713 (name "python-pybtex")
13714 (version "0.21")
13715 (source
13716 (origin
13717 (method url-fetch)
13718 (uri (pypi-uri "pybtex" version))
13719 (sha256
13720 (base32
13721 "00300j8dn5pxq4ndxmfmbmycg2znawkqs49val2x6jlmfiy6r2mg"))))
13722 (build-system python-build-system)
13723 (native-inputs
13724 `(("python-nose" ,python-nose)))
13725 (inputs
13726 `(("python-latexcodec" ,python-latexcodec)
13727 ("python-pyyaml" ,python-pyyaml)
13728 ("python-six" ,python-six)))
13729 (arguments
13730 `(#:test-target "nosetests"))
13731 (home-page "https://pybtex.org/")
13732 (synopsis "BibTeX-compatible bibliography processor")
13733 (description "Pybtex is a BibTeX-compatible bibliography processor written
13734 in Python. You can simply type pybtex instead of bibtex.")
13735 (license license:expat)))
13736
13737 (define-public python-onetimepass
13738 (package
13739 (name "python-onetimepass")
13740 (version "1.0.1")
13741 (source
13742 (origin
13743 (method url-fetch)
13744 (uri (pypi-uri "onetimepass" version))
13745 (sha256
13746 (base32 "09vagxgbq78wvq4xbikmn2hpqqsa2i96kqsmphf7dqynfv0dlsd5"))))
13747 (build-system python-build-system)
13748 (propagated-inputs `(("python-six" ,python-six)))
13749 (home-page "https://github.com/tadeck/onetimepass/")
13750 (synopsis "One-time password library")
13751 (description "Python one-time password library for HMAC-based (HOTP) and
13752 time-based (TOTP) passwords.")
13753 (license license:expat)))
13754
13755 (define-public python-parso
13756 (package
13757 (name "python-parso")
13758 (version "0.3.1")
13759 (source
13760 (origin
13761 (method url-fetch)
13762 (uri (pypi-uri "parso" version))
13763 (sha256
13764 (base32
13765 "18p89iwcm8mnf380f92g9w0bhx5km8wxp392vvjcq4y1ld1llw1m"))))
13766 (native-inputs
13767 `(("python-pytest" ,python-pytest)))
13768 (build-system python-build-system)
13769 (home-page "https://github.com/davidhalter/parso")
13770 (synopsis "Python Parser")
13771 (description "Parso is a Python parser that supports error recovery and
13772 round-trip parsing for different Python versions (in multiple Python versions).
13773 Parso is also able to list multiple syntax errors in your Python file.")
13774 (license license:expat)))
13775
13776 (define-public python2-parso
13777 (package-with-python2 python-parso))
13778
13779 (define-public python-async-generator
13780 (package
13781 (name "python-async-generator")
13782 (version "1.9")
13783 (source
13784 (origin
13785 (method url-fetch)
13786 (uri (pypi-uri "async_generator" version))
13787 (sha256
13788 (base32
13789 "0wc3hidz1q85cja93k5pzybn0fprfnqyrv4qlkdqdzklc5f4dmdp"))))
13790 (build-system python-build-system)
13791 (native-inputs
13792 `(("python-pytest" ,python-pytest)))
13793 (home-page "https://github.com/python-trio/async_generator")
13794 (synopsis "Async generators and context managers for Python 3.5+")
13795 (description "@code{async_generator} back-ports Python 3.6's native async
13796 generators and Python 3.7's context managers into Python 3.5.")
13797 ;; Dual licensed.
13798 (license (list license:expat license:asl2.0))))
13799
13800 (define-public python-async-timeout
13801 (package
13802 (name "python-async-timeout")
13803 (version "2.0.1")
13804 (source
13805 (origin
13806 (method url-fetch)
13807 (uri (pypi-uri "async-timeout" version))
13808 (sha256
13809 (base32
13810 "1l3kg062m02mph6rf9rdv8r5c5n356clxa6b6mrn0i77vk9g9kq0"))))
13811 (build-system python-build-system)
13812 (home-page "https://github.com/aio-libs/async_timeout/")
13813 (synopsis "Timeout context manager for asyncio programs")
13814 (description "@code{async-timeout} provides a timeout timeout context
13815 manager compatible with @code{asyncio}.")
13816 (license license:asl2.0)))
13817
13818 (define-public python-glob2
13819 (package
13820 (name "python-glob2")
13821 (version "0.6")
13822 (source (origin
13823 (method url-fetch)
13824 (uri (string-append
13825 "https://github.com/miracle2k/python-glob2/archive/"
13826 version
13827 ".tar.gz"))
13828 (sha256
13829 (base32
13830 "0ja168f0dz4kbz4m06dm0rd3acaypk6hjx2km541pw22y9s40mag"))
13831 (file-name (string-append name "-" version ".tar.gz"))))
13832 (build-system python-build-system)
13833 (home-page "https://github.com/miracle2k/python-glob2/")
13834 (synopsis "Extended Version of the python buildin glob module")
13835 (description "This is an extended version of the Python
13836 @url{http://docs.python.org/library/glob.html, built-in glob module} which
13837 adds:
13838
13839 @itemize
13840 @item The ability to capture the text matched by glob patterns, and return
13841 those matches alongside the file names.
13842 @item A recursive @code{**} globbing syntax, akin for example to the
13843 @code{globstar} option of Bash.
13844 @item The ability to replace the file system functions used, in order to glob
13845 on virtual file systems.
13846 @item Compatible with Python 2 and Python 3 (tested with 3.3).
13847 @end itemize
13848
13849 Glob2 currently based on the glob code from Python 3.3.1.")
13850 (license license:bsd-2)))
13851
13852 (define-public python2-glob2
13853 (package-with-python2 python-glob2))
13854
13855 (define-public python-gipc
13856 (package
13857 (name "python-gipc")
13858 (version "0.6.0")
13859 (source
13860 (origin
13861 (method url-fetch)
13862 (uri (pypi-uri "gipc" version ".zip"))
13863 (sha256
13864 (base32
13865 "0pd9by719qh882hqs6xpby61sn1x5h98hms5p2p8yqnycrf1s0h2"))))
13866 (build-system python-build-system)
13867 (native-inputs
13868 `(("unzip" ,unzip)))
13869 (propagated-inputs
13870 `(("python-gevent" ,python-gevent)))
13871 (home-page "http://gehrcke.de/gipc")
13872 (synopsis "Child process management in the context of gevent")
13873 (description "Usage of Python's multiprocessing package in a
13874 gevent-powered application may raise problems. With @code{gipc},
13875 process-based child processes can safely be created anywhere within a
13876 gevent-powered application.")
13877 (license license:expat)))
13878
13879 (define-public python2-gipc
13880 (package-with-python2 python-gipc))
13881
13882 (define-public python-fusepy
13883 (package
13884 (name "python-fusepy")
13885 (version "2.0.4")
13886 (source
13887 (origin
13888 (method url-fetch)
13889 (uri (pypi-uri "fusepy" version))
13890 (sha256
13891 (base32
13892 "0v5grm4zyf58hsplwsxfbihddw95lz9w8cy3rpzbyha287swgx8h"))))
13893 (build-system python-build-system)
13894 (arguments
13895 `(#:phases
13896 (modify-phases %standard-phases
13897 (add-before 'build 'set-library-file-name
13898 (lambda* (#:key inputs #:allow-other-keys)
13899 (let ((fuse (assoc-ref inputs "fuse")))
13900 (substitute* "fuse.py"
13901 (("find_library\\('fuse'\\)")
13902 (string-append "'" fuse "/lib/libfuse.so'")))
13903 #t))))))
13904 (propagated-inputs
13905 `(("fuse" ,fuse)))
13906 (home-page "https://github.com/fusepy/fusepy")
13907 (synopsis "Simple ctypes bindings for FUSE")
13908 (description "Python module that provides a simple interface to FUSE and
13909 MacFUSE. The binding is created using the standard @code{ctypes} library.")
13910 (license license:isc)))
13911
13912 (define-public python2-fusepy
13913 (package-with-python2 python-fusepy))
13914
13915 (define-public python2-gdrivefs
13916 (package
13917 (name "python2-gdrivefs")
13918 (version "0.14.9")
13919 (source
13920 (origin
13921 (method url-fetch)
13922 (uri (pypi-uri "gdrivefs" version))
13923 (sha256
13924 (base32
13925 "0v9sp2cfg4ki3wagkwf3rnfpjhvgf845anz3757il9z95yvvcvb7"))))
13926 (build-system python-build-system)
13927 (arguments
13928 `(#:python ,python-2
13929 #:phases
13930 (modify-phases %standard-phases
13931 (add-before 'build 'patch-setup-py
13932 (lambda _
13933 ;; Update requirements from dependency==version
13934 ;; to dependency>=version
13935 (substitute* "gdrivefs/resources/requirements.txt"
13936 (("==") ">="))
13937 #t)))))
13938 (native-inputs
13939 `(("python2-gipc" ,python2-gipc)
13940 ("python2-gevent" ,python2-gevent)
13941 ("python2-greenlet" ,python2-greenlet)
13942 ("python2-httplib2" ,python2-httplib2)
13943 ("python2-uritemplate" ,python2-uritemplate)
13944 ("python2-oauth2client" ,python2-oauth2client)
13945 ("python2-six" ,python2-six)))
13946 (propagated-inputs
13947 `(("python2-dateutil" ,python2-dateutil)
13948 ("python2-fusepy" ,python2-fusepy)
13949 ("python2-google-api-client" ,python2-google-api-client)))
13950 (home-page "https://github.com/dsoprea/GDriveFS")
13951 (synopsis "Mount Google Drive as a local file system")
13952 (description "@code{gdrivefs} provides a FUSE wrapper for Google Drive
13953 under Python 2.7.")
13954 (license license:gpl2)))
13955
13956 (define-public pybind11
13957 (package
13958 (name "pybind11")
13959 (version "2.2.4")
13960 (source (origin
13961 (method git-fetch)
13962 (uri (git-reference
13963 (url "https://github.com/pybind/pybind11.git")
13964 (commit (string-append "v" version))))
13965 (sha256
13966 (base32
13967 "0pa79ymcasv8br5ifbx7878id5py2jpjac3i20cqxr6gs9l6ivlv"))
13968 (file-name (git-file-name name version))))
13969 (build-system cmake-build-system)
13970 (native-inputs
13971 `(("python" ,python)
13972 ("python-pytest" ,python-pytest)))
13973 (arguments
13974 `(#:test-target "check"))
13975 (home-page "https://github.com/pybind/pybind11/")
13976 (synopsis "Seamless operability between C++11 and Python")
13977 (description "pybind11 is a lightweight header-only library that exposes
13978 C++ types in Python and vice versa, mainly to create Python bindings of
13979 existing C++ code. Its goals and syntax are similar to the excellent
13980 Boost.Python library by David Abrahams: to minimize boilerplate code in
13981 traditional extension modules by inferring type information using compile-time
13982 introspection.")
13983 (license license:expat)))
13984
13985 (define-public python-fasteners
13986 (package
13987 (name "python-fasteners")
13988 (version "0.14.1")
13989 (source
13990 (origin
13991 (method url-fetch)
13992 (uri (pypi-uri "fasteners" version))
13993 (sha256
13994 (base32
13995 "063y20kx01ihbz2mziapmjxi2cd0dq48jzg587xdsdp07xvpcz22"))))
13996 (build-system python-build-system)
13997 (propagated-inputs
13998 `(("python-monotonic" ,python-monotonic)
13999 ("python-six" ,python-six)
14000 ("python-testtools" ,python-testtools)))
14001 (home-page "https://github.com/harlowja/fasteners")
14002 (synopsis "Python package that provides useful locks")
14003 (description
14004 "This package provides a Python program that provides following locks:
14005
14006 @itemize
14007 @item Locking decorator
14008 @item Reader-writer locks
14009 @item Inter-process locks
14010 @item Generic helpers
14011 @end itemize\n")
14012 (license license:asl2.0)))
14013
14014 (define-public python2-fasteners
14015 (package-with-python2 python-fasteners))
14016
14017 (define-public python-requests-file
14018 (package
14019 (name "python-requests-file")
14020 (version "1.4.3")
14021 (source
14022 (origin
14023 (method url-fetch)
14024 (uri (pypi-uri "requests-file" version))
14025 (sha256
14026 (base32
14027 "1yp2jaxg3v86pia0q512dg3hz6s9y5vzdivsgrba1kds05ial14g"))))
14028 (build-system python-build-system)
14029 (propagated-inputs
14030 `(("python-requests" ,python-requests)
14031 ("python-six" ,python-six)))
14032 (home-page
14033 "https://github.com/dashea/requests-file")
14034 (synopsis "File transport adapter for Requests")
14035 (description
14036 "Requests-File is a transport adapter for use with the Requests Python
14037 library to allow local filesystem access via file:// URLs.")
14038 (license license:asl2.0)))
14039
14040 (define-public python2-requests-file
14041 (package-with-python2 python-requests-file))
14042
14043 (define-public python-tldextract
14044 (package
14045 (name "python-tldextract")
14046 (version "2.2.0")
14047 (source
14048 (origin
14049 (method url-fetch)
14050 (uri (pypi-uri "tldextract" version))
14051 (sha256
14052 (base32
14053 "1d5s8v6kpsgazyahflhji1cfdcf89rv7l7z55v774bhzvcjp2y99"))))
14054 (build-system python-build-system)
14055 (native-inputs
14056 `(("python-pytest" ,python-pytest)
14057 ("python-responses" ,python-responses)))
14058 (propagated-inputs
14059 `(("python-idna" ,python-idna)
14060 ("python-requests" ,python-requests)
14061 ("python-requests-file" ,python-requests-file)))
14062 (home-page
14063 "https://github.com/john-kurkowski/tldextract")
14064 (synopsis
14065 "Separate the TLD from the registered domain and subdomains of a URL")
14066 (description
14067 "TLDExtract accurately separates the TLD from the registered domain and
14068 subdomains of a URL, using the Public Suffix List. By default, this includes
14069 the public ICANN TLDs and their exceptions. It can optionally support the
14070 Public Suffix List's private domains as well.")
14071 (license license:bsd-3)))
14072
14073 (define-public python2-tldextract
14074 (package-with-python2 python-tldextract))
14075
14076 (define-public python-pynamecheap
14077 (package
14078 (name "python-pynamecheap")
14079 (version "0.0.3")
14080 (source
14081 (origin
14082 (method url-fetch)
14083 (uri (pypi-uri "PyNamecheap" version))
14084 (sha256
14085 (base32
14086 "0wkbwz208j8nfrsmzmclvxg22ymknn0mlz76wbdza9k2bx2zja6l"))))
14087 (build-system python-build-system)
14088 (propagated-inputs
14089 `(("python-requests" ,python-requests)))
14090 (home-page
14091 "https://github.com/Bemmu/PyNamecheap")
14092 (synopsis
14093 "Namecheap API client in Python")
14094 (description
14095 "PyNamecheap is a Namecheap API client in Python.")
14096 (license license:expat)))
14097
14098 (define-public python2-pynamecheap
14099 (package-with-python2 python-pynamecheap))
14100
14101 (define-public python-dns-lexicon
14102 (package
14103 (name "python-dns-lexicon")
14104 (version "2.4.0")
14105 (source
14106 (origin
14107 (method url-fetch)
14108 (uri (pypi-uri "dns-lexicon" version))
14109 (sha256
14110 (base32
14111 "0jdn3ns71bsybr7njgsqr9xlxsqh7zh6phn4ld0liazqdn2l5f6m"))))
14112 (build-system python-build-system)
14113 (arguments
14114 `(#:tests? #f)) ;requires internet access
14115 (propagated-inputs
14116 `(("python-future" ,python-future)
14117 ("python-pynamecheap" ,python-pynamecheap)
14118 ("python-requests" ,python-requests)
14119 ("python-tldextract" ,python-tldextract)
14120 ("python-urllib3" ,python-urllib3)))
14121 (home-page "https://github.com/AnalogJ/lexicon")
14122 (synopsis
14123 "Manipulate DNS records on various DNS providers")
14124 (description
14125 "Lexicon provides a way to manipulate DNS records on multiple DNS
14126 providers in a standardized way. It has a CLI but it can also be used as a
14127 Python library. It was designed to be used in automation, specifically with
14128 Let's Encrypt.")
14129 (license license:expat)))
14130
14131 (define-public python2-dns-lexicon
14132 (package-with-python2 python-dns-lexicon))
14133
14134 (define-public python-commandlines
14135 (package
14136 (name "python-commandlines")
14137 (version "0.4.1")
14138 (source
14139 (origin
14140 (method url-fetch)
14141 (uri (pypi-uri "commandlines" version))
14142 (sha256
14143 (base32
14144 "0r7xcr0knv02p4mswa2bng61nn8nbhhrs6kvdnb9bb3hhjvm1dl6"))))
14145 (build-system python-build-system)
14146 (home-page "https://github.com/chrissimpkins/commandlines")
14147 (synopsis "Command line argument to object parsing library")
14148 (description
14149 "@code{Commandlines} is a Python library for command line application
14150 development that supports command line argument parsing, command string
14151 validation testing and application logic.")
14152 (license license:expat)))
14153
14154 ;; Make sure to upgrade python-llvmlite in (gnu packages llvm) together with
14155 ;; python-numba. They have a very unflexible relationship.
14156 (define-public python-numba
14157 (package
14158 (name "python-numba")
14159 (version "0.39.0")
14160 (source
14161 (origin
14162 (method url-fetch)
14163 (uri (pypi-uri "numba" version))
14164 (sha256
14165 (base32
14166 "1bibvkwga1v8293i9ivl469d8bzgabn3vgr2ig7c1i68v8frsx07"))))
14167 (build-system python-build-system)
14168 (arguments
14169 `(#:modules ((guix build utils)
14170 (guix build python-build-system)
14171 (ice-9 ftw)
14172 (srfi srfi-1)
14173 (srfi srfi-26))
14174 #:phases
14175 (modify-phases %standard-phases
14176 (add-after 'unpack 'disable-proprietary-features
14177 (lambda _
14178 (setenv "NUMBA_DISABLE_HSA" "1")
14179 (setenv "NUMBA_DISABLE_CUDA" "1")
14180 #t))
14181 (add-after 'unpack 'remove-failing-tests
14182 (lambda _
14183 ;; FIXME: these tests fail for unknown reasons:
14184 ;; test_non_writable_pycache, test_non_creatable_pycache, and
14185 ;; test_frozen (all in numba.tests.test_dispatcher.TestCache).
14186 (substitute* "numba/tests/test_dispatcher.py"
14187 (("def test(_non_writable_pycache)" _ m)
14188 (string-append "def guix_skip" m))
14189 (("def test(_non_creatable_pycache)" _ m)
14190 (string-append "def guix_skip" m))
14191 (("def test(_frozen)" _ m)
14192 (string-append "def guix_skip" m)))
14193
14194 ;; These tests fail because we don't run the tests from the build
14195 ;; directory: test_setup_py_distutils, test_setup_py_setuptools
14196 ;; They ar in numba.tests.test_pycc.TestDistutilsSupport.
14197 (substitute* "numba/tests/test_pycc.py"
14198 (("def test(_setup_py_distutils|_setup_py_setuptools)" _ m)
14199 (string-append "def guix_skip" m)))
14200 #t))
14201 (replace 'check
14202 (lambda _
14203 (let ((cwd (getcwd)))
14204 (setenv "PYTHONPATH"
14205 (string-append cwd "/build/"
14206 (find (cut string-prefix? "lib" <>)
14207 (scandir (string-append cwd "/build")))
14208 ":"
14209 (getenv "PYTHONPATH")))
14210 ;; Something is wrong with the PYTHONPATH when running the
14211 ;; tests from the build directory, as it complains about not being
14212 ;; able to import certain modules.
14213 (with-directory-excursion "/tmp"
14214 (invoke "python3" "-m" "numba.runtests" "-v" "-m")))
14215 #t)))))
14216 (propagated-inputs
14217 `(("python-llvmlite" ,python-llvmlite)
14218 ("python-numpy" ,python-numpy)
14219 ("python-singledispatch" ,python-singledispatch)))
14220 ;; Needed for tests.
14221 (inputs
14222 `(("python-jinja2" ,python-jinja2)
14223 ("python-pygments" ,python-pygments)))
14224 (home-page "https://numba.pydata.org")
14225 (synopsis "Compile Python code using LLVM")
14226 (description "Numba gives you the power to speed up your applications with
14227 high performance functions written directly in Python. With a few
14228 annotations, array-oriented and math-heavy Python code can be just-in-time
14229 compiled to native machine instructions, similar in performance to C, C++ and
14230 Fortran, without having to switch languages or Python interpreters.
14231
14232 Numba works by generating optimized machine code using the LLVM compiler
14233 infrastructure at import time, runtime, or statically (using the included pycc
14234 tool).")
14235 (license license:bsd-3)))
14236
14237 (define-public python-anndata
14238 (package
14239 (name "python-anndata")
14240 (version "0.6.9")
14241 (source
14242 (origin
14243 (method url-fetch)
14244 (uri (pypi-uri "anndata" version))
14245 (sha256
14246 (base32
14247 "1fh461xyyc7pcrjfgd013bdc2alf53r46ss3gfw3431mbb1gappi"))))
14248 (build-system python-build-system)
14249 (propagated-inputs
14250 `(("python-h5py" ,python-h5py)
14251 ("python-natsort" ,python-natsort)
14252 ("python-pandas" ,python-pandas)
14253 ("python-scipy" ,python-scipy)))
14254 (home-page "https://github.com/theislab/anndata")
14255 (synopsis "Annotated data for data analysis pipelines")
14256 (description "Anndata is a package for simple (functional) high-level APIs
14257 for data analysis pipelines. In this context, it provides an efficient,
14258 scalable way of keeping track of data together with learned annotations and
14259 reduces the code overhead typically encountered when using a mostly
14260 object-oriented library such as @code{scikit-learn}.")
14261 (license license:bsd-3)))
14262
14263 (define-public python-dill
14264 (package
14265 (name "python-dill")
14266 (version "0.2.8.2")
14267 (source
14268 (origin
14269 (method url-fetch)
14270 (uri (pypi-uri "dill" version))
14271 (sha256
14272 (base32
14273 "1cymzn9fxwdy33h21zkk4gqgzvd25110hh3zdqnvnwa3p52c4kb2"))))
14274 (build-system python-build-system)
14275 ;; FIXME: The check phase fails with "don't know how to make test".
14276 (arguments '(#:tests? #f))
14277 (home-page "https://pypi.org/project/dill")
14278 (synopsis "Serialize all of Python")
14279 (description "Dill extends Python's @code{pickle} module for serializing
14280 and de-serializing Python objects to the majority of the built-in Python
14281 types. Dill provides the user the same interface as the @code{pickle} module,
14282 and also includes some additional features. In addition to pickling Python
14283 objects, @code{dill} provides the ability to save the state of an interpreter
14284 session in a single command. Hence, it would be feasable to save a
14285 interpreter session, close the interpreter, ship the pickled file to another
14286 computer, open a new interpreter, unpickle the session and thus continue from
14287 the saved state of the original interpreter session.")
14288 (license license:bsd-3)))
14289
14290 (define-public python-multiprocess
14291 (package
14292 (name "python-multiprocess")
14293 (version "0.70.6.1")
14294 (source
14295 (origin
14296 (method url-fetch)
14297 (uri (pypi-uri "multiprocess" version))
14298 (sha256
14299 (base32
14300 "1ip5caz67b3q0553mr8gm8xwsb8x500jn8ml0gihgyfy52m2ypcq"))))
14301 (build-system python-build-system)
14302 (propagated-inputs
14303 `(("python-dill" ,python-dill)))
14304 (home-page "https://pypi.org/project/multiprocess")
14305 (synopsis "Multiprocessing and multithreading in Python")
14306 (description
14307 "This package is a fork of the multiprocessing Python package, a package
14308 which supports the spawning of processes using the API of the standard
14309 library's @code{threading} module.")
14310 (license license:bsd-3)))
14311
14312 (define-public python-toolz
14313 (package
14314 (name "python-toolz")
14315 (version "0.9.0")
14316 (source
14317 (origin
14318 (method url-fetch)
14319 (uri (pypi-uri "toolz" version))
14320 (sha256
14321 (base32
14322 "1j9i7fdjnx9dz35fdj5gvgxx6585ja9sxgaiv65if77nlxz0m7wj"))))
14323 (build-system python-build-system)
14324 ;; FIXME: tests cannot be computed: "Can't perform this operation for
14325 ;; unregistered loader type"
14326 (arguments '(#:tests? #f))
14327 (home-page "https://github.com/pytoolz/toolz/")
14328 (synopsis "List processing tools and functional utilities")
14329 (description
14330 "This package provides a set of utility functions for iterators,
14331 functions, and dictionaries.")
14332 (license license:bsd-3)))
14333
14334 (define-public python-cytoolz
14335 (package
14336 (name "python-cytoolz")
14337 (version "0.9.0.1")
14338 (source
14339 (origin
14340 (method url-fetch)
14341 (uri (pypi-uri "cytoolz" version))
14342 (sha256
14343 (base32
14344 "1r80p88hm3f3r4zpixzr047y5hw4bzy41m4xywnhycda83x0dk44"))))
14345 (build-system python-build-system)
14346 ;; FIXME: tests fail with "module 'cytoolz.curried' has no attribute
14347 ;; 'exceptions'"
14348 (arguments '(#:tests? #f))
14349 (propagated-inputs
14350 `(("python-toolz" ,python-toolz)))
14351 (native-inputs
14352 `(("python-cython" ,python-cython)))
14353 (home-page "https://github.com/pytoolz/cytoolz")
14354 (synopsis "High performance functional utilities")
14355 (description
14356 "The cytoolz package implements the same API as provided by toolz. The
14357 main differences are that @code{cytoolz} is faster and cytoolz offers a C API
14358 that is accessible to other projects developed in Cython.")
14359 (license license:bsd-3)))
14360
14361 (define-public python-sortedcontainers
14362 (package
14363 (name "python-sortedcontainers")
14364 (version "2.0.4")
14365 (source
14366 (origin
14367 (method url-fetch)
14368 (uri (pypi-uri "sortedcontainers" version))
14369 (sha256
14370 (base32
14371 "10hrk2k0hbf9x78vd3f0lj277m1yzfhzzxr0hja718liwb398wk0"))))
14372 (build-system python-build-system)
14373 (native-inputs
14374 `(("python-tox" ,python-tox)))
14375 (home-page "http://www.grantjenks.com/docs/sortedcontainers/")
14376 (synopsis "Sorted List, Sorted Dict, Sorted Set")
14377 (description
14378 "This package provides a sorted collections library, written in
14379 pure-Python.")
14380 (license license:asl2.0)))
14381
14382 (define-public python-cloudpickle
14383 (package
14384 (name "python-cloudpickle")
14385 (version "0.5.5")
14386 (source
14387 (origin
14388 (method url-fetch)
14389 (uri (pypi-uri "cloudpickle" version))
14390 (sha256
14391 (base32
14392 "0gdg5n025v4wqmdg65rm0n6fvp6731ip30ji0rmn2kqsyr4bb93f"))))
14393 (build-system python-build-system)
14394 ;; FIXME: there are 5 errors in 122 tests:
14395 ;; ERROR: test_function_pickle_compat_0_4_0 (tests.cloudpickle_test.CloudPickleTest)
14396 ;; ERROR: test_function_pickle_compat_0_4_1 (tests.cloudpickle_test.CloudPickleTest)
14397 ;; ERROR: test_function_pickle_compat_0_4_0 (tests.cloudpickle_test.Protocol2CloudPickleTest)
14398 ;; ERROR: test_function_pickle_compat_0_4_1 (tests.cloudpickle_test.Protocol2CloudPickleTest)
14399 ;; ERROR: test_temp_file (tests.cloudpickle_file_test.CloudPickleFileTests)
14400 ;; TypeError: cannot serialize '_io.BufferedRandom' object
14401 (arguments '(#:tests? #f))
14402 (native-inputs
14403 `(("python-pytest" ,python-pytest)
14404 ("python-mock" ,python-mock)
14405 ("python-tornado" ,python-tornado)))
14406 (home-page "https://github.com/cloudpipe/cloudpickle")
14407 (synopsis "Extended pickling support for Python objects")
14408 (description
14409 "Cloudpickle makes it possible to serialize Python constructs not
14410 supported by the default pickle module from the Python standard library. It
14411 is especially useful for cluster computing where Python expressions are
14412 shipped over the network to execute on remote hosts, possibly close to the
14413 data.")
14414 (license license:bsd-3)))
14415
14416 (define-public python-locket
14417 (package
14418 (name "python-locket")
14419 (version "0.2.0")
14420 (source
14421 (origin
14422 (method url-fetch)
14423 (uri (pypi-uri "locket" version))
14424 (sha256
14425 (base32
14426 "1d4z2zngrpqkrfhnd4yhysh66kjn4mblys2l06sh5dix2p0n7vhz"))))
14427 (build-system python-build-system)
14428 (home-page "https://github.com/mwilliamson/locket.py")
14429 (synopsis "File-based locks for Python")
14430 (description
14431 "Locket implements a lock that can be used by multiple processes provided
14432 they use the same path.")
14433 (license license:bsd-2)))
14434
14435 (define-public python-blosc
14436 (package
14437 (name "python-blosc")
14438 (version "1.5.1")
14439 (source
14440 (origin
14441 (method url-fetch)
14442 (uri (pypi-uri "blosc" version))
14443 (sha256
14444 (base32
14445 "1cm91c6r431yla2mbs4895bgiianjf30dfz14vvv99dslygd65jw"))))
14446 (build-system python-build-system)
14447 ;; FIXME: all tests pass, but then this error is printed:
14448 ;; TypeError: calling <function run at 0x7ffff2568d90> returned None, not a test
14449 (arguments '(#:tests? #f))
14450 (propagated-inputs
14451 `(("python-numpy" ,python-numpy)))
14452 (home-page "https://github.com/blosc/python-blosc")
14453 (synopsis "Python wrapper for the Blosc data compressor library")
14454 (description "Blosc is a high performance compressor optimized for binary
14455 data. It has been designed to transmit data to the processor cache faster
14456 than the traditional, non-compressed, direct memory fetch approach via a
14457 @code{memcpy()} system call.
14458
14459 Blosc works well for compressing numerical arrays that contains data with
14460 relatively low entropy, like sparse data, time series, grids with
14461 regular-spaced values, etc.
14462
14463 This Python package wraps the Blosc library.")
14464 (license license:bsd-3)))
14465
14466 (define-public python-partd
14467 (package
14468 (name "python-partd")
14469 (version "0.3.9")
14470 (source
14471 (origin
14472 (method url-fetch)
14473 (uri (pypi-uri "partd" version))
14474 (sha256
14475 (base32
14476 "0sz6rwlnl4fqq220pyz863cnv0gjdxl4m7lscl71ishl5z0xkmhz"))))
14477 (build-system python-build-system)
14478 (propagated-inputs
14479 `(("python-blosc" ,python-blosc)
14480 ("python-locket" ,python-locket)
14481 ("python-numpy" ,python-numpy)
14482 ("python-pandas" ,python-pandas)
14483 ("python-pyzmq" ,python-pyzmq)
14484 ("python-toolz" ,python-toolz)))
14485 (home-page "https://github.com/dask/partd/")
14486 (synopsis "Appendable key-value storage")
14487 (description "Partd stores key-value pairs. Values are raw bytes. We
14488 append on old values. Partd excels at shuffling operations.")
14489 (license license:bsd-3)))
14490
14491 (define-public python-dask
14492 (package
14493 (name "python-dask")
14494 (version "0.19.0")
14495 (source
14496 (origin
14497 (method url-fetch)
14498 (uri (pypi-uri "dask" version))
14499 (sha256
14500 (base32
14501 "1pm1163qb6s22p8fnvj0zlfazihvs7hxjn8l2n52bzs7shw6kdz3"))))
14502 (build-system python-build-system)
14503 ;; A single test out of 5000+ fails. This test is marked as xfail when
14504 ;; pytest-xdist is used.
14505 (arguments
14506 `(#:phases
14507 (modify-phases %standard-phases
14508 (add-after 'unpack 'disable-broken-test
14509 (lambda _
14510 (substitute* "dask/tests/test_threaded.py"
14511 (("def test_interrupt\\(\\)" m)
14512 (string-append "@pytest.mark.skip(reason=\"Disabled by Guix\")\n"
14513 m)))
14514 #t)))))
14515 (propagated-inputs
14516 `(("python-cloudpickle" ,python-cloudpickle)
14517 ("python-numpy" ,python-numpy)
14518 ("python-pandas" ,python-pandas)
14519 ("python-partd" ,python-partd)
14520 ("python-toolz" ,python-toolz)
14521 ("python-pyyaml" ,python-pyyaml)))
14522 (native-inputs
14523 `(("python-pytest" ,python-pytest)
14524 ("python-pytest-runner" ,python-pytest-runner)))
14525 (home-page "https://github.com/dask/dask/")
14526 (synopsis "Parallel computing with task scheduling")
14527 (description
14528 "Dask is a flexible parallel computing library for analytics. It
14529 consists of two components: dynamic task scheduling optimized for computation,
14530 and large data collections like parallel arrays, dataframes, and lists that
14531 extend common interfaces like NumPy, Pandas, or Python iterators to
14532 larger-than-memory or distributed environments. These parallel collections
14533 run on top of the dynamic task schedulers. ")
14534 (license license:bsd-3)))
14535
14536 (define-public python-ilinkedlist
14537 (package
14538 (name "python-ilinkedlist")
14539 (version "0.4.0")
14540 (source
14541 (origin
14542 (method url-fetch)
14543 (uri (pypi-uri "ilinkedlist" version))
14544 (sha256
14545 (base32
14546 "0nrw4sr3afldrp7073hvc0rgdz282s0l819jdmj1i6nn05v33h0l"))))
14547 (build-system python-build-system)
14548 (native-inputs `(("python-pytest" ,python-pytest)))
14549 (inputs `(("python" ,python)))
14550 (home-page "https://github.com/luther9/ilinkedlist-py")
14551 (synopsis "Immutable linked list library")
14552 (description
14553 "This is a implementation of immutable linked lists for Python. It
14554 contains @code{nil} (the empty linked list) and a @code{Pair} class for nodes.
14555 Since a linked list is treated as immutable, it is hashable, and its length
14556 can be retrieved in constant time. Some of the terminology is inspired by
14557 LISP. It is possible to create an improper list by creating a @code{Pair}
14558 with a non-list @code{cdr}.")
14559 (license license:gpl3+)))
14560
14561 (define-public python-readlike
14562 (package
14563 (name "python-readlike")
14564 (version "0.1.3")
14565 (source
14566 (origin
14567 (method url-fetch)
14568 (uri (pypi-uri "readlike" version))
14569 (sha256
14570 (base32 "027w8fvi50ksl57q0a7kb5zvmq8jxaawnviib1jdqw0p3igvm1j4"))))
14571 (build-system python-build-system)
14572 (home-page "https://github.com/jangler/readlike")
14573 (synopsis "GNU Readline-like line editing module")
14574 (description
14575 "This Python module provides line editing functions similar to the default
14576 Emacs-style ones of GNU Readline. Unlike the Python standard library's
14577 @code{readline} package, this one allows access to those capabilties in settings
14578 outside of a standard command-line interface. It is especially well-suited to
14579 interfacing with Urwid, due to a shared syntax for describing key inputs.
14580
14581 Currently, all stateless Readline commands are implemented. Yanking and history
14582 are not supported.")
14583 (license license:expat)))
14584
14585 (define-public python2-readlike
14586 (package-with-python2 python-readlike))
14587
14588 (define-public python-reparser
14589 (package
14590 (name "python-reparser")
14591 (version "1.4.3")
14592 (source
14593 (origin
14594 (method url-fetch)
14595 (uri (pypi-uri "ReParser" version))
14596 (sha256
14597 (base32 "0nniqb69xr0fv7ydlmrr877wyyjb61nlayka7xr08vlxl9caz776"))))
14598 (build-system python-build-system)
14599 (home-page "https://github.com/xmikos/reparser")
14600 (synopsis "Simple lexer/parser for inline markup based on regular expressions")
14601 (description
14602 "This Python library provides a simple lexer/parser for inline markup based
14603 on regular expressions.")
14604 (license license:expat)))
14605
14606 (define-public python2-reparser
14607 (let ((reparser (package-with-python2
14608 (strip-python2-variant python-reparser))))
14609 (package (inherit reparser)
14610 (propagated-inputs
14611 `(("python2-enum34" ,python2-enum34)
14612 ,@(package-propagated-inputs reparser))))))
14613
14614 (define-public python-precis-i18n
14615 (package
14616 (name "python-precis-i18n")
14617 (version "1.0.0")
14618 (source
14619 (origin
14620 (method url-fetch)
14621 (uri (pypi-uri "precis_i18n" version))
14622 (sha256
14623 (base32
14624 "0gjhvwd8aifx94rl1ag08vlmndyx2q3fkyqb0c4i46x3p2bc2yi2"))))
14625 (build-system python-build-system)
14626 (home-page "https://github.com/byllyfish/precis_i18n")
14627 (synopsis "Implementation of the PRECIS framework")
14628 (description
14629 "This module implements the PRECIS Framework as described in RFC 8264,
14630 RFC 8265 and RFC 8266.")
14631 (license license:expat)))
14632
14633 (define-public python-wikidata
14634 (package
14635 (name "python-wikidata")
14636 (version "0.6.1")
14637 (source
14638 (origin
14639 (method url-fetch)
14640 (uri (pypi-uri "Wikidata" version))
14641 (sha256
14642 (base32
14643 "08nlnydddfp1jj0cdmshvld1irzngbp3dij928wqsg9ziklm6mw9"))))
14644 (build-system python-build-system)
14645 (propagated-inputs
14646 `(("python-babel" ,python-babel)))
14647 (home-page "https://github.com/dahlia/wikidata")
14648 (synopsis "Wikidata client library")
14649 (description
14650 "This package provides a Python interface to
14651 @url{https://www.wikidata.org/, Wikidata}.")
14652 (properties '((upstream-name . "Wikidata")))
14653 (license license:gpl3+)))