1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2013 Nikita Karetnikov <nikita@karetnikov.org>
3 ;;; Copyright © 2013, 2014, 2015, 2016 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 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 Ben Woodcroft <donttrustben@gmail.com>
16 ;;; Copyright © 2015, 2016 Erik Edrosa <erik.edrosa@gmail.com>
17 ;;; Copyright © 2015, 2016 Efraim Flashner <efraim@flashner.co.il>
18 ;;; Copyright © 2015 Kyle Meyer <kyle@kyleam.com>
19 ;;; Copyright © 2015, 2016 Chris Marusich <cmmarusich@gmail.com>
20 ;;; Copyright © 2016 Danny Milosavljevic <dannym+a@scratchpost.org>
21 ;;; Copyright © 2016 Lukas Gradl <lgradl@openmailbox.org>
22 ;;; Copyright © 2016 Hartmut Goebel <h.goebel@crazy-compilers.com>
23 ;;; Copyright © 2016 Daniel Pimentel <d4n1@d4n1.org>
24 ;;; Copyright © 2016 Sou Bunnbu <iyzsong@gmail.com>
25 ;;; Copyright © 2016 Troy Sankey <sankeytms@gmail.com>
26 ;;; Copyright © 2016, 2017 ng0 <contact.ng0@cryptolab.net>
27 ;;; Copyright © 2016 Dylan Jeffers <sapientech@sapientech@openmailbox.org>
28 ;;; Copyright © 2016 David Craven <david@craven.ch>
29 ;;; Copyright © 2016, 2017 Marius Bakke <mbakke@fastmail.com>
30 ;;; Copyright © 2016 Stefan Reichoer <stefan@xsteve.at>
31 ;;; Copyright © 2016 Dylan Jeffers <sapientech@sapientech@openmailbox.org>
32 ;;; Copyright © 2016 Alex Vong <alexvong1995@gmail.com>
33 ;;; Copyright © 2016 Arun Isaac <arunisaac@systemreboot.net>
34 ;;; Copyright © 2016, 2017 Julien Lepiller <julien@lepiller.eu>
35 ;;; Copyright © 2016, 2017 Tobias Geerinckx-Rice <me@tobias.gr>
36 ;;; Copyright © 2016, 2017 Thomas Danckaert <post@thomasdanckaert.be>
37 ;;; Copyright © 2017 Carlo Zancanaro <carlo@zancanaro.id.au>
38 ;;; Copyright © 2017 Frederick M. Muriithi <fredmanglis@gmail.com>
40 ;;; This file is part of GNU Guix.
42 ;;; GNU Guix is free software; you can redistribute it and/or modify it
43 ;;; under the terms of the GNU General Public License as published by
44 ;;; the Free Software Foundation; either version 3 of the License, or (at
45 ;;; your option) any later version.
47 ;;; GNU Guix is distributed in the hope that it will be useful, but
48 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
49 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
50 ;;; GNU General Public License for more details.
52 ;;; You should have received a copy of the GNU General Public License
53 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
55 (define-module (gnu packages python)
56 #:use-module ((guix licenses) #:prefix license:)
57 #:use-module (gnu packages)
58 #:use-module (gnu packages algebra)
59 #:use-module (gnu packages adns)
60 #:use-module (gnu packages attr)
61 #:use-module (gnu packages backup)
62 #:use-module (gnu packages bash)
63 #:use-module (gnu packages compression)
64 #:use-module (gnu packages databases)
65 #:use-module (gnu packages django)
66 #:use-module (gnu packages file)
67 #:use-module (gnu packages fontutils)
68 #:use-module (gnu packages gcc)
69 #:use-module (gnu packages ghostscript)
70 #:use-module (gnu packages gl)
71 #:use-module (gnu packages glib)
72 #:use-module (gnu packages graphviz)
73 #:use-module (gnu packages gstreamer)
74 #:use-module (gnu packages gtk)
75 #:use-module (gnu packages icu4c)
76 #:use-module (gnu packages image)
77 #:use-module (gnu packages imagemagick)
78 #:use-module (gnu packages libevent)
79 #:use-module (gnu packages libffi)
80 #:use-module (gnu packages linux)
81 #:use-module (gnu packages man)
82 #:use-module (gnu packages maths)
83 #:use-module (gnu packages multiprecision)
84 #:use-module (gnu packages networking)
85 #:use-module (gnu packages ncurses)
86 #:use-module (gnu packages openstack)
87 #:use-module (gnu packages password-utils)
88 #:use-module (gnu packages pcre)
89 #:use-module (gnu packages perl)
90 #:use-module (gnu packages pkg-config)
91 #:use-module (gnu packages protobuf)
92 #:use-module (gnu packages qt)
93 #:use-module (gnu packages readline)
94 #:use-module (gnu packages sdl)
95 #:use-module (gnu packages shells)
96 #:use-module (gnu packages statistics)
97 #:use-module (gnu packages tex)
98 #:use-module (gnu packages texinfo)
99 #:use-module (gnu packages tls)
100 #:use-module (gnu packages version-control)
101 #:use-module (gnu packages video)
102 #:use-module (gnu packages web)
103 #:use-module (gnu packages base)
104 #:use-module (gnu packages xml)
105 #:use-module (gnu packages xorg)
106 #:use-module (gnu packages xdisorg)
107 #:use-module (gnu packages zip)
108 #:use-module (gnu packages tcl)
109 #:use-module (gnu packages bdw-gc)
110 #:use-module (guix packages)
111 #:use-module (guix download)
112 #:use-module (guix git-download)
113 #:use-module (guix utils)
114 #:use-module (guix build-system gnu)
115 #:use-module (guix build-system cmake)
116 #:use-module (guix build-system python)
117 #:use-module (guix build-system trivial)
118 #:use-module (srfi srfi-1))
120 (define-public python-2.7
127 (uri (string-append "https://www.python.org/ftp/python/"
128 version "/Python-" version ".tar.xz"))
131 "0y7rl603vmwlxm6ilkhc51rx2mfj14ckcz40xxgs0ljnvlhp30yp"))
132 (patches (search-patches "python-2.7-search-paths.patch"
133 "python-2-deterministic-build-info.patch"
134 "python-2.7-site-prefixes.patch"
135 "python-2.7-source-date-epoch.patch"))
136 (modules '((guix build utils)))
137 ;; suboptimal to delete failing tests here, but if we delete them in the
138 ;; arguments then we need to make sure to strip out that phase when it
139 ;; gets inherited by python and python-minimal.
142 (for-each delete-file
143 '("Lib/test/test_compileall.py"
144 "Lib/test/test_ctypes.py" ; fails on mips64el
145 "Lib/test/test_distutils.py"
146 "Lib/test/test_import.py"
147 "Lib/test/test_shutil.py"
148 "Lib/test/test_socket.py"
149 "Lib/test/test_subprocess.py"))
152 "tk")) ;tkinter; adds 50 MiB to the closure
153 (build-system gnu-build-system)
157 ;; test_compileall test_distutils test_import test_shutil test_socket
160 ;; test_aepack test_al test_applesingle test_bsddb test_bsddb185
161 ;; test_bsddb3 test_cd test_cl test_codecmaps_cn test_codecmaps_hk
162 ;; test_codecmaps_jp test_codecmaps_kr test_codecmaps_tw test_curses
163 ;; test_dl test_gdb test_gl test_imageop test_imgfile test_ioctl
164 ;; test_kqueue test_linuxaudiodev test_macos test_macostools
165 ;; test_msilib test_ossaudiodev test_scriptpackages test_smtpnet
166 ;; test_socketserver test_startfile test_sunaudiodev test_timeout
167 ;; test_tk test_ttk_guionly test_urllib2net test_urllibnet
168 ;; test_winreg test_winsound test_zipfile64
169 ;; 4 skips unexpected on linux2:
170 ;; test_bsddb test_bsddb3 test_gdb test_ioctl
173 (list "--enable-shared" ;allow embedding
174 "--with-system-ffi" ;build ctypes
175 "--with-ensurepip=install" ;install pip and setuptools
176 (string-append "LDFLAGS=-Wl,-rpath="
177 (assoc-ref %outputs "out") "/lib"))
179 #:modules ((ice-9 ftw) (ice-9 match)
180 (guix build utils) (guix build gnu-build-system))
182 (modify-phases %standard-phases
184 'configure 'patch-lib-shells
186 ;; Filter for existing files, since some may not exist in all
187 ;; versions of python that are built with this recipe.
188 (substitute* (filter file-exists?
189 '("Lib/subprocess.py"
191 "Lib/distutils/tests/test_spawn.py"
192 "Lib/test/test_subprocess.py"))
193 (("/bin/sh") (which "sh")))
195 ;; Use zero as the timestamp in .pyc files so that builds are
196 ;; deterministic. TODO: Remove it when this variable is set in
197 ;; gnu-build-system.scm.
198 (setenv "SOURCE_DATE_EPOCH" "1")
200 (add-before 'configure 'do-not-record-configure-flags
201 (lambda* (#:key configure-flags #:allow-other-keys)
202 ;; Remove configure flags from the installed '_sysconfigdata.py'
203 ;; and 'Makefile' so we don't end up keeping references to the
206 ;; Preserve at least '--with-system-ffi' since otherwise the
207 ;; thing tries to build libffi, fails, and we end up with a
208 ;; Python that lacks ctypes.
209 (substitute* "configure"
210 (("^CONFIG_ARGS=.*$")
211 (format #f "CONFIG_ARGS='~a'\n"
212 (if (member "--with-system-ffi" configure-flags)
219 ;; 'Lib/test/test_site.py' needs a valid $HOME
220 (setenv "HOME" (getcwd))
223 'unpack 'set-source-file-times-to-1980
224 ;; XXX One of the tests uses a ZIP library to pack up some of the
225 ;; source tree, and fails with "ZIP does not support timestamps
226 ;; before 1980". Work around this by setting the file times in the
227 ;; source tree to sometime in early 1980.
229 (let ((circa-1980 (* 10 366 24 60 60)))
230 (ftw "." (lambda (file stat flag)
231 (utime file circa-1980 circa-1980)
234 (add-after 'install 'remove-tests
235 ;; Remove 25 MiB of unneeded unit tests. Keep test_support.*
236 ;; because these files are used by some libraries out there.
237 (lambda* (#:key outputs #:allow-other-keys)
238 (let ((out (assoc-ref outputs "out")))
239 (match (scandir (string-append out "/lib")
241 (string-prefix? "python" name)))
243 (let ((testdir (string-append out "/lib/" pythonX.Y
245 (with-directory-excursion testdir
246 (for-each delete-file-recursively
252 (string-prefix? "test_support."
254 (call-with-output-file "__init__.py" (const #t))
256 (add-before 'strip 'make-libraries-writable
257 (lambda* (#:key outputs #:allow-other-keys)
258 ;; Make .so files writable so they can be stripped.
259 (let ((out (assoc-ref outputs "out")))
260 (for-each (lambda (file)
262 (find-files (string-append out "/lib")
265 (add-after 'install 'move-tk-inter
266 (lambda* (#:key outputs #:allow-other-keys)
267 ;; When Tkinter support is built move it to a separate output so
268 ;; that the main output doesn't contain a reference to Tcl/Tk.
269 (let ((out (assoc-ref outputs "out"))
270 (tk (assoc-ref outputs "tk")))
272 (match (find-files out "tkinter.*\\.so")
274 ;; The .so is in OUT/lib/pythonX.Y/lib-dynload, but we
275 ;; want it under TK/lib/pythonX.Y/site-packages.
276 (let* ((len (string-length out))
277 (target (string-append
280 (dirname (dirname tkinter.so))
283 (install-file tkinter.so target)
284 (delete-file tkinter.so)))))
289 ("libffi" ,libffi) ; for ctypes
290 ("sqlite" ,sqlite) ; for sqlite extension
292 ("readline" ,readline)
295 ("tk" ,tk))) ; for tkinter
297 `(("pkg-config" ,pkg-config)))
299 (list (search-path-specification
300 (variable "PYTHONPATH")
301 (files '("lib/python2.7/site-packages")))))
302 (home-page "https://www.python.org")
303 (synopsis "High-level, dynamically-typed programming language")
305 "Python is a remarkably powerful dynamic programming language that
306 is used in a wide variety of application domains. Some of its key
307 distinguishing features include: clear, readable syntax; strong
308 introspection capabilities; intuitive object orientation; natural
309 expression of procedural code; full modularity, supporting hierarchical
310 packages; exception-based error handling; and very high level dynamic
312 (license license:psfl)))
314 ;; Current 2.x version.
315 (define-public python-2 python-2.7)
317 (define-public python-3.5
318 (package (inherit python-2)
322 (uri (string-append "https://www.python.org/ftp/python/"
323 version "/Python-" version ".tar.xz"))
324 (patches (search-patches
325 "python-fix-tests.patch"
326 "python-3.5-fix-tests.patch"
327 "python-3-deterministic-build-info.patch"
328 "python-3-search-paths.patch"))
329 (patch-flags '("-p0"))
332 "0h6a5fr7ram2s483lh0pnmc4ncijb8llnpfdxdcl5dxr01hza400"))))
333 (arguments (substitute-keyword-arguments (package-arguments python-2)
336 (list (search-path-specification
337 (variable "PYTHONPATH")
338 (files (list (string-append "lib/python"
339 (version-major+minor version)
340 "/site-packages"))))))))
342 (define-public python-3.4
343 (package (inherit python-3.5)
347 (uri (string-append "https://www.python.org/ftp/python/"
348 version "/Python-" version ".tar.xz"))
349 (patches (search-patches
350 "python-fix-tests.patch"
351 "python-3.4-fix-tests.patch"
352 "python-3-deterministic-build-info.patch"
353 "python-3-search-paths.patch"))
354 (patch-flags '("-p0"))
357 "12l9klp778wklxmckhghniy5hklss8r26995pyd00qbllk4b2r7f"))))))
359 ;; Current 3.x version.
360 (define-public python-3 python-3.5)
362 ;; Current major version.
363 (define-public python python-3)
365 ;; Minimal variants of Python, mostly used to break the cycle between Tk and
366 ;; Python (Tk -> libxcb -> Python.)
368 (define-public python2-minimal
369 (package (inherit python-2)
370 (name "python-minimal")
373 (substitute-keyword-arguments (package-arguments python-2)
374 ((#:configure-flags cf)
375 `(append ,cf '("--without-system-ffi")))))
376 (inputs '()))) ;none of the optional dependencies
378 (define-public python-minimal
379 (package (inherit python)
380 (name "python-minimal")
383 ;; Build fails due to missing ctypes without libffi.
384 ;; OpenSSL is a mandatory dependency of Python 3.x, for urllib;
385 ;; zlib is required by 'zipimport', used by pip.
386 (inputs `(("libffi" ,libffi)
390 (define* (wrap-python3 python
392 (name (string-append (package-name python) "-wrapper")))
393 (package (inherit python)
396 (build-system trivial-build-system)
398 (inputs `(("bash" ,bash)))
399 (propagated-inputs `(("python" ,python)))
401 `(#:modules ((guix build utils))
404 (use-modules (guix build utils))
405 (let ((bin (string-append (assoc-ref %outputs "out") "/bin"))
406 (python (string-append (assoc-ref %build-inputs "python") "/bin/")))
410 (symlink (string-append python old)
411 (string-append bin "/" new)))
412 `("python3" ,"pydoc3" ,"idle3" ,"pip3")
413 `("python" ,"pydoc" ,"idle" ,"pip"))
414 ;; python-config outputs search paths based upon its location,
415 ;; use a bash wrapper to avoid changing its outputs.
416 (let ((bash (string-append (assoc-ref %build-inputs "bash")
418 (old (string-append python "python3-config"))
419 (new (string-append bin "/python-config")))
420 (with-output-to-file new
422 (format #t "#!~a~%" bash)
423 (format #t "exec \"~a\" \"$@\"~%" old)
426 (synopsis "Wrapper for the Python 3 commands")
428 "This package provides wrappers for the commands of Python@tie{}3.x such
429 that they can be invoked under their usual name---e.g., @command{python}
430 instead of @command{python3}.")))
432 (define-public python-wrapper (wrap-python3 python))
433 (define-public python-minimal-wrapper (wrap-python3 python-minimal))
435 (define-public python-psutil
437 (name "python-psutil")
442 (uri (pypi-uri "psutil" version))
445 "1w4r09fvn6kd80m5mx4ws1wz100brkaq6hzzpwrns8cgjzjpl6c6"))))
446 (build-system python-build-system)
448 ;; FIXME: some tests does not return and times out.
450 (home-page "https://www.github.com/giampaolo/psutil")
451 (synopsis "Library for retrieving information on running processes")
453 "psutil (Python system and process utilities) is a library for retrieving
454 information on running processes and system utilization (CPU, memory, disks,
455 network) in Python. It is useful mainly for system monitoring, profiling and
456 limiting process resources and management of running processes. It implements
457 many functionalities offered by command line tools such as: ps, top, lsof,
458 netstat, ifconfig, who, df, kill, free, nice, ionice, iostat, iotop, uptime,
459 pidof, tty, taskset, pmap.")
460 (license license:bsd-3)))
462 (define-public python2-psutil
463 (package-with-python2 python-psutil))
465 (define-public python-passlib
467 (name "python-passlib")
472 (uri (pypi-uri "passlib" version))
475 "1q2khqpj9rlcgdmkypjdq1kswvhjf72bq0zk2cv669cc2dj8z51x"))))
476 (build-system python-build-system)
478 `(("python-nose" ,python-nose)))
480 `(("python-py-bcrypt" ,python-py-bcrypt)))
484 'check 'set-PYTHON_EGG_CACHE
485 ;; some tests require access to "$HOME/.cython"
486 (lambda* _ (setenv "PYTHON_EGG_CACHE" "/tmp"))
488 (home-page "https://bitbucket.org/ecollins/passlib")
490 "Comprehensive password hashing framework")
492 "Passlib is a password hashing library for Python 2 & 3, which provides
493 cross-platform implementations of over 30 password hashing algorithms, as well
494 as a framework for managing existing password hashes. It's designed to be
495 useful for a wide range of tasks, from verifying a hash found in /etc/shadow,
496 to providing full-strength password hashing for multi-user application.")
497 (license license:bsd-3)))
499 (define-public python2-passlib
500 (package-with-python2 python-passlib))
502 (define-public python-py-bcrypt
504 (name "python-py-bcrypt")
510 "https://pypi.python.org/packages/source/p/py-bcrypt/py-bcrypt-"
515 "0y6smdggwi5s72v6p1nn53dg6w05hna3d264cq6kas0lap73p8az"))))
516 (build-system python-build-system)
517 (home-page "https://code.google.com/p/py-bcrypt")
519 "Bcrypt password hashing and key derivation")
521 "A python wrapper of OpenBSD's Blowfish password hashing code. This
522 system hashes passwords using a version of Bruce Schneier's Blowfish block
523 cipher with modifications designed to raise the cost of off-line password
524 cracking and frustrate fast hardware implementation. The computation cost of
525 the algorithm is parametised, so it can be increased as computers get faster.
526 The intent is to make a compromise of a password database less likely to
527 result in an attacker gaining knowledge of the plaintext passwords (e.g. using
529 ;; "sha2.c" is under BSD-3;
530 ;; "blowfish.c" and "bcrypt.c" are under BSD-4;
531 ;; the rest is under ISC.
532 (license (list license:isc license:bsd-3 license:bsd-4))))
534 (define-public python2-py-bcrypt
535 (package-with-python2 python-py-bcrypt))
538 (define-public python-paramiko
540 (name "python-paramiko")
545 (uri (pypi-uri "paramiko" version))
548 "14k8z7ndc3zk5xivnm4d8lncchx475ll5izpf8vmfbq7rp9yp5rj"))))
549 (build-system python-build-system)
551 '(;; FIXME: One test fails with "EOFError not raised by connect".
554 ;; (modify-phases %standard-phases
557 ;; (zero? (system* "python" "test.py")))))))
559 `(("python-pycrypto" ,python-pycrypto)
560 ("python-ecdsa" ,python-ecdsa)))
561 (home-page "http://www.paramiko.org/")
562 (synopsis "SSHv2 protocol library")
563 (description "Paramiko is a python implementation of the SSHv2 protocol,
564 providing both client and server functionality. While it leverages a Python C
565 extension for low level cryptography (PyCrypto), Paramiko itself is a pure
566 Python interface around SSH networking concepts.")
567 (license license:lgpl2.1+)))
569 (define-public python2-paramiko
570 (package-with-python2 python-paramiko))
573 (define-public python-httplib2
575 (name "python-httplib2")
580 (uri (pypi-uri "httplib2" version))
583 "126rsryvw9vhbf3qmsfw9lf4l4xm2srmgs439lgma4cpag4s3ay3"))))
584 (build-system python-build-system)
585 (home-page "https://github.com/jcgregorio/httplib2")
586 (synopsis "Comprehensive HTTP client library")
588 "A comprehensive HTTP client library supporting many features left out of
589 other HTTP libraries.")
590 (license license:expat)))
592 (define-public python2-httplib2
593 (package-with-python2 python-httplib2))
595 (define-public python-ecdsa
597 (name "python-ecdsa")
603 "https://pypi.python.org/packages/source/e/ecdsa/ecdsa-"
608 "1yj31j0asmrx4an9xvsaj2icdmzy6pw0glfpqrrkrphwdpi1xkv4"))))
609 (build-system python-build-system)
611 `(("openssl" ,openssl)))
613 "http://github.com/warner/python-ecdsa")
615 "ECDSA cryptographic signature library (pure python)")
617 "This is an easy-to-use implementation of ECDSA cryptography (Elliptic
618 Curve Digital Signature Algorithm), implemented purely in Python. With this
619 library, you can quickly create keypairs (signing key and verifying key), sign
620 messages, and verify the signatures. The keys and signatures are very short,
621 making them easy to handle and incorporate into other protocols.")
622 (license license:expat)))
624 (define-public python2-ecdsa
625 (package-with-python2 python-ecdsa))
627 (define-public python-ccm
634 (uri (pypi-uri "ccm" version))
637 "177dfxsmk3k4cih6fh6v8d91bh4nqx7ns6pc07w7m7i3cvdx3c8n"))))
638 (build-system python-build-system)
640 `(("python-pyyaml" ,python-pyyaml)
641 ;; Not listed in setup.py, but used in ccmlib/node.py for full
643 ("python-psutil" ,python-psutil)
644 ("python-six" ,python-six)))
645 (home-page "https://github.com/pcmanus/ccm")
646 (synopsis "Cassandra Cluster Manager for Apache Cassandra clusters on
648 (description "Cassandra Cluster Manager is a development tool for testing
649 local Cassandra clusters. It creates, launches and removes Cassandra clusters
651 (license license:asl2.0)))
653 (define-public python2-ccm
654 (package-with-python2 python-ccm))
656 (define-public python-pytz
663 (uri (pypi-uri "pytz" version ".tar.bz2"))
666 "0az099cyp6p5xbsvfcdacj4hvxncbwm2ayn3h55mcp07zb2b45kh"))))
667 (build-system python-build-system)
668 (arguments `(#:tests? #f)) ; no test target
669 (home-page "http://pythonhosted.org/pytz")
670 (synopsis "Python timezone library")
672 "This library allows accurate and cross platform timezone calculations
673 using Python 2.4 or higher and provides access to the Olson timezone database.")
674 (license license:expat)))
676 (define-public python2-pytz
677 (package-with-python2 python-pytz))
680 (define-public python-babel
682 (name "python-babel")
687 (uri (pypi-uri "Babel" version))
690 "0x98qqqw35xllpcama013a9788ly84z8dm1w2wwfpxh2710c8df5"))))
691 (build-system python-build-system)
693 `(("python-pytz" ,python-pytz)))
694 (arguments `(#:tests? #f)) ; no test target
695 (home-page "http://babel.pocoo.org/")
697 "Tools for internationalizing Python applications")
699 "Babel is composed of two major parts:
700 - tools to build and work with gettext message catalogs
701 - a Python interface to the CLDR (Common Locale Data Repository), providing
702 access to various locale display names, localized number and date formatting,
704 (license license:bsd-3)))
706 (define-public python2-babel
707 (package-with-python2 python-babel))
709 (define-public python2-backport-ssl-match-hostname
711 (name "python2-backport-ssl-match-hostname")
717 "https://pypi.python.org/packages/source/b/"
718 "backports.ssl_match_hostname/backports.ssl_match_hostname-"
722 "1wndipik52cyqy0677zdgp90i435pmvwd89cz98lm7ri0y3xjajh"))))
723 (build-system python-build-system)
726 #:tests? #f)) ; no test target
727 (home-page "https://bitbucket.org/brandon/backports.ssl_match_hostname")
728 (synopsis "Backport of ssl.match_hostname() function from Python 3.5")
730 "This backport brings the ssl.match_hostname() function to users of
731 earlier versions of Python. The function checks the hostname in the
732 certificate returned by the server to which a connection has been established,
733 and verifies that it matches the intended target hostname.")
734 (license license:psfl)))
736 (define-public python-hdf4
743 (uri (pypi-uri name version))
746 "1hjiyrxvxk9817qyqky3nar4y3fs4z8wxz0n884zzb5wi6skrjks"))))
747 (build-system python-build-system)
748 (native-inputs `(("nose" ,python-nose)))
749 (propagated-inputs `(("numpy" ,python-numpy)))
756 (modify-phases %standard-phases
759 ;; The 'runexamples' script sets PYTHONPATH to CWD, then goes
760 ;; on to import numpy. Somehow this works on their CI system.
761 ;; Let's just manage PYTHONPATH here instead.
762 (substitute* "runexamples.sh"
763 (("export PYTHONPATH=.*") ""))
765 (string-append (getcwd) ":"
766 (getenv "PYTHONPATH")))
767 (and (zero? (system* "./runexamples.sh"))
768 (zero? (system* "nosetests" "-v"))))))))
769 (home-page "https://github.com/fhs/python-hdf4")
770 (synopsis "Python interface to the NCSA HDF4 library")
772 "Python-HDF4 is a python wrapper around the NCSA HDF version 4 library,
773 which implements the SD (Scientific Dataset), VS (Vdata) and V (Vgroup) API’s.
774 NetCDF files can also be read and modified. Python-HDF4 is a fork of
775 @url{http://hdfeos.org/software/pyhdf.php,pyhdf}.")
776 (license license:expat)))
778 (define-public python2-hdf4
779 (package-with-python2 python-hdf4))
781 (define-public python-h5py
788 (uri (pypi-uri "h5py" version))
791 "0df46dg7i7xfking9lp221bfm8dbl974yvlrbi1w7r6m61ac7bxj"))))
792 (build-system python-build-system)
794 `(#:tests? #f ; no test target
796 (modify-phases %standard-phases
797 (add-after 'unpack 'fix-hdf5-paths
798 (lambda* (#:key inputs #:allow-other-keys)
799 (let ((prefix (assoc-ref inputs "hdf5")))
800 (substitute* "setup_build.py"
801 (("\\['/opt/local/lib', '/usr/local/lib'\\]")
802 (string-append "['" prefix "/lib" "']"))
803 (("'/opt/local/include', '/usr/local/include'")
804 (string-append "'" prefix "/include" "'")))
805 (substitute* "setup_configure.py"
806 (("\\['/usr/local/lib', '/opt/local/lib'\\]")
807 (string-append "['" prefix "/lib" "']")))
810 `(("python-six" ,python-six)
811 ("python-numpy" ,python-numpy)))
815 `(("python-cython" ,python-cython)
816 ("python-pkgconfig" ,python-pkgconfig)))
817 (home-page "http://www.h5py.org/")
818 (synopsis "Read and write HDF5 files from Python")
820 "The h5py package provides both a high- and low-level interface to the
821 HDF5 library from Python. The low-level interface is intended to be a
822 complete wrapping of the HDF5 API, while the high-level component supports
823 access to HDF5 files, datasets and groups using established Python and NumPy
825 (license license:bsd-3)))
827 (define-public python2-h5py
828 (package-with-python2 python-h5py))
830 (define-public python-netcdf4
832 (name "python-netcdf4")
837 (uri (pypi-uri "netCDF4" version))
840 "1fllizmnpw0zkzzm4j9pgamarlzfn3kmv9zrm0w65q1y31h9ni0c"))))
841 (build-system python-build-system)
843 `(("python-cython" ,python-cython)))
845 `(("python-numpy" ,python-numpy)))
852 (modify-phases %standard-phases
855 (setenv "NO_NET" "1") ; disable opendap tests
856 (with-directory-excursion "test"
857 (setenv "PYTHONPATH" ; find and add the library we just built
859 (car (find-files "../build" "lib.*"
861 #:fail-on-error? #:t))
862 ":" (getenv "PYTHONPATH")))
863 (zero? (system* "python" "run_all.py"))))))))
865 "https://github.com/Unidata/netcdf4-python")
866 (synopsis "Python/numpy interface to the netCDF library")
867 (description "Netcdf4-python is a Python interface to the netCDF C
868 library. netCDF version 4 has many features not found in earlier
869 versions of the library and is implemented on top of HDF5. This module
870 can read and write files in both the new netCDF 4 and the old netCDF 3
871 format, and can create files that are readable by HDF5 clients. The
872 API is modelled after @code{Scientific.IO.NetCDF}, and should be familiar
873 to users of that module.")
874 ;; The software is mainly ISC, but includes some files covered
875 ;; by the Expat license.
876 (license (list license:isc license:expat))))
878 (define-public python2-netcdf4
879 (package-with-python2 python-netcdf4))
881 (define-public python-lockfile
883 (name "python-lockfile")
888 (uri (string-append "https://pypi.python.org/packages/source/l/lockfile/"
889 "lockfile-" version ".tar.gz"))
892 "16gpx5hm73ah5n1079ng0vy381hl802v606npkx4x8nb0gg05vba"))))
893 (build-system python-build-system)
894 (arguments '(#:test-target "check"))
896 `(("python-pbr" ,python-pbr)))
897 (home-page "https://launchpad.net/pylockfile")
898 (synopsis "Platform-independent file locking module")
900 "The lockfile package exports a LockFile class which provides a simple
901 API for locking files.")
902 (license license:expat)))
904 (define-public python2-lockfile
905 (package-with-python2 python-lockfile))
907 (define-public python-mock
914 (uri (pypi-uri "mock" version))
917 "0kzlsbki6q0awf89rc287f3aj8x431lrajf160a70z0ikhnxsfdq"))))
918 (build-system python-build-system)
919 (arguments '(#:test-target "check"))
920 (home-page "https://github.com/testing-cabal/mock")
921 (synopsis "Python mocking and patching library for testing")
923 "Mock is a library for testing in Python. It allows you to replace parts
924 of your system under test with mock objects and make assertions about how they
926 (license license:expat)))
928 (define-public python2-mock
929 (package-with-python2 python-mock))
932 (define-public python-setuptools
934 (name "python-setuptools")
939 (uri (pypi-uri "setuptools" version))
942 "0ypybh4hx3bv4vhg2dc74xpj1g56ggnaffm87k4abhwjwq6wq608"))
943 (modules '((guix build utils)))
946 ;; Remove included binaries which are used to build self-extracting
947 ;; installers for Windows.
948 ;; TODO: Find some way to build them ourself so we can include them.
949 (for-each delete-file (find-files "setuptools" "^(cli|gui).*\\.exe$"))
951 (build-system python-build-system)
952 ;; FIXME: Tests require pytest, which itself relies on setuptools.
953 ;; One could bootstrap with an internal untested setuptools.
956 (home-page "https://pypi.python.org/pypi/setuptools")
958 "Library designed to facilitate packaging Python projects")
960 "Setuptools is a fully-featured, stable library designed to facilitate
961 packaging Python projects, where packaging includes:
962 Python package and module definitions,
963 distribution package metadata,
965 project installation,
966 platform-specific details,
968 ;; TODO: setuptools now bundles the following libraries:
969 ;; packaging, pyparsing, six and appdirs. How to unbundle?
970 (license (list license:psfl ; setuptools itself
971 license:expat ; six, appdirs, pyparsing
972 license:asl2.0 ; packaging is dual ASL2/BSD-2
975 (define-public python2-setuptools
976 (package-with-python2 python-setuptools))
978 ;;; Pycrypto is abandoned upstream:
980 ;;; https://github.com/dlitz/pycrypto/issues/173
982 ;;; TODO Remove this package from GNU Guix.
983 (define-public python-pycrypto
985 (name "python-pycrypto")
990 (uri (pypi-uri "pycrypto" version))
991 (patches (search-patches "python-pycrypto-CVE-2013-7459.patch"))
994 "0g0ayql5b9mkjam8hym6zyg6bv77lbh66rv1fyvgqb17kfc1xkpj"))))
995 (build-system python-build-system)
1002 'build 'set-build-env
1003 ;; pycrypto runs an autoconf configure script behind the scenes
1005 (setenv "CONFIG_SHELL" (which "bash")))
1007 (home-page "http://www.pycrypto.org/")
1008 (synopsis "Cryptographic modules for Python")
1010 "Pycrypto is a collection of both secure hash functions (such as SHA256
1011 and RIPEMD160), and various encryption algorithms (AES, DES, RSA, ElGamal,
1012 etc.). The package is structured to make adding new modules easy.")
1013 (license license:public-domain)))
1015 (define-public python2-pycrypto
1016 (let ((pycrypto (package-with-python2 python-pycrypto)))
1017 (package (inherit pycrypto)
1019 `(("python" ,python-2)
1022 (package-inputs pycrypto)))))))
1024 (define-public python-eventlet
1026 (name "python-eventlet")
1031 (uri (pypi-uri "eventlet" version))
1034 "0f3q55mq4n021wb7qa53pz3ix6i2py64sap66vsaqm2scjw83m9s"))))
1035 (build-system python-build-system)
1037 `(("python-greenlet" ,python-greenlet)))
1038 (home-page "http://eventlet.net")
1039 (synopsis "Concurrent networking library for Python")
1041 "Eventlet is a concurrent networking library for Python that
1042 allows you to change how you run your code, not how you write it.
1043 It uses @code{epoll} or @code{libevent} for highly scalable non-blocking I/O.
1044 Coroutines ensure that the developer uses a blocking style of programming
1045 that is similar to threading, but provide the benefits of non-blocking I/O.
1046 The event dispatch is implicit, which means you can easily use @code{Eventlet}
1047 from the Python interpreter, or as a small part of a larger application.")
1048 (license license:expat)))
1050 (define-public python2-eventlet
1051 (let ((base (package-with-python2
1052 (strip-python2-variant python-eventlet))))
1053 (package (inherit base)
1055 `(("python2-enum34" ,python2-enum34)
1056 ,@(package-propagated-inputs base))))))
1058 (define-public python-keyring
1060 (name "python-keyring")
1065 (uri (pypi-uri "keyring" version))
1068 "0482rmi2x6p78wl2kz8qzyq21xz1sbbfwnv5x7dggar4vkwxhzfx"))))
1069 (build-system python-build-system)
1071 `(("python-setuptools-scm" ,python-setuptools-scm)))
1073 `(("python-pycrypto" ,python-pycrypto)))
1075 `(#:tests? #f)) ;TODO: tests require pytest
1076 (home-page "https://github.com/jaraco/keyring")
1077 (synopsis "Store and access your passwords safely")
1079 "The Python keyring lib provides a easy way to access the system keyring
1080 service from python. It can be used in any application that needs safe
1082 ;; "MIT" and PSF dual license
1083 (license license:x11)))
1085 (define-public python2-keyring
1086 (package-with-python2 python-keyring))
1088 (define-public python-six
1095 (uri (pypi-uri "six" version))
1098 "0snmb8xffb3vsma0z67i0h0w2g2dy0p3gsgh9gi4i0kgc5l8spqh"))))
1099 (build-system python-build-system)
1101 `(("python-py" ,python-py)
1102 ("python-pytest" ,python-pytest)))
1103 (home-page "http://pypi.python.org/pypi/six/")
1104 (synopsis "Python 2 and 3 compatibility utilities")
1106 "Six is a Python 2 and 3 compatibility library. It provides utility
1107 functions for smoothing over the differences between the Python versions with
1108 the goal of writing Python code that is compatible on both Python versions.
1109 Six supports every Python version since 2.5. It is contained in only one
1110 Python file, so it can be easily copied into your project.")
1111 (license license:x11)))
1113 (define-public python2-six
1114 (package-with-python2 python-six))
1116 (define-public python-dateutil
1118 (name "python-dateutil")
1123 (uri (pypi-uri "python-dateutil" version))
1126 "1v9j9fmf8g911yg6k01xa2db6dx3wv73zkk7fncsj7vagjqgs20l"))))
1127 (build-system python-build-system)
1129 `(("python-six" ,python-six)))
1130 (home-page "https://dateutil.readthedocs.io/en/stable/")
1131 (synopsis "Extensions to the standard datetime module")
1133 "The dateutil module provides powerful extensions to the standard
1134 datetime module, available in Python 2.3+.")
1135 (license license:bsd-3)))
1137 (define-public python2-dateutil
1138 (package-with-python2 python-dateutil))
1140 (define-public python-parsedatetime
1142 (name "python-parsedatetime")
1147 (uri (pypi-uri "parsedatetime" version))
1150 "0bdgyw6y3v7bcxlx0p50s8drxsh5bb5cy2afccqr3j90amvpii8p"))))
1151 (build-system python-build-system)
1153 `(("python-nose" ,python-nose)
1154 ("python-pyicu" ,python-pyicu)))
1155 (home-page "http://github.com/bear/parsedatetime/")
1157 "Parse human-readable date/time text")
1159 "Parse human-readable date/time text.")
1160 (license license:asl2.0)))
1162 (define-public python2-parsedatetime
1163 (package-with-python2 python-parsedatetime))
1165 (define-public python-pandas
1167 (name "python-pandas")
1172 (uri (pypi-uri "pandas" version))
1174 (base32 "0540cnbwy2hc4hv2sxfs8i47xi91qzvzxfn80dl785ibiicly3vg"))))
1175 (build-system python-build-system)
1177 `(("python-numpy" ,python-numpy)
1178 ("python-pytz" ,python-pytz)
1179 ("python-dateutil" ,python-dateutil)))
1181 `(("python-nose" ,python-nose)
1182 ("python-cython" ,python-cython)))
1183 (home-page "http://pandas.pydata.org")
1184 (synopsis "Data structures for data analysis, time series, and statistics")
1186 "Pandas is a Python package providing fast, flexible, and expressive data
1187 structures designed to make working with structured (tabular,
1188 multidimensional, potentially heterogeneous) and time series data both easy
1189 and intuitive. It aims to be the fundamental high-level building block for
1190 doing practical, real world data analysis in Python.")
1191 (license license:bsd-3)))
1193 (define-public python2-pandas
1194 (package-with-python2 python-pandas))
1196 (define-public python-tzlocal
1198 (name "python-tzlocal")
1203 (uri (pypi-uri "tzlocal" version))
1206 "0paj7vlsb0np8b5sp4bv64wxv7qk2piyp7xg29pkhdjwsbls9fnb"))))
1207 (build-system python-build-system)
1209 `(("python-pytz" ,python-pytz)))
1210 (home-page "https://github.com/regebro/tzlocal")
1212 "Local timezone information for Python")
1214 "Tzlocal returns a tzinfo object with the local timezone information.
1215 This module attempts to fix a glaring hole in pytz, that there is no way to
1216 get the local timezone information, unless you know the zoneinfo name, and
1217 under several distributions that's hard or impossible to figure out.")
1218 (license license:cc0)))
1220 (define-public python2-pysqlite
1222 (name "python2-pysqlite")
1227 (uri (pypi-uri "pysqlite" version))
1230 "1424gwq9sil2ffmnizk60q36vydkv8rxs6m7xs987kz8cdc37lqp"))))
1231 (build-system python-build-system)
1233 `(("sqlite" ,sqlite)))
1235 `(#:python ,python-2 ; incompatible with Python 3
1236 #:tests? #f)) ; no test target
1237 (home-page "http://github.com/ghaering/pysqlite")
1238 (synopsis "SQLite bindings for Python")
1240 "Pysqlite provides SQLite bindings for Python that comply to the
1241 Database API 2.0T.")
1242 (license license:zlib)))
1245 (define-public python2-mechanize
1247 (name "python2-mechanize")
1252 (uri (string-append "https://pypi.python.org/packages/source/m/mechanize/mechanize-"
1256 "0rj7r166i1dyrq0ihm5rijfmvhs8a04im28lv05c0c3v206v4rrf"))))
1257 (build-system python-build-system)
1259 `(#:python ,python-2 ; apparently incompatible with Python 3
1261 ;; test fails with message
1262 ;; AttributeError: 'module' object has no attribute 'test_pullparser'
1263 ;; (python-3.3.2) or
1264 ;; AttributeError: 'module' object has no attribute 'test_urllib2_localnet'
1266 ;; The source code is from March 2011 and probably not up-to-date
1267 ;; with respect to python unit tests.
1268 (home-page "http://wwwsearch.sourceforge.net/mechanize/")
1270 "Stateful programmatic web browsing in Python")
1272 "Mechanize implements stateful programmatic web browsing in Python,
1273 after Andy Lester’s Perl module WWW::Mechanize.")
1274 (license (license:non-copyleft
1276 "See COPYING in the distribution."))))
1279 (define-public python-simplejson
1281 (name "python-simplejson")
1286 (uri (pypi-uri "simplejson" version))
1289 "1qhwsykjlb85igb4cfl6v6gkprzbbg8gyqdd7zscc8w3x0ifcfwm"))))
1290 (build-system python-build-system)
1291 (home-page "http://simplejson.readthedocs.org/en/latest/")
1293 "Json library for Python")
1295 "JSON (JavaScript Object Notation) is a subset of JavaScript
1296 syntax (ECMA-262 3rd edition) used as a lightweight data interchange
1299 Simplejson exposes an API familiar to users of the standard library marshal
1300 and pickle modules. It is the externally maintained version of the json
1301 library contained in Python 2.6, but maintains compatibility with Python 2.5
1302 and (currently) has significant performance advantages, even without using
1303 the optional C extension for speedups. Simplejson is also supported on
1305 (license license:x11)))
1307 (define-public python2-simplejson
1308 (package-with-python2 python-simplejson))
1311 (define-public python-pyicu
1313 (name "python-pyicu")
1318 (uri (pypi-uri "PyICU" version))
1321 "16rmxy9y0qhqqna2v49i7nzwm09as699rbyvh4raw7w602w55c3k"))))
1322 (build-system python-build-system)
1325 (modify-phases %standard-phases
1326 (add-before 'check 'delete-failing-test
1328 ;; XXX: These tests require locales that are unavailable
1329 ;; in the build environment.
1330 (delete-file "test/test_DateTimeParserGenerator.py")
1333 `(("icu4c" ,icu4c)))
1334 (home-page "http://pyicu.osafoundation.org/")
1335 (synopsis "Python extension wrapping the ICU C++ API")
1337 "PyICU is a python extension wrapping the ICU C++ API.")
1338 (license license:x11)))
1340 (define-public python2-pyicu
1341 (package-with-python2 python-pyicu))
1343 (define-public python2-dogtail
1344 ;; Python 2 only, as it leads to "TabError: inconsistent use of tabs and
1345 ;; spaces in indentation" with Python 3.
1347 (name "python2-dogtail")
1352 "https://fedorahosted.org/released/dogtail/dogtail-"
1356 "1yc4cg7ip87z15gyd4wy2vzbywrjc52a3m8r8gqy2b50d65llcg1"))))
1357 (build-system python-build-system)
1358 (arguments `(#:python ,python-2
1359 #:tests? #f)) ; invalid command "test"
1360 (home-page "https://fedorahosted.org/dogtail/")
1361 (synopsis "GUI test tool and automation framework written in Python")
1363 "Dogtail is a GUI test tool and automation framework written in Python.
1364 It uses Accessibility (a11y) technologies to communicate with desktop
1365 applications. dogtail scripts are written in Python and executed like any
1366 other Python program.")
1367 (license license:gpl2+)))
1369 (define-public python2-empy
1371 (name "python2-empy")
1375 (uri (string-append "http://www.alcyone.com/software/empy/empy-"
1379 "01g8mmkfnvjdmlhsihwyx56lrg7r5m5d2fg6mnxsvy6g0dnl69f6"))))
1380 (build-system python-build-system)
1382 `(#:python ,python-2
1383 #:phases (alist-replace
1386 (zero? (system* "./test.sh")))
1388 (home-page "http://www.alcyone.com/software/empy/")
1389 (synopsis "Templating system for Python")
1391 "EmPy is a system for embedding Python expressions and statements in
1392 template text; it takes an EmPy source file, processes it, and produces
1393 output. This is accomplished via expansions, which are special signals to the
1394 EmPy system and are set off by a special prefix (by default the at sign, @@).
1395 EmPy can expand arbitrary Python expressions and statements in this way, as
1396 well as a variety of special forms. Textual data not explicitly delimited in
1397 this way is sent unaffected to the output, allowing Python to be used in
1398 effect as a markup language. Also supported are callbacks via hooks,
1399 recording and playback via diversions, and dynamic, chainable filters. The
1400 system is highly configurable via command line options and embedded
1402 (license license:lgpl2.1+)))
1404 (define-public python2-element-tree
1406 (name "python2-element-tree")
1411 "http://effbot.org/media/downloads/elementtree-"
1412 version "-20050316.tar.gz"))
1415 "016bphqnlg0l4vslahhw4r0aanw95bpypy65r1i1acyb2wj5z7dj"))))
1416 (build-system python-build-system)
1418 `(#:python ,python-2 ; seems to be part of Python 3
1419 #:tests? #f)) ; no 'test' sub-command
1420 (synopsis "Toolkit for XML processing in Python")
1422 "ElementTree is a Python library supporting lightweight XML processing.")
1423 (home-page "http://effbot.org/zone/element-index.htm")
1424 (license (license:x11-style
1425 "http://docs.python.org/2/license.html"
1426 "Like \"CWI LICENSE AGREEMENT FOR PYTHON 0.9.0 THROUGH 1.2\"."))))
1428 (define-public python2-pybugz
1430 (name "python2-pybugz")
1435 "http://bits.liquidx.net/projects/pybugz/pybugz-"
1439 "17ni00p08gp5lkxlrrcnvi3x09fmajnlbz4da03qcgl9q21ym4jd"))
1440 (patches (search-patches "pybugz-stty.patch"
1441 "pybugz-encode-error.patch"))))
1442 (build-system python-build-system)
1444 `(#:python ,python-2 ; SyntaxError with Python 3
1445 #:tests? #f)) ; no 'test' sub-command
1447 `(("element-tree" ,python2-element-tree)))
1448 (synopsis "Python and command-line interface to Bugzilla")
1450 "PyBugz is a Python library and command-line tool to query the Bugzilla
1451 bug tracking system. It is meant as an aid to speed up interaction with the
1453 (home-page "http://www.liquidx.net/pybugz/")
1454 (license license:gpl2)))
1456 (define-public python-enum34
1458 (name "python-enum34")
1463 (uri (pypi-uri "enum34" version))
1466 "0yx1m4564wxgbm4glb3457hi16xihd9w63rv13y2przkdir9dfgp"))))
1467 (build-system python-build-system)
1472 (lambda _ (zero? (system* "python" "enum/test_enum.py")))
1474 (home-page "https://pypi.python.org/pypi/enum34")
1475 (synopsis "Backported Python 3.4 Enum")
1477 "Enum34 is the new Python stdlib enum module available in Python 3.4
1478 backported for previous versions of Python from 2.4 to 3.3.")
1479 (license license:bsd-3)))
1481 (define-public python2-enum34
1482 (package-with-python2 python-enum34))
1484 (define-public python-parse-type
1486 (name "python-parse-type")
1491 (uri (string-append "https://pypi.python.org/packages/source/p/"
1492 "parse_type/parse_type-" version ".tar.gz"))
1495 "0iv1c34npr4iynwpgv1vkjx9rjd18a85ir8c01gc5f7wp8iv7l1x"))))
1496 (build-system python-build-system)
1498 `(("python-six" ,python-six)
1499 ("python-parse" ,python-parse)))
1500 (arguments '(#:tests? #f)) ;TODO: tests require pytest
1501 (home-page "https://github.com/jenisys/parse_type")
1502 (synopsis "Extended parse module")
1504 "Parse_type extends the python parse module.")
1505 (license license:bsd-3)))
1507 (define-public python-parse
1509 (name "python-parse")
1514 (uri (pypi-uri "parse" version))
1517 "0y31i3mwgv35qn0kzzjn9q8jqfdqmbi6sr6yfvn8rq4lqjm5lhvi"))
1518 (patches (search-patches "python-parse-too-many-fields.patch"))))
1519 (build-system python-build-system)
1522 (modify-phases %standard-phases
1524 (lambda _ (zero? (system* "python" "test_parse.py")))))))
1525 (home-page "https://github.com/r1chardj0n3s/parse")
1526 (synopsis "Parse strings")
1528 "Parse strings using a specification based on the Python format()
1530 (license license:x11)))
1532 (define-public python-polib
1534 (name "python-polib")
1538 (uri (pypi-uri "polib" version))
1541 "1pq2hbm3m2q0cjdszk8mc4qa1vl3wcblh5nfyirlfnzb2pcy7zss"))))
1542 (build-system python-build-system)
1543 (home-page "https://bitbucket.org/izi/polib/wiki/Home")
1544 (synopsis "Manipulate, create and modify gettext files")
1545 (description "Polib can manipulate any gettext format (po, pot and mo)
1546 files. It can be used to create po files from scratch or to modify
1548 (license license:expat)))
1550 (define-public python2-polib
1551 (let ((base (package-with-python2 (strip-python2-variant python-polib))))
1554 (arguments `(,@(package-arguments base)
1555 ;; Tests don't work with python2.
1558 (define-public scons
1564 (uri (string-append "mirror://sourceforge/scons/scons/" version
1565 "/scons-" version ".tar.gz"))
1568 "0hdlci43wjz8maryj83mz04ir6rwcdrrzpd7cpzvdlzycqhdfmsb"))))
1569 (build-system python-build-system)
1571 ;; With Python 3.x, fails to build with a syntax error.
1572 `(#:python ,python-2
1573 #:use-setuptools? #f ; still relies on distutils
1574 #:tests? #f)) ; no 'python setup.py test' command
1575 (home-page "http://scons.org/")
1576 (synopsis "Software construction tool written in Python")
1578 "SCons is a software construction tool. Think of SCons as an improved,
1579 cross-platform substitute for the classic Make utility with integrated
1580 functionality similar to autoconf/automake and compiler caches such as ccache.
1581 In short, SCons is an easier, more reliable and faster way to build
1583 (license license:x11)))
1585 (define-public python-extras
1587 (name "python-extras")
1593 "https://pypi.python.org/packages/source/e/extras/extras-"
1597 "1h7zx4dfyclalg0fqnfjijpn0f793a9mx8sy3b27gd31nr6dhq3s"))))
1598 (build-system python-build-system)
1600 ;; error in setup.cfg: command 'test' has no such option 'buffer'
1602 (home-page "https://github.com/testing-cabal/extras")
1603 (synopsis "Useful extensions to the Python standard library")
1605 "Extras is a set of extensions to the Python standard library.")
1606 (license license:expat)))
1608 (define-public python2-extras
1609 (package-with-python2 python-extras))
1611 (define-public python-mimeparse
1613 (name "python-mimeparse")
1619 "https://pypi.python.org/packages/source/p/python-mimeparse/python-mimeparse-"
1623 "1hyxg09kaj02ri0rmwjqi86wk4nd1akvv7n0dx77azz76wga4s9w"))))
1624 (build-system python-build-system)
1626 '(#:tests? #f)) ; no setup.py test command
1628 "https://github.com/dbtsai/python-mimeparse")
1629 (synopsis "Python library for parsing MIME types")
1631 "Mimeparse provides basic functions for parsing MIME type names and
1632 matching them against a list of media-ranges.")
1633 (license license:expat)))
1635 (define-public python2-mimeparse
1636 (package-with-python2 python-mimeparse))
1638 (define-public python-nose
1640 (name "python-nose")
1645 (uri (pypi-uri "nose" version))
1648 "164a43k7k2wsqqk1s6vavcdamvss4mz0vd6pwzv2h9n8rgwzxgzi"))))
1649 (build-system python-build-system)
1651 '(#:tests? #f)) ; FIXME: test suite fails
1652 (home-page "http://readthedocs.org/docs/nose/")
1653 (synopsis "Python testing library")
1655 "Nose extends the unittest library to make testing easier.")
1656 (license license:lgpl2.0+)))
1658 (define-public python2-nose
1659 (package-with-python2 python-nose))
1661 (define-public python-nose2
1663 (name "python-nose2")
1668 (uri (pypi-uri "nose2" version))
1671 "1x4zjq1zlyrh8b9ba0cmafd3w94pxhid408kibyjd3s6h1lap6s7"))))
1672 (build-system python-build-system)
1673 (arguments `(#:tests? #f)) ; 'module' object has no attribute 'collector'
1675 `(("python-cov-core" ,python-cov-core)
1676 ("python-pytest-cov" ,python-pytest-cov)
1677 ("python-six" ,python-six)))
1678 (home-page "https://github.com/nose-devs/nose2")
1679 (synopsis "Next generation of nicer testing for Python")
1681 "Nose2 is the next generation of nicer testing for Python, based on the
1682 plugins branch of unittest2. Nose2 aims to improve on nose by providing a
1683 better plugin api, being easier for users to configure, and simplifying internal
1684 interfaces and processes.")
1685 (license license:bsd-2)))
1687 (define-public python2-nose2
1688 (package-with-python2 python-nose2))
1690 (define-public python-unittest2
1692 (name "python-unittest2")
1698 "https://pypi.python.org/packages/source/u/unittest2py3k/unittest2py3k-"
1702 "00yl6lskygcrddx5zspkhr0ibgvpknl4678kkm6s626539grq93q"))))
1703 (build-system python-build-system)
1704 (home-page "http://pypi.python.org/pypi/unittest2")
1705 (synopsis "Python unit testing library")
1707 "Unittest2 is a replacement for the unittest module in the Python
1709 (license license:psfl)))
1711 (define-public python2-unittest2
1712 (package (inherit python-unittest2)
1713 (name "python2-unittest2")
1719 "https://pypi.python.org/packages/source/u/unittest2/unittest2-"
1723 "0wbs4i4x3x7klr3v35ss6p9mcqz883i1xgcpkhvl7n2lyv6yhpda"))))
1725 `(#:python ,python-2
1726 #:tests? #f)))) ; no setup.py test command
1728 (define-public python-pafy
1730 (name "python-pafy")
1735 (uri (pypi-uri "pafy" version))
1738 "1ckvrypyvb7jbqlgwdz0y337ajagjv7dgxyns326nqwypn1wpq0i"))))
1739 (build-system python-build-system)
1741 `(#:tests? #f)) ; Currently pafy can not find itself in the tests
1743 ;; Youtube-dl is a python package which is imported in the file
1744 ;; "backend_youtube_dl.py", therefore it needs to be propagated.
1745 `(("youtube-dl" ,youtube-dl)))
1746 (home-page "https://np1.github.io/pafy/")
1747 (synopsis "Retrieve YouTube content and metadata")
1749 "@code{pafy} is a python library to retrieve YouTube content and metadata.")
1750 (license license:lgpl3+)))
1752 (define-public python-py
1759 (uri (pypi-uri "py" version))
1762 "0561gz2w3i825gyl42mcq14y3dcgkapfiv5zv9a2bz15qxiijl56"))))
1763 (build-system python-build-system)
1765 ;; FIXME: "ImportError: 'test' module incorrectly imported from
1766 ;; '/gnu/store/...-python-pytest-mimimal-3.0.5/lib/python3.5/site-packages'.
1767 ;; Expected '/tmp/guix-build-python-py-1.4.31.drv-0/py-1.4.31/py'.
1768 ;; Is this module globally installed?"
1770 (home-page "http://pylib.readthedocs.org/")
1771 (synopsis "Python library for parsing, I/O, instrospection, and logging")
1773 "Py is a Python library for file name parsing, .ini file parsing, I/O,
1774 code introspection, and logging.")
1775 (license license:expat)))
1777 (define-public python2-py
1778 (package-with-python2 python-py))
1780 (define-public python-pytest
1782 (name "python-pytest")
1788 "https://pypi.python.org/packages/source/p/pytest/pytest-"
1792 "1z4yi986f9n0p8qmzmn21m21m8j1x78hk3505f89baqm6pdw7afm"))
1793 (modules '((guix build utils)))
1795 ;; One of the tests involves the /usr directory, so it fails.
1796 '(substitute* "testing/test_argcomplete.py"
1797 (("def test_remove_dir_prefix\\(self\\):")
1798 "@pytest.mark.xfail\n def test_remove_dir_prefix(self):")))))
1799 (build-system python-build-system)
1801 `(("python-py" ,python-py)))
1803 `(("python-nose" ,python-nose)
1804 ("python-mock" ,python-mock)))
1805 (home-page "http://pytest.org")
1806 (synopsis "Python testing library")
1808 "Pytest is a testing tool that provides auto-discovery of test modules
1809 and functions, detailed info on failing assert statements, modular fixtures,
1810 and many external plugins.")
1811 (license license:expat)))
1813 (define-public python2-pytest
1814 (package-with-python2 python-pytest))
1816 ;; This package is used by Borg until we can upgrade all our Python packages to
1817 ;; use a more recent pytest.
1818 (define-public python-pytest-2.9.2
1820 (inherit python-pytest)
1821 (name "python-pytest")
1825 (uri (pypi-uri "pytest" version))
1828 "1n6igbc1b138wx1q5gca4pqw1j6nsyicfxds5n0b5989kaxqmh8j"))))
1831 (modify-phases %standard-phases
1832 (add-before 'check 'disable-invalid-test
1834 (substitute* "testing/test_argcomplete.py"
1835 (("def test_remove_dir_prefix" line)
1836 (string-append "@pytest.mark.skip"
1837 "(reason=\"Assumes that /usr exists.\")\n "
1841 (define-public python-pytest-cov
1843 (name "python-pytest-cov")
1848 (uri (pypi-uri "pytest-cov" version))
1851 "1yl4nbhzfgsxqlsyk4clafgp9x11zvgrkprm9i2p3fgkwx9jxcm8"))))
1852 (build-system python-build-system)
1855 (modify-phases %standard-phases
1858 ;; options taken from tox.ini
1859 ;; TODO: make "--restructuredtext" tests pass. They currently fail
1860 ;; with "Duplicate implicit target name"
1861 (zero? (system* "python" "./setup.py" "check"
1862 "--strict" "--metadata")))))))
1864 `(("python-coverage" ,python-coverage)
1865 ("python-pytest" ,python-pytest)))
1866 (home-page "https://github.com/pytest-dev/pytest-cov")
1867 (synopsis "Pytest plugin for measuring coverage")
1869 "Pytest-cov produces coverage reports. It supports centralised testing and
1870 distributed testing in both @code{load} and @code{each} modes. It also
1871 supports coverage of subprocesses.")
1872 (license license:expat)))
1874 (define-public python2-pytest-cov
1875 (package-with-python2 python-pytest-cov))
1877 (define-public python-pytest-runner
1879 (name "python-pytest-runner")
1884 (uri (pypi-uri "pytest-runner" version))
1887 "1nwcqx0l3fv52kv8526wy8ypzghbq96c96di318d98d3wh7a8xg7"))))
1888 (build-system python-build-system)
1891 (modify-phases %standard-phases
1892 ;; The fancy way of setting the version with setuptools_scm does not
1893 ;; seem to work here.
1894 (add-after 'unpack 'set-version
1896 (substitute* "docs/conf.py"
1897 (("version = setuptools_scm\\.get_version\\(root='\\.\\.')")
1898 (string-append "version = \"" ,version "\"")))
1901 `(("python-pytest" ,python-pytest)
1902 ("python-setuptools-scm" ,python-setuptools-scm)))
1903 (home-page "https://github.com/pytest-dev/pytest-runner")
1904 (synopsis "Invoke py.test as a distutils command")
1906 "This package provides a @command{pytest-runner} command that
1907 @file{setup.py} files can use to run tests.")
1908 (license license:expat)))
1910 (define-public python2-pytest-runner
1911 (package-with-python2 python-pytest-runner))
1913 (define-public python-pytest-mock
1915 (name "python-pytest-mock")
1920 (uri (pypi-uri "pytest-mock" version ".zip"))
1923 "03zxar5drzm7ksqyrwypjaza3cri6wqvpr6iam92djvg6znp32gp"))))
1924 (build-system python-build-system)
1926 `(("unzip" ,unzip)))
1928 `(("python-pytest" ,python-pytest)))
1929 (home-page "https://github.com/pytest-dev/pytest-mock/")
1930 (synopsis "Thin-wrapper around the mock package for easier use with py.test")
1932 "This plugin installs a @code{mocker} fixture which is a thin-wrapper
1933 around the patching API provided by the @code{mock} package, but with the
1934 benefit of not having to worry about undoing patches at the end of a test.
1935 The mocker fixture has the same API as @code{mock.patch}, supporting the
1937 (properties `((python2-variant . ,(delay python2-pytest-mock))))
1938 (license license:expat)))
1940 (define-public python2-pytest-mock
1941 (let ((base (package-with-python2
1942 (strip-python2-variant python-pytest-mock))))
1943 (package (inherit base)
1945 `(("python2-mock" ,python2-mock)
1946 ,@(package-propagated-inputs base))))))
1948 (define-public python-pytest-xdist
1950 (name "python-pytest-xdist")
1955 (uri (pypi-uri "pytest-xdist" version ".zip"))
1958 "08rn2l39ds60xshs4js787l84pfckksqklfq2wq9x8ig2aci2pja"))
1959 (modules '((guix build utils)))
1962 ;; Remove pre-compiled .pyc files from source.
1963 (for-each delete-file-recursively
1964 (find-files "." "__pycache__" #:directories? #t))
1965 (for-each delete-file (find-files "." "\\.pyc$"))
1967 (build-system python-build-system)
1969 '(#:tests? #f)) ;FIXME: Some tests are failing.
1971 ;; (modify-phases %standard-phases
1973 ;; (add-after 'install 'check
1974 ;; (lambda* (#:key inputs outputs #:allow-other-keys)
1975 ;; (add-installed-pythonpath inputs outputs)
1976 ;; (zero? (system* "py.test" "-v")))))
1979 ("python-setuptools-scm" ,python-setuptools-scm)))
1981 `(("python-execnet" ,python-execnet)
1982 ("python-pytest" ,python-pytest)
1983 ("python-py" ,python-py)))
1985 "https://github.com/pytest-dev/pytest-xdist")
1987 "Plugin for py.test with distributed testing and loop-on-failing modes")
1989 "The pytest-xdist plugin extends py.test with some unique test execution
1990 modes: parallelization, running tests in boxed subprocesses, the ability
1991 to run tests repeatedly when failed, and the ability to run tests on multiple
1992 Python interpreters or platforms. It uses rsync to copy the existing
1993 program code to a remote location, executes there, and then syncs the
1995 (license license:expat)))
1997 (define-public python2-pytest-xdist
1998 (package-with-python2 python-pytest-xdist))
2000 (define-public python-scripttest
2002 (name "python-scripttest")
2008 "https://pypi.python.org/packages/source/s/scripttest/scripttest-"
2012 "0f4w84k8ck82syys7yg9maz93mqzc8p5ymis941x034v44jzq74m"))))
2013 (build-system python-build-system)
2015 `(("python-pytest" ,python-pytest)))
2016 (home-page "http://pythonpaste.org/scripttest/")
2017 (synopsis "Python library to test command-line scripts")
2018 (description "Scripttest is a Python helper library for testing
2019 interactive command-line applications. With it you can run a script in a
2020 subprocess and see the output as well as any file modifications.")
2021 (license license:expat)))
2023 (define-public python2-scripttest
2024 (package-with-python2 python-scripttest))
2026 (define-public python-testtools
2028 (name "python-testtools")
2033 (uri (pypi-uri "testtools" version))
2036 "1vw8yljnd75d396hhw6s2hrf4cclzy845ifd5am0lxsl235z3i8c"))))
2037 (build-system python-build-system)
2040 (modify-phases %standard-phases
2041 (add-after 'unpack 'fix-module-imports
2043 (substitute* "setup.py"
2044 (("'unittest2>=0.8.0',") ""))
2045 (substitute* '("testtools/testcase.py"
2046 "testtools/testsuite.py"
2048 "testtools/tests/test_run.py"
2049 "testtools/tests/test_testsuite.py"
2050 "testtools/tests/test_deferredruntest.py")
2051 ;; unittest2 is a backport of Python2.7 features to Python 2.4.
2052 (("import unittest2 as unittest") "import unittest")
2053 (("import unittest2") "import unittest as unittest2")
2054 (("from unittest2 import") "from unittest import"))
2055 (substitute* "testtools/tests/test_testresult.py"
2056 ;; NUL in source code is not allowed (raises ValueError).
2057 (("\\x00\\x04") "\\x04"))
2060 `(("python-mimeparse" ,python-mimeparse)
2061 ("python-extras" ,python-extras)))
2062 (home-page "https://github.com/testing-cabal/testtools")
2064 "Extensions to the Python standard library unit testing framework")
2066 "Testtools extends the Python standard library unit testing framework to
2067 provide matchers, more debugging information, and cross-Python
2069 (license license:psfl)))
2071 (define-public python2-testtools
2072 (package-with-python2 python-testtools))
2074 (define-public python-testscenarios
2076 (name "python-testscenarios")
2082 "https://pypi.python.org/packages/source/t/testscenarios/testscenarios-"
2086 "1671jvrvqlmbnc42j7pc5y6vc37q44aiwrq0zic652pxyy2fxvjg"))))
2087 (build-system python-build-system)
2089 `(("python-testtools" ,python-testtools)))
2090 (home-page "https://launchpad.net/testscenarios")
2091 (synopsis "Pyunit extension for dependency injection")
2093 "Testscenarios provides clean dependency injection for Python unittest
2095 (license (list license:bsd-3 license:asl2.0)))) ; at the user's option
2097 (define-public python2-testscenarios
2098 (package-with-python2 python-testscenarios))
2100 (define-public python-testresources
2102 (name "python-testresources")
2108 "https://pypi.python.org/packages/source/t/testresources/testresources-"
2112 "0cbj3plbllyz42c4b5xxgwaa7mml54lakslrn4kkhinxhdri22md"))))
2113 (build-system python-build-system)
2114 (home-page "https://launchpad.net/testresources")
2116 "Pyunit extension for managing test resources")
2118 "Testresources is an extension to Python's unittest to allow declarative
2119 use of resources by test cases.")
2120 (license (list license:bsd-3 license:asl2.0)))) ; at the user's option
2122 (define-public python2-testresources
2123 (package-with-python2 python-testresources))
2125 (define-public python-subunit
2127 (name "python-subunit")
2133 "https://pypi.python.org/packages/source/p/python-subunit/python-subunit-"
2137 "1nkw9wfbvizmpajbj3in8ns07g7lwkiv8hip14jjlwk3cacls6jv"))))
2138 (build-system python-build-system)
2140 `(("python-extras" ,python-extras)
2141 ("python-mimeparse" ,python-mimeparse)))
2143 `(("python-testscenarios" ,python-testscenarios)))
2144 (home-page "http://launchpad.net/subunit")
2145 (synopsis "Python implementation of the subunit protocol")
2147 "Python-subunit is a Python implementation of the subunit test streaming
2149 (license (list license:bsd-3 license:asl2.0)))) ; at the user's option
2151 (define-public python2-subunit
2152 (package-with-python2 python-subunit))
2154 ;; Recent versions of python-fixtures and python-testrepository need
2155 ;; python-pbr for packaging, which itself needs these two packages for
2157 ;; To fix this circular dependency, we use a build of python-pbr, based on the
2158 ;; same source, just without any test dependencies and with tests disabled.
2159 ;; python-pbr-minmal is then used to package python-fixtures and
2160 ;; python-testrepository.
2161 ;; Strictly speaking we currently could remove the test-requirements from the
2162 ;; normal python-pbr package (and save this package) since test are disabled
2163 ;; there anyway. But this may change in future.
2164 (define python-pbr-minimal
2166 (name "python-pbr-minimal")
2171 (uri (pypi-uri "pbr" version))
2174 "177kd9kbv1hvf2ban7l3x9ymzbi1md4hkaymwbgnz7ihf312hr0q"))
2175 (patches (search-patches "python-pbr-fix-man-page-support.patch"))))
2176 (build-system python-build-system)
2179 (home-page "http://docs.openstack.org/developer/pbr/")
2180 (synopsis "Minimal build of python-pbr used for bootstrapping")
2182 "Used only for bootstrapping python2-pbr, you should not need this.")
2183 (license license:asl2.0)))
2185 (define python2-pbr-minimal
2186 (package-with-python2 python-pbr-minimal))
2188 (define-public python-pbr
2190 (inherit python-pbr-minimal)
2193 `(#:tests? #f)) ;; Most tests seem to use the Internet.
2195 `(("git" ,git))) ;; pbr actually uses the "git" binary.
2197 `(("python-fixtures" ,python-fixtures)
2198 ;; discover, coverage, hacking, subunit
2199 ("python-mock" ,python-mock)
2200 ("python-six" ,python-six)
2201 ("python-sphinx" ,python-sphinx)
2202 ("python-testrepository" ,python-testrepository)
2203 ("python-testresources" ,python-testresources)
2204 ("python-testscenarios" ,python-testscenarios)
2205 ("python-testtools" ,python-testtools)
2206 ("python-virtualenv" ,python-virtualenv)))
2207 (synopsis "Enhance the default behavior of Python’s setuptools")
2209 "Python Build Reasonableness (PBR) is a library that injects some useful
2210 and sensible default behaviors into your setuptools run. It will set
2211 versions, process requirements files and generate AUTHORS and ChangeLog file
2212 from git information.
2215 (define-public python2-pbr
2216 (package-with-python2 python-pbr))
2218 (define-public python-fixtures
2220 (name "python-fixtures")
2225 (uri (pypi-uri "fixtures" version))
2228 "0djxvdwm8s60dbfn7bhf40x6g818p3b3mlwijm1c3bqg7msn271y"))))
2229 (build-system python-build-system)
2232 (modify-phases %standard-phases
2235 (zero? (system* "python" "-m" "testtools.run"
2236 "fixtures.test_suite")))))))
2238 `(("python-six" ,python-six)))
2240 `(("python-mock" ,python-mock)
2241 ("python-pbr-minimal" ,python-pbr-minimal)
2242 ("python-testtools" ,python-testtools)))
2243 (home-page "https://launchpad.net/python-fixtures")
2244 (synopsis "Python test fixture library")
2246 "Fixtures provides a way to create reusable state, useful when writing
2248 (license (list license:bsd-3 license:asl2.0)))) ; at user's option
2250 (define-public python2-fixtures
2251 (package-with-python2 python-fixtures))
2253 (define-public python-testrepository
2255 (name "python-testrepository")
2261 "https://pypi.python.org/packages/source/t/testrepository/testrepository-"
2265 "1ssqb07c277010i6gzzkbdd46gd9mrj0bi0i8vn560n2k2y4j93m"))))
2266 (build-system python-build-system)
2268 ;; FIXME: Many tests are failing.
2271 `(("python-fixtures" ,python-fixtures)
2272 ("python-subunit" ,python-subunit)
2273 ("python-testtools" ,python-testtools)))
2275 `(("python-pbr-minimal" ,python-pbr-minimal) ;; same as for building fixture
2276 ("python-mimeparse" ,python-mimeparse)))
2277 (home-page "https://launchpad.net/testrepository")
2278 (synopsis "Database for Python test results")
2279 (description "Testrepository provides a database of test results which can
2280 be used as part of a developer's workflow to check things such as what tests
2281 have failed since the last commit or what tests are currently failing.")
2282 (license (list license:bsd-3 license:asl2.0)))) ; at user's option
2284 (define-public python2-testrepository
2285 (package-with-python2 python-testrepository))
2287 (define-public python-coverage
2289 (name "python-coverage")
2294 (uri (pypi-uri "coverage" version))
2297 "01rbr4br4lsk0lwn8fb96zwd2xr4f0mg1w7iq3j11i8f5ig2nqs1"))))
2298 (build-system python-build-system)
2300 ;; FIXME: 95 tests failed, 539 passed, 6 skipped, 2 errors.
2302 (home-page "http://nedbatchelder.com/code/coverage")
2303 (synopsis "Code coverage measurement for Python")
2305 "Coverage measures code coverage, typically during test execution. It
2306 uses the code analysis tools and tracing hooks provided in the Python standard
2307 library to determine which lines are executable, and which have been
2309 (license license:bsd-3)))
2311 (define-public python2-coverage
2312 (package-with-python2 python-coverage))
2314 (define-public python-cov-core
2316 (name "python-cov-core")
2321 (uri (pypi-uri "cov-core" version))
2324 "0k3np9ymh06yv1ib96sb6wfsxjkqhmik8qfsn119vnhga9ywc52a"))))
2325 (build-system python-build-system)
2327 `(("python-coverage" ,python-coverage)))
2328 (home-page "https://github.com/schlamar/cov-core")
2329 (synopsis "Coverage plugin core for pytest-cov, nose-cov and nose2-cov")
2331 "This is a library package for use by @code{pytest-cov}, @code{nose-cov}
2332 and @code{nose2-cov}. It is useful for developing coverage plugins for these
2333 testing frameworks.")
2334 (license license:expat)))
2336 (define-public python2-cov-core
2337 (package-with-python2 python-cov-core))
2339 (define-public python-discover
2341 (name "python-discover")
2347 "https://pypi.python.org/packages/source/d/discover/discover-"
2351 "0y8d0zwiqar51kxj8lzmkvwc3b8kazb04gk5zcb4nzg5k68zmhq5"))))
2352 (build-system python-build-system)
2353 (home-page "http://pypi.python.org/pypi/discover/")
2355 "Python test discovery for unittest")
2357 "Discover provides test discovery for unittest, a feature that has been
2358 backported from Python 2.7 for Python 2.4+.")
2359 (license license:bsd-3)))
2361 (define-public python2-discover
2362 (package-with-python2 python-discover))
2364 (define-public behave
2370 (uri (pypi-uri "behave" version ".tar.bz2"))
2373 "1iypp6z46r19n4xmgx6m1lwmlpfjh8vapq8izigrqlaarvp2y64c"))))
2374 (build-system python-build-system)
2376 `(("python-six" ,python-six)
2377 ("python-parse" ,python-parse)
2378 ("python-parse-type" ,python-parse-type)))
2379 (arguments `(#:tests? #f)) ;TODO: tests require nose>=1.3 and
2381 (home-page "http://github.com/behave/behave")
2382 (synopsis "Python behavior-driven development")
2384 "Behave is a tool for behavior-driven development in python.
2385 Behavior-driven development (or BDD) is an agile software development
2386 technique that encourages collaboration between developers, QA and
2387 non-technical or business participants in a software project. Behave uses
2388 tests written in a natural language style, backed up by Python code.")
2389 (license license:x11)))
2391 (define-public python-exif-read
2393 (name "python-exif-read")
2397 (uri (pypi-uri "ExifRead" version))
2400 "1b90jf6m9vxh9nanhpyvqdq7hmfx5iggw1l8kq10jrs6xgr49qkr"))))
2401 (build-system python-build-system)
2402 (arguments `(#:tests? #f)) ; no tests
2403 (home-page "https://github.com/ianare/exif-py")
2404 (synopsis "Python library to extract EXIF data from image files")
2406 "ExifRead is a Python library to extract EXIF data from tiff and jpeg
2408 (license license:bsd-3)))
2410 (define-public python2-exif-read
2411 (package-with-python2 python-exif-read))
2413 (define-public python-pyld
2415 (name "python-pyld")
2419 (uri (pypi-uri "PyLD" version))
2422 "1m0fs6897vxfkf7awah5i66i7b7smm5fnywf1w50fpzyfbfhr156"))))
2423 (build-system python-build-system)
2424 (arguments `(#:tests? #f)) ; no tests
2425 (home-page "http://github.com/digitalbazaar/pyld")
2426 (synopsis "Python implementation of the JSON-LD specification")
2428 "PyLD is an implementation of the JSON-LD specification.")
2429 (license license:bsd-3)))
2431 (define-public python2-pyld
2432 (package-with-python2 python-pyld))
2434 (define-public python-certifi
2436 (name "python-certifi")
2437 (version "2017.1.23")
2440 (uri (pypi-uri "certifi" version))
2443 "1klrzl3hgvcf2mjk00g0k3kk1p2z27vzwnxivwar4vhjmjvpz1w1"))))
2444 (build-system python-build-system)
2445 (home-page "https://certifi.io/")
2446 (synopsis "Python CA certificate bundle")
2448 "Certifi is a Python library that contains a CA certificate bundle, which
2449 is used by the Requests library to verify HTTPS requests.")
2450 (license license:asl2.0)))
2452 (define-public python2-certifi
2453 (package-with-python2 python-certifi))
2455 (define-public python-click
2457 (name "python-click")
2462 (uri (pypi-uri "click" version))
2465 "02qkfpykbq35id8glfgwc38yc430427yd05z1wc5cnld8zgicmgi"))))
2466 (build-system python-build-system)
2469 (modify-phases %standard-phases
2470 (add-after 'unpack 'fix-paths
2471 (lambda* (#:key inputs #:allow-other-keys)
2472 (let ((glibc (assoc-ref inputs ,(if (%current-target-system)
2473 "cross-libc" "libc"))))
2474 (substitute* "click/_unicodefun.py"
2476 (string-append "'" glibc "/bin/locale'"))))
2480 (zero? (system* "make" "test")))))))
2482 `(("python-pytest" ,python-pytest)))
2483 (home-page "http://click.pocoo.org")
2484 (synopsis "Command line library for Python")
2486 "Click is a Python package for creating command line interfaces in a
2487 composable way with as little code as necessary. Its name stands for
2488 \"Command Line Interface Creation Kit\". It's highly configurable but comes
2489 with sensible defaults out of the box.")
2490 (license license:bsd-3)))
2492 (define-public python2-click
2493 (package-with-python2 python-click))
2495 (define-public python-wheel
2497 (name "python-wheel")
2498 (version "0.30.0a0")
2502 (uri (pypi-uri "wheel" version))
2505 "1nm6mn8isny0hr86rhbfrpfj867c0phf001xgsd69xfp9ady1wwq"))))
2506 (build-system python-build-system)
2508 `(("python-jsonschema" ,python-jsonschema)
2509 ("python-pytest-cov" ,python-pytest-cov)))
2510 (home-page "https://bitbucket.org/pypa/wheel/")
2511 (synopsis "Format for built Python packages")
2513 "A wheel is a ZIP-format archive with a specially formatted filename and
2514 the @code{.whl} extension. It is designed to contain all the files for a PEP
2515 376 compatible install in a way that is very close to the on-disk format. Many
2516 packages will be properly installed with only the @code{Unpack} step and the
2517 unpacked archive preserves enough information to @code{Spread} (copy data and
2518 scripts to their final locations) at any later time. Wheel files can be
2519 installed with a newer @code{pip} or with wheel's own command line utility.")
2520 (license license:expat)
2521 (properties `((python2-variant . ,(delay python2-wheel))))))
2523 (define-public python2-wheel
2524 (let ((wheel (package-with-python2
2525 (strip-python2-variant python-wheel))))
2526 (package (inherit wheel)
2527 (native-inputs `(("python2-functools32" ,python2-functools32)
2528 ,@(package-native-inputs wheel))))))
2531 (define-public python-requests
2533 (name "python-requests")
2537 (uri (pypi-uri "requests" version))
2540 "1s0wg4any4dsv5l3hqjxqk2zgb7pdbqhy9rhc8kh3aigfq4ws8jp"))))
2541 ;; TODO: unbundle urllib3 and chardet.
2542 (build-system python-build-system)
2544 ;; FIXME: Some tests require network access.
2546 (home-page "http://python-requests.org/")
2547 (synopsis "Python HTTP library")
2549 "Requests is a Python HTTP client library. It aims to be easier to use
2550 than Python’s urllib2 library.")
2551 (license license:asl2.0)))
2553 ;; Some software requires an older version of Requests, notably Docker
2555 (define-public python-requests-2.7
2556 (package (inherit python-requests)
2560 (uri (pypi-uri "requests" version))
2563 "0gdr9dxm24amxpbyqpbh3lbwxc2i42hnqv50sigx568qssv3v2ir"))))))
2565 (define-public python2-requests
2566 (package-with-python2 python-requests))
2568 (define-public python-vcversioner
2570 (name "python-vcversioner")
2571 (version "2.16.0.0")
2575 (uri (pypi-uri "vcversioner" version))
2578 "16z10sm78jd7ca3jbkgc3q5i8a8q7y1h21q1li21yy3rlhbhrrns"))))
2579 (build-system python-build-system)
2580 (synopsis "Python library for version number discovery")
2581 (description "Vcversioner is a Python library that inspects tagging
2582 information in a variety of version control systems in order to discover
2584 (home-page "https://github.com/habnabit/vcversioner")
2585 (license license:isc)))
2587 (define-public python2-vcversioner
2588 (package-with-python2 python-vcversioner))
2590 (define-public python-jsonschema
2592 (name "python-jsonschema")
2598 "https://pypi.python.org/packages/source/j/jsonschema/jsonschema-"
2602 "0hddbqjm4jq63y8jf44nswina1crjs16l9snb6m3vvgyg31klrrn"))))
2603 (build-system python-build-system)
2606 (modify-phases %standard-phases
2607 (replace 'check (lambda _ (zero? (system* "nosetests")))))))
2609 `(("python-nose" ,python-nose)
2610 ("python-vcversioner" ,python-vcversioner)))
2611 (home-page "https://github.com/Julian/jsonschema")
2612 (synopsis "Implementation of JSON Schema for Python")
2614 "Jsonschema is an implementation of JSON Schema for Python.")
2615 (license license:expat)
2616 (properties `((python2-variant . ,(delay python2-jsonschema))))))
2618 (define-public python2-jsonschema
2619 (let ((jsonschema (package-with-python2
2620 (strip-python2-variant python-jsonschema))))
2621 (package (inherit jsonschema)
2623 `(("python2-mock" ,python2-mock)
2624 ,@(package-native-inputs jsonschema)))
2626 `(("python2-functools32" ,python2-functools32))))))
2628 (define-public python-kitchen
2630 (name "python-kitchen")
2635 (uri (pypi-uri "kitchen" version))
2638 "0ggv3p4x8jvmmzhp0xm00h6pvh1g0gmycw71rjwagnrj8n23vxrq"))))
2639 (build-system python-build-system)
2641 `(("python-chardet" ,python-chardet)))
2642 (home-page "https://fedorahosted.org/kitchen")
2643 (synopsis "Python API for snippets")
2644 (description "@code{kitchen} module provides a python API for all sorts of
2645 little useful snippets of code that everybody ends up writing for their projects
2646 but never seem big enough to build an independent release. Use kitchen and stop
2647 cutting and pasting that code over and over.")
2648 (license (list license:lgpl2.1+
2649 ;; subprocess.py, test_subprocess.py,
2650 ;; kitchen/pycompat25/defaultdict.py:
2653 (define-public python2-kitchen
2654 (package-with-python2 python-kitchen))
2656 (define-public python-unidecode
2658 (name "python-unidecode")
2662 (uri (pypi-uri "Unidecode" version))
2665 "1q00i8gpsq3d9r0q8wk4b290fxl0kqlsdk7iadvli45in6s1hi7d"))))
2666 (build-system python-build-system)
2667 (home-page "https://pypi.python.org/pypi/Unidecode")
2668 (synopsis "ASCII transliterations of Unicode text")
2670 "Unidecode provides ASCII transliterations of Unicode text. Unidecode is
2671 useful when integrating with legacy code that doesn't support Unicode, or for
2672 ease of entry of non-Roman names on a US keyboard, or when constructing ASCII
2673 machine identifiers from human-readable Unicode strings that should still be
2674 somewhat intelligeble.")
2675 (license license:gpl2+)))
2677 (define-public python2-unidecode
2678 (package-with-python2 python-unidecode))
2680 (define-public python-pyjwt
2682 (name "python-pyjwt")
2687 (uri (pypi-uri "PyJWT" version))
2690 "1556v2jppd8mjkkj66pxb5rcazm35jq81r233mdl8hfmz9n3icp1"))))
2691 (build-system python-build-system)
2693 `(("python-pytest" ,python-pytest)
2694 ("python-pytest-cov" ,python-pytest-cov)
2695 ("python-pytest-runner" ,python-pytest-runner)))
2696 (home-page "http://github.com/progrium/pyjwt")
2697 (synopsis "JSON Web Token implementation in Python")
2699 "PyJWT is a JSON Web Token implementation written in Python.")
2700 (license license:expat)))
2702 (define-public python2-pyjwt
2703 (package-with-python2 python-pyjwt))
2705 (define-public python-pykka
2707 (name "python-pykka")
2712 (uri (pypi-uri "Pykka" version))
2715 "049w3r0mdnnw7xv19jiq7rvls9k7xs73x05b4qs5d6z4vvmgyiz8"))))
2716 (build-system python-build-system)
2718 `(("python-mock" ,python-mock)
2719 ("python-nose" ,python-nose)
2720 ("python-gevent" ,python-gevent)
2721 ("python-eventlet" ,python-eventlet)))
2722 (home-page "https://www.pykka.org/")
2723 (synopsis "Pykka is a Python implementation of the actor model")
2725 "Pykka is a Python implementation of the actor model.
2726 The actor model introduces some simple rules to control the sharing
2727 of state and cooperation between execution units, which makes it
2728 easier to build concurrent applications.")
2729 (license license:asl2.0)))
2731 (define-public python2-pykka
2732 (package-with-python2 python-pykka))
2734 (define-public python-oauthlib
2736 (name "python-oauthlib")
2740 (uri (pypi-uri "oauthlib" version))
2743 "1bfrj70vdjxjw74khbyh6f0dksv7p5rh2346jnlrffyacd3gwjzg"))))
2744 (build-system python-build-system)
2746 `(("python-nose" ,python-nose)
2747 ("python-mock" ,python-mock)
2748 ("python-cryptography" ,python-cryptography)
2749 ("python-pyjwt" ,python-pyjwt)
2750 ("python-blinker" ,python-blinker)))
2751 (home-page "https://github.com/idan/oauthlib")
2752 (synopsis "OAuth implementation for Python")
2754 "Oauthlib is a generic, spec-compliant, thorough implementation of the
2755 OAuth request-signing logic.")
2756 (license license:bsd-3)
2757 (properties `((python2-variant . ,(delay python2-oauthlib))))))
2759 (define-public python2-oauthlib
2760 (let ((base (package-with-python2 (strip-python2-variant python-oauthlib))))
2763 (native-inputs `(("python2-unittest2" ,python2-unittest2)
2764 ,@(package-native-inputs base))))))
2766 (define-public python-itsdangerous
2768 (name "python-itsdangerous")
2774 "https://pypi.python.org/packages/source/i/itsdangerous/itsdangerous-"
2778 "06856q6x675ly542ig0plbqcyab6ksfzijlyf1hzhgg3sgwgrcyb"))))
2779 (build-system python-build-system)
2780 (home-page "http://github.com/mitsuhiko/itsdangerous")
2781 (synopsis "Python library for passing data to/from untrusted environments")
2783 "Itsdangerous provides various helpers to pass trusted data to untrusted
2784 environments and back.")
2785 (license license:bsd-3)))
2787 (define-public python2-itsdangerous
2788 (package-with-python2 python-itsdangerous))
2790 (define-public python-pyyaml
2792 (name "python-pyyaml")
2797 (uri (pypi-uri "PyYAML" version))
2800 "1aqjl8dk9amd4zr99n8v2qxzgmr2hdvqfma4zh7a41rj6336c9sr"))))
2801 (build-system python-build-system)
2803 `(("libyaml" ,libyaml)))
2804 (home-page "http://pyyaml.org/wiki/PyYAML")
2805 (synopsis "YAML parser and emitter for Python")
2807 "PyYAML is a YAML parser and emitter for Python. PyYAML features a
2808 complete YAML 1.1 parser, Unicode support, pickle support, capable extension
2809 API, and sensible error messages. PyYAML supports standard YAML tags and
2810 provides Python-specific tags that allow to represent an arbitrary Python
2812 (license license:expat)))
2814 (define-public python2-pyyaml
2815 (package-with-python2 python-pyyaml))
2817 (define-public python-virtualenv
2819 (name "python-virtualenv")
2824 (uri (pypi-uri "virtualenv" version))
2827 "07cbajzk8l05k5zhlw0b9wbf2is65bl9v6zrn2a0iyn57w6pd73d"))))
2828 (build-system python-build-system)
2831 (modify-phases %standard-phases
2834 ;; Disable failing test. See upstream bug report
2835 ;; https://github.com/pypa/virtualenv/issues/957
2836 (substitute* "tests/test_virtualenv.py"
2837 (("skipif.*") "skipif(True, reason=\"Guix\")\n"))
2838 (zero? (system* "py.test")))))))
2840 `(("python-mock" ,python-mock)
2841 ("python-pytest" ,python-pytest)))
2842 (home-page "https://virtualenv.pypa.io/")
2843 (synopsis "Virtual Python environment builder")
2845 "Virtualenv is a tool to create isolated Python environments.")
2846 (license license:expat)))
2848 (define-public python2-virtualenv
2849 (package-with-python2 python-virtualenv))
2851 (define-public python-markupsafe
2853 (name "python-markupsafe")
2859 "https://pypi.python.org/packages/source/M/MarkupSafe/MarkupSafe-"
2863 "1hvip33wva3fnmvfp9x5klqri7hpl1hkgqmjbss18nmrb7zimv54"))))
2864 (build-system python-build-system)
2865 (home-page "http://github.com/mitsuhiko/markupsafe")
2866 (synopsis "XML/HTML/XHTML markup safe string implementation for Python")
2868 "Markupsafe provides an XML/HTML/XHTML markup safe string implementation
2870 (license license:bsd-3)))
2872 (define-public python2-markupsafe
2873 (package-with-python2 python-markupsafe))
2875 (define-public python-jinja2
2877 (name "python-jinja2")
2882 (uri (pypi-uri "Jinja2" version))
2885 "1x0v41lp5m1pjix3l46zx02b7lqp2hflgpnxwkywxynvi3zz47xw"))))
2886 (build-system python-build-system)
2888 `(("python-markupsafe" ,python-markupsafe)))
2889 (home-page "http://jinja.pocoo.org/")
2890 (synopsis "Python template engine")
2892 "Jinja2 is a small but fast and easy to use stand-alone template engine
2893 written in pure Python.")
2894 (license license:bsd-3)))
2896 (define-public python2-jinja2
2897 (package-with-python2 python-jinja2))
2899 (define-public python-pystache
2901 (name "python-pystache")
2905 (uri (pypi-uri "pystache" version))
2908 "0nmqsfmiw4arjxqkmf9z66ml950pcdjk6aq4gin4sywmzdjw5fzp"))))
2909 (build-system python-build-system)
2911 '(#:tests? #f)) ; FIXME: Python 3 tests are failing.
2912 (home-page "http://defunkt.io/pystache/")
2913 (synopsis "Python logic-less template engine")
2915 "Pystache is a Python implementation of the framework agnostic,
2916 logic-free templating system Mustache.")
2917 (license license:expat)
2918 (properties `((python2-variant . ,(delay python2-pystache))))))
2920 (define-public python2-pystache
2921 (package (inherit (package-with-python2
2922 (strip-python2-variant python-pystache)))
2924 `(#:python ,python-2
2926 (modify-phases %standard-phases
2929 (zero? (system* "python" "test_pystache.py")))))))))
2931 (define-public python-joblib
2933 (name "python-joblib")
2937 (uri (pypi-uri "joblib" version))
2940 "0787k919zlfmgymprz5bzv0v1df5bbirlf3awrghmjgvkrd9dci9"))
2941 (modules '((guix build utils)))
2944 ;; Remove pre-compiled .pyc files from source.
2945 (for-each delete-file-recursively
2946 (find-files "." "__pycache__" #:directories? #t))
2947 (for-each delete-file (find-files "." "\\.pyc$"))
2949 (build-system python-build-system)
2952 (modify-phases %standard-phases
2953 (add-before 'check 'disable-failing-tests
2955 ;; This numpydoc tests fails for unknown reasons
2956 (delete-file "doc/sphinxext/numpydoc/tests/test_docscrape.py")
2957 ;; This numpydoc test depends on matplotlib, which is not a
2959 (delete-file "doc/sphinxext/numpydoc/tests/test_plot_directive.py")
2960 ;; These tests fail to execute sys.executable
2961 (substitute* "joblib/test/test_parallel.py"
2962 (("import nose" line)
2963 (string-append "from nose.plugins.skip import SkipTest\n" line))
2964 (("def test_nested_parallel_warnings" line)
2965 (string-append "@SkipTest\n" line))
2966 (("def test_parallel_with_interactively_defined_functions" line)
2967 (string-append "@SkipTest\n" line)))
2969 ;; Provide nose to enable tests command
2971 `(("python-nose" ,python-nose)
2972 ("python-sphinx" ,python-sphinx)
2973 ("python-docutils" ,python-docutils)
2974 ("python-numpydoc" ,python-numpydoc)))
2975 (home-page "http://pythonhosted.org/joblib/")
2976 (synopsis "Using Python functions as pipeline jobs")
2978 "Joblib is a set of tools to provide lightweight pipelining in Python.
2979 In particular, joblib offers: transparent disk-caching of the output values
2980 and lazy re-evaluation (memoize pattern), easy simple parallel computing
2981 logging and tracing of the execution.")
2982 (license license:bsd-3)))
2984 (define-public python2-joblib
2985 (package-with-python2 python-joblib))
2987 (define-public python-docutils
2989 (name "python-docutils")
2994 (uri (pypi-uri "docutils" version))
2997 "1gkma47i609jfs7dssxn4y9vsz06qi0l5q41nws0zgkpnrghz33i"))))
2998 (build-system python-build-system)
3000 '(#:tests? #f)) ; no setup.py test command
3001 (home-page "http://docutils.sourceforge.net/")
3002 (synopsis "Python Documentation Utilities")
3004 "Docutils is a modular system for processing documentation into useful
3005 formats, such as HTML, XML, and LaTeX. For input Docutils supports
3007 ;; Most of the source code is public domain, but some source files are
3008 ;; licensed under the PFSL, BSD 2-clause, and GPLv3+ licenses.
3009 (license (list license:public-domain license:psfl license:bsd-2 license:gpl3+))))
3011 (define-public python2-docutils
3012 (package-with-python2 python-docutils))
3014 (define-public python-pygments
3016 (name "python-pygments")
3021 (uri (pypi-uri "Pygments" version))
3024 "10axnp2wpjnq9g8wg53fx0c70dfxqrz498jyz8mrdx9a3flwir48"))))
3025 (build-system python-build-system)
3027 ;; FIXME: Tests require sphinx, which depends on this.
3029 (home-page "http://pygments.org/")
3030 (synopsis "Syntax highlighting")
3032 "Pygments is a syntax highlighting package written in Python.")
3033 (license license:bsd-2)))
3035 (define-public python2-pygments
3036 (package-with-python2 python-pygments))
3038 (define-public python-sphinx
3040 (name "python-sphinx")
3045 (uri (pypi-uri "Sphinx" version))
3048 "1i8p9idnli4gr0y4x67yakbdk5w6a0xjzhrg6bg51y9d1fi7fslf"))))
3049 (build-system python-build-system)
3052 (modify-phases %standard-phases
3055 ;; Requires Internet access.
3056 (delete-file "tests/test_build_linkcheck.py")
3057 (zero? (system* "make" "test")))))))
3059 `(("python-imagesize" ,python-imagesize)
3060 ("python-sphinx-alabaster-theme"
3061 ,python-sphinx-alabaster-theme)
3062 ("python-babel" ,python-babel)
3063 ("python-snowballstemmer" ,python-snowballstemmer)
3064 ("python-docutils" ,python-docutils)
3065 ("python-jinja2" ,python-jinja2)
3066 ("python-pygments" ,python-pygments)
3067 ("python-requests" ,python-requests)
3068 ("python-six" ,python-six)))
3070 `(("graphviz" ,graphviz)
3071 ("python-html5lib" ,python-html5lib)
3072 ("python-mock" ,python-mock)
3073 ("python-nose" ,python-nose)))
3074 (home-page "http://sphinx-doc.org/")
3075 (synopsis "Python documentation generator")
3076 (description "Sphinx is a tool that makes it easy to create documentation
3077 for Python projects or other documents consisting of multiple reStructuredText
3079 (license license:bsd-3)
3080 (properties `((python2-variant . ,(delay python2-sphinx))))))
3082 (define-public python2-sphinx
3083 (let ((base (package-with-python2 (strip-python2-variant python-sphinx))))
3086 (native-inputs `(("python2-mock" ,python2-mock)
3087 ("python2-enum34" ,python2-enum34)
3088 ,@(package-native-inputs base)))
3089 (propagated-inputs `(("python2-pytz" ,python2-pytz)
3090 ,@(package-propagated-inputs base))))))
3092 (define-public python-sphinx-rtd-theme
3094 (name "python-sphinx-rtd-theme")
3099 (uri (string-append "https://pypi.python.org/packages/source/s/"
3100 "sphinx_rtd_theme/sphinx_rtd_theme-"
3104 "19nw3rn7awplcdrz63kg1njqwkbymfg9lwn7l2grhdyhyr2gaa8g"))))
3105 (build-system python-build-system)
3106 (arguments '(#:tests? #f)) ; No tests.
3108 `(("python-sphinx" ,python-sphinx)))
3109 (home-page "https://github.com/snide/sphinx_rtd_theme/")
3110 (synopsis "ReadTheDocs.org theme for Sphinx")
3111 (description "A theme for Sphinx used by ReadTheDocs.org.")
3112 (license license:expat)))
3114 (define-public python2-sphinx-rtd-theme
3115 (package-with-python2 python-sphinx-rtd-theme))
3117 (define-public python-rst.linker
3119 (name "python-rst.linker")
3124 (uri (pypi-uri "rst.linker" version))
3127 "0bh4lnj2p1nh0wf5pgxgfbrp27xhb1rinahkb5j7s3qprq6qn0sr"))))
3128 (build-system python-build-system)
3130 `(("python-dateutil" ,python-dateutil)
3131 ("python-six" ,python-six)))
3133 `(("python-setuptools-scm" ,python-setuptools-scm)))
3134 ;; Test would require path.py, which would introduce a cyclic dependence.
3135 (arguments `(#:tests? #f))
3136 ;; Note: As of version 1.7 the documentation is not worth building.
3137 (home-page "https://github.com/jaraco/rst.linker")
3138 (synopsis "Sphinx plugin to add links and timestamps")
3139 (description "rst.linker allows to automatically replace text by a
3140 reStructuredText external reference or timestamps. It's primary purpose is to
3141 augment the changelog, but it can be used for other documents, too.")
3142 (license license:expat)))
3144 (define-public python2-rst.linker
3145 (package-with-python2 python-rst.linker))
3147 (define-public python-feedgenerator
3149 (name "python-feedgenerator")
3154 (uri (pypi-uri "feedgenerator" version))
3157 "0mkimp1fpdan4p3882vzcws4l594k71ich4g0wq97jbra7p602n0"))
3158 (modules '((guix build utils)))
3161 ;; Remove pre-compiled .pyc files from source.
3162 (for-each delete-file-recursively
3163 (find-files "." "__pycache__" #:directories? #t))
3164 (for-each delete-file (find-files "." "\\.pyc$"))
3166 (build-system python-build-system)
3168 `(("python-pytz" ,python-pytz)
3169 ("python-six" ,python-six)))
3170 (home-page "https://github.com/getpelican/feedgenerator")
3172 "Standalone version of Django's Atom/RSS feed generator")
3174 "Feedgenerator-py3k is a standalone version of Django's feedgenerator,
3175 which can produce feeds in RSS 2.0, RSS 0.91, and Atom formats.")
3176 (license license:bsd-3)))
3178 (define-public python2-feedgenerator
3179 (package-with-python2 python-feedgenerator))
3181 (define-public python-blinker
3183 (name "python-blinker")
3188 (uri (pypi-uri "blinker" version))
3191 "1dpq0vb01p36jjwbhhd08ylvrnyvcc82yxx3mwjx6awrycjyw6j7"))))
3192 (build-system python-build-system)
3193 (home-page "http://pythonhosted.org/blinker/")
3194 (synopsis "Fast, simple object-to-object and broadcast signaling")
3196 "Blinker provides a fast dispatching system that allows any number of
3197 interested parties to subscribe to events, or \"signals\".")
3198 (license license:expat)))
3200 (define-public python2-blinker
3201 (package-with-python2 python-blinker))
3203 (define-public pelican
3210 (uri (pypi-uri "pelican" version))
3213 "1hn94rb4q3zmcq16in055xikal4dba5hfx3zznq7warllcgc9f8k"))))
3214 (build-system python-build-system)
3216 `(("python-feedgenerator" ,python-feedgenerator)
3217 ("python-jinja2" ,python-jinja2)
3218 ("python-pygments" ,python-pygments)
3219 ("python-docutils" ,python-docutils)
3220 ("python-pytz" ,python-pytz)
3221 ("python-blinker" ,python-blinker)
3222 ("python-unidecode" ,python-unidecode)
3223 ("python-six" ,python-six)
3224 ("python-dateutil" ,python-dateutil)))
3225 (home-page "http://getpelican.com/")
3227 `(;; XXX Requires a lot more packages to do unit tests :P
3229 #:phases (modify-phases %standard-phases
3231 'install 'adjust-requires
3232 ;; Since feedgenerator is installed from git, it doesn't
3233 ;; conform to the version requirements.
3235 ;; We *do have* "feedgenerator >= 1.6", but strip off the
3236 ;; version requirement so setuptools doesn't get confused.
3238 (substitute* "setup.py"
3239 (("['\"]feedgenerator.*?['\"]")
3240 "'feedgenerator'")))))))
3241 (synopsis "Python-based static site publishing system")
3243 "Pelican is a tool to generate a static blog from reStructuredText,
3244 Markdown input files, and more. Pelican uses Jinja2 for templating
3245 and is very extensible.")
3246 (license license:agpl3+)))
3248 (define-public python-scikit-learn
3250 (name "python-scikit-learn")
3256 "https://github.com/scikit-learn/scikit-learn/archive/"
3258 (file-name (string-append name "-" version ".tar.gz"))
3261 "1hwswckdmd27f7k1jvwdc0m4mqrgxl2s245yq1scq34v124bjqgq"))))
3262 (build-system python-build-system)
3265 (modify-phases %standard-phases
3267 (add-after 'install 'check
3268 ;; Running tests from the source directory requires
3269 ;; an "inplace" build with paths relative to CWD.
3270 ;; http://scikit-learn.org/stable/developers/advanced_installation.html#testing
3271 ;; Use the installed version instead.
3272 (lambda* (#:key inputs outputs #:allow-other-keys)
3273 (add-installed-pythonpath inputs outputs)
3274 ;; some tests require access to "$HOME"
3275 (setenv "HOME" "/tmp")
3276 ;; Step out of the source directory just to be sure.
3278 (zero? (system* "nosetests" "-v" "sklearn")))))))
3280 `(("openblas" ,openblas)))
3282 `(("python-nose" ,python-nose)
3283 ("python-cython" ,python-cython)))
3285 `(("python-numpy" ,python-numpy)
3286 ("python-scipy" ,python-scipy)))
3287 (home-page "http://scikit-learn.org/")
3288 (synopsis "Machine Learning in Python")
3290 "Scikit-learn provides simple and efficient tools for data
3291 mining and data analysis.")
3292 (license license:bsd-3)))
3294 (define-public python2-scikit-learn
3295 (package-with-python2 python-scikit-learn))
3297 (define-public python-scikit-image
3299 (name "python-scikit-image")
3305 "https://pypi.python.org/packages/source/s/scikit-image/scikit-image-"
3308 (base32 "0jz416fqvpahqyffw8plmszzfj669w8wvf3y9clnr5lr6a7md3kn"))))
3309 (build-system python-build-system)
3311 ;; TODO: Some tests require running X11 server. Disable them?
3313 ;; See DEPENDS.txt for the list of build and run time requiremnts
3315 `(("python-matplotlib" ,python-matplotlib)
3316 ("python-networkx" ,python-networkx)
3317 ("python-scipy" ,python-scipy)
3318 ("python-pillow" ,python-pillow)))
3320 `(("python-numpy" ,python-numpy)
3321 ("python-cython" ,python-cython)
3322 ("python-six" ,python-six)))
3323 (home-page "http://scikit-image.org/")
3324 (synopsis "Image processing in Python")
3326 "Scikit-image is a collection of algorithms for image processing.")
3327 (license license:bsd-3)))
3329 (define-public python2-scikit-image
3330 (package-with-python2 python-scikit-image))
3332 (define-public python-redis
3334 (name "python-redis")
3339 (uri (pypi-uri "redis" version))
3341 (base32 "0csmrkxb29x7xs9b51zplwkkq2hwnbh9jns1g85dykn5rxmaxysx"))))
3342 (build-system python-build-system)
3343 ;; Tests require a running Redis server
3344 (arguments '(#:tests? #f))
3345 ;; As long as we are not running test, we do not need this input :-)
3347 ;; `(("python-pytest" ,python-pytest)))
3348 (home-page "https://github.com/andymccurdy/redis-py")
3349 (synopsis "Redis Python client")
3351 "This package provides a Python interface to the Redis key-value store.")
3352 (license license:expat)))
3354 (define-public python2-redis
3355 (package-with-python2 python-redis))
3357 (define-public python-rq
3365 "https://pypi.python.org/packages/source/r/rq/rq-"
3368 (base32 "0b0z5hn8wkfg300hx7816csgv3bcfamlr29fi3yzgqmpqxwj3fix"))))
3369 (build-system python-build-system)
3371 `(("python-click" ,python-click)
3372 ("python-redis" ,python-redis)))
3373 (home-page "http://python-rq.org/")
3374 (synopsis "Simple job queues for Python")
3376 "RQ (Redis Queue) is a simple Python library for queueing jobs and
3377 processing them in the background with workers. It is backed by Redis and it
3378 is designed to have a low barrier to entry.")
3379 (license license:bsd-2)))
3381 (define-public python2-rq
3382 (package-with-python2 python-rq))
3384 (define-public python-cython
3386 (name "python-cython")
3391 (uri (pypi-uri "Cython" version))
3394 "1fg7fmpvfcq9md4ncyqnnylyjy4z3ksdrshzis95g1sh03d8z044"))))
3395 (build-system python-build-system)
3396 ;; we need the full python package and not just the python-wrapper
3397 ;; because we need libpython3.3m.so
3399 `(("python" ,python)))
3402 (modify-phases %standard-phases
3403 (add-before 'check 'set-HOME
3404 ;; some tests require access to "$HOME/.cython"
3405 (lambda _ (setenv "HOME" "/tmp")))
3407 (lambda _ (zero? (system* "python" "runtests.py" "-vv")))))))
3408 (home-page "http://cython.org/")
3409 (synopsis "C extensions for Python")
3410 (description "Cython is an optimising static compiler for both the Python
3411 programming language and the extended Cython programming language. It makes
3412 writing C extensions for Python as easy as Python itself.")
3413 (license license:asl2.0)
3414 (properties `((python2-variant . ,(delay python2-cython))))))
3416 (define-public python2-cython
3417 (package (inherit (package-with-python2
3418 (strip-python2-variant python-cython)))
3419 (name "python2-cython")
3421 `(("python-2" ,python-2))))) ; this is not automatically changed
3423 ;; The RPython toolchain currently does not support Python 3.
3424 (define-public python2-rpython
3426 (name "python2-rpython")
3431 (uri (pypi-uri "rpython" version))
3434 "07pps06fq4c4wmi5ii0sgh9zgwniz5y7frqhm28g3a154l163fxc"))))
3435 (build-system python-build-system)
3436 (arguments `(#:python ,python-2))
3438 `(("python2-pytest" ,python2-pytest))) ; needed for running tests
3439 (home-page "https://rpython.readthedocs.org")
3440 (synopsis "Framework for implementing interpreters and virtual machines")
3441 (description "RPython is a translation and support framework for
3442 producing implementations of dynamic languages, emphasizing a clean separation
3443 between language specification and implementation aspects.")
3444 (license license:expat)))
3446 ;; This version of numpy is missing the documentation and is only used to
3447 ;; build matplotlib which is required to build numpy's documentation.
3448 (define-public python-numpy
3450 (name "python-numpy")
3456 "https://github.com/numpy/numpy/archive/v" version ".tar.gz"))
3457 (file-name (string-append name "-" version ".tar.gz"))
3460 "025d4j4aakcp8w5i5diqh812cbbjgac7jszx1j56ivrbi1i8vv7d"))))
3461 (build-system python-build-system)
3463 `(("openblas" ,openblas)
3464 ("lapack" ,lapack)))
3466 `(("python-cython" ,python-cython)
3467 ("python-nose" ,python-nose)
3468 ("gfortran" ,gfortran)))
3471 (modify-phases %standard-phases
3472 (add-before 'build 'set-environment-variables
3473 (lambda* (#:key inputs #:allow-other-keys)
3474 (call-with-output-file "site.cfg"
3478 libraries = openblas
3479 library_dirs = ~a/lib
3480 include_dirs = ~a/include
3482 # backslash-n to make emacs happy
3484 lapack_libs = lapack
3485 library_dirs = ~a/lib
3486 include_dirs = ~a/include
3488 (assoc-ref inputs "openblas")
3489 (assoc-ref inputs "openblas")
3490 (assoc-ref inputs "lapack")
3491 (assoc-ref inputs "lapack"))))
3492 ;; Use "gcc" executable, not "cc".
3493 (substitute* "numpy/distutils/system_info.py"
3494 (("c = distutils\\.ccompiler\\.new_compiler\\(\\)")
3495 "c = distutils.ccompiler.new_compiler(); c.set_executables(compiler='gcc',compiler_so='gcc',linker_exe='gcc',linker_so='gcc -shared')"))
3497 ;; Tests can only be run after the library has been installed and not
3498 ;; within the source directory.
3500 (add-after 'install 'check
3501 (lambda* (#:key outputs inputs #:allow-other-keys)
3502 ;; Make installed package available for running the tests
3503 (add-installed-pythonpath inputs outputs)
3504 (with-directory-excursion "/tmp"
3505 (zero? (system* "python" "-c"
3506 "import numpy; numpy.test(verbose=2)"))))))))
3507 (home-page "http://www.numpy.org/")
3508 (synopsis "Fundamental package for scientific computing with Python")
3509 (description "NumPy is the fundamental package for scientific computing
3510 with Python. It contains among other things: a powerful N-dimensional array
3511 object, sophisticated (broadcasting) functions, tools for integrating C/C++
3512 and Fortran code, useful linear algebra, Fourier transform, and random number
3514 (license license:bsd-3)))
3516 (define-public python2-numpy
3517 (package-with-python2 python-numpy))
3519 (define-public python-munch
3521 (name "python-munch")
3526 (uri (pypi-uri "munch" version))
3529 "1cmqg91xnqx8gvnh4pmp0bfl1dfcm65d5p9mg73zz8pkjhx6h80l"))))
3530 (build-system python-build-system)
3531 (home-page "https://github.com/Infinidat/munch")
3532 (synopsis "Dot-accessible dictionary")
3533 (description "Munch is a dot-accessible dictionary similar to JavaScript
3535 (license license:expat)))
3537 (define-public python2-munch
3538 (package-with-python2 python-munch))
3540 (define-public python2-fastlmm
3542 (name "python2-fastlmm")
3547 (uri (pypi-uri "fastlmm" version ".zip"))
3550 "1q8c34rpmwkfy3r4d5172pzdkpfryj561897z9r3x22gq7813x1m"))))
3551 (build-system python-build-system)
3553 `(#:python ,python-2)) ; only Python 2.7 is supported
3555 `(("python2-numpy" ,python2-numpy)
3556 ("python2-scipy" ,python2-scipy)
3557 ("python2-matplotlib" ,python2-matplotlib)
3558 ("python2-pandas" ,python2-pandas)
3559 ("python2-scikit-learn" ,python2-scikit-learn)
3560 ("python2-pysnptools" ,python2-pysnptools)))
3563 ("python2-cython" ,python2-cython)
3564 ("python2-mock" ,python2-mock)
3565 ("python2-nose" ,python2-nose)))
3566 (home-page "http://research.microsoft.com/en-us/um/redmond/projects/mscompbio/fastlmm/")
3567 (synopsis "Perform genome-wide association studies on large data sets")
3569 "FaST-LMM, which stands for Factored Spectrally Transformed Linear Mixed
3570 Models, is a program for performing both single-SNP and SNP-set genome-wide
3571 association studies (GWAS) on extremely large data sets.")
3572 (license license:asl2.0)))
3574 (define-public python-numpy-documentation
3576 (name "python-numpy-documentation")
3577 (version (package-version python-numpy))
3578 (source (package-source python-numpy))
3579 (build-system python-build-system)
3581 `(("python-matplotlib" ,python-matplotlib)
3582 ("python-numpy" ,python-numpy)
3583 ("pkg-config" ,pkg-config)
3584 ("python-sphinx" ,python-sphinx)
3585 ("python-numpydoc" ,python-numpydoc)
3586 ("texlive" ,texlive)
3587 ("texinfo" ,texinfo)
3589 ("scipy-sphinx-theme"
3590 ,(origin ; The build script expects scipy-sphinx-theme as a git submodule
3593 (url "https://github.com/scipy/scipy-sphinx-theme.git")
3594 (commit "c466764e22")))
3597 "0q2y87clwlsgc7wvlsn9pzyssybcq10plwhq2w1ydykfsyyqbmkl"))))
3598 ,@(package-native-inputs python-numpy)))
3600 `(#:tests? #f ; we're only generating the documentation
3602 (modify-phases %standard-phases
3605 (lambda* (#:key inputs outputs #:allow-other-keys)
3606 (let* ((data (string-append (assoc-ref outputs "out") "/share"))
3608 data "/doc/" ,name "-"
3609 ,(package-version python-numpy)))
3610 (info-reader (string-append data "/info"))
3611 (html (string-append doc "/html"))
3612 (scipy-sphinx-theme "scipy-sphinx-theme")
3613 (sphinx-theme-checkout (assoc-ref inputs scipy-sphinx-theme))
3614 (pyver ,(string-append "PYVER=")))
3615 (with-directory-excursion "doc"
3616 (copy-recursively sphinx-theme-checkout scipy-sphinx-theme)
3618 (system* "make" "html" pyver)
3619 (system* "make" "latex" "PAPER=a4" pyver)
3620 (system* "make" "-C" "build/latex"
3621 "all-pdf" "PAPER=a4" pyver)
3622 ;; FIXME: Generation of the info file fails.
3623 ;; (system* "make" "info" pyver)
3625 ;; (copy-file "build/texinfo/numpy.info"
3626 ;; (string-append info "/numpy.info"))
3627 (for-each (lambda (file)
3628 (copy-file (string-append "build/latex" file)
3629 (string-append doc file)))
3630 '("/numpy-ref.pdf" "/numpy-user.pdf"))
3631 (with-directory-excursion "build/html"
3632 (for-each (lambda (file)
3633 (let* ((dir (dirname file))
3634 (tgt-dir (string-append html "/" dir)))
3635 (unless (equal? "." dir)
3637 (install-file file html)))
3638 (find-files "." ".*")))))
3640 (home-page (package-home-page python-numpy))
3641 (synopsis "Documentation for the python-numpy package")
3642 (description (package-description python-numpy))
3643 (license (package-license python-numpy))))
3645 (define-public python2-numpy-documentation
3646 (let ((numpy-documentation (package-with-python2 python-numpy-documentation)))
3648 (inherit numpy-documentation)
3649 (native-inputs `(("python2-functools32" ,python2-functools32)
3650 ,@(package-native-inputs numpy-documentation))))))
3652 (define-public python-pygit2
3654 (name "python-pygit2")
3659 (uri (pypi-uri "pygit2" version))
3662 "0wf5rp0fvrw7j3j18dvwjq6xqlbm611wd55aphrfpps0v1gxh3ny"))
3664 (search-patches "python-pygit2-disable-network-tests.patch"))))
3665 (build-system python-build-system)
3667 `(("python-six" ,python-six)
3668 ("python-cffi" ,python-cffi)
3669 ("libgit2" ,libgit2)
3670 ("python-tox" ,python-tox)))
3671 (home-page "https://github.com/libgit2/pygit2")
3672 (synopsis "Python bindings for libgit2")
3673 (description "Pygit2 is a set of Python bindings to the libgit2 shared
3674 library, libgit2 implements Git plumbing.")
3675 ;; GPL2.0 only, with linking exception.
3676 (license license:gpl2)))
3678 (define-public python2-pygit2
3679 (package-with-python2 python-pygit2))
3681 (define-public python-pyparsing
3683 (name "python-pyparsing")
3688 (uri (string-append "mirror://sourceforge/pyparsing/pyparsing"
3689 "/pyparsing-" version
3690 "/pyparsing-" version ".tar.gz"))
3693 "0kw4py7gn45j93q8r7bzajfrjdc3xlsn2yzln41lf9zmrghjkrq6"))))
3694 (build-system python-build-system)
3695 (outputs '("out" "doc"))
3697 `(#:tests? #f ; no test target
3698 #:modules ((guix build python-build-system)
3702 'install 'install-doc
3703 (lambda* (#:key outputs #:allow-other-keys)
3704 (let* ((doc (string-append (assoc-ref outputs "doc")
3705 "/share/doc/" ,name "-" ,version))
3706 (html-doc (string-append doc "/html"))
3707 (examples (string-append doc "/examples")))
3713 (install-file file tgt))
3714 (find-files dir ".*")))
3715 (list "docs" "htmldoc" "examples")
3716 (list doc html-doc examples))))
3718 (home-page "http://pyparsing.wikispaces.com")
3719 (synopsis "Python parsing class library")
3721 "The pyparsing module is an alternative approach to creating and
3722 executing simple grammars, vs. the traditional lex/yacc approach, or the use
3723 of regular expressions. The pyparsing module provides a library of classes
3724 that client code uses to construct the grammar directly in Python code.")
3725 (license license:expat)))
3727 (define-public python2-pyparsing
3728 (package-with-python2 python-pyparsing))
3730 (define-public python-numpydoc
3732 (name "python-numpydoc")
3738 "https://pypi.python.org/packages/source/n/numpydoc/numpydoc-"
3742 "0d4dnifaxkll50jx6czj05y8cb4ny60njd2wz299sj2jxfy51w4k"))
3743 (modules '((guix build utils)))
3746 ;; Drop a test requiring matplotlib, which we cannot add as an
3747 ;; input since it would create a circular dependency: Extend the
3748 ;; test for Python 3, where it is already dropped, to Python 2.
3749 (substitute* "numpydoc/tests/test_plot_directive.py"
3751 (build-system python-build-system)
3753 `(("python-sphinx" ,python-sphinx)))
3755 `(("python-nose" ,python-nose)))
3756 (home-page "https://pypi.python.org/pypi/numpydoc")
3758 "Numpy's Sphinx extensions")
3760 "Sphinx extension to support docstrings in Numpy format.")
3761 (license license:bsd-2)))
3763 (define-public python2-numpydoc
3764 (package-with-python2 python-numpydoc))
3766 (define-public python-numexpr
3768 (name "python-numexpr")
3773 (uri (pypi-uri "numexpr" version))
3776 "01lsja72m32z0i5p8rwxbfyzk4mplh72k2a140nwh8vv4wpyfbnv"))))
3777 (build-system python-build-system)
3778 (arguments `(#:tests? #f)) ; no tests included
3780 `(("python-numpy" ,python-numpy)))
3781 (home-page "https://github.com/pydata/numexpr")
3782 (synopsis "Fast numerical expression evaluator for NumPy")
3784 "Numexpr is a fast numerical expression evaluator for NumPy. With it,
3785 expressions that operate on arrays are accelerated and use less memory than
3786 doing the same calculation in Python. In addition, its multi-threaded
3787 capabilities can make use of all your cores, which may accelerate
3788 computations, most specially if they are not memory-bounded (e.g. those using
3789 transcendental functions).")
3790 (license license:expat)))
3792 (define-public python2-numexpr
3793 (package-with-python2 python-numexpr))
3795 (define-public python-cycler
3797 (name "python-cycler")
3801 (uri (pypi-uri "cycler" version))
3804 "1n69n23fak1gjxlrbhqisi2b9pv3ckrfj98llx3p53953082syyd"))))
3805 (build-system python-build-system)
3807 ;; XXX: The current version requires 'coveralls' which we don't have.
3808 ;; Enable this for the next release which uses 'python-pytest'.
3811 `(("python-six" ,python-six)))
3812 (home-page "http://matplotlib.org/cycler/")
3813 (synopsis "Composable keyword argument iterator")
3815 "When using @code{matplotlib} and plotting more than one line, it is
3816 common to want to be able to want to be able to cycle over one or more artist
3817 styles; but the plotting logic can quickly become involved.
3818 To address this and enable easy cycling over arbitrary @code{kwargs}, the
3819 @code{Cycler} class was developed.")
3820 (license license:bsd-3)))
3822 (define-public python2-cycler
3823 (package-with-python2 python-cycler))
3825 (define-public python-colorspacious
3827 (name "python-colorspacious")
3832 (uri (string-append "https://github.com/njsmith/colorspacious/archive/v"
3834 (file-name (string-append name "-" version))
3836 (base32 "1vflh5jm32qb0skza2i8pjacv09w6gq84fqpp2nj77s0rbmzgr4k"))))
3837 (build-system python-build-system)
3839 `(("python-numpy" ,python-numpy)))
3841 `(("python-nose" ,python-nose)))
3844 (modify-phases %standard-phases
3847 (zero? (system* "nosetests" "--all-modules" "-v" "colorspacious")))))))
3848 (home-page "https://github.com/njsmith/colorspacious")
3849 (synopsis "Python library for colorspace conversions")
3850 (description "@code{colorspacious} is a Python library that lets you
3851 convert between colorspaces like sRGB, XYZ, CIEL*a*b*, CIECAM02, CAM02-UCS, etc.")
3852 (license license:expat)))
3854 (define-public python2-colorspacious
3855 (package-with-python2 python-colorspacious))
3857 (define-public python-matplotlib
3859 (name "python-matplotlib")
3865 "https://github.com/matplotlib/matplotlib/archive/v" version ".tar.gz"))
3866 (file-name (string-append name "-" version ".tar.gz"))
3869 "0w3k5m5qb3wsd7yhvmg042xddvligklvcq2visk2c5wnph3hhsln"))))
3870 (build-system python-build-system)
3871 (propagated-inputs ; the following packages are all needed at run time
3872 `(("python-cycler" ,python-cycler)
3873 ("python-pyparsing" ,python-pyparsing)
3874 ("python-pygobject" ,python-pygobject)
3875 ("gobject-introspection" ,gobject-introspection)
3876 ("python-tkinter" ,python "tk")
3877 ("python-dateutil" ,python-dateutil)
3878 ("python-numpy" ,python-numpy)
3879 ("python-pillow" ,python-pillow)
3880 ("python-pytz" ,python-pytz)
3881 ("python-six" ,python-six)
3882 ;; The 'gtk+' package (and 'gdk-pixbuf', 'atk' and 'pango' propagated
3883 ;; from 'gtk+') provides the required 'typelib' files used by
3884 ;; 'gobject-introspection'. The location of these files is set with the
3885 ;; help of the environment variable GI_TYPELIB_PATH. At build time this
3886 ;; is done automatically by a 'native-search-path' procedure. However,
3887 ;; at run-time the user must set this variable as follows:
3889 ;; export GI_TYPELIB_PATH=~/.guix-profile/lib/girepository-1.0
3891 ;; From version 1.4.0 'matplotlib' makes use of 'cairocffi' instead of
3892 ;; 'pycairo'. However, 'pygobject' makes use of a 'pycairo' 'context'
3893 ;; object. For this reason we need to import both libraries.
3894 ;; https://pythonhosted.org/cairocffi/cffi_api.html#converting-pycairo
3895 ("python-pycairo" ,python-pycairo)
3896 ("python-cairocffi" ,python-cairocffi)))
3898 `(("libpng" ,libpng)
3899 ("imagemagick" ,imagemagick)
3900 ("freetype" ,freetype)
3903 ;; FIXME: Add backends when available.
3904 ;("python-wxpython" ,python-wxpython)
3905 ("python-pyqt" ,python-pyqt)
3909 `(("pkg-config" ,pkg-config)
3910 ("python-nose" ,python-nose)
3911 ("python-mock" ,python-mock)))
3914 (modify-phases %standard-phases
3915 (add-before 'build 'configure-environment
3916 (lambda* (#:key outputs inputs #:allow-other-keys)
3917 (let ((cairo (assoc-ref inputs "cairo"))
3918 (gtk+ (assoc-ref inputs "gtk+")))
3919 ;; Setting these directories in the 'basedirlist' of 'setup.cfg'
3921 (setenv "LD_LIBRARY_PATH"
3922 (string-append cairo "/lib:" gtk+ "/lib"))
3923 (setenv "HOME" (getcwd))
3924 (call-with-output-file "setup.cfg"
3926 (format port "[directories]~%
3927 basedirlist = ~a,~a~%
3930 (assoc-ref inputs "tcl")
3931 (assoc-ref inputs "tk")))))
3933 (home-page "http://matplotlib.org")
3934 (synopsis "2D plotting library for Python")
3936 "Matplotlib is a Python 2D plotting library which produces publication
3937 quality figures in a variety of hardcopy formats and interactive environments
3938 across platforms. Matplotlib can be used in Python scripts, the python and
3939 ipython shell, web application servers, and six graphical user interface
3941 (license license:psfl)
3942 (properties `((python2-variant . ,(delay python2-matplotlib))))))
3944 (define-public python2-matplotlib
3945 (let ((matplotlib (package-with-python2
3946 (strip-python2-variant python-matplotlib))))
3947 (package (inherit matplotlib)
3948 ;; Make sure to use special packages for Python 2 instead
3949 ;; of those automatically rewritten by package-with-python2.
3951 `(("python2-pycairo" ,python2-pycairo)
3952 ("python2-functools32" ,python2-functools32)
3953 ("python2-pygobject-2" ,python2-pygobject-2)
3954 ("python2-subprocess32" ,python2-subprocess32)
3955 ("python2-tkinter" ,python-2 "tk")
3956 ,@(fold alist-delete (package-propagated-inputs matplotlib)
3957 '("python-pycairo" "python-pygobject" "python-tkinter")))))))
3959 (define-public python-matplotlib-documentation
3961 (name "python-matplotlib-documentation")
3962 (version (package-version python-matplotlib))
3963 (source (package-source python-matplotlib))
3964 (build-system python-build-system)
3966 `(("python-matplotlib" ,python-matplotlib)
3967 ("python-colorspacious" ,python-colorspacious)
3968 ("python-sphinx" ,python-sphinx)
3969 ("python-numpydoc" ,python-numpydoc)
3970 ("python-ipython" ,python-ipython)
3971 ("python-mock" ,python-mock)
3972 ("graphviz" ,graphviz)
3973 ("texlive" ,texlive)
3974 ("texinfo" ,texinfo)
3975 ,@(package-native-inputs python-matplotlib)))
3977 `(#:tests? #f ; we're only generating documentation
3979 (modify-phases %standard-phases
3983 ;; Produce pdf in 'A4' format.
3984 (substitute* "conf.py"
3985 (("latex_paper_size = 'letter'") "")
3986 ;; latex_paper_size is deprecated -> set paper size using
3988 (("latex_elements\\['pointsize'\\] = '11pt'" match)
3989 ;; insert at a point where latex_elements{} is defined:
3990 (string-append match "\nlatex_elements['papersize'] = 'a4paper'")))
3991 (zero? (system* "python" "make.py" "html" "latex" "texinfo"))))
3993 (lambda* (#:key inputs outputs #:allow-other-keys)
3994 (let* ((data (string-append (assoc-ref outputs "out") "/share"))
3995 (doc (string-append data "/doc/python-matplotlib-" ,version))
3996 (info (string-append data "/info"))
3997 (html (string-append doc "/html")))
4000 (copy-recursively "build/html" html)
4001 (symlink (string-append html "/_images")
4002 (string-append info "/matplotlib-figures"))
4003 (with-directory-excursion "build/texinfo"
4004 (substitute* "matplotlib.texi"
4005 (("@image\\{([^,]*)" all file)
4006 (string-append "@image{matplotlib-figures/" file)))
4007 (symlink (string-append html "/_images")
4008 "./matplotlib-figures")
4009 (system* "makeinfo" "--no-split"
4010 "-o" "matplotlib.info" "matplotlib.texi"))
4011 (copy-file "build/texinfo/matplotlib.info"
4012 (string-append info "/matplotlib.info"))
4013 (copy-file "build/latex/Matplotlib.pdf"
4014 (string-append doc "/Matplotlib.pdf")))
4016 (home-page (package-home-page python-matplotlib))
4017 (synopsis "Documentation for the python-matplotlib package")
4018 (description (package-description python-matplotlib))
4019 (license (package-license python-matplotlib))))
4021 (define-public python2-matplotlib-documentation
4022 (package-with-python2 python-matplotlib-documentation))
4024 (define-public python2-pysnptools
4026 (name "python2-pysnptools")
4031 (uri (pypi-uri "pysnptools" version ".zip"))
4034 "1wybggjzz8zw7aav4pjsg2h22xp17a1lghrprza1pxwlm7wf96y2"))))
4035 (build-system python-build-system)
4037 `(#:python ,python-2)) ; only Python 2.7 is supported
4039 `(("python2-numpy" ,python2-numpy)
4040 ("python2-scipy" ,python2-scipy)
4041 ("python2-pandas" ,python2-pandas)))
4043 `(("python2-cython" ,python2-cython)))
4045 `(("unzip" ,unzip)))
4046 (home-page "http://research.microsoft.com/en-us/um/redmond/projects/mscompbio/")
4047 (synopsis "Library for reading and manipulating genetic data")
4049 "PySnpTools is a library for reading and manipulating genetic data. It
4050 can, for example, efficiently read whole PLINK *.bed/bim/fam files or parts of
4051 those files. It can also efficiently manipulate ranges of integers using set
4052 operators such as union, intersection, and difference.")
4053 (license license:asl2.0)))
4055 (define-public python-rpy2
4057 (name "python-rpy2")
4062 (uri (pypi-uri "rpy2" version))
4065 "0nhan2qvrw7b7gg5zddwa22kybdv3x1g26vkd7q8lvnkgzrs4dga"))))
4066 (build-system python-build-system)
4069 (modify-phases %standard-phases
4071 (add-after 'install 'check
4072 (lambda* (#:key outputs inputs #:allow-other-keys)
4073 ;; It's easier to run tests after install.
4074 ;; Make installed package available for running the tests
4075 (add-installed-pythonpath inputs outputs)
4076 (zero? (system* "python" "-m" "rpy2.tests" "-v")))))))
4078 `(("python-six" ,python-six)))
4080 `(("readline" ,readline)
4086 (home-page "http://rpy.sourceforge.net/")
4087 (synopsis "Python interface to the R language")
4088 (description "rpy2 is a redesign and rewrite of rpy. It is providing a
4089 low-level interface to R from Python, a proposed high-level interface,
4090 including wrappers to graphical libraries, as well as R-like structures and
4092 (license license:gpl3+)))
4094 (define-public python2-rpy2
4095 (let ((rpy2 (package-with-python2 python-rpy2)))
4096 (package (inherit rpy2)
4098 `(("python2-singledispatch" ,python2-singledispatch)
4099 ,@(package-propagated-inputs rpy2))))))
4101 (define-public python-scipy
4103 (name "python-scipy")
4108 (uri (string-append "https://github.com/scipy/scipy/archive/v"
4110 (file-name (string-append name "-" version ".tar.gz"))
4113 "17slsrfawjp7if6qrlx03zhgp05350ginxx8ddpw9zqx43x905sn"))))
4114 (build-system python-build-system)
4116 `(("python-numpy" ,python-numpy)
4117 ("python-matplotlib" ,python-matplotlib)
4118 ("python-pyparsing" ,python-pyparsing)))
4120 `(("lapack" ,lapack)
4121 ("openblas" ,openblas)))
4123 `(("python-cython" ,python-cython)
4124 ("python-nose" ,python-nose)
4125 ("python-sphinx" ,python-sphinx)
4126 ("python-numpydoc" ,python-numpydoc)
4127 ("gfortran" ,gfortran)
4129 (outputs '("out" "doc"))
4132 (modify-phases %standard-phases
4133 (add-before 'build 'configure-openblas
4134 (lambda* (#:key inputs #:allow-other-keys)
4135 (call-with-output-file "site.cfg"
4139 libraries = openblas
4140 library_dirs = ~a/lib
4141 include_dirs = ~a/include
4143 # backslash-n to make emacs happy
4145 library_dirs = ~a/lib
4146 atlas_libs = openblas
4148 (assoc-ref inputs "openblas")
4149 (assoc-ref inputs "openblas")
4150 (assoc-ref inputs "openblas"))))
4152 (add-after 'install 'install-doc
4153 (lambda* (#:key inputs outputs #:allow-other-keys)
4154 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4155 (doc (string-append data "/doc/" ,name "-" ,version))
4156 (html (string-append doc "/html"))
4157 (pyver ,(string-append "PYVER=")))
4158 ;; Make installed package available for building the
4160 (add-installed-pythonpath inputs outputs)
4161 (with-directory-excursion "doc"
4162 ;; Fix generation of images for mathematical expressions.
4163 (substitute* (find-files "source" "conf\\.py")
4164 (("pngmath_use_preview = True")
4165 "pngmath_use_preview = False"))
4167 (system* "make" "html" pyver)
4168 (with-directory-excursion "build/html"
4169 (for-each (lambda (file)
4170 (let* ((dir (dirname file))
4171 (tgt-dir (string-append html "/" dir)))
4172 (install-file file html)))
4173 (find-files "." ".*")))))
4175 (add-after 'unpack 'fix-tests
4177 (substitute* "scipy/integrate/tests/test_quadpack.py"
4178 (("libm.so") "libm.so.6"))
4180 ;; Tests can only be run after the library has been installed and not
4181 ;; within the source directory.
4183 (add-after 'install 'check
4184 (lambda* (#:key inputs outputs #:allow-other-keys)
4185 (add-installed-pythonpath inputs outputs)
4186 (with-directory-excursion "/tmp"
4187 (zero? (system* "python" "-c"
4188 "import scipy; scipy.test('full')")))
4190 (home-page "http://www.scipy.org/")
4191 (synopsis "The Scipy library provides efficient numerical routines")
4192 (description "The SciPy library is one of the core packages that make up
4193 the SciPy stack. It provides many user-friendly and efficient numerical
4194 routines such as routines for numerical integration and optimization.")
4195 (properties `((python2-variant . ,(delay python2-scipy))))
4196 (license license:bsd-3)))
4198 (define-public python2-scipy
4199 (package-with-python2
4200 (strip-python2-variant python-scipy)))
4202 (define-public python-socksipy-branch
4204 (name "python-socksipy-branch")
4209 (uri (pypi-uri "SocksiPy-branch" version))
4212 "01l41v4g7fy9fzvinmjxy6zcbhgqaif8dhdqm4w90fwcw9h51a8p"))))
4213 (build-system python-build-system)
4215 `(#:tests? #f)) ; There are no tests
4216 (home-page "https://code.google.com/archive/p/socksipy-branch/")
4217 (synopsis "Python SOCKS module")
4219 "SocksiPy - A Python SOCKS client module. It provides a
4220 socket-like interface that supports connections to any TCP
4221 service through the use of a SOCKS4, SOCKS5 or HTTP proxy.
4222 The original version was developed by Dan Haim, this is a
4223 branch created by Mario Vilas to address some open issues,
4224 as the original project seems to have been abandoned circa 2007.")
4225 (license license:bsd-3)))
4227 (define-public python2-socksipy-branch
4228 (package-with-python2 python-socksipy-branch))
4230 (define-public python-sqlalchemy
4232 (name "python-sqlalchemy")
4237 (uri (string-append "https://pypi.python.org/packages/source/S/"
4238 "SQLAlchemy/SQLAlchemy-" version ".tar.gz"))
4241 "1l8qclhd0s90w3pvwhi5mjxdwr5j7gw7cjka2fx6f2vqmq7f4yb6"))))
4242 (build-system python-build-system)
4244 `(("python-cython" ,python-cython) ;for c extensions
4245 ("python-pytest" ,python-pytest)
4246 ("python-mock" ,python-mock))) ;for tests
4248 `(#:phases (alist-replace
4250 (lambda _ (zero? (system* "py.test")))
4252 (home-page "http://www.sqlalchemy.org")
4253 (synopsis "Database abstraction library")
4255 "SQLAlchemy is the Python SQL toolkit and Object Relational Mapper that
4256 gives application developers the full power and flexibility of SQL. It
4257 provides a full suite of well known enterprise-level persistence patterns,
4258 designed for efficient and high-performing database access, adapted into a
4259 simple and Pythonic domain language.")
4260 (license license:x11)))
4262 (define-public python2-sqlalchemy
4263 (package-with-python2 python-sqlalchemy))
4265 (define-public python-pycodestyle
4267 (name "python-pycodestyle")
4272 (uri (pypi-uri "pycodestyle" version))
4275 "1rz2v8506mdjdyxcnv9ygiw6v0d4dqx8z5sjyjm0w2v32h5l5w1p"))))
4276 (build-system python-build-system)
4277 (home-page "https://pycodestyle.readthedocs.io/")
4278 (synopsis "Python style guide checker")
4279 (description "@code{pycodestyle} (formerly pep8) is a tool to check
4280 Python code against some of the style conventions in
4281 @url{http://www.python.org/dev/peps/pep-0008/,PEP 8}.")
4282 (license license:expat)))
4284 (define-public python2-pycodestyle
4285 (package-with-python2 python-pycodestyle))
4287 (define-public python-orderedmultidict
4289 (name "python-orderedmultidict")
4294 (uri (pypi-uri "orderedmultidict" version))
4297 "0dls862ibm7qbq4fnvwx0xn1v9hwyzywbff8xjjdr42dd75208yw"))))
4298 (build-system python-build-system)
4301 (modify-phases %standard-phases
4302 (add-after 'unpack 'fix-tests
4304 ;; The package uses nosetest for running the tests.
4305 ;; Adding this initfile allows to run the test suite
4306 ;; without requiring nosetest.
4307 (zero? (system* "touch" "tests/__init__.py")))))))
4309 `(("python-six" ,python-six)))
4311 `(("python-pycodestyle" ,python-pycodestyle)))
4312 (home-page "https://github.com/gruns/orderedmultidict")
4313 (synopsis "Python Ordered Multivalue Dictionary - omdict")
4314 (description "This package contains a library for ordered multivalue
4315 dictionaries. A multivalue dictionary is a dictionary that can store
4316 multiple values for the same key. An ordered multivalue dictionary is a
4317 multivalue dictionary that retains the order of insertions and deletions.")
4318 (license license:unlicense)))
4320 (define-public python2-orderedmultidict
4321 (package-with-python2 python-orderedmultidict))
4323 (define-public python-furl
4325 (name "python-furl")
4330 (uri (pypi-uri "furl" version))
4333 "0lzpfpm686hvz3sr1mcrnd1b3lgmnw8v59gb43wfi98r3b671pqc"))))
4334 (build-system python-build-system)
4336 `(("python-six" ,python-six)
4337 ("python-orderedmultidict" ,python-orderedmultidict)))
4339 `(("python-pycodestyle" ,python-pycodestyle)))
4340 (home-page "https://github.com/gruns/furl")
4341 (synopsis "URL manipulation in Python")
4342 (description "Furl provides an easy-to-use alternative to the
4343 @code{urllib} and @code{urlparse} modules for manipulating URLs.")
4344 (license license:unlicense)))
4346 (define-public python2-furl
4347 (package-with-python2 python-furl))
4349 (define-public python-flask-babel
4351 (name "python-flask-babel")
4356 (uri (pypi-uri "Flask-Babel" version))
4359 "16b80cipdba9xj3jlaiaq6wgrgpjb70w3j01jjy9hbp4k71kd6yj"))))
4360 (build-system python-build-system)
4362 `(("python-flask" ,python-flask)
4363 ("python-babel" ,python-babel)
4364 ("python-jinja2" ,python-jinja2)
4365 ("python-pytz" ,python-pytz)))
4366 (home-page "https://github.com/python-babel/flask-babel")
4367 (synopsis "Add i18n/l10n support to Flask applications")
4368 (description "This package implements internationalization and localization
4369 support for Flask. This is based on the Python babel module as well as pytz -
4370 both of which are installed automatically if you install this library.")
4371 (license license:bsd-3)))
4373 (define-public python2-flask-babel
4374 (package-with-python2 python-flask-babel))
4376 (define-public python-sqlalchemy-utils
4378 (name "python-sqlalchemy-utils")
4383 (uri (pypi-uri "SQLAlchemy-Utils" version))
4386 "1wghyvk73cmq3iqyg3fczw128fv2pan2v76m0xg1bw05h8fhvnk3"))))
4387 (build-system python-build-system)
4389 '(#:tests? #f)) ; FIXME: Many tests require a running database server.
4391 ;; (modify-phases %standard-phases
4394 ;; (zero? (system* "py.test" "sqlalchemy_utils" "tests")))))
4396 `(("python-six" ,python-six)
4397 ("python-sqlalchemy" ,python-sqlalchemy)))
4399 `(("python-dateutil" ,python-dateutil)
4400 ("python-flexmock" ,python-flexmock)
4401 ("python-psycopg2" ,python-psycopg2)
4402 ("python-pytest" ,python-pytest)
4403 ("python-pytz" ,python-pytz)))
4404 (home-page "https://github.com/kvesteri/sqlalchemy-utils")
4405 (synopsis "Various utility functions for SQLAlchemy")
4407 "SQLAlchemy-utils provides various utility functions and custom data types
4408 for SQLAlchemy. SQLAlchemy is an SQL database abstraction library for Python.
4410 You might also want to install the following optional dependencies:
4412 @item @code{python-passlib}
4413 @item @code{python-babel}
4414 @item @code{python-cryptography}
4415 @item @code{python-pytz}
4416 @item @code{python-psycopg2}
4417 @item @code{python-furl}
4418 @item @code{python-flask-babel}
4421 (license license:bsd-3)))
4423 (define-public python2-sqlalchemy-utils
4424 (package-with-python2 python-sqlalchemy-utils))
4426 (define-public python-alembic
4428 (name "python-alembic")
4433 (uri (pypi-uri "alembic" version))
4436 "06br9sfqypnjlal6fsbnky3zb0askwcn3diz8k3kwa0qcblm0fqf"))))
4437 (build-system python-build-system)
4439 `(("python-mock" ,python-mock)
4440 ("python-pytest-cov" ,python-pytest-cov)))
4442 `(("python-sqlalchemy" ,python-sqlalchemy)
4443 ("python-mako" ,python-mako)
4444 ("python-editor" ,python-editor)))
4445 (home-page "http://bitbucket.org/zzzeek/alembic")
4447 "Database migration tool for SQLAlchemy")
4449 "Alembic is a lightweight database migration tool for usage with the
4450 SQLAlchemy Database Toolkit for Python.")
4451 (license license:expat)))
4453 (define-public python2-alembic
4454 (package-with-python2 python-alembic))
4456 (define-public python-autopep8
4458 (name "python-autopep8")
4463 (uri (pypi-uri "autopep8" version))
4466 "18parm383lfn42a00wklv3qf20p4v277f1x3cn58x019dqk1xqrq"))))
4467 (build-system python-build-system)
4469 `(("python-pep8" ,python-pep8)))
4470 (home-page "https://github.com/hhatto/autopep8")
4471 (synopsis "Format Python code according to the PEP 8 style guide")
4473 "@code{autopep8} automatically formats Python code to conform to
4474 the PEP 8 style guide. It uses the pycodestyle utility to determine
4475 what parts of the code needs to be formatted. @code{autopep8} is
4476 capable of fixing most of the formatting issues that can be reported
4478 (license (license:non-copyleft
4479 "https://github.com/hhatto/autopep8/blob/master/LICENSE"))))
4481 (define-public python2-autopep8
4482 (package-with-python2 python-autopep8))
4484 (define-public python-distutils-extra
4486 (name "python-distutils-extra")
4491 (uri (string-append "https://launchpad.net/python-distutils-extra/trunk/"
4492 version "/+download/python-distutils-extra-"
4496 "0lx15kcbby9zisx33p2h5hgakgwh2bvh0ibag8z0px4j6ifhs41x"))))
4497 (build-system python-build-system)
4498 (home-page "https://launchpad.net/python-distutils-extra/")
4499 (synopsis "Enhancements to Python's distutils")
4501 "The python-distutils-extra module enables you to easily integrate
4502 gettext support, themed icons, and scrollkeeper-based documentation into
4503 Python's distutils.")
4504 (license license:gpl2)))
4506 (define-public python2-distutils-extra
4507 (package-with-python2 python-distutils-extra))
4509 (define-public python2-elib.intl
4511 (name "python2-elib.intl")
4515 ;; This project doesn't tag releases or publish tarballs, so we take
4516 ;; source from a (semi-arbitrary, i.e. latest as of now) git commit.
4519 (url "https://github.com/dieterv/elib.intl.git")
4520 (commit "d09997cfef")))
4523 "0y7vzff9xgbnaay7m0va1arl6g68ncwrvbgwl7jqlclsahzzb09d"))))
4524 (build-system python-build-system)
4526 ;; incompatible with Python 3 (exception syntax)
4527 `(#:python ,python-2
4529 (home-page "https://github.com/dieterv/elib.intl")
4530 (synopsis "Enhanced internationalization for Python")
4532 "The elib.intl module provides enhanced internationalization (I18N)
4533 services for your Python modules and applications.")
4534 (license license:lgpl3+)))
4536 (define-public python-pillow
4538 (name "python-pillow")
4543 (uri (pypi-uri "Pillow" version))
4546 "0xkv0p1d73gz0a1qaasf0ai4262g8f334j07vd60bjrxs2wr3nmj"))))
4547 (build-system python-build-system)
4549 `(("python-nose" ,python-nose)))
4551 `(("freetype" ,freetype)
4554 ("libjpeg" ,libjpeg)
4555 ("openjpeg" ,openjpeg)
4556 ("libtiff" ,libtiff)
4557 ("libwebp" ,libwebp)))
4559 `(#:phases (modify-phases %standard-phases
4561 'install 'check-installed
4562 (lambda* (#:key outputs inputs #:allow-other-keys)
4564 (setenv "HOME" (getcwd))
4565 ;; Make installed package available for running the
4567 (add-installed-pythonpath inputs outputs)
4568 (and (zero? (system* "python" "selftest.py"
4570 (zero? (system* "python" "test-installed.py"))))))
4572 (home-page "https://pypi.python.org/pypi/Pillow")
4573 (synopsis "Fork of the Python Imaging Library")
4575 "The Python Imaging Library adds image processing capabilities to your
4576 Python interpreter. This library provides extensive file format support, an
4577 efficient internal representation, and fairly powerful image processing
4578 capabilities. The core image library is designed for fast access to data
4579 stored in a few basic pixel formats. It should provide a solid foundation for
4580 a general image processing tool.")
4581 (license (license:x11-style
4582 "http://www.pythonware.com/products/pil/license.htm"
4583 "The PIL Software License"))))
4585 (define-public python2-pillow
4586 (package-with-python2 python-pillow))
4588 (define-public python-pycparser
4590 (name "python-pycparser")
4595 (uri (pypi-uri "pycparser" version))
4598 "1dkkjri0miidqb1zcqhqljfa34fcy9k5akasgwsv6k622zlk3b0a"))))
4599 (outputs '("out" "doc"))
4600 (build-system python-build-system)
4602 `(("pkg-config" ,pkg-config)))
4605 (modify-phases %standard-phases
4608 (with-directory-excursion "tests"
4609 (zero? (system* "python" "all_tests.py")))))
4610 (add-after 'install 'install-doc
4611 (lambda* (#:key outputs #:allow-other-keys)
4612 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4613 (doc (string-append data "/doc/" ,name "-" ,version))
4614 (examples (string-append doc "/examples")))
4616 (for-each (lambda (file)
4617 (copy-file (string-append "." file)
4618 (string-append doc file)))
4619 '("/README.rst" "/CHANGES" "/LICENSE"))
4620 (copy-recursively "examples" examples)))))))
4621 (home-page "https://github.com/eliben/pycparser")
4622 (synopsis "C parser in Python")
4624 "Pycparser is a complete parser of the C language, written in pure Python
4625 using the PLY parsing library. It parses C code into an AST and can serve as
4626 a front-end for C compilers or analysis tools.")
4627 (license license:bsd-3)))
4629 (define-public python2-pycparser
4630 (package-with-python2 python-pycparser))
4632 (define-public python-cffi
4634 (name "python-cffi")
4639 (uri (pypi-uri "cffi" version))
4641 (base32 "161rj52rzi3880lij17d6i9kvgkiwjilrqjs8405k8sf6ryif7cg"))))
4642 (build-system python-build-system)
4643 (outputs '("out" "doc"))
4645 `(("libffi" ,libffi)))
4646 (propagated-inputs ; required at run-time
4647 `(("python-pycparser" ,python-pycparser)))
4649 `(("pkg-config" ,pkg-config)
4650 ("python-sphinx" ,python-sphinx)
4651 ("python-pytest" ,python-pytest)))
4655 'install 'install-doc
4656 (lambda* (#:key outputs #:allow-other-keys)
4657 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4658 (doc (string-append data "/doc/" ,name "-" ,version))
4659 (html (string-append doc "/html")))
4660 (with-directory-excursion "doc"
4661 (system* "make" "html")
4663 (copy-recursively "build/html" html))
4664 (copy-file "LICENSE" (string-append doc "/LICENSE"))))
4666 (home-page "http://cffi.readthedocs.org")
4667 (synopsis "Foreign function interface for Python")
4669 "Foreign Function Interface for Python calling C code.")
4670 (license license:expat)))
4672 (define-public python2-cffi
4673 (package-with-python2 python-cffi))
4675 (define-public python-xcffib
4677 (name "python-xcffib")
4682 (uri (string-append "https://pypi.python.org/packages/source/x/"
4683 "xcffib/xcffib-" version ".tar.gz"))
4686 "0655hzxv57h1a9ja9kwp0ichbkhf3djw32k33d66xp0q37dq2y81"))))
4687 (build-system python-build-system)
4689 `(("libxcb" ,libxcb)))
4691 `(("python-cffi" ,python-cffi) ; used at run time
4692 ("python-six" ,python-six)))
4694 `(;; FIXME: Tests cannot load libxcb.so.1
4697 (modify-phases %standard-phases
4698 (add-after 'install 'install-doc
4699 (lambda* (#:key outputs #:allow-other-keys)
4700 (let ((doc (string-append (assoc-ref outputs "out") "/share"
4701 "/doc/" ,name "-" ,version)))
4703 (copy-file "README.md"
4704 (string-append doc "/README.md"))
4706 (home-page "https://github.com/tych0/xcffib")
4707 (synopsis "XCB Python bindings")
4709 "Xcffib is a replacement for xpyb, an XCB Python bindings. It adds
4710 support for Python 3 and PyPy. It is based on cffi.")
4711 (license license:expat)))
4713 (define-public python2-xcffib
4714 (package-with-python2 python-xcffib))
4716 (define-public python-cairocffi
4718 (name "python-cairocffi")
4723 ;; The archive on pypi is missing the 'utils' directory!
4724 (uri (string-append "https://github.com/SimonSapin/cairocffi/archive/v"
4726 (file-name (string-append name "-" version ".tar.gz"))
4729 "03w5p62sp3nqiccx864sbq0jvh7946277jqx3rcc3dch5xwfvv51"))))
4730 (build-system python-build-system)
4731 (outputs '("out" "doc"))
4733 `(("gdk-pixbuf" ,gdk-pixbuf)
4736 `(("pkg-config" ,pkg-config)
4737 ("python-sphinx" ,python-sphinx)
4738 ("python-docutils" ,python-docutils)))
4740 `(("python-xcffib" ,python-xcffib))) ; used at run time
4742 `(;; FIXME: Tests cannot find 'libcairo.so.2'.
4745 (modify-phases %standard-phases
4746 (add-after 'install 'install-doc
4747 (lambda* (#:key inputs outputs #:allow-other-keys)
4748 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4749 (doc (string-append data "/doc/" ,name "-" ,version))
4750 (html (string-append doc "/html")))
4751 (setenv "LD_LIBRARY_PATH"
4752 (string-append (assoc-ref inputs "cairo") "/lib" ":"
4753 (assoc-ref inputs "gdk-pixbuf") "/lib"))
4754 (setenv "LANG" "en_US.UTF-8")
4756 (for-each (lambda (file)
4757 (copy-file (string-append "." file)
4758 (string-append doc file)))
4759 '("/README.rst" "/CHANGES" "/LICENSE"))
4760 (system* "python" "setup.py" "build_sphinx")
4761 (copy-recursively "docs/_build/html" html)
4763 (home-page "https://github.com/SimonSapin/cairocffi")
4764 (synopsis "Python bindings and object-oriented API for Cairo")
4766 "Cairocffi is a CFFI-based drop-in replacement for Pycairo, a set of
4767 Python bindings and object-oriented API for cairo. Cairo is a 2D vector
4768 graphics library with support for multiple backends including image buffers,
4769 PNG, PostScript, PDF, and SVG file output.")
4770 (license license:bsd-3)))
4772 (define-public python2-cairocffi
4773 (package-with-python2 python-cairocffi))
4775 (define-public python-decorator
4777 (name "python-decorator")
4782 (uri (pypi-uri "decorator" version))
4784 (base32 "0w7hg59hlpq74jpyja4yfryap0ccjvchgpkfp20rhj9krgnrhvlw"))))
4785 (build-system python-build-system)
4786 (arguments '(#:tests? #f)) ; no test target
4787 (home-page "https://pypi.python.org/pypi/decorator/")
4788 (synopsis "Python module to simplify usage of decorators")
4790 "The aim of the decorator module is to simplify the usage of decorators
4791 for the average programmer, and to popularize decorators usage giving examples
4792 of useful decorators, such as memoize, tracing, redirecting_stdout, locked,
4793 etc. The core of this module is a decorator factory.")
4794 (license license:expat)))
4796 (define-public python2-decorator
4797 (package-with-python2 python-decorator))
4799 (define-public python-drmaa
4801 (name "python-drmaa")
4807 "https://pypi.python.org/packages/source/d/drmaa/drmaa-"
4810 (base32 "0bzl9f9g34dlhwf09i3fdv7dqqzf2iq0w7d6c2bafx1nlap8qfbh"))))
4811 (build-system python-build-system)
4812 ;; The test suite requires libdrmaa which is provided by the cluster
4813 ;; environment. At runtime the environment variable DRMAA_LIBRARY_PATH
4814 ;; should be set to the path of the libdrmaa library.
4815 (arguments '(#:tests? #f))
4817 `(("python-nose" ,python-nose)))
4818 (home-page "https://pypi.python.org/pypi/drmaa")
4819 (synopsis "Python bindings for the DRMAA library")
4821 "A Python package for Distributed Resource Management (DRM) job
4822 submission and control. This package is an implementation of the DRMAA 1.0
4823 Python language binding specification.")
4824 (license license:bsd-3)))
4826 (define-public python2-drmaa
4827 (package-with-python2 python-drmaa))
4829 (define-public python-gridmap
4831 (name "python-gridmap")
4837 "https://github.com/pygridtools/gridmap/archive/v"
4839 (file-name (string-append name "-" version ".tar.gz"))
4841 (base32 "1gzjg2k6f14i1msm2b0ax8d9ds1hvk6qd5nlaivg8m4cxqp4cp1x"))))
4842 (build-system python-build-system)
4844 '(#:tests? #f)) ; FIXME: Requires python-cherrypy.
4846 `(("python-psutil" ,python-psutil)
4847 ("python-drmaa" ,python-drmaa)
4848 ("python-pyzmq" ,python-pyzmq)))
4849 (home-page "https://github.com/pygridtools/gridmap")
4850 (synopsis "Create jobs on a cluster directly from Python")
4852 "Gridmap is a Python package to allow you to easily create jobs on the
4853 cluster directly from Python. You can directly map Python functions onto the
4854 cluster without needing to write any wrapper code yourself.")
4855 (license license:gpl3+)))
4857 (define-public python2-gridmap
4858 (package-with-python2 python-gridmap))
4860 (define-public python-pexpect
4862 (name "python-pexpect")
4867 (uri (pypi-uri "pexpect" version))
4869 (base32 "14ls7k99pwvl21zqv65kzrhccv50j89m5ij1hf0slmsvlxjj84rx"))))
4870 (build-system python-build-system)
4873 (modify-phases %standard-phases
4874 (add-before 'check 'prepare-tests
4876 (substitute* (find-files "tests")
4877 (("/bin/ls") (which "ls"))
4878 (("/bin/echo") (which "echo"))
4879 (("/bin/which") (which "which"))
4880 ;; Many tests try to use the /bin directory which
4881 ;; is not present in the build environment.
4882 ;; Use one that's non-empty and unlikely to change.
4883 (("/bin'") "/dev'"))
4884 ;; XXX: Socket connection test gets "Connection reset by peer".
4885 ;; Why does it not work? Delete for now.
4886 (delete-file "tests/test_socket.py")
4888 (replace 'check (lambda _ (zero? (system* "nosetests")))))))
4890 `(("python-nose" ,python-nose)
4891 ("python-pytest" ,python-pytest)
4895 `(("python-ptyprocess" ,python-ptyprocess)))
4896 (home-page "http://pexpect.readthedocs.org/")
4897 (synopsis "Controlling interactive console applications")
4899 "Pexpect is a pure Python module for spawning child applications;
4900 controlling them; and responding to expected patterns in their output.
4901 Pexpect works like Don Libes’ Expect. Pexpect allows your script to spawn a
4902 child application and control it as if a human were typing commands.")
4903 (license license:isc)))
4905 (define-public python2-pexpect
4906 (package-with-python2 python-pexpect))
4908 (define-public python-setuptools-scm
4910 (name "python-setuptools-scm")
4914 (uri (pypi-uri "setuptools_scm" version))
4917 "0bwyc5markib0i7i2qlyhdzxhiywzxbkfiapldma8m91m82jvwfs"))))
4918 (build-system python-build-system)
4919 (home-page "https://github.com/pypa/setuptools_scm/")
4920 (synopsis "Manage Python package versions in SCM metadata")
4922 "Setuptools_scm handles managing your Python package versions in
4923 @dfn{software configuration management} (SCM) metadata instead of declaring
4924 them as the version argument or in a SCM managed file.")
4925 (license license:expat)))
4927 (define-public python2-setuptools-scm
4928 (package-with-python2 python-setuptools-scm))
4930 (define-public python-pathpy
4932 (name "python-pathpy")
4937 (uri (string-append "https://pypi.python.org/packages/source/p/"
4938 "path.py/path.py-" version ".tar.gz"))
4940 (base32 "1p8s1l2vfkqhqxdhqlj0g1jjw4f1as2frr35sjcpjjpd5a89y41f"))))
4941 (outputs '("out" "doc"))
4942 (build-system python-build-system)
4944 `(("python-appdirs" ,python-appdirs)))
4946 `(("python-setuptools-scm" ,python-setuptools-scm)
4947 ("python-sphinx" ,python-sphinx)
4948 ("python-rst.linker" ,python-rst.linker)
4949 ("python-pytest" ,python-pytest)
4950 ("python-pytest-runner" ,python-pytest-runner)))
4953 (modify-phases %standard-phases
4954 (add-after 'build 'build-doc
4956 (setenv "LANG" "en_US.UTF-8")
4957 (zero? (system* "python" "setup.py" "build_sphinx"))))
4958 (add-after 'install 'install-doc
4959 (lambda* (#:key outputs #:allow-other-keys)
4960 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4961 (doc (string-append data "/doc/" ,name "-" ,version))
4962 (html (string-append doc "/html")))
4964 (for-each (lambda (file)
4965 (copy-file file (string-append doc "/" file)))
4966 '("README.rst" "CHANGES.rst"))
4967 (copy-recursively "build/sphinx/html" html)))))))
4968 (home-page "http://github.com/jaraco/path.py")
4969 (synopsis "Python module wrapper for built-in os.path")
4971 "@code{path.py} implements path objects as first-class entities, allowing
4972 common operations on files to be invoked on those path objects directly.")
4973 (license license:expat)))
4975 (define-public python2-pathpy
4976 (package-with-python2 python-pathpy))
4978 (define-public python-pickleshare
4980 (name "python-pickleshare")
4985 (uri (string-append "https://pypi.python.org/packages/source/p/"
4986 "pickleshare/pickleshare-" version ".tar.gz"))
4988 (base32 "11ljr90j3p6qswdrbl7p4cjb2i93f6vn0vx9anzpshsx0d2mggn0"))))
4989 (build-system python-build-system)
4991 `(("python-pathpy" ,python-pathpy)))
4992 (home-page "https://github.com/vivainio/pickleshare")
4993 (synopsis "Tiny key value database with concurrency support")
4995 "PickleShare is a small ‘shelve’-like datastore with concurrency support.
4996 Like shelve, a PickleShareDB object acts like a normal dictionary. Unlike
4997 shelve, many processes can access the database simultaneously. Changing a
4998 value in database is immediately visible to other processes accessing the same
4999 database. Concurrency is possible because the values are stored in separate
5000 files. Hence the “database” is a directory where all files are governed by
5002 (license license:expat)))
5004 (define-public python2-pickleshare
5005 (package-with-python2 python-pickleshare))
5007 (define-public python-simplegeneric
5009 (name "python-simplegeneric")
5014 (uri (string-append "https://pypi.python.org/packages/source/s/"
5015 "simplegeneric/simplegeneric-" version ".zip"))
5017 (base32 "0wwi1c6md4vkbcsfsf8dklf3vr4mcdj4mpxkanwgb6jb1432x5yw"))))
5018 (build-system python-build-system)
5020 `(("unzip" ,unzip)))
5021 (home-page "http://cheeseshop.python.org/pypi/simplegeneric")
5022 (synopsis "Python module for simple generic functions")
5024 "The simplegeneric module lets you define simple single-dispatch generic
5025 functions, akin to Python’s built-in generic functions like @code{len()},
5026 @code{iter()} and so on. However, instead of using specially-named methods,
5027 these generic functions use simple lookup tables, akin to those used by
5028 e.g. @code{pickle.dump()} and other generic functions found in the Python
5030 (license license:zpl2.1)))
5032 (define-public python2-simplegeneric
5033 (package-with-python2 python-simplegeneric))
5035 (define-public python-ipython-genutils
5036 ;; TODO: This package is retired, check if can be removed, see description.
5038 (name "python-ipython-genutils")
5043 (uri (string-append "https://pypi.python.org/packages/source/i/"
5044 "ipython_genutils/ipython_genutils-"
5047 (base32 "19l2pp1c64ansr89l3cqh19jdi2ixhssdzx0vz4n6r52a6i281is"))))
5048 (build-system python-build-system)
5049 (arguments `(#:tests? #f)) ; no tests
5050 (home-page "http://ipython.org")
5051 (synopsis "Vestigial utilities from IPython")
5053 "This package provides retired utilities from IPython. No packages
5054 outside IPython/Jupyter should depend on it.
5056 This package shouldn't exist. It contains some common utilities shared by
5057 Jupyter and IPython projects during The Big Split. As soon as possible, those
5058 packages will remove their dependency on this, and this package will go
5060 (license license:bsd-3)))
5062 (define-public python2-ipython-genutils
5063 (package-with-python2 python-ipython-genutils))
5065 (define-public python-traitlets
5067 (name "python-traitlets")
5072 (uri (pypi-uri "traitlets" version))
5075 "1afy08sa5n9gnkvh3da49c16zkyv598vchv0p1hp7zzjy8895hz4"))))
5076 (build-system python-build-system)
5079 (modify-phases %standard-phases
5080 (replace 'check (lambda _ (zero? (system* "nosetests")))))))
5082 `(("python-ipython-genutils" ,python-ipython-genutils)
5083 ("python-decorator" ,python-decorator)))
5085 `(("python-mock" ,python-mock)
5086 ("python-nose" ,python-nose)))
5087 (home-page "http://ipython.org")
5088 (synopsis "Configuration system for Python applications")
5090 "Traitlets is a framework that lets Python classes have attributes with
5091 type checking, dynamically calculated default values, and ‘on change’
5092 callbacks. The package also includes a mechanism to use traitlets for
5093 configuration, loading values from files or from command line arguments. This
5094 is a distinct layer on top of traitlets, so you can use traitlets in your code
5095 without using the configuration machinery.")
5096 (license license:bsd-3)))
5098 (define-public python2-traitlets
5099 (package-with-python2 python-traitlets))
5101 (define-public python-jupyter-core
5103 (name "python-jupyter-core")
5108 (uri (string-append (pypi-uri "jupyter_core" version)))
5111 "1cy7inv218dgh4m1fbzbsiqpz733ylgjrj62jxqpfzs3r2cm7ic9"))))
5112 (build-system python-build-system)
5113 ;; FIXME: not sure how to run the tests
5114 (arguments `(#:tests? #f))
5116 `(("python-traitlets" ,python-traitlets)))
5117 (home-page "http://jupyter.org/")
5118 (synopsis "Jupyter base package")
5120 "Jupyter core is the base package on which Jupyter projects rely.")
5121 (license license:bsd-3)))
5123 (define-public python2-jupyter-core
5124 (package-with-python2 python-jupyter-core))
5126 (define-public python-jupyter-client
5128 (name "python-jupyter-client")
5133 (uri (pypi-uri "jupyter_client" version))
5136 "1vjjrpjw7k5sh982pbjnslv7byfbfazjw9g92jvs7dz5qbx556n9"))))
5137 (build-system python-build-system)
5138 ;; Tests fail because of missing native python kernel which I assume is
5139 ;; provided by the ipython package, which we cannot use because it would
5140 ;; cause a dependency cycle.
5141 (arguments `(#:tests? #f))
5143 `(("python-pyzmq" ,python-pyzmq)
5144 ("python-traitlets" ,python-traitlets)
5145 ("python-jupyter-core" ,python-jupyter-core)))
5146 (home-page "http://jupyter.org/")
5147 (synopsis "Jupyter protocol implementation and client libraries")
5149 "The @code{jupyter_client} package contains the reference implementation
5150 of the Jupyter protocol. It also provides client and kernel management APIs
5151 for working with kernels, and the @code{jupyter kernelspec} entrypoint for
5152 installing @code{kernelspec}s for use with Jupyter frontends.")
5153 (license license:bsd-3)))
5155 (define-public python2-jupyter-client
5156 (package-with-python2 python-jupyter-client))
5158 (define-public python-ipykernel
5160 (name "python-ipykernel")
5165 (uri (pypi-uri "ipykernel" version))
5167 (base32 "0qllv0k6zzv1r1cj1x2ygxmlrrqhbslzj8rc6r6fg3kc1rgz4m2s"))))
5168 (build-system python-build-system)
5169 ;; The tests load a submodule of IPython. However, IPython itself depends
5171 (arguments `(#:tests? #f))
5173 ;; imported at runtime during connect
5174 `(("python-jupyter-client" ,python-jupyter-client)))
5175 (home-page "http://ipython.org")
5176 (synopsis "IPython Kernel for Jupyter")
5178 "This package provides the IPython kernel for Jupyter.")
5179 (license license:bsd-3)))
5181 (define-public python2-ipykernel
5182 (package-with-python2 python-ipykernel))
5184 (define-public python-testpath
5186 (name "python-testpath")
5191 (uri (string-append "https://github.com/jupyter/testpath/archive/"
5193 (file-name (string-append name "-" version ".tar.gz"))
5196 "04kh3fgvmqz6cfcw79q70qwjz7ib7lxm27cc548iy2rpr33qqf55"))))
5197 (build-system python-build-system)
5199 `(#:tests? #f ; this package does not even have a setup.py
5200 #:modules ((guix build python-build-system)
5203 #:imported-modules (,@%python-build-system-modules
5206 (modify-phases %standard-phases
5209 (lambda* (#:key inputs outputs #:allow-other-keys)
5210 (let* ((version (last
5211 (string-split (assoc-ref inputs "python") #\-)))
5212 (x.y (string-join (take (string-split version #\.) 2)
5215 (assoc-ref outputs "out")
5216 "/lib/python" x.y "/site-packages/testpath")))
5218 (copy-recursively "testpath" dir))
5220 (home-page "https://github.com/takluyver/testpath")
5221 (synopsis "Test utilities for code working with files and commands")
5223 "Testpath is a collection of utilities for Python code working with files
5224 and commands. It contains functions to check things on the filesystem, and
5225 tools for mocking system commands and recording calls to those.")
5226 (license license:expat)))
5228 (define-public python2-testpath
5229 (package-with-python2 python-testpath))
5231 (define-public python-ipython
5233 (name "python-ipython")
5238 (uri (pypi-uri "ipython" version ".tar.gz"))
5240 (base32 "1qhjwa9cyz1np7rhv3p4ip13lkgbqsad62l24xkwiq1ic2gwiqbf"))))
5241 (build-system python-build-system)
5242 (outputs '("out" "doc"))
5244 `(("python-pyzmq" ,python-pyzmq)
5245 ("python-prompt-toolkit" ,python-prompt-toolkit)
5246 ("python-terminado" ,python-terminado)
5247 ("python-matplotlib" ,python-matplotlib)
5248 ("python-numpy" ,python-numpy)
5249 ("python-numpydoc" ,python-numpydoc)
5250 ("python-jinja2" ,python-jinja2)
5251 ("python-mistune" ,python-mistune)
5252 ("python-pexpect" ,python-pexpect)
5253 ("python-pickleshare" ,python-pickleshare)
5254 ("python-simplegeneric" ,python-simplegeneric)
5255 ("python-jsonschema" ,python-jsonschema)
5256 ("python-traitlets" ,python-traitlets)
5257 ("python-ipykernel" ,python-ipykernel)
5258 ("python-nbformat" ,python-nbformat)
5259 ("python-pygments" ,python-pygments)))
5261 `(("readline" ,readline)
5264 `(("graphviz" ,graphviz)
5265 ("pkg-config" ,pkg-config)
5266 ("python-requests" ,python-requests) ;; for tests
5267 ("python-testpath" ,python-testpath)
5268 ("python-nose" ,python-nose)
5269 ("python-sphinx" ,python-sphinx)
5270 ("python-shpinx-rtd-theme" ,python-sphinx-rtd-theme)
5271 ("texlive" ,texlive)
5272 ("texinfo" ,texinfo)))
5275 (modify-phases %standard-phases
5277 'install 'install-doc
5278 (lambda* (#:key inputs outputs #:allow-other-keys)
5279 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
5280 (doc (string-append data "/doc/" ,name "-" ,version))
5281 (html (string-append doc "/html"))
5282 (man1 (string-append data "/man/man1"))
5283 (info (string-append data "/info"))
5284 (examples (string-append doc "/examples"))
5285 (python-arg (string-append "PYTHON=" (which "python"))))
5286 (setenv "LANG" "en_US.utf8")
5287 ;; Make installed package available for running the tests
5288 (add-installed-pythonpath inputs outputs)
5289 (with-directory-excursion "docs"
5290 ;; FIXME: pdf fails to build
5291 ;;(system* "make" "pdf" "PAPER=a4")
5292 (system* "make" python-arg "html")
5293 (system* "make" python-arg "info"))
5294 (copy-recursively "docs/man" man1)
5295 (copy-recursively "examples" examples)
5296 (copy-recursively "docs/build/html" html)
5297 ;; (copy-file "docs/build/latex/ipython.pdf"
5298 ;; (string-append doc "/ipython.pdf"))
5300 (copy-file "docs/build/texinfo/ipython.info"
5301 (string-append info "/ipython.info"))
5302 (copy-file "COPYING.rst" (string-append doc "/COPYING.rst")))))
5303 ;; Tests can only be run after the library has been installed and not
5304 ;; within the source directory.
5308 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
5310 (with-directory-excursion "/tmp"
5311 ;; Make installed package available for running the tests
5312 (add-installed-pythonpath inputs outputs)
5313 (setenv "HOME" "/tmp/") ;; required by a test
5314 (zero? (system* (string-append (assoc-ref outputs "out")
5319 (lambda* (#:key inputs #:allow-other-keys)
5320 (substitute* "./IPython/utils/_process_posix.py"
5321 (("/usr/bin/env', 'which") (which "which")))
5322 (substitute* "./IPython/core/tests/test_inputtransformer.py"
5323 (("#!/usr/bin/env python")
5324 (string-append "#!" (which "python"))))
5325 ;; Disable 1 failing test
5326 (substitute* "./IPython/core/tests/test_magic.py"
5327 (("def test_dirops\\(\\):" all)
5328 (string-append "@dec.skipif(True)\n" all))))))))
5329 (home-page "http://ipython.org")
5330 (synopsis "IPython is a tool for interactive computing in Python")
5332 "IPython provides a rich architecture for interactive computing with:
5333 Powerful interactive shells, a browser-based notebook, support for interactive
5334 data visualization, embeddable interpreters and tools for parallel
5336 (license license:bsd-3)
5337 (properties `((python2-variant . ,(delay python2-ipython))))))
5339 (define-public python2-ipython
5340 (let ((ipython (package-with-python2 (strip-python2-variant python-ipython))))
5343 ;; FIXME: add pyreadline once available.
5345 `(("python2-backports-shutil-get-terminal-size"
5346 ,python2-backports-shutil-get-terminal-size)
5347 ("python2-pathlib2" ,python2-pathlib2)
5348 ,@(package-propagated-inputs ipython)))
5350 `(("python2-mock" ,python2-mock)
5351 ,@(package-native-inputs ipython))))))
5353 (define-public python-isodate
5355 (name "python-isodate")
5360 (uri (pypi-uri "isodate" version))
5363 "0cafaiwixgpxwh9dsd28qb0dbzsj6xpxjdkyk30ns91ps10mq422"))))
5364 (build-system python-build-system)
5366 "http://cheeseshop.python.org/pypi/isodate")
5368 "Python date parser and formatter")
5370 "Python-isodate is a python module for parsing and formatting
5371 ISO 8601 dates, time and duration.")
5372 (license license:bsd-3)))
5374 (define-public python2-isodate
5375 (package-with-python2 python-isodate))
5377 (define-public python-html5lib
5379 (name "python-html5lib")
5384 (uri (pypi-uri "html5lib" version))
5387 "1yd068a5c00wd0ajq0hqimv7fd82lhrw0w3s01vbhy9bbd6xapqd"))))
5388 (build-system python-build-system)
5390 `(("python-six" ,python-six)
5391 ("python-webencodings" ,python-webencodings)))
5393 `(#:test-target "check"))
5395 "https://github.com/html5lib/html5lib-python")
5397 "Python HTML parser based on the WHATWG HTML specifcation")
5399 "Html5lib is an HTML parser based on the WHATWG HTML specifcation
5400 and written in Python.")
5401 (license license:expat)))
5403 (define-public python2-html5lib
5404 (package-with-python2 python-html5lib))
5406 ;; Needed for python-bleach, a dependency of python-notebook
5407 (define-public python-html5lib-0.9
5409 (inherit python-html5lib)
5414 (uri (pypi-uri "html5lib" version))
5417 "17n4zfsj6ynmbwdwviywmj8r6nzr3xvfx2zs0xhndmvm51z7z263"))))))
5419 (define-public python2-html5lib-0.9
5420 (package-with-python2 python-html5lib-0.9))
5422 (define-public python-webencodings
5424 (name "python-webencodings")
5428 (uri (pypi-uri "webencodings" version))
5431 "015rw7662lkpb9aqiqah2hbizk6w531badqwjpz41rr47glmxid5"))))
5432 (build-system python-build-system)
5435 (modify-phases %standard-phases
5438 (zero? (system* "py.test" "-v" "webencodings/tests.py")))))))
5440 `(("python-pytest" ,python-pytest)))
5441 (home-page "https://github.com/SimonSapin/python-webencodings")
5442 (synopsis "Character encoding aliases for legacy web content")
5444 "In order to be compatible with legacy web content when interpreting
5445 something like @code{Content-Type: text/html; charset=latin1}, tools need
5446 to use a particular set of aliases for encoding labels as well as some
5447 overriding rules. For example, @code{US-ASCII} and @code{iso-8859-1} on
5448 the web are actually aliases for @code{windows-1252}, and an @code{UTF-8}
5449 or @code{UTF-16} BOM takes precedence over any other encoding declaration.
5450 The WHATWG @url{https://encoding.spec.whatwg.org/,Encoding} standard
5451 defines all such details so that implementations do not have to
5452 reverse-engineer each other.
5454 This module implements the Encoding standard and has encoding labels and
5455 BOM detection, but the actual implementation for encoders and decoders
5457 (license license:bsd-3)))
5459 (define-public python2-webencodings
5460 (package-with-python2 python-webencodings))
5462 (define-public python-urwid
5464 (name "python-urwid")
5469 (uri (pypi-uri "urwid" version))
5472 "18cnd1wdjcas08x5qwa5ayw6jsfcn33w4d9f7q3s29fy6qzc1kng"))))
5473 (build-system python-build-system)
5476 (modify-phases %standard-phases
5477 ;; Disable failing test. Bug filed upstream:
5478 ;; https://github.com/wardi/urwid/issues/164
5479 ;; TODO: check again for python-urwid > 1.3.1 or python > 3.4.3.
5480 (add-after 'unpack 'disable-failing-test
5482 (substitute* "urwid/tests/test_event_loops.py"
5483 (("test_remove_watch_file")
5484 "disable_remove_watch_file")))))))
5485 (home-page "http://urwid.org")
5486 (synopsis "Console user interface library for Python")
5488 "Urwid is a curses-based UI/widget library for Python. It includes many
5489 features useful for text console applications.")
5490 (license license:lgpl2.1+)))
5492 (define-public python2-urwid
5493 (package-with-python2 python-urwid))
5495 (define-public python-openid
5497 (name "python-openid")
5502 (uri (pypi-uri "python3-openid" version))
5505 "1x3nh3fycqfn43jp5j5pb4q4y2jxp4mdka4absaa3bc0078qd758"))))
5506 (build-system python-build-system)
5507 (home-page "https://github.com/necaris/python3-openid")
5508 (synopsis "OpenID support for servers and consumers")
5509 (description "This library provides OpenID authentication for Python, both
5510 for clients and servers.")
5511 (license license:asl2.0)))
5513 (define-public python2-openid
5515 (name "python2-openid")
5520 (uri (pypi-uri "python-openid" version))
5523 "1vvhxlghjan01snfdc4k7ykd80vkyjgizwgg9bncnin8rqz1ricj"))))
5524 (build-system python-build-system)
5526 ;; Python 3 support is in `python3-openid`, a separate package.
5527 `(#:python ,python-2))
5528 (home-page "https://github.com/openid/python-openid")
5529 (synopsis "OpenID support for servers and consumers")
5530 (description "This library provides OpenID authentication for Python, both
5531 for clients and servers.")
5532 (license license:asl2.0)))
5534 (define-public python-urwidtrees
5536 (name "python-urwidtrees")
5541 ;; package author intends on distributing via github rather than pypi:
5542 ;; https://github.com/pazz/alot/issues/877#issuecomment-230173331
5543 (uri (string-append "https://github.com/pazz/urwidtrees/archive/"
5545 (file-name (string-append name "-" version ".tar.gz"))
5548 "0d30lyd3s2a97rhqfax5w9ssqds2z6aydqx3c6j2c2lk3cb4ngvh"))))
5549 (build-system python-build-system)
5551 '(#:tests? #f)) ; no tests
5552 (propagated-inputs `(("python-urwid" ,python-urwid)))
5553 (home-page "https://github.com/pazz/urwidtrees")
5554 (synopsis "Tree widgets for urwid")
5555 (description "Urwidtrees is a Widget Container API for the @code{urwid}
5556 toolkit. Use it to build trees of widgets.")
5557 (license license:gpl3+)))
5559 (define-public python2-urwidtrees
5560 (package-with-python2 python-urwidtrees))
5562 (define-public python-dbus
5564 (name "python-dbus")
5570 "https://dbus.freedesktop.org/releases/dbus-python/dbus-python-"
5573 (base32 "1py62qir966lvdkngg0v8k1khsqxwk5m4s8nflpk1agk5f5nqb71"))))
5574 (build-system gnu-build-system)
5577 (modify-phases %standard-phases
5581 ;; XXX: For the missing '/etc/machine-id'.
5582 (substitute* "test/run-test.sh"
5583 (("DBUS_FATAL_WARNINGS=1")
5584 "DBUS_FATAL_WARNINGS=0"))
5587 `(("pkg-config" ,pkg-config)))
5589 `(("python" ,python)
5590 ("dbus-glib" ,dbus-glib)))
5591 (synopsis "Python bindings for D-bus")
5592 (description "python-dbus provides bindings for libdbus, the reference
5593 implementation of D-Bus.")
5594 (home-page "http://www.freedesktop.org/wiki/Software/DBusBindings/")
5595 (license license:expat)))
5597 (define-public python2-dbus
5598 (package (inherit python-dbus)
5599 (name "python2-dbus")
5600 (inputs `(("python" ,python-2)
5601 ,@(alist-delete "python"
5602 (package-inputs python-dbus)
5604 ;; FIXME: on Python 2, the test_utf8 fails with:
5605 ;; "ValueError: unichr() arg not in range(0x10000) (narrow Python build)"
5606 (arguments `(#:tests? #f))))
5608 (define-public python-apsw
5610 (name "python-apsw")
5611 (version "3.9.2-r1")
5615 (uri (pypi-uri "apsw" version))
5618 "0w4jb0wpx785qw42r3h4fh7gl5w2968q48i7gygybsfxck8nzffs"))))
5619 (build-system python-build-system)
5621 `(("sqlite" ,sqlite)))
5624 (modify-phases %standard-phases
5626 (add-after 'install 'check
5627 (lambda* (#:key inputs outputs #:allow-other-keys)
5628 (add-installed-pythonpath inputs outputs)
5629 (zero? (system* "python" "setup.py" "test")))))))
5630 (home-page "https://github.com/rogerbinns/apsw/")
5631 (synopsis "Another Python SQLite Wrapper")
5632 (description "APSW is a Python wrapper for the SQLite
5633 embedded relational database engine. In contrast to other wrappers such as
5634 pysqlite it focuses on being a minimal layer over SQLite attempting just to
5635 translate the complete SQLite API into Python.")
5636 (license license:zlib)))
5638 (define-public python2-apsw
5639 (package-with-python2 python-apsw))
5641 (define-public python-lxml
5643 (name "python-lxml")
5648 (uri (pypi-uri "lxml" version))
5651 "1pvbmiy2m7jwv493kilbghhj2pkh8wy1na3ji350vhzhlwlclx4w"))))
5652 (build-system python-build-system)
5654 `(("libxml2" ,libxml2)
5655 ("libxslt" ,libxslt)))
5656 (home-page "http://lxml.de/")
5658 "Python XML processing library")
5660 "The lxml XML toolkit is a Pythonic binding for the C libraries
5661 libxml2 and libxslt.")
5662 (license license:bsd-3))) ; and a few more, see LICENSES.txt
5664 (define-public python2-lxml
5665 (package-with-python2 python-lxml))
5667 ;; beautifulsoup4 has a totally different namespace than 3.x,
5668 ;; and pypi seems to put it under its own name, so I guess we should too
5669 (define-public python-beautifulsoup4
5671 (name "python-beautifulsoup4")
5676 (uri (pypi-uri "beautifulsoup4" version))
5679 "1qgmhw65ncsgccjhslgkkszif47q6gvxwqv4mim17agxd81p951w"))))
5680 (build-system python-build-system)
5683 (modify-phases %standard-phases
5684 ;; The Python 2 source is the definitive source of beautifulsoup4. We
5685 ;; must use this conversion script when building with Python 3. The
5686 ;; conversion script also runs the tests.
5687 ;; For more information, see the file 'convert-py3k' in the source
5690 (lambda _ (zero? (system* "./convert-py3k")))))))
5692 "http://www.crummy.com/software/BeautifulSoup/bs4/")
5694 "Python screen-scraping library")
5696 "Beautiful Soup is a Python library designed for rapidly setting up
5697 screen-scraping projects. It offers Pythonic idioms for navigating,
5698 searching, and modifying a parse tree, providing a toolkit for
5699 dissecting a document and extracting what you need. It automatically
5700 converts incoming documents to Unicode and outgoing documents to UTF-8.")
5701 (license license:expat)
5702 (properties `((python2-variant . ,(delay python2-beautifulsoup4))))))
5704 (define-public python2-beautifulsoup4
5706 (inherit (package-with-python2
5707 (strip-python2-variant python-beautifulsoup4)))
5708 (arguments `(#:python ,python-2))))
5710 (define-public python-cssutils
5712 (name "python-cssutils")
5717 (uri (pypi-uri "cssutils" version))
5720 "0qwha9x1wml2qmipbcz03gndnlwhzrjdvw9i09si247a90l8p8fq"))))
5721 (build-system python-build-system)
5723 `(("unzip" ,unzip))) ; for unpacking the source
5725 `(#:tests? #f)) ;tests require python-pbr < 1.7.0
5726 (home-page "http://cthedot.de/cssutils/")
5728 "CSS Cascading Style Sheets library for Python")
5730 "Cssutils is a Python package for parsing and building CSS
5731 Cascading Style Sheets. Currently it provides a DOM only and no rendering
5733 (license license:lgpl3+)))
5735 (define-public python2-cssutils
5736 (package-with-python2 python-cssutils))
5738 (define-public python-cssselect
5740 (name "python-cssselect")
5745 (uri (pypi-uri "cssselect" version))
5748 "1xg6gbva1yswghiycmgincv6ab4bn7hpm720ndbj40h8xycmnfvi"))))
5749 (build-system python-build-system)
5751 ;; tests fail with message
5752 ;; AttributeError: 'module' object has no attribute 'tests'
5755 "https://pythonhosted.org/cssselect/")
5757 "CSS3 selector parser and translator to XPath 1.0")
5759 "Cssselect ia a Python module that parses CSS3 Selectors and translates
5760 them to XPath 1.0 expressions. Such expressions can be used in lxml or
5761 another XPath engine to find the matching elements in an XML or HTML document.")
5762 (license license:bsd-3)))
5764 (define-public python2-cssselect
5765 (package-with-python2 python-cssselect))
5767 (define-public python-openid-cla
5769 (name "python-openid-cla")
5774 (uri (pypi-uri "python-openid-cla" version))
5777 "102hy2qisvjxp5s0v9lvwqi4f2dk0dhns40vjgn008yxc7k0h3cr"))))
5778 (build-system python-build-system)
5779 (arguments '(#:tests? #f)) ; No tests.
5780 (home-page "https://github.com/puiterwijk/python-openid-cla/")
5781 (synopsis "Implementation of the OpenID CLA extension for python-openid")
5782 (description "@code{openid-cla} is an implementation of the OpenID
5783 contributor license agreement extension for python-openid.")
5784 (license license:bsd-3)))
5786 (define-public python2-openid-cla
5787 (package-with-python2 python-openid-cla))
5789 (define-public python-openid-teams
5791 (name "python-openid-teams")
5796 (uri (pypi-uri "python-openid-teams" version))
5799 "05zrh78alav24rxkbqlpbad6d3x2nljk6z6j7kflxf3vdqa7w969"))))
5800 (build-system python-build-system)
5801 (arguments '(#:tests? #f)) ; No tests.
5802 (home-page "https://github.com/puiterwijk/python-openid-teams/")
5803 (synopsis "Implementation of the OpenID teams extension for python-openid")
5805 "@code{openid-teams} is an implementation of the OpenID
5806 teams extension for python-openid.")
5807 (license license:bsd-3)))
5809 (define-public python2-openid-teams
5810 (package-with-python2 python-openid-teams))
5812 (define-public python-netifaces
5814 (name "python-netifaces")
5820 "https://pypi.python.org/packages/source/n/netifaces/netifaces-"
5825 "1plw237a4zib4z8s62g0mrs8gm3kjfrp5sxh6bbk9nl3rdls2mln"))))
5826 (build-system python-build-system)
5828 "https://bitbucket.org/al45tair/netifaces")
5830 "Python module for portable network interface information")
5832 "Netifaces is a Python module providing information on network
5833 interfaces in an easy and portable manner.")
5834 (license license:expat)))
5836 (define-public python2-netifaces
5837 (package-with-python2 python-netifaces))
5839 (define-public python-networkx
5841 (name "python-networkx")
5846 (uri (pypi-uri "networkx" version))
5848 (base32 "1f74s56xb4ggixiq0vxyfxsfk8p20c7a099lpcf60izv1php03hd"))))
5849 (build-system python-build-system)
5850 ;; python-decorator is needed at runtime
5852 `(("python-decorator" ,python-decorator)))
5854 `(("python-nose" ,python-nose)))
5855 (home-page "http://networkx.github.io/")
5856 (synopsis "Python module for creating and manipulating graphs and networks")
5858 "NetworkX is a Python package for the creation, manipulation, and study
5859 of the structure, dynamics, and functions of complex networks.")
5860 (license license:bsd-3)))
5862 (define-public python2-networkx
5863 (package-with-python2 python-networkx))
5865 (define-public snakemake
5872 (uri (pypi-uri "snakemake" version))
5874 (base32 "1d48ql0010v9ls6mac7fz6j391gm4h74a64hqgw89s0vfqgdyzdl"))))
5875 (build-system python-build-system)
5877 ;; TODO: Package missing test dependencies.
5879 (home-page "https://bitbucket.org/snakemake/snakemake/wiki/Home")
5880 (synopsis "Python-based execution environment for make-like workflows")
5882 "Snakemake aims to reduce the complexity of creating workflows by
5883 providing a clean and modern domain specific specification language (DSL) in
5884 Python style, together with a fast and comfortable execution environment.")
5885 (license license:expat)))
5887 (define-public python-seaborn
5889 (name "python-seaborn")
5894 (uri (pypi-uri "seaborn" version))
5896 (base32 "0pawrqc3mxpwd5g9pvi9gba02637bh5c8ldpp8izfwpfn52469zs"))))
5897 (build-system python-build-system)
5899 '(#:tests? #f)) ; Tests requires a running X11 server.
5901 `(("python-pandas" ,python-pandas)
5902 ("python-matplotlib" ,python-matplotlib)
5903 ("python-scipy" ,python-scipy)))
5904 (home-page "http://stanford.edu/~mwaskom/software/seaborn/")
5905 (synopsis "Statistical data visualization")
5907 "Seaborn is a library for making attractive and informative statistical
5908 graphics in Python. It is built on top of matplotlib and tightly integrated
5909 with the PyData stack, including support for numpy and pandas data structures
5910 and statistical routines from scipy and statsmodels.")
5911 (license license:bsd-3)
5912 (properties `((python2-variant . ,(delay python2-seaborn))))))
5914 (define-public python2-seaborn
5915 (let ((base (package-with-python2 (strip-python2-variant python-seaborn))))
5918 (propagated-inputs `(("python2-pytz" ,python2-pytz)
5919 ,@(package-propagated-inputs base))))))
5921 (define-public python-mpmath
5923 (name "python-mpmath")
5927 (uri (string-append "http://mpmath.org/files/mpmath-"
5931 "08ijsr4ifrqv3cjc26mkw0dbvyygsa99in376hr4b96ddm1gdpb8"))))
5932 (build-system python-build-system)
5935 (modify-phases %standard-phases
5939 (system* "python" "mpmath/tests/runtests.py" "-local")))))))
5940 (home-page "http://mpmath.org")
5941 (synopsis "Arbitrary-precision floating-point arithmetic in python")
5943 "@code{mpmath} can be used as an arbitrary-precision substitute for
5944 Python's float/complex types and math/cmath modules, but also does much
5945 more advanced mathematics.")
5946 (license license:bsd-3)))
5948 (define-public python2-mpmath
5949 (package-with-python2 python-mpmath))
5951 (define-public python-sympy
5953 (name "python-sympy")
5959 "https://github.com/sympy/sympy/releases/download/sympy-"
5960 version "/sympy-" version ".tar.gz"))
5962 (base32 "1bpzjwr9hrr7w88v4vgnj9lr6vxcldc94si13n8xpr1rv08d5b1y"))))
5963 (build-system python-build-system)
5965 `(("python-mpmath" ,python-mpmath)))
5966 (home-page "http://www.sympy.org/")
5967 (synopsis "Python library for symbolic mathematics")
5969 "SymPy is a Python library for symbolic mathematics. It aims to become a
5970 full-featured computer algebra system (CAS) while keeping the code as simple
5971 as possible in order to be comprehensible and easily extensible.")
5972 (license license:bsd-3)))
5974 (define-public python2-sympy
5975 (package-with-python2 python-sympy))
5977 (define-public python-q
5984 (uri (pypi-uri "q" version))
5987 "1mgfazh8fkizh6walra2zv885f3lcgr3nb02v1frfm4p8ddcy3yy"))))
5988 (build-system python-build-system)
5989 (home-page "https://github.com/zestyping/q")
5990 (synopsis "Quick-and-dirty debugging output for tired programmers")
5992 "q is a Python module for \"print\" style of debugging Python code. It
5993 provides convenient short API for print out of values, tracebacks, and
5994 falling into the Python interpreter.")
5995 (license license:asl2.0)))
5997 (define-public python2-q
5998 (package-with-python2 python-q))
6000 (define-public python-testlib
6002 (name "python-testlib")
6008 "https://pypi.python.org/packages/source/t/testlib/testlib-"
6011 (base32 "1mz26cxn4x8bbgv0rn0mvj2z05y31rkc8009nvdlb3lam5b4mj3y"))))
6012 (build-system python-build-system)
6014 `(("unzip" ,unzip))) ; for unpacking the source
6015 (synopsis "Python micro test suite harness")
6016 (description "A micro unittest suite harness for Python.")
6017 (home-page "https://github.com/trentm/testlib")
6018 (license license:expat)))
6020 (define-public python2-testlib
6021 (package-with-python2 python-testlib))
6023 (define-public python2-xlib
6025 (name "python2-xlib")
6029 (uri (string-append "mirror://sourceforge/python-xlib/python-xlib"
6031 "python-xlib-" version ".tar.gz"))
6034 "1sv0447j0rx8cgs3jhjl695p5pv13ihglcjlrrz1kq05lsvb0wa7"))))
6035 (build-system python-build-system)
6037 `(#:python ,python-2 ;Python 2 only
6038 #:tests? #f)) ;no tests
6039 (home-page "http://python-xlib.sourceforge.net/")
6040 (synopsis "Python X11 client library")
6042 "The Python X Library is intended to be a fully functional X client
6043 library for Python programs. It is useful to implement low-level X clients.
6044 It is written entirely in Python.")
6045 (license license:gpl2+)))
6047 (define-public python-singledispatch
6049 (name "python-singledispatch")
6054 (uri (pypi-uri "singledispatch" version))
6057 "171b7ip0hsq5qm83np40h3phlr36ym18w0lay0a8v08kvy3sy1jv"))))
6058 (build-system python-build-system)
6060 `(("python-six" ,python-six))) ; required for conversion, not at run-time
6062 "http://docs.python.org/3/library/functools.html#functools.singledispatch")
6063 (synopsis "Backport of singledispatch feature from Python 3.4")
6065 "This library brings functools.singledispatch from Python 3.4 to Python
6067 (license license:expat)))
6069 (define-public python2-singledispatch
6070 (package-with-python2 python-singledispatch))
6072 (define-public python-tornado
6074 (name "python-tornado")
6079 (uri (pypi-uri "tornado" version))
6081 (base32 "1gzgwayl6hmc9jfcl88bni4jcsk2jcca9dn1rvrfsvnijcjx7hn9"))))
6082 (build-system python-build-system)
6084 '(;; FIXME: Two tests error out with:
6085 ;; AssertionError: b'Error in atexit._run_exitfuncs:\nFileNotF[44 chars]ry\n' != b''
6087 ;; (modify-phases %standard-phases
6090 ;; ;; 'setup.py test' hits an AssertionError on BSD-specific
6091 ;; ;; "tornado/platform/kqueue.py". This is the supported method:
6092 ;; (zero? (system* "python" "-m" "tornado.test")))))
6095 `(("python-certifi" ,python-certifi)))
6097 `(("python-backports-abc" ,python-backports-abc)))
6098 (home-page "http://www.tornadoweb.org/")
6099 (synopsis "Python web framework and asynchronous networking library")
6101 "Tornado is a Python web framework and asynchronous networking library,
6102 originally developed at FriendFeed. By using non-blocking network I/O,
6103 Tornado can scale to tens of thousands of open connections, making it ideal
6104 for long polling, WebSockets, and other applications that require a long-lived
6105 connection to each user.")
6106 (license license:asl2.0)
6107 (properties `((python2-variant . ,(delay python2-tornado))))))
6109 (define-public python2-tornado
6110 (let ((tornado (package-with-python2 (strip-python2-variant python-tornado))))
6111 (package (inherit tornado)
6113 `(("python2-backport-ssl-match-hostname"
6114 ,python2-backport-ssl-match-hostname)
6115 ("python2-singledispatch" ,python2-singledispatch)
6116 ,@(package-propagated-inputs tornado))))))
6118 ;; the python- version can be removed with python-3.5
6119 (define-public python-backports-abc
6121 (name "python-backports-abc")
6126 (uri (pypi-uri "backports_abc" version))
6129 "1pkv8d1zxj5f9i227dxbjczncbv7ks7ywnjwyxfjagm02i2yafq3"))))
6130 (build-system python-build-system)
6131 (home-page "https://github.com/cython/backports_abc")
6132 (synopsis "Backport of additions to the 'collections.abc' module")
6134 "Python-backports-abc provides a backport of additions to the
6135 'collections.abc' module in Python-3.5.")
6136 (license license:psfl)))
6138 (define-public python2-backports-abc
6139 (package-with-python2 python-backports-abc))
6141 (define-public python2-backports-shutil-get-terminal-size
6143 (name "python2-backports-shutil-get-terminal-size")
6148 (uri (pypi-uri "backports.shutil_get_terminal_size" version))
6151 "107cmn7g3jnbkp826zlj8rrj19fam301qvaqf0f3905f5217lgki"))))
6152 (build-system python-build-system)
6154 `(#:python ,python-2
6156 (modify-phases %standard-phases
6159 (zero? (system* "py.test" "-v")))))))
6161 `(("python2-pytest" ,python2-pytest)))
6162 (home-page "https://github.com/chrippa/backports.shutil_get_terminal_size")
6163 (synopsis "Backport of Python 3.3's @code{shutil.get_terminal_size}")
6165 "This package provides a backport of the @code{get_terminal_size
6166 function} from Python 3.3's @code{shutil}.
6167 Unlike the original version it is written in pure Python rather than C,
6168 so it might be a tiny bit slower.")
6169 (license license:expat)))
6171 (define-public python-waf
6177 (uri (string-append "https://waf.io/"
6178 "waf-" version ".tar.bz2"))
6181 "1sl3ipi2czds57rlzjnpdzqa0skx8asfvmh3qmibpvdwf15rpppg"))))
6182 (build-system python-build-system)
6185 (modify-phases %standard-phases
6188 (zero? (system* "python" "waf-light" "configure" "build"))))
6191 (zero? (system* "python" "waf" "--version"))))
6194 (copy-file "waf" %output))))))
6195 (home-page "http://waf.io/")
6196 (synopsis "Python-based build system")
6198 "Waf is a Python-based framework for configuring, compiling and installing
6200 (license license:bsd-3)))
6202 (define-public python2-waf
6203 (package-with-python2 python-waf))
6205 (define-public python-pyzmq
6207 (name "python-pyzmq")
6212 (uri (pypi-uri "pyzmq" version))
6214 (base32 "13fhwnlvsvxv72kfhqbpn6qi7msh8mc8377mpabv32skk2cjfnxx"))))
6215 (build-system python-build-system)
6218 (list (string-append "--zmq=" (assoc-ref %build-inputs "zeromq")))
6219 ;; FIXME: You must build pyzmq with 'python setup.py build_ext
6220 ;; --inplace' for 'python setup.py test' to work.
6223 `(("zeromq" ,zeromq)))
6225 `(("pkg-config" ,pkg-config)
6226 ("python-nose" ,python-nose)))
6227 (home-page "http://github.com/zeromq/pyzmq")
6228 (synopsis "Python bindings for 0MQ")
6230 "PyZMQ is the official Python binding for the ZeroMQ messaging library.")
6231 (license license:bsd-4)))
6233 (define-public python2-pyzmq
6234 (package-with-python2 python-pyzmq))
6236 (define-public python-pep8
6238 (name "python-pep8")
6243 (uri (pypi-uri "pep8" version))
6246 "002rkl4lsn6x2mxmf8ar00l0m8i3mzrc6pnzz77blyksmpsxa4x1"))))
6247 (build-system python-build-system)
6248 (home-page "http://pep8.readthedocs.org/")
6249 (synopsis "Python style guide checker")
6251 "This tools checks Python code against some of the style conventions in
6253 (license license:expat)))
6255 (define-public python2-pep8
6256 (package-with-python2 python-pep8))
6258 (define-public python-pyflakes
6260 (name "python-pyflakes")
6265 (uri (pypi-uri "pyflakes" version))
6268 "0qs2sgqszq7wcplis8509wk2ygqcrwzbs1ghfj3svvivq2j377pk"))))
6269 (build-system python-build-system)
6271 "https://github.com/pyflakes/pyflakes")
6272 (synopsis "Passive checker of Python programs")
6274 "Pyflakes statically checks Python source code for common errors.")
6275 (license license:expat)))
6277 (define-public python2-pyflakes
6278 (package-with-python2 python-pyflakes))
6280 (define-public python-mccabe
6282 (name "python-mccabe")
6287 (uri (pypi-uri "mccabe" version))
6290 "0yr08a36h8lqlif10l4xcikbbig7q8f41gqywir7rrvnv3mi4aws"))))
6291 (build-system python-build-system)
6293 `(("python-pytest" ,python-pytest)
6294 ("python-pytest-runner" ,python-pytest-runner)))
6295 (home-page "https://github.com/flintwork/mccabe")
6296 (synopsis "McCabe checker, plugin for flake8")
6298 "This package provides a Flake8 plug-in to compute the McCabe cyclomatic
6299 complexity of Python source code.")
6300 (license license:expat)))
6302 (define-public python2-mccabe
6303 (package-with-python2 python-mccabe))
6305 (define-public python-mccabe-0.2.1
6306 (package (inherit python-mccabe)
6311 (uri (pypi-uri "mccabe" version))
6314 "0fi4a81kr5bcv5p4xgibqr595hyj5dafkqgsmfk96mfy8w71fajs"))))))
6316 (define-public python2-mccabe-0.2.1
6317 (package-with-python2 python-mccabe-0.2.1))
6319 ;; Flake8 2.4.1 requires an older version of pep8.
6320 ;; This should be removed ASAP.
6321 (define-public python-pep8-1.5.7
6322 (package (inherit python-pep8)
6328 "https://pypi.python.org/packages/source/p/pep8/pep8-"
6333 "12b9bbdbwnspxgak14xg58c130x2n0blxzlms5jn2dszn8qj3d0m"))))
6335 ;; XXX Tests not compatible with Python 3.5.
6338 (define-public python2-pep8-1.5.7
6339 (package-with-python2 python-pep8-1.5.7))
6341 ;; Flake8 2.4.1 requires an older version of pyflakes.
6342 ;; This should be removed ASAP.
6343 (define-public python-pyflakes-0.8.1
6344 (package (inherit python-pyflakes)
6350 "https://pypi.python.org/packages/source/p/pyflakes/pyflakes-"
6355 "0sbpq6pqm1i9wqi41mlfrsc5rk92jv4mskvlyxmnhlbdnc80ma1z"))))
6357 ;; XXX Tests not compatible with Python 3.5.
6360 (define-public python2-pyflakes-0.8.1
6361 (package-with-python2 python-pyflakes-0.8.1))
6363 (define-public python-flake8
6365 (name "python-flake8")
6370 (uri (pypi-uri "flake8" version))
6373 "0bs9cz4fr99r2rwig1b8jwaadl1nan7kgpdzqwj0bwbckwbmh7nc"))
6374 (modules '((guix build utils)))
6377 ;; Remove pre-compiled .pyc files from source.
6378 (for-each delete-file-recursively
6379 (find-files "." "__pycache__" #:directories? #t))
6380 (for-each delete-file (find-files "." "\\.pyc$"))
6382 (build-system python-build-system)
6384 `(("python-pep8" ,python-pep8)
6385 ("python-pyflakes" ,python-pyflakes)
6386 ("python-mccabe" ,python-mccabe)))
6388 `(("python-mock" ,python-mock) ; TODO: only required for < 3.3
6389 ("python-nose" ,python-nose)))
6390 (home-page "https://gitlab.com/pycqa/flake8")
6392 "The modular source code checker: pep8, pyflakes and co")
6394 "Flake8 is a wrapper around PyFlakes, pep8 and python-mccabe.")
6395 (license license:expat)))
6397 (define-public python2-flake8
6398 (package-with-python2 python-flake8))
6400 ;; This will only be needed by the python-hacking package and will not be
6401 ;; necessary once python-hacking > 0.10.2 is released.
6402 (define-public python-flake8-2.2.4
6403 (package (inherit python-flake8)
6405 `(("python-pep8" ,python-pep8-1.5.7)
6406 ("python-pyflakes" ,python-pyflakes-0.8.1)
6407 ("python-mccabe" ,python-mccabe-0.2.1)))
6409 `(("python-mock" ,python-mock)
6410 ("python-nose" ,python-nose)))
6415 (uri (pypi-uri "flake8" version))
6418 "1r9wsry4va45h1rck5hxd3vzsg2q3y6lnl6pym1bxvz8ry19jwx8"))
6419 (modules '((guix build utils)))
6422 ;; Remove pre-compiled .pyc files from source.
6423 (for-each delete-file-recursively
6424 (find-files "." "__pycache__" #:directories? #t))
6425 (for-each delete-file (find-files "." "\\.pyc$"))
6428 ;; XXX Fails with Python 3.5.
6431 (define-public python2-flake8-2.2.4
6432 (package-with-python2 python-flake8-2.2.4))
6434 (define-public python-flake8-polyfill
6436 (name "python-flake8-polyfill")
6441 (uri (pypi-uri "flake8-polyfill" version))
6444 "02gn2wxvh9vnf7m7dld7ca4l60mg5c370hv3swwppkngwaqmcw67"))))
6445 (build-system python-build-system)
6448 (modify-phases %standard-phases
6451 (setenv "PYTHONPATH"
6452 (string-append (getcwd) "/build/lib:"
6453 (getenv "PYTHONPATH")))
6454 (zero? (system* "py.test" "-v")))))))
6456 `(("python-flake8" ,python-flake8)
6457 ("python-mock" ,python-mock)
6458 ("python-pycodestyle" ,python-pycodestyle)
6459 ("python-pytest" ,python-pytest)))
6460 (home-page "https://gitlab.com/pycqa/flake8-polyfill")
6461 (synopsis "Polyfill package for Flake8 plugins")
6463 "This package that provides some compatibility helpers for Flake8
6464 plugins that intend to support Flake8 2.x and 3.x simultaneously.")
6465 (license license:expat)))
6467 (define-public python2-flake8-polyfill
6468 (package-with-python2 python-flake8-polyfill))
6470 (define-public python-mistune
6472 (name "python-mistune")
6477 (uri (pypi-uri "mistune" version))
6480 "04xpk1zvslhq3xpnf01g3ag0dy9wfv4z28p093r8k49vvxlyil11"))))
6481 (build-system python-build-system)
6483 `(("python-nose" ,python-nose)
6484 ("python-cython" ,python-cython)))
6485 (home-page "https://github.com/lepture/mistune")
6486 (synopsis "Markdown parser in pure Python")
6487 (description "This package provides a fast markdown parser in pure
6489 (license license:bsd-3)))
6491 (define-public python2-mistune
6492 (package-with-python2 python-mistune))
6494 (define-public python-markdown
6496 (name "python-markdown")
6501 (uri (pypi-uri "Markdown" version))
6504 "1h055llfd0ps0ig7qb3v1j9068xv90dc9s7xkhkgz9zg8r4g5sys"))))
6505 (build-system python-build-system)
6508 (modify-phases %standard-phases
6511 (zero? (system* "python" "run-tests.py")))))))
6513 `(("python-nose" ,python-nose)
6514 ("python-pyyaml" ,python-pyyaml)))
6515 (home-page "https://pythonhosted.org/Markdown/")
6516 (synopsis "Python implementation of Markdown")
6518 "This package provides a Python implementation of John Gruber's
6519 Markdown. The library features international input, various Markdown
6520 extensions, and several HTML output formats. A command line wrapper
6521 markdown_py is also provided to convert Markdown files to HTML.")
6522 (license license:bsd-3)))
6524 (define-public python2-markdown
6525 (package-with-python2 python-markdown))
6527 (define-public python-ptyprocess
6529 (name "python-ptyprocess")
6535 "https://pypi.python.org/packages/source/p/ptyprocess/ptyprocess-"
6539 "0nggns5kikn32yyda2zrj1xdmh49pi3v0drggcdwljbv36r8zdyw"))))
6540 (build-system python-build-system)
6542 `(("python-nose" ,python-nose)))
6545 (modify-phases %standard-phases
6548 (zero? (system* "nosetests")))))))
6549 (home-page "https://github.com/pexpect/ptyprocess")
6550 (synopsis "Run a subprocess in a pseudo terminal")
6552 "This package provides a Python library used to launch a subprocess in a
6553 pseudo terminal (pty), and interact with both the process and its pty.")
6554 (license license:isc)))
6556 (define-public python2-ptyprocess
6557 (package-with-python2 python-ptyprocess))
6559 (define-public python-cram
6561 (name "python-cram")
6563 (home-page "https://bitheap.org/cram/")
6566 (uri (list (string-append home-page "cram-"
6568 (pypi-uri "cram" version)))
6571 "0bvz6fwdi55rkrz3f50zsy35gvvwhlppki2yml5bj5ffy9d499vx"))))
6574 (modify-phases %standard-phases
6575 (add-after 'unpack 'patch-source
6577 (substitute* (find-files "cram" ".*\\.py$")
6578 ;; Replace default shell path.
6579 (("/bin/sh") (which "sh")))
6580 (substitute* (find-files "tests" ".*\\.t$")
6582 (("/bin/bash") (which "bash"))
6583 (("/bin/sh") (which "sh")))
6584 (substitute* "cram/_test.py"
6585 ;; This hack works around a bug triggered by substituting
6586 ;; the /bin/sh paths. "tests/usage.t" compares the output of
6587 ;; "cram -h", which breaks the output at 80 characters. This
6588 ;; causes the line showing the default shell to break into two
6589 ;; lines, but the test expects a single line...
6590 (("env\\['COLUMNS'\\] = '80'")
6591 "env['COLUMNS'] = '160'"))
6594 (add-after 'install 'check
6595 ;; The test phase uses the built library and executable.
6596 ;; It's easier to run it after install since the build
6597 ;; directory contains version-specific PATH.
6598 (lambda* (#:key inputs outputs #:allow-other-keys)
6599 (add-installed-pythonpath inputs outputs)
6600 (setenv "PATH" (string-append (getenv "PATH") ":"
6601 (assoc-ref outputs "out") "/bin"))
6602 (zero? (system* "make" "test")))))))
6603 (build-system python-build-system)
6605 `(("python-coverage" ,python-coverage)
6607 (synopsis "Simple testing framework for command line applications")
6609 "Cram is a functional testing framework for command line applications.
6610 Cram tests look like snippets of interactive shell sessions. Cram runs each
6611 command and compares the command output in the test with the command’s actual
6613 (license license:gpl2+)))
6615 (define-public python2-cram
6616 (package-with-python2 python-cram))
6618 (define-public python-terminado
6620 (name "python-terminado")
6625 (uri (pypi-uri "terminado" version))
6628 "09h1kwi86g5mrk14s4pgbhshd602zry29lnpxamcqz864kva22rc"))))
6629 (build-system python-build-system)
6631 `(("python-tornado" ,python-tornado)
6632 ("python-ptyprocess" ,python-ptyprocess)))
6634 `(("python-nose" ,python-nose)))
6637 (modify-phases %standard-phases
6640 (zero? (system* "nosetests")))))))
6641 (home-page "https://github.com/takluyver/terminado")
6642 (synopsis "Terminals served to term.js using Tornado websockets")
6643 (description "This package provides a Tornado websocket backend for the
6644 term.js Javascript terminal emulator library.")
6645 (license license:bsd-2)
6646 (properties `((python2-variant . ,(delay python2-terminado))))))
6648 (define-public python2-terminado
6649 (let ((terminado (package-with-python2 (strip-python2-variant python-terminado))))
6650 (package (inherit terminado)
6652 `(("python2-backport-ssl-match-hostname"
6653 ,python2-backport-ssl-match-hostname)
6654 ,@(package-propagated-inputs terminado))))))
6656 (define-public python-straight-plugin
6658 (name "python-straight-plugin")
6663 (uri (pypi-uri "straight.plugin" version))
6666 "069pjll4383p4kkgvcc40hgyvf79j2wdbpgwz77yigzxksh1gj62"))))
6667 (build-system python-build-system)
6668 (home-page "https://github.com/ironfroggy/straight.plugin")
6669 (synopsis "Simple namespaced plugin facility")
6670 (description "Straight Plugin provides a type of plugin you can create from
6671 almost any existing Python modules, and an easy way for outside developers to
6672 add functionality and customization to your projects with their own plugins.")
6673 (license license:expat)))
6675 (define-public python2-straight-plugin
6676 (package-with-python2 python-straight-plugin))
6678 (define-public python-fonttools
6680 (name "python-fonttools")
6685 "https://pypi.python.org/packages/source/F/FontTools/"
6686 "fonttools-" version ".tar.gz"))
6689 "08ay3x4ijarwhl60gqx2i9jzq6pxs20p4snc2d1q5jagh4rn39lb"))))
6690 (build-system python-build-system)
6692 '(#:test-target "check"
6694 (modify-phases %standard-phases
6695 (add-after 'unpack 'patch-setuppy
6696 ;; Remove the undocumented "extra_path" argument, which adds an
6697 ;; intervening directories between site-packages and the package
6700 (substitute* "setup.py"
6701 (("^[ \t]*extra_path *= *'FontTools',") ""))
6703 (home-page "http://github.com/behdad/fonttools")
6704 (synopsis "Tools to manipulate font files")
6706 "FontTools/TTX is a library to manipulate font files from Python. It
6707 supports reading and writing of TrueType/OpenType fonts, reading and writing
6708 of AFM files, reading (and partially writing) of PS Type 1 fonts. The package
6709 also contains a tool called “TTX” which converts TrueType/OpenType fonts to and
6710 from an XML-based format.")
6711 (license (license:non-copyleft
6712 "file://LICENSE.txt"
6713 "See LICENSE.txt in the distribution."))))
6715 (define-public python2-fonttools
6716 (package-with-python2 python-fonttools))
6718 (define-public python-ly
6725 (uri (string-append "https://pypi.python.org/packages/57/4f/"
6726 "889579244947368f28eda66b782331b1e75f83fd72e63f9ece93cd7a18f9"
6727 "/python-ly-" version ".tar.gz"))
6730 "0g6n288l83sfwavxh1aryi0aqvsr3sp7v6f903mckwqa4scpky62"))))
6731 (build-system python-build-system)
6733 ;; FIXME: Some tests need network access.
6735 (synopsis "Tool and library for manipulating LilyPond files")
6736 (description "This package provides a Python library to parse, manipulate
6737 or create documents in LilyPond format. A command line program ly is also
6738 provided that can be used to do various manipulations with LilyPond files.")
6739 (home-page "https://pypi.python.org/pypi/python-ly")
6740 (license license:gpl2+)))
6742 (define-public python-appdirs
6744 (name "python-appdirs")
6750 "https://pypi.python.org/packages/source/a/appdirs/appdirs-"
6755 "1iddva7v3fq0aqzsahkazxr7vpw28mqcrsy818z4wyiqnkplbhlg"))))
6756 (build-system python-build-system)
6757 (home-page "http://github.com/ActiveState/appdirs")
6759 "Determine platform-specific dirs, e.g. a \"user data dir\"")
6761 "This module provides a portable way of finding out where user data
6762 should be stored on various operating systems.")
6763 (license license:expat)))
6765 (define-public python2-appdirs
6766 (package-with-python2 python-appdirs))
6768 (define-public python-llfuse
6770 (name "python-llfuse")
6775 "https://bitbucket.org/nikratio/python-llfuse/downloads/"
6776 "llfuse-" version ".tar.bz2"))
6779 "0v6vj9mb286njgd1szg9hz2qdh5f3vkhsvajripfcqg458av310v"))))
6780 (build-system python-build-system)
6785 `(("pkg-config" ,pkg-config)))
6786 (synopsis "Python bindings for FUSE")
6788 "Python-LLFUSE is a set of Python bindings for the low level FUSE API.")
6789 (home-page "https://bitbucket.org/nikratio/python-llfuse/")
6790 (license license:lgpl2.0+)
6791 (properties `((python2-variant . ,(delay python2-llfuse))))))
6793 (define-public python2-llfuse
6794 (package (inherit (package-with-python2
6795 (strip-python2-variant python-llfuse)))
6796 (propagated-inputs `(("python2-contextlib2" ,python2-contextlib2)))))
6799 (define-public python-llfuse-0.41
6800 (package (inherit python-llfuse)
6805 "https://bitbucket.org/nikratio/python-llfuse/downloads/"
6806 "llfuse-" version ".tar.bz2"))
6809 "1imlqw9b73086y97izr036f58pgc5akv4ihc2rrf8j5h75jbrlaa"))))
6810 ;; Python-LLFUSE < 0.42 includes underscore.js, which is MIT (expat)
6811 ;; licensed. The rest of the package is licensed under LGPL2.0 or later.
6812 (license (list license:expat license:lgpl2.0+))))
6814 (define-public python-msgpack
6816 (name "python-msgpack")
6820 (uri (pypi-uri "msgpack-python" version))
6823 "11pqk5braa6wndpnr1dhg64js82vjgxnm0lzy73rwl831zgijaqs"))))
6824 (build-system python-build-system)
6825 (synopsis "MessagePack (de)serializer")
6826 (description "MessagePack is a fast, compact binary serialization format,
6827 suitable for similar data to JSON. This package provides CPython bindings for
6828 reading and writing MessagePack data.")
6829 (home-page "https://pypi.python.org/pypi/msgpack-python/")
6830 (license license:asl2.0)))
6832 (define-public python2-msgpack
6833 (package-with-python2 python-msgpack))
6835 (define-public python-netaddr
6837 (name "python-netaddr")
6843 "https://pypi.python.org/packages/source/n/netaddr/netaddr-"
6848 "06dxjlbcicq7q3vqy8agq11ra01kvvd47j4mk6dmghjsyzyckxd1"))))
6849 (build-system python-build-system)
6850 (arguments `(#:tests? #f)) ;; No tests.
6851 (home-page "https://github.com/drkjam/netaddr/")
6852 (synopsis "Pythonic manipulation of network addresses")
6854 "A Python library for representing and manipulating IPv4, IPv6, CIDR, EUI
6855 and MAC network addresses.")
6856 (license license:bsd-3)))
6858 (define-public python2-netaddr
6859 (package-with-python2 python-netaddr))
6861 (define-public python-wrapt
6863 (name "python-wrapt")
6869 "https://pypi.python.org/packages/source/w/wrapt/wrapt-"
6874 "0cq8rlpzkxzk48b50yrfhzn1d1hrq4gjcdqlrgq4v5palgiv9jwr"))))
6875 (build-system python-build-system)
6877 ;; Tests are not included in the tarball, they are only available in the
6880 (home-page "https://github.com/GrahamDumpleton/wrapt")
6881 (synopsis "Module for decorators, wrappers and monkey patching")
6883 "The aim of the wrapt module is to provide a transparent object proxy for
6884 Python, which can be used as the basis for the construction of function
6885 wrappers and decorator functions.")
6886 (license license:bsd-2)))
6888 (define-public python2-wrapt
6889 (package-with-python2 python-wrapt))
6891 (define-public python-iso8601
6893 (name "python-iso8601")
6898 (uri (pypi-uri "iso8601" version))
6901 "0c7gh3lsdjds262h0v1sqc66l7hqgfwbakn96qrhdbl0i3vm5yz8"))))
6902 (build-system python-build-system)
6904 `(("python-pytest" ,python-pytest)))
6905 (home-page "https://bitbucket.org/micktwomey/pyiso8601")
6906 (synopsis "Module to parse ISO 8601 dates")
6908 "This module parses the most common forms of ISO 8601 date strings (e.g.
6909 @code{2007-01-14T20:34:22+00:00}) into @code{datetime} objects.")
6910 (license license:expat)))
6912 (define-public python2-iso8601
6913 (package-with-python2 python-iso8601))
6915 (define-public python-monotonic
6917 (name "python-monotonic")
6923 "https://pypi.python.org/packages/source/m/monotonic/monotonic-"
6928 "0yz0bcbwx8r2c01czzfpbrxddynxyk9k95jj8h6sgcb7xmfvl998"))))
6929 (build-system python-build-system)
6930 (home-page "https://github.com/atdt/monotonic")
6931 (synopsis "Implementation of time.monotonic() for Python 2 & < 3.3")
6933 "This module provides a monotonic() function which returns the value (in
6934 fractional seconds) of a clock which never goes backwards.")
6935 (license license:asl2.0)))
6937 (define-public python2-monotonic
6938 (package-with-python2 python-monotonic))
6940 (define-public python-webob
6942 (name "python-webob")
6947 (uri (pypi-uri "WebOb" version))
6950 "02bhhzijfhv8hmi1i54d4b0v43liwhnywhflvxsv4x3zax9s3afq"))))
6951 (build-system python-build-system)
6953 `(("python-nose" ,python-nose)))
6954 (home-page "http://webob.org/")
6955 (synopsis "WSGI request and response object")
6957 "WebOb provides wrappers around the WSGI request environment, and an
6958 object to help create WSGI responses.")
6959 (license license:expat)))
6961 (define-public python2-webob
6962 (package-with-python2 python-webob))
6964 (define-public python-xlrd
6966 (name "python-xlrd")
6970 (uri (pypi-uri "xlrd" version))
6973 "0s8hjiz01vbhy85xalrz0qlsmd9ypf36zjqrf97hh984spapvy0g"))))
6974 (build-system python-build-system)
6977 (modify-phases %standard-phases
6978 ;; Current test in setup.py does not work as of 1.0.0, so use nose to
6979 ;; run tests instead for now.
6980 (replace 'check (lambda _ (zero? (system* "nosetests")))))))
6981 (native-inputs `(("python-nose" ,python-nose)))
6982 (home-page "http://www.python-excel.org/")
6983 (synopsis "Library for extracting data from Excel files")
6984 (description "This packages provides a library to extract data from
6985 spreadsheets using Microsoft Excel proprietary file formats @samp{.xls} and
6986 @samp{.xlsx} (versions 2.0 onwards). It has support for Excel dates and is
6987 Unicode-aware. It is not intended as an end-user tool.")
6988 (license license:bsd-3)))
6990 (define-public python2-xlrd
6991 (package-with-python2 python-xlrd))
6993 (define-public python-prettytable
6995 (name "python-prettytable")
7001 "https://pypi.python.org/packages/source/P/PrettyTable/"
7002 "prettytable-" version ".tar.bz2"))
7005 "0diwsicwmiq2cpzpxri7cyl5fmsvicafw6nfqf6p6p322dji2g45"))))
7006 (build-system python-build-system)
7007 (home-page "http://code.google.com/p/prettytable/")
7008 (synopsis "Display tabular data in an ASCII table format")
7010 "A library designed to represent tabular data in visually appealing ASCII
7011 tables. PrettyTable allows for selection of which columns are to be printed,
7012 independent alignment of columns (left or right justified or centred) and
7013 printing of sub-tables by specifying a row range.")
7014 (license license:bsd-3)))
7016 (define-public python2-prettytable
7017 (package-with-python2 python-prettytable))
7019 (define-public python-tables
7021 (name "python-tables")
7026 (uri (pypi-uri "tables" version))
7029 "117s6w7s3yxafpmf3zz3svana7xfrsviw01va1xp7h8ylx8v6r1m"))
7030 (modules '((guix build utils)))
7033 ;; Remove pre-compiled .pyc files from source.
7034 (for-each delete-file-recursively
7035 (find-files "." "__pycache__" #:directories? #t))
7036 (for-each delete-file (find-files "." "\\.pyc$"))
7038 (build-system python-build-system)
7040 `(;; FIXME: python-build-system does not pass configure-flags to "build"
7041 ;; or "check", so we must override the build and check phases.
7043 (modify-phases %standard-phases
7044 (add-after 'unpack 'use-gcc
7046 (substitute* "setup.py"
7047 (("compiler = new_compiler\\(\\)" line)
7049 "\ncompiler.set_executables(compiler='gcc',"
7050 "compiler_so='gcc',"
7052 "linker_so='gcc -shared')")))
7055 (lambda* (#:key inputs #:allow-other-keys)
7056 (zero? (system* "python" "setup.py" "build"
7057 (string-append "--hdf5="
7058 (assoc-ref inputs "hdf5"))))))
7060 (lambda* (#:key inputs #:allow-other-keys)
7061 (zero? (system* "python" "setup.py" "check"
7062 (string-append "--hdf5="
7063 (assoc-ref inputs "hdf5")))))))))
7065 `(("python-numexpr" ,python-numexpr)
7066 ("python-numpy" ,python-numpy)))
7068 `(("python-cython" ,python-cython)
7069 ("pkg-config" ,pkg-config)))
7074 (home-page "http://www.pytables.org/")
7075 (synopsis "Hierarchical datasets for Python")
7076 (description "PyTables is a package for managing hierarchical datasets and
7077 designed to efficently cope with extremely large amounts of data.")
7078 (license license:bsd-3)))
7080 (define-public python2-tables
7081 (package-with-python2 python-tables))
7083 (define-public python-pyasn1
7085 (name "python-pyasn1")
7090 (uri (pypi-uri "pyasn1" version))
7093 "0zraxni14bqi20kr4bi6nwsh32aibz0fq0xaczfisw0zdpcsqg45"))))
7094 (build-system python-build-system)
7095 (home-page "http://pyasn1.sourceforge.net/")
7096 (synopsis "ASN.1 types and codecs")
7098 "This is an implementation of ASN.1 types and codecs in Python. It is
7099 suitable for a wide range of protocols based on the ASN.1 specification.")
7100 (license license:bsd-2)))
7102 (define-public python2-pyasn1
7103 (package-with-python2 python-pyasn1))
7105 (define-public python-pyasn1-modules
7107 (name "python-pyasn1-modules")
7112 (uri (pypi-uri "pyasn1-modules" version))
7115 "0drqgw81xd3fxdlg89kgd79zzrabvfncvkbybi2wr6w2y4s1jmhh"))))
7116 (build-system python-build-system)
7118 `(("python-pyasn1" ,python-pyasn1)))
7119 (home-page "https://sourceforge.net/projects/pyasn1/")
7120 (synopsis "ASN.1 codec implementations")
7122 "Pyasn1-modules is a collection of Python modules providing ASN.1 types and
7123 implementations of ASN.1-based codecs and protocols.")
7124 (license license:bsd-3)))
7126 (define-public python2-pyasn1-modules
7127 (package-with-python2 python-pyasn1-modules))
7129 (define-public python-ipaddress
7131 (name "python-ipaddress")
7135 (uri (pypi-uri "ipaddress" version))
7138 "1c3imabdrw8nfksgjjflzg7h4ynjckqacb188rf541m74arq4cas"))))
7139 (build-system python-build-system)
7140 (home-page "https://github.com/phihag/ipaddress")
7141 (synopsis "IP address manipulation library")
7143 "This package provides a fast, lightweight IPv4/IPv6 manipulation library
7144 in Python. This library is used to create, poke at, and manipulate IPv4 and
7145 IPv6 addresses and networks. This is a port of the Python 3.3 ipaddress
7146 module to older versions of Python.")
7147 (license license:psfl)))
7149 (define-public python2-ipaddress
7150 (package-with-python2 python-ipaddress))
7152 (define-public python2-ipaddr
7154 (name "python2-ipaddr")
7159 (uri (pypi-uri "ipaddr" version))
7161 (base32 "1dwq3ngsapjc93fw61rp17fvzggmab5x1drjzvd4y4q0i255nm8v"))))
7162 (build-system python-build-system)
7164 `(#:python ,python-2 ;version 2 only
7166 (modify-phases %standard-phases
7169 (zero? (system* "python" "ipaddr_test.py")))))))
7170 (home-page "https://github.com/google/ipaddr-py")
7171 (synopsis "IP address manipulation library")
7173 "Ipaddr is a Python@tie{}2 library for creating and manupilating IPv4 and
7174 IPv6 addresses and networks.
7176 For new implementations you may prefer to use the standard module
7177 @code{ipaddress}, which was introduced in Python 3.3 and backported to older
7178 versions of Python.")
7179 (license license:asl2.0)))
7181 (define-public python-idna
7183 (name "python-idna")
7188 (uri (string-append "https://pypi.python.org/packages/source/i/"
7189 "idna/idna-" version ".tar.gz"))
7192 "0frxgmgi234lr9hylg62j69j4ik5zhg0wz05w5dhyacbjfnrl68n"))))
7193 (build-system python-build-system)
7194 (home-page "https://github.com/kjd/idna")
7195 (synopsis "Internationalized domain names in applications")
7197 "This is a library to support the Internationalised Domain Names in
7198 Applications (IDNA) protocol as specified in RFC 5891. This version of the
7199 protocol is often referred to as “IDNA2008” and can produce different results
7200 from the earlier standard from 2003. The library is also intended to act as a
7201 suitable drop-in replacement for the “encodings.idna” module that comes with
7202 the Python standard library but currently only supports the older 2003
7204 (license license:bsd-4)))
7206 (define-public python2-idna
7207 (package-with-python2 python-idna))
7209 (define-public python-pretend
7211 (name "python-pretend")
7216 (uri (string-append "https://pypi.python.org/packages/source/p/"
7217 "pretend/pretend-" version ".tar.gz"))
7220 "0r5r7ygz9m6d2bklflbl84cqhjkc2q12xgis8268ygjh30g2q3wk"))))
7221 (build-system python-build-system)
7222 (home-page "https://github.com/alex/pretend")
7223 (synopsis "Library for stubbing in Python")
7225 "Pretend is a library to make stubbing with Python easier. Stubbing is a
7226 technique for writing tests. You may hear the term mixed up with mocks,
7227 fakes, or doubles. Basically, a stub is an object that returns pre-canned
7228 responses, rather than doing any computation.")
7229 (license license:bsd-3)))
7231 (define-public python2-pretend
7232 (package-with-python2 python-pretend))
7234 (define-public python-cryptography-vectors
7236 (name "python-cryptography-vectors")
7241 (uri (pypi-uri "cryptography_vectors" version))
7244 "1x2mz4wggja5ih45c6cw0kzyad4jr8avg327dawjr1gnpdq1psa7"))))
7245 (build-system python-build-system)
7246 (home-page "https://github.com/pyca/cryptography")
7247 (synopsis "Test vectors for the cryptography package")
7249 "This package contains test vectors for the cryptography package.")
7250 ;; Distributed under either BSD-3 or ASL2.0
7251 (license (list license:bsd-3 license:asl2.0))))
7253 (define-public python2-cryptography-vectors
7254 (package-with-python2 python-cryptography-vectors))
7256 (define-public python-cryptography
7258 (name "python-cryptography")
7263 (uri (pypi-uri "cryptography" version))
7266 "0k6v7wq4h0yk9r0x0bl2x9fyrg4a6gj5qp4m9mgpk6m481yyygwm"))))
7267 (build-system python-build-system)
7269 `(("openssl" ,openssl)))
7271 `(("python-cffi" ,python-cffi)
7272 ("python-six" ,python-six)
7273 ("python-pyasn1" ,python-pyasn1)
7274 ("python-idna" ,python-idna)
7275 ("python-iso8601" ,python-iso8601)))
7277 `(("python-cryptography-vectors" ,python-cryptography-vectors)
7278 ("python-hypothesis" ,python-hypothesis)
7279 ("python-pretend" ,python-pretend)
7280 ("python-pyasn1" ,python-pyasn1)
7281 ("python-pyasn1-modules" ,python-pyasn1-modules)
7282 ("python-pytz" ,python-pytz)
7283 ("python-pytest" ,python-pytest-2.9.2)))
7284 (home-page "https://github.com/pyca/cryptography")
7285 (synopsis "Cryptographic recipes and primitives for Python")
7287 "cryptography is a package which provides cryptographic recipes and
7288 primitives to Python developers. It aims to be the “cryptographic standard
7289 library” for Python. The package includes both high level recipes, and low
7290 level interfaces to common cryptographic algorithms such as symmetric ciphers,
7291 message digests and key derivation functions.")
7292 ;; Distributed under either BSD-3 or ASL2.0
7293 (license (list license:bsd-3 license:asl2.0))
7294 (properties `((python2-variant . ,(delay python2-cryptography))))))
7296 (define-public python2-cryptography
7297 (let ((crypto (package-with-python2
7298 (strip-python2-variant python-cryptography))))
7299 (package (inherit crypto)
7301 `(("python2-ipaddress" ,python2-ipaddress)
7302 ("python2-backport-ssl-match-hostname"
7303 ,python2-backport-ssl-match-hostname)
7304 ("python2-enum34" ,python2-enum34)
7305 ,@(package-propagated-inputs crypto))))))
7307 (define-public python-pyopenssl
7309 (name "python-pyopenssl")
7314 (uri (pypi-uri "pyOpenSSL" version))
7317 "0vji4yrfshs15xpczbhzhasnjrwcarsqg87n98ixnyafnyxs6ybp"))
7319 (search-patches "python-pyopenssl-skip-network-test.patch"))))
7320 (build-system python-build-system)
7323 (modify-phases %standard-phases
7325 (add-after 'install 'check
7326 (lambda* (#:key inputs outputs #:allow-other-keys)
7327 (add-installed-pythonpath inputs outputs)
7328 (zero? (system* "py.test" "-v")))))))
7330 `(("python-cryptography" ,python-cryptography)
7331 ("python-six" ,python-six)))
7333 `(("openssl" ,openssl)))
7335 `(("python-pytest" ,python-pytest)))
7336 (home-page "https://github.com/pyca/pyopenssl")
7337 (synopsis "Python wrapper module around the OpenSSL library")
7339 "PyOpenSSL is a high-level wrapper around a subset of the OpenSSL
7341 (license license:asl2.0)))
7343 (define-public python2-pyopenssl
7344 (package-with-python2 python-pyopenssl))
7346 (define-public python-pip
7353 (uri (pypi-uri "pip" version))
7356 "03clr9c1dih5n9c00c592zzvf6r1ffimywkaq9agcqdllzhl7wh9"))))
7357 (build-system python-build-system)
7359 '(#:tests? #f)) ; there are no tests in the pypi archive.
7360 (home-page "https://pip.pypa.io/")
7361 (synopsis "Package manager for Python software")
7363 "Pip is a package manager for Python software, that finds packages on the
7364 Python Package Index (PyPI).")
7365 (license license:expat)))
7367 (define-public python2-pip
7368 (package-with-python2 python-pip))
7370 (define-public python-tlsh
7372 (name "python-tlsh")
7374 (home-page "https://github.com/trendmicro/tlsh")
7377 (uri (string-append "https://github.com/trendmicro/tlsh/archive/v"
7381 "00bhzjqrlh7v538kbkbn8lgx976j1138al3sdhklaizqjvpwyk4r"))
7382 (file-name (string-append name "-" version ".tar.gz"))))
7383 (build-system cmake-build-system)
7385 '(#:out-of-source? #f
7386 #:phases (modify-phases %standard-phases
7389 (lambda* (#:key outputs #:allow-other-keys)
7390 ;; Build and install the Python bindings. The underlying
7391 ;; C++ library is apparently not meant to be installed.
7392 (let ((out (assoc-ref outputs "out")))
7393 (with-directory-excursion "py_ext"
7394 (and (system* "python" "setup.py" "build")
7395 (system* "python" "setup.py" "install"
7396 (string-append "--prefix=" out))))))))))
7397 (inputs `(("python" ,python-wrapper))) ;for the bindings
7398 (synopsis "Fuzzy matching library for Python")
7400 "Trend Micro Locality Sensitive Hash (TLSH) is a fuzzy matching library.
7401 Given a byte stream with a minimum length of 256 bytes, TLSH generates a hash
7402 value which can be used for similarity comparisons. Similar objects have
7403 similar hash values, which allows for the detection of similar objects by
7404 comparing their hash values. The byte stream should have a sufficient amount
7405 of complexity; for example, a byte stream of identical bytes will not generate
7407 (license license:asl2.0)))
7409 (define-public python2-tlsh
7411 (inherit python-tlsh)
7412 (name "python2-tlsh")
7413 (inputs `(("python" ,python-2)))))
7415 (define-public python-termcolor
7417 (name "python-termcolor")
7422 (uri (pypi-uri "python-termcolor" version))
7425 "0fv1vq14rpqwgazxg4981904lfyp84mnammw7y046491cv76jv8x"))))
7426 (build-system python-build-system)
7428 ;; There are no tests.
7430 (home-page "http://pypi.python.org/pypi/termcolor")
7431 (synopsis "ANSII Color formatting for terminal output")
7433 "This package provides ANSII Color formatting for output in terminals.")
7434 (license license:expat)))
7436 (define-public python2-termcolor
7437 (package-with-python2 python-termcolor))
7439 (define-public python-libarchive-c
7441 (name "python-libarchive-c")
7445 (uri (pypi-uri "libarchive-c" version))
7448 "0z4r7v3dhd6b3120mav05ff08srih176r2rg5k8kn7mjd9pslm2x"))))
7449 (build-system python-build-system)
7451 '(#:phases (modify-phases %standard-phases
7453 'build 'reference-libarchive
7454 (lambda* (#:key inputs #:allow-other-keys)
7455 ;; Retain the absolute file name of libarchive.so.
7456 (let ((libarchive (assoc-ref inputs "libarchive")))
7457 (substitute* "libarchive/ffi.py"
7458 (("find_library\\('archive'\\)")
7459 (string-append "'" libarchive
7460 "/lib/libarchive.so'")))))))))
7462 `(("libarchive" ,libarchive)))
7463 (home-page "https://github.com/Changaco/python-libarchive-c")
7464 (synopsis "Python interface to libarchive")
7466 "This package provides Python bindings to libarchive, a C library to
7467 access possibly compressed archives in many different formats. It uses
7468 Python's @code{ctypes} foreign function interface (FFI).")
7469 (license license:lgpl2.0+)))
7471 (define-public python2-libarchive-c
7472 (package-with-python2 python-libarchive-c))
7474 (define-public python-file
7477 (name "python-file")
7479 (inherit (package-source file))
7480 ;; This patch should not be applied to python2-file.
7481 (patches (search-patches "python-file-double-encoding-bug.patch"))))
7482 (build-system python-build-system)
7484 '(#:tests? #f ;no tests
7485 #:configure-flags '("--single-version-externally-managed" "--root=/")
7486 #:phases (modify-phases %standard-phases
7487 (add-before 'build 'change-directory
7491 (add-before 'build 'set-library-file-name
7492 (lambda* (#:key inputs #:allow-other-keys)
7493 (let ((file (assoc-ref inputs "file")))
7494 (substitute* "magic.py"
7495 (("find_library\\('magic'\\)")
7496 (string-append "'" file "/lib/libmagic.so'")))
7498 (inputs `(("file" ,file)))
7499 (self-native-input? #f)
7500 (synopsis "Python bindings to the libmagic file type guesser. Note that
7501 this module and the python-magic module both provide a \"magic.py\" file;
7502 these two modules, which are different and were developed separately, both
7503 serve the same purpose: provide Python bindings for libmagic.")))
7505 (define-public python2-file
7506 (package-with-python2 python-file))
7508 (define-public python-debian
7510 (name "python-debian")
7515 (uri (pypi-uri name version))
7518 "0i15f0xzx679sd0ldq2sls9pnnps9fv6vhqvnv9dzf4qhma42i0y"))))
7519 (build-system python-build-system)
7521 `(("python-six" ,python-six)))
7522 (home-page "http://packages.debian.org/sid/python-debian")
7523 (synopsis "Debian package related modules")
7525 ;; XXX: Use @enumerate instead of @itemize to work around
7526 ;; <http://bugs.gnu.org/21772>.
7527 "This package provides Python modules that abstract many formats of
7528 Debian-related files, such as:
7531 @item Debtags information;
7532 @item @file{debian/changelog} files;
7533 @item packages files, pdiffs;
7534 @item control files of single or multiple RFC822-style paragraphs---e.g.
7535 @file{debian/control}, @file{.changes}, @file{.dsc};
7536 @item Raw @file{.deb} and @file{.ar} files, with (read-only) access to
7537 contained files and meta-information.
7540 ;; Modules are either GPLv2+ or GPLv3+.
7541 (license license:gpl3+)))
7543 (define-public python2-debian
7544 (package-with-python2 python-debian))
7546 (define-public python-nbformat
7548 (name "python-nbformat")
7553 (uri (pypi-uri "nbformat" version))
7556 "0mq8iki3d4mnx7wy05phss7x98mds4fqydin8lcagidp1knw1xnv"))))
7557 (build-system python-build-system)
7558 (arguments `(#:tests? #f)) ; no test target
7560 `(("python-ipython-genutils" ,python-ipython-genutils)
7561 ("python-jsonschema" ,python-jsonschema)
7562 ("python-jupyter-core" ,python-jupyter-core)
7563 ("python-traitlets" ,python-traitlets)))
7564 (home-page "http://jupyter.org")
7565 (synopsis "Jupyter Notebook format")
7566 (description "This package provides the reference implementation of the
7567 Jupyter Notebook format and Python APIs for working with notebooks.")
7568 (license license:bsd-3)))
7570 (define-public python2-nbformat
7571 (package-with-python2 python-nbformat))
7573 (define-public python-bleach
7575 (name "python-bleach")
7580 (uri (pypi-uri "bleach" version))
7583 "0jvg3jxrvnx7xmm9gj262v60ib452xlnwlb0navyp7jsvcd0d4qj"))))
7584 (build-system python-build-system)
7586 `(("python-html5lib" ,python-html5lib-0.9)
7587 ("python-six" ,python-six)))
7589 `(("python-nose" ,python-nose)))
7590 (home-page "http://github.com/jsocol/bleach")
7591 (synopsis "Whitelist-based HTML-sanitizing tool")
7592 (description "Bleach is an easy whitelist-based HTML-sanitizing tool.")
7593 (license license:asl2.0)))
7595 (define-public python2-bleach
7596 (package-with-python2 python-bleach))
7598 (define-public python-entrypoints
7600 (name "python-entrypoints")
7605 (uri (string-append "https://github.com/takluyver/entrypoints/archive/"
7607 (file-name (string-append name "-" version ".tar.gz"))
7610 "0azqlkh3j0za080lsf5crnhaxx3c93k9dpv5ihkhf5cppgw5sjz5"))))
7611 (build-system python-build-system)
7612 ;; The package does not come with a setup.py file, so we have to generate
7617 (modify-phases %standard-phases
7618 (add-after 'unpack 'create-setup.py
7620 (call-with-output-file "setup.py"
7623 from setuptools import setup
7624 setup(name='entrypoints', version='~a', py_modules=['entrypoints'])
7626 (home-page "https://github.com/takluyver/entrypoints")
7627 (synopsis "Discover and load entry points from installed Python packages")
7628 (description "Entry points are a way for Python packages to advertise
7629 objects with some common interface. The most common examples are
7630 @code{console_scripts} entry points, which define shell commands by
7631 identifying a Python function to run. The @code{entrypoints} module contains
7632 functions to find and load entry points.")
7633 (license license:expat)))
7635 (define-public python2-entrypoints
7636 (package-with-python2 python-entrypoints))
7638 (define-public python-nbconvert
7640 (name "python-nbconvert")
7645 (uri (pypi-uri "nbconvert" version))
7648 "0brclbb18l4nmd5qy3dl9wn05rjdh1fz4rmzdlfqacj12rcdvdgp"))))
7649 (build-system python-build-system)
7651 `(;; The "bdist_egg" target is disabled by default, causing the installation
7653 #:configure-flags (list "bdist_egg")
7654 ;; FIXME: 5 failures, 40 errors.
7657 ;; (modify-phases %standard-phases
7660 ;; (zero? (system* "py.test" "-v")))))
7662 `(("python-pytest" ,python-pytest)))
7664 `(("python-bleach" ,python-bleach)
7665 ("python-entrypoints" ,python-entrypoints)
7666 ("python-jinja2" ,python-jinja2)
7667 ("python-jupyter-core" ,python-jupyter-core)
7668 ("python-mistune" ,python-mistune)
7669 ("python-nbformat" ,python-nbformat)
7670 ("python-pygments" ,python-pygments)
7671 ("python-traitlets" ,python-traitlets)))
7672 (home-page "http://jupyter.org")
7673 (synopsis "Converting Jupyter Notebooks")
7674 (description "The @code{nbconvert} tool, @{jupyter nbconvert}, converts
7675 notebooks to various other formats via Jinja templates. It allows you to
7676 convert an @code{.ipynb} notebook file into various static formats including:
7684 @item ReStructured Text (rst)
7685 @item executable script
7687 (license license:bsd-3)))
7689 (define-public python2-nbconvert
7690 (package-with-python2 python-nbconvert))
7692 (define-public python-notebook
7694 (name "python-notebook")
7698 (uri (pypi-uri "notebook" version))
7701 "0laq5c2f21frq6xcdckgq7raqhznbjb0qs0357g612z87wyn1a9r"))))
7702 (build-system python-build-system)
7705 (modify-phases %standard-phases
7708 ;; HOME must be set for tests
7709 (setenv "HOME" "/tmp")
7710 (zero? (system* "nosetests")))))))
7712 `(("python-jupyter-core" ,python-jupyter-core)
7713 ("python-nbformat" ,python-nbformat)
7714 ("python-nbconvert" ,python-nbconvert)
7715 ("python-ipython" ,python-ipython)))
7717 `(("python-nose" ,python-nose)
7718 ("python-sphinx" ,python-sphinx)
7719 ("python-requests" ,python-requests)))
7720 (home-page "http://jupyter.org/")
7721 (synopsis "Web-based notebook environment for interactive computing")
7723 "The Jupyter HTML notebook is a web-based notebook environment for
7724 interactive computing.")
7725 (properties `((python2-variant . ,(delay python2-notebook))))
7726 (license license:bsd-3)))
7728 (define-public python2-notebook
7729 (let ((base (package-with-python2
7730 (strip-python2-variant python-notebook))))
7731 (package (inherit base)
7733 `(("python2-mock" ,python2-mock)
7734 ,@(package-native-inputs base)))
7736 (substitute-keyword-arguments (package-arguments base)
7738 `(modify-phases ,phases
7739 (add-before 'check 'disable-test-case
7740 ;; The test requires network access to localhost. Curiously it
7741 ;; fails with Python 2 only. Simply make the test-case return
7745 "notebook/services/nbconvert/tests/test_nbconvert_api.py"
7746 (("formats = self.nbconvert_api") "return #")))))))))))
7748 (define-public python-widgetsnbextension
7750 (name "python-widgetsnbextension")
7755 (uri (pypi-uri "widgetsnbextension" version))
7758 "0lff2mrwrgsa1mxmwx3phl9xvy0jqfpg6khbmxy53jbq56rwy666"))))
7759 (build-system python-build-system)
7761 `(("python-notebook" ,python-notebook)))
7763 `(("python-certifi" ,python-certifi)
7764 ("python-nose" ,python-nose)))
7765 (home-page "http://ipython.org")
7766 (synopsis "IPython HTML widgets for Jupyter")
7767 (description "This package provides interactive HTML widgets for Jupyter
7769 (license license:bsd-3)))
7771 (define-public python2-widgetsnbextension
7772 (package-with-python2 python-widgetsnbextension))
7774 (define-public python-ipywidgets
7776 (name "python-ipywidgets")
7781 (uri (pypi-uri "ipywidgets" version))
7784 "1lk0qrr5l9a0z7qkkn30hv5832whxwxymf1l576fmmad0n7hkxms"))))
7785 (build-system python-build-system)
7786 ;; FIXME: it's not clear how to run the tests.
7787 (arguments `(#:tests? #f))
7789 `(("python-ipykernel" ,python-ipykernel)
7790 ("python-ipython" ,python-ipython)
7791 ("python-traitlets" ,python-traitlets)
7792 ("python-widgetsnbextension" ,python-widgetsnbextension)))
7793 (home-page "http://ipython.org")
7794 (synopsis "IPython HTML widgets for Jupyter")
7795 (description "Ipywidgets are interactive HTML widgets for Jupyter
7796 notebooks and the IPython kernel. Notebooks come alive when interactive
7797 widgets are used. Users gain control of their data and can visualize changes
7799 (license license:bsd-3)))
7801 (define-public python2-ipywidgets
7802 (package-with-python2 python-ipywidgets))
7804 (define-public python-jupyter-console
7806 (name "python-jupyter-console")
7811 (uri (pypi-uri "jupyter_console" version))
7814 "04acmkwsi99rcg3vb54c6n492zv35s92h2ahabc0w6wj976cipvx"))))
7815 (build-system python-build-system)
7816 ;; FIXME: it's not clear how to run the tests.
7817 (arguments `(#:tests? #f))
7819 `(("python-ipykernel" ,python-ipykernel)
7820 ("python-ipython" ,python-ipython)
7821 ("python-jupyter-client" ,python-jupyter-client)
7822 ("python-prompt-toolkit" ,python-prompt-toolkit)
7823 ("python-pygments" ,python-pygments)))
7824 (home-page "https://jupyter.org")
7825 (synopsis "Jupyter terminal console")
7826 (description "This package provides a terminal-based console frontend for
7827 Jupyter kernels. It also allows for console-based interaction with non-Python
7828 Jupyter kernels such as IJulia and IRKernel.")
7829 (license license:bsd-3)))
7831 (define-public python2-jupyter-console
7832 (package-with-python2 python-jupyter-console))
7834 (define-public jupyter
7841 (uri (pypi-uri "jupyter" version))
7844 "0pwf3pminkzyzgx5kcplvvbvwrrzd3baa7lmh96f647k30rlpp6r"))))
7845 (build-system python-build-system)
7846 ;; FIXME: it's not clear how to run the tests.
7847 (arguments `(#:tests? #f))
7849 `(("python-ipykernel" ,python-ipykernel)
7850 ("python-ipywidgets" ,python-ipywidgets)
7851 ("python-jupyter-console" ,python-jupyter-console)
7852 ("python-nbconvert" ,python-nbconvert)
7853 ("python-notebook" ,python-notebook)))
7854 (home-page "http://jupyter.org")
7855 (synopsis "Web application for interactive documents")
7857 "The Jupyter Notebook is a web application that allows you to create and
7858 share documents that contain live code, equations, visualizations and
7859 explanatory text. Uses include: data cleaning and transformation, numerical
7860 simulation, statistical modeling, machine learning and much more.")
7861 (license license:bsd-3)))
7863 (define-public python-chardet
7865 (name "python-chardet")
7871 "https://pypi.python.org/packages/source/c/chardet/chardet-"
7876 "1ak87ikcw34fivcgiz2xvi938dmclh078az65l9x3rmgljrkhgp5"))))
7877 (build-system python-build-system)
7878 (home-page "https://github.com/chardet/chardet")
7879 (synopsis "Universal encoding detector for Python 2 and 3")
7881 "This package provides @code{chardet}, a Python module that can
7882 automatically detect a wide range of file encodings.")
7883 (license license:lgpl2.1+)))
7885 (define-public python2-chardet
7886 (package-with-python2 python-chardet))
7888 (define-public python-docopt
7890 (name "python-docopt")
7895 ;; The release on PyPI does not include tests.
7897 "https://github.com/docopt/docopt/archive/"
7899 (file-name (string-append name "-" version ".tar.gz"))
7902 "16bf890xbdz3m30rsv2qacklh2rdn1zrfspfnwzx9g7vwz8yw4r1"))))
7903 (build-system python-build-system)
7905 `(("python-pytest" ,python-pytest)))
7907 `(#:phases (alist-replace
7909 (lambda _ (zero? (system* "py.test")))
7911 (home-page "http://docopt.org")
7912 (synopsis "Command-line interface description language for Python")
7913 (description "This library allows the user to define a command-line
7914 interface from a program's help message rather than specifying it
7915 programatically with command-line parsers like @code{getopt} and
7917 (license license:expat)))
7919 (define-public python2-docopt
7920 (package-with-python2 python-docopt))
7922 (define-public python-zope-event
7924 (name "python-zope-event")
7929 (uri (string-append "https://pypi.python.org/packages/source/z"
7930 "/zope.event/zope.event-" version ".tar.gz"))
7933 "11p75zpfz3ffhz21nzx9wb23xs993ck5s6hkjcvhswwizni5jynw"))))
7934 (build-system python-build-system)
7935 (home-page "http://pypi.python.org/pypi/zope.event")
7936 (synopsis "Event publishing system for Python")
7937 (description "Zope.event provides an event publishing API, intended for
7938 use by applications which are unaware of any subscribers to their events. It
7939 is a simple event-dispatching system on which more sophisticated event
7940 dispatching systems can be built.")
7941 (license license:zpl2.1)))
7943 (define-public python2-zope-event
7944 (package-with-python2 python-zope-event))
7946 (define-public python-zope-interface
7948 (name "python-zope-interface")
7953 (uri (string-append "https://pypi.python.org/packages/source/z"
7954 "/zope.interface/zope.interface-" version ".tar.gz"))
7957 "0ks8h73b2g4bkad821qbv0wzjppdrwys33i7ka45ik3wxjg1l8if"))))
7958 (build-system python-build-system)
7960 `(("python-zope-event" ,python-zope-event)))
7961 (home-page "https://github.com/zopefoundation/zope.interface")
7962 (synopsis "Python implementation of the \"design by contract\"
7964 (description "Zope.interface provides an implementation of \"object
7965 interfaces\" for Python. Interfaces are a mechanism for labeling objects as
7966 conforming to a given API or contract.")
7967 (license license:zpl2.1)))
7969 (define-public python2-zope-interface
7970 (package-with-python2 python-zope-interface))
7972 (define-public python-zope-exceptions
7974 (name "python-zope-exceptions")
7979 (uri (string-append "https://pypi.python.org/packages/source/z"
7980 "/zope.exceptions/zope.exceptions-"
7984 "0zwxaaa66sqxg5k7zcrvs0fbg9ym1njnxnr28dfmchzhwjvwnfzl"))))
7985 (build-system python-build-system)
7987 '(#:tests? #f)) ; circular dependency with zope.testrunner
7989 `(("python-zope-interface" ,python-zope-interface)))
7990 (home-page "http://cheeseshop.python.org/pypi/zope.exceptions")
7991 (synopsis "Zope exceptions")
7992 (description "Zope.exceptions provides general-purpose exception types
7993 that have uses outside of the Zope framework.")
7994 (license license:zpl2.1)))
7996 (define-public python2-zope-exceptions
7997 (package-with-python2 python-zope-exceptions))
7999 (define-public python-zope-testing
8001 (name "python-zope-testing")
8006 (uri (string-append "https://pypi.python.org/packages/source/z"
8007 "/zope.testing/zope.testing-" version ".tar.gz"))
8010 "1yvglxhzvhl45mndvn9gskx2ph30zz1bz7rrlyfs62fv2pvih90s"))
8011 (modules '((guix build utils)))
8014 ;; Remove pre-compiled .pyc files backup files from source.
8015 (for-each delete-file (find-files "." "(\\.pyc|~)$"))
8017 (build-system python-build-system)
8019 `(("python-zope-exceptions" ,python-zope-exceptions)))
8021 `(("python-zope-interface" ,python-zope-interface)))
8022 (home-page "http://pypi.python.org/pypi/zope.testing")
8023 (synopsis "Zope testing helpers")
8024 (description "Zope.testing provides a number of testing utilities for HTML
8025 forms, HTTP servers, regular expressions, and more.")
8026 (license license:zpl2.1)))
8028 (define-public python2-zope-testing
8029 (package-with-python2 python-zope-testing))
8031 (define-public python-zope-testrunner
8033 (name "python-zope-testrunner")
8038 (uri (string-append "https://pypi.python.org/packages/source/z"
8039 "/zope.testrunner/zope.testrunner-"
8043 "1r7iqknhh55y45f64mz5hghgvzx34h1i11k350s0avx6q8gznja1"))))
8044 (build-system python-build-system)
8046 '(#:tests? #f)) ; FIXME: Tests can't find zope.interface.
8048 `(("python-six" ,python-six)
8049 ;("python-zope-interface" ,python-zope-interface)
8050 ("python-zope-exceptions" ,python-zope-exceptions)
8051 ("python-zope-testing" ,python-zope-testing)
8054 `(("python-zope-interface" ,python-zope-interface)))
8055 (home-page "http://pypi.python.org/pypi/zope.testrunner")
8056 (synopsis "Zope testrunner script")
8057 (description "Zope.testrunner provides a script for running Python
8059 (license license:zpl2.1)))
8061 (define-public python2-zope-testrunner
8062 (let ((base (package-with-python2 python-zope-testrunner)))
8066 (append (package-native-inputs base)
8067 `(("python2-subunit" ,python2-subunit)
8068 ("python2-mimeparse" ,python2-mimeparse)))))))
8070 (define-public python-zope-i18nmessageid
8072 (name "python-zope-i18nmessageid")
8078 "https://pypi.python.org/packages/source/z"
8079 "/zope.i18nmessageid/zope.i18nmessageid-"
8083 "1rslyph0klk58dmjjy4j0jxy21k03azksixc3x2xhqbkv97cmzml"))))
8084 (build-system python-build-system)
8085 (home-page "http://pypi.python.org/pypi/zope.i18nmessageid")
8086 (synopsis "Message identifiers for internationalization")
8087 (description "Zope.i18nmessageid provides facilities for declaring
8088 internationalized messages within program source text.")
8089 (license license:zpl2.1)))
8091 (define-public python2-zope-i18nmessageid
8092 (package-with-python2 python-zope-i18nmessageid))
8094 (define-public python-zope-schema
8096 (name "python-zope-schema")
8101 (uri (string-append "https://pypi.python.org/packages/source/z"
8102 "/zope.schema/zope.schema-" version ".tar.gz"))
8105 "1p943jdxb587dh7php4vx04qvn7b2877hr4qs5zyckvp5afhhank"))))
8106 (build-system python-build-system)
8108 '(#:tests? #f)) ; FIXME: Tests can't find zope.event.
8110 `(("python-zope-event" ,python-zope-event)
8111 ("python-zope-exceptions", python-zope-exceptions)
8112 ("python-zope-interface" ,python-zope-interface)))
8114 `(("python-zope-testing" ,python-zope-testing)
8115 ("python-coverage" ,python-coverage)
8116 ("python-nose" ,python-nose)))
8117 (home-page "http://pypi.python.org/pypi/zope.schema")
8118 (synopsis "Zope data schemas")
8119 (description "Zope.scheme provides extensions to zope.interface for
8120 defining data schemas.")
8121 (license license:zpl2.1)))
8123 (define-public python2-zope-schema
8124 (package-with-python2 python-zope-schema))
8126 (define-public python-zope-configuration
8128 (name "python-zope-configuration")
8132 (uri (string-append "https://pypi.python.org/packages/source/z"
8133 "/zope.configuration/zope.configuration-"
8137 "1x9dfqypgympnlm25p9m43xh4qv3p7d75vksv9pzqibrb4cggw5n"))))
8138 (build-system python-build-system)
8140 '(#:tests? #f)) ; FIXME: Tests can't find zope.interface.
8142 `(("python-zope-i18nmessageid" ,python-zope-i18nmessageid)
8143 ("python-zope-schema" ,python-zope-schema)))
8144 (home-page "http://pypi.python.org/pypi/zope.configuration")
8145 (synopsis "Zope Configuration Markup Language")
8146 (description "Zope.configuration implements ZCML, the Zope Configuration
8148 (license license:zpl2.1)))
8150 (define-public python2-zope-configuration
8151 (package-with-python2 python-zope-configuration))
8153 (define-public python-zope-proxy
8155 (name "python-zope-proxy")
8160 (uri (string-append "https://pypi.python.org/packages/source/z"
8161 "/zope.proxy/zope.proxy-" version ".tar.gz"))
8164 "0pqwwmvm1prhwv1ziv9lp8iirz7xkwb6n2kyj36p2h0ppyyhjnm4"))))
8165 (build-system python-build-system)
8167 '(#:tests? #f)) ; FIXME: Tests can't find zope.interface.
8169 `(("python-zope-interface" ,python-zope-interface)))
8170 (home-page "http://pypi.python.org/pypi/zope.proxy")
8171 (synopsis "Generic, transparent proxies")
8172 (description "Zope.proxy provides generic, transparent proxies for Python.
8173 Proxies are special objects which serve as mostly-transparent wrappers around
8174 another object, intervening in the apparent behavior of the wrapped object
8175 only when necessary to apply the policy (e.g., access checking, location
8176 brokering, etc.) for which the proxy is responsible.")
8177 (license license:zpl2.1)))
8179 (define-public python2-zope-proxy
8180 (package-with-python2 python-zope-proxy))
8182 (define-public python-zope-location
8184 (name "python-zope-location")
8189 (uri (string-append "https://pypi.python.org/packages/source/z"
8190 "/zope.location/zope.location-" version ".tar.gz"))
8193 "1nj9da4ksiyv3h8n2vpzwd0pb03mdsh7zy87hfpx72b6p2zcwg74"))))
8194 (build-system python-build-system)
8196 '(#:tests? #f)) ; FIXME: Tests can't find zope.interface.
8198 `(("python-zope-proxy" ,python-zope-proxy)
8199 ("python-zope-schema" ,python-zope-schema)))
8200 (home-page "http://pypi.python.org/pypi/zope.location/")
8201 (synopsis "Zope location library")
8202 (description "Zope.location implements the concept of \"locations\" in
8203 Zope3, which are are special objects that have a structural location.")
8204 (license license:zpl2.1)))
8206 (define-public python2-zope-location
8207 (package-with-python2 python-zope-location))
8209 (define-public python-zope-security
8211 (name "python-zope-security")
8216 (uri (string-append "https://pypi.python.org/packages/source/z"
8217 "/zope.security/zope.security-" version ".tar.gz"))
8220 "14zmf684amc0x32kq05yxnhfqd1cmyhafkw05gn81rn90zjv6ssy"))))
8221 (build-system python-build-system)
8223 '(#:tests? #f)) ; FIXME: Tests can't find zope.testrunner.
8225 `(("python-zope-i18nmessageid" ,python-zope-i18nmessageid)
8226 ("python-zope-proxy" ,python-zope-proxy)
8227 ("python-zope-schema" ,python-zope-schema)))
8229 `(("python-six" ,python-six)
8230 ("python-zope-component" ,python-zope-component)
8231 ("python-zope-configuration" ,python-zope-configuration)
8232 ("python-zope-location" ,python-zope-location)
8233 ("python-zope-testrunner" ,python-zope-testrunner)
8234 ("python-zope-testing" ,python-zope-testing)))
8235 (home-page "http://pypi.python.org/pypi/zope.security")
8236 (synopsis "Zope security framework")
8237 (description "Zope.security provides a generic mechanism to implement
8238 security policies on Python objects.")
8239 (license license:zpl2.1)))
8241 (define-public python2-zope-security
8242 (let ((zope-security (package-with-python2 python-zope-security)))
8243 (package (inherit zope-security)
8245 `(("python2-zope-testrunner" ,python2-zope-testrunner)
8247 "python-zope-testrunner"
8248 (package-propagated-inputs zope-security)))))))
8250 (define-public python-zope-component
8252 (name "python-zope-component")
8257 (uri (string-append "https://pypi.python.org/packages/source/z"
8258 "/zope.component/zope.component-" version ".tar.gz"))
8261 "06pqr8m5jv12xjyy5b59hh9anl61cxkzhw9mka33r3nxalmi2b18"))))
8262 (build-system python-build-system)
8264 ;; Skip tests due to circular dependency with python-zope-security.
8267 `(("python-zope-testing" ,python-zope-testing)))
8269 `(("python-zope-event" ,python-zope-event)
8270 ("python-zope-interface" ,python-zope-interface)
8271 ("python-zope-i18nmessageid" ,python-zope-i18nmessageid)
8272 ("python-zope-configuration" ,python-zope-configuration)))
8273 (home-page "https://github.com/zopefoundation/zope.component")
8274 (synopsis "Zope Component Architecture")
8275 (description "Zope.component represents the core of the Zope Component
8276 Architecture. Together with the zope.interface package, it provides
8277 facilities for defining, registering and looking up components.")
8278 (license license:zpl2.1)))
8280 (define-public python2-zope-component
8281 (package-with-python2 python-zope-component))
8283 (define-public python-pythondialog
8285 (name "python-pythondialog")
8290 (uri (pypi-uri "pythondialog" version))
8293 "1728ghsran47jczn9bhlnkvk5bvqmmbihabgif5h705b84r1272c"))))
8294 (build-system python-build-system)
8297 (modify-phases %standard-phases
8298 (add-after 'unpack 'patch-path
8299 (lambda* (#:key inputs #:allow-other-keys)
8300 (let* ((dialog (assoc-ref inputs "dialog")))
8301 ;; Since this library really wants to grovel the search path, we
8302 ;; must hardcode dialog's store path into it.
8303 (substitute* "dialog.py"
8304 (("os.getenv\\(\"PATH\", \":/bin:/usr/bin\"\\)")
8305 (string-append "os.getenv(\"PATH\") + \":" dialog "/bin\"")))
8307 #:tests? #f)) ; no test suite
8309 `(("dialog" ,dialog)))
8310 (home-page "http://pythondialog.sourceforge.net/")
8311 (synopsis "Python interface to the UNIX dialog utility")
8312 (description "A Python wrapper for the dialog utility. Its purpose is to
8313 provide an easy to use, pythonic and comprehensive Python interface to dialog.
8314 This allows one to make simple text-mode user interfaces on Unix-like systems")
8315 (license license:lgpl2.1)
8316 (properties `((python2-variant . ,(delay python2-pythondialog))))))
8318 (define-public python2-pythondialog
8319 (let ((base (package-with-python2 (strip-python2-variant python-pythondialog))))
8322 (version (package-version python-pythondialog))
8325 (uri (pypi-uri "python2-pythondialog" version))
8328 "0d8k7lxk50imdyx85lv8j98i4c93a71iwpapnl1506rpkbm9qvd9")))))))
8330 (define-public python-pyrfc3339
8332 (name "python-pyrfc3339")
8337 (uri (pypi-uri "pyRFC3339" version))
8340 "0dgm4l9y8jiax5cp6yxjd2i27cq8h33sh81n1wfbmnmqb32cdywd"))))
8341 (build-system python-build-system)
8343 `(("python-pytz" ,python-pytz)))
8345 `(("python-nose" ,python-nose)))
8346 (home-page "https://github.com/kurtraschke/pyRFC3339")
8347 (synopsis "Python timestamp library")
8348 (description "Python library for generating and parsing RFC 3339-compliant
8350 (license license:expat)))
8352 (define-public python2-pyrfc3339
8353 (package-with-python2 python-pyrfc3339))
8355 (define-public python-werkzeug
8357 (name "python-werkzeug")
8362 (uri (pypi-uri "Werkzeug" version))
8365 "1h5wycw8yj7q0grqsjnsqflmrlsdagvl2j4dsgdncci6mjc7fpa5"))))
8366 (build-system python-build-system)
8368 `(("python-pytest" ,python-pytest)))
8369 (home-page "http://werkzeug.pocoo.org/")
8370 (synopsis "Utilities for WSGI applications")
8371 (description "One of the most advanced WSGI utility modules. It includes a
8372 powerful debugger, full-featured request and response objects, HTTP utilities to
8373 handle entity tags, cache control headers, HTTP dates, cookie handling, file
8374 uploads, a powerful URL routing system and a bunch of community-contributed
8376 (license license:x11)))
8378 (define-public python2-werkzeug
8379 (package-with-python2 python-werkzeug))
8381 (define-public python-configobj
8383 (name "python-configobj")
8388 "https://pypi.python.org/packages/source/c/configobj/"
8389 "configobj-" version ".tar.gz"))
8392 "00h9rcmws03xvdlfni11yb60bz3kxfvsj6dg6nrpzj71f03nbxd2"))
8393 ;; Patch setup.py so it looks for python-setuptools, which is
8394 ;; required to parse the keyword 'install_requires' in setup.py.
8395 (patches (search-patches "python-configobj-setuptools.patch"))))
8396 (build-system python-build-system)
8398 `(("python-six" ,python-six)))
8399 (synopsis "Config file reading, writing and validation")
8400 (description "ConfigObj is a simple but powerful config file reader and
8401 writer: an ini file round tripper. Its main feature is that it is very easy to
8402 use, with a straightforward programmer’s interface and a simple syntax for
8404 (home-page "https://github.com/DiffSK/configobj")
8405 (license license:bsd-3)))
8407 (define-public python2-configobj
8408 (package-with-python2 python-configobj))
8410 (define-public python-configargparse
8412 (name "python-configargparse")
8417 "https://pypi.python.org/packages/source/C/ConfigArgParse/"
8418 "ConfigArgParse-" version ".tar.gz"))
8421 "19wh919gbdbzxzpagg52q3lm62yicm95ddlcx77dyjc1slyshl1v"))))
8422 (build-system python-build-system)
8424 ;; FIXME: Bug in test suite filed upstream:
8425 ;; https://github.com/bw2/ConfigArgParse/issues/32
8427 (synopsis "Replacement for argparse")
8428 (description "A drop-in replacement for argparse that allows options to also
8429 be set via config files and/or environment variables.")
8430 (home-page "https://github.com/bw2/ConfigArgParse")
8431 (license license:expat)))
8433 (define-public python2-configargparse
8434 (package-with-python2 python-configargparse))
8436 (define-public python-ndg-httpsclient
8438 (name "python-ndg-httpsclient")
8442 (uri (pypi-uri "ndg_httpsclient" version))
8445 "1b5qirv46v4dpnmfqviwq42mdwfcby4dxmz0i41wad2337pqf2aq"))))
8446 (build-system python-build-system)
8448 '(;; The tests appear to require networking.
8451 `(("python-pyopenssl" ,python-pyopenssl)))
8452 (synopsis "HTTPS support for Python's httplib and urllib2")
8453 (description "This is a HTTPS client implementation for httplib and urllib2
8454 based on PyOpenSSL. PyOpenSSL provides a more fully featured SSL implementation
8455 over the default provided with Python and importantly enables full verification
8457 (home-page "https://github.com/cedadev/ndg_httpsclient/")
8458 (license license:bsd-3)))
8460 ;; python2-openssl requires special care, so package-with-python2 is
8462 (define-public python2-ndg-httpsclient
8463 (package (inherit python-ndg-httpsclient)
8464 (name "python2-ndg-httpsclient")
8465 (arguments `(#:python ,python-2))
8467 `(("python2-pyopenssl" ,python2-pyopenssl)))))
8469 (define-public python-contextlib2
8471 (name "python-contextlib2")
8476 (uri (pypi-uri "contextlib2" version))
8479 "0cmp131dlh0d0zvw0aza1zd13glvngzk8lb4avks0hm7yxwdr9am"))))
8480 (build-system python-build-system)
8483 (modify-phases %standard-phases
8487 "python" "test_contextlib2.py" "-v")))))))
8488 (home-page "http://contextlib2.readthedocs.org/")
8489 (synopsis "Tools for decorators and context managers")
8490 (description "This module is primarily a backport of the Python
8491 3.2 contextlib to earlier Python versions. Like contextlib, it
8492 provides utilities for common tasks involving decorators and context
8493 managers. It also contains additional features that are not part of
8494 the standard library.")
8495 (license license:psfl)))
8497 (define-public python2-contextlib2
8498 (package-with-python2 python-contextlib2))
8500 (define-public python-texttable
8502 (name "python-texttable")
8507 (uri (pypi-uri "texttable" version))
8510 "0bkhs4dx9s6g7fpb969hygq56hyz4ncfamlynw72s0n6nqfbd1w5"))))
8511 (build-system python-build-system)
8512 (arguments '(#:tests? #f)) ; no tests
8513 (home-page "https://github.com/foutaise/texttable/")
8514 (synopsis "Python module for creating simple ASCII tables")
8515 (description "Texttable is a Python module for creating simple ASCII
8517 (license license:lgpl2.1+)))
8519 (define-public python2-texttable
8520 (package-with-python2 python-texttable))
8522 (define-public python-websocket-client
8524 (name "python-websocket-client")
8529 (uri (pypi-uri "websocket_client" version))
8532 "0h9glp1jll3z76ly3kg08aqgxqk0a68p4zi9yn50353bh5nj92v7"))))
8533 (build-system python-build-system)
8535 `(("python-six" ,python-six)))
8536 (home-page "https://github.com/liris/websocket-client")
8537 (synopsis "WebSocket client for Python")
8538 (description "The Websocket-client module provides the low level APIs for
8539 WebSocket usage in Python programs.")
8540 (license license:lgpl2.1+)))
8542 (define-public python2-websocket-client
8543 (package-with-python2 python-websocket-client))
8545 (define-public python-atomicwrites
8547 (name "python-atomicwrites")
8551 (uri (pypi-uri "atomicwrites" version))
8554 "1s01dci8arsl9d9vr5nz1fk9znldp1z3l4yl43f0c27z12b8yxl0"))))
8555 (build-system python-build-system)
8556 (synopsis "Atomic file writes in Python")
8557 (description "Library for atomic file writes using platform dependent tools
8558 for atomic file system operations.")
8559 (home-page "https://github.com/untitaker/python-atomicwrites")
8560 (license license:expat)))
8562 (define-public python2-atomicwrites
8563 (package-with-python2 python-atomicwrites))
8565 (define-public python-requests-toolbelt
8567 (name "python-requests-toolbelt")
8572 "https://pypi.python.org/packages/"
8573 "e1/a4/a94c037bc72ad70441aff1403d3243510d2542ddca7759faaeffeb11aefe/"
8574 "requests-toolbelt-" version ".tar.gz"))
8577 "15q9nrgp85nqlr4kdz1zvj8z2npafi2sr12y7fqgxbkq28j1aci6"))))
8578 (build-system python-build-system)
8580 `(("python-betamax" ,python-betamax)
8581 ("python-mock" ,python-mock)
8582 ("python-pytest" ,python-pytest)))
8584 `(("python-requests" ,python-requests)))
8585 (synopsis "Extensions to python-requests")
8586 (description "This is a toolbelt of useful classes and functions to be used
8587 with python-requests.")
8588 (home-page "https://github.com/sigmavirus24/requests-toolbelt")
8589 (license license:asl2.0)))
8591 (define-public python-click-threading
8593 (name "python-click-threading")
8598 "https://pypi.python.org/packages/"
8599 "fe/b7/e7f609d18a2a351cb71616adcf54df1acd82f83cb9b5936935a4d20e2c23/"
8600 "click-threading-" version ".tar.gz"))
8603 "18bcqikxwb3drb8rf60cclxkxw52521b38ax3byah6j8cn8y9p4j"))))
8604 (build-system python-build-system)
8606 `(("python-click" ,python-click)))
8607 (synopsis "Utilities for multithreading in Click")
8608 (description "This package provides utilities for multithreading in Click
8610 (home-page "https://github.com/click-contrib/click-threading")
8611 (license license:expat)))
8613 (define-public python-click-log
8615 (name "python-click-log")
8619 (uri (pypi-uri "click-log" version))
8622 "14ikfjfgnzf21mjniq9lfk2igzykgzfvwwrk85nw2b9fq44109sp"))))
8623 (build-system python-build-system)
8625 `(("python-click" ,python-click)))
8626 (synopsis "Logging for click applications")
8627 (description "This package provides a Python library for logging Click
8629 (home-page "https://github.com/click-contrib/click-log")
8630 (license license:expat)))
8632 (define-public python-apipkg
8634 (name "python-apipkg")
8638 (uri (pypi-uri "apipkg" version))
8641 "1iks5701qnp3dlr3q1d9qm68y2plp2m029irhpz92a44psfkjf1f"))))
8642 (build-system python-build-system)
8644 `(("python-pytest" ,python-pytest)))
8645 (synopsis "Namespace control and lazy-import mechanism")
8646 (description "With apipkg you can control the exported namespace of a Python
8647 package and greatly reduce the number of imports for your users. It is a small
8648 pure Python module that works on virtually all Python versions.")
8649 (home-page "https://bitbucket.org/hpk42/apipkg")
8650 (license license:expat)))
8652 (define-public python2-apipkg
8653 (package-with-python2 python-apipkg))
8655 (define-public python-execnet
8657 (name "python-execnet")
8661 (uri (pypi-uri "execnet" version))
8664 "1rpk1vyclhg911p3hql0m0nrpq7q7mysxnaaw6vs29cpa6kx8vgn"))))
8665 (build-system python-build-system)
8667 `(;; 2 failed, 275 passed, 670 skipped, 4 xfailed
8668 ;; The two test failures are caused by the lack of an `ssh` executable.
8669 ;; The test suite can be run with pytest after the 'install' phase.
8672 `(("python-pytest" ,python-pytest)
8673 ("python-setuptools-scm" ,python-setuptools-scm)))
8675 `(("python-apipkg" ,python-apipkg)))
8676 (synopsis "Rapid multi-Python deployment")
8677 (description "Execnet provides a share-nothing model with
8678 channel-send/receive communication for distributing execution across many
8679 Python interpreters across version, platform and network barriers. It has a
8680 minimal and fast API targetting the following uses:
8682 @item distribute tasks to (many) local or remote CPUs
8683 @item write and deploy hybrid multi-process applications
8684 @item write scripts to administer multiple environments
8686 (home-page "http://codespeak.net/execnet/")
8687 (license license:expat)))
8689 (define-public python2-execnet
8690 (package-with-python2 python-execnet))
8692 (define-public python-trollius-redis
8694 (name "python-trollius-redis")
8699 (uri (pypi-uri "trollius_redis" version))
8702 "0k3vypszmgmaipgw9xscvgm79h2zd6p6ci8gdp5sxl6g5kbqr9fy"))))
8703 (build-system python-build-system)
8704 ;; TODO: Tests require packaging 'hiredis'.
8705 (arguments '(#:tests? #f))
8706 (home-page "https://github.com/benjolitz/trollius-redis")
8707 (synopsis "Port of asyncio-redis to trollius")
8708 (description "@code{trollius-redis} is a Redis client for Python
8709 trollius. It is an asynchronious IO (PEP 3156) implementation of the
8711 (license license:bsd-2)))
8713 (define-public python2-trollius-redis
8714 (package-with-python2 python-trollius-redis))
8716 ;;; The software provided by this package was integrated into pytest 2.8.
8717 (define-public python-pytest-cache
8719 (name "python-pytest-cache")
8723 (uri (pypi-uri "pytest-cache" version))
8726 "1a873fihw4rhshc722j4h6j7g3nj7xpgsna9hhg3zn6ksknnhx5y"))))
8727 (build-system python-build-system)
8729 `(("python-apipkg" ,python-apipkg)
8730 ("python-execnet" ,python-execnet)
8731 ("python-py" ,python-py)
8732 ("python-pytest" ,python-pytest)))
8733 (synopsis "Py.test plugin with mechanisms for caching across test runs")
8734 (description "The pytest-cache plugin provides tools to rerun failures from
8735 the last py.test invocation.")
8736 (home-page "https://bitbucket.org/hpk42/pytest-cache/")
8737 (license license:expat)))
8739 (define-public python2-pytest-cache
8740 (package-with-python2 python-pytest-cache))
8742 (define-public python-pytest-localserver
8744 (name "python-pytest-localserver")
8748 (uri (pypi-uri "pytest-localserver" version))
8751 "0dvqspjr6va55zwmnnc2mmpqc7mm65kxig9ya44x1z8aadzxpa4p"))))
8752 (build-system python-build-system)
8754 `(#:phases (modify-phases %standard-phases
8757 (zero? (system* "py.test" "--genscript=runtests.py"))
8758 (zero? (system* "py.test")))))))
8760 `(("python-pytest" ,python-pytest)
8761 ("python-requests" ,python-requests)
8762 ("python-six" ,python-six)))
8764 `(("python-werkzeug" ,python-werkzeug)))
8765 (synopsis "Py.test plugin to test server connections locally")
8766 (description "Pytest-localserver is a plugin for the pytest testing
8767 framework which enables you to test server connections locally.")
8768 (home-page "https://pypi.python.org/pypi/pytest-localserver")
8769 (license license:expat)))
8771 (define-public python-wsgi-intercept
8773 (name "python-wsgi-intercept")
8778 "https://pypi.python.org/packages/"
8779 "38/76/ebcbc24d0cb77db34520a3ca6ed1bd43ace17d182bbd8dd7d976f1c176fb/"
8780 "wsgi_intercept-" version ".tar.gz"))
8783 "0kjj2v2dvmnpdd5h5gk9rzz0f54rhjb0yiz3zg65bmp65slfw65d"))))
8784 (build-system python-build-system)
8786 `(("python-six" ,python-six)))
8788 `(("python-pytest" ,python-pytest)
8789 ("python-httplib2" ,python-httplib2)
8790 ("python-requests" ,python-requests)
8791 ("python-urllib3" ,python-urllib3)))
8792 (synopsis "Puts a WSGI application in place of a real URI for testing")
8793 (description "Wsgi_intercept installs a WSGI application in place of a real
8794 URI for testing. Testing a WSGI application normally involves starting a
8795 server at a local host and port, then pointing your test code to that address.
8796 Instead, this library lets you intercept calls to any specific host/port
8797 combination and redirect them into a WSGI application importable by your test
8798 program. Thus, you can avoid spawning multiple processes or threads to test
8800 (home-page "https://github.com/cdent/wsgi-intercept")
8801 (license license:expat)))
8803 (define-public python-pytest-xprocess
8805 (name "python-pytest-xprocess")
8809 (uri (pypi-uri "pytest-xprocess" version))
8812 "17zlql1xqw3ywcgwwbqmw633aly99lab12hm02asr8awvg5603pp"))))
8813 (build-system python-build-system)
8815 `(("python-pytest" ,python-pytest)
8816 ("python-pytest-cache" ,python-pytest-cache)
8817 ("python-psutil" ,python-psutil)))
8818 (synopsis "Pytest plugin to manage external processes across test runs")
8819 (description "Pytest-xprocess is an experimental py.test plugin for managing
8820 processes across test runs.")
8821 (home-page "https://bitbucket.org/pytest-dev/pytest-xprocess")
8822 (license license:expat)))
8824 (define-public python-icalendar
8826 (name "python-icalendar")
8830 (uri (pypi-uri "icalendar" version))
8833 "086jslw8cg2hni79j267p1dy6d27m7q5hi39ni2clh9waqbdf5v3"))))
8834 (build-system python-build-system)
8836 `(("python-dateutil" ,python-dateutil)
8837 ("python-pytz" ,python-pytz)))
8838 (synopsis "Python library for parsing iCalendar files")
8839 (description "The icalendar package is a parser/generator of iCalendar
8840 files for use with Python.")
8841 (home-page "https://github.com/collective/icalendar")
8842 (license license:bsd-2)))
8844 (define-public python-sphinxcontrib-newsfeed
8846 (name "python-sphinxcontrib-newsfeed")
8850 (uri (pypi-uri "sphinxcontrib-newsfeed" version))
8853 "1d7gam3mn8v4in4p16yn3v10vps7nnaz6ilw99j4klij39dqd37p"))))
8854 (arguments '(#:tests? #f)) ; No tests.
8855 (build-system python-build-system)
8857 `(("python-sphinx" ,python-sphinx)))
8858 (synopsis "News Feed extension for Sphinx")
8859 (description "Sphinxcontrib-newsfeed is an extension for adding a simple
8860 Blog, News or Announcements section to a Sphinx website.")
8861 (home-page "https://bitbucket.org/prometheus/sphinxcontrib-newsfeed")
8862 (license license:bsd-2)))
8864 (define-public python-args
8866 (name "python-args")
8870 (uri (pypi-uri "args" version))
8873 "057qzi46h5dmxdqknsbrssn78lmqjlnm624iqdhrnpk26zcbi1d7"))))
8874 (build-system python-build-system)
8875 (home-page "https://github.com/kennethreitz/args")
8876 (synopsis "Command-line argument parser")
8878 "This library provides a Python module to parse command-line arguments.")
8879 (license license:bsd-3)))
8881 (define-public python2-args
8882 (package-with-python2 python-args))
8884 (define-public python-clint
8886 (name "python-clint")
8890 (uri (pypi-uri "clint" version))
8893 "1an5lkkqk1zha47198p42ji3m94xmzx1a03dn7866m87n4r4q8h5"))))
8894 (build-system python-build-system)
8897 (modify-phases %standard-phases
8900 (zero? (system* "py.test" "-v")))))))
8902 `(("python-pytest" ,python-pytest)))
8904 `(("python-args" ,python-args)))
8905 (home-page "https://github.com/kennethreitz/clint")
8906 (synopsis "Command-line interface tools")
8908 "Clint is a Python module filled with a set of tools for developing
8909 command-line applications, including tools for colored and indented
8910 output, progress bar display, and pipes.")
8911 (license license:isc)))
8913 (define-public python2-clint
8914 (package-with-python2 python-clint))
8916 (define-public python-astor
8918 (name "python-astor")
8922 (uri (pypi-uri "astor" version))
8925 "1fdafq5hkis1fxqlmhw0sn44zp2ar46nxhbc22cvwg7hsd8z5gsa"))))
8926 (build-system python-build-system)
8927 (home-page "https://github.com/berkerpeksag/astor")
8928 (synopsis "Read and write Python ASTs")
8930 "Astor is designed to allow easy manipulation of Python source via the
8931 Abstract Syntax Tree.")
8932 (license license:bsd-3)))
8934 (define-public python2-astor
8935 (package-with-python2 python-astor))
8937 (define-public python-rply
8939 (name "python-rply")
8943 (uri (pypi-uri "rply" version))
8946 "12rp1d9ba7nvd5rhaxi6xzx1rm67r1k1ylsrkzhpwnphqpb06cvj"))))
8947 (build-system python-build-system)
8949 `(("python-appdirs" ,python-appdirs)))
8950 (home-page "https://github.com/alex/rply")
8951 (synopsis "Parser generator for Python")
8953 "This package provides a pure Python based parser generator, that also
8954 works with RPython. It is a more-or-less direct port of David Bazzley's PLY,
8955 with a new public API, and RPython support.")
8956 (license license:bsd-3)))
8958 (define-public python2-rply
8959 (package-with-python2 python-rply))
8961 (define-public python-hy
8967 (uri (pypi-uri "hy" version))
8970 "1msqv747iz12r73mz4qvsmlwkddwjvrahlrk7ysrcz07h7dsscxs"))))
8971 (build-system python-build-system)
8974 (modify-phases %standard-phases
8977 ;; Tests require write access to HOME.
8978 (setenv "HOME" "/tmp")
8979 (zero? (system* "nosetests")))))))
8981 `(("python-coverage" ,python-coverage)
8982 ("python-nose" ,python-nose)))
8984 `(("python-astor" ,python-astor)
8985 ("python-clint" ,python-clint)
8986 ("python-rply" ,python-rply)))
8987 (home-page "http://hylang.org/")
8988 (synopsis "Lisp frontend to Python")
8990 "Hy is a dialect of Lisp that's embedded in Python. Since Hy transforms
8991 its Lisp code into the Python Abstract Syntax Tree, you have the whole world of
8992 Python at your fingertips, in Lisp form.")
8993 (license license:expat)))
8995 (define-public python2-hy
8996 (package-with-python2 python-hy))
8998 (define-public python-rauth
9000 (name "python-rauth")
9005 (uri (pypi-uri "rauth" version))
9008 "00pq7zw429hhza9c0qzxiqp77m653jv09z92nralnmzwdf6pzicf"))))
9009 (build-system python-build-system)
9011 `(#:test-target "check"))
9013 `(("python-requests" ,python-requests)))
9014 (home-page "https://github.com/litl/rauth")
9015 (synopsis "Python library for OAuth 1.0/a, 2.0, and Ofly")
9017 "Rauth is a Python library for OAuth 1.0/a, 2.0, and Ofly. It also
9018 provides service wrappers for convenient connection initialization and
9019 authenticated session objects providing things like keep-alive.")
9020 (license license:expat)
9021 (properties `((python2-variant . ,(delay python2-rauth))))))
9023 (define-public python2-rauth
9024 (let ((base (package-with-python2 (strip-python2-variant python-rauth))))
9027 (native-inputs `(("python2-unittest2" ,python2-unittest2)
9028 ,@(package-native-inputs base))))))
9030 (define-public python2-functools32
9032 (name "python2-functools32")
9037 (uri (pypi-uri "functools32" version))
9040 "0v8ya0b58x47wp216n1zamimv4iw57cxz3xxhzix52jkw3xks9gn"))))
9041 (build-system python-build-system)
9043 `(#:python ,python-2
9044 #:tests? #f)) ; no test target
9045 (home-page "https://github.com/MiCHiLU/python-functools32")
9047 "Backport of the functools module from Python 3.2.3")
9049 "This package is a backport of the @code{functools} module from Python
9050 3.2.3 for use with older versions of Python and PyPy.")
9051 (license license:expat)))
9053 (define-public python2-subprocess32
9055 (name "python2-subprocess32")
9059 (uri (pypi-uri "subprocess32" version))
9062 "14350dhhlhyz5gqzi3lihn9m6lvskx5mcb20srx1kgsk9i50li8y"))
9064 (search-patches "python2-subprocess32-disable-input-test.patch"))))
9065 (build-system python-build-system)
9067 `(#:python ,python-2
9069 (modify-phases %standard-phases
9070 (add-after 'unpack 'patch-/bin/sh
9072 (substitute* '("subprocess32.py"
9073 "test_subprocess32.py")
9074 (("/bin/sh") (which "sh")))
9077 (add-after 'install 'check
9078 (lambda* (#:key inputs outputs #:allow-other-keys)
9079 ;; For some reason this package fails to import
9080 ;; _posixsubprocess.so when PYTHONPATH is set to the build
9081 ;; directory. Running tests after install is easier.
9082 (add-installed-pythonpath inputs outputs)
9083 (zero? (system* "python" "test_subprocess32.py")))))))
9084 (home-page "https://github.com/google/python-subprocess32")
9085 (synopsis "Backport of the subprocess module from Python 3.2")
9087 "This is a backport of the @code{subprocess} standard library module
9088 from Python 3.2 and 3.3 for use on Python 2. It includes bugfixes and some
9089 new features. On POSIX systems it is guaranteed to be reliable when used
9090 in threaded applications. It includes timeout support from Python 3.3 but
9091 otherwise matches 3.2’s API.")
9092 (license license:psfl)))
9094 (define-public python2-futures
9096 (name "python2-futures")
9101 (uri (pypi-uri "futures" version))
9104 "1vcb34dqhzkhbq1957vdjszhhm5y3j9ba88dgwhqx2zynhmk9qig"))))
9105 (build-system python-build-system)
9106 (arguments `(#:python ,python-2))
9107 (home-page "https://github.com/agronholm/pythonfutures")
9109 "Backport of the concurrent.futures package from Python 3.2")
9111 "The concurrent.futures module provides a high-level interface for
9112 asynchronously executing callables. This package backports the
9113 concurrent.futures package from Python 3.2")
9114 (license license:bsd-3)))
9116 (define-public python-promise
9118 (name "python-promise")
9123 (uri (pypi-uri "promise" version))
9126 "1k19ms8l3d5jzjh557rgkxb5sg4mqgfc315rn4hx1z3n8qq6lr3h"))))
9127 (build-system python-build-system)
9128 ;; Tests wants python-futures, which is a python2 only program, and
9129 ;; can't be found by python-promise at test time.
9130 (arguments `(#:tests? #f))
9131 (home-page "https://github.com/syrusakbary/promise")
9132 (synopsis "Promises/A+ implementation for Python")
9134 "Promises/A+ implementation for Python")
9135 (properties `((python2-variant . ,(delay python2-promise))))
9136 (license license:expat)))
9138 (define-public python2-promise
9139 (let ((promise (package-with-python2
9140 (strip-python2-variant python-promise))))
9141 (package (inherit promise)
9142 (arguments (substitute-keyword-arguments (package-arguments promise)
9145 `(("python2-futures" ,python2-futures)
9146 ("python2-pytest" ,python2-pytest)
9147 ,@(package-native-inputs promise))))))
9149 (define-public python-urllib3
9151 (name "python-urllib3")
9156 (uri (pypi-uri "urllib3" version))
9159 "1wb8aqnq53vzh2amrv8kc66f3h6fx217y0q62y6n30a64p2yqmam"))))
9160 (build-system python-build-system)
9161 (arguments `(#:tests? #f))
9163 `(;; some packages for tests
9164 ("python-nose" ,python-nose)
9165 ("python-mock" ,python-mock)
9166 ("python-tornado" ,python-tornado)))
9168 `(;; extra packages for https security
9169 ("python-certifi" ,python-certifi)
9170 ("python-ndg-httpsclient" ,python-ndg-httpsclient)
9171 ("python-pyasn1" ,python-pyasn1)
9172 ("python-pyopenssl" ,python-pyopenssl)))
9173 (home-page "https://urllib3.readthedocs.org/")
9174 (synopsis "HTTP library with thread-safe connection pooling")
9176 "Urllib3 supports features left out of urllib and urllib2 libraries. It
9177 can reuse the same socket connection for multiple requests, it can POST files,
9178 supports url redirection and retries, and also gzip and deflate decoding.")
9179 (license license:expat)))
9181 (define-public python2-urllib3
9182 (package-with-python2 python-urllib3))
9184 (define-public python-colorama
9186 (name "python-colorama")
9191 (uri (pypi-uri "colorama" version))
9194 "0avqkn6362v7k2kg3afb35g4sfdvixjgy890clip4q174p9whhz0"))))
9195 (build-system python-build-system)
9196 (synopsis "Colored terminal text rendering for Python")
9197 (description "Colorama is a Python library for rendering colored terminal
9199 (home-page "https://pypi.python.org/pypi/colorama")
9200 (license license:bsd-3)))
9202 (define-public python2-colorama
9203 (package-with-python2 python-colorama))
9205 (define-public python-rsa
9212 (uri (pypi-uri "rsa" version))
9215 "1dcxvszbikgzh99ybdc7jq0zb9wspy2ds8z9mjsqiyv3q884xpr5"))))
9216 (build-system python-build-system)
9218 `(("python-pyasn1" ,python-pyasn1)))
9219 (synopsis "Pure-Python RSA implementation")
9220 (description "Python-RSA is a pure-Python RSA implementation. It supports
9221 encryption and decryption, signing and verifying signatures, and key
9222 generation according to PKCS#1 version 1.5. It can be used as a Python
9223 library as well as on the command line.")
9224 (home-page "http://stuvel.eu/rsa")
9225 (license license:asl2.0)))
9227 (define-public python2-rsa
9228 (package-with-python2 python-rsa))
9230 (define-public python-pluggy
9232 (name "python-pluggy")
9237 (uri (pypi-uri "pluggy" version))
9240 "18qfzfm40bgx672lkg8q9x5hdh76n7vax99aank7vh2nw21wg70m"))))
9241 (build-system python-build-system)
9242 (synopsis "Plugin and hook calling mechanism for Python")
9243 (description "Pluggy is an extraction of the plugin manager as used by
9244 Pytest but stripped of Pytest specific details.")
9245 (home-page "https://pypi.python.org/pypi/pluggy")
9246 (license license:expat)))
9248 (define-public python2-pluggy
9249 (package-with-python2 python-pluggy))
9251 (define-public python-tox
9258 (uri (pypi-uri "tox" version))
9261 "1vj73ar4rimq3fwy5r2z3jv4g9qbh8rmpmncsc00g0k310acqzxz"))))
9262 (build-system python-build-system)
9264 ;; FIXME: Tests require pytest-timeout, which itself requires
9265 ;; pytest>=2.8.0 for installation.
9268 `(("python-pluggy" ,python-pluggy) ; >=0.3.0,<0.4.0
9269 ("python-py" ,python-py)
9270 ("python-virtualenv" ,python-virtualenv)))
9272 `(; FIXME: Missing: ("python-pytest-timeout" ,python-pytest-timeout)
9273 ("python-pytest" ,python-pytest))) ; >= 2.3.5
9274 (home-page "http://tox.testrun.org/")
9275 (synopsis "Virtualenv-based automation of test activities")
9276 (description "Tox is a generic virtualenv management and test command line
9277 tool. It can be used to check that a package installs correctly with
9278 different Python versions and interpreters, or run tests in each type of
9279 supported environment, or act as a frontend to continuous integration
9281 (license license:expat)))
9283 (define-public python2-tox
9284 (package-with-python2 python-tox))
9286 (define-public python-jmespath
9288 (name "python-jmespath")
9293 (uri (pypi-uri "jmespath" version))
9296 "0g9xvl69y7nr3w7ag4fsp6sm4fqf6vrqjw7504x2hzrrsh3ampq8"))))
9297 (build-system python-build-system)
9299 `(("python-nose" ,python-nose)))
9300 (synopsis "JSON Matching Expressions")
9301 (description "JMESPath (pronounced “james path”) is a Python library that
9302 allows one to declaratively specify how to extract elements from a JSON
9304 (home-page "https://github.com/jmespath/jmespath.py")
9305 (license license:expat)))
9307 (define-public python2-jmespath
9308 (package-with-python2 python-jmespath))
9310 (define-public python-botocore
9312 (name "python-botocore")
9317 (uri (pypi-uri "botocore" version))
9320 "1hqvqwhgfcch4knm1l02ynx7qd1igxk3pj34c1x2b0r79jca524n"))))
9321 (build-system python-build-system)
9323 ;; FIXME: Many tests are failing.
9326 `(("python-dateutil" ,python-dateutil)
9327 ("python-docutils" ,python-docutils)
9328 ("python-jmespath" ,python-jmespath)))
9330 `(("python-mock" ,python-mock)
9331 ("python-nose" ,python-nose)
9333 ("python-tox" ,python-tox)
9334 ("python-wheel" ,python-wheel)))
9335 (home-page "https://github.com/boto/botocore")
9336 (synopsis "Low-level interface to AWS")
9337 (description "Botocore is a Python library that provides a low-level
9338 interface to the Amazon Web Services (AWS) API.")
9339 (license license:asl2.0)))
9341 (define-public python2-botocore
9342 (package-with-python2 python-botocore))
9344 (define-public awscli
9351 (uri (pypi-uri name version))
9354 "0p0pila0k99fm87q1gb24wyd34ags0vkh37h1fa6hklq4mi69i1w"))))
9355 (build-system python-build-system)
9357 `(("python-colorama" ,python-colorama)
9358 ("python-botocore" ,python-botocore)
9359 ("python-s3transfer" ,python-s3transfer)
9360 ("python-docutils" ,python-docutils)
9361 ("python-rsa" ,python-rsa)))
9363 ;; FIXME: The 'pypi' release does not contain tests.
9365 (home-page "https://aws.amazon.com/cli/")
9366 (synopsis "Command line client for AWS")
9367 (description "AWS CLI provides a unified command line interface to the
9368 Amazon Web Services (AWS) API.")
9369 (license license:asl2.0)))
9371 (define-public python-hypothesis
9373 (name "python-hypothesis")
9377 (uri (pypi-uri "hypothesis" version))
9380 "0qyqq9akm4vshhn8cngjc1qykcvsn7cz6dlm6njfsgpbraqrmbbw"))))
9381 (build-system python-build-system)
9383 `(("python-flake8" ,python-flake8)
9384 ("python-pytest" ,python-pytest)))
9385 (synopsis "Library for property based testing")
9386 (description "Hypothesis is a library for testing your Python code against a
9387 much larger range of examples than you would ever want to write by hand. It’s
9388 based on the Haskell library, Quickcheck, and is designed to integrate
9389 seamlessly into your existing Python unit testing work flow.")
9390 (home-page "https://github.com/DRMacIver/hypothesis")
9391 (license license:mpl2.0)
9392 (properties `((python2-variant . ,(delay python2-hypothesis))))))
9394 (define-public python2-hypothesis
9395 (let ((hypothesis (package-with-python2
9396 (strip-python2-variant python-hypothesis))))
9397 (package (inherit hypothesis)
9399 `(("python2-enum34" ,python2-enum34)
9400 ,@(package-native-inputs hypothesis))))))
9402 (define-public python-pytest-subtesthack
9404 (name "python-pytest-subtesthack")
9408 (uri (pypi-uri "pytest-subtesthack" version))
9411 "15kzcr5pchf3id4ikdvlv752rc0j4d912n589l4rifp8qsj19l1x"))))
9412 (build-system python-build-system)
9414 `(("python-pytest" ,python-pytest)))
9415 (synopsis "Set-up and tear-down fixtures for unit tests")
9416 (description "This plugin allows you to set up and tear down fixtures within
9417 unit test functions that use @code{py.test}. This is useful for using
9418 @command{hypothesis} inside py.test, as @command{hypothesis} will call the test
9419 function multiple times, without setting up or tearing down fixture state as is
9420 normally the case.")
9421 (home-page "https://github.com/untitaker/pytest-subtesthack/")
9422 (license license:unlicense)))
9424 (define-public python2-pytest-subtesthack
9425 (package-with-python2 python-pytest-subtesthack))
9427 (define-public python-xdo
9434 "http://http.debian.net/debian/pool/main/p/python-xdo/"
9435 "python-xdo_" version ".orig.tar.gz"))
9438 "1vqh1n5yy5dhnq312kwrl90fnck4v26is3lq3lxdvcn60vv19da0"))))
9439 (build-system python-build-system)
9442 (modify-phases %standard-phases
9443 (add-before 'install 'patch-libxdo-path
9444 ;; Hardcode the path of dynamically loaded libxdo library.
9445 (lambda* (#:key inputs #:allow-other-keys)
9446 (let ((libxdo (string-append
9447 (assoc-ref inputs "xdotool")
9449 (substitute* "xdo/_xdo.py"
9450 (("find_library\\(\"xdo\"\\)")
9451 (simple-format #f "\"~a\"" libxdo)))
9453 #:tests? #f)) ; no tests provided
9455 `(("python-six" ,python-six)))
9457 `(("xdotool" ,xdotool)
9458 ("libX11" ,libx11)))
9459 (home-page "https://tracker.debian.org/pkg/python-xdo")
9460 (synopsis "Python library for simulating X11 keyboard/mouse input")
9461 (description "Provides bindings to libxdo for manipulating X11 via simulated
9462 input. (Note that this is mostly a legacy library; you may wish to look at
9463 python-xdo for newer bindings.)")
9464 (license license:bsd-3)))
9466 (define-public python2-xdo
9467 (package-with-python2 python-xdo))
9469 (define-public python-wtforms
9471 (name "python-wtforms")
9476 (uri (pypi-uri "WTForms" version ".zip"))
9479 "0vyl26y9cg409cfyj8rhqxazsdnd0jipgjw06civhrd53yyi1pzz"))))
9480 (build-system python-build-system)
9483 (modify-phases %standard-phases
9484 (add-after 'unpack 'remove-django-test
9485 ;; Don't fail the tests when the inputs for the optional tests cannot be found.
9489 (("'ext_django.tests', 'ext_sqlalchemy', 'ext_dateutil', 'locale_babel'") "")
9490 (("sys.stderr.write(\"### Disabled test '%s', dependency not found\n\" % name)") ""))
9493 `(("unzip" ,unzip)))
9494 (home-page "http://wtforms.simplecodes.com/")
9496 "Form validation and rendering library for Python web development")
9498 "WTForms is a flexible forms validation and rendering library
9499 for Python web development. It is very similar to the web form API
9500 available in Django, but is a standalone package.")
9501 (license license:bsd-3)))
9503 (define-public python2-wtforms
9504 (package-with-python2 python-wtforms))
9506 (define-public python-mako
9508 (name "python-mako")
9513 (uri (pypi-uri "Mako" version))
9516 "03dyxgjknp4ffsv7vwfd28l5bbpzi0ylp20543wpg3iahyyrwma8"))))
9517 (build-system python-build-system)
9519 `(("python-markupsafe" ,python-markupsafe)))
9521 `(("python-mock" ,python-mock)
9522 ("python-nose" ,python-nose)
9523 ("python-pytest" ,python-pytest)))
9524 (home-page "http://www.makotemplates.org/")
9525 (synopsis "Templating language for Python")
9526 (description "Mako is a templating language for Python that compiles
9527 templates into Python modules.")
9528 (license license:expat)))
9530 (define-public python2-mako
9531 (package-with-python2 python-mako))
9533 (define-public python-waitress
9535 (name "python-waitress")
9540 (uri (pypi-uri "waitress" version))
9543 "017n9ra6vvmq9d5sfhdzyzr1mg15x2hj2dhm4pdlw98c1ypw2h3w"))))
9544 (build-system python-build-system)
9545 (home-page "https://github.com/Pylons/waitress")
9546 (synopsis "Waitress WSGI server")
9547 (description "Waitress is meant to be a production-quality pure-Python WSGI
9548 server with very acceptable performance.")
9549 (license license:zpl2.1)))
9551 (define-public python2-waitress
9552 (package-with-python2 python-waitress))
9554 (define-public python-wsgiproxy2
9556 (name "python-wsgiproxy2")
9561 (uri (pypi-uri "WSGIProxy2" version ".zip"))
9564 "13kf9bdxrc95y9vriaz0viry3ah11nz4rlrykcfvb8nlqpx3dcm4"))))
9565 (build-system python-build-system)
9567 '(;; Wsgiproxy2's test suite requires Restkit, which does not yet fully
9568 ;; support Python 3:
9569 ;; https://github.com/benoitc/restkit/issues/140
9573 ("python-nose" ,python-nose)
9574 ("python-coverage" ,python-coverage)))
9576 `(("python-six" ,python-six)
9577 ("python-webob" ,python-webob)))
9579 "https://github.com/gawel/WSGIProxy2/")
9580 (synopsis "WSGI Proxy with various http client backends")
9581 (description "WSGI turns HTTP requests into WSGI function calls.
9582 WSGIProxy turns WSGI function calls into HTTP requests.
9583 It also includes code to sign requests and pass private data,
9584 and to spawn subprocesses to handle requests.")
9585 (license license:expat)))
9587 (define-public python2-wsgiproxy2
9588 (package-with-python2 python-wsgiproxy2))
9590 (define-public python-pastedeploy
9592 (name "python-pastedeploy")
9597 (uri (pypi-uri "PasteDeploy" version))
9600 "1jz3m4hq8v6hyhfjz9425nd3nvn52cvbfipdcd72krjmla4qz1fm"))))
9601 (build-system python-build-system)
9603 `(("python-nose" ,python-nose)))
9604 (home-page "http://pythonpaste.org/deploy/")
9606 "Load, configure, and compose WSGI applications and servers")
9608 "This tool provides code to load WSGI applications and servers from URIs;
9609 these URIs can refer to Python Eggs for INI-style configuration files. Paste
9610 Script provides commands to serve applications based on this configuration
9612 (license license:expat)))
9614 (define-public python2-pastedeploy
9615 (package-with-python2 python-pastedeploy))
9617 (define-public python-paste
9619 (name "python-paste")
9624 (uri (pypi-uri "Paste" version))
9627 "062jk0nlxf6lb2wwj6zc20rlvrwsnikpkh90y0dn8cjch93s6ii3"))
9628 (patches (search-patches "python-paste-remove-website-test.patch"
9629 "python-paste-remove-timing-test.patch"))))
9630 (build-system python-build-system)
9632 `(("python-nose" ,python-nose)))
9634 `(("python-six" ,python-six)))
9635 (home-page "http://pythonpaste.org")
9637 "Python web development tools, focusing on WSGI")
9639 "Paste provides a variety of web development tools and middleware which
9640 can be nested together to build web applications. Paste's design closely
9641 follows ideas flowing from WSGI (Web Standard Gateway Interface).")
9642 (license license:expat)))
9644 (define-public python2-paste
9645 (package-with-python2 python-paste))
9647 (define-public python-pastescript
9649 (name "python-pastescript")
9654 (uri (pypi-uri "PasteScript" version))
9657 "1h3nnhn45kf4pbcv669ik4faw04j58k8vbj1hwrc532k0nc28gy0"))))
9658 (build-system python-build-system)
9660 `(("python-nose" ,python-nose)))
9662 `(("python-paste" ,python-paste)
9663 ("python-pastedeploy" ,python-pastedeploy)))
9664 (home-page "http://pythonpaste.org/script/")
9666 '(;; Unfortunately, this requires the latest unittest2,
9667 ;; but that requires traceback2 which requires linecache2 which requires
9668 ;; unittest2. So we're skipping tests for now.
9669 ;; (Note: Apparently linetest2 only needs unittest2 for its tests,
9670 ;; so in theory we could get around this situation somehow.)
9673 "Pluggable command line tool for serving web applications and more")
9675 "PasteScript is a plugin-friendly command line tool which provides a
9676 variety of features, from launching web applications to bootstrapping project
9678 (license license:expat)))
9680 (define-public python2-pastescript
9681 (package-with-python2 python-pastescript))
9683 (define-public python-pyquery
9685 (name "python-pyquery")
9690 (uri (pypi-uri "pyquery" version))
9693 "1xia20wm0vx5dk85kcwgh13bylz8qh47ffjxssd2586r60xi783a"))))
9694 (build-system python-build-system)
9696 `(("python-webob" ,python-webob)
9697 ("python-webtest" ,python-webtest)))
9699 `(("python-lxml" ,python-lxml)
9700 ("python-cssselect" ,python-cssselect)))
9701 (home-page "https://github.com/gawel/pyquery")
9702 (synopsis "Make jQuery-like queries on xml documents")
9703 (description "pyquery allows you to make jQuery queries on xml documents.
9704 The API is as much as possible the similar to jQuery. pyquery uses lxml for
9705 fast xml and html manipulation.")
9706 (license license:bsd-3)))
9708 (define-public python2-pyquery
9709 (package-with-python2 python-pyquery))
9711 (define-public python-webtest
9713 (name "python-webtest")
9718 (uri (pypi-uri "WebTest" version))
9721 "0bv0qhdjakdsdgj4sk21gnpp8xp8bga4x03p6gjb83ihrsb7n4xv"))))
9722 (build-system python-build-system)
9724 `(;; Unfortunately we have to disable tests!
9725 ;; This release of WebTest is pinned to python-nose < 1.3,
9726 ;; but older versions of python-nose are plagued with the following
9727 ;; bug(s), which rears its ugly head during test execution:
9728 ;; https://github.com/nose-devs/nose/issues/759
9729 ;; https://github.com/nose-devs/nose/pull/811
9731 ;; Commented out code is no good, but in this case, once tests
9732 ;; are ready to be enabled again, we should put the following
9735 ;; `(("python-nose" ,python-nose) ; technially < 1.3,
9736 ;; ; but see above comment
9737 ;; ("python-coverage" ,python-coverage)
9738 ;; ("python-mock" ,python-mock)
9739 ;; ("python-pastedeploy" ,python-pastedeploy)
9740 ;; ("python-wsgiproxy2" ,python-wsgiproxy2)
9741 ;; ("python-pyquery" ,python-pyquery)))
9743 `(("python-waitress" ,python-waitress)
9744 ("python-webob" ,python-webob)
9745 ("python-six" ,python-six)
9746 ("python-beautifulsoup4" ,python-beautifulsoup4)))
9747 (home-page "http://webtest.pythonpaste.org/")
9748 (synopsis "Helper to test WSGI applications")
9749 (description "Webtest allows you to test your Python web applications
9750 without starting an HTTP server. It supports anything that supports the
9752 (license license:expat)))
9754 (define-public python2-webtest
9755 (package-with-python2 python-webtest))
9757 (define-public python-anyjson
9759 (name "python-anyjson")
9764 (uri (pypi-uri "anyjson" version))
9767 "1fjph4alvcscsl5d4b6qpv1yh31jy05jxi1l0xff7lws7j32v09p"))))
9768 (build-system python-build-system)
9770 `(;; We could possibly get tests working, but on Python 3 it's not so easy.
9771 ;; Very strangely, 2to3 is run *during setup.py install* (or bdist, or
9772 ;; whatever) so this transformation needs to be done before the tests
9773 ;; can be run. Maybe we could add a build step to transform beforehand
9774 ;; but it could be annoying/difficult.
9775 ;; We can enable tests for the Python 2 version, though, and do below.
9777 (home-page "http://bitbucket.org/runeh/anyjson/")
9779 "Wraps best available JSON implementation in a common interface")
9781 "Anyjson loads whichever is the fastest JSON module installed
9782 and provides a uniform API regardless of which JSON implementation is used.")
9783 (license license:bsd-3)
9784 (properties `((python2-variant . ,(delay python2-anyjson))))))
9786 (define-public python2-anyjson
9787 (let ((anyjson (package-with-python2
9788 (strip-python2-variant python-anyjson))))
9791 (arguments `(;; Unlike the python 3 variant, we do run tests. See above!
9793 ,@(package-arguments anyjson)))
9794 (native-inputs `(("python2-nose" ,python2-nose))))))
9796 (define-public python-amqp
9798 (name "python-amqp")
9803 (uri (pypi-uri "amqp" version))
9806 "06n6q0kxhjnbfz3vn8x9yz09lwmn1xi9d6wxp31h5jbks0b4vsid"))))
9807 (build-system python-build-system)
9809 `(("python-nose" ,python-nose)
9810 ("python-mock" ,python-mock)))
9811 (home-page "http://github.com/celery/py-amqp")
9813 "Low-level AMQP client for Python (fork of amqplib)")
9815 "This is a fork of amqplib which was originally written by Barry Pederson.
9816 It is maintained by the Celery project, and used by kombu as a pure python
9817 alternative when librabbitmq is not available.")
9818 (license license:lgpl2.1+)
9819 (properties `((python2-variant . ,(delay python2-amqp))))))
9821 (define-public python2-amqp
9822 (let ((amqp (package-with-python2
9823 (strip-python2-variant python-amqp))))
9826 (arguments `(;; Tries to run coverage tests with nose-cover3, which seems
9827 ;; unmaintained. Weirdly, does not do this on the python 3
9830 ,@(package-arguments amqp))))))
9832 (define-public python-kombu
9834 (name "python-kombu")
9839 (uri (pypi-uri "kombu" version))
9842 "0l16chb314gpq2v7fh94a22c30lcv6w3ylmhsa60bldlcq6a0r70"))))
9843 (build-system python-build-system)
9845 `(("python-mock" ,python-mock)
9846 ("python-nose" ,python-nose)))
9848 `(("python-anyjson" ,python-anyjson)
9849 ("python-amqp" ,python-amqp)
9850 ("python-redis" ,python-redis)))
9851 (home-page "http://kombu.readthedocs.org")
9852 (synopsis "Message passing library for Python")
9853 (description "The aim of Kombu is to make messaging in Python as easy as
9854 possible by providing an idiomatic high-level interface for the AMQ protocol,
9855 and also provide proven and tested solutions to common messaging problems.
9856 AMQP is the Advanced Message Queuing Protocol, an open standard protocol for
9857 message orientation, queuing, routing, reliability and security, for which the
9858 RabbitMQ messaging server is the most popular implementation.")
9859 (license license:bsd-3)
9860 (properties `((python2-variant . ,(delay python2-kombu))))))
9862 (define-public python2-kombu
9863 (let ((kombu (package-with-python2
9864 (strip-python2-variant python-kombu))))
9867 (arguments `(;; FIXME: 'TestTransport.test_del_sync' fails on python2.
9868 ;; It works fine on the python3 variant.
9870 ,@(package-arguments kombu)))
9871 (native-inputs `(("python2-unittest2" ,python2-unittest2)
9872 ,@(package-native-inputs kombu))))))
9874 (define-public python-billiard
9876 (name "python-billiard")
9877 (version "3.3.0.23")
9881 (uri (pypi-uri "billiard" version))
9884 "02wxsc6bhqvzh8j6w758kvgqbnj14l796mvmrcms8fgfamd2lak9"))))
9885 (build-system python-build-system)
9887 `(("python-nose" ,python-nose)))
9888 (home-page "http://github.com/celery/billiard")
9890 "Python multiprocessing fork with improvements and bugfixes")
9892 "Billiard is a fork of the Python 2.7 multiprocessing package. The
9893 multiprocessing package itself is a renamed and updated version of R Oudkerk's
9894 pyprocessing package. This standalone variant is intended to be compatible with
9895 Python 2.4 and 2.5, and will draw its fixes/improvements from python-trunk.")
9896 (license license:bsd-3)
9897 (properties `((python2-variant . ,(delay python2-billiard))))))
9899 (define-public python2-billiard
9900 (let ((billiard (package-with-python2
9901 (strip-python2-variant python-billiard))))
9904 (native-inputs `(("python2-unittest2" ,python2-unittest2)
9905 ("python2-mock" ,python2-mock)
9906 ,@(package-native-inputs billiard))))))
9908 (define-public python-celery
9910 (name "python-celery")
9915 (uri (pypi-uri "celery" version))
9918 "0yh2prhdnx2dgkb67a5drj12hh2zvzx5f611p7mqqg01ydghif4r"))))
9919 (build-system python-build-system)
9922 (modify-phases %standard-phases
9923 ;; These tests break with Python 3.5:
9924 ;; https://github.com/celery/celery/issues/2897#issuecomment-253066295
9928 (system* "nosetests" "--exclude=^test_safe_to_remove.*")))))))
9930 `(("python-nose" ,python-nose)))
9932 `(("python-pytz" ,python-pytz)
9933 ("python-billiard" ,python-billiard)
9934 ("python-kombu" ,python-kombu)))
9935 (home-page "http://celeryproject.org")
9936 (synopsis "Distributed Task Queue")
9937 (description "Celery is an asynchronous task queue/job queue based on
9938 distributed message passing. It is focused on real-time operation, but
9939 supports scheduling as well. The execution units, called tasks, are executed
9940 concurrently on a single or more worker servers using multiprocessing,
9941 Eventlet, or gevent. Tasks can execute asynchronously (in the background) or
9942 synchronously (wait until ready).")
9943 (license license:bsd-3)
9944 (properties `((python2-variant . ,(delay python2-celery))))))
9946 (define-public python2-celery
9947 (let ((celery (package-with-python2
9948 (strip-python2-variant python-celery))))
9951 (native-inputs `(("python2-unittest2" ,python2-unittest2)
9952 ("python2-mock" ,python2-mock)
9953 ,@(package-native-inputs celery))))))
9955 (define-public python-translitcodec
9957 (name "python-translitcodec")
9962 (uri (pypi-uri "translitcodec" version))
9965 "10x6pvblkzky1zhjs8nmx64nb9jdzxad4bxhq4iwv0j4z2aqjnki"))))
9966 (build-system python-build-system)
9968 `(#:tests? #f)) ; no tests provided
9970 "https://github.com/claudep/translitcodec")
9972 "Unicode to 8-bit charset transliteration codec")
9974 "This package contains codecs for transliterating ISO 10646 texts into
9975 best-effort representations using smaller coded character sets (ASCII,
9977 (license license:expat)))
9979 (define-public python2-translitcodec
9980 (package-with-python2 python-translitcodec))
9982 (define-public python-editor
9984 (name "python-editor")
9989 (uri (pypi-uri "python-editor" version))
9992 "1ypnpgvzpkbwsg4rdvy4sy51j28b5xq9v8pnkwxncn07vqz06p7n"))))
9993 (build-system python-build-system)
9995 "https://github.com/fmoo/python-editor")
9997 "Programmatically open an editor, capture the result")
9999 "python-editor is a library that provides the editor module for
10000 programmatically interfacing with your system's $EDITOR.")
10001 (license license:asl2.0)))
10003 (define-public python2-editor
10004 (package-with-python2 python-editor))
10006 (define-public python-sphinxcontrib-programoutput
10008 (name "python-sphinxcontrib-programoutput")
10012 (uri (pypi-uri "sphinxcontrib-programoutput" version))
10015 "098as6z1s0gb4dh5xcr1fd2vpm91zj93jzvgawspxf5s4hqs0xhp"))))
10016 (build-system python-build-system)
10018 ;; FIXME: Many tests are failing and the upstream is gone.
10021 `(("python-sphinx" ,python-sphinx)))
10022 (synopsis "Sphinx extension to include program output")
10023 (description "A Sphinx extension to literally insert the output of arbitrary
10024 commands into documents, helping you to keep your command examples up to date.")
10025 (home-page "https://github.com/lunaryorn/sphinxcontrib-programoutput")
10026 (license license:bsd-2)))
10028 (define-public python2-sphinxcontrib-programoutput
10029 (package-with-python2 python-sphinxcontrib-programoutput))
10031 (define-public python-sphinx-repoze-autointerface
10033 (name "python-sphinx-repoze-autointerface")
10037 (uri (pypi-uri "repoze.sphinx.autointerface" version))
10040 "08ycivzf7bh4a1zcyp31hbyqs1b2c9r26raa3vxjwwmbfqr3iw4f"))))
10041 (build-system python-build-system)
10042 (arguments '(#:tests? #f)) ; No tests.
10044 `(("python-sphinx" ,python-sphinx)
10045 ("python-zope-interface" ,python-zope-interface)))
10046 (synopsis "Auto-generate Sphinx API docs from Zope interfaces")
10047 (description "This package defines an extension for the Sphinx documentation
10048 system. The extension allows generation of API documentation by
10049 introspection of @code{zope.interface} instances in code.")
10050 (home-page "https://github.com/repoze/repoze.sphinx.autointerface")
10051 (license license:repoze)))
10053 (define-public python2-sphinx-repoze-autointerface
10054 (package-with-python2 python-sphinx-repoze-autointerface))
10056 (define-public python-psycopg2
10058 (name "python-psycopg2")
10063 (uri (pypi-uri "psycopg2" version))
10066 "0k4hshvrwsh8yagydyxgmd0pjm29lwdxkngcq9fzfzkmpsxrmkva"))))
10067 (build-system python-build-system)
10069 ;; Tests would require a postgresql database "psycopg2_test"
10070 ;; and a running postgresql database management service.
10071 `(#:tests? #f)) ; TODO re-enable after providing a test-db.
10073 `(("postgresql" ,postgresql))) ; libpq
10074 (home-page "http://initd.org/psycopg/")
10075 (synopsis "Python PostgreSQL adapter")
10077 "psycopg2 is a thread-safe PostgreSQL adapter that implements DB-API 2.0. ")
10078 (license license:lgpl3+)))
10080 (define-public python2-psycopg2
10081 (package-with-python2 python-psycopg2))
10083 (define-public python-vobject
10085 (name "python-vobject")
10089 (uri (pypi-uri "vobject" version))
10092 "1qfnwlx8qwkgr6nf5wvl6ff1r3kll53dh3z6nyp173nmlhhhqccb"))))
10093 (build-system python-build-system)
10095 '(;; The test suite relies on some non-portable Windows interfaces.
10098 `(("python-dateutil" ,python-dateutil)
10099 ("python-pyicu" ,python-pyicu)))
10100 (synopsis "Parse and generate vCard and vCalendar files")
10101 (description "Vobject is intended to be a full featured Python package for
10102 parsing and generating vCard and vCalendar files. Currently, iCalendar files
10103 are supported and well tested. vCard 3.0 files are supported, and all data
10104 should be imported, but only a few components are understood in a sophisticated
10106 (home-page "http://eventable.github.io/vobject/")
10107 (license license:asl2.0)))
10109 (define-public python2-vobject
10110 (package-with-python2 python-vobject))
10112 (define-public python-munkres
10114 (name "python-munkres")
10118 (uri (pypi-uri "munkres" version))
10121 "0mbspx4zv8id4x6pim6ybsa1xh96qwpbqj7skbqz4c9c9nf1lpqq"))))
10122 (build-system python-build-system)
10124 '(#:tests? #f)) ; no test suite
10125 (home-page "http://software.clapper.org/munkres/")
10126 (synopsis "Implementation of the Munkres algorithm")
10127 (description "The Munkres module provides an implementation of the Munkres
10128 algorithm (also called the Hungarian algorithm or the Kuhn-Munkres algorithm),
10129 useful for solving the Assignment Problem.")
10130 (license license:bsd-3)))
10132 (define-public python2-munkres
10133 (package-with-python2 python-munkres))
10135 (define-public python-flask
10137 (name "python-flask")
10141 (uri (pypi-uri "Flask" version))
10144 "03kbfll4sj3v5z7r31c7bhfpi11r1np076d4p1k2kg4yzcmkywdl"))))
10145 (build-system python-build-system)
10147 `(("python-itsdangerous" ,python-itsdangerous)
10148 ("python-jinja2" ,python-jinja2)
10149 ("python-click" ,python-click)
10150 ("python-werkzeug" ,python-werkzeug)))
10151 (home-page "https://github.com/mitsuhiko/flask/")
10152 (synopsis "Microframework based on Werkzeug, Jinja2 and good intentions")
10153 (description "Flask is a micro web framework based on the Werkzeug toolkit
10154 and Jinja2 template engine. It is called a micro framework because it does not
10155 presume or force a developer to use a particular tool or library.")
10156 (license license:bsd-3)))
10158 (define-public python2-flask
10159 (package-with-python2 python-flask))
10161 (define-public python-flask-wtf
10163 (name "python-flask-wtf")
10168 (uri (pypi-uri "Flask-WTF" version))
10171 "04l5743j2dici46038sqlzvf0xzpg8rf7s9ld2x24xv7f4idg990"))))
10172 (build-system python-build-system)
10175 (modify-phases %standard-phases
10176 (add-before 'check 'drop-failing-test
10178 ;; FIXME: This file tries resolving an external server, which
10179 ;; fails. Try to patch out the offending section instead of
10180 ;; deleting the whole thing.
10181 (delete-file "tests/test_recaptcha.py")
10184 `(("python-flask-babel" ,python-flask-babel)
10185 ("python-babel" ,python-babel)
10186 ("python-wtforms" ,python-wtforms)))
10188 `(("python-nose" ,python-nose)))
10189 (home-page "https://github.com/lepture/flask-wtf")
10190 (synopsis "Simple integration of Flask and WTForms")
10191 (description "Flask-WTF integrates Flask and WTForms, including CSRF, file
10192 upload, and reCAPTCHA.")
10193 (license license:bsd-3)))
10195 (define-public python2-flask-wtf
10196 (package-with-python2 python-flask-wtf))
10198 (define-public python-flask-multistatic
10200 (name "python-flask-multistatic")
10205 (uri (pypi-uri "flask-multistatic" version))
10208 "0p4v50rwv64wcd0zlq7rzl4waprwr4hj19s3cgf1isywa7jcisgm"))))
10209 (build-system python-build-system)
10211 `(("python-flask" ,python-flask)))
10212 (home-page "https://pagure.io/flask-multistatic")
10213 (synopsis "Flask plugin to allow overriding static files")
10214 (description "@code{flask-multistatic} is a flask plugin that adds support
10215 for overriding static files.")
10216 (license license:gpl3+)))
10218 (define-public python2-flask-multistatic
10219 (package-with-python2 python-flask-multistatic))
10221 (define-public python-cookies
10223 (name "python-cookies")
10227 (uri (pypi-uri "cookies" version))
10230 "13pfndz8vbk4p2a44cfbjsypjarkrall71pgc97glk5fiiw9idnn"))))
10231 (build-system python-build-system)
10233 `(;; test are broken: https://gitlab.com/sashahart/cookies/issues/3
10236 `(("python-pytest" ,python2-pytest)))
10237 (synopsis "HTTP cookie parser and renderer")
10238 (description "A RFC 6265-compliant HTTP cookie parser and renderer in
10240 (home-page "https://gitlab.com/sashahart/cookies")
10241 (license license:expat)))
10243 (define-public python2-cookies
10244 (package-with-python2 python-cookies))
10246 (define-public python-responses
10248 (name "python-responses")
10252 (uri (pypi-uri "responses" version))
10255 "1spcfxixyk9k7pk82jm6zqkwk031s95lh8q0mz7539jrb7269bcc"))))
10256 (build-system python-build-system)
10258 `(;; Test suite is not distributed:
10259 ;; https://github.com/getsentry/responses/issues/38
10262 `(("python-mock" ,python-mock)))
10264 `(("python-requests" ,python-requests)
10265 ("python-cookies" ,python-cookies)
10266 ("python-six" ,python-six)))
10267 (home-page "https://github.com/getsentry/responses")
10268 (synopsis "Utility for mocking out the `requests` Python library")
10269 (description "A utility library for mocking out the `requests` Python
10271 (license license:asl2.0)))
10273 (define-public python2-responses
10274 (package-with-python2 python-responses))
10276 (define-public python-whoosh
10278 (name "python-whoosh")
10283 (uri (pypi-uri "Whoosh" version))
10286 "10qsqdjpbc85fykc1vgcs8xwbgn4l2l52c8d83xf1q59pwyn79bw"))))
10287 (build-system python-build-system)
10289 `(("python-pytest" ,python-pytest)))
10290 (home-page "http://bitbucket.org/mchaput/whoosh")
10291 (synopsis "Full text indexing, search, and spell checking library")
10293 "Whoosh is a fast, pure-Python full text indexing, search, and spell
10294 checking library.")
10295 (license license:bsd-2)))
10297 (define-public python2-whoosh
10298 (let ((whoosh (package-with-python2 (strip-python2-variant python-whoosh))))
10299 (package (inherit whoosh)
10301 `(("python2-backport-ssl-match-hostname"
10302 ,python2-backport-ssl-match-hostname)
10303 ,@(package-propagated-inputs whoosh))))))
10305 (define-public python-pathlib
10307 (name "python-pathlib")
10311 (uri (pypi-uri "pathlib" version))
10314 "17zajiw4mjbkkv6ahp3xf025qglkj0805m9s41c45zryzj6p2h39"))))
10315 (build-system python-build-system)
10316 ;; The tests depend on the internal "test" module, which does not provide
10317 ;; a stable interface.
10318 (arguments `(#:tests? #f))
10319 (home-page "https://pathlib.readthedocs.org/")
10320 (synopsis "Object-oriented file system paths")
10321 (description "Pathlib offers a set of classes to handle file system paths.
10322 It offers the following advantages over using string objects:
10325 @item No more cumbersome use of os and os.path functions. Everything can
10326 be done easily through operators, attribute accesses, and method calls.
10327 @item Embodies the semantics of different path types. For example,
10328 comparing Windows paths ignores casing.
10329 @item Well-defined semantics, eliminating any inconsistencies or
10330 ambiguities (forward vs. backward slashes, etc.).
10333 Note: In Python 3.4, pathlib is now part of the standard library. For other
10334 Python versions please consider python-pathlib2 instead, which tracks the
10335 standard library module. This module (python-pathlib) isn't maintained
10337 (license license:expat)))
10339 (define-public python2-pathlib
10340 (package-with-python2 python-pathlib))
10342 (define-public python2-pathlib2
10344 (name "python2-pathlib2")
10348 (uri (pypi-uri "pathlib2" version))
10351 "0p050msg5c8d0kadv702jnfshaxrb0il765cpkgnhn6mq5hakcyy"))))
10352 (build-system python-build-system)
10353 ;; We only need the the Python 2 variant, since for Python 3 our minimum
10354 ;; version is 3.4 which already includes this package as part of the
10355 ;; standard library.
10357 `(#:python ,python-2))
10359 `(("python2-six" ,python2-six)))
10360 (home-page "http://pypi.python.org/pypi/pathlib2/")
10361 (synopsis "Object-oriented file system paths - backport of standard
10363 (description "The goal of pathlib2 is to provide a backport of standard
10364 pathlib module which tracks the standard library module, so all the newest
10365 features of the standard pathlib can be used also on older Python versions.
10367 Pathlib offers a set of classes to handle file system paths. It offers the
10368 following advantages over using string objects:
10371 @item No more cumbersome use of os and os.path functions. Everything can
10372 be done easily through operators, attribute accesses, and method calls.
10373 @item Embodies the semantics of different path types. For example,
10374 comparing Windows paths ignores casing.
10375 @item Well-defined semantics, eliminating any inconsistencies or
10376 ambiguities (forward vs. backward slashes, etc.).
10378 (license license:expat)))
10380 (define-public python-jellyfish
10382 (name "python-jellyfish")
10386 (uri (pypi-uri "jellyfish" version))
10389 "1j9rplb16ba2prjj6mip46z0w9pnhnqpwgiwi0x93vnas14rlyl8"))))
10390 (build-system python-build-system)
10392 `(("python-pytest" ,python-pytest)))
10393 (home-page "https://github.com/jamesturk/jellyfish")
10394 (synopsis "Approximate and phonetic matching of strings")
10395 (description "Jellyfish uses a variety of string comparison and phonetic
10396 encoding algorithms to do fuzzy string matching.")
10397 (license license:bsd-2)
10398 (properties `((python2-variant . ,(delay python2-jellyfish))))))
10400 (define-public python2-jellyfish
10401 (let ((jellyfish (package-with-python2
10402 (strip-python2-variant python-jellyfish))))
10403 (package (inherit jellyfish)
10404 (native-inputs `(("python2-unicodecsv" ,python2-unicodecsv)
10405 ,@(package-native-inputs jellyfish))))))
10407 (define-public python2-unicodecsv
10409 (name "python2-unicodecsv")
10413 ;; The test suite is not included in the PyPi release.
10414 ;; https://github.com/jdunck/python-unicodecsv/issues/19
10415 (uri (string-append "https://github.com/jdunck/python-unicodecsv/"
10416 "archive/" version ".tar.gz"))
10417 (file-name (string-append name "-" version ".tar.gz"))
10420 "087nqanfcyp6mlfbbr5lva5f3w6iz1bybls9xlrb8icmc474wh4w"))))
10421 (build-system python-build-system)
10423 `(;; It supports Python 3, but Python 3 can already do Unicode CSV.
10424 #:python ,python-2))
10426 `(("python2-unittest2" ,python2-unittest2)))
10427 (home-page "https://github.com/jdunck/python-unicodecsv")
10428 (synopsis "Unicode CSV module for Python 2")
10429 (description "Unicodecsv is a drop-in replacement for Python 2.7's CSV
10430 module, adding support for Unicode strings.")
10431 (license license:bsd-2)))
10433 (define-public python-rarfile
10435 (name "python-rarfile")
10439 (uri (pypi-uri "rarfile" version))
10442 "0qfad483kcbga0bn4qmcz953xjk16r52fahiy46zzn56v80y89ra"))))
10443 (build-system python-build-system)
10446 (modify-phases %standard-phases
10448 ;; Many tests fail, but the installation proceeds.
10449 (lambda _ (zero? (system* "make" "-C" "test" "test")))))))
10451 `(("which" ,which))) ; required for tests
10453 `(("libarchive" ,libarchive)))
10454 (home-page "https://github.com/markokr/rarfile")
10455 (synopsis "RAR archive reader for Python")
10456 (description "This is Python module for RAR archive reading. The interface
10457 is made as zipfile like as possible.")
10458 (license license:isc)))
10460 (define-public python2-rarfile
10461 (package-with-python2 python-rarfile))
10463 (define-public python-magic
10465 (name "python-magic")
10470 (uri (string-append "https://github.com/ahupp/python-magic/archive/"
10471 version ".tar.gz"))
10474 "17bgy92i7sb021f2s4mw1dcvpm6p1mi9jihridwy1pyn8mzvpjgk"))
10475 (file-name (string-append name "-" version "-checkout"))))
10476 (build-system python-build-system)
10478 ;; The tests are unreliable, so don't run them. The tests fail
10479 ;; under Python3 because they were written for Python2 and
10480 ;; contain import statements that do not work in Python3. One of
10481 ;; the tests fails under Python2 because its assertions are
10482 ;; overly stringent; it relies on comparing output strings which
10483 ;; are brittle and can change depending on the version of
10484 ;; libmagic being used and the system on which the test is
10485 ;; running. In my case, under GuixSD 0.10.0, only one test
10486 ;; failed, and it seems to have failed only because the version
10487 ;; of libmagic that is packaged in Guix outputs a slightly
10488 ;; different (but not wrong) string than the one that the test
10491 #:phases (modify-phases %standard-phases
10492 ;; Replace a specific method call with a hard-coded
10493 ;; path to the necessary libmagic.so file in the
10494 ;; store. If we don't do this, then the method call
10495 ;; will fail to find the libmagic.so file, which in
10496 ;; turn will cause any application using
10497 ;; python-magic to fail.
10498 (add-before 'build 'hard-code-path-to-libmagic
10499 (lambda* (#:key inputs #:allow-other-keys)
10500 (let ((file (assoc-ref inputs "file")))
10501 (substitute* "magic.py"
10502 (("ctypes.util.find_library\\('magic'\\)")
10503 (string-append "'" file "/lib/libmagic.so'")))
10505 (add-before 'install 'disable-egg-compression
10507 (let ((port (open-file "setup.cfg" "a")))
10508 (display "\n[easy_install]\nzip_ok = 0\n"
10513 ;; python-magic needs to be able to find libmagic.so.
10515 (home-page "https://github.com/ahupp/python-magic")
10516 (synopsis "File type identification using libmagic")
10518 "This module uses ctypes to access the libmagic file type
10519 identification library. It makes use of the local magic database and
10520 supports both textual and MIME-type output. Note that this module and
10521 the python-file module both provide a \"magic.py\" file; these two
10522 modules, which are different and were developed separately, both serve
10523 the same purpose: to provide Python bindings for libmagic.")
10524 (license license:expat)))
10526 (define-public python2-magic
10527 (package-with-python2 python-magic))
10529 (define-public python2-s3cmd
10531 (name "python2-s3cmd")
10536 (uri (string-append "mirror://sourceforge/s3tools/s3cmd/" version "/"
10537 "s3cmd-" version ".tar.gz"))
10540 "0ki1rzhm5icvi9ry5jswi4b22yqwyj0d2wsqsgilwx6qhi7pjxa6"))))
10541 (build-system python-build-system)
10543 ;; s3cmd is written for python2 only and contains no tests.
10544 `(#:python ,python-2
10547 `(("python2-dateutil" ,python2-dateutil)
10548 ;; The python-file package also provides a magic.py module.
10549 ;; This is an unfortunate state of affairs; however, s3cmd
10550 ;; fails to install if it cannot find specifically the
10551 ;; python-magic package. Thus we include it, instead of using
10552 ;; python-file. Ironically, s3cmd sometimes works better
10553 ;; without libmagic bindings at all:
10554 ;; https://github.com/s3tools/s3cmd/issues/198
10555 ("python2-magic" ,python2-magic)))
10556 (home-page "http://s3tools.org/s3cmd")
10557 (synopsis "Command line tool for S3-compatible storage services")
10559 "S3cmd is a command line tool for uploading, retrieving and managing data
10560 in storage services that are compatible with the Amazon Simple Storage
10561 Service (S3) protocol, including S3 itself. It supports rsync-like backup,
10562 GnuPG encryption, and more. It also supports management of Amazon's
10563 CloudFront content delivery network.")
10564 (license license:gpl2+)))
10566 (define-public python-pkgconfig
10568 (name "python-pkgconfig")
10573 (uri (pypi-uri "pkgconfig" version))
10576 "1pw0kmvc57sjmaxi6c54fqsnihqj6hvhc9y1vaz36axafzqam7bh"))))
10577 (build-system python-build-system)
10579 `(("python-nose" ,python-nose)))
10581 `(("pkg-config" ,pkg-config)))
10583 `(;; Tests fail with "ValueError: _type_ 'v' not supported" on Python 3,
10584 ;; and on Python 2 they need the dl module deprecated since Python 2.6.
10586 ;; Hard-code the path to pkg-config.
10588 (modify-phases %standard-phases
10592 (substitute* "pkgconfig/pkgconfig.py"
10593 (("cmd = 'pkg-config")
10594 (string-append "cmd = '" (which "pkg-config"))))
10596 (home-page "http://github.com/matze/pkgconfig")
10597 (synopsis "Python interface for pkg-config")
10598 (description "This module provides a Python interface to pkg-config. It
10599 can be used to find all pkg-config packages, check if a package exists,
10600 check if a package meets certain version requirements, query CFLAGS and
10601 LDFLAGS and parse the output to build extensions with setup.py.")
10602 (license license:expat)))
10604 (define-public python2-pkgconfig
10605 (package-with-python2 python-pkgconfig))
10607 (define-public python-bz2file
10609 (name "python-bz2file")
10614 (uri (pypi-uri "bz2file" version))
10617 "126s53fkpx04f33a829yqqk8fj4png3qwg4m66cvlmhmwc8zihb4"))))
10618 (build-system python-build-system)
10620 `(#:tests? #f)) ; Tests use deprecated python modules.
10621 (home-page "https://github.com/nvawda/bz2file")
10622 (synopsis "Read and write bzip2-compressed files")
10624 "Bz2file is a Python library for reading and writing bzip2-compressed
10625 files. It contains a drop-in replacement for the I/O interface in the
10626 standard library's @code{bz2} module, including features from the latest
10627 development version of CPython that are not available in older releases.")
10628 (license license:asl2.0)
10629 (properties `((python2-variant . ,(delay python2-bz2file))))))
10631 (define-public python2-bz2file
10632 (let ((base (package-with-python2
10633 (strip-python2-variant python-bz2file))))
10637 `(#:python ,python-2
10639 (modify-phases %standard-phases
10640 ;; 'python setup.py test' does not work as of 0.98.
10641 ;; There is only the one test file, so we run it directly.
10643 (lambda _ (zero? (system* "python"
10644 "test_bz2file.py"))))))))))
10646 (define-public python-future
10648 (name "python-future")
10653 (uri (pypi-uri "future" version))
10656 "15wvcfzssc68xqnqi1dq4fhd0848hwi9jn42hxyvlqna40zijfrx"))))
10657 (build-system python-build-system)
10658 ;; Many tests connect to the network or are otherwise flawed.
10659 ;; https://github.com/PythonCharmers/python-future/issues/210
10662 (home-page "http://python-future.org")
10663 (synopsis "Single-source support for Python 3 and 2")
10665 "@code{python-future} is the missing compatibility layer between Python 2 and
10666 Python 3. It allows you to use a single, clean Python 3.x-compatible codebase
10667 to support both Python 2 and Python 3 with minimal overhead.")
10668 (license license:expat)))
10670 (define-public python2-future
10671 (package-with-python2 python-future))
10673 (define-public python-cysignals
10675 (name "python-cysignals")
10680 (uri (pypi-uri "cysignals" version ".tar.bz2"))
10683 "14cbyd9znlz6cxy1s3g6v6dv5jj45hn27pywkidd9b1zanaysqc6"))))
10684 (build-system python-build-system)
10686 `(("python-cython" ,python-cython)
10687 ("python-sphinx" ,python-sphinx)))
10689 `(("pari-gp" ,pari-gp)))
10691 `(#:modules ((guix build python-build-system)
10692 ((guix build gnu-build-system) #:prefix gnu:)
10693 (guix build utils))
10694 ;; FIXME: Tests are executed after installation and currently fail
10695 ;; when not installing into standard locations; the author is working
10699 (modify-phases %standard-phases
10702 (assoc-ref gnu:%standard-phases 'configure)))))
10704 "https://github.com/sagemath/cysignals")
10706 "Handling of interrupts and signals for Cython")
10708 "The cysignals package provides mechanisms to handle interrupts (and
10709 other signals and errors) in Cython code, using two related approaches,
10710 for mixed Cython/Python code or external C libraries and pure Cython code,
10712 (license license:lgpl3+)))
10714 (define-public python2-cysignals
10715 (package-with-python2 python-cysignals))
10717 (define-public python2-shedskin
10719 (name "python2-shedskin")
10724 (uri (string-append "https://github.com/shedskin/shedskin/"
10725 "releases/download/v" version
10726 "/shedskin-" version ".tgz"))
10729 "0nzwrzgw1ga8rw6f0ryq7zr9kkiavd1cqz5hzxkcbicl1dk7kz41"))))
10730 (build-system python-build-system)
10732 `(#:python ,python-2
10733 #:phases (modify-phases %standard-phases
10734 (add-after 'unpack 'fix-resulting-include-libs
10735 (lambda* (#:key inputs #:allow-other-keys)
10736 (let ((libgc (assoc-ref inputs "libgc"))
10737 (pcre (assoc-ref inputs "pcre")))
10738 (substitute* "shedskin/makefile.py"
10739 (("variable == 'CCFLAGS':[ ]*")
10740 (string-append "variable == 'CCFLAGS':\n"
10741 " line += ' -I " pcre "/include"
10742 " -I " libgc "/include'"))
10743 (("variable == 'LFLAGS':[ ]*")
10744 (string-append "variable == 'LFLAGS':\n"
10745 " line += ' -L" pcre "/lib"
10746 " -L " libgc "/lib'")))
10748 (inputs `(("pcre" ,pcre)
10750 (home-page "https://shedskin.github.io/")
10751 (synopsis "Experimental Python-2 to C++ Compiler")
10752 (description (string-append "This is an experimental compiler for a subset of
10753 Python. It generates C++ code and a Makefile."))
10754 (license (list license:gpl3 license:bsd-3 license:expat))))
10756 (define-public python2-rope
10758 (name "python2-rope")
10763 (uri (pypi-uri "rope" version))
10766 "18k5znhpwvrfck3yp0jmhd5j8r0f0s8bk1zh5yhs2cfgmfhbwigb"))))
10768 ;; Rope is currently python-2 only.
10769 ;; https://github.com/python-rope/rope/issues/57
10770 `(#:python ,python-2))
10771 (build-system python-build-system)
10773 `(("python2-unittest2" ,python2-unittest2)))
10774 (home-page "https://github.com/python-rope/rope")
10775 (synopsis "Refactoring library for Python")
10776 (description "Rope is a refactoring library for Python. It facilitates
10777 the renaming, moving and extracting of attributes, functions, modules, fields
10778 and parameters in Python 2 source code. These refactorings can also be applied
10779 to occurences in strings and comments.")
10780 (license license:gpl2)))
10782 (define-public python-py3status
10784 (name "python-py3status")
10789 (uri (pypi-uri "py3status" version))
10792 "0i283z1pivmir61z8kbiycigc94l61v33ygzkhczf1ifq7cppyds"))))
10793 (build-system python-build-system)
10795 '(#:tests? #f)) ; TODO: Requires many libraries not in Guix.
10796 (home-page "https://github.com/ultrabug/py3status")
10797 (synopsis "Extensible i3status wrapper written in Python")
10798 (description "py3status is an i3status wrapper which extends i3status
10799 functionality in a modular way, allowing you to extend your panel with your
10800 own code, responding to click events and updating clock every second.")
10801 (license license:bsd-3)))
10803 (define-public python-tblib
10805 (name "python-tblib")
10809 (uri (pypi-uri "tblib" version))
10811 "02iahfkfa927hb4jq2bak36ldihwapzacfiq5lyxg8llwn98a1yi"))))
10812 (build-system python-build-system)
10815 (modify-phases %standard-phases
10818 ;; Upstream runs tests after installation and the package itself
10819 ;; resides in a subdirectory. Extend PYTHONPATH so it will be
10821 (setenv "PYTHONPATH"
10822 (string-append (getcwd) "/build/lib:"
10823 (getenv "PYTHONPATH")))
10824 (zero? (system* "py.test" "-vv" "tests" "README.rst")))))))
10826 `(("python-pytest" ,python-pytest)
10827 ("python-six" ,python-six)))
10828 (home-page "https://github.com/ionelmc/python-tblib")
10829 (synopsis "Traceback serialization library")
10831 "Traceback serialization allows you to:
10834 @item Pickle tracebacks and raise exceptions with pickled tracebacks in
10835 different processes. This allows better error handling when running code over
10836 multiple processes (imagine multiprocessing, billiard, futures, celery etc).
10838 @item Parse traceback strings and raise with the parsed tracebacks.
10840 (license license:bsd-3)))
10842 (define-public python2-tblib
10843 (package-with-python2 python-tblib))
10845 (define-public python-sqlparse
10847 (name "python-sqlparse")
10851 (uri (pypi-uri "sqlparse" version))
10854 "1s2fvaxgh9kqzrd6iwy5h7i61ckn05plx9np13zby93z3hdbx5nq"))))
10855 (build-system python-build-system)
10858 (modify-phases %standard-phases
10861 ;; setup.py-integrated 2to3 only affects the build files, but
10862 ;; py.test is using the source files. So we need to convert them
10864 (when (zero? (system* "python3"))
10865 (system* "2to3" "--no-diff" "-wn" "sqlparse" "tests"))
10866 (zero? (system* "py.test")))))))
10868 `(("python-pytest" ,python-pytest)))
10869 (home-page "https://github.com/andialbrecht/sqlparse")
10870 (synopsis "Non-validating SQL parser")
10871 (description "Sqlparse is a non-validating SQL parser for Python. It
10872 provides support for parsing, splitting and formatting SQL statements.")
10873 (license license:bsd-3)))
10875 (define-public python2-sqlparse
10876 (package-with-python2 python-sqlparse))
10878 (define-public python-greenlet
10880 (name "python-greenlet")
10884 (uri (pypi-uri "greenlet" version))
10887 "1xhik26j4f3kc4qw9xmj0c567rb5h1zryb4ijwqnqwwjvfhbv59h"))))
10888 (build-system python-build-system)
10889 (home-page "https://greenlet.readthedocs.io/")
10890 (synopsis "Lightweight in-process concurrent programming")
10892 "Greenlet package is a spin-off of Stackless, a version of CPython
10893 that supports micro-threads called \"tasklets\". Tasklets run
10894 pseudo-concurrently (typically in a single or a few OS-level threads) and
10895 are synchronized with data exchanges on \"channels\".")
10896 (license (list license:psfl license:expat))))
10898 (define-public python2-greenlet
10899 (package-with-python2 python-greenlet))
10901 (define-public python-gevent
10903 (name "python-gevent")
10907 (uri (pypi-uri "gevent" version))
10910 "1smf3kvidpdiyi2c81alal74p2zm0clrm6xbyy6y1k9a3f2vkrbf"))
10911 (modules '((guix build utils)))
10914 ;; unbunding libev and c-ares
10915 (for-each delete-file-recursively '("libev" "c-ares"))
10916 ;; fixing testsuite
10917 (call-with-output-file "greentest/__init__.py" noop)
10918 (substitute* "greentest/testrunner.py"
10919 (("import util") "from . import util")
10920 (("from util import log") "from .util import log"))))))
10921 (build-system python-build-system)
10923 `(("python-greenlet" ,python-greenlet)))
10925 `(("python-six" ,python-six)))
10927 `(("c-ares" ,c-ares)
10929 (home-page "http://www.gevent.org/")
10930 (synopsis "Coroutine-based network library")
10932 "gevent is a coroutine-based Python networking library that uses greenlet
10933 to provide a high-level synchronous API on top of the libev event loop.")
10934 (license license:expat)))
10936 (define-public python2-gevent
10937 (package-with-python2 python-gevent))
10939 (define-public python-geventhttpclient
10941 (name "python-geventhttpclient")
10945 (uri (pypi-uri "geventhttpclient" version))
10948 "07d0q3wzmml75227r6y6mrl5a0zpf4v9gj0ni5rhbyzmaj4az1xx"))
10949 (modules '((guix build utils)))
10952 ;; Delete pre-compiled files.
10953 (for-each delete-file (find-files "src/geventhttpclient"
10956 (build-system python-build-system)
10959 (modify-phases %standard-phases
10960 (add-after 'unpack 'delete-network-tests
10962 (delete-file "src/geventhttpclient/tests/test_client.py")
10965 (add-after 'install 'check
10966 (lambda* (#:key inputs outputs #:allow-other-keys)
10967 (add-installed-pythonpath inputs outputs)
10968 (zero? (system* "py.test" "src/geventhttpclient/tests" "-v")))))))
10970 `(("python-pytest" ,python-pytest)))
10972 `(("python-certifi" ,python-certifi)
10973 ("python-gevent" ,python-gevent)
10974 ("python-six" ,python-six)))
10975 (home-page "https://github.com/gwik/geventhttpclient")
10976 (synopsis "HTTP client library for gevent")
10977 (description "@code{python-geventhttpclient} is a high performance,
10978 concurrent HTTP client library for python using @code{gevent}.")
10979 (license license:expat)))
10981 (define-public python2-geventhttpclient
10982 (package-with-python2 python-geventhttpclient))
10984 (define-public python-fastimport
10986 (name "python-fastimport")
10991 (uri (pypi-uri "fastimport" version))
10993 (base32 "1aqjsin4rmqm7ln4j0p73fzxifws6c6ikgyhav7r137m2ixsxl43"))))
10994 (build-system python-build-system)
10995 (home-page "https://github.com/jelmer/python-fastimport")
10996 (synopsis "VCS fastimport parser and generator in Python")
10997 (description "This package provides a parser for and generator of the Git
10998 @url{https://www.kernel.org/pub/software/scm/git/docs/git-fast-import.html,fastimport}
11000 (license license:gpl2+)))
11002 (define-public python2-fastimport
11003 (package-with-python2 python-fastimport))
11005 (define-public python-twisted
11007 (name "python-twisted")
11011 (uri (pypi-uri "Twisted" version ".tar.bz2"))
11014 "0ydxrp9myw1mvsz3qfzx5579y5llmqa82pxvqchgp5syczffi450"))))
11015 (build-system python-build-system)
11017 '(#:tests? #f)) ; FIXME: Some tests are failing.
11019 ;; (modify-phases %standard-phases
11022 ;; (zero? (system* "./bin/trial" "twisted")))))
11024 `(("python-zope-interface" ,python-zope-interface)))
11025 (home-page "https://twistedmatrix.com/")
11026 (synopsis "Asynchronous networking framework written in Python")
11028 "Twisted is an extensible framework for Python programming, with special
11029 focus on event-based network programming and multiprotocol integration.")
11030 (license license:expat)))
11032 (define-public python2-twisted
11033 (package-with-python2 python-twisted))
11035 (define-public python-pika
11037 (name "python-pika")
11042 (uri (pypi-uri "pika" version))
11045 "0nb4h08di432lv7dy2v9kpwgk0w92f24sqc2hw2s9vwr5b8v8xvj"))))
11046 (build-system python-build-system)
11048 `(("python-pyev" ,python-pyev)
11049 ("python-tornado" ,python-tornado)
11050 ("python-twisted" ,python-twisted)))
11051 (home-page "https://pika.readthedocs.org")
11052 (synopsis "Pure Python AMQP Client Library")
11054 "Pika is a pure-Python implementation of the AMQP (Advanced Message Queuing
11055 Protocol) 0-9-1 protocol that tries to stay fairly independent of the underlying
11056 network support library.")
11057 (license license:bsd-3)))
11059 (define-public python2-pika
11060 (package-with-python2 python-pika))
11062 (define-public python-ply
11064 (name "python-ply")
11069 (uri (pypi-uri "ply" version))
11072 "0gpl0yli3w03ipyqfrp3w5nf0iawhsq65anf5wwm2wf5p502jzhd"))))
11073 (build-system python-build-system)
11074 (home-page "http://www.dabeaz.com/ply/")
11075 (synopsis "Python Lex & Yacc")
11076 (description "PLY is a @code{lex}/@code{yacc} implemented purely in Python.
11077 It uses LR parsing and does extensive error checking.")
11078 (license license:bsd-3)))
11080 (define-public python2-ply
11081 (package-with-python2 python-ply))
11083 (define-public python-tabulate
11085 (name "python-tabulate")
11089 (uri (pypi-uri "tabulate" version))
11092 "1inqhspd4frxnp08c32yndr0lc4px1xfkqah184i5w09gkhvi843"))))
11093 (build-system python-build-system)
11095 ;; FIXME: The pypi release tarball is missing a 'test/common.py'
11096 ;; and the latest release is not tagged in the upstream repository.
11098 (home-page "https://bitbucket.org/astanin/python-tabulate")
11099 (synopsis "Pretty-print tabular data")
11101 "Tabulate is a library and command-line utility to pretty-print tabular
11103 (license license:expat)))
11105 (define-public python2-tabulate
11106 (package-with-python2 python-tabulate))
11108 (define-public python-kazoo
11110 (name "python-kazoo")
11115 (uri (pypi-uri "kazoo" version))
11118 "10pb864if9qi2pq9lfb9m8f7z7ss6rml80gf1d9h64lap5crjnjj"))))
11119 (build-system python-build-system)
11120 (arguments '(#:tests? #f)) ; XXX: needs zookeeper
11122 `(("python-six" ,python-six)))
11123 (home-page "https://kazoo.readthedocs.org")
11124 (synopsis "High-level Zookeeper client library")
11126 "Kazoo is a Python client library for the Apache Zookeeper distributed
11127 application service. It is designed to be easy to use and to avoid common
11128 programming errors.")
11129 (license license:asl2.0)))
11131 (define-public python2-kazoo
11132 (package-with-python2 python-kazoo))
11134 (define-public python-pykafka
11136 (name "python-pykafka")
11140 (uri (string-append
11141 "https://pypi.python.org/packages/8b/3e/"
11142 "384eeff406b06315738b62483fd2126c6e4f544167116b17cc04ea7d2a59/"
11143 "pykafka-" version ".tar.gz"))
11146 "1id6sr159p6aa13bxcqyr9gln8sqg1l0ddzns5iws8kk5q1p5cfv"))))
11147 (build-system python-build-system)
11148 (arguments '(#:tests? #f)) ; XXX: needs zookeeper, kafka, etc.
11150 `(("python-gevent" ,python-gevent)
11151 ("python-kazoo" ,python-kazoo)
11152 ("python-tabulate" ,python-tabulate)))
11154 `(("librdkafka" ,librdkafka)))
11155 (home-page "https://pykafka.readthedocs.io/")
11156 (synopsis "Apache Kafka client for Python")
11158 "PyKafka is a client for the Apache Kafka distributed messaging system.
11159 It includes Python implementations of Kafka producers and consumers, which
11160 are optionally backed by a C extension built on librdkafka.")
11161 (license license:asl2.0)))
11163 (define-public python2-pykafka
11164 (package-with-python2 python-pykafka))
11166 (define-public python-wcwidth
11168 (name "python-wcwidth")
11173 (uri (string-append
11174 "https://pypi.python.org/packages/"
11175 "c2/d1/7689293086a8d5320025080cde0e3155b94ae0a7496fb89a3fbaa92c354a/"
11176 "wcwidth-" version ".tar.gz"))
11179 "02wjrpf001gjdjsaxxbzcwfg19crlk2dbddayrfc2v06f53yrcyw"))))
11180 (build-system python-build-system)
11181 (home-page "https://github.com/jquast/wcwidth")
11182 (synopsis "Measure number of terminal column cells of wide-character codes")
11183 (description "Wcwidth measures the number of terminal column cells of
11184 wide-character codes. It is useful for those implementing a terminal emulator,
11185 or programs that carefully produce output to be interpreted by one. It is a
11186 Python implementation of the @code{wcwidth} and @code{wcswidth} C functions
11187 specified in POSIX.1-2001 and POSIX.1-2008.")
11188 (license license:expat)))
11190 (define-public python2-wcwidth
11191 (package-with-python2 python-wcwidth))
11193 (define-public python2-jsonrpclib
11195 (name "python2-jsonrpclib")
11199 (uri (string-append
11200 "https://pypi.python.org/packages/source/j/jsonrpclib/"
11201 "jsonrpclib-" version ".tar.gz"))
11204 "02vgirw2bcgvpcxhv5hf3yvvb4h5wzd1lpjx8na5psdmaffj6l3z"))))
11205 (build-system python-build-system)
11208 #:python ,python-2))
11209 (home-page "https://github.com/joshmarshall/jsonrpclib/")
11210 (synopsis "Implementation of JSON-RPC specification for Python")
11212 "This library is an implementation of the JSON-RPC specification.
11213 It supports both the original 1.0 specification, as well as the
11214 new (proposed) 2.0 spec, which includes batch submission, keyword arguments,
11216 (license license:asl2.0)))
11218 (define-public python-chai
11220 (name "python-chai")
11224 (uri (pypi-uri "chai" version))
11227 "016kf3irrclpkpvcm7q0gmkfibq7jgy30a9v73pp42bq9h9a32bl"))))
11228 (build-system python-build-system)
11229 (home-page "https://github.com/agoragames/chai")
11230 (synopsis "Mocking framework for Python")
11232 "Chai provides an api for mocking, stubbing and spying your python
11233 objects, patterned after the Mocha library for Ruby.")
11234 (license license:bsd-3)))
11236 (define-public python2-chai
11237 (package-with-python2 python-chai))
11239 (define-public python-arrow
11241 (name "python-arrow")
11245 (uri (pypi-uri "arrow" version))
11248 "1bz7hkdgpqcjs866y58z8jywpy7al0f4rxdr00bh2l5qddyw245j"))))
11249 (build-system python-build-system)
11252 ("python-chai" ,python-chai)
11253 ("python-simplejson" ,python-simplejson)))
11255 `(("python-dateutil" ,python-dateutil)))
11256 (home-page "https://github.com/crsmithdev/arrow/")
11257 (synopsis "Dates and times for Python")
11259 "Arrow is a Python library to creating, manipulating, formatting and
11260 converting dates, times, and timestamps. It implements and updates the
11262 (license license:asl2.0)))
11264 (define-public python2-arrow
11265 (package-with-python2 python-arrow))
11267 (define-public python-inflection
11269 (name "python-inflection")
11272 (origin (method url-fetch)
11273 (uri (pypi-uri "inflection" version))
11276 "1jhnxgnw8y3mbzjssixh6qkc7a3afc4fygajhqrqalnilyvpzshq"))))
11277 (build-system python-build-system)
11279 `(("python-pytest" ,python-pytest)))
11280 (home-page "http://github.com/jpvanhal/inflection")
11281 (synopsis "Python string transformation library")
11283 "Inflection is a string transformation library. It singularizes
11284 and pluralizes English words, and transforms strings from CamelCase to
11285 underscored string.")
11286 (license license:expat)))
11288 (define-public python2-inflection
11289 (package-with-python2 python-inflection))
11291 (define-public python-pylev
11293 (name "python-pylev")
11297 (uri (pypi-uri "pylev" version))
11300 "1hz1x9blsbxya1y9nnhnwwdnqmakxi9mc0jkwj0rn6b1h44i0f86"))))
11301 (build-system python-build-system)
11302 (home-page "http://github.com/toastdriven/pylev")
11303 (synopsis "Levenshtein distance implementation in Python")
11304 (description "Pure Python Levenshtein implementation, based off the
11305 Wikipedia code samples at
11306 @url{http://en.wikipedia.org/wiki/Levenshtein_distance}.")
11307 (license license:bsd-3)))
11309 (define-public python2-pylev
11310 (package-with-python2 python-pylev))
11312 (define-public python-cleo
11314 (name "python-cleo")
11318 (uri (pypi-uri "cleo" version))
11321 "1k2dcl6mqpn5bljyl6w42rqyd9mb3y9kh2mg7m2x3kfjwvg0rpva"))))
11322 (build-system python-build-system)
11325 ("python-mock" ,python-mock)
11326 ("python-pytest" ,python-pytest)))
11328 `(("python-psutil" ,python-psutil)
11329 ("python-pylev" ,python-pylev)))
11330 (home-page "https://github.com/sdispater/cleo")
11331 (synopsis "Command-line arguments library for Python")
11333 "Cleo allows you to create command-line commands with signature in
11334 docstring and colored output.")
11335 (license license:expat)))
11337 (define-public python2-cleo
11338 (package-with-python2 python-cleo))
11340 (define-public python-lazy-object-proxy
11342 (name "python-lazy-object-proxy")
11346 (uri (pypi-uri "lazy-object-proxy" version))
11349 "0s22aqqkdscyh8sjspyyax7qa1aiz8p4midrnyf39717fhfczm6x"))))
11350 (build-system python-build-system)
11351 (home-page "https://github.com/ionelmc/python-lazy-object-proxy")
11352 (synopsis "Lazy object proxy for python")
11354 "Lazy object proxy is an object that wraps a callable but defers the call
11355 until the object is actually required, and caches the result of said call.")
11356 (license license:bsd-2)))
11358 (define-public python2-lazy-object-proxy
11359 (package-with-python2 python-lazy-object-proxy))
11361 (define-public python-dnspython
11363 (name "python-dnspython")
11367 (uri (string-append "http://www.dnspython.org/kits/"
11368 version "/dnspython-" version ".tar.gz"))
11371 "0jr4v2pd90i6l1xxbss2m05psbjaxvyvvvpq44wycijpfgjqln8i"))))
11372 (build-system python-build-system)
11373 (arguments '(#:tests? #f)) ; XXX: requires internet access
11374 (home-page "http://www.dnspython.org")
11375 (synopsis "DNS toolkit for Python")
11377 "dnspython is a DNS toolkit for Python. It supports almost all record
11378 types. It can be used for queries, zone transfers, and dynamic updates.
11379 It supports TSIG authenticated messages and EDNS0.")
11380 (license license:expat)))
11382 (define-public python2-dnspython
11383 (package-with-python2 python-dnspython))
11385 (define-public python-email-validator
11387 (name "python-email-validator")
11390 (origin (method url-fetch)
11391 (uri (pypi-uri "email_validator" version))
11394 "1ja9149l9ck5n45a72h3is7v476hjny5ybxbcamx1nw6iplsm7k6"))))
11395 (build-system python-build-system)
11398 (modify-phases %standard-phases
11399 (add-before 'build 'use-dnspython
11401 (substitute* "setup.py"
11402 (("dnspython3") "dnspython"))
11405 `(("python-dnspython" ,python-dnspython)
11406 ("python-idna" ,python-idna)))
11407 (home-page "https://github.com/JoshData/python-email-validator")
11408 (synopsis "Email address validation library for Python")
11410 "This library validates email address syntax and deliverability.")
11411 (license license:cc0)))
11413 (define-public python2-email-validator
11414 (package-with-python2 python-email-validator))
11416 (define-public python-ukpostcodeparser
11418 (name "python-ukpostcodeparser")
11422 (uri (pypi-uri "UkPostcodeParser" version))
11425 "1jwg9z4rz51mcka1821rwgycsd0mcicyp1kiwjfa2kvg8bm9p2qd"))))
11426 (build-system python-build-system)
11427 (home-page "https://github.com/hamstah/ukpostcodeparser")
11428 (synopsis "UK Postcode parser for Python")
11430 "This library provides the @code{parse_uk_postcode} function for
11431 parsing UK postcodes.")
11432 (license license:expat)))
11434 (define-public python2-ukpostcodeparser
11435 (package-with-python2 python-ukpostcodeparser))
11437 (define-public python-faker
11439 (name "python-faker")
11443 (uri (pypi-uri "Faker" version))
11446 "1fh2p2yz0fsdr4fqwxgddwbvfb6qn6vp8yx0qwqzra27yq5d1wsm"))
11448 (search-patches "python-faker-fix-build-32bit.patch"))
11449 (modules '((guix build utils)))
11452 (for-each delete-file (find-files "." "\\.pyc$"))
11454 (build-system python-build-system)
11457 (modify-phases %standard-phases
11460 (zero? (system* "python" "-m" "unittest" "-v" "tests")))))))
11463 ("python-email-validator" ,python-email-validator)
11464 ("python-mock" ,python-mock)
11465 ("python-ukpostcodeparser" ,python-ukpostcodeparser)))
11467 `(("python-dateutil" ,python-dateutil)
11468 ("python-six" ,python-six)))
11469 (home-page "https://github.com/joke2k/faker")
11470 (synopsis "Python package that generates fake data")
11472 "Faker is a Python package that generates fake data such as names,
11473 addresses, and phone numbers.")
11474 (license license:expat)
11475 (properties `((python2-variant . ,(delay python2-faker))))))
11477 (define-public python2-faker
11478 (let ((base (package-with-python2 (strip-python2-variant
11483 `(("python2-ipaddress" ,python2-ipaddress)
11484 ,@(package-propagated-inputs base))))))
11486 (define-public python-fake-factory
11488 (name "python-fake-factory")
11492 (uri (pypi-uri "fake-factory" version))
11495 "0vs0dkmg0dlaxf8w6q2i3k0i03gmp56ablldv7ci9x3nbadkn71g"))
11498 "python-fake-factory-fix-build-32bit.patch"))))
11499 (build-system python-build-system)
11502 (modify-phases %standard-phases
11505 (zero? (system* "python" "-m" "unittest" "-v" "faker.tests")))))))
11508 ("python-email-validator" ,python-email-validator)
11509 ("python-mock" ,python-mock)
11510 ("python-ukpostcodeparser" ,python-ukpostcodeparser)))
11512 `(("python-dateutil" ,python-dateutil)
11513 ("python-six" ,python-six)))
11514 (home-page "https://github.com/joke2k/faker")
11515 (synopsis "Python package that generates fake data")
11517 "Faker is a Python package that generates fake data such as names,
11518 addresses, and phone numbers.")
11519 (license license:expat)
11520 (properties `((python2-variant . ,(delay python2-fake-factory))
11521 (superseded . ,python-faker)))))
11523 (define-public python2-fake-factory
11524 (let ((base (package-with-python2 (strip-python2-variant
11525 python-fake-factory))))
11528 (properties `((superseded . ,python2-faker)))
11530 `(("python2-ipaddress" ,python2-ipaddress)
11531 ,@(package-propagated-inputs base))))))
11533 (define-public python-pyaml
11535 (name "python-pyaml")
11539 (uri (pypi-uri "pyaml" version))
11542 "1f5m28vkh4ksq3d80d8mmd2z8wxvc3mgy2pmrv2751dm2xgznm4w"))))
11543 (build-system python-build-system)
11545 `(("python-unidecode" ,python-unidecode)))
11547 `(("python-pyyaml" ,python-pyyaml)))
11548 (home-page "https://github.com/mk-fg/pretty-yaml")
11549 (synopsis "YAML pretty-print library for Python")
11551 "pyaml is a PyYAML based python module to produce pretty and readable
11552 YAML-serialized data.")
11553 (license (license:non-copyleft "http://www.wtfpl.net/txt/copying/"))))
11555 (define-public python2-pyaml
11556 (package-with-python2 python-pyaml))
11558 (define-public python-flexmock
11560 (name "python-flexmock")
11564 (uri (pypi-uri "flexmock" version))
11567 "0arc6njvs6i9v9hgvzk5m50296g7zy5m9d7pyb43vdsdgxrci5gy"))))
11568 (build-system python-build-system)
11569 (home-page "https://flexmock.readthedocs.org")
11570 (synopsis "Testing library for Python")
11572 "flexmock is a testing library for Python that makes it easy to create
11573 mocks, stubs and fakes.")
11574 (license license:bsd-3)))
11576 (define-public python2-flexmock
11577 (package-with-python2 python-flexmock))
11579 (define-public python-orator
11581 (name "python-orator")
11585 (uri (pypi-uri "orator" version))
11588 "1li49irsqha17nrda4nsb48biyy0rarp9pphf0jpqwm5zr8hv569"))))
11589 (build-system python-build-system)
11590 (arguments '(#:tests? #f)) ; no tests
11592 `(("python-arrow" ,python-arrow)
11593 ("python-blinker" ,python-blinker)
11594 ("python-cleo" ,python-cleo)
11595 ("python-faker" ,python-faker)
11596 ("python-inflection" ,python-inflection)
11597 ("python-lazy-object-proxy" ,python-lazy-object-proxy)
11598 ("python-pyaml" ,python-pyaml)
11599 ("python-simplejson" ,python-simplejson)
11600 ("python-wrapt" ,python-wrapt)))
11601 (home-page "https://orator-orm.com/")
11602 (synopsis "ActiveRecord ORM for Python")
11604 "Orator provides a simple ActiveRecord-like Object Relational Mapping
11605 implementation for Python.")
11606 (license license:expat)
11607 (properties `((python2-variant . ,(delay python2-orator))))))
11609 (define-public python2-orator
11610 (let ((base (package-with-python2 (strip-python2-variant python-orator))))
11614 `(("python2-ipaddress" ,python2-ipaddress)
11615 ,@(package-propagated-inputs base))))))
11617 (define-public python-prompt-toolkit
11619 (name "python-prompt-toolkit")
11624 (uri (pypi-uri "prompt_toolkit" version ".tar.gz"))
11627 "172r15k9kwdw2lnajvpz1632dd16nqz1kcal1p0lq5ywdarj6rfd"))))
11628 (build-system python-build-system)
11630 '(#:tests? #f)) ; The test suite uses some Windows-specific data types.
11632 `(("python-wcwidth" ,python-wcwidth)
11633 ("python-six" ,python-six)
11634 ("python-pygments" ,python-pygments)))
11635 (home-page "https://github.com/jonathanslenders/python-prompt-toolkit")
11636 (synopsis "Library for building command line interfaces in Python")
11638 "Prompt-Toolkit is a library for building interactive command line
11639 interfaces in Python. It's like GNU Readline but it also features syntax
11640 highlighting while typing, out-of-the-box multi-line input editing, advanced
11641 code completion, incremental search, support for Chinese double-width
11642 characters, mouse support, and auto suggestions.")
11643 (license license:bsd-3)))
11645 (define-public python2-prompt-toolkit
11646 (package-with-python2 python-prompt-toolkit))
11648 (define-public python-jedi
11650 (name "python-jedi")
11655 (uri (pypi-uri "jedi" version))
11658 "0c8x962ynpx001fdvp07m2q5jk4igkxbj3rmnydavphvlgxijk1v"))))
11659 (build-system python-build-system)
11661 ;; FIXME: One test fails (use "py.test" instead of 'setup.py test').
11664 `(("python-pytest" ,python-pytest)))
11665 (home-page "https://github.com/davidhalter/jedi")
11667 "Autocompletion for Python that can be used for text editors")
11669 "Jedi is an autocompletion tool for Python that can be used for text editors.")
11670 (license license:expat)))
11672 (define-public python2-jedi
11673 (package-with-python2 python-jedi))
11675 (define-public ptpython
11681 (uri (pypi-uri "ptpython" version))
11684 "1mmbiyzf0n8hm7z2a562x7w5cbl6jc0zsk6vp40q1z4cyblv1k13"))))
11685 (build-system python-build-system)
11687 '(#:tests? #f)) ; FIXME: No tests in pypi tarball.
11689 `(("python-docopt" ,python-docopt)
11690 ("python-jedi" ,python-jedi)
11691 ("python-prompt-toolkit" ,python-prompt-toolkit)
11692 ("python-pygments" ,python-pygments)))
11693 (home-page "https://github.com/jonathanslenders/ptpython")
11694 (synopsis "Python Read-Eval-Print-Loop with nice IDE-like features")
11696 "ptpython is a Python read-eval-print loop with IDE-like features.
11697 It supports syntax highlighting, multiline editing, autocompletion, mouse,
11698 color schemes, bracketed paste, Vi and Emacs keybindings, Chinese characters
11700 (license license:bsd-3)
11701 (properties `((python2-variant . ,(delay ptpython-2))))))
11703 (define-public ptpython-2
11704 (let ((base (package-with-python2 (strip-python2-variant ptpython))))
11707 (name "ptpython2"))))
11709 (define-public python-requests-oauthlib
11711 (name "python-requests-oauthlib")
11716 (uri (pypi-uri "requests-oauthlib" version))
11719 "0ykff67sjcl227c23g0rxzfx34rr5bf21kwv0z3zmgk0lfmch7hn"))))
11720 (build-system python-build-system)
11723 (modify-phases %standard-phases
11724 ;; removes tests that require network access
11725 (add-before 'check 'pre-check
11727 (delete-file "tests/test_core.py")
11730 `(("python-requests-mock" ,python-requests-mock)
11731 ("python-mock" ,python-mock)))
11733 `(("python-oauthlib" ,python-oauthlib)
11734 ("python-requests" ,python-requests)))
11736 "https://github.com/requests/requests-oauthlib")
11738 "OAuthlib authentication support for Requests")
11740 "Requests-OAuthlib uses the Python Requests and OAuthlib libraries to
11741 provide an easy-to-use Python interface for building OAuth1 and OAuth2 clients.")
11742 (license license:isc)))
11744 (define-public python2-requests-oauthlib
11745 (package-with-python2 python-requests-oauthlib))
11747 (define-public python-stem
11749 (name "python-stem")
11754 (uri (pypi-uri "stem" version))
11757 "1j7pnblrn0yr6jmxvsq6y0ihmxmj5x50jl2n2606w67f6wq16j9n"))))
11758 (build-system python-build-system)
11761 (modify-phases %standard-phases
11764 (zero? (system* "./run_tests.py" "--unit")))))))
11766 `(("python-mock" ,python-mock)
11767 ("python-pep8" ,python-pep8)
11768 ("python-pyflakes" ,python-pyflakes)))
11769 (home-page "https://stem.torproject.org/")
11771 "Python controller library that allows applications to interact with Tor")
11773 "Stem is a Python controller library for Tor. With it you can use Tor's
11774 control protocol to script against the Tor process and read descriptor data
11775 relays publish about themselves.")
11776 (license license:lgpl3)))
11778 (define-public python2-stem
11779 (package-with-python2 python-stem))
11781 (define-public python-pyserial
11783 (name "python-pyserial")
11788 (uri (pypi-uri "pyserial" version))
11791 "0k1nfdrxxkdlv4zgaqsdv8li0pj3gbh2pyxw8q2bsg6f9490amyn"))))
11792 (build-system python-build-system)
11794 '(#:tests? #f)) ; FIXME: 3/49 tests are failing.
11796 ;; (modify-phases %standard-phases
11799 ;; (zero? (system* "python" "test/run_all_tests.py" "loop://")))))))
11801 "https://github.com/pyserial/pyserial")
11802 (synopsis "Python Serial Port Bindings")
11803 (description "@code{pyserial} provide serial port bindings for Python. It
11804 supports different byte sizes, stop bits, parity and flow control with RTS/CTS
11805 and/or Xon/Xoff. The port is accessed in RAW mode.")
11806 (license license:bsd-3)))
11808 (define-public python2-pyserial
11809 (package-with-python2 python-pyserial))
11811 (define-public python-kivy
11813 (name "python-kivy")
11818 (uri (pypi-uri "kivy" version))
11819 (file-name (string-append name "-" version ".tar.gz"))
11822 "0zk3g1j1z0lzcm9d0k1lprrs95zr8n8k5pdg3p5qlsn26jz4bg19"))))
11823 (build-system python-build-system)
11825 `(#:tests? #f ; Tests require many optional packages
11827 (modify-phases %standard-phases
11828 (replace 'build (lambda _ (zero? (system* "make" "force"))))
11829 (add-after 'patch-generated-file-shebangs 'set-sdl-paths
11830 (lambda* (#:key inputs #:allow-other-keys)
11831 (setenv "KIVY_SDL2_PATH"
11832 (string-append (assoc-ref inputs "sdl-union")
11836 `(("pkg-config" ,pkg-config)
11837 ("python-cython" ,python-cython)))
11839 `(("gstreamer" ,gstreamer)
11842 ,(sdl-union (list sdl2 sdl2-image sdl2-mixer sdl2-ttf)))))
11843 (home-page "http://kivy.org")
11845 "Multitouch application framework")
11847 "A software library for rapid development of
11848 hardware-accelerated multitouch applications.")
11849 (license license:expat)))
11851 (define-public python2-kivy
11852 (package-with-python2 python-kivy))
11854 (define-public python-kivy-next
11855 (let ((commit "a988c5e7a47da56263ff39514264a3de516ef2fe")
11857 (package (inherit python-kivy)
11858 (name "python-kivy-next")
11859 (version (string-append "1.9.1-" revision "."
11860 (string-take commit 7)))
11864 (uri (git-reference
11865 (url "https://github.com/kivy/kivy")
11867 (file-name (string-append name "-" version "-checkout"))
11870 "0jk92b4a8l7blkvkgkjihk171s0dfnq582cckff5srwc8kal5m0p")))))))
11872 (define-public python2-kivy-next
11873 (package-with-python2 python-kivy-next))
11875 (define-public python-binaryornot
11877 (name "python-binaryornot")
11881 (uri (pypi-uri "binaryornot" version))
11884 "1j4f51dxic39mdwf6alj7gd769wy6mhk916v031wjali51xkh3xb"))))
11885 (build-system python-build-system)
11887 `(("python-chardet" ,python-chardet)
11888 ("python-hypothesis" ,python-hypothesis)))
11889 (home-page "https://github.com/audreyr/binaryornot")
11890 (synopsis "Package to check if a file is binary or text")
11891 (description "Ultra-lightweight pure Python package to check if a file is
11893 (license license:bsd-3)
11894 (properties `((python2-variant . ,(delay python2-binaryornot))))))
11896 (define-public python2-binaryornot
11897 (let ((base (package-with-python2 (strip-python2-variant python-binaryornot))))
11898 (package (inherit base)
11900 `(("python2-enum34" ,python2-enum34)
11901 ,@(package-propagated-inputs base))))))
11903 (define-public python-nltk
11905 (name "python-nltk")
11909 (uri (pypi-uri "nltk" version))
11912 "0skxbhnymwlspjkzga0f7x1hg3y50fwpfghs8g8k7fh6f4nknlym"))))
11913 (build-system python-build-system)
11915 '(;; The tests require some extra resources to be downloaded.
11916 ;; TODO Try packaging these resources.
11918 (home-page "http://nltk.org/")
11919 (synopsis "Natural Language Toolkit")
11920 (description "It provides interfaces to over 50 corpora and lexical
11921 resources such as WordNet, along with a suite of text processing libraries
11922 for classification, tokenization, stemming, tagging, parsing, and semantic
11923 reasoning, wrappers for natural language processing libraries.")
11924 (license license:asl2.0)))
11926 (define-public python2-nltk
11927 (package-with-python2 python-nltk))
11929 (define-public python-pymongo
11931 (name "python-pymongo")
11935 (uri (pypi-uri "pymongo" version))
11938 "07mra6w86wjqy4lx5fvimidjhhfzd562gfjn8grsnbv2q8pk0i9x"))))
11939 (build-system python-build-system)
11941 `(("python-certifi" ,python-certifi)))
11942 (home-page "http://github.com/mongodb/mongo-python-driver")
11943 (synopsis "Python driver for MongoDB")
11944 (description "Python driver for MongoDB.")
11945 (license license:asl2.0)))
11947 (define-public python2-pymongo
11948 (package-with-python2 python-pymongo))
11950 (define-public python-sh
11956 (uri (pypi-uri "sh" version))
11959 "192r0mpv6dmkysjzhc43ddffiwb5g7c76bgr1mb1z2xz9awbj3sr"))))
11960 (build-system python-build-system)
11962 `(#:tests? #f)) ; no tests
11963 (home-page "https://github.com/amoffat/sh")
11964 (synopsis "Python subprocess interface")
11965 (description "Abstracts process invocation by providing a function
11966 interface for programs.")
11967 (license license:expat)))
11969 (define-public python2-sh
11970 (package-with-python2 python-sh))
11972 (define-public python-consul
11974 (name "python-consul")
11979 (uri (pypi-uri "python-consul" version))
11982 "0rfyxcy4cr3x848vhx876ifalxd5ghq6l5x813m49h4vq2d4jiq8"))))
11983 (build-system python-build-system)
11985 `(("python-pytest" ,python-pytest)))
11987 `(("python-requests" ,python-requests)
11988 ("python-six" ,python-six)))
11989 (home-page "https://github.com/cablehead/python-consul")
11990 (synopsis "Python client for Consul")
11992 "Python client for @url{http://www.consul.io/,Consul}, a tool for service
11993 discovery, monitoring and configuration.")
11994 (license license:expat)))
11996 (define-public python2-consul
11997 (package-with-python2 python-consul))
11999 (define-public python-schematics
12001 (name "python-schematics")
12006 (uri (string-append
12007 "https://github.com/schematics/schematics/archive/v" version ".tar.gz"))
12008 (file-name (string-append name "-" version ".tar.gz"))
12011 "19v1i69bf3bzarfxmbv0v6ivpcn758x3shvbiy9l2hy0lvqwnp6l"))))
12012 (build-system python-build-system)
12014 `(("python-six" ,python-six)))
12016 `(#:tests? #f)) ; requires a bunch of not very nice packages with fixed
12017 ; version requirements (eg python-coveralls)
12018 (home-page "https://github.com/schematics/schematics")
12019 (synopsis "Python Data Structures for Humans")
12020 (description "Python Data Structures for Humans.")
12021 (license license:bsd-3)))
12023 (define-public python2-schematics
12024 (package-with-python2 python-schematics))
12026 (define-public python-publicsuffix
12028 (name "python-publicsuffix")
12032 (uri (pypi-uri "publicsuffix" version))
12035 "1adx520249z2cy7ykwjr1k190mn2888wqn9jf8qm27ly4qymjxxf"))))
12036 (build-system python-build-system)
12038 `(#:tests? #f)) ; tests use the internet
12039 (home-page "https://www.tablix.org/~avian/git/publicsuffix.git")
12040 (synopsis "Get suffix for a domain name")
12041 (description "Get a public suffix for a domain name using the Public Suffix
12043 (license license:expat)))
12045 (define-public python2-publicsuffix
12046 (package-with-python2 python-publicsuffix))
12048 (define-public python-publicsuffix2
12050 (name "python-publicsuffix2")
12051 (version "2.20160621")
12055 (uri (pypi-uri "publicsuffix2" version ".tar.bz2"))
12058 "06lx603gdwad5hc3hmn763ngq0rq9bzz1ni3ga72nzk5n872arkd"))))
12059 (build-system python-build-system)
12061 '(#:tests? #f)) ; The test suite requires network access.
12062 (home-page "https://github.com/pombredanne/python-publicsuffix2")
12063 (synopsis "Get a public suffix for a domain name using the Public Suffix List")
12064 (description "Get a public suffix for a domain name using the Public Suffix
12065 List. Forked from and using the same API as the publicsuffix package.")
12066 (license (list license:expat license:mpl2.0))))
12068 (define-public python2-publicsuffix2
12069 (package-with-python2 python-publicsuffix2))
12071 (define-public python-url
12073 (name "python-url")
12077 (uri (pypi-uri "url" version))
12080 "0v879yadcz9qxfl41ak6wkga1kimp9cflla9ddz03hjjvgkqy5ki"))))
12081 (build-system python-build-system)
12083 `(("python-publicsuffix" ,python-publicsuffix)))
12085 `(("python-coverage" ,python-coverage)
12086 ("python-nose" ,python-nose)))
12088 `(#:tests? #f)) ; FIXME: tests fail with "ImportError: No module named 'tests'"
12089 (home-page "http://github.com/seomoz/url-py")
12090 (synopsis "URL Parsing")
12091 (description "Library for parsing urls.")
12092 (license license:expat)
12093 (properties `((python2-variant . ,(delay python2-url))))))
12095 (define-public python2-url
12096 (let ((base (package-with-python2 (strip-python2-variant python-url))))
12097 (package (inherit base)
12099 `(("python2-publicsuffix" ,python2-publicsuffix))))))
12101 (define-public python-freezegun
12103 (name "python-freezegun")
12108 (uri (pypi-uri "freezegun" version))
12111 "1sf38d3ibv1jhhvr52x7dhrsiyqk1hm165dfv8w8wh0fhmgxg151"))))
12112 (build-system python-build-system)
12114 `(("python-mock" ,python-mock)
12115 ("python-nose" ,python-nose)
12116 ("python-coverage" ,python-coverage)))
12118 `(("python-six" ,python-six)
12119 ("python-dateutil" ,python-dateutil)))
12121 `(#:phases (modify-phases %standard-phases
12122 ;; The tests are normally executed via `make test`, but the PyPi
12123 ;; package does not include the Makefile.
12126 (zero? (system* "nosetests" "./tests/")))))))
12127 (home-page "https://github.com/spulec/freezegun")
12128 (synopsis "Test utility for mocking the datetime module")
12130 "FreezeGun is a library that allows your python tests to travel through
12131 time by mocking the datetime module.")
12132 (license license:asl2.0)))
12134 (define-public python2-freezegun
12135 (package-with-python2 python-freezegun))
12138 (define-public python-odfpy
12140 (name "python-odfpy")
12144 (uri (pypi-uri "odfpy" version))
12147 "1a6ms0w9zfhhkqhvrnynwwbxrivw6hgjc0s5k7j06npc7rq0blxw"))))
12149 `(#:modules ((srfi srfi-1)
12150 (guix build python-build-system)
12151 (guix build utils))
12153 (modify-phases %standard-phases
12155 ;; The test runner invokes python2 and python3 for test*.py.
12156 ;; To avoid having both in inputs, we replicate it here.
12158 (every (lambda (test-file)
12159 (zero? (system* "python" test-file)))
12160 (find-files "tests" "^test.*\\.py$")))))))
12161 (build-system python-build-system)
12162 (home-page "https://github.com/eea/odfpy")
12163 (synopsis "Python API and tools to manipulate OpenDocument files")
12164 (description "Collection of libraries and utility programs written in
12165 Python to manipulate OpenDocument 1.2 files.")
12167 ;; The software is mainly dual GPL2+ and ASL2.0, but includes a
12168 ;; number of files with other licenses.
12169 (list license:gpl2+ license:asl2.0 license:lgpl2.1+ license:cc-by-sa3.0))))
12171 (define-public python2-odfpy
12172 (package-with-python2 python-odfpy))
12174 (define-public python-cachecontrol
12176 (name "python-cachecontrol")
12181 ;; Pypi does not have tests.
12182 (uri (string-append
12183 "https://github.com/ionrock/cachecontrol/archive/v"
12184 version ".tar.gz"))
12185 (file-name (string-append name "-" version ".tar.gz"))
12188 "0yj60d0f69a2l8p7y86k4zhzzm6rnxpq74sfl240pry9l0lfw2vw"))))
12189 (build-system python-build-system)
12192 (modify-phases %standard-phases
12195 ;; Drop test that requires internet access.
12196 (delete-file "tests/test_regressions.py")
12197 (setenv "PYTHONPATH"
12198 (string-append (getcwd) "/build/lib:"
12199 (getenv "PYTHONPATH")))
12200 (zero? (system* "py.test" "-vv")))))))
12202 `(("python-pytest" ,python-pytest)
12203 ("python-redis" ,python-redis)
12204 ("python-webtest" ,python-webtest)
12205 ("python-mock" ,python-mock)))
12207 `(("python-requests" ,python-requests)
12208 ("python-lockfile" ,python-lockfile)))
12209 (home-page "https://github.com/ionrock/cachecontrol")
12210 (synopsis "The httplib2 caching algorithms for use with requests")
12211 (description "CacheControl is a port of the caching algorithms in
12212 @code{httplib2} for use with @code{requests} session objects.")
12213 (license license:asl2.0)))
12215 (define-public python2-cachecontrol
12216 (package-with-python2 python-cachecontrol))
12218 (define-public python-lit
12220 (name "python-lit")
12225 (uri (pypi-uri "lit" version))
12228 "135m2b9cwih85g66rjggavck328z7lj37srgpq3jxszbg0g2b91y"))))
12229 (build-system python-build-system)
12230 (home-page "http://llvm.org/")
12231 (synopsis "LLVM Software Testing Tool")
12232 (description "@code{lit} is a portable tool for executing LLVM and Clang
12233 style test suites, summarizing their results, and providing indication of
12235 (license license:ncsa)))
12237 (define-public python2-lit
12238 (package-with-python2 python-lit))
12240 (define-public python-pytest-pep8
12242 (name "python-pytest-pep8")
12246 (uri (pypi-uri "pytest-pep8" version))
12249 "06032agzhw1i9d9qlhfblnl3dw5hcyxhagn7b120zhrszbjzfbh3"))))
12250 (build-system python-build-system)
12252 `(#:tests? #f)) ; Fails with recent pytest and pep8. See upstream issues #8 and #12.
12254 `(("python-pytest" ,python-pytest)))
12256 `(("python-pep8" ,python-pep8)))
12257 (home-page "https://bitbucket.org/pytest-dev/pytest-pep8")
12258 (synopsis "Py.test plugin to check PEP8 requirements")
12259 (description "Pytest plugin for checking PEP8 compliance.")
12260 (license license:expat)))
12262 (define-public python2-pytest-pep8
12263 (package-with-python2 python-pytest-pep8))
12265 (define-public python-pytest-flakes
12267 (name "python-pytest-flakes")
12271 (uri (pypi-uri "pytest-flakes" version))
12274 "0flag3n33kbhyjrhzmq990rvg4yb8hhhl0i48q9hw0ll89jp28lw"))))
12275 (build-system python-build-system)
12278 (modify-phases %standard-phases
12280 (add-after 'install 'check
12281 (lambda* (#:key outputs inputs #:allow-other-keys)
12282 ;; It's easier to run tests after install.
12283 ;; Make installed package available for running the tests
12284 (add-installed-pythonpath inputs outputs)
12285 (zero? (system* "py.test" "-vv")))))))
12287 `(("python-coverage" ,python-coverage)
12288 ("python-pytest" ,python-pytest)
12289 ("python-pytest-cache" ,python-pytest-cache)
12290 ("python-pytest-pep8" ,python-pytest-pep8)))
12292 `(("python-pyflakes" ,python-pyflakes)))
12293 (home-page "https://github.com/fschulze/pytest-flakes")
12294 (synopsis "Py.test plugin to check source code with pyflakes")
12295 (description "Pytest plugin for checking Python source code with pyflakes.")
12296 (license license:expat)))
12298 (define-public python2-pytest-flakes
12299 (package-with-python2 python-pytest-flakes))
12301 (define-public python-natsort
12303 (name "python-natsort")
12307 (uri (pypi-uri "natsort" version))
12310 "1abld5p4a6n5zjnyw5mi2pv37gqalcybv2brjr2y6l9l2p8v9mja"))))
12311 (build-system python-build-system)
12314 (modify-phases %standard-phases
12315 (add-before 'check 'set-cachedir
12316 ;; Tests require write access to $HOME by default
12317 (lambda _ (setenv "PYTHON_EGG_CACHE" "/tmp") #t)))))
12319 `(("python-hypothesis" ,python-hypothesis)
12320 ("python-pytest-cache" ,python-pytest-cache)
12321 ("python-pytest-cov" ,python-pytest-cov)
12322 ("python-pytest-flakes" ,python-pytest-flakes)
12323 ("python-pytest-pep8" ,python-pytest-pep8)))
12324 (propagated-inputs ; TODO: Add python-fastnumbers.
12325 `(("python-pyicu" ,python-pyicu)))
12326 (home-page "https://github.com/SethMMorton/natsort")
12327 (synopsis "Natural sorting for python and shell")
12329 "Natsort lets you apply natural sorting on lists instead of
12330 lexicographical. If you use the built-in @code{sorted} method in python
12331 on a list such as @code{['a20', 'a9', 'a1', 'a4', 'a10']}, it would be
12332 returned as @code{['a1', 'a10', 'a20', 'a4', 'a9']}. Natsort provides a
12333 function @code{natsorted} that identifies numbers and sorts them separately
12334 from strings. It can also sort version numbers, real numbers, mixed types
12335 and more, and comes with a shell command @command{natsort} that exposes this
12336 functionality in the command line.")
12337 (license license:expat)
12338 (properties `((python2-variant . ,(delay python2-natsort))))))
12340 (define-public python2-natsort
12341 (let ((base (package-with-python2 (strip-python2-variant python-natsort))))
12342 (package (inherit base)
12344 `(("python2-pathlib" ,python2-pathlib)
12345 ("python2-mock" ,python2-mock)
12346 ("python2-enum34" ,python2-enum34)
12347 ,@(package-native-inputs base))))))
12349 (define-public python-glances
12351 (name "python-glances")
12356 (uri (pypi-uri "Glances" version))
12359 "11jbq40g8alsbirnd4kiagznqg270247i0m8qhi48ldf2i5xppxg"))))
12360 (build-system python-build-system)
12362 `(("python-psutil" ,python-psutil)))
12364 "https://github.com/nicolargo/glances")
12366 "A cross-platform curses-based monitoring tool")
12368 "Glances is a curses-based monitoring tool for a wide variety of platforms.
12369 Glances uses the PsUtil library to get information from your system. It monitors
12370 CPU, load, memory, network bandwidth, disk I/O, disk use, and more.")
12371 (license license:lgpl3+)))
12373 (define-public python2-glances
12374 (package-with-python2 python-glances))
12376 (define-public python-graphql-core
12378 (name "python-graphql-core")
12383 (uri (pypi-uri "graphql-core" version))
12386 "0rsaarx2sj4xnw9966rhh4haiqaapm4lm2mfqm48ywd51j5vh1a0"))))
12387 (build-system python-build-system)
12389 `(#:tests? #f ; Tests require the unpackaged pytest-benchmark.
12391 (modify-phases %standard-phases
12392 (add-after 'unpack 'patch-hardcoded-version
12393 (lambda _ (substitute*
12395 (("'gevent==1.1rc1'") "'gevent'"))
12398 `(("python-gevent" ,python-gevent)
12399 ("python-mock" ,python-mock)
12400 ("python-pytest-mock" ,python-pytest-mock)))
12402 `(("python-promise" ,python-promise)
12403 ("python-six" ,python-six)))
12404 (home-page "https://github.com/graphql-python/graphql-core")
12405 (synopsis "GraphQL implementation for Python")
12407 "GraphQL implementation for Python. GraphQL is a data query language and
12408 runtime designed and used to request and deliver data to mobile and web apps.
12409 This library is a port of @url{https://github.com/graphql/graphql-js,graphql-js}
12411 (license license:expat)))
12413 (define-public python2-graphql-core
12414 (package-with-python2 python-graphql-core))
12416 (define-public python-graphql-relay
12418 (name "python-graphql-relay")
12423 (uri (pypi-uri "graphql-relay" version))
12426 "1nv5dxcj59zv31qvl8bd142njmxcmymny2dz3br1l2cpbljbf5i7"))))
12427 (build-system python-build-system)
12429 `(("python-pytest" ,python-pytest)))
12431 `(("python-graphql-core" ,python-graphql-core)
12432 ("python-promise" ,python-promise)
12433 ("python-six" ,python-six)))
12434 (home-page "https://github.com/graphql-python/graphql-relay-py")
12435 (synopsis "Relay implementation for Python")
12437 "This is a library to allow the easy creation of Relay-compliant servers
12438 using the GraphQL Python reference implementation of a GraphQL server. It
12439 should be noted that the code is a exact port of the original
12440 @url{https://github.com/graphql/graphql-relay-js,graphql-relay js implementation}
12442 (license license:expat)))
12444 (define-public python2-graphql-relay
12445 (package-with-python2 python-graphql-relay))
12447 (define-public python-graphene
12449 (name "python-graphene")
12454 (uri (pypi-uri "graphene" version))
12457 "09zhac7igh9ixdz0ay6csy35b40l1jwbf2wrbxmgxwfhy51iy06q"))))
12458 (build-system python-build-system)
12460 `(("python-django-filter" ,python-django-filter)
12461 ("python-mock" ,python-mock)
12462 ("python-psycopg2" ,python-psycopg2)
12463 ("python-pytest-django" ,python-pytest-django)
12464 ("python-sqlalchemy-utils" ,python-sqlalchemy-utils)))
12466 `(("python-graphql-core" ,python-graphql-core)
12467 ("python-graphql-relay" ,python-graphql-relay)
12468 ("python-iso8601" ,python-iso8601)
12469 ("python-promise" ,python-promise)
12470 ("python-six" ,python-six)))
12471 (home-page "http://graphene-python.org/")
12472 (synopsis "GraphQL Framework for Python")
12474 "Graphene is a Python library for building GraphQL schemas/types.
12475 A GraphQL schema describes your data model, and provides a GraphQL server
12476 with an associated set of resolve methods that know how to fetch data.")
12477 (properties `((python2-variant . ,(delay python2-graphene))))
12478 (license license:expat)))
12480 (define-public python2-graphene
12481 (let ((base (package-with-python2
12482 (strip-python2-variant python-graphene))))
12483 (package (inherit base)
12485 `(("python2-sqlalchemy" ,python2-sqlalchemy)
12486 ,@(package-native-inputs base))))))
12488 (define-public python-nautilus
12490 (name "python-nautilus")
12495 (uri (pypi-uri "nautilus" version))
12498 "01hwzjc1zshk4vvxrcghm398fpy4jls66dyz06g07mrwqif8878p"))))
12499 (build-system python-build-system)
12500 (arguments `(#:tests? #f)) ; fails to import test modules
12502 `(("python-bcrypt" ,python-bcrypt)
12503 ("python-click" ,python-click)
12504 ("python-consul" ,python-consul)
12505 ("python-graphene" ,python-graphene)
12506 ("python-jinja2" ,python-jinja2)
12507 ("python-peewee" ,python-peewee)
12508 ("python-pika" ,python-pika)
12509 ("python-tornado" ,python-tornado)
12510 ("python-wtforms" ,python-wtforms)))
12512 `(("python-nose2" ,python-nose2)))
12513 (home-page "https://github.com/AlecAivazis/nautilus")
12514 (synopsis "Library for creating microservice applications")
12516 "Nautilus is a framework for flux based microservices that looks to
12517 provide extendible implementations of common aspects of a cloud so that you can
12518 focus on building massively scalable web applications.")
12519 (license license:expat)))
12521 (define-public python-snowballstemmer
12523 (name "python-snowballstemmer")
12527 (uri (pypi-uri "snowballstemmer" version))
12530 "0a0idq4y5frv7qsg2x62jd7rd272749xk4x99misf5rcifk2d7wi"))))
12531 (build-system python-build-system)
12533 `(;; No tests exist
12535 (home-page "https://github.com/shibukawa/snowball_py")
12536 (synopsis "Snowball stemming library collection for Python")
12537 (description "This package provides 16 word stemmer algorithms generated
12538 from Snowball algorithms. It includes the 15 original ones plus the Poerter
12540 (license license:bsd-3)))
12542 (define-public python2-snowballstemmer
12543 (package-with-python2 python-snowballstemmer))
12545 (define-public python-sphinx-cloud-sptheme
12547 (name "python-sphinx-cloud-sptheme")
12551 (uri (pypi-uri "cloud_sptheme" version))
12554 "0zm9ap4p5dzln8f1m2immadaxv2xpg8jg4w53y52rhfl7pdb58vy"))))
12555 (build-system python-build-system)
12556 ;; FIXME: The 'pypi' release archive does not contain tests.
12557 (arguments '(#:tests? #f))
12559 `(("python-sphinx" ,python-sphinx)))
12560 (home-page "https://bitbucket.org/ecollins/cloud_sptheme")
12561 (synopsis "'Cloud' theme for Sphinx documenter")
12562 (description "This package contains the \"Cloud\" theme for Sphinx and some
12563 related extensions.")
12564 (license license:bsd-3)))
12566 (define-public python2-sphinx-cloud-sptheme
12567 (package-with-python2 python-sphinx-cloud-sptheme))
12569 (define-public python-sphinx-alabaster-theme
12571 (name "python-sphinx-alabaster-theme")
12575 (uri (pypi-uri "alabaster" version))
12578 "027anxzcb951gjlcc43y3rbn9qrw36d16vj9wd2smv5410xx9bs7"))))
12579 (build-system python-build-system)
12581 `(("python-pygments" ,python-pygments)))
12582 (home-page "https://alabaster.readthedocs.io/")
12583 (synopsis "Configurable sidebar-enabled Sphinx theme")
12584 (description "Alabaster is a visually (c)lean, responsive, configurable
12585 theme for the Sphinx documentation system. It's the default theme of Sphinx.")
12586 (license license:bsd-3)))
12588 (define-public python2-sphinx-alabaster-theme
12589 (package-with-python2 python-sphinx-alabaster-theme))
12591 (define-public python-betamax
12593 (name "python-betamax")
12598 (uri (pypi-uri "betamax" version))
12601 "18f8v5gng3j773jlbbzx4rg1i4y2zw3m2l1zpmbvp8bh5a2q1i42"))))
12602 (build-system python-build-system)
12604 '(;; Many tests fail because they require networking.
12607 `(("python-requests" ,python-requests)))
12608 (home-page "https://github.com/sigmavirus24/betamax")
12609 (synopsis "Record HTTP interactions with python-requests")
12610 (description "Betamax will record your test suite's HTTP interactions and
12611 replay them during future tests. It is designed to work with python-requests.")
12612 (license license:expat)))
12614 (define-public python2-betamax
12615 (package-with-python2 python-betamax))
12617 (define-public python-s3transfer
12619 (name "python-s3transfer")
12623 (uri (pypi-uri "s3transfer" version))
12626 "1h8g9bknvxflxkpbnxyfxmk8pvgykbbk9ljdvhqh6z4vjc2926ms"))))
12627 (build-system python-build-system)
12630 (modify-phases %standard-phases
12633 ;; 7 of the 'integration' tests require network access or login
12635 (zero? (system* "nosetests" "--exclude=integration")))))))
12637 `(("python-docutils" ,python-docutils)
12638 ("python-mock" ,python-mock)
12639 ("python-nose" ,python-nose)))
12641 `(("python-botocore" ,python-botocore)))
12642 (synopsis "Amazon S3 Transfer Manager")
12643 (description "S3transfer is a Python library for managing Amazon S3
12645 (home-page "https://github.com/boto/s3transfer")
12646 (license license:asl2.0)
12647 (properties `((python2-variant . ,(delay python2-s3transfer))))))
12649 (define-public python2-s3transfer
12650 (let ((base (package-with-python2 (strip-python2-variant python-s3transfer))))
12654 `(("python2-futures" ,python2-futures)
12655 ,@(package-native-inputs base))))))
12657 (define-public python-setproctitle
12659 (name "python-setproctitle")
12664 (uri (pypi-uri "setproctitle" version))
12667 "163kplw9dcrw0lffq1bvli5yws3rngpnvrxrzdw89pbphjjvg0v2"))))
12668 (build-system python-build-system)
12671 (modify-phases %standard-phases
12672 (add-before 'check 'patch-Makefile
12673 ;; Stricly this is only required for the python2 variant.
12674 ;; But adding a phase in an inherited package seems to be
12675 ;; cumbersum. So we patch even for python3.
12677 (let ((nose (assoc-ref %build-inputs "python2-nose")))
12679 (substitute* "Makefile"
12680 (("\\$\\(PYTHON\\) [^ ]which nosetests[^ ] ")
12681 (string-append nose "/bin/nosetests "))))
12685 (setenv "PYTHON" (or (which "python3") (which "python")))
12686 (setenv "PYCONFIG" (or (which "python3-config")
12687 (which "python-config")))
12688 (setenv "CC" "gcc")
12689 ;; No need to extend PYTHONPATH to find the built package, since
12690 ;; the Makefile will build anyway
12691 (zero? (system* "make" "check")))))))
12693 `(("procps" ,procps))) ; required for tests
12695 "https://github.com/dvarrazzo/py-setproctitle")
12697 "Setproctitle implementation for Python to customize the process title")
12698 (description "The library allows a process to change its title (as displayed
12699 by system tools such as ps and top).
12701 Changing the title is mostly useful in multi-process systems, for
12702 example when a master process is forked: changing the children's title
12703 allows to identify the task each process is busy with. The technique
12704 is used by PostgreSQL and the OpenSSH Server for example.")
12705 (license license:bsd-3)
12706 (properties `((python2-variant . ,(delay python2-setproctitle))))))
12708 (define-public python2-setproctitle
12709 (let ((base (package-with-python2
12710 (strip-python2-variant python-setproctitle))))
12713 (native-inputs `(("python2-nose" ,python2-nose)
12714 ,@(package-native-inputs base))))))
12716 (define-public python-validictory
12718 (name "python-validictory")
12723 (uri (pypi-uri "validictory" version))
12726 "1zf1g9sw47xzp5f80bd94pb42j9yqv82lcrgcvdwr6nkaphfi37q"))))
12727 (build-system python-build-system)
12730 (modify-phases %standard-phases
12731 (add-after 'unpack 'bootstrap
12732 ;; Move the tests out of the package directory to avoid
12735 (rename-file "validictory/tests" "tests")
12736 (delete-file "tests/__init__.py")))
12739 ;; Extend PYTHONPATH so the built package will be found.
12740 (setenv "PYTHONPATH"
12741 (string-append (getcwd) "/build/lib:"
12742 (getenv "PYTHONPATH")))
12743 (zero? (system* "py.test" "-vv" )))))))
12745 `(("python-pytest" ,python-pytest)))
12747 "https://github.com/jamesturk/validictory")
12748 (synopsis "General purpose Python data validator")
12749 (description "It allows validation of arbitrary Python data structures.
12751 The schema format is based on the JSON Schema
12752 proposal (http://json-schema.org), so combined with json the library is also
12753 useful as a validator for JSON data.")
12754 (license license:expat)))
12756 (define-public python2-validictory
12757 (package-with-python2 python-validictory))
12759 (define-public python-aniso8601
12761 (name "python-aniso8601")
12766 (uri (pypi-uri "aniso8601" version))
12769 "1k5mjg9iqbjfslb5prrsfz7dhlvi6s35p1jxq8dm87w1b7dn5i2g"))))
12770 (build-system python-build-system)
12772 `(("python-dateutil" ,python-dateutil)))
12774 "https://bitbucket.org/nielsenb/aniso8601")
12776 "Python library for parsing ISO 8601 strings")
12778 "This package contains a library for parsing ISO 8601 datetime strings.")
12779 (license license:bsd-3)))
12781 (define-public python-flask-restful
12783 (name "python-flask-restful")
12788 (uri (pypi-uri "Flask-RESTful" version))
12791 "0hjcmdb56b7z4bkw848lxfkyrpnkwzmqn2dgnlv12mwvjpzsxr6c"))))
12792 (build-system python-build-system)
12794 `(("python-aniso8601" ,python-aniso8601)
12795 ("python-flask" ,python-flask)
12796 ("python-pycrypto" ,python-pycrypto)
12797 ("python-pytz" ,python-pytz)))
12799 `(;; Optional dependency of Flask. Tests need it.
12800 ("python-blinker" ,python-blinker)
12801 ("python-mock" ,python-mock) ; For tests
12802 ("python-nose" ,python-nose) ; For tests
12803 ("python-sphinx" ,python-sphinx)))
12805 "https://www.github.com/flask-restful/flask-restful/")
12807 "Flask module for creating REST APIs")
12809 "This package contains a Flask module for creating REST APIs.")
12810 (license license:bsd-3)))
12812 (define-public python-flask-basicauth
12814 (name "python-flask-basicauth")
12819 (uri (pypi-uri "Flask-BasicAuth" version))
12822 "1zq1spkjr4sjdnalpp8wl242kdqyk6fhbnhr8hi4r4f0km4bspnz"))))
12823 (build-system python-build-system)
12825 `(("python-flask" ,python-flask)))
12827 "https://github.com/jpvanhal/flask-basicauth")
12829 "HTTP basic access authentication for Flask")
12831 "This package provides HTTP basic access authentication for Flask.")
12832 (license license:bsd-3)))
12834 (define-public python-flask-sqlalchemy
12836 (name "python-flask-sqlalchemy")
12841 (uri (pypi-uri "Flask-SQLAlchemy" version))
12844 "1i9ps5d5snih9xlqhrvmi3qfiygkmqzxh92n25kj4pf89kj4s965"))))
12845 (build-system python-build-system)
12847 `(("python-flask" ,python-flask)
12848 ("python-sqlalchemy" ,python-sqlalchemy)))
12850 "http://github.com/mitsuhiko/flask-sqlalchemy")
12852 "Module adding SQLAlchemy support to your Flask application")
12854 "This package adds SQLAlchemy support to your Flask application.")
12855 (license license:bsd-3)))
12857 (define-public python-pyev
12859 (name "python-pyev")
12864 (uri (pypi-uri "pyev" version))
12867 "0rf603lc0s6zpa1nb25vhd8g4y337wg2wyz56i0agsdh7jchl0sx"))))
12868 (build-system python-build-system)
12870 `(#:tests? #f ; no test suite
12872 (modify-phases %standard-phases
12873 (add-after 'unpack 'patch
12874 (lambda* (#:key inputs #:allow-other-keys)
12875 (let ((libev (string-append (assoc-ref inputs "libev")
12876 "/lib/libev.so.4")))
12877 (substitute* "setup.py"
12878 (("libev_dll_name = find_library\\(\\\"ev\\\"\\)")
12879 (string-append "libev_dll_name = \"" libev "\"")))))))))
12881 `(("libev" ,libev)))
12882 (home-page "http://pythonhosted.org/pyev/")
12883 (synopsis "Python libev interface")
12884 (description "Pyev provides a Python interface to libev.")
12885 (license license:gpl3)))
12887 (define-public python2-pyev
12888 (package-with-python2 python-pyev))
12890 (define-public python-imagesize
12892 (name "python-imagesize")
12897 (uri (pypi-uri "imagesize" version))
12900 "0qk07k0z4241lkzzjji7z4da04pcvg7bfc4xz1934zlqhwmwdcha"))))
12901 (build-system python-build-system)
12903 '(;; Test files are not distributed on PyPi:
12904 ;; https://github.com/shibukawa/imagesize_py/issues/7
12906 (home-page "https://github.com/shibukawa/imagesize_py")
12907 (synopsis "Gets image size of files in variaous formats in Python")
12909 "This package allows determination of image size from
12910 PNG, JPEG, JPEG2000 and GIF files in pure Python.")
12911 (license license:expat)))
12913 (define-public python2-imagesize
12914 (package-with-python2 python-imagesize))
12916 (define-public python-axolotl-curve25519
12918 (name "python-axolotl-curve25519")
12923 (uri (git-reference
12924 (url "git://github.com/tgalal/python-axolotl-curve25519")
12925 (commit "e4a9c4de0eae27223200579c58d1f8f6d20637e2")))
12926 (file-name (string-append name "-" version "-checkout"))
12929 "0agap5q0hmvf6cwzjqc05kw53pjgf6942pcivpazksmg1vk400ra"))))
12930 (build-system python-build-system)
12932 `(;; Prevent creation of the egg. This works around
12933 ;; https://debbugs.gnu.org/cgi/bugreport.cgi?bug=20765
12934 #:configure-flags '("--root=/")))
12935 (home-page "https://github.com/tgalal/python-axolotl-curve25519")
12936 (synopsis "Python wrapper for curve25519 library")
12937 (description "This is a python wrapper for the curve25519 library
12938 with ed25519 signatures. The C code was pulled from
12939 libaxolotl-android. At the moment this wrapper is meant for use by
12941 (license (list license:gpl3 ; Most files
12942 license:bsd-3)))) ; curve/curve25519-donna.c
12944 (define-public python2-axolotl-curve25519
12945 (package-with-python2 python-axolotl-curve25519))
12947 (define-public python-axolotl
12949 (name "python-axolotl")
12954 (uri (string-append
12955 "https://github.com/tgalal/python-axolotl/archive/"
12956 version ".tar.gz"))
12957 (file-name (string-append name "-" version ".tar.gz"))
12959 (base32 "1z8d89p7v40p4bwywjm9h4z28fdvra79ddw06azlkrfjbl7dxmz8"))))
12960 (build-system python-build-system)
12963 (modify-phases %standard-phases
12964 ;; Don't install tests
12965 (add-before 'install 'remove-tests
12967 (for-each delete-file-recursively
12968 '("axolotl/tests" "build/lib/axolotl/tests"))
12971 `(("python-axolotl-curve25519" ,python-axolotl-curve25519)
12972 ("python-dateutil" ,python-dateutil)
12973 ("python-protobuf" ,python-protobuf)
12974 ("python-pycrypto" ,python-pycrypto)))
12975 (home-page "https://github.com/tgalal/python-axolotl")
12976 (synopsis "Python port of libaxolotl-android")
12977 (description "This is a python port of libaxolotl-android. This
12978 is a ratcheting forward secrecy protocol that works in synchronous and
12979 asynchronous messaging environments.")
12980 (license license:gpl3)))
12982 (define-public python2-axolotl
12983 (package-with-python2 python-axolotl))
12985 (define-public python-termstyle
12987 (name "python-termstyle")
12992 (uri (pypi-uri "termstyle" version))
12995 "17wzkkcqy5zc0g68xlad3kcv66iw14d2pwqc0h9420gak0vbhx7g"))))
12996 (build-system python-build-system)
12999 (modify-phases %standard-phases
13002 (zero? (system* "python" "test3.py")))))))
13003 (home-page "http://github.com/gfxmonk/termstyle")
13004 (synopsis "Console text coloring for Python")
13005 (description "This package provides console text coloring for Python.")
13006 (license license:bsd-3)))
13008 (define-public python-rednose
13010 (name "python-rednose")
13015 (uri (pypi-uri "rednose" version))
13018 "0b0bsna217lr1nykyhl5fgjly15zhdvqd4prg4wy1zrgfv7al6m0"))))
13019 (build-system python-build-system)
13022 (modify-phases %standard-phases
13023 (add-after 'unpack 'fix-deps
13025 ;; See <https://github.com/JBKahn/rednose/issues/12>
13026 (substitute* "setup.py"
13027 (("python-termstyle") "termstyle"))
13030 `(("python-colorama" ,python-colorama)
13031 ("python-termstyle" ,python-termstyle)))
13033 `(("python-six" ,python-six)
13034 ("python-nose" ,python-nose)))
13035 (home-page "https://github.com/JBKahn/rednose")
13036 (synopsis "Colored output for Python nosetests")
13037 (description "This package provides colored output for the
13038 @command{nosetests} command of the Python Nose unit test framework.")
13039 (license license:bsd-3)))
13041 (define-public python-flask-restplus
13043 (name "python-flask-restplus")
13048 (uri (pypi-uri "flask-restplus" version))
13051 "11his6ii5brpkhld0d5bwzjjw4q3vmplpd6fmgzjrvvklsbk0cf4"))))
13052 (build-system python-build-system)
13054 '(#:tests? #f)) ; FIXME: 35/882 tests failing.
13056 ;; (modify-phases %standard-phases
13059 ;; (zero? (system* "nosetests")))))))
13061 `(("python-aniso8601" ,python-aniso8601)
13062 ("python-flask" ,python-flask)
13063 ("python-jsonschema" ,python-jsonschema)
13064 ("python-pytz" ,python-pytz)
13065 ("python-six" ,python-six)))
13067 `(("python-tzlocal" ,python-tzlocal)
13068 ("python-blinker" ,python-blinker)
13069 ("python-nose" ,python-nose)
13070 ("python-rednose" ,python-rednose)))
13071 (home-page "https://github.com/noirbizarre/flask-restplus")
13072 (synopsis "Framework for documented API development with Flask")
13073 (description "This package provides a framework for API development with
13074 the Flask web framework in Python. It is similar to package
13075 @code{python-flask-restful} but supports the @code{python-swagger}
13076 documentation builder.")
13077 (license license:expat)))
13079 (define-public python-sadisplay
13081 (name "python-sadisplay")
13086 (uri (pypi-uri "sadisplay" version))
13089 "0zqad2fl7q26p090qmqgmxbm6iwgf9zij1w8da1g3wdgjj72ql05"))))
13090 (build-system python-build-system)
13092 `(("python-sqlalchemy" ,python-sqlalchemy)))
13094 `(("python-nose" ,python-nose)))
13095 (home-page "https://bitbucket.org/estin/sadisplay")
13096 (synopsis "SQLAlchemy schema displayer")
13097 (description "This package provides a program to build Entity
13098 Relationship diagrams from a SQLAlchemy model (or directly from the
13100 (license license:bsd-3)))
13102 (define-public python2-sadisplay
13103 (package-with-python2 python-sadisplay))
13105 (define-public python-flask-restful-swagger
13107 (name "python-flask-restful-swagger")
13112 (uri (pypi-uri "flask-restful-swagger" version))
13115 "16msl8hd5xjmj833bpy264v98cpl5hkw5bgl5gf5vgndxbv3rm6v"))))
13116 (build-system python-build-system)
13118 `(("python-flask-restful" ,python-flask-restful)))
13119 (home-page "https://github.com/rantav/flask-restful-swagger")
13120 (synopsis "Extract Swagger specs from Flask-Restful projects")
13121 (description "This package lets you extract Swagger API documentation
13122 specs from your Flask-Restful projects.")
13123 (license license:expat)))
13125 (define-public python2-flask-restful-swagger
13126 (package-with-python2 python-flask-restful-swagger))
13128 (define-public python-argcomplete
13130 (name "python-argcomplete")
13135 (uri (pypi-uri "argcomplete" version))
13138 "11bwiw6j0nilgz81xnw6f1npyga3prp8asjqrm87cdr3ria5l03x"))))
13139 (build-system python-build-system)
13141 `(("python-pexpect" ,python-pexpect)
13143 (home-page "https://github.com/kislyuk/argcomplete")
13144 (synopsis "Shell tab completion for Python argparse")
13145 (description "argcomplete provides extensible command line tab completion
13146 of arguments and options for Python scripts using @code{argparse}. It's
13147 particularly useful for programs with many options or sub-parsers that can
13148 dynamically suggest completions; for example, when browsing resources over the
13150 (license license:asl2.0)))
13152 (define-public python2-argcomplete
13153 (package-with-python2 python-argcomplete))
13155 (define-public python-xopen
13157 (name "python-xopen")
13162 (uri (pypi-uri "xopen" version))
13165 "1wx6mylzcsyhjl19ycb83qq6iqpmr927lz62njfsar6ldsj0qcni"))
13166 (file-name (string-append name "-" version ".tar.gz"))))
13167 (build-system python-build-system)
13168 (home-page "https://github.com/marcelm/xopen/")
13169 (synopsis "Open compressed files transparently")
13170 (description "This module provides an @code{xopen} function that works like
13171 Python's built-in @code{open} function, but can also deal with compressed files.
13172 Supported compression formats are gzip, bzip2 and, xz, and are automatically
13173 recognized by their file extensions. The focus is on being as efficient as
13174 possible on all supported Python versions.")
13175 (license license:expat)))
13177 (define-public python2-xopen
13178 (package-with-python2 python-xopen))
13180 (define-public python2-cheetah
13182 (name "python2-cheetah")
13187 (uri (pypi-uri "Cheetah" version))
13190 "0l5mm4lnysjkzpjr95q5ydm9xc8bv43fxmr79ypybrf1y0lq4c5y"))))
13191 (build-system python-build-system)
13193 `(#:python ,python-2))
13195 `(("python2-markdown" ,python2-markdown)))
13196 (home-page "https://pythonhosted.org/Cheetah/")
13197 (synopsis "Template engine")
13198 (description "Cheetah is a text-based template engine and Python code
13201 Cheetah can be used as a standalone templating utility or referenced as
13202 a library from other Python applications. It has many potential uses,
13203 but web developers looking for a viable alternative to ASP, JSP, PHP and
13204 PSP are expected to be its principle user group.
13208 @item Generates HTML, SGML, XML, SQL, Postscript, form email, LaTeX, or any other
13210 @item Cleanly separates content, graphic design, and program code.
13211 @item Blends the power and flexibility of Python with a simple template language
13212 that non-programmers can understand.
13213 @item Gives template writers full access to any Python data structure, module,
13214 function, object, or method in their templates.
13215 @item Makes code reuse easy by providing an object-orientated interface to
13216 templates that is accessible from Python code or other Cheetah templates.
13217 One template can subclass another and selectively reimplement sections of it.
13218 @item Provides a simple, yet powerful, caching mechanism that can dramatically
13219 improve the performance of a dynamic website.
13220 @item Compiles templates into optimized, yet readable, Python code.
13222 (license (license:x11-style "file://LICENSE"))))
13224 (define-public python-dulwich
13226 (name "python-dulwich")
13231 (uri (list (string-append "https://www.dulwich.io/releases/"
13232 "dulwich-" version ".tar.gz")
13233 (pypi-uri "dulwich" version)))
13235 (base32 "0fl47vzfgc3w3rmhn8naii905cjqcp0vc68iyvymxp7567hh6als"))))
13236 (build-system python-build-system)
13239 (modify-phases %standard-phases
13240 (add-before 'check 'fix-tests
13241 (lambda* (#:key inputs #:allow-other-keys)
13242 ;; The tests use Popen with a custom environment which doesn't
13244 (substitute* "dulwich/tests/compat/utils.py"
13245 (("'git'") (string-append "'"
13248 (substitute* '("dulwich/tests/test_repository.py"
13249 "dulwich/tests/test_hooks.py")
13250 (("#!/bin/sh") (string-append "#!" (which "sh"))))
13251 (setenv "TEST_RUNNER" "unittest")
13252 (setenv "PYTHONHASHSEED" "random")
13255 `(("python-fastimport" ,python-fastimport)))
13257 `(("python-mock" ,python-mock)
13258 ("python-geventhttpclient" ,python-geventhttpclient)
13260 (home-page "https://www.dulwich.io/")
13261 (synopsis "Git implementation in Python")
13262 (description "Dulwich is an implementation of the Git file formats and
13263 protocols written in pure Python.")
13264 ;; Can be used with either license.
13265 (license (list license:asl2.0 license:gpl2+))))
13267 (define-public python2-dulwich
13268 (package-with-python2 python-dulwich))
13270 (define-public python-pbkdf2
13272 (name "python-pbkdf2")
13277 (uri (pypi-uri "pbkdf2" version))
13280 "0yb99rl2mbsaamj571s1mf6vgniqh23v98k4632150hjkwv9fqxc"))))
13281 (build-system python-build-system)
13284 (modify-phases %standard-phases
13287 (setenv "PYTHONPATH"
13288 (string-append (getcwd) "/build/lib:"
13289 (getenv "PYTHONPATH")))
13290 (zero? (system* "python" "test/test_pbkdf2.py")))))))
13292 `(("python-pycrypto" ,python-pycrypto))) ; optional
13293 (home-page "http://www.dlitz.net/software/python-pbkdf2/")
13294 (synopsis "Password-based key derivation")
13295 (description "This module implements the password-based key derivation
13296 function, PBKDF2, specified in RSA PKCS#5 v2.0.
13298 PKCS#5 v2.0 Password-Based Key Derivation is a key derivation function which
13299 is part of the RSA Public Key Cryptography Standards series. The provided
13300 implementation takes a password or a passphrase and a salt value (and
13301 optionally a iteration count, a digest module, and a MAC module) and provides
13302 a file-like object from which an arbitrarly-sized key can be read.")
13303 (license license:expat)))
13305 (define-public python2-pbkdf2
13306 (package-with-python2 python-pbkdf2))
13308 (define-public python-qrcode
13310 (name "python-qrcode")
13315 (uri (pypi-uri "qrcode" version))
13318 "0kljfrfq0c2rmxf8am57333ia41kd0snbm2rnqbdy816hgpcq5a1"))))
13319 (build-system python-build-system)
13321 ;; FIXME: Tests require packaging 'pymaging'.
13324 `(("python-lxml" ,python-lxml) ; for SVG output
13325 ("python-pillow" ,python-pillow) ; for PNG output
13326 ("python-six" ,python-six)))
13327 (home-page "https://github.com/lincolnloop/python-qrcode")
13328 (synopsis "QR Code image generator")
13329 (description "This package provides a pure Python QR Code generator
13330 module. It uses the Python Imaging Library (PIL) to allow for the generation
13333 In addition this package provides a command line tool to generate QR codes and
13334 either write these QR codes to a file or do the output as ascii art at the
13336 (license license:bsd-3)))
13338 (define-public python2-qrcode
13339 (package-with-python2 python-qrcode))
13341 ;; SlowAES isn't compatible with Python 3.
13342 (define-public python2-slowaes
13344 (name "python2-slowaes")
13349 (uri (pypi-uri "slowaes" version))
13352 "02dzajm83a7lqgxf6r3hgj64wfmcxz8gs4nvgxpvj5n19kjqlrc3"))))
13353 (build-system python-build-system)
13354 (arguments `(#:python ,python-2))
13355 (home-page "http://code.google.com/p/slowaes/")
13356 (synopsis "Implementation of AES in Python")
13357 (description "This package contains an implementation of AES in Python.
13358 This implementation is slow (hence the project name) but still useful when
13359 faster ones are not available.")
13360 (license license:asl2.0)))
13362 (define-public python-rst2ansi
13364 (name "python-rst2ansi")
13369 (uri (pypi-uri "rst2ansi" version))
13372 "0vzy6gd60l79ff750scl0sz48r1laalkl6md6dwzah4dcadgn5qv"))))
13373 (build-system python-build-system)
13375 `(("python-docutils" ,python-docutils)))
13376 (home-page "https://github.com/Snaipe/python-rst-to-ansi")
13377 (synopsis "Convert RST to ANSI-decorated console output")
13379 "Python module dedicated to rendering RST (reStructuredText) documents
13380 to ansi-escaped strings suitable for display in a terminal.")
13381 (license license:expat)))
13383 (define-public python-ddt
13385 (name "python-ddt")
13390 (uri (pypi-uri "ddt" version))
13393 "1c00ikkxr7lha97c81k938bzhgd4pbwamkjn0h4nkhr3xk00zp6n"))))
13394 (build-system python-build-system)
13396 `(("python-mock" ,python-mock)
13397 ("python-nose" ,python-nose)))
13399 `(("python-six" ,python-six)
13400 ("python-pyyaml" ,python-pyyaml)))
13401 (home-page "https://github.com/txels/ddt")
13402 (synopsis "Data-Driven Tests")
13404 "DDT (Data-Driven Tests) allows you to multiply one test case by running
13405 it with different test data, and make it appear as multiple test cases.")
13406 (license license:expat)))
13408 (define-public python2-ddt
13409 (package-with-python2 python-ddt))
13411 (define-public python-pycosat
13413 (name "python-pycosat")
13418 (uri (pypi-uri "pycosat" version))
13421 "1kl3wh1f47rc712n4bmwplbx3fqz3x9i1b587jrbpmvdva4c8f6l"))))
13422 ;; TODO: Unundle picosat. http://fmv.jku.at/picosat/
13423 (build-system python-build-system)
13424 (home-page "https://github.com/ContinuumIO/pycosat")
13425 (synopsis "Bindings to picosat (a SAT solver)")
13427 "This package provides efficient Python bindings to @code{picosat} on
13428 the C level. When importing pycosat, the @code{picosat} solver becomes part
13429 of the Python process itself. @code{picosat} is a @dfn{Boolean Satisfiability
13430 Problem} (SAT) solver.")
13431 (license license:expat)))
13433 (define-public python2-pycosat
13434 (package-with-python2 python-pycosat))
13436 (define-public python2-ruamel.ordereddict
13438 (name "python2-ruamel.ordereddict")
13443 (uri (pypi-uri "ruamel.ordereddict" version))
13446 "1xmkl8v9l9inm2pyxgc1fm5005yxm7fkd5gv74q7lj1iy5qc8n3h"))))
13447 (build-system python-build-system)
13449 `(#:python ,python-2
13451 (modify-phases %standard-phases
13453 (add-after 'install 'check
13454 (lambda* (#:key inputs outputs #:allow-other-keys)
13455 (add-installed-pythonpath inputs outputs)
13456 (zero? (system* "python" "test/testordereddict.py")))))))
13457 (home-page "https://bitbucket.org/ruamel/ordereddict")
13458 (synopsis "Version of dict that keeps keys in insertion order")
13460 "This is an implementation of an ordered dictionary with @dfn{Key
13461 Insertion Order} (KIO: updates of values do not affect the position of the
13462 key), @dfn{Key Value Insertion Order} (KVIO, an existing key's position is
13463 removed and put at the back). The standard library module @code{OrderedDict},
13464 implemented later, implements a subset of @code{ordereddict} functionality.
13465 Sorted dictionaries are also provided. Currently only with @dfn{Key Sorted
13466 Order} (KSO, no sorting function can be specified, but a transform can be
13467 specified to apply on the key before comparison (e.g. @code{string.lower})).")
13468 (license license:expat)))
13470 (define-public python-pypeg2
13472 (name "python-pypeg2")
13477 (uri (pypi-uri "pyPEG2" version))
13480 "0v8ziaam2r637v94ra4dbjw6jzxz99gs5x4i585kgag1v204yb9b"))))
13481 (build-system python-build-system)
13482 (propagated-inputs `(("python-lxml" ,python-lxml)))
13484 ;;https://bitbucket.org/fdik/pypeg/issues/36/test-failures-on-py35
13486 (home-page "https://fdik.org/pyPEG/")
13487 (synopsis "Parsering Expression Grammars in Python")
13488 (description "PyPEG is an intrinsic parser interpreter framework for
13489 Python. It is based on Parsing Expression Grammars, PEG. With pyPEG you can
13490 parse many formal languages.")
13491 (license license:gpl2)))