1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2013 Nikita Karetnikov <nikita@karetnikov.org>
3 ;;; Copyright © 2013, 2014, 2015, 2016, 2017, 2018 Ludovic Courtès <ludo@gnu.org>
4 ;;; Copyright © 2013, 2014, 2015, 2016 Andreas Enge <andreas@enge.fr>
5 ;;; Copyright © 2014, 2015 Mark H Weaver <mhw@netris.org>
6 ;;; Copyright © 2014, 2017 Eric Bavier <bavier@member.fsf.org>
7 ;;; Copyright © 2014, 2015 Federico Beffa <beffa@fbengineering.ch>
8 ;;; Copyright © 2015 Omar Radwan <toxemicsquire4@gmail.com>
9 ;;; Copyright © 2015 Pierre-Antoine Rault <par@rigelk.eu>
10 ;;; Copyright © 2015, 2016, 2017, 2018 Ricardo Wurmus <rekado@elephly.net>
11 ;;; Copyright © 2015, 2016 Christopher Allan Webber <cwebber@dustycloud.org>
12 ;;; Copyright © 2015 Eric Dvorsak <eric@dvorsak.fr>
13 ;;; Copyright © 2015, 2016 David Thompson <davet@gnu.org>
14 ;;; Copyright © 2015, 2016, 2017 Leo Famulari <leo@famulari.name>
15 ;;; Copyright © 2015, 2017 Ben Woodcroft <donttrustben@gmail.com>
16 ;;; Copyright © 2015, 2016 Erik Edrosa <erik.edrosa@gmail.com>
17 ;;; Copyright © 2015, 2016, 2017 Efraim Flashner <efraim@flashner.co.il>
18 ;;; Copyright © 2015, 2017 Kyle Meyer <kyle@kyleam.com>
19 ;;; Copyright © 2015, 2016 Chris Marusich <cmmarusich@gmail.com>
20 ;;; Copyright © 2016 Danny Milosavljevic <dannym+a@scratchpost.org>
21 ;;; Copyright © 2016 Lukas Gradl <lgradl@openmailbox.org>
22 ;;; Copyright © 2016, 2018 Hartmut Goebel <h.goebel@crazy-compilers.com>
23 ;;; Copyright © 2016 Daniel Pimentel <d4n1@d4n1.org>
24 ;;; Copyright © 2016 Sou Bunnbu <iyzsong@gmail.com>
25 ;;; Copyright © 2016, 2017 Troy Sankey <sankeytms@gmail.com>
26 ;;; Copyright © 2016, 2017 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, 2018 Marius Bakke <mbakke@fastmail.com>
30 ;;; Copyright © 2016, 2017 Stefan Reichör <stefan@xsteve.at>
31 ;;; Copyright © 2016 Dylan Jeffers <sapientech@sapientech@openmailbox.org>
32 ;;; Copyright © 2016, 2017 Alex Vong <alexvong1995@gmail.com>
33 ;;; Copyright © 2016, 2017 Arun Isaac <arunisaac@systemreboot.net>
34 ;;; Copyright © 2016, 2017 Julien Lepiller <julien@lepiller.eu>
35 ;;; Copyright © 2016, 2017, 2018 Tobias Geerinckx-Rice <me@tobias.gr>
36 ;;; Copyright © 2016, 2017 Thomas Danckaert <post@thomasdanckaert.be>
37 ;;; Copyright © 2017 Carlo Zancanaro <carlo@zancanaro.id.au>
38 ;;; Copyright © 2017 Frederick M. Muriithi <fredmanglis@gmail.com>
39 ;;; Copyright © 2017, 2018 Adriano Peluso <catonano@gmail.com>
40 ;;; Copyright © 2017 Ben Sturmfels <ben@sturm.com.au>
41 ;;; Copyright © 2017 Mathieu Othacehe <m.othacehe@gmail.com>
42 ;;; Copyright © 2017 José Miguel Sánchez García <jmi2k@openmailbox.org>
43 ;;; Copyright © 2017 Roel Janssen <roel@gnu.org>
44 ;;; Copyright © 2017, 2018 Kei Kebreau <kkebreau@posteo.net>
45 ;;; Copyright © 2017 Rutger Helling <rhelling@mykolab.com>
46 ;;; Copyright © 2017 Muriithi Frederick Muriuki <fredmanglis@gmail.com>
47 ;;; Copyright © 2017 Brendan Tildesley <brendan.tildesley@openmailbox.org>
48 ;;; Copyright © 2018 Ethan R. Jones <ethanrjones97@gmail.com
49 ;;; Copyright © 2018 Fis Trivial <ybbs.daans@hotmail.com>
51 ;;; This file is part of GNU Guix.
53 ;;; GNU Guix is free software; you can redistribute it and/or modify it
54 ;;; under the terms of the GNU General Public License as published by
55 ;;; the Free Software Foundation; either version 3 of the License, or (at
56 ;;; your option) any later version.
58 ;;; GNU Guix is distributed in the hope that it will be useful, but
59 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
60 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
61 ;;; GNU General Public License for more details.
63 ;;; You should have received a copy of the GNU General Public License
64 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
66 (define-module (gnu packages python)
67 #:use-module ((guix licenses) #:prefix license:)
68 #:use-module (gnu packages)
69 #:use-module (gnu packages algebra)
70 #:use-module (gnu packages adns)
71 #:use-module (gnu packages attr)
72 #:use-module (gnu packages backup)
73 #:use-module (gnu packages bash)
74 #:use-module (gnu packages check)
75 #:use-module (gnu packages compression)
76 #:use-module (gnu packages crypto)
77 #:use-module (gnu packages databases)
78 #:use-module (gnu packages file)
79 #:use-module (gnu packages fontutils)
80 #:use-module (gnu packages gcc)
81 #:use-module (gnu packages geo)
82 #:use-module (gnu packages ghostscript)
83 #:use-module (gnu packages gl)
84 #:use-module (gnu packages glib)
85 #:use-module (gnu packages graphviz)
86 #:use-module (gnu packages graphics)
87 #:use-module (gnu packages gstreamer)
88 #:use-module (gnu packages gtk)
89 #:use-module (gnu packages icu4c)
90 #:use-module (gnu packages image)
91 #:use-module (gnu packages imagemagick)
92 #:use-module (gnu packages libevent)
93 #:use-module (gnu packages libffi)
94 #:use-module (gnu packages linux)
95 #:use-module (gnu packages machine-learning)
96 #:use-module (gnu packages man)
97 #:use-module (gnu packages maths)
98 #:use-module (gnu packages multiprecision)
99 #:use-module (gnu packages networking)
100 #:use-module (gnu packages ncurses)
101 #:use-module (gnu packages openstack)
102 #:use-module (gnu packages password-utils)
103 #:use-module (gnu packages pcre)
104 #:use-module (gnu packages perl)
105 #:use-module (gnu packages pkg-config)
106 #:use-module (gnu packages python-crypto)
107 #:use-module (gnu packages python-web)
108 #:use-module (gnu packages qt)
109 #:use-module (gnu packages readline)
110 #:use-module (gnu packages sdl)
111 #:use-module (gnu packages search)
112 #:use-module (gnu packages shells)
113 #:use-module (gnu packages ssh)
114 #:use-module (gnu packages statistics)
115 #:use-module (gnu packages terminals)
116 #:use-module (gnu packages tex)
117 #:use-module (gnu packages texinfo)
118 #:use-module (gnu packages time)
119 #:use-module (gnu packages tls)
120 #:use-module (gnu packages version-control)
121 #:use-module (gnu packages video)
122 #:use-module (gnu packages web)
123 #:use-module (gnu packages base)
124 #:use-module (gnu packages xml)
125 #:use-module (gnu packages xorg)
126 #:use-module (gnu packages xdisorg)
127 #:use-module (gnu packages tcl)
128 #:use-module (gnu packages bdw-gc)
129 #:use-module (guix packages)
130 #:use-module (guix download)
131 #:use-module (guix git-download)
132 #:use-module (guix utils)
133 #:use-module (guix build-system gnu)
134 #:use-module (guix build-system cmake)
135 #:use-module (guix build-system python)
136 #:use-module (guix build-system trivial)
137 #:use-module (srfi srfi-1))
139 (define-public python-2.7
146 (uri (string-append "https://www.python.org/ftp/python/"
147 version "/Python-" version ".tar.xz"))
150 "0rka541ys16jwzcnnvjp2v12m4cwgd2jp6wj4kj511p715pb5zvi"))
151 (patches (search-patches "python-2.7-search-paths.patch"
152 "python-2-deterministic-build-info.patch"
153 "python-2.7-site-prefixes.patch"
154 "python-2.7-source-date-epoch.patch"
155 "python-2.7-adjust-tests.patch"))
156 (modules '((guix build utils)))
157 ;; suboptimal to delete failing tests here, but if we delete them in the
158 ;; arguments then we need to make sure to strip out that phase when it
159 ;; gets inherited by python and python-minimal.
162 (for-each delete-file
163 '("Lib/test/test_compileall.py"
164 "Lib/test/test_ctypes.py" ; fails on mips64el
165 "Lib/test/test_distutils.py"
166 "Lib/test/test_import.py"
167 "Lib/test/test_shutil.py"
168 "Lib/test/test_socket.py"
169 "Lib/test/test_subprocess.py"))
172 "tk")) ;tkinter; adds 50 MiB to the closure
173 (build-system gnu-build-system)
177 ;; test_compileall test_distutils test_import test_shutil test_socket
180 ;; test_aepack test_al test_applesingle test_bsddb test_bsddb185
181 ;; test_bsddb3 test_cd test_cl test_codecmaps_cn test_codecmaps_hk
182 ;; test_codecmaps_jp test_codecmaps_kr test_codecmaps_tw test_curses
183 ;; test_dl test_gdb test_gl test_imageop test_imgfile test_ioctl
184 ;; test_kqueue test_linuxaudiodev test_macos test_macostools
185 ;; test_msilib test_ossaudiodev test_scriptpackages test_smtpnet
186 ;; test_socketserver test_startfile test_sunaudiodev test_timeout
187 ;; test_tk test_ttk_guionly test_urllib2net test_urllibnet
188 ;; test_winreg test_winsound test_zipfile64
189 ;; 4 skips unexpected on linux2:
190 ;; test_bsddb test_bsddb3 test_gdb test_ioctl
193 (list "--enable-shared" ;allow embedding
194 "--with-system-ffi" ;build ctypes
195 "--with-ensurepip=install" ;install pip and setuptools
196 "--enable-unicode=ucs4"
197 (string-append "LDFLAGS=-Wl,-rpath="
198 (assoc-ref %outputs "out") "/lib"))
200 #:modules ((ice-9 ftw) (ice-9 match)
201 (guix build utils) (guix build gnu-build-system))
203 (modify-phases %standard-phases
205 'configure 'patch-lib-shells
207 ;; Filter for existing files, since some may not exist in all
208 ;; versions of python that are built with this recipe.
209 (substitute* (filter file-exists?
210 '("Lib/subprocess.py"
212 "Lib/distutils/tests/test_spawn.py"
213 "Lib/test/support/__init__.py"
214 "Lib/test/test_subprocess.py"))
215 (("/bin/sh") (which "sh")))
217 ;; Use zero as the timestamp in .pyc files so that builds are
218 ;; deterministic. TODO: Remove it when this variable is set in
219 ;; gnu-build-system.scm.
220 (setenv "SOURCE_DATE_EPOCH" "1")
222 (add-before 'configure 'do-not-record-configure-flags
223 (lambda* (#:key configure-flags #:allow-other-keys)
224 ;; Remove configure flags from the installed '_sysconfigdata.py'
225 ;; and 'Makefile' so we don't end up keeping references to the
228 ;; Preserve at least '--with-system-ffi' since otherwise the
229 ;; thing tries to build libffi, fails, and we end up with a
230 ;; Python that lacks ctypes.
231 (substitute* "configure"
232 (("^CONFIG_ARGS=.*$")
233 (format #f "CONFIG_ARGS='~a'\n"
234 (if (member "--with-system-ffi" configure-flags)
241 ;; 'Lib/test/test_site.py' needs a valid $HOME
242 (setenv "HOME" (getcwd))
245 'unpack 'set-source-file-times-to-1980
246 ;; XXX One of the tests uses a ZIP library to pack up some of the
247 ;; source tree, and fails with "ZIP does not support timestamps
248 ;; before 1980". Work around this by setting the file times in the
249 ;; source tree to sometime in early 1980.
251 (let ((circa-1980 (* 10 366 24 60 60)))
252 (ftw "." (lambda (file stat flag)
253 (utime file circa-1980 circa-1980)
256 (add-after 'install 'remove-tests
257 ;; Remove 25 MiB of unneeded unit tests. Keep test_support.*
258 ;; because these files are used by some libraries out there.
259 (lambda* (#:key outputs #:allow-other-keys)
260 (let ((out (assoc-ref outputs "out")))
261 (match (scandir (string-append out "/lib")
263 (string-prefix? "python" name)))
265 (let ((testdir (string-append out "/lib/" pythonX.Y
267 (with-directory-excursion testdir
268 (for-each delete-file-recursively
274 (string-prefix? "test_support."
276 (call-with-output-file "__init__.py" (const #t))
278 (add-before 'strip 'make-libraries-writable
279 (lambda* (#:key outputs #:allow-other-keys)
280 ;; Make .so files writable so they can be stripped.
281 (let ((out (assoc-ref outputs "out")))
282 (for-each (lambda (file)
284 (find-files (string-append out "/lib")
287 (add-after 'install 'move-tk-inter
288 (lambda* (#:key outputs #:allow-other-keys)
289 ;; When Tkinter support is built move it to a separate output so
290 ;; that the main output doesn't contain a reference to Tcl/Tk.
291 (let ((out (assoc-ref outputs "out"))
292 (tk (assoc-ref outputs "tk")))
294 (match (find-files out "tkinter.*\\.so")
296 ;; The .so is in OUT/lib/pythonX.Y/lib-dynload, but we
297 ;; want it under TK/lib/pythonX.Y/site-packages.
298 (let* ((len (string-length out))
299 (target (string-append
302 (dirname (dirname tkinter.so))
305 (install-file tkinter.so target)
306 (delete-file tkinter.so)))))
311 ("libffi" ,libffi) ; for ctypes
312 ("sqlite" ,sqlite) ; for sqlite extension
314 ("readline" ,readline)
317 ("tk" ,tk))) ; for tkinter
319 `(("pkg-config" ,pkg-config)))
321 (list (search-path-specification
322 (variable "PYTHONPATH")
323 (files '("lib/python2.7/site-packages")))))
324 (home-page "https://www.python.org")
325 (synopsis "High-level, dynamically-typed programming language")
327 "Python is a remarkably powerful dynamic programming language that
328 is used in a wide variety of application domains. Some of its key
329 distinguishing features include: clear, readable syntax; strong
330 introspection capabilities; intuitive object orientation; natural
331 expression of procedural code; full modularity, supporting hierarchical
332 packages; exception-based error handling; and very high level dynamic
334 (license license:psfl)))
336 ;; Current 2.x version.
337 (define-public python-2 python-2.7)
339 (define-public python-3.6
340 (package (inherit python-2)
344 (uri (string-append "https://www.python.org/ftp/python/"
345 version "/Python-" version ".tar.xz"))
346 (patches (search-patches
347 "python-fix-tests.patch"
348 "python-3-fix-tests.patch"
349 "python-3-deterministic-build-info.patch"
350 "python-3-search-paths.patch"))
351 (patch-flags '("-p0"))
354 "1fna7g8jxzl4kd2pqmmqhva5724c5m920x3fsrpsgskaylmr76qm"))
357 (for-each delete-file
358 '("Lib/ctypes/test/test_structures.py" ; fails on aarch64
359 "Lib/ctypes/test/test_win32.py" ; fails on aarch64
360 "Lib/test/test_fcntl.py")) ; fails on aarch64
363 (substitute-keyword-arguments (package-arguments python-2)
366 `(modify-phases ,phases
367 (add-after 'unpack 'patch-timestamp-for-pyc-files
369 ;; We set DETERMINISTIC_BUILD to only override the mtime when
370 ;; building with Guix, lest we break auto-compilation in
372 (setenv "DETERMINISTIC_BUILD" "1")
373 (substitute* "Lib/py_compile.py"
374 (("source_stats\\['mtime'\\]")
375 "(1 if 'DETERMINISTIC_BUILD' in os.environ else source_stats['mtime'])"))
377 ;; Use deterministic hashes for strings, bytes, and datetime
379 (setenv "PYTHONHASHSEED" "0")
381 ;; Reset mtime when validating bytecode header.
382 (substitute* "Lib/importlib/_bootstrap_external.py"
383 (("source_mtime = int\\(source_stats\\['mtime'\\]\\)")
386 ;; These tests fail because of our change to the bytecode
387 ;; validation. They fail because expected exceptions do not get
388 ;; thrown. This seems to be no problem.
389 (add-after 'unpack 'disable-broken-bytecode-tests
391 (substitute* "Lib/test/test_importlib/source/test_file_loader.py"
392 (("test_bad_marshal")
393 "disable_test_bad_marshal")
395 "disable_test_no_marshal")
396 (("test_non_code_marshal")
397 "disable_test_non_code_marshal"))
399 ;; Unset DETERMINISTIC_BUILD to allow for tests that check that
400 ;; stale pyc files are rebuilt.
401 (add-before 'check 'allow-non-deterministic-compilation
402 (lambda _ (unsetenv "DETERMINISTIC_BUILD") #t))
403 ;; We need to rebuild all pyc files for three different
404 ;; optimization levels to replace all files that were not built
405 ;; deterministically.
407 ;; FIXME: Without this phase we have close to 2000 files that
408 ;; differ across different builds of this package. With this phase
409 ;; there are about 500 files left that differ.
410 (add-after 'install 'rebuild-bytecode
411 (lambda* (#:key outputs #:allow-other-keys)
412 (setenv "DETERMINISTIC_BUILD" "1")
413 (let ((out (assoc-ref outputs "out")))
416 (format #t "Compiling with optimization level: ~a\n"
417 (if (null? opt) "none" (car opt)))
418 (for-each (lambda (file)
420 `(,(string-append out "/bin/python3")
424 ;; Don't build lib2to3, because it's Python 2 code.
425 ;; Also don't build obviously broken test code.
426 "-x" "(lib2to3|test/bad.*)"
428 (find-files out "\\.py$")))
429 (list '() '("-O") '("-OO"))))))))))
431 (list (search-path-specification
432 (variable "PYTHONPATH")
433 (files (list (string-append "lib/python"
434 (version-major+minor version)
435 "/site-packages"))))))))
437 ;; Current 3.x version.
438 (define-public python-3 python-3.6)
440 ;; Current major version.
441 (define-public python python-3)
443 ;; Minimal variants of Python, mostly used to break the cycle between Tk and
444 ;; Python (Tk -> libxcb -> Python.)
446 (define-public python2-minimal
447 (package (inherit python-2)
448 (name "python-minimal")
451 ;; Keep zlib, which is used by 'pip' (via the 'zipimport' module), which
452 ;; is invoked upon 'make install'. 'pip' also expects 'ctypes' and thus
454 (inputs `(("libffi" ,libffi)
457 (define-public python-minimal
458 (package (inherit python)
459 (name "python-minimal")
462 ;; Build fails due to missing ctypes without libffi.
463 ;; OpenSSL is a mandatory dependency of Python 3.x, for urllib;
464 ;; zlib is required by 'zipimport', used by pip.
465 (inputs `(("libffi" ,libffi)
469 (define* (wrap-python3 python
471 (name (string-append (package-name python) "-wrapper")))
472 (package (inherit python)
475 (build-system trivial-build-system)
477 (inputs `(("bash" ,bash)))
478 (propagated-inputs `(("python" ,python)))
480 `(#:modules ((guix build utils))
483 (use-modules (guix build utils))
484 (let ((bin (string-append (assoc-ref %outputs "out") "/bin"))
485 (python (string-append (assoc-ref %build-inputs "python") "/bin/")))
489 (symlink (string-append python old)
490 (string-append bin "/" new)))
491 `("python3" ,"pydoc3" ,"idle3" ,"pip3")
492 `("python" ,"pydoc" ,"idle" ,"pip"))
493 ;; python-config outputs search paths based upon its location,
494 ;; use a bash wrapper to avoid changing its outputs.
495 (let ((bash (string-append (assoc-ref %build-inputs "bash")
497 (old (string-append python "python3-config"))
498 (new (string-append bin "/python-config")))
499 (with-output-to-file new
501 (format #t "#!~a~%" bash)
502 (format #t "exec \"~a\" \"$@\"~%" old)
505 (synopsis "Wrapper for the Python 3 commands")
507 "This package provides wrappers for the commands of Python@tie{}3.x such
508 that they can be invoked under their usual name---e.g., @command{python}
509 instead of @command{python3}.")))
511 (define-public python-wrapper (wrap-python3 python))
512 (define-public python-minimal-wrapper (wrap-python3 python-minimal))
514 (define-public python-psutil
516 (name "python-psutil")
521 (uri (pypi-uri "psutil" version))
524 "063v69x7spyclyaxrd3gmzj3p16q5ayg97xqhwb1kyn22a9pwip2"))))
525 (build-system python-build-system)
527 ;; FIXME: some tests does not return and times out.
529 (home-page "https://www.github.com/giampaolo/psutil")
530 (synopsis "Library for retrieving information on running processes")
532 "psutil (Python system and process utilities) is a library for retrieving
533 information on running processes and system utilization (CPU, memory, disks,
534 network) in Python. It is useful mainly for system monitoring, profiling and
535 limiting process resources and management of running processes. It implements
536 many functionalities offered by command line tools such as: ps, top, lsof,
537 netstat, ifconfig, who, df, kill, free, nice, ionice, iostat, iotop, uptime,
538 pidof, tty, taskset, pmap.")
539 (properties `((python2-variant . ,(delay python2-psutil))))
540 (license license:bsd-3)))
542 (define-public python2-psutil
543 (let ((base (package-with-python2 (strip-python2-variant python-psutil))))
547 `(("python2-enum34" ,python2-enum34) ;optional
548 ,@(package-propagated-inputs base))))))
550 (define-public python-shapely
552 (name "python-shapely")
557 (uri (pypi-uri "Shapely" version))
560 "0svc58dzcw9gj92b4sgq35sdxkf85z0qwlzxarkzq4bp3h8jy58l"))))
561 (build-system python-build-system)
563 `(("python-cython" ,python-cython)
564 ("python-matplotlib" ,python-matplotlib)
565 ("python-pytest" ,python-pytest)
566 ("python-pytest-cov" ,python-pytest-cov)))
570 `(("python-numpy" ,python-numpy)))
573 (modify-phases %standard-phases
574 (add-after 'unpack 'patch-geos-path
575 (lambda* (#:key inputs #:allow-other-keys)
576 (let ((geos (assoc-ref inputs "geos"))
577 (glibc (assoc-ref inputs ,(if (%current-target-system)
578 "cross-libc" "libc"))))
579 (substitute* "shapely/geos.py"
580 (("_lgeos = load_dll\\('geos_c', fallbacks=.*\\)")
581 (string-append "_lgeos = load_dll('geos_c', fallbacks=['"
582 geos "/lib/libgeos_c.so'])"))
583 (("free = load_dll\\('c'\\)\\.free")
584 (string-append "free = load_dll('c', fallbacks=['"
585 glibc "/lib/libc.so.6']).free"))))
587 (home-page "https://github.com/Toblerity/Shapely")
588 (synopsis "Library for the manipulation and analysis of geometric objects")
589 (description "Shapely is a Python package for manipulation and analysis of
590 planar geometric objects. It is based on the @code{GEOS} library.")
591 (license license:bsd-3)))
593 (define-public python2-shapely
594 (package-with-python2 python-shapely))
596 (define-public python-clyent
598 (name "python-clyent")
603 (uri (pypi-uri "clyent" version))
606 "1r9987qmy1pz3hq54160bapqsywpq14waw4w9x3ly8hmq7kpgfbj"))))
607 (build-system python-build-system)
609 `(("python-mock" ,python-mock)))
610 (home-page "https://github.com/binstar/clyent")
611 (synopsis "Command line client library")
612 (description "Clyent is a Python command line utiliy library. It is used
613 by @code{binstar}, @code{binstar-build} and @code{chalmers}.")
614 (license license:bsd-3)))
616 (define-public python2-clyent
617 (package-with-python2 python-clyent))
619 (define-public python-babel
621 (name "python-babel")
626 (uri (pypi-uri "Babel" version))
629 "0x98qqqw35xllpcama013a9788ly84z8dm1w2wwfpxh2710c8df5"))))
630 (build-system python-build-system)
632 `(("python-pytz" ,python-pytz)))
633 (arguments `(#:tests? #f)) ; no test target
634 (home-page "http://babel.pocoo.org/")
636 "Tools for internationalizing Python applications")
638 "Babel is composed of two major parts:
639 - tools to build and work with gettext message catalogs
640 - a Python interface to the CLDR (Common Locale Data Repository), providing
641 access to various locale display names, localized number and date formatting,
643 (license license:bsd-3)))
645 (define-public python2-babel
646 (package-with-python2 python-babel))
648 (define-public python2-backport-ssl-match-hostname
650 (name "python2-backport-ssl-match-hostname")
656 "https://pypi.python.org/packages/source/b/"
657 "backports.ssl_match_hostname/backports.ssl_match_hostname-"
661 "1wndipik52cyqy0677zdgp90i435pmvwd89cz98lm7ri0y3xjajh"))))
662 (build-system python-build-system)
665 #:tests? #f)) ; no test target
666 (home-page "https://bitbucket.org/brandon/backports.ssl_match_hostname")
667 (synopsis "Backport of ssl.match_hostname() function from Python 3.5")
669 "This backport brings the ssl.match_hostname() function to users of
670 earlier versions of Python. The function checks the hostname in the
671 certificate returned by the server to which a connection has been established,
672 and verifies that it matches the intended target hostname.")
673 (license license:psfl)))
675 (define-public python-hdf4
682 (uri (pypi-uri name version))
685 "1hjiyrxvxk9817qyqky3nar4y3fs4z8wxz0n884zzb5wi6skrjks"))))
686 (build-system python-build-system)
687 (native-inputs `(("nose" ,python-nose)))
688 (propagated-inputs `(("numpy" ,python-numpy)))
695 (modify-phases %standard-phases
698 ;; The 'runexamples' script sets PYTHONPATH to CWD, then goes
699 ;; on to import numpy. Somehow this works on their CI system.
700 ;; Let's just manage PYTHONPATH here instead.
701 (substitute* "runexamples.sh"
702 (("export PYTHONPATH=.*") ""))
704 (string-append (getcwd) ":"
705 (getenv "PYTHONPATH")))
706 (and (zero? (system* "./runexamples.sh"))
707 (zero? (system* "nosetests" "-v"))))))))
708 (home-page "https://github.com/fhs/python-hdf4")
709 (synopsis "Python interface to the NCSA HDF4 library")
711 "Python-HDF4 is a python wrapper around the NCSA HDF version 4 library,
712 which implements the SD (Scientific Dataset), VS (Vdata) and V (Vgroup) API’s.
713 NetCDF files can also be read and modified. Python-HDF4 is a fork of
714 @url{http://hdfeos.org/software/pyhdf.php,pyhdf}.")
715 (license license:expat)))
717 (define-public python2-hdf4
718 (package-with-python2 python-hdf4))
720 (define-public python-h5py
727 (uri (pypi-uri "h5py" version))
730 "0433sdv6xc9p7v1xs1gvbxp7p152ywi3nplgjb258q9fvw9469br"))))
731 (build-system python-build-system)
733 `(#:tests? #f ; no test target
735 (modify-phases %standard-phases
736 (add-after 'unpack 'fix-hdf5-paths
737 (lambda* (#:key inputs #:allow-other-keys)
738 (let ((prefix (assoc-ref inputs "hdf5")))
739 (substitute* "setup_build.py"
740 (("\\['/opt/local/lib', '/usr/local/lib'\\]")
741 (string-append "['" prefix "/lib" "']"))
742 (("'/opt/local/include', '/usr/local/include'")
743 (string-append "'" prefix "/include" "'")))
744 (substitute* "setup_configure.py"
745 (("\\['/usr/local/lib', '/opt/local/lib'\\]")
746 (string-append "['" prefix "/lib" "']")))
749 `(("python-six" ,python-six)
750 ("python-numpy" ,python-numpy)))
754 `(("python-cython" ,python-cython)
755 ("python-pkgconfig" ,python-pkgconfig)))
756 (home-page "http://www.h5py.org/")
757 (synopsis "Read and write HDF5 files from Python")
759 "The h5py package provides both a high- and low-level interface to the
760 HDF5 library from Python. The low-level interface is intended to be a
761 complete wrapping of the HDF5 API, while the high-level component supports
762 access to HDF5 files, datasets and groups using established Python and NumPy
764 (license license:bsd-3)))
766 (define-public python2-h5py
767 (package-with-python2 python-h5py))
769 (define-public python-netcdf4
771 (name "python-netcdf4")
776 (uri (pypi-uri "netCDF4" version))
779 "1h6jq338amlbk0ilzvjyl7cck80i0bah9a5spn9in71vy2qxm7i5"))))
780 (build-system python-build-system)
782 `(("python-cython" ,python-cython)))
784 `(("python-numpy" ,python-numpy)))
791 (modify-phases %standard-phases
794 (setenv "NO_NET" "1") ; disable opendap tests
795 (with-directory-excursion "test"
796 (setenv "PYTHONPATH" ; find and add the library we just built
798 (car (find-files "../build" "lib.*"
800 #:fail-on-error? #:t))
801 ":" (getenv "PYTHONPATH")))
802 (zero? (system* "python" "run_all.py"))))))))
804 "https://github.com/Unidata/netcdf4-python")
805 (synopsis "Python/numpy interface to the netCDF library")
806 (description "Netcdf4-python is a Python interface to the netCDF C
807 library. netCDF version 4 has many features not found in earlier
808 versions of the library and is implemented on top of HDF5. This module
809 can read and write files in both the new netCDF 4 and the old netCDF 3
810 format, and can create files that are readable by HDF5 clients. The
811 API is modelled after @code{Scientific.IO.NetCDF}, and should be familiar
812 to users of that module.")
813 ;; The software is mainly ISC, but includes some files covered
814 ;; by the Expat license.
815 (license (list license:isc license:expat))))
817 (define-public python2-netcdf4
818 (package-with-python2 python-netcdf4))
820 (define-public python-lockfile
822 (name "python-lockfile")
827 (uri (string-append "https://pypi.python.org/packages/source/l/lockfile/"
828 "lockfile-" version ".tar.gz"))
831 "16gpx5hm73ah5n1079ng0vy381hl802v606npkx4x8nb0gg05vba"))))
832 (build-system python-build-system)
833 (arguments '(#:test-target "check"))
835 `(("python-pbr" ,python-pbr)))
836 (home-page "https://launchpad.net/pylockfile")
837 (synopsis "Platform-independent file locking module")
839 "The lockfile package exports a LockFile class which provides a simple
840 API for locking files.")
841 (license license:expat)))
843 (define-public python2-lockfile
844 (package-with-python2 python-lockfile))
846 (define-public python-setuptools
848 (name "python-setuptools")
853 (uri (pypi-uri "setuptools" version))
856 "0ypybh4hx3bv4vhg2dc74xpj1g56ggnaffm87k4abhwjwq6wq608"))
857 (modules '((guix build utils)))
860 ;; Remove included binaries which are used to build self-extracting
861 ;; installers for Windows.
862 ;; TODO: Find some way to build them ourself so we can include them.
863 (for-each delete-file (find-files "setuptools" "^(cli|gui).*\\.exe$"))
865 (build-system python-build-system)
866 ;; FIXME: Tests require pytest, which itself relies on setuptools.
867 ;; One could bootstrap with an internal untested setuptools.
870 (home-page "https://pypi.python.org/pypi/setuptools")
872 "Library designed to facilitate packaging Python projects")
874 "Setuptools is a fully-featured, stable library designed to facilitate
875 packaging Python projects, where packaging includes:
876 Python package and module definitions,
877 distribution package metadata,
879 project installation,
880 platform-specific details,
882 ;; TODO: setuptools now bundles the following libraries:
883 ;; packaging, pyparsing, six and appdirs. How to unbundle?
884 (license (list license:psfl ; setuptools itself
885 license:expat ; six, appdirs, pyparsing
886 license:asl2.0 ; packaging is dual ASL2/BSD-2
889 (define-public python2-setuptools
890 (package-with-python2 python-setuptools))
892 (define-public python-uniseg
894 (name "python-uniseg")
899 (uri (pypi-uri "uniseg" version ".zip"))
902 "05jsazvz6nbmh6l3v1rph5ydkqn1hzx1pyggdyvgp2qgmgrnmiz2"))))
903 (build-system python-build-system)
905 '(#:tests? #f)) ; The test suite requires network access.
909 "https://bitbucket.org/emptypage/uniseg-python")
911 "Python library to determine Unicode text segmentations")
913 "Uniseg is a Python package used to determine Unicode text segmentations.
914 Supported segmentations include:
916 @item @dfn{Code point} (any value in the Unicode codespace)
917 @item @dfn{Grapheme cluster} (user-perceived character made of a single or
918 multiple Unicode code points, e.g. \"G\" + acute-accent)
923 (license license:expat)))
925 (define-public python2-uniseg
926 (package-with-python2 python-uniseg))
928 (define-public python-humanfriendly
930 (name "python-humanfriendly")
935 (uri (pypi-uri "humanfriendly" version))
938 "0pisgizjql86785jchfjv217g0lsgk114g2lja5j4y3lsc3b9szi"))))
939 (build-system python-build-system)
941 `(;; XXX: Tests depend on coloredlogs, which in turn depends on humanfriendly.
944 `(("python-monotonic" ,python-monotonic)))
945 (home-page "https://humanfriendly.readthedocs.io")
946 (synopsis "Human-friendly input and output in Python")
948 "The functions and classes in @code{humanfriendly} can be used to make
949 text interfaces more user-friendly. It includes tools to parse and format
950 numbers, file sizes, and timespans, timers for long-running operations, menus
951 to allow the user to choose from a list of options, and terminal interaction
953 (license license:expat)))
955 (define-public python2-humanfriendly
956 (package-with-python2 python-humanfriendly))
958 (define-public python-capturer
960 (name "python-capturer")
965 (uri (pypi-uri "capturer" version))
968 "05d6ji4j8ipiq0br7bwam38qc6hd9l1djmfxlzrxx19ziyjl4089"))))
969 (build-system python-build-system)
973 `(("python-humanfriendly" ,python-humanfriendly)))
974 (home-page "https://capturer.readthedocs.io")
975 (synopsis "Capture stdout and stderr streams of the current process")
977 "The capturer package makes it easy to capture the stdout and stderr
978 streams of the current process and subprocesses. Output can be relayed
979 to the terminal in real time but is also available to the Python program
980 for additional processing.")
981 (license license:expat)))
983 (define-public python2-capturer
984 (package-with-python2 python-capturer))
986 (define-public python-verboselogs
988 (name "python-verboselogs")
993 (uri (pypi-uri "verboselogs" version))
996 "09z4d1jiasn7k1hs5af2ckmnrd0i1d1m04bhfjhv7z6svzfdwgg3"))))
997 (build-system python-build-system)
999 `(("python-mock" ,python-mock)
1000 ("python-astroid" ,python-astroid)
1001 ("python-pylint" ,python-pylint)))
1002 (home-page "https://verboselogs.readthedocs.io")
1003 (synopsis "Verbose logging level for Python's logging module")
1005 "The @code{verboselogs} package extends Python's @code{logging} module to
1006 add the log levels NOTICE, SPAM, SUCCESS and VERBOSE.")
1007 (license license:expat)))
1009 (define-public python2-verboselogs
1010 (package-with-python2 python-verboselogs))
1012 (define-public python-coloredlogs
1014 (name "python-coloredlogs")
1019 (uri (pypi-uri "coloredlogs" version))
1022 "1blcann6dyg5dhps9pg12rn0q0rjrlajpmmil0gy0j4cbvnl2il9"))))
1023 (build-system python-build-system)
1025 `(;Tests require some updated modules
1028 `(("python-capturer" ,python-capturer)))
1029 (home-page "https://coloredlogs.readthedocs.io")
1030 (synopsis "Colored stream handler for Python's logging module")
1032 "The @code{coloredlogs} package enables colored terminal output for
1033 Python's logging module. The @code{ColoredFormatter} class inherits from
1034 @code{logging.Formatter} and uses ANSI escape sequences to render your logging
1035 messages in color.")
1036 (license license:expat)))
1038 (define-public python2-coloredlogs
1039 (package-with-python2 python-coloredlogs))
1041 (define-public python-eventlet
1043 (name "python-eventlet")
1048 (uri (pypi-uri "eventlet" version))
1051 "0f3q55mq4n021wb7qa53pz3ix6i2py64sap66vsaqm2scjw83m9s"))))
1052 (build-system python-build-system)
1054 `(("python-greenlet" ,python-greenlet)))
1056 ;; TODO: Requires unpackaged 'enum-compat'.
1058 (home-page "http://eventlet.net")
1059 (synopsis "Concurrent networking library for Python")
1061 "Eventlet is a concurrent networking library for Python that
1062 allows you to change how you run your code, not how you write it.
1063 It uses @code{epoll} or @code{libevent} for highly scalable non-blocking I/O.
1064 Coroutines ensure that the developer uses a blocking style of programming
1065 that is similar to threading, but provide the benefits of non-blocking I/O.
1066 The event dispatch is implicit, which means you can easily use @code{Eventlet}
1067 from the Python interpreter, or as a small part of a larger application.")
1068 (license license:expat)))
1070 (define-public python2-eventlet
1071 (let ((base (package-with-python2
1072 (strip-python2-variant python-eventlet))))
1073 (package (inherit base)
1075 `(("python2-enum34" ,python2-enum34)
1076 ,@(package-propagated-inputs base))))))
1078 (define-public python-six
1085 (uri (pypi-uri "six" version))
1088 "1scqzwc51c875z23phj48gircqjgnn3af8zy2izjwmnlxrxsgs3h"))))
1089 (build-system python-build-system)
1092 (modify-phases %standard-phases
1095 (invoke "py.test" "-v"))))))
1097 `(("python-py" ,python-py)
1098 ("python-pytest" ,python-pytest-bootstrap)))
1099 (home-page "https://pypi.python.org/pypi/six/")
1100 (synopsis "Python 2 and 3 compatibility utilities")
1102 "Six is a Python 2 and 3 compatibility library. It provides utility
1103 functions for smoothing over the differences between the Python versions with
1104 the goal of writing Python code that is compatible on both Python versions.
1105 Six supports every Python version since 2.5. It is contained in only one
1106 Python file, so it can be easily copied into your project.")
1107 (license license:x11)))
1109 (define-public python2-six
1110 (package-with-python2 python-six))
1112 (define-public python-schedule
1114 (name "python-schedule")
1119 (uri (pypi-uri "schedule" version))
1122 "0vplyjcbfrq50sphlwya749z8p2pcyi2nycw3518i0qpd9a6189i"))))
1123 (build-system python-build-system)
1125 `(("python-pytest" ,python-pytest)
1126 ("python-mock" ,python-mock)))
1127 (home-page "https://github.com/dbader/schedule")
1128 (synopsis "Schedule periodic function calls in Python")
1130 "Schedule is an in-process scheduler for periodic jobs that uses the
1131 builder pattern for configuration. Schedule lets you run Python functions (or
1132 any other callable) periodically at pre-determined intervals using a simple,
1133 human-friendly syntax.")
1134 (license license:expat)))
1136 (define-public python2-schedule
1137 (package-with-python2 python-schedule))
1139 (define-public python-pandas
1141 (name "python-pandas")
1146 (uri (pypi-uri "pandas" version))
1148 (base32 "0v0fi2i10kwnmlpsl6f1fgajcpx3q6766qf6xqi5kw3ivn8l1aa4"))))
1149 (build-system python-build-system)
1151 `(#:modules ((guix build utils)
1152 (guix build python-build-system)
1155 #:phases (modify-phases %standard-phases
1158 (let ((build-directory
1161 (car (scandir "build"
1162 (cut string-prefix? "lib." <>))))))
1163 (with-directory-excursion build-directory
1164 ;; Delete tests that require "moto" which is not yet in Guix.
1165 (for-each delete-file
1166 '("pandas/tests/io/conftest.py"
1167 "pandas/tests/io/json/test_compression.py"
1168 "pandas/tests/io/test_excel.py"))
1169 (invoke "pytest" "-v" "pandas" "-k"
1171 "not network and not disabled"
1172 ;; XXX: Due to the deleted tests above.
1173 " and not test_read_s3_jsonl")))))))))
1175 `(("python-numpy" ,python-numpy)
1176 ("python-pytz" ,python-pytz)
1177 ("python-dateutil" ,python-dateutil)))
1179 `(("python-cython" ,python-cython)
1180 ("python-lxml" ,python-lxml)
1181 ("python-nose" ,python-nose)
1182 ("python-pytest" ,python-pytest)))
1183 (home-page "https://pandas.pydata.org")
1184 (synopsis "Data structures for data analysis, time series, and statistics")
1186 "Pandas is a Python package providing fast, flexible, and expressive data
1187 structures designed to make working with structured (tabular,
1188 multidimensional, potentially heterogeneous) and time series data both easy
1189 and intuitive. It aims to be the fundamental high-level building block for
1190 doing practical, real world data analysis in Python.")
1191 (license license:bsd-3)))
1193 (define-public python2-pandas
1194 (package-with-python2 python-pandas))
1196 (define-public python2-mechanize
1198 (name "python2-mechanize")
1203 (uri (string-append "https://pypi.python.org/packages/source/m/mechanize/mechanize-"
1207 "0rj7r166i1dyrq0ihm5rijfmvhs8a04im28lv05c0c3v206v4rrf"))))
1208 (build-system python-build-system)
1210 `(#:python ,python-2 ; apparently incompatible with Python 3
1212 ;; test fails with message
1213 ;; AttributeError: 'module' object has no attribute 'test_pullparser'
1214 ;; (python-3.3.2) or
1215 ;; AttributeError: 'module' object has no attribute 'test_urllib2_localnet'
1217 ;; The source code is from March 2011 and probably not up-to-date
1218 ;; with respect to python unit tests.
1219 (home-page "http://wwwsearch.sourceforge.net/mechanize/")
1221 "Stateful programmatic web browsing in Python")
1223 "Mechanize implements stateful programmatic web browsing in Python,
1224 after Andy Lester’s Perl module WWW::Mechanize.")
1225 (license (license:non-copyleft
1227 "See COPYING in the distribution."))))
1230 (define-public python-simplejson
1232 (name "python-simplejson")
1237 (uri (pypi-uri "simplejson" version))
1240 "1qhwsykjlb85igb4cfl6v6gkprzbbg8gyqdd7zscc8w3x0ifcfwm"))))
1241 (build-system python-build-system)
1242 (home-page "http://simplejson.readthedocs.org/en/latest/")
1244 "Json library for Python")
1246 "JSON (JavaScript Object Notation) is a subset of JavaScript
1247 syntax (ECMA-262 3rd edition) used as a lightweight data interchange
1250 Simplejson exposes an API familiar to users of the standard library marshal
1251 and pickle modules. It is the externally maintained version of the json
1252 library contained in Python 2.6, but maintains compatibility with Python 2.5
1253 and (currently) has significant performance advantages, even without using
1254 the optional C extension for speedups. Simplejson is also supported on
1256 (license license:x11)))
1258 (define-public python2-simplejson
1259 (package-with-python2 python-simplejson))
1262 (define-public python-pyicu
1264 (name "python-pyicu")
1269 (uri (pypi-uri "PyICU" version))
1272 "05nz4p2dpkhwj6y9kik24xbvmfxji39nl0xw0sc0nvp9fgzf6xnd"))))
1273 (build-system python-build-system)
1275 `(("icu4c" ,icu4c)))
1277 `(("python-pytest" ,python-pytest)
1278 ("python-six" ,python-six)))
1279 (home-page "https://github.com/ovalhub/pyicu")
1280 (synopsis "Python extension wrapping the ICU C++ API")
1282 "PyICU is a python extension wrapping the ICU C++ API.")
1283 (properties `((python2-variant . ,(delay python2-pyicu))))
1284 (license license:x11)))
1286 (define-public python2-pyicu
1287 (let ((base (package-with-python2
1288 (strip-python2-variant python-pyicu))))
1292 `(,@(package-arguments base)
1294 (modify-phases %standard-phases
1295 (add-before 'check 'delete-failing-test
1297 ;; XXX: This fails due to Unicode issues unique to Python 2,
1298 ;; it seems: <https://github.com/ovalhub/pyicu/issues/61>.
1299 (delete-file "test/test_Script.py")
1302 (define-public python2-dogtail
1303 ;; Python 2 only, as it leads to "TabError: inconsistent use of tabs and
1304 ;; spaces in indentation" with Python 3.
1306 (name "python2-dogtail")
1310 (uri (pypi-uri "dogtail" version))
1313 "0p5wfssvzr9w0bvhllzbbd8fnp4cca2qxcpcsc33dchrmh5n552x"))))
1314 (build-system python-build-system)
1315 (arguments `(#:python ,python-2
1316 #:tests? #f)) ; invalid command "test"
1317 ;; Currently no offical homepage.
1318 (home-page "https://pypi.python.org/pypi/dogtail/")
1319 (synopsis "GUI test tool and automation framework written in Python")
1321 "Dogtail is a GUI test tool and automation framework written in Python.
1322 It uses Accessibility (a11y) technologies to communicate with desktop
1323 applications. dogtail scripts are written in Python and executed like any
1324 other Python program.")
1325 (license license:gpl2+)))
1327 (define-public python2-empy
1329 (name "python2-empy")
1333 (uri (string-append "http://www.alcyone.com/software/empy/empy-"
1337 "01g8mmkfnvjdmlhsihwyx56lrg7r5m5d2fg6mnxsvy6g0dnl69f6"))))
1338 (build-system python-build-system)
1340 `(#:python ,python-2
1342 (modify-phases %standard-phases
1345 (zero? (system* "./test.sh")))))))
1346 (home-page "http://www.alcyone.com/software/empy/")
1347 (synopsis "Templating system for Python")
1349 "EmPy is a system for embedding Python expressions and statements in
1350 template text; it takes an EmPy source file, processes it, and produces
1351 output. This is accomplished via expansions, which are special signals to the
1352 EmPy system and are set off by a special prefix (by default the at sign, @@).
1353 EmPy can expand arbitrary Python expressions and statements in this way, as
1354 well as a variety of special forms. Textual data not explicitly delimited in
1355 this way is sent unaffected to the output, allowing Python to be used in
1356 effect as a markup language. Also supported are callbacks via hooks,
1357 recording and playback via diversions, and dynamic, chainable filters. The
1358 system is highly configurable via command line options and embedded
1360 (license license:lgpl2.1+)))
1362 (define-public python2-element-tree
1364 (name "python2-element-tree")
1369 "http://effbot.org/media/downloads/elementtree-"
1370 version "-20050316.tar.gz"))
1373 "016bphqnlg0l4vslahhw4r0aanw95bpypy65r1i1acyb2wj5z7dj"))))
1374 (build-system python-build-system)
1376 `(#:python ,python-2 ; seems to be part of Python 3
1377 #:tests? #f)) ; no 'test' sub-command
1378 (synopsis "Toolkit for XML processing in Python")
1380 "ElementTree is a Python library supporting lightweight XML processing.")
1381 (home-page "http://effbot.org/zone/element-index.htm")
1382 (license (license:x11-style
1383 "http://docs.python.org/2/license.html"
1384 "Like \"CWI LICENSE AGREEMENT FOR PYTHON 0.9.0 THROUGH 1.2\"."))))
1386 (define-public python2-pybugz
1388 (name "python2-pybugz")
1393 "http://bits.liquidx.net/projects/pybugz/pybugz-"
1397 "17ni00p08gp5lkxlrrcnvi3x09fmajnlbz4da03qcgl9q21ym4jd"))
1398 (patches (search-patches "pybugz-stty.patch"
1399 "pybugz-encode-error.patch"))))
1400 (build-system python-build-system)
1402 `(#:python ,python-2 ; SyntaxError with Python 3
1403 #:tests? #f)) ; no 'test' sub-command
1405 `(("element-tree" ,python2-element-tree)))
1406 (synopsis "Python and command-line interface to Bugzilla")
1408 "PyBugz is a Python library and command-line tool to query the Bugzilla
1409 bug tracking system. It is meant as an aid to speed up interaction with the
1411 (home-page "http://www.liquidx.net/pybugz/")
1412 (license license:gpl2)))
1414 (define-public python2-enum
1416 (name "python2-enum")
1420 (uri (pypi-uri "enum" version))
1423 "13lk3yrwj42vl30kw3c194f739nrfrdg64s6i0v2p636n4k8brsl"))))
1424 (build-system python-build-system)
1426 `(#:python ,python-2))
1427 (home-page "http://pypi.python.org/pypi/enum/")
1428 (synopsis "Robust enumerated type support in Python")
1430 "This provides a module for robust enumerations in Python. It has
1431 been superseded by the Python standard library and is provided only for
1433 ;; Choice of either license.
1434 (license (list license:gpl3+ license:psfl))))
1436 (define-public python-enum34
1438 (name "python-enum34")
1443 (uri (pypi-uri "enum34" version))
1446 "1cgm5ng2gcfrkrm3hc22brl6chdmv67b9zvva9sfs7gn7dwc9n4a"))))
1447 (build-system python-build-system)
1448 (home-page "https://pypi.python.org/pypi/enum34")
1449 (synopsis "Backported Python 3.4 Enum")
1451 "Enum34 is the new Python stdlib enum module available in Python 3.4
1452 backported for previous versions of Python from 2.4 to 3.3.")
1453 (license license:bsd-3)))
1455 (define-public python2-enum34
1456 (package-with-python2 python-enum34))
1458 (define-public python-parse-type
1460 (name "python-parse-type")
1465 (uri (pypi-uri "parse_type" version))
1468 "0g3b6gsdwnm8dpkh2vn34q6dzxm9gl908ggyzcv31n9xbp3vv5pm"))))
1469 (build-system python-build-system)
1471 `(("python-six" ,python-six)
1472 ("python-parse" ,python-parse)))
1474 `(("python-pytest" ,python-pytest)
1475 ("python-pytest-runner" ,python-pytest-runner)))
1476 (home-page "https://github.com/jenisys/parse_type")
1477 (synopsis "Extended parse module")
1479 "Parse_type extends the python parse module.")
1481 `((python2-variant . ,(delay python2-parse-type))))
1482 (license license:bsd-3)))
1484 (define-public python2-parse-type
1485 (let ((base (package-with-python2
1486 (strip-python2-variant python-parse-type))))
1487 (package (inherit base)
1489 `(("python2-enum34" ,python2-enum34)
1490 ,@(package-propagated-inputs base))))))
1492 (define-public python-parse
1494 (name "python-parse")
1499 (uri (pypi-uri "parse" version))
1502 "1lj9v1q4imszyhvipb6drsm3xdl35nan011mqxxas1yaypixsj40"))))
1503 (build-system python-build-system)
1506 (modify-phases %standard-phases
1508 (lambda _ (invoke "python" "test_parse.py"))))))
1509 (home-page "https://github.com/r1chardj0n3s/parse")
1510 (synopsis "Parse strings")
1512 "Parse strings using a specification based on the Python format()
1514 (license license:x11)))
1516 (define-public python-polib
1518 (name "python-polib")
1522 (uri (pypi-uri "polib" version))
1525 "1pq2hbm3m2q0cjdszk8mc4qa1vl3wcblh5nfyirlfnzb2pcy7zss"))))
1526 (build-system python-build-system)
1527 (home-page "https://bitbucket.org/izi/polib/wiki/Home")
1528 (synopsis "Manipulate, create and modify gettext files")
1529 (description "Polib can manipulate any gettext format (po, pot and mo)
1530 files. It can be used to create po files from scratch or to modify
1532 (license license:expat)))
1534 (define-public python2-polib
1535 (let ((base (package-with-python2 (strip-python2-variant python-polib))))
1538 (arguments `(,@(package-arguments base)
1539 ;; Tests don't work with python2.
1542 (define-public scons
1548 (uri (string-append "mirror://sourceforge/scons/scons/" version
1549 "/scons-" version ".tar.gz"))
1552 "0wzid419mlwqw9llrg8gsx4nkzhqy16m4m40r0xnh6cwscw5wir4"))))
1553 (build-system python-build-system)
1555 `(#:use-setuptools? #f ; still relies on distutils
1556 #:tests? #f)) ; no 'python setup.py test' command
1557 (home-page "http://scons.org/")
1558 (synopsis "Software construction tool written in Python")
1560 "SCons is a software construction tool. Think of SCons as an improved,
1561 cross-platform substitute for the classic Make utility with integrated
1562 functionality similar to autoconf/automake and compiler caches such as ccache.
1563 In short, SCons is an easier, more reliable and faster way to build
1565 (license license:x11)))
1567 (define-public scons-python2
1569 (inherit (package-with-python2 scons))
1570 (name "scons-python2")))
1572 (define-public python-extras
1574 (name "python-extras")
1579 (uri (pypi-uri "extras" version))
1582 "0khvm08rcwm62wc47j8niyl6h13f8w51c8669ifivjdr23g3cbhk"))))
1583 (build-system python-build-system)
1585 ;; FIXME: Circular dependency on testtools.
1587 (home-page "https://github.com/testing-cabal/extras")
1588 (synopsis "Useful extensions to the Python standard library")
1590 "Extras is a set of extensions to the Python standard library.")
1591 (license license:expat)))
1593 (define-public python2-extras
1594 (package-with-python2 python-extras))
1596 (define-public python-mimeparse
1598 (name "python-mimeparse")
1604 "https://pypi.python.org/packages/source/p/python-mimeparse/python-mimeparse-"
1608 "1hyxg09kaj02ri0rmwjqi86wk4nd1akvv7n0dx77azz76wga4s9w"))))
1609 (build-system python-build-system)
1611 '(#:tests? #f)) ; no setup.py test command
1613 "https://github.com/dbtsai/python-mimeparse")
1614 (synopsis "Python library for parsing MIME types")
1616 "Mimeparse provides basic functions for parsing MIME type names and
1617 matching them against a list of media-ranges.")
1618 (license license:expat)))
1620 (define-public python2-mimeparse
1621 (package-with-python2 python-mimeparse))
1623 (define-public python-pafy
1625 (name "python-pafy")
1630 (uri (pypi-uri "pafy" version))
1633 "1a7dxi95m1043rxx1r5x3ngb66nwlq6aqcasyqqjzmmmjps4zrim"))))
1634 (build-system python-build-system)
1636 `(#:tests? #f)) ; Currently pafy can not find itself in the tests
1638 ;; Youtube-dl is a python package which is imported in the file
1639 ;; "backend_youtube_dl.py", therefore it needs to be propagated.
1640 `(("youtube-dl" ,youtube-dl)))
1641 (home-page "https://np1.github.io/pafy/")
1642 (synopsis "Retrieve YouTube content and metadata")
1644 "@code{pafy} is a python library to retrieve YouTube content and metadata.")
1645 (license license:lgpl3+)))
1647 (define-public python2-funcsigs
1649 (name "python2-funcsigs")
1653 (uri (pypi-uri "funcsigs" version))
1656 "0l4g5818ffyfmfs1a924811azhjj8ax9xd1cffr1mzd3ycn0zfx7"))))
1657 (build-system python-build-system)
1659 `(#:python ,python-2))
1661 `(("python2-unittest2" ,python2-unittest2)))
1662 (home-page "http://funcsigs.readthedocs.org")
1663 (synopsis "Python function signatures from PEP362")
1665 "Backport of @code{funcsigs} which was introduced in Python 3.3.")
1666 (license license:asl2.0)))
1668 (define-public python-pafy
1670 (name "python-pafy")
1675 (uri (pypi-uri "pafy" version))
1678 "1a7dxi95m1043rxx1r5x3ngb66nwlq6aqcasyqqjzmmmjps4zrim"))))
1679 (build-system python-build-system)
1681 `(#:tests? #f)) ; Currently pafy can not find itself in the tests
1683 ;; Youtube-dl is a python package which is imported in the file
1684 ;; "backend_youtube_dl.py", therefore it needs to be propagated.
1685 `(("youtube-dl" ,youtube-dl)))
1686 (home-page "https://np1.github.io/pafy/")
1687 (synopsis "Retrieve YouTube content and metadata")
1689 "@code{pafy} is a python library to retrieve YouTube content and metadata.")
1690 (license license:lgpl3+)))
1692 (define-public python-py
1699 (uri (pypi-uri "py" version))
1702 "1qyd5z0hv8ymxy84v5vig3vps2fvhcf4bdlksb3r03h549fmhb8g"))))
1703 (build-system python-build-system)
1705 ;; FIXME: "ImportError: 'test' module incorrectly imported from
1706 ;; '/gnu/store/...-python-pytest-mimimal-3.0.5/lib/python3.5/site-packages'.
1707 ;; Expected '/tmp/guix-build-python-py-1.4.31.drv-0/py-1.4.31/py'.
1708 ;; Is this module globally installed?"
1710 (home-page "http://pylib.readthedocs.org/")
1711 (synopsis "Python library for parsing, I/O, instrospection, and logging")
1713 "Py is a Python library for file name parsing, .ini file parsing, I/O,
1714 code introspection, and logging.")
1715 (license license:expat)))
1717 (define-public python2-py
1718 (package-with-python2 python-py))
1720 ;; Recent versions of python-fixtures and python-testrepository need
1721 ;; python-pbr for packaging, which itself needs these two packages for
1723 ;; To fix this circular dependency, we use a build of python-pbr, based on the
1724 ;; same source, just without any test dependencies and with tests disabled.
1725 ;; python-pbr-minmal is then used to package python-fixtures and
1726 ;; python-testrepository.
1727 ;; Strictly speaking we currently could remove the test-requirements from the
1728 ;; normal python-pbr package (and save this package) since test are disabled
1729 ;; there anyway. But this may change in future.
1730 (define-public python-pbr-minimal
1732 (name "python-pbr-minimal")
1737 (uri (pypi-uri "pbr" version))
1740 "14fs5acnalnb3h62s7q7av239j541fk0n0z0lawh4h09b1s93s6p"))))
1741 (build-system python-build-system)
1744 (home-page "http://docs.openstack.org/developer/pbr/")
1745 (synopsis "Minimal build of python-pbr used for bootstrapping")
1747 "Used only for bootstrapping python2-pbr, you should not need this.")
1748 (license license:asl2.0)))
1750 (define-public python2-pbr-minimal
1751 (package-with-python2 python-pbr-minimal))
1753 (define-public python-pbr
1755 (inherit python-pbr-minimal)
1758 `(#:tests? #f)) ;; Most tests seem to use the Internet.
1760 `(("git" ,git))) ;; pbr actually uses the "git" binary.
1762 `(("python-fixtures" ,python-fixtures-bootstrap)
1763 ;; discover, coverage, hacking, subunit
1764 ("python-mock" ,python-mock)
1765 ("python-six" ,python-six)
1766 ("python-sphinx" ,python-sphinx)
1767 ("python-testrepository" ,python-testrepository-bootstrap)
1768 ("python-testresources" ,python-testresources-bootstrap)
1769 ("python-testscenarios" ,python-testscenarios-bootstrap)
1770 ("python-testtools" ,python-testtools-bootstrap)
1771 ("python-virtualenv" ,python-virtualenv)))
1772 (synopsis "Enhance the default behavior of Python’s setuptools")
1774 "Python Build Reasonableness (PBR) is a library that injects some useful
1775 and sensible default behaviors into your setuptools run. It will set
1776 versions, process requirements files and generate AUTHORS and ChangeLog file
1777 from git information.
1780 (define-public python2-pbr
1781 (package-with-python2 python-pbr))
1783 (define-public python-exif-read
1785 (name "python-exif-read")
1789 (uri (pypi-uri "ExifRead" version))
1792 "1b90jf6m9vxh9nanhpyvqdq7hmfx5iggw1l8kq10jrs6xgr49qkr"))))
1793 (build-system python-build-system)
1794 (arguments `(#:tests? #f)) ; no tests
1795 (home-page "https://github.com/ianare/exif-py")
1796 (synopsis "Python library to extract EXIF data from image files")
1798 "ExifRead is a Python library to extract EXIF data from tiff and jpeg
1800 (license license:bsd-3)))
1802 (define-public python2-exif-read
1803 (package-with-python2 python-exif-read))
1805 (define-public python-pyld
1807 (name "python-pyld")
1811 (uri (pypi-uri "PyLD" version))
1814 "1m0fs6897vxfkf7awah5i66i7b7smm5fnywf1w50fpzyfbfhr156"))))
1815 (build-system python-build-system)
1816 (arguments `(#:tests? #f)) ; no tests
1817 (home-page "https://github.com/digitalbazaar/pyld")
1818 (synopsis "Python implementation of the JSON-LD specification")
1820 "PyLD is an implementation of the JSON-LD specification.")
1821 (license license:bsd-3)))
1823 (define-public python2-pyld
1824 (package-with-python2 python-pyld))
1826 (define-public python-click
1828 (name "python-click")
1833 (uri (pypi-uri "click" version))
1836 "02qkfpykbq35id8glfgwc38yc430427yd05z1wc5cnld8zgicmgi"))))
1837 (build-system python-build-system)
1839 `(;; The tests are fragile, depending on a specific version of pytest:
1840 ;; <https://github.com/pallets/click/issues/823>
1843 (modify-phases %standard-phases
1844 (add-after 'unpack 'fix-paths
1845 (lambda* (#:key inputs #:allow-other-keys)
1846 (let ((glibc (assoc-ref inputs ,(if (%current-target-system)
1847 "cross-libc" "libc"))))
1848 (substitute* "click/_unicodefun.py"
1850 (string-append "'" glibc "/bin/locale'"))))
1853 `(("python-pytest" ,python-pytest)))
1854 (home-page "http://click.pocoo.org")
1855 (synopsis "Command line library for Python")
1857 "Click is a Python package for creating command line interfaces in a
1858 composable way with as little code as necessary. Its name stands for
1859 \"Command Line Interface Creation Kit\". It's highly configurable but comes
1860 with sensible defaults out of the box.")
1861 (license license:bsd-3)))
1863 (define-public python2-click
1864 (package-with-python2 python-click))
1866 (define-public python-wheel
1868 (name "python-wheel")
1869 (version "0.30.0a0")
1873 (uri (pypi-uri "wheel" version))
1876 "1nm6mn8isny0hr86rhbfrpfj867c0phf001xgsd69xfp9ady1wwq"))))
1877 (build-system python-build-system)
1879 `(("python-jsonschema" ,python-jsonschema)
1880 ("python-pytest-cov" ,python-pytest-cov)))
1881 (home-page "https://bitbucket.org/pypa/wheel/")
1882 (synopsis "Format for built Python packages")
1884 "A wheel is a ZIP-format archive with a specially formatted filename and
1885 the @code{.whl} extension. It is designed to contain all the files for a PEP
1886 376 compatible install in a way that is very close to the on-disk format. Many
1887 packages will be properly installed with only the @code{Unpack} step and the
1888 unpacked archive preserves enough information to @code{Spread} (copy data and
1889 scripts to their final locations) at any later time. Wheel files can be
1890 installed with a newer @code{pip} or with wheel's own command line utility.")
1891 (license license:expat)
1892 (properties `((python2-variant . ,(delay python2-wheel))))))
1894 (define-public python2-wheel
1895 (let ((wheel (package-with-python2
1896 (strip-python2-variant python-wheel))))
1897 (package (inherit wheel)
1898 (native-inputs `(("python2-functools32" ,python2-functools32)
1899 ,@(package-native-inputs wheel))))))
1901 (define-public python-vcversioner
1903 (name "python-vcversioner")
1904 (version "2.16.0.0")
1908 (uri (pypi-uri "vcversioner" version))
1911 "16z10sm78jd7ca3jbkgc3q5i8a8q7y1h21q1li21yy3rlhbhrrns"))))
1912 (build-system python-build-system)
1913 (synopsis "Python library for version number discovery")
1914 (description "Vcversioner is a Python library that inspects tagging
1915 information in a variety of version control systems in order to discover
1917 (home-page "https://github.com/habnabit/vcversioner")
1918 (license license:isc)))
1920 (define-public python2-vcversioner
1921 (package-with-python2 python-vcversioner))
1923 (define-public python-jsonschema
1925 (name "python-jsonschema")
1931 "https://pypi.python.org/packages/source/j/jsonschema/jsonschema-"
1935 "0hddbqjm4jq63y8jf44nswina1crjs16l9snb6m3vvgyg31klrrn"))))
1936 (build-system python-build-system)
1939 (modify-phases %standard-phases
1940 (replace 'check (lambda _ (zero? (system* "nosetests")))))))
1942 `(("python-nose" ,python-nose)
1943 ("python-vcversioner" ,python-vcversioner)))
1944 (home-page "https://github.com/Julian/jsonschema")
1945 (synopsis "Implementation of JSON Schema for Python")
1947 "Jsonschema is an implementation of JSON Schema for Python.")
1948 (license license:expat)
1949 (properties `((python2-variant . ,(delay python2-jsonschema))))))
1951 (define-public python2-jsonschema
1952 (let ((jsonschema (package-with-python2
1953 (strip-python2-variant python-jsonschema))))
1954 (package (inherit jsonschema)
1956 `(("python2-mock" ,python2-mock)
1957 ,@(package-native-inputs jsonschema)))
1959 `(("python2-functools32" ,python2-functools32))))))
1961 (define-public python-schema
1963 (name "python-schema")
1968 (uri (pypi-uri "schema" version))
1971 "1lw28j9w9vxyigg7vkfkvi6ic9lgjkdnfvnxdr7pklslqvzmk2vm"))))
1972 (build-system python-build-system)
1974 `(("python-pytest" ,python-pytest)))
1975 (home-page "https://github.com/keleshev/schema")
1976 (synopsis "Simple data validation library")
1978 "@code{python-schema} is a library for validating Python data
1979 structures, such as those obtained from config-files, forms, external
1980 services or command-line parsing, converted from JSON/YAML (or
1981 something else) to Python data-types.")
1982 (license license:psfl)))
1984 (define-public python2-schema
1985 (package-with-python2 python-schema))
1987 (define-public python-schema-0.5
1988 (package (inherit python-schema)
1993 (uri (pypi-uri "schema" version))
1996 "10zqvpaky51kgb8nd42bk7jwl8cn2zvayxjpdc1wwmpybj92x67s"))))))
1998 (define-public python2-schema-0.5
1999 (package-with-python2 python-schema-0.5))
2001 (define-public python-kitchen
2003 (name "python-kitchen")
2008 (uri (pypi-uri "kitchen" version))
2011 "1zakh6l0yjvwic9p0nkvmbidpnkygkxbigh2skmb5gccyrhbp7xg"))))
2012 (build-system python-build-system)
2014 `(("python-chardet" ,python-chardet)))
2015 (home-page "https://github.com/fedora-infra/kitchen")
2016 (synopsis "Python API for snippets")
2017 (description "@code{kitchen} module provides a python API for all sorts of
2018 little useful snippets of code that everybody ends up writing for their projects
2019 but never seem big enough to build an independent release. Use kitchen and stop
2020 cutting and pasting that code over and over.")
2021 (license (list license:lgpl2.1+
2022 ;; subprocess.py, test_subprocess.py,
2023 ;; kitchen/pycompat25/defaultdict.py:
2026 (define-public python2-kitchen
2027 (package-with-python2 python-kitchen))
2029 (define-public python-unidecode
2031 (name "python-unidecode")
2035 (uri (pypi-uri "Unidecode" version))
2038 "0lfhp9c5xrbpjvbpr12ji52g1lx04404bzzdg6pvabhzisw6l2i8"))))
2039 (build-system python-build-system)
2040 (home-page "https://pypi.python.org/pypi/Unidecode")
2041 (synopsis "ASCII transliterations of Unicode text")
2043 "Unidecode provides ASCII transliterations of Unicode text. Unidecode is
2044 useful when integrating with legacy code that doesn't support Unicode, or for
2045 ease of entry of non-Roman names on a US keyboard, or when constructing ASCII
2046 machine identifiers from human-readable Unicode strings that should still be
2047 somewhat intelligible.")
2048 (license license:gpl2+)))
2050 (define-public python2-unidecode
2051 (package-with-python2 python-unidecode))
2053 (define-public python-pyjwt
2055 (name "python-pyjwt")
2060 (uri (pypi-uri "PyJWT" version))
2063 "1rxsg14i33vm2i6lz0my628108c81k43v10n4h3p0gx62xdyf2sh"))
2064 (modules '((guix build utils)))
2067 (for-each delete-file-recursively
2068 (find-files "." "\\.pyc$"))
2070 (build-system python-build-system)
2072 `(("python-pytest" ,python-pytest)
2073 ("python-pytest-cov" ,python-pytest-cov)
2074 ("python-pytest-runner" ,python-pytest-runner)))
2075 (home-page "https://github.com/progrium/pyjwt")
2076 (synopsis "JSON Web Token implementation in Python")
2078 "PyJWT is a JSON Web Token implementation written in Python.")
2079 (license license:expat)))
2081 (define-public python2-pyjwt
2082 (package-with-python2 python-pyjwt))
2084 (define-public python-pykka
2086 (name "python-pykka")
2091 (uri (pypi-uri "Pykka" version))
2094 "049w3r0mdnnw7xv19jiq7rvls9k7xs73x05b4qs5d6z4vvmgyiz8"))))
2095 (build-system python-build-system)
2097 `(("python-mock" ,python-mock)
2098 ("python-nose" ,python-nose)
2099 ("python-gevent" ,python-gevent)
2100 ("python-eventlet" ,python-eventlet)))
2101 (home-page "https://www.pykka.org/")
2102 (synopsis "Pykka is a Python implementation of the actor model")
2104 "Pykka is a Python implementation of the actor model.
2105 The actor model introduces some simple rules to control the sharing
2106 of state and cooperation between execution units, which makes it
2107 easier to build concurrent applications.")
2108 (license license:asl2.0)))
2110 (define-public python2-pykka
2111 (package-with-python2 python-pykka))
2113 (define-public python-itsdangerous
2115 (name "python-itsdangerous")
2121 "https://pypi.python.org/packages/source/i/itsdangerous/itsdangerous-"
2125 "06856q6x675ly542ig0plbqcyab6ksfzijlyf1hzhgg3sgwgrcyb"))))
2126 (build-system python-build-system)
2127 (home-page "https://github.com/mitsuhiko/itsdangerous")
2128 (synopsis "Python library for passing data to/from untrusted environments")
2130 "Itsdangerous provides various helpers to pass trusted data to untrusted
2131 environments and back.")
2132 (license license:bsd-3)))
2134 (define-public python2-itsdangerous
2135 (package-with-python2 python-itsdangerous))
2137 (define-public python-pyyaml
2139 (name "python-pyyaml")
2144 (uri (pypi-uri "PyYAML" version))
2147 "1aqjl8dk9amd4zr99n8v2qxzgmr2hdvqfma4zh7a41rj6336c9sr"))))
2148 (build-system python-build-system)
2150 `(("libyaml" ,libyaml)))
2151 (home-page "http://pyyaml.org/wiki/PyYAML")
2152 (synopsis "YAML parser and emitter for Python")
2154 "PyYAML is a YAML parser and emitter for Python. PyYAML features a
2155 complete YAML 1.1 parser, Unicode support, pickle support, capable extension
2156 API, and sensible error messages. PyYAML supports standard YAML tags and
2157 provides Python-specific tags that allow to represent an arbitrary Python
2159 (license license:expat)))
2161 (define-public python2-pyyaml
2162 (package-with-python2 python-pyyaml))
2164 (define-public python-virtualenv
2166 (name "python-virtualenv")
2171 (uri (pypi-uri "virtualenv" version))
2174 "07cbajzk8l05k5zhlw0b9wbf2is65bl9v6zrn2a0iyn57w6pd73d"))))
2175 (build-system python-build-system)
2178 (modify-phases %standard-phases
2181 ;; Disable failing test. See upstream bug report
2182 ;; https://github.com/pypa/virtualenv/issues/957
2183 (substitute* "tests/test_virtualenv.py"
2184 (("skipif.*") "skipif(True, reason=\"Guix\")\n"))
2185 (zero? (system* "py.test")))))))
2187 `(("python-mock" ,python-mock)
2188 ("python-pytest" ,python-pytest)))
2189 (home-page "https://virtualenv.pypa.io/")
2190 (synopsis "Virtual Python environment builder")
2192 "Virtualenv is a tool to create isolated Python environments.")
2193 (license license:expat)))
2195 (define-public python2-virtualenv
2196 (package-with-python2 python-virtualenv))
2198 (define-public python-markupsafe
2200 (name "python-markupsafe")
2206 "https://pypi.python.org/packages/source/M/MarkupSafe/MarkupSafe-"
2210 "1hvip33wva3fnmvfp9x5klqri7hpl1hkgqmjbss18nmrb7zimv54"))))
2211 (build-system python-build-system)
2212 (home-page "https://github.com/mitsuhiko/markupsafe")
2213 (synopsis "XML/HTML/XHTML markup safe string implementation for Python")
2215 "Markupsafe provides an XML/HTML/XHTML markup safe string implementation
2217 (license license:bsd-3)))
2219 (define-public python2-markupsafe
2220 (package-with-python2 python-markupsafe))
2222 (define-public python-jinja2
2224 (name "python-jinja2")
2229 (uri (pypi-uri "Jinja2" version))
2232 "1zzrkywhziqffrzks14kzixz7nd4yh2vc0fb04a68vfd2ai03anx"))))
2233 (build-system python-build-system)
2235 `(("python-markupsafe" ,python-markupsafe)))
2236 (home-page "http://jinja.pocoo.org/")
2237 (synopsis "Python template engine")
2239 "Jinja2 is a small but fast and easy to use stand-alone template engine
2240 written in pure Python.")
2241 (license license:bsd-3)))
2243 (define-public python2-jinja2
2244 (package-with-python2 python-jinja2))
2246 (define-public python-pystache
2248 (name "python-pystache")
2252 (uri (pypi-uri "pystache" version))
2255 "0nmqsfmiw4arjxqkmf9z66ml950pcdjk6aq4gin4sywmzdjw5fzp"))))
2256 (build-system python-build-system)
2258 '(#:tests? #f)) ; FIXME: Python 3 tests are failing.
2259 (home-page "http://defunkt.io/pystache/")
2260 (synopsis "Python logic-less template engine")
2262 "Pystache is a Python implementation of the framework agnostic,
2263 logic-free templating system Mustache.")
2264 (license license:expat)
2265 (properties `((python2-variant . ,(delay python2-pystache))))))
2267 (define-public python2-pystache
2268 (package (inherit (package-with-python2
2269 (strip-python2-variant python-pystache)))
2271 `(#:python ,python-2
2273 (modify-phases %standard-phases
2276 (zero? (system* "python" "test_pystache.py")))))))))
2278 (define-public python-joblib
2280 (name "python-joblib")
2284 (uri (pypi-uri "joblib" version))
2287 "0787k919zlfmgymprz5bzv0v1df5bbirlf3awrghmjgvkrd9dci9"))
2288 (modules '((guix build utils)))
2291 ;; Remove pre-compiled .pyc files from source.
2292 (for-each delete-file-recursively
2293 (find-files "." "__pycache__" #:directories? #t))
2294 (for-each delete-file (find-files "." "\\.pyc$"))
2296 (build-system python-build-system)
2299 (modify-phases %standard-phases
2300 (add-before 'check 'disable-failing-tests
2302 ;; This numpydoc tests fails for unknown reasons
2303 (delete-file "doc/sphinxext/numpydoc/tests/test_docscrape.py")
2304 ;; This numpydoc test depends on matplotlib, which is not a
2306 (delete-file "doc/sphinxext/numpydoc/tests/test_plot_directive.py")
2307 ;; These tests fail to execute sys.executable
2308 (substitute* "joblib/test/test_parallel.py"
2309 (("import nose" line)
2310 (string-append "from nose.plugins.skip import SkipTest\n" line))
2311 (("def test_nested_parallel_warnings" line)
2312 (string-append "@SkipTest\n" line))
2313 (("def test_parallel_with_interactively_defined_functions" line)
2314 (string-append "@SkipTest\n" line)))
2316 ;; Provide nose to enable tests command
2318 `(("python-nose" ,python-nose)
2319 ("python-sphinx" ,python-sphinx)
2320 ("python-docutils" ,python-docutils)
2321 ("python-numpydoc" ,python-numpydoc)))
2322 (home-page "http://pythonhosted.org/joblib/")
2323 (synopsis "Using Python functions as pipeline jobs")
2325 "Joblib is a set of tools to provide lightweight pipelining in Python.
2326 In particular, joblib offers: transparent disk-caching of the output values
2327 and lazy re-evaluation (memoize pattern), easy simple parallel computing
2328 logging and tracing of the execution.")
2329 (license license:bsd-3)))
2331 (define-public python2-joblib
2332 (package-with-python2 python-joblib))
2334 (define-public python-docutils
2336 (name "python-docutils")
2341 (uri (pypi-uri "docutils" version))
2344 "0x22fs3pdmr42kvz6c654756wja305qv6cx1zbhwlagvxgr4xrji"))))
2345 (build-system python-build-system)
2347 '(#:tests? #f)) ; no setup.py test command
2348 (home-page "http://docutils.sourceforge.net/")
2349 (synopsis "Python Documentation Utilities")
2351 "Docutils is a modular system for processing documentation into useful
2352 formats, such as HTML, XML, and LaTeX. For input Docutils supports
2354 ;; Most of the source code is public domain, but some source files are
2355 ;; licensed under the PFSL, BSD 2-clause, and GPLv3+ licenses.
2356 (license (list license:public-domain license:psfl license:bsd-2 license:gpl3+))))
2358 (define-public python2-docutils
2359 (package-with-python2 python-docutils))
2361 (define-public python-pygments
2363 (name "python-pygments")
2368 (uri (pypi-uri "Pygments" version))
2371 "1k78qdvir1yb1c634nkv6rbga8wv4289xarghmsbbvzhvr311bnv"))))
2372 (build-system python-build-system)
2374 ;; FIXME: Tests require sphinx, which depends on this.
2376 (home-page "http://pygments.org/")
2377 (synopsis "Syntax highlighting")
2379 "Pygments is a syntax highlighting package written in Python.")
2380 (license license:bsd-2)))
2382 (define-public python2-pygments
2383 (package-with-python2 python-pygments))
2385 (define-public python-sphinxcontrib-websupport
2387 (name "python-sphinxcontrib-websupport")
2391 (uri (pypi-uri "sphinxcontrib-websupport" version))
2394 "1f9f0wjpi9nhikbyaz6d19s7qvzdf1nq2g5dsh640fma4q9rd1bs"))))
2395 (build-system python-build-system)
2397 `(("python-mock" ,python-mock)
2398 ("python-pytest" ,python-pytest)
2399 ("python-xapian-bindings" ,python-xapian-bindings)))
2400 ;; Needed for running the test suite
2402 `(("python-six" ,python-six)
2403 ("python-jinja2" ,python-jinja2)
2404 ("python-docutils" ,python-docutils)
2405 ("python-sphinx" ,python-sphinx)
2406 ("python-sqlalchemy" ,python-sqlalchemy)
2407 ("python-whoosh" ,python-whoosh)))
2408 (home-page "http://sphinx-doc.org/")
2409 (synopsis "Sphinx API for web applications")
2410 (description "This package provides a Python API to easily integrate
2411 Sphinx documentation into your web application. It provides tools to
2412 integrate Sphinx documents in web templates and to handle searches.")
2413 (license license:bsd-3)))
2415 (define-public python-sphinx
2417 (name "python-sphinx")
2422 (uri (pypi-uri "Sphinx" version))
2425 "1i8p9idnli4gr0y4x67yakbdk5w6a0xjzhrg6bg51y9d1fi7fslf"))))
2426 (build-system python-build-system)
2429 (modify-phases %standard-phases
2432 ;; Requires Internet access.
2433 (delete-file "tests/test_build_linkcheck.py")
2434 (zero? (system* "make" "test")))))))
2436 `(("python-imagesize" ,python-imagesize)
2437 ("python-sphinx-alabaster-theme"
2438 ,python-sphinx-alabaster-theme)
2439 ("python-babel" ,python-babel)
2440 ("python-snowballstemmer" ,python-snowballstemmer)
2441 ("python-docutils" ,python-docutils)
2442 ("python-jinja2" ,python-jinja2)
2443 ("python-pygments" ,python-pygments)
2444 ("python-requests" ,python-requests)
2445 ("python-six" ,python-six)))
2447 `(("graphviz" ,graphviz)
2448 ("python-html5lib" ,python-html5lib)
2449 ("python-mock" ,python-mock)
2450 ("python-nose" ,python-nose)))
2451 (home-page "http://sphinx-doc.org/")
2452 (synopsis "Python documentation generator")
2453 (description "Sphinx is a tool that makes it easy to create documentation
2454 for Python projects or other documents consisting of multiple reStructuredText
2456 (license license:bsd-3)
2457 (properties `((python2-variant . ,(delay python2-sphinx))))))
2459 (define-public python-sphinx-1.6
2460 (package (inherit python-sphinx)
2461 (name "python-sphinx")
2465 (uri (pypi-uri "Sphinx" version))
2468 "1rj6f3i8hmrx2qlkshi5kp5xcy98dlynwlyl05yvflj5f66dp2xg"))))
2471 (modify-phases %standard-phases
2474 ;; Requires Internet access.
2475 (delete-file "tests/test_build_linkcheck.py")
2476 (substitute* "tests/test_build_latex.py"
2477 (("@pytest.mark.sphinx\\('latex', testroot='images'\\)")
2478 "@pytest.mark.skip()"))
2479 (zero? (system* "make" "test")))))))
2481 `(("python-sphinxcontrib-websupport" ,python-sphinxcontrib-websupport)
2482 ,@(package-propagated-inputs python-sphinx)))
2484 `(("python-pytest" ,python-pytest)
2485 ("imagemagick" ,imagemagick) ; for "convert"
2486 ,@(package-native-inputs python-sphinx)))
2487 (properties `((python2-variant . ,(delay python2-sphinx-1.6))))))
2489 (define-public python2-sphinx-1.6
2490 (let ((base (package-with-python2 (strip-python2-variant python-sphinx-1.6))))
2494 `(("python2-typing" ,python2-typing)
2495 ,@(package-propagated-inputs base)))
2496 (native-inputs `(("python2-enum34" ,python2-enum34)
2497 ,@(package-native-inputs base))))))
2499 (define-public python-sphinx-1.5.3
2501 (inherit python-sphinx)
2502 (name "python-sphinx")
2507 (uri (pypi-uri "Sphinx" version))
2510 "0kw1axswbvaavr8ggyf4qr6hnisnrzlbkkcdada69vk1x9xjassg"))))
2512 `(("python-pytest" ,python-pytest)
2513 ,@(package-native-inputs python-sphinx)))))
2515 (define-public python2-sphinx
2516 (let ((base (package-with-python2 (strip-python2-variant python-sphinx))))
2519 (native-inputs `(("python2-mock" ,python2-mock)
2520 ("python2-enum34" ,python2-enum34)
2521 ,@(package-native-inputs base)))
2522 (propagated-inputs `(("python2-pytz" ,python2-pytz)
2523 ,@(package-propagated-inputs base))))))
2525 (define-public python-sphinx-rtd-theme
2527 (name "python-sphinx-rtd-theme")
2532 (uri (pypi-uri "sphinx_rtd_theme" version))
2535 "05rlhjzdyapr2w74jjs7mrm8hi69qskcr5vya9f9drpsys7lpxrd"))))
2536 (build-system python-build-system)
2537 (arguments '(#:tests? #f)) ; No tests.
2539 `(("python-sphinx" ,python-sphinx)))
2540 (home-page "https://github.com/snide/sphinx_rtd_theme/")
2541 (synopsis "ReadTheDocs.org theme for Sphinx")
2542 (description "A theme for Sphinx used by ReadTheDocs.org.")
2543 (license license:expat)))
2545 (define-public python2-sphinx-rtd-theme
2546 (package-with-python2 python-sphinx-rtd-theme))
2548 (define-public python-guzzle-sphinx-theme
2550 (name "python-guzzle-sphinx-theme")
2555 (uri (pypi-uri "guzzle_sphinx_theme" version))
2558 "1rnkzrrsbnifn3vsb4pfaia3nlvgvw6ndpxp7lzjrh23qcwid34v"))))
2559 (build-system python-build-system)
2561 `(("python-sphinx" ,python-sphinx)))
2562 (home-page "https://github.com/guzzle/guzzle_sphinx_theme")
2563 (synopsis "Sphinx theme used by Guzzle")
2564 (description "This package provides guzzle_sphinx_theme, a theme for the
2565 Sphinx documentation system, used by @uref{http://docs.guzzlephp.org, Guzzle}
2566 and several other projects.")
2567 (license license:expat)))
2569 (define-public python2-guzzle-sphinx-theme
2570 (package-with-python2 python-guzzle-sphinx-theme))
2572 (define-public python-rst.linker
2574 (name "python-rst.linker")
2579 (uri (pypi-uri "rst.linker" version))
2582 "0bh4lnj2p1nh0wf5pgxgfbrp27xhb1rinahkb5j7s3qprq6qn0sr"))))
2583 (build-system python-build-system)
2585 `(("python-dateutil" ,python-dateutil)
2586 ("python-six" ,python-six)))
2588 `(("python-setuptools-scm" ,python-setuptools-scm)))
2589 ;; Test would require path.py, which would introduce a cyclic dependence.
2590 (arguments `(#:tests? #f))
2591 ;; Note: As of version 1.7 the documentation is not worth building.
2592 (home-page "https://github.com/jaraco/rst.linker")
2593 (synopsis "Sphinx plugin to add links and timestamps")
2594 (description "rst.linker allows to automatically replace text by a
2595 reStructuredText external reference or timestamps. It's primary purpose is to
2596 augment the changelog, but it can be used for other documents, too.")
2597 (license license:expat)))
2599 (define-public python2-rst.linker
2600 (package-with-python2 python-rst.linker))
2602 (define-public python-feedgenerator
2604 (name "python-feedgenerator")
2609 (uri (pypi-uri "feedgenerator" version))
2612 "01mirwkm7xfx539hmvj7g9da1j51gw5lsx74dr0glizskjm5vq2s"))
2613 (modules '((guix build utils)))
2616 ;; Remove pre-compiled .pyc files from source.
2617 (for-each delete-file-recursively
2618 (find-files "." "__pycache__" #:directories? #t))
2619 (for-each delete-file (find-files "." "\\.pyc$"))
2621 (build-system python-build-system)
2623 `(("python-pytz" ,python-pytz)
2624 ("python-six" ,python-six)))
2625 (home-page "https://github.com/getpelican/feedgenerator")
2627 "Standalone version of Django's Atom/RSS feed generator")
2629 "Feedgenerator-py3k is a standalone version of Django's feedgenerator,
2630 which can produce feeds in RSS 2.0, RSS 0.91, and Atom formats.")
2631 (license license:bsd-3)))
2633 (define-public python2-feedgenerator
2634 (package-with-python2 python-feedgenerator))
2636 (define-public python-blinker
2638 (name "python-blinker")
2643 (uri (pypi-uri "blinker" version))
2646 "1dpq0vb01p36jjwbhhd08ylvrnyvcc82yxx3mwjx6awrycjyw6j7"))))
2647 (build-system python-build-system)
2648 (home-page "http://pythonhosted.org/blinker/")
2649 (synopsis "Fast, simple object-to-object and broadcast signaling")
2651 "Blinker provides a fast dispatching system that allows any number of
2652 interested parties to subscribe to events, or \"signals\".")
2653 (license license:expat)))
2655 (define-public python2-blinker
2656 (package-with-python2 python-blinker))
2658 (define-public pelican
2665 (uri (pypi-uri "pelican" version))
2668 "1hn94rb4q3zmcq16in055xikal4dba5hfx3zznq7warllcgc9f8k"))))
2669 (build-system python-build-system)
2671 `(("python-feedgenerator" ,python-feedgenerator)
2672 ("python-jinja2" ,python-jinja2)
2673 ("python-pygments" ,python-pygments)
2674 ("python-docutils" ,python-docutils)
2675 ("python-pytz" ,python-pytz)
2676 ("python-blinker" ,python-blinker)
2677 ("python-unidecode" ,python-unidecode)
2678 ("python-six" ,python-six)
2679 ("python-dateutil" ,python-dateutil)
2680 ("python-markdown" ,python-markdown)))
2681 (home-page "http://getpelican.com/")
2683 `(;; XXX Requires a lot more packages to do unit tests :P
2685 #:phases (modify-phases %standard-phases
2687 'install 'adjust-requires
2688 ;; Since feedgenerator is installed from git, it doesn't
2689 ;; conform to the version requirements.
2691 ;; We *do have* "feedgenerator >= 1.6", but strip off the
2692 ;; version requirement so setuptools doesn't get confused.
2694 (substitute* "setup.py"
2695 (("['\"]feedgenerator.*?['\"]")
2696 "'feedgenerator'")))))))
2697 (synopsis "Python-based static site publishing system")
2699 "Pelican is a tool to generate a static blog from reStructuredText,
2700 Markdown input files, and more. Pelican uses Jinja2 for templating
2701 and is very extensible.")
2702 (license license:agpl3+)))
2704 (define-public python-scikit-image
2706 (name "python-scikit-image")
2712 "https://pypi.python.org/packages/source/s/scikit-image/scikit-image-"
2715 (base32 "0jz416fqvpahqyffw8plmszzfj669w8wvf3y9clnr5lr6a7md3kn"))))
2716 (build-system python-build-system)
2718 ;; TODO: Some tests require running X11 server. Disable them?
2720 ;; See DEPENDS.txt for the list of build and run time requiremnts
2722 `(("python-matplotlib" ,python-matplotlib)
2723 ("python-networkx" ,python-networkx)
2724 ("python-scipy" ,python-scipy)
2725 ("python-pillow" ,python-pillow)))
2727 `(("python-numpy" ,python-numpy)
2728 ("python-cython" ,python-cython)
2729 ("python-six" ,python-six)))
2730 (home-page "http://scikit-image.org/")
2731 (synopsis "Image processing in Python")
2733 "Scikit-image is a collection of algorithms for image processing.")
2734 (license license:bsd-3)))
2736 (define-public python2-scikit-image
2737 (package-with-python2 python-scikit-image))
2739 (define-public python-cython
2741 (name "python-cython")
2746 (uri (pypi-uri "Cython" version))
2749 "02y0pp1nx77b8s1mpxc6da2dccl6wd31pp4ksi9via479qcvacmr"))))
2750 (build-system python-build-system)
2751 ;; we need the full python package and not just the python-wrapper
2752 ;; because we need libpython3.3m.so
2754 `(("python" ,python)))
2757 (modify-phases %standard-phases
2758 (add-before 'check 'set-HOME
2759 ;; some tests require access to "$HOME/.cython"
2760 (lambda _ (setenv "HOME" "/tmp") #t))
2762 (lambda _ (zero? (system* "python" "runtests.py" "-vv")))))))
2763 (home-page "http://cython.org/")
2764 (synopsis "C extensions for Python")
2765 (description "Cython is an optimising static compiler for both the Python
2766 programming language and the extended Cython programming language. It makes
2767 writing C extensions for Python as easy as Python itself.")
2768 (license license:asl2.0)
2769 (properties `((python2-variant . ,(delay python2-cython))))))
2771 (define-public python2-cython
2772 (package (inherit (package-with-python2
2773 (strip-python2-variant python-cython)))
2774 (name "python2-cython")
2776 `(("python-2" ,python-2))))) ; this is not automatically changed
2778 ;; The RPython toolchain currently does not support Python 3.
2779 (define-public python2-rpython
2781 (name "python2-rpython")
2786 (uri (pypi-uri "rpython" version))
2789 "02z9cvxf0y41dcvwnvf2zn0albhhw1drvjjbq27m6i1piw1k6fc0"))))
2790 (build-system python-build-system)
2791 (arguments `(#:python ,python-2))
2793 `(("python2-pytest" ,python2-pytest))) ; needed for running tests
2794 (home-page "https://rpython.readthedocs.org")
2795 (synopsis "Framework for implementing interpreters and virtual machines")
2796 (description "RPython is a translation and support framework for
2797 producing implementations of dynamic languages, emphasizing a clean separation
2798 between language specification and implementation aspects.")
2799 (license license:expat)))
2801 ;; NOTE: when upgrading numpy please make sure that python-pandas and
2802 ;; python-scipy still build, as these three packages are often used together.
2803 (define-public python-numpy
2805 (name "python-numpy")
2811 "https://github.com/numpy/numpy/releases/download/v"
2812 version "/numpy-" version ".tar.gz"))
2815 "1kh7y2ay21s9mcc11mq59g2f1yc75v152z2k2vlh0xmh9c9rjpf4"))))
2816 (build-system python-build-system)
2818 `(("openblas" ,openblas)
2819 ("lapack" ,lapack)))
2821 `(("python-cython" ,python-cython)
2822 ("python-nose" ,python-nose)
2823 ("gfortran" ,gfortran)))
2826 (modify-phases %standard-phases
2827 (add-before 'build 'configure-blas-lapack
2828 (lambda* (#:key inputs #:allow-other-keys)
2829 (call-with-output-file "site.cfg"
2833 libraries = openblas
2834 library_dirs = ~a/lib
2835 include_dirs = ~a/include
2837 # backslash-n to make emacs happy
2839 lapack_libs = lapack
2840 library_dirs = ~a/lib
2841 include_dirs = ~a/include
2843 (assoc-ref inputs "openblas")
2844 (assoc-ref inputs "openblas")
2845 (assoc-ref inputs "lapack")
2846 (assoc-ref inputs "lapack"))))
2848 (add-before 'build 'fix-executable-paths
2849 (lambda* (#:key inputs #:allow-other-keys)
2850 ;; Make /gnu/store/...-bash-.../bin/sh the default shell,
2851 ;; instead of /bin/sh.
2852 (substitute* "numpy/distutils/exec_command.py"
2853 (("(os.environ.get\\('SHELL', ')(/bin/sh'\\))" match match-start match-end)
2854 (string-append match-start (assoc-ref inputs "bash") match-end)))
2855 ;; Use "gcc" executable, not "cc".
2856 (substitute* "numpy/distutils/system_info.py"
2857 (("c = distutils\\.ccompiler\\.new_compiler\\(\\)")
2858 "c = distutils.ccompiler.new_compiler(); c.set_executables(compiler='gcc',compiler_so='gcc',linker_exe='gcc',linker_so='gcc -shared')"))
2860 ;; Tests can only be run after the library has been installed and not
2861 ;; within the source directory.
2863 (add-after 'install 'check
2864 (lambda* (#:key outputs inputs #:allow-other-keys)
2865 ;; Make installed package available for running the tests
2866 (add-installed-pythonpath inputs outputs)
2867 (with-directory-excursion "/tmp"
2868 (zero? (system* "python" "-c"
2869 "import numpy; numpy.test(verbose=2)"))))))))
2870 (home-page "http://www.numpy.org/")
2871 (synopsis "Fundamental package for scientific computing with Python")
2872 (description "NumPy is the fundamental package for scientific computing
2873 with Python. It contains among other things: a powerful N-dimensional array
2874 object, sophisticated (broadcasting) functions, tools for integrating C/C++
2875 and Fortran code, useful linear algebra, Fourier transform, and random number
2877 (license license:bsd-3)))
2879 (define-public python2-numpy
2880 (package-with-python2 python-numpy))
2882 ;; NOTE: NumPy 1.8 is packaged only for Python 2 because it is of
2883 ;; interest only for legacy code going back to NumPy's predecessor
2885 (define-public python2-numpy-1.8
2886 (package (inherit python2-numpy)
2892 "https://github.com/numpy/numpy/archive/v" version ".tar.gz"))
2893 (file-name (string-append "python2-numpy-" version ".tar.gz"))
2896 "0sc20gz1b17xnyrkp5frca3ql5qfalpv916hfg2kqxpwr6jg0f1g"))))
2898 (substitute-keyword-arguments (package-arguments python2-numpy)
2900 `(modify-phases ,phases
2901 (replace 'configure-blas-lapack
2902 (lambda* (#:key inputs #:allow-other-keys)
2903 (call-with-output-file "site.cfg"
2907 libraries = openblas,lapack
2908 library_dirs = ~a/lib:~a/lib
2909 include_dirs = ~a/include:~a/include
2911 (assoc-ref inputs "openblas")
2912 (assoc-ref inputs "lapack")
2913 (assoc-ref inputs "openblas")
2914 (assoc-ref inputs "lapack"))))
2916 (description "NumPy is the fundamental package for scientific computing
2917 with Python. It contains among other things: a powerful N-dimensional array
2918 object, sophisticated (broadcasting) functions, tools for integrating C/C++
2919 and Fortran code, useful linear algebra, Fourier transform, and random number
2920 capabilities. Version 1.8 is the last one to contain the numpy.oldnumeric API
2921 that includes the compatibility layer numpy.oldnumeric with NumPy's predecessor
2923 (license license:bsd-3)))
2925 (define-public python-munch
2927 (name "python-munch")
2932 (uri (pypi-uri "munch" version))
2935 "1cmqg91xnqx8gvnh4pmp0bfl1dfcm65d5p9mg73zz8pkjhx6h80l"))))
2936 (build-system python-build-system)
2937 (home-page "https://github.com/Infinidat/munch")
2938 (synopsis "Dot-accessible dictionary")
2939 (description "Munch is a dot-accessible dictionary similar to JavaScript
2941 (license license:expat)))
2943 (define-public python2-munch
2944 (package-with-python2 python-munch))
2946 (define-public python-colormath
2948 (name "python-colormath")
2953 (uri (pypi-uri "colormath" version))
2956 "05qjycgxp3p2f9n6lmic68sxmsyvgnnlyl4z9w7dl9s56jphaiix"))))
2957 (build-system python-build-system)
2959 `(("python-networkx" ,python-networkx)
2960 ("python-numpy" ,python-numpy)))
2961 (home-page "https://github.com/gtaylor/python-colormath")
2962 (synopsis "Color math and conversion library")
2964 "This is a Python library for color math and conversions.")
2965 (license license:bsd-3)))
2967 (define-public python2-colormath
2968 (package-with-python2 python-colormath))
2970 (define-public python-spectra
2972 (name "python-spectra")
2977 (uri (pypi-uri "spectra" version))
2980 "1f322x914bhkg6r5gv1vmnir3iy0k5kih0fd2gp3rdkw32jn5cwf"))))
2981 (build-system python-build-system)
2984 (modify-phases %standard-phases
2987 (zero? (system* "nosetests" "-v")))))))
2989 `(("python-colormath" ,python-colormath)))
2991 `(("python-nose" ,python-nose)))
2992 (home-page "https://github.com/jsvine/spectra")
2993 (synopsis "Color scales and color conversion")
2995 "This package provides a Python library intended to make color math,
2996 color scales, and color space conversion easy. It has support for:
3001 @item Color blending
3002 @item Brightening/darkening colors
3003 @item Saturating/desaturating colors
3004 @item Conversion to/from multiple color spaces.
3006 (license license:expat)))
3008 (define-public python2-spectra
3009 (package-with-python2 python-spectra))
3011 (define-public python2-fastlmm
3013 (name "python2-fastlmm")
3018 (uri (pypi-uri "fastlmm" version ".zip"))
3021 "1q8c34rpmwkfy3r4d5172pzdkpfryj561897z9r3x22gq7813x1m"))))
3022 (build-system python-build-system)
3024 `(#:python ,python-2)) ; only Python 2.7 is supported
3026 `(("python2-numpy" ,python2-numpy)
3027 ("python2-scipy" ,python2-scipy)
3028 ("python2-matplotlib" ,python2-matplotlib)
3029 ("python2-pandas" ,python2-pandas)
3030 ("python2-scikit-learn" ,python2-scikit-learn)
3031 ("python2-pysnptools" ,python2-pysnptools)))
3034 ("python2-cython" ,python2-cython)
3035 ("python2-mock" ,python2-mock)
3036 ("python2-nose" ,python2-nose)))
3037 (home-page "http://research.microsoft.com/en-us/um/redmond/projects/mscompbio/fastlmm/")
3038 (synopsis "Perform genome-wide association studies on large data sets")
3040 "FaST-LMM, which stands for Factored Spectrally Transformed Linear Mixed
3041 Models, is a program for performing both single-SNP and SNP-set genome-wide
3042 association studies (GWAS) on extremely large data sets.")
3043 (license license:asl2.0)))
3045 (define-public python-numpy-documentation
3047 (name "python-numpy-documentation")
3048 (version (package-version python-numpy))
3049 (source (package-source python-numpy))
3050 (build-system python-build-system)
3052 `(("python-matplotlib" ,python-matplotlib)
3053 ("python-numpy" ,python-numpy)
3054 ("pkg-config" ,pkg-config)
3055 ("python-sphinx" ,python-sphinx)
3056 ("python-numpydoc" ,python-numpydoc)
3057 ("texlive" ,(texlive-union (list texlive-fonts-amsfonts
3059 texlive-generic-ifxetex
3060 texlive-generic-pdftex
3061 texlive-latex-amsfonts
3062 texlive-latex-capt-of
3064 texlive-latex-environ
3065 texlive-latex-eqparbox
3066 texlive-latex-etoolbox
3067 texlive-latex-expdlist
3068 texlive-latex-fancyhdr
3069 texlive-latex-fancyvrb
3070 texlive-latex-fncychap
3072 texlive-latex-framed
3073 texlive-latex-geometry
3074 texlive-latex-graphics
3075 texlive-latex-hyperref
3076 texlive-latex-mdwtools
3077 texlive-latex-multirow
3078 texlive-latex-oberdiek
3079 texlive-latex-parskip
3080 texlive-latex-preview
3081 texlive-latex-tabulary
3082 texlive-latex-threeparttable
3083 texlive-latex-titlesec
3084 texlive-latex-trimspaces
3086 texlive-latex-upquote
3088 texlive-latex-varwidth
3089 texlive-latex-wrapfig)))
3090 ("texinfo" ,texinfo)
3092 ("scipy-sphinx-theme"
3093 ,(origin ; The build script expects scipy-sphinx-theme as a git submodule
3096 (url "https://github.com/scipy/scipy-sphinx-theme.git")
3097 (commit "c466764e2231ba132c09826b5b138fffa1cfcec3")))
3100 "0q2y87clwlsgc7wvlsn9pzyssybcq10plwhq2w1ydykfsyyqbmkl"))))
3101 ,@(package-native-inputs python-numpy)))
3103 `(#:tests? #f ; we're only generating the documentation
3105 (modify-phases %standard-phases
3108 (lambda* (#:key inputs outputs #:allow-other-keys)
3109 (let* ((data (string-append (assoc-ref outputs "out") "/share"))
3111 data "/doc/" ,name "-"
3112 ,(package-version python-numpy)))
3113 (info-reader (string-append data "/info"))
3114 (html (string-append doc "/html"))
3115 (scipy-sphinx-theme "scipy-sphinx-theme")
3116 (sphinx-theme-checkout (assoc-ref inputs scipy-sphinx-theme))
3117 (pyver ,(string-append "PYVER=")))
3119 ;; FIXME: this is needed to for texlive-union to generate
3120 ;; fonts, which are not found.
3121 (setenv "HOME" "/tmp")
3123 (with-directory-excursion "doc"
3124 (copy-recursively sphinx-theme-checkout scipy-sphinx-theme)
3126 (system* "make" "html" pyver)
3127 (system* "make" "latex" "PAPER=a4" pyver)
3128 (system* "make" "-C" "build/latex"
3129 "all-pdf" "PAPER=a4" pyver)
3130 ;; FIXME: Generation of the info file fails.
3131 ;; (system* "make" "info" pyver)
3133 ;; (copy-file "build/texinfo/numpy.info"
3134 ;; (string-append info "/numpy.info"))
3135 (for-each (lambda (file)
3136 (copy-file (string-append "build/latex" file)
3137 (string-append doc file)))
3138 '("/numpy-ref.pdf" "/numpy-user.pdf"))
3139 (with-directory-excursion "build/html"
3140 (for-each (lambda (file)
3141 (let* ((dir (dirname file))
3142 (tgt-dir (string-append html "/" dir)))
3143 (unless (equal? "." dir)
3145 (install-file file html)))
3146 (find-files "." ".*")))))
3148 (home-page (package-home-page python-numpy))
3149 (synopsis "Documentation for the python-numpy package")
3150 (description (package-description python-numpy))
3151 (license (package-license python-numpy))))
3153 (define-public python2-numpy-documentation
3154 (let ((numpy-documentation (package-with-python2 python-numpy-documentation)))
3156 (inherit numpy-documentation)
3157 (native-inputs `(("python2-functools32" ,python2-functools32)
3158 ,@(package-native-inputs numpy-documentation))))))
3160 (define-public python-pygit2
3162 (name "python-pygit2")
3167 (uri (pypi-uri "pygit2" version))
3170 "1cbc488ra3kg7r3qky17ms0szi3cda2d96qfkv1l9djsy9hnvw57"))
3172 (search-patches "python-pygit2-disable-network-tests.patch"))))
3173 (build-system python-build-system)
3175 `(("python-six" ,python-six)
3176 ("python-cffi" ,python-cffi)
3177 ("libgit2" ,libgit2)
3178 ("python-tox" ,python-tox)))
3179 (home-page "https://github.com/libgit2/pygit2")
3180 (synopsis "Python bindings for libgit2")
3181 (description "Pygit2 is a set of Python bindings to the libgit2 shared
3182 library, libgit2 implements Git plumbing.")
3183 ;; GPL2.0 only, with linking exception.
3184 (license license:gpl2)))
3186 (define-public python2-pygit2
3187 (package-with-python2 python-pygit2))
3189 (define-public python-pyparsing
3191 (name "python-pyparsing")
3196 (uri (string-append "mirror://sourceforge/pyparsing/pyparsing"
3197 "/pyparsing-" version
3198 "/pyparsing-" version ".tar.gz"))
3201 "016b9gh606aa44sq92jslm89bg874ia0yyiyb643fa6dgbsbqch8"))))
3202 (build-system python-build-system)
3203 (outputs '("out" "doc"))
3205 `(#:tests? #f ; no test target
3207 (modify-phases %standard-phases
3208 (add-after 'install 'install-doc
3209 (lambda* (#:key outputs #:allow-other-keys)
3210 (let* ((doc (string-append (assoc-ref outputs "doc")
3211 "/share/doc/" ,name "-" ,version))
3212 (html-doc (string-append doc "/html"))
3213 (examples (string-append doc "/examples")))
3219 (install-file file tgt))
3220 (find-files dir ".*")))
3221 (list "docs" "htmldoc" "examples")
3222 (list doc html-doc examples))
3224 (home-page "http://pyparsing.wikispaces.com")
3225 (synopsis "Python parsing class library")
3227 "The pyparsing module is an alternative approach to creating and
3228 executing simple grammars, vs. the traditional lex/yacc approach, or the use
3229 of regular expressions. The pyparsing module provides a library of classes
3230 that client code uses to construct the grammar directly in Python code.")
3231 (license license:expat)))
3233 (define-public python2-pyparsing
3234 (package-with-python2 python-pyparsing))
3236 (define-public python-numpydoc
3238 (name "python-numpydoc")
3244 "https://pypi.python.org/packages/source/n/numpydoc/numpydoc-"
3248 "0d4dnifaxkll50jx6czj05y8cb4ny60njd2wz299sj2jxfy51w4k"))
3249 (modules '((guix build utils)))
3252 ;; Drop a test requiring matplotlib, which we cannot add as an
3253 ;; input since it would create a circular dependency: Extend the
3254 ;; test for Python 3, where it is already dropped, to Python 2.
3255 (substitute* "numpydoc/tests/test_plot_directive.py"
3258 (build-system python-build-system)
3260 `(("python-sphinx" ,python-sphinx)))
3262 `(("python-nose" ,python-nose)))
3263 (home-page "https://pypi.python.org/pypi/numpydoc")
3265 "Numpy's Sphinx extensions")
3267 "Sphinx extension to support docstrings in Numpy format.")
3268 (license license:bsd-2)))
3270 (define-public python2-numpydoc
3271 (package-with-python2 python-numpydoc))
3273 (define-public python-numexpr
3275 (name "python-numexpr")
3280 (uri (pypi-uri "numexpr" version))
3283 "1kpnbb5d5n927113zccfibn16z7gidjipyac6kbbhzs0lnizkgph"))))
3284 (build-system python-build-system)
3285 (arguments `(#:tests? #f)) ; no tests included
3287 `(("python-numpy" ,python-numpy)))
3288 (home-page "https://github.com/pydata/numexpr")
3289 (synopsis "Fast numerical expression evaluator for NumPy")
3291 "Numexpr is a fast numerical expression evaluator for NumPy. With it,
3292 expressions that operate on arrays are accelerated and use less memory than
3293 doing the same calculation in Python. In addition, its multi-threaded
3294 capabilities can make use of all your cores, which may accelerate
3295 computations, most specially if they are not memory-bounded (e.g. those using
3296 transcendental functions).")
3297 (license license:expat)))
3299 (define-public python2-numexpr
3300 (package-with-python2 python-numexpr))
3302 (define-public python-cycler
3304 (name "python-cycler")
3308 (uri (pypi-uri "cycler" version))
3311 "1n69n23fak1gjxlrbhqisi2b9pv3ckrfj98llx3p53953082syyd"))))
3312 (build-system python-build-system)
3314 ;; XXX: The current version requires 'coveralls' which we don't have.
3315 ;; Enable this for the next release which uses 'python-pytest'.
3318 `(("python-six" ,python-six)))
3319 (home-page "http://matplotlib.org/cycler/")
3320 (synopsis "Composable keyword argument iterator")
3322 "When using @code{matplotlib} and plotting more than one line, it is
3323 common to want to be able to want to be able to cycle over one or more artist
3324 styles; but the plotting logic can quickly become involved.
3325 To address this and enable easy cycling over arbitrary @code{kwargs}, the
3326 @code{Cycler} class was developed.")
3327 (license license:bsd-3)))
3329 (define-public python2-cycler
3330 (package-with-python2 python-cycler))
3332 (define-public python-colorspacious
3334 (name "python-colorspacious")
3339 (uri (string-append "https://github.com/njsmith/colorspacious/archive/v"
3341 (file-name (string-append name "-" version))
3343 (base32 "1vflh5jm32qb0skza2i8pjacv09w6gq84fqpp2nj77s0rbmzgr4k"))))
3344 (build-system python-build-system)
3346 `(("python-numpy" ,python-numpy)))
3348 `(("python-nose" ,python-nose)))
3351 (modify-phases %standard-phases
3354 (zero? (system* "nosetests" "--all-modules" "-v" "colorspacious")))))))
3355 (home-page "https://github.com/njsmith/colorspacious")
3356 (synopsis "Python library for colorspace conversions")
3357 (description "@code{colorspacious} is a Python library that lets you
3358 convert between colorspaces like sRGB, XYZ, CIEL*a*b*, CIECAM02, CAM02-UCS, etc.")
3359 (license license:expat)))
3361 (define-public python2-colorspacious
3362 (package-with-python2 python-colorspacious))
3364 (define-public python-matplotlib
3366 (name "python-matplotlib")
3371 (uri (pypi-uri "matplotlib" version))
3374 "1w8z2a1l7s72p1byfz7g03wqhygqxi8w82619dqb3a1lm97w9yqg"))))
3375 (build-system python-build-system)
3376 (propagated-inputs ; the following packages are all needed at run time
3377 `(("python-cycler" ,python-cycler)
3378 ("python-pyparsing" ,python-pyparsing)
3379 ("python-pygobject" ,python-pygobject)
3380 ("gobject-introspection" ,gobject-introspection)
3381 ("python-tkinter" ,python "tk")
3382 ("python-dateutil" ,python-dateutil)
3383 ("python-numpy" ,python-numpy)
3384 ("python-pillow" ,python-pillow)
3385 ("python-pytz" ,python-pytz)
3386 ("python-six" ,python-six)
3387 ;; The 'gtk+' package (and 'gdk-pixbuf', 'atk' and 'pango' propagated
3388 ;; from 'gtk+') provides the required 'typelib' files used by
3389 ;; 'gobject-introspection'. The location of these files is set with the
3390 ;; help of the environment variable GI_TYPELIB_PATH. At build time this
3391 ;; is done automatically by a 'native-search-path' procedure. However,
3392 ;; at run-time the user must set this variable as follows:
3394 ;; export GI_TYPELIB_PATH=~/.guix-profile/lib/girepository-1.0
3396 ;; From version 1.4.0 'matplotlib' makes use of 'cairocffi' instead of
3397 ;; 'pycairo'. However, 'pygobject' makes use of a 'pycairo' 'context'
3398 ;; object. For this reason we need to import both libraries.
3399 ;; https://pythonhosted.org/cairocffi/cffi_api.html#converting-pycairo
3400 ("python-pycairo" ,python-pycairo)
3401 ("python-pyqt" ,python-pyqt)
3402 ("python-cairocffi" ,python-cairocffi)))
3404 `(("libpng" ,libpng)
3405 ("imagemagick" ,imagemagick)
3406 ("freetype" ,freetype)
3409 ;; FIXME: Add backends when available.
3410 ;("python-wxpython" ,python-wxpython)
3414 `(("pkg-config" ,pkg-config)
3415 ("python-nose" ,python-nose)
3416 ("python-mock" ,python-mock)))
3419 (modify-phases %standard-phases
3420 (add-before 'build 'configure-environment
3421 (lambda* (#:key outputs inputs #:allow-other-keys)
3422 (let ((cairo (assoc-ref inputs "cairo"))
3423 (gtk+ (assoc-ref inputs "gtk+")))
3424 ;; Setting these directories in the 'basedirlist' of 'setup.cfg'
3426 (setenv "LD_LIBRARY_PATH"
3427 (string-append cairo "/lib:" gtk+ "/lib"))
3428 (setenv "HOME" (getcwd))
3429 (call-with-output-file "setup.cfg"
3431 (format port "[directories]~%
3432 basedirlist = ~a,~a~%
3435 (assoc-ref inputs "tcl")
3436 (assoc-ref inputs "tk")))))
3438 (home-page "http://matplotlib.org")
3439 (synopsis "2D plotting library for Python")
3441 "Matplotlib is a Python 2D plotting library which produces publication
3442 quality figures in a variety of hardcopy formats and interactive environments
3443 across platforms. Matplotlib can be used in Python scripts, the python and
3444 ipython shell, web application servers, and six graphical user interface
3446 (license license:psfl)
3447 (properties `((python2-variant . ,(delay python2-matplotlib))))))
3449 (define-public python2-matplotlib
3450 (let ((matplotlib (package-with-python2
3451 (strip-python2-variant python-matplotlib))))
3452 (package (inherit matplotlib)
3453 ;; Make sure to use special packages for Python 2 instead
3454 ;; of those automatically rewritten by package-with-python2.
3456 `(("python2-pycairo" ,python2-pycairo)
3457 ("python2-functools32" ,python2-functools32)
3458 ("python2-pygobject-2" ,python2-pygobject-2)
3459 ("python2-subprocess32" ,python2-subprocess32)
3460 ("python2-tkinter" ,python-2 "tk")
3461 ,@(fold alist-delete (package-propagated-inputs matplotlib)
3462 '("python-pycairo" "python-pygobject" "python-tkinter")))))))
3464 (define-public python-matplotlib-documentation
3466 (name "python-matplotlib-documentation")
3467 (version (package-version python-matplotlib))
3468 (source (package-source python-matplotlib))
3469 (build-system python-build-system)
3471 `(("python-matplotlib" ,python-matplotlib)
3472 ("python-colorspacious" ,python-colorspacious)
3473 ("python-sphinx" ,python-sphinx)
3474 ("python-numpydoc" ,python-numpydoc)
3475 ("python-ipython" ,python-ipython)
3476 ("python-mock" ,python-mock)
3477 ("graphviz" ,graphviz)
3478 ("texlive" ,texlive)
3479 ("texinfo" ,texinfo)
3480 ,@(package-native-inputs python-matplotlib)))
3482 `(#:tests? #f ; we're only generating documentation
3484 (modify-phases %standard-phases
3488 ;; Produce pdf in 'A4' format.
3489 (substitute* "conf.py"
3490 (("latex_paper_size = 'letter'") "")
3491 ;; latex_paper_size is deprecated -> set paper size using
3493 (("latex_elements\\['pointsize'\\] = '11pt'" match)
3494 ;; insert at a point where latex_elements{} is defined:
3495 (string-append match "\nlatex_elements['papersize'] = 'a4paper'")))
3496 (zero? (system* "python" "make.py" "html" "latex" "texinfo"))))
3498 (lambda* (#:key inputs outputs #:allow-other-keys)
3499 (let* ((data (string-append (assoc-ref outputs "out") "/share"))
3500 (doc (string-append data "/doc/python-matplotlib-" ,version))
3501 (info (string-append data "/info"))
3502 (html (string-append doc "/html")))
3505 (copy-recursively "build/html" html)
3506 (symlink (string-append html "/_images")
3507 (string-append info "/matplotlib-figures"))
3508 (with-directory-excursion "build/texinfo"
3509 (substitute* "matplotlib.texi"
3510 (("@image\\{([^,]*)" all file)
3511 (string-append "@image{matplotlib-figures/" file)))
3512 (symlink (string-append html "/_images")
3513 "./matplotlib-figures")
3514 (system* "makeinfo" "--no-split"
3515 "-o" "matplotlib.info" "matplotlib.texi"))
3516 (copy-file "build/texinfo/matplotlib.info"
3517 (string-append info "/matplotlib.info"))
3518 (copy-file "build/latex/Matplotlib.pdf"
3519 (string-append doc "/Matplotlib.pdf")))
3521 (home-page (package-home-page python-matplotlib))
3522 (synopsis "Documentation for the python-matplotlib package")
3523 (description (package-description python-matplotlib))
3524 (license (package-license python-matplotlib))))
3526 (define-public python2-matplotlib-documentation
3527 (package-with-python2 python-matplotlib-documentation))
3529 (define-public python2-pysnptools
3531 (name "python2-pysnptools")
3536 (uri (pypi-uri "pysnptools" version ".zip"))
3539 "1wybggjzz8zw7aav4pjsg2h22xp17a1lghrprza1pxwlm7wf96y2"))))
3540 (build-system python-build-system)
3542 `(#:python ,python-2)) ; only Python 2.7 is supported
3544 `(("python2-numpy" ,python2-numpy)
3545 ("python2-scipy" ,python2-scipy)
3546 ("python2-pandas" ,python2-pandas)))
3548 `(("python2-cython" ,python2-cython)))
3550 `(("unzip" ,unzip)))
3551 (home-page "http://research.microsoft.com/en-us/um/redmond/projects/mscompbio/")
3552 (synopsis "Library for reading and manipulating genetic data")
3554 "PySnpTools is a library for reading and manipulating genetic data. It
3555 can, for example, efficiently read whole PLINK *.bed/bim/fam files or parts of
3556 those files. It can also efficiently manipulate ranges of integers using set
3557 operators such as union, intersection, and difference.")
3558 (license license:asl2.0)))
3560 (define-public python-rpy2
3562 (name "python-rpy2")
3567 (uri (pypi-uri "rpy2" version))
3570 "0bqihjrdqwj5r1h86shvfb1p5hfr4a6klv1v54bzfr9r144w3rni"))))
3571 (build-system python-build-system)
3573 '(#:modules ((ice-9 ftw)
3577 (guix build python-build-system))
3579 (modify-phases %standard-phases
3580 ;; Without this phase the test loader cannot find the directories, in
3581 ;; which it is supposed to look for test files.
3582 (add-after 'unpack 'fix-tests
3583 (lambda* (#:key outputs #:allow-other-keys)
3584 (substitute* "rpy/tests.py"
3585 (("loader.discover\\(")
3586 "loader.discover(rpy_root + '/' +"))
3589 (lambda* (#:key outputs inputs #:allow-other-keys)
3590 (let ((cwd (getcwd)))
3591 (setenv "PYTHONPATH"
3592 (string-append cwd "/build/"
3593 (find (cut string-prefix? "lib" <>)
3594 (scandir (string-append cwd "/build")))
3596 (getenv "PYTHONPATH"))))
3597 ;; FIXME: Even when all tests pass, the check phase will fail.
3598 (system* "python" "-m" "rpy2.tests" "-v"))))))
3600 `(("python-six" ,python-six)
3601 ("python-jinja2" ,python-jinja2)
3602 ("python-pytz" ,python-pytz)))
3604 `(("readline" ,readline)
3607 ("r-minimal" ,r-minimal)
3608 ("r-survival" ,r-survival)
3609 ("r-ggplot2" ,r-ggplot2)
3610 ("r-rsqlite" ,r-rsqlite)
3611 ("r-dplyr" ,r-dplyr)
3612 ("r-dbplyr" ,r-dbplyr)
3613 ("python-numpy" ,python-numpy)))
3616 (home-page "http://rpy.sourceforge.net/")
3617 (synopsis "Python interface to the R language")
3618 (description "rpy2 is a redesign and rewrite of rpy. It is providing a
3619 low-level interface to R from Python, a proposed high-level interface,
3620 including wrappers to graphical libraries, as well as R-like structures and
3622 ;; Any of these licenses can be picked for the R interface. The whole
3623 ;; project is released under GPLv2+ according to the license declaration
3625 (license (list license:mpl2.0 license:gpl2+ license:lgpl2.1+))))
3627 (define-public python-scipy
3629 (name "python-scipy")
3634 (uri (pypi-uri "scipy" version))
3637 "043djb3vyk6qripmyw30jhl0g8qza0fmar6wck10iv79l08izsl7"))))
3638 (build-system python-build-system)
3640 `(("python-numpy" ,python-numpy)
3641 ("python-matplotlib" ,python-matplotlib)
3642 ("python-pyparsing" ,python-pyparsing)))
3644 `(("lapack" ,lapack)
3645 ("openblas" ,openblas)))
3647 `(("python-cython" ,python-cython)
3648 ("python-pytest" ,python-pytest)
3649 ("python-sphinx" ,python-sphinx)
3650 ("python-numpydoc" ,python-numpydoc)
3651 ("gfortran" ,gfortran)
3654 (outputs '("out" "doc"))
3657 (modify-phases %standard-phases
3658 (add-before 'build 'configure-openblas
3659 (lambda* (#:key inputs #:allow-other-keys)
3660 (call-with-output-file "site.cfg"
3664 libraries = openblas
3665 library_dirs = ~a/lib
3666 include_dirs = ~a/include
3668 # backslash-n to make emacs happy
3670 library_dirs = ~a/lib
3671 atlas_libs = openblas
3673 (assoc-ref inputs "openblas")
3674 (assoc-ref inputs "openblas")
3675 (assoc-ref inputs "openblas"))))
3677 (add-after 'install 'install-doc
3678 (lambda* (#:key inputs outputs #:allow-other-keys)
3679 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
3680 (doc (string-append data "/doc/" ,name "-" ,version))
3681 (html (string-append doc "/html"))
3682 (pyver ,(string-append "PYVER=" (version-major+minor
3683 (package-version python))))
3684 ;; By default it tries to run sphinx-build through the Python
3685 ;; interpreter which won't work with our shell wrapper.
3686 (sphinxbuild "SPHINXBUILD=LANG=C sphinx-build"))
3687 ;; Make installed package available for building the
3689 (add-installed-pythonpath inputs outputs)
3690 (with-directory-excursion "doc"
3691 ;; Fix generation of images for mathematical expressions.
3692 (substitute* (find-files "source" "conf\\.py")
3693 (("pngmath_use_preview = True")
3694 "pngmath_use_preview = False"))
3696 (invoke "make" "html" pyver sphinxbuild)
3697 (with-directory-excursion "build/html"
3698 (for-each (lambda (file)
3699 (let* ((dir (dirname file))
3700 (tgt-dir (string-append html "/" dir)))
3701 (install-file file html)))
3702 (find-files "." ".*")))))
3704 ;; Tests can only be run after the library has been installed and not
3705 ;; within the source directory.
3707 (add-after 'install 'check
3708 (lambda* (#:key inputs outputs #:allow-other-keys)
3709 (add-installed-pythonpath inputs outputs)
3710 (with-directory-excursion "/tmp"
3711 (invoke "python" "-c"
3712 "import scipy; scipy.test('full', verbose=2)")))))))
3713 (home-page "https://www.scipy.org/")
3714 (synopsis "The Scipy library provides efficient numerical routines")
3715 (description "The SciPy library is one of the core packages that make up
3716 the SciPy stack. It provides many user-friendly and efficient numerical
3717 routines such as routines for numerical integration and optimization.")
3718 (properties `((python2-variant . ,(delay python2-scipy))))
3719 (license license:bsd-3)))
3721 (define-public python2-scipy
3722 (package-with-python2
3723 (strip-python2-variant python-scipy)))
3725 (define-public python-socksipy-branch
3727 (name "python-socksipy-branch")
3732 (uri (pypi-uri "SocksiPy-branch" version))
3735 "01l41v4g7fy9fzvinmjxy6zcbhgqaif8dhdqm4w90fwcw9h51a8p"))))
3736 (build-system python-build-system)
3738 `(#:tests? #f)) ; There are no tests
3739 (home-page "https://code.google.com/archive/p/socksipy-branch/")
3740 (synopsis "Python SOCKS module")
3742 "SocksiPy - A Python SOCKS client module. It provides a
3743 socket-like interface that supports connections to any TCP
3744 service through the use of a SOCKS4, SOCKS5 or HTTP proxy.
3745 The original version was developed by Dan Haim, this is a
3746 branch created by Mario Vilas to address some open issues,
3747 as the original project seems to have been abandoned circa 2007.")
3748 (license license:bsd-3)))
3750 (define-public python2-socksipy-branch
3751 (package-with-python2 python-socksipy-branch))
3753 (define-public python-pycodestyle
3755 (name "python-pycodestyle")
3760 (uri (pypi-uri "pycodestyle" version))
3763 "0rk78b66p57ala26mdldl9lafr48blv5s659sah9q50qnfjmc8k8"))))
3764 (build-system python-build-system)
3765 (home-page "https://pycodestyle.readthedocs.io/")
3766 (synopsis "Python style guide checker")
3767 (description "@code{pycodestyle} (formerly pep8) is a tool to check
3768 Python code against some of the style conventions in
3769 @url{http://www.python.org/dev/peps/pep-0008/,PEP 8}.")
3770 (license license:expat)))
3772 (define-public python2-pycodestyle
3773 (package-with-python2 python-pycodestyle))
3775 (define-public python-orderedmultidict
3777 (name "python-orderedmultidict")
3782 (uri (pypi-uri "orderedmultidict" version))
3785 "0dls862ibm7qbq4fnvwx0xn1v9hwyzywbff8xjjdr42dd75208yw"))))
3786 (build-system python-build-system)
3789 (modify-phases %standard-phases
3790 (add-after 'unpack 'fix-tests
3792 ;; The package uses nosetest for running the tests.
3793 ;; Adding this initfile allows to run the test suite
3794 ;; without requiring nosetest.
3795 (zero? (system* "touch" "tests/__init__.py")))))))
3797 `(("python-six" ,python-six)))
3799 `(("python-pycodestyle" ,python-pycodestyle)))
3800 (home-page "https://github.com/gruns/orderedmultidict")
3801 (synopsis "Python Ordered Multivalue Dictionary - omdict")
3802 (description "This package contains a library for ordered multivalue
3803 dictionaries. A multivalue dictionary is a dictionary that can store
3804 multiple values for the same key. An ordered multivalue dictionary is a
3805 multivalue dictionary that retains the order of insertions and deletions.")
3806 (license license:unlicense)))
3808 (define-public python2-orderedmultidict
3809 (package-with-python2 python-orderedmultidict))
3811 (define-public python-autopep8
3813 (name "python-autopep8")
3818 (uri (pypi-uri "autopep8" version))
3821 "1p9pa1ffg4iy96l918808jggg9a69iaka5awmj8xid36yc5mk0ky"))))
3822 (build-system python-build-system)
3824 `(("python-pycodestyle" ,python-pycodestyle)))
3825 (home-page "https://github.com/hhatto/autopep8")
3826 (synopsis "Format Python code according to the PEP 8 style guide")
3828 "@code{autopep8} automatically formats Python code to conform to
3829 the PEP 8 style guide. It uses the pycodestyle utility to determine
3830 what parts of the code needs to be formatted. @code{autopep8} is
3831 capable of fixing most of the formatting issues that can be reported
3833 (license (license:non-copyleft
3834 "https://github.com/hhatto/autopep8/blob/master/LICENSE"))))
3836 (define-public python2-autopep8
3837 (package-with-python2 python-autopep8))
3839 (define-public python-distutils-extra
3841 (name "python-distutils-extra")
3846 (uri (string-append "https://launchpad.net/python-distutils-extra/trunk/"
3847 version "/+download/python-distutils-extra-"
3851 "0lx15kcbby9zisx33p2h5hgakgwh2bvh0ibag8z0px4j6ifhs41x"))))
3852 (build-system python-build-system)
3853 (home-page "https://launchpad.net/python-distutils-extra/")
3854 (synopsis "Enhancements to Python's distutils")
3856 "The python-distutils-extra module enables you to easily integrate
3857 gettext support, themed icons, and scrollkeeper-based documentation into
3858 Python's distutils.")
3859 (license license:gpl2)))
3861 (define-public python2-distutils-extra
3862 (package-with-python2 python-distutils-extra))
3864 (define-public python2-elib.intl
3866 (name "python2-elib.intl")
3870 ;; This project doesn't tag releases or publish tarballs, so we take
3871 ;; source from a (semi-arbitrary, i.e. latest as of now) git commit.
3874 (url "https://github.com/dieterv/elib.intl.git")
3875 (commit "d09997cfef")))
3878 "0y7vzff9xgbnaay7m0va1arl6g68ncwrvbgwl7jqlclsahzzb09d"))))
3879 (build-system python-build-system)
3881 ;; incompatible with Python 3 (exception syntax)
3882 `(#:python ,python-2
3884 (home-page "https://github.com/dieterv/elib.intl")
3885 (synopsis "Enhanced internationalization for Python")
3887 "The elib.intl module provides enhanced internationalization (I18N)
3888 services for your Python modules and applications.")
3889 (license license:lgpl3+)))
3891 (define-public python-olefile
3893 (name "python-olefile")
3898 (uri (string-append "https://github.com/decalage2/olefile/archive/v"
3900 (file-name (string-append name "-" version ".tar.gz"))
3903 "1wmxbrhyqjry2000zx0zdhqdqxhgi06nz7sbzjlh222q2zjv1gpj"))))
3904 (build-system python-build-system)
3906 "https://www.decalage.info/python/olefileio")
3907 (synopsis "Read and write Microsoft OLE2 files.")
3909 "@code{olefile} can parse, read and write Microsoft OLE2 files (Structured
3910 Storage or Compound Document, Microsoft Office). It is an improved version of
3911 the OleFileIO module from PIL, the Python Image Library.")
3912 (license license:bsd-3)))
3914 (define-public python2-olefile
3915 (package-with-python2 python-olefile))
3917 (define-public python-pillow
3919 (name "python-pillow")
3924 (uri (pypi-uri "Pillow" version))
3927 "09xmn7rl6840sli2iz1k3fgxfgmri2nqz6vkinmb9mgg8ifp2z59"))
3928 (patch-flags '("-p1" "--binary"))
3929 (patches (search-patches "python-pillow-fix-failing-tests.patch"))))
3930 (build-system python-build-system)
3932 `(("python-nose" ,python-nose)))
3934 `(("freetype" ,freetype)
3937 ("libjpeg" ,libjpeg)
3938 ("openjpeg" ,openjpeg)
3939 ("libtiff" ,libtiff)
3940 ("libwebp" ,libwebp)))
3942 `(("python-olefile" ,python-olefile)))
3944 `(#:phases (modify-phases %standard-phases
3946 'install 'check-installed
3947 (lambda* (#:key outputs inputs #:allow-other-keys)
3949 (setenv "HOME" (getcwd))
3950 ;; Make installed package available for running the
3952 (add-installed-pythonpath inputs outputs)
3953 (and (zero? (system* "python" "selftest.py"
3955 (zero? (system* "python" "test-installed.py"))))))
3957 (home-page "https://pypi.python.org/pypi/Pillow")
3958 (synopsis "Fork of the Python Imaging Library")
3960 "The Python Imaging Library adds image processing capabilities to your
3961 Python interpreter. This library provides extensive file format support, an
3962 efficient internal representation, and fairly powerful image processing
3963 capabilities. The core image library is designed for fast access to data
3964 stored in a few basic pixel formats. It should provide a solid foundation for
3965 a general image processing tool.")
3966 (license (license:x11-style
3967 "http://www.pythonware.com/products/pil/license.htm"
3968 "The PIL Software License"))))
3970 (define-public python2-pillow
3971 (package-with-python2 python-pillow))
3973 (define-public python-pycparser
3975 (name "python-pycparser")
3980 (uri (pypi-uri "pycparser" version))
3983 "1dkkjri0miidqb1zcqhqljfa34fcy9k5akasgwsv6k622zlk3b0a"))))
3984 (outputs '("out" "doc"))
3985 (build-system python-build-system)
3987 `(("pkg-config" ,pkg-config)))
3990 (modify-phases %standard-phases
3993 (with-directory-excursion "tests"
3994 (zero? (system* "python" "all_tests.py")))))
3995 (add-after 'install 'install-doc
3996 (lambda* (#:key outputs #:allow-other-keys)
3997 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
3998 (doc (string-append data "/doc/" ,name "-" ,version))
3999 (examples (string-append doc "/examples")))
4001 (for-each (lambda (file)
4002 (copy-file (string-append "." file)
4003 (string-append doc file)))
4004 '("/README.rst" "/CHANGES" "/LICENSE"))
4005 (copy-recursively "examples" examples)))))))
4006 (home-page "https://github.com/eliben/pycparser")
4007 (synopsis "C parser in Python")
4009 "Pycparser is a complete parser of the C language, written in pure Python
4010 using the PLY parsing library. It parses C code into an AST and can serve as
4011 a front-end for C compilers or analysis tools.")
4012 (license license:bsd-3)))
4014 (define-public python2-pycparser
4015 (package-with-python2 python-pycparser))
4017 (define-public python-xcffib
4019 (name "python-xcffib")
4024 (uri (pypi-uri "xcffib" version))
4027 "09gbnmr5vn58mm8xi3fmd7fz6743cks6c46dphnxzwax6zsxmy60"))))
4028 (build-system python-build-system)
4030 `(("libxcb" ,libxcb)))
4032 `(("python-cffi" ,python-cffi) ; used at run time
4033 ("python-six" ,python-six)))
4035 `(;; FIXME: Tests need more work. See ".travis.yml" in the repository.
4038 (modify-phases %standard-phases
4039 (add-after 'unpack 'fix-libxcb-path
4040 (lambda* (#:key inputs #:allow-other-keys)
4041 (let ((libxcb (assoc-ref inputs "libxcb")))
4042 (substitute* '("xcffib/__init__.py")
4043 (("^soname = \"") (string-append "soname = \"" libxcb "/lib/")))
4045 (add-after 'install 'install-doc
4046 (lambda* (#:key outputs #:allow-other-keys)
4047 (let ((doc (string-append (assoc-ref outputs "out") "/share"
4048 "/doc/" ,name "-" ,version)))
4050 (copy-file "README.md"
4051 (string-append doc "/README.md"))
4053 (home-page "https://github.com/tych0/xcffib")
4054 (synopsis "XCB Python bindings")
4056 "Xcffib is a replacement for xpyb, an XCB Python bindings. It adds
4057 support for Python 3 and PyPy. It is based on cffi.")
4058 (license license:expat)))
4060 (define-public python2-xcffib
4061 (package-with-python2 python-xcffib))
4063 (define-public python-cairocffi
4065 (name "python-cairocffi")
4070 ;; The archive on pypi is missing the 'utils' directory!
4071 (uri (string-append "https://github.com/Kozea/cairocffi/archive/v"
4073 (file-name (string-append name "-" version ".tar.gz"))
4076 "1rk2dvy3fxrga6bvvxc2fi5lbaynm5h4a0w0aaxyn3bc77rszjg9"))))
4077 (build-system python-build-system)
4078 (outputs '("out" "doc"))
4080 `(("gdk-pixbuf" ,gdk-pixbuf)
4083 `(("pkg-config" ,pkg-config)
4084 ("python-sphinx" ,python-sphinx)
4085 ("python-docutils" ,python-docutils)))
4087 `(("python-xcffib" ,python-xcffib))) ; used at run time
4089 `(;; FIXME: Tests cannot find 'libcairo.so.2'.
4092 (modify-phases %standard-phases
4093 (add-after 'install 'install-doc
4094 (lambda* (#:key inputs outputs #:allow-other-keys)
4095 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4096 (doc (string-append data "/doc/" ,name "-" ,version))
4097 (html (string-append doc "/html")))
4098 (setenv "LD_LIBRARY_PATH"
4099 (string-append (assoc-ref inputs "cairo") "/lib" ":"
4100 (assoc-ref inputs "gdk-pixbuf") "/lib"))
4101 (setenv "LANG" "en_US.UTF-8")
4103 (for-each (lambda (file)
4104 (copy-file (string-append "." file)
4105 (string-append doc file)))
4106 '("/README.rst" "/CHANGES" "/LICENSE"))
4107 (system* "python" "setup.py" "build_sphinx")
4108 (copy-recursively "docs/_build/html" html)
4110 (home-page "https://github.com/Kozea/cairocffi")
4111 (synopsis "Python bindings and object-oriented API for Cairo")
4113 "Cairocffi is a CFFI-based drop-in replacement for Pycairo, a set of
4114 Python bindings and object-oriented API for cairo. Cairo is a 2D vector
4115 graphics library with support for multiple backends including image buffers,
4116 PNG, PostScript, PDF, and SVG file output.")
4117 (license license:bsd-3)))
4119 (define-public python2-cairocffi
4120 (package-with-python2 python-cairocffi))
4122 (define-public python-decorator
4124 (name "python-decorator")
4129 (uri (pypi-uri "decorator" version))
4131 (base32 "1d8npb11kxyi36mrvjdpcjij76l5zfyrz2f820brf0l0rcw4vdkw"))))
4132 (build-system python-build-system)
4133 (arguments '(#:tests? #f)) ; no test target
4134 (home-page "https://pypi.python.org/pypi/decorator/")
4135 (synopsis "Python module to simplify usage of decorators")
4137 "The aim of the decorator module is to simplify the usage of decorators
4138 for the average programmer, and to popularize decorators usage giving examples
4139 of useful decorators, such as memoize, tracing, redirecting_stdout, locked,
4140 etc. The core of this module is a decorator factory.")
4141 (license license:expat)))
4143 (define-public python2-decorator
4144 (package-with-python2 python-decorator))
4146 (define-public python-drmaa
4148 (name "python-drmaa")
4153 (uri (pypi-uri "drmaa" version))
4155 (base32 "0xzqriqyvk5b8hszbavsyxd29wm3sxirm8zvvdm73rs2iq7w4hkx"))))
4156 (build-system python-build-system)
4157 ;; The test suite requires libdrmaa which is provided by the cluster
4158 ;; environment. At runtime the environment variable DRMAA_LIBRARY_PATH
4159 ;; should be set to the path of the libdrmaa library.
4160 (arguments '(#:tests? #f))
4162 `(("python-nose" ,python-nose)))
4163 (home-page "https://pypi.python.org/pypi/drmaa")
4164 (synopsis "Python bindings for the DRMAA library")
4166 "A Python package for Distributed Resource Management (DRM) job
4167 submission and control. This package is an implementation of the DRMAA 1.0
4168 Python language binding specification.")
4169 (license license:bsd-3)))
4171 (define-public python2-drmaa
4172 (package-with-python2 python-drmaa))
4174 (define-public python-grako
4176 (name "python-grako")
4182 (pypi-uri "grako" version ".zip"))
4185 "0r63i68wcnv63rfjkasq1ah81frz61a6mzbcnaxhrkdpx84p7hzw"))))
4186 (build-system python-build-system)
4187 (arguments '(#:tests? #f)) ; Test file 'grako.ebnf' is missing from archive.
4190 ("python-pytest" ,python-pytest)
4191 ("python-pytest-runner" ,python-pytest-runner)))
4192 (home-page "https://bitbucket.org/neogeny/grako")
4193 (synopsis "EBNF parser generator")
4195 "Grako takes a grammar in a variation of EBNF as input, and outputs a
4196 memoizing PEG/Packrat parser in Python.")
4197 (license license:bsd-3)))
4199 (define-public python2-grako
4200 (package-with-python2 python-grako))
4202 (define-public python-gridmap
4204 (name "python-gridmap")
4210 "https://github.com/pygridtools/gridmap/archive/v"
4212 (file-name (string-append name "-" version ".tar.gz"))
4214 (base32 "1gzjg2k6f14i1msm2b0ax8d9ds1hvk6qd5nlaivg8m4cxqp4cp1x"))))
4215 (build-system python-build-system)
4217 '(#:tests? #f)) ; FIXME: Requires python-cherrypy.
4219 `(("python-psutil" ,python-psutil)
4220 ("python-drmaa" ,python-drmaa)
4221 ("python-pyzmq" ,python-pyzmq)))
4222 (home-page "https://github.com/pygridtools/gridmap")
4223 (synopsis "Create jobs on a cluster directly from Python")
4225 "Gridmap is a Python package to allow you to easily create jobs on the
4226 cluster directly from Python. You can directly map Python functions onto the
4227 cluster without needing to write any wrapper code yourself.")
4228 (license license:gpl3+)))
4230 (define-public python2-gridmap
4231 (package-with-python2 python-gridmap))
4233 (define-public python-honcho
4235 (name "python-honcho")
4241 "https://github.com/nickstenning/honcho/archive/v"
4243 (file-name (string-append name "-" version ".tar.gz"))
4245 (base32 "0zizn61n5z5hq421hkypk9pw8s6fpxw30f4hsg7k4ivwzy3gjw9j"))))
4246 (build-system python-build-system)
4248 `(("python-pytest" ,python-pytest)
4249 ("python-mock" ,python-mock)
4250 ("python-tox" ,python-tox)
4251 ("which" ,which))) ;for tests
4253 `(("python-jinja2" ,python-jinja2)))
4256 (modify-phases %standard-phases
4258 (add-after 'install 'check
4259 (lambda* (#:key outputs inputs #:allow-other-keys)
4260 ;; fix honcho path in testsuite
4261 (substitute* "tests/conftest.py"
4262 (("'honcho'") (string-append "'" (assoc-ref outputs "out")
4263 "/bin/honcho" "'")))
4264 ;; It's easier to run tests after install.
4265 ;; Make installed package available for running the tests
4266 (add-installed-pythonpath inputs outputs)
4267 (zero? (system* "py.test" "-v")))))))
4268 (home-page "https://github.com/nickstenning/honcho")
4269 (synopsis "Manage Procfile-based applications")
4271 "A Procfile is a file which describes how to run an application
4272 consisting of serveral processes. honcho starts all listed processes.
4273 The output of all running processes is collected by honcho and
4275 (license license:expat)))
4277 (define-public python2-honcho
4278 (package-with-python2 python-honcho))
4280 (define-public python-pexpect
4282 (name "python-pexpect")
4287 (uri (pypi-uri "pexpect" version))
4289 (base32 "14ls7k99pwvl21zqv65kzrhccv50j89m5ij1hf0slmsvlxjj84rx"))))
4290 (build-system python-build-system)
4293 (modify-phases %standard-phases
4294 (add-before 'check 'prepare-tests
4296 (substitute* (find-files "tests")
4297 (("/bin/ls") (which "ls"))
4298 (("/bin/echo") (which "echo"))
4299 (("/bin/which") (which "which"))
4300 ;; Many tests try to use the /bin directory which
4301 ;; is not present in the build environment.
4302 ;; Use one that's non-empty and unlikely to change.
4303 (("/bin'") "/dev'"))
4304 ;; XXX: Socket connection test gets "Connection reset by peer".
4305 ;; Why does it not work? Delete for now.
4306 (delete-file "tests/test_socket.py")
4308 (replace 'check (lambda _ (zero? (system* "nosetests" "-v")))))))
4310 `(("python-nose" ,python-nose)
4311 ("python-pytest" ,python-pytest)
4314 ("bash-full" ,bash))) ;full Bash for 'test_replwrap.py'
4316 `(("python-ptyprocess" ,python-ptyprocess)))
4317 (home-page "http://pexpect.readthedocs.org/")
4318 (synopsis "Controlling interactive console applications")
4320 "Pexpect is a pure Python module for spawning child applications;
4321 controlling them; and responding to expected patterns in their output.
4322 Pexpect works like Don Libes’ Expect. Pexpect allows your script to spawn a
4323 child application and control it as if a human were typing commands.")
4324 (license license:isc)))
4326 (define-public python2-pexpect
4327 (package-with-python2 python-pexpect))
4329 (define-public python-setuptools-scm
4331 (name "python-setuptools-scm")
4335 (uri (pypi-uri "setuptools_scm" version))
4338 "0pzvfmx8s20yrgkgwfbxaspz2x1g38qv61jpm0ns91lrb22ldas9"))))
4339 (build-system python-build-system)
4340 (home-page "https://github.com/pypa/setuptools_scm/")
4341 (synopsis "Manage Python package versions in SCM metadata")
4343 "Setuptools_scm handles managing your Python package versions in
4344 @dfn{software configuration management} (SCM) metadata instead of declaring
4345 them as the version argument or in a SCM managed file.")
4346 (license license:expat)))
4348 (define-public python2-setuptools-scm
4349 (package-with-python2 python-setuptools-scm))
4351 (define-public python-pathpy
4353 (name "python-pathpy")
4358 (uri (pypi-uri "path.py" version))
4360 (base32 "12s84maimiz61980q065rjgi8ang6xw2wwm64m0lmfks51dlw4qn"))))
4361 ;; (outputs '("out" "doc"))
4362 (build-system python-build-system)
4364 `(("python-appdirs" ,python-appdirs)))
4366 `(("python-setuptools-scm" ,python-setuptools-scm)
4367 ("python-sphinx" ,python-sphinx)
4368 ("python-rst.linker" ,python-rst.linker)
4369 ("python-pytest" ,python-pytest)
4370 ("python-pytest-runner" ,python-pytest-runner)))
4372 ;; FIXME: Documentation and tests require "jaraco.packaging".
4375 ;; (modify-phases %standard-phases
4376 ;; (add-after 'build 'build-doc
4378 ;; (setenv "LANG" "en_US.UTF-8")
4379 ;; (zero? (system* "python" "setup.py" "build_sphinx"))))
4380 ;; (add-after 'install 'install-doc
4381 ;; (lambda* (#:key outputs #:allow-other-keys)
4382 ;; (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4383 ;; (doc (string-append data "/doc/" ,name "-" ,version))
4384 ;; (html (string-append doc "/html")))
4386 ;; (for-each (lambda (file)
4387 ;; (copy-file file (string-append doc "/" file)))
4388 ;; '("README.rst" "CHANGES.rst"))
4389 ;; (copy-recursively "build/sphinx/html" html)))))))
4390 (home-page "https://github.com/jaraco/path.py")
4391 (synopsis "Python module wrapper for built-in os.path")
4393 "@code{path.py} implements path objects as first-class entities, allowing
4394 common operations on files to be invoked on those path objects directly.")
4395 (license license:expat)))
4397 (define-public python2-pathpy
4398 (package-with-python2 python-pathpy))
4400 (define-public python-simplegeneric
4402 (name "python-simplegeneric")
4407 (uri (string-append "https://pypi.python.org/packages/source/s/"
4408 "simplegeneric/simplegeneric-" version ".zip"))
4410 (base32 "0wwi1c6md4vkbcsfsf8dklf3vr4mcdj4mpxkanwgb6jb1432x5yw"))))
4411 (build-system python-build-system)
4413 `(("unzip" ,unzip)))
4414 (home-page "http://cheeseshop.python.org/pypi/simplegeneric")
4415 (synopsis "Python module for simple generic functions")
4417 "The simplegeneric module lets you define simple single-dispatch generic
4418 functions, akin to Python’s built-in generic functions like @code{len()},
4419 @code{iter()} and so on. However, instead of using specially-named methods,
4420 these generic functions use simple lookup tables, akin to those used by
4421 e.g. @code{pickle.dump()} and other generic functions found in the Python
4423 (license license:zpl2.1)))
4425 (define-public python2-simplegeneric
4426 (package-with-python2 python-simplegeneric))
4428 (define-public python-ipython-genutils
4429 ;; TODO: This package is retired, check if can be removed, see description.
4431 (name "python-ipython-genutils")
4436 (uri (string-append "https://pypi.python.org/packages/source/i/"
4437 "ipython_genutils/ipython_genutils-"
4440 (base32 "19l2pp1c64ansr89l3cqh19jdi2ixhssdzx0vz4n6r52a6i281is"))))
4441 (build-system python-build-system)
4442 (arguments `(#:tests? #f)) ; no tests
4443 (home-page "https://ipython.org")
4444 (synopsis "Vestigial utilities from IPython")
4446 "This package provides retired utilities from IPython. No packages
4447 outside IPython/Jupyter should depend on it.
4449 This package shouldn't exist. It contains some common utilities shared by
4450 Jupyter and IPython projects during The Big Split. As soon as possible, those
4451 packages will remove their dependency on this, and this package will go
4453 (license license:bsd-3)))
4455 (define-public python2-ipython-genutils
4456 (package-with-python2 python-ipython-genutils))
4458 (define-public python-traitlets
4460 (name "python-traitlets")
4465 (uri (pypi-uri "traitlets" version))
4468 "1afy08sa5n9gnkvh3da49c16zkyv598vchv0p1hp7zzjy8895hz4"))))
4469 (build-system python-build-system)
4472 (modify-phases %standard-phases
4473 (replace 'check (lambda _ (zero? (system* "nosetests")))))))
4475 `(("python-ipython-genutils" ,python-ipython-genutils)
4476 ("python-decorator" ,python-decorator)))
4478 `(("python-mock" ,python-mock)
4479 ("python-nose" ,python-nose)))
4480 (home-page "https://ipython.org")
4481 (synopsis "Configuration system for Python applications")
4483 "Traitlets is a framework that lets Python classes have attributes with
4484 type checking, dynamically calculated default values, and ‘on change’
4485 callbacks. The package also includes a mechanism to use traitlets for
4486 configuration, loading values from files or from command line arguments. This
4487 is a distinct layer on top of traitlets, so you can use traitlets in your code
4488 without using the configuration machinery.")
4489 (license license:bsd-3)))
4491 (define-public python2-traitlets
4492 (package-with-python2 python-traitlets))
4494 (define-public python-jupyter-core
4496 (name "python-jupyter-core")
4501 (uri (string-append (pypi-uri "jupyter_core" version)))
4504 "1cy7inv218dgh4m1fbzbsiqpz733ylgjrj62jxqpfzs3r2cm7ic9"))))
4505 (build-system python-build-system)
4506 ;; FIXME: not sure how to run the tests
4507 (arguments `(#:tests? #f))
4509 `(("python-traitlets" ,python-traitlets)))
4510 (home-page "http://jupyter.org/")
4511 (synopsis "Jupyter base package")
4513 "Jupyter core is the base package on which Jupyter projects rely.")
4514 (license license:bsd-3)))
4516 (define-public python2-jupyter-core
4517 (package-with-python2 python-jupyter-core))
4519 (define-public python-jupyter-client
4521 (name "python-jupyter-client")
4526 (uri (pypi-uri "jupyter_client" version))
4529 "1vjjrpjw7k5sh982pbjnslv7byfbfazjw9g92jvs7dz5qbx556n9"))))
4530 (build-system python-build-system)
4531 ;; Tests fail because of missing native python kernel which I assume is
4532 ;; provided by the ipython package, which we cannot use because it would
4533 ;; cause a dependency cycle.
4534 (arguments `(#:tests? #f))
4536 `(("python-pyzmq" ,python-pyzmq)
4537 ("python-traitlets" ,python-traitlets)
4538 ("python-jupyter-core" ,python-jupyter-core)))
4539 (home-page "http://jupyter.org/")
4540 (synopsis "Jupyter protocol implementation and client libraries")
4542 "The @code{jupyter_client} package contains the reference implementation
4543 of the Jupyter protocol. It also provides client and kernel management APIs
4544 for working with kernels, and the @code{jupyter kernelspec} entrypoint for
4545 installing @code{kernelspec}s for use with Jupyter frontends.")
4546 (license license:bsd-3)))
4548 (define-public python2-jupyter-client
4549 (package-with-python2 python-jupyter-client))
4551 (define-public python-ipykernel
4553 (name "python-ipykernel")
4558 (uri (pypi-uri "ipykernel" version))
4560 (base32 "0qllv0k6zzv1r1cj1x2ygxmlrrqhbslzj8rc6r6fg3kc1rgz4m2s"))))
4561 (build-system python-build-system)
4562 ;; The tests load a submodule of IPython. However, IPython itself depends
4564 (arguments `(#:tests? #f))
4566 ;; imported at runtime during connect
4567 `(("python-jupyter-client" ,python-jupyter-client)))
4568 (home-page "https://ipython.org")
4569 (synopsis "IPython Kernel for Jupyter")
4571 "This package provides the IPython kernel for Jupyter.")
4572 (license license:bsd-3)))
4574 (define-public python2-ipykernel
4575 (package-with-python2 python-ipykernel))
4577 (define-public python-ipython
4579 (name "python-ipython")
4584 (uri (pypi-uri "ipython" version ".tar.gz"))
4586 (base32 "03qmzpfy00if10i9k8fjkam1s4xg22j73f933x5d228z9n4rwik6"))))
4587 (build-system python-build-system)
4588 (outputs '("out" "doc"))
4590 `(("python-pyzmq" ,python-pyzmq)
4591 ("python-prompt-toolkit" ,python-prompt-toolkit)
4592 ("python-terminado" ,python-terminado)
4593 ("python-matplotlib" ,python-matplotlib)
4594 ("python-numpy" ,python-numpy)
4595 ("python-numpydoc" ,python-numpydoc)
4596 ("python-jinja2" ,python-jinja2)
4597 ("python-jupyter-console"
4598 ;; The python-ipython and python-jupyter-console require each
4599 ;; other. To get the functionality in both packages working, strip
4600 ;; down the python-jupyter-console package when using it as an input
4601 ;; to python-ipython.
4602 ,python-jupyter-console-minimal)
4603 ("python-mistune" ,python-mistune)
4604 ("python-pexpect" ,python-pexpect)
4605 ("python-pickleshare" ,python-pickleshare)
4606 ("python-simplegeneric" ,python-simplegeneric)
4607 ("python-jsonschema" ,python-jsonschema)
4608 ("python-traitlets" ,python-traitlets)
4609 ("python-ipykernel" ,python-ipykernel)
4610 ("python-nbformat" ,python-nbformat)
4611 ("python-pygments" ,python-pygments)))
4613 `(("readline" ,readline)
4616 `(("graphviz" ,graphviz)
4617 ("pkg-config" ,pkg-config)
4618 ("python-requests" ,python-requests) ;; for tests
4619 ("python-testpath" ,python-testpath)
4620 ("python-nose" ,python-nose)
4621 ("python-sphinx" ,python-sphinx)
4622 ("python-shpinx-rtd-theme" ,python-sphinx-rtd-theme)
4623 ;; FIXME: It's possible that a smaller union would work just as well.
4624 ("texlive" ,(texlive-union (list texlive-fonts-amsfonts
4626 texlive-generic-ifxetex
4627 texlive-generic-pdftex
4628 texlive-latex-amsfonts
4629 texlive-latex-capt-of
4631 texlive-latex-environ
4632 texlive-latex-eqparbox
4633 texlive-latex-etoolbox
4634 texlive-latex-expdlist
4635 texlive-latex-fancyhdr
4636 texlive-latex-fancyvrb
4637 texlive-latex-fncychap
4639 texlive-latex-framed
4640 texlive-latex-geometry
4641 texlive-latex-graphics
4642 texlive-latex-hyperref
4643 texlive-latex-mdwtools
4644 texlive-latex-multirow
4645 texlive-latex-oberdiek
4646 texlive-latex-parskip
4647 texlive-latex-preview
4648 texlive-latex-tabulary
4649 texlive-latex-threeparttable
4650 texlive-latex-titlesec
4651 texlive-latex-trimspaces
4653 texlive-latex-upquote
4655 texlive-latex-varwidth
4656 texlive-latex-wrapfig)))
4657 ("texinfo" ,texinfo)))
4660 (modify-phases %standard-phases
4662 'install 'install-doc
4663 (lambda* (#:key inputs outputs #:allow-other-keys)
4664 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4665 (doc (string-append data "/doc/" ,name "-" ,version))
4666 (html (string-append doc "/html"))
4667 (man1 (string-append data "/man/man1"))
4668 (info (string-append data "/info"))
4669 (examples (string-append doc "/examples"))
4670 (python-arg (string-append "PYTHON=" (which "python"))))
4671 (setenv "LANG" "en_US.utf8")
4672 ;; Make installed package available for running the tests
4673 (add-installed-pythonpath inputs outputs)
4674 (with-directory-excursion "docs"
4675 ;; FIXME: pdf fails to build
4676 ;;(system* "make" "pdf" "PAPER=a4")
4677 (system* "make" python-arg "html")
4678 (system* "make" python-arg "info"))
4679 (copy-recursively "docs/man" man1)
4680 (copy-recursively "examples" examples)
4681 (copy-recursively "docs/build/html" html)
4682 ;; (copy-file "docs/build/latex/ipython.pdf"
4683 ;; (string-append doc "/ipython.pdf"))
4685 (copy-file "docs/build/texinfo/ipython.info"
4686 (string-append info "/ipython.info"))
4687 (copy-file "COPYING.rst" (string-append doc "/COPYING.rst")))))
4688 ;; Tests can only be run after the library has been installed and not
4689 ;; within the source directory.
4693 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
4695 (with-directory-excursion "/tmp"
4696 ;; Make installed package available for running the tests
4697 (add-installed-pythonpath inputs outputs)
4698 (setenv "HOME" "/tmp/") ;; required by a test
4699 (zero? (system* (string-append (assoc-ref outputs "out")
4704 (lambda* (#:key inputs #:allow-other-keys)
4705 (substitute* "./IPython/utils/_process_posix.py"
4706 (("/usr/bin/env', 'which") (which "which")))
4707 (substitute* "./IPython/core/tests/test_inputtransformer.py"
4708 (("#!/usr/bin/env python")
4709 (string-append "#!" (which "python"))))
4710 ;; Disable 1 failing test
4711 (substitute* "./IPython/core/tests/test_magic.py"
4712 (("def test_dirops\\(\\):" all)
4713 (string-append "@dec.skipif(True)\n" all))))))))
4714 (home-page "https://ipython.org")
4715 (synopsis "IPython is a tool for interactive computing in Python")
4717 "IPython provides a rich architecture for interactive computing with:
4718 Powerful interactive shells, a browser-based notebook, support for interactive
4719 data visualization, embeddable interpreters and tools for parallel
4721 (license license:bsd-3)
4722 (properties `((python2-variant . ,(delay python2-ipython))))))
4724 (define-public python2-ipython
4725 (let ((ipython (package-with-python2 (strip-python2-variant python-ipython))))
4728 ;; FIXME: add pyreadline once available.
4730 `(("python2-backports-shutil-get-terminal-size"
4731 ,python2-backports-shutil-get-terminal-size)
4732 ("python2-pathlib2" ,python2-pathlib2)
4733 ,@(package-propagated-inputs ipython)))
4735 `(("python2-mock" ,python2-mock)
4736 ,@(package-native-inputs ipython))))))
4738 (define-public python-urwid
4740 (name "python-urwid")
4745 (uri (pypi-uri "urwid" version))
4748 "18cnd1wdjcas08x5qwa5ayw6jsfcn33w4d9f7q3s29fy6qzc1kng"))))
4749 (build-system python-build-system)
4752 (modify-phases %standard-phases
4753 ;; Disable failing test. Bug filed upstream:
4754 ;; https://github.com/wardi/urwid/issues/164
4755 ;; TODO: check again for python-urwid > 1.3.1 or python > 3.4.3.
4756 (add-after 'unpack 'disable-failing-test
4758 (substitute* "urwid/tests/test_event_loops.py"
4759 (("test_remove_watch_file")
4760 "disable_remove_watch_file")))))))
4761 (home-page "http://urwid.org")
4762 (synopsis "Console user interface library for Python")
4764 "Urwid is a curses-based UI/widget library for Python. It includes many
4765 features useful for text console applications.")
4766 (license license:lgpl2.1+)))
4768 (define-public python2-urwid
4769 (let ((python2-urwid (package-with-python2 python-urwid)))
4771 (inherit python2-urwid)
4774 `(;; Explicitly using Python 2 is necessary due the argument list being
4775 ;; built from only the 'delete-test_vterm.py' phase and python-urwid's
4776 ;; package arguments, which by default assumes the use of Python 3.
4779 (modify-phases %standard-phases
4780 ;; Disable the vterm tests because of non-deterministic failures
4781 ;; with Python 2. See https://github.com/urwid/urwid/issues/230.
4782 (add-after 'unpack 'delete-test_vterm.py
4783 (delete-file "urwid/tests/test_vterm.py"))))
4784 (package-arguments python-urwid))))))
4786 (define-public python-urwidtrees
4788 (name "python-urwidtrees")
4793 ;; package author intends on distributing via github rather than pypi:
4794 ;; https://github.com/pazz/alot/issues/877#issuecomment-230173331
4795 (uri (string-append "https://github.com/pazz/urwidtrees/archive/"
4797 (file-name (string-append name "-" version ".tar.gz"))
4800 "0d30lyd3s2a97rhqfax5w9ssqds2z6aydqx3c6j2c2lk3cb4ngvh"))))
4801 (build-system python-build-system)
4803 '(#:tests? #f)) ; no tests
4804 (propagated-inputs `(("python-urwid" ,python-urwid)))
4805 (home-page "https://github.com/pazz/urwidtrees")
4806 (synopsis "Tree widgets for urwid")
4807 (description "Urwidtrees is a Widget Container API for the @code{urwid}
4808 toolkit. Use it to build trees of widgets.")
4809 (license license:gpl3+)))
4811 (define-public python2-urwidtrees
4812 (package-with-python2 python-urwidtrees))
4814 (define-public python-dbus
4816 (name "python-dbus")
4822 "https://dbus.freedesktop.org/releases/dbus-python/dbus-python-"
4825 (base32 "1py62qir966lvdkngg0v8k1khsqxwk5m4s8nflpk1agk5f5nqb71"))))
4826 (build-system gnu-build-system)
4829 (modify-phases %standard-phases
4833 ;; XXX: For the missing '/etc/machine-id'.
4834 (substitute* "test/run-test.sh"
4835 (("DBUS_FATAL_WARNINGS=1")
4836 "DBUS_FATAL_WARNINGS=0"))
4839 `(("pkg-config" ,pkg-config)))
4841 `(("python" ,python)
4842 ("dbus-glib" ,dbus-glib)))
4843 (synopsis "Python bindings for D-bus")
4844 (description "python-dbus provides bindings for libdbus, the reference
4845 implementation of D-Bus.")
4846 (home-page "https://www.freedesktop.org/wiki/Software/DBusBindings/")
4847 (license license:expat)))
4849 (define-public python2-dbus
4850 (package (inherit python-dbus)
4851 (name "python2-dbus")
4852 (inputs `(("python" ,python-2)
4853 ,@(alist-delete "python"
4854 (package-inputs python-dbus)
4856 ;; FIXME: on Python 2, the test_utf8 fails with:
4857 ;; "ValueError: unichr() arg not in range(0x10000) (narrow Python build)"
4858 (arguments `(#:tests? #f))))
4860 (define-public python-lxml
4862 (name "python-lxml")
4867 (uri (pypi-uri "lxml" version))
4870 "15nvf6n285n282682qyw3wihsncb0x5amdhyi4b83bfa2nz74vvk"))))
4871 (build-system python-build-system)
4873 `(("libxml2" ,libxml2)
4874 ("libxslt" ,libxslt)))
4875 (home-page "http://lxml.de/")
4877 "Python XML processing library")
4879 "The lxml XML toolkit is a Pythonic binding for the C libraries
4880 libxml2 and libxslt.")
4881 (license license:bsd-3))) ; and a few more, see LICENSES.txt
4883 (define-public python2-lxml
4884 (package-with-python2 python-lxml))
4886 ;; beautifulsoup4 has a totally different namespace than 3.x,
4887 ;; and pypi seems to put it under its own name, so I guess we should too
4888 (define-public python-beautifulsoup4
4890 (name "python-beautifulsoup4")
4895 (uri (pypi-uri "beautifulsoup4" version))
4898 "0glaw1vyxnbp03fni7h5496n6iib0n5iim4gax1n0ngscs9s075j"))))
4899 (build-system python-build-system)
4902 (modify-phases %standard-phases
4903 ;; The Python 2 source is the definitive source of beautifulsoup4. We
4904 ;; must use this conversion script when building with Python 3. The
4905 ;; conversion script also runs the tests.
4906 ;; For more information, see the file 'convert-py3k' in the source
4909 (lambda _ (zero? (system* "./convert-py3k")))))))
4911 "https://www.crummy.com/software/BeautifulSoup/bs4/")
4913 "Python screen-scraping library")
4915 "Beautiful Soup is a Python library designed for rapidly setting up
4916 screen-scraping projects. It offers Pythonic idioms for navigating,
4917 searching, and modifying a parse tree, providing a toolkit for
4918 dissecting a document and extracting what you need. It automatically
4919 converts incoming documents to Unicode and outgoing documents to UTF-8.")
4920 (license license:expat)
4921 (properties `((python2-variant . ,(delay python2-beautifulsoup4))))))
4923 (define-public python2-beautifulsoup4
4925 (inherit (package-with-python2
4926 (strip-python2-variant python-beautifulsoup4)))
4927 (arguments `(#:python ,python-2))))
4929 (define-public python-netifaces
4931 (name "python-netifaces")
4936 (uri (pypi-uri "netifaces" version))
4939 "1q7bi5k2r955rlcpspx4salvkkpk28jky67fjbpz2dkdycisak8c"))))
4940 (build-system python-build-system)
4941 (home-page "https://github.com/al45tair/netifaces")
4943 "Python module for portable network interface information")
4945 "Netifaces is a Python module providing information on network
4946 interfaces in an easy and portable manner.")
4947 (license license:expat)))
4949 (define-public python2-netifaces
4950 (package-with-python2 python-netifaces))
4952 (define-public python-networkx
4954 (name "python-networkx")
4959 (uri (pypi-uri "networkx" version ".zip"))
4961 (base32 "1ccb8mfz4m821k9y0cigkbq42q2sbb4dj5fbjshp0awp32j2q9v4"))))
4962 (build-system python-build-system)
4963 ;; python-decorator is needed at runtime
4965 `(("python-decorator" ,python-decorator)))
4967 `(("python-nose" ,python-nose)
4969 (home-page "http://networkx.github.io/")
4970 (synopsis "Python module for creating and manipulating graphs and networks")
4972 "NetworkX is a Python package for the creation, manipulation, and study
4973 of the structure, dynamics, and functions of complex networks.")
4974 (license license:bsd-3)))
4976 (define-public python2-networkx
4977 (package-with-python2 python-networkx))
4979 ;; Define new package, because the current version of python-colormath does
4980 ;; not build against 2.0.
4981 (define-public python-networkx2
4982 (package (inherit python-networkx)
4983 (name "python-networkx2")
4988 (uri (pypi-uri "networkx" version ".zip"))
4991 "1ajl2jp8qry9nyjzzkqpy0vmsr14d23z1qk7y0vr5iwjbpvzhpyd"))
4993 (search-patches "python-networkx2-reproducible-build.patch"))))))
4995 (define-public python2-networkx2
4996 (package-with-python2 python-networkx2))
4998 (define-public snakemake
5005 (uri (pypi-uri "snakemake" version))
5007 (base32 "0g0paia4z7w3srnqdmavq3hrb2x7qnpf81jx50njl0p7y4y0j8jv"))))
5008 (build-system python-build-system)
5010 ;; TODO: Package missing test dependencies.
5013 (modify-phases %standard-phases
5014 ;; For cluster execution Snakemake will call Python. Since there is
5015 ;; no suitable PYTHONPATH set, cluster execution will fail. We fix
5016 ;; this by calling the snakemake wrapper instead.
5017 (add-after 'unpack 'call-wrapper-not-wrapped-snakemake
5018 (lambda* (#:key outputs #:allow-other-keys)
5019 (substitute* "snakemake/executors.py"
5020 (("\\{sys.executable\\} -m snakemake")
5021 (string-append (assoc-ref outputs "out")
5025 `(("python-wrapt" ,python-wrapt)
5026 ("python-requests" ,python-requests)
5027 ("python-appdirs" ,python-appdirs)
5028 ("python-configargparse" ,python-configargparse)
5029 ("python-pyyaml" ,python-pyyaml)
5030 ("python-ratelimiter" ,python-ratelimiter)))
5031 (home-page "https://bitbucket.org/snakemake/snakemake/wiki/Home")
5032 (synopsis "Python-based execution environment for make-like workflows")
5034 "Snakemake aims to reduce the complexity of creating workflows by
5035 providing a clean and modern domain specific specification language (DSL) in
5036 Python style, together with a fast and comfortable execution environment.")
5037 (license license:expat)))
5039 (define-public python-pyqrcode
5041 (name "python-pyqrcode")
5046 (uri (pypi-uri "PyQRCode" version))
5049 "1m9ln8k9v7dfbh1i81225hx5mdsh8mpf9g7r4wpbfmiyfcs7dgzx"))))
5050 (build-system python-build-system)
5052 "https://github.com/mnooner256/pyqrcode")
5053 (synopsis "QR code generator")
5055 "Pyqrcode is a QR code generator written purely in Python with
5056 SVG, EPS, PNG and terminal output.")
5057 (license license:bsd-3)))
5059 (define-public python-seaborn
5061 (name "python-seaborn")
5066 (uri (pypi-uri "seaborn" version))
5068 (base32 "0pawrqc3mxpwd5g9pvi9gba02637bh5c8ldpp8izfwpfn52469zs"))))
5069 (build-system python-build-system)
5071 '(#:tests? #f)) ; Tests requires a running X11 server.
5073 `(("python-pandas" ,python-pandas)
5074 ("python-matplotlib" ,python-matplotlib)
5075 ("python-scipy" ,python-scipy)))
5076 (home-page "http://stanford.edu/~mwaskom/software/seaborn/")
5077 (synopsis "Statistical data visualization")
5079 "Seaborn is a library for making attractive and informative statistical
5080 graphics in Python. It is built on top of matplotlib and tightly integrated
5081 with the PyData stack, including support for numpy and pandas data structures
5082 and statistical routines from scipy and statsmodels.")
5083 (license license:bsd-3)
5084 (properties `((python2-variant . ,(delay python2-seaborn))))))
5086 (define-public python2-seaborn
5087 (let ((base (package-with-python2 (strip-python2-variant python-seaborn))))
5090 (propagated-inputs `(("python2-pytz" ,python2-pytz)
5091 ,@(package-propagated-inputs base))))))
5093 (define-public python-mpmath
5095 (name "python-mpmath")
5099 (uri (string-append "http://mpmath.org/files/mpmath-"
5103 "08ijsr4ifrqv3cjc26mkw0dbvyygsa99in376hr4b96ddm1gdpb8"))))
5104 (build-system python-build-system)
5107 (modify-phases %standard-phases
5111 (system* "python" "mpmath/tests/runtests.py" "-local")))))))
5112 (home-page "http://mpmath.org")
5113 (synopsis "Arbitrary-precision floating-point arithmetic in python")
5115 "@code{mpmath} can be used as an arbitrary-precision substitute for
5116 Python's float/complex types and math/cmath modules, but also does much
5117 more advanced mathematics.")
5118 (license license:bsd-3)))
5120 (define-public python2-mpmath
5121 (package-with-python2 python-mpmath))
5123 (define-public python-sympy
5125 (name "python-sympy")
5131 "https://github.com/sympy/sympy/releases/download/sympy-"
5132 version "/sympy-" version ".tar.gz"))
5134 (base32 "190n29sppw7g8ihilc5451y7jlfcaw56crqiqbf1jff43dlmfnxc"))))
5135 (build-system python-build-system)
5138 (modify-phases %standard-phases
5139 ;; Run the core tests after installation. By default it would run
5140 ;; *all* tests, which take a very long time to complete and are known
5143 (add-after 'install 'check
5144 (lambda* (#:key outputs #:allow-other-keys)
5145 (invoke "python3" "-c" "import sympy; sympy.test(\"/core\")")
5148 `(("python-mpmath" ,python-mpmath)))
5149 (home-page "http://www.sympy.org/")
5150 (synopsis "Python library for symbolic mathematics")
5152 "SymPy is a Python library for symbolic mathematics. It aims to become a
5153 full-featured computer algebra system (CAS) while keeping the code as simple
5154 as possible in order to be comprehensible and easily extensible.")
5155 (license license:bsd-3)))
5157 (define-public python2-sympy
5159 (inherit (package-with-python2 python-sympy))
5162 (modify-phases %standard-phases
5163 ;; Run the core tests after installation. By default it would run
5164 ;; *all* tests, which take a very long time to complete and are known
5167 (add-after 'install 'check
5168 (lambda* (#:key outputs #:allow-other-keys)
5169 (invoke "python" "-c" "import sympy; sympy.test(\"/core\")")
5172 (define-public python-q
5179 (uri (pypi-uri "q" version))
5182 "1mgfazh8fkizh6walra2zv885f3lcgr3nb02v1frfm4p8ddcy3yy"))))
5183 (build-system python-build-system)
5184 (home-page "https://github.com/zestyping/q")
5185 (synopsis "Quick-and-dirty debugging output for tired programmers")
5187 "q is a Python module for \"print\" style of debugging Python code. It
5188 provides convenient short API for print out of values, tracebacks, and
5189 falling into the Python interpreter.")
5190 (license license:asl2.0)))
5192 (define-public python2-q
5193 (package-with-python2 python-q))
5195 (define-public python2-xlib
5197 (name "python2-xlib")
5201 (uri (string-append "mirror://sourceforge/python-xlib/python-xlib"
5203 "python-xlib-" version ".tar.gz"))
5206 "1sv0447j0rx8cgs3jhjl695p5pv13ihglcjlrrz1kq05lsvb0wa7"))))
5207 (build-system python-build-system)
5209 `(#:python ,python-2 ;Python 2 only
5210 #:tests? #f)) ;no tests
5211 (home-page "http://python-xlib.sourceforge.net/")
5212 (synopsis "Python X11 client library")
5214 "The Python X Library is intended to be a fully functional X client
5215 library for Python programs. It is useful to implement low-level X clients.
5216 It is written entirely in Python.")
5217 (license license:gpl2+)))
5219 (define-public python-singledispatch
5221 (name "python-singledispatch")
5226 (uri (pypi-uri "singledispatch" version))
5229 "171b7ip0hsq5qm83np40h3phlr36ym18w0lay0a8v08kvy3sy1jv"))))
5230 (build-system python-build-system)
5232 `(("python-six" ,python-six))) ; required for conversion, not at run-time
5234 "http://docs.python.org/3/library/functools.html#functools.singledispatch")
5235 (synopsis "Backport of singledispatch feature from Python 3.4")
5237 "This library brings functools.singledispatch from Python 3.4 to Python
5239 (license license:expat)))
5241 (define-public python2-singledispatch
5242 (package-with-python2 python-singledispatch))
5244 ;; the python- version can be removed with python-3.5
5245 (define-public python-backports-abc
5247 (name "python-backports-abc")
5252 (uri (pypi-uri "backports_abc" version))
5255 "1pkv8d1zxj5f9i227dxbjczncbv7ks7ywnjwyxfjagm02i2yafq3"))))
5256 (build-system python-build-system)
5257 (home-page "https://github.com/cython/backports_abc")
5258 (synopsis "Backport of additions to the 'collections.abc' module")
5260 "Python-backports-abc provides a backport of additions to the
5261 'collections.abc' module in Python-3.5.")
5262 (license license:psfl)))
5264 (define-public python2-backports-abc
5265 (package-with-python2 python-backports-abc))
5267 (define-public python-backports-csv
5269 (name "python-backports-csv")
5274 (uri (pypi-uri "backports.csv" version))
5277 "1imzbrradkfn8s2m1qcimyn74dn1mz2p3j381jljn166rf2i6hlc"))))
5278 (build-system python-build-system)
5279 (home-page "https://github.com/ryanhiebert/backports.csv")
5280 (synopsis "Backport of Python 3's csv module for Python 2")
5282 "Provides a backport of Python 3's @code{csv} module for parsing
5283 comma separated values. The API of the @code{csv} module in Python 2
5284 is drastically different from the @code{csv} module in Python 3.
5285 This is due, for the most part, to the difference between str in
5286 Python 2 and Python 3.")
5287 (license license:psfl)))
5289 (define-public python2-backports-csv
5290 (package-with-python2 python-backports-csv))
5292 (define-public python2-backports-shutil-get-terminal-size
5294 (name "python2-backports-shutil-get-terminal-size")
5299 (uri (pypi-uri "backports.shutil_get_terminal_size" version))
5302 "107cmn7g3jnbkp826zlj8rrj19fam301qvaqf0f3905f5217lgki"))))
5303 (build-system python-build-system)
5305 `(#:python ,python-2
5307 (modify-phases %standard-phases
5310 (zero? (system* "py.test" "-v")))))))
5312 `(("python2-pytest" ,python2-pytest)))
5313 (home-page "https://github.com/chrippa/backports.shutil_get_terminal_size")
5314 (synopsis "Backport of Python 3.3's @code{shutil.get_terminal_size}")
5316 "This package provides a backport of the @code{get_terminal_size
5317 function} from Python 3.3's @code{shutil}.
5318 Unlike the original version it is written in pure Python rather than C,
5319 so it might be a tiny bit slower.")
5320 (license license:expat)))
5322 (define-public python-waf
5328 (uri (string-append "https://waf.io/"
5329 "waf-" version ".tar.bz2"))
5332 "0wl4cnmp06lfxqjxaan58bqxn27smhydz0sg5prrfbl3bsw4gv6q"))))
5333 (build-system python-build-system)
5336 (modify-phases %standard-phases
5339 (zero? (system* "python" "waf-light" "configure" "build"))))
5342 (zero? (system* "python" "waf" "--version"))))
5345 (copy-file "waf" %output))))))
5346 (home-page "https://waf.io/")
5347 (synopsis "Python-based build system")
5349 "Waf is a Python-based framework for configuring, compiling and installing
5351 (license license:bsd-3)))
5353 (define-public python2-waf
5354 (package-with-python2 python-waf))
5356 (define-public python-pyzmq
5358 (name "python-pyzmq")
5363 (uri (pypi-uri "pyzmq" version))
5365 (base32 "13fhwnlvsvxv72kfhqbpn6qi7msh8mc8377mpabv32skk2cjfnxx"))))
5366 (build-system python-build-system)
5369 (list (string-append "--zmq=" (assoc-ref %build-inputs "zeromq")))
5370 ;; FIXME: You must build pyzmq with 'python setup.py build_ext
5371 ;; --inplace' for 'python setup.py test' to work.
5374 `(("zeromq" ,zeromq)))
5376 `(("pkg-config" ,pkg-config)
5377 ("python-nose" ,python-nose)))
5378 (home-page "https://github.com/zeromq/pyzmq")
5379 (synopsis "Python bindings for 0MQ")
5381 "PyZMQ is the official Python binding for the ZeroMQ messaging library.")
5382 (license license:bsd-4)))
5384 (define-public python2-pyzmq
5385 (package-with-python2 python-pyzmq))
5387 (define-public python-pep8
5389 (name "python-pep8")
5394 (uri (pypi-uri "pep8" version))
5397 "002rkl4lsn6x2mxmf8ar00l0m8i3mzrc6pnzz77blyksmpsxa4x1"))))
5398 (build-system python-build-system)
5399 (home-page "http://pep8.readthedocs.org/")
5400 (synopsis "Python style guide checker")
5402 "This tools checks Python code against some of the style conventions in
5404 (license license:expat)))
5406 (define-public python2-pep8
5407 (package-with-python2 python-pep8))
5409 (define-public python-pyflakes
5411 (name "python-pyflakes")
5416 (uri (pypi-uri "pyflakes" version))
5419 "1x1pcca4a24k4pw8x1c77sgi58cg1wl2k38mp8a25k608pzls3da"))))
5420 (build-system python-build-system)
5422 "https://github.com/pyflakes/pyflakes")
5423 (synopsis "Passive checker of Python programs")
5425 "Pyflakes statically checks Python source code for common errors.")
5426 (license license:expat)))
5428 (define-public python2-pyflakes
5429 (package-with-python2 python-pyflakes))
5431 (define-public python-mccabe
5433 (name "python-mccabe")
5438 (uri (pypi-uri "mccabe" version))
5441 "07w3p1qm44hgxf3vvwz84kswpsx6s7kvaibzrsx5dzm0hli1i3fx"))))
5442 (build-system python-build-system)
5444 `(("python-pytest" ,python-pytest-bootstrap)
5445 ("python-pytest-runner" ,python-pytest-runner)))
5446 (home-page "https://github.com/flintwork/mccabe")
5447 (synopsis "McCabe checker, plugin for flake8")
5449 "This package provides a Flake8 plug-in to compute the McCabe cyclomatic
5450 complexity of Python source code.")
5451 (license license:expat)))
5453 (define-public python2-mccabe
5454 (package-with-python2 python-mccabe))
5456 (define-public python-mccabe-0.2.1
5457 (package (inherit python-mccabe)
5462 (uri (pypi-uri "mccabe" version))
5465 "0fi4a81kr5bcv5p4xgibqr595hyj5dafkqgsmfk96mfy8w71fajs"))))))
5467 (define-public python2-mccabe-0.2.1
5468 (package-with-python2 python-mccabe-0.2.1))
5470 ;; Flake8 2.4.1 requires an older version of pep8.
5471 ;; This should be removed ASAP.
5472 (define-public python-pep8-1.5.7
5473 (package (inherit python-pep8)
5479 "https://pypi.python.org/packages/source/p/pep8/pep8-"
5484 "12b9bbdbwnspxgak14xg58c130x2n0blxzlms5jn2dszn8qj3d0m"))))
5486 ;; XXX Tests not compatible with Python 3.5.
5489 (define-public python2-pep8-1.5.7
5490 (package-with-python2 python-pep8-1.5.7))
5492 ;; Flake8 2.4.1 requires an older version of pyflakes.
5493 ;; This should be removed ASAP.
5494 (define-public python-pyflakes-0.8.1
5495 (package (inherit python-pyflakes)
5501 "https://pypi.python.org/packages/source/p/pyflakes/pyflakes-"
5506 "0sbpq6pqm1i9wqi41mlfrsc5rk92jv4mskvlyxmnhlbdnc80ma1z"))))
5508 ;; XXX Tests not compatible with Python 3.5.
5511 (define-public python2-pyflakes-0.8.1
5512 (package-with-python2 python-pyflakes-0.8.1))
5514 (define-public python-flake8
5516 (name "python-flake8")
5521 (uri (pypi-uri "flake8" version))
5524 "1n0i38592vy3q0x2a9bf8z6rhhn04i30wsn5i5zzcj7qkxvl8062"))))
5525 (build-system python-build-system)
5528 (modify-phases %standard-phases
5530 (add-after 'install 'check
5531 (lambda* (#:key inputs outputs #:allow-other-keys)
5532 (add-installed-pythonpath inputs outputs)
5533 (zero? (system* "pytest" "-v")))))))
5535 `(("python-pycodestyle" ,python-pycodestyle)
5536 ("python-pyflakes" ,python-pyflakes)
5537 ;; flake8 depends on a newer setuptools than provided by python.
5538 ("python-setuptools" ,python-setuptools)
5539 ("python-mccabe" ,python-mccabe)))
5541 `(("python-mock" ,python-mock) ; TODO: only required for < 3.3
5542 ("python-pytest" ,python-pytest-bootstrap)
5543 ("python-pytest-runner" ,python-pytest-runner)))
5544 (home-page "https://gitlab.com/pycqa/flake8")
5546 "The modular source code checker: pep8, pyflakes and co")
5548 "Flake8 is a wrapper around PyFlakes, pep8 and python-mccabe.")
5549 (properties `((python2-variant . ,(delay python2-flake8))))
5550 (license license:expat)))
5552 (define-public python2-flake8
5553 (let ((base (package-with-python2 (strip-python2-variant python-flake8))))
5554 (package (inherit base)
5556 `(("python2-configparser" ,python2-configparser)
5557 ("python2-enum" ,python2-enum)
5558 ,@(package-propagated-inputs base))))))
5560 ;; python-hacking requires flake8 <2.6.0.
5561 (define-public python-flake8-2.5
5563 (inherit python-flake8)
5567 (uri (pypi-uri "flake8" version))
5570 "1snylqwbmrylbx3r1wpz8ggk98f6bcag4441ag8mm2l7wyn58sij"))))
5572 `(("python-pep8" ,python-pep8)
5573 ,@(package-propagated-inputs python-flake8)))
5574 (properties `((python2-variant . ,(delay python2-flake8-2.5))))))
5576 (define-public python2-flake8-2.5
5578 (inherit python2-flake8)
5579 (version (package-version python-flake8-2.5))
5581 (inherit (package-source python-flake8-2.5))))
5583 `(("python2-pep8" ,python2-pep8)
5584 ,@(package-propagated-inputs python2-flake8)))))
5586 (define-public python-flake8-polyfill
5588 (name "python-flake8-polyfill")
5593 (uri (pypi-uri "flake8-polyfill" version))
5596 "1nlf1mkqw856vi6782qcglqhaacb23khk9wkcgn55npnjxshhjz4"))))
5597 (build-system python-build-system)
5600 (modify-phases %standard-phases
5603 (setenv "PYTHONPATH"
5604 (string-append (getcwd) "/build/lib:"
5605 (getenv "PYTHONPATH")))
5606 (zero? (system* "py.test" "-v")))))))
5608 `(("python-flake8" ,python-flake8)
5609 ("python-mock" ,python-mock)
5610 ("python-pep8" ,python-pep8)
5611 ("python-pycodestyle" ,python-pycodestyle)
5612 ("python-pytest" ,python-pytest)))
5613 (home-page "https://gitlab.com/pycqa/flake8-polyfill")
5614 (synopsis "Polyfill package for Flake8 plugins")
5616 "This package that provides some compatibility helpers for Flake8
5617 plugins that intend to support Flake8 2.x and 3.x simultaneously.")
5618 (license license:expat)))
5620 (define-public python2-flake8-polyfill
5621 (package-with-python2 python-flake8-polyfill))
5623 (define-public python-mistune
5625 (name "python-mistune")
5630 (uri (pypi-uri "mistune" version))
5633 "06b662p6kf46wh2jsabaqhaq4bz1srh2zxkrnx4yg96azlxw645w"))))
5634 (build-system python-build-system)
5636 `(("python-nose" ,python-nose)
5637 ("python-cython" ,python-cython)))
5638 (home-page "https://github.com/lepture/mistune")
5639 (synopsis "Markdown parser in pure Python")
5640 (description "This package provides a fast markdown parser in pure
5642 (license license:bsd-3)))
5644 (define-public python2-mistune
5645 (package-with-python2 python-mistune))
5647 (define-public python-markdown
5649 (name "python-markdown")
5654 (uri (pypi-uri "Markdown" version))
5657 "108g80ryzykh8bj0i7jfp71510wrcixdi771lf2asyghgyf8cmm8"))))
5658 (build-system python-build-system)
5661 (modify-phases %standard-phases
5664 (zero? (system* "python" "run-tests.py")))))))
5666 `(("python-nose" ,python-nose)
5667 ("python-pyyaml" ,python-pyyaml)))
5668 (home-page "https://pythonhosted.org/Markdown/")
5669 (synopsis "Python implementation of Markdown")
5671 "This package provides a Python implementation of John Gruber's
5672 Markdown. The library features international input, various Markdown
5673 extensions, and several HTML output formats. A command line wrapper
5674 markdown_py is also provided to convert Markdown files to HTML.")
5675 (license license:bsd-3)))
5677 (define-public python2-markdown
5678 (package-with-python2 python-markdown))
5680 (define-public python-ptyprocess
5682 (name "python-ptyprocess")
5688 "https://pypi.python.org/packages/source/p/ptyprocess/ptyprocess-"
5692 "19l1xrjn4l9gjz01s3vg92gn2dd9d8mw1v86ppkzlnr9m5iwwc05"))))
5693 (build-system python-build-system)
5695 `(("python-nose" ,python-nose)))
5698 (modify-phases %standard-phases
5701 (zero? (system* "nosetests")))))))
5702 (home-page "https://github.com/pexpect/ptyprocess")
5703 (synopsis "Run a subprocess in a pseudo terminal")
5705 "This package provides a Python library used to launch a subprocess in a
5706 pseudo terminal (pty), and interact with both the process and its pty.")
5707 (license license:isc)))
5709 (define-public python2-ptyprocess
5710 (package-with-python2 python-ptyprocess))
5712 (define-public python-cram
5714 (name "python-cram")
5716 (home-page "https://bitheap.org/cram/")
5719 (uri (list (string-append home-page "cram-"
5721 (pypi-uri "cram" version)))
5724 "0bvz6fwdi55rkrz3f50zsy35gvvwhlppki2yml5bj5ffy9d499vx"))))
5727 (modify-phases %standard-phases
5728 (add-after 'unpack 'patch-source
5730 (substitute* (find-files "cram" ".*\\.py$")
5731 ;; Replace default shell path.
5732 (("/bin/sh") (which "sh")))
5733 (substitute* (find-files "tests" ".*\\.t$")
5735 (("/bin/bash") (which "bash"))
5736 (("/bin/sh") (which "sh")))
5737 (substitute* "cram/_test.py"
5738 ;; This hack works around a bug triggered by substituting
5739 ;; the /bin/sh paths. "tests/usage.t" compares the output of
5740 ;; "cram -h", which breaks the output at 80 characters. This
5741 ;; causes the line showing the default shell to break into two
5742 ;; lines, but the test expects a single line...
5743 (("env\\['COLUMNS'\\] = '80'")
5744 "env['COLUMNS'] = '160'"))
5747 (add-after 'install 'check
5748 ;; The test phase uses the built library and executable.
5749 ;; It's easier to run it after install since the build
5750 ;; directory contains version-specific PATH.
5751 (lambda* (#:key inputs outputs #:allow-other-keys)
5752 (add-installed-pythonpath inputs outputs)
5753 (setenv "PATH" (string-append (getenv "PATH") ":"
5754 (assoc-ref outputs "out") "/bin"))
5755 (zero? (system* "make" "test")))))))
5756 (build-system python-build-system)
5758 `(("python-coverage" ,python-coverage)
5760 (synopsis "Simple testing framework for command line applications")
5762 "Cram is a functional testing framework for command line applications.
5763 Cram tests look like snippets of interactive shell sessions. Cram runs each
5764 command and compares the command output in the test with the command’s actual
5766 (license license:gpl2+)))
5768 (define-public python2-cram
5769 (package-with-python2 python-cram))
5771 (define-public python-straight-plugin
5773 (name "python-straight-plugin")
5778 (uri (pypi-uri "straight.plugin" version))
5781 "069pjll4383p4kkgvcc40hgyvf79j2wdbpgwz77yigzxksh1gj62"))))
5782 (build-system python-build-system)
5783 (home-page "https://github.com/ironfroggy/straight.plugin")
5784 (synopsis "Simple namespaced plugin facility")
5785 (description "Straight Plugin provides a type of plugin you can create from
5786 almost any existing Python modules, and an easy way for outside developers to
5787 add functionality and customization to your projects with their own plugins.")
5788 (license license:expat)))
5790 (define-public python2-straight-plugin
5791 (package-with-python2 python-straight-plugin))
5793 (define-public python-fonttools
5795 (name "python-fonttools")
5799 (uri (pypi-uri "fonttools" version ".zip"))
5802 "1hhj97izwliy0vybmza72d90l5d4mcn50y8akq7kyccfl82vdx4d"))))
5803 (build-system python-build-system)
5805 '(#:test-target "check"
5807 (modify-phases %standard-phases
5808 (add-after 'unpack 'patch-setuppy
5809 ;; Remove the undocumented "extra_path" argument, which adds an
5810 ;; intervening directories between site-packages and the package
5813 (substitute* "setup.py"
5814 (("^[ \t]*extra_path *= *'FontTools',") ""))
5817 `(("unzip" ,unzip)))
5818 (home-page "https://github.com/behdad/fonttools")
5819 (synopsis "Tools to manipulate font files")
5821 "FontTools/TTX is a library to manipulate font files from Python. It
5822 supports reading and writing of TrueType/OpenType fonts, reading and writing
5823 of AFM files, reading (and partially writing) of PS Type 1 fonts. The package
5824 also contains a tool called “TTX” which converts TrueType/OpenType fonts to and
5825 from an XML-based format.")
5826 (license (license:non-copyleft
5827 "file://LICENSE.txt"
5828 "See LICENSE.txt in the distribution."))))
5830 (define-public python2-fonttools
5831 (package-with-python2 python-fonttools))
5833 (define-public python-ly
5840 (uri (string-append "https://pypi.python.org/packages/57/4f/"
5841 "889579244947368f28eda66b782331b1e75f83fd72e63f9ece93cd7a18f9"
5842 "/python-ly-" version ".tar.gz"))
5845 "0x98dv7p8mg26p4816yy8hz4f34zf6hpnnfmr56msgh9jnsm2qfl"))))
5846 (build-system python-build-system)
5848 ;; FIXME: Some tests need network access.
5850 (synopsis "Tool and library for manipulating LilyPond files")
5851 (description "This package provides a Python library to parse, manipulate
5852 or create documents in LilyPond format. A command line program ly is also
5853 provided that can be used to do various manipulations with LilyPond files.")
5854 (home-page "https://pypi.python.org/pypi/python-ly")
5855 (license license:gpl2+)))
5857 (define-public python-appdirs
5859 (name "python-appdirs")
5864 (uri (pypi-uri "appdirs" version))
5867 "14id6wxi12lgyw0mg3bcfnf888ad07jz9yj46gfzhn186z8rcn4y"))))
5868 (build-system python-build-system)
5869 (home-page "https://github.com/ActiveState/appdirs")
5871 "Determine platform-specific dirs, e.g. a \"user data dir\"")
5873 "This module provides a portable way of finding out where user data
5874 should be stored on various operating systems.")
5875 (license license:expat)))
5877 (define-public python2-appdirs
5878 (package-with-python2 python-appdirs))
5880 (define-public python-llfuse
5882 (name "python-llfuse")
5886 (uri (pypi-uri "llfuse" version ".tar.bz2"))
5889 "0qxvnbz41bpvpc1vbi8qkhmpr9gj1qrrp5jdj085iqibd8l2l9cn"))))
5890 (build-system python-build-system)
5895 `(("pkg-config" ,pkg-config)))
5896 (synopsis "Python bindings for FUSE")
5898 "Python-LLFUSE is a set of Python bindings for the low level FUSE API.")
5899 (home-page "https://bitbucket.org/nikratio/python-llfuse/")
5900 (license license:lgpl2.0+)
5901 (properties `((python2-variant . ,(delay python2-llfuse))))))
5903 (define-public python2-llfuse
5904 (package (inherit (package-with-python2
5905 (strip-python2-variant python-llfuse)))
5906 (propagated-inputs `(("python2-contextlib2" ,python2-contextlib2)))))
5909 (define-public python-llfuse-0.41
5910 (package (inherit python-llfuse)
5915 "https://bitbucket.org/nikratio/python-llfuse/downloads/"
5916 "llfuse-" version ".tar.bz2"))
5919 "1imlqw9b73086y97izr036f58pgc5akv4ihc2rrf8j5h75jbrlaa"))))
5920 ;; Python-LLFUSE < 0.42 includes underscore.js, which is MIT (expat)
5921 ;; licensed. The rest of the package is licensed under LGPL2.0 or later.
5922 (license (list license:expat license:lgpl2.0+))))
5924 (define-public python-msgpack
5926 (name "python-msgpack")
5930 (uri (pypi-uri "msgpack" version))
5933 "1hz2dba1nvvn52afg34liijsm7kn65cmn06dl0xbwld6bb4cis0f"))))
5934 (build-system python-build-system)
5936 `(#:modules ((guix build utils)
5937 (guix build python-build-system)
5942 (modify-phases %standard-phases
5945 (let ((cwd (getcwd)))
5946 (setenv "PYTHONPATH"
5947 (string-append cwd "/build/"
5948 (find (cut string-prefix? "lib" <>)
5949 (scandir (string-append cwd "/build")))
5951 (getenv "PYTHONPATH")))
5952 (invoke "pytest" "-v" "test")))))))
5954 `(("python-pytest" ,python-pytest)))
5955 (synopsis "MessagePack (de)serializer")
5956 (description "MessagePack is a fast, compact binary serialization format,
5957 suitable for similar data to JSON. This package provides CPython bindings for
5958 reading and writing MessagePack data.")
5959 (home-page "https://pypi.python.org/pypi/msgpack/")
5960 (license license:asl2.0)))
5962 ;; This msgpack library's name changed from "python-msgpack" to "msgpack" with
5963 ;; release 0.5. Some packages like borg still call it by the old name for now.
5964 ;; <https://bugs.gnu.org/30662>
5965 (define-public python-msgpack-transitional
5967 (inherit python-msgpack)
5968 (name "python-msgpack-transitional")
5970 (substitute-keyword-arguments (package-arguments python-msgpack)
5972 `(modify-phases ,phases
5973 (add-after 'unpack 'configure-transitional
5975 ;; Keep using the old name.
5976 (substitute* "setup.py"
5977 (("TRANSITIONAL = False")
5978 "TRANSITIONAL = 1"))
5981 (define-public python2-msgpack
5982 (package-with-python2 python-msgpack))
5984 (define-public python-netaddr
5986 (name "python-netaddr")
5991 (uri (pypi-uri "netaddr" version))
5994 "1zdfadvpq4lmcqzr383gywxn4xyn355kj1n3lk9q2l03vmyfrbiq"))))
5995 (build-system python-build-system)
5996 (arguments `(#:tests? #f)) ;; No tests.
5997 (home-page "https://github.com/drkjam/netaddr/")
5998 (synopsis "Pythonic manipulation of network addresses")
6000 "A Python library for representing and manipulating IPv4, IPv6, CIDR, EUI
6001 and MAC network addresses.")
6002 (license license:bsd-3)))
6004 (define-public python2-netaddr
6005 (package-with-python2 python-netaddr))
6007 (define-public python-wrapt
6009 (name "python-wrapt")
6014 (uri (pypi-uri "wrapt" version))
6017 "1ip3dwib39xhp79kblskgvz3fjzcwxgx3fs3ahdixhpjg7a61mfl"))))
6018 (build-system python-build-system)
6020 ;; Tests are not included in the tarball, they are only available in the
6023 (home-page "https://github.com/GrahamDumpleton/wrapt")
6024 (synopsis "Module for decorators, wrappers and monkey patching")
6026 "The aim of the wrapt module is to provide a transparent object proxy for
6027 Python, which can be used as the basis for the construction of function
6028 wrappers and decorator functions.")
6029 (license license:bsd-2)))
6031 (define-public python2-wrapt
6032 (package-with-python2 python-wrapt))
6034 (define-public python-xlrd
6036 (name "python-xlrd")
6040 (uri (pypi-uri "xlrd" version))
6043 "0s8hjiz01vbhy85xalrz0qlsmd9ypf36zjqrf97hh984spapvy0g"))))
6044 (build-system python-build-system)
6047 (modify-phases %standard-phases
6048 ;; Current test in setup.py does not work as of 1.0.0, so use nose to
6049 ;; run tests instead for now.
6050 (replace 'check (lambda _ (zero? (system* "nosetests")))))))
6051 (native-inputs `(("python-nose" ,python-nose)))
6052 (home-page "http://www.python-excel.org/")
6053 (synopsis "Library for extracting data from Excel files")
6054 (description "This packages provides a library to extract data from
6055 spreadsheets using Microsoft Excel proprietary file formats @samp{.xls} and
6056 @samp{.xlsx} (versions 2.0 onwards). It has support for Excel dates and is
6057 Unicode-aware. It is not intended as an end-user tool.")
6058 (license license:bsd-3)))
6060 (define-public python2-xlrd
6061 (package-with-python2 python-xlrd))
6063 (define-public python-prettytable
6065 (name "python-prettytable")
6071 "https://pypi.python.org/packages/source/P/PrettyTable/"
6072 "prettytable-" version ".tar.bz2"))
6075 "0diwsicwmiq2cpzpxri7cyl5fmsvicafw6nfqf6p6p322dji2g45"))))
6076 (build-system python-build-system)
6077 (home-page "http://code.google.com/p/prettytable/")
6078 (synopsis "Display tabular data in an ASCII table format")
6080 "A library designed to represent tabular data in visually appealing ASCII
6081 tables. PrettyTable allows for selection of which columns are to be printed,
6082 independent alignment of columns (left or right justified or centred) and
6083 printing of sub-tables by specifying a row range.")
6084 (license license:bsd-3)))
6086 (define-public python2-prettytable
6087 (package-with-python2 python-prettytable))
6089 (define-public python-tables
6091 (name "python-tables")
6096 (uri (pypi-uri "tables" version))
6099 "117s6w7s3yxafpmf3zz3svana7xfrsviw01va1xp7h8ylx8v6r1m"))
6100 (modules '((guix build utils)))
6103 ;; Remove pre-compiled .pyc files from source.
6104 (for-each delete-file-recursively
6105 (find-files "." "__pycache__" #:directories? #t))
6106 (for-each delete-file (find-files "." "\\.pyc$"))
6108 (build-system python-build-system)
6110 `(;; FIXME: python-build-system does not pass configure-flags to "build"
6111 ;; or "check", so we must override the build and check phases.
6113 (modify-phases %standard-phases
6114 (add-after 'unpack 'use-gcc
6116 (substitute* "setup.py"
6117 (("compiler = new_compiler\\(\\)" line)
6119 "\ncompiler.set_executables(compiler='gcc',"
6120 "compiler_so='gcc',"
6122 "linker_so='gcc -shared')")))
6125 (lambda* (#:key inputs #:allow-other-keys)
6126 (zero? (system* "python" "setup.py" "build"
6127 (string-append "--hdf5="
6128 (assoc-ref inputs "hdf5"))))))
6130 (lambda* (#:key inputs #:allow-other-keys)
6131 (zero? (system* "python" "setup.py" "check"
6132 (string-append "--hdf5="
6133 (assoc-ref inputs "hdf5")))))))))
6135 `(("python-numexpr" ,python-numexpr)
6136 ("python-numpy" ,python-numpy)))
6138 `(("python-cython" ,python-cython)
6139 ("pkg-config" ,pkg-config)))
6144 (home-page "http://www.pytables.org/")
6145 (synopsis "Hierarchical datasets for Python")
6146 (description "PyTables is a package for managing hierarchical datasets and
6147 designed to efficiently cope with extremely large amounts of data.")
6148 (license license:bsd-3)))
6150 (define-public python2-tables
6151 (package-with-python2 python-tables))
6153 (define-public python-pyasn1
6155 (name "python-pyasn1")
6160 (uri (pypi-uri "pyasn1" version))
6163 "1b86yx23c1x74clai05a5ma8c8nfmhlx3j1mxq0ff657i2ylx33k"))))
6164 (build-system python-build-system)
6165 (home-page "http://pyasn1.sourceforge.net/")
6166 (synopsis "ASN.1 types and codecs")
6168 "This is an implementation of ASN.1 types and codecs in Python. It is
6169 suitable for a wide range of protocols based on the ASN.1 specification.")
6170 (license license:bsd-2)))
6172 (define-public python2-pyasn1
6173 (package-with-python2 python-pyasn1))
6175 (define-public python-pyasn1-modules
6177 (name "python-pyasn1-modules")
6182 (uri (pypi-uri "pyasn1-modules" version))
6185 "0drqgw81xd3fxdlg89kgd79zzrabvfncvkbybi2wr6w2y4s1jmhh"))))
6186 (build-system python-build-system)
6188 `(("python-pyasn1" ,python-pyasn1)))
6189 (home-page "https://sourceforge.net/projects/pyasn1/")
6190 (synopsis "ASN.1 codec implementations")
6192 "Pyasn1-modules is a collection of Python modules providing ASN.1 types and
6193 implementations of ASN.1-based codecs and protocols.")
6194 (license license:bsd-3)))
6196 (define-public python2-pyasn1-modules
6197 (package-with-python2 python-pyasn1-modules))
6199 (define-public python-ipaddress
6201 (name "python-ipaddress")
6205 (uri (pypi-uri "ipaddress" version))
6208 "10agaa1cys1bk1ycpl2w8lky9vjx8h1xh1z29mg0niqx0638c390"))))
6209 (build-system python-build-system)
6210 (home-page "https://github.com/phihag/ipaddress")
6211 (synopsis "IP address manipulation library")
6213 "This package provides a fast, lightweight IPv4/IPv6 manipulation library
6214 in Python. This library is used to create, poke at, and manipulate IPv4 and
6215 IPv6 addresses and networks. This is a port of the Python 3.3 ipaddress
6216 module to older versions of Python.")
6217 (license license:psfl)))
6219 (define-public python2-ipaddress
6220 (package-with-python2 python-ipaddress))
6222 (define-public python2-ipaddr
6224 (name "python2-ipaddr")
6229 (uri (pypi-uri "ipaddr" version))
6231 (base32 "1dwq3ngsapjc93fw61rp17fvzggmab5x1drjzvd4y4q0i255nm8v"))))
6232 (build-system python-build-system)
6234 `(#:python ,python-2 ;version 2 only
6236 (modify-phases %standard-phases
6239 (zero? (system* "python" "ipaddr_test.py")))))))
6240 (home-page "https://github.com/google/ipaddr-py")
6241 (synopsis "IP address manipulation library")
6243 "Ipaddr is a Python@tie{}2 library for creating and manupilating IPv4 and
6244 IPv6 addresses and networks.
6246 For new implementations you may prefer to use the standard module
6247 @code{ipaddress}, which was introduced in Python 3.3 and backported to older
6248 versions of Python.")
6249 (license license:asl2.0)))
6251 (define-public python-idna
6253 (name "python-idna")
6258 (uri (pypi-uri "idna" version))
6261 "13qaab6d0s15gknz8v3zbcfmbj6v86hn9pjxgkdf62ch13imssic"))))
6262 (build-system python-build-system)
6263 (home-page "https://github.com/kjd/idna")
6264 (synopsis "Internationalized domain names in applications")
6266 "This is a library to support the Internationalised Domain Names in
6267 Applications (IDNA) protocol as specified in RFC 5891. This version of the
6268 protocol is often referred to as “IDNA2008” and can produce different results
6269 from the earlier standard from 2003. The library is also intended to act as a
6270 suitable drop-in replacement for the “encodings.idna” module that comes with
6271 the Python standard library but currently only supports the older 2003
6273 (license license:bsd-4)))
6275 (define-public python2-idna
6276 (package-with-python2 python-idna))
6278 (define-public python-pretend
6280 (name "python-pretend")
6285 (uri (string-append "https://pypi.python.org/packages/source/p/"
6286 "pretend/pretend-" version ".tar.gz"))
6289 "0r5r7ygz9m6d2bklflbl84cqhjkc2q12xgis8268ygjh30g2q3wk"))))
6290 (build-system python-build-system)
6291 (home-page "https://github.com/alex/pretend")
6292 (synopsis "Library for stubbing in Python")
6294 "Pretend is a library to make stubbing with Python easier. Stubbing is a
6295 technique for writing tests. You may hear the term mixed up with mocks,
6296 fakes, or doubles. Basically, a stub is an object that returns pre-canned
6297 responses, rather than doing any computation.")
6298 (license license:bsd-3)))
6300 (define-public python2-pretend
6301 (package-with-python2 python-pretend))
6303 (define-public python-pip
6310 (uri (pypi-uri "pip" version))
6313 "03clr9c1dih5n9c00c592zzvf6r1ffimywkaq9agcqdllzhl7wh9"))))
6314 (build-system python-build-system)
6316 '(#:tests? #f)) ; there are no tests in the pypi archive.
6317 (home-page "https://pip.pypa.io/")
6318 (synopsis "Package manager for Python software")
6320 "Pip is a package manager for Python software, that finds packages on the
6321 Python Package Index (PyPI).")
6322 (license license:expat)))
6324 (define-public python2-pip
6325 (package-with-python2 python-pip))
6327 (define-public python-tlsh
6329 (name "python-tlsh")
6331 (home-page "https://github.com/trendmicro/tlsh")
6334 (uri (string-append "https://github.com/trendmicro/tlsh/archive/v"
6338 "00bhzjqrlh7v538kbkbn8lgx976j1138al3sdhklaizqjvpwyk4r"))
6339 (file-name (string-append name "-" version ".tar.gz"))))
6340 (build-system cmake-build-system)
6342 '(#:out-of-source? #f
6343 #:phases (modify-phases %standard-phases
6346 (lambda* (#:key outputs #:allow-other-keys)
6347 ;; Build and install the Python bindings. The underlying
6348 ;; C++ library is apparently not meant to be installed.
6349 (let ((out (assoc-ref outputs "out")))
6350 (with-directory-excursion "py_ext"
6351 (and (system* "python" "setup.py" "build")
6352 (system* "python" "setup.py" "install"
6353 (string-append "--prefix=" out))))))))))
6354 (inputs `(("python" ,python-wrapper))) ;for the bindings
6355 (synopsis "Fuzzy matching library for Python")
6357 "Trend Micro Locality Sensitive Hash (TLSH) is a fuzzy matching library.
6358 Given a byte stream with a minimum length of 256 bytes, TLSH generates a hash
6359 value which can be used for similarity comparisons. Similar objects have
6360 similar hash values, which allows for the detection of similar objects by
6361 comparing their hash values. The byte stream should have a sufficient amount
6362 of complexity; for example, a byte stream of identical bytes will not generate
6364 (license license:asl2.0)))
6366 (define-public python2-tlsh
6368 (inherit python-tlsh)
6369 (name "python2-tlsh")
6370 (inputs `(("python" ,python-2)))))
6372 (define-public python-termcolor
6374 (name "python-termcolor")
6379 (uri (pypi-uri "termcolor" version))
6382 "0fv1vq14rpqwgazxg4981904lfyp84mnammw7y046491cv76jv8x"))))
6383 (build-system python-build-system)
6385 ;; There are no tests.
6387 (home-page "https://pypi.python.org/pypi/termcolor")
6388 (synopsis "ANSII Color formatting for terminal output")
6390 "This package provides ANSII Color formatting for output in terminals.")
6391 (license license:expat)))
6393 (define-public python2-termcolor
6394 (package-with-python2 python-termcolor))
6396 (define-public python-libarchive-c
6398 (name "python-libarchive-c")
6402 (uri (pypi-uri "libarchive-c" version))
6405 "0z4r7v3dhd6b3120mav05ff08srih176r2rg5k8kn7mjd9pslm2x"))))
6406 (build-system python-build-system)
6408 '(#:phases (modify-phases %standard-phases
6410 'build 'reference-libarchive
6411 (lambda* (#:key inputs #:allow-other-keys)
6412 ;; Retain the absolute file name of libarchive.so.
6413 (let ((libarchive (assoc-ref inputs "libarchive")))
6414 (substitute* "libarchive/ffi.py"
6415 (("find_library\\('archive'\\)")
6416 (string-append "'" libarchive
6417 "/lib/libarchive.so'")))))))))
6419 `(("libarchive" ,libarchive)))
6420 (home-page "https://github.com/Changaco/python-libarchive-c")
6421 (synopsis "Python interface to libarchive")
6423 "This package provides Python bindings to libarchive, a C library to
6424 access possibly compressed archives in many different formats. It uses
6425 Python's @code{ctypes} foreign function interface (FFI).")
6426 (license license:lgpl2.0+)))
6428 (define-public python2-libarchive-c
6429 (package-with-python2 python-libarchive-c))
6431 (define-public python-file
6434 (name "python-file")
6435 (build-system python-build-system)
6437 '(#:tests? #f ;no tests
6438 #:configure-flags '("--single-version-externally-managed" "--root=/")
6439 #:phases (modify-phases %standard-phases
6440 (add-before 'build 'change-directory
6444 (add-before 'build 'set-library-file-name
6445 (lambda* (#:key inputs #:allow-other-keys)
6446 (let ((file (assoc-ref inputs "file")))
6447 (substitute* "magic.py"
6448 (("find_library\\('magic'\\)")
6449 (string-append "'" file "/lib/libmagic.so'")))
6451 (inputs `(("file" ,file)))
6452 (self-native-input? #f)
6453 (synopsis "Python bindings to the libmagic file type guesser. Note that
6454 this module and the python-magic module both provide a \"magic.py\" file;
6455 these two modules, which are different and were developed separately, both
6456 serve the same purpose: provide Python bindings for libmagic.")))
6458 (define-public python2-file
6459 (package-with-python2 python-file))
6461 (define-public python-debian
6463 (name "python-debian")
6468 (uri (pypi-uri name version))
6471 "0i15f0xzx679sd0ldq2sls9pnnps9fv6vhqvnv9dzf4qhma42i0y"))))
6472 (build-system python-build-system)
6474 `(("python-six" ,python-six)))
6475 (home-page "http://packages.debian.org/sid/python-debian")
6476 (synopsis "Debian package related modules")
6478 ;; XXX: Use @enumerate instead of @itemize to work around
6479 ;; <http://bugs.gnu.org/21772>.
6480 "This package provides Python modules that abstract many formats of
6481 Debian-related files, such as:
6484 @item Debtags information;
6485 @item @file{debian/changelog} files;
6486 @item packages files, pdiffs;
6487 @item control files of single or multiple RFC822-style paragraphs---e.g.
6488 @file{debian/control}, @file{.changes}, @file{.dsc};
6489 @item Raw @file{.deb} and @file{.ar} files, with (read-only) access to
6490 contained files and meta-information.
6493 ;; Modules are either GPLv2+ or GPLv3+.
6494 (license license:gpl3+)))
6496 (define-public python2-debian
6497 (package-with-python2 python-debian))
6499 (define-public python-nbformat
6501 (name "python-nbformat")
6506 (uri (pypi-uri "nbformat" version))
6509 "12s7j4qja8b5bs1kyw5dzmrqbjxxj8wk52cyasbiqbv7fblcrssz"))))
6510 (build-system python-build-system)
6511 (arguments `(#:tests? #f)) ; no test target
6513 `(("python-ipython-genutils" ,python-ipython-genutils)
6514 ("python-jsonschema" ,python-jsonschema)
6515 ("python-jupyter-core" ,python-jupyter-core)
6516 ("python-traitlets" ,python-traitlets)))
6517 (home-page "http://jupyter.org")
6518 (synopsis "Jupyter Notebook format")
6519 (description "This package provides the reference implementation of the
6520 Jupyter Notebook format and Python APIs for working with notebooks.")
6521 (license license:bsd-3)))
6523 (define-public python2-nbformat
6524 (package-with-python2 python-nbformat))
6526 (define-public python-bleach
6528 (name "python-bleach")
6533 (uri (pypi-uri "bleach" version))
6536 "0jvg3jxrvnx7xmm9gj262v60ib452xlnwlb0navyp7jsvcd0d4qj"))))
6537 (build-system python-build-system)
6539 `(("python-html5lib" ,python-html5lib-0.9)
6540 ("python-six" ,python-six)))
6542 `(("python-nose" ,python-nose)))
6543 (home-page "https://github.com/jsocol/bleach")
6544 (synopsis "Whitelist-based HTML-sanitizing tool")
6545 (description "Bleach is an easy whitelist-based HTML-sanitizing tool.")
6546 (license license:asl2.0)))
6548 (define-public python2-bleach
6549 (package-with-python2 python-bleach))
6551 (define-public python-entrypoints
6553 (name "python-entrypoints")
6558 (uri (string-append "https://github.com/takluyver/entrypoints/archive/"
6560 (file-name (string-append name "-" version ".tar.gz"))
6563 "0azqlkh3j0za080lsf5crnhaxx3c93k9dpv5ihkhf5cppgw5sjz5"))))
6564 (build-system python-build-system)
6565 ;; The package does not come with a setup.py file, so we have to generate
6570 (modify-phases %standard-phases
6571 (add-after 'unpack 'create-setup.py
6573 (call-with-output-file "setup.py"
6576 from setuptools import setup
6577 setup(name='entrypoints', version='~a', py_modules=['entrypoints'])
6579 (home-page "https://github.com/takluyver/entrypoints")
6580 (synopsis "Discover and load entry points from installed Python packages")
6581 (description "Entry points are a way for Python packages to advertise
6582 objects with some common interface. The most common examples are
6583 @code{console_scripts} entry points, which define shell commands by
6584 identifying a Python function to run. The @code{entrypoints} module contains
6585 functions to find and load entry points.")
6586 (license license:expat)))
6588 (define-public python2-entrypoints
6589 (package-with-python2 python-entrypoints))
6591 (define-public python-nbconvert
6593 (name "python-nbconvert")
6598 (uri (pypi-uri "nbconvert" version))
6601 "0brclbb18l4nmd5qy3dl9wn05rjdh1fz4rmzdlfqacj12rcdvdgp"))))
6602 (build-system python-build-system)
6604 `(;; The "bdist_egg" target is disabled by default, causing the installation
6606 #:configure-flags (list "bdist_egg")
6607 ;; FIXME: 5 failures, 40 errors.
6610 ;; (modify-phases %standard-phases
6613 ;; (zero? (system* "py.test" "-v")))))
6615 `(("python-pytest" ,python-pytest)))
6617 `(("python-bleach" ,python-bleach)
6618 ("python-entrypoints" ,python-entrypoints)
6619 ("python-jinja2" ,python-jinja2)
6620 ("python-jupyter-core" ,python-jupyter-core)
6621 ("python-mistune" ,python-mistune)
6622 ("python-nbformat" ,python-nbformat)
6623 ("python-pygments" ,python-pygments)
6624 ("python-traitlets" ,python-traitlets)))
6625 (home-page "http://jupyter.org")
6626 (synopsis "Converting Jupyter Notebooks")
6627 (description "The @code{nbconvert} tool, @{jupyter nbconvert}, converts
6628 notebooks to various other formats via Jinja templates. It allows you to
6629 convert an @code{.ipynb} notebook file into various static formats including:
6637 @item ReStructured Text (rst)
6638 @item executable script
6640 (license license:bsd-3)))
6642 (define-public python2-nbconvert
6643 (package-with-python2 python-nbconvert))
6645 (define-public python-notebook
6647 (name "python-notebook")
6651 (uri (pypi-uri "notebook" version))
6654 "0laq5c2f21frq6xcdckgq7raqhznbjb0qs0357g612z87wyn1a9r"))))
6655 (build-system python-build-system)
6658 (modify-phases %standard-phases
6661 ;; HOME must be set for tests
6662 (setenv "HOME" "/tmp")
6663 (zero? (system* "nosetests")))))))
6665 `(("python-jupyter-core" ,python-jupyter-core)
6666 ("python-nbformat" ,python-nbformat)
6667 ("python-nbconvert" ,python-nbconvert)
6668 ("python-ipython" ,python-ipython)))
6670 `(("python-nose" ,python-nose)
6671 ("python-sphinx" ,python-sphinx)
6672 ("python-requests" ,python-requests)))
6673 (home-page "http://jupyter.org/")
6674 (synopsis "Web-based notebook environment for interactive computing")
6676 "The Jupyter HTML notebook is a web-based notebook environment for
6677 interactive computing.")
6678 (properties `((python2-variant . ,(delay python2-notebook))))
6679 (license license:bsd-3)))
6681 (define-public python2-notebook
6682 (let ((base (package-with-python2
6683 (strip-python2-variant python-notebook))))
6684 (package (inherit base)
6686 `(("python2-mock" ,python2-mock)
6687 ,@(package-native-inputs base)))
6689 (substitute-keyword-arguments (package-arguments base)
6691 `(modify-phases ,phases
6692 (add-before 'check 'disable-test-case
6693 ;; The test requires network access to localhost. Curiously it
6694 ;; fails with Python 2 only. Simply make the test-case return
6698 "notebook/services/nbconvert/tests/test_nbconvert_api.py"
6699 (("formats = self.nbconvert_api") "return #")))))))))))
6701 (define-public python-widgetsnbextension
6703 (name "python-widgetsnbextension")
6708 (uri (pypi-uri "widgetsnbextension" version))
6711 "0lff2mrwrgsa1mxmwx3phl9xvy0jqfpg6khbmxy53jbq56rwy666"))))
6712 (build-system python-build-system)
6714 `(("python-notebook" ,python-notebook)))
6716 `(("python-certifi" ,python-certifi)
6717 ("python-nose" ,python-nose)))
6718 (home-page "https://ipython.org")
6719 (synopsis "IPython HTML widgets for Jupyter")
6720 (description "This package provides interactive HTML widgets for Jupyter
6722 (license license:bsd-3)))
6724 (define-public python2-widgetsnbextension
6725 (package-with-python2 python-widgetsnbextension))
6727 (define-public python-ipywidgets
6729 (name "python-ipywidgets")
6734 (uri (pypi-uri "ipywidgets" version))
6737 "1lk0qrr5l9a0z7qkkn30hv5832whxwxymf1l576fmmad0n7hkxms"))))
6738 (build-system python-build-system)
6739 ;; FIXME: it's not clear how to run the tests.
6740 (arguments `(#:tests? #f))
6742 `(("python-ipykernel" ,python-ipykernel)
6743 ("python-ipython" ,python-ipython)
6744 ("python-traitlets" ,python-traitlets)
6745 ("python-widgetsnbextension" ,python-widgetsnbextension)))
6746 (home-page "https://ipython.org")
6747 (synopsis "IPython HTML widgets for Jupyter")
6748 (description "Ipywidgets are interactive HTML widgets for Jupyter
6749 notebooks and the IPython kernel. Notebooks come alive when interactive
6750 widgets are used. Users gain control of their data and can visualize changes
6752 (license license:bsd-3)))
6754 (define-public python2-ipywidgets
6755 (package-with-python2 python-ipywidgets))
6757 (define-public python-jupyter-console
6759 (name "python-jupyter-console")
6764 (uri (pypi-uri "jupyter_console" version))
6767 "04acmkwsi99rcg3vb54c6n492zv35s92h2ahabc0w6wj976cipvx"))))
6768 (build-system python-build-system)
6769 ;; FIXME: it's not clear how to run the tests.
6770 (arguments `(#:tests? #f))
6772 `(("python-ipykernel" ,python-ipykernel)
6773 ("python-ipython" ,python-ipython)
6774 ("python-jupyter-client" ,python-jupyter-client)
6775 ("python-prompt-toolkit" ,python-prompt-toolkit)
6776 ("python-pygments" ,python-pygments)))
6777 (home-page "https://jupyter.org")
6778 (synopsis "Jupyter terminal console")
6779 (description "This package provides a terminal-based console frontend for
6780 Jupyter kernels. It also allows for console-based interaction with non-Python
6781 Jupyter kernels such as IJulia and IRKernel.")
6782 (license license:bsd-3)))
6784 (define-public python2-jupyter-console
6785 (package-with-python2 python-jupyter-console))
6787 ;; The python-ipython and python-jupyter-console require each other. To get
6788 ;; the functionality in both packages working, strip down the
6789 ;; python-jupyter-console package when using it as an input to python-ipython.
6790 (define python-jupyter-console-minimal
6792 (inherit python-jupyter-console)
6793 (name "python-jupyter-console-minimal")
6795 (substitute-keyword-arguments
6796 (package-arguments python-jupyter-console)
6798 `(modify-phases ,phases
6799 (add-after 'install 'delete-bin
6800 (lambda* (#:key outputs #:allow-other-keys)
6801 ;; Delete the bin files, to avoid conflicts in profiles
6802 ;; where python-ipython and python-jupyter-console are
6804 (delete-file-recursively
6806 (assoc-ref outputs "out") "/bin"))))))))
6807 ;; Remove the python-ipython propagated input, to avoid the cycle
6811 (package-propagated-inputs python-jupyter-console)))))
6813 (define-public jupyter
6820 (uri (pypi-uri "jupyter" version))
6823 "0pwf3pminkzyzgx5kcplvvbvwrrzd3baa7lmh96f647k30rlpp6r"))))
6824 (build-system python-build-system)
6825 ;; FIXME: it's not clear how to run the tests.
6826 (arguments `(#:tests? #f))
6828 `(("python-ipykernel" ,python-ipykernel)
6829 ("python-ipywidgets" ,python-ipywidgets)
6830 ("python-jupyter-console" ,python-jupyter-console)
6831 ("python-nbconvert" ,python-nbconvert)
6832 ("python-notebook" ,python-notebook)))
6833 (home-page "http://jupyter.org")
6834 (synopsis "Web application for interactive documents")
6836 "The Jupyter Notebook is a web application that allows you to create and
6837 share documents that contain live code, equations, visualizations and
6838 explanatory text. Uses include: data cleaning and transformation, numerical
6839 simulation, statistical modeling, machine learning and much more.")
6840 (license license:bsd-3)))
6842 (define-public python-chardet
6844 (name "python-chardet")
6849 (uri (pypi-uri "chardet" version))
6852 "1bpalpia6r5x1kknbk11p1fzph56fmmnp405ds8icksd3knr5aw4"))))
6854 `(("python-hypothesis" ,python-hypothesis)
6855 ("python-pytest" ,python-pytest)
6856 ("python-pytest-runner" ,python-pytest-runner)))
6857 (build-system python-build-system)
6858 (home-page "https://github.com/chardet/chardet")
6859 (synopsis "Universal encoding detector for Python 2 and 3")
6861 "This package provides @code{chardet}, a Python module that can
6862 automatically detect a wide range of file encodings.")
6863 (license license:lgpl2.1+)))
6865 (define-public python2-chardet
6866 (package-with-python2 python-chardet))
6868 (define-public python-docopt
6870 (name "python-docopt")
6875 ;; The release on PyPI does not include tests.
6877 "https://github.com/docopt/docopt/archive/"
6879 (file-name (string-append name "-" version ".tar.gz"))
6882 "16bf890xbdz3m30rsv2qacklh2rdn1zrfspfnwzx9g7vwz8yw4r1"))))
6883 (build-system python-build-system)
6885 `(("python-pytest" ,python-pytest)))
6888 (modify-phases %standard-phases
6890 (lambda _ (zero? (system* "py.test")))))))
6891 (home-page "http://docopt.org")
6892 (synopsis "Command-line interface description language for Python")
6893 (description "This library allows the user to define a command-line
6894 interface from a program's help message rather than specifying it
6895 programatically with command-line parsers like @code{getopt} and
6897 (license license:expat)))
6899 (define-public python2-docopt
6900 (package-with-python2 python-docopt))
6902 (define-public python-pythondialog
6904 (name "python-pythondialog")
6909 (uri (pypi-uri "pythondialog" version))
6912 "1728ghsran47jczn9bhlnkvk5bvqmmbihabgif5h705b84r1272c"))))
6913 (build-system python-build-system)
6916 (modify-phases %standard-phases
6917 (add-after 'unpack 'patch-path
6918 (lambda* (#:key inputs #:allow-other-keys)
6919 (let* ((dialog (assoc-ref inputs "dialog")))
6920 ;; Since this library really wants to grovel the search path, we
6921 ;; must hardcode dialog's store path into it.
6922 (substitute* "dialog.py"
6923 (("os.getenv\\(\"PATH\", \":/bin:/usr/bin\"\\)")
6924 (string-append "os.getenv(\"PATH\") + \":" dialog "/bin\"")))
6926 #:tests? #f)) ; no test suite
6928 `(("dialog" ,dialog)))
6929 (home-page "http://pythondialog.sourceforge.net/")
6930 (synopsis "Python interface to the UNIX dialog utility")
6931 (description "A Python wrapper for the dialog utility. Its purpose is to
6932 provide an easy to use, pythonic and comprehensive Python interface to dialog.
6933 This allows one to make simple text-mode user interfaces on Unix-like systems")
6934 (license license:lgpl2.1)
6935 (properties `((python2-variant . ,(delay python2-pythondialog))))))
6937 (define-public python2-pythondialog
6938 (let ((base (package-with-python2 (strip-python2-variant python-pythondialog))))
6941 (version (package-version python-pythondialog))
6944 (uri (pypi-uri "python2-pythondialog" version))
6947 "0d8k7lxk50imdyx85lv8j98i4c93a71iwpapnl1506rpkbm9qvd9")))))))
6949 (define-public python-configobj
6951 (name "python-configobj")
6956 "https://pypi.python.org/packages/source/c/configobj/"
6957 "configobj-" version ".tar.gz"))
6960 "00h9rcmws03xvdlfni11yb60bz3kxfvsj6dg6nrpzj71f03nbxd2"))
6961 ;; Patch setup.py so it looks for python-setuptools, which is
6962 ;; required to parse the keyword 'install_requires' in setup.py.
6963 (patches (search-patches "python-configobj-setuptools.patch"))))
6964 (build-system python-build-system)
6966 `(("python-six" ,python-six)))
6967 (synopsis "Config file reading, writing and validation")
6968 (description "ConfigObj is a simple but powerful config file reader and
6969 writer: an ini file round tripper. Its main feature is that it is very easy to
6970 use, with a straightforward programmer’s interface and a simple syntax for
6972 (home-page "https://github.com/DiffSK/configobj")
6973 (license license:bsd-3)))
6975 (define-public python2-configobj
6976 (package-with-python2 python-configobj))
6978 (define-public python-configargparse
6980 (name "python-configargparse")
6985 "https://pypi.io/packages/source/C/ConfigArgParse/"
6986 "ConfigArgParse-" version ".tar.gz"))
6989 "0fgkiqh6r3rbkdq3k8c48m85g52k96686rw3a6jg4lcncrkpvk98"))))
6990 (build-system python-build-system)
6992 `(("python-pyyaml" ,python-pyyaml)))
6995 (modify-phases %standard-phases
6998 ;; Bypass setuptools-shim because one test relies on "setup.py"
6999 ;; being the first argument passed to the python call.
7001 ;; NOTE: Many tests do not run because they rely on Python's
7002 ;; built-in test.test_argparse, but we remove the unit tests from
7003 ;; our Python installation.
7004 (zero? (system* "python" "setup.py" "test")))))))
7005 (synopsis "Replacement for argparse")
7006 (description "A drop-in replacement for argparse that allows options to also
7007 be set via config files and/or environment variables.")
7008 (home-page "https://github.com/bw2/ConfigArgParse")
7009 (license license:expat)))
7011 (define-public python2-configargparse
7012 (package-with-python2 python-configargparse))
7014 (define-public python-contextlib2
7016 (name "python-contextlib2")
7021 (uri (pypi-uri "contextlib2" version))
7024 "0cmp131dlh0d0zvw0aza1zd13glvngzk8lb4avks0hm7yxwdr9am"))))
7025 (build-system python-build-system)
7028 (modify-phases %standard-phases
7032 "python" "test_contextlib2.py" "-v")))))))
7033 (home-page "http://contextlib2.readthedocs.org/")
7034 (synopsis "Tools for decorators and context managers")
7035 (description "This module is primarily a backport of the Python
7036 3.2 contextlib to earlier Python versions. Like contextlib, it
7037 provides utilities for common tasks involving decorators and context
7038 managers. It also contains additional features that are not part of
7039 the standard library.")
7040 (license license:psfl)))
7042 (define-public python2-contextlib2
7043 (package-with-python2 python-contextlib2))
7045 (define-public python-texttable
7047 (name "python-texttable")
7052 (uri (pypi-uri "texttable" version))
7055 "1liiiydgkg37i46a418aw19fyf6z3ds51wdwwpyjbs12x0phhf4a"))))
7056 (build-system python-build-system)
7057 (arguments '(#:tests? #f)) ; no tests
7058 (home-page "https://github.com/foutaise/texttable/")
7059 (synopsis "Python module for creating simple ASCII tables")
7060 (description "Texttable is a Python module for creating simple ASCII
7062 (license license:lgpl2.1+)))
7064 (define-public python2-texttable
7065 (package-with-python2 python-texttable))
7067 (define-public python-atomicwrites
7069 (name "python-atomicwrites")
7073 (uri (pypi-uri "atomicwrites" version))
7076 "11bm90fwm2avvf4f3ib8g925w7jr4m11vcsinn1bi6ns4bm32214"))))
7077 (build-system python-build-system)
7078 (synopsis "Atomic file writes in Python")
7079 (description "Library for atomic file writes using platform dependent tools
7080 for atomic file system operations.")
7081 (home-page "https://github.com/untitaker/python-atomicwrites")
7082 (license license:expat)))
7084 (define-public python2-atomicwrites
7085 (package-with-python2 python-atomicwrites))
7087 (define-public python-click-threading
7089 (name "python-click-threading")
7093 (uri (pypi-uri "click-threading" version))
7096 "1rsxc2fbkxlhwhlmxsdjzq3spn284l6rvjfcz9mbb17ibgdgmc5j"))))
7097 (build-system python-build-system)
7099 `(("python-click" ,python-click)))
7100 (synopsis "Utilities for multithreading in Click")
7101 (description "This package provides utilities for multithreading in Click
7103 (home-page "https://github.com/click-contrib/click-threading")
7104 (license license:expat)))
7106 (define-public python-click-log
7108 (name "python-click-log")
7112 (uri (pypi-uri "click-log" version))
7115 "1r1x85023cslb2pwldd089jjk573mk3w78cnashs77wrx7yz8fj9"))))
7116 (build-system python-build-system)
7118 `(("python-click" ,python-click)))
7119 (synopsis "Logging for click applications")
7120 (description "This package provides a Python library for logging Click
7122 (home-page "https://github.com/click-contrib/click-log")
7123 (license license:expat)))
7125 (define-public python-apipkg
7127 (name "python-apipkg")
7131 (uri (pypi-uri "apipkg" version))
7134 "1iks5701qnp3dlr3q1d9qm68y2plp2m029irhpz92a44psfkjf1f"))))
7135 (build-system python-build-system)
7137 `(("python-pytest" ,python-pytest)))
7138 (synopsis "Namespace control and lazy-import mechanism")
7139 (description "With apipkg you can control the exported namespace of a Python
7140 package and greatly reduce the number of imports for your users. It is a small
7141 pure Python module that works on virtually all Python versions.")
7142 (home-page "https://bitbucket.org/hpk42/apipkg")
7143 (license license:expat)))
7145 (define-public python2-apipkg
7146 (package-with-python2 python-apipkg))
7148 (define-public python-execnet
7150 (name "python-execnet")
7154 (uri (pypi-uri "execnet" version))
7157 "1rpk1vyclhg911p3hql0m0nrpq7q7mysxnaaw6vs29cpa6kx8vgn"))))
7158 (build-system python-build-system)
7160 `(;; 2 failed, 275 passed, 670 skipped, 4 xfailed
7161 ;; The two test failures are caused by the lack of an `ssh` executable.
7162 ;; The test suite can be run with pytest after the 'install' phase.
7165 `(("python-pytest" ,python-pytest)
7166 ("python-setuptools-scm" ,python-setuptools-scm)))
7168 `(("python-apipkg" ,python-apipkg)))
7169 (synopsis "Rapid multi-Python deployment")
7170 (description "Execnet provides a share-nothing model with
7171 channel-send/receive communication for distributing execution across many
7172 Python interpreters across version, platform and network barriers. It has a
7173 minimal and fast API targeting the following uses:
7175 @item distribute tasks to (many) local or remote CPUs
7176 @item write and deploy hybrid multi-process applications
7177 @item write scripts to administer multiple environments
7179 (home-page "http://codespeak.net/execnet/")
7180 (license license:expat)))
7182 (define-public python2-execnet
7183 (package-with-python2 python-execnet))
7185 (define-public python-icalendar
7187 (name "python-icalendar")
7191 (uri (pypi-uri "icalendar" version))
7194 "139y79y6ijl39m5bj771r43vpah9s4ly7d1k76la6hrx7l144ak8"))))
7195 (build-system python-build-system)
7197 `(("python-dateutil" ,python-dateutil)
7198 ("python-pytz" ,python-pytz)))
7199 (synopsis "Python library for parsing iCalendar files")
7200 (description "The icalendar package is a parser/generator of iCalendar
7201 files for use with Python.")
7202 (home-page "https://github.com/collective/icalendar")
7203 (license license:bsd-2)))
7205 (define-public python-sphinxcontrib-newsfeed
7207 (name "python-sphinxcontrib-newsfeed")
7211 (uri (pypi-uri "sphinxcontrib-newsfeed" version))
7214 "1d7gam3mn8v4in4p16yn3v10vps7nnaz6ilw99j4klij39dqd37p"))))
7215 (arguments '(#:tests? #f)) ; No tests.
7216 (build-system python-build-system)
7218 `(("python-sphinx" ,python-sphinx)))
7219 (synopsis "News Feed extension for Sphinx")
7220 (description "Sphinxcontrib-newsfeed is an extension for adding a simple
7221 Blog, News or Announcements section to a Sphinx website.")
7222 (home-page "https://bitbucket.org/prometheus/sphinxcontrib-newsfeed")
7223 (license license:bsd-2)))
7225 (define-public python-args
7227 (name "python-args")
7231 (uri (pypi-uri "args" version))
7234 "057qzi46h5dmxdqknsbrssn78lmqjlnm624iqdhrnpk26zcbi1d7"))))
7235 (build-system python-build-system)
7236 (home-page "https://github.com/kennethreitz/args")
7237 (synopsis "Command-line argument parser")
7239 "This library provides a Python module to parse command-line arguments.")
7240 (license license:bsd-3)))
7242 (define-public python2-args
7243 (package-with-python2 python-args))
7245 (define-public python-clint
7247 (name "python-clint")
7251 (uri (pypi-uri "clint" version))
7254 "1an5lkkqk1zha47198p42ji3m94xmzx1a03dn7866m87n4r4q8h5"))))
7255 (build-system python-build-system)
7258 (modify-phases %standard-phases
7261 (zero? (system* "py.test" "-v")))))))
7263 `(("python-pytest" ,python-pytest)))
7265 `(("python-args" ,python-args)))
7266 (home-page "https://github.com/kennethreitz/clint")
7267 (synopsis "Command-line interface tools")
7269 "Clint is a Python module filled with a set of tools for developing
7270 command-line applications, including tools for colored and indented
7271 output, progress bar display, and pipes.")
7272 (license license:isc)))
7274 (define-public python2-clint
7275 (package-with-python2 python-clint))
7277 (define-public python-astor
7279 (name "python-astor")
7283 (uri (pypi-uri "astor" version))
7286 "1fdafq5hkis1fxqlmhw0sn44zp2ar46nxhbc22cvwg7hsd8z5gsa"))))
7287 (build-system python-build-system)
7288 (home-page "https://github.com/berkerpeksag/astor")
7289 (synopsis "Read and write Python ASTs")
7291 "Astor is designed to allow easy manipulation of Python source via the
7292 Abstract Syntax Tree.")
7293 (license license:bsd-3)))
7295 (define-public python2-astor
7296 (package-with-python2 python-astor))
7298 (define-public python-rply
7300 (name "python-rply")
7304 (uri (pypi-uri "rply" version))
7307 "0lv428895zxsz43968qx0q9bimwqnfykndz4dpjbq515w2gvzhjh"))))
7308 (build-system python-build-system)
7310 `(("python-appdirs" ,python-appdirs)))
7311 (home-page "https://github.com/alex/rply")
7312 (synopsis "Parser generator for Python")
7314 "This package provides a pure Python based parser generator, that also
7315 works with RPython. It is a more-or-less direct port of David Bazzley's PLY,
7316 with a new public API, and RPython support.")
7317 (license license:bsd-3)))
7319 (define-public python2-rply
7320 (package-with-python2 python-rply))
7322 (define-public python-hy
7328 (uri (pypi-uri "hy" version))
7331 "19sfymaksx9jhksfnb15ahid46mzrhdfzz6yy2craz2qnzvpmky8"))))
7332 (build-system python-build-system)
7335 (modify-phases %standard-phases
7338 ;; Tests require write access to HOME.
7339 (setenv "HOME" "/tmp")
7340 (zero? (system* "nosetests")))))))
7342 `(("python-coverage" ,python-coverage)
7343 ("python-nose" ,python-nose)))
7345 `(("python-astor" ,python-astor)
7346 ("python-clint" ,python-clint)
7347 ("python-rply" ,python-rply)))
7348 (home-page "http://hylang.org/")
7349 (synopsis "Lisp frontend to Python")
7351 "Hy is a dialect of Lisp that's embedded in Python. Since Hy transforms
7352 its Lisp code into the Python Abstract Syntax Tree, you have the whole world of
7353 Python at your fingertips, in Lisp form.")
7354 (license license:expat)))
7356 (define-public python2-hy
7357 (package-with-python2 python-hy))
7359 (define-public python2-functools32
7361 (name "python2-functools32")
7366 (uri (pypi-uri "functools32" version))
7369 "0v8ya0b58x47wp216n1zamimv4iw57cxz3xxhzix52jkw3xks9gn"))))
7370 (build-system python-build-system)
7372 `(#:python ,python-2
7373 #:tests? #f)) ; no test target
7374 (home-page "https://github.com/MiCHiLU/python-functools32")
7376 "Backport of the functools module from Python 3.2.3")
7378 "This package is a backport of the @code{functools} module from Python
7379 3.2.3 for use with older versions of Python and PyPy.")
7380 (license license:expat)))
7382 (define-public python2-subprocess32
7384 (name "python2-subprocess32")
7388 (uri (pypi-uri "subprocess32" version))
7391 "14350dhhlhyz5gqzi3lihn9m6lvskx5mcb20srx1kgsk9i50li8y"))
7393 (search-patches "python2-subprocess32-disable-input-test.patch"))))
7394 (build-system python-build-system)
7396 `(#:python ,python-2
7397 ;; The test suite fails with Python > 2.7.13:
7398 ;; import test.support
7399 ;; ImportError: No module named support
7402 (modify-phases %standard-phases
7403 (add-after 'unpack 'patch-/bin/sh
7405 (substitute* '("subprocess32.py"
7406 "test_subprocess32.py")
7407 (("/bin/sh") (which "sh")))
7409 (home-page "https://github.com/google/python-subprocess32")
7410 (synopsis "Backport of the subprocess module from Python 3.2")
7412 "This is a backport of the @code{subprocess} standard library module
7413 from Python 3.2 and 3.3 for use on Python 2. It includes bugfixes and some
7414 new features. On POSIX systems it is guaranteed to be reliable when used
7415 in threaded applications. It includes timeout support from Python 3.3 but
7416 otherwise matches 3.2’s API.")
7417 (license license:psfl)))
7419 (define-public python2-futures
7421 (name "python2-futures")
7426 (uri (pypi-uri "futures" version))
7429 "1pw1z4329xvlabdpwqa6b7v2fxf7hl64m4cgr22ckbym8m8m4hh5"))))
7430 (build-system python-build-system)
7431 (arguments `(#:python ,python-2))
7432 (home-page "https://github.com/agronholm/pythonfutures")
7434 "Backport of the concurrent.futures package from Python 3.2")
7436 "The concurrent.futures module provides a high-level interface for
7437 asynchronously executing callables. This package backports the
7438 concurrent.futures package from Python 3.2")
7439 (license license:bsd-3)))
7441 (define-public python-promise
7443 (name "python-promise")
7448 (uri (pypi-uri "promise" version))
7451 "1k19ms8l3d5jzjh557rgkxb5sg4mqgfc315rn4hx1z3n8qq6lr3h"))))
7452 (build-system python-build-system)
7453 ;; Tests wants python-futures, which is a python2 only program, and
7454 ;; can't be found by python-promise at test time.
7455 (arguments `(#:tests? #f))
7456 (home-page "https://github.com/syrusakbary/promise")
7457 (synopsis "Promises/A+ implementation for Python")
7459 "Promises/A+ implementation for Python")
7460 (properties `((python2-variant . ,(delay python2-promise))))
7461 (license license:expat)))
7463 (define-public python2-promise
7464 (let ((promise (package-with-python2
7465 (strip-python2-variant python-promise))))
7466 (package (inherit promise)
7467 (arguments (substitute-keyword-arguments (package-arguments promise)
7470 `(("python2-futures" ,python2-futures)
7471 ("python2-pytest" ,python2-pytest)
7472 ,@(package-native-inputs promise))))))
7474 (define-public python-colorama
7476 (name "python-colorama")
7481 (uri (pypi-uri "colorama" version))
7484 "1wd1szk0z3073ghx26ynw43gnc140ibln1safgsis6s6z3s25ss8"))))
7485 (build-system python-build-system)
7486 (synopsis "Colored terminal text rendering for Python")
7487 (description "Colorama is a Python library for rendering colored terminal
7489 (home-page "https://pypi.python.org/pypi/colorama")
7490 (license license:bsd-3)))
7492 (define-public python2-colorama
7493 (package-with-python2 python-colorama))
7495 (define-public python-rsa
7502 (uri (pypi-uri "rsa" version))
7505 "1dcxvszbikgzh99ybdc7jq0zb9wspy2ds8z9mjsqiyv3q884xpr5"))))
7506 (build-system python-build-system)
7508 `(("python-pyasn1" ,python-pyasn1)))
7509 (synopsis "Pure-Python RSA implementation")
7510 (description "Python-RSA is a pure-Python RSA implementation. It supports
7511 encryption and decryption, signing and verifying signatures, and key
7512 generation according to PKCS#1 version 1.5. It can be used as a Python
7513 library as well as on the command line.")
7514 (home-page "https://stuvel.eu/rsa")
7515 (license license:asl2.0)))
7517 (define-public python2-rsa
7518 (package-with-python2 python-rsa))
7520 (define-public python-pluggy
7522 (name "python-pluggy")
7527 (uri (pypi-uri "pluggy" version))
7530 "18qfzfm40bgx672lkg8q9x5hdh76n7vax99aank7vh2nw21wg70m"))))
7531 (build-system python-build-system)
7532 (synopsis "Plugin and hook calling mechanism for Python")
7533 (description "Pluggy is an extraction of the plugin manager as used by
7534 Pytest but stripped of Pytest specific details.")
7535 (home-page "https://pypi.python.org/pypi/pluggy")
7536 (license license:expat)))
7538 (define-public python2-pluggy
7539 (package-with-python2 python-pluggy))
7541 (define-public python-tox
7548 (uri (pypi-uri "tox" version))
7551 "1drp6mwm8wdypjym15ia8lwjxbhcksb9vzxg4ay5dh4ji57by2ny"))))
7552 (build-system python-build-system)
7554 ;; FIXME: Tests require pytest-timeout, which itself requires
7555 ;; pytest>=2.8.0 for installation.
7558 `(("python-pluggy" ,python-pluggy) ; >=0.3.0,<0.4.0
7559 ("python-py" ,python-py)
7560 ("python-virtualenv" ,python-virtualenv)))
7562 `(; FIXME: Missing: ("python-pytest-timeout" ,python-pytest-timeout)
7563 ("python-pytest" ,python-pytest) ; >= 2.3.5
7564 ("python-setuptools-scm" ,python-setuptools-scm)))
7565 (home-page "http://tox.testrun.org/")
7566 (synopsis "Virtualenv-based automation of test activities")
7567 (description "Tox is a generic virtualenv management and test command line
7568 tool. It can be used to check that a package installs correctly with
7569 different Python versions and interpreters, or run tests in each type of
7570 supported environment, or act as a frontend to continuous integration
7572 (license license:expat)))
7574 (define-public python2-tox
7575 (package-with-python2 python-tox))
7577 (define-public python-jmespath
7579 (name "python-jmespath")
7584 (uri (pypi-uri "jmespath" version))
7587 "0r7wc7fsxmlwzxx9j1j7rms06c6xs6d4sysirdhz1jk2mb4x90ba"))))
7588 (build-system python-build-system)
7590 `(("python-nose" ,python-nose)))
7591 (synopsis "JSON Matching Expressions")
7592 (description "JMESPath (pronounced “james path”) is a Python library that
7593 allows one to declaratively specify how to extract elements from a JSON
7595 (home-page "https://github.com/jmespath/jmespath.py")
7596 (license license:expat)))
7598 (define-public python2-jmespath
7599 (package-with-python2 python-jmespath))
7601 (define-public python-botocore
7603 (name "python-botocore")
7608 (uri (pypi-uri "botocore" version))
7611 "12cqpbnz3vfv41mp9admvciw7bc7hz57sjpqs2bxaw9wnfmbw5lg"))))
7612 (build-system python-build-system)
7614 ;; FIXME: Many tests are failing.
7617 `(("python-dateutil" ,python-dateutil)
7618 ("python-docutils" ,python-docutils)
7619 ("python-jmespath" ,python-jmespath)))
7621 `(("python-mock" ,python-mock)
7622 ("python-nose" ,python-nose)
7624 ("python-tox" ,python-tox)
7625 ("python-wheel" ,python-wheel)))
7626 (home-page "https://github.com/boto/botocore")
7627 (synopsis "Low-level interface to AWS")
7628 (description "Botocore is a Python library that provides a low-level
7629 interface to the Amazon Web Services (AWS) API.")
7630 (license license:asl2.0)))
7632 (define-public python2-botocore
7633 (package-with-python2 python-botocore))
7635 (define-public python-xdo
7642 "http://http.debian.net/debian/pool/main/p/python-xdo/"
7643 "python-xdo_" version ".orig.tar.gz"))
7646 "1vqh1n5yy5dhnq312kwrl90fnck4v26is3lq3lxdvcn60vv19da0"))))
7647 (build-system python-build-system)
7650 (modify-phases %standard-phases
7651 (add-before 'install 'patch-libxdo-path
7652 ;; Hardcode the path of dynamically loaded libxdo library.
7653 (lambda* (#:key inputs #:allow-other-keys)
7654 (let ((libxdo (string-append
7655 (assoc-ref inputs "xdotool")
7657 (substitute* "xdo/_xdo.py"
7658 (("find_library\\(\"xdo\"\\)")
7659 (simple-format #f "\"~a\"" libxdo)))
7661 #:tests? #f)) ; no tests provided
7663 `(("python-six" ,python-six)))
7665 `(("xdotool" ,xdotool)
7666 ("libX11" ,libx11)))
7667 (home-page "https://tracker.debian.org/pkg/python-xdo")
7668 (synopsis "Python library for simulating X11 keyboard/mouse input")
7669 (description "Provides bindings to libxdo for manipulating X11 via simulated
7670 input. (Note that this is mostly a legacy library; you may wish to look at
7671 python-xdo for newer bindings.)")
7672 (license license:bsd-3)))
7674 (define-public python2-xdo
7675 (package-with-python2 python-xdo))
7677 (define-public python-mako
7679 (name "python-mako")
7684 (uri (pypi-uri "Mako" version))
7687 "03dyxgjknp4ffsv7vwfd28l5bbpzi0ylp20543wpg3iahyyrwma8"))))
7688 (build-system python-build-system)
7690 `(("python-markupsafe" ,python-markupsafe)))
7692 `(("python-mock" ,python-mock)
7693 ("python-nose" ,python-nose)
7694 ("python-pytest" ,python-pytest)))
7695 (home-page "http://www.makotemplates.org/")
7696 (synopsis "Templating language for Python")
7697 (description "Mako is a templating language for Python that compiles
7698 templates into Python modules.")
7699 (license license:expat)))
7701 (define-public python2-mako
7702 (package-with-python2 python-mako))
7704 (define-public python-waitress
7706 (name "python-waitress")
7711 (uri (pypi-uri "waitress" version))
7712 (patches (search-patches "python-waitress-fix-tests.patch"))
7715 "1a85gyji0kajc3p0s1pwwfm06w4wfxjkvvl4rnrz3h164kbd6g6k"))))
7716 (build-system python-build-system)
7717 (home-page "https://github.com/Pylons/waitress")
7718 (synopsis "Waitress WSGI server")
7719 (description "Waitress is meant to be a production-quality pure-Python WSGI
7720 server with very acceptable performance.")
7721 (license license:zpl2.1)))
7723 (define-public python2-waitress
7724 (package-with-python2 python-waitress))
7726 (define-public python-pyquery
7728 (name "python-pyquery")
7733 (uri (pypi-uri "pyquery" version))
7736 "1xia20wm0vx5dk85kcwgh13bylz8qh47ffjxssd2586r60xi783a"))))
7737 (build-system python-build-system)
7739 `(("python-webob" ,python-webob)
7740 ("python-webtest" ,python-webtest)))
7742 `(("python-lxml" ,python-lxml)
7743 ("python-cssselect" ,python-cssselect)))
7744 (home-page "https://github.com/gawel/pyquery")
7745 (synopsis "Make jQuery-like queries on xml documents")
7746 (description "pyquery allows you to make jQuery queries on xml documents.
7747 The API is as much as possible the similar to jQuery. pyquery uses lxml for
7748 fast xml and html manipulation.")
7749 (license license:bsd-3)))
7751 (define-public python2-pyquery
7752 (package-with-python2 python-pyquery))
7754 (define-public python-anyjson
7756 (name "python-anyjson")
7761 (uri (pypi-uri "anyjson" version))
7764 "1fjph4alvcscsl5d4b6qpv1yh31jy05jxi1l0xff7lws7j32v09p"))))
7765 (build-system python-build-system)
7767 `(;; We could possibly get tests working, but on Python 3 it's not so easy.
7768 ;; Very strangely, 2to3 is run *during setup.py install* (or bdist, or
7769 ;; whatever) so this transformation needs to be done before the tests
7770 ;; can be run. Maybe we could add a build step to transform beforehand
7771 ;; but it could be annoying/difficult.
7772 ;; We can enable tests for the Python 2 version, though, and do below.
7774 (home-page "https://bitbucket.org/runeh/anyjson/")
7776 "Wraps best available JSON implementation in a common interface")
7778 "Anyjson loads whichever is the fastest JSON module installed
7779 and provides a uniform API regardless of which JSON implementation is used.")
7780 (license license:bsd-3)
7781 (properties `((python2-variant . ,(delay python2-anyjson))))))
7783 (define-public python2-anyjson
7784 (let ((anyjson (package-with-python2
7785 (strip-python2-variant python-anyjson))))
7788 (arguments `(;; Unlike the python 3 variant, we do run tests. See above!
7790 ,@(package-arguments anyjson)))
7791 (native-inputs `(("python2-nose" ,python2-nose))))))
7793 (define-public python-amqp
7795 (name "python-amqp")
7800 (uri (pypi-uri "amqp" version))
7803 "06n6q0kxhjnbfz3vn8x9yz09lwmn1xi9d6wxp31h5jbks0b4vsid"))))
7804 (build-system python-build-system)
7806 `(("python-nose" ,python-nose)
7807 ("python-mock" ,python-mock)))
7808 (home-page "https://github.com/celery/py-amqp")
7810 "Low-level AMQP client for Python (fork of amqplib)")
7812 "This is a fork of amqplib which was originally written by Barry Pederson.
7813 It is maintained by the Celery project, and used by kombu as a pure python
7814 alternative when librabbitmq is not available.")
7815 (license license:lgpl2.1+)
7816 (properties `((python2-variant . ,(delay python2-amqp))))))
7818 (define-public python2-amqp
7819 (let ((amqp (package-with-python2
7820 (strip-python2-variant python-amqp))))
7823 (arguments `(;; Tries to run coverage tests with nose-cover3, which seems
7824 ;; unmaintained. Weirdly, does not do this on the python 3
7827 ,@(package-arguments amqp))))))
7829 (define-public python-txamqp
7831 (name "python-txamqp")
7836 (uri (pypi-uri "txAMQP" version))
7839 "1r43a66dd547mz40ikymm8y3d480cidy560fj81qc0jk4lncgmmr"))))
7840 (build-system python-build-system)
7842 `(("python-six" ,python-six)
7843 ("python-twisted" ,python-twisted)))
7844 (home-page "https://github.com/txamqp/txamqp")
7845 (synopsis "Communicate with AMQP peers and brokers using Twisted")
7847 "This package provides a Python library for communicating with AMQP peers
7848 and brokers using the asynchronous networking framework Twisted. It contains
7849 all the necessary code to connect, send and receive messages to/from an
7850 AMQP-compliant peer or broker (Qpid, OpenAMQ, RabbitMQ) using Twisted. It
7851 also includes support for using Thrift RPC over AMQP in Twisted
7853 (license license:asl2.0)))
7855 (define-public python2-txamqp
7856 (package-with-python2 python-txamqp))
7858 (define-public python-kombu
7860 (name "python-kombu")
7865 (uri (pypi-uri "kombu" version))
7868 "0l16chb314gpq2v7fh94a22c30lcv6w3ylmhsa60bldlcq6a0r70"))))
7869 (build-system python-build-system)
7871 `(("python-mock" ,python-mock)
7872 ("python-nose" ,python-nose)))
7874 `(("python-anyjson" ,python-anyjson)
7875 ("python-amqp" ,python-amqp)
7876 ("python-redis" ,python-redis)))
7877 (home-page "http://kombu.readthedocs.org")
7878 (synopsis "Message passing library for Python")
7879 (description "The aim of Kombu is to make messaging in Python as easy as
7880 possible by providing an idiomatic high-level interface for the AMQ protocol,
7881 and also provide proven and tested solutions to common messaging problems.
7882 AMQP is the Advanced Message Queuing Protocol, an open standard protocol for
7883 message orientation, queuing, routing, reliability and security, for which the
7884 RabbitMQ messaging server is the most popular implementation.")
7885 (license license:bsd-3)
7886 (properties `((python2-variant . ,(delay python2-kombu))))))
7888 (define-public python2-kombu
7889 (let ((kombu (package-with-python2
7890 (strip-python2-variant python-kombu))))
7893 (arguments `(;; FIXME: 'TestTransport.test_del_sync' fails on python2.
7894 ;; It works fine on the python3 variant.
7896 ,@(package-arguments kombu)))
7897 (native-inputs `(("python2-unittest2" ,python2-unittest2)
7898 ,@(package-native-inputs kombu))))))
7900 (define-public python-billiard
7902 (name "python-billiard")
7903 (version "3.3.0.23")
7907 (uri (pypi-uri "billiard" version))
7910 "02wxsc6bhqvzh8j6w758kvgqbnj14l796mvmrcms8fgfamd2lak9"))))
7911 (build-system python-build-system)
7913 `(("python-nose" ,python-nose)))
7914 (home-page "https://github.com/celery/billiard")
7916 "Python multiprocessing fork with improvements and bugfixes")
7918 "Billiard is a fork of the Python 2.7 multiprocessing package. The
7919 multiprocessing package itself is a renamed and updated version of R Oudkerk's
7920 pyprocessing package. This standalone variant is intended to be compatible with
7921 Python 2.4 and 2.5, and will draw its fixes/improvements from python-trunk.")
7922 (license license:bsd-3)
7923 (properties `((python2-variant . ,(delay python2-billiard))))))
7925 (define-public python2-billiard
7926 (let ((billiard (package-with-python2
7927 (strip-python2-variant python-billiard))))
7930 (native-inputs `(("python2-unittest2" ,python2-unittest2)
7931 ("python2-mock" ,python2-mock)
7932 ,@(package-native-inputs billiard))))))
7934 (define-public python-celery
7936 (name "python-celery")
7941 (uri (pypi-uri "celery" version))
7944 "0yh2prhdnx2dgkb67a5drj12hh2zvzx5f611p7mqqg01ydghif4r"))))
7945 (build-system python-build-system)
7948 (modify-phases %standard-phases
7949 ;; These tests break with Python 3.5:
7950 ;; https://github.com/celery/celery/issues/2897#issuecomment-253066295
7954 (system* "nosetests" "--exclude=^test_safe_to_remove.*")))))))
7956 `(("python-nose" ,python-nose)))
7958 `(("python-pytz" ,python-pytz)
7959 ("python-billiard" ,python-billiard)
7960 ("python-kombu" ,python-kombu)))
7961 (home-page "http://celeryproject.org")
7962 (synopsis "Distributed Task Queue")
7963 (description "Celery is an asynchronous task queue/job queue based on
7964 distributed message passing. It is focused on real-time operation, but
7965 supports scheduling as well. The execution units, called tasks, are executed
7966 concurrently on a single or more worker servers using multiprocessing,
7967 Eventlet, or gevent. Tasks can execute asynchronously (in the background) or
7968 synchronously (wait until ready).")
7969 (license license:bsd-3)
7970 (properties `((python2-variant . ,(delay python2-celery))))))
7972 (define-public python2-celery
7973 (let ((celery (package-with-python2
7974 (strip-python2-variant python-celery))))
7977 (native-inputs `(("python2-unittest2" ,python2-unittest2)
7978 ("python2-mock" ,python2-mock)
7979 ,@(package-native-inputs celery))))))
7981 (define-public python-translitcodec
7983 (name "python-translitcodec")
7988 (uri (pypi-uri "translitcodec" version))
7991 "10x6pvblkzky1zhjs8nmx64nb9jdzxad4bxhq4iwv0j4z2aqjnki"))))
7992 (build-system python-build-system)
7994 `(#:tests? #f)) ; no tests provided
7996 "https://github.com/claudep/translitcodec")
7998 "Unicode to 8-bit charset transliteration codec")
8000 "This package contains codecs for transliterating ISO 10646 texts into
8001 best-effort representations using smaller coded character sets (ASCII,
8003 (license license:expat)))
8005 (define-public python2-translitcodec
8006 (package-with-python2 python-translitcodec))
8008 (define-public python-editor
8010 (name "python-editor")
8015 (uri (pypi-uri "python-editor" version))
8018 "1ypnpgvzpkbwsg4rdvy4sy51j28b5xq9v8pnkwxncn07vqz06p7n"))))
8019 (build-system python-build-system)
8021 "https://github.com/fmoo/python-editor")
8023 "Programmatically open an editor, capture the result")
8025 "python-editor is a library that provides the editor module for
8026 programmatically interfacing with your system's $EDITOR.")
8027 (license license:asl2.0)))
8029 (define-public python2-editor
8030 (package-with-python2 python-editor))
8032 (define-public python-sphinxcontrib-programoutput
8034 (name "python-sphinxcontrib-programoutput")
8038 (uri (pypi-uri "sphinxcontrib-programoutput" version))
8041 "153hhnlbx4688zj9wd64819ps5znc2jlyp5crkgzvn5hxgy99vpx"))))
8042 (build-system python-build-system)
8044 ;; FIXME: Many tests are failing and the upstream is gone.
8047 `(("python-sphinx" ,python-sphinx)))
8048 (synopsis "Sphinx extension to include program output")
8049 (description "A Sphinx extension to literally insert the output of arbitrary
8050 commands into documents, helping you to keep your command examples up to date.")
8051 (home-page "https://github.com/lunaryorn/sphinxcontrib-programoutput")
8052 (license license:bsd-2)))
8054 (define-public python2-sphinxcontrib-programoutput
8055 (package-with-python2 python-sphinxcontrib-programoutput))
8057 (define-public python-sphinx-repoze-autointerface
8059 (name "python-sphinx-repoze-autointerface")
8063 (uri (pypi-uri "repoze.sphinx.autointerface" version))
8066 "08ycivzf7bh4a1zcyp31hbyqs1b2c9r26raa3vxjwwmbfqr3iw4f"))))
8067 (build-system python-build-system)
8068 (arguments '(#:tests? #f)) ; No tests.
8070 `(("python-sphinx" ,python-sphinx)
8071 ("python-zope-interface" ,python-zope-interface)))
8072 (synopsis "Auto-generate Sphinx API docs from Zope interfaces")
8073 (description "This package defines an extension for the Sphinx documentation
8074 system. The extension allows generation of API documentation by
8075 introspection of @code{zope.interface} instances in code.")
8076 (home-page "https://github.com/repoze/repoze.sphinx.autointerface")
8077 (license license:repoze)))
8079 (define-public python2-sphinx-repoze-autointerface
8080 (package-with-python2 python-sphinx-repoze-autointerface))
8082 (define-public python-vobject
8084 (name "python-vobject")
8088 (uri (pypi-uri "vobject" version))
8091 "0hqjgf3ay1m5w1c0k00g5yfpdz1zni5qnr5rh9b8fg9hjvhwlmhg"))))
8092 (build-system python-build-system)
8094 '(;; The test suite relies on some non-portable Windows interfaces.
8097 `(("python-dateutil" ,python-dateutil)
8098 ("python-pyicu" ,python-pyicu)))
8099 (synopsis "Parse and generate vCard and vCalendar files")
8100 (description "Vobject is intended to be a full featured Python package for
8101 parsing and generating vCard and vCalendar files. Currently, iCalendar files
8102 are supported and well tested. vCard 3.0 files are supported, and all data
8103 should be imported, but only a few components are understood in a sophisticated
8105 (home-page "http://eventable.github.io/vobject/")
8106 (license license:asl2.0)))
8108 (define-public python2-vobject
8109 (package-with-python2 python-vobject))
8111 (define-public python-munkres
8113 (name "python-munkres")
8117 (uri (pypi-uri "munkres" version))
8120 "0mbspx4zv8id4x6pim6ybsa1xh96qwpbqj7skbqz4c9c9nf1lpqq"))))
8121 (build-system python-build-system)
8123 '(#:tests? #f)) ; no test suite
8124 (home-page "http://software.clapper.org/munkres/")
8125 (synopsis "Implementation of the Munkres algorithm")
8126 (description "The Munkres module provides an implementation of the Munkres
8127 algorithm (also called the Hungarian algorithm or the Kuhn-Munkres algorithm),
8128 useful for solving the Assignment Problem.")
8129 (license license:bsd-3)))
8131 (define-public python2-munkres
8132 (package-with-python2 python-munkres))
8134 (define-public python-whoosh
8136 (name "python-whoosh")
8141 (uri (pypi-uri "Whoosh" version))
8144 "10qsqdjpbc85fykc1vgcs8xwbgn4l2l52c8d83xf1q59pwyn79bw"))))
8145 (build-system python-build-system)
8147 `(("python-pytest" ,python-pytest)))
8148 (home-page "https://bitbucket.org/mchaput/whoosh")
8149 (synopsis "Full text indexing, search, and spell checking library")
8151 "Whoosh is a fast, pure-Python full text indexing, search, and spell
8153 (license license:bsd-2)))
8155 (define-public python2-whoosh
8156 (let ((whoosh (package-with-python2 (strip-python2-variant python-whoosh))))
8157 (package (inherit whoosh)
8159 `(("python2-backport-ssl-match-hostname"
8160 ,python2-backport-ssl-match-hostname)
8161 ,@(package-propagated-inputs whoosh))))))
8163 (define-public python-pathlib
8165 (name "python-pathlib")
8169 (uri (pypi-uri "pathlib" version))
8172 "17zajiw4mjbkkv6ahp3xf025qglkj0805m9s41c45zryzj6p2h39"))))
8173 (build-system python-build-system)
8174 ;; The tests depend on the internal "test" module, which does not provide
8175 ;; a stable interface.
8176 (arguments `(#:tests? #f))
8177 (home-page "https://pathlib.readthedocs.org/")
8178 (synopsis "Object-oriented file system paths")
8179 (description "Pathlib offers a set of classes to handle file system paths.
8180 It offers the following advantages over using string objects:
8183 @item No more cumbersome use of os and os.path functions. Everything can
8184 be done easily through operators, attribute accesses, and method calls.
8185 @item Embodies the semantics of different path types. For example,
8186 comparing Windows paths ignores casing.
8187 @item Well-defined semantics, eliminating any inconsistencies or
8188 ambiguities (forward vs. backward slashes, etc.).
8191 Note: In Python 3.4, pathlib is now part of the standard library. For other
8192 Python versions please consider python-pathlib2 instead, which tracks the
8193 standard library module. This module (python-pathlib) isn't maintained
8195 (license license:expat)))
8197 (define-public python2-pathlib
8198 (package-with-python2 python-pathlib))
8200 (define-public python2-pathlib2
8202 (name "python2-pathlib2")
8206 (uri (pypi-uri "pathlib2" version))
8209 "1cx5gs2v9j2vnzmcrbq5l8fq2mwrr1h6pyf1sjdji2w1bavm09fk"))))
8210 (build-system python-build-system)
8211 ;; We only need the the Python 2 variant, since for Python 3 our minimum
8212 ;; version is 3.4 which already includes this package as part of the
8213 ;; standard library.
8215 `(#:python ,python-2))
8217 `(("python2-scandir" ,python2-scandir)
8218 ("python2-six" ,python2-six)))
8219 (home-page "https://pypi.python.org/pypi/pathlib2/")
8220 (synopsis "Object-oriented file system paths - backport of standard
8222 (description "The goal of pathlib2 is to provide a backport of standard
8223 pathlib module which tracks the standard library module, so all the newest
8224 features of the standard pathlib can be used also on older Python versions.
8226 Pathlib offers a set of classes to handle file system paths. It offers the
8227 following advantages over using string objects:
8230 @item No more cumbersome use of os and os.path functions. Everything can
8231 be done easily through operators, attribute accesses, and method calls.
8232 @item Embodies the semantics of different path types. For example,
8233 comparing Windows paths ignores casing.
8234 @item Well-defined semantics, eliminating any inconsistencies or
8235 ambiguities (forward vs. backward slashes, etc.).
8237 (license license:expat)))
8239 (define-public python-jellyfish
8241 (name "python-jellyfish")
8245 (uri (pypi-uri "jellyfish" version))
8248 "1j9rplb16ba2prjj6mip46z0w9pnhnqpwgiwi0x93vnas14rlyl8"))))
8249 (build-system python-build-system)
8251 `(("python-pytest" ,python-pytest)))
8252 (home-page "https://github.com/jamesturk/jellyfish")
8253 (synopsis "Approximate and phonetic matching of strings")
8254 (description "Jellyfish uses a variety of string comparison and phonetic
8255 encoding algorithms to do fuzzy string matching.")
8256 (license license:bsd-2)
8257 (properties `((python2-variant . ,(delay python2-jellyfish))))))
8259 (define-public python2-jellyfish
8260 (let ((jellyfish (package-with-python2
8261 (strip-python2-variant python-jellyfish))))
8262 (package (inherit jellyfish)
8263 (native-inputs `(("python2-unicodecsv" ,python2-unicodecsv)
8264 ,@(package-native-inputs jellyfish))))))
8266 (define-public python2-unicodecsv
8268 (name "python2-unicodecsv")
8272 ;; The test suite is not included in the PyPi release.
8273 ;; https://github.com/jdunck/python-unicodecsv/issues/19
8274 (uri (string-append "https://github.com/jdunck/python-unicodecsv/"
8275 "archive/" version ".tar.gz"))
8276 (file-name (string-append name "-" version ".tar.gz"))
8279 "087nqanfcyp6mlfbbr5lva5f3w6iz1bybls9xlrb8icmc474wh4w"))))
8280 (build-system python-build-system)
8282 `(;; It supports Python 3, but Python 3 can already do Unicode CSV.
8283 #:python ,python-2))
8285 `(("python2-unittest2" ,python2-unittest2)))
8286 (home-page "https://github.com/jdunck/python-unicodecsv")
8287 (synopsis "Unicode CSV module for Python 2")
8288 (description "Unicodecsv is a drop-in replacement for Python 2.7's CSV
8289 module, adding support for Unicode strings.")
8290 (license license:bsd-2)))
8292 (define-public python-rarfile
8294 (name "python-rarfile")
8298 (uri (pypi-uri "rarfile" version))
8301 "0qfad483kcbga0bn4qmcz953xjk16r52fahiy46zzn56v80y89ra"))))
8302 (build-system python-build-system)
8305 (modify-phases %standard-phases
8307 ;; Many tests fail, but the installation proceeds.
8308 (lambda _ (zero? (system* "make" "-C" "test" "test")))))))
8310 `(("which" ,which))) ; required for tests
8312 `(("libarchive" ,libarchive)))
8313 (home-page "https://github.com/markokr/rarfile")
8314 (synopsis "RAR archive reader for Python")
8315 (description "This is Python module for RAR archive reading. The interface
8316 is made as zipfile like as possible.")
8317 (license license:isc)))
8319 (define-public python2-rarfile
8320 (package-with-python2 python-rarfile))
8322 (define-public python-magic
8324 (name "python-magic")
8329 (uri (pypi-uri "python-magic" version))
8332 "1mgwig9pnzgkf86q9ji9pnc99bngms15lfszq5rgqb9db07mqxpk"))
8333 (file-name (string-append name "-" version "-checkout"))))
8334 (build-system python-build-system)
8336 ;; The tests are unreliable, so don't run them. The tests fail
8337 ;; under Python3 because they were written for Python2 and
8338 ;; contain import statements that do not work in Python3. One of
8339 ;; the tests fails under Python2 because its assertions are
8340 ;; overly stringent; it relies on comparing output strings which
8341 ;; are brittle and can change depending on the version of
8342 ;; libmagic being used and the system on which the test is
8343 ;; running. In my case, under GuixSD 0.10.0, only one test
8344 ;; failed, and it seems to have failed only because the version
8345 ;; of libmagic that is packaged in Guix outputs a slightly
8346 ;; different (but not wrong) string than the one that the test
8349 #:phases (modify-phases %standard-phases
8350 ;; Replace a specific method call with a hard-coded
8351 ;; path to the necessary libmagic.so file in the
8352 ;; store. If we don't do this, then the method call
8353 ;; will fail to find the libmagic.so file, which in
8354 ;; turn will cause any application using
8355 ;; python-magic to fail.
8356 (add-before 'build 'hard-code-path-to-libmagic
8357 (lambda* (#:key inputs #:allow-other-keys)
8358 (let ((file (assoc-ref inputs "file")))
8359 (substitute* "magic.py"
8360 (("ctypes.util.find_library\\('magic'\\)")
8361 (string-append "'" file "/lib/libmagic.so'")))
8363 (add-before 'install 'disable-egg-compression
8365 (let ((port (open-file "setup.cfg" "a")))
8366 (display "\n[easy_install]\nzip_ok = 0\n"
8371 ;; python-magic needs to be able to find libmagic.so.
8374 "https://github.com/ahupp/python-magic")
8376 "File type identification using libmagic")
8378 "This module uses ctypes to access the libmagic file type
8379 identification library. It makes use of the local magic database and
8380 supports both textual and MIME-type output. Note that this module and
8381 the python-file module both provide a \"magic.py\" file; these two
8382 modules, which are different and were developed separately, both serve
8383 the same purpose: to provide Python bindings for libmagic.")
8384 (license license:expat)))
8386 (define-public python2-magic
8387 (package-with-python2 python-magic))
8389 (define-public python2-s3cmd
8391 (name "python2-s3cmd")
8396 (uri (string-append "mirror://sourceforge/s3tools/s3cmd/" version "/"
8397 "s3cmd-" version ".tar.gz"))
8400 "0ki1rzhm5icvi9ry5jswi4b22yqwyj0d2wsqsgilwx6qhi7pjxa6"))))
8401 (build-system python-build-system)
8403 ;; s3cmd is written for python2 only and contains no tests.
8404 `(#:python ,python-2
8407 `(("python2-dateutil" ,python2-dateutil)
8408 ;; The python-file package also provides a magic.py module.
8409 ;; This is an unfortunate state of affairs; however, s3cmd
8410 ;; fails to install if it cannot find specifically the
8411 ;; python-magic package. Thus we include it, instead of using
8412 ;; python-file. Ironically, s3cmd sometimes works better
8413 ;; without libmagic bindings at all:
8414 ;; https://github.com/s3tools/s3cmd/issues/198
8415 ("python2-magic" ,python2-magic)))
8416 (home-page "http://s3tools.org/s3cmd")
8417 (synopsis "Command line tool for S3-compatible storage services")
8419 "S3cmd is a command line tool for uploading, retrieving and managing data
8420 in storage services that are compatible with the Amazon Simple Storage
8421 Service (S3) protocol, including S3 itself. It supports rsync-like backup,
8422 GnuPG encryption, and more. It also supports management of Amazon's
8423 CloudFront content delivery network.")
8424 (license license:gpl2+)))
8426 (define-public python-pkgconfig
8428 (name "python-pkgconfig")
8433 (uri (pypi-uri "pkgconfig" version))
8436 "1pw0kmvc57sjmaxi6c54fqsnihqj6hvhc9y1vaz36axafzqam7bh"))))
8437 (build-system python-build-system)
8439 `(("python-nose" ,python-nose)))
8441 `(("pkg-config" ,pkg-config)))
8443 `(;; Tests fail with "ValueError: _type_ 'v' not supported" on Python 3,
8444 ;; and on Python 2 they need the dl module deprecated since Python 2.6.
8446 ;; Hard-code the path to pkg-config.
8448 (modify-phases %standard-phases
8452 (substitute* "pkgconfig/pkgconfig.py"
8453 (("cmd = 'pkg-config")
8454 (string-append "cmd = '" (which "pkg-config"))))
8456 (home-page "https://github.com/matze/pkgconfig")
8457 (synopsis "Python interface for pkg-config")
8458 (description "This module provides a Python interface to pkg-config. It
8459 can be used to find all pkg-config packages, check if a package exists,
8460 check if a package meets certain version requirements, query CFLAGS and
8461 LDFLAGS and parse the output to build extensions with setup.py.")
8462 (license license:expat)))
8464 (define-public python2-pkgconfig
8465 (package-with-python2 python-pkgconfig))
8467 (define-public python-bz2file
8469 (name "python-bz2file")
8474 (uri (pypi-uri "bz2file" version))
8477 "126s53fkpx04f33a829yqqk8fj4png3qwg4m66cvlmhmwc8zihb4"))))
8478 (build-system python-build-system)
8480 `(#:tests? #f)) ; Tests use deprecated python modules.
8481 (home-page "https://github.com/nvawda/bz2file")
8482 (synopsis "Read and write bzip2-compressed files")
8484 "Bz2file is a Python library for reading and writing bzip2-compressed
8485 files. It contains a drop-in replacement for the I/O interface in the
8486 standard library's @code{bz2} module, including features from the latest
8487 development version of CPython that are not available in older releases.")
8488 (license license:asl2.0)
8489 (properties `((python2-variant . ,(delay python2-bz2file))))))
8491 (define-public python2-bz2file
8492 (let ((base (package-with-python2
8493 (strip-python2-variant python-bz2file))))
8497 `(#:python ,python-2
8499 (modify-phases %standard-phases
8500 ;; 'python setup.py test' does not work as of 0.98.
8501 ;; There is only the one test file, so we run it directly.
8503 (lambda _ (zero? (system* "python"
8504 "test_bz2file.py"))))))))))
8506 (define-public python-future
8508 (name "python-future")
8513 (uri (pypi-uri "future" version))
8516 "1nzy1k4m9966sikp0qka7lirh8sqrsyainyf8rk97db7nwdfv773"))))
8517 (build-system python-build-system)
8518 ;; Many tests connect to the network or are otherwise flawed.
8519 ;; https://github.com/PythonCharmers/python-future/issues/210
8522 (home-page "http://python-future.org")
8523 (synopsis "Single-source support for Python 3 and 2")
8525 "@code{python-future} is the missing compatibility layer between Python 2 and
8526 Python 3. It allows you to use a single, clean Python 3.x-compatible codebase
8527 to support both Python 2 and Python 3 with minimal overhead.")
8528 (license license:expat)))
8530 (define-public python2-future
8531 (package-with-python2 python-future))
8533 (define-public python-cysignals
8535 (name "python-cysignals")
8540 (uri (pypi-uri "cysignals" version ".tar.bz2"))
8543 "14cbyd9znlz6cxy1s3g6v6dv5jj45hn27pywkidd9b1zanaysqc6"))))
8544 (build-system python-build-system)
8546 `(("python-cython" ,python-cython)
8547 ("python-sphinx" ,python-sphinx)))
8549 `(("pari-gp" ,pari-gp)))
8551 `(#:modules ((guix build python-build-system)
8552 ((guix build gnu-build-system) #:prefix gnu:)
8554 ;; FIXME: Tests are executed after installation and currently fail
8555 ;; when not installing into standard locations; the author is working
8559 (modify-phases %standard-phases
8562 (assoc-ref gnu:%standard-phases 'configure)))))
8564 "https://github.com/sagemath/cysignals")
8566 "Handling of interrupts and signals for Cython")
8568 "The cysignals package provides mechanisms to handle interrupts (and
8569 other signals and errors) in Cython code, using two related approaches,
8570 for mixed Cython/Python code or external C libraries and pure Cython code,
8572 (license license:lgpl3+)))
8574 (define-public python2-cysignals
8575 (package-with-python2 python-cysignals))
8577 (define-public python2-shedskin
8579 (name "python2-shedskin")
8584 (uri (string-append "https://github.com/shedskin/shedskin/"
8585 "releases/download/v" version
8586 "/shedskin-" version ".tgz"))
8589 "0nzwrzgw1ga8rw6f0ryq7zr9kkiavd1cqz5hzxkcbicl1dk7kz41"))))
8590 (build-system python-build-system)
8592 `(#:python ,python-2
8593 #:phases (modify-phases %standard-phases
8594 (add-after 'unpack 'fix-resulting-include-libs
8595 (lambda* (#:key inputs #:allow-other-keys)
8596 (let ((libgc (assoc-ref inputs "libgc"))
8597 (pcre (assoc-ref inputs "pcre")))
8598 (substitute* "shedskin/makefile.py"
8599 (("variable == 'CCFLAGS':[ ]*")
8600 (string-append "variable == 'CCFLAGS':\n"
8601 " line += ' -I " pcre "/include"
8602 " -I " libgc "/include'"))
8603 (("variable == 'LFLAGS':[ ]*")
8604 (string-append "variable == 'LFLAGS':\n"
8605 " line += ' -L" pcre "/lib"
8606 " -L " libgc "/lib'")))
8608 (inputs `(("pcre" ,pcre)
8610 (home-page "https://shedskin.github.io/")
8611 (synopsis "Experimental Python-2 to C++ Compiler")
8612 (description (string-append "This is an experimental compiler for a subset of
8613 Python. It generates C++ code and a Makefile."))
8614 (license (list license:gpl3 license:bsd-3 license:expat))))
8616 (define-public python2-rope
8618 (name "python2-rope")
8623 (uri (pypi-uri "rope" version))
8626 "18k5znhpwvrfck3yp0jmhd5j8r0f0s8bk1zh5yhs2cfgmfhbwigb"))))
8628 ;; Rope is currently python-2 only.
8629 ;; https://github.com/python-rope/rope/issues/57
8630 `(#:python ,python-2))
8631 (build-system python-build-system)
8633 `(("python2-unittest2" ,python2-unittest2)))
8634 (home-page "https://github.com/python-rope/rope")
8635 (synopsis "Refactoring library for Python")
8636 (description "Rope is a refactoring library for Python. It facilitates
8637 the renaming, moving and extracting of attributes, functions, modules, fields
8638 and parameters in Python 2 source code. These refactorings can also be applied
8639 to occurrences in strings and comments.")
8640 (license license:gpl2)))
8642 (define-public python-py3status
8644 (name "python-py3status")
8649 (uri (pypi-uri "py3status" version))
8652 "0i283z1pivmir61z8kbiycigc94l61v33ygzkhczf1ifq7cppyds"))))
8653 (build-system python-build-system)
8658 (modify-phases %standard-phases
8659 ;; 'file' is used for detection of configuration file encoding
8660 ;; let's make link the dependency to particular input
8661 (add-before 'build 'patch-file-path
8662 (lambda* (#:key inputs #:allow-other-keys)
8663 (let ((file-path (assoc-ref inputs "file")))
8664 (substitute* "py3status/parse_config.py"
8665 (("check_output\\(\\['file'")
8666 (string-append "check_output(['" file-path "/bin/file'")))
8668 #:tests? #f)) ; TODO: Requires many libraries not in Guix.
8669 (home-page "https://github.com/ultrabug/py3status")
8670 (synopsis "Extensible i3status wrapper written in Python")
8671 (description "py3status is an i3status wrapper which extends i3status
8672 functionality in a modular way, allowing you to extend your panel with your
8673 own code, responding to click events and updating clock every second.")
8674 (license license:bsd-3)))
8676 (define-public python-tblib
8678 (name "python-tblib")
8682 (uri (pypi-uri "tblib" version))
8684 "1rsg8h069kqgncyv8fgzyj6qflk6j10cb78pa5jk34ixwq044vj3"))))
8685 (build-system python-build-system)
8688 (modify-phases %standard-phases
8691 ;; Upstream runs tests after installation and the package itself
8692 ;; resides in a subdirectory. Extend PYTHONPATH so it will be
8694 (setenv "PYTHONPATH"
8695 (string-append (getcwd) "/build/lib:"
8696 (getenv "PYTHONPATH")))
8697 (zero? (system* "py.test" "-vv" "tests" "README.rst")))))))
8699 `(("python-pytest" ,python-pytest)
8700 ("python-six" ,python-six)))
8701 (home-page "https://github.com/ionelmc/python-tblib")
8702 (synopsis "Traceback serialization library")
8704 "Traceback serialization allows you to:
8707 @item Pickle tracebacks and raise exceptions with pickled tracebacks in
8708 different processes. This allows better error handling when running code over
8709 multiple processes (imagine multiprocessing, billiard, futures, celery etc).
8711 @item Parse traceback strings and raise with the parsed tracebacks.
8713 (license license:bsd-3)))
8715 (define-public python2-tblib
8716 (package-with-python2 python-tblib))
8718 (define-public python-greenlet
8720 (name "python-greenlet")
8724 (uri (pypi-uri "greenlet" version))
8727 "1xhik26j4f3kc4qw9xmj0c567rb5h1zryb4ijwqnqwwjvfhbv59h"))))
8728 (build-system python-build-system)
8729 (home-page "https://greenlet.readthedocs.io/")
8730 (synopsis "Lightweight in-process concurrent programming")
8732 "Greenlet package is a spin-off of Stackless, a version of CPython
8733 that supports micro-threads called \"tasklets\". Tasklets run
8734 pseudo-concurrently (typically in a single or a few OS-level threads) and
8735 are synchronized with data exchanges on \"channels\".")
8736 (license (list license:psfl license:expat))))
8738 (define-public python2-greenlet
8739 (package-with-python2 python-greenlet))
8741 (define-public python-gevent
8743 (name "python-gevent")
8747 (uri (pypi-uri "gevent" version))
8750 "0bbbjvi423y9k9xagrcsimnayaqymg6f2dj76m9z3mjpkjpci4a7"))
8751 (modules '((guix build utils)))
8754 ;; unbunding libev and c-ares
8755 (delete-file-recursively "deps")
8757 (build-system python-build-system)
8759 `(#:modules ((ice-9 ftw)
8762 (guix build python-build-system))
8763 #:phases (modify-phases %standard-phases
8764 (add-after 'unpack 'unpack-libev
8765 (lambda* (#:key inputs #:allow-other-keys)
8766 (mkdir-p "deps/libev")
8767 ;; FIXME: gevent requires building libev, even though
8768 ;; it only links against the proper one.
8769 (invoke "tar" "-xf" (assoc-ref inputs "libev-source")
8770 "--strip-components=1" "-C" "deps/libev")))
8771 (add-before 'patch-source-shebangs 'patch-hard-coded-paths
8773 (substitute* "src/gevent/subprocess.py"
8774 (("/bin/sh") (which "sh")))
8775 (for-each (lambda (file)
8777 (("/bin/sh") (which "sh"))
8778 (("/bin/true") (which "true"))))
8779 (find-files "src/greentest" "\\.py$"))
8781 (add-before 'build 'do-not-use-bundled-sources
8783 (setenv "CONFIG_SHELL" (which "bash"))
8784 (setenv "LIBEV_EMBED" "false")
8785 (setenv "CARES_EMBED" "false")
8786 (setenv "EMBED" "false")
8790 ;; Make sure the build directory is on PYTHONPATH.
8791 (setenv "PYTHONPATH"
8793 (getenv "PYTHONPATH") ":"
8795 (car (scandir "build" (cut string-prefix? "lib." <>)))))
8796 (with-directory-excursion "src/greentest"
8797 ;; XXX: Many tests require network access. Instead we only
8798 ;; run known-good tests. Unfortunately we cannot use
8799 ;; recursion here since this directory also contains
8800 ;; Python-version-specific subfolders.
8801 (apply invoke "python" "testrunner.py" "--config"
8803 (scandir "." (cut regexp-exec
8804 (make-regexp "test_+(subprocess|core)")
8807 `(("python-greenlet" ,python-greenlet)))
8809 `(("libev-source" ,(package-source libev))
8810 ("python-six" ,python-six)))
8812 `(("c-ares" ,c-ares)
8814 (home-page "http://www.gevent.org/")
8815 (synopsis "Coroutine-based network library")
8817 "gevent is a coroutine-based Python networking library that uses greenlet
8818 to provide a high-level synchronous API on top of the libev event loop.")
8819 (license license:expat)))
8821 (define-public python2-gevent
8822 (package-with-python2 python-gevent))
8824 (define-public python-fastimport
8826 (name "python-fastimport")
8831 (uri (pypi-uri "fastimport" version))
8833 (base32 "1aqjsin4rmqm7ln4j0p73fzxifws6c6ikgyhav7r137m2ixsxl43"))))
8834 (build-system python-build-system)
8835 (home-page "https://github.com/jelmer/python-fastimport")
8836 (synopsis "VCS fastimport parser and generator in Python")
8837 (description "This package provides a parser for and generator of the Git
8838 @url{https://www.kernel.org/pub/software/scm/git/docs/git-fast-import.html,fastimport}
8840 (license license:gpl2+)))
8842 (define-public python2-fastimport
8843 (package-with-python2 python-fastimport))
8845 (define-public python-twisted
8847 (name "python-twisted")
8851 (uri (pypi-uri "Twisted" version ".tar.bz2"))
8854 "1p245mg15hkxp7hy5cyq2fgvlgjkb4cg0gwkwd148nzy1bbi3wnv"))))
8855 (build-system python-build-system)
8857 '(#:tests? #f)) ; FIXME: Some tests are failing.
8859 ;; (modify-phases %standard-phases
8862 ;; (zero? (system* "./bin/trial" "twisted")))))
8864 `(("python-zope-interface" ,python-zope-interface)
8865 ("python-incremental" ,python-incremental)
8866 ("python-constantly" ,python-constantly)
8867 ("python-automat" ,python-automat)))
8868 (home-page "https://twistedmatrix.com/")
8869 (synopsis "Asynchronous networking framework written in Python")
8871 "Twisted is an extensible framework for Python programming, with special
8872 focus on event-based network programming and multiprotocol integration.")
8873 (license license:expat)))
8875 (define-public python2-twisted
8876 (package-with-python2 python-twisted))
8878 (define-public python-pika
8880 (name "python-pika")
8885 (uri (pypi-uri "pika" version))
8888 "0nb4h08di432lv7dy2v9kpwgk0w92f24sqc2hw2s9vwr5b8v8xvj"))))
8889 (build-system python-build-system)
8891 `(("python-pyev" ,python-pyev)
8892 ("python-tornado" ,python-tornado)
8893 ("python-twisted" ,python-twisted)))
8894 (home-page "https://pika.readthedocs.org")
8895 (synopsis "Pure Python AMQP Client Library")
8897 "Pika is a pure-Python implementation of the AMQP (Advanced Message Queuing
8898 Protocol) 0-9-1 protocol that tries to stay fairly independent of the underlying
8899 network support library.")
8900 (license license:bsd-3)))
8902 (define-public python2-pika
8903 (package-with-python2 python-pika))
8905 (define-public python-ply
8912 (uri (pypi-uri "ply" version))
8915 "1jxsr1d2f732r6ljhvm827113dckwl6qwakfvpbdhcbhvpvlmscn"))))
8916 (build-system python-build-system)
8917 (home-page "http://www.dabeaz.com/ply/")
8918 (synopsis "Python Lex & Yacc")
8919 (description "PLY is a @code{lex}/@code{yacc} implemented purely in Python.
8920 It uses LR parsing and does extensive error checking.")
8921 (license license:bsd-3)))
8923 (define-public python2-ply
8924 (package-with-python2 python-ply))
8926 (define-public python-tabulate
8928 (name "python-tabulate")
8932 (uri (pypi-uri "tabulate" version))
8935 "1inqhspd4frxnp08c32yndr0lc4px1xfkqah184i5w09gkhvi843"))))
8936 (build-system python-build-system)
8938 ;; FIXME: The pypi release tarball is missing a 'test/common.py'
8939 ;; and the latest release is not tagged in the upstream repository.
8941 (home-page "https://bitbucket.org/astanin/python-tabulate")
8942 (synopsis "Pretty-print tabular data")
8944 "Tabulate is a library and command-line utility to pretty-print tabular
8946 (license license:expat)))
8948 (define-public python2-tabulate
8949 (package-with-python2 python-tabulate))
8951 (define-public python-kazoo
8953 (name "python-kazoo")
8958 (uri (pypi-uri "kazoo" version))
8961 "10pb864if9qi2pq9lfb9m8f7z7ss6rml80gf1d9h64lap5crjnjj"))))
8962 (build-system python-build-system)
8963 (arguments '(#:tests? #f)) ; XXX: needs zookeeper
8965 `(("python-six" ,python-six)))
8966 (home-page "https://kazoo.readthedocs.org")
8967 (synopsis "High-level Zookeeper client library")
8969 "Kazoo is a Python client library for the Apache Zookeeper distributed
8970 application service. It is designed to be easy to use and to avoid common
8971 programming errors.")
8972 (license license:asl2.0)))
8974 (define-public python2-kazoo
8975 (package-with-python2 python-kazoo))
8977 (define-public python-pykafka
8979 (name "python-pykafka")
8984 "https://pypi.python.org/packages/8b/3e/"
8985 "384eeff406b06315738b62483fd2126c6e4f544167116b17cc04ea7d2a59/"
8986 "pykafka-" version ".tar.gz"))
8989 "1id6sr159p6aa13bxcqyr9gln8sqg1l0ddzns5iws8kk5q1p5cfv"))))
8990 (build-system python-build-system)
8991 (arguments '(#:tests? #f)) ; XXX: needs zookeeper, kafka, etc.
8993 `(("python-gevent" ,python-gevent)
8994 ("python-kazoo" ,python-kazoo)
8995 ("python-tabulate" ,python-tabulate)))
8997 `(("librdkafka" ,librdkafka)))
8998 (home-page "https://pykafka.readthedocs.io/")
8999 (synopsis "Apache Kafka client for Python")
9001 "PyKafka is a client for the Apache Kafka distributed messaging system.
9002 It includes Python implementations of Kafka producers and consumers, which
9003 are optionally backed by a C extension built on librdkafka.")
9004 (license license:asl2.0)))
9006 (define-public python2-pykafka
9007 (package-with-python2 python-pykafka))
9009 (define-public python-wcwidth
9011 (name "python-wcwidth")
9016 (uri (pypi-uri "wcwidth" version))
9019 "0pn6dflzm609m4r3i8ik5ni9ijjbb5fa3vg1n7hn6vkd49r77wrx"))))
9020 (build-system python-build-system)
9021 (home-page "https://github.com/jquast/wcwidth")
9022 (synopsis "Measure number of terminal column cells of wide-character codes")
9023 (description "Wcwidth measures the number of terminal column cells of
9024 wide-character codes. It is useful for those implementing a terminal emulator,
9025 or programs that carefully produce output to be interpreted by one. It is a
9026 Python implementation of the @code{wcwidth} and @code{wcswidth} C functions
9027 specified in POSIX.1-2001 and POSIX.1-2008.")
9028 (license license:expat)))
9030 (define-public python2-wcwidth
9031 (package-with-python2 python-wcwidth))
9033 (define-public python2-jsonrpclib
9035 (name "python2-jsonrpclib")
9040 "https://pypi.python.org/packages/source/j/jsonrpclib/"
9041 "jsonrpclib-" version ".tar.gz"))
9044 "02vgirw2bcgvpcxhv5hf3yvvb4h5wzd1lpjx8na5psdmaffj6l3z"))))
9045 (build-system python-build-system)
9048 #:python ,python-2))
9049 (home-page "https://github.com/joshmarshall/jsonrpclib/")
9050 (synopsis "Implementation of JSON-RPC specification for Python")
9052 "This library is an implementation of the JSON-RPC specification.
9053 It supports both the original 1.0 specification, as well as the
9054 new (proposed) 2.0 spec, which includes batch submission, keyword arguments,
9056 (license license:asl2.0)))
9058 (define-public python-chai
9060 (name "python-chai")
9064 (uri (pypi-uri "chai" version))
9067 "016kf3irrclpkpvcm7q0gmkfibq7jgy30a9v73pp42bq9h9a32bl"))))
9068 (build-system python-build-system)
9069 (home-page "https://github.com/agoragames/chai")
9070 (synopsis "Mocking framework for Python")
9072 "Chai provides an api for mocking, stubbing and spying your python
9073 objects, patterned after the Mocha library for Ruby.")
9074 (license license:bsd-3)))
9076 (define-public python2-chai
9077 (package-with-python2 python-chai))
9079 (define-public python-inflection
9081 (name "python-inflection")
9084 (origin (method url-fetch)
9085 (uri (pypi-uri "inflection" version))
9088 "1jhnxgnw8y3mbzjssixh6qkc7a3afc4fygajhqrqalnilyvpzshq"))))
9089 (build-system python-build-system)
9091 `(("python-pytest" ,python-pytest)))
9092 (home-page "https://github.com/jpvanhal/inflection")
9093 (synopsis "Python string transformation library")
9095 "Inflection is a string transformation library. It singularizes
9096 and pluralizes English words, and transforms strings from CamelCase to
9097 underscored string.")
9098 (license license:expat)))
9100 (define-public python2-inflection
9101 (package-with-python2 python-inflection))
9103 (define-public python-pylev
9105 (name "python-pylev")
9109 (uri (pypi-uri "pylev" version))
9112 "1hz1x9blsbxya1y9nnhnwwdnqmakxi9mc0jkwj0rn6b1h44i0f86"))))
9113 (build-system python-build-system)
9114 (home-page "https://github.com/toastdriven/pylev")
9115 (synopsis "Levenshtein distance implementation in Python")
9116 (description "Pure Python Levenshtein implementation, based off the
9117 Wikipedia code samples at
9118 @url{http://en.wikipedia.org/wiki/Levenshtein_distance}.")
9119 (license license:bsd-3)))
9121 (define-public python2-pylev
9122 (package-with-python2 python-pylev))
9124 (define-public python-cleo
9126 (name "python-cleo")
9130 (uri (pypi-uri "cleo" version))
9133 "0q1cf0szr0d54am4pypzwdnm74zpladdsinad94c2fz5i06fdpf7"))))
9134 (build-system python-build-system)
9137 ("python-mock" ,python-mock)
9138 ("python-pytest-mock" ,python-pytest-mock)
9139 ("python-pytest" ,python-pytest)))
9141 `(("python-backpack" ,python-backpack)
9142 ("python-pastel" ,python-pastel)
9143 ("python-pylev" ,python-pylev)))
9144 (home-page "https://github.com/sdispater/cleo")
9145 (synopsis "Command-line arguments library for Python")
9147 "Cleo allows you to create command-line commands with signature in
9148 docstring and colored output.")
9149 (license license:expat)))
9151 (define-public python2-cleo
9152 (package-with-python2 python-cleo))
9154 (define-public python-lazy-object-proxy
9156 (name "python-lazy-object-proxy")
9160 (uri (pypi-uri "lazy-object-proxy" version))
9163 "0s22aqqkdscyh8sjspyyax7qa1aiz8p4midrnyf39717fhfczm6x"))))
9164 (build-system python-build-system)
9165 (home-page "https://github.com/ionelmc/python-lazy-object-proxy")
9166 (synopsis "Lazy object proxy for python")
9168 "Lazy object proxy is an object that wraps a callable but defers the call
9169 until the object is actually required, and caches the result of said call.")
9170 (license license:bsd-2)))
9172 (define-public python2-lazy-object-proxy
9173 (package-with-python2 python-lazy-object-proxy))
9175 (define-public python-dnspython
9177 (name "python-dnspython")
9181 (uri (string-append "http://www.dnspython.org/kits/"
9182 version "/dnspython-" version ".tar.gz"))
9185 "0jr4v2pd90i6l1xxbss2m05psbjaxvyvvvpq44wycijpfgjqln8i"))))
9186 (build-system python-build-system)
9187 (arguments '(#:tests? #f)) ; XXX: requires internet access
9188 (home-page "http://www.dnspython.org")
9189 (synopsis "DNS toolkit for Python")
9191 "dnspython is a DNS toolkit for Python. It supports almost all record
9192 types. It can be used for queries, zone transfers, and dynamic updates.
9193 It supports TSIG authenticated messages and EDNS0.")
9194 (license license:expat)))
9196 (define-public python2-dnspython
9197 (package-with-python2 python-dnspython))
9199 (define-public python-email-validator
9201 (name "python-email-validator")
9204 (origin (method url-fetch)
9205 (uri (pypi-uri "email_validator" version))
9208 "1ja9149l9ck5n45a72h3is7v476hjny5ybxbcamx1nw6iplsm7k6"))))
9209 (build-system python-build-system)
9212 (modify-phases %standard-phases
9213 (add-before 'build 'use-dnspython
9215 (substitute* "setup.py"
9216 (("dnspython3") "dnspython"))
9219 `(("python-dnspython" ,python-dnspython)
9220 ("python-idna" ,python-idna)))
9221 (home-page "https://github.com/JoshData/python-email-validator")
9222 (synopsis "Email address validation library for Python")
9224 "This library validates email address syntax and deliverability.")
9225 (license license:cc0)))
9227 (define-public python2-email-validator
9228 (package-with-python2 python-email-validator))
9230 (define-public python-ukpostcodeparser
9232 (name "python-ukpostcodeparser")
9236 (uri (pypi-uri "UkPostcodeParser" version))
9239 "1jwg9z4rz51mcka1821rwgycsd0mcicyp1kiwjfa2kvg8bm9p2qd"))))
9240 (build-system python-build-system)
9241 (home-page "https://github.com/hamstah/ukpostcodeparser")
9242 (synopsis "UK Postcode parser for Python")
9244 "This library provides the @code{parse_uk_postcode} function for
9245 parsing UK postcodes.")
9246 (license license:expat)))
9248 (define-public python2-ukpostcodeparser
9249 (package-with-python2 python-ukpostcodeparser))
9251 (define-public python-faker
9253 (name "python-faker")
9257 (uri (pypi-uri "Faker" version))
9260 "1fh2p2yz0fsdr4fqwxgddwbvfb6qn6vp8yx0qwqzra27yq5d1wsm"))
9262 (search-patches "python-faker-fix-build-32bit.patch"))
9263 (modules '((guix build utils)))
9266 (for-each delete-file (find-files "." "\\.pyc$"))
9268 (build-system python-build-system)
9271 (modify-phases %standard-phases
9274 (zero? (system* "python" "-m" "unittest" "-v" "tests")))))))
9277 ("python-email-validator" ,python-email-validator)
9278 ("python-mock" ,python-mock)
9279 ("python-ukpostcodeparser" ,python-ukpostcodeparser)))
9281 `(("python-dateutil" ,python-dateutil)
9282 ("python-six" ,python-six)))
9283 (home-page "https://github.com/joke2k/faker")
9284 (synopsis "Python package that generates fake data")
9286 "Faker is a Python package that generates fake data such as names,
9287 addresses, and phone numbers.")
9288 (license license:expat)
9289 (properties `((python2-variant . ,(delay python2-faker))))))
9291 (define-public python2-faker
9292 (let ((base (package-with-python2 (strip-python2-variant
9297 `(("python2-ipaddress" ,python2-ipaddress)
9298 ,@(package-propagated-inputs base))))))
9300 (define-public python-pyaml
9302 (name "python-pyaml")
9306 (uri (pypi-uri "pyaml" version))
9309 "132grrw0ajq4nrappi3ldbkb952k7yn9b6c7csi2rmvzm1g6ppp2"))))
9310 (build-system python-build-system)
9312 `(("python-unidecode" ,python-unidecode)))
9314 `(("python-pyyaml" ,python-pyyaml)))
9315 (home-page "https://github.com/mk-fg/pretty-yaml")
9316 (synopsis "YAML pretty-print library for Python")
9318 "pyaml is a PyYAML based python module to produce pretty and readable
9319 YAML-serialized data.")
9320 (license (license:non-copyleft "http://www.wtfpl.net/txt/copying/"))))
9322 (define-public python2-pyaml
9323 (package-with-python2 python-pyaml))
9325 (define-public python-backpack
9327 (name "python-backpack")
9332 (uri (pypi-uri "backpack" version))
9335 "14rq1mvm0jda90lcx9gyyby9dvq4x3js2cmxvd6vl4686ixwyqh1"))))
9336 (build-system python-build-system)
9338 `(("python-pytest" ,python-pytest)
9339 ("python-nose" ,python-nose)))
9341 `(("python-simplejson" ,python-simplejson)))
9342 (home-page "https://github.com/sdispater/backpack")
9343 (synopsis "Utilities for working with Python collections")
9344 (description "Backpack provides some useful utilities for working with
9345 collections of data.")
9346 (license license:expat)))
9348 (define-public python2-backpack
9349 (package-with-python2 python-backpack))
9351 (define-public python-prompt-toolkit
9353 (name "python-prompt-toolkit")
9358 (uri (pypi-uri "prompt_toolkit" version ".tar.gz"))
9361 "05v9h5nydljwpj5nm8n804ms0glajwfy1zagrzqrg91wk3qqi1c5"))))
9362 (build-system python-build-system)
9364 '(#:tests? #f)) ; The test suite uses some Windows-specific data types.
9366 `(("python-wcwidth" ,python-wcwidth)
9367 ("python-six" ,python-six)
9368 ("python-pygments" ,python-pygments)))
9369 (home-page "https://github.com/jonathanslenders/python-prompt-toolkit")
9370 (synopsis "Library for building command line interfaces in Python")
9372 "Prompt-Toolkit is a library for building interactive command line
9373 interfaces in Python. It's like GNU Readline but it also features syntax
9374 highlighting while typing, out-of-the-box multi-line input editing, advanced
9375 code completion, incremental search, support for Chinese double-width
9376 characters, mouse support, and auto suggestions.")
9377 (license license:bsd-3)))
9379 (define-public python2-prompt-toolkit
9380 (package-with-python2 python-prompt-toolkit))
9382 (define-public python-jedi
9384 (name "python-jedi")
9389 (uri (pypi-uri "jedi" version))
9392 "0c8x962ynpx001fdvp07m2q5jk4igkxbj3rmnydavphvlgxijk1v"))))
9393 (build-system python-build-system)
9395 ;; FIXME: One test fails (use "py.test" instead of 'setup.py test').
9398 `(("python-pytest" ,python-pytest)))
9399 (home-page "https://github.com/davidhalter/jedi")
9401 "Autocompletion for Python that can be used for text editors")
9403 "Jedi is an autocompletion tool for Python that can be used for text editors.")
9404 (license license:expat)))
9406 (define-public python2-jedi
9407 (package-with-python2 python-jedi))
9409 (define-public ptpython
9415 (uri (pypi-uri "ptpython" version))
9418 "1mmbiyzf0n8hm7z2a562x7w5cbl6jc0zsk6vp40q1z4cyblv1k13"))))
9419 (build-system python-build-system)
9421 '(#:tests? #f)) ; FIXME: No tests in pypi tarball.
9423 `(("python-docopt" ,python-docopt)
9424 ("python-jedi" ,python-jedi)
9425 ("python-prompt-toolkit" ,python-prompt-toolkit)
9426 ("python-pygments" ,python-pygments)))
9427 (home-page "https://github.com/jonathanslenders/ptpython")
9428 (synopsis "Python Read-Eval-Print-Loop with nice IDE-like features")
9430 "ptpython is a Python read-eval-print loop with IDE-like features.
9431 It supports syntax highlighting, multiline editing, autocompletion, mouse,
9432 color schemes, bracketed paste, Vi and Emacs keybindings, Chinese characters
9434 (license license:bsd-3)
9435 (properties `((python2-variant . ,(delay ptpython-2))))))
9437 (define-public ptpython-2
9438 (let ((base (package-with-python2 (strip-python2-variant ptpython))))
9441 (name "ptpython2"))))
9443 (define-public python-stem
9445 (name "python-stem")
9450 (uri (pypi-uri "stem" version))
9453 "1va9p3ij7lxg6ixfsvaql06dn11l3fgpxmss1dhlvafm7sqizznp"))))
9454 (build-system python-build-system)
9457 (modify-phases %standard-phases
9458 (add-before 'check 'fix-test-environment
9460 ;; Fixes: FileNotFoundError: [Errno 2] No such file or directory:
9461 ;; '/tmp/guix-build-python-stem-1.6.0.drv-0/stem-1.6.0/.gitignore'.
9462 (with-output-to-file ".gitignore"
9463 (lambda _ (format #t "%")))
9467 (invoke "./run_tests.py" "--unit")
9470 `(("python-mock" ,python-mock)
9471 ("python-pep8" ,python-pep8)
9472 ("python-pyflakes" ,python-pyflakes)))
9473 (home-page "https://stem.torproject.org/")
9475 "Python controller library that allows applications to interact with Tor")
9477 "Stem is a Python controller library for Tor. With it you can use Tor's
9478 control protocol to script against the Tor process and read descriptor data
9479 relays publish about themselves.")
9480 (license license:lgpl3)))
9482 (define-public python2-stem
9483 (package-with-python2 python-stem))
9485 (define-public python-pyserial
9487 (name "python-pyserial")
9492 (uri (pypi-uri "pyserial" version))
9495 "0k1nfdrxxkdlv4zgaqsdv8li0pj3gbh2pyxw8q2bsg6f9490amyn"))))
9496 (build-system python-build-system)
9498 '(#:tests? #f)) ; FIXME: 3/49 tests are failing.
9500 ;; (modify-phases %standard-phases
9503 ;; (zero? (system* "python" "test/run_all_tests.py" "loop://")))))))
9505 "https://github.com/pyserial/pyserial")
9506 (synopsis "Python Serial Port Bindings")
9507 (description "@code{pyserial} provide serial port bindings for Python. It
9508 supports different byte sizes, stop bits, parity and flow control with RTS/CTS
9509 and/or Xon/Xoff. The port is accessed in RAW mode.")
9510 (license license:bsd-3)))
9512 (define-public python2-pyserial
9513 (package-with-python2 python-pyserial))
9515 (define-public python-kivy
9517 (name "python-kivy")
9522 (uri (pypi-uri "Kivy" version))
9523 (file-name (string-append name "-" version ".tar.gz"))
9526 "1394zh6kvf7k5d8vlzxcsfcailr3q59xwg9b1n7qaf25bvyq1h98"))))
9527 (build-system python-build-system)
9529 `(#:tests? #f ; Tests require many optional packages
9531 (modify-phases %standard-phases
9532 (add-after 'patch-generated-file-shebangs 'set-sdl-paths
9533 (lambda* (#:key inputs #:allow-other-keys)
9534 (setenv "KIVY_SDL2_PATH"
9535 (string-append (assoc-ref inputs "sdl-union")
9540 ("pkg-config" ,pkg-config)
9541 ("python-cython" ,python-cython)))
9543 `(("gstreamer" ,gstreamer)
9546 ,(sdl-union (list sdl2 sdl2-image sdl2-mixer sdl2-ttf)))))
9547 (home-page "http://kivy.org")
9549 "Multitouch application framework")
9551 "A software library for rapid development of
9552 hardware-accelerated multitouch applications.")
9553 (license license:expat)))
9555 (define-public python2-kivy
9556 (package-with-python2 python-kivy))
9558 (define-public python-kivy-next
9559 (let ((commit "a988c5e7a47da56263ff39514264a3de516ef2fe")
9561 (package (inherit python-kivy)
9562 (name "python-kivy-next")
9563 (version (string-append "1.9.1-" revision "."
9564 (string-take commit 7)))
9569 (url "https://github.com/kivy/kivy")
9571 (file-name (string-append name "-" version "-checkout"))
9574 "0jk92b4a8l7blkvkgkjihk171s0dfnq582cckff5srwc8kal5m0p")))))))
9576 (define-public python2-kivy-next
9577 (package-with-python2 python-kivy-next))
9579 (define-public python-binaryornot
9581 (name "python-binaryornot")
9585 (uri (pypi-uri "binaryornot" version))
9588 "1j4f51dxic39mdwf6alj7gd769wy6mhk916v031wjali51xkh3xb"))))
9589 (build-system python-build-system)
9591 `(("python-chardet" ,python-chardet)
9592 ("python-hypothesis" ,python-hypothesis)))
9593 (home-page "https://github.com/audreyr/binaryornot")
9594 (synopsis "Package to check if a file is binary or text")
9595 (description "Ultra-lightweight pure Python package to check if a file is
9597 (license license:bsd-3)
9598 (properties `((python2-variant . ,(delay python2-binaryornot))))))
9600 (define-public python2-binaryornot
9601 (let ((base (package-with-python2 (strip-python2-variant python-binaryornot))))
9602 (package (inherit base)
9604 `(("python2-enum34" ,python2-enum34)
9605 ,@(package-propagated-inputs base))))))
9607 (define-public python-nltk
9609 (name "python-nltk")
9613 (uri (pypi-uri "nltk" version))
9616 "0skxbhnymwlspjkzga0f7x1hg3y50fwpfghs8g8k7fh6f4nknlym"))))
9617 (build-system python-build-system)
9619 '(;; The tests require some extra resources to be downloaded.
9620 ;; TODO Try packaging these resources.
9622 (home-page "http://nltk.org/")
9623 (synopsis "Natural Language Toolkit")
9624 (description "It provides interfaces to over 50 corpora and lexical
9625 resources such as WordNet, along with a suite of text processing libraries
9626 for classification, tokenization, stemming, tagging, parsing, and semantic
9627 reasoning, wrappers for natural language processing libraries.")
9628 (license license:asl2.0)))
9630 (define-public python2-nltk
9631 (package-with-python2 python-nltk))
9633 (define-public python-pymongo
9635 (name "python-pymongo")
9639 (uri (pypi-uri "pymongo" version))
9642 "07mra6w86wjqy4lx5fvimidjhhfzd562gfjn8grsnbv2q8pk0i9x"))))
9643 (build-system python-build-system)
9645 `(("python-certifi" ,python-certifi)))
9646 (home-page "https://github.com/mongodb/mongo-python-driver")
9647 (synopsis "Python driver for MongoDB")
9648 (description "Python driver for MongoDB.")
9649 (license license:asl2.0)))
9651 (define-public python2-pymongo
9652 (package-with-python2 python-pymongo))
9654 (define-public python-sh
9660 (uri (pypi-uri "sh" version))
9663 "192r0mpv6dmkysjzhc43ddffiwb5g7c76bgr1mb1z2xz9awbj3sr"))))
9664 (build-system python-build-system)
9666 `(#:tests? #f)) ; no tests
9667 (home-page "https://github.com/amoffat/sh")
9668 (synopsis "Python subprocess interface")
9669 (description "Abstracts process invocation by providing a function
9670 interface for programs.")
9671 (license license:expat)))
9673 (define-public python2-sh
9674 (package-with-python2 python-sh))
9676 (define-public python-consul
9678 (name "python-consul")
9683 (uri (pypi-uri "python-consul" version))
9686 "0rfyxcy4cr3x848vhx876ifalxd5ghq6l5x813m49h4vq2d4jiq8"))))
9687 (build-system python-build-system)
9689 '(#:tests? #f)) ; The tests are not distributed
9691 `(("python-requests" ,python-requests)
9692 ("python-six" ,python-six)))
9693 (home-page "https://github.com/cablehead/python-consul")
9694 (synopsis "Python client for Consul")
9696 "Python client for @url{http://www.consul.io/,Consul}, a tool for service
9697 discovery, monitoring and configuration.")
9698 (license license:expat)))
9700 (define-public python2-consul
9701 (package-with-python2 python-consul))
9703 (define-public python-schematics
9705 (name "python-schematics")
9711 "https://github.com/schematics/schematics/archive/v" version ".tar.gz"))
9712 (file-name (string-append name "-" version ".tar.gz"))
9715 "19v1i69bf3bzarfxmbv0v6ivpcn758x3shvbiy9l2hy0lvqwnp6l"))))
9716 (build-system python-build-system)
9718 `(("python-six" ,python-six)))
9720 `(#:tests? #f)) ; requires a bunch of not very nice packages with fixed
9721 ; version requirements (eg python-coveralls)
9722 (home-page "https://github.com/schematics/schematics")
9723 (synopsis "Python Data Structures for Humans")
9724 (description "Python Data Structures for Humans.")
9725 (license license:bsd-3)))
9727 (define-public python2-schematics
9728 (package-with-python2 python-schematics))
9730 (define-public python-odfpy
9732 (name "python-odfpy")
9736 (uri (pypi-uri "odfpy" version))
9739 "1a6ms0w9zfhhkqhvrnynwwbxrivw6hgjc0s5k7j06npc7rq0blxw"))))
9741 `(#:modules ((srfi srfi-1)
9742 (guix build python-build-system)
9745 (modify-phases %standard-phases
9747 ;; The test runner invokes python2 and python3 for test*.py.
9748 ;; To avoid having both in inputs, we replicate it here.
9750 (every (lambda (test-file)
9751 (zero? (system* "python" test-file)))
9752 (find-files "tests" "^test.*\\.py$")))))))
9753 (build-system python-build-system)
9754 (home-page "https://github.com/eea/odfpy")
9755 (synopsis "Python API and tools to manipulate OpenDocument files")
9756 (description "Collection of libraries and utility programs written in
9757 Python to manipulate OpenDocument 1.2 files.")
9759 ;; The software is mainly dual GPL2+ and ASL2.0, but includes a
9760 ;; number of files with other licenses.
9761 (list license:gpl2+ license:asl2.0 license:lgpl2.1+ license:cc-by-sa3.0))))
9763 (define-public python2-odfpy
9764 (package-with-python2 python-odfpy))
9766 (define-public python-natsort
9768 (name "python-natsort")
9772 (uri (pypi-uri "natsort" version))
9775 "0bh6j0l8iapjnsgg3bs6q075cnzjl6zw1vlgqyv3qrygm2cxypkn"))))
9776 (build-system python-build-system)
9779 (modify-phases %standard-phases
9780 (add-before 'check 'set-cachedir
9781 ;; Tests require write access to $HOME by default
9782 (lambda _ (setenv "PYTHON_EGG_CACHE" "/tmp") #t)))))
9784 `(("python-hypothesis" ,python-hypothesis)
9785 ("python-pytest-cache" ,python-pytest-cache)
9786 ("python-pytest-cov" ,python-pytest-cov)
9787 ("python-pytest-flakes" ,python-pytest-flakes)
9788 ("python-pytest-pep8" ,python-pytest-pep8)))
9789 (propagated-inputs ; TODO: Add python-fastnumbers.
9790 `(("python-pyicu" ,python-pyicu)))
9791 (home-page "https://github.com/SethMMorton/natsort")
9792 (synopsis "Natural sorting for python and shell")
9794 "Natsort lets you apply natural sorting on lists instead of
9795 lexicographical. If you use the built-in @code{sorted} method in python
9796 on a list such as @code{['a20', 'a9', 'a1', 'a4', 'a10']}, it would be
9797 returned as @code{['a1', 'a10', 'a20', 'a4', 'a9']}. Natsort provides a
9798 function @code{natsorted} that identifies numbers and sorts them separately
9799 from strings. It can also sort version numbers, real numbers, mixed types
9800 and more, and comes with a shell command @command{natsort} that exposes this
9801 functionality in the command line.")
9802 (license license:expat)
9803 (properties `((python2-variant . ,(delay python2-natsort))))))
9805 (define-public python2-natsort
9806 (let ((base (package-with-python2 (strip-python2-variant python-natsort))))
9807 (package (inherit base)
9809 `(("python2-pathlib" ,python2-pathlib)
9810 ("python2-mock" ,python2-mock)
9811 ("python2-enum34" ,python2-enum34)
9812 ,@(package-native-inputs base))))))
9814 (define-public python-glances
9816 (name "python-glances")
9821 (uri (pypi-uri "Glances" version))
9824 "11jbq40g8alsbirnd4kiagznqg270247i0m8qhi48ldf2i5xppxg"))))
9825 (build-system python-build-system)
9827 `(("python-psutil" ,python-psutil)))
9829 "https://github.com/nicolargo/glances")
9831 "A cross-platform curses-based monitoring tool")
9833 "Glances is a curses-based monitoring tool for a wide variety of platforms.
9834 Glances uses the PsUtil library to get information from your system. It monitors
9835 CPU, load, memory, network bandwidth, disk I/O, disk use, and more.")
9836 (license license:lgpl3+)))
9838 (define-public python2-glances
9839 (package-with-python2 python-glances))
9841 (define-public python-graphql-core
9843 (name "python-graphql-core")
9848 (uri (pypi-uri "graphql-core" version))
9851 "0rsaarx2sj4xnw9966rhh4haiqaapm4lm2mfqm48ywd51j5vh1a0"))))
9852 (build-system python-build-system)
9854 `(#:tests? #f ; Tests require the unpackaged pytest-benchmark.
9856 (modify-phases %standard-phases
9857 (add-after 'unpack 'patch-hardcoded-version
9858 (lambda _ (substitute*
9860 (("'gevent==1.1rc1'") "'gevent'"))
9863 `(("python-gevent" ,python-gevent)
9864 ("python-mock" ,python-mock)
9865 ("python-pytest-mock" ,python-pytest-mock)))
9867 `(("python-promise" ,python-promise)
9868 ("python-six" ,python-six)))
9869 (home-page "https://github.com/graphql-python/graphql-core")
9870 (synopsis "GraphQL implementation for Python")
9872 "GraphQL implementation for Python. GraphQL is a data query language and
9873 runtime designed and used to request and deliver data to mobile and web apps.
9874 This library is a port of @url{https://github.com/graphql/graphql-js,graphql-js}
9876 (license license:expat)))
9878 (define-public python2-graphql-core
9879 (package-with-python2 python-graphql-core))
9881 (define-public python-graphql-relay
9883 (name "python-graphql-relay")
9888 (uri (pypi-uri "graphql-relay" version))
9891 "1nv5dxcj59zv31qvl8bd142njmxcmymny2dz3br1l2cpbljbf5i7"))))
9892 (build-system python-build-system)
9894 '(#:tests? #f)) ; The tests are not distributed
9896 `(("python-graphql-core" ,python-graphql-core)
9897 ("python-promise" ,python-promise)
9898 ("python-six" ,python-six)))
9899 (home-page "https://github.com/graphql-python/graphql-relay-py")
9900 (synopsis "Relay implementation for Python")
9902 "This is a library to allow the easy creation of Relay-compliant servers
9903 using the GraphQL Python reference implementation of a GraphQL server. It
9904 should be noted that the code is a exact port of the original
9905 @url{https://github.com/graphql/graphql-relay-js,graphql-relay js implementation}
9907 (license license:expat)))
9909 (define-public python2-graphql-relay
9910 (package-with-python2 python-graphql-relay))
9912 (define-public python-graphene
9914 (name "python-graphene")
9919 (uri (pypi-uri "graphene" version))
9922 "09zhac7igh9ixdz0ay6csy35b40l1jwbf2wrbxmgxwfhy51iy06q"))))
9923 (build-system python-build-system)
9925 `(("python-graphql-core" ,python-graphql-core)
9926 ("python-graphql-relay" ,python-graphql-relay)
9927 ("python-iso8601" ,python-iso8601)
9928 ("python-promise" ,python-promise)
9929 ("python-six" ,python-six)))
9931 `(#:tests? #f)) ; no tests/ in the PyPI tarball
9932 (home-page "http://graphene-python.org/")
9933 (synopsis "GraphQL Framework for Python")
9935 "Graphene is a Python library for building GraphQL schemas/types.
9936 A GraphQL schema describes your data model, and provides a GraphQL server
9937 with an associated set of resolve methods that know how to fetch data.")
9938 (properties `((python2-variant . ,(delay python2-graphene))))
9939 (license license:expat)))
9941 (define-public python2-graphene
9942 (let ((base (package-with-python2
9943 (strip-python2-variant python-graphene))))
9944 (package (inherit base)
9946 `(("python2-sqlalchemy" ,python2-sqlalchemy)
9947 ,@(package-native-inputs base))))))
9949 (define-public python-nautilus
9951 (name "python-nautilus")
9956 (uri (pypi-uri "nautilus" version))
9959 "01hwzjc1zshk4vvxrcghm398fpy4jls66dyz06g07mrwqif8878p"))))
9960 (build-system python-build-system)
9961 (arguments `(#:tests? #f)) ; fails to import test modules
9963 `(("python-bcrypt" ,python-bcrypt)
9964 ("python-click" ,python-click)
9965 ("python-consul" ,python-consul)
9966 ("python-graphene" ,python-graphene)
9967 ("python-jinja2" ,python-jinja2)
9968 ("python-peewee" ,python-peewee)
9969 ("python-pika" ,python-pika)
9970 ("python-tornado" ,python-tornado)
9971 ("python-wtforms" ,python-wtforms)))
9973 `(("python-nose2" ,python-nose2)))
9974 (home-page "https://github.com/AlecAivazis/nautilus")
9975 (synopsis "Library for creating microservice applications")
9977 "Nautilus is a framework for flux based microservices that looks to
9978 provide extendible implementations of common aspects of a cloud so that you can
9979 focus on building massively scalable web applications.")
9980 (license license:expat)))
9982 (define-public python-snowballstemmer
9984 (name "python-snowballstemmer")
9988 (uri (pypi-uri "snowballstemmer" version))
9991 "0a0idq4y5frv7qsg2x62jd7rd272749xk4x99misf5rcifk2d7wi"))))
9992 (build-system python-build-system)
9996 (home-page "https://github.com/shibukawa/snowball_py")
9997 (synopsis "Snowball stemming library collection for Python")
9998 (description "This package provides 16 word stemmer algorithms generated
9999 from Snowball algorithms. It includes the 15 original ones plus the Poerter
10001 (license license:bsd-3)))
10003 (define-public python2-snowballstemmer
10004 (package-with-python2 python-snowballstemmer))
10006 (define-public python-sphinx-cloud-sptheme
10008 (name "python-sphinx-cloud-sptheme")
10012 (uri (pypi-uri "cloud_sptheme" version))
10015 "1dniqb6a39yh786f86c4jn666rwnyi1jvzn4616zhcchb7sfdshd"))))
10016 (build-system python-build-system)
10017 ;; FIXME: The 'pypi' release archive does not contain tests.
10018 (arguments '(#:tests? #f))
10020 `(("python-sphinx" ,python-sphinx)))
10021 (home-page "https://bitbucket.org/ecollins/cloud_sptheme")
10022 (synopsis "'Cloud' theme for Sphinx documenter")
10023 (description "This package contains the \"Cloud\" theme for Sphinx and some
10024 related extensions.")
10025 (license license:bsd-3)))
10027 (define-public python2-sphinx-cloud-sptheme
10028 (package-with-python2 python-sphinx-cloud-sptheme))
10030 (define-public python-sphinx-alabaster-theme
10032 (name "python-sphinx-alabaster-theme")
10036 (uri (pypi-uri "alabaster" version))
10039 "027anxzcb951gjlcc43y3rbn9qrw36d16vj9wd2smv5410xx9bs7"))))
10040 (build-system python-build-system)
10042 `(("python-pygments" ,python-pygments)))
10043 (home-page "https://alabaster.readthedocs.io/")
10044 (synopsis "Configurable sidebar-enabled Sphinx theme")
10045 (description "Alabaster is a visually (c)lean, responsive, configurable
10046 theme for the Sphinx documentation system. It's the default theme of Sphinx.")
10047 (license license:bsd-3)))
10049 (define-public python2-sphinx-alabaster-theme
10050 (package-with-python2 python-sphinx-alabaster-theme))
10052 (define-public python-setproctitle
10054 (name "python-setproctitle")
10059 (uri (pypi-uri "setproctitle" version))
10062 "163kplw9dcrw0lffq1bvli5yws3rngpnvrxrzdw89pbphjjvg0v2"))))
10063 (build-system python-build-system)
10066 (modify-phases %standard-phases
10067 (add-before 'check 'patch-Makefile
10068 ;; Stricly this is only required for the python2 variant.
10069 ;; But adding a phase in an inherited package seems to be
10070 ;; cumbersum. So we patch even for python3.
10072 (let ((nose (assoc-ref %build-inputs "python2-nose")))
10074 (substitute* "Makefile"
10075 (("\\$\\(PYTHON\\) [^ ]which nosetests[^ ] ")
10076 (string-append nose "/bin/nosetests "))))
10080 (setenv "PYTHON" (or (which "python3") (which "python")))
10081 (setenv "PYCONFIG" (or (which "python3-config")
10082 (which "python-config")))
10083 (setenv "CC" "gcc")
10084 ;; No need to extend PYTHONPATH to find the built package, since
10085 ;; the Makefile will build anyway
10086 (zero? (system* "make" "check")))))))
10088 `(("procps" ,procps))) ; required for tests
10090 "https://github.com/dvarrazzo/py-setproctitle")
10092 "Setproctitle implementation for Python to customize the process title")
10093 (description "The library allows a process to change its title (as displayed
10094 by system tools such as ps and top).
10096 Changing the title is mostly useful in multi-process systems, for
10097 example when a master process is forked: changing the children's title
10098 allows to identify the task each process is busy with. The technique
10099 is used by PostgreSQL and the OpenSSH Server for example.")
10100 (license license:bsd-3)
10101 (properties `((python2-variant . ,(delay python2-setproctitle))))))
10103 (define-public python2-setproctitle
10104 (let ((base (package-with-python2
10105 (strip-python2-variant python-setproctitle))))
10108 (native-inputs `(("python2-nose" ,python2-nose)
10109 ,@(package-native-inputs base))))))
10111 (define-public python-validictory
10113 (name "python-validictory")
10118 (uri (pypi-uri "validictory" version))
10121 "1zf1g9sw47xzp5f80bd94pb42j9yqv82lcrgcvdwr6nkaphfi37q"))))
10122 (build-system python-build-system)
10125 (modify-phases %standard-phases
10126 (add-after 'unpack 'bootstrap
10127 ;; Move the tests out of the package directory to avoid
10130 (rename-file "validictory/tests" "tests")
10131 (delete-file "tests/__init__.py")))
10134 ;; Extend PYTHONPATH so the built package will be found.
10135 (setenv "PYTHONPATH"
10136 (string-append (getcwd) "/build/lib:"
10137 (getenv "PYTHONPATH")))
10138 (zero? (system* "py.test" "-vv" )))))))
10140 `(("python-pytest" ,python-pytest)))
10142 "https://github.com/jamesturk/validictory")
10143 (synopsis "General purpose Python data validator")
10144 (description "It allows validation of arbitrary Python data structures.
10146 The schema format is based on the JSON Schema
10147 proposal (http://json-schema.org), so combined with json the library is also
10148 useful as a validator for JSON data.")
10149 (license license:expat)))
10151 (define-public python2-validictory
10152 (package-with-python2 python-validictory))
10154 (define-public python-pyev
10156 (name "python-pyev")
10161 (uri (pypi-uri "pyev" version))
10164 "0rf603lc0s6zpa1nb25vhd8g4y337wg2wyz56i0agsdh7jchl0sx"))))
10165 (build-system python-build-system)
10167 `(#:tests? #f ; no test suite
10169 (modify-phases %standard-phases
10170 (add-after 'unpack 'patch
10171 (lambda* (#:key inputs #:allow-other-keys)
10172 (let ((libev (string-append (assoc-ref inputs "libev")
10173 "/lib/libev.so.4")))
10174 (substitute* "setup.py"
10175 (("libev_dll_name = find_library\\(\\\"ev\\\"\\)")
10176 (string-append "libev_dll_name = \"" libev "\"")))))))))
10178 `(("libev" ,libev)))
10179 (home-page "http://pythonhosted.org/pyev/")
10180 (synopsis "Python libev interface")
10181 (description "Pyev provides a Python interface to libev.")
10182 (license license:gpl3)))
10184 (define-public python2-pyev
10185 (package-with-python2 python-pyev))
10187 (define-public python-imagesize
10189 (name "python-imagesize")
10194 (uri (pypi-uri "imagesize" version))
10197 "0qk07k0z4241lkzzjji7z4da04pcvg7bfc4xz1934zlqhwmwdcha"))))
10198 (build-system python-build-system)
10200 '(;; Test files are not distributed on PyPi:
10201 ;; https://github.com/shibukawa/imagesize_py/issues/7
10203 (home-page "https://github.com/shibukawa/imagesize_py")
10204 (synopsis "Gets image size of files in variaous formats in Python")
10206 "This package allows determination of image size from
10207 PNG, JPEG, JPEG2000 and GIF files in pure Python.")
10208 (license license:expat)))
10210 (define-public python2-imagesize
10211 (package-with-python2 python-imagesize))
10213 (define-public python-termstyle
10215 (name "python-termstyle")
10220 (uri (pypi-uri "termstyle" version))
10223 "17wzkkcqy5zc0g68xlad3kcv66iw14d2pwqc0h9420gak0vbhx7g"))))
10224 (build-system python-build-system)
10227 (modify-phases %standard-phases
10230 (zero? (system* "python" "test3.py")))))))
10231 (home-page "https://github.com/gfxmonk/termstyle")
10232 (synopsis "Console text coloring for Python")
10233 (description "This package provides console text coloring for Python.")
10234 (license license:bsd-3)))
10236 (define-public python-argcomplete
10238 (name "python-argcomplete")
10243 (uri (pypi-uri "argcomplete" version))
10246 "11bwiw6j0nilgz81xnw6f1npyga3prp8asjqrm87cdr3ria5l03x"))))
10247 (build-system python-build-system)
10249 `(("python-pexpect" ,python-pexpect)
10251 ("bash-full" ,bash))) ;full Bash for 'test_file_completion'
10252 (home-page "https://github.com/kislyuk/argcomplete")
10253 (synopsis "Shell tab completion for Python argparse")
10254 (description "argcomplete provides extensible command line tab completion
10255 of arguments and options for Python scripts using @code{argparse}. It's
10256 particularly useful for programs with many options or sub-parsers that can
10257 dynamically suggest completions; for example, when browsing resources over the
10259 (license license:asl2.0)))
10261 (define-public python2-argcomplete
10262 (package-with-python2 python-argcomplete))
10264 (define-public python-xopen
10266 (name "python-xopen")
10271 (uri (pypi-uri "xopen" version))
10274 "0bzjmn3rl1cd3d2q39cjwnkhaspk2b0hfj3rl64pclm44ihg5fb6"))
10275 (file-name (string-append name "-" version ".tar.gz"))))
10276 (build-system python-build-system)
10277 (home-page "https://github.com/marcelm/xopen/")
10278 (synopsis "Open compressed files transparently")
10279 (description "This module provides an @code{xopen} function that works like
10280 Python's built-in @code{open} function, but can also deal with compressed files.
10281 Supported compression formats are gzip, bzip2 and, xz, and are automatically
10282 recognized by their file extensions. The focus is on being as efficient as
10283 possible on all supported Python versions.")
10284 (license license:expat)))
10286 (define-public python2-xopen
10287 (package-with-python2 python-xopen))
10289 (define-public python2-cheetah
10291 (name "python2-cheetah")
10296 (uri (pypi-uri "Cheetah" version))
10299 "0l5mm4lnysjkzpjr95q5ydm9xc8bv43fxmr79ypybrf1y0lq4c5y"))))
10300 (build-system python-build-system)
10302 `(#:python ,python-2))
10304 `(("python2-markdown" ,python2-markdown)))
10305 (home-page "https://pythonhosted.org/Cheetah/")
10306 (synopsis "Template engine")
10307 (description "Cheetah is a text-based template engine and Python code
10310 Cheetah can be used as a standalone templating utility or referenced as
10311 a library from other Python applications. It has many potential uses,
10312 but web developers looking for a viable alternative to ASP, JSP, PHP and
10313 PSP are expected to be its principle user group.
10317 @item Generates HTML, SGML, XML, SQL, Postscript, form email, LaTeX, or any other
10319 @item Cleanly separates content, graphic design, and program code.
10320 @item Blends the power and flexibility of Python with a simple template language
10321 that non-programmers can understand.
10322 @item Gives template writers full access to any Python data structure, module,
10323 function, object, or method in their templates.
10324 @item Makes code reuse easy by providing an object-orientated interface to
10325 templates that is accessible from Python code or other Cheetah templates.
10326 One template can subclass another and selectively reimplement sections of it.
10327 @item Provides a simple, yet powerful, caching mechanism that can dramatically
10328 improve the performance of a dynamic website.
10329 @item Compiles templates into optimized, yet readable, Python code.
10331 (license (license:x11-style "file://LICENSE"))))
10333 (define-public python-dulwich
10335 (name "python-dulwich")
10340 (uri (list (string-append "https://www.dulwich.io/releases/"
10341 "dulwich-" version ".tar.gz")
10342 (pypi-uri "dulwich" version)))
10345 "1aa1xfrxkc3j9s4xi0llhf5gndyi9ryprcxsqfa5fcb8ph34981q"))))
10346 (build-system python-build-system)
10349 (modify-phases %standard-phases
10350 (add-before 'check 'fix-tests
10351 (lambda* (#:key inputs #:allow-other-keys)
10352 ;; The tests use Popen with a custom environment which doesn't
10354 (substitute* "dulwich/tests/compat/utils.py"
10355 (("'git'") (string-append "'"
10358 (substitute* '("dulwich/tests/test_repository.py"
10359 "dulwich/tests/test_hooks.py")
10360 (("#!/bin/sh") (string-append "#!" (which "sh"))))
10361 (setenv "TEST_RUNNER" "unittest")
10362 (setenv "PYTHONHASHSEED" "random")
10365 `(("python-fastimport" ,python-fastimport)))
10367 `(("python-mock" ,python-mock)
10368 ("python-geventhttpclient" ,python-geventhttpclient)
10370 (home-page "https://www.dulwich.io/")
10371 (synopsis "Git implementation in Python")
10372 (description "Dulwich is an implementation of the Git file formats and
10373 protocols written in pure Python.")
10374 ;; Can be used with either license.
10375 (license (list license:asl2.0 license:gpl2+))))
10377 (define-public python2-dulwich
10378 (package-with-python2 python-dulwich))
10380 (define-public python-pbkdf2
10382 (name "python-pbkdf2")
10387 (uri (pypi-uri "pbkdf2" version))
10390 "0yb99rl2mbsaamj571s1mf6vgniqh23v98k4632150hjkwv9fqxc"))))
10391 (build-system python-build-system)
10394 (modify-phases %standard-phases
10397 (setenv "PYTHONPATH"
10398 (string-append (getcwd) "/build/lib:"
10399 (getenv "PYTHONPATH")))
10400 (zero? (system* "python" "test/test_pbkdf2.py")))))))
10402 `(("python-pycrypto" ,python-pycrypto))) ; optional
10403 (home-page "https://www.dlitz.net/software/python-pbkdf2/")
10404 (synopsis "Password-based key derivation")
10405 (description "This module implements the password-based key derivation
10406 function, PBKDF2, specified in RSA PKCS#5 v2.0.
10408 PKCS#5 v2.0 Password-Based Key Derivation is a key derivation function which
10409 is part of the RSA Public Key Cryptography Standards series. The provided
10410 implementation takes a password or a passphrase and a salt value (and
10411 optionally a iteration count, a digest module, and a MAC module) and provides
10412 a file-like object from which an arbitrarly-sized key can be read.")
10413 (license license:expat)))
10415 (define-public python2-pbkdf2
10416 (package-with-python2 python-pbkdf2))
10418 (define-public python-qrcode
10420 (name "python-qrcode")
10425 (uri (pypi-uri "qrcode" version))
10428 "0kljfrfq0c2rmxf8am57333ia41kd0snbm2rnqbdy816hgpcq5a1"))))
10429 (build-system python-build-system)
10431 ;; FIXME: Tests require packaging 'pymaging'.
10434 `(("python-lxml" ,python-lxml) ; for SVG output
10435 ("python-pillow" ,python-pillow) ; for PNG output
10436 ("python-six" ,python-six)))
10437 (home-page "https://github.com/lincolnloop/python-qrcode")
10438 (synopsis "QR Code image generator")
10439 (description "This package provides a pure Python QR Code generator
10440 module. It uses the Python Imaging Library (PIL) to allow for the generation
10443 In addition this package provides a command line tool to generate QR codes and
10444 either write these QR codes to a file or do the output as ascii art at the
10446 (license license:bsd-3)))
10448 (define-public python2-qrcode
10449 (package-with-python2 python-qrcode))
10451 (define-public python-rst2ansi
10453 (name "python-rst2ansi")
10458 (uri (pypi-uri "rst2ansi" version))
10461 "0vzy6gd60l79ff750scl0sz48r1laalkl6md6dwzah4dcadgn5qv"))))
10462 (build-system python-build-system)
10464 `(("python-docutils" ,python-docutils)))
10465 (home-page "https://github.com/Snaipe/python-rst-to-ansi")
10466 (synopsis "Convert RST to ANSI-decorated console output")
10468 "Python module dedicated to rendering RST (reStructuredText) documents
10469 to ansi-escaped strings suitable for display in a terminal.")
10470 (license license:expat)))
10472 (define-public python-ansi2html
10474 (name "python-ansi2html")
10479 (uri (pypi-uri "ansi2html" version))
10482 "1wa00zffprb78w1mqq90dk47czz1knanys2a40zbw2vyapd5lp9y"))))
10483 (build-system python-build-system)
10485 `(("python-mock" ,python-mock)
10486 ("python-nose" ,python-nose)))
10488 `(("python-six" ,python-six)))
10489 (home-page "https://github.com/ralphbean/ansi2html")
10490 (synopsis "Convert ANSI-decorated console output to HTML")
10492 "@command{ansi2html} is a Python library and command line utility for
10493 convering text with ANSI color codes to HTML or LaTeX.")
10494 (license license:gpl3+)))
10496 (define-public python2-ansi2html
10497 (package-with-python2 python-ansi2html))
10499 (define-public python-ddt
10501 (name "python-ddt")
10506 (uri (pypi-uri "ddt" version))
10509 "1wqkmz0yhanly8sif5vb02p2iik7mwxwph8ywph2kbb8ws8szdpx"))))
10510 (build-system python-build-system)
10512 `(("python-mock" ,python-mock)
10513 ("python-nose" ,python-nose)))
10515 `(("python-six" ,python-six)
10516 ("python-pyyaml" ,python-pyyaml)))
10517 (home-page "https://github.com/txels/ddt")
10518 (synopsis "Data-Driven Tests")
10520 "Data-Driven Tests (@dfn{DDT}) allow you to multiply one test case by
10521 running it with different test data, and make it appear as multiple test
10523 (license license:expat)))
10525 (define-public python2-ddt
10526 (package-with-python2 python-ddt))
10528 (define-public python-pycosat
10530 (name "python-pycosat")
10535 (uri (pypi-uri "pycosat" version))
10538 "1kl3wh1f47rc712n4bmwplbx3fqz3x9i1b587jrbpmvdva4c8f6l"))))
10539 ;; TODO: Unundle picosat. http://fmv.jku.at/picosat/
10540 (build-system python-build-system)
10541 (home-page "https://github.com/ContinuumIO/pycosat")
10542 (synopsis "Bindings to picosat (a SAT solver)")
10544 "This package provides efficient Python bindings to @code{picosat} on
10545 the C level. When importing pycosat, the @code{picosat} solver becomes part
10546 of the Python process itself. @code{picosat} is a @dfn{Boolean Satisfiability
10547 Problem} (SAT) solver.")
10548 (license license:expat)))
10550 (define-public python2-pycosat
10551 (package-with-python2 python-pycosat))
10553 (define-public python2-ruamel.ordereddict
10555 (name "python2-ruamel.ordereddict")
10560 (uri (pypi-uri "ruamel.ordereddict" version))
10563 "1xmkl8v9l9inm2pyxgc1fm5005yxm7fkd5gv74q7lj1iy5qc8n3h"))))
10564 (build-system python-build-system)
10566 `(#:python ,python-2
10568 (modify-phases %standard-phases
10570 (add-after 'install 'check
10571 (lambda* (#:key inputs outputs #:allow-other-keys)
10572 (add-installed-pythonpath inputs outputs)
10573 (zero? (system* "python" "test/testordereddict.py")))))))
10574 (home-page "https://bitbucket.org/ruamel/ordereddict")
10575 (synopsis "Version of dict that keeps keys in insertion order")
10577 "This is an implementation of an ordered dictionary with @dfn{Key
10578 Insertion Order} (KIO: updates of values do not affect the position of the
10579 key), @dfn{Key Value Insertion Order} (KVIO, an existing key's position is
10580 removed and put at the back). The standard library module @code{OrderedDict},
10581 implemented later, implements a subset of @code{ordereddict} functionality.
10582 Sorted dictionaries are also provided. Currently only with @dfn{Key Sorted
10583 Order} (KSO, no sorting function can be specified, but a transform can be
10584 specified to apply on the key before comparison (e.g. @code{string.lower})).")
10585 (license license:expat)))
10587 (define-public python-pypeg2
10589 (name "python-pypeg2")
10594 (uri (pypi-uri "pyPEG2" version))
10597 "0v8ziaam2r637v94ra4dbjw6jzxz99gs5x4i585kgag1v204yb9b"))))
10598 (build-system python-build-system)
10599 (propagated-inputs `(("python-lxml" ,python-lxml)))
10601 ;;https://bitbucket.org/fdik/pypeg/issues/36/test-failures-on-py35
10603 (home-page "https://fdik.org/pyPEG/")
10604 (synopsis "Parsering Expression Grammars in Python")
10605 (description "PyPEG is an intrinsic parser interpreter framework for
10606 Python. It is based on Parsing Expression Grammars, PEG. With pyPEG you can
10607 parse many formal languages.")
10608 (license license:gpl2)))
10610 (define-public python-incremental
10612 (name "python-incremental")
10617 (uri (pypi-uri "incremental" version))
10620 "1cylxdz1cnkm5g3pklna3h2n0i0rks95ir1pnpxfnvpkmab1cxbv"))))
10621 (build-system python-build-system)
10622 (home-page "https://github.com/hawkowl/incremental")
10623 (synopsis "Library for versioning Python projects")
10624 (description "Incremental is a small library that versions your Python
10626 (license license:expat)))
10628 (define-public python2-incremental
10629 (package-with-python2 python-incremental))
10631 (define-public python-automat
10633 (name "python-automat")
10637 (uri (pypi-uri "Automat" version))
10640 "1a7nsrljysfmdqmpn2apfa1gg6rfah4y9sizvns8gb08rx7d07rw"))))
10641 (build-system python-build-system)
10642 ;; We disable the tests because they require python-twisted, while
10643 ;; python-twisted depends on python-automat. Twisted is optional, but the
10644 ;; tests fail if it is not available. Also see
10645 ;; <https://github.com/glyph/automat/issues/71>.
10646 (arguments '(#:tests? #f))
10648 `(("python-m2r" ,python-m2r)
10649 ("python-setuptools-scm" ,python-setuptools-scm)
10650 ("python-graphviz" ,python-graphviz)))
10652 `(("python-six" ,python-six)
10653 ("python-attrs" ,python-attrs)))
10654 (home-page "https://github.com/glyph/Automat")
10655 (synopsis "Self-service finite-state machines")
10656 (description "Automat is a library for concise, idiomatic Python
10657 expression of finite-state automata (particularly deterministic finite-state
10659 (license license:expat)))
10661 (define-public python2-automat
10662 (package-with-python2 python-automat))
10664 (define-public python-m2r
10666 (name "python-m2r")
10670 (uri (pypi-uri "m2r" version))
10673 "1axrwnf425sz4qz3c0qc7yhhki4myzb8rki7pczcsgzznzmqdyxd"))))
10674 (build-system python-build-system)
10676 `(("python-docutils" ,python-docutils)
10677 ("python-mistune" ,python-mistune)))
10679 `(("python-pygments" ,python-pygments)
10680 ("python-mock" ,python-mock)))
10681 (home-page "https://github.com/miyakogi/m2r")
10682 (synopsis "Markdown to reStructuredText converter")
10683 (description "M2R converts a markdown file including reST markups to valid
10685 (license license:expat)))
10687 (define-public python2-m2r
10688 (package-with-python2 python-m2r))
10690 (define-public python-constantly
10692 (name "python-constantly")
10696 (uri (pypi-uri "constantly" version))
10699 "0dgwdla5kfpqz83hfril716inm41hgn9skxskvi77605jbmp4qsq"))))
10700 (build-system python-build-system)
10701 (home-page "https://github.com/twisted/constantly")
10702 (synopsis "Symbolic constants in Python")
10703 (description "Constantly is a Python library that provides symbolic
10704 constant support. It includes collections and constants with text, numeric,
10705 and bit flag values.")
10706 (license license:expat)))
10708 (define-public python2-constantly
10709 (package-with-python2 python-constantly))
10711 (define-public python-attrs
10713 (name "python-attrs")
10717 (uri (pypi-uri "attrs" version))
10720 "04gx08ikpk26wnq22f7l42gapcvk8iz1512r927k6sadz6cinkax"))))
10721 (build-system python-build-system)
10723 `(("python-pytest" ,python-pytest)
10724 ("python-hypothesis" ,python-hypothesis)
10725 ("python-zope-interface" ,python-zope-interface)
10726 ("python-six" ,python-six)))
10727 (home-page "https://github.com/python-attrs/attrs/")
10728 (synopsis "Attributes without boilerplate")
10729 (description "@code{attrs} is a Python package with class decorators that
10730 ease the chores of implementing the most common attribute-related object
10732 (license license:expat)))
10734 (define-public python2-attrs
10735 (package-with-python2 python-attrs))
10737 (define-public python2-cliapp
10739 (name "python2-cliapp")
10740 (version "1.20170823")
10744 (uri (string-append
10745 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/cliapp/snapshot/cliapp-"
10746 version ".tar.gz"))
10749 "1i9gik0xrj6jmi95s5w988jl1y265baz5xm5pbqdyvsh8h9ln6yq"))))
10750 (build-system python-build-system)
10752 `(#:python ,python-2
10754 (modify-phases %standard-phases
10755 ;; check phase needs to be run before the build phase. If not,
10756 ;; coverage-test-runner looks for tests for the built source files,
10759 (add-before 'build 'check
10761 ;; Disable python3 tests
10762 (substitute* "check"
10763 (("python3") "# python3"))
10764 (zero? (system* "./check")))))))
10766 `(("python2-coverage-test-runner" ,python2-coverage-test-runner)
10767 ("python2-pep8" ,python2-pep8)))
10769 `(("python2-pyaml" ,python2-pyaml)))
10770 (home-page "https://liw.fi/cliapp/")
10771 (synopsis "Python framework for command line programs")
10772 (description "@code{python2-cliapp} is a python framework for
10773 command line programs. It contains the typical stuff such programs
10774 need to do, such as parsing the command line for options, and
10775 iterating over input files.")
10776 (license license:gpl2+)))
10778 (define-public python2-ttystatus
10780 (name "python2-ttystatus")
10785 (uri (string-append
10786 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/ttystatus/snapshot/ttystatus-"
10787 version ".tar.gz"))
10790 "0vivqbw7ddhsq1zj3g9cvvv4f0phl0pis2smsnwcr2szz2fk3hl6"))))
10791 (build-system python-build-system)
10793 `(("python2-coverage-test-runner" ,python2-coverage-test-runner)
10794 ("python2-pep8" ,python2-pep8)))
10796 `(#:python ,python-2
10798 (modify-phases %standard-phases
10799 ;; check phase needs to be run before the build phase. If not,
10800 ;; coverage-test-runner looks for tests for the built source files,
10803 (add-before 'build 'check
10805 (zero? (system* "make" "check")))))))
10806 (home-page "https://liw.fi/ttystatus/")
10807 (synopsis "Python library for showing progress reporting and
10808 status updates on terminals")
10809 (description "@code{python2-ttystatus} is a python library for
10810 showing progress reporting and status updates on terminals, for
10811 command line programs. Output is automatically adapted to the width
10812 of the terminal: truncated if it does not fit, and resized if the
10813 terminal size changes.")
10814 (license license:gpl3+)))
10816 (define-public python2-tracing
10818 (name "python2-tracing")
10823 (uri (string-append
10824 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/python-tracing/snapshot/tracing-"
10825 version ".tar.gz"))
10828 "06cw4zg42fsvqy372vi2whj26w56vzg5axhzwdjc2bgwf03garbw"))))
10829 (build-system python-build-system)
10831 `(#:python ,python-2))
10832 (home-page "https://liw.fi/tracing/")
10833 (synopsis "Python debug logging helper")
10834 (description "@code{python2-tracing} is a python library for
10835 logging debug messages. It provides a way to turn debugging messages
10836 on and off, based on the filename they occur in. It is much faster
10837 than using @code{logging.Filter} to accomplish the same thing, which
10838 matters when code is run in production mode. The actual logging still
10839 happens using the @code{logging} library.")
10840 (license license:gpl3+)))
10842 (define-public python2-larch
10844 (name "python2-larch")
10845 (version "1.20151025")
10849 (uri (string-append
10850 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/larch/snapshot/larch-"
10851 version ".tar.gz"))
10852 (patches (search-patches
10853 "python2-larch-coverage-4.0a6-compatibility.patch"))
10856 "1p4knkkavlqymgciz2wbcnfrdgdbafhg14maplnk4vbw0q8xs663"))))
10857 (build-system python-build-system)
10859 `(#:python ,python-2
10861 (modify-phases %standard-phases
10862 ;; check phase needs to be run before the build phase. If not,
10863 ;; coverage-test-runner looks for tests for the built source files,
10866 (add-before 'build 'check
10868 (zero? (system* "make" "check")))))))
10870 `(("cmdtest" ,cmdtest)
10871 ("python2-coverage-test-runner" ,python2-coverage-test-runner)))
10873 `(("python2-tracing" ,python2-tracing)))
10874 (home-page "https://liw.fi/larch/")
10875 (synopsis "Python copy-on-write B-tree library")
10876 (description "@code{python2-larch} is an implementation of
10877 particular kind of B-tree, based on research by Ohad Rodeh. See
10878 @url{http://liw.fi/larch/ohad-btrees-shadowing-clones.pdf} for details
10879 on the data structure.
10881 The distinctive feature of this B-tree is that a node is never
10882 (conceptually) modified. Instead, all updates are done by
10883 copy-on-write. This makes it easy to clone a tree, and modify only the
10884 clone, while other processes access the original tree.")
10885 (license license:gpl3+)))
10887 (define-public python-astroid
10889 (name "python-astroid")
10894 (uri (string-append
10895 "https://github.com/PyCQA/astroid/archive/astroid-"
10896 version ".tar.gz"))
10899 "0isn5p7f9n48hmksgbrj7dkm9dyglnayzn5jngk37qywg8a74ngn"))))
10900 (build-system python-build-system)
10902 `(("python-lazy-object-proxy" ,python-lazy-object-proxy)
10903 ("python-six" ,python-six)
10904 ("python-wrapt" ,python-wrapt)))
10907 (modify-phases %standard-phases
10910 (zero? (system* "python" "-m" "unittest" "discover"
10911 "-p" "unittest*.py")))))))
10912 (home-page "https://github.com/PyCQA/astroid")
10913 (synopsis "Common base representation of python source code for pylint and
10915 (description "@code{python-astroid} provides a common base representation
10916 of python source code for projects such as pychecker, pyreverse, pylint, etc.
10918 It provides a compatible representation which comes from the _ast module. It
10919 rebuilds the tree generated by the builtin _ast module by recursively walking
10920 down the AST and building an extended ast. The new node classes have
10921 additional methods and attributes for different usages. They include some
10922 support for static inference and local name scopes. Furthermore, astroid
10923 builds partial trees by inspecting living objects.")
10924 (license license:lgpl2.1+)
10925 (properties `((python2-variant . ,(delay python2-astroid))))))
10927 (define-public python2-astroid
10928 (let ((base (package-with-python2
10929 (strip-python2-variant python-astroid))))
10930 (package (inherit base)
10932 `(("python2-backports-functools-lru-cache"
10933 ,python2-backports-functools-lru-cache)
10934 ("python2-enum34" ,python2-enum34)
10935 ("python2-singledispatch" ,python2-singledispatch)
10936 ,@(package-propagated-inputs base))))))
10938 (define-public python-isort
10940 (name "python-isort")
10945 (uri (string-append
10946 "https://github.com/timothycrosley/isort/archive/"
10947 version ".tar.gz"))
10948 (file-name (string-append name "-" version ".tar.gz"))
10951 "0zsrgkb0krn5476yncy5dd56k7dk34zqb4bnlvwy44ixgilyjmfh"))))
10952 (build-system python-build-system)
10954 `(("python-mock" ,python-mock)
10955 ("python-pytest" ,python-pytest)))
10956 (home-page "https://github.com/timothycrosley/isort")
10957 (synopsis "Python utility/library to sort python imports")
10958 (description "@code{python-isort} is a python utility/library to sort
10959 imports alphabetically, and automatically separated into sections. It
10960 provides a command line utility, a python library and plugins for various
10962 (license license:expat)))
10964 (define-public python2-isort
10965 (package-with-python2 python-isort))
10967 (define-public python2-backports-functools-lru-cache
10969 (name "python2-backports-functools-lru-cache")
10974 ;; only the pypi tarballs contain the necessary metadata
10975 (uri (pypi-uri "backports.functools_lru_cache" version))
10978 "158ysf2hb0q4p4695abfiym9x1ywg0dgh8a3apd7gqaaxjy22jj4"))))
10979 (build-system python-build-system)
10981 `(("python2-setuptools-scm" ,python2-setuptools-scm)))
10983 `(#:python ,python-2))
10984 (home-page "https://github.com/jaraco/backports.functools_lru_cache")
10985 (synopsis "Backport of functools.lru_cache from Python 3.3")
10986 (description "@code{python2-backports-functools-lru-cache} is a backport
10987 of @code{functools.lru_cache} from python 3.3.")
10988 (license license:expat)))
10990 (define-public python-configparser
10992 (name "python-configparser")
10997 (uri (string-append
10998 "https://bitbucket.org/ambv/configparser/get/"
10999 version ".tar.bz2"))
11000 (file-name (string-append name "-" version ".tar.gz"))
11003 "0waq40as14abwzbb321hfz4vr1fi363nscy32ga14qvfygrg96wa"))))
11004 (build-system python-build-system)
11005 (home-page "http://docs.python.org/py3k/library/configparser.html")
11006 (synopsis "Backport of configparser from python 3.5")
11007 (description "@code{python-configparser} is a backport of
11008 @code{configparser} from Python 3.5 so that it can be used directly
11009 in other versions.")
11010 (license license:expat)))
11012 (define-public python2-configparser
11013 (package-with-python2 python-configparser))
11015 (define-public python-mando
11017 (name "python-mando")
11021 (uri (pypi-uri "mando" version))
11024 "0q6rl085q1hw1wic52pqfndr0x3nirbxnhqj9akdm5zhq2fv3zkr"))))
11025 (build-system python-build-system)
11027 `(("python-rst2ansi" ,python-rst2ansi)
11028 ("python-six" ,python-six)))
11030 `(("python-pytest" ,python-pytest)))
11031 (home-page "https://mando.readthedocs.org/")
11033 "Wrapper around argparse, allowing creation of complete CLI applications")
11035 "This package is a wrapper around argparse, allowing you to write complete CLI
11036 applications in seconds while maintaining all the flexibility.")
11037 (license license:expat)))
11039 (define-public python2-mando
11040 (package-with-python2 python-mando))
11042 (define-public python-fudge
11044 (name "python-fudge")
11045 ;; 0.9.6 is the latest version suitable for testing the "fabric" Python 2
11046 ;; package, which is currently the only use of this package.
11051 (uri (pypi-uri "fudge" version))
11054 "185ia3vr3qk4f2s1a9hdxb8ci4qc0x0xidrad96pywg8j930qs9l"))))
11055 (build-system python-build-system)
11057 `(#:tests? #f)) ;XXX: Tests require the NoseJS Python package.
11058 (home-page "https://github.com/fudge-py/fudge")
11059 (synopsis "Replace real objects with fakes/mocks/stubs while testing")
11061 "Fudge is a Python module for using fake objects (mocks and stubs) to
11064 In readable Python code, you declare the methods available on your fake object
11065 and how they should be called. Then you inject that into your application and
11066 start testing. This declarative approach means you don’t have to record and
11067 playback actions and you don’t have to inspect your fakes after running code.
11068 If the fake object was used incorrectly then you’ll see an informative
11069 exception message with a traceback that points to the culprit.")
11070 (license license:expat)))
11072 (define-public python2-fudge
11073 (package-with-python2 python-fudge))
11075 (define-public python-mwclient
11077 (name "python-mwclient")
11082 ;; The PyPI version wouldn't contain tests.
11083 (uri (string-append "https://github.com/mwclient/mwclient/archive/"
11084 "v" version ".tar.gz"))
11085 (file-name (string-append name "-" version ".tar.gz"))
11088 "1jj0yhilkjir00719fc7w133x7hdyhkxhk6xblla4asig45klsfv"))))
11089 (build-system python-build-system)
11091 `(("python-requests" ,python-requests)
11092 ("python-requests-oauthlib"
11093 ,python-requests-oauthlib)
11094 ("python-six" ,python-six)))
11096 `(("python-mock" ,python-mock)
11097 ("python-pytest" ,python-pytest)
11098 ("python-pytest-pep8" ,python-pytest-pep8)
11099 ("python-pytest-cache" ,python-pytest-cache)
11100 ("python-pytest-cov" ,python-pytest-cov)
11101 ("python-responses" ,python-responses)))
11102 (home-page "https://github.com/btongminh/mwclient")
11103 (synopsis "MediaWiki API client")
11104 (description "This package provides a MediaWiki API client.")
11105 (license license:expat)))
11107 (define-public python2-mwclient
11108 (package-with-python2 python-mwclient))
11110 (define-public python-utils
11112 (name "python-utils")
11116 (uri (pypi-uri "python-utils" version))
11119 "1mcsy6q5am4ya72rgkpb6kax6vv7c93cfkkas89xnpa4sj9zf28p"))))
11120 (build-system python-build-system)
11122 `(("pytest-runner" ,python-pytest-runner)
11123 ("pytest" ,python-pytest)
11124 ("six" ,python-six)))
11125 (home-page "https://github.com/WoLpH/python-utils")
11126 (synopsis "Convenient utilities not included with the standard Python install")
11128 "Python Utils is a collection of small Python functions and classes which
11129 make common patterns shorter and easier.")
11130 (license license:bsd-2)))
11132 (define-public python2-utils
11133 (package-with-python2 python-utils))
11135 (define-public python-sphinx-me
11137 (name "python-sphinx-me")
11142 (uri (pypi-uri "sphinx-me" version))
11145 "06jzgp213zihnvpcy2y5jy3ykid3apc2ncp2pg6a2g05lhiziglq"))))
11146 (build-system python-build-system)
11147 (home-page "https://github.com/stephenmcd/sphinx-me")
11148 (synopsis "Create a Sphinx documentation shell")
11150 "Create a Sphinx documentation shell for your project and include the
11151 README file as the documentation index. It handles extracting the required
11152 meta data such as the project name, author and version from your project for
11153 use in your Sphinx docs.")
11154 (license license:bsd-2)))
11156 (define-public python2-sphinx-me
11157 (package-with-python2 python-sphinx-me))
11159 (define-public python-diff-match-patch
11161 (name "python-diff-match-patch")
11162 (version "20121119")
11166 (uri (pypi-uri "diff-match-patch" version))
11169 "0k1f3v8nbidcmmrk65m7h8v41jqi37653za9fcs96y7jzc8mdflx"))))
11170 (build-system python-build-system)
11171 (home-page "https://code.google.com/p/google-diff-match-patch")
11172 (synopsis "Synchronize plain text")
11173 (description "Diff Match and Patch libraries offer robust algorithms to
11174 perform the operations required for synchronizing plain text.")
11175 (license license:asl2.0)))
11177 (define-public python2-diff-match-patch
11178 (package-with-python2 python-diff-match-patch))
11180 (define-public python-dirsync
11182 (name "python-dirsync")
11187 (uri (pypi-uri "dirsync" version ".zip"))
11190 "1hcdvmkwd5512zbxpin0k7bx5bkgzy3swjx7d0kj1y45af6r75v2"))))
11191 (build-system python-build-system)
11193 `(("unzip" ,unzip)))
11195 `(("six" ,python-six)))
11196 (home-page "https://bitbucket.org/tkhyn/dirsync")
11197 (synopsis "Advanced directory tree synchronisation tool")
11198 (description "Advanced directory tree synchronisation tool.")
11199 (license license:expat)))
11201 (define-public python2-dirsync
11202 (package-with-python2 python-dirsync))
11204 (define-public python-levenshtein
11206 (name "python-levenshtein")
11211 (uri (pypi-uri "python-Levenshtein" version))
11214 "1c9ybqcja31nghfcc8xxbbz9h60s9qi12b9hr4jyl69xbvg12fh3"))))
11215 (build-system python-build-system)
11216 (home-page "https://github.com/ztane/python-Levenshtein")
11217 (synopsis "Fast computation of Levenshtein distance and string similarity")
11219 "The Levenshtein Python C extension module contains functions for fast computation of
11221 @item Levenshtein (edit) distance, and edit operations
11222 @item string similarity
11223 @item approximate median strings, and generally string averaging
11224 @item string sequence and set similarity
11226 It supports both normal and Unicode strings.")
11227 (license license:gpl2+)))
11229 (define-public python2-levenshtein
11230 (package-with-python2 python-levenshtein))
11232 (define-public python-scandir
11234 (name "python-scandir")
11239 (uri (pypi-uri "scandir" version))
11241 (base32 "0gbnhjzg42rj87ljv9kb648rfxph69ly3c8r9841dxy4d7l5pmdj"))))
11242 (build-system python-build-system)
11244 `(#:phases (modify-phases %standard-phases
11247 (invoke "python" "test/run_tests.py"))))))
11248 (home-page "https://github.com/benhoyt/scandir")
11249 (synopsis "Directory iteration function")
11251 "Directory iteration function like os.listdir(), except that instead of
11252 returning a list of bare filenames, it yields DirEntry objects that include
11253 file type and stat information along with the name. Using scandir() increases
11254 the speed of os.walk() by 2-20 times (depending on the platform and file
11255 system) by avoiding unnecessary calls to os.stat() in most cases.
11257 This package is part of the Python standard library since version 3.5.")
11258 (license license:bsd-3)))
11260 (define-public python2-scandir
11261 (package-with-python2 python-scandir))
11263 (define-public python2-stemming
11265 (name "python2-stemming")
11270 (uri (pypi-uri "stemming" version))
11272 (base32 "0ldwa24gnnxhniv0fhygkpc2mwgd93q10ag8rvzayv6hw418frsr"))))
11273 (build-system python-build-system)
11275 `(#:python ,python-2))
11276 (home-page "https://bitbucket.org/mchaput/stemming/overview")
11277 (synopsis "Python implementations of various stemming algorithms")
11279 "Python implementations of the Porter, Porter2, Paice-Husk, and Lovins
11280 stemming algorithms for English. These implementations are straightforward and
11281 efficient, unlike some Python versions of the same algorithms available on the
11282 Web. This package is an extraction of the stemming code included in the Whoosh
11284 (license license:public-domain)))
11286 (define-public python-factory-boy
11288 (name "python-factory-boy")
11293 (uri (pypi-uri "factory_boy" version))
11295 (base32 "1fvin6san5xsjh2c4y18caj2lnmwxlylyqm8mh1yc6rp38wlwr56"))))
11296 (build-system python-build-system)
11298 ;; Tests are not included in the tarball.
11301 `(("faker" ,python-faker)))
11302 (home-page "https://github.com/benhoyt/scandir")
11303 (synopsis "Versatile test fixtures replacement")
11305 "Factory_boy is a fixtures replacement based on thoughtbot’s factory_girl.
11307 As a fixtures replacement tool, it aims to replace static, hard to maintain
11308 fixtures with easy-to-use factories for complex object.
11310 Instead of building an exhaustive test setup with every possible combination
11311 of corner cases, factory_boy allows you to use objects customized for the
11312 current test, while only declaring the test-specific fields")
11313 (license license:expat)))
11315 (define-public python2-factory-boy
11316 (package-with-python2 python-factory-boy))
11318 (define-public python-translate-toolkit
11320 (name "python-translate-toolkit")
11325 (uri (pypi-uri "translate-toolkit" version ".tar.bz2"))
11327 (base32 "1vlkwrg83vb17jc36pmwh2b7jphwf390lz0jw8hakcg16qhwypvq"))))
11328 (build-system python-build-system)
11330 `(("python-pytest" ,python-pytest)
11331 ("python-sphinx" ,python-sphinx)))
11333 `(("python-babel" ,python-babel)
11334 ("python-beautifulsoup4" ,python-beautifulsoup4)
11335 ("python-chardet" ,python-chardet)
11336 ("python-diff-match-patch" ,python-diff-match-patch)
11337 ("python-levenshtein" ,python-levenshtein)
11338 ("python-lxml" ,python-lxml)
11339 ("python-six" ,python-six)
11340 ("python-vobject" ,python-vobject)
11341 ("python-pyyaml" ,python-pyyaml)))
11343 ;; TODO: tests are not run, because they end with
11344 ;; TypeError: parse() missing 2 required positional arguments: 'tree' and
11346 ;; during test setup.
11348 (home-page "http://toolkit.translatehouse.org")
11349 (synopsis "Tools and API for translation and localization engineering")
11351 "Tools and API for translation and localization engineering. It contains
11352 several utilities, as well as an API for building localization tools.")
11353 (license license:gpl2+)))
11355 (define-public python2-translate-toolkit
11356 (package-with-python2 python-translate-toolkit))
11358 (define-public python-packaging
11360 (name "python-packaging")
11365 (uri (pypi-uri "packaging" version))
11368 "17k1xbjshackwvbsnxqixbph8rbqhz4bf4g3al5xyzhavxgq6l2x"))))
11369 (build-system python-build-system)
11371 `(("python-pretend" ,python-pretend)
11372 ("python-pytest" ,python-pytest)))
11374 `(("python-pyparsing" ,python-pyparsing)
11375 ("python-six" ,python-six)))
11376 (home-page "https://github.com/pypa/packaging")
11377 (synopsis "Core utilities for Python packages")
11378 (description "Packaging is a Python module for dealing with Python packages.
11379 It offers an interface for working with package versions, names, and dependency
11381 ;; From 'LICENSE': This software is made available under the terms of
11382 ;; *either* of the licenses found in LICENSE.APACHE or LICENSE.BSD.
11383 ;; Contributions to this software is made under the terms of *both* these
11385 (license (list license:asl2.0 license:bsd-2))))
11387 (define-public python2-packaging
11388 (package-with-python2 python-packaging))
11390 (define-public python-relatorio
11392 (name "python-relatorio")
11397 (uri (pypi-uri "relatorio" version))
11400 "1na6hlhz1awi1hbjg1gyclq0khz42iz90wvdjw7mmj655788bpxx"))))
11401 (build-system python-build-system)
11403 `(("python-lxml" ,python-lxml)
11404 ("python-genshi" ,python-genshi)))
11406 `(("python-magic" ,python-magic)))
11407 (home-page "https://relatorio.tryton.org/")
11408 (synopsis "Templating library able to output ODT and PDF files")
11409 (description "Relatorio is a templating library which provides a way to
11410 easily output ODT, ODS, PNG, SVG and several other kinds of files. Support
11411 for more filetypes can be easily added by creating plugins for them.")
11412 (license license:gpl3+)))
11414 (define-public python2-relatorio
11415 (package-with-python2 python-relatorio))
11417 (define-public python-radon
11419 (name "python-radon")
11424 (uri (pypi-uri "radon" version))
11427 "07gq5hq4nrffxnlnksws9hrx7fd001gam63j62i82gyfr23gvdym"))))
11428 (build-system python-build-system)
11430 `(#:phases (modify-phases %standard-phases
11433 (invoke "python" "radon/tests/run.py"))))))
11435 `(("python-colorama" ,python-colorama)
11436 ("python-flake8-polyfill" ,python-flake8-polyfill)
11437 ("python-mando" ,python-mando)))
11439 `(("python-pytest" ,python-pytest)
11440 ("python-pytest-mock" ,python-pytest-mock)))
11441 (home-page "https://radon.readthedocs.org/")
11442 (synopsis "Code Metrics in Python")
11443 (description "Radon is a Python tool which computes various code metrics.
11444 Supported metrics are:
11446 @item raw metrics: SLOC, comment lines, blank lines, &c.
11447 @item Cyclomatic Complexity (i.e. McCabe’s Complexity)
11448 @item Halstead metrics (all of them)
11449 @item the Maintainability Index (a Visual Studio metric)
11451 (license license:expat)))
11453 (define-public python2-radon
11454 (package-with-python2 python-radon))
11456 (define-public python-sure
11458 (name "python-sure")
11463 (uri (pypi-uri "sure" version))
11466 "1iyqsy2d6radi88g1qf0lziy5b39h5cpb3g5jiqyb4xi46ig3x1z"))))
11467 (build-system python-build-system)
11469 `(("python-mock" ,python-mock)
11470 ("python-six" ,python-six)))
11472 `(("python-nose" ,python-nose)))
11473 (home-page "https://github.com/gabrielfalcao/sure")
11474 (synopsis "Automated testing library in python for python")
11476 "Sure is a python library that leverages a DSL for writing assertions.
11477 Sure is heavily inspired by @code{RSpec Expectations} and @code{should.js}.")
11478 (license license:gpl3+)))
11480 (define-public python2-sure
11481 (package-with-python2 python-sure))
11483 (define-public python2-couleur
11484 ;; This package does not seem to support python3 at all, hence,
11485 ;; only the python2 variant definition is provided.
11487 (name "python2-couleur")
11492 (uri (pypi-uri "couleur" version))
11495 "1qqaxyqz74wvid0cr119dhcwz0h0if5b5by44zl49pd5z65v58k1"))))
11496 (build-system python-build-system)
11498 `(#:python ,python-2))
11499 (home-page "https://github.com/gabrielfalcao/couleur")
11501 "ANSI terminal tool for python, colored shell and other handy fancy features")
11503 "@code{Couleur} provides python programs a way to use the ANSI features in a unix
11504 terminal such as coloured output in the shell, overwriting output, indentation, etc.")
11505 ;; README.md says ASL2.0, but all source code headers are LGPL3+.
11506 ;; https://github.com/gabrielfalcao/couleur/issues/11
11507 (license license:lgpl3+)))
11509 (define-public python-misaka
11511 (name "python-misaka")
11516 (uri (pypi-uri "misaka" version))
11519 "1yqrq3a5rracirmvk52n28nn6ckdaz897gnigv89a9gmyn87sqw7"))))
11520 (build-system python-build-system)
11522 `(;; Line 37 of setup.py calls self.run_command('develop')
11523 ;; in the 'check' phase. This command seems to be trying
11525 ;; /gnu/store/...-python-<version>/lib/python<version>/site-packages/
11526 ;; for which it does not have the permission to write.
11529 `(("python-cffi" ,python-cffi)))
11530 (home-page "https://github.com/FSX/misaka")
11531 (synopsis "Python binding for Hoedown")
11533 "@code{Misaka} is a CFFI-based binding for @code{Hoedown}, a fast markdown processing
11534 library written in C. It features a fast HTML renderer and functionality to make custom
11535 renderers (e.g. man pages or LaTeX).")
11536 (license license:expat)))
11538 (define-public python2-misaka
11539 (package-with-python2 python-misaka))
11541 (define-public python2-steadymark
11542 ;; This is forced into being a python2 only variant
11543 ;; due to its dependence on couleur that has no support
11546 (name "python2-steadymark")
11551 (uri (pypi-uri "steadymark" version))
11554 "1640i9g8dycql3cc8j0bky0jkzj0q39blfbp4lsgpkprkfgcdk8v"))))
11555 (build-system python-build-system)
11557 `(("python-couleur" ,python2-couleur)
11558 ("python-sure" ,python2-sure)
11559 ("python-misaka" ,python2-misaka)))
11561 `(#:python ,python-2
11563 (modify-phases %standard-phases
11564 (add-before 'build 'patch-setup-py
11566 ;; Update requirements from dependency==version
11567 ;; to dependency>=version
11568 (substitute* "setup.py"
11571 (home-page "https://github.com/gabrielfalcao/steadymark")
11572 (synopsis "Markdown-based test runner for python")
11574 "@code{Steadymark} allows documentation to be written in github-flavoured
11575 markdown. The documentation may contain snippets of code surrounded by python
11576 code blocks and @code{Steadymark} will find these snippets and run them, making
11577 sure that there are no old malfunctional examples in the documentation examples.")
11578 (license license:expat)))
11580 (define-public python-jsonpointer
11582 (name "python-jsonpointer")
11587 (uri (pypi-uri "jsonpointer" version))
11590 "1cg0gvgqjysydv6p45v4jywg1jb3v48c7m3cbpi57zgf6nndr9cz"))))
11591 (build-system python-build-system)
11592 (home-page "https://github.com/stefankoegl/python-json-pointer")
11593 (synopsis "Identify specific nodes in a JSON document")
11594 (description "@code{jsonpointer} allows you to access specific nodes
11595 by path in a JSON document (see RFC 6901).")
11596 (license license:bsd-3)))
11598 (define-public python2-jsonpointer
11599 (package-with-python2 python-jsonpointer))
11601 (define-public python-jsonpatch
11603 (name "python-jsonpatch")
11608 ;; pypi version lacks tests.js
11609 (uri (string-append "https://github.com/stefankoegl/python-json-patch/"
11610 "archive/v" version ".tar.gz"))
11611 (file-name (string-append name "-" version ".tar.gz"))
11614 "085ykisl8v7mv9h7hvhdy3l2fjzs4214gx32r5k6nx4f76hbv6y5"))))
11615 (build-system python-build-system)
11617 `(("python-jsonpointer" ,python-jsonpointer)))
11618 (home-page "https://github.com/stefankoegl/python-json-patch")
11619 (synopsis "Applying JSON Patches in Python 2.6+ and 3.x")
11620 (description "@code{jsonpatch} is a library and program that allows
11621 applying JSON Patches according to RFC 6902.")
11622 (license license:bsd-3)))
11624 (define-public python2-jsonpatch
11625 (package-with-python2 python-jsonpatch))
11627 (define-public python-jsonpatch-0.4
11628 (package (inherit python-jsonpatch)
11629 (name "python-jsonpatch")
11634 (uri (string-append "https://github.com/stefankoegl/python-json-patch/"
11635 "archive/v" version ".tar.gz"))
11636 (file-name (string-append name "-" version ".tar.gz"))
11639 "0j0cd9z9zyp8kppp464jxrfgrnbgkzl1yi10i5gsv8yz6d95929d"))))))
11641 (define-public python2-jsonpatch-0.4
11642 (package-with-python2 python-jsonpatch-0.4))
11644 (define-public python-rfc3986
11646 (name "python-rfc3986")
11650 (uri (pypi-uri "rfc3986" version))
11653 "06wlmysw83f75ff84zr1yr6n0shvc2xn1n1sb4iwzqap9hf5fn44"))))
11654 (build-system python-build-system)
11656 `(#:modules ((guix build utils)
11657 (guix build python-build-system)
11662 (modify-phases %standard-phases
11665 (let ((cwd (getcwd)))
11666 (setenv "PYTHONPATH"
11667 (string-append cwd "/build/"
11668 (find (cut string-prefix? "lib" <>)
11669 (scandir (string-append cwd "/build")))
11671 (getenv "PYTHONPATH")))
11672 (invoke "pytest" "-v")))))))
11674 `(("python-pytest" ,python-pytest)))
11675 (home-page "https://rfc3986.readthedocs.io/")
11676 (synopsis "Parse and validate URI references")
11678 "@code{rfc3986} is a Python implementation of RFC@tie{}3986 including
11679 validation and authority parsing. This module also supports RFC@tie{}6874
11680 which adds support for zone identifiers to IPv6 addresses.")
11681 (license license:asl2.0)))
11683 (define-public python2-rfc3986
11684 (package-with-python2 python-rfc3986))
11686 (define-public python-rfc3987
11688 (name "python-rfc3987")
11693 (uri (pypi-uri "rfc3987" version))
11696 "192pclzs2y0yaywqkrlvd0x73740q310kvqvm6jldhi619mq59wi"))))
11697 (build-system python-build-system)
11698 (home-page "https://pypi.python.org/pypi/rfc3987")
11699 (synopsis "Parsing and validation of URIs (RFC 3986) and IRIs (RFC 3987)")
11700 (description "@code{rfc3987} provides routines for parsing and
11701 validation of URIs (see RFC 3986) and IRIs (see RFC 3987).")
11702 (license license:gpl3+)))
11704 (define-public python2-rfc3987
11705 (package-with-python2 python-rfc3987))
11707 (define-public python-validate-email
11709 (name "python-validate-email")
11714 (uri (pypi-uri "validate_email" version))
11717 "1bxffaf5yz2cph8ki55vdvdypbwkvn2xr1firlcy62vqbzf1jivq"))))
11718 (build-system python-build-system)
11719 (home-page "https://github.com/syrusakbary/validate_email")
11720 (synopsis "Verifies if an email address is valid and really exists")
11721 (description "@code{validate_email} can be used to verify if an email
11722 address is valid and really exists.")
11723 (license license:lgpl3+)))
11725 (define-public python2-validate-email
11726 (package-with-python2 python-validate-email))
11728 (define-public python-flex
11730 (name "python-flex")
11735 (uri (pypi-uri "flex" version))
11738 "00pamnwla3khk8nyla7y28dq9jnh69swd7f4jfsl7sn1izs8n8zk"))))
11739 (build-system python-build-system)
11741 `(("python-click" ,python-click)
11742 ("python-iso8601" ,python-iso8601)
11743 ("python-jsonpointer" ,python-jsonpointer)
11744 ("python-pyyaml" ,python-pyyaml)
11745 ("python-requests" ,python-requests)
11746 ("python-rfc3987" ,python-rfc3987)
11747 ("python-six" ,python-six)
11748 ("python-validate-email" ,python-validate-email)))
11749 (home-page "https://github.com/pipermerriam/flex")
11750 (synopsis "Validates Swagger schemata")
11751 (description "@code{flex} can be used to validate Swagger schemata.")
11752 (license license:bsd-3)))
11754 (define-public python2-flex
11755 (package-with-python2 python-flex))
11757 (define-public python-marshmallow
11759 (name "python-marshmallow")
11760 (version "3.0.0b3")
11764 (uri (pypi-uri "marshmallow" version))
11767 "07mcrij1yvk85lvgx44wwr9pc80xryghvlgayb057g1cazcypysd"))))
11768 (build-system python-build-system)
11770 `(("python-dateutil" ,python-dateutil)
11771 ("python-simplejson" ,python-simplejson)))
11773 `(("python-pytest" ,python-pytest)
11774 ("python-pytz" ,python-pytz)))
11775 (home-page "https://github.com/marshmallow-code/marshmallow")
11776 (synopsis "Convert complex datatypes to and from native
11777 Python datatypes.")
11778 (description "@code{marshmallow} provides a library for converting
11779 complex datatypes to and from native Python datatypes.")
11780 (license license:expat)))
11782 (define-public python2-marshmallow
11783 (package-with-python2 python-marshmallow))
11785 (define-public python-apispec
11787 (name "python-apispec")
11792 (uri (pypi-uri "apispec" version))
11795 "0kxa8723zbisx10363yh4mmmn4higxrspymbjfz5zq8f644zagm9"))))
11796 (build-system python-build-system)
11798 `(("python-pyyaml" ,python-pyyaml)))
11800 `(("python-pytest" ,python-pytest)
11801 ("python-flask" ,python-flask)
11802 ("python-marshmallow" ,python-marshmallow)
11803 ("python-tornado" ,python-tornado)
11804 ("python-bottle" ,python-bottle)
11805 ("python-mock" ,python-mock)))
11806 (home-page "https://github.com/marshmallow-code/apispec")
11807 (synopsis "Swagger 2.0 API specification generator")
11808 (description "@code{python-apispec} is a pluggable API specification
11809 generator. Currently supports the OpenAPI specification (f.k.a.
11811 (license license:expat)))
11813 (define-public python2-apispec
11814 (package-with-python2 python-apispec))
11816 (define-public python-flasgger
11818 (name "python-flasgger")
11823 (uri (string-append "https://github.com/rochacbruno/flasgger/archive/"
11824 version ".tar.gz"))
11825 (file-name (string-append name "-" version ".tar.gz"))
11828 "1gqzlm0rb55fdpsy5ipkganlx9cnpi454fqyycr03jm22zql14ay"))))
11829 (build-system python-build-system)
11832 (modify-phases %standard-phases
11834 (lambda* (#:key inputs outputs #:allow-other-keys)
11835 (substitute* "Makefile"
11836 (("flake8 flasgger --ignore=F403")
11837 "flake8 flasgger --ignore=E731,F403"))
11838 (setenv "PYTHONPATH" (string-append (getcwd)
11840 (getenv "PYTHONPATH")))
11841 (zero? (system* "py.test")))))))
11843 `(("python-flask" ,python-flask)
11844 ("python-pyyaml" ,python-pyyaml)
11845 ("python-jsonschema" ,python-jsonschema)
11846 ("python-mistune" ,python-mistune)
11847 ("python-six" ,python-six)))
11849 `(("python-decorator" ,python-decorator)
11850 ("python-flake8" ,python-flake8)
11851 ("python-flask-restful" ,python-flask-restful)
11852 ("python-flex" ,python-flex)
11853 ("python-pytest" ,python-pytest)
11854 ("python-pytest-cov" ,python-pytest-cov)
11855 ("python-marshmallow" ,python-marshmallow)
11856 ("python-apispec" ,python-apispec)))
11857 (home-page "https://github.com/rochacbruno/flasgger/")
11858 (synopsis "Extract Swagger specs from your Flask project")
11859 (description "@code{python-flasgger} allows extracting Swagger specs
11860 from your Flask project. It is a fork of Flask-Swagger.")
11861 (license license:expat)))
11863 (define-public python2-flasgger
11864 (package-with-python2 python-flasgger))
11866 (define-public python-swagger-spec-validator
11868 (name "python-swagger-spec-validator")
11873 (uri (pypi-uri "swagger-spec-validator" version))
11876 "13hkpn2lycwr0468yqhjb3kwszqf7hjwlq61w7vdxq1caz31k4nw"))))
11877 (build-system python-build-system)
11879 `(("python-jsonschema" ,python-jsonschema)
11880 ("python-six" ,python-six)))
11882 "https://github.com/Yelp/swagger_spec_validator")
11883 (synopsis "Validation of Swagger specifications")
11884 (description "@code{swagger_spec_validator} provides a library for
11885 validating Swagger API specifications.")
11886 (license license:asl2.0)))
11888 (define-public python2-swagger-spec-validator
11889 (package-with-python2 python-swagger-spec-validator))
11891 (define-public python-apache-libcloud
11893 (name "python-apache-libcloud")
11898 (uri (pypi-uri "apache-libcloud" version))
11901 "1a71z02ckcxld72k4qgmdnkjan52c4wczncs3p2mp5yafh7dsan7"))))
11902 (build-system python-build-system)
11905 (modify-phases %standard-phases
11906 (add-after 'unpack 'patch-ssh
11907 (lambda* (#:key inputs #:allow-other-keys)
11908 (substitute* "libcloud/compute/ssh.py"
11909 (("'ssh'") (string-append "'" (assoc-ref inputs "openssh")
11912 (add-after 'unpack 'patch-tests
11914 (substitute* "./libcloud/test/test_file_fixtures.py"
11915 ;; See <https://issues.apache.org/jira/browse/LIBCLOUD-923>.
11916 (("def _ascii") "def _raw_data(self, method, url, body, headers):
11917 return (httplib.OK,
11919 {\"test\": \"value\"},
11920 httplib.responses[httplib.OK])
11922 (substitute* "libcloud/test/compute/test_ssh_client.py"
11923 (("class ShellOutSSHClientTests")
11924 "@unittest.skip(\"Guix container doesn't have ssh service\")
11925 class ShellOutSSHClientTests")
11926 ;; See <https://issues.apache.org/jira/browse/LIBCLOUD-924>.
11927 (("'.xf0.x90.x8d.x88'") "b'\\xF0\\x90\\x8D\\x88'")
11928 (("'.xF0', '.x90', '.x8D', '.x88'")
11929 "b'\\xF0', b'\\x90', b'\\x8D', b'\\x88'"))
11932 `(("openssh" ,openssh)))
11934 `(("python-paramiko" ,python-paramiko)
11935 ("python-requests" ,python-requests)))
11937 `(("python-lockfile" ,python-lockfile)
11938 ("python-mock" ,python-mock)
11939 ("python-requests-mock" ,python-requests-mock)))
11940 (home-page "https://libcloud.apache.org/")
11941 (synopsis "Unified Cloud API")
11942 (description "@code{libcloud} is a Python library for interacting with
11943 many of the popular cloud service providers using a unified API.")
11944 (license license:asl2.0)))
11946 (define-public python2-apache-libcloud
11947 (package-with-python2 python-apache-libcloud))
11949 (define-public python-smmap2
11951 (name "python-smmap2")
11956 (uri (pypi-uri "smmap2" version))
11959 "1hvn28p3zvxa98sbi9lrqvv2ps4q284j4jq9a619zw0m7yv0sly7"))))
11960 (build-system python-build-system)
11962 `(("python-nosexcover" ,python-nosexcover)))
11963 (home-page "https://github.com/Byron/smmap")
11964 (synopsis "Python sliding window memory map manager")
11965 (description "@code{smmap2} is a pure Python implementation of a sliding
11966 window memory map manager.")
11967 (license license:bsd-3)))
11969 (define-public python2-smmap2
11970 (package-with-python2 python-smmap2))
11972 (define-public python-regex
11974 (name "python-regex")
11975 (version "2017.06.07")
11978 (uri (pypi-uri "regex" version))
11981 "06r6b7yigikbj3a72whl85r2b64pj1r0ypmw9yalmkm0wnxq8mz4"))))
11982 (build-system python-build-system)
11983 (home-page "https://bitbucket.org/mrabarnett/mrab-regex")
11984 (synopsis "Alternative regular expression module")
11985 (description "This regular expression implementation is backwards-
11986 compatible with the standard @code{re} module, but offers additional
11987 functionality like full case-folding for case-insensitive matches in Unicode.")
11988 (license license:psfl)))
11990 (define-public python2-regex
11991 (package-with-python2 python-regex))
11993 (define-public python2-pyopengl
11995 (name "python2-pyopengl")
12000 (uri (pypi-uri "PyOpenGL" version))
12003 "1byxjj6a8rwzhxhjqlc588zdad2qwxdd7vlam2653ylll31waiwv"))))
12005 `(#:python ,python-2))
12006 (build-system python-build-system)
12007 (home-page "http://pyopengl.sourceforge.net")
12008 (synopsis "Standard OpenGL bindings for Python")
12010 "PyOpenGL is the most common cross platform Python binding to OpenGL and
12011 related APIs. The binding is created using the standard @code{ctypes}
12013 (license license:bsd-3)))
12015 (define-public python2-pyopengl-accelerate
12017 (inherit python2-pyopengl)
12018 (name "python2-pyopengl-accelerate")
12023 (uri (pypi-uri "PyOpenGL-accelerate" version))
12026 "0464c1ifzk0k92lyndikmvzjgnx1y25r7bkkc8pnxm4kp1q4czwj"))))
12027 (synopsis "Acceleration code for PyOpenGL")
12029 "This is the Cython-coded accelerator module for PyOpenGL.")))
12031 (define-public python-rencode
12033 (name "python-rencode")
12038 (uri (pypi-uri "rencode" version))
12041 "08if5yax1xn5yfp8p3765ccjmfcv9di7i4m5jckgnwvdsgznwkbj"))))
12042 (build-system python-build-system)
12043 (native-inputs `(("pkg-config" ,pkg-config)
12044 ("python-cython", python-cython)))
12045 (home-page "https://github.com/aresch/rencode")
12046 (synopsis "Serialization of heterogeneous data structures")
12048 "The @code{rencode} module is a data structure serialization library,
12049 similar to @code{bencode} from the BitTorrent project. For complex,
12050 heterogeneous data structures with many small elements, r-encoding stake up
12051 significantly less space than b-encodings. This version of rencode is a
12052 complete rewrite in Cython to attempt to increase the performance over the
12053 pure Python module.")
12054 (license license:bsd-3)))
12056 (define-public python2-rencode
12057 (package-with-python2 python-rencode))
12059 (define-public python-xenon
12061 (name "python-xenon")
12066 (uri (pypi-uri "xenon" version))
12069 "14kby2y48vp3sgwxqlm5d5789yibqwb1qli5fwcmdqg3iayrbklc"))))
12070 (build-system python-build-system)
12072 `(("python-pyyaml" ,python-pyyaml)
12073 ("python-radon" ,python-radon)
12074 ("python-requests" ,python-requests)
12075 ("python-flake8" ,python-flake8)
12076 ("python-tox" ,python-tox)))
12079 (modify-phases %standard-phases
12080 (add-before 'build 'patch-test-requirements
12081 (lambda* (#:key inputs #:allow-other-keys)
12082 ;; Update requirements from dependency==version to
12083 ;; dependency>=version.
12084 (substitute* "requirements.txt"
12087 ;; Remove httpretty dependency for tests.
12088 (substitute* "setup.py"
12089 (("httpretty") ""))
12091 (home-page "https://xenon.readthedocs.org/")
12092 (synopsis "Monitor code metrics for Python on your CI server")
12094 "Xenon is a monitoring tool based on Radon. It monitors code complexity.
12095 Ideally, @code{xenon} is run every time code is committed. Through command
12096 line options, various thresholds can be set for the complexity of code. It
12097 will fail (i.e. it will exit with a non-zero exit code) when any of these
12098 requirements is not met.")
12099 (license license:expat)))
12101 (define-public python2-xenon
12102 (package-with-python2 python-xenon))
12104 (define-public python-pysocks
12106 (name "python-pysocks")
12111 (uri (pypi-uri "PySocks" version))
12114 "1krkiss578zqwcg4c8iqz1hwscwhsvy2djp3xyvps5gsgvr2j0yh"))))
12115 (build-system python-build-system)
12116 (arguments `(#:tests? #f))
12117 (home-page "https://github.com/Anorov/PySocks")
12118 (synopsis "SOCKS client module")
12119 (description "@code{pysocks} is an updated and semi-actively maintained
12120 version of @code{SocksiPy} with bug fixes and extra features.")
12121 (license license:bsd-3)))
12123 (define-public python2-pysocks
12124 (package-with-python2 python-pysocks))
12126 (define-public python-pydiff
12128 (name "python-pydiff")
12133 (uri (pypi-uri "pydiff" version))
12136 "1als83h9w0gab24ipyna6khm390qmpnpkc5jksmdbs2xc8hp2z44"))))
12137 (build-system python-build-system)
12138 (home-page "https://github.com/myint/pydiff")
12139 (synopsis "Library to diff two Python files at the bytecode level")
12141 "@code{pydiff} makes it easy to look for actual code changes while
12142 ignoring formatting changes.")
12143 (license license:expat)))
12145 (define-public python2-pydiff
12146 (package-with-python2 python-pydiff))
12148 (define-public python-tqdm
12150 (name "python-tqdm")
12155 (uri (pypi-uri "tqdm" version))
12158 "1pw0ngm0zn9papdmkwipi3yih5c3di6d0w849bdmrraq4d2d9h2y"))))
12159 (build-system python-build-system)
12161 `(("python-flake8" ,python-flake8)
12162 ("python-nose" ,python-nose)
12163 ("python-coverage" ,python-coverage)))
12164 (home-page "https://github.com/tqdm/tqdm")
12165 (synopsis "Fast, extensible progress meter")
12167 "Make loops show a progress bar on the console by just wrapping any
12168 iterable with @code{|tqdm(iterable)|}. Offers many options to define
12169 design and layout.")
12170 (license (list license:mpl2.0 license:expat))
12171 (properties `((python2-variant . ,(delay python2-tqdm))))))
12173 (define-public python2-tqdm
12174 (let ((tqdm (package-with-python2
12175 (strip-python2-variant python-tqdm))))
12179 ;; FIXME: This should be propagated from python2-flake8 instead.
12180 `(("python2-enum34" ,python2-enum34)
12181 ,@(package-native-inputs tqdm))))))
12183 (define-public python-pkginfo
12185 (name "python-pkginfo")
12190 (uri (pypi-uri "pkginfo" version))
12193 "17pqjfpq3c6xzdmk8pski6jcjgjv78q00zjf2bgzb668pzm6l6mv"))))
12194 (build-system python-build-system)
12196 ;; The tests are broken upstream.
12199 "https://code.launchpad.net/~tseaver/pkginfo/trunk")
12201 "Query metadatdata from sdists, bdists, and installed packages")
12203 "API to query the distutils metadata written in @file{PKG-INFO} inside a
12204 source distriubtion (an sdist) or a binary distribution (e.g., created by
12205 running bdist_egg). It can also query the EGG-INFO directory of an installed
12206 distribution, and the *.egg-info stored in a \"development checkout\" (e.g,
12207 created by running @code{python setup.py develop}).")
12208 (license license:expat)))
12210 (define-public python2-pkginfo
12211 (package-with-python2 python-pkginfo))
12213 (define-public python-twine
12215 (name "python-twine")
12220 (uri (pypi-uri "twine" version))
12223 "1ay1b6kdq6k4bfbjsvf6ymj41wrgpvinhxndb09355pwhxwmp96a"))))
12224 (build-system python-build-system)
12226 `(("python-tqdm" ,python-tqdm)
12227 ("python-pkginfo", python-pkginfo)
12228 ("python-requests" ,python-requests)
12229 ("python-requests-toolbelt" ,python-requests-toolbelt)))
12230 (home-page "https://github.com/pypa/twine")
12231 (synopsis "Collection of utilities for interacting with PyPI")
12233 "@code{twine} currently supports registering projects and uploading
12234 distributions. It authenticates the user over HTTPS, allows them to pre-sign
12235 their files and supports any packaging format (including wheels).")
12236 (license license:asl2.0)))
12238 (define-public python2-twine
12239 (package-with-python2 python-twine))
12241 (define-public python-linecache2
12243 (name "python-linecache2")
12248 (uri (pypi-uri "linecache2" version))
12251 "0z79g3ds5wk2lvnqw0y2jpakjf32h95bd9zmnvp7dnqhf57gy9jb"))))
12252 (build-system python-build-system)
12254 `(;; The tests depend on unittest2, and our version is a bit too old.
12257 `(("python-pbr" ,python-pbr-minimal)))
12259 "https://github.com/testing-cabal/linecache2")
12260 (synopsis "Backports of the linecache module")
12262 "The linecache module allows one to get any line from any file, while
12263 attempting to optimize internally, using a cache, the common case where many
12264 lines are read from a single file.")
12265 (license license:psfl)))
12267 (define-public python2-linecache2
12268 (package-with-python2 python-linecache2))
12270 (define-public python-traceback2
12272 (name "python-traceback2")
12277 (uri (pypi-uri "traceback2" version))
12280 "0c1h3jas1jp1fdbn9z2mrgn3jj0hw1x3yhnkxp7jw34q15xcdb05"))))
12281 (build-system python-build-system)
12283 `(;; python-traceback2 and python-unittest2 depend on one another.
12286 `(("python-pbr" ,python-pbr-minimal)))
12288 `(("python-linecache2" ,python-linecache2)))
12290 "https://github.com/testing-cabal/traceback2")
12291 (synopsis "Backports of the traceback module")
12293 "This module provides a standard interface to extract, format and print
12294 stack traces of Python programs. It exactly mimics the behavior of the Python
12295 interpreter when it prints a stack trace.")
12296 (license license:psfl)))
12298 (define-public python2-traceback2
12299 (package-with-python2 python-traceback2))
12301 (define-public python-ratelimiter
12303 (name "python-ratelimiter")
12308 (uri (pypi-uri "ratelimiter" version))
12311 "1dhz85mj5bqd2mij84ncs6pz32hgidr79hay4aqfmzaa4rbb497p"))))
12312 (build-system python-build-system)
12314 '(#:tests? #f)) ; There are no tests in the pypi archive.
12315 (home-page "https://github.com/RazerM/ratelimiter")
12316 (synopsis "Simple rate limiting object")
12318 "The @code{ratelimiter} module ensures that an operation will not be
12319 executed more than a given number of times during a given period.")
12320 (license license:asl2.0)))
12322 (define-public python2-ratelimiter
12323 (package-with-python2 python-ratelimiter))
12325 (define-public python-dukpy
12327 (name "python-dukpy")
12332 (uri (string-append "https://github.com/kovidgoyal/dukpy/archive/v"
12333 version ".tar.gz"))
12334 (file-name (string-append name "-" version ".tar.gz"))
12337 "0pj39rfwlzivqm5hkrsza7gssg6ggpxlq5ivc8f3h7x5pfgc6y6c"))))
12338 (build-system python-build-system)
12339 (home-page "https://github.com/kovidgoyal/dukpy")
12340 (synopsis "Run JavaScript in python")
12342 "dukpy is a JavaScript runtime environment for Python using the duktape
12343 embeddable JavaScript engine.")
12344 ;; Dukpy is licensed under MIT like the embedded duktape library,
12345 ;; with 'errors.c' as GPL3.
12346 (license (list license:expat license:gpl3))))
12348 (define-public python2-dukpy
12349 (package-with-python2 python-dukpy))
12351 (define-public python-jsonrpclib-pelix
12353 (name "python-jsonrpclib-pelix")
12358 (uri (pypi-uri "jsonrpclib-pelix" version))
12361 "1qs95vxplxwspbrqy8bvc195s58iy43qkf75yrjfql2sim8b25sl"))))
12362 (build-system python-build-system)
12363 (home-page "https://github.com/tcalmant/jsonrpclib/")
12364 (synopsis "JSON-RPC 2.0 client library for Python")
12366 "This library implements the JSON-RPC v2.0
12367 specification (backwards-compatible) as a client library for Python. This
12368 version is a fork of jsonrpclib by Josh Marshall, usable with Pelix remote
12370 (license license:asl2.0)))
12372 (define-public python2-jsonrpclib-pelix
12373 (package-with-python2 python-jsonrpclib-pelix))
12375 (define-public python-setuptools-scm-git-archive
12377 (name "python-setuptools-scm-git-archive")
12382 (uri (pypi-uri "setuptools_scm_git_archive" version))
12385 "1nii1sz5jq75ilf18bjnr11l9rz1lvdmyk66bxl7q90qan85yhjj"))))
12386 (build-system python-build-system)
12388 `(("python-pytest" ,python-pytest)))
12390 `(("python-setuptools-scm" ,python-setuptools-scm)))
12391 (home-page "https://github.com/Changaco/setuptools_scm_git_archive/")
12392 (synopsis "Setuptools_scm plugin for git archives")
12394 "The setuptools_scm_git_archive package is a plugin to
12395 setuptools_scm, which supports obtaining versions from git archives that
12396 belong to tagged versions.")
12397 (license license:expat)))
12399 (define-public python2-setuptools-scm-git-archive
12400 (package-with-python2 python-setuptools-scm-git-archive))
12402 (define-public python-pyclipper
12404 (name "python-pyclipper")
12409 (uri (pypi-uri "pyclipper" version ".zip"))
12412 "1zpmwv3bya3j984y5cf9x9d5108kf6mxldcba68wiq0frv5qrssw"))))
12413 (build-system python-build-system)
12415 `(#:tests? #f)); 8 Tests fail, 37 succeed
12417 `(("python-setuptools-scm-git-archive" ,python-setuptools-scm-git-archive)))
12419 `(("unzip" ,unzip)))
12420 (home-page "https://github.com/greginvm/pyclipper")
12421 (synopsis "Wrapper for Angus Johnson's Clipper library")
12423 "Pyclipper is a Cython wrapper for the C++ translation of the
12424 Angus Johnson's polygon clipping Clipper library (ver. 6.2.1).")
12425 (license license:expat)))
12427 (define-public python2-pyclipper
12428 (package-with-python2 python-pyclipper))
12430 (define-public python2-booleanoperations
12432 (name "python2-booleanoperations")
12437 (uri (pypi-uri "booleanOperations" version ".zip"))
12440 "1hw42fazdpvsn77glx96hwsj9l17mvx37sc5707s08y5w6fx16mn"))))
12441 (build-system python-build-system)
12443 `(#:python ,python-2))
12446 ("python2-pytest" ,python2-pytest)
12447 ("python2-pytest-runner" ,python2-pytest-runner)))
12449 `(("python-fonttools" ,python2-fonttools)
12450 ("python-pyclipper" ,python2-pyclipper)
12451 ("python-ufolib" ,python2-ufolib)))
12452 (home-page "https://github.com/typemytype/booleanOperations")
12453 (synopsis "Boolean operations on paths")
12455 "BooleanOperations provides a Python library that enables
12456 boolean operations on paths.")
12457 (license license:expat)))
12459 (define-public python-tempdir
12461 (name "python-tempdir")
12466 (uri (pypi-uri "tempdir" version))
12469 "13msyyxqbicr111a294x7fsqbkl6a31fyrqflx3q7k547gnq15k8"))))
12470 (build-system python-build-system)
12471 (home-page "https://pypi.org/project/tempdir/")
12473 ;; the package has no tests
12475 (synopsis "Python library for managing temporary directories")
12477 "This library manages temporary directories that are automatically
12478 deleted with all their contents when they are no longer needed. It is
12479 particularly convenient for use in tests.")
12480 (license license:expat)))
12482 (define-public python2-tempdir
12483 (package-with-python2 python-tempdir))
12485 (define-public python-activepapers
12487 (name "python-activepapers")
12492 (uri (pypi-uri "ActivePapers.Py" version))
12495 "12wkhjh90ffipjzv10swndp2xv9hd7xrxvg6v0n4n3i411pj4xb8"))))
12496 (build-system python-build-system)
12498 `(#:modules ((ice-9 ftw)
12501 (guix build python-build-system))
12504 (modify-phases %standard-phases
12505 (add-after 'unpack 'delete-python2-code
12507 (for-each delete-file
12508 '("lib/activepapers/builtins2.py"
12509 "lib/activepapers/standardlib2.py"
12510 "lib/activepapers/utility2.py"))))
12513 ;; Deactivate the test cases that download files
12514 (setenv "NO_NETWORK_ACCESS" "1")
12515 ;; For some strange reason, some tests fail if nosetests runs all
12516 ;; test modules in a single execution. They pass if each test
12517 ;; module is run individually.
12518 (for-each (lambda (filename)
12519 (invoke "nosetests"
12520 (string-append "tests/" filename)))
12523 (string-suffix? ".py" filename)))))))))
12525 `(("python-tempdir" ,python-tempdir)
12526 ("python-nose" ,python-nose)))
12528 `(("python-h5py" ,python-h5py)))
12529 (home-page "http://www.activepapers.org/")
12530 (synopsis "Executable papers for scientific computing")
12532 "ActivePapers is a tool for working with executable papers, which
12533 combine data, code, and documentation in single-file packages,
12534 suitable for publication as supplementary material or on repositories
12535 such as figshare or Zenodo.")
12536 (properties `((python2-variant . ,(delay python2-activepapers))))
12537 (license license:bsd-3)))
12539 (define-public python2-activepapers
12540 (let ((base (package-with-python2
12541 (strip-python2-variant python-activepapers))))
12545 (substitute-keyword-arguments (package-arguments base)
12547 `(modify-phases ,phases
12548 (delete 'delete-python2-code)
12549 (add-after 'unpack 'delete-python3-code
12551 (for-each delete-file
12552 '("lib/activepapers/builtins3.py"
12553 "lib/activepapers/standardlib3.py"
12554 "lib/activepapers/utility3.py")))))))))))
12556 (define-public python-semver
12558 (name "python-semver")
12563 (uri (pypi-uri "semver" version))
12566 "0hhgqppchv59rqj0yzi1prdg2nfsywqmjsqy2rycyxm0hvxmbyqz"))))
12567 (build-system python-build-system)
12570 (modify-phases %standard-phases
12571 (add-after 'unpack 'patch-test-requirements
12573 (substitute* "setup.py"
12574 ;; Our Python is new enough.
12575 (("'virtualenv<14\\.0\\.0'") "'virtualenv'"))
12578 `(("python-tox" ,python-tox)
12579 ("python-virtualenv" ,python-virtualenv)))
12580 (home-page "https://github.com/k-bx/python-semver")
12581 (synopsis "Python helper for Semantic Versioning")
12582 (description "This package provides a Python library for
12583 @url{Semantic Versioning, http://semver.org/}.")
12584 (license license:bsd-3)))
12586 (define-public python2-semver
12587 (package-with-python2 python-semver))
12589 (define-public python2-pyro
12591 (name "python2-pyro")
12596 (uri (pypi-uri "Pyro" version))
12597 (file-name (string-append "Pyro-" version ".tar.gz"))
12600 "0y75wzdqbjy565rpxaxscav4j8xg060sa90lnmb7aypgaf251v8v"))))
12601 (build-system python-build-system)
12603 ;; Pyro is not compatible with Python 3
12604 `(#:python ,python-2
12605 ;; Pyro has no test cases for automatic execution
12607 (home-page "http://pythonhosted.org/Pyro/")
12608 (synopsis "Distributed object manager for Python")
12609 (description "Pyro is a Distributed Object Technology system
12610 written in Python that is designed to be easy to use. It resembles
12611 Java's Remote Method Invocation (RMI). It has less similarity to CORBA,
12612 which is a system and language independent Distributed Object Technology
12613 and has much more to offer than Pyro or RMI. Pyro 3.x is no
12614 longer maintained. New projects should use Pyro4 instead, which
12615 is the new Pyro version that is actively developed.")
12616 (license license:expat)))
12618 (define-public python2-scientific
12620 (name "python2-scientific")
12625 (uri (string-append "https://bitbucket.org/khinsen/"
12626 "scientificpython/downloads/ScientificPython-"
12627 version ".tar.gz"))
12628 (file-name (string-append "ScientificPython-" version ".tar.gz"))
12631 "0fc69zhlsn9d2jvbzyjl9ah53vj598h84nkq230c83ahfvgzx5y3"))))
12632 (build-system python-build-system)
12634 `(("netcdf" ,netcdf)))
12636 `(("python-numpy" ,python2-numpy-1.8)
12637 ("python-pyro", python2-pyro)))
12639 ;; ScientificPython is not compatible with Python 3
12640 `(#:python ,python-2
12641 #:tests? #f ; No test suite
12643 (modify-phases %standard-phases
12645 (lambda* (#:key inputs #:allow-other-keys)
12646 (zero? (system* "python" "setup.py" "build"
12647 (string-append "--netcdf_prefix="
12648 (assoc-ref inputs "netcdf")))))))))
12649 (home-page "https://bitbucket.org/khinsen/scientificpython")
12650 (synopsis "Python modules for scientific computing")
12651 (description "ScientificPython is a collection of Python modules that are
12652 useful for scientific computing. Most modules are rather general (Geometry,
12653 physical units, automatic derivatives, ...) whereas others are more
12654 domain-specific (e.g. netCDF and PDB support). The library is currently
12655 not actively maintained and works only with Python 2 and NumPy < 1.9.")
12656 (license license:cecill-c)))
12658 (define-public python2-mmtk
12660 (name "python2-mmtk")
12665 (uri (string-append "https://bitbucket.org/khinsen/"
12666 "mmtk/downloads/MMTK-" version ".tar.gz"))
12667 (file-name (string-append "MMTK-" version ".tar.gz"))
12670 "1d0nnjx4lwsvh8f99vv1r6gi50d93yba0adkz8b4zgv4za4c5862"))))
12671 (build-system python-build-system)
12673 `(("netcdf" ,netcdf)))
12675 `(("python-scientific" ,python2-scientific)
12676 ("python-tkinter" ,python-2 "tk")))
12678 `(#:python ,python-2
12681 (modify-phases %standard-phases
12682 (add-before 'build 'includes-from-scientific
12683 (lambda* (#:key inputs #:allow-other-keys)
12684 (mkdir-p "Include/Scientific")
12687 (assoc-ref inputs "python-scientific")
12688 "/include/python2.7/Scientific")
12689 "Include/Scientific"))))))
12690 (home-page "http://dirac.cnrs-orleans.fr/MMTK")
12691 (synopsis "Python library for molecular simulation")
12692 (description "MMTK is a library for molecular simulations with an emphasis
12693 on biomolecules. It provides widely used methods such as Molecular Dynamics
12694 and normal mode analysis, but also basic routines for implementing new methods
12695 for simulation and analysis. The library is currently not actively maintained
12696 and works only with Python 2 and NumPy < 1.9.")
12697 (license license:cecill-c)))
12699 (define-public python-phonenumbers
12701 (name "python-phonenumbers")
12706 (uri (pypi-uri "phonenumbers" version))
12709 "1lhhxmx3hk0b5891nc0p82dl5bq2w9cqbawmh8j5zy587af2j6fq"))))
12710 (build-system python-build-system)
12712 "https://github.com/daviddrysdale/python-phonenumbers")
12714 "Python library for dealing with international phone numbers")
12716 "This package provides a Python port of Google's libphonenumber library.")
12717 (license license:asl2.0)))
12719 (define-public python2-phonenumbers
12720 (package-with-python2 python-phonenumbers))
12722 (define-public python-yapf
12724 (name "python-yapf")
12729 (uri (pypi-uri "yapf" version))
12732 "0s7l6afzxvpx39kzd0lwshlaxw8m4fwh4iy0rlmav4vipr3g46dx"))))
12733 (build-system python-build-system)
12734 (home-page "https://github.com/google/yapf")
12735 (synopsis "Formatter for Python code")
12736 (description "YAPF is a formatter for Python code. It's based off of
12737 @dfn{clang-format}, developed by Daniel Jasper. In essence, the algorithm
12738 takes the code and reformats it to the best formatting that conforms to the
12739 style guide, even if the original code didn't violate the style guide.")
12740 (license license:asl2.0)))
12742 (define-public python2-yapf
12743 (package-with-python2 python-yapf))
12745 (define-public python-gyp
12746 (let ((commit "5e2b3ddde7cda5eb6bc09a5546a76b00e49d888f")
12749 (name "python-gyp")
12750 ;; Google does not release versions,
12751 ;; based on second most recent commit date.
12752 (version (git-version "0.0.0" revision commit))
12755 ;; Google does not release tarballs,
12756 ;; git checkout is needed.
12758 (uri (git-reference
12759 (url "https://chromium.googlesource.com/external/gyp")
12761 (file-name (git-file-name name version))
12764 "0fr7nxcrk292djmxzpcjaphnsd123k31gp8jnd91vwknhq6snmv9"))))
12765 (build-system python-build-system)
12766 (home-page "https://gyp.gsrc.io/")
12767 (synopsis "GYP is a Meta-Build system")
12769 "GYP builds build systems for large, cross platform applications.
12770 It can be used to generate XCode projects, Visual Studio projects, Ninja build
12771 files, and Makefiles.")
12772 (license license:bsd-3))))
12774 (define-public python2-gyp
12775 (package-with-python2 python-gyp))
12777 (define-public python-whatever
12779 (name "python-whatever")
12784 (uri (string-append "https://github.com/Suor/whatever/archive/" version
12788 "1iqvnaf0zpc6b4rvbqq4xy45mszcscyzpzknv8wg6j84pbp22sap"))
12789 (file-name (string-append name "-" version ".tar.gz"))))
12790 (build-system python-build-system)
12793 (modify-phases %standard-phases
12796 (invoke "py.test"))))))
12798 `(("python-pytest" ,python-pytest)))
12799 (home-page "http://github.com/Suor/whatever")
12800 (synopsis "Make anonymous functions by partial application of operators")
12801 (description "@code{whatever} provides an easy way to make anonymous
12802 functions by partial application of operators.")
12803 (license license:bsd-3)))
12805 (define-public python2-whatever
12806 (package-with-python2 python-whatever))
12808 (define-public python-funcy
12810 (name "python-funcy")
12815 (uri (string-append "https://github.com/Suor/funcy/archive/" version
12819 "1fanxivsip29vgarw6dn39xym3q4pbxcpa11plpp548lvxajpahz"))
12820 (file-name (string-append name "-" version ".tar.gz"))))
12821 (build-system python-build-system)
12824 (modify-phases %standard-phases
12827 (invoke "py.test"))))))
12829 `(("python-pytest" ,python-pytest)
12830 ("python-whatever" ,python-whatever)))
12831 (home-page "http://github.com/Suor/funcy")
12832 (synopsis "Functional tools")
12833 (description "@code{funcy} is a library that provides functional tools.
12836 @item merge - Merges collections of the same type
12837 @item walk - Type-preserving map
12838 @item select - Selects a part of a collection
12839 @item take - Takes the first n items of a collection
12840 @item first - Takes the first item of a collection
12841 @item remove - Predicated-removes items of a collection
12842 @item concat - Concatenates two collections
12843 @item flatten - Flattens a collection with subcollections
12844 @item distinct - Returns only distinct items
12845 @item split - Predicated-splits a collection
12846 @item split_at - Splits a collection at a given item
12847 @item group_by - Groups items by group
12848 @item pairwise - Pairs off adjacent items
12849 @item partial - Partially-applies a function
12850 @item curry - Curries a function
12851 @item compose - Composes functions
12852 @item complement - Complements a predicate
12853 @item all_fn - \"all\" with predicate
12855 (license license:bsd-3)))
12857 (define-public python2-funcy
12858 (package-with-python2 python-funcy))
12860 (define-public python-isoweek
12862 (name "python-isoweek")
12867 (uri (pypi-uri "isoweek" version))
12870 "1s7zsf0pab0l9gn6456qadnz5i5h90hafcjwnhx5mq23qjxggwvk"))))
12871 (build-system python-build-system)
12872 (home-page "https://github.com/gisle/isoweek")
12873 (synopsis "Objects representing a week")
12874 (description "The @code{isoweek} module provide the class Week that
12875 implements the week definition of ISO 8601. This standard also defines
12876 a notation for identifying weeks; yyyyWww (where the W is a literal).
12877 Week instances stringify to this form.")
12878 (license license:bsd-3)))
12880 (define-public python2-isoweek
12881 (package-with-python2 python-isoweek))
12883 (define-public python-tokenize-rt
12885 (name "python-tokenize-rt")
12890 (uri (pypi-uri "tokenize-rt" version))
12893 "1yjvbz7rvrz31zjyax1cgy3xhf4wb3j18jwnj4bnl77ca4gliyiw"))))
12894 (build-system python-build-system)
12895 (home-page "https://github.com/asottile/tokenize-rt")
12896 (synopsis "Wrapper around the stdlib tokenize which roundtrips.")
12898 "This Python library is a wrapper around @code{tokenize} from the Python
12899 standard library. It provides two additional tokens @code{ESCAPED_NL} and
12900 @code{UNIMPORTANT_WS}, and a @code{Token} data type. Use @code{src_to_tokens}
12901 and @code{tokens_to_src} to roundtrip.")
12902 (license license:expat)))
12904 (define-public python-future-fstrings
12906 (name "python-future-fstrings")
12911 (uri (pypi-uri "future_fstrings" version))
12914 "0ydxqz2dvns44g55p8ix2x18qkfk3aaz0m0dc70f3g6n8js35h47"))))
12915 (build-system python-build-system)
12917 `(("python-tokenize-rt" ,python-tokenize-rt)))
12918 (home-page "https://github.com/asottile/future-fstrings")
12919 (synopsis "Backport of fstrings to Python < 3.6")
12921 "This package provides a UTF-8 compatible encoding
12922 @code{future_fstrings}, which performs source manipulation. It decodes the
12923 source bytes using the UTF-8 encoding and then rewrites Python 3.6 style
12924 @code{f} strings.")
12925 (license license:expat)))
12927 (define-public python-typing
12929 (name "python-typing")
12934 (uri (pypi-uri "typing" version))
12937 "1wmk9nkh30n37cbrqwkbggmj2390lhrlagjkd0ikm02l88saj06l"))))
12938 (build-system python-build-system)
12939 (home-page "https://docs.python.org/3/library/typing.html")
12940 (synopsis "Type hints for Python")
12941 (description "This is a backport of the standard library @code{typing}
12942 module to Python versions older than 3.5. Typing defines a standard notation
12943 for Python function and variable type annotations. The notation can be used
12944 for documenting code in a concise, standard format, and it has been designed
12945 to also be used by static and runtime type checkers, static analyzers, IDEs
12947 (license license:psfl)))
12949 (define-public python2-typing
12950 (package-with-python2 python-typing))
12952 (define-public bpython
12959 (uri (pypi-uri "bpython" version))
12962 "0bxhxi5zxdkrf8b4gwn0d363kdz3qnypjwhm1aydki53ph8ca1w9"))))
12963 (build-system python-build-system)
12966 (modify-phases %standard-phases
12967 (add-after 'unpack 'remove-failing-test
12969 ;; Remove failing test. FIXME: make it pass
12970 (delete-file "bpython/test/test_args.py")
12972 (add-after 'wrap 'add-aliases
12973 ;; for symmetry to bpython2, add symlinks bypthon3, bpdb3, etc.
12974 (lambda* (#:key outputs #:allow-other-keys)
12975 (let ((out (assoc-ref outputs "out")))
12978 (symlink old (string-append out "/bin/" new)))
12979 '("bpython" "bpython-curses" "bpython-urwid" "bpdb")
12980 '("bpython3" "bpython3-curses" "bpython3-urwid" "bpdb3")))
12983 `(("python-pygments" ,python-pygments)
12984 ("python-requests", python-requests)
12985 ("python-babel" ,python-babel) ; optional, for internationalization
12986 ("python-curtsies" ,python-curtsies) ; >= 0.1.18
12987 ("python-greenlet" ,python-greenlet)
12988 ("python-urwid" ,python-urwid) ; for bpython-urwid only
12989 ("python-six" ,python-six)))
12991 `(("python-sphinx" ,python-sphinx)
12992 ("python-mock" ,python-mock)))
12993 (home-page "https://bpython-interpreter.org/")
12994 (synopsis "Fancy interface to the Python interpreter")
12995 (description "Bpython is a fancy interface to the Python
12996 interpreter. bpython's main features are
12999 @item in-line syntax highlighting,
13000 @item readline-like autocomplete with suggestions displayed as you type,
13001 @item expected parameter list for any Python function,
13002 @item \"rewind\" function to pop the last line of code from memory and
13004 @item send the code you've entered off to a pastebin,
13005 @item save the code you've entered to a file, and
13006 @item auto-indentation.
13008 (license license:expat)))
13010 (define-public bpython2
13011 (let ((base (package-with-python2
13012 (strip-python2-variant bpython))))
13013 (package (inherit base)
13016 `(#:python ,python-2
13018 (modify-phases %standard-phases
13019 (add-after 'unpack 'remove-failing-test
13021 ;; Remove failing test. FIXME: make it pass
13022 (delete-file "bpython/test/test_args.py")
13023 ;; Disable failing test-cases (renaming inhibits they are
13025 (substitute* "bpython/test/test_curtsies_repl.py"
13026 (("^(\\s*def )(test_get_last_word_with_prev_line\\W)" _ a b)
13027 (string-append a "xxx_off_" b))
13028 (("^(\\s*def )(test_complex\\W)" _ a b)
13029 (string-append a "xxx_off_" b)))
13031 (add-before 'build 'rename-scripts
13032 ;; rename the scripts to bypthon2, bpdb2, etc.
13034 (substitute* "setup.py"
13035 (("^(\\s+'bpdb)(\\s+=.*',?)\\s*?$" _ name rest)
13036 (string-append name "2" rest "\n"))
13037 (("^(\\s+'bpython)(-\\S+)?(\\s+=.*',?)\\s*?$" _ name sub rest)
13038 (string-append name "2" (or sub "") rest "\n")))
13041 (define-public python-pyinotify
13043 (name "python-pyinotify")
13047 (uri (pypi-uri "pyinotify" version))
13050 "1x3i9wmzw33fpkis203alygfnrkcmq9w1aydcm887jh6frfqm6cw"))))
13051 (build-system python-build-system)
13052 (arguments `(#:tests? #f)) ;no tests
13053 (home-page "https://github.com/seb-m/pyinotify")
13054 (synopsis "Python library for monitoring inotify events")
13056 "@code{pyinotify} provides a Python interface for monitoring
13057 filesystem events on Linux.")
13058 (license license:expat)))
13060 (define-public python2-pyinotify
13061 (package-with-python2 python-pyinotify))
13063 ;; Ada parser uses this version.
13064 (define-public python2-quex-0.67.3
13066 (name "python2-quex")
13071 (uri (string-append "mirror://sourceforge/quex/HISTORY/"
13072 (version-major+minor version)
13073 "/quex-" version ".zip"))
13076 "14gv8ll3ipqv4kyc2xiy891nrmjl4ic823zfyx8hassagyclyppw"))))
13077 (build-system python-build-system)
13079 `(("unzip" ,unzip)))
13081 `(#:python ,python-2
13084 (modify-phases %standard-phases
13085 (delete 'configure)
13088 (lambda* (#:key outputs #:allow-other-keys)
13089 (let* ((out (assoc-ref outputs "out"))
13090 (share/quex (string-append out "/share/quex"))
13091 (bin (string-append out "/bin")))
13092 (copy-recursively "." share/quex)
13094 (symlink (string-append share/quex "/quex-exe.py")
13095 (string-append bin "/quex"))
13097 (native-search-paths
13098 (list (search-path-specification
13099 (variable "QUEX_PATH")
13100 (files '("share/quex")))))
13101 (home-page "http://quex.sourceforge.net/")
13102 (synopsis "Lexical analyzer generator in Python")
13103 (description "@code{quex} is a lexical analyzer generator in Python.")
13104 (license license:lgpl2.1+))) ; Non-military
13106 (define-public python2-quex
13107 (package (inherit python2-quex-0.67.3)
13108 (name "python2-quex")
13113 (uri (string-append "mirror://sourceforge/quex/DOWNLOAD/quex-" version ".tar.gz"))
13116 "0svc9nla3b9145d6b7fb9dizx412l3difzqw0ilh9lz52nsixw8j"))
13117 (file-name (string-append name "-" version ".tar.gz"))))))