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 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 Arun Isaac <arunisaac@systemreboot.net>
34 ;;; Copyright © 2016, 2017 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 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>
51 ;;; This file is part of GNU Guix.
53 ;;; GNU Guix is free software; you can redistribute it and/or modify it
54 ;;; under the terms of the GNU General Public License as published by
55 ;;; the Free Software Foundation; either version 3 of the License, or (at
56 ;;; your option) any later version.
58 ;;; GNU Guix is distributed in the hope that it will be useful, but
59 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
60 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
61 ;;; GNU General Public License for more details.
63 ;;; You should have received a copy of the GNU General Public License
64 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
66 (define-module (gnu packages python)
67 #:use-module ((guix licenses) #:prefix license:)
68 #:use-module (gnu packages)
69 #:use-module (gnu packages algebra)
70 #:use-module (gnu packages adns)
71 #:use-module (gnu packages attr)
72 #:use-module (gnu packages backup)
73 #:use-module (gnu packages bash)
74 #:use-module (gnu packages check)
75 #:use-module (gnu packages compression)
76 #:use-module (gnu packages crypto)
77 #:use-module (gnu packages databases)
78 #:use-module (gnu packages file)
79 #:use-module (gnu packages fontutils)
80 #:use-module (gnu packages gcc)
81 #:use-module (gnu packages geo)
82 #:use-module (gnu packages ghostscript)
83 #:use-module (gnu packages gl)
84 #:use-module (gnu packages glib)
85 #:use-module (gnu packages graphviz)
86 #:use-module (gnu packages graphics)
87 #:use-module (gnu packages gstreamer)
88 #:use-module (gnu packages gtk)
89 #:use-module (gnu packages icu4c)
90 #:use-module (gnu packages image)
91 #:use-module (gnu packages imagemagick)
92 #:use-module (gnu packages libevent)
93 #:use-module (gnu packages libffi)
94 #:use-module (gnu packages linux)
95 #:use-module (gnu packages machine-learning)
96 #:use-module (gnu packages man)
97 #:use-module (gnu packages maths)
98 #:use-module (gnu packages multiprecision)
99 #:use-module (gnu packages networking)
100 #:use-module (gnu packages ncurses)
101 #:use-module (gnu packages openstack)
102 #:use-module (gnu packages password-utils)
103 #:use-module (gnu packages pcre)
104 #:use-module (gnu packages perl)
105 #:use-module (gnu packages pkg-config)
106 #:use-module (gnu packages python-crypto)
107 #:use-module (gnu packages python-web)
108 #:use-module (gnu packages qt)
109 #:use-module (gnu packages readline)
110 #:use-module (gnu packages sdl)
111 #:use-module (gnu packages search)
112 #:use-module (gnu packages shells)
113 #:use-module (gnu packages ssh)
114 #:use-module (gnu packages statistics)
115 #:use-module (gnu packages terminals)
116 #:use-module (gnu packages tex)
117 #:use-module (gnu packages texinfo)
118 #:use-module (gnu packages time)
119 #:use-module (gnu packages tls)
120 #:use-module (gnu packages version-control)
121 #:use-module (gnu packages video)
122 #:use-module (gnu packages web)
123 #:use-module (gnu packages base)
124 #:use-module (gnu packages xml)
125 #:use-module (gnu packages xorg)
126 #:use-module (gnu packages xdisorg)
127 #:use-module (gnu packages tcl)
128 #:use-module (gnu packages bdw-gc)
129 #:use-module (guix packages)
130 #:use-module (guix download)
131 #:use-module (guix git-download)
132 #:use-module (guix utils)
133 #:use-module (guix build-system gnu)
134 #:use-module (guix build-system cmake)
135 #:use-module (guix build-system python)
136 #:use-module (guix build-system trivial)
137 #:use-module (srfi srfi-1))
139 (define-public python-2.7
146 (uri (string-append "https://www.python.org/ftp/python/"
147 version "/Python-" version ".tar.xz"))
150 "0rka541ys16jwzcnnvjp2v12m4cwgd2jp6wj4kj511p715pb5zvi"))
151 (patches (search-patches "python-2.7-search-paths.patch"
152 "python-2-deterministic-build-info.patch"
153 "python-2.7-site-prefixes.patch"
154 "python-2.7-source-date-epoch.patch"
155 "python-2.7-adjust-tests.patch"))
156 (modules '((guix build utils)))
157 ;; suboptimal to delete failing tests here, but if we delete them in the
158 ;; arguments then we need to make sure to strip out that phase when it
159 ;; gets inherited by python and python-minimal.
162 (for-each delete-file
163 '("Lib/test/test_compileall.py"
164 "Lib/test/test_ctypes.py" ; fails on mips64el
165 "Lib/test/test_distutils.py"
166 "Lib/test/test_import.py"
167 "Lib/test/test_shutil.py"
168 "Lib/test/test_socket.py"
169 "Lib/test/test_subprocess.py"))
172 "tk")) ;tkinter; adds 50 MiB to the closure
173 (build-system gnu-build-system)
177 ;; test_compileall test_distutils test_import test_shutil test_socket
180 ;; test_aepack test_al test_applesingle test_bsddb test_bsddb185
181 ;; test_bsddb3 test_cd test_cl test_codecmaps_cn test_codecmaps_hk
182 ;; test_codecmaps_jp test_codecmaps_kr test_codecmaps_tw test_curses
183 ;; test_dl test_gdb test_gl test_imageop test_imgfile test_ioctl
184 ;; test_kqueue test_linuxaudiodev test_macos test_macostools
185 ;; test_msilib test_ossaudiodev test_scriptpackages test_smtpnet
186 ;; test_socketserver test_startfile test_sunaudiodev test_timeout
187 ;; test_tk test_ttk_guionly test_urllib2net test_urllibnet
188 ;; test_winreg test_winsound test_zipfile64
189 ;; 4 skips unexpected on linux2:
190 ;; test_bsddb test_bsddb3 test_gdb test_ioctl
193 (list "--enable-shared" ;allow embedding
194 "--with-system-ffi" ;build ctypes
195 "--with-ensurepip=install" ;install pip and setuptools
196 "--enable-unicode=ucs4"
197 (string-append "LDFLAGS=-Wl,-rpath="
198 (assoc-ref %outputs "out") "/lib"))
200 #:modules ((ice-9 ftw) (ice-9 match)
201 (guix build utils) (guix build gnu-build-system))
203 (modify-phases %standard-phases
205 'configure 'patch-lib-shells
207 ;; Filter for existing files, since some may not exist in all
208 ;; versions of python that are built with this recipe.
209 (substitute* (filter file-exists?
210 '("Lib/subprocess.py"
212 "Lib/distutils/tests/test_spawn.py"
213 "Lib/test/support/__init__.py"
214 "Lib/test/test_subprocess.py"))
215 (("/bin/sh") (which "sh")))
217 ;; Use zero as the timestamp in .pyc files so that builds are
218 ;; deterministic. TODO: Remove it when this variable is set in
219 ;; gnu-build-system.scm.
220 (setenv "SOURCE_DATE_EPOCH" "1")
222 (add-before 'configure 'do-not-record-configure-flags
223 (lambda* (#:key configure-flags #:allow-other-keys)
224 ;; Remove configure flags from the installed '_sysconfigdata.py'
225 ;; and 'Makefile' so we don't end up keeping references to the
228 ;; Preserve at least '--with-system-ffi' since otherwise the
229 ;; thing tries to build libffi, fails, and we end up with a
230 ;; Python that lacks ctypes.
231 (substitute* "configure"
232 (("^CONFIG_ARGS=.*$")
233 (format #f "CONFIG_ARGS='~a'\n"
234 (if (member "--with-system-ffi" configure-flags)
241 ;; 'Lib/test/test_site.py' needs a valid $HOME
242 (setenv "HOME" (getcwd))
245 'unpack 'set-source-file-times-to-1980
246 ;; XXX One of the tests uses a ZIP library to pack up some of the
247 ;; source tree, and fails with "ZIP does not support timestamps
248 ;; before 1980". Work around this by setting the file times in the
249 ;; source tree to sometime in early 1980.
251 (let ((circa-1980 (* 10 366 24 60 60)))
252 (ftw "." (lambda (file stat flag)
253 (utime file circa-1980 circa-1980)
256 (add-after 'install 'remove-tests
257 ;; Remove 25 MiB of unneeded unit tests. Keep test_support.*
258 ;; because these files are used by some libraries out there.
259 (lambda* (#:key outputs #:allow-other-keys)
260 (let ((out (assoc-ref outputs "out")))
261 (match (scandir (string-append out "/lib")
263 (string-prefix? "python" name)))
265 (let ((testdir (string-append out "/lib/" pythonX.Y
267 (with-directory-excursion testdir
268 (for-each delete-file-recursively
274 (string-prefix? "test_support."
276 (call-with-output-file "__init__.py" (const #t))
278 (add-before 'strip 'make-libraries-writable
279 (lambda* (#:key outputs #:allow-other-keys)
280 ;; Make .so files writable so they can be stripped.
281 (let ((out (assoc-ref outputs "out")))
282 (for-each (lambda (file)
284 (find-files (string-append out "/lib")
287 (add-after 'install 'move-tk-inter
288 (lambda* (#:key outputs #:allow-other-keys)
289 ;; When Tkinter support is built move it to a separate output so
290 ;; that the main output doesn't contain a reference to Tcl/Tk.
291 (let ((out (assoc-ref outputs "out"))
292 (tk (assoc-ref outputs "tk")))
294 (match (find-files out "tkinter.*\\.so")
296 ;; The .so is in OUT/lib/pythonX.Y/lib-dynload, but we
297 ;; want it under TK/lib/pythonX.Y/site-packages.
298 (let* ((len (string-length out))
299 (target (string-append
302 (dirname (dirname tkinter.so))
305 (install-file tkinter.so target)
306 (delete-file tkinter.so)))))
311 ("libffi" ,libffi) ; for ctypes
312 ("sqlite" ,sqlite) ; for sqlite extension
314 ("readline" ,readline)
317 ("tk" ,tk))) ; for tkinter
319 `(("pkg-config" ,pkg-config)))
321 (list (search-path-specification
322 (variable "PYTHONPATH")
323 (files '("lib/python2.7/site-packages")))))
324 (home-page "https://www.python.org")
325 (synopsis "High-level, dynamically-typed programming language")
327 "Python is a remarkably powerful dynamic programming language that
328 is used in a wide variety of application domains. Some of its key
329 distinguishing features include: clear, readable syntax; strong
330 introspection capabilities; intuitive object orientation; natural
331 expression of procedural code; full modularity, supporting hierarchical
332 packages; exception-based error handling; and very high level dynamic
334 (license license:psfl)))
336 ;; Current 2.x version.
337 (define-public python-2 python-2.7)
339 (define-public python-3.6
340 (package (inherit python-2)
344 (uri (string-append "https://www.python.org/ftp/python/"
345 version "/Python-" version ".tar.xz"))
346 (patches (search-patches
347 "python-fix-tests.patch"
348 "python-3-fix-tests.patch"
349 "python-3-deterministic-build-info.patch"
350 "python-3-search-paths.patch"))
351 (patch-flags '("-p0"))
354 "1nl1raaagr4car787a2hmjv2dw6gqny53xfd6wisbgx4r5kxk9yd"))
357 (for-each delete-file
358 '("Lib/ctypes/test/test_structures.py" ; fails on aarch64
359 "Lib/ctypes/test/test_win32.py" ; fails on aarch64
360 "Lib/test/test_fcntl.py")) ; fails on aarch64
362 (arguments (substitute-keyword-arguments (package-arguments python-2)
365 (list (search-path-specification
366 (variable "PYTHONPATH")
367 (files (list (string-append "lib/python"
368 (version-major+minor version)
369 "/site-packages"))))))))
371 ;; Current 3.x version.
372 (define-public python-3 python-3.6)
374 ;; Current major version.
375 (define-public python python-3)
377 ;; Minimal variants of Python, mostly used to break the cycle between Tk and
378 ;; Python (Tk -> libxcb -> Python.)
380 (define-public python2-minimal
381 (package (inherit python-2)
382 (name "python-minimal")
385 ;; Keep zlib, which is used by 'pip' (via the 'zipimport' module), which
386 ;; is invoked upon 'make install'. 'pip' also expects 'ctypes' and thus
388 (inputs `(("libffi" ,libffi)
391 (define-public python-minimal
392 (package (inherit python)
393 (name "python-minimal")
396 ;; Build fails due to missing ctypes without libffi.
397 ;; OpenSSL is a mandatory dependency of Python 3.x, for urllib;
398 ;; zlib is required by 'zipimport', used by pip.
399 (inputs `(("libffi" ,libffi)
403 (define* (wrap-python3 python
405 (name (string-append (package-name python) "-wrapper")))
406 (package (inherit python)
409 (build-system trivial-build-system)
411 (inputs `(("bash" ,bash)))
412 (propagated-inputs `(("python" ,python)))
414 `(#:modules ((guix build utils))
417 (use-modules (guix build utils))
418 (let ((bin (string-append (assoc-ref %outputs "out") "/bin"))
419 (python (string-append (assoc-ref %build-inputs "python") "/bin/")))
423 (symlink (string-append python old)
424 (string-append bin "/" new)))
425 `("python3" ,"pydoc3" ,"idle3" ,"pip3")
426 `("python" ,"pydoc" ,"idle" ,"pip"))
427 ;; python-config outputs search paths based upon its location,
428 ;; use a bash wrapper to avoid changing its outputs.
429 (let ((bash (string-append (assoc-ref %build-inputs "bash")
431 (old (string-append python "python3-config"))
432 (new (string-append bin "/python-config")))
433 (with-output-to-file new
435 (format #t "#!~a~%" bash)
436 (format #t "exec \"~a\" \"$@\"~%" old)
439 (synopsis "Wrapper for the Python 3 commands")
441 "This package provides wrappers for the commands of Python@tie{}3.x such
442 that they can be invoked under their usual name---e.g., @command{python}
443 instead of @command{python3}.")))
445 (define-public python-wrapper (wrap-python3 python))
446 (define-public python-minimal-wrapper (wrap-python3 python-minimal))
448 (define-public python-psutil
450 (name "python-psutil")
455 (uri (pypi-uri "psutil" version))
458 "063v69x7spyclyaxrd3gmzj3p16q5ayg97xqhwb1kyn22a9pwip2"))))
459 (build-system python-build-system)
461 ;; FIXME: some tests does not return and times out.
463 (home-page "https://www.github.com/giampaolo/psutil")
464 (synopsis "Library for retrieving information on running processes")
466 "psutil (Python system and process utilities) is a library for retrieving
467 information on running processes and system utilization (CPU, memory, disks,
468 network) in Python. It is useful mainly for system monitoring, profiling and
469 limiting process resources and management of running processes. It implements
470 many functionalities offered by command line tools such as: ps, top, lsof,
471 netstat, ifconfig, who, df, kill, free, nice, ionice, iostat, iotop, uptime,
472 pidof, tty, taskset, pmap.")
473 (properties `((python2-variant . ,(delay python2-psutil))))
474 (license license:bsd-3)))
476 (define-public python2-psutil
477 (let ((base (package-with-python2 (strip-python2-variant python-psutil))))
481 `(("python2-enum34" ,python2-enum34) ;optional
482 ,@(package-propagated-inputs base))))))
484 (define-public python-shapely
486 (name "python-shapely")
491 (uri (pypi-uri "Shapely" version))
494 "0svc58dzcw9gj92b4sgq35sdxkf85z0qwlzxarkzq4bp3h8jy58l"))))
495 (build-system python-build-system)
497 `(("python-cython" ,python-cython)
498 ("python-matplotlib" ,python-matplotlib)
499 ("python-pytest" ,python-pytest)
500 ("python-pytest-cov" ,python-pytest-cov)))
504 `(("python-numpy" ,python-numpy)))
507 (modify-phases %standard-phases
508 (add-after 'unpack 'patch-geos-path
509 (lambda* (#:key inputs #:allow-other-keys)
510 (let ((geos (assoc-ref inputs "geos"))
511 (glibc (assoc-ref inputs ,(if (%current-target-system)
512 "cross-libc" "libc"))))
513 (substitute* "shapely/geos.py"
514 (("_lgeos = load_dll\\('geos_c', fallbacks=.*\\)")
515 (string-append "_lgeos = load_dll('geos_c', fallbacks=['"
516 geos "/lib/libgeos_c.so'])"))
517 (("free = load_dll\\('c'\\)\\.free")
518 (string-append "free = load_dll('c', fallbacks=['"
519 glibc "/lib/libc.so.6']).free"))))
521 (home-page "https://github.com/Toblerity/Shapely")
522 (synopsis "Library for the manipulation and analysis of geometric objects")
523 (description "Shapely is a Python package for manipulation and analysis of
524 planar geometric objects. It is based on the @code{GEOS} library.")
525 (license license:bsd-3)))
527 (define-public python2-shapely
528 (package-with-python2 python-shapely))
530 (define-public python-clyent
532 (name "python-clyent")
537 (uri (pypi-uri "clyent" version))
540 "1r9987qmy1pz3hq54160bapqsywpq14waw4w9x3ly8hmq7kpgfbj"))))
541 (build-system python-build-system)
543 `(("python-mock" ,python-mock)))
544 (home-page "https://github.com/binstar/clyent")
545 (synopsis "Command line client library")
546 (description "Clyent is a Python command line utiliy library. It is used
547 by @code{binstar}, @code{binstar-build} and @code{chalmers}.")
548 (license license:bsd-3)))
550 (define-public python2-clyent
551 (package-with-python2 python-clyent))
553 (define-public python-babel
555 (name "python-babel")
560 (uri (pypi-uri "Babel" version))
563 "0x98qqqw35xllpcama013a9788ly84z8dm1w2wwfpxh2710c8df5"))))
564 (build-system python-build-system)
566 `(("python-pytz" ,python-pytz)))
567 (arguments `(#:tests? #f)) ; no test target
568 (home-page "http://babel.pocoo.org/")
570 "Tools for internationalizing Python applications")
572 "Babel is composed of two major parts:
573 - tools to build and work with gettext message catalogs
574 - a Python interface to the CLDR (Common Locale Data Repository), providing
575 access to various locale display names, localized number and date formatting,
577 (license license:bsd-3)))
579 (define-public python2-babel
580 (package-with-python2 python-babel))
582 (define-public python2-backport-ssl-match-hostname
584 (name "python2-backport-ssl-match-hostname")
590 "https://pypi.python.org/packages/source/b/"
591 "backports.ssl_match_hostname/backports.ssl_match_hostname-"
595 "1wndipik52cyqy0677zdgp90i435pmvwd89cz98lm7ri0y3xjajh"))))
596 (build-system python-build-system)
599 #:tests? #f)) ; no test target
600 (home-page "https://bitbucket.org/brandon/backports.ssl_match_hostname")
601 (synopsis "Backport of ssl.match_hostname() function from Python 3.5")
603 "This backport brings the ssl.match_hostname() function to users of
604 earlier versions of Python. The function checks the hostname in the
605 certificate returned by the server to which a connection has been established,
606 and verifies that it matches the intended target hostname.")
607 (license license:psfl)))
609 (define-public python-hdf4
616 (uri (pypi-uri name version))
619 "1hjiyrxvxk9817qyqky3nar4y3fs4z8wxz0n884zzb5wi6skrjks"))))
620 (build-system python-build-system)
621 (native-inputs `(("nose" ,python-nose)))
622 (propagated-inputs `(("numpy" ,python-numpy)))
629 (modify-phases %standard-phases
632 ;; The 'runexamples' script sets PYTHONPATH to CWD, then goes
633 ;; on to import numpy. Somehow this works on their CI system.
634 ;; Let's just manage PYTHONPATH here instead.
635 (substitute* "runexamples.sh"
636 (("export PYTHONPATH=.*") ""))
638 (string-append (getcwd) ":"
639 (getenv "PYTHONPATH")))
640 (and (zero? (system* "./runexamples.sh"))
641 (zero? (system* "nosetests" "-v"))))))))
642 (home-page "https://github.com/fhs/python-hdf4")
643 (synopsis "Python interface to the NCSA HDF4 library")
645 "Python-HDF4 is a python wrapper around the NCSA HDF version 4 library,
646 which implements the SD (Scientific Dataset), VS (Vdata) and V (Vgroup) API’s.
647 NetCDF files can also be read and modified. Python-HDF4 is a fork of
648 @url{http://hdfeos.org/software/pyhdf.php,pyhdf}.")
649 (license license:expat)))
651 (define-public python2-hdf4
652 (package-with-python2 python-hdf4))
654 (define-public python-h5py
661 (uri (pypi-uri "h5py" version))
664 "0433sdv6xc9p7v1xs1gvbxp7p152ywi3nplgjb258q9fvw9469br"))))
665 (build-system python-build-system)
667 `(#:tests? #f ; no test target
669 (modify-phases %standard-phases
670 (add-after 'unpack 'fix-hdf5-paths
671 (lambda* (#:key inputs #:allow-other-keys)
672 (let ((prefix (assoc-ref inputs "hdf5")))
673 (substitute* "setup_build.py"
674 (("\\['/opt/local/lib', '/usr/local/lib'\\]")
675 (string-append "['" prefix "/lib" "']"))
676 (("'/opt/local/include', '/usr/local/include'")
677 (string-append "'" prefix "/include" "'")))
678 (substitute* "setup_configure.py"
679 (("\\['/usr/local/lib', '/opt/local/lib'\\]")
680 (string-append "['" prefix "/lib" "']")))
683 `(("python-six" ,python-six)
684 ("python-numpy" ,python-numpy)))
688 `(("python-cython" ,python-cython)
689 ("python-pkgconfig" ,python-pkgconfig)))
690 (home-page "http://www.h5py.org/")
691 (synopsis "Read and write HDF5 files from Python")
693 "The h5py package provides both a high- and low-level interface to the
694 HDF5 library from Python. The low-level interface is intended to be a
695 complete wrapping of the HDF5 API, while the high-level component supports
696 access to HDF5 files, datasets and groups using established Python and NumPy
698 (license license:bsd-3)))
700 (define-public python2-h5py
701 (package-with-python2 python-h5py))
703 (define-public python-netcdf4
705 (name "python-netcdf4")
710 (uri (pypi-uri "netCDF4" version))
713 "1h6jq338amlbk0ilzvjyl7cck80i0bah9a5spn9in71vy2qxm7i5"))))
714 (build-system python-build-system)
716 `(("python-cython" ,python-cython)))
718 `(("python-numpy" ,python-numpy)))
725 (modify-phases %standard-phases
728 (setenv "NO_NET" "1") ; disable opendap tests
729 (with-directory-excursion "test"
730 (setenv "PYTHONPATH" ; find and add the library we just built
732 (car (find-files "../build" "lib.*"
734 #:fail-on-error? #:t))
735 ":" (getenv "PYTHONPATH")))
736 (zero? (system* "python" "run_all.py"))))))))
738 "https://github.com/Unidata/netcdf4-python")
739 (synopsis "Python/numpy interface to the netCDF library")
740 (description "Netcdf4-python is a Python interface to the netCDF C
741 library. netCDF version 4 has many features not found in earlier
742 versions of the library and is implemented on top of HDF5. This module
743 can read and write files in both the new netCDF 4 and the old netCDF 3
744 format, and can create files that are readable by HDF5 clients. The
745 API is modelled after @code{Scientific.IO.NetCDF}, and should be familiar
746 to users of that module.")
747 ;; The software is mainly ISC, but includes some files covered
748 ;; by the Expat license.
749 (license (list license:isc license:expat))))
751 (define-public python2-netcdf4
752 (package-with-python2 python-netcdf4))
754 (define-public python-lockfile
756 (name "python-lockfile")
761 (uri (string-append "https://pypi.python.org/packages/source/l/lockfile/"
762 "lockfile-" version ".tar.gz"))
765 "16gpx5hm73ah5n1079ng0vy381hl802v606npkx4x8nb0gg05vba"))))
766 (build-system python-build-system)
767 (arguments '(#:test-target "check"))
769 `(("python-pbr" ,python-pbr)))
770 (home-page "https://launchpad.net/pylockfile")
771 (synopsis "Platform-independent file locking module")
773 "The lockfile package exports a LockFile class which provides a simple
774 API for locking files.")
775 (license license:expat)))
777 (define-public python2-lockfile
778 (package-with-python2 python-lockfile))
780 (define-public python-setuptools
782 (name "python-setuptools")
787 (uri (pypi-uri "setuptools" version))
790 "0ypybh4hx3bv4vhg2dc74xpj1g56ggnaffm87k4abhwjwq6wq608"))
791 (modules '((guix build utils)))
794 ;; Remove included binaries which are used to build self-extracting
795 ;; installers for Windows.
796 ;; TODO: Find some way to build them ourself so we can include them.
797 (for-each delete-file (find-files "setuptools" "^(cli|gui).*\\.exe$"))
799 (build-system python-build-system)
800 ;; FIXME: Tests require pytest, which itself relies on setuptools.
801 ;; One could bootstrap with an internal untested setuptools.
804 (home-page "https://pypi.python.org/pypi/setuptools")
806 "Library designed to facilitate packaging Python projects")
808 "Setuptools is a fully-featured, stable library designed to facilitate
809 packaging Python projects, where packaging includes:
810 Python package and module definitions,
811 distribution package metadata,
813 project installation,
814 platform-specific details,
816 ;; TODO: setuptools now bundles the following libraries:
817 ;; packaging, pyparsing, six and appdirs. How to unbundle?
818 (license (list license:psfl ; setuptools itself
819 license:expat ; six, appdirs, pyparsing
820 license:asl2.0 ; packaging is dual ASL2/BSD-2
823 (define-public python2-setuptools
824 (package-with-python2 python-setuptools))
826 (define-public python-uniseg
828 (name "python-uniseg")
833 (uri (pypi-uri "uniseg" version ".zip"))
836 "05jsazvz6nbmh6l3v1rph5ydkqn1hzx1pyggdyvgp2qgmgrnmiz2"))))
837 (build-system python-build-system)
839 '(#:tests? #f)) ; The test suite requires network access.
843 "https://bitbucket.org/emptypage/uniseg-python")
845 "Python library to determine Unicode text segmentations")
847 "Uniseg is a Python package used to determine Unicode text segmentations.
848 Supported segmentations include:
850 @item @dfn{Code point} (any value in the Unicode codespace)
851 @item @dfn{Grapheme cluster} (user-perceived character made of a single or
852 multiple Unicode code points, e.g. \"G\" + acute-accent)
857 (license license:expat)))
859 (define-public python2-uniseg
860 (package-with-python2 python-uniseg))
862 (define-public python-humanfriendly
864 (name "python-humanfriendly")
869 (uri (pypi-uri "humanfriendly" version))
872 "0pisgizjql86785jchfjv217g0lsgk114g2lja5j4y3lsc3b9szi"))))
873 (build-system python-build-system)
875 `(;; XXX: Tests depend on coloredlogs, which in turn depends on humanfriendly.
878 `(("python-monotonic" ,python-monotonic)))
879 (home-page "https://humanfriendly.readthedocs.io")
880 (synopsis "Human-friendly input and output in Python")
882 "The functions and classes in @code{humanfriendly} can be used to make
883 text interfaces more user-friendly. It includes tools to parse and format
884 numbers, file sizes, and timespans, timers for long-running operations, menus
885 to allow the user to choose from a list of options, and terminal interaction
887 (license license:expat)))
889 (define-public python2-humanfriendly
890 (package-with-python2 python-humanfriendly))
892 (define-public python-capturer
894 (name "python-capturer")
899 (uri (pypi-uri "capturer" version))
902 "05d6ji4j8ipiq0br7bwam38qc6hd9l1djmfxlzrxx19ziyjl4089"))))
903 (build-system python-build-system)
907 `(("python-humanfriendly" ,python-humanfriendly)))
908 (home-page "https://capturer.readthedocs.io")
909 (synopsis "Capture stdout and stderr streams of the current process")
911 "The capturer package makes it easy to capture the stdout and stderr
912 streams of the current process and subprocesses. Output can be relayed
913 to the terminal in real time but is also available to the Python program
914 for additional processing.")
915 (license license:expat)))
917 (define-public python2-capturer
918 (package-with-python2 python-capturer))
920 (define-public python-verboselogs
922 (name "python-verboselogs")
927 (uri (pypi-uri "verboselogs" version))
930 "09z4d1jiasn7k1hs5af2ckmnrd0i1d1m04bhfjhv7z6svzfdwgg3"))))
931 (build-system python-build-system)
933 `(("python-mock" ,python-mock)
934 ("python-astroid" ,python-astroid)
935 ("python-pylint" ,python-pylint)))
936 (home-page "https://verboselogs.readthedocs.io")
937 (synopsis "Verbose logging level for Python's logging module")
939 "The @code{verboselogs} package extends Python's @code{logging} module to
940 add the log levels NOTICE, SPAM, SUCCESS and VERBOSE.")
941 (license license:expat)))
943 (define-public python2-verboselogs
944 (package-with-python2 python-verboselogs))
946 (define-public python-coloredlogs
948 (name "python-coloredlogs")
953 (uri (pypi-uri "coloredlogs" version))
956 "1blcann6dyg5dhps9pg12rn0q0rjrlajpmmil0gy0j4cbvnl2il9"))))
957 (build-system python-build-system)
959 `(;Tests require some updated modules
962 `(("python-capturer" ,python-capturer)))
963 (home-page "https://coloredlogs.readthedocs.io")
964 (synopsis "Colored stream handler for Python's logging module")
966 "The @code{coloredlogs} package enables colored terminal output for
967 Python's logging module. The @code{ColoredFormatter} class inherits from
968 @code{logging.Formatter} and uses ANSI escape sequences to render your logging
970 (license license:expat)))
972 (define-public python2-coloredlogs
973 (package-with-python2 python-coloredlogs))
975 (define-public python-eventlet
977 (name "python-eventlet")
982 (uri (pypi-uri "eventlet" version))
985 "0f3q55mq4n021wb7qa53pz3ix6i2py64sap66vsaqm2scjw83m9s"))))
986 (build-system python-build-system)
988 `(("python-greenlet" ,python-greenlet)))
990 ;; TODO: Requires unpackaged 'enum-compat'.
992 (home-page "http://eventlet.net")
993 (synopsis "Concurrent networking library for Python")
995 "Eventlet is a concurrent networking library for Python that
996 allows you to change how you run your code, not how you write it.
997 It uses @code{epoll} or @code{libevent} for highly scalable non-blocking I/O.
998 Coroutines ensure that the developer uses a blocking style of programming
999 that is similar to threading, but provide the benefits of non-blocking I/O.
1000 The event dispatch is implicit, which means you can easily use @code{Eventlet}
1001 from the Python interpreter, or as a small part of a larger application.")
1002 (license license:expat)))
1004 (define-public python2-eventlet
1005 (let ((base (package-with-python2
1006 (strip-python2-variant python-eventlet))))
1007 (package (inherit base)
1009 `(("python2-enum34" ,python2-enum34)
1010 ,@(package-propagated-inputs base))))))
1012 (define-public python-six
1019 (uri (pypi-uri "six" version))
1022 "1scqzwc51c875z23phj48gircqjgnn3af8zy2izjwmnlxrxsgs3h"))))
1023 (build-system python-build-system)
1026 (modify-phases %standard-phases
1029 (zero? (system* "py.test" "-v")))))))
1031 `(("python-py" ,python-py)
1032 ("python-pytest" ,python-pytest-bootstrap)))
1033 (home-page "https://pypi.python.org/pypi/six/")
1034 (synopsis "Python 2 and 3 compatibility utilities")
1036 "Six is a Python 2 and 3 compatibility library. It provides utility
1037 functions for smoothing over the differences between the Python versions with
1038 the goal of writing Python code that is compatible on both Python versions.
1039 Six supports every Python version since 2.5. It is contained in only one
1040 Python file, so it can be easily copied into your project.")
1041 (license license:x11)))
1043 (define-public python2-six
1044 (package-with-python2 python-six))
1046 (define-public python-schedule
1048 (name "python-schedule")
1053 (uri (pypi-uri "schedule" version))
1056 "0vplyjcbfrq50sphlwya749z8p2pcyi2nycw3518i0qpd9a6189i"))))
1057 (build-system python-build-system)
1059 `(("python-pytest" ,python-pytest)
1060 ("python-mock" ,python-mock)))
1061 (home-page "https://github.com/dbader/schedule")
1062 (synopsis "Schedule periodic function calls in Python")
1064 "Schedule is an in-process scheduler for periodic jobs that uses the
1065 builder pattern for configuration. Schedule lets you run Python functions (or
1066 any other callable) periodically at pre-determined intervals using a simple,
1067 human-friendly syntax.")
1068 (license license:expat)))
1070 (define-public python2-schedule
1071 (package-with-python2 python-schedule))
1073 (define-public python-pandas
1075 (name "python-pandas")
1080 (uri (pypi-uri "pandas" version))
1082 (base32 "0v0fi2i10kwnmlpsl6f1fgajcpx3q6766qf6xqi5kw3ivn8l1aa4"))))
1083 (build-system python-build-system)
1085 `(#:modules ((guix build utils)
1086 (guix build python-build-system)
1089 #:phases (modify-phases %standard-phases
1092 (let ((build-directory
1095 (car (scandir "build"
1096 (cut string-prefix? "lib." <>))))))
1097 (with-directory-excursion build-directory
1098 ;; Delete tests that require "moto" which is not yet in Guix.
1099 (for-each delete-file
1100 '("pandas/tests/io/conftest.py"
1101 "pandas/tests/io/json/test_compression.py"
1102 "pandas/tests/io/test_excel.py"))
1103 (invoke "pytest" "-v" "pandas" "-k"
1105 "not network and not disabled"
1106 ;; XXX: Due to the deleted tests above.
1107 " and not test_read_s3_jsonl")))))))))
1109 `(("python-numpy" ,python-numpy)
1110 ("python-pytz" ,python-pytz)
1111 ("python-dateutil" ,python-dateutil)))
1113 `(("python-cython" ,python-cython)
1114 ("python-lxml" ,python-lxml)
1115 ("python-nose" ,python-nose)
1116 ("python-pytest" ,python-pytest)))
1117 (home-page "https://pandas.pydata.org")
1118 (synopsis "Data structures for data analysis, time series, and statistics")
1120 "Pandas is a Python package providing fast, flexible, and expressive data
1121 structures designed to make working with structured (tabular,
1122 multidimensional, potentially heterogeneous) and time series data both easy
1123 and intuitive. It aims to be the fundamental high-level building block for
1124 doing practical, real world data analysis in Python.")
1125 (license license:bsd-3)))
1127 (define-public python2-pandas
1128 (package-with-python2 python-pandas))
1130 (define-public python2-mechanize
1132 (name "python2-mechanize")
1137 (uri (string-append "https://pypi.python.org/packages/source/m/mechanize/mechanize-"
1141 "0rj7r166i1dyrq0ihm5rijfmvhs8a04im28lv05c0c3v206v4rrf"))))
1142 (build-system python-build-system)
1144 `(#:python ,python-2 ; apparently incompatible with Python 3
1146 ;; test fails with message
1147 ;; AttributeError: 'module' object has no attribute 'test_pullparser'
1148 ;; (python-3.3.2) or
1149 ;; AttributeError: 'module' object has no attribute 'test_urllib2_localnet'
1151 ;; The source code is from March 2011 and probably not up-to-date
1152 ;; with respect to python unit tests.
1153 (home-page "http://wwwsearch.sourceforge.net/mechanize/")
1155 "Stateful programmatic web browsing in Python")
1157 "Mechanize implements stateful programmatic web browsing in Python,
1158 after Andy Lester’s Perl module WWW::Mechanize.")
1159 (license (license:non-copyleft
1161 "See COPYING in the distribution."))))
1164 (define-public python-simplejson
1166 (name "python-simplejson")
1171 (uri (pypi-uri "simplejson" version))
1174 "02jg5nixffqyicfqdl4dil82fh1z9p2as758wp0nqwalw0hcykjc"))))
1175 (build-system python-build-system)
1176 (home-page "http://simplejson.readthedocs.org/en/latest/")
1178 "Json library for Python")
1180 "JSON (JavaScript Object Notation) is a subset of JavaScript
1181 syntax (ECMA-262 3rd edition) used as a lightweight data interchange
1184 Simplejson exposes an API familiar to users of the standard library marshal
1185 and pickle modules. It is the externally maintained version of the json
1186 library contained in Python 2.6, but maintains compatibility with Python 2.5
1187 and (currently) has significant performance advantages, even without using
1188 the optional C extension for speedups. Simplejson is also supported on
1190 (license license:x11)))
1192 (define-public python2-simplejson
1193 (package-with-python2 python-simplejson))
1196 (define-public python-pyicu
1198 (name "python-pyicu")
1203 (uri (pypi-uri "PyICU" version))
1206 "05nz4p2dpkhwj6y9kik24xbvmfxji39nl0xw0sc0nvp9fgzf6xnd"))))
1207 (build-system python-build-system)
1209 `(("icu4c" ,icu4c)))
1211 `(("python-pytest" ,python-pytest)
1212 ("python-six" ,python-six)))
1213 (home-page "https://github.com/ovalhub/pyicu")
1214 (synopsis "Python extension wrapping the ICU C++ API")
1216 "PyICU is a python extension wrapping the ICU C++ API.")
1217 (properties `((python2-variant . ,(delay python2-pyicu))))
1218 (license license:x11)))
1220 (define-public python2-pyicu
1221 (let ((base (package-with-python2
1222 (strip-python2-variant python-pyicu))))
1226 `(,@(package-arguments base)
1228 (modify-phases %standard-phases
1229 (add-before 'check 'delete-failing-test
1231 ;; XXX: This fails due to Unicode issues unique to Python 2,
1232 ;; it seems: <https://github.com/ovalhub/pyicu/issues/61>.
1233 (delete-file "test/test_Script.py")
1236 (define-public python2-dogtail
1237 ;; Python 2 only, as it leads to "TabError: inconsistent use of tabs and
1238 ;; spaces in indentation" with Python 3.
1240 (name "python2-dogtail")
1244 (uri (pypi-uri "dogtail" version))
1247 "0p5wfssvzr9w0bvhllzbbd8fnp4cca2qxcpcsc33dchrmh5n552x"))))
1248 (build-system python-build-system)
1249 (arguments `(#:python ,python-2
1250 #:tests? #f)) ; invalid command "test"
1251 ;; Currently no offical homepage.
1252 (home-page "https://pypi.python.org/pypi/dogtail/")
1253 (synopsis "GUI test tool and automation framework written in Python")
1255 "Dogtail is a GUI test tool and automation framework written in Python.
1256 It uses Accessibility (a11y) technologies to communicate with desktop
1257 applications. dogtail scripts are written in Python and executed like any
1258 other Python program.")
1259 (license license:gpl2+)))
1261 (define-public python2-empy
1263 (name "python2-empy")
1267 (uri (string-append "http://www.alcyone.com/software/empy/empy-"
1271 "01g8mmkfnvjdmlhsihwyx56lrg7r5m5d2fg6mnxsvy6g0dnl69f6"))))
1272 (build-system python-build-system)
1274 `(#:python ,python-2
1276 (modify-phases %standard-phases
1279 (zero? (system* "./test.sh")))))))
1280 (home-page "http://www.alcyone.com/software/empy/")
1281 (synopsis "Templating system for Python")
1283 "EmPy is a system for embedding Python expressions and statements in
1284 template text; it takes an EmPy source file, processes it, and produces
1285 output. This is accomplished via expansions, which are special signals to the
1286 EmPy system and are set off by a special prefix (by default the at sign, @@).
1287 EmPy can expand arbitrary Python expressions and statements in this way, as
1288 well as a variety of special forms. Textual data not explicitly delimited in
1289 this way is sent unaffected to the output, allowing Python to be used in
1290 effect as a markup language. Also supported are callbacks via hooks,
1291 recording and playback via diversions, and dynamic, chainable filters. The
1292 system is highly configurable via command line options and embedded
1294 (license license:lgpl2.1+)))
1296 (define-public python2-element-tree
1298 (name "python2-element-tree")
1303 "http://effbot.org/media/downloads/elementtree-"
1304 version "-20050316.tar.gz"))
1307 "016bphqnlg0l4vslahhw4r0aanw95bpypy65r1i1acyb2wj5z7dj"))))
1308 (build-system python-build-system)
1310 `(#:python ,python-2 ; seems to be part of Python 3
1311 #:tests? #f)) ; no 'test' sub-command
1312 (synopsis "Toolkit for XML processing in Python")
1314 "ElementTree is a Python library supporting lightweight XML processing.")
1315 (home-page "http://effbot.org/zone/element-index.htm")
1316 (license (license:x11-style
1317 "http://docs.python.org/2/license.html"
1318 "Like \"CWI LICENSE AGREEMENT FOR PYTHON 0.9.0 THROUGH 1.2\"."))))
1320 (define-public python2-pybugz
1322 (name "python2-pybugz")
1327 "http://bits.liquidx.net/projects/pybugz/pybugz-"
1331 "17ni00p08gp5lkxlrrcnvi3x09fmajnlbz4da03qcgl9q21ym4jd"))
1332 (patches (search-patches "pybugz-stty.patch"
1333 "pybugz-encode-error.patch"))))
1334 (build-system python-build-system)
1336 `(#:python ,python-2 ; SyntaxError with Python 3
1337 #:tests? #f)) ; no 'test' sub-command
1339 `(("element-tree" ,python2-element-tree)))
1340 (synopsis "Python and command-line interface to Bugzilla")
1342 "PyBugz is a Python library and command-line tool to query the Bugzilla
1343 bug tracking system. It is meant as an aid to speed up interaction with the
1345 (home-page "http://www.liquidx.net/pybugz/")
1346 (license license:gpl2)))
1348 (define-public python2-enum
1350 (name "python2-enum")
1354 (uri (pypi-uri "enum" version))
1357 "13lk3yrwj42vl30kw3c194f739nrfrdg64s6i0v2p636n4k8brsl"))))
1358 (build-system python-build-system)
1360 `(#:python ,python-2))
1361 (home-page "http://pypi.python.org/pypi/enum/")
1362 (synopsis "Robust enumerated type support in Python")
1364 "This provides a module for robust enumerations in Python. It has
1365 been superseded by the Python standard library and is provided only for
1367 ;; Choice of either license.
1368 (license (list license:gpl3+ license:psfl))))
1370 (define-public python-enum34
1372 (name "python-enum34")
1377 (uri (pypi-uri "enum34" version))
1380 "1cgm5ng2gcfrkrm3hc22brl6chdmv67b9zvva9sfs7gn7dwc9n4a"))))
1381 (build-system python-build-system)
1382 (home-page "https://pypi.python.org/pypi/enum34")
1383 (synopsis "Backported Python 3.4 Enum")
1385 "Enum34 is the new Python stdlib enum module available in Python 3.4
1386 backported for previous versions of Python from 2.4 to 3.3.")
1387 (license license:bsd-3)))
1389 (define-public python2-enum34
1390 (package-with-python2 python-enum34))
1392 (define-public python-parse-type
1394 (name "python-parse-type")
1399 (uri (pypi-uri "parse_type" version))
1402 "0g3b6gsdwnm8dpkh2vn34q6dzxm9gl908ggyzcv31n9xbp3vv5pm"))))
1403 (build-system python-build-system)
1405 `(("python-six" ,python-six)
1406 ("python-parse" ,python-parse)))
1408 `(("python-pytest" ,python-pytest)
1409 ("python-pytest-runner" ,python-pytest-runner)))
1410 (home-page "https://github.com/jenisys/parse_type")
1411 (synopsis "Extended parse module")
1413 "Parse_type extends the python parse module.")
1415 `((python2-variant . ,(delay python2-parse-type))))
1416 (license license:bsd-3)))
1418 (define-public python2-parse-type
1419 (let ((base (package-with-python2
1420 (strip-python2-variant python-parse-type))))
1421 (package (inherit base)
1423 `(("python2-enum34" ,python2-enum34)
1424 ,@(package-propagated-inputs base))))))
1426 (define-public python-parse
1428 (name "python-parse")
1433 (uri (pypi-uri "parse" version))
1436 "1lj9v1q4imszyhvipb6drsm3xdl35nan011mqxxas1yaypixsj40"))))
1437 (build-system python-build-system)
1440 (modify-phases %standard-phases
1442 (lambda _ (invoke "python" "test_parse.py"))))))
1443 (home-page "https://github.com/r1chardj0n3s/parse")
1444 (synopsis "Parse strings")
1446 "Parse strings using a specification based on the Python format()
1448 (license license:x11)))
1450 (define-public python-polib
1452 (name "python-polib")
1456 (uri (pypi-uri "polib" version))
1459 "1pq2hbm3m2q0cjdszk8mc4qa1vl3wcblh5nfyirlfnzb2pcy7zss"))))
1460 (build-system python-build-system)
1461 (home-page "https://bitbucket.org/izi/polib/wiki/Home")
1462 (synopsis "Manipulate, create and modify gettext files")
1463 (description "Polib can manipulate any gettext format (po, pot and mo)
1464 files. It can be used to create po files from scratch or to modify
1466 (license license:expat)))
1468 (define-public python2-polib
1469 (let ((base (package-with-python2 (strip-python2-variant python-polib))))
1472 (arguments `(,@(package-arguments base)
1473 ;; Tests don't work with python2.
1476 (define-public scons
1482 (uri (string-append "mirror://sourceforge/scons/scons/" version
1483 "/scons-" version ".tar.gz"))
1486 "0wzid419mlwqw9llrg8gsx4nkzhqy16m4m40r0xnh6cwscw5wir4"))))
1487 (build-system python-build-system)
1489 `(#:use-setuptools? #f ; still relies on distutils
1490 #:tests? #f)) ; no 'python setup.py test' command
1491 (home-page "http://scons.org/")
1492 (synopsis "Software construction tool written in Python")
1494 "SCons is a software construction tool. Think of SCons as an improved,
1495 cross-platform substitute for the classic Make utility with integrated
1496 functionality similar to autoconf/automake and compiler caches such as ccache.
1497 In short, SCons is an easier, more reliable and faster way to build
1499 (license license:x11)))
1501 (define-public scons-python2
1503 (inherit (package-with-python2 scons))
1504 (name "scons-python2")))
1506 (define-public python-extras
1508 (name "python-extras")
1513 (uri (pypi-uri "extras" version))
1516 "0khvm08rcwm62wc47j8niyl6h13f8w51c8669ifivjdr23g3cbhk"))))
1517 (build-system python-build-system)
1519 ;; FIXME: Circular dependency on testtools.
1521 (home-page "https://github.com/testing-cabal/extras")
1522 (synopsis "Useful extensions to the Python standard library")
1524 "Extras is a set of extensions to the Python standard library.")
1525 (license license:expat)))
1527 (define-public python2-extras
1528 (package-with-python2 python-extras))
1530 (define-public python-mimeparse
1532 (name "python-mimeparse")
1538 "https://pypi.python.org/packages/source/p/python-mimeparse/python-mimeparse-"
1542 "1hyxg09kaj02ri0rmwjqi86wk4nd1akvv7n0dx77azz76wga4s9w"))))
1543 (build-system python-build-system)
1545 '(#:tests? #f)) ; no setup.py test command
1547 "https://github.com/dbtsai/python-mimeparse")
1548 (synopsis "Python library for parsing MIME types")
1550 "Mimeparse provides basic functions for parsing MIME type names and
1551 matching them against a list of media-ranges.")
1552 (license license:expat)))
1554 (define-public python2-mimeparse
1555 (package-with-python2 python-mimeparse))
1557 (define-public python-pafy
1559 (name "python-pafy")
1564 (uri (pypi-uri "pafy" version))
1567 "1a7dxi95m1043rxx1r5x3ngb66nwlq6aqcasyqqjzmmmjps4zrim"))))
1568 (build-system python-build-system)
1570 `(#:tests? #f)) ; Currently pafy can not find itself in the tests
1572 ;; Youtube-dl is a python package which is imported in the file
1573 ;; "backend_youtube_dl.py", therefore it needs to be propagated.
1574 `(("youtube-dl" ,youtube-dl)))
1575 (home-page "https://np1.github.io/pafy/")
1576 (synopsis "Retrieve YouTube content and metadata")
1578 "@code{pafy} is a python library to retrieve YouTube content and metadata.")
1579 (license license:lgpl3+)))
1581 (define-public python2-funcsigs
1583 (name "python2-funcsigs")
1587 (uri (pypi-uri "funcsigs" version))
1590 "0l4g5818ffyfmfs1a924811azhjj8ax9xd1cffr1mzd3ycn0zfx7"))))
1591 (build-system python-build-system)
1593 `(#:python ,python-2))
1595 `(("python2-unittest2" ,python2-unittest2)))
1596 (home-page "http://funcsigs.readthedocs.org")
1597 (synopsis "Python function signatures from PEP362")
1599 "Backport of @code{funcsigs} which was introduced in Python 3.3.")
1600 (license license:asl2.0)))
1602 (define-public python-pafy
1604 (name "python-pafy")
1609 (uri (pypi-uri "pafy" version))
1612 "1a7dxi95m1043rxx1r5x3ngb66nwlq6aqcasyqqjzmmmjps4zrim"))))
1613 (build-system python-build-system)
1615 `(#:tests? #f)) ; Currently pafy can not find itself in the tests
1617 ;; Youtube-dl is a python package which is imported in the file
1618 ;; "backend_youtube_dl.py", therefore it needs to be propagated.
1619 `(("youtube-dl" ,youtube-dl)))
1620 (home-page "https://np1.github.io/pafy/")
1621 (synopsis "Retrieve YouTube content and metadata")
1623 "@code{pafy} is a python library to retrieve YouTube content and metadata.")
1624 (license license:lgpl3+)))
1626 (define-public python-py
1633 (uri (pypi-uri "py" version))
1636 "1qyd5z0hv8ymxy84v5vig3vps2fvhcf4bdlksb3r03h549fmhb8g"))))
1637 (build-system python-build-system)
1639 ;; FIXME: "ImportError: 'test' module incorrectly imported from
1640 ;; '/gnu/store/...-python-pytest-mimimal-3.0.5/lib/python3.5/site-packages'.
1641 ;; Expected '/tmp/guix-build-python-py-1.4.31.drv-0/py-1.4.31/py'.
1642 ;; Is this module globally installed?"
1644 (home-page "http://pylib.readthedocs.org/")
1645 (synopsis "Python library for parsing, I/O, instrospection, and logging")
1647 "Py is a Python library for file name parsing, .ini file parsing, I/O,
1648 code introspection, and logging.")
1649 (license license:expat)))
1651 (define-public python2-py
1652 (package-with-python2 python-py))
1654 ;; Recent versions of python-fixtures and python-testrepository need
1655 ;; python-pbr for packaging, which itself needs these two packages for
1657 ;; To fix this circular dependency, we use a build of python-pbr, based on the
1658 ;; same source, just without any test dependencies and with tests disabled.
1659 ;; python-pbr-minmal is then used to package python-fixtures and
1660 ;; python-testrepository.
1661 ;; Strictly speaking we currently could remove the test-requirements from the
1662 ;; normal python-pbr package (and save this package) since test are disabled
1663 ;; there anyway. But this may change in future.
1664 (define-public python-pbr-minimal
1666 (name "python-pbr-minimal")
1671 (uri (pypi-uri "pbr" version))
1674 "14fs5acnalnb3h62s7q7av239j541fk0n0z0lawh4h09b1s93s6p"))))
1675 (build-system python-build-system)
1678 (home-page "http://docs.openstack.org/developer/pbr/")
1679 (synopsis "Minimal build of python-pbr used for bootstrapping")
1681 "Used only for bootstrapping python2-pbr, you should not need this.")
1682 (license license:asl2.0)))
1684 (define-public python2-pbr-minimal
1685 (package-with-python2 python-pbr-minimal))
1687 (define-public python-pbr
1689 (inherit python-pbr-minimal)
1692 `(#:tests? #f)) ;; Most tests seem to use the Internet.
1694 `(("git" ,git))) ;; pbr actually uses the "git" binary.
1696 `(("python-fixtures" ,python-fixtures-bootstrap)
1697 ;; discover, coverage, hacking, subunit
1698 ("python-mock" ,python-mock)
1699 ("python-six" ,python-six)
1700 ("python-sphinx" ,python-sphinx)
1701 ("python-testrepository" ,python-testrepository-bootstrap)
1702 ("python-testresources" ,python-testresources-bootstrap)
1703 ("python-testscenarios" ,python-testscenarios-bootstrap)
1704 ("python-testtools" ,python-testtools-bootstrap)
1705 ("python-virtualenv" ,python-virtualenv)))
1706 (synopsis "Enhance the default behavior of Python’s setuptools")
1708 "Python Build Reasonableness (PBR) is a library that injects some useful
1709 and sensible default behaviors into your setuptools run. It will set
1710 versions, process requirements files and generate AUTHORS and ChangeLog file
1711 from git information.
1714 (define-public python2-pbr
1715 (package-with-python2 python-pbr))
1717 (define-public python-exif-read
1719 (name "python-exif-read")
1723 (uri (pypi-uri "ExifRead" version))
1726 "1b90jf6m9vxh9nanhpyvqdq7hmfx5iggw1l8kq10jrs6xgr49qkr"))))
1727 (build-system python-build-system)
1728 (arguments `(#:tests? #f)) ; no tests
1729 (home-page "https://github.com/ianare/exif-py")
1730 (synopsis "Python library to extract EXIF data from image files")
1732 "ExifRead is a Python library to extract EXIF data from tiff and jpeg
1734 (license license:bsd-3)))
1736 (define-public python2-exif-read
1737 (package-with-python2 python-exif-read))
1739 (define-public python-pyld
1741 (name "python-pyld")
1745 (uri (pypi-uri "PyLD" version))
1748 "1m0fs6897vxfkf7awah5i66i7b7smm5fnywf1w50fpzyfbfhr156"))))
1749 (build-system python-build-system)
1750 (arguments `(#:tests? #f)) ; no tests
1751 (home-page "https://github.com/digitalbazaar/pyld")
1752 (synopsis "Python implementation of the JSON-LD specification")
1754 "PyLD is an implementation of the JSON-LD specification.")
1755 (license license:bsd-3)))
1757 (define-public python2-pyld
1758 (package-with-python2 python-pyld))
1760 (define-public python-click
1762 (name "python-click")
1767 (uri (pypi-uri "click" version))
1770 "02qkfpykbq35id8glfgwc38yc430427yd05z1wc5cnld8zgicmgi"))))
1771 (build-system python-build-system)
1773 `(;; The tests are fragile, depending on a specific version of pytest:
1774 ;; <https://github.com/pallets/click/issues/823>
1777 (modify-phases %standard-phases
1778 (add-after 'unpack 'fix-paths
1779 (lambda* (#:key inputs #:allow-other-keys)
1780 (let ((glibc (assoc-ref inputs ,(if (%current-target-system)
1781 "cross-libc" "libc"))))
1782 (substitute* "click/_unicodefun.py"
1784 (string-append "'" glibc "/bin/locale'"))))
1787 `(("python-pytest" ,python-pytest)))
1788 (home-page "http://click.pocoo.org")
1789 (synopsis "Command line library for Python")
1791 "Click is a Python package for creating command line interfaces in a
1792 composable way with as little code as necessary. Its name stands for
1793 \"Command Line Interface Creation Kit\". It's highly configurable but comes
1794 with sensible defaults out of the box.")
1795 (license license:bsd-3)))
1797 (define-public python2-click
1798 (package-with-python2 python-click))
1800 (define-public python-wheel
1802 (name "python-wheel")
1803 (version "0.30.0a0")
1807 (uri (pypi-uri "wheel" version))
1810 "1nm6mn8isny0hr86rhbfrpfj867c0phf001xgsd69xfp9ady1wwq"))))
1811 (build-system python-build-system)
1813 `(("python-jsonschema" ,python-jsonschema)
1814 ("python-pytest-cov" ,python-pytest-cov)))
1815 (home-page "https://bitbucket.org/pypa/wheel/")
1816 (synopsis "Format for built Python packages")
1818 "A wheel is a ZIP-format archive with a specially formatted filename and
1819 the @code{.whl} extension. It is designed to contain all the files for a PEP
1820 376 compatible install in a way that is very close to the on-disk format. Many
1821 packages will be properly installed with only the @code{Unpack} step and the
1822 unpacked archive preserves enough information to @code{Spread} (copy data and
1823 scripts to their final locations) at any later time. Wheel files can be
1824 installed with a newer @code{pip} or with wheel's own command line utility.")
1825 (license license:expat)
1826 (properties `((python2-variant . ,(delay python2-wheel))))))
1828 (define-public python2-wheel
1829 (let ((wheel (package-with-python2
1830 (strip-python2-variant python-wheel))))
1831 (package (inherit wheel)
1832 (native-inputs `(("python2-functools32" ,python2-functools32)
1833 ,@(package-native-inputs wheel))))))
1835 (define-public python-vcversioner
1837 (name "python-vcversioner")
1838 (version "2.16.0.0")
1842 (uri (pypi-uri "vcversioner" version))
1845 "16z10sm78jd7ca3jbkgc3q5i8a8q7y1h21q1li21yy3rlhbhrrns"))))
1846 (build-system python-build-system)
1847 (synopsis "Python library for version number discovery")
1848 (description "Vcversioner is a Python library that inspects tagging
1849 information in a variety of version control systems in order to discover
1851 (home-page "https://github.com/habnabit/vcversioner")
1852 (license license:isc)))
1854 (define-public python2-vcversioner
1855 (package-with-python2 python-vcversioner))
1857 (define-public python-jsonschema
1859 (name "python-jsonschema")
1865 "https://pypi.python.org/packages/source/j/jsonschema/jsonschema-"
1869 "00kf3zmpp9ya4sydffpifn0j0mzm342a2vzh82p6r0vh10cg7xbg"))))
1870 (build-system python-build-system)
1873 (modify-phases %standard-phases
1874 (replace 'check (lambda _ (zero? (system* "nosetests")))))))
1876 `(("python-nose" ,python-nose)
1877 ("python-vcversioner" ,python-vcversioner)))
1878 (home-page "https://github.com/Julian/jsonschema")
1879 (synopsis "Implementation of JSON Schema for Python")
1881 "Jsonschema is an implementation of JSON Schema for Python.")
1882 (license license:expat)
1883 (properties `((python2-variant . ,(delay python2-jsonschema))))))
1885 (define-public python2-jsonschema
1886 (let ((jsonschema (package-with-python2
1887 (strip-python2-variant python-jsonschema))))
1888 (package (inherit jsonschema)
1890 `(("python2-mock" ,python2-mock)
1891 ,@(package-native-inputs jsonschema)))
1893 `(("python2-functools32" ,python2-functools32))))))
1895 (define-public python-schema
1897 (name "python-schema")
1902 (uri (pypi-uri "schema" version))
1905 "1lw28j9w9vxyigg7vkfkvi6ic9lgjkdnfvnxdr7pklslqvzmk2vm"))))
1906 (build-system python-build-system)
1908 `(("python-pytest" ,python-pytest)))
1909 (home-page "https://github.com/keleshev/schema")
1910 (synopsis "Simple data validation library")
1912 "@code{python-schema} is a library for validating Python data
1913 structures, such as those obtained from config-files, forms, external
1914 services or command-line parsing, converted from JSON/YAML (or
1915 something else) to Python data-types.")
1916 (license license:psfl)))
1918 (define-public python2-schema
1919 (package-with-python2 python-schema))
1921 (define-public python-schema-0.5
1922 (package (inherit python-schema)
1927 (uri (pypi-uri "schema" version))
1930 "10zqvpaky51kgb8nd42bk7jwl8cn2zvayxjpdc1wwmpybj92x67s"))))))
1932 (define-public python2-schema-0.5
1933 (package-with-python2 python-schema-0.5))
1935 (define-public python-kitchen
1937 (name "python-kitchen")
1942 (uri (pypi-uri "kitchen" version))
1945 "1zakh6l0yjvwic9p0nkvmbidpnkygkxbigh2skmb5gccyrhbp7xg"))))
1946 (build-system python-build-system)
1948 `(("python-chardet" ,python-chardet)))
1949 (home-page "https://github.com/fedora-infra/kitchen")
1950 (synopsis "Python API for snippets")
1951 (description "@code{kitchen} module provides a python API for all sorts of
1952 little useful snippets of code that everybody ends up writing for their projects
1953 but never seem big enough to build an independent release. Use kitchen and stop
1954 cutting and pasting that code over and over.")
1955 (license (list license:lgpl2.1+
1956 ;; subprocess.py, test_subprocess.py,
1957 ;; kitchen/pycompat25/defaultdict.py:
1960 (define-public python2-kitchen
1961 (package-with-python2 python-kitchen))
1963 (define-public python-unidecode
1965 (name "python-unidecode")
1969 (uri (pypi-uri "Unidecode" version))
1972 "0lfhp9c5xrbpjvbpr12ji52g1lx04404bzzdg6pvabhzisw6l2i8"))))
1973 (build-system python-build-system)
1974 (home-page "https://pypi.python.org/pypi/Unidecode")
1975 (synopsis "ASCII transliterations of Unicode text")
1977 "Unidecode provides ASCII transliterations of Unicode text. Unidecode is
1978 useful when integrating with legacy code that doesn't support Unicode, or for
1979 ease of entry of non-Roman names on a US keyboard, or when constructing ASCII
1980 machine identifiers from human-readable Unicode strings that should still be
1981 somewhat intelligible.")
1982 (license license:gpl2+)))
1984 (define-public python2-unidecode
1985 (package-with-python2 python-unidecode))
1987 (define-public python-pyjwt
1989 (name "python-pyjwt")
1994 (uri (pypi-uri "PyJWT" version))
1997 "1rxsg14i33vm2i6lz0my628108c81k43v10n4h3p0gx62xdyf2sh"))
1998 (modules '((guix build utils)))
2001 (for-each delete-file-recursively
2002 (find-files "." "\\.pyc$"))
2004 (build-system python-build-system)
2006 `(("python-pytest" ,python-pytest)
2007 ("python-pytest-cov" ,python-pytest-cov)
2008 ("python-pytest-runner" ,python-pytest-runner)))
2009 (home-page "https://github.com/progrium/pyjwt")
2010 (synopsis "JSON Web Token implementation in Python")
2012 "PyJWT is a JSON Web Token implementation written in Python.")
2013 (license license:expat)))
2015 (define-public python2-pyjwt
2016 (package-with-python2 python-pyjwt))
2018 (define-public python-pykka
2020 (name "python-pykka")
2025 (uri (pypi-uri "Pykka" version))
2028 "049w3r0mdnnw7xv19jiq7rvls9k7xs73x05b4qs5d6z4vvmgyiz8"))))
2029 (build-system python-build-system)
2031 `(("python-mock" ,python-mock)
2032 ("python-nose" ,python-nose)
2033 ("python-gevent" ,python-gevent)
2034 ("python-eventlet" ,python-eventlet)))
2035 (home-page "https://www.pykka.org/")
2036 (synopsis "Pykka is a Python implementation of the actor model")
2038 "Pykka is a Python implementation of the actor model.
2039 The actor model introduces some simple rules to control the sharing
2040 of state and cooperation between execution units, which makes it
2041 easier to build concurrent applications.")
2042 (license license:asl2.0)))
2044 (define-public python2-pykka
2045 (package-with-python2 python-pykka))
2047 (define-public python-itsdangerous
2049 (name "python-itsdangerous")
2055 "https://pypi.python.org/packages/source/i/itsdangerous/itsdangerous-"
2059 "06856q6x675ly542ig0plbqcyab6ksfzijlyf1hzhgg3sgwgrcyb"))))
2060 (build-system python-build-system)
2061 (home-page "https://github.com/mitsuhiko/itsdangerous")
2062 (synopsis "Python library for passing data to/from untrusted environments")
2064 "Itsdangerous provides various helpers to pass trusted data to untrusted
2065 environments and back.")
2066 (license license:bsd-3)))
2068 (define-public python2-itsdangerous
2069 (package-with-python2 python-itsdangerous))
2071 (define-public python-pyyaml
2073 (name "python-pyyaml")
2078 (uri (pypi-uri "PyYAML" version))
2081 "1aqjl8dk9amd4zr99n8v2qxzgmr2hdvqfma4zh7a41rj6336c9sr"))))
2082 (build-system python-build-system)
2084 `(("libyaml" ,libyaml)))
2085 (home-page "http://pyyaml.org/wiki/PyYAML")
2086 (synopsis "YAML parser and emitter for Python")
2088 "PyYAML is a YAML parser and emitter for Python. PyYAML features a
2089 complete YAML 1.1 parser, Unicode support, pickle support, capable extension
2090 API, and sensible error messages. PyYAML supports standard YAML tags and
2091 provides Python-specific tags that allow to represent an arbitrary Python
2093 (license license:expat)))
2095 (define-public python2-pyyaml
2096 (package-with-python2 python-pyyaml))
2098 (define-public python-virtualenv
2100 (name "python-virtualenv")
2105 (uri (pypi-uri "virtualenv" version))
2108 "07cbajzk8l05k5zhlw0b9wbf2is65bl9v6zrn2a0iyn57w6pd73d"))))
2109 (build-system python-build-system)
2112 (modify-phases %standard-phases
2115 ;; Disable failing test. See upstream bug report
2116 ;; https://github.com/pypa/virtualenv/issues/957
2117 (substitute* "tests/test_virtualenv.py"
2118 (("skipif.*") "skipif(True, reason=\"Guix\")\n"))
2119 (zero? (system* "py.test")))))))
2121 `(("python-mock" ,python-mock)
2122 ("python-pytest" ,python-pytest)))
2123 (home-page "https://virtualenv.pypa.io/")
2124 (synopsis "Virtual Python environment builder")
2126 "Virtualenv is a tool to create isolated Python environments.")
2127 (license license:expat)))
2129 (define-public python2-virtualenv
2130 (package-with-python2 python-virtualenv))
2132 (define-public python-markupsafe
2134 (name "python-markupsafe")
2140 "https://pypi.python.org/packages/source/M/MarkupSafe/MarkupSafe-"
2144 "1hvip33wva3fnmvfp9x5klqri7hpl1hkgqmjbss18nmrb7zimv54"))))
2145 (build-system python-build-system)
2146 (home-page "https://github.com/mitsuhiko/markupsafe")
2147 (synopsis "XML/HTML/XHTML markup safe string implementation for Python")
2149 "Markupsafe provides an XML/HTML/XHTML markup safe string implementation
2151 (license license:bsd-3)))
2153 (define-public python2-markupsafe
2154 (package-with-python2 python-markupsafe))
2156 (define-public python-jinja2
2158 (name "python-jinja2")
2163 (uri (pypi-uri "Jinja2" version))
2166 "1zzrkywhziqffrzks14kzixz7nd4yh2vc0fb04a68vfd2ai03anx"))))
2167 (build-system python-build-system)
2169 `(("python-markupsafe" ,python-markupsafe)))
2170 (home-page "http://jinja.pocoo.org/")
2171 (synopsis "Python template engine")
2173 "Jinja2 is a small but fast and easy to use stand-alone template engine
2174 written in pure Python.")
2175 (license license:bsd-3)))
2177 (define-public python2-jinja2
2178 (package-with-python2 python-jinja2))
2180 (define-public python-pystache
2182 (name "python-pystache")
2186 (uri (pypi-uri "pystache" version))
2189 "0nmqsfmiw4arjxqkmf9z66ml950pcdjk6aq4gin4sywmzdjw5fzp"))))
2190 (build-system python-build-system)
2192 '(#:tests? #f)) ; FIXME: Python 3 tests are failing.
2193 (home-page "http://defunkt.io/pystache/")
2194 (synopsis "Python logic-less template engine")
2196 "Pystache is a Python implementation of the framework agnostic,
2197 logic-free templating system Mustache.")
2198 (license license:expat)
2199 (properties `((python2-variant . ,(delay python2-pystache))))))
2201 (define-public python2-pystache
2202 (package (inherit (package-with-python2
2203 (strip-python2-variant python-pystache)))
2205 `(#:python ,python-2
2207 (modify-phases %standard-phases
2210 (zero? (system* "python" "test_pystache.py")))))))))
2212 (define-public python-joblib
2214 (name "python-joblib")
2218 (uri (pypi-uri "joblib" version))
2221 "0787k919zlfmgymprz5bzv0v1df5bbirlf3awrghmjgvkrd9dci9"))
2222 (modules '((guix build utils)))
2225 ;; Remove pre-compiled .pyc files from source.
2226 (for-each delete-file-recursively
2227 (find-files "." "__pycache__" #:directories? #t))
2228 (for-each delete-file (find-files "." "\\.pyc$"))
2230 (build-system python-build-system)
2233 (modify-phases %standard-phases
2234 (add-before 'check 'disable-failing-tests
2236 ;; This numpydoc tests fails for unknown reasons
2237 (delete-file "doc/sphinxext/numpydoc/tests/test_docscrape.py")
2238 ;; This numpydoc test depends on matplotlib, which is not a
2240 (delete-file "doc/sphinxext/numpydoc/tests/test_plot_directive.py")
2241 ;; These tests fail to execute sys.executable
2242 (substitute* "joblib/test/test_parallel.py"
2243 (("import nose" line)
2244 (string-append "from nose.plugins.skip import SkipTest\n" line))
2245 (("def test_nested_parallel_warnings" line)
2246 (string-append "@SkipTest\n" line))
2247 (("def test_parallel_with_interactively_defined_functions" line)
2248 (string-append "@SkipTest\n" line)))
2250 ;; Provide nose to enable tests command
2252 `(("python-nose" ,python-nose)
2253 ("python-sphinx" ,python-sphinx)
2254 ("python-docutils" ,python-docutils)
2255 ("python-numpydoc" ,python-numpydoc)))
2256 (home-page "http://pythonhosted.org/joblib/")
2257 (synopsis "Using Python functions as pipeline jobs")
2259 "Joblib is a set of tools to provide lightweight pipelining in Python.
2260 In particular, joblib offers: transparent disk-caching of the output values
2261 and lazy re-evaluation (memoize pattern), easy simple parallel computing
2262 logging and tracing of the execution.")
2263 (license license:bsd-3)))
2265 (define-public python2-joblib
2266 (package-with-python2 python-joblib))
2268 (define-public python-docutils
2270 (name "python-docutils")
2275 (uri (pypi-uri "docutils" version))
2278 "0x22fs3pdmr42kvz6c654756wja305qv6cx1zbhwlagvxgr4xrji"))))
2279 (build-system python-build-system)
2281 '(#:tests? #f)) ; no setup.py test command
2282 (home-page "http://docutils.sourceforge.net/")
2283 (synopsis "Python Documentation Utilities")
2285 "Docutils is a modular system for processing documentation into useful
2286 formats, such as HTML, XML, and LaTeX. For input Docutils supports
2288 ;; Most of the source code is public domain, but some source files are
2289 ;; licensed under the PFSL, BSD 2-clause, and GPLv3+ licenses.
2290 (license (list license:public-domain license:psfl license:bsd-2 license:gpl3+))))
2292 (define-public python2-docutils
2293 (package-with-python2 python-docutils))
2295 (define-public python-pygments
2297 (name "python-pygments")
2302 (uri (pypi-uri "Pygments" version))
2305 "1k78qdvir1yb1c634nkv6rbga8wv4289xarghmsbbvzhvr311bnv"))))
2306 (build-system python-build-system)
2308 ;; FIXME: Tests require sphinx, which depends on this.
2310 (home-page "http://pygments.org/")
2311 (synopsis "Syntax highlighting")
2313 "Pygments is a syntax highlighting package written in Python.")
2314 (license license:bsd-2)))
2316 (define-public python2-pygments
2317 (package-with-python2 python-pygments))
2319 (define-public python-sphinxcontrib-websupport
2321 (name "python-sphinxcontrib-websupport")
2325 (uri (pypi-uri "sphinxcontrib-websupport" version))
2328 "1f9f0wjpi9nhikbyaz6d19s7qvzdf1nq2g5dsh640fma4q9rd1bs"))))
2329 (build-system python-build-system)
2331 `(("python-mock" ,python-mock)
2332 ("python-pytest" ,python-pytest)
2333 ("python-xapian-bindings" ,python-xapian-bindings)))
2334 ;; Needed for running the test suite
2336 `(("python-six" ,python-six)
2337 ("python-jinja2" ,python-jinja2)
2338 ("python-docutils" ,python-docutils)
2339 ("python-sphinx" ,python-sphinx)
2340 ("python-sqlalchemy" ,python-sqlalchemy)
2341 ("python-whoosh" ,python-whoosh)))
2342 (home-page "http://sphinx-doc.org/")
2343 (synopsis "Sphinx API for web applications")
2344 (description "This package provides a Python API to easily integrate
2345 Sphinx documentation into your web application. It provides tools to
2346 integrate Sphinx documents in web templates and to handle searches.")
2347 (license license:bsd-3)))
2349 (define-public python-sphinx
2351 (name "python-sphinx")
2356 (uri (pypi-uri "Sphinx" version))
2359 "1i8p9idnli4gr0y4x67yakbdk5w6a0xjzhrg6bg51y9d1fi7fslf"))))
2360 (build-system python-build-system)
2363 (modify-phases %standard-phases
2366 ;; Requires Internet access.
2367 (delete-file "tests/test_build_linkcheck.py")
2368 (zero? (system* "make" "test")))))))
2370 `(("python-imagesize" ,python-imagesize)
2371 ("python-sphinx-alabaster-theme"
2372 ,python-sphinx-alabaster-theme)
2373 ("python-babel" ,python-babel)
2374 ("python-snowballstemmer" ,python-snowballstemmer)
2375 ("python-docutils" ,python-docutils)
2376 ("python-jinja2" ,python-jinja2)
2377 ("python-pygments" ,python-pygments)
2378 ("python-requests" ,python-requests)
2379 ("python-six" ,python-six)))
2381 `(("graphviz" ,graphviz)
2382 ("python-html5lib" ,python-html5lib)
2383 ("python-mock" ,python-mock)
2384 ("python-nose" ,python-nose)))
2385 (home-page "http://sphinx-doc.org/")
2386 (synopsis "Python documentation generator")
2387 (description "Sphinx is a tool that makes it easy to create documentation
2388 for Python projects or other documents consisting of multiple reStructuredText
2390 (license license:bsd-3)
2391 (properties `((python2-variant . ,(delay python2-sphinx))))))
2393 (define-public python-sphinx-1.6
2394 (package (inherit python-sphinx)
2395 (name "python-sphinx")
2399 (uri (pypi-uri "Sphinx" version))
2402 "1rj6f3i8hmrx2qlkshi5kp5xcy98dlynwlyl05yvflj5f66dp2xg"))))
2405 (modify-phases %standard-phases
2408 ;; Requires Internet access.
2409 (delete-file "tests/test_build_linkcheck.py")
2410 (substitute* "tests/test_build_latex.py"
2411 (("@pytest.mark.sphinx\\('latex', testroot='images'\\)")
2412 "@pytest.mark.skip()"))
2413 (zero? (system* "make" "test")))))))
2415 `(("python-sphinxcontrib-websupport" ,python-sphinxcontrib-websupport)
2416 ,@(package-propagated-inputs python-sphinx)))
2418 `(("python-pytest" ,python-pytest)
2419 ("imagemagick" ,imagemagick) ; for "convert"
2420 ,@(package-native-inputs python-sphinx)))
2421 (properties `((python2-variant . ,(delay python2-sphinx-1.6))))))
2423 (define-public python2-sphinx-1.6
2424 (let ((base (package-with-python2 (strip-python2-variant python-sphinx-1.6))))
2428 `(("python2-typing" ,python2-typing)
2429 ,@(package-propagated-inputs base)))
2430 (native-inputs `(("python2-enum34" ,python2-enum34)
2431 ,@(package-native-inputs base))))))
2433 (define-public python-sphinx-1.5.3
2435 (inherit python-sphinx)
2436 (name "python-sphinx")
2441 (uri (pypi-uri "Sphinx" version))
2444 "0kw1axswbvaavr8ggyf4qr6hnisnrzlbkkcdada69vk1x9xjassg"))))
2446 `(("python-pytest" ,python-pytest)
2447 ,@(package-native-inputs python-sphinx)))))
2449 (define-public python2-sphinx
2450 (let ((base (package-with-python2 (strip-python2-variant python-sphinx))))
2453 (native-inputs `(("python2-mock" ,python2-mock)
2454 ("python2-enum34" ,python2-enum34)
2455 ,@(package-native-inputs base)))
2456 (propagated-inputs `(("python2-pytz" ,python2-pytz)
2457 ,@(package-propagated-inputs base))))))
2459 (define-public python-sphinx-rtd-theme
2461 (name "python-sphinx-rtd-theme")
2466 (uri (pypi-uri "sphinx_rtd_theme" version))
2469 "05rlhjzdyapr2w74jjs7mrm8hi69qskcr5vya9f9drpsys7lpxrd"))))
2470 (build-system python-build-system)
2471 (arguments '(#:tests? #f)) ; No tests.
2473 `(("python-sphinx" ,python-sphinx)))
2474 (home-page "https://github.com/snide/sphinx_rtd_theme/")
2475 (synopsis "ReadTheDocs.org theme for Sphinx")
2476 (description "A theme for Sphinx used by ReadTheDocs.org.")
2477 (license license:expat)))
2479 (define-public python2-sphinx-rtd-theme
2480 (package-with-python2 python-sphinx-rtd-theme))
2482 (define-public python-guzzle-sphinx-theme
2484 (name "python-guzzle-sphinx-theme")
2489 (uri (pypi-uri "guzzle_sphinx_theme" version))
2492 "1rnkzrrsbnifn3vsb4pfaia3nlvgvw6ndpxp7lzjrh23qcwid34v"))))
2493 (build-system python-build-system)
2495 `(("python-sphinx" ,python-sphinx)))
2496 (home-page "https://github.com/guzzle/guzzle_sphinx_theme")
2497 (synopsis "Sphinx theme used by Guzzle")
2498 (description "This package provides guzzle_sphinx_theme, a theme for the
2499 Sphinx documentation system, used by @uref{http://docs.guzzlephp.org, Guzzle}
2500 and several other projects.")
2501 (license license:expat)))
2503 (define-public python2-guzzle-sphinx-theme
2504 (package-with-python2 python-guzzle-sphinx-theme))
2506 (define-public python-rst.linker
2508 (name "python-rst.linker")
2513 (uri (pypi-uri "rst.linker" version))
2516 "0bh4lnj2p1nh0wf5pgxgfbrp27xhb1rinahkb5j7s3qprq6qn0sr"))))
2517 (build-system python-build-system)
2519 `(("python-dateutil" ,python-dateutil)
2520 ("python-six" ,python-six)))
2522 `(("python-setuptools-scm" ,python-setuptools-scm)))
2523 ;; Test would require path.py, which would introduce a cyclic dependence.
2524 (arguments `(#:tests? #f))
2525 ;; Note: As of version 1.7 the documentation is not worth building.
2526 (home-page "https://github.com/jaraco/rst.linker")
2527 (synopsis "Sphinx plugin to add links and timestamps")
2528 (description "rst.linker allows to automatically replace text by a
2529 reStructuredText external reference or timestamps. It's primary purpose is to
2530 augment the changelog, but it can be used for other documents, too.")
2531 (license license:expat)))
2533 (define-public python2-rst.linker
2534 (package-with-python2 python-rst.linker))
2536 (define-public python-feedgenerator
2538 (name "python-feedgenerator")
2543 (uri (pypi-uri "feedgenerator" version))
2546 "01mirwkm7xfx539hmvj7g9da1j51gw5lsx74dr0glizskjm5vq2s"))
2547 (modules '((guix build utils)))
2550 ;; Remove pre-compiled .pyc files from source.
2551 (for-each delete-file-recursively
2552 (find-files "." "__pycache__" #:directories? #t))
2553 (for-each delete-file (find-files "." "\\.pyc$"))
2555 (build-system python-build-system)
2557 `(("python-pytz" ,python-pytz)
2558 ("python-six" ,python-six)))
2559 (home-page "https://github.com/getpelican/feedgenerator")
2561 "Standalone version of Django's Atom/RSS feed generator")
2563 "Feedgenerator-py3k is a standalone version of Django's feedgenerator,
2564 which can produce feeds in RSS 2.0, RSS 0.91, and Atom formats.")
2565 (license license:bsd-3)))
2567 (define-public python2-feedgenerator
2568 (package-with-python2 python-feedgenerator))
2570 (define-public python-blinker
2572 (name "python-blinker")
2577 (uri (pypi-uri "blinker" version))
2580 "1dpq0vb01p36jjwbhhd08ylvrnyvcc82yxx3mwjx6awrycjyw6j7"))))
2581 (build-system python-build-system)
2582 (home-page "http://pythonhosted.org/blinker/")
2583 (synopsis "Fast, simple object-to-object and broadcast signaling")
2585 "Blinker provides a fast dispatching system that allows any number of
2586 interested parties to subscribe to events, or \"signals\".")
2587 (license license:expat)))
2589 (define-public python2-blinker
2590 (package-with-python2 python-blinker))
2592 (define-public pelican
2599 (uri (pypi-uri "pelican" version))
2602 "1hn94rb4q3zmcq16in055xikal4dba5hfx3zznq7warllcgc9f8k"))))
2603 (build-system python-build-system)
2605 `(("python-feedgenerator" ,python-feedgenerator)
2606 ("python-jinja2" ,python-jinja2)
2607 ("python-pygments" ,python-pygments)
2608 ("python-docutils" ,python-docutils)
2609 ("python-pytz" ,python-pytz)
2610 ("python-blinker" ,python-blinker)
2611 ("python-unidecode" ,python-unidecode)
2612 ("python-six" ,python-six)
2613 ("python-dateutil" ,python-dateutil)
2614 ("python-markdown" ,python-markdown)))
2615 (home-page "http://getpelican.com/")
2617 `(;; XXX Requires a lot more packages to do unit tests :P
2619 #:phases (modify-phases %standard-phases
2621 'install 'adjust-requires
2622 ;; Since feedgenerator is installed from git, it doesn't
2623 ;; conform to the version requirements.
2625 ;; We *do have* "feedgenerator >= 1.6", but strip off the
2626 ;; version requirement so setuptools doesn't get confused.
2628 (substitute* "setup.py"
2629 (("['\"]feedgenerator.*?['\"]")
2630 "'feedgenerator'")))))))
2631 (synopsis "Python-based static site publishing system")
2633 "Pelican is a tool to generate a static blog from reStructuredText,
2634 Markdown input files, and more. Pelican uses Jinja2 for templating
2635 and is very extensible.")
2636 (license license:agpl3+)))
2638 (define-public python-scikit-image
2640 (name "python-scikit-image")
2646 "https://pypi.python.org/packages/source/s/scikit-image/scikit-image-"
2649 (base32 "0jz416fqvpahqyffw8plmszzfj669w8wvf3y9clnr5lr6a7md3kn"))))
2650 (build-system python-build-system)
2652 ;; TODO: Some tests require running X11 server. Disable them?
2654 ;; See DEPENDS.txt for the list of build and run time requiremnts
2656 `(("python-matplotlib" ,python-matplotlib)
2657 ("python-networkx" ,python-networkx)
2658 ("python-scipy" ,python-scipy)
2659 ("python-pillow" ,python-pillow)))
2661 `(("python-numpy" ,python-numpy)
2662 ("python-cython" ,python-cython)
2663 ("python-six" ,python-six)))
2664 (home-page "http://scikit-image.org/")
2665 (synopsis "Image processing in Python")
2667 "Scikit-image is a collection of algorithms for image processing.")
2668 (license license:bsd-3)))
2670 (define-public python2-scikit-image
2671 (package-with-python2 python-scikit-image))
2673 (define-public python-cython
2675 (name "python-cython")
2680 (uri (pypi-uri "Cython" version))
2683 "02y0pp1nx77b8s1mpxc6da2dccl6wd31pp4ksi9via479qcvacmr"))))
2684 (build-system python-build-system)
2685 ;; we need the full python package and not just the python-wrapper
2686 ;; because we need libpython3.3m.so
2688 `(("python" ,python)))
2691 (modify-phases %standard-phases
2692 (add-before 'check 'set-HOME
2693 ;; some tests require access to "$HOME/.cython"
2694 (lambda _ (setenv "HOME" "/tmp") #t))
2696 (lambda _ (zero? (system* "python" "runtests.py" "-vv")))))))
2697 (home-page "http://cython.org/")
2698 (synopsis "C extensions for Python")
2699 (description "Cython is an optimising static compiler for both the Python
2700 programming language and the extended Cython programming language. It makes
2701 writing C extensions for Python as easy as Python itself.")
2702 (license license:asl2.0)
2703 (properties `((python2-variant . ,(delay python2-cython))))))
2705 (define-public python2-cython
2706 (package (inherit (package-with-python2
2707 (strip-python2-variant python-cython)))
2708 (name "python2-cython")
2710 `(("python-2" ,python-2))))) ; this is not automatically changed
2712 ;; The RPython toolchain currently does not support Python 3.
2713 (define-public python2-rpython
2715 (name "python2-rpython")
2720 (uri (pypi-uri "rpython" version))
2723 "02z9cvxf0y41dcvwnvf2zn0albhhw1drvjjbq27m6i1piw1k6fc0"))))
2724 (build-system python-build-system)
2725 (arguments `(#:python ,python-2))
2727 `(("python2-pytest" ,python2-pytest))) ; needed for running tests
2728 (home-page "https://rpython.readthedocs.org")
2729 (synopsis "Framework for implementing interpreters and virtual machines")
2730 (description "RPython is a translation and support framework for
2731 producing implementations of dynamic languages, emphasizing a clean separation
2732 between language specification and implementation aspects.")
2733 (license license:expat)))
2735 ;; NOTE: when upgrading numpy please make sure that python-pandas and
2736 ;; python-scipy still build, as these three packages are often used together.
2737 (define-public python-numpy
2739 (name "python-numpy")
2745 "https://github.com/numpy/numpy/releases/download/v"
2746 version "/numpy-" version ".tar.gz"))
2749 "1kh7y2ay21s9mcc11mq59g2f1yc75v152z2k2vlh0xmh9c9rjpf4"))))
2750 (build-system python-build-system)
2752 `(("openblas" ,openblas)
2753 ("lapack" ,lapack)))
2755 `(("python-cython" ,python-cython)
2756 ("python-nose" ,python-nose)
2757 ("gfortran" ,gfortran)))
2760 (modify-phases %standard-phases
2761 (add-before 'build 'configure-blas-lapack
2762 (lambda* (#:key inputs #:allow-other-keys)
2763 (call-with-output-file "site.cfg"
2767 libraries = openblas
2768 library_dirs = ~a/lib
2769 include_dirs = ~a/include
2771 # backslash-n to make emacs happy
2773 lapack_libs = lapack
2774 library_dirs = ~a/lib
2775 include_dirs = ~a/include
2777 (assoc-ref inputs "openblas")
2778 (assoc-ref inputs "openblas")
2779 (assoc-ref inputs "lapack")
2780 (assoc-ref inputs "lapack"))))
2782 (add-before 'build 'fix-executable-paths
2783 (lambda* (#:key inputs #:allow-other-keys)
2784 ;; Make /gnu/store/...-bash-.../bin/sh the default shell,
2785 ;; instead of /bin/sh.
2786 (substitute* "numpy/distutils/exec_command.py"
2787 (("(os.environ.get\\('SHELL', ')(/bin/sh'\\))" match match-start match-end)
2788 (string-append match-start (assoc-ref inputs "bash") match-end)))
2789 ;; Use "gcc" executable, not "cc".
2790 (substitute* "numpy/distutils/system_info.py"
2791 (("c = distutils\\.ccompiler\\.new_compiler\\(\\)")
2792 "c = distutils.ccompiler.new_compiler(); c.set_executables(compiler='gcc',compiler_so='gcc',linker_exe='gcc',linker_so='gcc -shared')"))
2794 ;; Tests can only be run after the library has been installed and not
2795 ;; within the source directory.
2797 (add-after 'install 'check
2798 (lambda* (#:key outputs inputs #:allow-other-keys)
2799 ;; Make installed package available for running the tests
2800 (add-installed-pythonpath inputs outputs)
2801 (with-directory-excursion "/tmp"
2802 (zero? (system* "python" "-c"
2803 "import numpy; numpy.test(verbose=2)"))))))))
2804 (home-page "http://www.numpy.org/")
2805 (synopsis "Fundamental package for scientific computing with Python")
2806 (description "NumPy is the fundamental package for scientific computing
2807 with Python. It contains among other things: a powerful N-dimensional array
2808 object, sophisticated (broadcasting) functions, tools for integrating C/C++
2809 and Fortran code, useful linear algebra, Fourier transform, and random number
2811 (license license:bsd-3)))
2813 (define-public python2-numpy
2814 (package-with-python2 python-numpy))
2816 ;; NOTE: NumPy 1.8 is packaged only for Python 2 because it is of
2817 ;; interest only for legacy code going back to NumPy's predecessor
2819 (define-public python2-numpy-1.8
2820 (package (inherit python2-numpy)
2826 "https://github.com/numpy/numpy/archive/v" version ".tar.gz"))
2827 (file-name (string-append "python2-numpy-" version ".tar.gz"))
2830 "0sc20gz1b17xnyrkp5frca3ql5qfalpv916hfg2kqxpwr6jg0f1g"))))
2832 (substitute-keyword-arguments (package-arguments python2-numpy)
2834 `(modify-phases ,phases
2835 (replace 'configure-blas-lapack
2836 (lambda* (#:key inputs #:allow-other-keys)
2837 (call-with-output-file "site.cfg"
2841 libraries = openblas,lapack
2842 library_dirs = ~a/lib:~a/lib
2843 include_dirs = ~a/include:~a/include
2845 (assoc-ref inputs "openblas")
2846 (assoc-ref inputs "lapack")
2847 (assoc-ref inputs "openblas")
2848 (assoc-ref inputs "lapack"))))
2850 (description "NumPy is the fundamental package for scientific computing
2851 with Python. It contains among other things: a powerful N-dimensional array
2852 object, sophisticated (broadcasting) functions, tools for integrating C/C++
2853 and Fortran code, useful linear algebra, Fourier transform, and random number
2854 capabilities. Version 1.8 is the last one to contain the numpy.oldnumeric API
2855 that includes the compatibility layer numpy.oldnumeric with NumPy's predecessor
2857 (license license:bsd-3)))
2859 (define-public python-munch
2861 (name "python-munch")
2866 (uri (pypi-uri "munch" version))
2869 "1cmqg91xnqx8gvnh4pmp0bfl1dfcm65d5p9mg73zz8pkjhx6h80l"))))
2870 (build-system python-build-system)
2871 (home-page "https://github.com/Infinidat/munch")
2872 (synopsis "Dot-accessible dictionary")
2873 (description "Munch is a dot-accessible dictionary similar to JavaScript
2875 (license license:expat)))
2877 (define-public python2-munch
2878 (package-with-python2 python-munch))
2880 (define-public python-colormath
2882 (name "python-colormath")
2887 (uri (pypi-uri "colormath" version))
2890 "05qjycgxp3p2f9n6lmic68sxmsyvgnnlyl4z9w7dl9s56jphaiix"))))
2891 (build-system python-build-system)
2893 `(("python-networkx" ,python-networkx)
2894 ("python-numpy" ,python-numpy)))
2895 (home-page "https://github.com/gtaylor/python-colormath")
2896 (synopsis "Color math and conversion library")
2898 "This is a Python library for color math and conversions.")
2899 (license license:bsd-3)))
2901 (define-public python2-colormath
2902 (package-with-python2 python-colormath))
2904 (define-public python-spectra
2906 (name "python-spectra")
2911 (uri (pypi-uri "spectra" version))
2914 "1f322x914bhkg6r5gv1vmnir3iy0k5kih0fd2gp3rdkw32jn5cwf"))))
2915 (build-system python-build-system)
2918 (modify-phases %standard-phases
2921 (zero? (system* "nosetests" "-v")))))))
2923 `(("python-colormath" ,python-colormath)))
2925 `(("python-nose" ,python-nose)))
2926 (home-page "https://github.com/jsvine/spectra")
2927 (synopsis "Color scales and color conversion")
2929 "This package provides a Python library intended to make color math,
2930 color scales, and color space conversion easy. It has support for:
2935 @item Color blending
2936 @item Brightening/darkening colors
2937 @item Saturating/desaturating colors
2938 @item Conversion to/from multiple color spaces.
2940 (license license:expat)))
2942 (define-public python2-spectra
2943 (package-with-python2 python-spectra))
2945 (define-public python2-fastlmm
2947 (name "python2-fastlmm")
2952 (uri (pypi-uri "fastlmm" version ".zip"))
2955 "1q8c34rpmwkfy3r4d5172pzdkpfryj561897z9r3x22gq7813x1m"))))
2956 (build-system python-build-system)
2958 `(#:python ,python-2)) ; only Python 2.7 is supported
2960 `(("python2-numpy" ,python2-numpy)
2961 ("python2-scipy" ,python2-scipy)
2962 ("python2-matplotlib" ,python2-matplotlib)
2963 ("python2-pandas" ,python2-pandas)
2964 ("python2-scikit-learn" ,python2-scikit-learn)
2965 ("python2-pysnptools" ,python2-pysnptools)))
2968 ("python2-cython" ,python2-cython)
2969 ("python2-mock" ,python2-mock)
2970 ("python2-nose" ,python2-nose)))
2971 (home-page "http://research.microsoft.com/en-us/um/redmond/projects/mscompbio/fastlmm/")
2972 (synopsis "Perform genome-wide association studies on large data sets")
2974 "FaST-LMM, which stands for Factored Spectrally Transformed Linear Mixed
2975 Models, is a program for performing both single-SNP and SNP-set genome-wide
2976 association studies (GWAS) on extremely large data sets.")
2977 (license license:asl2.0)))
2979 (define-public python-numpy-documentation
2981 (name "python-numpy-documentation")
2982 (version (package-version python-numpy))
2983 (source (package-source python-numpy))
2984 (build-system python-build-system)
2986 `(("python-matplotlib" ,python-matplotlib)
2987 ("python-numpy" ,python-numpy)
2988 ("pkg-config" ,pkg-config)
2989 ("python-sphinx" ,python-sphinx)
2990 ("python-numpydoc" ,python-numpydoc)
2991 ("texlive" ,(texlive-union (list texlive-fonts-amsfonts
2993 texlive-generic-ifxetex
2994 texlive-generic-pdftex
2995 texlive-latex-amsfonts
2996 texlive-latex-capt-of
2998 texlive-latex-environ
2999 texlive-latex-eqparbox
3000 texlive-latex-etoolbox
3001 texlive-latex-expdlist
3002 texlive-latex-fancyhdr
3003 texlive-latex-fancyvrb
3004 texlive-latex-fncychap
3006 texlive-latex-framed
3007 texlive-latex-geometry
3008 texlive-latex-graphics
3009 texlive-latex-hyperref
3010 texlive-latex-mdwtools
3011 texlive-latex-multirow
3012 texlive-latex-oberdiek
3013 texlive-latex-parskip
3014 texlive-latex-preview
3015 texlive-latex-tabulary
3016 texlive-latex-threeparttable
3017 texlive-latex-titlesec
3018 texlive-latex-trimspaces
3020 texlive-latex-upquote
3022 texlive-latex-varwidth
3023 texlive-latex-wrapfig)))
3024 ("texinfo" ,texinfo)
3026 ("scipy-sphinx-theme"
3027 ,(origin ; The build script expects scipy-sphinx-theme as a git submodule
3030 (url "https://github.com/scipy/scipy-sphinx-theme.git")
3031 (commit "c466764e2231ba132c09826b5b138fffa1cfcec3")))
3034 "0q2y87clwlsgc7wvlsn9pzyssybcq10plwhq2w1ydykfsyyqbmkl"))))
3035 ,@(package-native-inputs python-numpy)))
3037 `(#:tests? #f ; we're only generating the documentation
3039 (modify-phases %standard-phases
3042 (lambda* (#:key inputs outputs #:allow-other-keys)
3043 (let* ((data (string-append (assoc-ref outputs "out") "/share"))
3045 data "/doc/" ,name "-"
3046 ,(package-version python-numpy)))
3047 (info-reader (string-append data "/info"))
3048 (html (string-append doc "/html"))
3049 (scipy-sphinx-theme "scipy-sphinx-theme")
3050 (sphinx-theme-checkout (assoc-ref inputs scipy-sphinx-theme))
3051 (pyver ,(string-append "PYVER=")))
3053 ;; FIXME: this is needed to for texlive-union to generate
3054 ;; fonts, which are not found.
3055 (setenv "HOME" "/tmp")
3057 (with-directory-excursion "doc"
3058 (copy-recursively sphinx-theme-checkout scipy-sphinx-theme)
3060 (system* "make" "html" pyver)
3061 (system* "make" "latex" "PAPER=a4" pyver)
3062 (system* "make" "-C" "build/latex"
3063 "all-pdf" "PAPER=a4" pyver)
3064 ;; FIXME: Generation of the info file fails.
3065 ;; (system* "make" "info" pyver)
3067 ;; (copy-file "build/texinfo/numpy.info"
3068 ;; (string-append info "/numpy.info"))
3069 (for-each (lambda (file)
3070 (copy-file (string-append "build/latex" file)
3071 (string-append doc file)))
3072 '("/numpy-ref.pdf" "/numpy-user.pdf"))
3073 (with-directory-excursion "build/html"
3074 (for-each (lambda (file)
3075 (let* ((dir (dirname file))
3076 (tgt-dir (string-append html "/" dir)))
3077 (unless (equal? "." dir)
3079 (install-file file html)))
3080 (find-files "." ".*")))))
3082 (home-page (package-home-page python-numpy))
3083 (synopsis "Documentation for the python-numpy package")
3084 (description (package-description python-numpy))
3085 (license (package-license python-numpy))))
3087 (define-public python2-numpy-documentation
3088 (let ((numpy-documentation (package-with-python2 python-numpy-documentation)))
3090 (inherit numpy-documentation)
3091 (native-inputs `(("python2-functools32" ,python2-functools32)
3092 ,@(package-native-inputs numpy-documentation))))))
3094 (define-public python-pygit2
3096 (name "python-pygit2")
3101 (uri (pypi-uri "pygit2" version))
3104 "1cbc488ra3kg7r3qky17ms0szi3cda2d96qfkv1l9djsy9hnvw57"))
3106 (search-patches "python-pygit2-disable-network-tests.patch"))))
3107 (build-system python-build-system)
3109 `(("python-six" ,python-six)
3110 ("python-cffi" ,python-cffi)
3111 ("libgit2" ,libgit2)
3112 ("python-tox" ,python-tox)))
3113 (home-page "https://github.com/libgit2/pygit2")
3114 (synopsis "Python bindings for libgit2")
3115 (description "Pygit2 is a set of Python bindings to the libgit2 shared
3116 library, libgit2 implements Git plumbing.")
3117 ;; GPL2.0 only, with linking exception.
3118 (license license:gpl2)))
3120 (define-public python2-pygit2
3121 (package-with-python2 python-pygit2))
3123 (define-public python-pyparsing
3125 (name "python-pyparsing")
3130 (uri (string-append "mirror://sourceforge/pyparsing/pyparsing"
3131 "/pyparsing-" version
3132 "/pyparsing-" version ".tar.gz"))
3135 "016b9gh606aa44sq92jslm89bg874ia0yyiyb643fa6dgbsbqch8"))))
3136 (build-system python-build-system)
3137 (outputs '("out" "doc"))
3139 `(#:tests? #f ; no test target
3141 (modify-phases %standard-phases
3142 (add-after 'install 'install-doc
3143 (lambda* (#:key outputs #:allow-other-keys)
3144 (let* ((doc (string-append (assoc-ref outputs "doc")
3145 "/share/doc/" ,name "-" ,version))
3146 (html-doc (string-append doc "/html"))
3147 (examples (string-append doc "/examples")))
3153 (install-file file tgt))
3154 (find-files dir ".*")))
3155 (list "docs" "htmldoc" "examples")
3156 (list doc html-doc examples))
3158 (home-page "http://pyparsing.wikispaces.com")
3159 (synopsis "Python parsing class library")
3161 "The pyparsing module is an alternative approach to creating and
3162 executing simple grammars, vs. the traditional lex/yacc approach, or the use
3163 of regular expressions. The pyparsing module provides a library of classes
3164 that client code uses to construct the grammar directly in Python code.")
3165 (license license:expat)))
3167 (define-public python2-pyparsing
3168 (package-with-python2 python-pyparsing))
3170 (define-public python-numpydoc
3172 (name "python-numpydoc")
3178 "https://pypi.python.org/packages/source/n/numpydoc/numpydoc-"
3182 "0d4dnifaxkll50jx6czj05y8cb4ny60njd2wz299sj2jxfy51w4k"))
3183 (modules '((guix build utils)))
3186 ;; Drop a test requiring matplotlib, which we cannot add as an
3187 ;; input since it would create a circular dependency: Extend the
3188 ;; test for Python 3, where it is already dropped, to Python 2.
3189 (substitute* "numpydoc/tests/test_plot_directive.py"
3191 (build-system python-build-system)
3193 `(("python-sphinx" ,python-sphinx)))
3195 `(("python-nose" ,python-nose)))
3196 (home-page "https://pypi.python.org/pypi/numpydoc")
3198 "Numpy's Sphinx extensions")
3200 "Sphinx extension to support docstrings in Numpy format.")
3201 (license license:bsd-2)))
3203 (define-public python2-numpydoc
3204 (package-with-python2 python-numpydoc))
3206 (define-public python-numexpr
3208 (name "python-numexpr")
3213 (uri (pypi-uri "numexpr" version))
3216 "1kpnbb5d5n927113zccfibn16z7gidjipyac6kbbhzs0lnizkgph"))))
3217 (build-system python-build-system)
3218 (arguments `(#:tests? #f)) ; no tests included
3220 `(("python-numpy" ,python-numpy)))
3221 (home-page "https://github.com/pydata/numexpr")
3222 (synopsis "Fast numerical expression evaluator for NumPy")
3224 "Numexpr is a fast numerical expression evaluator for NumPy. With it,
3225 expressions that operate on arrays are accelerated and use less memory than
3226 doing the same calculation in Python. In addition, its multi-threaded
3227 capabilities can make use of all your cores, which may accelerate
3228 computations, most specially if they are not memory-bounded (e.g. those using
3229 transcendental functions).")
3230 (license license:expat)))
3232 (define-public python2-numexpr
3233 (package-with-python2 python-numexpr))
3235 (define-public python-cycler
3237 (name "python-cycler")
3241 (uri (pypi-uri "cycler" version))
3244 "1n69n23fak1gjxlrbhqisi2b9pv3ckrfj98llx3p53953082syyd"))))
3245 (build-system python-build-system)
3247 ;; XXX: The current version requires 'coveralls' which we don't have.
3248 ;; Enable this for the next release which uses 'python-pytest'.
3251 `(("python-six" ,python-six)))
3252 (home-page "http://matplotlib.org/cycler/")
3253 (synopsis "Composable keyword argument iterator")
3255 "When using @code{matplotlib} and plotting more than one line, it is
3256 common to want to be able to want to be able to cycle over one or more artist
3257 styles; but the plotting logic can quickly become involved.
3258 To address this and enable easy cycling over arbitrary @code{kwargs}, the
3259 @code{Cycler} class was developed.")
3260 (license license:bsd-3)))
3262 (define-public python2-cycler
3263 (package-with-python2 python-cycler))
3265 (define-public python-colorspacious
3267 (name "python-colorspacious")
3272 (uri (string-append "https://github.com/njsmith/colorspacious/archive/v"
3274 (file-name (string-append name "-" version))
3276 (base32 "1vflh5jm32qb0skza2i8pjacv09w6gq84fqpp2nj77s0rbmzgr4k"))))
3277 (build-system python-build-system)
3279 `(("python-numpy" ,python-numpy)))
3281 `(("python-nose" ,python-nose)))
3284 (modify-phases %standard-phases
3287 (zero? (system* "nosetests" "--all-modules" "-v" "colorspacious")))))))
3288 (home-page "https://github.com/njsmith/colorspacious")
3289 (synopsis "Python library for colorspace conversions")
3290 (description "@code{colorspacious} is a Python library that lets you
3291 convert between colorspaces like sRGB, XYZ, CIEL*a*b*, CIECAM02, CAM02-UCS, etc.")
3292 (license license:expat)))
3294 (define-public python2-colorspacious
3295 (package-with-python2 python-colorspacious))
3297 (define-public python-matplotlib
3299 (name "python-matplotlib")
3304 (uri (pypi-uri "matplotlib" version))
3307 "1w8z2a1l7s72p1byfz7g03wqhygqxi8w82619dqb3a1lm97w9yqg"))))
3308 (build-system python-build-system)
3309 (propagated-inputs ; the following packages are all needed at run time
3310 `(("python-cycler" ,python-cycler)
3311 ("python-pyparsing" ,python-pyparsing)
3312 ("python-pygobject" ,python-pygobject)
3313 ("gobject-introspection" ,gobject-introspection)
3314 ("python-tkinter" ,python "tk")
3315 ("python-dateutil" ,python-dateutil)
3316 ("python-numpy" ,python-numpy)
3317 ("python-pillow" ,python-pillow)
3318 ("python-pytz" ,python-pytz)
3319 ("python-six" ,python-six)
3320 ;; The 'gtk+' package (and 'gdk-pixbuf', 'atk' and 'pango' propagated
3321 ;; from 'gtk+') provides the required 'typelib' files used by
3322 ;; 'gobject-introspection'. The location of these files is set with the
3323 ;; help of the environment variable GI_TYPELIB_PATH. At build time this
3324 ;; is done automatically by a 'native-search-path' procedure. However,
3325 ;; at run-time the user must set this variable as follows:
3327 ;; export GI_TYPELIB_PATH=~/.guix-profile/lib/girepository-1.0
3329 ;; From version 1.4.0 'matplotlib' makes use of 'cairocffi' instead of
3330 ;; 'pycairo'. However, 'pygobject' makes use of a 'pycairo' 'context'
3331 ;; object. For this reason we need to import both libraries.
3332 ;; https://pythonhosted.org/cairocffi/cffi_api.html#converting-pycairo
3333 ("python-pycairo" ,python-pycairo)
3334 ("python-pyqt" ,python-pyqt)
3335 ("python-cairocffi" ,python-cairocffi)))
3337 `(("libpng" ,libpng)
3338 ("imagemagick" ,imagemagick)
3339 ("freetype" ,freetype)
3342 ;; FIXME: Add backends when available.
3343 ;("python-wxpython" ,python-wxpython)
3347 `(("pkg-config" ,pkg-config)
3348 ("python-nose" ,python-nose)
3349 ("python-mock" ,python-mock)))
3352 (modify-phases %standard-phases
3353 (add-before 'build 'configure-environment
3354 (lambda* (#:key outputs inputs #:allow-other-keys)
3355 (let ((cairo (assoc-ref inputs "cairo"))
3356 (gtk+ (assoc-ref inputs "gtk+")))
3357 ;; Setting these directories in the 'basedirlist' of 'setup.cfg'
3359 (setenv "LD_LIBRARY_PATH"
3360 (string-append cairo "/lib:" gtk+ "/lib"))
3361 (setenv "HOME" (getcwd))
3362 (call-with-output-file "setup.cfg"
3364 (format port "[directories]~%
3365 basedirlist = ~a,~a~%
3368 (assoc-ref inputs "tcl")
3369 (assoc-ref inputs "tk")))))
3371 (home-page "http://matplotlib.org")
3372 (synopsis "2D plotting library for Python")
3374 "Matplotlib is a Python 2D plotting library which produces publication
3375 quality figures in a variety of hardcopy formats and interactive environments
3376 across platforms. Matplotlib can be used in Python scripts, the python and
3377 ipython shell, web application servers, and six graphical user interface
3379 (license license:psfl)
3380 (properties `((python2-variant . ,(delay python2-matplotlib))))))
3382 (define-public python2-matplotlib
3383 (let ((matplotlib (package-with-python2
3384 (strip-python2-variant python-matplotlib))))
3385 (package (inherit matplotlib)
3386 ;; Make sure to use special packages for Python 2 instead
3387 ;; of those automatically rewritten by package-with-python2.
3389 `(("python2-pycairo" ,python2-pycairo)
3390 ("python2-functools32" ,python2-functools32)
3391 ("python2-pygobject-2" ,python2-pygobject-2)
3392 ("python2-subprocess32" ,python2-subprocess32)
3393 ("python2-tkinter" ,python-2 "tk")
3394 ,@(fold alist-delete (package-propagated-inputs matplotlib)
3395 '("python-pycairo" "python-pygobject" "python-tkinter")))))))
3397 (define-public python-matplotlib-documentation
3399 (name "python-matplotlib-documentation")
3400 (version (package-version python-matplotlib))
3401 (source (package-source python-matplotlib))
3402 (build-system python-build-system)
3404 `(("python-matplotlib" ,python-matplotlib)
3405 ("python-colorspacious" ,python-colorspacious)
3406 ("python-sphinx" ,python-sphinx)
3407 ("python-numpydoc" ,python-numpydoc)
3408 ("python-ipython" ,python-ipython)
3409 ("python-mock" ,python-mock)
3410 ("graphviz" ,graphviz)
3411 ("texlive" ,texlive)
3412 ("texinfo" ,texinfo)
3413 ,@(package-native-inputs python-matplotlib)))
3415 `(#:tests? #f ; we're only generating documentation
3417 (modify-phases %standard-phases
3421 ;; Produce pdf in 'A4' format.
3422 (substitute* "conf.py"
3423 (("latex_paper_size = 'letter'") "")
3424 ;; latex_paper_size is deprecated -> set paper size using
3426 (("latex_elements\\['pointsize'\\] = '11pt'" match)
3427 ;; insert at a point where latex_elements{} is defined:
3428 (string-append match "\nlatex_elements['papersize'] = 'a4paper'")))
3429 (zero? (system* "python" "make.py" "html" "latex" "texinfo"))))
3431 (lambda* (#:key inputs outputs #:allow-other-keys)
3432 (let* ((data (string-append (assoc-ref outputs "out") "/share"))
3433 (doc (string-append data "/doc/python-matplotlib-" ,version))
3434 (info (string-append data "/info"))
3435 (html (string-append doc "/html")))
3438 (copy-recursively "build/html" html)
3439 (symlink (string-append html "/_images")
3440 (string-append info "/matplotlib-figures"))
3441 (with-directory-excursion "build/texinfo"
3442 (substitute* "matplotlib.texi"
3443 (("@image\\{([^,]*)" all file)
3444 (string-append "@image{matplotlib-figures/" file)))
3445 (symlink (string-append html "/_images")
3446 "./matplotlib-figures")
3447 (system* "makeinfo" "--no-split"
3448 "-o" "matplotlib.info" "matplotlib.texi"))
3449 (copy-file "build/texinfo/matplotlib.info"
3450 (string-append info "/matplotlib.info"))
3451 (copy-file "build/latex/Matplotlib.pdf"
3452 (string-append doc "/Matplotlib.pdf")))
3454 (home-page (package-home-page python-matplotlib))
3455 (synopsis "Documentation for the python-matplotlib package")
3456 (description (package-description python-matplotlib))
3457 (license (package-license python-matplotlib))))
3459 (define-public python2-matplotlib-documentation
3460 (package-with-python2 python-matplotlib-documentation))
3462 (define-public python2-pysnptools
3464 (name "python2-pysnptools")
3469 (uri (pypi-uri "pysnptools" version ".zip"))
3472 "1wybggjzz8zw7aav4pjsg2h22xp17a1lghrprza1pxwlm7wf96y2"))))
3473 (build-system python-build-system)
3475 `(#:python ,python-2)) ; only Python 2.7 is supported
3477 `(("python2-numpy" ,python2-numpy)
3478 ("python2-scipy" ,python2-scipy)
3479 ("python2-pandas" ,python2-pandas)))
3481 `(("python2-cython" ,python2-cython)))
3483 `(("unzip" ,unzip)))
3484 (home-page "http://research.microsoft.com/en-us/um/redmond/projects/mscompbio/")
3485 (synopsis "Library for reading and manipulating genetic data")
3487 "PySnpTools is a library for reading and manipulating genetic data. It
3488 can, for example, efficiently read whole PLINK *.bed/bim/fam files or parts of
3489 those files. It can also efficiently manipulate ranges of integers using set
3490 operators such as union, intersection, and difference.")
3491 (license license:asl2.0)))
3493 (define-public python-rpy2
3495 (name "python-rpy2")
3500 (uri (pypi-uri "rpy2" version))
3503 "0bqihjrdqwj5r1h86shvfb1p5hfr4a6klv1v54bzfr9r144w3rni"))))
3504 (build-system python-build-system)
3506 '(#:modules ((ice-9 ftw)
3510 (guix build python-build-system))
3512 (modify-phases %standard-phases
3513 ;; Without this phase the test loader cannot find the directories, in
3514 ;; which it is supposed to look for test files.
3515 (add-after 'unpack 'fix-tests
3516 (lambda* (#:key outputs #:allow-other-keys)
3517 (substitute* "rpy/tests.py"
3518 (("loader.discover\\(")
3519 "loader.discover(rpy_root + '/' +"))
3522 (lambda* (#:key outputs inputs #:allow-other-keys)
3523 (let ((cwd (getcwd)))
3524 (setenv "PYTHONPATH"
3525 (string-append cwd "/build/"
3526 (find (cut string-prefix? "lib" <>)
3527 (scandir (string-append cwd "/build")))
3529 (getenv "PYTHONPATH"))))
3530 ;; FIXME: Even when all tests pass, the check phase will fail.
3531 (system* "python" "-m" "rpy2.tests" "-v"))))))
3533 `(("python-six" ,python-six)
3534 ("python-jinja2" ,python-jinja2)
3535 ("python-pytz" ,python-pytz)))
3537 `(("readline" ,readline)
3540 ("r-minimal" ,r-minimal)
3541 ("r-survival" ,r-survival)
3542 ("r-ggplot2" ,r-ggplot2)
3543 ("r-rsqlite" ,r-rsqlite)
3544 ("r-dplyr" ,r-dplyr)
3545 ("r-dbplyr" ,r-dbplyr)
3546 ("python-numpy" ,python-numpy)))
3549 (home-page "http://rpy.sourceforge.net/")
3550 (synopsis "Python interface to the R language")
3551 (description "rpy2 is a redesign and rewrite of rpy. It is providing a
3552 low-level interface to R from Python, a proposed high-level interface,
3553 including wrappers to graphical libraries, as well as R-like structures and
3555 ;; Any of these licenses can be picked for the R interface. The whole
3556 ;; project is released under GPLv2+ according to the license declaration
3558 (license (list license:mpl2.0 license:gpl2+ license:lgpl2.1+))))
3560 (define-public python-scipy
3562 (name "python-scipy")
3567 (uri (pypi-uri "scipy" version))
3570 "043djb3vyk6qripmyw30jhl0g8qza0fmar6wck10iv79l08izsl7"))))
3571 (build-system python-build-system)
3573 `(("python-numpy" ,python-numpy)
3574 ("python-matplotlib" ,python-matplotlib)
3575 ("python-pyparsing" ,python-pyparsing)))
3577 `(("lapack" ,lapack)
3578 ("openblas" ,openblas)))
3580 `(("python-cython" ,python-cython)
3581 ("python-pytest" ,python-pytest)
3582 ("python-sphinx" ,python-sphinx)
3583 ("python-numpydoc" ,python-numpydoc)
3584 ("gfortran" ,gfortran)
3587 (outputs '("out" "doc"))
3590 (modify-phases %standard-phases
3591 (add-before 'build 'configure-openblas
3592 (lambda* (#:key inputs #:allow-other-keys)
3593 (call-with-output-file "site.cfg"
3597 libraries = openblas
3598 library_dirs = ~a/lib
3599 include_dirs = ~a/include
3601 # backslash-n to make emacs happy
3603 library_dirs = ~a/lib
3604 atlas_libs = openblas
3606 (assoc-ref inputs "openblas")
3607 (assoc-ref inputs "openblas")
3608 (assoc-ref inputs "openblas"))))
3610 (add-after 'install 'install-doc
3611 (lambda* (#:key inputs outputs #:allow-other-keys)
3612 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
3613 (doc (string-append data "/doc/" ,name "-" ,version))
3614 (html (string-append doc "/html"))
3615 (pyver ,(string-append "PYVER=" (version-major+minor
3616 (package-version python))))
3617 ;; By default it tries to run sphinx-build through the Python
3618 ;; interpreter which won't work with our shell wrapper.
3619 (sphinxbuild "SPHINXBUILD=LANG=C sphinx-build"))
3620 ;; Make installed package available for building the
3622 (add-installed-pythonpath inputs outputs)
3623 (with-directory-excursion "doc"
3624 ;; Fix generation of images for mathematical expressions.
3625 (substitute* (find-files "source" "conf\\.py")
3626 (("pngmath_use_preview = True")
3627 "pngmath_use_preview = False"))
3629 (invoke "make" "html" pyver sphinxbuild)
3630 (with-directory-excursion "build/html"
3631 (for-each (lambda (file)
3632 (let* ((dir (dirname file))
3633 (tgt-dir (string-append html "/" dir)))
3634 (install-file file html)))
3635 (find-files "." ".*")))))
3637 ;; Tests can only be run after the library has been installed and not
3638 ;; within the source directory.
3640 (add-after 'install 'check
3641 (lambda* (#:key inputs outputs #:allow-other-keys)
3642 (add-installed-pythonpath inputs outputs)
3643 (with-directory-excursion "/tmp"
3644 (invoke "python" "-c"
3645 "import scipy; scipy.test('full', verbose=2)")))))))
3646 (home-page "https://www.scipy.org/")
3647 (synopsis "The Scipy library provides efficient numerical routines")
3648 (description "The SciPy library is one of the core packages that make up
3649 the SciPy stack. It provides many user-friendly and efficient numerical
3650 routines such as routines for numerical integration and optimization.")
3651 (properties `((python2-variant . ,(delay python2-scipy))))
3652 (license license:bsd-3)))
3654 (define-public python2-scipy
3655 (package-with-python2
3656 (strip-python2-variant python-scipy)))
3658 (define-public python-socksipy-branch
3660 (name "python-socksipy-branch")
3665 (uri (pypi-uri "SocksiPy-branch" version))
3668 "01l41v4g7fy9fzvinmjxy6zcbhgqaif8dhdqm4w90fwcw9h51a8p"))))
3669 (build-system python-build-system)
3671 `(#:tests? #f)) ; There are no tests
3672 (home-page "https://code.google.com/archive/p/socksipy-branch/")
3673 (synopsis "Python SOCKS module")
3675 "SocksiPy - A Python SOCKS client module. It provides a
3676 socket-like interface that supports connections to any TCP
3677 service through the use of a SOCKS4, SOCKS5 or HTTP proxy.
3678 The original version was developed by Dan Haim, this is a
3679 branch created by Mario Vilas to address some open issues,
3680 as the original project seems to have been abandoned circa 2007.")
3681 (license license:bsd-3)))
3683 (define-public python2-socksipy-branch
3684 (package-with-python2 python-socksipy-branch))
3686 (define-public python-pycodestyle
3688 (name "python-pycodestyle")
3693 (uri (pypi-uri "pycodestyle" version))
3696 "0rk78b66p57ala26mdldl9lafr48blv5s659sah9q50qnfjmc8k8"))))
3697 (build-system python-build-system)
3698 (home-page "https://pycodestyle.readthedocs.io/")
3699 (synopsis "Python style guide checker")
3700 (description "@code{pycodestyle} (formerly pep8) is a tool to check
3701 Python code against some of the style conventions in
3702 @url{http://www.python.org/dev/peps/pep-0008/,PEP 8}.")
3703 (license license:expat)))
3705 (define-public python2-pycodestyle
3706 (package-with-python2 python-pycodestyle))
3708 (define-public python-orderedmultidict
3710 (name "python-orderedmultidict")
3715 (uri (pypi-uri "orderedmultidict" version))
3718 "0dls862ibm7qbq4fnvwx0xn1v9hwyzywbff8xjjdr42dd75208yw"))))
3719 (build-system python-build-system)
3722 (modify-phases %standard-phases
3723 (add-after 'unpack 'fix-tests
3725 ;; The package uses nosetest for running the tests.
3726 ;; Adding this initfile allows to run the test suite
3727 ;; without requiring nosetest.
3728 (zero? (system* "touch" "tests/__init__.py")))))))
3730 `(("python-six" ,python-six)))
3732 `(("python-pycodestyle" ,python-pycodestyle)))
3733 (home-page "https://github.com/gruns/orderedmultidict")
3734 (synopsis "Python Ordered Multivalue Dictionary - omdict")
3735 (description "This package contains a library for ordered multivalue
3736 dictionaries. A multivalue dictionary is a dictionary that can store
3737 multiple values for the same key. An ordered multivalue dictionary is a
3738 multivalue dictionary that retains the order of insertions and deletions.")
3739 (license license:unlicense)))
3741 (define-public python2-orderedmultidict
3742 (package-with-python2 python-orderedmultidict))
3744 (define-public python-autopep8
3746 (name "python-autopep8")
3751 (uri (pypi-uri "autopep8" version))
3754 "1p9pa1ffg4iy96l918808jggg9a69iaka5awmj8xid36yc5mk0ky"))))
3755 (build-system python-build-system)
3757 `(("python-pycodestyle" ,python-pycodestyle)))
3758 (home-page "https://github.com/hhatto/autopep8")
3759 (synopsis "Format Python code according to the PEP 8 style guide")
3761 "@code{autopep8} automatically formats Python code to conform to
3762 the PEP 8 style guide. It uses the pycodestyle utility to determine
3763 what parts of the code needs to be formatted. @code{autopep8} is
3764 capable of fixing most of the formatting issues that can be reported
3766 (license (license:non-copyleft
3767 "https://github.com/hhatto/autopep8/blob/master/LICENSE"))))
3769 (define-public python2-autopep8
3770 (package-with-python2 python-autopep8))
3772 (define-public python-distutils-extra
3774 (name "python-distutils-extra")
3779 (uri (string-append "https://launchpad.net/python-distutils-extra/trunk/"
3780 version "/+download/python-distutils-extra-"
3784 "0lx15kcbby9zisx33p2h5hgakgwh2bvh0ibag8z0px4j6ifhs41x"))))
3785 (build-system python-build-system)
3786 (home-page "https://launchpad.net/python-distutils-extra/")
3787 (synopsis "Enhancements to Python's distutils")
3789 "The python-distutils-extra module enables you to easily integrate
3790 gettext support, themed icons, and scrollkeeper-based documentation into
3791 Python's distutils.")
3792 (license license:gpl2)))
3794 (define-public python2-distutils-extra
3795 (package-with-python2 python-distutils-extra))
3797 (define-public python2-elib.intl
3799 (name "python2-elib.intl")
3803 ;; This project doesn't tag releases or publish tarballs, so we take
3804 ;; source from a (semi-arbitrary, i.e. latest as of now) git commit.
3807 (url "https://github.com/dieterv/elib.intl.git")
3808 (commit "d09997cfef")))
3809 (file-name (string-append name "-" version "-checkout"))
3812 "0y7vzff9xgbnaay7m0va1arl6g68ncwrvbgwl7jqlclsahzzb09d"))))
3813 (build-system python-build-system)
3815 ;; incompatible with Python 3 (exception syntax)
3816 `(#:python ,python-2
3818 (home-page "https://github.com/dieterv/elib.intl")
3819 (synopsis "Enhanced internationalization for Python")
3821 "The elib.intl module provides enhanced internationalization (I18N)
3822 services for your Python modules and applications.")
3823 (license license:lgpl3+)))
3825 (define-public python-olefile
3827 (name "python-olefile")
3832 (uri (string-append "https://github.com/decalage2/olefile/archive/v"
3834 (file-name (string-append name "-" version ".tar.gz"))
3837 "1wmxbrhyqjry2000zx0zdhqdqxhgi06nz7sbzjlh222q2zjv1gpj"))))
3838 (build-system python-build-system)
3840 "https://www.decalage.info/python/olefileio")
3841 (synopsis "Read and write Microsoft OLE2 files.")
3843 "@code{olefile} can parse, read and write Microsoft OLE2 files (Structured
3844 Storage or Compound Document, Microsoft Office). It is an improved version of
3845 the OleFileIO module from PIL, the Python Image Library.")
3846 (license license:bsd-3)))
3848 (define-public python2-olefile
3849 (package-with-python2 python-olefile))
3851 (define-public python-pillow
3853 (name "python-pillow")
3858 (uri (pypi-uri "Pillow" version))
3861 "09xmn7rl6840sli2iz1k3fgxfgmri2nqz6vkinmb9mgg8ifp2z59"))
3862 (patch-flags '("-p1" "--binary"))
3863 (patches (search-patches "python-pillow-fix-failing-tests.patch"))))
3864 (build-system python-build-system)
3866 `(("python-nose" ,python-nose)))
3868 `(("freetype" ,freetype)
3871 ("libjpeg" ,libjpeg)
3872 ("openjpeg" ,openjpeg)
3873 ("libtiff" ,libtiff)
3874 ("libwebp" ,libwebp)))
3876 `(("python-olefile" ,python-olefile)))
3878 `(#:phases (modify-phases %standard-phases
3880 'install 'check-installed
3881 (lambda* (#:key outputs inputs #:allow-other-keys)
3883 (setenv "HOME" (getcwd))
3884 ;; Make installed package available for running the
3886 (add-installed-pythonpath inputs outputs)
3887 (and (zero? (system* "python" "selftest.py"
3889 (zero? (system* "python" "test-installed.py"))))))
3891 (home-page "https://pypi.python.org/pypi/Pillow")
3892 (synopsis "Fork of the Python Imaging Library")
3894 "The Python Imaging Library adds image processing capabilities to your
3895 Python interpreter. This library provides extensive file format support, an
3896 efficient internal representation, and fairly powerful image processing
3897 capabilities. The core image library is designed for fast access to data
3898 stored in a few basic pixel formats. It should provide a solid foundation for
3899 a general image processing tool.")
3900 (license (license:x11-style
3901 "http://www.pythonware.com/products/pil/license.htm"
3902 "The PIL Software License"))))
3904 (define-public python2-pillow
3905 (package-with-python2 python-pillow))
3907 (define-public python-pycparser
3909 (name "python-pycparser")
3914 (uri (pypi-uri "pycparser" version))
3917 "1dkkjri0miidqb1zcqhqljfa34fcy9k5akasgwsv6k622zlk3b0a"))))
3918 (outputs '("out" "doc"))
3919 (build-system python-build-system)
3921 `(("pkg-config" ,pkg-config)))
3924 (modify-phases %standard-phases
3927 (with-directory-excursion "tests"
3928 (zero? (system* "python" "all_tests.py")))))
3929 (add-after 'install 'install-doc
3930 (lambda* (#:key outputs #:allow-other-keys)
3931 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
3932 (doc (string-append data "/doc/" ,name "-" ,version))
3933 (examples (string-append doc "/examples")))
3935 (for-each (lambda (file)
3936 (copy-file (string-append "." file)
3937 (string-append doc file)))
3938 '("/README.rst" "/CHANGES" "/LICENSE"))
3939 (copy-recursively "examples" examples)))))))
3940 (home-page "https://github.com/eliben/pycparser")
3941 (synopsis "C parser in Python")
3943 "Pycparser is a complete parser of the C language, written in pure Python
3944 using the PLY parsing library. It parses C code into an AST and can serve as
3945 a front-end for C compilers or analysis tools.")
3946 (license license:bsd-3)))
3948 (define-public python2-pycparser
3949 (package-with-python2 python-pycparser))
3951 (define-public python-xcffib
3953 (name "python-xcffib")
3958 (uri (pypi-uri "xcffib" version))
3961 "09gbnmr5vn58mm8xi3fmd7fz6743cks6c46dphnxzwax6zsxmy60"))))
3962 (build-system python-build-system)
3964 `(("libxcb" ,libxcb)))
3966 `(("python-cffi" ,python-cffi) ; used at run time
3967 ("python-six" ,python-six)))
3969 `(;; FIXME: Tests need more work. See ".travis.yml" in the repository.
3972 (modify-phases %standard-phases
3973 (add-after 'unpack 'fix-libxcb-path
3974 (lambda* (#:key inputs #:allow-other-keys)
3975 (let ((libxcb (assoc-ref inputs "libxcb")))
3976 (substitute* '("xcffib/__init__.py")
3977 (("^soname = \"") (string-append "soname = \"" libxcb "/lib/")))
3979 (add-after 'install 'install-doc
3980 (lambda* (#:key outputs #:allow-other-keys)
3981 (let ((doc (string-append (assoc-ref outputs "out") "/share"
3982 "/doc/" ,name "-" ,version)))
3984 (copy-file "README.md"
3985 (string-append doc "/README.md"))
3987 (home-page "https://github.com/tych0/xcffib")
3988 (synopsis "XCB Python bindings")
3990 "Xcffib is a replacement for xpyb, an XCB Python bindings. It adds
3991 support for Python 3 and PyPy. It is based on cffi.")
3992 (license license:expat)))
3994 (define-public python2-xcffib
3995 (package-with-python2 python-xcffib))
3997 (define-public python-cairocffi
3999 (name "python-cairocffi")
4004 ;; The archive on pypi is missing the 'utils' directory!
4005 (uri (string-append "https://github.com/Kozea/cairocffi/archive/v"
4007 (file-name (string-append name "-" version ".tar.gz"))
4010 "1rk2dvy3fxrga6bvvxc2fi5lbaynm5h4a0w0aaxyn3bc77rszjg9"))))
4011 (build-system python-build-system)
4012 (outputs '("out" "doc"))
4014 `(("gdk-pixbuf" ,gdk-pixbuf)
4017 `(("pkg-config" ,pkg-config)
4018 ("python-sphinx" ,python-sphinx)
4019 ("python-docutils" ,python-docutils)))
4021 `(("python-xcffib" ,python-xcffib))) ; used at run time
4023 `(;; FIXME: Tests cannot find 'libcairo.so.2'.
4026 (modify-phases %standard-phases
4027 (add-after 'install 'install-doc
4028 (lambda* (#:key inputs outputs #:allow-other-keys)
4029 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4030 (doc (string-append data "/doc/" ,name "-" ,version))
4031 (html (string-append doc "/html")))
4032 (setenv "LD_LIBRARY_PATH"
4033 (string-append (assoc-ref inputs "cairo") "/lib" ":"
4034 (assoc-ref inputs "gdk-pixbuf") "/lib"))
4035 (setenv "LANG" "en_US.UTF-8")
4037 (for-each (lambda (file)
4038 (copy-file (string-append "." file)
4039 (string-append doc file)))
4040 '("/README.rst" "/CHANGES" "/LICENSE"))
4041 (system* "python" "setup.py" "build_sphinx")
4042 (copy-recursively "docs/_build/html" html)
4044 (home-page "https://github.com/Kozea/cairocffi")
4045 (synopsis "Python bindings and object-oriented API for Cairo")
4047 "Cairocffi is a CFFI-based drop-in replacement for Pycairo, a set of
4048 Python bindings and object-oriented API for cairo. Cairo is a 2D vector
4049 graphics library with support for multiple backends including image buffers,
4050 PNG, PostScript, PDF, and SVG file output.")
4051 (license license:bsd-3)))
4053 (define-public python2-cairocffi
4054 (package-with-python2 python-cairocffi))
4056 (define-public python-decorator
4058 (name "python-decorator")
4063 (uri (pypi-uri "decorator" version))
4065 (base32 "03iaf116rm3w8b4agb8hzf6z9331mrvi4khfxq35zkx17sgxsikx"))))
4066 (build-system python-build-system)
4067 (arguments '(#:tests? #f)) ; no test target
4068 (home-page "https://pypi.python.org/pypi/decorator/")
4069 (synopsis "Python module to simplify usage of decorators")
4071 "The aim of the decorator module is to simplify the usage of decorators
4072 for the average programmer, and to popularize decorators usage giving examples
4073 of useful decorators, such as memoize, tracing, redirecting_stdout, locked,
4074 etc. The core of this module is a decorator factory.")
4075 (license license:expat)))
4077 (define-public python2-decorator
4078 (package-with-python2 python-decorator))
4080 (define-public python-drmaa
4082 (name "python-drmaa")
4087 (uri (pypi-uri "drmaa" version))
4089 (base32 "0xzqriqyvk5b8hszbavsyxd29wm3sxirm8zvvdm73rs2iq7w4hkx"))))
4090 (build-system python-build-system)
4091 ;; The test suite requires libdrmaa which is provided by the cluster
4092 ;; environment. At runtime the environment variable DRMAA_LIBRARY_PATH
4093 ;; should be set to the path of the libdrmaa library.
4094 (arguments '(#:tests? #f))
4096 `(("python-nose" ,python-nose)))
4097 (home-page "https://pypi.python.org/pypi/drmaa")
4098 (synopsis "Python bindings for the DRMAA library")
4100 "A Python package for Distributed Resource Management (DRM) job
4101 submission and control. This package is an implementation of the DRMAA 1.0
4102 Python language binding specification.")
4103 (license license:bsd-3)))
4105 (define-public python2-drmaa
4106 (package-with-python2 python-drmaa))
4108 (define-public python-grako
4110 (name "python-grako")
4116 (pypi-uri "grako" version ".zip"))
4119 "0r63i68wcnv63rfjkasq1ah81frz61a6mzbcnaxhrkdpx84p7hzw"))))
4120 (build-system python-build-system)
4121 (arguments '(#:tests? #f)) ; Test file 'grako.ebnf' is missing from archive.
4124 ("python-pytest" ,python-pytest)
4125 ("python-pytest-runner" ,python-pytest-runner)))
4126 (home-page "https://bitbucket.org/neogeny/grako")
4127 (synopsis "EBNF parser generator")
4129 "Grako takes a grammar in a variation of EBNF as input, and outputs a
4130 memoizing PEG/Packrat parser in Python.")
4131 (license license:bsd-3)))
4133 (define-public python2-grako
4134 (package-with-python2 python-grako))
4136 (define-public python-gridmap
4138 (name "python-gridmap")
4144 "https://github.com/pygridtools/gridmap/archive/v"
4146 (file-name (string-append name "-" version ".tar.gz"))
4148 (base32 "1gzjg2k6f14i1msm2b0ax8d9ds1hvk6qd5nlaivg8m4cxqp4cp1x"))))
4149 (build-system python-build-system)
4151 '(#:tests? #f)) ; FIXME: Requires python-cherrypy.
4153 `(("python-psutil" ,python-psutil)
4154 ("python-drmaa" ,python-drmaa)
4155 ("python-pyzmq" ,python-pyzmq)))
4156 (home-page "https://github.com/pygridtools/gridmap")
4157 (synopsis "Create jobs on a cluster directly from Python")
4159 "Gridmap is a Python package to allow you to easily create jobs on the
4160 cluster directly from Python. You can directly map Python functions onto the
4161 cluster without needing to write any wrapper code yourself.")
4162 (license license:gpl3+)))
4164 (define-public python2-gridmap
4165 (package-with-python2 python-gridmap))
4167 (define-public python-honcho
4169 (name "python-honcho")
4175 "https://github.com/nickstenning/honcho/archive/v"
4177 (file-name (string-append name "-" version ".tar.gz"))
4179 (base32 "0zizn61n5z5hq421hkypk9pw8s6fpxw30f4hsg7k4ivwzy3gjw9j"))))
4180 (build-system python-build-system)
4182 `(("python-pytest" ,python-pytest)
4183 ("python-mock" ,python-mock)
4184 ("python-tox" ,python-tox)
4185 ("which" ,which))) ;for tests
4187 `(("python-jinja2" ,python-jinja2)))
4190 (modify-phases %standard-phases
4192 (add-after 'install 'check
4193 (lambda* (#:key outputs inputs #:allow-other-keys)
4194 ;; fix honcho path in testsuite
4195 (substitute* "tests/conftest.py"
4196 (("'honcho'") (string-append "'" (assoc-ref outputs "out")
4197 "/bin/honcho" "'")))
4198 ;; It's easier to run tests after install.
4199 ;; Make installed package available for running the tests
4200 (add-installed-pythonpath inputs outputs)
4201 (zero? (system* "py.test" "-v")))))))
4202 (home-page "https://github.com/nickstenning/honcho")
4203 (synopsis "Manage Procfile-based applications")
4205 "A Procfile is a file which describes how to run an application
4206 consisting of serveral processes. honcho starts all listed processes.
4207 The output of all running processes is collected by honcho and
4209 (license license:expat)))
4211 (define-public python2-honcho
4212 (package-with-python2 python-honcho))
4214 (define-public python-pexpect
4216 (name "python-pexpect")
4221 (uri (pypi-uri "pexpect" version))
4223 (base32 "14ls7k99pwvl21zqv65kzrhccv50j89m5ij1hf0slmsvlxjj84rx"))))
4224 (build-system python-build-system)
4227 (modify-phases %standard-phases
4228 (add-before 'check 'prepare-tests
4230 (substitute* (find-files "tests")
4231 (("/bin/ls") (which "ls"))
4232 (("/bin/echo") (which "echo"))
4233 (("/bin/which") (which "which"))
4234 ;; Many tests try to use the /bin directory which
4235 ;; is not present in the build environment.
4236 ;; Use one that's non-empty and unlikely to change.
4237 (("/bin'") "/dev'"))
4238 ;; XXX: Socket connection test gets "Connection reset by peer".
4239 ;; Why does it not work? Delete for now.
4240 (delete-file "tests/test_socket.py")
4242 (replace 'check (lambda _ (zero? (system* "nosetests" "-v")))))))
4244 `(("python-nose" ,python-nose)
4245 ("python-pytest" ,python-pytest)
4248 ("bash-full" ,bash))) ;full Bash for 'test_replwrap.py'
4250 `(("python-ptyprocess" ,python-ptyprocess)))
4251 (home-page "http://pexpect.readthedocs.org/")
4252 (synopsis "Controlling interactive console applications")
4254 "Pexpect is a pure Python module for spawning child applications;
4255 controlling them; and responding to expected patterns in their output.
4256 Pexpect works like Don Libes’ Expect. Pexpect allows your script to spawn a
4257 child application and control it as if a human were typing commands.")
4258 (license license:isc)))
4260 (define-public python2-pexpect
4261 (package-with-python2 python-pexpect))
4263 (define-public python-setuptools-scm
4265 (name "python-setuptools-scm")
4269 (uri (pypi-uri "setuptools_scm" version))
4272 "0pzvfmx8s20yrgkgwfbxaspz2x1g38qv61jpm0ns91lrb22ldas9"))))
4273 (build-system python-build-system)
4274 (home-page "https://github.com/pypa/setuptools_scm/")
4275 (synopsis "Manage Python package versions in SCM metadata")
4277 "Setuptools_scm handles managing your Python package versions in
4278 @dfn{software configuration management} (SCM) metadata instead of declaring
4279 them as the version argument or in a SCM managed file.")
4280 (license license:expat)))
4282 (define-public python2-setuptools-scm
4283 (package-with-python2 python-setuptools-scm))
4285 (define-public python-pathpy
4287 (name "python-pathpy")
4292 (uri (pypi-uri "path.py" version))
4294 (base32 "12s84maimiz61980q065rjgi8ang6xw2wwm64m0lmfks51dlw4qn"))))
4295 ;; (outputs '("out" "doc"))
4296 (build-system python-build-system)
4298 `(("python-appdirs" ,python-appdirs)))
4300 `(("python-setuptools-scm" ,python-setuptools-scm)
4301 ("python-sphinx" ,python-sphinx)
4302 ("python-rst.linker" ,python-rst.linker)
4303 ("python-pytest" ,python-pytest)
4304 ("python-pytest-runner" ,python-pytest-runner)))
4306 ;; FIXME: Documentation and tests require "jaraco.packaging".
4309 ;; (modify-phases %standard-phases
4310 ;; (add-after 'build 'build-doc
4312 ;; (setenv "LANG" "en_US.UTF-8")
4313 ;; (zero? (system* "python" "setup.py" "build_sphinx"))))
4314 ;; (add-after 'install 'install-doc
4315 ;; (lambda* (#:key outputs #:allow-other-keys)
4316 ;; (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4317 ;; (doc (string-append data "/doc/" ,name "-" ,version))
4318 ;; (html (string-append doc "/html")))
4320 ;; (for-each (lambda (file)
4321 ;; (copy-file file (string-append doc "/" file)))
4322 ;; '("README.rst" "CHANGES.rst"))
4323 ;; (copy-recursively "build/sphinx/html" html)))))))
4324 (home-page "https://github.com/jaraco/path.py")
4325 (synopsis "Python module wrapper for built-in os.path")
4327 "@code{path.py} implements path objects as first-class entities, allowing
4328 common operations on files to be invoked on those path objects directly.")
4329 (license license:expat)))
4331 (define-public python2-pathpy
4332 (package-with-python2 python-pathpy))
4334 (define-public python-simplegeneric
4336 (name "python-simplegeneric")
4341 (uri (string-append "https://pypi.python.org/packages/source/s/"
4342 "simplegeneric/simplegeneric-" version ".zip"))
4344 (base32 "0wwi1c6md4vkbcsfsf8dklf3vr4mcdj4mpxkanwgb6jb1432x5yw"))))
4345 (build-system python-build-system)
4347 `(("unzip" ,unzip)))
4348 (home-page "http://cheeseshop.python.org/pypi/simplegeneric")
4349 (synopsis "Python module for simple generic functions")
4351 "The simplegeneric module lets you define simple single-dispatch generic
4352 functions, akin to Python’s built-in generic functions like @code{len()},
4353 @code{iter()} and so on. However, instead of using specially-named methods,
4354 these generic functions use simple lookup tables, akin to those used by
4355 e.g. @code{pickle.dump()} and other generic functions found in the Python
4357 (license license:zpl2.1)))
4359 (define-public python2-simplegeneric
4360 (package-with-python2 python-simplegeneric))
4362 (define-public python-ipython-genutils
4363 ;; TODO: This package is retired, check if can be removed, see description.
4365 (name "python-ipython-genutils")
4370 (uri (string-append "https://pypi.python.org/packages/source/i/"
4371 "ipython_genutils/ipython_genutils-"
4374 (base32 "19l2pp1c64ansr89l3cqh19jdi2ixhssdzx0vz4n6r52a6i281is"))))
4375 (build-system python-build-system)
4376 (arguments `(#:tests? #f)) ; no tests
4377 (home-page "https://ipython.org")
4378 (synopsis "Vestigial utilities from IPython")
4380 "This package provides retired utilities from IPython. No packages
4381 outside IPython/Jupyter should depend on it.
4383 This package shouldn't exist. It contains some common utilities shared by
4384 Jupyter and IPython projects during The Big Split. As soon as possible, those
4385 packages will remove their dependency on this, and this package will go
4387 (license license:bsd-3)))
4389 (define-public python2-ipython-genutils
4390 (package-with-python2 python-ipython-genutils))
4392 (define-public python-traitlets
4394 (name "python-traitlets")
4399 (uri (pypi-uri "traitlets" version))
4402 "1afy08sa5n9gnkvh3da49c16zkyv598vchv0p1hp7zzjy8895hz4"))))
4403 (build-system python-build-system)
4406 (modify-phases %standard-phases
4407 (replace 'check (lambda _ (zero? (system* "nosetests")))))))
4409 `(("python-ipython-genutils" ,python-ipython-genutils)
4410 ("python-decorator" ,python-decorator)))
4412 `(("python-mock" ,python-mock)
4413 ("python-nose" ,python-nose)))
4414 (home-page "https://ipython.org")
4415 (synopsis "Configuration system for Python applications")
4417 "Traitlets is a framework that lets Python classes have attributes with
4418 type checking, dynamically calculated default values, and ‘on change’
4419 callbacks. The package also includes a mechanism to use traitlets for
4420 configuration, loading values from files or from command line arguments. This
4421 is a distinct layer on top of traitlets, so you can use traitlets in your code
4422 without using the configuration machinery.")
4423 (license license:bsd-3)))
4425 (define-public python2-traitlets
4426 (package-with-python2 python-traitlets))
4428 (define-public python-jupyter-core
4430 (name "python-jupyter-core")
4435 (uri (string-append (pypi-uri "jupyter_core" version)))
4438 "1dy083rarba8prn9f9srxq3c7n7vyql02ycrqq306c40lr57aw5s"))))
4439 (build-system python-build-system)
4440 ;; FIXME: not sure how to run the tests
4441 (arguments `(#:tests? #f))
4443 `(("python-traitlets" ,python-traitlets)))
4444 (home-page "http://jupyter.org/")
4445 (synopsis "Jupyter base package")
4447 "Jupyter core is the base package on which Jupyter projects rely.")
4448 (license license:bsd-3)))
4450 (define-public python2-jupyter-core
4451 (package-with-python2 python-jupyter-core))
4453 (define-public python-jupyter-client
4455 (name "python-jupyter-client")
4460 (uri (pypi-uri "jupyter_client" version))
4463 "1vjjrpjw7k5sh982pbjnslv7byfbfazjw9g92jvs7dz5qbx556n9"))))
4464 (build-system python-build-system)
4465 ;; Tests fail because of missing native python kernel which I assume is
4466 ;; provided by the ipython package, which we cannot use because it would
4467 ;; cause a dependency cycle.
4468 (arguments `(#:tests? #f))
4470 `(("python-pyzmq" ,python-pyzmq)
4471 ("python-traitlets" ,python-traitlets)
4472 ("python-jupyter-core" ,python-jupyter-core)))
4473 (home-page "http://jupyter.org/")
4474 (synopsis "Jupyter protocol implementation and client libraries")
4476 "The @code{jupyter_client} package contains the reference implementation
4477 of the Jupyter protocol. It also provides client and kernel management APIs
4478 for working with kernels, and the @code{jupyter kernelspec} entrypoint for
4479 installing @code{kernelspec}s for use with Jupyter frontends.")
4480 (license license:bsd-3)))
4482 (define-public python2-jupyter-client
4483 (package-with-python2 python-jupyter-client))
4485 (define-public python-ipykernel
4487 (name "python-ipykernel")
4492 (uri (pypi-uri "ipykernel" version))
4494 (base32 "0qllv0k6zzv1r1cj1x2ygxmlrrqhbslzj8rc6r6fg3kc1rgz4m2s"))))
4495 (build-system python-build-system)
4496 ;; The tests load a submodule of IPython. However, IPython itself depends
4498 (arguments `(#:tests? #f))
4500 ;; imported at runtime during connect
4501 `(("python-jupyter-client" ,python-jupyter-client)))
4502 (home-page "https://ipython.org")
4503 (synopsis "IPython Kernel for Jupyter")
4505 "This package provides the IPython kernel for Jupyter.")
4506 (license license:bsd-3)))
4508 (define-public python2-ipykernel
4509 (package-with-python2 python-ipykernel))
4511 (define-public python-ipython
4513 (name "python-ipython")
4518 (uri (pypi-uri "ipython" version ".tar.gz"))
4520 (base32 "03qmzpfy00if10i9k8fjkam1s4xg22j73f933x5d228z9n4rwik6"))))
4521 (build-system python-build-system)
4522 (outputs '("out" "doc"))
4524 `(("python-pyzmq" ,python-pyzmq)
4525 ("python-prompt-toolkit" ,python-prompt-toolkit)
4526 ("python-terminado" ,python-terminado)
4527 ("python-matplotlib" ,python-matplotlib)
4528 ("python-numpy" ,python-numpy)
4529 ("python-numpydoc" ,python-numpydoc)
4530 ("python-jinja2" ,python-jinja2)
4531 ("python-jupyter-console"
4532 ;; The python-ipython and python-jupyter-console require each
4533 ;; other. To get the functionality in both packages working, strip
4534 ;; down the python-jupyter-console package when using it as an input
4535 ;; to python-ipython.
4536 ,python-jupyter-console-minimal)
4537 ("python-mistune" ,python-mistune)
4538 ("python-pexpect" ,python-pexpect)
4539 ("python-pickleshare" ,python-pickleshare)
4540 ("python-simplegeneric" ,python-simplegeneric)
4541 ("python-jsonschema" ,python-jsonschema)
4542 ("python-traitlets" ,python-traitlets)
4543 ("python-ipykernel" ,python-ipykernel)
4544 ("python-nbformat" ,python-nbformat)
4545 ("python-pygments" ,python-pygments)))
4547 `(("readline" ,readline)
4550 `(("graphviz" ,graphviz)
4551 ("pkg-config" ,pkg-config)
4552 ("python-requests" ,python-requests) ;; for tests
4553 ("python-testpath" ,python-testpath)
4554 ("python-nose" ,python-nose)
4555 ("python-sphinx" ,python-sphinx)
4556 ("python-shpinx-rtd-theme" ,python-sphinx-rtd-theme)
4557 ;; FIXME: It's possible that a smaller union would work just as well.
4558 ("texlive" ,(texlive-union (list texlive-fonts-amsfonts
4560 texlive-generic-ifxetex
4561 texlive-generic-pdftex
4562 texlive-latex-amsfonts
4563 texlive-latex-capt-of
4565 texlive-latex-environ
4566 texlive-latex-eqparbox
4567 texlive-latex-etoolbox
4568 texlive-latex-expdlist
4569 texlive-latex-fancyhdr
4570 texlive-latex-fancyvrb
4571 texlive-latex-fncychap
4573 texlive-latex-framed
4574 texlive-latex-geometry
4575 texlive-latex-graphics
4576 texlive-latex-hyperref
4577 texlive-latex-mdwtools
4578 texlive-latex-multirow
4579 texlive-latex-oberdiek
4580 texlive-latex-parskip
4581 texlive-latex-preview
4582 texlive-latex-tabulary
4583 texlive-latex-threeparttable
4584 texlive-latex-titlesec
4585 texlive-latex-trimspaces
4587 texlive-latex-upquote
4589 texlive-latex-varwidth
4590 texlive-latex-wrapfig)))
4591 ("texinfo" ,texinfo)))
4594 (modify-phases %standard-phases
4596 'install 'install-doc
4597 (lambda* (#:key inputs outputs #:allow-other-keys)
4598 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4599 (doc (string-append data "/doc/" ,name "-" ,version))
4600 (html (string-append doc "/html"))
4601 (man1 (string-append data "/man/man1"))
4602 (info (string-append data "/info"))
4603 (examples (string-append doc "/examples"))
4604 (python-arg (string-append "PYTHON=" (which "python"))))
4605 (setenv "LANG" "en_US.utf8")
4606 ;; Make installed package available for running the tests
4607 (add-installed-pythonpath inputs outputs)
4608 (with-directory-excursion "docs"
4609 ;; FIXME: pdf fails to build
4610 ;;(system* "make" "pdf" "PAPER=a4")
4611 (system* "make" python-arg "html")
4612 (system* "make" python-arg "info"))
4613 (copy-recursively "docs/man" man1)
4614 (copy-recursively "examples" examples)
4615 (copy-recursively "docs/build/html" html)
4616 ;; (copy-file "docs/build/latex/ipython.pdf"
4617 ;; (string-append doc "/ipython.pdf"))
4619 (copy-file "docs/build/texinfo/ipython.info"
4620 (string-append info "/ipython.info"))
4621 (copy-file "COPYING.rst" (string-append doc "/COPYING.rst")))))
4622 ;; Tests can only be run after the library has been installed and not
4623 ;; within the source directory.
4627 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
4629 (with-directory-excursion "/tmp"
4630 ;; Make installed package available for running the tests
4631 (add-installed-pythonpath inputs outputs)
4632 (setenv "HOME" "/tmp/") ;; required by a test
4633 (zero? (system* (string-append (assoc-ref outputs "out")
4638 (lambda* (#:key inputs #:allow-other-keys)
4639 (substitute* "./IPython/utils/_process_posix.py"
4640 (("/usr/bin/env', 'which") (which "which")))
4641 (substitute* "./IPython/core/tests/test_inputtransformer.py"
4642 (("#!/usr/bin/env python")
4643 (string-append "#!" (which "python"))))
4644 ;; Disable 1 failing test
4645 (substitute* "./IPython/core/tests/test_magic.py"
4646 (("def test_dirops\\(\\):" all)
4647 (string-append "@dec.skipif(True)\n" all))))))))
4648 (home-page "https://ipython.org")
4649 (synopsis "IPython is a tool for interactive computing in Python")
4651 "IPython provides a rich architecture for interactive computing with:
4652 Powerful interactive shells, a browser-based notebook, support for interactive
4653 data visualization, embeddable interpreters and tools for parallel
4655 (license license:bsd-3)
4656 (properties `((python2-variant . ,(delay python2-ipython))))))
4658 (define-public python2-ipython
4659 (let ((ipython (package-with-python2 (strip-python2-variant python-ipython))))
4662 ;; FIXME: add pyreadline once available.
4664 `(("python2-backports-shutil-get-terminal-size"
4665 ,python2-backports-shutil-get-terminal-size)
4666 ("python2-pathlib2" ,python2-pathlib2)
4667 ,@(package-propagated-inputs ipython)))
4669 `(("python2-mock" ,python2-mock)
4670 ,@(package-native-inputs ipython))))))
4672 (define-public python-urwid
4674 (name "python-urwid")
4679 (uri (pypi-uri "urwid" version))
4682 "18cnd1wdjcas08x5qwa5ayw6jsfcn33w4d9f7q3s29fy6qzc1kng"))))
4683 (build-system python-build-system)
4686 (modify-phases %standard-phases
4687 ;; Disable failing test. Bug filed upstream:
4688 ;; https://github.com/wardi/urwid/issues/164
4689 ;; TODO: check again for python-urwid > 1.3.1 or python > 3.4.3.
4690 (add-after 'unpack 'disable-failing-test
4692 (substitute* "urwid/tests/test_event_loops.py"
4693 (("test_remove_watch_file")
4694 "disable_remove_watch_file")))))))
4695 (home-page "http://urwid.org")
4696 (synopsis "Console user interface library for Python")
4698 "Urwid is a curses-based UI/widget library for Python. It includes many
4699 features useful for text console applications.")
4700 (license license:lgpl2.1+)))
4702 (define-public python2-urwid
4703 (let ((python2-urwid (package-with-python2 python-urwid)))
4705 (inherit python2-urwid)
4708 `(;; Explicitly using Python 2 is necessary due the argument list being
4709 ;; built from only the 'delete-test_vterm.py' phase and python-urwid's
4710 ;; package arguments, which by default assumes the use of Python 3.
4713 (modify-phases %standard-phases
4714 ;; Disable the vterm tests because of non-deterministic failures
4715 ;; with Python 2. See https://github.com/urwid/urwid/issues/230.
4716 (add-after 'unpack 'delete-test_vterm.py
4717 (delete-file "urwid/tests/test_vterm.py"))))
4718 (package-arguments python-urwid))))))
4720 (define-public python-urwidtrees
4722 (name "python-urwidtrees")
4727 ;; package author intends on distributing via github rather than pypi:
4728 ;; https://github.com/pazz/alot/issues/877#issuecomment-230173331
4729 (uri (string-append "https://github.com/pazz/urwidtrees/archive/"
4731 (file-name (string-append name "-" version ".tar.gz"))
4734 "0d30lyd3s2a97rhqfax5w9ssqds2z6aydqx3c6j2c2lk3cb4ngvh"))))
4735 (build-system python-build-system)
4737 '(#:tests? #f)) ; no tests
4738 (propagated-inputs `(("python-urwid" ,python-urwid)))
4739 (home-page "https://github.com/pazz/urwidtrees")
4740 (synopsis "Tree widgets for urwid")
4741 (description "Urwidtrees is a Widget Container API for the @code{urwid}
4742 toolkit. Use it to build trees of widgets.")
4743 (license license:gpl3+)))
4745 (define-public python2-urwidtrees
4746 (package-with-python2 python-urwidtrees))
4748 (define-public python-dbus
4750 (name "python-dbus")
4756 "https://dbus.freedesktop.org/releases/dbus-python/dbus-python-"
4759 (base32 "1py62qir966lvdkngg0v8k1khsqxwk5m4s8nflpk1agk5f5nqb71"))))
4760 (build-system gnu-build-system)
4763 (modify-phases %standard-phases
4767 ;; XXX: For the missing '/etc/machine-id'.
4768 (substitute* "test/run-test.sh"
4769 (("DBUS_FATAL_WARNINGS=1")
4770 "DBUS_FATAL_WARNINGS=0"))
4773 `(("pkg-config" ,pkg-config)))
4775 `(("python" ,python)
4776 ("dbus-glib" ,dbus-glib)))
4777 (synopsis "Python bindings for D-bus")
4778 (description "python-dbus provides bindings for libdbus, the reference
4779 implementation of D-Bus.")
4780 (home-page "https://www.freedesktop.org/wiki/Software/DBusBindings/")
4781 (license license:expat)))
4783 (define-public python2-dbus
4784 (package (inherit python-dbus)
4785 (name "python2-dbus")
4786 (inputs `(("python" ,python-2)
4787 ,@(alist-delete "python"
4788 (package-inputs python-dbus)
4790 ;; FIXME: on Python 2, the test_utf8 fails with:
4791 ;; "ValueError: unichr() arg not in range(0x10000) (narrow Python build)"
4792 (arguments `(#:tests? #f))))
4794 (define-public python-lxml
4796 (name "python-lxml")
4801 (uri (pypi-uri "lxml" version))
4804 "15nvf6n285n282682qyw3wihsncb0x5amdhyi4b83bfa2nz74vvk"))))
4805 (build-system python-build-system)
4807 `(("libxml2" ,libxml2)
4808 ("libxslt" ,libxslt)))
4809 (home-page "http://lxml.de/")
4811 "Python XML processing library")
4813 "The lxml XML toolkit is a Pythonic binding for the C libraries
4814 libxml2 and libxslt.")
4815 (license license:bsd-3))) ; and a few more, see LICENSES.txt
4817 (define-public python2-lxml
4818 (package-with-python2 python-lxml))
4820 ;; beautifulsoup4 has a totally different namespace than 3.x,
4821 ;; and pypi seems to put it under its own name, so I guess we should too
4822 (define-public python-beautifulsoup4
4824 (name "python-beautifulsoup4")
4829 (uri (pypi-uri "beautifulsoup4" version))
4832 "0glaw1vyxnbp03fni7h5496n6iib0n5iim4gax1n0ngscs9s075j"))))
4833 (build-system python-build-system)
4836 (modify-phases %standard-phases
4837 ;; The Python 2 source is the definitive source of beautifulsoup4. We
4838 ;; must use this conversion script when building with Python 3. The
4839 ;; conversion script also runs the tests.
4840 ;; For more information, see the file 'convert-py3k' in the source
4843 (lambda _ (zero? (system* "./convert-py3k")))))))
4845 "https://www.crummy.com/software/BeautifulSoup/bs4/")
4847 "Python screen-scraping library")
4849 "Beautiful Soup is a Python library designed for rapidly setting up
4850 screen-scraping projects. It offers Pythonic idioms for navigating,
4851 searching, and modifying a parse tree, providing a toolkit for
4852 dissecting a document and extracting what you need. It automatically
4853 converts incoming documents to Unicode and outgoing documents to UTF-8.")
4854 (license license:expat)
4855 (properties `((python2-variant . ,(delay python2-beautifulsoup4))))))
4857 (define-public python2-beautifulsoup4
4859 (inherit (package-with-python2
4860 (strip-python2-variant python-beautifulsoup4)))
4861 (arguments `(#:python ,python-2))))
4863 (define-public python-netifaces
4865 (name "python-netifaces")
4870 (uri (pypi-uri "netifaces" version))
4873 "1q7bi5k2r955rlcpspx4salvkkpk28jky67fjbpz2dkdycisak8c"))))
4874 (build-system python-build-system)
4875 (home-page "https://github.com/al45tair/netifaces")
4877 "Python module for portable network interface information")
4879 "Netifaces is a Python module providing information on network
4880 interfaces in an easy and portable manner.")
4881 (license license:expat)))
4883 (define-public python2-netifaces
4884 (package-with-python2 python-netifaces))
4886 (define-public python-networkx
4888 (name "python-networkx")
4893 (uri (pypi-uri "networkx" version ".zip"))
4895 (base32 "1ccb8mfz4m821k9y0cigkbq42q2sbb4dj5fbjshp0awp32j2q9v4"))))
4896 (build-system python-build-system)
4897 ;; python-decorator is needed at runtime
4899 `(("python-decorator" ,python-decorator)))
4901 `(("python-nose" ,python-nose)
4903 (home-page "http://networkx.github.io/")
4904 (synopsis "Python module for creating and manipulating graphs and networks")
4906 "NetworkX is a Python package for the creation, manipulation, and study
4907 of the structure, dynamics, and functions of complex networks.")
4908 (license license:bsd-3)))
4910 (define-public python2-networkx
4911 (package-with-python2 python-networkx))
4913 ;; Define new package, because the current version of python-colormath does
4914 ;; not build against 2.0.
4915 (define-public python-networkx2
4916 (package (inherit python-networkx)
4917 (name "python-networkx2")
4922 (uri (pypi-uri "networkx" version ".zip"))
4925 "1ajl2jp8qry9nyjzzkqpy0vmsr14d23z1qk7y0vr5iwjbpvzhpyd"))
4927 (search-patches "python-networkx2-reproducible-build.patch"))))))
4929 (define-public python2-networkx2
4930 (package-with-python2 python-networkx2))
4932 (define-public snakemake
4939 (uri (pypi-uri "snakemake" version))
4941 (base32 "0g0paia4z7w3srnqdmavq3hrb2x7qnpf81jx50njl0p7y4y0j8jv"))))
4942 (build-system python-build-system)
4944 ;; TODO: Package missing test dependencies.
4947 (modify-phases %standard-phases
4948 ;; For cluster execution Snakemake will call Python. Since there is
4949 ;; no suitable PYTHONPATH set, cluster execution will fail. We fix
4950 ;; this by calling the snakemake wrapper instead.
4951 (add-after 'unpack 'call-wrapper-not-wrapped-snakemake
4952 (lambda* (#:key outputs #:allow-other-keys)
4953 (substitute* "snakemake/executors.py"
4954 (("\\{sys.executable\\} -m snakemake")
4955 (string-append (assoc-ref outputs "out")
4959 `(("python-wrapt" ,python-wrapt)
4960 ("python-requests" ,python-requests)
4961 ("python-appdirs" ,python-appdirs)
4962 ("python-configargparse" ,python-configargparse)
4963 ("python-pyyaml" ,python-pyyaml)
4964 ("python-ratelimiter" ,python-ratelimiter)))
4965 (home-page "https://bitbucket.org/snakemake/snakemake/wiki/Home")
4966 (synopsis "Python-based execution environment for make-like workflows")
4968 "Snakemake aims to reduce the complexity of creating workflows by
4969 providing a clean and modern domain specific specification language (DSL) in
4970 Python style, together with a fast and comfortable execution environment.")
4971 (license license:expat)))
4973 (define-public python-pyqrcode
4975 (name "python-pyqrcode")
4980 (uri (pypi-uri "PyQRCode" version))
4983 "1m9ln8k9v7dfbh1i81225hx5mdsh8mpf9g7r4wpbfmiyfcs7dgzx"))))
4984 (build-system python-build-system)
4986 "https://github.com/mnooner256/pyqrcode")
4987 (synopsis "QR code generator")
4989 "Pyqrcode is a QR code generator written purely in Python with
4990 SVG, EPS, PNG and terminal output.")
4991 (license license:bsd-3)))
4993 (define-public python-seaborn
4995 (name "python-seaborn")
5000 (uri (pypi-uri "seaborn" version))
5002 (base32 "0pawrqc3mxpwd5g9pvi9gba02637bh5c8ldpp8izfwpfn52469zs"))))
5003 (build-system python-build-system)
5005 '(#:tests? #f)) ; Tests requires a running X11 server.
5007 `(("python-pandas" ,python-pandas)
5008 ("python-matplotlib" ,python-matplotlib)
5009 ("python-scipy" ,python-scipy)))
5010 (home-page "http://stanford.edu/~mwaskom/software/seaborn/")
5011 (synopsis "Statistical data visualization")
5013 "Seaborn is a library for making attractive and informative statistical
5014 graphics in Python. It is built on top of matplotlib and tightly integrated
5015 with the PyData stack, including support for numpy and pandas data structures
5016 and statistical routines from scipy and statsmodels.")
5017 (license license:bsd-3)
5018 (properties `((python2-variant . ,(delay python2-seaborn))))))
5020 (define-public python2-seaborn
5021 (let ((base (package-with-python2 (strip-python2-variant python-seaborn))))
5024 (propagated-inputs `(("python2-pytz" ,python2-pytz)
5025 ,@(package-propagated-inputs base))))))
5027 (define-public python-mpmath
5029 (name "python-mpmath")
5033 (uri (string-append "http://mpmath.org/files/mpmath-"
5037 "08ijsr4ifrqv3cjc26mkw0dbvyygsa99in376hr4b96ddm1gdpb8"))))
5038 (build-system python-build-system)
5041 (modify-phases %standard-phases
5045 (system* "python" "mpmath/tests/runtests.py" "-local")))))))
5046 (home-page "http://mpmath.org")
5047 (synopsis "Arbitrary-precision floating-point arithmetic in python")
5049 "@code{mpmath} can be used as an arbitrary-precision substitute for
5050 Python's float/complex types and math/cmath modules, but also does much
5051 more advanced mathematics.")
5052 (license license:bsd-3)))
5054 (define-public python2-mpmath
5055 (package-with-python2 python-mpmath))
5057 (define-public python-sympy
5059 (name "python-sympy")
5065 "https://github.com/sympy/sympy/releases/download/sympy-"
5066 version "/sympy-" version ".tar.gz"))
5068 (base32 "190n29sppw7g8ihilc5451y7jlfcaw56crqiqbf1jff43dlmfnxc"))))
5069 (build-system python-build-system)
5072 (modify-phases %standard-phases
5073 ;; Run the core tests after installation. By default it would run
5074 ;; *all* tests, which take a very long time to complete and are known
5077 (add-after 'install 'check
5078 (lambda* (#:key outputs #:allow-other-keys)
5079 (invoke "python3" "-c" "import sympy; sympy.test(\"/core\")")
5082 `(("python-mpmath" ,python-mpmath)))
5083 (home-page "http://www.sympy.org/")
5084 (synopsis "Python library for symbolic mathematics")
5086 "SymPy is a Python library for symbolic mathematics. It aims to become a
5087 full-featured computer algebra system (CAS) while keeping the code as simple
5088 as possible in order to be comprehensible and easily extensible.")
5089 (license license:bsd-3)))
5091 (define-public python2-sympy
5093 (inherit (package-with-python2 python-sympy))
5096 (modify-phases %standard-phases
5097 ;; Run the core tests after installation. By default it would run
5098 ;; *all* tests, which take a very long time to complete and are known
5101 (add-after 'install 'check
5102 (lambda* (#:key outputs #:allow-other-keys)
5103 (invoke "python" "-c" "import sympy; sympy.test(\"/core\")")
5106 (define-public python-q
5113 (uri (pypi-uri "q" version))
5116 "1mgfazh8fkizh6walra2zv885f3lcgr3nb02v1frfm4p8ddcy3yy"))))
5117 (build-system python-build-system)
5118 (home-page "https://github.com/zestyping/q")
5119 (synopsis "Quick-and-dirty debugging output for tired programmers")
5121 "q is a Python module for \"print\" style of debugging Python code. It
5122 provides convenient short API for print out of values, tracebacks, and
5123 falling into the Python interpreter.")
5124 (license license:asl2.0)))
5126 (define-public python2-q
5127 (package-with-python2 python-q))
5129 (define-public python2-xlib
5131 (name "python2-xlib")
5135 (uri (string-append "mirror://sourceforge/python-xlib/python-xlib"
5137 "python-xlib-" version ".tar.gz"))
5140 "1sv0447j0rx8cgs3jhjl695p5pv13ihglcjlrrz1kq05lsvb0wa7"))))
5141 (build-system python-build-system)
5143 `(#:python ,python-2 ;Python 2 only
5144 #:tests? #f)) ;no tests
5145 (home-page "http://python-xlib.sourceforge.net/")
5146 (synopsis "Python X11 client library")
5148 "The Python X Library is intended to be a fully functional X client
5149 library for Python programs. It is useful to implement low-level X clients.
5150 It is written entirely in Python.")
5151 (license license:gpl2+)))
5153 (define-public python-singledispatch
5155 (name "python-singledispatch")
5160 (uri (pypi-uri "singledispatch" version))
5163 "171b7ip0hsq5qm83np40h3phlr36ym18w0lay0a8v08kvy3sy1jv"))))
5164 (build-system python-build-system)
5166 `(("python-six" ,python-six))) ; required for conversion, not at run-time
5168 "http://docs.python.org/3/library/functools.html#functools.singledispatch")
5169 (synopsis "Backport of singledispatch feature from Python 3.4")
5171 "This library brings functools.singledispatch from Python 3.4 to Python
5173 (license license:expat)))
5175 (define-public python2-singledispatch
5176 (package-with-python2 python-singledispatch))
5178 ;; the python- version can be removed with python-3.5
5179 (define-public python-backports-abc
5181 (name "python-backports-abc")
5186 (uri (pypi-uri "backports_abc" version))
5189 "1pkv8d1zxj5f9i227dxbjczncbv7ks7ywnjwyxfjagm02i2yafq3"))))
5190 (build-system python-build-system)
5191 (home-page "https://github.com/cython/backports_abc")
5192 (synopsis "Backport of additions to the 'collections.abc' module")
5194 "Python-backports-abc provides a backport of additions to the
5195 'collections.abc' module in Python-3.5.")
5196 (license license:psfl)))
5198 (define-public python2-backports-abc
5199 (package-with-python2 python-backports-abc))
5201 (define-public python-backports-csv
5203 (name "python-backports-csv")
5208 (uri (pypi-uri "backports.csv" version))
5211 "1imzbrradkfn8s2m1qcimyn74dn1mz2p3j381jljn166rf2i6hlc"))))
5212 (build-system python-build-system)
5213 (home-page "https://github.com/ryanhiebert/backports.csv")
5214 (synopsis "Backport of Python 3's csv module for Python 2")
5216 "Provides a backport of Python 3's @code{csv} module for parsing
5217 comma separated values. The API of the @code{csv} module in Python 2
5218 is drastically different from the @code{csv} module in Python 3.
5219 This is due, for the most part, to the difference between str in
5220 Python 2 and Python 3.")
5221 (license license:psfl)))
5223 (define-public python2-backports-csv
5224 (package-with-python2 python-backports-csv))
5226 (define-public python2-backports-shutil-get-terminal-size
5228 (name "python2-backports-shutil-get-terminal-size")
5233 (uri (pypi-uri "backports.shutil_get_terminal_size" version))
5236 "107cmn7g3jnbkp826zlj8rrj19fam301qvaqf0f3905f5217lgki"))))
5237 (build-system python-build-system)
5239 `(#:python ,python-2
5241 (modify-phases %standard-phases
5244 (zero? (system* "py.test" "-v")))))))
5246 `(("python2-pytest" ,python2-pytest)))
5247 (home-page "https://github.com/chrippa/backports.shutil_get_terminal_size")
5248 (synopsis "Backport of Python 3.3's @code{shutil.get_terminal_size}")
5250 "This package provides a backport of the @code{get_terminal_size
5251 function} from Python 3.3's @code{shutil}.
5252 Unlike the original version it is written in pure Python rather than C,
5253 so it might be a tiny bit slower.")
5254 (license license:expat)))
5256 (define-public python-waf
5262 (uri (string-append "https://waf.io/"
5263 "waf-" version ".tar.bz2"))
5266 "0wl4cnmp06lfxqjxaan58bqxn27smhydz0sg5prrfbl3bsw4gv6q"))))
5267 (build-system python-build-system)
5270 (modify-phases %standard-phases
5273 (zero? (system* "python" "waf-light" "configure" "build"))))
5276 (zero? (system* "python" "waf" "--version"))))
5279 (copy-file "waf" %output))))))
5280 (home-page "https://waf.io/")
5281 (synopsis "Python-based build system")
5283 "Waf is a Python-based framework for configuring, compiling and installing
5285 (license license:bsd-3)))
5287 (define-public python2-waf
5288 (package-with-python2 python-waf))
5290 (define-public python-pyzmq
5292 (name "python-pyzmq")
5297 (uri (pypi-uri "pyzmq" version))
5299 (base32 "13fhwnlvsvxv72kfhqbpn6qi7msh8mc8377mpabv32skk2cjfnxx"))))
5300 (build-system python-build-system)
5303 (list (string-append "--zmq=" (assoc-ref %build-inputs "zeromq")))
5304 ;; FIXME: You must build pyzmq with 'python setup.py build_ext
5305 ;; --inplace' for 'python setup.py test' to work.
5308 `(("zeromq" ,zeromq)))
5310 `(("pkg-config" ,pkg-config)
5311 ("python-nose" ,python-nose)))
5312 (home-page "https://github.com/zeromq/pyzmq")
5313 (synopsis "Python bindings for 0MQ")
5315 "PyZMQ is the official Python binding for the ZeroMQ messaging library.")
5316 (license license:bsd-4)))
5318 (define-public python2-pyzmq
5319 (package-with-python2 python-pyzmq))
5321 (define-public python-pep8
5323 (name "python-pep8")
5328 (uri (pypi-uri "pep8" version))
5331 "002rkl4lsn6x2mxmf8ar00l0m8i3mzrc6pnzz77blyksmpsxa4x1"))))
5332 (build-system python-build-system)
5333 (home-page "http://pep8.readthedocs.org/")
5334 (synopsis "Python style guide checker")
5336 "This tools checks Python code against some of the style conventions in
5338 (license license:expat)))
5340 (define-public python2-pep8
5341 (package-with-python2 python-pep8))
5343 (define-public python-pyflakes
5345 (name "python-pyflakes")
5350 (uri (pypi-uri "pyflakes" version))
5353 "1x1pcca4a24k4pw8x1c77sgi58cg1wl2k38mp8a25k608pzls3da"))))
5354 (build-system python-build-system)
5356 "https://github.com/pyflakes/pyflakes")
5357 (synopsis "Passive checker of Python programs")
5359 "Pyflakes statically checks Python source code for common errors.")
5360 (license license:expat)))
5362 (define-public python2-pyflakes
5363 (package-with-python2 python-pyflakes))
5365 (define-public python-mccabe
5367 (name "python-mccabe")
5372 (uri (pypi-uri "mccabe" version))
5375 "07w3p1qm44hgxf3vvwz84kswpsx6s7kvaibzrsx5dzm0hli1i3fx"))))
5376 (build-system python-build-system)
5378 `(("python-pytest" ,python-pytest-bootstrap)
5379 ("python-pytest-runner" ,python-pytest-runner)))
5380 (home-page "https://github.com/flintwork/mccabe")
5381 (synopsis "McCabe checker, plugin for flake8")
5383 "This package provides a Flake8 plug-in to compute the McCabe cyclomatic
5384 complexity of Python source code.")
5385 (license license:expat)))
5387 (define-public python2-mccabe
5388 (package-with-python2 python-mccabe))
5390 (define-public python-mccabe-0.2.1
5391 (package (inherit python-mccabe)
5396 (uri (pypi-uri "mccabe" version))
5399 "0fi4a81kr5bcv5p4xgibqr595hyj5dafkqgsmfk96mfy8w71fajs"))))))
5401 (define-public python2-mccabe-0.2.1
5402 (package-with-python2 python-mccabe-0.2.1))
5404 ;; Flake8 2.4.1 requires an older version of pep8.
5405 ;; This should be removed ASAP.
5406 (define-public python-pep8-1.5.7
5407 (package (inherit python-pep8)
5413 "https://pypi.python.org/packages/source/p/pep8/pep8-"
5418 "12b9bbdbwnspxgak14xg58c130x2n0blxzlms5jn2dszn8qj3d0m"))))
5420 ;; XXX Tests not compatible with Python 3.5.
5423 (define-public python2-pep8-1.5.7
5424 (package-with-python2 python-pep8-1.5.7))
5426 ;; Flake8 2.4.1 requires an older version of pyflakes.
5427 ;; This should be removed ASAP.
5428 (define-public python-pyflakes-0.8.1
5429 (package (inherit python-pyflakes)
5435 "https://pypi.python.org/packages/source/p/pyflakes/pyflakes-"
5440 "0sbpq6pqm1i9wqi41mlfrsc5rk92jv4mskvlyxmnhlbdnc80ma1z"))))
5442 ;; XXX Tests not compatible with Python 3.5.
5445 (define-public python2-pyflakes-0.8.1
5446 (package-with-python2 python-pyflakes-0.8.1))
5448 (define-public python-flake8
5450 (name "python-flake8")
5455 (uri (pypi-uri "flake8" version))
5458 "1n0i38592vy3q0x2a9bf8z6rhhn04i30wsn5i5zzcj7qkxvl8062"))))
5459 (build-system python-build-system)
5462 (modify-phases %standard-phases
5464 (add-after 'install 'check
5465 (lambda* (#:key inputs outputs #:allow-other-keys)
5466 (add-installed-pythonpath inputs outputs)
5467 (zero? (system* "pytest" "-v")))))))
5469 `(("python-pycodestyle" ,python-pycodestyle)
5470 ("python-pyflakes" ,python-pyflakes)
5471 ;; flake8 depends on a newer setuptools than provided by python.
5472 ("python-setuptools" ,python-setuptools)
5473 ("python-mccabe" ,python-mccabe)))
5475 `(("python-mock" ,python-mock) ; TODO: only required for < 3.3
5476 ("python-pytest" ,python-pytest-bootstrap)
5477 ("python-pytest-runner" ,python-pytest-runner)))
5478 (home-page "https://gitlab.com/pycqa/flake8")
5480 "The modular source code checker: pep8, pyflakes and co")
5482 "Flake8 is a wrapper around PyFlakes, pep8 and python-mccabe.")
5483 (properties `((python2-variant . ,(delay python2-flake8))))
5484 (license license:expat)))
5486 (define-public python2-flake8
5487 (let ((base (package-with-python2 (strip-python2-variant python-flake8))))
5488 (package (inherit base)
5490 `(("python2-configparser" ,python2-configparser)
5491 ("python2-enum34" ,python2-enum34)
5492 ,@(package-propagated-inputs base))))))
5494 ;; python-hacking requires flake8 <2.6.0.
5495 (define-public python-flake8-2.5
5497 (inherit python-flake8)
5501 (uri (pypi-uri "flake8" version))
5504 "1snylqwbmrylbx3r1wpz8ggk98f6bcag4441ag8mm2l7wyn58sij"))))
5506 `(("python-pep8" ,python-pep8)
5507 ,@(package-propagated-inputs python-flake8)))
5508 (properties `((python2-variant . ,(delay python2-flake8-2.5))))))
5510 (define-public python2-flake8-2.5
5512 (inherit python2-flake8)
5513 (version (package-version python-flake8-2.5))
5515 (inherit (package-source python-flake8-2.5))))
5517 `(("python2-pep8" ,python2-pep8)
5518 ,@(package-propagated-inputs python2-flake8)))))
5520 (define-public python-flake8-polyfill
5522 (name "python-flake8-polyfill")
5527 (uri (pypi-uri "flake8-polyfill" version))
5530 "1nlf1mkqw856vi6782qcglqhaacb23khk9wkcgn55npnjxshhjz4"))))
5531 (build-system python-build-system)
5534 (modify-phases %standard-phases
5537 (setenv "PYTHONPATH"
5538 (string-append (getcwd) "/build/lib:"
5539 (getenv "PYTHONPATH")))
5540 (zero? (system* "py.test" "-v")))))))
5542 `(("python-flake8" ,python-flake8)
5543 ("python-mock" ,python-mock)
5544 ("python-pep8" ,python-pep8)
5545 ("python-pycodestyle" ,python-pycodestyle)
5546 ("python-pytest" ,python-pytest)))
5547 (home-page "https://gitlab.com/pycqa/flake8-polyfill")
5548 (synopsis "Polyfill package for Flake8 plugins")
5550 "This package that provides some compatibility helpers for Flake8
5551 plugins that intend to support Flake8 2.x and 3.x simultaneously.")
5552 (license license:expat)))
5554 (define-public python2-flake8-polyfill
5555 (package-with-python2 python-flake8-polyfill))
5557 (define-public python-mistune
5559 (name "python-mistune")
5564 (uri (pypi-uri "mistune" version))
5567 "06b662p6kf46wh2jsabaqhaq4bz1srh2zxkrnx4yg96azlxw645w"))))
5568 (build-system python-build-system)
5570 `(("python-nose" ,python-nose)
5571 ("python-cython" ,python-cython)))
5572 (home-page "https://github.com/lepture/mistune")
5573 (synopsis "Markdown parser in pure Python")
5574 (description "This package provides a fast markdown parser in pure
5576 (license license:bsd-3)))
5578 (define-public python2-mistune
5579 (package-with-python2 python-mistune))
5581 (define-public python-markdown
5583 (name "python-markdown")
5588 (uri (pypi-uri "Markdown" version))
5591 "108g80ryzykh8bj0i7jfp71510wrcixdi771lf2asyghgyf8cmm8"))))
5592 (build-system python-build-system)
5595 (modify-phases %standard-phases
5598 (zero? (system* "python" "run-tests.py")))))))
5600 `(("python-nose" ,python-nose)
5601 ("python-pyyaml" ,python-pyyaml)))
5602 (home-page "https://pythonhosted.org/Markdown/")
5603 (synopsis "Python implementation of Markdown")
5605 "This package provides a Python implementation of John Gruber's
5606 Markdown. The library features international input, various Markdown
5607 extensions, and several HTML output formats. A command line wrapper
5608 markdown_py is also provided to convert Markdown files to HTML.")
5609 (license license:bsd-3)))
5611 (define-public python2-markdown
5612 (package-with-python2 python-markdown))
5614 (define-public python-ptyprocess
5616 (name "python-ptyprocess")
5622 "https://pypi.python.org/packages/source/p/ptyprocess/ptyprocess-"
5626 "0ra31k10v3629xq0kdn8lwmfbi97anmk48r03yvh7mks0kq96hg6"))))
5627 (build-system python-build-system)
5629 `(("python-nose" ,python-nose)))
5632 (modify-phases %standard-phases
5635 (zero? (system* "nosetests")))))))
5636 (home-page "https://github.com/pexpect/ptyprocess")
5637 (synopsis "Run a subprocess in a pseudo terminal")
5639 "This package provides a Python library used to launch a subprocess in a
5640 pseudo terminal (pty), and interact with both the process and its pty.")
5641 (license license:isc)))
5643 (define-public python2-ptyprocess
5644 (package-with-python2 python-ptyprocess))
5646 (define-public python-cram
5648 (name "python-cram")
5650 (home-page "https://bitheap.org/cram/")
5653 (uri (list (string-append home-page "cram-"
5655 (pypi-uri "cram" version)))
5658 "0bvz6fwdi55rkrz3f50zsy35gvvwhlppki2yml5bj5ffy9d499vx"))))
5661 (modify-phases %standard-phases
5662 (add-after 'unpack 'patch-source
5664 (substitute* (find-files "cram" ".*\\.py$")
5665 ;; Replace default shell path.
5666 (("/bin/sh") (which "sh")))
5667 (substitute* (find-files "tests" ".*\\.t$")
5669 (("/bin/bash") (which "bash"))
5670 (("/bin/sh") (which "sh")))
5671 (substitute* "cram/_test.py"
5672 ;; This hack works around a bug triggered by substituting
5673 ;; the /bin/sh paths. "tests/usage.t" compares the output of
5674 ;; "cram -h", which breaks the output at 80 characters. This
5675 ;; causes the line showing the default shell to break into two
5676 ;; lines, but the test expects a single line...
5677 (("env\\['COLUMNS'\\] = '80'")
5678 "env['COLUMNS'] = '160'"))
5681 (add-after 'install 'check
5682 ;; The test phase uses the built library and executable.
5683 ;; It's easier to run it after install since the build
5684 ;; directory contains version-specific PATH.
5685 (lambda* (#:key inputs outputs #:allow-other-keys)
5686 (add-installed-pythonpath inputs outputs)
5687 (setenv "PATH" (string-append (getenv "PATH") ":"
5688 (assoc-ref outputs "out") "/bin"))
5689 (zero? (system* "make" "test")))))))
5690 (build-system python-build-system)
5692 `(("python-coverage" ,python-coverage)
5694 (synopsis "Simple testing framework for command line applications")
5696 "Cram is a functional testing framework for command line applications.
5697 Cram tests look like snippets of interactive shell sessions. Cram runs each
5698 command and compares the command output in the test with the command’s actual
5700 (license license:gpl2+)))
5702 (define-public python2-cram
5703 (package-with-python2 python-cram))
5705 (define-public python-straight-plugin
5707 (name "python-straight-plugin")
5712 (uri (pypi-uri "straight.plugin" version))
5715 "069pjll4383p4kkgvcc40hgyvf79j2wdbpgwz77yigzxksh1gj62"))))
5716 (build-system python-build-system)
5717 (home-page "https://github.com/ironfroggy/straight.plugin")
5718 (synopsis "Simple namespaced plugin facility")
5719 (description "Straight Plugin provides a type of plugin you can create from
5720 almost any existing Python modules, and an easy way for outside developers to
5721 add functionality and customization to your projects with their own plugins.")
5722 (license license:expat)))
5724 (define-public python2-straight-plugin
5725 (package-with-python2 python-straight-plugin))
5727 (define-public python-fonttools
5729 (name "python-fonttools")
5733 (uri (pypi-uri "fonttools" version ".zip"))
5736 "1hhj97izwliy0vybmza72d90l5d4mcn50y8akq7kyccfl82vdx4d"))))
5737 (build-system python-build-system)
5739 '(#:test-target "check"
5741 (modify-phases %standard-phases
5742 (add-after 'unpack 'patch-setuppy
5743 ;; Remove the undocumented "extra_path" argument, which adds an
5744 ;; intervening directories between site-packages and the package
5747 (substitute* "setup.py"
5748 (("^[ \t]*extra_path *= *'FontTools',") ""))
5751 `(("unzip" ,unzip)))
5752 (home-page "https://github.com/behdad/fonttools")
5753 (synopsis "Tools to manipulate font files")
5755 "FontTools/TTX is a library to manipulate font files from Python. It
5756 supports reading and writing of TrueType/OpenType fonts, reading and writing
5757 of AFM files, reading (and partially writing) of PS Type 1 fonts. The package
5758 also contains a tool called “TTX” which converts TrueType/OpenType fonts to and
5759 from an XML-based format.")
5760 (license (license:non-copyleft
5761 "file://LICENSE.txt"
5762 "See LICENSE.txt in the distribution."))))
5764 (define-public python2-fonttools
5765 (package-with-python2 python-fonttools))
5767 (define-public python-ly
5774 (uri (string-append "https://pypi.python.org/packages/57/4f/"
5775 "889579244947368f28eda66b782331b1e75f83fd72e63f9ece93cd7a18f9"
5776 "/python-ly-" version ".tar.gz"))
5779 "0x98dv7p8mg26p4816yy8hz4f34zf6hpnnfmr56msgh9jnsm2qfl"))))
5780 (build-system python-build-system)
5782 ;; FIXME: Some tests need network access.
5784 (synopsis "Tool and library for manipulating LilyPond files")
5785 (description "This package provides a Python library to parse, manipulate
5786 or create documents in LilyPond format. A command line program ly is also
5787 provided that can be used to do various manipulations with LilyPond files.")
5788 (home-page "https://pypi.python.org/pypi/python-ly")
5789 (license license:gpl2+)))
5791 (define-public python-appdirs
5793 (name "python-appdirs")
5798 (uri (pypi-uri "appdirs" version))
5801 "14id6wxi12lgyw0mg3bcfnf888ad07jz9yj46gfzhn186z8rcn4y"))))
5802 (build-system python-build-system)
5803 (home-page "https://github.com/ActiveState/appdirs")
5805 "Determine platform-specific dirs, e.g. a \"user data dir\"")
5807 "This module provides a portable way of finding out where user data
5808 should be stored on various operating systems.")
5809 (license license:expat)))
5811 (define-public python2-appdirs
5812 (package-with-python2 python-appdirs))
5814 (define-public python-llfuse
5816 (name "python-llfuse")
5820 (uri (pypi-uri "llfuse" version ".tar.bz2"))
5823 "0qxvnbz41bpvpc1vbi8qkhmpr9gj1qrrp5jdj085iqibd8l2l9cn"))))
5824 (build-system python-build-system)
5829 `(("pkg-config" ,pkg-config)))
5830 (synopsis "Python bindings for FUSE")
5832 "Python-LLFUSE is a set of Python bindings for the low level FUSE API.")
5833 (home-page "https://bitbucket.org/nikratio/python-llfuse/")
5834 (license license:lgpl2.0+)
5835 (properties `((python2-variant . ,(delay python2-llfuse))))))
5837 (define-public python2-llfuse
5838 (package (inherit (package-with-python2
5839 (strip-python2-variant python-llfuse)))
5840 (propagated-inputs `(("python2-contextlib2" ,python2-contextlib2)))))
5843 (define-public python-llfuse-0.41
5844 (package (inherit python-llfuse)
5849 "https://bitbucket.org/nikratio/python-llfuse/downloads/"
5850 "llfuse-" version ".tar.bz2"))
5853 "1imlqw9b73086y97izr036f58pgc5akv4ihc2rrf8j5h75jbrlaa"))))
5854 ;; Python-LLFUSE < 0.42 includes underscore.js, which is MIT (expat)
5855 ;; licensed. The rest of the package is licensed under LGPL2.0 or later.
5856 (license (list license:expat license:lgpl2.0+))))
5858 (define-public python-msgpack
5860 (name "python-msgpack")
5864 (uri (pypi-uri "msgpack" version))
5867 "1hz2dba1nvvn52afg34liijsm7kn65cmn06dl0xbwld6bb4cis0f"))))
5868 (build-system python-build-system)
5870 `(#:modules ((guix build utils)
5871 (guix build python-build-system)
5876 (modify-phases %standard-phases
5879 (let ((cwd (getcwd)))
5880 (setenv "PYTHONPATH"
5881 (string-append cwd "/build/"
5882 (find (cut string-prefix? "lib" <>)
5883 (scandir (string-append cwd "/build")))
5885 (getenv "PYTHONPATH")))
5886 (invoke "pytest" "-v" "test")))))))
5888 `(("python-pytest" ,python-pytest)))
5889 (synopsis "MessagePack (de)serializer")
5890 (description "MessagePack is a fast, compact binary serialization format,
5891 suitable for similar data to JSON. This package provides CPython bindings for
5892 reading and writing MessagePack data.")
5893 (home-page "https://pypi.python.org/pypi/msgpack/")
5894 (license license:asl2.0)))
5896 ;; This msgpack library's name changed from "python-msgpack" to "msgpack" with
5897 ;; release 0.5. Some packages like borg still call it by the old name for now.
5898 ;; <https://bugs.gnu.org/30662>
5899 (define-public python-msgpack-transitional
5901 (inherit python-msgpack)
5902 (name "python-msgpack-transitional")
5904 (substitute-keyword-arguments (package-arguments python-msgpack)
5906 `(modify-phases ,phases
5907 (add-after 'unpack 'configure-transitional
5909 ;; Keep using the old name.
5910 (substitute* "setup.py"
5911 (("TRANSITIONAL = False")
5912 "TRANSITIONAL = 1"))
5915 (define-public python2-msgpack
5916 (package-with-python2 python-msgpack))
5918 (define-public python-netaddr
5920 (name "python-netaddr")
5925 (uri (pypi-uri "netaddr" version))
5928 "1zdfadvpq4lmcqzr383gywxn4xyn355kj1n3lk9q2l03vmyfrbiq"))))
5929 (build-system python-build-system)
5930 (arguments `(#:tests? #f)) ;; No tests.
5931 (home-page "https://github.com/drkjam/netaddr/")
5932 (synopsis "Pythonic manipulation of network addresses")
5934 "A Python library for representing and manipulating IPv4, IPv6, CIDR, EUI
5935 and MAC network addresses.")
5936 (license license:bsd-3)))
5938 (define-public python2-netaddr
5939 (package-with-python2 python-netaddr))
5941 (define-public python-wrapt
5943 (name "python-wrapt")
5948 (uri (pypi-uri "wrapt" version))
5951 "1ip3dwib39xhp79kblskgvz3fjzcwxgx3fs3ahdixhpjg7a61mfl"))))
5952 (build-system python-build-system)
5954 ;; Tests are not included in the tarball, they are only available in the
5957 (home-page "https://github.com/GrahamDumpleton/wrapt")
5958 (synopsis "Module for decorators, wrappers and monkey patching")
5960 "The aim of the wrapt module is to provide a transparent object proxy for
5961 Python, which can be used as the basis for the construction of function
5962 wrappers and decorator functions.")
5963 (license license:bsd-2)))
5965 (define-public python2-wrapt
5966 (package-with-python2 python-wrapt))
5968 (define-public python-xlrd
5970 (name "python-xlrd")
5974 (uri (pypi-uri "xlrd" version))
5977 "0s8hjiz01vbhy85xalrz0qlsmd9ypf36zjqrf97hh984spapvy0g"))))
5978 (build-system python-build-system)
5981 (modify-phases %standard-phases
5982 ;; Current test in setup.py does not work as of 1.0.0, so use nose to
5983 ;; run tests instead for now.
5984 (replace 'check (lambda _ (zero? (system* "nosetests")))))))
5985 (native-inputs `(("python-nose" ,python-nose)))
5986 (home-page "http://www.python-excel.org/")
5987 (synopsis "Library for extracting data from Excel files")
5988 (description "This packages provides a library to extract data from
5989 spreadsheets using Microsoft Excel proprietary file formats @samp{.xls} and
5990 @samp{.xlsx} (versions 2.0 onwards). It has support for Excel dates and is
5991 Unicode-aware. It is not intended as an end-user tool.")
5992 (license license:bsd-3)))
5994 (define-public python2-xlrd
5995 (package-with-python2 python-xlrd))
5997 (define-public python-prettytable
5999 (name "python-prettytable")
6005 "https://pypi.python.org/packages/source/P/PrettyTable/"
6006 "prettytable-" version ".tar.bz2"))
6009 "0diwsicwmiq2cpzpxri7cyl5fmsvicafw6nfqf6p6p322dji2g45"))))
6010 (build-system python-build-system)
6011 (home-page "http://code.google.com/p/prettytable/")
6012 (synopsis "Display tabular data in an ASCII table format")
6014 "A library designed to represent tabular data in visually appealing ASCII
6015 tables. PrettyTable allows for selection of which columns are to be printed,
6016 independent alignment of columns (left or right justified or centred) and
6017 printing of sub-tables by specifying a row range.")
6018 (license license:bsd-3)))
6020 (define-public python2-prettytable
6021 (package-with-python2 python-prettytable))
6023 (define-public python-tables
6025 (name "python-tables")
6030 (uri (pypi-uri "tables" version))
6033 "117s6w7s3yxafpmf3zz3svana7xfrsviw01va1xp7h8ylx8v6r1m"))
6034 (modules '((guix build utils)))
6037 ;; Remove pre-compiled .pyc files from source.
6038 (for-each delete-file-recursively
6039 (find-files "." "__pycache__" #:directories? #t))
6040 (for-each delete-file (find-files "." "\\.pyc$"))
6042 (build-system python-build-system)
6044 `(;; FIXME: python-build-system does not pass configure-flags to "build"
6045 ;; or "check", so we must override the build and check phases.
6047 (modify-phases %standard-phases
6048 (add-after 'unpack 'use-gcc
6050 (substitute* "setup.py"
6051 (("compiler = new_compiler\\(\\)" line)
6053 "\ncompiler.set_executables(compiler='gcc',"
6054 "compiler_so='gcc',"
6056 "linker_so='gcc -shared')")))
6059 (lambda* (#:key inputs #:allow-other-keys)
6060 (zero? (system* "python" "setup.py" "build"
6061 (string-append "--hdf5="
6062 (assoc-ref inputs "hdf5"))))))
6064 (lambda* (#:key inputs #:allow-other-keys)
6065 (zero? (system* "python" "setup.py" "check"
6066 (string-append "--hdf5="
6067 (assoc-ref inputs "hdf5")))))))))
6069 `(("python-numexpr" ,python-numexpr)
6070 ("python-numpy" ,python-numpy)))
6072 `(("python-cython" ,python-cython)
6073 ("pkg-config" ,pkg-config)))
6078 (home-page "http://www.pytables.org/")
6079 (synopsis "Hierarchical datasets for Python")
6080 (description "PyTables is a package for managing hierarchical datasets and
6081 designed to efficiently cope with extremely large amounts of data.")
6082 (license license:bsd-3)))
6084 (define-public python2-tables
6085 (package-with-python2 python-tables))
6087 (define-public python-pyasn1
6089 (name "python-pyasn1")
6094 (uri (pypi-uri "pyasn1" version))
6097 "1b86yx23c1x74clai05a5ma8c8nfmhlx3j1mxq0ff657i2ylx33k"))))
6098 (build-system python-build-system)
6099 (home-page "http://pyasn1.sourceforge.net/")
6100 (synopsis "ASN.1 types and codecs")
6102 "This is an implementation of ASN.1 types and codecs in Python. It is
6103 suitable for a wide range of protocols based on the ASN.1 specification.")
6104 (license license:bsd-2)))
6106 (define-public python2-pyasn1
6107 (package-with-python2 python-pyasn1))
6109 (define-public python-pyasn1-modules
6111 (name "python-pyasn1-modules")
6116 (uri (pypi-uri "pyasn1-modules" version))
6119 "0drqgw81xd3fxdlg89kgd79zzrabvfncvkbybi2wr6w2y4s1jmhh"))))
6120 (build-system python-build-system)
6122 `(("python-pyasn1" ,python-pyasn1)))
6123 (home-page "https://sourceforge.net/projects/pyasn1/")
6124 (synopsis "ASN.1 codec implementations")
6126 "Pyasn1-modules is a collection of Python modules providing ASN.1 types and
6127 implementations of ASN.1-based codecs and protocols.")
6128 (license license:bsd-3)))
6130 (define-public python2-pyasn1-modules
6131 (package-with-python2 python-pyasn1-modules))
6133 (define-public python-ipaddress
6135 (name "python-ipaddress")
6139 (uri (pypi-uri "ipaddress" version))
6142 "10agaa1cys1bk1ycpl2w8lky9vjx8h1xh1z29mg0niqx0638c390"))))
6143 (build-system python-build-system)
6144 (home-page "https://github.com/phihag/ipaddress")
6145 (synopsis "IP address manipulation library")
6147 "This package provides a fast, lightweight IPv4/IPv6 manipulation library
6148 in Python. This library is used to create, poke at, and manipulate IPv4 and
6149 IPv6 addresses and networks. This is a port of the Python 3.3 ipaddress
6150 module to older versions of Python.")
6151 (license license:psfl)))
6153 (define-public python2-ipaddress
6154 (package-with-python2 python-ipaddress))
6156 (define-public python2-ipaddr
6158 (name "python2-ipaddr")
6163 (uri (pypi-uri "ipaddr" version))
6165 (base32 "1dwq3ngsapjc93fw61rp17fvzggmab5x1drjzvd4y4q0i255nm8v"))))
6166 (build-system python-build-system)
6168 `(#:python ,python-2 ;version 2 only
6170 (modify-phases %standard-phases
6173 (zero? (system* "python" "ipaddr_test.py")))))))
6174 (home-page "https://github.com/google/ipaddr-py")
6175 (synopsis "IP address manipulation library")
6177 "Ipaddr is a Python@tie{}2 library for creating and manupilating IPv4 and
6178 IPv6 addresses and networks.
6180 For new implementations you may prefer to use the standard module
6181 @code{ipaddress}, which was introduced in Python 3.3 and backported to older
6182 versions of Python.")
6183 (license license:asl2.0)))
6185 (define-public python-idna
6187 (name "python-idna")
6192 (uri (pypi-uri "idna" version))
6195 "13qaab6d0s15gknz8v3zbcfmbj6v86hn9pjxgkdf62ch13imssic"))))
6196 (build-system python-build-system)
6197 (home-page "https://github.com/kjd/idna")
6198 (synopsis "Internationalized domain names in applications")
6200 "This is a library to support the Internationalised Domain Names in
6201 Applications (IDNA) protocol as specified in RFC 5891. This version of the
6202 protocol is often referred to as “IDNA2008” and can produce different results
6203 from the earlier standard from 2003. The library is also intended to act as a
6204 suitable drop-in replacement for the “encodings.idna” module that comes with
6205 the Python standard library but currently only supports the older 2003
6207 (license license:bsd-4)))
6209 (define-public python2-idna
6210 (package-with-python2 python-idna))
6212 (define-public python-pretend
6214 (name "python-pretend")
6219 (uri (string-append "https://pypi.python.org/packages/source/p/"
6220 "pretend/pretend-" version ".tar.gz"))
6223 "0r5r7ygz9m6d2bklflbl84cqhjkc2q12xgis8268ygjh30g2q3wk"))))
6224 (build-system python-build-system)
6225 (home-page "https://github.com/alex/pretend")
6226 (synopsis "Library for stubbing in Python")
6228 "Pretend is a library to make stubbing with Python easier. Stubbing is a
6229 technique for writing tests. You may hear the term mixed up with mocks,
6230 fakes, or doubles. Basically, a stub is an object that returns pre-canned
6231 responses, rather than doing any computation.")
6232 (license license:bsd-3)))
6234 (define-public python2-pretend
6235 (package-with-python2 python-pretend))
6237 (define-public python-pip
6244 (uri (pypi-uri "pip" version))
6247 "03clr9c1dih5n9c00c592zzvf6r1ffimywkaq9agcqdllzhl7wh9"))))
6248 (build-system python-build-system)
6250 '(#:tests? #f)) ; there are no tests in the pypi archive.
6251 (home-page "https://pip.pypa.io/")
6252 (synopsis "Package manager for Python software")
6254 "Pip is a package manager for Python software, that finds packages on the
6255 Python Package Index (PyPI).")
6256 (license license:expat)))
6258 (define-public python2-pip
6259 (package-with-python2 python-pip))
6261 (define-public python-tlsh
6263 (name "python-tlsh")
6265 (home-page "https://github.com/trendmicro/tlsh")
6268 (uri (string-append "https://github.com/trendmicro/tlsh/archive/v"
6272 "00bhzjqrlh7v538kbkbn8lgx976j1138al3sdhklaizqjvpwyk4r"))
6273 (file-name (string-append name "-" version ".tar.gz"))))
6274 (build-system cmake-build-system)
6276 '(#:out-of-source? #f
6277 #:phases (modify-phases %standard-phases
6280 (lambda* (#:key outputs #:allow-other-keys)
6281 ;; Build and install the Python bindings. The underlying
6282 ;; C++ library is apparently not meant to be installed.
6283 (let ((out (assoc-ref outputs "out")))
6284 (with-directory-excursion "py_ext"
6285 (and (system* "python" "setup.py" "build")
6286 (system* "python" "setup.py" "install"
6287 (string-append "--prefix=" out))))))))))
6288 (inputs `(("python" ,python-wrapper))) ;for the bindings
6289 (synopsis "Fuzzy matching library for Python")
6291 "Trend Micro Locality Sensitive Hash (TLSH) is a fuzzy matching library.
6292 Given a byte stream with a minimum length of 256 bytes, TLSH generates a hash
6293 value which can be used for similarity comparisons. Similar objects have
6294 similar hash values, which allows for the detection of similar objects by
6295 comparing their hash values. The byte stream should have a sufficient amount
6296 of complexity; for example, a byte stream of identical bytes will not generate
6298 (license license:asl2.0)))
6300 (define-public python2-tlsh
6302 (inherit python-tlsh)
6303 (name "python2-tlsh")
6304 (inputs `(("python" ,python-2)))))
6306 (define-public python-termcolor
6308 (name "python-termcolor")
6313 (uri (pypi-uri "termcolor" version))
6316 "0fv1vq14rpqwgazxg4981904lfyp84mnammw7y046491cv76jv8x"))))
6317 (build-system python-build-system)
6319 ;; There are no tests.
6321 (home-page "https://pypi.python.org/pypi/termcolor")
6322 (synopsis "ANSII Color formatting for terminal output")
6324 "This package provides ANSII Color formatting for output in terminals.")
6325 (license license:expat)))
6327 (define-public python2-termcolor
6328 (package-with-python2 python-termcolor))
6330 (define-public python-libarchive-c
6332 (name "python-libarchive-c")
6336 (uri (pypi-uri "libarchive-c" version))
6339 "0z4r7v3dhd6b3120mav05ff08srih176r2rg5k8kn7mjd9pslm2x"))))
6340 (build-system python-build-system)
6342 '(#:phases (modify-phases %standard-phases
6344 'build 'reference-libarchive
6345 (lambda* (#:key inputs #:allow-other-keys)
6346 ;; Retain the absolute file name of libarchive.so.
6347 (let ((libarchive (assoc-ref inputs "libarchive")))
6348 (substitute* "libarchive/ffi.py"
6349 (("find_library\\('archive'\\)")
6350 (string-append "'" libarchive
6351 "/lib/libarchive.so'")))))))))
6353 `(("libarchive" ,libarchive)))
6354 (home-page "https://github.com/Changaco/python-libarchive-c")
6355 (synopsis "Python interface to libarchive")
6357 "This package provides Python bindings to libarchive, a C library to
6358 access possibly compressed archives in many different formats. It uses
6359 Python's @code{ctypes} foreign function interface (FFI).")
6360 (license license:lgpl2.0+)))
6362 (define-public python2-libarchive-c
6363 (package-with-python2 python-libarchive-c))
6365 (define-public python-file
6368 (name "python-file")
6369 (build-system python-build-system)
6371 '(#:tests? #f ;no tests
6372 #:configure-flags '("--single-version-externally-managed" "--root=/")
6373 #:phases (modify-phases %standard-phases
6374 (add-before 'build 'change-directory
6378 (add-before 'build 'set-library-file-name
6379 (lambda* (#:key inputs #:allow-other-keys)
6380 (let ((file (assoc-ref inputs "file")))
6381 (substitute* "magic.py"
6382 (("find_library\\('magic'\\)")
6383 (string-append "'" file "/lib/libmagic.so'")))
6385 (inputs `(("file" ,file)))
6386 (self-native-input? #f)
6387 (synopsis "Python bindings to the libmagic file type guesser. Note that
6388 this module and the python-magic module both provide a \"magic.py\" file;
6389 these two modules, which are different and were developed separately, both
6390 serve the same purpose: provide Python bindings for libmagic.")))
6392 (define-public python2-file
6393 (package-with-python2 python-file))
6395 (define-public python-debian
6397 (name "python-debian")
6402 (uri (pypi-uri name version))
6405 "0i15f0xzx679sd0ldq2sls9pnnps9fv6vhqvnv9dzf4qhma42i0y"))))
6406 (build-system python-build-system)
6408 `(("python-six" ,python-six)))
6409 (home-page "http://packages.debian.org/sid/python-debian")
6410 (synopsis "Debian package related modules")
6412 ;; XXX: Use @enumerate instead of @itemize to work around
6413 ;; <http://bugs.gnu.org/21772>.
6414 "This package provides Python modules that abstract many formats of
6415 Debian-related files, such as:
6418 @item Debtags information;
6419 @item @file{debian/changelog} files;
6420 @item packages files, pdiffs;
6421 @item control files of single or multiple RFC822-style paragraphs---e.g.
6422 @file{debian/control}, @file{.changes}, @file{.dsc};
6423 @item Raw @file{.deb} and @file{.ar} files, with (read-only) access to
6424 contained files and meta-information.
6427 ;; Modules are either GPLv2+ or GPLv3+.
6428 (license license:gpl3+)))
6430 (define-public python2-debian
6431 (package-with-python2 python-debian))
6433 (define-public python-nbformat
6435 (name "python-nbformat")
6440 (uri (pypi-uri "nbformat" version))
6443 "00nlf08h8yc4q73nphfvfhxrcnilaqanb8z0mdy6nxk0vzq4wjgp"))))
6444 (build-system python-build-system)
6445 (arguments `(#:tests? #f)) ; no test target
6447 `(("python-ipython-genutils" ,python-ipython-genutils)
6448 ("python-jsonschema" ,python-jsonschema)
6449 ("python-jupyter-core" ,python-jupyter-core)
6450 ("python-traitlets" ,python-traitlets)))
6451 (home-page "http://jupyter.org")
6452 (synopsis "Jupyter Notebook format")
6453 (description "This package provides the reference implementation of the
6454 Jupyter Notebook format and Python APIs for working with notebooks.")
6455 (license license:bsd-3)))
6457 (define-public python2-nbformat
6458 (package-with-python2 python-nbformat))
6460 (define-public python-bleach
6462 (name "python-bleach")
6467 (uri (pypi-uri "bleach" version))
6470 "0jvg3jxrvnx7xmm9gj262v60ib452xlnwlb0navyp7jsvcd0d4qj"))))
6471 (build-system python-build-system)
6473 `(("python-html5lib" ,python-html5lib-0.9)
6474 ("python-six" ,python-six)))
6476 `(("python-nose" ,python-nose)))
6477 (home-page "https://github.com/jsocol/bleach")
6478 (synopsis "Whitelist-based HTML-sanitizing tool")
6479 (description "Bleach is an easy whitelist-based HTML-sanitizing tool.")
6480 (license license:asl2.0)))
6482 (define-public python2-bleach
6483 (package-with-python2 python-bleach))
6485 (define-public python-entrypoints
6487 (name "python-entrypoints")
6492 (uri (string-append "https://github.com/takluyver/entrypoints/archive/"
6494 (file-name (string-append name "-" version ".tar.gz"))
6497 "1pdvgfr5bxyvnfvxbsd3zi0dh3il71pc4k6rinx6zpps91b84a56"))))
6498 (build-system python-build-system)
6499 ;; The package does not come with a setup.py file, so we have to generate
6504 (modify-phases %standard-phases
6505 (add-after 'unpack 'create-setup.py
6507 (call-with-output-file "setup.py"
6510 from setuptools import setup
6511 setup(name='entrypoints', version='~a', py_modules=['entrypoints'])
6513 (home-page "https://github.com/takluyver/entrypoints")
6514 (synopsis "Discover and load entry points from installed Python packages")
6515 (description "Entry points are a way for Python packages to advertise
6516 objects with some common interface. The most common examples are
6517 @code{console_scripts} entry points, which define shell commands by
6518 identifying a Python function to run. The @code{entrypoints} module contains
6519 functions to find and load entry points.")
6520 (license license:expat)))
6522 (define-public python2-entrypoints
6523 (package-with-python2 python-entrypoints))
6525 (define-public python-nbconvert
6527 (name "python-nbconvert")
6532 (uri (pypi-uri "nbconvert" version))
6535 "0brclbb18l4nmd5qy3dl9wn05rjdh1fz4rmzdlfqacj12rcdvdgp"))))
6536 (build-system python-build-system)
6538 `(;; The "bdist_egg" target is disabled by default, causing the installation
6540 #:configure-flags (list "bdist_egg")
6541 ;; FIXME: 5 failures, 40 errors.
6544 ;; (modify-phases %standard-phases
6547 ;; (zero? (system* "py.test" "-v")))))
6549 `(("python-pytest" ,python-pytest)))
6551 `(("python-bleach" ,python-bleach)
6552 ("python-entrypoints" ,python-entrypoints)
6553 ("python-jinja2" ,python-jinja2)
6554 ("python-jupyter-core" ,python-jupyter-core)
6555 ("python-mistune" ,python-mistune)
6556 ("python-nbformat" ,python-nbformat)
6557 ("python-pygments" ,python-pygments)
6558 ("python-traitlets" ,python-traitlets)))
6559 (home-page "http://jupyter.org")
6560 (synopsis "Converting Jupyter Notebooks")
6561 (description "The @code{nbconvert} tool, @{jupyter nbconvert}, converts
6562 notebooks to various other formats via Jinja templates. It allows you to
6563 convert an @code{.ipynb} notebook file into various static formats including:
6571 @item ReStructured Text (rst)
6572 @item executable script
6574 (license license:bsd-3)))
6576 (define-public python2-nbconvert
6577 (package-with-python2 python-nbconvert))
6579 (define-public python-notebook
6581 (name "python-notebook")
6585 (uri (pypi-uri "notebook" version))
6588 "0laq5c2f21frq6xcdckgq7raqhznbjb0qs0357g612z87wyn1a9r"))))
6589 (build-system python-build-system)
6592 (modify-phases %standard-phases
6595 ;; HOME must be set for tests
6596 (setenv "HOME" "/tmp")
6597 (zero? (system* "nosetests")))))))
6599 `(("python-jupyter-core" ,python-jupyter-core)
6600 ("python-nbformat" ,python-nbformat)
6601 ("python-nbconvert" ,python-nbconvert)
6602 ("python-ipython" ,python-ipython)))
6604 `(("python-nose" ,python-nose)
6605 ("python-sphinx" ,python-sphinx)
6606 ("python-requests" ,python-requests)))
6607 (home-page "http://jupyter.org/")
6608 (synopsis "Web-based notebook environment for interactive computing")
6610 "The Jupyter HTML notebook is a web-based notebook environment for
6611 interactive computing.")
6612 (properties `((python2-variant . ,(delay python2-notebook))))
6613 (license license:bsd-3)))
6615 (define-public python2-notebook
6616 (let ((base (package-with-python2
6617 (strip-python2-variant python-notebook))))
6618 (package (inherit base)
6620 `(("python2-mock" ,python2-mock)
6621 ,@(package-native-inputs base)))
6623 (substitute-keyword-arguments (package-arguments base)
6625 `(modify-phases ,phases
6626 (add-before 'check 'disable-test-case
6627 ;; The test requires network access to localhost. Curiously it
6628 ;; fails with Python 2 only. Simply make the test-case return
6632 "notebook/services/nbconvert/tests/test_nbconvert_api.py"
6633 (("formats = self.nbconvert_api") "return #")))))))))))
6635 (define-public python-widgetsnbextension
6637 (name "python-widgetsnbextension")
6642 (uri (pypi-uri "widgetsnbextension" version))
6645 "0lff2mrwrgsa1mxmwx3phl9xvy0jqfpg6khbmxy53jbq56rwy666"))))
6646 (build-system python-build-system)
6648 `(("python-notebook" ,python-notebook)))
6650 `(("python-certifi" ,python-certifi)
6651 ("python-nose" ,python-nose)))
6652 (home-page "https://ipython.org")
6653 (synopsis "IPython HTML widgets for Jupyter")
6654 (description "This package provides interactive HTML widgets for Jupyter
6656 (license license:bsd-3)))
6658 (define-public python2-widgetsnbextension
6659 (package-with-python2 python-widgetsnbextension))
6661 (define-public python-ipywidgets
6663 (name "python-ipywidgets")
6668 (uri (pypi-uri "ipywidgets" version))
6671 "1lk0qrr5l9a0z7qkkn30hv5832whxwxymf1l576fmmad0n7hkxms"))))
6672 (build-system python-build-system)
6673 ;; FIXME: it's not clear how to run the tests.
6674 (arguments `(#:tests? #f))
6676 `(("python-ipykernel" ,python-ipykernel)
6677 ("python-ipython" ,python-ipython)
6678 ("python-traitlets" ,python-traitlets)
6679 ("python-widgetsnbextension" ,python-widgetsnbextension)))
6680 (home-page "https://ipython.org")
6681 (synopsis "IPython HTML widgets for Jupyter")
6682 (description "Ipywidgets are interactive HTML widgets for Jupyter
6683 notebooks and the IPython kernel. Notebooks come alive when interactive
6684 widgets are used. Users gain control of their data and can visualize changes
6686 (license license:bsd-3)))
6688 (define-public python2-ipywidgets
6689 (package-with-python2 python-ipywidgets))
6691 (define-public python-jupyter-console
6693 (name "python-jupyter-console")
6698 (uri (pypi-uri "jupyter_console" version))
6701 "1kam1qzgwr7srhm5r6aj90di5sws4bq0jmiw15452ddamb9yspal"))))
6702 (build-system python-build-system)
6703 ;; FIXME: it's not clear how to run the tests.
6704 (arguments `(#:tests? #f))
6706 `(("python-ipykernel" ,python-ipykernel)
6707 ("python-ipython" ,python-ipython)
6708 ("python-jupyter-client" ,python-jupyter-client)
6709 ("python-prompt-toolkit" ,python-prompt-toolkit)
6710 ("python-pygments" ,python-pygments)))
6711 (home-page "https://jupyter.org")
6712 (synopsis "Jupyter terminal console")
6713 (description "This package provides a terminal-based console frontend for
6714 Jupyter kernels. It also allows for console-based interaction with non-Python
6715 Jupyter kernels such as IJulia and IRKernel.")
6716 (license license:bsd-3)))
6718 (define-public python2-jupyter-console
6719 (package-with-python2 python-jupyter-console))
6721 ;; The python-ipython and python-jupyter-console require each other. To get
6722 ;; the functionality in both packages working, strip down the
6723 ;; python-jupyter-console package when using it as an input to python-ipython.
6724 (define python-jupyter-console-minimal
6726 (inherit python-jupyter-console)
6727 (name "python-jupyter-console-minimal")
6729 (substitute-keyword-arguments
6730 (package-arguments python-jupyter-console)
6732 `(modify-phases ,phases
6733 (add-after 'install 'delete-bin
6734 (lambda* (#:key outputs #:allow-other-keys)
6735 ;; Delete the bin files, to avoid conflicts in profiles
6736 ;; where python-ipython and python-jupyter-console are
6738 (delete-file-recursively
6740 (assoc-ref outputs "out") "/bin"))))))))
6741 ;; Remove the python-ipython propagated input, to avoid the cycle
6745 (package-propagated-inputs python-jupyter-console)))))
6747 (define-public jupyter
6754 (uri (pypi-uri "jupyter" version))
6757 "0pwf3pminkzyzgx5kcplvvbvwrrzd3baa7lmh96f647k30rlpp6r"))))
6758 (build-system python-build-system)
6759 ;; FIXME: it's not clear how to run the tests.
6760 (arguments `(#:tests? #f))
6762 `(("python-ipykernel" ,python-ipykernel)
6763 ("python-ipywidgets" ,python-ipywidgets)
6764 ("python-jupyter-console" ,python-jupyter-console)
6765 ("python-nbconvert" ,python-nbconvert)
6766 ("python-notebook" ,python-notebook)))
6767 (home-page "http://jupyter.org")
6768 (synopsis "Web application for interactive documents")
6770 "The Jupyter Notebook is a web application that allows you to create and
6771 share documents that contain live code, equations, visualizations and
6772 explanatory text. Uses include: data cleaning and transformation, numerical
6773 simulation, statistical modeling, machine learning and much more.")
6774 (license license:bsd-3)))
6776 (define-public python-chardet
6778 (name "python-chardet")
6783 (uri (pypi-uri "chardet" version))
6786 "1bpalpia6r5x1kknbk11p1fzph56fmmnp405ds8icksd3knr5aw4"))))
6788 `(("python-hypothesis" ,python-hypothesis)
6789 ("python-pytest" ,python-pytest)
6790 ("python-pytest-runner" ,python-pytest-runner)))
6791 (build-system python-build-system)
6792 (home-page "https://github.com/chardet/chardet")
6793 (synopsis "Universal encoding detector for Python 2 and 3")
6795 "This package provides @code{chardet}, a Python module that can
6796 automatically detect a wide range of file encodings.")
6797 (license license:lgpl2.1+)))
6799 (define-public python2-chardet
6800 (package-with-python2 python-chardet))
6802 (define-public python-docopt
6804 (name "python-docopt")
6809 ;; The release on PyPI does not include tests.
6811 "https://github.com/docopt/docopt/archive/"
6813 (file-name (string-append name "-" version ".tar.gz"))
6816 "16bf890xbdz3m30rsv2qacklh2rdn1zrfspfnwzx9g7vwz8yw4r1"))))
6817 (build-system python-build-system)
6819 `(("python-pytest" ,python-pytest)))
6822 (modify-phases %standard-phases
6824 (lambda _ (zero? (system* "py.test")))))))
6825 (home-page "http://docopt.org")
6826 (synopsis "Command-line interface description language for Python")
6827 (description "This library allows the user to define a command-line
6828 interface from a program's help message rather than specifying it
6829 programatically with command-line parsers like @code{getopt} and
6831 (license license:expat)))
6833 (define-public python2-docopt
6834 (package-with-python2 python-docopt))
6836 (define-public python-pythondialog
6838 (name "python-pythondialog")
6843 (uri (pypi-uri "pythondialog" version))
6846 "1728ghsran47jczn9bhlnkvk5bvqmmbihabgif5h705b84r1272c"))))
6847 (build-system python-build-system)
6850 (modify-phases %standard-phases
6851 (add-after 'unpack 'patch-path
6852 (lambda* (#:key inputs #:allow-other-keys)
6853 (let* ((dialog (assoc-ref inputs "dialog")))
6854 ;; Since this library really wants to grovel the search path, we
6855 ;; must hardcode dialog's store path into it.
6856 (substitute* "dialog.py"
6857 (("os.getenv\\(\"PATH\", \":/bin:/usr/bin\"\\)")
6858 (string-append "os.getenv(\"PATH\") + \":" dialog "/bin\"")))
6860 #:tests? #f)) ; no test suite
6862 `(("dialog" ,dialog)))
6863 (home-page "http://pythondialog.sourceforge.net/")
6864 (synopsis "Python interface to the UNIX dialog utility")
6865 (description "A Python wrapper for the dialog utility. Its purpose is to
6866 provide an easy to use, pythonic and comprehensive Python interface to dialog.
6867 This allows one to make simple text-mode user interfaces on Unix-like systems")
6868 (license license:lgpl2.1)
6869 (properties `((python2-variant . ,(delay python2-pythondialog))))))
6871 (define-public python2-pythondialog
6872 (let ((base (package-with-python2 (strip-python2-variant python-pythondialog))))
6875 (version (package-version python-pythondialog))
6878 (uri (pypi-uri "python2-pythondialog" version))
6881 "0d8k7lxk50imdyx85lv8j98i4c93a71iwpapnl1506rpkbm9qvd9")))))))
6883 (define-public python-configobj
6885 (name "python-configobj")
6890 "https://pypi.python.org/packages/source/c/configobj/"
6891 "configobj-" version ".tar.gz"))
6894 "00h9rcmws03xvdlfni11yb60bz3kxfvsj6dg6nrpzj71f03nbxd2"))
6895 ;; Patch setup.py so it looks for python-setuptools, which is
6896 ;; required to parse the keyword 'install_requires' in setup.py.
6897 (patches (search-patches "python-configobj-setuptools.patch"))))
6898 (build-system python-build-system)
6900 `(("python-six" ,python-six)))
6901 (synopsis "Config file reading, writing and validation")
6902 (description "ConfigObj is a simple but powerful config file reader and
6903 writer: an ini file round tripper. Its main feature is that it is very easy to
6904 use, with a straightforward programmer’s interface and a simple syntax for
6906 (home-page "https://github.com/DiffSK/configobj")
6907 (license license:bsd-3)))
6909 (define-public python2-configobj
6910 (package-with-python2 python-configobj))
6912 (define-public python-configargparse
6914 (name "python-configargparse")
6919 "https://pypi.io/packages/source/C/ConfigArgParse/"
6920 "ConfigArgParse-" version ".tar.gz"))
6923 "0fgkiqh6r3rbkdq3k8c48m85g52k96686rw3a6jg4lcncrkpvk98"))))
6924 (build-system python-build-system)
6926 `(("python-pyyaml" ,python-pyyaml)))
6929 (modify-phases %standard-phases
6932 ;; Bypass setuptools-shim because one test relies on "setup.py"
6933 ;; being the first argument passed to the python call.
6935 ;; NOTE: Many tests do not run because they rely on Python's
6936 ;; built-in test.test_argparse, but we remove the unit tests from
6937 ;; our Python installation.
6938 (zero? (system* "python" "setup.py" "test")))))))
6939 (synopsis "Replacement for argparse")
6940 (description "A drop-in replacement for argparse that allows options to also
6941 be set via config files and/or environment variables.")
6942 (home-page "https://github.com/bw2/ConfigArgParse")
6943 (license license:expat)))
6945 (define-public python2-configargparse
6946 (package-with-python2 python-configargparse))
6948 (define-public python-contextlib2
6950 (name "python-contextlib2")
6955 (uri (pypi-uri "contextlib2" version))
6958 "0cmp131dlh0d0zvw0aza1zd13glvngzk8lb4avks0hm7yxwdr9am"))))
6959 (build-system python-build-system)
6962 (modify-phases %standard-phases
6966 "python" "test_contextlib2.py" "-v")))))))
6967 (home-page "http://contextlib2.readthedocs.org/")
6968 (synopsis "Tools for decorators and context managers")
6969 (description "This module is primarily a backport of the Python
6970 3.2 contextlib to earlier Python versions. Like contextlib, it
6971 provides utilities for common tasks involving decorators and context
6972 managers. It also contains additional features that are not part of
6973 the standard library.")
6974 (license license:psfl)))
6976 (define-public python2-contextlib2
6977 (package-with-python2 python-contextlib2))
6979 (define-public python-texttable
6981 (name "python-texttable")
6986 (uri (pypi-uri "texttable" version))
6989 "1liiiydgkg37i46a418aw19fyf6z3ds51wdwwpyjbs12x0phhf4a"))))
6990 (build-system python-build-system)
6991 (arguments '(#:tests? #f)) ; no tests
6992 (home-page "https://github.com/foutaise/texttable/")
6993 (synopsis "Python module for creating simple ASCII tables")
6994 (description "Texttable is a Python module for creating simple ASCII
6996 (license license:lgpl2.1+)))
6998 (define-public python2-texttable
6999 (package-with-python2 python-texttable))
7001 (define-public python-atomicwrites
7003 (name "python-atomicwrites")
7007 (uri (pypi-uri "atomicwrites" version))
7010 "11bm90fwm2avvf4f3ib8g925w7jr4m11vcsinn1bi6ns4bm32214"))))
7011 (build-system python-build-system)
7012 (synopsis "Atomic file writes in Python")
7013 (description "Library for atomic file writes using platform dependent tools
7014 for atomic file system operations.")
7015 (home-page "https://github.com/untitaker/python-atomicwrites")
7016 (license license:expat)))
7018 (define-public python2-atomicwrites
7019 (package-with-python2 python-atomicwrites))
7021 (define-public python-click-threading
7023 (name "python-click-threading")
7027 (uri (pypi-uri "click-threading" version))
7030 "1rsxc2fbkxlhwhlmxsdjzq3spn284l6rvjfcz9mbb17ibgdgmc5j"))))
7031 (build-system python-build-system)
7033 `(("python-click" ,python-click)))
7034 (synopsis "Utilities for multithreading in Click")
7035 (description "This package provides utilities for multithreading in Click
7037 (home-page "https://github.com/click-contrib/click-threading")
7038 (license license:expat)))
7040 (define-public python-click-log
7042 (name "python-click-log")
7046 (uri (pypi-uri "click-log" version))
7049 "1r1x85023cslb2pwldd089jjk573mk3w78cnashs77wrx7yz8fj9"))))
7050 (build-system python-build-system)
7052 `(("python-click" ,python-click)))
7053 (synopsis "Logging for click applications")
7054 (description "This package provides a Python library for logging Click
7056 (home-page "https://github.com/click-contrib/click-log")
7057 (license license:expat)))
7059 (define-public python-apipkg
7061 (name "python-apipkg")
7065 (uri (pypi-uri "apipkg" version))
7068 "1iks5701qnp3dlr3q1d9qm68y2plp2m029irhpz92a44psfkjf1f"))))
7069 (build-system python-build-system)
7071 `(("python-pytest" ,python-pytest)))
7072 (synopsis "Namespace control and lazy-import mechanism")
7073 (description "With apipkg you can control the exported namespace of a Python
7074 package and greatly reduce the number of imports for your users. It is a small
7075 pure Python module that works on virtually all Python versions.")
7076 (home-page "https://bitbucket.org/hpk42/apipkg")
7077 (license license:expat)))
7079 (define-public python2-apipkg
7080 (package-with-python2 python-apipkg))
7082 (define-public python-execnet
7084 (name "python-execnet")
7088 (uri (pypi-uri "execnet" version))
7091 "1rpk1vyclhg911p3hql0m0nrpq7q7mysxnaaw6vs29cpa6kx8vgn"))))
7092 (build-system python-build-system)
7094 `(;; 2 failed, 275 passed, 670 skipped, 4 xfailed
7095 ;; The two test failures are caused by the lack of an `ssh` executable.
7096 ;; The test suite can be run with pytest after the 'install' phase.
7099 `(("python-pytest" ,python-pytest)
7100 ("python-setuptools-scm" ,python-setuptools-scm)))
7102 `(("python-apipkg" ,python-apipkg)))
7103 (synopsis "Rapid multi-Python deployment")
7104 (description "Execnet provides a share-nothing model with
7105 channel-send/receive communication for distributing execution across many
7106 Python interpreters across version, platform and network barriers. It has a
7107 minimal and fast API targeting the following uses:
7109 @item distribute tasks to (many) local or remote CPUs
7110 @item write and deploy hybrid multi-process applications
7111 @item write scripts to administer multiple environments
7113 (home-page "http://codespeak.net/execnet/")
7114 (license license:expat)))
7116 (define-public python2-execnet
7117 (package-with-python2 python-execnet))
7119 (define-public python-icalendar
7121 (name "python-icalendar")
7125 (uri (pypi-uri "icalendar" version))
7128 "139y79y6ijl39m5bj771r43vpah9s4ly7d1k76la6hrx7l144ak8"))))
7129 (build-system python-build-system)
7131 `(("python-dateutil" ,python-dateutil)
7132 ("python-pytz" ,python-pytz)))
7133 (synopsis "Python library for parsing iCalendar files")
7134 (description "The icalendar package is a parser/generator of iCalendar
7135 files for use with Python.")
7136 (home-page "https://github.com/collective/icalendar")
7137 (license license:bsd-2)))
7139 (define-public python-sphinxcontrib-newsfeed
7141 (name "python-sphinxcontrib-newsfeed")
7145 (uri (pypi-uri "sphinxcontrib-newsfeed" version))
7148 "1d7gam3mn8v4in4p16yn3v10vps7nnaz6ilw99j4klij39dqd37p"))))
7149 (arguments '(#:tests? #f)) ; No tests.
7150 (build-system python-build-system)
7152 `(("python-sphinx" ,python-sphinx)))
7153 (synopsis "News Feed extension for Sphinx")
7154 (description "Sphinxcontrib-newsfeed is an extension for adding a simple
7155 Blog, News or Announcements section to a Sphinx website.")
7156 (home-page "https://bitbucket.org/prometheus/sphinxcontrib-newsfeed")
7157 (license license:bsd-2)))
7159 (define-public python-args
7161 (name "python-args")
7165 (uri (pypi-uri "args" version))
7168 "057qzi46h5dmxdqknsbrssn78lmqjlnm624iqdhrnpk26zcbi1d7"))))
7169 (build-system python-build-system)
7170 (home-page "https://github.com/kennethreitz/args")
7171 (synopsis "Command-line argument parser")
7173 "This library provides a Python module to parse command-line arguments.")
7174 (license license:bsd-3)))
7176 (define-public python2-args
7177 (package-with-python2 python-args))
7179 (define-public python-clint
7181 (name "python-clint")
7185 (uri (pypi-uri "clint" version))
7188 "1an5lkkqk1zha47198p42ji3m94xmzx1a03dn7866m87n4r4q8h5"))))
7189 (build-system python-build-system)
7192 (modify-phases %standard-phases
7195 (zero? (system* "py.test" "-v")))))))
7197 `(("python-pytest" ,python-pytest)))
7199 `(("python-args" ,python-args)))
7200 (home-page "https://github.com/kennethreitz/clint")
7201 (synopsis "Command-line interface tools")
7203 "Clint is a Python module filled with a set of tools for developing
7204 command-line applications, including tools for colored and indented
7205 output, progress bar display, and pipes.")
7206 (license license:isc)))
7208 (define-public python2-clint
7209 (package-with-python2 python-clint))
7211 (define-public python-astor
7213 (name "python-astor")
7217 (uri (pypi-uri "astor" version))
7220 "1fdafq5hkis1fxqlmhw0sn44zp2ar46nxhbc22cvwg7hsd8z5gsa"))))
7221 (build-system python-build-system)
7222 (home-page "https://github.com/berkerpeksag/astor")
7223 (synopsis "Read and write Python ASTs")
7225 "Astor is designed to allow easy manipulation of Python source via the
7226 Abstract Syntax Tree.")
7227 (license license:bsd-3)))
7229 (define-public python2-astor
7230 (package-with-python2 python-astor))
7232 (define-public python-rply
7234 (name "python-rply")
7238 (uri (pypi-uri "rply" version))
7241 "0lv428895zxsz43968qx0q9bimwqnfykndz4dpjbq515w2gvzhjh"))))
7242 (build-system python-build-system)
7244 `(("python-appdirs" ,python-appdirs)))
7245 (home-page "https://github.com/alex/rply")
7246 (synopsis "Parser generator for Python")
7248 "This package provides a pure Python based parser generator, that also
7249 works with RPython. It is a more-or-less direct port of David Bazzley's PLY,
7250 with a new public API, and RPython support.")
7251 (license license:bsd-3)))
7253 (define-public python2-rply
7254 (package-with-python2 python-rply))
7256 (define-public python-hy
7262 (uri (pypi-uri "hy" version))
7265 "19sfymaksx9jhksfnb15ahid46mzrhdfzz6yy2craz2qnzvpmky8"))))
7266 (build-system python-build-system)
7269 (modify-phases %standard-phases
7272 ;; Tests require write access to HOME.
7273 (setenv "HOME" "/tmp")
7274 (zero? (system* "nosetests")))))))
7276 `(("python-coverage" ,python-coverage)
7277 ("python-nose" ,python-nose)))
7279 `(("python-astor" ,python-astor)
7280 ("python-clint" ,python-clint)
7281 ("python-rply" ,python-rply)))
7282 (home-page "http://hylang.org/")
7283 (synopsis "Lisp frontend to Python")
7285 "Hy is a dialect of Lisp that's embedded in Python. Since Hy transforms
7286 its Lisp code into the Python Abstract Syntax Tree, you have the whole world of
7287 Python at your fingertips, in Lisp form.")
7288 (license license:expat)))
7290 (define-public python2-hy
7291 (package-with-python2 python-hy))
7293 (define-public python2-functools32
7295 (name "python2-functools32")
7300 (uri (pypi-uri "functools32" version))
7303 "0v8ya0b58x47wp216n1zamimv4iw57cxz3xxhzix52jkw3xks9gn"))))
7304 (build-system python-build-system)
7306 `(#:python ,python-2
7307 #:tests? #f)) ; no test target
7308 (home-page "https://github.com/MiCHiLU/python-functools32")
7310 "Backport of the functools module from Python 3.2.3")
7312 "This package is a backport of the @code{functools} module from Python
7313 3.2.3 for use with older versions of Python and PyPy.")
7314 (license license:expat)))
7316 (define-public python2-subprocess32
7318 (name "python2-subprocess32")
7322 (uri (pypi-uri "subprocess32" version))
7325 "14350dhhlhyz5gqzi3lihn9m6lvskx5mcb20srx1kgsk9i50li8y"))
7327 (search-patches "python2-subprocess32-disable-input-test.patch"))))
7328 (build-system python-build-system)
7330 `(#:python ,python-2
7331 ;; The test suite fails with Python > 2.7.13:
7332 ;; import test.support
7333 ;; ImportError: No module named support
7336 (modify-phases %standard-phases
7337 (add-after 'unpack 'patch-/bin/sh
7339 (substitute* '("subprocess32.py"
7340 "test_subprocess32.py")
7341 (("/bin/sh") (which "sh")))
7343 (home-page "https://github.com/google/python-subprocess32")
7344 (synopsis "Backport of the subprocess module from Python 3.2")
7346 "This is a backport of the @code{subprocess} standard library module
7347 from Python 3.2 and 3.3 for use on Python 2. It includes bugfixes and some
7348 new features. On POSIX systems it is guaranteed to be reliable when used
7349 in threaded applications. It includes timeout support from Python 3.3 but
7350 otherwise matches 3.2’s API.")
7351 (license license:psfl)))
7353 (define-public python2-futures
7355 (name "python2-futures")
7360 (uri (pypi-uri "futures" version))
7363 "1pw1z4329xvlabdpwqa6b7v2fxf7hl64m4cgr22ckbym8m8m4hh5"))))
7364 (build-system python-build-system)
7365 (arguments `(#:python ,python-2))
7366 (home-page "https://github.com/agronholm/pythonfutures")
7368 "Backport of the concurrent.futures package from Python 3.2")
7370 "The concurrent.futures module provides a high-level interface for
7371 asynchronously executing callables. This package backports the
7372 concurrent.futures package from Python 3.2")
7373 (license license:bsd-3)))
7375 (define-public python-promise
7377 (name "python-promise")
7382 (uri (pypi-uri "promise" version))
7385 "1k19ms8l3d5jzjh557rgkxb5sg4mqgfc315rn4hx1z3n8qq6lr3h"))))
7386 (build-system python-build-system)
7387 ;; Tests wants python-futures, which is a python2 only program, and
7388 ;; can't be found by python-promise at test time.
7389 (arguments `(#:tests? #f))
7390 (home-page "https://github.com/syrusakbary/promise")
7391 (synopsis "Promises/A+ implementation for Python")
7393 "Promises/A+ implementation for Python")
7394 (properties `((python2-variant . ,(delay python2-promise))))
7395 (license license:expat)))
7397 (define-public python2-promise
7398 (let ((promise (package-with-python2
7399 (strip-python2-variant python-promise))))
7400 (package (inherit promise)
7401 (arguments (substitute-keyword-arguments (package-arguments promise)
7404 `(("python2-futures" ,python2-futures)
7405 ("python2-pytest" ,python2-pytest)
7406 ,@(package-native-inputs promise))))))
7408 (define-public python-colorama
7410 (name "python-colorama")
7415 (uri (pypi-uri "colorama" version))
7418 "1wd1szk0z3073ghx26ynw43gnc140ibln1safgsis6s6z3s25ss8"))))
7419 (build-system python-build-system)
7420 (synopsis "Colored terminal text rendering for Python")
7421 (description "Colorama is a Python library for rendering colored terminal
7423 (home-page "https://pypi.python.org/pypi/colorama")
7424 (license license:bsd-3)))
7426 (define-public python2-colorama
7427 (package-with-python2 python-colorama))
7429 (define-public python-rsa
7436 (uri (pypi-uri "rsa" version))
7439 "1dcxvszbikgzh99ybdc7jq0zb9wspy2ds8z9mjsqiyv3q884xpr5"))))
7440 (build-system python-build-system)
7442 `(("python-pyasn1" ,python-pyasn1)))
7443 (synopsis "Pure-Python RSA implementation")
7444 (description "Python-RSA is a pure-Python RSA implementation. It supports
7445 encryption and decryption, signing and verifying signatures, and key
7446 generation according to PKCS#1 version 1.5. It can be used as a Python
7447 library as well as on the command line.")
7448 (home-page "https://stuvel.eu/rsa")
7449 (license license:asl2.0)))
7451 (define-public python2-rsa
7452 (package-with-python2 python-rsa))
7454 (define-public python-pluggy
7456 (name "python-pluggy")
7461 (uri (pypi-uri "pluggy" version))
7464 "18qfzfm40bgx672lkg8q9x5hdh76n7vax99aank7vh2nw21wg70m"))))
7465 (build-system python-build-system)
7466 (synopsis "Plugin and hook calling mechanism for Python")
7467 (description "Pluggy is an extraction of the plugin manager as used by
7468 Pytest but stripped of Pytest specific details.")
7469 (home-page "https://pypi.python.org/pypi/pluggy")
7470 (license license:expat)))
7472 (define-public python2-pluggy
7473 (package-with-python2 python-pluggy))
7475 (define-public python-tox
7482 (uri (pypi-uri "tox" version))
7485 "1drp6mwm8wdypjym15ia8lwjxbhcksb9vzxg4ay5dh4ji57by2ny"))))
7486 (build-system python-build-system)
7488 ;; FIXME: Tests require pytest-timeout, which itself requires
7489 ;; pytest>=2.8.0 for installation.
7492 `(("python-pluggy" ,python-pluggy) ; >=0.3.0,<0.4.0
7493 ("python-py" ,python-py)
7494 ("python-virtualenv" ,python-virtualenv)))
7496 `(; FIXME: Missing: ("python-pytest-timeout" ,python-pytest-timeout)
7497 ("python-pytest" ,python-pytest) ; >= 2.3.5
7498 ("python-setuptools-scm" ,python-setuptools-scm)))
7499 (home-page "http://tox.testrun.org/")
7500 (synopsis "Virtualenv-based automation of test activities")
7501 (description "Tox is a generic virtualenv management and test command line
7502 tool. It can be used to check that a package installs correctly with
7503 different Python versions and interpreters, or run tests in each type of
7504 supported environment, or act as a frontend to continuous integration
7506 (license license:expat)))
7508 (define-public python2-tox
7509 (package-with-python2 python-tox))
7511 (define-public python-jmespath
7513 (name "python-jmespath")
7518 (uri (pypi-uri "jmespath" version))
7521 "0r7wc7fsxmlwzxx9j1j7rms06c6xs6d4sysirdhz1jk2mb4x90ba"))))
7522 (build-system python-build-system)
7524 `(("python-nose" ,python-nose)))
7525 (synopsis "JSON Matching Expressions")
7526 (description "JMESPath (pronounced “james path”) is a Python library that
7527 allows one to declaratively specify how to extract elements from a JSON
7529 (home-page "https://github.com/jmespath/jmespath.py")
7530 (license license:expat)))
7532 (define-public python2-jmespath
7533 (package-with-python2 python-jmespath))
7535 (define-public python-botocore
7537 (name "python-botocore")
7542 (uri (pypi-uri "botocore" version))
7545 "12cqpbnz3vfv41mp9admvciw7bc7hz57sjpqs2bxaw9wnfmbw5lg"))))
7546 (build-system python-build-system)
7548 ;; FIXME: Many tests are failing.
7551 `(("python-dateutil" ,python-dateutil)
7552 ("python-docutils" ,python-docutils)
7553 ("python-jmespath" ,python-jmespath)))
7555 `(("python-mock" ,python-mock)
7556 ("python-nose" ,python-nose)
7558 ("python-tox" ,python-tox)
7559 ("python-wheel" ,python-wheel)))
7560 (home-page "https://github.com/boto/botocore")
7561 (synopsis "Low-level interface to AWS")
7562 (description "Botocore is a Python library that provides a low-level
7563 interface to the Amazon Web Services (AWS) API.")
7564 (license license:asl2.0)))
7566 (define-public python2-botocore
7567 (package-with-python2 python-botocore))
7569 (define-public python-xdo
7576 "http://http.debian.net/debian/pool/main/p/python-xdo/"
7577 "python-xdo_" version ".orig.tar.gz"))
7580 "1vqh1n5yy5dhnq312kwrl90fnck4v26is3lq3lxdvcn60vv19da0"))))
7581 (build-system python-build-system)
7584 (modify-phases %standard-phases
7585 (add-before 'install 'patch-libxdo-path
7586 ;; Hardcode the path of dynamically loaded libxdo library.
7587 (lambda* (#:key inputs #:allow-other-keys)
7588 (let ((libxdo (string-append
7589 (assoc-ref inputs "xdotool")
7591 (substitute* "xdo/_xdo.py"
7592 (("find_library\\(\"xdo\"\\)")
7593 (simple-format #f "\"~a\"" libxdo)))
7595 #:tests? #f)) ; no tests provided
7597 `(("python-six" ,python-six)))
7599 `(("xdotool" ,xdotool)
7600 ("libX11" ,libx11)))
7601 (home-page "https://tracker.debian.org/pkg/python-xdo")
7602 (synopsis "Python library for simulating X11 keyboard/mouse input")
7603 (description "Provides bindings to libxdo for manipulating X11 via simulated
7604 input. (Note that this is mostly a legacy library; you may wish to look at
7605 python-xdo for newer bindings.)")
7606 (license license:bsd-3)))
7608 (define-public python2-xdo
7609 (package-with-python2 python-xdo))
7611 (define-public python-mako
7613 (name "python-mako")
7618 (uri (pypi-uri "Mako" version))
7621 "03dyxgjknp4ffsv7vwfd28l5bbpzi0ylp20543wpg3iahyyrwma8"))))
7622 (build-system python-build-system)
7624 `(("python-markupsafe" ,python-markupsafe)))
7626 `(("python-mock" ,python-mock)
7627 ("python-nose" ,python-nose)
7628 ("python-pytest" ,python-pytest)))
7629 (home-page "http://www.makotemplates.org/")
7630 (synopsis "Templating language for Python")
7631 (description "Mako is a templating language for Python that compiles
7632 templates into Python modules.")
7633 (license license:expat)))
7635 (define-public python2-mako
7636 (package-with-python2 python-mako))
7638 (define-public python-waitress
7640 (name "python-waitress")
7645 (uri (pypi-uri "waitress" version))
7646 (patches (search-patches "python-waitress-fix-tests.patch"))
7649 "1a85gyji0kajc3p0s1pwwfm06w4wfxjkvvl4rnrz3h164kbd6g6k"))))
7650 (build-system python-build-system)
7651 (home-page "https://github.com/Pylons/waitress")
7652 (synopsis "Waitress WSGI server")
7653 (description "Waitress is meant to be a production-quality pure-Python WSGI
7654 server with very acceptable performance.")
7655 (license license:zpl2.1)))
7657 (define-public python2-waitress
7658 (package-with-python2 python-waitress))
7660 (define-public python-pyquery
7662 (name "python-pyquery")
7667 (uri (pypi-uri "pyquery" version))
7670 "1xia20wm0vx5dk85kcwgh13bylz8qh47ffjxssd2586r60xi783a"))))
7671 (build-system python-build-system)
7673 `(("python-webob" ,python-webob)
7674 ("python-webtest" ,python-webtest)))
7676 `(("python-lxml" ,python-lxml)
7677 ("python-cssselect" ,python-cssselect)))
7678 (home-page "https://github.com/gawel/pyquery")
7679 (synopsis "Make jQuery-like queries on xml documents")
7680 (description "pyquery allows you to make jQuery queries on xml documents.
7681 The API is as much as possible the similar to jQuery. pyquery uses lxml for
7682 fast xml and html manipulation.")
7683 (license license:bsd-3)))
7685 (define-public python2-pyquery
7686 (package-with-python2 python-pyquery))
7688 (define-public python-anyjson
7690 (name "python-anyjson")
7695 (uri (pypi-uri "anyjson" version))
7698 "1fjph4alvcscsl5d4b6qpv1yh31jy05jxi1l0xff7lws7j32v09p"))))
7699 (build-system python-build-system)
7701 `(;; We could possibly get tests working, but on Python 3 it's not so easy.
7702 ;; Very strangely, 2to3 is run *during setup.py install* (or bdist, or
7703 ;; whatever) so this transformation needs to be done before the tests
7704 ;; can be run. Maybe we could add a build step to transform beforehand
7705 ;; but it could be annoying/difficult.
7706 ;; We can enable tests for the Python 2 version, though, and do below.
7708 (home-page "https://bitbucket.org/runeh/anyjson/")
7710 "Wraps best available JSON implementation in a common interface")
7712 "Anyjson loads whichever is the fastest JSON module installed
7713 and provides a uniform API regardless of which JSON implementation is used.")
7714 (license license:bsd-3)
7715 (properties `((python2-variant . ,(delay python2-anyjson))))))
7717 (define-public python2-anyjson
7718 (let ((anyjson (package-with-python2
7719 (strip-python2-variant python-anyjson))))
7722 (arguments `(;; Unlike the python 3 variant, we do run tests. See above!
7724 ,@(package-arguments anyjson)))
7725 (native-inputs `(("python2-nose" ,python2-nose))))))
7727 (define-public python-amqp
7729 (name "python-amqp")
7734 (uri (pypi-uri "amqp" version))
7737 "06n6q0kxhjnbfz3vn8x9yz09lwmn1xi9d6wxp31h5jbks0b4vsid"))))
7738 (build-system python-build-system)
7740 `(("python-nose" ,python-nose)
7741 ("python-mock" ,python-mock)))
7742 (home-page "https://github.com/celery/py-amqp")
7744 "Low-level AMQP client for Python (fork of amqplib)")
7746 "This is a fork of amqplib which was originally written by Barry Pederson.
7747 It is maintained by the Celery project, and used by kombu as a pure python
7748 alternative when librabbitmq is not available.")
7749 (license license:lgpl2.1+)
7750 (properties `((python2-variant . ,(delay python2-amqp))))))
7752 (define-public python2-amqp
7753 (let ((amqp (package-with-python2
7754 (strip-python2-variant python-amqp))))
7757 (arguments `(;; Tries to run coverage tests with nose-cover3, which seems
7758 ;; unmaintained. Weirdly, does not do this on the python 3
7761 ,@(package-arguments amqp))))))
7763 (define-public python-txamqp
7765 (name "python-txamqp")
7770 (uri (pypi-uri "txAMQP" version))
7773 "1r43a66dd547mz40ikymm8y3d480cidy560fj81qc0jk4lncgmmr"))))
7774 (build-system python-build-system)
7776 `(("python-six" ,python-six)
7777 ("python-twisted" ,python-twisted)))
7778 (home-page "https://github.com/txamqp/txamqp")
7779 (synopsis "Communicate with AMQP peers and brokers using Twisted")
7781 "This package provides a Python library for communicating with AMQP peers
7782 and brokers using the asynchronous networking framework Twisted. It contains
7783 all the necessary code to connect, send and receive messages to/from an
7784 AMQP-compliant peer or broker (Qpid, OpenAMQ, RabbitMQ) using Twisted. It
7785 also includes support for using Thrift RPC over AMQP in Twisted
7787 (license license:asl2.0)))
7789 (define-public python2-txamqp
7790 (package-with-python2 python-txamqp))
7792 (define-public python-kombu
7794 (name "python-kombu")
7799 (uri (pypi-uri "kombu" version))
7802 "0l16chb314gpq2v7fh94a22c30lcv6w3ylmhsa60bldlcq6a0r70"))))
7803 (build-system python-build-system)
7805 `(("python-mock" ,python-mock)
7806 ("python-nose" ,python-nose)))
7808 `(("python-anyjson" ,python-anyjson)
7809 ("python-amqp" ,python-amqp)
7810 ("python-redis" ,python-redis)))
7811 (home-page "http://kombu.readthedocs.org")
7812 (synopsis "Message passing library for Python")
7813 (description "The aim of Kombu is to make messaging in Python as easy as
7814 possible by providing an idiomatic high-level interface for the AMQ protocol,
7815 and also provide proven and tested solutions to common messaging problems.
7816 AMQP is the Advanced Message Queuing Protocol, an open standard protocol for
7817 message orientation, queuing, routing, reliability and security, for which the
7818 RabbitMQ messaging server is the most popular implementation.")
7819 (license license:bsd-3)
7820 (properties `((python2-variant . ,(delay python2-kombu))))))
7822 (define-public python2-kombu
7823 (let ((kombu (package-with-python2
7824 (strip-python2-variant python-kombu))))
7827 (arguments `(;; FIXME: 'TestTransport.test_del_sync' fails on python2.
7828 ;; It works fine on the python3 variant.
7830 ,@(package-arguments kombu)))
7831 (native-inputs `(("python2-unittest2" ,python2-unittest2)
7832 ,@(package-native-inputs kombu))))))
7834 (define-public python-billiard
7836 (name "python-billiard")
7837 (version "3.3.0.23")
7841 (uri (pypi-uri "billiard" version))
7844 "02wxsc6bhqvzh8j6w758kvgqbnj14l796mvmrcms8fgfamd2lak9"))))
7845 (build-system python-build-system)
7847 `(("python-nose" ,python-nose)))
7848 (home-page "https://github.com/celery/billiard")
7850 "Python multiprocessing fork with improvements and bugfixes")
7852 "Billiard is a fork of the Python 2.7 multiprocessing package. The
7853 multiprocessing package itself is a renamed and updated version of R Oudkerk's
7854 pyprocessing package. This standalone variant is intended to be compatible with
7855 Python 2.4 and 2.5, and will draw its fixes/improvements from python-trunk.")
7856 (license license:bsd-3)
7857 (properties `((python2-variant . ,(delay python2-billiard))))))
7859 (define-public python2-billiard
7860 (let ((billiard (package-with-python2
7861 (strip-python2-variant python-billiard))))
7864 (native-inputs `(("python2-unittest2" ,python2-unittest2)
7865 ("python2-mock" ,python2-mock)
7866 ,@(package-native-inputs billiard))))))
7868 (define-public python-celery
7870 (name "python-celery")
7875 (uri (pypi-uri "celery" version))
7878 "0yh2prhdnx2dgkb67a5drj12hh2zvzx5f611p7mqqg01ydghif4r"))))
7879 (build-system python-build-system)
7882 (modify-phases %standard-phases
7883 ;; These tests break with Python 3.5:
7884 ;; https://github.com/celery/celery/issues/2897#issuecomment-253066295
7888 (system* "nosetests" "--exclude=^test_safe_to_remove.*")))))))
7890 `(("python-nose" ,python-nose)))
7892 `(("python-pytz" ,python-pytz)
7893 ("python-billiard" ,python-billiard)
7894 ("python-kombu" ,python-kombu)))
7895 (home-page "http://celeryproject.org")
7896 (synopsis "Distributed Task Queue")
7897 (description "Celery is an asynchronous task queue/job queue based on
7898 distributed message passing. It is focused on real-time operation, but
7899 supports scheduling as well. The execution units, called tasks, are executed
7900 concurrently on a single or more worker servers using multiprocessing,
7901 Eventlet, or gevent. Tasks can execute asynchronously (in the background) or
7902 synchronously (wait until ready).")
7903 (license license:bsd-3)
7904 (properties `((python2-variant . ,(delay python2-celery))))))
7906 (define-public python2-celery
7907 (let ((celery (package-with-python2
7908 (strip-python2-variant python-celery))))
7911 (native-inputs `(("python2-unittest2" ,python2-unittest2)
7912 ("python2-mock" ,python2-mock)
7913 ,@(package-native-inputs celery))))))
7915 (define-public python-translitcodec
7917 (name "python-translitcodec")
7922 (uri (pypi-uri "translitcodec" version))
7925 "10x6pvblkzky1zhjs8nmx64nb9jdzxad4bxhq4iwv0j4z2aqjnki"))))
7926 (build-system python-build-system)
7928 `(#:tests? #f)) ; no tests provided
7930 "https://github.com/claudep/translitcodec")
7932 "Unicode to 8-bit charset transliteration codec")
7934 "This package contains codecs for transliterating ISO 10646 texts into
7935 best-effort representations using smaller coded character sets (ASCII,
7937 (license license:expat)))
7939 (define-public python2-translitcodec
7940 (package-with-python2 python-translitcodec))
7942 (define-public python-editor
7944 (name "python-editor")
7949 (uri (pypi-uri "python-editor" version))
7952 "1ypnpgvzpkbwsg4rdvy4sy51j28b5xq9v8pnkwxncn07vqz06p7n"))))
7953 (build-system python-build-system)
7955 "https://github.com/fmoo/python-editor")
7957 "Programmatically open an editor, capture the result")
7959 "python-editor is a library that provides the editor module for
7960 programmatically interfacing with your system's $EDITOR.")
7961 (license license:asl2.0)))
7963 (define-public python2-editor
7964 (package-with-python2 python-editor))
7966 (define-public python-sphinxcontrib-programoutput
7968 (name "python-sphinxcontrib-programoutput")
7972 (uri (pypi-uri "sphinxcontrib-programoutput" version))
7975 "153hhnlbx4688zj9wd64819ps5znc2jlyp5crkgzvn5hxgy99vpx"))))
7976 (build-system python-build-system)
7978 ;; FIXME: Many tests are failing and the upstream is gone.
7981 `(("python-sphinx" ,python-sphinx)))
7982 (synopsis "Sphinx extension to include program output")
7983 (description "A Sphinx extension to literally insert the output of arbitrary
7984 commands into documents, helping you to keep your command examples up to date.")
7985 (home-page "https://github.com/lunaryorn/sphinxcontrib-programoutput")
7986 (license license:bsd-2)))
7988 (define-public python2-sphinxcontrib-programoutput
7989 (package-with-python2 python-sphinxcontrib-programoutput))
7991 (define-public python-sphinx-repoze-autointerface
7993 (name "python-sphinx-repoze-autointerface")
7997 (uri (pypi-uri "repoze.sphinx.autointerface" version))
8000 "08ycivzf7bh4a1zcyp31hbyqs1b2c9r26raa3vxjwwmbfqr3iw4f"))))
8001 (build-system python-build-system)
8002 (arguments '(#:tests? #f)) ; No tests.
8004 `(("python-sphinx" ,python-sphinx)
8005 ("python-zope-interface" ,python-zope-interface)))
8006 (synopsis "Auto-generate Sphinx API docs from Zope interfaces")
8007 (description "This package defines an extension for the Sphinx documentation
8008 system. The extension allows generation of API documentation by
8009 introspection of @code{zope.interface} instances in code.")
8010 (home-page "https://github.com/repoze/repoze.sphinx.autointerface")
8011 (license license:repoze)))
8013 (define-public python2-sphinx-repoze-autointerface
8014 (package-with-python2 python-sphinx-repoze-autointerface))
8016 (define-public python-vobject
8018 (name "python-vobject")
8022 (uri (pypi-uri "vobject" version))
8025 "0hqjgf3ay1m5w1c0k00g5yfpdz1zni5qnr5rh9b8fg9hjvhwlmhg"))))
8026 (build-system python-build-system)
8028 '(;; The test suite relies on some non-portable Windows interfaces.
8031 `(("python-dateutil" ,python-dateutil)
8032 ("python-pyicu" ,python-pyicu)))
8033 (synopsis "Parse and generate vCard and vCalendar files")
8034 (description "Vobject is intended to be a full featured Python package for
8035 parsing and generating vCard and vCalendar files. Currently, iCalendar files
8036 are supported and well tested. vCard 3.0 files are supported, and all data
8037 should be imported, but only a few components are understood in a sophisticated
8039 (home-page "http://eventable.github.io/vobject/")
8040 (license license:asl2.0)))
8042 (define-public python2-vobject
8043 (package-with-python2 python-vobject))
8045 (define-public python-munkres
8047 (name "python-munkres")
8051 (uri (pypi-uri "munkres" version))
8054 "0mbspx4zv8id4x6pim6ybsa1xh96qwpbqj7skbqz4c9c9nf1lpqq"))))
8055 (build-system python-build-system)
8057 '(#:tests? #f)) ; no test suite
8058 (home-page "http://software.clapper.org/munkres/")
8059 (synopsis "Implementation of the Munkres algorithm")
8060 (description "The Munkres module provides an implementation of the Munkres
8061 algorithm (also called the Hungarian algorithm or the Kuhn-Munkres algorithm),
8062 useful for solving the Assignment Problem.")
8063 (license license:bsd-3)))
8065 (define-public python2-munkres
8066 (package-with-python2 python-munkres))
8068 (define-public python-whoosh
8070 (name "python-whoosh")
8075 (uri (pypi-uri "Whoosh" version))
8078 "10qsqdjpbc85fykc1vgcs8xwbgn4l2l52c8d83xf1q59pwyn79bw"))))
8079 (build-system python-build-system)
8081 `(("python-pytest" ,python-pytest)))
8082 (home-page "https://bitbucket.org/mchaput/whoosh")
8083 (synopsis "Full text indexing, search, and spell checking library")
8085 "Whoosh is a fast, pure-Python full text indexing, search, and spell
8087 (license license:bsd-2)))
8089 (define-public python2-whoosh
8090 (let ((whoosh (package-with-python2 (strip-python2-variant python-whoosh))))
8091 (package (inherit whoosh)
8093 `(("python2-backport-ssl-match-hostname"
8094 ,python2-backport-ssl-match-hostname)
8095 ,@(package-propagated-inputs whoosh))))))
8097 (define-public python-pathlib
8099 (name "python-pathlib")
8103 (uri (pypi-uri "pathlib" version))
8106 "17zajiw4mjbkkv6ahp3xf025qglkj0805m9s41c45zryzj6p2h39"))))
8107 (build-system python-build-system)
8108 ;; The tests depend on the internal "test" module, which does not provide
8109 ;; a stable interface.
8110 (arguments `(#:tests? #f))
8111 (home-page "https://pathlib.readthedocs.org/")
8112 (synopsis "Object-oriented file system paths")
8113 (description "Pathlib offers a set of classes to handle file system paths.
8114 It offers the following advantages over using string objects:
8117 @item No more cumbersome use of os and os.path functions. Everything can
8118 be done easily through operators, attribute accesses, and method calls.
8119 @item Embodies the semantics of different path types. For example,
8120 comparing Windows paths ignores casing.
8121 @item Well-defined semantics, eliminating any inconsistencies or
8122 ambiguities (forward vs. backward slashes, etc.).
8125 Note: In Python 3.4, pathlib is now part of the standard library. For other
8126 Python versions please consider python-pathlib2 instead, which tracks the
8127 standard library module. This module (python-pathlib) isn't maintained
8129 (license license:expat)))
8131 (define-public python2-pathlib
8132 (package-with-python2 python-pathlib))
8134 (define-public python2-pathlib2
8136 (name "python2-pathlib2")
8140 (uri (pypi-uri "pathlib2" version))
8143 "1cx5gs2v9j2vnzmcrbq5l8fq2mwrr1h6pyf1sjdji2w1bavm09fk"))))
8144 (build-system python-build-system)
8145 ;; We only need the the Python 2 variant, since for Python 3 our minimum
8146 ;; version is 3.4 which already includes this package as part of the
8147 ;; standard library.
8149 `(#:python ,python-2))
8151 `(("python2-scandir" ,python2-scandir)
8152 ("python2-six" ,python2-six)))
8153 (home-page "https://pypi.python.org/pypi/pathlib2/")
8154 (synopsis "Object-oriented file system paths - backport of standard
8156 (description "The goal of pathlib2 is to provide a backport of standard
8157 pathlib module which tracks the standard library module, so all the newest
8158 features of the standard pathlib can be used also on older Python versions.
8160 Pathlib offers a set of classes to handle file system paths. It offers the
8161 following advantages over using string objects:
8164 @item No more cumbersome use of os and os.path functions. Everything can
8165 be done easily through operators, attribute accesses, and method calls.
8166 @item Embodies the semantics of different path types. For example,
8167 comparing Windows paths ignores casing.
8168 @item Well-defined semantics, eliminating any inconsistencies or
8169 ambiguities (forward vs. backward slashes, etc.).
8171 (license license:expat)))
8173 (define-public python-jellyfish
8175 (name "python-jellyfish")
8179 (uri (pypi-uri "jellyfish" version))
8182 "1j9rplb16ba2prjj6mip46z0w9pnhnqpwgiwi0x93vnas14rlyl8"))))
8183 (build-system python-build-system)
8185 `(("python-pytest" ,python-pytest)))
8186 (home-page "https://github.com/jamesturk/jellyfish")
8187 (synopsis "Approximate and phonetic matching of strings")
8188 (description "Jellyfish uses a variety of string comparison and phonetic
8189 encoding algorithms to do fuzzy string matching.")
8190 (license license:bsd-2)
8191 (properties `((python2-variant . ,(delay python2-jellyfish))))))
8193 (define-public python2-jellyfish
8194 (let ((jellyfish (package-with-python2
8195 (strip-python2-variant python-jellyfish))))
8196 (package (inherit jellyfish)
8197 (native-inputs `(("python2-unicodecsv" ,python2-unicodecsv)
8198 ,@(package-native-inputs jellyfish))))))
8200 (define-public python2-unicodecsv
8202 (name "python2-unicodecsv")
8206 ;; The test suite is not included in the PyPi release.
8207 ;; https://github.com/jdunck/python-unicodecsv/issues/19
8208 (uri (string-append "https://github.com/jdunck/python-unicodecsv/"
8209 "archive/" version ".tar.gz"))
8210 (file-name (string-append name "-" version ".tar.gz"))
8213 "087nqanfcyp6mlfbbr5lva5f3w6iz1bybls9xlrb8icmc474wh4w"))))
8214 (build-system python-build-system)
8216 `(;; It supports Python 3, but Python 3 can already do Unicode CSV.
8217 #:python ,python-2))
8219 `(("python2-unittest2" ,python2-unittest2)))
8220 (home-page "https://github.com/jdunck/python-unicodecsv")
8221 (synopsis "Unicode CSV module for Python 2")
8222 (description "Unicodecsv is a drop-in replacement for Python 2.7's CSV
8223 module, adding support for Unicode strings.")
8224 (license license:bsd-2)))
8226 (define-public python-rarfile
8228 (name "python-rarfile")
8232 (uri (pypi-uri "rarfile" version))
8235 "0qfad483kcbga0bn4qmcz953xjk16r52fahiy46zzn56v80y89ra"))))
8236 (build-system python-build-system)
8239 (modify-phases %standard-phases
8241 ;; Many tests fail, but the installation proceeds.
8242 (lambda _ (zero? (system* "make" "-C" "test" "test")))))))
8244 `(("which" ,which))) ; required for tests
8246 `(("libarchive" ,libarchive)))
8247 (home-page "https://github.com/markokr/rarfile")
8248 (synopsis "RAR archive reader for Python")
8249 (description "This is Python module for RAR archive reading. The interface
8250 is made as zipfile like as possible.")
8251 (license license:isc)))
8253 (define-public python2-rarfile
8254 (package-with-python2 python-rarfile))
8256 (define-public python-magic
8258 (name "python-magic")
8263 (uri (pypi-uri "python-magic" version))
8266 "1mgwig9pnzgkf86q9ji9pnc99bngms15lfszq5rgqb9db07mqxpk"))
8267 (file-name (string-append name "-" version "-checkout"))))
8268 (build-system python-build-system)
8270 ;; The tests are unreliable, so don't run them. The tests fail
8271 ;; under Python3 because they were written for Python2 and
8272 ;; contain import statements that do not work in Python3. One of
8273 ;; the tests fails under Python2 because its assertions are
8274 ;; overly stringent; it relies on comparing output strings which
8275 ;; are brittle and can change depending on the version of
8276 ;; libmagic being used and the system on which the test is
8277 ;; running. In my case, under GuixSD 0.10.0, only one test
8278 ;; failed, and it seems to have failed only because the version
8279 ;; of libmagic that is packaged in Guix outputs a slightly
8280 ;; different (but not wrong) string than the one that the test
8283 #:phases (modify-phases %standard-phases
8284 ;; Replace a specific method call with a hard-coded
8285 ;; path to the necessary libmagic.so file in the
8286 ;; store. If we don't do this, then the method call
8287 ;; will fail to find the libmagic.so file, which in
8288 ;; turn will cause any application using
8289 ;; python-magic to fail.
8290 (add-before 'build 'hard-code-path-to-libmagic
8291 (lambda* (#:key inputs #:allow-other-keys)
8292 (let ((file (assoc-ref inputs "file")))
8293 (substitute* "magic.py"
8294 (("ctypes.util.find_library\\('magic'\\)")
8295 (string-append "'" file "/lib/libmagic.so'")))
8297 (add-before 'install 'disable-egg-compression
8299 (let ((port (open-file "setup.cfg" "a")))
8300 (display "\n[easy_install]\nzip_ok = 0\n"
8305 ;; python-magic needs to be able to find libmagic.so.
8308 "https://github.com/ahupp/python-magic")
8310 "File type identification using libmagic")
8312 "This module uses ctypes to access the libmagic file type
8313 identification library. It makes use of the local magic database and
8314 supports both textual and MIME-type output. Note that this module and
8315 the python-file module both provide a \"magic.py\" file; these two
8316 modules, which are different and were developed separately, both serve
8317 the same purpose: to provide Python bindings for libmagic.")
8318 (license license:expat)))
8320 (define-public python2-magic
8321 (package-with-python2 python-magic))
8323 (define-public python2-s3cmd
8325 (name "python2-s3cmd")
8330 (uri (string-append "mirror://sourceforge/s3tools/s3cmd/" version "/"
8331 "s3cmd-" version ".tar.gz"))
8334 "0ki1rzhm5icvi9ry5jswi4b22yqwyj0d2wsqsgilwx6qhi7pjxa6"))))
8335 (build-system python-build-system)
8337 ;; s3cmd is written for python2 only and contains no tests.
8338 `(#:python ,python-2
8341 `(("python2-dateutil" ,python2-dateutil)
8342 ;; The python-file package also provides a magic.py module.
8343 ;; This is an unfortunate state of affairs; however, s3cmd
8344 ;; fails to install if it cannot find specifically the
8345 ;; python-magic package. Thus we include it, instead of using
8346 ;; python-file. Ironically, s3cmd sometimes works better
8347 ;; without libmagic bindings at all:
8348 ;; https://github.com/s3tools/s3cmd/issues/198
8349 ("python2-magic" ,python2-magic)))
8350 (home-page "http://s3tools.org/s3cmd")
8351 (synopsis "Command line tool for S3-compatible storage services")
8353 "S3cmd is a command line tool for uploading, retrieving and managing data
8354 in storage services that are compatible with the Amazon Simple Storage
8355 Service (S3) protocol, including S3 itself. It supports rsync-like backup,
8356 GnuPG encryption, and more. It also supports management of Amazon's
8357 CloudFront content delivery network.")
8358 (license license:gpl2+)))
8360 (define-public python-pkgconfig
8362 (name "python-pkgconfig")
8367 (uri (pypi-uri "pkgconfig" version))
8370 "1pw0kmvc57sjmaxi6c54fqsnihqj6hvhc9y1vaz36axafzqam7bh"))))
8371 (build-system python-build-system)
8373 `(("python-nose" ,python-nose)))
8375 `(("pkg-config" ,pkg-config)))
8377 `(;; Tests fail with "ValueError: _type_ 'v' not supported" on Python 3,
8378 ;; and on Python 2 they need the dl module deprecated since Python 2.6.
8380 ;; Hard-code the path to pkg-config.
8382 (modify-phases %standard-phases
8386 (substitute* "pkgconfig/pkgconfig.py"
8387 (("cmd = 'pkg-config")
8388 (string-append "cmd = '" (which "pkg-config"))))
8390 (home-page "https://github.com/matze/pkgconfig")
8391 (synopsis "Python interface for pkg-config")
8392 (description "This module provides a Python interface to pkg-config. It
8393 can be used to find all pkg-config packages, check if a package exists,
8394 check if a package meets certain version requirements, query CFLAGS and
8395 LDFLAGS and parse the output to build extensions with setup.py.")
8396 (license license:expat)))
8398 (define-public python2-pkgconfig
8399 (package-with-python2 python-pkgconfig))
8401 (define-public python-bz2file
8403 (name "python-bz2file")
8408 (uri (pypi-uri "bz2file" version))
8411 "126s53fkpx04f33a829yqqk8fj4png3qwg4m66cvlmhmwc8zihb4"))))
8412 (build-system python-build-system)
8414 `(#:tests? #f)) ; Tests use deprecated python modules.
8415 (home-page "https://github.com/nvawda/bz2file")
8416 (synopsis "Read and write bzip2-compressed files")
8418 "Bz2file is a Python library for reading and writing bzip2-compressed
8419 files. It contains a drop-in replacement for the I/O interface in the
8420 standard library's @code{bz2} module, including features from the latest
8421 development version of CPython that are not available in older releases.")
8422 (license license:asl2.0)
8423 (properties `((python2-variant . ,(delay python2-bz2file))))))
8425 (define-public python2-bz2file
8426 (let ((base (package-with-python2
8427 (strip-python2-variant python-bz2file))))
8431 `(#:python ,python-2
8433 (modify-phases %standard-phases
8434 ;; 'python setup.py test' does not work as of 0.98.
8435 ;; There is only the one test file, so we run it directly.
8437 (lambda _ (zero? (system* "python"
8438 "test_bz2file.py"))))))))))
8440 (define-public python-future
8442 (name "python-future")
8447 (uri (pypi-uri "future" version))
8450 "1nzy1k4m9966sikp0qka7lirh8sqrsyainyf8rk97db7nwdfv773"))))
8451 (build-system python-build-system)
8452 ;; Many tests connect to the network or are otherwise flawed.
8453 ;; https://github.com/PythonCharmers/python-future/issues/210
8456 (home-page "http://python-future.org")
8457 (synopsis "Single-source support for Python 3 and 2")
8459 "@code{python-future} is the missing compatibility layer between Python 2 and
8460 Python 3. It allows you to use a single, clean Python 3.x-compatible codebase
8461 to support both Python 2 and Python 3 with minimal overhead.")
8462 (license license:expat)))
8464 (define-public python2-future
8465 (package-with-python2 python-future))
8467 (define-public python-cysignals
8469 (name "python-cysignals")
8474 (uri (pypi-uri "cysignals" version ".tar.bz2"))
8477 "14cbyd9znlz6cxy1s3g6v6dv5jj45hn27pywkidd9b1zanaysqc6"))))
8478 (build-system python-build-system)
8480 `(("python-cython" ,python-cython)
8481 ("python-sphinx" ,python-sphinx)))
8483 `(("pari-gp" ,pari-gp)))
8485 `(#:modules ((guix build python-build-system)
8486 ((guix build gnu-build-system) #:prefix gnu:)
8488 ;; FIXME: Tests are executed after installation and currently fail
8489 ;; when not installing into standard locations; the author is working
8493 (modify-phases %standard-phases
8496 (assoc-ref gnu:%standard-phases 'configure)))))
8498 "https://github.com/sagemath/cysignals")
8500 "Handling of interrupts and signals for Cython")
8502 "The cysignals package provides mechanisms to handle interrupts (and
8503 other signals and errors) in Cython code, using two related approaches,
8504 for mixed Cython/Python code or external C libraries and pure Cython code,
8506 (license license:lgpl3+)))
8508 (define-public python2-cysignals
8509 (package-with-python2 python-cysignals))
8511 (define-public python2-shedskin
8513 (name "python2-shedskin")
8518 (uri (string-append "https://github.com/shedskin/shedskin/"
8519 "releases/download/v" version
8520 "/shedskin-" version ".tgz"))
8523 "0nzwrzgw1ga8rw6f0ryq7zr9kkiavd1cqz5hzxkcbicl1dk7kz41"))))
8524 (build-system python-build-system)
8526 `(#:python ,python-2
8527 #:phases (modify-phases %standard-phases
8528 (add-after 'unpack 'fix-resulting-include-libs
8529 (lambda* (#:key inputs #:allow-other-keys)
8530 (let ((libgc (assoc-ref inputs "libgc"))
8531 (pcre (assoc-ref inputs "pcre")))
8532 (substitute* "shedskin/makefile.py"
8533 (("variable == 'CCFLAGS':[ ]*")
8534 (string-append "variable == 'CCFLAGS':\n"
8535 " line += ' -I " pcre "/include"
8536 " -I " libgc "/include'"))
8537 (("variable == 'LFLAGS':[ ]*")
8538 (string-append "variable == 'LFLAGS':\n"
8539 " line += ' -L" pcre "/lib"
8540 " -L " libgc "/lib'")))
8542 (inputs `(("pcre" ,pcre)
8544 (home-page "https://shedskin.github.io/")
8545 (synopsis "Experimental Python-2 to C++ Compiler")
8546 (description (string-append "This is an experimental compiler for a subset of
8547 Python. It generates C++ code and a Makefile."))
8548 (license (list license:gpl3 license:bsd-3 license:expat))))
8550 (define-public python2-rope
8552 (name "python2-rope")
8557 (uri (pypi-uri "rope" version))
8560 "18k5znhpwvrfck3yp0jmhd5j8r0f0s8bk1zh5yhs2cfgmfhbwigb"))))
8562 ;; Rope is currently python-2 only.
8563 ;; https://github.com/python-rope/rope/issues/57
8564 `(#:python ,python-2))
8565 (build-system python-build-system)
8567 `(("python2-unittest2" ,python2-unittest2)))
8568 (home-page "https://github.com/python-rope/rope")
8569 (synopsis "Refactoring library for Python")
8570 (description "Rope is a refactoring library for Python. It facilitates
8571 the renaming, moving and extracting of attributes, functions, modules, fields
8572 and parameters in Python 2 source code. These refactorings can also be applied
8573 to occurrences in strings and comments.")
8574 (license license:gpl2)))
8576 (define-public python-py3status
8578 (name "python-py3status")
8583 (uri (pypi-uri "py3status" version))
8586 "0i283z1pivmir61z8kbiycigc94l61v33ygzkhczf1ifq7cppyds"))))
8587 (build-system python-build-system)
8592 (modify-phases %standard-phases
8593 ;; 'file' is used for detection of configuration file encoding
8594 ;; let's make link the dependency to particular input
8595 (add-before 'build 'patch-file-path
8596 (lambda* (#:key inputs #:allow-other-keys)
8597 (let ((file-path (assoc-ref inputs "file")))
8598 (substitute* "py3status/parse_config.py"
8599 (("check_output\\(\\['file'")
8600 (string-append "check_output(['" file-path "/bin/file'")))
8602 #:tests? #f)) ; TODO: Requires many libraries not in Guix.
8603 (home-page "https://github.com/ultrabug/py3status")
8604 (synopsis "Extensible i3status wrapper written in Python")
8605 (description "py3status is an i3status wrapper which extends i3status
8606 functionality in a modular way, allowing you to extend your panel with your
8607 own code, responding to click events and updating clock every second.")
8608 (license license:bsd-3)))
8610 (define-public python-tblib
8612 (name "python-tblib")
8616 (uri (pypi-uri "tblib" version))
8618 "1rsg8h069kqgncyv8fgzyj6qflk6j10cb78pa5jk34ixwq044vj3"))))
8619 (build-system python-build-system)
8622 (modify-phases %standard-phases
8625 ;; Upstream runs tests after installation and the package itself
8626 ;; resides in a subdirectory. Extend PYTHONPATH so it will be
8628 (setenv "PYTHONPATH"
8629 (string-append (getcwd) "/build/lib:"
8630 (getenv "PYTHONPATH")))
8631 (zero? (system* "py.test" "-vv" "tests" "README.rst")))))))
8633 `(("python-pytest" ,python-pytest)
8634 ("python-six" ,python-six)))
8635 (home-page "https://github.com/ionelmc/python-tblib")
8636 (synopsis "Traceback serialization library")
8638 "Traceback serialization allows you to:
8641 @item Pickle tracebacks and raise exceptions with pickled tracebacks in
8642 different processes. This allows better error handling when running code over
8643 multiple processes (imagine multiprocessing, billiard, futures, celery etc).
8645 @item Parse traceback strings and raise with the parsed tracebacks.
8647 (license license:bsd-3)))
8649 (define-public python2-tblib
8650 (package-with-python2 python-tblib))
8652 (define-public python-greenlet
8654 (name "python-greenlet")
8658 (uri (pypi-uri "greenlet" version))
8661 "1xhik26j4f3kc4qw9xmj0c567rb5h1zryb4ijwqnqwwjvfhbv59h"))))
8662 (build-system python-build-system)
8663 (home-page "https://greenlet.readthedocs.io/")
8664 (synopsis "Lightweight in-process concurrent programming")
8666 "Greenlet package is a spin-off of Stackless, a version of CPython
8667 that supports micro-threads called \"tasklets\". Tasklets run
8668 pseudo-concurrently (typically in a single or a few OS-level threads) and
8669 are synchronized with data exchanges on \"channels\".")
8670 (license (list license:psfl license:expat))))
8672 (define-public python2-greenlet
8673 (package-with-python2 python-greenlet))
8675 (define-public python-gevent
8677 (name "python-gevent")
8681 (uri (pypi-uri "gevent" version))
8684 "0bbbjvi423y9k9xagrcsimnayaqymg6f2dj76m9z3mjpkjpci4a7"))
8685 (modules '((guix build utils)))
8688 ;; unbunding libev and c-ares
8689 (delete-file-recursively "deps")
8691 (build-system python-build-system)
8693 `(#:modules ((ice-9 ftw)
8696 (guix build python-build-system))
8697 #:phases (modify-phases %standard-phases
8698 (add-after 'unpack 'unpack-libev
8699 (lambda* (#:key inputs #:allow-other-keys)
8700 (mkdir-p "deps/libev")
8701 ;; FIXME: gevent requires building libev, even though
8702 ;; it only links against the proper one.
8703 (invoke "tar" "-xf" (assoc-ref inputs "libev-source")
8704 "--strip-components=1" "-C" "deps/libev")))
8705 (add-before 'patch-source-shebangs 'patch-hard-coded-paths
8707 (substitute* "src/gevent/subprocess.py"
8708 (("/bin/sh") (which "sh")))
8709 (for-each (lambda (file)
8711 (("/bin/sh") (which "sh"))
8712 (("/bin/true") (which "true"))))
8713 (find-files "src/greentest" "\\.py$"))
8715 (add-before 'build 'do-not-use-bundled-sources
8717 (setenv "CONFIG_SHELL" (which "bash"))
8718 (setenv "LIBEV_EMBED" "false")
8719 (setenv "CARES_EMBED" "false")
8720 (setenv "EMBED" "false")
8724 ;; Make sure the build directory is on PYTHONPATH.
8725 (setenv "PYTHONPATH"
8727 (getenv "PYTHONPATH") ":"
8729 (car (scandir "build" (cut string-prefix? "lib." <>)))))
8730 (with-directory-excursion "src/greentest"
8731 ;; XXX: Many tests require network access. Instead we only
8732 ;; run known-good tests. Unfortunately we cannot use
8733 ;; recursion here since this directory also contains
8734 ;; Python-version-specific subfolders.
8735 (apply invoke "python" "testrunner.py" "--config"
8737 (scandir "." (cut regexp-exec
8738 (make-regexp "test_+(subprocess|core)")
8741 `(("python-greenlet" ,python-greenlet)))
8743 `(("libev-source" ,(package-source libev))
8744 ("python-six" ,python-six)))
8746 `(("c-ares" ,c-ares)
8748 (home-page "http://www.gevent.org/")
8749 (synopsis "Coroutine-based network library")
8751 "gevent is a coroutine-based Python networking library that uses greenlet
8752 to provide a high-level synchronous API on top of the libev event loop.")
8753 (license license:expat)))
8755 (define-public python2-gevent
8756 (package-with-python2 python-gevent))
8758 (define-public python-fastimport
8760 (name "python-fastimport")
8765 (uri (pypi-uri "fastimport" version))
8767 (base32 "1aqjsin4rmqm7ln4j0p73fzxifws6c6ikgyhav7r137m2ixsxl43"))))
8768 (build-system python-build-system)
8769 (home-page "https://github.com/jelmer/python-fastimport")
8770 (synopsis "VCS fastimport parser and generator in Python")
8771 (description "This package provides a parser for and generator of the Git
8772 @url{https://www.kernel.org/pub/software/scm/git/docs/git-fast-import.html,fastimport}
8774 (license license:gpl2+)))
8776 (define-public python2-fastimport
8777 (package-with-python2 python-fastimport))
8779 (define-public python-twisted
8781 (name "python-twisted")
8785 (uri (pypi-uri "Twisted" version ".tar.bz2"))
8788 "1p245mg15hkxp7hy5cyq2fgvlgjkb4cg0gwkwd148nzy1bbi3wnv"))))
8789 (build-system python-build-system)
8791 '(#:tests? #f)) ; FIXME: Some tests are failing.
8793 ;; (modify-phases %standard-phases
8796 ;; (zero? (system* "./bin/trial" "twisted")))))
8798 `(("python-zope-interface" ,python-zope-interface)
8799 ("python-incremental" ,python-incremental)
8800 ("python-constantly" ,python-constantly)
8801 ("python-automat" ,python-automat)))
8802 (home-page "https://twistedmatrix.com/")
8803 (synopsis "Asynchronous networking framework written in Python")
8805 "Twisted is an extensible framework for Python programming, with special
8806 focus on event-based network programming and multiprotocol integration.")
8807 (license license:expat)))
8809 (define-public python2-twisted
8810 (package-with-python2 python-twisted))
8812 (define-public python-pika
8814 (name "python-pika")
8819 (uri (pypi-uri "pika" version))
8822 "0nb4h08di432lv7dy2v9kpwgk0w92f24sqc2hw2s9vwr5b8v8xvj"))))
8823 (build-system python-build-system)
8825 `(("python-pyev" ,python-pyev)
8826 ("python-tornado" ,python-tornado)
8827 ("python-twisted" ,python-twisted)))
8828 (home-page "https://pika.readthedocs.org")
8829 (synopsis "Pure Python AMQP Client Library")
8831 "Pika is a pure-Python implementation of the AMQP (Advanced Message Queuing
8832 Protocol) 0-9-1 protocol that tries to stay fairly independent of the underlying
8833 network support library.")
8834 (license license:bsd-3)))
8836 (define-public python2-pika
8837 (package-with-python2 python-pika))
8839 (define-public python-ply
8846 (uri (pypi-uri "ply" version))
8849 "1jxsr1d2f732r6ljhvm827113dckwl6qwakfvpbdhcbhvpvlmscn"))))
8850 (build-system python-build-system)
8851 (home-page "http://www.dabeaz.com/ply/")
8852 (synopsis "Python Lex & Yacc")
8853 (description "PLY is a @code{lex}/@code{yacc} implemented purely in Python.
8854 It uses LR parsing and does extensive error checking.")
8855 (license license:bsd-3)))
8857 (define-public python2-ply
8858 (package-with-python2 python-ply))
8860 (define-public python-tabulate
8862 (name "python-tabulate")
8866 (uri (pypi-uri "tabulate" version))
8869 "1inqhspd4frxnp08c32yndr0lc4px1xfkqah184i5w09gkhvi843"))))
8870 (build-system python-build-system)
8872 ;; FIXME: The pypi release tarball is missing a 'test/common.py'
8873 ;; and the latest release is not tagged in the upstream repository.
8875 (home-page "https://bitbucket.org/astanin/python-tabulate")
8876 (synopsis "Pretty-print tabular data")
8878 "Tabulate is a library and command-line utility to pretty-print tabular
8880 (license license:expat)))
8882 (define-public python2-tabulate
8883 (package-with-python2 python-tabulate))
8885 (define-public python-kazoo
8887 (name "python-kazoo")
8892 (uri (pypi-uri "kazoo" version))
8895 "16y213k7r8shyn2zw1k6lkzjgcrvm441pqv8scvcjixhvpbx3hm7"))))
8896 (build-system python-build-system)
8897 (arguments '(#:tests? #f)) ; XXX: needs zookeeper
8899 `(("python-six" ,python-six)))
8900 (home-page "https://kazoo.readthedocs.org")
8901 (synopsis "High-level Zookeeper client library")
8903 "Kazoo is a Python client library for the Apache Zookeeper distributed
8904 application service. It is designed to be easy to use and to avoid common
8905 programming errors.")
8906 (license license:asl2.0)))
8908 (define-public python2-kazoo
8909 (package-with-python2 python-kazoo))
8911 (define-public python-pykafka
8913 (name "python-pykafka")
8918 "https://pypi.python.org/packages/8b/3e/"
8919 "384eeff406b06315738b62483fd2126c6e4f544167116b17cc04ea7d2a59/"
8920 "pykafka-" version ".tar.gz"))
8923 "1id6sr159p6aa13bxcqyr9gln8sqg1l0ddzns5iws8kk5q1p5cfv"))))
8924 (build-system python-build-system)
8925 (arguments '(#:tests? #f)) ; XXX: needs zookeeper, kafka, etc.
8927 `(("python-gevent" ,python-gevent)
8928 ("python-kazoo" ,python-kazoo)
8929 ("python-tabulate" ,python-tabulate)))
8931 `(("librdkafka" ,librdkafka)))
8932 (home-page "https://pykafka.readthedocs.io/")
8933 (synopsis "Apache Kafka client for Python")
8935 "PyKafka is a client for the Apache Kafka distributed messaging system.
8936 It includes Python implementations of Kafka producers and consumers, which
8937 are optionally backed by a C extension built on librdkafka.")
8938 (license license:asl2.0)))
8940 (define-public python2-pykafka
8941 (package-with-python2 python-pykafka))
8943 (define-public python-wcwidth
8945 (name "python-wcwidth")
8950 (uri (pypi-uri "wcwidth" version))
8953 "0pn6dflzm609m4r3i8ik5ni9ijjbb5fa3vg1n7hn6vkd49r77wrx"))))
8954 (build-system python-build-system)
8955 (home-page "https://github.com/jquast/wcwidth")
8956 (synopsis "Measure number of terminal column cells of wide-character codes")
8957 (description "Wcwidth measures the number of terminal column cells of
8958 wide-character codes. It is useful for those implementing a terminal emulator,
8959 or programs that carefully produce output to be interpreted by one. It is a
8960 Python implementation of the @code{wcwidth} and @code{wcswidth} C functions
8961 specified in POSIX.1-2001 and POSIX.1-2008.")
8962 (license license:expat)))
8964 (define-public python2-wcwidth
8965 (package-with-python2 python-wcwidth))
8967 (define-public python2-jsonrpclib
8969 (name "python2-jsonrpclib")
8974 "https://pypi.python.org/packages/source/j/jsonrpclib/"
8975 "jsonrpclib-" version ".tar.gz"))
8978 "02vgirw2bcgvpcxhv5hf3yvvb4h5wzd1lpjx8na5psdmaffj6l3z"))))
8979 (build-system python-build-system)
8982 #:python ,python-2))
8983 (home-page "https://github.com/joshmarshall/jsonrpclib/")
8984 (synopsis "Implementation of JSON-RPC specification for Python")
8986 "This library is an implementation of the JSON-RPC specification.
8987 It supports both the original 1.0 specification, as well as the
8988 new (proposed) 2.0 spec, which includes batch submission, keyword arguments,
8990 (license license:asl2.0)))
8992 (define-public python-chai
8994 (name "python-chai")
8998 (uri (pypi-uri "chai" version))
9001 "1k6n6zbgrrs83crp6mr3yqj9zlv40b8rpisyrliwsq7naml2p3gz"))))
9002 (build-system python-build-system)
9003 (home-page "https://github.com/agoragames/chai")
9004 (synopsis "Mocking framework for Python")
9006 "Chai provides an api for mocking, stubbing and spying your python
9007 objects, patterned after the Mocha library for Ruby.")
9008 (license license:bsd-3)))
9010 (define-public python2-chai
9011 (package-with-python2 python-chai))
9013 (define-public python-inflection
9015 (name "python-inflection")
9018 (origin (method url-fetch)
9019 (uri (pypi-uri "inflection" version))
9022 "1jhnxgnw8y3mbzjssixh6qkc7a3afc4fygajhqrqalnilyvpzshq"))))
9023 (build-system python-build-system)
9025 `(("python-pytest" ,python-pytest)))
9026 (home-page "https://github.com/jpvanhal/inflection")
9027 (synopsis "Python string transformation library")
9029 "Inflection is a string transformation library. It singularizes
9030 and pluralizes English words, and transforms strings from CamelCase to
9031 underscored string.")
9032 (license license:expat)))
9034 (define-public python2-inflection
9035 (package-with-python2 python-inflection))
9037 (define-public python-pylev
9039 (name "python-pylev")
9043 (uri (pypi-uri "pylev" version))
9046 "1hz1x9blsbxya1y9nnhnwwdnqmakxi9mc0jkwj0rn6b1h44i0f86"))))
9047 (build-system python-build-system)
9048 (home-page "https://github.com/toastdriven/pylev")
9049 (synopsis "Levenshtein distance implementation in Python")
9050 (description "Pure Python Levenshtein implementation, based off the
9051 Wikipedia code samples at
9052 @url{http://en.wikipedia.org/wiki/Levenshtein_distance}.")
9053 (license license:bsd-3)))
9055 (define-public python2-pylev
9056 (package-with-python2 python-pylev))
9058 (define-public python-cleo
9060 (name "python-cleo")
9064 (uri (pypi-uri "cleo" version))
9067 "0q1cf0szr0d54am4pypzwdnm74zpladdsinad94c2fz5i06fdpf7"))))
9068 (build-system python-build-system)
9071 ("python-mock" ,python-mock)
9072 ("python-pytest-mock" ,python-pytest-mock)
9073 ("python-pytest" ,python-pytest)))
9075 `(("python-backpack" ,python-backpack)
9076 ("python-pastel" ,python-pastel)
9077 ("python-pylev" ,python-pylev)))
9078 (home-page "https://github.com/sdispater/cleo")
9079 (synopsis "Command-line arguments library for Python")
9081 "Cleo allows you to create command-line commands with signature in
9082 docstring and colored output.")
9083 (license license:expat)))
9085 (define-public python2-cleo
9086 (package-with-python2 python-cleo))
9088 (define-public python-lazy-object-proxy
9090 (name "python-lazy-object-proxy")
9094 (uri (pypi-uri "lazy-object-proxy" version))
9097 "0s22aqqkdscyh8sjspyyax7qa1aiz8p4midrnyf39717fhfczm6x"))))
9098 (build-system python-build-system)
9099 (home-page "https://github.com/ionelmc/python-lazy-object-proxy")
9100 (synopsis "Lazy object proxy for python")
9102 "Lazy object proxy is an object that wraps a callable but defers the call
9103 until the object is actually required, and caches the result of said call.")
9104 (license license:bsd-2)))
9106 (define-public python2-lazy-object-proxy
9107 (package-with-python2 python-lazy-object-proxy))
9109 (define-public python-dnspython
9111 (name "python-dnspython")
9115 (uri (string-append "http://www.dnspython.org/kits/"
9116 version "/dnspython-" version ".tar.gz"))
9119 "0jr4v2pd90i6l1xxbss2m05psbjaxvyvvvpq44wycijpfgjqln8i"))))
9120 (build-system python-build-system)
9121 (arguments '(#:tests? #f)) ; XXX: requires internet access
9122 (home-page "http://www.dnspython.org")
9123 (synopsis "DNS toolkit for Python")
9125 "dnspython is a DNS toolkit for Python. It supports almost all record
9126 types. It can be used for queries, zone transfers, and dynamic updates.
9127 It supports TSIG authenticated messages and EDNS0.")
9128 (license license:expat)))
9130 (define-public python2-dnspython
9131 (package-with-python2 python-dnspython))
9133 (define-public python-email-validator
9135 (name "python-email-validator")
9138 (origin (method url-fetch)
9139 (uri (pypi-uri "email_validator" version))
9142 "1ja9149l9ck5n45a72h3is7v476hjny5ybxbcamx1nw6iplsm7k6"))))
9143 (build-system python-build-system)
9146 (modify-phases %standard-phases
9147 (add-before 'build 'use-dnspython
9149 (substitute* "setup.py"
9150 (("dnspython3") "dnspython"))
9153 `(("python-dnspython" ,python-dnspython)
9154 ("python-idna" ,python-idna)))
9155 (home-page "https://github.com/JoshData/python-email-validator")
9156 (synopsis "Email address validation library for Python")
9158 "This library validates email address syntax and deliverability.")
9159 (license license:cc0)))
9161 (define-public python2-email-validator
9162 (package-with-python2 python-email-validator))
9164 (define-public python-ukpostcodeparser
9166 (name "python-ukpostcodeparser")
9170 (uri (pypi-uri "UkPostcodeParser" version))
9173 "1jwg9z4rz51mcka1821rwgycsd0mcicyp1kiwjfa2kvg8bm9p2qd"))))
9174 (build-system python-build-system)
9175 (home-page "https://github.com/hamstah/ukpostcodeparser")
9176 (synopsis "UK Postcode parser for Python")
9178 "This library provides the @code{parse_uk_postcode} function for
9179 parsing UK postcodes.")
9180 (license license:expat)))
9182 (define-public python2-ukpostcodeparser
9183 (package-with-python2 python-ukpostcodeparser))
9185 (define-public python-faker
9187 (name "python-faker")
9191 (uri (pypi-uri "Faker" version))
9194 "1fh2p2yz0fsdr4fqwxgddwbvfb6qn6vp8yx0qwqzra27yq5d1wsm"))
9196 (search-patches "python-faker-fix-build-32bit.patch"))
9197 (modules '((guix build utils)))
9200 (for-each delete-file (find-files "." "\\.pyc$"))
9202 (build-system python-build-system)
9205 (modify-phases %standard-phases
9208 (zero? (system* "python" "-m" "unittest" "-v" "tests")))))))
9211 ("python-email-validator" ,python-email-validator)
9212 ("python-mock" ,python-mock)
9213 ("python-ukpostcodeparser" ,python-ukpostcodeparser)))
9215 `(("python-dateutil" ,python-dateutil)
9216 ("python-six" ,python-six)))
9217 (home-page "https://github.com/joke2k/faker")
9218 (synopsis "Python package that generates fake data")
9220 "Faker is a Python package that generates fake data such as names,
9221 addresses, and phone numbers.")
9222 (license license:expat)
9223 (properties `((python2-variant . ,(delay python2-faker))))))
9225 (define-public python2-faker
9226 (let ((base (package-with-python2 (strip-python2-variant
9231 `(("python2-ipaddress" ,python2-ipaddress)
9232 ,@(package-propagated-inputs base))))))
9234 (define-public python-pyaml
9236 (name "python-pyaml")
9240 (uri (pypi-uri "pyaml" version))
9243 "132grrw0ajq4nrappi3ldbkb952k7yn9b6c7csi2rmvzm1g6ppp2"))))
9244 (build-system python-build-system)
9246 `(("python-unidecode" ,python-unidecode)))
9248 `(("python-pyyaml" ,python-pyyaml)))
9249 (home-page "https://github.com/mk-fg/pretty-yaml")
9250 (synopsis "YAML pretty-print library for Python")
9252 "pyaml is a PyYAML based python module to produce pretty and readable
9253 YAML-serialized data.")
9254 (license (license:non-copyleft "http://www.wtfpl.net/txt/copying/"))))
9256 (define-public python2-pyaml
9257 (package-with-python2 python-pyaml))
9259 (define-public python-backpack
9261 (name "python-backpack")
9266 (uri (pypi-uri "backpack" version))
9269 "14rq1mvm0jda90lcx9gyyby9dvq4x3js2cmxvd6vl4686ixwyqh1"))))
9270 (build-system python-build-system)
9272 `(("python-pytest" ,python-pytest)
9273 ("python-nose" ,python-nose)))
9275 `(("python-simplejson" ,python-simplejson)))
9276 (home-page "https://github.com/sdispater/backpack")
9277 (synopsis "Utilities for working with Python collections")
9278 (description "Backpack provides some useful utilities for working with
9279 collections of data.")
9280 (license license:expat)))
9282 (define-public python2-backpack
9283 (package-with-python2 python-backpack))
9285 (define-public python-prompt-toolkit
9287 (name "python-prompt-toolkit")
9292 (uri (pypi-uri "prompt_toolkit" version ".tar.gz"))
9295 "05v9h5nydljwpj5nm8n804ms0glajwfy1zagrzqrg91wk3qqi1c5"))))
9296 (build-system python-build-system)
9298 '(#:tests? #f)) ; The test suite uses some Windows-specific data types.
9300 `(("python-wcwidth" ,python-wcwidth)
9301 ("python-six" ,python-six)
9302 ("python-pygments" ,python-pygments)))
9303 (home-page "https://github.com/jonathanslenders/python-prompt-toolkit")
9304 (synopsis "Library for building command line interfaces in Python")
9306 "Prompt-Toolkit is a library for building interactive command line
9307 interfaces in Python. It's like GNU Readline but it also features syntax
9308 highlighting while typing, out-of-the-box multi-line input editing, advanced
9309 code completion, incremental search, support for Chinese double-width
9310 characters, mouse support, and auto suggestions.")
9311 (license license:bsd-3)))
9313 (define-public python2-prompt-toolkit
9314 (package-with-python2 python-prompt-toolkit))
9316 (define-public python-jedi
9318 (name "python-jedi")
9323 (uri (pypi-uri "jedi" version))
9326 "0c8x962ynpx001fdvp07m2q5jk4igkxbj3rmnydavphvlgxijk1v"))))
9327 (build-system python-build-system)
9329 ;; FIXME: One test fails (use "py.test" instead of 'setup.py test').
9332 `(("python-pytest" ,python-pytest)))
9333 (home-page "https://github.com/davidhalter/jedi")
9335 "Autocompletion for Python that can be used for text editors")
9337 "Jedi is an autocompletion tool for Python that can be used for text editors.")
9338 (license license:expat)))
9340 (define-public python2-jedi
9341 (package-with-python2 python-jedi))
9343 (define-public ptpython
9349 (uri (pypi-uri "ptpython" version))
9352 "1mmbiyzf0n8hm7z2a562x7w5cbl6jc0zsk6vp40q1z4cyblv1k13"))))
9353 (build-system python-build-system)
9355 '(#:tests? #f)) ; FIXME: No tests in pypi tarball.
9357 `(("python-docopt" ,python-docopt)
9358 ("python-jedi" ,python-jedi)
9359 ("python-prompt-toolkit" ,python-prompt-toolkit)
9360 ("python-pygments" ,python-pygments)))
9361 (home-page "https://github.com/jonathanslenders/ptpython")
9362 (synopsis "Python Read-Eval-Print-Loop with nice IDE-like features")
9364 "ptpython is a Python read-eval-print loop with IDE-like features.
9365 It supports syntax highlighting, multiline editing, autocompletion, mouse,
9366 color schemes, bracketed paste, Vi and Emacs keybindings, Chinese characters
9368 (license license:bsd-3)
9369 (properties `((python2-variant . ,(delay ptpython-2))))))
9371 (define-public ptpython-2
9372 (let ((base (package-with-python2 (strip-python2-variant ptpython))))
9375 (name "ptpython2"))))
9377 (define-public python-stem
9379 (name "python-stem")
9384 (uri (pypi-uri "stem" version))
9387 "1va9p3ij7lxg6ixfsvaql06dn11l3fgpxmss1dhlvafm7sqizznp"))))
9388 (build-system python-build-system)
9391 (modify-phases %standard-phases
9392 (add-before 'check 'fix-test-environment
9394 ;; Fixes: FileNotFoundError: [Errno 2] No such file or directory:
9395 ;; '/tmp/guix-build-python-stem-1.6.0.drv-0/stem-1.6.0/.gitignore'.
9396 (with-output-to-file ".gitignore"
9397 (lambda _ (format #t "%")))
9401 (invoke "./run_tests.py" "--unit")
9404 `(("python-mock" ,python-mock)
9405 ("python-pep8" ,python-pep8)
9406 ("python-pyflakes" ,python-pyflakes)))
9407 (home-page "https://stem.torproject.org/")
9409 "Python controller library that allows applications to interact with Tor")
9411 "Stem is a Python controller library for Tor. With it you can use Tor's
9412 control protocol to script against the Tor process and read descriptor data
9413 relays publish about themselves.")
9414 (license license:lgpl3)))
9416 (define-public python2-stem
9417 (package-with-python2 python-stem))
9419 (define-public python-pyserial
9421 (name "python-pyserial")
9426 (uri (pypi-uri "pyserial" version))
9429 "0k1nfdrxxkdlv4zgaqsdv8li0pj3gbh2pyxw8q2bsg6f9490amyn"))))
9430 (build-system python-build-system)
9432 '(#:tests? #f)) ; FIXME: 3/49 tests are failing.
9434 ;; (modify-phases %standard-phases
9437 ;; (zero? (system* "python" "test/run_all_tests.py" "loop://")))))))
9439 "https://github.com/pyserial/pyserial")
9440 (synopsis "Python Serial Port Bindings")
9441 (description "@code{pyserial} provide serial port bindings for Python. It
9442 supports different byte sizes, stop bits, parity and flow control with RTS/CTS
9443 and/or Xon/Xoff. The port is accessed in RAW mode.")
9444 (license license:bsd-3)))
9446 (define-public python2-pyserial
9447 (package-with-python2 python-pyserial))
9449 (define-public python-kivy
9451 (name "python-kivy")
9456 (uri (pypi-uri "Kivy" version))
9457 (file-name (string-append name "-" version ".tar.gz"))
9460 "1394zh6kvf7k5d8vlzxcsfcailr3q59xwg9b1n7qaf25bvyq1h98"))))
9461 (build-system python-build-system)
9463 `(#:tests? #f ; Tests require many optional packages
9465 (modify-phases %standard-phases
9466 (add-after 'patch-generated-file-shebangs 'set-sdl-paths
9467 (lambda* (#:key inputs #:allow-other-keys)
9468 (setenv "KIVY_SDL2_PATH"
9469 (string-append (assoc-ref inputs "sdl-union")
9474 ("pkg-config" ,pkg-config)
9475 ("python-cython" ,python-cython)))
9477 `(("gstreamer" ,gstreamer)
9480 ,(sdl-union (list sdl2 sdl2-image sdl2-mixer sdl2-ttf)))))
9481 (home-page "http://kivy.org")
9483 "Multitouch application framework")
9485 "A software library for rapid development of
9486 hardware-accelerated multitouch applications.")
9487 (license license:expat)))
9489 (define-public python2-kivy
9490 (package-with-python2 python-kivy))
9492 (define-public python-kivy-next
9493 (let ((commit "a988c5e7a47da56263ff39514264a3de516ef2fe")
9495 (package (inherit python-kivy)
9496 (name "python-kivy-next")
9497 (version (string-append "1.9.1-" revision "."
9498 (string-take commit 7)))
9503 (url "https://github.com/kivy/kivy")
9505 (file-name (string-append name "-" version "-checkout"))
9508 "0jk92b4a8l7blkvkgkjihk171s0dfnq582cckff5srwc8kal5m0p")))))))
9510 (define-public python2-kivy-next
9511 (package-with-python2 python-kivy-next))
9513 (define-public python-binaryornot
9515 (name "python-binaryornot")
9519 (uri (pypi-uri "binaryornot" version))
9522 "1j4f51dxic39mdwf6alj7gd769wy6mhk916v031wjali51xkh3xb"))))
9523 (build-system python-build-system)
9525 `(("python-chardet" ,python-chardet)
9526 ("python-hypothesis" ,python-hypothesis)))
9527 (home-page "https://github.com/audreyr/binaryornot")
9528 (synopsis "Package to check if a file is binary or text")
9529 (description "Ultra-lightweight pure Python package to check if a file is
9531 (license license:bsd-3)
9532 (properties `((python2-variant . ,(delay python2-binaryornot))))))
9534 (define-public python2-binaryornot
9535 (let ((base (package-with-python2 (strip-python2-variant python-binaryornot))))
9536 (package (inherit base)
9538 `(("python2-enum34" ,python2-enum34)
9539 ,@(package-propagated-inputs base))))))
9541 (define-public python-nltk
9543 (name "python-nltk")
9547 (uri (pypi-uri "nltk" version))
9550 "0skxbhnymwlspjkzga0f7x1hg3y50fwpfghs8g8k7fh6f4nknlym"))))
9551 (build-system python-build-system)
9553 '(;; The tests require some extra resources to be downloaded.
9554 ;; TODO Try packaging these resources.
9556 (home-page "http://nltk.org/")
9557 (synopsis "Natural Language Toolkit")
9558 (description "It provides interfaces to over 50 corpora and lexical
9559 resources such as WordNet, along with a suite of text processing libraries
9560 for classification, tokenization, stemming, tagging, parsing, and semantic
9561 reasoning, wrappers for natural language processing libraries.")
9562 (license license:asl2.0)))
9564 (define-public python2-nltk
9565 (package-with-python2 python-nltk))
9567 (define-public python-pymongo
9569 (name "python-pymongo")
9573 (uri (pypi-uri "pymongo" version))
9576 "07mra6w86wjqy4lx5fvimidjhhfzd562gfjn8grsnbv2q8pk0i9x"))))
9577 (build-system python-build-system)
9579 `(("python-certifi" ,python-certifi)))
9580 (home-page "https://github.com/mongodb/mongo-python-driver")
9581 (synopsis "Python driver for MongoDB")
9582 (description "Python driver for MongoDB.")
9583 (license license:asl2.0)))
9585 (define-public python2-pymongo
9586 (package-with-python2 python-pymongo))
9588 (define-public python-sh
9594 (uri (pypi-uri "sh" version))
9597 "192r0mpv6dmkysjzhc43ddffiwb5g7c76bgr1mb1z2xz9awbj3sr"))))
9598 (build-system python-build-system)
9600 `(#:tests? #f)) ; no tests
9601 (home-page "https://github.com/amoffat/sh")
9602 (synopsis "Python subprocess interface")
9603 (description "Abstracts process invocation by providing a function
9604 interface for programs.")
9605 (license license:expat)))
9607 (define-public python2-sh
9608 (package-with-python2 python-sh))
9610 (define-public python-consul
9612 (name "python-consul")
9617 (uri (pypi-uri "python-consul" version))
9620 "0rfyxcy4cr3x848vhx876ifalxd5ghq6l5x813m49h4vq2d4jiq8"))))
9621 (build-system python-build-system)
9623 '(#:tests? #f)) ; The tests are not distributed
9625 `(("python-requests" ,python-requests)
9626 ("python-six" ,python-six)))
9627 (home-page "https://github.com/cablehead/python-consul")
9628 (synopsis "Python client for Consul")
9630 "Python client for @url{http://www.consul.io/,Consul}, a tool for service
9631 discovery, monitoring and configuration.")
9632 (license license:expat)))
9634 (define-public python2-consul
9635 (package-with-python2 python-consul))
9637 (define-public python-schematics
9639 (name "python-schematics")
9645 "https://github.com/schematics/schematics/archive/v" version ".tar.gz"))
9646 (file-name (string-append name "-" version ".tar.gz"))
9649 "19v1i69bf3bzarfxmbv0v6ivpcn758x3shvbiy9l2hy0lvqwnp6l"))))
9650 (build-system python-build-system)
9652 `(("python-six" ,python-six)))
9654 `(#:tests? #f)) ; requires a bunch of not very nice packages with fixed
9655 ; version requirements (eg python-coveralls)
9656 (home-page "https://github.com/schematics/schematics")
9657 (synopsis "Python Data Structures for Humans")
9658 (description "Python Data Structures for Humans.")
9659 (license license:bsd-3)))
9661 (define-public python2-schematics
9662 (package-with-python2 python-schematics))
9664 (define-public python-odfpy
9666 (name "python-odfpy")
9670 (uri (pypi-uri "odfpy" version))
9673 "1a6ms0w9zfhhkqhvrnynwwbxrivw6hgjc0s5k7j06npc7rq0blxw"))))
9675 `(#:modules ((srfi srfi-1)
9676 (guix build python-build-system)
9679 (modify-phases %standard-phases
9681 ;; The test runner invokes python2 and python3 for test*.py.
9682 ;; To avoid having both in inputs, we replicate it here.
9684 (every (lambda (test-file)
9685 (zero? (system* "python" test-file)))
9686 (find-files "tests" "^test.*\\.py$")))))))
9687 (build-system python-build-system)
9688 (home-page "https://github.com/eea/odfpy")
9689 (synopsis "Python API and tools to manipulate OpenDocument files")
9690 (description "Collection of libraries and utility programs written in
9691 Python to manipulate OpenDocument 1.2 files.")
9693 ;; The software is mainly dual GPL2+ and ASL2.0, but includes a
9694 ;; number of files with other licenses.
9695 (list license:gpl2+ license:asl2.0 license:lgpl2.1+ license:cc-by-sa3.0))))
9697 (define-public python2-odfpy
9698 (package-with-python2 python-odfpy))
9700 (define-public python-natsort
9702 (name "python-natsort")
9706 (uri (pypi-uri "natsort" version))
9709 "0bh6j0l8iapjnsgg3bs6q075cnzjl6zw1vlgqyv3qrygm2cxypkn"))))
9710 (build-system python-build-system)
9713 (modify-phases %standard-phases
9714 (add-before 'check 'set-cachedir
9715 ;; Tests require write access to $HOME by default
9716 (lambda _ (setenv "PYTHON_EGG_CACHE" "/tmp") #t)))))
9718 `(("python-hypothesis" ,python-hypothesis)
9719 ("python-pytest-cache" ,python-pytest-cache)
9720 ("python-pytest-cov" ,python-pytest-cov)
9721 ("python-pytest-flakes" ,python-pytest-flakes)
9722 ("python-pytest-pep8" ,python-pytest-pep8)))
9723 (propagated-inputs ; TODO: Add python-fastnumbers.
9724 `(("python-pyicu" ,python-pyicu)))
9725 (home-page "https://github.com/SethMMorton/natsort")
9726 (synopsis "Natural sorting for python and shell")
9728 "Natsort lets you apply natural sorting on lists instead of
9729 lexicographical. If you use the built-in @code{sorted} method in python
9730 on a list such as @code{['a20', 'a9', 'a1', 'a4', 'a10']}, it would be
9731 returned as @code{['a1', 'a10', 'a20', 'a4', 'a9']}. Natsort provides a
9732 function @code{natsorted} that identifies numbers and sorts them separately
9733 from strings. It can also sort version numbers, real numbers, mixed types
9734 and more, and comes with a shell command @command{natsort} that exposes this
9735 functionality in the command line.")
9736 (license license:expat)
9737 (properties `((python2-variant . ,(delay python2-natsort))))))
9739 (define-public python2-natsort
9740 (let ((base (package-with-python2 (strip-python2-variant python-natsort))))
9741 (package (inherit base)
9743 `(("python2-pathlib" ,python2-pathlib)
9744 ("python2-mock" ,python2-mock)
9745 ("python2-enum34" ,python2-enum34)
9746 ,@(package-native-inputs base))))))
9748 (define-public python-glances
9750 (name "python-glances")
9755 (uri (pypi-uri "Glances" version))
9758 "11jbq40g8alsbirnd4kiagznqg270247i0m8qhi48ldf2i5xppxg"))))
9759 (build-system python-build-system)
9761 `(("python-psutil" ,python-psutil)))
9763 "https://github.com/nicolargo/glances")
9765 "A cross-platform curses-based monitoring tool")
9767 "Glances is a curses-based monitoring tool for a wide variety of platforms.
9768 Glances uses the PsUtil library to get information from your system. It monitors
9769 CPU, load, memory, network bandwidth, disk I/O, disk use, and more.")
9770 (license license:lgpl3+)))
9772 (define-public python2-glances
9773 (package-with-python2 python-glances))
9775 (define-public python-graphql-core
9777 (name "python-graphql-core")
9782 (uri (pypi-uri "graphql-core" version))
9785 "0rsaarx2sj4xnw9966rhh4haiqaapm4lm2mfqm48ywd51j5vh1a0"))))
9786 (build-system python-build-system)
9788 `(#:tests? #f ; Tests require the unpackaged pytest-benchmark.
9790 (modify-phases %standard-phases
9791 (add-after 'unpack 'patch-hardcoded-version
9792 (lambda _ (substitute*
9794 (("'gevent==1.1rc1'") "'gevent'"))
9797 `(("python-gevent" ,python-gevent)
9798 ("python-mock" ,python-mock)
9799 ("python-pytest-mock" ,python-pytest-mock)))
9801 `(("python-promise" ,python-promise)
9802 ("python-six" ,python-six)))
9803 (home-page "https://github.com/graphql-python/graphql-core")
9804 (synopsis "GraphQL implementation for Python")
9806 "GraphQL implementation for Python. GraphQL is a data query language and
9807 runtime designed and used to request and deliver data to mobile and web apps.
9808 This library is a port of @url{https://github.com/graphql/graphql-js,graphql-js}
9810 (license license:expat)))
9812 (define-public python2-graphql-core
9813 (package-with-python2 python-graphql-core))
9815 (define-public python-graphql-relay
9817 (name "python-graphql-relay")
9822 (uri (pypi-uri "graphql-relay" version))
9825 "1nv5dxcj59zv31qvl8bd142njmxcmymny2dz3br1l2cpbljbf5i7"))))
9826 (build-system python-build-system)
9828 '(#:tests? #f)) ; The tests are not distributed
9830 `(("python-graphql-core" ,python-graphql-core)
9831 ("python-promise" ,python-promise)
9832 ("python-six" ,python-six)))
9833 (home-page "https://github.com/graphql-python/graphql-relay-py")
9834 (synopsis "Relay implementation for Python")
9836 "This is a library to allow the easy creation of Relay-compliant servers
9837 using the GraphQL Python reference implementation of a GraphQL server. It
9838 should be noted that the code is a exact port of the original
9839 @url{https://github.com/graphql/graphql-relay-js,graphql-relay js implementation}
9841 (license license:expat)))
9843 (define-public python2-graphql-relay
9844 (package-with-python2 python-graphql-relay))
9846 (define-public python-graphene
9848 (name "python-graphene")
9853 (uri (pypi-uri "graphene" version))
9856 "09zhac7igh9ixdz0ay6csy35b40l1jwbf2wrbxmgxwfhy51iy06q"))))
9857 (build-system python-build-system)
9859 `(("python-graphql-core" ,python-graphql-core)
9860 ("python-graphql-relay" ,python-graphql-relay)
9861 ("python-iso8601" ,python-iso8601)
9862 ("python-promise" ,python-promise)
9863 ("python-six" ,python-six)))
9865 `(#:tests? #f)) ; no tests/ in the PyPI tarball
9866 (home-page "http://graphene-python.org/")
9867 (synopsis "GraphQL Framework for Python")
9869 "Graphene is a Python library for building GraphQL schemas/types.
9870 A GraphQL schema describes your data model, and provides a GraphQL server
9871 with an associated set of resolve methods that know how to fetch data.")
9872 (properties `((python2-variant . ,(delay python2-graphene))))
9873 (license license:expat)))
9875 (define-public python2-graphene
9876 (let ((base (package-with-python2
9877 (strip-python2-variant python-graphene))))
9878 (package (inherit base)
9880 `(("python2-sqlalchemy" ,python2-sqlalchemy)
9881 ,@(package-native-inputs base))))))
9883 (define-public python-nautilus
9885 (name "python-nautilus")
9890 (uri (pypi-uri "nautilus" version))
9893 "01hwzjc1zshk4vvxrcghm398fpy4jls66dyz06g07mrwqif8878p"))))
9894 (build-system python-build-system)
9895 (arguments `(#:tests? #f)) ; fails to import test modules
9897 `(("python-bcrypt" ,python-bcrypt)
9898 ("python-click" ,python-click)
9899 ("python-consul" ,python-consul)
9900 ("python-graphene" ,python-graphene)
9901 ("python-jinja2" ,python-jinja2)
9902 ("python-peewee" ,python-peewee)
9903 ("python-pika" ,python-pika)
9904 ("python-tornado" ,python-tornado)
9905 ("python-wtforms" ,python-wtforms)))
9907 `(("python-nose2" ,python-nose2)))
9908 (home-page "https://github.com/AlecAivazis/nautilus")
9909 (synopsis "Library for creating microservice applications")
9911 "Nautilus is a framework for flux based microservices that looks to
9912 provide extendible implementations of common aspects of a cloud so that you can
9913 focus on building massively scalable web applications.")
9914 (license license:expat)))
9916 (define-public python-snowballstemmer
9918 (name "python-snowballstemmer")
9922 (uri (pypi-uri "snowballstemmer" version))
9925 "0a0idq4y5frv7qsg2x62jd7rd272749xk4x99misf5rcifk2d7wi"))))
9926 (build-system python-build-system)
9930 (home-page "https://github.com/shibukawa/snowball_py")
9931 (synopsis "Snowball stemming library collection for Python")
9932 (description "This package provides 16 word stemmer algorithms generated
9933 from Snowball algorithms. It includes the 15 original ones plus the Poerter
9935 (license license:bsd-3)))
9937 (define-public python2-snowballstemmer
9938 (package-with-python2 python-snowballstemmer))
9940 (define-public python-sphinx-cloud-sptheme
9942 (name "python-sphinx-cloud-sptheme")
9946 (uri (pypi-uri "cloud_sptheme" version))
9949 "1dniqb6a39yh786f86c4jn666rwnyi1jvzn4616zhcchb7sfdshd"))))
9950 (build-system python-build-system)
9951 ;; FIXME: The 'pypi' release archive does not contain tests.
9952 (arguments '(#:tests? #f))
9954 `(("python-sphinx" ,python-sphinx)))
9955 (home-page "https://bitbucket.org/ecollins/cloud_sptheme")
9956 (synopsis "'Cloud' theme for Sphinx documenter")
9957 (description "This package contains the \"Cloud\" theme for Sphinx and some
9958 related extensions.")
9959 (license license:bsd-3)))
9961 (define-public python2-sphinx-cloud-sptheme
9962 (package-with-python2 python-sphinx-cloud-sptheme))
9964 (define-public python-sphinx-alabaster-theme
9966 (name "python-sphinx-alabaster-theme")
9970 (uri (pypi-uri "alabaster" version))
9973 "027anxzcb951gjlcc43y3rbn9qrw36d16vj9wd2smv5410xx9bs7"))))
9974 (build-system python-build-system)
9976 `(("python-pygments" ,python-pygments)))
9977 (home-page "https://alabaster.readthedocs.io/")
9978 (synopsis "Configurable sidebar-enabled Sphinx theme")
9979 (description "Alabaster is a visually (c)lean, responsive, configurable
9980 theme for the Sphinx documentation system. It's the default theme of Sphinx.")
9981 (license license:bsd-3)))
9983 (define-public python2-sphinx-alabaster-theme
9984 (package-with-python2 python-sphinx-alabaster-theme))
9986 (define-public python-setproctitle
9988 (name "python-setproctitle")
9993 (uri (pypi-uri "setproctitle" version))
9996 "163kplw9dcrw0lffq1bvli5yws3rngpnvrxrzdw89pbphjjvg0v2"))))
9997 (build-system python-build-system)
10000 (modify-phases %standard-phases
10001 (add-before 'check 'patch-Makefile
10002 ;; Stricly this is only required for the python2 variant.
10003 ;; But adding a phase in an inherited package seems to be
10004 ;; cumbersum. So we patch even for python3.
10006 (let ((nose (assoc-ref %build-inputs "python2-nose")))
10008 (substitute* "Makefile"
10009 (("\\$\\(PYTHON\\) [^ ]which nosetests[^ ] ")
10010 (string-append nose "/bin/nosetests "))))
10014 (setenv "PYTHON" (or (which "python3") (which "python")))
10015 (setenv "PYCONFIG" (or (which "python3-config")
10016 (which "python-config")))
10017 (setenv "CC" "gcc")
10018 ;; No need to extend PYTHONPATH to find the built package, since
10019 ;; the Makefile will build anyway
10020 (zero? (system* "make" "check")))))))
10022 `(("procps" ,procps))) ; required for tests
10024 "https://github.com/dvarrazzo/py-setproctitle")
10026 "Setproctitle implementation for Python to customize the process title")
10027 (description "The library allows a process to change its title (as displayed
10028 by system tools such as ps and top).
10030 Changing the title is mostly useful in multi-process systems, for
10031 example when a master process is forked: changing the children's title
10032 allows to identify the task each process is busy with. The technique
10033 is used by PostgreSQL and the OpenSSH Server for example.")
10034 (license license:bsd-3)
10035 (properties `((python2-variant . ,(delay python2-setproctitle))))))
10037 (define-public python2-setproctitle
10038 (let ((base (package-with-python2
10039 (strip-python2-variant python-setproctitle))))
10042 (native-inputs `(("python2-nose" ,python2-nose)
10043 ,@(package-native-inputs base))))))
10045 (define-public python-validictory
10047 (name "python-validictory")
10052 (uri (pypi-uri "validictory" version))
10055 "1zf1g9sw47xzp5f80bd94pb42j9yqv82lcrgcvdwr6nkaphfi37q"))))
10056 (build-system python-build-system)
10059 (modify-phases %standard-phases
10060 (add-after 'unpack 'bootstrap
10061 ;; Move the tests out of the package directory to avoid
10064 (rename-file "validictory/tests" "tests")
10065 (delete-file "tests/__init__.py")))
10068 ;; Extend PYTHONPATH so the built package will be found.
10069 (setenv "PYTHONPATH"
10070 (string-append (getcwd) "/build/lib:"
10071 (getenv "PYTHONPATH")))
10072 (zero? (system* "py.test" "-vv" )))))))
10074 `(("python-pytest" ,python-pytest)))
10076 "https://github.com/jamesturk/validictory")
10077 (synopsis "General purpose Python data validator")
10078 (description "It allows validation of arbitrary Python data structures.
10080 The schema format is based on the JSON Schema
10081 proposal (http://json-schema.org), so combined with json the library is also
10082 useful as a validator for JSON data.")
10083 (license license:expat)))
10085 (define-public python2-validictory
10086 (package-with-python2 python-validictory))
10088 (define-public python-pyev
10090 (name "python-pyev")
10095 (uri (pypi-uri "pyev" version))
10098 "0rf603lc0s6zpa1nb25vhd8g4y337wg2wyz56i0agsdh7jchl0sx"))))
10099 (build-system python-build-system)
10101 `(#:tests? #f ; no test suite
10103 (modify-phases %standard-phases
10104 (add-after 'unpack 'patch
10105 (lambda* (#:key inputs #:allow-other-keys)
10106 (let ((libev (string-append (assoc-ref inputs "libev")
10107 "/lib/libev.so.4")))
10108 (substitute* "setup.py"
10109 (("libev_dll_name = find_library\\(\\\"ev\\\"\\)")
10110 (string-append "libev_dll_name = \"" libev "\"")))))))))
10112 `(("libev" ,libev)))
10113 (home-page "http://pythonhosted.org/pyev/")
10114 (synopsis "Python libev interface")
10115 (description "Pyev provides a Python interface to libev.")
10116 (license license:gpl3)))
10118 (define-public python2-pyev
10119 (package-with-python2 python-pyev))
10121 (define-public python-imagesize
10123 (name "python-imagesize")
10128 (uri (pypi-uri "imagesize" version))
10131 "0qk07k0z4241lkzzjji7z4da04pcvg7bfc4xz1934zlqhwmwdcha"))))
10132 (build-system python-build-system)
10134 '(;; Test files are not distributed on PyPi:
10135 ;; https://github.com/shibukawa/imagesize_py/issues/7
10137 (home-page "https://github.com/shibukawa/imagesize_py")
10138 (synopsis "Gets image size of files in variaous formats in Python")
10140 "This package allows determination of image size from
10141 PNG, JPEG, JPEG2000 and GIF files in pure Python.")
10142 (license license:expat)))
10144 (define-public python2-imagesize
10145 (package-with-python2 python-imagesize))
10147 (define-public python-termstyle
10149 (name "python-termstyle")
10154 (uri (pypi-uri "termstyle" version))
10157 "17wzkkcqy5zc0g68xlad3kcv66iw14d2pwqc0h9420gak0vbhx7g"))))
10158 (build-system python-build-system)
10161 (modify-phases %standard-phases
10164 (zero? (system* "python" "test3.py")))))))
10165 (home-page "https://github.com/gfxmonk/termstyle")
10166 (synopsis "Console text coloring for Python")
10167 (description "This package provides console text coloring for Python.")
10168 (license license:bsd-3)))
10170 (define-public python-argcomplete
10172 (name "python-argcomplete")
10177 (uri (pypi-uri "argcomplete" version))
10180 "11bwiw6j0nilgz81xnw6f1npyga3prp8asjqrm87cdr3ria5l03x"))))
10181 (build-system python-build-system)
10183 `(("python-pexpect" ,python-pexpect)
10185 ("bash-full" ,bash))) ;full Bash for 'test_file_completion'
10186 (home-page "https://github.com/kislyuk/argcomplete")
10187 (synopsis "Shell tab completion for Python argparse")
10188 (description "argcomplete provides extensible command line tab completion
10189 of arguments and options for Python scripts using @code{argparse}. It's
10190 particularly useful for programs with many options or sub-parsers that can
10191 dynamically suggest completions; for example, when browsing resources over the
10193 (license license:asl2.0)))
10195 (define-public python2-argcomplete
10196 (package-with-python2 python-argcomplete))
10198 (define-public python-xopen
10200 (name "python-xopen")
10205 (uri (pypi-uri "xopen" version))
10208 "0bzjmn3rl1cd3d2q39cjwnkhaspk2b0hfj3rl64pclm44ihg5fb6"))
10209 (file-name (string-append name "-" version ".tar.gz"))))
10210 (build-system python-build-system)
10211 (home-page "https://github.com/marcelm/xopen/")
10212 (synopsis "Open compressed files transparently")
10213 (description "This module provides an @code{xopen} function that works like
10214 Python's built-in @code{open} function, but can also deal with compressed files.
10215 Supported compression formats are gzip, bzip2 and, xz, and are automatically
10216 recognized by their file extensions. The focus is on being as efficient as
10217 possible on all supported Python versions.")
10218 (license license:expat)))
10220 (define-public python2-xopen
10221 (package-with-python2 python-xopen))
10223 (define-public python2-cheetah
10225 (name "python2-cheetah")
10230 (uri (pypi-uri "Cheetah" version))
10233 "0l5mm4lnysjkzpjr95q5ydm9xc8bv43fxmr79ypybrf1y0lq4c5y"))))
10234 (build-system python-build-system)
10236 `(#:python ,python-2))
10238 `(("python2-markdown" ,python2-markdown)))
10239 (home-page "https://pythonhosted.org/Cheetah/")
10240 (synopsis "Template engine")
10241 (description "Cheetah is a text-based template engine and Python code
10244 Cheetah can be used as a standalone templating utility or referenced as
10245 a library from other Python applications. It has many potential uses,
10246 but web developers looking for a viable alternative to ASP, JSP, PHP and
10247 PSP are expected to be its principle user group.
10251 @item Generates HTML, SGML, XML, SQL, Postscript, form email, LaTeX, or any other
10253 @item Cleanly separates content, graphic design, and program code.
10254 @item Blends the power and flexibility of Python with a simple template language
10255 that non-programmers can understand.
10256 @item Gives template writers full access to any Python data structure, module,
10257 function, object, or method in their templates.
10258 @item Makes code reuse easy by providing an object-orientated interface to
10259 templates that is accessible from Python code or other Cheetah templates.
10260 One template can subclass another and selectively reimplement sections of it.
10261 @item Provides a simple, yet powerful, caching mechanism that can dramatically
10262 improve the performance of a dynamic website.
10263 @item Compiles templates into optimized, yet readable, Python code.
10265 (license (license:x11-style "file://LICENSE"))))
10267 (define-public python-dulwich
10269 (name "python-dulwich")
10274 (uri (list (string-append "https://www.dulwich.io/releases/"
10275 "dulwich-" version ".tar.gz")
10276 (pypi-uri "dulwich" version)))
10279 "1aa1xfrxkc3j9s4xi0llhf5gndyi9ryprcxsqfa5fcb8ph34981q"))))
10280 (build-system python-build-system)
10283 (modify-phases %standard-phases
10284 (add-before 'check 'fix-tests
10285 (lambda* (#:key inputs #:allow-other-keys)
10286 ;; The tests use Popen with a custom environment which doesn't
10288 (substitute* "dulwich/tests/compat/utils.py"
10289 (("'git'") (string-append "'"
10292 (substitute* '("dulwich/tests/test_repository.py"
10293 "dulwich/tests/test_hooks.py")
10294 (("#!/bin/sh") (string-append "#!" (which "sh"))))
10295 (setenv "TEST_RUNNER" "unittest")
10296 (setenv "PYTHONHASHSEED" "random")
10299 `(("python-fastimport" ,python-fastimport)))
10301 `(("python-mock" ,python-mock)
10302 ("python-geventhttpclient" ,python-geventhttpclient)
10304 (home-page "https://www.dulwich.io/")
10305 (synopsis "Git implementation in Python")
10306 (description "Dulwich is an implementation of the Git file formats and
10307 protocols written in pure Python.")
10308 ;; Can be used with either license.
10309 (license (list license:asl2.0 license:gpl2+))))
10311 (define-public python2-dulwich
10312 (package-with-python2 python-dulwich))
10314 (define-public python-pbkdf2
10316 (name "python-pbkdf2")
10321 (uri (pypi-uri "pbkdf2" version))
10324 "0yb99rl2mbsaamj571s1mf6vgniqh23v98k4632150hjkwv9fqxc"))))
10325 (build-system python-build-system)
10328 (modify-phases %standard-phases
10331 (setenv "PYTHONPATH"
10332 (string-append (getcwd) "/build/lib:"
10333 (getenv "PYTHONPATH")))
10334 (zero? (system* "python" "test/test_pbkdf2.py")))))))
10336 `(("python-pycrypto" ,python-pycrypto))) ; optional
10337 (home-page "https://www.dlitz.net/software/python-pbkdf2/")
10338 (synopsis "Password-based key derivation")
10339 (description "This module implements the password-based key derivation
10340 function, PBKDF2, specified in RSA PKCS#5 v2.0.
10342 PKCS#5 v2.0 Password-Based Key Derivation is a key derivation function which
10343 is part of the RSA Public Key Cryptography Standards series. The provided
10344 implementation takes a password or a passphrase and a salt value (and
10345 optionally a iteration count, a digest module, and a MAC module) and provides
10346 a file-like object from which an arbitrarly-sized key can be read.")
10347 (license license:expat)))
10349 (define-public python2-pbkdf2
10350 (package-with-python2 python-pbkdf2))
10352 (define-public python-qrcode
10354 (name "python-qrcode")
10359 (uri (pypi-uri "qrcode" version))
10362 "0kljfrfq0c2rmxf8am57333ia41kd0snbm2rnqbdy816hgpcq5a1"))))
10363 (build-system python-build-system)
10365 ;; FIXME: Tests require packaging 'pymaging'.
10368 `(("python-lxml" ,python-lxml) ; for SVG output
10369 ("python-pillow" ,python-pillow) ; for PNG output
10370 ("python-six" ,python-six)))
10371 (home-page "https://github.com/lincolnloop/python-qrcode")
10372 (synopsis "QR Code image generator")
10373 (description "This package provides a pure Python QR Code generator
10374 module. It uses the Python Imaging Library (PIL) to allow for the generation
10377 In addition this package provides a command line tool to generate QR codes and
10378 either write these QR codes to a file or do the output as ascii art at the
10380 (license license:bsd-3)))
10382 (define-public python2-qrcode
10383 (package-with-python2 python-qrcode))
10385 (define-public python-rst2ansi
10387 (name "python-rst2ansi")
10392 (uri (pypi-uri "rst2ansi" version))
10395 "0vzy6gd60l79ff750scl0sz48r1laalkl6md6dwzah4dcadgn5qv"))))
10396 (build-system python-build-system)
10398 `(("python-docutils" ,python-docutils)))
10399 (home-page "https://github.com/Snaipe/python-rst-to-ansi")
10400 (synopsis "Convert RST to ANSI-decorated console output")
10402 "Python module dedicated to rendering RST (reStructuredText) documents
10403 to ansi-escaped strings suitable for display in a terminal.")
10404 (license license:expat)))
10406 (define-public python-ansi2html
10408 (name "python-ansi2html")
10413 (uri (pypi-uri "ansi2html" version))
10416 "1wa00zffprb78w1mqq90dk47czz1knanys2a40zbw2vyapd5lp9y"))))
10417 (build-system python-build-system)
10419 `(("python-mock" ,python-mock)
10420 ("python-nose" ,python-nose)))
10422 `(("python-six" ,python-six)))
10423 (home-page "https://github.com/ralphbean/ansi2html")
10424 (synopsis "Convert ANSI-decorated console output to HTML")
10426 "@command{ansi2html} is a Python library and command line utility for
10427 convering text with ANSI color codes to HTML or LaTeX.")
10428 (license license:gpl3+)))
10430 (define-public python2-ansi2html
10431 (package-with-python2 python-ansi2html))
10433 (define-public python-ddt
10435 (name "python-ddt")
10440 (uri (pypi-uri "ddt" version))
10443 "1wqkmz0yhanly8sif5vb02p2iik7mwxwph8ywph2kbb8ws8szdpx"))))
10444 (build-system python-build-system)
10446 `(("python-mock" ,python-mock)
10447 ("python-nose" ,python-nose)))
10449 `(("python-six" ,python-six)
10450 ("python-pyyaml" ,python-pyyaml)))
10451 (home-page "https://github.com/txels/ddt")
10452 (synopsis "Data-Driven Tests")
10454 "Data-Driven Tests (@dfn{DDT}) allow you to multiply one test case by
10455 running it with different test data, and make it appear as multiple test
10457 (license license:expat)))
10459 (define-public python2-ddt
10460 (package-with-python2 python-ddt))
10462 (define-public python-pycosat
10464 (name "python-pycosat")
10469 (uri (pypi-uri "pycosat" version))
10472 "1kl3wh1f47rc712n4bmwplbx3fqz3x9i1b587jrbpmvdva4c8f6l"))))
10473 ;; TODO: Unundle picosat. http://fmv.jku.at/picosat/
10474 (build-system python-build-system)
10475 (home-page "https://github.com/ContinuumIO/pycosat")
10476 (synopsis "Bindings to picosat (a SAT solver)")
10478 "This package provides efficient Python bindings to @code{picosat} on
10479 the C level. When importing pycosat, the @code{picosat} solver becomes part
10480 of the Python process itself. @code{picosat} is a @dfn{Boolean Satisfiability
10481 Problem} (SAT) solver.")
10482 (license license:expat)))
10484 (define-public python2-pycosat
10485 (package-with-python2 python-pycosat))
10487 (define-public python2-ruamel.ordereddict
10489 (name "python2-ruamel.ordereddict")
10494 (uri (pypi-uri "ruamel.ordereddict" version))
10497 "1xmkl8v9l9inm2pyxgc1fm5005yxm7fkd5gv74q7lj1iy5qc8n3h"))))
10498 (build-system python-build-system)
10500 `(#:python ,python-2
10502 (modify-phases %standard-phases
10504 (add-after 'install 'check
10505 (lambda* (#:key inputs outputs #:allow-other-keys)
10506 (add-installed-pythonpath inputs outputs)
10507 (zero? (system* "python" "test/testordereddict.py")))))))
10508 (home-page "https://bitbucket.org/ruamel/ordereddict")
10509 (synopsis "Version of dict that keeps keys in insertion order")
10511 "This is an implementation of an ordered dictionary with @dfn{Key
10512 Insertion Order} (KIO: updates of values do not affect the position of the
10513 key), @dfn{Key Value Insertion Order} (KVIO, an existing key's position is
10514 removed and put at the back). The standard library module @code{OrderedDict},
10515 implemented later, implements a subset of @code{ordereddict} functionality.
10516 Sorted dictionaries are also provided. Currently only with @dfn{Key Sorted
10517 Order} (KSO, no sorting function can be specified, but a transform can be
10518 specified to apply on the key before comparison (e.g. @code{string.lower})).")
10519 (license license:expat)))
10521 (define-public python-pypeg2
10523 (name "python-pypeg2")
10528 (uri (pypi-uri "pyPEG2" version))
10531 "0v8ziaam2r637v94ra4dbjw6jzxz99gs5x4i585kgag1v204yb9b"))))
10532 (build-system python-build-system)
10533 (propagated-inputs `(("python-lxml" ,python-lxml)))
10535 ;;https://bitbucket.org/fdik/pypeg/issues/36/test-failures-on-py35
10537 (home-page "https://fdik.org/pyPEG/")
10538 (synopsis "Parsering Expression Grammars in Python")
10539 (description "PyPEG is an intrinsic parser interpreter framework for
10540 Python. It is based on Parsing Expression Grammars, PEG. With pyPEG you can
10541 parse many formal languages.")
10542 (license license:gpl2)))
10544 (define-public python-incremental
10546 (name "python-incremental")
10551 (uri (pypi-uri "incremental" version))
10554 "1cylxdz1cnkm5g3pklna3h2n0i0rks95ir1pnpxfnvpkmab1cxbv"))))
10555 (build-system python-build-system)
10556 (home-page "https://github.com/hawkowl/incremental")
10557 (synopsis "Library for versioning Python projects")
10558 (description "Incremental is a small library that versions your Python
10560 (license license:expat)))
10562 (define-public python2-incremental
10563 (package-with-python2 python-incremental))
10565 (define-public python-automat
10567 (name "python-automat")
10571 (uri (pypi-uri "Automat" version))
10574 "1a7nsrljysfmdqmpn2apfa1gg6rfah4y9sizvns8gb08rx7d07rw"))))
10575 (build-system python-build-system)
10576 ;; We disable the tests because they require python-twisted, while
10577 ;; python-twisted depends on python-automat. Twisted is optional, but the
10578 ;; tests fail if it is not available. Also see
10579 ;; <https://github.com/glyph/automat/issues/71>.
10580 (arguments '(#:tests? #f))
10582 `(("python-m2r" ,python-m2r)
10583 ("python-setuptools-scm" ,python-setuptools-scm)
10584 ("python-graphviz" ,python-graphviz)))
10586 `(("python-six" ,python-six)
10587 ("python-attrs" ,python-attrs)))
10588 (home-page "https://github.com/glyph/Automat")
10589 (synopsis "Self-service finite-state machines")
10590 (description "Automat is a library for concise, idiomatic Python
10591 expression of finite-state automata (particularly deterministic finite-state
10593 (license license:expat)))
10595 (define-public python2-automat
10596 (package-with-python2 python-automat))
10598 (define-public python-m2r
10600 (name "python-m2r")
10604 (uri (pypi-uri "m2r" version))
10607 "1axrwnf425sz4qz3c0qc7yhhki4myzb8rki7pczcsgzznzmqdyxd"))))
10608 (build-system python-build-system)
10610 `(("python-docutils" ,python-docutils)
10611 ("python-mistune" ,python-mistune)))
10613 `(("python-pygments" ,python-pygments)
10614 ("python-mock" ,python-mock)))
10615 (home-page "https://github.com/miyakogi/m2r")
10616 (synopsis "Markdown to reStructuredText converter")
10617 (description "M2R converts a markdown file including reST markups to valid
10619 (license license:expat)))
10621 (define-public python2-m2r
10622 (package-with-python2 python-m2r))
10624 (define-public python-constantly
10626 (name "python-constantly")
10630 (uri (pypi-uri "constantly" version))
10633 "0dgwdla5kfpqz83hfril716inm41hgn9skxskvi77605jbmp4qsq"))))
10634 (build-system python-build-system)
10635 (home-page "https://github.com/twisted/constantly")
10636 (synopsis "Symbolic constants in Python")
10637 (description "Constantly is a Python library that provides symbolic
10638 constant support. It includes collections and constants with text, numeric,
10639 and bit flag values.")
10640 (license license:expat)))
10642 (define-public python2-constantly
10643 (package-with-python2 python-constantly))
10645 (define-public python-attrs
10647 (name "python-attrs")
10651 (uri (pypi-uri "attrs" version))
10654 "04gx08ikpk26wnq22f7l42gapcvk8iz1512r927k6sadz6cinkax"))))
10655 (build-system python-build-system)
10657 `(("python-pytest" ,python-pytest)
10658 ("python-hypothesis" ,python-hypothesis)
10659 ("python-zope-interface" ,python-zope-interface)
10660 ("python-six" ,python-six)))
10661 (home-page "https://github.com/python-attrs/attrs/")
10662 (synopsis "Attributes without boilerplate")
10663 (description "@code{attrs} is a Python package with class decorators that
10664 ease the chores of implementing the most common attribute-related object
10666 (license license:expat)))
10668 (define-public python2-attrs
10669 (package-with-python2 python-attrs))
10671 (define-public python2-cliapp
10673 (name "python2-cliapp")
10674 (version "1.20170823")
10678 (uri (string-append
10679 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/cliapp/snapshot/cliapp-"
10680 version ".tar.gz"))
10683 "1i9gik0xrj6jmi95s5w988jl1y265baz5xm5pbqdyvsh8h9ln6yq"))))
10684 (build-system python-build-system)
10686 `(#:python ,python-2
10688 (modify-phases %standard-phases
10689 ;; check phase needs to be run before the build phase. If not,
10690 ;; coverage-test-runner looks for tests for the built source files,
10693 (add-before 'build 'check
10695 ;; Disable python3 tests
10696 (substitute* "check"
10697 (("python3") "# python3"))
10698 (zero? (system* "./check")))))))
10700 `(("python2-coverage-test-runner" ,python2-coverage-test-runner)
10701 ("python2-pep8" ,python2-pep8)))
10703 `(("python2-pyaml" ,python2-pyaml)))
10704 (home-page "https://liw.fi/cliapp/")
10705 (synopsis "Python framework for command line programs")
10706 (description "@code{python2-cliapp} is a python framework for
10707 command line programs. It contains the typical stuff such programs
10708 need to do, such as parsing the command line for options, and
10709 iterating over input files.")
10710 (license license:gpl2+)))
10712 (define-public python2-ttystatus
10714 (name "python2-ttystatus")
10719 (uri (string-append
10720 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/ttystatus/snapshot/ttystatus-"
10721 version ".tar.gz"))
10724 "0vivqbw7ddhsq1zj3g9cvvv4f0phl0pis2smsnwcr2szz2fk3hl6"))))
10725 (build-system python-build-system)
10727 `(("python2-coverage-test-runner" ,python2-coverage-test-runner)
10728 ("python2-pep8" ,python2-pep8)))
10730 `(#:python ,python-2
10732 (modify-phases %standard-phases
10733 ;; check phase needs to be run before the build phase. If not,
10734 ;; coverage-test-runner looks for tests for the built source files,
10737 (add-before 'build 'check
10739 (zero? (system* "make" "check")))))))
10740 (home-page "https://liw.fi/ttystatus/")
10741 (synopsis "Python library for showing progress reporting and
10742 status updates on terminals")
10743 (description "@code{python2-ttystatus} is a python library for
10744 showing progress reporting and status updates on terminals, for
10745 command line programs. Output is automatically adapted to the width
10746 of the terminal: truncated if it does not fit, and resized if the
10747 terminal size changes.")
10748 (license license:gpl3+)))
10750 (define-public python2-tracing
10752 (name "python2-tracing")
10757 (uri (string-append
10758 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/python-tracing/snapshot/tracing-"
10759 version ".tar.gz"))
10762 "06cw4zg42fsvqy372vi2whj26w56vzg5axhzwdjc2bgwf03garbw"))))
10763 (build-system python-build-system)
10765 `(#:python ,python-2))
10766 (home-page "https://liw.fi/tracing/")
10767 (synopsis "Python debug logging helper")
10768 (description "@code{python2-tracing} is a python library for
10769 logging debug messages. It provides a way to turn debugging messages
10770 on and off, based on the filename they occur in. It is much faster
10771 than using @code{logging.Filter} to accomplish the same thing, which
10772 matters when code is run in production mode. The actual logging still
10773 happens using the @code{logging} library.")
10774 (license license:gpl3+)))
10776 (define-public python2-larch
10778 (name "python2-larch")
10779 (version "1.20151025")
10783 (uri (string-append
10784 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/larch/snapshot/larch-"
10785 version ".tar.gz"))
10786 (patches (search-patches
10787 "python2-larch-coverage-4.0a6-compatibility.patch"))
10790 "1p4knkkavlqymgciz2wbcnfrdgdbafhg14maplnk4vbw0q8xs663"))))
10791 (build-system python-build-system)
10793 `(#:python ,python-2
10795 (modify-phases %standard-phases
10796 ;; check phase needs to be run before the build phase. If not,
10797 ;; coverage-test-runner looks for tests for the built source files,
10800 (add-before 'build 'check
10802 (zero? (system* "make" "check")))))))
10804 `(("cmdtest" ,cmdtest)
10805 ("python2-coverage-test-runner" ,python2-coverage-test-runner)))
10807 `(("python2-tracing" ,python2-tracing)))
10808 (home-page "https://liw.fi/larch/")
10809 (synopsis "Python copy-on-write B-tree library")
10810 (description "@code{python2-larch} is an implementation of
10811 particular kind of B-tree, based on research by Ohad Rodeh. See
10812 @url{http://liw.fi/larch/ohad-btrees-shadowing-clones.pdf} for details
10813 on the data structure.
10815 The distinctive feature of this B-tree is that a node is never
10816 (conceptually) modified. Instead, all updates are done by
10817 copy-on-write. This makes it easy to clone a tree, and modify only the
10818 clone, while other processes access the original tree.")
10819 (license license:gpl3+)))
10821 (define-public python-astroid
10823 (name "python-astroid")
10828 (uri (string-append
10829 "https://github.com/PyCQA/astroid/archive/astroid-"
10830 version ".tar.gz"))
10833 "0isn5p7f9n48hmksgbrj7dkm9dyglnayzn5jngk37qywg8a74ngn"))))
10834 (build-system python-build-system)
10836 `(("python-lazy-object-proxy" ,python-lazy-object-proxy)
10837 ("python-six" ,python-six)
10838 ("python-wrapt" ,python-wrapt)))
10841 (modify-phases %standard-phases
10844 (zero? (system* "python" "-m" "unittest" "discover"
10845 "-p" "unittest*.py")))))))
10846 (home-page "https://github.com/PyCQA/astroid")
10847 (synopsis "Common base representation of python source code for pylint and
10849 (description "@code{python-astroid} provides a common base representation
10850 of python source code for projects such as pychecker, pyreverse, pylint, etc.
10852 It provides a compatible representation which comes from the _ast module. It
10853 rebuilds the tree generated by the builtin _ast module by recursively walking
10854 down the AST and building an extended ast. The new node classes have
10855 additional methods and attributes for different usages. They include some
10856 support for static inference and local name scopes. Furthermore, astroid
10857 builds partial trees by inspecting living objects.")
10858 (license license:lgpl2.1+)
10859 (properties `((python2-variant . ,(delay python2-astroid))))))
10861 (define-public python2-astroid
10862 (let ((base (package-with-python2
10863 (strip-python2-variant python-astroid))))
10864 (package (inherit base)
10866 `(("python2-backports-functools-lru-cache"
10867 ,python2-backports-functools-lru-cache)
10868 ("python2-enum34" ,python2-enum34)
10869 ("python2-singledispatch" ,python2-singledispatch)
10870 ,@(package-propagated-inputs base))))))
10872 (define-public python-isort
10874 (name "python-isort")
10879 (uri (string-append
10880 "https://github.com/timothycrosley/isort/archive/"
10881 version ".tar.gz"))
10882 (file-name (string-append name "-" version ".tar.gz"))
10885 "0zsrgkb0krn5476yncy5dd56k7dk34zqb4bnlvwy44ixgilyjmfh"))))
10886 (build-system python-build-system)
10888 `(("python-mock" ,python-mock)
10889 ("python-pytest" ,python-pytest)))
10890 (home-page "https://github.com/timothycrosley/isort")
10891 (synopsis "Python utility/library to sort python imports")
10892 (description "@code{python-isort} is a python utility/library to sort
10893 imports alphabetically, and automatically separated into sections. It
10894 provides a command line utility, a python library and plugins for various
10896 (license license:expat)))
10898 (define-public python2-isort
10899 (package-with-python2 python-isort))
10901 (define-public python2-backports-functools-lru-cache
10903 (name "python2-backports-functools-lru-cache")
10908 ;; only the pypi tarballs contain the necessary metadata
10909 (uri (pypi-uri "backports.functools_lru_cache" version))
10912 "158ysf2hb0q4p4695abfiym9x1ywg0dgh8a3apd7gqaaxjy22jj4"))))
10913 (build-system python-build-system)
10915 `(("python2-setuptools-scm" ,python2-setuptools-scm)))
10917 `(#:python ,python-2))
10918 (home-page "https://github.com/jaraco/backports.functools_lru_cache")
10919 (synopsis "Backport of functools.lru_cache from Python 3.3")
10920 (description "@code{python2-backports-functools-lru-cache} is a backport
10921 of @code{functools.lru_cache} from python 3.3.")
10922 (license license:expat)))
10924 (define-public python-configparser
10926 (name "python-configparser")
10931 (uri (string-append
10932 "https://bitbucket.org/ambv/configparser/get/"
10933 version ".tar.bz2"))
10934 (file-name (string-append name "-" version ".tar.gz"))
10937 "0waq40as14abwzbb321hfz4vr1fi363nscy32ga14qvfygrg96wa"))))
10938 (build-system python-build-system)
10939 (home-page "http://docs.python.org/py3k/library/configparser.html")
10940 (synopsis "Backport of configparser from python 3.5")
10941 (description "@code{python-configparser} is a backport of
10942 @code{configparser} from Python 3.5 so that it can be used directly
10943 in other versions.")
10944 (license license:expat)))
10946 (define-public python2-configparser
10947 (package-with-python2 python-configparser))
10949 (define-public python-mando
10951 (name "python-mando")
10955 (uri (pypi-uri "mando" version))
10958 "0q6rl085q1hw1wic52pqfndr0x3nirbxnhqj9akdm5zhq2fv3zkr"))))
10959 (build-system python-build-system)
10961 `(("python-rst2ansi" ,python-rst2ansi)
10962 ("python-six" ,python-six)))
10964 `(("python-pytest" ,python-pytest)))
10965 (home-page "https://mando.readthedocs.org/")
10967 "Wrapper around argparse, allowing creation of complete CLI applications")
10969 "This package is a wrapper around argparse, allowing you to write complete CLI
10970 applications in seconds while maintaining all the flexibility.")
10971 (license license:expat)))
10973 (define-public python2-mando
10974 (package-with-python2 python-mando))
10976 (define-public python-fudge
10978 (name "python-fudge")
10979 ;; 0.9.6 is the latest version suitable for testing the "fabric" Python 2
10980 ;; package, which is currently the only use of this package.
10985 (uri (pypi-uri "fudge" version))
10988 "185ia3vr3qk4f2s1a9hdxb8ci4qc0x0xidrad96pywg8j930qs9l"))))
10989 (build-system python-build-system)
10991 `(#:tests? #f)) ;XXX: Tests require the NoseJS Python package.
10992 (home-page "https://github.com/fudge-py/fudge")
10993 (synopsis "Replace real objects with fakes/mocks/stubs while testing")
10995 "Fudge is a Python module for using fake objects (mocks and stubs) to
10998 In readable Python code, you declare the methods available on your fake object
10999 and how they should be called. Then you inject that into your application and
11000 start testing. This declarative approach means you don’t have to record and
11001 playback actions and you don’t have to inspect your fakes after running code.
11002 If the fake object was used incorrectly then you’ll see an informative
11003 exception message with a traceback that points to the culprit.")
11004 (license license:expat)))
11006 (define-public python2-fudge
11007 (package-with-python2 python-fudge))
11009 (define-public python-mwclient
11011 (name "python-mwclient")
11016 ;; The PyPI version wouldn't contain tests.
11017 (uri (string-append "https://github.com/mwclient/mwclient/archive/"
11018 "v" version ".tar.gz"))
11019 (file-name (string-append name "-" version ".tar.gz"))
11022 "1jj0yhilkjir00719fc7w133x7hdyhkxhk6xblla4asig45klsfv"))))
11023 (build-system python-build-system)
11025 `(("python-requests" ,python-requests)
11026 ("python-requests-oauthlib"
11027 ,python-requests-oauthlib)
11028 ("python-six" ,python-six)))
11030 `(("python-mock" ,python-mock)
11031 ("python-pytest" ,python-pytest)
11032 ("python-pytest-pep8" ,python-pytest-pep8)
11033 ("python-pytest-cache" ,python-pytest-cache)
11034 ("python-pytest-cov" ,python-pytest-cov)
11035 ("python-responses" ,python-responses)))
11036 (home-page "https://github.com/btongminh/mwclient")
11037 (synopsis "MediaWiki API client")
11038 (description "This package provides a MediaWiki API client.")
11039 (license license:expat)))
11041 (define-public python2-mwclient
11042 (package-with-python2 python-mwclient))
11044 (define-public python-utils
11046 (name "python-utils")
11050 (uri (pypi-uri "python-utils" version))
11053 "1mcsy6q5am4ya72rgkpb6kax6vv7c93cfkkas89xnpa4sj9zf28p"))))
11054 (build-system python-build-system)
11056 `(("pytest-runner" ,python-pytest-runner)
11057 ("pytest" ,python-pytest)
11058 ("six" ,python-six)))
11059 (home-page "https://github.com/WoLpH/python-utils")
11060 (synopsis "Convenient utilities not included with the standard Python install")
11062 "Python Utils is a collection of small Python functions and classes which
11063 make common patterns shorter and easier.")
11064 (license license:bsd-2)))
11066 (define-public python2-utils
11067 (package-with-python2 python-utils))
11069 (define-public python-sphinx-me
11071 (name "python-sphinx-me")
11076 (uri (pypi-uri "sphinx-me" version))
11079 "06jzgp213zihnvpcy2y5jy3ykid3apc2ncp2pg6a2g05lhiziglq"))))
11080 (build-system python-build-system)
11081 (home-page "https://github.com/stephenmcd/sphinx-me")
11082 (synopsis "Create a Sphinx documentation shell")
11084 "Create a Sphinx documentation shell for your project and include the
11085 README file as the documentation index. It handles extracting the required
11086 meta data such as the project name, author and version from your project for
11087 use in your Sphinx docs.")
11088 (license license:bsd-2)))
11090 (define-public python2-sphinx-me
11091 (package-with-python2 python-sphinx-me))
11093 (define-public python-diff-match-patch
11095 (name "python-diff-match-patch")
11096 (version "20121119")
11100 (uri (pypi-uri "diff-match-patch" version))
11103 "0k1f3v8nbidcmmrk65m7h8v41jqi37653za9fcs96y7jzc8mdflx"))))
11104 (build-system python-build-system)
11105 (home-page "https://code.google.com/p/google-diff-match-patch")
11106 (synopsis "Synchronize plain text")
11107 (description "Diff Match and Patch libraries offer robust algorithms to
11108 perform the operations required for synchronizing plain text.")
11109 (license license:asl2.0)))
11111 (define-public python2-diff-match-patch
11112 (package-with-python2 python-diff-match-patch))
11114 (define-public python-dirsync
11116 (name "python-dirsync")
11121 (uri (pypi-uri "dirsync" version ".zip"))
11124 "1hcdvmkwd5512zbxpin0k7bx5bkgzy3swjx7d0kj1y45af6r75v2"))))
11125 (build-system python-build-system)
11127 `(("unzip" ,unzip)))
11129 `(("six" ,python-six)))
11130 (home-page "https://bitbucket.org/tkhyn/dirsync")
11131 (synopsis "Advanced directory tree synchronisation tool")
11132 (description "Advanced directory tree synchronisation tool.")
11133 (license license:expat)))
11135 (define-public python2-dirsync
11136 (package-with-python2 python-dirsync))
11138 (define-public python-levenshtein
11140 (name "python-levenshtein")
11145 (uri (pypi-uri "python-Levenshtein" version))
11148 "1c9ybqcja31nghfcc8xxbbz9h60s9qi12b9hr4jyl69xbvg12fh3"))))
11149 (build-system python-build-system)
11150 (home-page "https://github.com/ztane/python-Levenshtein")
11151 (synopsis "Fast computation of Levenshtein distance and string similarity")
11153 "The Levenshtein Python C extension module contains functions for fast computation of
11155 @item Levenshtein (edit) distance, and edit operations
11156 @item string similarity
11157 @item approximate median strings, and generally string averaging
11158 @item string sequence and set similarity
11160 It supports both normal and Unicode strings.")
11161 (license license:gpl2+)))
11163 (define-public python2-levenshtein
11164 (package-with-python2 python-levenshtein))
11166 (define-public python-scandir
11168 (name "python-scandir")
11173 (uri (pypi-uri "scandir" version))
11175 (base32 "0gbnhjzg42rj87ljv9kb648rfxph69ly3c8r9841dxy4d7l5pmdj"))))
11176 (build-system python-build-system)
11178 `(#:phases (modify-phases %standard-phases
11181 (invoke "python" "test/run_tests.py"))))))
11182 (home-page "https://github.com/benhoyt/scandir")
11183 (synopsis "Directory iteration function")
11185 "Directory iteration function like os.listdir(), except that instead of
11186 returning a list of bare filenames, it yields DirEntry objects that include
11187 file type and stat information along with the name. Using scandir() increases
11188 the speed of os.walk() by 2-20 times (depending on the platform and file
11189 system) by avoiding unnecessary calls to os.stat() in most cases.
11191 This package is part of the Python standard library since version 3.5.")
11192 (license license:bsd-3)))
11194 (define-public python2-scandir
11195 (package-with-python2 python-scandir))
11197 (define-public python2-stemming
11199 (name "python2-stemming")
11204 (uri (pypi-uri "stemming" version))
11206 (base32 "0ldwa24gnnxhniv0fhygkpc2mwgd93q10ag8rvzayv6hw418frsr"))))
11207 (build-system python-build-system)
11209 `(#:python ,python-2))
11210 (home-page "https://bitbucket.org/mchaput/stemming/overview")
11211 (synopsis "Python implementations of various stemming algorithms")
11213 "Python implementations of the Porter, Porter2, Paice-Husk, and Lovins
11214 stemming algorithms for English. These implementations are straightforward and
11215 efficient, unlike some Python versions of the same algorithms available on the
11216 Web. This package is an extraction of the stemming code included in the Whoosh
11218 (license license:public-domain)))
11220 (define-public python-factory-boy
11222 (name "python-factory-boy")
11227 (uri (pypi-uri "factory_boy" version))
11229 (base32 "1fvin6san5xsjh2c4y18caj2lnmwxlylyqm8mh1yc6rp38wlwr56"))))
11230 (build-system python-build-system)
11232 ;; Tests are not included in the tarball.
11235 `(("faker" ,python-faker)))
11236 (home-page "https://github.com/benhoyt/scandir")
11237 (synopsis "Versatile test fixtures replacement")
11239 "Factory_boy is a fixtures replacement based on thoughtbot’s factory_girl.
11241 As a fixtures replacement tool, it aims to replace static, hard to maintain
11242 fixtures with easy-to-use factories for complex object.
11244 Instead of building an exhaustive test setup with every possible combination
11245 of corner cases, factory_boy allows you to use objects customized for the
11246 current test, while only declaring the test-specific fields")
11247 (license license:expat)))
11249 (define-public python2-factory-boy
11250 (package-with-python2 python-factory-boy))
11252 (define-public python-translate-toolkit
11254 (name "python-translate-toolkit")
11259 (uri (pypi-uri "translate-toolkit" version ".tar.bz2"))
11261 (base32 "1vlkwrg83vb17jc36pmwh2b7jphwf390lz0jw8hakcg16qhwypvq"))))
11262 (build-system python-build-system)
11264 `(("python-pytest" ,python-pytest)
11265 ("python-sphinx" ,python-sphinx)))
11267 `(("python-babel" ,python-babel)
11268 ("python-beautifulsoup4" ,python-beautifulsoup4)
11269 ("python-chardet" ,python-chardet)
11270 ("python-diff-match-patch" ,python-diff-match-patch)
11271 ("python-levenshtein" ,python-levenshtein)
11272 ("python-lxml" ,python-lxml)
11273 ("python-six" ,python-six)
11274 ("python-vobject" ,python-vobject)
11275 ("python-pyyaml" ,python-pyyaml)))
11277 ;; TODO: tests are not run, because they end with
11278 ;; TypeError: parse() missing 2 required positional arguments: 'tree' and
11280 ;; during test setup.
11282 (home-page "http://toolkit.translatehouse.org")
11283 (synopsis "Tools and API for translation and localization engineering")
11285 "Tools and API for translation and localization engineering. It contains
11286 several utilities, as well as an API for building localization tools.")
11287 (license license:gpl2+)))
11289 (define-public python2-translate-toolkit
11290 (package-with-python2 python-translate-toolkit))
11292 (define-public python-packaging
11294 (name "python-packaging")
11299 (uri (pypi-uri "packaging" version))
11302 "17k1xbjshackwvbsnxqixbph8rbqhz4bf4g3al5xyzhavxgq6l2x"))))
11303 (build-system python-build-system)
11305 `(("python-pretend" ,python-pretend)
11306 ("python-pytest" ,python-pytest)))
11308 `(("python-pyparsing" ,python-pyparsing)
11309 ("python-six" ,python-six)))
11310 (home-page "https://github.com/pypa/packaging")
11311 (synopsis "Core utilities for Python packages")
11312 (description "Packaging is a Python module for dealing with Python packages.
11313 It offers an interface for working with package versions, names, and dependency
11315 ;; From 'LICENSE': This software is made available under the terms of
11316 ;; *either* of the licenses found in LICENSE.APACHE or LICENSE.BSD.
11317 ;; Contributions to this software is made under the terms of *both* these
11319 (license (list license:asl2.0 license:bsd-2))))
11321 (define-public python2-packaging
11322 (package-with-python2 python-packaging))
11324 (define-public python-relatorio
11326 (name "python-relatorio")
11331 (uri (pypi-uri "relatorio" version))
11334 "1na6hlhz1awi1hbjg1gyclq0khz42iz90wvdjw7mmj655788bpxx"))))
11335 (build-system python-build-system)
11337 `(("python-lxml" ,python-lxml)
11338 ("python-genshi" ,python-genshi)))
11340 `(("python-magic" ,python-magic)))
11341 (home-page "https://relatorio.tryton.org/")
11342 (synopsis "Templating library able to output ODT and PDF files")
11343 (description "Relatorio is a templating library which provides a way to
11344 easily output ODT, ODS, PNG, SVG and several other kinds of files. Support
11345 for more filetypes can be easily added by creating plugins for them.")
11346 (license license:gpl3+)))
11348 (define-public python2-relatorio
11349 (package-with-python2 python-relatorio))
11351 (define-public python-radon
11353 (name "python-radon")
11358 (uri (pypi-uri "radon" version))
11361 "07gq5hq4nrffxnlnksws9hrx7fd001gam63j62i82gyfr23gvdym"))))
11362 (build-system python-build-system)
11364 `(#:phases (modify-phases %standard-phases
11367 (invoke "python" "radon/tests/run.py"))))))
11369 `(("python-colorama" ,python-colorama)
11370 ("python-flake8-polyfill" ,python-flake8-polyfill)
11371 ("python-mando" ,python-mando)))
11373 `(("python-pytest" ,python-pytest)
11374 ("python-pytest-mock" ,python-pytest-mock)))
11375 (home-page "https://radon.readthedocs.org/")
11376 (synopsis "Code Metrics in Python")
11377 (description "Radon is a Python tool which computes various code metrics.
11378 Supported metrics are:
11380 @item raw metrics: SLOC, comment lines, blank lines, &c.
11381 @item Cyclomatic Complexity (i.e. McCabe’s Complexity)
11382 @item Halstead metrics (all of them)
11383 @item the Maintainability Index (a Visual Studio metric)
11385 (license license:expat)))
11387 (define-public python2-radon
11388 (package-with-python2 python-radon))
11390 (define-public python-sure
11392 (name "python-sure")
11397 (uri (pypi-uri "sure" version))
11400 "1iyqsy2d6radi88g1qf0lziy5b39h5cpb3g5jiqyb4xi46ig3x1z"))))
11401 (build-system python-build-system)
11403 `(("python-mock" ,python-mock)
11404 ("python-six" ,python-six)))
11406 `(("python-nose" ,python-nose)))
11407 (home-page "https://github.com/gabrielfalcao/sure")
11408 (synopsis "Automated testing library in python for python")
11410 "Sure is a python library that leverages a DSL for writing assertions.
11411 Sure is heavily inspired by @code{RSpec Expectations} and @code{should.js}.")
11412 (license license:gpl3+)))
11414 (define-public python2-sure
11415 (package-with-python2 python-sure))
11417 (define-public python2-couleur
11418 ;; This package does not seem to support python3 at all, hence,
11419 ;; only the python2 variant definition is provided.
11421 (name "python2-couleur")
11426 (uri (pypi-uri "couleur" version))
11429 "1qqaxyqz74wvid0cr119dhcwz0h0if5b5by44zl49pd5z65v58k1"))))
11430 (build-system python-build-system)
11432 `(#:python ,python-2))
11433 (home-page "https://github.com/gabrielfalcao/couleur")
11435 "ANSI terminal tool for python, colored shell and other handy fancy features")
11437 "@code{Couleur} provides python programs a way to use the ANSI features in a unix
11438 terminal such as coloured output in the shell, overwriting output, indentation, etc.")
11439 ;; README.md says ASL2.0, but all source code headers are LGPL3+.
11440 ;; https://github.com/gabrielfalcao/couleur/issues/11
11441 (license license:lgpl3+)))
11443 (define-public python-misaka
11445 (name "python-misaka")
11450 (uri (pypi-uri "misaka" version))
11453 "1yqrq3a5rracirmvk52n28nn6ckdaz897gnigv89a9gmyn87sqw7"))))
11454 (build-system python-build-system)
11456 `(;; Line 37 of setup.py calls self.run_command('develop')
11457 ;; in the 'check' phase. This command seems to be trying
11459 ;; /gnu/store/...-python-<version>/lib/python<version>/site-packages/
11460 ;; for which it does not have the permission to write.
11463 `(("python-cffi" ,python-cffi)))
11464 (home-page "https://github.com/FSX/misaka")
11465 (synopsis "Python binding for Hoedown")
11467 "@code{Misaka} is a CFFI-based binding for @code{Hoedown}, a fast markdown processing
11468 library written in C. It features a fast HTML renderer and functionality to make custom
11469 renderers (e.g. man pages or LaTeX).")
11470 (license license:expat)))
11472 (define-public python2-misaka
11473 (package-with-python2 python-misaka))
11475 (define-public python2-steadymark
11476 ;; This is forced into being a python2 only variant
11477 ;; due to its dependence on couleur that has no support
11480 (name "python2-steadymark")
11485 (uri (pypi-uri "steadymark" version))
11488 "1640i9g8dycql3cc8j0bky0jkzj0q39blfbp4lsgpkprkfgcdk8v"))))
11489 (build-system python-build-system)
11491 `(("python-couleur" ,python2-couleur)
11492 ("python-sure" ,python2-sure)
11493 ("python-misaka" ,python2-misaka)))
11495 `(#:python ,python-2
11497 (modify-phases %standard-phases
11498 (add-before 'build 'patch-setup-py
11500 ;; Update requirements from dependency==version
11501 ;; to dependency>=version
11502 (substitute* "setup.py"
11505 (home-page "https://github.com/gabrielfalcao/steadymark")
11506 (synopsis "Markdown-based test runner for python")
11508 "@code{Steadymark} allows documentation to be written in github-flavoured
11509 markdown. The documentation may contain snippets of code surrounded by python
11510 code blocks and @code{Steadymark} will find these snippets and run them, making
11511 sure that there are no old malfunctional examples in the documentation examples.")
11512 (license license:expat)))
11514 (define-public python-jsonpointer
11516 (name "python-jsonpointer")
11521 (uri (pypi-uri "jsonpointer" version))
11524 "1cg0gvgqjysydv6p45v4jywg1jb3v48c7m3cbpi57zgf6nndr9cz"))))
11525 (build-system python-build-system)
11526 (home-page "https://github.com/stefankoegl/python-json-pointer")
11527 (synopsis "Identify specific nodes in a JSON document")
11528 (description "@code{jsonpointer} allows you to access specific nodes
11529 by path in a JSON document (see RFC 6901).")
11530 (license license:bsd-3)))
11532 (define-public python2-jsonpointer
11533 (package-with-python2 python-jsonpointer))
11535 (define-public python-jsonpatch
11537 (name "python-jsonpatch")
11542 ;; pypi version lacks tests.js
11543 (uri (string-append "https://github.com/stefankoegl/python-json-patch/"
11544 "archive/v" version ".tar.gz"))
11545 (file-name (string-append name "-" version ".tar.gz"))
11548 "085ykisl8v7mv9h7hvhdy3l2fjzs4214gx32r5k6nx4f76hbv6y5"))))
11549 (build-system python-build-system)
11551 `(("python-jsonpointer" ,python-jsonpointer)))
11552 (home-page "https://github.com/stefankoegl/python-json-patch")
11553 (synopsis "Applying JSON Patches in Python 2.6+ and 3.x")
11554 (description "@code{jsonpatch} is a library and program that allows
11555 applying JSON Patches according to RFC 6902.")
11556 (license license:bsd-3)))
11558 (define-public python2-jsonpatch
11559 (package-with-python2 python-jsonpatch))
11561 (define-public python-jsonpatch-0.4
11562 (package (inherit python-jsonpatch)
11563 (name "python-jsonpatch")
11568 (uri (string-append "https://github.com/stefankoegl/python-json-patch/"
11569 "archive/v" version ".tar.gz"))
11570 (file-name (string-append name "-" version ".tar.gz"))
11573 "0j0cd9z9zyp8kppp464jxrfgrnbgkzl1yi10i5gsv8yz6d95929d"))))))
11575 (define-public python2-jsonpatch-0.4
11576 (package-with-python2 python-jsonpatch-0.4))
11578 (define-public python-rfc3986
11580 (name "python-rfc3986")
11584 (uri (pypi-uri "rfc3986" version))
11587 "06wlmysw83f75ff84zr1yr6n0shvc2xn1n1sb4iwzqap9hf5fn44"))))
11588 (build-system python-build-system)
11590 `(#:modules ((guix build utils)
11591 (guix build python-build-system)
11596 (modify-phases %standard-phases
11599 (let ((cwd (getcwd)))
11600 (setenv "PYTHONPATH"
11601 (string-append cwd "/build/"
11602 (find (cut string-prefix? "lib" <>)
11603 (scandir (string-append cwd "/build")))
11605 (getenv "PYTHONPATH")))
11606 (invoke "pytest" "-v")))))))
11608 `(("python-pytest" ,python-pytest)))
11609 (home-page "https://rfc3986.readthedocs.io/")
11610 (synopsis "Parse and validate URI references")
11612 "@code{rfc3986} is a Python implementation of RFC@tie{}3986 including
11613 validation and authority parsing. This module also supports RFC@tie{}6874
11614 which adds support for zone identifiers to IPv6 addresses.")
11615 (license license:asl2.0)))
11617 (define-public python2-rfc3986
11618 (package-with-python2 python-rfc3986))
11620 (define-public python-rfc3987
11622 (name "python-rfc3987")
11627 (uri (pypi-uri "rfc3987" version))
11630 "192pclzs2y0yaywqkrlvd0x73740q310kvqvm6jldhi619mq59wi"))))
11631 (build-system python-build-system)
11632 (home-page "https://pypi.python.org/pypi/rfc3987")
11633 (synopsis "Parsing and validation of URIs (RFC 3986) and IRIs (RFC 3987)")
11634 (description "@code{rfc3987} provides routines for parsing and
11635 validation of URIs (see RFC 3986) and IRIs (see RFC 3987).")
11636 (license license:gpl3+)))
11638 (define-public python2-rfc3987
11639 (package-with-python2 python-rfc3987))
11641 (define-public python-validate-email
11643 (name "python-validate-email")
11648 (uri (pypi-uri "validate_email" version))
11651 "1bxffaf5yz2cph8ki55vdvdypbwkvn2xr1firlcy62vqbzf1jivq"))))
11652 (build-system python-build-system)
11653 (home-page "https://github.com/syrusakbary/validate_email")
11654 (synopsis "Verifies if an email address is valid and really exists")
11655 (description "@code{validate_email} can be used to verify if an email
11656 address is valid and really exists.")
11657 (license license:lgpl3+)))
11659 (define-public python2-validate-email
11660 (package-with-python2 python-validate-email))
11662 (define-public python-flex
11664 (name "python-flex")
11669 (uri (pypi-uri "flex" version))
11672 "00pamnwla3khk8nyla7y28dq9jnh69swd7f4jfsl7sn1izs8n8zk"))))
11673 (build-system python-build-system)
11675 `(("python-click" ,python-click)
11676 ("python-iso8601" ,python-iso8601)
11677 ("python-jsonpointer" ,python-jsonpointer)
11678 ("python-pyyaml" ,python-pyyaml)
11679 ("python-requests" ,python-requests)
11680 ("python-rfc3987" ,python-rfc3987)
11681 ("python-six" ,python-six)
11682 ("python-validate-email" ,python-validate-email)))
11683 (home-page "https://github.com/pipermerriam/flex")
11684 (synopsis "Validates Swagger schemata")
11685 (description "@code{flex} can be used to validate Swagger schemata.")
11686 (license license:bsd-3)))
11688 (define-public python2-flex
11689 (package-with-python2 python-flex))
11691 (define-public python-marshmallow
11693 (name "python-marshmallow")
11694 (version "3.0.0b3")
11698 (uri (pypi-uri "marshmallow" version))
11701 "07mcrij1yvk85lvgx44wwr9pc80xryghvlgayb057g1cazcypysd"))))
11702 (build-system python-build-system)
11704 `(("python-dateutil" ,python-dateutil)
11705 ("python-simplejson" ,python-simplejson)))
11707 `(("python-pytest" ,python-pytest)
11708 ("python-pytz" ,python-pytz)))
11709 (home-page "https://github.com/marshmallow-code/marshmallow")
11710 (synopsis "Convert complex datatypes to and from native
11711 Python datatypes.")
11712 (description "@code{marshmallow} provides a library for converting
11713 complex datatypes to and from native Python datatypes.")
11714 (license license:expat)))
11716 (define-public python2-marshmallow
11717 (package-with-python2 python-marshmallow))
11719 (define-public python-apispec
11721 (name "python-apispec")
11726 (uri (pypi-uri "apispec" version))
11729 "0kxa8723zbisx10363yh4mmmn4higxrspymbjfz5zq8f644zagm9"))))
11730 (build-system python-build-system)
11732 `(("python-pyyaml" ,python-pyyaml)))
11734 `(("python-pytest" ,python-pytest)
11735 ("python-flask" ,python-flask)
11736 ("python-marshmallow" ,python-marshmallow)
11737 ("python-tornado" ,python-tornado)
11738 ("python-bottle" ,python-bottle)
11739 ("python-mock" ,python-mock)))
11740 (home-page "https://github.com/marshmallow-code/apispec")
11741 (synopsis "Swagger 2.0 API specification generator")
11742 (description "@code{python-apispec} is a pluggable API specification
11743 generator. Currently supports the OpenAPI specification (f.k.a.
11745 (license license:expat)))
11747 (define-public python2-apispec
11748 (package-with-python2 python-apispec))
11750 (define-public python-flasgger
11752 (name "python-flasgger")
11757 (uri (string-append "https://github.com/rochacbruno/flasgger/archive/"
11758 version ".tar.gz"))
11759 (file-name (string-append name "-" version ".tar.gz"))
11762 "1gqzlm0rb55fdpsy5ipkganlx9cnpi454fqyycr03jm22zql14ay"))))
11763 (build-system python-build-system)
11766 (modify-phases %standard-phases
11768 (lambda* (#:key inputs outputs #:allow-other-keys)
11769 (substitute* "Makefile"
11770 (("flake8 flasgger --ignore=F403")
11771 "flake8 flasgger --ignore=E731,F403"))
11772 (setenv "PYTHONPATH" (string-append (getcwd)
11774 (getenv "PYTHONPATH")))
11775 (zero? (system* "py.test")))))))
11777 `(("python-flask" ,python-flask)
11778 ("python-pyyaml" ,python-pyyaml)
11779 ("python-jsonschema" ,python-jsonschema)
11780 ("python-mistune" ,python-mistune)
11781 ("python-six" ,python-six)))
11783 `(("python-decorator" ,python-decorator)
11784 ("python-flake8" ,python-flake8)
11785 ("python-flask-restful" ,python-flask-restful)
11786 ("python-flex" ,python-flex)
11787 ("python-pytest" ,python-pytest)
11788 ("python-pytest-cov" ,python-pytest-cov)
11789 ("python-marshmallow" ,python-marshmallow)
11790 ("python-apispec" ,python-apispec)))
11791 (home-page "https://github.com/rochacbruno/flasgger/")
11792 (synopsis "Extract Swagger specs from your Flask project")
11793 (description "@code{python-flasgger} allows extracting Swagger specs
11794 from your Flask project. It is a fork of Flask-Swagger.")
11795 (license license:expat)))
11797 (define-public python2-flasgger
11798 (package-with-python2 python-flasgger))
11800 (define-public python-swagger-spec-validator
11802 (name "python-swagger-spec-validator")
11807 (uri (pypi-uri "swagger-spec-validator" version))
11810 "13hkpn2lycwr0468yqhjb3kwszqf7hjwlq61w7vdxq1caz31k4nw"))))
11811 (build-system python-build-system)
11813 `(("python-jsonschema" ,python-jsonschema)
11814 ("python-six" ,python-six)))
11816 "https://github.com/Yelp/swagger_spec_validator")
11817 (synopsis "Validation of Swagger specifications")
11818 (description "@code{swagger_spec_validator} provides a library for
11819 validating Swagger API specifications.")
11820 (license license:asl2.0)))
11822 (define-public python2-swagger-spec-validator
11823 (package-with-python2 python-swagger-spec-validator))
11825 (define-public python-apache-libcloud
11827 (name "python-apache-libcloud")
11832 (uri (pypi-uri "apache-libcloud" version))
11835 "1a71z02ckcxld72k4qgmdnkjan52c4wczncs3p2mp5yafh7dsan7"))))
11836 (build-system python-build-system)
11839 (modify-phases %standard-phases
11840 (add-after 'unpack 'patch-ssh
11841 (lambda* (#:key inputs #:allow-other-keys)
11842 (substitute* "libcloud/compute/ssh.py"
11843 (("'ssh'") (string-append "'" (assoc-ref inputs "openssh")
11846 (add-after 'unpack 'patch-tests
11848 (substitute* "./libcloud/test/test_file_fixtures.py"
11849 ;; See <https://issues.apache.org/jira/browse/LIBCLOUD-923>.
11850 (("def _ascii") "def _raw_data(self, method, url, body, headers):
11851 return (httplib.OK,
11853 {\"test\": \"value\"},
11854 httplib.responses[httplib.OK])
11856 (substitute* "libcloud/test/compute/test_ssh_client.py"
11857 (("class ShellOutSSHClientTests")
11858 "@unittest.skip(\"Guix container doesn't have ssh service\")
11859 class ShellOutSSHClientTests")
11860 ;; See <https://issues.apache.org/jira/browse/LIBCLOUD-924>.
11861 (("'.xf0.x90.x8d.x88'") "b'\\xF0\\x90\\x8D\\x88'")
11862 (("'.xF0', '.x90', '.x8D', '.x88'")
11863 "b'\\xF0', b'\\x90', b'\\x8D', b'\\x88'"))
11866 `(("openssh" ,openssh)))
11868 `(("python-paramiko" ,python-paramiko)
11869 ("python-requests" ,python-requests)))
11871 `(("python-lockfile" ,python-lockfile)
11872 ("python-mock" ,python-mock)
11873 ("python-requests-mock" ,python-requests-mock)))
11874 (home-page "https://libcloud.apache.org/")
11875 (synopsis "Unified Cloud API")
11876 (description "@code{libcloud} is a Python library for interacting with
11877 many of the popular cloud service providers using a unified API.")
11878 (license license:asl2.0)))
11880 (define-public python2-apache-libcloud
11881 (package-with-python2 python-apache-libcloud))
11883 (define-public python-smmap2
11885 (name "python-smmap2")
11890 (uri (pypi-uri "smmap2" version))
11893 "1hvn28p3zvxa98sbi9lrqvv2ps4q284j4jq9a619zw0m7yv0sly7"))))
11894 (build-system python-build-system)
11896 `(("python-nosexcover" ,python-nosexcover)))
11897 (home-page "https://github.com/Byron/smmap")
11898 (synopsis "Python sliding window memory map manager")
11899 (description "@code{smmap2} is a pure Python implementation of a sliding
11900 window memory map manager.")
11901 (license license:bsd-3)))
11903 (define-public python2-smmap2
11904 (package-with-python2 python-smmap2))
11906 (define-public python-regex
11908 (name "python-regex")
11909 (version "2017.06.07")
11912 (uri (pypi-uri "regex" version))
11915 "06r6b7yigikbj3a72whl85r2b64pj1r0ypmw9yalmkm0wnxq8mz4"))))
11916 (build-system python-build-system)
11917 (home-page "https://bitbucket.org/mrabarnett/mrab-regex")
11918 (synopsis "Alternative regular expression module")
11919 (description "This regular expression implementation is backwards-
11920 compatible with the standard @code{re} module, but offers additional
11921 functionality like full case-folding for case-insensitive matches in Unicode.")
11922 (license license:psfl)))
11924 (define-public python2-regex
11925 (package-with-python2 python-regex))
11927 (define-public python2-pyopengl
11929 (name "python2-pyopengl")
11934 (uri (pypi-uri "PyOpenGL" version))
11937 "1byxjj6a8rwzhxhjqlc588zdad2qwxdd7vlam2653ylll31waiwv"))))
11939 `(#:python ,python-2))
11940 (build-system python-build-system)
11941 (home-page "http://pyopengl.sourceforge.net")
11942 (synopsis "Standard OpenGL bindings for Python")
11944 "PyOpenGL is the most common cross platform Python binding to OpenGL and
11945 related APIs. The binding is created using the standard @code{ctypes}
11947 (license license:bsd-3)))
11949 (define-public python2-pyopengl-accelerate
11951 (inherit python2-pyopengl)
11952 (name "python2-pyopengl-accelerate")
11957 (uri (pypi-uri "PyOpenGL-accelerate" version))
11960 "0464c1ifzk0k92lyndikmvzjgnx1y25r7bkkc8pnxm4kp1q4czwj"))))
11961 (synopsis "Acceleration code for PyOpenGL")
11963 "This is the Cython-coded accelerator module for PyOpenGL.")))
11965 (define-public python-rencode
11967 (name "python-rencode")
11972 (uri (pypi-uri "rencode" version))
11975 "08if5yax1xn5yfp8p3765ccjmfcv9di7i4m5jckgnwvdsgznwkbj"))))
11976 (build-system python-build-system)
11977 (native-inputs `(("pkg-config" ,pkg-config)
11978 ("python-cython" ,python-cython)))
11979 (home-page "https://github.com/aresch/rencode")
11980 (synopsis "Serialization of heterogeneous data structures")
11982 "The @code{rencode} module is a data structure serialization library,
11983 similar to @code{bencode} from the BitTorrent project. For complex,
11984 heterogeneous data structures with many small elements, r-encoding stake up
11985 significantly less space than b-encodings. This version of rencode is a
11986 complete rewrite in Cython to attempt to increase the performance over the
11987 pure Python module.")
11988 (license license:bsd-3)))
11990 (define-public python2-rencode
11991 (package-with-python2 python-rencode))
11993 (define-public python-xenon
11995 (name "python-xenon")
12000 (uri (pypi-uri "xenon" version))
12003 "14kby2y48vp3sgwxqlm5d5789yibqwb1qli5fwcmdqg3iayrbklc"))))
12004 (build-system python-build-system)
12006 `(("python-pyyaml" ,python-pyyaml)
12007 ("python-radon" ,python-radon)
12008 ("python-requests" ,python-requests)
12009 ("python-flake8" ,python-flake8)
12010 ("python-tox" ,python-tox)))
12013 (modify-phases %standard-phases
12014 (add-before 'build 'patch-test-requirements
12015 (lambda* (#:key inputs #:allow-other-keys)
12016 ;; Update requirements from dependency==version to
12017 ;; dependency>=version.
12018 (substitute* "requirements.txt"
12021 ;; Remove httpretty dependency for tests.
12022 (substitute* "setup.py"
12023 (("httpretty") ""))
12025 (home-page "https://xenon.readthedocs.org/")
12026 (synopsis "Monitor code metrics for Python on your CI server")
12028 "Xenon is a monitoring tool based on Radon. It monitors code complexity.
12029 Ideally, @code{xenon} is run every time code is committed. Through command
12030 line options, various thresholds can be set for the complexity of code. It
12031 will fail (i.e. it will exit with a non-zero exit code) when any of these
12032 requirements is not met.")
12033 (license license:expat)))
12035 (define-public python2-xenon
12036 (package-with-python2 python-xenon))
12038 (define-public python-pysocks
12040 (name "python-pysocks")
12045 (uri (pypi-uri "PySocks" version))
12048 "1krkiss578zqwcg4c8iqz1hwscwhsvy2djp3xyvps5gsgvr2j0yh"))))
12049 (build-system python-build-system)
12050 (arguments `(#:tests? #f))
12051 (home-page "https://github.com/Anorov/PySocks")
12052 (synopsis "SOCKS client module")
12053 (description "@code{pysocks} is an updated and semi-actively maintained
12054 version of @code{SocksiPy} with bug fixes and extra features.")
12055 (license license:bsd-3)))
12057 (define-public python2-pysocks
12058 (package-with-python2 python-pysocks))
12060 (define-public python-pydiff
12062 (name "python-pydiff")
12067 (uri (pypi-uri "pydiff" version))
12070 "1als83h9w0gab24ipyna6khm390qmpnpkc5jksmdbs2xc8hp2z44"))))
12071 (build-system python-build-system)
12072 (home-page "https://github.com/myint/pydiff")
12073 (synopsis "Library to diff two Python files at the bytecode level")
12075 "@code{pydiff} makes it easy to look for actual code changes while
12076 ignoring formatting changes.")
12077 (license license:expat)))
12079 (define-public python2-pydiff
12080 (package-with-python2 python-pydiff))
12082 (define-public python-tqdm
12084 (name "python-tqdm")
12089 (uri (pypi-uri "tqdm" version))
12092 "1pw0ngm0zn9papdmkwipi3yih5c3di6d0w849bdmrraq4d2d9h2y"))))
12093 (build-system python-build-system)
12095 `(("python-flake8" ,python-flake8)
12096 ("python-nose" ,python-nose)
12097 ("python-coverage" ,python-coverage)))
12098 (home-page "https://github.com/tqdm/tqdm")
12099 (synopsis "Fast, extensible progress meter")
12101 "Make loops show a progress bar on the console by just wrapping any
12102 iterable with @code{|tqdm(iterable)|}. Offers many options to define
12103 design and layout.")
12104 (license (list license:mpl2.0 license:expat))))
12106 (define-public python2-tqdm
12107 (package-with-python2 python-tqdm))
12109 (define-public python-pkginfo
12111 (name "python-pkginfo")
12116 (uri (pypi-uri "pkginfo" version))
12119 "0x6lm17p1ks031mj6pajyp4rkq74vpqq8qwjb7ikgwmkli1day2q"))))
12120 (build-system python-build-system)
12122 ;; The tests are broken upstream.
12125 "https://code.launchpad.net/~tseaver/pkginfo/trunk")
12127 "Query metadatdata from sdists, bdists, and installed packages")
12129 "API to query the distutils metadata written in @file{PKG-INFO} inside a
12130 source distriubtion (an sdist) or a binary distribution (e.g., created by
12131 running bdist_egg). It can also query the EGG-INFO directory of an installed
12132 distribution, and the *.egg-info stored in a \"development checkout\" (e.g,
12133 created by running @code{python setup.py develop}).")
12134 (license license:expat)))
12136 (define-public python2-pkginfo
12137 (package-with-python2 python-pkginfo))
12139 (define-public python-twine
12141 (name "python-twine")
12146 (uri (pypi-uri "twine" version))
12149 "1ay1b6kdq6k4bfbjsvf6ymj41wrgpvinhxndb09355pwhxwmp96a"))))
12150 (build-system python-build-system)
12152 `(("python-tqdm" ,python-tqdm)
12153 ("python-pkginfo" ,python-pkginfo)
12154 ("python-requests" ,python-requests)
12155 ("python-requests-toolbelt" ,python-requests-toolbelt)))
12156 (home-page "https://github.com/pypa/twine")
12157 (synopsis "Collection of utilities for interacting with PyPI")
12159 "@code{twine} currently supports registering projects and uploading
12160 distributions. It authenticates the user over HTTPS, allows them to pre-sign
12161 their files and supports any packaging format (including wheels).")
12162 (license license:asl2.0)))
12164 (define-public python2-twine
12165 (package-with-python2 python-twine))
12167 (define-public python-linecache2
12169 (name "python-linecache2")
12174 (uri (pypi-uri "linecache2" version))
12177 "0z79g3ds5wk2lvnqw0y2jpakjf32h95bd9zmnvp7dnqhf57gy9jb"))))
12178 (build-system python-build-system)
12180 `(;; The tests depend on unittest2, and our version is a bit too old.
12183 `(("python-pbr" ,python-pbr-minimal)))
12185 "https://github.com/testing-cabal/linecache2")
12186 (synopsis "Backports of the linecache module")
12188 "The linecache module allows one to get any line from any file, while
12189 attempting to optimize internally, using a cache, the common case where many
12190 lines are read from a single file.")
12191 (license license:psfl)))
12193 (define-public python2-linecache2
12194 (package-with-python2 python-linecache2))
12196 (define-public python-traceback2
12198 (name "python-traceback2")
12203 (uri (pypi-uri "traceback2" version))
12206 "0c1h3jas1jp1fdbn9z2mrgn3jj0hw1x3yhnkxp7jw34q15xcdb05"))))
12207 (build-system python-build-system)
12209 `(;; python-traceback2 and python-unittest2 depend on one another.
12212 `(("python-pbr" ,python-pbr-minimal)))
12214 `(("python-linecache2" ,python-linecache2)))
12216 "https://github.com/testing-cabal/traceback2")
12217 (synopsis "Backports of the traceback module")
12219 "This module provides a standard interface to extract, format and print
12220 stack traces of Python programs. It exactly mimics the behavior of the Python
12221 interpreter when it prints a stack trace.")
12222 (license license:psfl)))
12224 (define-public python2-traceback2
12225 (package-with-python2 python-traceback2))
12227 (define-public python-ratelimiter
12229 (name "python-ratelimiter")
12234 (uri (pypi-uri "ratelimiter" version))
12237 "1dhz85mj5bqd2mij84ncs6pz32hgidr79hay4aqfmzaa4rbb497p"))))
12238 (build-system python-build-system)
12240 '(#:tests? #f)) ; There are no tests in the pypi archive.
12241 (home-page "https://github.com/RazerM/ratelimiter")
12242 (synopsis "Simple rate limiting object")
12244 "The @code{ratelimiter} module ensures that an operation will not be
12245 executed more than a given number of times during a given period.")
12246 (license license:asl2.0)))
12248 (define-public python2-ratelimiter
12249 (package-with-python2 python-ratelimiter))
12251 (define-public python-dukpy
12253 (name "python-dukpy")
12258 (uri (string-append "https://github.com/kovidgoyal/dukpy/archive/v"
12259 version ".tar.gz"))
12260 (file-name (string-append name "-" version ".tar.gz"))
12263 "0pj39rfwlzivqm5hkrsza7gssg6ggpxlq5ivc8f3h7x5pfgc6y6c"))))
12264 (build-system python-build-system)
12265 (home-page "https://github.com/kovidgoyal/dukpy")
12266 (synopsis "Run JavaScript in python")
12268 "dukpy is a JavaScript runtime environment for Python using the duktape
12269 embeddable JavaScript engine.")
12270 ;; Dukpy is licensed under MIT like the embedded duktape library,
12271 ;; with 'errors.c' as GPL3.
12272 (license (list license:expat license:gpl3))))
12274 (define-public python2-dukpy
12275 (package-with-python2 python-dukpy))
12277 (define-public python-jsonrpclib-pelix
12279 (name "python-jsonrpclib-pelix")
12284 (uri (pypi-uri "jsonrpclib-pelix" version))
12287 "1qs95vxplxwspbrqy8bvc195s58iy43qkf75yrjfql2sim8b25sl"))))
12288 (build-system python-build-system)
12289 (home-page "https://github.com/tcalmant/jsonrpclib/")
12290 (synopsis "JSON-RPC 2.0 client library for Python")
12292 "This library implements the JSON-RPC v2.0
12293 specification (backwards-compatible) as a client library for Python. This
12294 version is a fork of jsonrpclib by Josh Marshall, usable with Pelix remote
12296 (license license:asl2.0)))
12298 (define-public python2-jsonrpclib-pelix
12299 (package-with-python2 python-jsonrpclib-pelix))
12301 (define-public python-setuptools-scm-git-archive
12303 (name "python-setuptools-scm-git-archive")
12308 (uri (pypi-uri "setuptools_scm_git_archive" version))
12311 "1nii1sz5jq75ilf18bjnr11l9rz1lvdmyk66bxl7q90qan85yhjj"))))
12312 (build-system python-build-system)
12314 `(("python-pytest" ,python-pytest)))
12316 `(("python-setuptools-scm" ,python-setuptools-scm)))
12317 (home-page "https://github.com/Changaco/setuptools_scm_git_archive/")
12318 (synopsis "Setuptools_scm plugin for git archives")
12320 "The setuptools_scm_git_archive package is a plugin to
12321 setuptools_scm, which supports obtaining versions from git archives that
12322 belong to tagged versions.")
12323 (license license:expat)))
12325 (define-public python2-setuptools-scm-git-archive
12326 (package-with-python2 python-setuptools-scm-git-archive))
12328 (define-public python-pyclipper
12330 (name "python-pyclipper")
12335 (uri (pypi-uri "pyclipper" version ".zip"))
12338 "1zpmwv3bya3j984y5cf9x9d5108kf6mxldcba68wiq0frv5qrssw"))))
12339 (build-system python-build-system)
12341 `(#:tests? #f)); 8 Tests fail, 37 succeed
12343 `(("python-setuptools-scm-git-archive" ,python-setuptools-scm-git-archive)))
12345 `(("unzip" ,unzip)))
12346 (home-page "https://github.com/greginvm/pyclipper")
12347 (synopsis "Wrapper for Angus Johnson's Clipper library")
12349 "Pyclipper is a Cython wrapper for the C++ translation of the
12350 Angus Johnson's polygon clipping Clipper library (ver. 6.2.1).")
12351 (license license:expat)))
12353 (define-public python2-pyclipper
12354 (package-with-python2 python-pyclipper))
12356 (define-public python2-booleanoperations
12358 (name "python2-booleanoperations")
12363 (uri (pypi-uri "booleanOperations" version ".zip"))
12366 "1hw42fazdpvsn77glx96hwsj9l17mvx37sc5707s08y5w6fx16mn"))))
12367 (build-system python-build-system)
12369 `(#:python ,python-2))
12372 ("python2-pytest" ,python2-pytest)
12373 ("python2-pytest-runner" ,python2-pytest-runner)))
12375 `(("python-fonttools" ,python2-fonttools)
12376 ("python-pyclipper" ,python2-pyclipper)
12377 ("python-ufolib" ,python2-ufolib)))
12378 (home-page "https://github.com/typemytype/booleanOperations")
12379 (synopsis "Boolean operations on paths")
12381 "BooleanOperations provides a Python library that enables
12382 boolean operations on paths.")
12383 (license license:expat)))
12385 (define-public python-tempdir
12387 (name "python-tempdir")
12392 (uri (pypi-uri "tempdir" version))
12395 "13msyyxqbicr111a294x7fsqbkl6a31fyrqflx3q7k547gnq15k8"))))
12396 (build-system python-build-system)
12397 (home-page "https://pypi.org/project/tempdir/")
12399 ;; the package has no tests
12401 (synopsis "Python library for managing temporary directories")
12403 "This library manages temporary directories that are automatically
12404 deleted with all their contents when they are no longer needed. It is
12405 particularly convenient for use in tests.")
12406 (license license:expat)))
12408 (define-public python2-tempdir
12409 (package-with-python2 python-tempdir))
12411 (define-public python-activepapers
12413 (name "python-activepapers")
12418 (uri (pypi-uri "ActivePapers.Py" version))
12421 "12wkhjh90ffipjzv10swndp2xv9hd7xrxvg6v0n4n3i411pj4xb8"))))
12422 (build-system python-build-system)
12424 `(#:modules ((ice-9 ftw)
12427 (guix build python-build-system))
12430 (modify-phases %standard-phases
12431 (add-after 'unpack 'delete-python2-code
12433 (for-each delete-file
12434 '("lib/activepapers/builtins2.py"
12435 "lib/activepapers/standardlib2.py"
12436 "lib/activepapers/utility2.py"))))
12439 ;; Deactivate the test cases that download files
12440 (setenv "NO_NETWORK_ACCESS" "1")
12441 ;; For some strange reason, some tests fail if nosetests runs all
12442 ;; test modules in a single execution. They pass if each test
12443 ;; module is run individually.
12444 (for-each (lambda (filename)
12445 (invoke "nosetests"
12446 (string-append "tests/" filename)))
12449 (string-suffix? ".py" filename)))))))))
12451 `(("python-tempdir" ,python-tempdir)
12452 ("python-nose" ,python-nose)))
12454 `(("python-h5py" ,python-h5py)))
12455 (home-page "http://www.activepapers.org/")
12456 (synopsis "Executable papers for scientific computing")
12458 "ActivePapers is a tool for working with executable papers, which
12459 combine data, code, and documentation in single-file packages,
12460 suitable for publication as supplementary material or on repositories
12461 such as figshare or Zenodo.")
12462 (properties `((python2-variant . ,(delay python2-activepapers))))
12463 (license license:bsd-3)))
12465 (define-public python2-activepapers
12466 (let ((base (package-with-python2
12467 (strip-python2-variant python-activepapers))))
12471 (substitute-keyword-arguments (package-arguments base)
12473 `(modify-phases ,phases
12474 (delete 'delete-python2-code)
12475 (add-after 'unpack 'delete-python3-code
12477 (for-each delete-file
12478 '("lib/activepapers/builtins3.py"
12479 "lib/activepapers/standardlib3.py"
12480 "lib/activepapers/utility3.py")))))))))))
12482 (define-public python-semver
12484 (name "python-semver")
12489 (uri (pypi-uri "semver" version))
12492 "0hhgqppchv59rqj0yzi1prdg2nfsywqmjsqy2rycyxm0hvxmbyqz"))))
12493 (build-system python-build-system)
12496 (modify-phases %standard-phases
12497 (add-after 'unpack 'patch-test-requirements
12499 (substitute* "setup.py"
12500 ;; Our Python is new enough.
12501 (("'virtualenv<14\\.0\\.0'") "'virtualenv'"))
12504 `(("python-tox" ,python-tox)
12505 ("python-virtualenv" ,python-virtualenv)))
12506 (home-page "https://github.com/k-bx/python-semver")
12507 (synopsis "Python helper for Semantic Versioning")
12508 (description "This package provides a Python library for
12509 @url{Semantic Versioning, http://semver.org/}.")
12510 (license license:bsd-3)))
12512 (define-public python2-semver
12513 (package-with-python2 python-semver))
12515 (define-public python2-pyro
12517 (name "python2-pyro")
12522 (uri (pypi-uri "Pyro" version))
12523 (file-name (string-append "Pyro-" version ".tar.gz"))
12526 "0y75wzdqbjy565rpxaxscav4j8xg060sa90lnmb7aypgaf251v8v"))))
12527 (build-system python-build-system)
12529 ;; Pyro is not compatible with Python 3
12530 `(#:python ,python-2
12531 ;; Pyro has no test cases for automatic execution
12533 (home-page "http://pythonhosted.org/Pyro/")
12534 (synopsis "Distributed object manager for Python")
12535 (description "Pyro is a Distributed Object Technology system
12536 written in Python that is designed to be easy to use. It resembles
12537 Java's Remote Method Invocation (RMI). It has less similarity to CORBA,
12538 which is a system and language independent Distributed Object Technology
12539 and has much more to offer than Pyro or RMI. Pyro 3.x is no
12540 longer maintained. New projects should use Pyro4 instead, which
12541 is the new Pyro version that is actively developed.")
12542 (license license:expat)))
12544 (define-public python2-scientific
12546 (name "python2-scientific")
12551 (uri (string-append "https://bitbucket.org/khinsen/"
12552 "scientificpython/downloads/ScientificPython-"
12553 version ".tar.gz"))
12554 (file-name (string-append "ScientificPython-" version ".tar.gz"))
12557 "0fc69zhlsn9d2jvbzyjl9ah53vj598h84nkq230c83ahfvgzx5y3"))))
12558 (build-system python-build-system)
12560 `(("netcdf" ,netcdf)))
12562 `(("python-numpy" ,python2-numpy-1.8)
12563 ("python-pyro" ,python2-pyro)))
12565 ;; ScientificPython is not compatible with Python 3
12566 `(#:python ,python-2
12567 #:tests? #f ; No test suite
12569 (modify-phases %standard-phases
12571 (lambda* (#:key inputs #:allow-other-keys)
12572 (zero? (system* "python" "setup.py" "build"
12573 (string-append "--netcdf_prefix="
12574 (assoc-ref inputs "netcdf")))))))))
12575 (home-page "https://bitbucket.org/khinsen/scientificpython")
12576 (synopsis "Python modules for scientific computing")
12577 (description "ScientificPython is a collection of Python modules that are
12578 useful for scientific computing. Most modules are rather general (Geometry,
12579 physical units, automatic derivatives, ...) whereas others are more
12580 domain-specific (e.g. netCDF and PDB support). The library is currently
12581 not actively maintained and works only with Python 2 and NumPy < 1.9.")
12582 (license license:cecill-c)))
12584 (define-public python2-mmtk
12586 (name "python2-mmtk")
12591 (uri (string-append "https://bitbucket.org/khinsen/"
12592 "mmtk/downloads/MMTK-" version ".tar.gz"))
12593 (file-name (string-append "MMTK-" version ".tar.gz"))
12596 "1d0nnjx4lwsvh8f99vv1r6gi50d93yba0adkz8b4zgv4za4c5862"))))
12597 (build-system python-build-system)
12599 `(("netcdf" ,netcdf)))
12601 `(("python-scientific" ,python2-scientific)
12602 ("python-tkinter" ,python-2 "tk")))
12604 `(#:python ,python-2
12607 (modify-phases %standard-phases
12608 (add-before 'build 'includes-from-scientific
12609 (lambda* (#:key inputs #:allow-other-keys)
12610 (mkdir-p "Include/Scientific")
12613 (assoc-ref inputs "python-scientific")
12614 "/include/python2.7/Scientific")
12615 "Include/Scientific"))))))
12616 (home-page "http://dirac.cnrs-orleans.fr/MMTK")
12617 (synopsis "Python library for molecular simulation")
12618 (description "MMTK is a library for molecular simulations with an emphasis
12619 on biomolecules. It provides widely used methods such as Molecular Dynamics
12620 and normal mode analysis, but also basic routines for implementing new methods
12621 for simulation and analysis. The library is currently not actively maintained
12622 and works only with Python 2 and NumPy < 1.9.")
12623 (license license:cecill-c)))
12625 (define-public python-phonenumbers
12627 (name "python-phonenumbers")
12632 (uri (pypi-uri "phonenumbers" version))
12635 "03fmrgb4r8x3ykmddjs9i3zhs703in8smikj3a6447blqpimwyh1"))))
12636 (build-system python-build-system)
12638 "https://github.com/daviddrysdale/python-phonenumbers")
12640 "Python library for dealing with international phone numbers")
12642 "This package provides a Python port of Google's libphonenumber library.")
12643 (license license:asl2.0)))
12645 (define-public python2-phonenumbers
12646 (package-with-python2 python-phonenumbers))
12648 (define-public python-yapf
12650 (name "python-yapf")
12655 (uri (pypi-uri "yapf" version))
12658 "0s7l6afzxvpx39kzd0lwshlaxw8m4fwh4iy0rlmav4vipr3g46dx"))))
12659 (build-system python-build-system)
12660 (home-page "https://github.com/google/yapf")
12661 (synopsis "Formatter for Python code")
12662 (description "YAPF is a formatter for Python code. It's based off of
12663 @dfn{clang-format}, developed by Daniel Jasper. In essence, the algorithm
12664 takes the code and reformats it to the best formatting that conforms to the
12665 style guide, even if the original code didn't violate the style guide.")
12666 (license license:asl2.0)))
12668 (define-public python2-yapf
12669 (package-with-python2 python-yapf))
12671 (define-public python-gyp
12672 (let ((commit "5e2b3ddde7cda5eb6bc09a5546a76b00e49d888f")
12675 (name "python-gyp")
12676 ;; Google does not release versions,
12677 ;; based on second most recent commit date.
12678 (version (git-version "0.0.0" revision commit))
12681 ;; Google does not release tarballs,
12682 ;; git checkout is needed.
12684 (uri (git-reference
12685 (url "https://chromium.googlesource.com/external/gyp")
12687 (file-name (git-file-name name version))
12690 "0fr7nxcrk292djmxzpcjaphnsd123k31gp8jnd91vwknhq6snmv9"))))
12691 (build-system python-build-system)
12692 (home-page "https://gyp.gsrc.io/")
12693 (synopsis "GYP is a Meta-Build system")
12695 "GYP builds build systems for large, cross platform applications.
12696 It can be used to generate XCode projects, Visual Studio projects, Ninja build
12697 files, and Makefiles.")
12698 (license license:bsd-3))))
12700 (define-public python2-gyp
12701 (package-with-python2 python-gyp))
12703 (define-public python-whatever
12705 (name "python-whatever")
12710 (uri (string-append "https://github.com/Suor/whatever/archive/" version
12714 "1iqvnaf0zpc6b4rvbqq4xy45mszcscyzpzknv8wg6j84pbp22sap"))
12715 (file-name (string-append name "-" version ".tar.gz"))))
12716 (build-system python-build-system)
12719 (modify-phases %standard-phases
12722 (invoke "py.test"))))))
12724 `(("python-pytest" ,python-pytest)))
12725 (home-page "http://github.com/Suor/whatever")
12726 (synopsis "Make anonymous functions by partial application of operators")
12727 (description "@code{whatever} provides an easy way to make anonymous
12728 functions by partial application of operators.")
12729 (license license:bsd-3)))
12731 (define-public python2-whatever
12732 (package-with-python2 python-whatever))
12734 (define-public python-funcy
12736 (name "python-funcy")
12741 (uri (string-append "https://github.com/Suor/funcy/archive/" version
12745 "1fanxivsip29vgarw6dn39xym3q4pbxcpa11plpp548lvxajpahz"))
12746 (file-name (string-append name "-" version ".tar.gz"))))
12747 (build-system python-build-system)
12750 (modify-phases %standard-phases
12753 (invoke "py.test"))))))
12755 `(("python-pytest" ,python-pytest)
12756 ("python-whatever" ,python-whatever)))
12757 (home-page "http://github.com/Suor/funcy")
12758 (synopsis "Functional tools")
12759 (description "@code{funcy} is a library that provides functional tools.
12762 @item merge - Merges collections of the same type
12763 @item walk - Type-preserving map
12764 @item select - Selects a part of a collection
12765 @item take - Takes the first n items of a collection
12766 @item first - Takes the first item of a collection
12767 @item remove - Predicated-removes items of a collection
12768 @item concat - Concatenates two collections
12769 @item flatten - Flattens a collection with subcollections
12770 @item distinct - Returns only distinct items
12771 @item split - Predicated-splits a collection
12772 @item split_at - Splits a collection at a given item
12773 @item group_by - Groups items by group
12774 @item pairwise - Pairs off adjacent items
12775 @item partial - Partially-applies a function
12776 @item curry - Curries a function
12777 @item compose - Composes functions
12778 @item complement - Complements a predicate
12779 @item all_fn - \"all\" with predicate
12781 (license license:bsd-3)))
12783 (define-public python2-funcy
12784 (package-with-python2 python-funcy))
12786 (define-public python-isoweek
12788 (name "python-isoweek")
12793 (uri (pypi-uri "isoweek" version))
12796 "1s7zsf0pab0l9gn6456qadnz5i5h90hafcjwnhx5mq23qjxggwvk"))))
12797 (build-system python-build-system)
12798 (home-page "https://github.com/gisle/isoweek")
12799 (synopsis "Objects representing a week")
12800 (description "The @code{isoweek} module provide the class Week that
12801 implements the week definition of ISO 8601. This standard also defines
12802 a notation for identifying weeks; yyyyWww (where the W is a literal).
12803 Week instances stringify to this form.")
12804 (license license:bsd-3)))
12806 (define-public python2-isoweek
12807 (package-with-python2 python-isoweek))
12809 (define-public python-tokenize-rt
12811 (name "python-tokenize-rt")
12816 (uri (pypi-uri "tokenize-rt" version))
12819 "1yjvbz7rvrz31zjyax1cgy3xhf4wb3j18jwnj4bnl77ca4gliyiw"))))
12820 (build-system python-build-system)
12821 (home-page "https://github.com/asottile/tokenize-rt")
12822 (synopsis "Wrapper around the stdlib tokenize which roundtrips.")
12824 "This Python library is a wrapper around @code{tokenize} from the Python
12825 standard library. It provides two additional tokens @code{ESCAPED_NL} and
12826 @code{UNIMPORTANT_WS}, and a @code{Token} data type. Use @code{src_to_tokens}
12827 and @code{tokens_to_src} to roundtrip.")
12828 (license license:expat)))
12830 (define-public python-future-fstrings
12832 (name "python-future-fstrings")
12837 (uri (pypi-uri "future_fstrings" version))
12840 "0ydxqz2dvns44g55p8ix2x18qkfk3aaz0m0dc70f3g6n8js35h47"))))
12841 (build-system python-build-system)
12843 `(("python-tokenize-rt" ,python-tokenize-rt)))
12844 (home-page "https://github.com/asottile/future-fstrings")
12845 (synopsis "Backport of fstrings to Python < 3.6")
12847 "This package provides a UTF-8 compatible encoding
12848 @code{future_fstrings}, which performs source manipulation. It decodes the
12849 source bytes using the UTF-8 encoding and then rewrites Python 3.6 style
12850 @code{f} strings.")
12851 (license license:expat)))
12853 (define-public python-typing
12855 (name "python-typing")
12860 (uri (pypi-uri "typing" version))
12863 "1wmk9nkh30n37cbrqwkbggmj2390lhrlagjkd0ikm02l88saj06l"))))
12864 (build-system python-build-system)
12865 (home-page "https://docs.python.org/3/library/typing.html")
12866 (synopsis "Type hints for Python")
12867 (description "This is a backport of the standard library @code{typing}
12868 module to Python versions older than 3.5. Typing defines a standard notation
12869 for Python function and variable type annotations. The notation can be used
12870 for documenting code in a concise, standard format, and it has been designed
12871 to also be used by static and runtime type checkers, static analyzers, IDEs
12873 (license license:psfl)))
12875 (define-public python2-typing
12876 (package-with-python2 python-typing))
12878 (define-public bpython
12885 (uri (pypi-uri "bpython" version))
12888 "0bxhxi5zxdkrf8b4gwn0d363kdz3qnypjwhm1aydki53ph8ca1w9"))))
12889 (build-system python-build-system)
12892 (modify-phases %standard-phases
12893 (add-after 'unpack 'remove-failing-test
12895 ;; Remove failing test. FIXME: make it pass
12896 (delete-file "bpython/test/test_args.py")
12898 (add-after 'wrap 'add-aliases
12899 ;; for symmetry to bpython2, add symlinks bypthon3, bpdb3, etc.
12900 (lambda* (#:key outputs #:allow-other-keys)
12901 (let ((out (assoc-ref outputs "out")))
12904 (symlink old (string-append out "/bin/" new)))
12905 '("bpython" "bpython-curses" "bpython-urwid" "bpdb")
12906 '("bpython3" "bpython3-curses" "bpython3-urwid" "bpdb3")))
12909 `(("python-pygments" ,python-pygments)
12910 ("python-requests" ,python-requests)
12911 ("python-babel" ,python-babel) ; optional, for internationalization
12912 ("python-curtsies" ,python-curtsies) ; >= 0.1.18
12913 ("python-greenlet" ,python-greenlet)
12914 ("python-urwid" ,python-urwid) ; for bpython-urwid only
12915 ("python-six" ,python-six)))
12917 `(("python-sphinx" ,python-sphinx)
12918 ("python-mock" ,python-mock)))
12919 (home-page "https://bpython-interpreter.org/")
12920 (synopsis "Fancy interface to the Python interpreter")
12921 (description "Bpython is a fancy interface to the Python
12922 interpreter. bpython's main features are
12925 @item in-line syntax highlighting,
12926 @item readline-like autocomplete with suggestions displayed as you type,
12927 @item expected parameter list for any Python function,
12928 @item \"rewind\" function to pop the last line of code from memory and
12930 @item send the code you've entered off to a pastebin,
12931 @item save the code you've entered to a file, and
12932 @item auto-indentation.
12934 (license license:expat)))
12936 (define-public bpython2
12937 (let ((base (package-with-python2
12938 (strip-python2-variant bpython))))
12939 (package (inherit base)
12942 `(#:python ,python-2
12944 (modify-phases %standard-phases
12945 (add-after 'unpack 'remove-failing-test
12947 ;; Remove failing test. FIXME: make it pass
12948 (delete-file "bpython/test/test_args.py")
12949 ;; Disable failing test-cases (renaming inhibits they are
12951 (substitute* "bpython/test/test_curtsies_repl.py"
12952 (("^(\\s*def )(test_get_last_word_with_prev_line\\W)" _ a b)
12953 (string-append a "xxx_off_" b))
12954 (("^(\\s*def )(test_complex\\W)" _ a b)
12955 (string-append a "xxx_off_" b)))
12957 (add-before 'build 'rename-scripts
12958 ;; rename the scripts to bypthon2, bpdb2, etc.
12960 (substitute* "setup.py"
12961 (("^(\\s+'bpdb)(\\s+=.*',?)\\s*?$" _ name rest)
12962 (string-append name "2" rest "\n"))
12963 (("^(\\s+'bpython)(-\\S+)?(\\s+=.*',?)\\s*?$" _ name sub rest)
12964 (string-append name "2" (or sub "") rest "\n")))
12967 (define-public python-pyinotify
12969 (name "python-pyinotify")
12973 (uri (pypi-uri "pyinotify" version))
12976 "1x3i9wmzw33fpkis203alygfnrkcmq9w1aydcm887jh6frfqm6cw"))))
12977 (build-system python-build-system)
12978 (arguments `(#:tests? #f)) ;no tests
12979 (home-page "https://github.com/seb-m/pyinotify")
12980 (synopsis "Python library for monitoring inotify events")
12982 "@code{pyinotify} provides a Python interface for monitoring
12983 file system events on Linux.")
12984 (license license:expat)))
12986 (define-public python2-pyinotify
12987 (package-with-python2 python-pyinotify))
12989 ;; Ada parser uses this version.
12990 (define-public python2-quex-0.67.3
12992 (name "python2-quex")
12997 (uri (string-append "mirror://sourceforge/quex/HISTORY/"
12998 (version-major+minor version)
12999 "/quex-" version ".zip"))
13002 "14gv8ll3ipqv4kyc2xiy891nrmjl4ic823zfyx8hassagyclyppw"))))
13003 (build-system python-build-system)
13005 `(("unzip" ,unzip)))
13007 `(#:python ,python-2
13010 (modify-phases %standard-phases
13011 (delete 'configure)
13014 (lambda* (#:key outputs #:allow-other-keys)
13015 (let* ((out (assoc-ref outputs "out"))
13016 (share/quex (string-append out "/share/quex"))
13017 (bin (string-append out "/bin")))
13018 (copy-recursively "." share/quex)
13020 (symlink (string-append share/quex "/quex-exe.py")
13021 (string-append bin "/quex"))
13023 (native-search-paths
13024 (list (search-path-specification
13025 (variable "QUEX_PATH")
13026 (files '("share/quex")))))
13027 (home-page "http://quex.sourceforge.net/")
13028 (synopsis "Lexical analyzer generator in Python")
13029 (description "@code{quex} is a lexical analyzer generator in Python.")
13030 (license license:lgpl2.1+))) ; Non-military
13032 (define-public python2-quex
13033 (package (inherit python2-quex-0.67.3)
13034 (name "python2-quex")
13039 (uri (string-append "mirror://sourceforge/quex/DOWNLOAD/quex-" version ".tar.gz"))
13042 "0svc9nla3b9145d6b7fb9dizx412l3difzqw0ilh9lz52nsixw8j"))
13043 (file-name (string-append name "-" version ".tar.gz"))))))