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 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 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 ng0 <ng0@infotropique.org>
27 ;;; Copyright © 2016 Dylan Jeffers <sapientech@sapientech@openmailbox.org>
28 ;;; Copyright © 2016 David Craven <david@craven.ch>
29 ;;; Copyright © 2016, 2017 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 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 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 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>
49 ;;; This file is part of GNU Guix.
51 ;;; GNU Guix is free software; you can redistribute it and/or modify it
52 ;;; under the terms of the GNU General Public License as published by
53 ;;; the Free Software Foundation; either version 3 of the License, or (at
54 ;;; your option) any later version.
56 ;;; GNU Guix is distributed in the hope that it will be useful, but
57 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
58 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
59 ;;; GNU General Public License for more details.
61 ;;; You should have received a copy of the GNU General Public License
62 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
64 (define-module (gnu packages python)
65 #:use-module ((guix licenses) #:prefix license:)
66 #:use-module (gnu packages)
67 #:use-module (gnu packages algebra)
68 #:use-module (gnu packages adns)
69 #:use-module (gnu packages attr)
70 #:use-module (gnu packages backup)
71 #:use-module (gnu packages bash)
72 #:use-module (gnu packages check)
73 #:use-module (gnu packages compression)
74 #:use-module (gnu packages crypto)
75 #:use-module (gnu packages databases)
76 #:use-module (gnu packages file)
77 #:use-module (gnu packages fontutils)
78 #:use-module (gnu packages gcc)
79 #:use-module (gnu packages ghostscript)
80 #:use-module (gnu packages gl)
81 #:use-module (gnu packages glib)
82 #:use-module (gnu packages graphviz)
83 #:use-module (gnu packages graphics)
84 #:use-module (gnu packages gstreamer)
85 #:use-module (gnu packages gtk)
86 #:use-module (gnu packages icu4c)
87 #:use-module (gnu packages image)
88 #:use-module (gnu packages imagemagick)
89 #:use-module (gnu packages libevent)
90 #:use-module (gnu packages libffi)
91 #:use-module (gnu packages linux)
92 #:use-module (gnu packages machine-learning)
93 #:use-module (gnu packages man)
94 #:use-module (gnu packages maths)
95 #:use-module (gnu packages multiprecision)
96 #:use-module (gnu packages networking)
97 #:use-module (gnu packages ncurses)
98 #:use-module (gnu packages openstack)
99 #:use-module (gnu packages password-utils)
100 #:use-module (gnu packages pcre)
101 #:use-module (gnu packages perl)
102 #:use-module (gnu packages pkg-config)
103 #:use-module (gnu packages python-crypto)
104 #:use-module (gnu packages python-web)
105 #:use-module (gnu packages qt)
106 #:use-module (gnu packages readline)
107 #:use-module (gnu packages sdl)
108 #:use-module (gnu packages search)
109 #:use-module (gnu packages shells)
110 #:use-module (gnu packages ssh)
111 #:use-module (gnu packages statistics)
112 #:use-module (gnu packages tex)
113 #:use-module (gnu packages texinfo)
114 #:use-module (gnu packages time)
115 #:use-module (gnu packages tls)
116 #:use-module (gnu packages version-control)
117 #:use-module (gnu packages video)
118 #:use-module (gnu packages web)
119 #:use-module (gnu packages base)
120 #:use-module (gnu packages xml)
121 #:use-module (gnu packages xorg)
122 #:use-module (gnu packages xdisorg)
123 #:use-module (gnu packages tcl)
124 #:use-module (gnu packages bdw-gc)
125 #:use-module (guix packages)
126 #:use-module (guix download)
127 #:use-module (guix git-download)
128 #:use-module (guix utils)
129 #:use-module (guix build-system gnu)
130 #:use-module (guix build-system cmake)
131 #:use-module (guix build-system python)
132 #:use-module (guix build-system trivial)
133 #:use-module (srfi srfi-1))
135 (define-public python-2.7
142 (uri (string-append "https://www.python.org/ftp/python/"
143 version "/Python-" version ".tar.xz"))
146 "0cgpk3zk0fgpji59pb4zy9nzljr70qzgv1vpz5hq5xw2d2c47m9m"))
147 (patches (search-patches "python-2.7-search-paths.patch"
148 "python-2-deterministic-build-info.patch"
149 "python-2.7-site-prefixes.patch"
150 "python-2.7-source-date-epoch.patch"
151 "python-2.7-getentropy-on-old-kernels.patch"))
152 (modules '((guix build utils)))
153 ;; suboptimal to delete failing tests here, but if we delete them in the
154 ;; arguments then we need to make sure to strip out that phase when it
155 ;; gets inherited by python and python-minimal.
158 (for-each delete-file
159 '("Lib/test/test_compileall.py"
160 "Lib/test/test_ctypes.py" ; fails on mips64el
161 "Lib/test/test_distutils.py"
162 "Lib/test/test_import.py"
163 "Lib/test/test_shutil.py"
164 "Lib/test/test_socket.py"
165 "Lib/test/test_subprocess.py"))
168 "tk")) ;tkinter; adds 50 MiB to the closure
169 (build-system gnu-build-system)
173 ;; test_compileall test_distutils test_import test_shutil test_socket
176 ;; test_aepack test_al test_applesingle test_bsddb test_bsddb185
177 ;; test_bsddb3 test_cd test_cl test_codecmaps_cn test_codecmaps_hk
178 ;; test_codecmaps_jp test_codecmaps_kr test_codecmaps_tw test_curses
179 ;; test_dl test_gdb test_gl test_imageop test_imgfile test_ioctl
180 ;; test_kqueue test_linuxaudiodev test_macos test_macostools
181 ;; test_msilib test_ossaudiodev test_scriptpackages test_smtpnet
182 ;; test_socketserver test_startfile test_sunaudiodev test_timeout
183 ;; test_tk test_ttk_guionly test_urllib2net test_urllibnet
184 ;; test_winreg test_winsound test_zipfile64
185 ;; 4 skips unexpected on linux2:
186 ;; test_bsddb test_bsddb3 test_gdb test_ioctl
189 (list "--enable-shared" ;allow embedding
190 "--with-system-ffi" ;build ctypes
191 "--with-ensurepip=install" ;install pip and setuptools
192 "--enable-unicode=ucs4"
193 (string-append "LDFLAGS=-Wl,-rpath="
194 (assoc-ref %outputs "out") "/lib"))
196 #:modules ((ice-9 ftw) (ice-9 match)
197 (guix build utils) (guix build gnu-build-system))
199 (modify-phases %standard-phases
201 'configure 'patch-lib-shells
203 ;; Filter for existing files, since some may not exist in all
204 ;; versions of python that are built with this recipe.
205 (substitute* (filter file-exists?
206 '("Lib/subprocess.py"
208 "Lib/distutils/tests/test_spawn.py"
209 "Lib/test/test_subprocess.py"))
210 (("/bin/sh") (which "sh")))
212 ;; Use zero as the timestamp in .pyc files so that builds are
213 ;; deterministic. TODO: Remove it when this variable is set in
214 ;; gnu-build-system.scm.
215 (setenv "SOURCE_DATE_EPOCH" "1")
217 (add-before 'configure 'do-not-record-configure-flags
218 (lambda* (#:key configure-flags #:allow-other-keys)
219 ;; Remove configure flags from the installed '_sysconfigdata.py'
220 ;; and 'Makefile' so we don't end up keeping references to the
223 ;; Preserve at least '--with-system-ffi' since otherwise the
224 ;; thing tries to build libffi, fails, and we end up with a
225 ;; Python that lacks ctypes.
226 (substitute* "configure"
227 (("^CONFIG_ARGS=.*$")
228 (format #f "CONFIG_ARGS='~a'\n"
229 (if (member "--with-system-ffi" configure-flags)
236 ;; 'Lib/test/test_site.py' needs a valid $HOME
237 (setenv "HOME" (getcwd))
240 'unpack 'set-source-file-times-to-1980
241 ;; XXX One of the tests uses a ZIP library to pack up some of the
242 ;; source tree, and fails with "ZIP does not support timestamps
243 ;; before 1980". Work around this by setting the file times in the
244 ;; source tree to sometime in early 1980.
246 (let ((circa-1980 (* 10 366 24 60 60)))
247 (ftw "." (lambda (file stat flag)
248 (utime file circa-1980 circa-1980)
251 (add-after 'install 'remove-tests
252 ;; Remove 25 MiB of unneeded unit tests. Keep test_support.*
253 ;; because these files are used by some libraries out there.
254 (lambda* (#:key outputs #:allow-other-keys)
255 (let ((out (assoc-ref outputs "out")))
256 (match (scandir (string-append out "/lib")
258 (string-prefix? "python" name)))
260 (let ((testdir (string-append out "/lib/" pythonX.Y
262 (with-directory-excursion testdir
263 (for-each delete-file-recursively
269 (string-prefix? "test_support."
271 (call-with-output-file "__init__.py" (const #t))
273 (add-before 'strip 'make-libraries-writable
274 (lambda* (#:key outputs #:allow-other-keys)
275 ;; Make .so files writable so they can be stripped.
276 (let ((out (assoc-ref outputs "out")))
277 (for-each (lambda (file)
279 (find-files (string-append out "/lib")
282 (add-after 'install 'move-tk-inter
283 (lambda* (#:key outputs #:allow-other-keys)
284 ;; When Tkinter support is built move it to a separate output so
285 ;; that the main output doesn't contain a reference to Tcl/Tk.
286 (let ((out (assoc-ref outputs "out"))
287 (tk (assoc-ref outputs "tk")))
289 (match (find-files out "tkinter.*\\.so")
291 ;; The .so is in OUT/lib/pythonX.Y/lib-dynload, but we
292 ;; want it under TK/lib/pythonX.Y/site-packages.
293 (let* ((len (string-length out))
294 (target (string-append
297 (dirname (dirname tkinter.so))
300 (install-file tkinter.so target)
301 (delete-file tkinter.so)))))
306 ("libffi" ,libffi) ; for ctypes
307 ("sqlite" ,sqlite) ; for sqlite extension
309 ("readline" ,readline)
312 ("tk" ,tk))) ; for tkinter
314 `(("pkg-config" ,pkg-config)))
316 (list (search-path-specification
317 (variable "PYTHONPATH")
318 (files '("lib/python2.7/site-packages")))))
319 (home-page "https://www.python.org")
320 (synopsis "High-level, dynamically-typed programming language")
322 "Python is a remarkably powerful dynamic programming language that
323 is used in a wide variety of application domains. Some of its key
324 distinguishing features include: clear, readable syntax; strong
325 introspection capabilities; intuitive object orientation; natural
326 expression of procedural code; full modularity, supporting hierarchical
327 packages; exception-based error handling; and very high level dynamic
329 (license license:psfl)))
331 ;; Current 2.x version.
332 (define-public python-2 python-2.7)
334 (define-public python-3.5
335 (package (inherit python-2)
339 (uri (string-append "https://www.python.org/ftp/python/"
340 version "/Python-" version ".tar.xz"))
341 (patches (search-patches
342 "python-fix-tests.patch"
343 "python-3.5-fix-tests.patch"
344 "python-3.5-getentropy-on-old-kernels.patch"
345 "python-3-deterministic-build-info.patch"
346 "python-3-search-paths.patch"))
347 (patch-flags '("-p0"))
350 "1c6v1n9nz4mlx9mw1125fxpmbrgniqdbbx9hnqx44maqazb2mzpf"))
353 (for-each delete-file
354 '("Lib/ctypes/test/test_win32.py" ; fails on aarch64
355 "Lib/test/test_fcntl.py"))
357 (arguments (substitute-keyword-arguments (package-arguments python-2)
360 (list (search-path-specification
361 (variable "PYTHONPATH")
362 (files (list (string-append "lib/python"
363 (version-major+minor version)
364 "/site-packages"))))))))
366 ;; Current 3.x version.
367 (define-public python-3 python-3.5)
369 ;; Current major version.
370 (define-public python python-3)
372 ;; Minimal variants of Python, mostly used to break the cycle between Tk and
373 ;; Python (Tk -> libxcb -> Python.)
375 (define-public python2-minimal
376 (package (inherit python-2)
377 (name "python-minimal")
380 ;; Keep zlib, which is used by 'pip' (via the 'zipimport' module), which
381 ;; is invoked upon 'make install'. 'pip' also expects 'ctypes' and thus
383 (inputs `(("libffi" ,libffi)
386 (define-public python-minimal
387 (package (inherit python)
388 (name "python-minimal")
391 ;; Build fails due to missing ctypes without libffi.
392 ;; OpenSSL is a mandatory dependency of Python 3.x, for urllib;
393 ;; zlib is required by 'zipimport', used by pip.
394 (inputs `(("libffi" ,libffi)
398 (define* (wrap-python3 python
400 (name (string-append (package-name python) "-wrapper")))
401 (package (inherit python)
404 (build-system trivial-build-system)
406 (inputs `(("bash" ,bash)))
407 (propagated-inputs `(("python" ,python)))
409 `(#:modules ((guix build utils))
412 (use-modules (guix build utils))
413 (let ((bin (string-append (assoc-ref %outputs "out") "/bin"))
414 (python (string-append (assoc-ref %build-inputs "python") "/bin/")))
418 (symlink (string-append python old)
419 (string-append bin "/" new)))
420 `("python3" ,"pydoc3" ,"idle3" ,"pip3")
421 `("python" ,"pydoc" ,"idle" ,"pip"))
422 ;; python-config outputs search paths based upon its location,
423 ;; use a bash wrapper to avoid changing its outputs.
424 (let ((bash (string-append (assoc-ref %build-inputs "bash")
426 (old (string-append python "python3-config"))
427 (new (string-append bin "/python-config")))
428 (with-output-to-file new
430 (format #t "#!~a~%" bash)
431 (format #t "exec \"~a\" \"$@\"~%" old)
434 (synopsis "Wrapper for the Python 3 commands")
436 "This package provides wrappers for the commands of Python@tie{}3.x such
437 that they can be invoked under their usual name---e.g., @command{python}
438 instead of @command{python3}.")))
440 (define-public python-wrapper (wrap-python3 python))
441 (define-public python-minimal-wrapper (wrap-python3 python-minimal))
443 (define-public python-psutil
445 (name "python-psutil")
450 (uri (pypi-uri "psutil" version))
453 "1w4r09fvn6kd80m5mx4ws1wz100brkaq6hzzpwrns8cgjzjpl6c6"))))
454 (build-system python-build-system)
456 ;; FIXME: some tests does not return and times out.
458 (home-page "https://www.github.com/giampaolo/psutil")
459 (synopsis "Library for retrieving information on running processes")
461 "psutil (Python system and process utilities) is a library for retrieving
462 information on running processes and system utilization (CPU, memory, disks,
463 network) in Python. It is useful mainly for system monitoring, profiling and
464 limiting process resources and management of running processes. It implements
465 many functionalities offered by command line tools such as: ps, top, lsof,
466 netstat, ifconfig, who, df, kill, free, nice, ionice, iostat, iotop, uptime,
467 pidof, tty, taskset, pmap.")
468 (license license:bsd-3)))
470 (define-public python2-psutil
471 (package-with-python2 python-psutil))
473 (define-public python-clyent
475 (name "python-clyent")
480 (uri (pypi-uri "clyent" version))
483 "1r9987qmy1pz3hq54160bapqsywpq14waw4w9x3ly8hmq7kpgfbj"))))
484 (build-system python-build-system)
486 `(("python-mock" ,python-mock)))
487 (home-page "https://github.com/binstar/clyent")
488 (synopsis "Command line client library")
489 (description "Clyent is a Python command line utiliy library. It is used
490 by @code{binstar}, @code{binstar-build} and @code{chalmers}.")
491 (license license:bsd-3)))
493 (define-public python2-clyent
494 (package-with-python2 python-clyent))
496 (define-public python-babel
498 (name "python-babel")
503 (uri (pypi-uri "Babel" version))
506 "0x98qqqw35xllpcama013a9788ly84z8dm1w2wwfpxh2710c8df5"))))
507 (build-system python-build-system)
509 `(("python-pytz" ,python-pytz)))
510 (arguments `(#:tests? #f)) ; no test target
511 (home-page "http://babel.pocoo.org/")
513 "Tools for internationalizing Python applications")
515 "Babel is composed of two major parts:
516 - tools to build and work with gettext message catalogs
517 - a Python interface to the CLDR (Common Locale Data Repository), providing
518 access to various locale display names, localized number and date formatting,
520 (license license:bsd-3)))
522 (define-public python2-babel
523 (package-with-python2 python-babel))
525 (define-public python2-backport-ssl-match-hostname
527 (name "python2-backport-ssl-match-hostname")
533 "https://pypi.python.org/packages/source/b/"
534 "backports.ssl_match_hostname/backports.ssl_match_hostname-"
538 "1wndipik52cyqy0677zdgp90i435pmvwd89cz98lm7ri0y3xjajh"))))
539 (build-system python-build-system)
542 #:tests? #f)) ; no test target
543 (home-page "https://bitbucket.org/brandon/backports.ssl_match_hostname")
544 (synopsis "Backport of ssl.match_hostname() function from Python 3.5")
546 "This backport brings the ssl.match_hostname() function to users of
547 earlier versions of Python. The function checks the hostname in the
548 certificate returned by the server to which a connection has been established,
549 and verifies that it matches the intended target hostname.")
550 (license license:psfl)))
552 (define-public python-hdf4
559 (uri (pypi-uri name version))
562 "1hjiyrxvxk9817qyqky3nar4y3fs4z8wxz0n884zzb5wi6skrjks"))))
563 (build-system python-build-system)
564 (native-inputs `(("nose" ,python-nose)))
565 (propagated-inputs `(("numpy" ,python-numpy)))
572 (modify-phases %standard-phases
575 ;; The 'runexamples' script sets PYTHONPATH to CWD, then goes
576 ;; on to import numpy. Somehow this works on their CI system.
577 ;; Let's just manage PYTHONPATH here instead.
578 (substitute* "runexamples.sh"
579 (("export PYTHONPATH=.*") ""))
581 (string-append (getcwd) ":"
582 (getenv "PYTHONPATH")))
583 (and (zero? (system* "./runexamples.sh"))
584 (zero? (system* "nosetests" "-v"))))))))
585 (home-page "https://github.com/fhs/python-hdf4")
586 (synopsis "Python interface to the NCSA HDF4 library")
588 "Python-HDF4 is a python wrapper around the NCSA HDF version 4 library,
589 which implements the SD (Scientific Dataset), VS (Vdata) and V (Vgroup) API’s.
590 NetCDF files can also be read and modified. Python-HDF4 is a fork of
591 @url{http://hdfeos.org/software/pyhdf.php,pyhdf}.")
592 (license license:expat)))
594 (define-public python2-hdf4
595 (package-with-python2 python-hdf4))
597 (define-public python-h5py
604 (uri (pypi-uri "h5py" version))
607 "0433sdv6xc9p7v1xs1gvbxp7p152ywi3nplgjb258q9fvw9469br"))))
608 (build-system python-build-system)
610 `(#:tests? #f ; no test target
612 (modify-phases %standard-phases
613 (add-after 'unpack 'fix-hdf5-paths
614 (lambda* (#:key inputs #:allow-other-keys)
615 (let ((prefix (assoc-ref inputs "hdf5")))
616 (substitute* "setup_build.py"
617 (("\\['/opt/local/lib', '/usr/local/lib'\\]")
618 (string-append "['" prefix "/lib" "']"))
619 (("'/opt/local/include', '/usr/local/include'")
620 (string-append "'" prefix "/include" "'")))
621 (substitute* "setup_configure.py"
622 (("\\['/usr/local/lib', '/opt/local/lib'\\]")
623 (string-append "['" prefix "/lib" "']")))
626 `(("python-six" ,python-six)
627 ("python-numpy" ,python-numpy)))
631 `(("python-cython" ,python-cython)
632 ("python-pkgconfig" ,python-pkgconfig)))
633 (home-page "http://www.h5py.org/")
634 (synopsis "Read and write HDF5 files from Python")
636 "The h5py package provides both a high- and low-level interface to the
637 HDF5 library from Python. The low-level interface is intended to be a
638 complete wrapping of the HDF5 API, while the high-level component supports
639 access to HDF5 files, datasets and groups using established Python and NumPy
641 (license license:bsd-3)))
643 (define-public python2-h5py
644 (package-with-python2 python-h5py))
646 (define-public python-netcdf4
648 (name "python-netcdf4")
653 (uri (pypi-uri "netCDF4" version))
656 "1h6jq338amlbk0ilzvjyl7cck80i0bah9a5spn9in71vy2qxm7i5"))))
657 (build-system python-build-system)
659 `(("python-cython" ,python-cython)))
661 `(("python-numpy" ,python-numpy)))
668 (modify-phases %standard-phases
671 (setenv "NO_NET" "1") ; disable opendap tests
672 (with-directory-excursion "test"
673 (setenv "PYTHONPATH" ; find and add the library we just built
675 (car (find-files "../build" "lib.*"
677 #:fail-on-error? #:t))
678 ":" (getenv "PYTHONPATH")))
679 (zero? (system* "python" "run_all.py"))))))))
681 "https://github.com/Unidata/netcdf4-python")
682 (synopsis "Python/numpy interface to the netCDF library")
683 (description "Netcdf4-python is a Python interface to the netCDF C
684 library. netCDF version 4 has many features not found in earlier
685 versions of the library and is implemented on top of HDF5. This module
686 can read and write files in both the new netCDF 4 and the old netCDF 3
687 format, and can create files that are readable by HDF5 clients. The
688 API is modelled after @code{Scientific.IO.NetCDF}, and should be familiar
689 to users of that module.")
690 ;; The software is mainly ISC, but includes some files covered
691 ;; by the Expat license.
692 (license (list license:isc license:expat))))
694 (define-public python2-netcdf4
695 (package-with-python2 python-netcdf4))
697 (define-public python-lockfile
699 (name "python-lockfile")
704 (uri (string-append "https://pypi.python.org/packages/source/l/lockfile/"
705 "lockfile-" version ".tar.gz"))
708 "16gpx5hm73ah5n1079ng0vy381hl802v606npkx4x8nb0gg05vba"))))
709 (build-system python-build-system)
710 (arguments '(#:test-target "check"))
712 `(("python-pbr" ,python-pbr)))
713 (home-page "https://launchpad.net/pylockfile")
714 (synopsis "Platform-independent file locking module")
716 "The lockfile package exports a LockFile class which provides a simple
717 API for locking files.")
718 (license license:expat)))
720 (define-public python2-lockfile
721 (package-with-python2 python-lockfile))
723 (define-public python-setuptools
725 (name "python-setuptools")
730 (uri (pypi-uri "setuptools" version))
733 "0ypybh4hx3bv4vhg2dc74xpj1g56ggnaffm87k4abhwjwq6wq608"))
734 (modules '((guix build utils)))
737 ;; Remove included binaries which are used to build self-extracting
738 ;; installers for Windows.
739 ;; TODO: Find some way to build them ourself so we can include them.
740 (for-each delete-file (find-files "setuptools" "^(cli|gui).*\\.exe$"))
742 (build-system python-build-system)
743 ;; FIXME: Tests require pytest, which itself relies on setuptools.
744 ;; One could bootstrap with an internal untested setuptools.
747 (home-page "https://pypi.python.org/pypi/setuptools")
749 "Library designed to facilitate packaging Python projects")
751 "Setuptools is a fully-featured, stable library designed to facilitate
752 packaging Python projects, where packaging includes:
753 Python package and module definitions,
754 distribution package metadata,
756 project installation,
757 platform-specific details,
759 ;; TODO: setuptools now bundles the following libraries:
760 ;; packaging, pyparsing, six and appdirs. How to unbundle?
761 (license (list license:psfl ; setuptools itself
762 license:expat ; six, appdirs, pyparsing
763 license:asl2.0 ; packaging is dual ASL2/BSD-2
766 (define-public python2-setuptools
767 (package-with-python2 python-setuptools))
769 (define-public python-uniseg
771 (name "python-uniseg")
776 (uri (string-append "https://bitbucket.org/emptypage/uniseg-python/"
777 "get/rel-" version ".tar.gz"))
778 (file-name (string-append name "-" version ".tar.gz"))
781 "1df4gddnj2a0v8z35wb2ra5vvh1f1qyxs8fgd25c8g64031mna6x"))))
782 (build-system python-build-system)
784 '(#:tests? #f)) ; The test suite requires network access.
786 "https://bitbucket.org/emptypage/uniseg-python")
788 "Python library to determine Unicode text segmentations")
790 "Uniseg is a Python package used to determine Unicode text segmentations.
791 Supported segmentations include:
793 @item @dfn{Code point} (any value in the Unicode codespace)
794 @item @dfn{Grapheme cluster} (user-perceived character made of a single or
795 multiple Unicode code points, e.g. \"G\" + acute-accent)
800 (license license:expat)))
802 (define-public python2-uniseg
803 (package-with-python2 python-uniseg))
805 (define-public python-humanfriendly
807 (name "python-humanfriendly")
812 (uri (pypi-uri "humanfriendly" version))
815 "0pisgizjql86785jchfjv217g0lsgk114g2lja5j4y3lsc3b9szi"))))
816 (build-system python-build-system)
818 `(;; XXX: Tests depend on coloredlogs, which in turn depends on humanfriendly.
821 `(("python-monotonic" ,python-monotonic)))
822 (home-page "https://humanfriendly.readthedocs.io")
823 (synopsis "Human-friendly input and output in Python")
825 "The functions and classes in @code{humanfriendly} can be used to make
826 text interfaces more user-friendly. It includes tools to parse and format
827 numbers, file sizes, and timespans, timers for long-running operations, menus
828 to allow the user to choose from a list of options, and terminal interaction
830 (license license:expat)))
832 (define-public python2-humanfriendly
833 (package-with-python2 python-humanfriendly))
835 (define-public python-capturer
837 (name "python-capturer")
842 (uri (pypi-uri "capturer" version))
845 "05d6ji4j8ipiq0br7bwam38qc6hd9l1djmfxlzrxx19ziyjl4089"))))
846 (build-system python-build-system)
850 `(("python-humanfriendly" ,python-humanfriendly)))
851 (home-page "https://capturer.readthedocs.io")
852 (synopsis "Capture stdout and stderr streams of the current process")
854 "The capturer package makes it easy to capture the stdout and stderr
855 streams of the current process and subprocesses. Output can be relayed
856 to the terminal in real time but is also available to the Python program
857 for additional processing.")
858 (license license:expat)))
860 (define-public python2-capturer
861 (package-with-python2 python-capturer))
863 (define-public python-verboselogs
865 (name "python-verboselogs")
870 (uri (pypi-uri "verboselogs" version))
873 "09z4d1jiasn7k1hs5af2ckmnrd0i1d1m04bhfjhv7z6svzfdwgg3"))))
874 (build-system python-build-system)
876 `(("python-mock" ,python-mock)
877 ("python-astroid" ,python-astroid)
878 ("python-pylint" ,python-pylint)))
879 (home-page "https://verboselogs.readthedocs.io")
880 (synopsis "Verbose logging level for Python's logging module")
882 "The @code{verboselogs} package extends Python's @code{logging} module to
883 add the log levels NOTICE, SPAM, SUCCESS and VERBOSE.")
884 (license license:expat)))
886 (define-public python2-verboselogs
887 (package-with-python2 python-verboselogs))
889 (define-public python-coloredlogs
891 (name "python-coloredlogs")
896 (uri (pypi-uri "coloredlogs" version))
899 "1blcann6dyg5dhps9pg12rn0q0rjrlajpmmil0gy0j4cbvnl2il9"))))
900 (build-system python-build-system)
902 `(;Tests require some updated modules
905 `(("python-capturer" ,python-capturer)))
906 (home-page "https://coloredlogs.readthedocs.io")
907 (synopsis "Colored stream handler for Python's logging module")
909 "The @code{coloredlogs} package enables colored terminal output for
910 Python's logging module. The @code{ColoredFormatter} class inherits from
911 @code{logging.Formatter} and uses ANSI escape sequences to render your logging
913 (license license:expat)))
915 (define-public python2-coloredlogs
916 (package-with-python2 python-coloredlogs))
918 (define-public python-eventlet
920 (name "python-eventlet")
925 (uri (pypi-uri "eventlet" version))
928 "0f3q55mq4n021wb7qa53pz3ix6i2py64sap66vsaqm2scjw83m9s"))))
929 (build-system python-build-system)
931 `(("python-greenlet" ,python-greenlet)))
933 ;; TODO: Requires unpackaged 'enum-compat'.
935 (home-page "http://eventlet.net")
936 (synopsis "Concurrent networking library for Python")
938 "Eventlet is a concurrent networking library for Python that
939 allows you to change how you run your code, not how you write it.
940 It uses @code{epoll} or @code{libevent} for highly scalable non-blocking I/O.
941 Coroutines ensure that the developer uses a blocking style of programming
942 that is similar to threading, but provide the benefits of non-blocking I/O.
943 The event dispatch is implicit, which means you can easily use @code{Eventlet}
944 from the Python interpreter, or as a small part of a larger application.")
945 (license license:expat)))
947 (define-public python2-eventlet
948 (let ((base (package-with-python2
949 (strip-python2-variant python-eventlet))))
950 (package (inherit base)
952 `(("python2-enum34" ,python2-enum34)
953 ,@(package-propagated-inputs base))))))
955 (define-public python-six
962 (uri (pypi-uri "six" version))
965 "0snmb8xffb3vsma0z67i0h0w2g2dy0p3gsgh9gi4i0kgc5l8spqh"))))
966 (build-system python-build-system)
968 `(("python-py" ,python-py)
969 ("python-pytest" ,python-pytest)))
970 (home-page "https://pypi.python.org/pypi/six/")
971 (synopsis "Python 2 and 3 compatibility utilities")
973 "Six is a Python 2 and 3 compatibility library. It provides utility
974 functions for smoothing over the differences between the Python versions with
975 the goal of writing Python code that is compatible on both Python versions.
976 Six supports every Python version since 2.5. It is contained in only one
977 Python file, so it can be easily copied into your project.")
978 (license license:x11)))
980 (define-public python2-six
981 (package-with-python2 python-six))
983 (define-public python-schedule
985 (name "python-schedule")
990 (uri (pypi-uri "schedule" version))
993 "0vplyjcbfrq50sphlwya749z8p2pcyi2nycw3518i0qpd9a6189i"))))
994 (build-system python-build-system)
996 `(("python-pytest" ,python-pytest)
997 ("python-mock" ,python-mock)))
998 (home-page "https://github.com/dbader/schedule")
999 (synopsis "Schedule periodic function calls in Python")
1001 "Schedule is an in-process scheduler for periodic jobs that uses the
1002 builder pattern for configuration. Schedule lets you run Python functions (or
1003 any other callable) periodically at pre-determined intervals using a simple,
1004 human-friendly syntax.")
1005 (license license:expat)))
1007 (define-public python2-schedule
1008 (package-with-python2 python-schedule))
1010 (define-public python-pandas
1012 (name "python-pandas")
1017 (uri (pypi-uri "pandas" version))
1019 (base32 "0540cnbwy2hc4hv2sxfs8i47xi91qzvzxfn80dl785ibiicly3vg"))
1021 (search-patches "python-pandas-skip-failing-tests.patch"))))
1022 (build-system python-build-system)
1024 `(("python-numpy" ,python-numpy)
1025 ("python-pytz" ,python-pytz)
1026 ("python-dateutil" ,python-dateutil)))
1028 `(("python-nose" ,python-nose)
1029 ("python-cython" ,python-cython)))
1030 (home-page "http://pandas.pydata.org")
1031 (synopsis "Data structures for data analysis, time series, and statistics")
1033 "Pandas is a Python package providing fast, flexible, and expressive data
1034 structures designed to make working with structured (tabular,
1035 multidimensional, potentially heterogeneous) and time series data both easy
1036 and intuitive. It aims to be the fundamental high-level building block for
1037 doing practical, real world data analysis in Python.")
1038 (license license:bsd-3)))
1040 (define-public python2-pandas
1041 (package-with-python2 python-pandas))
1043 (define-public python2-mechanize
1045 (name "python2-mechanize")
1050 (uri (string-append "https://pypi.python.org/packages/source/m/mechanize/mechanize-"
1054 "0rj7r166i1dyrq0ihm5rijfmvhs8a04im28lv05c0c3v206v4rrf"))))
1055 (build-system python-build-system)
1057 `(#:python ,python-2 ; apparently incompatible with Python 3
1059 ;; test fails with message
1060 ;; AttributeError: 'module' object has no attribute 'test_pullparser'
1061 ;; (python-3.3.2) or
1062 ;; AttributeError: 'module' object has no attribute 'test_urllib2_localnet'
1064 ;; The source code is from March 2011 and probably not up-to-date
1065 ;; with respect to python unit tests.
1066 (home-page "http://wwwsearch.sourceforge.net/mechanize/")
1068 "Stateful programmatic web browsing in Python")
1070 "Mechanize implements stateful programmatic web browsing in Python,
1071 after Andy Lester’s Perl module WWW::Mechanize.")
1072 (license (license:non-copyleft
1074 "See COPYING in the distribution."))))
1077 (define-public python-simplejson
1079 (name "python-simplejson")
1084 (uri (pypi-uri "simplejson" version))
1087 "1qhwsykjlb85igb4cfl6v6gkprzbbg8gyqdd7zscc8w3x0ifcfwm"))))
1088 (build-system python-build-system)
1089 (home-page "http://simplejson.readthedocs.org/en/latest/")
1091 "Json library for Python")
1093 "JSON (JavaScript Object Notation) is a subset of JavaScript
1094 syntax (ECMA-262 3rd edition) used as a lightweight data interchange
1097 Simplejson exposes an API familiar to users of the standard library marshal
1098 and pickle modules. It is the externally maintained version of the json
1099 library contained in Python 2.6, but maintains compatibility with Python 2.5
1100 and (currently) has significant performance advantages, even without using
1101 the optional C extension for speedups. Simplejson is also supported on
1103 (license license:x11)))
1105 (define-public python2-simplejson
1106 (package-with-python2 python-simplejson))
1109 (define-public python-pyicu
1111 (name "python-pyicu")
1116 (uri (pypi-uri "PyICU" version))
1119 "05nz4p2dpkhwj6y9kik24xbvmfxji39nl0xw0sc0nvp9fgzf6xnd"))))
1120 (build-system python-build-system)
1122 `(("icu4c" ,icu4c)))
1124 `(("python-pytest" ,python-pytest)
1125 ("python-six" ,python-six)))
1126 (home-page "https://github.com/ovalhub/pyicu")
1127 (synopsis "Python extension wrapping the ICU C++ API")
1129 "PyICU is a python extension wrapping the ICU C++ API.")
1130 (properties `((python2-variant . ,(delay python2-pyicu))))
1131 (license license:x11)))
1133 (define-public python2-pyicu
1134 (let ((base (package-with-python2
1135 (strip-python2-variant python-pyicu))))
1139 `(,@(package-arguments base)
1141 (modify-phases %standard-phases
1142 (add-before 'check 'delete-failing-test
1144 ;; XXX: This fails due to Unicode issues unique to Python 2,
1145 ;; it seems: <https://github.com/ovalhub/pyicu/issues/61>.
1146 (delete-file "test/test_Script.py")
1149 (define-public python2-dogtail
1150 ;; Python 2 only, as it leads to "TabError: inconsistent use of tabs and
1151 ;; spaces in indentation" with Python 3.
1153 (name "python2-dogtail")
1157 (uri (pypi-uri "dogtail" version))
1160 "0p5wfssvzr9w0bvhllzbbd8fnp4cca2qxcpcsc33dchrmh5n552x"))))
1161 (build-system python-build-system)
1162 (arguments `(#:python ,python-2
1163 #:tests? #f)) ; invalid command "test"
1164 ;; Currently no offical homepage.
1165 (home-page "https://pypi.python.org/pypi/dogtail/")
1166 (synopsis "GUI test tool and automation framework written in Python")
1168 "Dogtail is a GUI test tool and automation framework written in Python.
1169 It uses Accessibility (a11y) technologies to communicate with desktop
1170 applications. dogtail scripts are written in Python and executed like any
1171 other Python program.")
1172 (license license:gpl2+)))
1174 (define-public python2-empy
1176 (name "python2-empy")
1180 (uri (string-append "http://www.alcyone.com/software/empy/empy-"
1184 "01g8mmkfnvjdmlhsihwyx56lrg7r5m5d2fg6mnxsvy6g0dnl69f6"))))
1185 (build-system python-build-system)
1187 `(#:python ,python-2
1189 (modify-phases %standard-phases
1192 (zero? (system* "./test.sh")))))))
1193 (home-page "http://www.alcyone.com/software/empy/")
1194 (synopsis "Templating system for Python")
1196 "EmPy is a system for embedding Python expressions and statements in
1197 template text; it takes an EmPy source file, processes it, and produces
1198 output. This is accomplished via expansions, which are special signals to the
1199 EmPy system and are set off by a special prefix (by default the at sign, @@).
1200 EmPy can expand arbitrary Python expressions and statements in this way, as
1201 well as a variety of special forms. Textual data not explicitly delimited in
1202 this way is sent unaffected to the output, allowing Python to be used in
1203 effect as a markup language. Also supported are callbacks via hooks,
1204 recording and playback via diversions, and dynamic, chainable filters. The
1205 system is highly configurable via command line options and embedded
1207 (license license:lgpl2.1+)))
1209 (define-public python2-element-tree
1211 (name "python2-element-tree")
1216 "http://effbot.org/media/downloads/elementtree-"
1217 version "-20050316.tar.gz"))
1220 "016bphqnlg0l4vslahhw4r0aanw95bpypy65r1i1acyb2wj5z7dj"))))
1221 (build-system python-build-system)
1223 `(#:python ,python-2 ; seems to be part of Python 3
1224 #:tests? #f)) ; no 'test' sub-command
1225 (synopsis "Toolkit for XML processing in Python")
1227 "ElementTree is a Python library supporting lightweight XML processing.")
1228 (home-page "http://effbot.org/zone/element-index.htm")
1229 (license (license:x11-style
1230 "http://docs.python.org/2/license.html"
1231 "Like \"CWI LICENSE AGREEMENT FOR PYTHON 0.9.0 THROUGH 1.2\"."))))
1233 (define-public python2-pybugz
1235 (name "python2-pybugz")
1240 "http://bits.liquidx.net/projects/pybugz/pybugz-"
1244 "17ni00p08gp5lkxlrrcnvi3x09fmajnlbz4da03qcgl9q21ym4jd"))
1245 (patches (search-patches "pybugz-stty.patch"
1246 "pybugz-encode-error.patch"))))
1247 (build-system python-build-system)
1249 `(#:python ,python-2 ; SyntaxError with Python 3
1250 #:tests? #f)) ; no 'test' sub-command
1252 `(("element-tree" ,python2-element-tree)))
1253 (synopsis "Python and command-line interface to Bugzilla")
1255 "PyBugz is a Python library and command-line tool to query the Bugzilla
1256 bug tracking system. It is meant as an aid to speed up interaction with the
1258 (home-page "http://www.liquidx.net/pybugz/")
1259 (license license:gpl2)))
1261 (define-public python-enum34
1263 (name "python-enum34")
1268 (uri (pypi-uri "enum34" version))
1271 "1cgm5ng2gcfrkrm3hc22brl6chdmv67b9zvva9sfs7gn7dwc9n4a"))))
1272 (build-system python-build-system)
1273 (home-page "https://pypi.python.org/pypi/enum34")
1274 (synopsis "Backported Python 3.4 Enum")
1276 "Enum34 is the new Python stdlib enum module available in Python 3.4
1277 backported for previous versions of Python from 2.4 to 3.3.")
1278 (license license:bsd-3)))
1280 (define-public python2-enum34
1281 (package-with-python2 python-enum34))
1283 (define-public python-parse-type
1285 (name "python-parse-type")
1290 (uri (string-append "https://pypi.python.org/packages/source/p/"
1291 "parse_type/parse_type-" version ".tar.gz"))
1294 "0iv1c34npr4iynwpgv1vkjx9rjd18a85ir8c01gc5f7wp8iv7l1x"))))
1295 (build-system python-build-system)
1298 (modify-phases %standard-phases
1299 (add-after 'unpack 'patch-tests
1301 (substitute* "tests/test_parse_type_parse.py"
1302 ;; Newer Python versions don't have the problem this test tests.
1303 (("self[.]assertRaises[(]parse.TooManyFields, p.parse, ''[)]")
1307 `(("python-six" ,python-six)
1308 ("python-parse" ,python-parse)))
1310 `(("python-pytest" ,python-pytest)
1311 ("python-pytest-runner" ,python-pytest-runner)))
1312 (home-page "https://github.com/jenisys/parse_type")
1313 (synopsis "Extended parse module")
1315 "Parse_type extends the python parse module.")
1317 `((python2-variant . ,(delay python2-parse-type))))
1318 (license license:bsd-3)))
1320 (define-public python2-parse-type
1321 (let ((base (package-with-python2
1322 (strip-python2-variant python-parse-type))))
1323 (package (inherit base)
1325 `(("python2-enum34" ,python2-enum34)
1326 ,@(package-propagated-inputs base))))))
1328 (define-public python-parse
1330 (name "python-parse")
1335 (uri (pypi-uri "parse" version))
1338 "0y31i3mwgv35qn0kzzjn9q8jqfdqmbi6sr6yfvn8rq4lqjm5lhvi"))
1339 (patches (search-patches "python-parse-too-many-fields.patch"))))
1340 (build-system python-build-system)
1343 (modify-phases %standard-phases
1345 (lambda _ (zero? (system* "python" "test_parse.py")))))))
1346 (home-page "https://github.com/r1chardj0n3s/parse")
1347 (synopsis "Parse strings")
1349 "Parse strings using a specification based on the Python format()
1351 (license license:x11)))
1353 (define-public python-polib
1355 (name "python-polib")
1359 (uri (pypi-uri "polib" version))
1362 "1pq2hbm3m2q0cjdszk8mc4qa1vl3wcblh5nfyirlfnzb2pcy7zss"))))
1363 (build-system python-build-system)
1364 (home-page "https://bitbucket.org/izi/polib/wiki/Home")
1365 (synopsis "Manipulate, create and modify gettext files")
1366 (description "Polib can manipulate any gettext format (po, pot and mo)
1367 files. It can be used to create po files from scratch or to modify
1369 (license license:expat)))
1371 (define-public python2-polib
1372 (let ((base (package-with-python2 (strip-python2-variant python-polib))))
1375 (arguments `(,@(package-arguments base)
1376 ;; Tests don't work with python2.
1379 (define-public scons
1385 (uri (string-append "mirror://sourceforge/scons/scons/" version
1386 "/scons-" version ".tar.gz"))
1389 "0wzid419mlwqw9llrg8gsx4nkzhqy16m4m40r0xnh6cwscw5wir4"))))
1390 (build-system python-build-system)
1392 `(#:use-setuptools? #f ; still relies on distutils
1393 #:tests? #f)) ; no 'python setup.py test' command
1394 (home-page "http://scons.org/")
1395 (synopsis "Software construction tool written in Python")
1397 "SCons is a software construction tool. Think of SCons as an improved,
1398 cross-platform substitute for the classic Make utility with integrated
1399 functionality similar to autoconf/automake and compiler caches such as ccache.
1400 In short, SCons is an easier, more reliable and faster way to build
1402 (license license:x11)))
1404 (define-public scons-python2
1406 (inherit (package-with-python2 scons))
1407 (name "scons-python2")))
1409 (define-public python-extras
1411 (name "python-extras")
1417 "https://pypi.python.org/packages/source/e/extras/extras-"
1421 "1h7zx4dfyclalg0fqnfjijpn0f793a9mx8sy3b27gd31nr6dhq3s"))))
1422 (build-system python-build-system)
1424 ;; error in setup.cfg: command 'test' has no such option 'buffer'
1426 (home-page "https://github.com/testing-cabal/extras")
1427 (synopsis "Useful extensions to the Python standard library")
1429 "Extras is a set of extensions to the Python standard library.")
1430 (license license:expat)))
1432 (define-public python2-extras
1433 (package-with-python2 python-extras))
1435 (define-public python-mimeparse
1437 (name "python-mimeparse")
1443 "https://pypi.python.org/packages/source/p/python-mimeparse/python-mimeparse-"
1447 "1hyxg09kaj02ri0rmwjqi86wk4nd1akvv7n0dx77azz76wga4s9w"))))
1448 (build-system python-build-system)
1450 '(#:tests? #f)) ; no setup.py test command
1452 "https://github.com/dbtsai/python-mimeparse")
1453 (synopsis "Python library for parsing MIME types")
1455 "Mimeparse provides basic functions for parsing MIME type names and
1456 matching them against a list of media-ranges.")
1457 (license license:expat)))
1459 (define-public python2-mimeparse
1460 (package-with-python2 python-mimeparse))
1462 (define-public python-pafy
1464 (name "python-pafy")
1469 (uri (pypi-uri "pafy" version))
1472 "1a7dxi95m1043rxx1r5x3ngb66nwlq6aqcasyqqjzmmmjps4zrim"))))
1473 (build-system python-build-system)
1475 `(#:tests? #f)) ; Currently pafy can not find itself in the tests
1477 ;; Youtube-dl is a python package which is imported in the file
1478 ;; "backend_youtube_dl.py", therefore it needs to be propagated.
1479 `(("youtube-dl" ,youtube-dl)))
1480 (home-page "https://np1.github.io/pafy/")
1481 (synopsis "Retrieve YouTube content and metadata")
1483 "@code{pafy} is a python library to retrieve YouTube content and metadata.")
1484 (license license:lgpl3+)))
1486 (define-public python-py
1493 (uri (pypi-uri "py" version))
1496 "19s1pql9pq85h1qzsdwgyb8a3k1qgkvh33b02m8kfqhizz8rzf64"))))
1497 (build-system python-build-system)
1499 ;; FIXME: "ImportError: 'test' module incorrectly imported from
1500 ;; '/gnu/store/...-python-pytest-mimimal-3.0.5/lib/python3.5/site-packages'.
1501 ;; Expected '/tmp/guix-build-python-py-1.4.31.drv-0/py-1.4.31/py'.
1502 ;; Is this module globally installed?"
1504 (home-page "http://pylib.readthedocs.org/")
1505 (synopsis "Python library for parsing, I/O, instrospection, and logging")
1507 "Py is a Python library for file name parsing, .ini file parsing, I/O,
1508 code introspection, and logging.")
1509 (license license:expat)))
1511 (define-public python2-py
1512 (package-with-python2 python-py))
1514 ;; Recent versions of python-fixtures and python-testrepository need
1515 ;; python-pbr for packaging, which itself needs these two packages for
1517 ;; To fix this circular dependency, we use a build of python-pbr, based on the
1518 ;; same source, just without any test dependencies and with tests disabled.
1519 ;; python-pbr-minmal is then used to package python-fixtures and
1520 ;; python-testrepository.
1521 ;; Strictly speaking we currently could remove the test-requirements from the
1522 ;; normal python-pbr package (and save this package) since test are disabled
1523 ;; there anyway. But this may change in future.
1524 (define-public python-pbr-minimal
1526 (name "python-pbr-minimal")
1531 (uri (pypi-uri "pbr" version))
1534 "14fs5acnalnb3h62s7q7av239j541fk0n0z0lawh4h09b1s93s6p"))))
1535 (build-system python-build-system)
1538 (home-page "http://docs.openstack.org/developer/pbr/")
1539 (synopsis "Minimal build of python-pbr used for bootstrapping")
1541 "Used only for bootstrapping python2-pbr, you should not need this.")
1542 (license license:asl2.0)))
1544 (define-public python2-pbr-minimal
1545 (package-with-python2 python-pbr-minimal))
1547 (define-public python-pbr
1549 (inherit python-pbr-minimal)
1552 `(#:tests? #f)) ;; Most tests seem to use the Internet.
1554 `(("git" ,git))) ;; pbr actually uses the "git" binary.
1556 `(("python-fixtures" ,python-fixtures)
1557 ;; discover, coverage, hacking, subunit
1558 ("python-mock" ,python-mock)
1559 ("python-six" ,python-six)
1560 ("python-sphinx" ,python-sphinx)
1561 ("python-testrepository" ,python-testrepository)
1562 ("python-testresources" ,python-testresources)
1563 ("python-testscenarios" ,python-testscenarios)
1564 ("python-testtools" ,python-testtools)
1565 ("python-virtualenv" ,python-virtualenv)))
1566 (synopsis "Enhance the default behavior of Python’s setuptools")
1568 "Python Build Reasonableness (PBR) is a library that injects some useful
1569 and sensible default behaviors into your setuptools run. It will set
1570 versions, process requirements files and generate AUTHORS and ChangeLog file
1571 from git information.
1574 (define-public python2-pbr
1575 (package-with-python2 python-pbr))
1577 (define-public python-exif-read
1579 (name "python-exif-read")
1583 (uri (pypi-uri "ExifRead" version))
1586 "1b90jf6m9vxh9nanhpyvqdq7hmfx5iggw1l8kq10jrs6xgr49qkr"))))
1587 (build-system python-build-system)
1588 (arguments `(#:tests? #f)) ; no tests
1589 (home-page "https://github.com/ianare/exif-py")
1590 (synopsis "Python library to extract EXIF data from image files")
1592 "ExifRead is a Python library to extract EXIF data from tiff and jpeg
1594 (license license:bsd-3)))
1596 (define-public python2-exif-read
1597 (package-with-python2 python-exif-read))
1599 (define-public python-pyld
1601 (name "python-pyld")
1605 (uri (pypi-uri "PyLD" version))
1608 "1m0fs6897vxfkf7awah5i66i7b7smm5fnywf1w50fpzyfbfhr156"))))
1609 (build-system python-build-system)
1610 (arguments `(#:tests? #f)) ; no tests
1611 (home-page "https://github.com/digitalbazaar/pyld")
1612 (synopsis "Python implementation of the JSON-LD specification")
1614 "PyLD is an implementation of the JSON-LD specification.")
1615 (license license:bsd-3)))
1617 (define-public python2-pyld
1618 (package-with-python2 python-pyld))
1620 (define-public python-click
1622 (name "python-click")
1627 (uri (pypi-uri "click" version))
1630 "02qkfpykbq35id8glfgwc38yc430427yd05z1wc5cnld8zgicmgi"))))
1631 (build-system python-build-system)
1634 (modify-phases %standard-phases
1635 (add-after 'unpack 'fix-paths
1636 (lambda* (#:key inputs #:allow-other-keys)
1637 (let ((glibc (assoc-ref inputs ,(if (%current-target-system)
1638 "cross-libc" "libc"))))
1639 (substitute* "click/_unicodefun.py"
1641 (string-append "'" glibc "/bin/locale'"))))
1645 (zero? (system* "make" "test")))))))
1647 `(("python-pytest" ,python-pytest)))
1648 (home-page "http://click.pocoo.org")
1649 (synopsis "Command line library for Python")
1651 "Click is a Python package for creating command line interfaces in a
1652 composable way with as little code as necessary. Its name stands for
1653 \"Command Line Interface Creation Kit\". It's highly configurable but comes
1654 with sensible defaults out of the box.")
1655 (license license:bsd-3)))
1657 (define-public python2-click
1658 (package-with-python2 python-click))
1660 (define-public python-wheel
1662 (name "python-wheel")
1663 (version "0.30.0a0")
1667 (uri (pypi-uri "wheel" version))
1670 "1nm6mn8isny0hr86rhbfrpfj867c0phf001xgsd69xfp9ady1wwq"))))
1671 (build-system python-build-system)
1673 `(("python-jsonschema" ,python-jsonschema)
1674 ("python-pytest-cov" ,python-pytest-cov)))
1675 (home-page "https://bitbucket.org/pypa/wheel/")
1676 (synopsis "Format for built Python packages")
1678 "A wheel is a ZIP-format archive with a specially formatted filename and
1679 the @code{.whl} extension. It is designed to contain all the files for a PEP
1680 376 compatible install in a way that is very close to the on-disk format. Many
1681 packages will be properly installed with only the @code{Unpack} step and the
1682 unpacked archive preserves enough information to @code{Spread} (copy data and
1683 scripts to their final locations) at any later time. Wheel files can be
1684 installed with a newer @code{pip} or with wheel's own command line utility.")
1685 (license license:expat)
1686 (properties `((python2-variant . ,(delay python2-wheel))))))
1688 (define-public python2-wheel
1689 (let ((wheel (package-with-python2
1690 (strip-python2-variant python-wheel))))
1691 (package (inherit wheel)
1692 (native-inputs `(("python2-functools32" ,python2-functools32)
1693 ,@(package-native-inputs wheel))))))
1695 (define-public python-vcversioner
1697 (name "python-vcversioner")
1698 (version "2.16.0.0")
1702 (uri (pypi-uri "vcversioner" version))
1705 "16z10sm78jd7ca3jbkgc3q5i8a8q7y1h21q1li21yy3rlhbhrrns"))))
1706 (build-system python-build-system)
1707 (synopsis "Python library for version number discovery")
1708 (description "Vcversioner is a Python library that inspects tagging
1709 information in a variety of version control systems in order to discover
1711 (home-page "https://github.com/habnabit/vcversioner")
1712 (license license:isc)))
1714 (define-public python2-vcversioner
1715 (package-with-python2 python-vcversioner))
1717 (define-public python-jsonschema
1719 (name "python-jsonschema")
1725 "https://pypi.python.org/packages/source/j/jsonschema/jsonschema-"
1729 "0hddbqjm4jq63y8jf44nswina1crjs16l9snb6m3vvgyg31klrrn"))))
1730 (build-system python-build-system)
1733 (modify-phases %standard-phases
1734 (replace 'check (lambda _ (zero? (system* "nosetests")))))))
1736 `(("python-nose" ,python-nose)
1737 ("python-vcversioner" ,python-vcversioner)))
1738 (home-page "https://github.com/Julian/jsonschema")
1739 (synopsis "Implementation of JSON Schema for Python")
1741 "Jsonschema is an implementation of JSON Schema for Python.")
1742 (license license:expat)
1743 (properties `((python2-variant . ,(delay python2-jsonschema))))))
1745 (define-public python2-jsonschema
1746 (let ((jsonschema (package-with-python2
1747 (strip-python2-variant python-jsonschema))))
1748 (package (inherit jsonschema)
1750 `(("python2-mock" ,python2-mock)
1751 ,@(package-native-inputs jsonschema)))
1753 `(("python2-functools32" ,python2-functools32))))))
1755 (define-public python-schema
1757 (name "python-schema")
1762 (uri (pypi-uri "schema" version))
1765 "1lw28j9w9vxyigg7vkfkvi6ic9lgjkdnfvnxdr7pklslqvzmk2vm"))))
1766 (build-system python-build-system)
1768 `(("python-pytest" ,python-pytest)))
1769 (home-page "https://github.com/keleshev/schema")
1770 (synopsis "Simple data validation library")
1772 "@code{python-schema} is a library for validating Python data
1773 structures, such as those obtained from config-files, forms, external
1774 services or command-line parsing, converted from JSON/YAML (or
1775 something else) to Python data-types.")
1776 (license license:psfl)))
1778 (define-public python2-schema
1779 (package-with-python2 python-schema))
1781 (define-public python-schema-0.5
1782 (package (inherit python-schema)
1787 (uri (pypi-uri "schema" version))
1790 "10zqvpaky51kgb8nd42bk7jwl8cn2zvayxjpdc1wwmpybj92x67s"))))))
1792 (define-public python2-schema-0.5
1793 (package-with-python2 python-schema-0.5))
1795 (define-public python-kitchen
1797 (name "python-kitchen")
1802 (uri (pypi-uri "kitchen" version))
1805 "0ggv3p4x8jvmmzhp0xm00h6pvh1g0gmycw71rjwagnrj8n23vxrq"))))
1806 (build-system python-build-system)
1808 `(("python-chardet" ,python-chardet)))
1809 (home-page "https://github.com/fedora-infra/kitchen")
1810 (synopsis "Python API for snippets")
1811 (description "@code{kitchen} module provides a python API for all sorts of
1812 little useful snippets of code that everybody ends up writing for their projects
1813 but never seem big enough to build an independent release. Use kitchen and stop
1814 cutting and pasting that code over and over.")
1815 (license (list license:lgpl2.1+
1816 ;; subprocess.py, test_subprocess.py,
1817 ;; kitchen/pycompat25/defaultdict.py:
1820 (define-public python2-kitchen
1821 (package-with-python2 python-kitchen))
1823 (define-public python-unidecode
1825 (name "python-unidecode")
1829 (uri (pypi-uri "Unidecode" version))
1832 "0lfhp9c5xrbpjvbpr12ji52g1lx04404bzzdg6pvabhzisw6l2i8"))))
1833 (build-system python-build-system)
1834 (home-page "https://pypi.python.org/pypi/Unidecode")
1835 (synopsis "ASCII transliterations of Unicode text")
1837 "Unidecode provides ASCII transliterations of Unicode text. Unidecode is
1838 useful when integrating with legacy code that doesn't support Unicode, or for
1839 ease of entry of non-Roman names on a US keyboard, or when constructing ASCII
1840 machine identifiers from human-readable Unicode strings that should still be
1841 somewhat intelligible.")
1842 (license license:gpl2+)))
1844 (define-public python2-unidecode
1845 (package-with-python2 python-unidecode))
1847 (define-public python-pyjwt
1849 (name "python-pyjwt")
1854 (uri (pypi-uri "PyJWT" version))
1857 "1rxsg14i33vm2i6lz0my628108c81k43v10n4h3p0gx62xdyf2sh"))
1858 (modules '((guix build utils)))
1861 (for-each delete-file-recursively
1862 (find-files "." "\\.pyc$"))
1864 (build-system python-build-system)
1866 `(("python-pytest" ,python-pytest-3.0)
1867 ("python-pytest-cov" ,python-pytest-cov)
1868 ("python-pytest-runner" ,python-pytest-runner)))
1869 (home-page "https://github.com/progrium/pyjwt")
1870 (synopsis "JSON Web Token implementation in Python")
1872 "PyJWT is a JSON Web Token implementation written in Python.")
1873 (license license:expat)))
1875 (define-public python2-pyjwt
1876 (package-with-python2 python-pyjwt))
1878 (define-public python-pykka
1880 (name "python-pykka")
1885 (uri (pypi-uri "Pykka" version))
1888 "049w3r0mdnnw7xv19jiq7rvls9k7xs73x05b4qs5d6z4vvmgyiz8"))))
1889 (build-system python-build-system)
1891 `(("python-mock" ,python-mock)
1892 ("python-nose" ,python-nose)
1893 ("python-gevent" ,python-gevent)
1894 ("python-eventlet" ,python-eventlet)))
1895 (home-page "https://www.pykka.org/")
1896 (synopsis "Pykka is a Python implementation of the actor model")
1898 "Pykka is a Python implementation of the actor model.
1899 The actor model introduces some simple rules to control the sharing
1900 of state and cooperation between execution units, which makes it
1901 easier to build concurrent applications.")
1902 (license license:asl2.0)))
1904 (define-public python2-pykka
1905 (package-with-python2 python-pykka))
1907 (define-public python-itsdangerous
1909 (name "python-itsdangerous")
1915 "https://pypi.python.org/packages/source/i/itsdangerous/itsdangerous-"
1919 "06856q6x675ly542ig0plbqcyab6ksfzijlyf1hzhgg3sgwgrcyb"))))
1920 (build-system python-build-system)
1921 (home-page "https://github.com/mitsuhiko/itsdangerous")
1922 (synopsis "Python library for passing data to/from untrusted environments")
1924 "Itsdangerous provides various helpers to pass trusted data to untrusted
1925 environments and back.")
1926 (license license:bsd-3)))
1928 (define-public python2-itsdangerous
1929 (package-with-python2 python-itsdangerous))
1931 (define-public python-pyyaml
1933 (name "python-pyyaml")
1938 (uri (pypi-uri "PyYAML" version))
1941 "1aqjl8dk9amd4zr99n8v2qxzgmr2hdvqfma4zh7a41rj6336c9sr"))))
1942 (build-system python-build-system)
1944 `(("libyaml" ,libyaml)))
1945 (home-page "http://pyyaml.org/wiki/PyYAML")
1946 (synopsis "YAML parser and emitter for Python")
1948 "PyYAML is a YAML parser and emitter for Python. PyYAML features a
1949 complete YAML 1.1 parser, Unicode support, pickle support, capable extension
1950 API, and sensible error messages. PyYAML supports standard YAML tags and
1951 provides Python-specific tags that allow to represent an arbitrary Python
1953 (license license:expat)))
1955 (define-public python2-pyyaml
1956 (package-with-python2 python-pyyaml))
1958 (define-public python-virtualenv
1960 (name "python-virtualenv")
1965 (uri (pypi-uri "virtualenv" version))
1968 "07cbajzk8l05k5zhlw0b9wbf2is65bl9v6zrn2a0iyn57w6pd73d"))))
1969 (build-system python-build-system)
1972 (modify-phases %standard-phases
1975 ;; Disable failing test. See upstream bug report
1976 ;; https://github.com/pypa/virtualenv/issues/957
1977 (substitute* "tests/test_virtualenv.py"
1978 (("skipif.*") "skipif(True, reason=\"Guix\")\n"))
1979 (zero? (system* "py.test")))))))
1981 `(("python-mock" ,python-mock)
1982 ("python-pytest" ,python-pytest)))
1983 (home-page "https://virtualenv.pypa.io/")
1984 (synopsis "Virtual Python environment builder")
1986 "Virtualenv is a tool to create isolated Python environments.")
1987 (license license:expat)))
1989 (define-public python2-virtualenv
1990 (package-with-python2 python-virtualenv))
1992 (define-public python-markupsafe
1994 (name "python-markupsafe")
2000 "https://pypi.python.org/packages/source/M/MarkupSafe/MarkupSafe-"
2004 "1hvip33wva3fnmvfp9x5klqri7hpl1hkgqmjbss18nmrb7zimv54"))))
2005 (build-system python-build-system)
2006 (home-page "https://github.com/mitsuhiko/markupsafe")
2007 (synopsis "XML/HTML/XHTML markup safe string implementation for Python")
2009 "Markupsafe provides an XML/HTML/XHTML markup safe string implementation
2011 (license license:bsd-3)))
2013 (define-public python2-markupsafe
2014 (package-with-python2 python-markupsafe))
2016 (define-public python-jinja2
2018 (name "python-jinja2")
2023 (uri (pypi-uri "Jinja2" version))
2026 "1zzrkywhziqffrzks14kzixz7nd4yh2vc0fb04a68vfd2ai03anx"))))
2027 (build-system python-build-system)
2030 (modify-phases %standard-phases
2031 ;; These files cannot be built with Python < 3.6. See
2032 ;; https://github.com/pallets/jinja/issues/655
2033 ;; FIXME: Remove this when the "python" package is upgraded.
2034 (add-after 'unpack 'delete-incompatible-files
2036 (for-each delete-file
2037 '("jinja2/asyncsupport.py"
2038 "jinja2/asyncfilters.py"))
2041 `(("python-markupsafe" ,python-markupsafe)))
2042 (home-page "http://jinja.pocoo.org/")
2043 (synopsis "Python template engine")
2045 "Jinja2 is a small but fast and easy to use stand-alone template engine
2046 written in pure Python.")
2047 (license license:bsd-3)))
2049 (define-public python2-jinja2
2050 (package-with-python2 python-jinja2))
2052 (define-public python-pystache
2054 (name "python-pystache")
2058 (uri (pypi-uri "pystache" version))
2061 "0nmqsfmiw4arjxqkmf9z66ml950pcdjk6aq4gin4sywmzdjw5fzp"))))
2062 (build-system python-build-system)
2064 '(#:tests? #f)) ; FIXME: Python 3 tests are failing.
2065 (home-page "http://defunkt.io/pystache/")
2066 (synopsis "Python logic-less template engine")
2068 "Pystache is a Python implementation of the framework agnostic,
2069 logic-free templating system Mustache.")
2070 (license license:expat)
2071 (properties `((python2-variant . ,(delay python2-pystache))))))
2073 (define-public python2-pystache
2074 (package (inherit (package-with-python2
2075 (strip-python2-variant python-pystache)))
2077 `(#:python ,python-2
2079 (modify-phases %standard-phases
2082 (zero? (system* "python" "test_pystache.py")))))))))
2084 (define-public python-joblib
2086 (name "python-joblib")
2090 (uri (pypi-uri "joblib" version))
2093 "0787k919zlfmgymprz5bzv0v1df5bbirlf3awrghmjgvkrd9dci9"))
2094 (modules '((guix build utils)))
2097 ;; Remove pre-compiled .pyc files from source.
2098 (for-each delete-file-recursively
2099 (find-files "." "__pycache__" #:directories? #t))
2100 (for-each delete-file (find-files "." "\\.pyc$"))
2102 (build-system python-build-system)
2105 (modify-phases %standard-phases
2106 (add-before 'check 'disable-failing-tests
2108 ;; This numpydoc tests fails for unknown reasons
2109 (delete-file "doc/sphinxext/numpydoc/tests/test_docscrape.py")
2110 ;; This numpydoc test depends on matplotlib, which is not a
2112 (delete-file "doc/sphinxext/numpydoc/tests/test_plot_directive.py")
2113 ;; These tests fail to execute sys.executable
2114 (substitute* "joblib/test/test_parallel.py"
2115 (("import nose" line)
2116 (string-append "from nose.plugins.skip import SkipTest\n" line))
2117 (("def test_nested_parallel_warnings" line)
2118 (string-append "@SkipTest\n" line))
2119 (("def test_parallel_with_interactively_defined_functions" line)
2120 (string-append "@SkipTest\n" line)))
2122 ;; Provide nose to enable tests command
2124 `(("python-nose" ,python-nose)
2125 ("python-sphinx" ,python-sphinx)
2126 ("python-docutils" ,python-docutils)
2127 ("python-numpydoc" ,python-numpydoc)))
2128 (home-page "http://pythonhosted.org/joblib/")
2129 (synopsis "Using Python functions as pipeline jobs")
2131 "Joblib is a set of tools to provide lightweight pipelining in Python.
2132 In particular, joblib offers: transparent disk-caching of the output values
2133 and lazy re-evaluation (memoize pattern), easy simple parallel computing
2134 logging and tracing of the execution.")
2135 (license license:bsd-3)))
2137 (define-public python2-joblib
2138 (package-with-python2 python-joblib))
2140 (define-public python-docutils
2142 (name "python-docutils")
2147 (uri (pypi-uri "docutils" version))
2150 "0x22fs3pdmr42kvz6c654756wja305qv6cx1zbhwlagvxgr4xrji"))))
2151 (build-system python-build-system)
2153 '(#:tests? #f)) ; no setup.py test command
2154 (home-page "http://docutils.sourceforge.net/")
2155 (synopsis "Python Documentation Utilities")
2157 "Docutils is a modular system for processing documentation into useful
2158 formats, such as HTML, XML, and LaTeX. For input Docutils supports
2160 ;; Most of the source code is public domain, but some source files are
2161 ;; licensed under the PFSL, BSD 2-clause, and GPLv3+ licenses.
2162 (license (list license:public-domain license:psfl license:bsd-2 license:gpl3+))))
2164 (define-public python2-docutils
2165 (package-with-python2 python-docutils))
2167 (define-public python-pygments
2169 (name "python-pygments")
2174 (uri (pypi-uri "Pygments" version))
2177 "1k78qdvir1yb1c634nkv6rbga8wv4289xarghmsbbvzhvr311bnv"))))
2178 (build-system python-build-system)
2180 ;; FIXME: Tests require sphinx, which depends on this.
2182 (home-page "http://pygments.org/")
2183 (synopsis "Syntax highlighting")
2185 "Pygments is a syntax highlighting package written in Python.")
2186 (license license:bsd-2)))
2188 (define-public python2-pygments
2189 (package-with-python2 python-pygments))
2191 (define-public python-sphinxcontrib-websupport
2193 (name "python-sphinxcontrib-websupport")
2197 (uri (pypi-uri "sphinxcontrib-websupport" version))
2200 "1f9f0wjpi9nhikbyaz6d19s7qvzdf1nq2g5dsh640fma4q9rd1bs"))))
2201 (build-system python-build-system)
2203 `(("python-mock" ,python-mock)
2204 ("python-pytest" ,python-pytest)
2205 ("python-xapian-bindings" ,python-xapian-bindings)))
2206 ;; Needed for running the test suite
2208 `(("python-six" ,python-six)
2209 ("python-jinja2" ,python-jinja2)
2210 ("python-docutils" ,python-docutils)
2211 ("python-sphinx" ,python-sphinx)
2212 ("python-sqlalchemy" ,python-sqlalchemy)
2213 ("python-whoosh" ,python-whoosh)))
2214 (home-page "http://sphinx-doc.org/")
2215 (synopsis "Sphinx API for web applications")
2216 (description "This package provides a Python API to easily integrate
2217 Sphinx documentation into your web application. It provides tools to
2218 integrate Sphinx documents in web templates and to handle searches.")
2219 (license license:bsd-3)))
2221 (define-public python-sphinx
2223 (name "python-sphinx")
2228 (uri (pypi-uri "Sphinx" version))
2231 "1i8p9idnli4gr0y4x67yakbdk5w6a0xjzhrg6bg51y9d1fi7fslf"))))
2232 (build-system python-build-system)
2235 (modify-phases %standard-phases
2238 ;; Requires Internet access.
2239 (delete-file "tests/test_build_linkcheck.py")
2240 (zero? (system* "make" "test")))))))
2242 `(("python-imagesize" ,python-imagesize)
2243 ("python-sphinx-alabaster-theme"
2244 ,python-sphinx-alabaster-theme)
2245 ("python-babel" ,python-babel)
2246 ("python-snowballstemmer" ,python-snowballstemmer)
2247 ("python-docutils" ,python-docutils)
2248 ("python-jinja2" ,python-jinja2)
2249 ("python-pygments" ,python-pygments)
2250 ("python-requests" ,python-requests)
2251 ("python-six" ,python-six)))
2253 `(("graphviz" ,graphviz)
2254 ("python-html5lib" ,python-html5lib)
2255 ("python-mock" ,python-mock)
2256 ("python-nose" ,python-nose)))
2257 (home-page "http://sphinx-doc.org/")
2258 (synopsis "Python documentation generator")
2259 (description "Sphinx is a tool that makes it easy to create documentation
2260 for Python projects or other documents consisting of multiple reStructuredText
2262 (license license:bsd-3)
2263 (properties `((python2-variant . ,(delay python2-sphinx))))))
2265 (define-public python-sphinx-1.6
2266 (package (inherit python-sphinx)
2267 (name "python-sphinx")
2271 (uri (pypi-uri "Sphinx" version))
2274 "1rj6f3i8hmrx2qlkshi5kp5xcy98dlynwlyl05yvflj5f66dp2xg"))))
2277 (modify-phases %standard-phases
2280 ;; Requires Internet access.
2281 (delete-file "tests/test_build_linkcheck.py")
2282 (substitute* "tests/test_build_latex.py"
2283 (("@pytest.mark.sphinx\\('latex', testroot='images'\\)")
2284 "@pytest.mark.skip()"))
2285 (zero? (system* "make" "test")))))))
2287 `(("python-sphinxcontrib-websupport" ,python-sphinxcontrib-websupport)
2288 ,@(package-propagated-inputs python-sphinx)))
2290 `(("python-pytest" ,python-pytest-3.0)
2291 ("imagemagick" ,imagemagick) ; for "convert"
2292 ,@(package-native-inputs python-sphinx)))
2295 (define-public python-sphinx-1.5.3
2297 (inherit python-sphinx)
2298 (name "python-sphinx")
2303 (uri (pypi-uri "Sphinx" version))
2306 "0kw1axswbvaavr8ggyf4qr6hnisnrzlbkkcdada69vk1x9xjassg"))))
2308 `(("python-pytest" ,python-pytest-3.0)
2309 ,@(package-native-inputs python-sphinx)))))
2311 (define-public python2-sphinx
2312 (let ((base (package-with-python2 (strip-python2-variant python-sphinx))))
2315 (native-inputs `(("python2-mock" ,python2-mock)
2316 ("python2-enum34" ,python2-enum34)
2317 ,@(package-native-inputs base)))
2318 (propagated-inputs `(("python2-pytz" ,python2-pytz)
2319 ,@(package-propagated-inputs base))))))
2321 (define-public python-sphinx-rtd-theme
2323 (name "python-sphinx-rtd-theme")
2328 (uri (pypi-uri "sphinx_rtd_theme" version))
2331 "05rlhjzdyapr2w74jjs7mrm8hi69qskcr5vya9f9drpsys7lpxrd"))))
2332 (build-system python-build-system)
2333 (arguments '(#:tests? #f)) ; No tests.
2335 `(("python-sphinx" ,python-sphinx)))
2336 (home-page "https://github.com/snide/sphinx_rtd_theme/")
2337 (synopsis "ReadTheDocs.org theme for Sphinx")
2338 (description "A theme for Sphinx used by ReadTheDocs.org.")
2339 (license license:expat)))
2341 (define-public python2-sphinx-rtd-theme
2342 (package-with-python2 python-sphinx-rtd-theme))
2344 (define-public python-guzzle-sphinx-theme
2346 (name "python-guzzle-sphinx-theme")
2351 (uri (pypi-uri "guzzle_sphinx_theme" version))
2354 "1rnkzrrsbnifn3vsb4pfaia3nlvgvw6ndpxp7lzjrh23qcwid34v"))))
2355 (build-system python-build-system)
2357 `(("python-sphinx" ,python-sphinx)))
2358 (home-page "https://github.com/guzzle/guzzle_sphinx_theme")
2359 (synopsis "Sphinx theme used by Guzzle")
2360 (description "This package provides guzzle_sphinx_theme, a theme for the
2361 Sphinx documentation system, used by @uref{http://docs.guzzlephp.org, Guzzle}
2362 and several other projects.")
2363 (license license:expat)))
2365 (define-public python2-guzzle-sphinx-theme
2366 (package-with-python2 python-guzzle-sphinx-theme))
2368 (define-public python-rst.linker
2370 (name "python-rst.linker")
2375 (uri (pypi-uri "rst.linker" version))
2378 "0bh4lnj2p1nh0wf5pgxgfbrp27xhb1rinahkb5j7s3qprq6qn0sr"))))
2379 (build-system python-build-system)
2381 `(("python-dateutil" ,python-dateutil)
2382 ("python-six" ,python-six)))
2384 `(("python-setuptools-scm" ,python-setuptools-scm)))
2385 ;; Test would require path.py, which would introduce a cyclic dependence.
2386 (arguments `(#:tests? #f))
2387 ;; Note: As of version 1.7 the documentation is not worth building.
2388 (home-page "https://github.com/jaraco/rst.linker")
2389 (synopsis "Sphinx plugin to add links and timestamps")
2390 (description "rst.linker allows to automatically replace text by a
2391 reStructuredText external reference or timestamps. It's primary purpose is to
2392 augment the changelog, but it can be used for other documents, too.")
2393 (license license:expat)))
2395 (define-public python2-rst.linker
2396 (package-with-python2 python-rst.linker))
2398 (define-public python-feedgenerator
2400 (name "python-feedgenerator")
2405 (uri (pypi-uri "feedgenerator" version))
2408 "01mirwkm7xfx539hmvj7g9da1j51gw5lsx74dr0glizskjm5vq2s"))
2409 (modules '((guix build utils)))
2412 ;; Remove pre-compiled .pyc files from source.
2413 (for-each delete-file-recursively
2414 (find-files "." "__pycache__" #:directories? #t))
2415 (for-each delete-file (find-files "." "\\.pyc$"))
2417 (build-system python-build-system)
2419 `(("python-pytz" ,python-pytz)
2420 ("python-six" ,python-six)))
2421 (home-page "https://github.com/getpelican/feedgenerator")
2423 "Standalone version of Django's Atom/RSS feed generator")
2425 "Feedgenerator-py3k is a standalone version of Django's feedgenerator,
2426 which can produce feeds in RSS 2.0, RSS 0.91, and Atom formats.")
2427 (license license:bsd-3)))
2429 (define-public python2-feedgenerator
2430 (package-with-python2 python-feedgenerator))
2432 (define-public python-blinker
2434 (name "python-blinker")
2439 (uri (pypi-uri "blinker" version))
2442 "1dpq0vb01p36jjwbhhd08ylvrnyvcc82yxx3mwjx6awrycjyw6j7"))))
2443 (build-system python-build-system)
2444 (home-page "http://pythonhosted.org/blinker/")
2445 (synopsis "Fast, simple object-to-object and broadcast signaling")
2447 "Blinker provides a fast dispatching system that allows any number of
2448 interested parties to subscribe to events, or \"signals\".")
2449 (license license:expat)))
2451 (define-public python2-blinker
2452 (package-with-python2 python-blinker))
2454 (define-public pelican
2461 (uri (pypi-uri "pelican" version))
2464 "1hn94rb4q3zmcq16in055xikal4dba5hfx3zznq7warllcgc9f8k"))))
2465 (build-system python-build-system)
2467 `(("python-feedgenerator" ,python-feedgenerator)
2468 ("python-jinja2" ,python-jinja2)
2469 ("python-pygments" ,python-pygments)
2470 ("python-docutils" ,python-docutils)
2471 ("python-pytz" ,python-pytz)
2472 ("python-blinker" ,python-blinker)
2473 ("python-unidecode" ,python-unidecode)
2474 ("python-six" ,python-six)
2475 ("python-dateutil" ,python-dateutil)))
2476 (home-page "http://getpelican.com/")
2478 `(;; XXX Requires a lot more packages to do unit tests :P
2480 #:phases (modify-phases %standard-phases
2482 'install 'adjust-requires
2483 ;; Since feedgenerator is installed from git, it doesn't
2484 ;; conform to the version requirements.
2486 ;; We *do have* "feedgenerator >= 1.6", but strip off the
2487 ;; version requirement so setuptools doesn't get confused.
2489 (substitute* "setup.py"
2490 (("['\"]feedgenerator.*?['\"]")
2491 "'feedgenerator'")))))))
2492 (synopsis "Python-based static site publishing system")
2494 "Pelican is a tool to generate a static blog from reStructuredText,
2495 Markdown input files, and more. Pelican uses Jinja2 for templating
2496 and is very extensible.")
2497 (license license:agpl3+)))
2499 (define-public python-scikit-image
2501 (name "python-scikit-image")
2507 "https://pypi.python.org/packages/source/s/scikit-image/scikit-image-"
2510 (base32 "0jz416fqvpahqyffw8plmszzfj669w8wvf3y9clnr5lr6a7md3kn"))))
2511 (build-system python-build-system)
2513 ;; TODO: Some tests require running X11 server. Disable them?
2515 ;; See DEPENDS.txt for the list of build and run time requiremnts
2517 `(("python-matplotlib" ,python-matplotlib)
2518 ("python-networkx" ,python-networkx)
2519 ("python-scipy" ,python-scipy)
2520 ("python-pillow" ,python-pillow)))
2522 `(("python-numpy" ,python-numpy)
2523 ("python-cython" ,python-cython)
2524 ("python-six" ,python-six)))
2525 (home-page "http://scikit-image.org/")
2526 (synopsis "Image processing in Python")
2528 "Scikit-image is a collection of algorithms for image processing.")
2529 (license license:bsd-3)))
2531 (define-public python2-scikit-image
2532 (package-with-python2 python-scikit-image))
2534 (define-public python-cython
2536 (name "python-cython")
2541 (uri (pypi-uri "Cython" version))
2544 "02y0pp1nx77b8s1mpxc6da2dccl6wd31pp4ksi9via479qcvacmr"))))
2545 (build-system python-build-system)
2546 ;; we need the full python package and not just the python-wrapper
2547 ;; because we need libpython3.3m.so
2549 `(("python" ,python)))
2552 (modify-phases %standard-phases
2553 (add-before 'check 'set-HOME
2554 ;; some tests require access to "$HOME/.cython"
2555 (lambda _ (setenv "HOME" "/tmp") #t))
2557 (lambda _ (zero? (system* "python" "runtests.py" "-vv")))))))
2558 (home-page "http://cython.org/")
2559 (synopsis "C extensions for Python")
2560 (description "Cython is an optimising static compiler for both the Python
2561 programming language and the extended Cython programming language. It makes
2562 writing C extensions for Python as easy as Python itself.")
2563 (license license:asl2.0)
2564 (properties `((python2-variant . ,(delay python2-cython))))))
2566 (define-public python2-cython
2567 (package (inherit (package-with-python2
2568 (strip-python2-variant python-cython)))
2569 (name "python2-cython")
2571 `(("python-2" ,python-2))))) ; this is not automatically changed
2573 ;; The RPython toolchain currently does not support Python 3.
2574 (define-public python2-rpython
2576 (name "python2-rpython")
2581 (uri (pypi-uri "rpython" version))
2584 "02z9cvxf0y41dcvwnvf2zn0albhhw1drvjjbq27m6i1piw1k6fc0"))))
2585 (build-system python-build-system)
2586 (arguments `(#:python ,python-2))
2588 `(("python2-pytest" ,python2-pytest))) ; needed for running tests
2589 (home-page "https://rpython.readthedocs.org")
2590 (synopsis "Framework for implementing interpreters and virtual machines")
2591 (description "RPython is a translation and support framework for
2592 producing implementations of dynamic languages, emphasizing a clean separation
2593 between language specification and implementation aspects.")
2594 (license license:expat)))
2596 ;; NOTE: when upgrading numpy please make sure that python-pandas and
2597 ;; python-scipy still build, as these three packages are often used together.
2598 (define-public python-numpy
2600 (name "python-numpy")
2606 "https://github.com/numpy/numpy/archive/v" version ".tar.gz"))
2607 (file-name (string-append name "-" version ".tar.gz"))
2610 "025d4j4aakcp8w5i5diqh812cbbjgac7jszx1j56ivrbi1i8vv7d"))))
2611 (build-system python-build-system)
2613 `(("openblas" ,openblas)
2614 ("lapack" ,lapack)))
2616 `(("python-cython" ,python-cython)
2617 ("python-nose" ,python-nose)
2618 ("gfortran" ,gfortran)))
2621 (modify-phases %standard-phases
2622 (add-before 'build 'configure-blas-lapack
2623 (lambda* (#:key inputs #:allow-other-keys)
2624 (call-with-output-file "site.cfg"
2628 libraries = openblas
2629 library_dirs = ~a/lib
2630 include_dirs = ~a/include
2632 # backslash-n to make emacs happy
2634 lapack_libs = lapack
2635 library_dirs = ~a/lib
2636 include_dirs = ~a/include
2638 (assoc-ref inputs "openblas")
2639 (assoc-ref inputs "openblas")
2640 (assoc-ref inputs "lapack")
2641 (assoc-ref inputs "lapack"))))
2643 (add-before 'build 'fix-executable-paths
2644 (lambda* (#:key inputs #:allow-other-keys)
2645 ;; Make /gnu/store/...-bash-.../bin/sh the default shell,
2646 ;; instead of /bin/sh.
2647 (substitute* "numpy/distutils/exec_command.py"
2648 (("(os.environ.get\\('SHELL', ')(/bin/sh'\\))" match match-start match-end)
2649 (string-append match-start (assoc-ref inputs "bash") match-end)))
2650 ;; Use "gcc" executable, not "cc".
2651 (substitute* "numpy/distutils/system_info.py"
2652 (("c = distutils\\.ccompiler\\.new_compiler\\(\\)")
2653 "c = distutils.ccompiler.new_compiler(); c.set_executables(compiler='gcc',compiler_so='gcc',linker_exe='gcc',linker_so='gcc -shared')"))
2655 ;; Tests can only be run after the library has been installed and not
2656 ;; within the source directory.
2658 (add-after 'install 'check
2659 (lambda* (#:key outputs inputs #:allow-other-keys)
2660 ;; Make installed package available for running the tests
2661 (add-installed-pythonpath inputs outputs)
2662 (with-directory-excursion "/tmp"
2663 (zero? (system* "python" "-c"
2664 "import numpy; numpy.test(verbose=2)"))))))))
2665 (home-page "http://www.numpy.org/")
2666 (synopsis "Fundamental package for scientific computing with Python")
2667 (description "NumPy is the fundamental package for scientific computing
2668 with Python. It contains among other things: a powerful N-dimensional array
2669 object, sophisticated (broadcasting) functions, tools for integrating C/C++
2670 and Fortran code, useful linear algebra, Fourier transform, and random number
2672 (license license:bsd-3)))
2674 (define-public python2-numpy
2675 (package-with-python2 python-numpy))
2677 (define-public python-numpy-next
2678 (package (inherit python-numpy)
2679 (name "python-numpy-next")
2684 (uri (pypi-uri "numpy" version ".zip"))
2687 "1fsgkhh1vdkhmlz8vmdgxnj9n9yaanckxxzz9s0b4p08fqvjic69"))))
2690 ("python-cython" ,python-cython)
2691 ("python-nose" ,python-nose)
2692 ("gfortran" ,gfortran)))))
2694 (define-public python2-numpy-next
2695 (package-with-python2 python-numpy-next))
2697 ;; NOTE: NumPy 1.8 is packaged only for Python 2 because it is of
2698 ;; interest only for legacy code going back to NumPy's predecessor
2700 (define-public python2-numpy-1.8
2701 (package (inherit python2-numpy)
2707 "https://github.com/numpy/numpy/archive/v" version ".tar.gz"))
2708 (file-name (string-append "python2-numpy-" version ".tar.gz"))
2711 "0sc20gz1b17xnyrkp5frca3ql5qfalpv916hfg2kqxpwr6jg0f1g"))))
2713 (substitute-keyword-arguments (package-arguments python2-numpy)
2715 `(modify-phases ,phases
2716 (replace 'configure-blas-lapack
2717 (lambda* (#:key inputs #:allow-other-keys)
2718 (call-with-output-file "site.cfg"
2722 libraries = openblas,lapack
2723 library_dirs = ~a/lib:~a/lib
2724 include_dirs = ~a/include:~a/include
2726 (assoc-ref inputs "openblas")
2727 (assoc-ref inputs "lapack")
2728 (assoc-ref inputs "openblas")
2729 (assoc-ref inputs "lapack"))))
2731 (description "NumPy is the fundamental package for scientific computing
2732 with Python. It contains among other things: a powerful N-dimensional array
2733 object, sophisticated (broadcasting) functions, tools for integrating C/C++
2734 and Fortran code, useful linear algebra, Fourier transform, and random number
2735 capabilities. Version 1.8 is the last one to contain the numpy.oldnumeric API
2736 that includes the compatibility layer numpy.oldnumeric with NumPy's predecessor
2738 (license license:bsd-3)))
2740 (define-public python-munch
2742 (name "python-munch")
2747 (uri (pypi-uri "munch" version))
2750 "1cmqg91xnqx8gvnh4pmp0bfl1dfcm65d5p9mg73zz8pkjhx6h80l"))))
2751 (build-system python-build-system)
2752 (home-page "https://github.com/Infinidat/munch")
2753 (synopsis "Dot-accessible dictionary")
2754 (description "Munch is a dot-accessible dictionary similar to JavaScript
2756 (license license:expat)))
2758 (define-public python2-munch
2759 (package-with-python2 python-munch))
2761 (define-public python-colormath
2763 (name "python-colormath")
2768 (uri (pypi-uri "colormath" version))
2771 "01wp5xwm0a89wdm1dc9rr1ij90idzdiiipxdj1yslhqzkhnjnfh0"))))
2772 (build-system python-build-system)
2774 `(("python-networkx" ,python-networkx)
2775 ("python-numpy" ,python-numpy)))
2776 (home-page "https://github.com/gtaylor/python-colormath")
2777 (synopsis "Color math and conversion library")
2779 "This is a Python library for color math and conversions.")
2780 (license license:bsd-3)))
2782 (define-public python2-colormath
2783 (package-with-python2 python-colormath))
2785 (define-public python-spectra
2787 (name "python-spectra")
2792 (uri (pypi-uri "spectra" version))
2795 "0n87kzhpkml2s2q91rdkl8wz2kkv5b0bkrgww45lxa5vq34qh6w5"))))
2796 (build-system python-build-system)
2799 (modify-phases %standard-phases
2802 (zero? (system* "nosetests" "-v")))))))
2804 `(("python-colormath" ,python-colormath)))
2806 `(("python-nose" ,python-nose)))
2807 (home-page "https://github.com/jsvine/spectra")
2808 (synopsis "Color scales and color conversion")
2810 "This package provides a Python library intended to make color math,
2811 color scales, and color space conversion easy. It has support for:
2816 @item Color blending
2817 @item Brightening/darkening colors
2818 @item Saturating/desaturating colors
2819 @item Conversion to/from multiple color spaces.
2821 (license license:expat)))
2823 (define-public python2-spectra
2824 (package-with-python2 python-spectra))
2826 (define-public python2-fastlmm
2828 (name "python2-fastlmm")
2833 (uri (pypi-uri "fastlmm" version ".zip"))
2836 "1q8c34rpmwkfy3r4d5172pzdkpfryj561897z9r3x22gq7813x1m"))))
2837 (build-system python-build-system)
2839 `(#:python ,python-2)) ; only Python 2.7 is supported
2841 `(("python2-numpy" ,python2-numpy)
2842 ("python2-scipy" ,python2-scipy)
2843 ("python2-matplotlib" ,python2-matplotlib)
2844 ("python2-pandas" ,python2-pandas)
2845 ("python2-scikit-learn" ,python2-scikit-learn)
2846 ("python2-pysnptools" ,python2-pysnptools)))
2849 ("python2-cython" ,python2-cython)
2850 ("python2-mock" ,python2-mock)
2851 ("python2-nose" ,python2-nose)))
2852 (home-page "http://research.microsoft.com/en-us/um/redmond/projects/mscompbio/fastlmm/")
2853 (synopsis "Perform genome-wide association studies on large data sets")
2855 "FaST-LMM, which stands for Factored Spectrally Transformed Linear Mixed
2856 Models, is a program for performing both single-SNP and SNP-set genome-wide
2857 association studies (GWAS) on extremely large data sets.")
2858 (license license:asl2.0)))
2860 (define-public python-numpy-documentation
2862 (name "python-numpy-documentation")
2863 (version (package-version python-numpy))
2864 (source (package-source python-numpy))
2865 (build-system python-build-system)
2867 `(("python-matplotlib" ,python-matplotlib)
2868 ("python-numpy" ,python-numpy)
2869 ("pkg-config" ,pkg-config)
2870 ("python-sphinx" ,python-sphinx)
2871 ("python-numpydoc" ,python-numpydoc)
2872 ("texlive" ,(texlive-union (list texlive-fonts-amsfonts
2874 texlive-generic-ifxetex
2875 texlive-generic-pdftex
2876 texlive-latex-amsfonts
2877 texlive-latex-capt-of
2879 texlive-latex-environ
2880 texlive-latex-eqparbox
2881 texlive-latex-etoolbox
2882 texlive-latex-expdlist
2883 texlive-latex-fancyhdr
2884 texlive-latex-fancyvrb
2885 texlive-latex-fncychap
2887 texlive-latex-framed
2888 texlive-latex-geometry
2889 texlive-latex-graphics
2890 texlive-latex-hyperref
2891 texlive-latex-mdwtools
2892 texlive-latex-multirow
2893 texlive-latex-oberdiek
2894 texlive-latex-parskip
2895 texlive-latex-preview
2896 texlive-latex-tabulary
2897 texlive-latex-threeparttable
2898 texlive-latex-titlesec
2899 texlive-latex-trimspaces
2901 texlive-latex-upquote
2903 texlive-latex-varwidth
2904 texlive-latex-wrapfig)))
2905 ("texinfo" ,texinfo)
2907 ("scipy-sphinx-theme"
2908 ,(origin ; The build script expects scipy-sphinx-theme as a git submodule
2911 (url "https://github.com/scipy/scipy-sphinx-theme.git")
2912 (commit "c466764e2231ba132c09826b5b138fffa1cfcec3")))
2915 "0q2y87clwlsgc7wvlsn9pzyssybcq10plwhq2w1ydykfsyyqbmkl"))))
2916 ,@(package-native-inputs python-numpy)))
2918 `(#:tests? #f ; we're only generating the documentation
2920 (modify-phases %standard-phases
2923 (lambda* (#:key inputs outputs #:allow-other-keys)
2924 (let* ((data (string-append (assoc-ref outputs "out") "/share"))
2926 data "/doc/" ,name "-"
2927 ,(package-version python-numpy)))
2928 (info-reader (string-append data "/info"))
2929 (html (string-append doc "/html"))
2930 (scipy-sphinx-theme "scipy-sphinx-theme")
2931 (sphinx-theme-checkout (assoc-ref inputs scipy-sphinx-theme))
2932 (pyver ,(string-append "PYVER=")))
2934 ;; FIXME: this is needed to for texlive-union to generate
2935 ;; fonts, which are not found.
2936 (setenv "HOME" "/tmp")
2938 (with-directory-excursion "doc"
2939 (copy-recursively sphinx-theme-checkout scipy-sphinx-theme)
2941 (system* "make" "html" pyver)
2942 (system* "make" "latex" "PAPER=a4" pyver)
2943 (system* "make" "-C" "build/latex"
2944 "all-pdf" "PAPER=a4" pyver)
2945 ;; FIXME: Generation of the info file fails.
2946 ;; (system* "make" "info" pyver)
2948 ;; (copy-file "build/texinfo/numpy.info"
2949 ;; (string-append info "/numpy.info"))
2950 (for-each (lambda (file)
2951 (copy-file (string-append "build/latex" file)
2952 (string-append doc file)))
2953 '("/numpy-ref.pdf" "/numpy-user.pdf"))
2954 (with-directory-excursion "build/html"
2955 (for-each (lambda (file)
2956 (let* ((dir (dirname file))
2957 (tgt-dir (string-append html "/" dir)))
2958 (unless (equal? "." dir)
2960 (install-file file html)))
2961 (find-files "." ".*")))))
2963 (home-page (package-home-page python-numpy))
2964 (synopsis "Documentation for the python-numpy package")
2965 (description (package-description python-numpy))
2966 (license (package-license python-numpy))))
2968 (define-public python2-numpy-documentation
2969 (let ((numpy-documentation (package-with-python2 python-numpy-documentation)))
2971 (inherit numpy-documentation)
2972 (native-inputs `(("python2-functools32" ,python2-functools32)
2973 ,@(package-native-inputs numpy-documentation))))))
2975 (define-public python-pygit2
2977 (name "python-pygit2")
2982 (uri (pypi-uri "pygit2" version))
2985 "1cbc488ra3kg7r3qky17ms0szi3cda2d96qfkv1l9djsy9hnvw57"))
2987 (search-patches "python-pygit2-disable-network-tests.patch"))))
2988 (build-system python-build-system)
2990 `(("python-six" ,python-six)
2991 ("python-cffi" ,python-cffi)
2992 ("libgit2" ,libgit2)
2993 ("python-tox" ,python-tox)))
2994 (home-page "https://github.com/libgit2/pygit2")
2995 (synopsis "Python bindings for libgit2")
2996 (description "Pygit2 is a set of Python bindings to the libgit2 shared
2997 library, libgit2 implements Git plumbing.")
2998 ;; GPL2.0 only, with linking exception.
2999 (license license:gpl2)))
3001 (define-public python2-pygit2
3002 (package-with-python2 python-pygit2))
3004 (define-public python-pyparsing
3006 (name "python-pyparsing")
3011 (uri (string-append "mirror://sourceforge/pyparsing/pyparsing"
3012 "/pyparsing-" version
3013 "/pyparsing-" version ".tar.gz"))
3016 "016b9gh606aa44sq92jslm89bg874ia0yyiyb643fa6dgbsbqch8"))))
3017 (build-system python-build-system)
3018 (outputs '("out" "doc"))
3020 `(#:tests? #f ; no test target
3022 (modify-phases %standard-phases
3023 (add-after 'install 'install-doc
3024 (lambda* (#:key outputs #:allow-other-keys)
3025 (let* ((doc (string-append (assoc-ref outputs "doc")
3026 "/share/doc/" ,name "-" ,version))
3027 (html-doc (string-append doc "/html"))
3028 (examples (string-append doc "/examples")))
3034 (install-file file tgt))
3035 (find-files dir ".*")))
3036 (list "docs" "htmldoc" "examples")
3037 (list doc html-doc examples))
3039 (home-page "http://pyparsing.wikispaces.com")
3040 (synopsis "Python parsing class library")
3042 "The pyparsing module is an alternative approach to creating and
3043 executing simple grammars, vs. the traditional lex/yacc approach, or the use
3044 of regular expressions. The pyparsing module provides a library of classes
3045 that client code uses to construct the grammar directly in Python code.")
3046 (license license:expat)))
3048 (define-public python2-pyparsing
3049 (package-with-python2 python-pyparsing))
3051 (define-public python-numpydoc
3053 (name "python-numpydoc")
3059 "https://pypi.python.org/packages/source/n/numpydoc/numpydoc-"
3063 "0d4dnifaxkll50jx6czj05y8cb4ny60njd2wz299sj2jxfy51w4k"))
3064 (modules '((guix build utils)))
3067 ;; Drop a test requiring matplotlib, which we cannot add as an
3068 ;; input since it would create a circular dependency: Extend the
3069 ;; test for Python 3, where it is already dropped, to Python 2.
3070 (substitute* "numpydoc/tests/test_plot_directive.py"
3072 (build-system python-build-system)
3074 `(("python-sphinx" ,python-sphinx)))
3076 `(("python-nose" ,python-nose)))
3077 (home-page "https://pypi.python.org/pypi/numpydoc")
3079 "Numpy's Sphinx extensions")
3081 "Sphinx extension to support docstrings in Numpy format.")
3082 (license license:bsd-2)))
3084 (define-public python2-numpydoc
3085 (package-with-python2 python-numpydoc))
3087 (define-public python-numexpr
3089 (name "python-numexpr")
3094 (uri (pypi-uri "numexpr" version))
3097 "1kpnbb5d5n927113zccfibn16z7gidjipyac6kbbhzs0lnizkgph"))))
3098 (build-system python-build-system)
3099 (arguments `(#:tests? #f)) ; no tests included
3101 `(("python-numpy" ,python-numpy)))
3102 (home-page "https://github.com/pydata/numexpr")
3103 (synopsis "Fast numerical expression evaluator for NumPy")
3105 "Numexpr is a fast numerical expression evaluator for NumPy. With it,
3106 expressions that operate on arrays are accelerated and use less memory than
3107 doing the same calculation in Python. In addition, its multi-threaded
3108 capabilities can make use of all your cores, which may accelerate
3109 computations, most specially if they are not memory-bounded (e.g. those using
3110 transcendental functions).")
3111 (license license:expat)))
3113 (define-public python2-numexpr
3114 (package-with-python2 python-numexpr))
3116 (define-public python-cycler
3118 (name "python-cycler")
3122 (uri (pypi-uri "cycler" version))
3125 "1n69n23fak1gjxlrbhqisi2b9pv3ckrfj98llx3p53953082syyd"))))
3126 (build-system python-build-system)
3128 ;; XXX: The current version requires 'coveralls' which we don't have.
3129 ;; Enable this for the next release which uses 'python-pytest'.
3132 `(("python-six" ,python-six)))
3133 (home-page "http://matplotlib.org/cycler/")
3134 (synopsis "Composable keyword argument iterator")
3136 "When using @code{matplotlib} and plotting more than one line, it is
3137 common to want to be able to want to be able to cycle over one or more artist
3138 styles; but the plotting logic can quickly become involved.
3139 To address this and enable easy cycling over arbitrary @code{kwargs}, the
3140 @code{Cycler} class was developed.")
3141 (license license:bsd-3)))
3143 (define-public python2-cycler
3144 (package-with-python2 python-cycler))
3146 (define-public python-colorspacious
3148 (name "python-colorspacious")
3153 (uri (string-append "https://github.com/njsmith/colorspacious/archive/v"
3155 (file-name (string-append name "-" version))
3157 (base32 "1vflh5jm32qb0skza2i8pjacv09w6gq84fqpp2nj77s0rbmzgr4k"))))
3158 (build-system python-build-system)
3160 `(("python-numpy" ,python-numpy)))
3162 `(("python-nose" ,python-nose)))
3165 (modify-phases %standard-phases
3168 (zero? (system* "nosetests" "--all-modules" "-v" "colorspacious")))))))
3169 (home-page "https://github.com/njsmith/colorspacious")
3170 (synopsis "Python library for colorspace conversions")
3171 (description "@code{colorspacious} is a Python library that lets you
3172 convert between colorspaces like sRGB, XYZ, CIEL*a*b*, CIECAM02, CAM02-UCS, etc.")
3173 (license license:expat)))
3175 (define-public python2-colorspacious
3176 (package-with-python2 python-colorspacious))
3178 (define-public python-matplotlib
3180 (name "python-matplotlib")
3185 (uri (pypi-uri "matplotlib" version))
3188 "1w8z2a1l7s72p1byfz7g03wqhygqxi8w82619dqb3a1lm97w9yqg"))))
3189 (build-system python-build-system)
3190 (propagated-inputs ; the following packages are all needed at run time
3191 `(("python-cycler" ,python-cycler)
3192 ("python-pyparsing" ,python-pyparsing)
3193 ("python-pygobject" ,python-pygobject)
3194 ("gobject-introspection" ,gobject-introspection)
3195 ("python-tkinter" ,python "tk")
3196 ("python-dateutil" ,python-dateutil)
3197 ("python-numpy" ,python-numpy)
3198 ("python-pillow" ,python-pillow)
3199 ("python-pytz" ,python-pytz)
3200 ("python-six" ,python-six)
3201 ;; The 'gtk+' package (and 'gdk-pixbuf', 'atk' and 'pango' propagated
3202 ;; from 'gtk+') provides the required 'typelib' files used by
3203 ;; 'gobject-introspection'. The location of these files is set with the
3204 ;; help of the environment variable GI_TYPELIB_PATH. At build time this
3205 ;; is done automatically by a 'native-search-path' procedure. However,
3206 ;; at run-time the user must set this variable as follows:
3208 ;; export GI_TYPELIB_PATH=~/.guix-profile/lib/girepository-1.0
3210 ;; From version 1.4.0 'matplotlib' makes use of 'cairocffi' instead of
3211 ;; 'pycairo'. However, 'pygobject' makes use of a 'pycairo' 'context'
3212 ;; object. For this reason we need to import both libraries.
3213 ;; https://pythonhosted.org/cairocffi/cffi_api.html#converting-pycairo
3214 ("python-pycairo" ,python-pycairo)
3215 ("python-cairocffi" ,python-cairocffi)))
3217 `(("libpng" ,libpng)
3218 ("imagemagick" ,imagemagick)
3219 ("freetype" ,freetype)
3222 ;; FIXME: Add backends when available.
3223 ;("python-wxpython" ,python-wxpython)
3224 ("python-pyqt" ,python-pyqt)
3228 `(("pkg-config" ,pkg-config)
3229 ("python-nose" ,python-nose)
3230 ("python-mock" ,python-mock)))
3233 (modify-phases %standard-phases
3234 (add-before 'build 'configure-environment
3235 (lambda* (#:key outputs inputs #:allow-other-keys)
3236 (let ((cairo (assoc-ref inputs "cairo"))
3237 (gtk+ (assoc-ref inputs "gtk+")))
3238 ;; Setting these directories in the 'basedirlist' of 'setup.cfg'
3240 (setenv "LD_LIBRARY_PATH"
3241 (string-append cairo "/lib:" gtk+ "/lib"))
3242 (setenv "HOME" (getcwd))
3243 (call-with-output-file "setup.cfg"
3245 (format port "[directories]~%
3246 basedirlist = ~a,~a~%
3249 (assoc-ref inputs "tcl")
3250 (assoc-ref inputs "tk")))))
3252 (home-page "http://matplotlib.org")
3253 (synopsis "2D plotting library for Python")
3255 "Matplotlib is a Python 2D plotting library which produces publication
3256 quality figures in a variety of hardcopy formats and interactive environments
3257 across platforms. Matplotlib can be used in Python scripts, the python and
3258 ipython shell, web application servers, and six graphical user interface
3260 (license license:psfl)
3261 (properties `((python2-variant . ,(delay python2-matplotlib))))))
3263 (define-public python2-matplotlib
3264 (let ((matplotlib (package-with-python2
3265 (strip-python2-variant python-matplotlib))))
3266 (package (inherit matplotlib)
3267 ;; Make sure to use special packages for Python 2 instead
3268 ;; of those automatically rewritten by package-with-python2.
3270 `(("python2-pycairo" ,python2-pycairo)
3271 ("python2-functools32" ,python2-functools32)
3272 ("python2-pygobject-2" ,python2-pygobject-2)
3273 ("python2-subprocess32" ,python2-subprocess32)
3274 ("python2-tkinter" ,python-2 "tk")
3275 ,@(fold alist-delete (package-propagated-inputs matplotlib)
3276 '("python-pycairo" "python-pygobject" "python-tkinter")))))))
3278 (define-public python-matplotlib-documentation
3280 (name "python-matplotlib-documentation")
3281 (version (package-version python-matplotlib))
3282 (source (package-source python-matplotlib))
3283 (build-system python-build-system)
3285 `(("python-matplotlib" ,python-matplotlib)
3286 ("python-colorspacious" ,python-colorspacious)
3287 ("python-sphinx" ,python-sphinx)
3288 ("python-numpydoc" ,python-numpydoc)
3289 ("python-ipython" ,python-ipython)
3290 ("python-mock" ,python-mock)
3291 ("graphviz" ,graphviz)
3292 ("texlive" ,texlive)
3293 ("texinfo" ,texinfo)
3294 ,@(package-native-inputs python-matplotlib)))
3296 `(#:tests? #f ; we're only generating documentation
3298 (modify-phases %standard-phases
3302 ;; Produce pdf in 'A4' format.
3303 (substitute* "conf.py"
3304 (("latex_paper_size = 'letter'") "")
3305 ;; latex_paper_size is deprecated -> set paper size using
3307 (("latex_elements\\['pointsize'\\] = '11pt'" match)
3308 ;; insert at a point where latex_elements{} is defined:
3309 (string-append match "\nlatex_elements['papersize'] = 'a4paper'")))
3310 (zero? (system* "python" "make.py" "html" "latex" "texinfo"))))
3312 (lambda* (#:key inputs outputs #:allow-other-keys)
3313 (let* ((data (string-append (assoc-ref outputs "out") "/share"))
3314 (doc (string-append data "/doc/python-matplotlib-" ,version))
3315 (info (string-append data "/info"))
3316 (html (string-append doc "/html")))
3319 (copy-recursively "build/html" html)
3320 (symlink (string-append html "/_images")
3321 (string-append info "/matplotlib-figures"))
3322 (with-directory-excursion "build/texinfo"
3323 (substitute* "matplotlib.texi"
3324 (("@image\\{([^,]*)" all file)
3325 (string-append "@image{matplotlib-figures/" file)))
3326 (symlink (string-append html "/_images")
3327 "./matplotlib-figures")
3328 (system* "makeinfo" "--no-split"
3329 "-o" "matplotlib.info" "matplotlib.texi"))
3330 (copy-file "build/texinfo/matplotlib.info"
3331 (string-append info "/matplotlib.info"))
3332 (copy-file "build/latex/Matplotlib.pdf"
3333 (string-append doc "/Matplotlib.pdf")))
3335 (home-page (package-home-page python-matplotlib))
3336 (synopsis "Documentation for the python-matplotlib package")
3337 (description (package-description python-matplotlib))
3338 (license (package-license python-matplotlib))))
3340 (define-public python2-matplotlib-documentation
3341 (package-with-python2 python-matplotlib-documentation))
3343 (define-public python2-pysnptools
3345 (name "python2-pysnptools")
3350 (uri (pypi-uri "pysnptools" version ".zip"))
3353 "1wybggjzz8zw7aav4pjsg2h22xp17a1lghrprza1pxwlm7wf96y2"))))
3354 (build-system python-build-system)
3356 `(#:python ,python-2)) ; only Python 2.7 is supported
3358 `(("python2-numpy" ,python2-numpy)
3359 ("python2-scipy" ,python2-scipy)
3360 ("python2-pandas" ,python2-pandas)))
3362 `(("python2-cython" ,python2-cython)))
3364 `(("unzip" ,unzip)))
3365 (home-page "http://research.microsoft.com/en-us/um/redmond/projects/mscompbio/")
3366 (synopsis "Library for reading and manipulating genetic data")
3368 "PySnpTools is a library for reading and manipulating genetic data. It
3369 can, for example, efficiently read whole PLINK *.bed/bim/fam files or parts of
3370 those files. It can also efficiently manipulate ranges of integers using set
3371 operators such as union, intersection, and difference.")
3372 (license license:asl2.0)))
3374 (define-public python-rpy2
3376 (name "python-rpy2")
3381 (uri (pypi-uri "rpy2" version))
3384 "0bqihjrdqwj5r1h86shvfb1p5hfr4a6klv1v54bzfr9r144w3rni"))))
3385 (build-system python-build-system)
3387 '(#:modules ((ice-9 ftw)
3391 (guix build python-build-system))
3393 (modify-phases %standard-phases
3394 ;; Without this phase the test loader cannot find the directories, in
3395 ;; which it is supposed to look for test files.
3396 (add-after 'unpack 'fix-tests
3397 (lambda* (#:key outputs #:allow-other-keys)
3398 (substitute* "rpy/tests.py"
3399 (("loader.discover\\(")
3400 "loader.discover(rpy_root + '/' +"))
3403 (lambda* (#:key outputs inputs #:allow-other-keys)
3404 (let ((cwd (getcwd)))
3405 (setenv "PYTHONPATH"
3406 (string-append cwd "/build/"
3407 (find (cut string-prefix? "lib" <>)
3408 (scandir (string-append cwd "/build")))
3410 (getenv "PYTHONPATH"))))
3411 ;; FIXME: Even when all tests pass, the check phase will fail.
3412 (system* "python" "-m" "rpy2.tests" "-v"))))))
3414 `(("python-six" ,python-six)
3415 ("python-jinja2" ,python-jinja2)
3416 ("python-pytz" ,python-pytz)))
3418 `(("readline" ,readline)
3421 ("r-minimal" ,r-minimal)
3422 ("r-survival" ,r-survival)
3423 ("r-ggplot2" ,r-ggplot2)
3424 ("r-rsqlite" ,r-rsqlite)
3425 ("r-dplyr" ,r-dplyr)
3426 ("r-dbplyr" ,r-dbplyr)
3427 ("python-numpy" ,python-numpy)))
3430 (home-page "http://rpy.sourceforge.net/")
3431 (synopsis "Python interface to the R language")
3432 (description "rpy2 is a redesign and rewrite of rpy. It is providing a
3433 low-level interface to R from Python, a proposed high-level interface,
3434 including wrappers to graphical libraries, as well as R-like structures and
3436 ;; Any of these licenses can be picked for the R interface. The whole
3437 ;; project is released under GPLv2+ according to the license declaration
3439 (license (list license:mpl2.0 license:gpl2+ license:lgpl2.1+))))
3441 (define-public python-scipy
3443 (name "python-scipy")
3448 (uri (pypi-uri "scipy" version))
3451 "1rl411bvla6q7qfdb47fpdnyjhfgzl6smpha33n9ar1klykjr6m1"))))
3452 (build-system python-build-system)
3454 `(("python-numpy" ,python-numpy)
3455 ("python-matplotlib" ,python-matplotlib)
3456 ("python-pyparsing" ,python-pyparsing)))
3458 `(("lapack" ,lapack)
3459 ("openblas" ,openblas)))
3461 `(("python-cython" ,python-cython)
3462 ("python-nose" ,python-nose)
3463 ("python-sphinx" ,python-sphinx)
3464 ("python-numpydoc" ,python-numpydoc)
3465 ("gfortran" ,gfortran)
3467 (outputs '("out" "doc"))
3470 (modify-phases %standard-phases
3471 (add-before 'build 'configure-openblas
3472 (lambda* (#:key inputs #:allow-other-keys)
3473 (call-with-output-file "site.cfg"
3477 libraries = openblas
3478 library_dirs = ~a/lib
3479 include_dirs = ~a/include
3481 # backslash-n to make emacs happy
3483 library_dirs = ~a/lib
3484 atlas_libs = openblas
3486 (assoc-ref inputs "openblas")
3487 (assoc-ref inputs "openblas")
3488 (assoc-ref inputs "openblas"))))
3490 (add-after 'install 'install-doc
3491 (lambda* (#:key inputs outputs #:allow-other-keys)
3492 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
3493 (doc (string-append data "/doc/" ,name "-" ,version))
3494 (html (string-append doc "/html"))
3495 (pyver ,(string-append "PYVER=")))
3496 ;; Make installed package available for building the
3498 (add-installed-pythonpath inputs outputs)
3499 (with-directory-excursion "doc"
3500 ;; Fix generation of images for mathematical expressions.
3501 (substitute* (find-files "source" "conf\\.py")
3502 (("pngmath_use_preview = True")
3503 "pngmath_use_preview = False"))
3505 (system* "make" "html" pyver)
3506 (with-directory-excursion "build/html"
3507 (for-each (lambda (file)
3508 (let* ((dir (dirname file))
3509 (tgt-dir (string-append html "/" dir)))
3510 (install-file file html)))
3511 (find-files "." ".*")))))
3513 (add-after 'unpack 'fix-tests
3515 (substitute* "scipy/integrate/tests/test_quadpack.py"
3516 (("libm.so") "libm.so.6"))
3518 ;; Tests can only be run after the library has been installed and not
3519 ;; within the source directory.
3521 (add-after 'install 'check
3522 (lambda* (#:key inputs outputs #:allow-other-keys)
3523 (add-installed-pythonpath inputs outputs)
3524 (with-directory-excursion "/tmp"
3525 (zero? (system* "python" "-c"
3526 "import scipy; scipy.test('full')")))
3528 (home-page "https://www.scipy.org/")
3529 (synopsis "The Scipy library provides efficient numerical routines")
3530 (description "The SciPy library is one of the core packages that make up
3531 the SciPy stack. It provides many user-friendly and efficient numerical
3532 routines such as routines for numerical integration and optimization.")
3533 (properties `((python2-variant . ,(delay python2-scipy))))
3534 (license license:bsd-3)))
3536 (define-public python2-scipy
3537 (package-with-python2
3538 (strip-python2-variant python-scipy)))
3540 (define-public python-socksipy-branch
3542 (name "python-socksipy-branch")
3547 (uri (pypi-uri "SocksiPy-branch" version))
3550 "01l41v4g7fy9fzvinmjxy6zcbhgqaif8dhdqm4w90fwcw9h51a8p"))))
3551 (build-system python-build-system)
3553 `(#:tests? #f)) ; There are no tests
3554 (home-page "https://code.google.com/archive/p/socksipy-branch/")
3555 (synopsis "Python SOCKS module")
3557 "SocksiPy - A Python SOCKS client module. It provides a
3558 socket-like interface that supports connections to any TCP
3559 service through the use of a SOCKS4, SOCKS5 or HTTP proxy.
3560 The original version was developed by Dan Haim, this is a
3561 branch created by Mario Vilas to address some open issues,
3562 as the original project seems to have been abandoned circa 2007.")
3563 (license license:bsd-3)))
3565 (define-public python2-socksipy-branch
3566 (package-with-python2 python-socksipy-branch))
3568 (define-public python-pycodestyle
3570 (name "python-pycodestyle")
3575 (uri (pypi-uri "pycodestyle" version))
3578 "0rk78b66p57ala26mdldl9lafr48blv5s659sah9q50qnfjmc8k8"))))
3579 (build-system python-build-system)
3580 (home-page "https://pycodestyle.readthedocs.io/")
3581 (synopsis "Python style guide checker")
3582 (description "@code{pycodestyle} (formerly pep8) is a tool to check
3583 Python code against some of the style conventions in
3584 @url{http://www.python.org/dev/peps/pep-0008/,PEP 8}.")
3585 (license license:expat)))
3587 (define-public python2-pycodestyle
3588 (package-with-python2 python-pycodestyle))
3590 (define-public python-orderedmultidict
3592 (name "python-orderedmultidict")
3597 (uri (pypi-uri "orderedmultidict" version))
3600 "0dls862ibm7qbq4fnvwx0xn1v9hwyzywbff8xjjdr42dd75208yw"))))
3601 (build-system python-build-system)
3604 (modify-phases %standard-phases
3605 (add-after 'unpack 'fix-tests
3607 ;; The package uses nosetest for running the tests.
3608 ;; Adding this initfile allows to run the test suite
3609 ;; without requiring nosetest.
3610 (zero? (system* "touch" "tests/__init__.py")))))))
3612 `(("python-six" ,python-six)))
3614 `(("python-pycodestyle" ,python-pycodestyle)))
3615 (home-page "https://github.com/gruns/orderedmultidict")
3616 (synopsis "Python Ordered Multivalue Dictionary - omdict")
3617 (description "This package contains a library for ordered multivalue
3618 dictionaries. A multivalue dictionary is a dictionary that can store
3619 multiple values for the same key. An ordered multivalue dictionary is a
3620 multivalue dictionary that retains the order of insertions and deletions.")
3621 (license license:unlicense)))
3623 (define-public python2-orderedmultidict
3624 (package-with-python2 python-orderedmultidict))
3626 (define-public python-autopep8
3628 (name "python-autopep8")
3633 (uri (pypi-uri "autopep8" version))
3636 "1p9pa1ffg4iy96l918808jggg9a69iaka5awmj8xid36yc5mk0ky"))))
3637 (build-system python-build-system)
3639 `(("python-pycodestyle" ,python-pycodestyle)))
3640 (home-page "https://github.com/hhatto/autopep8")
3641 (synopsis "Format Python code according to the PEP 8 style guide")
3643 "@code{autopep8} automatically formats Python code to conform to
3644 the PEP 8 style guide. It uses the pycodestyle utility to determine
3645 what parts of the code needs to be formatted. @code{autopep8} is
3646 capable of fixing most of the formatting issues that can be reported
3648 (license (license:non-copyleft
3649 "https://github.com/hhatto/autopep8/blob/master/LICENSE"))))
3651 (define-public python2-autopep8
3652 (package-with-python2 python-autopep8))
3654 (define-public python-distutils-extra
3656 (name "python-distutils-extra")
3661 (uri (string-append "https://launchpad.net/python-distutils-extra/trunk/"
3662 version "/+download/python-distutils-extra-"
3666 "0lx15kcbby9zisx33p2h5hgakgwh2bvh0ibag8z0px4j6ifhs41x"))))
3667 (build-system python-build-system)
3668 (home-page "https://launchpad.net/python-distutils-extra/")
3669 (synopsis "Enhancements to Python's distutils")
3671 "The python-distutils-extra module enables you to easily integrate
3672 gettext support, themed icons, and scrollkeeper-based documentation into
3673 Python's distutils.")
3674 (license license:gpl2)))
3676 (define-public python2-distutils-extra
3677 (package-with-python2 python-distutils-extra))
3679 (define-public python2-elib.intl
3681 (name "python2-elib.intl")
3685 ;; This project doesn't tag releases or publish tarballs, so we take
3686 ;; source from a (semi-arbitrary, i.e. latest as of now) git commit.
3689 (url "https://github.com/dieterv/elib.intl.git")
3690 (commit "d09997cfef")))
3693 "0y7vzff9xgbnaay7m0va1arl6g68ncwrvbgwl7jqlclsahzzb09d"))))
3694 (build-system python-build-system)
3696 ;; incompatible with Python 3 (exception syntax)
3697 `(#:python ,python-2
3699 (home-page "https://github.com/dieterv/elib.intl")
3700 (synopsis "Enhanced internationalization for Python")
3702 "The elib.intl module provides enhanced internationalization (I18N)
3703 services for your Python modules and applications.")
3704 (license license:lgpl3+)))
3706 (define-public python-olefile
3708 (name "python-olefile")
3713 (uri (string-append "https://github.com/decalage2/olefile/archive/v"
3715 (file-name (string-append name "-" version ".tar.gz"))
3718 "1wmxbrhyqjry2000zx0zdhqdqxhgi06nz7sbzjlh222q2zjv1gpj"))))
3719 (build-system python-build-system)
3721 "https://www.decalage.info/python/olefileio")
3722 (synopsis "Read and write Microsoft OLE2 files.")
3724 "@code{olefile} can parse, read and write Microsoft OLE2 files (Structured
3725 Storage or Compound Document, Microsoft Office). It is an improved version of
3726 the OleFileIO module from PIL, the Python Image Library.")
3727 (license license:bsd-3)))
3729 (define-public python2-olefile
3730 (package-with-python2 python-olefile))
3732 (define-public python-pillow
3734 (name "python-pillow")
3739 (uri (pypi-uri "Pillow" version))
3742 "09xmn7rl6840sli2iz1k3fgxfgmri2nqz6vkinmb9mgg8ifp2z59"))
3743 (patch-flags '("-p1" "--binary"))
3744 (patches (search-patches "python-pillow-fix-failing-tests.patch"))))
3745 (build-system python-build-system)
3747 `(("python-nose" ,python-nose)))
3749 `(("freetype" ,freetype)
3752 ("libjpeg" ,libjpeg)
3753 ("openjpeg" ,openjpeg)
3754 ("libtiff" ,libtiff)
3755 ("libwebp" ,libwebp)))
3757 `(("python-olefile" ,python-olefile)))
3759 `(#:phases (modify-phases %standard-phases
3761 'install 'check-installed
3762 (lambda* (#:key outputs inputs #:allow-other-keys)
3764 (setenv "HOME" (getcwd))
3765 ;; Make installed package available for running the
3767 (add-installed-pythonpath inputs outputs)
3768 (and (zero? (system* "python" "selftest.py"
3770 (zero? (system* "python" "test-installed.py"))))))
3772 (home-page "https://pypi.python.org/pypi/Pillow")
3773 (synopsis "Fork of the Python Imaging Library")
3775 "The Python Imaging Library adds image processing capabilities to your
3776 Python interpreter. This library provides extensive file format support, an
3777 efficient internal representation, and fairly powerful image processing
3778 capabilities. The core image library is designed for fast access to data
3779 stored in a few basic pixel formats. It should provide a solid foundation for
3780 a general image processing tool.")
3781 (license (license:x11-style
3782 "http://www.pythonware.com/products/pil/license.htm"
3783 "The PIL Software License"))))
3785 (define-public python2-pillow
3786 (package-with-python2 python-pillow))
3788 (define-public python-pycparser
3790 (name "python-pycparser")
3795 (uri (pypi-uri "pycparser" version))
3798 "1dkkjri0miidqb1zcqhqljfa34fcy9k5akasgwsv6k622zlk3b0a"))))
3799 (outputs '("out" "doc"))
3800 (build-system python-build-system)
3802 `(("pkg-config" ,pkg-config)))
3805 (modify-phases %standard-phases
3808 (with-directory-excursion "tests"
3809 (zero? (system* "python" "all_tests.py")))))
3810 (add-after 'install 'install-doc
3811 (lambda* (#:key outputs #:allow-other-keys)
3812 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
3813 (doc (string-append data "/doc/" ,name "-" ,version))
3814 (examples (string-append doc "/examples")))
3816 (for-each (lambda (file)
3817 (copy-file (string-append "." file)
3818 (string-append doc file)))
3819 '("/README.rst" "/CHANGES" "/LICENSE"))
3820 (copy-recursively "examples" examples)))))))
3821 (home-page "https://github.com/eliben/pycparser")
3822 (synopsis "C parser in Python")
3824 "Pycparser is a complete parser of the C language, written in pure Python
3825 using the PLY parsing library. It parses C code into an AST and can serve as
3826 a front-end for C compilers or analysis tools.")
3827 (license license:bsd-3)))
3829 (define-public python2-pycparser
3830 (package-with-python2 python-pycparser))
3832 (define-public python-xcffib
3834 (name "python-xcffib")
3839 (uri (pypi-uri "xcffib" version))
3842 "09gbnmr5vn58mm8xi3fmd7fz6743cks6c46dphnxzwax6zsxmy60"))))
3843 (build-system python-build-system)
3845 `(("libxcb" ,libxcb)))
3847 `(("python-cffi" ,python-cffi) ; used at run time
3848 ("python-six" ,python-six)))
3850 `(;; FIXME: Tests need more work. See ".travis.yml" in the repository.
3853 (modify-phases %standard-phases
3854 (add-after 'unpack 'fix-libxcb-path
3855 (lambda* (#:key inputs #:allow-other-keys)
3856 (let ((libxcb (assoc-ref inputs "libxcb")))
3857 (substitute* '("xcffib/__init__.py")
3858 (("^soname = \"") (string-append "soname = \"" libxcb "/lib/")))
3860 (add-after 'install 'install-doc
3861 (lambda* (#:key outputs #:allow-other-keys)
3862 (let ((doc (string-append (assoc-ref outputs "out") "/share"
3863 "/doc/" ,name "-" ,version)))
3865 (copy-file "README.md"
3866 (string-append doc "/README.md"))
3868 (home-page "https://github.com/tych0/xcffib")
3869 (synopsis "XCB Python bindings")
3871 "Xcffib is a replacement for xpyb, an XCB Python bindings. It adds
3872 support for Python 3 and PyPy. It is based on cffi.")
3873 (license license:expat)))
3875 (define-public python2-xcffib
3876 (package-with-python2 python-xcffib))
3878 (define-public python-cairocffi
3880 (name "python-cairocffi")
3885 ;; The archive on pypi is missing the 'utils' directory!
3886 (uri (string-append "https://github.com/Kozea/cairocffi/archive/v"
3888 (file-name (string-append name "-" version ".tar.gz"))
3891 "1rk2dvy3fxrga6bvvxc2fi5lbaynm5h4a0w0aaxyn3bc77rszjg9"))))
3892 (build-system python-build-system)
3893 (outputs '("out" "doc"))
3895 `(("gdk-pixbuf" ,gdk-pixbuf)
3898 `(("pkg-config" ,pkg-config)
3899 ("python-sphinx" ,python-sphinx)
3900 ("python-docutils" ,python-docutils)))
3902 `(("python-xcffib" ,python-xcffib))) ; used at run time
3904 `(;; FIXME: Tests cannot find 'libcairo.so.2'.
3907 (modify-phases %standard-phases
3908 (add-after 'install 'install-doc
3909 (lambda* (#:key inputs outputs #:allow-other-keys)
3910 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
3911 (doc (string-append data "/doc/" ,name "-" ,version))
3912 (html (string-append doc "/html")))
3913 (setenv "LD_LIBRARY_PATH"
3914 (string-append (assoc-ref inputs "cairo") "/lib" ":"
3915 (assoc-ref inputs "gdk-pixbuf") "/lib"))
3916 (setenv "LANG" "en_US.UTF-8")
3918 (for-each (lambda (file)
3919 (copy-file (string-append "." file)
3920 (string-append doc file)))
3921 '("/README.rst" "/CHANGES" "/LICENSE"))
3922 (system* "python" "setup.py" "build_sphinx")
3923 (copy-recursively "docs/_build/html" html)
3925 (home-page "https://github.com/Kozea/cairocffi")
3926 (synopsis "Python bindings and object-oriented API for Cairo")
3928 "Cairocffi is a CFFI-based drop-in replacement for Pycairo, a set of
3929 Python bindings and object-oriented API for cairo. Cairo is a 2D vector
3930 graphics library with support for multiple backends including image buffers,
3931 PNG, PostScript, PDF, and SVG file output.")
3932 (license license:bsd-3)))
3934 (define-public python2-cairocffi
3935 (package-with-python2 python-cairocffi))
3937 (define-public python-decorator
3939 (name "python-decorator")
3944 (uri (pypi-uri "decorator" version))
3946 (base32 "1d8npb11kxyi36mrvjdpcjij76l5zfyrz2f820brf0l0rcw4vdkw"))))
3947 (build-system python-build-system)
3948 (arguments '(#:tests? #f)) ; no test target
3949 (home-page "https://pypi.python.org/pypi/decorator/")
3950 (synopsis "Python module to simplify usage of decorators")
3952 "The aim of the decorator module is to simplify the usage of decorators
3953 for the average programmer, and to popularize decorators usage giving examples
3954 of useful decorators, such as memoize, tracing, redirecting_stdout, locked,
3955 etc. The core of this module is a decorator factory.")
3956 (license license:expat)))
3958 (define-public python2-decorator
3959 (package-with-python2 python-decorator))
3961 (define-public python-drmaa
3963 (name "python-drmaa")
3968 (uri (pypi-uri "drmaa" version))
3970 (base32 "0xzqriqyvk5b8hszbavsyxd29wm3sxirm8zvvdm73rs2iq7w4hkx"))))
3971 (build-system python-build-system)
3972 ;; The test suite requires libdrmaa which is provided by the cluster
3973 ;; environment. At runtime the environment variable DRMAA_LIBRARY_PATH
3974 ;; should be set to the path of the libdrmaa library.
3975 (arguments '(#:tests? #f))
3977 `(("python-nose" ,python-nose)))
3978 (home-page "https://pypi.python.org/pypi/drmaa")
3979 (synopsis "Python bindings for the DRMAA library")
3981 "A Python package for Distributed Resource Management (DRM) job
3982 submission and control. This package is an implementation of the DRMAA 1.0
3983 Python language binding specification.")
3984 (license license:bsd-3)))
3986 (define-public python2-drmaa
3987 (package-with-python2 python-drmaa))
3989 (define-public python-grako
3991 (name "python-grako")
3997 (pypi-uri "grako" version ".zip"))
4000 "0r63i68wcnv63rfjkasq1ah81frz61a6mzbcnaxhrkdpx84p7hzw"))))
4001 (build-system python-build-system)
4002 (arguments '(#:tests? #f)) ; Test file 'grako.ebnf' is missing from archive.
4005 ("python-pytest" ,python-pytest-3.0)
4006 ("python-pytest-runner" ,python-pytest-runner)))
4007 (home-page "https://bitbucket.org/neogeny/grako")
4008 (synopsis "EBNF parser generator")
4010 "Grako takes a grammar in a variation of EBNF as input, and outputs a
4011 memoizing PEG/Packrat parser in Python.")
4012 (license license:bsd-3)))
4014 (define-public python2-grako
4015 (package-with-python2 python-grako))
4017 (define-public python-gridmap
4019 (name "python-gridmap")
4025 "https://github.com/pygridtools/gridmap/archive/v"
4027 (file-name (string-append name "-" version ".tar.gz"))
4029 (base32 "1gzjg2k6f14i1msm2b0ax8d9ds1hvk6qd5nlaivg8m4cxqp4cp1x"))))
4030 (build-system python-build-system)
4032 '(#:tests? #f)) ; FIXME: Requires python-cherrypy.
4034 `(("python-psutil" ,python-psutil)
4035 ("python-drmaa" ,python-drmaa)
4036 ("python-pyzmq" ,python-pyzmq)))
4037 (home-page "https://github.com/pygridtools/gridmap")
4038 (synopsis "Create jobs on a cluster directly from Python")
4040 "Gridmap is a Python package to allow you to easily create jobs on the
4041 cluster directly from Python. You can directly map Python functions onto the
4042 cluster without needing to write any wrapper code yourself.")
4043 (license license:gpl3+)))
4045 (define-public python2-gridmap
4046 (package-with-python2 python-gridmap))
4048 (define-public python-honcho
4050 (name "python-honcho")
4056 "https://github.com/nickstenning/honcho/archive/v"
4058 (file-name (string-append name "-" version ".tar.gz"))
4060 (base32 "0zizn61n5z5hq421hkypk9pw8s6fpxw30f4hsg7k4ivwzy3gjw9j"))))
4061 (build-system python-build-system)
4063 `(("python-pytest" ,python-pytest-3.0)
4064 ("python-mock" ,python-mock)
4065 ("python-tox" ,python-tox)
4066 ("which" ,which))) ;for tests
4068 `(("python-jinja2" ,python-jinja2)))
4071 (modify-phases %standard-phases
4073 (add-after 'install 'check
4074 (lambda* (#:key outputs inputs #:allow-other-keys)
4075 ;; fix honcho path in testsuite
4076 (substitute* "tests/conftest.py"
4077 (("'honcho'") (string-append "'" (assoc-ref outputs "out")
4078 "/bin/honcho" "'")))
4079 ;; It's easier to run tests after install.
4080 ;; Make installed package available for running the tests
4081 (add-installed-pythonpath inputs outputs)
4082 (zero? (system* "py.test" "-v")))))))
4083 (home-page "https://github.com/nickstenning/honcho")
4084 (synopsis "Manage Procfile-based applications")
4086 "A Procfile is a file which describes how to run an application
4087 consisting of serveral processes. honcho starts all listed processes.
4088 The output of all running processes is collected by honcho and
4090 (license license:expat)))
4092 (define-public python2-honcho
4093 (package-with-python2 python-honcho))
4095 (define-public python-pexpect
4097 (name "python-pexpect")
4102 (uri (pypi-uri "pexpect" version))
4104 (base32 "14ls7k99pwvl21zqv65kzrhccv50j89m5ij1hf0slmsvlxjj84rx"))))
4105 (build-system python-build-system)
4108 (modify-phases %standard-phases
4109 (add-before 'check 'prepare-tests
4111 (substitute* (find-files "tests")
4112 (("/bin/ls") (which "ls"))
4113 (("/bin/echo") (which "echo"))
4114 (("/bin/which") (which "which"))
4115 ;; Many tests try to use the /bin directory which
4116 ;; is not present in the build environment.
4117 ;; Use one that's non-empty and unlikely to change.
4118 (("/bin'") "/dev'"))
4119 ;; XXX: Socket connection test gets "Connection reset by peer".
4120 ;; Why does it not work? Delete for now.
4121 (delete-file "tests/test_socket.py")
4123 (replace 'check (lambda _ (zero? (system* "nosetests" "-v")))))))
4125 `(("python-nose" ,python-nose)
4126 ("python-pytest" ,python-pytest-3.0)
4129 ("bash-full" ,bash))) ;full Bash for 'test_replwrap.py'
4131 `(("python-ptyprocess" ,python-ptyprocess)))
4132 (home-page "http://pexpect.readthedocs.org/")
4133 (synopsis "Controlling interactive console applications")
4135 "Pexpect is a pure Python module for spawning child applications;
4136 controlling them; and responding to expected patterns in their output.
4137 Pexpect works like Don Libes’ Expect. Pexpect allows your script to spawn a
4138 child application and control it as if a human were typing commands.")
4139 (license license:isc)))
4141 (define-public python2-pexpect
4142 (package-with-python2 python-pexpect))
4144 (define-public python-setuptools-scm
4146 (name "python-setuptools-scm")
4150 (uri (pypi-uri "setuptools_scm" version))
4153 "0bwyc5markib0i7i2qlyhdzxhiywzxbkfiapldma8m91m82jvwfs"))))
4154 (build-system python-build-system)
4155 (home-page "https://github.com/pypa/setuptools_scm/")
4156 (synopsis "Manage Python package versions in SCM metadata")
4158 "Setuptools_scm handles managing your Python package versions in
4159 @dfn{software configuration management} (SCM) metadata instead of declaring
4160 them as the version argument or in a SCM managed file.")
4161 (license license:expat)))
4163 (define-public python2-setuptools-scm
4164 (package-with-python2 python-setuptools-scm))
4166 (define-public python-pathpy
4168 (name "python-pathpy")
4173 (uri (string-append "https://pypi.python.org/packages/source/p/"
4174 "path.py/path.py-" version ".tar.gz"))
4176 (base32 "1p8s1l2vfkqhqxdhqlj0g1jjw4f1as2frr35sjcpjjpd5a89y41f"))))
4177 (outputs '("out" "doc"))
4178 (build-system python-build-system)
4180 `(("python-appdirs" ,python-appdirs)))
4182 `(("python-setuptools-scm" ,python-setuptools-scm)
4183 ("python-sphinx" ,python-sphinx)
4184 ("python-rst.linker" ,python-rst.linker)
4185 ("python-pytest" ,python-pytest)
4186 ("python-pytest-runner" ,python-pytest-runner)))
4189 (modify-phases %standard-phases
4190 (add-after 'build 'build-doc
4192 (setenv "LANG" "en_US.UTF-8")
4193 (zero? (system* "python" "setup.py" "build_sphinx"))))
4194 (add-after 'install 'install-doc
4195 (lambda* (#:key outputs #:allow-other-keys)
4196 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4197 (doc (string-append data "/doc/" ,name "-" ,version))
4198 (html (string-append doc "/html")))
4200 (for-each (lambda (file)
4201 (copy-file file (string-append doc "/" file)))
4202 '("README.rst" "CHANGES.rst"))
4203 (copy-recursively "build/sphinx/html" html)))))))
4204 (home-page "https://github.com/jaraco/path.py")
4205 (synopsis "Python module wrapper for built-in os.path")
4207 "@code{path.py} implements path objects as first-class entities, allowing
4208 common operations on files to be invoked on those path objects directly.")
4209 (license license:expat)))
4211 (define-public python2-pathpy
4212 (package-with-python2 python-pathpy))
4214 (define-public python-simplegeneric
4216 (name "python-simplegeneric")
4221 (uri (string-append "https://pypi.python.org/packages/source/s/"
4222 "simplegeneric/simplegeneric-" version ".zip"))
4224 (base32 "0wwi1c6md4vkbcsfsf8dklf3vr4mcdj4mpxkanwgb6jb1432x5yw"))))
4225 (build-system python-build-system)
4227 `(("unzip" ,unzip)))
4228 (home-page "http://cheeseshop.python.org/pypi/simplegeneric")
4229 (synopsis "Python module for simple generic functions")
4231 "The simplegeneric module lets you define simple single-dispatch generic
4232 functions, akin to Python’s built-in generic functions like @code{len()},
4233 @code{iter()} and so on. However, instead of using specially-named methods,
4234 these generic functions use simple lookup tables, akin to those used by
4235 e.g. @code{pickle.dump()} and other generic functions found in the Python
4237 (license license:zpl2.1)))
4239 (define-public python2-simplegeneric
4240 (package-with-python2 python-simplegeneric))
4242 (define-public python-ipython-genutils
4243 ;; TODO: This package is retired, check if can be removed, see description.
4245 (name "python-ipython-genutils")
4250 (uri (string-append "https://pypi.python.org/packages/source/i/"
4251 "ipython_genutils/ipython_genutils-"
4254 (base32 "19l2pp1c64ansr89l3cqh19jdi2ixhssdzx0vz4n6r52a6i281is"))))
4255 (build-system python-build-system)
4256 (arguments `(#:tests? #f)) ; no tests
4257 (home-page "http://ipython.org")
4258 (synopsis "Vestigial utilities from IPython")
4260 "This package provides retired utilities from IPython. No packages
4261 outside IPython/Jupyter should depend on it.
4263 This package shouldn't exist. It contains some common utilities shared by
4264 Jupyter and IPython projects during The Big Split. As soon as possible, those
4265 packages will remove their dependency on this, and this package will go
4267 (license license:bsd-3)))
4269 (define-public python2-ipython-genutils
4270 (package-with-python2 python-ipython-genutils))
4272 (define-public python-traitlets
4274 (name "python-traitlets")
4279 (uri (pypi-uri "traitlets" version))
4282 "1afy08sa5n9gnkvh3da49c16zkyv598vchv0p1hp7zzjy8895hz4"))))
4283 (build-system python-build-system)
4286 (modify-phases %standard-phases
4287 (replace 'check (lambda _ (zero? (system* "nosetests")))))))
4289 `(("python-ipython-genutils" ,python-ipython-genutils)
4290 ("python-decorator" ,python-decorator)))
4292 `(("python-mock" ,python-mock)
4293 ("python-nose" ,python-nose)))
4294 (home-page "http://ipython.org")
4295 (synopsis "Configuration system for Python applications")
4297 "Traitlets is a framework that lets Python classes have attributes with
4298 type checking, dynamically calculated default values, and ‘on change’
4299 callbacks. The package also includes a mechanism to use traitlets for
4300 configuration, loading values from files or from command line arguments. This
4301 is a distinct layer on top of traitlets, so you can use traitlets in your code
4302 without using the configuration machinery.")
4303 (license license:bsd-3)))
4305 (define-public python2-traitlets
4306 (package-with-python2 python-traitlets))
4308 (define-public python-jupyter-core
4310 (name "python-jupyter-core")
4315 (uri (string-append (pypi-uri "jupyter_core" version)))
4318 "1cy7inv218dgh4m1fbzbsiqpz733ylgjrj62jxqpfzs3r2cm7ic9"))))
4319 (build-system python-build-system)
4320 ;; FIXME: not sure how to run the tests
4321 (arguments `(#:tests? #f))
4323 `(("python-traitlets" ,python-traitlets)))
4324 (home-page "http://jupyter.org/")
4325 (synopsis "Jupyter base package")
4327 "Jupyter core is the base package on which Jupyter projects rely.")
4328 (license license:bsd-3)))
4330 (define-public python2-jupyter-core
4331 (package-with-python2 python-jupyter-core))
4333 (define-public python-jupyter-client
4335 (name "python-jupyter-client")
4340 (uri (pypi-uri "jupyter_client" version))
4343 "1vjjrpjw7k5sh982pbjnslv7byfbfazjw9g92jvs7dz5qbx556n9"))))
4344 (build-system python-build-system)
4345 ;; Tests fail because of missing native python kernel which I assume is
4346 ;; provided by the ipython package, which we cannot use because it would
4347 ;; cause a dependency cycle.
4348 (arguments `(#:tests? #f))
4350 `(("python-pyzmq" ,python-pyzmq)
4351 ("python-traitlets" ,python-traitlets)
4352 ("python-jupyter-core" ,python-jupyter-core)))
4353 (home-page "http://jupyter.org/")
4354 (synopsis "Jupyter protocol implementation and client libraries")
4356 "The @code{jupyter_client} package contains the reference implementation
4357 of the Jupyter protocol. It also provides client and kernel management APIs
4358 for working with kernels, and the @code{jupyter kernelspec} entrypoint for
4359 installing @code{kernelspec}s for use with Jupyter frontends.")
4360 (license license:bsd-3)))
4362 (define-public python2-jupyter-client
4363 (package-with-python2 python-jupyter-client))
4365 (define-public python-ipykernel
4367 (name "python-ipykernel")
4372 (uri (pypi-uri "ipykernel" version))
4374 (base32 "0qllv0k6zzv1r1cj1x2ygxmlrrqhbslzj8rc6r6fg3kc1rgz4m2s"))))
4375 (build-system python-build-system)
4376 ;; The tests load a submodule of IPython. However, IPython itself depends
4378 (arguments `(#:tests? #f))
4380 ;; imported at runtime during connect
4381 `(("python-jupyter-client" ,python-jupyter-client)))
4382 (home-page "http://ipython.org")
4383 (synopsis "IPython Kernel for Jupyter")
4385 "This package provides the IPython kernel for Jupyter.")
4386 (license license:bsd-3)))
4388 (define-public python2-ipykernel
4389 (package-with-python2 python-ipykernel))
4391 (define-public python-ipython
4393 (name "python-ipython")
4398 (uri (pypi-uri "ipython" version ".tar.gz"))
4400 (base32 "079wyjir4a9qx6kvx096b1asm63djbidk65z3ykcbnlngmg62pmz"))))
4401 (build-system python-build-system)
4402 (outputs '("out" "doc"))
4404 `(("python-pyzmq" ,python-pyzmq)
4405 ("python-prompt-toolkit" ,python-prompt-toolkit)
4406 ("python-terminado" ,python-terminado)
4407 ("python-matplotlib" ,python-matplotlib)
4408 ("python-numpy" ,python-numpy)
4409 ("python-numpydoc" ,python-numpydoc)
4410 ("python-jinja2" ,python-jinja2)
4411 ("python-jupyter-console"
4412 ;; The python-ipython and python-jupyter-console require each
4413 ;; other. To get the functionality in both packages working, strip
4414 ;; down the python-jupyter-console package when using it as an input
4415 ;; to python-ipython.
4416 ,python-jupyter-console-minimal)
4417 ("python-mistune" ,python-mistune)
4418 ("python-pexpect" ,python-pexpect)
4419 ("python-pickleshare" ,python-pickleshare)
4420 ("python-simplegeneric" ,python-simplegeneric)
4421 ("python-jsonschema" ,python-jsonschema)
4422 ("python-traitlets" ,python-traitlets)
4423 ("python-ipykernel" ,python-ipykernel)
4424 ("python-nbformat" ,python-nbformat)
4425 ("python-pygments" ,python-pygments)))
4427 `(("readline" ,readline)
4430 `(("graphviz" ,graphviz)
4431 ("pkg-config" ,pkg-config)
4432 ("python-requests" ,python-requests) ;; for tests
4433 ("python-testpath" ,python-testpath)
4434 ("python-nose" ,python-nose)
4435 ("python-sphinx" ,python-sphinx)
4436 ("python-shpinx-rtd-theme" ,python-sphinx-rtd-theme)
4437 ;; FIXME: It's possible that a smaller union would work just as well.
4438 ("texlive" ,(texlive-union (list texlive-fonts-amsfonts
4440 texlive-generic-ifxetex
4441 texlive-generic-pdftex
4442 texlive-latex-amsfonts
4443 texlive-latex-capt-of
4445 texlive-latex-environ
4446 texlive-latex-eqparbox
4447 texlive-latex-etoolbox
4448 texlive-latex-expdlist
4449 texlive-latex-fancyhdr
4450 texlive-latex-fancyvrb
4451 texlive-latex-fncychap
4453 texlive-latex-framed
4454 texlive-latex-geometry
4455 texlive-latex-graphics
4456 texlive-latex-hyperref
4457 texlive-latex-mdwtools
4458 texlive-latex-multirow
4459 texlive-latex-oberdiek
4460 texlive-latex-parskip
4461 texlive-latex-preview
4462 texlive-latex-tabulary
4463 texlive-latex-threeparttable
4464 texlive-latex-titlesec
4465 texlive-latex-trimspaces
4467 texlive-latex-upquote
4469 texlive-latex-varwidth
4470 texlive-latex-wrapfig)))
4471 ("texinfo" ,texinfo)))
4474 (modify-phases %standard-phases
4476 'install 'install-doc
4477 (lambda* (#:key inputs outputs #:allow-other-keys)
4478 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4479 (doc (string-append data "/doc/" ,name "-" ,version))
4480 (html (string-append doc "/html"))
4481 (man1 (string-append data "/man/man1"))
4482 (info (string-append data "/info"))
4483 (examples (string-append doc "/examples"))
4484 (python-arg (string-append "PYTHON=" (which "python"))))
4485 (setenv "LANG" "en_US.utf8")
4486 ;; Make installed package available for running the tests
4487 (add-installed-pythonpath inputs outputs)
4488 (with-directory-excursion "docs"
4489 ;; FIXME: pdf fails to build
4490 ;;(system* "make" "pdf" "PAPER=a4")
4491 (system* "make" python-arg "html")
4492 (system* "make" python-arg "info"))
4493 (copy-recursively "docs/man" man1)
4494 (copy-recursively "examples" examples)
4495 (copy-recursively "docs/build/html" html)
4496 ;; (copy-file "docs/build/latex/ipython.pdf"
4497 ;; (string-append doc "/ipython.pdf"))
4499 (copy-file "docs/build/texinfo/ipython.info"
4500 (string-append info "/ipython.info"))
4501 (copy-file "COPYING.rst" (string-append doc "/COPYING.rst")))))
4502 ;; Tests can only be run after the library has been installed and not
4503 ;; within the source directory.
4507 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
4509 (with-directory-excursion "/tmp"
4510 ;; Make installed package available for running the tests
4511 (add-installed-pythonpath inputs outputs)
4512 (setenv "HOME" "/tmp/") ;; required by a test
4513 (zero? (system* (string-append (assoc-ref outputs "out")
4518 (lambda* (#:key inputs #:allow-other-keys)
4519 (substitute* "./IPython/utils/_process_posix.py"
4520 (("/usr/bin/env', 'which") (which "which")))
4521 (substitute* "./IPython/core/tests/test_inputtransformer.py"
4522 (("#!/usr/bin/env python")
4523 (string-append "#!" (which "python"))))
4524 ;; Disable 1 failing test
4525 (substitute* "./IPython/core/tests/test_magic.py"
4526 (("def test_dirops\\(\\):" all)
4527 (string-append "@dec.skipif(True)\n" all))))))))
4528 (home-page "http://ipython.org")
4529 (synopsis "IPython is a tool for interactive computing in Python")
4531 "IPython provides a rich architecture for interactive computing with:
4532 Powerful interactive shells, a browser-based notebook, support for interactive
4533 data visualization, embeddable interpreters and tools for parallel
4535 (license license:bsd-3)
4536 (properties `((python2-variant . ,(delay python2-ipython))))))
4538 (define-public python2-ipython
4539 (let ((ipython (package-with-python2 (strip-python2-variant python-ipython))))
4542 ;; FIXME: add pyreadline once available.
4544 `(("python2-backports-shutil-get-terminal-size"
4545 ,python2-backports-shutil-get-terminal-size)
4546 ("python2-pathlib2" ,python2-pathlib2)
4547 ,@(package-propagated-inputs ipython)))
4549 `(("python2-mock" ,python2-mock)
4550 ,@(package-native-inputs ipython))))))
4552 (define-public python-urwid
4554 (name "python-urwid")
4559 (uri (pypi-uri "urwid" version))
4562 "18cnd1wdjcas08x5qwa5ayw6jsfcn33w4d9f7q3s29fy6qzc1kng"))))
4563 (build-system python-build-system)
4566 (modify-phases %standard-phases
4567 ;; Disable failing test. Bug filed upstream:
4568 ;; https://github.com/wardi/urwid/issues/164
4569 ;; TODO: check again for python-urwid > 1.3.1 or python > 3.4.3.
4570 (add-after 'unpack 'disable-failing-test
4572 (substitute* "urwid/tests/test_event_loops.py"
4573 (("test_remove_watch_file")
4574 "disable_remove_watch_file")))))))
4575 (home-page "http://urwid.org")
4576 (synopsis "Console user interface library for Python")
4578 "Urwid is a curses-based UI/widget library for Python. It includes many
4579 features useful for text console applications.")
4580 (license license:lgpl2.1+)))
4582 (define-public python2-urwid
4583 (let ((python2-urwid (package-with-python2 python-urwid)))
4585 (inherit python2-urwid)
4588 `(;; Explicitly using Python 2 is necessary due the argument list being
4589 ;; built from only the 'delete-test_vterm.py' phase and python-urwid's
4590 ;; package arguments, which by default assumes the use of Python 3.
4593 (modify-phases %standard-phases
4594 ;; Disable the vterm tests because of non-deterministic failures
4595 ;; with Python 2. See https://github.com/urwid/urwid/issues/230.
4596 (add-after 'unpack 'delete-test_vterm.py
4597 (delete-file "urwid/tests/test_vterm.py"))))
4598 (package-arguments python-urwid))))))
4600 (define-public python-urwidtrees
4602 (name "python-urwidtrees")
4607 ;; package author intends on distributing via github rather than pypi:
4608 ;; https://github.com/pazz/alot/issues/877#issuecomment-230173331
4609 (uri (string-append "https://github.com/pazz/urwidtrees/archive/"
4611 (file-name (string-append name "-" version ".tar.gz"))
4614 "0d30lyd3s2a97rhqfax5w9ssqds2z6aydqx3c6j2c2lk3cb4ngvh"))))
4615 (build-system python-build-system)
4617 '(#:tests? #f)) ; no tests
4618 (propagated-inputs `(("python-urwid" ,python-urwid)))
4619 (home-page "https://github.com/pazz/urwidtrees")
4620 (synopsis "Tree widgets for urwid")
4621 (description "Urwidtrees is a Widget Container API for the @code{urwid}
4622 toolkit. Use it to build trees of widgets.")
4623 (license license:gpl3+)))
4625 (define-public python2-urwidtrees
4626 (package-with-python2 python-urwidtrees))
4628 (define-public python-dbus
4630 (name "python-dbus")
4636 "https://dbus.freedesktop.org/releases/dbus-python/dbus-python-"
4639 (base32 "1py62qir966lvdkngg0v8k1khsqxwk5m4s8nflpk1agk5f5nqb71"))))
4640 (build-system gnu-build-system)
4643 (modify-phases %standard-phases
4647 ;; XXX: For the missing '/etc/machine-id'.
4648 (substitute* "test/run-test.sh"
4649 (("DBUS_FATAL_WARNINGS=1")
4650 "DBUS_FATAL_WARNINGS=0"))
4653 `(("pkg-config" ,pkg-config)))
4655 `(("python" ,python)
4656 ("dbus-glib" ,dbus-glib)))
4657 (synopsis "Python bindings for D-bus")
4658 (description "python-dbus provides bindings for libdbus, the reference
4659 implementation of D-Bus.")
4660 (home-page "http://www.freedesktop.org/wiki/Software/DBusBindings/")
4661 (license license:expat)))
4663 (define-public python2-dbus
4664 (package (inherit python-dbus)
4665 (name "python2-dbus")
4666 (inputs `(("python" ,python-2)
4667 ,@(alist-delete "python"
4668 (package-inputs python-dbus)
4670 ;; FIXME: on Python 2, the test_utf8 fails with:
4671 ;; "ValueError: unichr() arg not in range(0x10000) (narrow Python build)"
4672 (arguments `(#:tests? #f))))
4674 (define-public python-lxml
4676 (name "python-lxml")
4681 (uri (pypi-uri "lxml" version))
4684 "15nvf6n285n282682qyw3wihsncb0x5amdhyi4b83bfa2nz74vvk"))))
4685 (build-system python-build-system)
4687 `(("libxml2" ,libxml2)
4688 ("libxslt" ,libxslt)))
4689 (home-page "http://lxml.de/")
4691 "Python XML processing library")
4693 "The lxml XML toolkit is a Pythonic binding for the C libraries
4694 libxml2 and libxslt.")
4695 (license license:bsd-3))) ; and a few more, see LICENSES.txt
4697 (define-public python2-lxml
4698 (package-with-python2 python-lxml))
4700 ;; beautifulsoup4 has a totally different namespace than 3.x,
4701 ;; and pypi seems to put it under its own name, so I guess we should too
4702 (define-public python-beautifulsoup4
4704 (name "python-beautifulsoup4")
4709 (uri (pypi-uri "beautifulsoup4" version))
4712 "0glaw1vyxnbp03fni7h5496n6iib0n5iim4gax1n0ngscs9s075j"))))
4713 (build-system python-build-system)
4716 (modify-phases %standard-phases
4717 ;; The Python 2 source is the definitive source of beautifulsoup4. We
4718 ;; must use this conversion script when building with Python 3. The
4719 ;; conversion script also runs the tests.
4720 ;; For more information, see the file 'convert-py3k' in the source
4723 (lambda _ (zero? (system* "./convert-py3k")))))))
4725 "https://www.crummy.com/software/BeautifulSoup/bs4/")
4727 "Python screen-scraping library")
4729 "Beautiful Soup is a Python library designed for rapidly setting up
4730 screen-scraping projects. It offers Pythonic idioms for navigating,
4731 searching, and modifying a parse tree, providing a toolkit for
4732 dissecting a document and extracting what you need. It automatically
4733 converts incoming documents to Unicode and outgoing documents to UTF-8.")
4734 (license license:expat)
4735 (properties `((python2-variant . ,(delay python2-beautifulsoup4))))))
4737 (define-public python2-beautifulsoup4
4739 (inherit (package-with-python2
4740 (strip-python2-variant python-beautifulsoup4)))
4741 (arguments `(#:python ,python-2))))
4743 (define-public python-netifaces
4745 (name "python-netifaces")
4751 "https://pypi.python.org/packages/source/n/netifaces/netifaces-"
4756 "1plw237a4zib4z8s62g0mrs8gm3kjfrp5sxh6bbk9nl3rdls2mln"))))
4757 (build-system python-build-system)
4759 "https://bitbucket.org/al45tair/netifaces")
4761 "Python module for portable network interface information")
4763 "Netifaces is a Python module providing information on network
4764 interfaces in an easy and portable manner.")
4765 (license license:expat)))
4767 (define-public python2-netifaces
4768 (package-with-python2 python-netifaces))
4770 (define-public python-networkx
4772 (name "python-networkx")
4777 (uri (pypi-uri "networkx" version))
4779 (base32 "1f74s56xb4ggixiq0vxyfxsfk8p20c7a099lpcf60izv1php03hd"))))
4780 (build-system python-build-system)
4781 ;; python-decorator is needed at runtime
4783 `(("python-decorator" ,python-decorator)))
4785 `(("python-nose" ,python-nose)))
4786 (home-page "http://networkx.github.io/")
4787 (synopsis "Python module for creating and manipulating graphs and networks")
4789 "NetworkX is a Python package for the creation, manipulation, and study
4790 of the structure, dynamics, and functions of complex networks.")
4791 (license license:bsd-3)))
4793 (define-public python2-networkx
4794 (package-with-python2 python-networkx))
4796 ;; Define new package, because the current version of python-colormath does
4797 ;; not build against 2.0.
4798 (define-public python-networkx2
4799 (package (inherit python-networkx)
4800 (name "python-networkx2")
4805 (uri (pypi-uri "networkx" version ".zip"))
4808 "1ajl2jp8qry9nyjzzkqpy0vmsr14d23z1qk7y0vr5iwjbpvzhpyd"))
4810 (search-patches "python-networkx2-reproducible-build.patch"))))))
4812 (define-public python2-networkx2
4813 (package-with-python2 python-networkx2))
4815 (define-public snakemake
4822 (uri (pypi-uri "snakemake" version))
4824 (base32 "0mgl44q152ws40zj2vicqark5szyd73vqy9pf26g6hk6dk0y0c79"))))
4825 (build-system python-build-system)
4827 ;; TODO: Package missing test dependencies.
4830 (modify-phases %standard-phases
4831 ;; For cluster execution Snakemake will call Python. Since there is
4832 ;; no suitable PYTHONPATH set, cluster execution will fail. We fix
4833 ;; this by calling the snakemake wrapper instead.
4834 (add-after 'unpack 'call-wrapper-not-wrapped-snakemake
4835 (lambda* (#:key outputs #:allow-other-keys)
4836 (substitute* "snakemake/executors.py"
4837 (("\\{sys.executable\\} -m snakemake")
4838 (string-append (assoc-ref outputs "out")
4842 `(("python-wrapt" ,python-wrapt)
4843 ("python-requests" ,python-requests)
4844 ("python-appdirs" ,python-appdirs)
4845 ("python-configargparse" ,python-configargparse)
4846 ("python-pyyaml" ,python-pyyaml)
4847 ("python-ratelimiter" ,python-ratelimiter)))
4848 (home-page "https://bitbucket.org/snakemake/snakemake/wiki/Home")
4849 (synopsis "Python-based execution environment for make-like workflows")
4851 "Snakemake aims to reduce the complexity of creating workflows by
4852 providing a clean and modern domain specific specification language (DSL) in
4853 Python style, together with a fast and comfortable execution environment.")
4854 (license license:expat)))
4856 (define-public python-pyqrcode
4858 (name "python-pyqrcode")
4863 (uri (pypi-uri "PyQRCode" version))
4866 "1m9ln8k9v7dfbh1i81225hx5mdsh8mpf9g7r4wpbfmiyfcs7dgzx"))))
4867 (build-system python-build-system)
4869 "https://github.com/mnooner256/pyqrcode")
4870 (synopsis "QR code generator")
4872 "Pyqrcode is a QR code generator written purely in Python with
4873 SVG, EPS, PNG and terminal output.")
4874 (license license:bsd-3)))
4876 (define-public python-seaborn
4878 (name "python-seaborn")
4883 (uri (pypi-uri "seaborn" version))
4885 (base32 "0pawrqc3mxpwd5g9pvi9gba02637bh5c8ldpp8izfwpfn52469zs"))))
4886 (build-system python-build-system)
4888 '(#:tests? #f)) ; Tests requires a running X11 server.
4890 `(("python-pandas" ,python-pandas)
4891 ("python-matplotlib" ,python-matplotlib)
4892 ("python-scipy" ,python-scipy)))
4893 (home-page "http://stanford.edu/~mwaskom/software/seaborn/")
4894 (synopsis "Statistical data visualization")
4896 "Seaborn is a library for making attractive and informative statistical
4897 graphics in Python. It is built on top of matplotlib and tightly integrated
4898 with the PyData stack, including support for numpy and pandas data structures
4899 and statistical routines from scipy and statsmodels.")
4900 (license license:bsd-3)
4901 (properties `((python2-variant . ,(delay python2-seaborn))))))
4903 (define-public python2-seaborn
4904 (let ((base (package-with-python2 (strip-python2-variant python-seaborn))))
4907 (propagated-inputs `(("python2-pytz" ,python2-pytz)
4908 ,@(package-propagated-inputs base))))))
4910 (define-public python-mpmath
4912 (name "python-mpmath")
4916 (uri (string-append "http://mpmath.org/files/mpmath-"
4920 "08ijsr4ifrqv3cjc26mkw0dbvyygsa99in376hr4b96ddm1gdpb8"))))
4921 (build-system python-build-system)
4924 (modify-phases %standard-phases
4928 (system* "python" "mpmath/tests/runtests.py" "-local")))))))
4929 (home-page "http://mpmath.org")
4930 (synopsis "Arbitrary-precision floating-point arithmetic in python")
4932 "@code{mpmath} can be used as an arbitrary-precision substitute for
4933 Python's float/complex types and math/cmath modules, but also does much
4934 more advanced mathematics.")
4935 (license license:bsd-3)))
4937 (define-public python2-mpmath
4938 (package-with-python2 python-mpmath))
4940 (define-public python-sympy
4942 (name "python-sympy")
4948 "https://github.com/sympy/sympy/releases/download/sympy-"
4949 version "/sympy-" version ".tar.gz"))
4951 (base32 "190n29sppw7g8ihilc5451y7jlfcaw56crqiqbf1jff43dlmfnxc"))))
4952 (build-system python-build-system)
4954 `(("python-mpmath" ,python-mpmath)))
4955 (home-page "http://www.sympy.org/")
4956 (synopsis "Python library for symbolic mathematics")
4958 "SymPy is a Python library for symbolic mathematics. It aims to become a
4959 full-featured computer algebra system (CAS) while keeping the code as simple
4960 as possible in order to be comprehensible and easily extensible.")
4961 (license license:bsd-3)))
4963 (define-public python2-sympy
4964 (package-with-python2 python-sympy))
4966 (define-public python-q
4973 (uri (pypi-uri "q" version))
4976 "1mgfazh8fkizh6walra2zv885f3lcgr3nb02v1frfm4p8ddcy3yy"))))
4977 (build-system python-build-system)
4978 (home-page "https://github.com/zestyping/q")
4979 (synopsis "Quick-and-dirty debugging output for tired programmers")
4981 "q is a Python module for \"print\" style of debugging Python code. It
4982 provides convenient short API for print out of values, tracebacks, and
4983 falling into the Python interpreter.")
4984 (license license:asl2.0)))
4986 (define-public python2-q
4987 (package-with-python2 python-q))
4989 (define-public python2-xlib
4991 (name "python2-xlib")
4995 (uri (string-append "mirror://sourceforge/python-xlib/python-xlib"
4997 "python-xlib-" version ".tar.gz"))
5000 "1sv0447j0rx8cgs3jhjl695p5pv13ihglcjlrrz1kq05lsvb0wa7"))))
5001 (build-system python-build-system)
5003 `(#:python ,python-2 ;Python 2 only
5004 #:tests? #f)) ;no tests
5005 (home-page "http://python-xlib.sourceforge.net/")
5006 (synopsis "Python X11 client library")
5008 "The Python X Library is intended to be a fully functional X client
5009 library for Python programs. It is useful to implement low-level X clients.
5010 It is written entirely in Python.")
5011 (license license:gpl2+)))
5013 (define-public python-singledispatch
5015 (name "python-singledispatch")
5020 (uri (pypi-uri "singledispatch" version))
5023 "171b7ip0hsq5qm83np40h3phlr36ym18w0lay0a8v08kvy3sy1jv"))))
5024 (build-system python-build-system)
5026 `(("python-six" ,python-six))) ; required for conversion, not at run-time
5028 "http://docs.python.org/3/library/functools.html#functools.singledispatch")
5029 (synopsis "Backport of singledispatch feature from Python 3.4")
5031 "This library brings functools.singledispatch from Python 3.4 to Python
5033 (license license:expat)))
5035 (define-public python2-singledispatch
5036 (package-with-python2 python-singledispatch))
5038 ;; the python- version can be removed with python-3.5
5039 (define-public python-backports-abc
5041 (name "python-backports-abc")
5046 (uri (pypi-uri "backports_abc" version))
5049 "1pkv8d1zxj5f9i227dxbjczncbv7ks7ywnjwyxfjagm02i2yafq3"))))
5050 (build-system python-build-system)
5051 (home-page "https://github.com/cython/backports_abc")
5052 (synopsis "Backport of additions to the 'collections.abc' module")
5054 "Python-backports-abc provides a backport of additions to the
5055 'collections.abc' module in Python-3.5.")
5056 (license license:psfl)))
5058 (define-public python2-backports-abc
5059 (package-with-python2 python-backports-abc))
5061 (define-public python-backports-csv
5063 (name "python-backports-csv")
5068 (uri (pypi-uri "backports.csv" version))
5071 "1imzbrradkfn8s2m1qcimyn74dn1mz2p3j381jljn166rf2i6hlc"))))
5072 (build-system python-build-system)
5073 (home-page "https://github.com/ryanhiebert/backports.csv")
5074 (synopsis "Backport of Python 3's csv module for Python 2")
5076 "Provides a backport of Python 3's @code{csv} module for parsing
5077 comma separated values. The API of the @code{csv} module in Python 2
5078 is drastically different from the @code{csv} module in Python 3.
5079 This is due, for the most part, to the difference between str in
5080 Python 2 and Python 3.")
5081 (license license:psfl)))
5083 (define-public python2-backports-csv
5084 (package-with-python2 python-backports-csv))
5086 (define-public python2-backports-shutil-get-terminal-size
5088 (name "python2-backports-shutil-get-terminal-size")
5093 (uri (pypi-uri "backports.shutil_get_terminal_size" version))
5096 "107cmn7g3jnbkp826zlj8rrj19fam301qvaqf0f3905f5217lgki"))))
5097 (build-system python-build-system)
5099 `(#:python ,python-2
5101 (modify-phases %standard-phases
5104 (zero? (system* "py.test" "-v")))))))
5106 `(("python2-pytest" ,python2-pytest)))
5107 (home-page "https://github.com/chrippa/backports.shutil_get_terminal_size")
5108 (synopsis "Backport of Python 3.3's @code{shutil.get_terminal_size}")
5110 "This package provides a backport of the @code{get_terminal_size
5111 function} from Python 3.3's @code{shutil}.
5112 Unlike the original version it is written in pure Python rather than C,
5113 so it might be a tiny bit slower.")
5114 (license license:expat)))
5116 (define-public python-waf
5122 (uri (string-append "https://waf.io/"
5123 "waf-" version ".tar.bz2"))
5126 "0wl4cnmp06lfxqjxaan58bqxn27smhydz0sg5prrfbl3bsw4gv6q"))))
5127 (build-system python-build-system)
5130 (modify-phases %standard-phases
5133 (zero? (system* "python" "waf-light" "configure" "build"))))
5136 (zero? (system* "python" "waf" "--version"))))
5139 (copy-file "waf" %output))))))
5140 (home-page "https://waf.io/")
5141 (synopsis "Python-based build system")
5143 "Waf is a Python-based framework for configuring, compiling and installing
5145 (license license:bsd-3)))
5147 (define-public python2-waf
5148 (package-with-python2 python-waf))
5150 (define-public python-pyzmq
5152 (name "python-pyzmq")
5157 (uri (pypi-uri "pyzmq" version))
5159 (base32 "13fhwnlvsvxv72kfhqbpn6qi7msh8mc8377mpabv32skk2cjfnxx"))))
5160 (build-system python-build-system)
5163 (list (string-append "--zmq=" (assoc-ref %build-inputs "zeromq")))
5164 ;; FIXME: You must build pyzmq with 'python setup.py build_ext
5165 ;; --inplace' for 'python setup.py test' to work.
5168 `(("zeromq" ,zeromq)))
5170 `(("pkg-config" ,pkg-config)
5171 ("python-nose" ,python-nose)))
5172 (home-page "https://github.com/zeromq/pyzmq")
5173 (synopsis "Python bindings for 0MQ")
5175 "PyZMQ is the official Python binding for the ZeroMQ messaging library.")
5176 (license license:bsd-4)))
5178 (define-public python2-pyzmq
5179 (package-with-python2 python-pyzmq))
5181 (define-public python-pep8
5183 (name "python-pep8")
5188 (uri (pypi-uri "pep8" version))
5191 "002rkl4lsn6x2mxmf8ar00l0m8i3mzrc6pnzz77blyksmpsxa4x1"))))
5192 (build-system python-build-system)
5193 (home-page "http://pep8.readthedocs.org/")
5194 (synopsis "Python style guide checker")
5196 "This tools checks Python code against some of the style conventions in
5198 (license license:expat)))
5200 (define-public python2-pep8
5201 (package-with-python2 python-pep8))
5203 (define-public python-pyflakes
5205 (name "python-pyflakes")
5210 (uri (pypi-uri "pyflakes" version))
5213 "0qs2sgqszq7wcplis8509wk2ygqcrwzbs1ghfj3svvivq2j377pk"))))
5214 (build-system python-build-system)
5216 "https://github.com/pyflakes/pyflakes")
5217 (synopsis "Passive checker of Python programs")
5219 "Pyflakes statically checks Python source code for common errors.")
5220 (license license:expat)))
5222 (define-public python2-pyflakes
5223 (package-with-python2 python-pyflakes))
5225 (define-public python-mccabe
5227 (name "python-mccabe")
5232 (uri (pypi-uri "mccabe" version))
5235 "0yr08a36h8lqlif10l4xcikbbig7q8f41gqywir7rrvnv3mi4aws"))))
5236 (build-system python-build-system)
5238 `(("python-pytest" ,python-pytest)
5239 ("python-pytest-runner" ,python-pytest-runner)))
5240 (home-page "https://github.com/flintwork/mccabe")
5241 (synopsis "McCabe checker, plugin for flake8")
5243 "This package provides a Flake8 plug-in to compute the McCabe cyclomatic
5244 complexity of Python source code.")
5245 (license license:expat)))
5247 (define-public python2-mccabe
5248 (package-with-python2 python-mccabe))
5250 (define-public python-mccabe-0.2.1
5251 (package (inherit python-mccabe)
5256 (uri (pypi-uri "mccabe" version))
5259 "0fi4a81kr5bcv5p4xgibqr595hyj5dafkqgsmfk96mfy8w71fajs"))))))
5261 (define-public python2-mccabe-0.2.1
5262 (package-with-python2 python-mccabe-0.2.1))
5264 ;; Flake8 2.4.1 requires an older version of pep8.
5265 ;; This should be removed ASAP.
5266 (define-public python-pep8-1.5.7
5267 (package (inherit python-pep8)
5273 "https://pypi.python.org/packages/source/p/pep8/pep8-"
5278 "12b9bbdbwnspxgak14xg58c130x2n0blxzlms5jn2dszn8qj3d0m"))))
5280 ;; XXX Tests not compatible with Python 3.5.
5283 (define-public python2-pep8-1.5.7
5284 (package-with-python2 python-pep8-1.5.7))
5286 ;; Flake8 2.4.1 requires an older version of pyflakes.
5287 ;; This should be removed ASAP.
5288 (define-public python-pyflakes-0.8.1
5289 (package (inherit python-pyflakes)
5295 "https://pypi.python.org/packages/source/p/pyflakes/pyflakes-"
5300 "0sbpq6pqm1i9wqi41mlfrsc5rk92jv4mskvlyxmnhlbdnc80ma1z"))))
5302 ;; XXX Tests not compatible with Python 3.5.
5305 (define-public python2-pyflakes-0.8.1
5306 (package-with-python2 python-pyflakes-0.8.1))
5308 (define-public python-flake8
5310 (name "python-flake8")
5315 (uri (pypi-uri "flake8" version))
5318 "0bs9cz4fr99r2rwig1b8jwaadl1nan7kgpdzqwj0bwbckwbmh7nc"))
5319 (modules '((guix build utils)))
5322 ;; Remove pre-compiled .pyc files from source.
5323 (for-each delete-file-recursively
5324 (find-files "." "__pycache__" #:directories? #t))
5325 (for-each delete-file (find-files "." "\\.pyc$"))
5327 (build-system python-build-system)
5329 `(("python-pep8" ,python-pep8)
5330 ("python-pyflakes" ,python-pyflakes)
5331 ("python-mccabe" ,python-mccabe)))
5333 `(("python-mock" ,python-mock) ; TODO: only required for < 3.3
5334 ("python-nose" ,python-nose)))
5335 (home-page "https://gitlab.com/pycqa/flake8")
5337 "The modular source code checker: pep8, pyflakes and co")
5339 "Flake8 is a wrapper around PyFlakes, pep8 and python-mccabe.")
5340 (license license:expat)))
5342 (define-public python2-flake8
5343 (package-with-python2 python-flake8))
5345 (define-public python-flake8-polyfill
5347 (name "python-flake8-polyfill")
5352 (uri (pypi-uri "flake8-polyfill" version))
5355 "02gn2wxvh9vnf7m7dld7ca4l60mg5c370hv3swwppkngwaqmcw67"))))
5356 (build-system python-build-system)
5359 (modify-phases %standard-phases
5362 (setenv "PYTHONPATH"
5363 (string-append (getcwd) "/build/lib:"
5364 (getenv "PYTHONPATH")))
5365 (zero? (system* "py.test" "-v")))))))
5367 `(("python-flake8" ,python-flake8)
5368 ("python-mock" ,python-mock)
5369 ("python-pycodestyle" ,python-pycodestyle)
5370 ("python-pytest" ,python-pytest)))
5371 (home-page "https://gitlab.com/pycqa/flake8-polyfill")
5372 (synopsis "Polyfill package for Flake8 plugins")
5374 "This package that provides some compatibility helpers for Flake8
5375 plugins that intend to support Flake8 2.x and 3.x simultaneously.")
5376 (license license:expat)))
5378 (define-public python2-flake8-polyfill
5379 (package-with-python2 python-flake8-polyfill))
5381 (define-public python-mistune
5383 (name "python-mistune")
5388 (uri (pypi-uri "mistune" version))
5391 "06b662p6kf46wh2jsabaqhaq4bz1srh2zxkrnx4yg96azlxw645w"))))
5392 (build-system python-build-system)
5394 `(("python-nose" ,python-nose)
5395 ("python-cython" ,python-cython)))
5396 (home-page "https://github.com/lepture/mistune")
5397 (synopsis "Markdown parser in pure Python")
5398 (description "This package provides a fast markdown parser in pure
5400 (license license:bsd-3)))
5402 (define-public python2-mistune
5403 (package-with-python2 python-mistune))
5405 (define-public python-markdown
5407 (name "python-markdown")
5412 (uri (pypi-uri "Markdown" version))
5415 "0cqfhr1km2s5d8jm6hbwgkrrj9hvkjf2gab3s2axlrw1clgaij0a"))))
5416 (build-system python-build-system)
5419 (modify-phases %standard-phases
5422 (zero? (system* "python" "run-tests.py")))))))
5424 `(("python-nose" ,python-nose)
5425 ("python-pyyaml" ,python-pyyaml)))
5426 (home-page "https://pythonhosted.org/Markdown/")
5427 (synopsis "Python implementation of Markdown")
5429 "This package provides a Python implementation of John Gruber's
5430 Markdown. The library features international input, various Markdown
5431 extensions, and several HTML output formats. A command line wrapper
5432 markdown_py is also provided to convert Markdown files to HTML.")
5433 (license license:bsd-3)))
5435 (define-public python2-markdown
5436 (package-with-python2 python-markdown))
5438 (define-public python-ptyprocess
5440 (name "python-ptyprocess")
5446 "https://pypi.python.org/packages/source/p/ptyprocess/ptyprocess-"
5450 "19l1xrjn4l9gjz01s3vg92gn2dd9d8mw1v86ppkzlnr9m5iwwc05"))))
5451 (build-system python-build-system)
5453 `(("python-nose" ,python-nose)))
5456 (modify-phases %standard-phases
5459 (zero? (system* "nosetests")))))))
5460 (home-page "https://github.com/pexpect/ptyprocess")
5461 (synopsis "Run a subprocess in a pseudo terminal")
5463 "This package provides a Python library used to launch a subprocess in a
5464 pseudo terminal (pty), and interact with both the process and its pty.")
5465 (license license:isc)))
5467 (define-public python2-ptyprocess
5468 (package-with-python2 python-ptyprocess))
5470 (define-public python-cram
5472 (name "python-cram")
5474 (home-page "https://bitheap.org/cram/")
5477 (uri (list (string-append home-page "cram-"
5479 (pypi-uri "cram" version)))
5482 "0bvz6fwdi55rkrz3f50zsy35gvvwhlppki2yml5bj5ffy9d499vx"))))
5485 (modify-phases %standard-phases
5486 (add-after 'unpack 'patch-source
5488 (substitute* (find-files "cram" ".*\\.py$")
5489 ;; Replace default shell path.
5490 (("/bin/sh") (which "sh")))
5491 (substitute* (find-files "tests" ".*\\.t$")
5493 (("/bin/bash") (which "bash"))
5494 (("/bin/sh") (which "sh")))
5495 (substitute* "cram/_test.py"
5496 ;; This hack works around a bug triggered by substituting
5497 ;; the /bin/sh paths. "tests/usage.t" compares the output of
5498 ;; "cram -h", which breaks the output at 80 characters. This
5499 ;; causes the line showing the default shell to break into two
5500 ;; lines, but the test expects a single line...
5501 (("env\\['COLUMNS'\\] = '80'")
5502 "env['COLUMNS'] = '160'"))
5505 (add-after 'install 'check
5506 ;; The test phase uses the built library and executable.
5507 ;; It's easier to run it after install since the build
5508 ;; directory contains version-specific PATH.
5509 (lambda* (#:key inputs outputs #:allow-other-keys)
5510 (add-installed-pythonpath inputs outputs)
5511 (setenv "PATH" (string-append (getenv "PATH") ":"
5512 (assoc-ref outputs "out") "/bin"))
5513 (zero? (system* "make" "test")))))))
5514 (build-system python-build-system)
5516 `(("python-coverage" ,python-coverage)
5518 (synopsis "Simple testing framework for command line applications")
5520 "Cram is a functional testing framework for command line applications.
5521 Cram tests look like snippets of interactive shell sessions. Cram runs each
5522 command and compares the command output in the test with the command’s actual
5524 (license license:gpl2+)))
5526 (define-public python2-cram
5527 (package-with-python2 python-cram))
5529 (define-public python-straight-plugin
5531 (name "python-straight-plugin")
5536 (uri (pypi-uri "straight.plugin" version))
5539 "069pjll4383p4kkgvcc40hgyvf79j2wdbpgwz77yigzxksh1gj62"))))
5540 (build-system python-build-system)
5541 (home-page "https://github.com/ironfroggy/straight.plugin")
5542 (synopsis "Simple namespaced plugin facility")
5543 (description "Straight Plugin provides a type of plugin you can create from
5544 almost any existing Python modules, and an easy way for outside developers to
5545 add functionality and customization to your projects with their own plugins.")
5546 (license license:expat)))
5548 (define-public python2-straight-plugin
5549 (package-with-python2 python-straight-plugin))
5551 (define-public python-fonttools
5553 (name "python-fonttools")
5557 (uri (pypi-uri "fonttools" version ".zip"))
5560 "1hhj97izwliy0vybmza72d90l5d4mcn50y8akq7kyccfl82vdx4d"))))
5561 (build-system python-build-system)
5563 '(#:test-target "check"
5565 (modify-phases %standard-phases
5566 (add-after 'unpack 'patch-setuppy
5567 ;; Remove the undocumented "extra_path" argument, which adds an
5568 ;; intervening directories between site-packages and the package
5571 (substitute* "setup.py"
5572 (("^[ \t]*extra_path *= *'FontTools',") ""))
5575 `(("unzip" ,unzip)))
5576 (home-page "https://github.com/behdad/fonttools")
5577 (synopsis "Tools to manipulate font files")
5579 "FontTools/TTX is a library to manipulate font files from Python. It
5580 supports reading and writing of TrueType/OpenType fonts, reading and writing
5581 of AFM files, reading (and partially writing) of PS Type 1 fonts. The package
5582 also contains a tool called “TTX” which converts TrueType/OpenType fonts to and
5583 from an XML-based format.")
5584 (license (license:non-copyleft
5585 "file://LICENSE.txt"
5586 "See LICENSE.txt in the distribution."))))
5588 (define-public python2-fonttools
5589 (package-with-python2 python-fonttools))
5591 (define-public python-ly
5598 (uri (string-append "https://pypi.python.org/packages/57/4f/"
5599 "889579244947368f28eda66b782331b1e75f83fd72e63f9ece93cd7a18f9"
5600 "/python-ly-" version ".tar.gz"))
5603 "0g6n288l83sfwavxh1aryi0aqvsr3sp7v6f903mckwqa4scpky62"))))
5604 (build-system python-build-system)
5606 ;; FIXME: Some tests need network access.
5608 (synopsis "Tool and library for manipulating LilyPond files")
5609 (description "This package provides a Python library to parse, manipulate
5610 or create documents in LilyPond format. A command line program ly is also
5611 provided that can be used to do various manipulations with LilyPond files.")
5612 (home-page "https://pypi.python.org/pypi/python-ly")
5613 (license license:gpl2+)))
5615 (define-public python-appdirs
5617 (name "python-appdirs")
5622 (uri (pypi-uri "appdirs" version))
5625 "14id6wxi12lgyw0mg3bcfnf888ad07jz9yj46gfzhn186z8rcn4y"))))
5626 (build-system python-build-system)
5627 (home-page "https://github.com/ActiveState/appdirs")
5629 "Determine platform-specific dirs, e.g. a \"user data dir\"")
5631 "This module provides a portable way of finding out where user data
5632 should be stored on various operating systems.")
5633 (license license:expat)))
5635 (define-public python2-appdirs
5636 (package-with-python2 python-appdirs))
5638 (define-public python-llfuse
5640 (name "python-llfuse")
5645 "https://bitbucket.org/nikratio/python-llfuse/downloads/"
5646 "llfuse-" version ".tar.bz2"))
5649 "11hms1x68bf1bqbqy7w3wpffqsd3jkgricmzrc1hrnwkswfzzlr4"))))
5650 (build-system python-build-system)
5655 `(("pkg-config" ,pkg-config)))
5656 (synopsis "Python bindings for FUSE")
5658 "Python-LLFUSE is a set of Python bindings for the low level FUSE API.")
5659 (home-page "https://bitbucket.org/nikratio/python-llfuse/")
5660 (license license:lgpl2.0+)
5661 (properties `((python2-variant . ,(delay python2-llfuse))))))
5663 (define-public python2-llfuse
5664 (package (inherit (package-with-python2
5665 (strip-python2-variant python-llfuse)))
5666 (propagated-inputs `(("python2-contextlib2" ,python2-contextlib2)))))
5669 (define-public python-llfuse-0.41
5670 (package (inherit python-llfuse)
5675 "https://bitbucket.org/nikratio/python-llfuse/downloads/"
5676 "llfuse-" version ".tar.bz2"))
5679 "1imlqw9b73086y97izr036f58pgc5akv4ihc2rrf8j5h75jbrlaa"))))
5680 ;; Python-LLFUSE < 0.42 includes underscore.js, which is MIT (expat)
5681 ;; licensed. The rest of the package is licensed under LGPL2.0 or later.
5682 (license (list license:expat license:lgpl2.0+))))
5684 (define-public python-msgpack
5686 (name "python-msgpack")
5690 (uri (pypi-uri "msgpack-python" version))
5693 "11pqk5braa6wndpnr1dhg64js82vjgxnm0lzy73rwl831zgijaqs"))))
5694 (build-system python-build-system)
5695 (synopsis "MessagePack (de)serializer")
5696 (description "MessagePack is a fast, compact binary serialization format,
5697 suitable for similar data to JSON. This package provides CPython bindings for
5698 reading and writing MessagePack data.")
5699 (home-page "https://pypi.python.org/pypi/msgpack-python/")
5700 (license license:asl2.0)))
5702 (define-public python2-msgpack
5703 (package-with-python2 python-msgpack))
5705 (define-public python-netaddr
5707 (name "python-netaddr")
5712 (uri (pypi-uri "netaddr" version))
5715 "1zdfadvpq4lmcqzr383gywxn4xyn355kj1n3lk9q2l03vmyfrbiq"))))
5716 (build-system python-build-system)
5717 (arguments `(#:tests? #f)) ;; No tests.
5718 (home-page "https://github.com/drkjam/netaddr/")
5719 (synopsis "Pythonic manipulation of network addresses")
5721 "A Python library for representing and manipulating IPv4, IPv6, CIDR, EUI
5722 and MAC network addresses.")
5723 (license license:bsd-3)))
5725 (define-public python2-netaddr
5726 (package-with-python2 python-netaddr))
5728 (define-public python-wrapt
5730 (name "python-wrapt")
5735 (uri (pypi-uri "wrapt" version))
5738 "0wrcm1mydvfivbkzz0h81ygzdchnscshi6xvy5n3r21r9s0px8af"))))
5739 (build-system python-build-system)
5741 ;; Tests are not included in the tarball, they are only available in the
5744 (home-page "https://github.com/GrahamDumpleton/wrapt")
5745 (synopsis "Module for decorators, wrappers and monkey patching")
5747 "The aim of the wrapt module is to provide a transparent object proxy for
5748 Python, which can be used as the basis for the construction of function
5749 wrappers and decorator functions.")
5750 (license license:bsd-2)))
5752 (define-public python2-wrapt
5753 (package-with-python2 python-wrapt))
5755 (define-public python-xlrd
5757 (name "python-xlrd")
5761 (uri (pypi-uri "xlrd" version))
5764 "0s8hjiz01vbhy85xalrz0qlsmd9ypf36zjqrf97hh984spapvy0g"))))
5765 (build-system python-build-system)
5768 (modify-phases %standard-phases
5769 ;; Current test in setup.py does not work as of 1.0.0, so use nose to
5770 ;; run tests instead for now.
5771 (replace 'check (lambda _ (zero? (system* "nosetests")))))))
5772 (native-inputs `(("python-nose" ,python-nose)))
5773 (home-page "http://www.python-excel.org/")
5774 (synopsis "Library for extracting data from Excel files")
5775 (description "This packages provides a library to extract data from
5776 spreadsheets using Microsoft Excel proprietary file formats @samp{.xls} and
5777 @samp{.xlsx} (versions 2.0 onwards). It has support for Excel dates and is
5778 Unicode-aware. It is not intended as an end-user tool.")
5779 (license license:bsd-3)))
5781 (define-public python2-xlrd
5782 (package-with-python2 python-xlrd))
5784 (define-public python-prettytable
5786 (name "python-prettytable")
5792 "https://pypi.python.org/packages/source/P/PrettyTable/"
5793 "prettytable-" version ".tar.bz2"))
5796 "0diwsicwmiq2cpzpxri7cyl5fmsvicafw6nfqf6p6p322dji2g45"))))
5797 (build-system python-build-system)
5798 (home-page "http://code.google.com/p/prettytable/")
5799 (synopsis "Display tabular data in an ASCII table format")
5801 "A library designed to represent tabular data in visually appealing ASCII
5802 tables. PrettyTable allows for selection of which columns are to be printed,
5803 independent alignment of columns (left or right justified or centred) and
5804 printing of sub-tables by specifying a row range.")
5805 (license license:bsd-3)))
5807 (define-public python2-prettytable
5808 (package-with-python2 python-prettytable))
5810 (define-public python-tables
5812 (name "python-tables")
5817 (uri (pypi-uri "tables" version))
5820 "117s6w7s3yxafpmf3zz3svana7xfrsviw01va1xp7h8ylx8v6r1m"))
5821 (modules '((guix build utils)))
5824 ;; Remove pre-compiled .pyc files from source.
5825 (for-each delete-file-recursively
5826 (find-files "." "__pycache__" #:directories? #t))
5827 (for-each delete-file (find-files "." "\\.pyc$"))
5829 (build-system python-build-system)
5831 `(;; FIXME: python-build-system does not pass configure-flags to "build"
5832 ;; or "check", so we must override the build and check phases.
5834 (modify-phases %standard-phases
5835 (add-after 'unpack 'use-gcc
5837 (substitute* "setup.py"
5838 (("compiler = new_compiler\\(\\)" line)
5840 "\ncompiler.set_executables(compiler='gcc',"
5841 "compiler_so='gcc',"
5843 "linker_so='gcc -shared')")))
5846 (lambda* (#:key inputs #:allow-other-keys)
5847 (zero? (system* "python" "setup.py" "build"
5848 (string-append "--hdf5="
5849 (assoc-ref inputs "hdf5"))))))
5851 (lambda* (#:key inputs #:allow-other-keys)
5852 (zero? (system* "python" "setup.py" "check"
5853 (string-append "--hdf5="
5854 (assoc-ref inputs "hdf5")))))))))
5856 `(("python-numexpr" ,python-numexpr)
5857 ("python-numpy" ,python-numpy)))
5859 `(("python-cython" ,python-cython)
5860 ("pkg-config" ,pkg-config)))
5865 (home-page "http://www.pytables.org/")
5866 (synopsis "Hierarchical datasets for Python")
5867 (description "PyTables is a package for managing hierarchical datasets and
5868 designed to efficiently cope with extremely large amounts of data.")
5869 (license license:bsd-3)))
5871 (define-public python2-tables
5872 (package-with-python2 python-tables))
5874 (define-public python-pyasn1
5876 (name "python-pyasn1")
5881 (uri (pypi-uri "pyasn1" version))
5884 "1b86yx23c1x74clai05a5ma8c8nfmhlx3j1mxq0ff657i2ylx33k"))))
5885 (build-system python-build-system)
5886 (home-page "http://pyasn1.sourceforge.net/")
5887 (synopsis "ASN.1 types and codecs")
5889 "This is an implementation of ASN.1 types and codecs in Python. It is
5890 suitable for a wide range of protocols based on the ASN.1 specification.")
5891 (license license:bsd-2)))
5893 (define-public python2-pyasn1
5894 (package-with-python2 python-pyasn1))
5896 (define-public python-pyasn1-modules
5898 (name "python-pyasn1-modules")
5903 (uri (pypi-uri "pyasn1-modules" version))
5906 "0drqgw81xd3fxdlg89kgd79zzrabvfncvkbybi2wr6w2y4s1jmhh"))))
5907 (build-system python-build-system)
5909 `(("python-pyasn1" ,python-pyasn1)))
5910 (home-page "https://sourceforge.net/projects/pyasn1/")
5911 (synopsis "ASN.1 codec implementations")
5913 "Pyasn1-modules is a collection of Python modules providing ASN.1 types and
5914 implementations of ASN.1-based codecs and protocols.")
5915 (license license:bsd-3)))
5917 (define-public python2-pyasn1-modules
5918 (package-with-python2 python-pyasn1-modules))
5920 (define-public python-ipaddress
5922 (name "python-ipaddress")
5926 (uri (pypi-uri "ipaddress" version))
5929 "1q8klj9d84cmxgz66073x1j35cplr3r77vx1znhxiwl5w74391ax"))))
5930 (build-system python-build-system)
5931 (home-page "https://github.com/phihag/ipaddress")
5932 (synopsis "IP address manipulation library")
5934 "This package provides a fast, lightweight IPv4/IPv6 manipulation library
5935 in Python. This library is used to create, poke at, and manipulate IPv4 and
5936 IPv6 addresses and networks. This is a port of the Python 3.3 ipaddress
5937 module to older versions of Python.")
5938 (license license:psfl)))
5940 (define-public python2-ipaddress
5941 (package-with-python2 python-ipaddress))
5943 (define-public python2-ipaddr
5945 (name "python2-ipaddr")
5950 (uri (pypi-uri "ipaddr" version))
5952 (base32 "1dwq3ngsapjc93fw61rp17fvzggmab5x1drjzvd4y4q0i255nm8v"))))
5953 (build-system python-build-system)
5955 `(#:python ,python-2 ;version 2 only
5957 (modify-phases %standard-phases
5960 (zero? (system* "python" "ipaddr_test.py")))))))
5961 (home-page "https://github.com/google/ipaddr-py")
5962 (synopsis "IP address manipulation library")
5964 "Ipaddr is a Python@tie{}2 library for creating and manupilating IPv4 and
5965 IPv6 addresses and networks.
5967 For new implementations you may prefer to use the standard module
5968 @code{ipaddress}, which was introduced in Python 3.3 and backported to older
5969 versions of Python.")
5970 (license license:asl2.0)))
5972 (define-public python-idna
5974 (name "python-idna")
5979 (uri (pypi-uri "idna" version))
5982 "1ara12a7k2zc69msa0arrvw00gn61a6i6by01xb3lkkc0h4cxd9w"))))
5983 (build-system python-build-system)
5984 (home-page "https://github.com/kjd/idna")
5985 (synopsis "Internationalized domain names in applications")
5987 "This is a library to support the Internationalised Domain Names in
5988 Applications (IDNA) protocol as specified in RFC 5891. This version of the
5989 protocol is often referred to as “IDNA2008” and can produce different results
5990 from the earlier standard from 2003. The library is also intended to act as a
5991 suitable drop-in replacement for the “encodings.idna” module that comes with
5992 the Python standard library but currently only supports the older 2003
5994 (license license:bsd-4)))
5996 (define-public python2-idna
5997 (package-with-python2 python-idna))
5999 (define-public python-pretend
6001 (name "python-pretend")
6006 (uri (string-append "https://pypi.python.org/packages/source/p/"
6007 "pretend/pretend-" version ".tar.gz"))
6010 "0r5r7ygz9m6d2bklflbl84cqhjkc2q12xgis8268ygjh30g2q3wk"))))
6011 (build-system python-build-system)
6012 (home-page "https://github.com/alex/pretend")
6013 (synopsis "Library for stubbing in Python")
6015 "Pretend is a library to make stubbing with Python easier. Stubbing is a
6016 technique for writing tests. You may hear the term mixed up with mocks,
6017 fakes, or doubles. Basically, a stub is an object that returns pre-canned
6018 responses, rather than doing any computation.")
6019 (license license:bsd-3)))
6021 (define-public python2-pretend
6022 (package-with-python2 python-pretend))
6024 (define-public python-pip
6031 (uri (pypi-uri "pip" version))
6034 "03clr9c1dih5n9c00c592zzvf6r1ffimywkaq9agcqdllzhl7wh9"))))
6035 (build-system python-build-system)
6037 '(#:tests? #f)) ; there are no tests in the pypi archive.
6038 (home-page "https://pip.pypa.io/")
6039 (synopsis "Package manager for Python software")
6041 "Pip is a package manager for Python software, that finds packages on the
6042 Python Package Index (PyPI).")
6043 (license license:expat)))
6045 (define-public python2-pip
6046 (package-with-python2 python-pip))
6048 (define-public python-tlsh
6050 (name "python-tlsh")
6052 (home-page "https://github.com/trendmicro/tlsh")
6055 (uri (string-append "https://github.com/trendmicro/tlsh/archive/v"
6059 "00bhzjqrlh7v538kbkbn8lgx976j1138al3sdhklaizqjvpwyk4r"))
6060 (file-name (string-append name "-" version ".tar.gz"))))
6061 (build-system cmake-build-system)
6063 '(#:out-of-source? #f
6064 #:phases (modify-phases %standard-phases
6067 (lambda* (#:key outputs #:allow-other-keys)
6068 ;; Build and install the Python bindings. The underlying
6069 ;; C++ library is apparently not meant to be installed.
6070 (let ((out (assoc-ref outputs "out")))
6071 (with-directory-excursion "py_ext"
6072 (and (system* "python" "setup.py" "build")
6073 (system* "python" "setup.py" "install"
6074 (string-append "--prefix=" out))))))))))
6075 (inputs `(("python" ,python-wrapper))) ;for the bindings
6076 (synopsis "Fuzzy matching library for Python")
6078 "Trend Micro Locality Sensitive Hash (TLSH) is a fuzzy matching library.
6079 Given a byte stream with a minimum length of 256 bytes, TLSH generates a hash
6080 value which can be used for similarity comparisons. Similar objects have
6081 similar hash values, which allows for the detection of similar objects by
6082 comparing their hash values. The byte stream should have a sufficient amount
6083 of complexity; for example, a byte stream of identical bytes will not generate
6085 (license license:asl2.0)))
6087 (define-public python2-tlsh
6089 (inherit python-tlsh)
6090 (name "python2-tlsh")
6091 (inputs `(("python" ,python-2)))))
6093 (define-public python-termcolor
6095 (name "python-termcolor")
6100 (uri (pypi-uri "termcolor" version))
6103 "0fv1vq14rpqwgazxg4981904lfyp84mnammw7y046491cv76jv8x"))))
6104 (build-system python-build-system)
6106 ;; There are no tests.
6108 (home-page "https://pypi.python.org/pypi/termcolor")
6109 (synopsis "ANSII Color formatting for terminal output")
6111 "This package provides ANSII Color formatting for output in terminals.")
6112 (license license:expat)))
6114 (define-public python2-termcolor
6115 (package-with-python2 python-termcolor))
6117 (define-public python-libarchive-c
6119 (name "python-libarchive-c")
6123 (uri (pypi-uri "libarchive-c" version))
6126 "0z4r7v3dhd6b3120mav05ff08srih176r2rg5k8kn7mjd9pslm2x"))))
6127 (build-system python-build-system)
6129 '(#:phases (modify-phases %standard-phases
6131 'build 'reference-libarchive
6132 (lambda* (#:key inputs #:allow-other-keys)
6133 ;; Retain the absolute file name of libarchive.so.
6134 (let ((libarchive (assoc-ref inputs "libarchive")))
6135 (substitute* "libarchive/ffi.py"
6136 (("find_library\\('archive'\\)")
6137 (string-append "'" libarchive
6138 "/lib/libarchive.so'")))))))))
6140 `(("libarchive" ,libarchive)))
6141 (home-page "https://github.com/Changaco/python-libarchive-c")
6142 (synopsis "Python interface to libarchive")
6144 "This package provides Python bindings to libarchive, a C library to
6145 access possibly compressed archives in many different formats. It uses
6146 Python's @code{ctypes} foreign function interface (FFI).")
6147 (license license:lgpl2.0+)))
6149 (define-public python2-libarchive-c
6150 (package-with-python2 python-libarchive-c))
6152 (define-public python-file
6155 (name "python-file")
6156 (build-system python-build-system)
6158 '(#:tests? #f ;no tests
6159 #:configure-flags '("--single-version-externally-managed" "--root=/")
6160 #:phases (modify-phases %standard-phases
6161 (add-before 'build 'change-directory
6165 (add-before 'build 'set-library-file-name
6166 (lambda* (#:key inputs #:allow-other-keys)
6167 (let ((file (assoc-ref inputs "file")))
6168 (substitute* "magic.py"
6169 (("find_library\\('magic'\\)")
6170 (string-append "'" file "/lib/libmagic.so'")))
6172 (inputs `(("file" ,file)))
6173 (self-native-input? #f)
6174 (synopsis "Python bindings to the libmagic file type guesser. Note that
6175 this module and the python-magic module both provide a \"magic.py\" file;
6176 these two modules, which are different and were developed separately, both
6177 serve the same purpose: provide Python bindings for libmagic.")))
6179 (define-public python2-file
6180 (package-with-python2 python-file))
6182 (define-public python-debian
6184 (name "python-debian")
6189 (uri (pypi-uri name version))
6192 "0i15f0xzx679sd0ldq2sls9pnnps9fv6vhqvnv9dzf4qhma42i0y"))))
6193 (build-system python-build-system)
6195 `(("python-six" ,python-six)))
6196 (home-page "http://packages.debian.org/sid/python-debian")
6197 (synopsis "Debian package related modules")
6199 ;; XXX: Use @enumerate instead of @itemize to work around
6200 ;; <http://bugs.gnu.org/21772>.
6201 "This package provides Python modules that abstract many formats of
6202 Debian-related files, such as:
6205 @item Debtags information;
6206 @item @file{debian/changelog} files;
6207 @item packages files, pdiffs;
6208 @item control files of single or multiple RFC822-style paragraphs---e.g.
6209 @file{debian/control}, @file{.changes}, @file{.dsc};
6210 @item Raw @file{.deb} and @file{.ar} files, with (read-only) access to
6211 contained files and meta-information.
6214 ;; Modules are either GPLv2+ or GPLv3+.
6215 (license license:gpl3+)))
6217 (define-public python2-debian
6218 (package-with-python2 python-debian))
6220 (define-public python-nbformat
6222 (name "python-nbformat")
6227 (uri (pypi-uri "nbformat" version))
6230 "12s7j4qja8b5bs1kyw5dzmrqbjxxj8wk52cyasbiqbv7fblcrssz"))))
6231 (build-system python-build-system)
6232 (arguments `(#:tests? #f)) ; no test target
6234 `(("python-ipython-genutils" ,python-ipython-genutils)
6235 ("python-jsonschema" ,python-jsonschema)
6236 ("python-jupyter-core" ,python-jupyter-core)
6237 ("python-traitlets" ,python-traitlets)))
6238 (home-page "http://jupyter.org")
6239 (synopsis "Jupyter Notebook format")
6240 (description "This package provides the reference implementation of the
6241 Jupyter Notebook format and Python APIs for working with notebooks.")
6242 (license license:bsd-3)))
6244 (define-public python2-nbformat
6245 (package-with-python2 python-nbformat))
6247 (define-public python-bleach
6249 (name "python-bleach")
6254 (uri (pypi-uri "bleach" version))
6257 "0jvg3jxrvnx7xmm9gj262v60ib452xlnwlb0navyp7jsvcd0d4qj"))))
6258 (build-system python-build-system)
6260 `(("python-html5lib" ,python-html5lib-0.9)
6261 ("python-six" ,python-six)))
6263 `(("python-nose" ,python-nose)))
6264 (home-page "https://github.com/jsocol/bleach")
6265 (synopsis "Whitelist-based HTML-sanitizing tool")
6266 (description "Bleach is an easy whitelist-based HTML-sanitizing tool.")
6267 (license license:asl2.0)))
6269 (define-public python2-bleach
6270 (package-with-python2 python-bleach))
6272 (define-public python-entrypoints
6274 (name "python-entrypoints")
6279 (uri (string-append "https://github.com/takluyver/entrypoints/archive/"
6281 (file-name (string-append name "-" version ".tar.gz"))
6284 "0azqlkh3j0za080lsf5crnhaxx3c93k9dpv5ihkhf5cppgw5sjz5"))))
6285 (build-system python-build-system)
6286 ;; The package does not come with a setup.py file, so we have to generate
6291 (modify-phases %standard-phases
6292 (add-after 'unpack 'create-setup.py
6294 (call-with-output-file "setup.py"
6297 from setuptools import setup
6298 setup(name='entrypoints', version='~a', py_modules=['entrypoints'])
6300 (home-page "https://github.com/takluyver/entrypoints")
6301 (synopsis "Discover and load entry points from installed Python packages")
6302 (description "Entry points are a way for Python packages to advertise
6303 objects with some common interface. The most common examples are
6304 @code{console_scripts} entry points, which define shell commands by
6305 identifying a Python function to run. The @code{entrypoints} module contains
6306 functions to find and load entry points.")
6307 (license license:expat)))
6309 (define-public python2-entrypoints
6310 (package-with-python2 python-entrypoints))
6312 (define-public python-nbconvert
6314 (name "python-nbconvert")
6319 (uri (pypi-uri "nbconvert" version))
6322 "0brclbb18l4nmd5qy3dl9wn05rjdh1fz4rmzdlfqacj12rcdvdgp"))))
6323 (build-system python-build-system)
6325 `(;; The "bdist_egg" target is disabled by default, causing the installation
6327 #:configure-flags (list "bdist_egg")
6328 ;; FIXME: 5 failures, 40 errors.
6331 ;; (modify-phases %standard-phases
6334 ;; (zero? (system* "py.test" "-v")))))
6336 `(("python-pytest" ,python-pytest)))
6338 `(("python-bleach" ,python-bleach)
6339 ("python-entrypoints" ,python-entrypoints)
6340 ("python-jinja2" ,python-jinja2)
6341 ("python-jupyter-core" ,python-jupyter-core)
6342 ("python-mistune" ,python-mistune)
6343 ("python-nbformat" ,python-nbformat)
6344 ("python-pygments" ,python-pygments)
6345 ("python-traitlets" ,python-traitlets)))
6346 (home-page "http://jupyter.org")
6347 (synopsis "Converting Jupyter Notebooks")
6348 (description "The @code{nbconvert} tool, @{jupyter nbconvert}, converts
6349 notebooks to various other formats via Jinja templates. It allows you to
6350 convert an @code{.ipynb} notebook file into various static formats including:
6358 @item ReStructured Text (rst)
6359 @item executable script
6361 (license license:bsd-3)))
6363 (define-public python2-nbconvert
6364 (package-with-python2 python-nbconvert))
6366 (define-public python-notebook
6368 (name "python-notebook")
6372 (uri (pypi-uri "notebook" version))
6375 "0laq5c2f21frq6xcdckgq7raqhznbjb0qs0357g612z87wyn1a9r"))))
6376 (build-system python-build-system)
6379 (modify-phases %standard-phases
6382 ;; HOME must be set for tests
6383 (setenv "HOME" "/tmp")
6384 (zero? (system* "nosetests")))))))
6386 `(("python-jupyter-core" ,python-jupyter-core)
6387 ("python-nbformat" ,python-nbformat)
6388 ("python-nbconvert" ,python-nbconvert)
6389 ("python-ipython" ,python-ipython)))
6391 `(("python-nose" ,python-nose)
6392 ("python-sphinx" ,python-sphinx)
6393 ("python-requests" ,python-requests)))
6394 (home-page "http://jupyter.org/")
6395 (synopsis "Web-based notebook environment for interactive computing")
6397 "The Jupyter HTML notebook is a web-based notebook environment for
6398 interactive computing.")
6399 (properties `((python2-variant . ,(delay python2-notebook))))
6400 (license license:bsd-3)))
6402 (define-public python2-notebook
6403 (let ((base (package-with-python2
6404 (strip-python2-variant python-notebook))))
6405 (package (inherit base)
6407 `(("python2-mock" ,python2-mock)
6408 ,@(package-native-inputs base)))
6410 (substitute-keyword-arguments (package-arguments base)
6412 `(modify-phases ,phases
6413 (add-before 'check 'disable-test-case
6414 ;; The test requires network access to localhost. Curiously it
6415 ;; fails with Python 2 only. Simply make the test-case return
6419 "notebook/services/nbconvert/tests/test_nbconvert_api.py"
6420 (("formats = self.nbconvert_api") "return #")))))))))))
6422 (define-public python-widgetsnbextension
6424 (name "python-widgetsnbextension")
6429 (uri (pypi-uri "widgetsnbextension" version))
6432 "0lff2mrwrgsa1mxmwx3phl9xvy0jqfpg6khbmxy53jbq56rwy666"))))
6433 (build-system python-build-system)
6435 `(("python-notebook" ,python-notebook)))
6437 `(("python-certifi" ,python-certifi)
6438 ("python-nose" ,python-nose)))
6439 (home-page "http://ipython.org")
6440 (synopsis "IPython HTML widgets for Jupyter")
6441 (description "This package provides interactive HTML widgets for Jupyter
6443 (license license:bsd-3)))
6445 (define-public python2-widgetsnbextension
6446 (package-with-python2 python-widgetsnbextension))
6448 (define-public python-ipywidgets
6450 (name "python-ipywidgets")
6455 (uri (pypi-uri "ipywidgets" version))
6458 "1lk0qrr5l9a0z7qkkn30hv5832whxwxymf1l576fmmad0n7hkxms"))))
6459 (build-system python-build-system)
6460 ;; FIXME: it's not clear how to run the tests.
6461 (arguments `(#:tests? #f))
6463 `(("python-ipykernel" ,python-ipykernel)
6464 ("python-ipython" ,python-ipython)
6465 ("python-traitlets" ,python-traitlets)
6466 ("python-widgetsnbextension" ,python-widgetsnbextension)))
6467 (home-page "http://ipython.org")
6468 (synopsis "IPython HTML widgets for Jupyter")
6469 (description "Ipywidgets are interactive HTML widgets for Jupyter
6470 notebooks and the IPython kernel. Notebooks come alive when interactive
6471 widgets are used. Users gain control of their data and can visualize changes
6473 (license license:bsd-3)))
6475 (define-public python2-ipywidgets
6476 (package-with-python2 python-ipywidgets))
6478 (define-public python-jupyter-console
6480 (name "python-jupyter-console")
6485 (uri (pypi-uri "jupyter_console" version))
6488 "04acmkwsi99rcg3vb54c6n492zv35s92h2ahabc0w6wj976cipvx"))))
6489 (build-system python-build-system)
6490 ;; FIXME: it's not clear how to run the tests.
6491 (arguments `(#:tests? #f))
6493 `(("python-ipykernel" ,python-ipykernel)
6494 ("python-ipython" ,python-ipython)
6495 ("python-jupyter-client" ,python-jupyter-client)
6496 ("python-prompt-toolkit" ,python-prompt-toolkit)
6497 ("python-pygments" ,python-pygments)))
6498 (home-page "https://jupyter.org")
6499 (synopsis "Jupyter terminal console")
6500 (description "This package provides a terminal-based console frontend for
6501 Jupyter kernels. It also allows for console-based interaction with non-Python
6502 Jupyter kernels such as IJulia and IRKernel.")
6503 (license license:bsd-3)))
6505 (define-public python2-jupyter-console
6506 (package-with-python2 python-jupyter-console))
6508 ;; The python-ipython and python-jupyter-console require each other. To get
6509 ;; the functionality in both packages working, strip down the
6510 ;; python-jupyter-console package when using it as an input to python-ipython.
6511 (define python-jupyter-console-minimal
6513 (inherit python-jupyter-console)
6514 (name "python-jupyter-console-minimal")
6516 (substitute-keyword-arguments
6517 (package-arguments python-jupyter-console)
6519 `(modify-phases ,phases
6520 (add-after 'install 'delete-bin
6521 (lambda* (#:key outputs #:allow-other-keys)
6522 ;; Delete the bin files, to avoid conflicts in profiles
6523 ;; where python-ipython and python-jupyter-console are
6525 (delete-file-recursively
6527 (assoc-ref outputs "out") "/bin"))))))))
6528 ;; Remove the python-ipython propagated input, to avoid the cycle
6532 (package-propagated-inputs python-jupyter-console)))))
6534 (define-public jupyter
6541 (uri (pypi-uri "jupyter" version))
6544 "0pwf3pminkzyzgx5kcplvvbvwrrzd3baa7lmh96f647k30rlpp6r"))))
6545 (build-system python-build-system)
6546 ;; FIXME: it's not clear how to run the tests.
6547 (arguments `(#:tests? #f))
6549 `(("python-ipykernel" ,python-ipykernel)
6550 ("python-ipywidgets" ,python-ipywidgets)
6551 ("python-jupyter-console" ,python-jupyter-console)
6552 ("python-nbconvert" ,python-nbconvert)
6553 ("python-notebook" ,python-notebook)))
6554 (home-page "http://jupyter.org")
6555 (synopsis "Web application for interactive documents")
6557 "The Jupyter Notebook is a web application that allows you to create and
6558 share documents that contain live code, equations, visualizations and
6559 explanatory text. Uses include: data cleaning and transformation, numerical
6560 simulation, statistical modeling, machine learning and much more.")
6561 (license license:bsd-3)))
6563 (define-public python-chardet
6565 (name "python-chardet")
6570 (uri (pypi-uri "chardet" version))
6573 "1bpalpia6r5x1kknbk11p1fzph56fmmnp405ds8icksd3knr5aw4"))))
6575 `(("python-hypothesis" ,python-hypothesis)
6576 ("python-pytest" ,python-pytest)
6577 ("python-pytest-runner" ,python-pytest-runner)))
6578 (build-system python-build-system)
6579 (home-page "https://github.com/chardet/chardet")
6580 (synopsis "Universal encoding detector for Python 2 and 3")
6582 "This package provides @code{chardet}, a Python module that can
6583 automatically detect a wide range of file encodings.")
6584 (license license:lgpl2.1+)))
6586 (define-public python2-chardet
6587 (package-with-python2 python-chardet))
6589 (define-public python-docopt
6591 (name "python-docopt")
6596 ;; The release on PyPI does not include tests.
6598 "https://github.com/docopt/docopt/archive/"
6600 (file-name (string-append name "-" version ".tar.gz"))
6603 "16bf890xbdz3m30rsv2qacklh2rdn1zrfspfnwzx9g7vwz8yw4r1"))))
6604 (build-system python-build-system)
6606 `(("python-pytest" ,python-pytest)))
6609 (modify-phases %standard-phases
6611 (lambda _ (zero? (system* "py.test")))))))
6612 (home-page "http://docopt.org")
6613 (synopsis "Command-line interface description language for Python")
6614 (description "This library allows the user to define a command-line
6615 interface from a program's help message rather than specifying it
6616 programatically with command-line parsers like @code{getopt} and
6618 (license license:expat)))
6620 (define-public python2-docopt
6621 (package-with-python2 python-docopt))
6623 (define-public python-pythondialog
6625 (name "python-pythondialog")
6630 (uri (pypi-uri "pythondialog" version))
6633 "1728ghsran47jczn9bhlnkvk5bvqmmbihabgif5h705b84r1272c"))))
6634 (build-system python-build-system)
6637 (modify-phases %standard-phases
6638 (add-after 'unpack 'patch-path
6639 (lambda* (#:key inputs #:allow-other-keys)
6640 (let* ((dialog (assoc-ref inputs "dialog")))
6641 ;; Since this library really wants to grovel the search path, we
6642 ;; must hardcode dialog's store path into it.
6643 (substitute* "dialog.py"
6644 (("os.getenv\\(\"PATH\", \":/bin:/usr/bin\"\\)")
6645 (string-append "os.getenv(\"PATH\") + \":" dialog "/bin\"")))
6647 #:tests? #f)) ; no test suite
6649 `(("dialog" ,dialog)))
6650 (home-page "http://pythondialog.sourceforge.net/")
6651 (synopsis "Python interface to the UNIX dialog utility")
6652 (description "A Python wrapper for the dialog utility. Its purpose is to
6653 provide an easy to use, pythonic and comprehensive Python interface to dialog.
6654 This allows one to make simple text-mode user interfaces on Unix-like systems")
6655 (license license:lgpl2.1)
6656 (properties `((python2-variant . ,(delay python2-pythondialog))))))
6658 (define-public python2-pythondialog
6659 (let ((base (package-with-python2 (strip-python2-variant python-pythondialog))))
6662 (version (package-version python-pythondialog))
6665 (uri (pypi-uri "python2-pythondialog" version))
6668 "0d8k7lxk50imdyx85lv8j98i4c93a71iwpapnl1506rpkbm9qvd9")))))))
6670 (define-public python-configobj
6672 (name "python-configobj")
6677 "https://pypi.python.org/packages/source/c/configobj/"
6678 "configobj-" version ".tar.gz"))
6681 "00h9rcmws03xvdlfni11yb60bz3kxfvsj6dg6nrpzj71f03nbxd2"))
6682 ;; Patch setup.py so it looks for python-setuptools, which is
6683 ;; required to parse the keyword 'install_requires' in setup.py.
6684 (patches (search-patches "python-configobj-setuptools.patch"))))
6685 (build-system python-build-system)
6687 `(("python-six" ,python-six)))
6688 (synopsis "Config file reading, writing and validation")
6689 (description "ConfigObj is a simple but powerful config file reader and
6690 writer: an ini file round tripper. Its main feature is that it is very easy to
6691 use, with a straightforward programmer’s interface and a simple syntax for
6693 (home-page "https://github.com/DiffSK/configobj")
6694 (license license:bsd-3)))
6696 (define-public python2-configobj
6697 (package-with-python2 python-configobj))
6699 (define-public python-configargparse
6701 (name "python-configargparse")
6706 "https://pypi.io/packages/source/C/ConfigArgParse/"
6707 "ConfigArgParse-" version ".tar.gz"))
6710 "0fgkiqh6r3rbkdq3k8c48m85g52k96686rw3a6jg4lcncrkpvk98"))))
6711 (build-system python-build-system)
6713 `(("python-pyyaml" ,python-pyyaml)))
6716 (modify-phases %standard-phases
6719 ;; Bypass setuptools-shim because one test relies on "setup.py"
6720 ;; being the first argument passed to the python call.
6722 ;; NOTE: Many tests do not run because they rely on Python's
6723 ;; built-in test.test_argparse, but we remove the unit tests from
6724 ;; our Python installation.
6725 (zero? (system* "python" "setup.py" "test")))))))
6726 (synopsis "Replacement for argparse")
6727 (description "A drop-in replacement for argparse that allows options to also
6728 be set via config files and/or environment variables.")
6729 (home-page "https://github.com/bw2/ConfigArgParse")
6730 (license license:expat)))
6732 (define-public python2-configargparse
6733 (package-with-python2 python-configargparse))
6735 (define-public python-contextlib2
6737 (name "python-contextlib2")
6742 (uri (pypi-uri "contextlib2" version))
6745 "0cmp131dlh0d0zvw0aza1zd13glvngzk8lb4avks0hm7yxwdr9am"))))
6746 (build-system python-build-system)
6749 (modify-phases %standard-phases
6753 "python" "test_contextlib2.py" "-v")))))))
6754 (home-page "http://contextlib2.readthedocs.org/")
6755 (synopsis "Tools for decorators and context managers")
6756 (description "This module is primarily a backport of the Python
6757 3.2 contextlib to earlier Python versions. Like contextlib, it
6758 provides utilities for common tasks involving decorators and context
6759 managers. It also contains additional features that are not part of
6760 the standard library.")
6761 (license license:psfl)))
6763 (define-public python2-contextlib2
6764 (package-with-python2 python-contextlib2))
6766 (define-public python-texttable
6768 (name "python-texttable")
6773 (uri (pypi-uri "texttable" version))
6776 "1liiiydgkg37i46a418aw19fyf6z3ds51wdwwpyjbs12x0phhf4a"))))
6777 (build-system python-build-system)
6778 (arguments '(#:tests? #f)) ; no tests
6779 (home-page "https://github.com/foutaise/texttable/")
6780 (synopsis "Python module for creating simple ASCII tables")
6781 (description "Texttable is a Python module for creating simple ASCII
6783 (license license:lgpl2.1+)))
6785 (define-public python2-texttable
6786 (package-with-python2 python-texttable))
6788 (define-public python-atomicwrites
6790 (name "python-atomicwrites")
6794 (uri (pypi-uri "atomicwrites" version))
6797 "11bm90fwm2avvf4f3ib8g925w7jr4m11vcsinn1bi6ns4bm32214"))))
6798 (build-system python-build-system)
6799 (synopsis "Atomic file writes in Python")
6800 (description "Library for atomic file writes using platform dependent tools
6801 for atomic file system operations.")
6802 (home-page "https://github.com/untitaker/python-atomicwrites")
6803 (license license:expat)))
6805 (define-public python2-atomicwrites
6806 (package-with-python2 python-atomicwrites))
6808 (define-public python-click-threading
6810 (name "python-click-threading")
6814 (uri (pypi-uri "click-threading" version))
6817 "1rsxc2fbkxlhwhlmxsdjzq3spn284l6rvjfcz9mbb17ibgdgmc5j"))))
6818 (build-system python-build-system)
6820 `(("python-click" ,python-click)))
6821 (synopsis "Utilities for multithreading in Click")
6822 (description "This package provides utilities for multithreading in Click
6824 (home-page "https://github.com/click-contrib/click-threading")
6825 (license license:expat)))
6827 (define-public python-click-log
6829 (name "python-click-log")
6833 (uri (pypi-uri "click-log" version))
6836 "1r1x85023cslb2pwldd089jjk573mk3w78cnashs77wrx7yz8fj9"))))
6837 (build-system python-build-system)
6839 `(("python-click" ,python-click)))
6840 (synopsis "Logging for click applications")
6841 (description "This package provides a Python library for logging Click
6843 (home-page "https://github.com/click-contrib/click-log")
6844 (license license:expat)))
6846 (define-public python-apipkg
6848 (name "python-apipkg")
6852 (uri (pypi-uri "apipkg" version))
6855 "1iks5701qnp3dlr3q1d9qm68y2plp2m029irhpz92a44psfkjf1f"))))
6856 (build-system python-build-system)
6858 `(("python-pytest" ,python-pytest)))
6859 (synopsis "Namespace control and lazy-import mechanism")
6860 (description "With apipkg you can control the exported namespace of a Python
6861 package and greatly reduce the number of imports for your users. It is a small
6862 pure Python module that works on virtually all Python versions.")
6863 (home-page "https://bitbucket.org/hpk42/apipkg")
6864 (license license:expat)))
6866 (define-public python2-apipkg
6867 (package-with-python2 python-apipkg))
6869 (define-public python-execnet
6871 (name "python-execnet")
6875 (uri (pypi-uri "execnet" version))
6878 "1rpk1vyclhg911p3hql0m0nrpq7q7mysxnaaw6vs29cpa6kx8vgn"))))
6879 (build-system python-build-system)
6881 `(;; 2 failed, 275 passed, 670 skipped, 4 xfailed
6882 ;; The two test failures are caused by the lack of an `ssh` executable.
6883 ;; The test suite can be run with pytest after the 'install' phase.
6886 `(("python-pytest" ,python-pytest)
6887 ("python-setuptools-scm" ,python-setuptools-scm)))
6889 `(("python-apipkg" ,python-apipkg)))
6890 (synopsis "Rapid multi-Python deployment")
6891 (description "Execnet provides a share-nothing model with
6892 channel-send/receive communication for distributing execution across many
6893 Python interpreters across version, platform and network barriers. It has a
6894 minimal and fast API targeting the following uses:
6896 @item distribute tasks to (many) local or remote CPUs
6897 @item write and deploy hybrid multi-process applications
6898 @item write scripts to administer multiple environments
6900 (home-page "http://codespeak.net/execnet/")
6901 (license license:expat)))
6903 (define-public python2-execnet
6904 (package-with-python2 python-execnet))
6906 (define-public python-icalendar
6908 (name "python-icalendar")
6912 (uri (pypi-uri "icalendar" version))
6915 "0jfp93x2pnpsbck92zw22dq7sl4pk0avv0gnb4x9vldrg6vlhyin"))))
6916 (build-system python-build-system)
6918 `(("python-dateutil" ,python-dateutil)
6919 ("python-pytz" ,python-pytz)))
6920 (synopsis "Python library for parsing iCalendar files")
6921 (description "The icalendar package is a parser/generator of iCalendar
6922 files for use with Python.")
6923 (home-page "https://github.com/collective/icalendar")
6924 (license license:bsd-2)))
6926 (define-public python-sphinxcontrib-newsfeed
6928 (name "python-sphinxcontrib-newsfeed")
6932 (uri (pypi-uri "sphinxcontrib-newsfeed" version))
6935 "1d7gam3mn8v4in4p16yn3v10vps7nnaz6ilw99j4klij39dqd37p"))))
6936 (arguments '(#:tests? #f)) ; No tests.
6937 (build-system python-build-system)
6939 `(("python-sphinx" ,python-sphinx)))
6940 (synopsis "News Feed extension for Sphinx")
6941 (description "Sphinxcontrib-newsfeed is an extension for adding a simple
6942 Blog, News or Announcements section to a Sphinx website.")
6943 (home-page "https://bitbucket.org/prometheus/sphinxcontrib-newsfeed")
6944 (license license:bsd-2)))
6946 (define-public python-args
6948 (name "python-args")
6952 (uri (pypi-uri "args" version))
6955 "057qzi46h5dmxdqknsbrssn78lmqjlnm624iqdhrnpk26zcbi1d7"))))
6956 (build-system python-build-system)
6957 (home-page "https://github.com/kennethreitz/args")
6958 (synopsis "Command-line argument parser")
6960 "This library provides a Python module to parse command-line arguments.")
6961 (license license:bsd-3)))
6963 (define-public python2-args
6964 (package-with-python2 python-args))
6966 (define-public python-clint
6968 (name "python-clint")
6972 (uri (pypi-uri "clint" version))
6975 "1an5lkkqk1zha47198p42ji3m94xmzx1a03dn7866m87n4r4q8h5"))))
6976 (build-system python-build-system)
6979 (modify-phases %standard-phases
6982 (zero? (system* "py.test" "-v")))))))
6984 `(("python-pytest" ,python-pytest)))
6986 `(("python-args" ,python-args)))
6987 (home-page "https://github.com/kennethreitz/clint")
6988 (synopsis "Command-line interface tools")
6990 "Clint is a Python module filled with a set of tools for developing
6991 command-line applications, including tools for colored and indented
6992 output, progress bar display, and pipes.")
6993 (license license:isc)))
6995 (define-public python2-clint
6996 (package-with-python2 python-clint))
6998 (define-public python-astor
7000 (name "python-astor")
7004 (uri (pypi-uri "astor" version))
7007 "1fdafq5hkis1fxqlmhw0sn44zp2ar46nxhbc22cvwg7hsd8z5gsa"))))
7008 (build-system python-build-system)
7009 (home-page "https://github.com/berkerpeksag/astor")
7010 (synopsis "Read and write Python ASTs")
7012 "Astor is designed to allow easy manipulation of Python source via the
7013 Abstract Syntax Tree.")
7014 (license license:bsd-3)))
7016 (define-public python2-astor
7017 (package-with-python2 python-astor))
7019 (define-public python-rply
7021 (name "python-rply")
7025 (uri (pypi-uri "rply" version))
7028 "12rp1d9ba7nvd5rhaxi6xzx1rm67r1k1ylsrkzhpwnphqpb06cvj"))))
7029 (build-system python-build-system)
7031 `(("python-appdirs" ,python-appdirs)))
7032 (home-page "https://github.com/alex/rply")
7033 (synopsis "Parser generator for Python")
7035 "This package provides a pure Python based parser generator, that also
7036 works with RPython. It is a more-or-less direct port of David Bazzley's PLY,
7037 with a new public API, and RPython support.")
7038 (license license:bsd-3)))
7040 (define-public python2-rply
7041 (package-with-python2 python-rply))
7043 (define-public python-hy
7049 (uri (pypi-uri "hy" version))
7052 "19sfymaksx9jhksfnb15ahid46mzrhdfzz6yy2craz2qnzvpmky8"))))
7053 (build-system python-build-system)
7056 (modify-phases %standard-phases
7059 ;; Tests require write access to HOME.
7060 (setenv "HOME" "/tmp")
7061 (zero? (system* "nosetests")))))))
7063 `(("python-coverage" ,python-coverage)
7064 ("python-nose" ,python-nose)))
7066 `(("python-astor" ,python-astor)
7067 ("python-clint" ,python-clint)
7068 ("python-rply" ,python-rply)))
7069 (home-page "http://hylang.org/")
7070 (synopsis "Lisp frontend to Python")
7072 "Hy is a dialect of Lisp that's embedded in Python. Since Hy transforms
7073 its Lisp code into the Python Abstract Syntax Tree, you have the whole world of
7074 Python at your fingertips, in Lisp form.")
7075 (license license:expat)))
7077 (define-public python2-hy
7078 (package-with-python2 python-hy))
7080 (define-public python2-functools32
7082 (name "python2-functools32")
7087 (uri (pypi-uri "functools32" version))
7090 "0v8ya0b58x47wp216n1zamimv4iw57cxz3xxhzix52jkw3xks9gn"))))
7091 (build-system python-build-system)
7093 `(#:python ,python-2
7094 #:tests? #f)) ; no test target
7095 (home-page "https://github.com/MiCHiLU/python-functools32")
7097 "Backport of the functools module from Python 3.2.3")
7099 "This package is a backport of the @code{functools} module from Python
7100 3.2.3 for use with older versions of Python and PyPy.")
7101 (license license:expat)))
7103 (define-public python2-subprocess32
7105 (name "python2-subprocess32")
7109 (uri (pypi-uri "subprocess32" version))
7112 "14350dhhlhyz5gqzi3lihn9m6lvskx5mcb20srx1kgsk9i50li8y"))
7114 (search-patches "python2-subprocess32-disable-input-test.patch"))))
7115 (build-system python-build-system)
7117 `(#:python ,python-2
7119 (modify-phases %standard-phases
7120 (add-after 'unpack 'patch-/bin/sh
7122 (substitute* '("subprocess32.py"
7123 "test_subprocess32.py")
7124 (("/bin/sh") (which "sh")))
7127 (add-after 'install 'check
7128 (lambda* (#:key inputs outputs #:allow-other-keys)
7129 ;; For some reason this package fails to import
7130 ;; _posixsubprocess.so when PYTHONPATH is set to the build
7131 ;; directory. Running tests after install is easier.
7132 (add-installed-pythonpath inputs outputs)
7133 (zero? (system* "python" "test_subprocess32.py")))))))
7134 (home-page "https://github.com/google/python-subprocess32")
7135 (synopsis "Backport of the subprocess module from Python 3.2")
7137 "This is a backport of the @code{subprocess} standard library module
7138 from Python 3.2 and 3.3 for use on Python 2. It includes bugfixes and some
7139 new features. On POSIX systems it is guaranteed to be reliable when used
7140 in threaded applications. It includes timeout support from Python 3.3 but
7141 otherwise matches 3.2’s API.")
7142 (license license:psfl)))
7144 (define-public python2-futures
7146 (name "python2-futures")
7151 (uri (pypi-uri "futures" version))
7154 "1pw1z4329xvlabdpwqa6b7v2fxf7hl64m4cgr22ckbym8m8m4hh5"))))
7155 (build-system python-build-system)
7156 (arguments `(#:python ,python-2))
7157 (home-page "https://github.com/agronholm/pythonfutures")
7159 "Backport of the concurrent.futures package from Python 3.2")
7161 "The concurrent.futures module provides a high-level interface for
7162 asynchronously executing callables. This package backports the
7163 concurrent.futures package from Python 3.2")
7164 (license license:bsd-3)))
7166 (define-public python-promise
7168 (name "python-promise")
7173 (uri (pypi-uri "promise" version))
7176 "1k19ms8l3d5jzjh557rgkxb5sg4mqgfc315rn4hx1z3n8qq6lr3h"))))
7177 (build-system python-build-system)
7178 ;; Tests wants python-futures, which is a python2 only program, and
7179 ;; can't be found by python-promise at test time.
7180 (arguments `(#:tests? #f))
7181 (home-page "https://github.com/syrusakbary/promise")
7182 (synopsis "Promises/A+ implementation for Python")
7184 "Promises/A+ implementation for Python")
7185 (properties `((python2-variant . ,(delay python2-promise))))
7186 (license license:expat)))
7188 (define-public python2-promise
7189 (let ((promise (package-with-python2
7190 (strip-python2-variant python-promise))))
7191 (package (inherit promise)
7192 (arguments (substitute-keyword-arguments (package-arguments promise)
7195 `(("python2-futures" ,python2-futures)
7196 ("python2-pytest" ,python2-pytest)
7197 ,@(package-native-inputs promise))))))
7199 (define-public python-colorama
7201 (name "python-colorama")
7206 (uri (pypi-uri "colorama" version))
7209 "0avqkn6362v7k2kg3afb35g4sfdvixjgy890clip4q174p9whhz0"))))
7210 (build-system python-build-system)
7211 (synopsis "Colored terminal text rendering for Python")
7212 (description "Colorama is a Python library for rendering colored terminal
7214 (home-page "https://pypi.python.org/pypi/colorama")
7215 (license license:bsd-3)))
7217 (define-public python2-colorama
7218 (package-with-python2 python-colorama))
7220 (define-public python-rsa
7227 (uri (pypi-uri "rsa" version))
7230 "1dcxvszbikgzh99ybdc7jq0zb9wspy2ds8z9mjsqiyv3q884xpr5"))))
7231 (build-system python-build-system)
7233 `(("python-pyasn1" ,python-pyasn1)))
7234 (synopsis "Pure-Python RSA implementation")
7235 (description "Python-RSA is a pure-Python RSA implementation. It supports
7236 encryption and decryption, signing and verifying signatures, and key
7237 generation according to PKCS#1 version 1.5. It can be used as a Python
7238 library as well as on the command line.")
7239 (home-page "https://stuvel.eu/rsa")
7240 (license license:asl2.0)))
7242 (define-public python2-rsa
7243 (package-with-python2 python-rsa))
7245 (define-public python-pluggy
7247 (name "python-pluggy")
7252 (uri (pypi-uri "pluggy" version))
7255 "18qfzfm40bgx672lkg8q9x5hdh76n7vax99aank7vh2nw21wg70m"))))
7256 (build-system python-build-system)
7257 (synopsis "Plugin and hook calling mechanism for Python")
7258 (description "Pluggy is an extraction of the plugin manager as used by
7259 Pytest but stripped of Pytest specific details.")
7260 (home-page "https://pypi.python.org/pypi/pluggy")
7261 (license license:expat)))
7263 (define-public python2-pluggy
7264 (package-with-python2 python-pluggy))
7266 (define-public python-tox
7273 (uri (pypi-uri "tox" version))
7276 "1drp6mwm8wdypjym15ia8lwjxbhcksb9vzxg4ay5dh4ji57by2ny"))))
7277 (build-system python-build-system)
7279 ;; FIXME: Tests require pytest-timeout, which itself requires
7280 ;; pytest>=2.8.0 for installation.
7283 `(("python-pluggy" ,python-pluggy) ; >=0.3.0,<0.4.0
7284 ("python-py" ,python-py)
7285 ("python-virtualenv" ,python-virtualenv)))
7287 `(; FIXME: Missing: ("python-pytest-timeout" ,python-pytest-timeout)
7288 ("python-pytest" ,python-pytest) ; >= 2.3.5
7289 ("python-setuptools-scm" ,python-setuptools-scm)))
7290 (home-page "http://tox.testrun.org/")
7291 (synopsis "Virtualenv-based automation of test activities")
7292 (description "Tox is a generic virtualenv management and test command line
7293 tool. It can be used to check that a package installs correctly with
7294 different Python versions and interpreters, or run tests in each type of
7295 supported environment, or act as a frontend to continuous integration
7297 (license license:expat)))
7299 (define-public python2-tox
7300 (package-with-python2 python-tox))
7302 (define-public python-jmespath
7304 (name "python-jmespath")
7309 (uri (pypi-uri "jmespath" version))
7312 "0g9xvl69y7nr3w7ag4fsp6sm4fqf6vrqjw7504x2hzrrsh3ampq8"))))
7313 (build-system python-build-system)
7315 `(("python-nose" ,python-nose)))
7316 (synopsis "JSON Matching Expressions")
7317 (description "JMESPath (pronounced “james path”) is a Python library that
7318 allows one to declaratively specify how to extract elements from a JSON
7320 (home-page "https://github.com/jmespath/jmespath.py")
7321 (license license:expat)))
7323 (define-public python2-jmespath
7324 (package-with-python2 python-jmespath))
7326 (define-public python-botocore
7328 (name "python-botocore")
7333 (uri (pypi-uri "botocore" version))
7336 "02b1bw25r1wdjs5yppb1h9igf11wj092biriv2yg8hzp5r0wrkmg"))))
7337 (build-system python-build-system)
7339 ;; FIXME: Many tests are failing.
7342 `(("python-dateutil" ,python-dateutil)
7343 ("python-docutils" ,python-docutils)
7344 ("python-jmespath" ,python-jmespath)))
7346 `(("python-mock" ,python-mock)
7347 ("python-nose" ,python-nose)
7349 ("python-tox" ,python-tox)
7350 ("python-wheel" ,python-wheel)))
7351 (home-page "https://github.com/boto/botocore")
7352 (synopsis "Low-level interface to AWS")
7353 (description "Botocore is a Python library that provides a low-level
7354 interface to the Amazon Web Services (AWS) API.")
7355 (license license:asl2.0)))
7357 (define-public python2-botocore
7358 (package-with-python2 python-botocore))
7360 (define-public python-xdo
7367 "http://http.debian.net/debian/pool/main/p/python-xdo/"
7368 "python-xdo_" version ".orig.tar.gz"))
7371 "1vqh1n5yy5dhnq312kwrl90fnck4v26is3lq3lxdvcn60vv19da0"))))
7372 (build-system python-build-system)
7375 (modify-phases %standard-phases
7376 (add-before 'install 'patch-libxdo-path
7377 ;; Hardcode the path of dynamically loaded libxdo library.
7378 (lambda* (#:key inputs #:allow-other-keys)
7379 (let ((libxdo (string-append
7380 (assoc-ref inputs "xdotool")
7382 (substitute* "xdo/_xdo.py"
7383 (("find_library\\(\"xdo\"\\)")
7384 (simple-format #f "\"~a\"" libxdo)))
7386 #:tests? #f)) ; no tests provided
7388 `(("python-six" ,python-six)))
7390 `(("xdotool" ,xdotool)
7391 ("libX11" ,libx11)))
7392 (home-page "https://tracker.debian.org/pkg/python-xdo")
7393 (synopsis "Python library for simulating X11 keyboard/mouse input")
7394 (description "Provides bindings to libxdo for manipulating X11 via simulated
7395 input. (Note that this is mostly a legacy library; you may wish to look at
7396 python-xdo for newer bindings.)")
7397 (license license:bsd-3)))
7399 (define-public python2-xdo
7400 (package-with-python2 python-xdo))
7402 (define-public python-mako
7404 (name "python-mako")
7409 (uri (pypi-uri "Mako" version))
7412 "03dyxgjknp4ffsv7vwfd28l5bbpzi0ylp20543wpg3iahyyrwma8"))))
7413 (build-system python-build-system)
7415 `(("python-markupsafe" ,python-markupsafe)))
7417 `(("python-mock" ,python-mock)
7418 ("python-nose" ,python-nose)
7419 ("python-pytest" ,python-pytest)))
7420 (home-page "http://www.makotemplates.org/")
7421 (synopsis "Templating language for Python")
7422 (description "Mako is a templating language for Python that compiles
7423 templates into Python modules.")
7424 (license license:expat)))
7426 (define-public python2-mako
7427 (package-with-python2 python-mako))
7429 (define-public python-waitress
7431 (name "python-waitress")
7436 (uri (pypi-uri "waitress" version))
7439 "017n9ra6vvmq9d5sfhdzyzr1mg15x2hj2dhm4pdlw98c1ypw2h3w"))))
7440 (build-system python-build-system)
7441 (home-page "https://github.com/Pylons/waitress")
7442 (synopsis "Waitress WSGI server")
7443 (description "Waitress is meant to be a production-quality pure-Python WSGI
7444 server with very acceptable performance.")
7445 (license license:zpl2.1)))
7447 (define-public python2-waitress
7448 (package-with-python2 python-waitress))
7450 (define-public python-pyquery
7452 (name "python-pyquery")
7457 (uri (pypi-uri "pyquery" version))
7460 "1xia20wm0vx5dk85kcwgh13bylz8qh47ffjxssd2586r60xi783a"))))
7461 (build-system python-build-system)
7463 `(("python-webob" ,python-webob)
7464 ("python-webtest" ,python-webtest)))
7466 `(("python-lxml" ,python-lxml)
7467 ("python-cssselect" ,python-cssselect)))
7468 (home-page "https://github.com/gawel/pyquery")
7469 (synopsis "Make jQuery-like queries on xml documents")
7470 (description "pyquery allows you to make jQuery queries on xml documents.
7471 The API is as much as possible the similar to jQuery. pyquery uses lxml for
7472 fast xml and html manipulation.")
7473 (license license:bsd-3)))
7475 (define-public python2-pyquery
7476 (package-with-python2 python-pyquery))
7478 (define-public python-anyjson
7480 (name "python-anyjson")
7485 (uri (pypi-uri "anyjson" version))
7488 "1fjph4alvcscsl5d4b6qpv1yh31jy05jxi1l0xff7lws7j32v09p"))))
7489 (build-system python-build-system)
7491 `(;; We could possibly get tests working, but on Python 3 it's not so easy.
7492 ;; Very strangely, 2to3 is run *during setup.py install* (or bdist, or
7493 ;; whatever) so this transformation needs to be done before the tests
7494 ;; can be run. Maybe we could add a build step to transform beforehand
7495 ;; but it could be annoying/difficult.
7496 ;; We can enable tests for the Python 2 version, though, and do below.
7498 (home-page "https://bitbucket.org/runeh/anyjson/")
7500 "Wraps best available JSON implementation in a common interface")
7502 "Anyjson loads whichever is the fastest JSON module installed
7503 and provides a uniform API regardless of which JSON implementation is used.")
7504 (license license:bsd-3)
7505 (properties `((python2-variant . ,(delay python2-anyjson))))))
7507 (define-public python2-anyjson
7508 (let ((anyjson (package-with-python2
7509 (strip-python2-variant python-anyjson))))
7512 (arguments `(;; Unlike the python 3 variant, we do run tests. See above!
7514 ,@(package-arguments anyjson)))
7515 (native-inputs `(("python2-nose" ,python2-nose))))))
7517 (define-public python-amqp
7519 (name "python-amqp")
7524 (uri (pypi-uri "amqp" version))
7527 "06n6q0kxhjnbfz3vn8x9yz09lwmn1xi9d6wxp31h5jbks0b4vsid"))))
7528 (build-system python-build-system)
7530 `(("python-nose" ,python-nose)
7531 ("python-mock" ,python-mock)))
7532 (home-page "https://github.com/celery/py-amqp")
7534 "Low-level AMQP client for Python (fork of amqplib)")
7536 "This is a fork of amqplib which was originally written by Barry Pederson.
7537 It is maintained by the Celery project, and used by kombu as a pure python
7538 alternative when librabbitmq is not available.")
7539 (license license:lgpl2.1+)
7540 (properties `((python2-variant . ,(delay python2-amqp))))))
7542 (define-public python2-amqp
7543 (let ((amqp (package-with-python2
7544 (strip-python2-variant python-amqp))))
7547 (arguments `(;; Tries to run coverage tests with nose-cover3, which seems
7548 ;; unmaintained. Weirdly, does not do this on the python 3
7551 ,@(package-arguments amqp))))))
7553 (define-public python-kombu
7555 (name "python-kombu")
7560 (uri (pypi-uri "kombu" version))
7563 "0l16chb314gpq2v7fh94a22c30lcv6w3ylmhsa60bldlcq6a0r70"))))
7564 (build-system python-build-system)
7566 `(("python-mock" ,python-mock)
7567 ("python-nose" ,python-nose)))
7569 `(("python-anyjson" ,python-anyjson)
7570 ("python-amqp" ,python-amqp)
7571 ("python-redis" ,python-redis)))
7572 (home-page "http://kombu.readthedocs.org")
7573 (synopsis "Message passing library for Python")
7574 (description "The aim of Kombu is to make messaging in Python as easy as
7575 possible by providing an idiomatic high-level interface for the AMQ protocol,
7576 and also provide proven and tested solutions to common messaging problems.
7577 AMQP is the Advanced Message Queuing Protocol, an open standard protocol for
7578 message orientation, queuing, routing, reliability and security, for which the
7579 RabbitMQ messaging server is the most popular implementation.")
7580 (license license:bsd-3)
7581 (properties `((python2-variant . ,(delay python2-kombu))))))
7583 (define-public python2-kombu
7584 (let ((kombu (package-with-python2
7585 (strip-python2-variant python-kombu))))
7588 (arguments `(;; FIXME: 'TestTransport.test_del_sync' fails on python2.
7589 ;; It works fine on the python3 variant.
7591 ,@(package-arguments kombu)))
7592 (native-inputs `(("python2-unittest2" ,python2-unittest2)
7593 ,@(package-native-inputs kombu))))))
7595 (define-public python-billiard
7597 (name "python-billiard")
7598 (version "3.3.0.23")
7602 (uri (pypi-uri "billiard" version))
7605 "02wxsc6bhqvzh8j6w758kvgqbnj14l796mvmrcms8fgfamd2lak9"))))
7606 (build-system python-build-system)
7608 `(("python-nose" ,python-nose)))
7609 (home-page "https://github.com/celery/billiard")
7611 "Python multiprocessing fork with improvements and bugfixes")
7613 "Billiard is a fork of the Python 2.7 multiprocessing package. The
7614 multiprocessing package itself is a renamed and updated version of R Oudkerk's
7615 pyprocessing package. This standalone variant is intended to be compatible with
7616 Python 2.4 and 2.5, and will draw its fixes/improvements from python-trunk.")
7617 (license license:bsd-3)
7618 (properties `((python2-variant . ,(delay python2-billiard))))))
7620 (define-public python2-billiard
7621 (let ((billiard (package-with-python2
7622 (strip-python2-variant python-billiard))))
7625 (native-inputs `(("python2-unittest2" ,python2-unittest2)
7626 ("python2-mock" ,python2-mock)
7627 ,@(package-native-inputs billiard))))))
7629 (define-public python-celery
7631 (name "python-celery")
7636 (uri (pypi-uri "celery" version))
7639 "0yh2prhdnx2dgkb67a5drj12hh2zvzx5f611p7mqqg01ydghif4r"))))
7640 (build-system python-build-system)
7643 (modify-phases %standard-phases
7644 ;; These tests break with Python 3.5:
7645 ;; https://github.com/celery/celery/issues/2897#issuecomment-253066295
7649 (system* "nosetests" "--exclude=^test_safe_to_remove.*")))))))
7651 `(("python-nose" ,python-nose)))
7653 `(("python-pytz" ,python-pytz)
7654 ("python-billiard" ,python-billiard)
7655 ("python-kombu" ,python-kombu)))
7656 (home-page "http://celeryproject.org")
7657 (synopsis "Distributed Task Queue")
7658 (description "Celery is an asynchronous task queue/job queue based on
7659 distributed message passing. It is focused on real-time operation, but
7660 supports scheduling as well. The execution units, called tasks, are executed
7661 concurrently on a single or more worker servers using multiprocessing,
7662 Eventlet, or gevent. Tasks can execute asynchronously (in the background) or
7663 synchronously (wait until ready).")
7664 (license license:bsd-3)
7665 (properties `((python2-variant . ,(delay python2-celery))))))
7667 (define-public python2-celery
7668 (let ((celery (package-with-python2
7669 (strip-python2-variant python-celery))))
7672 (native-inputs `(("python2-unittest2" ,python2-unittest2)
7673 ("python2-mock" ,python2-mock)
7674 ,@(package-native-inputs celery))))))
7676 (define-public python-translitcodec
7678 (name "python-translitcodec")
7683 (uri (pypi-uri "translitcodec" version))
7686 "10x6pvblkzky1zhjs8nmx64nb9jdzxad4bxhq4iwv0j4z2aqjnki"))))
7687 (build-system python-build-system)
7689 `(#:tests? #f)) ; no tests provided
7691 "https://github.com/claudep/translitcodec")
7693 "Unicode to 8-bit charset transliteration codec")
7695 "This package contains codecs for transliterating ISO 10646 texts into
7696 best-effort representations using smaller coded character sets (ASCII,
7698 (license license:expat)))
7700 (define-public python2-translitcodec
7701 (package-with-python2 python-translitcodec))
7703 (define-public python-editor
7705 (name "python-editor")
7710 (uri (pypi-uri "python-editor" version))
7713 "1ypnpgvzpkbwsg4rdvy4sy51j28b5xq9v8pnkwxncn07vqz06p7n"))))
7714 (build-system python-build-system)
7716 "https://github.com/fmoo/python-editor")
7718 "Programmatically open an editor, capture the result")
7720 "python-editor is a library that provides the editor module for
7721 programmatically interfacing with your system's $EDITOR.")
7722 (license license:asl2.0)))
7724 (define-public python2-editor
7725 (package-with-python2 python-editor))
7727 (define-public python-sphinxcontrib-programoutput
7729 (name "python-sphinxcontrib-programoutput")
7733 (uri (pypi-uri "sphinxcontrib-programoutput" version))
7736 "153hhnlbx4688zj9wd64819ps5znc2jlyp5crkgzvn5hxgy99vpx"))))
7737 (build-system python-build-system)
7739 ;; FIXME: Many tests are failing and the upstream is gone.
7742 `(("python-sphinx" ,python-sphinx)))
7743 (synopsis "Sphinx extension to include program output")
7744 (description "A Sphinx extension to literally insert the output of arbitrary
7745 commands into documents, helping you to keep your command examples up to date.")
7746 (home-page "https://github.com/lunaryorn/sphinxcontrib-programoutput")
7747 (license license:bsd-2)))
7749 (define-public python2-sphinxcontrib-programoutput
7750 (package-with-python2 python-sphinxcontrib-programoutput))
7752 (define-public python-sphinx-repoze-autointerface
7754 (name "python-sphinx-repoze-autointerface")
7758 (uri (pypi-uri "repoze.sphinx.autointerface" version))
7761 "08ycivzf7bh4a1zcyp31hbyqs1b2c9r26raa3vxjwwmbfqr3iw4f"))))
7762 (build-system python-build-system)
7763 (arguments '(#:tests? #f)) ; No tests.
7765 `(("python-sphinx" ,python-sphinx)
7766 ("python-zope-interface" ,python-zope-interface)))
7767 (synopsis "Auto-generate Sphinx API docs from Zope interfaces")
7768 (description "This package defines an extension for the Sphinx documentation
7769 system. The extension allows generation of API documentation by
7770 introspection of @code{zope.interface} instances in code.")
7771 (home-page "https://github.com/repoze/repoze.sphinx.autointerface")
7772 (license license:repoze)))
7774 (define-public python2-sphinx-repoze-autointerface
7775 (package-with-python2 python-sphinx-repoze-autointerface))
7777 (define-public python-vobject
7779 (name "python-vobject")
7783 (uri (pypi-uri "vobject" version))
7786 "0hqjgf3ay1m5w1c0k00g5yfpdz1zni5qnr5rh9b8fg9hjvhwlmhg"))))
7787 (build-system python-build-system)
7789 '(;; The test suite relies on some non-portable Windows interfaces.
7792 `(("python-dateutil" ,python-dateutil)
7793 ("python-pyicu" ,python-pyicu)))
7794 (synopsis "Parse and generate vCard and vCalendar files")
7795 (description "Vobject is intended to be a full featured Python package for
7796 parsing and generating vCard and vCalendar files. Currently, iCalendar files
7797 are supported and well tested. vCard 3.0 files are supported, and all data
7798 should be imported, but only a few components are understood in a sophisticated
7800 (home-page "http://eventable.github.io/vobject/")
7801 (license license:asl2.0)))
7803 (define-public python2-vobject
7804 (package-with-python2 python-vobject))
7806 (define-public python-munkres
7808 (name "python-munkres")
7812 (uri (pypi-uri "munkres" version))
7815 "0mbspx4zv8id4x6pim6ybsa1xh96qwpbqj7skbqz4c9c9nf1lpqq"))))
7816 (build-system python-build-system)
7818 '(#:tests? #f)) ; no test suite
7819 (home-page "http://software.clapper.org/munkres/")
7820 (synopsis "Implementation of the Munkres algorithm")
7821 (description "The Munkres module provides an implementation of the Munkres
7822 algorithm (also called the Hungarian algorithm or the Kuhn-Munkres algorithm),
7823 useful for solving the Assignment Problem.")
7824 (license license:bsd-3)))
7826 (define-public python2-munkres
7827 (package-with-python2 python-munkres))
7829 (define-public python-whoosh
7831 (name "python-whoosh")
7836 (uri (pypi-uri "Whoosh" version))
7839 "10qsqdjpbc85fykc1vgcs8xwbgn4l2l52c8d83xf1q59pwyn79bw"))))
7840 (build-system python-build-system)
7842 `(("python-pytest" ,python-pytest)))
7843 (home-page "https://bitbucket.org/mchaput/whoosh")
7844 (synopsis "Full text indexing, search, and spell checking library")
7846 "Whoosh is a fast, pure-Python full text indexing, search, and spell
7848 (license license:bsd-2)))
7850 (define-public python2-whoosh
7851 (let ((whoosh (package-with-python2 (strip-python2-variant python-whoosh))))
7852 (package (inherit whoosh)
7854 `(("python2-backport-ssl-match-hostname"
7855 ,python2-backport-ssl-match-hostname)
7856 ,@(package-propagated-inputs whoosh))))))
7858 (define-public python-pathlib
7860 (name "python-pathlib")
7864 (uri (pypi-uri "pathlib" version))
7867 "17zajiw4mjbkkv6ahp3xf025qglkj0805m9s41c45zryzj6p2h39"))))
7868 (build-system python-build-system)
7869 ;; The tests depend on the internal "test" module, which does not provide
7870 ;; a stable interface.
7871 (arguments `(#:tests? #f))
7872 (home-page "https://pathlib.readthedocs.org/")
7873 (synopsis "Object-oriented file system paths")
7874 (description "Pathlib offers a set of classes to handle file system paths.
7875 It offers the following advantages over using string objects:
7878 @item No more cumbersome use of os and os.path functions. Everything can
7879 be done easily through operators, attribute accesses, and method calls.
7880 @item Embodies the semantics of different path types. For example,
7881 comparing Windows paths ignores casing.
7882 @item Well-defined semantics, eliminating any inconsistencies or
7883 ambiguities (forward vs. backward slashes, etc.).
7886 Note: In Python 3.4, pathlib is now part of the standard library. For other
7887 Python versions please consider python-pathlib2 instead, which tracks the
7888 standard library module. This module (python-pathlib) isn't maintained
7890 (license license:expat)))
7892 (define-public python2-pathlib
7893 (package-with-python2 python-pathlib))
7895 (define-public python2-pathlib2
7897 (name "python2-pathlib2")
7901 (uri (pypi-uri "pathlib2" version))
7904 "0p050msg5c8d0kadv702jnfshaxrb0il765cpkgnhn6mq5hakcyy"))))
7905 (build-system python-build-system)
7906 ;; We only need the the Python 2 variant, since for Python 3 our minimum
7907 ;; version is 3.4 which already includes this package as part of the
7908 ;; standard library.
7910 `(#:python ,python-2))
7912 `(("python2-six" ,python2-six)))
7913 (home-page "https://pypi.python.org/pypi/pathlib2/")
7914 (synopsis "Object-oriented file system paths - backport of standard
7916 (description "The goal of pathlib2 is to provide a backport of standard
7917 pathlib module which tracks the standard library module, so all the newest
7918 features of the standard pathlib can be used also on older Python versions.
7920 Pathlib offers a set of classes to handle file system paths. It offers the
7921 following advantages over using string objects:
7924 @item No more cumbersome use of os and os.path functions. Everything can
7925 be done easily through operators, attribute accesses, and method calls.
7926 @item Embodies the semantics of different path types. For example,
7927 comparing Windows paths ignores casing.
7928 @item Well-defined semantics, eliminating any inconsistencies or
7929 ambiguities (forward vs. backward slashes, etc.).
7931 (license license:expat)))
7933 (define-public python-jellyfish
7935 (name "python-jellyfish")
7939 (uri (pypi-uri "jellyfish" version))
7942 "1j9rplb16ba2prjj6mip46z0w9pnhnqpwgiwi0x93vnas14rlyl8"))))
7943 (build-system python-build-system)
7945 `(("python-pytest" ,python-pytest)))
7946 (home-page "https://github.com/jamesturk/jellyfish")
7947 (synopsis "Approximate and phonetic matching of strings")
7948 (description "Jellyfish uses a variety of string comparison and phonetic
7949 encoding algorithms to do fuzzy string matching.")
7950 (license license:bsd-2)
7951 (properties `((python2-variant . ,(delay python2-jellyfish))))))
7953 (define-public python2-jellyfish
7954 (let ((jellyfish (package-with-python2
7955 (strip-python2-variant python-jellyfish))))
7956 (package (inherit jellyfish)
7957 (native-inputs `(("python2-unicodecsv" ,python2-unicodecsv)
7958 ,@(package-native-inputs jellyfish))))))
7960 (define-public python2-unicodecsv
7962 (name "python2-unicodecsv")
7966 ;; The test suite is not included in the PyPi release.
7967 ;; https://github.com/jdunck/python-unicodecsv/issues/19
7968 (uri (string-append "https://github.com/jdunck/python-unicodecsv/"
7969 "archive/" version ".tar.gz"))
7970 (file-name (string-append name "-" version ".tar.gz"))
7973 "087nqanfcyp6mlfbbr5lva5f3w6iz1bybls9xlrb8icmc474wh4w"))))
7974 (build-system python-build-system)
7976 `(;; It supports Python 3, but Python 3 can already do Unicode CSV.
7977 #:python ,python-2))
7979 `(("python2-unittest2" ,python2-unittest2)))
7980 (home-page "https://github.com/jdunck/python-unicodecsv")
7981 (synopsis "Unicode CSV module for Python 2")
7982 (description "Unicodecsv is a drop-in replacement for Python 2.7's CSV
7983 module, adding support for Unicode strings.")
7984 (license license:bsd-2)))
7986 (define-public python-rarfile
7988 (name "python-rarfile")
7992 (uri (pypi-uri "rarfile" version))
7995 "0qfad483kcbga0bn4qmcz953xjk16r52fahiy46zzn56v80y89ra"))))
7996 (build-system python-build-system)
7999 (modify-phases %standard-phases
8001 ;; Many tests fail, but the installation proceeds.
8002 (lambda _ (zero? (system* "make" "-C" "test" "test")))))))
8004 `(("which" ,which))) ; required for tests
8006 `(("libarchive" ,libarchive)))
8007 (home-page "https://github.com/markokr/rarfile")
8008 (synopsis "RAR archive reader for Python")
8009 (description "This is Python module for RAR archive reading. The interface
8010 is made as zipfile like as possible.")
8011 (license license:isc)))
8013 (define-public python2-rarfile
8014 (package-with-python2 python-rarfile))
8016 (define-public python-magic
8018 (name "python-magic")
8023 (uri (string-append "https://github.com/ahupp/python-magic/archive/"
8027 "17bgy92i7sb021f2s4mw1dcvpm6p1mi9jihridwy1pyn8mzvpjgk"))
8028 (file-name (string-append name "-" version "-checkout"))))
8029 (build-system python-build-system)
8031 ;; The tests are unreliable, so don't run them. The tests fail
8032 ;; under Python3 because they were written for Python2 and
8033 ;; contain import statements that do not work in Python3. One of
8034 ;; the tests fails under Python2 because its assertions are
8035 ;; overly stringent; it relies on comparing output strings which
8036 ;; are brittle and can change depending on the version of
8037 ;; libmagic being used and the system on which the test is
8038 ;; running. In my case, under GuixSD 0.10.0, only one test
8039 ;; failed, and it seems to have failed only because the version
8040 ;; of libmagic that is packaged in Guix outputs a slightly
8041 ;; different (but not wrong) string than the one that the test
8044 #:phases (modify-phases %standard-phases
8045 ;; Replace a specific method call with a hard-coded
8046 ;; path to the necessary libmagic.so file in the
8047 ;; store. If we don't do this, then the method call
8048 ;; will fail to find the libmagic.so file, which in
8049 ;; turn will cause any application using
8050 ;; python-magic to fail.
8051 (add-before 'build 'hard-code-path-to-libmagic
8052 (lambda* (#:key inputs #:allow-other-keys)
8053 (let ((file (assoc-ref inputs "file")))
8054 (substitute* "magic.py"
8055 (("ctypes.util.find_library\\('magic'\\)")
8056 (string-append "'" file "/lib/libmagic.so'")))
8058 (add-before 'install 'disable-egg-compression
8060 (let ((port (open-file "setup.cfg" "a")))
8061 (display "\n[easy_install]\nzip_ok = 0\n"
8066 ;; python-magic needs to be able to find libmagic.so.
8068 (home-page "https://github.com/ahupp/python-magic")
8069 (synopsis "File type identification using libmagic")
8071 "This module uses ctypes to access the libmagic file type
8072 identification library. It makes use of the local magic database and
8073 supports both textual and MIME-type output. Note that this module and
8074 the python-file module both provide a \"magic.py\" file; these two
8075 modules, which are different and were developed separately, both serve
8076 the same purpose: to provide Python bindings for libmagic.")
8077 (license license:expat)))
8079 (define-public python2-magic
8080 (package-with-python2 python-magic))
8082 (define-public python2-s3cmd
8084 (name "python2-s3cmd")
8089 (uri (string-append "mirror://sourceforge/s3tools/s3cmd/" version "/"
8090 "s3cmd-" version ".tar.gz"))
8093 "0ki1rzhm5icvi9ry5jswi4b22yqwyj0d2wsqsgilwx6qhi7pjxa6"))))
8094 (build-system python-build-system)
8096 ;; s3cmd is written for python2 only and contains no tests.
8097 `(#:python ,python-2
8100 `(("python2-dateutil" ,python2-dateutil)
8101 ;; The python-file package also provides a magic.py module.
8102 ;; This is an unfortunate state of affairs; however, s3cmd
8103 ;; fails to install if it cannot find specifically the
8104 ;; python-magic package. Thus we include it, instead of using
8105 ;; python-file. Ironically, s3cmd sometimes works better
8106 ;; without libmagic bindings at all:
8107 ;; https://github.com/s3tools/s3cmd/issues/198
8108 ("python2-magic" ,python2-magic)))
8109 (home-page "http://s3tools.org/s3cmd")
8110 (synopsis "Command line tool for S3-compatible storage services")
8112 "S3cmd is a command line tool for uploading, retrieving and managing data
8113 in storage services that are compatible with the Amazon Simple Storage
8114 Service (S3) protocol, including S3 itself. It supports rsync-like backup,
8115 GnuPG encryption, and more. It also supports management of Amazon's
8116 CloudFront content delivery network.")
8117 (license license:gpl2+)))
8119 (define-public python-pkgconfig
8121 (name "python-pkgconfig")
8126 (uri (pypi-uri "pkgconfig" version))
8129 "1pw0kmvc57sjmaxi6c54fqsnihqj6hvhc9y1vaz36axafzqam7bh"))))
8130 (build-system python-build-system)
8132 `(("python-nose" ,python-nose)))
8134 `(("pkg-config" ,pkg-config)))
8136 `(;; Tests fail with "ValueError: _type_ 'v' not supported" on Python 3,
8137 ;; and on Python 2 they need the dl module deprecated since Python 2.6.
8139 ;; Hard-code the path to pkg-config.
8141 (modify-phases %standard-phases
8145 (substitute* "pkgconfig/pkgconfig.py"
8146 (("cmd = 'pkg-config")
8147 (string-append "cmd = '" (which "pkg-config"))))
8149 (home-page "https://github.com/matze/pkgconfig")
8150 (synopsis "Python interface for pkg-config")
8151 (description "This module provides a Python interface to pkg-config. It
8152 can be used to find all pkg-config packages, check if a package exists,
8153 check if a package meets certain version requirements, query CFLAGS and
8154 LDFLAGS and parse the output to build extensions with setup.py.")
8155 (license license:expat)))
8157 (define-public python2-pkgconfig
8158 (package-with-python2 python-pkgconfig))
8160 (define-public python-bz2file
8162 (name "python-bz2file")
8167 (uri (pypi-uri "bz2file" version))
8170 "126s53fkpx04f33a829yqqk8fj4png3qwg4m66cvlmhmwc8zihb4"))))
8171 (build-system python-build-system)
8173 `(#:tests? #f)) ; Tests use deprecated python modules.
8174 (home-page "https://github.com/nvawda/bz2file")
8175 (synopsis "Read and write bzip2-compressed files")
8177 "Bz2file is a Python library for reading and writing bzip2-compressed
8178 files. It contains a drop-in replacement for the I/O interface in the
8179 standard library's @code{bz2} module, including features from the latest
8180 development version of CPython that are not available in older releases.")
8181 (license license:asl2.0)
8182 (properties `((python2-variant . ,(delay python2-bz2file))))))
8184 (define-public python2-bz2file
8185 (let ((base (package-with-python2
8186 (strip-python2-variant python-bz2file))))
8190 `(#:python ,python-2
8192 (modify-phases %standard-phases
8193 ;; 'python setup.py test' does not work as of 0.98.
8194 ;; There is only the one test file, so we run it directly.
8196 (lambda _ (zero? (system* "python"
8197 "test_bz2file.py"))))))))))
8199 (define-public python-future
8201 (name "python-future")
8206 (uri (pypi-uri "future" version))
8209 "1nzy1k4m9966sikp0qka7lirh8sqrsyainyf8rk97db7nwdfv773"))))
8210 (build-system python-build-system)
8211 ;; Many tests connect to the network or are otherwise flawed.
8212 ;; https://github.com/PythonCharmers/python-future/issues/210
8215 (home-page "http://python-future.org")
8216 (synopsis "Single-source support for Python 3 and 2")
8218 "@code{python-future} is the missing compatibility layer between Python 2 and
8219 Python 3. It allows you to use a single, clean Python 3.x-compatible codebase
8220 to support both Python 2 and Python 3 with minimal overhead.")
8221 (license license:expat)))
8223 (define-public python2-future
8224 (package-with-python2 python-future))
8226 (define-public python-cysignals
8228 (name "python-cysignals")
8233 (uri (pypi-uri "cysignals" version ".tar.bz2"))
8236 "14cbyd9znlz6cxy1s3g6v6dv5jj45hn27pywkidd9b1zanaysqc6"))))
8237 (build-system python-build-system)
8239 `(("python-cython" ,python-cython)
8240 ("python-sphinx" ,python-sphinx)))
8242 `(("pari-gp" ,pari-gp)))
8244 `(#:modules ((guix build python-build-system)
8245 ((guix build gnu-build-system) #:prefix gnu:)
8247 ;; FIXME: Tests are executed after installation and currently fail
8248 ;; when not installing into standard locations; the author is working
8252 (modify-phases %standard-phases
8255 (assoc-ref gnu:%standard-phases 'configure)))))
8257 "https://github.com/sagemath/cysignals")
8259 "Handling of interrupts and signals for Cython")
8261 "The cysignals package provides mechanisms to handle interrupts (and
8262 other signals and errors) in Cython code, using two related approaches,
8263 for mixed Cython/Python code or external C libraries and pure Cython code,
8265 (license license:lgpl3+)))
8267 (define-public python2-cysignals
8268 (package-with-python2 python-cysignals))
8270 (define-public python2-shedskin
8272 (name "python2-shedskin")
8277 (uri (string-append "https://github.com/shedskin/shedskin/"
8278 "releases/download/v" version
8279 "/shedskin-" version ".tgz"))
8282 "0nzwrzgw1ga8rw6f0ryq7zr9kkiavd1cqz5hzxkcbicl1dk7kz41"))))
8283 (build-system python-build-system)
8285 `(#:python ,python-2
8286 #:phases (modify-phases %standard-phases
8287 (add-after 'unpack 'fix-resulting-include-libs
8288 (lambda* (#:key inputs #:allow-other-keys)
8289 (let ((libgc (assoc-ref inputs "libgc"))
8290 (pcre (assoc-ref inputs "pcre")))
8291 (substitute* "shedskin/makefile.py"
8292 (("variable == 'CCFLAGS':[ ]*")
8293 (string-append "variable == 'CCFLAGS':\n"
8294 " line += ' -I " pcre "/include"
8295 " -I " libgc "/include'"))
8296 (("variable == 'LFLAGS':[ ]*")
8297 (string-append "variable == 'LFLAGS':\n"
8298 " line += ' -L" pcre "/lib"
8299 " -L " libgc "/lib'")))
8301 (inputs `(("pcre" ,pcre)
8303 (home-page "https://shedskin.github.io/")
8304 (synopsis "Experimental Python-2 to C++ Compiler")
8305 (description (string-append "This is an experimental compiler for a subset of
8306 Python. It generates C++ code and a Makefile."))
8307 (license (list license:gpl3 license:bsd-3 license:expat))))
8309 (define-public python2-rope
8311 (name "python2-rope")
8316 (uri (pypi-uri "rope" version))
8319 "18k5znhpwvrfck3yp0jmhd5j8r0f0s8bk1zh5yhs2cfgmfhbwigb"))))
8321 ;; Rope is currently python-2 only.
8322 ;; https://github.com/python-rope/rope/issues/57
8323 `(#:python ,python-2))
8324 (build-system python-build-system)
8326 `(("python2-unittest2" ,python2-unittest2)))
8327 (home-page "https://github.com/python-rope/rope")
8328 (synopsis "Refactoring library for Python")
8329 (description "Rope is a refactoring library for Python. It facilitates
8330 the renaming, moving and extracting of attributes, functions, modules, fields
8331 and parameters in Python 2 source code. These refactorings can also be applied
8332 to occurrences in strings and comments.")
8333 (license license:gpl2)))
8335 (define-public python-py3status
8337 (name "python-py3status")
8342 (uri (pypi-uri "py3status" version))
8345 "0i283z1pivmir61z8kbiycigc94l61v33ygzkhczf1ifq7cppyds"))))
8346 (build-system python-build-system)
8351 (modify-phases %standard-phases
8352 ;; 'file' is used for detection of configuration file encoding
8353 ;; let's make link the dependency to particular input
8354 (add-before 'build 'patch-file-path
8355 (lambda* (#:key inputs #:allow-other-keys)
8356 (let ((file-path (assoc-ref inputs "file")))
8357 (substitute* "py3status/parse_config.py"
8358 (("check_output\\(\\['file'")
8359 (string-append "check_output(['" file-path "/bin/file'")))
8361 #:tests? #f)) ; TODO: Requires many libraries not in Guix.
8362 (home-page "https://github.com/ultrabug/py3status")
8363 (synopsis "Extensible i3status wrapper written in Python")
8364 (description "py3status is an i3status wrapper which extends i3status
8365 functionality in a modular way, allowing you to extend your panel with your
8366 own code, responding to click events and updating clock every second.")
8367 (license license:bsd-3)))
8369 (define-public python-tblib
8371 (name "python-tblib")
8375 (uri (pypi-uri "tblib" version))
8377 "02iahfkfa927hb4jq2bak36ldihwapzacfiq5lyxg8llwn98a1yi"))))
8378 (build-system python-build-system)
8381 (modify-phases %standard-phases
8384 ;; Upstream runs tests after installation and the package itself
8385 ;; resides in a subdirectory. Extend PYTHONPATH so it will be
8387 (setenv "PYTHONPATH"
8388 (string-append (getcwd) "/build/lib:"
8389 (getenv "PYTHONPATH")))
8390 (zero? (system* "py.test" "-vv" "tests" "README.rst")))))))
8392 `(("python-pytest" ,python-pytest)
8393 ("python-six" ,python-six)))
8394 (home-page "https://github.com/ionelmc/python-tblib")
8395 (synopsis "Traceback serialization library")
8397 "Traceback serialization allows you to:
8400 @item Pickle tracebacks and raise exceptions with pickled tracebacks in
8401 different processes. This allows better error handling when running code over
8402 multiple processes (imagine multiprocessing, billiard, futures, celery etc).
8404 @item Parse traceback strings and raise with the parsed tracebacks.
8406 (license license:bsd-3)))
8408 (define-public python2-tblib
8409 (package-with-python2 python-tblib))
8411 (define-public python-greenlet
8413 (name "python-greenlet")
8417 (uri (pypi-uri "greenlet" version))
8420 "1xhik26j4f3kc4qw9xmj0c567rb5h1zryb4ijwqnqwwjvfhbv59h"))))
8421 (build-system python-build-system)
8422 (home-page "https://greenlet.readthedocs.io/")
8423 (synopsis "Lightweight in-process concurrent programming")
8425 "Greenlet package is a spin-off of Stackless, a version of CPython
8426 that supports micro-threads called \"tasklets\". Tasklets run
8427 pseudo-concurrently (typically in a single or a few OS-level threads) and
8428 are synchronized with data exchanges on \"channels\".")
8429 (license (list license:psfl license:expat))))
8431 (define-public python2-greenlet
8432 (package-with-python2 python-greenlet))
8434 (define-public python-gevent
8436 (name "python-gevent")
8440 (uri (pypi-uri "gevent" version))
8443 "1smf3kvidpdiyi2c81alal74p2zm0clrm6xbyy6y1k9a3f2vkrbf"))
8444 (modules '((guix build utils)))
8447 ;; unbunding libev and c-ares
8448 (for-each delete-file-recursively '("libev" "c-ares"))
8450 (call-with-output-file "greentest/__init__.py" noop)
8451 (substitute* "greentest/testrunner.py"
8452 (("import util") "from . import util")
8453 (("from util import log") "from .util import log"))))))
8454 (build-system python-build-system)
8456 `(("python-greenlet" ,python-greenlet)))
8458 `(("python-six" ,python-six)))
8460 `(("c-ares" ,c-ares)
8462 (home-page "http://www.gevent.org/")
8463 (synopsis "Coroutine-based network library")
8465 "gevent is a coroutine-based Python networking library that uses greenlet
8466 to provide a high-level synchronous API on top of the libev event loop.")
8467 (license license:expat)))
8469 (define-public python2-gevent
8470 (package-with-python2 python-gevent))
8472 (define-public python-fastimport
8474 (name "python-fastimport")
8479 (uri (pypi-uri "fastimport" version))
8481 (base32 "1aqjsin4rmqm7ln4j0p73fzxifws6c6ikgyhav7r137m2ixsxl43"))))
8482 (build-system python-build-system)
8483 (home-page "https://github.com/jelmer/python-fastimport")
8484 (synopsis "VCS fastimport parser and generator in Python")
8485 (description "This package provides a parser for and generator of the Git
8486 @url{https://www.kernel.org/pub/software/scm/git/docs/git-fast-import.html,fastimport}
8488 (license license:gpl2+)))
8490 (define-public python2-fastimport
8491 (package-with-python2 python-fastimport))
8493 (define-public python-twisted
8495 (name "python-twisted")
8499 (uri (pypi-uri "Twisted" version ".tar.bz2"))
8502 "1p245mg15hkxp7hy5cyq2fgvlgjkb4cg0gwkwd148nzy1bbi3wnv"))))
8503 (build-system python-build-system)
8505 '(#:tests? #f)) ; FIXME: Some tests are failing.
8507 ;; (modify-phases %standard-phases
8510 ;; (zero? (system* "./bin/trial" "twisted")))))
8512 `(("python-zope-interface" ,python-zope-interface)
8513 ("python-incremental" ,python-incremental)
8514 ("python-constantly" ,python-constantly)
8515 ("python-automat" ,python-automat)))
8516 (home-page "https://twistedmatrix.com/")
8517 (synopsis "Asynchronous networking framework written in Python")
8519 "Twisted is an extensible framework for Python programming, with special
8520 focus on event-based network programming and multiprotocol integration.")
8521 (license license:expat)))
8523 (define-public python2-twisted
8524 (package-with-python2 python-twisted))
8526 (define-public python-pika
8528 (name "python-pika")
8533 (uri (pypi-uri "pika" version))
8536 "0nb4h08di432lv7dy2v9kpwgk0w92f24sqc2hw2s9vwr5b8v8xvj"))))
8537 (build-system python-build-system)
8539 `(("python-pyev" ,python-pyev)
8540 ("python-tornado" ,python-tornado)
8541 ("python-twisted" ,python-twisted)))
8542 (home-page "https://pika.readthedocs.org")
8543 (synopsis "Pure Python AMQP Client Library")
8545 "Pika is a pure-Python implementation of the AMQP (Advanced Message Queuing
8546 Protocol) 0-9-1 protocol that tries to stay fairly independent of the underlying
8547 network support library.")
8548 (license license:bsd-3)))
8550 (define-public python2-pika
8551 (package-with-python2 python-pika))
8553 (define-public python-ply
8560 (uri (pypi-uri "ply" version))
8563 "0gpl0yli3w03ipyqfrp3w5nf0iawhsq65anf5wwm2wf5p502jzhd"))))
8564 (build-system python-build-system)
8565 (home-page "http://www.dabeaz.com/ply/")
8566 (synopsis "Python Lex & Yacc")
8567 (description "PLY is a @code{lex}/@code{yacc} implemented purely in Python.
8568 It uses LR parsing and does extensive error checking.")
8569 (license license:bsd-3)))
8571 (define-public python2-ply
8572 (package-with-python2 python-ply))
8574 (define-public python-tabulate
8576 (name "python-tabulate")
8580 (uri (pypi-uri "tabulate" version))
8583 "1inqhspd4frxnp08c32yndr0lc4px1xfkqah184i5w09gkhvi843"))))
8584 (build-system python-build-system)
8586 ;; FIXME: The pypi release tarball is missing a 'test/common.py'
8587 ;; and the latest release is not tagged in the upstream repository.
8589 (home-page "https://bitbucket.org/astanin/python-tabulate")
8590 (synopsis "Pretty-print tabular data")
8592 "Tabulate is a library and command-line utility to pretty-print tabular
8594 (license license:expat)))
8596 (define-public python2-tabulate
8597 (package-with-python2 python-tabulate))
8599 (define-public python-kazoo
8601 (name "python-kazoo")
8606 (uri (pypi-uri "kazoo" version))
8609 "10pb864if9qi2pq9lfb9m8f7z7ss6rml80gf1d9h64lap5crjnjj"))))
8610 (build-system python-build-system)
8611 (arguments '(#:tests? #f)) ; XXX: needs zookeeper
8613 `(("python-six" ,python-six)))
8614 (home-page "https://kazoo.readthedocs.org")
8615 (synopsis "High-level Zookeeper client library")
8617 "Kazoo is a Python client library for the Apache Zookeeper distributed
8618 application service. It is designed to be easy to use and to avoid common
8619 programming errors.")
8620 (license license:asl2.0)))
8622 (define-public python2-kazoo
8623 (package-with-python2 python-kazoo))
8625 (define-public python-pykafka
8627 (name "python-pykafka")
8632 "https://pypi.python.org/packages/8b/3e/"
8633 "384eeff406b06315738b62483fd2126c6e4f544167116b17cc04ea7d2a59/"
8634 "pykafka-" version ".tar.gz"))
8637 "1id6sr159p6aa13bxcqyr9gln8sqg1l0ddzns5iws8kk5q1p5cfv"))))
8638 (build-system python-build-system)
8639 (arguments '(#:tests? #f)) ; XXX: needs zookeeper, kafka, etc.
8641 `(("python-gevent" ,python-gevent)
8642 ("python-kazoo" ,python-kazoo)
8643 ("python-tabulate" ,python-tabulate)))
8645 `(("librdkafka" ,librdkafka)))
8646 (home-page "https://pykafka.readthedocs.io/")
8647 (synopsis "Apache Kafka client for Python")
8649 "PyKafka is a client for the Apache Kafka distributed messaging system.
8650 It includes Python implementations of Kafka producers and consumers, which
8651 are optionally backed by a C extension built on librdkafka.")
8652 (license license:asl2.0)))
8654 (define-public python2-pykafka
8655 (package-with-python2 python-pykafka))
8657 (define-public python-wcwidth
8659 (name "python-wcwidth")
8664 (uri (pypi-uri "wcwidth" version))
8667 "0pn6dflzm609m4r3i8ik5ni9ijjbb5fa3vg1n7hn6vkd49r77wrx"))))
8668 (build-system python-build-system)
8669 (home-page "https://github.com/jquast/wcwidth")
8670 (synopsis "Measure number of terminal column cells of wide-character codes")
8671 (description "Wcwidth measures the number of terminal column cells of
8672 wide-character codes. It is useful for those implementing a terminal emulator,
8673 or programs that carefully produce output to be interpreted by one. It is a
8674 Python implementation of the @code{wcwidth} and @code{wcswidth} C functions
8675 specified in POSIX.1-2001 and POSIX.1-2008.")
8676 (license license:expat)))
8678 (define-public python2-wcwidth
8679 (package-with-python2 python-wcwidth))
8681 (define-public python2-jsonrpclib
8683 (name "python2-jsonrpclib")
8688 "https://pypi.python.org/packages/source/j/jsonrpclib/"
8689 "jsonrpclib-" version ".tar.gz"))
8692 "02vgirw2bcgvpcxhv5hf3yvvb4h5wzd1lpjx8na5psdmaffj6l3z"))))
8693 (build-system python-build-system)
8696 #:python ,python-2))
8697 (home-page "https://github.com/joshmarshall/jsonrpclib/")
8698 (synopsis "Implementation of JSON-RPC specification for Python")
8700 "This library is an implementation of the JSON-RPC specification.
8701 It supports both the original 1.0 specification, as well as the
8702 new (proposed) 2.0 spec, which includes batch submission, keyword arguments,
8704 (license license:asl2.0)))
8706 (define-public python-chai
8708 (name "python-chai")
8712 (uri (pypi-uri "chai" version))
8715 "016kf3irrclpkpvcm7q0gmkfibq7jgy30a9v73pp42bq9h9a32bl"))))
8716 (build-system python-build-system)
8717 (home-page "https://github.com/agoragames/chai")
8718 (synopsis "Mocking framework for Python")
8720 "Chai provides an api for mocking, stubbing and spying your python
8721 objects, patterned after the Mocha library for Ruby.")
8722 (license license:bsd-3)))
8724 (define-public python2-chai
8725 (package-with-python2 python-chai))
8727 (define-public python-inflection
8729 (name "python-inflection")
8732 (origin (method url-fetch)
8733 (uri (pypi-uri "inflection" version))
8736 "1jhnxgnw8y3mbzjssixh6qkc7a3afc4fygajhqrqalnilyvpzshq"))))
8737 (build-system python-build-system)
8739 `(("python-pytest" ,python-pytest)))
8740 (home-page "https://github.com/jpvanhal/inflection")
8741 (synopsis "Python string transformation library")
8743 "Inflection is a string transformation library. It singularizes
8744 and pluralizes English words, and transforms strings from CamelCase to
8745 underscored string.")
8746 (license license:expat)))
8748 (define-public python2-inflection
8749 (package-with-python2 python-inflection))
8751 (define-public python-pylev
8753 (name "python-pylev")
8757 (uri (pypi-uri "pylev" version))
8760 "1hz1x9blsbxya1y9nnhnwwdnqmakxi9mc0jkwj0rn6b1h44i0f86"))))
8761 (build-system python-build-system)
8762 (home-page "https://github.com/toastdriven/pylev")
8763 (synopsis "Levenshtein distance implementation in Python")
8764 (description "Pure Python Levenshtein implementation, based off the
8765 Wikipedia code samples at
8766 @url{http://en.wikipedia.org/wiki/Levenshtein_distance}.")
8767 (license license:bsd-3)))
8769 (define-public python2-pylev
8770 (package-with-python2 python-pylev))
8772 (define-public python-cleo
8774 (name "python-cleo")
8778 (uri (pypi-uri "cleo" version))
8781 "0q1cf0szr0d54am4pypzwdnm74zpladdsinad94c2fz5i06fdpf7"))))
8782 (build-system python-build-system)
8785 ("python-mock" ,python-mock)
8786 ("python-pytest-mock" ,python-pytest-mock)
8787 ("python-pytest" ,python-pytest)))
8789 `(("python-backpack" ,python-backpack)
8790 ("python-pastel" ,python-pastel)
8791 ("python-pylev" ,python-pylev)))
8792 (home-page "https://github.com/sdispater/cleo")
8793 (synopsis "Command-line arguments library for Python")
8795 "Cleo allows you to create command-line commands with signature in
8796 docstring and colored output.")
8797 (license license:expat)))
8799 (define-public python2-cleo
8800 (package-with-python2 python-cleo))
8802 (define-public python-lazy-object-proxy
8804 (name "python-lazy-object-proxy")
8808 (uri (pypi-uri "lazy-object-proxy" version))
8811 "0s22aqqkdscyh8sjspyyax7qa1aiz8p4midrnyf39717fhfczm6x"))))
8812 (build-system python-build-system)
8813 (home-page "https://github.com/ionelmc/python-lazy-object-proxy")
8814 (synopsis "Lazy object proxy for python")
8816 "Lazy object proxy is an object that wraps a callable but defers the call
8817 until the object is actually required, and caches the result of said call.")
8818 (license license:bsd-2)))
8820 (define-public python2-lazy-object-proxy
8821 (package-with-python2 python-lazy-object-proxy))
8823 (define-public python-dnspython
8825 (name "python-dnspython")
8829 (uri (string-append "http://www.dnspython.org/kits/"
8830 version "/dnspython-" version ".tar.gz"))
8833 "0jr4v2pd90i6l1xxbss2m05psbjaxvyvvvpq44wycijpfgjqln8i"))))
8834 (build-system python-build-system)
8835 (arguments '(#:tests? #f)) ; XXX: requires internet access
8836 (home-page "http://www.dnspython.org")
8837 (synopsis "DNS toolkit for Python")
8839 "dnspython is a DNS toolkit for Python. It supports almost all record
8840 types. It can be used for queries, zone transfers, and dynamic updates.
8841 It supports TSIG authenticated messages and EDNS0.")
8842 (license license:expat)))
8844 (define-public python2-dnspython
8845 (package-with-python2 python-dnspython))
8847 (define-public python-email-validator
8849 (name "python-email-validator")
8852 (origin (method url-fetch)
8853 (uri (pypi-uri "email_validator" version))
8856 "1ja9149l9ck5n45a72h3is7v476hjny5ybxbcamx1nw6iplsm7k6"))))
8857 (build-system python-build-system)
8860 (modify-phases %standard-phases
8861 (add-before 'build 'use-dnspython
8863 (substitute* "setup.py"
8864 (("dnspython3") "dnspython"))
8867 `(("python-dnspython" ,python-dnspython)
8868 ("python-idna" ,python-idna)))
8869 (home-page "https://github.com/JoshData/python-email-validator")
8870 (synopsis "Email address validation library for Python")
8872 "This library validates email address syntax and deliverability.")
8873 (license license:cc0)))
8875 (define-public python2-email-validator
8876 (package-with-python2 python-email-validator))
8878 (define-public python-ukpostcodeparser
8880 (name "python-ukpostcodeparser")
8884 (uri (pypi-uri "UkPostcodeParser" version))
8887 "1jwg9z4rz51mcka1821rwgycsd0mcicyp1kiwjfa2kvg8bm9p2qd"))))
8888 (build-system python-build-system)
8889 (home-page "https://github.com/hamstah/ukpostcodeparser")
8890 (synopsis "UK Postcode parser for Python")
8892 "This library provides the @code{parse_uk_postcode} function for
8893 parsing UK postcodes.")
8894 (license license:expat)))
8896 (define-public python2-ukpostcodeparser
8897 (package-with-python2 python-ukpostcodeparser))
8899 (define-public python-faker
8901 (name "python-faker")
8905 (uri (pypi-uri "Faker" version))
8908 "1fh2p2yz0fsdr4fqwxgddwbvfb6qn6vp8yx0qwqzra27yq5d1wsm"))
8910 (search-patches "python-faker-fix-build-32bit.patch"))
8911 (modules '((guix build utils)))
8914 (for-each delete-file (find-files "." "\\.pyc$"))
8916 (build-system python-build-system)
8919 (modify-phases %standard-phases
8922 (zero? (system* "python" "-m" "unittest" "-v" "tests")))))))
8925 ("python-email-validator" ,python-email-validator)
8926 ("python-mock" ,python-mock)
8927 ("python-ukpostcodeparser" ,python-ukpostcodeparser)))
8929 `(("python-dateutil" ,python-dateutil)
8930 ("python-six" ,python-six)))
8931 (home-page "https://github.com/joke2k/faker")
8932 (synopsis "Python package that generates fake data")
8934 "Faker is a Python package that generates fake data such as names,
8935 addresses, and phone numbers.")
8936 (license license:expat)
8937 (properties `((python2-variant . ,(delay python2-faker))))))
8939 (define-public python2-faker
8940 (let ((base (package-with-python2 (strip-python2-variant
8945 `(("python2-ipaddress" ,python2-ipaddress)
8946 ,@(package-propagated-inputs base))))))
8948 (define-public python-pyaml
8950 (name "python-pyaml")
8954 (uri (pypi-uri "pyaml" version))
8957 "132grrw0ajq4nrappi3ldbkb952k7yn9b6c7csi2rmvzm1g6ppp2"))))
8958 (build-system python-build-system)
8960 `(("python-unidecode" ,python-unidecode)))
8962 `(("python-pyyaml" ,python-pyyaml)))
8963 (home-page "https://github.com/mk-fg/pretty-yaml")
8964 (synopsis "YAML pretty-print library for Python")
8966 "pyaml is a PyYAML based python module to produce pretty and readable
8967 YAML-serialized data.")
8968 (license (license:non-copyleft "http://www.wtfpl.net/txt/copying/"))))
8970 (define-public python2-pyaml
8971 (package-with-python2 python-pyaml))
8973 (define-public python-backpack
8975 (name "python-backpack")
8980 (uri (pypi-uri "backpack" version))
8983 "14rq1mvm0jda90lcx9gyyby9dvq4x3js2cmxvd6vl4686ixwyqh1"))))
8984 (build-system python-build-system)
8986 `(("python-pytest" ,python-pytest)
8987 ("python-nose" ,python-nose)))
8989 `(("python-simplejson" ,python-simplejson)))
8990 (home-page "https://github.com/sdispater/backpack")
8991 (synopsis "Utilities for working with Python collections")
8992 (description "Backpack provides some useful utilities for working with
8993 collections of data.")
8994 (license license:expat)))
8996 (define-public python2-backpack
8997 (package-with-python2 python-backpack))
8999 (define-public python-prompt-toolkit
9001 (name "python-prompt-toolkit")
9006 (uri (pypi-uri "prompt_toolkit" version ".tar.gz"))
9009 "05v9h5nydljwpj5nm8n804ms0glajwfy1zagrzqrg91wk3qqi1c5"))))
9010 (build-system python-build-system)
9012 '(#:tests? #f)) ; The test suite uses some Windows-specific data types.
9014 `(("python-wcwidth" ,python-wcwidth)
9015 ("python-six" ,python-six)
9016 ("python-pygments" ,python-pygments)))
9017 (home-page "https://github.com/jonathanslenders/python-prompt-toolkit")
9018 (synopsis "Library for building command line interfaces in Python")
9020 "Prompt-Toolkit is a library for building interactive command line
9021 interfaces in Python. It's like GNU Readline but it also features syntax
9022 highlighting while typing, out-of-the-box multi-line input editing, advanced
9023 code completion, incremental search, support for Chinese double-width
9024 characters, mouse support, and auto suggestions.")
9025 (license license:bsd-3)))
9027 (define-public python2-prompt-toolkit
9028 (package-with-python2 python-prompt-toolkit))
9030 (define-public python-jedi
9032 (name "python-jedi")
9037 (uri (pypi-uri "jedi" version))
9040 "0c8x962ynpx001fdvp07m2q5jk4igkxbj3rmnydavphvlgxijk1v"))))
9041 (build-system python-build-system)
9043 ;; FIXME: One test fails (use "py.test" instead of 'setup.py test').
9046 `(("python-pytest" ,python-pytest)))
9047 (home-page "https://github.com/davidhalter/jedi")
9049 "Autocompletion for Python that can be used for text editors")
9051 "Jedi is an autocompletion tool for Python that can be used for text editors.")
9052 (license license:expat)))
9054 (define-public python2-jedi
9055 (package-with-python2 python-jedi))
9057 (define-public ptpython
9063 (uri (pypi-uri "ptpython" version))
9066 "1mmbiyzf0n8hm7z2a562x7w5cbl6jc0zsk6vp40q1z4cyblv1k13"))))
9067 (build-system python-build-system)
9069 '(#:tests? #f)) ; FIXME: No tests in pypi tarball.
9071 `(("python-docopt" ,python-docopt)
9072 ("python-jedi" ,python-jedi)
9073 ("python-prompt-toolkit" ,python-prompt-toolkit)
9074 ("python-pygments" ,python-pygments)))
9075 (home-page "https://github.com/jonathanslenders/ptpython")
9076 (synopsis "Python Read-Eval-Print-Loop with nice IDE-like features")
9078 "ptpython is a Python read-eval-print loop with IDE-like features.
9079 It supports syntax highlighting, multiline editing, autocompletion, mouse,
9080 color schemes, bracketed paste, Vi and Emacs keybindings, Chinese characters
9082 (license license:bsd-3)
9083 (properties `((python2-variant . ,(delay ptpython-2))))))
9085 (define-public ptpython-2
9086 (let ((base (package-with-python2 (strip-python2-variant ptpython))))
9089 (name "ptpython2"))))
9091 (define-public python-stem
9093 (name "python-stem")
9098 (uri (pypi-uri "stem" version))
9101 "1j7pnblrn0yr6jmxvsq6y0ihmxmj5x50jl2n2606w67f6wq16j9n"))))
9102 (build-system python-build-system)
9105 (modify-phases %standard-phases
9108 (zero? (system* "./run_tests.py" "--unit")))))))
9110 `(("python-mock" ,python-mock)
9111 ("python-pep8" ,python-pep8)
9112 ("python-pyflakes" ,python-pyflakes)))
9113 (home-page "https://stem.torproject.org/")
9115 "Python controller library that allows applications to interact with Tor")
9117 "Stem is a Python controller library for Tor. With it you can use Tor's
9118 control protocol to script against the Tor process and read descriptor data
9119 relays publish about themselves.")
9120 (license license:lgpl3)))
9122 (define-public python2-stem
9123 (package-with-python2 python-stem))
9125 (define-public python-pyserial
9127 (name "python-pyserial")
9132 (uri (pypi-uri "pyserial" version))
9135 "0k1nfdrxxkdlv4zgaqsdv8li0pj3gbh2pyxw8q2bsg6f9490amyn"))))
9136 (build-system python-build-system)
9138 '(#:tests? #f)) ; FIXME: 3/49 tests are failing.
9140 ;; (modify-phases %standard-phases
9143 ;; (zero? (system* "python" "test/run_all_tests.py" "loop://")))))))
9145 "https://github.com/pyserial/pyserial")
9146 (synopsis "Python Serial Port Bindings")
9147 (description "@code{pyserial} provide serial port bindings for Python. It
9148 supports different byte sizes, stop bits, parity and flow control with RTS/CTS
9149 and/or Xon/Xoff. The port is accessed in RAW mode.")
9150 (license license:bsd-3)))
9152 (define-public python2-pyserial
9153 (package-with-python2 python-pyserial))
9155 (define-public python-kivy
9157 (name "python-kivy")
9162 (uri (pypi-uri "kivy" version))
9163 (file-name (string-append name "-" version ".tar.gz"))
9166 "0zk3g1j1z0lzcm9d0k1lprrs95zr8n8k5pdg3p5qlsn26jz4bg19"))))
9167 (build-system python-build-system)
9169 `(#:tests? #f ; Tests require many optional packages
9171 (modify-phases %standard-phases
9172 (replace 'build (lambda _ (zero? (system* "make" "force"))))
9173 (add-after 'patch-generated-file-shebangs 'set-sdl-paths
9174 (lambda* (#:key inputs #:allow-other-keys)
9175 (setenv "KIVY_SDL2_PATH"
9176 (string-append (assoc-ref inputs "sdl-union")
9180 `(("pkg-config" ,pkg-config)
9181 ("python-cython" ,python-cython)))
9183 `(("gstreamer" ,gstreamer)
9186 ,(sdl-union (list sdl2 sdl2-image sdl2-mixer sdl2-ttf)))))
9187 (home-page "http://kivy.org")
9189 "Multitouch application framework")
9191 "A software library for rapid development of
9192 hardware-accelerated multitouch applications.")
9193 (license license:expat)))
9195 (define-public python2-kivy
9196 (package-with-python2 python-kivy))
9198 (define-public python-kivy-next
9199 (let ((commit "a988c5e7a47da56263ff39514264a3de516ef2fe")
9201 (package (inherit python-kivy)
9202 (name "python-kivy-next")
9203 (version (string-append "1.9.1-" revision "."
9204 (string-take commit 7)))
9209 (url "https://github.com/kivy/kivy")
9211 (file-name (string-append name "-" version "-checkout"))
9214 "0jk92b4a8l7blkvkgkjihk171s0dfnq582cckff5srwc8kal5m0p")))))))
9216 (define-public python2-kivy-next
9217 (package-with-python2 python-kivy-next))
9219 (define-public python-binaryornot
9221 (name "python-binaryornot")
9225 (uri (pypi-uri "binaryornot" version))
9228 "1j4f51dxic39mdwf6alj7gd769wy6mhk916v031wjali51xkh3xb"))))
9229 (build-system python-build-system)
9231 `(("python-chardet" ,python-chardet)
9232 ("python-hypothesis" ,python-hypothesis)))
9233 (home-page "https://github.com/audreyr/binaryornot")
9234 (synopsis "Package to check if a file is binary or text")
9235 (description "Ultra-lightweight pure Python package to check if a file is
9237 (license license:bsd-3)
9238 (properties `((python2-variant . ,(delay python2-binaryornot))))))
9240 (define-public python2-binaryornot
9241 (let ((base (package-with-python2 (strip-python2-variant python-binaryornot))))
9242 (package (inherit base)
9244 `(("python2-enum34" ,python2-enum34)
9245 ,@(package-propagated-inputs base))))))
9247 (define-public python-nltk
9249 (name "python-nltk")
9253 (uri (pypi-uri "nltk" version))
9256 "0skxbhnymwlspjkzga0f7x1hg3y50fwpfghs8g8k7fh6f4nknlym"))))
9257 (build-system python-build-system)
9259 '(;; The tests require some extra resources to be downloaded.
9260 ;; TODO Try packaging these resources.
9262 (home-page "http://nltk.org/")
9263 (synopsis "Natural Language Toolkit")
9264 (description "It provides interfaces to over 50 corpora and lexical
9265 resources such as WordNet, along with a suite of text processing libraries
9266 for classification, tokenization, stemming, tagging, parsing, and semantic
9267 reasoning, wrappers for natural language processing libraries.")
9268 (license license:asl2.0)))
9270 (define-public python2-nltk
9271 (package-with-python2 python-nltk))
9273 (define-public python-pymongo
9275 (name "python-pymongo")
9279 (uri (pypi-uri "pymongo" version))
9282 "07mra6w86wjqy4lx5fvimidjhhfzd562gfjn8grsnbv2q8pk0i9x"))))
9283 (build-system python-build-system)
9285 `(("python-certifi" ,python-certifi)))
9286 (home-page "https://github.com/mongodb/mongo-python-driver")
9287 (synopsis "Python driver for MongoDB")
9288 (description "Python driver for MongoDB.")
9289 (license license:asl2.0)))
9291 (define-public python2-pymongo
9292 (package-with-python2 python-pymongo))
9294 (define-public python-sh
9300 (uri (pypi-uri "sh" version))
9303 "192r0mpv6dmkysjzhc43ddffiwb5g7c76bgr1mb1z2xz9awbj3sr"))))
9304 (build-system python-build-system)
9306 `(#:tests? #f)) ; no tests
9307 (home-page "https://github.com/amoffat/sh")
9308 (synopsis "Python subprocess interface")
9309 (description "Abstracts process invocation by providing a function
9310 interface for programs.")
9311 (license license:expat)))
9313 (define-public python2-sh
9314 (package-with-python2 python-sh))
9316 (define-public python-consul
9318 (name "python-consul")
9323 (uri (pypi-uri "python-consul" version))
9326 "0rfyxcy4cr3x848vhx876ifalxd5ghq6l5x813m49h4vq2d4jiq8"))))
9327 (build-system python-build-system)
9329 `(("python-pytest" ,python-pytest)))
9331 `(("python-requests" ,python-requests)
9332 ("python-six" ,python-six)))
9333 (home-page "https://github.com/cablehead/python-consul")
9334 (synopsis "Python client for Consul")
9336 "Python client for @url{http://www.consul.io/,Consul}, a tool for service
9337 discovery, monitoring and configuration.")
9338 (license license:expat)))
9340 (define-public python2-consul
9341 (package-with-python2 python-consul))
9343 (define-public python-schematics
9345 (name "python-schematics")
9351 "https://github.com/schematics/schematics/archive/v" version ".tar.gz"))
9352 (file-name (string-append name "-" version ".tar.gz"))
9355 "19v1i69bf3bzarfxmbv0v6ivpcn758x3shvbiy9l2hy0lvqwnp6l"))))
9356 (build-system python-build-system)
9358 `(("python-six" ,python-six)))
9360 `(#:tests? #f)) ; requires a bunch of not very nice packages with fixed
9361 ; version requirements (eg python-coveralls)
9362 (home-page "https://github.com/schematics/schematics")
9363 (synopsis "Python Data Structures for Humans")
9364 (description "Python Data Structures for Humans.")
9365 (license license:bsd-3)))
9367 (define-public python2-schematics
9368 (package-with-python2 python-schematics))
9370 (define-public python-odfpy
9372 (name "python-odfpy")
9376 (uri (pypi-uri "odfpy" version))
9379 "1a6ms0w9zfhhkqhvrnynwwbxrivw6hgjc0s5k7j06npc7rq0blxw"))))
9381 `(#:modules ((srfi srfi-1)
9382 (guix build python-build-system)
9385 (modify-phases %standard-phases
9387 ;; The test runner invokes python2 and python3 for test*.py.
9388 ;; To avoid having both in inputs, we replicate it here.
9390 (every (lambda (test-file)
9391 (zero? (system* "python" test-file)))
9392 (find-files "tests" "^test.*\\.py$")))))))
9393 (build-system python-build-system)
9394 (home-page "https://github.com/eea/odfpy")
9395 (synopsis "Python API and tools to manipulate OpenDocument files")
9396 (description "Collection of libraries and utility programs written in
9397 Python to manipulate OpenDocument 1.2 files.")
9399 ;; The software is mainly dual GPL2+ and ASL2.0, but includes a
9400 ;; number of files with other licenses.
9401 (list license:gpl2+ license:asl2.0 license:lgpl2.1+ license:cc-by-sa3.0))))
9403 (define-public python2-odfpy
9404 (package-with-python2 python-odfpy))
9406 (define-public python-natsort
9408 (name "python-natsort")
9412 (uri (pypi-uri "natsort" version))
9415 "0bh6j0l8iapjnsgg3bs6q075cnzjl6zw1vlgqyv3qrygm2cxypkn"))))
9416 (build-system python-build-system)
9419 (modify-phases %standard-phases
9420 (add-before 'check 'set-cachedir
9421 ;; Tests require write access to $HOME by default
9422 (lambda _ (setenv "PYTHON_EGG_CACHE" "/tmp") #t)))))
9424 `(("python-hypothesis" ,python-hypothesis)
9425 ("python-pytest-cache" ,python-pytest-cache)
9426 ("python-pytest-cov" ,python-pytest-cov)
9427 ("python-pytest-flakes" ,python-pytest-flakes)
9428 ("python-pytest-pep8" ,python-pytest-pep8)))
9429 (propagated-inputs ; TODO: Add python-fastnumbers.
9430 `(("python-pyicu" ,python-pyicu)))
9431 (home-page "https://github.com/SethMMorton/natsort")
9432 (synopsis "Natural sorting for python and shell")
9434 "Natsort lets you apply natural sorting on lists instead of
9435 lexicographical. If you use the built-in @code{sorted} method in python
9436 on a list such as @code{['a20', 'a9', 'a1', 'a4', 'a10']}, it would be
9437 returned as @code{['a1', 'a10', 'a20', 'a4', 'a9']}. Natsort provides a
9438 function @code{natsorted} that identifies numbers and sorts them separately
9439 from strings. It can also sort version numbers, real numbers, mixed types
9440 and more, and comes with a shell command @command{natsort} that exposes this
9441 functionality in the command line.")
9442 (license license:expat)
9443 (properties `((python2-variant . ,(delay python2-natsort))))))
9445 (define-public python2-natsort
9446 (let ((base (package-with-python2 (strip-python2-variant python-natsort))))
9447 (package (inherit base)
9449 `(("python2-pathlib" ,python2-pathlib)
9450 ("python2-mock" ,python2-mock)
9451 ("python2-enum34" ,python2-enum34)
9452 ,@(package-native-inputs base))))))
9454 (define-public python-glances
9456 (name "python-glances")
9461 (uri (pypi-uri "Glances" version))
9464 "11jbq40g8alsbirnd4kiagznqg270247i0m8qhi48ldf2i5xppxg"))))
9465 (build-system python-build-system)
9467 `(("python-psutil" ,python-psutil)))
9469 "https://github.com/nicolargo/glances")
9471 "A cross-platform curses-based monitoring tool")
9473 "Glances is a curses-based monitoring tool for a wide variety of platforms.
9474 Glances uses the PsUtil library to get information from your system. It monitors
9475 CPU, load, memory, network bandwidth, disk I/O, disk use, and more.")
9476 (license license:lgpl3+)))
9478 (define-public python2-glances
9479 (package-with-python2 python-glances))
9481 (define-public python-graphql-core
9483 (name "python-graphql-core")
9488 (uri (pypi-uri "graphql-core" version))
9491 "0rsaarx2sj4xnw9966rhh4haiqaapm4lm2mfqm48ywd51j5vh1a0"))))
9492 (build-system python-build-system)
9494 `(#:tests? #f ; Tests require the unpackaged pytest-benchmark.
9496 (modify-phases %standard-phases
9497 (add-after 'unpack 'patch-hardcoded-version
9498 (lambda _ (substitute*
9500 (("'gevent==1.1rc1'") "'gevent'"))
9503 `(("python-gevent" ,python-gevent)
9504 ("python-mock" ,python-mock)
9505 ("python-pytest-mock" ,python-pytest-mock)))
9507 `(("python-promise" ,python-promise)
9508 ("python-six" ,python-six)))
9509 (home-page "https://github.com/graphql-python/graphql-core")
9510 (synopsis "GraphQL implementation for Python")
9512 "GraphQL implementation for Python. GraphQL is a data query language and
9513 runtime designed and used to request and deliver data to mobile and web apps.
9514 This library is a port of @url{https://github.com/graphql/graphql-js,graphql-js}
9516 (license license:expat)))
9518 (define-public python2-graphql-core
9519 (package-with-python2 python-graphql-core))
9521 (define-public python-graphql-relay
9523 (name "python-graphql-relay")
9528 (uri (pypi-uri "graphql-relay" version))
9531 "1nv5dxcj59zv31qvl8bd142njmxcmymny2dz3br1l2cpbljbf5i7"))))
9532 (build-system python-build-system)
9534 `(("python-pytest" ,python-pytest)))
9536 `(("python-graphql-core" ,python-graphql-core)
9537 ("python-promise" ,python-promise)
9538 ("python-six" ,python-six)))
9539 (home-page "https://github.com/graphql-python/graphql-relay-py")
9540 (synopsis "Relay implementation for Python")
9542 "This is a library to allow the easy creation of Relay-compliant servers
9543 using the GraphQL Python reference implementation of a GraphQL server. It
9544 should be noted that the code is a exact port of the original
9545 @url{https://github.com/graphql/graphql-relay-js,graphql-relay js implementation}
9547 (license license:expat)))
9549 (define-public python2-graphql-relay
9550 (package-with-python2 python-graphql-relay))
9552 (define-public python-graphene
9554 (name "python-graphene")
9559 (uri (pypi-uri "graphene" version))
9562 "09zhac7igh9ixdz0ay6csy35b40l1jwbf2wrbxmgxwfhy51iy06q"))))
9563 (build-system python-build-system)
9565 `(("python-graphql-core" ,python-graphql-core)
9566 ("python-graphql-relay" ,python-graphql-relay)
9567 ("python-iso8601" ,python-iso8601)
9568 ("python-promise" ,python-promise)
9569 ("python-six" ,python-six)))
9571 `(#:tests? #f)) ; no tests/ in the PyPI tarball
9572 (home-page "http://graphene-python.org/")
9573 (synopsis "GraphQL Framework for Python")
9575 "Graphene is a Python library for building GraphQL schemas/types.
9576 A GraphQL schema describes your data model, and provides a GraphQL server
9577 with an associated set of resolve methods that know how to fetch data.")
9578 (properties `((python2-variant . ,(delay python2-graphene))))
9579 (license license:expat)))
9581 (define-public python2-graphene
9582 (let ((base (package-with-python2
9583 (strip-python2-variant python-graphene))))
9584 (package (inherit base)
9586 `(("python2-sqlalchemy" ,python2-sqlalchemy)
9587 ,@(package-native-inputs base))))))
9589 (define-public python-nautilus
9591 (name "python-nautilus")
9596 (uri (pypi-uri "nautilus" version))
9599 "01hwzjc1zshk4vvxrcghm398fpy4jls66dyz06g07mrwqif8878p"))))
9600 (build-system python-build-system)
9601 (arguments `(#:tests? #f)) ; fails to import test modules
9603 `(("python-bcrypt" ,python-bcrypt)
9604 ("python-click" ,python-click)
9605 ("python-consul" ,python-consul)
9606 ("python-graphene" ,python-graphene)
9607 ("python-jinja2" ,python-jinja2)
9608 ("python-peewee" ,python-peewee)
9609 ("python-pika" ,python-pika)
9610 ("python-tornado" ,python-tornado)
9611 ("python-wtforms" ,python-wtforms)))
9613 `(("python-nose2" ,python-nose2)))
9614 (home-page "https://github.com/AlecAivazis/nautilus")
9615 (synopsis "Library for creating microservice applications")
9617 "Nautilus is a framework for flux based microservices that looks to
9618 provide extendible implementations of common aspects of a cloud so that you can
9619 focus on building massively scalable web applications.")
9620 (license license:expat)))
9622 (define-public python-snowballstemmer
9624 (name "python-snowballstemmer")
9628 (uri (pypi-uri "snowballstemmer" version))
9631 "0a0idq4y5frv7qsg2x62jd7rd272749xk4x99misf5rcifk2d7wi"))))
9632 (build-system python-build-system)
9636 (home-page "https://github.com/shibukawa/snowball_py")
9637 (synopsis "Snowball stemming library collection for Python")
9638 (description "This package provides 16 word stemmer algorithms generated
9639 from Snowball algorithms. It includes the 15 original ones plus the Poerter
9641 (license license:bsd-3)))
9643 (define-public python2-snowballstemmer
9644 (package-with-python2 python-snowballstemmer))
9646 (define-public python-sphinx-cloud-sptheme
9648 (name "python-sphinx-cloud-sptheme")
9652 (uri (pypi-uri "cloud_sptheme" version))
9655 "1dniqb6a39yh786f86c4jn666rwnyi1jvzn4616zhcchb7sfdshd"))))
9656 (build-system python-build-system)
9657 ;; FIXME: The 'pypi' release archive does not contain tests.
9658 (arguments '(#:tests? #f))
9660 `(("python-sphinx" ,python-sphinx)))
9661 (home-page "https://bitbucket.org/ecollins/cloud_sptheme")
9662 (synopsis "'Cloud' theme for Sphinx documenter")
9663 (description "This package contains the \"Cloud\" theme for Sphinx and some
9664 related extensions.")
9665 (license license:bsd-3)))
9667 (define-public python2-sphinx-cloud-sptheme
9668 (package-with-python2 python-sphinx-cloud-sptheme))
9670 (define-public python-sphinx-alabaster-theme
9672 (name "python-sphinx-alabaster-theme")
9676 (uri (pypi-uri "alabaster" version))
9679 "027anxzcb951gjlcc43y3rbn9qrw36d16vj9wd2smv5410xx9bs7"))))
9680 (build-system python-build-system)
9682 `(("python-pygments" ,python-pygments)))
9683 (home-page "https://alabaster.readthedocs.io/")
9684 (synopsis "Configurable sidebar-enabled Sphinx theme")
9685 (description "Alabaster is a visually (c)lean, responsive, configurable
9686 theme for the Sphinx documentation system. It's the default theme of Sphinx.")
9687 (license license:bsd-3)))
9689 (define-public python2-sphinx-alabaster-theme
9690 (package-with-python2 python-sphinx-alabaster-theme))
9692 (define-public python-setproctitle
9694 (name "python-setproctitle")
9699 (uri (pypi-uri "setproctitle" version))
9702 "163kplw9dcrw0lffq1bvli5yws3rngpnvrxrzdw89pbphjjvg0v2"))))
9703 (build-system python-build-system)
9706 (modify-phases %standard-phases
9707 (add-before 'check 'patch-Makefile
9708 ;; Stricly this is only required for the python2 variant.
9709 ;; But adding a phase in an inherited package seems to be
9710 ;; cumbersum. So we patch even for python3.
9712 (let ((nose (assoc-ref %build-inputs "python2-nose")))
9714 (substitute* "Makefile"
9715 (("\\$\\(PYTHON\\) [^ ]which nosetests[^ ] ")
9716 (string-append nose "/bin/nosetests "))))
9720 (setenv "PYTHON" (or (which "python3") (which "python")))
9721 (setenv "PYCONFIG" (or (which "python3-config")
9722 (which "python-config")))
9724 ;; No need to extend PYTHONPATH to find the built package, since
9725 ;; the Makefile will build anyway
9726 (zero? (system* "make" "check")))))))
9728 `(("procps" ,procps))) ; required for tests
9730 "https://github.com/dvarrazzo/py-setproctitle")
9732 "Setproctitle implementation for Python to customize the process title")
9733 (description "The library allows a process to change its title (as displayed
9734 by system tools such as ps and top).
9736 Changing the title is mostly useful in multi-process systems, for
9737 example when a master process is forked: changing the children's title
9738 allows to identify the task each process is busy with. The technique
9739 is used by PostgreSQL and the OpenSSH Server for example.")
9740 (license license:bsd-3)
9741 (properties `((python2-variant . ,(delay python2-setproctitle))))))
9743 (define-public python2-setproctitle
9744 (let ((base (package-with-python2
9745 (strip-python2-variant python-setproctitle))))
9748 (native-inputs `(("python2-nose" ,python2-nose)
9749 ,@(package-native-inputs base))))))
9751 (define-public python-validictory
9753 (name "python-validictory")
9758 (uri (pypi-uri "validictory" version))
9761 "1zf1g9sw47xzp5f80bd94pb42j9yqv82lcrgcvdwr6nkaphfi37q"))))
9762 (build-system python-build-system)
9765 (modify-phases %standard-phases
9766 (add-after 'unpack 'bootstrap
9767 ;; Move the tests out of the package directory to avoid
9770 (rename-file "validictory/tests" "tests")
9771 (delete-file "tests/__init__.py")))
9774 ;; Extend PYTHONPATH so the built package will be found.
9775 (setenv "PYTHONPATH"
9776 (string-append (getcwd) "/build/lib:"
9777 (getenv "PYTHONPATH")))
9778 (zero? (system* "py.test" "-vv" )))))))
9780 `(("python-pytest" ,python-pytest)))
9782 "https://github.com/jamesturk/validictory")
9783 (synopsis "General purpose Python data validator")
9784 (description "It allows validation of arbitrary Python data structures.
9786 The schema format is based on the JSON Schema
9787 proposal (http://json-schema.org), so combined with json the library is also
9788 useful as a validator for JSON data.")
9789 (license license:expat)))
9791 (define-public python2-validictory
9792 (package-with-python2 python-validictory))
9794 (define-public python-pyev
9796 (name "python-pyev")
9801 (uri (pypi-uri "pyev" version))
9804 "0rf603lc0s6zpa1nb25vhd8g4y337wg2wyz56i0agsdh7jchl0sx"))))
9805 (build-system python-build-system)
9807 `(#:tests? #f ; no test suite
9809 (modify-phases %standard-phases
9810 (add-after 'unpack 'patch
9811 (lambda* (#:key inputs #:allow-other-keys)
9812 (let ((libev (string-append (assoc-ref inputs "libev")
9813 "/lib/libev.so.4")))
9814 (substitute* "setup.py"
9815 (("libev_dll_name = find_library\\(\\\"ev\\\"\\)")
9816 (string-append "libev_dll_name = \"" libev "\"")))))))))
9818 `(("libev" ,libev)))
9819 (home-page "http://pythonhosted.org/pyev/")
9820 (synopsis "Python libev interface")
9821 (description "Pyev provides a Python interface to libev.")
9822 (license license:gpl3)))
9824 (define-public python2-pyev
9825 (package-with-python2 python-pyev))
9827 (define-public python-imagesize
9829 (name "python-imagesize")
9834 (uri (pypi-uri "imagesize" version))
9837 "0qk07k0z4241lkzzjji7z4da04pcvg7bfc4xz1934zlqhwmwdcha"))))
9838 (build-system python-build-system)
9840 '(;; Test files are not distributed on PyPi:
9841 ;; https://github.com/shibukawa/imagesize_py/issues/7
9843 (home-page "https://github.com/shibukawa/imagesize_py")
9844 (synopsis "Gets image size of files in variaous formats in Python")
9846 "This package allows determination of image size from
9847 PNG, JPEG, JPEG2000 and GIF files in pure Python.")
9848 (license license:expat)))
9850 (define-public python2-imagesize
9851 (package-with-python2 python-imagesize))
9853 (define-public python-termstyle
9855 (name "python-termstyle")
9860 (uri (pypi-uri "termstyle" version))
9863 "17wzkkcqy5zc0g68xlad3kcv66iw14d2pwqc0h9420gak0vbhx7g"))))
9864 (build-system python-build-system)
9867 (modify-phases %standard-phases
9870 (zero? (system* "python" "test3.py")))))))
9871 (home-page "https://github.com/gfxmonk/termstyle")
9872 (synopsis "Console text coloring for Python")
9873 (description "This package provides console text coloring for Python.")
9874 (license license:bsd-3)))
9876 (define-public python-argcomplete
9878 (name "python-argcomplete")
9883 (uri (pypi-uri "argcomplete" version))
9886 "11bwiw6j0nilgz81xnw6f1npyga3prp8asjqrm87cdr3ria5l03x"))))
9887 (build-system python-build-system)
9889 `(("python-pexpect" ,python-pexpect)
9891 ("bash-full" ,bash))) ;full Bash for 'test_file_completion'
9892 (home-page "https://github.com/kislyuk/argcomplete")
9893 (synopsis "Shell tab completion for Python argparse")
9894 (description "argcomplete provides extensible command line tab completion
9895 of arguments and options for Python scripts using @code{argparse}. It's
9896 particularly useful for programs with many options or sub-parsers that can
9897 dynamically suggest completions; for example, when browsing resources over the
9899 (license license:asl2.0)))
9901 (define-public python2-argcomplete
9902 (package-with-python2 python-argcomplete))
9904 (define-public python-xopen
9906 (name "python-xopen")
9911 (uri (pypi-uri "xopen" version))
9914 "1wx6mylzcsyhjl19ycb83qq6iqpmr927lz62njfsar6ldsj0qcni"))
9915 (file-name (string-append name "-" version ".tar.gz"))))
9916 (build-system python-build-system)
9917 (home-page "https://github.com/marcelm/xopen/")
9918 (synopsis "Open compressed files transparently")
9919 (description "This module provides an @code{xopen} function that works like
9920 Python's built-in @code{open} function, but can also deal with compressed files.
9921 Supported compression formats are gzip, bzip2 and, xz, and are automatically
9922 recognized by their file extensions. The focus is on being as efficient as
9923 possible on all supported Python versions.")
9924 (license license:expat)))
9926 (define-public python2-xopen
9927 (package-with-python2 python-xopen))
9929 (define-public python2-cheetah
9931 (name "python2-cheetah")
9936 (uri (pypi-uri "Cheetah" version))
9939 "0l5mm4lnysjkzpjr95q5ydm9xc8bv43fxmr79ypybrf1y0lq4c5y"))))
9940 (build-system python-build-system)
9942 `(#:python ,python-2))
9944 `(("python2-markdown" ,python2-markdown)))
9945 (home-page "https://pythonhosted.org/Cheetah/")
9946 (synopsis "Template engine")
9947 (description "Cheetah is a text-based template engine and Python code
9950 Cheetah can be used as a standalone templating utility or referenced as
9951 a library from other Python applications. It has many potential uses,
9952 but web developers looking for a viable alternative to ASP, JSP, PHP and
9953 PSP are expected to be its principle user group.
9957 @item Generates HTML, SGML, XML, SQL, Postscript, form email, LaTeX, or any other
9959 @item Cleanly separates content, graphic design, and program code.
9960 @item Blends the power and flexibility of Python with a simple template language
9961 that non-programmers can understand.
9962 @item Gives template writers full access to any Python data structure, module,
9963 function, object, or method in their templates.
9964 @item Makes code reuse easy by providing an object-orientated interface to
9965 templates that is accessible from Python code or other Cheetah templates.
9966 One template can subclass another and selectively reimplement sections of it.
9967 @item Provides a simple, yet powerful, caching mechanism that can dramatically
9968 improve the performance of a dynamic website.
9969 @item Compiles templates into optimized, yet readable, Python code.
9971 (license (license:x11-style "file://LICENSE"))))
9973 (define-public python-dulwich
9975 (name "python-dulwich")
9980 (uri (list (string-append "https://www.dulwich.io/releases/"
9981 "dulwich-" version ".tar.gz")
9982 (pypi-uri "dulwich" version)))
9985 "1aa1xfrxkc3j9s4xi0llhf5gndyi9ryprcxsqfa5fcb8ph34981q"))))
9986 (build-system python-build-system)
9989 (modify-phases %standard-phases
9990 (add-before 'check 'fix-tests
9991 (lambda* (#:key inputs #:allow-other-keys)
9992 ;; The tests use Popen with a custom environment which doesn't
9994 (substitute* "dulwich/tests/compat/utils.py"
9995 (("'git'") (string-append "'"
9998 (substitute* '("dulwich/tests/test_repository.py"
9999 "dulwich/tests/test_hooks.py")
10000 (("#!/bin/sh") (string-append "#!" (which "sh"))))
10001 (setenv "TEST_RUNNER" "unittest")
10002 (setenv "PYTHONHASHSEED" "random")
10005 `(("python-fastimport" ,python-fastimport)))
10007 `(("python-mock" ,python-mock)
10008 ("python-geventhttpclient" ,python-geventhttpclient)
10010 (home-page "https://www.dulwich.io/")
10011 (synopsis "Git implementation in Python")
10012 (description "Dulwich is an implementation of the Git file formats and
10013 protocols written in pure Python.")
10014 ;; Can be used with either license.
10015 (license (list license:asl2.0 license:gpl2+))))
10017 (define-public python2-dulwich
10018 (package-with-python2 python-dulwich))
10020 (define-public python-pbkdf2
10022 (name "python-pbkdf2")
10027 (uri (pypi-uri "pbkdf2" version))
10030 "0yb99rl2mbsaamj571s1mf6vgniqh23v98k4632150hjkwv9fqxc"))))
10031 (build-system python-build-system)
10034 (modify-phases %standard-phases
10037 (setenv "PYTHONPATH"
10038 (string-append (getcwd) "/build/lib:"
10039 (getenv "PYTHONPATH")))
10040 (zero? (system* "python" "test/test_pbkdf2.py")))))))
10042 `(("python-pycrypto" ,python-pycrypto))) ; optional
10043 (home-page "https://www.dlitz.net/software/python-pbkdf2/")
10044 (synopsis "Password-based key derivation")
10045 (description "This module implements the password-based key derivation
10046 function, PBKDF2, specified in RSA PKCS#5 v2.0.
10048 PKCS#5 v2.0 Password-Based Key Derivation is a key derivation function which
10049 is part of the RSA Public Key Cryptography Standards series. The provided
10050 implementation takes a password or a passphrase and a salt value (and
10051 optionally a iteration count, a digest module, and a MAC module) and provides
10052 a file-like object from which an arbitrarly-sized key can be read.")
10053 (license license:expat)))
10055 (define-public python2-pbkdf2
10056 (package-with-python2 python-pbkdf2))
10058 (define-public python-qrcode
10060 (name "python-qrcode")
10065 (uri (pypi-uri "qrcode" version))
10068 "0kljfrfq0c2rmxf8am57333ia41kd0snbm2rnqbdy816hgpcq5a1"))))
10069 (build-system python-build-system)
10071 ;; FIXME: Tests require packaging 'pymaging'.
10074 `(("python-lxml" ,python-lxml) ; for SVG output
10075 ("python-pillow" ,python-pillow) ; for PNG output
10076 ("python-six" ,python-six)))
10077 (home-page "https://github.com/lincolnloop/python-qrcode")
10078 (synopsis "QR Code image generator")
10079 (description "This package provides a pure Python QR Code generator
10080 module. It uses the Python Imaging Library (PIL) to allow for the generation
10083 In addition this package provides a command line tool to generate QR codes and
10084 either write these QR codes to a file or do the output as ascii art at the
10086 (license license:bsd-3)))
10088 (define-public python2-qrcode
10089 (package-with-python2 python-qrcode))
10091 (define-public python-rst2ansi
10093 (name "python-rst2ansi")
10098 (uri (pypi-uri "rst2ansi" version))
10101 "0vzy6gd60l79ff750scl0sz48r1laalkl6md6dwzah4dcadgn5qv"))))
10102 (build-system python-build-system)
10104 `(("python-docutils" ,python-docutils)))
10105 (home-page "https://github.com/Snaipe/python-rst-to-ansi")
10106 (synopsis "Convert RST to ANSI-decorated console output")
10108 "Python module dedicated to rendering RST (reStructuredText) documents
10109 to ansi-escaped strings suitable for display in a terminal.")
10110 (license license:expat)))
10112 (define-public python-ansi2html
10114 (name "python-ansi2html")
10119 (uri (pypi-uri "ansi2html" version))
10122 "1wa00zffprb78w1mqq90dk47czz1knanys2a40zbw2vyapd5lp9y"))))
10123 (build-system python-build-system)
10125 `(("python-mock" ,python-mock)
10126 ("python-nose" ,python-nose)))
10128 `(("python-six" ,python-six)))
10129 (home-page "https://github.com/ralphbean/ansi2html")
10130 (synopsis "Convert ANSI-decorated console output to HTML")
10132 "@command{ansi2html} is a Python library and command line utility for
10133 convering text with ANSI color codes to HTML or LaTeX.")
10134 (license license:gpl3+)))
10136 (define-public python2-ansi2html
10137 (package-with-python2 python-ansi2html))
10139 (define-public python-ddt
10141 (name "python-ddt")
10146 (uri (pypi-uri "ddt" version))
10149 "1c00ikkxr7lha97c81k938bzhgd4pbwamkjn0h4nkhr3xk00zp6n"))))
10150 (build-system python-build-system)
10152 `(("python-mock" ,python-mock)
10153 ("python-nose" ,python-nose)))
10155 `(("python-six" ,python-six)
10156 ("python-pyyaml" ,python-pyyaml)))
10157 (home-page "https://github.com/txels/ddt")
10158 (synopsis "Data-Driven Tests")
10160 "DDT (Data-Driven Tests) allows you to multiply one test case by running
10161 it with different test data, and make it appear as multiple test cases.")
10162 (license license:expat)))
10164 (define-public python2-ddt
10165 (package-with-python2 python-ddt))
10167 (define-public python-pycosat
10169 (name "python-pycosat")
10174 (uri (pypi-uri "pycosat" version))
10177 "1kl3wh1f47rc712n4bmwplbx3fqz3x9i1b587jrbpmvdva4c8f6l"))))
10178 ;; TODO: Unundle picosat. http://fmv.jku.at/picosat/
10179 (build-system python-build-system)
10180 (home-page "https://github.com/ContinuumIO/pycosat")
10181 (synopsis "Bindings to picosat (a SAT solver)")
10183 "This package provides efficient Python bindings to @code{picosat} on
10184 the C level. When importing pycosat, the @code{picosat} solver becomes part
10185 of the Python process itself. @code{picosat} is a @dfn{Boolean Satisfiability
10186 Problem} (SAT) solver.")
10187 (license license:expat)))
10189 (define-public python2-pycosat
10190 (package-with-python2 python-pycosat))
10192 (define-public python2-ruamel.ordereddict
10194 (name "python2-ruamel.ordereddict")
10199 (uri (pypi-uri "ruamel.ordereddict" version))
10202 "1xmkl8v9l9inm2pyxgc1fm5005yxm7fkd5gv74q7lj1iy5qc8n3h"))))
10203 (build-system python-build-system)
10205 `(#:python ,python-2
10207 (modify-phases %standard-phases
10209 (add-after 'install 'check
10210 (lambda* (#:key inputs outputs #:allow-other-keys)
10211 (add-installed-pythonpath inputs outputs)
10212 (zero? (system* "python" "test/testordereddict.py")))))))
10213 (home-page "https://bitbucket.org/ruamel/ordereddict")
10214 (synopsis "Version of dict that keeps keys in insertion order")
10216 "This is an implementation of an ordered dictionary with @dfn{Key
10217 Insertion Order} (KIO: updates of values do not affect the position of the
10218 key), @dfn{Key Value Insertion Order} (KVIO, an existing key's position is
10219 removed and put at the back). The standard library module @code{OrderedDict},
10220 implemented later, implements a subset of @code{ordereddict} functionality.
10221 Sorted dictionaries are also provided. Currently only with @dfn{Key Sorted
10222 Order} (KSO, no sorting function can be specified, but a transform can be
10223 specified to apply on the key before comparison (e.g. @code{string.lower})).")
10224 (license license:expat)))
10226 (define-public python-pypeg2
10228 (name "python-pypeg2")
10233 (uri (pypi-uri "pyPEG2" version))
10236 "0v8ziaam2r637v94ra4dbjw6jzxz99gs5x4i585kgag1v204yb9b"))))
10237 (build-system python-build-system)
10238 (propagated-inputs `(("python-lxml" ,python-lxml)))
10240 ;;https://bitbucket.org/fdik/pypeg/issues/36/test-failures-on-py35
10242 (home-page "https://fdik.org/pyPEG/")
10243 (synopsis "Parsering Expression Grammars in Python")
10244 (description "PyPEG is an intrinsic parser interpreter framework for
10245 Python. It is based on Parsing Expression Grammars, PEG. With pyPEG you can
10246 parse many formal languages.")
10247 (license license:gpl2)))
10249 (define-public python-incremental
10251 (name "python-incremental")
10256 (uri (pypi-uri "incremental" version))
10259 "1cylxdz1cnkm5g3pklna3h2n0i0rks95ir1pnpxfnvpkmab1cxbv"))))
10260 (build-system python-build-system)
10261 (home-page "https://github.com/hawkowl/incremental")
10262 (synopsis "Library for versioning Python projects")
10263 (description "Incremental is a small library that versions your Python
10265 (license license:expat)))
10267 (define-public python2-incremental
10268 (package-with-python2 python-incremental))
10270 (define-public python-automat
10272 (name "python-automat")
10276 (uri (pypi-uri "Automat" version))
10279 "1a7nsrljysfmdqmpn2apfa1gg6rfah4y9sizvns8gb08rx7d07rw"))))
10280 (build-system python-build-system)
10281 ;; We disable the tests because they require python-twisted, while
10282 ;; python-twisted depends on python-automat. Twisted is optional, but the
10283 ;; tests fail if it is not available. Also see
10284 ;; <https://github.com/glyph/automat/issues/71>.
10285 (arguments '(#:tests? #f))
10287 `(("python-m2r" ,python-m2r)
10288 ("python-setuptools-scm" ,python-setuptools-scm)
10289 ("python-graphviz" ,python-graphviz)))
10291 `(("python-six" ,python-six)
10292 ("python-attrs" ,python-attrs)))
10293 (home-page "https://github.com/glyph/Automat")
10294 (synopsis "Self-service finite-state machines")
10295 (description "Automat is a library for concise, idiomatic Python
10296 expression of finite-state automata (particularly deterministic finite-state
10298 (license license:expat)))
10300 (define-public python2-automat
10301 (package-with-python2 python-automat))
10303 (define-public python-m2r
10305 (name "python-m2r")
10309 (uri (pypi-uri "m2r" version))
10312 "1axrwnf425sz4qz3c0qc7yhhki4myzb8rki7pczcsgzznzmqdyxd"))))
10313 (build-system python-build-system)
10315 `(("python-docutils" ,python-docutils)
10316 ("python-mistune" ,python-mistune)))
10318 `(("python-pygments" ,python-pygments)
10319 ("python-mock" ,python-mock)))
10320 (home-page "https://github.com/miyakogi/m2r")
10321 (synopsis "Markdown to reStructuredText converter")
10322 (description "M2R converts a markdown file including reST markups to valid
10324 (license license:expat)))
10326 (define-public python2-m2r
10327 (package-with-python2 python-m2r))
10329 (define-public python-constantly
10331 (name "python-constantly")
10335 (uri (pypi-uri "constantly" version))
10338 "0dgwdla5kfpqz83hfril716inm41hgn9skxskvi77605jbmp4qsq"))))
10339 (build-system python-build-system)
10340 (home-page "https://github.com/twisted/constantly")
10341 (synopsis "Symbolic constants in Python")
10342 (description "Constantly is a Python library that provides symbolic
10343 constant support. It includes collections and constants with text, numeric,
10344 and bit flag values.")
10345 (license license:expat)))
10347 (define-public python2-constantly
10348 (package-with-python2 python-constantly))
10350 (define-public python-attrs
10352 (name "python-attrs")
10356 (uri (pypi-uri "attrs" version))
10359 "04gx08ikpk26wnq22f7l42gapcvk8iz1512r927k6sadz6cinkax"))))
10360 (build-system python-build-system)
10362 `(("python-pytest" ,python-pytest)
10363 ("python-hypothesis" ,python-hypothesis)
10364 ("python-zope-interface" ,python-zope-interface)
10365 ("python-six" ,python-six)))
10366 (home-page "https://github.com/python-attrs/attrs/")
10367 (synopsis "Attributes without boilerplate")
10368 (description "@code{attrs} is a Python package with class decorators that
10369 ease the chores of implementing the most common attribute-related object
10371 (license license:expat)))
10373 (define-public python2-attrs
10374 (package-with-python2 python-attrs))
10376 (define-public python2-cliapp
10378 (name "python2-cliapp")
10379 (version "1.20170823")
10383 (uri (string-append
10384 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/cliapp/snapshot/cliapp-"
10385 version ".tar.gz"))
10388 "1i9gik0xrj6jmi95s5w988jl1y265baz5xm5pbqdyvsh8h9ln6yq"))))
10389 (build-system python-build-system)
10391 `(#:python ,python-2
10393 (modify-phases %standard-phases
10394 ;; check phase needs to be run before the build phase. If not,
10395 ;; coverage-test-runner looks for tests for the built source files,
10398 (add-before 'build 'check
10400 ;; Disable python3 tests
10401 (substitute* "check"
10402 (("python3") "# python3"))
10403 (zero? (system* "./check")))))))
10405 `(("python2-coverage-test-runner" ,python2-coverage-test-runner)
10406 ("python2-pep8" ,python2-pep8)))
10408 `(("python2-pyaml" ,python2-pyaml)))
10409 (home-page "https://liw.fi/cliapp/")
10410 (synopsis "Python framework for command line programs")
10411 (description "@code{python2-cliapp} is a python framework for
10412 command line programs. It contains the typical stuff such programs
10413 need to do, such as parsing the command line for options, and
10414 iterating over input files.")
10415 (license license:gpl2+)))
10417 (define-public python2-ttystatus
10419 (name "python2-ttystatus")
10424 (uri (string-append
10425 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/ttystatus/snapshot/ttystatus-"
10426 version ".tar.gz"))
10429 "0vivqbw7ddhsq1zj3g9cvvv4f0phl0pis2smsnwcr2szz2fk3hl6"))))
10430 (build-system python-build-system)
10432 `(("python2-coverage-test-runner" ,python2-coverage-test-runner)
10433 ("python2-pep8" ,python2-pep8)))
10435 `(#:python ,python-2
10437 (modify-phases %standard-phases
10438 ;; check phase needs to be run before the build phase. If not,
10439 ;; coverage-test-runner looks for tests for the built source files,
10442 (add-before 'build 'check
10444 (zero? (system* "make" "check")))))))
10445 (home-page "https://liw.fi/ttystatus/")
10446 (synopsis "Python library for showing progress reporting and
10447 status updates on terminals")
10448 (description "@code{python2-ttystatus} is a python library for
10449 showing progress reporting and status updates on terminals, for
10450 command line programs. Output is automatically adapted to the width
10451 of the terminal: truncated if it does not fit, and resized if the
10452 terminal size changes.")
10453 (license license:gpl3+)))
10455 (define-public python2-tracing
10457 (name "python2-tracing")
10462 (uri (string-append
10463 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/python-tracing/snapshot/tracing-"
10464 version ".tar.gz"))
10467 "06cw4zg42fsvqy372vi2whj26w56vzg5axhzwdjc2bgwf03garbw"))))
10468 (build-system python-build-system)
10470 `(#:python ,python-2))
10471 (home-page "https://liw.fi/tracing/")
10472 (synopsis "Python debug logging helper")
10473 (description "@code{python2-tracing} is a python library for
10474 logging debug messages. It provides a way to turn debugging messages
10475 on and off, based on the filename they occur in. It is much faster
10476 than using @code{logging.Filter} to accomplish the same thing, which
10477 matters when code is run in production mode. The actual logging still
10478 happens using the @code{logging} library.")
10479 (license license:gpl3+)))
10481 (define-public python2-larch
10483 (name "python2-larch")
10484 (version "1.20151025")
10488 (uri (string-append
10489 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/larch/snapshot/larch-"
10490 version ".tar.gz"))
10491 (patches (search-patches
10492 "python2-larch-coverage-4.0a6-compatibility.patch"))
10495 "1p4knkkavlqymgciz2wbcnfrdgdbafhg14maplnk4vbw0q8xs663"))))
10496 (build-system python-build-system)
10498 `(#:python ,python-2
10500 (modify-phases %standard-phases
10501 ;; check phase needs to be run before the build phase. If not,
10502 ;; coverage-test-runner looks for tests for the built source files,
10505 (add-before 'build 'check
10507 (zero? (system* "make" "check")))))))
10509 `(("cmdtest" ,cmdtest)
10510 ("python2-coverage-test-runner" ,python2-coverage-test-runner)))
10512 `(("python2-tracing" ,python2-tracing)))
10513 (home-page "https://liw.fi/larch/")
10514 (synopsis "Python copy-on-write B-tree library")
10515 (description "@code{python2-larch} is an implementation of
10516 particular kind of B-tree, based on research by Ohad Rodeh. See
10517 @url{http://liw.fi/larch/ohad-btrees-shadowing-clones.pdf} for details
10518 on the data structure.
10520 The distinctive feature of this B-tree is that a node is never
10521 (conceptually) modified. Instead, all updates are done by
10522 copy-on-write. This makes it easy to clone a tree, and modify only the
10523 clone, while other processes access the original tree.")
10524 (license license:gpl3+)))
10526 (define-public python-astroid
10528 (name "python-astroid")
10533 (uri (string-append
10534 "https://github.com/PyCQA/astroid/archive/astroid-"
10535 version ".tar.gz"))
10538 "0isn5p7f9n48hmksgbrj7dkm9dyglnayzn5jngk37qywg8a74ngn"))))
10539 (build-system python-build-system)
10541 `(("python-lazy-object-proxy" ,python-lazy-object-proxy)
10542 ("python-six" ,python-six)
10543 ("python-wrapt" ,python-wrapt)))
10546 (modify-phases %standard-phases
10549 (zero? (system* "python" "-m" "unittest" "discover"
10550 "-p" "unittest*.py")))))))
10551 (home-page "https://github.com/PyCQA/astroid")
10552 (synopsis "Common base representation of python source code for pylint and
10554 (description "@code{python-astroid} provides a common base representation
10555 of python source code for projects such as pychecker, pyreverse, pylint, etc.
10557 It provides a compatible representation which comes from the _ast module. It
10558 rebuilds the tree generated by the builtin _ast module by recursively walking
10559 down the AST and building an extended ast. The new node classes have
10560 additional methods and attributes for different usages. They include some
10561 support for static inference and local name scopes. Furthermore, astroid
10562 builds partial trees by inspecting living objects.")
10563 (license license:lgpl2.1+)
10564 (properties `((python2-variant . ,(delay python2-astroid))))))
10566 (define-public python2-astroid
10567 (let ((base (package-with-python2
10568 (strip-python2-variant python-astroid))))
10569 (package (inherit base)
10571 `(("python2-backports-functools-lru-cache"
10572 ,python2-backports-functools-lru-cache)
10573 ("python2-enum34" ,python2-enum34)
10574 ("python2-singledispatch" ,python2-singledispatch)
10575 ,@(package-propagated-inputs base))))))
10577 (define-public python-isort
10579 (name "python-isort")
10584 (uri (string-append
10585 "https://github.com/timothycrosley/isort/archive/"
10586 version ".tar.gz"))
10587 (file-name (string-append name "-" version ".tar.gz"))
10590 "0zsrgkb0krn5476yncy5dd56k7dk34zqb4bnlvwy44ixgilyjmfh"))))
10591 (build-system python-build-system)
10593 `(("python-mock" ,python-mock)
10594 ("python-pytest" ,python-pytest)))
10595 (home-page "https://github.com/timothycrosley/isort")
10596 (synopsis "Python utility/library to sort python imports")
10597 (description "@code{python-isort} is a python utility/library to sort
10598 imports alphabetically, and automatically separated into sections. It
10599 provides a command line utility, a python library and plugins for various
10601 (license license:expat)))
10603 (define-public python2-isort
10604 (package-with-python2 python-isort))
10606 (define-public python2-backports-functools-lru-cache
10608 (name "python2-backports-functools-lru-cache")
10613 ;; only the pypi tarballs contain the necessary metadata
10614 (uri (pypi-uri "backports.functools_lru_cache" version))
10617 "158ysf2hb0q4p4695abfiym9x1ywg0dgh8a3apd7gqaaxjy22jj4"))))
10618 (build-system python-build-system)
10620 `(("python2-setuptools-scm" ,python2-setuptools-scm)))
10622 `(#:python ,python-2))
10623 (home-page "https://github.com/jaraco/backports.functools_lru_cache")
10624 (synopsis "Backport of functools.lru_cache from Python 3.3")
10625 (description "@code{python2-backports-functools-lru-cache} is a backport
10626 of @code{functools.lru_cache} from python 3.3.")
10627 (license license:expat)))
10629 (define-public python-configparser
10631 (name "python-configparser")
10636 (uri (string-append
10637 "https://bitbucket.org/ambv/configparser/get/"
10638 version ".tar.bz2"))
10639 (file-name (string-append name "-" version ".tar.gz"))
10642 "0waq40as14abwzbb321hfz4vr1fi363nscy32ga14qvfygrg96wa"))))
10643 (build-system python-build-system)
10644 (home-page "http://docs.python.org/py3k/library/configparser.html")
10645 (synopsis "Backport of configparser from python 3.5")
10646 (description "@code{python-configparser} is a backport of
10647 @code{configparser} from Python 3.5 so that it can be used directly
10648 in other versions.")
10649 (license license:expat)))
10651 (define-public python2-configparser
10652 (package-with-python2 python-configparser))
10654 (define-public python-mando
10656 (name "python-mando")
10661 (uri (pypi-uri "mando" version))
10664 "0q05h66439gqdmlk4jqm6xrwrzfdgs4mwk70barxhr2y83qbbdc0"))))
10665 (build-system python-build-system)
10667 `(("python-rst2ansi" ,python-rst2ansi)))
10669 `(("python-sphinx" ,python-sphinx-1.5.3)
10670 ("python-paramunittest" ,python-paramunittest)))
10671 (home-page "https://mando.readthedocs.org/")
10673 "Wrapper around argparse, allowing creation of complete CLI applications")
10675 "This package is a wrapper around argparse, allowing you to write complete CLI
10676 applications in seconds while maintaining all the flexibility.")
10677 (license license:expat)))
10679 (define-public python2-mando
10680 (package-with-python2 python-mando))
10682 (define-public python-mando-0.3.1
10683 ;; python-radon (version 1.5.0) has a requirement
10684 ;; for mando<0.4,>=0.3
10686 (inherit python-mando)
10687 (name "python-mando")
10692 (uri (string-append "https://github.com/rubik/mando/archive/v"
10697 "17jlkdpqw22z1nyml5ybslilqkzmnk0dxxjml8bfghav1l5hbwd2"))))))
10699 (define-public python-fudge
10701 (name "python-fudge")
10702 ;; 0.9.6 is the latest version suitable for testing the "fabric" Python 2
10703 ;; package, which is currently the only use of this package.
10708 (uri (pypi-uri "fudge" version))
10711 "185ia3vr3qk4f2s1a9hdxb8ci4qc0x0xidrad96pywg8j930qs9l"))))
10712 (build-system python-build-system)
10714 `(#:tests? #f)) ;XXX: Tests require the NoseJS Python package.
10715 (home-page "https://github.com/fudge-py/fudge")
10716 (synopsis "Replace real objects with fakes/mocks/stubs while testing")
10718 "Fudge is a Python module for using fake objects (mocks and stubs) to
10721 In readable Python code, you declare the methods available on your fake object
10722 and how they should be called. Then you inject that into your application and
10723 start testing. This declarative approach means you don’t have to record and
10724 playback actions and you don’t have to inspect your fakes after running code.
10725 If the fake object was used incorrectly then you’ll see an informative
10726 exception message with a traceback that points to the culprit.")
10727 (license license:expat)))
10729 (define-public python2-fudge
10730 (package-with-python2 python-fudge))
10732 (define-public python-mwclient
10734 (name "python-mwclient")
10739 ;; The PyPI version wouldn't contain tests.
10740 (uri (string-append "https://github.com/mwclient/mwclient/archive/"
10741 "v" version ".tar.gz"))
10744 "1jj0yhilkjir00719fc7w133x7hdyhkxhk6xblla4asig45klsfv"))))
10745 (build-system python-build-system)
10747 `(("python-requests" ,python-requests)
10748 ("python-requests-oauthlib"
10749 ,python-requests-oauthlib)
10750 ("python-six" ,python-six)))
10752 `(("python-mock" ,python-mock)
10753 ("python-pytest" ,python-pytest)
10754 ("python-pytest-pep8" ,python-pytest-pep8)
10755 ("python-pytest-cache" ,python-pytest-cache)
10756 ("python-pytest-cov" ,python-pytest-cov)
10757 ("python-responses" ,python-responses)))
10758 (home-page "https://github.com/btongminh/mwclient")
10759 (synopsis "MediaWiki API client")
10760 (description "This package provides a MediaWiki API client.")
10761 (license license:expat)))
10763 (define-public python2-mwclient
10764 (package-with-python2 python-mwclient))
10766 (define-public python-utils
10768 (name "python-utils")
10772 (uri (pypi-uri "python-utils" version))
10775 "1mcsy6q5am4ya72rgkpb6kax6vv7c93cfkkas89xnpa4sj9zf28p"))))
10776 (build-system python-build-system)
10778 `(("pytest-runner" ,python-pytest-runner)
10779 ("pytest" ,python-pytest)
10780 ("six" ,python-six)))
10781 (home-page "https://github.com/WoLpH/python-utils")
10782 (synopsis "Convenient utilities not included with the standard Python install")
10784 "Python Utils is a collection of small Python functions and classes which
10785 make common patterns shorter and easier.")
10786 (license license:bsd-2)))
10788 (define-public python2-utils
10789 (package-with-python2 python-utils))
10791 (define-public python-sphinx-me
10793 (name "python-sphinx-me")
10798 (uri (pypi-uri "sphinx-me" version))
10801 "06jzgp213zihnvpcy2y5jy3ykid3apc2ncp2pg6a2g05lhiziglq"))))
10802 (build-system python-build-system)
10803 (home-page "https://github.com/stephenmcd/sphinx-me")
10804 (synopsis "Create a Sphinx documentation shell")
10806 "Create a Sphinx documentation shell for your project and include the
10807 README file as the documentation index. It handles extracting the required
10808 meta data such as the project name, author and version from your project for
10809 use in your Sphinx docs.")
10810 (license license:bsd-2)))
10812 (define-public python2-sphinx-me
10813 (package-with-python2 python-sphinx-me))
10815 (define-public python-diff-match-patch
10817 (name "python-diff-match-patch")
10818 (version "20121119")
10822 (uri (pypi-uri "diff-match-patch" version))
10825 "0k1f3v8nbidcmmrk65m7h8v41jqi37653za9fcs96y7jzc8mdflx"))))
10826 (build-system python-build-system)
10827 (home-page "https://code.google.com/p/google-diff-match-patch")
10828 (synopsis "Synchronize plain text")
10829 (description "Diff Match and Patch libraries offer robust algorithms to
10830 perform the operations required for synchronizing plain text.")
10831 (license license:asl2.0)))
10833 (define-public python2-diff-match-patch
10834 (package-with-python2 python-diff-match-patch))
10836 (define-public python-dirsync
10838 (name "python-dirsync")
10843 (uri (pypi-uri "dirsync" version ".zip"))
10846 "1hcdvmkwd5512zbxpin0k7bx5bkgzy3swjx7d0kj1y45af6r75v2"))))
10847 (build-system python-build-system)
10849 `(("unzip" ,unzip)))
10851 `(("six" ,python-six)))
10852 (home-page "https://bitbucket.org/tkhyn/dirsync")
10853 (synopsis "Advanced directory tree synchronisation tool")
10854 (description "Advanced directory tree synchronisation tool.")
10855 (license license:expat)))
10857 (define-public python2-dirsync
10858 (package-with-python2 python-dirsync))
10860 (define-public python-levenshtein
10862 (name "python-levenshtein")
10867 (uri (pypi-uri "python-Levenshtein" version))
10870 "1c9ybqcja31nghfcc8xxbbz9h60s9qi12b9hr4jyl69xbvg12fh3"))))
10871 (build-system python-build-system)
10872 (home-page "https://github.com/ztane/python-Levenshtein")
10873 (synopsis "Fast computation of Levenshtein distance and string similarity")
10875 "The Levenshtein Python C extension module contains functions for fast computation of
10877 @item Levenshtein (edit) distance, and edit operations
10878 @item string similarity
10879 @item approximate median strings, and generally string averaging
10880 @item string sequence and set similarity
10882 It supports both normal and Unicode strings.")
10883 (license license:gpl2+)))
10885 (define-public python2-levenshtein
10886 (package-with-python2 python-levenshtein))
10888 (define-public python-scandir
10890 (name "python-scandir")
10895 (uri (pypi-uri "scandir" version))
10897 (base32 "0yjrgp0mxp3d8bjkq2m1ac2ys8n76wykksvgyjrnil9gr3fx7a5d"))))
10898 (build-system python-build-system)
10899 (home-page "https://github.com/benhoyt/scandir")
10900 (synopsis "Directory iteration function")
10902 "Directory iteration function like os.listdir(), except that instead of
10903 returning a list of bare filenames, it yields DirEntry objects that include
10904 file type and stat information along with the name. Using scandir() increases
10905 the speed of os.walk() by 2-20 times (depending on the platform and file
10906 system) by avoiding unnecessary calls to os.stat() in most cases.")
10907 (license license:bsd-3)))
10909 (define-public python2-scandir
10910 (package-with-python2 python-scandir))
10912 (define-public python2-stemming
10914 (name "python2-stemming")
10919 (uri (pypi-uri "stemming" version))
10921 (base32 "0ldwa24gnnxhniv0fhygkpc2mwgd93q10ag8rvzayv6hw418frsr"))))
10922 (build-system python-build-system)
10924 `(#:python ,python-2))
10925 (home-page "https://bitbucket.org/mchaput/stemming/overview")
10926 (synopsis "Python implementations of various stemming algorithms")
10928 "Python implementations of the Porter, Porter2, Paice-Husk, and Lovins
10929 stemming algorithms for English. These implementations are straightforward and
10930 efficient, unlike some Python versions of the same algorithms available on the
10931 Web. This package is an extraction of the stemming code included in the Whoosh
10933 (license license:public-domain)))
10935 (define-public python-factory-boy
10937 (name "python-factory-boy")
10942 (uri (pypi-uri "factory_boy" version))
10944 (base32 "1fvin6san5xsjh2c4y18caj2lnmwxlylyqm8mh1yc6rp38wlwr56"))))
10945 (build-system python-build-system)
10947 ;; Tests are not included in the tarball.
10950 `(("faker" ,python-faker)))
10951 (home-page "https://github.com/benhoyt/scandir")
10952 (synopsis "Versatile test fixtures replacement")
10954 "Factory_boy is a fixtures replacement based on thoughtbot’s factory_girl.
10956 As a fixtures replacement tool, it aims to replace static, hard to maintain
10957 fixtures with easy-to-use factories for complex object.
10959 Instead of building an exhaustive test setup with every possible combination
10960 of corner cases, factory_boy allows you to use objects customized for the
10961 current test, while only declaring the test-specific fields")
10962 (license license:expat)))
10964 (define-public python2-factory-boy
10965 (package-with-python2 python-factory-boy))
10967 (define-public python-translate-toolkit
10969 (name "python-translate-toolkit")
10974 (uri (pypi-uri "translate-toolkit" version ".tar.bz2"))
10976 (base32 "1vlkwrg83vb17jc36pmwh2b7jphwf390lz0jw8hakcg16qhwypvq"))))
10977 (build-system python-build-system)
10979 `(("python-pytest" ,python-pytest)
10980 ("python-sphinx" ,python-sphinx)))
10982 `(("python-babel" ,python-babel)
10983 ("python-beautifulsoup4" ,python-beautifulsoup4)
10984 ("python-chardet" ,python-chardet)
10985 ("python-diff-match-patch" ,python-diff-match-patch)
10986 ("python-levenshtein" ,python-levenshtein)
10987 ("python-lxml" ,python-lxml)
10988 ("python-six" ,python-six)
10989 ("python-vobject" ,python-vobject)
10990 ("python-pyyaml" ,python-pyyaml)))
10992 ;; TODO: tests are not run, because they end with
10993 ;; TypeError: parse() missing 2 required positional arguments: 'tree' and
10995 ;; during test setup.
10997 (home-page "http://toolkit.translatehouse.org")
10998 (synopsis "Tools and API for translation and localization engineering")
11000 "Tools and API for translation and localization engineering. It contains
11001 several utilities, as well as an API for building localization tools.")
11002 (license license:gpl2+)))
11004 (define-public python2-translate-toolkit
11005 (package-with-python2 python-translate-toolkit))
11007 (define-public python-packaging
11009 (name "python-packaging")
11014 (uri (pypi-uri "packaging" version))
11017 "17k1xbjshackwvbsnxqixbph8rbqhz4bf4g3al5xyzhavxgq6l2x"))))
11018 (build-system python-build-system)
11020 `(("python-pretend" ,python-pretend)
11021 ("python-pytest" ,python-pytest)))
11023 `(("python-pyparsing" ,python-pyparsing)
11024 ("python-six" ,python-six)))
11025 (home-page "https://github.com/pypa/packaging")
11026 (synopsis "Core utilities for Python packages")
11027 (description "Packaging is a Python module for dealing with Python packages.
11028 It offers an interface for working with package versions, names, and dependency
11030 ;; From 'LICENSE': This software is made available under the terms of
11031 ;; *either* of the licenses found in LICENSE.APACHE or LICENSE.BSD.
11032 ;; Contributions to this software is made under the terms of *both* these
11034 (license (list license:asl2.0 license:bsd-2))))
11036 (define-public python2-packaging
11037 (package-with-python2 python-packaging))
11039 (define-public python-relatorio
11041 (name "python-relatorio")
11046 (uri (pypi-uri "relatorio" version))
11049 "0lincq79mzgazwd9gh41dybjh9c3n87r83pl8nk3j79aihyfk84z"))))
11050 (build-system python-build-system)
11052 `(("python-lxml" ,python-lxml)
11053 ("python-genshi" ,python-genshi)))
11054 (home-page "https://relatorio.tryton.org/")
11055 (synopsis "Templating library able to output ODT and PDF files")
11056 (description "Relatorio is a templating library which provides a way to
11057 easily output ODT, ODS, PNG, SVG and several other kinds of files. Support
11058 for more filetypes can be easily added by creating plugins for them.")
11059 (license license:gpl3+)))
11061 (define-public python2-relatorio
11062 (package-with-python2 python-relatorio))
11064 (define-public python-radon
11066 (name "python-radon")
11071 (uri (pypi-uri "radon" version))
11074 "1h6jv36am0i827182a04ki6291lyx4kp957xfr5njgprj4nd0qsl"))))
11075 (build-system python-build-system)
11077 `(("python-colorama" ,python-colorama)
11078 ("python-flake8-polyfill" ,python-flake8-polyfill)
11079 ("python-mando" ,python-mando-0.3.1)))
11081 `(("python-flake8" ,python-flake8)
11082 ("python-tox" ,python-tox)
11083 ("python-pytest" ,python-pytest)
11084 ("python-paramunittest" ,python-paramunittest)))
11085 (home-page "https://radon.readthedocs.org/")
11086 (synopsis "Code Metrics in Python")
11087 (description "Radon is a Python tool which computes various code metrics.
11088 Supported metrics are:
11090 @item raw metrics: SLOC, comment lines, blank lines, &c.
11091 @item Cyclomatic Complexity (i.e. McCabe’s Complexity)
11092 @item Halstead metrics (all of them)
11093 @item the Maintainability Index (a Visual Studio metric)
11095 (license license:expat)))
11097 (define-public python2-radon
11098 (package-with-python2 python-radon))
11100 (define-public python-sure
11102 (name "python-sure")
11107 (uri (pypi-uri "sure" version))
11110 "1iyqsy2d6radi88g1qf0lziy5b39h5cpb3g5jiqyb4xi46ig3x1z"))))
11111 (build-system python-build-system)
11113 `(("python-mock" ,python-mock)
11114 ("python-six" ,python-six)))
11116 `(("python-nose" ,python-nose)))
11117 (home-page "https://github.com/gabrielfalcao/sure")
11118 (synopsis "Automated testing library in python for python")
11120 "Sure is a python library that leverages a DSL for writing assertions.
11121 Sure is heavily inspired by @code{RSpec Expectations} and @code{should.js}.")
11122 (license license:gpl3+)))
11124 (define-public python2-sure
11125 (package-with-python2 python-sure))
11127 (define-public python2-couleur
11128 ;; This package does not seem to support python3 at all, hence,
11129 ;; only the python2 variant definition is provided.
11131 (name "python2-couleur")
11136 (uri (pypi-uri "couleur" version))
11139 "1qqaxyqz74wvid0cr119dhcwz0h0if5b5by44zl49pd5z65v58k1"))))
11140 (build-system python-build-system)
11142 `(#:python ,python-2))
11143 (home-page "https://github.com/gabrielfalcao/couleur")
11145 "ANSI terminal tool for python, colored shell and other handy fancy features")
11147 "@code{Couleur} provides python programs a way to use the ANSI features in a unix
11148 terminal such as coloured output in the shell, overwriting output, indentation, etc.")
11149 ;; README.md says ASL2.0, but all source code headers are LGPL3+.
11150 ;; https://github.com/gabrielfalcao/couleur/issues/11
11151 (license license:lgpl3+)))
11153 (define-public python-misaka
11155 (name "python-misaka")
11160 (uri (pypi-uri "misaka" version))
11163 "1yqrq3a5rracirmvk52n28nn6ckdaz897gnigv89a9gmyn87sqw7"))))
11164 (build-system python-build-system)
11166 `(;; Line 37 of setup.py calls self.run_command('develop')
11167 ;; in the 'check' phase. This command seems to be trying
11169 ;; /gnu/store/...-python-<version>/lib/python<version>/site-packages/
11170 ;; for which it does not have the permission to write.
11173 `(("python-cffi" ,python-cffi)))
11174 (home-page "https://github.com/FSX/misaka")
11175 (synopsis "Python binding for Hoedown")
11177 "@code{Misaka} is a CFFI-based binding for @code{Hoedown}, a fast markdown processing
11178 library written in C. It features a fast HTML renderer and functionality to make custom
11179 renderers (e.g. man pages or LaTeX).")
11180 (license license:expat)))
11182 (define-public python2-misaka
11183 (package-with-python2 python-misaka))
11185 (define-public python2-steadymark
11186 ;; This is forced into being a python2 only variant
11187 ;; due to its dependence on couleur that has no support
11190 (name "python2-steadymark")
11195 (uri (pypi-uri "steadymark" version))
11198 "1640i9g8dycql3cc8j0bky0jkzj0q39blfbp4lsgpkprkfgcdk8v"))))
11199 (build-system python-build-system)
11201 `(("python-couleur" ,python2-couleur)
11202 ("python-sure" ,python2-sure)
11203 ("python-misaka" ,python2-misaka)))
11205 `(#:python ,python-2
11207 (modify-phases %standard-phases
11208 (add-before 'build 'patch-setup-py
11210 ;; Update requirements from dependency==version
11211 ;; to dependency>=version
11212 (substitute* "setup.py"
11215 (home-page "https://github.com/gabrielfalcao/steadymark")
11216 (synopsis "Markdown-based test runner for python")
11218 "@code{Steadymark} allows documentation to be written in github-flavoured
11219 markdown. The documentation may contain snippets of code surrounded by python
11220 code blocks and @code{Steadymark} will find these snippets and run them, making
11221 sure that there are no old malfunctional examples in the documentation examples.")
11222 (license license:expat)))
11224 (define-public python-jsonpointer
11226 (name "python-jsonpointer")
11231 (uri (pypi-uri "jsonpointer" version))
11234 "1cg0gvgqjysydv6p45v4jywg1jb3v48c7m3cbpi57zgf6nndr9cz"))))
11235 (build-system python-build-system)
11236 (home-page "https://github.com/stefankoegl/python-json-pointer")
11237 (synopsis "Identify specific nodes in a JSON document")
11238 (description "@code{jsonpointer} allows you to access specific nodes
11239 by path in a JSON document (see RFC 6901).")
11240 (license license:bsd-3)))
11242 (define-public python2-jsonpointer
11243 (package-with-python2 python-jsonpointer))
11245 (define-public python-jsonpatch
11247 (name "python-jsonpatch")
11252 ;; pypi version lacks tests.js
11253 (uri (string-append "https://github.com/stefankoegl/python-json-patch/"
11254 "archive/v" version ".tar.gz"))
11255 (file-name (string-append name "-" version ".tar.gz"))
11258 "085ykisl8v7mv9h7hvhdy3l2fjzs4214gx32r5k6nx4f76hbv6y5"))))
11259 (build-system python-build-system)
11261 `(("python-jsonpointer" ,python-jsonpointer)))
11262 (home-page "https://github.com/stefankoegl/python-json-patch")
11263 (synopsis "Applying JSON Patches in Python 2.6+ and 3.x")
11264 (description "@code{jsonpatch} is a library and program that allows
11265 applying JSON Patches according to RFC 6902.")
11266 (license license:bsd-3)))
11268 (define-public python2-jsonpatch
11269 (package-with-python2 python-jsonpatch))
11271 (define-public python-jsonpatch-0.4
11272 (package (inherit python-jsonpatch)
11273 (name "python-jsonpatch")
11278 (uri (string-append "https://github.com/stefankoegl/python-json-patch/"
11279 "archive/v" version ".tar.gz"))
11280 (file-name (string-append name "-" version ".tar.gz"))
11283 "0j0cd9z9zyp8kppp464jxrfgrnbgkzl1yi10i5gsv8yz6d95929d"))))))
11285 (define-public python2-jsonpatch-0.4
11286 (package-with-python2 python-jsonpatch-0.4))
11288 (define-public python-rfc3987
11290 (name "python-rfc3987")
11295 (uri (pypi-uri "rfc3987" version))
11298 "192pclzs2y0yaywqkrlvd0x73740q310kvqvm6jldhi619mq59wi"))))
11299 (build-system python-build-system)
11300 (home-page "https://pypi.python.org/pypi/rfc3987")
11301 (synopsis "Parsing and validation of URIs (RFC 3986) and IRIs (RFC 3987)")
11302 (description "@code{rfc3987} provides routines for parsing and
11303 validation of URIs (see RFC 3986) and IRIs (see RFC 3987).")
11304 (license license:gpl3+)))
11306 (define-public python2-rfc3987
11307 (package-with-python2 python-rfc3987))
11309 (define-public python-validate-email
11311 (name "python-validate-email")
11316 (uri (pypi-uri "validate_email" version))
11319 "1bxffaf5yz2cph8ki55vdvdypbwkvn2xr1firlcy62vqbzf1jivq"))))
11320 (build-system python-build-system)
11321 (home-page "https://github.com/syrusakbary/validate_email")
11322 (synopsis "Verifies if an email address is valid and really exists")
11323 (description "@code{validate_email} can be used to verify if an email
11324 address is valid and really exists.")
11325 (license license:lgpl3+)))
11327 (define-public python2-validate-email
11328 (package-with-python2 python-validate-email))
11330 (define-public python-flex
11332 (name "python-flex")
11337 (uri (pypi-uri "flex" version))
11340 "00pamnwla3khk8nyla7y28dq9jnh69swd7f4jfsl7sn1izs8n8zk"))))
11341 (build-system python-build-system)
11343 `(("python-click" ,python-click)
11344 ("python-iso8601" ,python-iso8601)
11345 ("python-jsonpointer" ,python-jsonpointer)
11346 ("python-pyyaml" ,python-pyyaml)
11347 ("python-requests" ,python-requests)
11348 ("python-rfc3987" ,python-rfc3987)
11349 ("python-six" ,python-six)
11350 ("python-validate-email" ,python-validate-email)))
11351 (home-page "https://github.com/pipermerriam/flex")
11352 (synopsis "Validates Swagger schemata")
11353 (description "@code{flex} can be used to validate Swagger schemata.")
11354 (license license:bsd-3)))
11356 (define-public python2-flex
11357 (package-with-python2 python-flex))
11359 (define-public python-marshmallow
11361 (name "python-marshmallow")
11362 (version "3.0.0b3")
11366 (uri (pypi-uri "marshmallow" version))
11369 "07mcrij1yvk85lvgx44wwr9pc80xryghvlgayb057g1cazcypysd"))))
11370 (build-system python-build-system)
11372 `(("python-dateutil" ,python-dateutil)
11373 ("python-simplejson" ,python-simplejson)))
11375 `(("python-pytest-3.0" ,python-pytest-3.0)
11376 ("python-pytz" ,python-pytz)))
11377 (home-page "https://github.com/marshmallow-code/marshmallow")
11378 (synopsis "Convert complex datatypes to and from native
11379 Python datatypes.")
11380 (description "@code{marshmallow} provides a library for converting
11381 complex datatypes to and from native Python datatypes.")
11382 (license license:expat)))
11384 (define-public python2-marshmallow
11385 (package-with-python2 python-marshmallow))
11387 (define-public python-apispec
11389 (name "python-apispec")
11394 (uri (pypi-uri "apispec" version))
11397 "0kxa8723zbisx10363yh4mmmn4higxrspymbjfz5zq8f644zagm9"))))
11398 (build-system python-build-system)
11400 `(("python-pyyaml" ,python-pyyaml)))
11402 `(("python-pytest-3.0" ,python-pytest-3.0)
11403 ("python-flask" ,python-flask)
11404 ("python-marshmallow" ,python-marshmallow)
11405 ("python-tornado" ,python-tornado)
11406 ("python-bottle" ,python-bottle)
11407 ("python-mock" ,python-mock)))
11408 (home-page "https://github.com/marshmallow-code/apispec")
11409 (synopsis "Swagger 2.0 API specification generator")
11410 (description "@code{python-apispec} is a pluggable API specification
11411 generator. Currently supports the OpenAPI specification (f.k.a.
11413 (license license:expat)))
11415 (define-public python2-apispec
11416 (package-with-python2 python-apispec))
11418 (define-public python-flasgger
11420 (name "python-flasgger")
11425 (uri (string-append "https://github.com/rochacbruno/flasgger/archive/"
11426 version ".tar.gz"))
11427 (file-name (string-append name "-" version ".tar.gz"))
11430 "1gqzlm0rb55fdpsy5ipkganlx9cnpi454fqyycr03jm22zql14ay"))))
11431 (build-system python-build-system)
11434 (modify-phases %standard-phases
11436 (lambda* (#:key inputs outputs #:allow-other-keys)
11437 (substitute* "Makefile"
11438 (("flake8 flasgger --ignore=F403")
11439 "flake8 flasgger --ignore=E731,F403"))
11440 (setenv "PYTHONPATH" (string-append (getcwd)
11442 (getenv "PYTHONPATH")))
11443 (zero? (system* "py.test")))))))
11445 `(("python-flask" ,python-flask)
11446 ("python-pyyaml" ,python-pyyaml)
11447 ("python-jsonschema" ,python-jsonschema)
11448 ("python-mistune" ,python-mistune)
11449 ("python-six" ,python-six)))
11451 `(("python-decorator" ,python-decorator)
11452 ("python-flake8" ,python-flake8)
11453 ("python-flask-restful" ,python-flask-restful)
11454 ("python-flex" ,python-flex)
11455 ("python-pytest-3.0" ,python-pytest-3.0)
11456 ("python-pytest-cov" ,python-pytest-cov)
11457 ("python-marshmallow" ,python-marshmallow)
11458 ("python-apispec" ,python-apispec)))
11459 (home-page "https://github.com/rochacbruno/flasgger/")
11460 (synopsis "Extract Swagger specs from your Flask project")
11461 (description "@code{python-flasgger} allows extracting Swagger specs
11462 from your Flask project. It is a fork of Flask-Swagger.")
11463 (license license:expat)))
11465 (define-public python2-flasgger
11466 (package-with-python2 python-flasgger))
11468 (define-public python-swagger-spec-validator
11470 (name "python-swagger-spec-validator")
11475 (uri (pypi-uri "swagger-spec-validator" version))
11478 "13hkpn2lycwr0468yqhjb3kwszqf7hjwlq61w7vdxq1caz31k4nw"))))
11479 (build-system python-build-system)
11481 `(("python-jsonschema" ,python-jsonschema)
11482 ("python-six" ,python-six)))
11484 "https://github.com/Yelp/swagger_spec_validator")
11485 (synopsis "Validation of Swagger specifications")
11486 (description "@code{swagger_spec_validator} provides a library for
11487 validating Swagger API specifications.")
11488 (license license:asl2.0)))
11490 (define-public python2-swagger-spec-validator
11491 (package-with-python2 python-swagger-spec-validator))
11493 (define-public python-apache-libcloud
11495 (name "python-apache-libcloud")
11500 (uri (pypi-uri "apache-libcloud" version))
11503 "1a71z02ckcxld72k4qgmdnkjan52c4wczncs3p2mp5yafh7dsan7"))))
11504 (build-system python-build-system)
11507 (modify-phases %standard-phases
11508 (add-after 'unpack 'patch-ssh
11509 (lambda* (#:key inputs #:allow-other-keys)
11510 (substitute* "libcloud/compute/ssh.py"
11511 (("'ssh'") (string-append "'" (assoc-ref inputs "openssh")
11514 (add-after 'unpack 'patch-tests
11516 (substitute* "./libcloud/test/test_file_fixtures.py"
11517 ;; See <https://issues.apache.org/jira/browse/LIBCLOUD-923>.
11518 (("def _ascii") "def _raw_data(self, method, url, body, headers):
11519 return (httplib.OK,
11521 {\"test\": \"value\"},
11522 httplib.responses[httplib.OK])
11524 (substitute* "libcloud/test/compute/test_ssh_client.py"
11525 (("class ShellOutSSHClientTests")
11526 "@unittest.skip(\"Guix container doesn't have ssh service\")
11527 class ShellOutSSHClientTests")
11528 ;; See <https://issues.apache.org/jira/browse/LIBCLOUD-924>.
11529 (("'.xf0.x90.x8d.x88'") "b'\\xF0\\x90\\x8D\\x88'")
11530 (("'.xF0', '.x90', '.x8D', '.x88'")
11531 "b'\\xF0', b'\\x90', b'\\x8D', b'\\x88'"))
11534 `(("openssh" ,openssh)))
11536 `(("python-paramiko" ,python-paramiko)
11537 ("python-requests" ,python-requests)))
11539 `(("python-lockfile" ,python-lockfile)
11540 ("python-mock" ,python-mock)
11541 ("python-requests-mock" ,python-requests-mock)))
11542 (home-page "https://libcloud.apache.org/")
11543 (synopsis "Unified Cloud API")
11544 (description "@code{libcloud} is a Python library for interacting with
11545 many of the popular cloud service providers using a unified API.")
11546 (license license:asl2.0)))
11548 (define-public python2-apache-libcloud
11549 (package-with-python2 python-apache-libcloud))
11551 (define-public python-smmap2
11553 (name "python-smmap2")
11558 (uri (pypi-uri "smmap2" version))
11561 "1hvn28p3zvxa98sbi9lrqvv2ps4q284j4jq9a619zw0m7yv0sly7"))))
11562 (build-system python-build-system)
11564 `(("python-nosexcover" ,python-nosexcover)))
11565 (home-page "https://github.com/Byron/smmap")
11566 (synopsis "Python sliding window memory map manager")
11567 (description "@code{smmap2} is a pure Python implementation of a sliding
11568 window memory map manager.")
11569 (license license:bsd-3)))
11571 (define-public python2-smmap2
11572 (package-with-python2 python-smmap2))
11574 (define-public python-regex
11576 (name "python-regex")
11577 (version "2017.06.07")
11580 (uri (pypi-uri "regex" version))
11583 "06r6b7yigikbj3a72whl85r2b64pj1r0ypmw9yalmkm0wnxq8mz4"))))
11584 (build-system python-build-system)
11585 (home-page "https://bitbucket.org/mrabarnett/mrab-regex")
11586 (synopsis "Alternative regular expression module")
11587 (description "This regular expression implementation is backwards-
11588 compatible with the standard @code{re} module, but offers additional
11589 functionality like full case-folding for case-insensitive matches in Unicode.")
11590 (license license:psfl)))
11592 (define-public python2-regex
11593 (package-with-python2 python-regex))
11595 (define-public python2-pyopengl
11597 (name "python2-pyopengl")
11602 (uri (pypi-uri "PyOpenGL" version))
11605 "1byxjj6a8rwzhxhjqlc588zdad2qwxdd7vlam2653ylll31waiwv"))))
11607 `(#:python ,python-2))
11608 (build-system python-build-system)
11609 (home-page "http://pyopengl.sourceforge.net")
11610 (synopsis "Standard OpenGL bindings for Python")
11612 "PyOpenGL is the most common cross platform Python binding to OpenGL and
11613 related APIs. The binding is created using the standard @code{ctypes}
11615 (license license:bsd-3)))
11617 (define-public python2-pyopengl-accelerate
11619 (inherit python2-pyopengl)
11620 (name "python2-pyopengl-accelerate")
11625 (uri (pypi-uri "PyOpenGL-accelerate" version))
11628 "0464c1ifzk0k92lyndikmvzjgnx1y25r7bkkc8pnxm4kp1q4czwj"))))
11629 (synopsis "Acceleration code for PyOpenGL")
11631 "This is the Cython-coded accelerator module for PyOpenGL.")))
11633 (define-public python-rencode
11635 (name "python-rencode")
11640 (uri (pypi-uri "rencode" version))
11643 "08if5yax1xn5yfp8p3765ccjmfcv9di7i4m5jckgnwvdsgznwkbj"))))
11644 (build-system python-build-system)
11645 (native-inputs `(("pkg-config" ,pkg-config)
11646 ("python-cython", python-cython)))
11647 (home-page "https://github.com/aresch/rencode")
11648 (synopsis "Serialization of heterogeneous data structures")
11650 "The @code{rencode} module is a data structure serialization library,
11651 similar to @code{bencode} from the BitTorrent project. For complex,
11652 heterogeneous data structures with many small elements, r-encoding stake up
11653 significantly less space than b-encodings. This version of rencode is a
11654 complete rewrite in Cython to attempt to increase the performance over the
11655 pure Python module.")
11656 (license license:bsd-3)))
11658 (define-public python2-rencode
11659 (package-with-python2 python-rencode))
11661 (define-public python-xenon
11663 (name "python-xenon")
11668 (uri (pypi-uri "xenon" version))
11671 "14kby2y48vp3sgwxqlm5d5789yibqwb1qli5fwcmdqg3iayrbklc"))))
11672 (build-system python-build-system)
11674 `(("python-pyyaml" ,python-pyyaml)
11675 ("python-radon" ,python-radon)
11676 ("python-requests" ,python-requests)
11677 ("python-flake8" ,python-flake8)
11678 ("python-tox" ,python-tox)))
11681 (modify-phases %standard-phases
11682 (add-before 'build 'patch-test-requirements
11683 (lambda* (#:key inputs #:allow-other-keys)
11684 ;; Update requirements from dependency==version to
11685 ;; dependency>=version.
11686 (substitute* "requirements.txt"
11689 ;; Remove httpretty dependency for tests.
11690 (substitute* "setup.py"
11691 (("httpretty") ""))
11693 (home-page "https://xenon.readthedocs.org/")
11694 (synopsis "Monitor code metrics for Python on your CI server")
11696 "Xenon is a monitoring tool based on Radon. It monitors code complexity.
11697 Ideally, @code{xenon} is run every time code is committed. Through command
11698 line options, various thresholds can be set for the complexity of code. It
11699 will fail (i.e. it will exit with a non-zero exit code) when any of these
11700 requirements is not met.")
11701 (license license:expat)))
11703 (define-public python2-xenon
11704 (package-with-python2 python-xenon))
11706 (define-public python-pysocks
11708 (name "python-pysocks")
11713 (uri (pypi-uri "PySocks" version))
11716 "1krkiss578zqwcg4c8iqz1hwscwhsvy2djp3xyvps5gsgvr2j0yh"))))
11717 (build-system python-build-system)
11718 (arguments `(#:tests? #f))
11719 (home-page "https://github.com/Anorov/PySocks")
11720 (synopsis "SOCKS client module")
11721 (description "@code{pysocks} is an updated and semi-actively maintained
11722 version of @code{SocksiPy} with bug fixes and extra features.")
11723 (license license:bsd-3)))
11725 (define-public python2-pysocks
11726 (package-with-python2 python-pysocks))
11728 (define-public python-pydiff
11730 (name "python-pydiff")
11735 (uri (pypi-uri "pydiff" version))
11738 "1als83h9w0gab24ipyna6khm390qmpnpkc5jksmdbs2xc8hp2z44"))))
11739 (build-system python-build-system)
11740 (home-page "https://github.com/myint/pydiff")
11741 (synopsis "Library to diff two Python files at the bytecode level")
11743 "@code{pydiff} makes it easy to look for actual code changes while
11744 ignoring formatting changes.")
11745 (license license:expat)))
11747 (define-public python2-pydiff
11748 (package-with-python2 python-pydiff))
11750 (define-public python-tqdm
11752 (name "python-tqdm")
11757 (uri (pypi-uri "tqdm" version))
11760 "0lwrmby8qz23gvqwkpivfrv4q8nfh90cz9ml6slwvwmcxxsdrhbf"))))
11761 (build-system python-build-system)
11763 `(("python-flake8" ,python-flake8)
11764 ("python-nose" ,python-nose)
11765 ("python-nose-timer" ,python-nose-timer)
11766 ("python-coverage" ,python-coverage)
11767 ("python-virtualenv" ,python-virtualenv)))
11768 (home-page "https://github.com/tqdm/tqdm")
11769 (synopsis "Fast, extensible progress meter")
11771 "Make loops show a progress bar on the console by just wrapping any
11772 iterable with @code{|tqdm(iterable)|}. Offers many options to define
11773 design and layout.")
11774 (license (list license:mpl2.0 license:expat))))
11776 (define-public python2-tqdm
11777 (package-with-python2 python-tqdm))
11779 (define-public python-pkginfo
11781 (name "python-pkginfo")
11786 (uri (pypi-uri "pkginfo" version))
11789 "17pqjfpq3c6xzdmk8pski6jcjgjv78q00zjf2bgzb668pzm6l6mv"))))
11790 (build-system python-build-system)
11792 ;; The tests are broken upstream.
11795 "https://code.launchpad.net/~tseaver/pkginfo/trunk")
11797 "Query metadatdata from sdists, bdists, and installed packages")
11799 "API to query the distutils metadata written in @file{PKG-INFO} inside a
11800 source distriubtion (an sdist) or a binary distribution (e.g., created by
11801 running bdist_egg). It can also query the EGG-INFO directory of an installed
11802 distribution, and the *.egg-info stored in a \"development checkout\" (e.g,
11803 created by running @code{python setup.py develop}).")
11804 (license license:expat)))
11806 (define-public python2-pkginfo
11807 (package-with-python2 python-pkginfo))
11809 (define-public python-twine
11811 (name "python-twine")
11816 (uri (pypi-uri "twine" version))
11819 "1ay1b6kdq6k4bfbjsvf6ymj41wrgpvinhxndb09355pwhxwmp96a"))))
11820 (build-system python-build-system)
11822 `(("python-tqdm" ,python-tqdm)
11823 ("python-pkginfo", python-pkginfo)
11824 ("python-requests" ,python-requests)
11825 ("python-requests-toolbelt" ,python-requests-toolbelt)))
11826 (home-page "https://github.com/pypa/twine")
11827 (synopsis "Collection of utilities for interacting with PyPI")
11829 "@code{twine} currently supports registering projects and uploading
11830 distributions. It authenticates the user over HTTPS, allows them to pre-sign
11831 their files and supports any packaging format (including wheels).")
11832 (license license:asl2.0)))
11834 (define-public python2-twine
11835 (package-with-python2 python-twine))
11837 (define-public python-linecache2
11839 (name "python-linecache2")
11844 (uri (pypi-uri "linecache2" version))
11847 "0z79g3ds5wk2lvnqw0y2jpakjf32h95bd9zmnvp7dnqhf57gy9jb"))))
11848 (build-system python-build-system)
11850 `(;; The tests depend on unittest2, and our version is a bit too old.
11853 `(("python-pbr" ,python-pbr)))
11855 "https://github.com/testing-cabal/linecache2")
11856 (synopsis "Backports of the linecache module")
11858 "The linecache module allows one to get any line from any file, while
11859 attempting to optimize internally, using a cache, the common case where many
11860 lines are read from a single file.")
11861 (license license:psfl)))
11863 (define-public python2-linecache2
11864 (package-with-python2 python-linecache2))
11866 (define-public python-traceback2
11868 (name "python-traceback2")
11873 (uri (pypi-uri "traceback2" version))
11876 "0c1h3jas1jp1fdbn9z2mrgn3jj0hw1x3yhnkxp7jw34q15xcdb05"))))
11877 (build-system python-build-system)
11879 `(;; python-traceback2 and python-unittest2 depend on one another.
11882 `(("python-pbr" ,python-pbr)))
11884 `(("python-linecache2" ,python-linecache2)))
11886 "https://github.com/testing-cabal/traceback2")
11887 (synopsis "Backports of the traceback module")
11889 "This module provides a standard interface to extract, format and print
11890 stack traces of Python programs. It exactly mimics the behavior of the Python
11891 interpreter when it prints a stack trace.")
11892 (license license:psfl)))
11894 (define-public python2-traceback2
11895 (package-with-python2 python-traceback2))
11897 (define-public python-ratelimiter
11899 (name "python-ratelimiter")
11904 (uri (pypi-uri "ratelimiter" version))
11907 "1dhz85mj5bqd2mij84ncs6pz32hgidr79hay4aqfmzaa4rbb497p"))))
11908 (build-system python-build-system)
11910 '(#:tests? #f)) ; There are no tests in the pypi archive.
11911 (home-page "https://github.com/RazerM/ratelimiter")
11912 (synopsis "Simple rate limiting object")
11914 "The @code{ratelimiter} module ensures that an operation will not be
11915 executed more than a given number of times during a given period.")
11916 (license license:asl2.0)))
11918 (define-public python2-ratelimiter
11919 (package-with-python2 python-ratelimiter))
11921 (define-public python-dukpy
11923 (name "python-dukpy")
11928 (uri (string-append "https://github.com/kovidgoyal/dukpy/archive/v"
11929 version ".tar.gz"))
11932 "0pj39rfwlzivqm5hkrsza7gssg6ggpxlq5ivc8f3h7x5pfgc6y6c"))))
11933 (build-system python-build-system)
11934 (home-page "https://github.com/kovidgoyal/dukpy")
11935 (synopsis "Run JavaScript in python")
11937 "dukpy is a JavaScript runtime environment for Python using the duktape
11938 embeddable JavaScript engine.")
11939 ;; Dukpy is licensed under MIT like the embedded duktape library,
11940 ;; with 'errors.c' as GPL3.
11941 (license (list license:expat license:gpl3))))
11943 (define-public python2-dukpy
11944 (package-with-python2 python-dukpy))
11946 (define-public python-jsonrpclib-pelix
11948 (name "python-jsonrpclib-pelix")
11953 (uri (pypi-uri "jsonrpclib-pelix" version))
11956 "1qs95vxplxwspbrqy8bvc195s58iy43qkf75yrjfql2sim8b25sl"))))
11957 (build-system python-build-system)
11958 (home-page "https://github.com/tcalmant/jsonrpclib/")
11959 (synopsis "JSON-RPC 2.0 client library for Python")
11961 "This library implements the JSON-RPC v2.0
11962 specification (backwards-compatible) as a client library for Python. This
11963 version is a fork of jsonrpclib by Josh Marshall, usable with Pelix remote
11965 (license license:asl2.0)))
11967 (define-public python2-jsonrpclib-pelix
11968 (package-with-python2 python-jsonrpclib-pelix))
11970 (define-public python-setuptools-scm-git-archive
11972 (name "python-setuptools-scm-git-archive")
11977 (uri (pypi-uri "setuptools_scm_git_archive" version))
11980 "1nii1sz5jq75ilf18bjnr11l9rz1lvdmyk66bxl7q90qan85yhjj"))))
11981 (build-system python-build-system)
11983 `(("python-pytest-3.0" ,python-pytest-3.0)))
11985 `(("python-setuptools-scm" ,python-setuptools-scm)))
11986 (home-page "https://github.com/Changaco/setuptools_scm_git_archive/")
11987 (synopsis "Setuptools_scm plugin for git archives")
11989 "The setuptools_scm_git_archive package is a plugin to
11990 setuptools_scm, which supports obtaining versions from git archives that
11991 belong to tagged versions.")
11992 (license license:expat)))
11994 (define-public python2-setuptools-scm-git-archive
11995 (package-with-python2 python-setuptools-scm-git-archive))
11997 (define-public python-pyclipper
11999 (name "python-pyclipper")
12004 (uri (pypi-uri "pyclipper" version ".zip"))
12007 "1zpmwv3bya3j984y5cf9x9d5108kf6mxldcba68wiq0frv5qrssw"))))
12008 (build-system python-build-system)
12010 `(#:tests? #f)); 8 Tests fail, 37 succeed
12012 `(("python-setuptools-scm-git-archive" ,python-setuptools-scm-git-archive)))
12014 `(("unzip" ,unzip)))
12015 (home-page "https://github.com/greginvm/pyclipper")
12016 (synopsis "Wrapper for Angus Johnson's Clipper library")
12018 "Pyclipper is a Cython wrapper for the C++ translation of the
12019 Angus Johnson's polygon clipping Clipper library (ver. 6.2.1).")
12020 (license license:expat)))
12022 (define-public python2-pyclipper
12023 (package-with-python2 python-pyclipper))
12025 (define-public python2-booleanoperations
12027 (name "python2-booleanoperations")
12032 (uri (pypi-uri "booleanOperations" version ".zip"))
12035 "1hw42fazdpvsn77glx96hwsj9l17mvx37sc5707s08y5w6fx16mn"))))
12036 (build-system python-build-system)
12038 `(#:python ,python-2))
12041 ("python2-pytest-3.0" ,python2-pytest-3.0)
12042 ("python2-pytest-runner" ,python2-pytest-runner)))
12044 `(("python-fonttools" ,python2-fonttools)
12045 ("python-pyclipper" ,python2-pyclipper)
12046 ("python-ufolib" ,python2-ufolib)))
12047 (home-page "https://github.com/typemytype/booleanOperations")
12048 (synopsis "Boolean operations on paths")
12050 "BooleanOperations provides a Python library that enables
12051 boolean operations on paths.")
12052 (license license:expat)))
12054 (define-public python-tempdir
12056 (name "python-tempdir")
12061 (uri (pypi-uri "tempdir" version))
12064 "13msyyxqbicr111a294x7fsqbkl6a31fyrqflx3q7k547gnq15k8"))))
12065 (build-system python-build-system)
12066 (home-page "https://pypi.org/project/tempdir/")
12068 ;; the package has no tests
12070 (synopsis "Python library for managing temporary directories")
12072 "This library manages temporary directories that are automatically
12073 deleted with all their contents when they are no longer needed. It is
12074 particularly convenient for use in tests.")
12075 (license license:expat)))
12077 (define-public python2-tempdir
12078 (package-with-python2 python-tempdir))
12080 (define-public python-activepapers
12082 (name "python-activepapers")
12087 (uri (pypi-uri "ActivePapers.Py" version))
12090 "12wkhjh90ffipjzv10swndp2xv9hd7xrxvg6v0n4n3i411pj4xb8"))))
12091 (build-system python-build-system)
12093 `(#:modules ((ice-9 ftw)
12096 (guix build python-build-system))
12099 (modify-phases %standard-phases
12100 (add-after 'unpack 'delete-python2-code
12102 (for-each delete-file
12103 '("lib/activepapers/builtins2.py"
12104 "lib/activepapers/standardlib2.py"
12105 "lib/activepapers/utility2.py"))))
12108 ;; Deactivate the test cases that download files
12109 (setenv "NO_NETWORK_ACCESS" "1")
12110 ;; For some strange reason, some tests fail if nosetests runs all
12111 ;; test modules in a single execution. They pass if each test
12112 ;; module is run individually.
12113 (for-each (lambda (filename)
12114 (invoke "nosetests"
12115 (string-append "tests/" filename)))
12118 (string-suffix? ".py" filename)))))))))
12120 `(("python-tempdir" ,python-tempdir)
12121 ("python-nose" ,python-nose)))
12123 `(("python-h5py" ,python-h5py)))
12124 (home-page "http://www.activepapers.org/")
12125 (synopsis "Executable papers for scientific computing")
12127 "ActivePapers is a tool for working with executable papers, which
12128 combine data, code, and documentation in single-file packages,
12129 suitable for publication as supplementary material or on repositories
12130 such as figshare or Zenodo.")
12131 (properties `((python2-variant . ,(delay python2-activepapers))))
12132 (license license:bsd-3)))
12134 (define-public python2-activepapers
12135 (let ((base (package-with-python2
12136 (strip-python2-variant python-activepapers))))
12140 (substitute-keyword-arguments (package-arguments base)
12142 `(modify-phases ,phases
12143 (delete 'delete-python2-code)
12144 (add-after 'unpack 'delete-python3-code
12146 (for-each delete-file
12147 '("lib/activepapers/builtins3.py"
12148 "lib/activepapers/standardlib3.py"
12149 "lib/activepapers/utility3.py")))))))))))
12151 (define-public python-semver
12153 (name "python-semver")
12158 (uri (pypi-uri "semver" version))
12161 "0hhgqppchv59rqj0yzi1prdg2nfsywqmjsqy2rycyxm0hvxmbyqz"))))
12162 (build-system python-build-system)
12165 (modify-phases %standard-phases
12166 (add-after 'unpack 'patch-test-requirements
12168 (substitute* "setup.py"
12169 ;; Our Python is new enough.
12170 (("'virtualenv<14\\.0\\.0'") "'virtualenv'"))
12173 `(("python-tox" ,python-tox)
12174 ("python-virtualenv" ,python-virtualenv)))
12175 (home-page "https://github.com/k-bx/python-semver")
12176 (synopsis "Python helper for Semantic Versioning")
12177 (description "This package provides a Python library for
12178 @url{Semantic Versioning, http://semver.org/}.")
12179 (license license:bsd-3)))
12181 (define-public python2-semver
12182 (package-with-python2 python-semver))
12184 (define-public python2-pyro
12186 (name "python2-pyro")
12191 (uri (pypi-uri "Pyro" version))
12192 (file-name (string-append "Pyro-" version ".tar.gz"))
12195 "0y75wzdqbjy565rpxaxscav4j8xg060sa90lnmb7aypgaf251v8v"))))
12196 (build-system python-build-system)
12198 ;; Pyro is not compatible with Python 3
12199 `(#:python ,python-2
12200 ;; Pyro has no test cases for automatic execution
12202 (home-page "http://pythonhosted.org/Pyro/")
12203 (synopsis "Distributed object manager for Python")
12204 (description "Pyro is a Distributed Object Technology system
12205 written in Python that is designed to be easy to use. It resembles
12206 Java's Remote Method Invocation (RMI). It has less similarity to CORBA,
12207 which is a system and language independent Distributed Object Technology
12208 and has much more to offer than Pyro or RMI. Pyro 3.x is no
12209 longer maintained. New projects should use Pyro4 instead, which
12210 is the new Pyro version that is actively developed.")
12211 (license license:expat)))
12213 (define-public python2-scientific
12215 (name "python2-scientific")
12220 (uri (string-append "https://bitbucket.org/khinsen/"
12221 "scientificpython/downloads/ScientificPython-"
12222 version ".tar.gz"))
12223 (file-name (string-append "ScientificPython-" version ".tar.gz"))
12226 "0fc69zhlsn9d2jvbzyjl9ah53vj598h84nkq230c83ahfvgzx5y3"))))
12227 (build-system python-build-system)
12229 `(("netcdf" ,netcdf)))
12231 `(("python-numpy" ,python2-numpy-1.8)
12232 ("python-pyro", python2-pyro)))
12234 ;; ScientificPython is not compatible with Python 3
12235 `(#:python ,python-2
12236 #:tests? #f ; No test suite
12238 (modify-phases %standard-phases
12240 (lambda* (#:key inputs #:allow-other-keys)
12241 (zero? (system* "python" "setup.py" "build"
12242 (string-append "--netcdf_prefix="
12243 (assoc-ref inputs "netcdf")))))))))
12244 (home-page "https://bitbucket.org/khinsen/scientificpython")
12245 (synopsis "Python modules for scientific computing")
12246 (description "ScientificPython is a collection of Python modules that are
12247 useful for scientific computing. Most modules are rather general (Geometry,
12248 physical units, automatic derivatives, ...) whereas others are more
12249 domain-specific (e.g. netCDF and PDB support). The library is currently
12250 not actively maintained and works only with Python 2 and NumPy < 1.9.")
12251 (license license:cecill-c)))
12253 (define-public python2-mmtk
12255 (name "python2-mmtk")
12260 (uri (string-append "https://bitbucket.org/khinsen/"
12261 "mmtk/downloads/MMTK-" version ".tar.gz"))
12262 (file-name (string-append "MMTK-" version ".tar.gz"))
12265 "1k4gsd50zja89dbzgy3aji7h4zpvbvdfrds7rxr3whqrsgcffnir"))))
12266 (build-system python-build-system)
12268 `(("netcdf" ,netcdf)))
12270 `(("python-scientific" ,python2-scientific)
12271 ("python-tkinter" ,python-2 "tk")))
12273 `(#:python ,python-2
12276 (modify-phases %standard-phases
12277 (add-before 'build 'includes-from-scientific
12278 (lambda* (#:key inputs #:allow-other-keys)
12279 (mkdir-p "Include/Scientific")
12282 (assoc-ref inputs "python-scientific")
12283 "/include/python2.7/Scientific")
12284 "Include/Scientific"))))))
12285 (home-page "http://dirac.cnrs-orleans.fr/MMTK")
12286 (synopsis "Python library for molecular simulation")
12287 (description "MMTK is a library for molecular simulations with an emphasis
12288 on biomolecules. It provides widely used methods such as Molecular Dynamics
12289 and normal mode analysis, but also basic routines for implementing new methods
12290 for simulation and analysis. The library is currently not actively maintained
12291 and works only with Python 2 and NumPy < 1.9.")
12292 (license license:cecill-c)))