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>
60 ;;; This file is part of GNU Guix.
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.
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.
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/>.
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))
148 (define-public python-2.7
152 (replacement python-2/fixed)
156 (uri (string-append "https://www.python.org/ftp/python/"
157 version "/Python-" version ".tar.xz"))
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.
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"))
182 "tk")) ;tkinter; adds 50 MiB to the closure
183 (build-system gnu-build-system)
187 ;; test_compileall test_distutils test_import test_shutil test_socket
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
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"))
210 #:modules ((ice-9 ftw) (ice-9 match)
211 (guix build utils) (guix build gnu-build-system))
213 (modify-phases %standard-phases
215 'configure 'patch-lib-shells
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"
222 "Lib/distutils/tests/test_spawn.py"
223 "Lib/test/support/__init__.py"
224 "Lib/test/test_subprocess.py"))
225 (("/bin/sh") (which "sh")))
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")
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
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)
251 ;; 'Lib/test/test_site.py' needs a valid $HOME
252 (setenv "HOME" (getcwd))
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.
261 (let ((circa-1980 (* 10 366 24 60 60)))
262 (ftw "." (lambda (file stat flag)
263 (utime file circa-1980 circa-1980)
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")
273 (string-prefix? "python" name)))
275 (let ((testdir (string-append out "/lib/" pythonX.Y
277 (with-directory-excursion testdir
278 (for-each delete-file-recursively
284 (string-prefix? "test_support."
286 (call-with-output-file "__init__.py" (const #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)
294 (find-files (string-append out "/lib")
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")))
304 (match (find-files out "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
312 (dirname (dirname tkinter.so))
315 (install-file tkinter.so target)
316 (delete-file tkinter.so)))))
321 ("libffi" ,libffi) ; for ctypes
322 ("sqlite" ,sqlite) ; for sqlite extension
324 ("readline" ,readline)
327 ("tk" ,tk))) ; for tkinter
329 `(("pkg-config" ,pkg-config)))
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")
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
344 (license license:psfl)))
346 ;; Current 2.x version.
347 (define-public python-2 python-2.7)
349 (define python-2/fixed
353 (inherit (package-source python-2))
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")))))))
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".
368 (properties `((superseded . ,python-2)))))
370 (define-public python-3.6
371 (package (inherit python-2)
374 (replacement python-3/fixed)
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"))
387 "19l7inxm056jjw33zz97z0m02hsi7jnnx5kyb76abj5ml4xhad7l"))
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
396 (substitute-keyword-arguments (package-arguments python-2)
399 `(modify-phases ,phases
400 (add-after 'unpack 'patch-timestamp-for-pyc-files
402 ;; We set DETERMINISTIC_BUILD to only override the mtime when
403 ;; building with Guix, lest we break auto-compilation in
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'])"))
410 ;; Use deterministic hashes for strings, bytes, and datetime
412 (setenv "PYTHONHASHSEED" "0")
414 ;; Reset mtime when validating bytecode header.
415 (substitute* "Lib/importlib/_bootstrap_external.py"
416 (("source_mtime = int\\(source_stats\\['mtime'\\]\\)")
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
424 (substitute* "Lib/test/test_importlib/source/test_file_loader.py"
425 (("test_bad_marshal")
426 "disable_test_bad_marshal")
428 "disable_test_no_marshal")
429 (("test_non_code_marshal")
430 "disable_test_non_code_marshal"))
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.
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")))
449 (format #t "Compiling with optimization level: ~a\n"
450 (if (null? opt) "none" (car opt)))
451 (for-each (lambda (file)
453 `(,(string-append out "/bin/python3")
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.*)"
461 (find-files out "\\.py$")))
462 (list '() '("-O") '("-OO")))
465 (list (search-path-specification
466 (variable "PYTHONPATH")
467 (files (list (string-append "lib/python"
468 (version-major+minor version)
469 "/site-packages"))))))))
471 ;; Current 3.x version.
472 (define-public python-3 python-3.6)
474 (define python-3/fixed
478 (inherit (package-source python-3))
479 (patches (append (origin-patches (package-source python-3))
480 (search-patches "python-CVE-2018-14647.patch")))))
482 (substitute-keyword-arguments (package-arguments python-3)
484 `(modify-phases ,phases
485 (add-after 'unpack 'delete-broken-test
487 ;; Delete test which fails on recent kernels:
488 ;; <https://bugs.python.org/issue34587>.
489 (delete-file "Lib/test/test_socket.py")
492 ;; Current major version.
493 (define-public python python-3)
495 ;; Minimal variants of Python, mostly used to break the cycle between Tk and
496 ;; Python (Tk -> libxcb -> Python.)
498 (define-public python2-minimal
499 (package/inherit python-2
500 (name "python2-minimal")
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
506 (inputs `(("libffi" ,libffi)
509 (define-public python-minimal
510 (package/inherit python
511 (name "python-minimal")
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)
521 (define-public python-debug
522 (package/inherit python
523 (name "python-debug")
524 (outputs '("out" "debug"))
525 (build-system gnu-build-system)
527 (substitute-keyword-arguments (package-arguments python)
528 ((#:configure-flags flags '())
529 `(cons "--with-pydebug" ,flags))))
531 "High-level, dynamically-typed programming language (for debugging)")
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.")))
538 (define* (wrap-python3 python
540 (name (string-append (package-name python) "-wrapper")))
541 (package/inherit python
544 (build-system trivial-build-system)
546 (inputs `(("bash" ,bash)))
547 (propagated-inputs `(("python" ,python)))
549 `(#:modules ((guix build utils))
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/")))
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")
566 (old (string-append python "python3-config"))
567 (new (string-append bin "/python-config")))
568 (with-output-to-file new
570 (format #t "#!~a~%" bash)
571 (format #t "exec \"~a\" \"$@\"~%" old)
574 (synopsis "Wrapper for the Python 3 commands")
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}.")))
580 (define-public python-wrapper (wrap-python3 python))
581 (define-public python-minimal-wrapper (wrap-python3 python-minimal))
583 (define-public python-psutil
585 (name "python-psutil")
590 (uri (pypi-uri "psutil" version))
593 "063v69x7spyclyaxrd3gmzj3p16q5ayg97xqhwb1kyn22a9pwip2"))))
594 (build-system python-build-system)
596 ;; FIXME: some tests does not return and times out.
598 (home-page "https://www.github.com/giampaolo/psutil")
599 (synopsis "Library for retrieving information on running processes")
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)))
611 (define-public python2-psutil
612 (let ((base (package-with-python2 (strip-python2-variant python-psutil))))
616 `(("python2-enum34" ,python2-enum34) ;optional
617 ,@(package-propagated-inputs base))))))
619 (define-public python-shapely
621 (name "python-shapely")
626 (uri (pypi-uri "Shapely" version))
629 "0svc58dzcw9gj92b4sgq35sdxkf85z0qwlzxarkzq4bp3h8jy58l"))))
630 (build-system python-build-system)
632 `(("python-cython" ,python-cython)
633 ("python-matplotlib" ,python-matplotlib)
634 ("python-pytest" ,python-pytest)
635 ("python-pytest-cov" ,python-pytest-cov)))
639 `(("python-numpy" ,python-numpy)))
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"))))
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)))
662 (define-public python-logwrap
664 (name "python-logwrap")
669 (uri (pypi-uri "logwrap" version ".zip"))
672 "1d2k0hvpbi51vl410y8fbs5m0nxnlh2k7gr2nrh3k81ibhzscsra"))))
673 (build-system python-build-system)
675 `(("python-six" ,python-six)
676 ("python-typing" ,python-typing)))
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)))
689 (define-public python2-shapely
690 (package-with-python2 python-shapely))
692 (define-public python-clyent
694 (name "python-clyent")
699 (uri (pypi-uri "clyent" version))
702 "1r9987qmy1pz3hq54160bapqsywpq14waw4w9x3ly8hmq7kpgfbj"))))
703 (build-system python-build-system)
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)))
712 (define-public python2-clyent
713 (package-with-python2 python-clyent))
715 (define-public python-babel
717 (name "python-babel")
722 (uri (pypi-uri "Babel" version))
725 "0x98qqqw35xllpcama013a9788ly84z8dm1w2wwfpxh2710c8df5"))))
726 (build-system python-build-system)
728 `(("python-pytz" ,python-pytz)))
729 (arguments `(#:tests? #f)) ; no test target
730 (home-page "http://babel.pocoo.org/")
732 "Tools for internationalizing Python applications")
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,
739 (license license:bsd-3)))
741 (define-public python2-babel
742 (package-with-python2 python-babel))
744 (define-public python2-backport-ssl-match-hostname
746 (name "python2-backport-ssl-match-hostname")
752 "https://pypi.python.org/packages/source/b/"
753 "backports.ssl_match_hostname/backports.ssl_match_hostname-"
757 "1wndipik52cyqy0677zdgp90i435pmvwd89cz98lm7ri0y3xjajh"))))
758 (build-system python-build-system)
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")
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)))
771 (define-public python-hdf4
778 (uri (pypi-uri name version))
781 "1hjiyrxvxk9817qyqky3nar4y3fs4z8wxz0n884zzb5wi6skrjks"))))
782 (build-system python-build-system)
783 (native-inputs `(("nose" ,python-nose)))
784 (propagated-inputs `(("numpy" ,python-numpy)))
791 (modify-phases %standard-phases
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=.*") ""))
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")
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)))
813 (define-public python2-hdf4
814 (package-with-python2 python-hdf4))
816 (define-public python-h5py
823 (uri (pypi-uri "h5py" version))
826 "0mdr6wrq02ac93m1aqx9kad0ppfzmm4imlxqgyy1x4l7hmdcc9p6"))))
827 (build-system python-build-system)
829 `(#:tests? #f ; no test target
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" "']")))
845 `(("python-six" ,python-six)
846 ("python-numpy" ,python-numpy)))
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")
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
860 (license license:bsd-3)))
862 (define-public python2-h5py
863 (package-with-python2 python-h5py))
865 (define-public python-netcdf4
867 (name "python-netcdf4")
872 (uri (pypi-uri "netCDF4" version))
875 "1h6jq338amlbk0ilzvjyl7cck80i0bah9a5spn9in71vy2qxm7i5"))))
876 (build-system python-build-system)
878 `(("python-cython" ,python-cython)))
880 `(("python-numpy" ,python-numpy)))
887 (modify-phases %standard-phases
890 (setenv "NO_NET" "1") ; disable opendap tests
891 (with-directory-excursion "test"
892 (setenv "PYTHONPATH" ; find and add the library we just built
894 (car (find-files "../build" "lib.*"
896 #:fail-on-error? #:t))
897 ":" (getenv "PYTHONPATH")))
898 (zero? (system* "python" "run_all.py"))))))))
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))))
913 (define-public python2-netcdf4
914 (package-with-python2 python-netcdf4))
916 (define-public python-lockfile
918 (name "python-lockfile")
923 (uri (string-append "https://pypi.python.org/packages/source/l/lockfile/"
924 "lockfile-" version ".tar.gz"))
927 "16gpx5hm73ah5n1079ng0vy381hl802v606npkx4x8nb0gg05vba"))))
928 (build-system python-build-system)
929 (arguments '(#:test-target "check"))
931 `(("python-pbr" ,python-pbr)))
932 (home-page "https://launchpad.net/pylockfile")
933 (synopsis "Platform-independent file locking module")
935 "The lockfile package exports a LockFile class which provides a simple
936 API for locking files.")
937 (license license:expat)))
939 (define-public python2-lockfile
940 (package-with-python2 python-lockfile))
942 (define-public python-semantic-version
944 (name "python-semantic-version")
949 (uri (pypi-uri "semantic_version" version))
952 "1h2l9xyg1zzsda6kjcmfcgycbvrafwci283vcr1v5sbk01l2hhra"))))
953 (build-system python-build-system)
955 `(#:tests? #f)) ; PyPI tarball lacks tests
956 (home-page "https://github.com/rbarrois/python-semanticversion")
957 (synopsis "Semantic versioning module for Python")
959 "The @code{semantic_version} class is a small library for handling
960 @uref{https://semver.org/, semantic versioning} (@dfn{SemVer}) in Python.
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)))
967 (define-public python2-semantic-version
968 (package-with-python2 python-semantic-version))
970 (define-public python-setuptools
972 (name "python-setuptools")
977 (uri (pypi-uri "setuptools" version))
980 "0ypybh4hx3bv4vhg2dc74xpj1g56ggnaffm87k4abhwjwq6wq608"))
981 (modules '((guix build utils)))
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$"))
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.
994 (home-page "https://pypi.python.org/pypi/setuptools")
996 "Library designed to facilitate packaging Python projects")
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,
1003 project installation,
1004 platform-specific details,
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
1013 (define-public python2-setuptools
1014 (package-with-python2 python-setuptools))
1016 (define-public python-uniseg
1018 (name "python-uniseg")
1023 (uri (pypi-uri "uniseg" version ".zip"))
1026 "05jsazvz6nbmh6l3v1rph5ydkqn1hzx1pyggdyvgp2qgmgrnmiz2"))))
1027 (build-system python-build-system)
1029 '(#:tests? #f)) ; The test suite requires network access.
1031 `(("unzip" ,unzip)))
1033 "https://bitbucket.org/emptypage/uniseg-python")
1035 "Python library to determine Unicode text segmentations")
1037 "Uniseg is a Python package used to determine Unicode text segmentations.
1038 Supported segmentations include:
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)
1044 @item Sentence break
1047 (license license:expat)))
1049 (define-public python2-uniseg
1050 (package-with-python2 python-uniseg))
1052 (define-public python-humanfriendly
1054 (name "python-humanfriendly")
1059 (uri (pypi-uri "humanfriendly" version))
1062 "0pisgizjql86785jchfjv217g0lsgk114g2lja5j4y3lsc3b9szi"))))
1063 (build-system python-build-system)
1065 `(;; XXX: Tests depend on coloredlogs, which in turn depends on humanfriendly.
1068 `(("python-monotonic" ,python-monotonic)))
1069 (home-page "https://humanfriendly.readthedocs.io")
1070 (synopsis "Human-friendly input and output in Python")
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
1077 (license license:expat)))
1079 (define-public python2-humanfriendly
1080 (package-with-python2 python-humanfriendly))
1082 (define-public python-capturer
1084 (name "python-capturer")
1089 (uri (pypi-uri "capturer" version))
1092 "05d6ji4j8ipiq0br7bwam38qc6hd9l1djmfxlzrxx19ziyjl4089"))))
1093 (build-system python-build-system)
1097 `(("python-humanfriendly" ,python-humanfriendly)))
1098 (home-page "https://capturer.readthedocs.io")
1099 (synopsis "Capture stdout and stderr streams of the current process")
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)))
1107 (define-public python2-capturer
1108 (package-with-python2 python-capturer))
1110 (define-public python-verboselogs
1112 (name "python-verboselogs")
1117 (uri (pypi-uri "verboselogs" version))
1120 "09z4d1jiasn7k1hs5af2ckmnrd0i1d1m04bhfjhv7z6svzfdwgg3"))))
1121 (build-system python-build-system)
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")
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)))
1133 (define-public python2-verboselogs
1134 (package-with-python2 python-verboselogs))
1136 (define-public python-coloredlogs
1138 (name "python-coloredlogs")
1143 (uri (pypi-uri "coloredlogs" version))
1146 "1blcann6dyg5dhps9pg12rn0q0rjrlajpmmil0gy0j4cbvnl2il9"))))
1147 (build-system python-build-system)
1149 `(;Tests require some updated modules
1152 `(("python-capturer" ,python-capturer)))
1153 (home-page "https://coloredlogs.readthedocs.io")
1154 (synopsis "Colored stream handler for Python's logging module")
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)))
1162 (define-public python2-coloredlogs
1163 (package-with-python2 python-coloredlogs))
1165 (define-public python-eventlet
1167 (name "python-eventlet")
1172 (uri (pypi-uri "eventlet" version))
1175 "0f3q55mq4n021wb7qa53pz3ix6i2py64sap66vsaqm2scjw83m9s"))))
1176 (build-system python-build-system)
1178 `(("python-greenlet" ,python-greenlet)))
1180 ;; TODO: Requires unpackaged 'enum-compat'.
1182 (home-page "http://eventlet.net")
1183 (synopsis "Concurrent networking library for Python")
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)))
1194 (define-public python2-eventlet
1195 (let ((base (package-with-python2
1196 (strip-python2-variant python-eventlet))))
1197 (package (inherit base)
1199 `(("python2-enum34" ,python2-enum34)
1200 ,@(package-propagated-inputs base))))))
1202 (define-public python-six
1209 (uri (pypi-uri "six" version))
1212 "1scqzwc51c875z23phj48gircqjgnn3af8zy2izjwmnlxrxsgs3h"))))
1213 (build-system python-build-system)
1216 (modify-phases %standard-phases
1219 (invoke "py.test" "-v"))))))
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")
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)))
1233 (define-public python2-six
1234 (package-with-python2 python-six))
1236 (define-public python-six-bootstrap
1238 (inherit python-six)
1239 (name "python-six-bootstrap")
1241 (arguments `(#:tests? #f))))
1243 (define-public python2-six-bootstrap
1244 (package-with-python2 python-six-bootstrap))
1246 (define-public python-schedule
1248 (name "python-schedule")
1253 (uri (pypi-uri "schedule" version))
1256 "0vplyjcbfrq50sphlwya749z8p2pcyi2nycw3518i0qpd9a6189i"))))
1257 (build-system python-build-system)
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")
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)))
1270 (define-public python2-schedule
1271 (package-with-python2 python-schedule))
1273 (define-public python-pandas
1275 (name "python-pandas")
1280 (uri (pypi-uri "pandas" version))
1282 (base32 "142nvwb01r2wv42y2cz40bx33hd8ffh6s6gynapg859fmzr2mdah"))))
1283 (build-system python-build-system)
1285 `(#:modules ((guix build utils)
1286 (guix build python-build-system)
1289 #:phases (modify-phases %standard-phases
1292 (let ((build-directory
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"
1306 "not network and not disabled"
1307 ;; XXX: Due to the deleted tests above.
1308 " and not test_read_s3_jsonl")))))))))
1310 `(("python-numpy" ,python-numpy)
1311 ("python-pytz" ,python-pytz)
1312 ("python-dateutil" ,python-dateutil)))
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")
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)))
1330 (define-public python2-pandas
1331 (package-with-python2 python-pandas))
1333 (define-public python2-mechanize
1335 (name "python2-mechanize")
1340 (uri (string-append "https://pypi.python.org/packages/source/m/mechanize/mechanize-"
1344 "0rj7r166i1dyrq0ihm5rijfmvhs8a04im28lv05c0c3v206v4rrf"))))
1345 (build-system python-build-system)
1347 `(#:python ,python-2 ; apparently incompatible with Python 3
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'
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/")
1358 "Stateful programmatic web browsing in Python")
1360 "Mechanize implements stateful programmatic web browsing in Python,
1361 after Andy Lester’s Perl module WWW::Mechanize.")
1362 (license (license:non-copyleft
1364 "See COPYING in the distribution."))))
1367 (define-public python-simplejson
1369 (name "python-simplejson")
1374 (uri (pypi-uri "simplejson" version))
1377 "1lkv3xlf7ryzi69zqfdbkvpxdfy1rg1rq2yzcnxgf4km5m6difqy"))))
1378 (build-system python-build-system)
1379 (home-page "http://simplejson.readthedocs.org/en/latest/")
1381 "Json library for Python")
1383 "JSON (JavaScript Object Notation) is a subset of JavaScript
1384 syntax (ECMA-262 3rd edition) used as a lightweight data interchange
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
1393 (license license:x11)))
1395 (define-public python2-simplejson
1396 (package-with-python2 python-simplejson))
1399 (define-public python-pyicu
1401 (name "python-pyicu")
1406 (uri (pypi-uri "PyICU" version))
1409 "05nz4p2dpkhwj6y9kik24xbvmfxji39nl0xw0sc0nvp9fgzf6xnd"))))
1410 (build-system python-build-system)
1412 `(("icu4c" ,icu4c)))
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")
1419 "PyICU is a python extension wrapping the ICU C++ API.")
1420 (properties `((python2-variant . ,(delay python2-pyicu))))
1421 (license license:x11)))
1423 (define-public python2-pyicu
1424 (let ((base (package-with-python2
1425 (strip-python2-variant python-pyicu))))
1429 `(,@(package-arguments base)
1431 (modify-phases %standard-phases
1432 (add-before 'check 'delete-failing-test
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")
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.
1443 (name "python2-dogtail")
1447 (uri (pypi-uri "dogtail" version))
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")
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+)))
1464 (define-public python-empy
1466 (name "python-empy")
1470 (uri (string-append "http://www.alcyone.com/software/empy/empy-"
1474 "01g8mmkfnvjdmlhsihwyx56lrg7r5m5d2fg6mnxsvy6g0dnl69f6"))))
1475 (build-system python-build-system)
1477 `(#:tests? #f)) ;python2 only
1478 (home-page "http://www.alcyone.com/software/empy/")
1479 (synopsis "Templating system for Python")
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
1492 (license license:lgpl2.1+)))
1494 (define-public python2-empy
1495 (package-with-python2 python-empy))
1497 (define-public python2-element-tree
1499 (name "python2-element-tree")
1504 "http://effbot.org/media/downloads/elementtree-"
1505 version "-20050316.tar.gz"))
1508 "016bphqnlg0l4vslahhw4r0aanw95bpypy65r1i1acyb2wj5z7dj"))))
1509 (build-system python-build-system)
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")
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\"."))))
1521 (define-public python2-pybugz
1523 (name "python2-pybugz")
1528 "http://bits.liquidx.net/projects/pybugz/pybugz-"
1532 "17ni00p08gp5lkxlrrcnvi3x09fmajnlbz4da03qcgl9q21ym4jd"))
1533 (patches (search-patches "pybugz-stty.patch"
1534 "pybugz-encode-error.patch"))))
1535 (build-system python-build-system)
1537 `(#:python ,python-2 ; SyntaxError with Python 3
1538 #:tests? #f)) ; no 'test' sub-command
1540 `(("element-tree" ,python2-element-tree)))
1541 (synopsis "Python and command-line interface to Bugzilla")
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
1546 (home-page "http://www.liquidx.net/pybugz/")
1547 (license license:gpl2)))
1549 (define-public python2-enum
1551 (name "python2-enum")
1555 (uri (pypi-uri "enum" version))
1558 "13lk3yrwj42vl30kw3c194f739nrfrdg64s6i0v2p636n4k8brsl"))))
1559 (build-system python-build-system)
1561 `(#:python ,python-2))
1562 (home-page "http://pypi.python.org/pypi/enum/")
1563 (synopsis "Robust enumerated type support in Python")
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
1568 ;; Choice of either license.
1569 (license (list license:gpl3+ license:psfl))))
1571 (define-public python-enum34
1573 (name "python-enum34")
1578 (uri (pypi-uri "enum34" version))
1581 "1cgm5ng2gcfrkrm3hc22brl6chdmv67b9zvva9sfs7gn7dwc9n4a"))))
1582 (build-system python-build-system)
1583 (home-page "https://pypi.python.org/pypi/enum34")
1584 (synopsis "Backported Python 3.4 Enum")
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)))
1590 (define-public python2-enum34
1591 (package-with-python2 python-enum34))
1593 (define-public python-parse-type
1595 (name "python-parse-type")
1600 (uri (pypi-uri "parse_type" version))
1603 "0g3b6gsdwnm8dpkh2vn34q6dzxm9gl908ggyzcv31n9xbp3vv5pm"))))
1604 (build-system python-build-system)
1606 `(("python-six" ,python-six)
1607 ("python-parse" ,python-parse)))
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")
1614 "Parse_type extends the python parse module.")
1616 `((python2-variant . ,(delay python2-parse-type))))
1617 (license license:bsd-3)))
1619 (define-public python2-parse-type
1620 (let ((base (package-with-python2
1621 (strip-python2-variant python-parse-type))))
1622 (package (inherit base)
1624 `(("python2-enum34" ,python2-enum34)
1625 ,@(package-propagated-inputs base))))))
1627 (define-public python-parse
1629 (name "python-parse")
1634 (uri (pypi-uri "parse" version))
1637 "0f8997xr8nq2nq35iiviq8ningd1zvy59fg503xfpbi2dwhgdkf3"))))
1638 (build-system python-build-system)
1641 (modify-phases %standard-phases
1643 (lambda _ (invoke "python" "test_parse.py"))))))
1644 (home-page "https://github.com/r1chardj0n3s/parse")
1645 (synopsis "Parse strings")
1647 "Parse strings using a specification based on the Python @code{format()}
1649 (license license:x11)))
1651 (define-public python-polib
1653 (name "python-polib")
1657 (uri (pypi-uri "polib" version))
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
1667 (license license:expat)))
1669 (define-public python2-polib
1670 (let ((base (package-with-python2 (strip-python2-variant python-polib))))
1673 (arguments `(,@(package-arguments base)
1674 ;; Tests don't work with python2.
1677 (define-public scons
1683 (uri (string-append "mirror://sourceforge/scons/scons/" version
1684 "/scons-" version ".tar.gz"))
1687 "0wzid419mlwqw9llrg8gsx4nkzhqy16m4m40r0xnh6cwscw5wir4"))))
1688 (build-system python-build-system)
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")
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
1700 (license license:x11)))
1702 (define-public scons-python2
1704 (inherit (package-with-python2 scons))
1705 (name "scons-python2")))
1707 (define-public python-extras
1709 (name "python-extras")
1714 (uri (pypi-uri "extras" version))
1717 "0khvm08rcwm62wc47j8niyl6h13f8w51c8669ifivjdr23g3cbhk"))))
1718 (build-system python-build-system)
1720 ;; FIXME: Circular dependency on testtools.
1722 (home-page "https://github.com/testing-cabal/extras")
1723 (synopsis "Useful extensions to the Python standard library")
1725 "Extras is a set of extensions to the Python standard library.")
1726 (license license:expat)))
1728 (define-public python2-extras
1729 (package-with-python2 python-extras))
1731 (define-public python-mimeparse
1733 (name "python-mimeparse")
1739 "https://pypi.python.org/packages/source/p/python-mimeparse/python-mimeparse-"
1743 "0y2g6cl660bpz11srgqyvvm8gmywpgyx8g0xfvbiyr0af0yv1r3n"))))
1744 (build-system python-build-system)
1747 (modify-phases %standard-phases
1750 (invoke "./mimeparse_test.py"))))))
1752 "https://github.com/dbtsai/python-mimeparse")
1753 (synopsis "Python library for parsing MIME types")
1755 "Mimeparse provides basic functions for parsing MIME type names and
1756 matching them against a list of media-ranges.")
1757 (license license:expat)))
1759 (define-public python2-mimeparse
1760 (package-with-python2 python-mimeparse))
1762 (define-public python-pafy
1764 (name "python-pafy")
1769 (uri (pypi-uri "pafy" version))
1772 "1a7dxi95m1043rxx1r5x3ngb66nwlq6aqcasyqqjzmmmjps4zrim"))))
1773 (build-system python-build-system)
1775 `(#:tests? #f)) ; Currently pafy can not find itself in the tests
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")
1783 "@code{pafy} is a python library to retrieve YouTube content and metadata.")
1784 (license license:lgpl3+)))
1786 (define-public python2-funcsigs
1788 (name "python2-funcsigs")
1792 (uri (pypi-uri "funcsigs" version))
1795 "0l4g5818ffyfmfs1a924811azhjj8ax9xd1cffr1mzd3ycn0zfx7"))))
1796 (build-system python-build-system)
1798 `(#:python ,python-2))
1800 `(("python2-unittest2" ,python2-unittest2)))
1801 (home-page "http://funcsigs.readthedocs.org")
1802 (synopsis "Python function signatures from PEP362")
1804 "Backport of @code{funcsigs} which was introduced in Python 3.3.")
1805 (license license:asl2.0)))
1807 (define-public python2-funcsigs-bootstrap
1809 (inherit python2-funcsigs)
1810 (name "python2-funcsigs-bootstrap")
1814 ,@(package-arguments python2-funcsigs)))))
1816 (define-public python-py
1823 (uri (pypi-uri "py" version))
1826 "10gq2lckvgwlk9w6yzijhzkarx44hsaknd0ypa08wlnpjnsgmj99"))))
1827 (build-system python-build-system)
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?"
1834 (home-page "https://pylib.readthedocs.io/")
1835 (synopsis "Python library for parsing, I/O, instrospection, and logging")
1837 "Py is a Python library for file name parsing, .ini file parsing, I/O,
1838 code introspection, and logging.")
1839 (license license:expat)))
1841 (define-public python2-py
1842 (package-with-python2 python-py))
1844 ;; Recent versions of python-fixtures and python-testrepository need
1845 ;; python-pbr for packaging, which itself needs these two packages for
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
1856 (name "python-pbr-minimal")
1861 (uri (pypi-uri "pbr" version))
1864 "14fs5acnalnb3h62s7q7av239j541fk0n0z0lawh4h09b1s93s6p"))))
1865 (build-system python-build-system)
1868 (home-page "http://docs.openstack.org/developer/pbr/")
1869 (synopsis "Minimal build of python-pbr used for bootstrapping")
1871 "Used only for bootstrapping python2-pbr, you should not need this.")
1872 (license license:asl2.0)))
1874 (define-public python2-pbr-minimal
1875 (package-with-python2 python-pbr-minimal))
1877 (define-public python-pbr
1879 (inherit python-pbr-minimal)
1882 `(#:tests? #f)) ;; Most tests seem to use the Internet.
1884 `(("git" ,git))) ;; pbr actually uses the "git" binary.
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")
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.
1904 (define-public python2-pbr
1905 (package-with-python2 python-pbr))
1907 (define-public python-exif-read
1909 (name "python-exif-read")
1913 (uri (pypi-uri "ExifRead" version))
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")
1922 "ExifRead is a Python library to extract EXIF data from tiff and jpeg
1924 (license license:bsd-3)))
1926 (define-public python2-exif-read
1927 (package-with-python2 python-exif-read))
1929 (define-public python-pyld
1931 (name "python-pyld")
1935 (uri (pypi-uri "PyLD" version))
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")
1943 "PyLD is an implementation of the JSON-LD specification.")
1944 (license license:bsd-3)))
1946 (define-public python2-pyld
1947 (package-with-python2 python-pyld))
1949 (define-public python-click
1951 (name "python-click")
1956 (uri (pypi-uri "click" version))
1959 "02qkfpykbq35id8glfgwc38yc430427yd05z1wc5cnld8zgicmgi"))))
1960 (build-system python-build-system)
1962 `(;; The tests are fragile, depending on a specific version of pytest:
1963 ;; <https://github.com/pallets/click/issues/823>
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"
1973 (string-append "'" glibc "/bin/locale'"))))
1976 `(("python-pytest" ,python-pytest)))
1977 (home-page "http://click.pocoo.org")
1978 (synopsis "Command line library for Python")
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)))
1986 (define-public python2-click
1987 (package-with-python2 python-click))
1989 (define-public python-wheel
1991 (name "python-wheel")
1992 (version "0.30.0a0")
1996 (uri (pypi-uri "wheel" version))
1999 "1nm6mn8isny0hr86rhbfrpfj867c0phf001xgsd69xfp9ady1wwq"))))
2000 (build-system python-build-system)
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")
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))))))
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))))))
2024 (define-public python-vcversioner
2026 (name "python-vcversioner")
2027 (version "2.16.0.0")
2031 (uri (pypi-uri "vcversioner" version))
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
2040 (home-page "https://github.com/habnabit/vcversioner")
2041 (license license:isc)))
2043 (define-public python2-vcversioner
2044 (package-with-python2 python-vcversioner))
2046 (define-public python-jsonschema
2048 (name "python-jsonschema")
2054 "https://pypi.python.org/packages/source/j/jsonschema/jsonschema-"
2058 "00kf3zmpp9ya4sydffpifn0j0mzm342a2vzh82p6r0vh10cg7xbg"))))
2059 (build-system python-build-system)
2062 (modify-phases %standard-phases
2063 (replace 'check (lambda _ (zero? (system* "nosetests")))))))
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")
2070 "Jsonschema is an implementation of JSON Schema for Python.")
2071 (license license:expat)
2072 (properties `((python2-variant . ,(delay python2-jsonschema))))))
2074 (define-public python2-jsonschema
2075 (let ((jsonschema (package-with-python2
2076 (strip-python2-variant python-jsonschema))))
2077 (package (inherit jsonschema)
2079 `(("python2-mock" ,python2-mock)
2080 ,@(package-native-inputs jsonschema)))
2082 `(("python2-functools32" ,python2-functools32))))))
2084 (define-public python-schema
2086 (name "python-schema")
2091 (uri (pypi-uri "schema" version))
2094 "1lw28j9w9vxyigg7vkfkvi6ic9lgjkdnfvnxdr7pklslqvzmk2vm"))))
2095 (build-system python-build-system)
2097 `(("python-pytest" ,python-pytest)))
2098 (home-page "https://github.com/keleshev/schema")
2099 (synopsis "Simple data validation library")
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)))
2107 (define-public python2-schema
2108 (package-with-python2 python-schema))
2110 (define-public python-schema-0.5
2111 (package (inherit python-schema)
2116 (uri (pypi-uri "schema" version))
2119 "10zqvpaky51kgb8nd42bk7jwl8cn2zvayxjpdc1wwmpybj92x67s"))))))
2121 (define-public python2-schema-0.5
2122 (package-with-python2 python-schema-0.5))
2124 (define-public python-kitchen
2126 (name "python-kitchen")
2131 (uri (pypi-uri "kitchen" version))
2134 "1zakh6l0yjvwic9p0nkvmbidpnkygkxbigh2skmb5gccyrhbp7xg"))))
2135 (build-system python-build-system)
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:
2149 (define-public python2-kitchen
2150 (package-with-python2 python-kitchen))
2152 (define-public python-unidecode
2154 (name "python-unidecode")
2158 (uri (pypi-uri "Unidecode" version))
2161 "0lfhp9c5xrbpjvbpr12ji52g1lx04404bzzdg6pvabhzisw6l2i8"))))
2162 (build-system python-build-system)
2163 (home-page "https://pypi.python.org/pypi/Unidecode")
2164 (synopsis "ASCII transliterations of Unicode text")
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+)))
2173 (define-public python2-unidecode
2174 (package-with-python2 python-unidecode))
2176 (define-public python-pyjwt
2178 (name "python-pyjwt")
2183 (uri (pypi-uri "PyJWT" version))
2186 "1rxsg14i33vm2i6lz0my628108c81k43v10n4h3p0gx62xdyf2sh"))
2187 (modules '((guix build utils)))
2190 (for-each delete-file-recursively
2191 (find-files "." "\\.pyc$"))
2193 (build-system python-build-system)
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")
2201 "PyJWT is a JSON Web Token implementation written in Python.")
2202 (license license:expat)))
2204 (define-public python2-pyjwt
2205 (package-with-python2 python-pyjwt))
2207 (define-public python-pykka
2209 (name "python-pykka")
2214 (uri (pypi-uri "Pykka" version))
2217 "049w3r0mdnnw7xv19jiq7rvls9k7xs73x05b4qs5d6z4vvmgyiz8"))))
2218 (build-system python-build-system)
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")
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)))
2233 (define-public python2-pykka
2234 (package-with-python2 python-pykka))
2236 (define-public python-itsdangerous
2238 (name "python-itsdangerous")
2244 "https://pypi.python.org/packages/source/i/itsdangerous/itsdangerous-"
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")
2253 "Itsdangerous provides various helpers to pass trusted data to untrusted
2254 environments and back.")
2255 (license license:bsd-3)))
2257 (define-public python2-itsdangerous
2258 (package-with-python2 python-itsdangerous))
2260 (define-public python-pyyaml
2262 (name "python-pyyaml")
2267 (uri (pypi-uri "PyYAML" version))
2270 "1gx603g484z46cb74j9rzr6sjlh2vndxayicvlyhxdz98lhhkwry"))))
2271 (build-system python-build-system)
2273 `(("libyaml" ,libyaml)))
2274 (home-page "http://pyyaml.org/wiki/PyYAML")
2275 (synopsis "YAML parser and emitter for Python")
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
2282 (license license:expat)))
2284 (define-public python2-pyyaml
2285 (package-with-python2 python-pyyaml))
2287 (define-public python-virtualenv
2289 (name "python-virtualenv")
2294 (uri (pypi-uri "virtualenv" version))
2297 "07cbajzk8l05k5zhlw0b9wbf2is65bl9v6zrn2a0iyn57w6pd73d"))))
2298 (build-system python-build-system)
2301 (modify-phases %standard-phases
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")))))))
2310 `(("python-mock" ,python-mock)
2311 ("python-pytest" ,python-pytest)))
2312 (home-page "https://virtualenv.pypa.io/")
2313 (synopsis "Virtual Python environment builder")
2315 "Virtualenv is a tool to create isolated Python environments.")
2316 (license license:expat)))
2318 (define-public python2-virtualenv
2319 (package-with-python2 python-virtualenv))
2321 (define-public python-markupsafe
2323 (name "python-markupsafe")
2329 "https://pypi.python.org/packages/source/M/MarkupSafe/MarkupSafe-"
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")
2338 "Markupsafe provides an XML/HTML/XHTML markup safe string implementation
2340 (license license:bsd-3)))
2342 (define-public python2-markupsafe
2343 (package-with-python2 python-markupsafe))
2345 (define-public python-jinja2
2347 (name "python-jinja2")
2352 (uri (pypi-uri "Jinja2" version))
2355 "1zzrkywhziqffrzks14kzixz7nd4yh2vc0fb04a68vfd2ai03anx"))))
2356 (build-system python-build-system)
2358 `(("python-markupsafe" ,python-markupsafe)))
2359 (home-page "http://jinja.pocoo.org/")
2360 (synopsis "Python template engine")
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)))
2366 (define-public python2-jinja2
2367 (package-with-python2 python-jinja2))
2369 (define-public python-pystache
2371 (name "python-pystache")
2375 (uri (pypi-uri "pystache" version))
2378 "0nmqsfmiw4arjxqkmf9z66ml950pcdjk6aq4gin4sywmzdjw5fzp"))))
2379 (build-system python-build-system)
2381 '(#:tests? #f)) ; FIXME: Python 3 tests are failing.
2382 (home-page "http://defunkt.io/pystache/")
2383 (synopsis "Python logic-less template engine")
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))))))
2390 (define-public python2-pystache
2391 (package (inherit (package-with-python2
2392 (strip-python2-variant python-pystache)))
2394 `(#:python ,python-2
2396 (modify-phases %standard-phases
2399 (zero? (system* "python" "test_pystache.py")))))))))
2401 (define-public python-joblib
2403 (name "python-joblib")
2407 (uri (pypi-uri "joblib" version))
2410 "0612nazad8dxmn3xghfrmjax6456l4xy6hn9cngs7vydi14ds7v5"))))
2411 (build-system python-build-system)
2414 (modify-phases %standard-phases
2416 (lambda _ (invoke "pytest" "-v" "joblib"))))))
2418 `(("python-pytest" ,python-pytest)))
2419 (home-page "https://joblib.readthedocs.io/")
2420 (synopsis "Using Python functions as pipeline jobs")
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)))
2428 (define-public python2-joblib
2429 (package-with-python2 python-joblib))
2431 (define-public python-docutils
2433 (name "python-docutils")
2438 (uri (pypi-uri "docutils" version))
2441 "0x22fs3pdmr42kvz6c654756wja305qv6cx1zbhwlagvxgr4xrji"))))
2442 (build-system python-build-system)
2444 '(#:tests? #f)) ; no setup.py test command
2445 (home-page "http://docutils.sourceforge.net/")
2446 (synopsis "Python Documentation Utilities")
2448 "Docutils is a modular system for processing documentation into useful
2449 formats, such as HTML, XML, and LaTeX. For input Docutils supports
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+))))
2455 (define-public python2-docutils
2456 (package-with-python2 python-docutils))
2458 (define-public python-pygments
2460 (name "python-pygments")
2465 (uri (pypi-uri "Pygments" version))
2468 "1k78qdvir1yb1c634nkv6rbga8wv4289xarghmsbbvzhvr311bnv"))))
2469 (build-system python-build-system)
2471 ;; FIXME: Tests require sphinx, which depends on this.
2473 (home-page "http://pygments.org/")
2474 (synopsis "Syntax highlighting")
2476 "Pygments is a syntax highlighting package written in Python.")
2477 (license license:bsd-2)))
2479 (define-public python2-pygments
2480 (package-with-python2 python-pygments))
2482 (define-public python-sphinxcontrib-websupport
2484 (name "python-sphinxcontrib-websupport")
2488 (uri (pypi-uri "sphinxcontrib-websupport" version))
2491 "1f9f0wjpi9nhikbyaz6d19s7qvzdf1nq2g5dsh640fma4q9rd1bs"))))
2492 (build-system python-build-system)
2494 `(("python-mock" ,python-mock)
2495 ("python-pytest" ,python-pytest)
2496 ("python-xapian-bindings" ,python-xapian-bindings)))
2497 ;; Needed for running the test suite
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)))
2512 (define-public python-sphinx
2514 (name "python-sphinx")
2519 (uri (pypi-uri "Sphinx" version))
2522 "1i8p9idnli4gr0y4x67yakbdk5w6a0xjzhrg6bg51y9d1fi7fslf"))))
2523 (build-system python-build-system)
2526 (modify-phases %standard-phases
2529 ;; Requires Internet access.
2530 (delete-file "tests/test_build_linkcheck.py")
2531 (zero? (system* "make" "test")))))))
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)))
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
2553 (license license:bsd-3)
2554 (properties `((python2-variant . ,(delay python2-sphinx))))))
2556 (define-public python-sphinx-1.6
2557 (package (inherit python-sphinx)
2558 (name "python-sphinx")
2562 (uri (pypi-uri "Sphinx" version))
2565 "0gjakw9fv5pwqb5yyclxycs36sapxizk1vx6mkcdizmzgzcfy0gi"))))
2568 (modify-phases %standard-phases
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")))))))
2578 `(("python-sphinxcontrib-websupport" ,python-sphinxcontrib-websupport)
2579 ,@(package-propagated-inputs python-sphinx)))
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))))))
2586 (define-public python2-sphinx-1.6
2587 (let ((base (package-with-python2 (strip-python2-variant python-sphinx-1.6))))
2591 `(("python2-typing" ,python2-typing)
2592 ,@(package-propagated-inputs base)))
2593 (native-inputs `(("python2-enum34" ,python2-enum34)
2594 ,@(package-native-inputs base))))))
2596 (define-public python-sphinx-1.5.3
2598 (inherit python-sphinx)
2599 (name "python-sphinx")
2604 (uri (pypi-uri "Sphinx" version))
2607 "0kw1axswbvaavr8ggyf4qr6hnisnrzlbkkcdada69vk1x9xjassg"))))
2609 `(("python-pytest" ,python-pytest)
2610 ,@(package-native-inputs python-sphinx)))))
2612 (define-public python2-sphinx
2613 (let ((base (package-with-python2 (strip-python2-variant python-sphinx))))
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))))))
2622 (define-public python-sphinx-gallery
2624 (name "python-sphinx-gallery")
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"))
2633 "03fs99mcb1r7qp0xixqv07vcz98sk21yq19ffdysi0infdcpzfkd"))))
2634 (build-system python-build-system)
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>.
2641 `(("python-pytest-runner" ,python-pytest-runner)))
2642 (home-page "https://sphinx-gallery.github.io/")
2643 (synopsis "Generate an examples gallery automatically")
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)))
2649 (define-public python2-sphinx-gallery
2650 (package-with-python2 python-sphinx-gallery))
2652 (define-public python-sphinx-rtd-theme
2654 (name "python-sphinx-rtd-theme")
2659 (uri (pypi-uri "sphinx_rtd_theme" version))
2662 "05rlhjzdyapr2w74jjs7mrm8hi69qskcr5vya9f9drpsys7lpxrd"))))
2663 (build-system python-build-system)
2664 (arguments '(#:tests? #f)) ; No tests.
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)))
2672 (define-public python2-sphinx-rtd-theme
2673 (package-with-python2 python-sphinx-rtd-theme))
2675 (define-public python-guzzle-sphinx-theme
2677 (name "python-guzzle-sphinx-theme")
2682 (uri (pypi-uri "guzzle_sphinx_theme" version))
2685 "1rnkzrrsbnifn3vsb4pfaia3nlvgvw6ndpxp7lzjrh23qcwid34v"))))
2686 (build-system python-build-system)
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)))
2696 (define-public python2-guzzle-sphinx-theme
2697 (package-with-python2 python-guzzle-sphinx-theme))
2699 (define-public python-rst.linker
2701 (name "python-rst.linker")
2706 (uri (pypi-uri "rst.linker" version))
2709 "0iqaacp7pj1s8avs4kc0qg0r7dscywaq37y6l9j14glqdikk0wdj"))))
2710 (build-system python-build-system)
2712 `(("python-dateutil" ,python-dateutil)
2713 ("python-six" ,python-six)))
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)))
2726 (define-public python2-rst.linker
2727 (package-with-python2 python-rst.linker))
2729 (define-public python-feedgenerator
2731 (name "python-feedgenerator")
2736 (uri (pypi-uri "feedgenerator" version))
2739 "01mirwkm7xfx539hmvj7g9da1j51gw5lsx74dr0glizskjm5vq2s"))
2740 (modules '((guix build utils)))
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$"))
2748 (build-system python-build-system)
2750 `(("python-pytz" ,python-pytz)
2751 ("python-six" ,python-six)))
2752 (home-page "https://github.com/getpelican/feedgenerator")
2754 "Standalone version of Django's Atom/RSS feed generator")
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)))
2760 (define-public python2-feedgenerator
2761 (package-with-python2 python-feedgenerator))
2763 (define-public python-toml
2765 (name "python-toml")
2770 (uri (pypi-uri "toml" version))
2773 "0bdbpbip67wdm6c7xwc6mmbmskyradj4cdxn1iibj4fcx1nbv1lf"))))
2774 (build-system python-build-system)
2776 `(#:tests? #f)) ;no tests suite in release
2777 (home-page "https://github.com/uiri/toml")
2778 (synopsis "Library for TOML")
2780 "@code{toml} is a library for parsing and creating Tom's Obvious, Minimal
2781 Language (TOML) configuration files.")
2782 (license license:expat)))
2784 (define-public python-black
2786 (name "python-black")
2791 (uri (pypi-uri "black" version))
2794 "0i4sfqgz6w15vd50kbhi7g7rifgqlf8yfr8y78rypd56q64qn592"))))
2795 (build-system python-build-system)
2798 (modify-phases %standard-phases
2799 (add-after 'patch-source-shebangs 'patch-extra-shebangs
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)
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)))
2819 (define-public python-blinker
2821 (name "python-blinker")
2826 (uri (pypi-uri "blinker" version))
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")
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)))
2838 (define-public python2-blinker
2839 (package-with-python2 python-blinker))
2841 (define-public pelican
2848 (uri (pypi-uri "pelican" version))
2851 "12spygavv9b6xpb5pgp7f0p3z0mms60nx6zrpx1yfkj68zz4flra"))))
2852 (build-system python-build-system)
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/")
2866 `(;; XXX Requires a lot more packages to do unit tests :P
2868 #:phases (modify-phases %standard-phases
2870 'install 'adjust-requires
2871 ;; Since feedgenerator is installed from git, it doesn't
2872 ;; conform to the version requirements.
2874 ;; We *do have* "feedgenerator >= 1.6", but strip off the
2875 ;; version requirement so setuptools doesn't get confused.
2877 (substitute* "setup.py"
2878 (("['\"]feedgenerator.*?['\"]")
2879 "'feedgenerator'")))))))
2880 (synopsis "Python-based static site publishing system")
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+)))
2887 (define-public python-scikit-image
2889 (name "python-scikit-image")
2895 "https://pypi.python.org/packages/source/s/scikit-image/scikit-image-"
2898 (base32 "0jz416fqvpahqyffw8plmszzfj669w8wvf3y9clnr5lr6a7md3kn"))))
2899 (build-system python-build-system)
2901 ;; TODO: Some tests require running X11 server. Disable them?
2903 ;; See DEPENDS.txt for the list of build and run time requiremnts
2905 `(("python-matplotlib" ,python-matplotlib)
2906 ("python-networkx" ,python-networkx)
2907 ("python-scipy" ,python-scipy)
2908 ("python-pillow" ,python-pillow)))
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")
2916 "Scikit-image is a collection of algorithms for image processing.")
2917 (license license:bsd-3)))
2919 (define-public python2-scikit-image
2920 (package-with-python2 python-scikit-image))
2922 (define-public python-cython
2924 (name "python-cython")
2929 (uri (pypi-uri "Cython" version))
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
2937 `(("python" ,python)))
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))
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: ===
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
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)))))
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))))))
2972 (define-public python2-cython
2973 (package (inherit (package-with-python2
2974 (strip-python2-variant python-cython)))
2975 (name "python2-cython")
2977 `(("python-2" ,python-2))))) ; this is not automatically changed
2979 ;; The RPython toolchain currently does not support Python 3.
2980 (define-public python2-rpython
2982 (name "python2-rpython")
2987 (uri (pypi-uri "rpython" version))
2990 "02z9cvxf0y41dcvwnvf2zn0albhhw1drvjjbq27m6i1piw1k6fc0"))))
2991 (build-system python-build-system)
2992 (arguments `(#:python ,python-2))
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)))
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
3006 (name "python-numpy")
3012 "https://github.com/numpy/numpy/releases/download/v"
3013 version "/numpy-" version ".tar.gz"))
3016 "1k426vnmmd4pds09zgn75g6w92823ry75zrzwjhzjvg7s63ipc31"))))
3017 (build-system python-build-system)
3019 `(("openblas" ,openblas)
3020 ("lapack" ,lapack)))
3022 `(("python-cython" ,python-cython)
3023 ("python-nose" ,python-nose)
3024 ("gfortran" ,gfortran)))
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"
3034 libraries = openblas
3035 library_dirs = ~a/lib
3036 include_dirs = ~a/include
3038 # backslash-n to make emacs happy
3040 lapack_libs = lapack
3041 library_dirs = ~a/lib
3042 include_dirs = ~a/include
3044 (assoc-ref inputs "openblas")
3045 (assoc-ref inputs "openblas")
3046 (assoc-ref inputs "lapack")
3047 (assoc-ref inputs "lapack"))))
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')"))
3061 ;; Tests can only be run after the library has been installed and not
3062 ;; within the source directory.
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
3078 (license license:bsd-3)))
3080 (define-public python2-numpy
3081 (package-with-python2 python-numpy))
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
3086 (define-public python2-numpy-1.8
3087 (package (inherit python2-numpy)
3093 "https://github.com/numpy/numpy/archive/v" version ".tar.gz"))
3094 (file-name (string-append "python2-numpy-" version ".tar.gz"))
3097 "0sc20gz1b17xnyrkp5frca3ql5qfalpv916hfg2kqxpwr6jg0f1g"))))
3099 (substitute-keyword-arguments (package-arguments python2-numpy)
3101 `(modify-phases ,phases
3102 (replace 'configure-blas-lapack
3103 (lambda* (#:key inputs #:allow-other-keys)
3104 (call-with-output-file "site.cfg"
3108 libraries = openblas,lapack
3109 library_dirs = ~a/lib:~a/lib
3110 include_dirs = ~a/include:~a/include
3112 (assoc-ref inputs "openblas")
3113 (assoc-ref inputs "lapack")
3114 (assoc-ref inputs "openblas")
3115 (assoc-ref inputs "lapack"))))
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
3124 (license license:bsd-3)))
3126 (define-public python-munch
3128 (name "python-munch")
3133 (uri (pypi-uri "munch" version))
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
3142 (license license:expat)))
3144 (define-public python2-munch
3145 (package-with-python2 python-munch))
3147 (define-public python-colormath
3149 (name "python-colormath")
3154 (uri (pypi-uri "colormath" version))
3157 "05qjycgxp3p2f9n6lmic68sxmsyvgnnlyl4z9w7dl9s56jphaiix"))))
3158 (build-system python-build-system)
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")
3165 "This is a Python library for color math and conversions.")
3166 (license license:bsd-3)))
3168 (define-public python2-colormath
3169 (package-with-python2 python-colormath))
3171 (define-public python-spectra
3173 (name "python-spectra")
3178 (uri (pypi-uri "spectra" version))
3181 "1f322x914bhkg6r5gv1vmnir3iy0k5kih0fd2gp3rdkw32jn5cwf"))))
3182 (build-system python-build-system)
3185 (modify-phases %standard-phases
3188 (zero? (system* "nosetests" "-v")))))))
3190 `(("python-colormath" ,python-colormath)))
3192 `(("python-nose" ,python-nose)))
3193 (home-page "https://github.com/jsvine/spectra")
3194 (synopsis "Color scales and color conversion")
3196 "This package provides a Python library intended to make color math,
3197 color scales, and color space conversion easy. It has support for:
3202 @item Color blending
3203 @item Brightening/darkening colors
3204 @item Saturating/desaturating colors
3205 @item Conversion to/from multiple color spaces.
3207 (license license:expat)))
3209 (define-public python2-spectra
3210 (package-with-python2 python-spectra))
3212 (define-public python2-fastlmm
3214 (name "python2-fastlmm")
3219 (uri (pypi-uri "fastlmm" version ".zip"))
3222 "1q8c34rpmwkfy3r4d5172pzdkpfryj561897z9r3x22gq7813x1m"))))
3223 (build-system python-build-system)
3225 `(#:python ,python-2)) ; only Python 2.7 is supported
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)))
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")
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)))
3246 (define-public python-numpy-documentation
3248 (name "python-numpy-documentation")
3249 (version (package-version python-numpy))
3250 (source (package-source python-numpy))
3251 (build-system python-build-system)
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
3260 texlive-generic-ifxetex
3261 texlive-generic-pdftex
3262 texlive-latex-amsfonts
3263 texlive-latex-capt-of
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
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
3287 texlive-latex-upquote
3289 texlive-latex-varwidth
3290 texlive-latex-wrapfig)))
3291 ("texinfo" ,texinfo)
3293 ("scipy-sphinx-theme"
3294 ,(origin ; The build script expects scipy-sphinx-theme as a git submodule
3297 (url "https://github.com/scipy/scipy-sphinx-theme.git")
3298 (commit "c466764e2231ba132c09826b5b138fffa1cfcec3")))
3301 "0q2y87clwlsgc7wvlsn9pzyssybcq10plwhq2w1ydykfsyyqbmkl"))))
3302 ,@(package-native-inputs python-numpy)))
3304 `(#:tests? #f ; we're only generating the documentation
3306 (modify-phases %standard-phases
3309 (lambda* (#:key inputs outputs #:allow-other-keys)
3310 (let* ((data (string-append (assoc-ref outputs "out") "/share"))
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=")))
3320 ;; FIXME: this is needed to for texlive-union to generate
3321 ;; fonts, which are not found.
3322 (setenv "HOME" "/tmp")
3324 (with-directory-excursion "doc"
3325 (copy-recursively sphinx-theme-checkout scipy-sphinx-theme)
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)
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)
3346 (install-file file html)))
3347 (find-files "." ".*")))))
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))))
3354 (define-public python2-numpy-documentation
3355 (let ((numpy-documentation (package-with-python2 python-numpy-documentation)))
3357 (inherit numpy-documentation)
3358 (native-inputs `(("python2-functools32" ,python2-functools32)
3359 ,@(package-native-inputs numpy-documentation))))))
3361 (define-public python-pygit2
3363 (name "python-pygit2")
3368 (uri (pypi-uri "pygit2" version))
3371 "145k3fsd21274swia7mcc7n3kzlbd47xmg55mxsjdb5d9b7fr858"))))
3372 (build-system python-build-system)
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)))
3385 (define-public python2-pygit2
3386 (package-with-python2 python-pygit2))
3388 (define-public python-pyparsing
3390 (name "python-pyparsing")
3395 (uri (pypi-uri "pyparsing" version))
3397 (base32 "06dgd0iilvf8m0ssmfpcbh8l6jf0zkp8adbb84llksg17crfx4zl"))))
3398 (build-system python-build-system)
3399 (outputs '("out" "doc"))
3401 `(#:tests? #f ; no test target
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")))
3415 (install-file file tgt))
3416 (find-files dir ".*")))
3417 (list "docs" "htmldoc" "examples")
3418 (list doc html-doc examples))
3420 (home-page "https://github.com/pyparsing/pyparsing")
3421 (synopsis "Python parsing class library")
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)))
3429 (define-public python2-pyparsing
3430 (package-with-python2 python-pyparsing))
3432 (define-public python-numpydoc
3434 (name "python-numpydoc")
3440 "https://pypi.python.org/packages/source/n/numpydoc/numpydoc-"
3444 "0d4dnifaxkll50jx6czj05y8cb4ny60njd2wz299sj2jxfy51w4k"))
3445 (modules '((guix build utils)))
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"
3454 (build-system python-build-system)
3456 `(("python-sphinx" ,python-sphinx)))
3458 `(("python-nose" ,python-nose)))
3459 (home-page "https://pypi.python.org/pypi/numpydoc")
3461 "Numpy's Sphinx extensions")
3463 "Sphinx extension to support docstrings in Numpy format.")
3464 (license license:bsd-2)))
3466 (define-public python2-numpydoc
3467 (package-with-python2 python-numpydoc))
3469 (define-public python-numexpr
3471 (name "python-numexpr")
3476 (uri (pypi-uri "numexpr" version))
3479 "1frnbcwmsi312154x274xl28xazr1k8vjby83fwyla2n10a81bgq"))))
3480 (build-system python-build-system)
3481 (arguments `(#:tests? #f)) ; no tests included
3483 `(("python-numpy" ,python-numpy)))
3484 (home-page "https://github.com/pydata/numexpr")
3485 (synopsis "Fast numerical expression evaluator for NumPy")
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)))
3495 (define-public python2-numexpr
3496 (package-with-python2 python-numexpr))
3498 (define-public python-cycler
3500 (name "python-cycler")
3504 (uri (pypi-uri "cycler" version))
3507 "1n69n23fak1gjxlrbhqisi2b9pv3ckrfj98llx3p53953082syyd"))))
3508 (build-system python-build-system)
3510 ;; XXX: The current version requires 'coveralls' which we don't have.
3511 ;; Enable this for the next release which uses 'python-pytest'.
3514 `(("python-six" ,python-six)))
3515 (home-page "http://matplotlib.org/cycler/")
3516 (synopsis "Composable keyword argument iterator")
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)))
3525 (define-public python2-cycler
3526 (package-with-python2 python-cycler))
3528 (define-public python-colorspacious
3530 (name "python-colorspacious")
3535 (uri (string-append "https://github.com/njsmith/colorspacious/archive/v"
3537 (file-name (string-append name "-" version))
3539 (base32 "1vflh5jm32qb0skza2i8pjacv09w6gq84fqpp2nj77s0rbmzgr4k"))))
3540 (build-system python-build-system)
3542 `(("python-numpy" ,python-numpy)))
3544 `(("python-nose" ,python-nose)))
3547 (modify-phases %standard-phases
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)))
3557 (define-public python2-colorspacious
3558 (package-with-python2 python-colorspacious))
3560 (define-public python-matplotlib
3562 (name "python-matplotlib")
3567 (uri (pypi-uri "matplotlib" version))
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:
3591 ;; export GI_TYPELIB_PATH=~/.guix-profile/lib/girepository-1.0
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)))
3602 `(("libpng" ,libpng)
3603 ("imagemagick" ,imagemagick)
3604 ("freetype" ,freetype)
3607 ;; FIXME: Add backends when available.
3608 ;("python-wxpython" ,python-wxpython)
3612 `(("pkg-config" ,pkg-config)
3613 ("python-nose" ,python-nose)
3614 ("python-mock" ,python-mock)))
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'
3624 (setenv "LD_LIBRARY_PATH"
3625 (string-append cairo "/lib:" gtk+ "/lib"))
3626 (setenv "HOME" (getcwd))
3627 (call-with-output-file "setup.cfg"
3629 (format port "[directories]~%
3630 basedirlist = ~a,~a~%
3633 (assoc-ref inputs "tcl")
3634 (assoc-ref inputs "tk")))))
3636 (home-page "http://matplotlib.org")
3637 (synopsis "2D plotting library for Python")
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
3644 (license license:psfl)
3645 (properties `((python2-variant . ,(delay python2-matplotlib))))))
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.
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")))))))
3664 (define-public python-matplotlib-documentation
3666 (name "python-matplotlib-documentation")
3667 (version (package-version python-matplotlib))
3668 (source (package-source python-matplotlib))
3669 (build-system python-build-system)
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)))
3683 `(#:tests? #f ; we're only generating documentation
3685 (modify-phases %standard-phases
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
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")))
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")))
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")))
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))))
3727 (define-public python2-matplotlib-documentation
3728 (package-with-python2 python-matplotlib-documentation))
3730 (define-public python2-pysnptools
3732 (name "python2-pysnptools")
3737 (uri (pypi-uri "pysnptools" version ".zip"))
3740 "1wybggjzz8zw7aav4pjsg2h22xp17a1lghrprza1pxwlm7wf96y2"))))
3741 (build-system python-build-system)
3743 `(#:python ,python-2)) ; only Python 2.7 is supported
3745 `(("python2-numpy" ,python2-numpy)
3746 ("python2-scipy" ,python2-scipy)
3747 ("python2-pandas" ,python2-pandas)))
3749 `(("python2-cython" ,python2-cython)))
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")
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)))
3761 (define-public python-rpy2
3763 (name "python-rpy2")
3768 (uri (pypi-uri "rpy2" version))
3771 "0bl1d2qhavmlrvalir9hmkjh74w21vzkvc2sg3cbb162s10zfmxy"))))
3772 (build-system python-build-system)
3774 '(#:modules ((ice-9 ftw)
3778 (guix build python-build-system))
3780 (modify-phases %standard-phases
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")))
3789 (getenv "PYTHONPATH"))))
3790 (invoke "python" "-m" "rpy2.tests" "-v"))))))
3792 `(("python-six" ,python-six)
3793 ("python-jinja2" ,python-jinja2)
3794 ("python-pytz" ,python-pytz)))
3796 `(("readline" ,readline)
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)))
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
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
3817 (license (list license:mpl2.0 license:gpl2+ license:lgpl2.1+))))
3819 (define-public python-scipy
3821 (name "python-scipy")
3826 (uri (pypi-uri "scipy" version))
3829 "1fj0r7bg0cfk5clvl57ga06y9bfh05iwlv1dqqs1r6pd89wccfc7"))))
3830 (build-system python-build-system)
3832 `(("python-numpy" ,python-numpy)
3833 ("python-matplotlib" ,python-matplotlib)
3834 ("python-pyparsing" ,python-pyparsing)))
3836 `(("lapack" ,lapack)
3837 ("openblas" ,openblas)))
3839 `(("python-cython" ,python-cython)
3840 ("python-pytest" ,python-pytest)
3841 ("python-sphinx" ,python-sphinx)
3842 ("python-numpydoc" ,python-numpydoc)
3843 ("gfortran" ,gfortran)
3846 (outputs '("out" "doc"))
3849 (modify-phases %standard-phases
3850 (add-after 'unpack 'disable-broken-tests
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"
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"
3862 (add-before 'build 'configure-openblas
3863 (lambda* (#:key inputs #:allow-other-keys)
3864 (call-with-output-file "site.cfg"
3868 libraries = openblas
3869 library_dirs = ~a/lib
3870 include_dirs = ~a/include
3872 # backslash-n to make emacs happy
3874 library_dirs = ~a/lib
3875 atlas_libs = openblas
3877 (assoc-ref inputs "openblas")
3878 (assoc-ref inputs "openblas")
3879 (assoc-ref inputs "openblas"))))
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
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"))
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 "." ".*")))))
3908 ;; Tests can only be run after the library has been installed and not
3909 ;; within the source directory.
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)))
3925 (define-public python2-scipy
3926 (package-with-python2
3927 (strip-python2-variant python-scipy)))
3929 (define-public python-socksipy-branch
3931 (name "python-socksipy-branch")
3936 (uri (pypi-uri "SocksiPy-branch" version))
3939 "01l41v4g7fy9fzvinmjxy6zcbhgqaif8dhdqm4w90fwcw9h51a8p"))))
3940 (build-system python-build-system)
3942 `(#:tests? #f)) ; There are no tests
3943 (home-page "https://code.google.com/archive/p/socksipy-branch/")
3944 (synopsis "Python SOCKS module")
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)))
3954 (define-public python2-socksipy-branch
3955 (package-with-python2 python-socksipy-branch))
3957 (define-public python-pycodestyle
3959 (name "python-pycodestyle")
3964 (uri (pypi-uri "pycodestyle" version))
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)))
3976 (define-public python2-pycodestyle
3977 (package-with-python2 python-pycodestyle))
3979 (define-public python-multidict
3981 (name "python-multidict")
3986 (uri (pypi-uri "multidict" version))
3989 "1vf5bq8hn5a9rvhr5v4fwbmarfsp35hhr8gs74kqfijy34j2f194"))))
3990 (build-system python-build-system)
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)))
4000 (define-public python-orderedmultidict
4002 (name "python-orderedmultidict")
4007 (uri (pypi-uri "orderedmultidict" version))
4010 "0dls862ibm7qbq4fnvwx0xn1v9hwyzywbff8xjjdr42dd75208yw"))))
4011 (build-system python-build-system)
4014 (modify-phases %standard-phases
4015 (add-after 'unpack 'fix-tests
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")))))))
4022 `(("python-six" ,python-six)))
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)))
4033 (define-public python2-orderedmultidict
4034 (package-with-python2 python-orderedmultidict))
4036 (define-public python-autopep8
4038 (name "python-autopep8")
4043 (uri (pypi-uri "autopep8" version))
4046 "192bvhzi4d0claqxgzymvv7k3qnj627742bc8sgxpzjj42pd9112"))))
4047 (build-system python-build-system)
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")
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
4058 (license (license:non-copyleft
4059 "https://github.com/hhatto/autopep8/blob/master/LICENSE"))))
4061 (define-public python2-autopep8
4062 (package-with-python2 python-autopep8))
4064 (define-public python-distutils-extra
4066 (name "python-distutils-extra")
4071 (uri (string-append "https://launchpad.net/python-distutils-extra/trunk/"
4072 version "/+download/python-distutils-extra-"
4076 "0lx15kcbby9zisx33p2h5hgakgwh2bvh0ibag8z0px4j6ifhs41x"))))
4077 (build-system python-build-system)
4078 (home-page "https://launchpad.net/python-distutils-extra/")
4079 (synopsis "Enhancements to Python's distutils")
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)))
4086 (define-public python2-distutils-extra
4087 (package-with-python2 python-distutils-extra))
4089 (define-public python2-elib.intl
4091 (name "python2-elib.intl")
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.
4099 (url "https://github.com/dieterv/elib.intl.git")
4100 (commit "d09997cfef")))
4101 (file-name (string-append name "-" version "-checkout"))
4104 "0y7vzff9xgbnaay7m0va1arl6g68ncwrvbgwl7jqlclsahzzb09d"))))
4105 (build-system python-build-system)
4107 ;; incompatible with Python 3 (exception syntax)
4108 `(#:python ,python-2
4110 (home-page "https://github.com/dieterv/elib.intl")
4111 (synopsis "Enhanced internationalization for Python")
4113 "The elib.intl module provides enhanced internationalization (I18N)
4114 services for your Python modules and applications.")
4115 (license license:lgpl3+)))
4117 (define-public python-olefile
4119 (name "python-olefile")
4124 (uri (string-append "https://github.com/decalage2/olefile/archive/v"
4126 (file-name (string-append name "-" version ".tar.gz"))
4129 "1wmxbrhyqjry2000zx0zdhqdqxhgi06nz7sbzjlh222q2zjv1gpj"))))
4130 (build-system python-build-system)
4132 "https://www.decalage.info/python/olefileio")
4133 (synopsis "Read and write Microsoft OLE2 files.")
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)))
4140 (define-public python2-olefile
4141 (package-with-python2 python-olefile))
4143 (define-public python-pillow
4145 (name "python-pillow")
4150 (uri (pypi-uri "Pillow" version))
4153 "09xmn7rl6840sli2iz1k3fgxfgmri2nqz6vkinmb9mgg8ifp2z59"))
4154 (patch-flags '("-p1" "--binary"))
4155 (patches (search-patches "python-pillow-fix-failing-tests.patch"))))
4156 (build-system python-build-system)
4158 `(("python-nose" ,python-nose)))
4160 `(("freetype" ,freetype)
4163 ("libjpeg" ,libjpeg)
4164 ("openjpeg" ,openjpeg)
4165 ("libtiff" ,libtiff)
4166 ("libwebp" ,libwebp)))
4168 `(("python-olefile" ,python-olefile)))
4170 `(#:phases (modify-phases %standard-phases
4172 'install 'check-installed
4173 (lambda* (#:key outputs inputs #:allow-other-keys)
4175 (setenv "HOME" (getcwd))
4176 ;; Make installed package available for running the
4178 (add-installed-pythonpath inputs outputs)
4179 (and (zero? (system* "python" "selftest.py"
4181 (zero? (system* "python" "test-installed.py"))))))
4183 (home-page "https://pypi.python.org/pypi/Pillow")
4184 (synopsis "Fork of the Python Imaging Library")
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"))))
4196 (define-public python2-pillow
4197 (package-with-python2 python-pillow))
4199 (define-public python-pycparser
4201 (name "python-pycparser")
4206 (uri (pypi-uri "pycparser" version))
4209 "1dkkjri0miidqb1zcqhqljfa34fcy9k5akasgwsv6k622zlk3b0a"))))
4210 (outputs '("out" "doc"))
4211 (build-system python-build-system)
4213 `(("pkg-config" ,pkg-config)))
4216 (modify-phases %standard-phases
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")))
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")
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)))
4240 (define-public python2-pycparser
4241 (package-with-python2 python-pycparser))
4243 (define-public python-xcffib
4245 (name "python-xcffib")
4250 (uri (pypi-uri "xcffib" version))
4253 "09gbnmr5vn58mm8xi3fmd7fz6743cks6c46dphnxzwax6zsxmy60"))))
4254 (build-system python-build-system)
4256 `(("libxcb" ,libxcb)))
4258 `(("python-cffi" ,python-cffi) ; used at run time
4259 ("python-six" ,python-six)))
4261 `(;; FIXME: Tests need more work. See ".travis.yml" in the repository.
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/")))
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)))
4276 (copy-file "README.md"
4277 (string-append doc "/README.md"))
4279 (home-page "https://github.com/tych0/xcffib")
4280 (synopsis "XCB Python bindings")
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)))
4286 (define-public python2-xcffib
4287 (package-with-python2 python-xcffib))
4289 (define-public python-cairocffi
4291 (name "python-cairocffi")
4296 ;; The archive on pypi is missing the 'utils' directory!
4297 (uri (string-append "https://github.com/Kozea/cairocffi/archive/v"
4299 (file-name (string-append name "-" version ".tar.gz"))
4302 "1rk2dvy3fxrga6bvvxc2fi5lbaynm5h4a0w0aaxyn3bc77rszjg9"))
4303 (patches (search-patches "python-cairocffi-dlopen-path.patch"))))
4304 (build-system python-build-system)
4305 (outputs '("out" "doc"))
4309 ("gdk-pixbuf" ,gdk-pixbuf)
4313 `(("pkg-config" ,pkg-config)
4314 ("python-pytest" ,python-pytest)
4315 ("python-sphinx" ,python-sphinx)
4316 ("python-docutils" ,python-docutils)))
4318 `(("python-xcffib" ,python-xcffib))) ; used at run time
4320 `(;; FIXME: Tests cannot find 'libcairo.so.2'.
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'")))
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")
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)
4366 (home-page "https://github.com/Kozea/cairocffi")
4367 (synopsis "Python bindings and object-oriented API for Cairo")
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)))
4375 (define-public python2-cairocffi
4376 (package-with-python2 python-cairocffi))
4378 (define-public python-decorator
4380 (name "python-decorator")
4385 (uri (pypi-uri "decorator" version))
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")
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)))
4398 (define-public python2-decorator
4399 (package-with-python2 python-decorator))
4401 (define-public python-drmaa
4403 (name "python-drmaa")
4408 (uri (pypi-uri "drmaa" version))
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))
4417 `(("python-nose" ,python-nose)))
4418 (home-page "https://pypi.python.org/pypi/drmaa")
4419 (synopsis "Python bindings for the DRMAA library")
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)))
4426 (define-public python2-drmaa
4427 (package-with-python2 python-drmaa))
4429 (define-public python-grako
4431 (name "python-grako")
4437 (pypi-uri "grako" version ".zip"))
4440 "0r63i68wcnv63rfjkasq1ah81frz61a6mzbcnaxhrkdpx84p7hzw"))))
4441 (build-system python-build-system)
4442 (arguments '(#:tests? #f)) ; Test file 'grako.ebnf' is missing from archive.
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")
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)))
4454 (define-public python2-grako
4455 (package-with-python2 python-grako))
4457 (define-public python-gridmap
4459 (name "python-gridmap")
4465 "https://github.com/pygridtools/gridmap/archive/v"
4467 (file-name (string-append name "-" version ".tar.gz"))
4469 (base32 "1gzjg2k6f14i1msm2b0ax8d9ds1hvk6qd5nlaivg8m4cxqp4cp1x"))))
4470 (build-system python-build-system)
4472 '(#:tests? #f)) ; FIXME: Requires python-cherrypy.
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")
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+)))
4485 (define-public python2-gridmap
4486 (package-with-python2 python-gridmap))
4488 (define-public python-honcho
4490 (name "python-honcho")
4496 "https://github.com/nickstenning/honcho/archive/v"
4498 (file-name (string-append name "-" version ".tar.gz"))
4500 (base32 "0zizn61n5z5hq421hkypk9pw8s6fpxw30f4hsg7k4ivwzy3gjw9j"))))
4501 (build-system python-build-system)
4503 `(("python-pytest" ,python-pytest)
4504 ("python-mock" ,python-mock)
4505 ("python-tox" ,python-tox)
4506 ("which" ,which))) ;for tests
4508 `(("python-jinja2" ,python-jinja2)))
4511 (modify-phases %standard-phases
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")
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
4530 (license license:expat)))
4532 (define-public python2-honcho
4533 (package-with-python2 python-honcho))
4535 (define-public python-pexpect
4537 (name "python-pexpect")
4542 (uri (pypi-uri "pexpect" version))
4544 (base32 "14ls7k99pwvl21zqv65kzrhccv50j89m5ij1hf0slmsvlxjj84rx"))))
4545 (build-system python-build-system)
4548 (modify-phases %standard-phases
4549 (add-before 'check 'prepare-tests
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")
4563 (replace 'check (lambda _ (invoke "nosetests" "-v"))))))
4565 `(("python-nose" ,python-nose)
4566 ("python-pytest" ,python-pytest)
4569 ("bash-full" ,bash))) ;full Bash for 'test_replwrap.py'
4571 `(("python-ptyprocess" ,python-ptyprocess)))
4572 (home-page "http://pexpect.readthedocs.org/")
4573 (synopsis "Controlling interactive console applications")
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)))
4581 (define-public python2-pexpect
4582 (package-with-python2 python-pexpect))
4584 (define-public python-setuptools-scm
4586 (name "python-setuptools-scm")
4590 (uri (pypi-uri "setuptools_scm" version))
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")
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)))
4603 (define-public python2-setuptools-scm
4604 (package-with-python2 python-setuptools-scm))
4606 (define-public python-pathpy
4608 (name "python-pathpy")
4613 (uri (pypi-uri "path.py" version))
4615 (base32 "07x15v8c7ry9bvycw294c9yq6ky9v2b0dalvgi6rn38ilh69vsz7"))))
4616 ;; (outputs '("out" "doc"))
4617 (build-system python-build-system)
4619 `(("python-appdirs" ,python-appdirs)))
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)))
4627 ;; FIXME: Documentation and tests require "jaraco.packaging".
4630 ;; (modify-phases %standard-phases
4631 ;; (add-after 'build 'build-doc
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")))
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")
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)))
4652 (define-public python2-pathpy
4653 (package-with-python2 python-pathpy))
4655 (define-public python-simplegeneric
4657 (name "python-simplegeneric")
4662 (uri (string-append "https://pypi.python.org/packages/source/s/"
4663 "simplegeneric/simplegeneric-" version ".zip"))
4665 (base32 "0wwi1c6md4vkbcsfsf8dklf3vr4mcdj4mpxkanwgb6jb1432x5yw"))))
4666 (build-system python-build-system)
4668 `(("unzip" ,unzip)))
4669 (home-page "http://cheeseshop.python.org/pypi/simplegeneric")
4670 (synopsis "Python module for simple generic functions")
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
4678 (license license:zpl2.1)))
4680 (define-public python2-simplegeneric
4681 (package-with-python2 python-simplegeneric))
4683 (define-public python-ipython-genutils
4684 ;; TODO: This package is retired, check if can be removed, see description.
4686 (name "python-ipython-genutils")
4691 (uri (string-append "https://pypi.python.org/packages/source/i/"
4692 "ipython_genutils/ipython_genutils-"
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")
4701 "This package provides retired utilities from IPython. No packages
4702 outside IPython/Jupyter should depend on it.
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
4708 (license license:bsd-3)))
4710 (define-public python2-ipython-genutils
4711 (package-with-python2 python-ipython-genutils))
4713 (define-public python-traitlets
4715 (name "python-traitlets")
4720 (uri (pypi-uri "traitlets" version))
4723 "1afy08sa5n9gnkvh3da49c16zkyv598vchv0p1hp7zzjy8895hz4"))))
4724 (build-system python-build-system)
4727 (modify-phases %standard-phases
4728 (replace 'check (lambda _ (zero? (system* "nosetests")))))))
4730 `(("python-ipython-genutils" ,python-ipython-genutils)
4731 ("python-decorator" ,python-decorator)))
4733 `(("python-mock" ,python-mock)
4734 ("python-nose" ,python-nose)))
4735 (home-page "https://ipython.org")
4736 (synopsis "Configuration system for Python applications")
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)))
4746 (define-public python2-traitlets
4747 (package-with-python2 python-traitlets))
4749 (define-public python-jupyter-core
4751 (name "python-jupyter-core")
4756 (uri (string-append (pypi-uri "jupyter_core" version)))
4759 "1dy083rarba8prn9f9srxq3c7n7vyql02ycrqq306c40lr57aw5s"))))
4760 (build-system python-build-system)
4761 ;; FIXME: not sure how to run the tests
4762 (arguments `(#:tests? #f))
4764 `(("python-traitlets" ,python-traitlets)))
4765 (home-page "http://jupyter.org/")
4766 (synopsis "Jupyter base package")
4768 "Jupyter core is the base package on which Jupyter projects rely.")
4769 (license license:bsd-3)))
4771 (define-public python2-jupyter-core
4772 (package-with-python2 python-jupyter-core))
4774 (define-public python-jupyter-client
4776 (name "python-jupyter-client")
4781 (uri (pypi-uri "jupyter_client" version))
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))
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")
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)))
4803 (define-public python2-jupyter-client
4804 (package-with-python2 python-jupyter-client))
4806 (define-public python-ipykernel
4808 (name "python-ipykernel")
4813 (uri (pypi-uri "ipykernel" version))
4815 (base32 "0qllv0k6zzv1r1cj1x2ygxmlrrqhbslzj8rc6r6fg3kc1rgz4m2s"))))
4816 (build-system python-build-system)
4817 ;; The tests load a submodule of IPython. However, IPython itself depends
4819 (arguments `(#:tests? #f))
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")
4826 "This package provides the IPython kernel for Jupyter.")
4827 (license license:bsd-3)))
4829 (define-public python2-ipykernel
4830 (package-with-python2 python-ipykernel))
4832 (define-public python-ipython
4834 (name "python-ipython")
4839 (uri (pypi-uri "ipython" version ".tar.gz"))
4841 (base32 "03qmzpfy00if10i9k8fjkam1s4xg22j73f933x5d228z9n4rwik6"))))
4842 (build-system python-build-system)
4843 (outputs '("out" "doc"))
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)))
4868 `(("readline" ,readline)
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
4881 texlive-generic-ifxetex
4882 texlive-generic-pdftex
4883 texlive-latex-amsfonts
4884 texlive-latex-capt-of
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
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
4908 texlive-latex-upquote
4910 texlive-latex-varwidth
4911 texlive-latex-wrapfig)))
4912 ("texinfo" ,texinfo)))
4915 (modify-phases %standard-phases
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"))
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.
4948 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
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")
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")
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
4976 (license license:bsd-3)
4977 (properties `((python2-variant . ,(delay python2-ipython))))))
4979 (define-public python2-ipython
4980 (let ((ipython (package-with-python2 (strip-python2-variant python-ipython))))
4983 ;; FIXME: add pyreadline once available.
4985 `(("python2-backports-shutil-get-terminal-size"
4986 ,python2-backports-shutil-get-terminal-size)
4987 ("python2-pathlib2" ,python2-pathlib2)
4988 ,@(package-propagated-inputs ipython)))
4990 `(("python2-mock" ,python2-mock)
4991 ,@(package-native-inputs ipython))))))
4993 (define-public python-urwid
4995 (name "python-urwid")
5000 (uri (pypi-uri "urwid" version))
5003 "1g6cpicybvbananpjikmjk8npmjk4xvak1wjzji62wc600wkwkb4"))))
5004 (build-system python-build-system)
5005 (home-page "http://urwid.org")
5006 (synopsis "Console user interface library for Python")
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+)))
5012 (define-public python2-urwid
5013 (package-with-python2 python-urwid))
5015 (define-public python-urwidtrees
5017 (name "python-urwidtrees")
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/"
5026 (file-name (string-append name "-" version ".tar.gz"))
5029 "0d30lyd3s2a97rhqfax5w9ssqds2z6aydqx3c6j2c2lk3cb4ngvh"))))
5030 (build-system python-build-system)
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+)))
5040 (define-public python2-urwidtrees
5041 (package-with-python2 python-urwidtrees))
5043 (define-public python-ua-parser
5045 (name "python-ua-parser")
5050 (uri (pypi-uri "ua-parser" version))
5053 "1jwdf58rhchjzzrad405pviv0iq24xa2xmmmdgcm2c8s6b4wzfwp"))))
5054 (build-system python-build-system)
5056 `(#:tests? #f)) ;no test suite in release
5058 `(("python-pyyaml" ,python-pyyaml)))
5059 (home-page "https://github.com/ua-parser/uap-python")
5060 (synopsis "User agent parser")
5062 "@code{ua-parser} is a Python port of Browserscope's user agent parser.")
5063 (license license:asl2.0)))
5065 (define-public python2-ua-parser
5066 (package-with-python2 python-ua-parser))
5068 (define-public python-user-agents
5070 (name "python-user-agents")
5075 (uri (pypi-uri "user-agents" version))
5078 "0fc00cd3j8dahq1zzn8pkgfgd7lq37bp2scmdma2n1c049vicgb4"))))
5079 (build-system python-build-system)
5081 `(#:tests? #f)) ;missing devices.json test file in release
5083 `(("python-ua-parser" ,python-ua-parser)))
5084 (home-page "https://github.com/selwin/python-user-agents")
5085 (synopsis "User Agent strings parsing library")
5087 "A library to identify devices (phones, tablets) and their capabilities by
5088 parsing (browser/HTTP) user agent strings.")
5089 (license license:expat)))
5091 (define-public python2-user-agents
5092 (package-with-python2 python-user-agents))
5094 (define-public python-dbus
5096 (name "python-dbus")
5102 "https://dbus.freedesktop.org/releases/dbus-python/dbus-python-"
5105 (base32 "1py62qir966lvdkngg0v8k1khsqxwk5m4s8nflpk1agk5f5nqb71"))))
5106 (build-system gnu-build-system)
5109 (modify-phases %standard-phases
5113 ;; XXX: For the missing '/etc/machine-id'.
5114 (substitute* "test/run-test.sh"
5115 (("DBUS_FATAL_WARNINGS=1")
5116 "DBUS_FATAL_WARNINGS=0"))
5119 `(("pkg-config" ,pkg-config)))
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)))
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)
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))))
5140 (define-public python-lxml
5142 (name "python-lxml")
5147 (uri (pypi-uri "lxml" version))
5150 "15nvf6n285n282682qyw3wihsncb0x5amdhyi4b83bfa2nz74vvk"))))
5151 (build-system python-build-system)
5153 `(("libxml2" ,libxml2)
5154 ("libxslt" ,libxslt)))
5155 (home-page "http://lxml.de/")
5157 "Python XML processing library")
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
5163 (define-public python2-lxml
5164 (package-with-python2 python-lxml))
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
5170 (name "python-beautifulsoup4")
5175 (uri (pypi-uri "beautifulsoup4" version))
5178 "0glaw1vyxnbp03fni7h5496n6iib0n5iim4gax1n0ngscs9s075j"))))
5179 (build-system python-build-system)
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
5189 (lambda _ (zero? (system* "./convert-py3k")))))))
5191 "https://www.crummy.com/software/BeautifulSoup/bs4/")
5193 "Python screen-scraping library")
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))))))
5203 (define-public python2-beautifulsoup4
5205 (inherit (package-with-python2
5206 (strip-python2-variant python-beautifulsoup4)))
5207 (arguments `(#:python ,python-2))))
5209 (define-public python-netifaces
5211 (name "python-netifaces")
5216 (uri (pypi-uri "netifaces" version))
5219 "1gccklrcplbbqh81g1mdgpa5y8na7kkf29cq2ka3f5a2fp5hyndx"))))
5220 (build-system python-build-system)
5221 (home-page "https://github.com/al45tair/netifaces")
5223 "Python module for portable network interface information")
5225 "Netifaces is a Python module providing information on network
5226 interfaces in an easy and portable manner.")
5227 (license license:expat)))
5229 (define-public python2-netifaces
5230 (package-with-python2 python-netifaces))
5232 (define-public python-networkx
5234 (name "python-networkx")
5239 (uri (pypi-uri "networkx" version ".zip"))
5241 (base32 "12swxb15299v9vqjsq4z8rgh5sdhvpx497xwnhpnb0gynrx6zra5"))))
5242 (build-system python-build-system)
5243 ;; python-decorator is needed at runtime.
5245 `(("python-decorator" ,python-decorator)))
5247 `(("python-nose" ,python-nose)
5249 (home-page "https://networkx.github.io/")
5250 (synopsis "Python module for creating and manipulating graphs and networks")
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)))
5256 (define-public python2-networkx
5257 (package-with-python2 python-networkx))
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")
5268 (uri (pypi-uri "networkx" version ".zip"))
5271 "1ajl2jp8qry9nyjzzkqpy0vmsr14d23z1qk7y0vr5iwjbpvzhpyd"))
5273 (search-patches "python-networkx2-reproducible-build.patch"))))))
5275 (define-public python2-networkx2
5276 (package-with-python2 python-networkx2))
5278 (define-public python-datrie
5280 (name "python-datrie")
5285 (uri (pypi-uri "datrie" version))
5288 "08r0if7dry2q7p34gf7ffyrlnf4bdvnprxgydlfxgfnvq8f3f4bs"))))
5289 (build-system python-build-system)
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")
5298 "This package provides a fast, efficiently stored trie implementation for
5300 (license license:lgpl2.1+)))
5302 (define-public snakemake
5309 (uri (pypi-uri "snakemake" version))
5311 (base32 "0gj0xxgiq3mp9qyyrbfzldiaq1giliqw0in64nqiz7vx49myqj7z"))))
5312 (build-system python-build-system)
5314 ;; TODO: Package missing test dependencies.
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")
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")
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)))
5349 ;; This is currently needed for the pigx-* packages.
5350 (define-public snakemake-4
5351 (package (inherit snakemake)
5356 (uri (pypi-uri "snakemake" version))
5358 (base32 "0g0paia4z7w3srnqdmavq3hrb2x7qnpf81jx50njl0p7y4y0j8jv"))))
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)))))
5367 (define-public python-pyqrcode
5369 (name "python-pyqrcode")
5374 (uri (pypi-uri "PyQRCode" version))
5377 "1m9ln8k9v7dfbh1i81225hx5mdsh8mpf9g7r4wpbfmiyfcs7dgzx"))))
5378 (build-system python-build-system)
5380 "https://github.com/mnooner256/pyqrcode")
5381 (synopsis "QR code generator")
5383 "Pyqrcode is a QR code generator written purely in Python with
5384 SVG, EPS, PNG and terminal output.")
5385 (license license:bsd-3)))
5387 (define-public python-seaborn
5389 (name "python-seaborn")
5394 (uri (pypi-uri "seaborn" version))
5396 (base32 "0bqysi3fxfjl1866m5jq8z7mynhqbqnikim74dmzn8539iwkzj3n"))))
5397 (build-system python-build-system)
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")
5409 (replace 'check (lambda _ (invoke "pytest" "seaborn") #t)))))
5411 `(("python-pandas" ,python-pandas)
5412 ("python-matplotlib" ,python-matplotlib)
5413 ("python-numpy" ,python-numpy)
5414 ("python-scipy" ,python-scipy)))
5416 `(("python-pytest" ,python-pytest)
5417 ("xorg-server" ,xorg-server)))
5418 (home-page "http://stanford.edu/~mwaskom/software/seaborn/")
5419 (synopsis "Statistical data visualization")
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)))
5427 (define-public python2-seaborn
5428 (package-with-python2 python-seaborn))
5430 (define-public python-mpmath
5432 (name "python-mpmath")
5436 (uri (string-append "http://mpmath.org/files/mpmath-"
5440 "08ijsr4ifrqv3cjc26mkw0dbvyygsa99in376hr4b96ddm1gdpb8"))))
5441 (build-system python-build-system)
5444 (modify-phases %standard-phases
5448 (system* "python" "mpmath/tests/runtests.py" "-local")))))))
5449 (home-page "http://mpmath.org")
5450 (synopsis "Arbitrary-precision floating-point arithmetic in python")
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)))
5457 (define-public python2-mpmath
5458 (package-with-python2 python-mpmath))
5460 (define-public python-bigfloat
5462 (name "python-bigfloat")
5467 (uri (pypi-uri "bigfloat" version))
5469 (base32 "0xd7q4l7v0f463diznjv4k9wlaks80pn9drdqmfifi7zx8qvybi6"))))
5470 (build-system python-build-system)
5473 (home-page "https://github.com/mdickinson/bigfloat")
5474 (synopsis "Arbitrary precision floating-point arithmetic for Python")
5476 "This packages provides a Python interface to the MPFR library for
5477 multiprecision arithmetic.")
5478 (license license:lgpl3+)))
5480 (define-public python2-bigfloat
5481 (package-with-python2 python-bigfloat))
5483 (define-public python-sympy
5485 (name "python-sympy")
5491 "https://github.com/sympy/sympy/releases/download/sympy-"
5492 version "/sympy-" version ".tar.gz"))
5494 (base32 "190n29sppw7g8ihilc5451y7jlfcaw56crqiqbf1jff43dlmfnxc"))))
5495 (build-system python-build-system)
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
5503 (add-after 'install 'check
5504 (lambda* (#:key outputs #:allow-other-keys)
5505 (invoke "python3" "-c" "import sympy; sympy.test(\"/core\")")
5508 `(("python-mpmath" ,python-mpmath)))
5509 (home-page "http://www.sympy.org/")
5510 (synopsis "Python library for symbolic mathematics")
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)))
5517 (define-public python2-sympy
5519 (inherit (package-with-python2 python-sympy))
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
5527 (add-after 'install 'check
5528 (lambda* (#:key outputs #:allow-other-keys)
5529 (invoke "python" "-c" "import sympy; sympy.test(\"/core\")")
5532 (define-public python-q
5539 (uri (pypi-uri "q" version))
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")
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)))
5552 (define-public python2-q
5553 (package-with-python2 python-q))
5555 (define-public python2-xlib
5557 (name "python2-xlib")
5561 (uri (string-append "mirror://sourceforge/python-xlib/python-xlib"
5563 "python-xlib-" version ".tar.gz"))
5566 "1sv0447j0rx8cgs3jhjl695p5pv13ihglcjlrrz1kq05lsvb0wa7"))))
5567 (build-system python-build-system)
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")
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+)))
5579 (define-public python-singledispatch
5581 (name "python-singledispatch")
5586 (uri (pypi-uri "singledispatch" version))
5589 "171b7ip0hsq5qm83np40h3phlr36ym18w0lay0a8v08kvy3sy1jv"))))
5590 (build-system python-build-system)
5592 `(("python-six" ,python-six))) ; required for conversion, not at run-time
5594 "http://docs.python.org/3/library/functools.html#functools.singledispatch")
5595 (synopsis "Backport of singledispatch feature from Python 3.4")
5597 "This library brings functools.singledispatch from Python 3.4 to Python
5599 (license license:expat)))
5601 (define-public python2-singledispatch
5602 (package-with-python2 python-singledispatch))
5604 ;; the python- version can be removed with python-3.5
5605 (define-public python-backports-abc
5607 (name "python-backports-abc")
5612 (uri (pypi-uri "backports_abc" version))
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")
5620 "Python-backports-abc provides a backport of additions to the
5621 'collections.abc' module in Python-3.5.")
5622 (license license:psfl)))
5624 (define-public python2-backports-abc
5625 (package-with-python2 python-backports-abc))
5627 (define-public python-backports-csv
5629 (name "python-backports-csv")
5634 (uri (pypi-uri "backports.csv" version))
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")
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)))
5649 (define-public python2-backports-csv
5650 (package-with-python2 python-backports-csv))
5652 (define-public python2-backports-shutil-get-terminal-size
5654 (name "python2-backports-shutil-get-terminal-size")
5659 (uri (pypi-uri "backports.shutil_get_terminal_size" version))
5662 "107cmn7g3jnbkp826zlj8rrj19fam301qvaqf0f3905f5217lgki"))))
5663 (build-system python-build-system)
5665 `(#:python ,python-2
5667 (modify-phases %standard-phases
5670 (zero? (system* "py.test" "-v")))))))
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}")
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)))
5682 (define-public python-waf
5688 (uri (string-append "https://waf.io/"
5689 "waf-" version ".tar.bz2"))
5692 "0wl4cnmp06lfxqjxaan58bqxn27smhydz0sg5prrfbl3bsw4gv6q"))))
5693 (build-system python-build-system)
5696 (modify-phases %standard-phases
5699 (invoke "python" "waf-light" "configure" "build")))
5702 (invoke "python" "waf" "--version")))
5704 (lambda* (#:key outputs #:allow-other-keys)
5705 (let ((out (assoc-ref outputs "out")))
5706 (install-file "waf" (string-append out "/bin")))
5708 ;; waf breaks when it is wrapped.
5710 (home-page "https://waf.io/")
5711 (synopsis "Python-based build system")
5713 "Waf is a Python-based framework for configuring, compiling and installing
5715 (license license:bsd-3)))
5717 (define-public python2-waf
5718 (package-with-python2 python-waf))
5720 (define-public python-pyzmq
5722 (name "python-pyzmq")
5727 (uri (pypi-uri "pyzmq" version))
5729 (base32 "13fhwnlvsvxv72kfhqbpn6qi7msh8mc8377mpabv32skk2cjfnxx"))))
5730 (build-system python-build-system)
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.
5738 `(("zeromq" ,zeromq)))
5740 `(("pkg-config" ,pkg-config)
5741 ("python-nose" ,python-nose)))
5742 (home-page "https://github.com/zeromq/pyzmq")
5743 (synopsis "Python bindings for 0MQ")
5745 "PyZMQ is the official Python binding for the ZeroMQ messaging library.")
5746 (license license:bsd-4)))
5748 (define-public python2-pyzmq
5749 (package-with-python2 python-pyzmq))
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.
5756 (name "python-pep8")
5761 (uri (pypi-uri "pep8" version))
5764 "002rkl4lsn6x2mxmf8ar00l0m8i3mzrc6pnzz77blyksmpsxa4x1"))))
5765 (build-system python-build-system)
5766 (home-page "https://pep8.readthedocs.org/")
5767 (synopsis "Python style guide checker")
5769 "This tools checks Python code against some of the style conventions in
5771 (license license:expat)))
5773 (define-public python2-pep8
5774 (package-with-python2 python-pep8))
5776 (define-public python-pyflakes
5778 (name "python-pyflakes")
5783 (uri (pypi-uri "pyflakes" version))
5786 "1x1pcca4a24k4pw8x1c77sgi58cg1wl2k38mp8a25k608pzls3da"))))
5787 (build-system python-build-system)
5789 "https://github.com/pyflakes/pyflakes")
5790 (synopsis "Passive checker of Python programs")
5792 "Pyflakes statically checks Python source code for common errors.")
5793 (license license:expat)))
5795 (define-public python2-pyflakes
5796 (package-with-python2 python-pyflakes))
5798 (define-public python-mccabe
5800 (name "python-mccabe")
5805 (uri (pypi-uri "mccabe" version))
5808 "07w3p1qm44hgxf3vvwz84kswpsx6s7kvaibzrsx5dzm0hli1i3fx"))))
5809 (build-system python-build-system)
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")
5816 "This package provides a Flake8 plug-in to compute the McCabe cyclomatic
5817 complexity of Python source code.")
5818 (license license:expat)))
5820 (define-public python2-mccabe
5821 (package-with-python2 python-mccabe))
5823 (define-public python-mccabe-0.2.1
5824 (package (inherit python-mccabe)
5829 (uri (pypi-uri "mccabe" version))
5832 "0fi4a81kr5bcv5p4xgibqr595hyj5dafkqgsmfk96mfy8w71fajs"))))))
5834 (define-public python2-mccabe-0.2.1
5835 (package-with-python2 python-mccabe-0.2.1))
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)
5846 "https://pypi.python.org/packages/source/p/pep8/pep8-"
5851 "12b9bbdbwnspxgak14xg58c130x2n0blxzlms5jn2dszn8qj3d0m"))))
5853 ;; XXX Tests not compatible with Python 3.5.
5856 (define-public python2-pep8-1.5.7
5857 (package-with-python2 python-pep8-1.5.7))
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)
5868 "https://pypi.python.org/packages/source/p/pyflakes/pyflakes-"
5873 "0sbpq6pqm1i9wqi41mlfrsc5rk92jv4mskvlyxmnhlbdnc80ma1z"))))
5875 ;; XXX Tests not compatible with Python 3.5.
5878 (define-public python2-pyflakes-0.8.1
5879 (package-with-python2 python-pyflakes-0.8.1))
5881 (define-public python-flake8
5883 (name "python-flake8")
5888 (uri (pypi-uri "flake8" version))
5891 "1n0i38592vy3q0x2a9bf8z6rhhn04i30wsn5i5zzcj7qkxvl8062"))))
5892 (build-system python-build-system)
5895 (modify-phases %standard-phases
5897 (add-after 'install 'check
5898 (lambda* (#:key inputs outputs #:allow-other-keys)
5899 (add-installed-pythonpath inputs outputs)
5900 (zero? (system* "pytest" "-v")))))))
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)))
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")
5913 "The modular source code checker: pep8, pyflakes and co")
5915 "Flake8 is a wrapper around PyFlakes, pep8 and python-mccabe.")
5916 (properties `((python2-variant . ,(delay python2-flake8))))
5917 (license license:expat)))
5919 (define-public python2-flake8
5920 (let ((base (package-with-python2 (strip-python2-variant python-flake8))))
5921 (package (inherit base)
5923 `(("python2-configparser" ,python2-configparser)
5924 ("python2-enum34" ,python2-enum34)
5925 ,@(package-propagated-inputs base))))))
5927 ;; python-hacking requires flake8 <2.6.0.
5928 (define-public python-flake8-2.5
5930 (inherit python-flake8)
5934 (uri (pypi-uri "flake8" version))
5937 "1snylqwbmrylbx3r1wpz8ggk98f6bcag4441ag8mm2l7wyn58sij"))))
5939 `(("python-pep8" ,python-pep8)
5940 ,@(package-propagated-inputs python-flake8)))
5941 (properties `((python2-variant . ,(delay python2-flake8-2.5))))))
5943 (define-public python2-flake8-2.5
5945 (inherit python2-flake8)
5946 (version (package-version python-flake8-2.5))
5948 (inherit (package-source python-flake8-2.5))))
5950 `(("python2-pep8" ,python2-pep8)
5951 ,@(package-propagated-inputs python2-flake8)))))
5953 (define-public python-flake8-polyfill
5955 (name "python-flake8-polyfill")
5960 (uri (pypi-uri "flake8-polyfill" version))
5963 "1nlf1mkqw856vi6782qcglqhaacb23khk9wkcgn55npnjxshhjz4"))))
5964 (build-system python-build-system)
5967 (modify-phases %standard-phases
5970 (setenv "PYTHONPATH"
5971 (string-append (getcwd) "/build/lib:"
5972 (getenv "PYTHONPATH")))
5973 (zero? (system* "py.test" "-v")))))))
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")
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)))
5987 (define-public python2-flake8-polyfill
5988 (package-with-python2 python-flake8-polyfill))
5990 (define-public python-mistune
5992 (name "python-mistune")
5997 (uri (pypi-uri "mistune" version))
6000 "0vkmsh0x480rni51lhyvigfdf06b9247z868pk3bal1wnnfl58sr"))))
6001 (build-system python-build-system)
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
6009 (license license:bsd-3)))
6011 (define-public python2-mistune
6012 (package-with-python2 python-mistune))
6014 (define-public python-markdown
6016 (name "python-markdown")
6021 (uri (pypi-uri "Markdown" version))
6024 "0z6v8649sr434d5r5zmrhydka7v7f9yas4bwcgkcs0650jdhybnh"))))
6025 (build-system python-build-system)
6027 `(("python-nose" ,python-nose)
6028 ("python-pyyaml" ,python-pyyaml)))
6029 (home-page "https://python-markdown.github.io/")
6030 (synopsis "Python implementation of Markdown")
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)))
6038 (define-public python2-markdown
6039 (package-with-python2 python-markdown))
6041 (define-public python-ptyprocess
6043 (name "python-ptyprocess")
6048 (uri (pypi-uri "ptyprocess" version))
6051 "0ra31k10v3629xq0kdn8lwmfbi97anmk48r03yvh7mks0kq96hg6"))))
6052 (build-system python-build-system)
6054 `(("python-nose" ,python-nose)))
6057 (modify-phases %standard-phases
6060 (zero? (system* "nosetests")))))))
6061 (home-page "https://github.com/pexpect/ptyprocess")
6062 (synopsis "Run a subprocess in a pseudo terminal")
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)))
6068 (define-public python2-ptyprocess
6069 (package-with-python2 python-ptyprocess))
6071 (define-public python-cram
6073 (name "python-cram")
6075 (home-page "https://bitheap.org/cram/")
6078 (uri (list (string-append home-page "cram-"
6080 (pypi-uri "cram" version)))
6083 "0bvz6fwdi55rkrz3f50zsy35gvvwhlppki2yml5bj5ffy9d499vx"))))
6086 (modify-phases %standard-phases
6087 (add-after 'unpack 'patch-source
6089 (substitute* (find-files "cram" ".*\\.py$")
6090 ;; Replace default shell path.
6091 (("/bin/sh") (which "sh")))
6092 (substitute* (find-files "tests" ".*\\.t$")
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'"))
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)
6117 `(("python-coverage" ,python-coverage)
6119 (synopsis "Simple testing framework for command line applications")
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
6125 (license license:gpl2+)))
6127 (define-public python2-cram
6128 (package-with-python2 python-cram))
6130 (define-public python-straight-plugin
6132 (name "python-straight-plugin")
6137 (uri (pypi-uri "straight.plugin" version))
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)))
6149 (define-public python2-straight-plugin
6150 (package-with-python2 python-straight-plugin))
6152 (define-public python-fonttools
6154 (name "python-fonttools")
6158 (uri (pypi-uri "fonttools" version ".zip"))
6161 "1hhj97izwliy0vybmza72d90l5d4mcn50y8akq7kyccfl82vdx4d"))))
6162 (build-system python-build-system)
6164 '(#:test-target "check"
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
6172 (substitute* "setup.py"
6173 (("^[ \t]*extra_path *= *'FontTools',") ""))
6176 `(("unzip" ,unzip)))
6177 (home-page "https://github.com/behdad/fonttools")
6178 (synopsis "Tools to manipulate font files")
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."))))
6189 (define-public python2-fonttools
6190 (package-with-python2 python-fonttools))
6192 (define-public python-ly
6199 (uri (pypi-uri name version))
6202 "0x98dv7p8mg26p4816yy8hz4f34zf6hpnnfmr56msgh9jnsm2qfl"))))
6203 (build-system python-build-system)
6205 ;; FIXME: Some tests need network access.
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+)))
6214 (define-public python-appdirs
6216 (name "python-appdirs")
6221 (uri (pypi-uri "appdirs" version))
6224 "14id6wxi12lgyw0mg3bcfnf888ad07jz9yj46gfzhn186z8rcn4y"))))
6225 (build-system python-build-system)
6226 (home-page "https://github.com/ActiveState/appdirs")
6228 "Determine platform-specific dirs, e.g. a \"user data dir\"")
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)))
6234 (define-public python2-appdirs
6235 (package-with-python2 python-appdirs))
6237 (define-public python-llfuse
6239 (name "python-llfuse")
6243 (uri (pypi-uri "llfuse" version ".tar.bz2"))
6246 "1rqww632y2zz71xmr6ch7yq80kvza9mhqr2z773k0d8l1lwzl575"))))
6247 (build-system python-build-system)
6252 `(("pkg-config" ,pkg-config)))
6253 (synopsis "Python bindings for FUSE")
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))))))
6260 (define-public python2-llfuse
6261 (package (inherit (package-with-python2
6262 (strip-python2-variant python-llfuse)))
6263 (propagated-inputs `(("python2-contextlib2" ,python2-contextlib2)))))
6266 (define-public python-llfuse-0.41
6267 (package (inherit python-llfuse)
6272 "https://bitbucket.org/nikratio/python-llfuse/downloads/"
6273 "llfuse-" version ".tar.bz2"))
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+))))
6281 (define-public python-msgpack
6283 (name "python-msgpack")
6287 (uri (pypi-uri "msgpack" version))
6290 "1hz2dba1nvvn52afg34liijsm7kn65cmn06dl0xbwld6bb4cis0f"))))
6291 (build-system python-build-system)
6293 `(#:modules ((guix build utils)
6294 (guix build python-build-system)
6299 (modify-phases %standard-phases
6302 (let ((cwd (getcwd)))
6303 (setenv "PYTHONPATH"
6304 (string-append cwd "/build/"
6305 (find (cut string-prefix? "lib" <>)
6306 (scandir (string-append cwd "/build")))
6308 (getenv "PYTHONPATH")))
6309 (invoke "pytest" "-v" "test")))))))
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)))
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
6324 (inherit python-msgpack)
6325 (name "python-msgpack-transitional")
6327 (substitute-keyword-arguments (package-arguments python-msgpack)
6329 `(modify-phases ,phases
6330 (add-after 'unpack 'configure-transitional
6332 ;; Keep using the old name.
6333 (substitute* "setup.py"
6334 (("TRANSITIONAL = False")
6335 "TRANSITIONAL = 1"))
6338 (define-public python2-msgpack
6339 (package-with-python2 python-msgpack))
6341 (define-public python-netaddr
6343 (name "python-netaddr")
6348 (uri (pypi-uri "netaddr" version))
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")
6357 "A Python library for representing and manipulating IPv4, IPv6, CIDR, EUI
6358 and MAC network addresses.")
6359 (license license:bsd-3)))
6361 (define-public python2-netaddr
6362 (package-with-python2 python-netaddr))
6364 (define-public python-wrapt
6366 (name "python-wrapt")
6371 (uri (pypi-uri "wrapt" version))
6374 "1ip3dwib39xhp79kblskgvz3fjzcwxgx3fs3ahdixhpjg7a61mfl"))))
6375 (build-system python-build-system)
6377 ;; Tests are not included in the tarball, they are only available in the
6380 (home-page "https://github.com/GrahamDumpleton/wrapt")
6381 (synopsis "Module for decorators, wrappers and monkey patching")
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)))
6388 (define-public python2-wrapt
6389 (package-with-python2 python-wrapt))
6391 (define-public python-xlrd
6393 (name "python-xlrd")
6397 (uri (pypi-uri "xlrd" version))
6400 "0s8hjiz01vbhy85xalrz0qlsmd9ypf36zjqrf97hh984spapvy0g"))))
6401 (build-system python-build-system)
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)))
6417 (define-public python2-xlrd
6418 (package-with-python2 python-xlrd))
6420 (define-public python-prettytable
6422 (name "python-prettytable")
6428 "https://pypi.python.org/packages/source/P/PrettyTable/"
6429 "prettytable-" version ".tar.bz2"))
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")
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)))
6443 (define-public python2-prettytable
6444 (package-with-python2 python-prettytable))
6446 (define-public python-tables
6448 (name "python-tables")
6453 (uri (pypi-uri "tables" version))
6456 "0affz7k8babh8wdmsgrz5jxrd569by2w8ffimcxs9wiaf5rw1idx"))
6457 (modules '((guix build utils)))
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$"))
6465 (build-system python-build-system)
6467 `(;; FIXME: python-build-system does not pass configure-flags to "build"
6468 ;; or "check", so we must override the build and check phases.
6470 (modify-phases %standard-phases
6471 (add-after 'unpack 'use-gcc
6473 (substitute* "setup.py"
6474 (("compiler = new_compiler\\(\\)" line)
6476 "\ncompiler.set_executables(compiler='gcc',"
6477 "compiler_so='gcc',"
6479 "linker_so='gcc -shared')")))
6482 (lambda* (#:key inputs #:allow-other-keys)
6483 (zero? (system* "python" "setup.py" "build"
6484 (string-append "--hdf5="
6485 (assoc-ref inputs "hdf5"))))))
6487 (lambda* (#:key inputs #:allow-other-keys)
6488 (zero? (system* "python" "setup.py" "check"
6489 (string-append "--hdf5="
6490 (assoc-ref inputs "hdf5")))))))))
6492 `(("python-numexpr" ,python-numexpr)
6493 ("python-numpy" ,python-numpy)))
6495 `(("python-cython" ,python-cython)
6496 ("pkg-config" ,pkg-config)))
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)))
6507 (define-public python2-tables
6508 (package-with-python2 python-tables))
6510 (define-public python-pyasn1
6512 (name "python-pyasn1")
6517 (uri (pypi-uri "pyasn1" version))
6520 "1z5h38anjzzrxpraa9iq9llffyx2zs8gx0q6dc1g029miwnn50gv"))))
6521 (build-system python-build-system)
6522 (home-page "http://pyasn1.sourceforge.net/")
6523 (synopsis "ASN.1 types and codecs")
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)))
6529 (define-public python2-pyasn1
6530 (package-with-python2 python-pyasn1))
6532 (define-public python-pyasn1-modules
6534 (name "python-pyasn1-modules")
6539 (uri (pypi-uri "pyasn1-modules" version))
6542 "0ivm850yi7ajjbi8j115qpsj95bgxdsx48nbjzg0zip788c3xkx0"))))
6543 (build-system python-build-system)
6545 `(("python-pyasn1" ,python-pyasn1)))
6546 (home-page "https://sourceforge.net/projects/pyasn1/")
6547 (synopsis "ASN.1 codec implementations")
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)))
6553 (define-public python2-pyasn1-modules
6554 (package-with-python2 python-pyasn1-modules))
6556 (define-public python-ipaddress
6558 (name "python-ipaddress")
6562 (uri (pypi-uri "ipaddress" version))
6565 "10agaa1cys1bk1ycpl2w8lky9vjx8h1xh1z29mg0niqx0638c390"))))
6566 (build-system python-build-system)
6567 (home-page "https://github.com/phihag/ipaddress")
6568 (synopsis "IP address manipulation library")
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)))
6576 (define-public python2-ipaddress
6577 (package-with-python2 python-ipaddress))
6579 (define-public python2-ipaddr
6581 (name "python2-ipaddr")
6586 (uri (pypi-uri "ipaddr" version))
6588 (base32 "1dwq3ngsapjc93fw61rp17fvzggmab5x1drjzvd4y4q0i255nm8v"))))
6589 (build-system python-build-system)
6591 `(#:python ,python-2 ;version 2 only
6593 (modify-phases %standard-phases
6596 (zero? (system* "python" "ipaddr_test.py")))))))
6597 (home-page "https://github.com/google/ipaddr-py")
6598 (synopsis "IP address manipulation library")
6600 "Ipaddr is a Python@tie{}2 library for creating and manupilating IPv4 and
6601 IPv6 addresses and networks.
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)))
6608 (define-public python-idna
6610 (name "python-idna")
6615 (uri (pypi-uri "idna" version))
6618 "13qaab6d0s15gknz8v3zbcfmbj6v86hn9pjxgkdf62ch13imssic"))))
6619 (build-system python-build-system)
6620 (home-page "https://github.com/kjd/idna")
6621 (synopsis "Internationalized domain names in applications")
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
6630 (license license:bsd-4)))
6632 (define-public python2-idna
6633 (package-with-python2 python-idna))
6635 (define-public python-idna-ssl
6637 (name "python-idna-ssl")
6642 (uri (pypi-uri "idna-ssl" version))
6645 "0ydrc8hpg9mdr5hqq1lqfsfbn6sjq69slwpfrnlrm3k0phqg14qj"))))
6646 (build-system python-build-system)
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)
6653 (license license:expat)))
6655 (define-public python-pretend
6657 (name "python-pretend")
6662 (uri (string-append "https://pypi.python.org/packages/source/p/"
6663 "pretend/pretend-" version ".tar.gz"))
6666 "040vm94lcbscg5p81g1icmwwwa2jm7wrd1ybmxnv1sz8rl8bh3n9"))))
6667 (build-system python-build-system)
6668 (home-page "https://github.com/alex/pretend")
6669 (synopsis "Library for stubbing in Python")
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)))
6677 (define-public python2-pretend
6678 (package-with-python2 python-pretend))
6680 (define-public python-pip
6687 (uri (pypi-uri "pip" version))
6690 "03clr9c1dih5n9c00c592zzvf6r1ffimywkaq9agcqdllzhl7wh9"))))
6691 (build-system python-build-system)
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")
6697 "Pip is a package manager for Python software, that finds packages on the
6698 Python Package Index (PyPI).")
6699 (license license:expat)))
6701 (define-public python2-pip
6702 (package-with-python2 python-pip))
6704 (define-public python-tlsh
6706 (name "python-tlsh")
6708 (home-page "https://github.com/trendmicro/tlsh")
6711 (uri (string-append "https://github.com/trendmicro/tlsh/archive/v"
6715 "1x1vahd4zg5kpyr9h9hs3fvh460p25rjy4cclwdnbbw8x3vc30q3"))
6716 (file-name (string-append name "-" version ".tar.gz"))))
6717 (build-system cmake-build-system)
6719 '(#:out-of-source? #f
6720 #:phases (modify-phases %standard-phases
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")
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
6741 (license license:asl2.0)))
6743 (define-public python2-tlsh
6745 (inherit python-tlsh)
6746 (name "python2-tlsh")
6747 (inputs `(("python" ,python-2)))))
6749 (define-public python-termcolor
6751 (name "python-termcolor")
6756 (uri (pypi-uri "termcolor" version))
6759 "0fv1vq14rpqwgazxg4981904lfyp84mnammw7y046491cv76jv8x"))))
6760 (build-system python-build-system)
6762 ;; There are no tests.
6764 (home-page "https://pypi.python.org/pypi/termcolor")
6765 (synopsis "ANSII Color formatting for terminal output")
6767 "This package provides ANSII Color formatting for output in terminals.")
6768 (license license:expat)))
6770 (define-public python2-termcolor
6771 (package-with-python2 python-termcolor))
6773 (define-public python-libarchive-c
6775 (name "python-libarchive-c")
6779 (uri (pypi-uri "libarchive-c" version))
6782 "0qg0v1s9c1xdk9philhnv8k6c6nicvnvfwlc0j9srg90jmdlvm06"))))
6783 (build-system python-build-system)
6785 '(#:phases (modify-phases %standard-phases
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'"))))))
6796 (lambda _ (invoke "pytest" "-vv"))))))
6798 `(("python-mock" ,python-mock)
6799 ("python-pytest" ,python-pytest)))
6801 `(("libarchive" ,libarchive)))
6802 (home-page "https://github.com/Changaco/python-libarchive-c")
6803 (synopsis "Python interface to libarchive")
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+)))
6810 (define-public python2-libarchive-c
6811 (package-with-python2 python-libarchive-c))
6813 (define-public python-file
6816 (name "python-file")
6817 (build-system python-build-system)
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
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'")))
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.")))
6840 (define-public python2-file
6841 (package-with-python2 python-file))
6843 (define-public python-debian
6845 (name "python-debian")
6846 (home-page "https://salsa.debian.org/python-debian-team/python-debian")
6851 (uri (pypi-uri name version))
6854 "0i15f0xzx679sd0ldq2sls9pnnps9fv6vhqvnv9dzf4qhma42i0y"))))
6855 (build-system python-build-system)
6857 `(("python-six" ,python-six)))
6858 (synopsis "Debian package related modules")
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:
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.
6875 ;; Modules are either GPLv2+ or GPLv3+.
6876 (license license:gpl3+)))
6878 (define-public python2-debian
6879 (package-with-python2 python-debian))
6881 (define-public python-nbformat
6883 (name "python-nbformat")
6888 (uri (pypi-uri "nbformat" version))
6891 "00nlf08h8yc4q73nphfvfhxrcnilaqanb8z0mdy6nxk0vzq4wjgp"))))
6892 (build-system python-build-system)
6893 (arguments `(#:tests? #f)) ; no test target
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)))
6905 (define-public python2-nbformat
6906 (package-with-python2 python-nbformat))
6908 (define-public python-bleach
6910 (name "python-bleach")
6915 (uri (pypi-uri "bleach" version))
6918 "0jvg3jxrvnx7xmm9gj262v60ib452xlnwlb0navyp7jsvcd0d4qj"))))
6919 (build-system python-build-system)
6921 `(("python-html5lib" ,python-html5lib-0.9)
6922 ("python-six" ,python-six)))
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)))
6930 (define-public python2-bleach
6931 (package-with-python2 python-bleach))
6933 (define-public python-entrypoints
6935 (name "python-entrypoints")
6940 (uri (string-append "https://github.com/takluyver/entrypoints/archive/"
6942 (file-name (string-append name "-" version ".tar.gz"))
6945 "1pdvgfr5bxyvnfvxbsd3zi0dh3il71pc4k6rinx6zpps91b84a56"))))
6946 (build-system python-build-system)
6947 ;; The package does not come with a setup.py file, so we have to generate
6952 (modify-phases %standard-phases
6953 (add-after 'unpack 'create-setup.py
6955 (call-with-output-file "setup.py"
6958 from setuptools import setup
6959 setup(name='entrypoints', version='~a', py_modules=['entrypoints'])
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)))
6970 (define-public python2-entrypoints
6971 (package-with-python2 python-entrypoints))
6973 (define-public python-nbconvert
6975 (name "python-nbconvert")
6980 (uri (pypi-uri "nbconvert" version))
6983 "0brclbb18l4nmd5qy3dl9wn05rjdh1fz4rmzdlfqacj12rcdvdgp"))))
6984 (build-system python-build-system)
6986 `(;; The "bdist_egg" target is disabled by default, causing the installation
6988 #:configure-flags (list "bdist_egg")
6989 ;; FIXME: 5 failures, 40 errors.
6992 ;; (modify-phases %standard-phases
6995 ;; (zero? (system* "py.test" "-v")))))
6997 `(("python-pytest" ,python-pytest)))
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:
7019 @item ReStructured Text (rst)
7020 @item executable script
7022 (license license:bsd-3)))
7024 (define-public python2-nbconvert
7025 (package-with-python2 python-nbconvert))
7027 (define-public python-notebook
7029 (name "python-notebook")
7033 (uri (pypi-uri "notebook" version))
7036 "0laq5c2f21frq6xcdckgq7raqhznbjb0qs0357g612z87wyn1a9r"))))
7037 (build-system python-build-system)
7040 (modify-phases %standard-phases
7043 ;; HOME must be set for tests
7044 (setenv "HOME" "/tmp")
7045 (zero? (system* "nosetests")))))))
7047 `(("python-jupyter-core" ,python-jupyter-core)
7048 ("python-nbformat" ,python-nbformat)
7049 ("python-nbconvert" ,python-nbconvert)
7050 ("python-ipython" ,python-ipython)))
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")
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)))
7063 (define-public python2-notebook
7064 (let ((base (package-with-python2
7065 (strip-python2-variant python-notebook))))
7066 (package (inherit base)
7068 `(("python2-mock" ,python2-mock)
7069 ,@(package-native-inputs base)))
7071 (substitute-keyword-arguments (package-arguments base)
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
7080 "notebook/services/nbconvert/tests/test_nbconvert_api.py"
7081 (("formats = self.nbconvert_api") "return #")))))))))))
7083 (define-public python-widgetsnbextension
7085 (name "python-widgetsnbextension")
7090 (uri (pypi-uri "widgetsnbextension" version))
7093 "0lff2mrwrgsa1mxmwx3phl9xvy0jqfpg6khbmxy53jbq56rwy666"))))
7094 (build-system python-build-system)
7096 `(("python-notebook" ,python-notebook)))
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
7104 (license license:bsd-3)))
7106 (define-public python2-widgetsnbextension
7107 (package-with-python2 python-widgetsnbextension))
7109 (define-public python-ipywidgets
7111 (name "python-ipywidgets")
7116 (uri (pypi-uri "ipywidgets" version))
7119 "1lk0qrr5l9a0z7qkkn30hv5832whxwxymf1l576fmmad0n7hkxms"))))
7120 (build-system python-build-system)
7121 ;; FIXME: it's not clear how to run the tests.
7122 (arguments `(#:tests? #f))
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
7134 (license license:bsd-3)))
7136 (define-public python2-ipywidgets
7137 (package-with-python2 python-ipywidgets))
7139 (define-public python-jupyter-console
7141 (name "python-jupyter-console")
7146 (uri (pypi-uri "jupyter_console" version))
7149 "1kam1qzgwr7srhm5r6aj90di5sws4bq0jmiw15452ddamb9yspal"))))
7150 (build-system python-build-system)
7151 ;; FIXME: it's not clear how to run the tests.
7152 (arguments `(#:tests? #f))
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)))
7166 (define-public python2-jupyter-console
7167 (package-with-python2 python-jupyter-console))
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
7174 (inherit python-jupyter-console)
7175 (name "python-jupyter-console-minimal")
7177 (substitute-keyword-arguments
7178 (package-arguments python-jupyter-console)
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
7186 (delete-file-recursively
7188 (assoc-ref outputs "out") "/bin"))))))))
7189 ;; Remove the python-ipython propagated input, to avoid the cycle
7193 (package-propagated-inputs python-jupyter-console)))))
7195 (define-public jupyter
7202 (uri (pypi-uri "jupyter" version))
7205 "0pwf3pminkzyzgx5kcplvvbvwrrzd3baa7lmh96f647k30rlpp6r"))))
7206 (build-system python-build-system)
7207 ;; FIXME: it's not clear how to run the tests.
7208 (arguments `(#:tests? #f))
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)))
7216 (native-search-paths
7217 (list (search-path-specification
7218 (variable "JUPYTER_PATH")
7219 (files '("share/jupyter")))))
7221 (home-page "http://jupyter.org")
7222 (synopsis "Web application for interactive documents")
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)))
7230 (define-public python-chardet
7232 (name "python-chardet")
7237 (uri (pypi-uri "chardet" version))
7240 "1bpalpia6r5x1kknbk11p1fzph56fmmnp405ds8icksd3knr5aw4"))))
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")
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+)))
7253 (define-public python2-chardet
7254 (package-with-python2 python-chardet))
7256 (define-public python-docopt
7258 (name "python-docopt")
7263 ;; The release on PyPI does not include tests.
7265 "https://github.com/docopt/docopt/archive/"
7267 (file-name (string-append name "-" version ".tar.gz"))
7270 "16bf890xbdz3m30rsv2qacklh2rdn1zrfspfnwzx9g7vwz8yw4r1"))))
7271 (build-system python-build-system)
7273 `(("python-pytest" ,python-pytest)))
7276 (modify-phases %standard-phases
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
7285 (license license:expat)))
7287 (define-public python2-docopt
7288 (package-with-python2 python-docopt))
7290 (define-public python-pythondialog
7292 (name "python-pythondialog")
7297 (uri (pypi-uri "pythondialog" version))
7300 "1728ghsran47jczn9bhlnkvk5bvqmmbihabgif5h705b84r1272c"))))
7301 (build-system python-build-system)
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\"")))
7314 #:tests? #f)) ; no test suite
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))))))
7325 (define-public python2-pythondialog
7326 (let ((base (package-with-python2 (strip-python2-variant python-pythondialog))))
7329 (version (package-version python-pythondialog))
7332 (uri (pypi-uri "python2-pythondialog" version))
7335 "0d8k7lxk50imdyx85lv8j98i4c93a71iwpapnl1506rpkbm9qvd9")))))))
7337 (define-public python-configobj
7339 (name "python-configobj")
7344 "https://pypi.python.org/packages/source/c/configobj/"
7345 "configobj-" version ".tar.gz"))
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)
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
7360 (home-page "https://github.com/DiffSK/configobj")
7361 (license license:bsd-3)))
7363 (define-public python2-configobj
7364 (package-with-python2 python-configobj))
7366 (define-public python-configargparse
7368 (name "python-configargparse")
7372 (uri (pypi-uri "ConfigArgParse" version))
7375 "0fgkiqh6r3rbkdq3k8c48m85g52k96686rw3a6jg4lcncrkpvk98"))))
7376 (build-system python-build-system)
7378 `(("python-pyyaml" ,python-pyyaml)))
7381 (modify-phases %standard-phases
7384 ;; Bypass setuptools-shim because one test relies on "setup.py"
7385 ;; being the first argument passed to the python call.
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)))
7397 (define-public python2-configargparse
7398 (package-with-python2 python-configargparse))
7400 (define-public python-argparse-manpage
7402 (name "python-argparse-manpage")
7407 (uri (pypi-uri "argparse-manpage" version))
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")
7415 "This package provides tools to build manual pages from Python's
7416 @code{ArgumentParser} object.")
7417 (license license:asl2.0)))
7419 (define-public python-contextlib2
7421 (name "python-contextlib2")
7426 (uri (pypi-uri "contextlib2" version))
7429 "0cmp131dlh0d0zvw0aza1zd13glvngzk8lb4avks0hm7yxwdr9am"))))
7430 (build-system python-build-system)
7433 (modify-phases %standard-phases
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)))
7447 (define-public python2-contextlib2
7448 (package-with-python2 python-contextlib2))
7450 (define-public python-texttable
7452 (name "python-texttable")
7457 (uri (pypi-uri "texttable" version))
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
7467 (license license:lgpl2.1+)))
7469 (define-public python2-texttable
7470 (package-with-python2 python-texttable))
7472 (define-public python-atomicwrites
7474 (name "python-atomicwrites")
7478 (uri (pypi-uri "atomicwrites" version))
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)))
7489 (define-public python2-atomicwrites
7490 (package-with-python2 python-atomicwrites))
7492 (define-public python-click-threading
7494 (name "python-click-threading")
7498 (uri (pypi-uri "click-threading" version))
7501 "1rsxc2fbkxlhwhlmxsdjzq3spn284l6rvjfcz9mbb17ibgdgmc5j"))))
7502 (build-system python-build-system)
7504 `(("python-click" ,python-click)))
7505 (synopsis "Utilities for multithreading in Click")
7506 (description "This package provides utilities for multithreading in Click
7508 (home-page "https://github.com/click-contrib/click-threading")
7509 (license license:expat)))
7511 (define-public python-click-log
7513 (name "python-click-log")
7517 (uri (pypi-uri "click-log" version))
7520 "091i03bhxyzsdbc6kilxhivfda2f8ymz3b33xa6cj5kbzjiirz8n"))))
7521 (build-system python-build-system)
7523 `(("python-click" ,python-click)))
7524 (synopsis "Logging for click applications")
7525 (description "This package provides a Python library for logging Click
7527 (home-page "https://github.com/click-contrib/click-log")
7528 (license license:expat)))
7530 (define-public python-apipkg
7532 (name "python-apipkg")
7536 (uri (pypi-uri "apipkg" version))
7539 "1iks5701qnp3dlr3q1d9qm68y2plp2m029irhpz92a44psfkjf1f"))))
7540 (build-system python-build-system)
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)))
7550 (define-public python2-apipkg
7551 (package-with-python2 python-apipkg))
7553 (define-public python-execnet
7555 (name "python-execnet")
7559 (uri (pypi-uri "execnet" version))
7562 "1rpk1vyclhg911p3hql0m0nrpq7q7mysxnaaw6vs29cpa6kx8vgn"))))
7563 (build-system python-build-system)
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.
7570 `(("python-pytest" ,python-pytest)
7571 ("python-setuptools-scm" ,python-setuptools-scm)))
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:
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
7584 (home-page "http://codespeak.net/execnet/")
7585 (license license:expat)))
7587 (define-public python2-execnet
7588 (package-with-python2 python-execnet))
7590 (define-public python-icalendar
7592 (name "python-icalendar")
7596 (uri (pypi-uri "icalendar" version))
7599 "13003kw2vbas1ha146vv3x2rdg9k7w38rdzxj63vi1i67jgjldl0"))))
7600 (build-system python-build-system)
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)))
7610 (define-public python-sphinxcontrib-newsfeed
7612 (name "python-sphinxcontrib-newsfeed")
7616 (uri (pypi-uri "sphinxcontrib-newsfeed" version))
7619 "1d7gam3mn8v4in4p16yn3v10vps7nnaz6ilw99j4klij39dqd37p"))))
7620 (arguments '(#:tests? #f)) ; No tests.
7621 (build-system python-build-system)
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)))
7630 (define-public python-args
7632 (name "python-args")
7636 (uri (pypi-uri "args" version))
7639 "057qzi46h5dmxdqknsbrssn78lmqjlnm624iqdhrnpk26zcbi1d7"))))
7640 (build-system python-build-system)
7641 (home-page "https://github.com/kennethreitz/args")
7642 (synopsis "Command-line argument parser")
7644 "This library provides a Python module to parse command-line arguments.")
7645 (license license:bsd-3)))
7647 (define-public python2-args
7648 (package-with-python2 python-args))
7650 (define-public python-clint
7652 (name "python-clint")
7656 (uri (pypi-uri "clint" version))
7659 "1an5lkkqk1zha47198p42ji3m94xmzx1a03dn7866m87n4r4q8h5"))))
7660 (build-system python-build-system)
7663 (modify-phases %standard-phases
7666 (zero? (system* "py.test" "-v")))))))
7668 `(("python-pytest" ,python-pytest)))
7670 `(("python-args" ,python-args)))
7671 (home-page "https://github.com/kennethreitz/clint")
7672 (synopsis "Command-line interface tools")
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)))
7679 (define-public python2-clint
7680 (package-with-python2 python-clint))
7682 (define-public python-astor
7684 (name "python-astor")
7688 (uri (pypi-uri "astor" version))
7691 "1fdafq5hkis1fxqlmhw0sn44zp2ar46nxhbc22cvwg7hsd8z5gsa"))))
7692 (build-system python-build-system)
7693 (home-page "https://github.com/berkerpeksag/astor")
7694 (synopsis "Read and write Python ASTs")
7696 "Astor is designed to allow easy manipulation of Python source via the
7697 Abstract Syntax Tree.")
7698 (license license:bsd-3)))
7700 (define-public python2-astor
7701 (package-with-python2 python-astor))
7703 (define-public python-rply
7705 (name "python-rply")
7709 (uri (pypi-uri "rply" version))
7712 "0lv428895zxsz43968qx0q9bimwqnfykndz4dpjbq515w2gvzhjh"))))
7713 (build-system python-build-system)
7715 `(("python-appdirs" ,python-appdirs)))
7716 (home-page "https://github.com/alex/rply")
7717 (synopsis "Parser generator for Python")
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)))
7724 (define-public python2-rply
7725 (package-with-python2 python-rply))
7727 (define-public python-hy
7733 (uri (pypi-uri "hy" version))
7736 "19sfymaksx9jhksfnb15ahid46mzrhdfzz6yy2craz2qnzvpmky8"))))
7737 (build-system python-build-system)
7740 (modify-phases %standard-phases
7743 ;; Tests require write access to HOME.
7744 (setenv "HOME" "/tmp")
7745 (zero? (system* "nosetests")))))))
7747 `(("python-coverage" ,python-coverage)
7748 ("python-nose" ,python-nose)))
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")
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)))
7761 (define-public python2-hy
7762 (package-with-python2 python-hy))
7764 (define-public python2-functools32
7766 (name "python2-functools32")
7771 (uri (pypi-uri "functools32" version))
7774 "0v8ya0b58x47wp216n1zamimv4iw57cxz3xxhzix52jkw3xks9gn"))))
7775 (build-system python-build-system)
7777 `(#:python ,python-2
7778 #:tests? #f)) ; no test target
7779 (home-page "https://github.com/MiCHiLU/python-functools32")
7781 "Backport of the functools module from Python 3.2.3")
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)))
7787 (define-public python2-subprocess32
7789 (name "python2-subprocess32")
7793 (uri (pypi-uri "subprocess32" version))
7796 "14350dhhlhyz5gqzi3lihn9m6lvskx5mcb20srx1kgsk9i50li8y"))
7798 (search-patches "python2-subprocess32-disable-input-test.patch"))))
7799 (build-system python-build-system)
7801 `(#:python ,python-2
7802 ;; The test suite fails with Python > 2.7.13:
7803 ;; import test.support
7804 ;; ImportError: No module named support
7807 (modify-phases %standard-phases
7808 (add-after 'unpack 'patch-/bin/sh
7810 (substitute* '("subprocess32.py"
7811 "test_subprocess32.py")
7812 (("/bin/sh") (which "sh")))
7814 (home-page "https://github.com/google/python-subprocess32")
7815 (synopsis "Backport of the subprocess module from Python 3.2")
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)))
7824 (define-public python2-futures
7826 (name "python2-futures")
7831 (uri (pypi-uri "futures" version))
7834 "1pw1z4329xvlabdpwqa6b7v2fxf7hl64m4cgr22ckbym8m8m4hh5"))))
7835 (build-system python-build-system)
7836 (arguments `(#:python ,python-2))
7837 (home-page "https://github.com/agronholm/pythonfutures")
7839 "Backport of the concurrent.futures package from Python 3.2")
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)))
7846 (define-public python-promise
7848 (name "python-promise")
7853 (uri (pypi-uri "promise" version))
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")
7864 "Promises/A+ implementation for Python")
7865 (properties `((python2-variant . ,(delay python2-promise))))
7866 (license license:expat)))
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)
7875 `(("python2-futures" ,python2-futures)
7876 ("python2-pytest" ,python2-pytest)
7877 ,@(package-native-inputs promise))))))
7879 (define-public python-colorama
7881 (name "python-colorama")
7886 (uri (pypi-uri "colorama" version))
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
7894 (home-page "https://pypi.python.org/pypi/colorama")
7895 (license license:bsd-3)))
7897 (define-public python2-colorama
7898 (package-with-python2 python-colorama))
7900 (define-public python-rsa
7907 (uri (pypi-uri "rsa" version))
7910 "1dcxvszbikgzh99ybdc7jq0zb9wspy2ds8z9mjsqiyv3q884xpr5"))))
7911 (build-system python-build-system)
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)))
7922 (define-public python2-rsa
7923 (package-with-python2 python-rsa))
7925 (define-public python-pluggy
7927 (name "python-pluggy")
7932 (uri (pypi-uri "pluggy" version))
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)))
7943 (define-public python2-pluggy
7944 (package-with-python2 python-pluggy))
7946 (define-public python-tox
7953 (uri (pypi-uri "tox" version))
7956 "1drp6mwm8wdypjym15ia8lwjxbhcksb9vzxg4ay5dh4ji57by2ny"))))
7957 (build-system python-build-system)
7959 ;; FIXME: Tests require pytest-timeout, which itself requires
7960 ;; pytest>=2.8.0 for installation.
7963 `(("python-pluggy" ,python-pluggy) ; >=0.3.0,<0.4.0
7964 ("python-py" ,python-py)
7965 ("python-virtualenv" ,python-virtualenv)))
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
7977 (license license:expat)))
7979 (define-public python2-tox
7980 (package-with-python2 python-tox))
7982 (define-public python-jmespath
7984 (name "python-jmespath")
7989 (uri (pypi-uri "jmespath" version))
7992 "0r7wc7fsxmlwzxx9j1j7rms06c6xs6d4sysirdhz1jk2mb4x90ba"))))
7993 (build-system python-build-system)
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
8000 (home-page "https://github.com/jmespath/jmespath.py")
8001 (license license:expat)))
8003 (define-public python2-jmespath
8004 (package-with-python2 python-jmespath))
8006 (define-public python-botocore
8008 (name "python-botocore")
8013 (uri (pypi-uri "botocore" version))
8016 "12cqpbnz3vfv41mp9admvciw7bc7hz57sjpqs2bxaw9wnfmbw5lg"))))
8017 (build-system python-build-system)
8019 ;; FIXME: Many tests are failing.
8022 `(("python-dateutil" ,python-dateutil)
8023 ("python-docutils" ,python-docutils)
8024 ("python-jmespath" ,python-jmespath)))
8026 `(("python-mock" ,python-mock)
8027 ("python-nose" ,python-nose)
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)))
8037 (define-public python2-botocore
8038 (package-with-python2 python-botocore))
8040 (define-public python-xdo
8047 "http://http.debian.net/debian/pool/main/p/python-xdo/"
8048 "python-xdo_" version ".orig.tar.gz"))
8051 "1vqh1n5yy5dhnq312kwrl90fnck4v26is3lq3lxdvcn60vv19da0"))))
8052 (build-system python-build-system)
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")
8062 (substitute* "xdo/_xdo.py"
8063 (("find_library\\(\"xdo\"\\)")
8064 (simple-format #f "\"~a\"" libxdo)))
8066 #:tests? #f)) ; no tests provided
8068 `(("python-six" ,python-six)))
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)))
8079 (define-public python2-xdo
8080 (package-with-python2 python-xdo))
8082 (define-public python-mako
8084 (name "python-mako")
8089 (uri (pypi-uri "Mako" version))
8092 "1bi5gnr8r8dva06qpyx4kgjc6spm2k1y908183nbbaylggjzs0jf"))))
8093 (build-system python-build-system)
8095 `(("python-markupsafe" ,python-markupsafe)))
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)))
8106 (define-public python2-mako
8107 (package-with-python2 python-mako))
8109 (define-public python-waitress
8111 (name "python-waitress")
8116 (uri (pypi-uri "waitress" version))
8117 (patches (search-patches "python-waitress-fix-tests.patch"))
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)))
8128 (define-public python2-waitress
8129 (package-with-python2 python-waitress))
8131 (define-public python-pyquery
8133 (name "python-pyquery")
8138 (uri (pypi-uri "pyquery" version))
8141 "1xia20wm0vx5dk85kcwgh13bylz8qh47ffjxssd2586r60xi783a"))))
8142 (build-system python-build-system)
8144 `(("python-webob" ,python-webob)
8145 ("python-webtest" ,python-webtest)))
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)))
8156 (define-public python2-pyquery
8157 (package-with-python2 python-pyquery))
8159 (define-public python-anyjson
8161 (name "python-anyjson")
8166 (uri (pypi-uri "anyjson" version))
8169 "1fjph4alvcscsl5d4b6qpv1yh31jy05jxi1l0xff7lws7j32v09p"))))
8170 (build-system python-build-system)
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.
8179 (home-page "https://bitbucket.org/runeh/anyjson/")
8181 "Wraps best available JSON implementation in a common interface")
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))))))
8188 (define-public python2-anyjson
8189 (let ((anyjson (package-with-python2
8190 (strip-python2-variant python-anyjson))))
8193 (arguments `(;; Unlike the python 3 variant, we do run tests. See above!
8195 ,@(package-arguments anyjson)))
8196 (native-inputs `(("python2-nose" ,python2-nose))))))
8198 (define-public python-amqp
8200 (name "python-amqp")
8205 (uri (pypi-uri "amqp" version))
8208 "06n6q0kxhjnbfz3vn8x9yz09lwmn1xi9d6wxp31h5jbks0b4vsid"))))
8209 (build-system python-build-system)
8211 `(("python-nose" ,python-nose)
8212 ("python-mock" ,python-mock)))
8213 (home-page "https://github.com/celery/py-amqp")
8215 "Low-level AMQP client for Python (fork of amqplib)")
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))))))
8223 (define-public python2-amqp
8224 (let ((amqp (package-with-python2
8225 (strip-python2-variant python-amqp))))
8228 (arguments `(;; Tries to run coverage tests with nose-cover3, which seems
8229 ;; unmaintained. Weirdly, does not do this on the python 3
8232 ,@(package-arguments amqp))))))
8234 (define-public python-txamqp
8236 (name "python-txamqp")
8241 (uri (pypi-uri "txAMQP" version))
8244 "0jd9864k3csc06kipiwzjlk9mq4054s8kzk5q1cfnxj8572s4iv4"))))
8245 (build-system python-build-system)
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")
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
8258 (license license:asl2.0)))
8260 (define-public python2-txamqp
8261 (package-with-python2 python-txamqp))
8263 (define-public python-kombu
8265 (name "python-kombu")
8270 (uri (pypi-uri "kombu" version))
8273 "0l16chb314gpq2v7fh94a22c30lcv6w3ylmhsa60bldlcq6a0r70"))))
8274 (build-system python-build-system)
8276 `(("python-mock" ,python-mock)
8277 ("python-nose" ,python-nose)))
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))))))
8293 (define-public python2-kombu
8294 (let ((kombu (package-with-python2
8295 (strip-python2-variant python-kombu))))
8298 (arguments `(;; FIXME: 'TestTransport.test_del_sync' fails on python2.
8299 ;; It works fine on the python3 variant.
8301 ,@(package-arguments kombu)))
8302 (native-inputs `(("python2-unittest2" ,python2-unittest2)
8303 ,@(package-native-inputs kombu))))))
8305 (define-public python-billiard
8307 (name "python-billiard")
8308 (version "3.3.0.23")
8312 (uri (pypi-uri "billiard" version))
8315 "02wxsc6bhqvzh8j6w758kvgqbnj14l796mvmrcms8fgfamd2lak9"))))
8316 (build-system python-build-system)
8318 `(("python-nose" ,python-nose)))
8319 (home-page "https://github.com/celery/billiard")
8321 "Python multiprocessing fork with improvements and bugfixes")
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))))))
8330 (define-public python2-billiard
8331 (let ((billiard (package-with-python2
8332 (strip-python2-variant python-billiard))))
8335 (native-inputs `(("python2-unittest2" ,python2-unittest2)
8336 ("python2-mock" ,python2-mock)
8337 ,@(package-native-inputs billiard))))))
8339 (define-public python-celery
8341 (name "python-celery")
8346 (uri (pypi-uri "celery" version))
8349 "0yh2prhdnx2dgkb67a5drj12hh2zvzx5f611p7mqqg01ydghif4r"))))
8350 (build-system python-build-system)
8353 (modify-phases %standard-phases
8354 ;; These tests break with Python 3.5:
8355 ;; https://github.com/celery/celery/issues/2897#issuecomment-253066295
8359 (system* "nosetests" "--exclude=^test_safe_to_remove.*")))))))
8361 `(("python-nose" ,python-nose)))
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))))))
8377 (define-public python2-celery
8378 (let ((celery (package-with-python2
8379 (strip-python2-variant python-celery))))
8382 (native-inputs `(("python2-unittest2" ,python2-unittest2)
8383 ("python2-mock" ,python2-mock)
8384 ,@(package-native-inputs celery))))))
8386 (define-public python-translitcodec
8388 (name "python-translitcodec")
8393 (uri (pypi-uri "translitcodec" version))
8396 "10x6pvblkzky1zhjs8nmx64nb9jdzxad4bxhq4iwv0j4z2aqjnki"))))
8397 (build-system python-build-system)
8399 `(#:tests? #f)) ; no tests provided
8401 "https://github.com/claudep/translitcodec")
8403 "Unicode to 8-bit charset transliteration codec")
8405 "This package contains codecs for transliterating ISO 10646 texts into
8406 best-effort representations using smaller coded character sets (ASCII,
8408 (license license:expat)))
8410 (define-public python2-translitcodec
8411 (package-with-python2 python-translitcodec))
8413 (define-public python-editor
8415 (name "python-editor")
8420 (uri (pypi-uri "python-editor" version))
8423 "1ypnpgvzpkbwsg4rdvy4sy51j28b5xq9v8pnkwxncn07vqz06p7n"))))
8424 (build-system python-build-system)
8426 "https://github.com/fmoo/python-editor")
8428 "Programmatically open an editor, capture the result")
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)))
8434 (define-public python2-editor
8435 (package-with-python2 python-editor))
8437 (define-public python-sphinxcontrib-programoutput
8439 (name "python-sphinxcontrib-programoutput")
8443 (uri (pypi-uri "sphinxcontrib-programoutput" version))
8446 "153hhnlbx4688zj9wd64819ps5znc2jlyp5crkgzvn5hxgy99vpx"))))
8447 (build-system python-build-system)
8449 ;; FIXME: Many tests are failing and the upstream is gone.
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)))
8459 (define-public python2-sphinxcontrib-programoutput
8460 (package-with-python2 python-sphinxcontrib-programoutput))
8462 (define-public python-sphinx-repoze-autointerface
8464 (name "python-sphinx-repoze-autointerface")
8468 (uri (pypi-uri "repoze.sphinx.autointerface" version))
8471 "08ycivzf7bh4a1zcyp31hbyqs1b2c9r26raa3vxjwwmbfqr3iw4f"))))
8472 (build-system python-build-system)
8473 (arguments '(#:tests? #f)) ; No tests.
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)))
8484 (define-public python2-sphinx-repoze-autointerface
8485 (package-with-python2 python-sphinx-repoze-autointerface))
8487 (define-public python-vobject
8489 (name "python-vobject")
8493 (uri (pypi-uri "vobject" version))
8496 "0hqjgf3ay1m5w1c0k00g5yfpdz1zni5qnr5rh9b8fg9hjvhwlmhg"))))
8497 (build-system python-build-system)
8499 '(;; The test suite relies on some non-portable Windows interfaces.
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
8510 (home-page "http://eventable.github.io/vobject/")
8511 (license license:asl2.0)))
8513 (define-public python2-vobject
8514 (package-with-python2 python-vobject))
8516 (define-public python-munkres
8518 (name "python-munkres")
8522 (uri (pypi-uri "munkres" version))
8525 "0mbspx4zv8id4x6pim6ybsa1xh96qwpbqj7skbqz4c9c9nf1lpqq"))))
8526 (build-system python-build-system)
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)))
8536 (define-public python2-munkres
8537 (package-with-python2 python-munkres))
8539 (define-public python-whoosh
8541 (name "python-whoosh")
8546 (uri (pypi-uri "Whoosh" version))
8549 "10qsqdjpbc85fykc1vgcs8xwbgn4l2l52c8d83xf1q59pwyn79bw"))))
8550 (build-system python-build-system)
8552 `(("python-pytest" ,python-pytest)))
8553 (home-page "https://bitbucket.org/mchaput/whoosh")
8554 (synopsis "Full text indexing, search, and spell checking library")
8556 "Whoosh is a fast, pure-Python full text indexing, search, and spell
8558 (license license:bsd-2)))
8560 (define-public python2-whoosh
8561 (let ((whoosh (package-with-python2 (strip-python2-variant python-whoosh))))
8562 (package (inherit whoosh)
8564 `(("python2-backport-ssl-match-hostname"
8565 ,python2-backport-ssl-match-hostname)
8566 ,@(package-propagated-inputs whoosh))))))
8568 (define-public python-pathlib
8570 (name "python-pathlib")
8574 (uri (pypi-uri "pathlib" version))
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:
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.).
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
8600 (license license:expat)))
8602 (define-public python2-pathlib
8603 (package-with-python2 python-pathlib))
8605 (define-public python2-pathlib2
8607 (name "python2-pathlib2")
8611 (uri (pypi-uri "pathlib2" version))
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.
8620 `(#:python ,python-2))
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
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.
8631 Pathlib offers a set of classes to handle file system paths. It offers the
8632 following advantages over using string objects:
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.).
8642 (license license:expat)))
8644 (define-public python-jellyfish
8646 (name "python-jellyfish")
8650 (uri (pypi-uri "jellyfish" version))
8653 "1j9rplb16ba2prjj6mip46z0w9pnhnqpwgiwi0x93vnas14rlyl8"))))
8654 (build-system python-build-system)
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))))))
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))))))
8671 (define-public python2-unicodecsv
8673 (name "python2-unicodecsv")
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"))
8684 "087nqanfcyp6mlfbbr5lva5f3w6iz1bybls9xlrb8icmc474wh4w"))))
8685 (build-system python-build-system)
8687 `(;; It supports Python 3, but Python 3 can already do Unicode CSV.
8688 #:python ,python-2))
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)))
8697 (define-public python-rarfile
8699 (name "python-rarfile")
8703 (uri (pypi-uri "rarfile" version))
8706 "0qfad483kcbga0bn4qmcz953xjk16r52fahiy46zzn56v80y89ra"))))
8707 (build-system python-build-system)
8710 (modify-phases %standard-phases
8712 ;; Many tests fail, but the installation proceeds.
8713 (lambda _ (zero? (system* "make" "-C" "test" "test")))))))
8715 `(("which" ,which))) ; required for tests
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)))
8724 (define-public python2-rarfile
8725 (package-with-python2 python-rarfile))
8727 (define-public python-magic
8729 (name "python-magic")
8734 (uri (pypi-uri "python-magic" version))
8737 "1mgwig9pnzgkf86q9ji9pnc99bngms15lfszq5rgqb9db07mqxpk"))
8738 (file-name (string-append name "-" version "-checkout"))))
8739 (build-system python-build-system)
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
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'")))
8768 (add-before 'install 'disable-egg-compression
8770 (let ((port (open-file "setup.cfg" "a")))
8771 (display "\n[easy_install]\nzip_ok = 0\n"
8776 ;; python-magic needs to be able to find libmagic.so.
8779 "https://github.com/ahupp/python-magic")
8781 "File type identification using libmagic")
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)))
8791 (define-public python2-magic
8792 (package-with-python2 python-magic))
8794 (define-public python2-s3cmd
8796 (name "python2-s3cmd")
8801 (uri (string-append "mirror://sourceforge/s3tools/s3cmd/" version "/"
8802 "s3cmd-" version ".tar.gz"))
8805 "0ki1rzhm5icvi9ry5jswi4b22yqwyj0d2wsqsgilwx6qhi7pjxa6"))))
8806 (build-system python-build-system)
8808 ;; s3cmd is written for python2 only and contains no tests.
8809 `(#:python ,python-2
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")
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+)))
8831 (define-public python-pkgconfig
8833 (name "python-pkgconfig")
8838 (uri (pypi-uri "pkgconfig" version))
8841 "107x2wmchlch8saixb488cgjz9n6inl38wi7nxkb942rbaapxiqb"))))
8842 (build-system python-build-system)
8844 `(("python-nose" ,python-nose)))
8846 `(("pkg-config" ,pkg-config)))
8849 (modify-phases %standard-phases
8850 (add-before 'build 'patch
8851 ;; Hard-code the path to pkg-config.
8853 (substitute* "pkgconfig/pkgconfig.py"
8854 (("cmd = 'pkg-config")
8855 (string-append "cmd = '" (which "pkg-config"))))
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)))
8868 (define-public python2-pkgconfig
8869 (package-with-python2 python-pkgconfig))
8871 (define-public python-bz2file
8873 (name "python-bz2file")
8878 (uri (pypi-uri "bz2file" version))
8881 "126s53fkpx04f33a829yqqk8fj4png3qwg4m66cvlmhmwc8zihb4"))))
8882 (build-system python-build-system)
8884 `(#:tests? #f)) ; Tests use deprecated python modules.
8885 (home-page "https://github.com/nvawda/bz2file")
8886 (synopsis "Read and write bzip2-compressed files")
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))))))
8895 (define-public python2-bz2file
8896 (let ((base (package-with-python2
8897 (strip-python2-variant python-bz2file))))
8901 `(#:python ,python-2
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.
8907 (lambda _ (zero? (system* "python"
8908 "test_bz2file.py"))))))))))
8910 (define-public python-future
8912 (name "python-future")
8917 (uri (pypi-uri "future" version))
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
8926 (home-page "http://python-future.org")
8927 (synopsis "Single-source support for Python 3 and 2")
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)))
8934 (define-public python2-future
8935 (package-with-python2 python-future))
8937 (define-public python-cysignals
8939 (name "python-cysignals")
8944 (uri (pypi-uri "cysignals" version ".tar.bz2"))
8947 "14cbyd9znlz6cxy1s3g6v6dv5jj45hn27pywkidd9b1zanaysqc6"))))
8948 (build-system python-build-system)
8950 `(("python-cython" ,python-cython)
8951 ("python-sphinx" ,python-sphinx)))
8953 `(("pari-gp" ,pari-gp)))
8955 `(#:modules ((guix build python-build-system)
8956 ((guix build gnu-build-system) #:prefix gnu:)
8958 ;; FIXME: Tests are executed after installation and currently fail
8959 ;; when not installing into standard locations; the author is working
8963 (modify-phases %standard-phases
8966 (assoc-ref gnu:%standard-phases 'configure)))))
8968 "https://github.com/sagemath/cysignals")
8970 "Handling of interrupts and signals for Cython")
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,
8976 (license license:lgpl3+)))
8978 (define-public python2-cysignals
8979 (package-with-python2 python-cysignals))
8981 (define-public python2-shedskin
8983 (name "python2-shedskin")
8988 (uri (string-append "https://github.com/shedskin/shedskin/"
8989 "releases/download/v" version
8990 "/shedskin-" version ".tgz"))
8993 "0nzwrzgw1ga8rw6f0ryq7zr9kkiavd1cqz5hzxkcbicl1dk7kz41"))))
8994 (build-system python-build-system)
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'")))
9012 (inputs `(("pcre" ,pcre)
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))))
9020 (define-public python2-rope
9022 (name "python2-rope")
9027 (uri (pypi-uri "rope" version))
9030 "18k5znhpwvrfck3yp0jmhd5j8r0f0s8bk1zh5yhs2cfgmfhbwigb"))))
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)
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)))
9046 (define-public python-py3status
9048 (name "python-py3status")
9053 (uri (pypi-uri "py3status" version))
9056 "0shxcfz4wcczj0mhwp4w0dvwd2fdd9bgprq8slim1519iiqzgwhq"))))
9057 (build-system python-build-system)
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'")))
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)))
9080 (define-public python-tblib
9082 (name "python-tblib")
9086 (uri (pypi-uri "tblib" version))
9088 "1rsg8h069kqgncyv8fgzyj6qflk6j10cb78pa5jk34ixwq044vj3"))))
9089 (build-system python-build-system)
9092 (modify-phases %standard-phases
9095 ;; Upstream runs tests after installation and the package itself
9096 ;; resides in a subdirectory. Extend PYTHONPATH so it will be
9098 (setenv "PYTHONPATH"
9099 (string-append (getcwd) "/build/lib:"
9100 (getenv "PYTHONPATH")))
9101 (zero? (system* "py.test" "-vv" "tests" "README.rst")))))))
9103 `(("python-pytest" ,python-pytest)
9104 ("python-six" ,python-six)))
9105 (home-page "https://github.com/ionelmc/python-tblib")
9106 (synopsis "Traceback serialization library")
9108 "Traceback serialization allows you to:
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).
9115 @item Parse traceback strings and raise with the parsed tracebacks.
9117 (license license:bsd-3)))
9119 (define-public python2-tblib
9120 (package-with-python2 python-tblib))
9122 (define-public python-greenlet
9124 (name "python-greenlet")
9128 (uri (pypi-uri "greenlet" version))
9131 "1xhik26j4f3kc4qw9xmj0c567rb5h1zryb4ijwqnqwwjvfhbv59h"))))
9132 (build-system python-build-system)
9133 (home-page "https://greenlet.readthedocs.io/")
9134 (synopsis "Lightweight in-process concurrent programming")
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))))
9142 (define-public python2-greenlet
9143 (package-with-python2 python-greenlet))
9145 (define-public python-gevent
9147 (name "python-gevent")
9151 (uri (pypi-uri "gevent" version))
9154 "0bbbjvi423y9k9xagrcsimnayaqymg6f2dj76m9z3mjpkjpci4a7"))
9155 (modules '((guix build utils)))
9158 ;; unbunding libev and c-ares
9159 (delete-file-recursively "deps")
9161 (build-system python-build-system)
9163 `(#:modules ((ice-9 ftw)
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
9177 (substitute* "src/gevent/subprocess.py"
9178 (("/bin/sh") (which "sh")))
9179 (for-each (lambda (file)
9181 (("/bin/sh") (which "sh"))
9182 (("/bin/true") (which "true"))))
9183 (find-files "src/greentest" "\\.py$"))
9185 (add-before 'build 'do-not-use-bundled-sources
9187 (setenv "CONFIG_SHELL" (which "bash"))
9188 (setenv "LIBEV_EMBED" "false")
9189 (setenv "CARES_EMBED" "false")
9190 (setenv "EMBED" "false")
9194 ;; Make sure the build directory is on PYTHONPATH.
9195 (setenv "PYTHONPATH"
9197 (getenv "PYTHONPATH") ":"
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"
9207 (scandir "." (cut regexp-exec
9208 (make-regexp "test_+(subprocess|core)")
9211 `(("python-greenlet" ,python-greenlet)))
9213 `(("libev-source" ,(package-source libev))
9214 ("python-six" ,python-six)))
9216 `(("c-ares" ,c-ares)
9218 (home-page "http://www.gevent.org/")
9219 (synopsis "Coroutine-based network library")
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)))
9225 (define-public python2-gevent
9226 (package-with-python2 python-gevent))
9228 (define-public python-fastimport
9230 (name "python-fastimport")
9235 (uri (pypi-uri "fastimport" version))
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}
9244 (license license:gpl2+)))
9246 (define-public python2-fastimport
9247 (package-with-python2 python-fastimport))
9249 (define-public python-twisted
9251 (name "python-twisted")
9255 (uri (pypi-uri "Twisted" version ".tar.bz2"))
9258 "1p245mg15hkxp7hy5cyq2fgvlgjkb4cg0gwkwd148nzy1bbi3wnv"))))
9259 (build-system python-build-system)
9261 '(#:tests? #f)) ; FIXME: Some tests are failing.
9263 ;; (modify-phases %standard-phases
9266 ;; (zero? (system* "./bin/trial" "twisted")))))
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")
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)))
9279 (define-public python2-twisted
9280 (package-with-python2 python-twisted))
9282 (define-public python-pika
9284 (name "python-pika")
9289 (uri (pypi-uri "pika" version))
9292 "0nb4h08di432lv7dy2v9kpwgk0w92f24sqc2hw2s9vwr5b8v8xvj"))))
9293 (build-system python-build-system)
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")
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)))
9306 (define-public python2-pika
9307 (package-with-python2 python-pika))
9309 (define-public python-ply
9316 (uri (pypi-uri "ply" version))
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)))
9327 (define-public python2-ply
9328 (package-with-python2 python-ply))
9330 (define-public python-tabulate
9332 (name "python-tabulate")
9336 (uri (pypi-uri "tabulate" version))
9339 "1inqhspd4frxnp08c32yndr0lc4px1xfkqah184i5w09gkhvi843"))))
9340 (build-system python-build-system)
9342 ;; FIXME: The pypi release tarball is missing a 'test/common.py'
9343 ;; and the latest release is not tagged in the upstream repository.
9345 (home-page "https://bitbucket.org/astanin/python-tabulate")
9346 (synopsis "Pretty-print tabular data")
9348 "Tabulate is a library and command-line utility to pretty-print tabular
9350 (license license:expat)))
9352 (define-public python2-tabulate
9353 (package-with-python2 python-tabulate))
9355 (define-public python-kazoo
9357 (name "python-kazoo")
9362 (uri (pypi-uri "kazoo" version))
9365 "16y213k7r8shyn2zw1k6lkzjgcrvm441pqv8scvcjixhvpbx3hm7"))))
9366 (build-system python-build-system)
9367 (arguments '(#:tests? #f)) ; XXX: needs zookeeper
9369 `(("python-six" ,python-six)))
9370 (home-page "https://kazoo.readthedocs.org")
9371 (synopsis "High-level Zookeeper client library")
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)))
9378 (define-public python2-kazoo
9379 (package-with-python2 python-kazoo))
9381 (define-public python-pykafka
9383 (name "python-pykafka")
9388 "https://pypi.python.org/packages/8b/3e/"
9389 "384eeff406b06315738b62483fd2126c6e4f544167116b17cc04ea7d2a59/"
9390 "pykafka-" version ".tar.gz"))
9393 "1id6sr159p6aa13bxcqyr9gln8sqg1l0ddzns5iws8kk5q1p5cfv"))))
9394 (build-system python-build-system)
9395 (arguments '(#:tests? #f)) ; XXX: needs zookeeper, kafka, etc.
9397 `(("python-gevent" ,python-gevent)
9398 ("python-kazoo" ,python-kazoo)
9399 ("python-tabulate" ,python-tabulate)))
9401 `(("librdkafka" ,librdkafka)))
9402 (home-page "https://pykafka.readthedocs.io/")
9403 (synopsis "Apache Kafka client for Python")
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)))
9410 (define-public python2-pykafka
9411 (package-with-python2 python-pykafka))
9413 (define-public python-wcwidth
9415 (name "python-wcwidth")
9420 (uri (pypi-uri "wcwidth" version))
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)))
9434 (define-public python2-wcwidth
9435 (package-with-python2 python-wcwidth))
9437 (define-public python2-jsonrpclib
9439 (name "python2-jsonrpclib")
9444 "https://pypi.python.org/packages/source/j/jsonrpclib/"
9445 "jsonrpclib-" version ".tar.gz"))
9448 "02vgirw2bcgvpcxhv5hf3yvvb4h5wzd1lpjx8na5psdmaffj6l3z"))))
9449 (build-system python-build-system)
9452 #:python ,python-2))
9453 (home-page "https://github.com/joshmarshall/jsonrpclib/")
9454 (synopsis "Implementation of JSON-RPC specification for Python")
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,
9460 (license license:asl2.0)))
9462 (define-public python-chai
9464 (name "python-chai")
9468 (uri (pypi-uri "chai" version))
9471 "1k6n6zbgrrs83crp6mr3yqj9zlv40b8rpisyrliwsq7naml2p3gz"))))
9472 (build-system python-build-system)
9473 (home-page "https://github.com/agoragames/chai")
9474 (synopsis "Mocking framework for Python")
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)))
9480 (define-public python2-chai
9481 (package-with-python2 python-chai))
9483 (define-public python-inflection
9485 (name "python-inflection")
9488 (origin (method url-fetch)
9489 (uri (pypi-uri "inflection" version))
9492 "1jhnxgnw8y3mbzjssixh6qkc7a3afc4fygajhqrqalnilyvpzshq"))))
9493 (build-system python-build-system)
9495 `(("python-pytest" ,python-pytest)))
9496 (home-page "https://github.com/jpvanhal/inflection")
9497 (synopsis "Python string transformation library")
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)))
9504 (define-public python2-inflection
9505 (package-with-python2 python-inflection))
9507 (define-public python-pylev
9509 (name "python-pylev")
9513 (uri (pypi-uri "pylev" version))
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)))
9525 (define-public python2-pylev
9526 (package-with-python2 python-pylev))
9528 (define-public python-cleo
9530 (name "python-cleo")
9534 (uri (pypi-uri "cleo" version))
9537 "0q1cf0szr0d54am4pypzwdnm74zpladdsinad94c2fz5i06fdpf7"))))
9538 (build-system python-build-system)
9541 ("python-mock" ,python-mock)
9542 ("python-pytest-mock" ,python-pytest-mock)
9543 ("python-pytest" ,python-pytest)))
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")
9551 "Cleo allows you to create command-line commands with signature in
9552 docstring and colored output.")
9553 (license license:expat)))
9555 (define-public python2-cleo
9556 (package-with-python2 python-cleo))
9558 (define-public python-lazy-object-proxy
9560 (name "python-lazy-object-proxy")
9564 (uri (pypi-uri "lazy-object-proxy" version))
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")
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)))
9576 (define-public python2-lazy-object-proxy
9577 (package-with-python2 python-lazy-object-proxy))
9579 (define-public python-dnspython
9581 (name "python-dnspython")
9585 (uri (string-append "http://www.dnspython.org/kits/"
9586 version "/dnspython-" version ".tar.gz"))
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")
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)))
9600 (define-public python2-dnspython
9601 (package-with-python2 python-dnspython))
9603 (define-public python-email-validator
9605 (name "python-email-validator")
9608 (origin (method url-fetch)
9609 (uri (pypi-uri "email_validator" version))
9612 "1ja9149l9ck5n45a72h3is7v476hjny5ybxbcamx1nw6iplsm7k6"))))
9613 (build-system python-build-system)
9616 (modify-phases %standard-phases
9617 (add-before 'build 'use-dnspython
9619 (substitute* "setup.py"
9620 (("dnspython3") "dnspython"))
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")
9628 "This library validates email address syntax and deliverability.")
9629 (license license:cc0)))
9631 (define-public python2-email-validator
9632 (package-with-python2 python-email-validator))
9634 (define-public python-ukpostcodeparser
9636 (name "python-ukpostcodeparser")
9640 (uri (pypi-uri "UkPostcodeParser" version))
9643 "1jwg9z4rz51mcka1821rwgycsd0mcicyp1kiwjfa2kvg8bm9p2qd"))))
9644 (build-system python-build-system)
9645 (home-page "https://github.com/hamstah/ukpostcodeparser")
9646 (synopsis "UK Postcode parser for Python")
9648 "This library provides the @code{parse_uk_postcode} function for
9649 parsing UK postcodes.")
9650 (license license:expat)))
9652 (define-public python2-ukpostcodeparser
9653 (package-with-python2 python-ukpostcodeparser))
9655 (define-public python-faker
9657 (name "python-faker")
9661 (uri (pypi-uri "Faker" version))
9664 "1fh2p2yz0fsdr4fqwxgddwbvfb6qn6vp8yx0qwqzra27yq5d1wsm"))
9666 (search-patches "python-faker-fix-build-32bit.patch"))
9667 (modules '((guix build utils)))
9670 (for-each delete-file (find-files "." "\\.pyc$"))
9672 (build-system python-build-system)
9675 (modify-phases %standard-phases
9678 (zero? (system* "python" "-m" "unittest" "-v" "tests")))))))
9681 ("python-email-validator" ,python-email-validator)
9682 ("python-mock" ,python-mock)
9683 ("python-ukpostcodeparser" ,python-ukpostcodeparser)))
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")
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))))))
9695 (define-public python2-faker
9696 (let ((base (package-with-python2 (strip-python2-variant
9701 `(("python2-ipaddress" ,python2-ipaddress)
9702 ,@(package-propagated-inputs base))))))
9704 (define-public python-pyaml
9706 (name "python-pyaml")
9710 (uri (pypi-uri "pyaml" version))
9713 "132grrw0ajq4nrappi3ldbkb952k7yn9b6c7csi2rmvzm1g6ppp2"))))
9714 (build-system python-build-system)
9716 `(("python-unidecode" ,python-unidecode)))
9718 `(("python-pyyaml" ,python-pyyaml)))
9719 (home-page "https://github.com/mk-fg/pretty-yaml")
9720 (synopsis "YAML pretty-print library for Python")
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/"))))
9726 (define-public python2-pyaml
9727 (package-with-python2 python-pyaml))
9729 (define-public python-backpack
9731 (name "python-backpack")
9736 (uri (pypi-uri "backpack" version))
9739 "14rq1mvm0jda90lcx9gyyby9dvq4x3js2cmxvd6vl4686ixwyqh1"))))
9740 (build-system python-build-system)
9742 `(("python-pytest" ,python-pytest)
9743 ("python-nose" ,python-nose)))
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)))
9752 (define-public python2-backpack
9753 (package-with-python2 python-backpack))
9755 (define-public python-prompt-toolkit
9757 (name "python-prompt-toolkit")
9762 (uri (pypi-uri "prompt_toolkit" version ".tar.gz"))
9765 "05v9h5nydljwpj5nm8n804ms0glajwfy1zagrzqrg91wk3qqi1c5"))))
9766 (build-system python-build-system)
9768 '(#:tests? #f)) ; The test suite uses some Windows-specific data types.
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")
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)))
9783 (define-public python2-prompt-toolkit
9784 (package-with-python2 python-prompt-toolkit))
9786 (define-public python-jedi
9788 (name "python-jedi")
9793 (uri (pypi-uri "jedi" version))
9796 "1h8ypnjisn57kiv1zqrkj1im6sbfnhxllqaa8znh39qkd47ys2dl"))))
9797 (build-system python-build-system)
9800 (modify-phases %standard-phases
9801 (replace 'check (lambda _
9802 (invoke "py.test" "-vv"))))))
9804 `(("python-pytest" ,python-pytest)
9805 ("python-docopt" ,python-docopt)))
9807 `(("python-parso" ,python-parso)))
9808 (home-page "https://github.com/davidhalter/jedi")
9809 (synopsis "Autocompletion and static analysis library for Python")
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.
9815 Jedi understands docstrings and you can use Jedi autocompletion in your REPL as
9817 (license license:expat)))
9819 (define-public python2-jedi
9820 (package-with-python2 python-jedi))
9822 (define-public ptpython
9828 (uri (pypi-uri "ptpython" version))
9831 "1mmbiyzf0n8hm7z2a562x7w5cbl6jc0zsk6vp40q1z4cyblv1k13"))))
9832 (build-system python-build-system)
9834 '(#:tests? #f)) ; FIXME: No tests in pypi tarball.
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")
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
9847 (license license:bsd-3)
9848 (properties `((python2-variant . ,(delay ptpython-2))))))
9850 (define-public ptpython-2
9851 (let ((base (package-with-python2 (strip-python2-variant ptpython))))
9854 (name "ptpython2"))))
9856 (define-public python-stem
9858 (name "python-stem")
9863 (uri (pypi-uri "stem" version))
9866 "1va9p3ij7lxg6ixfsvaql06dn11l3fgpxmss1dhlvafm7sqizznp"))))
9867 (build-system python-build-system)
9870 (modify-phases %standard-phases
9871 (add-before 'check 'fix-test-environment
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 "%")))
9880 (invoke "./run_tests.py" "--unit")
9883 `(("python-mock" ,python-mock)
9884 ("python-pep8" ,python-pep8)
9885 ("python-pyflakes" ,python-pyflakes)))
9886 (home-page "https://stem.torproject.org/")
9888 "Python controller library that allows applications to interact with Tor")
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)))
9895 (define-public python2-stem
9896 (package-with-python2 python-stem))
9898 (define-public python-pyserial
9900 (name "python-pyserial")
9905 (uri (pypi-uri "pyserial" version))
9908 "0k1nfdrxxkdlv4zgaqsdv8li0pj3gbh2pyxw8q2bsg6f9490amyn"))))
9909 (build-system python-build-system)
9911 '(#:tests? #f)) ; FIXME: 3/49 tests are failing.
9913 ;; (modify-phases %standard-phases
9916 ;; (zero? (system* "python" "test/run_all_tests.py" "loop://")))))))
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)))
9925 (define-public python2-pyserial
9926 (package-with-python2 python-pyserial))
9928 (define-public python-kivy
9930 (name "python-kivy")
9935 (uri (pypi-uri "Kivy" version))
9936 (file-name (string-append name "-" version ".tar.gz"))
9939 "1zzxjdp78hfjjiklzr82l4zwibwcq4j6kgicspqs6iyyfn5yisbw"))))
9940 (build-system python-build-system)
9942 `(#:tests? #f ; Tests require many optional packages
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")
9953 ("pkg-config" ,pkg-config)
9954 ("python-cython" ,python-cython)))
9956 `(("gstreamer" ,gstreamer)
9959 ,(sdl-union (list sdl2 sdl2-image sdl2-mixer sdl2-ttf)))))
9960 (home-page "http://kivy.org")
9962 "Multitouch application framework")
9964 "A software library for rapid development of
9965 hardware-accelerated multitouch applications.")
9966 (license license:expat)))
9968 (define-public python2-kivy
9969 (package-with-python2 python-kivy))
9971 (define-public python-kivy-next
9972 (let ((commit "a988c5e7a47da56263ff39514264a3de516ef2fe")
9974 (package (inherit python-kivy)
9975 (name "python-kivy-next")
9976 (version (string-append "1.9.1-" revision "."
9977 (string-take commit 7)))
9982 (url "https://github.com/kivy/kivy")
9984 (file-name (string-append name "-" version "-checkout"))
9987 "0jk92b4a8l7blkvkgkjihk171s0dfnq582cckff5srwc8kal5m0p")))))))
9989 (define-public python2-kivy-next
9990 (package-with-python2 python-kivy-next))
9992 (define-public python-binaryornot
9994 (name "python-binaryornot")
9998 (uri (pypi-uri "binaryornot" version))
10001 "0qc006986rb6bcbmiymwgcl1mns2jphr1j7sr7nk41nlr7gh359m"))))
10002 (build-system python-build-system)
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
10010 (license license:bsd-3)
10011 (properties `((python2-variant . ,(delay python2-binaryornot))))))
10013 (define-public python2-binaryornot
10014 (let ((base (package-with-python2 (strip-python2-variant python-binaryornot))))
10015 (package (inherit base)
10017 `(("python2-enum34" ,python2-enum34)
10018 ,@(package-propagated-inputs base))))))
10020 (define-public python-nltk
10022 (name "python-nltk")
10026 (uri (pypi-uri "nltk" version))
10029 "0skxbhnymwlspjkzga0f7x1hg3y50fwpfghs8g8k7fh6f4nknlym"))))
10030 (build-system python-build-system)
10032 '(;; The tests require some extra resources to be downloaded.
10033 ;; TODO Try packaging these resources.
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)))
10043 (define-public python2-nltk
10044 (package-with-python2 python-nltk))
10046 (define-public python-pymongo
10048 (name "python-pymongo")
10052 (uri (pypi-uri "pymongo" version))
10055 "0zis4707r9hdg5qgkhp3wss9camr9h56ixyfc8n9dxwlnnly4x4c"))))
10056 (build-system python-build-system)
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)))
10064 (define-public python2-pymongo
10065 (package-with-python2 python-pymongo))
10067 (define-public python-sh
10073 (uri (pypi-uri "sh" version))
10076 "192r0mpv6dmkysjzhc43ddffiwb5g7c76bgr1mb1z2xz9awbj3sr"))))
10077 (build-system python-build-system)
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)))
10086 (define-public python2-sh
10087 (package-with-python2 python-sh))
10089 (define-public python-consul
10091 (name "python-consul")
10096 (uri (pypi-uri "python-consul" version))
10099 "0rfyxcy4cr3x848vhx876ifalxd5ghq6l5x813m49h4vq2d4jiq8"))))
10100 (build-system python-build-system)
10102 '(#:tests? #f)) ; The tests are not distributed
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")
10109 "Python client for @url{http://www.consul.io/,Consul}, a tool for service
10110 discovery, monitoring and configuration.")
10111 (license license:expat)))
10113 (define-public python2-consul
10114 (package-with-python2 python-consul))
10116 (define-public python-schematics
10118 (name "python-schematics")
10123 (uri (string-append
10124 "https://github.com/schematics/schematics/archive/v" version ".tar.gz"))
10125 (file-name (string-append name "-" version ".tar.gz"))
10128 "19v1i69bf3bzarfxmbv0v6ivpcn758x3shvbiy9l2hy0lvqwnp6l"))))
10129 (build-system python-build-system)
10131 `(("python-six" ,python-six)))
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)))
10140 (define-public python2-schematics
10141 (package-with-python2 python-schematics))
10143 (define-public python-odfpy
10145 (name "python-odfpy")
10149 (uri (pypi-uri "odfpy" version))
10152 "1a6ms0w9zfhhkqhvrnynwwbxrivw6hgjc0s5k7j06npc7rq0blxw"))))
10154 `(#:modules ((srfi srfi-1)
10155 (guix build python-build-system)
10156 (guix build utils))
10158 (modify-phases %standard-phases
10160 ;; The test runner invokes python2 and python3 for test*.py.
10161 ;; To avoid having both in inputs, we replicate it here.
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.")
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))))
10176 (define-public python2-odfpy
10177 (package-with-python2 python-odfpy))
10179 (define-public python-natsort
10181 (name "python-natsort")
10185 (uri (pypi-uri "natsort" version))
10188 "0i732amg6yzkx4g4c9j09jmqq39q377x9cl2nbkm5hax2c2v0wxf"))))
10189 (build-system python-build-system)
10191 `(#:modules ((guix build utils)
10192 (guix build python-build-system)
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))
10203 (let ((cwd (getcwd)))
10204 (setenv "PYTHONPATH"
10207 (find (cut string-prefix? "lib" <>)
10208 (scandir (string-append cwd "/build")))
10210 (getenv "PYTHONPATH")))
10211 (invoke "pytest" "-v")))))))
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")
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))))))
10233 (define-public python2-natsort
10234 (let ((base (package-with-python2 (strip-python2-variant python-natsort))))
10235 (package (inherit base)
10237 `(("python2-pathlib" ,python2-pathlib)
10238 ,@(package-native-inputs base))))))
10240 (define-public python-glances
10242 (name "python-glances")
10247 (uri (pypi-uri "Glances" version))
10250 "09fxysfp1n16csqvzvawy74qm6a94nvwjf3vcf5gkqp4i6k4vjjy"))))
10251 (build-system python-build-system)
10253 `(("python-psutil" ,python-psutil)))
10255 "https://github.com/nicolargo/glances")
10257 "A cross-platform curses-based monitoring tool")
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+)))
10264 (define-public python2-glances
10265 (package-with-python2 python-glances))
10267 (define-public python-graphql-core
10269 (name "python-graphql-core")
10274 (uri (pypi-uri "graphql-core" version))
10277 "0rsaarx2sj4xnw9966rhh4haiqaapm4lm2mfqm48ywd51j5vh1a0"))))
10278 (build-system python-build-system)
10280 `(#:tests? #f ; Tests require the unpackaged pytest-benchmark.
10282 (modify-phases %standard-phases
10283 (add-after 'unpack 'patch-hardcoded-version
10284 (lambda _ (substitute*
10286 (("'gevent==1.1rc1'") "'gevent'"))
10289 `(("python-gevent" ,python-gevent)
10290 ("python-mock" ,python-mock)
10291 ("python-pytest-mock" ,python-pytest-mock)))
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")
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}
10302 (license license:expat)))
10304 (define-public python2-graphql-core
10305 (package-with-python2 python-graphql-core))
10307 (define-public python-graphql-relay
10309 (name "python-graphql-relay")
10314 (uri (pypi-uri "graphql-relay" version))
10317 "1nv5dxcj59zv31qvl8bd142njmxcmymny2dz3br1l2cpbljbf5i7"))))
10318 (build-system python-build-system)
10320 '(#:tests? #f)) ; The tests are not distributed
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")
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}
10333 (license license:expat)))
10335 (define-public python2-graphql-relay
10336 (package-with-python2 python-graphql-relay))
10338 (define-public python-graphene
10340 (name "python-graphene")
10345 (uri (pypi-uri "graphene" version))
10348 "09zhac7igh9ixdz0ay6csy35b40l1jwbf2wrbxmgxwfhy51iy06q"))))
10349 (build-system python-build-system)
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)))
10357 `(#:tests? #f)) ; no tests/ in the PyPI tarball
10358 (home-page "http://graphene-python.org/")
10359 (synopsis "GraphQL Framework for Python")
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)))
10367 (define-public python2-graphene
10368 (let ((base (package-with-python2
10369 (strip-python2-variant python-graphene))))
10370 (package (inherit base)
10372 `(("python2-sqlalchemy" ,python2-sqlalchemy)
10373 ,@(package-native-inputs base))))))
10375 (define-public python-nautilus
10377 (name "python-nautilus")
10382 (uri (pypi-uri "nautilus" version))
10385 "01hwzjc1zshk4vvxrcghm398fpy4jls66dyz06g07mrwqif8878p"))))
10386 (build-system python-build-system)
10387 (arguments `(#:tests? #f)) ; fails to import test modules
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)))
10399 `(("python-nose2" ,python-nose2)))
10400 (home-page "https://github.com/AlecAivazis/nautilus")
10401 (synopsis "Library for creating microservice applications")
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)))
10408 (define-public python-snowballstemmer
10410 (name "python-snowballstemmer")
10414 (uri (pypi-uri "snowballstemmer" version))
10417 "0a0idq4y5frv7qsg2x62jd7rd272749xk4x99misf5rcifk2d7wi"))))
10418 (build-system python-build-system)
10420 `(;; No tests exist
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
10427 (license license:bsd-3)))
10429 (define-public python2-snowballstemmer
10430 (package-with-python2 python-snowballstemmer))
10432 (define-public python-sphinx-cloud-sptheme
10434 (name "python-sphinx-cloud-sptheme")
10438 (uri (pypi-uri "cloud_sptheme" version))
10441 "1dniqb6a39yh786f86c4jn666rwnyi1jvzn4616zhcchb7sfdshd"))))
10442 (build-system python-build-system)
10443 ;; FIXME: The 'pypi' release archive does not contain tests.
10444 (arguments '(#:tests? #f))
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)))
10453 (define-public python2-sphinx-cloud-sptheme
10454 (package-with-python2 python-sphinx-cloud-sptheme))
10456 (define-public python-sphinx-alabaster-theme
10458 (name "python-sphinx-alabaster-theme")
10462 (uri (pypi-uri "alabaster" version))
10465 "027anxzcb951gjlcc43y3rbn9qrw36d16vj9wd2smv5410xx9bs7"))))
10466 (build-system python-build-system)
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)))
10475 (define-public python2-sphinx-alabaster-theme
10476 (package-with-python2 python-sphinx-alabaster-theme))
10478 (define-public python-setproctitle
10480 (name "python-setproctitle")
10485 (uri (pypi-uri "setproctitle" version))
10488 "163kplw9dcrw0lffq1bvli5yws3rngpnvrxrzdw89pbphjjvg0v2"))))
10489 (build-system python-build-system)
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.
10498 (let ((nose (assoc-ref %build-inputs "python2-nose")))
10500 (substitute* "Makefile"
10501 (("\\$\\(PYTHON\\) [^ ]which nosetests[^ ] ")
10502 (string-append nose "/bin/nosetests "))))
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"))))))
10514 `(("procps" ,procps))) ; required for tests
10516 "https://github.com/dvarrazzo/py-setproctitle")
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).
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))))))
10529 (define-public python2-setproctitle
10530 (let ((base (package-with-python2
10531 (strip-python2-variant python-setproctitle))))
10534 (native-inputs `(("python2-nose" ,python2-nose)
10535 ,@(package-native-inputs base))))))
10537 (define-public python-validictory
10539 (name "python-validictory")
10544 (uri (pypi-uri "validictory" version))
10547 "1zf1g9sw47xzp5f80bd94pb42j9yqv82lcrgcvdwr6nkaphfi37q"))))
10548 (build-system python-build-system)
10551 (modify-phases %standard-phases
10552 (add-after 'unpack 'bootstrap
10553 ;; Move the tests out of the package directory to avoid
10556 (rename-file "validictory/tests" "tests")
10557 (delete-file "tests/__init__.py")))
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" )))))))
10566 `(("python-pytest" ,python-pytest)))
10568 "https://github.com/jamesturk/validictory")
10569 (synopsis "General purpose Python data validator")
10570 (description "It allows validation of arbitrary Python data structures.
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)))
10577 (define-public python2-validictory
10578 (package-with-python2 python-validictory))
10580 (define-public python-pyelftools
10582 (name "python-pyelftools")
10587 (uri (pypi-uri "pyelftools" version))
10590 "090vdksbz341f7ljvr0zswblw4lspa8qaiikzyjkf318arpxmil9"))))
10591 (build-system python-build-system)
10592 ;; Test suite requires python-setuptools
10594 `(("python-setuptools" ,python-setuptools)))
10596 "https://github.com/eliben/pyelftools")
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)))
10605 (define-public python-pyev
10607 (name "python-pyev")
10612 (uri (pypi-uri "pyev" version))
10615 "0rf603lc0s6zpa1nb25vhd8g4y337wg2wyz56i0agsdh7jchl0sx"))))
10616 (build-system python-build-system)
10618 `(#:tests? #f ; no test suite
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 "\"")))))))))
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)))
10635 (define-public python2-pyev
10636 (package-with-python2 python-pyev))
10638 (define-public python-imagesize
10640 (name "python-imagesize")
10645 (uri (pypi-uri "imagesize" version))
10648 "0qk07k0z4241lkzzjji7z4da04pcvg7bfc4xz1934zlqhwmwdcha"))))
10649 (build-system python-build-system)
10651 '(;; Test files are not distributed on PyPi:
10652 ;; https://github.com/shibukawa/imagesize_py/issues/7
10654 (home-page "https://github.com/shibukawa/imagesize_py")
10655 (synopsis "Gets image size of files in variaous formats in Python")
10657 "This package allows determination of image size from
10658 PNG, JPEG, JPEG2000 and GIF files in pure Python.")
10659 (license license:expat)))
10661 (define-public python2-imagesize
10662 (package-with-python2 python-imagesize))
10664 (define-public python-termstyle
10666 (name "python-termstyle")
10671 (uri (pypi-uri "termstyle" version))
10674 "17wzkkcqy5zc0g68xlad3kcv66iw14d2pwqc0h9420gak0vbhx7g"))))
10675 (build-system python-build-system)
10678 (modify-phases %standard-phases
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)))
10687 (define-public python-argcomplete
10689 (name "python-argcomplete")
10694 (uri (pypi-uri "argcomplete" version))
10697 "11bwiw6j0nilgz81xnw6f1npyga3prp8asjqrm87cdr3ria5l03x"))))
10698 (build-system python-build-system)
10700 `(("python-pexpect" ,python-pexpect)
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
10710 (license license:asl2.0)))
10712 (define-public python2-argcomplete
10713 (package-with-python2 python-argcomplete))
10715 (define-public python-xopen
10717 (name "python-xopen")
10722 (uri (pypi-uri "xopen" version))
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)))
10737 (define-public python2-xopen
10738 (let ((base (package-with-python2
10739 (strip-python2-variant python-xopen))))
10742 (propagated-inputs `(("python2-bz2file" ,python2-bz2file)
10743 ,@(package-propagated-inputs base))))))
10745 (define-public python2-cheetah
10747 (name "python2-cheetah")
10752 (uri (pypi-uri "Cheetah" version))
10755 "0l5mm4lnysjkzpjr95q5ydm9xc8bv43fxmr79ypybrf1y0lq4c5y"))))
10756 (build-system python-build-system)
10758 `(#:python ,python-2))
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
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.
10773 @item Generates HTML, SGML, XML, SQL, Postscript, form email, LaTeX, or any other
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.
10787 (license (license:x11-style "file://LICENSE"))))
10789 (define-public python-dulwich
10791 (name "python-dulwich")
10796 (uri (list (string-append "https://www.dulwich.io/releases/"
10797 "dulwich-" version ".tar.gz")
10798 (pypi-uri "dulwich" version)))
10801 "1aa1xfrxkc3j9s4xi0llhf5gndyi9ryprcxsqfa5fcb8ph34981q"))))
10802 (build-system python-build-system)
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
10810 (substitute* "dulwich/tests/compat/utils.py"
10811 (("'git'") (string-append "'"
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")
10821 `(("python-fastimport" ,python-fastimport)))
10823 `(("python-mock" ,python-mock)
10824 ("python-geventhttpclient" ,python-geventhttpclient)
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+))))
10833 (define-public python2-dulwich
10834 (package-with-python2 python-dulwich))
10836 (define-public python-pbkdf2
10838 (name "python-pbkdf2")
10843 (uri (pypi-uri "pbkdf2" version))
10846 "0yb99rl2mbsaamj571s1mf6vgniqh23v98k4632150hjkwv9fqxc"))))
10847 (build-system python-build-system)
10850 (modify-phases %standard-phases
10853 (setenv "PYTHONPATH"
10854 (string-append (getcwd) "/build/lib:"
10855 (getenv "PYTHONPATH")))
10856 (zero? (system* "python" "test/test_pbkdf2.py")))))))
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.
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)))
10871 (define-public python2-pbkdf2
10872 (package-with-python2 python-pbkdf2))
10874 (define-public python-qrcode
10876 (name "python-qrcode")
10881 (uri (pypi-uri "qrcode" version))
10884 "1gz1g2n9kqwqkak78aavr354z1v3yyiksk7q6xp5hi1zr6s0syq3"))))
10885 (build-system python-build-system)
10887 ;; FIXME: Tests require packaging 'pymaging'.
10890 `(("python-lxml" ,python-lxml) ; for SVG output
10891 ("python-pillow" ,python-pillow) ; for PNG output
10892 ("python-six" ,python-six)))
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
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
10906 (license license:bsd-3)))
10908 (define-public python2-qrcode
10909 (package-with-python2 python-qrcode))
10911 (define-public python-rst2ansi
10913 (name "python-rst2ansi")
10918 (uri (pypi-uri "rst2ansi" version))
10921 "0vzy6gd60l79ff750scl0sz48r1laalkl6md6dwzah4dcadgn5qv"))))
10922 (build-system python-build-system)
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")
10928 "Python module dedicated to rendering RST (reStructuredText) documents
10929 to ansi-escaped strings suitable for display in a terminal.")
10930 (license license:expat)))
10932 (define-public python-ansi2html
10934 (name "python-ansi2html")
10939 (uri (pypi-uri "ansi2html" version))
10942 "1wa00zffprb78w1mqq90dk47czz1knanys2a40zbw2vyapd5lp9y"))))
10943 (build-system python-build-system)
10945 `(("python-mock" ,python-mock)
10946 ("python-nose" ,python-nose)))
10948 `(("python-six" ,python-six)))
10949 (home-page "https://github.com/ralphbean/ansi2html")
10950 (synopsis "Convert ANSI-decorated console output to HTML")
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+)))
10956 (define-public python2-ansi2html
10957 (package-with-python2 python-ansi2html))
10959 (define-public python-ddt
10961 (name "python-ddt")
10966 (uri (pypi-uri "ddt" version))
10969 "1lw17420iimhghkgzgax85nn8d1an2d6k2cfvb7j5kwn2dqlr1vk"))))
10970 (build-system python-build-system)
10972 `(("python-mock" ,python-mock)
10973 ("python-nose" ,python-nose)))
10975 `(("python-six" ,python-six)
10976 ("python-pyyaml" ,python-pyyaml)))
10977 (home-page "https://github.com/txels/ddt")
10978 (synopsis "Data-Driven Tests")
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
10983 (license license:expat)))
10985 (define-public python2-ddt
10986 (package-with-python2 python-ddt))
10988 (define-public python-pycountry
10990 (name "python-pycountry")
10991 (version "18.5.26")
10995 (uri (pypi-uri "pycountry" version))
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.")
11003 "@code{pycountry} provides the ISO databases for the standards:
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)
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+)))
11016 (define-public python2-pycountry
11017 (package-with-python2 python-pycountry))
11019 (define-public python-pycosat
11021 (name "python-pycosat")
11026 (uri (pypi-uri "pycosat" version))
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)")
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)))
11041 (define-public python2-pycosat
11042 (package-with-python2 python-pycosat))
11044 (define-public python2-ruamel.ordereddict
11046 (name "python2-ruamel.ordereddict")
11051 (uri (pypi-uri "ruamel.ordereddict" version))
11054 "1xmkl8v9l9inm2pyxgc1fm5005yxm7fkd5gv74q7lj1iy5qc8n3h"))))
11055 (build-system python-build-system)
11057 `(#:python ,python-2
11059 (modify-phases %standard-phases
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")
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)))
11078 (define-public python-pypeg2
11080 (name "python-pypeg2")
11085 (uri (pypi-uri "pyPEG2" version))
11088 "0v8ziaam2r637v94ra4dbjw6jzxz99gs5x4i585kgag1v204yb9b"))))
11089 (build-system python-build-system)
11090 (propagated-inputs `(("python-lxml" ,python-lxml)))
11092 ;;https://bitbucket.org/fdik/pypeg/issues/36/test-failures-on-py35
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)))
11101 (define-public python-incremental
11103 (name "python-incremental")
11108 (uri (pypi-uri "incremental" version))
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
11117 (license license:expat)))
11119 (define-public python2-incremental
11120 (package-with-python2 python-incremental))
11122 (define-public python-automat
11124 (name "python-automat")
11128 (uri (pypi-uri "Automat" version))
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))
11139 `(("python-m2r" ,python-m2r)
11140 ("python-setuptools-scm" ,python-setuptools-scm)
11141 ("python-graphviz" ,python-graphviz)))
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
11150 (license license:expat)))
11152 (define-public python2-automat
11153 (package-with-python2 python-automat))
11155 (define-public python-m2r
11157 (name "python-m2r")
11161 (uri (pypi-uri "m2r" version))
11164 "1axrwnf425sz4qz3c0qc7yhhki4myzb8rki7pczcsgzznzmqdyxd"))))
11165 (build-system python-build-system)
11167 `(("python-docutils" ,python-docutils)
11168 ("python-mistune" ,python-mistune)))
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
11176 (license license:expat)))
11178 (define-public python2-m2r
11179 (package-with-python2 python-m2r))
11181 (define-public python-constantly
11183 (name "python-constantly")
11187 (uri (pypi-uri "constantly" version))
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)))
11199 (define-public python2-constantly
11200 (package-with-python2 python-constantly))
11202 (define-public python-attrs
11204 (name "python-attrs")
11208 (uri (pypi-uri "attrs" version))
11211 "1jafnn1kzd6qhxgprhx6y6ik1r5m2rilx25syzcmq03azp660y8w"))))
11212 (build-system python-build-system)
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
11225 (license license:expat)))
11227 (define-public python2-attrs
11228 (package-with-python2 python-attrs))
11230 (define-public python-attrs-bootstrap
11232 (inherit python-attrs)
11233 (name "python-attrs-bootstrap")
11234 (native-inputs `())
11235 (arguments `(#:tests? #f))))
11237 (define-public python2-attrs-bootstrap
11238 (package-with-python2 python-attrs-bootstrap))
11240 (define-public python2-cliapp
11242 (name "python2-cliapp")
11243 (version "1.20170823")
11247 (uri (string-append
11248 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/cliapp/snapshot/cliapp-"
11249 version ".tar.gz"))
11252 "1i9gik0xrj6jmi95s5w988jl1y265baz5xm5pbqdyvsh8h9ln6yq"))))
11253 (build-system python-build-system)
11255 `(#:python ,python-2
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,
11262 (add-before 'build 'check
11264 ;; Disable python3 tests
11265 (substitute* "check"
11266 (("python3") "# python3"))
11267 (zero? (system* "./check")))))))
11269 `(("python2-coverage-test-runner" ,python2-coverage-test-runner)
11270 ("python2-pep8" ,python2-pep8)))
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+)))
11281 (define-public python2-ttystatus
11283 (name "python2-ttystatus")
11288 (uri (string-append
11289 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/ttystatus/snapshot/ttystatus-"
11290 version ".tar.gz"))
11293 "0vivqbw7ddhsq1zj3g9cvvv4f0phl0pis2smsnwcr2szz2fk3hl6"))))
11294 (build-system python-build-system)
11296 `(("python2-coverage-test-runner" ,python2-coverage-test-runner)
11297 ("python2-pep8" ,python2-pep8)))
11299 `(#:python ,python-2
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,
11306 (add-before 'build 'check
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+)))
11319 (define-public python2-tracing
11321 (name "python2-tracing")
11326 (uri (string-append
11327 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/python-tracing/snapshot/tracing-"
11328 version ".tar.gz"))
11331 "06cw4zg42fsvqy372vi2whj26w56vzg5axhzwdjc2bgwf03garbw"))))
11332 (build-system python-build-system)
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+)))
11345 (define-public python2-larch
11347 (name "python2-larch")
11348 (version "1.20151025")
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"))
11359 "1p4knkkavlqymgciz2wbcnfrdgdbafhg14maplnk4vbw0q8xs663"))))
11360 (build-system python-build-system)
11362 `(#:python ,python-2
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,
11369 (add-before 'build 'check
11371 (zero? (system* "make" "check")))))))
11373 `(("cmdtest" ,cmdtest)
11374 ("python2-coverage-test-runner" ,python2-coverage-test-runner)))
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.
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+)))
11390 (define-public python-astroid
11392 (name "python-astroid")
11397 (uri (string-append
11398 "https://github.com/PyCQA/astroid/archive/astroid-"
11399 version ".tar.gz"))
11402 "0isn5p7f9n48hmksgbrj7dkm9dyglnayzn5jngk37qywg8a74ngn"))))
11403 (build-system python-build-system)
11405 `(("python-lazy-object-proxy" ,python-lazy-object-proxy)
11406 ("python-six" ,python-six)
11407 ("python-wrapt" ,python-wrapt)))
11410 (modify-phases %standard-phases
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
11418 (description "@code{python-astroid} provides a common base representation
11419 of python source code for projects such as pychecker, pyreverse, pylint, etc.
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))))))
11430 (define-public python2-astroid
11431 (let ((base (package-with-python2
11432 (strip-python2-variant python-astroid))))
11433 (package (inherit base)
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))))))
11441 (define-public python-isort
11443 (name "python-isort")
11448 (uri (string-append
11449 "https://github.com/timothycrosley/isort/archive/"
11450 version ".tar.gz"))
11451 (file-name (string-append name "-" version ".tar.gz"))
11454 "0zsrgkb0krn5476yncy5dd56k7dk34zqb4bnlvwy44ixgilyjmfh"))))
11455 (build-system python-build-system)
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
11465 (license license:expat)))
11467 (define-public python2-isort
11468 (package-with-python2 python-isort))
11470 (define-public python2-backports-functools-lru-cache
11472 (name "python2-backports-functools-lru-cache")
11477 ;; only the pypi tarballs contain the necessary metadata
11478 (uri (pypi-uri "backports.functools_lru_cache" version))
11481 "06jgv8gib4fhky0p5cmxdghvsgjyzcdgk48k8pxb1ccf11znk64x"))))
11482 (build-system python-build-system)
11484 `(("python2-setuptools-scm" ,python2-setuptools-scm)))
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)))
11493 (define-public python-configparser
11495 (name "python-configparser")
11500 (uri (string-append
11501 "https://bitbucket.org/ambv/configparser/get/"
11502 version ".tar.bz2"))
11503 (file-name (string-append name "-" version ".tar.gz"))
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)))
11515 (define-public python2-configparser
11516 (package-with-python2 python-configparser))
11518 (define-public python-mando
11520 (name "python-mando")
11524 (uri (pypi-uri "mando" version))
11527 "0q6rl085q1hw1wic52pqfndr0x3nirbxnhqj9akdm5zhq2fv3zkr"))))
11528 (build-system python-build-system)
11530 `(("python-rst2ansi" ,python-rst2ansi)
11531 ("python-six" ,python-six)))
11533 `(("python-pytest" ,python-pytest)))
11534 (home-page "https://mando.readthedocs.org/")
11536 "Wrapper around argparse, allowing creation of complete CLI applications")
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)))
11542 (define-public python2-mando
11543 (package-with-python2 python-mando))
11545 (define-public python-fudge
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.
11554 (uri (pypi-uri "fudge" version))
11557 "185ia3vr3qk4f2s1a9hdxb8ci4qc0x0xidrad96pywg8j930qs9l"))))
11558 (build-system python-build-system)
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")
11564 "Fudge is a Python module for using fake objects (mocks and stubs) to
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)))
11575 (define-public python2-fudge
11576 (package-with-python2 python-fudge))
11578 (define-public python-mwclient
11580 (name "python-mwclient")
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"))
11591 "1jj0yhilkjir00719fc7w133x7hdyhkxhk6xblla4asig45klsfv"))))
11592 (build-system python-build-system)
11594 `(("python-requests" ,python-requests)
11595 ("python-requests-oauthlib"
11596 ,python-requests-oauthlib)
11597 ("python-six" ,python-six)))
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)))
11610 (define-public python2-mwclient
11611 (package-with-python2 python-mwclient))
11613 (define-public python-utils
11615 (name "python-utils")
11619 (uri (pypi-uri "python-utils" version))
11622 "1mcsy6q5am4ya72rgkpb6kax6vv7c93cfkkas89xnpa4sj9zf28p"))))
11623 (build-system python-build-system)
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")
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)))
11635 (define-public python2-utils
11636 (package-with-python2 python-utils))
11638 (define-public python-sphinx-me
11640 (name "python-sphinx-me")
11645 (uri (pypi-uri "sphinx-me" version))
11648 "06jzgp213zihnvpcy2y5jy3ykid3apc2ncp2pg6a2g05lhiziglq"))))
11649 (build-system python-build-system)
11650 (home-page "https://github.com/stephenmcd/sphinx-me")
11651 (synopsis "Create a Sphinx documentation shell")
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)))
11659 (define-public python2-sphinx-me
11660 (package-with-python2 python-sphinx-me))
11662 (define-public python-diff-match-patch
11664 (name "python-diff-match-patch")
11665 (version "20121119")
11669 (uri (pypi-uri "diff-match-patch" version))
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)))
11680 (define-public python2-diff-match-patch
11681 (package-with-python2 python-diff-match-patch))
11683 (define-public python-dirsync
11685 (name "python-dirsync")
11690 (uri (pypi-uri "dirsync" version))
11693 "1r40fkanksagcszf1ag85mdr8w7rgc7196n6s1qlsk2abw6i7v0z"))))
11694 (build-system python-build-system)
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)))
11702 (define-public python2-dirsync
11703 (package-with-python2 python-dirsync))
11705 (define-public python-levenshtein
11707 (name "python-levenshtein")
11712 (uri (pypi-uri "python-Levenshtein" version))
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")
11720 "The Levenshtein Python C extension module contains functions for fast computation of
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
11727 It supports both normal and Unicode strings.")
11728 (license license:gpl2+)))
11730 (define-public python2-levenshtein
11731 (package-with-python2 python-levenshtein))
11733 (define-public python-scandir
11735 (name "python-scandir")
11740 (uri (pypi-uri "scandir" version))
11742 (base32 "0gbnhjzg42rj87ljv9kb648rfxph69ly3c8r9841dxy4d7l5pmdj"))))
11743 (build-system python-build-system)
11745 `(#:phases (modify-phases %standard-phases
11748 (invoke "python" "test/run_tests.py"))))))
11749 (home-page "https://github.com/benhoyt/scandir")
11750 (synopsis "Directory iteration function")
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.
11758 This package is part of the Python standard library since version 3.5.")
11759 (license license:bsd-3)))
11761 (define-public python2-scandir
11762 (package-with-python2 python-scandir))
11764 (define-public python2-stemming
11766 (name "python2-stemming")
11771 (uri (pypi-uri "stemming" version))
11773 (base32 "0ldwa24gnnxhniv0fhygkpc2mwgd93q10ag8rvzayv6hw418frsr"))))
11774 (build-system python-build-system)
11776 `(#:python ,python-2))
11777 (home-page "https://bitbucket.org/mchaput/stemming/overview")
11778 (synopsis "Python implementations of various stemming algorithms")
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
11785 (license license:public-domain)))
11787 (define-public python-factory-boy
11789 (name "python-factory-boy")
11794 (uri (pypi-uri "factory_boy" version))
11796 (base32 "1fvin6san5xsjh2c4y18caj2lnmwxlylyqm8mh1yc6rp38wlwr56"))))
11797 (build-system python-build-system)
11799 ;; Tests are not included in the tarball.
11802 `(("faker" ,python-faker)))
11803 (home-page "https://github.com/benhoyt/scandir")
11804 (synopsis "Versatile test fixtures replacement")
11806 "Factory_boy is a fixtures replacement based on thoughtbot’s factory_girl.
11808 As a fixtures replacement tool, it aims to replace static, hard to maintain
11809 fixtures with easy-to-use factories for complex object.
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)))
11816 (define-public python2-factory-boy
11817 (package-with-python2 python-factory-boy))
11819 (define-public python-translate-toolkit
11821 (name "python-translate-toolkit")
11826 (uri (pypi-uri "translate-toolkit" version ".tar.bz2"))
11828 (base32 "1vlkwrg83vb17jc36pmwh2b7jphwf390lz0jw8hakcg16qhwypvq"))))
11829 (build-system python-build-system)
11831 `(("python-pytest" ,python-pytest)
11832 ("python-sphinx" ,python-sphinx)))
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)))
11844 ;; TODO: tests are not run, because they end with
11845 ;; TypeError: parse() missing 2 required positional arguments: 'tree' and
11847 ;; during test setup.
11849 (home-page "http://toolkit.translatehouse.org")
11850 (synopsis "Tools and API for translation and localization engineering")
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+)))
11856 (define-public python2-translate-toolkit
11857 (package-with-python2 python-translate-toolkit))
11859 (define-public python-packaging
11861 (name "python-packaging")
11866 (uri (pypi-uri "packaging" version))
11869 "17k1xbjshackwvbsnxqixbph8rbqhz4bf4g3al5xyzhavxgq6l2x"))))
11870 (build-system python-build-system)
11872 `(("python-pretend" ,python-pretend)
11873 ("python-pytest" ,python-pytest)))
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
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
11886 (license (list license:asl2.0 license:bsd-2))))
11888 (define-public python2-packaging
11889 (package-with-python2 python-packaging))
11891 (define-public python-relatorio
11893 (name "python-relatorio")
11898 (uri (pypi-uri "relatorio" version))
11901 "1na6hlhz1awi1hbjg1gyclq0khz42iz90wvdjw7mmj655788bpxx"))))
11902 (build-system python-build-system)
11904 `(("python-lxml" ,python-lxml)
11905 ("python-genshi" ,python-genshi)))
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+)))
11915 (define-public python2-relatorio
11916 (package-with-python2 python-relatorio))
11918 (define-public python-radon
11920 (name "python-radon")
11925 (uri (pypi-uri "radon" version))
11928 "07gq5hq4nrffxnlnksws9hrx7fd001gam63j62i82gyfr23gvdym"))))
11929 (build-system python-build-system)
11931 `(#:phases (modify-phases %standard-phases
11934 (invoke "python" "radon/tests/run.py"))))))
11936 `(("python-colorama" ,python-colorama)
11937 ("python-flake8-polyfill" ,python-flake8-polyfill)
11938 ("python-mando" ,python-mando)))
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:
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)
11952 (license license:expat)))
11954 (define-public python2-radon
11955 (package-with-python2 python-radon))
11957 (define-public python-sure
11959 (name "python-sure")
11964 (uri (pypi-uri "sure" version))
11967 "1and0drq8w9iplsic22n2h7hkpyq03a1mbqk4sgcdqhqzdqm539w"))))
11968 (build-system python-build-system)
11970 `(("python-mock" ,python-mock)
11971 ("python-six" ,python-six)))
11973 `(("python-nose" ,python-nose)))
11974 (home-page "https://github.com/gabrielfalcao/sure")
11975 (synopsis "Automated testing library in python for python")
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+)))
11981 (define-public python2-sure
11982 (package-with-python2 python-sure))
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.
11988 (name "python2-couleur")
11993 (uri (pypi-uri "couleur" version))
11996 "1qqaxyqz74wvid0cr119dhcwz0h0if5b5by44zl49pd5z65v58k1"))))
11997 (build-system python-build-system)
11999 `(#:python ,python-2))
12000 (home-page "https://github.com/gabrielfalcao/couleur")
12002 "ANSI terminal tool for python, colored shell and other handy fancy features")
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+)))
12010 (define-public python-misaka
12012 (name "python-misaka")
12017 (uri (pypi-uri "misaka" version))
12020 "1yqrq3a5rracirmvk52n28nn6ckdaz897gnigv89a9gmyn87sqw7"))))
12021 (build-system python-build-system)
12023 `(;; Line 37 of setup.py calls self.run_command('develop')
12024 ;; in the 'check' phase. This command seems to be trying
12026 ;; /gnu/store/...-python-<version>/lib/python<version>/site-packages/
12027 ;; for which it does not have the permission to write.
12030 `(("python-cffi" ,python-cffi)))
12031 (home-page "https://github.com/FSX/misaka")
12032 (synopsis "Python binding for Hoedown")
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)))
12039 (define-public python2-misaka
12040 (package-with-python2 python-misaka))
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
12047 (name "python2-steadymark")
12052 (uri (pypi-uri "steadymark" version))
12055 "1640i9g8dycql3cc8j0bky0jkzj0q39blfbp4lsgpkprkfgcdk8v"))))
12056 (build-system python-build-system)
12058 `(("python-couleur" ,python2-couleur)
12059 ("python-sure" ,python2-sure)
12060 ("python-misaka" ,python2-misaka)))
12062 `(#:python ,python-2
12064 (modify-phases %standard-phases
12065 (add-before 'build 'patch-setup-py
12067 ;; Update requirements from dependency==version
12068 ;; to dependency>=version
12069 (substitute* "setup.py"
12072 (home-page "https://github.com/gabrielfalcao/steadymark")
12073 (synopsis "Markdown-based test runner for python")
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)))
12081 (define-public python-jsonpointer
12083 (name "python-jsonpointer")
12088 (uri (pypi-uri "jsonpointer" version))
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)))
12099 (define-public python2-jsonpointer
12100 (package-with-python2 python-jsonpointer))
12102 (define-public python-jsonpatch
12104 (name "python-jsonpatch")
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"))
12115 "085ykisl8v7mv9h7hvhdy3l2fjzs4214gx32r5k6nx4f76hbv6y5"))))
12116 (build-system python-build-system)
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)))
12125 (define-public python2-jsonpatch
12126 (package-with-python2 python-jsonpatch))
12128 (define-public python-jsonpatch-0.4
12129 (package (inherit python-jsonpatch)
12130 (name "python-jsonpatch")
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"))
12140 "0j0cd9z9zyp8kppp464jxrfgrnbgkzl1yi10i5gsv8yz6d95929d"))))))
12142 (define-public python2-jsonpatch-0.4
12143 (package-with-python2 python-jsonpatch-0.4))
12145 (define-public python-rfc3986
12147 (name "python-rfc3986")
12151 (uri (pypi-uri "rfc3986" version))
12154 "06wlmysw83f75ff84zr1yr6n0shvc2xn1n1sb4iwzqap9hf5fn44"))))
12155 (build-system python-build-system)
12157 `(#:modules ((guix build utils)
12158 (guix build python-build-system)
12163 (modify-phases %standard-phases
12166 (let ((cwd (getcwd)))
12167 (setenv "PYTHONPATH"
12168 (string-append cwd "/build/"
12169 (find (cut string-prefix? "lib" <>)
12170 (scandir (string-append cwd "/build")))
12172 (getenv "PYTHONPATH")))
12173 (invoke "pytest" "-v")))))))
12175 `(("python-pytest" ,python-pytest)))
12176 (home-page "https://rfc3986.readthedocs.io/")
12177 (synopsis "Parse and validate URI references")
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)))
12184 (define-public python2-rfc3986
12185 (package-with-python2 python-rfc3986))
12187 (define-public python-rfc3987
12189 (name "python-rfc3987")
12194 (uri (pypi-uri "rfc3987" version))
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+)))
12205 (define-public python2-rfc3987
12206 (package-with-python2 python-rfc3987))
12208 (define-public python-validate-email
12210 (name "python-validate-email")
12215 (uri (pypi-uri "validate_email" version))
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+)))
12226 (define-public python2-validate-email
12227 (package-with-python2 python-validate-email))
12229 (define-public python-flex
12231 (name "python-flex")
12236 (uri (pypi-uri "flex" version))
12239 "00pamnwla3khk8nyla7y28dq9jnh69swd7f4jfsl7sn1izs8n8zk"))))
12240 (build-system python-build-system)
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)))
12255 (define-public python2-flex
12256 (package-with-python2 python-flex))
12258 (define-public python-marshmallow
12260 (name "python-marshmallow")
12261 (version "3.0.0b14")
12265 (uri (pypi-uri "marshmallow" version))
12268 "1digk3f5cfk7wmlka65mc7bzsd96pbsgcsvp6pimd5b4ff9zb5p3"))))
12269 (build-system python-build-system)
12271 `(("python-dateutil" ,python-dateutil)
12272 ("python-simplejson" ,python-simplejson)))
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)))
12283 (define-public python2-marshmallow
12284 (package-with-python2 python-marshmallow))
12286 (define-public python-apispec
12288 (name "python-apispec")
12293 (uri (pypi-uri "apispec" version))
12296 "0kxa8723zbisx10363yh4mmmn4higxrspymbjfz5zq8f644zagm9"))))
12297 (build-system python-build-system)
12299 `(("python-pyyaml" ,python-pyyaml)))
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.
12312 (license license:expat)))
12314 (define-public python2-apispec
12315 (package-with-python2 python-apispec))
12317 (define-public python-flasgger
12319 (name "python-flasgger")
12324 (uri (string-append "https://github.com/rochacbruno/flasgger/archive/"
12325 version ".tar.gz"))
12326 (file-name (string-append name "-" version ".tar.gz"))
12329 "1gqzlm0rb55fdpsy5ipkganlx9cnpi454fqyycr03jm22zql14ay"))))
12330 (build-system python-build-system)
12333 (modify-phases %standard-phases
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)
12341 (getenv "PYTHONPATH")))
12342 (zero? (system* "py.test")))))))
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)))
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)))
12364 (define-public python2-flasgger
12365 (package-with-python2 python-flasgger))
12367 (define-public python-swagger-spec-validator
12369 (name "python-swagger-spec-validator")
12374 (uri (pypi-uri "swagger-spec-validator" version))
12377 "13hkpn2lycwr0468yqhjb3kwszqf7hjwlq61w7vdxq1caz31k4nw"))))
12378 (build-system python-build-system)
12380 `(("python-jsonschema" ,python-jsonschema)
12381 ("python-six" ,python-six)))
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)))
12389 (define-public python2-swagger-spec-validator
12390 (package-with-python2 python-swagger-spec-validator))
12392 (define-public python-apache-libcloud
12394 (name "python-apache-libcloud")
12399 (uri (pypi-uri "apache-libcloud" version))
12402 "15xg79ad4g2xrk081ylvj41k5hmg9hl1xvbmb5hd0fqn08wfwbhf"))))
12403 (build-system python-build-system)
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")
12413 (add-after 'unpack 'patch-tests
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,
12420 {\"test\": \"value\"},
12421 httplib.responses[httplib.OK])
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'"))
12432 (add-before 'check 'copy-secret
12434 (copy-file "libcloud/test/secrets.py-dist"
12435 "libcloud/test/secrets.py")
12438 `(("openssh" ,openssh)))
12440 `(("python-paramiko" ,python-paramiko)
12441 ("python-requests" ,python-requests)))
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)))
12454 (define-public python2-apache-libcloud
12455 (package-with-python2 python-apache-libcloud))
12457 (define-public python-smmap2
12459 (name "python-smmap2")
12464 (uri (pypi-uri "smmap2" version))
12467 "1hvn28p3zvxa98sbi9lrqvv2ps4q284j4jq9a619zw0m7yv0sly7"))))
12468 (build-system python-build-system)
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)))
12477 (define-public python2-smmap2
12478 (package-with-python2 python-smmap2))
12480 (define-public python-regex
12482 (name "python-regex")
12483 (version "2017.06.07")
12486 (uri (pypi-uri "regex" version))
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)))
12498 (define-public python2-regex
12499 (package-with-python2 python-regex))
12501 (define-public python2-pyopengl
12503 (name "python2-pyopengl")
12508 (uri (pypi-uri "PyOpenGL" version))
12511 "1byxjj6a8rwzhxhjqlc588zdad2qwxdd7vlam2653ylll31waiwv"))))
12513 `(#:python ,python-2))
12514 (build-system python-build-system)
12515 (home-page "http://pyopengl.sourceforge.net")
12516 (synopsis "Standard OpenGL bindings for Python")
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}
12521 (license license:bsd-3)))
12523 (define-public python2-pyopengl-accelerate
12525 (inherit python2-pyopengl)
12526 (name "python2-pyopengl-accelerate")
12531 (uri (pypi-uri "PyOpenGL-accelerate" version))
12534 "0464c1ifzk0k92lyndikmvzjgnx1y25r7bkkc8pnxm4kp1q4czwj"))))
12535 (synopsis "Acceleration code for PyOpenGL")
12537 "This is the Cython-coded accelerator module for PyOpenGL.")))
12539 (define-public python-rencode
12541 (name "python-rencode")
12546 (uri (pypi-uri "rencode" version))
12549 "0mzwdq1is7kyyr32i5k4iz6g5xxdvmiyc132jnc60p9m6lnwjrpv"))))
12550 (build-system python-build-system)
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.
12558 (delete-file "rencode/t.py")
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")
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)))
12573 (define-public python2-rencode
12574 (package-with-python2 python-rencode))
12576 (define-public python-xenon
12578 (name "python-xenon")
12583 (uri (pypi-uri "xenon" version))
12586 "029cbhysg2vr5n4jz8gpg2793f8wkwnqpr1qgv6c1dn685vy31mc"))))
12587 (build-system python-build-system)
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)))
12596 (modify-phases %standard-phases
12597 (add-before 'build 'patch-test-requirements
12599 ;; Remove httpretty dependency for tests.
12600 (substitute* "setup.py"
12601 (("httpretty") ""))
12603 (home-page "https://xenon.readthedocs.org/")
12604 (synopsis "Monitor code metrics for Python on your CI server")
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)))
12613 (define-public python2-xenon
12614 (package-with-python2 python-xenon))
12616 (define-public python-pysocks
12618 (name "python-pysocks")
12623 (uri (pypi-uri "PySocks" version))
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)))
12635 (define-public python2-pysocks
12636 (package-with-python2 python-pysocks))
12638 (define-public python-pydiff
12640 (name "python-pydiff")
12645 (uri (pypi-uri "pydiff" version))
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")
12653 "@code{pydiff} makes it easy to look for actual code changes while
12654 ignoring formatting changes.")
12655 (license license:expat)))
12657 (define-public python2-pydiff
12658 (package-with-python2 python-pydiff))
12660 (define-public python-tqdm
12662 (name "python-tqdm")
12667 (uri (pypi-uri "tqdm" version))
12670 "1pw0ngm0zn9papdmkwipi3yih5c3di6d0w849bdmrraq4d2d9h2y"))))
12671 (build-system python-build-system)
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")
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))))
12684 (define-public python2-tqdm
12685 (package-with-python2 python-tqdm))
12687 (define-public python-pkginfo
12689 (name "python-pkginfo")
12694 (uri (pypi-uri "pkginfo" version))
12697 "0x6lm17p1ks031mj6pajyp4rkq74vpqq8qwjb7ikgwmkli1day2q"))))
12698 (build-system python-build-system)
12700 ;; The tests are broken upstream.
12703 "https://code.launchpad.net/~tseaver/pkginfo/trunk")
12705 "Query metadatdata from sdists, bdists, and installed packages")
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)))
12714 (define-public python2-pkginfo
12715 (package-with-python2 python-pkginfo))
12717 (define-public python-twine
12719 (name "python-twine")
12724 (uri (pypi-uri "twine" version))
12727 "1ay1b6kdq6k4bfbjsvf6ymj41wrgpvinhxndb09355pwhxwmp96a"))))
12728 (build-system python-build-system)
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")
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)))
12742 (define-public python2-twine
12743 (package-with-python2 python-twine))
12745 (define-public python-linecache2
12747 (name "python-linecache2")
12752 (uri (pypi-uri "linecache2" version))
12755 "0z79g3ds5wk2lvnqw0y2jpakjf32h95bd9zmnvp7dnqhf57gy9jb"))))
12756 (build-system python-build-system)
12758 `(;; The tests depend on unittest2, and our version is a bit too old.
12761 `(("python-pbr" ,python-pbr-minimal)))
12763 "https://github.com/testing-cabal/linecache2")
12764 (synopsis "Backports of the linecache module")
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)))
12771 (define-public python2-linecache2
12772 (package-with-python2 python-linecache2))
12774 (define-public python-traceback2
12776 (name "python-traceback2")
12781 (uri (pypi-uri "traceback2" version))
12784 "0c1h3jas1jp1fdbn9z2mrgn3jj0hw1x3yhnkxp7jw34q15xcdb05"))))
12785 (build-system python-build-system)
12787 `(;; python-traceback2 and python-unittest2 depend on one another.
12790 `(("python-pbr" ,python-pbr-minimal)))
12792 `(("python-linecache2" ,python-linecache2)))
12794 "https://github.com/testing-cabal/traceback2")
12795 (synopsis "Backports of the traceback module")
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)))
12802 (define-public python2-traceback2
12803 (package-with-python2 python-traceback2))
12805 (define-public python-ratelimiter
12807 (name "python-ratelimiter")
12812 (uri (pypi-uri "ratelimiter" version))
12815 "1dhz85mj5bqd2mij84ncs6pz32hgidr79hay4aqfmzaa4rbb497p"))))
12816 (build-system python-build-system)
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")
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)))
12826 (define-public python2-ratelimiter
12827 (package-with-python2 python-ratelimiter))
12829 (define-public python-dukpy
12831 (name "python-dukpy")
12836 (uri (string-append "https://github.com/kovidgoyal/dukpy/archive/v"
12837 version ".tar.gz"))
12838 (file-name (string-append name "-" version ".tar.gz"))
12841 "0pj39rfwlzivqm5hkrsza7gssg6ggpxlq5ivc8f3h7x5pfgc6y6c"))))
12842 (build-system python-build-system)
12843 (home-page "https://github.com/kovidgoyal/dukpy")
12844 (synopsis "Run JavaScript in python")
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))))
12852 (define-public python2-dukpy
12853 (package-with-python2 python-dukpy))
12855 (define-public python-jsonrpclib-pelix
12857 (name "python-jsonrpclib-pelix")
12862 (uri (pypi-uri "jsonrpclib-pelix" version))
12865 "0f83z5zi7w32vprhk1dyc94ir1bh4hdd57bjdbwkq9ykng8qilhl"))))
12866 (build-system python-build-system)
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")
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
12876 (license license:asl2.0)))
12878 (define-public python2-jsonrpclib-pelix
12879 (package-with-python2 python-jsonrpclib-pelix))
12881 (define-public python-setuptools-scm-git-archive
12883 (name "python-setuptools-scm-git-archive")
12888 (uri (pypi-uri "setuptools_scm_git_archive" version))
12891 "1nii1sz5jq75ilf18bjnr11l9rz1lvdmyk66bxl7q90qan85yhjj"))))
12892 (build-system python-build-system)
12894 `(("python-pytest" ,python-pytest)))
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")
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)))
12905 (define-public python2-setuptools-scm-git-archive
12906 (package-with-python2 python-setuptools-scm-git-archive))
12908 (define-public python-pyclipper
12910 (name "python-pyclipper")
12915 (uri (pypi-uri "pyclipper" version ".zip"))
12918 "1zpmwv3bya3j984y5cf9x9d5108kf6mxldcba68wiq0frv5qrssw"))))
12919 (build-system python-build-system)
12921 `(#:tests? #f)); 8 Tests fail, 37 succeed
12923 `(("python-setuptools-scm-git-archive" ,python-setuptools-scm-git-archive)))
12925 `(("unzip" ,unzip)))
12926 (home-page "https://github.com/greginvm/pyclipper")
12927 (synopsis "Wrapper for Angus Johnson's Clipper library")
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)))
12933 (define-public python2-pyclipper
12934 (package-with-python2 python-pyclipper))
12936 (define-public python2-booleanoperations
12938 (name "python2-booleanoperations")
12943 (uri (pypi-uri "booleanOperations" version ".zip"))
12946 "1hw42fazdpvsn77glx96hwsj9l17mvx37sc5707s08y5w6fx16mn"))))
12947 (build-system python-build-system)
12949 `(#:python ,python-2))
12952 ("python2-pytest" ,python2-pytest)
12953 ("python2-pytest-runner" ,python2-pytest-runner)))
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")
12961 "BooleanOperations provides a Python library that enables
12962 boolean operations on paths.")
12963 (license license:expat)))
12965 (define-public python-tempdir
12967 (name "python-tempdir")
12972 (uri (pypi-uri "tempdir" version))
12975 "13msyyxqbicr111a294x7fsqbkl6a31fyrqflx3q7k547gnq15k8"))))
12976 (build-system python-build-system)
12977 (home-page "https://pypi.org/project/tempdir/")
12979 ;; the package has no tests
12981 (synopsis "Python library for managing temporary directories")
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)))
12988 (define-public python2-tempdir
12989 (package-with-python2 python-tempdir))
12991 (define-public python-activepapers
12993 (name "python-activepapers")
12998 (uri (pypi-uri "ActivePapers.Py" version))
13001 "12wkhjh90ffipjzv10swndp2xv9hd7xrxvg6v0n4n3i411pj4xb8"))))
13002 (build-system python-build-system)
13004 `(#:modules ((ice-9 ftw)
13007 (guix build python-build-system))
13010 (modify-phases %standard-phases
13011 (add-after 'unpack 'delete-python2-code
13013 (for-each delete-file
13014 '("lib/activepapers/builtins2.py"
13015 "lib/activepapers/standardlib2.py"
13016 "lib/activepapers/utility2.py"))))
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)))
13029 (string-suffix? ".py" filename)))))))))
13031 `(("python-tempdir" ,python-tempdir)
13032 ("python-nose" ,python-nose)))
13034 `(("python-h5py" ,python-h5py)))
13035 (home-page "http://www.activepapers.org/")
13036 (synopsis "Executable papers for scientific computing")
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)))
13045 (define-public python2-activepapers
13046 (let ((base (package-with-python2
13047 (strip-python2-variant python-activepapers))))
13051 (substitute-keyword-arguments (package-arguments base)
13053 `(modify-phases ,phases
13054 (delete 'delete-python2-code)
13055 (add-after 'unpack 'delete-python3-code
13057 (for-each delete-file
13058 '("lib/activepapers/builtins3.py"
13059 "lib/activepapers/standardlib3.py"
13060 "lib/activepapers/utility3.py")))))))))))
13062 (define-public python-semver
13064 (name "python-semver")
13069 (uri (pypi-uri "semver" version))
13072 "0hhgqppchv59rqj0yzi1prdg2nfsywqmjsqy2rycyxm0hvxmbyqz"))))
13073 (build-system python-build-system)
13076 (modify-phases %standard-phases
13077 (add-after 'unpack 'patch-test-requirements
13079 (substitute* "setup.py"
13080 ;; Our Python is new enough.
13081 (("'virtualenv<14\\.0\\.0'") "'virtualenv'"))
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)))
13092 (define-public python2-semver
13093 (package-with-python2 python-semver))
13095 (define-public python2-pyro
13097 (name "python2-pyro")
13102 (uri (pypi-uri "Pyro" version))
13103 (file-name (string-append "Pyro-" version ".tar.gz"))
13106 "0y75wzdqbjy565rpxaxscav4j8xg060sa90lnmb7aypgaf251v8v"))))
13107 (build-system python-build-system)
13109 ;; Pyro is not compatible with Python 3
13110 `(#:python ,python-2
13111 ;; Pyro has no test cases for automatic execution
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)))
13124 (define-public python2-scientific
13126 (name "python2-scientific")
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"))
13137 "0fc69zhlsn9d2jvbzyjl9ah53vj598h84nkq230c83ahfvgzx5y3"))))
13138 (build-system python-build-system)
13140 `(("netcdf" ,netcdf)))
13142 `(("python-numpy" ,python2-numpy-1.8)
13143 ("python-pyro" ,python2-pyro)))
13145 ;; ScientificPython is not compatible with Python 3
13146 `(#:python ,python-2
13147 #:tests? #f ; No test suite
13149 (modify-phases %standard-phases
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)))
13164 (define-public python2-mmtk
13166 (name "python2-mmtk")
13171 (uri (string-append "https://bitbucket.org/khinsen/"
13172 "mmtk/downloads/MMTK-" version ".tar.gz"))
13173 (file-name (string-append "MMTK-" version ".tar.gz"))
13176 "1d0nnjx4lwsvh8f99vv1r6gi50d93yba0adkz8b4zgv4za4c5862"))))
13177 (build-system python-build-system)
13179 `(("netcdf" ,netcdf)))
13181 `(("python-scientific" ,python2-scientific)
13182 ("python-tkinter" ,python-2 "tk")))
13184 `(#:python ,python-2
13187 (modify-phases %standard-phases
13188 (add-before 'build 'includes-from-scientific
13189 (lambda* (#:key inputs #:allow-other-keys)
13190 (mkdir-p "Include/Scientific")
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)))
13205 (define-public python-phonenumbers
13207 (name "python-phonenumbers")
13212 (uri (pypi-uri "phonenumbers" version))
13215 "03fmrgb4r8x3ykmddjs9i3zhs703in8smikj3a6447blqpimwyh1"))))
13216 (build-system python-build-system)
13218 "https://github.com/daviddrysdale/python-phonenumbers")
13220 "Python library for dealing with international phone numbers")
13222 "This package provides a Python port of Google's libphonenumber library.")
13223 (license license:asl2.0)))
13225 (define-public python2-phonenumbers
13226 (package-with-python2 python-phonenumbers))
13228 (define-public python-send2trash
13230 (name "python-send2trash")
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"))
13240 "0ffyhwjyx61slkdy38iwjc4gmj7fj9gs2q58f075gwvq630pzm9z"))))
13241 (build-system python-build-system)
13244 (modify-phases %standard-phases
13245 (add-before 'check 'pre-check
13247 (mkdir-p "/tmp/foo")
13248 (setenv "HOME" "/tmp/foo")
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)))
13256 (define-public python2-send2trash
13258 (inherit (package-with-python2 python-send2trash))
13260 (substitute-keyword-arguments (package-arguments python-send2trash)
13262 `(modify-phases ,phases
13263 (add-before 'check 'setenv
13265 (setenv "PYTHONPATH"
13266 (string-append (getcwd) ":" (getenv "PYTHONPATH")))
13268 (properties `((python2-variant . ,(delay python-send2trash))))))
13270 (define-public python-yapf
13272 (name "python-yapf")
13277 (uri (pypi-uri "yapf" version))
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)))
13290 (define-public python2-yapf
13291 (package-with-python2 python-yapf))
13293 (define-public python-gyp
13294 (let ((commit "5e2b3ddde7cda5eb6bc09a5546a76b00e49d888f")
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))
13303 ;; Google does not release tarballs,
13304 ;; git checkout is needed.
13306 (uri (git-reference
13307 (url "https://chromium.googlesource.com/external/gyp")
13309 (file-name (git-file-name name version))
13312 "0fr7nxcrk292djmxzpcjaphnsd123k31gp8jnd91vwknhq6snmv9"))))
13313 (build-system python-build-system)
13314 (home-page "https://gyp.gsrc.io/")
13315 (synopsis "GYP is a Meta-Build system")
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))))
13322 (define-public python2-gyp
13323 (package-with-python2 python-gyp))
13325 (define-public python-whatever
13327 (name "python-whatever")
13332 (uri (string-append "https://github.com/Suor/whatever/archive/" version
13336 "1iqvnaf0zpc6b4rvbqq4xy45mszcscyzpzknv8wg6j84pbp22sap"))
13337 (file-name (string-append name "-" version ".tar.gz"))))
13338 (build-system python-build-system)
13341 (modify-phases %standard-phases
13344 (invoke "py.test"))))))
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)))
13353 (define-public python2-whatever
13354 (package-with-python2 python-whatever))
13356 (define-public python-funcy
13358 (name "python-funcy")
13363 (uri (string-append "https://github.com/Suor/funcy/archive/" version
13367 "1fanxivsip29vgarw6dn39xym3q4pbxcpa11plpp548lvxajpahz"))
13368 (file-name (string-append name "-" version ".tar.gz"))))
13369 (build-system python-build-system)
13372 (modify-phases %standard-phases
13375 (invoke "py.test"))))))
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.
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
13403 (license license:bsd-3)))
13405 (define-public python2-funcy
13406 (package-with-python2 python-funcy))
13408 (define-public python-isoweek
13410 (name "python-isoweek")
13415 (uri (pypi-uri "isoweek" version))
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)))
13428 (define-public python2-isoweek
13429 (package-with-python2 python-isoweek))
13431 (define-public python-tokenize-rt
13433 (name "python-tokenize-rt")
13438 (uri (pypi-uri "tokenize-rt" version))
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.")
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)))
13452 (define-public python-future-fstrings
13454 (name "python-future-fstrings")
13459 (uri (pypi-uri "future_fstrings" version))
13462 "0ydxqz2dvns44g55p8ix2x18qkfk3aaz0m0dc70f3g6n8js35h47"))))
13463 (build-system python-build-system)
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")
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)))
13475 (define-public python-typing
13477 (name "python-typing")
13482 (uri (pypi-uri "typing" version))
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
13495 (license license:psfl)))
13497 (define-public python2-typing
13498 (package-with-python2 python-typing))
13500 (define-public bpython
13507 (uri (pypi-uri "bpython" version))
13510 "0bxhxi5zxdkrf8b4gwn0d363kdz3qnypjwhm1aydki53ph8ca1w9"))))
13511 (build-system python-build-system)
13514 (modify-phases %standard-phases
13515 (add-after 'unpack 'remove-failing-test
13517 ;; Remove failing test. FIXME: make it pass
13518 (delete-file "bpython/test/test_args.py")
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")))
13526 (symlink old (string-append out "/bin/" new)))
13527 '("bpython" "bpython-curses" "bpython-urwid" "bpdb")
13528 '("bpython3" "bpython3-curses" "bpython3-urwid" "bpdb3")))
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)))
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
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
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.
13556 (license license:expat)))
13558 (define-public bpython2
13559 (let ((base (package-with-python2
13560 (strip-python2-variant bpython))))
13561 (package (inherit base)
13564 `(#:python ,python-2
13566 (modify-phases %standard-phases
13567 (add-after 'unpack 'remove-failing-test
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
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)))
13579 (add-before 'build 'rename-scripts
13580 ;; rename the scripts to bypthon2, bpdb2, etc.
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")))
13589 (define-public python-pyinotify
13591 (name "python-pyinotify")
13595 (uri (pypi-uri "pyinotify" version))
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")
13604 "@code{pyinotify} provides a Python interface for monitoring
13605 file system events on Linux.")
13606 (license license:expat)))
13608 (define-public python2-pyinotify
13609 (package-with-python2 python-pyinotify))
13611 ;; Ada parser uses this version.
13612 (define-public python2-quex-0.67.3
13614 (name "python2-quex")
13619 (uri (string-append "mirror://sourceforge/quex/HISTORY/"
13620 (version-major+minor version)
13621 "/quex-" version ".zip"))
13624 "14gv8ll3ipqv4kyc2xiy891nrmjl4ic823zfyx8hassagyclyppw"))))
13625 (build-system python-build-system)
13627 `(("unzip" ,unzip)))
13629 `(#:python ,python-2
13632 (modify-phases %standard-phases
13633 (delete 'configure)
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)
13642 (symlink (string-append share/quex "/quex-exe.py")
13643 (string-append bin "/quex"))
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
13654 (define-public python2-quex
13655 (package (inherit python2-quex-0.67.3)
13656 (name "python2-quex")
13661 (uri (string-append "mirror://sourceforge/quex/DOWNLOAD/quex-" version ".tar.gz"))
13664 "0svc9nla3b9145d6b7fb9dizx412l3difzqw0ilh9lz52nsixw8j"))
13665 (file-name (string-append name "-" version ".tar.gz"))))))
13667 (define-public python-more-itertools
13669 (name "python-more-itertools")
13674 (uri (pypi-uri "more-itertools" version))
13677 "0i3ch700g5fyjp692gprlnzbysl8w0sa2vijbp3s40drvk67xkn9"))))
13678 (build-system python-build-system)
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)))
13689 (define-public python2-more-itertools
13690 (package-with-python2 python-more-itertools))
13692 (define-public python-latexcodec
13694 (name "python-latexcodec")
13699 (uri (pypi-uri "latexcodec" version))
13702 "0zdd1gf24i83ykadx0y30n3001j43scqr2saql3vckk5c39dj1wn"))))
13703 (build-system python-build-system)
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)))
13711 (define-public python-pybtex
13713 (name "python-pybtex")
13718 (uri (pypi-uri "pybtex" version))
13721 "00300j8dn5pxq4ndxmfmbmycg2znawkqs49val2x6jlmfiy6r2mg"))))
13722 (build-system python-build-system)
13724 `(("python-nose" ,python-nose)))
13726 `(("python-latexcodec" ,python-latexcodec)
13727 ("python-pyyaml" ,python-pyyaml)
13728 ("python-six" ,python-six)))
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)))
13737 (define-public python-onetimepass
13739 (name "python-onetimepass")
13744 (uri (pypi-uri "onetimepass" version))
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)))
13755 (define-public python-parso
13757 (name "python-parso")
13762 (uri (pypi-uri "parso" version))
13765 "18p89iwcm8mnf380f92g9w0bhx5km8wxp392vvjcq4y1ld1llw1m"))))
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)))
13776 (define-public python2-parso
13777 (package-with-python2 python-parso))
13779 (define-public python-async-generator
13781 (name "python-async-generator")
13786 (uri (pypi-uri "async_generator" version))
13789 "0wc3hidz1q85cja93k5pzybn0fprfnqyrv4qlkdqdzklc5f4dmdp"))))
13790 (build-system python-build-system)
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.")
13798 (license (list license:expat license:asl2.0))))
13800 (define-public python-async-timeout
13802 (name "python-async-timeout")
13807 (uri (pypi-uri "async-timeout" version))
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)))
13818 (define-public python-glob2
13820 (name "python-glob2")
13824 (uri (string-append
13825 "https://github.com/miracle2k/python-glob2/archive/"
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
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).
13849 Glob2 currently based on the glob code from Python 3.3.1.")
13850 (license license:bsd-2)))
13852 (define-public python2-glob2
13853 (package-with-python2 python-glob2))
13855 (define-public python-gipc
13857 (name "python-gipc")
13862 (uri (pypi-uri "gipc" version ".zip"))
13865 "0pd9by719qh882hqs6xpby61sn1x5h98hms5p2p8yqnycrf1s0h2"))))
13866 (build-system python-build-system)
13868 `(("unzip" ,unzip)))
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)))
13879 (define-public python2-gipc
13880 (package-with-python2 python-gipc))
13882 (define-public python-fusepy
13884 (name "python-fusepy")
13889 (uri (pypi-uri "fusepy" version))
13892 "0v5grm4zyf58hsplwsxfbihddw95lz9w8cy3rpzbyha287swgx8h"))))
13893 (build-system python-build-system)
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'")))
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)))
13912 (define-public python2-fusepy
13913 (package-with-python2 python-fusepy))
13915 (define-public python2-gdrivefs
13917 (name "python2-gdrivefs")
13922 (uri (pypi-uri "gdrivefs" version))
13925 "0v9sp2cfg4ki3wagkwf3rnfpjhvgf845anz3757il9z95yvvcvb7"))))
13926 (build-system python-build-system)
13928 `(#:python ,python-2
13930 (modify-phases %standard-phases
13931 (add-before 'build 'patch-setup-py
13933 ;; Update requirements from dependency==version
13934 ;; to dependency>=version
13935 (substitute* "gdrivefs/resources/requirements.txt"
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)))
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)))
13956 (define-public pybind11
13962 (uri (git-reference
13963 (url "https://github.com/pybind/pybind11.git")
13964 (commit (string-append "v" version))))
13967 "0pa79ymcasv8br5ifbx7878id5py2jpjac3i20cqxr6gs9l6ivlv"))
13968 (file-name (git-file-name name version))))
13969 (build-system cmake-build-system)
13971 `(("python" ,python)
13972 ("python-pytest" ,python-pytest)))
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
13983 (license license:expat)))
13985 (define-public python-fasteners
13987 (name "python-fasteners")
13992 (uri (pypi-uri "fasteners" version))
13995 "063y20kx01ihbz2mziapmjxi2cd0dq48jzg587xdsdp07xvpcz22"))))
13996 (build-system python-build-system)
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")
14004 "This package provides a Python program that provides following locks:
14007 @item Locking decorator
14008 @item Reader-writer locks
14009 @item Inter-process locks
14010 @item Generic helpers
14012 (license license:asl2.0)))
14014 (define-public python2-fasteners
14015 (package-with-python2 python-fasteners))
14017 (define-public python-requests-file
14019 (name "python-requests-file")
14024 (uri (pypi-uri "requests-file" version))
14027 "1yp2jaxg3v86pia0q512dg3hz6s9y5vzdivsgrba1kds05ial14g"))))
14028 (build-system python-build-system)
14030 `(("python-requests" ,python-requests)
14031 ("python-six" ,python-six)))
14033 "https://github.com/dashea/requests-file")
14034 (synopsis "File transport adapter for Requests")
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)))
14040 (define-public python2-requests-file
14041 (package-with-python2 python-requests-file))
14043 (define-public python-tldextract
14045 (name "python-tldextract")
14050 (uri (pypi-uri "tldextract" version))
14053 "1d5s8v6kpsgazyahflhji1cfdcf89rv7l7z55v774bhzvcjp2y99"))))
14054 (build-system python-build-system)
14056 `(("python-pytest" ,python-pytest)
14057 ("python-responses" ,python-responses)))
14059 `(("python-idna" ,python-idna)
14060 ("python-requests" ,python-requests)
14061 ("python-requests-file" ,python-requests-file)))
14063 "https://github.com/john-kurkowski/tldextract")
14065 "Separate the TLD from the registered domain and subdomains of a URL")
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)))
14073 (define-public python2-tldextract
14074 (package-with-python2 python-tldextract))
14076 (define-public python-pynamecheap
14078 (name "python-pynamecheap")
14083 (uri (pypi-uri "PyNamecheap" version))
14086 "0wkbwz208j8nfrsmzmclvxg22ymknn0mlz76wbdza9k2bx2zja6l"))))
14087 (build-system python-build-system)
14089 `(("python-requests" ,python-requests)))
14091 "https://github.com/Bemmu/PyNamecheap")
14093 "Namecheap API client in Python")
14095 "PyNamecheap is a Namecheap API client in Python.")
14096 (license license:expat)))
14098 (define-public python2-pynamecheap
14099 (package-with-python2 python-pynamecheap))
14101 (define-public python-dns-lexicon
14103 (name "python-dns-lexicon")
14108 (uri (pypi-uri "dns-lexicon" version))
14111 "0jdn3ns71bsybr7njgsqr9xlxsqh7zh6phn4ld0liazqdn2l5f6m"))))
14112 (build-system python-build-system)
14114 `(#:tests? #f)) ;requires internet access
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")
14123 "Manipulate DNS records on various DNS providers")
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
14129 (license license:expat)))
14131 (define-public python2-dns-lexicon
14132 (package-with-python2 python-dns-lexicon))
14134 (define-public python-commandlines
14136 (name "python-commandlines")
14141 (uri (pypi-uri "commandlines" version))
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")
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)))
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
14158 (name "python-numba")
14163 (uri (pypi-uri "numba" version))
14166 "1bibvkwga1v8293i9ivl469d8bzgabn3vgr2ig7c1i68v8frsx07"))))
14167 (build-system python-build-system)
14169 `(#:modules ((guix build utils)
14170 (guix build python-build-system)
14175 (modify-phases %standard-phases
14176 (add-after 'unpack 'disable-proprietary-features
14178 (setenv "NUMBA_DISABLE_HSA" "1")
14179 (setenv "NUMBA_DISABLE_CUDA" "1")
14181 (add-after 'unpack 'remove-failing-tests
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)))
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)))
14203 (let ((cwd (getcwd)))
14204 (setenv "PYTHONPATH"
14205 (string-append cwd "/build/"
14206 (find (cut string-prefix? "lib" <>)
14207 (scandir (string-append cwd "/build")))
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")))
14217 `(("python-llvmlite" ,python-llvmlite)
14218 ("python-numpy" ,python-numpy)
14219 ("python-singledispatch" ,python-singledispatch)))
14220 ;; Needed for tests.
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.
14232 Numba works by generating optimized machine code using the LLVM compiler
14233 infrastructure at import time, runtime, or statically (using the included pycc
14235 (license license:bsd-3)))
14237 (define-public python-anndata
14239 (name "python-anndata")
14244 (uri (pypi-uri "anndata" version))
14247 "1fh461xyyc7pcrjfgd013bdc2alf53r46ss3gfw3431mbb1gappi"))))
14248 (build-system python-build-system)
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)))
14263 (define-public python-dill
14265 (name "python-dill")
14266 (version "0.2.8.2")
14270 (uri (pypi-uri "dill" version))
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)))
14290 (define-public python-multiprocess
14292 (name "python-multiprocess")
14293 (version "0.70.6.1")
14297 (uri (pypi-uri "multiprocess" version))
14300 "1ip5caz67b3q0553mr8gm8xwsb8x500jn8ml0gihgyfy52m2ypcq"))))
14301 (build-system python-build-system)
14303 `(("python-dill" ,python-dill)))
14304 (home-page "https://pypi.org/project/multiprocess")
14305 (synopsis "Multiprocessing and multithreading in Python")
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)))
14312 (define-public python-toolz
14314 (name "python-toolz")
14319 (uri (pypi-uri "toolz" version))
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")
14330 "This package provides a set of utility functions for iterators,
14331 functions, and dictionaries.")
14332 (license license:bsd-3)))
14334 (define-public python-cytoolz
14336 (name "python-cytoolz")
14337 (version "0.9.0.1")
14341 (uri (pypi-uri "cytoolz" version))
14344 "1r80p88hm3f3r4zpixzr047y5hw4bzy41m4xywnhycda83x0dk44"))))
14345 (build-system python-build-system)
14346 ;; FIXME: tests fail with "module 'cytoolz.curried' has no attribute
14348 (arguments '(#:tests? #f))
14350 `(("python-toolz" ,python-toolz)))
14352 `(("python-cython" ,python-cython)))
14353 (home-page "https://github.com/pytoolz/cytoolz")
14354 (synopsis "High performance functional utilities")
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)))
14361 (define-public python-sortedcontainers
14363 (name "python-sortedcontainers")
14368 (uri (pypi-uri "sortedcontainers" version))
14371 "10hrk2k0hbf9x78vd3f0lj277m1yzfhzzxr0hja718liwb398wk0"))))
14372 (build-system python-build-system)
14374 `(("python-tox" ,python-tox)))
14375 (home-page "http://www.grantjenks.com/docs/sortedcontainers/")
14376 (synopsis "Sorted List, Sorted Dict, Sorted Set")
14378 "This package provides a sorted collections library, written in
14380 (license license:asl2.0)))
14382 (define-public python-cloudpickle
14384 (name "python-cloudpickle")
14389 (uri (pypi-uri "cloudpickle" version))
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))
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")
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
14414 (license license:bsd-3)))
14416 (define-public python-locket
14418 (name "python-locket")
14423 (uri (pypi-uri "locket" version))
14426 "1d4z2zngrpqkrfhnd4yhysh66kjn4mblys2l06sh5dix2p0n7vhz"))))
14427 (build-system python-build-system)
14428 (home-page "https://github.com/mwilliamson/locket.py")
14429 (synopsis "File-based locks for Python")
14431 "Locket implements a lock that can be used by multiple processes provided
14432 they use the same path.")
14433 (license license:bsd-2)))
14435 (define-public python-blosc
14437 (name "python-blosc")
14442 (uri (pypi-uri "blosc" version))
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))
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.
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.
14463 This Python package wraps the Blosc library.")
14464 (license license:bsd-3)))
14466 (define-public python-partd
14468 (name "python-partd")
14473 (uri (pypi-uri "partd" version))
14476 "0sz6rwlnl4fqq220pyz863cnv0gjdxl4m7lscl71ishl5z0xkmhz"))))
14477 (build-system python-build-system)
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)))
14491 (define-public python-dask
14493 (name "python-dask")
14498 (uri (pypi-uri "dask" version))
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.
14507 (modify-phases %standard-phases
14508 (add-after 'unpack 'disable-broken-test
14510 (substitute* "dask/tests/test_threaded.py"
14511 (("def test_interrupt\\(\\)" m)
14512 (string-append "@pytest.mark.skip(reason=\"Disabled by Guix\")\n"
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)))
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")
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)))
14536 (define-public python-ilinkedlist
14538 (name "python-ilinkedlist")
14543 (uri (pypi-uri "ilinkedlist" version))
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")
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+)))
14561 (define-public python-readlike
14563 (name "python-readlike")
14568 (uri (pypi-uri "readlike" version))
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")
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.
14581 Currently, all stateless Readline commands are implemented. Yanking and history
14582 are not supported.")
14583 (license license:expat)))
14585 (define-public python2-readlike
14586 (package-with-python2 python-readlike))
14588 (define-public python-reparser
14590 (name "python-reparser")
14595 (uri (pypi-uri "ReParser" version))
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")
14602 "This Python library provides a simple lexer/parser for inline markup based
14603 on regular expressions.")
14604 (license license:expat)))
14606 (define-public python2-reparser
14607 (let ((reparser (package-with-python2
14608 (strip-python2-variant python-reparser))))
14609 (package (inherit reparser)
14611 `(("python2-enum34" ,python2-enum34)
14612 ,@(package-propagated-inputs reparser))))))
14614 (define-public python-precis-i18n
14616 (name "python-precis-i18n")
14621 (uri (pypi-uri "precis_i18n" version))
14624 "0gjhvwd8aifx94rl1ag08vlmndyx2q3fkyqb0c4i46x3p2bc2yi2"))))
14625 (build-system python-build-system)
14626 (home-page "https://github.com/byllyfish/precis_i18n")
14627 (synopsis "Implementation of the PRECIS framework")
14629 "This module implements the PRECIS Framework as described in RFC 8264,
14630 RFC 8265 and RFC 8266.")
14631 (license license:expat)))
14633 (define-public python-wikidata
14635 (name "python-wikidata")
14640 (uri (pypi-uri "Wikidata" version))
14643 "08nlnydddfp1jj0cdmshvld1irzngbp3dij928wqsg9ziklm6mw9"))))
14644 (build-system python-build-system)
14646 `(("python-babel" ,python-babel)))
14647 (home-page "https://github.com/dahlia/wikidata")
14648 (synopsis "Wikidata client library")
14650 "This package provides a Python interface to
14651 @url{https://www.wikidata.org/, Wikidata}.")
14652 (properties '((upstream-name . "Wikidata")))
14653 (license license:gpl3+)))