1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2013 Nikita Karetnikov <nikita@karetnikov.org>
3 ;;; Copyright © 2013, 2014, 2015, 2016, 2017, 2018 Ludovic Courtès <ludo@gnu.org>
4 ;;; Copyright © 2013, 2014, 2015, 2016 Andreas Enge <andreas@enge.fr>
5 ;;; Copyright © 2014, 2015 Mark H Weaver <mhw@netris.org>
6 ;;; Copyright © 2014, 2017 Eric Bavier <bavier@member.fsf.org>
7 ;;; Copyright © 2014, 2015 Federico Beffa <beffa@fbengineering.ch>
8 ;;; Copyright © 2015 Omar Radwan <toxemicsquire4@gmail.com>
9 ;;; Copyright © 2015 Pierre-Antoine Rault <par@rigelk.eu>
10 ;;; Copyright © 2015, 2016, 2017, 2018 Ricardo Wurmus <rekado@elephly.net>
11 ;;; Copyright © 2015, 2016 Christopher Allan Webber <cwebber@dustycloud.org>
12 ;;; Copyright © 2015 Eric Dvorsak <eric@dvorsak.fr>
13 ;;; Copyright © 2015, 2016 David Thompson <davet@gnu.org>
14 ;;; Copyright © 2015, 2016, 2017 Leo Famulari <leo@famulari.name>
15 ;;; Copyright © 2015, 2017 Ben Woodcroft <donttrustben@gmail.com>
16 ;;; Copyright © 2015, 2016 Erik Edrosa <erik.edrosa@gmail.com>
17 ;;; Copyright © 2015, 2016, 2017 Efraim Flashner <efraim@flashner.co.il>
18 ;;; Copyright © 2015, 2017 Kyle Meyer <kyle@kyleam.com>
19 ;;; Copyright © 2015, 2016 Chris Marusich <cmmarusich@gmail.com>
20 ;;; Copyright © 2016 Danny Milosavljevic <dannym+a@scratchpost.org>
21 ;;; Copyright © 2016 Lukas Gradl <lgradl@openmailbox.org>
22 ;;; Copyright © 2016, 2018 Hartmut Goebel <h.goebel@crazy-compilers.com>
23 ;;; Copyright © 2016 Daniel Pimentel <d4n1@d4n1.org>
24 ;;; Copyright © 2016 Sou Bunnbu <iyzsong@gmail.com>
25 ;;; Copyright © 2016, 2017 Troy Sankey <sankeytms@gmail.com>
26 ;;; Copyright © 2016, 2017 Nils Gillmann <ng0@n0.is>
27 ;;; Copyright © 2016 Dylan Jeffers <sapientech@sapientech@openmailbox.org>
28 ;;; Copyright © 2016 David Craven <david@craven.ch>
29 ;;; Copyright © 2016, 2017, 2018 Marius Bakke <mbakke@fastmail.com>
30 ;;; Copyright © 2016, 2017 Stefan Reichör <stefan@xsteve.at>
31 ;;; Copyright © 2016 Dylan Jeffers <sapientech@sapientech@openmailbox.org>
32 ;;; Copyright © 2016, 2017 Alex Vong <alexvong1995@gmail.com>
33 ;;; Copyright © 2016, 2017, 2018 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, 2018 Mathieu Othacehe <m.othacehe@gmail.com>
42 ;;; Copyright © 2017 José Miguel Sánchez García <jmi2k@openmailbox.org>
43 ;;; Copyright © 2017 Roel Janssen <roel@gnu.org>
44 ;;; Copyright © 2017, 2018 Kei Kebreau <kkebreau@posteo.net>
45 ;;; Copyright © 2017 Rutger Helling <rhelling@mykolab.com>
46 ;;; Copyright © 2017 Muriithi Frederick Muriuki <fredmanglis@gmail.com>
47 ;;; Copyright © 2017 Brendan Tildesley <brendan.tildesley@openmailbox.org>
48 ;;; Copyright © 2018 Ethan R. Jones <ethanrjones97@gmail.com
49 ;;; Copyright © 2018 Fis Trivial <ybbs.daans@hotmail.com>
50 ;;; Copyright © 2018 Vijayalakshmi Vedantham <vijimay12@gmail.com>
51 ;;; Copyright © 2018 Mathieu Lirzin <mthl@gnu.org>
52 ;;; Copyright © 2018 Adam Massmann <massmannak@gmail.com>
53 ;;; Copyright © 2016, 2018 Tomáš Čech <sleep_walker@gnu.org>
54 ;;; Copyright © 2018 Nicolas Goaziou <mail@nicolasgoaziou.fr>
56 ;;; This file is part of GNU Guix.
58 ;;; GNU Guix is free software; you can redistribute it and/or modify it
59 ;;; under the terms of the GNU General Public License as published by
60 ;;; the Free Software Foundation; either version 3 of the License, or (at
61 ;;; your option) any later version.
63 ;;; GNU Guix is distributed in the hope that it will be useful, but
64 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
65 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
66 ;;; GNU General Public License for more details.
68 ;;; You should have received a copy of the GNU General Public License
69 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
71 (define-module (gnu packages python)
72 #:use-module ((guix licenses) #:prefix license:)
73 #:use-module (gnu packages)
74 #:use-module (gnu packages algebra)
75 #:use-module (gnu packages adns)
76 #:use-module (gnu packages attr)
77 #:use-module (gnu packages backup)
78 #:use-module (gnu packages bash)
79 #:use-module (gnu packages check)
80 #:use-module (gnu packages compression)
81 #:use-module (gnu packages crypto)
82 #:use-module (gnu packages databases)
83 #:use-module (gnu packages file)
84 #:use-module (gnu packages fontutils)
85 #:use-module (gnu packages gcc)
86 #:use-module (gnu packages geo)
87 #:use-module (gnu packages ghostscript)
88 #:use-module (gnu packages gl)
89 #:use-module (gnu packages glib)
90 #:use-module (gnu packages graphviz)
91 #:use-module (gnu packages graphics)
92 #:use-module (gnu packages gstreamer)
93 #:use-module (gnu packages gtk)
94 #:use-module (gnu packages icu4c)
95 #:use-module (gnu packages image)
96 #:use-module (gnu packages imagemagick)
97 #:use-module (gnu packages libevent)
98 #:use-module (gnu packages libffi)
99 #:use-module (gnu packages linux)
100 #:use-module (gnu packages machine-learning)
101 #:use-module (gnu packages man)
102 #:use-module (gnu packages maths)
103 #:use-module (gnu packages multiprecision)
104 #:use-module (gnu packages networking)
105 #:use-module (gnu packages ncurses)
106 #:use-module (gnu packages openstack)
107 #:use-module (gnu packages pcre)
108 #:use-module (gnu packages perl)
109 #:use-module (gnu packages pkg-config)
110 #:use-module (gnu packages python-crypto)
111 #:use-module (gnu packages python-web)
112 #:use-module (gnu packages qt)
113 #:use-module (gnu packages readline)
114 #:use-module (gnu packages sdl)
115 #:use-module (gnu packages search)
116 #:use-module (gnu packages shells)
117 #:use-module (gnu packages ssh)
118 #:use-module (gnu packages statistics)
119 #:use-module (gnu packages terminals)
120 #:use-module (gnu packages tex)
121 #:use-module (gnu packages texinfo)
122 #:use-module (gnu packages time)
123 #:use-module (gnu packages tls)
124 #:use-module (gnu packages version-control)
125 #:use-module (gnu packages video)
126 #:use-module (gnu packages web)
127 #:use-module (gnu packages base)
128 #:use-module (gnu packages xml)
129 #:use-module (gnu packages xorg)
130 #:use-module (gnu packages xdisorg)
131 #:use-module (gnu packages tcl)
132 #:use-module (gnu packages bdw-gc)
133 #:use-module (guix packages)
134 #:use-module (guix download)
135 #:use-module (guix git-download)
136 #:use-module (guix utils)
137 #:use-module (guix build-system gnu)
138 #:use-module (guix build-system cmake)
139 #:use-module (guix build-system python)
140 #:use-module (guix build-system trivial)
141 #:use-module (srfi srfi-1))
143 (define-public python-2.7
150 (uri (string-append "https://www.python.org/ftp/python/"
151 version "/Python-" version ".tar.xz"))
154 "0x2mvz9dp11wj7p5ccvmk9s0hzjk2fa1m462p395l4r6bfnb3n92"))
155 (patches (search-patches "python-2.7-search-paths.patch"
156 "python-2-deterministic-build-info.patch"
157 "python-2.7-site-prefixes.patch"
158 "python-2.7-source-date-epoch.patch"
159 "python-2.7-adjust-tests.patch"))
160 (modules '((guix build utils)))
161 ;; suboptimal to delete failing tests here, but if we delete them in the
162 ;; arguments then we need to make sure to strip out that phase when it
163 ;; gets inherited by python and python-minimal.
166 (for-each delete-file
167 '("Lib/test/test_compileall.py"
168 "Lib/test/test_ctypes.py" ; fails on mips64el
169 "Lib/test/test_distutils.py"
170 "Lib/test/test_import.py"
171 "Lib/test/test_shutil.py"
172 "Lib/test/test_socket.py"
173 "Lib/test/test_subprocess.py"))
176 "tk")) ;tkinter; adds 50 MiB to the closure
177 (build-system gnu-build-system)
181 ;; test_compileall test_distutils test_import test_shutil test_socket
184 ;; test_aepack test_al test_applesingle test_bsddb test_bsddb185
185 ;; test_bsddb3 test_cd test_cl test_codecmaps_cn test_codecmaps_hk
186 ;; test_codecmaps_jp test_codecmaps_kr test_codecmaps_tw test_curses
187 ;; test_dl test_gdb test_gl test_imageop test_imgfile test_ioctl
188 ;; test_kqueue test_linuxaudiodev test_macos test_macostools
189 ;; test_msilib test_ossaudiodev test_scriptpackages test_smtpnet
190 ;; test_socketserver test_startfile test_sunaudiodev test_timeout
191 ;; test_tk test_ttk_guionly test_urllib2net test_urllibnet
192 ;; test_winreg test_winsound test_zipfile64
193 ;; 4 skips unexpected on linux2:
194 ;; test_bsddb test_bsddb3 test_gdb test_ioctl
197 (list "--enable-shared" ;allow embedding
198 "--with-system-ffi" ;build ctypes
199 "--with-ensurepip=install" ;install pip and setuptools
200 "--enable-unicode=ucs4"
201 (string-append "LDFLAGS=-Wl,-rpath="
202 (assoc-ref %outputs "out") "/lib"))
204 #:modules ((ice-9 ftw) (ice-9 match)
205 (guix build utils) (guix build gnu-build-system))
207 (modify-phases %standard-phases
209 'configure 'patch-lib-shells
211 ;; Filter for existing files, since some may not exist in all
212 ;; versions of python that are built with this recipe.
213 (substitute* (filter file-exists?
214 '("Lib/subprocess.py"
216 "Lib/distutils/tests/test_spawn.py"
217 "Lib/test/support/__init__.py"
218 "Lib/test/test_subprocess.py"))
219 (("/bin/sh") (which "sh")))
221 ;; Use zero as the timestamp in .pyc files so that builds are
222 ;; deterministic. TODO: Remove it when this variable is set in
223 ;; gnu-build-system.scm.
224 (setenv "SOURCE_DATE_EPOCH" "1")
226 (add-before 'configure 'do-not-record-configure-flags
227 (lambda* (#:key configure-flags #:allow-other-keys)
228 ;; Remove configure flags from the installed '_sysconfigdata.py'
229 ;; and 'Makefile' so we don't end up keeping references to the
232 ;; Preserve at least '--with-system-ffi' since otherwise the
233 ;; thing tries to build libffi, fails, and we end up with a
234 ;; Python that lacks ctypes.
235 (substitute* "configure"
236 (("^CONFIG_ARGS=.*$")
237 (format #f "CONFIG_ARGS='~a'\n"
238 (if (member "--with-system-ffi" configure-flags)
245 ;; 'Lib/test/test_site.py' needs a valid $HOME
246 (setenv "HOME" (getcwd))
249 'unpack 'set-source-file-times-to-1980
250 ;; XXX One of the tests uses a ZIP library to pack up some of the
251 ;; source tree, and fails with "ZIP does not support timestamps
252 ;; before 1980". Work around this by setting the file times in the
253 ;; source tree to sometime in early 1980.
255 (let ((circa-1980 (* 10 366 24 60 60)))
256 (ftw "." (lambda (file stat flag)
257 (utime file circa-1980 circa-1980)
260 (add-after 'install 'remove-tests
261 ;; Remove 25 MiB of unneeded unit tests. Keep test_support.*
262 ;; because these files are used by some libraries out there.
263 (lambda* (#:key outputs #:allow-other-keys)
264 (let ((out (assoc-ref outputs "out")))
265 (match (scandir (string-append out "/lib")
267 (string-prefix? "python" name)))
269 (let ((testdir (string-append out "/lib/" pythonX.Y
271 (with-directory-excursion testdir
272 (for-each delete-file-recursively
278 (string-prefix? "test_support."
280 (call-with-output-file "__init__.py" (const #t))
282 (add-before 'strip 'make-libraries-writable
283 (lambda* (#:key outputs #:allow-other-keys)
284 ;; Make .so files writable so they can be stripped.
285 (let ((out (assoc-ref outputs "out")))
286 (for-each (lambda (file)
288 (find-files (string-append out "/lib")
291 (add-after 'install 'move-tk-inter
292 (lambda* (#:key outputs #:allow-other-keys)
293 ;; When Tkinter support is built move it to a separate output so
294 ;; that the main output doesn't contain a reference to Tcl/Tk.
295 (let ((out (assoc-ref outputs "out"))
296 (tk (assoc-ref outputs "tk")))
298 (match (find-files out "tkinter.*\\.so")
300 ;; The .so is in OUT/lib/pythonX.Y/lib-dynload, but we
301 ;; want it under TK/lib/pythonX.Y/site-packages.
302 (let* ((len (string-length out))
303 (target (string-append
306 (dirname (dirname tkinter.so))
309 (install-file tkinter.so target)
310 (delete-file tkinter.so)))))
315 ("libffi" ,libffi) ; for ctypes
316 ("sqlite" ,sqlite) ; for sqlite extension
318 ("readline" ,readline)
321 ("tk" ,tk))) ; for tkinter
323 `(("pkg-config" ,pkg-config)))
325 (list (search-path-specification
326 (variable "PYTHONPATH")
327 (files '("lib/python2.7/site-packages")))))
328 (home-page "https://www.python.org")
329 (synopsis "High-level, dynamically-typed programming language")
331 "Python is a remarkably powerful dynamic programming language that
332 is used in a wide variety of application domains. Some of its key
333 distinguishing features include: clear, readable syntax; strong
334 introspection capabilities; intuitive object orientation; natural
335 expression of procedural code; full modularity, supporting hierarchical
336 packages; exception-based error handling; and very high level dynamic
338 (license license:psfl)))
340 ;; Current 2.x version.
341 (define-public python-2 python-2.7)
343 (define-public python-3.6
344 (package (inherit python-2)
349 (uri (string-append "https://www.python.org/ftp/python/"
350 version "/Python-" version ".tar.xz"))
351 (patches (search-patches
352 "python-fix-tests.patch"
353 "python-3-fix-tests.patch"
354 "python-3-deterministic-build-info.patch"
355 "python-3-search-paths.patch"))
356 (patch-flags '("-p0"))
359 "19l7inxm056jjw33zz97z0m02hsi7jnnx5kyb76abj5ml4xhad7l"))
362 (for-each delete-file
363 '("Lib/ctypes/test/test_structures.py" ; fails on aarch64
364 "Lib/ctypes/test/test_win32.py" ; fails on aarch64
365 "Lib/test/test_fcntl.py")) ; fails on aarch64
368 (substitute-keyword-arguments (package-arguments python-2)
371 `(modify-phases ,phases
372 (add-after 'unpack 'patch-timestamp-for-pyc-files
374 ;; We set DETERMINISTIC_BUILD to only override the mtime when
375 ;; building with Guix, lest we break auto-compilation in
377 (setenv "DETERMINISTIC_BUILD" "1")
378 (substitute* "Lib/py_compile.py"
379 (("source_stats\\['mtime'\\]")
380 "(1 if 'DETERMINISTIC_BUILD' in os.environ else source_stats['mtime'])"))
382 ;; Use deterministic hashes for strings, bytes, and datetime
384 (setenv "PYTHONHASHSEED" "0")
386 ;; Reset mtime when validating bytecode header.
387 (substitute* "Lib/importlib/_bootstrap_external.py"
388 (("source_mtime = int\\(source_stats\\['mtime'\\]\\)")
391 ;; These tests fail because of our change to the bytecode
392 ;; validation. They fail because expected exceptions do not get
393 ;; thrown. This seems to be no problem.
394 (add-after 'unpack 'disable-broken-bytecode-tests
396 (substitute* "Lib/test/test_importlib/source/test_file_loader.py"
397 (("test_bad_marshal")
398 "disable_test_bad_marshal")
400 "disable_test_no_marshal")
401 (("test_non_code_marshal")
402 "disable_test_non_code_marshal"))
404 ;; Unset DETERMINISTIC_BUILD to allow for tests that check that
405 ;; stale pyc files are rebuilt.
406 (add-before 'check 'allow-non-deterministic-compilation
407 (lambda _ (unsetenv "DETERMINISTIC_BUILD") #t))
408 ;; We need to rebuild all pyc files for three different
409 ;; optimization levels to replace all files that were not built
410 ;; deterministically.
412 ;; FIXME: Without this phase we have close to 2000 files that
413 ;; differ across different builds of this package. With this phase
414 ;; there are about 500 files left that differ.
415 (add-after 'install 'rebuild-bytecode
416 (lambda* (#:key outputs #:allow-other-keys)
417 (setenv "DETERMINISTIC_BUILD" "1")
418 (let ((out (assoc-ref outputs "out")))
421 (format #t "Compiling with optimization level: ~a\n"
422 (if (null? opt) "none" (car opt)))
423 (for-each (lambda (file)
425 `(,(string-append out "/bin/python3")
429 ;; Don't build lib2to3, because it's Python 2 code.
430 ;; Also don't build obviously broken test code.
431 "-x" "(lib2to3|test/bad.*)"
433 (find-files out "\\.py$")))
434 (list '() '("-O") '("-OO")))
437 (list (search-path-specification
438 (variable "PYTHONPATH")
439 (files (list (string-append "lib/python"
440 (version-major+minor version)
441 "/site-packages"))))))))
443 ;; Current 3.x version.
444 (define-public python-3 python-3.6)
446 ;; Current major version.
447 (define-public python python-3)
449 ;; Minimal variants of Python, mostly used to break the cycle between Tk and
450 ;; Python (Tk -> libxcb -> Python.)
452 (define-public python2-minimal
453 (package (inherit python-2)
454 (name "python2-minimal")
457 ;; Keep zlib, which is used by 'pip' (via the 'zipimport' module), which
458 ;; is invoked upon 'make install'. 'pip' also expects 'ctypes' and thus
460 (inputs `(("libffi" ,libffi)
463 (define-public python-minimal
464 (package (inherit python)
465 (name "python-minimal")
468 ;; Build fails due to missing ctypes without libffi.
469 ;; OpenSSL is a mandatory dependency of Python 3.x, for urllib;
470 ;; zlib is required by 'zipimport', used by pip.
471 (inputs `(("libffi" ,libffi)
475 (define-public python-debug
478 (name "python-debug")
479 (outputs '("out" "debug"))
480 (build-system gnu-build-system)
482 (substitute-keyword-arguments (package-arguments python)
483 ((#:configure-flags flags '())
484 `(cons "--with-pydebug" ,flags))))
486 "High-level, dynamically-typed programming language (for debugging)")
488 "This variant of Python provides an interpreter built with
489 @code{--with-pydebug} to help develop and debug extensions. See
490 @url{https://pythonextensionpatterns.readthedocs.io/en/latest/debugging/debug.html},
491 for more information.")))
493 (define* (wrap-python3 python
495 (name (string-append (package-name python) "-wrapper")))
496 (package (inherit python)
499 (build-system trivial-build-system)
501 (inputs `(("bash" ,bash)))
502 (propagated-inputs `(("python" ,python)))
504 `(#:modules ((guix build utils))
507 (use-modules (guix build utils))
508 (let ((bin (string-append (assoc-ref %outputs "out") "/bin"))
509 (python (string-append (assoc-ref %build-inputs "python") "/bin/")))
513 (symlink (string-append python old)
514 (string-append bin "/" new)))
515 `("python3" ,"pydoc3" ,"idle3" ,"pip3")
516 `("python" ,"pydoc" ,"idle" ,"pip"))
517 ;; python-config outputs search paths based upon its location,
518 ;; use a bash wrapper to avoid changing its outputs.
519 (let ((bash (string-append (assoc-ref %build-inputs "bash")
521 (old (string-append python "python3-config"))
522 (new (string-append bin "/python-config")))
523 (with-output-to-file new
525 (format #t "#!~a~%" bash)
526 (format #t "exec \"~a\" \"$@\"~%" old)
529 (synopsis "Wrapper for the Python 3 commands")
531 "This package provides wrappers for the commands of Python@tie{}3.x such
532 that they can be invoked under their usual name---e.g., @command{python}
533 instead of @command{python3}.")))
535 (define-public python-wrapper (wrap-python3 python))
536 (define-public python-minimal-wrapper (wrap-python3 python-minimal))
538 (define-public python-psutil
540 (name "python-psutil")
545 (uri (pypi-uri "psutil" version))
548 "063v69x7spyclyaxrd3gmzj3p16q5ayg97xqhwb1kyn22a9pwip2"))))
549 (build-system python-build-system)
551 ;; FIXME: some tests does not return and times out.
553 (home-page "https://www.github.com/giampaolo/psutil")
554 (synopsis "Library for retrieving information on running processes")
556 "psutil (Python system and process utilities) is a library for retrieving
557 information on running processes and system utilization (CPU, memory, disks,
558 network) in Python. It is useful mainly for system monitoring, profiling and
559 limiting process resources and management of running processes. It implements
560 many functionalities offered by command line tools such as: ps, top, lsof,
561 netstat, ifconfig, who, df, kill, free, nice, ionice, iostat, iotop, uptime,
562 pidof, tty, taskset, pmap.")
563 (properties `((python2-variant . ,(delay python2-psutil))))
564 (license license:bsd-3)))
566 (define-public python2-psutil
567 (let ((base (package-with-python2 (strip-python2-variant python-psutil))))
571 `(("python2-enum34" ,python2-enum34) ;optional
572 ,@(package-propagated-inputs base))))))
574 (define-public python-shapely
576 (name "python-shapely")
581 (uri (pypi-uri "Shapely" version))
584 "0svc58dzcw9gj92b4sgq35sdxkf85z0qwlzxarkzq4bp3h8jy58l"))))
585 (build-system python-build-system)
587 `(("python-cython" ,python-cython)
588 ("python-matplotlib" ,python-matplotlib)
589 ("python-pytest" ,python-pytest)
590 ("python-pytest-cov" ,python-pytest-cov)))
594 `(("python-numpy" ,python-numpy)))
597 (modify-phases %standard-phases
598 (add-after 'unpack 'patch-geos-path
599 (lambda* (#:key inputs #:allow-other-keys)
600 (let ((geos (assoc-ref inputs "geos"))
601 (glibc (assoc-ref inputs ,(if (%current-target-system)
602 "cross-libc" "libc"))))
603 (substitute* "shapely/geos.py"
604 (("_lgeos = load_dll\\('geos_c', fallbacks=.*\\)")
605 (string-append "_lgeos = load_dll('geos_c', fallbacks=['"
606 geos "/lib/libgeos_c.so'])"))
607 (("free = load_dll\\('c'\\)\\.free")
608 (string-append "free = load_dll('c', fallbacks=['"
609 glibc "/lib/libc.so.6']).free"))))
611 (home-page "https://github.com/Toblerity/Shapely")
612 (synopsis "Library for the manipulation and analysis of geometric objects")
613 (description "Shapely is a Python package for manipulation and analysis of
614 planar geometric objects. It is based on the @code{GEOS} library.")
615 (license license:bsd-3)))
617 (define-public python-logwrap
619 (name "python-logwrap")
624 (uri (pypi-uri "logwrap" version ".zip"))
627 "1d2k0hvpbi51vl410y8fbs5m0nxnlh2k7gr2nrh3k81ibhzscsra"))))
628 (build-system python-build-system)
630 `(("python-six" ,python-six)
631 ("python-typing" ,python-typing)))
634 ("python-cython" ,python-cython)
635 ("python-pytest" ,python-pytest)
636 ("python-pytest-cov" ,python-pytest-cov)
637 ("python-pytest-runner" ,python-pytest-runner)))
638 (home-page "https://github.com/penguinolog/logwrap")
639 (synopsis "Decorator for logging function arguments")
640 (description "This package provides a decorator to log function arguments
641 and function call return values in a human-readable way.")
642 (license license:asl2.0)))
644 (define-public python2-shapely
645 (package-with-python2 python-shapely))
647 (define-public python-clyent
649 (name "python-clyent")
654 (uri (pypi-uri "clyent" version))
657 "1r9987qmy1pz3hq54160bapqsywpq14waw4w9x3ly8hmq7kpgfbj"))))
658 (build-system python-build-system)
660 `(("python-mock" ,python-mock)))
661 (home-page "https://github.com/binstar/clyent")
662 (synopsis "Command line client library")
663 (description "Clyent is a Python command line utiliy library. It is used
664 by @code{binstar}, @code{binstar-build} and @code{chalmers}.")
665 (license license:bsd-3)))
667 (define-public python2-clyent
668 (package-with-python2 python-clyent))
670 (define-public python-babel
672 (name "python-babel")
677 (uri (pypi-uri "Babel" version))
680 "0x98qqqw35xllpcama013a9788ly84z8dm1w2wwfpxh2710c8df5"))))
681 (build-system python-build-system)
683 `(("python-pytz" ,python-pytz)))
684 (arguments `(#:tests? #f)) ; no test target
685 (home-page "http://babel.pocoo.org/")
687 "Tools for internationalizing Python applications")
689 "Babel is composed of two major parts:
690 - tools to build and work with gettext message catalogs
691 - a Python interface to the CLDR (Common Locale Data Repository), providing
692 access to various locale display names, localized number and date formatting,
694 (license license:bsd-3)))
696 (define-public python2-babel
697 (package-with-python2 python-babel))
699 (define-public python2-backport-ssl-match-hostname
701 (name "python2-backport-ssl-match-hostname")
707 "https://pypi.python.org/packages/source/b/"
708 "backports.ssl_match_hostname/backports.ssl_match_hostname-"
712 "1wndipik52cyqy0677zdgp90i435pmvwd89cz98lm7ri0y3xjajh"))))
713 (build-system python-build-system)
716 #:tests? #f)) ; no test target
717 (home-page "https://bitbucket.org/brandon/backports.ssl_match_hostname")
718 (synopsis "Backport of ssl.match_hostname() function from Python 3.5")
720 "This backport brings the ssl.match_hostname() function to users of
721 earlier versions of Python. The function checks the hostname in the
722 certificate returned by the server to which a connection has been established,
723 and verifies that it matches the intended target hostname.")
724 (license license:psfl)))
726 (define-public python-hdf4
733 (uri (pypi-uri name version))
736 "1hjiyrxvxk9817qyqky3nar4y3fs4z8wxz0n884zzb5wi6skrjks"))))
737 (build-system python-build-system)
738 (native-inputs `(("nose" ,python-nose)))
739 (propagated-inputs `(("numpy" ,python-numpy)))
746 (modify-phases %standard-phases
749 ;; The 'runexamples' script sets PYTHONPATH to CWD, then goes
750 ;; on to import numpy. Somehow this works on their CI system.
751 ;; Let's just manage PYTHONPATH here instead.
752 (substitute* "runexamples.sh"
753 (("export PYTHONPATH=.*") ""))
755 (string-append (getcwd) ":"
756 (getenv "PYTHONPATH")))
757 (and (zero? (system* "./runexamples.sh"))
758 (zero? (system* "nosetests" "-v"))))))))
759 (home-page "https://github.com/fhs/python-hdf4")
760 (synopsis "Python interface to the NCSA HDF4 library")
762 "Python-HDF4 is a python wrapper around the NCSA HDF version 4 library,
763 which implements the SD (Scientific Dataset), VS (Vdata) and V (Vgroup) API’s.
764 NetCDF files can also be read and modified. Python-HDF4 is a fork of
765 @url{http://hdfeos.org/software/pyhdf.php,pyhdf}.")
766 (license license:expat)))
768 (define-public python2-hdf4
769 (package-with-python2 python-hdf4))
771 (define-public python-h5py
778 (uri (pypi-uri "h5py" version))
781 "0433sdv6xc9p7v1xs1gvbxp7p152ywi3nplgjb258q9fvw9469br"))))
782 (build-system python-build-system)
784 `(#:tests? #f ; no test target
786 (modify-phases %standard-phases
787 (add-after 'unpack 'fix-hdf5-paths
788 (lambda* (#:key inputs #:allow-other-keys)
789 (let ((prefix (assoc-ref inputs "hdf5")))
790 (substitute* "setup_build.py"
791 (("\\['/opt/local/lib', '/usr/local/lib'\\]")
792 (string-append "['" prefix "/lib" "']"))
793 (("'/opt/local/include', '/usr/local/include'")
794 (string-append "'" prefix "/include" "'")))
795 (substitute* "setup_configure.py"
796 (("\\['/usr/local/lib', '/opt/local/lib'\\]")
797 (string-append "['" prefix "/lib" "']")))
800 `(("python-six" ,python-six)
801 ("python-numpy" ,python-numpy)))
805 `(("python-cython" ,python-cython)
806 ("python-pkgconfig" ,python-pkgconfig)))
807 (home-page "http://www.h5py.org/")
808 (synopsis "Read and write HDF5 files from Python")
810 "The h5py package provides both a high- and low-level interface to the
811 HDF5 library from Python. The low-level interface is intended to be a
812 complete wrapping of the HDF5 API, while the high-level component supports
813 access to HDF5 files, datasets and groups using established Python and NumPy
815 (license license:bsd-3)))
817 (define-public python2-h5py
818 (package-with-python2 python-h5py))
820 (define-public python-netcdf4
822 (name "python-netcdf4")
827 (uri (pypi-uri "netCDF4" version))
830 "1h6jq338amlbk0ilzvjyl7cck80i0bah9a5spn9in71vy2qxm7i5"))))
831 (build-system python-build-system)
833 `(("python-cython" ,python-cython)))
835 `(("python-numpy" ,python-numpy)))
842 (modify-phases %standard-phases
845 (setenv "NO_NET" "1") ; disable opendap tests
846 (with-directory-excursion "test"
847 (setenv "PYTHONPATH" ; find and add the library we just built
849 (car (find-files "../build" "lib.*"
851 #:fail-on-error? #:t))
852 ":" (getenv "PYTHONPATH")))
853 (zero? (system* "python" "run_all.py"))))))))
855 "https://github.com/Unidata/netcdf4-python")
856 (synopsis "Python/numpy interface to the netCDF library")
857 (description "Netcdf4-python is a Python interface to the netCDF C
858 library. netCDF version 4 has many features not found in earlier
859 versions of the library and is implemented on top of HDF5. This module
860 can read and write files in both the new netCDF 4 and the old netCDF 3
861 format, and can create files that are readable by HDF5 clients. The
862 API is modelled after @code{Scientific.IO.NetCDF}, and should be familiar
863 to users of that module.")
864 ;; The software is mainly ISC, but includes some files covered
865 ;; by the Expat license.
866 (license (list license:isc license:expat))))
868 (define-public python2-netcdf4
869 (package-with-python2 python-netcdf4))
871 (define-public python-lockfile
873 (name "python-lockfile")
878 (uri (string-append "https://pypi.python.org/packages/source/l/lockfile/"
879 "lockfile-" version ".tar.gz"))
882 "16gpx5hm73ah5n1079ng0vy381hl802v606npkx4x8nb0gg05vba"))))
883 (build-system python-build-system)
884 (arguments '(#:test-target "check"))
886 `(("python-pbr" ,python-pbr)))
887 (home-page "https://launchpad.net/pylockfile")
888 (synopsis "Platform-independent file locking module")
890 "The lockfile package exports a LockFile class which provides a simple
891 API for locking files.")
892 (license license:expat)))
894 (define-public python2-lockfile
895 (package-with-python2 python-lockfile))
897 (define-public python-setuptools
899 (name "python-setuptools")
904 (uri (pypi-uri "setuptools" version))
907 "0ypybh4hx3bv4vhg2dc74xpj1g56ggnaffm87k4abhwjwq6wq608"))
908 (modules '((guix build utils)))
911 ;; Remove included binaries which are used to build self-extracting
912 ;; installers for Windows.
913 ;; TODO: Find some way to build them ourself so we can include them.
914 (for-each delete-file (find-files "setuptools" "^(cli|gui).*\\.exe$"))
916 (build-system python-build-system)
917 ;; FIXME: Tests require pytest, which itself relies on setuptools.
918 ;; One could bootstrap with an internal untested setuptools.
921 (home-page "https://pypi.python.org/pypi/setuptools")
923 "Library designed to facilitate packaging Python projects")
925 "Setuptools is a fully-featured, stable library designed to facilitate
926 packaging Python projects, where packaging includes:
927 Python package and module definitions,
928 distribution package metadata,
930 project installation,
931 platform-specific details,
933 ;; TODO: setuptools now bundles the following libraries:
934 ;; packaging, pyparsing, six and appdirs. How to unbundle?
935 (license (list license:psfl ; setuptools itself
936 license:expat ; six, appdirs, pyparsing
937 license:asl2.0 ; packaging is dual ASL2/BSD-2
940 (define-public python2-setuptools
941 (package-with-python2 python-setuptools))
943 (define-public python-uniseg
945 (name "python-uniseg")
950 (uri (pypi-uri "uniseg" version ".zip"))
953 "05jsazvz6nbmh6l3v1rph5ydkqn1hzx1pyggdyvgp2qgmgrnmiz2"))))
954 (build-system python-build-system)
956 '(#:tests? #f)) ; The test suite requires network access.
960 "https://bitbucket.org/emptypage/uniseg-python")
962 "Python library to determine Unicode text segmentations")
964 "Uniseg is a Python package used to determine Unicode text segmentations.
965 Supported segmentations include:
967 @item @dfn{Code point} (any value in the Unicode codespace)
968 @item @dfn{Grapheme cluster} (user-perceived character made of a single or
969 multiple Unicode code points, e.g. \"G\" + acute-accent)
974 (license license:expat)))
976 (define-public python2-uniseg
977 (package-with-python2 python-uniseg))
979 (define-public python-humanfriendly
981 (name "python-humanfriendly")
986 (uri (pypi-uri "humanfriendly" version))
989 "0pisgizjql86785jchfjv217g0lsgk114g2lja5j4y3lsc3b9szi"))))
990 (build-system python-build-system)
992 `(;; XXX: Tests depend on coloredlogs, which in turn depends on humanfriendly.
995 `(("python-monotonic" ,python-monotonic)))
996 (home-page "https://humanfriendly.readthedocs.io")
997 (synopsis "Human-friendly input and output in Python")
999 "The functions and classes in @code{humanfriendly} can be used to make
1000 text interfaces more user-friendly. It includes tools to parse and format
1001 numbers, file sizes, and timespans, timers for long-running operations, menus
1002 to allow the user to choose from a list of options, and terminal interaction
1004 (license license:expat)))
1006 (define-public python2-humanfriendly
1007 (package-with-python2 python-humanfriendly))
1009 (define-public python-capturer
1011 (name "python-capturer")
1016 (uri (pypi-uri "capturer" version))
1019 "05d6ji4j8ipiq0br7bwam38qc6hd9l1djmfxlzrxx19ziyjl4089"))))
1020 (build-system python-build-system)
1024 `(("python-humanfriendly" ,python-humanfriendly)))
1025 (home-page "https://capturer.readthedocs.io")
1026 (synopsis "Capture stdout and stderr streams of the current process")
1028 "The capturer package makes it easy to capture the stdout and stderr
1029 streams of the current process and subprocesses. Output can be relayed
1030 to the terminal in real time but is also available to the Python program
1031 for additional processing.")
1032 (license license:expat)))
1034 (define-public python2-capturer
1035 (package-with-python2 python-capturer))
1037 (define-public python-verboselogs
1039 (name "python-verboselogs")
1044 (uri (pypi-uri "verboselogs" version))
1047 "09z4d1jiasn7k1hs5af2ckmnrd0i1d1m04bhfjhv7z6svzfdwgg3"))))
1048 (build-system python-build-system)
1050 `(("python-mock" ,python-mock)
1051 ("python-astroid" ,python-astroid)
1052 ("python-pylint" ,python-pylint)))
1053 (home-page "https://verboselogs.readthedocs.io")
1054 (synopsis "Verbose logging level for Python's logging module")
1056 "The @code{verboselogs} package extends Python's @code{logging} module to
1057 add the log levels NOTICE, SPAM, SUCCESS and VERBOSE.")
1058 (license license:expat)))
1060 (define-public python2-verboselogs
1061 (package-with-python2 python-verboselogs))
1063 (define-public python-coloredlogs
1065 (name "python-coloredlogs")
1070 (uri (pypi-uri "coloredlogs" version))
1073 "1blcann6dyg5dhps9pg12rn0q0rjrlajpmmil0gy0j4cbvnl2il9"))))
1074 (build-system python-build-system)
1076 `(;Tests require some updated modules
1079 `(("python-capturer" ,python-capturer)))
1080 (home-page "https://coloredlogs.readthedocs.io")
1081 (synopsis "Colored stream handler for Python's logging module")
1083 "The @code{coloredlogs} package enables colored terminal output for
1084 Python's logging module. The @code{ColoredFormatter} class inherits from
1085 @code{logging.Formatter} and uses ANSI escape sequences to render your logging
1086 messages in color.")
1087 (license license:expat)))
1089 (define-public python2-coloredlogs
1090 (package-with-python2 python-coloredlogs))
1092 (define-public python-eventlet
1094 (name "python-eventlet")
1099 (uri (pypi-uri "eventlet" version))
1102 "0f3q55mq4n021wb7qa53pz3ix6i2py64sap66vsaqm2scjw83m9s"))))
1103 (build-system python-build-system)
1105 `(("python-greenlet" ,python-greenlet)))
1107 ;; TODO: Requires unpackaged 'enum-compat'.
1109 (home-page "http://eventlet.net")
1110 (synopsis "Concurrent networking library for Python")
1112 "Eventlet is a concurrent networking library for Python that
1113 allows you to change how you run your code, not how you write it.
1114 It uses @code{epoll} or @code{libevent} for highly scalable non-blocking I/O.
1115 Coroutines ensure that the developer uses a blocking style of programming
1116 that is similar to threading, but provide the benefits of non-blocking I/O.
1117 The event dispatch is implicit, which means you can easily use @code{Eventlet}
1118 from the Python interpreter, or as a small part of a larger application.")
1119 (license license:expat)))
1121 (define-public python2-eventlet
1122 (let ((base (package-with-python2
1123 (strip-python2-variant python-eventlet))))
1124 (package (inherit base)
1126 `(("python2-enum34" ,python2-enum34)
1127 ,@(package-propagated-inputs base))))))
1129 (define-public python-six
1136 (uri (pypi-uri "six" version))
1139 "1scqzwc51c875z23phj48gircqjgnn3af8zy2izjwmnlxrxsgs3h"))))
1140 (build-system python-build-system)
1143 (modify-phases %standard-phases
1146 (invoke "py.test" "-v"))))))
1148 `(("python-py" ,python-py)
1149 ("python-pytest" ,python-pytest-bootstrap)))
1150 (home-page "https://pypi.python.org/pypi/six/")
1151 (synopsis "Python 2 and 3 compatibility utilities")
1153 "Six is a Python 2 and 3 compatibility library. It provides utility
1154 functions for smoothing over the differences between the Python versions with
1155 the goal of writing Python code that is compatible on both Python versions.
1156 Six supports every Python version since 2.5. It is contained in only one
1157 Python file, so it can be easily copied into your project.")
1158 (license license:x11)))
1160 (define-public python2-six
1161 (package-with-python2 python-six))
1163 (define-public python-six-bootstrap
1165 (inherit python-six)
1166 (name "python-six-bootstrap")
1168 (arguments `(#:tests? #f))))
1170 (define-public python2-six-bootstrap
1171 (package-with-python2 python-six-bootstrap))
1173 (define-public python-schedule
1175 (name "python-schedule")
1180 (uri (pypi-uri "schedule" version))
1183 "0vplyjcbfrq50sphlwya749z8p2pcyi2nycw3518i0qpd9a6189i"))))
1184 (build-system python-build-system)
1186 `(("python-pytest" ,python-pytest)
1187 ("python-mock" ,python-mock)))
1188 (home-page "https://github.com/dbader/schedule")
1189 (synopsis "Schedule periodic function calls in Python")
1191 "Schedule is an in-process scheduler for periodic jobs that uses the
1192 builder pattern for configuration. Schedule lets you run Python functions (or
1193 any other callable) periodically at pre-determined intervals using a simple,
1194 human-friendly syntax.")
1195 (license license:expat)))
1197 (define-public python2-schedule
1198 (package-with-python2 python-schedule))
1200 (define-public python-pandas
1202 (name "python-pandas")
1207 (uri (pypi-uri "pandas" version))
1209 (base32 "0v0fi2i10kwnmlpsl6f1fgajcpx3q6766qf6xqi5kw3ivn8l1aa4"))))
1210 (build-system python-build-system)
1212 `(#:modules ((guix build utils)
1213 (guix build python-build-system)
1216 #:phases (modify-phases %standard-phases
1219 (let ((build-directory
1222 (car (scandir "build"
1223 (cut string-prefix? "lib." <>))))))
1224 (with-directory-excursion build-directory
1225 ;; Delete tests that require "moto" which is not yet in Guix.
1226 (for-each delete-file
1227 '("pandas/tests/io/conftest.py"
1228 "pandas/tests/io/json/test_compression.py"
1229 "pandas/tests/io/test_excel.py"))
1230 (invoke "pytest" "-v" "pandas" "-k"
1232 "not network and not disabled"
1233 ;; XXX: Due to the deleted tests above.
1234 " and not test_read_s3_jsonl")))))))))
1236 `(("python-numpy" ,python-numpy)
1237 ("python-pytz" ,python-pytz)
1238 ("python-dateutil" ,python-dateutil)))
1240 `(("python-cython" ,python-cython)
1241 ("python-lxml" ,python-lxml)
1242 ("python-nose" ,python-nose)
1243 ("python-pytest" ,python-pytest)))
1244 (home-page "https://pandas.pydata.org")
1245 (synopsis "Data structures for data analysis, time series, and statistics")
1247 "Pandas is a Python package providing fast, flexible, and expressive data
1248 structures designed to make working with structured (tabular,
1249 multidimensional, potentially heterogeneous) and time series data both easy
1250 and intuitive. It aims to be the fundamental high-level building block for
1251 doing practical, real world data analysis in Python.")
1252 (license license:bsd-3)))
1254 (define-public python2-pandas
1255 (package-with-python2 python-pandas))
1257 (define-public python2-mechanize
1259 (name "python2-mechanize")
1264 (uri (string-append "https://pypi.python.org/packages/source/m/mechanize/mechanize-"
1268 "0rj7r166i1dyrq0ihm5rijfmvhs8a04im28lv05c0c3v206v4rrf"))))
1269 (build-system python-build-system)
1271 `(#:python ,python-2 ; apparently incompatible with Python 3
1273 ;; test fails with message
1274 ;; AttributeError: 'module' object has no attribute 'test_pullparser'
1275 ;; (python-3.3.2) or
1276 ;; AttributeError: 'module' object has no attribute 'test_urllib2_localnet'
1278 ;; The source code is from March 2011 and probably not up-to-date
1279 ;; with respect to python unit tests.
1280 (home-page "http://wwwsearch.sourceforge.net/mechanize/")
1282 "Stateful programmatic web browsing in Python")
1284 "Mechanize implements stateful programmatic web browsing in Python,
1285 after Andy Lester’s Perl module WWW::Mechanize.")
1286 (license (license:non-copyleft
1288 "See COPYING in the distribution."))))
1291 (define-public python-simplejson
1293 (name "python-simplejson")
1298 (uri (pypi-uri "simplejson" version))
1301 "1lkv3xlf7ryzi69zqfdbkvpxdfy1rg1rq2yzcnxgf4km5m6difqy"))))
1302 (build-system python-build-system)
1303 (home-page "http://simplejson.readthedocs.org/en/latest/")
1305 "Json library for Python")
1307 "JSON (JavaScript Object Notation) is a subset of JavaScript
1308 syntax (ECMA-262 3rd edition) used as a lightweight data interchange
1311 Simplejson exposes an API familiar to users of the standard library marshal
1312 and pickle modules. It is the externally maintained version of the json
1313 library contained in Python 2.6, but maintains compatibility with Python 2.5
1314 and (currently) has significant performance advantages, even without using
1315 the optional C extension for speedups. Simplejson is also supported on
1317 (license license:x11)))
1319 (define-public python2-simplejson
1320 (package-with-python2 python-simplejson))
1323 (define-public python-pyicu
1325 (name "python-pyicu")
1330 (uri (pypi-uri "PyICU" version))
1333 "05nz4p2dpkhwj6y9kik24xbvmfxji39nl0xw0sc0nvp9fgzf6xnd"))))
1334 (build-system python-build-system)
1336 `(("icu4c" ,icu4c)))
1338 `(("python-pytest" ,python-pytest)
1339 ("python-six" ,python-six)))
1340 (home-page "https://github.com/ovalhub/pyicu")
1341 (synopsis "Python extension wrapping the ICU C++ API")
1343 "PyICU is a python extension wrapping the ICU C++ API.")
1344 (properties `((python2-variant . ,(delay python2-pyicu))))
1345 (license license:x11)))
1347 (define-public python2-pyicu
1348 (let ((base (package-with-python2
1349 (strip-python2-variant python-pyicu))))
1353 `(,@(package-arguments base)
1355 (modify-phases %standard-phases
1356 (add-before 'check 'delete-failing-test
1358 ;; XXX: This fails due to Unicode issues unique to Python 2,
1359 ;; it seems: <https://github.com/ovalhub/pyicu/issues/61>.
1360 (delete-file "test/test_Script.py")
1363 (define-public python2-dogtail
1364 ;; Python 2 only, as it leads to "TabError: inconsistent use of tabs and
1365 ;; spaces in indentation" with Python 3.
1367 (name "python2-dogtail")
1371 (uri (pypi-uri "dogtail" version))
1374 "0p5wfssvzr9w0bvhllzbbd8fnp4cca2qxcpcsc33dchrmh5n552x"))))
1375 (build-system python-build-system)
1376 (arguments `(#:python ,python-2
1377 #:tests? #f)) ; invalid command "test"
1378 ;; Currently no offical homepage.
1379 (home-page "https://pypi.python.org/pypi/dogtail/")
1380 (synopsis "GUI test tool and automation framework written in Python")
1382 "Dogtail is a GUI test tool and automation framework written in Python.
1383 It uses Accessibility (a11y) technologies to communicate with desktop
1384 applications. dogtail scripts are written in Python and executed like any
1385 other Python program.")
1386 (license license:gpl2+)))
1388 (define-public python-empy
1390 (name "python-empy")
1394 (uri (string-append "http://www.alcyone.com/software/empy/empy-"
1398 "01g8mmkfnvjdmlhsihwyx56lrg7r5m5d2fg6mnxsvy6g0dnl69f6"))))
1399 (build-system python-build-system)
1401 `(#:tests? #f)) ;python2 only
1402 (home-page "http://www.alcyone.com/software/empy/")
1403 (synopsis "Templating system for Python")
1405 "EmPy is a system for embedding Python expressions and statements in
1406 template text; it takes an EmPy source file, processes it, and produces
1407 output. This is accomplished via expansions, which are special signals to the
1408 EmPy system and are set off by a special prefix (by default the at sign, @@).
1409 EmPy can expand arbitrary Python expressions and statements in this way, as
1410 well as a variety of special forms. Textual data not explicitly delimited in
1411 this way is sent unaffected to the output, allowing Python to be used in
1412 effect as a markup language. Also supported are callbacks via hooks,
1413 recording and playback via diversions, and dynamic, chainable filters. The
1414 system is highly configurable via command line options and embedded
1416 (license license:lgpl2.1+)))
1418 (define-public python2-empy
1419 (package-with-python2 python-empy))
1421 (define-public python2-element-tree
1423 (name "python2-element-tree")
1428 "http://effbot.org/media/downloads/elementtree-"
1429 version "-20050316.tar.gz"))
1432 "016bphqnlg0l4vslahhw4r0aanw95bpypy65r1i1acyb2wj5z7dj"))))
1433 (build-system python-build-system)
1435 `(#:python ,python-2 ; seems to be part of Python 3
1436 #:tests? #f)) ; no 'test' sub-command
1437 (synopsis "Toolkit for XML processing in Python")
1439 "ElementTree is a Python library supporting lightweight XML processing.")
1440 (home-page "http://effbot.org/zone/element-index.htm")
1441 (license (license:x11-style
1442 "http://docs.python.org/2/license.html"
1443 "Like \"CWI LICENSE AGREEMENT FOR PYTHON 0.9.0 THROUGH 1.2\"."))))
1445 (define-public python2-pybugz
1447 (name "python2-pybugz")
1452 "http://bits.liquidx.net/projects/pybugz/pybugz-"
1456 "17ni00p08gp5lkxlrrcnvi3x09fmajnlbz4da03qcgl9q21ym4jd"))
1457 (patches (search-patches "pybugz-stty.patch"
1458 "pybugz-encode-error.patch"))))
1459 (build-system python-build-system)
1461 `(#:python ,python-2 ; SyntaxError with Python 3
1462 #:tests? #f)) ; no 'test' sub-command
1464 `(("element-tree" ,python2-element-tree)))
1465 (synopsis "Python and command-line interface to Bugzilla")
1467 "PyBugz is a Python library and command-line tool to query the Bugzilla
1468 bug tracking system. It is meant as an aid to speed up interaction with the
1470 (home-page "http://www.liquidx.net/pybugz/")
1471 (license license:gpl2)))
1473 (define-public python2-enum
1475 (name "python2-enum")
1479 (uri (pypi-uri "enum" version))
1482 "13lk3yrwj42vl30kw3c194f739nrfrdg64s6i0v2p636n4k8brsl"))))
1483 (build-system python-build-system)
1485 `(#:python ,python-2))
1486 (home-page "http://pypi.python.org/pypi/enum/")
1487 (synopsis "Robust enumerated type support in Python")
1489 "This provides a module for robust enumerations in Python. It has
1490 been superseded by the Python standard library and is provided only for
1492 ;; Choice of either license.
1493 (license (list license:gpl3+ license:psfl))))
1495 (define-public python-enum34
1497 (name "python-enum34")
1502 (uri (pypi-uri "enum34" version))
1505 "1cgm5ng2gcfrkrm3hc22brl6chdmv67b9zvva9sfs7gn7dwc9n4a"))))
1506 (build-system python-build-system)
1507 (home-page "https://pypi.python.org/pypi/enum34")
1508 (synopsis "Backported Python 3.4 Enum")
1510 "Enum34 is the new Python stdlib enum module available in Python 3.4
1511 backported for previous versions of Python from 2.4 to 3.3.")
1512 (license license:bsd-3)))
1514 (define-public python2-enum34
1515 (package-with-python2 python-enum34))
1517 (define-public python-parse-type
1519 (name "python-parse-type")
1524 (uri (pypi-uri "parse_type" version))
1527 "0g3b6gsdwnm8dpkh2vn34q6dzxm9gl908ggyzcv31n9xbp3vv5pm"))))
1528 (build-system python-build-system)
1530 `(("python-six" ,python-six)
1531 ("python-parse" ,python-parse)))
1533 `(("python-pytest" ,python-pytest)
1534 ("python-pytest-runner" ,python-pytest-runner)))
1535 (home-page "https://github.com/jenisys/parse_type")
1536 (synopsis "Extended parse module")
1538 "Parse_type extends the python parse module.")
1540 `((python2-variant . ,(delay python2-parse-type))))
1541 (license license:bsd-3)))
1543 (define-public python2-parse-type
1544 (let ((base (package-with-python2
1545 (strip-python2-variant python-parse-type))))
1546 (package (inherit base)
1548 `(("python2-enum34" ,python2-enum34)
1549 ,@(package-propagated-inputs base))))))
1551 (define-public python-parse
1553 (name "python-parse")
1558 (uri (pypi-uri "parse" version))
1561 "1lj9v1q4imszyhvipb6drsm3xdl35nan011mqxxas1yaypixsj40"))))
1562 (build-system python-build-system)
1565 (modify-phases %standard-phases
1567 (lambda _ (invoke "python" "test_parse.py"))))))
1568 (home-page "https://github.com/r1chardj0n3s/parse")
1569 (synopsis "Parse strings")
1571 "Parse strings using a specification based on the Python format()
1573 (license license:x11)))
1575 (define-public python-polib
1577 (name "python-polib")
1581 (uri (pypi-uri "polib" version))
1584 "1pq2hbm3m2q0cjdszk8mc4qa1vl3wcblh5nfyirlfnzb2pcy7zss"))))
1585 (build-system python-build-system)
1586 (home-page "https://bitbucket.org/izi/polib/wiki/Home")
1587 (synopsis "Manipulate, create and modify gettext files")
1588 (description "Polib can manipulate any gettext format (po, pot and mo)
1589 files. It can be used to create po files from scratch or to modify
1591 (license license:expat)))
1593 (define-public python2-polib
1594 (let ((base (package-with-python2 (strip-python2-variant python-polib))))
1597 (arguments `(,@(package-arguments base)
1598 ;; Tests don't work with python2.
1601 (define-public scons
1607 (uri (string-append "mirror://sourceforge/scons/scons/" version
1608 "/scons-" version ".tar.gz"))
1611 "0wzid419mlwqw9llrg8gsx4nkzhqy16m4m40r0xnh6cwscw5wir4"))))
1612 (build-system python-build-system)
1614 `(#:use-setuptools? #f ; still relies on distutils
1615 #:tests? #f)) ; no 'python setup.py test' command
1616 (home-page "http://scons.org/")
1617 (synopsis "Software construction tool written in Python")
1619 "SCons is a software construction tool. Think of SCons as an improved,
1620 cross-platform substitute for the classic Make utility with integrated
1621 functionality similar to autoconf/automake and compiler caches such as ccache.
1622 In short, SCons is an easier, more reliable and faster way to build
1624 (license license:x11)))
1626 (define-public scons-python2
1628 (inherit (package-with-python2 scons))
1629 (name "scons-python2")))
1631 (define-public python-extras
1633 (name "python-extras")
1638 (uri (pypi-uri "extras" version))
1641 "0khvm08rcwm62wc47j8niyl6h13f8w51c8669ifivjdr23g3cbhk"))))
1642 (build-system python-build-system)
1644 ;; FIXME: Circular dependency on testtools.
1646 (home-page "https://github.com/testing-cabal/extras")
1647 (synopsis "Useful extensions to the Python standard library")
1649 "Extras is a set of extensions to the Python standard library.")
1650 (license license:expat)))
1652 (define-public python2-extras
1653 (package-with-python2 python-extras))
1655 (define-public python-mimeparse
1657 (name "python-mimeparse")
1663 "https://pypi.python.org/packages/source/p/python-mimeparse/python-mimeparse-"
1667 "1hyxg09kaj02ri0rmwjqi86wk4nd1akvv7n0dx77azz76wga4s9w"))))
1668 (build-system python-build-system)
1670 '(#:tests? #f)) ; no setup.py test command
1672 "https://github.com/dbtsai/python-mimeparse")
1673 (synopsis "Python library for parsing MIME types")
1675 "Mimeparse provides basic functions for parsing MIME type names and
1676 matching them against a list of media-ranges.")
1677 (license license:expat)))
1679 (define-public python2-mimeparse
1680 (package-with-python2 python-mimeparse))
1682 (define-public python-pafy
1684 (name "python-pafy")
1689 (uri (pypi-uri "pafy" version))
1692 "1a7dxi95m1043rxx1r5x3ngb66nwlq6aqcasyqqjzmmmjps4zrim"))))
1693 (build-system python-build-system)
1695 `(#:tests? #f)) ; Currently pafy can not find itself in the tests
1697 ;; Youtube-dl is a python package which is imported in the file
1698 ;; "backend_youtube_dl.py", therefore it needs to be propagated.
1699 `(("youtube-dl" ,youtube-dl)))
1700 (home-page "https://np1.github.io/pafy/")
1701 (synopsis "Retrieve YouTube content and metadata")
1703 "@code{pafy} is a python library to retrieve YouTube content and metadata.")
1704 (license license:lgpl3+)))
1706 (define-public python2-funcsigs
1708 (name "python2-funcsigs")
1712 (uri (pypi-uri "funcsigs" version))
1715 "0l4g5818ffyfmfs1a924811azhjj8ax9xd1cffr1mzd3ycn0zfx7"))))
1716 (build-system python-build-system)
1718 `(#:python ,python-2))
1720 `(("python2-unittest2" ,python2-unittest2)))
1721 (home-page "http://funcsigs.readthedocs.org")
1722 (synopsis "Python function signatures from PEP362")
1724 "Backport of @code{funcsigs} which was introduced in Python 3.3.")
1725 (license license:asl2.0)))
1727 (define-public python2-funcsigs-bootstrap
1729 (inherit python2-funcsigs)
1730 (name "python2-funcsigs-bootstrap")
1734 ,@(package-arguments python2-funcsigs)))))
1736 (define-public python-pafy
1738 (name "python-pafy")
1743 (uri (pypi-uri "pafy" version))
1746 "1a7dxi95m1043rxx1r5x3ngb66nwlq6aqcasyqqjzmmmjps4zrim"))))
1747 (build-system python-build-system)
1749 `(#:tests? #f)) ; Currently pafy can not find itself in the tests
1751 ;; Youtube-dl is a python package which is imported in the file
1752 ;; "backend_youtube_dl.py", therefore it needs to be propagated.
1753 `(("youtube-dl" ,youtube-dl)))
1754 (home-page "https://np1.github.io/pafy/")
1755 (synopsis "Retrieve YouTube content and metadata")
1757 "@code{pafy} is a python library to retrieve YouTube content and metadata.")
1758 (license license:lgpl3+)))
1760 (define-public python-py
1767 (uri (pypi-uri "py" version))
1770 "10gq2lckvgwlk9w6yzijhzkarx44hsaknd0ypa08wlnpjnsgmj99"))))
1771 (build-system python-build-system)
1773 ;; FIXME: "ImportError: 'test' module incorrectly imported from
1774 ;; '/gnu/store/...-python-pytest-mimimal-3.0.5/lib/python3.5/site-packages'.
1775 ;; Expected '/tmp/guix-build-python-py-1.4.31.drv-0/py-1.4.31/py'.
1776 ;; Is this module globally installed?"
1778 (home-page "http://pylib.readthedocs.io/")
1779 (synopsis "Python library for parsing, I/O, instrospection, and logging")
1781 "Py is a Python library for file name parsing, .ini file parsing, I/O,
1782 code introspection, and logging.")
1783 (license license:expat)))
1785 (define-public python2-py
1786 (package-with-python2 python-py))
1788 ;; Recent versions of python-fixtures and python-testrepository need
1789 ;; python-pbr for packaging, which itself needs these two packages for
1791 ;; To fix this circular dependency, we use a build of python-pbr, based on the
1792 ;; same source, just without any test dependencies and with tests disabled.
1793 ;; python-pbr-minmal is then used to package python-fixtures and
1794 ;; python-testrepository.
1795 ;; Strictly speaking we currently could remove the test-requirements from the
1796 ;; normal python-pbr package (and save this package) since test are disabled
1797 ;; there anyway. But this may change in future.
1798 (define-public python-pbr-minimal
1800 (name "python-pbr-minimal")
1805 (uri (pypi-uri "pbr" version))
1808 "14fs5acnalnb3h62s7q7av239j541fk0n0z0lawh4h09b1s93s6p"))))
1809 (build-system python-build-system)
1812 (home-page "http://docs.openstack.org/developer/pbr/")
1813 (synopsis "Minimal build of python-pbr used for bootstrapping")
1815 "Used only for bootstrapping python2-pbr, you should not need this.")
1816 (license license:asl2.0)))
1818 (define-public python2-pbr-minimal
1819 (package-with-python2 python-pbr-minimal))
1821 (define-public python-pbr
1823 (inherit python-pbr-minimal)
1826 `(#:tests? #f)) ;; Most tests seem to use the Internet.
1828 `(("git" ,git))) ;; pbr actually uses the "git" binary.
1830 `(("python-fixtures" ,python-fixtures-bootstrap)
1831 ;; discover, coverage, hacking, subunit
1832 ("python-mock" ,python-mock)
1833 ("python-six" ,python-six)
1834 ("python-sphinx" ,python-sphinx)
1835 ("python-testrepository" ,python-testrepository-bootstrap)
1836 ("python-testresources" ,python-testresources-bootstrap)
1837 ("python-testscenarios" ,python-testscenarios-bootstrap)
1838 ("python-testtools" ,python-testtools-bootstrap)
1839 ("python-virtualenv" ,python-virtualenv)))
1840 (synopsis "Enhance the default behavior of Python’s setuptools")
1842 "Python Build Reasonableness (PBR) is a library that injects some useful
1843 and sensible default behaviors into your setuptools run. It will set
1844 versions, process requirements files and generate AUTHORS and ChangeLog file
1845 from git information.
1848 (define-public python2-pbr
1849 (package-with-python2 python-pbr))
1851 (define-public python-exif-read
1853 (name "python-exif-read")
1857 (uri (pypi-uri "ExifRead" version))
1860 "1b90jf6m9vxh9nanhpyvqdq7hmfx5iggw1l8kq10jrs6xgr49qkr"))))
1861 (build-system python-build-system)
1862 (arguments `(#:tests? #f)) ; no tests
1863 (home-page "https://github.com/ianare/exif-py")
1864 (synopsis "Python library to extract EXIF data from image files")
1866 "ExifRead is a Python library to extract EXIF data from tiff and jpeg
1868 (license license:bsd-3)))
1870 (define-public python2-exif-read
1871 (package-with-python2 python-exif-read))
1873 (define-public python-pyld
1875 (name "python-pyld")
1879 (uri (pypi-uri "PyLD" version))
1882 "12i2g6xdj30k7xxcibg3sc5y76snwq8l6n8fy9lyi577kgy0h2pm"))))
1883 (build-system python-build-system)
1884 (home-page "https://github.com/digitalbazaar/pyld")
1885 (synopsis "Python implementation of the JSON-LD specification")
1887 "PyLD is an implementation of the JSON-LD specification.")
1888 (license license:bsd-3)))
1890 (define-public python2-pyld
1891 (package-with-python2 python-pyld))
1893 (define-public python-click
1895 (name "python-click")
1900 (uri (pypi-uri "click" version))
1903 "02qkfpykbq35id8glfgwc38yc430427yd05z1wc5cnld8zgicmgi"))))
1904 (build-system python-build-system)
1906 `(;; The tests are fragile, depending on a specific version of pytest:
1907 ;; <https://github.com/pallets/click/issues/823>
1910 (modify-phases %standard-phases
1911 (add-after 'unpack 'fix-paths
1912 (lambda* (#:key inputs #:allow-other-keys)
1913 (let ((glibc (assoc-ref inputs ,(if (%current-target-system)
1914 "cross-libc" "libc"))))
1915 (substitute* "click/_unicodefun.py"
1917 (string-append "'" glibc "/bin/locale'"))))
1920 `(("python-pytest" ,python-pytest)))
1921 (home-page "http://click.pocoo.org")
1922 (synopsis "Command line library for Python")
1924 "Click is a Python package for creating command line interfaces in a
1925 composable way with as little code as necessary. Its name stands for
1926 \"Command Line Interface Creation Kit\". It's highly configurable but comes
1927 with sensible defaults out of the box.")
1928 (license license:bsd-3)))
1930 (define-public python2-click
1931 (package-with-python2 python-click))
1933 (define-public python-wheel
1935 (name "python-wheel")
1936 (version "0.30.0a0")
1940 (uri (pypi-uri "wheel" version))
1943 "1nm6mn8isny0hr86rhbfrpfj867c0phf001xgsd69xfp9ady1wwq"))))
1944 (build-system python-build-system)
1946 `(("python-jsonschema" ,python-jsonschema)
1947 ("python-pytest-cov" ,python-pytest-cov)))
1948 (home-page "https://bitbucket.org/pypa/wheel/")
1949 (synopsis "Format for built Python packages")
1951 "A wheel is a ZIP-format archive with a specially formatted filename and
1952 the @code{.whl} extension. It is designed to contain all the files for a PEP
1953 376 compatible install in a way that is very close to the on-disk format. Many
1954 packages will be properly installed with only the @code{Unpack} step and the
1955 unpacked archive preserves enough information to @code{Spread} (copy data and
1956 scripts to their final locations) at any later time. Wheel files can be
1957 installed with a newer @code{pip} or with wheel's own command line utility.")
1958 (license license:expat)
1959 (properties `((python2-variant . ,(delay python2-wheel))))))
1961 (define-public python2-wheel
1962 (let ((wheel (package-with-python2
1963 (strip-python2-variant python-wheel))))
1964 (package (inherit wheel)
1965 (native-inputs `(("python2-functools32" ,python2-functools32)
1966 ,@(package-native-inputs wheel))))))
1968 (define-public python-vcversioner
1970 (name "python-vcversioner")
1971 (version "2.16.0.0")
1975 (uri (pypi-uri "vcversioner" version))
1978 "16z10sm78jd7ca3jbkgc3q5i8a8q7y1h21q1li21yy3rlhbhrrns"))))
1979 (build-system python-build-system)
1980 (synopsis "Python library for version number discovery")
1981 (description "Vcversioner is a Python library that inspects tagging
1982 information in a variety of version control systems in order to discover
1984 (home-page "https://github.com/habnabit/vcversioner")
1985 (license license:isc)))
1987 (define-public python2-vcversioner
1988 (package-with-python2 python-vcversioner))
1990 (define-public python-jsonschema
1992 (name "python-jsonschema")
1998 "https://pypi.python.org/packages/source/j/jsonschema/jsonschema-"
2002 "00kf3zmpp9ya4sydffpifn0j0mzm342a2vzh82p6r0vh10cg7xbg"))))
2003 (build-system python-build-system)
2006 (modify-phases %standard-phases
2007 (replace 'check (lambda _ (zero? (system* "nosetests")))))))
2009 `(("python-nose" ,python-nose)
2010 ("python-vcversioner" ,python-vcversioner)))
2011 (home-page "https://github.com/Julian/jsonschema")
2012 (synopsis "Implementation of JSON Schema for Python")
2014 "Jsonschema is an implementation of JSON Schema for Python.")
2015 (license license:expat)
2016 (properties `((python2-variant . ,(delay python2-jsonschema))))))
2018 (define-public python2-jsonschema
2019 (let ((jsonschema (package-with-python2
2020 (strip-python2-variant python-jsonschema))))
2021 (package (inherit jsonschema)
2023 `(("python2-mock" ,python2-mock)
2024 ,@(package-native-inputs jsonschema)))
2026 `(("python2-functools32" ,python2-functools32))))))
2028 (define-public python-schema
2030 (name "python-schema")
2035 (uri (pypi-uri "schema" version))
2038 "1lw28j9w9vxyigg7vkfkvi6ic9lgjkdnfvnxdr7pklslqvzmk2vm"))))
2039 (build-system python-build-system)
2041 `(("python-pytest" ,python-pytest)))
2042 (home-page "https://github.com/keleshev/schema")
2043 (synopsis "Simple data validation library")
2045 "@code{python-schema} is a library for validating Python data
2046 structures, such as those obtained from config-files, forms, external
2047 services or command-line parsing, converted from JSON/YAML (or
2048 something else) to Python data-types.")
2049 (license license:psfl)))
2051 (define-public python2-schema
2052 (package-with-python2 python-schema))
2054 (define-public python-schema-0.5
2055 (package (inherit python-schema)
2060 (uri (pypi-uri "schema" version))
2063 "10zqvpaky51kgb8nd42bk7jwl8cn2zvayxjpdc1wwmpybj92x67s"))))))
2065 (define-public python2-schema-0.5
2066 (package-with-python2 python-schema-0.5))
2068 (define-public python-kitchen
2070 (name "python-kitchen")
2075 (uri (pypi-uri "kitchen" version))
2078 "1zakh6l0yjvwic9p0nkvmbidpnkygkxbigh2skmb5gccyrhbp7xg"))))
2079 (build-system python-build-system)
2081 `(("python-chardet" ,python-chardet)))
2082 (home-page "https://github.com/fedora-infra/kitchen")
2083 (synopsis "Python API for snippets")
2084 (description "@code{kitchen} module provides a python API for all sorts of
2085 little useful snippets of code that everybody ends up writing for their projects
2086 but never seem big enough to build an independent release. Use kitchen and stop
2087 cutting and pasting that code over and over.")
2088 (license (list license:lgpl2.1+
2089 ;; subprocess.py, test_subprocess.py,
2090 ;; kitchen/pycompat25/defaultdict.py:
2093 (define-public python2-kitchen
2094 (package-with-python2 python-kitchen))
2096 (define-public python-unidecode
2098 (name "python-unidecode")
2102 (uri (pypi-uri "Unidecode" version))
2105 "0lfhp9c5xrbpjvbpr12ji52g1lx04404bzzdg6pvabhzisw6l2i8"))))
2106 (build-system python-build-system)
2107 (home-page "https://pypi.python.org/pypi/Unidecode")
2108 (synopsis "ASCII transliterations of Unicode text")
2110 "Unidecode provides ASCII transliterations of Unicode text. Unidecode is
2111 useful when integrating with legacy code that doesn't support Unicode, or for
2112 ease of entry of non-Roman names on a US keyboard, or when constructing ASCII
2113 machine identifiers from human-readable Unicode strings that should still be
2114 somewhat intelligible.")
2115 (license license:gpl2+)))
2117 (define-public python2-unidecode
2118 (package-with-python2 python-unidecode))
2120 (define-public python-pyjwt
2122 (name "python-pyjwt")
2127 (uri (pypi-uri "PyJWT" version))
2130 "1rxsg14i33vm2i6lz0my628108c81k43v10n4h3p0gx62xdyf2sh"))
2131 (modules '((guix build utils)))
2134 (for-each delete-file-recursively
2135 (find-files "." "\\.pyc$"))
2137 (build-system python-build-system)
2139 `(("python-pytest" ,python-pytest)
2140 ("python-pytest-cov" ,python-pytest-cov)
2141 ("python-pytest-runner" ,python-pytest-runner)))
2142 (home-page "https://github.com/progrium/pyjwt")
2143 (synopsis "JSON Web Token implementation in Python")
2145 "PyJWT is a JSON Web Token implementation written in Python.")
2146 (license license:expat)))
2148 (define-public python2-pyjwt
2149 (package-with-python2 python-pyjwt))
2151 (define-public python-pykka
2153 (name "python-pykka")
2158 (uri (pypi-uri "Pykka" version))
2161 "049w3r0mdnnw7xv19jiq7rvls9k7xs73x05b4qs5d6z4vvmgyiz8"))))
2162 (build-system python-build-system)
2164 `(("python-mock" ,python-mock)
2165 ("python-nose" ,python-nose)
2166 ("python-gevent" ,python-gevent)
2167 ("python-eventlet" ,python-eventlet)))
2168 (home-page "https://www.pykka.org/")
2169 (synopsis "Pykka is a Python implementation of the actor model")
2171 "Pykka is a Python implementation of the actor model.
2172 The actor model introduces some simple rules to control the sharing
2173 of state and cooperation between execution units, which makes it
2174 easier to build concurrent applications.")
2175 (license license:asl2.0)))
2177 (define-public python2-pykka
2178 (package-with-python2 python-pykka))
2180 (define-public python-itsdangerous
2182 (name "python-itsdangerous")
2188 "https://pypi.python.org/packages/source/i/itsdangerous/itsdangerous-"
2192 "06856q6x675ly542ig0plbqcyab6ksfzijlyf1hzhgg3sgwgrcyb"))))
2193 (build-system python-build-system)
2194 (home-page "https://github.com/mitsuhiko/itsdangerous")
2195 (synopsis "Python library for passing data to/from untrusted environments")
2197 "Itsdangerous provides various helpers to pass trusted data to untrusted
2198 environments and back.")
2199 (license license:bsd-3)))
2201 (define-public python2-itsdangerous
2202 (package-with-python2 python-itsdangerous))
2204 (define-public python-pyyaml
2206 (name "python-pyyaml")
2211 (uri (pypi-uri "PyYAML" version))
2214 "1aqjl8dk9amd4zr99n8v2qxzgmr2hdvqfma4zh7a41rj6336c9sr"))))
2215 (build-system python-build-system)
2217 `(("libyaml" ,libyaml)))
2218 (home-page "http://pyyaml.org/wiki/PyYAML")
2219 (synopsis "YAML parser and emitter for Python")
2221 "PyYAML is a YAML parser and emitter for Python. PyYAML features a
2222 complete YAML 1.1 parser, Unicode support, pickle support, capable extension
2223 API, and sensible error messages. PyYAML supports standard YAML tags and
2224 provides Python-specific tags that allow to represent an arbitrary Python
2226 (license license:expat)))
2228 (define-public python2-pyyaml
2229 (package-with-python2 python-pyyaml))
2231 (define-public python-virtualenv
2233 (name "python-virtualenv")
2238 (uri (pypi-uri "virtualenv" version))
2241 "07cbajzk8l05k5zhlw0b9wbf2is65bl9v6zrn2a0iyn57w6pd73d"))))
2242 (build-system python-build-system)
2245 (modify-phases %standard-phases
2248 ;; Disable failing test. See upstream bug report
2249 ;; https://github.com/pypa/virtualenv/issues/957
2250 (substitute* "tests/test_virtualenv.py"
2251 (("skipif.*") "skipif(True, reason=\"Guix\")\n"))
2252 (zero? (system* "py.test")))))))
2254 `(("python-mock" ,python-mock)
2255 ("python-pytest" ,python-pytest)))
2256 (home-page "https://virtualenv.pypa.io/")
2257 (synopsis "Virtual Python environment builder")
2259 "Virtualenv is a tool to create isolated Python environments.")
2260 (license license:expat)))
2262 (define-public python2-virtualenv
2263 (package-with-python2 python-virtualenv))
2265 (define-public python-markupsafe
2267 (name "python-markupsafe")
2273 "https://pypi.python.org/packages/source/M/MarkupSafe/MarkupSafe-"
2277 "1hvip33wva3fnmvfp9x5klqri7hpl1hkgqmjbss18nmrb7zimv54"))))
2278 (build-system python-build-system)
2279 (home-page "https://github.com/mitsuhiko/markupsafe")
2280 (synopsis "XML/HTML/XHTML markup safe string implementation for Python")
2282 "Markupsafe provides an XML/HTML/XHTML markup safe string implementation
2284 (license license:bsd-3)))
2286 (define-public python2-markupsafe
2287 (package-with-python2 python-markupsafe))
2289 (define-public python-jinja2
2291 (name "python-jinja2")
2296 (uri (pypi-uri "Jinja2" version))
2299 "1zzrkywhziqffrzks14kzixz7nd4yh2vc0fb04a68vfd2ai03anx"))))
2300 (build-system python-build-system)
2302 `(("python-markupsafe" ,python-markupsafe)))
2303 (home-page "http://jinja.pocoo.org/")
2304 (synopsis "Python template engine")
2306 "Jinja2 is a small but fast and easy to use stand-alone template engine
2307 written in pure Python.")
2308 (license license:bsd-3)))
2310 (define-public python2-jinja2
2311 (package-with-python2 python-jinja2))
2313 (define-public python-pystache
2315 (name "python-pystache")
2319 (uri (pypi-uri "pystache" version))
2322 "0nmqsfmiw4arjxqkmf9z66ml950pcdjk6aq4gin4sywmzdjw5fzp"))))
2323 (build-system python-build-system)
2325 '(#:tests? #f)) ; FIXME: Python 3 tests are failing.
2326 (home-page "http://defunkt.io/pystache/")
2327 (synopsis "Python logic-less template engine")
2329 "Pystache is a Python implementation of the framework agnostic,
2330 logic-free templating system Mustache.")
2331 (license license:expat)
2332 (properties `((python2-variant . ,(delay python2-pystache))))))
2334 (define-public python2-pystache
2335 (package (inherit (package-with-python2
2336 (strip-python2-variant python-pystache)))
2338 `(#:python ,python-2
2340 (modify-phases %standard-phases
2343 (zero? (system* "python" "test_pystache.py")))))))))
2345 (define-public python-joblib
2347 (name "python-joblib")
2351 (uri (pypi-uri "joblib" version))
2354 "0787k919zlfmgymprz5bzv0v1df5bbirlf3awrghmjgvkrd9dci9"))
2355 (modules '((guix build utils)))
2358 ;; Remove pre-compiled .pyc files from source.
2359 (for-each delete-file-recursively
2360 (find-files "." "__pycache__" #:directories? #t))
2361 (for-each delete-file (find-files "." "\\.pyc$"))
2363 (build-system python-build-system)
2366 (modify-phases %standard-phases
2367 (add-before 'check 'disable-failing-tests
2369 ;; This numpydoc tests fails for unknown reasons
2370 (delete-file "doc/sphinxext/numpydoc/tests/test_docscrape.py")
2371 ;; This numpydoc test depends on matplotlib, which is not a
2373 (delete-file "doc/sphinxext/numpydoc/tests/test_plot_directive.py")
2374 ;; These tests fail to execute sys.executable
2375 (substitute* "joblib/test/test_parallel.py"
2376 (("import nose" line)
2377 (string-append "from nose.plugins.skip import SkipTest\n" line))
2378 (("def test_nested_parallel_warnings" line)
2379 (string-append "@SkipTest\n" line))
2380 (("def test_parallel_with_interactively_defined_functions" line)
2381 (string-append "@SkipTest\n" line)))
2383 ;; Provide nose to enable tests command
2385 `(("python-nose" ,python-nose)
2386 ("python-sphinx" ,python-sphinx)
2387 ("python-docutils" ,python-docutils)
2388 ("python-numpydoc" ,python-numpydoc)))
2389 (home-page "http://pythonhosted.org/joblib/")
2390 (synopsis "Using Python functions as pipeline jobs")
2392 "Joblib is a set of tools to provide lightweight pipelining in Python.
2393 In particular, joblib offers: transparent disk-caching of the output values
2394 and lazy re-evaluation (memoize pattern), easy simple parallel computing
2395 logging and tracing of the execution.")
2396 (license license:bsd-3)))
2398 (define-public python2-joblib
2399 (package-with-python2 python-joblib))
2401 (define-public python-docutils
2403 (name "python-docutils")
2408 (uri (pypi-uri "docutils" version))
2411 "0x22fs3pdmr42kvz6c654756wja305qv6cx1zbhwlagvxgr4xrji"))))
2412 (build-system python-build-system)
2414 '(#:tests? #f)) ; no setup.py test command
2415 (home-page "http://docutils.sourceforge.net/")
2416 (synopsis "Python Documentation Utilities")
2418 "Docutils is a modular system for processing documentation into useful
2419 formats, such as HTML, XML, and LaTeX. For input Docutils supports
2421 ;; Most of the source code is public domain, but some source files are
2422 ;; licensed under the PFSL, BSD 2-clause, and GPLv3+ licenses.
2423 (license (list license:public-domain license:psfl license:bsd-2 license:gpl3+))))
2425 (define-public python2-docutils
2426 (package-with-python2 python-docutils))
2428 (define-public python-pygments
2430 (name "python-pygments")
2435 (uri (pypi-uri "Pygments" version))
2438 "1k78qdvir1yb1c634nkv6rbga8wv4289xarghmsbbvzhvr311bnv"))))
2439 (build-system python-build-system)
2441 ;; FIXME: Tests require sphinx, which depends on this.
2443 (home-page "http://pygments.org/")
2444 (synopsis "Syntax highlighting")
2446 "Pygments is a syntax highlighting package written in Python.")
2447 (license license:bsd-2)))
2449 (define-public python2-pygments
2450 (package-with-python2 python-pygments))
2452 (define-public python-sphinxcontrib-websupport
2454 (name "python-sphinxcontrib-websupport")
2458 (uri (pypi-uri "sphinxcontrib-websupport" version))
2461 "1f9f0wjpi9nhikbyaz6d19s7qvzdf1nq2g5dsh640fma4q9rd1bs"))))
2462 (build-system python-build-system)
2464 `(("python-mock" ,python-mock)
2465 ("python-pytest" ,python-pytest)
2466 ("python-xapian-bindings" ,python-xapian-bindings)))
2467 ;; Needed for running the test suite
2469 `(("python-six" ,python-six)
2470 ("python-jinja2" ,python-jinja2)
2471 ("python-docutils" ,python-docutils)
2472 ("python-sphinx" ,python-sphinx)
2473 ("python-sqlalchemy" ,python-sqlalchemy)
2474 ("python-whoosh" ,python-whoosh)))
2475 (home-page "http://sphinx-doc.org/")
2476 (synopsis "Sphinx API for web applications")
2477 (description "This package provides a Python API to easily integrate
2478 Sphinx documentation into your web application. It provides tools to
2479 integrate Sphinx documents in web templates and to handle searches.")
2480 (license license:bsd-3)))
2482 (define-public python-sphinx
2484 (name "python-sphinx")
2489 (uri (pypi-uri "Sphinx" version))
2492 "1i8p9idnli4gr0y4x67yakbdk5w6a0xjzhrg6bg51y9d1fi7fslf"))))
2493 (build-system python-build-system)
2496 (modify-phases %standard-phases
2499 ;; Requires Internet access.
2500 (delete-file "tests/test_build_linkcheck.py")
2501 (zero? (system* "make" "test")))))))
2503 `(("python-imagesize" ,python-imagesize)
2504 ("python-sphinx-alabaster-theme"
2505 ,python-sphinx-alabaster-theme)
2506 ("python-babel" ,python-babel)
2507 ("python-snowballstemmer" ,python-snowballstemmer)
2508 ("python-docutils" ,python-docutils)
2509 ("python-jinja2" ,python-jinja2)
2510 ("python-pygments" ,python-pygments)
2511 ("python-requests" ,python-requests)
2512 ("python-six" ,python-six)))
2514 `(("graphviz" ,graphviz)
2515 ("python-html5lib" ,python-html5lib)
2516 ("python-mock" ,python-mock)
2517 ("python-nose" ,python-nose)))
2518 (home-page "http://sphinx-doc.org/")
2519 (synopsis "Python documentation generator")
2520 (description "Sphinx is a tool that makes it easy to create documentation
2521 for Python projects or other documents consisting of multiple reStructuredText
2523 (license license:bsd-3)
2524 (properties `((python2-variant . ,(delay python2-sphinx))))))
2526 (define-public python-sphinx-1.6
2527 (package (inherit python-sphinx)
2528 (name "python-sphinx")
2532 (uri (pypi-uri "Sphinx" version))
2535 "0gjakw9fv5pwqb5yyclxycs36sapxizk1vx6mkcdizmzgzcfy0gi"))))
2538 (modify-phases %standard-phases
2541 ;; Requires Internet access.
2542 (delete-file "tests/test_build_linkcheck.py")
2543 (substitute* "tests/test_build_latex.py"
2544 (("@pytest.mark.sphinx\\('latex', testroot='images'\\)")
2545 "@pytest.mark.skip()"))
2546 (zero? (system* "make" "test")))))))
2548 `(("python-sphinxcontrib-websupport" ,python-sphinxcontrib-websupport)
2549 ,@(package-propagated-inputs python-sphinx)))
2551 `(("python-pytest" ,python-pytest)
2552 ("imagemagick" ,imagemagick) ; for "convert"
2553 ,@(package-native-inputs python-sphinx)))
2554 (properties `((python2-variant . ,(delay python2-sphinx-1.6))))))
2556 (define-public python2-sphinx-1.6
2557 (let ((base (package-with-python2 (strip-python2-variant python-sphinx-1.6))))
2561 `(("python2-typing" ,python2-typing)
2562 ,@(package-propagated-inputs base)))
2563 (native-inputs `(("python2-enum34" ,python2-enum34)
2564 ,@(package-native-inputs base))))))
2566 (define-public python-sphinx-1.5.3
2568 (inherit python-sphinx)
2569 (name "python-sphinx")
2574 (uri (pypi-uri "Sphinx" version))
2577 "0kw1axswbvaavr8ggyf4qr6hnisnrzlbkkcdada69vk1x9xjassg"))))
2579 `(("python-pytest" ,python-pytest)
2580 ,@(package-native-inputs python-sphinx)))))
2582 (define-public python2-sphinx
2583 (let ((base (package-with-python2 (strip-python2-variant python-sphinx))))
2586 (native-inputs `(("python2-mock" ,python2-mock)
2587 ("python2-enum34" ,python2-enum34)
2588 ,@(package-native-inputs base)))
2589 (propagated-inputs `(("python2-pytz" ,python2-pytz)
2590 ,@(package-propagated-inputs base))))))
2592 (define-public python-sphinx-gallery
2594 (name "python-sphinx-gallery")
2598 (uri (string-append "https://github.com/sphinx-gallery/sphinx-gallery"
2599 "/archive/v" version ".tar.gz"))
2600 (file-name (string-append name "-" version ".tar.gz"))
2603 "03fs99mcb1r7qp0xixqv07vcz98sk21yq19ffdysi0infdcpzfkd"))))
2604 (build-system python-build-system)
2606 ;; FIXME: Tests attempt to download <https://docs.python.org/3/objects.inv>,
2607 ;; <https://docs.scipy.org/doc/numpy/objects.inv>, and
2608 ;; <https://matplotlib.org/objects.inv>.
2611 `(("python-pytest-runner" ,python-pytest-runner)))
2612 (home-page "https://sphinx-gallery.github.io/")
2613 (synopsis "Generate an examples gallery automatically")
2615 "@code{sphinx_gallery} is a Sphinx extension that builds an HTML version
2616 from any set of Python scripts and puts it into an examples gallery.")
2617 (license license:bsd-3)))
2619 (define-public python2-sphinx-gallery
2620 (package-with-python2 python-sphinx-gallery))
2622 (define-public python-sphinx-rtd-theme
2624 (name "python-sphinx-rtd-theme")
2629 (uri (pypi-uri "sphinx_rtd_theme" version))
2632 "05rlhjzdyapr2w74jjs7mrm8hi69qskcr5vya9f9drpsys7lpxrd"))))
2633 (build-system python-build-system)
2634 (arguments '(#:tests? #f)) ; No tests.
2636 `(("python-sphinx" ,python-sphinx)))
2637 (home-page "https://github.com/snide/sphinx_rtd_theme/")
2638 (synopsis "ReadTheDocs.org theme for Sphinx")
2639 (description "A theme for Sphinx used by ReadTheDocs.org.")
2640 (license license:expat)))
2642 (define-public python2-sphinx-rtd-theme
2643 (package-with-python2 python-sphinx-rtd-theme))
2645 (define-public python-guzzle-sphinx-theme
2647 (name "python-guzzle-sphinx-theme")
2652 (uri (pypi-uri "guzzle_sphinx_theme" version))
2655 "1rnkzrrsbnifn3vsb4pfaia3nlvgvw6ndpxp7lzjrh23qcwid34v"))))
2656 (build-system python-build-system)
2658 `(("python-sphinx" ,python-sphinx)))
2659 (home-page "https://github.com/guzzle/guzzle_sphinx_theme")
2660 (synopsis "Sphinx theme used by Guzzle")
2661 (description "This package provides guzzle_sphinx_theme, a theme for the
2662 Sphinx documentation system, used by @uref{http://docs.guzzlephp.org, Guzzle}
2663 and several other projects.")
2664 (license license:expat)))
2666 (define-public python2-guzzle-sphinx-theme
2667 (package-with-python2 python-guzzle-sphinx-theme))
2669 (define-public python-rst.linker
2671 (name "python-rst.linker")
2676 (uri (pypi-uri "rst.linker" version))
2679 "16crgnai6020vdmnpwdimw1vm3jb74ysfyb3kmcidb0lgma5xq2d"))))
2680 (build-system python-build-system)
2682 `(("python-dateutil" ,python-dateutil)
2683 ("python-six" ,python-six)))
2685 `(("python-setuptools-scm" ,python-setuptools-scm)))
2686 ;; Test would require path.py, which would introduce a cyclic dependence.
2687 (arguments `(#:tests? #f))
2688 ;; Note: As of version 1.7 the documentation is not worth building.
2689 (home-page "https://github.com/jaraco/rst.linker")
2690 (synopsis "Sphinx plugin to add links and timestamps")
2691 (description "rst.linker allows to automatically replace text by a
2692 reStructuredText external reference or timestamps. It's primary purpose is to
2693 augment the changelog, but it can be used for other documents, too.")
2694 (license license:expat)))
2696 (define-public python2-rst.linker
2697 (package-with-python2 python-rst.linker))
2699 (define-public python-feedgenerator
2701 (name "python-feedgenerator")
2706 (uri (pypi-uri "feedgenerator" version))
2709 "01mirwkm7xfx539hmvj7g9da1j51gw5lsx74dr0glizskjm5vq2s"))
2710 (modules '((guix build utils)))
2713 ;; Remove pre-compiled .pyc files from source.
2714 (for-each delete-file-recursively
2715 (find-files "." "__pycache__" #:directories? #t))
2716 (for-each delete-file (find-files "." "\\.pyc$"))
2718 (build-system python-build-system)
2720 `(("python-pytz" ,python-pytz)
2721 ("python-six" ,python-six)))
2722 (home-page "https://github.com/getpelican/feedgenerator")
2724 "Standalone version of Django's Atom/RSS feed generator")
2726 "Feedgenerator-py3k is a standalone version of Django's feedgenerator,
2727 which can produce feeds in RSS 2.0, RSS 0.91, and Atom formats.")
2728 (license license:bsd-3)))
2730 (define-public python2-feedgenerator
2731 (package-with-python2 python-feedgenerator))
2733 (define-public python-blinker
2735 (name "python-blinker")
2740 (uri (pypi-uri "blinker" version))
2743 "1dpq0vb01p36jjwbhhd08ylvrnyvcc82yxx3mwjx6awrycjyw6j7"))))
2744 (build-system python-build-system)
2745 (home-page "http://pythonhosted.org/blinker/")
2746 (synopsis "Fast, simple object-to-object and broadcast signaling")
2748 "Blinker provides a fast dispatching system that allows any number of
2749 interested parties to subscribe to events, or \"signals\".")
2750 (license license:expat)))
2752 (define-public python2-blinker
2753 (package-with-python2 python-blinker))
2755 (define-public pelican
2762 (uri (pypi-uri "pelican" version))
2765 "1hn94rb4q3zmcq16in055xikal4dba5hfx3zznq7warllcgc9f8k"))))
2766 (build-system python-build-system)
2768 `(("python-feedgenerator" ,python-feedgenerator)
2769 ("python-jinja2" ,python-jinja2)
2770 ("python-pygments" ,python-pygments)
2771 ("python-docutils" ,python-docutils)
2772 ("python-pytz" ,python-pytz)
2773 ("python-blinker" ,python-blinker)
2774 ("python-unidecode" ,python-unidecode)
2775 ("python-six" ,python-six)
2776 ("python-dateutil" ,python-dateutil)
2777 ("python-markdown" ,python-markdown)))
2778 (home-page "http://getpelican.com/")
2780 `(;; XXX Requires a lot more packages to do unit tests :P
2782 #:phases (modify-phases %standard-phases
2784 'install 'adjust-requires
2785 ;; Since feedgenerator is installed from git, it doesn't
2786 ;; conform to the version requirements.
2788 ;; We *do have* "feedgenerator >= 1.6", but strip off the
2789 ;; version requirement so setuptools doesn't get confused.
2791 (substitute* "setup.py"
2792 (("['\"]feedgenerator.*?['\"]")
2793 "'feedgenerator'")))))))
2794 (synopsis "Python-based static site publishing system")
2796 "Pelican is a tool to generate a static blog from reStructuredText,
2797 Markdown input files, and more. Pelican uses Jinja2 for templating
2798 and is very extensible.")
2799 (license license:agpl3+)))
2801 (define-public python-scikit-image
2803 (name "python-scikit-image")
2809 "https://pypi.python.org/packages/source/s/scikit-image/scikit-image-"
2812 (base32 "0jz416fqvpahqyffw8plmszzfj669w8wvf3y9clnr5lr6a7md3kn"))))
2813 (build-system python-build-system)
2815 ;; TODO: Some tests require running X11 server. Disable them?
2817 ;; See DEPENDS.txt for the list of build and run time requiremnts
2819 `(("python-matplotlib" ,python-matplotlib)
2820 ("python-networkx" ,python-networkx)
2821 ("python-scipy" ,python-scipy)
2822 ("python-pillow" ,python-pillow)))
2824 `(("python-numpy" ,python-numpy)
2825 ("python-cython" ,python-cython)
2826 ("python-six" ,python-six)))
2827 (home-page "http://scikit-image.org/")
2828 (synopsis "Image processing in Python")
2830 "Scikit-image is a collection of algorithms for image processing.")
2831 (license license:bsd-3)))
2833 (define-public python2-scikit-image
2834 (package-with-python2 python-scikit-image))
2836 (define-public python-cython
2838 (name "python-cython")
2843 (uri (pypi-uri "Cython" version))
2846 "02y0pp1nx77b8s1mpxc6da2dccl6wd31pp4ksi9via479qcvacmr"))))
2847 (build-system python-build-system)
2848 ;; we need the full python package and not just the python-wrapper
2849 ;; because we need libpython3.3m.so
2851 `(("python" ,python)))
2854 (modify-phases %standard-phases
2855 (add-before 'check 'set-HOME
2856 ;; some tests require access to "$HOME/.cython"
2857 (lambda _ (setenv "HOME" "/tmp") #t))
2859 (lambda _ (zero? (system* "python" "runtests.py" "-vv")))))))
2860 (home-page "http://cython.org/")
2861 (synopsis "C extensions for Python")
2862 (description "Cython is an optimising static compiler for both the Python
2863 programming language and the extended Cython programming language. It makes
2864 writing C extensions for Python as easy as Python itself.")
2865 (license license:asl2.0)
2866 (properties `((python2-variant . ,(delay python2-cython))))))
2868 (define-public python2-cython
2869 (package (inherit (package-with-python2
2870 (strip-python2-variant python-cython)))
2871 (name "python2-cython")
2873 `(("python-2" ,python-2))))) ; this is not automatically changed
2875 ;; The RPython toolchain currently does not support Python 3.
2876 (define-public python2-rpython
2878 (name "python2-rpython")
2883 (uri (pypi-uri "rpython" version))
2886 "02z9cvxf0y41dcvwnvf2zn0albhhw1drvjjbq27m6i1piw1k6fc0"))))
2887 (build-system python-build-system)
2888 (arguments `(#:python ,python-2))
2890 `(("python2-pytest" ,python2-pytest))) ; needed for running tests
2891 (home-page "https://rpython.readthedocs.org")
2892 (synopsis "Framework for implementing interpreters and virtual machines")
2893 (description "RPython is a translation and support framework for
2894 producing implementations of dynamic languages, emphasizing a clean separation
2895 between language specification and implementation aspects.")
2896 (license license:expat)))
2898 ;; NOTE: when upgrading numpy please make sure that python-pandas and
2899 ;; python-scipy still build, as these three packages are often used together.
2900 (define-public python-numpy
2902 (name "python-numpy")
2908 "https://github.com/numpy/numpy/releases/download/v"
2909 version "/numpy-" version ".tar.gz"))
2912 "1yim2bxlycn4dhxmfxid6slplpmcb4ynhp411b37ahmsm2lwgkyg"))))
2913 (build-system python-build-system)
2915 `(("openblas" ,openblas)
2916 ("lapack" ,lapack)))
2918 `(("python-cython" ,python-cython)
2919 ("python-nose" ,python-nose)
2920 ("gfortran" ,gfortran)))
2923 (modify-phases %standard-phases
2924 (add-before 'build 'configure-blas-lapack
2925 (lambda* (#:key inputs #:allow-other-keys)
2926 (call-with-output-file "site.cfg"
2930 libraries = openblas
2931 library_dirs = ~a/lib
2932 include_dirs = ~a/include
2934 # backslash-n to make emacs happy
2936 lapack_libs = lapack
2937 library_dirs = ~a/lib
2938 include_dirs = ~a/include
2940 (assoc-ref inputs "openblas")
2941 (assoc-ref inputs "openblas")
2942 (assoc-ref inputs "lapack")
2943 (assoc-ref inputs "lapack"))))
2945 (add-before 'build 'fix-executable-paths
2946 (lambda* (#:key inputs #:allow-other-keys)
2947 ;; Make /gnu/store/...-bash-.../bin/sh the default shell,
2948 ;; instead of /bin/sh.
2949 (substitute* "numpy/distutils/exec_command.py"
2950 (("(os.environ.get\\('SHELL', ')(/bin/sh'\\))" match match-start match-end)
2951 (string-append match-start (assoc-ref inputs "bash") match-end)))
2952 ;; Use "gcc" executable, not "cc".
2953 (substitute* "numpy/distutils/system_info.py"
2954 (("c = distutils\\.ccompiler\\.new_compiler\\(\\)")
2955 "c = distutils.ccompiler.new_compiler(); c.set_executables(compiler='gcc',compiler_so='gcc',linker_exe='gcc',linker_so='gcc -shared')"))
2957 ;; Tests can only be run after the library has been installed and not
2958 ;; within the source directory.
2960 (add-after 'install 'check
2961 (lambda* (#:key outputs inputs #:allow-other-keys)
2962 ;; Make installed package available for running the tests
2963 (add-installed-pythonpath inputs outputs)
2964 (with-directory-excursion "/tmp"
2965 (zero? (system* "python" "-c"
2966 "import numpy; numpy.test(verbose=2)"))))))))
2967 (home-page "http://www.numpy.org/")
2968 (synopsis "Fundamental package for scientific computing with Python")
2969 (description "NumPy is the fundamental package for scientific computing
2970 with Python. It contains among other things: a powerful N-dimensional array
2971 object, sophisticated (broadcasting) functions, tools for integrating C/C++
2972 and Fortran code, useful linear algebra, Fourier transform, and random number
2974 (license license:bsd-3)))
2976 (define-public python2-numpy
2977 (package-with-python2 python-numpy))
2979 ;; NOTE: NumPy 1.8 is packaged only for Python 2 because it is of
2980 ;; interest only for legacy code going back to NumPy's predecessor
2982 (define-public python2-numpy-1.8
2983 (package (inherit python2-numpy)
2989 "https://github.com/numpy/numpy/archive/v" version ".tar.gz"))
2990 (file-name (string-append "python2-numpy-" version ".tar.gz"))
2993 "0sc20gz1b17xnyrkp5frca3ql5qfalpv916hfg2kqxpwr6jg0f1g"))))
2995 (substitute-keyword-arguments (package-arguments python2-numpy)
2997 `(modify-phases ,phases
2998 (replace 'configure-blas-lapack
2999 (lambda* (#:key inputs #:allow-other-keys)
3000 (call-with-output-file "site.cfg"
3004 libraries = openblas,lapack
3005 library_dirs = ~a/lib:~a/lib
3006 include_dirs = ~a/include:~a/include
3008 (assoc-ref inputs "openblas")
3009 (assoc-ref inputs "lapack")
3010 (assoc-ref inputs "openblas")
3011 (assoc-ref inputs "lapack"))))
3013 (description "NumPy is the fundamental package for scientific computing
3014 with Python. It contains among other things: a powerful N-dimensional array
3015 object, sophisticated (broadcasting) functions, tools for integrating C/C++
3016 and Fortran code, useful linear algebra, Fourier transform, and random number
3017 capabilities. Version 1.8 is the last one to contain the numpy.oldnumeric API
3018 that includes the compatibility layer numpy.oldnumeric with NumPy's predecessor
3020 (license license:bsd-3)))
3022 (define-public python-munch
3024 (name "python-munch")
3029 (uri (pypi-uri "munch" version))
3032 "1cmqg91xnqx8gvnh4pmp0bfl1dfcm65d5p9mg73zz8pkjhx6h80l"))))
3033 (build-system python-build-system)
3034 (home-page "https://github.com/Infinidat/munch")
3035 (synopsis "Dot-accessible dictionary")
3036 (description "Munch is a dot-accessible dictionary similar to JavaScript
3038 (license license:expat)))
3040 (define-public python2-munch
3041 (package-with-python2 python-munch))
3043 (define-public python-colormath
3045 (name "python-colormath")
3050 (uri (pypi-uri "colormath" version))
3053 "05qjycgxp3p2f9n6lmic68sxmsyvgnnlyl4z9w7dl9s56jphaiix"))))
3054 (build-system python-build-system)
3056 `(("python-networkx" ,python-networkx)
3057 ("python-numpy" ,python-numpy)))
3058 (home-page "https://github.com/gtaylor/python-colormath")
3059 (synopsis "Color math and conversion library")
3061 "This is a Python library for color math and conversions.")
3062 (license license:bsd-3)))
3064 (define-public python2-colormath
3065 (package-with-python2 python-colormath))
3067 (define-public python-spectra
3069 (name "python-spectra")
3074 (uri (pypi-uri "spectra" version))
3077 "1f322x914bhkg6r5gv1vmnir3iy0k5kih0fd2gp3rdkw32jn5cwf"))))
3078 (build-system python-build-system)
3081 (modify-phases %standard-phases
3084 (zero? (system* "nosetests" "-v")))))))
3086 `(("python-colormath" ,python-colormath)))
3088 `(("python-nose" ,python-nose)))
3089 (home-page "https://github.com/jsvine/spectra")
3090 (synopsis "Color scales and color conversion")
3092 "This package provides a Python library intended to make color math,
3093 color scales, and color space conversion easy. It has support for:
3098 @item Color blending
3099 @item Brightening/darkening colors
3100 @item Saturating/desaturating colors
3101 @item Conversion to/from multiple color spaces.
3103 (license license:expat)))
3105 (define-public python2-spectra
3106 (package-with-python2 python-spectra))
3108 (define-public python2-fastlmm
3110 (name "python2-fastlmm")
3115 (uri (pypi-uri "fastlmm" version ".zip"))
3118 "1q8c34rpmwkfy3r4d5172pzdkpfryj561897z9r3x22gq7813x1m"))))
3119 (build-system python-build-system)
3121 `(#:python ,python-2)) ; only Python 2.7 is supported
3123 `(("python2-numpy" ,python2-numpy)
3124 ("python2-scipy" ,python2-scipy)
3125 ("python2-matplotlib" ,python2-matplotlib)
3126 ("python2-pandas" ,python2-pandas)
3127 ("python2-scikit-learn" ,python2-scikit-learn)
3128 ("python2-pysnptools" ,python2-pysnptools)))
3131 ("python2-cython" ,python2-cython)
3132 ("python2-mock" ,python2-mock)
3133 ("python2-nose" ,python2-nose)))
3134 (home-page "http://research.microsoft.com/en-us/um/redmond/projects/mscompbio/fastlmm/")
3135 (synopsis "Perform genome-wide association studies on large data sets")
3137 "FaST-LMM, which stands for Factored Spectrally Transformed Linear Mixed
3138 Models, is a program for performing both single-SNP and SNP-set genome-wide
3139 association studies (GWAS) on extremely large data sets.")
3140 (license license:asl2.0)))
3142 (define-public python-numpy-documentation
3144 (name "python-numpy-documentation")
3145 (version (package-version python-numpy))
3146 (source (package-source python-numpy))
3147 (build-system python-build-system)
3149 `(("python-matplotlib" ,python-matplotlib)
3150 ("python-numpy" ,python-numpy)
3151 ("pkg-config" ,pkg-config)
3152 ("python-sphinx" ,python-sphinx)
3153 ("python-numpydoc" ,python-numpydoc)
3154 ("texlive" ,(texlive-union (list texlive-fonts-amsfonts
3156 texlive-generic-ifxetex
3157 texlive-generic-pdftex
3158 texlive-latex-amsfonts
3159 texlive-latex-capt-of
3161 texlive-latex-environ
3162 texlive-latex-eqparbox
3163 texlive-latex-etoolbox
3164 texlive-latex-expdlist
3165 texlive-latex-fancyhdr
3166 texlive-latex-fancyvrb
3167 texlive-latex-fncychap
3169 texlive-latex-framed
3170 texlive-latex-geometry
3171 texlive-latex-graphics
3172 texlive-latex-hyperref
3173 texlive-latex-mdwtools
3174 texlive-latex-multirow
3175 texlive-latex-oberdiek
3176 texlive-latex-parskip
3177 texlive-latex-preview
3178 texlive-latex-tabulary
3179 texlive-latex-threeparttable
3180 texlive-latex-titlesec
3181 texlive-latex-trimspaces
3183 texlive-latex-upquote
3185 texlive-latex-varwidth
3186 texlive-latex-wrapfig)))
3187 ("texinfo" ,texinfo)
3189 ("scipy-sphinx-theme"
3190 ,(origin ; The build script expects scipy-sphinx-theme as a git submodule
3193 (url "https://github.com/scipy/scipy-sphinx-theme.git")
3194 (commit "c466764e2231ba132c09826b5b138fffa1cfcec3")))
3197 "0q2y87clwlsgc7wvlsn9pzyssybcq10plwhq2w1ydykfsyyqbmkl"))))
3198 ,@(package-native-inputs python-numpy)))
3200 `(#:tests? #f ; we're only generating the documentation
3202 (modify-phases %standard-phases
3205 (lambda* (#:key inputs outputs #:allow-other-keys)
3206 (let* ((data (string-append (assoc-ref outputs "out") "/share"))
3208 data "/doc/" ,name "-"
3209 ,(package-version python-numpy)))
3210 (info-reader (string-append data "/info"))
3211 (html (string-append doc "/html"))
3212 (scipy-sphinx-theme "scipy-sphinx-theme")
3213 (sphinx-theme-checkout (assoc-ref inputs scipy-sphinx-theme))
3214 (pyver ,(string-append "PYVER=")))
3216 ;; FIXME: this is needed to for texlive-union to generate
3217 ;; fonts, which are not found.
3218 (setenv "HOME" "/tmp")
3220 (with-directory-excursion "doc"
3221 (copy-recursively sphinx-theme-checkout scipy-sphinx-theme)
3223 (system* "make" "html" pyver)
3224 (system* "make" "latex" "PAPER=a4" pyver)
3225 (system* "make" "-C" "build/latex"
3226 "all-pdf" "PAPER=a4" pyver)
3227 ;; FIXME: Generation of the info file fails.
3228 ;; (system* "make" "info" pyver)
3230 ;; (copy-file "build/texinfo/numpy.info"
3231 ;; (string-append info "/numpy.info"))
3232 (for-each (lambda (file)
3233 (copy-file (string-append "build/latex" file)
3234 (string-append doc file)))
3235 '("/numpy-ref.pdf" "/numpy-user.pdf"))
3236 (with-directory-excursion "build/html"
3237 (for-each (lambda (file)
3238 (let* ((dir (dirname file))
3239 (tgt-dir (string-append html "/" dir)))
3240 (unless (equal? "." dir)
3242 (install-file file html)))
3243 (find-files "." ".*")))))
3245 (home-page (package-home-page python-numpy))
3246 (synopsis "Documentation for the python-numpy package")
3247 (description (package-description python-numpy))
3248 (license (package-license python-numpy))))
3250 (define-public python2-numpy-documentation
3251 (let ((numpy-documentation (package-with-python2 python-numpy-documentation)))
3253 (inherit numpy-documentation)
3254 (native-inputs `(("python2-functools32" ,python2-functools32)
3255 ,@(package-native-inputs numpy-documentation))))))
3257 (define-public python-pygit2
3259 (name "python-pygit2")
3264 (uri (pypi-uri "pygit2" version))
3267 "1cbc488ra3kg7r3qky17ms0szi3cda2d96qfkv1l9djsy9hnvw57"))
3269 (search-patches "python-pygit2-disable-network-tests.patch"))))
3270 (build-system python-build-system)
3272 `(("python-six" ,python-six)
3273 ("python-cffi" ,python-cffi)
3274 ("libgit2" ,libgit2)
3275 ("python-tox" ,python-tox)))
3276 (home-page "https://github.com/libgit2/pygit2")
3277 (synopsis "Python bindings for libgit2")
3278 (description "Pygit2 is a set of Python bindings to the libgit2 shared
3279 library, libgit2 implements Git plumbing.")
3280 ;; GPL2.0 only, with linking exception.
3281 (license license:gpl2)))
3283 (define-public python2-pygit2
3284 (package-with-python2 python-pygit2))
3286 (define-public python-pyparsing
3288 (name "python-pyparsing")
3293 (uri (string-append "mirror://sourceforge/pyparsing/pyparsing"
3294 "/pyparsing-" version
3295 "/pyparsing-" version ".tar.gz"))
3298 "016b9gh606aa44sq92jslm89bg874ia0yyiyb643fa6dgbsbqch8"))))
3299 (build-system python-build-system)
3300 (outputs '("out" "doc"))
3302 `(#:tests? #f ; no test target
3304 (modify-phases %standard-phases
3305 (add-after 'install 'install-doc
3306 (lambda* (#:key outputs #:allow-other-keys)
3307 (let* ((doc (string-append (assoc-ref outputs "doc")
3308 "/share/doc/" ,name "-" ,version))
3309 (html-doc (string-append doc "/html"))
3310 (examples (string-append doc "/examples")))
3316 (install-file file tgt))
3317 (find-files dir ".*")))
3318 (list "docs" "htmldoc" "examples")
3319 (list doc html-doc examples))
3321 (home-page "http://pyparsing.wikispaces.com")
3322 (synopsis "Python parsing class library")
3324 "The pyparsing module is an alternative approach to creating and
3325 executing simple grammars, vs. the traditional lex/yacc approach, or the use
3326 of regular expressions. The pyparsing module provides a library of classes
3327 that client code uses to construct the grammar directly in Python code.")
3328 (license license:expat)))
3330 (define-public python2-pyparsing
3331 (package-with-python2 python-pyparsing))
3333 (define-public python-numpydoc
3335 (name "python-numpydoc")
3341 "https://pypi.python.org/packages/source/n/numpydoc/numpydoc-"
3345 "0d4dnifaxkll50jx6czj05y8cb4ny60njd2wz299sj2jxfy51w4k"))
3346 (modules '((guix build utils)))
3349 ;; Drop a test requiring matplotlib, which we cannot add as an
3350 ;; input since it would create a circular dependency: Extend the
3351 ;; test for Python 3, where it is already dropped, to Python 2.
3352 (substitute* "numpydoc/tests/test_plot_directive.py"
3355 (build-system python-build-system)
3357 `(("python-sphinx" ,python-sphinx)))
3359 `(("python-nose" ,python-nose)))
3360 (home-page "https://pypi.python.org/pypi/numpydoc")
3362 "Numpy's Sphinx extensions")
3364 "Sphinx extension to support docstrings in Numpy format.")
3365 (license license:bsd-2)))
3367 (define-public python2-numpydoc
3368 (package-with-python2 python-numpydoc))
3370 (define-public python-numexpr
3372 (name "python-numexpr")
3377 (uri (pypi-uri "numexpr" version))
3380 "1frnbcwmsi312154x274xl28xazr1k8vjby83fwyla2n10a81bgq"))))
3381 (build-system python-build-system)
3382 (arguments `(#:tests? #f)) ; no tests included
3384 `(("python-numpy" ,python-numpy)))
3385 (home-page "https://github.com/pydata/numexpr")
3386 (synopsis "Fast numerical expression evaluator for NumPy")
3388 "Numexpr is a fast numerical expression evaluator for NumPy. With it,
3389 expressions that operate on arrays are accelerated and use less memory than
3390 doing the same calculation in Python. In addition, its multi-threaded
3391 capabilities can make use of all your cores, which may accelerate
3392 computations, most specially if they are not memory-bounded (e.g. those using
3393 transcendental functions).")
3394 (license license:expat)))
3396 (define-public python2-numexpr
3397 (package-with-python2 python-numexpr))
3399 (define-public python-cycler
3401 (name "python-cycler")
3405 (uri (pypi-uri "cycler" version))
3408 "1n69n23fak1gjxlrbhqisi2b9pv3ckrfj98llx3p53953082syyd"))))
3409 (build-system python-build-system)
3411 ;; XXX: The current version requires 'coveralls' which we don't have.
3412 ;; Enable this for the next release which uses 'python-pytest'.
3415 `(("python-six" ,python-six)))
3416 (home-page "http://matplotlib.org/cycler/")
3417 (synopsis "Composable keyword argument iterator")
3419 "When using @code{matplotlib} and plotting more than one line, it is
3420 common to want to be able to want to be able to cycle over one or more artist
3421 styles; but the plotting logic can quickly become involved.
3422 To address this and enable easy cycling over arbitrary @code{kwargs}, the
3423 @code{Cycler} class was developed.")
3424 (license license:bsd-3)))
3426 (define-public python2-cycler
3427 (package-with-python2 python-cycler))
3429 (define-public python-colorspacious
3431 (name "python-colorspacious")
3436 (uri (string-append "https://github.com/njsmith/colorspacious/archive/v"
3438 (file-name (string-append name "-" version))
3440 (base32 "1vflh5jm32qb0skza2i8pjacv09w6gq84fqpp2nj77s0rbmzgr4k"))))
3441 (build-system python-build-system)
3443 `(("python-numpy" ,python-numpy)))
3445 `(("python-nose" ,python-nose)))
3448 (modify-phases %standard-phases
3451 (zero? (system* "nosetests" "--all-modules" "-v" "colorspacious")))))))
3452 (home-page "https://github.com/njsmith/colorspacious")
3453 (synopsis "Python library for colorspace conversions")
3454 (description "@code{colorspacious} is a Python library that lets you
3455 convert between colorspaces like sRGB, XYZ, CIEL*a*b*, CIECAM02, CAM02-UCS, etc.")
3456 (license license:expat)))
3458 (define-public python2-colorspacious
3459 (package-with-python2 python-colorspacious))
3461 (define-public python-matplotlib
3463 (name "python-matplotlib")
3468 (uri (pypi-uri "matplotlib" version))
3471 "1s6dv225w3k4fv52h8lfjc7qq5y56i9755ayx0mz48ddi99fzisd"))))
3472 (build-system python-build-system)
3473 (propagated-inputs ; the following packages are all needed at run time
3474 `(("python-cycler" ,python-cycler)
3475 ("python-kiwisolver" ,python-kiwisolver)
3476 ("python-pyparsing" ,python-pyparsing)
3477 ("python-pygobject" ,python-pygobject)
3478 ("gobject-introspection" ,gobject-introspection)
3479 ("python-tkinter" ,python "tk")
3480 ("python-dateutil" ,python-dateutil)
3481 ("python-numpy" ,python-numpy)
3482 ("python-pillow" ,python-pillow)
3483 ("python-pytz" ,python-pytz)
3484 ("python-six" ,python-six)
3485 ;; The 'gtk+' package (and 'gdk-pixbuf', 'atk' and 'pango' propagated
3486 ;; from 'gtk+') provides the required 'typelib' files used by
3487 ;; 'gobject-introspection'. The location of these files is set with the
3488 ;; help of the environment variable GI_TYPELIB_PATH. At build time this
3489 ;; is done automatically by a 'native-search-path' procedure. However,
3490 ;; at run-time the user must set this variable as follows:
3492 ;; export GI_TYPELIB_PATH=~/.guix-profile/lib/girepository-1.0
3494 ;; From version 1.4.0 'matplotlib' makes use of 'cairocffi' instead of
3495 ;; 'pycairo'. However, 'pygobject' makes use of a 'pycairo' 'context'
3496 ;; object. For this reason we need to import both libraries.
3497 ;; https://pythonhosted.org/cairocffi/cffi_api.html#converting-pycairo
3498 ("python-pycairo" ,python-pycairo)
3499 ("python-pyqt" ,python-pyqt)
3500 ("python-cairocffi" ,python-cairocffi)))
3502 `(("libpng" ,libpng)
3503 ("imagemagick" ,imagemagick)
3504 ("freetype" ,freetype)
3507 ;; FIXME: Add backends when available.
3508 ;("python-wxpython" ,python-wxpython)
3512 `(("pkg-config" ,pkg-config)
3513 ("python-nose" ,python-nose)
3514 ("python-mock" ,python-mock)))
3517 (modify-phases %standard-phases
3518 (add-before 'build 'configure-environment
3519 (lambda* (#:key outputs inputs #:allow-other-keys)
3520 (let ((cairo (assoc-ref inputs "cairo"))
3521 (gtk+ (assoc-ref inputs "gtk+")))
3522 ;; Setting these directories in the 'basedirlist' of 'setup.cfg'
3524 (setenv "LD_LIBRARY_PATH"
3525 (string-append cairo "/lib:" gtk+ "/lib"))
3526 (setenv "HOME" (getcwd))
3527 (call-with-output-file "setup.cfg"
3529 (format port "[directories]~%
3530 basedirlist = ~a,~a~%
3533 (assoc-ref inputs "tcl")
3534 (assoc-ref inputs "tk")))))
3536 (home-page "http://matplotlib.org")
3537 (synopsis "2D plotting library for Python")
3539 "Matplotlib is a Python 2D plotting library which produces publication
3540 quality figures in a variety of hardcopy formats and interactive environments
3541 across platforms. Matplotlib can be used in Python scripts, the python and
3542 ipython shell, web application servers, and six graphical user interface
3544 (license license:psfl)
3545 (properties `((python2-variant . ,(delay python2-matplotlib))))))
3547 (define-public python2-matplotlib
3548 (let ((matplotlib (package-with-python2
3549 (strip-python2-variant python-matplotlib))))
3550 (package (inherit matplotlib)
3551 ;; Make sure to use special packages for Python 2 instead
3552 ;; of those automatically rewritten by package-with-python2.
3554 `(("python2-pycairo" ,python2-pycairo)
3555 ("python2-backports-functools-lru-cache"
3556 ,python2-backports-functools-lru-cache)
3557 ("python2-functools32" ,python2-functools32)
3558 ("python2-pygobject-2" ,python2-pygobject-2)
3559 ("python2-subprocess32" ,python2-subprocess32)
3560 ("python2-tkinter" ,python-2 "tk")
3561 ,@(fold alist-delete (package-propagated-inputs matplotlib)
3562 '("python-pycairo" "python-pygobject" "python-tkinter")))))))
3564 (define-public python-matplotlib-documentation
3566 (name "python-matplotlib-documentation")
3567 (version (package-version python-matplotlib))
3568 (source (package-source python-matplotlib))
3569 (build-system python-build-system)
3571 `(("python-matplotlib" ,python-matplotlib)
3572 ("python-colorspacious" ,python-colorspacious)
3573 ("python-sphinx" ,python-sphinx-1.6)
3574 ("python-sphinx-gallery" ,python-sphinx-gallery)
3575 ("python-numpydoc" ,python-numpydoc)
3576 ("python-ipython" ,python-ipython)
3577 ("python-mock" ,python-mock)
3578 ("graphviz" ,graphviz)
3579 ("texlive" ,texlive)
3580 ("texinfo" ,texinfo)
3581 ,@(package-native-inputs python-matplotlib)))
3583 `(#:tests? #f ; we're only generating documentation
3585 (modify-phases %standard-phases
3589 ;; Produce pdf in 'A4' format.
3590 (substitute* "conf.py"
3591 (("latex_paper_size = 'letter'") "")
3592 ;; latex_paper_size is deprecated -> set paper size using
3594 (("latex_elements\\['pointsize'\\] = '11pt'" match)
3595 ;; insert at a point where latex_elements{} is defined:
3596 (string-append match "\nlatex_elements['papersize'] = 'a4paper'")))
3597 (invoke "make" "SPHINXBUILD=sphinx-build" "html" "latex" "texinfo")))
3599 (lambda* (#:key inputs outputs #:allow-other-keys)
3600 (let* ((data (string-append (assoc-ref outputs "out") "/share"))
3601 (doc (string-append data "/doc/python-matplotlib-" ,version))
3602 (info (string-append data "/info"))
3603 (html (string-append doc "/html")))
3606 (copy-recursively "build/html" html)
3607 (symlink (string-append html "/_images")
3608 (string-append info "/matplotlib-figures"))
3609 (with-directory-excursion "build/texinfo"
3610 (substitute* "matplotlib.texi"
3611 (("@image\\{([^,]*)" all file)
3612 (string-append "@image{matplotlib-figures/" file)))
3613 (symlink (string-append html "/_images")
3614 "./matplotlib-figures")
3615 (system* "makeinfo" "--no-split"
3616 "-o" "matplotlib.info" "matplotlib.texi"))
3617 (copy-file "build/texinfo/matplotlib.info"
3618 (string-append info "/matplotlib.info"))
3619 (copy-file "build/latex/Matplotlib.pdf"
3620 (string-append doc "/Matplotlib.pdf")))
3622 (home-page (package-home-page python-matplotlib))
3623 (synopsis "Documentation for the python-matplotlib package")
3624 (description (package-description python-matplotlib))
3625 (license (package-license python-matplotlib))))
3627 (define-public python2-matplotlib-documentation
3628 (package-with-python2 python-matplotlib-documentation))
3630 (define-public python2-pysnptools
3632 (name "python2-pysnptools")
3637 (uri (pypi-uri "pysnptools" version ".zip"))
3640 "1wybggjzz8zw7aav4pjsg2h22xp17a1lghrprza1pxwlm7wf96y2"))))
3641 (build-system python-build-system)
3643 `(#:python ,python-2)) ; only Python 2.7 is supported
3645 `(("python2-numpy" ,python2-numpy)
3646 ("python2-scipy" ,python2-scipy)
3647 ("python2-pandas" ,python2-pandas)))
3649 `(("python2-cython" ,python2-cython)))
3651 `(("unzip" ,unzip)))
3652 (home-page "http://research.microsoft.com/en-us/um/redmond/projects/mscompbio/")
3653 (synopsis "Library for reading and manipulating genetic data")
3655 "PySnpTools is a library for reading and manipulating genetic data. It
3656 can, for example, efficiently read whole PLINK *.bed/bim/fam files or parts of
3657 those files. It can also efficiently manipulate ranges of integers using set
3658 operators such as union, intersection, and difference.")
3659 (license license:asl2.0)))
3661 (define-public python-rpy2
3663 (name "python-rpy2")
3668 (uri (pypi-uri "rpy2" version))
3671 "0bqihjrdqwj5r1h86shvfb1p5hfr4a6klv1v54bzfr9r144w3rni"))))
3672 (build-system python-build-system)
3674 '(#:modules ((ice-9 ftw)
3678 (guix build python-build-system))
3680 (modify-phases %standard-phases
3681 ;; Without this phase the test loader cannot find the directories, in
3682 ;; which it is supposed to look for test files.
3683 (add-after 'unpack 'fix-tests
3684 (lambda* (#:key outputs #:allow-other-keys)
3685 (substitute* "rpy/tests.py"
3686 (("loader.discover\\(")
3687 "loader.discover(rpy_root + '/' +"))
3690 (lambda* (#:key outputs inputs #:allow-other-keys)
3691 (let ((cwd (getcwd)))
3692 (setenv "PYTHONPATH"
3693 (string-append cwd "/build/"
3694 (find (cut string-prefix? "lib" <>)
3695 (scandir (string-append cwd "/build")))
3697 (getenv "PYTHONPATH"))))
3698 ;; FIXME: Even when all tests pass, the check phase will fail.
3699 (system* "python" "-m" "rpy2.tests" "-v"))))))
3701 `(("python-six" ,python-six)
3702 ("python-jinja2" ,python-jinja2)
3703 ("python-pytz" ,python-pytz)))
3705 `(("readline" ,readline)
3708 ("r-minimal" ,r-minimal)
3709 ("r-survival" ,r-survival)
3710 ("r-ggplot2" ,r-ggplot2)
3711 ("r-rsqlite" ,r-rsqlite)
3712 ("r-dplyr" ,r-dplyr)
3713 ("r-dbplyr" ,r-dbplyr)
3714 ("python-numpy" ,python-numpy)))
3717 (home-page "http://rpy.sourceforge.net/")
3718 (synopsis "Python interface to the R language")
3719 (description "rpy2 is a redesign and rewrite of rpy. It is providing a
3720 low-level interface to R from Python, a proposed high-level interface,
3721 including wrappers to graphical libraries, as well as R-like structures and
3723 ;; Any of these licenses can be picked for the R interface. The whole
3724 ;; project is released under GPLv2+ according to the license declaration
3726 (license (list license:mpl2.0 license:gpl2+ license:lgpl2.1+))))
3728 (define-public python-scipy
3730 (name "python-scipy")
3735 (uri (pypi-uri "scipy" version))
3738 "1fj0r7bg0cfk5clvl57ga06y9bfh05iwlv1dqqs1r6pd89wccfc7"))))
3739 (build-system python-build-system)
3741 `(("python-numpy" ,python-numpy)
3742 ("python-matplotlib" ,python-matplotlib)
3743 ("python-pyparsing" ,python-pyparsing)))
3745 `(("lapack" ,lapack)
3746 ("openblas" ,openblas)))
3748 `(("python-cython" ,python-cython)
3749 ("python-pytest" ,python-pytest)
3750 ("python-sphinx" ,python-sphinx)
3751 ("python-numpydoc" ,python-numpydoc)
3752 ("gfortran" ,gfortran)
3755 (outputs '("out" "doc"))
3758 (modify-phases %standard-phases
3759 (add-before 'build 'configure-openblas
3760 (lambda* (#:key inputs #:allow-other-keys)
3761 (call-with-output-file "site.cfg"
3765 libraries = openblas
3766 library_dirs = ~a/lib
3767 include_dirs = ~a/include
3769 # backslash-n to make emacs happy
3771 library_dirs = ~a/lib
3772 atlas_libs = openblas
3774 (assoc-ref inputs "openblas")
3775 (assoc-ref inputs "openblas")
3776 (assoc-ref inputs "openblas"))))
3778 (add-after 'install 'install-doc
3779 (lambda* (#:key inputs outputs #:allow-other-keys)
3780 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
3781 (doc (string-append data "/doc/" ,name "-" ,version))
3782 (html (string-append doc "/html"))
3783 (pyver ,(string-append "PYVER=" (version-major+minor
3784 (package-version python))))
3785 ;; By default it tries to run sphinx-build through the Python
3786 ;; interpreter which won't work with our shell wrapper.
3787 (sphinxbuild "SPHINXBUILD=LANG=C sphinx-build"))
3788 ;; Make installed package available for building the
3790 (add-installed-pythonpath inputs outputs)
3791 (with-directory-excursion "doc"
3792 ;; Fix generation of images for mathematical expressions.
3793 (substitute* (find-files "source" "conf\\.py")
3794 (("pngmath_use_preview = True")
3795 "pngmath_use_preview = False"))
3797 (invoke "make" "html" pyver sphinxbuild)
3798 (with-directory-excursion "build/html"
3799 (for-each (lambda (file)
3800 (let* ((dir (dirname file))
3801 (tgt-dir (string-append html "/" dir)))
3802 (install-file file html)))
3803 (find-files "." ".*")))))
3805 ;; Tests can only be run after the library has been installed and not
3806 ;; within the source directory.
3808 (add-after 'install 'check
3809 (lambda* (#:key inputs outputs #:allow-other-keys)
3810 (add-installed-pythonpath inputs outputs)
3811 (with-directory-excursion "/tmp"
3812 (invoke "python" "-c"
3813 "import scipy; scipy.test('full', verbose=2)")))))))
3814 (home-page "https://www.scipy.org/")
3815 (synopsis "The Scipy library provides efficient numerical routines")
3816 (description "The SciPy library is one of the core packages that make up
3817 the SciPy stack. It provides many user-friendly and efficient numerical
3818 routines such as routines for numerical integration and optimization.")
3819 (properties `((python2-variant . ,(delay python2-scipy))))
3820 (license license:bsd-3)))
3822 (define-public python2-scipy
3823 (package-with-python2
3824 (strip-python2-variant python-scipy)))
3826 (define-public python-socksipy-branch
3828 (name "python-socksipy-branch")
3833 (uri (pypi-uri "SocksiPy-branch" version))
3836 "01l41v4g7fy9fzvinmjxy6zcbhgqaif8dhdqm4w90fwcw9h51a8p"))))
3837 (build-system python-build-system)
3839 `(#:tests? #f)) ; There are no tests
3840 (home-page "https://code.google.com/archive/p/socksipy-branch/")
3841 (synopsis "Python SOCKS module")
3843 "SocksiPy - A Python SOCKS client module. It provides a
3844 socket-like interface that supports connections to any TCP
3845 service through the use of a SOCKS4, SOCKS5 or HTTP proxy.
3846 The original version was developed by Dan Haim, this is a
3847 branch created by Mario Vilas to address some open issues,
3848 as the original project seems to have been abandoned circa 2007.")
3849 (license license:bsd-3)))
3851 (define-public python2-socksipy-branch
3852 (package-with-python2 python-socksipy-branch))
3854 (define-public python-pycodestyle
3856 (name "python-pycodestyle")
3861 (uri (pypi-uri "pycodestyle" version))
3864 "0rk78b66p57ala26mdldl9lafr48blv5s659sah9q50qnfjmc8k8"))))
3865 (build-system python-build-system)
3866 (home-page "https://pycodestyle.readthedocs.io/")
3867 (synopsis "Python style guide checker")
3868 (description "@code{pycodestyle} (formerly pep8) is a tool to check
3869 Python code against some of the style conventions in
3870 @url{http://www.python.org/dev/peps/pep-0008/,PEP 8}.")
3871 (license license:expat)))
3873 (define-public python2-pycodestyle
3874 (package-with-python2 python-pycodestyle))
3876 (define-public python-multidict
3878 (name "python-multidict")
3883 (uri (pypi-uri "multidict" version))
3886 "1vf5bq8hn5a9rvhr5v4fwbmarfsp35hhr8gs74kqfijy34j2f194"))))
3887 (build-system python-build-system)
3889 `(("python-pytest" ,python-pytest)
3890 ("python-pytest-runner" ,python-pytest-runner)))
3891 (home-page "https://github.com/aio-libs/multidict/")
3892 (synopsis "Multidict implementation")
3893 (description "Multidict is dict-like collection of key-value pairs
3894 where key might be occurred more than once in the container.")
3895 (license license:asl2.0)))
3897 (define-public python-orderedmultidict
3899 (name "python-orderedmultidict")
3904 (uri (pypi-uri "orderedmultidict" version))
3907 "0dls862ibm7qbq4fnvwx0xn1v9hwyzywbff8xjjdr42dd75208yw"))))
3908 (build-system python-build-system)
3911 (modify-phases %standard-phases
3912 (add-after 'unpack 'fix-tests
3914 ;; The package uses nosetest for running the tests.
3915 ;; Adding this initfile allows to run the test suite
3916 ;; without requiring nosetest.
3917 (zero? (system* "touch" "tests/__init__.py")))))))
3919 `(("python-six" ,python-six)))
3921 `(("python-pycodestyle" ,python-pycodestyle)))
3922 (home-page "https://github.com/gruns/orderedmultidict")
3923 (synopsis "Python Ordered Multivalue Dictionary - omdict")
3924 (description "This package contains a library for ordered multivalue
3925 dictionaries. A multivalue dictionary is a dictionary that can store
3926 multiple values for the same key. An ordered multivalue dictionary is a
3927 multivalue dictionary that retains the order of insertions and deletions.")
3928 (license license:unlicense)))
3930 (define-public python2-orderedmultidict
3931 (package-with-python2 python-orderedmultidict))
3933 (define-public python-autopep8
3935 (name "python-autopep8")
3940 (uri (pypi-uri "autopep8" version))
3943 "192bvhzi4d0claqxgzymvv7k3qnj627742bc8sgxpzjj42pd9112"))))
3944 (build-system python-build-system)
3946 `(("python-pycodestyle" ,python-pycodestyle)))
3947 (home-page "https://github.com/hhatto/autopep8")
3948 (synopsis "Format Python code according to the PEP 8 style guide")
3950 "@code{autopep8} automatically formats Python code to conform to
3951 the PEP 8 style guide. It uses the pycodestyle utility to determine
3952 what parts of the code needs to be formatted. @code{autopep8} is
3953 capable of fixing most of the formatting issues that can be reported
3955 (license (license:non-copyleft
3956 "https://github.com/hhatto/autopep8/blob/master/LICENSE"))))
3958 (define-public python2-autopep8
3959 (package-with-python2 python-autopep8))
3961 (define-public python-distutils-extra
3963 (name "python-distutils-extra")
3968 (uri (string-append "https://launchpad.net/python-distutils-extra/trunk/"
3969 version "/+download/python-distutils-extra-"
3973 "0lx15kcbby9zisx33p2h5hgakgwh2bvh0ibag8z0px4j6ifhs41x"))))
3974 (build-system python-build-system)
3975 (home-page "https://launchpad.net/python-distutils-extra/")
3976 (synopsis "Enhancements to Python's distutils")
3978 "The python-distutils-extra module enables you to easily integrate
3979 gettext support, themed icons, and scrollkeeper-based documentation into
3980 Python's distutils.")
3981 (license license:gpl2)))
3983 (define-public python2-distutils-extra
3984 (package-with-python2 python-distutils-extra))
3986 (define-public python2-elib.intl
3988 (name "python2-elib.intl")
3992 ;; This project doesn't tag releases or publish tarballs, so we take
3993 ;; source from a (semi-arbitrary, i.e. latest as of now) git commit.
3996 (url "https://github.com/dieterv/elib.intl.git")
3997 (commit "d09997cfef")))
3998 (file-name (string-append name "-" version "-checkout"))
4001 "0y7vzff9xgbnaay7m0va1arl6g68ncwrvbgwl7jqlclsahzzb09d"))))
4002 (build-system python-build-system)
4004 ;; incompatible with Python 3 (exception syntax)
4005 `(#:python ,python-2
4007 (home-page "https://github.com/dieterv/elib.intl")
4008 (synopsis "Enhanced internationalization for Python")
4010 "The elib.intl module provides enhanced internationalization (I18N)
4011 services for your Python modules and applications.")
4012 (license license:lgpl3+)))
4014 (define-public python-olefile
4016 (name "python-olefile")
4021 (uri (string-append "https://github.com/decalage2/olefile/archive/v"
4023 (file-name (string-append name "-" version ".tar.gz"))
4026 "1wmxbrhyqjry2000zx0zdhqdqxhgi06nz7sbzjlh222q2zjv1gpj"))))
4027 (build-system python-build-system)
4029 "https://www.decalage.info/python/olefileio")
4030 (synopsis "Read and write Microsoft OLE2 files.")
4032 "@code{olefile} can parse, read and write Microsoft OLE2 files (Structured
4033 Storage or Compound Document, Microsoft Office). It is an improved version of
4034 the OleFileIO module from PIL, the Python Image Library.")
4035 (license license:bsd-3)))
4037 (define-public python2-olefile
4038 (package-with-python2 python-olefile))
4040 (define-public python-pillow
4042 (name "python-pillow")
4047 (uri (pypi-uri "Pillow" version))
4050 "09xmn7rl6840sli2iz1k3fgxfgmri2nqz6vkinmb9mgg8ifp2z59"))
4051 (patch-flags '("-p1" "--binary"))
4052 (patches (search-patches "python-pillow-fix-failing-tests.patch"))))
4053 (build-system python-build-system)
4055 `(("python-nose" ,python-nose)))
4057 `(("freetype" ,freetype)
4060 ("libjpeg" ,libjpeg)
4061 ("openjpeg" ,openjpeg)
4062 ("libtiff" ,libtiff)
4063 ("libwebp" ,libwebp)))
4065 `(("python-olefile" ,python-olefile)))
4067 `(#:phases (modify-phases %standard-phases
4069 'install 'check-installed
4070 (lambda* (#:key outputs inputs #:allow-other-keys)
4072 (setenv "HOME" (getcwd))
4073 ;; Make installed package available for running the
4075 (add-installed-pythonpath inputs outputs)
4076 (and (zero? (system* "python" "selftest.py"
4078 (zero? (system* "python" "test-installed.py"))))))
4080 (home-page "https://pypi.python.org/pypi/Pillow")
4081 (synopsis "Fork of the Python Imaging Library")
4083 "The Python Imaging Library adds image processing capabilities to your
4084 Python interpreter. This library provides extensive file format support, an
4085 efficient internal representation, and fairly powerful image processing
4086 capabilities. The core image library is designed for fast access to data
4087 stored in a few basic pixel formats. It should provide a solid foundation for
4088 a general image processing tool.")
4089 (license (license:x11-style
4090 "http://www.pythonware.com/products/pil/license.htm"
4091 "The PIL Software License"))))
4093 (define-public python2-pillow
4094 (package-with-python2 python-pillow))
4096 (define-public python-pycparser
4098 (name "python-pycparser")
4103 (uri (pypi-uri "pycparser" version))
4106 "1dkkjri0miidqb1zcqhqljfa34fcy9k5akasgwsv6k622zlk3b0a"))))
4107 (outputs '("out" "doc"))
4108 (build-system python-build-system)
4110 `(("pkg-config" ,pkg-config)))
4113 (modify-phases %standard-phases
4116 (with-directory-excursion "tests"
4117 (zero? (system* "python" "all_tests.py")))))
4118 (add-after 'install 'install-doc
4119 (lambda* (#:key outputs #:allow-other-keys)
4120 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4121 (doc (string-append data "/doc/" ,name "-" ,version))
4122 (examples (string-append doc "/examples")))
4124 (for-each (lambda (file)
4125 (copy-file (string-append "." file)
4126 (string-append doc file)))
4127 '("/README.rst" "/CHANGES" "/LICENSE"))
4128 (copy-recursively "examples" examples)))))))
4129 (home-page "https://github.com/eliben/pycparser")
4130 (synopsis "C parser in Python")
4132 "Pycparser is a complete parser of the C language, written in pure Python
4133 using the PLY parsing library. It parses C code into an AST and can serve as
4134 a front-end for C compilers or analysis tools.")
4135 (license license:bsd-3)))
4137 (define-public python2-pycparser
4138 (package-with-python2 python-pycparser))
4140 (define-public python-xcffib
4142 (name "python-xcffib")
4147 (uri (pypi-uri "xcffib" version))
4150 "09gbnmr5vn58mm8xi3fmd7fz6743cks6c46dphnxzwax6zsxmy60"))))
4151 (build-system python-build-system)
4153 `(("libxcb" ,libxcb)))
4155 `(("python-cffi" ,python-cffi) ; used at run time
4156 ("python-six" ,python-six)))
4158 `(;; FIXME: Tests need more work. See ".travis.yml" in the repository.
4161 (modify-phases %standard-phases
4162 (add-after 'unpack 'fix-libxcb-path
4163 (lambda* (#:key inputs #:allow-other-keys)
4164 (let ((libxcb (assoc-ref inputs "libxcb")))
4165 (substitute* '("xcffib/__init__.py")
4166 (("^soname = \"") (string-append "soname = \"" libxcb "/lib/")))
4168 (add-after 'install 'install-doc
4169 (lambda* (#:key outputs #:allow-other-keys)
4170 (let ((doc (string-append (assoc-ref outputs "out") "/share"
4171 "/doc/" ,name "-" ,version)))
4173 (copy-file "README.md"
4174 (string-append doc "/README.md"))
4176 (home-page "https://github.com/tych0/xcffib")
4177 (synopsis "XCB Python bindings")
4179 "Xcffib is a replacement for xpyb, an XCB Python bindings. It adds
4180 support for Python 3 and PyPy. It is based on cffi.")
4181 (license license:expat)))
4183 (define-public python2-xcffib
4184 (package-with-python2 python-xcffib))
4186 (define-public python-cairocffi
4188 (name "python-cairocffi")
4193 ;; The archive on pypi is missing the 'utils' directory!
4194 (uri (string-append "https://github.com/Kozea/cairocffi/archive/v"
4196 (file-name (string-append name "-" version ".tar.gz"))
4199 "1rk2dvy3fxrga6bvvxc2fi5lbaynm5h4a0w0aaxyn3bc77rszjg9"))))
4200 (build-system python-build-system)
4201 (outputs '("out" "doc"))
4203 `(("gdk-pixbuf" ,gdk-pixbuf)
4206 `(("pkg-config" ,pkg-config)
4207 ("python-sphinx" ,python-sphinx)
4208 ("python-docutils" ,python-docutils)))
4210 `(("python-xcffib" ,python-xcffib))) ; used at run time
4212 `(;; FIXME: Tests cannot find 'libcairo.so.2'.
4215 (modify-phases %standard-phases
4216 (add-after 'install 'install-doc
4217 (lambda* (#:key inputs outputs #:allow-other-keys)
4218 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4219 (doc (string-append data "/doc/" ,name "-" ,version))
4220 (html (string-append doc "/html")))
4221 (setenv "LD_LIBRARY_PATH"
4222 (string-append (assoc-ref inputs "cairo") "/lib" ":"
4223 (assoc-ref inputs "gdk-pixbuf") "/lib"))
4224 (setenv "LANG" "en_US.UTF-8")
4226 (for-each (lambda (file)
4227 (copy-file (string-append "." file)
4228 (string-append doc file)))
4229 '("/README.rst" "/CHANGES" "/LICENSE"))
4230 (system* "python" "setup.py" "build_sphinx")
4231 (copy-recursively "docs/_build/html" html)
4233 (home-page "https://github.com/Kozea/cairocffi")
4234 (synopsis "Python bindings and object-oriented API for Cairo")
4236 "Cairocffi is a CFFI-based drop-in replacement for Pycairo, a set of
4237 Python bindings and object-oriented API for cairo. Cairo is a 2D vector
4238 graphics library with support for multiple backends including image buffers,
4239 PNG, PostScript, PDF, and SVG file output.")
4240 (license license:bsd-3)))
4242 (define-public python2-cairocffi
4243 (package-with-python2 python-cairocffi))
4245 (define-public python-decorator
4247 (name "python-decorator")
4252 (uri (pypi-uri "decorator" version))
4254 (base32 "03iaf116rm3w8b4agb8hzf6z9331mrvi4khfxq35zkx17sgxsikx"))))
4255 (build-system python-build-system)
4256 (arguments '(#:tests? #f)) ; no test target
4257 (home-page "https://pypi.python.org/pypi/decorator/")
4258 (synopsis "Python module to simplify usage of decorators")
4260 "The aim of the decorator module is to simplify the usage of decorators
4261 for the average programmer, and to popularize decorators usage giving examples
4262 of useful decorators, such as memoize, tracing, redirecting_stdout, locked,
4263 etc. The core of this module is a decorator factory.")
4264 (license license:expat)))
4266 (define-public python2-decorator
4267 (package-with-python2 python-decorator))
4269 (define-public python-drmaa
4271 (name "python-drmaa")
4276 (uri (pypi-uri "drmaa" version))
4278 (base32 "0xzqriqyvk5b8hszbavsyxd29wm3sxirm8zvvdm73rs2iq7w4hkx"))))
4279 (build-system python-build-system)
4280 ;; The test suite requires libdrmaa which is provided by the cluster
4281 ;; environment. At runtime the environment variable DRMAA_LIBRARY_PATH
4282 ;; should be set to the path of the libdrmaa library.
4283 (arguments '(#:tests? #f))
4285 `(("python-nose" ,python-nose)))
4286 (home-page "https://pypi.python.org/pypi/drmaa")
4287 (synopsis "Python bindings for the DRMAA library")
4289 "A Python package for Distributed Resource Management (DRM) job
4290 submission and control. This package is an implementation of the DRMAA 1.0
4291 Python language binding specification.")
4292 (license license:bsd-3)))
4294 (define-public python2-drmaa
4295 (package-with-python2 python-drmaa))
4297 (define-public python-grako
4299 (name "python-grako")
4305 (pypi-uri "grako" version ".zip"))
4308 "0r63i68wcnv63rfjkasq1ah81frz61a6mzbcnaxhrkdpx84p7hzw"))))
4309 (build-system python-build-system)
4310 (arguments '(#:tests? #f)) ; Test file 'grako.ebnf' is missing from archive.
4313 ("python-pytest" ,python-pytest)
4314 ("python-pytest-runner" ,python-pytest-runner)))
4315 (home-page "https://bitbucket.org/neogeny/grako")
4316 (synopsis "EBNF parser generator")
4318 "Grako takes a grammar in a variation of EBNF as input, and outputs a
4319 memoizing PEG/Packrat parser in Python.")
4320 (license license:bsd-3)))
4322 (define-public python2-grako
4323 (package-with-python2 python-grako))
4325 (define-public python-gridmap
4327 (name "python-gridmap")
4333 "https://github.com/pygridtools/gridmap/archive/v"
4335 (file-name (string-append name "-" version ".tar.gz"))
4337 (base32 "1gzjg2k6f14i1msm2b0ax8d9ds1hvk6qd5nlaivg8m4cxqp4cp1x"))))
4338 (build-system python-build-system)
4340 '(#:tests? #f)) ; FIXME: Requires python-cherrypy.
4342 `(("python-psutil" ,python-psutil)
4343 ("python-drmaa" ,python-drmaa)
4344 ("python-pyzmq" ,python-pyzmq)))
4345 (home-page "https://github.com/pygridtools/gridmap")
4346 (synopsis "Create jobs on a cluster directly from Python")
4348 "Gridmap is a Python package to allow you to easily create jobs on the
4349 cluster directly from Python. You can directly map Python functions onto the
4350 cluster without needing to write any wrapper code yourself.")
4351 (license license:gpl3+)))
4353 (define-public python2-gridmap
4354 (package-with-python2 python-gridmap))
4356 (define-public python-honcho
4358 (name "python-honcho")
4364 "https://github.com/nickstenning/honcho/archive/v"
4366 (file-name (string-append name "-" version ".tar.gz"))
4368 (base32 "0zizn61n5z5hq421hkypk9pw8s6fpxw30f4hsg7k4ivwzy3gjw9j"))))
4369 (build-system python-build-system)
4371 `(("python-pytest" ,python-pytest)
4372 ("python-mock" ,python-mock)
4373 ("python-tox" ,python-tox)
4374 ("which" ,which))) ;for tests
4376 `(("python-jinja2" ,python-jinja2)))
4379 (modify-phases %standard-phases
4381 (add-after 'install 'check
4382 (lambda* (#:key outputs inputs #:allow-other-keys)
4383 ;; fix honcho path in testsuite
4384 (substitute* "tests/conftest.py"
4385 (("'honcho'") (string-append "'" (assoc-ref outputs "out")
4386 "/bin/honcho" "'")))
4387 ;; It's easier to run tests after install.
4388 ;; Make installed package available for running the tests
4389 (add-installed-pythonpath inputs outputs)
4390 (zero? (system* "py.test" "-v")))))))
4391 (home-page "https://github.com/nickstenning/honcho")
4392 (synopsis "Manage Procfile-based applications")
4394 "A Procfile is a file which describes how to run an application
4395 consisting of serveral processes. honcho starts all listed processes.
4396 The output of all running processes is collected by honcho and
4398 (license license:expat)))
4400 (define-public python2-honcho
4401 (package-with-python2 python-honcho))
4403 (define-public python-pexpect
4405 (name "python-pexpect")
4410 (uri (pypi-uri "pexpect" version))
4412 (base32 "14ls7k99pwvl21zqv65kzrhccv50j89m5ij1hf0slmsvlxjj84rx"))))
4413 (build-system python-build-system)
4416 (modify-phases %standard-phases
4417 (add-before 'check 'prepare-tests
4419 (substitute* (find-files "tests")
4420 (("/bin/ls") (which "ls"))
4421 (("/bin/echo") (which "echo"))
4422 (("/bin/which") (which "which"))
4423 ;; Many tests try to use the /bin directory which
4424 ;; is not present in the build environment.
4425 ;; Use one that's non-empty and unlikely to change.
4426 (("/bin'") "/dev'"))
4427 ;; XXX: Socket connection test gets "Connection reset by peer".
4428 ;; Why does it not work? Delete for now.
4429 (delete-file "tests/test_socket.py")
4431 (replace 'check (lambda _ (zero? (system* "nosetests" "-v")))))))
4433 `(("python-nose" ,python-nose)
4434 ("python-pytest" ,python-pytest)
4437 ("bash-full" ,bash))) ;full Bash for 'test_replwrap.py'
4439 `(("python-ptyprocess" ,python-ptyprocess)))
4440 (home-page "http://pexpect.readthedocs.org/")
4441 (synopsis "Controlling interactive console applications")
4443 "Pexpect is a pure Python module for spawning child applications;
4444 controlling them; and responding to expected patterns in their output.
4445 Pexpect works like Don Libes’ Expect. Pexpect allows your script to spawn a
4446 child application and control it as if a human were typing commands.")
4447 (license license:isc)))
4449 (define-public python2-pexpect
4450 (package-with-python2 python-pexpect))
4452 (define-public python-setuptools-scm
4454 (name "python-setuptools-scm")
4458 (uri (pypi-uri "setuptools_scm" version))
4461 "0pzvfmx8s20yrgkgwfbxaspz2x1g38qv61jpm0ns91lrb22ldas9"))))
4462 (build-system python-build-system)
4463 (home-page "https://github.com/pypa/setuptools_scm/")
4464 (synopsis "Manage Python package versions in SCM metadata")
4466 "Setuptools_scm handles managing your Python package versions in
4467 @dfn{software configuration management} (SCM) metadata instead of declaring
4468 them as the version argument or in a SCM managed file.")
4469 (license license:expat)))
4471 (define-public python2-setuptools-scm
4472 (package-with-python2 python-setuptools-scm))
4474 (define-public python-pathpy
4476 (name "python-pathpy")
4481 (uri (pypi-uri "path.py" version))
4483 (base32 "12s84maimiz61980q065rjgi8ang6xw2wwm64m0lmfks51dlw4qn"))))
4484 ;; (outputs '("out" "doc"))
4485 (build-system python-build-system)
4487 `(("python-appdirs" ,python-appdirs)))
4489 `(("python-setuptools-scm" ,python-setuptools-scm)
4490 ("python-sphinx" ,python-sphinx)
4491 ("python-rst.linker" ,python-rst.linker)
4492 ("python-pytest" ,python-pytest)
4493 ("python-pytest-runner" ,python-pytest-runner)))
4495 ;; FIXME: Documentation and tests require "jaraco.packaging".
4498 ;; (modify-phases %standard-phases
4499 ;; (add-after 'build 'build-doc
4501 ;; (setenv "LANG" "en_US.UTF-8")
4502 ;; (zero? (system* "python" "setup.py" "build_sphinx"))))
4503 ;; (add-after 'install 'install-doc
4504 ;; (lambda* (#:key outputs #:allow-other-keys)
4505 ;; (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4506 ;; (doc (string-append data "/doc/" ,name "-" ,version))
4507 ;; (html (string-append doc "/html")))
4509 ;; (for-each (lambda (file)
4510 ;; (copy-file file (string-append doc "/" file)))
4511 ;; '("README.rst" "CHANGES.rst"))
4512 ;; (copy-recursively "build/sphinx/html" html)))))))
4513 (home-page "https://github.com/jaraco/path.py")
4514 (synopsis "Python module wrapper for built-in os.path")
4516 "@code{path.py} implements path objects as first-class entities, allowing
4517 common operations on files to be invoked on those path objects directly.")
4518 (license license:expat)))
4520 (define-public python2-pathpy
4521 (package-with-python2 python-pathpy))
4523 (define-public python-simplegeneric
4525 (name "python-simplegeneric")
4530 (uri (string-append "https://pypi.python.org/packages/source/s/"
4531 "simplegeneric/simplegeneric-" version ".zip"))
4533 (base32 "0wwi1c6md4vkbcsfsf8dklf3vr4mcdj4mpxkanwgb6jb1432x5yw"))))
4534 (build-system python-build-system)
4536 `(("unzip" ,unzip)))
4537 (home-page "http://cheeseshop.python.org/pypi/simplegeneric")
4538 (synopsis "Python module for simple generic functions")
4540 "The simplegeneric module lets you define simple single-dispatch generic
4541 functions, akin to Python’s built-in generic functions like @code{len()},
4542 @code{iter()} and so on. However, instead of using specially-named methods,
4543 these generic functions use simple lookup tables, akin to those used by
4544 e.g. @code{pickle.dump()} and other generic functions found in the Python
4546 (license license:zpl2.1)))
4548 (define-public python2-simplegeneric
4549 (package-with-python2 python-simplegeneric))
4551 (define-public python-ipython-genutils
4552 ;; TODO: This package is retired, check if can be removed, see description.
4554 (name "python-ipython-genutils")
4559 (uri (string-append "https://pypi.python.org/packages/source/i/"
4560 "ipython_genutils/ipython_genutils-"
4563 (base32 "19l2pp1c64ansr89l3cqh19jdi2ixhssdzx0vz4n6r52a6i281is"))))
4564 (build-system python-build-system)
4565 (arguments `(#:tests? #f)) ; no tests
4566 (home-page "https://ipython.org")
4567 (synopsis "Vestigial utilities from IPython")
4569 "This package provides retired utilities from IPython. No packages
4570 outside IPython/Jupyter should depend on it.
4572 This package shouldn't exist. It contains some common utilities shared by
4573 Jupyter and IPython projects during The Big Split. As soon as possible, those
4574 packages will remove their dependency on this, and this package will go
4576 (license license:bsd-3)))
4578 (define-public python2-ipython-genutils
4579 (package-with-python2 python-ipython-genutils))
4581 (define-public python-traitlets
4583 (name "python-traitlets")
4588 (uri (pypi-uri "traitlets" version))
4591 "1afy08sa5n9gnkvh3da49c16zkyv598vchv0p1hp7zzjy8895hz4"))))
4592 (build-system python-build-system)
4595 (modify-phases %standard-phases
4596 (replace 'check (lambda _ (zero? (system* "nosetests")))))))
4598 `(("python-ipython-genutils" ,python-ipython-genutils)
4599 ("python-decorator" ,python-decorator)))
4601 `(("python-mock" ,python-mock)
4602 ("python-nose" ,python-nose)))
4603 (home-page "https://ipython.org")
4604 (synopsis "Configuration system for Python applications")
4606 "Traitlets is a framework that lets Python classes have attributes with
4607 type checking, dynamically calculated default values, and ‘on change’
4608 callbacks. The package also includes a mechanism to use traitlets for
4609 configuration, loading values from files or from command line arguments. This
4610 is a distinct layer on top of traitlets, so you can use traitlets in your code
4611 without using the configuration machinery.")
4612 (license license:bsd-3)))
4614 (define-public python2-traitlets
4615 (package-with-python2 python-traitlets))
4617 (define-public python-jupyter-core
4619 (name "python-jupyter-core")
4624 (uri (string-append (pypi-uri "jupyter_core" version)))
4627 "1dy083rarba8prn9f9srxq3c7n7vyql02ycrqq306c40lr57aw5s"))))
4628 (build-system python-build-system)
4629 ;; FIXME: not sure how to run the tests
4630 (arguments `(#:tests? #f))
4632 `(("python-traitlets" ,python-traitlets)))
4633 (home-page "http://jupyter.org/")
4634 (synopsis "Jupyter base package")
4636 "Jupyter core is the base package on which Jupyter projects rely.")
4637 (license license:bsd-3)))
4639 (define-public python2-jupyter-core
4640 (package-with-python2 python-jupyter-core))
4642 (define-public python-jupyter-client
4644 (name "python-jupyter-client")
4649 (uri (pypi-uri "jupyter_client" version))
4652 "1vjjrpjw7k5sh982pbjnslv7byfbfazjw9g92jvs7dz5qbx556n9"))))
4653 (build-system python-build-system)
4654 ;; Tests fail because of missing native python kernel which I assume is
4655 ;; provided by the ipython package, which we cannot use because it would
4656 ;; cause a dependency cycle.
4657 (arguments `(#:tests? #f))
4659 `(("python-pyzmq" ,python-pyzmq)
4660 ("python-traitlets" ,python-traitlets)
4661 ("python-jupyter-core" ,python-jupyter-core)))
4662 (home-page "http://jupyter.org/")
4663 (synopsis "Jupyter protocol implementation and client libraries")
4665 "The @code{jupyter_client} package contains the reference implementation
4666 of the Jupyter protocol. It also provides client and kernel management APIs
4667 for working with kernels, and the @code{jupyter kernelspec} entrypoint for
4668 installing @code{kernelspec}s for use with Jupyter frontends.")
4669 (license license:bsd-3)))
4671 (define-public python2-jupyter-client
4672 (package-with-python2 python-jupyter-client))
4674 (define-public python-ipykernel
4676 (name "python-ipykernel")
4681 (uri (pypi-uri "ipykernel" version))
4683 (base32 "0qllv0k6zzv1r1cj1x2ygxmlrrqhbslzj8rc6r6fg3kc1rgz4m2s"))))
4684 (build-system python-build-system)
4685 ;; The tests load a submodule of IPython. However, IPython itself depends
4687 (arguments `(#:tests? #f))
4689 ;; imported at runtime during connect
4690 `(("python-jupyter-client" ,python-jupyter-client)))
4691 (home-page "https://ipython.org")
4692 (synopsis "IPython Kernel for Jupyter")
4694 "This package provides the IPython kernel for Jupyter.")
4695 (license license:bsd-3)))
4697 (define-public python2-ipykernel
4698 (package-with-python2 python-ipykernel))
4700 (define-public python-ipython
4702 (name "python-ipython")
4707 (uri (pypi-uri "ipython" version ".tar.gz"))
4709 (base32 "03qmzpfy00if10i9k8fjkam1s4xg22j73f933x5d228z9n4rwik6"))))
4710 (build-system python-build-system)
4711 (outputs '("out" "doc"))
4713 `(("python-pyzmq" ,python-pyzmq)
4714 ("python-prompt-toolkit" ,python-prompt-toolkit)
4715 ("python-terminado" ,python-terminado)
4716 ("python-matplotlib" ,python-matplotlib)
4717 ("python-numpy" ,python-numpy)
4718 ("python-numpydoc" ,python-numpydoc)
4719 ("python-jinja2" ,python-jinja2)
4720 ("python-jupyter-console"
4721 ;; The python-ipython and python-jupyter-console require each
4722 ;; other. To get the functionality in both packages working, strip
4723 ;; down the python-jupyter-console package when using it as an input
4724 ;; to python-ipython.
4725 ,python-jupyter-console-minimal)
4726 ("python-mistune" ,python-mistune)
4727 ("python-pexpect" ,python-pexpect)
4728 ("python-pickleshare" ,python-pickleshare)
4729 ("python-simplegeneric" ,python-simplegeneric)
4730 ("python-jsonschema" ,python-jsonschema)
4731 ("python-traitlets" ,python-traitlets)
4732 ("python-ipykernel" ,python-ipykernel)
4733 ("python-nbformat" ,python-nbformat)
4734 ("python-pygments" ,python-pygments)))
4736 `(("readline" ,readline)
4739 `(("graphviz" ,graphviz)
4740 ("pkg-config" ,pkg-config)
4741 ("python-requests" ,python-requests) ;; for tests
4742 ("python-testpath" ,python-testpath)
4743 ("python-nose" ,python-nose)
4744 ("python-sphinx" ,python-sphinx)
4745 ("python-shpinx-rtd-theme" ,python-sphinx-rtd-theme)
4746 ;; FIXME: It's possible that a smaller union would work just as well.
4747 ("texlive" ,(texlive-union (list texlive-fonts-amsfonts
4749 texlive-generic-ifxetex
4750 texlive-generic-pdftex
4751 texlive-latex-amsfonts
4752 texlive-latex-capt-of
4754 texlive-latex-environ
4755 texlive-latex-eqparbox
4756 texlive-latex-etoolbox
4757 texlive-latex-expdlist
4758 texlive-latex-fancyhdr
4759 texlive-latex-fancyvrb
4760 texlive-latex-fncychap
4762 texlive-latex-framed
4763 texlive-latex-geometry
4764 texlive-latex-graphics
4765 texlive-latex-hyperref
4766 texlive-latex-mdwtools
4767 texlive-latex-multirow
4768 texlive-latex-oberdiek
4769 texlive-latex-parskip
4770 texlive-latex-preview
4771 texlive-latex-tabulary
4772 texlive-latex-threeparttable
4773 texlive-latex-titlesec
4774 texlive-latex-trimspaces
4776 texlive-latex-upquote
4778 texlive-latex-varwidth
4779 texlive-latex-wrapfig)))
4780 ("texinfo" ,texinfo)))
4783 (modify-phases %standard-phases
4785 'install 'install-doc
4786 (lambda* (#:key inputs outputs #:allow-other-keys)
4787 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4788 (doc (string-append data "/doc/" ,name "-" ,version))
4789 (html (string-append doc "/html"))
4790 (man1 (string-append data "/man/man1"))
4791 (info (string-append data "/info"))
4792 (examples (string-append doc "/examples"))
4793 (python-arg (string-append "PYTHON=" (which "python"))))
4794 (setenv "LANG" "en_US.utf8")
4795 ;; Make installed package available for running the tests
4796 (add-installed-pythonpath inputs outputs)
4797 (with-directory-excursion "docs"
4798 ;; FIXME: pdf fails to build
4799 ;;(system* "make" "pdf" "PAPER=a4")
4800 (system* "make" python-arg "html")
4801 (system* "make" python-arg "info"))
4802 (copy-recursively "docs/man" man1)
4803 (copy-recursively "examples" examples)
4804 (copy-recursively "docs/build/html" html)
4805 ;; (copy-file "docs/build/latex/ipython.pdf"
4806 ;; (string-append doc "/ipython.pdf"))
4808 (copy-file "docs/build/texinfo/ipython.info"
4809 (string-append info "/ipython.info"))
4810 (copy-file "COPYING.rst" (string-append doc "/COPYING.rst")))))
4811 ;; Tests can only be run after the library has been installed and not
4812 ;; within the source directory.
4816 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
4818 (with-directory-excursion "/tmp"
4819 ;; Make installed package available for running the tests
4820 (add-installed-pythonpath inputs outputs)
4821 (setenv "HOME" "/tmp/") ;; required by a test
4822 (zero? (system* (string-append (assoc-ref outputs "out")
4827 (lambda* (#:key inputs #:allow-other-keys)
4828 (substitute* "./IPython/utils/_process_posix.py"
4829 (("/usr/bin/env', 'which") (which "which")))
4830 (substitute* "./IPython/core/tests/test_inputtransformer.py"
4831 (("#!/usr/bin/env python")
4832 (string-append "#!" (which "python"))))
4833 ;; Disable 1 failing test
4834 (substitute* "./IPython/core/tests/test_magic.py"
4835 (("def test_dirops\\(\\):" all)
4836 (string-append "@dec.skipif(True)\n" all))))))))
4837 (home-page "https://ipython.org")
4838 (synopsis "IPython is a tool for interactive computing in Python")
4840 "IPython provides a rich architecture for interactive computing with:
4841 Powerful interactive shells, a browser-based notebook, support for interactive
4842 data visualization, embeddable interpreters and tools for parallel
4844 (license license:bsd-3)
4845 (properties `((python2-variant . ,(delay python2-ipython))))))
4847 (define-public python2-ipython
4848 (let ((ipython (package-with-python2 (strip-python2-variant python-ipython))))
4851 ;; FIXME: add pyreadline once available.
4853 `(("python2-backports-shutil-get-terminal-size"
4854 ,python2-backports-shutil-get-terminal-size)
4855 ("python2-pathlib2" ,python2-pathlib2)
4856 ,@(package-propagated-inputs ipython)))
4858 `(("python2-mock" ,python2-mock)
4859 ,@(package-native-inputs ipython))))))
4861 (define-public python-urwid
4863 (name "python-urwid")
4868 (uri (pypi-uri "urwid" version))
4871 "18cnd1wdjcas08x5qwa5ayw6jsfcn33w4d9f7q3s29fy6qzc1kng"))))
4872 (build-system python-build-system)
4875 (modify-phases %standard-phases
4876 ;; Disable failing test. Bug filed upstream:
4877 ;; https://github.com/wardi/urwid/issues/164
4878 ;; TODO: check again for python-urwid > 1.3.1 or python > 3.4.3.
4879 (add-after 'unpack 'disable-failing-test
4881 (substitute* "urwid/tests/test_event_loops.py"
4882 (("test_remove_watch_file")
4883 "disable_remove_watch_file")))))))
4884 (home-page "http://urwid.org")
4885 (synopsis "Console user interface library for Python")
4887 "Urwid is a curses-based UI/widget library for Python. It includes many
4888 features useful for text console applications.")
4889 (license license:lgpl2.1+)))
4891 (define-public python2-urwid
4892 (let ((python2-urwid (package-with-python2 python-urwid)))
4894 (inherit python2-urwid)
4897 `(;; Explicitly using Python 2 is necessary due the argument list being
4898 ;; built from only the 'delete-test_vterm.py' phase and python-urwid's
4899 ;; package arguments, which by default assumes the use of Python 3.
4902 (modify-phases %standard-phases
4903 ;; Disable the vterm tests because of non-deterministic failures
4904 ;; with Python 2. See https://github.com/urwid/urwid/issues/230.
4905 (add-after 'unpack 'delete-test_vterm.py
4906 (delete-file "urwid/tests/test_vterm.py"))))
4907 (package-arguments python-urwid))))))
4909 (define-public python-urwidtrees
4911 (name "python-urwidtrees")
4916 ;; package author intends on distributing via github rather than pypi:
4917 ;; https://github.com/pazz/alot/issues/877#issuecomment-230173331
4918 (uri (string-append "https://github.com/pazz/urwidtrees/archive/"
4920 (file-name (string-append name "-" version ".tar.gz"))
4923 "0d30lyd3s2a97rhqfax5w9ssqds2z6aydqx3c6j2c2lk3cb4ngvh"))))
4924 (build-system python-build-system)
4926 '(#:tests? #f)) ; no tests
4927 (propagated-inputs `(("python-urwid" ,python-urwid)))
4928 (home-page "https://github.com/pazz/urwidtrees")
4929 (synopsis "Tree widgets for urwid")
4930 (description "Urwidtrees is a Widget Container API for the @code{urwid}
4931 toolkit. Use it to build trees of widgets.")
4932 (license license:gpl3+)))
4934 (define-public python2-urwidtrees
4935 (package-with-python2 python-urwidtrees))
4937 (define-public python-dbus
4939 (name "python-dbus")
4945 "https://dbus.freedesktop.org/releases/dbus-python/dbus-python-"
4948 (base32 "1py62qir966lvdkngg0v8k1khsqxwk5m4s8nflpk1agk5f5nqb71"))))
4949 (build-system gnu-build-system)
4952 (modify-phases %standard-phases
4956 ;; XXX: For the missing '/etc/machine-id'.
4957 (substitute* "test/run-test.sh"
4958 (("DBUS_FATAL_WARNINGS=1")
4959 "DBUS_FATAL_WARNINGS=0"))
4962 `(("pkg-config" ,pkg-config)))
4964 `(("python" ,python)
4965 ("dbus-glib" ,dbus-glib)))
4966 (synopsis "Python bindings for D-bus")
4967 (description "python-dbus provides bindings for libdbus, the reference
4968 implementation of D-Bus.")
4969 (home-page "https://www.freedesktop.org/wiki/Software/DBusBindings/")
4970 (license license:expat)))
4972 (define-public python2-dbus
4973 (package (inherit python-dbus)
4974 (name "python2-dbus")
4975 (inputs `(("python" ,python-2)
4976 ,@(alist-delete "python"
4977 (package-inputs python-dbus)
4979 ;; FIXME: on Python 2, the test_utf8 fails with:
4980 ;; "ValueError: unichr() arg not in range(0x10000) (narrow Python build)"
4981 (arguments `(#:tests? #f))))
4983 (define-public python-lxml
4985 (name "python-lxml")
4990 (uri (pypi-uri "lxml" version))
4993 "15nvf6n285n282682qyw3wihsncb0x5amdhyi4b83bfa2nz74vvk"))))
4994 (build-system python-build-system)
4996 `(("libxml2" ,libxml2)
4997 ("libxslt" ,libxslt)))
4998 (home-page "http://lxml.de/")
5000 "Python XML processing library")
5002 "The lxml XML toolkit is a Pythonic binding for the C libraries
5003 libxml2 and libxslt.")
5004 (license license:bsd-3))) ; and a few more, see LICENSES.txt
5006 (define-public python2-lxml
5007 (package-with-python2 python-lxml))
5009 ;; beautifulsoup4 has a totally different namespace than 3.x,
5010 ;; and pypi seems to put it under its own name, so I guess we should too
5011 (define-public python-beautifulsoup4
5013 (name "python-beautifulsoup4")
5018 (uri (pypi-uri "beautifulsoup4" version))
5021 "0glaw1vyxnbp03fni7h5496n6iib0n5iim4gax1n0ngscs9s075j"))))
5022 (build-system python-build-system)
5025 (modify-phases %standard-phases
5026 ;; The Python 2 source is the definitive source of beautifulsoup4. We
5027 ;; must use this conversion script when building with Python 3. The
5028 ;; conversion script also runs the tests.
5029 ;; For more information, see the file 'convert-py3k' in the source
5032 (lambda _ (zero? (system* "./convert-py3k")))))))
5034 "https://www.crummy.com/software/BeautifulSoup/bs4/")
5036 "Python screen-scraping library")
5038 "Beautiful Soup is a Python library designed for rapidly setting up
5039 screen-scraping projects. It offers Pythonic idioms for navigating,
5040 searching, and modifying a parse tree, providing a toolkit for
5041 dissecting a document and extracting what you need. It automatically
5042 converts incoming documents to Unicode and outgoing documents to UTF-8.")
5043 (license license:expat)
5044 (properties `((python2-variant . ,(delay python2-beautifulsoup4))))))
5046 (define-public python2-beautifulsoup4
5048 (inherit (package-with-python2
5049 (strip-python2-variant python-beautifulsoup4)))
5050 (arguments `(#:python ,python-2))))
5052 (define-public python-netifaces
5054 (name "python-netifaces")
5059 (uri (pypi-uri "netifaces" version))
5062 "1gccklrcplbbqh81g1mdgpa5y8na7kkf29cq2ka3f5a2fp5hyndx"))))
5063 (build-system python-build-system)
5064 (home-page "https://github.com/al45tair/netifaces")
5066 "Python module for portable network interface information")
5068 "Netifaces is a Python module providing information on network
5069 interfaces in an easy and portable manner.")
5070 (license license:expat)))
5072 (define-public python2-netifaces
5073 (package-with-python2 python-netifaces))
5075 (define-public python-networkx
5077 (name "python-networkx")
5082 (uri (pypi-uri "networkx" version ".zip"))
5084 (base32 "1ccb8mfz4m821k9y0cigkbq42q2sbb4dj5fbjshp0awp32j2q9v4"))))
5085 (build-system python-build-system)
5086 ;; python-decorator is needed at runtime
5088 `(("python-decorator" ,python-decorator)))
5090 `(("python-nose" ,python-nose)
5092 (home-page "http://networkx.github.io/")
5093 (synopsis "Python module for creating and manipulating graphs and networks")
5095 "NetworkX is a Python package for the creation, manipulation, and study
5096 of the structure, dynamics, and functions of complex networks.")
5097 (license license:bsd-3)))
5099 (define-public python2-networkx
5100 (package-with-python2 python-networkx))
5102 ;; Define new package, because the current version of python-colormath does
5103 ;; not build against 2.0.
5104 (define-public python-networkx2
5105 (package (inherit python-networkx)
5106 (name "python-networkx2")
5111 (uri (pypi-uri "networkx" version ".zip"))
5114 "1ajl2jp8qry9nyjzzkqpy0vmsr14d23z1qk7y0vr5iwjbpvzhpyd"))
5116 (search-patches "python-networkx2-reproducible-build.patch"))))))
5118 (define-public python2-networkx2
5119 (package-with-python2 python-networkx2))
5121 (define-public snakemake
5128 (uri (pypi-uri "snakemake" version))
5130 (base32 "0g0paia4z7w3srnqdmavq3hrb2x7qnpf81jx50njl0p7y4y0j8jv"))))
5131 (build-system python-build-system)
5133 ;; TODO: Package missing test dependencies.
5136 (modify-phases %standard-phases
5137 ;; For cluster execution Snakemake will call Python. Since there is
5138 ;; no suitable PYTHONPATH set, cluster execution will fail. We fix
5139 ;; this by calling the snakemake wrapper instead.
5140 (add-after 'unpack 'call-wrapper-not-wrapped-snakemake
5141 (lambda* (#:key outputs #:allow-other-keys)
5142 (substitute* "snakemake/executors.py"
5143 (("\\{sys.executable\\} -m snakemake")
5144 (string-append (assoc-ref outputs "out")
5148 `(("python-wrapt" ,python-wrapt)
5149 ("python-requests" ,python-requests)
5150 ("python-appdirs" ,python-appdirs)
5151 ("python-configargparse" ,python-configargparse)
5152 ("python-pyyaml" ,python-pyyaml)
5153 ("python-ratelimiter" ,python-ratelimiter)))
5154 (home-page "https://bitbucket.org/snakemake/snakemake/wiki/Home")
5155 (synopsis "Python-based execution environment for make-like workflows")
5157 "Snakemake aims to reduce the complexity of creating workflows by
5158 providing a clean and modern domain specific specification language (DSL) in
5159 Python style, together with a fast and comfortable execution environment.")
5160 (license license:expat)))
5162 (define-public python-pyqrcode
5164 (name "python-pyqrcode")
5169 (uri (pypi-uri "PyQRCode" version))
5172 "1m9ln8k9v7dfbh1i81225hx5mdsh8mpf9g7r4wpbfmiyfcs7dgzx"))))
5173 (build-system python-build-system)
5175 "https://github.com/mnooner256/pyqrcode")
5176 (synopsis "QR code generator")
5178 "Pyqrcode is a QR code generator written purely in Python with
5179 SVG, EPS, PNG and terminal output.")
5180 (license license:bsd-3)))
5182 (define-public python-seaborn
5184 (name "python-seaborn")
5189 (uri (pypi-uri "seaborn" version))
5191 (base32 "0pawrqc3mxpwd5g9pvi9gba02637bh5c8ldpp8izfwpfn52469zs"))))
5192 (build-system python-build-system)
5194 '(#:tests? #f)) ; Tests requires a running X11 server.
5196 `(("python-pandas" ,python-pandas)
5197 ("python-matplotlib" ,python-matplotlib)
5198 ("python-scipy" ,python-scipy)))
5199 (home-page "http://stanford.edu/~mwaskom/software/seaborn/")
5200 (synopsis "Statistical data visualization")
5202 "Seaborn is a library for making attractive and informative statistical
5203 graphics in Python. It is built on top of matplotlib and tightly integrated
5204 with the PyData stack, including support for numpy and pandas data structures
5205 and statistical routines from scipy and statsmodels.")
5206 (license license:bsd-3)
5207 (properties `((python2-variant . ,(delay python2-seaborn))))))
5209 (define-public python2-seaborn
5210 (let ((base (package-with-python2 (strip-python2-variant python-seaborn))))
5213 (propagated-inputs `(("python2-pytz" ,python2-pytz)
5214 ,@(package-propagated-inputs base))))))
5216 (define-public python-mpmath
5218 (name "python-mpmath")
5222 (uri (string-append "http://mpmath.org/files/mpmath-"
5226 "08ijsr4ifrqv3cjc26mkw0dbvyygsa99in376hr4b96ddm1gdpb8"))))
5227 (build-system python-build-system)
5230 (modify-phases %standard-phases
5234 (system* "python" "mpmath/tests/runtests.py" "-local")))))))
5235 (home-page "http://mpmath.org")
5236 (synopsis "Arbitrary-precision floating-point arithmetic in python")
5238 "@code{mpmath} can be used as an arbitrary-precision substitute for
5239 Python's float/complex types and math/cmath modules, but also does much
5240 more advanced mathematics.")
5241 (license license:bsd-3)))
5243 (define-public python2-mpmath
5244 (package-with-python2 python-mpmath))
5246 (define-public python-bigfloat
5248 (name "python-bigfloat")
5253 (uri (pypi-uri "bigfloat" version))
5255 (base32 "0xd7q4l7v0f463diznjv4k9wlaks80pn9drdqmfifi7zx8qvybi6"))))
5256 (build-system python-build-system)
5259 (home-page "https://github.com/mdickinson/bigfloat")
5260 (synopsis "Arbitrary precision floating-point arithmetic for Python")
5262 "This packages provides a Python interface to the MPFR library for
5263 multiprecision arithmetic.")
5264 (license license:lgpl3+)))
5266 (define-public python2-bigfloat
5267 (package-with-python2 python-bigfloat))
5269 (define-public python-sympy
5271 (name "python-sympy")
5277 "https://github.com/sympy/sympy/releases/download/sympy-"
5278 version "/sympy-" version ".tar.gz"))
5280 (base32 "190n29sppw7g8ihilc5451y7jlfcaw56crqiqbf1jff43dlmfnxc"))))
5281 (build-system python-build-system)
5284 (modify-phases %standard-phases
5285 ;; Run the core tests after installation. By default it would run
5286 ;; *all* tests, which take a very long time to complete and are known
5289 (add-after 'install 'check
5290 (lambda* (#:key outputs #:allow-other-keys)
5291 (invoke "python3" "-c" "import sympy; sympy.test(\"/core\")")
5294 `(("python-mpmath" ,python-mpmath)))
5295 (home-page "http://www.sympy.org/")
5296 (synopsis "Python library for symbolic mathematics")
5298 "SymPy is a Python library for symbolic mathematics. It aims to become a
5299 full-featured computer algebra system (CAS) while keeping the code as simple
5300 as possible in order to be comprehensible and easily extensible.")
5301 (license license:bsd-3)))
5303 (define-public python2-sympy
5305 (inherit (package-with-python2 python-sympy))
5308 (modify-phases %standard-phases
5309 ;; Run the core tests after installation. By default it would run
5310 ;; *all* tests, which take a very long time to complete and are known
5313 (add-after 'install 'check
5314 (lambda* (#:key outputs #:allow-other-keys)
5315 (invoke "python" "-c" "import sympy; sympy.test(\"/core\")")
5318 (define-public python-q
5325 (uri (pypi-uri "q" version))
5328 "1mgfazh8fkizh6walra2zv885f3lcgr3nb02v1frfm4p8ddcy3yy"))))
5329 (build-system python-build-system)
5330 (home-page "https://github.com/zestyping/q")
5331 (synopsis "Quick-and-dirty debugging output for tired programmers")
5333 "q is a Python module for \"print\" style of debugging Python code. It
5334 provides convenient short API for print out of values, tracebacks, and
5335 falling into the Python interpreter.")
5336 (license license:asl2.0)))
5338 (define-public python2-q
5339 (package-with-python2 python-q))
5341 (define-public python2-xlib
5343 (name "python2-xlib")
5347 (uri (string-append "mirror://sourceforge/python-xlib/python-xlib"
5349 "python-xlib-" version ".tar.gz"))
5352 "1sv0447j0rx8cgs3jhjl695p5pv13ihglcjlrrz1kq05lsvb0wa7"))))
5353 (build-system python-build-system)
5355 `(#:python ,python-2 ;Python 2 only
5356 #:tests? #f)) ;no tests
5357 (home-page "http://python-xlib.sourceforge.net/")
5358 (synopsis "Python X11 client library")
5360 "The Python X Library is intended to be a fully functional X client
5361 library for Python programs. It is useful to implement low-level X clients.
5362 It is written entirely in Python.")
5363 (license license:gpl2+)))
5365 (define-public python-singledispatch
5367 (name "python-singledispatch")
5372 (uri (pypi-uri "singledispatch" version))
5375 "171b7ip0hsq5qm83np40h3phlr36ym18w0lay0a8v08kvy3sy1jv"))))
5376 (build-system python-build-system)
5378 `(("python-six" ,python-six))) ; required for conversion, not at run-time
5380 "http://docs.python.org/3/library/functools.html#functools.singledispatch")
5381 (synopsis "Backport of singledispatch feature from Python 3.4")
5383 "This library brings functools.singledispatch from Python 3.4 to Python
5385 (license license:expat)))
5387 (define-public python2-singledispatch
5388 (package-with-python2 python-singledispatch))
5390 ;; the python- version can be removed with python-3.5
5391 (define-public python-backports-abc
5393 (name "python-backports-abc")
5398 (uri (pypi-uri "backports_abc" version))
5401 "1pkv8d1zxj5f9i227dxbjczncbv7ks7ywnjwyxfjagm02i2yafq3"))))
5402 (build-system python-build-system)
5403 (home-page "https://github.com/cython/backports_abc")
5404 (synopsis "Backport of additions to the 'collections.abc' module")
5406 "Python-backports-abc provides a backport of additions to the
5407 'collections.abc' module in Python-3.5.")
5408 (license license:psfl)))
5410 (define-public python2-backports-abc
5411 (package-with-python2 python-backports-abc))
5413 (define-public python-backports-csv
5415 (name "python-backports-csv")
5420 (uri (pypi-uri "backports.csv" version))
5423 "1imzbrradkfn8s2m1qcimyn74dn1mz2p3j381jljn166rf2i6hlc"))))
5424 (build-system python-build-system)
5425 (home-page "https://github.com/ryanhiebert/backports.csv")
5426 (synopsis "Backport of Python 3's csv module for Python 2")
5428 "Provides a backport of Python 3's @code{csv} module for parsing
5429 comma separated values. The API of the @code{csv} module in Python 2
5430 is drastically different from the @code{csv} module in Python 3.
5431 This is due, for the most part, to the difference between str in
5432 Python 2 and Python 3.")
5433 (license license:psfl)))
5435 (define-public python2-backports-csv
5436 (package-with-python2 python-backports-csv))
5438 (define-public python2-backports-shutil-get-terminal-size
5440 (name "python2-backports-shutil-get-terminal-size")
5445 (uri (pypi-uri "backports.shutil_get_terminal_size" version))
5448 "107cmn7g3jnbkp826zlj8rrj19fam301qvaqf0f3905f5217lgki"))))
5449 (build-system python-build-system)
5451 `(#:python ,python-2
5453 (modify-phases %standard-phases
5456 (zero? (system* "py.test" "-v")))))))
5458 `(("python2-pytest" ,python2-pytest)))
5459 (home-page "https://github.com/chrippa/backports.shutil_get_terminal_size")
5460 (synopsis "Backport of Python 3.3's @code{shutil.get_terminal_size}")
5462 "This package provides a backport of the @code{get_terminal_size
5463 function} from Python 3.3's @code{shutil}.
5464 Unlike the original version it is written in pure Python rather than C,
5465 so it might be a tiny bit slower.")
5466 (license license:expat)))
5468 (define-public python-waf
5474 (uri (string-append "https://waf.io/"
5475 "waf-" version ".tar.bz2"))
5478 "0wl4cnmp06lfxqjxaan58bqxn27smhydz0sg5prrfbl3bsw4gv6q"))))
5479 (build-system python-build-system)
5482 (modify-phases %standard-phases
5485 (invoke "python" "waf-light" "configure" "build")))
5488 (invoke "python" "waf" "--version")))
5491 (copy-file "waf" %output)
5493 (home-page "https://waf.io/")
5494 (synopsis "Python-based build system")
5496 "Waf is a Python-based framework for configuring, compiling and installing
5498 (license license:bsd-3)))
5500 (define-public python2-waf
5501 (package-with-python2 python-waf))
5503 (define-public python-pyzmq
5505 (name "python-pyzmq")
5510 (uri (pypi-uri "pyzmq" version))
5512 (base32 "13fhwnlvsvxv72kfhqbpn6qi7msh8mc8377mpabv32skk2cjfnxx"))))
5513 (build-system python-build-system)
5516 (list (string-append "--zmq=" (assoc-ref %build-inputs "zeromq")))
5517 ;; FIXME: You must build pyzmq with 'python setup.py build_ext
5518 ;; --inplace' for 'python setup.py test' to work.
5521 `(("zeromq" ,zeromq)))
5523 `(("pkg-config" ,pkg-config)
5524 ("python-nose" ,python-nose)))
5525 (home-page "https://github.com/zeromq/pyzmq")
5526 (synopsis "Python bindings for 0MQ")
5528 "PyZMQ is the official Python binding for the ZeroMQ messaging library.")
5529 (license license:bsd-4)))
5531 (define-public python2-pyzmq
5532 (package-with-python2 python-pyzmq))
5534 (define-public python-pep8
5536 (name "python-pep8")
5541 (uri (pypi-uri "pep8" version))
5544 "002rkl4lsn6x2mxmf8ar00l0m8i3mzrc6pnzz77blyksmpsxa4x1"))))
5545 (build-system python-build-system)
5546 (home-page "http://pep8.readthedocs.org/")
5547 (synopsis "Python style guide checker")
5549 "This tools checks Python code against some of the style conventions in
5551 (license license:expat)))
5553 (define-public python2-pep8
5554 (package-with-python2 python-pep8))
5556 (define-public python-pyflakes
5558 (name "python-pyflakes")
5563 (uri (pypi-uri "pyflakes" version))
5566 "1x1pcca4a24k4pw8x1c77sgi58cg1wl2k38mp8a25k608pzls3da"))))
5567 (build-system python-build-system)
5569 "https://github.com/pyflakes/pyflakes")
5570 (synopsis "Passive checker of Python programs")
5572 "Pyflakes statically checks Python source code for common errors.")
5573 (license license:expat)))
5575 (define-public python2-pyflakes
5576 (package-with-python2 python-pyflakes))
5578 (define-public python-mccabe
5580 (name "python-mccabe")
5585 (uri (pypi-uri "mccabe" version))
5588 "07w3p1qm44hgxf3vvwz84kswpsx6s7kvaibzrsx5dzm0hli1i3fx"))))
5589 (build-system python-build-system)
5591 `(("python-pytest" ,python-pytest-bootstrap)
5592 ("python-pytest-runner" ,python-pytest-runner)))
5593 (home-page "https://github.com/flintwork/mccabe")
5594 (synopsis "McCabe checker, plugin for flake8")
5596 "This package provides a Flake8 plug-in to compute the McCabe cyclomatic
5597 complexity of Python source code.")
5598 (license license:expat)))
5600 (define-public python2-mccabe
5601 (package-with-python2 python-mccabe))
5603 (define-public python-mccabe-0.2.1
5604 (package (inherit python-mccabe)
5609 (uri (pypi-uri "mccabe" version))
5612 "0fi4a81kr5bcv5p4xgibqr595hyj5dafkqgsmfk96mfy8w71fajs"))))))
5614 (define-public python2-mccabe-0.2.1
5615 (package-with-python2 python-mccabe-0.2.1))
5617 ;; Flake8 2.4.1 requires an older version of pep8.
5618 ;; This should be removed ASAP.
5619 (define-public python-pep8-1.5.7
5620 (package (inherit python-pep8)
5626 "https://pypi.python.org/packages/source/p/pep8/pep8-"
5631 "12b9bbdbwnspxgak14xg58c130x2n0blxzlms5jn2dszn8qj3d0m"))))
5633 ;; XXX Tests not compatible with Python 3.5.
5636 (define-public python2-pep8-1.5.7
5637 (package-with-python2 python-pep8-1.5.7))
5639 ;; Flake8 2.4.1 requires an older version of pyflakes.
5640 ;; This should be removed ASAP.
5641 (define-public python-pyflakes-0.8.1
5642 (package (inherit python-pyflakes)
5648 "https://pypi.python.org/packages/source/p/pyflakes/pyflakes-"
5653 "0sbpq6pqm1i9wqi41mlfrsc5rk92jv4mskvlyxmnhlbdnc80ma1z"))))
5655 ;; XXX Tests not compatible with Python 3.5.
5658 (define-public python2-pyflakes-0.8.1
5659 (package-with-python2 python-pyflakes-0.8.1))
5661 (define-public python-flake8
5663 (name "python-flake8")
5668 (uri (pypi-uri "flake8" version))
5671 "1n0i38592vy3q0x2a9bf8z6rhhn04i30wsn5i5zzcj7qkxvl8062"))))
5672 (build-system python-build-system)
5675 (modify-phases %standard-phases
5677 (add-after 'install 'check
5678 (lambda* (#:key inputs outputs #:allow-other-keys)
5679 (add-installed-pythonpath inputs outputs)
5680 (zero? (system* "pytest" "-v")))))))
5682 `(("python-pycodestyle" ,python-pycodestyle)
5683 ("python-pyflakes" ,python-pyflakes)
5684 ;; flake8 depends on a newer setuptools than provided by python.
5685 ("python-setuptools" ,python-setuptools)
5686 ("python-mccabe" ,python-mccabe)))
5688 `(("python-mock" ,python-mock) ; TODO: only required for < 3.3
5689 ("python-pytest" ,python-pytest-bootstrap)
5690 ("python-pytest-runner" ,python-pytest-runner)))
5691 (home-page "https://gitlab.com/pycqa/flake8")
5693 "The modular source code checker: pep8, pyflakes and co")
5695 "Flake8 is a wrapper around PyFlakes, pep8 and python-mccabe.")
5696 (properties `((python2-variant . ,(delay python2-flake8))))
5697 (license license:expat)))
5699 (define-public python2-flake8
5700 (let ((base (package-with-python2 (strip-python2-variant python-flake8))))
5701 (package (inherit base)
5703 `(("python2-configparser" ,python2-configparser)
5704 ("python2-enum34" ,python2-enum34)
5705 ,@(package-propagated-inputs base))))))
5707 ;; python-hacking requires flake8 <2.6.0.
5708 (define-public python-flake8-2.5
5710 (inherit python-flake8)
5714 (uri (pypi-uri "flake8" version))
5717 "1snylqwbmrylbx3r1wpz8ggk98f6bcag4441ag8mm2l7wyn58sij"))))
5719 `(("python-pep8" ,python-pep8)
5720 ,@(package-propagated-inputs python-flake8)))
5721 (properties `((python2-variant . ,(delay python2-flake8-2.5))))))
5723 (define-public python2-flake8-2.5
5725 (inherit python2-flake8)
5726 (version (package-version python-flake8-2.5))
5728 (inherit (package-source python-flake8-2.5))))
5730 `(("python2-pep8" ,python2-pep8)
5731 ,@(package-propagated-inputs python2-flake8)))))
5733 (define-public python-flake8-polyfill
5735 (name "python-flake8-polyfill")
5740 (uri (pypi-uri "flake8-polyfill" version))
5743 "1nlf1mkqw856vi6782qcglqhaacb23khk9wkcgn55npnjxshhjz4"))))
5744 (build-system python-build-system)
5747 (modify-phases %standard-phases
5750 (setenv "PYTHONPATH"
5751 (string-append (getcwd) "/build/lib:"
5752 (getenv "PYTHONPATH")))
5753 (zero? (system* "py.test" "-v")))))))
5755 `(("python-flake8" ,python-flake8)
5756 ("python-mock" ,python-mock)
5757 ("python-pep8" ,python-pep8)
5758 ("python-pycodestyle" ,python-pycodestyle)
5759 ("python-pytest" ,python-pytest)))
5760 (home-page "https://gitlab.com/pycqa/flake8-polyfill")
5761 (synopsis "Polyfill package for Flake8 plugins")
5763 "This package that provides some compatibility helpers for Flake8
5764 plugins that intend to support Flake8 2.x and 3.x simultaneously.")
5765 (license license:expat)))
5767 (define-public python2-flake8-polyfill
5768 (package-with-python2 python-flake8-polyfill))
5770 (define-public python-mistune
5772 (name "python-mistune")
5777 (uri (pypi-uri "mistune" version))
5780 "06b662p6kf46wh2jsabaqhaq4bz1srh2zxkrnx4yg96azlxw645w"))))
5781 (build-system python-build-system)
5783 `(("python-nose" ,python-nose)
5784 ("python-cython" ,python-cython)))
5785 (home-page "https://github.com/lepture/mistune")
5786 (synopsis "Markdown parser in pure Python")
5787 (description "This package provides a fast markdown parser in pure
5789 (license license:bsd-3)))
5791 (define-public python2-mistune
5792 (package-with-python2 python-mistune))
5794 (define-public python-markdown
5796 (name "python-markdown")
5801 (uri (pypi-uri "Markdown" version))
5804 "108g80ryzykh8bj0i7jfp71510wrcixdi771lf2asyghgyf8cmm8"))))
5805 (build-system python-build-system)
5808 (modify-phases %standard-phases
5811 (zero? (system* "python" "run-tests.py")))))))
5813 `(("python-nose" ,python-nose)
5814 ("python-pyyaml" ,python-pyyaml)))
5815 (home-page "https://pythonhosted.org/Markdown/")
5816 (synopsis "Python implementation of Markdown")
5818 "This package provides a Python implementation of John Gruber's
5819 Markdown. The library features international input, various Markdown
5820 extensions, and several HTML output formats. A command line wrapper
5821 markdown_py is also provided to convert Markdown files to HTML.")
5822 (license license:bsd-3)))
5824 (define-public python2-markdown
5825 (package-with-python2 python-markdown))
5827 (define-public python-ptyprocess
5829 (name "python-ptyprocess")
5834 (uri (pypi-uri "ptyprocess" version))
5837 "0ra31k10v3629xq0kdn8lwmfbi97anmk48r03yvh7mks0kq96hg6"))))
5838 (build-system python-build-system)
5840 `(("python-nose" ,python-nose)))
5843 (modify-phases %standard-phases
5846 (zero? (system* "nosetests")))))))
5847 (home-page "https://github.com/pexpect/ptyprocess")
5848 (synopsis "Run a subprocess in a pseudo terminal")
5850 "This package provides a Python library used to launch a subprocess in a
5851 pseudo terminal (pty), and interact with both the process and its pty.")
5852 (license license:isc)))
5854 (define-public python2-ptyprocess
5855 (package-with-python2 python-ptyprocess))
5857 (define-public python-cram
5859 (name "python-cram")
5861 (home-page "https://bitheap.org/cram/")
5864 (uri (list (string-append home-page "cram-"
5866 (pypi-uri "cram" version)))
5869 "0bvz6fwdi55rkrz3f50zsy35gvvwhlppki2yml5bj5ffy9d499vx"))))
5872 (modify-phases %standard-phases
5873 (add-after 'unpack 'patch-source
5875 (substitute* (find-files "cram" ".*\\.py$")
5876 ;; Replace default shell path.
5877 (("/bin/sh") (which "sh")))
5878 (substitute* (find-files "tests" ".*\\.t$")
5880 (("/bin/bash") (which "bash"))
5881 (("/bin/sh") (which "sh")))
5882 (substitute* "cram/_test.py"
5883 ;; This hack works around a bug triggered by substituting
5884 ;; the /bin/sh paths. "tests/usage.t" compares the output of
5885 ;; "cram -h", which breaks the output at 80 characters. This
5886 ;; causes the line showing the default shell to break into two
5887 ;; lines, but the test expects a single line...
5888 (("env\\['COLUMNS'\\] = '80'")
5889 "env['COLUMNS'] = '160'"))
5892 (add-after 'install 'check
5893 ;; The test phase uses the built library and executable.
5894 ;; It's easier to run it after install since the build
5895 ;; directory contains version-specific PATH.
5896 (lambda* (#:key inputs outputs #:allow-other-keys)
5897 (add-installed-pythonpath inputs outputs)
5898 (setenv "PATH" (string-append (getenv "PATH") ":"
5899 (assoc-ref outputs "out") "/bin"))
5900 (zero? (system* "make" "test")))))))
5901 (build-system python-build-system)
5903 `(("python-coverage" ,python-coverage)
5905 (synopsis "Simple testing framework for command line applications")
5907 "Cram is a functional testing framework for command line applications.
5908 Cram tests look like snippets of interactive shell sessions. Cram runs each
5909 command and compares the command output in the test with the command’s actual
5911 (license license:gpl2+)))
5913 (define-public python2-cram
5914 (package-with-python2 python-cram))
5916 (define-public python-straight-plugin
5918 (name "python-straight-plugin")
5923 (uri (pypi-uri "straight.plugin" version))
5926 "069pjll4383p4kkgvcc40hgyvf79j2wdbpgwz77yigzxksh1gj62"))))
5927 (build-system python-build-system)
5928 (home-page "https://github.com/ironfroggy/straight.plugin")
5929 (synopsis "Simple namespaced plugin facility")
5930 (description "Straight Plugin provides a type of plugin you can create from
5931 almost any existing Python modules, and an easy way for outside developers to
5932 add functionality and customization to your projects with their own plugins.")
5933 (license license:expat)))
5935 (define-public python2-straight-plugin
5936 (package-with-python2 python-straight-plugin))
5938 (define-public python-fonttools
5940 (name "python-fonttools")
5944 (uri (pypi-uri "fonttools" version ".zip"))
5947 "1hhj97izwliy0vybmza72d90l5d4mcn50y8akq7kyccfl82vdx4d"))))
5948 (build-system python-build-system)
5950 '(#:test-target "check"
5952 (modify-phases %standard-phases
5953 (add-after 'unpack 'patch-setuppy
5954 ;; Remove the undocumented "extra_path" argument, which adds an
5955 ;; intervening directories between site-packages and the package
5958 (substitute* "setup.py"
5959 (("^[ \t]*extra_path *= *'FontTools',") ""))
5962 `(("unzip" ,unzip)))
5963 (home-page "https://github.com/behdad/fonttools")
5964 (synopsis "Tools to manipulate font files")
5966 "FontTools/TTX is a library to manipulate font files from Python. It
5967 supports reading and writing of TrueType/OpenType fonts, reading and writing
5968 of AFM files, reading (and partially writing) of PS Type 1 fonts. The package
5969 also contains a tool called “TTX” which converts TrueType/OpenType fonts to and
5970 from an XML-based format.")
5971 (license (license:non-copyleft
5972 "file://LICENSE.txt"
5973 "See LICENSE.txt in the distribution."))))
5975 (define-public python2-fonttools
5976 (package-with-python2 python-fonttools))
5978 (define-public python-ly
5985 (uri (pypi-uri name version))
5988 "0x98dv7p8mg26p4816yy8hz4f34zf6hpnnfmr56msgh9jnsm2qfl"))))
5989 (build-system python-build-system)
5991 ;; FIXME: Some tests need network access.
5993 (synopsis "Tool and library for manipulating LilyPond files")
5994 (description "This package provides a Python library to parse, manipulate
5995 or create documents in LilyPond format. A command line program ly is also
5996 provided that can be used to do various manipulations with LilyPond files.")
5997 (home-page "https://pypi.python.org/pypi/python-ly")
5998 (license license:gpl2+)))
6000 (define-public python-appdirs
6002 (name "python-appdirs")
6007 (uri (pypi-uri "appdirs" version))
6010 "14id6wxi12lgyw0mg3bcfnf888ad07jz9yj46gfzhn186z8rcn4y"))))
6011 (build-system python-build-system)
6012 (home-page "https://github.com/ActiveState/appdirs")
6014 "Determine platform-specific dirs, e.g. a \"user data dir\"")
6016 "This module provides a portable way of finding out where user data
6017 should be stored on various operating systems.")
6018 (license license:expat)))
6020 (define-public python2-appdirs
6021 (package-with-python2 python-appdirs))
6023 (define-public python-llfuse
6025 (name "python-llfuse")
6029 (uri (pypi-uri "llfuse" version ".tar.bz2"))
6032 "0qxvnbz41bpvpc1vbi8qkhmpr9gj1qrrp5jdj085iqibd8l2l9cn"))))
6033 (build-system python-build-system)
6038 `(("pkg-config" ,pkg-config)))
6039 (synopsis "Python bindings for FUSE")
6041 "Python-LLFUSE is a set of Python bindings for the low level FUSE API.")
6042 (home-page "https://bitbucket.org/nikratio/python-llfuse/")
6043 (license license:lgpl2.0+)
6044 (properties `((python2-variant . ,(delay python2-llfuse))))))
6046 (define-public python2-llfuse
6047 (package (inherit (package-with-python2
6048 (strip-python2-variant python-llfuse)))
6049 (propagated-inputs `(("python2-contextlib2" ,python2-contextlib2)))))
6052 (define-public python-llfuse-0.41
6053 (package (inherit python-llfuse)
6058 "https://bitbucket.org/nikratio/python-llfuse/downloads/"
6059 "llfuse-" version ".tar.bz2"))
6062 "1imlqw9b73086y97izr036f58pgc5akv4ihc2rrf8j5h75jbrlaa"))))
6063 ;; Python-LLFUSE < 0.42 includes underscore.js, which is MIT (expat)
6064 ;; licensed. The rest of the package is licensed under LGPL2.0 or later.
6065 (license (list license:expat license:lgpl2.0+))))
6067 (define-public python-msgpack
6069 (name "python-msgpack")
6073 (uri (pypi-uri "msgpack" version))
6076 "1hz2dba1nvvn52afg34liijsm7kn65cmn06dl0xbwld6bb4cis0f"))))
6077 (build-system python-build-system)
6079 `(#:modules ((guix build utils)
6080 (guix build python-build-system)
6085 (modify-phases %standard-phases
6088 (let ((cwd (getcwd)))
6089 (setenv "PYTHONPATH"
6090 (string-append cwd "/build/"
6091 (find (cut string-prefix? "lib" <>)
6092 (scandir (string-append cwd "/build")))
6094 (getenv "PYTHONPATH")))
6095 (invoke "pytest" "-v" "test")))))))
6097 `(("python-pytest" ,python-pytest)))
6098 (synopsis "MessagePack (de)serializer")
6099 (description "MessagePack is a fast, compact binary serialization format,
6100 suitable for similar data to JSON. This package provides CPython bindings for
6101 reading and writing MessagePack data.")
6102 (home-page "https://pypi.python.org/pypi/msgpack/")
6103 (license license:asl2.0)))
6105 ;; This msgpack library's name changed from "python-msgpack" to "msgpack" with
6106 ;; release 0.5. Some packages like borg still call it by the old name for now.
6107 ;; <https://bugs.gnu.org/30662>
6108 (define-public python-msgpack-transitional
6110 (inherit python-msgpack)
6111 (name "python-msgpack-transitional")
6113 (substitute-keyword-arguments (package-arguments python-msgpack)
6115 `(modify-phases ,phases
6116 (add-after 'unpack 'configure-transitional
6118 ;; Keep using the old name.
6119 (substitute* "setup.py"
6120 (("TRANSITIONAL = False")
6121 "TRANSITIONAL = 1"))
6124 (define-public python2-msgpack
6125 (package-with-python2 python-msgpack))
6127 (define-public python-netaddr
6129 (name "python-netaddr")
6134 (uri (pypi-uri "netaddr" version))
6137 "1zdfadvpq4lmcqzr383gywxn4xyn355kj1n3lk9q2l03vmyfrbiq"))))
6138 (build-system python-build-system)
6139 (arguments `(#:tests? #f)) ;; No tests.
6140 (home-page "https://github.com/drkjam/netaddr/")
6141 (synopsis "Pythonic manipulation of network addresses")
6143 "A Python library for representing and manipulating IPv4, IPv6, CIDR, EUI
6144 and MAC network addresses.")
6145 (license license:bsd-3)))
6147 (define-public python2-netaddr
6148 (package-with-python2 python-netaddr))
6150 (define-public python-wrapt
6152 (name "python-wrapt")
6157 (uri (pypi-uri "wrapt" version))
6160 "1ip3dwib39xhp79kblskgvz3fjzcwxgx3fs3ahdixhpjg7a61mfl"))))
6161 (build-system python-build-system)
6163 ;; Tests are not included in the tarball, they are only available in the
6166 (home-page "https://github.com/GrahamDumpleton/wrapt")
6167 (synopsis "Module for decorators, wrappers and monkey patching")
6169 "The aim of the wrapt module is to provide a transparent object proxy for
6170 Python, which can be used as the basis for the construction of function
6171 wrappers and decorator functions.")
6172 (license license:bsd-2)))
6174 (define-public python2-wrapt
6175 (package-with-python2 python-wrapt))
6177 (define-public python-xlrd
6179 (name "python-xlrd")
6183 (uri (pypi-uri "xlrd" version))
6186 "0s8hjiz01vbhy85xalrz0qlsmd9ypf36zjqrf97hh984spapvy0g"))))
6187 (build-system python-build-system)
6190 (modify-phases %standard-phases
6191 ;; Current test in setup.py does not work as of 1.0.0, so use nose to
6192 ;; run tests instead for now.
6193 (replace 'check (lambda _ (zero? (system* "nosetests")))))))
6194 (native-inputs `(("python-nose" ,python-nose)))
6195 (home-page "http://www.python-excel.org/")
6196 (synopsis "Library for extracting data from Excel files")
6197 (description "This packages provides a library to extract data from
6198 spreadsheets using Microsoft Excel proprietary file formats @samp{.xls} and
6199 @samp{.xlsx} (versions 2.0 onwards). It has support for Excel dates and is
6200 Unicode-aware. It is not intended as an end-user tool.")
6201 (license license:bsd-3)))
6203 (define-public python2-xlrd
6204 (package-with-python2 python-xlrd))
6206 (define-public python-prettytable
6208 (name "python-prettytable")
6214 "https://pypi.python.org/packages/source/P/PrettyTable/"
6215 "prettytable-" version ".tar.bz2"))
6218 "0diwsicwmiq2cpzpxri7cyl5fmsvicafw6nfqf6p6p322dji2g45"))))
6219 (build-system python-build-system)
6220 (home-page "http://code.google.com/p/prettytable/")
6221 (synopsis "Display tabular data in an ASCII table format")
6223 "A library designed to represent tabular data in visually appealing ASCII
6224 tables. PrettyTable allows for selection of which columns are to be printed,
6225 independent alignment of columns (left or right justified or centred) and
6226 printing of sub-tables by specifying a row range.")
6227 (license license:bsd-3)))
6229 (define-public python2-prettytable
6230 (package-with-python2 python-prettytable))
6232 (define-public python-tables
6234 (name "python-tables")
6239 (uri (pypi-uri "tables" version))
6242 "117s6w7s3yxafpmf3zz3svana7xfrsviw01va1xp7h8ylx8v6r1m"))
6243 (modules '((guix build utils)))
6246 ;; Remove pre-compiled .pyc files from source.
6247 (for-each delete-file-recursively
6248 (find-files "." "__pycache__" #:directories? #t))
6249 (for-each delete-file (find-files "." "\\.pyc$"))
6251 (build-system python-build-system)
6253 `(;; FIXME: python-build-system does not pass configure-flags to "build"
6254 ;; or "check", so we must override the build and check phases.
6256 (modify-phases %standard-phases
6257 (add-after 'unpack 'use-gcc
6259 (substitute* "setup.py"
6260 (("compiler = new_compiler\\(\\)" line)
6262 "\ncompiler.set_executables(compiler='gcc',"
6263 "compiler_so='gcc',"
6265 "linker_so='gcc -shared')")))
6268 (lambda* (#:key inputs #:allow-other-keys)
6269 (zero? (system* "python" "setup.py" "build"
6270 (string-append "--hdf5="
6271 (assoc-ref inputs "hdf5"))))))
6273 (lambda* (#:key inputs #:allow-other-keys)
6274 (zero? (system* "python" "setup.py" "check"
6275 (string-append "--hdf5="
6276 (assoc-ref inputs "hdf5")))))))))
6278 `(("python-numexpr" ,python-numexpr)
6279 ("python-numpy" ,python-numpy)))
6281 `(("python-cython" ,python-cython)
6282 ("pkg-config" ,pkg-config)))
6287 (home-page "http://www.pytables.org/")
6288 (synopsis "Hierarchical datasets for Python")
6289 (description "PyTables is a package for managing hierarchical datasets and
6290 designed to efficiently cope with extremely large amounts of data.")
6291 (license license:bsd-3)))
6293 (define-public python2-tables
6294 (package-with-python2 python-tables))
6296 (define-public python-pyasn1
6298 (name "python-pyasn1")
6303 (uri (pypi-uri "pyasn1" version))
6306 "05bxnr4wmrg62m4qr1pg1p3z7bhwrv74jll3k42pgxwl36kv0n6j"))))
6307 (build-system python-build-system)
6308 (home-page "http://pyasn1.sourceforge.net/")
6309 (synopsis "ASN.1 types and codecs")
6311 "This is an implementation of ASN.1 types and codecs in Python. It is
6312 suitable for a wide range of protocols based on the ASN.1 specification.")
6313 (license license:bsd-2)))
6315 (define-public python2-pyasn1
6316 (package-with-python2 python-pyasn1))
6318 (define-public python-pyasn1-modules
6320 (name "python-pyasn1-modules")
6325 (uri (pypi-uri "pyasn1-modules" version))
6328 "0drqgw81xd3fxdlg89kgd79zzrabvfncvkbybi2wr6w2y4s1jmhh"))))
6329 (build-system python-build-system)
6331 `(("python-pyasn1" ,python-pyasn1)))
6332 (home-page "https://sourceforge.net/projects/pyasn1/")
6333 (synopsis "ASN.1 codec implementations")
6335 "Pyasn1-modules is a collection of Python modules providing ASN.1 types and
6336 implementations of ASN.1-based codecs and protocols.")
6337 (license license:bsd-3)))
6339 (define-public python2-pyasn1-modules
6340 (package-with-python2 python-pyasn1-modules))
6342 (define-public python-ipaddress
6344 (name "python-ipaddress")
6348 (uri (pypi-uri "ipaddress" version))
6351 "10agaa1cys1bk1ycpl2w8lky9vjx8h1xh1z29mg0niqx0638c390"))))
6352 (build-system python-build-system)
6353 (home-page "https://github.com/phihag/ipaddress")
6354 (synopsis "IP address manipulation library")
6356 "This package provides a fast, lightweight IPv4/IPv6 manipulation library
6357 in Python. This library is used to create, poke at, and manipulate IPv4 and
6358 IPv6 addresses and networks. This is a port of the Python 3.3 ipaddress
6359 module to older versions of Python.")
6360 (license license:psfl)))
6362 (define-public python2-ipaddress
6363 (package-with-python2 python-ipaddress))
6365 (define-public python2-ipaddr
6367 (name "python2-ipaddr")
6372 (uri (pypi-uri "ipaddr" version))
6374 (base32 "1dwq3ngsapjc93fw61rp17fvzggmab5x1drjzvd4y4q0i255nm8v"))))
6375 (build-system python-build-system)
6377 `(#:python ,python-2 ;version 2 only
6379 (modify-phases %standard-phases
6382 (zero? (system* "python" "ipaddr_test.py")))))))
6383 (home-page "https://github.com/google/ipaddr-py")
6384 (synopsis "IP address manipulation library")
6386 "Ipaddr is a Python@tie{}2 library for creating and manupilating IPv4 and
6387 IPv6 addresses and networks.
6389 For new implementations you may prefer to use the standard module
6390 @code{ipaddress}, which was introduced in Python 3.3 and backported to older
6391 versions of Python.")
6392 (license license:asl2.0)))
6394 (define-public python-idna
6396 (name "python-idna")
6401 (uri (pypi-uri "idna" version))
6404 "13qaab6d0s15gknz8v3zbcfmbj6v86hn9pjxgkdf62ch13imssic"))))
6405 (build-system python-build-system)
6406 (home-page "https://github.com/kjd/idna")
6407 (synopsis "Internationalized domain names in applications")
6409 "This is a library to support the Internationalised Domain Names in
6410 Applications (IDNA) protocol as specified in RFC 5891. This version of the
6411 protocol is often referred to as “IDNA2008” and can produce different results
6412 from the earlier standard from 2003. The library is also intended to act as a
6413 suitable drop-in replacement for the “encodings.idna” module that comes with
6414 the Python standard library but currently only supports the older 2003
6416 (license license:bsd-4)))
6418 (define-public python2-idna
6419 (package-with-python2 python-idna))
6421 (define-public python-idna-ssl
6423 (name "python-idna-ssl")
6428 (uri (pypi-uri "idna-ssl" version))
6431 "0ydrc8hpg9mdr5hqq1lqfsfbn6sjq69slwpfrnlrm3k0phqg14qj"))))
6432 (build-system python-build-system)
6434 `(#:tests? #f)) ;circular dependency with python-aiohttp
6435 (home-page "https://github.com/aio-libs/idna-ssl")
6436 (synopsis "Patch @code{ssl.match_hostname} for Unicode(idna) domains support")
6437 (description "Patch @code{ssl.match_hostname} for Unicode(idna)
6439 (license license:expat)))
6441 (define-public python-pretend
6443 (name "python-pretend")
6448 (uri (string-append "https://pypi.python.org/packages/source/p/"
6449 "pretend/pretend-" version ".tar.gz"))
6452 "040vm94lcbscg5p81g1icmwwwa2jm7wrd1ybmxnv1sz8rl8bh3n9"))))
6453 (build-system python-build-system)
6454 (home-page "https://github.com/alex/pretend")
6455 (synopsis "Library for stubbing in Python")
6457 "Pretend is a library to make stubbing with Python easier. Stubbing is a
6458 technique for writing tests. You may hear the term mixed up with mocks,
6459 fakes, or doubles. Basically, a stub is an object that returns pre-canned
6460 responses, rather than doing any computation.")
6461 (license license:bsd-3)))
6463 (define-public python2-pretend
6464 (package-with-python2 python-pretend))
6466 (define-public python-pip
6473 (uri (pypi-uri "pip" version))
6476 "03clr9c1dih5n9c00c592zzvf6r1ffimywkaq9agcqdllzhl7wh9"))))
6477 (build-system python-build-system)
6479 '(#:tests? #f)) ; there are no tests in the pypi archive.
6480 (home-page "https://pip.pypa.io/")
6481 (synopsis "Package manager for Python software")
6483 "Pip is a package manager for Python software, that finds packages on the
6484 Python Package Index (PyPI).")
6485 (license license:expat)))
6487 (define-public python2-pip
6488 (package-with-python2 python-pip))
6490 (define-public python-tlsh
6492 (name "python-tlsh")
6494 (home-page "https://github.com/trendmicro/tlsh")
6497 (uri (string-append "https://github.com/trendmicro/tlsh/archive/v"
6501 "00bhzjqrlh7v538kbkbn8lgx976j1138al3sdhklaizqjvpwyk4r"))
6502 (file-name (string-append name "-" version ".tar.gz"))))
6503 (build-system cmake-build-system)
6505 '(#:out-of-source? #f
6506 #:phases (modify-phases %standard-phases
6509 (lambda* (#:key outputs #:allow-other-keys)
6510 ;; Build and install the Python bindings. The underlying
6511 ;; C++ library is apparently not meant to be installed.
6512 (let ((out (assoc-ref outputs "out")))
6513 (with-directory-excursion "py_ext"
6514 (and (system* "python" "setup.py" "build")
6515 (system* "python" "setup.py" "install"
6516 (string-append "--prefix=" out))))))))))
6517 (inputs `(("python" ,python-wrapper))) ;for the bindings
6518 (synopsis "Fuzzy matching library for Python")
6520 "Trend Micro Locality Sensitive Hash (TLSH) is a fuzzy matching library.
6521 Given a byte stream with a minimum length of 256 bytes, TLSH generates a hash
6522 value which can be used for similarity comparisons. Similar objects have
6523 similar hash values, which allows for the detection of similar objects by
6524 comparing their hash values. The byte stream should have a sufficient amount
6525 of complexity; for example, a byte stream of identical bytes will not generate
6527 (license license:asl2.0)))
6529 (define-public python2-tlsh
6531 (inherit python-tlsh)
6532 (name "python2-tlsh")
6533 (inputs `(("python" ,python-2)))))
6535 (define-public python-termcolor
6537 (name "python-termcolor")
6542 (uri (pypi-uri "termcolor" version))
6545 "0fv1vq14rpqwgazxg4981904lfyp84mnammw7y046491cv76jv8x"))))
6546 (build-system python-build-system)
6548 ;; There are no tests.
6550 (home-page "https://pypi.python.org/pypi/termcolor")
6551 (synopsis "ANSII Color formatting for terminal output")
6553 "This package provides ANSII Color formatting for output in terminals.")
6554 (license license:expat)))
6556 (define-public python2-termcolor
6557 (package-with-python2 python-termcolor))
6559 (define-public python-libarchive-c
6561 (name "python-libarchive-c")
6565 (uri (pypi-uri "libarchive-c" version))
6568 "0z4r7v3dhd6b3120mav05ff08srih176r2rg5k8kn7mjd9pslm2x"))))
6569 (build-system python-build-system)
6571 '(#:phases (modify-phases %standard-phases
6573 'build 'reference-libarchive
6574 (lambda* (#:key inputs #:allow-other-keys)
6575 ;; Retain the absolute file name of libarchive.so.
6576 (let ((libarchive (assoc-ref inputs "libarchive")))
6577 (substitute* "libarchive/ffi.py"
6578 (("find_library\\('archive'\\)")
6579 (string-append "'" libarchive
6580 "/lib/libarchive.so'")))))))))
6582 `(("libarchive" ,libarchive)))
6583 (home-page "https://github.com/Changaco/python-libarchive-c")
6584 (synopsis "Python interface to libarchive")
6586 "This package provides Python bindings to libarchive, a C library to
6587 access possibly compressed archives in many different formats. It uses
6588 Python's @code{ctypes} foreign function interface (FFI).")
6589 (license license:lgpl2.0+)))
6591 (define-public python2-libarchive-c
6592 (package-with-python2 python-libarchive-c))
6594 (define-public python-file
6597 (name "python-file")
6598 (build-system python-build-system)
6600 '(#:tests? #f ;no tests
6601 #:configure-flags '("--single-version-externally-managed" "--root=/")
6602 #:phases (modify-phases %standard-phases
6603 (add-before 'build 'change-directory
6607 (add-before 'build 'set-library-file-name
6608 (lambda* (#:key inputs #:allow-other-keys)
6609 (let ((file (assoc-ref inputs "file")))
6610 (substitute* "magic.py"
6611 (("find_library\\('magic'\\)")
6612 (string-append "'" file "/lib/libmagic.so'")))
6614 (inputs `(("file" ,file)))
6615 (self-native-input? #f)
6616 (synopsis "Python bindings to the libmagic file type guesser. Note that
6617 this module and the python-magic module both provide a \"magic.py\" file;
6618 these two modules, which are different and were developed separately, both
6619 serve the same purpose: provide Python bindings for libmagic.")))
6621 (define-public python2-file
6622 (package-with-python2 python-file))
6624 (define-public python-debian
6626 (name "python-debian")
6631 (uri (pypi-uri name version))
6634 "0i15f0xzx679sd0ldq2sls9pnnps9fv6vhqvnv9dzf4qhma42i0y"))))
6635 (build-system python-build-system)
6637 `(("python-six" ,python-six)))
6638 (home-page "http://packages.debian.org/sid/python-debian")
6639 (synopsis "Debian package related modules")
6641 ;; XXX: Use @enumerate instead of @itemize to work around
6642 ;; <http://bugs.gnu.org/21772>.
6643 "This package provides Python modules that abstract many formats of
6644 Debian-related files, such as:
6647 @item Debtags information;
6648 @item @file{debian/changelog} files;
6649 @item packages files, pdiffs;
6650 @item control files of single or multiple RFC822-style paragraphs---e.g.
6651 @file{debian/control}, @file{.changes}, @file{.dsc};
6652 @item Raw @file{.deb} and @file{.ar} files, with (read-only) access to
6653 contained files and meta-information.
6656 ;; Modules are either GPLv2+ or GPLv3+.
6657 (license license:gpl3+)))
6659 (define-public python2-debian
6660 (package-with-python2 python-debian))
6662 (define-public python-nbformat
6664 (name "python-nbformat")
6669 (uri (pypi-uri "nbformat" version))
6672 "00nlf08h8yc4q73nphfvfhxrcnilaqanb8z0mdy6nxk0vzq4wjgp"))))
6673 (build-system python-build-system)
6674 (arguments `(#:tests? #f)) ; no test target
6676 `(("python-ipython-genutils" ,python-ipython-genutils)
6677 ("python-jsonschema" ,python-jsonschema)
6678 ("python-jupyter-core" ,python-jupyter-core)
6679 ("python-traitlets" ,python-traitlets)))
6680 (home-page "http://jupyter.org")
6681 (synopsis "Jupyter Notebook format")
6682 (description "This package provides the reference implementation of the
6683 Jupyter Notebook format and Python APIs for working with notebooks.")
6684 (license license:bsd-3)))
6686 (define-public python2-nbformat
6687 (package-with-python2 python-nbformat))
6689 (define-public python-bleach
6691 (name "python-bleach")
6696 (uri (pypi-uri "bleach" version))
6699 "0jvg3jxrvnx7xmm9gj262v60ib452xlnwlb0navyp7jsvcd0d4qj"))))
6700 (build-system python-build-system)
6702 `(("python-html5lib" ,python-html5lib-0.9)
6703 ("python-six" ,python-six)))
6705 `(("python-nose" ,python-nose)))
6706 (home-page "https://github.com/jsocol/bleach")
6707 (synopsis "Whitelist-based HTML-sanitizing tool")
6708 (description "Bleach is an easy whitelist-based HTML-sanitizing tool.")
6709 (license license:asl2.0)))
6711 (define-public python2-bleach
6712 (package-with-python2 python-bleach))
6714 (define-public python-entrypoints
6716 (name "python-entrypoints")
6721 (uri (string-append "https://github.com/takluyver/entrypoints/archive/"
6723 (file-name (string-append name "-" version ".tar.gz"))
6726 "1pdvgfr5bxyvnfvxbsd3zi0dh3il71pc4k6rinx6zpps91b84a56"))))
6727 (build-system python-build-system)
6728 ;; The package does not come with a setup.py file, so we have to generate
6733 (modify-phases %standard-phases
6734 (add-after 'unpack 'create-setup.py
6736 (call-with-output-file "setup.py"
6739 from setuptools import setup
6740 setup(name='entrypoints', version='~a', py_modules=['entrypoints'])
6742 (home-page "https://github.com/takluyver/entrypoints")
6743 (synopsis "Discover and load entry points from installed Python packages")
6744 (description "Entry points are a way for Python packages to advertise
6745 objects with some common interface. The most common examples are
6746 @code{console_scripts} entry points, which define shell commands by
6747 identifying a Python function to run. The @code{entrypoints} module contains
6748 functions to find and load entry points.")
6749 (license license:expat)))
6751 (define-public python2-entrypoints
6752 (package-with-python2 python-entrypoints))
6754 (define-public python-nbconvert
6756 (name "python-nbconvert")
6761 (uri (pypi-uri "nbconvert" version))
6764 "0brclbb18l4nmd5qy3dl9wn05rjdh1fz4rmzdlfqacj12rcdvdgp"))))
6765 (build-system python-build-system)
6767 `(;; The "bdist_egg" target is disabled by default, causing the installation
6769 #:configure-flags (list "bdist_egg")
6770 ;; FIXME: 5 failures, 40 errors.
6773 ;; (modify-phases %standard-phases
6776 ;; (zero? (system* "py.test" "-v")))))
6778 `(("python-pytest" ,python-pytest)))
6780 `(("python-bleach" ,python-bleach)
6781 ("python-entrypoints" ,python-entrypoints)
6782 ("python-jinja2" ,python-jinja2)
6783 ("python-jupyter-core" ,python-jupyter-core)
6784 ("python-mistune" ,python-mistune)
6785 ("python-nbformat" ,python-nbformat)
6786 ("python-pygments" ,python-pygments)
6787 ("python-traitlets" ,python-traitlets)))
6788 (home-page "http://jupyter.org")
6789 (synopsis "Converting Jupyter Notebooks")
6790 (description "The @code{nbconvert} tool, @{jupyter nbconvert}, converts
6791 notebooks to various other formats via Jinja templates. It allows you to
6792 convert an @code{.ipynb} notebook file into various static formats including:
6800 @item ReStructured Text (rst)
6801 @item executable script
6803 (license license:bsd-3)))
6805 (define-public python2-nbconvert
6806 (package-with-python2 python-nbconvert))
6808 (define-public python-notebook
6810 (name "python-notebook")
6814 (uri (pypi-uri "notebook" version))
6817 "0laq5c2f21frq6xcdckgq7raqhznbjb0qs0357g612z87wyn1a9r"))))
6818 (build-system python-build-system)
6821 (modify-phases %standard-phases
6824 ;; HOME must be set for tests
6825 (setenv "HOME" "/tmp")
6826 (zero? (system* "nosetests")))))))
6828 `(("python-jupyter-core" ,python-jupyter-core)
6829 ("python-nbformat" ,python-nbformat)
6830 ("python-nbconvert" ,python-nbconvert)
6831 ("python-ipython" ,python-ipython)))
6833 `(("python-nose" ,python-nose)
6834 ("python-sphinx" ,python-sphinx)
6835 ("python-requests" ,python-requests)))
6836 (home-page "http://jupyter.org/")
6837 (synopsis "Web-based notebook environment for interactive computing")
6839 "The Jupyter HTML notebook is a web-based notebook environment for
6840 interactive computing.")
6841 (properties `((python2-variant . ,(delay python2-notebook))))
6842 (license license:bsd-3)))
6844 (define-public python2-notebook
6845 (let ((base (package-with-python2
6846 (strip-python2-variant python-notebook))))
6847 (package (inherit base)
6849 `(("python2-mock" ,python2-mock)
6850 ,@(package-native-inputs base)))
6852 (substitute-keyword-arguments (package-arguments base)
6854 `(modify-phases ,phases
6855 (add-before 'check 'disable-test-case
6856 ;; The test requires network access to localhost. Curiously it
6857 ;; fails with Python 2 only. Simply make the test-case return
6861 "notebook/services/nbconvert/tests/test_nbconvert_api.py"
6862 (("formats = self.nbconvert_api") "return #")))))))))))
6864 (define-public python-widgetsnbextension
6866 (name "python-widgetsnbextension")
6871 (uri (pypi-uri "widgetsnbextension" version))
6874 "0lff2mrwrgsa1mxmwx3phl9xvy0jqfpg6khbmxy53jbq56rwy666"))))
6875 (build-system python-build-system)
6877 `(("python-notebook" ,python-notebook)))
6879 `(("python-certifi" ,python-certifi)
6880 ("python-nose" ,python-nose)))
6881 (home-page "https://ipython.org")
6882 (synopsis "IPython HTML widgets for Jupyter")
6883 (description "This package provides interactive HTML widgets for Jupyter
6885 (license license:bsd-3)))
6887 (define-public python2-widgetsnbextension
6888 (package-with-python2 python-widgetsnbextension))
6890 (define-public python-ipywidgets
6892 (name "python-ipywidgets")
6897 (uri (pypi-uri "ipywidgets" version))
6900 "1lk0qrr5l9a0z7qkkn30hv5832whxwxymf1l576fmmad0n7hkxms"))))
6901 (build-system python-build-system)
6902 ;; FIXME: it's not clear how to run the tests.
6903 (arguments `(#:tests? #f))
6905 `(("python-ipykernel" ,python-ipykernel)
6906 ("python-ipython" ,python-ipython)
6907 ("python-traitlets" ,python-traitlets)
6908 ("python-widgetsnbextension" ,python-widgetsnbextension)))
6909 (home-page "https://ipython.org")
6910 (synopsis "IPython HTML widgets for Jupyter")
6911 (description "Ipywidgets are interactive HTML widgets for Jupyter
6912 notebooks and the IPython kernel. Notebooks come alive when interactive
6913 widgets are used. Users gain control of their data and can visualize changes
6915 (license license:bsd-3)))
6917 (define-public python2-ipywidgets
6918 (package-with-python2 python-ipywidgets))
6920 (define-public python-jupyter-console
6922 (name "python-jupyter-console")
6927 (uri (pypi-uri "jupyter_console" version))
6930 "1kam1qzgwr7srhm5r6aj90di5sws4bq0jmiw15452ddamb9yspal"))))
6931 (build-system python-build-system)
6932 ;; FIXME: it's not clear how to run the tests.
6933 (arguments `(#:tests? #f))
6935 `(("python-ipykernel" ,python-ipykernel)
6936 ("python-ipython" ,python-ipython)
6937 ("python-jupyter-client" ,python-jupyter-client)
6938 ("python-prompt-toolkit" ,python-prompt-toolkit)
6939 ("python-pygments" ,python-pygments)))
6940 (home-page "https://jupyter.org")
6941 (synopsis "Jupyter terminal console")
6942 (description "This package provides a terminal-based console frontend for
6943 Jupyter kernels. It also allows for console-based interaction with non-Python
6944 Jupyter kernels such as IJulia and IRKernel.")
6945 (license license:bsd-3)))
6947 (define-public python2-jupyter-console
6948 (package-with-python2 python-jupyter-console))
6950 ;; The python-ipython and python-jupyter-console require each other. To get
6951 ;; the functionality in both packages working, strip down the
6952 ;; python-jupyter-console package when using it as an input to python-ipython.
6953 (define python-jupyter-console-minimal
6955 (inherit python-jupyter-console)
6956 (name "python-jupyter-console-minimal")
6958 (substitute-keyword-arguments
6959 (package-arguments python-jupyter-console)
6961 `(modify-phases ,phases
6962 (add-after 'install 'delete-bin
6963 (lambda* (#:key outputs #:allow-other-keys)
6964 ;; Delete the bin files, to avoid conflicts in profiles
6965 ;; where python-ipython and python-jupyter-console are
6967 (delete-file-recursively
6969 (assoc-ref outputs "out") "/bin"))))))))
6970 ;; Remove the python-ipython propagated input, to avoid the cycle
6974 (package-propagated-inputs python-jupyter-console)))))
6976 (define-public jupyter
6983 (uri (pypi-uri "jupyter" version))
6986 "0pwf3pminkzyzgx5kcplvvbvwrrzd3baa7lmh96f647k30rlpp6r"))))
6987 (build-system python-build-system)
6988 ;; FIXME: it's not clear how to run the tests.
6989 (arguments `(#:tests? #f))
6991 `(("python-ipykernel" ,python-ipykernel)
6992 ("python-ipywidgets" ,python-ipywidgets)
6993 ("python-jupyter-console" ,python-jupyter-console)
6994 ("python-nbconvert" ,python-nbconvert)
6995 ("python-notebook" ,python-notebook)))
6997 (native-search-paths
6998 (list (search-path-specification
6999 (variable "JUPYTER_PATH")
7000 (files '("share/jupyter")))))
7002 (home-page "http://jupyter.org")
7003 (synopsis "Web application for interactive documents")
7005 "The Jupyter Notebook is a web application that allows you to create and
7006 share documents that contain live code, equations, visualizations and
7007 explanatory text. Uses include: data cleaning and transformation, numerical
7008 simulation, statistical modeling, machine learning and much more.")
7009 (license license:bsd-3)))
7011 (define-public python-chardet
7013 (name "python-chardet")
7018 (uri (pypi-uri "chardet" version))
7021 "1bpalpia6r5x1kknbk11p1fzph56fmmnp405ds8icksd3knr5aw4"))))
7023 `(("python-hypothesis" ,python-hypothesis)
7024 ("python-pytest" ,python-pytest)
7025 ("python-pytest-runner" ,python-pytest-runner)))
7026 (build-system python-build-system)
7027 (home-page "https://github.com/chardet/chardet")
7028 (synopsis "Universal encoding detector for Python 2 and 3")
7030 "This package provides @code{chardet}, a Python module that can
7031 automatically detect a wide range of file encodings.")
7032 (license license:lgpl2.1+)))
7034 (define-public python2-chardet
7035 (package-with-python2 python-chardet))
7037 (define-public python-docopt
7039 (name "python-docopt")
7044 ;; The release on PyPI does not include tests.
7046 "https://github.com/docopt/docopt/archive/"
7048 (file-name (string-append name "-" version ".tar.gz"))
7051 "16bf890xbdz3m30rsv2qacklh2rdn1zrfspfnwzx9g7vwz8yw4r1"))))
7052 (build-system python-build-system)
7054 `(("python-pytest" ,python-pytest)))
7057 (modify-phases %standard-phases
7059 (lambda _ (zero? (system* "py.test")))))))
7060 (home-page "http://docopt.org")
7061 (synopsis "Command-line interface description language for Python")
7062 (description "This library allows the user to define a command-line
7063 interface from a program's help message rather than specifying it
7064 programatically with command-line parsers like @code{getopt} and
7066 (license license:expat)))
7068 (define-public python2-docopt
7069 (package-with-python2 python-docopt))
7071 (define-public python-pythondialog
7073 (name "python-pythondialog")
7078 (uri (pypi-uri "pythondialog" version))
7081 "1728ghsran47jczn9bhlnkvk5bvqmmbihabgif5h705b84r1272c"))))
7082 (build-system python-build-system)
7085 (modify-phases %standard-phases
7086 (add-after 'unpack 'patch-path
7087 (lambda* (#:key inputs #:allow-other-keys)
7088 (let* ((dialog (assoc-ref inputs "dialog")))
7089 ;; Since this library really wants to grovel the search path, we
7090 ;; must hardcode dialog's store path into it.
7091 (substitute* "dialog.py"
7092 (("os.getenv\\(\"PATH\", \":/bin:/usr/bin\"\\)")
7093 (string-append "os.getenv(\"PATH\") + \":" dialog "/bin\"")))
7095 #:tests? #f)) ; no test suite
7097 `(("dialog" ,dialog)))
7098 (home-page "http://pythondialog.sourceforge.net/")
7099 (synopsis "Python interface to the UNIX dialog utility")
7100 (description "A Python wrapper for the dialog utility. Its purpose is to
7101 provide an easy to use, pythonic and comprehensive Python interface to dialog.
7102 This allows one to make simple text-mode user interfaces on Unix-like systems")
7103 (license license:lgpl2.1)
7104 (properties `((python2-variant . ,(delay python2-pythondialog))))))
7106 (define-public python2-pythondialog
7107 (let ((base (package-with-python2 (strip-python2-variant python-pythondialog))))
7110 (version (package-version python-pythondialog))
7113 (uri (pypi-uri "python2-pythondialog" version))
7116 "0d8k7lxk50imdyx85lv8j98i4c93a71iwpapnl1506rpkbm9qvd9")))))))
7118 (define-public python-configobj
7120 (name "python-configobj")
7125 "https://pypi.python.org/packages/source/c/configobj/"
7126 "configobj-" version ".tar.gz"))
7129 "00h9rcmws03xvdlfni11yb60bz3kxfvsj6dg6nrpzj71f03nbxd2"))
7130 ;; Patch setup.py so it looks for python-setuptools, which is
7131 ;; required to parse the keyword 'install_requires' in setup.py.
7132 (patches (search-patches "python-configobj-setuptools.patch"))))
7133 (build-system python-build-system)
7135 `(("python-six" ,python-six)))
7136 (synopsis "Config file reading, writing and validation")
7137 (description "ConfigObj is a simple but powerful config file reader and
7138 writer: an ini file round tripper. Its main feature is that it is very easy to
7139 use, with a straightforward programmer’s interface and a simple syntax for
7141 (home-page "https://github.com/DiffSK/configobj")
7142 (license license:bsd-3)))
7144 (define-public python2-configobj
7145 (package-with-python2 python-configobj))
7147 (define-public python-configargparse
7149 (name "python-configargparse")
7154 "https://pypi.io/packages/source/C/ConfigArgParse/"
7155 "ConfigArgParse-" version ".tar.gz"))
7158 "0fgkiqh6r3rbkdq3k8c48m85g52k96686rw3a6jg4lcncrkpvk98"))))
7159 (build-system python-build-system)
7161 `(("python-pyyaml" ,python-pyyaml)))
7164 (modify-phases %standard-phases
7167 ;; Bypass setuptools-shim because one test relies on "setup.py"
7168 ;; being the first argument passed to the python call.
7170 ;; NOTE: Many tests do not run because they rely on Python's
7171 ;; built-in test.test_argparse, but we remove the unit tests from
7172 ;; our Python installation.
7173 (zero? (system* "python" "setup.py" "test")))))))
7174 (synopsis "Replacement for argparse")
7175 (description "A drop-in replacement for argparse that allows options to also
7176 be set via config files and/or environment variables.")
7177 (home-page "https://github.com/bw2/ConfigArgParse")
7178 (license license:expat)))
7180 (define-public python2-configargparse
7181 (package-with-python2 python-configargparse))
7183 (define-public python-contextlib2
7185 (name "python-contextlib2")
7190 (uri (pypi-uri "contextlib2" version))
7193 "0cmp131dlh0d0zvw0aza1zd13glvngzk8lb4avks0hm7yxwdr9am"))))
7194 (build-system python-build-system)
7197 (modify-phases %standard-phases
7201 "python" "test_contextlib2.py" "-v")))))))
7202 (home-page "http://contextlib2.readthedocs.org/")
7203 (synopsis "Tools for decorators and context managers")
7204 (description "This module is primarily a backport of the Python
7205 3.2 contextlib to earlier Python versions. Like contextlib, it
7206 provides utilities for common tasks involving decorators and context
7207 managers. It also contains additional features that are not part of
7208 the standard library.")
7209 (license license:psfl)))
7211 (define-public python2-contextlib2
7212 (package-with-python2 python-contextlib2))
7214 (define-public python-texttable
7216 (name "python-texttable")
7221 (uri (pypi-uri "texttable" version))
7224 "1liiiydgkg37i46a418aw19fyf6z3ds51wdwwpyjbs12x0phhf4a"))))
7225 (build-system python-build-system)
7226 (arguments '(#:tests? #f)) ; no tests
7227 (home-page "https://github.com/foutaise/texttable/")
7228 (synopsis "Python module for creating simple ASCII tables")
7229 (description "Texttable is a Python module for creating simple ASCII
7231 (license license:lgpl2.1+)))
7233 (define-public python2-texttable
7234 (package-with-python2 python-texttable))
7236 (define-public python-atomicwrites
7238 (name "python-atomicwrites")
7242 (uri (pypi-uri "atomicwrites" version))
7245 "11bm90fwm2avvf4f3ib8g925w7jr4m11vcsinn1bi6ns4bm32214"))))
7246 (build-system python-build-system)
7247 (synopsis "Atomic file writes in Python")
7248 (description "Library for atomic file writes using platform dependent tools
7249 for atomic file system operations.")
7250 (home-page "https://github.com/untitaker/python-atomicwrites")
7251 (license license:expat)))
7253 (define-public python2-atomicwrites
7254 (package-with-python2 python-atomicwrites))
7256 (define-public python-click-threading
7258 (name "python-click-threading")
7262 (uri (pypi-uri "click-threading" version))
7265 "1rsxc2fbkxlhwhlmxsdjzq3spn284l6rvjfcz9mbb17ibgdgmc5j"))))
7266 (build-system python-build-system)
7268 `(("python-click" ,python-click)))
7269 (synopsis "Utilities for multithreading in Click")
7270 (description "This package provides utilities for multithreading in Click
7272 (home-page "https://github.com/click-contrib/click-threading")
7273 (license license:expat)))
7275 (define-public python-click-log
7277 (name "python-click-log")
7281 (uri (pypi-uri "click-log" version))
7284 "1r1x85023cslb2pwldd089jjk573mk3w78cnashs77wrx7yz8fj9"))))
7285 (build-system python-build-system)
7287 `(("python-click" ,python-click)))
7288 (synopsis "Logging for click applications")
7289 (description "This package provides a Python library for logging Click
7291 (home-page "https://github.com/click-contrib/click-log")
7292 (license license:expat)))
7294 (define-public python-apipkg
7296 (name "python-apipkg")
7300 (uri (pypi-uri "apipkg" version))
7303 "1iks5701qnp3dlr3q1d9qm68y2plp2m029irhpz92a44psfkjf1f"))))
7304 (build-system python-build-system)
7306 `(("python-pytest" ,python-pytest)))
7307 (synopsis "Namespace control and lazy-import mechanism")
7308 (description "With apipkg you can control the exported namespace of a Python
7309 package and greatly reduce the number of imports for your users. It is a small
7310 pure Python module that works on virtually all Python versions.")
7311 (home-page "https://bitbucket.org/hpk42/apipkg")
7312 (license license:expat)))
7314 (define-public python2-apipkg
7315 (package-with-python2 python-apipkg))
7317 (define-public python-execnet
7319 (name "python-execnet")
7323 (uri (pypi-uri "execnet" version))
7326 "1rpk1vyclhg911p3hql0m0nrpq7q7mysxnaaw6vs29cpa6kx8vgn"))))
7327 (build-system python-build-system)
7329 `(;; 2 failed, 275 passed, 670 skipped, 4 xfailed
7330 ;; The two test failures are caused by the lack of an `ssh` executable.
7331 ;; The test suite can be run with pytest after the 'install' phase.
7334 `(("python-pytest" ,python-pytest)
7335 ("python-setuptools-scm" ,python-setuptools-scm)))
7337 `(("python-apipkg" ,python-apipkg)))
7338 (synopsis "Rapid multi-Python deployment")
7339 (description "Execnet provides a share-nothing model with
7340 channel-send/receive communication for distributing execution across many
7341 Python interpreters across version, platform and network barriers. It has a
7342 minimal and fast API targeting the following uses:
7344 @item distribute tasks to (many) local or remote CPUs
7345 @item write and deploy hybrid multi-process applications
7346 @item write scripts to administer multiple environments
7348 (home-page "http://codespeak.net/execnet/")
7349 (license license:expat)))
7351 (define-public python2-execnet
7352 (package-with-python2 python-execnet))
7354 (define-public python-icalendar
7356 (name "python-icalendar")
7360 (uri (pypi-uri "icalendar" version))
7363 "139y79y6ijl39m5bj771r43vpah9s4ly7d1k76la6hrx7l144ak8"))))
7364 (build-system python-build-system)
7366 `(("python-dateutil" ,python-dateutil)
7367 ("python-pytz" ,python-pytz)))
7368 (synopsis "Python library for parsing iCalendar files")
7369 (description "The icalendar package is a parser/generator of iCalendar
7370 files for use with Python.")
7371 (home-page "https://github.com/collective/icalendar")
7372 (license license:bsd-2)))
7374 (define-public python-sphinxcontrib-newsfeed
7376 (name "python-sphinxcontrib-newsfeed")
7380 (uri (pypi-uri "sphinxcontrib-newsfeed" version))
7383 "1d7gam3mn8v4in4p16yn3v10vps7nnaz6ilw99j4klij39dqd37p"))))
7384 (arguments '(#:tests? #f)) ; No tests.
7385 (build-system python-build-system)
7387 `(("python-sphinx" ,python-sphinx)))
7388 (synopsis "News Feed extension for Sphinx")
7389 (description "Sphinxcontrib-newsfeed is an extension for adding a simple
7390 Blog, News or Announcements section to a Sphinx website.")
7391 (home-page "https://bitbucket.org/prometheus/sphinxcontrib-newsfeed")
7392 (license license:bsd-2)))
7394 (define-public python-args
7396 (name "python-args")
7400 (uri (pypi-uri "args" version))
7403 "057qzi46h5dmxdqknsbrssn78lmqjlnm624iqdhrnpk26zcbi1d7"))))
7404 (build-system python-build-system)
7405 (home-page "https://github.com/kennethreitz/args")
7406 (synopsis "Command-line argument parser")
7408 "This library provides a Python module to parse command-line arguments.")
7409 (license license:bsd-3)))
7411 (define-public python2-args
7412 (package-with-python2 python-args))
7414 (define-public python-clint
7416 (name "python-clint")
7420 (uri (pypi-uri "clint" version))
7423 "1an5lkkqk1zha47198p42ji3m94xmzx1a03dn7866m87n4r4q8h5"))))
7424 (build-system python-build-system)
7427 (modify-phases %standard-phases
7430 (zero? (system* "py.test" "-v")))))))
7432 `(("python-pytest" ,python-pytest)))
7434 `(("python-args" ,python-args)))
7435 (home-page "https://github.com/kennethreitz/clint")
7436 (synopsis "Command-line interface tools")
7438 "Clint is a Python module filled with a set of tools for developing
7439 command-line applications, including tools for colored and indented
7440 output, progress bar display, and pipes.")
7441 (license license:isc)))
7443 (define-public python2-clint
7444 (package-with-python2 python-clint))
7446 (define-public python-astor
7448 (name "python-astor")
7452 (uri (pypi-uri "astor" version))
7455 "1fdafq5hkis1fxqlmhw0sn44zp2ar46nxhbc22cvwg7hsd8z5gsa"))))
7456 (build-system python-build-system)
7457 (home-page "https://github.com/berkerpeksag/astor")
7458 (synopsis "Read and write Python ASTs")
7460 "Astor is designed to allow easy manipulation of Python source via the
7461 Abstract Syntax Tree.")
7462 (license license:bsd-3)))
7464 (define-public python2-astor
7465 (package-with-python2 python-astor))
7467 (define-public python-rply
7469 (name "python-rply")
7473 (uri (pypi-uri "rply" version))
7476 "0lv428895zxsz43968qx0q9bimwqnfykndz4dpjbq515w2gvzhjh"))))
7477 (build-system python-build-system)
7479 `(("python-appdirs" ,python-appdirs)))
7480 (home-page "https://github.com/alex/rply")
7481 (synopsis "Parser generator for Python")
7483 "This package provides a pure Python based parser generator, that also
7484 works with RPython. It is a more-or-less direct port of David Bazzley's PLY,
7485 with a new public API, and RPython support.")
7486 (license license:bsd-3)))
7488 (define-public python2-rply
7489 (package-with-python2 python-rply))
7491 (define-public python-hy
7497 (uri (pypi-uri "hy" version))
7500 "19sfymaksx9jhksfnb15ahid46mzrhdfzz6yy2craz2qnzvpmky8"))))
7501 (build-system python-build-system)
7504 (modify-phases %standard-phases
7507 ;; Tests require write access to HOME.
7508 (setenv "HOME" "/tmp")
7509 (zero? (system* "nosetests")))))))
7511 `(("python-coverage" ,python-coverage)
7512 ("python-nose" ,python-nose)))
7514 `(("python-astor" ,python-astor)
7515 ("python-clint" ,python-clint)
7516 ("python-rply" ,python-rply)))
7517 (home-page "http://hylang.org/")
7518 (synopsis "Lisp frontend to Python")
7520 "Hy is a dialect of Lisp that's embedded in Python. Since Hy transforms
7521 its Lisp code into the Python Abstract Syntax Tree, you have the whole world of
7522 Python at your fingertips, in Lisp form.")
7523 (license license:expat)))
7525 (define-public python2-hy
7526 (package-with-python2 python-hy))
7528 (define-public python2-functools32
7530 (name "python2-functools32")
7535 (uri (pypi-uri "functools32" version))
7538 "0v8ya0b58x47wp216n1zamimv4iw57cxz3xxhzix52jkw3xks9gn"))))
7539 (build-system python-build-system)
7541 `(#:python ,python-2
7542 #:tests? #f)) ; no test target
7543 (home-page "https://github.com/MiCHiLU/python-functools32")
7545 "Backport of the functools module from Python 3.2.3")
7547 "This package is a backport of the @code{functools} module from Python
7548 3.2.3 for use with older versions of Python and PyPy.")
7549 (license license:expat)))
7551 (define-public python2-subprocess32
7553 (name "python2-subprocess32")
7557 (uri (pypi-uri "subprocess32" version))
7560 "14350dhhlhyz5gqzi3lihn9m6lvskx5mcb20srx1kgsk9i50li8y"))
7562 (search-patches "python2-subprocess32-disable-input-test.patch"))))
7563 (build-system python-build-system)
7565 `(#:python ,python-2
7566 ;; The test suite fails with Python > 2.7.13:
7567 ;; import test.support
7568 ;; ImportError: No module named support
7571 (modify-phases %standard-phases
7572 (add-after 'unpack 'patch-/bin/sh
7574 (substitute* '("subprocess32.py"
7575 "test_subprocess32.py")
7576 (("/bin/sh") (which "sh")))
7578 (home-page "https://github.com/google/python-subprocess32")
7579 (synopsis "Backport of the subprocess module from Python 3.2")
7581 "This is a backport of the @code{subprocess} standard library module
7582 from Python 3.2 and 3.3 for use on Python 2. It includes bugfixes and some
7583 new features. On POSIX systems it is guaranteed to be reliable when used
7584 in threaded applications. It includes timeout support from Python 3.3 but
7585 otherwise matches 3.2’s API.")
7586 (license license:psfl)))
7588 (define-public python2-futures
7590 (name "python2-futures")
7595 (uri (pypi-uri "futures" version))
7598 "1pw1z4329xvlabdpwqa6b7v2fxf7hl64m4cgr22ckbym8m8m4hh5"))))
7599 (build-system python-build-system)
7600 (arguments `(#:python ,python-2))
7601 (home-page "https://github.com/agronholm/pythonfutures")
7603 "Backport of the concurrent.futures package from Python 3.2")
7605 "The concurrent.futures module provides a high-level interface for
7606 asynchronously executing callables. This package backports the
7607 concurrent.futures package from Python 3.2")
7608 (license license:bsd-3)))
7610 (define-public python-promise
7612 (name "python-promise")
7617 (uri (pypi-uri "promise" version))
7620 "1k19ms8l3d5jzjh557rgkxb5sg4mqgfc315rn4hx1z3n8qq6lr3h"))))
7621 (build-system python-build-system)
7622 ;; Tests wants python-futures, which is a python2 only program, and
7623 ;; can't be found by python-promise at test time.
7624 (arguments `(#:tests? #f))
7625 (home-page "https://github.com/syrusakbary/promise")
7626 (synopsis "Promises/A+ implementation for Python")
7628 "Promises/A+ implementation for Python")
7629 (properties `((python2-variant . ,(delay python2-promise))))
7630 (license license:expat)))
7632 (define-public python2-promise
7633 (let ((promise (package-with-python2
7634 (strip-python2-variant python-promise))))
7635 (package (inherit promise)
7636 (arguments (substitute-keyword-arguments (package-arguments promise)
7639 `(("python2-futures" ,python2-futures)
7640 ("python2-pytest" ,python2-pytest)
7641 ,@(package-native-inputs promise))))))
7643 (define-public python-colorama
7645 (name "python-colorama")
7650 (uri (pypi-uri "colorama" version))
7653 "1wd1szk0z3073ghx26ynw43gnc140ibln1safgsis6s6z3s25ss8"))))
7654 (build-system python-build-system)
7655 (synopsis "Colored terminal text rendering for Python")
7656 (description "Colorama is a Python library for rendering colored terminal
7658 (home-page "https://pypi.python.org/pypi/colorama")
7659 (license license:bsd-3)))
7661 (define-public python2-colorama
7662 (package-with-python2 python-colorama))
7664 (define-public python-rsa
7671 (uri (pypi-uri "rsa" version))
7674 "1dcxvszbikgzh99ybdc7jq0zb9wspy2ds8z9mjsqiyv3q884xpr5"))))
7675 (build-system python-build-system)
7677 `(("python-pyasn1" ,python-pyasn1)))
7678 (synopsis "Pure-Python RSA implementation")
7679 (description "Python-RSA is a pure-Python RSA implementation. It supports
7680 encryption and decryption, signing and verifying signatures, and key
7681 generation according to PKCS#1 version 1.5. It can be used as a Python
7682 library as well as on the command line.")
7683 (home-page "https://stuvel.eu/rsa")
7684 (license license:asl2.0)))
7686 (define-public python2-rsa
7687 (package-with-python2 python-rsa))
7689 (define-public python-pluggy
7691 (name "python-pluggy")
7696 (uri (pypi-uri "pluggy" version))
7699 "1zqckndfn85l1cd8pndw212zg1bq9fkg1nnj32kp2mppppsyg2kz"))))
7700 (build-system python-build-system)
7701 (synopsis "Plugin and hook calling mechanism for Python")
7702 (description "Pluggy is an extraction of the plugin manager as used by
7703 Pytest but stripped of Pytest specific details.")
7704 (home-page "https://pypi.python.org/pypi/pluggy")
7705 (license license:expat)))
7707 (define-public python2-pluggy
7708 (package-with-python2 python-pluggy))
7710 (define-public python-tox
7717 (uri (pypi-uri "tox" version))
7720 "1drp6mwm8wdypjym15ia8lwjxbhcksb9vzxg4ay5dh4ji57by2ny"))))
7721 (build-system python-build-system)
7723 ;; FIXME: Tests require pytest-timeout, which itself requires
7724 ;; pytest>=2.8.0 for installation.
7727 `(("python-pluggy" ,python-pluggy) ; >=0.3.0,<0.4.0
7728 ("python-py" ,python-py)
7729 ("python-virtualenv" ,python-virtualenv)))
7731 `(; FIXME: Missing: ("python-pytest-timeout" ,python-pytest-timeout)
7732 ("python-pytest" ,python-pytest) ; >= 2.3.5
7733 ("python-setuptools-scm" ,python-setuptools-scm)))
7734 (home-page "http://tox.testrun.org/")
7735 (synopsis "Virtualenv-based automation of test activities")
7736 (description "Tox is a generic virtualenv management and test command line
7737 tool. It can be used to check that a package installs correctly with
7738 different Python versions and interpreters, or run tests in each type of
7739 supported environment, or act as a frontend to continuous integration
7741 (license license:expat)))
7743 (define-public python2-tox
7744 (package-with-python2 python-tox))
7746 (define-public python-jmespath
7748 (name "python-jmespath")
7753 (uri (pypi-uri "jmespath" version))
7756 "0r7wc7fsxmlwzxx9j1j7rms06c6xs6d4sysirdhz1jk2mb4x90ba"))))
7757 (build-system python-build-system)
7759 `(("python-nose" ,python-nose)))
7760 (synopsis "JSON Matching Expressions")
7761 (description "JMESPath (pronounced “james path”) is a Python library that
7762 allows one to declaratively specify how to extract elements from a JSON
7764 (home-page "https://github.com/jmespath/jmespath.py")
7765 (license license:expat)))
7767 (define-public python2-jmespath
7768 (package-with-python2 python-jmespath))
7770 (define-public python-botocore
7772 (name "python-botocore")
7777 (uri (pypi-uri "botocore" version))
7780 "12cqpbnz3vfv41mp9admvciw7bc7hz57sjpqs2bxaw9wnfmbw5lg"))))
7781 (build-system python-build-system)
7783 ;; FIXME: Many tests are failing.
7786 `(("python-dateutil" ,python-dateutil)
7787 ("python-docutils" ,python-docutils)
7788 ("python-jmespath" ,python-jmespath)))
7790 `(("python-mock" ,python-mock)
7791 ("python-nose" ,python-nose)
7793 ("python-tox" ,python-tox)
7794 ("python-wheel" ,python-wheel)))
7795 (home-page "https://github.com/boto/botocore")
7796 (synopsis "Low-level interface to AWS")
7797 (description "Botocore is a Python library that provides a low-level
7798 interface to the Amazon Web Services (AWS) API.")
7799 (license license:asl2.0)))
7801 (define-public python2-botocore
7802 (package-with-python2 python-botocore))
7804 (define-public python-xdo
7811 "http://http.debian.net/debian/pool/main/p/python-xdo/"
7812 "python-xdo_" version ".orig.tar.gz"))
7815 "1vqh1n5yy5dhnq312kwrl90fnck4v26is3lq3lxdvcn60vv19da0"))))
7816 (build-system python-build-system)
7819 (modify-phases %standard-phases
7820 (add-before 'install 'patch-libxdo-path
7821 ;; Hardcode the path of dynamically loaded libxdo library.
7822 (lambda* (#:key inputs #:allow-other-keys)
7823 (let ((libxdo (string-append
7824 (assoc-ref inputs "xdotool")
7826 (substitute* "xdo/_xdo.py"
7827 (("find_library\\(\"xdo\"\\)")
7828 (simple-format #f "\"~a\"" libxdo)))
7830 #:tests? #f)) ; no tests provided
7832 `(("python-six" ,python-six)))
7834 `(("xdotool" ,xdotool)
7835 ("libX11" ,libx11)))
7836 (home-page "https://tracker.debian.org/pkg/python-xdo")
7837 (synopsis "Python library for simulating X11 keyboard/mouse input")
7838 (description "Provides bindings to libxdo for manipulating X11 via simulated
7839 input. (Note that this is mostly a legacy library; you may wish to look at
7840 python-xdo for newer bindings.)")
7841 (license license:bsd-3)))
7843 (define-public python2-xdo
7844 (package-with-python2 python-xdo))
7846 (define-public python-mako
7848 (name "python-mako")
7853 (uri (pypi-uri "Mako" version))
7856 "03dyxgjknp4ffsv7vwfd28l5bbpzi0ylp20543wpg3iahyyrwma8"))))
7857 (build-system python-build-system)
7859 `(("python-markupsafe" ,python-markupsafe)))
7861 `(("python-mock" ,python-mock)
7862 ("python-nose" ,python-nose)
7863 ("python-pytest" ,python-pytest)))
7864 (home-page "http://www.makotemplates.org/")
7865 (synopsis "Templating language for Python")
7866 (description "Mako is a templating language for Python that compiles
7867 templates into Python modules.")
7868 (license license:expat)))
7870 (define-public python2-mako
7871 (package-with-python2 python-mako))
7873 (define-public python-waitress
7875 (name "python-waitress")
7880 (uri (pypi-uri "waitress" version))
7881 (patches (search-patches "python-waitress-fix-tests.patch"))
7884 "1a85gyji0kajc3p0s1pwwfm06w4wfxjkvvl4rnrz3h164kbd6g6k"))))
7885 (build-system python-build-system)
7886 (home-page "https://github.com/Pylons/waitress")
7887 (synopsis "Waitress WSGI server")
7888 (description "Waitress is meant to be a production-quality pure-Python WSGI
7889 server with very acceptable performance.")
7890 (license license:zpl2.1)))
7892 (define-public python2-waitress
7893 (package-with-python2 python-waitress))
7895 (define-public python-pyquery
7897 (name "python-pyquery")
7902 (uri (pypi-uri "pyquery" version))
7905 "1xia20wm0vx5dk85kcwgh13bylz8qh47ffjxssd2586r60xi783a"))))
7906 (build-system python-build-system)
7908 `(("python-webob" ,python-webob)
7909 ("python-webtest" ,python-webtest)))
7911 `(("python-lxml" ,python-lxml)
7912 ("python-cssselect" ,python-cssselect)))
7913 (home-page "https://github.com/gawel/pyquery")
7914 (synopsis "Make jQuery-like queries on xml documents")
7915 (description "pyquery allows you to make jQuery queries on xml documents.
7916 The API is as much as possible the similar to jQuery. pyquery uses lxml for
7917 fast xml and html manipulation.")
7918 (license license:bsd-3)))
7920 (define-public python2-pyquery
7921 (package-with-python2 python-pyquery))
7923 (define-public python-anyjson
7925 (name "python-anyjson")
7930 (uri (pypi-uri "anyjson" version))
7933 "1fjph4alvcscsl5d4b6qpv1yh31jy05jxi1l0xff7lws7j32v09p"))))
7934 (build-system python-build-system)
7936 `(;; We could possibly get tests working, but on Python 3 it's not so easy.
7937 ;; Very strangely, 2to3 is run *during setup.py install* (or bdist, or
7938 ;; whatever) so this transformation needs to be done before the tests
7939 ;; can be run. Maybe we could add a build step to transform beforehand
7940 ;; but it could be annoying/difficult.
7941 ;; We can enable tests for the Python 2 version, though, and do below.
7943 (home-page "https://bitbucket.org/runeh/anyjson/")
7945 "Wraps best available JSON implementation in a common interface")
7947 "Anyjson loads whichever is the fastest JSON module installed
7948 and provides a uniform API regardless of which JSON implementation is used.")
7949 (license license:bsd-3)
7950 (properties `((python2-variant . ,(delay python2-anyjson))))))
7952 (define-public python2-anyjson
7953 (let ((anyjson (package-with-python2
7954 (strip-python2-variant python-anyjson))))
7957 (arguments `(;; Unlike the python 3 variant, we do run tests. See above!
7959 ,@(package-arguments anyjson)))
7960 (native-inputs `(("python2-nose" ,python2-nose))))))
7962 (define-public python-amqp
7964 (name "python-amqp")
7969 (uri (pypi-uri "amqp" version))
7972 "06n6q0kxhjnbfz3vn8x9yz09lwmn1xi9d6wxp31h5jbks0b4vsid"))))
7973 (build-system python-build-system)
7975 `(("python-nose" ,python-nose)
7976 ("python-mock" ,python-mock)))
7977 (home-page "https://github.com/celery/py-amqp")
7979 "Low-level AMQP client for Python (fork of amqplib)")
7981 "This is a fork of amqplib which was originally written by Barry Pederson.
7982 It is maintained by the Celery project, and used by kombu as a pure python
7983 alternative when librabbitmq is not available.")
7984 (license license:lgpl2.1+)
7985 (properties `((python2-variant . ,(delay python2-amqp))))))
7987 (define-public python2-amqp
7988 (let ((amqp (package-with-python2
7989 (strip-python2-variant python-amqp))))
7992 (arguments `(;; Tries to run coverage tests with nose-cover3, which seems
7993 ;; unmaintained. Weirdly, does not do this on the python 3
7996 ,@(package-arguments amqp))))))
7998 (define-public python-txamqp
8000 (name "python-txamqp")
8005 (uri (pypi-uri "txAMQP" version))
8008 "1r43a66dd547mz40ikymm8y3d480cidy560fj81qc0jk4lncgmmr"))))
8009 (build-system python-build-system)
8011 `(("python-six" ,python-six)
8012 ("python-twisted" ,python-twisted)))
8013 (home-page "https://github.com/txamqp/txamqp")
8014 (synopsis "Communicate with AMQP peers and brokers using Twisted")
8016 "This package provides a Python library for communicating with AMQP peers
8017 and brokers using the asynchronous networking framework Twisted. It contains
8018 all the necessary code to connect, send and receive messages to/from an
8019 AMQP-compliant peer or broker (Qpid, OpenAMQ, RabbitMQ) using Twisted. It
8020 also includes support for using Thrift RPC over AMQP in Twisted
8022 (license license:asl2.0)))
8024 (define-public python2-txamqp
8025 (package-with-python2 python-txamqp))
8027 (define-public python-kombu
8029 (name "python-kombu")
8034 (uri (pypi-uri "kombu" version))
8037 "0l16chb314gpq2v7fh94a22c30lcv6w3ylmhsa60bldlcq6a0r70"))))
8038 (build-system python-build-system)
8040 `(("python-mock" ,python-mock)
8041 ("python-nose" ,python-nose)))
8043 `(("python-anyjson" ,python-anyjson)
8044 ("python-amqp" ,python-amqp)
8045 ("python-redis" ,python-redis)))
8046 (home-page "http://kombu.readthedocs.org")
8047 (synopsis "Message passing library for Python")
8048 (description "The aim of Kombu is to make messaging in Python as easy as
8049 possible by providing an idiomatic high-level interface for the AMQ protocol,
8050 and also provide proven and tested solutions to common messaging problems.
8051 AMQP is the Advanced Message Queuing Protocol, an open standard protocol for
8052 message orientation, queuing, routing, reliability and security, for which the
8053 RabbitMQ messaging server is the most popular implementation.")
8054 (license license:bsd-3)
8055 (properties `((python2-variant . ,(delay python2-kombu))))))
8057 (define-public python2-kombu
8058 (let ((kombu (package-with-python2
8059 (strip-python2-variant python-kombu))))
8062 (arguments `(;; FIXME: 'TestTransport.test_del_sync' fails on python2.
8063 ;; It works fine on the python3 variant.
8065 ,@(package-arguments kombu)))
8066 (native-inputs `(("python2-unittest2" ,python2-unittest2)
8067 ,@(package-native-inputs kombu))))))
8069 (define-public python-billiard
8071 (name "python-billiard")
8072 (version "3.3.0.23")
8076 (uri (pypi-uri "billiard" version))
8079 "02wxsc6bhqvzh8j6w758kvgqbnj14l796mvmrcms8fgfamd2lak9"))))
8080 (build-system python-build-system)
8082 `(("python-nose" ,python-nose)))
8083 (home-page "https://github.com/celery/billiard")
8085 "Python multiprocessing fork with improvements and bugfixes")
8087 "Billiard is a fork of the Python 2.7 multiprocessing package. The
8088 multiprocessing package itself is a renamed and updated version of R Oudkerk's
8089 pyprocessing package. This standalone variant is intended to be compatible with
8090 Python 2.4 and 2.5, and will draw its fixes/improvements from python-trunk.")
8091 (license license:bsd-3)
8092 (properties `((python2-variant . ,(delay python2-billiard))))))
8094 (define-public python2-billiard
8095 (let ((billiard (package-with-python2
8096 (strip-python2-variant python-billiard))))
8099 (native-inputs `(("python2-unittest2" ,python2-unittest2)
8100 ("python2-mock" ,python2-mock)
8101 ,@(package-native-inputs billiard))))))
8103 (define-public python-celery
8105 (name "python-celery")
8110 (uri (pypi-uri "celery" version))
8113 "0yh2prhdnx2dgkb67a5drj12hh2zvzx5f611p7mqqg01ydghif4r"))))
8114 (build-system python-build-system)
8117 (modify-phases %standard-phases
8118 ;; These tests break with Python 3.5:
8119 ;; https://github.com/celery/celery/issues/2897#issuecomment-253066295
8123 (system* "nosetests" "--exclude=^test_safe_to_remove.*")))))))
8125 `(("python-nose" ,python-nose)))
8127 `(("python-pytz" ,python-pytz)
8128 ("python-billiard" ,python-billiard)
8129 ("python-kombu" ,python-kombu)))
8130 (home-page "http://celeryproject.org")
8131 (synopsis "Distributed Task Queue")
8132 (description "Celery is an asynchronous task queue/job queue based on
8133 distributed message passing. It is focused on real-time operation, but
8134 supports scheduling as well. The execution units, called tasks, are executed
8135 concurrently on a single or more worker servers using multiprocessing,
8136 Eventlet, or gevent. Tasks can execute asynchronously (in the background) or
8137 synchronously (wait until ready).")
8138 (license license:bsd-3)
8139 (properties `((python2-variant . ,(delay python2-celery))))))
8141 (define-public python2-celery
8142 (let ((celery (package-with-python2
8143 (strip-python2-variant python-celery))))
8146 (native-inputs `(("python2-unittest2" ,python2-unittest2)
8147 ("python2-mock" ,python2-mock)
8148 ,@(package-native-inputs celery))))))
8150 (define-public python-translitcodec
8152 (name "python-translitcodec")
8157 (uri (pypi-uri "translitcodec" version))
8160 "10x6pvblkzky1zhjs8nmx64nb9jdzxad4bxhq4iwv0j4z2aqjnki"))))
8161 (build-system python-build-system)
8163 `(#:tests? #f)) ; no tests provided
8165 "https://github.com/claudep/translitcodec")
8167 "Unicode to 8-bit charset transliteration codec")
8169 "This package contains codecs for transliterating ISO 10646 texts into
8170 best-effort representations using smaller coded character sets (ASCII,
8172 (license license:expat)))
8174 (define-public python2-translitcodec
8175 (package-with-python2 python-translitcodec))
8177 (define-public python-editor
8179 (name "python-editor")
8184 (uri (pypi-uri "python-editor" version))
8187 "1ypnpgvzpkbwsg4rdvy4sy51j28b5xq9v8pnkwxncn07vqz06p7n"))))
8188 (build-system python-build-system)
8190 "https://github.com/fmoo/python-editor")
8192 "Programmatically open an editor, capture the result")
8194 "python-editor is a library that provides the editor module for
8195 programmatically interfacing with your system's $EDITOR.")
8196 (license license:asl2.0)))
8198 (define-public python2-editor
8199 (package-with-python2 python-editor))
8201 (define-public python-sphinxcontrib-programoutput
8203 (name "python-sphinxcontrib-programoutput")
8207 (uri (pypi-uri "sphinxcontrib-programoutput" version))
8210 "153hhnlbx4688zj9wd64819ps5znc2jlyp5crkgzvn5hxgy99vpx"))))
8211 (build-system python-build-system)
8213 ;; FIXME: Many tests are failing and the upstream is gone.
8216 `(("python-sphinx" ,python-sphinx)))
8217 (synopsis "Sphinx extension to include program output")
8218 (description "A Sphinx extension to literally insert the output of arbitrary
8219 commands into documents, helping you to keep your command examples up to date.")
8220 (home-page "https://github.com/lunaryorn/sphinxcontrib-programoutput")
8221 (license license:bsd-2)))
8223 (define-public python2-sphinxcontrib-programoutput
8224 (package-with-python2 python-sphinxcontrib-programoutput))
8226 (define-public python-sphinx-repoze-autointerface
8228 (name "python-sphinx-repoze-autointerface")
8232 (uri (pypi-uri "repoze.sphinx.autointerface" version))
8235 "08ycivzf7bh4a1zcyp31hbyqs1b2c9r26raa3vxjwwmbfqr3iw4f"))))
8236 (build-system python-build-system)
8237 (arguments '(#:tests? #f)) ; No tests.
8239 `(("python-sphinx" ,python-sphinx)
8240 ("python-zope-interface" ,python-zope-interface)))
8241 (synopsis "Auto-generate Sphinx API docs from Zope interfaces")
8242 (description "This package defines an extension for the Sphinx documentation
8243 system. The extension allows generation of API documentation by
8244 introspection of @code{zope.interface} instances in code.")
8245 (home-page "https://github.com/repoze/repoze.sphinx.autointerface")
8246 (license license:repoze)))
8248 (define-public python2-sphinx-repoze-autointerface
8249 (package-with-python2 python-sphinx-repoze-autointerface))
8251 (define-public python-vobject
8253 (name "python-vobject")
8257 (uri (pypi-uri "vobject" version))
8260 "0hqjgf3ay1m5w1c0k00g5yfpdz1zni5qnr5rh9b8fg9hjvhwlmhg"))))
8261 (build-system python-build-system)
8263 '(;; The test suite relies on some non-portable Windows interfaces.
8266 `(("python-dateutil" ,python-dateutil)
8267 ("python-pyicu" ,python-pyicu)))
8268 (synopsis "Parse and generate vCard and vCalendar files")
8269 (description "Vobject is intended to be a full featured Python package for
8270 parsing and generating vCard and vCalendar files. Currently, iCalendar files
8271 are supported and well tested. vCard 3.0 files are supported, and all data
8272 should be imported, but only a few components are understood in a sophisticated
8274 (home-page "http://eventable.github.io/vobject/")
8275 (license license:asl2.0)))
8277 (define-public python2-vobject
8278 (package-with-python2 python-vobject))
8280 (define-public python-munkres
8282 (name "python-munkres")
8286 (uri (pypi-uri "munkres" version))
8289 "0mbspx4zv8id4x6pim6ybsa1xh96qwpbqj7skbqz4c9c9nf1lpqq"))))
8290 (build-system python-build-system)
8292 '(#:tests? #f)) ; no test suite
8293 (home-page "http://software.clapper.org/munkres/")
8294 (synopsis "Implementation of the Munkres algorithm")
8295 (description "The Munkres module provides an implementation of the Munkres
8296 algorithm (also called the Hungarian algorithm or the Kuhn-Munkres algorithm),
8297 useful for solving the Assignment Problem.")
8298 (license license:bsd-3)))
8300 (define-public python2-munkres
8301 (package-with-python2 python-munkres))
8303 (define-public python-whoosh
8305 (name "python-whoosh")
8310 (uri (pypi-uri "Whoosh" version))
8313 "10qsqdjpbc85fykc1vgcs8xwbgn4l2l52c8d83xf1q59pwyn79bw"))))
8314 (build-system python-build-system)
8316 `(("python-pytest" ,python-pytest)))
8317 (home-page "https://bitbucket.org/mchaput/whoosh")
8318 (synopsis "Full text indexing, search, and spell checking library")
8320 "Whoosh is a fast, pure-Python full text indexing, search, and spell
8322 (license license:bsd-2)))
8324 (define-public python2-whoosh
8325 (let ((whoosh (package-with-python2 (strip-python2-variant python-whoosh))))
8326 (package (inherit whoosh)
8328 `(("python2-backport-ssl-match-hostname"
8329 ,python2-backport-ssl-match-hostname)
8330 ,@(package-propagated-inputs whoosh))))))
8332 (define-public python-pathlib
8334 (name "python-pathlib")
8338 (uri (pypi-uri "pathlib" version))
8341 "17zajiw4mjbkkv6ahp3xf025qglkj0805m9s41c45zryzj6p2h39"))))
8342 (build-system python-build-system)
8343 ;; The tests depend on the internal "test" module, which does not provide
8344 ;; a stable interface.
8345 (arguments `(#:tests? #f))
8346 (home-page "https://pathlib.readthedocs.org/")
8347 (synopsis "Object-oriented file system paths")
8348 (description "Pathlib offers a set of classes to handle file system paths.
8349 It offers the following advantages over using string objects:
8352 @item No more cumbersome use of os and os.path functions. Everything can
8353 be done easily through operators, attribute accesses, and method calls.
8354 @item Embodies the semantics of different path types. For example,
8355 comparing Windows paths ignores casing.
8356 @item Well-defined semantics, eliminating any inconsistencies or
8357 ambiguities (forward vs. backward slashes, etc.).
8360 Note: In Python 3.4, pathlib is now part of the standard library. For other
8361 Python versions please consider python-pathlib2 instead, which tracks the
8362 standard library module. This module (python-pathlib) isn't maintained
8364 (license license:expat)))
8366 (define-public python2-pathlib
8367 (package-with-python2 python-pathlib))
8369 (define-public python2-pathlib2
8371 (name "python2-pathlib2")
8375 (uri (pypi-uri "pathlib2" version))
8378 "10yb0iv5x2hs631rcppkhbddx799d3h8pcwmkbh2a66ns3w71ccf"))))
8379 (build-system python-build-system)
8380 ;; We only need the the Python 2 variant, since for Python 3 our minimum
8381 ;; version is 3.4 which already includes this package as part of the
8382 ;; standard library.
8384 `(#:python ,python-2))
8386 `(("python2-scandir" ,python2-scandir)
8387 ("python2-six" ,python2-six)))
8388 (home-page "https://pypi.python.org/pypi/pathlib2/")
8389 (synopsis "Object-oriented file system paths - backport of standard
8391 (description "The goal of pathlib2 is to provide a backport of standard
8392 pathlib module which tracks the standard library module, so all the newest
8393 features of the standard pathlib can be used also on older Python versions.
8395 Pathlib offers a set of classes to handle file system paths. It offers the
8396 following advantages over using string objects:
8399 @item No more cumbersome use of os and os.path functions. Everything can
8400 be done easily through operators, attribute accesses, and method calls.
8401 @item Embodies the semantics of different path types. For example,
8402 comparing Windows paths ignores casing.
8403 @item Well-defined semantics, eliminating any inconsistencies or
8404 ambiguities (forward vs. backward slashes, etc.).
8406 (license license:expat)))
8408 (define-public python-jellyfish
8410 (name "python-jellyfish")
8414 (uri (pypi-uri "jellyfish" version))
8417 "1j9rplb16ba2prjj6mip46z0w9pnhnqpwgiwi0x93vnas14rlyl8"))))
8418 (build-system python-build-system)
8420 `(("python-pytest" ,python-pytest)))
8421 (home-page "https://github.com/jamesturk/jellyfish")
8422 (synopsis "Approximate and phonetic matching of strings")
8423 (description "Jellyfish uses a variety of string comparison and phonetic
8424 encoding algorithms to do fuzzy string matching.")
8425 (license license:bsd-2)
8426 (properties `((python2-variant . ,(delay python2-jellyfish))))))
8428 (define-public python2-jellyfish
8429 (let ((jellyfish (package-with-python2
8430 (strip-python2-variant python-jellyfish))))
8431 (package (inherit jellyfish)
8432 (native-inputs `(("python2-unicodecsv" ,python2-unicodecsv)
8433 ,@(package-native-inputs jellyfish))))))
8435 (define-public python2-unicodecsv
8437 (name "python2-unicodecsv")
8441 ;; The test suite is not included in the PyPi release.
8442 ;; https://github.com/jdunck/python-unicodecsv/issues/19
8443 (uri (string-append "https://github.com/jdunck/python-unicodecsv/"
8444 "archive/" version ".tar.gz"))
8445 (file-name (string-append name "-" version ".tar.gz"))
8448 "087nqanfcyp6mlfbbr5lva5f3w6iz1bybls9xlrb8icmc474wh4w"))))
8449 (build-system python-build-system)
8451 `(;; It supports Python 3, but Python 3 can already do Unicode CSV.
8452 #:python ,python-2))
8454 `(("python2-unittest2" ,python2-unittest2)))
8455 (home-page "https://github.com/jdunck/python-unicodecsv")
8456 (synopsis "Unicode CSV module for Python 2")
8457 (description "Unicodecsv is a drop-in replacement for Python 2.7's CSV
8458 module, adding support for Unicode strings.")
8459 (license license:bsd-2)))
8461 (define-public python-rarfile
8463 (name "python-rarfile")
8467 (uri (pypi-uri "rarfile" version))
8470 "0qfad483kcbga0bn4qmcz953xjk16r52fahiy46zzn56v80y89ra"))))
8471 (build-system python-build-system)
8474 (modify-phases %standard-phases
8476 ;; Many tests fail, but the installation proceeds.
8477 (lambda _ (zero? (system* "make" "-C" "test" "test")))))))
8479 `(("which" ,which))) ; required for tests
8481 `(("libarchive" ,libarchive)))
8482 (home-page "https://github.com/markokr/rarfile")
8483 (synopsis "RAR archive reader for Python")
8484 (description "This is Python module for RAR archive reading. The interface
8485 is made as zipfile like as possible.")
8486 (license license:isc)))
8488 (define-public python2-rarfile
8489 (package-with-python2 python-rarfile))
8491 (define-public python-magic
8493 (name "python-magic")
8498 (uri (pypi-uri "python-magic" version))
8501 "1mgwig9pnzgkf86q9ji9pnc99bngms15lfszq5rgqb9db07mqxpk"))
8502 (file-name (string-append name "-" version "-checkout"))))
8503 (build-system python-build-system)
8505 ;; The tests are unreliable, so don't run them. The tests fail
8506 ;; under Python3 because they were written for Python2 and
8507 ;; contain import statements that do not work in Python3. One of
8508 ;; the tests fails under Python2 because its assertions are
8509 ;; overly stringent; it relies on comparing output strings which
8510 ;; are brittle and can change depending on the version of
8511 ;; libmagic being used and the system on which the test is
8512 ;; running. In my case, under GuixSD 0.10.0, only one test
8513 ;; failed, and it seems to have failed only because the version
8514 ;; of libmagic that is packaged in Guix outputs a slightly
8515 ;; different (but not wrong) string than the one that the test
8518 #:phases (modify-phases %standard-phases
8519 ;; Replace a specific method call with a hard-coded
8520 ;; path to the necessary libmagic.so file in the
8521 ;; store. If we don't do this, then the method call
8522 ;; will fail to find the libmagic.so file, which in
8523 ;; turn will cause any application using
8524 ;; python-magic to fail.
8525 (add-before 'build 'hard-code-path-to-libmagic
8526 (lambda* (#:key inputs #:allow-other-keys)
8527 (let ((file (assoc-ref inputs "file")))
8528 (substitute* "magic.py"
8529 (("ctypes.util.find_library\\('magic'\\)")
8530 (string-append "'" file "/lib/libmagic.so'")))
8532 (add-before 'install 'disable-egg-compression
8534 (let ((port (open-file "setup.cfg" "a")))
8535 (display "\n[easy_install]\nzip_ok = 0\n"
8540 ;; python-magic needs to be able to find libmagic.so.
8543 "https://github.com/ahupp/python-magic")
8545 "File type identification using libmagic")
8547 "This module uses ctypes to access the libmagic file type
8548 identification library. It makes use of the local magic database and
8549 supports both textual and MIME-type output. Note that this module and
8550 the python-file module both provide a \"magic.py\" file; these two
8551 modules, which are different and were developed separately, both serve
8552 the same purpose: to provide Python bindings for libmagic.")
8553 (license license:expat)))
8555 (define-public python2-magic
8556 (package-with-python2 python-magic))
8558 (define-public python2-s3cmd
8560 (name "python2-s3cmd")
8565 (uri (string-append "mirror://sourceforge/s3tools/s3cmd/" version "/"
8566 "s3cmd-" version ".tar.gz"))
8569 "0ki1rzhm5icvi9ry5jswi4b22yqwyj0d2wsqsgilwx6qhi7pjxa6"))))
8570 (build-system python-build-system)
8572 ;; s3cmd is written for python2 only and contains no tests.
8573 `(#:python ,python-2
8576 `(("python2-dateutil" ,python2-dateutil)
8577 ;; The python-file package also provides a magic.py module.
8578 ;; This is an unfortunate state of affairs; however, s3cmd
8579 ;; fails to install if it cannot find specifically the
8580 ;; python-magic package. Thus we include it, instead of using
8581 ;; python-file. Ironically, s3cmd sometimes works better
8582 ;; without libmagic bindings at all:
8583 ;; https://github.com/s3tools/s3cmd/issues/198
8584 ("python2-magic" ,python2-magic)))
8585 (home-page "http://s3tools.org/s3cmd")
8586 (synopsis "Command line tool for S3-compatible storage services")
8588 "S3cmd is a command line tool for uploading, retrieving and managing data
8589 in storage services that are compatible with the Amazon Simple Storage
8590 Service (S3) protocol, including S3 itself. It supports rsync-like backup,
8591 GnuPG encryption, and more. It also supports management of Amazon's
8592 CloudFront content delivery network.")
8593 (license license:gpl2+)))
8595 (define-public python-pkgconfig
8597 (name "python-pkgconfig")
8602 (uri (pypi-uri "pkgconfig" version))
8605 "1pw0kmvc57sjmaxi6c54fqsnihqj6hvhc9y1vaz36axafzqam7bh"))))
8606 (build-system python-build-system)
8608 `(("python-nose" ,python-nose)))
8610 `(("pkg-config" ,pkg-config)))
8612 `(;; Tests fail with "ValueError: _type_ 'v' not supported" on Python 3,
8613 ;; and on Python 2 they need the dl module deprecated since Python 2.6.
8615 ;; Hard-code the path to pkg-config.
8617 (modify-phases %standard-phases
8621 (substitute* "pkgconfig/pkgconfig.py"
8622 (("cmd = 'pkg-config")
8623 (string-append "cmd = '" (which "pkg-config"))))
8625 (home-page "https://github.com/matze/pkgconfig")
8626 (synopsis "Python interface for pkg-config")
8627 (description "This module provides a Python interface to pkg-config. It
8628 can be used to find all pkg-config packages, check if a package exists,
8629 check if a package meets certain version requirements, query CFLAGS and
8630 LDFLAGS and parse the output to build extensions with setup.py.")
8631 (license license:expat)))
8633 (define-public python2-pkgconfig
8634 (package-with-python2 python-pkgconfig))
8636 (define-public python-bz2file
8638 (name "python-bz2file")
8643 (uri (pypi-uri "bz2file" version))
8646 "126s53fkpx04f33a829yqqk8fj4png3qwg4m66cvlmhmwc8zihb4"))))
8647 (build-system python-build-system)
8649 `(#:tests? #f)) ; Tests use deprecated python modules.
8650 (home-page "https://github.com/nvawda/bz2file")
8651 (synopsis "Read and write bzip2-compressed files")
8653 "Bz2file is a Python library for reading and writing bzip2-compressed
8654 files. It contains a drop-in replacement for the I/O interface in the
8655 standard library's @code{bz2} module, including features from the latest
8656 development version of CPython that are not available in older releases.")
8657 (license license:asl2.0)
8658 (properties `((python2-variant . ,(delay python2-bz2file))))))
8660 (define-public python2-bz2file
8661 (let ((base (package-with-python2
8662 (strip-python2-variant python-bz2file))))
8666 `(#:python ,python-2
8668 (modify-phases %standard-phases
8669 ;; 'python setup.py test' does not work as of 0.98.
8670 ;; There is only the one test file, so we run it directly.
8672 (lambda _ (zero? (system* "python"
8673 "test_bz2file.py"))))))))))
8675 (define-public python-future
8677 (name "python-future")
8682 (uri (pypi-uri "future" version))
8685 "1nzy1k4m9966sikp0qka7lirh8sqrsyainyf8rk97db7nwdfv773"))))
8686 (build-system python-build-system)
8687 ;; Many tests connect to the network or are otherwise flawed.
8688 ;; https://github.com/PythonCharmers/python-future/issues/210
8691 (home-page "http://python-future.org")
8692 (synopsis "Single-source support for Python 3 and 2")
8694 "@code{python-future} is the missing compatibility layer between Python 2 and
8695 Python 3. It allows you to use a single, clean Python 3.x-compatible codebase
8696 to support both Python 2 and Python 3 with minimal overhead.")
8697 (license license:expat)))
8699 (define-public python2-future
8700 (package-with-python2 python-future))
8702 (define-public python-cysignals
8704 (name "python-cysignals")
8709 (uri (pypi-uri "cysignals" version ".tar.bz2"))
8712 "14cbyd9znlz6cxy1s3g6v6dv5jj45hn27pywkidd9b1zanaysqc6"))))
8713 (build-system python-build-system)
8715 `(("python-cython" ,python-cython)
8716 ("python-sphinx" ,python-sphinx)))
8718 `(("pari-gp" ,pari-gp)))
8720 `(#:modules ((guix build python-build-system)
8721 ((guix build gnu-build-system) #:prefix gnu:)
8723 ;; FIXME: Tests are executed after installation and currently fail
8724 ;; when not installing into standard locations; the author is working
8728 (modify-phases %standard-phases
8731 (assoc-ref gnu:%standard-phases 'configure)))))
8733 "https://github.com/sagemath/cysignals")
8735 "Handling of interrupts and signals for Cython")
8737 "The cysignals package provides mechanisms to handle interrupts (and
8738 other signals and errors) in Cython code, using two related approaches,
8739 for mixed Cython/Python code or external C libraries and pure Cython code,
8741 (license license:lgpl3+)))
8743 (define-public python2-cysignals
8744 (package-with-python2 python-cysignals))
8746 (define-public python2-shedskin
8748 (name "python2-shedskin")
8753 (uri (string-append "https://github.com/shedskin/shedskin/"
8754 "releases/download/v" version
8755 "/shedskin-" version ".tgz"))
8758 "0nzwrzgw1ga8rw6f0ryq7zr9kkiavd1cqz5hzxkcbicl1dk7kz41"))))
8759 (build-system python-build-system)
8761 `(#:python ,python-2
8762 #:phases (modify-phases %standard-phases
8763 (add-after 'unpack 'fix-resulting-include-libs
8764 (lambda* (#:key inputs #:allow-other-keys)
8765 (let ((libgc (assoc-ref inputs "libgc"))
8766 (pcre (assoc-ref inputs "pcre")))
8767 (substitute* "shedskin/makefile.py"
8768 (("variable == 'CCFLAGS':[ ]*")
8769 (string-append "variable == 'CCFLAGS':\n"
8770 " line += ' -I " pcre "/include"
8771 " -I " libgc "/include'"))
8772 (("variable == 'LFLAGS':[ ]*")
8773 (string-append "variable == 'LFLAGS':\n"
8774 " line += ' -L" pcre "/lib"
8775 " -L " libgc "/lib'")))
8777 (inputs `(("pcre" ,pcre)
8779 (home-page "https://shedskin.github.io/")
8780 (synopsis "Experimental Python-2 to C++ Compiler")
8781 (description (string-append "This is an experimental compiler for a subset of
8782 Python. It generates C++ code and a Makefile."))
8783 (license (list license:gpl3 license:bsd-3 license:expat))))
8785 (define-public python2-rope
8787 (name "python2-rope")
8792 (uri (pypi-uri "rope" version))
8795 "18k5znhpwvrfck3yp0jmhd5j8r0f0s8bk1zh5yhs2cfgmfhbwigb"))))
8797 ;; Rope is currently python-2 only.
8798 ;; https://github.com/python-rope/rope/issues/57
8799 `(#:python ,python-2))
8800 (build-system python-build-system)
8802 `(("python2-unittest2" ,python2-unittest2)))
8803 (home-page "https://github.com/python-rope/rope")
8804 (synopsis "Refactoring library for Python")
8805 (description "Rope is a refactoring library for Python. It facilitates
8806 the renaming, moving and extracting of attributes, functions, modules, fields
8807 and parameters in Python 2 source code. These refactorings can also be applied
8808 to occurrences in strings and comments.")
8809 (license license:gpl2)))
8811 (define-public python-py3status
8813 (name "python-py3status")
8818 (uri (pypi-uri "py3status" version))
8821 "0shxcfz4wcczj0mhwp4w0dvwd2fdd9bgprq8slim1519iiqzgwhq"))))
8822 (build-system python-build-system)
8827 (modify-phases %standard-phases
8828 ;; 'file' is used for detection of configuration file encoding
8829 ;; let's make link the dependency to particular input
8830 (add-before 'build 'patch-file-path
8831 (lambda* (#:key inputs #:allow-other-keys)
8832 (let ((file-path (assoc-ref inputs "file")))
8833 (substitute* "py3status/parse_config.py"
8834 (("\\['file', '-b'")
8835 (string-append "['" file-path "/bin/file', '-b'")))
8837 #:tests? #f)) ; TODO: Requires many libraries not in Guix.
8838 (home-page "https://github.com/ultrabug/py3status")
8839 (synopsis "Extensible i3status wrapper written in Python")
8840 (description "py3status is an i3status wrapper which extends i3status
8841 functionality in a modular way, allowing you to extend your panel with your
8842 own code, responding to click events and updating clock every second.")
8843 (license license:bsd-3)))
8845 (define-public python-tblib
8847 (name "python-tblib")
8851 (uri (pypi-uri "tblib" version))
8853 "1rsg8h069kqgncyv8fgzyj6qflk6j10cb78pa5jk34ixwq044vj3"))))
8854 (build-system python-build-system)
8857 (modify-phases %standard-phases
8860 ;; Upstream runs tests after installation and the package itself
8861 ;; resides in a subdirectory. Extend PYTHONPATH so it will be
8863 (setenv "PYTHONPATH"
8864 (string-append (getcwd) "/build/lib:"
8865 (getenv "PYTHONPATH")))
8866 (zero? (system* "py.test" "-vv" "tests" "README.rst")))))))
8868 `(("python-pytest" ,python-pytest)
8869 ("python-six" ,python-six)))
8870 (home-page "https://github.com/ionelmc/python-tblib")
8871 (synopsis "Traceback serialization library")
8873 "Traceback serialization allows you to:
8876 @item Pickle tracebacks and raise exceptions with pickled tracebacks in
8877 different processes. This allows better error handling when running code over
8878 multiple processes (imagine multiprocessing, billiard, futures, celery etc).
8880 @item Parse traceback strings and raise with the parsed tracebacks.
8882 (license license:bsd-3)))
8884 (define-public python2-tblib
8885 (package-with-python2 python-tblib))
8887 (define-public python-greenlet
8889 (name "python-greenlet")
8893 (uri (pypi-uri "greenlet" version))
8896 "1xhik26j4f3kc4qw9xmj0c567rb5h1zryb4ijwqnqwwjvfhbv59h"))))
8897 (build-system python-build-system)
8898 (home-page "https://greenlet.readthedocs.io/")
8899 (synopsis "Lightweight in-process concurrent programming")
8901 "Greenlet package is a spin-off of Stackless, a version of CPython
8902 that supports micro-threads called \"tasklets\". Tasklets run
8903 pseudo-concurrently (typically in a single or a few OS-level threads) and
8904 are synchronized with data exchanges on \"channels\".")
8905 (license (list license:psfl license:expat))))
8907 (define-public python2-greenlet
8908 (package-with-python2 python-greenlet))
8910 (define-public python-gevent
8912 (name "python-gevent")
8916 (uri (pypi-uri "gevent" version))
8919 "0bbbjvi423y9k9xagrcsimnayaqymg6f2dj76m9z3mjpkjpci4a7"))
8920 (modules '((guix build utils)))
8923 ;; unbunding libev and c-ares
8924 (delete-file-recursively "deps")
8926 (build-system python-build-system)
8928 `(#:modules ((ice-9 ftw)
8931 (guix build python-build-system))
8932 #:phases (modify-phases %standard-phases
8933 (add-after 'unpack 'unpack-libev
8934 (lambda* (#:key inputs #:allow-other-keys)
8935 (mkdir-p "deps/libev")
8936 ;; FIXME: gevent requires building libev, even though
8937 ;; it only links against the proper one.
8938 (invoke "tar" "-xf" (assoc-ref inputs "libev-source")
8939 "--strip-components=1" "-C" "deps/libev")))
8940 (add-before 'patch-source-shebangs 'patch-hard-coded-paths
8942 (substitute* "src/gevent/subprocess.py"
8943 (("/bin/sh") (which "sh")))
8944 (for-each (lambda (file)
8946 (("/bin/sh") (which "sh"))
8947 (("/bin/true") (which "true"))))
8948 (find-files "src/greentest" "\\.py$"))
8950 (add-before 'build 'do-not-use-bundled-sources
8952 (setenv "CONFIG_SHELL" (which "bash"))
8953 (setenv "LIBEV_EMBED" "false")
8954 (setenv "CARES_EMBED" "false")
8955 (setenv "EMBED" "false")
8959 ;; Make sure the build directory is on PYTHONPATH.
8960 (setenv "PYTHONPATH"
8962 (getenv "PYTHONPATH") ":"
8964 (car (scandir "build" (cut string-prefix? "lib." <>)))))
8965 (with-directory-excursion "src/greentest"
8966 ;; XXX: Many tests require network access. Instead we only
8967 ;; run known-good tests. Unfortunately we cannot use
8968 ;; recursion here since this directory also contains
8969 ;; Python-version-specific subfolders.
8970 (apply invoke "python" "testrunner.py" "--config"
8972 (scandir "." (cut regexp-exec
8973 (make-regexp "test_+(subprocess|core)")
8976 `(("python-greenlet" ,python-greenlet)))
8978 `(("libev-source" ,(package-source libev))
8979 ("python-six" ,python-six)))
8981 `(("c-ares" ,c-ares)
8983 (home-page "http://www.gevent.org/")
8984 (synopsis "Coroutine-based network library")
8986 "gevent is a coroutine-based Python networking library that uses greenlet
8987 to provide a high-level synchronous API on top of the libev event loop.")
8988 (license license:expat)))
8990 (define-public python2-gevent
8991 (package-with-python2 python-gevent))
8993 (define-public python-fastimport
8995 (name "python-fastimport")
9000 (uri (pypi-uri "fastimport" version))
9002 (base32 "1aqjsin4rmqm7ln4j0p73fzxifws6c6ikgyhav7r137m2ixsxl43"))))
9003 (build-system python-build-system)
9004 (home-page "https://github.com/jelmer/python-fastimport")
9005 (synopsis "VCS fastimport parser and generator in Python")
9006 (description "This package provides a parser for and generator of the Git
9007 @url{https://www.kernel.org/pub/software/scm/git/docs/git-fast-import.html,fastimport}
9009 (license license:gpl2+)))
9011 (define-public python2-fastimport
9012 (package-with-python2 python-fastimport))
9014 (define-public python-twisted
9016 (name "python-twisted")
9020 (uri (pypi-uri "Twisted" version ".tar.bz2"))
9023 "1p245mg15hkxp7hy5cyq2fgvlgjkb4cg0gwkwd148nzy1bbi3wnv"))))
9024 (build-system python-build-system)
9026 '(#:tests? #f)) ; FIXME: Some tests are failing.
9028 ;; (modify-phases %standard-phases
9031 ;; (zero? (system* "./bin/trial" "twisted")))))
9033 `(("python-zope-interface" ,python-zope-interface)
9034 ("python-incremental" ,python-incremental)
9035 ("python-constantly" ,python-constantly)
9036 ("python-automat" ,python-automat)))
9037 (home-page "https://twistedmatrix.com/")
9038 (synopsis "Asynchronous networking framework written in Python")
9040 "Twisted is an extensible framework for Python programming, with special
9041 focus on event-based network programming and multiprotocol integration.")
9042 (license license:expat)))
9044 (define-public python2-twisted
9045 (package-with-python2 python-twisted))
9047 (define-public python-pika
9049 (name "python-pika")
9054 (uri (pypi-uri "pika" version))
9057 "0nb4h08di432lv7dy2v9kpwgk0w92f24sqc2hw2s9vwr5b8v8xvj"))))
9058 (build-system python-build-system)
9060 `(("python-pyev" ,python-pyev)
9061 ("python-tornado" ,python-tornado)
9062 ("python-twisted" ,python-twisted)))
9063 (home-page "https://pika.readthedocs.org")
9064 (synopsis "Pure Python AMQP Client Library")
9066 "Pika is a pure-Python implementation of the AMQP (Advanced Message Queuing
9067 Protocol) 0-9-1 protocol that tries to stay fairly independent of the underlying
9068 network support library.")
9069 (license license:bsd-3)))
9071 (define-public python2-pika
9072 (package-with-python2 python-pika))
9074 (define-public python-ply
9081 (uri (pypi-uri "ply" version))
9084 "1jxsr1d2f732r6ljhvm827113dckwl6qwakfvpbdhcbhvpvlmscn"))))
9085 (build-system python-build-system)
9086 (home-page "http://www.dabeaz.com/ply/")
9087 (synopsis "Python Lex & Yacc")
9088 (description "PLY is a @code{lex}/@code{yacc} implemented purely in Python.
9089 It uses LR parsing and does extensive error checking.")
9090 (license license:bsd-3)))
9092 (define-public python2-ply
9093 (package-with-python2 python-ply))
9095 (define-public python-tabulate
9097 (name "python-tabulate")
9101 (uri (pypi-uri "tabulate" version))
9104 "1inqhspd4frxnp08c32yndr0lc4px1xfkqah184i5w09gkhvi843"))))
9105 (build-system python-build-system)
9107 ;; FIXME: The pypi release tarball is missing a 'test/common.py'
9108 ;; and the latest release is not tagged in the upstream repository.
9110 (home-page "https://bitbucket.org/astanin/python-tabulate")
9111 (synopsis "Pretty-print tabular data")
9113 "Tabulate is a library and command-line utility to pretty-print tabular
9115 (license license:expat)))
9117 (define-public python2-tabulate
9118 (package-with-python2 python-tabulate))
9120 (define-public python-kazoo
9122 (name "python-kazoo")
9127 (uri (pypi-uri "kazoo" version))
9130 "16y213k7r8shyn2zw1k6lkzjgcrvm441pqv8scvcjixhvpbx3hm7"))))
9131 (build-system python-build-system)
9132 (arguments '(#:tests? #f)) ; XXX: needs zookeeper
9134 `(("python-six" ,python-six)))
9135 (home-page "https://kazoo.readthedocs.org")
9136 (synopsis "High-level Zookeeper client library")
9138 "Kazoo is a Python client library for the Apache Zookeeper distributed
9139 application service. It is designed to be easy to use and to avoid common
9140 programming errors.")
9141 (license license:asl2.0)))
9143 (define-public python2-kazoo
9144 (package-with-python2 python-kazoo))
9146 (define-public python-pykafka
9148 (name "python-pykafka")
9153 "https://pypi.python.org/packages/8b/3e/"
9154 "384eeff406b06315738b62483fd2126c6e4f544167116b17cc04ea7d2a59/"
9155 "pykafka-" version ".tar.gz"))
9158 "1id6sr159p6aa13bxcqyr9gln8sqg1l0ddzns5iws8kk5q1p5cfv"))))
9159 (build-system python-build-system)
9160 (arguments '(#:tests? #f)) ; XXX: needs zookeeper, kafka, etc.
9162 `(("python-gevent" ,python-gevent)
9163 ("python-kazoo" ,python-kazoo)
9164 ("python-tabulate" ,python-tabulate)))
9166 `(("librdkafka" ,librdkafka)))
9167 (home-page "https://pykafka.readthedocs.io/")
9168 (synopsis "Apache Kafka client for Python")
9170 "PyKafka is a client for the Apache Kafka distributed messaging system.
9171 It includes Python implementations of Kafka producers and consumers, which
9172 are optionally backed by a C extension built on librdkafka.")
9173 (license license:asl2.0)))
9175 (define-public python2-pykafka
9176 (package-with-python2 python-pykafka))
9178 (define-public python-wcwidth
9180 (name "python-wcwidth")
9185 (uri (pypi-uri "wcwidth" version))
9188 "0pn6dflzm609m4r3i8ik5ni9ijjbb5fa3vg1n7hn6vkd49r77wrx"))))
9189 (build-system python-build-system)
9190 (home-page "https://github.com/jquast/wcwidth")
9191 (synopsis "Measure number of terminal column cells of wide-character codes")
9192 (description "Wcwidth measures the number of terminal column cells of
9193 wide-character codes. It is useful for those implementing a terminal emulator,
9194 or programs that carefully produce output to be interpreted by one. It is a
9195 Python implementation of the @code{wcwidth} and @code{wcswidth} C functions
9196 specified in POSIX.1-2001 and POSIX.1-2008.")
9197 (license license:expat)))
9199 (define-public python2-wcwidth
9200 (package-with-python2 python-wcwidth))
9202 (define-public python2-jsonrpclib
9204 (name "python2-jsonrpclib")
9209 "https://pypi.python.org/packages/source/j/jsonrpclib/"
9210 "jsonrpclib-" version ".tar.gz"))
9213 "02vgirw2bcgvpcxhv5hf3yvvb4h5wzd1lpjx8na5psdmaffj6l3z"))))
9214 (build-system python-build-system)
9217 #:python ,python-2))
9218 (home-page "https://github.com/joshmarshall/jsonrpclib/")
9219 (synopsis "Implementation of JSON-RPC specification for Python")
9221 "This library is an implementation of the JSON-RPC specification.
9222 It supports both the original 1.0 specification, as well as the
9223 new (proposed) 2.0 spec, which includes batch submission, keyword arguments,
9225 (license license:asl2.0)))
9227 (define-public python-chai
9229 (name "python-chai")
9233 (uri (pypi-uri "chai" version))
9236 "1k6n6zbgrrs83crp6mr3yqj9zlv40b8rpisyrliwsq7naml2p3gz"))))
9237 (build-system python-build-system)
9238 (home-page "https://github.com/agoragames/chai")
9239 (synopsis "Mocking framework for Python")
9241 "Chai provides an api for mocking, stubbing and spying your python
9242 objects, patterned after the Mocha library for Ruby.")
9243 (license license:bsd-3)))
9245 (define-public python2-chai
9246 (package-with-python2 python-chai))
9248 (define-public python-inflection
9250 (name "python-inflection")
9253 (origin (method url-fetch)
9254 (uri (pypi-uri "inflection" version))
9257 "1jhnxgnw8y3mbzjssixh6qkc7a3afc4fygajhqrqalnilyvpzshq"))))
9258 (build-system python-build-system)
9260 `(("python-pytest" ,python-pytest)))
9261 (home-page "https://github.com/jpvanhal/inflection")
9262 (synopsis "Python string transformation library")
9264 "Inflection is a string transformation library. It singularizes
9265 and pluralizes English words, and transforms strings from CamelCase to
9266 underscored string.")
9267 (license license:expat)))
9269 (define-public python2-inflection
9270 (package-with-python2 python-inflection))
9272 (define-public python-pylev
9274 (name "python-pylev")
9278 (uri (pypi-uri "pylev" version))
9281 "1hz1x9blsbxya1y9nnhnwwdnqmakxi9mc0jkwj0rn6b1h44i0f86"))))
9282 (build-system python-build-system)
9283 (home-page "https://github.com/toastdriven/pylev")
9284 (synopsis "Levenshtein distance implementation in Python")
9285 (description "Pure Python Levenshtein implementation, based off the
9286 Wikipedia code samples at
9287 @url{http://en.wikipedia.org/wiki/Levenshtein_distance}.")
9288 (license license:bsd-3)))
9290 (define-public python2-pylev
9291 (package-with-python2 python-pylev))
9293 (define-public python-cleo
9295 (name "python-cleo")
9299 (uri (pypi-uri "cleo" version))
9302 "0q1cf0szr0d54am4pypzwdnm74zpladdsinad94c2fz5i06fdpf7"))))
9303 (build-system python-build-system)
9306 ("python-mock" ,python-mock)
9307 ("python-pytest-mock" ,python-pytest-mock)
9308 ("python-pytest" ,python-pytest)))
9310 `(("python-backpack" ,python-backpack)
9311 ("python-pastel" ,python-pastel)
9312 ("python-pylev" ,python-pylev)))
9313 (home-page "https://github.com/sdispater/cleo")
9314 (synopsis "Command-line arguments library for Python")
9316 "Cleo allows you to create command-line commands with signature in
9317 docstring and colored output.")
9318 (license license:expat)))
9320 (define-public python2-cleo
9321 (package-with-python2 python-cleo))
9323 (define-public python-lazy-object-proxy
9325 (name "python-lazy-object-proxy")
9329 (uri (pypi-uri "lazy-object-proxy" version))
9332 "0s22aqqkdscyh8sjspyyax7qa1aiz8p4midrnyf39717fhfczm6x"))))
9333 (build-system python-build-system)
9334 (home-page "https://github.com/ionelmc/python-lazy-object-proxy")
9335 (synopsis "Lazy object proxy for python")
9337 "Lazy object proxy is an object that wraps a callable but defers the call
9338 until the object is actually required, and caches the result of said call.")
9339 (license license:bsd-2)))
9341 (define-public python2-lazy-object-proxy
9342 (package-with-python2 python-lazy-object-proxy))
9344 (define-public python-dnspython
9346 (name "python-dnspython")
9350 (uri (string-append "http://www.dnspython.org/kits/"
9351 version "/dnspython-" version ".tar.gz"))
9354 "0jr4v2pd90i6l1xxbss2m05psbjaxvyvvvpq44wycijpfgjqln8i"))))
9355 (build-system python-build-system)
9356 (arguments '(#:tests? #f)) ; XXX: requires internet access
9357 (home-page "http://www.dnspython.org")
9358 (synopsis "DNS toolkit for Python")
9360 "dnspython is a DNS toolkit for Python. It supports almost all record
9361 types. It can be used for queries, zone transfers, and dynamic updates.
9362 It supports TSIG authenticated messages and EDNS0.")
9363 (license license:expat)))
9365 (define-public python2-dnspython
9366 (package-with-python2 python-dnspython))
9368 (define-public python-email-validator
9370 (name "python-email-validator")
9373 (origin (method url-fetch)
9374 (uri (pypi-uri "email_validator" version))
9377 "1ja9149l9ck5n45a72h3is7v476hjny5ybxbcamx1nw6iplsm7k6"))))
9378 (build-system python-build-system)
9381 (modify-phases %standard-phases
9382 (add-before 'build 'use-dnspython
9384 (substitute* "setup.py"
9385 (("dnspython3") "dnspython"))
9388 `(("python-dnspython" ,python-dnspython)
9389 ("python-idna" ,python-idna)))
9390 (home-page "https://github.com/JoshData/python-email-validator")
9391 (synopsis "Email address validation library for Python")
9393 "This library validates email address syntax and deliverability.")
9394 (license license:cc0)))
9396 (define-public python2-email-validator
9397 (package-with-python2 python-email-validator))
9399 (define-public python-ukpostcodeparser
9401 (name "python-ukpostcodeparser")
9405 (uri (pypi-uri "UkPostcodeParser" version))
9408 "1jwg9z4rz51mcka1821rwgycsd0mcicyp1kiwjfa2kvg8bm9p2qd"))))
9409 (build-system python-build-system)
9410 (home-page "https://github.com/hamstah/ukpostcodeparser")
9411 (synopsis "UK Postcode parser for Python")
9413 "This library provides the @code{parse_uk_postcode} function for
9414 parsing UK postcodes.")
9415 (license license:expat)))
9417 (define-public python2-ukpostcodeparser
9418 (package-with-python2 python-ukpostcodeparser))
9420 (define-public python-faker
9422 (name "python-faker")
9426 (uri (pypi-uri "Faker" version))
9429 "1fh2p2yz0fsdr4fqwxgddwbvfb6qn6vp8yx0qwqzra27yq5d1wsm"))
9431 (search-patches "python-faker-fix-build-32bit.patch"))
9432 (modules '((guix build utils)))
9435 (for-each delete-file (find-files "." "\\.pyc$"))
9437 (build-system python-build-system)
9440 (modify-phases %standard-phases
9443 (zero? (system* "python" "-m" "unittest" "-v" "tests")))))))
9446 ("python-email-validator" ,python-email-validator)
9447 ("python-mock" ,python-mock)
9448 ("python-ukpostcodeparser" ,python-ukpostcodeparser)))
9450 `(("python-dateutil" ,python-dateutil)
9451 ("python-six" ,python-six)))
9452 (home-page "https://github.com/joke2k/faker")
9453 (synopsis "Python package that generates fake data")
9455 "Faker is a Python package that generates fake data such as names,
9456 addresses, and phone numbers.")
9457 (license license:expat)
9458 (properties `((python2-variant . ,(delay python2-faker))))))
9460 (define-public python2-faker
9461 (let ((base (package-with-python2 (strip-python2-variant
9466 `(("python2-ipaddress" ,python2-ipaddress)
9467 ,@(package-propagated-inputs base))))))
9469 (define-public python-pyaml
9471 (name "python-pyaml")
9475 (uri (pypi-uri "pyaml" version))
9478 "132grrw0ajq4nrappi3ldbkb952k7yn9b6c7csi2rmvzm1g6ppp2"))))
9479 (build-system python-build-system)
9481 `(("python-unidecode" ,python-unidecode)))
9483 `(("python-pyyaml" ,python-pyyaml)))
9484 (home-page "https://github.com/mk-fg/pretty-yaml")
9485 (synopsis "YAML pretty-print library for Python")
9487 "pyaml is a PyYAML based python module to produce pretty and readable
9488 YAML-serialized data.")
9489 (license (license:non-copyleft "http://www.wtfpl.net/txt/copying/"))))
9491 (define-public python2-pyaml
9492 (package-with-python2 python-pyaml))
9494 (define-public python-backpack
9496 (name "python-backpack")
9501 (uri (pypi-uri "backpack" version))
9504 "14rq1mvm0jda90lcx9gyyby9dvq4x3js2cmxvd6vl4686ixwyqh1"))))
9505 (build-system python-build-system)
9507 `(("python-pytest" ,python-pytest)
9508 ("python-nose" ,python-nose)))
9510 `(("python-simplejson" ,python-simplejson)))
9511 (home-page "https://github.com/sdispater/backpack")
9512 (synopsis "Utilities for working with Python collections")
9513 (description "Backpack provides some useful utilities for working with
9514 collections of data.")
9515 (license license:expat)))
9517 (define-public python2-backpack
9518 (package-with-python2 python-backpack))
9520 (define-public python-prompt-toolkit
9522 (name "python-prompt-toolkit")
9527 (uri (pypi-uri "prompt_toolkit" version ".tar.gz"))
9530 "05v9h5nydljwpj5nm8n804ms0glajwfy1zagrzqrg91wk3qqi1c5"))))
9531 (build-system python-build-system)
9533 '(#:tests? #f)) ; The test suite uses some Windows-specific data types.
9535 `(("python-wcwidth" ,python-wcwidth)
9536 ("python-six" ,python-six)
9537 ("python-pygments" ,python-pygments)))
9538 (home-page "https://github.com/jonathanslenders/python-prompt-toolkit")
9539 (synopsis "Library for building command line interfaces in Python")
9541 "Prompt-Toolkit is a library for building interactive command line
9542 interfaces in Python. It's like GNU Readline but it also features syntax
9543 highlighting while typing, out-of-the-box multi-line input editing, advanced
9544 code completion, incremental search, support for Chinese double-width
9545 characters, mouse support, and auto suggestions.")
9546 (license license:bsd-3)))
9548 (define-public python2-prompt-toolkit
9549 (package-with-python2 python-prompt-toolkit))
9551 (define-public python-jedi
9553 (name "python-jedi")
9558 (uri (pypi-uri "jedi" version))
9561 "1bcr7csx4xil1iwmk03d79jis0bkmgi9k0kir3xa4rmwqsagcwhr"))))
9562 (build-system python-build-system)
9565 (modify-phases %standard-phases
9566 (replace 'check (lambda _
9567 (invoke "py.test" "-vv"))))))
9569 `(("python-pytest" ,python-pytest)
9570 ("python-parso" ,python-parso)
9571 ("python-docopt" ,python-docopt)))
9572 (home-page "https://github.com/davidhalter/jedi")
9574 "Autocompletion for Python that can be used for text editors")
9576 "Jedi is an autocompletion tool for Python that can be used for text
9578 (license license:expat)))
9580 (define-public python2-jedi
9581 (package-with-python2 python-jedi))
9583 (define-public ptpython
9589 (uri (pypi-uri "ptpython" version))
9592 "1mmbiyzf0n8hm7z2a562x7w5cbl6jc0zsk6vp40q1z4cyblv1k13"))))
9593 (build-system python-build-system)
9595 '(#:tests? #f)) ; FIXME: No tests in pypi tarball.
9597 `(("python-docopt" ,python-docopt)
9598 ("python-jedi" ,python-jedi)
9599 ("python-prompt-toolkit" ,python-prompt-toolkit)
9600 ("python-pygments" ,python-pygments)))
9601 (home-page "https://github.com/jonathanslenders/ptpython")
9602 (synopsis "Python Read-Eval-Print-Loop with nice IDE-like features")
9604 "ptpython is a Python read-eval-print loop with IDE-like features.
9605 It supports syntax highlighting, multiline editing, autocompletion, mouse,
9606 color schemes, bracketed paste, Vi and Emacs keybindings, Chinese characters
9608 (license license:bsd-3)
9609 (properties `((python2-variant . ,(delay ptpython-2))))))
9611 (define-public ptpython-2
9612 (let ((base (package-with-python2 (strip-python2-variant ptpython))))
9615 (name "ptpython2"))))
9617 (define-public python-stem
9619 (name "python-stem")
9624 (uri (pypi-uri "stem" version))
9627 "1va9p3ij7lxg6ixfsvaql06dn11l3fgpxmss1dhlvafm7sqizznp"))))
9628 (build-system python-build-system)
9631 (modify-phases %standard-phases
9632 (add-before 'check 'fix-test-environment
9634 ;; Fixes: FileNotFoundError: [Errno 2] No such file or directory:
9635 ;; '/tmp/guix-build-python-stem-1.6.0.drv-0/stem-1.6.0/.gitignore'.
9636 (with-output-to-file ".gitignore"
9637 (lambda _ (format #t "%")))
9641 (invoke "./run_tests.py" "--unit")
9644 `(("python-mock" ,python-mock)
9645 ("python-pep8" ,python-pep8)
9646 ("python-pyflakes" ,python-pyflakes)))
9647 (home-page "https://stem.torproject.org/")
9649 "Python controller library that allows applications to interact with Tor")
9651 "Stem is a Python controller library for Tor. With it you can use Tor's
9652 control protocol to script against the Tor process and read descriptor data
9653 relays publish about themselves.")
9654 (license license:lgpl3)))
9656 (define-public python2-stem
9657 (package-with-python2 python-stem))
9659 (define-public python-pyserial
9661 (name "python-pyserial")
9666 (uri (pypi-uri "pyserial" version))
9669 "0k1nfdrxxkdlv4zgaqsdv8li0pj3gbh2pyxw8q2bsg6f9490amyn"))))
9670 (build-system python-build-system)
9672 '(#:tests? #f)) ; FIXME: 3/49 tests are failing.
9674 ;; (modify-phases %standard-phases
9677 ;; (zero? (system* "python" "test/run_all_tests.py" "loop://")))))))
9679 "https://github.com/pyserial/pyserial")
9680 (synopsis "Python Serial Port Bindings")
9681 (description "@code{pyserial} provide serial port bindings for Python. It
9682 supports different byte sizes, stop bits, parity and flow control with RTS/CTS
9683 and/or Xon/Xoff. The port is accessed in RAW mode.")
9684 (license license:bsd-3)))
9686 (define-public python2-pyserial
9687 (package-with-python2 python-pyserial))
9689 (define-public python-kivy
9691 (name "python-kivy")
9696 (uri (pypi-uri "Kivy" version))
9697 (file-name (string-append name "-" version ".tar.gz"))
9700 "1394zh6kvf7k5d8vlzxcsfcailr3q59xwg9b1n7qaf25bvyq1h98"))))
9701 (build-system python-build-system)
9703 `(#:tests? #f ; Tests require many optional packages
9705 (modify-phases %standard-phases
9706 (add-after 'patch-generated-file-shebangs 'set-sdl-paths
9707 (lambda* (#:key inputs #:allow-other-keys)
9708 (setenv "KIVY_SDL2_PATH"
9709 (string-append (assoc-ref inputs "sdl-union")
9714 ("pkg-config" ,pkg-config)
9715 ("python-cython" ,python-cython)))
9717 `(("gstreamer" ,gstreamer)
9720 ,(sdl-union (list sdl2 sdl2-image sdl2-mixer sdl2-ttf)))))
9721 (home-page "http://kivy.org")
9723 "Multitouch application framework")
9725 "A software library for rapid development of
9726 hardware-accelerated multitouch applications.")
9727 (license license:expat)))
9729 (define-public python2-kivy
9730 (package-with-python2 python-kivy))
9732 (define-public python-kivy-next
9733 (let ((commit "a988c5e7a47da56263ff39514264a3de516ef2fe")
9735 (package (inherit python-kivy)
9736 (name "python-kivy-next")
9737 (version (string-append "1.9.1-" revision "."
9738 (string-take commit 7)))
9743 (url "https://github.com/kivy/kivy")
9745 (file-name (string-append name "-" version "-checkout"))
9748 "0jk92b4a8l7blkvkgkjihk171s0dfnq582cckff5srwc8kal5m0p")))))))
9750 (define-public python2-kivy-next
9751 (package-with-python2 python-kivy-next))
9753 (define-public python-binaryornot
9755 (name "python-binaryornot")
9759 (uri (pypi-uri "binaryornot" version))
9762 "1j4f51dxic39mdwf6alj7gd769wy6mhk916v031wjali51xkh3xb"))))
9763 (build-system python-build-system)
9765 `(("python-chardet" ,python-chardet)
9766 ("python-hypothesis" ,python-hypothesis)))
9767 (home-page "https://github.com/audreyr/binaryornot")
9768 (synopsis "Package to check if a file is binary or text")
9769 (description "Ultra-lightweight pure Python package to check if a file is
9771 (license license:bsd-3)
9772 (properties `((python2-variant . ,(delay python2-binaryornot))))))
9774 (define-public python2-binaryornot
9775 (let ((base (package-with-python2 (strip-python2-variant python-binaryornot))))
9776 (package (inherit base)
9778 `(("python2-enum34" ,python2-enum34)
9779 ,@(package-propagated-inputs base))))))
9781 (define-public python-nltk
9783 (name "python-nltk")
9787 (uri (pypi-uri "nltk" version))
9790 "0skxbhnymwlspjkzga0f7x1hg3y50fwpfghs8g8k7fh6f4nknlym"))))
9791 (build-system python-build-system)
9793 '(;; The tests require some extra resources to be downloaded.
9794 ;; TODO Try packaging these resources.
9796 (home-page "http://nltk.org/")
9797 (synopsis "Natural Language Toolkit")
9798 (description "It provides interfaces to over 50 corpora and lexical
9799 resources such as WordNet, along with a suite of text processing libraries
9800 for classification, tokenization, stemming, tagging, parsing, and semantic
9801 reasoning, wrappers for natural language processing libraries.")
9802 (license license:asl2.0)))
9804 (define-public python2-nltk
9805 (package-with-python2 python-nltk))
9807 (define-public python-pymongo
9809 (name "python-pymongo")
9813 (uri (pypi-uri "pymongo" version))
9816 "07mra6w86wjqy4lx5fvimidjhhfzd562gfjn8grsnbv2q8pk0i9x"))))
9817 (build-system python-build-system)
9819 `(("python-certifi" ,python-certifi)))
9820 (home-page "https://github.com/mongodb/mongo-python-driver")
9821 (synopsis "Python driver for MongoDB")
9822 (description "Python driver for MongoDB.")
9823 (license license:asl2.0)))
9825 (define-public python2-pymongo
9826 (package-with-python2 python-pymongo))
9828 (define-public python-sh
9834 (uri (pypi-uri "sh" version))
9837 "192r0mpv6dmkysjzhc43ddffiwb5g7c76bgr1mb1z2xz9awbj3sr"))))
9838 (build-system python-build-system)
9840 `(#:tests? #f)) ; no tests
9841 (home-page "https://github.com/amoffat/sh")
9842 (synopsis "Python subprocess interface")
9843 (description "Abstracts process invocation by providing a function
9844 interface for programs.")
9845 (license license:expat)))
9847 (define-public python2-sh
9848 (package-with-python2 python-sh))
9850 (define-public python-consul
9852 (name "python-consul")
9857 (uri (pypi-uri "python-consul" version))
9860 "0rfyxcy4cr3x848vhx876ifalxd5ghq6l5x813m49h4vq2d4jiq8"))))
9861 (build-system python-build-system)
9863 '(#:tests? #f)) ; The tests are not distributed
9865 `(("python-requests" ,python-requests)
9866 ("python-six" ,python-six)))
9867 (home-page "https://github.com/cablehead/python-consul")
9868 (synopsis "Python client for Consul")
9870 "Python client for @url{http://www.consul.io/,Consul}, a tool for service
9871 discovery, monitoring and configuration.")
9872 (license license:expat)))
9874 (define-public python2-consul
9875 (package-with-python2 python-consul))
9877 (define-public python-schematics
9879 (name "python-schematics")
9885 "https://github.com/schematics/schematics/archive/v" version ".tar.gz"))
9886 (file-name (string-append name "-" version ".tar.gz"))
9889 "19v1i69bf3bzarfxmbv0v6ivpcn758x3shvbiy9l2hy0lvqwnp6l"))))
9890 (build-system python-build-system)
9892 `(("python-six" ,python-six)))
9894 `(#:tests? #f)) ; requires a bunch of not very nice packages with fixed
9895 ; version requirements (eg python-coveralls)
9896 (home-page "https://github.com/schematics/schematics")
9897 (synopsis "Python Data Structures for Humans")
9898 (description "Python Data Structures for Humans.")
9899 (license license:bsd-3)))
9901 (define-public python2-schematics
9902 (package-with-python2 python-schematics))
9904 (define-public python-odfpy
9906 (name "python-odfpy")
9910 (uri (pypi-uri "odfpy" version))
9913 "1a6ms0w9zfhhkqhvrnynwwbxrivw6hgjc0s5k7j06npc7rq0blxw"))))
9915 `(#:modules ((srfi srfi-1)
9916 (guix build python-build-system)
9919 (modify-phases %standard-phases
9921 ;; The test runner invokes python2 and python3 for test*.py.
9922 ;; To avoid having both in inputs, we replicate it here.
9924 (every (lambda (test-file)
9925 (zero? (system* "python" test-file)))
9926 (find-files "tests" "^test.*\\.py$")))))))
9927 (build-system python-build-system)
9928 (home-page "https://github.com/eea/odfpy")
9929 (synopsis "Python API and tools to manipulate OpenDocument files")
9930 (description "Collection of libraries and utility programs written in
9931 Python to manipulate OpenDocument 1.2 files.")
9933 ;; The software is mainly dual GPL2+ and ASL2.0, but includes a
9934 ;; number of files with other licenses.
9935 (list license:gpl2+ license:asl2.0 license:lgpl2.1+ license:cc-by-sa3.0))))
9937 (define-public python2-odfpy
9938 (package-with-python2 python-odfpy))
9940 (define-public python-natsort
9942 (name "python-natsort")
9946 (uri (pypi-uri "natsort" version))
9949 "0bh6j0l8iapjnsgg3bs6q075cnzjl6zw1vlgqyv3qrygm2cxypkn"))))
9950 (build-system python-build-system)
9953 (modify-phases %standard-phases
9954 (add-before 'check 'set-cachedir
9955 ;; Tests require write access to $HOME by default
9956 (lambda _ (setenv "PYTHON_EGG_CACHE" "/tmp") #t)))))
9958 `(("python-hypothesis" ,python-hypothesis)
9959 ("python-pytest-cache" ,python-pytest-cache)
9960 ("python-pytest-cov" ,python-pytest-cov)
9961 ("python-pytest-flakes" ,python-pytest-flakes)
9962 ("python-pytest-pep8" ,python-pytest-pep8)))
9963 (propagated-inputs ; TODO: Add python-fastnumbers.
9964 `(("python-pyicu" ,python-pyicu)))
9965 (home-page "https://github.com/SethMMorton/natsort")
9966 (synopsis "Natural sorting for python and shell")
9968 "Natsort lets you apply natural sorting on lists instead of
9969 lexicographical. If you use the built-in @code{sorted} method in python
9970 on a list such as @code{['a20', 'a9', 'a1', 'a4', 'a10']}, it would be
9971 returned as @code{['a1', 'a10', 'a20', 'a4', 'a9']}. Natsort provides a
9972 function @code{natsorted} that identifies numbers and sorts them separately
9973 from strings. It can also sort version numbers, real numbers, mixed types
9974 and more, and comes with a shell command @command{natsort} that exposes this
9975 functionality in the command line.")
9976 (license license:expat)
9977 (properties `((python2-variant . ,(delay python2-natsort))))))
9979 (define-public python2-natsort
9980 (let ((base (package-with-python2 (strip-python2-variant python-natsort))))
9981 (package (inherit base)
9983 `(("python2-pathlib" ,python2-pathlib)
9984 ("python2-mock" ,python2-mock)
9985 ("python2-enum34" ,python2-enum34)
9986 ,@(package-native-inputs base))))))
9988 (define-public python-glances
9990 (name "python-glances")
9995 (uri (pypi-uri "Glances" version))
9998 "11jbq40g8alsbirnd4kiagznqg270247i0m8qhi48ldf2i5xppxg"))))
9999 (build-system python-build-system)
10001 `(("python-psutil" ,python-psutil)))
10003 "https://github.com/nicolargo/glances")
10005 "A cross-platform curses-based monitoring tool")
10007 "Glances is a curses-based monitoring tool for a wide variety of platforms.
10008 Glances uses the PsUtil library to get information from your system. It monitors
10009 CPU, load, memory, network bandwidth, disk I/O, disk use, and more.")
10010 (license license:lgpl3+)))
10012 (define-public python2-glances
10013 (package-with-python2 python-glances))
10015 (define-public python-graphql-core
10017 (name "python-graphql-core")
10022 (uri (pypi-uri "graphql-core" version))
10025 "0rsaarx2sj4xnw9966rhh4haiqaapm4lm2mfqm48ywd51j5vh1a0"))))
10026 (build-system python-build-system)
10028 `(#:tests? #f ; Tests require the unpackaged pytest-benchmark.
10030 (modify-phases %standard-phases
10031 (add-after 'unpack 'patch-hardcoded-version
10032 (lambda _ (substitute*
10034 (("'gevent==1.1rc1'") "'gevent'"))
10037 `(("python-gevent" ,python-gevent)
10038 ("python-mock" ,python-mock)
10039 ("python-pytest-mock" ,python-pytest-mock)))
10041 `(("python-promise" ,python-promise)
10042 ("python-six" ,python-six)))
10043 (home-page "https://github.com/graphql-python/graphql-core")
10044 (synopsis "GraphQL implementation for Python")
10046 "GraphQL implementation for Python. GraphQL is a data query language and
10047 runtime designed and used to request and deliver data to mobile and web apps.
10048 This library is a port of @url{https://github.com/graphql/graphql-js,graphql-js}
10050 (license license:expat)))
10052 (define-public python2-graphql-core
10053 (package-with-python2 python-graphql-core))
10055 (define-public python-graphql-relay
10057 (name "python-graphql-relay")
10062 (uri (pypi-uri "graphql-relay" version))
10065 "1nv5dxcj59zv31qvl8bd142njmxcmymny2dz3br1l2cpbljbf5i7"))))
10066 (build-system python-build-system)
10068 '(#:tests? #f)) ; The tests are not distributed
10070 `(("python-graphql-core" ,python-graphql-core)
10071 ("python-promise" ,python-promise)
10072 ("python-six" ,python-six)))
10073 (home-page "https://github.com/graphql-python/graphql-relay-py")
10074 (synopsis "Relay implementation for Python")
10076 "This is a library to allow the easy creation of Relay-compliant servers
10077 using the GraphQL Python reference implementation of a GraphQL server. It
10078 should be noted that the code is a exact port of the original
10079 @url{https://github.com/graphql/graphql-relay-js,graphql-relay js implementation}
10081 (license license:expat)))
10083 (define-public python2-graphql-relay
10084 (package-with-python2 python-graphql-relay))
10086 (define-public python-graphene
10088 (name "python-graphene")
10093 (uri (pypi-uri "graphene" version))
10096 "09zhac7igh9ixdz0ay6csy35b40l1jwbf2wrbxmgxwfhy51iy06q"))))
10097 (build-system python-build-system)
10099 `(("python-graphql-core" ,python-graphql-core)
10100 ("python-graphql-relay" ,python-graphql-relay)
10101 ("python-iso8601" ,python-iso8601)
10102 ("python-promise" ,python-promise)
10103 ("python-six" ,python-six)))
10105 `(#:tests? #f)) ; no tests/ in the PyPI tarball
10106 (home-page "http://graphene-python.org/")
10107 (synopsis "GraphQL Framework for Python")
10109 "Graphene is a Python library for building GraphQL schemas/types.
10110 A GraphQL schema describes your data model, and provides a GraphQL server
10111 with an associated set of resolve methods that know how to fetch data.")
10112 (properties `((python2-variant . ,(delay python2-graphene))))
10113 (license license:expat)))
10115 (define-public python2-graphene
10116 (let ((base (package-with-python2
10117 (strip-python2-variant python-graphene))))
10118 (package (inherit base)
10120 `(("python2-sqlalchemy" ,python2-sqlalchemy)
10121 ,@(package-native-inputs base))))))
10123 (define-public python-nautilus
10125 (name "python-nautilus")
10130 (uri (pypi-uri "nautilus" version))
10133 "01hwzjc1zshk4vvxrcghm398fpy4jls66dyz06g07mrwqif8878p"))))
10134 (build-system python-build-system)
10135 (arguments `(#:tests? #f)) ; fails to import test modules
10137 `(("python-bcrypt" ,python-bcrypt)
10138 ("python-click" ,python-click)
10139 ("python-consul" ,python-consul)
10140 ("python-graphene" ,python-graphene)
10141 ("python-jinja2" ,python-jinja2)
10142 ("python-peewee" ,python-peewee)
10143 ("python-pika" ,python-pika)
10144 ("python-tornado" ,python-tornado)
10145 ("python-wtforms" ,python-wtforms)))
10147 `(("python-nose2" ,python-nose2)))
10148 (home-page "https://github.com/AlecAivazis/nautilus")
10149 (synopsis "Library for creating microservice applications")
10151 "Nautilus is a framework for flux based microservices that looks to
10152 provide extendible implementations of common aspects of a cloud so that you can
10153 focus on building massively scalable web applications.")
10154 (license license:expat)))
10156 (define-public python-snowballstemmer
10158 (name "python-snowballstemmer")
10162 (uri (pypi-uri "snowballstemmer" version))
10165 "0a0idq4y5frv7qsg2x62jd7rd272749xk4x99misf5rcifk2d7wi"))))
10166 (build-system python-build-system)
10168 `(;; No tests exist
10170 (home-page "https://github.com/shibukawa/snowball_py")
10171 (synopsis "Snowball stemming library collection for Python")
10172 (description "This package provides 16 word stemmer algorithms generated
10173 from Snowball algorithms. It includes the 15 original ones plus the Poerter
10175 (license license:bsd-3)))
10177 (define-public python2-snowballstemmer
10178 (package-with-python2 python-snowballstemmer))
10180 (define-public python-sphinx-cloud-sptheme
10182 (name "python-sphinx-cloud-sptheme")
10186 (uri (pypi-uri "cloud_sptheme" version))
10189 "1dniqb6a39yh786f86c4jn666rwnyi1jvzn4616zhcchb7sfdshd"))))
10190 (build-system python-build-system)
10191 ;; FIXME: The 'pypi' release archive does not contain tests.
10192 (arguments '(#:tests? #f))
10194 `(("python-sphinx" ,python-sphinx)))
10195 (home-page "https://bitbucket.org/ecollins/cloud_sptheme")
10196 (synopsis "'Cloud' theme for Sphinx documenter")
10197 (description "This package contains the \"Cloud\" theme for Sphinx and some
10198 related extensions.")
10199 (license license:bsd-3)))
10201 (define-public python2-sphinx-cloud-sptheme
10202 (package-with-python2 python-sphinx-cloud-sptheme))
10204 (define-public python-sphinx-alabaster-theme
10206 (name "python-sphinx-alabaster-theme")
10210 (uri (pypi-uri "alabaster" version))
10213 "027anxzcb951gjlcc43y3rbn9qrw36d16vj9wd2smv5410xx9bs7"))))
10214 (build-system python-build-system)
10216 `(("python-pygments" ,python-pygments)))
10217 (home-page "https://alabaster.readthedocs.io/")
10218 (synopsis "Configurable sidebar-enabled Sphinx theme")
10219 (description "Alabaster is a visually (c)lean, responsive, configurable
10220 theme for the Sphinx documentation system. It's the default theme of Sphinx.")
10221 (license license:bsd-3)))
10223 (define-public python2-sphinx-alabaster-theme
10224 (package-with-python2 python-sphinx-alabaster-theme))
10226 (define-public python-setproctitle
10228 (name "python-setproctitle")
10233 (uri (pypi-uri "setproctitle" version))
10236 "163kplw9dcrw0lffq1bvli5yws3rngpnvrxrzdw89pbphjjvg0v2"))))
10237 (build-system python-build-system)
10240 (modify-phases %standard-phases
10241 (add-before 'check 'patch-Makefile
10242 ;; Stricly this is only required for the python2 variant.
10243 ;; But adding a phase in an inherited package seems to be
10244 ;; cumbersum. So we patch even for python3.
10246 (let ((nose (assoc-ref %build-inputs "python2-nose")))
10248 (substitute* "Makefile"
10249 (("\\$\\(PYTHON\\) [^ ]which nosetests[^ ] ")
10250 (string-append nose "/bin/nosetests "))))
10254 (setenv "PYTHON" (or (which "python3") (which "python")))
10255 (setenv "PYCONFIG" (or (which "python3-config")
10256 (which "python-config")))
10257 (setenv "CC" "gcc")
10258 ;; No need to extend PYTHONPATH to find the built package, since
10259 ;; the Makefile will build anyway
10260 (zero? (system* "make" "check")))))))
10262 `(("procps" ,procps))) ; required for tests
10264 "https://github.com/dvarrazzo/py-setproctitle")
10266 "Setproctitle implementation for Python to customize the process title")
10267 (description "The library allows a process to change its title (as displayed
10268 by system tools such as ps and top).
10270 Changing the title is mostly useful in multi-process systems, for
10271 example when a master process is forked: changing the children's title
10272 allows to identify the task each process is busy with. The technique
10273 is used by PostgreSQL and the OpenSSH Server for example.")
10274 (license license:bsd-3)
10275 (properties `((python2-variant . ,(delay python2-setproctitle))))))
10277 (define-public python2-setproctitle
10278 (let ((base (package-with-python2
10279 (strip-python2-variant python-setproctitle))))
10282 (native-inputs `(("python2-nose" ,python2-nose)
10283 ,@(package-native-inputs base))))))
10285 (define-public python-validictory
10287 (name "python-validictory")
10292 (uri (pypi-uri "validictory" version))
10295 "1zf1g9sw47xzp5f80bd94pb42j9yqv82lcrgcvdwr6nkaphfi37q"))))
10296 (build-system python-build-system)
10299 (modify-phases %standard-phases
10300 (add-after 'unpack 'bootstrap
10301 ;; Move the tests out of the package directory to avoid
10304 (rename-file "validictory/tests" "tests")
10305 (delete-file "tests/__init__.py")))
10308 ;; Extend PYTHONPATH so the built package will be found.
10309 (setenv "PYTHONPATH"
10310 (string-append (getcwd) "/build/lib:"
10311 (getenv "PYTHONPATH")))
10312 (zero? (system* "py.test" "-vv" )))))))
10314 `(("python-pytest" ,python-pytest)))
10316 "https://github.com/jamesturk/validictory")
10317 (synopsis "General purpose Python data validator")
10318 (description "It allows validation of arbitrary Python data structures.
10320 The schema format is based on the JSON Schema
10321 proposal (http://json-schema.org), so combined with json the library is also
10322 useful as a validator for JSON data.")
10323 (license license:expat)))
10325 (define-public python2-validictory
10326 (package-with-python2 python-validictory))
10328 (define-public python-pyev
10330 (name "python-pyev")
10335 (uri (pypi-uri "pyev" version))
10338 "0rf603lc0s6zpa1nb25vhd8g4y337wg2wyz56i0agsdh7jchl0sx"))))
10339 (build-system python-build-system)
10341 `(#:tests? #f ; no test suite
10343 (modify-phases %standard-phases
10344 (add-after 'unpack 'patch
10345 (lambda* (#:key inputs #:allow-other-keys)
10346 (let ((libev (string-append (assoc-ref inputs "libev")
10347 "/lib/libev.so.4")))
10348 (substitute* "setup.py"
10349 (("libev_dll_name = find_library\\(\\\"ev\\\"\\)")
10350 (string-append "libev_dll_name = \"" libev "\"")))))))))
10352 `(("libev" ,libev)))
10353 (home-page "http://pythonhosted.org/pyev/")
10354 (synopsis "Python libev interface")
10355 (description "Pyev provides a Python interface to libev.")
10356 (license license:gpl3)))
10358 (define-public python2-pyev
10359 (package-with-python2 python-pyev))
10361 (define-public python-imagesize
10363 (name "python-imagesize")
10368 (uri (pypi-uri "imagesize" version))
10371 "0qk07k0z4241lkzzjji7z4da04pcvg7bfc4xz1934zlqhwmwdcha"))))
10372 (build-system python-build-system)
10374 '(;; Test files are not distributed on PyPi:
10375 ;; https://github.com/shibukawa/imagesize_py/issues/7
10377 (home-page "https://github.com/shibukawa/imagesize_py")
10378 (synopsis "Gets image size of files in variaous formats in Python")
10380 "This package allows determination of image size from
10381 PNG, JPEG, JPEG2000 and GIF files in pure Python.")
10382 (license license:expat)))
10384 (define-public python2-imagesize
10385 (package-with-python2 python-imagesize))
10387 (define-public python-termstyle
10389 (name "python-termstyle")
10394 (uri (pypi-uri "termstyle" version))
10397 "17wzkkcqy5zc0g68xlad3kcv66iw14d2pwqc0h9420gak0vbhx7g"))))
10398 (build-system python-build-system)
10401 (modify-phases %standard-phases
10404 (zero? (system* "python" "test3.py")))))))
10405 (home-page "https://github.com/gfxmonk/termstyle")
10406 (synopsis "Console text coloring for Python")
10407 (description "This package provides console text coloring for Python.")
10408 (license license:bsd-3)))
10410 (define-public python-argcomplete
10412 (name "python-argcomplete")
10417 (uri (pypi-uri "argcomplete" version))
10420 "11bwiw6j0nilgz81xnw6f1npyga3prp8asjqrm87cdr3ria5l03x"))))
10421 (build-system python-build-system)
10423 `(("python-pexpect" ,python-pexpect)
10425 ("bash-full" ,bash))) ;full Bash for 'test_file_completion'
10426 (home-page "https://github.com/kislyuk/argcomplete")
10427 (synopsis "Shell tab completion for Python argparse")
10428 (description "argcomplete provides extensible command line tab completion
10429 of arguments and options for Python scripts using @code{argparse}. It's
10430 particularly useful for programs with many options or sub-parsers that can
10431 dynamically suggest completions; for example, when browsing resources over the
10433 (license license:asl2.0)))
10435 (define-public python2-argcomplete
10436 (package-with-python2 python-argcomplete))
10438 (define-public python-xopen
10440 (name "python-xopen")
10445 (uri (pypi-uri "xopen" version))
10448 "0bzjmn3rl1cd3d2q39cjwnkhaspk2b0hfj3rl64pclm44ihg5fb6"))
10449 (file-name (string-append name "-" version ".tar.gz"))))
10450 (build-system python-build-system)
10451 (home-page "https://github.com/marcelm/xopen/")
10452 (synopsis "Open compressed files transparently")
10453 (description "This module provides an @code{xopen} function that works like
10454 Python's built-in @code{open} function, but can also deal with compressed files.
10455 Supported compression formats are gzip, bzip2 and, xz, and are automatically
10456 recognized by their file extensions. The focus is on being as efficient as
10457 possible on all supported Python versions.")
10458 (license license:expat)))
10460 (define-public python2-xopen
10461 (package-with-python2 python-xopen))
10463 (define-public python2-cheetah
10465 (name "python2-cheetah")
10470 (uri (pypi-uri "Cheetah" version))
10473 "0l5mm4lnysjkzpjr95q5ydm9xc8bv43fxmr79ypybrf1y0lq4c5y"))))
10474 (build-system python-build-system)
10476 `(#:python ,python-2))
10478 `(("python2-markdown" ,python2-markdown)))
10479 (home-page "https://pythonhosted.org/Cheetah/")
10480 (synopsis "Template engine")
10481 (description "Cheetah is a text-based template engine and Python code
10484 Cheetah can be used as a standalone templating utility or referenced as
10485 a library from other Python applications. It has many potential uses,
10486 but web developers looking for a viable alternative to ASP, JSP, PHP and
10487 PSP are expected to be its principle user group.
10491 @item Generates HTML, SGML, XML, SQL, Postscript, form email, LaTeX, or any other
10493 @item Cleanly separates content, graphic design, and program code.
10494 @item Blends the power and flexibility of Python with a simple template language
10495 that non-programmers can understand.
10496 @item Gives template writers full access to any Python data structure, module,
10497 function, object, or method in their templates.
10498 @item Makes code reuse easy by providing an object-orientated interface to
10499 templates that is accessible from Python code or other Cheetah templates.
10500 One template can subclass another and selectively reimplement sections of it.
10501 @item Provides a simple, yet powerful, caching mechanism that can dramatically
10502 improve the performance of a dynamic website.
10503 @item Compiles templates into optimized, yet readable, Python code.
10505 (license (license:x11-style "file://LICENSE"))))
10507 (define-public python-dulwich
10509 (name "python-dulwich")
10514 (uri (list (string-append "https://www.dulwich.io/releases/"
10515 "dulwich-" version ".tar.gz")
10516 (pypi-uri "dulwich" version)))
10519 "1aa1xfrxkc3j9s4xi0llhf5gndyi9ryprcxsqfa5fcb8ph34981q"))))
10520 (build-system python-build-system)
10523 (modify-phases %standard-phases
10524 (add-before 'check 'fix-tests
10525 (lambda* (#:key inputs #:allow-other-keys)
10526 ;; The tests use Popen with a custom environment which doesn't
10528 (substitute* "dulwich/tests/compat/utils.py"
10529 (("'git'") (string-append "'"
10532 (substitute* '("dulwich/tests/test_repository.py"
10533 "dulwich/tests/test_hooks.py")
10534 (("#!/bin/sh") (string-append "#!" (which "sh"))))
10535 (setenv "TEST_RUNNER" "unittest")
10536 (setenv "PYTHONHASHSEED" "random")
10539 `(("python-fastimport" ,python-fastimport)))
10541 `(("python-mock" ,python-mock)
10542 ("python-geventhttpclient" ,python-geventhttpclient)
10544 (home-page "https://www.dulwich.io/")
10545 (synopsis "Git implementation in Python")
10546 (description "Dulwich is an implementation of the Git file formats and
10547 protocols written in pure Python.")
10548 ;; Can be used with either license.
10549 (license (list license:asl2.0 license:gpl2+))))
10551 (define-public python2-dulwich
10552 (package-with-python2 python-dulwich))
10554 (define-public python-pbkdf2
10556 (name "python-pbkdf2")
10561 (uri (pypi-uri "pbkdf2" version))
10564 "0yb99rl2mbsaamj571s1mf6vgniqh23v98k4632150hjkwv9fqxc"))))
10565 (build-system python-build-system)
10568 (modify-phases %standard-phases
10571 (setenv "PYTHONPATH"
10572 (string-append (getcwd) "/build/lib:"
10573 (getenv "PYTHONPATH")))
10574 (zero? (system* "python" "test/test_pbkdf2.py")))))))
10576 `(("python-pycrypto" ,python-pycrypto))) ; optional
10577 (home-page "https://www.dlitz.net/software/python-pbkdf2/")
10578 (synopsis "Password-based key derivation")
10579 (description "This module implements the password-based key derivation
10580 function, PBKDF2, specified in RSA PKCS#5 v2.0.
10582 PKCS#5 v2.0 Password-Based Key Derivation is a key derivation function which
10583 is part of the RSA Public Key Cryptography Standards series. The provided
10584 implementation takes a password or a passphrase and a salt value (and
10585 optionally a iteration count, a digest module, and a MAC module) and provides
10586 a file-like object from which an arbitrarly-sized key can be read.")
10587 (license license:expat)))
10589 (define-public python2-pbkdf2
10590 (package-with-python2 python-pbkdf2))
10592 (define-public python-qrcode
10594 (name "python-qrcode")
10599 (uri (pypi-uri "qrcode" version))
10602 "1gz1g2n9kqwqkak78aavr354z1v3yyiksk7q6xp5hi1zr6s0syq3"))))
10603 (build-system python-build-system)
10605 ;; FIXME: Tests require packaging 'pymaging'.
10608 `(("python-lxml" ,python-lxml) ; for SVG output
10609 ("python-pillow" ,python-pillow) ; for PNG output
10610 ("python-six" ,python-six)))
10612 `(;; The setup.cfg file needs to be used, and support for this requires
10613 ;; at least version 30.3.0 of setuptools
10614 ("python-setuptools" ,python-setuptools)))
10615 (home-page "https://github.com/lincolnloop/python-qrcode")
10616 (synopsis "QR Code image generator")
10617 (description "This package provides a pure Python QR Code generator
10618 module. It uses the Python Imaging Library (PIL) to allow for the generation
10621 In addition this package provides a command line tool to generate QR codes and
10622 either write these QR codes to a file or do the output as ascii art at the
10624 (license license:bsd-3)))
10626 (define-public python2-qrcode
10627 (package-with-python2 python-qrcode))
10629 (define-public python-rst2ansi
10631 (name "python-rst2ansi")
10636 (uri (pypi-uri "rst2ansi" version))
10639 "0vzy6gd60l79ff750scl0sz48r1laalkl6md6dwzah4dcadgn5qv"))))
10640 (build-system python-build-system)
10642 `(("python-docutils" ,python-docutils)))
10643 (home-page "https://github.com/Snaipe/python-rst-to-ansi")
10644 (synopsis "Convert RST to ANSI-decorated console output")
10646 "Python module dedicated to rendering RST (reStructuredText) documents
10647 to ansi-escaped strings suitable for display in a terminal.")
10648 (license license:expat)))
10650 (define-public python-ansi2html
10652 (name "python-ansi2html")
10657 (uri (pypi-uri "ansi2html" version))
10660 "1wa00zffprb78w1mqq90dk47czz1knanys2a40zbw2vyapd5lp9y"))))
10661 (build-system python-build-system)
10663 `(("python-mock" ,python-mock)
10664 ("python-nose" ,python-nose)))
10666 `(("python-six" ,python-six)))
10667 (home-page "https://github.com/ralphbean/ansi2html")
10668 (synopsis "Convert ANSI-decorated console output to HTML")
10670 "@command{ansi2html} is a Python library and command line utility for
10671 convering text with ANSI color codes to HTML or LaTeX.")
10672 (license license:gpl3+)))
10674 (define-public python2-ansi2html
10675 (package-with-python2 python-ansi2html))
10677 (define-public python-ddt
10679 (name "python-ddt")
10684 (uri (pypi-uri "ddt" version))
10687 "1lw17420iimhghkgzgax85nn8d1an2d6k2cfvb7j5kwn2dqlr1vk"))))
10688 (build-system python-build-system)
10690 `(("python-mock" ,python-mock)
10691 ("python-nose" ,python-nose)))
10693 `(("python-six" ,python-six)
10694 ("python-pyyaml" ,python-pyyaml)))
10695 (home-page "https://github.com/txels/ddt")
10696 (synopsis "Data-Driven Tests")
10698 "Data-Driven Tests (@dfn{DDT}) allow you to multiply one test case by
10699 running it with different test data, and make it appear as multiple test
10701 (license license:expat)))
10703 (define-public python2-ddt
10704 (package-with-python2 python-ddt))
10706 (define-public python-pycosat
10708 (name "python-pycosat")
10713 (uri (pypi-uri "pycosat" version))
10716 "1kl3wh1f47rc712n4bmwplbx3fqz3x9i1b587jrbpmvdva4c8f6l"))))
10717 ;; TODO: Unundle picosat. http://fmv.jku.at/picosat/
10718 (build-system python-build-system)
10719 (home-page "https://github.com/ContinuumIO/pycosat")
10720 (synopsis "Bindings to picosat (a SAT solver)")
10722 "This package provides efficient Python bindings to @code{picosat} on
10723 the C level. When importing pycosat, the @code{picosat} solver becomes part
10724 of the Python process itself. @code{picosat} is a @dfn{Boolean Satisfiability
10725 Problem} (SAT) solver.")
10726 (license license:expat)))
10728 (define-public python2-pycosat
10729 (package-with-python2 python-pycosat))
10731 (define-public python2-ruamel.ordereddict
10733 (name "python2-ruamel.ordereddict")
10738 (uri (pypi-uri "ruamel.ordereddict" version))
10741 "1xmkl8v9l9inm2pyxgc1fm5005yxm7fkd5gv74q7lj1iy5qc8n3h"))))
10742 (build-system python-build-system)
10744 `(#:python ,python-2
10746 (modify-phases %standard-phases
10748 (add-after 'install 'check
10749 (lambda* (#:key inputs outputs #:allow-other-keys)
10750 (add-installed-pythonpath inputs outputs)
10751 (zero? (system* "python" "test/testordereddict.py")))))))
10752 (home-page "https://bitbucket.org/ruamel/ordereddict")
10753 (synopsis "Version of dict that keeps keys in insertion order")
10755 "This is an implementation of an ordered dictionary with @dfn{Key
10756 Insertion Order} (KIO: updates of values do not affect the position of the
10757 key), @dfn{Key Value Insertion Order} (KVIO, an existing key's position is
10758 removed and put at the back). The standard library module @code{OrderedDict},
10759 implemented later, implements a subset of @code{ordereddict} functionality.
10760 Sorted dictionaries are also provided. Currently only with @dfn{Key Sorted
10761 Order} (KSO, no sorting function can be specified, but a transform can be
10762 specified to apply on the key before comparison (e.g. @code{string.lower})).")
10763 (license license:expat)))
10765 (define-public python-pypeg2
10767 (name "python-pypeg2")
10772 (uri (pypi-uri "pyPEG2" version))
10775 "0v8ziaam2r637v94ra4dbjw6jzxz99gs5x4i585kgag1v204yb9b"))))
10776 (build-system python-build-system)
10777 (propagated-inputs `(("python-lxml" ,python-lxml)))
10779 ;;https://bitbucket.org/fdik/pypeg/issues/36/test-failures-on-py35
10781 (home-page "https://fdik.org/pyPEG/")
10782 (synopsis "Parsering Expression Grammars in Python")
10783 (description "PyPEG is an intrinsic parser interpreter framework for
10784 Python. It is based on Parsing Expression Grammars, PEG. With pyPEG you can
10785 parse many formal languages.")
10786 (license license:gpl2)))
10788 (define-public python-incremental
10790 (name "python-incremental")
10795 (uri (pypi-uri "incremental" version))
10798 "1cylxdz1cnkm5g3pklna3h2n0i0rks95ir1pnpxfnvpkmab1cxbv"))))
10799 (build-system python-build-system)
10800 (home-page "https://github.com/hawkowl/incremental")
10801 (synopsis "Library for versioning Python projects")
10802 (description "Incremental is a small library that versions your Python
10804 (license license:expat)))
10806 (define-public python2-incremental
10807 (package-with-python2 python-incremental))
10809 (define-public python-automat
10811 (name "python-automat")
10815 (uri (pypi-uri "Automat" version))
10818 "1a7nsrljysfmdqmpn2apfa1gg6rfah4y9sizvns8gb08rx7d07rw"))))
10819 (build-system python-build-system)
10820 ;; We disable the tests because they require python-twisted, while
10821 ;; python-twisted depends on python-automat. Twisted is optional, but the
10822 ;; tests fail if it is not available. Also see
10823 ;; <https://github.com/glyph/automat/issues/71>.
10824 (arguments '(#:tests? #f))
10826 `(("python-m2r" ,python-m2r)
10827 ("python-setuptools-scm" ,python-setuptools-scm)
10828 ("python-graphviz" ,python-graphviz)))
10830 `(("python-six" ,python-six)
10831 ("python-attrs" ,python-attrs)))
10832 (home-page "https://github.com/glyph/Automat")
10833 (synopsis "Self-service finite-state machines")
10834 (description "Automat is a library for concise, idiomatic Python
10835 expression of finite-state automata (particularly deterministic finite-state
10837 (license license:expat)))
10839 (define-public python2-automat
10840 (package-with-python2 python-automat))
10842 (define-public python-m2r
10844 (name "python-m2r")
10848 (uri (pypi-uri "m2r" version))
10851 "1axrwnf425sz4qz3c0qc7yhhki4myzb8rki7pczcsgzznzmqdyxd"))))
10852 (build-system python-build-system)
10854 `(("python-docutils" ,python-docutils)
10855 ("python-mistune" ,python-mistune)))
10857 `(("python-pygments" ,python-pygments)
10858 ("python-mock" ,python-mock)))
10859 (home-page "https://github.com/miyakogi/m2r")
10860 (synopsis "Markdown to reStructuredText converter")
10861 (description "M2R converts a markdown file including reST markups to valid
10863 (license license:expat)))
10865 (define-public python2-m2r
10866 (package-with-python2 python-m2r))
10868 (define-public python-constantly
10870 (name "python-constantly")
10874 (uri (pypi-uri "constantly" version))
10877 "0dgwdla5kfpqz83hfril716inm41hgn9skxskvi77605jbmp4qsq"))))
10878 (build-system python-build-system)
10879 (home-page "https://github.com/twisted/constantly")
10880 (synopsis "Symbolic constants in Python")
10881 (description "Constantly is a Python library that provides symbolic
10882 constant support. It includes collections and constants with text, numeric,
10883 and bit flag values.")
10884 (license license:expat)))
10886 (define-public python2-constantly
10887 (package-with-python2 python-constantly))
10889 (define-public python-attrs
10891 (name "python-attrs")
10895 (uri (pypi-uri "attrs" version))
10898 "1jafnn1kzd6qhxgprhx6y6ik1r5m2rilx25syzcmq03azp660y8w"))))
10899 (build-system python-build-system)
10901 `(("python-coverage" ,python-coverage)
10902 ("python-hypothesis" ,python-hypothesis)
10903 ("python-pytest" ,python-pytest)
10904 ("python-six" ,python-six)
10905 ("python-sphinx" ,python-sphinx)
10906 ("python-zope-interface" ,python-zope-interface)))
10907 (home-page "https://github.com/python-attrs/attrs/")
10908 (synopsis "Attributes without boilerplate")
10909 (description "@code{attrs} is a Python package with class decorators that
10910 ease the chores of implementing the most common attribute-related object
10912 (license license:expat)))
10914 (define-public python2-attrs
10915 (package-with-python2 python-attrs))
10917 (define-public python-attrs-bootstrap
10919 (inherit python-attrs)
10920 (name "python-attrs-bootstrap")
10921 (native-inputs `())
10922 (arguments `(#:tests? #f))))
10924 (define-public python2-attrs-bootstrap
10925 (package-with-python2 python-attrs-bootstrap))
10927 (define-public python2-cliapp
10929 (name "python2-cliapp")
10930 (version "1.20170823")
10934 (uri (string-append
10935 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/cliapp/snapshot/cliapp-"
10936 version ".tar.gz"))
10939 "1i9gik0xrj6jmi95s5w988jl1y265baz5xm5pbqdyvsh8h9ln6yq"))))
10940 (build-system python-build-system)
10942 `(#:python ,python-2
10944 (modify-phases %standard-phases
10945 ;; check phase needs to be run before the build phase. If not,
10946 ;; coverage-test-runner looks for tests for the built source files,
10949 (add-before 'build 'check
10951 ;; Disable python3 tests
10952 (substitute* "check"
10953 (("python3") "# python3"))
10954 (zero? (system* "./check")))))))
10956 `(("python2-coverage-test-runner" ,python2-coverage-test-runner)
10957 ("python2-pep8" ,python2-pep8)))
10959 `(("python2-pyaml" ,python2-pyaml)))
10960 (home-page "https://liw.fi/cliapp/")
10961 (synopsis "Python framework for command line programs")
10962 (description "@code{python2-cliapp} is a python framework for
10963 command line programs. It contains the typical stuff such programs
10964 need to do, such as parsing the command line for options, and
10965 iterating over input files.")
10966 (license license:gpl2+)))
10968 (define-public python2-ttystatus
10970 (name "python2-ttystatus")
10975 (uri (string-append
10976 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/ttystatus/snapshot/ttystatus-"
10977 version ".tar.gz"))
10980 "0vivqbw7ddhsq1zj3g9cvvv4f0phl0pis2smsnwcr2szz2fk3hl6"))))
10981 (build-system python-build-system)
10983 `(("python2-coverage-test-runner" ,python2-coverage-test-runner)
10984 ("python2-pep8" ,python2-pep8)))
10986 `(#:python ,python-2
10988 (modify-phases %standard-phases
10989 ;; check phase needs to be run before the build phase. If not,
10990 ;; coverage-test-runner looks for tests for the built source files,
10993 (add-before 'build 'check
10995 (zero? (system* "make" "check")))))))
10996 (home-page "https://liw.fi/ttystatus/")
10997 (synopsis "Python library for showing progress reporting and
10998 status updates on terminals")
10999 (description "@code{python2-ttystatus} is a python library for
11000 showing progress reporting and status updates on terminals, for
11001 command line programs. Output is automatically adapted to the width
11002 of the terminal: truncated if it does not fit, and resized if the
11003 terminal size changes.")
11004 (license license:gpl3+)))
11006 (define-public python2-tracing
11008 (name "python2-tracing")
11013 (uri (string-append
11014 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/python-tracing/snapshot/tracing-"
11015 version ".tar.gz"))
11018 "06cw4zg42fsvqy372vi2whj26w56vzg5axhzwdjc2bgwf03garbw"))))
11019 (build-system python-build-system)
11021 `(#:python ,python-2))
11022 (home-page "https://liw.fi/tracing/")
11023 (synopsis "Python debug logging helper")
11024 (description "@code{python2-tracing} is a python library for
11025 logging debug messages. It provides a way to turn debugging messages
11026 on and off, based on the filename they occur in. It is much faster
11027 than using @code{logging.Filter} to accomplish the same thing, which
11028 matters when code is run in production mode. The actual logging still
11029 happens using the @code{logging} library.")
11030 (license license:gpl3+)))
11032 (define-public python2-larch
11034 (name "python2-larch")
11035 (version "1.20151025")
11039 (uri (string-append
11040 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/larch/snapshot/larch-"
11041 version ".tar.gz"))
11042 (patches (search-patches
11043 "python2-larch-coverage-4.0a6-compatibility.patch"))
11046 "1p4knkkavlqymgciz2wbcnfrdgdbafhg14maplnk4vbw0q8xs663"))))
11047 (build-system python-build-system)
11049 `(#:python ,python-2
11051 (modify-phases %standard-phases
11052 ;; check phase needs to be run before the build phase. If not,
11053 ;; coverage-test-runner looks for tests for the built source files,
11056 (add-before 'build 'check
11058 (zero? (system* "make" "check")))))))
11060 `(("cmdtest" ,cmdtest)
11061 ("python2-coverage-test-runner" ,python2-coverage-test-runner)))
11063 `(("python2-tracing" ,python2-tracing)))
11064 (home-page "https://liw.fi/larch/")
11065 (synopsis "Python copy-on-write B-tree library")
11066 (description "@code{python2-larch} is an implementation of
11067 particular kind of B-tree, based on research by Ohad Rodeh. See
11068 @url{http://liw.fi/larch/ohad-btrees-shadowing-clones.pdf} for details
11069 on the data structure.
11071 The distinctive feature of this B-tree is that a node is never
11072 (conceptually) modified. Instead, all updates are done by
11073 copy-on-write. This makes it easy to clone a tree, and modify only the
11074 clone, while other processes access the original tree.")
11075 (license license:gpl3+)))
11077 (define-public python-astroid
11079 (name "python-astroid")
11084 (uri (string-append
11085 "https://github.com/PyCQA/astroid/archive/astroid-"
11086 version ".tar.gz"))
11089 "0isn5p7f9n48hmksgbrj7dkm9dyglnayzn5jngk37qywg8a74ngn"))))
11090 (build-system python-build-system)
11092 `(("python-lazy-object-proxy" ,python-lazy-object-proxy)
11093 ("python-six" ,python-six)
11094 ("python-wrapt" ,python-wrapt)))
11097 (modify-phases %standard-phases
11100 (zero? (system* "python" "-m" "unittest" "discover"
11101 "-p" "unittest*.py")))))))
11102 (home-page "https://github.com/PyCQA/astroid")
11103 (synopsis "Common base representation of python source code for pylint and
11105 (description "@code{python-astroid} provides a common base representation
11106 of python source code for projects such as pychecker, pyreverse, pylint, etc.
11108 It provides a compatible representation which comes from the _ast module. It
11109 rebuilds the tree generated by the builtin _ast module by recursively walking
11110 down the AST and building an extended ast. The new node classes have
11111 additional methods and attributes for different usages. They include some
11112 support for static inference and local name scopes. Furthermore, astroid
11113 builds partial trees by inspecting living objects.")
11114 (license license:lgpl2.1+)
11115 (properties `((python2-variant . ,(delay python2-astroid))))))
11117 (define-public python2-astroid
11118 (let ((base (package-with-python2
11119 (strip-python2-variant python-astroid))))
11120 (package (inherit base)
11122 `(("python2-backports-functools-lru-cache"
11123 ,python2-backports-functools-lru-cache)
11124 ("python2-enum34" ,python2-enum34)
11125 ("python2-singledispatch" ,python2-singledispatch)
11126 ,@(package-propagated-inputs base))))))
11128 (define-public python-isort
11130 (name "python-isort")
11135 (uri (string-append
11136 "https://github.com/timothycrosley/isort/archive/"
11137 version ".tar.gz"))
11138 (file-name (string-append name "-" version ".tar.gz"))
11141 "0zsrgkb0krn5476yncy5dd56k7dk34zqb4bnlvwy44ixgilyjmfh"))))
11142 (build-system python-build-system)
11144 `(("python-mock" ,python-mock)
11145 ("python-pytest" ,python-pytest)))
11146 (home-page "https://github.com/timothycrosley/isort")
11147 (synopsis "Python utility/library to sort python imports")
11148 (description "@code{python-isort} is a python utility/library to sort
11149 imports alphabetically, and automatically separated into sections. It
11150 provides a command line utility, a python library and plugins for various
11152 (license license:expat)))
11154 (define-public python2-isort
11155 (package-with-python2 python-isort))
11157 (define-public python2-backports-functools-lru-cache
11159 (name "python2-backports-functools-lru-cache")
11164 ;; only the pypi tarballs contain the necessary metadata
11165 (uri (pypi-uri "backports.functools_lru_cache" version))
11168 "158ysf2hb0q4p4695abfiym9x1ywg0dgh8a3apd7gqaaxjy22jj4"))))
11169 (build-system python-build-system)
11171 `(("python2-setuptools-scm" ,python2-setuptools-scm)))
11173 `(#:python ,python-2))
11174 (home-page "https://github.com/jaraco/backports.functools_lru_cache")
11175 (synopsis "Backport of functools.lru_cache from Python 3.3")
11176 (description "@code{python2-backports-functools-lru-cache} is a backport
11177 of @code{functools.lru_cache} from python 3.3.")
11178 (license license:expat)))
11180 (define-public python-configparser
11182 (name "python-configparser")
11187 (uri (string-append
11188 "https://bitbucket.org/ambv/configparser/get/"
11189 version ".tar.bz2"))
11190 (file-name (string-append name "-" version ".tar.gz"))
11193 "0waq40as14abwzbb321hfz4vr1fi363nscy32ga14qvfygrg96wa"))))
11194 (build-system python-build-system)
11195 (home-page "http://docs.python.org/py3k/library/configparser.html")
11196 (synopsis "Backport of configparser from python 3.5")
11197 (description "@code{python-configparser} is a backport of
11198 @code{configparser} from Python 3.5 so that it can be used directly
11199 in other versions.")
11200 (license license:expat)))
11202 (define-public python2-configparser
11203 (package-with-python2 python-configparser))
11205 (define-public python-mando
11207 (name "python-mando")
11211 (uri (pypi-uri "mando" version))
11214 "0q6rl085q1hw1wic52pqfndr0x3nirbxnhqj9akdm5zhq2fv3zkr"))))
11215 (build-system python-build-system)
11217 `(("python-rst2ansi" ,python-rst2ansi)
11218 ("python-six" ,python-six)))
11220 `(("python-pytest" ,python-pytest)))
11221 (home-page "https://mando.readthedocs.org/")
11223 "Wrapper around argparse, allowing creation of complete CLI applications")
11225 "This package is a wrapper around argparse, allowing you to write complete CLI
11226 applications in seconds while maintaining all the flexibility.")
11227 (license license:expat)))
11229 (define-public python2-mando
11230 (package-with-python2 python-mando))
11232 (define-public python-fudge
11234 (name "python-fudge")
11235 ;; 0.9.6 is the latest version suitable for testing the "fabric" Python 2
11236 ;; package, which is currently the only use of this package.
11241 (uri (pypi-uri "fudge" version))
11244 "185ia3vr3qk4f2s1a9hdxb8ci4qc0x0xidrad96pywg8j930qs9l"))))
11245 (build-system python-build-system)
11247 `(#:tests? #f)) ;XXX: Tests require the NoseJS Python package.
11248 (home-page "https://github.com/fudge-py/fudge")
11249 (synopsis "Replace real objects with fakes/mocks/stubs while testing")
11251 "Fudge is a Python module for using fake objects (mocks and stubs) to
11254 In readable Python code, you declare the methods available on your fake object
11255 and how they should be called. Then you inject that into your application and
11256 start testing. This declarative approach means you don’t have to record and
11257 playback actions and you don’t have to inspect your fakes after running code.
11258 If the fake object was used incorrectly then you’ll see an informative
11259 exception message with a traceback that points to the culprit.")
11260 (license license:expat)))
11262 (define-public python2-fudge
11263 (package-with-python2 python-fudge))
11265 (define-public python-mwclient
11267 (name "python-mwclient")
11272 ;; The PyPI version wouldn't contain tests.
11273 (uri (string-append "https://github.com/mwclient/mwclient/archive/"
11274 "v" version ".tar.gz"))
11275 (file-name (string-append name "-" version ".tar.gz"))
11278 "1jj0yhilkjir00719fc7w133x7hdyhkxhk6xblla4asig45klsfv"))))
11279 (build-system python-build-system)
11281 `(("python-requests" ,python-requests)
11282 ("python-requests-oauthlib"
11283 ,python-requests-oauthlib)
11284 ("python-six" ,python-six)))
11286 `(("python-mock" ,python-mock)
11287 ("python-pytest" ,python-pytest)
11288 ("python-pytest-pep8" ,python-pytest-pep8)
11289 ("python-pytest-cache" ,python-pytest-cache)
11290 ("python-pytest-cov" ,python-pytest-cov)
11291 ("python-responses" ,python-responses)))
11292 (home-page "https://github.com/btongminh/mwclient")
11293 (synopsis "MediaWiki API client")
11294 (description "This package provides a MediaWiki API client.")
11295 (license license:expat)))
11297 (define-public python2-mwclient
11298 (package-with-python2 python-mwclient))
11300 (define-public python-utils
11302 (name "python-utils")
11306 (uri (pypi-uri "python-utils" version))
11309 "1mcsy6q5am4ya72rgkpb6kax6vv7c93cfkkas89xnpa4sj9zf28p"))))
11310 (build-system python-build-system)
11312 `(("pytest-runner" ,python-pytest-runner)
11313 ("pytest" ,python-pytest)
11314 ("six" ,python-six)))
11315 (home-page "https://github.com/WoLpH/python-utils")
11316 (synopsis "Convenient utilities not included with the standard Python install")
11318 "Python Utils is a collection of small Python functions and classes which
11319 make common patterns shorter and easier.")
11320 (license license:bsd-2)))
11322 (define-public python2-utils
11323 (package-with-python2 python-utils))
11325 (define-public python-sphinx-me
11327 (name "python-sphinx-me")
11332 (uri (pypi-uri "sphinx-me" version))
11335 "06jzgp213zihnvpcy2y5jy3ykid3apc2ncp2pg6a2g05lhiziglq"))))
11336 (build-system python-build-system)
11337 (home-page "https://github.com/stephenmcd/sphinx-me")
11338 (synopsis "Create a Sphinx documentation shell")
11340 "Create a Sphinx documentation shell for your project and include the
11341 README file as the documentation index. It handles extracting the required
11342 meta data such as the project name, author and version from your project for
11343 use in your Sphinx docs.")
11344 (license license:bsd-2)))
11346 (define-public python2-sphinx-me
11347 (package-with-python2 python-sphinx-me))
11349 (define-public python-diff-match-patch
11351 (name "python-diff-match-patch")
11352 (version "20121119")
11356 (uri (pypi-uri "diff-match-patch" version))
11359 "0k1f3v8nbidcmmrk65m7h8v41jqi37653za9fcs96y7jzc8mdflx"))))
11360 (build-system python-build-system)
11361 (home-page "https://code.google.com/p/google-diff-match-patch")
11362 (synopsis "Synchronize plain text")
11363 (description "Diff Match and Patch libraries offer robust algorithms to
11364 perform the operations required for synchronizing plain text.")
11365 (license license:asl2.0)))
11367 (define-public python2-diff-match-patch
11368 (package-with-python2 python-diff-match-patch))
11370 (define-public python-dirsync
11372 (name "python-dirsync")
11377 (uri (pypi-uri "dirsync" version ".zip"))
11380 "1hcdvmkwd5512zbxpin0k7bx5bkgzy3swjx7d0kj1y45af6r75v2"))))
11381 (build-system python-build-system)
11383 `(("unzip" ,unzip)))
11385 `(("six" ,python-six)))
11386 (home-page "https://bitbucket.org/tkhyn/dirsync")
11387 (synopsis "Advanced directory tree synchronisation tool")
11388 (description "Advanced directory tree synchronisation tool.")
11389 (license license:expat)))
11391 (define-public python2-dirsync
11392 (package-with-python2 python-dirsync))
11394 (define-public python-levenshtein
11396 (name "python-levenshtein")
11401 (uri (pypi-uri "python-Levenshtein" version))
11404 "1c9ybqcja31nghfcc8xxbbz9h60s9qi12b9hr4jyl69xbvg12fh3"))))
11405 (build-system python-build-system)
11406 (home-page "https://github.com/ztane/python-Levenshtein")
11407 (synopsis "Fast computation of Levenshtein distance and string similarity")
11409 "The Levenshtein Python C extension module contains functions for fast computation of
11411 @item Levenshtein (edit) distance, and edit operations
11412 @item string similarity
11413 @item approximate median strings, and generally string averaging
11414 @item string sequence and set similarity
11416 It supports both normal and Unicode strings.")
11417 (license license:gpl2+)))
11419 (define-public python2-levenshtein
11420 (package-with-python2 python-levenshtein))
11422 (define-public python-scandir
11424 (name "python-scandir")
11429 (uri (pypi-uri "scandir" version))
11431 (base32 "0gbnhjzg42rj87ljv9kb648rfxph69ly3c8r9841dxy4d7l5pmdj"))))
11432 (build-system python-build-system)
11434 `(#:phases (modify-phases %standard-phases
11437 (invoke "python" "test/run_tests.py"))))))
11438 (home-page "https://github.com/benhoyt/scandir")
11439 (synopsis "Directory iteration function")
11441 "Directory iteration function like os.listdir(), except that instead of
11442 returning a list of bare filenames, it yields DirEntry objects that include
11443 file type and stat information along with the name. Using scandir() increases
11444 the speed of os.walk() by 2-20 times (depending on the platform and file
11445 system) by avoiding unnecessary calls to os.stat() in most cases.
11447 This package is part of the Python standard library since version 3.5.")
11448 (license license:bsd-3)))
11450 (define-public python2-scandir
11451 (package-with-python2 python-scandir))
11453 (define-public python2-stemming
11455 (name "python2-stemming")
11460 (uri (pypi-uri "stemming" version))
11462 (base32 "0ldwa24gnnxhniv0fhygkpc2mwgd93q10ag8rvzayv6hw418frsr"))))
11463 (build-system python-build-system)
11465 `(#:python ,python-2))
11466 (home-page "https://bitbucket.org/mchaput/stemming/overview")
11467 (synopsis "Python implementations of various stemming algorithms")
11469 "Python implementations of the Porter, Porter2, Paice-Husk, and Lovins
11470 stemming algorithms for English. These implementations are straightforward and
11471 efficient, unlike some Python versions of the same algorithms available on the
11472 Web. This package is an extraction of the stemming code included in the Whoosh
11474 (license license:public-domain)))
11476 (define-public python-factory-boy
11478 (name "python-factory-boy")
11483 (uri (pypi-uri "factory_boy" version))
11485 (base32 "1fvin6san5xsjh2c4y18caj2lnmwxlylyqm8mh1yc6rp38wlwr56"))))
11486 (build-system python-build-system)
11488 ;; Tests are not included in the tarball.
11491 `(("faker" ,python-faker)))
11492 (home-page "https://github.com/benhoyt/scandir")
11493 (synopsis "Versatile test fixtures replacement")
11495 "Factory_boy is a fixtures replacement based on thoughtbot’s factory_girl.
11497 As a fixtures replacement tool, it aims to replace static, hard to maintain
11498 fixtures with easy-to-use factories for complex object.
11500 Instead of building an exhaustive test setup with every possible combination
11501 of corner cases, factory_boy allows you to use objects customized for the
11502 current test, while only declaring the test-specific fields")
11503 (license license:expat)))
11505 (define-public python2-factory-boy
11506 (package-with-python2 python-factory-boy))
11508 (define-public python-translate-toolkit
11510 (name "python-translate-toolkit")
11515 (uri (pypi-uri "translate-toolkit" version ".tar.bz2"))
11517 (base32 "1vlkwrg83vb17jc36pmwh2b7jphwf390lz0jw8hakcg16qhwypvq"))))
11518 (build-system python-build-system)
11520 `(("python-pytest" ,python-pytest)
11521 ("python-sphinx" ,python-sphinx)))
11523 `(("python-babel" ,python-babel)
11524 ("python-beautifulsoup4" ,python-beautifulsoup4)
11525 ("python-chardet" ,python-chardet)
11526 ("python-diff-match-patch" ,python-diff-match-patch)
11527 ("python-levenshtein" ,python-levenshtein)
11528 ("python-lxml" ,python-lxml)
11529 ("python-six" ,python-six)
11530 ("python-vobject" ,python-vobject)
11531 ("python-pyyaml" ,python-pyyaml)))
11533 ;; TODO: tests are not run, because they end with
11534 ;; TypeError: parse() missing 2 required positional arguments: 'tree' and
11536 ;; during test setup.
11538 (home-page "http://toolkit.translatehouse.org")
11539 (synopsis "Tools and API for translation and localization engineering")
11541 "Tools and API for translation and localization engineering. It contains
11542 several utilities, as well as an API for building localization tools.")
11543 (license license:gpl2+)))
11545 (define-public python2-translate-toolkit
11546 (package-with-python2 python-translate-toolkit))
11548 (define-public python-packaging
11550 (name "python-packaging")
11555 (uri (pypi-uri "packaging" version))
11558 "17k1xbjshackwvbsnxqixbph8rbqhz4bf4g3al5xyzhavxgq6l2x"))))
11559 (build-system python-build-system)
11561 `(("python-pretend" ,python-pretend)
11562 ("python-pytest" ,python-pytest)))
11564 `(("python-pyparsing" ,python-pyparsing)
11565 ("python-six" ,python-six)))
11566 (home-page "https://github.com/pypa/packaging")
11567 (synopsis "Core utilities for Python packages")
11568 (description "Packaging is a Python module for dealing with Python packages.
11569 It offers an interface for working with package versions, names, and dependency
11571 ;; From 'LICENSE': This software is made available under the terms of
11572 ;; *either* of the licenses found in LICENSE.APACHE or LICENSE.BSD.
11573 ;; Contributions to this software is made under the terms of *both* these
11575 (license (list license:asl2.0 license:bsd-2))))
11577 (define-public python2-packaging
11578 (package-with-python2 python-packaging))
11580 (define-public python-relatorio
11582 (name "python-relatorio")
11587 (uri (pypi-uri "relatorio" version))
11590 "1na6hlhz1awi1hbjg1gyclq0khz42iz90wvdjw7mmj655788bpxx"))))
11591 (build-system python-build-system)
11593 `(("python-lxml" ,python-lxml)
11594 ("python-genshi" ,python-genshi)))
11596 `(("python-magic" ,python-magic)))
11597 (home-page "https://relatorio.tryton.org/")
11598 (synopsis "Templating library able to output ODT and PDF files")
11599 (description "Relatorio is a templating library which provides a way to
11600 easily output ODT, ODS, PNG, SVG and several other kinds of files. Support
11601 for more filetypes can be easily added by creating plugins for them.")
11602 (license license:gpl3+)))
11604 (define-public python2-relatorio
11605 (package-with-python2 python-relatorio))
11607 (define-public python-radon
11609 (name "python-radon")
11614 (uri (pypi-uri "radon" version))
11617 "07gq5hq4nrffxnlnksws9hrx7fd001gam63j62i82gyfr23gvdym"))))
11618 (build-system python-build-system)
11620 `(#:phases (modify-phases %standard-phases
11623 (invoke "python" "radon/tests/run.py"))))))
11625 `(("python-colorama" ,python-colorama)
11626 ("python-flake8-polyfill" ,python-flake8-polyfill)
11627 ("python-mando" ,python-mando)))
11629 `(("python-pytest" ,python-pytest)
11630 ("python-pytest-mock" ,python-pytest-mock)))
11631 (home-page "https://radon.readthedocs.org/")
11632 (synopsis "Code Metrics in Python")
11633 (description "Radon is a Python tool which computes various code metrics.
11634 Supported metrics are:
11636 @item raw metrics: SLOC, comment lines, blank lines, &c.
11637 @item Cyclomatic Complexity (i.e. McCabe’s Complexity)
11638 @item Halstead metrics (all of them)
11639 @item the Maintainability Index (a Visual Studio metric)
11641 (license license:expat)))
11643 (define-public python2-radon
11644 (package-with-python2 python-radon))
11646 (define-public python-sure
11648 (name "python-sure")
11653 (uri (pypi-uri "sure" version))
11656 "1iyqsy2d6radi88g1qf0lziy5b39h5cpb3g5jiqyb4xi46ig3x1z"))))
11657 (build-system python-build-system)
11659 `(("python-mock" ,python-mock)
11660 ("python-six" ,python-six)))
11662 `(("python-nose" ,python-nose)))
11663 (home-page "https://github.com/gabrielfalcao/sure")
11664 (synopsis "Automated testing library in python for python")
11666 "Sure is a python library that leverages a DSL for writing assertions.
11667 Sure is heavily inspired by @code{RSpec Expectations} and @code{should.js}.")
11668 (license license:gpl3+)))
11670 (define-public python2-sure
11671 (package-with-python2 python-sure))
11673 (define-public python2-couleur
11674 ;; This package does not seem to support python3 at all, hence,
11675 ;; only the python2 variant definition is provided.
11677 (name "python2-couleur")
11682 (uri (pypi-uri "couleur" version))
11685 "1qqaxyqz74wvid0cr119dhcwz0h0if5b5by44zl49pd5z65v58k1"))))
11686 (build-system python-build-system)
11688 `(#:python ,python-2))
11689 (home-page "https://github.com/gabrielfalcao/couleur")
11691 "ANSI terminal tool for python, colored shell and other handy fancy features")
11693 "@code{Couleur} provides python programs a way to use the ANSI features in a unix
11694 terminal such as coloured output in the shell, overwriting output, indentation, etc.")
11695 ;; README.md says ASL2.0, but all source code headers are LGPL3+.
11696 ;; https://github.com/gabrielfalcao/couleur/issues/11
11697 (license license:lgpl3+)))
11699 (define-public python-misaka
11701 (name "python-misaka")
11706 (uri (pypi-uri "misaka" version))
11709 "1yqrq3a5rracirmvk52n28nn6ckdaz897gnigv89a9gmyn87sqw7"))))
11710 (build-system python-build-system)
11712 `(;; Line 37 of setup.py calls self.run_command('develop')
11713 ;; in the 'check' phase. This command seems to be trying
11715 ;; /gnu/store/...-python-<version>/lib/python<version>/site-packages/
11716 ;; for which it does not have the permission to write.
11719 `(("python-cffi" ,python-cffi)))
11720 (home-page "https://github.com/FSX/misaka")
11721 (synopsis "Python binding for Hoedown")
11723 "@code{Misaka} is a CFFI-based binding for @code{Hoedown}, a fast markdown processing
11724 library written in C. It features a fast HTML renderer and functionality to make custom
11725 renderers (e.g. man pages or LaTeX).")
11726 (license license:expat)))
11728 (define-public python2-misaka
11729 (package-with-python2 python-misaka))
11731 (define-public python2-steadymark
11732 ;; This is forced into being a python2 only variant
11733 ;; due to its dependence on couleur that has no support
11736 (name "python2-steadymark")
11741 (uri (pypi-uri "steadymark" version))
11744 "1640i9g8dycql3cc8j0bky0jkzj0q39blfbp4lsgpkprkfgcdk8v"))))
11745 (build-system python-build-system)
11747 `(("python-couleur" ,python2-couleur)
11748 ("python-sure" ,python2-sure)
11749 ("python-misaka" ,python2-misaka)))
11751 `(#:python ,python-2
11753 (modify-phases %standard-phases
11754 (add-before 'build 'patch-setup-py
11756 ;; Update requirements from dependency==version
11757 ;; to dependency>=version
11758 (substitute* "setup.py"
11761 (home-page "https://github.com/gabrielfalcao/steadymark")
11762 (synopsis "Markdown-based test runner for python")
11764 "@code{Steadymark} allows documentation to be written in github-flavoured
11765 markdown. The documentation may contain snippets of code surrounded by python
11766 code blocks and @code{Steadymark} will find these snippets and run them, making
11767 sure that there are no old malfunctional examples in the documentation examples.")
11768 (license license:expat)))
11770 (define-public python-jsonpointer
11772 (name "python-jsonpointer")
11777 (uri (pypi-uri "jsonpointer" version))
11780 "1cg0gvgqjysydv6p45v4jywg1jb3v48c7m3cbpi57zgf6nndr9cz"))))
11781 (build-system python-build-system)
11782 (home-page "https://github.com/stefankoegl/python-json-pointer")
11783 (synopsis "Identify specific nodes in a JSON document")
11784 (description "@code{jsonpointer} allows you to access specific nodes
11785 by path in a JSON document (see RFC 6901).")
11786 (license license:bsd-3)))
11788 (define-public python2-jsonpointer
11789 (package-with-python2 python-jsonpointer))
11791 (define-public python-jsonpatch
11793 (name "python-jsonpatch")
11798 ;; pypi version lacks tests.js
11799 (uri (string-append "https://github.com/stefankoegl/python-json-patch/"
11800 "archive/v" version ".tar.gz"))
11801 (file-name (string-append name "-" version ".tar.gz"))
11804 "085ykisl8v7mv9h7hvhdy3l2fjzs4214gx32r5k6nx4f76hbv6y5"))))
11805 (build-system python-build-system)
11807 `(("python-jsonpointer" ,python-jsonpointer)))
11808 (home-page "https://github.com/stefankoegl/python-json-patch")
11809 (synopsis "Applying JSON Patches in Python 2.6+ and 3.x")
11810 (description "@code{jsonpatch} is a library and program that allows
11811 applying JSON Patches according to RFC 6902.")
11812 (license license:bsd-3)))
11814 (define-public python2-jsonpatch
11815 (package-with-python2 python-jsonpatch))
11817 (define-public python-jsonpatch-0.4
11818 (package (inherit python-jsonpatch)
11819 (name "python-jsonpatch")
11824 (uri (string-append "https://github.com/stefankoegl/python-json-patch/"
11825 "archive/v" version ".tar.gz"))
11826 (file-name (string-append name "-" version ".tar.gz"))
11829 "0j0cd9z9zyp8kppp464jxrfgrnbgkzl1yi10i5gsv8yz6d95929d"))))))
11831 (define-public python2-jsonpatch-0.4
11832 (package-with-python2 python-jsonpatch-0.4))
11834 (define-public python-rfc3986
11836 (name "python-rfc3986")
11840 (uri (pypi-uri "rfc3986" version))
11843 "06wlmysw83f75ff84zr1yr6n0shvc2xn1n1sb4iwzqap9hf5fn44"))))
11844 (build-system python-build-system)
11846 `(#:modules ((guix build utils)
11847 (guix build python-build-system)
11852 (modify-phases %standard-phases
11855 (let ((cwd (getcwd)))
11856 (setenv "PYTHONPATH"
11857 (string-append cwd "/build/"
11858 (find (cut string-prefix? "lib" <>)
11859 (scandir (string-append cwd "/build")))
11861 (getenv "PYTHONPATH")))
11862 (invoke "pytest" "-v")))))))
11864 `(("python-pytest" ,python-pytest)))
11865 (home-page "https://rfc3986.readthedocs.io/")
11866 (synopsis "Parse and validate URI references")
11868 "@code{rfc3986} is a Python implementation of RFC@tie{}3986 including
11869 validation and authority parsing. This module also supports RFC@tie{}6874
11870 which adds support for zone identifiers to IPv6 addresses.")
11871 (license license:asl2.0)))
11873 (define-public python2-rfc3986
11874 (package-with-python2 python-rfc3986))
11876 (define-public python-rfc3987
11878 (name "python-rfc3987")
11883 (uri (pypi-uri "rfc3987" version))
11886 "192pclzs2y0yaywqkrlvd0x73740q310kvqvm6jldhi619mq59wi"))))
11887 (build-system python-build-system)
11888 (home-page "https://pypi.python.org/pypi/rfc3987")
11889 (synopsis "Parsing and validation of URIs (RFC 3986) and IRIs (RFC 3987)")
11890 (description "@code{rfc3987} provides routines for parsing and
11891 validation of URIs (see RFC 3986) and IRIs (see RFC 3987).")
11892 (license license:gpl3+)))
11894 (define-public python2-rfc3987
11895 (package-with-python2 python-rfc3987))
11897 (define-public python-validate-email
11899 (name "python-validate-email")
11904 (uri (pypi-uri "validate_email" version))
11907 "1bxffaf5yz2cph8ki55vdvdypbwkvn2xr1firlcy62vqbzf1jivq"))))
11908 (build-system python-build-system)
11909 (home-page "https://github.com/syrusakbary/validate_email")
11910 (synopsis "Verifies if an email address is valid and really exists")
11911 (description "@code{validate_email} can be used to verify if an email
11912 address is valid and really exists.")
11913 (license license:lgpl3+)))
11915 (define-public python2-validate-email
11916 (package-with-python2 python-validate-email))
11918 (define-public python-flex
11920 (name "python-flex")
11925 (uri (pypi-uri "flex" version))
11928 "00pamnwla3khk8nyla7y28dq9jnh69swd7f4jfsl7sn1izs8n8zk"))))
11929 (build-system python-build-system)
11931 `(("python-click" ,python-click)
11932 ("python-iso8601" ,python-iso8601)
11933 ("python-jsonpointer" ,python-jsonpointer)
11934 ("python-pyyaml" ,python-pyyaml)
11935 ("python-requests" ,python-requests)
11936 ("python-rfc3987" ,python-rfc3987)
11937 ("python-six" ,python-six)
11938 ("python-validate-email" ,python-validate-email)))
11939 (home-page "https://github.com/pipermerriam/flex")
11940 (synopsis "Validates Swagger schemata")
11941 (description "@code{flex} can be used to validate Swagger schemata.")
11942 (license license:bsd-3)))
11944 (define-public python2-flex
11945 (package-with-python2 python-flex))
11947 (define-public python-marshmallow
11949 (name "python-marshmallow")
11950 (version "3.0.0b3")
11954 (uri (pypi-uri "marshmallow" version))
11957 "07mcrij1yvk85lvgx44wwr9pc80xryghvlgayb057g1cazcypysd"))))
11958 (build-system python-build-system)
11960 `(("python-dateutil" ,python-dateutil)
11961 ("python-simplejson" ,python-simplejson)))
11963 `(("python-pytest" ,python-pytest)
11964 ("python-pytz" ,python-pytz)))
11965 (home-page "https://github.com/marshmallow-code/marshmallow")
11966 (synopsis "Convert complex datatypes to and from native
11967 Python datatypes.")
11968 (description "@code{marshmallow} provides a library for converting
11969 complex datatypes to and from native Python datatypes.")
11970 (license license:expat)))
11972 (define-public python2-marshmallow
11973 (package-with-python2 python-marshmallow))
11975 (define-public python-apispec
11977 (name "python-apispec")
11982 (uri (pypi-uri "apispec" version))
11985 "0kxa8723zbisx10363yh4mmmn4higxrspymbjfz5zq8f644zagm9"))))
11986 (build-system python-build-system)
11988 `(("python-pyyaml" ,python-pyyaml)))
11990 `(("python-pytest" ,python-pytest)
11991 ("python-flask" ,python-flask)
11992 ("python-marshmallow" ,python-marshmallow)
11993 ("python-tornado" ,python-tornado)
11994 ("python-bottle" ,python-bottle)
11995 ("python-mock" ,python-mock)))
11996 (home-page "https://github.com/marshmallow-code/apispec")
11997 (synopsis "Swagger 2.0 API specification generator")
11998 (description "@code{python-apispec} is a pluggable API specification
11999 generator. Currently supports the OpenAPI specification (f.k.a.
12001 (license license:expat)))
12003 (define-public python2-apispec
12004 (package-with-python2 python-apispec))
12006 (define-public python-flasgger
12008 (name "python-flasgger")
12013 (uri (string-append "https://github.com/rochacbruno/flasgger/archive/"
12014 version ".tar.gz"))
12015 (file-name (string-append name "-" version ".tar.gz"))
12018 "1gqzlm0rb55fdpsy5ipkganlx9cnpi454fqyycr03jm22zql14ay"))))
12019 (build-system python-build-system)
12022 (modify-phases %standard-phases
12024 (lambda* (#:key inputs outputs #:allow-other-keys)
12025 (substitute* "Makefile"
12026 (("flake8 flasgger --ignore=F403")
12027 "flake8 flasgger --ignore=E731,F403"))
12028 (setenv "PYTHONPATH" (string-append (getcwd)
12030 (getenv "PYTHONPATH")))
12031 (zero? (system* "py.test")))))))
12033 `(("python-flask" ,python-flask)
12034 ("python-pyyaml" ,python-pyyaml)
12035 ("python-jsonschema" ,python-jsonschema)
12036 ("python-mistune" ,python-mistune)
12037 ("python-six" ,python-six)))
12039 `(("python-decorator" ,python-decorator)
12040 ("python-flake8" ,python-flake8)
12041 ("python-flask-restful" ,python-flask-restful)
12042 ("python-flex" ,python-flex)
12043 ("python-pytest" ,python-pytest)
12044 ("python-pytest-cov" ,python-pytest-cov)
12045 ("python-marshmallow" ,python-marshmallow)
12046 ("python-apispec" ,python-apispec)))
12047 (home-page "https://github.com/rochacbruno/flasgger/")
12048 (synopsis "Extract Swagger specs from your Flask project")
12049 (description "@code{python-flasgger} allows extracting Swagger specs
12050 from your Flask project. It is a fork of Flask-Swagger.")
12051 (license license:expat)))
12053 (define-public python2-flasgger
12054 (package-with-python2 python-flasgger))
12056 (define-public python-swagger-spec-validator
12058 (name "python-swagger-spec-validator")
12063 (uri (pypi-uri "swagger-spec-validator" version))
12066 "13hkpn2lycwr0468yqhjb3kwszqf7hjwlq61w7vdxq1caz31k4nw"))))
12067 (build-system python-build-system)
12069 `(("python-jsonschema" ,python-jsonschema)
12070 ("python-six" ,python-six)))
12072 "https://github.com/Yelp/swagger_spec_validator")
12073 (synopsis "Validation of Swagger specifications")
12074 (description "@code{swagger_spec_validator} provides a library for
12075 validating Swagger API specifications.")
12076 (license license:asl2.0)))
12078 (define-public python2-swagger-spec-validator
12079 (package-with-python2 python-swagger-spec-validator))
12081 (define-public python-apache-libcloud
12083 (name "python-apache-libcloud")
12088 (uri (pypi-uri "apache-libcloud" version))
12091 "1a71z02ckcxld72k4qgmdnkjan52c4wczncs3p2mp5yafh7dsan7"))))
12092 (build-system python-build-system)
12095 (modify-phases %standard-phases
12096 (add-after 'unpack 'patch-ssh
12097 (lambda* (#:key inputs #:allow-other-keys)
12098 (substitute* "libcloud/compute/ssh.py"
12099 (("'ssh'") (string-append "'" (assoc-ref inputs "openssh")
12102 (add-after 'unpack 'patch-tests
12104 (substitute* "./libcloud/test/test_file_fixtures.py"
12105 ;; See <https://issues.apache.org/jira/browse/LIBCLOUD-923>.
12106 (("def _ascii") "def _raw_data(self, method, url, body, headers):
12107 return (httplib.OK,
12109 {\"test\": \"value\"},
12110 httplib.responses[httplib.OK])
12112 (substitute* "libcloud/test/compute/test_ssh_client.py"
12113 (("class ShellOutSSHClientTests")
12114 "@unittest.skip(\"Guix container doesn't have ssh service\")
12115 class ShellOutSSHClientTests")
12116 ;; See <https://issues.apache.org/jira/browse/LIBCLOUD-924>.
12117 (("'.xf0.x90.x8d.x88'") "b'\\xF0\\x90\\x8D\\x88'")
12118 (("'.xF0', '.x90', '.x8D', '.x88'")
12119 "b'\\xF0', b'\\x90', b'\\x8D', b'\\x88'"))
12122 `(("openssh" ,openssh)))
12124 `(("python-paramiko" ,python-paramiko)
12125 ("python-requests" ,python-requests)))
12127 `(("python-lockfile" ,python-lockfile)
12128 ("python-mock" ,python-mock)
12129 ("python-requests-mock" ,python-requests-mock)))
12130 (home-page "https://libcloud.apache.org/")
12131 (synopsis "Unified Cloud API")
12132 (description "@code{libcloud} is a Python library for interacting with
12133 many of the popular cloud service providers using a unified API.")
12134 (license license:asl2.0)))
12136 (define-public python2-apache-libcloud
12137 (package-with-python2 python-apache-libcloud))
12139 (define-public python-smmap2
12141 (name "python-smmap2")
12146 (uri (pypi-uri "smmap2" version))
12149 "1hvn28p3zvxa98sbi9lrqvv2ps4q284j4jq9a619zw0m7yv0sly7"))))
12150 (build-system python-build-system)
12152 `(("python-nosexcover" ,python-nosexcover)))
12153 (home-page "https://github.com/Byron/smmap")
12154 (synopsis "Python sliding window memory map manager")
12155 (description "@code{smmap2} is a pure Python implementation of a sliding
12156 window memory map manager.")
12157 (license license:bsd-3)))
12159 (define-public python2-smmap2
12160 (package-with-python2 python-smmap2))
12162 (define-public python-regex
12164 (name "python-regex")
12165 (version "2017.06.07")
12168 (uri (pypi-uri "regex" version))
12171 "06r6b7yigikbj3a72whl85r2b64pj1r0ypmw9yalmkm0wnxq8mz4"))))
12172 (build-system python-build-system)
12173 (home-page "https://bitbucket.org/mrabarnett/mrab-regex")
12174 (synopsis "Alternative regular expression module")
12175 (description "This regular expression implementation is backwards-
12176 compatible with the standard @code{re} module, but offers additional
12177 functionality like full case-folding for case-insensitive matches in Unicode.")
12178 (license license:psfl)))
12180 (define-public python2-regex
12181 (package-with-python2 python-regex))
12183 (define-public python2-pyopengl
12185 (name "python2-pyopengl")
12190 (uri (pypi-uri "PyOpenGL" version))
12193 "1byxjj6a8rwzhxhjqlc588zdad2qwxdd7vlam2653ylll31waiwv"))))
12195 `(#:python ,python-2))
12196 (build-system python-build-system)
12197 (home-page "http://pyopengl.sourceforge.net")
12198 (synopsis "Standard OpenGL bindings for Python")
12200 "PyOpenGL is the most common cross platform Python binding to OpenGL and
12201 related APIs. The binding is created using the standard @code{ctypes}
12203 (license license:bsd-3)))
12205 (define-public python2-pyopengl-accelerate
12207 (inherit python2-pyopengl)
12208 (name "python2-pyopengl-accelerate")
12213 (uri (pypi-uri "PyOpenGL-accelerate" version))
12216 "0464c1ifzk0k92lyndikmvzjgnx1y25r7bkkc8pnxm4kp1q4czwj"))))
12217 (synopsis "Acceleration code for PyOpenGL")
12219 "This is the Cython-coded accelerator module for PyOpenGL.")))
12221 (define-public python-rencode
12223 (name "python-rencode")
12228 (uri (pypi-uri "rencode" version))
12231 "08if5yax1xn5yfp8p3765ccjmfcv9di7i4m5jckgnwvdsgznwkbj"))))
12232 (build-system python-build-system)
12233 (native-inputs `(("pkg-config" ,pkg-config)
12234 ("python-cython" ,python-cython)))
12235 (home-page "https://github.com/aresch/rencode")
12236 (synopsis "Serialization of heterogeneous data structures")
12238 "The @code{rencode} module is a data structure serialization library,
12239 similar to @code{bencode} from the BitTorrent project. For complex,
12240 heterogeneous data structures with many small elements, r-encoding stake up
12241 significantly less space than b-encodings. This version of rencode is a
12242 complete rewrite in Cython to attempt to increase the performance over the
12243 pure Python module.")
12244 (license license:bsd-3)))
12246 (define-public python2-rencode
12247 (package-with-python2 python-rencode))
12249 (define-public python-xenon
12251 (name "python-xenon")
12256 (uri (pypi-uri "xenon" version))
12259 "14kby2y48vp3sgwxqlm5d5789yibqwb1qli5fwcmdqg3iayrbklc"))))
12260 (build-system python-build-system)
12262 `(("python-pyyaml" ,python-pyyaml)
12263 ("python-radon" ,python-radon)
12264 ("python-requests" ,python-requests)
12265 ("python-flake8" ,python-flake8)
12266 ("python-tox" ,python-tox)))
12269 (modify-phases %standard-phases
12270 (add-before 'build 'patch-test-requirements
12271 (lambda* (#:key inputs #:allow-other-keys)
12272 ;; Update requirements from dependency==version to
12273 ;; dependency>=version.
12274 (substitute* "requirements.txt"
12277 ;; Remove httpretty dependency for tests.
12278 (substitute* "setup.py"
12279 (("httpretty") ""))
12281 (home-page "https://xenon.readthedocs.org/")
12282 (synopsis "Monitor code metrics for Python on your CI server")
12284 "Xenon is a monitoring tool based on Radon. It monitors code complexity.
12285 Ideally, @code{xenon} is run every time code is committed. Through command
12286 line options, various thresholds can be set for the complexity of code. It
12287 will fail (i.e. it will exit with a non-zero exit code) when any of these
12288 requirements is not met.")
12289 (license license:expat)))
12291 (define-public python2-xenon
12292 (package-with-python2 python-xenon))
12294 (define-public python-pysocks
12296 (name "python-pysocks")
12301 (uri (pypi-uri "PySocks" version))
12304 "1krkiss578zqwcg4c8iqz1hwscwhsvy2djp3xyvps5gsgvr2j0yh"))))
12305 (build-system python-build-system)
12306 (arguments `(#:tests? #f))
12307 (home-page "https://github.com/Anorov/PySocks")
12308 (synopsis "SOCKS client module")
12309 (description "@code{pysocks} is an updated and semi-actively maintained
12310 version of @code{SocksiPy} with bug fixes and extra features.")
12311 (license license:bsd-3)))
12313 (define-public python2-pysocks
12314 (package-with-python2 python-pysocks))
12316 (define-public python-pydiff
12318 (name "python-pydiff")
12323 (uri (pypi-uri "pydiff" version))
12326 "1als83h9w0gab24ipyna6khm390qmpnpkc5jksmdbs2xc8hp2z44"))))
12327 (build-system python-build-system)
12328 (home-page "https://github.com/myint/pydiff")
12329 (synopsis "Library to diff two Python files at the bytecode level")
12331 "@code{pydiff} makes it easy to look for actual code changes while
12332 ignoring formatting changes.")
12333 (license license:expat)))
12335 (define-public python2-pydiff
12336 (package-with-python2 python-pydiff))
12338 (define-public python-tqdm
12340 (name "python-tqdm")
12345 (uri (pypi-uri "tqdm" version))
12348 "1pw0ngm0zn9papdmkwipi3yih5c3di6d0w849bdmrraq4d2d9h2y"))))
12349 (build-system python-build-system)
12351 `(("python-flake8" ,python-flake8)
12352 ("python-nose" ,python-nose)
12353 ("python-coverage" ,python-coverage)))
12354 (home-page "https://github.com/tqdm/tqdm")
12355 (synopsis "Fast, extensible progress meter")
12357 "Make loops show a progress bar on the console by just wrapping any
12358 iterable with @code{|tqdm(iterable)|}. Offers many options to define
12359 design and layout.")
12360 (license (list license:mpl2.0 license:expat))))
12362 (define-public python2-tqdm
12363 (package-with-python2 python-tqdm))
12365 (define-public python-pkginfo
12367 (name "python-pkginfo")
12372 (uri (pypi-uri "pkginfo" version))
12375 "0x6lm17p1ks031mj6pajyp4rkq74vpqq8qwjb7ikgwmkli1day2q"))))
12376 (build-system python-build-system)
12378 ;; The tests are broken upstream.
12381 "https://code.launchpad.net/~tseaver/pkginfo/trunk")
12383 "Query metadatdata from sdists, bdists, and installed packages")
12385 "API to query the distutils metadata written in @file{PKG-INFO} inside a
12386 source distriubtion (an sdist) or a binary distribution (e.g., created by
12387 running bdist_egg). It can also query the EGG-INFO directory of an installed
12388 distribution, and the *.egg-info stored in a \"development checkout\" (e.g,
12389 created by running @code{python setup.py develop}).")
12390 (license license:expat)))
12392 (define-public python2-pkginfo
12393 (package-with-python2 python-pkginfo))
12395 (define-public python-twine
12397 (name "python-twine")
12402 (uri (pypi-uri "twine" version))
12405 "1ay1b6kdq6k4bfbjsvf6ymj41wrgpvinhxndb09355pwhxwmp96a"))))
12406 (build-system python-build-system)
12408 `(("python-tqdm" ,python-tqdm)
12409 ("python-pkginfo" ,python-pkginfo)
12410 ("python-requests" ,python-requests)
12411 ("python-requests-toolbelt" ,python-requests-toolbelt)))
12412 (home-page "https://github.com/pypa/twine")
12413 (synopsis "Collection of utilities for interacting with PyPI")
12415 "@code{twine} currently supports registering projects and uploading
12416 distributions. It authenticates the user over HTTPS, allows them to pre-sign
12417 their files and supports any packaging format (including wheels).")
12418 (license license:asl2.0)))
12420 (define-public python2-twine
12421 (package-with-python2 python-twine))
12423 (define-public python-linecache2
12425 (name "python-linecache2")
12430 (uri (pypi-uri "linecache2" version))
12433 "0z79g3ds5wk2lvnqw0y2jpakjf32h95bd9zmnvp7dnqhf57gy9jb"))))
12434 (build-system python-build-system)
12436 `(;; The tests depend on unittest2, and our version is a bit too old.
12439 `(("python-pbr" ,python-pbr-minimal)))
12441 "https://github.com/testing-cabal/linecache2")
12442 (synopsis "Backports of the linecache module")
12444 "The linecache module allows one to get any line from any file, while
12445 attempting to optimize internally, using a cache, the common case where many
12446 lines are read from a single file.")
12447 (license license:psfl)))
12449 (define-public python2-linecache2
12450 (package-with-python2 python-linecache2))
12452 (define-public python-traceback2
12454 (name "python-traceback2")
12459 (uri (pypi-uri "traceback2" version))
12462 "0c1h3jas1jp1fdbn9z2mrgn3jj0hw1x3yhnkxp7jw34q15xcdb05"))))
12463 (build-system python-build-system)
12465 `(;; python-traceback2 and python-unittest2 depend on one another.
12468 `(("python-pbr" ,python-pbr-minimal)))
12470 `(("python-linecache2" ,python-linecache2)))
12472 "https://github.com/testing-cabal/traceback2")
12473 (synopsis "Backports of the traceback module")
12475 "This module provides a standard interface to extract, format and print
12476 stack traces of Python programs. It exactly mimics the behavior of the Python
12477 interpreter when it prints a stack trace.")
12478 (license license:psfl)))
12480 (define-public python2-traceback2
12481 (package-with-python2 python-traceback2))
12483 (define-public python-ratelimiter
12485 (name "python-ratelimiter")
12490 (uri (pypi-uri "ratelimiter" version))
12493 "1dhz85mj5bqd2mij84ncs6pz32hgidr79hay4aqfmzaa4rbb497p"))))
12494 (build-system python-build-system)
12496 '(#:tests? #f)) ; There are no tests in the pypi archive.
12497 (home-page "https://github.com/RazerM/ratelimiter")
12498 (synopsis "Simple rate limiting object")
12500 "The @code{ratelimiter} module ensures that an operation will not be
12501 executed more than a given number of times during a given period.")
12502 (license license:asl2.0)))
12504 (define-public python2-ratelimiter
12505 (package-with-python2 python-ratelimiter))
12507 (define-public python-dukpy
12509 (name "python-dukpy")
12514 (uri (string-append "https://github.com/kovidgoyal/dukpy/archive/v"
12515 version ".tar.gz"))
12516 (file-name (string-append name "-" version ".tar.gz"))
12519 "0pj39rfwlzivqm5hkrsza7gssg6ggpxlq5ivc8f3h7x5pfgc6y6c"))))
12520 (build-system python-build-system)
12521 (home-page "https://github.com/kovidgoyal/dukpy")
12522 (synopsis "Run JavaScript in python")
12524 "dukpy is a JavaScript runtime environment for Python using the duktape
12525 embeddable JavaScript engine.")
12526 ;; Dukpy is licensed under MIT like the embedded duktape library,
12527 ;; with 'errors.c' as GPL3.
12528 (license (list license:expat license:gpl3))))
12530 (define-public python2-dukpy
12531 (package-with-python2 python-dukpy))
12533 (define-public python-jsonrpclib-pelix
12535 (name "python-jsonrpclib-pelix")
12540 (uri (pypi-uri "jsonrpclib-pelix" version))
12543 "1qs95vxplxwspbrqy8bvc195s58iy43qkf75yrjfql2sim8b25sl"))))
12544 (build-system python-build-system)
12545 (home-page "https://github.com/tcalmant/jsonrpclib/")
12546 (synopsis "JSON-RPC 2.0 client library for Python")
12548 "This library implements the JSON-RPC v2.0
12549 specification (backwards-compatible) as a client library for Python. This
12550 version is a fork of jsonrpclib by Josh Marshall, usable with Pelix remote
12552 (license license:asl2.0)))
12554 (define-public python2-jsonrpclib-pelix
12555 (package-with-python2 python-jsonrpclib-pelix))
12557 (define-public python-setuptools-scm-git-archive
12559 (name "python-setuptools-scm-git-archive")
12564 (uri (pypi-uri "setuptools_scm_git_archive" version))
12567 "1nii1sz5jq75ilf18bjnr11l9rz1lvdmyk66bxl7q90qan85yhjj"))))
12568 (build-system python-build-system)
12570 `(("python-pytest" ,python-pytest)))
12572 `(("python-setuptools-scm" ,python-setuptools-scm)))
12573 (home-page "https://github.com/Changaco/setuptools_scm_git_archive/")
12574 (synopsis "Setuptools_scm plugin for git archives")
12576 "The setuptools_scm_git_archive package is a plugin to
12577 setuptools_scm, which supports obtaining versions from git archives that
12578 belong to tagged versions.")
12579 (license license:expat)))
12581 (define-public python2-setuptools-scm-git-archive
12582 (package-with-python2 python-setuptools-scm-git-archive))
12584 (define-public python-pyclipper
12586 (name "python-pyclipper")
12591 (uri (pypi-uri "pyclipper" version ".zip"))
12594 "1zpmwv3bya3j984y5cf9x9d5108kf6mxldcba68wiq0frv5qrssw"))))
12595 (build-system python-build-system)
12597 `(#:tests? #f)); 8 Tests fail, 37 succeed
12599 `(("python-setuptools-scm-git-archive" ,python-setuptools-scm-git-archive)))
12601 `(("unzip" ,unzip)))
12602 (home-page "https://github.com/greginvm/pyclipper")
12603 (synopsis "Wrapper for Angus Johnson's Clipper library")
12605 "Pyclipper is a Cython wrapper for the C++ translation of the
12606 Angus Johnson's polygon clipping Clipper library (ver. 6.2.1).")
12607 (license license:expat)))
12609 (define-public python2-pyclipper
12610 (package-with-python2 python-pyclipper))
12612 (define-public python2-booleanoperations
12614 (name "python2-booleanoperations")
12619 (uri (pypi-uri "booleanOperations" version ".zip"))
12622 "1hw42fazdpvsn77glx96hwsj9l17mvx37sc5707s08y5w6fx16mn"))))
12623 (build-system python-build-system)
12625 `(#:python ,python-2))
12628 ("python2-pytest" ,python2-pytest)
12629 ("python2-pytest-runner" ,python2-pytest-runner)))
12631 `(("python-fonttools" ,python2-fonttools)
12632 ("python-pyclipper" ,python2-pyclipper)
12633 ("python-ufolib" ,python2-ufolib)))
12634 (home-page "https://github.com/typemytype/booleanOperations")
12635 (synopsis "Boolean operations on paths")
12637 "BooleanOperations provides a Python library that enables
12638 boolean operations on paths.")
12639 (license license:expat)))
12641 (define-public python-tempdir
12643 (name "python-tempdir")
12648 (uri (pypi-uri "tempdir" version))
12651 "13msyyxqbicr111a294x7fsqbkl6a31fyrqflx3q7k547gnq15k8"))))
12652 (build-system python-build-system)
12653 (home-page "https://pypi.org/project/tempdir/")
12655 ;; the package has no tests
12657 (synopsis "Python library for managing temporary directories")
12659 "This library manages temporary directories that are automatically
12660 deleted with all their contents when they are no longer needed. It is
12661 particularly convenient for use in tests.")
12662 (license license:expat)))
12664 (define-public python2-tempdir
12665 (package-with-python2 python-tempdir))
12667 (define-public python-activepapers
12669 (name "python-activepapers")
12674 (uri (pypi-uri "ActivePapers.Py" version))
12677 "12wkhjh90ffipjzv10swndp2xv9hd7xrxvg6v0n4n3i411pj4xb8"))))
12678 (build-system python-build-system)
12680 `(#:modules ((ice-9 ftw)
12683 (guix build python-build-system))
12686 (modify-phases %standard-phases
12687 (add-after 'unpack 'delete-python2-code
12689 (for-each delete-file
12690 '("lib/activepapers/builtins2.py"
12691 "lib/activepapers/standardlib2.py"
12692 "lib/activepapers/utility2.py"))))
12695 ;; Deactivate the test cases that download files
12696 (setenv "NO_NETWORK_ACCESS" "1")
12697 ;; For some strange reason, some tests fail if nosetests runs all
12698 ;; test modules in a single execution. They pass if each test
12699 ;; module is run individually.
12700 (for-each (lambda (filename)
12701 (invoke "nosetests"
12702 (string-append "tests/" filename)))
12705 (string-suffix? ".py" filename)))))))))
12707 `(("python-tempdir" ,python-tempdir)
12708 ("python-nose" ,python-nose)))
12710 `(("python-h5py" ,python-h5py)))
12711 (home-page "http://www.activepapers.org/")
12712 (synopsis "Executable papers for scientific computing")
12714 "ActivePapers is a tool for working with executable papers, which
12715 combine data, code, and documentation in single-file packages,
12716 suitable for publication as supplementary material or on repositories
12717 such as figshare or Zenodo.")
12718 (properties `((python2-variant . ,(delay python2-activepapers))))
12719 (license license:bsd-3)))
12721 (define-public python2-activepapers
12722 (let ((base (package-with-python2
12723 (strip-python2-variant python-activepapers))))
12727 (substitute-keyword-arguments (package-arguments base)
12729 `(modify-phases ,phases
12730 (delete 'delete-python2-code)
12731 (add-after 'unpack 'delete-python3-code
12733 (for-each delete-file
12734 '("lib/activepapers/builtins3.py"
12735 "lib/activepapers/standardlib3.py"
12736 "lib/activepapers/utility3.py")))))))))))
12738 (define-public python-semver
12740 (name "python-semver")
12745 (uri (pypi-uri "semver" version))
12748 "0hhgqppchv59rqj0yzi1prdg2nfsywqmjsqy2rycyxm0hvxmbyqz"))))
12749 (build-system python-build-system)
12752 (modify-phases %standard-phases
12753 (add-after 'unpack 'patch-test-requirements
12755 (substitute* "setup.py"
12756 ;; Our Python is new enough.
12757 (("'virtualenv<14\\.0\\.0'") "'virtualenv'"))
12760 `(("python-tox" ,python-tox)
12761 ("python-virtualenv" ,python-virtualenv)))
12762 (home-page "https://github.com/k-bx/python-semver")
12763 (synopsis "Python helper for Semantic Versioning")
12764 (description "This package provides a Python library for
12765 @url{Semantic Versioning, http://semver.org/}.")
12766 (license license:bsd-3)))
12768 (define-public python2-semver
12769 (package-with-python2 python-semver))
12771 (define-public python2-pyro
12773 (name "python2-pyro")
12778 (uri (pypi-uri "Pyro" version))
12779 (file-name (string-append "Pyro-" version ".tar.gz"))
12782 "0y75wzdqbjy565rpxaxscav4j8xg060sa90lnmb7aypgaf251v8v"))))
12783 (build-system python-build-system)
12785 ;; Pyro is not compatible with Python 3
12786 `(#:python ,python-2
12787 ;; Pyro has no test cases for automatic execution
12789 (home-page "http://pythonhosted.org/Pyro/")
12790 (synopsis "Distributed object manager for Python")
12791 (description "Pyro is a Distributed Object Technology system
12792 written in Python that is designed to be easy to use. It resembles
12793 Java's Remote Method Invocation (RMI). It has less similarity to CORBA,
12794 which is a system and language independent Distributed Object Technology
12795 and has much more to offer than Pyro or RMI. Pyro 3.x is no
12796 longer maintained. New projects should use Pyro4 instead, which
12797 is the new Pyro version that is actively developed.")
12798 (license license:expat)))
12800 (define-public python2-scientific
12802 (name "python2-scientific")
12807 (uri (string-append "https://bitbucket.org/khinsen/"
12808 "scientificpython/downloads/ScientificPython-"
12809 version ".tar.gz"))
12810 (file-name (string-append "ScientificPython-" version ".tar.gz"))
12813 "0fc69zhlsn9d2jvbzyjl9ah53vj598h84nkq230c83ahfvgzx5y3"))))
12814 (build-system python-build-system)
12816 `(("netcdf" ,netcdf)))
12818 `(("python-numpy" ,python2-numpy-1.8)
12819 ("python-pyro" ,python2-pyro)))
12821 ;; ScientificPython is not compatible with Python 3
12822 `(#:python ,python-2
12823 #:tests? #f ; No test suite
12825 (modify-phases %standard-phases
12827 (lambda* (#:key inputs #:allow-other-keys)
12828 (zero? (system* "python" "setup.py" "build"
12829 (string-append "--netcdf_prefix="
12830 (assoc-ref inputs "netcdf")))))))))
12831 (home-page "https://bitbucket.org/khinsen/scientificpython")
12832 (synopsis "Python modules for scientific computing")
12833 (description "ScientificPython is a collection of Python modules that are
12834 useful for scientific computing. Most modules are rather general (Geometry,
12835 physical units, automatic derivatives, ...) whereas others are more
12836 domain-specific (e.g. netCDF and PDB support). The library is currently
12837 not actively maintained and works only with Python 2 and NumPy < 1.9.")
12838 (license license:cecill-c)))
12840 (define-public python2-mmtk
12842 (name "python2-mmtk")
12847 (uri (string-append "https://bitbucket.org/khinsen/"
12848 "mmtk/downloads/MMTK-" version ".tar.gz"))
12849 (file-name (string-append "MMTK-" version ".tar.gz"))
12852 "1d0nnjx4lwsvh8f99vv1r6gi50d93yba0adkz8b4zgv4za4c5862"))))
12853 (build-system python-build-system)
12855 `(("netcdf" ,netcdf)))
12857 `(("python-scientific" ,python2-scientific)
12858 ("python-tkinter" ,python-2 "tk")))
12860 `(#:python ,python-2
12863 (modify-phases %standard-phases
12864 (add-before 'build 'includes-from-scientific
12865 (lambda* (#:key inputs #:allow-other-keys)
12866 (mkdir-p "Include/Scientific")
12869 (assoc-ref inputs "python-scientific")
12870 "/include/python2.7/Scientific")
12871 "Include/Scientific"))))))
12872 (home-page "http://dirac.cnrs-orleans.fr/MMTK")
12873 (synopsis "Python library for molecular simulation")
12874 (description "MMTK is a library for molecular simulations with an emphasis
12875 on biomolecules. It provides widely used methods such as Molecular Dynamics
12876 and normal mode analysis, but also basic routines for implementing new methods
12877 for simulation and analysis. The library is currently not actively maintained
12878 and works only with Python 2 and NumPy < 1.9.")
12879 (license license:cecill-c)))
12881 (define-public python-phonenumbers
12883 (name "python-phonenumbers")
12888 (uri (pypi-uri "phonenumbers" version))
12891 "03fmrgb4r8x3ykmddjs9i3zhs703in8smikj3a6447blqpimwyh1"))))
12892 (build-system python-build-system)
12894 "https://github.com/daviddrysdale/python-phonenumbers")
12896 "Python library for dealing with international phone numbers")
12898 "This package provides a Python port of Google's libphonenumber library.")
12899 (license license:asl2.0)))
12901 (define-public python2-phonenumbers
12902 (package-with-python2 python-phonenumbers))
12904 (define-public python-yapf
12906 (name "python-yapf")
12911 (uri (pypi-uri "yapf" version))
12914 "144gc7d6b1415vh02409rnb8qd5kxi6mxlr7y64d5cizgxbf72kx"))))
12915 (build-system python-build-system)
12916 (home-page "https://github.com/google/yapf")
12917 (synopsis "Formatter for Python code")
12918 (description "YAPF is a formatter for Python code. It's based off of
12919 @dfn{clang-format}, developed by Daniel Jasper. In essence, the algorithm
12920 takes the code and reformats it to the best formatting that conforms to the
12921 style guide, even if the original code didn't violate the style guide.")
12922 (license license:asl2.0)))
12924 (define-public python2-yapf
12925 (package-with-python2 python-yapf))
12927 (define-public python-gyp
12928 (let ((commit "5e2b3ddde7cda5eb6bc09a5546a76b00e49d888f")
12931 (name "python-gyp")
12932 ;; Google does not release versions,
12933 ;; based on second most recent commit date.
12934 (version (git-version "0.0.0" revision commit))
12937 ;; Google does not release tarballs,
12938 ;; git checkout is needed.
12940 (uri (git-reference
12941 (url "https://chromium.googlesource.com/external/gyp")
12943 (file-name (git-file-name name version))
12946 "0fr7nxcrk292djmxzpcjaphnsd123k31gp8jnd91vwknhq6snmv9"))))
12947 (build-system python-build-system)
12948 (home-page "https://gyp.gsrc.io/")
12949 (synopsis "GYP is a Meta-Build system")
12951 "GYP builds build systems for large, cross platform applications.
12952 It can be used to generate XCode projects, Visual Studio projects, Ninja build
12953 files, and Makefiles.")
12954 (license license:bsd-3))))
12956 (define-public python2-gyp
12957 (package-with-python2 python-gyp))
12959 (define-public python-whatever
12961 (name "python-whatever")
12966 (uri (string-append "https://github.com/Suor/whatever/archive/" version
12970 "1iqvnaf0zpc6b4rvbqq4xy45mszcscyzpzknv8wg6j84pbp22sap"))
12971 (file-name (string-append name "-" version ".tar.gz"))))
12972 (build-system python-build-system)
12975 (modify-phases %standard-phases
12978 (invoke "py.test"))))))
12980 `(("python-pytest" ,python-pytest)))
12981 (home-page "http://github.com/Suor/whatever")
12982 (synopsis "Make anonymous functions by partial application of operators")
12983 (description "@code{whatever} provides an easy way to make anonymous
12984 functions by partial application of operators.")
12985 (license license:bsd-3)))
12987 (define-public python2-whatever
12988 (package-with-python2 python-whatever))
12990 (define-public python-funcy
12992 (name "python-funcy")
12997 (uri (string-append "https://github.com/Suor/funcy/archive/" version
13001 "1fanxivsip29vgarw6dn39xym3q4pbxcpa11plpp548lvxajpahz"))
13002 (file-name (string-append name "-" version ".tar.gz"))))
13003 (build-system python-build-system)
13006 (modify-phases %standard-phases
13009 (invoke "py.test"))))))
13011 `(("python-pytest" ,python-pytest)
13012 ("python-whatever" ,python-whatever)))
13013 (home-page "http://github.com/Suor/funcy")
13014 (synopsis "Functional tools")
13015 (description "@code{funcy} is a library that provides functional tools.
13018 @item merge - Merges collections of the same type
13019 @item walk - Type-preserving map
13020 @item select - Selects a part of a collection
13021 @item take - Takes the first n items of a collection
13022 @item first - Takes the first item of a collection
13023 @item remove - Predicated-removes items of a collection
13024 @item concat - Concatenates two collections
13025 @item flatten - Flattens a collection with subcollections
13026 @item distinct - Returns only distinct items
13027 @item split - Predicated-splits a collection
13028 @item split_at - Splits a collection at a given item
13029 @item group_by - Groups items by group
13030 @item pairwise - Pairs off adjacent items
13031 @item partial - Partially-applies a function
13032 @item curry - Curries a function
13033 @item compose - Composes functions
13034 @item complement - Complements a predicate
13035 @item all_fn - \"all\" with predicate
13037 (license license:bsd-3)))
13039 (define-public python2-funcy
13040 (package-with-python2 python-funcy))
13042 (define-public python-isoweek
13044 (name "python-isoweek")
13049 (uri (pypi-uri "isoweek" version))
13052 "1s7zsf0pab0l9gn6456qadnz5i5h90hafcjwnhx5mq23qjxggwvk"))))
13053 (build-system python-build-system)
13054 (home-page "https://github.com/gisle/isoweek")
13055 (synopsis "Objects representing a week")
13056 (description "The @code{isoweek} module provide the class Week that
13057 implements the week definition of ISO 8601. This standard also defines
13058 a notation for identifying weeks; yyyyWww (where the W is a literal).
13059 Week instances stringify to this form.")
13060 (license license:bsd-3)))
13062 (define-public python2-isoweek
13063 (package-with-python2 python-isoweek))
13065 (define-public python-tokenize-rt
13067 (name "python-tokenize-rt")
13072 (uri (pypi-uri "tokenize-rt" version))
13075 "1yjvbz7rvrz31zjyax1cgy3xhf4wb3j18jwnj4bnl77ca4gliyiw"))))
13076 (build-system python-build-system)
13077 (home-page "https://github.com/asottile/tokenize-rt")
13078 (synopsis "Wrapper around the stdlib tokenize which roundtrips.")
13080 "This Python library is a wrapper around @code{tokenize} from the Python
13081 standard library. It provides two additional tokens @code{ESCAPED_NL} and
13082 @code{UNIMPORTANT_WS}, and a @code{Token} data type. Use @code{src_to_tokens}
13083 and @code{tokens_to_src} to roundtrip.")
13084 (license license:expat)))
13086 (define-public python-future-fstrings
13088 (name "python-future-fstrings")
13093 (uri (pypi-uri "future_fstrings" version))
13096 "0ydxqz2dvns44g55p8ix2x18qkfk3aaz0m0dc70f3g6n8js35h47"))))
13097 (build-system python-build-system)
13099 `(("python-tokenize-rt" ,python-tokenize-rt)))
13100 (home-page "https://github.com/asottile/future-fstrings")
13101 (synopsis "Backport of fstrings to Python < 3.6")
13103 "This package provides a UTF-8 compatible encoding
13104 @code{future_fstrings}, which performs source manipulation. It decodes the
13105 source bytes using the UTF-8 encoding and then rewrites Python 3.6 style
13106 @code{f} strings.")
13107 (license license:expat)))
13109 (define-public python-typing
13111 (name "python-typing")
13116 (uri (pypi-uri "typing" version))
13119 "1wmk9nkh30n37cbrqwkbggmj2390lhrlagjkd0ikm02l88saj06l"))))
13120 (build-system python-build-system)
13121 (home-page "https://docs.python.org/3/library/typing.html")
13122 (synopsis "Type hints for Python")
13123 (description "This is a backport of the standard library @code{typing}
13124 module to Python versions older than 3.5. Typing defines a standard notation
13125 for Python function and variable type annotations. The notation can be used
13126 for documenting code in a concise, standard format, and it has been designed
13127 to also be used by static and runtime type checkers, static analyzers, IDEs
13129 (license license:psfl)))
13131 (define-public python2-typing
13132 (package-with-python2 python-typing))
13134 (define-public bpython
13141 (uri (pypi-uri "bpython" version))
13144 "0bxhxi5zxdkrf8b4gwn0d363kdz3qnypjwhm1aydki53ph8ca1w9"))))
13145 (build-system python-build-system)
13148 (modify-phases %standard-phases
13149 (add-after 'unpack 'remove-failing-test
13151 ;; Remove failing test. FIXME: make it pass
13152 (delete-file "bpython/test/test_args.py")
13154 (add-after 'wrap 'add-aliases
13155 ;; for symmetry to bpython2, add symlinks bypthon3, bpdb3, etc.
13156 (lambda* (#:key outputs #:allow-other-keys)
13157 (let ((out (assoc-ref outputs "out")))
13160 (symlink old (string-append out "/bin/" new)))
13161 '("bpython" "bpython-curses" "bpython-urwid" "bpdb")
13162 '("bpython3" "bpython3-curses" "bpython3-urwid" "bpdb3")))
13165 `(("python-pygments" ,python-pygments)
13166 ("python-requests" ,python-requests)
13167 ("python-babel" ,python-babel) ; optional, for internationalization
13168 ("python-curtsies" ,python-curtsies) ; >= 0.1.18
13169 ("python-greenlet" ,python-greenlet)
13170 ("python-urwid" ,python-urwid) ; for bpython-urwid only
13171 ("python-six" ,python-six)))
13173 `(("python-sphinx" ,python-sphinx)
13174 ("python-mock" ,python-mock)))
13175 (home-page "https://bpython-interpreter.org/")
13176 (synopsis "Fancy interface to the Python interpreter")
13177 (description "Bpython is a fancy interface to the Python
13178 interpreter. bpython's main features are
13181 @item in-line syntax highlighting,
13182 @item readline-like autocomplete with suggestions displayed as you type,
13183 @item expected parameter list for any Python function,
13184 @item \"rewind\" function to pop the last line of code from memory and
13186 @item send the code you've entered off to a pastebin,
13187 @item save the code you've entered to a file, and
13188 @item auto-indentation.
13190 (license license:expat)))
13192 (define-public bpython2
13193 (let ((base (package-with-python2
13194 (strip-python2-variant bpython))))
13195 (package (inherit base)
13198 `(#:python ,python-2
13200 (modify-phases %standard-phases
13201 (add-after 'unpack 'remove-failing-test
13203 ;; Remove failing test. FIXME: make it pass
13204 (delete-file "bpython/test/test_args.py")
13205 ;; Disable failing test-cases (renaming inhibits they are
13207 (substitute* "bpython/test/test_curtsies_repl.py"
13208 (("^(\\s*def )(test_get_last_word_with_prev_line\\W)" _ a b)
13209 (string-append a "xxx_off_" b))
13210 (("^(\\s*def )(test_complex\\W)" _ a b)
13211 (string-append a "xxx_off_" b)))
13213 (add-before 'build 'rename-scripts
13214 ;; rename the scripts to bypthon2, bpdb2, etc.
13216 (substitute* "setup.py"
13217 (("^(\\s+'bpdb)(\\s+=.*',?)\\s*?$" _ name rest)
13218 (string-append name "2" rest "\n"))
13219 (("^(\\s+'bpython)(-\\S+)?(\\s+=.*',?)\\s*?$" _ name sub rest)
13220 (string-append name "2" (or sub "") rest "\n")))
13223 (define-public python-pyinotify
13225 (name "python-pyinotify")
13229 (uri (pypi-uri "pyinotify" version))
13232 "1x3i9wmzw33fpkis203alygfnrkcmq9w1aydcm887jh6frfqm6cw"))))
13233 (build-system python-build-system)
13234 (arguments `(#:tests? #f)) ;no tests
13235 (home-page "https://github.com/seb-m/pyinotify")
13236 (synopsis "Python library for monitoring inotify events")
13238 "@code{pyinotify} provides a Python interface for monitoring
13239 file system events on Linux.")
13240 (license license:expat)))
13242 (define-public python2-pyinotify
13243 (package-with-python2 python-pyinotify))
13245 ;; Ada parser uses this version.
13246 (define-public python2-quex-0.67.3
13248 (name "python2-quex")
13253 (uri (string-append "mirror://sourceforge/quex/HISTORY/"
13254 (version-major+minor version)
13255 "/quex-" version ".zip"))
13258 "14gv8ll3ipqv4kyc2xiy891nrmjl4ic823zfyx8hassagyclyppw"))))
13259 (build-system python-build-system)
13261 `(("unzip" ,unzip)))
13263 `(#:python ,python-2
13266 (modify-phases %standard-phases
13267 (delete 'configure)
13270 (lambda* (#:key outputs #:allow-other-keys)
13271 (let* ((out (assoc-ref outputs "out"))
13272 (share/quex (string-append out "/share/quex"))
13273 (bin (string-append out "/bin")))
13274 (copy-recursively "." share/quex)
13276 (symlink (string-append share/quex "/quex-exe.py")
13277 (string-append bin "/quex"))
13279 (native-search-paths
13280 (list (search-path-specification
13281 (variable "QUEX_PATH")
13282 (files '("share/quex")))))
13283 (home-page "http://quex.sourceforge.net/")
13284 (synopsis "Lexical analyzer generator in Python")
13285 (description "@code{quex} is a lexical analyzer generator in Python.")
13286 (license license:lgpl2.1+))) ; Non-military
13288 (define-public python2-quex
13289 (package (inherit python2-quex-0.67.3)
13290 (name "python2-quex")
13295 (uri (string-append "mirror://sourceforge/quex/DOWNLOAD/quex-" version ".tar.gz"))
13298 "0svc9nla3b9145d6b7fb9dizx412l3difzqw0ilh9lz52nsixw8j"))
13299 (file-name (string-append name "-" version ".tar.gz"))))))
13301 (define-public python-more-itertools
13303 (name "python-more-itertools")
13308 (uri (pypi-uri "more-itertools" version))
13311 "0i3ch700g5fyjp692gprlnzbysl8w0sa2vijbp3s40drvk67xkn9"))))
13312 (build-system python-build-system)
13314 `(("python-six" ,python-six-bootstrap)))
13315 (home-page "https://github.com/erikrose/more-itertools")
13316 (synopsis "More routines for operating on iterables, beyond itertools")
13317 (description "Python's built-in @code{itertools} module implements a
13318 number of iterator building blocks inspired by constructs from APL, Haskell,
13319 and SML. @code{more-itertools} includes additional building blocks for
13320 working with iterables.")
13321 (license license:expat)))
13323 (define-public python2-more-itertools
13324 (package-with-python2 python-more-itertools))
13326 (define-public python-latexcodec
13328 (name "python-latexcodec")
13333 (uri (pypi-uri "latexcodec" version))
13336 "0zdd1gf24i83ykadx0y30n3001j43scqr2saql3vckk5c39dj1wn"))))
13337 (build-system python-build-system)
13339 `(("python-six" ,python-six)))
13340 (home-page "https://readthedocs.org/projects/latexcodec/")
13341 (synopsis "Work with LaTeX code in Python")
13342 (description "Lexer and codec to work with LaTeX code in Python.")
13343 (license license:expat)))
13345 (define-public python-pybtex
13347 (name "python-pybtex")
13352 (uri (pypi-uri "pybtex" version))
13355 "00300j8dn5pxq4ndxmfmbmycg2znawkqs49val2x6jlmfiy6r2mg"))))
13356 (build-system python-build-system)
13358 `(("python-nose" ,python-nose)))
13360 `(("python-latexcodec" ,python-latexcodec)
13361 ("python-pyyaml" ,python-pyyaml)
13362 ("python-six" ,python-six)))
13364 `(#:test-target "nosetests"))
13365 (home-page "https://pybtex.org/")
13366 (synopsis "BibTeX-compatible bibliography processor")
13367 (description "Pybtex is a BibTeX-compatible bibliography processor written
13368 in Python. You can simply type pybtex instead of bibtex.")
13369 (license license:expat)))
13371 (define-public python-onetimepass
13373 (name "python-onetimepass")
13378 (uri (pypi-uri "onetimepass" version))
13380 (base32 "09vagxgbq78wvq4xbikmn2hpqqsa2i96kqsmphf7dqynfv0dlsd5"))))
13381 (build-system python-build-system)
13382 (propagated-inputs `(("python-six" ,python-six)))
13383 (home-page "https://github.com/tadeck/onetimepass/")
13384 (synopsis "One-time password library")
13385 (description "Python one-time password library for HMAC-based (HOTP) and
13386 time-based (TOTP) passwords.")
13387 (license license:expat)))
13389 (define-public python-parso
13391 (name "python-parso")
13396 (uri (pypi-uri "parso" version))
13399 "0lamywk6dm5xshlkdvxxf5j6fa2k2zpi7xagf0bwidaay3vnpgb2"))))
13401 `(("python-pytest" ,python-pytest)))
13402 (build-system python-build-system)
13403 (home-page "https://github.com/davidhalter/parso")
13404 (synopsis "Python Parser")
13405 (description "Parso is a Python parser that supports error recovery and
13406 round-trip parsing for different Python versions (in multiple Python versions).
13407 Parso is also able to list multiple syntax errors in your Python file.")
13408 (license license:expat)))
13410 (define-public python2-parso
13411 (package-with-python2 python-parso))
13413 (define-public python-async-generator
13415 (name "python-async-generator")
13420 (uri (pypi-uri "async_generator" version))
13423 "0wc3hidz1q85cja93k5pzybn0fprfnqyrv4qlkdqdzklc5f4dmdp"))))
13424 (build-system python-build-system)
13426 `(("python-pytest" ,python-pytest)))
13427 (home-page "https://github.com/python-trio/async_generator")
13428 (synopsis "Async generators and context managers for Python 3.5+")
13429 (description "@code{async_generator} back-ports Python 3.6's native async
13430 generators and Python 3.7's context managers into Python 3.5.")
13432 (license (list license:expat license:asl2.0))))
13434 (define-public python-async-timeout
13436 (name "python-async-timeout")
13441 (uri (pypi-uri "async-timeout" version))
13444 "1l3kg062m02mph6rf9rdv8r5c5n356clxa6b6mrn0i77vk9g9kq0"))))
13445 (build-system python-build-system)
13446 (home-page "https://github.com/aio-libs/async_timeout/")
13447 (synopsis "Timeout context manager for asyncio programs")
13448 (description "@code{async-timeout} provides a timeout timeout context
13449 manager compatible with @code{asyncio}.")
13450 (license license:asl2.0)))
13452 (define-public python-glob2
13454 (name "python-glob2")
13458 (uri (string-append
13459 "https://github.com/miracle2k/python-glob2/archive/"
13464 "0ja168f0dz4kbz4m06dm0rd3acaypk6hjx2km541pw22y9s40mag"))
13465 (file-name (string-append name "-" version ".tar.gz"))))
13466 (build-system python-build-system)
13467 (home-page "https://github.com/miracle2k/python-glob2/")
13468 (synopsis "Extended Version of the python buildin glob module")
13469 (description "This is an extended version of the Python
13470 @url{http://docs.python.org/library/glob.html, built-in glob module} which
13474 @item The ability to capture the text matched by glob patterns, and return
13475 those matches alongside the file names.
13476 @item A recursive @code{**} globbing syntax, akin for example to the
13477 @code{globstar} option of Bash.
13478 @item The ability to replace the file system functions used, in order to glob
13479 on virtual file systems.
13480 @item Compatible with Python 2 and Python 3 (tested with 3.3).
13483 Glob2 currently based on the glob code from Python 3.3.1.")
13484 (license license:bsd-2)))
13486 (define-public python2-glob2
13487 (package-with-python2 python-glob2))
13489 (define-public python-gipc
13491 (name "python-gipc")
13496 (uri (pypi-uri "gipc" version ".zip"))
13499 "0pd9by719qh882hqs6xpby61sn1x5h98hms5p2p8yqnycrf1s0h2"))))
13500 (build-system python-build-system)
13502 `(("unzip" ,unzip)))
13504 `(("python-gevent" ,python-gevent)))
13505 (home-page "http://gehrcke.de/gipc")
13506 (synopsis "Child process management in the context of gevent")
13507 (description "Usage of Python's multiprocessing package in a
13508 gevent-powered application may raise problems. With @code{gipc},
13509 process-based child processes can safely be created anywhere within a
13510 gevent-powered application.")
13511 (license license:expat)))
13513 (define-public python2-gipc
13514 (package-with-python2 python-gipc))
13516 (define-public python-fusepy
13518 (name "python-fusepy")
13523 (uri (pypi-uri "fusepy" version))
13526 "0v5grm4zyf58hsplwsxfbihddw95lz9w8cy3rpzbyha287swgx8h"))))
13527 (build-system python-build-system)
13530 (modify-phases %standard-phases
13531 (add-before 'build 'set-library-file-name
13532 (lambda* (#:key inputs #:allow-other-keys)
13533 (let ((fuse (assoc-ref inputs "fuse")))
13534 (substitute* "fuse.py"
13535 (("find_library\\('fuse'\\)")
13536 (string-append "'" fuse "/lib/libfuse.so'")))
13540 (home-page "https://github.com/fusepy/fusepy")
13541 (synopsis "Simple ctypes bindings for FUSE")
13542 (description "Python module that provides a simple interface to FUSE and
13543 MacFUSE. The binding is created using the standard @code{ctypes} library.")
13544 (license license:isc)))
13546 (define-public python2-fusepy
13547 (package-with-python2 python-fusepy))
13549 (define-public python2-gdrivefs
13551 (name "python2-gdrivefs")
13556 (uri (pypi-uri "gdrivefs" version))
13559 "0v9sp2cfg4ki3wagkwf3rnfpjhvgf845anz3757il9z95yvvcvb7"))))
13560 (build-system python-build-system)
13562 `(#:python ,python-2
13564 (modify-phases %standard-phases
13565 (add-before 'build 'patch-setup-py
13567 ;; Update requirements from dependency==version
13568 ;; to dependency>=version
13569 (substitute* "gdrivefs/resources/requirements.txt"
13573 `(("python2-gipc" ,python2-gipc)
13574 ("python2-gevent" ,python2-gevent)
13575 ("python2-greenlet" ,python2-greenlet)
13576 ("python2-httplib2" ,python2-httplib2)
13577 ("python2-uritemplate" ,python2-uritemplate)
13578 ("python2-oauth2client" ,python2-oauth2client)
13579 ("python2-six" ,python2-six)))
13581 `(("python2-dateutil" ,python2-dateutil)
13582 ("python2-fusepy" ,python2-fusepy)
13583 ("python2-google-api-client" ,python2-google-api-client)))
13584 (home-page "https://github.com/dsoprea/GDriveFS")
13585 (synopsis "Mount Google Drive as a local file system")
13586 (description "@code{gdrivefs} provides a FUSE wrapper for Google Drive
13587 under Python 2.7.")
13588 (license license:gpl2)))
13590 (define-public pybind11
13596 (uri (string-append
13597 "https://github.com/pybind/pybind11/archive/v"
13598 version ".tar.gz"))
13601 "1sj0x4fwsbnwdai5sxpw1l1vh8m5hpbkfk3zanxcbcgs39jpnfrs"))
13602 (file-name (string-append name "-" version ".tar.gz"))))
13603 (build-system cmake-build-system)
13605 `(("python" ,python)
13606 ("python-pytest" ,python-pytest)))
13608 `(#:test-target "check"))
13609 (home-page "https://github.com/pybind/pybind11/")
13610 (synopsis "Seamless operability between C++11 and Python")
13611 (description "pybind11 is a lightweight header-only library that exposes
13612 C++ types in Python and vice versa, mainly to create Python bindings of
13613 existing C++ code. Its goals and syntax are similar to the excellent
13614 Boost.Python library by David Abrahams: to minimize boilerplate code in
13615 traditional extension modules by inferring type information using compile-time
13617 (license license:expat)))