1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2013 Nikita Karetnikov <nikita@karetnikov.org>
3 ;;; Copyright © 2013, 2014, 2015, 2016, 2017 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, 2017 Arun Isaac <arunisaac@systemreboot.net>
34 ;;; Copyright © 2016, 2017 Julien Lepiller <julien@lepiller.eu>
35 ;;; Copyright © 2016, 2017 Tobias Geerinckx-Rice <me@tobias.gr>
36 ;;; Copyright © 2016, 2017 Thomas Danckaert <post@thomasdanckaert.be>
37 ;;; Copyright © 2017 Carlo Zancanaro <carlo@zancanaro.id.au>
38 ;;; Copyright © 2017 Frederick M. Muriithi <fredmanglis@gmail.com>
39 ;;; Copyright © 2017 humanitiesNerd <catonano@gmail.com>
41 ;;; This file is part of GNU Guix.
43 ;;; GNU Guix is free software; you can redistribute it and/or modify it
44 ;;; under the terms of the GNU General Public License as published by
45 ;;; the Free Software Foundation; either version 3 of the License, or (at
46 ;;; your option) any later version.
48 ;;; GNU Guix is distributed in the hope that it will be useful, but
49 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
50 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
51 ;;; GNU General Public License for more details.
53 ;;; You should have received a copy of the GNU General Public License
54 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
56 (define-module (gnu packages python)
57 #:use-module ((guix licenses) #:prefix license:)
58 #:use-module (gnu packages)
59 #:use-module (gnu packages algebra)
60 #:use-module (gnu packages adns)
61 #:use-module (gnu packages attr)
62 #:use-module (gnu packages backup)
63 #:use-module (gnu packages bash)
64 #:use-module (gnu packages compression)
65 #:use-module (gnu packages databases)
66 #:use-module (gnu packages django)
67 #:use-module (gnu packages file)
68 #:use-module (gnu packages fontutils)
69 #:use-module (gnu packages gcc)
70 #:use-module (gnu packages ghostscript)
71 #:use-module (gnu packages gl)
72 #:use-module (gnu packages glib)
73 #:use-module (gnu packages graphviz)
74 #:use-module (gnu packages gstreamer)
75 #:use-module (gnu packages gtk)
76 #:use-module (gnu packages icu4c)
77 #:use-module (gnu packages image)
78 #:use-module (gnu packages imagemagick)
79 #:use-module (gnu packages libevent)
80 #:use-module (gnu packages libffi)
81 #:use-module (gnu packages linux)
82 #:use-module (gnu packages man)
83 #:use-module (gnu packages maths)
84 #:use-module (gnu packages multiprecision)
85 #:use-module (gnu packages networking)
86 #:use-module (gnu packages ncurses)
87 #:use-module (gnu packages openstack)
88 #:use-module (gnu packages password-utils)
89 #:use-module (gnu packages pcre)
90 #:use-module (gnu packages perl)
91 #:use-module (gnu packages pkg-config)
92 #:use-module (gnu packages protobuf)
93 #:use-module (gnu packages qt)
94 #:use-module (gnu packages readline)
95 #:use-module (gnu packages sdl)
96 #:use-module (gnu packages shells)
97 #:use-module (gnu packages statistics)
98 #:use-module (gnu packages tex)
99 #:use-module (gnu packages texinfo)
100 #:use-module (gnu packages tls)
101 #:use-module (gnu packages version-control)
102 #:use-module (gnu packages video)
103 #:use-module (gnu packages web)
104 #:use-module (gnu packages base)
105 #:use-module (gnu packages xml)
106 #:use-module (gnu packages xorg)
107 #:use-module (gnu packages xdisorg)
108 #:use-module (gnu packages zip)
109 #:use-module (gnu packages tcl)
110 #:use-module (gnu packages bdw-gc)
111 #:use-module (guix packages)
112 #:use-module (guix download)
113 #:use-module (guix git-download)
114 #:use-module (guix utils)
115 #:use-module (guix build-system gnu)
116 #:use-module (guix build-system cmake)
117 #:use-module (guix build-system python)
118 #:use-module (guix build-system trivial)
119 #:use-module (srfi srfi-1))
121 (define-public python-2.7
128 (uri (string-append "https://www.python.org/ftp/python/"
129 version "/Python-" version ".tar.xz"))
132 "0cgpk3zk0fgpji59pb4zy9nzljr70qzgv1vpz5hq5xw2d2c47m9m"))
133 (patches (search-patches "python-2.7-search-paths.patch"
134 "python-2-deterministic-build-info.patch"
135 "python-2.7-site-prefixes.patch"
136 "python-2.7-source-date-epoch.patch"
137 "python-2.7-getentropy-on-old-kernels.patch"))
138 (modules '((guix build utils)))
139 ;; suboptimal to delete failing tests here, but if we delete them in the
140 ;; arguments then we need to make sure to strip out that phase when it
141 ;; gets inherited by python and python-minimal.
144 (for-each delete-file
145 '("Lib/test/test_compileall.py"
146 "Lib/test/test_ctypes.py" ; fails on mips64el
147 "Lib/test/test_distutils.py"
148 "Lib/test/test_import.py"
149 "Lib/test/test_shutil.py"
150 "Lib/test/test_socket.py"
151 "Lib/test/test_subprocess.py"))
154 "tk")) ;tkinter; adds 50 MiB to the closure
155 (build-system gnu-build-system)
159 ;; test_compileall test_distutils test_import test_shutil test_socket
162 ;; test_aepack test_al test_applesingle test_bsddb test_bsddb185
163 ;; test_bsddb3 test_cd test_cl test_codecmaps_cn test_codecmaps_hk
164 ;; test_codecmaps_jp test_codecmaps_kr test_codecmaps_tw test_curses
165 ;; test_dl test_gdb test_gl test_imageop test_imgfile test_ioctl
166 ;; test_kqueue test_linuxaudiodev test_macos test_macostools
167 ;; test_msilib test_ossaudiodev test_scriptpackages test_smtpnet
168 ;; test_socketserver test_startfile test_sunaudiodev test_timeout
169 ;; test_tk test_ttk_guionly test_urllib2net test_urllibnet
170 ;; test_winreg test_winsound test_zipfile64
171 ;; 4 skips unexpected on linux2:
172 ;; test_bsddb test_bsddb3 test_gdb test_ioctl
175 (list "--enable-shared" ;allow embedding
176 "--with-system-ffi" ;build ctypes
177 "--with-ensurepip=install" ;install pip and setuptools
178 "--enable-unicode=ucs4"
179 (string-append "LDFLAGS=-Wl,-rpath="
180 (assoc-ref %outputs "out") "/lib"))
182 #:modules ((ice-9 ftw) (ice-9 match)
183 (guix build utils) (guix build gnu-build-system))
185 (modify-phases %standard-phases
187 'configure 'patch-lib-shells
189 ;; Filter for existing files, since some may not exist in all
190 ;; versions of python that are built with this recipe.
191 (substitute* (filter file-exists?
192 '("Lib/subprocess.py"
194 "Lib/distutils/tests/test_spawn.py"
195 "Lib/test/test_subprocess.py"))
196 (("/bin/sh") (which "sh")))
198 ;; Use zero as the timestamp in .pyc files so that builds are
199 ;; deterministic. TODO: Remove it when this variable is set in
200 ;; gnu-build-system.scm.
201 (setenv "SOURCE_DATE_EPOCH" "1")
203 (add-before 'configure 'do-not-record-configure-flags
204 (lambda* (#:key configure-flags #:allow-other-keys)
205 ;; Remove configure flags from the installed '_sysconfigdata.py'
206 ;; and 'Makefile' so we don't end up keeping references to the
209 ;; Preserve at least '--with-system-ffi' since otherwise the
210 ;; thing tries to build libffi, fails, and we end up with a
211 ;; Python that lacks ctypes.
212 (substitute* "configure"
213 (("^CONFIG_ARGS=.*$")
214 (format #f "CONFIG_ARGS='~a'\n"
215 (if (member "--with-system-ffi" configure-flags)
222 ;; 'Lib/test/test_site.py' needs a valid $HOME
223 (setenv "HOME" (getcwd))
226 'unpack 'set-source-file-times-to-1980
227 ;; XXX One of the tests uses a ZIP library to pack up some of the
228 ;; source tree, and fails with "ZIP does not support timestamps
229 ;; before 1980". Work around this by setting the file times in the
230 ;; source tree to sometime in early 1980.
232 (let ((circa-1980 (* 10 366 24 60 60)))
233 (ftw "." (lambda (file stat flag)
234 (utime file circa-1980 circa-1980)
237 (add-after 'install 'remove-tests
238 ;; Remove 25 MiB of unneeded unit tests. Keep test_support.*
239 ;; because these files are used by some libraries out there.
240 (lambda* (#:key outputs #:allow-other-keys)
241 (let ((out (assoc-ref outputs "out")))
242 (match (scandir (string-append out "/lib")
244 (string-prefix? "python" name)))
246 (let ((testdir (string-append out "/lib/" pythonX.Y
248 (with-directory-excursion testdir
249 (for-each delete-file-recursively
255 (string-prefix? "test_support."
257 (call-with-output-file "__init__.py" (const #t))
259 (add-before 'strip 'make-libraries-writable
260 (lambda* (#:key outputs #:allow-other-keys)
261 ;; Make .so files writable so they can be stripped.
262 (let ((out (assoc-ref outputs "out")))
263 (for-each (lambda (file)
265 (find-files (string-append out "/lib")
268 (add-after 'install 'move-tk-inter
269 (lambda* (#:key outputs #:allow-other-keys)
270 ;; When Tkinter support is built move it to a separate output so
271 ;; that the main output doesn't contain a reference to Tcl/Tk.
272 (let ((out (assoc-ref outputs "out"))
273 (tk (assoc-ref outputs "tk")))
275 (match (find-files out "tkinter.*\\.so")
277 ;; The .so is in OUT/lib/pythonX.Y/lib-dynload, but we
278 ;; want it under TK/lib/pythonX.Y/site-packages.
279 (let* ((len (string-length out))
280 (target (string-append
283 (dirname (dirname tkinter.so))
286 (install-file tkinter.so target)
287 (delete-file tkinter.so)))))
292 ("libffi" ,libffi) ; for ctypes
293 ("sqlite" ,sqlite) ; for sqlite extension
295 ("readline" ,readline)
298 ("tk" ,tk))) ; for tkinter
300 `(("pkg-config" ,pkg-config)))
302 (list (search-path-specification
303 (variable "PYTHONPATH")
304 (files '("lib/python2.7/site-packages")))))
305 (home-page "https://www.python.org")
306 (synopsis "High-level, dynamically-typed programming language")
308 "Python is a remarkably powerful dynamic programming language that
309 is used in a wide variety of application domains. Some of its key
310 distinguishing features include: clear, readable syntax; strong
311 introspection capabilities; intuitive object orientation; natural
312 expression of procedural code; full modularity, supporting hierarchical
313 packages; exception-based error handling; and very high level dynamic
315 (license license:psfl)))
317 ;; Current 2.x version.
318 (define-public python-2 python-2.7)
320 (define-public python-3.5
321 (package (inherit python-2)
325 (uri (string-append "https://www.python.org/ftp/python/"
326 version "/Python-" version ".tar.xz"))
327 (patches (search-patches
328 "python-fix-tests.patch"
329 "python-3.5-fix-tests.patch"
330 "python-3.5-getentropy-on-old-kernels.patch"
331 "python-3-deterministic-build-info.patch"
332 "python-3-search-paths.patch"))
333 (patch-flags '("-p0"))
336 "1c6v1n9nz4mlx9mw1125fxpmbrgniqdbbx9hnqx44maqazb2mzpf"))
339 "Lib/ctypes/test/test_win32.py")))) ; fails on aarch64
340 (arguments (substitute-keyword-arguments (package-arguments python-2)
343 (list (search-path-specification
344 (variable "PYTHONPATH")
345 (files (list (string-append "lib/python"
346 (version-major+minor version)
347 "/site-packages"))))))))
349 ;; Current 3.x version.
350 (define-public python-3 python-3.5)
352 ;; Current major version.
353 (define-public python python-3)
355 ;; Minimal variants of Python, mostly used to break the cycle between Tk and
356 ;; Python (Tk -> libxcb -> Python.)
358 (define-public python2-minimal
359 (package (inherit python-2)
360 (name "python-minimal")
363 ;; Keep zlib, which is used by 'pip' (via the 'zipimport' module), which
364 ;; is invoked upon 'make install'. 'pip' also expects 'ctypes' and thus
366 (inputs `(("libffi" ,libffi)
369 (define-public python-minimal
370 (package (inherit python)
371 (name "python-minimal")
374 ;; Build fails due to missing ctypes without libffi.
375 ;; OpenSSL is a mandatory dependency of Python 3.x, for urllib;
376 ;; zlib is required by 'zipimport', used by pip.
377 (inputs `(("libffi" ,libffi)
381 (define* (wrap-python3 python
383 (name (string-append (package-name python) "-wrapper")))
384 (package (inherit python)
387 (build-system trivial-build-system)
389 (inputs `(("bash" ,bash)))
390 (propagated-inputs `(("python" ,python)))
392 `(#:modules ((guix build utils))
395 (use-modules (guix build utils))
396 (let ((bin (string-append (assoc-ref %outputs "out") "/bin"))
397 (python (string-append (assoc-ref %build-inputs "python") "/bin/")))
401 (symlink (string-append python old)
402 (string-append bin "/" new)))
403 `("python3" ,"pydoc3" ,"idle3" ,"pip3")
404 `("python" ,"pydoc" ,"idle" ,"pip"))
405 ;; python-config outputs search paths based upon its location,
406 ;; use a bash wrapper to avoid changing its outputs.
407 (let ((bash (string-append (assoc-ref %build-inputs "bash")
409 (old (string-append python "python3-config"))
410 (new (string-append bin "/python-config")))
411 (with-output-to-file new
413 (format #t "#!~a~%" bash)
414 (format #t "exec \"~a\" \"$@\"~%" old)
417 (synopsis "Wrapper for the Python 3 commands")
419 "This package provides wrappers for the commands of Python@tie{}3.x such
420 that they can be invoked under their usual name---e.g., @command{python}
421 instead of @command{python3}.")))
423 (define-public python-wrapper (wrap-python3 python))
424 (define-public python-minimal-wrapper (wrap-python3 python-minimal))
426 (define-public python-psutil
428 (name "python-psutil")
433 (uri (pypi-uri "psutil" version))
436 "1w4r09fvn6kd80m5mx4ws1wz100brkaq6hzzpwrns8cgjzjpl6c6"))))
437 (build-system python-build-system)
439 ;; FIXME: some tests does not return and times out.
441 (home-page "https://www.github.com/giampaolo/psutil")
442 (synopsis "Library for retrieving information on running processes")
444 "psutil (Python system and process utilities) is a library for retrieving
445 information on running processes and system utilization (CPU, memory, disks,
446 network) in Python. It is useful mainly for system monitoring, profiling and
447 limiting process resources and management of running processes. It implements
448 many functionalities offered by command line tools such as: ps, top, lsof,
449 netstat, ifconfig, who, df, kill, free, nice, ionice, iostat, iotop, uptime,
450 pidof, tty, taskset, pmap.")
451 (license license:bsd-3)))
453 (define-public python2-psutil
454 (package-with-python2 python-psutil))
456 (define-public python-passlib
458 (name "python-passlib")
463 (uri (pypi-uri "passlib" version))
466 "1q2khqpj9rlcgdmkypjdq1kswvhjf72bq0zk2cv669cc2dj8z51x"))))
467 (build-system python-build-system)
469 `(("python-nose" ,python-nose)))
471 `(("python-py-bcrypt" ,python-py-bcrypt)))
475 'check 'set-PYTHON_EGG_CACHE
476 ;; some tests require access to "$HOME/.cython"
477 (lambda* _ (setenv "PYTHON_EGG_CACHE" "/tmp"))
479 (home-page "https://bitbucket.org/ecollins/passlib")
481 "Comprehensive password hashing framework")
483 "Passlib is a password hashing library for Python 2 & 3, which provides
484 cross-platform implementations of over 30 password hashing algorithms, as well
485 as a framework for managing existing password hashes. It's designed to be
486 useful for a wide range of tasks, from verifying a hash found in /etc/shadow,
487 to providing full-strength password hashing for multi-user application.")
488 (license license:bsd-3)))
490 (define-public python2-passlib
491 (package-with-python2 python-passlib))
493 (define-public python-py-bcrypt
495 (name "python-py-bcrypt")
501 "https://pypi.python.org/packages/source/p/py-bcrypt/py-bcrypt-"
506 "0y6smdggwi5s72v6p1nn53dg6w05hna3d264cq6kas0lap73p8az"))))
507 (build-system python-build-system)
508 (home-page "https://code.google.com/p/py-bcrypt")
510 "Bcrypt password hashing and key derivation")
512 "A python wrapper of OpenBSD's Blowfish password hashing code. This
513 system hashes passwords using a version of Bruce Schneier's Blowfish block
514 cipher with modifications designed to raise the cost of off-line password
515 cracking and frustrate fast hardware implementation. The computation cost of
516 the algorithm is parametised, so it can be increased as computers get faster.
517 The intent is to make a compromise of a password database less likely to
518 result in an attacker gaining knowledge of the plaintext passwords (e.g. using
520 ;; "sha2.c" is under BSD-3;
521 ;; "blowfish.c" and "bcrypt.c" are under BSD-4;
522 ;; the rest is under ISC.
523 (license (list license:isc license:bsd-3 license:bsd-4))))
525 (define-public python2-py-bcrypt
526 (package-with-python2 python-py-bcrypt))
529 (define-public python-paramiko
531 (name "python-paramiko")
536 (uri (pypi-uri "paramiko" version))
539 "14k8z7ndc3zk5xivnm4d8lncchx475ll5izpf8vmfbq7rp9yp5rj"))))
540 (build-system python-build-system)
542 '(;; FIXME: One test fails with "EOFError not raised by connect".
545 ;; (modify-phases %standard-phases
548 ;; (zero? (system* "python" "test.py")))))))
550 `(("python-pycrypto" ,python-pycrypto)
551 ("python-ecdsa" ,python-ecdsa)))
552 (home-page "http://www.paramiko.org/")
553 (synopsis "SSHv2 protocol library")
554 (description "Paramiko is a python implementation of the SSHv2 protocol,
555 providing both client and server functionality. While it leverages a Python C
556 extension for low level cryptography (PyCrypto), Paramiko itself is a pure
557 Python interface around SSH networking concepts.")
558 (license license:lgpl2.1+)))
560 (define-public python2-paramiko
561 (package-with-python2 python-paramiko))
564 (define-public python-httplib2
566 (name "python-httplib2")
571 (uri (pypi-uri "httplib2" version))
574 "126rsryvw9vhbf3qmsfw9lf4l4xm2srmgs439lgma4cpag4s3ay3"))))
575 (build-system python-build-system)
576 (home-page "https://github.com/jcgregorio/httplib2")
577 (synopsis "Comprehensive HTTP client library")
579 "A comprehensive HTTP client library supporting many features left out of
580 other HTTP libraries.")
581 (license license:expat)))
583 (define-public python2-httplib2
584 (package-with-python2 python-httplib2))
586 (define-public python-ecdsa
588 (name "python-ecdsa")
594 "https://pypi.python.org/packages/source/e/ecdsa/ecdsa-"
599 "1yj31j0asmrx4an9xvsaj2icdmzy6pw0glfpqrrkrphwdpi1xkv4"))))
600 (build-system python-build-system)
602 `(("openssl" ,openssl)))
604 "http://github.com/warner/python-ecdsa")
606 "ECDSA cryptographic signature library (pure python)")
608 "This is an easy-to-use implementation of ECDSA cryptography (Elliptic
609 Curve Digital Signature Algorithm), implemented purely in Python. With this
610 library, you can quickly create keypairs (signing key and verifying key), sign
611 messages, and verify the signatures. The keys and signatures are very short,
612 making them easy to handle and incorporate into other protocols.")
613 (license license:expat)))
615 (define-public python2-ecdsa
616 (package-with-python2 python-ecdsa))
618 (define-public python-ccm
625 (uri (pypi-uri "ccm" version))
628 "177dfxsmk3k4cih6fh6v8d91bh4nqx7ns6pc07w7m7i3cvdx3c8n"))))
629 (build-system python-build-system)
631 `(("python-pyyaml" ,python-pyyaml)
632 ;; Not listed in setup.py, but used in ccmlib/node.py for full
634 ("python-psutil" ,python-psutil)
635 ("python-six" ,python-six)))
636 (home-page "https://github.com/pcmanus/ccm")
637 (synopsis "Cassandra Cluster Manager for Apache Cassandra clusters on
639 (description "Cassandra Cluster Manager is a development tool for testing
640 local Cassandra clusters. It creates, launches and removes Cassandra clusters
642 (license license:asl2.0)))
644 (define-public python2-ccm
645 (package-with-python2 python-ccm))
647 (define-public python-pytz
654 (uri (pypi-uri "pytz" version ".tar.bz2"))
657 "0az099cyp6p5xbsvfcdacj4hvxncbwm2ayn3h55mcp07zb2b45kh"))))
658 (build-system python-build-system)
659 (arguments `(#:tests? #f)) ; no test target
660 (home-page "http://pythonhosted.org/pytz")
661 (synopsis "Python timezone library")
663 "This library allows accurate and cross platform timezone calculations
664 using Python 2.4 or higher and provides access to the Olson timezone database.")
665 (license license:expat)))
667 (define-public python2-pytz
668 (package-with-python2 python-pytz))
671 (define-public python-babel
673 (name "python-babel")
678 (uri (pypi-uri "Babel" version))
681 "0x98qqqw35xllpcama013a9788ly84z8dm1w2wwfpxh2710c8df5"))))
682 (build-system python-build-system)
684 `(("python-pytz" ,python-pytz)))
685 (arguments `(#:tests? #f)) ; no test target
686 (home-page "http://babel.pocoo.org/")
688 "Tools for internationalizing Python applications")
690 "Babel is composed of two major parts:
691 - tools to build and work with gettext message catalogs
692 - a Python interface to the CLDR (Common Locale Data Repository), providing
693 access to various locale display names, localized number and date formatting,
695 (license license:bsd-3)))
697 (define-public python2-babel
698 (package-with-python2 python-babel))
700 (define-public python2-backport-ssl-match-hostname
702 (name "python2-backport-ssl-match-hostname")
708 "https://pypi.python.org/packages/source/b/"
709 "backports.ssl_match_hostname/backports.ssl_match_hostname-"
713 "1wndipik52cyqy0677zdgp90i435pmvwd89cz98lm7ri0y3xjajh"))))
714 (build-system python-build-system)
717 #:tests? #f)) ; no test target
718 (home-page "https://bitbucket.org/brandon/backports.ssl_match_hostname")
719 (synopsis "Backport of ssl.match_hostname() function from Python 3.5")
721 "This backport brings the ssl.match_hostname() function to users of
722 earlier versions of Python. The function checks the hostname in the
723 certificate returned by the server to which a connection has been established,
724 and verifies that it matches the intended target hostname.")
725 (license license:psfl)))
727 (define-public python-hdf4
734 (uri (pypi-uri name version))
737 "1hjiyrxvxk9817qyqky3nar4y3fs4z8wxz0n884zzb5wi6skrjks"))))
738 (build-system python-build-system)
739 (native-inputs `(("nose" ,python-nose)))
740 (propagated-inputs `(("numpy" ,python-numpy)))
747 (modify-phases %standard-phases
750 ;; The 'runexamples' script sets PYTHONPATH to CWD, then goes
751 ;; on to import numpy. Somehow this works on their CI system.
752 ;; Let's just manage PYTHONPATH here instead.
753 (substitute* "runexamples.sh"
754 (("export PYTHONPATH=.*") ""))
756 (string-append (getcwd) ":"
757 (getenv "PYTHONPATH")))
758 (and (zero? (system* "./runexamples.sh"))
759 (zero? (system* "nosetests" "-v"))))))))
760 (home-page "https://github.com/fhs/python-hdf4")
761 (synopsis "Python interface to the NCSA HDF4 library")
763 "Python-HDF4 is a python wrapper around the NCSA HDF version 4 library,
764 which implements the SD (Scientific Dataset), VS (Vdata) and V (Vgroup) API’s.
765 NetCDF files can also be read and modified. Python-HDF4 is a fork of
766 @url{http://hdfeos.org/software/pyhdf.php,pyhdf}.")
767 (license license:expat)))
769 (define-public python2-hdf4
770 (package-with-python2 python-hdf4))
772 (define-public python-h5py
779 (uri (pypi-uri "h5py" version))
782 "0df46dg7i7xfking9lp221bfm8dbl974yvlrbi1w7r6m61ac7bxj"))))
783 (build-system python-build-system)
785 `(#:tests? #f ; no test target
787 (modify-phases %standard-phases
788 (add-after 'unpack 'fix-hdf5-paths
789 (lambda* (#:key inputs #:allow-other-keys)
790 (let ((prefix (assoc-ref inputs "hdf5")))
791 (substitute* "setup_build.py"
792 (("\\['/opt/local/lib', '/usr/local/lib'\\]")
793 (string-append "['" prefix "/lib" "']"))
794 (("'/opt/local/include', '/usr/local/include'")
795 (string-append "'" prefix "/include" "'")))
796 (substitute* "setup_configure.py"
797 (("\\['/usr/local/lib', '/opt/local/lib'\\]")
798 (string-append "['" prefix "/lib" "']")))
801 `(("python-six" ,python-six)
802 ("python-numpy" ,python-numpy)))
806 `(("python-cython" ,python-cython)
807 ("python-pkgconfig" ,python-pkgconfig)))
808 (home-page "http://www.h5py.org/")
809 (synopsis "Read and write HDF5 files from Python")
811 "The h5py package provides both a high- and low-level interface to the
812 HDF5 library from Python. The low-level interface is intended to be a
813 complete wrapping of the HDF5 API, while the high-level component supports
814 access to HDF5 files, datasets and groups using established Python and NumPy
816 (license license:bsd-3)))
818 (define-public python2-h5py
819 (package-with-python2 python-h5py))
821 (define-public python-netcdf4
823 (name "python-netcdf4")
828 (uri (pypi-uri "netCDF4" version))
831 "1fllizmnpw0zkzzm4j9pgamarlzfn3kmv9zrm0w65q1y31h9ni0c"))))
832 (build-system python-build-system)
834 `(("python-cython" ,python-cython)))
836 `(("python-numpy" ,python-numpy)))
843 (modify-phases %standard-phases
846 (setenv "NO_NET" "1") ; disable opendap tests
847 (with-directory-excursion "test"
848 (setenv "PYTHONPATH" ; find and add the library we just built
850 (car (find-files "../build" "lib.*"
852 #:fail-on-error? #:t))
853 ":" (getenv "PYTHONPATH")))
854 (zero? (system* "python" "run_all.py"))))))))
856 "https://github.com/Unidata/netcdf4-python")
857 (synopsis "Python/numpy interface to the netCDF library")
858 (description "Netcdf4-python is a Python interface to the netCDF C
859 library. netCDF version 4 has many features not found in earlier
860 versions of the library and is implemented on top of HDF5. This module
861 can read and write files in both the new netCDF 4 and the old netCDF 3
862 format, and can create files that are readable by HDF5 clients. The
863 API is modelled after @code{Scientific.IO.NetCDF}, and should be familiar
864 to users of that module.")
865 ;; The software is mainly ISC, but includes some files covered
866 ;; by the Expat license.
867 (license (list license:isc license:expat))))
869 (define-public python2-netcdf4
870 (package-with-python2 python-netcdf4))
872 (define-public python-lockfile
874 (name "python-lockfile")
879 (uri (string-append "https://pypi.python.org/packages/source/l/lockfile/"
880 "lockfile-" version ".tar.gz"))
883 "16gpx5hm73ah5n1079ng0vy381hl802v606npkx4x8nb0gg05vba"))))
884 (build-system python-build-system)
885 (arguments '(#:test-target "check"))
887 `(("python-pbr" ,python-pbr)))
888 (home-page "https://launchpad.net/pylockfile")
889 (synopsis "Platform-independent file locking module")
891 "The lockfile package exports a LockFile class which provides a simple
892 API for locking files.")
893 (license license:expat)))
895 (define-public python2-lockfile
896 (package-with-python2 python-lockfile))
898 (define-public python-mock
905 (uri (pypi-uri "mock" version))
908 "0kzlsbki6q0awf89rc287f3aj8x431lrajf160a70z0ikhnxsfdq"))))
909 (build-system python-build-system)
910 (arguments '(#:test-target "check"))
911 (home-page "https://github.com/testing-cabal/mock")
912 (synopsis "Python mocking and patching library for testing")
914 "Mock is a library for testing in Python. It allows you to replace parts
915 of your system under test with mock objects and make assertions about how they
917 (license license:expat)))
919 (define-public python2-mock
920 (package-with-python2 python-mock))
923 (define-public python-setuptools
925 (name "python-setuptools")
930 (uri (pypi-uri "setuptools" version))
933 "0ypybh4hx3bv4vhg2dc74xpj1g56ggnaffm87k4abhwjwq6wq608"))
934 (modules '((guix build utils)))
937 ;; Remove included binaries which are used to build self-extracting
938 ;; installers for Windows.
939 ;; TODO: Find some way to build them ourself so we can include them.
940 (for-each delete-file (find-files "setuptools" "^(cli|gui).*\\.exe$"))
942 (build-system python-build-system)
943 ;; FIXME: Tests require pytest, which itself relies on setuptools.
944 ;; One could bootstrap with an internal untested setuptools.
947 (home-page "https://pypi.python.org/pypi/setuptools")
949 "Library designed to facilitate packaging Python projects")
951 "Setuptools is a fully-featured, stable library designed to facilitate
952 packaging Python projects, where packaging includes:
953 Python package and module definitions,
954 distribution package metadata,
956 project installation,
957 platform-specific details,
959 ;; TODO: setuptools now bundles the following libraries:
960 ;; packaging, pyparsing, six and appdirs. How to unbundle?
961 (license (list license:psfl ; setuptools itself
962 license:expat ; six, appdirs, pyparsing
963 license:asl2.0 ; packaging is dual ASL2/BSD-2
966 (define-public python2-setuptools
967 (package-with-python2 python-setuptools))
969 ;;; Pycrypto is abandoned upstream:
971 ;;; https://github.com/dlitz/pycrypto/issues/173
973 ;;; TODO Remove this package from GNU Guix.
974 (define-public python-pycrypto
976 (name "python-pycrypto")
981 (uri (pypi-uri "pycrypto" version))
982 (patches (search-patches "python-pycrypto-CVE-2013-7459.patch"))
985 "0g0ayql5b9mkjam8hym6zyg6bv77lbh66rv1fyvgqb17kfc1xkpj"))))
986 (build-system python-build-system)
993 'build 'set-build-env
994 ;; pycrypto runs an autoconf configure script behind the scenes
996 (setenv "CONFIG_SHELL" (which "bash")))
998 (home-page "http://www.pycrypto.org/")
999 (synopsis "Cryptographic modules for Python")
1001 "Pycrypto is a collection of both secure hash functions (such as SHA256
1002 and RIPEMD160), and various encryption algorithms (AES, DES, RSA, ElGamal,
1003 etc.). The package is structured to make adding new modules easy.")
1004 (license license:public-domain)))
1006 (define-public python2-pycrypto
1007 (let ((pycrypto (package-with-python2 python-pycrypto)))
1008 (package (inherit pycrypto)
1010 `(("python" ,python-2)
1013 (package-inputs pycrypto)))))))
1015 (define-public python-eventlet
1017 (name "python-eventlet")
1022 (uri (pypi-uri "eventlet" version))
1025 "0f3q55mq4n021wb7qa53pz3ix6i2py64sap66vsaqm2scjw83m9s"))))
1026 (build-system python-build-system)
1028 `(("python-greenlet" ,python-greenlet)))
1029 (home-page "http://eventlet.net")
1030 (synopsis "Concurrent networking library for Python")
1032 "Eventlet is a concurrent networking library for Python that
1033 allows you to change how you run your code, not how you write it.
1034 It uses @code{epoll} or @code{libevent} for highly scalable non-blocking I/O.
1035 Coroutines ensure that the developer uses a blocking style of programming
1036 that is similar to threading, but provide the benefits of non-blocking I/O.
1037 The event dispatch is implicit, which means you can easily use @code{Eventlet}
1038 from the Python interpreter, or as a small part of a larger application.")
1039 (license license:expat)))
1041 (define-public python2-eventlet
1042 (let ((base (package-with-python2
1043 (strip-python2-variant python-eventlet))))
1044 (package (inherit base)
1046 `(("python2-enum34" ,python2-enum34)
1047 ,@(package-propagated-inputs base))))))
1049 (define-public python-keyring
1051 (name "python-keyring")
1056 (uri (pypi-uri "keyring" version))
1059 "0482rmi2x6p78wl2kz8qzyq21xz1sbbfwnv5x7dggar4vkwxhzfx"))))
1060 (build-system python-build-system)
1062 `(("python-setuptools-scm" ,python-setuptools-scm)))
1064 `(("python-pycrypto" ,python-pycrypto)))
1066 `(#:tests? #f)) ;TODO: tests require pytest
1067 (home-page "https://github.com/jaraco/keyring")
1068 (synopsis "Store and access your passwords safely")
1070 "The Python keyring lib provides a easy way to access the system keyring
1071 service from python. It can be used in any application that needs safe
1073 ;; "MIT" and PSF dual license
1074 (license license:x11)))
1076 (define-public python2-keyring
1077 (package-with-python2 python-keyring))
1079 (define-public python-six
1086 (uri (pypi-uri "six" version))
1089 "0snmb8xffb3vsma0z67i0h0w2g2dy0p3gsgh9gi4i0kgc5l8spqh"))))
1090 (build-system python-build-system)
1092 `(("python-py" ,python-py)
1093 ("python-pytest" ,python-pytest)))
1094 (home-page "http://pypi.python.org/pypi/six/")
1095 (synopsis "Python 2 and 3 compatibility utilities")
1097 "Six is a Python 2 and 3 compatibility library. It provides utility
1098 functions for smoothing over the differences between the Python versions with
1099 the goal of writing Python code that is compatible on both Python versions.
1100 Six supports every Python version since 2.5. It is contained in only one
1101 Python file, so it can be easily copied into your project.")
1102 (license license:x11)))
1104 (define-public python2-six
1105 (package-with-python2 python-six))
1107 (define-public python-dateutil
1109 (name "python-dateutil")
1114 (uri (pypi-uri "python-dateutil" version))
1117 "1v9j9fmf8g911yg6k01xa2db6dx3wv73zkk7fncsj7vagjqgs20l"))))
1118 (build-system python-build-system)
1120 `(("python-six" ,python-six)))
1121 (home-page "https://dateutil.readthedocs.io/en/stable/")
1122 (synopsis "Extensions to the standard datetime module")
1124 "The dateutil module provides powerful extensions to the standard
1125 datetime module, available in Python 2.3+.")
1126 (license license:bsd-3)))
1128 (define-public python2-dateutil
1129 (package-with-python2 python-dateutil))
1131 (define-public python-parsedatetime
1133 (name "python-parsedatetime")
1138 (uri (pypi-uri "parsedatetime" version))
1141 "1vkrmd398s11h1zn3zaqqsiqhj9lwy1ikcg6irx2lrgjzjg3rjll"))))
1142 (build-system python-build-system)
1144 `(("python-nose" ,python-nose)
1145 ("python-pyicu" ,python-pyicu)
1146 ("python-pytest" ,python-pytest)
1147 ("python-pytest-runner" ,python-pytest-runner)))
1149 `(("python-future" ,python-future)))
1150 (home-page "http://github.com/bear/parsedatetime/")
1152 "Parse human-readable date/time text")
1154 "Parse human-readable date/time text.")
1155 (license license:asl2.0)))
1157 (define-public python2-parsedatetime
1158 (package-with-python2 python-parsedatetime))
1160 (define-public python-pandas
1162 (name "python-pandas")
1167 (uri (pypi-uri "pandas" version))
1169 (base32 "0540cnbwy2hc4hv2sxfs8i47xi91qzvzxfn80dl785ibiicly3vg"))
1171 (search-patches "python-pandas-skip-failing-tests.patch"))))
1172 (build-system python-build-system)
1174 `(("python-numpy" ,python-numpy)
1175 ("python-pytz" ,python-pytz)
1176 ("python-dateutil" ,python-dateutil)))
1178 `(("python-nose" ,python-nose)
1179 ("python-cython" ,python-cython)))
1180 (home-page "http://pandas.pydata.org")
1181 (synopsis "Data structures for data analysis, time series, and statistics")
1183 "Pandas is a Python package providing fast, flexible, and expressive data
1184 structures designed to make working with structured (tabular,
1185 multidimensional, potentially heterogeneous) and time series data both easy
1186 and intuitive. It aims to be the fundamental high-level building block for
1187 doing practical, real world data analysis in Python.")
1188 (license license:bsd-3)))
1190 (define-public python2-pandas
1191 (package-with-python2 python-pandas))
1193 (define-public python-tzlocal
1195 (name "python-tzlocal")
1200 (uri (pypi-uri "tzlocal" version))
1203 "0paj7vlsb0np8b5sp4bv64wxv7qk2piyp7xg29pkhdjwsbls9fnb"))))
1204 (build-system python-build-system)
1206 `(("python-pytz" ,python-pytz)))
1207 (home-page "https://github.com/regebro/tzlocal")
1209 "Local timezone information for Python")
1211 "Tzlocal returns a tzinfo object with the local timezone information.
1212 This module attempts to fix a glaring hole in pytz, that there is no way to
1213 get the local timezone information, unless you know the zoneinfo name, and
1214 under several distributions that's hard or impossible to figure out.")
1215 (license license:cc0)))
1217 (define-public python2-pysqlite
1219 (name "python2-pysqlite")
1224 (uri (pypi-uri "pysqlite" version))
1227 "1424gwq9sil2ffmnizk60q36vydkv8rxs6m7xs987kz8cdc37lqp"))))
1228 (build-system python-build-system)
1230 `(("sqlite" ,sqlite)))
1232 `(#:python ,python-2 ; incompatible with Python 3
1233 #:tests? #f)) ; no test target
1234 (home-page "http://github.com/ghaering/pysqlite")
1235 (synopsis "SQLite bindings for Python")
1237 "Pysqlite provides SQLite bindings for Python that comply to the
1238 Database API 2.0T.")
1239 (license license:zlib)))
1242 (define-public python2-mechanize
1244 (name "python2-mechanize")
1249 (uri (string-append "https://pypi.python.org/packages/source/m/mechanize/mechanize-"
1253 "0rj7r166i1dyrq0ihm5rijfmvhs8a04im28lv05c0c3v206v4rrf"))))
1254 (build-system python-build-system)
1256 `(#:python ,python-2 ; apparently incompatible with Python 3
1258 ;; test fails with message
1259 ;; AttributeError: 'module' object has no attribute 'test_pullparser'
1260 ;; (python-3.3.2) or
1261 ;; AttributeError: 'module' object has no attribute 'test_urllib2_localnet'
1263 ;; The source code is from March 2011 and probably not up-to-date
1264 ;; with respect to python unit tests.
1265 (home-page "http://wwwsearch.sourceforge.net/mechanize/")
1267 "Stateful programmatic web browsing in Python")
1269 "Mechanize implements stateful programmatic web browsing in Python,
1270 after Andy Lester’s Perl module WWW::Mechanize.")
1271 (license (license:non-copyleft
1273 "See COPYING in the distribution."))))
1276 (define-public python-simplejson
1278 (name "python-simplejson")
1283 (uri (pypi-uri "simplejson" version))
1286 "1qhwsykjlb85igb4cfl6v6gkprzbbg8gyqdd7zscc8w3x0ifcfwm"))))
1287 (build-system python-build-system)
1288 (home-page "http://simplejson.readthedocs.org/en/latest/")
1290 "Json library for Python")
1292 "JSON (JavaScript Object Notation) is a subset of JavaScript
1293 syntax (ECMA-262 3rd edition) used as a lightweight data interchange
1296 Simplejson exposes an API familiar to users of the standard library marshal
1297 and pickle modules. It is the externally maintained version of the json
1298 library contained in Python 2.6, but maintains compatibility with Python 2.5
1299 and (currently) has significant performance advantages, even without using
1300 the optional C extension for speedups. Simplejson is also supported on
1302 (license license:x11)))
1304 (define-public python2-simplejson
1305 (package-with-python2 python-simplejson))
1308 (define-public python-pyicu
1310 (name "python-pyicu")
1315 (uri (pypi-uri "PyICU" version))
1318 "16rmxy9y0qhqqna2v49i7nzwm09as699rbyvh4raw7w602w55c3k"))))
1319 (build-system python-build-system)
1322 (modify-phases %standard-phases
1323 (add-before 'check 'delete-failing-test
1325 ;; XXX: These tests require locales that are unavailable
1326 ;; in the build environment.
1327 (delete-file "test/test_DateTimeParserGenerator.py")
1330 `(("icu4c" ,icu4c)))
1331 (home-page "http://pyicu.osafoundation.org/")
1332 (synopsis "Python extension wrapping the ICU C++ API")
1334 "PyICU is a python extension wrapping the ICU C++ API.")
1335 (license license:x11)))
1337 (define-public python2-pyicu
1338 (package-with-python2 python-pyicu))
1340 (define-public python2-dogtail
1341 ;; Python 2 only, as it leads to "TabError: inconsistent use of tabs and
1342 ;; spaces in indentation" with Python 3.
1344 (name "python2-dogtail")
1349 "https://fedorahosted.org/released/dogtail/dogtail-"
1353 "1yc4cg7ip87z15gyd4wy2vzbywrjc52a3m8r8gqy2b50d65llcg1"))))
1354 (build-system python-build-system)
1355 (arguments `(#:python ,python-2
1356 #:tests? #f)) ; invalid command "test"
1357 (home-page "https://fedorahosted.org/dogtail/")
1358 (synopsis "GUI test tool and automation framework written in Python")
1360 "Dogtail is a GUI test tool and automation framework written in Python.
1361 It uses Accessibility (a11y) technologies to communicate with desktop
1362 applications. dogtail scripts are written in Python and executed like any
1363 other Python program.")
1364 (license license:gpl2+)))
1366 (define-public python2-empy
1368 (name "python2-empy")
1372 (uri (string-append "http://www.alcyone.com/software/empy/empy-"
1376 "01g8mmkfnvjdmlhsihwyx56lrg7r5m5d2fg6mnxsvy6g0dnl69f6"))))
1377 (build-system python-build-system)
1379 `(#:python ,python-2
1380 #:phases (alist-replace
1383 (zero? (system* "./test.sh")))
1385 (home-page "http://www.alcyone.com/software/empy/")
1386 (synopsis "Templating system for Python")
1388 "EmPy is a system for embedding Python expressions and statements in
1389 template text; it takes an EmPy source file, processes it, and produces
1390 output. This is accomplished via expansions, which are special signals to the
1391 EmPy system and are set off by a special prefix (by default the at sign, @@).
1392 EmPy can expand arbitrary Python expressions and statements in this way, as
1393 well as a variety of special forms. Textual data not explicitly delimited in
1394 this way is sent unaffected to the output, allowing Python to be used in
1395 effect as a markup language. Also supported are callbacks via hooks,
1396 recording and playback via diversions, and dynamic, chainable filters. The
1397 system is highly configurable via command line options and embedded
1399 (license license:lgpl2.1+)))
1401 (define-public python2-element-tree
1403 (name "python2-element-tree")
1408 "http://effbot.org/media/downloads/elementtree-"
1409 version "-20050316.tar.gz"))
1412 "016bphqnlg0l4vslahhw4r0aanw95bpypy65r1i1acyb2wj5z7dj"))))
1413 (build-system python-build-system)
1415 `(#:python ,python-2 ; seems to be part of Python 3
1416 #:tests? #f)) ; no 'test' sub-command
1417 (synopsis "Toolkit for XML processing in Python")
1419 "ElementTree is a Python library supporting lightweight XML processing.")
1420 (home-page "http://effbot.org/zone/element-index.htm")
1421 (license (license:x11-style
1422 "http://docs.python.org/2/license.html"
1423 "Like \"CWI LICENSE AGREEMENT FOR PYTHON 0.9.0 THROUGH 1.2\"."))))
1425 (define-public python2-pybugz
1427 (name "python2-pybugz")
1432 "http://bits.liquidx.net/projects/pybugz/pybugz-"
1436 "17ni00p08gp5lkxlrrcnvi3x09fmajnlbz4da03qcgl9q21ym4jd"))
1437 (patches (search-patches "pybugz-stty.patch"
1438 "pybugz-encode-error.patch"))))
1439 (build-system python-build-system)
1441 `(#:python ,python-2 ; SyntaxError with Python 3
1442 #:tests? #f)) ; no 'test' sub-command
1444 `(("element-tree" ,python2-element-tree)))
1445 (synopsis "Python and command-line interface to Bugzilla")
1447 "PyBugz is a Python library and command-line tool to query the Bugzilla
1448 bug tracking system. It is meant as an aid to speed up interaction with the
1450 (home-page "http://www.liquidx.net/pybugz/")
1451 (license license:gpl2)))
1453 (define-public python-enum34
1455 (name "python-enum34")
1460 (uri (pypi-uri "enum34" version))
1463 "0yx1m4564wxgbm4glb3457hi16xihd9w63rv13y2przkdir9dfgp"))))
1464 (build-system python-build-system)
1469 (lambda _ (zero? (system* "python" "enum/test_enum.py")))
1471 (home-page "https://pypi.python.org/pypi/enum34")
1472 (synopsis "Backported Python 3.4 Enum")
1474 "Enum34 is the new Python stdlib enum module available in Python 3.4
1475 backported for previous versions of Python from 2.4 to 3.3.")
1476 (license license:bsd-3)))
1478 (define-public python2-enum34
1479 (package-with-python2 python-enum34))
1481 (define-public python-parse-type
1483 (name "python-parse-type")
1488 (uri (string-append "https://pypi.python.org/packages/source/p/"
1489 "parse_type/parse_type-" version ".tar.gz"))
1492 "0iv1c34npr4iynwpgv1vkjx9rjd18a85ir8c01gc5f7wp8iv7l1x"))))
1493 (build-system python-build-system)
1495 `(("python-six" ,python-six)
1496 ("python-parse" ,python-parse)))
1497 (arguments '(#:tests? #f)) ;TODO: tests require pytest
1498 (home-page "https://github.com/jenisys/parse_type")
1499 (synopsis "Extended parse module")
1501 "Parse_type extends the python parse module.")
1502 (license license:bsd-3)))
1504 (define-public python-parse
1506 (name "python-parse")
1511 (uri (pypi-uri "parse" version))
1514 "0y31i3mwgv35qn0kzzjn9q8jqfdqmbi6sr6yfvn8rq4lqjm5lhvi"))
1515 (patches (search-patches "python-parse-too-many-fields.patch"))))
1516 (build-system python-build-system)
1519 (modify-phases %standard-phases
1521 (lambda _ (zero? (system* "python" "test_parse.py")))))))
1522 (home-page "https://github.com/r1chardj0n3s/parse")
1523 (synopsis "Parse strings")
1525 "Parse strings using a specification based on the Python format()
1527 (license license:x11)))
1529 (define-public python-polib
1531 (name "python-polib")
1535 (uri (pypi-uri "polib" version))
1538 "1pq2hbm3m2q0cjdszk8mc4qa1vl3wcblh5nfyirlfnzb2pcy7zss"))))
1539 (build-system python-build-system)
1540 (home-page "https://bitbucket.org/izi/polib/wiki/Home")
1541 (synopsis "Manipulate, create and modify gettext files")
1542 (description "Polib can manipulate any gettext format (po, pot and mo)
1543 files. It can be used to create po files from scratch or to modify
1545 (license license:expat)))
1547 (define-public python2-polib
1548 (let ((base (package-with-python2 (strip-python2-variant python-polib))))
1551 (arguments `(,@(package-arguments base)
1552 ;; Tests don't work with python2.
1555 (define-public scons
1561 (uri (string-append "mirror://sourceforge/scons/scons/" version
1562 "/scons-" version ".tar.gz"))
1565 "0hdlci43wjz8maryj83mz04ir6rwcdrrzpd7cpzvdlzycqhdfmsb"))))
1566 (build-system python-build-system)
1568 ;; With Python 3.x, fails to build with a syntax error.
1569 `(#:python ,python-2
1570 #:use-setuptools? #f ; still relies on distutils
1571 #:tests? #f)) ; no 'python setup.py test' command
1572 (home-page "http://scons.org/")
1573 (synopsis "Software construction tool written in Python")
1575 "SCons is a software construction tool. Think of SCons as an improved,
1576 cross-platform substitute for the classic Make utility with integrated
1577 functionality similar to autoconf/automake and compiler caches such as ccache.
1578 In short, SCons is an easier, more reliable and faster way to build
1580 (license license:x11)))
1582 (define-public python-extras
1584 (name "python-extras")
1590 "https://pypi.python.org/packages/source/e/extras/extras-"
1594 "1h7zx4dfyclalg0fqnfjijpn0f793a9mx8sy3b27gd31nr6dhq3s"))))
1595 (build-system python-build-system)
1597 ;; error in setup.cfg: command 'test' has no such option 'buffer'
1599 (home-page "https://github.com/testing-cabal/extras")
1600 (synopsis "Useful extensions to the Python standard library")
1602 "Extras is a set of extensions to the Python standard library.")
1603 (license license:expat)))
1605 (define-public python2-extras
1606 (package-with-python2 python-extras))
1608 (define-public python-mimeparse
1610 (name "python-mimeparse")
1616 "https://pypi.python.org/packages/source/p/python-mimeparse/python-mimeparse-"
1620 "1hyxg09kaj02ri0rmwjqi86wk4nd1akvv7n0dx77azz76wga4s9w"))))
1621 (build-system python-build-system)
1623 '(#:tests? #f)) ; no setup.py test command
1625 "https://github.com/dbtsai/python-mimeparse")
1626 (synopsis "Python library for parsing MIME types")
1628 "Mimeparse provides basic functions for parsing MIME type names and
1629 matching them against a list of media-ranges.")
1630 (license license:expat)))
1632 (define-public python2-mimeparse
1633 (package-with-python2 python-mimeparse))
1635 (define-public python-nose
1637 (name "python-nose")
1642 (uri (pypi-uri "nose" version))
1645 "164a43k7k2wsqqk1s6vavcdamvss4mz0vd6pwzv2h9n8rgwzxgzi"))))
1646 (build-system python-build-system)
1648 '(#:tests? #f)) ; FIXME: test suite fails
1649 (home-page "http://readthedocs.org/docs/nose/")
1650 (synopsis "Python testing library")
1652 "Nose extends the unittest library to make testing easier.")
1653 (license license:lgpl2.0+)))
1655 (define-public python2-nose
1656 (package-with-python2 python-nose))
1658 (define-public python-nose2
1660 (name "python-nose2")
1665 (uri (pypi-uri "nose2" version))
1668 "1x4zjq1zlyrh8b9ba0cmafd3w94pxhid408kibyjd3s6h1lap6s7"))))
1669 (build-system python-build-system)
1670 (arguments `(#:tests? #f)) ; 'module' object has no attribute 'collector'
1672 `(("python-cov-core" ,python-cov-core)
1673 ("python-pytest-cov" ,python-pytest-cov)
1674 ("python-six" ,python-six)))
1675 (home-page "https://github.com/nose-devs/nose2")
1676 (synopsis "Next generation of nicer testing for Python")
1678 "Nose2 is the next generation of nicer testing for Python, based on the
1679 plugins branch of unittest2. Nose2 aims to improve on nose by providing a
1680 better plugin api, being easier for users to configure, and simplifying internal
1681 interfaces and processes.")
1682 (license license:bsd-2)))
1684 (define-public python2-nose2
1685 (package-with-python2 python-nose2))
1687 (define-public python-unittest2
1689 (name "python-unittest2")
1695 "https://pypi.python.org/packages/source/u/unittest2py3k/unittest2py3k-"
1699 "00yl6lskygcrddx5zspkhr0ibgvpknl4678kkm6s626539grq93q"))))
1700 (build-system python-build-system)
1701 (home-page "http://pypi.python.org/pypi/unittest2")
1702 (synopsis "Python unit testing library")
1704 "Unittest2 is a replacement for the unittest module in the Python
1706 (license license:psfl)))
1708 (define-public python2-unittest2
1709 (package (inherit python-unittest2)
1710 (name "python2-unittest2")
1716 "https://pypi.python.org/packages/source/u/unittest2/unittest2-"
1720 "0wbs4i4x3x7klr3v35ss6p9mcqz883i1xgcpkhvl7n2lyv6yhpda"))))
1722 `(#:python ,python-2
1723 #:tests? #f)))) ; no setup.py test command
1725 (define-public python-pafy
1727 (name "python-pafy")
1732 (uri (pypi-uri "pafy" version))
1735 "1a7dxi95m1043rxx1r5x3ngb66nwlq6aqcasyqqjzmmmjps4zrim"))))
1736 (build-system python-build-system)
1738 `(#:tests? #f)) ; Currently pafy can not find itself in the tests
1740 ;; Youtube-dl is a python package which is imported in the file
1741 ;; "backend_youtube_dl.py", therefore it needs to be propagated.
1742 `(("youtube-dl" ,youtube-dl)))
1743 (home-page "https://np1.github.io/pafy/")
1744 (synopsis "Retrieve YouTube content and metadata")
1746 "@code{pafy} is a python library to retrieve YouTube content and metadata.")
1747 (license license:lgpl3+)))
1749 (define-public python-py
1756 (uri (pypi-uri "py" version))
1759 "19s1pql9pq85h1qzsdwgyb8a3k1qgkvh33b02m8kfqhizz8rzf64"))))
1760 (build-system python-build-system)
1762 ;; FIXME: "ImportError: 'test' module incorrectly imported from
1763 ;; '/gnu/store/...-python-pytest-mimimal-3.0.5/lib/python3.5/site-packages'.
1764 ;; Expected '/tmp/guix-build-python-py-1.4.31.drv-0/py-1.4.31/py'.
1765 ;; Is this module globally installed?"
1767 (home-page "http://pylib.readthedocs.org/")
1768 (synopsis "Python library for parsing, I/O, instrospection, and logging")
1770 "Py is a Python library for file name parsing, .ini file parsing, I/O,
1771 code introspection, and logging.")
1772 (license license:expat)))
1774 (define-public python2-py
1775 (package-with-python2 python-py))
1777 (define-public python-pytest
1779 (name "python-pytest")
1785 "https://pypi.python.org/packages/source/p/pytest/pytest-"
1789 "1z4yi986f9n0p8qmzmn21m21m8j1x78hk3505f89baqm6pdw7afm"))
1790 (modules '((guix build utils)))
1792 ;; One of the tests involves the /usr directory, so it fails.
1793 '(substitute* "testing/test_argcomplete.py"
1794 (("def test_remove_dir_prefix\\(self\\):")
1795 "@pytest.mark.xfail\n def test_remove_dir_prefix(self):")))))
1796 (build-system python-build-system)
1798 `(("python-py" ,python-py)))
1800 `(("python-nose" ,python-nose)
1801 ("python-mock" ,python-mock)))
1802 (home-page "http://pytest.org")
1803 (synopsis "Python testing library")
1805 "Pytest is a testing tool that provides auto-discovery of test modules
1806 and functions, detailed info on failing assert statements, modular fixtures,
1807 and many external plugins.")
1808 (license license:expat)))
1810 (define-public python2-pytest
1811 (package-with-python2 python-pytest))
1813 ;; This package is used by Borg until we can upgrade all our Python packages to
1814 ;; use a more recent pytest.
1815 (define-public python-pytest-2.9.2
1817 (inherit python-pytest)
1818 (name "python-pytest")
1822 (uri (pypi-uri "pytest" version))
1825 "1n6igbc1b138wx1q5gca4pqw1j6nsyicfxds5n0b5989kaxqmh8j"))))
1828 (modify-phases %standard-phases
1829 (add-before 'check 'disable-invalid-test
1831 (substitute* "testing/test_argcomplete.py"
1832 (("def test_remove_dir_prefix" line)
1833 (string-append "@pytest.mark.skip"
1834 "(reason=\"Assumes that /usr exists.\")\n "
1838 (define-public python-pytest-cov
1840 (name "python-pytest-cov")
1845 (uri (pypi-uri "pytest-cov" version))
1848 "1yl4nbhzfgsxqlsyk4clafgp9x11zvgrkprm9i2p3fgkwx9jxcm8"))))
1849 (build-system python-build-system)
1852 (modify-phases %standard-phases
1855 ;; options taken from tox.ini
1856 ;; TODO: make "--restructuredtext" tests pass. They currently fail
1857 ;; with "Duplicate implicit target name"
1858 (zero? (system* "python" "./setup.py" "check"
1859 "--strict" "--metadata")))))))
1861 `(("python-coverage" ,python-coverage)
1862 ("python-pytest" ,python-pytest)))
1863 (home-page "https://github.com/pytest-dev/pytest-cov")
1864 (synopsis "Pytest plugin for measuring coverage")
1866 "Pytest-cov produces coverage reports. It supports centralised testing and
1867 distributed testing in both @code{load} and @code{each} modes. It also
1868 supports coverage of subprocesses.")
1869 (license license:expat)))
1871 (define-public python2-pytest-cov
1872 (package-with-python2 python-pytest-cov))
1874 (define-public python-pytest-runner
1876 (name "python-pytest-runner")
1881 (uri (pypi-uri "pytest-runner" version))
1884 "1nwcqx0l3fv52kv8526wy8ypzghbq96c96di318d98d3wh7a8xg7"))))
1885 (build-system python-build-system)
1888 (modify-phases %standard-phases
1889 ;; The fancy way of setting the version with setuptools_scm does not
1890 ;; seem to work here.
1891 (add-after 'unpack 'set-version
1893 (substitute* "docs/conf.py"
1894 (("version = setuptools_scm\\.get_version\\(root='\\.\\.')")
1895 (string-append "version = \"" ,version "\"")))
1898 `(("python-pytest" ,python-pytest)
1899 ("python-setuptools-scm" ,python-setuptools-scm)))
1900 (home-page "https://github.com/pytest-dev/pytest-runner")
1901 (synopsis "Invoke py.test as a distutils command")
1903 "This package provides a @command{pytest-runner} command that
1904 @file{setup.py} files can use to run tests.")
1905 (license license:expat)))
1907 (define-public python2-pytest-runner
1908 (package-with-python2 python-pytest-runner))
1910 (define-public python-pytest-mock
1912 (name "python-pytest-mock")
1917 (uri (pypi-uri "pytest-mock" version ".zip"))
1920 "03zxar5drzm7ksqyrwypjaza3cri6wqvpr6iam92djvg6znp32gp"))))
1921 (build-system python-build-system)
1923 `(("unzip" ,unzip)))
1925 `(("python-pytest" ,python-pytest)))
1926 (home-page "https://github.com/pytest-dev/pytest-mock/")
1927 (synopsis "Thin-wrapper around the mock package for easier use with py.test")
1929 "This plugin installs a @code{mocker} fixture which is a thin-wrapper
1930 around the patching API provided by the @code{mock} package, but with the
1931 benefit of not having to worry about undoing patches at the end of a test.
1932 The mocker fixture has the same API as @code{mock.patch}, supporting the
1934 (properties `((python2-variant . ,(delay python2-pytest-mock))))
1935 (license license:expat)))
1937 (define-public python2-pytest-mock
1938 (let ((base (package-with-python2
1939 (strip-python2-variant python-pytest-mock))))
1940 (package (inherit base)
1942 `(("python2-mock" ,python2-mock)
1943 ,@(package-propagated-inputs base))))))
1945 (define-public python-pytest-xdist
1947 (name "python-pytest-xdist")
1952 (uri (pypi-uri "pytest-xdist" version ".zip"))
1955 "08rn2l39ds60xshs4js787l84pfckksqklfq2wq9x8ig2aci2pja"))
1956 (modules '((guix build utils)))
1959 ;; Remove pre-compiled .pyc files from source.
1960 (for-each delete-file-recursively
1961 (find-files "." "__pycache__" #:directories? #t))
1962 (for-each delete-file (find-files "." "\\.pyc$"))
1964 (build-system python-build-system)
1966 '(#:tests? #f)) ;FIXME: Some tests are failing.
1968 ;; (modify-phases %standard-phases
1970 ;; (add-after 'install 'check
1971 ;; (lambda* (#:key inputs outputs #:allow-other-keys)
1972 ;; (add-installed-pythonpath inputs outputs)
1973 ;; (zero? (system* "py.test" "-v")))))
1976 ("python-setuptools-scm" ,python-setuptools-scm)))
1978 `(("python-execnet" ,python-execnet)
1979 ("python-pytest" ,python-pytest)
1980 ("python-py" ,python-py)))
1982 "https://github.com/pytest-dev/pytest-xdist")
1984 "Plugin for py.test with distributed testing and loop-on-failing modes")
1986 "The pytest-xdist plugin extends py.test with some unique test execution
1987 modes: parallelization, running tests in boxed subprocesses, the ability
1988 to run tests repeatedly when failed, and the ability to run tests on multiple
1989 Python interpreters or platforms. It uses rsync to copy the existing
1990 program code to a remote location, executes there, and then syncs the
1992 (license license:expat)))
1994 (define-public python2-pytest-xdist
1995 (package-with-python2 python-pytest-xdist))
1997 (define-public python-scripttest
1999 (name "python-scripttest")
2005 "https://pypi.python.org/packages/source/s/scripttest/scripttest-"
2009 "0f4w84k8ck82syys7yg9maz93mqzc8p5ymis941x034v44jzq74m"))))
2010 (build-system python-build-system)
2012 `(("python-pytest" ,python-pytest)))
2013 (home-page "http://pythonpaste.org/scripttest/")
2014 (synopsis "Python library to test command-line scripts")
2015 (description "Scripttest is a Python helper library for testing
2016 interactive command-line applications. With it you can run a script in a
2017 subprocess and see the output as well as any file modifications.")
2018 (license license:expat)))
2020 (define-public python2-scripttest
2021 (package-with-python2 python-scripttest))
2023 (define-public python-testtools
2025 (name "python-testtools")
2030 (uri (pypi-uri "testtools" version))
2033 "1vw8yljnd75d396hhw6s2hrf4cclzy845ifd5am0lxsl235z3i8c"))))
2034 (build-system python-build-system)
2037 (modify-phases %standard-phases
2038 (add-after 'unpack 'fix-module-imports
2040 (substitute* "setup.py"
2041 (("'unittest2>=0.8.0',") ""))
2042 (substitute* '("testtools/testcase.py"
2043 "testtools/testsuite.py"
2045 "testtools/tests/test_run.py"
2046 "testtools/tests/test_testsuite.py"
2047 "testtools/tests/test_deferredruntest.py")
2048 ;; unittest2 is a backport of Python2.7 features to Python 2.4.
2049 (("import unittest2 as unittest") "import unittest")
2050 (("import unittest2") "import unittest as unittest2")
2051 (("from unittest2 import") "from unittest import"))
2052 (substitute* "testtools/tests/test_testresult.py"
2053 ;; NUL in source code is not allowed (raises ValueError).
2054 (("\\x00\\x04") "\\x04"))
2057 `(("python-mimeparse" ,python-mimeparse)
2058 ("python-extras" ,python-extras)))
2059 (home-page "https://github.com/testing-cabal/testtools")
2061 "Extensions to the Python standard library unit testing framework")
2063 "Testtools extends the Python standard library unit testing framework to
2064 provide matchers, more debugging information, and cross-Python
2066 (license license:psfl)))
2068 (define-public python2-testtools
2069 (package-with-python2 python-testtools))
2071 (define-public python-testscenarios
2073 (name "python-testscenarios")
2079 "https://pypi.python.org/packages/source/t/testscenarios/testscenarios-"
2083 "1671jvrvqlmbnc42j7pc5y6vc37q44aiwrq0zic652pxyy2fxvjg"))))
2084 (build-system python-build-system)
2086 `(("python-testtools" ,python-testtools)))
2087 (home-page "https://launchpad.net/testscenarios")
2088 (synopsis "Pyunit extension for dependency injection")
2090 "Testscenarios provides clean dependency injection for Python unittest
2092 (license (list license:bsd-3 license:asl2.0)))) ; at the user's option
2094 (define-public python2-testscenarios
2095 (package-with-python2 python-testscenarios))
2097 (define-public python-testresources
2099 (name "python-testresources")
2105 "https://pypi.python.org/packages/source/t/testresources/testresources-"
2109 "0cbj3plbllyz42c4b5xxgwaa7mml54lakslrn4kkhinxhdri22md"))))
2110 (build-system python-build-system)
2111 (home-page "https://launchpad.net/testresources")
2113 "Pyunit extension for managing test resources")
2115 "Testresources is an extension to Python's unittest to allow declarative
2116 use of resources by test cases.")
2117 (license (list license:bsd-3 license:asl2.0)))) ; at the user's option
2119 (define-public python2-testresources
2120 (package-with-python2 python-testresources))
2122 (define-public python-subunit
2124 (name "python-subunit")
2130 "https://pypi.python.org/packages/source/p/python-subunit/python-subunit-"
2134 "1nkw9wfbvizmpajbj3in8ns07g7lwkiv8hip14jjlwk3cacls6jv"))))
2135 (build-system python-build-system)
2137 `(("python-extras" ,python-extras)
2138 ("python-mimeparse" ,python-mimeparse)))
2140 `(("python-testscenarios" ,python-testscenarios)))
2141 (home-page "http://launchpad.net/subunit")
2142 (synopsis "Python implementation of the subunit protocol")
2144 "Python-subunit is a Python implementation of the subunit test streaming
2146 (license (list license:bsd-3 license:asl2.0)))) ; at the user's option
2148 (define-public python2-subunit
2149 (package-with-python2 python-subunit))
2151 ;; Recent versions of python-fixtures and python-testrepository need
2152 ;; python-pbr for packaging, which itself needs these two packages for
2154 ;; To fix this circular dependency, we use a build of python-pbr, based on the
2155 ;; same source, just without any test dependencies and with tests disabled.
2156 ;; python-pbr-minmal is then used to package python-fixtures and
2157 ;; python-testrepository.
2158 ;; Strictly speaking we currently could remove the test-requirements from the
2159 ;; normal python-pbr package (and save this package) since test are disabled
2160 ;; there anyway. But this may change in future.
2161 (define python-pbr-minimal
2163 (name "python-pbr-minimal")
2168 (uri (pypi-uri "pbr" version))
2171 "177kd9kbv1hvf2ban7l3x9ymzbi1md4hkaymwbgnz7ihf312hr0q"))
2172 (patches (search-patches "python-pbr-fix-man-page-support.patch"))))
2173 (build-system python-build-system)
2176 (home-page "http://docs.openstack.org/developer/pbr/")
2177 (synopsis "Minimal build of python-pbr used for bootstrapping")
2179 "Used only for bootstrapping python2-pbr, you should not need this.")
2180 (license license:asl2.0)))
2182 (define python2-pbr-minimal
2183 (package-with-python2 python-pbr-minimal))
2185 (define-public python-pbr
2187 (inherit python-pbr-minimal)
2190 `(#:tests? #f)) ;; Most tests seem to use the Internet.
2192 `(("git" ,git))) ;; pbr actually uses the "git" binary.
2194 `(("python-fixtures" ,python-fixtures)
2195 ;; discover, coverage, hacking, subunit
2196 ("python-mock" ,python-mock)
2197 ("python-six" ,python-six)
2198 ("python-sphinx" ,python-sphinx)
2199 ("python-testrepository" ,python-testrepository)
2200 ("python-testresources" ,python-testresources)
2201 ("python-testscenarios" ,python-testscenarios)
2202 ("python-testtools" ,python-testtools)
2203 ("python-virtualenv" ,python-virtualenv)))
2204 (synopsis "Enhance the default behavior of Python’s setuptools")
2206 "Python Build Reasonableness (PBR) is a library that injects some useful
2207 and sensible default behaviors into your setuptools run. It will set
2208 versions, process requirements files and generate AUTHORS and ChangeLog file
2209 from git information.
2212 (define-public python2-pbr
2213 (package-with-python2 python-pbr))
2215 (define-public python-fixtures
2217 (name "python-fixtures")
2222 (uri (pypi-uri "fixtures" version))
2225 "0djxvdwm8s60dbfn7bhf40x6g818p3b3mlwijm1c3bqg7msn271y"))))
2226 (build-system python-build-system)
2229 (modify-phases %standard-phases
2232 (zero? (system* "python" "-m" "testtools.run"
2233 "fixtures.test_suite")))))))
2235 `(("python-six" ,python-six)))
2237 `(("python-mock" ,python-mock)
2238 ("python-pbr-minimal" ,python-pbr-minimal)
2239 ("python-testtools" ,python-testtools)))
2240 (home-page "https://launchpad.net/python-fixtures")
2241 (synopsis "Python test fixture library")
2243 "Fixtures provides a way to create reusable state, useful when writing
2245 (license (list license:bsd-3 license:asl2.0)))) ; at user's option
2247 (define-public python2-fixtures
2248 (package-with-python2 python-fixtures))
2250 (define-public python-testrepository
2252 (name "python-testrepository")
2258 "https://pypi.python.org/packages/source/t/testrepository/testrepository-"
2262 "1ssqb07c277010i6gzzkbdd46gd9mrj0bi0i8vn560n2k2y4j93m"))))
2263 (build-system python-build-system)
2265 ;; FIXME: Many tests are failing.
2268 `(("python-fixtures" ,python-fixtures)
2269 ("python-subunit" ,python-subunit)
2270 ("python-testtools" ,python-testtools)))
2272 `(("python-pbr-minimal" ,python-pbr-minimal) ;; same as for building fixture
2273 ("python-mimeparse" ,python-mimeparse)))
2274 (home-page "https://launchpad.net/testrepository")
2275 (synopsis "Database for Python test results")
2276 (description "Testrepository provides a database of test results which can
2277 be used as part of a developer's workflow to check things such as what tests
2278 have failed since the last commit or what tests are currently failing.")
2279 (license (list license:bsd-3 license:asl2.0)))) ; at user's option
2281 (define-public python2-testrepository
2282 (package-with-python2 python-testrepository))
2284 (define-public python-coverage
2286 (name "python-coverage")
2291 (uri (pypi-uri "coverage" version))
2294 "01rbr4br4lsk0lwn8fb96zwd2xr4f0mg1w7iq3j11i8f5ig2nqs1"))))
2295 (build-system python-build-system)
2297 ;; FIXME: 95 tests failed, 539 passed, 6 skipped, 2 errors.
2299 (home-page "http://nedbatchelder.com/code/coverage")
2300 (synopsis "Code coverage measurement for Python")
2302 "Coverage measures code coverage, typically during test execution. It
2303 uses the code analysis tools and tracing hooks provided in the Python standard
2304 library to determine which lines are executable, and which have been
2306 (license license:bsd-3)))
2308 (define-public python2-coverage
2309 (package-with-python2 python-coverage))
2311 (define-public python-cov-core
2313 (name "python-cov-core")
2318 (uri (pypi-uri "cov-core" version))
2321 "0k3np9ymh06yv1ib96sb6wfsxjkqhmik8qfsn119vnhga9ywc52a"))))
2322 (build-system python-build-system)
2324 `(("python-coverage" ,python-coverage)))
2325 (home-page "https://github.com/schlamar/cov-core")
2326 (synopsis "Coverage plugin core for pytest-cov, nose-cov and nose2-cov")
2328 "This is a library package for use by @code{pytest-cov}, @code{nose-cov}
2329 and @code{nose2-cov}. It is useful for developing coverage plugins for these
2330 testing frameworks.")
2331 (license license:expat)))
2333 (define-public python2-cov-core
2334 (package-with-python2 python-cov-core))
2336 (define-public python-discover
2338 (name "python-discover")
2344 "https://pypi.python.org/packages/source/d/discover/discover-"
2348 "0y8d0zwiqar51kxj8lzmkvwc3b8kazb04gk5zcb4nzg5k68zmhq5"))))
2349 (build-system python-build-system)
2350 (home-page "http://pypi.python.org/pypi/discover/")
2352 "Python test discovery for unittest")
2354 "Discover provides test discovery for unittest, a feature that has been
2355 backported from Python 2.7 for Python 2.4+.")
2356 (license license:bsd-3)))
2358 (define-public python2-discover
2359 (package-with-python2 python-discover))
2361 (define-public behave
2367 (uri (pypi-uri "behave" version ".tar.bz2"))
2370 "1iypp6z46r19n4xmgx6m1lwmlpfjh8vapq8izigrqlaarvp2y64c"))))
2371 (build-system python-build-system)
2373 `(("python-six" ,python-six)
2374 ("python-parse" ,python-parse)
2375 ("python-parse-type" ,python-parse-type)))
2376 (arguments `(#:tests? #f)) ;TODO: tests require nose>=1.3 and
2378 (home-page "http://github.com/behave/behave")
2379 (synopsis "Python behavior-driven development")
2381 "Behave is a tool for behavior-driven development in python.
2382 Behavior-driven development (or BDD) is an agile software development
2383 technique that encourages collaboration between developers, QA and
2384 non-technical or business participants in a software project. Behave uses
2385 tests written in a natural language style, backed up by Python code.")
2386 (license license:x11)))
2388 (define-public python-exif-read
2390 (name "python-exif-read")
2394 (uri (pypi-uri "ExifRead" version))
2397 "1b90jf6m9vxh9nanhpyvqdq7hmfx5iggw1l8kq10jrs6xgr49qkr"))))
2398 (build-system python-build-system)
2399 (arguments `(#:tests? #f)) ; no tests
2400 (home-page "https://github.com/ianare/exif-py")
2401 (synopsis "Python library to extract EXIF data from image files")
2403 "ExifRead is a Python library to extract EXIF data from tiff and jpeg
2405 (license license:bsd-3)))
2407 (define-public python2-exif-read
2408 (package-with-python2 python-exif-read))
2410 (define-public python-pyld
2412 (name "python-pyld")
2416 (uri (pypi-uri "PyLD" version))
2419 "1m0fs6897vxfkf7awah5i66i7b7smm5fnywf1w50fpzyfbfhr156"))))
2420 (build-system python-build-system)
2421 (arguments `(#:tests? #f)) ; no tests
2422 (home-page "http://github.com/digitalbazaar/pyld")
2423 (synopsis "Python implementation of the JSON-LD specification")
2425 "PyLD is an implementation of the JSON-LD specification.")
2426 (license license:bsd-3)))
2428 (define-public python2-pyld
2429 (package-with-python2 python-pyld))
2431 (define-public python-certifi
2433 (name "python-certifi")
2434 (version "2017.1.23")
2437 (uri (pypi-uri "certifi" version))
2440 "1klrzl3hgvcf2mjk00g0k3kk1p2z27vzwnxivwar4vhjmjvpz1w1"))))
2441 (build-system python-build-system)
2442 (home-page "https://certifi.io/")
2443 (synopsis "Python CA certificate bundle")
2445 "Certifi is a Python library that contains a CA certificate bundle, which
2446 is used by the Requests library to verify HTTPS requests.")
2447 (license license:asl2.0)))
2449 (define-public python2-certifi
2450 (package-with-python2 python-certifi))
2452 (define-public python-click
2454 (name "python-click")
2459 (uri (pypi-uri "click" version))
2462 "02qkfpykbq35id8glfgwc38yc430427yd05z1wc5cnld8zgicmgi"))))
2463 (build-system python-build-system)
2466 (modify-phases %standard-phases
2467 (add-after 'unpack 'fix-paths
2468 (lambda* (#:key inputs #:allow-other-keys)
2469 (let ((glibc (assoc-ref inputs ,(if (%current-target-system)
2470 "cross-libc" "libc"))))
2471 (substitute* "click/_unicodefun.py"
2473 (string-append "'" glibc "/bin/locale'"))))
2477 (zero? (system* "make" "test")))))))
2479 `(("python-pytest" ,python-pytest)))
2480 (home-page "http://click.pocoo.org")
2481 (synopsis "Command line library for Python")
2483 "Click is a Python package for creating command line interfaces in a
2484 composable way with as little code as necessary. Its name stands for
2485 \"Command Line Interface Creation Kit\". It's highly configurable but comes
2486 with sensible defaults out of the box.")
2487 (license license:bsd-3)))
2489 (define-public python2-click
2490 (package-with-python2 python-click))
2492 (define-public python-wheel
2494 (name "python-wheel")
2495 (version "0.30.0a0")
2499 (uri (pypi-uri "wheel" version))
2502 "1nm6mn8isny0hr86rhbfrpfj867c0phf001xgsd69xfp9ady1wwq"))))
2503 (build-system python-build-system)
2505 `(("python-jsonschema" ,python-jsonschema)
2506 ("python-pytest-cov" ,python-pytest-cov)))
2507 (home-page "https://bitbucket.org/pypa/wheel/")
2508 (synopsis "Format for built Python packages")
2510 "A wheel is a ZIP-format archive with a specially formatted filename and
2511 the @code{.whl} extension. It is designed to contain all the files for a PEP
2512 376 compatible install in a way that is very close to the on-disk format. Many
2513 packages will be properly installed with only the @code{Unpack} step and the
2514 unpacked archive preserves enough information to @code{Spread} (copy data and
2515 scripts to their final locations) at any later time. Wheel files can be
2516 installed with a newer @code{pip} or with wheel's own command line utility.")
2517 (license license:expat)
2518 (properties `((python2-variant . ,(delay python2-wheel))))))
2520 (define-public python2-wheel
2521 (let ((wheel (package-with-python2
2522 (strip-python2-variant python-wheel))))
2523 (package (inherit wheel)
2524 (native-inputs `(("python2-functools32" ,python2-functools32)
2525 ,@(package-native-inputs wheel))))))
2528 (define-public python-requests
2530 (name "python-requests")
2534 (uri (pypi-uri "requests" version))
2537 "1s0wg4any4dsv5l3hqjxqk2zgb7pdbqhy9rhc8kh3aigfq4ws8jp"))))
2538 ;; TODO: unbundle urllib3 and chardet.
2539 (build-system python-build-system)
2541 ;; FIXME: Some tests require network access.
2543 (home-page "http://python-requests.org/")
2544 (synopsis "Python HTTP library")
2546 "Requests is a Python HTTP client library. It aims to be easier to use
2547 than Python’s urllib2 library.")
2548 (license license:asl2.0)))
2550 ;; Some software requires an older version of Requests, notably Docker
2552 (define-public python-requests-2.7
2553 (package (inherit python-requests)
2557 (uri (pypi-uri "requests" version))
2560 "0gdr9dxm24amxpbyqpbh3lbwxc2i42hnqv50sigx568qssv3v2ir"))))))
2562 (define-public python2-requests
2563 (package-with-python2 python-requests))
2565 (define-public python-vcversioner
2567 (name "python-vcversioner")
2568 (version "2.16.0.0")
2572 (uri (pypi-uri "vcversioner" version))
2575 "16z10sm78jd7ca3jbkgc3q5i8a8q7y1h21q1li21yy3rlhbhrrns"))))
2576 (build-system python-build-system)
2577 (synopsis "Python library for version number discovery")
2578 (description "Vcversioner is a Python library that inspects tagging
2579 information in a variety of version control systems in order to discover
2581 (home-page "https://github.com/habnabit/vcversioner")
2582 (license license:isc)))
2584 (define-public python2-vcversioner
2585 (package-with-python2 python-vcversioner))
2587 (define-public python-jsonschema
2589 (name "python-jsonschema")
2595 "https://pypi.python.org/packages/source/j/jsonschema/jsonschema-"
2599 "0hddbqjm4jq63y8jf44nswina1crjs16l9snb6m3vvgyg31klrrn"))))
2600 (build-system python-build-system)
2603 (modify-phases %standard-phases
2604 (replace 'check (lambda _ (zero? (system* "nosetests")))))))
2606 `(("python-nose" ,python-nose)
2607 ("python-vcversioner" ,python-vcversioner)))
2608 (home-page "https://github.com/Julian/jsonschema")
2609 (synopsis "Implementation of JSON Schema for Python")
2611 "Jsonschema is an implementation of JSON Schema for Python.")
2612 (license license:expat)
2613 (properties `((python2-variant . ,(delay python2-jsonschema))))))
2615 (define-public python2-jsonschema
2616 (let ((jsonschema (package-with-python2
2617 (strip-python2-variant python-jsonschema))))
2618 (package (inherit jsonschema)
2620 `(("python2-mock" ,python2-mock)
2621 ,@(package-native-inputs jsonschema)))
2623 `(("python2-functools32" ,python2-functools32))))))
2625 (define-public python-kitchen
2627 (name "python-kitchen")
2632 (uri (pypi-uri "kitchen" version))
2635 "0ggv3p4x8jvmmzhp0xm00h6pvh1g0gmycw71rjwagnrj8n23vxrq"))))
2636 (build-system python-build-system)
2638 `(("python-chardet" ,python-chardet)))
2639 (home-page "https://fedorahosted.org/kitchen")
2640 (synopsis "Python API for snippets")
2641 (description "@code{kitchen} module provides a python API for all sorts of
2642 little useful snippets of code that everybody ends up writing for their projects
2643 but never seem big enough to build an independent release. Use kitchen and stop
2644 cutting and pasting that code over and over.")
2645 (license (list license:lgpl2.1+
2646 ;; subprocess.py, test_subprocess.py,
2647 ;; kitchen/pycompat25/defaultdict.py:
2650 (define-public python2-kitchen
2651 (package-with-python2 python-kitchen))
2653 (define-public python-unidecode
2655 (name "python-unidecode")
2659 (uri (pypi-uri "Unidecode" version))
2662 "1q00i8gpsq3d9r0q8wk4b290fxl0kqlsdk7iadvli45in6s1hi7d"))))
2663 (build-system python-build-system)
2664 (home-page "https://pypi.python.org/pypi/Unidecode")
2665 (synopsis "ASCII transliterations of Unicode text")
2667 "Unidecode provides ASCII transliterations of Unicode text. Unidecode is
2668 useful when integrating with legacy code that doesn't support Unicode, or for
2669 ease of entry of non-Roman names on a US keyboard, or when constructing ASCII
2670 machine identifiers from human-readable Unicode strings that should still be
2671 somewhat intelligeble.")
2672 (license license:gpl2+)))
2674 (define-public python2-unidecode
2675 (package-with-python2 python-unidecode))
2677 (define-public python-pyjwt
2679 (name "python-pyjwt")
2684 (uri (pypi-uri "PyJWT" version))
2687 "1556v2jppd8mjkkj66pxb5rcazm35jq81r233mdl8hfmz9n3icp1"))))
2688 (build-system python-build-system)
2690 `(("python-pytest" ,python-pytest)
2691 ("python-pytest-cov" ,python-pytest-cov)
2692 ("python-pytest-runner" ,python-pytest-runner)))
2693 (home-page "http://github.com/progrium/pyjwt")
2694 (synopsis "JSON Web Token implementation in Python")
2696 "PyJWT is a JSON Web Token implementation written in Python.")
2697 (license license:expat)))
2699 (define-public python2-pyjwt
2700 (package-with-python2 python-pyjwt))
2702 (define-public python-pykka
2704 (name "python-pykka")
2709 (uri (pypi-uri "Pykka" version))
2712 "049w3r0mdnnw7xv19jiq7rvls9k7xs73x05b4qs5d6z4vvmgyiz8"))))
2713 (build-system python-build-system)
2715 `(("python-mock" ,python-mock)
2716 ("python-nose" ,python-nose)
2717 ("python-gevent" ,python-gevent)
2718 ("python-eventlet" ,python-eventlet)))
2719 (home-page "https://www.pykka.org/")
2720 (synopsis "Pykka is a Python implementation of the actor model")
2722 "Pykka is a Python implementation of the actor model.
2723 The actor model introduces some simple rules to control the sharing
2724 of state and cooperation between execution units, which makes it
2725 easier to build concurrent applications.")
2726 (license license:asl2.0)))
2728 (define-public python2-pykka
2729 (package-with-python2 python-pykka))
2731 (define-public python-oauthlib
2733 (name "python-oauthlib")
2737 (uri (pypi-uri "oauthlib" version))
2740 "1bfrj70vdjxjw74khbyh6f0dksv7p5rh2346jnlrffyacd3gwjzg"))))
2741 (build-system python-build-system)
2743 `(("python-nose" ,python-nose)
2744 ("python-mock" ,python-mock)
2745 ("python-cryptography" ,python-cryptography)
2746 ("python-pyjwt" ,python-pyjwt)
2747 ("python-blinker" ,python-blinker)))
2748 (home-page "https://github.com/idan/oauthlib")
2749 (synopsis "OAuth implementation for Python")
2751 "Oauthlib is a generic, spec-compliant, thorough implementation of the
2752 OAuth request-signing logic.")
2753 (license license:bsd-3)
2754 (properties `((python2-variant . ,(delay python2-oauthlib))))))
2756 (define-public python2-oauthlib
2757 (let ((base (package-with-python2 (strip-python2-variant python-oauthlib))))
2760 (native-inputs `(("python2-unittest2" ,python2-unittest2)
2761 ,@(package-native-inputs base))))))
2763 (define-public python-itsdangerous
2765 (name "python-itsdangerous")
2771 "https://pypi.python.org/packages/source/i/itsdangerous/itsdangerous-"
2775 "06856q6x675ly542ig0plbqcyab6ksfzijlyf1hzhgg3sgwgrcyb"))))
2776 (build-system python-build-system)
2777 (home-page "http://github.com/mitsuhiko/itsdangerous")
2778 (synopsis "Python library for passing data to/from untrusted environments")
2780 "Itsdangerous provides various helpers to pass trusted data to untrusted
2781 environments and back.")
2782 (license license:bsd-3)))
2784 (define-public python2-itsdangerous
2785 (package-with-python2 python-itsdangerous))
2787 (define-public python-pyyaml
2789 (name "python-pyyaml")
2794 (uri (pypi-uri "PyYAML" version))
2797 "1aqjl8dk9amd4zr99n8v2qxzgmr2hdvqfma4zh7a41rj6336c9sr"))))
2798 (build-system python-build-system)
2800 `(("libyaml" ,libyaml)))
2801 (home-page "http://pyyaml.org/wiki/PyYAML")
2802 (synopsis "YAML parser and emitter for Python")
2804 "PyYAML is a YAML parser and emitter for Python. PyYAML features a
2805 complete YAML 1.1 parser, Unicode support, pickle support, capable extension
2806 API, and sensible error messages. PyYAML supports standard YAML tags and
2807 provides Python-specific tags that allow to represent an arbitrary Python
2809 (license license:expat)))
2811 (define-public python2-pyyaml
2812 (package-with-python2 python-pyyaml))
2814 (define-public python-virtualenv
2816 (name "python-virtualenv")
2821 (uri (pypi-uri "virtualenv" version))
2824 "07cbajzk8l05k5zhlw0b9wbf2is65bl9v6zrn2a0iyn57w6pd73d"))))
2825 (build-system python-build-system)
2828 (modify-phases %standard-phases
2831 ;; Disable failing test. See upstream bug report
2832 ;; https://github.com/pypa/virtualenv/issues/957
2833 (substitute* "tests/test_virtualenv.py"
2834 (("skipif.*") "skipif(True, reason=\"Guix\")\n"))
2835 (zero? (system* "py.test")))))))
2837 `(("python-mock" ,python-mock)
2838 ("python-pytest" ,python-pytest)))
2839 (home-page "https://virtualenv.pypa.io/")
2840 (synopsis "Virtual Python environment builder")
2842 "Virtualenv is a tool to create isolated Python environments.")
2843 (license license:expat)))
2845 (define-public python2-virtualenv
2846 (package-with-python2 python-virtualenv))
2848 (define-public python-markupsafe
2850 (name "python-markupsafe")
2856 "https://pypi.python.org/packages/source/M/MarkupSafe/MarkupSafe-"
2860 "1hvip33wva3fnmvfp9x5klqri7hpl1hkgqmjbss18nmrb7zimv54"))))
2861 (build-system python-build-system)
2862 (home-page "http://github.com/mitsuhiko/markupsafe")
2863 (synopsis "XML/HTML/XHTML markup safe string implementation for Python")
2865 "Markupsafe provides an XML/HTML/XHTML markup safe string implementation
2867 (license license:bsd-3)))
2869 (define-public python2-markupsafe
2870 (package-with-python2 python-markupsafe))
2872 (define-public python-jinja2
2874 (name "python-jinja2")
2879 (uri (pypi-uri "Jinja2" version))
2882 "1x0v41lp5m1pjix3l46zx02b7lqp2hflgpnxwkywxynvi3zz47xw"))))
2883 (build-system python-build-system)
2885 `(("python-markupsafe" ,python-markupsafe)))
2886 (home-page "http://jinja.pocoo.org/")
2887 (synopsis "Python template engine")
2889 "Jinja2 is a small but fast and easy to use stand-alone template engine
2890 written in pure Python.")
2891 (license license:bsd-3)))
2893 (define-public python2-jinja2
2894 (package-with-python2 python-jinja2))
2896 (define-public python-pystache
2898 (name "python-pystache")
2902 (uri (pypi-uri "pystache" version))
2905 "0nmqsfmiw4arjxqkmf9z66ml950pcdjk6aq4gin4sywmzdjw5fzp"))))
2906 (build-system python-build-system)
2908 '(#:tests? #f)) ; FIXME: Python 3 tests are failing.
2909 (home-page "http://defunkt.io/pystache/")
2910 (synopsis "Python logic-less template engine")
2912 "Pystache is a Python implementation of the framework agnostic,
2913 logic-free templating system Mustache.")
2914 (license license:expat)
2915 (properties `((python2-variant . ,(delay python2-pystache))))))
2917 (define-public python2-pystache
2918 (package (inherit (package-with-python2
2919 (strip-python2-variant python-pystache)))
2921 `(#:python ,python-2
2923 (modify-phases %standard-phases
2926 (zero? (system* "python" "test_pystache.py")))))))))
2928 (define-public python-joblib
2930 (name "python-joblib")
2934 (uri (pypi-uri "joblib" version))
2937 "0787k919zlfmgymprz5bzv0v1df5bbirlf3awrghmjgvkrd9dci9"))
2938 (modules '((guix build utils)))
2941 ;; Remove pre-compiled .pyc files from source.
2942 (for-each delete-file-recursively
2943 (find-files "." "__pycache__" #:directories? #t))
2944 (for-each delete-file (find-files "." "\\.pyc$"))
2946 (build-system python-build-system)
2949 (modify-phases %standard-phases
2950 (add-before 'check 'disable-failing-tests
2952 ;; This numpydoc tests fails for unknown reasons
2953 (delete-file "doc/sphinxext/numpydoc/tests/test_docscrape.py")
2954 ;; This numpydoc test depends on matplotlib, which is not a
2956 (delete-file "doc/sphinxext/numpydoc/tests/test_plot_directive.py")
2957 ;; These tests fail to execute sys.executable
2958 (substitute* "joblib/test/test_parallel.py"
2959 (("import nose" line)
2960 (string-append "from nose.plugins.skip import SkipTest\n" line))
2961 (("def test_nested_parallel_warnings" line)
2962 (string-append "@SkipTest\n" line))
2963 (("def test_parallel_with_interactively_defined_functions" line)
2964 (string-append "@SkipTest\n" line)))
2966 ;; Provide nose to enable tests command
2968 `(("python-nose" ,python-nose)
2969 ("python-sphinx" ,python-sphinx)
2970 ("python-docutils" ,python-docutils)
2971 ("python-numpydoc" ,python-numpydoc)))
2972 (home-page "http://pythonhosted.org/joblib/")
2973 (synopsis "Using Python functions as pipeline jobs")
2975 "Joblib is a set of tools to provide lightweight pipelining in Python.
2976 In particular, joblib offers: transparent disk-caching of the output values
2977 and lazy re-evaluation (memoize pattern), easy simple parallel computing
2978 logging and tracing of the execution.")
2979 (license license:bsd-3)))
2981 (define-public python2-joblib
2982 (package-with-python2 python-joblib))
2984 (define-public python-docutils
2986 (name "python-docutils")
2991 (uri (pypi-uri "docutils" version))
2994 "1gkma47i609jfs7dssxn4y9vsz06qi0l5q41nws0zgkpnrghz33i"))))
2995 (build-system python-build-system)
2997 '(#:tests? #f)) ; no setup.py test command
2998 (home-page "http://docutils.sourceforge.net/")
2999 (synopsis "Python Documentation Utilities")
3001 "Docutils is a modular system for processing documentation into useful
3002 formats, such as HTML, XML, and LaTeX. For input Docutils supports
3004 ;; Most of the source code is public domain, but some source files are
3005 ;; licensed under the PFSL, BSD 2-clause, and GPLv3+ licenses.
3006 (license (list license:public-domain license:psfl license:bsd-2 license:gpl3+))))
3008 (define-public python2-docutils
3009 (package-with-python2 python-docutils))
3011 (define-public python-pygments
3013 (name "python-pygments")
3018 (uri (pypi-uri "Pygments" version))
3021 "10axnp2wpjnq9g8wg53fx0c70dfxqrz498jyz8mrdx9a3flwir48"))))
3022 (build-system python-build-system)
3024 ;; FIXME: Tests require sphinx, which depends on this.
3026 (home-page "http://pygments.org/")
3027 (synopsis "Syntax highlighting")
3029 "Pygments is a syntax highlighting package written in Python.")
3030 (license license:bsd-2)))
3032 (define-public python2-pygments
3033 (package-with-python2 python-pygments))
3035 (define-public python-sphinx
3037 (name "python-sphinx")
3042 (uri (pypi-uri "Sphinx" version))
3045 "1i8p9idnli4gr0y4x67yakbdk5w6a0xjzhrg6bg51y9d1fi7fslf"))))
3046 (build-system python-build-system)
3049 (modify-phases %standard-phases
3052 ;; Requires Internet access.
3053 (delete-file "tests/test_build_linkcheck.py")
3054 (zero? (system* "make" "test")))))))
3056 `(("python-imagesize" ,python-imagesize)
3057 ("python-sphinx-alabaster-theme"
3058 ,python-sphinx-alabaster-theme)
3059 ("python-babel" ,python-babel)
3060 ("python-snowballstemmer" ,python-snowballstemmer)
3061 ("python-docutils" ,python-docutils)
3062 ("python-jinja2" ,python-jinja2)
3063 ("python-pygments" ,python-pygments)
3064 ("python-requests" ,python-requests)
3065 ("python-six" ,python-six)))
3067 `(("graphviz" ,graphviz)
3068 ("python-html5lib" ,python-html5lib)
3069 ("python-mock" ,python-mock)
3070 ("python-nose" ,python-nose)))
3071 (home-page "http://sphinx-doc.org/")
3072 (synopsis "Python documentation generator")
3073 (description "Sphinx is a tool that makes it easy to create documentation
3074 for Python projects or other documents consisting of multiple reStructuredText
3076 (license license:bsd-3)
3077 (properties `((python2-variant . ,(delay python2-sphinx))))))
3079 (define-public python2-sphinx
3080 (let ((base (package-with-python2 (strip-python2-variant python-sphinx))))
3083 (native-inputs `(("python2-mock" ,python2-mock)
3084 ("python2-enum34" ,python2-enum34)
3085 ,@(package-native-inputs base)))
3086 (propagated-inputs `(("python2-pytz" ,python2-pytz)
3087 ,@(package-propagated-inputs base))))))
3089 (define-public python-sphinx-rtd-theme
3091 (name "python-sphinx-rtd-theme")
3096 (uri (string-append "https://pypi.python.org/packages/source/s/"
3097 "sphinx_rtd_theme/sphinx_rtd_theme-"
3101 "19nw3rn7awplcdrz63kg1njqwkbymfg9lwn7l2grhdyhyr2gaa8g"))))
3102 (build-system python-build-system)
3103 (arguments '(#:tests? #f)) ; No tests.
3105 `(("python-sphinx" ,python-sphinx)))
3106 (home-page "https://github.com/snide/sphinx_rtd_theme/")
3107 (synopsis "ReadTheDocs.org theme for Sphinx")
3108 (description "A theme for Sphinx used by ReadTheDocs.org.")
3109 (license license:expat)))
3111 (define-public python2-sphinx-rtd-theme
3112 (package-with-python2 python-sphinx-rtd-theme))
3114 (define-public python-rst.linker
3116 (name "python-rst.linker")
3121 (uri (pypi-uri "rst.linker" version))
3124 "0bh4lnj2p1nh0wf5pgxgfbrp27xhb1rinahkb5j7s3qprq6qn0sr"))))
3125 (build-system python-build-system)
3127 `(("python-dateutil" ,python-dateutil)
3128 ("python-six" ,python-six)))
3130 `(("python-setuptools-scm" ,python-setuptools-scm)))
3131 ;; Test would require path.py, which would introduce a cyclic dependence.
3132 (arguments `(#:tests? #f))
3133 ;; Note: As of version 1.7 the documentation is not worth building.
3134 (home-page "https://github.com/jaraco/rst.linker")
3135 (synopsis "Sphinx plugin to add links and timestamps")
3136 (description "rst.linker allows to automatically replace text by a
3137 reStructuredText external reference or timestamps. It's primary purpose is to
3138 augment the changelog, but it can be used for other documents, too.")
3139 (license license:expat)))
3141 (define-public python2-rst.linker
3142 (package-with-python2 python-rst.linker))
3144 (define-public python-feedgenerator
3146 (name "python-feedgenerator")
3151 (uri (pypi-uri "feedgenerator" version))
3154 "01mirwkm7xfx539hmvj7g9da1j51gw5lsx74dr0glizskjm5vq2s"))
3155 (modules '((guix build utils)))
3158 ;; Remove pre-compiled .pyc files from source.
3159 (for-each delete-file-recursively
3160 (find-files "." "__pycache__" #:directories? #t))
3161 (for-each delete-file (find-files "." "\\.pyc$"))
3163 (build-system python-build-system)
3165 `(("python-pytz" ,python-pytz)
3166 ("python-six" ,python-six)))
3167 (home-page "https://github.com/getpelican/feedgenerator")
3169 "Standalone version of Django's Atom/RSS feed generator")
3171 "Feedgenerator-py3k is a standalone version of Django's feedgenerator,
3172 which can produce feeds in RSS 2.0, RSS 0.91, and Atom formats.")
3173 (license license:bsd-3)))
3175 (define-public python2-feedgenerator
3176 (package-with-python2 python-feedgenerator))
3178 (define-public python-blinker
3180 (name "python-blinker")
3185 (uri (pypi-uri "blinker" version))
3188 "1dpq0vb01p36jjwbhhd08ylvrnyvcc82yxx3mwjx6awrycjyw6j7"))))
3189 (build-system python-build-system)
3190 (home-page "http://pythonhosted.org/blinker/")
3191 (synopsis "Fast, simple object-to-object and broadcast signaling")
3193 "Blinker provides a fast dispatching system that allows any number of
3194 interested parties to subscribe to events, or \"signals\".")
3195 (license license:expat)))
3197 (define-public python2-blinker
3198 (package-with-python2 python-blinker))
3200 (define-public pelican
3207 (uri (pypi-uri "pelican" version))
3210 "1hn94rb4q3zmcq16in055xikal4dba5hfx3zznq7warllcgc9f8k"))))
3211 (build-system python-build-system)
3213 `(("python-feedgenerator" ,python-feedgenerator)
3214 ("python-jinja2" ,python-jinja2)
3215 ("python-pygments" ,python-pygments)
3216 ("python-docutils" ,python-docutils)
3217 ("python-pytz" ,python-pytz)
3218 ("python-blinker" ,python-blinker)
3219 ("python-unidecode" ,python-unidecode)
3220 ("python-six" ,python-six)
3221 ("python-dateutil" ,python-dateutil)))
3222 (home-page "http://getpelican.com/")
3224 `(;; XXX Requires a lot more packages to do unit tests :P
3226 #:phases (modify-phases %standard-phases
3228 'install 'adjust-requires
3229 ;; Since feedgenerator is installed from git, it doesn't
3230 ;; conform to the version requirements.
3232 ;; We *do have* "feedgenerator >= 1.6", but strip off the
3233 ;; version requirement so setuptools doesn't get confused.
3235 (substitute* "setup.py"
3236 (("['\"]feedgenerator.*?['\"]")
3237 "'feedgenerator'")))))))
3238 (synopsis "Python-based static site publishing system")
3240 "Pelican is a tool to generate a static blog from reStructuredText,
3241 Markdown input files, and more. Pelican uses Jinja2 for templating
3242 and is very extensible.")
3243 (license license:agpl3+)))
3245 (define-public python-scikit-learn
3247 (name "python-scikit-learn")
3253 "https://github.com/scikit-learn/scikit-learn/archive/"
3255 (file-name (string-append name "-" version ".tar.gz"))
3258 "1hwswckdmd27f7k1jvwdc0m4mqrgxl2s245yq1scq34v124bjqgq"))))
3259 (build-system python-build-system)
3262 (modify-phases %standard-phases
3264 (add-after 'install 'check
3265 ;; Running tests from the source directory requires
3266 ;; an "inplace" build with paths relative to CWD.
3267 ;; http://scikit-learn.org/stable/developers/advanced_installation.html#testing
3268 ;; Use the installed version instead.
3269 (lambda* (#:key inputs outputs #:allow-other-keys)
3270 (add-installed-pythonpath inputs outputs)
3271 ;; some tests require access to "$HOME"
3272 (setenv "HOME" "/tmp")
3273 ;; Step out of the source directory just to be sure.
3275 (zero? (system* "nosetests" "-v" "sklearn")))))))
3277 `(("openblas" ,openblas)))
3279 `(("python-nose" ,python-nose)
3280 ("python-cython" ,python-cython)))
3282 `(("python-numpy" ,python-numpy)
3283 ("python-scipy" ,python-scipy)))
3284 (home-page "http://scikit-learn.org/")
3285 (synopsis "Machine Learning in Python")
3287 "Scikit-learn provides simple and efficient tools for data
3288 mining and data analysis.")
3289 (license license:bsd-3)))
3291 (define-public python2-scikit-learn
3292 (package-with-python2 python-scikit-learn))
3294 (define-public python-scikit-image
3296 (name "python-scikit-image")
3302 "https://pypi.python.org/packages/source/s/scikit-image/scikit-image-"
3305 (base32 "0jz416fqvpahqyffw8plmszzfj669w8wvf3y9clnr5lr6a7md3kn"))))
3306 (build-system python-build-system)
3308 ;; TODO: Some tests require running X11 server. Disable them?
3310 ;; See DEPENDS.txt for the list of build and run time requiremnts
3312 `(("python-matplotlib" ,python-matplotlib)
3313 ("python-networkx" ,python-networkx)
3314 ("python-scipy" ,python-scipy)
3315 ("python-pillow" ,python-pillow)))
3317 `(("python-numpy" ,python-numpy)
3318 ("python-cython" ,python-cython)
3319 ("python-six" ,python-six)))
3320 (home-page "http://scikit-image.org/")
3321 (synopsis "Image processing in Python")
3323 "Scikit-image is a collection of algorithms for image processing.")
3324 (license license:bsd-3)))
3326 (define-public python2-scikit-image
3327 (package-with-python2 python-scikit-image))
3329 (define-public python-redis
3331 (name "python-redis")
3336 (uri (pypi-uri "redis" version))
3338 (base32 "0csmrkxb29x7xs9b51zplwkkq2hwnbh9jns1g85dykn5rxmaxysx"))))
3339 (build-system python-build-system)
3340 ;; Tests require a running Redis server
3341 (arguments '(#:tests? #f))
3342 ;; As long as we are not running test, we do not need this input :-)
3344 ;; `(("python-pytest" ,python-pytest)))
3345 (home-page "https://github.com/andymccurdy/redis-py")
3346 (synopsis "Redis Python client")
3348 "This package provides a Python interface to the Redis key-value store.")
3349 (license license:expat)))
3351 (define-public python2-redis
3352 (package-with-python2 python-redis))
3354 (define-public python-rq
3362 "https://pypi.python.org/packages/source/r/rq/rq-"
3365 (base32 "0b0z5hn8wkfg300hx7816csgv3bcfamlr29fi3yzgqmpqxwj3fix"))))
3366 (build-system python-build-system)
3368 `(("python-click" ,python-click)
3369 ("python-redis" ,python-redis)))
3370 (home-page "http://python-rq.org/")
3371 (synopsis "Simple job queues for Python")
3373 "RQ (Redis Queue) is a simple Python library for queueing jobs and
3374 processing them in the background with workers. It is backed by Redis and it
3375 is designed to have a low barrier to entry.")
3376 (license license:bsd-2)))
3378 (define-public python2-rq
3379 (package-with-python2 python-rq))
3381 (define-public python-cython
3383 (name "python-cython")
3388 (uri (pypi-uri "Cython" version))
3391 "1fg7fmpvfcq9md4ncyqnnylyjy4z3ksdrshzis95g1sh03d8z044"))))
3392 (build-system python-build-system)
3393 ;; we need the full python package and not just the python-wrapper
3394 ;; because we need libpython3.3m.so
3396 `(("python" ,python)))
3399 (modify-phases %standard-phases
3400 (add-before 'check 'set-HOME
3401 ;; some tests require access to "$HOME/.cython"
3402 (lambda _ (setenv "HOME" "/tmp")))
3404 (lambda _ (zero? (system* "python" "runtests.py" "-vv")))))))
3405 (home-page "http://cython.org/")
3406 (synopsis "C extensions for Python")
3407 (description "Cython is an optimising static compiler for both the Python
3408 programming language and the extended Cython programming language. It makes
3409 writing C extensions for Python as easy as Python itself.")
3410 (license license:asl2.0)
3411 (properties `((python2-variant . ,(delay python2-cython))))))
3413 (define-public python2-cython
3414 (package (inherit (package-with-python2
3415 (strip-python2-variant python-cython)))
3416 (name "python2-cython")
3418 `(("python-2" ,python-2))))) ; this is not automatically changed
3420 ;; The RPython toolchain currently does not support Python 3.
3421 (define-public python2-rpython
3423 (name "python2-rpython")
3428 (uri (pypi-uri "rpython" version))
3431 "07pps06fq4c4wmi5ii0sgh9zgwniz5y7frqhm28g3a154l163fxc"))))
3432 (build-system python-build-system)
3433 (arguments `(#:python ,python-2))
3435 `(("python2-pytest" ,python2-pytest))) ; needed for running tests
3436 (home-page "https://rpython.readthedocs.org")
3437 (synopsis "Framework for implementing interpreters and virtual machines")
3438 (description "RPython is a translation and support framework for
3439 producing implementations of dynamic languages, emphasizing a clean separation
3440 between language specification and implementation aspects.")
3441 (license license:expat)))
3443 (define-public python-numpy
3445 (name "python-numpy")
3451 "https://github.com/numpy/numpy/archive/v" version ".tar.gz"))
3452 (file-name (string-append name "-" version ".tar.gz"))
3455 "025d4j4aakcp8w5i5diqh812cbbjgac7jszx1j56ivrbi1i8vv7d"))))
3456 (build-system python-build-system)
3458 `(("openblas" ,openblas)
3459 ("lapack" ,lapack)))
3461 `(("python-cython" ,python-cython)
3462 ("python-nose" ,python-nose)
3463 ("gfortran" ,gfortran)))
3466 (modify-phases %standard-phases
3467 (add-before 'build 'set-environment-variables
3468 (lambda* (#:key inputs #:allow-other-keys)
3469 (call-with-output-file "site.cfg"
3473 libraries = openblas
3474 library_dirs = ~a/lib
3475 include_dirs = ~a/include
3477 # backslash-n to make emacs happy
3479 lapack_libs = lapack
3480 library_dirs = ~a/lib
3481 include_dirs = ~a/include
3483 (assoc-ref inputs "openblas")
3484 (assoc-ref inputs "openblas")
3485 (assoc-ref inputs "lapack")
3486 (assoc-ref inputs "lapack"))))
3487 ;; Use "gcc" executable, not "cc".
3488 (substitute* "numpy/distutils/system_info.py"
3489 (("c = distutils\\.ccompiler\\.new_compiler\\(\\)")
3490 "c = distutils.ccompiler.new_compiler(); c.set_executables(compiler='gcc',compiler_so='gcc',linker_exe='gcc',linker_so='gcc -shared')"))
3492 ;; Tests can only be run after the library has been installed and not
3493 ;; within the source directory.
3495 (add-after 'install 'check
3496 (lambda* (#:key outputs inputs #:allow-other-keys)
3497 ;; Make installed package available for running the tests
3498 (add-installed-pythonpath inputs outputs)
3499 (with-directory-excursion "/tmp"
3500 (zero? (system* "python" "-c"
3501 "import numpy; numpy.test(verbose=2)"))))))))
3502 (home-page "http://www.numpy.org/")
3503 (synopsis "Fundamental package for scientific computing with Python")
3504 (description "NumPy is the fundamental package for scientific computing
3505 with Python. It contains among other things: a powerful N-dimensional array
3506 object, sophisticated (broadcasting) functions, tools for integrating C/C++
3507 and Fortran code, useful linear algebra, Fourier transform, and random number
3509 (license license:bsd-3)))
3511 (define-public python2-numpy
3512 (package-with-python2 python-numpy))
3514 (define-public python-munch
3516 (name "python-munch")
3521 (uri (pypi-uri "munch" version))
3524 "1cmqg91xnqx8gvnh4pmp0bfl1dfcm65d5p9mg73zz8pkjhx6h80l"))))
3525 (build-system python-build-system)
3526 (home-page "https://github.com/Infinidat/munch")
3527 (synopsis "Dot-accessible dictionary")
3528 (description "Munch is a dot-accessible dictionary similar to JavaScript
3530 (license license:expat)))
3532 (define-public python2-munch
3533 (package-with-python2 python-munch))
3535 (define-public python2-fastlmm
3537 (name "python2-fastlmm")
3542 (uri (pypi-uri "fastlmm" version ".zip"))
3545 "1q8c34rpmwkfy3r4d5172pzdkpfryj561897z9r3x22gq7813x1m"))))
3546 (build-system python-build-system)
3548 `(#:python ,python-2)) ; only Python 2.7 is supported
3550 `(("python2-numpy" ,python2-numpy)
3551 ("python2-scipy" ,python2-scipy)
3552 ("python2-matplotlib" ,python2-matplotlib)
3553 ("python2-pandas" ,python2-pandas)
3554 ("python2-scikit-learn" ,python2-scikit-learn)
3555 ("python2-pysnptools" ,python2-pysnptools)))
3558 ("python2-cython" ,python2-cython)
3559 ("python2-mock" ,python2-mock)
3560 ("python2-nose" ,python2-nose)))
3561 (home-page "http://research.microsoft.com/en-us/um/redmond/projects/mscompbio/fastlmm/")
3562 (synopsis "Perform genome-wide association studies on large data sets")
3564 "FaST-LMM, which stands for Factored Spectrally Transformed Linear Mixed
3565 Models, is a program for performing both single-SNP and SNP-set genome-wide
3566 association studies (GWAS) on extremely large data sets.")
3567 (license license:asl2.0)))
3569 (define-public python-numpy-documentation
3571 (name "python-numpy-documentation")
3572 (version (package-version python-numpy))
3573 (source (package-source python-numpy))
3574 (build-system python-build-system)
3576 `(("python-matplotlib" ,python-matplotlib)
3577 ("python-numpy" ,python-numpy)
3578 ("pkg-config" ,pkg-config)
3579 ("python-sphinx" ,python-sphinx)
3580 ("python-numpydoc" ,python-numpydoc)
3581 ("texlive" ,texlive)
3582 ("texinfo" ,texinfo)
3584 ("scipy-sphinx-theme"
3585 ,(origin ; The build script expects scipy-sphinx-theme as a git submodule
3588 (url "https://github.com/scipy/scipy-sphinx-theme.git")
3589 (commit "c466764e2231ba132c09826b5b138fffa1cfcec3")))
3592 "0q2y87clwlsgc7wvlsn9pzyssybcq10plwhq2w1ydykfsyyqbmkl"))))
3593 ,@(package-native-inputs python-numpy)))
3595 `(#:tests? #f ; we're only generating the documentation
3597 (modify-phases %standard-phases
3600 (lambda* (#:key inputs outputs #:allow-other-keys)
3601 (let* ((data (string-append (assoc-ref outputs "out") "/share"))
3603 data "/doc/" ,name "-"
3604 ,(package-version python-numpy)))
3605 (info-reader (string-append data "/info"))
3606 (html (string-append doc "/html"))
3607 (scipy-sphinx-theme "scipy-sphinx-theme")
3608 (sphinx-theme-checkout (assoc-ref inputs scipy-sphinx-theme))
3609 (pyver ,(string-append "PYVER=")))
3610 (with-directory-excursion "doc"
3611 (copy-recursively sphinx-theme-checkout scipy-sphinx-theme)
3613 (system* "make" "html" pyver)
3614 (system* "make" "latex" "PAPER=a4" pyver)
3615 (system* "make" "-C" "build/latex"
3616 "all-pdf" "PAPER=a4" pyver)
3617 ;; FIXME: Generation of the info file fails.
3618 ;; (system* "make" "info" pyver)
3620 ;; (copy-file "build/texinfo/numpy.info"
3621 ;; (string-append info "/numpy.info"))
3622 (for-each (lambda (file)
3623 (copy-file (string-append "build/latex" file)
3624 (string-append doc file)))
3625 '("/numpy-ref.pdf" "/numpy-user.pdf"))
3626 (with-directory-excursion "build/html"
3627 (for-each (lambda (file)
3628 (let* ((dir (dirname file))
3629 (tgt-dir (string-append html "/" dir)))
3630 (unless (equal? "." dir)
3632 (install-file file html)))
3633 (find-files "." ".*")))))
3635 (home-page (package-home-page python-numpy))
3636 (synopsis "Documentation for the python-numpy package")
3637 (description (package-description python-numpy))
3638 (license (package-license python-numpy))))
3640 (define-public python2-numpy-documentation
3641 (let ((numpy-documentation (package-with-python2 python-numpy-documentation)))
3643 (inherit numpy-documentation)
3644 (native-inputs `(("python2-functools32" ,python2-functools32)
3645 ,@(package-native-inputs numpy-documentation))))))
3647 (define-public python-pygit2
3649 (name "python-pygit2")
3654 (uri (pypi-uri "pygit2" version))
3657 "0wf5rp0fvrw7j3j18dvwjq6xqlbm611wd55aphrfpps0v1gxh3ny"))
3659 (search-patches "python-pygit2-disable-network-tests.patch"))))
3660 (build-system python-build-system)
3662 `(("python-six" ,python-six)
3663 ("python-cffi" ,python-cffi)
3664 ("libgit2" ,libgit2)
3665 ("python-tox" ,python-tox)))
3666 (home-page "https://github.com/libgit2/pygit2")
3667 (synopsis "Python bindings for libgit2")
3668 (description "Pygit2 is a set of Python bindings to the libgit2 shared
3669 library, libgit2 implements Git plumbing.")
3670 ;; GPL2.0 only, with linking exception.
3671 (license license:gpl2)))
3673 (define-public python2-pygit2
3674 (package-with-python2 python-pygit2))
3676 (define-public python-pyparsing
3678 (name "python-pyparsing")
3683 (uri (string-append "mirror://sourceforge/pyparsing/pyparsing"
3684 "/pyparsing-" version
3685 "/pyparsing-" version ".tar.gz"))
3688 "0kw4py7gn45j93q8r7bzajfrjdc3xlsn2yzln41lf9zmrghjkrq6"))))
3689 (build-system python-build-system)
3690 (outputs '("out" "doc"))
3692 `(#:tests? #f ; no test target
3693 #:modules ((guix build python-build-system)
3697 'install 'install-doc
3698 (lambda* (#:key outputs #:allow-other-keys)
3699 (let* ((doc (string-append (assoc-ref outputs "doc")
3700 "/share/doc/" ,name "-" ,version))
3701 (html-doc (string-append doc "/html"))
3702 (examples (string-append doc "/examples")))
3708 (install-file file tgt))
3709 (find-files dir ".*")))
3710 (list "docs" "htmldoc" "examples")
3711 (list doc html-doc examples))))
3713 (home-page "http://pyparsing.wikispaces.com")
3714 (synopsis "Python parsing class library")
3716 "The pyparsing module is an alternative approach to creating and
3717 executing simple grammars, vs. the traditional lex/yacc approach, or the use
3718 of regular expressions. The pyparsing module provides a library of classes
3719 that client code uses to construct the grammar directly in Python code.")
3720 (license license:expat)))
3722 (define-public python2-pyparsing
3723 (package-with-python2 python-pyparsing))
3725 (define-public python-numpydoc
3727 (name "python-numpydoc")
3733 "https://pypi.python.org/packages/source/n/numpydoc/numpydoc-"
3737 "0d4dnifaxkll50jx6czj05y8cb4ny60njd2wz299sj2jxfy51w4k"))
3738 (modules '((guix build utils)))
3741 ;; Drop a test requiring matplotlib, which we cannot add as an
3742 ;; input since it would create a circular dependency: Extend the
3743 ;; test for Python 3, where it is already dropped, to Python 2.
3744 (substitute* "numpydoc/tests/test_plot_directive.py"
3746 (build-system python-build-system)
3748 `(("python-sphinx" ,python-sphinx)))
3750 `(("python-nose" ,python-nose)))
3751 (home-page "https://pypi.python.org/pypi/numpydoc")
3753 "Numpy's Sphinx extensions")
3755 "Sphinx extension to support docstrings in Numpy format.")
3756 (license license:bsd-2)))
3758 (define-public python2-numpydoc
3759 (package-with-python2 python-numpydoc))
3761 (define-public python-numexpr
3763 (name "python-numexpr")
3768 (uri (pypi-uri "numexpr" version))
3771 "01lsja72m32z0i5p8rwxbfyzk4mplh72k2a140nwh8vv4wpyfbnv"))))
3772 (build-system python-build-system)
3773 (arguments `(#:tests? #f)) ; no tests included
3775 `(("python-numpy" ,python-numpy)))
3776 (home-page "https://github.com/pydata/numexpr")
3777 (synopsis "Fast numerical expression evaluator for NumPy")
3779 "Numexpr is a fast numerical expression evaluator for NumPy. With it,
3780 expressions that operate on arrays are accelerated and use less memory than
3781 doing the same calculation in Python. In addition, its multi-threaded
3782 capabilities can make use of all your cores, which may accelerate
3783 computations, most specially if they are not memory-bounded (e.g. those using
3784 transcendental functions).")
3785 (license license:expat)))
3787 (define-public python2-numexpr
3788 (package-with-python2 python-numexpr))
3790 (define-public python-cycler
3792 (name "python-cycler")
3796 (uri (pypi-uri "cycler" version))
3799 "1n69n23fak1gjxlrbhqisi2b9pv3ckrfj98llx3p53953082syyd"))))
3800 (build-system python-build-system)
3802 ;; XXX: The current version requires 'coveralls' which we don't have.
3803 ;; Enable this for the next release which uses 'python-pytest'.
3806 `(("python-six" ,python-six)))
3807 (home-page "http://matplotlib.org/cycler/")
3808 (synopsis "Composable keyword argument iterator")
3810 "When using @code{matplotlib} and plotting more than one line, it is
3811 common to want to be able to want to be able to cycle over one or more artist
3812 styles; but the plotting logic can quickly become involved.
3813 To address this and enable easy cycling over arbitrary @code{kwargs}, the
3814 @code{Cycler} class was developed.")
3815 (license license:bsd-3)))
3817 (define-public python2-cycler
3818 (package-with-python2 python-cycler))
3820 (define-public python-colorspacious
3822 (name "python-colorspacious")
3827 (uri (string-append "https://github.com/njsmith/colorspacious/archive/v"
3829 (file-name (string-append name "-" version))
3831 (base32 "1vflh5jm32qb0skza2i8pjacv09w6gq84fqpp2nj77s0rbmzgr4k"))))
3832 (build-system python-build-system)
3834 `(("python-numpy" ,python-numpy)))
3836 `(("python-nose" ,python-nose)))
3839 (modify-phases %standard-phases
3842 (zero? (system* "nosetests" "--all-modules" "-v" "colorspacious")))))))
3843 (home-page "https://github.com/njsmith/colorspacious")
3844 (synopsis "Python library for colorspace conversions")
3845 (description "@code{colorspacious} is a Python library that lets you
3846 convert between colorspaces like sRGB, XYZ, CIEL*a*b*, CIECAM02, CAM02-UCS, etc.")
3847 (license license:expat)))
3849 (define-public python2-colorspacious
3850 (package-with-python2 python-colorspacious))
3852 (define-public python-matplotlib
3854 (name "python-matplotlib")
3860 "https://github.com/matplotlib/matplotlib/archive/v" version ".tar.gz"))
3861 (file-name (string-append name "-" version ".tar.gz"))
3864 "0w3k5m5qb3wsd7yhvmg042xddvligklvcq2visk2c5wnph3hhsln"))))
3865 (build-system python-build-system)
3866 (propagated-inputs ; the following packages are all needed at run time
3867 `(("python-cycler" ,python-cycler)
3868 ("python-pyparsing" ,python-pyparsing)
3869 ("python-pygobject" ,python-pygobject)
3870 ("gobject-introspection" ,gobject-introspection)
3871 ("python-tkinter" ,python "tk")
3872 ("python-dateutil" ,python-dateutil)
3873 ("python-numpy" ,python-numpy)
3874 ("python-pillow" ,python-pillow)
3875 ("python-pytz" ,python-pytz)
3876 ("python-six" ,python-six)
3877 ;; The 'gtk+' package (and 'gdk-pixbuf', 'atk' and 'pango' propagated
3878 ;; from 'gtk+') provides the required 'typelib' files used by
3879 ;; 'gobject-introspection'. The location of these files is set with the
3880 ;; help of the environment variable GI_TYPELIB_PATH. At build time this
3881 ;; is done automatically by a 'native-search-path' procedure. However,
3882 ;; at run-time the user must set this variable as follows:
3884 ;; export GI_TYPELIB_PATH=~/.guix-profile/lib/girepository-1.0
3886 ;; From version 1.4.0 'matplotlib' makes use of 'cairocffi' instead of
3887 ;; 'pycairo'. However, 'pygobject' makes use of a 'pycairo' 'context'
3888 ;; object. For this reason we need to import both libraries.
3889 ;; https://pythonhosted.org/cairocffi/cffi_api.html#converting-pycairo
3890 ("python-pycairo" ,python-pycairo)
3891 ("python-cairocffi" ,python-cairocffi)))
3893 `(("libpng" ,libpng)
3894 ("imagemagick" ,imagemagick)
3895 ("freetype" ,freetype)
3898 ;; FIXME: Add backends when available.
3899 ;("python-wxpython" ,python-wxpython)
3900 ("python-pyqt" ,python-pyqt)
3904 `(("pkg-config" ,pkg-config)
3905 ("python-nose" ,python-nose)
3906 ("python-mock" ,python-mock)))
3909 (modify-phases %standard-phases
3910 (add-before 'build 'configure-environment
3911 (lambda* (#:key outputs inputs #:allow-other-keys)
3912 (let ((cairo (assoc-ref inputs "cairo"))
3913 (gtk+ (assoc-ref inputs "gtk+")))
3914 ;; Setting these directories in the 'basedirlist' of 'setup.cfg'
3916 (setenv "LD_LIBRARY_PATH"
3917 (string-append cairo "/lib:" gtk+ "/lib"))
3918 (setenv "HOME" (getcwd))
3919 (call-with-output-file "setup.cfg"
3921 (format port "[directories]~%
3922 basedirlist = ~a,~a~%
3925 (assoc-ref inputs "tcl")
3926 (assoc-ref inputs "tk")))))
3928 (home-page "http://matplotlib.org")
3929 (synopsis "2D plotting library for Python")
3931 "Matplotlib is a Python 2D plotting library which produces publication
3932 quality figures in a variety of hardcopy formats and interactive environments
3933 across platforms. Matplotlib can be used in Python scripts, the python and
3934 ipython shell, web application servers, and six graphical user interface
3936 (license license:psfl)
3937 (properties `((python2-variant . ,(delay python2-matplotlib))))))
3939 (define-public python2-matplotlib
3940 (let ((matplotlib (package-with-python2
3941 (strip-python2-variant python-matplotlib))))
3942 (package (inherit matplotlib)
3943 ;; Make sure to use special packages for Python 2 instead
3944 ;; of those automatically rewritten by package-with-python2.
3946 `(("python2-pycairo" ,python2-pycairo)
3947 ("python2-functools32" ,python2-functools32)
3948 ("python2-pygobject-2" ,python2-pygobject-2)
3949 ("python2-subprocess32" ,python2-subprocess32)
3950 ("python2-tkinter" ,python-2 "tk")
3951 ,@(fold alist-delete (package-propagated-inputs matplotlib)
3952 '("python-pycairo" "python-pygobject" "python-tkinter")))))))
3954 (define-public python-matplotlib-documentation
3956 (name "python-matplotlib-documentation")
3957 (version (package-version python-matplotlib))
3958 (source (package-source python-matplotlib))
3959 (build-system python-build-system)
3961 `(("python-matplotlib" ,python-matplotlib)
3962 ("python-colorspacious" ,python-colorspacious)
3963 ("python-sphinx" ,python-sphinx)
3964 ("python-numpydoc" ,python-numpydoc)
3965 ("python-ipython" ,python-ipython)
3966 ("python-mock" ,python-mock)
3967 ("graphviz" ,graphviz)
3968 ("texlive" ,texlive)
3969 ("texinfo" ,texinfo)
3970 ,@(package-native-inputs python-matplotlib)))
3972 `(#:tests? #f ; we're only generating documentation
3974 (modify-phases %standard-phases
3978 ;; Produce pdf in 'A4' format.
3979 (substitute* "conf.py"
3980 (("latex_paper_size = 'letter'") "")
3981 ;; latex_paper_size is deprecated -> set paper size using
3983 (("latex_elements\\['pointsize'\\] = '11pt'" match)
3984 ;; insert at a point where latex_elements{} is defined:
3985 (string-append match "\nlatex_elements['papersize'] = 'a4paper'")))
3986 (zero? (system* "python" "make.py" "html" "latex" "texinfo"))))
3988 (lambda* (#:key inputs outputs #:allow-other-keys)
3989 (let* ((data (string-append (assoc-ref outputs "out") "/share"))
3990 (doc (string-append data "/doc/python-matplotlib-" ,version))
3991 (info (string-append data "/info"))
3992 (html (string-append doc "/html")))
3995 (copy-recursively "build/html" html)
3996 (symlink (string-append html "/_images")
3997 (string-append info "/matplotlib-figures"))
3998 (with-directory-excursion "build/texinfo"
3999 (substitute* "matplotlib.texi"
4000 (("@image\\{([^,]*)" all file)
4001 (string-append "@image{matplotlib-figures/" file)))
4002 (symlink (string-append html "/_images")
4003 "./matplotlib-figures")
4004 (system* "makeinfo" "--no-split"
4005 "-o" "matplotlib.info" "matplotlib.texi"))
4006 (copy-file "build/texinfo/matplotlib.info"
4007 (string-append info "/matplotlib.info"))
4008 (copy-file "build/latex/Matplotlib.pdf"
4009 (string-append doc "/Matplotlib.pdf")))
4011 (home-page (package-home-page python-matplotlib))
4012 (synopsis "Documentation for the python-matplotlib package")
4013 (description (package-description python-matplotlib))
4014 (license (package-license python-matplotlib))))
4016 (define-public python2-matplotlib-documentation
4017 (package-with-python2 python-matplotlib-documentation))
4019 (define-public python2-pysnptools
4021 (name "python2-pysnptools")
4026 (uri (pypi-uri "pysnptools" version ".zip"))
4029 "1wybggjzz8zw7aav4pjsg2h22xp17a1lghrprza1pxwlm7wf96y2"))))
4030 (build-system python-build-system)
4032 `(#:python ,python-2)) ; only Python 2.7 is supported
4034 `(("python2-numpy" ,python2-numpy)
4035 ("python2-scipy" ,python2-scipy)
4036 ("python2-pandas" ,python2-pandas)))
4038 `(("python2-cython" ,python2-cython)))
4040 `(("unzip" ,unzip)))
4041 (home-page "http://research.microsoft.com/en-us/um/redmond/projects/mscompbio/")
4042 (synopsis "Library for reading and manipulating genetic data")
4044 "PySnpTools is a library for reading and manipulating genetic data. It
4045 can, for example, efficiently read whole PLINK *.bed/bim/fam files or parts of
4046 those files. It can also efficiently manipulate ranges of integers using set
4047 operators such as union, intersection, and difference.")
4048 (license license:asl2.0)))
4050 (define-public python-rpy2
4052 (name "python-rpy2")
4057 (uri (pypi-uri "rpy2" version))
4060 "0nhan2qvrw7b7gg5zddwa22kybdv3x1g26vkd7q8lvnkgzrs4dga"))))
4061 (build-system python-build-system)
4064 (modify-phases %standard-phases
4066 (add-after 'install 'check
4067 (lambda* (#:key outputs inputs #:allow-other-keys)
4068 ;; It's easier to run tests after install.
4069 ;; Make installed package available for running the tests
4070 (add-installed-pythonpath inputs outputs)
4071 (zero? (system* "python" "-m" "rpy2.tests" "-v")))))))
4073 `(("python-six" ,python-six)))
4075 `(("readline" ,readline)
4078 ("r-minimal" ,r-minimal)
4079 ("r-survival" ,r-survival)))
4082 (home-page "http://rpy.sourceforge.net/")
4083 (synopsis "Python interface to the R language")
4084 (description "rpy2 is a redesign and rewrite of rpy. It is providing a
4085 low-level interface to R from Python, a proposed high-level interface,
4086 including wrappers to graphical libraries, as well as R-like structures and
4088 (license license:gpl3+)))
4090 (define-public python2-rpy2
4091 (let ((rpy2 (package-with-python2 python-rpy2)))
4092 (package (inherit rpy2)
4094 `(("python2-singledispatch" ,python2-singledispatch)
4095 ,@(package-propagated-inputs rpy2))))))
4097 (define-public python-scipy
4099 (name "python-scipy")
4104 (uri (string-append "https://github.com/scipy/scipy/archive/v"
4106 (file-name (string-append name "-" version ".tar.gz"))
4109 "17slsrfawjp7if6qrlx03zhgp05350ginxx8ddpw9zqx43x905sn"))))
4110 (build-system python-build-system)
4112 `(("python-numpy" ,python-numpy)
4113 ("python-matplotlib" ,python-matplotlib)
4114 ("python-pyparsing" ,python-pyparsing)))
4116 `(("lapack" ,lapack)
4117 ("openblas" ,openblas)))
4119 `(("python-cython" ,python-cython)
4120 ("python-nose" ,python-nose)
4121 ("python-sphinx" ,python-sphinx)
4122 ("python-numpydoc" ,python-numpydoc)
4123 ("gfortran" ,gfortran)
4125 (outputs '("out" "doc"))
4128 (modify-phases %standard-phases
4129 (add-before 'build 'configure-openblas
4130 (lambda* (#:key inputs #:allow-other-keys)
4131 (call-with-output-file "site.cfg"
4135 libraries = openblas
4136 library_dirs = ~a/lib
4137 include_dirs = ~a/include
4139 # backslash-n to make emacs happy
4141 library_dirs = ~a/lib
4142 atlas_libs = openblas
4144 (assoc-ref inputs "openblas")
4145 (assoc-ref inputs "openblas")
4146 (assoc-ref inputs "openblas"))))
4148 (add-after 'install 'install-doc
4149 (lambda* (#:key inputs outputs #:allow-other-keys)
4150 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4151 (doc (string-append data "/doc/" ,name "-" ,version))
4152 (html (string-append doc "/html"))
4153 (pyver ,(string-append "PYVER=")))
4154 ;; Make installed package available for building the
4156 (add-installed-pythonpath inputs outputs)
4157 (with-directory-excursion "doc"
4158 ;; Fix generation of images for mathematical expressions.
4159 (substitute* (find-files "source" "conf\\.py")
4160 (("pngmath_use_preview = True")
4161 "pngmath_use_preview = False"))
4163 (system* "make" "html" pyver)
4164 (with-directory-excursion "build/html"
4165 (for-each (lambda (file)
4166 (let* ((dir (dirname file))
4167 (tgt-dir (string-append html "/" dir)))
4168 (install-file file html)))
4169 (find-files "." ".*")))))
4171 (add-after 'unpack 'fix-tests
4173 (substitute* "scipy/integrate/tests/test_quadpack.py"
4174 (("libm.so") "libm.so.6"))
4176 ;; Tests can only be run after the library has been installed and not
4177 ;; within the source directory.
4179 (add-after 'install 'check
4180 (lambda* (#:key inputs outputs #:allow-other-keys)
4181 (add-installed-pythonpath inputs outputs)
4182 (with-directory-excursion "/tmp"
4183 (zero? (system* "python" "-c"
4184 "import scipy; scipy.test('full')")))
4186 (home-page "http://www.scipy.org/")
4187 (synopsis "The Scipy library provides efficient numerical routines")
4188 (description "The SciPy library is one of the core packages that make up
4189 the SciPy stack. It provides many user-friendly and efficient numerical
4190 routines such as routines for numerical integration and optimization.")
4191 (properties `((python2-variant . ,(delay python2-scipy))))
4192 (license license:bsd-3)))
4194 (define-public python2-scipy
4195 (package-with-python2
4196 (strip-python2-variant python-scipy)))
4198 (define-public python-socksipy-branch
4200 (name "python-socksipy-branch")
4205 (uri (pypi-uri "SocksiPy-branch" version))
4208 "01l41v4g7fy9fzvinmjxy6zcbhgqaif8dhdqm4w90fwcw9h51a8p"))))
4209 (build-system python-build-system)
4211 `(#:tests? #f)) ; There are no tests
4212 (home-page "https://code.google.com/archive/p/socksipy-branch/")
4213 (synopsis "Python SOCKS module")
4215 "SocksiPy - A Python SOCKS client module. It provides a
4216 socket-like interface that supports connections to any TCP
4217 service through the use of a SOCKS4, SOCKS5 or HTTP proxy.
4218 The original version was developed by Dan Haim, this is a
4219 branch created by Mario Vilas to address some open issues,
4220 as the original project seems to have been abandoned circa 2007.")
4221 (license license:bsd-3)))
4223 (define-public python2-socksipy-branch
4224 (package-with-python2 python-socksipy-branch))
4226 (define-public python-sqlalchemy
4228 (name "python-sqlalchemy")
4233 (uri (string-append "https://pypi.python.org/packages/source/S/"
4234 "SQLAlchemy/SQLAlchemy-" version ".tar.gz"))
4237 "1l8qclhd0s90w3pvwhi5mjxdwr5j7gw7cjka2fx6f2vqmq7f4yb6"))))
4238 (build-system python-build-system)
4240 `(("python-cython" ,python-cython) ;for c extensions
4241 ("python-pytest" ,python-pytest)
4242 ("python-mock" ,python-mock))) ;for tests
4244 `(#:phases (alist-replace
4246 (lambda _ (zero? (system* "py.test")))
4248 (home-page "http://www.sqlalchemy.org")
4249 (synopsis "Database abstraction library")
4251 "SQLAlchemy is the Python SQL toolkit and Object Relational Mapper that
4252 gives application developers the full power and flexibility of SQL. It
4253 provides a full suite of well known enterprise-level persistence patterns,
4254 designed for efficient and high-performing database access, adapted into a
4255 simple and Pythonic domain language.")
4256 (license license:x11)))
4258 (define-public python2-sqlalchemy
4259 (package-with-python2 python-sqlalchemy))
4261 (define-public python-pycodestyle
4263 (name "python-pycodestyle")
4268 (uri (pypi-uri "pycodestyle" version))
4271 "1rz2v8506mdjdyxcnv9ygiw6v0d4dqx8z5sjyjm0w2v32h5l5w1p"))))
4272 (build-system python-build-system)
4273 (home-page "https://pycodestyle.readthedocs.io/")
4274 (synopsis "Python style guide checker")
4275 (description "@code{pycodestyle} (formerly pep8) is a tool to check
4276 Python code against some of the style conventions in
4277 @url{http://www.python.org/dev/peps/pep-0008/,PEP 8}.")
4278 (license license:expat)))
4280 (define-public python2-pycodestyle
4281 (package-with-python2 python-pycodestyle))
4283 (define-public python-orderedmultidict
4285 (name "python-orderedmultidict")
4290 (uri (pypi-uri "orderedmultidict" version))
4293 "0dls862ibm7qbq4fnvwx0xn1v9hwyzywbff8xjjdr42dd75208yw"))))
4294 (build-system python-build-system)
4297 (modify-phases %standard-phases
4298 (add-after 'unpack 'fix-tests
4300 ;; The package uses nosetest for running the tests.
4301 ;; Adding this initfile allows to run the test suite
4302 ;; without requiring nosetest.
4303 (zero? (system* "touch" "tests/__init__.py")))))))
4305 `(("python-six" ,python-six)))
4307 `(("python-pycodestyle" ,python-pycodestyle)))
4308 (home-page "https://github.com/gruns/orderedmultidict")
4309 (synopsis "Python Ordered Multivalue Dictionary - omdict")
4310 (description "This package contains a library for ordered multivalue
4311 dictionaries. A multivalue dictionary is a dictionary that can store
4312 multiple values for the same key. An ordered multivalue dictionary is a
4313 multivalue dictionary that retains the order of insertions and deletions.")
4314 (license license:unlicense)))
4316 (define-public python2-orderedmultidict
4317 (package-with-python2 python-orderedmultidict))
4319 (define-public python-furl
4321 (name "python-furl")
4326 (uri (pypi-uri "furl" version))
4329 "0lzpfpm686hvz3sr1mcrnd1b3lgmnw8v59gb43wfi98r3b671pqc"))))
4330 (build-system python-build-system)
4332 `(("python-six" ,python-six)
4333 ("python-orderedmultidict" ,python-orderedmultidict)))
4335 `(("python-pycodestyle" ,python-pycodestyle)))
4336 (home-page "https://github.com/gruns/furl")
4337 (synopsis "URL manipulation in Python")
4338 (description "Furl provides an easy-to-use alternative to the
4339 @code{urllib} and @code{urlparse} modules for manipulating URLs.")
4340 (license license:unlicense)))
4342 (define-public python2-furl
4343 (package-with-python2 python-furl))
4345 (define-public python-flask-babel
4347 (name "python-flask-babel")
4352 (uri (pypi-uri "Flask-Babel" version))
4355 "16b80cipdba9xj3jlaiaq6wgrgpjb70w3j01jjy9hbp4k71kd6yj"))))
4356 (build-system python-build-system)
4358 `(("python-flask" ,python-flask)
4359 ("python-babel" ,python-babel)
4360 ("python-jinja2" ,python-jinja2)
4361 ("python-pytz" ,python-pytz)))
4362 (home-page "https://github.com/python-babel/flask-babel")
4363 (synopsis "Add i18n/l10n support to Flask applications")
4364 (description "This package implements internationalization and localization
4365 support for Flask. This is based on the Python babel module as well as pytz -
4366 both of which are installed automatically if you install this library.")
4367 (license license:bsd-3)))
4369 (define-public python2-flask-babel
4370 (package-with-python2 python-flask-babel))
4372 (define-public python-sqlalchemy-utils
4374 (name "python-sqlalchemy-utils")
4379 (uri (pypi-uri "SQLAlchemy-Utils" version))
4382 "0vsib7gidjamzsz6w4s5pdhxzxsrkghjnm4sqwk94igjrl3i5ixj"))))
4383 (build-system python-build-system)
4385 '(#:tests? #f)) ; FIXME: Many tests require a running database server.
4387 ;; (modify-phases %standard-phases
4390 ;; (zero? (system* "py.test" "sqlalchemy_utils" "tests")))))
4392 `(("python-six" ,python-six)
4393 ("python-sqlalchemy" ,python-sqlalchemy)))
4395 `(("python-dateutil" ,python-dateutil)
4396 ("python-flexmock" ,python-flexmock)
4397 ("python-psycopg2" ,python-psycopg2)
4398 ("python-pytest" ,python-pytest)
4399 ("python-pytz" ,python-pytz)))
4400 (home-page "https://github.com/kvesteri/sqlalchemy-utils")
4401 (synopsis "Various utility functions for SQLAlchemy")
4403 "SQLAlchemy-utils provides various utility functions and custom data types
4404 for SQLAlchemy. SQLAlchemy is an SQL database abstraction library for Python.
4406 You might also want to install the following optional dependencies:
4408 @item @code{python-passlib}
4409 @item @code{python-babel}
4410 @item @code{python-cryptography}
4411 @item @code{python-pytz}
4412 @item @code{python-psycopg2}
4413 @item @code{python-furl}
4414 @item @code{python-flask-babel}
4417 (license license:bsd-3)))
4419 (define-public python2-sqlalchemy-utils
4420 (package-with-python2 python-sqlalchemy-utils))
4422 (define-public python-alembic
4424 (name "python-alembic")
4429 (uri (pypi-uri "alembic" version))
4432 "06br9sfqypnjlal6fsbnky3zb0askwcn3diz8k3kwa0qcblm0fqf"))))
4433 (build-system python-build-system)
4435 `(("python-mock" ,python-mock)
4436 ("python-pytest-cov" ,python-pytest-cov)))
4438 `(("python-sqlalchemy" ,python-sqlalchemy)
4439 ("python-mako" ,python-mako)
4440 ("python-editor" ,python-editor)))
4441 (home-page "http://bitbucket.org/zzzeek/alembic")
4443 "Database migration tool for SQLAlchemy")
4445 "Alembic is a lightweight database migration tool for usage with the
4446 SQLAlchemy Database Toolkit for Python.")
4447 (license license:expat)))
4449 (define-public python2-alembic
4450 (package-with-python2 python-alembic))
4452 (define-public python-autopep8
4454 (name "python-autopep8")
4459 (uri (pypi-uri "autopep8" version))
4462 "18parm383lfn42a00wklv3qf20p4v277f1x3cn58x019dqk1xqrq"))))
4463 (build-system python-build-system)
4465 `(("python-pep8" ,python-pep8)))
4466 (home-page "https://github.com/hhatto/autopep8")
4467 (synopsis "Format Python code according to the PEP 8 style guide")
4469 "@code{autopep8} automatically formats Python code to conform to
4470 the PEP 8 style guide. It uses the pycodestyle utility to determine
4471 what parts of the code needs to be formatted. @code{autopep8} is
4472 capable of fixing most of the formatting issues that can be reported
4474 (license (license:non-copyleft
4475 "https://github.com/hhatto/autopep8/blob/master/LICENSE"))))
4477 (define-public python2-autopep8
4478 (package-with-python2 python-autopep8))
4480 (define-public python-distutils-extra
4482 (name "python-distutils-extra")
4487 (uri (string-append "https://launchpad.net/python-distutils-extra/trunk/"
4488 version "/+download/python-distutils-extra-"
4492 "0lx15kcbby9zisx33p2h5hgakgwh2bvh0ibag8z0px4j6ifhs41x"))))
4493 (build-system python-build-system)
4494 (home-page "https://launchpad.net/python-distutils-extra/")
4495 (synopsis "Enhancements to Python's distutils")
4497 "The python-distutils-extra module enables you to easily integrate
4498 gettext support, themed icons, and scrollkeeper-based documentation into
4499 Python's distutils.")
4500 (license license:gpl2)))
4502 (define-public python2-distutils-extra
4503 (package-with-python2 python-distutils-extra))
4505 (define-public python2-elib.intl
4507 (name "python2-elib.intl")
4511 ;; This project doesn't tag releases or publish tarballs, so we take
4512 ;; source from a (semi-arbitrary, i.e. latest as of now) git commit.
4515 (url "https://github.com/dieterv/elib.intl.git")
4516 (commit "d09997cfef")))
4519 "0y7vzff9xgbnaay7m0va1arl6g68ncwrvbgwl7jqlclsahzzb09d"))))
4520 (build-system python-build-system)
4522 ;; incompatible with Python 3 (exception syntax)
4523 `(#:python ,python-2
4525 (home-page "https://github.com/dieterv/elib.intl")
4526 (synopsis "Enhanced internationalization for Python")
4528 "The elib.intl module provides enhanced internationalization (I18N)
4529 services for your Python modules and applications.")
4530 (license license:lgpl3+)))
4532 (define-public python-pillow
4534 (name "python-pillow")
4539 (uri (pypi-uri "Pillow" version))
4540 (patches (search-patches "python-pillow-freetype-2.7-test-failure.patch"))
4543 "0xkv0p1d73gz0a1qaasf0ai4262g8f334j07vd60bjrxs2wr3nmj"))))
4544 (build-system python-build-system)
4546 `(("python-nose" ,python-nose)))
4548 `(("freetype" ,freetype)
4551 ("libjpeg" ,libjpeg)
4552 ("openjpeg" ,openjpeg)
4553 ("libtiff" ,libtiff)
4554 ("libwebp" ,libwebp)))
4556 `(#:phases (modify-phases %standard-phases
4558 'install 'check-installed
4559 (lambda* (#:key outputs inputs #:allow-other-keys)
4561 (setenv "HOME" (getcwd))
4562 ;; Make installed package available for running the
4564 (add-installed-pythonpath inputs outputs)
4565 (and (zero? (system* "python" "selftest.py"
4567 (zero? (system* "python" "test-installed.py"))))))
4569 (home-page "https://pypi.python.org/pypi/Pillow")
4570 (synopsis "Fork of the Python Imaging Library")
4572 "The Python Imaging Library adds image processing capabilities to your
4573 Python interpreter. This library provides extensive file format support, an
4574 efficient internal representation, and fairly powerful image processing
4575 capabilities. The core image library is designed for fast access to data
4576 stored in a few basic pixel formats. It should provide a solid foundation for
4577 a general image processing tool.")
4578 (license (license:x11-style
4579 "http://www.pythonware.com/products/pil/license.htm"
4580 "The PIL Software License"))))
4582 (define-public python2-pillow
4583 (package-with-python2 python-pillow))
4585 (define-public python-pycparser
4587 (name "python-pycparser")
4592 (uri (pypi-uri "pycparser" version))
4595 "1dkkjri0miidqb1zcqhqljfa34fcy9k5akasgwsv6k622zlk3b0a"))))
4596 (outputs '("out" "doc"))
4597 (build-system python-build-system)
4599 `(("pkg-config" ,pkg-config)))
4602 (modify-phases %standard-phases
4605 (with-directory-excursion "tests"
4606 (zero? (system* "python" "all_tests.py")))))
4607 (add-after 'install 'install-doc
4608 (lambda* (#:key outputs #:allow-other-keys)
4609 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4610 (doc (string-append data "/doc/" ,name "-" ,version))
4611 (examples (string-append doc "/examples")))
4613 (for-each (lambda (file)
4614 (copy-file (string-append "." file)
4615 (string-append doc file)))
4616 '("/README.rst" "/CHANGES" "/LICENSE"))
4617 (copy-recursively "examples" examples)))))))
4618 (home-page "https://github.com/eliben/pycparser")
4619 (synopsis "C parser in Python")
4621 "Pycparser is a complete parser of the C language, written in pure Python
4622 using the PLY parsing library. It parses C code into an AST and can serve as
4623 a front-end for C compilers or analysis tools.")
4624 (license license:bsd-3)))
4626 (define-public python2-pycparser
4627 (package-with-python2 python-pycparser))
4629 (define-public python-cffi
4631 (name "python-cffi")
4636 (uri (pypi-uri "cffi" version))
4638 (base32 "161rj52rzi3880lij17d6i9kvgkiwjilrqjs8405k8sf6ryif7cg"))))
4639 (build-system python-build-system)
4640 (outputs '("out" "doc"))
4642 `(("libffi" ,libffi)))
4643 (propagated-inputs ; required at run-time
4644 `(("python-pycparser" ,python-pycparser)))
4646 `(("pkg-config" ,pkg-config)
4647 ("python-sphinx" ,python-sphinx)
4648 ("python-pytest" ,python-pytest)))
4652 'install 'install-doc
4653 (lambda* (#:key outputs #:allow-other-keys)
4654 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4655 (doc (string-append data "/doc/" ,name "-" ,version))
4656 (html (string-append doc "/html")))
4657 (with-directory-excursion "doc"
4658 (system* "make" "html")
4660 (copy-recursively "build/html" html))
4661 (copy-file "LICENSE" (string-append doc "/LICENSE"))))
4663 (home-page "http://cffi.readthedocs.org")
4664 (synopsis "Foreign function interface for Python")
4666 "Foreign Function Interface for Python calling C code.")
4667 (license license:expat)))
4669 (define-public python2-cffi
4670 (package-with-python2 python-cffi))
4672 (define-public python-xcffib
4674 (name "python-xcffib")
4679 (uri (string-append "https://pypi.python.org/packages/source/x/"
4680 "xcffib/xcffib-" version ".tar.gz"))
4683 "0655hzxv57h1a9ja9kwp0ichbkhf3djw32k33d66xp0q37dq2y81"))))
4684 (build-system python-build-system)
4686 `(("libxcb" ,libxcb)))
4688 `(("python-cffi" ,python-cffi) ; used at run time
4689 ("python-six" ,python-six)))
4691 `(;; FIXME: Tests cannot load libxcb.so.1
4694 (modify-phases %standard-phases
4695 (add-after 'install 'install-doc
4696 (lambda* (#:key outputs #:allow-other-keys)
4697 (let ((doc (string-append (assoc-ref outputs "out") "/share"
4698 "/doc/" ,name "-" ,version)))
4700 (copy-file "README.md"
4701 (string-append doc "/README.md"))
4703 (home-page "https://github.com/tych0/xcffib")
4704 (synopsis "XCB Python bindings")
4706 "Xcffib is a replacement for xpyb, an XCB Python bindings. It adds
4707 support for Python 3 and PyPy. It is based on cffi.")
4708 (license license:expat)))
4710 (define-public python2-xcffib
4711 (package-with-python2 python-xcffib))
4713 (define-public python-cairocffi
4715 (name "python-cairocffi")
4720 ;; The archive on pypi is missing the 'utils' directory!
4721 (uri (string-append "https://github.com/SimonSapin/cairocffi/archive/v"
4723 (file-name (string-append name "-" version ".tar.gz"))
4726 "03w5p62sp3nqiccx864sbq0jvh7946277jqx3rcc3dch5xwfvv51"))))
4727 (build-system python-build-system)
4728 (outputs '("out" "doc"))
4730 `(("gdk-pixbuf" ,gdk-pixbuf)
4733 `(("pkg-config" ,pkg-config)
4734 ("python-sphinx" ,python-sphinx)
4735 ("python-docutils" ,python-docutils)))
4737 `(("python-xcffib" ,python-xcffib))) ; used at run time
4739 `(;; FIXME: Tests cannot find 'libcairo.so.2'.
4742 (modify-phases %standard-phases
4743 (add-after 'install 'install-doc
4744 (lambda* (#:key inputs outputs #:allow-other-keys)
4745 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4746 (doc (string-append data "/doc/" ,name "-" ,version))
4747 (html (string-append doc "/html")))
4748 (setenv "LD_LIBRARY_PATH"
4749 (string-append (assoc-ref inputs "cairo") "/lib" ":"
4750 (assoc-ref inputs "gdk-pixbuf") "/lib"))
4751 (setenv "LANG" "en_US.UTF-8")
4753 (for-each (lambda (file)
4754 (copy-file (string-append "." file)
4755 (string-append doc file)))
4756 '("/README.rst" "/CHANGES" "/LICENSE"))
4757 (system* "python" "setup.py" "build_sphinx")
4758 (copy-recursively "docs/_build/html" html)
4760 (home-page "https://github.com/SimonSapin/cairocffi")
4761 (synopsis "Python bindings and object-oriented API for Cairo")
4763 "Cairocffi is a CFFI-based drop-in replacement for Pycairo, a set of
4764 Python bindings and object-oriented API for cairo. Cairo is a 2D vector
4765 graphics library with support for multiple backends including image buffers,
4766 PNG, PostScript, PDF, and SVG file output.")
4767 (license license:bsd-3)))
4769 (define-public python2-cairocffi
4770 (package-with-python2 python-cairocffi))
4772 (define-public python-decorator
4774 (name "python-decorator")
4779 (uri (pypi-uri "decorator" version))
4781 (base32 "0w7hg59hlpq74jpyja4yfryap0ccjvchgpkfp20rhj9krgnrhvlw"))))
4782 (build-system python-build-system)
4783 (arguments '(#:tests? #f)) ; no test target
4784 (home-page "https://pypi.python.org/pypi/decorator/")
4785 (synopsis "Python module to simplify usage of decorators")
4787 "The aim of the decorator module is to simplify the usage of decorators
4788 for the average programmer, and to popularize decorators usage giving examples
4789 of useful decorators, such as memoize, tracing, redirecting_stdout, locked,
4790 etc. The core of this module is a decorator factory.")
4791 (license license:expat)))
4793 (define-public python2-decorator
4794 (package-with-python2 python-decorator))
4796 (define-public python-drmaa
4798 (name "python-drmaa")
4804 "https://pypi.python.org/packages/source/d/drmaa/drmaa-"
4807 (base32 "0xzqriqyvk5b8hszbavsyxd29wm3sxirm8zvvdm73rs2iq7w4hkx"))))
4808 (build-system python-build-system)
4809 ;; The test suite requires libdrmaa which is provided by the cluster
4810 ;; environment. At runtime the environment variable DRMAA_LIBRARY_PATH
4811 ;; should be set to the path of the libdrmaa library.
4812 (arguments '(#:tests? #f))
4814 `(("python-nose" ,python-nose)))
4815 (home-page "https://pypi.python.org/pypi/drmaa")
4816 (synopsis "Python bindings for the DRMAA library")
4818 "A Python package for Distributed Resource Management (DRM) job
4819 submission and control. This package is an implementation of the DRMAA 1.0
4820 Python language binding specification.")
4821 (license license:bsd-3)))
4823 (define-public python2-drmaa
4824 (package-with-python2 python-drmaa))
4826 (define-public python-gridmap
4828 (name "python-gridmap")
4834 "https://github.com/pygridtools/gridmap/archive/v"
4836 (file-name (string-append name "-" version ".tar.gz"))
4838 (base32 "1gzjg2k6f14i1msm2b0ax8d9ds1hvk6qd5nlaivg8m4cxqp4cp1x"))))
4839 (build-system python-build-system)
4841 '(#:tests? #f)) ; FIXME: Requires python-cherrypy.
4843 `(("python-psutil" ,python-psutil)
4844 ("python-drmaa" ,python-drmaa)
4845 ("python-pyzmq" ,python-pyzmq)))
4846 (home-page "https://github.com/pygridtools/gridmap")
4847 (synopsis "Create jobs on a cluster directly from Python")
4849 "Gridmap is a Python package to allow you to easily create jobs on the
4850 cluster directly from Python. You can directly map Python functions onto the
4851 cluster without needing to write any wrapper code yourself.")
4852 (license license:gpl3+)))
4854 (define-public python2-gridmap
4855 (package-with-python2 python-gridmap))
4857 (define-public python-pexpect
4859 (name "python-pexpect")
4864 (uri (pypi-uri "pexpect" version))
4866 (base32 "14ls7k99pwvl21zqv65kzrhccv50j89m5ij1hf0slmsvlxjj84rx"))))
4867 (build-system python-build-system)
4870 (modify-phases %standard-phases
4871 (add-before 'check 'prepare-tests
4873 (substitute* (find-files "tests")
4874 (("/bin/ls") (which "ls"))
4875 (("/bin/echo") (which "echo"))
4876 (("/bin/which") (which "which"))
4877 ;; Many tests try to use the /bin directory which
4878 ;; is not present in the build environment.
4879 ;; Use one that's non-empty and unlikely to change.
4880 (("/bin'") "/dev'"))
4881 ;; XXX: Socket connection test gets "Connection reset by peer".
4882 ;; Why does it not work? Delete for now.
4883 (delete-file "tests/test_socket.py")
4885 (replace 'check (lambda _ (zero? (system* "nosetests")))))))
4887 `(("python-nose" ,python-nose)
4888 ("python-pytest" ,python-pytest)
4892 `(("python-ptyprocess" ,python-ptyprocess)))
4893 (home-page "http://pexpect.readthedocs.org/")
4894 (synopsis "Controlling interactive console applications")
4896 "Pexpect is a pure Python module for spawning child applications;
4897 controlling them; and responding to expected patterns in their output.
4898 Pexpect works like Don Libes’ Expect. Pexpect allows your script to spawn a
4899 child application and control it as if a human were typing commands.")
4900 (license license:isc)))
4902 (define-public python2-pexpect
4903 (package-with-python2 python-pexpect))
4905 (define-public python-setuptools-scm
4907 (name "python-setuptools-scm")
4911 (uri (pypi-uri "setuptools_scm" version))
4914 "0bwyc5markib0i7i2qlyhdzxhiywzxbkfiapldma8m91m82jvwfs"))))
4915 (build-system python-build-system)
4916 (home-page "https://github.com/pypa/setuptools_scm/")
4917 (synopsis "Manage Python package versions in SCM metadata")
4919 "Setuptools_scm handles managing your Python package versions in
4920 @dfn{software configuration management} (SCM) metadata instead of declaring
4921 them as the version argument or in a SCM managed file.")
4922 (license license:expat)))
4924 (define-public python2-setuptools-scm
4925 (package-with-python2 python-setuptools-scm))
4927 (define-public python-pathpy
4929 (name "python-pathpy")
4934 (uri (string-append "https://pypi.python.org/packages/source/p/"
4935 "path.py/path.py-" version ".tar.gz"))
4937 (base32 "1p8s1l2vfkqhqxdhqlj0g1jjw4f1as2frr35sjcpjjpd5a89y41f"))))
4938 (outputs '("out" "doc"))
4939 (build-system python-build-system)
4941 `(("python-appdirs" ,python-appdirs)))
4943 `(("python-setuptools-scm" ,python-setuptools-scm)
4944 ("python-sphinx" ,python-sphinx)
4945 ("python-rst.linker" ,python-rst.linker)
4946 ("python-pytest" ,python-pytest)
4947 ("python-pytest-runner" ,python-pytest-runner)))
4950 (modify-phases %standard-phases
4951 (add-after 'build 'build-doc
4953 (setenv "LANG" "en_US.UTF-8")
4954 (zero? (system* "python" "setup.py" "build_sphinx"))))
4955 (add-after 'install 'install-doc
4956 (lambda* (#:key outputs #:allow-other-keys)
4957 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4958 (doc (string-append data "/doc/" ,name "-" ,version))
4959 (html (string-append doc "/html")))
4961 (for-each (lambda (file)
4962 (copy-file file (string-append doc "/" file)))
4963 '("README.rst" "CHANGES.rst"))
4964 (copy-recursively "build/sphinx/html" html)))))))
4965 (home-page "http://github.com/jaraco/path.py")
4966 (synopsis "Python module wrapper for built-in os.path")
4968 "@code{path.py} implements path objects as first-class entities, allowing
4969 common operations on files to be invoked on those path objects directly.")
4970 (license license:expat)))
4972 (define-public python2-pathpy
4973 (package-with-python2 python-pathpy))
4975 (define-public python-pickleshare
4977 (name "python-pickleshare")
4982 (uri (string-append "https://pypi.python.org/packages/source/p/"
4983 "pickleshare/pickleshare-" version ".tar.gz"))
4985 (base32 "11ljr90j3p6qswdrbl7p4cjb2i93f6vn0vx9anzpshsx0d2mggn0"))))
4986 (build-system python-build-system)
4988 `(("python-pathpy" ,python-pathpy)))
4989 (home-page "https://github.com/vivainio/pickleshare")
4990 (synopsis "Tiny key value database with concurrency support")
4992 "PickleShare is a small ‘shelve’-like datastore with concurrency support.
4993 Like shelve, a PickleShareDB object acts like a normal dictionary. Unlike
4994 shelve, many processes can access the database simultaneously. Changing a
4995 value in database is immediately visible to other processes accessing the same
4996 database. Concurrency is possible because the values are stored in separate
4997 files. Hence the “database” is a directory where all files are governed by
4999 (license license:expat)))
5001 (define-public python2-pickleshare
5002 (package-with-python2 python-pickleshare))
5004 (define-public python-simplegeneric
5006 (name "python-simplegeneric")
5011 (uri (string-append "https://pypi.python.org/packages/source/s/"
5012 "simplegeneric/simplegeneric-" version ".zip"))
5014 (base32 "0wwi1c6md4vkbcsfsf8dklf3vr4mcdj4mpxkanwgb6jb1432x5yw"))))
5015 (build-system python-build-system)
5017 `(("unzip" ,unzip)))
5018 (home-page "http://cheeseshop.python.org/pypi/simplegeneric")
5019 (synopsis "Python module for simple generic functions")
5021 "The simplegeneric module lets you define simple single-dispatch generic
5022 functions, akin to Python’s built-in generic functions like @code{len()},
5023 @code{iter()} and so on. However, instead of using specially-named methods,
5024 these generic functions use simple lookup tables, akin to those used by
5025 e.g. @code{pickle.dump()} and other generic functions found in the Python
5027 (license license:zpl2.1)))
5029 (define-public python2-simplegeneric
5030 (package-with-python2 python-simplegeneric))
5032 (define-public python-ipython-genutils
5033 ;; TODO: This package is retired, check if can be removed, see description.
5035 (name "python-ipython-genutils")
5040 (uri (string-append "https://pypi.python.org/packages/source/i/"
5041 "ipython_genutils/ipython_genutils-"
5044 (base32 "19l2pp1c64ansr89l3cqh19jdi2ixhssdzx0vz4n6r52a6i281is"))))
5045 (build-system python-build-system)
5046 (arguments `(#:tests? #f)) ; no tests
5047 (home-page "http://ipython.org")
5048 (synopsis "Vestigial utilities from IPython")
5050 "This package provides retired utilities from IPython. No packages
5051 outside IPython/Jupyter should depend on it.
5053 This package shouldn't exist. It contains some common utilities shared by
5054 Jupyter and IPython projects during The Big Split. As soon as possible, those
5055 packages will remove their dependency on this, and this package will go
5057 (license license:bsd-3)))
5059 (define-public python2-ipython-genutils
5060 (package-with-python2 python-ipython-genutils))
5062 (define-public python-traitlets
5064 (name "python-traitlets")
5069 (uri (pypi-uri "traitlets" version))
5072 "1afy08sa5n9gnkvh3da49c16zkyv598vchv0p1hp7zzjy8895hz4"))))
5073 (build-system python-build-system)
5076 (modify-phases %standard-phases
5077 (replace 'check (lambda _ (zero? (system* "nosetests")))))))
5079 `(("python-ipython-genutils" ,python-ipython-genutils)
5080 ("python-decorator" ,python-decorator)))
5082 `(("python-mock" ,python-mock)
5083 ("python-nose" ,python-nose)))
5084 (home-page "http://ipython.org")
5085 (synopsis "Configuration system for Python applications")
5087 "Traitlets is a framework that lets Python classes have attributes with
5088 type checking, dynamically calculated default values, and ‘on change’
5089 callbacks. The package also includes a mechanism to use traitlets for
5090 configuration, loading values from files or from command line arguments. This
5091 is a distinct layer on top of traitlets, so you can use traitlets in your code
5092 without using the configuration machinery.")
5093 (license license:bsd-3)))
5095 (define-public python2-traitlets
5096 (package-with-python2 python-traitlets))
5098 (define-public python-jupyter-core
5100 (name "python-jupyter-core")
5105 (uri (string-append (pypi-uri "jupyter_core" version)))
5108 "1cy7inv218dgh4m1fbzbsiqpz733ylgjrj62jxqpfzs3r2cm7ic9"))))
5109 (build-system python-build-system)
5110 ;; FIXME: not sure how to run the tests
5111 (arguments `(#:tests? #f))
5113 `(("python-traitlets" ,python-traitlets)))
5114 (home-page "http://jupyter.org/")
5115 (synopsis "Jupyter base package")
5117 "Jupyter core is the base package on which Jupyter projects rely.")
5118 (license license:bsd-3)))
5120 (define-public python2-jupyter-core
5121 (package-with-python2 python-jupyter-core))
5123 (define-public python-jupyter-client
5125 (name "python-jupyter-client")
5130 (uri (pypi-uri "jupyter_client" version))
5133 "1vjjrpjw7k5sh982pbjnslv7byfbfazjw9g92jvs7dz5qbx556n9"))))
5134 (build-system python-build-system)
5135 ;; Tests fail because of missing native python kernel which I assume is
5136 ;; provided by the ipython package, which we cannot use because it would
5137 ;; cause a dependency cycle.
5138 (arguments `(#:tests? #f))
5140 `(("python-pyzmq" ,python-pyzmq)
5141 ("python-traitlets" ,python-traitlets)
5142 ("python-jupyter-core" ,python-jupyter-core)))
5143 (home-page "http://jupyter.org/")
5144 (synopsis "Jupyter protocol implementation and client libraries")
5146 "The @code{jupyter_client} package contains the reference implementation
5147 of the Jupyter protocol. It also provides client and kernel management APIs
5148 for working with kernels, and the @code{jupyter kernelspec} entrypoint for
5149 installing @code{kernelspec}s for use with Jupyter frontends.")
5150 (license license:bsd-3)))
5152 (define-public python2-jupyter-client
5153 (package-with-python2 python-jupyter-client))
5155 (define-public python-ipykernel
5157 (name "python-ipykernel")
5162 (uri (pypi-uri "ipykernel" version))
5164 (base32 "0qllv0k6zzv1r1cj1x2ygxmlrrqhbslzj8rc6r6fg3kc1rgz4m2s"))))
5165 (build-system python-build-system)
5166 ;; The tests load a submodule of IPython. However, IPython itself depends
5168 (arguments `(#:tests? #f))
5170 ;; imported at runtime during connect
5171 `(("python-jupyter-client" ,python-jupyter-client)))
5172 (home-page "http://ipython.org")
5173 (synopsis "IPython Kernel for Jupyter")
5175 "This package provides the IPython kernel for Jupyter.")
5176 (license license:bsd-3)))
5178 (define-public python2-ipykernel
5179 (package-with-python2 python-ipykernel))
5181 (define-public python-testpath
5183 (name "python-testpath")
5188 (uri (string-append "https://github.com/jupyter/testpath/archive/"
5190 (file-name (string-append name "-" version ".tar.gz"))
5193 "04kh3fgvmqz6cfcw79q70qwjz7ib7lxm27cc548iy2rpr33qqf55"))))
5194 (build-system python-build-system)
5196 `(#:tests? #f ; this package does not even have a setup.py
5197 #:modules ((guix build python-build-system)
5200 #:imported-modules (,@%python-build-system-modules
5203 (modify-phases %standard-phases
5206 (lambda* (#:key inputs outputs #:allow-other-keys)
5207 (let* ((version (last
5208 (string-split (assoc-ref inputs "python") #\-)))
5209 (x.y (string-join (take (string-split version #\.) 2)
5212 (assoc-ref outputs "out")
5213 "/lib/python" x.y "/site-packages/testpath")))
5215 (copy-recursively "testpath" dir))
5217 (home-page "https://github.com/takluyver/testpath")
5218 (synopsis "Test utilities for code working with files and commands")
5220 "Testpath is a collection of utilities for Python code working with files
5221 and commands. It contains functions to check things on the filesystem, and
5222 tools for mocking system commands and recording calls to those.")
5223 (license license:expat)))
5225 (define-public python2-testpath
5226 (package-with-python2 python-testpath))
5228 (define-public python-ipython
5230 (name "python-ipython")
5235 (uri (pypi-uri "ipython" version ".tar.gz"))
5237 (base32 "1qhjwa9cyz1np7rhv3p4ip13lkgbqsad62l24xkwiq1ic2gwiqbf"))))
5238 (build-system python-build-system)
5239 (outputs '("out" "doc"))
5241 `(("python-pyzmq" ,python-pyzmq)
5242 ("python-prompt-toolkit" ,python-prompt-toolkit)
5243 ("python-terminado" ,python-terminado)
5244 ("python-matplotlib" ,python-matplotlib)
5245 ("python-numpy" ,python-numpy)
5246 ("python-numpydoc" ,python-numpydoc)
5247 ("python-jinja2" ,python-jinja2)
5248 ("python-mistune" ,python-mistune)
5249 ("python-pexpect" ,python-pexpect)
5250 ("python-pickleshare" ,python-pickleshare)
5251 ("python-simplegeneric" ,python-simplegeneric)
5252 ("python-jsonschema" ,python-jsonschema)
5253 ("python-traitlets" ,python-traitlets)
5254 ("python-ipykernel" ,python-ipykernel)
5255 ("python-nbformat" ,python-nbformat)
5256 ("python-pygments" ,python-pygments)))
5258 `(("readline" ,readline)
5261 `(("graphviz" ,graphviz)
5262 ("pkg-config" ,pkg-config)
5263 ("python-requests" ,python-requests) ;; for tests
5264 ("python-testpath" ,python-testpath)
5265 ("python-nose" ,python-nose)
5266 ("python-sphinx" ,python-sphinx)
5267 ("python-shpinx-rtd-theme" ,python-sphinx-rtd-theme)
5268 ("texlive" ,texlive)
5269 ("texinfo" ,texinfo)))
5272 (modify-phases %standard-phases
5274 'install 'install-doc
5275 (lambda* (#:key inputs outputs #:allow-other-keys)
5276 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
5277 (doc (string-append data "/doc/" ,name "-" ,version))
5278 (html (string-append doc "/html"))
5279 (man1 (string-append data "/man/man1"))
5280 (info (string-append data "/info"))
5281 (examples (string-append doc "/examples"))
5282 (python-arg (string-append "PYTHON=" (which "python"))))
5283 (setenv "LANG" "en_US.utf8")
5284 ;; Make installed package available for running the tests
5285 (add-installed-pythonpath inputs outputs)
5286 (with-directory-excursion "docs"
5287 ;; FIXME: pdf fails to build
5288 ;;(system* "make" "pdf" "PAPER=a4")
5289 (system* "make" python-arg "html")
5290 (system* "make" python-arg "info"))
5291 (copy-recursively "docs/man" man1)
5292 (copy-recursively "examples" examples)
5293 (copy-recursively "docs/build/html" html)
5294 ;; (copy-file "docs/build/latex/ipython.pdf"
5295 ;; (string-append doc "/ipython.pdf"))
5297 (copy-file "docs/build/texinfo/ipython.info"
5298 (string-append info "/ipython.info"))
5299 (copy-file "COPYING.rst" (string-append doc "/COPYING.rst")))))
5300 ;; Tests can only be run after the library has been installed and not
5301 ;; within the source directory.
5305 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
5307 (with-directory-excursion "/tmp"
5308 ;; Make installed package available for running the tests
5309 (add-installed-pythonpath inputs outputs)
5310 (setenv "HOME" "/tmp/") ;; required by a test
5311 (zero? (system* (string-append (assoc-ref outputs "out")
5316 (lambda* (#:key inputs #:allow-other-keys)
5317 (substitute* "./IPython/utils/_process_posix.py"
5318 (("/usr/bin/env', 'which") (which "which")))
5319 (substitute* "./IPython/core/tests/test_inputtransformer.py"
5320 (("#!/usr/bin/env python")
5321 (string-append "#!" (which "python"))))
5322 ;; Disable 1 failing test
5323 (substitute* "./IPython/core/tests/test_magic.py"
5324 (("def test_dirops\\(\\):" all)
5325 (string-append "@dec.skipif(True)\n" all))))))))
5326 (home-page "http://ipython.org")
5327 (synopsis "IPython is a tool for interactive computing in Python")
5329 "IPython provides a rich architecture for interactive computing with:
5330 Powerful interactive shells, a browser-based notebook, support for interactive
5331 data visualization, embeddable interpreters and tools for parallel
5333 (license license:bsd-3)
5334 (properties `((python2-variant . ,(delay python2-ipython))))))
5336 (define-public python2-ipython
5337 (let ((ipython (package-with-python2 (strip-python2-variant python-ipython))))
5340 ;; FIXME: add pyreadline once available.
5342 `(("python2-backports-shutil-get-terminal-size"
5343 ,python2-backports-shutil-get-terminal-size)
5344 ("python2-pathlib2" ,python2-pathlib2)
5345 ,@(package-propagated-inputs ipython)))
5347 `(("python2-mock" ,python2-mock)
5348 ,@(package-native-inputs ipython))))))
5350 (define-public python-isodate
5352 (name "python-isodate")
5357 (uri (pypi-uri "isodate" version))
5360 "0cafaiwixgpxwh9dsd28qb0dbzsj6xpxjdkyk30ns91ps10mq422"))))
5361 (build-system python-build-system)
5363 "http://cheeseshop.python.org/pypi/isodate")
5365 "Python date parser and formatter")
5367 "Python-isodate is a python module for parsing and formatting
5368 ISO 8601 dates, time and duration.")
5369 (license license:bsd-3)))
5371 (define-public python2-isodate
5372 (package-with-python2 python-isodate))
5374 (define-public python-html5lib
5376 (name "python-html5lib")
5381 (uri (pypi-uri "html5lib" version))
5384 "1yd068a5c00wd0ajq0hqimv7fd82lhrw0w3s01vbhy9bbd6xapqd"))))
5385 (build-system python-build-system)
5387 `(("python-six" ,python-six)
5388 ("python-webencodings" ,python-webencodings)))
5390 `(#:test-target "check"))
5392 "https://github.com/html5lib/html5lib-python")
5394 "Python HTML parser based on the WHATWG HTML specifcation")
5396 "Html5lib is an HTML parser based on the WHATWG HTML specifcation
5397 and written in Python.")
5398 (license license:expat)))
5400 (define-public python2-html5lib
5401 (package-with-python2 python-html5lib))
5403 ;; Needed for python-bleach, a dependency of python-notebook
5404 (define-public python-html5lib-0.9
5406 (inherit python-html5lib)
5411 (uri (pypi-uri "html5lib" version))
5414 "17n4zfsj6ynmbwdwviywmj8r6nzr3xvfx2zs0xhndmvm51z7z263"))))))
5416 (define-public python2-html5lib-0.9
5417 (package-with-python2 python-html5lib-0.9))
5419 (define-public python-webencodings
5421 (name "python-webencodings")
5425 (uri (pypi-uri "webencodings" version))
5428 "015rw7662lkpb9aqiqah2hbizk6w531badqwjpz41rr47glmxid5"))))
5429 (build-system python-build-system)
5432 (modify-phases %standard-phases
5435 (zero? (system* "py.test" "-v" "webencodings/tests.py")))))))
5437 `(("python-pytest" ,python-pytest)))
5438 (home-page "https://github.com/SimonSapin/python-webencodings")
5439 (synopsis "Character encoding aliases for legacy web content")
5441 "In order to be compatible with legacy web content when interpreting
5442 something like @code{Content-Type: text/html; charset=latin1}, tools need
5443 to use a particular set of aliases for encoding labels as well as some
5444 overriding rules. For example, @code{US-ASCII} and @code{iso-8859-1} on
5445 the web are actually aliases for @code{windows-1252}, and an @code{UTF-8}
5446 or @code{UTF-16} BOM takes precedence over any other encoding declaration.
5447 The WHATWG @url{https://encoding.spec.whatwg.org/,Encoding} standard
5448 defines all such details so that implementations do not have to
5449 reverse-engineer each other.
5451 This module implements the Encoding standard and has encoding labels and
5452 BOM detection, but the actual implementation for encoders and decoders
5454 (license license:bsd-3)))
5456 (define-public python2-webencodings
5457 (package-with-python2 python-webencodings))
5459 (define-public python-urwid
5461 (name "python-urwid")
5466 (uri (pypi-uri "urwid" version))
5469 "18cnd1wdjcas08x5qwa5ayw6jsfcn33w4d9f7q3s29fy6qzc1kng"))))
5470 (build-system python-build-system)
5473 (modify-phases %standard-phases
5474 ;; Disable failing test. Bug filed upstream:
5475 ;; https://github.com/wardi/urwid/issues/164
5476 ;; TODO: check again for python-urwid > 1.3.1 or python > 3.4.3.
5477 (add-after 'unpack 'disable-failing-test
5479 (substitute* "urwid/tests/test_event_loops.py"
5480 (("test_remove_watch_file")
5481 "disable_remove_watch_file")))))))
5482 (home-page "http://urwid.org")
5483 (synopsis "Console user interface library for Python")
5485 "Urwid is a curses-based UI/widget library for Python. It includes many
5486 features useful for text console applications.")
5487 (license license:lgpl2.1+)))
5489 (define-public python2-urwid
5490 (package-with-python2 python-urwid))
5492 (define-public python-openid
5494 (name "python-openid")
5499 (uri (pypi-uri "python3-openid" version))
5502 "1x3nh3fycqfn43jp5j5pb4q4y2jxp4mdka4absaa3bc0078qd758"))))
5503 (build-system python-build-system)
5504 (home-page "https://github.com/necaris/python3-openid")
5505 (synopsis "OpenID support for servers and consumers")
5506 (description "This library provides OpenID authentication for Python, both
5507 for clients and servers.")
5508 (license license:asl2.0)))
5510 (define-public python2-openid
5512 (name "python2-openid")
5517 (uri (pypi-uri "python-openid" version))
5520 "1vvhxlghjan01snfdc4k7ykd80vkyjgizwgg9bncnin8rqz1ricj"))))
5521 (build-system python-build-system)
5523 ;; Python 3 support is in `python3-openid`, a separate package.
5524 `(#:python ,python-2))
5525 (home-page "https://github.com/openid/python-openid")
5526 (synopsis "OpenID support for servers and consumers")
5527 (description "This library provides OpenID authentication for Python, both
5528 for clients and servers.")
5529 (license license:asl2.0)))
5531 (define-public python-urwidtrees
5533 (name "python-urwidtrees")
5538 ;; package author intends on distributing via github rather than pypi:
5539 ;; https://github.com/pazz/alot/issues/877#issuecomment-230173331
5540 (uri (string-append "https://github.com/pazz/urwidtrees/archive/"
5542 (file-name (string-append name "-" version ".tar.gz"))
5545 "0d30lyd3s2a97rhqfax5w9ssqds2z6aydqx3c6j2c2lk3cb4ngvh"))))
5546 (build-system python-build-system)
5548 '(#:tests? #f)) ; no tests
5549 (propagated-inputs `(("python-urwid" ,python-urwid)))
5550 (home-page "https://github.com/pazz/urwidtrees")
5551 (synopsis "Tree widgets for urwid")
5552 (description "Urwidtrees is a Widget Container API for the @code{urwid}
5553 toolkit. Use it to build trees of widgets.")
5554 (license license:gpl3+)))
5556 (define-public python2-urwidtrees
5557 (package-with-python2 python-urwidtrees))
5559 (define-public python-dbus
5561 (name "python-dbus")
5567 "https://dbus.freedesktop.org/releases/dbus-python/dbus-python-"
5570 (base32 "1py62qir966lvdkngg0v8k1khsqxwk5m4s8nflpk1agk5f5nqb71"))))
5571 (build-system gnu-build-system)
5574 (modify-phases %standard-phases
5578 ;; XXX: For the missing '/etc/machine-id'.
5579 (substitute* "test/run-test.sh"
5580 (("DBUS_FATAL_WARNINGS=1")
5581 "DBUS_FATAL_WARNINGS=0"))
5584 `(("pkg-config" ,pkg-config)))
5586 `(("python" ,python)
5587 ("dbus-glib" ,dbus-glib)))
5588 (synopsis "Python bindings for D-bus")
5589 (description "python-dbus provides bindings for libdbus, the reference
5590 implementation of D-Bus.")
5591 (home-page "http://www.freedesktop.org/wiki/Software/DBusBindings/")
5592 (license license:expat)))
5594 (define-public python2-dbus
5595 (package (inherit python-dbus)
5596 (name "python2-dbus")
5597 (inputs `(("python" ,python-2)
5598 ,@(alist-delete "python"
5599 (package-inputs python-dbus)
5601 ;; FIXME: on Python 2, the test_utf8 fails with:
5602 ;; "ValueError: unichr() arg not in range(0x10000) (narrow Python build)"
5603 (arguments `(#:tests? #f))))
5605 (define-public python-apsw
5607 (name "python-apsw")
5608 (version "3.9.2-r1")
5612 (uri (pypi-uri "apsw" version))
5615 "0w4jb0wpx785qw42r3h4fh7gl5w2968q48i7gygybsfxck8nzffs"))))
5616 (build-system python-build-system)
5618 `(("sqlite" ,sqlite)))
5621 (modify-phases %standard-phases
5623 (add-after 'install 'check
5624 (lambda* (#:key inputs outputs #:allow-other-keys)
5625 (add-installed-pythonpath inputs outputs)
5626 (zero? (system* "python" "setup.py" "test")))))))
5627 (home-page "https://github.com/rogerbinns/apsw/")
5628 (synopsis "Another Python SQLite Wrapper")
5629 (description "APSW is a Python wrapper for the SQLite
5630 embedded relational database engine. In contrast to other wrappers such as
5631 pysqlite it focuses on being a minimal layer over SQLite attempting just to
5632 translate the complete SQLite API into Python.")
5633 (license license:zlib)))
5635 (define-public python2-apsw
5636 (package-with-python2 python-apsw))
5638 (define-public python-lxml
5640 (name "python-lxml")
5645 (uri (pypi-uri "lxml" version))
5648 "1pvbmiy2m7jwv493kilbghhj2pkh8wy1na3ji350vhzhlwlclx4w"))))
5649 (build-system python-build-system)
5651 `(("libxml2" ,libxml2)
5652 ("libxslt" ,libxslt)))
5653 (home-page "http://lxml.de/")
5655 "Python XML processing library")
5657 "The lxml XML toolkit is a Pythonic binding for the C libraries
5658 libxml2 and libxslt.")
5659 (license license:bsd-3))) ; and a few more, see LICENSES.txt
5661 (define-public python2-lxml
5662 (package-with-python2 python-lxml))
5664 ;; beautifulsoup4 has a totally different namespace than 3.x,
5665 ;; and pypi seems to put it under its own name, so I guess we should too
5666 (define-public python-beautifulsoup4
5668 (name "python-beautifulsoup4")
5673 (uri (pypi-uri "beautifulsoup4" version))
5676 "0glaw1vyxnbp03fni7h5496n6iib0n5iim4gax1n0ngscs9s075j"))))
5677 (build-system python-build-system)
5680 (modify-phases %standard-phases
5681 ;; The Python 2 source is the definitive source of beautifulsoup4. We
5682 ;; must use this conversion script when building with Python 3. The
5683 ;; conversion script also runs the tests.
5684 ;; For more information, see the file 'convert-py3k' in the source
5687 (lambda _ (zero? (system* "./convert-py3k")))))))
5689 "http://www.crummy.com/software/BeautifulSoup/bs4/")
5691 "Python screen-scraping library")
5693 "Beautiful Soup is a Python library designed for rapidly setting up
5694 screen-scraping projects. It offers Pythonic idioms for navigating,
5695 searching, and modifying a parse tree, providing a toolkit for
5696 dissecting a document and extracting what you need. It automatically
5697 converts incoming documents to Unicode and outgoing documents to UTF-8.")
5698 (license license:expat)
5699 (properties `((python2-variant . ,(delay python2-beautifulsoup4))))))
5701 (define-public python2-beautifulsoup4
5703 (inherit (package-with-python2
5704 (strip-python2-variant python-beautifulsoup4)))
5705 (arguments `(#:python ,python-2))))
5707 (define-public python-cssutils
5709 (name "python-cssutils")
5714 (uri (pypi-uri "cssutils" version))
5717 "0qwha9x1wml2qmipbcz03gndnlwhzrjdvw9i09si247a90l8p8fq"))))
5718 (build-system python-build-system)
5720 `(("unzip" ,unzip))) ; for unpacking the source
5722 `(#:tests? #f)) ;tests require python-pbr < 1.7.0
5723 (home-page "http://cthedot.de/cssutils/")
5725 "CSS Cascading Style Sheets library for Python")
5727 "Cssutils is a Python package for parsing and building CSS
5728 Cascading Style Sheets. Currently it provides a DOM only and no rendering
5730 (license license:lgpl3+)))
5732 (define-public python2-cssutils
5733 (package-with-python2 python-cssutils))
5735 (define-public python-cssselect
5737 (name "python-cssselect")
5742 (uri (pypi-uri "cssselect" version))
5745 "1xg6gbva1yswghiycmgincv6ab4bn7hpm720ndbj40h8xycmnfvi"))))
5746 (build-system python-build-system)
5748 ;; tests fail with message
5749 ;; AttributeError: 'module' object has no attribute 'tests'
5752 "https://pythonhosted.org/cssselect/")
5754 "CSS3 selector parser and translator to XPath 1.0")
5756 "Cssselect ia a Python module that parses CSS3 Selectors and translates
5757 them to XPath 1.0 expressions. Such expressions can be used in lxml or
5758 another XPath engine to find the matching elements in an XML or HTML document.")
5759 (license license:bsd-3)))
5761 (define-public python2-cssselect
5762 (package-with-python2 python-cssselect))
5764 (define-public python-openid-cla
5766 (name "python-openid-cla")
5771 (uri (pypi-uri "python-openid-cla" version))
5774 "102hy2qisvjxp5s0v9lvwqi4f2dk0dhns40vjgn008yxc7k0h3cr"))))
5775 (build-system python-build-system)
5776 (arguments '(#:tests? #f)) ; No tests.
5777 (home-page "https://github.com/puiterwijk/python-openid-cla/")
5778 (synopsis "Implementation of the OpenID CLA extension for python-openid")
5779 (description "@code{openid-cla} is an implementation of the OpenID
5780 contributor license agreement extension for python-openid.")
5781 (license license:bsd-3)))
5783 (define-public python2-openid-cla
5784 (package-with-python2 python-openid-cla))
5786 (define-public python-openid-teams
5788 (name "python-openid-teams")
5793 (uri (pypi-uri "python-openid-teams" version))
5796 "05zrh78alav24rxkbqlpbad6d3x2nljk6z6j7kflxf3vdqa7w969"))))
5797 (build-system python-build-system)
5798 (arguments '(#:tests? #f)) ; No tests.
5799 (home-page "https://github.com/puiterwijk/python-openid-teams/")
5800 (synopsis "Implementation of the OpenID teams extension for python-openid")
5802 "@code{openid-teams} is an implementation of the OpenID
5803 teams extension for python-openid.")
5804 (license license:bsd-3)))
5806 (define-public python2-openid-teams
5807 (package-with-python2 python-openid-teams))
5809 (define-public python-netifaces
5811 (name "python-netifaces")
5817 "https://pypi.python.org/packages/source/n/netifaces/netifaces-"
5822 "1plw237a4zib4z8s62g0mrs8gm3kjfrp5sxh6bbk9nl3rdls2mln"))))
5823 (build-system python-build-system)
5825 "https://bitbucket.org/al45tair/netifaces")
5827 "Python module for portable network interface information")
5829 "Netifaces is a Python module providing information on network
5830 interfaces in an easy and portable manner.")
5831 (license license:expat)))
5833 (define-public python2-netifaces
5834 (package-with-python2 python-netifaces))
5836 (define-public python-networkx
5838 (name "python-networkx")
5843 (uri (pypi-uri "networkx" version))
5845 (base32 "1f74s56xb4ggixiq0vxyfxsfk8p20c7a099lpcf60izv1php03hd"))))
5846 (build-system python-build-system)
5847 ;; python-decorator is needed at runtime
5849 `(("python-decorator" ,python-decorator)))
5851 `(("python-nose" ,python-nose)))
5852 (home-page "http://networkx.github.io/")
5853 (synopsis "Python module for creating and manipulating graphs and networks")
5855 "NetworkX is a Python package for the creation, manipulation, and study
5856 of the structure, dynamics, and functions of complex networks.")
5857 (license license:bsd-3)))
5859 (define-public python2-networkx
5860 (package-with-python2 python-networkx))
5862 (define-public snakemake
5869 (uri (pypi-uri "snakemake" version))
5871 (base32 "0qcp7y9csvanyzh08jppryhd5di8r1z7p0d4wkfg5591pj3bb8zp"))))
5872 (build-system python-build-system)
5874 ;; TODO: Package missing test dependencies.
5877 `(("python-wrapt" ,python-wrapt)
5878 ("python-requests" ,python-requests)))
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 "0wl4cnmp06lfxqjxaan58bqxn27smhydz0sg5prrfbl3bsw4gv6q"))))
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 "https://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 "0cqfhr1km2s5d8jm6hbwgkrrj9hvkjf2gab3s2axlrw1clgaij0a"))))
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 "19l1xrjn4l9gjz01s3vg92gn2dd9d8mw1v86ppkzlnr9m5iwwc05"))))
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 "14id6wxi12lgyw0mg3bcfnf888ad07jz9yj46gfzhn186z8rcn4y"))))
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")
6868 (uri (pypi-uri "wrapt" version))
6871 "0wrcm1mydvfivbkzz0h81ygzdchnscshi6xvy5n3r21r9s0px8af"))))
6872 (build-system python-build-system)
6874 ;; Tests are not included in the tarball, they are only available in the
6877 (home-page "https://github.com/GrahamDumpleton/wrapt")
6878 (synopsis "Module for decorators, wrappers and monkey patching")
6880 "The aim of the wrapt module is to provide a transparent object proxy for
6881 Python, which can be used as the basis for the construction of function
6882 wrappers and decorator functions.")
6883 (license license:bsd-2)))
6885 (define-public python2-wrapt
6886 (package-with-python2 python-wrapt))
6888 (define-public python-iso8601
6890 (name "python-iso8601")
6895 (uri (pypi-uri "iso8601" version))
6898 "0c7gh3lsdjds262h0v1sqc66l7hqgfwbakn96qrhdbl0i3vm5yz8"))))
6899 (build-system python-build-system)
6901 `(("python-pytest" ,python-pytest)))
6902 (home-page "https://bitbucket.org/micktwomey/pyiso8601")
6903 (synopsis "Module to parse ISO 8601 dates")
6905 "This module parses the most common forms of ISO 8601 date strings (e.g.
6906 @code{2007-01-14T20:34:22+00:00}) into @code{datetime} objects.")
6907 (license license:expat)))
6909 (define-public python2-iso8601
6910 (package-with-python2 python-iso8601))
6912 (define-public python-monotonic
6914 (name "python-monotonic")
6920 "https://pypi.python.org/packages/source/m/monotonic/monotonic-"
6925 "0yz0bcbwx8r2c01czzfpbrxddynxyk9k95jj8h6sgcb7xmfvl998"))))
6926 (build-system python-build-system)
6927 (home-page "https://github.com/atdt/monotonic")
6928 (synopsis "Implementation of time.monotonic() for Python 2 & < 3.3")
6930 "This module provides a monotonic() function which returns the value (in
6931 fractional seconds) of a clock which never goes backwards.")
6932 (license license:asl2.0)))
6934 (define-public python2-monotonic
6935 (package-with-python2 python-monotonic))
6937 (define-public python-webob
6939 (name "python-webob")
6944 (uri (pypi-uri "WebOb" version))
6947 "02bhhzijfhv8hmi1i54d4b0v43liwhnywhflvxsv4x3zax9s3afq"))))
6948 (build-system python-build-system)
6950 `(("python-nose" ,python-nose)))
6951 (home-page "http://webob.org/")
6952 (synopsis "WSGI request and response object")
6954 "WebOb provides wrappers around the WSGI request environment, and an
6955 object to help create WSGI responses.")
6956 (license license:expat)))
6958 (define-public python2-webob
6959 (package-with-python2 python-webob))
6961 (define-public python-xlrd
6963 (name "python-xlrd")
6967 (uri (pypi-uri "xlrd" version))
6970 "0s8hjiz01vbhy85xalrz0qlsmd9ypf36zjqrf97hh984spapvy0g"))))
6971 (build-system python-build-system)
6974 (modify-phases %standard-phases
6975 ;; Current test in setup.py does not work as of 1.0.0, so use nose to
6976 ;; run tests instead for now.
6977 (replace 'check (lambda _ (zero? (system* "nosetests")))))))
6978 (native-inputs `(("python-nose" ,python-nose)))
6979 (home-page "http://www.python-excel.org/")
6980 (synopsis "Library for extracting data from Excel files")
6981 (description "This packages provides a library to extract data from
6982 spreadsheets using Microsoft Excel proprietary file formats @samp{.xls} and
6983 @samp{.xlsx} (versions 2.0 onwards). It has support for Excel dates and is
6984 Unicode-aware. It is not intended as an end-user tool.")
6985 (license license:bsd-3)))
6987 (define-public python2-xlrd
6988 (package-with-python2 python-xlrd))
6990 (define-public python-prettytable
6992 (name "python-prettytable")
6998 "https://pypi.python.org/packages/source/P/PrettyTable/"
6999 "prettytable-" version ".tar.bz2"))
7002 "0diwsicwmiq2cpzpxri7cyl5fmsvicafw6nfqf6p6p322dji2g45"))))
7003 (build-system python-build-system)
7004 (home-page "http://code.google.com/p/prettytable/")
7005 (synopsis "Display tabular data in an ASCII table format")
7007 "A library designed to represent tabular data in visually appealing ASCII
7008 tables. PrettyTable allows for selection of which columns are to be printed,
7009 independent alignment of columns (left or right justified or centred) and
7010 printing of sub-tables by specifying a row range.")
7011 (license license:bsd-3)))
7013 (define-public python2-prettytable
7014 (package-with-python2 python-prettytable))
7016 (define-public python-tables
7018 (name "python-tables")
7023 (uri (pypi-uri "tables" version))
7026 "117s6w7s3yxafpmf3zz3svana7xfrsviw01va1xp7h8ylx8v6r1m"))
7027 (modules '((guix build utils)))
7030 ;; Remove pre-compiled .pyc files from source.
7031 (for-each delete-file-recursively
7032 (find-files "." "__pycache__" #:directories? #t))
7033 (for-each delete-file (find-files "." "\\.pyc$"))
7035 (build-system python-build-system)
7037 `(;; FIXME: python-build-system does not pass configure-flags to "build"
7038 ;; or "check", so we must override the build and check phases.
7040 (modify-phases %standard-phases
7041 (add-after 'unpack 'use-gcc
7043 (substitute* "setup.py"
7044 (("compiler = new_compiler\\(\\)" line)
7046 "\ncompiler.set_executables(compiler='gcc',"
7047 "compiler_so='gcc',"
7049 "linker_so='gcc -shared')")))
7052 (lambda* (#:key inputs #:allow-other-keys)
7053 (zero? (system* "python" "setup.py" "build"
7054 (string-append "--hdf5="
7055 (assoc-ref inputs "hdf5"))))))
7057 (lambda* (#:key inputs #:allow-other-keys)
7058 (zero? (system* "python" "setup.py" "check"
7059 (string-append "--hdf5="
7060 (assoc-ref inputs "hdf5")))))))))
7062 `(("python-numexpr" ,python-numexpr)
7063 ("python-numpy" ,python-numpy)))
7065 `(("python-cython" ,python-cython)
7066 ("pkg-config" ,pkg-config)))
7071 (home-page "http://www.pytables.org/")
7072 (synopsis "Hierarchical datasets for Python")
7073 (description "PyTables is a package for managing hierarchical datasets and
7074 designed to efficently cope with extremely large amounts of data.")
7075 (license license:bsd-3)))
7077 (define-public python2-tables
7078 (package-with-python2 python-tables))
7080 (define-public python-pyasn1
7082 (name "python-pyasn1")
7087 (uri (pypi-uri "pyasn1" version))
7090 "0zraxni14bqi20kr4bi6nwsh32aibz0fq0xaczfisw0zdpcsqg45"))))
7091 (build-system python-build-system)
7092 (home-page "http://pyasn1.sourceforge.net/")
7093 (synopsis "ASN.1 types and codecs")
7095 "This is an implementation of ASN.1 types and codecs in Python. It is
7096 suitable for a wide range of protocols based on the ASN.1 specification.")
7097 (license license:bsd-2)))
7099 (define-public python2-pyasn1
7100 (package-with-python2 python-pyasn1))
7102 (define-public python-pyasn1-modules
7104 (name "python-pyasn1-modules")
7109 (uri (pypi-uri "pyasn1-modules" version))
7112 "0drqgw81xd3fxdlg89kgd79zzrabvfncvkbybi2wr6w2y4s1jmhh"))))
7113 (build-system python-build-system)
7115 `(("python-pyasn1" ,python-pyasn1)))
7116 (home-page "https://sourceforge.net/projects/pyasn1/")
7117 (synopsis "ASN.1 codec implementations")
7119 "Pyasn1-modules is a collection of Python modules providing ASN.1 types and
7120 implementations of ASN.1-based codecs and protocols.")
7121 (license license:bsd-3)))
7123 (define-public python2-pyasn1-modules
7124 (package-with-python2 python-pyasn1-modules))
7126 (define-public python-ipaddress
7128 (name "python-ipaddress")
7132 (uri (pypi-uri "ipaddress" version))
7135 "1q8klj9d84cmxgz66073x1j35cplr3r77vx1znhxiwl5w74391ax"))))
7136 (build-system python-build-system)
7137 (home-page "https://github.com/phihag/ipaddress")
7138 (synopsis "IP address manipulation library")
7140 "This package provides a fast, lightweight IPv4/IPv6 manipulation library
7141 in Python. This library is used to create, poke at, and manipulate IPv4 and
7142 IPv6 addresses and networks. This is a port of the Python 3.3 ipaddress
7143 module to older versions of Python.")
7144 (license license:psfl)))
7146 (define-public python2-ipaddress
7147 (package-with-python2 python-ipaddress))
7149 (define-public python2-ipaddr
7151 (name "python2-ipaddr")
7156 (uri (pypi-uri "ipaddr" version))
7158 (base32 "1dwq3ngsapjc93fw61rp17fvzggmab5x1drjzvd4y4q0i255nm8v"))))
7159 (build-system python-build-system)
7161 `(#:python ,python-2 ;version 2 only
7163 (modify-phases %standard-phases
7166 (zero? (system* "python" "ipaddr_test.py")))))))
7167 (home-page "https://github.com/google/ipaddr-py")
7168 (synopsis "IP address manipulation library")
7170 "Ipaddr is a Python@tie{}2 library for creating and manupilating IPv4 and
7171 IPv6 addresses and networks.
7173 For new implementations you may prefer to use the standard module
7174 @code{ipaddress}, which was introduced in Python 3.3 and backported to older
7175 versions of Python.")
7176 (license license:asl2.0)))
7178 (define-public python-idna
7180 (name "python-idna")
7185 (uri (string-append "https://pypi.python.org/packages/source/i/"
7186 "idna/idna-" version ".tar.gz"))
7189 "0frxgmgi234lr9hylg62j69j4ik5zhg0wz05w5dhyacbjfnrl68n"))))
7190 (build-system python-build-system)
7191 (home-page "https://github.com/kjd/idna")
7192 (synopsis "Internationalized domain names in applications")
7194 "This is a library to support the Internationalised Domain Names in
7195 Applications (IDNA) protocol as specified in RFC 5891. This version of the
7196 protocol is often referred to as “IDNA2008” and can produce different results
7197 from the earlier standard from 2003. The library is also intended to act as a
7198 suitable drop-in replacement for the “encodings.idna” module that comes with
7199 the Python standard library but currently only supports the older 2003
7201 (license license:bsd-4)))
7203 (define-public python2-idna
7204 (package-with-python2 python-idna))
7206 (define-public python-pretend
7208 (name "python-pretend")
7213 (uri (string-append "https://pypi.python.org/packages/source/p/"
7214 "pretend/pretend-" version ".tar.gz"))
7217 "0r5r7ygz9m6d2bklflbl84cqhjkc2q12xgis8268ygjh30g2q3wk"))))
7218 (build-system python-build-system)
7219 (home-page "https://github.com/alex/pretend")
7220 (synopsis "Library for stubbing in Python")
7222 "Pretend is a library to make stubbing with Python easier. Stubbing is a
7223 technique for writing tests. You may hear the term mixed up with mocks,
7224 fakes, or doubles. Basically, a stub is an object that returns pre-canned
7225 responses, rather than doing any computation.")
7226 (license license:bsd-3)))
7228 (define-public python2-pretend
7229 (package-with-python2 python-pretend))
7231 (define-public python-cryptography-vectors
7233 (name "python-cryptography-vectors")
7238 (uri (pypi-uri "cryptography_vectors" version))
7241 "1x2mz4wggja5ih45c6cw0kzyad4jr8avg327dawjr1gnpdq1psa7"))))
7242 (build-system python-build-system)
7243 (home-page "https://github.com/pyca/cryptography")
7244 (synopsis "Test vectors for the cryptography package")
7246 "This package contains test vectors for the cryptography package.")
7247 ;; Distributed under either BSD-3 or ASL2.0
7248 (license (list license:bsd-3 license:asl2.0))))
7250 (define-public python2-cryptography-vectors
7251 (package-with-python2 python-cryptography-vectors))
7253 (define-public python-cryptography
7255 (name "python-cryptography")
7260 (uri (pypi-uri "cryptography" version))
7263 "0k6v7wq4h0yk9r0x0bl2x9fyrg4a6gj5qp4m9mgpk6m481yyygwm"))))
7264 (build-system python-build-system)
7266 `(("openssl" ,openssl)))
7268 `(("python-cffi" ,python-cffi)
7269 ("python-six" ,python-six)
7270 ("python-pyasn1" ,python-pyasn1)
7271 ("python-idna" ,python-idna)
7272 ("python-iso8601" ,python-iso8601)))
7274 `(("python-cryptography-vectors" ,python-cryptography-vectors)
7275 ("python-hypothesis" ,python-hypothesis)
7276 ("python-pretend" ,python-pretend)
7277 ("python-pyasn1" ,python-pyasn1)
7278 ("python-pyasn1-modules" ,python-pyasn1-modules)
7279 ("python-pytz" ,python-pytz)
7280 ("python-pytest" ,python-pytest-2.9.2)))
7281 (home-page "https://github.com/pyca/cryptography")
7282 (synopsis "Cryptographic recipes and primitives for Python")
7284 "cryptography is a package which provides cryptographic recipes and
7285 primitives to Python developers. It aims to be the “cryptographic standard
7286 library” for Python. The package includes both high level recipes, and low
7287 level interfaces to common cryptographic algorithms such as symmetric ciphers,
7288 message digests and key derivation functions.")
7289 ;; Distributed under either BSD-3 or ASL2.0
7290 (license (list license:bsd-3 license:asl2.0))
7291 (properties `((python2-variant . ,(delay python2-cryptography))))))
7293 (define-public python2-cryptography
7294 (let ((crypto (package-with-python2
7295 (strip-python2-variant python-cryptography))))
7296 (package (inherit crypto)
7298 `(("python2-ipaddress" ,python2-ipaddress)
7299 ("python2-backport-ssl-match-hostname"
7300 ,python2-backport-ssl-match-hostname)
7301 ("python2-enum34" ,python2-enum34)
7302 ,@(package-propagated-inputs crypto))))))
7304 (define-public python-pyopenssl
7306 (name "python-pyopenssl")
7311 (uri (pypi-uri "pyOpenSSL" version))
7314 "0vji4yrfshs15xpczbhzhasnjrwcarsqg87n98ixnyafnyxs6ybp"))
7316 (search-patches "python-pyopenssl-skip-network-test.patch"))))
7317 (build-system python-build-system)
7320 (modify-phases %standard-phases
7322 (add-after 'install 'check
7323 (lambda* (#:key inputs outputs #:allow-other-keys)
7324 (add-installed-pythonpath inputs outputs)
7325 (zero? (system* "py.test" "-v")))))))
7327 `(("python-cryptography" ,python-cryptography)
7328 ("python-six" ,python-six)))
7330 `(("openssl" ,openssl)))
7332 `(("python-pytest" ,python-pytest)))
7333 (home-page "https://github.com/pyca/pyopenssl")
7334 (synopsis "Python wrapper module around the OpenSSL library")
7336 "PyOpenSSL is a high-level wrapper around a subset of the OpenSSL
7338 (license license:asl2.0)))
7340 (define-public python2-pyopenssl
7341 (package-with-python2 python-pyopenssl))
7343 (define-public python-pip
7350 (uri (pypi-uri "pip" version))
7353 "03clr9c1dih5n9c00c592zzvf6r1ffimywkaq9agcqdllzhl7wh9"))))
7354 (build-system python-build-system)
7356 '(#:tests? #f)) ; there are no tests in the pypi archive.
7357 (home-page "https://pip.pypa.io/")
7358 (synopsis "Package manager for Python software")
7360 "Pip is a package manager for Python software, that finds packages on the
7361 Python Package Index (PyPI).")
7362 (license license:expat)))
7364 (define-public python2-pip
7365 (package-with-python2 python-pip))
7367 (define-public python-tlsh
7369 (name "python-tlsh")
7371 (home-page "https://github.com/trendmicro/tlsh")
7374 (uri (string-append "https://github.com/trendmicro/tlsh/archive/v"
7378 "00bhzjqrlh7v538kbkbn8lgx976j1138al3sdhklaizqjvpwyk4r"))
7379 (file-name (string-append name "-" version ".tar.gz"))))
7380 (build-system cmake-build-system)
7382 '(#:out-of-source? #f
7383 #:phases (modify-phases %standard-phases
7386 (lambda* (#:key outputs #:allow-other-keys)
7387 ;; Build and install the Python bindings. The underlying
7388 ;; C++ library is apparently not meant to be installed.
7389 (let ((out (assoc-ref outputs "out")))
7390 (with-directory-excursion "py_ext"
7391 (and (system* "python" "setup.py" "build")
7392 (system* "python" "setup.py" "install"
7393 (string-append "--prefix=" out))))))))))
7394 (inputs `(("python" ,python-wrapper))) ;for the bindings
7395 (synopsis "Fuzzy matching library for Python")
7397 "Trend Micro Locality Sensitive Hash (TLSH) is a fuzzy matching library.
7398 Given a byte stream with a minimum length of 256 bytes, TLSH generates a hash
7399 value which can be used for similarity comparisons. Similar objects have
7400 similar hash values, which allows for the detection of similar objects by
7401 comparing their hash values. The byte stream should have a sufficient amount
7402 of complexity; for example, a byte stream of identical bytes will not generate
7404 (license license:asl2.0)))
7406 (define-public python2-tlsh
7408 (inherit python-tlsh)
7409 (name "python2-tlsh")
7410 (inputs `(("python" ,python-2)))))
7412 (define-public python-termcolor
7414 (name "python-termcolor")
7419 (uri (pypi-uri "python-termcolor" version))
7422 "0fv1vq14rpqwgazxg4981904lfyp84mnammw7y046491cv76jv8x"))))
7423 (build-system python-build-system)
7425 ;; There are no tests.
7427 (home-page "http://pypi.python.org/pypi/termcolor")
7428 (synopsis "ANSII Color formatting for terminal output")
7430 "This package provides ANSII Color formatting for output in terminals.")
7431 (license license:expat)))
7433 (define-public python2-termcolor
7434 (package-with-python2 python-termcolor))
7436 (define-public python-libarchive-c
7438 (name "python-libarchive-c")
7442 (uri (pypi-uri "libarchive-c" version))
7445 "0z4r7v3dhd6b3120mav05ff08srih176r2rg5k8kn7mjd9pslm2x"))))
7446 (build-system python-build-system)
7448 '(#:phases (modify-phases %standard-phases
7450 'build 'reference-libarchive
7451 (lambda* (#:key inputs #:allow-other-keys)
7452 ;; Retain the absolute file name of libarchive.so.
7453 (let ((libarchive (assoc-ref inputs "libarchive")))
7454 (substitute* "libarchive/ffi.py"
7455 (("find_library\\('archive'\\)")
7456 (string-append "'" libarchive
7457 "/lib/libarchive.so'")))))))))
7459 `(("libarchive" ,libarchive)))
7460 (home-page "https://github.com/Changaco/python-libarchive-c")
7461 (synopsis "Python interface to libarchive")
7463 "This package provides Python bindings to libarchive, a C library to
7464 access possibly compressed archives in many different formats. It uses
7465 Python's @code{ctypes} foreign function interface (FFI).")
7466 (license license:lgpl2.0+)))
7468 (define-public python2-libarchive-c
7469 (package-with-python2 python-libarchive-c))
7471 (define-public python-file
7474 (name "python-file")
7476 (inherit (package-source file))
7477 ;; This patch should not be applied to python2-file.
7478 (patches (search-patches "python-file-double-encoding-bug.patch"))))
7479 (build-system python-build-system)
7481 '(#:tests? #f ;no tests
7482 #:configure-flags '("--single-version-externally-managed" "--root=/")
7483 #:phases (modify-phases %standard-phases
7484 (add-before 'build 'change-directory
7488 (add-before 'build 'set-library-file-name
7489 (lambda* (#:key inputs #:allow-other-keys)
7490 (let ((file (assoc-ref inputs "file")))
7491 (substitute* "magic.py"
7492 (("find_library\\('magic'\\)")
7493 (string-append "'" file "/lib/libmagic.so'")))
7495 (inputs `(("file" ,file)))
7496 (self-native-input? #f)
7497 (synopsis "Python bindings to the libmagic file type guesser. Note that
7498 this module and the python-magic module both provide a \"magic.py\" file;
7499 these two modules, which are different and were developed separately, both
7500 serve the same purpose: provide Python bindings for libmagic.")))
7502 (define-public python2-file
7503 (package-with-python2 python-file))
7505 (define-public python-debian
7507 (name "python-debian")
7512 (uri (pypi-uri name version))
7515 "0i15f0xzx679sd0ldq2sls9pnnps9fv6vhqvnv9dzf4qhma42i0y"))))
7516 (build-system python-build-system)
7518 `(("python-six" ,python-six)))
7519 (home-page "http://packages.debian.org/sid/python-debian")
7520 (synopsis "Debian package related modules")
7522 ;; XXX: Use @enumerate instead of @itemize to work around
7523 ;; <http://bugs.gnu.org/21772>.
7524 "This package provides Python modules that abstract many formats of
7525 Debian-related files, such as:
7528 @item Debtags information;
7529 @item @file{debian/changelog} files;
7530 @item packages files, pdiffs;
7531 @item control files of single or multiple RFC822-style paragraphs---e.g.
7532 @file{debian/control}, @file{.changes}, @file{.dsc};
7533 @item Raw @file{.deb} and @file{.ar} files, with (read-only) access to
7534 contained files and meta-information.
7537 ;; Modules are either GPLv2+ or GPLv3+.
7538 (license license:gpl3+)))
7540 (define-public python2-debian
7541 (package-with-python2 python-debian))
7543 (define-public python-nbformat
7545 (name "python-nbformat")
7550 (uri (pypi-uri "nbformat" version))
7553 "0mq8iki3d4mnx7wy05phss7x98mds4fqydin8lcagidp1knw1xnv"))))
7554 (build-system python-build-system)
7555 (arguments `(#:tests? #f)) ; no test target
7557 `(("python-ipython-genutils" ,python-ipython-genutils)
7558 ("python-jsonschema" ,python-jsonschema)
7559 ("python-jupyter-core" ,python-jupyter-core)
7560 ("python-traitlets" ,python-traitlets)))
7561 (home-page "http://jupyter.org")
7562 (synopsis "Jupyter Notebook format")
7563 (description "This package provides the reference implementation of the
7564 Jupyter Notebook format and Python APIs for working with notebooks.")
7565 (license license:bsd-3)))
7567 (define-public python2-nbformat
7568 (package-with-python2 python-nbformat))
7570 (define-public python-bleach
7572 (name "python-bleach")
7577 (uri (pypi-uri "bleach" version))
7580 "0jvg3jxrvnx7xmm9gj262v60ib452xlnwlb0navyp7jsvcd0d4qj"))))
7581 (build-system python-build-system)
7583 `(("python-html5lib" ,python-html5lib-0.9)
7584 ("python-six" ,python-six)))
7586 `(("python-nose" ,python-nose)))
7587 (home-page "http://github.com/jsocol/bleach")
7588 (synopsis "Whitelist-based HTML-sanitizing tool")
7589 (description "Bleach is an easy whitelist-based HTML-sanitizing tool.")
7590 (license license:asl2.0)))
7592 (define-public python2-bleach
7593 (package-with-python2 python-bleach))
7595 (define-public python-entrypoints
7597 (name "python-entrypoints")
7602 (uri (string-append "https://github.com/takluyver/entrypoints/archive/"
7604 (file-name (string-append name "-" version ".tar.gz"))
7607 "0azqlkh3j0za080lsf5crnhaxx3c93k9dpv5ihkhf5cppgw5sjz5"))))
7608 (build-system python-build-system)
7609 ;; The package does not come with a setup.py file, so we have to generate
7614 (modify-phases %standard-phases
7615 (add-after 'unpack 'create-setup.py
7617 (call-with-output-file "setup.py"
7620 from setuptools import setup
7621 setup(name='entrypoints', version='~a', py_modules=['entrypoints'])
7623 (home-page "https://github.com/takluyver/entrypoints")
7624 (synopsis "Discover and load entry points from installed Python packages")
7625 (description "Entry points are a way for Python packages to advertise
7626 objects with some common interface. The most common examples are
7627 @code{console_scripts} entry points, which define shell commands by
7628 identifying a Python function to run. The @code{entrypoints} module contains
7629 functions to find and load entry points.")
7630 (license license:expat)))
7632 (define-public python2-entrypoints
7633 (package-with-python2 python-entrypoints))
7635 (define-public python-nbconvert
7637 (name "python-nbconvert")
7642 (uri (pypi-uri "nbconvert" version))
7645 "0brclbb18l4nmd5qy3dl9wn05rjdh1fz4rmzdlfqacj12rcdvdgp"))))
7646 (build-system python-build-system)
7648 `(;; The "bdist_egg" target is disabled by default, causing the installation
7650 #:configure-flags (list "bdist_egg")
7651 ;; FIXME: 5 failures, 40 errors.
7654 ;; (modify-phases %standard-phases
7657 ;; (zero? (system* "py.test" "-v")))))
7659 `(("python-pytest" ,python-pytest)))
7661 `(("python-bleach" ,python-bleach)
7662 ("python-entrypoints" ,python-entrypoints)
7663 ("python-jinja2" ,python-jinja2)
7664 ("python-jupyter-core" ,python-jupyter-core)
7665 ("python-mistune" ,python-mistune)
7666 ("python-nbformat" ,python-nbformat)
7667 ("python-pygments" ,python-pygments)
7668 ("python-traitlets" ,python-traitlets)))
7669 (home-page "http://jupyter.org")
7670 (synopsis "Converting Jupyter Notebooks")
7671 (description "The @code{nbconvert} tool, @{jupyter nbconvert}, converts
7672 notebooks to various other formats via Jinja templates. It allows you to
7673 convert an @code{.ipynb} notebook file into various static formats including:
7681 @item ReStructured Text (rst)
7682 @item executable script
7684 (license license:bsd-3)))
7686 (define-public python2-nbconvert
7687 (package-with-python2 python-nbconvert))
7689 (define-public python-notebook
7691 (name "python-notebook")
7695 (uri (pypi-uri "notebook" version))
7698 "0laq5c2f21frq6xcdckgq7raqhznbjb0qs0357g612z87wyn1a9r"))))
7699 (build-system python-build-system)
7702 (modify-phases %standard-phases
7705 ;; HOME must be set for tests
7706 (setenv "HOME" "/tmp")
7707 (zero? (system* "nosetests")))))))
7709 `(("python-jupyter-core" ,python-jupyter-core)
7710 ("python-nbformat" ,python-nbformat)
7711 ("python-nbconvert" ,python-nbconvert)
7712 ("python-ipython" ,python-ipython)))
7714 `(("python-nose" ,python-nose)
7715 ("python-sphinx" ,python-sphinx)
7716 ("python-requests" ,python-requests)))
7717 (home-page "http://jupyter.org/")
7718 (synopsis "Web-based notebook environment for interactive computing")
7720 "The Jupyter HTML notebook is a web-based notebook environment for
7721 interactive computing.")
7722 (properties `((python2-variant . ,(delay python2-notebook))))
7723 (license license:bsd-3)))
7725 (define-public python2-notebook
7726 (let ((base (package-with-python2
7727 (strip-python2-variant python-notebook))))
7728 (package (inherit base)
7730 `(("python2-mock" ,python2-mock)
7731 ,@(package-native-inputs base)))
7733 (substitute-keyword-arguments (package-arguments base)
7735 `(modify-phases ,phases
7736 (add-before 'check 'disable-test-case
7737 ;; The test requires network access to localhost. Curiously it
7738 ;; fails with Python 2 only. Simply make the test-case return
7742 "notebook/services/nbconvert/tests/test_nbconvert_api.py"
7743 (("formats = self.nbconvert_api") "return #")))))))))))
7745 (define-public python-widgetsnbextension
7747 (name "python-widgetsnbextension")
7752 (uri (pypi-uri "widgetsnbextension" version))
7755 "0lff2mrwrgsa1mxmwx3phl9xvy0jqfpg6khbmxy53jbq56rwy666"))))
7756 (build-system python-build-system)
7758 `(("python-notebook" ,python-notebook)))
7760 `(("python-certifi" ,python-certifi)
7761 ("python-nose" ,python-nose)))
7762 (home-page "http://ipython.org")
7763 (synopsis "IPython HTML widgets for Jupyter")
7764 (description "This package provides interactive HTML widgets for Jupyter
7766 (license license:bsd-3)))
7768 (define-public python2-widgetsnbextension
7769 (package-with-python2 python-widgetsnbextension))
7771 (define-public python-ipywidgets
7773 (name "python-ipywidgets")
7778 (uri (pypi-uri "ipywidgets" version))
7781 "1lk0qrr5l9a0z7qkkn30hv5832whxwxymf1l576fmmad0n7hkxms"))))
7782 (build-system python-build-system)
7783 ;; FIXME: it's not clear how to run the tests.
7784 (arguments `(#:tests? #f))
7786 `(("python-ipykernel" ,python-ipykernel)
7787 ("python-ipython" ,python-ipython)
7788 ("python-traitlets" ,python-traitlets)
7789 ("python-widgetsnbextension" ,python-widgetsnbextension)))
7790 (home-page "http://ipython.org")
7791 (synopsis "IPython HTML widgets for Jupyter")
7792 (description "Ipywidgets are interactive HTML widgets for Jupyter
7793 notebooks and the IPython kernel. Notebooks come alive when interactive
7794 widgets are used. Users gain control of their data and can visualize changes
7796 (license license:bsd-3)))
7798 (define-public python2-ipywidgets
7799 (package-with-python2 python-ipywidgets))
7801 (define-public python-jupyter-console
7803 (name "python-jupyter-console")
7808 (uri (pypi-uri "jupyter_console" version))
7811 "04acmkwsi99rcg3vb54c6n492zv35s92h2ahabc0w6wj976cipvx"))))
7812 (build-system python-build-system)
7813 ;; FIXME: it's not clear how to run the tests.
7814 (arguments `(#:tests? #f))
7816 `(("python-ipykernel" ,python-ipykernel)
7817 ("python-ipython" ,python-ipython)
7818 ("python-jupyter-client" ,python-jupyter-client)
7819 ("python-prompt-toolkit" ,python-prompt-toolkit)
7820 ("python-pygments" ,python-pygments)))
7821 (home-page "https://jupyter.org")
7822 (synopsis "Jupyter terminal console")
7823 (description "This package provides a terminal-based console frontend for
7824 Jupyter kernels. It also allows for console-based interaction with non-Python
7825 Jupyter kernels such as IJulia and IRKernel.")
7826 (license license:bsd-3)))
7828 (define-public python2-jupyter-console
7829 (package-with-python2 python-jupyter-console))
7831 (define-public jupyter
7838 (uri (pypi-uri "jupyter" version))
7841 "0pwf3pminkzyzgx5kcplvvbvwrrzd3baa7lmh96f647k30rlpp6r"))))
7842 (build-system python-build-system)
7843 ;; FIXME: it's not clear how to run the tests.
7844 (arguments `(#:tests? #f))
7846 `(("python-ipykernel" ,python-ipykernel)
7847 ("python-ipywidgets" ,python-ipywidgets)
7848 ("python-jupyter-console" ,python-jupyter-console)
7849 ("python-nbconvert" ,python-nbconvert)
7850 ("python-notebook" ,python-notebook)))
7851 (home-page "http://jupyter.org")
7852 (synopsis "Web application for interactive documents")
7854 "The Jupyter Notebook is a web application that allows you to create and
7855 share documents that contain live code, equations, visualizations and
7856 explanatory text. Uses include: data cleaning and transformation, numerical
7857 simulation, statistical modeling, machine learning and much more.")
7858 (license license:bsd-3)))
7860 (define-public python-chardet
7862 (name "python-chardet")
7868 "https://pypi.python.org/packages/source/c/chardet/chardet-"
7873 "1ak87ikcw34fivcgiz2xvi938dmclh078az65l9x3rmgljrkhgp5"))))
7874 (build-system python-build-system)
7875 (home-page "https://github.com/chardet/chardet")
7876 (synopsis "Universal encoding detector for Python 2 and 3")
7878 "This package provides @code{chardet}, a Python module that can
7879 automatically detect a wide range of file encodings.")
7880 (license license:lgpl2.1+)))
7882 (define-public python2-chardet
7883 (package-with-python2 python-chardet))
7885 (define-public python-docopt
7887 (name "python-docopt")
7892 ;; The release on PyPI does not include tests.
7894 "https://github.com/docopt/docopt/archive/"
7896 (file-name (string-append name "-" version ".tar.gz"))
7899 "16bf890xbdz3m30rsv2qacklh2rdn1zrfspfnwzx9g7vwz8yw4r1"))))
7900 (build-system python-build-system)
7902 `(("python-pytest" ,python-pytest)))
7904 `(#:phases (alist-replace
7906 (lambda _ (zero? (system* "py.test")))
7908 (home-page "http://docopt.org")
7909 (synopsis "Command-line interface description language for Python")
7910 (description "This library allows the user to define a command-line
7911 interface from a program's help message rather than specifying it
7912 programatically with command-line parsers like @code{getopt} and
7914 (license license:expat)))
7916 (define-public python2-docopt
7917 (package-with-python2 python-docopt))
7919 (define-public python-zope-event
7921 (name "python-zope-event")
7926 (uri (string-append "https://pypi.python.org/packages/source/z"
7927 "/zope.event/zope.event-" version ".tar.gz"))
7930 "11p75zpfz3ffhz21nzx9wb23xs993ck5s6hkjcvhswwizni5jynw"))))
7931 (build-system python-build-system)
7932 (home-page "http://pypi.python.org/pypi/zope.event")
7933 (synopsis "Event publishing system for Python")
7934 (description "Zope.event provides an event publishing API, intended for
7935 use by applications which are unaware of any subscribers to their events. It
7936 is a simple event-dispatching system on which more sophisticated event
7937 dispatching systems can be built.")
7938 (license license:zpl2.1)))
7940 (define-public python2-zope-event
7941 (package-with-python2 python-zope-event))
7943 (define-public python-zope-interface
7945 (name "python-zope-interface")
7950 (uri (string-append "https://pypi.python.org/packages/source/z"
7951 "/zope.interface/zope.interface-" version ".tar.gz"))
7954 "0ks8h73b2g4bkad821qbv0wzjppdrwys33i7ka45ik3wxjg1l8if"))))
7955 (build-system python-build-system)
7957 `(("python-zope-event" ,python-zope-event)))
7958 (home-page "https://github.com/zopefoundation/zope.interface")
7959 (synopsis "Python implementation of the \"design by contract\"
7961 (description "Zope.interface provides an implementation of \"object
7962 interfaces\" for Python. Interfaces are a mechanism for labeling objects as
7963 conforming to a given API or contract.")
7964 (license license:zpl2.1)))
7966 (define-public python2-zope-interface
7967 (package-with-python2 python-zope-interface))
7969 (define-public python-zope-exceptions
7971 (name "python-zope-exceptions")
7976 (uri (string-append "https://pypi.python.org/packages/source/z"
7977 "/zope.exceptions/zope.exceptions-"
7981 "0zwxaaa66sqxg5k7zcrvs0fbg9ym1njnxnr28dfmchzhwjvwnfzl"))))
7982 (build-system python-build-system)
7984 '(#:tests? #f)) ; circular dependency with zope.testrunner
7986 `(("python-zope-interface" ,python-zope-interface)))
7987 (home-page "http://cheeseshop.python.org/pypi/zope.exceptions")
7988 (synopsis "Zope exceptions")
7989 (description "Zope.exceptions provides general-purpose exception types
7990 that have uses outside of the Zope framework.")
7991 (license license:zpl2.1)))
7993 (define-public python2-zope-exceptions
7994 (package-with-python2 python-zope-exceptions))
7996 (define-public python-zope-testing
7998 (name "python-zope-testing")
8003 (uri (string-append "https://pypi.python.org/packages/source/z"
8004 "/zope.testing/zope.testing-" version ".tar.gz"))
8007 "1yvglxhzvhl45mndvn9gskx2ph30zz1bz7rrlyfs62fv2pvih90s"))
8008 (modules '((guix build utils)))
8011 ;; Remove pre-compiled .pyc files backup files from source.
8012 (for-each delete-file (find-files "." "(\\.pyc|~)$"))
8014 (build-system python-build-system)
8016 `(("python-zope-exceptions" ,python-zope-exceptions)))
8018 `(("python-zope-interface" ,python-zope-interface)))
8019 (home-page "http://pypi.python.org/pypi/zope.testing")
8020 (synopsis "Zope testing helpers")
8021 (description "Zope.testing provides a number of testing utilities for HTML
8022 forms, HTTP servers, regular expressions, and more.")
8023 (license license:zpl2.1)))
8025 (define-public python2-zope-testing
8026 (package-with-python2 python-zope-testing))
8028 (define-public python-zope-testrunner
8030 (name "python-zope-testrunner")
8035 (uri (string-append "https://pypi.python.org/packages/source/z"
8036 "/zope.testrunner/zope.testrunner-"
8040 "1r7iqknhh55y45f64mz5hghgvzx34h1i11k350s0avx6q8gznja1"))))
8041 (build-system python-build-system)
8043 '(#:tests? #f)) ; FIXME: Tests can't find zope.interface.
8045 `(("python-six" ,python-six)
8046 ;("python-zope-interface" ,python-zope-interface)
8047 ("python-zope-exceptions" ,python-zope-exceptions)
8048 ("python-zope-testing" ,python-zope-testing)
8051 `(("python-zope-interface" ,python-zope-interface)))
8052 (home-page "http://pypi.python.org/pypi/zope.testrunner")
8053 (synopsis "Zope testrunner script")
8054 (description "Zope.testrunner provides a script for running Python
8056 (license license:zpl2.1)))
8058 (define-public python2-zope-testrunner
8059 (let ((base (package-with-python2 python-zope-testrunner)))
8063 (append (package-native-inputs base)
8064 `(("python2-subunit" ,python2-subunit)
8065 ("python2-mimeparse" ,python2-mimeparse)))))))
8067 (define-public python-zope-i18nmessageid
8069 (name "python-zope-i18nmessageid")
8075 "https://pypi.python.org/packages/source/z"
8076 "/zope.i18nmessageid/zope.i18nmessageid-"
8080 "1rslyph0klk58dmjjy4j0jxy21k03azksixc3x2xhqbkv97cmzml"))))
8081 (build-system python-build-system)
8082 (home-page "http://pypi.python.org/pypi/zope.i18nmessageid")
8083 (synopsis "Message identifiers for internationalization")
8084 (description "Zope.i18nmessageid provides facilities for declaring
8085 internationalized messages within program source text.")
8086 (license license:zpl2.1)))
8088 (define-public python2-zope-i18nmessageid
8089 (package-with-python2 python-zope-i18nmessageid))
8091 (define-public python-zope-schema
8093 (name "python-zope-schema")
8098 (uri (string-append "https://pypi.python.org/packages/source/z"
8099 "/zope.schema/zope.schema-" version ".tar.gz"))
8102 "1p943jdxb587dh7php4vx04qvn7b2877hr4qs5zyckvp5afhhank"))))
8103 (build-system python-build-system)
8105 '(#:tests? #f)) ; FIXME: Tests can't find zope.event.
8107 `(("python-zope-event" ,python-zope-event)
8108 ("python-zope-exceptions", python-zope-exceptions)
8109 ("python-zope-interface" ,python-zope-interface)))
8111 `(("python-zope-testing" ,python-zope-testing)
8112 ("python-coverage" ,python-coverage)
8113 ("python-nose" ,python-nose)))
8114 (home-page "http://pypi.python.org/pypi/zope.schema")
8115 (synopsis "Zope data schemas")
8116 (description "Zope.scheme provides extensions to zope.interface for
8117 defining data schemas.")
8118 (license license:zpl2.1)))
8120 (define-public python2-zope-schema
8121 (package-with-python2 python-zope-schema))
8123 (define-public python-zope-configuration
8125 (name "python-zope-configuration")
8129 (uri (string-append "https://pypi.python.org/packages/source/z"
8130 "/zope.configuration/zope.configuration-"
8134 "1x9dfqypgympnlm25p9m43xh4qv3p7d75vksv9pzqibrb4cggw5n"))))
8135 (build-system python-build-system)
8137 '(#:tests? #f)) ; FIXME: Tests can't find zope.interface.
8139 `(("python-zope-i18nmessageid" ,python-zope-i18nmessageid)
8140 ("python-zope-schema" ,python-zope-schema)))
8141 (home-page "http://pypi.python.org/pypi/zope.configuration")
8142 (synopsis "Zope Configuration Markup Language")
8143 (description "Zope.configuration implements ZCML, the Zope Configuration
8145 (license license:zpl2.1)))
8147 (define-public python2-zope-configuration
8148 (package-with-python2 python-zope-configuration))
8150 (define-public python-zope-proxy
8152 (name "python-zope-proxy")
8157 (uri (string-append "https://pypi.python.org/packages/source/z"
8158 "/zope.proxy/zope.proxy-" version ".tar.gz"))
8161 "0pqwwmvm1prhwv1ziv9lp8iirz7xkwb6n2kyj36p2h0ppyyhjnm4"))))
8162 (build-system python-build-system)
8164 '(#:tests? #f)) ; FIXME: Tests can't find zope.interface.
8166 `(("python-zope-interface" ,python-zope-interface)))
8167 (home-page "http://pypi.python.org/pypi/zope.proxy")
8168 (synopsis "Generic, transparent proxies")
8169 (description "Zope.proxy provides generic, transparent proxies for Python.
8170 Proxies are special objects which serve as mostly-transparent wrappers around
8171 another object, intervening in the apparent behavior of the wrapped object
8172 only when necessary to apply the policy (e.g., access checking, location
8173 brokering, etc.) for which the proxy is responsible.")
8174 (license license:zpl2.1)))
8176 (define-public python2-zope-proxy
8177 (package-with-python2 python-zope-proxy))
8179 (define-public python-zope-location
8181 (name "python-zope-location")
8186 (uri (string-append "https://pypi.python.org/packages/source/z"
8187 "/zope.location/zope.location-" version ".tar.gz"))
8190 "1nj9da4ksiyv3h8n2vpzwd0pb03mdsh7zy87hfpx72b6p2zcwg74"))))
8191 (build-system python-build-system)
8193 '(#:tests? #f)) ; FIXME: Tests can't find zope.interface.
8195 `(("python-zope-proxy" ,python-zope-proxy)
8196 ("python-zope-schema" ,python-zope-schema)))
8197 (home-page "http://pypi.python.org/pypi/zope.location/")
8198 (synopsis "Zope location library")
8199 (description "Zope.location implements the concept of \"locations\" in
8200 Zope3, which are are special objects that have a structural location.")
8201 (license license:zpl2.1)))
8203 (define-public python2-zope-location
8204 (package-with-python2 python-zope-location))
8206 (define-public python-zope-security
8208 (name "python-zope-security")
8213 (uri (string-append "https://pypi.python.org/packages/source/z"
8214 "/zope.security/zope.security-" version ".tar.gz"))
8217 "14zmf684amc0x32kq05yxnhfqd1cmyhafkw05gn81rn90zjv6ssy"))))
8218 (build-system python-build-system)
8220 '(#:tests? #f)) ; FIXME: Tests can't find zope.testrunner.
8222 `(("python-zope-i18nmessageid" ,python-zope-i18nmessageid)
8223 ("python-zope-proxy" ,python-zope-proxy)
8224 ("python-zope-schema" ,python-zope-schema)))
8226 `(("python-six" ,python-six)
8227 ("python-zope-component" ,python-zope-component)
8228 ("python-zope-configuration" ,python-zope-configuration)
8229 ("python-zope-location" ,python-zope-location)
8230 ("python-zope-testrunner" ,python-zope-testrunner)
8231 ("python-zope-testing" ,python-zope-testing)))
8232 (home-page "http://pypi.python.org/pypi/zope.security")
8233 (synopsis "Zope security framework")
8234 (description "Zope.security provides a generic mechanism to implement
8235 security policies on Python objects.")
8236 (license license:zpl2.1)))
8238 (define-public python2-zope-security
8239 (let ((zope-security (package-with-python2 python-zope-security)))
8240 (package (inherit zope-security)
8242 `(("python2-zope-testrunner" ,python2-zope-testrunner)
8244 "python-zope-testrunner"
8245 (package-propagated-inputs zope-security)))))))
8247 (define-public python-zope-component
8249 (name "python-zope-component")
8254 (uri (pypi-uri "zope.component" version))
8257 "1hlvzwj1kcfz1qms1dzhwsshpsf38z9clmyksb1gh41n8k3kchdv"))))
8258 (build-system python-build-system)
8260 ;; Skip tests due to circular dependency with python-zope-security.
8263 `(("python-zope-testing" ,python-zope-testing)))
8265 `(("python-zope-event" ,python-zope-event)
8266 ("python-zope-interface" ,python-zope-interface)
8267 ("python-zope-i18nmessageid" ,python-zope-i18nmessageid)
8268 ("python-zope-configuration" ,python-zope-configuration)))
8269 (home-page "https://github.com/zopefoundation/zope.component")
8270 (synopsis "Zope Component Architecture")
8271 (description "Zope.component represents the core of the Zope Component
8272 Architecture. Together with the zope.interface package, it provides
8273 facilities for defining, registering and looking up components.")
8274 (license license:zpl2.1)))
8276 (define-public python2-zope-component
8277 (package-with-python2 python-zope-component))
8279 (define-public python-pythondialog
8281 (name "python-pythondialog")
8286 (uri (pypi-uri "pythondialog" version))
8289 "1728ghsran47jczn9bhlnkvk5bvqmmbihabgif5h705b84r1272c"))))
8290 (build-system python-build-system)
8293 (modify-phases %standard-phases
8294 (add-after 'unpack 'patch-path
8295 (lambda* (#:key inputs #:allow-other-keys)
8296 (let* ((dialog (assoc-ref inputs "dialog")))
8297 ;; Since this library really wants to grovel the search path, we
8298 ;; must hardcode dialog's store path into it.
8299 (substitute* "dialog.py"
8300 (("os.getenv\\(\"PATH\", \":/bin:/usr/bin\"\\)")
8301 (string-append "os.getenv(\"PATH\") + \":" dialog "/bin\"")))
8303 #:tests? #f)) ; no test suite
8305 `(("dialog" ,dialog)))
8306 (home-page "http://pythondialog.sourceforge.net/")
8307 (synopsis "Python interface to the UNIX dialog utility")
8308 (description "A Python wrapper for the dialog utility. Its purpose is to
8309 provide an easy to use, pythonic and comprehensive Python interface to dialog.
8310 This allows one to make simple text-mode user interfaces on Unix-like systems")
8311 (license license:lgpl2.1)
8312 (properties `((python2-variant . ,(delay python2-pythondialog))))))
8314 (define-public python2-pythondialog
8315 (let ((base (package-with-python2 (strip-python2-variant python-pythondialog))))
8318 (version (package-version python-pythondialog))
8321 (uri (pypi-uri "python2-pythondialog" version))
8324 "0d8k7lxk50imdyx85lv8j98i4c93a71iwpapnl1506rpkbm9qvd9")))))))
8326 (define-public python-pyrfc3339
8328 (name "python-pyrfc3339")
8333 (uri (pypi-uri "pyRFC3339" version))
8336 "0dgm4l9y8jiax5cp6yxjd2i27cq8h33sh81n1wfbmnmqb32cdywd"))))
8337 (build-system python-build-system)
8339 `(("python-pytz" ,python-pytz)))
8341 `(("python-nose" ,python-nose)))
8342 (home-page "https://github.com/kurtraschke/pyRFC3339")
8343 (synopsis "Python timestamp library")
8344 (description "Python library for generating and parsing RFC 3339-compliant
8346 (license license:expat)))
8348 (define-public python2-pyrfc3339
8349 (package-with-python2 python-pyrfc3339))
8351 (define-public python-werkzeug
8353 (name "python-werkzeug")
8358 (uri (pypi-uri "Werkzeug" version))
8361 "1h5wycw8yj7q0grqsjnsqflmrlsdagvl2j4dsgdncci6mjc7fpa5"))))
8362 (build-system python-build-system)
8364 `(("python-pytest" ,python-pytest)))
8365 (home-page "http://werkzeug.pocoo.org/")
8366 (synopsis "Utilities for WSGI applications")
8367 (description "One of the most advanced WSGI utility modules. It includes a
8368 powerful debugger, full-featured request and response objects, HTTP utilities to
8369 handle entity tags, cache control headers, HTTP dates, cookie handling, file
8370 uploads, a powerful URL routing system and a bunch of community-contributed
8372 (license license:x11)))
8374 (define-public python2-werkzeug
8375 (package-with-python2 python-werkzeug))
8377 (define-public python-configobj
8379 (name "python-configobj")
8384 "https://pypi.python.org/packages/source/c/configobj/"
8385 "configobj-" version ".tar.gz"))
8388 "00h9rcmws03xvdlfni11yb60bz3kxfvsj6dg6nrpzj71f03nbxd2"))
8389 ;; Patch setup.py so it looks for python-setuptools, which is
8390 ;; required to parse the keyword 'install_requires' in setup.py.
8391 (patches (search-patches "python-configobj-setuptools.patch"))))
8392 (build-system python-build-system)
8394 `(("python-six" ,python-six)))
8395 (synopsis "Config file reading, writing and validation")
8396 (description "ConfigObj is a simple but powerful config file reader and
8397 writer: an ini file round tripper. Its main feature is that it is very easy to
8398 use, with a straightforward programmer’s interface and a simple syntax for
8400 (home-page "https://github.com/DiffSK/configobj")
8401 (license license:bsd-3)))
8403 (define-public python2-configobj
8404 (package-with-python2 python-configobj))
8406 (define-public python-configargparse
8408 (name "python-configargparse")
8413 "https://pypi.python.org/packages/source/C/ConfigArgParse/"
8414 "ConfigArgParse-" version ".tar.gz"))
8417 "19wh919gbdbzxzpagg52q3lm62yicm95ddlcx77dyjc1slyshl1v"))))
8418 (build-system python-build-system)
8420 ;; FIXME: Bug in test suite filed upstream:
8421 ;; https://github.com/bw2/ConfigArgParse/issues/32
8423 (synopsis "Replacement for argparse")
8424 (description "A drop-in replacement for argparse that allows options to also
8425 be set via config files and/or environment variables.")
8426 (home-page "https://github.com/bw2/ConfigArgParse")
8427 (license license:expat)))
8429 (define-public python2-configargparse
8430 (package-with-python2 python-configargparse))
8432 (define-public python-ndg-httpsclient
8434 (name "python-ndg-httpsclient")
8438 (uri (pypi-uri "ndg_httpsclient" version))
8441 "1b5qirv46v4dpnmfqviwq42mdwfcby4dxmz0i41wad2337pqf2aq"))))
8442 (build-system python-build-system)
8444 '(;; The tests appear to require networking.
8447 `(("python-pyopenssl" ,python-pyopenssl)))
8448 (synopsis "HTTPS support for Python's httplib and urllib2")
8449 (description "This is a HTTPS client implementation for httplib and urllib2
8450 based on PyOpenSSL. PyOpenSSL provides a more fully featured SSL implementation
8451 over the default provided with Python and importantly enables full verification
8453 (home-page "https://github.com/cedadev/ndg_httpsclient/")
8454 (license license:bsd-3)))
8456 ;; python2-openssl requires special care, so package-with-python2 is
8458 (define-public python2-ndg-httpsclient
8459 (package (inherit python-ndg-httpsclient)
8460 (name "python2-ndg-httpsclient")
8461 (arguments `(#:python ,python-2))
8463 `(("python2-pyopenssl" ,python2-pyopenssl)))))
8465 (define-public python-contextlib2
8467 (name "python-contextlib2")
8472 (uri (pypi-uri "contextlib2" version))
8475 "0cmp131dlh0d0zvw0aza1zd13glvngzk8lb4avks0hm7yxwdr9am"))))
8476 (build-system python-build-system)
8479 (modify-phases %standard-phases
8483 "python" "test_contextlib2.py" "-v")))))))
8484 (home-page "http://contextlib2.readthedocs.org/")
8485 (synopsis "Tools for decorators and context managers")
8486 (description "This module is primarily a backport of the Python
8487 3.2 contextlib to earlier Python versions. Like contextlib, it
8488 provides utilities for common tasks involving decorators and context
8489 managers. It also contains additional features that are not part of
8490 the standard library.")
8491 (license license:psfl)))
8493 (define-public python2-contextlib2
8494 (package-with-python2 python-contextlib2))
8496 (define-public python-texttable
8498 (name "python-texttable")
8503 (uri (pypi-uri "texttable" version))
8506 "1liiiydgkg37i46a418aw19fyf6z3ds51wdwwpyjbs12x0phhf4a"))))
8507 (build-system python-build-system)
8508 (arguments '(#:tests? #f)) ; no tests
8509 (home-page "https://github.com/foutaise/texttable/")
8510 (synopsis "Python module for creating simple ASCII tables")
8511 (description "Texttable is a Python module for creating simple ASCII
8513 (license license:lgpl2.1+)))
8515 (define-public python2-texttable
8516 (package-with-python2 python-texttable))
8518 (define-public python-websocket-client
8520 (name "python-websocket-client")
8525 (uri (pypi-uri "websocket_client" version))
8528 "0h9glp1jll3z76ly3kg08aqgxqk0a68p4zi9yn50353bh5nj92v7"))))
8529 (build-system python-build-system)
8531 `(("python-six" ,python-six)))
8532 (home-page "https://github.com/liris/websocket-client")
8533 (synopsis "WebSocket client for Python")
8534 (description "The Websocket-client module provides the low level APIs for
8535 WebSocket usage in Python programs.")
8536 (license license:lgpl2.1+)))
8538 (define-public python2-websocket-client
8539 (package-with-python2 python-websocket-client))
8541 (define-public python-atomicwrites
8543 (name "python-atomicwrites")
8547 (uri (pypi-uri "atomicwrites" version))
8550 "11bm90fwm2avvf4f3ib8g925w7jr4m11vcsinn1bi6ns4bm32214"))))
8551 (build-system python-build-system)
8552 (synopsis "Atomic file writes in Python")
8553 (description "Library for atomic file writes using platform dependent tools
8554 for atomic file system operations.")
8555 (home-page "https://github.com/untitaker/python-atomicwrites")
8556 (license license:expat)))
8558 (define-public python2-atomicwrites
8559 (package-with-python2 python-atomicwrites))
8561 (define-public python-requests-toolbelt
8563 (name "python-requests-toolbelt")
8568 "https://pypi.python.org/packages/"
8569 "e1/a4/a94c037bc72ad70441aff1403d3243510d2542ddca7759faaeffeb11aefe/"
8570 "requests-toolbelt-" version ".tar.gz"))
8573 "15q9nrgp85nqlr4kdz1zvj8z2npafi2sr12y7fqgxbkq28j1aci6"))))
8574 (build-system python-build-system)
8576 `(("python-betamax" ,python-betamax)
8577 ("python-mock" ,python-mock)
8578 ("python-pytest" ,python-pytest)))
8580 `(("python-requests" ,python-requests)))
8581 (synopsis "Extensions to python-requests")
8582 (description "This is a toolbelt of useful classes and functions to be used
8583 with python-requests.")
8584 (home-page "https://github.com/sigmavirus24/requests-toolbelt")
8585 (license license:asl2.0)))
8587 (define-public python-click-threading
8589 (name "python-click-threading")
8594 "https://pypi.python.org/packages/"
8595 "fe/b7/e7f609d18a2a351cb71616adcf54df1acd82f83cb9b5936935a4d20e2c23/"
8596 "click-threading-" version ".tar.gz"))
8599 "18bcqikxwb3drb8rf60cclxkxw52521b38ax3byah6j8cn8y9p4j"))))
8600 (build-system python-build-system)
8602 `(("python-click" ,python-click)))
8603 (synopsis "Utilities for multithreading in Click")
8604 (description "This package provides utilities for multithreading in Click
8606 (home-page "https://github.com/click-contrib/click-threading")
8607 (license license:expat)))
8609 (define-public python-click-log
8611 (name "python-click-log")
8615 (uri (pypi-uri "click-log" version))
8618 "14ikfjfgnzf21mjniq9lfk2igzykgzfvwwrk85nw2b9fq44109sp"))))
8619 (build-system python-build-system)
8621 `(("python-click" ,python-click)))
8622 (synopsis "Logging for click applications")
8623 (description "This package provides a Python library for logging Click
8625 (home-page "https://github.com/click-contrib/click-log")
8626 (license license:expat)))
8628 (define-public python-apipkg
8630 (name "python-apipkg")
8634 (uri (pypi-uri "apipkg" version))
8637 "1iks5701qnp3dlr3q1d9qm68y2plp2m029irhpz92a44psfkjf1f"))))
8638 (build-system python-build-system)
8640 `(("python-pytest" ,python-pytest)))
8641 (synopsis "Namespace control and lazy-import mechanism")
8642 (description "With apipkg you can control the exported namespace of a Python
8643 package and greatly reduce the number of imports for your users. It is a small
8644 pure Python module that works on virtually all Python versions.")
8645 (home-page "https://bitbucket.org/hpk42/apipkg")
8646 (license license:expat)))
8648 (define-public python2-apipkg
8649 (package-with-python2 python-apipkg))
8651 (define-public python-execnet
8653 (name "python-execnet")
8657 (uri (pypi-uri "execnet" version))
8660 "1rpk1vyclhg911p3hql0m0nrpq7q7mysxnaaw6vs29cpa6kx8vgn"))))
8661 (build-system python-build-system)
8663 `(;; 2 failed, 275 passed, 670 skipped, 4 xfailed
8664 ;; The two test failures are caused by the lack of an `ssh` executable.
8665 ;; The test suite can be run with pytest after the 'install' phase.
8668 `(("python-pytest" ,python-pytest)
8669 ("python-setuptools-scm" ,python-setuptools-scm)))
8671 `(("python-apipkg" ,python-apipkg)))
8672 (synopsis "Rapid multi-Python deployment")
8673 (description "Execnet provides a share-nothing model with
8674 channel-send/receive communication for distributing execution across many
8675 Python interpreters across version, platform and network barriers. It has a
8676 minimal and fast API targetting the following uses:
8678 @item distribute tasks to (many) local or remote CPUs
8679 @item write and deploy hybrid multi-process applications
8680 @item write scripts to administer multiple environments
8682 (home-page "http://codespeak.net/execnet/")
8683 (license license:expat)))
8685 (define-public python2-execnet
8686 (package-with-python2 python-execnet))
8688 (define-public python-trollius-redis
8690 (name "python-trollius-redis")
8695 (uri (pypi-uri "trollius_redis" version))
8698 "0k3vypszmgmaipgw9xscvgm79h2zd6p6ci8gdp5sxl6g5kbqr9fy"))))
8699 (build-system python-build-system)
8700 ;; TODO: Tests require packaging 'hiredis'.
8701 (arguments '(#:tests? #f))
8702 (home-page "https://github.com/benjolitz/trollius-redis")
8703 (synopsis "Port of asyncio-redis to trollius")
8704 (description "@code{trollius-redis} is a Redis client for Python
8705 trollius. It is an asynchronious IO (PEP 3156) implementation of the
8707 (license license:bsd-2)))
8709 (define-public python2-trollius-redis
8710 (package-with-python2 python-trollius-redis))
8712 ;;; The software provided by this package was integrated into pytest 2.8.
8713 (define-public python-pytest-cache
8715 (name "python-pytest-cache")
8719 (uri (pypi-uri "pytest-cache" version))
8722 "1a873fihw4rhshc722j4h6j7g3nj7xpgsna9hhg3zn6ksknnhx5y"))))
8723 (build-system python-build-system)
8725 `(("python-apipkg" ,python-apipkg)
8726 ("python-execnet" ,python-execnet)
8727 ("python-py" ,python-py)
8728 ("python-pytest" ,python-pytest)))
8729 (synopsis "Py.test plugin with mechanisms for caching across test runs")
8730 (description "The pytest-cache plugin provides tools to rerun failures from
8731 the last py.test invocation.")
8732 (home-page "https://bitbucket.org/hpk42/pytest-cache/")
8733 (license license:expat)))
8735 (define-public python2-pytest-cache
8736 (package-with-python2 python-pytest-cache))
8738 (define-public python-pytest-localserver
8740 (name "python-pytest-localserver")
8744 (uri (pypi-uri "pytest-localserver" version))
8747 "0dvqspjr6va55zwmnnc2mmpqc7mm65kxig9ya44x1z8aadzxpa4p"))))
8748 (build-system python-build-system)
8750 `(#:phases (modify-phases %standard-phases
8753 (zero? (system* "py.test" "--genscript=runtests.py"))
8754 (zero? (system* "py.test")))))))
8756 `(("python-pytest" ,python-pytest)
8757 ("python-requests" ,python-requests)
8758 ("python-six" ,python-six)))
8760 `(("python-werkzeug" ,python-werkzeug)))
8761 (synopsis "Py.test plugin to test server connections locally")
8762 (description "Pytest-localserver is a plugin for the pytest testing
8763 framework which enables you to test server connections locally.")
8764 (home-page "https://pypi.python.org/pypi/pytest-localserver")
8765 (license license:expat)))
8767 (define-public python-wsgi-intercept
8769 (name "python-wsgi-intercept")
8774 "https://pypi.python.org/packages/"
8775 "38/76/ebcbc24d0cb77db34520a3ca6ed1bd43ace17d182bbd8dd7d976f1c176fb/"
8776 "wsgi_intercept-" version ".tar.gz"))
8779 "0kjj2v2dvmnpdd5h5gk9rzz0f54rhjb0yiz3zg65bmp65slfw65d"))))
8780 (build-system python-build-system)
8782 `(("python-six" ,python-six)))
8784 `(("python-pytest" ,python-pytest)
8785 ("python-httplib2" ,python-httplib2)
8786 ("python-requests" ,python-requests)
8787 ("python-urllib3" ,python-urllib3)))
8788 (synopsis "Puts a WSGI application in place of a real URI for testing")
8789 (description "Wsgi_intercept installs a WSGI application in place of a real
8790 URI for testing. Testing a WSGI application normally involves starting a
8791 server at a local host and port, then pointing your test code to that address.
8792 Instead, this library lets you intercept calls to any specific host/port
8793 combination and redirect them into a WSGI application importable by your test
8794 program. Thus, you can avoid spawning multiple processes or threads to test
8796 (home-page "https://github.com/cdent/wsgi-intercept")
8797 (license license:expat)))
8799 (define-public python-pytest-xprocess
8801 (name "python-pytest-xprocess")
8805 (uri (pypi-uri "pytest-xprocess" version))
8808 "17zlql1xqw3ywcgwwbqmw633aly99lab12hm02asr8awvg5603pp"))))
8809 (build-system python-build-system)
8811 `(("python-pytest" ,python-pytest)
8812 ("python-pytest-cache" ,python-pytest-cache)
8813 ("python-psutil" ,python-psutil)))
8814 (synopsis "Pytest plugin to manage external processes across test runs")
8815 (description "Pytest-xprocess is an experimental py.test plugin for managing
8816 processes across test runs.")
8817 (home-page "https://bitbucket.org/pytest-dev/pytest-xprocess")
8818 (license license:expat)))
8820 (define-public python-icalendar
8822 (name "python-icalendar")
8826 (uri (pypi-uri "icalendar" version))
8829 "086jslw8cg2hni79j267p1dy6d27m7q5hi39ni2clh9waqbdf5v3"))))
8830 (build-system python-build-system)
8832 `(("python-dateutil" ,python-dateutil)
8833 ("python-pytz" ,python-pytz)))
8834 (synopsis "Python library for parsing iCalendar files")
8835 (description "The icalendar package is a parser/generator of iCalendar
8836 files for use with Python.")
8837 (home-page "https://github.com/collective/icalendar")
8838 (license license:bsd-2)))
8840 (define-public python-sphinxcontrib-newsfeed
8842 (name "python-sphinxcontrib-newsfeed")
8846 (uri (pypi-uri "sphinxcontrib-newsfeed" version))
8849 "1d7gam3mn8v4in4p16yn3v10vps7nnaz6ilw99j4klij39dqd37p"))))
8850 (arguments '(#:tests? #f)) ; No tests.
8851 (build-system python-build-system)
8853 `(("python-sphinx" ,python-sphinx)))
8854 (synopsis "News Feed extension for Sphinx")
8855 (description "Sphinxcontrib-newsfeed is an extension for adding a simple
8856 Blog, News or Announcements section to a Sphinx website.")
8857 (home-page "https://bitbucket.org/prometheus/sphinxcontrib-newsfeed")
8858 (license license:bsd-2)))
8860 (define-public python-args
8862 (name "python-args")
8866 (uri (pypi-uri "args" version))
8869 "057qzi46h5dmxdqknsbrssn78lmqjlnm624iqdhrnpk26zcbi1d7"))))
8870 (build-system python-build-system)
8871 (home-page "https://github.com/kennethreitz/args")
8872 (synopsis "Command-line argument parser")
8874 "This library provides a Python module to parse command-line arguments.")
8875 (license license:bsd-3)))
8877 (define-public python2-args
8878 (package-with-python2 python-args))
8880 (define-public python-clint
8882 (name "python-clint")
8886 (uri (pypi-uri "clint" version))
8889 "1an5lkkqk1zha47198p42ji3m94xmzx1a03dn7866m87n4r4q8h5"))))
8890 (build-system python-build-system)
8893 (modify-phases %standard-phases
8896 (zero? (system* "py.test" "-v")))))))
8898 `(("python-pytest" ,python-pytest)))
8900 `(("python-args" ,python-args)))
8901 (home-page "https://github.com/kennethreitz/clint")
8902 (synopsis "Command-line interface tools")
8904 "Clint is a Python module filled with a set of tools for developing
8905 command-line applications, including tools for colored and indented
8906 output, progress bar display, and pipes.")
8907 (license license:isc)))
8909 (define-public python2-clint
8910 (package-with-python2 python-clint))
8912 (define-public python-astor
8914 (name "python-astor")
8918 (uri (pypi-uri "astor" version))
8921 "1fdafq5hkis1fxqlmhw0sn44zp2ar46nxhbc22cvwg7hsd8z5gsa"))))
8922 (build-system python-build-system)
8923 (home-page "https://github.com/berkerpeksag/astor")
8924 (synopsis "Read and write Python ASTs")
8926 "Astor is designed to allow easy manipulation of Python source via the
8927 Abstract Syntax Tree.")
8928 (license license:bsd-3)))
8930 (define-public python2-astor
8931 (package-with-python2 python-astor))
8933 (define-public python-rply
8935 (name "python-rply")
8939 (uri (pypi-uri "rply" version))
8942 "12rp1d9ba7nvd5rhaxi6xzx1rm67r1k1ylsrkzhpwnphqpb06cvj"))))
8943 (build-system python-build-system)
8945 `(("python-appdirs" ,python-appdirs)))
8946 (home-page "https://github.com/alex/rply")
8947 (synopsis "Parser generator for Python")
8949 "This package provides a pure Python based parser generator, that also
8950 works with RPython. It is a more-or-less direct port of David Bazzley's PLY,
8951 with a new public API, and RPython support.")
8952 (license license:bsd-3)))
8954 (define-public python2-rply
8955 (package-with-python2 python-rply))
8957 (define-public python-hy
8963 (uri (pypi-uri "hy" version))
8966 "1msqv747iz12r73mz4qvsmlwkddwjvrahlrk7ysrcz07h7dsscxs"))))
8967 (build-system python-build-system)
8970 (modify-phases %standard-phases
8973 ;; Tests require write access to HOME.
8974 (setenv "HOME" "/tmp")
8975 (zero? (system* "nosetests")))))))
8977 `(("python-coverage" ,python-coverage)
8978 ("python-nose" ,python-nose)))
8980 `(("python-astor" ,python-astor)
8981 ("python-clint" ,python-clint)
8982 ("python-rply" ,python-rply)))
8983 (home-page "http://hylang.org/")
8984 (synopsis "Lisp frontend to Python")
8986 "Hy is a dialect of Lisp that's embedded in Python. Since Hy transforms
8987 its Lisp code into the Python Abstract Syntax Tree, you have the whole world of
8988 Python at your fingertips, in Lisp form.")
8989 (license license:expat)))
8991 (define-public python2-hy
8992 (package-with-python2 python-hy))
8994 (define-public python-rauth
8996 (name "python-rauth")
9001 (uri (pypi-uri "rauth" version))
9004 "02kv8w8l98ky223avyq7vw7x1f2ya9chrm59r77ylq45qb0xnk2j"))))
9005 (build-system python-build-system)
9007 `(#:test-target "check"))
9009 `(("python-requests" ,python-requests)))
9010 (home-page "https://github.com/litl/rauth")
9011 (synopsis "Python library for OAuth 1.0/a, 2.0, and Ofly")
9013 "Rauth is a Python library for OAuth 1.0/a, 2.0, and Ofly. It also
9014 provides service wrappers for convenient connection initialization and
9015 authenticated session objects providing things like keep-alive.")
9016 (license license:expat)
9017 (properties `((python2-variant . ,(delay python2-rauth))))))
9019 (define-public python2-rauth
9020 (let ((base (package-with-python2 (strip-python2-variant python-rauth))))
9023 (native-inputs `(("python2-unittest2" ,python2-unittest2)
9024 ,@(package-native-inputs base))))))
9026 (define-public python2-functools32
9028 (name "python2-functools32")
9033 (uri (pypi-uri "functools32" version))
9036 "0v8ya0b58x47wp216n1zamimv4iw57cxz3xxhzix52jkw3xks9gn"))))
9037 (build-system python-build-system)
9039 `(#:python ,python-2
9040 #:tests? #f)) ; no test target
9041 (home-page "https://github.com/MiCHiLU/python-functools32")
9043 "Backport of the functools module from Python 3.2.3")
9045 "This package is a backport of the @code{functools} module from Python
9046 3.2.3 for use with older versions of Python and PyPy.")
9047 (license license:expat)))
9049 (define-public python2-subprocess32
9051 (name "python2-subprocess32")
9055 (uri (pypi-uri "subprocess32" version))
9058 "14350dhhlhyz5gqzi3lihn9m6lvskx5mcb20srx1kgsk9i50li8y"))
9060 (search-patches "python2-subprocess32-disable-input-test.patch"))))
9061 (build-system python-build-system)
9063 `(#:python ,python-2
9065 (modify-phases %standard-phases
9066 (add-after 'unpack 'patch-/bin/sh
9068 (substitute* '("subprocess32.py"
9069 "test_subprocess32.py")
9070 (("/bin/sh") (which "sh")))
9073 (add-after 'install 'check
9074 (lambda* (#:key inputs outputs #:allow-other-keys)
9075 ;; For some reason this package fails to import
9076 ;; _posixsubprocess.so when PYTHONPATH is set to the build
9077 ;; directory. Running tests after install is easier.
9078 (add-installed-pythonpath inputs outputs)
9079 (zero? (system* "python" "test_subprocess32.py")))))))
9080 (home-page "https://github.com/google/python-subprocess32")
9081 (synopsis "Backport of the subprocess module from Python 3.2")
9083 "This is a backport of the @code{subprocess} standard library module
9084 from Python 3.2 and 3.3 for use on Python 2. It includes bugfixes and some
9085 new features. On POSIX systems it is guaranteed to be reliable when used
9086 in threaded applications. It includes timeout support from Python 3.3 but
9087 otherwise matches 3.2’s API.")
9088 (license license:psfl)))
9090 (define-public python2-futures
9092 (name "python2-futures")
9097 (uri (pypi-uri "futures" version))
9100 "1pw1z4329xvlabdpwqa6b7v2fxf7hl64m4cgr22ckbym8m8m4hh5"))))
9101 (build-system python-build-system)
9102 (arguments `(#:python ,python-2))
9103 (home-page "https://github.com/agronholm/pythonfutures")
9105 "Backport of the concurrent.futures package from Python 3.2")
9107 "The concurrent.futures module provides a high-level interface for
9108 asynchronously executing callables. This package backports the
9109 concurrent.futures package from Python 3.2")
9110 (license license:bsd-3)))
9112 (define-public python-promise
9114 (name "python-promise")
9119 (uri (pypi-uri "promise" version))
9122 "1k19ms8l3d5jzjh557rgkxb5sg4mqgfc315rn4hx1z3n8qq6lr3h"))))
9123 (build-system python-build-system)
9124 ;; Tests wants python-futures, which is a python2 only program, and
9125 ;; can't be found by python-promise at test time.
9126 (arguments `(#:tests? #f))
9127 (home-page "https://github.com/syrusakbary/promise")
9128 (synopsis "Promises/A+ implementation for Python")
9130 "Promises/A+ implementation for Python")
9131 (properties `((python2-variant . ,(delay python2-promise))))
9132 (license license:expat)))
9134 (define-public python2-promise
9135 (let ((promise (package-with-python2
9136 (strip-python2-variant python-promise))))
9137 (package (inherit promise)
9138 (arguments (substitute-keyword-arguments (package-arguments promise)
9141 `(("python2-futures" ,python2-futures)
9142 ("python2-pytest" ,python2-pytest)
9143 ,@(package-native-inputs promise))))))
9145 (define-public python-urllib3
9147 (name "python-urllib3")
9152 (uri (pypi-uri "urllib3" version))
9155 "1wb8aqnq53vzh2amrv8kc66f3h6fx217y0q62y6n30a64p2yqmam"))))
9156 (build-system python-build-system)
9157 (arguments `(#:tests? #f))
9159 `(;; some packages for tests
9160 ("python-nose" ,python-nose)
9161 ("python-mock" ,python-mock)
9162 ("python-tornado" ,python-tornado)))
9164 `(;; extra packages for https security
9165 ("python-certifi" ,python-certifi)
9166 ("python-ndg-httpsclient" ,python-ndg-httpsclient)
9167 ("python-pyasn1" ,python-pyasn1)
9168 ("python-pyopenssl" ,python-pyopenssl)))
9169 (home-page "https://urllib3.readthedocs.org/")
9170 (synopsis "HTTP library with thread-safe connection pooling")
9172 "Urllib3 supports features left out of urllib and urllib2 libraries. It
9173 can reuse the same socket connection for multiple requests, it can POST files,
9174 supports url redirection and retries, and also gzip and deflate decoding.")
9175 (license license:expat)))
9177 (define-public python2-urllib3
9178 (package-with-python2 python-urllib3))
9180 (define-public python-colorama
9182 (name "python-colorama")
9187 (uri (pypi-uri "colorama" version))
9190 "0avqkn6362v7k2kg3afb35g4sfdvixjgy890clip4q174p9whhz0"))))
9191 (build-system python-build-system)
9192 (synopsis "Colored terminal text rendering for Python")
9193 (description "Colorama is a Python library for rendering colored terminal
9195 (home-page "https://pypi.python.org/pypi/colorama")
9196 (license license:bsd-3)))
9198 (define-public python2-colorama
9199 (package-with-python2 python-colorama))
9201 (define-public python-rsa
9208 (uri (pypi-uri "rsa" version))
9211 "1dcxvszbikgzh99ybdc7jq0zb9wspy2ds8z9mjsqiyv3q884xpr5"))))
9212 (build-system python-build-system)
9214 `(("python-pyasn1" ,python-pyasn1)))
9215 (synopsis "Pure-Python RSA implementation")
9216 (description "Python-RSA is a pure-Python RSA implementation. It supports
9217 encryption and decryption, signing and verifying signatures, and key
9218 generation according to PKCS#1 version 1.5. It can be used as a Python
9219 library as well as on the command line.")
9220 (home-page "http://stuvel.eu/rsa")
9221 (license license:asl2.0)))
9223 (define-public python2-rsa
9224 (package-with-python2 python-rsa))
9226 (define-public python-pluggy
9228 (name "python-pluggy")
9233 (uri (pypi-uri "pluggy" version))
9236 "18qfzfm40bgx672lkg8q9x5hdh76n7vax99aank7vh2nw21wg70m"))))
9237 (build-system python-build-system)
9238 (synopsis "Plugin and hook calling mechanism for Python")
9239 (description "Pluggy is an extraction of the plugin manager as used by
9240 Pytest but stripped of Pytest specific details.")
9241 (home-page "https://pypi.python.org/pypi/pluggy")
9242 (license license:expat)))
9244 (define-public python2-pluggy
9245 (package-with-python2 python-pluggy))
9247 (define-public python-tox
9254 (uri (pypi-uri "tox" version))
9257 "1vj73ar4rimq3fwy5r2z3jv4g9qbh8rmpmncsc00g0k310acqzxz"))))
9258 (build-system python-build-system)
9260 ;; FIXME: Tests require pytest-timeout, which itself requires
9261 ;; pytest>=2.8.0 for installation.
9264 `(("python-pluggy" ,python-pluggy) ; >=0.3.0,<0.4.0
9265 ("python-py" ,python-py)
9266 ("python-virtualenv" ,python-virtualenv)))
9268 `(; FIXME: Missing: ("python-pytest-timeout" ,python-pytest-timeout)
9269 ("python-pytest" ,python-pytest))) ; >= 2.3.5
9270 (home-page "http://tox.testrun.org/")
9271 (synopsis "Virtualenv-based automation of test activities")
9272 (description "Tox is a generic virtualenv management and test command line
9273 tool. It can be used to check that a package installs correctly with
9274 different Python versions and interpreters, or run tests in each type of
9275 supported environment, or act as a frontend to continuous integration
9277 (license license:expat)))
9279 (define-public python2-tox
9280 (package-with-python2 python-tox))
9282 (define-public python-jmespath
9284 (name "python-jmespath")
9289 (uri (pypi-uri "jmespath" version))
9292 "0g9xvl69y7nr3w7ag4fsp6sm4fqf6vrqjw7504x2hzrrsh3ampq8"))))
9293 (build-system python-build-system)
9295 `(("python-nose" ,python-nose)))
9296 (synopsis "JSON Matching Expressions")
9297 (description "JMESPath (pronounced “james path”) is a Python library that
9298 allows one to declaratively specify how to extract elements from a JSON
9300 (home-page "https://github.com/jmespath/jmespath.py")
9301 (license license:expat)))
9303 (define-public python2-jmespath
9304 (package-with-python2 python-jmespath))
9306 (define-public python-botocore
9308 (name "python-botocore")
9313 (uri (pypi-uri "botocore" version))
9316 "1b7l48hr88galrrc5q6k21z3sdadzxc87ppzs7k9fz4p1w8bfnvb"))))
9317 (build-system python-build-system)
9319 ;; FIXME: Many tests are failing.
9322 `(("python-dateutil" ,python-dateutil)
9323 ("python-docutils" ,python-docutils)
9324 ("python-jmespath" ,python-jmespath)))
9326 `(("python-mock" ,python-mock)
9327 ("python-nose" ,python-nose)
9329 ("python-tox" ,python-tox)
9330 ("python-wheel" ,python-wheel)))
9331 (home-page "https://github.com/boto/botocore")
9332 (synopsis "Low-level interface to AWS")
9333 (description "Botocore is a Python library that provides a low-level
9334 interface to the Amazon Web Services (AWS) API.")
9335 (license license:asl2.0)))
9337 (define-public python2-botocore
9338 (package-with-python2 python-botocore))
9340 (define-public awscli
9347 (uri (pypi-uri name version))
9350 "1r8aqv8w27k76lcsfk83w6qw9lz8gk2ibzwacp5wjhpp2gik911m"))))
9351 (build-system python-build-system)
9353 `(("python-colorama" ,python-colorama)
9354 ("python-botocore" ,python-botocore)
9355 ("python-s3transfer" ,python-s3transfer)
9356 ("python-docutils" ,python-docutils)
9357 ("python-rsa" ,python-rsa)))
9359 ;; FIXME: The 'pypi' release does not contain tests.
9361 (home-page "https://aws.amazon.com/cli/")
9362 (synopsis "Command line client for AWS")
9363 (description "AWS CLI provides a unified command line interface to the
9364 Amazon Web Services (AWS) API.")
9365 (license license:asl2.0)))
9367 (define-public python-hypothesis
9369 (name "python-hypothesis")
9373 (uri (pypi-uri "hypothesis" version))
9376 "0qyqq9akm4vshhn8cngjc1qykcvsn7cz6dlm6njfsgpbraqrmbbw"))))
9377 (build-system python-build-system)
9379 `(("python-flake8" ,python-flake8)
9380 ("python-pytest" ,python-pytest)))
9381 (synopsis "Library for property based testing")
9382 (description "Hypothesis is a library for testing your Python code against a
9383 much larger range of examples than you would ever want to write by hand. It’s
9384 based on the Haskell library, Quickcheck, and is designed to integrate
9385 seamlessly into your existing Python unit testing work flow.")
9386 (home-page "https://github.com/DRMacIver/hypothesis")
9387 (license license:mpl2.0)
9388 (properties `((python2-variant . ,(delay python2-hypothesis))))))
9390 (define-public python2-hypothesis
9391 (let ((hypothesis (package-with-python2
9392 (strip-python2-variant python-hypothesis))))
9393 (package (inherit hypothesis)
9395 `(("python2-enum34" ,python2-enum34)
9396 ,@(package-native-inputs hypothesis))))))
9398 (define-public python-pytest-subtesthack
9400 (name "python-pytest-subtesthack")
9404 (uri (pypi-uri "pytest-subtesthack" version))
9407 "15kzcr5pchf3id4ikdvlv752rc0j4d912n589l4rifp8qsj19l1x"))))
9408 (build-system python-build-system)
9410 `(("python-pytest" ,python-pytest)))
9411 (synopsis "Set-up and tear-down fixtures for unit tests")
9412 (description "This plugin allows you to set up and tear down fixtures within
9413 unit test functions that use @code{py.test}. This is useful for using
9414 @command{hypothesis} inside py.test, as @command{hypothesis} will call the test
9415 function multiple times, without setting up or tearing down fixture state as is
9416 normally the case.")
9417 (home-page "https://github.com/untitaker/pytest-subtesthack/")
9418 (license license:unlicense)))
9420 (define-public python2-pytest-subtesthack
9421 (package-with-python2 python-pytest-subtesthack))
9423 (define-public python-xdo
9430 "http://http.debian.net/debian/pool/main/p/python-xdo/"
9431 "python-xdo_" version ".orig.tar.gz"))
9434 "1vqh1n5yy5dhnq312kwrl90fnck4v26is3lq3lxdvcn60vv19da0"))))
9435 (build-system python-build-system)
9438 (modify-phases %standard-phases
9439 (add-before 'install 'patch-libxdo-path
9440 ;; Hardcode the path of dynamically loaded libxdo library.
9441 (lambda* (#:key inputs #:allow-other-keys)
9442 (let ((libxdo (string-append
9443 (assoc-ref inputs "xdotool")
9445 (substitute* "xdo/_xdo.py"
9446 (("find_library\\(\"xdo\"\\)")
9447 (simple-format #f "\"~a\"" libxdo)))
9449 #:tests? #f)) ; no tests provided
9451 `(("python-six" ,python-six)))
9453 `(("xdotool" ,xdotool)
9454 ("libX11" ,libx11)))
9455 (home-page "https://tracker.debian.org/pkg/python-xdo")
9456 (synopsis "Python library for simulating X11 keyboard/mouse input")
9457 (description "Provides bindings to libxdo for manipulating X11 via simulated
9458 input. (Note that this is mostly a legacy library; you may wish to look at
9459 python-xdo for newer bindings.)")
9460 (license license:bsd-3)))
9462 (define-public python2-xdo
9463 (package-with-python2 python-xdo))
9465 (define-public python-wtforms
9467 (name "python-wtforms")
9472 (uri (pypi-uri "WTForms" version ".zip"))
9475 "0vyl26y9cg409cfyj8rhqxazsdnd0jipgjw06civhrd53yyi1pzz"))))
9476 (build-system python-build-system)
9479 (modify-phases %standard-phases
9480 (add-after 'unpack 'remove-django-test
9481 ;; Don't fail the tests when the inputs for the optional tests cannot be found.
9485 (("'ext_django.tests', 'ext_sqlalchemy', 'ext_dateutil', 'locale_babel'") "")
9486 (("sys.stderr.write(\"### Disabled test '%s', dependency not found\n\" % name)") ""))
9489 `(("unzip" ,unzip)))
9490 (home-page "http://wtforms.simplecodes.com/")
9492 "Form validation and rendering library for Python web development")
9494 "WTForms is a flexible forms validation and rendering library
9495 for Python web development. It is very similar to the web form API
9496 available in Django, but is a standalone package.")
9497 (license license:bsd-3)))
9499 (define-public python2-wtforms
9500 (package-with-python2 python-wtforms))
9502 (define-public python-mako
9504 (name "python-mako")
9509 (uri (pypi-uri "Mako" version))
9512 "03dyxgjknp4ffsv7vwfd28l5bbpzi0ylp20543wpg3iahyyrwma8"))))
9513 (build-system python-build-system)
9515 `(("python-markupsafe" ,python-markupsafe)))
9517 `(("python-mock" ,python-mock)
9518 ("python-nose" ,python-nose)
9519 ("python-pytest" ,python-pytest)))
9520 (home-page "http://www.makotemplates.org/")
9521 (synopsis "Templating language for Python")
9522 (description "Mako is a templating language for Python that compiles
9523 templates into Python modules.")
9524 (license license:expat)))
9526 (define-public python2-mako
9527 (package-with-python2 python-mako))
9529 (define-public python-waitress
9531 (name "python-waitress")
9536 (uri (pypi-uri "waitress" version))
9539 "017n9ra6vvmq9d5sfhdzyzr1mg15x2hj2dhm4pdlw98c1ypw2h3w"))))
9540 (build-system python-build-system)
9541 (home-page "https://github.com/Pylons/waitress")
9542 (synopsis "Waitress WSGI server")
9543 (description "Waitress is meant to be a production-quality pure-Python WSGI
9544 server with very acceptable performance.")
9545 (license license:zpl2.1)))
9547 (define-public python2-waitress
9548 (package-with-python2 python-waitress))
9550 (define-public python-wsgiproxy2
9552 (name "python-wsgiproxy2")
9557 (uri (pypi-uri "WSGIProxy2" version ".zip"))
9560 "13kf9bdxrc95y9vriaz0viry3ah11nz4rlrykcfvb8nlqpx3dcm4"))))
9561 (build-system python-build-system)
9563 '(;; Wsgiproxy2's test suite requires Restkit, which does not yet fully
9564 ;; support Python 3:
9565 ;; https://github.com/benoitc/restkit/issues/140
9569 ("python-nose" ,python-nose)
9570 ("python-coverage" ,python-coverage)))
9572 `(("python-six" ,python-six)
9573 ("python-webob" ,python-webob)))
9575 "https://github.com/gawel/WSGIProxy2/")
9576 (synopsis "WSGI Proxy with various http client backends")
9577 (description "WSGI turns HTTP requests into WSGI function calls.
9578 WSGIProxy turns WSGI function calls into HTTP requests.
9579 It also includes code to sign requests and pass private data,
9580 and to spawn subprocesses to handle requests.")
9581 (license license:expat)))
9583 (define-public python2-wsgiproxy2
9584 (package-with-python2 python-wsgiproxy2))
9586 (define-public python-pastedeploy
9588 (name "python-pastedeploy")
9593 (uri (pypi-uri "PasteDeploy" version))
9596 "1jz3m4hq8v6hyhfjz9425nd3nvn52cvbfipdcd72krjmla4qz1fm"))))
9597 (build-system python-build-system)
9599 `(("python-nose" ,python-nose)))
9600 (home-page "http://pythonpaste.org/deploy/")
9602 "Load, configure, and compose WSGI applications and servers")
9604 "This tool provides code to load WSGI applications and servers from URIs;
9605 these URIs can refer to Python Eggs for INI-style configuration files. Paste
9606 Script provides commands to serve applications based on this configuration
9608 (license license:expat)))
9610 (define-public python2-pastedeploy
9611 (package-with-python2 python-pastedeploy))
9613 (define-public python-paste
9615 (name "python-paste")
9620 (uri (pypi-uri "Paste" version))
9623 "062jk0nlxf6lb2wwj6zc20rlvrwsnikpkh90y0dn8cjch93s6ii3"))
9624 (patches (search-patches "python-paste-remove-website-test.patch"
9625 "python-paste-remove-timing-test.patch"))))
9626 (build-system python-build-system)
9628 `(("python-nose" ,python-nose)))
9630 `(("python-six" ,python-six)))
9631 (home-page "http://pythonpaste.org")
9633 "Python web development tools, focusing on WSGI")
9635 "Paste provides a variety of web development tools and middleware which
9636 can be nested together to build web applications. Paste's design closely
9637 follows ideas flowing from WSGI (Web Standard Gateway Interface).")
9638 (license license:expat)))
9640 (define-public python2-paste
9641 (package-with-python2 python-paste))
9643 (define-public python-pastescript
9645 (name "python-pastescript")
9650 (uri (pypi-uri "PasteScript" version))
9653 "1h3nnhn45kf4pbcv669ik4faw04j58k8vbj1hwrc532k0nc28gy0"))))
9654 (build-system python-build-system)
9656 `(("python-nose" ,python-nose)))
9658 `(("python-paste" ,python-paste)
9659 ("python-pastedeploy" ,python-pastedeploy)))
9660 (home-page "http://pythonpaste.org/script/")
9662 '(;; Unfortunately, this requires the latest unittest2,
9663 ;; but that requires traceback2 which requires linecache2 which requires
9664 ;; unittest2. So we're skipping tests for now.
9665 ;; (Note: Apparently linetest2 only needs unittest2 for its tests,
9666 ;; so in theory we could get around this situation somehow.)
9669 "Pluggable command line tool for serving web applications and more")
9671 "PasteScript is a plugin-friendly command line tool which provides a
9672 variety of features, from launching web applications to bootstrapping project
9674 (license license:expat)))
9676 (define-public python2-pastescript
9677 (package-with-python2 python-pastescript))
9679 (define-public python-pyquery
9681 (name "python-pyquery")
9686 (uri (pypi-uri "pyquery" version))
9689 "1xia20wm0vx5dk85kcwgh13bylz8qh47ffjxssd2586r60xi783a"))))
9690 (build-system python-build-system)
9692 `(("python-webob" ,python-webob)
9693 ("python-webtest" ,python-webtest)))
9695 `(("python-lxml" ,python-lxml)
9696 ("python-cssselect" ,python-cssselect)))
9697 (home-page "https://github.com/gawel/pyquery")
9698 (synopsis "Make jQuery-like queries on xml documents")
9699 (description "pyquery allows you to make jQuery queries on xml documents.
9700 The API is as much as possible the similar to jQuery. pyquery uses lxml for
9701 fast xml and html manipulation.")
9702 (license license:bsd-3)))
9704 (define-public python2-pyquery
9705 (package-with-python2 python-pyquery))
9707 (define-public python-webtest
9709 (name "python-webtest")
9714 (uri (pypi-uri "WebTest" version))
9717 "0bv0qhdjakdsdgj4sk21gnpp8xp8bga4x03p6gjb83ihrsb7n4xv"))))
9718 (build-system python-build-system)
9720 `(;; Unfortunately we have to disable tests!
9721 ;; This release of WebTest is pinned to python-nose < 1.3,
9722 ;; but older versions of python-nose are plagued with the following
9723 ;; bug(s), which rears its ugly head during test execution:
9724 ;; https://github.com/nose-devs/nose/issues/759
9725 ;; https://github.com/nose-devs/nose/pull/811
9727 ;; Commented out code is no good, but in this case, once tests
9728 ;; are ready to be enabled again, we should put the following
9731 ;; `(("python-nose" ,python-nose) ; technially < 1.3,
9732 ;; ; but see above comment
9733 ;; ("python-coverage" ,python-coverage)
9734 ;; ("python-mock" ,python-mock)
9735 ;; ("python-pastedeploy" ,python-pastedeploy)
9736 ;; ("python-wsgiproxy2" ,python-wsgiproxy2)
9737 ;; ("python-pyquery" ,python-pyquery)))
9739 `(("python-waitress" ,python-waitress)
9740 ("python-webob" ,python-webob)
9741 ("python-six" ,python-six)
9742 ("python-beautifulsoup4" ,python-beautifulsoup4)))
9743 (home-page "http://webtest.pythonpaste.org/")
9744 (synopsis "Helper to test WSGI applications")
9745 (description "Webtest allows you to test your Python web applications
9746 without starting an HTTP server. It supports anything that supports the
9748 (license license:expat)))
9750 (define-public python2-webtest
9751 (package-with-python2 python-webtest))
9753 (define-public python-anyjson
9755 (name "python-anyjson")
9760 (uri (pypi-uri "anyjson" version))
9763 "1fjph4alvcscsl5d4b6qpv1yh31jy05jxi1l0xff7lws7j32v09p"))))
9764 (build-system python-build-system)
9766 `(;; We could possibly get tests working, but on Python 3 it's not so easy.
9767 ;; Very strangely, 2to3 is run *during setup.py install* (or bdist, or
9768 ;; whatever) so this transformation needs to be done before the tests
9769 ;; can be run. Maybe we could add a build step to transform beforehand
9770 ;; but it could be annoying/difficult.
9771 ;; We can enable tests for the Python 2 version, though, and do below.
9773 (home-page "http://bitbucket.org/runeh/anyjson/")
9775 "Wraps best available JSON implementation in a common interface")
9777 "Anyjson loads whichever is the fastest JSON module installed
9778 and provides a uniform API regardless of which JSON implementation is used.")
9779 (license license:bsd-3)
9780 (properties `((python2-variant . ,(delay python2-anyjson))))))
9782 (define-public python2-anyjson
9783 (let ((anyjson (package-with-python2
9784 (strip-python2-variant python-anyjson))))
9787 (arguments `(;; Unlike the python 3 variant, we do run tests. See above!
9789 ,@(package-arguments anyjson)))
9790 (native-inputs `(("python2-nose" ,python2-nose))))))
9792 (define-public python-amqp
9794 (name "python-amqp")
9799 (uri (pypi-uri "amqp" version))
9802 "06n6q0kxhjnbfz3vn8x9yz09lwmn1xi9d6wxp31h5jbks0b4vsid"))))
9803 (build-system python-build-system)
9805 `(("python-nose" ,python-nose)
9806 ("python-mock" ,python-mock)))
9807 (home-page "http://github.com/celery/py-amqp")
9809 "Low-level AMQP client for Python (fork of amqplib)")
9811 "This is a fork of amqplib which was originally written by Barry Pederson.
9812 It is maintained by the Celery project, and used by kombu as a pure python
9813 alternative when librabbitmq is not available.")
9814 (license license:lgpl2.1+)
9815 (properties `((python2-variant . ,(delay python2-amqp))))))
9817 (define-public python2-amqp
9818 (let ((amqp (package-with-python2
9819 (strip-python2-variant python-amqp))))
9822 (arguments `(;; Tries to run coverage tests with nose-cover3, which seems
9823 ;; unmaintained. Weirdly, does not do this on the python 3
9826 ,@(package-arguments amqp))))))
9828 (define-public python-kombu
9830 (name "python-kombu")
9835 (uri (pypi-uri "kombu" version))
9838 "0l16chb314gpq2v7fh94a22c30lcv6w3ylmhsa60bldlcq6a0r70"))))
9839 (build-system python-build-system)
9841 `(("python-mock" ,python-mock)
9842 ("python-nose" ,python-nose)))
9844 `(("python-anyjson" ,python-anyjson)
9845 ("python-amqp" ,python-amqp)
9846 ("python-redis" ,python-redis)))
9847 (home-page "http://kombu.readthedocs.org")
9848 (synopsis "Message passing library for Python")
9849 (description "The aim of Kombu is to make messaging in Python as easy as
9850 possible by providing an idiomatic high-level interface for the AMQ protocol,
9851 and also provide proven and tested solutions to common messaging problems.
9852 AMQP is the Advanced Message Queuing Protocol, an open standard protocol for
9853 message orientation, queuing, routing, reliability and security, for which the
9854 RabbitMQ messaging server is the most popular implementation.")
9855 (license license:bsd-3)
9856 (properties `((python2-variant . ,(delay python2-kombu))))))
9858 (define-public python2-kombu
9859 (let ((kombu (package-with-python2
9860 (strip-python2-variant python-kombu))))
9863 (arguments `(;; FIXME: 'TestTransport.test_del_sync' fails on python2.
9864 ;; It works fine on the python3 variant.
9866 ,@(package-arguments kombu)))
9867 (native-inputs `(("python2-unittest2" ,python2-unittest2)
9868 ,@(package-native-inputs kombu))))))
9870 (define-public python-billiard
9872 (name "python-billiard")
9873 (version "3.3.0.23")
9877 (uri (pypi-uri "billiard" version))
9880 "02wxsc6bhqvzh8j6w758kvgqbnj14l796mvmrcms8fgfamd2lak9"))))
9881 (build-system python-build-system)
9883 `(("python-nose" ,python-nose)))
9884 (home-page "http://github.com/celery/billiard")
9886 "Python multiprocessing fork with improvements and bugfixes")
9888 "Billiard is a fork of the Python 2.7 multiprocessing package. The
9889 multiprocessing package itself is a renamed and updated version of R Oudkerk's
9890 pyprocessing package. This standalone variant is intended to be compatible with
9891 Python 2.4 and 2.5, and will draw its fixes/improvements from python-trunk.")
9892 (license license:bsd-3)
9893 (properties `((python2-variant . ,(delay python2-billiard))))))
9895 (define-public python2-billiard
9896 (let ((billiard (package-with-python2
9897 (strip-python2-variant python-billiard))))
9900 (native-inputs `(("python2-unittest2" ,python2-unittest2)
9901 ("python2-mock" ,python2-mock)
9902 ,@(package-native-inputs billiard))))))
9904 (define-public python-celery
9906 (name "python-celery")
9911 (uri (pypi-uri "celery" version))
9914 "0yh2prhdnx2dgkb67a5drj12hh2zvzx5f611p7mqqg01ydghif4r"))))
9915 (build-system python-build-system)
9918 (modify-phases %standard-phases
9919 ;; These tests break with Python 3.5:
9920 ;; https://github.com/celery/celery/issues/2897#issuecomment-253066295
9924 (system* "nosetests" "--exclude=^test_safe_to_remove.*")))))))
9926 `(("python-nose" ,python-nose)))
9928 `(("python-pytz" ,python-pytz)
9929 ("python-billiard" ,python-billiard)
9930 ("python-kombu" ,python-kombu)))
9931 (home-page "http://celeryproject.org")
9932 (synopsis "Distributed Task Queue")
9933 (description "Celery is an asynchronous task queue/job queue based on
9934 distributed message passing. It is focused on real-time operation, but
9935 supports scheduling as well. The execution units, called tasks, are executed
9936 concurrently on a single or more worker servers using multiprocessing,
9937 Eventlet, or gevent. Tasks can execute asynchronously (in the background) or
9938 synchronously (wait until ready).")
9939 (license license:bsd-3)
9940 (properties `((python2-variant . ,(delay python2-celery))))))
9942 (define-public python2-celery
9943 (let ((celery (package-with-python2
9944 (strip-python2-variant python-celery))))
9947 (native-inputs `(("python2-unittest2" ,python2-unittest2)
9948 ("python2-mock" ,python2-mock)
9949 ,@(package-native-inputs celery))))))
9951 (define-public python-translitcodec
9953 (name "python-translitcodec")
9958 (uri (pypi-uri "translitcodec" version))
9961 "10x6pvblkzky1zhjs8nmx64nb9jdzxad4bxhq4iwv0j4z2aqjnki"))))
9962 (build-system python-build-system)
9964 `(#:tests? #f)) ; no tests provided
9966 "https://github.com/claudep/translitcodec")
9968 "Unicode to 8-bit charset transliteration codec")
9970 "This package contains codecs for transliterating ISO 10646 texts into
9971 best-effort representations using smaller coded character sets (ASCII,
9973 (license license:expat)))
9975 (define-public python2-translitcodec
9976 (package-with-python2 python-translitcodec))
9978 (define-public python-editor
9980 (name "python-editor")
9985 (uri (pypi-uri "python-editor" version))
9988 "1ypnpgvzpkbwsg4rdvy4sy51j28b5xq9v8pnkwxncn07vqz06p7n"))))
9989 (build-system python-build-system)
9991 "https://github.com/fmoo/python-editor")
9993 "Programmatically open an editor, capture the result")
9995 "python-editor is a library that provides the editor module for
9996 programmatically interfacing with your system's $EDITOR.")
9997 (license license:asl2.0)))
9999 (define-public python2-editor
10000 (package-with-python2 python-editor))
10002 (define-public python-sphinxcontrib-programoutput
10004 (name "python-sphinxcontrib-programoutput")
10008 (uri (pypi-uri "sphinxcontrib-programoutput" version))
10011 "098as6z1s0gb4dh5xcr1fd2vpm91zj93jzvgawspxf5s4hqs0xhp"))))
10012 (build-system python-build-system)
10014 ;; FIXME: Many tests are failing and the upstream is gone.
10017 `(("python-sphinx" ,python-sphinx)))
10018 (synopsis "Sphinx extension to include program output")
10019 (description "A Sphinx extension to literally insert the output of arbitrary
10020 commands into documents, helping you to keep your command examples up to date.")
10021 (home-page "https://github.com/lunaryorn/sphinxcontrib-programoutput")
10022 (license license:bsd-2)))
10024 (define-public python2-sphinxcontrib-programoutput
10025 (package-with-python2 python-sphinxcontrib-programoutput))
10027 (define-public python-sphinx-repoze-autointerface
10029 (name "python-sphinx-repoze-autointerface")
10033 (uri (pypi-uri "repoze.sphinx.autointerface" version))
10036 "08ycivzf7bh4a1zcyp31hbyqs1b2c9r26raa3vxjwwmbfqr3iw4f"))))
10037 (build-system python-build-system)
10038 (arguments '(#:tests? #f)) ; No tests.
10040 `(("python-sphinx" ,python-sphinx)
10041 ("python-zope-interface" ,python-zope-interface)))
10042 (synopsis "Auto-generate Sphinx API docs from Zope interfaces")
10043 (description "This package defines an extension for the Sphinx documentation
10044 system. The extension allows generation of API documentation by
10045 introspection of @code{zope.interface} instances in code.")
10046 (home-page "https://github.com/repoze/repoze.sphinx.autointerface")
10047 (license license:repoze)))
10049 (define-public python2-sphinx-repoze-autointerface
10050 (package-with-python2 python-sphinx-repoze-autointerface))
10052 (define-public python-psycopg2
10054 (name "python-psycopg2")
10059 (uri (pypi-uri "psycopg2" version))
10062 "0p60z2gwfcal30y2w8gprflchp1kcg9qblc5rn782p4wxl90wjbh"))))
10063 (build-system python-build-system)
10065 ;; Tests would require a postgresql database "psycopg2_test"
10066 ;; and a running postgresql database management service.
10067 `(#:tests? #f)) ; TODO re-enable after providing a test-db.
10069 `(("postgresql" ,postgresql))) ; libpq
10070 (home-page "http://initd.org/psycopg/")
10071 (synopsis "Python PostgreSQL adapter")
10073 "psycopg2 is a thread-safe PostgreSQL adapter that implements DB-API 2.0. ")
10074 (license license:lgpl3+)))
10076 (define-public python2-psycopg2
10077 (package-with-python2 python-psycopg2))
10079 (define-public python-vobject
10081 (name "python-vobject")
10085 (uri (pypi-uri "vobject" version))
10088 "1qfnwlx8qwkgr6nf5wvl6ff1r3kll53dh3z6nyp173nmlhhhqccb"))))
10089 (build-system python-build-system)
10091 '(;; The test suite relies on some non-portable Windows interfaces.
10094 `(("python-dateutil" ,python-dateutil)
10095 ("python-pyicu" ,python-pyicu)))
10096 (synopsis "Parse and generate vCard and vCalendar files")
10097 (description "Vobject is intended to be a full featured Python package for
10098 parsing and generating vCard and vCalendar files. Currently, iCalendar files
10099 are supported and well tested. vCard 3.0 files are supported, and all data
10100 should be imported, but only a few components are understood in a sophisticated
10102 (home-page "http://eventable.github.io/vobject/")
10103 (license license:asl2.0)))
10105 (define-public python2-vobject
10106 (package-with-python2 python-vobject))
10108 (define-public python-munkres
10110 (name "python-munkres")
10114 (uri (pypi-uri "munkres" version))
10117 "0mbspx4zv8id4x6pim6ybsa1xh96qwpbqj7skbqz4c9c9nf1lpqq"))))
10118 (build-system python-build-system)
10120 '(#:tests? #f)) ; no test suite
10121 (home-page "http://software.clapper.org/munkres/")
10122 (synopsis "Implementation of the Munkres algorithm")
10123 (description "The Munkres module provides an implementation of the Munkres
10124 algorithm (also called the Hungarian algorithm or the Kuhn-Munkres algorithm),
10125 useful for solving the Assignment Problem.")
10126 (license license:bsd-3)))
10128 (define-public python2-munkres
10129 (package-with-python2 python-munkres))
10131 (define-public python-flask
10133 (name "python-flask")
10137 (uri (pypi-uri "Flask" version))
10140 "03kbfll4sj3v5z7r31c7bhfpi11r1np076d4p1k2kg4yzcmkywdl"))))
10141 (build-system python-build-system)
10143 `(("python-itsdangerous" ,python-itsdangerous)
10144 ("python-jinja2" ,python-jinja2)
10145 ("python-click" ,python-click)
10146 ("python-werkzeug" ,python-werkzeug)))
10147 (home-page "https://github.com/mitsuhiko/flask/")
10148 (synopsis "Microframework based on Werkzeug, Jinja2 and good intentions")
10149 (description "Flask is a micro web framework based on the Werkzeug toolkit
10150 and Jinja2 template engine. It is called a micro framework because it does not
10151 presume or force a developer to use a particular tool or library.")
10152 (license license:bsd-3)))
10154 (define-public python2-flask
10155 (package-with-python2 python-flask))
10157 (define-public python-flask-wtf
10159 (name "python-flask-wtf")
10164 (uri (pypi-uri "Flask-WTF" version))
10167 "04l5743j2dici46038sqlzvf0xzpg8rf7s9ld2x24xv7f4idg990"))))
10168 (build-system python-build-system)
10171 (modify-phases %standard-phases
10172 (add-before 'check 'drop-failing-test
10174 ;; FIXME: This file tries resolving an external server, which
10175 ;; fails. Try to patch out the offending section instead of
10176 ;; deleting the whole thing.
10177 (delete-file "tests/test_recaptcha.py")
10180 `(("python-flask-babel" ,python-flask-babel)
10181 ("python-babel" ,python-babel)
10182 ("python-wtforms" ,python-wtforms)))
10184 `(("python-nose" ,python-nose)))
10185 (home-page "https://github.com/lepture/flask-wtf")
10186 (synopsis "Simple integration of Flask and WTForms")
10187 (description "Flask-WTF integrates Flask and WTForms, including CSRF, file
10188 upload, and reCAPTCHA.")
10189 (license license:bsd-3)))
10191 (define-public python2-flask-wtf
10192 (package-with-python2 python-flask-wtf))
10194 (define-public python-flask-multistatic
10196 (name "python-flask-multistatic")
10201 (uri (pypi-uri "flask-multistatic" version))
10204 "0p4v50rwv64wcd0zlq7rzl4waprwr4hj19s3cgf1isywa7jcisgm"))))
10205 (build-system python-build-system)
10207 `(("python-flask" ,python-flask)))
10208 (home-page "https://pagure.io/flask-multistatic")
10209 (synopsis "Flask plugin to allow overriding static files")
10210 (description "@code{flask-multistatic} is a flask plugin that adds support
10211 for overriding static files.")
10212 (license license:gpl3+)))
10214 (define-public python2-flask-multistatic
10215 (package-with-python2 python-flask-multistatic))
10217 (define-public python-cookies
10219 (name "python-cookies")
10223 (uri (pypi-uri "cookies" version))
10226 "13pfndz8vbk4p2a44cfbjsypjarkrall71pgc97glk5fiiw9idnn"))))
10227 (build-system python-build-system)
10229 `(;; test are broken: https://gitlab.com/sashahart/cookies/issues/3
10232 `(("python-pytest" ,python2-pytest)))
10233 (synopsis "HTTP cookie parser and renderer")
10234 (description "A RFC 6265-compliant HTTP cookie parser and renderer in
10236 (home-page "https://gitlab.com/sashahart/cookies")
10237 (license license:expat)))
10239 (define-public python2-cookies
10240 (package-with-python2 python-cookies))
10242 (define-public python-responses
10244 (name "python-responses")
10248 (uri (pypi-uri "responses" version))
10251 "1spcfxixyk9k7pk82jm6zqkwk031s95lh8q0mz7539jrb7269bcc"))))
10252 (build-system python-build-system)
10254 `(;; Test suite is not distributed:
10255 ;; https://github.com/getsentry/responses/issues/38
10258 `(("python-mock" ,python-mock)))
10260 `(("python-requests" ,python-requests)
10261 ("python-cookies" ,python-cookies)
10262 ("python-six" ,python-six)))
10263 (home-page "https://github.com/getsentry/responses")
10264 (synopsis "Utility for mocking out the `requests` Python library")
10265 (description "A utility library for mocking out the `requests` Python
10267 (license license:asl2.0)))
10269 (define-public python2-responses
10270 (package-with-python2 python-responses))
10272 (define-public python-whoosh
10274 (name "python-whoosh")
10279 (uri (pypi-uri "Whoosh" version))
10282 "10qsqdjpbc85fykc1vgcs8xwbgn4l2l52c8d83xf1q59pwyn79bw"))))
10283 (build-system python-build-system)
10285 `(("python-pytest" ,python-pytest)))
10286 (home-page "http://bitbucket.org/mchaput/whoosh")
10287 (synopsis "Full text indexing, search, and spell checking library")
10289 "Whoosh is a fast, pure-Python full text indexing, search, and spell
10290 checking library.")
10291 (license license:bsd-2)))
10293 (define-public python2-whoosh
10294 (let ((whoosh (package-with-python2 (strip-python2-variant python-whoosh))))
10295 (package (inherit whoosh)
10297 `(("python2-backport-ssl-match-hostname"
10298 ,python2-backport-ssl-match-hostname)
10299 ,@(package-propagated-inputs whoosh))))))
10301 (define-public python-pathlib
10303 (name "python-pathlib")
10307 (uri (pypi-uri "pathlib" version))
10310 "17zajiw4mjbkkv6ahp3xf025qglkj0805m9s41c45zryzj6p2h39"))))
10311 (build-system python-build-system)
10312 ;; The tests depend on the internal "test" module, which does not provide
10313 ;; a stable interface.
10314 (arguments `(#:tests? #f))
10315 (home-page "https://pathlib.readthedocs.org/")
10316 (synopsis "Object-oriented file system paths")
10317 (description "Pathlib offers a set of classes to handle file system paths.
10318 It offers the following advantages over using string objects:
10321 @item No more cumbersome use of os and os.path functions. Everything can
10322 be done easily through operators, attribute accesses, and method calls.
10323 @item Embodies the semantics of different path types. For example,
10324 comparing Windows paths ignores casing.
10325 @item Well-defined semantics, eliminating any inconsistencies or
10326 ambiguities (forward vs. backward slashes, etc.).
10329 Note: In Python 3.4, pathlib is now part of the standard library. For other
10330 Python versions please consider python-pathlib2 instead, which tracks the
10331 standard library module. This module (python-pathlib) isn't maintained
10333 (license license:expat)))
10335 (define-public python2-pathlib
10336 (package-with-python2 python-pathlib))
10338 (define-public python2-pathlib2
10340 (name "python2-pathlib2")
10344 (uri (pypi-uri "pathlib2" version))
10347 "0p050msg5c8d0kadv702jnfshaxrb0il765cpkgnhn6mq5hakcyy"))))
10348 (build-system python-build-system)
10349 ;; We only need the the Python 2 variant, since for Python 3 our minimum
10350 ;; version is 3.4 which already includes this package as part of the
10351 ;; standard library.
10353 `(#:python ,python-2))
10355 `(("python2-six" ,python2-six)))
10356 (home-page "http://pypi.python.org/pypi/pathlib2/")
10357 (synopsis "Object-oriented file system paths - backport of standard
10359 (description "The goal of pathlib2 is to provide a backport of standard
10360 pathlib module which tracks the standard library module, so all the newest
10361 features of the standard pathlib can be used also on older Python versions.
10363 Pathlib offers a set of classes to handle file system paths. It offers the
10364 following advantages over using string objects:
10367 @item No more cumbersome use of os and os.path functions. Everything can
10368 be done easily through operators, attribute accesses, and method calls.
10369 @item Embodies the semantics of different path types. For example,
10370 comparing Windows paths ignores casing.
10371 @item Well-defined semantics, eliminating any inconsistencies or
10372 ambiguities (forward vs. backward slashes, etc.).
10374 (license license:expat)))
10376 (define-public python-jellyfish
10378 (name "python-jellyfish")
10382 (uri (pypi-uri "jellyfish" version))
10385 "1j9rplb16ba2prjj6mip46z0w9pnhnqpwgiwi0x93vnas14rlyl8"))))
10386 (build-system python-build-system)
10388 `(("python-pytest" ,python-pytest)))
10389 (home-page "https://github.com/jamesturk/jellyfish")
10390 (synopsis "Approximate and phonetic matching of strings")
10391 (description "Jellyfish uses a variety of string comparison and phonetic
10392 encoding algorithms to do fuzzy string matching.")
10393 (license license:bsd-2)
10394 (properties `((python2-variant . ,(delay python2-jellyfish))))))
10396 (define-public python2-jellyfish
10397 (let ((jellyfish (package-with-python2
10398 (strip-python2-variant python-jellyfish))))
10399 (package (inherit jellyfish)
10400 (native-inputs `(("python2-unicodecsv" ,python2-unicodecsv)
10401 ,@(package-native-inputs jellyfish))))))
10403 (define-public python2-unicodecsv
10405 (name "python2-unicodecsv")
10409 ;; The test suite is not included in the PyPi release.
10410 ;; https://github.com/jdunck/python-unicodecsv/issues/19
10411 (uri (string-append "https://github.com/jdunck/python-unicodecsv/"
10412 "archive/" version ".tar.gz"))
10413 (file-name (string-append name "-" version ".tar.gz"))
10416 "087nqanfcyp6mlfbbr5lva5f3w6iz1bybls9xlrb8icmc474wh4w"))))
10417 (build-system python-build-system)
10419 `(;; It supports Python 3, but Python 3 can already do Unicode CSV.
10420 #:python ,python-2))
10422 `(("python2-unittest2" ,python2-unittest2)))
10423 (home-page "https://github.com/jdunck/python-unicodecsv")
10424 (synopsis "Unicode CSV module for Python 2")
10425 (description "Unicodecsv is a drop-in replacement for Python 2.7's CSV
10426 module, adding support for Unicode strings.")
10427 (license license:bsd-2)))
10429 (define-public python-rarfile
10431 (name "python-rarfile")
10435 (uri (pypi-uri "rarfile" version))
10438 "0qfad483kcbga0bn4qmcz953xjk16r52fahiy46zzn56v80y89ra"))))
10439 (build-system python-build-system)
10442 (modify-phases %standard-phases
10444 ;; Many tests fail, but the installation proceeds.
10445 (lambda _ (zero? (system* "make" "-C" "test" "test")))))))
10447 `(("which" ,which))) ; required for tests
10449 `(("libarchive" ,libarchive)))
10450 (home-page "https://github.com/markokr/rarfile")
10451 (synopsis "RAR archive reader for Python")
10452 (description "This is Python module for RAR archive reading. The interface
10453 is made as zipfile like as possible.")
10454 (license license:isc)))
10456 (define-public python2-rarfile
10457 (package-with-python2 python-rarfile))
10459 (define-public python-magic
10461 (name "python-magic")
10466 (uri (string-append "https://github.com/ahupp/python-magic/archive/"
10467 version ".tar.gz"))
10470 "17bgy92i7sb021f2s4mw1dcvpm6p1mi9jihridwy1pyn8mzvpjgk"))
10471 (file-name (string-append name "-" version "-checkout"))))
10472 (build-system python-build-system)
10474 ;; The tests are unreliable, so don't run them. The tests fail
10475 ;; under Python3 because they were written for Python2 and
10476 ;; contain import statements that do not work in Python3. One of
10477 ;; the tests fails under Python2 because its assertions are
10478 ;; overly stringent; it relies on comparing output strings which
10479 ;; are brittle and can change depending on the version of
10480 ;; libmagic being used and the system on which the test is
10481 ;; running. In my case, under GuixSD 0.10.0, only one test
10482 ;; failed, and it seems to have failed only because the version
10483 ;; of libmagic that is packaged in Guix outputs a slightly
10484 ;; different (but not wrong) string than the one that the test
10487 #:phases (modify-phases %standard-phases
10488 ;; Replace a specific method call with a hard-coded
10489 ;; path to the necessary libmagic.so file in the
10490 ;; store. If we don't do this, then the method call
10491 ;; will fail to find the libmagic.so file, which in
10492 ;; turn will cause any application using
10493 ;; python-magic to fail.
10494 (add-before 'build 'hard-code-path-to-libmagic
10495 (lambda* (#:key inputs #:allow-other-keys)
10496 (let ((file (assoc-ref inputs "file")))
10497 (substitute* "magic.py"
10498 (("ctypes.util.find_library\\('magic'\\)")
10499 (string-append "'" file "/lib/libmagic.so'")))
10501 (add-before 'install 'disable-egg-compression
10503 (let ((port (open-file "setup.cfg" "a")))
10504 (display "\n[easy_install]\nzip_ok = 0\n"
10509 ;; python-magic needs to be able to find libmagic.so.
10511 (home-page "https://github.com/ahupp/python-magic")
10512 (synopsis "File type identification using libmagic")
10514 "This module uses ctypes to access the libmagic file type
10515 identification library. It makes use of the local magic database and
10516 supports both textual and MIME-type output. Note that this module and
10517 the python-file module both provide a \"magic.py\" file; these two
10518 modules, which are different and were developed separately, both serve
10519 the same purpose: to provide Python bindings for libmagic.")
10520 (license license:expat)))
10522 (define-public python2-magic
10523 (package-with-python2 python-magic))
10525 (define-public python2-s3cmd
10527 (name "python2-s3cmd")
10532 (uri (string-append "mirror://sourceforge/s3tools/s3cmd/" version "/"
10533 "s3cmd-" version ".tar.gz"))
10536 "0ki1rzhm5icvi9ry5jswi4b22yqwyj0d2wsqsgilwx6qhi7pjxa6"))))
10537 (build-system python-build-system)
10539 ;; s3cmd is written for python2 only and contains no tests.
10540 `(#:python ,python-2
10543 `(("python2-dateutil" ,python2-dateutil)
10544 ;; The python-file package also provides a magic.py module.
10545 ;; This is an unfortunate state of affairs; however, s3cmd
10546 ;; fails to install if it cannot find specifically the
10547 ;; python-magic package. Thus we include it, instead of using
10548 ;; python-file. Ironically, s3cmd sometimes works better
10549 ;; without libmagic bindings at all:
10550 ;; https://github.com/s3tools/s3cmd/issues/198
10551 ("python2-magic" ,python2-magic)))
10552 (home-page "http://s3tools.org/s3cmd")
10553 (synopsis "Command line tool for S3-compatible storage services")
10555 "S3cmd is a command line tool for uploading, retrieving and managing data
10556 in storage services that are compatible with the Amazon Simple Storage
10557 Service (S3) protocol, including S3 itself. It supports rsync-like backup,
10558 GnuPG encryption, and more. It also supports management of Amazon's
10559 CloudFront content delivery network.")
10560 (license license:gpl2+)))
10562 (define-public python-pkgconfig
10564 (name "python-pkgconfig")
10569 (uri (pypi-uri "pkgconfig" version))
10572 "1pw0kmvc57sjmaxi6c54fqsnihqj6hvhc9y1vaz36axafzqam7bh"))))
10573 (build-system python-build-system)
10575 `(("python-nose" ,python-nose)))
10577 `(("pkg-config" ,pkg-config)))
10579 `(;; Tests fail with "ValueError: _type_ 'v' not supported" on Python 3,
10580 ;; and on Python 2 they need the dl module deprecated since Python 2.6.
10582 ;; Hard-code the path to pkg-config.
10584 (modify-phases %standard-phases
10588 (substitute* "pkgconfig/pkgconfig.py"
10589 (("cmd = 'pkg-config")
10590 (string-append "cmd = '" (which "pkg-config"))))
10592 (home-page "http://github.com/matze/pkgconfig")
10593 (synopsis "Python interface for pkg-config")
10594 (description "This module provides a Python interface to pkg-config. It
10595 can be used to find all pkg-config packages, check if a package exists,
10596 check if a package meets certain version requirements, query CFLAGS and
10597 LDFLAGS and parse the output to build extensions with setup.py.")
10598 (license license:expat)))
10600 (define-public python2-pkgconfig
10601 (package-with-python2 python-pkgconfig))
10603 (define-public python-bz2file
10605 (name "python-bz2file")
10610 (uri (pypi-uri "bz2file" version))
10613 "126s53fkpx04f33a829yqqk8fj4png3qwg4m66cvlmhmwc8zihb4"))))
10614 (build-system python-build-system)
10616 `(#:tests? #f)) ; Tests use deprecated python modules.
10617 (home-page "https://github.com/nvawda/bz2file")
10618 (synopsis "Read and write bzip2-compressed files")
10620 "Bz2file is a Python library for reading and writing bzip2-compressed
10621 files. It contains a drop-in replacement for the I/O interface in the
10622 standard library's @code{bz2} module, including features from the latest
10623 development version of CPython that are not available in older releases.")
10624 (license license:asl2.0)
10625 (properties `((python2-variant . ,(delay python2-bz2file))))))
10627 (define-public python2-bz2file
10628 (let ((base (package-with-python2
10629 (strip-python2-variant python-bz2file))))
10633 `(#:python ,python-2
10635 (modify-phases %standard-phases
10636 ;; 'python setup.py test' does not work as of 0.98.
10637 ;; There is only the one test file, so we run it directly.
10639 (lambda _ (zero? (system* "python"
10640 "test_bz2file.py"))))))))))
10642 (define-public python-future
10644 (name "python-future")
10649 (uri (pypi-uri "future" version))
10652 "15wvcfzssc68xqnqi1dq4fhd0848hwi9jn42hxyvlqna40zijfrx"))))
10653 (build-system python-build-system)
10654 ;; Many tests connect to the network or are otherwise flawed.
10655 ;; https://github.com/PythonCharmers/python-future/issues/210
10658 (home-page "http://python-future.org")
10659 (synopsis "Single-source support for Python 3 and 2")
10661 "@code{python-future} is the missing compatibility layer between Python 2 and
10662 Python 3. It allows you to use a single, clean Python 3.x-compatible codebase
10663 to support both Python 2 and Python 3 with minimal overhead.")
10664 (license license:expat)))
10666 (define-public python2-future
10667 (package-with-python2 python-future))
10669 (define-public python-cysignals
10671 (name "python-cysignals")
10676 (uri (pypi-uri "cysignals" version ".tar.bz2"))
10679 "14cbyd9znlz6cxy1s3g6v6dv5jj45hn27pywkidd9b1zanaysqc6"))))
10680 (build-system python-build-system)
10682 `(("python-cython" ,python-cython)
10683 ("python-sphinx" ,python-sphinx)))
10685 `(("pari-gp" ,pari-gp)))
10687 `(#:modules ((guix build python-build-system)
10688 ((guix build gnu-build-system) #:prefix gnu:)
10689 (guix build utils))
10690 ;; FIXME: Tests are executed after installation and currently fail
10691 ;; when not installing into standard locations; the author is working
10695 (modify-phases %standard-phases
10698 (assoc-ref gnu:%standard-phases 'configure)))))
10700 "https://github.com/sagemath/cysignals")
10702 "Handling of interrupts and signals for Cython")
10704 "The cysignals package provides mechanisms to handle interrupts (and
10705 other signals and errors) in Cython code, using two related approaches,
10706 for mixed Cython/Python code or external C libraries and pure Cython code,
10708 (license license:lgpl3+)))
10710 (define-public python2-cysignals
10711 (package-with-python2 python-cysignals))
10713 (define-public python2-shedskin
10715 (name "python2-shedskin")
10720 (uri (string-append "https://github.com/shedskin/shedskin/"
10721 "releases/download/v" version
10722 "/shedskin-" version ".tgz"))
10725 "0nzwrzgw1ga8rw6f0ryq7zr9kkiavd1cqz5hzxkcbicl1dk7kz41"))))
10726 (build-system python-build-system)
10728 `(#:python ,python-2
10729 #:phases (modify-phases %standard-phases
10730 (add-after 'unpack 'fix-resulting-include-libs
10731 (lambda* (#:key inputs #:allow-other-keys)
10732 (let ((libgc (assoc-ref inputs "libgc"))
10733 (pcre (assoc-ref inputs "pcre")))
10734 (substitute* "shedskin/makefile.py"
10735 (("variable == 'CCFLAGS':[ ]*")
10736 (string-append "variable == 'CCFLAGS':\n"
10737 " line += ' -I " pcre "/include"
10738 " -I " libgc "/include'"))
10739 (("variable == 'LFLAGS':[ ]*")
10740 (string-append "variable == 'LFLAGS':\n"
10741 " line += ' -L" pcre "/lib"
10742 " -L " libgc "/lib'")))
10744 (inputs `(("pcre" ,pcre)
10746 (home-page "https://shedskin.github.io/")
10747 (synopsis "Experimental Python-2 to C++ Compiler")
10748 (description (string-append "This is an experimental compiler for a subset of
10749 Python. It generates C++ code and a Makefile."))
10750 (license (list license:gpl3 license:bsd-3 license:expat))))
10752 (define-public python2-rope
10754 (name "python2-rope")
10759 (uri (pypi-uri "rope" version))
10762 "18k5znhpwvrfck3yp0jmhd5j8r0f0s8bk1zh5yhs2cfgmfhbwigb"))))
10764 ;; Rope is currently python-2 only.
10765 ;; https://github.com/python-rope/rope/issues/57
10766 `(#:python ,python-2))
10767 (build-system python-build-system)
10769 `(("python2-unittest2" ,python2-unittest2)))
10770 (home-page "https://github.com/python-rope/rope")
10771 (synopsis "Refactoring library for Python")
10772 (description "Rope is a refactoring library for Python. It facilitates
10773 the renaming, moving and extracting of attributes, functions, modules, fields
10774 and parameters in Python 2 source code. These refactorings can also be applied
10775 to occurences in strings and comments.")
10776 (license license:gpl2)))
10778 (define-public python-py3status
10780 (name "python-py3status")
10785 (uri (pypi-uri "py3status" version))
10788 "0i283z1pivmir61z8kbiycigc94l61v33ygzkhczf1ifq7cppyds"))))
10789 (build-system python-build-system)
10791 '(#:tests? #f)) ; TODO: Requires many libraries not in Guix.
10792 (home-page "https://github.com/ultrabug/py3status")
10793 (synopsis "Extensible i3status wrapper written in Python")
10794 (description "py3status is an i3status wrapper which extends i3status
10795 functionality in a modular way, allowing you to extend your panel with your
10796 own code, responding to click events and updating clock every second.")
10797 (license license:bsd-3)))
10799 (define-public python-tblib
10801 (name "python-tblib")
10805 (uri (pypi-uri "tblib" version))
10807 "02iahfkfa927hb4jq2bak36ldihwapzacfiq5lyxg8llwn98a1yi"))))
10808 (build-system python-build-system)
10811 (modify-phases %standard-phases
10814 ;; Upstream runs tests after installation and the package itself
10815 ;; resides in a subdirectory. Extend PYTHONPATH so it will be
10817 (setenv "PYTHONPATH"
10818 (string-append (getcwd) "/build/lib:"
10819 (getenv "PYTHONPATH")))
10820 (zero? (system* "py.test" "-vv" "tests" "README.rst")))))))
10822 `(("python-pytest" ,python-pytest)
10823 ("python-six" ,python-six)))
10824 (home-page "https://github.com/ionelmc/python-tblib")
10825 (synopsis "Traceback serialization library")
10827 "Traceback serialization allows you to:
10830 @item Pickle tracebacks and raise exceptions with pickled tracebacks in
10831 different processes. This allows better error handling when running code over
10832 multiple processes (imagine multiprocessing, billiard, futures, celery etc).
10834 @item Parse traceback strings and raise with the parsed tracebacks.
10836 (license license:bsd-3)))
10838 (define-public python2-tblib
10839 (package-with-python2 python-tblib))
10841 (define-public python-sqlparse
10843 (name "python-sqlparse")
10847 (uri (pypi-uri "sqlparse" version))
10850 "1s2fvaxgh9kqzrd6iwy5h7i61ckn05plx9np13zby93z3hdbx5nq"))))
10851 (build-system python-build-system)
10854 (modify-phases %standard-phases
10857 ;; setup.py-integrated 2to3 only affects the build files, but
10858 ;; py.test is using the source files. So we need to convert them
10860 (when (zero? (system* "python3"))
10861 (system* "2to3" "--no-diff" "-wn" "sqlparse" "tests"))
10862 (zero? (system* "py.test")))))))
10864 `(("python-pytest" ,python-pytest)))
10865 (home-page "https://github.com/andialbrecht/sqlparse")
10866 (synopsis "Non-validating SQL parser")
10867 (description "Sqlparse is a non-validating SQL parser for Python. It
10868 provides support for parsing, splitting and formatting SQL statements.")
10869 (license license:bsd-3)))
10871 (define-public python2-sqlparse
10872 (package-with-python2 python-sqlparse))
10874 (define-public python-greenlet
10876 (name "python-greenlet")
10880 (uri (pypi-uri "greenlet" version))
10883 "1xhik26j4f3kc4qw9xmj0c567rb5h1zryb4ijwqnqwwjvfhbv59h"))))
10884 (build-system python-build-system)
10885 (home-page "https://greenlet.readthedocs.io/")
10886 (synopsis "Lightweight in-process concurrent programming")
10888 "Greenlet package is a spin-off of Stackless, a version of CPython
10889 that supports micro-threads called \"tasklets\". Tasklets run
10890 pseudo-concurrently (typically in a single or a few OS-level threads) and
10891 are synchronized with data exchanges on \"channels\".")
10892 (license (list license:psfl license:expat))))
10894 (define-public python2-greenlet
10895 (package-with-python2 python-greenlet))
10897 (define-public python-gevent
10899 (name "python-gevent")
10903 (uri (pypi-uri "gevent" version))
10906 "1smf3kvidpdiyi2c81alal74p2zm0clrm6xbyy6y1k9a3f2vkrbf"))
10907 (modules '((guix build utils)))
10910 ;; unbunding libev and c-ares
10911 (for-each delete-file-recursively '("libev" "c-ares"))
10912 ;; fixing testsuite
10913 (call-with-output-file "greentest/__init__.py" noop)
10914 (substitute* "greentest/testrunner.py"
10915 (("import util") "from . import util")
10916 (("from util import log") "from .util import log"))))))
10917 (build-system python-build-system)
10919 `(("python-greenlet" ,python-greenlet)))
10921 `(("python-six" ,python-six)))
10923 `(("c-ares" ,c-ares)
10925 (home-page "http://www.gevent.org/")
10926 (synopsis "Coroutine-based network library")
10928 "gevent is a coroutine-based Python networking library that uses greenlet
10929 to provide a high-level synchronous API on top of the libev event loop.")
10930 (license license:expat)))
10932 (define-public python2-gevent
10933 (package-with-python2 python-gevent))
10935 (define-public python-geventhttpclient
10937 (name "python-geventhttpclient")
10941 (uri (pypi-uri "geventhttpclient" version))
10944 "07d0q3wzmml75227r6y6mrl5a0zpf4v9gj0ni5rhbyzmaj4az1xx"))
10945 (modules '((guix build utils)))
10948 ;; Delete pre-compiled files.
10949 (for-each delete-file (find-files "src/geventhttpclient"
10952 (build-system python-build-system)
10955 (modify-phases %standard-phases
10956 (add-after 'unpack 'delete-network-tests
10958 (delete-file "src/geventhttpclient/tests/test_client.py")
10961 (add-after 'install 'check
10962 (lambda* (#:key inputs outputs #:allow-other-keys)
10963 (add-installed-pythonpath inputs outputs)
10964 (zero? (system* "py.test" "src/geventhttpclient/tests" "-v")))))))
10966 `(("python-pytest" ,python-pytest)))
10968 `(("python-certifi" ,python-certifi)
10969 ("python-gevent" ,python-gevent)
10970 ("python-six" ,python-six)))
10971 (home-page "https://github.com/gwik/geventhttpclient")
10972 (synopsis "HTTP client library for gevent")
10973 (description "@code{python-geventhttpclient} is a high performance,
10974 concurrent HTTP client library for python using @code{gevent}.")
10975 (license license:expat)))
10977 (define-public python2-geventhttpclient
10978 (package-with-python2 python-geventhttpclient))
10980 (define-public python-fastimport
10982 (name "python-fastimport")
10987 (uri (pypi-uri "fastimport" version))
10989 (base32 "1aqjsin4rmqm7ln4j0p73fzxifws6c6ikgyhav7r137m2ixsxl43"))))
10990 (build-system python-build-system)
10991 (home-page "https://github.com/jelmer/python-fastimport")
10992 (synopsis "VCS fastimport parser and generator in Python")
10993 (description "This package provides a parser for and generator of the Git
10994 @url{https://www.kernel.org/pub/software/scm/git/docs/git-fast-import.html,fastimport}
10996 (license license:gpl2+)))
10998 (define-public python2-fastimport
10999 (package-with-python2 python-fastimport))
11001 (define-public python-twisted
11003 (name "python-twisted")
11007 (uri (pypi-uri "Twisted" version ".tar.bz2"))
11010 "0ydxrp9myw1mvsz3qfzx5579y5llmqa82pxvqchgp5syczffi450"))))
11011 (build-system python-build-system)
11013 '(#:tests? #f)) ; FIXME: Some tests are failing.
11015 ;; (modify-phases %standard-phases
11018 ;; (zero? (system* "./bin/trial" "twisted")))))
11020 `(("python-zope-interface" ,python-zope-interface)))
11021 (home-page "https://twistedmatrix.com/")
11022 (synopsis "Asynchronous networking framework written in Python")
11024 "Twisted is an extensible framework for Python programming, with special
11025 focus on event-based network programming and multiprotocol integration.")
11026 (license license:expat)))
11028 (define-public python2-twisted
11029 (package-with-python2 python-twisted))
11031 (define-public python-pika
11033 (name "python-pika")
11038 (uri (pypi-uri "pika" version))
11041 "0nb4h08di432lv7dy2v9kpwgk0w92f24sqc2hw2s9vwr5b8v8xvj"))))
11042 (build-system python-build-system)
11044 `(("python-pyev" ,python-pyev)
11045 ("python-tornado" ,python-tornado)
11046 ("python-twisted" ,python-twisted)))
11047 (home-page "https://pika.readthedocs.org")
11048 (synopsis "Pure Python AMQP Client Library")
11050 "Pika is a pure-Python implementation of the AMQP (Advanced Message Queuing
11051 Protocol) 0-9-1 protocol that tries to stay fairly independent of the underlying
11052 network support library.")
11053 (license license:bsd-3)))
11055 (define-public python2-pika
11056 (package-with-python2 python-pika))
11058 (define-public python-ply
11060 (name "python-ply")
11065 (uri (pypi-uri "ply" version))
11068 "0gpl0yli3w03ipyqfrp3w5nf0iawhsq65anf5wwm2wf5p502jzhd"))))
11069 (build-system python-build-system)
11070 (home-page "http://www.dabeaz.com/ply/")
11071 (synopsis "Python Lex & Yacc")
11072 (description "PLY is a @code{lex}/@code{yacc} implemented purely in Python.
11073 It uses LR parsing and does extensive error checking.")
11074 (license license:bsd-3)))
11076 (define-public python2-ply
11077 (package-with-python2 python-ply))
11079 (define-public python-tabulate
11081 (name "python-tabulate")
11085 (uri (pypi-uri "tabulate" version))
11088 "1inqhspd4frxnp08c32yndr0lc4px1xfkqah184i5w09gkhvi843"))))
11089 (build-system python-build-system)
11091 ;; FIXME: The pypi release tarball is missing a 'test/common.py'
11092 ;; and the latest release is not tagged in the upstream repository.
11094 (home-page "https://bitbucket.org/astanin/python-tabulate")
11095 (synopsis "Pretty-print tabular data")
11097 "Tabulate is a library and command-line utility to pretty-print tabular
11099 (license license:expat)))
11101 (define-public python2-tabulate
11102 (package-with-python2 python-tabulate))
11104 (define-public python-kazoo
11106 (name "python-kazoo")
11111 (uri (pypi-uri "kazoo" version))
11114 "10pb864if9qi2pq9lfb9m8f7z7ss6rml80gf1d9h64lap5crjnjj"))))
11115 (build-system python-build-system)
11116 (arguments '(#:tests? #f)) ; XXX: needs zookeeper
11118 `(("python-six" ,python-six)))
11119 (home-page "https://kazoo.readthedocs.org")
11120 (synopsis "High-level Zookeeper client library")
11122 "Kazoo is a Python client library for the Apache Zookeeper distributed
11123 application service. It is designed to be easy to use and to avoid common
11124 programming errors.")
11125 (license license:asl2.0)))
11127 (define-public python2-kazoo
11128 (package-with-python2 python-kazoo))
11130 (define-public python-pykafka
11132 (name "python-pykafka")
11136 (uri (string-append
11137 "https://pypi.python.org/packages/8b/3e/"
11138 "384eeff406b06315738b62483fd2126c6e4f544167116b17cc04ea7d2a59/"
11139 "pykafka-" version ".tar.gz"))
11142 "1id6sr159p6aa13bxcqyr9gln8sqg1l0ddzns5iws8kk5q1p5cfv"))))
11143 (build-system python-build-system)
11144 (arguments '(#:tests? #f)) ; XXX: needs zookeeper, kafka, etc.
11146 `(("python-gevent" ,python-gevent)
11147 ("python-kazoo" ,python-kazoo)
11148 ("python-tabulate" ,python-tabulate)))
11150 `(("librdkafka" ,librdkafka)))
11151 (home-page "https://pykafka.readthedocs.io/")
11152 (synopsis "Apache Kafka client for Python")
11154 "PyKafka is a client for the Apache Kafka distributed messaging system.
11155 It includes Python implementations of Kafka producers and consumers, which
11156 are optionally backed by a C extension built on librdkafka.")
11157 (license license:asl2.0)))
11159 (define-public python2-pykafka
11160 (package-with-python2 python-pykafka))
11162 (define-public python-wcwidth
11164 (name "python-wcwidth")
11169 (uri (pypi-uri "wcwidth" version))
11172 "0pn6dflzm609m4r3i8ik5ni9ijjbb5fa3vg1n7hn6vkd49r77wrx"))))
11173 (build-system python-build-system)
11174 (home-page "https://github.com/jquast/wcwidth")
11175 (synopsis "Measure number of terminal column cells of wide-character codes")
11176 (description "Wcwidth measures the number of terminal column cells of
11177 wide-character codes. It is useful for those implementing a terminal emulator,
11178 or programs that carefully produce output to be interpreted by one. It is a
11179 Python implementation of the @code{wcwidth} and @code{wcswidth} C functions
11180 specified in POSIX.1-2001 and POSIX.1-2008.")
11181 (license license:expat)))
11183 (define-public python2-wcwidth
11184 (package-with-python2 python-wcwidth))
11186 (define-public python2-jsonrpclib
11188 (name "python2-jsonrpclib")
11192 (uri (string-append
11193 "https://pypi.python.org/packages/source/j/jsonrpclib/"
11194 "jsonrpclib-" version ".tar.gz"))
11197 "02vgirw2bcgvpcxhv5hf3yvvb4h5wzd1lpjx8na5psdmaffj6l3z"))))
11198 (build-system python-build-system)
11201 #:python ,python-2))
11202 (home-page "https://github.com/joshmarshall/jsonrpclib/")
11203 (synopsis "Implementation of JSON-RPC specification for Python")
11205 "This library is an implementation of the JSON-RPC specification.
11206 It supports both the original 1.0 specification, as well as the
11207 new (proposed) 2.0 spec, which includes batch submission, keyword arguments,
11209 (license license:asl2.0)))
11211 (define-public python-chai
11213 (name "python-chai")
11217 (uri (pypi-uri "chai" version))
11220 "016kf3irrclpkpvcm7q0gmkfibq7jgy30a9v73pp42bq9h9a32bl"))))
11221 (build-system python-build-system)
11222 (home-page "https://github.com/agoragames/chai")
11223 (synopsis "Mocking framework for Python")
11225 "Chai provides an api for mocking, stubbing and spying your python
11226 objects, patterned after the Mocha library for Ruby.")
11227 (license license:bsd-3)))
11229 (define-public python2-chai
11230 (package-with-python2 python-chai))
11232 (define-public python-arrow
11234 (name "python-arrow")
11238 (uri (pypi-uri "arrow" version))
11241 "1bz7hkdgpqcjs866y58z8jywpy7al0f4rxdr00bh2l5qddyw245j"))))
11242 (build-system python-build-system)
11245 ("python-chai" ,python-chai)
11246 ("python-simplejson" ,python-simplejson)))
11248 `(("python-dateutil" ,python-dateutil)))
11249 (home-page "https://github.com/crsmithdev/arrow/")
11250 (synopsis "Dates and times for Python")
11252 "Arrow is a Python library to creating, manipulating, formatting and
11253 converting dates, times, and timestamps. It implements and updates the
11255 (license license:asl2.0)))
11257 (define-public python2-arrow
11258 (package-with-python2 python-arrow))
11260 (define-public python-inflection
11262 (name "python-inflection")
11265 (origin (method url-fetch)
11266 (uri (pypi-uri "inflection" version))
11269 "1jhnxgnw8y3mbzjssixh6qkc7a3afc4fygajhqrqalnilyvpzshq"))))
11270 (build-system python-build-system)
11272 `(("python-pytest" ,python-pytest)))
11273 (home-page "http://github.com/jpvanhal/inflection")
11274 (synopsis "Python string transformation library")
11276 "Inflection is a string transformation library. It singularizes
11277 and pluralizes English words, and transforms strings from CamelCase to
11278 underscored string.")
11279 (license license:expat)))
11281 (define-public python2-inflection
11282 (package-with-python2 python-inflection))
11284 (define-public python-pylev
11286 (name "python-pylev")
11290 (uri (pypi-uri "pylev" version))
11293 "1hz1x9blsbxya1y9nnhnwwdnqmakxi9mc0jkwj0rn6b1h44i0f86"))))
11294 (build-system python-build-system)
11295 (home-page "http://github.com/toastdriven/pylev")
11296 (synopsis "Levenshtein distance implementation in Python")
11297 (description "Pure Python Levenshtein implementation, based off the
11298 Wikipedia code samples at
11299 @url{http://en.wikipedia.org/wiki/Levenshtein_distance}.")
11300 (license license:bsd-3)))
11302 (define-public python2-pylev
11303 (package-with-python2 python-pylev))
11305 (define-public python-cleo
11307 (name "python-cleo")
11311 (uri (pypi-uri "cleo" version))
11314 "1k2dcl6mqpn5bljyl6w42rqyd9mb3y9kh2mg7m2x3kfjwvg0rpva"))))
11315 (build-system python-build-system)
11318 ("python-mock" ,python-mock)
11319 ("python-pytest" ,python-pytest)))
11321 `(("python-psutil" ,python-psutil)
11322 ("python-pylev" ,python-pylev)))
11323 (home-page "https://github.com/sdispater/cleo")
11324 (synopsis "Command-line arguments library for Python")
11326 "Cleo allows you to create command-line commands with signature in
11327 docstring and colored output.")
11328 (license license:expat)))
11330 (define-public python2-cleo
11331 (package-with-python2 python-cleo))
11333 (define-public python-lazy-object-proxy
11335 (name "python-lazy-object-proxy")
11339 (uri (pypi-uri "lazy-object-proxy" version))
11342 "0s22aqqkdscyh8sjspyyax7qa1aiz8p4midrnyf39717fhfczm6x"))))
11343 (build-system python-build-system)
11344 (home-page "https://github.com/ionelmc/python-lazy-object-proxy")
11345 (synopsis "Lazy object proxy for python")
11347 "Lazy object proxy is an object that wraps a callable but defers the call
11348 until the object is actually required, and caches the result of said call.")
11349 (license license:bsd-2)))
11351 (define-public python2-lazy-object-proxy
11352 (package-with-python2 python-lazy-object-proxy))
11354 (define-public python-dnspython
11356 (name "python-dnspython")
11360 (uri (string-append "http://www.dnspython.org/kits/"
11361 version "/dnspython-" version ".tar.gz"))
11364 "0jr4v2pd90i6l1xxbss2m05psbjaxvyvvvpq44wycijpfgjqln8i"))))
11365 (build-system python-build-system)
11366 (arguments '(#:tests? #f)) ; XXX: requires internet access
11367 (home-page "http://www.dnspython.org")
11368 (synopsis "DNS toolkit for Python")
11370 "dnspython is a DNS toolkit for Python. It supports almost all record
11371 types. It can be used for queries, zone transfers, and dynamic updates.
11372 It supports TSIG authenticated messages and EDNS0.")
11373 (license license:expat)))
11375 (define-public python2-dnspython
11376 (package-with-python2 python-dnspython))
11378 (define-public python-email-validator
11380 (name "python-email-validator")
11383 (origin (method url-fetch)
11384 (uri (pypi-uri "email_validator" version))
11387 "1ja9149l9ck5n45a72h3is7v476hjny5ybxbcamx1nw6iplsm7k6"))))
11388 (build-system python-build-system)
11391 (modify-phases %standard-phases
11392 (add-before 'build 'use-dnspython
11394 (substitute* "setup.py"
11395 (("dnspython3") "dnspython"))
11398 `(("python-dnspython" ,python-dnspython)
11399 ("python-idna" ,python-idna)))
11400 (home-page "https://github.com/JoshData/python-email-validator")
11401 (synopsis "Email address validation library for Python")
11403 "This library validates email address syntax and deliverability.")
11404 (license license:cc0)))
11406 (define-public python2-email-validator
11407 (package-with-python2 python-email-validator))
11409 (define-public python-ukpostcodeparser
11411 (name "python-ukpostcodeparser")
11415 (uri (pypi-uri "UkPostcodeParser" version))
11418 "1jwg9z4rz51mcka1821rwgycsd0mcicyp1kiwjfa2kvg8bm9p2qd"))))
11419 (build-system python-build-system)
11420 (home-page "https://github.com/hamstah/ukpostcodeparser")
11421 (synopsis "UK Postcode parser for Python")
11423 "This library provides the @code{parse_uk_postcode} function for
11424 parsing UK postcodes.")
11425 (license license:expat)))
11427 (define-public python2-ukpostcodeparser
11428 (package-with-python2 python-ukpostcodeparser))
11430 (define-public python-faker
11432 (name "python-faker")
11436 (uri (pypi-uri "Faker" version))
11439 "1fh2p2yz0fsdr4fqwxgddwbvfb6qn6vp8yx0qwqzra27yq5d1wsm"))
11441 (search-patches "python-faker-fix-build-32bit.patch"))
11442 (modules '((guix build utils)))
11445 (for-each delete-file (find-files "." "\\.pyc$"))
11447 (build-system python-build-system)
11450 (modify-phases %standard-phases
11453 (zero? (system* "python" "-m" "unittest" "-v" "tests")))))))
11456 ("python-email-validator" ,python-email-validator)
11457 ("python-mock" ,python-mock)
11458 ("python-ukpostcodeparser" ,python-ukpostcodeparser)))
11460 `(("python-dateutil" ,python-dateutil)
11461 ("python-six" ,python-six)))
11462 (home-page "https://github.com/joke2k/faker")
11463 (synopsis "Python package that generates fake data")
11465 "Faker is a Python package that generates fake data such as names,
11466 addresses, and phone numbers.")
11467 (license license:expat)
11468 (properties `((python2-variant . ,(delay python2-faker))))))
11470 (define-public python2-faker
11471 (let ((base (package-with-python2 (strip-python2-variant
11476 `(("python2-ipaddress" ,python2-ipaddress)
11477 ,@(package-propagated-inputs base))))))
11479 (define-public python-fake-factory
11481 (name "python-fake-factory")
11485 (uri (pypi-uri "fake-factory" version))
11488 "0vs0dkmg0dlaxf8w6q2i3k0i03gmp56ablldv7ci9x3nbadkn71g"))
11491 "python-fake-factory-fix-build-32bit.patch"))))
11492 (build-system python-build-system)
11495 (modify-phases %standard-phases
11498 (zero? (system* "python" "-m" "unittest" "-v" "faker.tests")))))))
11501 ("python-email-validator" ,python-email-validator)
11502 ("python-mock" ,python-mock)
11503 ("python-ukpostcodeparser" ,python-ukpostcodeparser)))
11505 `(("python-dateutil" ,python-dateutil)
11506 ("python-six" ,python-six)))
11507 (home-page "https://github.com/joke2k/faker")
11508 (synopsis "Python package that generates fake data")
11510 "Faker is a Python package that generates fake data such as names,
11511 addresses, and phone numbers.")
11512 (license license:expat)
11513 (properties `((python2-variant . ,(delay python2-fake-factory))
11514 (superseded . ,python-faker)))))
11516 (define-public python2-fake-factory
11517 (let ((base (package-with-python2 (strip-python2-variant
11518 python-fake-factory))))
11521 (properties `((superseded . ,python2-faker)))
11523 `(("python2-ipaddress" ,python2-ipaddress)
11524 ,@(package-propagated-inputs base))))))
11526 (define-public python-pyaml
11528 (name "python-pyaml")
11532 (uri (pypi-uri "pyaml" version))
11535 "1f5m28vkh4ksq3d80d8mmd2z8wxvc3mgy2pmrv2751dm2xgznm4w"))))
11536 (build-system python-build-system)
11538 `(("python-unidecode" ,python-unidecode)))
11540 `(("python-pyyaml" ,python-pyyaml)))
11541 (home-page "https://github.com/mk-fg/pretty-yaml")
11542 (synopsis "YAML pretty-print library for Python")
11544 "pyaml is a PyYAML based python module to produce pretty and readable
11545 YAML-serialized data.")
11546 (license (license:non-copyleft "http://www.wtfpl.net/txt/copying/"))))
11548 (define-public python2-pyaml
11549 (package-with-python2 python-pyaml))
11551 (define-public python-flexmock
11553 (name "python-flexmock")
11557 (uri (pypi-uri "flexmock" version))
11560 "0arc6njvs6i9v9hgvzk5m50296g7zy5m9d7pyb43vdsdgxrci5gy"))))
11561 (build-system python-build-system)
11562 (home-page "https://flexmock.readthedocs.org")
11563 (synopsis "Testing library for Python")
11565 "flexmock is a testing library for Python that makes it easy to create
11566 mocks, stubs and fakes.")
11567 (license license:bsd-3)))
11569 (define-public python2-flexmock
11570 (package-with-python2 python-flexmock))
11572 (define-public python-orator
11574 (name "python-orator")
11578 (uri (pypi-uri "orator" version))
11581 "1li49irsqha17nrda4nsb48biyy0rarp9pphf0jpqwm5zr8hv569"))))
11582 (build-system python-build-system)
11583 (arguments '(#:tests? #f)) ; no tests
11585 `(("python-arrow" ,python-arrow)
11586 ("python-blinker" ,python-blinker)
11587 ("python-cleo" ,python-cleo)
11588 ("python-faker" ,python-faker)
11589 ("python-inflection" ,python-inflection)
11590 ("python-lazy-object-proxy" ,python-lazy-object-proxy)
11591 ("python-pyaml" ,python-pyaml)
11592 ("python-simplejson" ,python-simplejson)
11593 ("python-wrapt" ,python-wrapt)))
11594 (home-page "https://orator-orm.com/")
11595 (synopsis "ActiveRecord ORM for Python")
11597 "Orator provides a simple ActiveRecord-like Object Relational Mapping
11598 implementation for Python.")
11599 (license license:expat)
11600 (properties `((python2-variant . ,(delay python2-orator))))))
11602 (define-public python2-orator
11603 (let ((base (package-with-python2 (strip-python2-variant python-orator))))
11607 `(("python2-ipaddress" ,python2-ipaddress)
11608 ,@(package-propagated-inputs base))))))
11610 (define-public python-prompt-toolkit
11612 (name "python-prompt-toolkit")
11617 (uri (pypi-uri "prompt_toolkit" version ".tar.gz"))
11620 "172r15k9kwdw2lnajvpz1632dd16nqz1kcal1p0lq5ywdarj6rfd"))))
11621 (build-system python-build-system)
11623 '(#:tests? #f)) ; The test suite uses some Windows-specific data types.
11625 `(("python-wcwidth" ,python-wcwidth)
11626 ("python-six" ,python-six)
11627 ("python-pygments" ,python-pygments)))
11628 (home-page "https://github.com/jonathanslenders/python-prompt-toolkit")
11629 (synopsis "Library for building command line interfaces in Python")
11631 "Prompt-Toolkit is a library for building interactive command line
11632 interfaces in Python. It's like GNU Readline but it also features syntax
11633 highlighting while typing, out-of-the-box multi-line input editing, advanced
11634 code completion, incremental search, support for Chinese double-width
11635 characters, mouse support, and auto suggestions.")
11636 (license license:bsd-3)))
11638 (define-public python2-prompt-toolkit
11639 (package-with-python2 python-prompt-toolkit))
11641 (define-public python-jedi
11643 (name "python-jedi")
11648 (uri (pypi-uri "jedi" version))
11651 "0c8x962ynpx001fdvp07m2q5jk4igkxbj3rmnydavphvlgxijk1v"))))
11652 (build-system python-build-system)
11654 ;; FIXME: One test fails (use "py.test" instead of 'setup.py test').
11657 `(("python-pytest" ,python-pytest)))
11658 (home-page "https://github.com/davidhalter/jedi")
11660 "Autocompletion for Python that can be used for text editors")
11662 "Jedi is an autocompletion tool for Python that can be used for text editors.")
11663 (license license:expat)))
11665 (define-public python2-jedi
11666 (package-with-python2 python-jedi))
11668 (define-public ptpython
11674 (uri (pypi-uri "ptpython" version))
11677 "1mmbiyzf0n8hm7z2a562x7w5cbl6jc0zsk6vp40q1z4cyblv1k13"))))
11678 (build-system python-build-system)
11680 '(#:tests? #f)) ; FIXME: No tests in pypi tarball.
11682 `(("python-docopt" ,python-docopt)
11683 ("python-jedi" ,python-jedi)
11684 ("python-prompt-toolkit" ,python-prompt-toolkit)
11685 ("python-pygments" ,python-pygments)))
11686 (home-page "https://github.com/jonathanslenders/ptpython")
11687 (synopsis "Python Read-Eval-Print-Loop with nice IDE-like features")
11689 "ptpython is a Python read-eval-print loop with IDE-like features.
11690 It supports syntax highlighting, multiline editing, autocompletion, mouse,
11691 color schemes, bracketed paste, Vi and Emacs keybindings, Chinese characters
11693 (license license:bsd-3)
11694 (properties `((python2-variant . ,(delay ptpython-2))))))
11696 (define-public ptpython-2
11697 (let ((base (package-with-python2 (strip-python2-variant ptpython))))
11700 (name "ptpython2"))))
11702 (define-public python-requests-oauthlib
11704 (name "python-requests-oauthlib")
11709 (uri (pypi-uri "requests-oauthlib" version))
11712 "0ykff67sjcl227c23g0rxzfx34rr5bf21kwv0z3zmgk0lfmch7hn"))))
11713 (build-system python-build-system)
11716 (modify-phases %standard-phases
11717 ;; removes tests that require network access
11718 (add-before 'check 'pre-check
11720 (delete-file "tests/test_core.py")
11723 `(("python-requests-mock" ,python-requests-mock)
11724 ("python-mock" ,python-mock)))
11726 `(("python-oauthlib" ,python-oauthlib)
11727 ("python-requests" ,python-requests)))
11729 "https://github.com/requests/requests-oauthlib")
11731 "OAuthlib authentication support for Requests")
11733 "Requests-OAuthlib uses the Python Requests and OAuthlib libraries to
11734 provide an easy-to-use Python interface for building OAuth1 and OAuth2 clients.")
11735 (license license:isc)))
11737 (define-public python2-requests-oauthlib
11738 (package-with-python2 python-requests-oauthlib))
11740 (define-public python-stem
11742 (name "python-stem")
11747 (uri (pypi-uri "stem" version))
11750 "1j7pnblrn0yr6jmxvsq6y0ihmxmj5x50jl2n2606w67f6wq16j9n"))))
11751 (build-system python-build-system)
11754 (modify-phases %standard-phases
11757 (zero? (system* "./run_tests.py" "--unit")))))))
11759 `(("python-mock" ,python-mock)
11760 ("python-pep8" ,python-pep8)
11761 ("python-pyflakes" ,python-pyflakes)))
11762 (home-page "https://stem.torproject.org/")
11764 "Python controller library that allows applications to interact with Tor")
11766 "Stem is a Python controller library for Tor. With it you can use Tor's
11767 control protocol to script against the Tor process and read descriptor data
11768 relays publish about themselves.")
11769 (license license:lgpl3)))
11771 (define-public python2-stem
11772 (package-with-python2 python-stem))
11774 (define-public python-pyserial
11776 (name "python-pyserial")
11781 (uri (pypi-uri "pyserial" version))
11784 "0k1nfdrxxkdlv4zgaqsdv8li0pj3gbh2pyxw8q2bsg6f9490amyn"))))
11785 (build-system python-build-system)
11787 '(#:tests? #f)) ; FIXME: 3/49 tests are failing.
11789 ;; (modify-phases %standard-phases
11792 ;; (zero? (system* "python" "test/run_all_tests.py" "loop://")))))))
11794 "https://github.com/pyserial/pyserial")
11795 (synopsis "Python Serial Port Bindings")
11796 (description "@code{pyserial} provide serial port bindings for Python. It
11797 supports different byte sizes, stop bits, parity and flow control with RTS/CTS
11798 and/or Xon/Xoff. The port is accessed in RAW mode.")
11799 (license license:bsd-3)))
11801 (define-public python2-pyserial
11802 (package-with-python2 python-pyserial))
11804 (define-public python-kivy
11806 (name "python-kivy")
11811 (uri (pypi-uri "kivy" version))
11812 (file-name (string-append name "-" version ".tar.gz"))
11815 "0zk3g1j1z0lzcm9d0k1lprrs95zr8n8k5pdg3p5qlsn26jz4bg19"))))
11816 (build-system python-build-system)
11818 `(#:tests? #f ; Tests require many optional packages
11820 (modify-phases %standard-phases
11821 (replace 'build (lambda _ (zero? (system* "make" "force"))))
11822 (add-after 'patch-generated-file-shebangs 'set-sdl-paths
11823 (lambda* (#:key inputs #:allow-other-keys)
11824 (setenv "KIVY_SDL2_PATH"
11825 (string-append (assoc-ref inputs "sdl-union")
11829 `(("pkg-config" ,pkg-config)
11830 ("python-cython" ,python-cython)))
11832 `(("gstreamer" ,gstreamer)
11835 ,(sdl-union (list sdl2 sdl2-image sdl2-mixer sdl2-ttf)))))
11836 (home-page "http://kivy.org")
11838 "Multitouch application framework")
11840 "A software library for rapid development of
11841 hardware-accelerated multitouch applications.")
11842 (license license:expat)))
11844 (define-public python2-kivy
11845 (package-with-python2 python-kivy))
11847 (define-public python-kivy-next
11848 (let ((commit "a988c5e7a47da56263ff39514264a3de516ef2fe")
11850 (package (inherit python-kivy)
11851 (name "python-kivy-next")
11852 (version (string-append "1.9.1-" revision "."
11853 (string-take commit 7)))
11857 (uri (git-reference
11858 (url "https://github.com/kivy/kivy")
11860 (file-name (string-append name "-" version "-checkout"))
11863 "0jk92b4a8l7blkvkgkjihk171s0dfnq582cckff5srwc8kal5m0p")))))))
11865 (define-public python2-kivy-next
11866 (package-with-python2 python-kivy-next))
11868 (define-public python-binaryornot
11870 (name "python-binaryornot")
11874 (uri (pypi-uri "binaryornot" version))
11877 "1j4f51dxic39mdwf6alj7gd769wy6mhk916v031wjali51xkh3xb"))))
11878 (build-system python-build-system)
11880 `(("python-chardet" ,python-chardet)
11881 ("python-hypothesis" ,python-hypothesis)))
11882 (home-page "https://github.com/audreyr/binaryornot")
11883 (synopsis "Package to check if a file is binary or text")
11884 (description "Ultra-lightweight pure Python package to check if a file is
11886 (license license:bsd-3)
11887 (properties `((python2-variant . ,(delay python2-binaryornot))))))
11889 (define-public python2-binaryornot
11890 (let ((base (package-with-python2 (strip-python2-variant python-binaryornot))))
11891 (package (inherit base)
11893 `(("python2-enum34" ,python2-enum34)
11894 ,@(package-propagated-inputs base))))))
11896 (define-public python-nltk
11898 (name "python-nltk")
11902 (uri (pypi-uri "nltk" version))
11905 "0skxbhnymwlspjkzga0f7x1hg3y50fwpfghs8g8k7fh6f4nknlym"))))
11906 (build-system python-build-system)
11908 '(;; The tests require some extra resources to be downloaded.
11909 ;; TODO Try packaging these resources.
11911 (home-page "http://nltk.org/")
11912 (synopsis "Natural Language Toolkit")
11913 (description "It provides interfaces to over 50 corpora and lexical
11914 resources such as WordNet, along with a suite of text processing libraries
11915 for classification, tokenization, stemming, tagging, parsing, and semantic
11916 reasoning, wrappers for natural language processing libraries.")
11917 (license license:asl2.0)))
11919 (define-public python2-nltk
11920 (package-with-python2 python-nltk))
11922 (define-public python-pymongo
11924 (name "python-pymongo")
11928 (uri (pypi-uri "pymongo" version))
11931 "07mra6w86wjqy4lx5fvimidjhhfzd562gfjn8grsnbv2q8pk0i9x"))))
11932 (build-system python-build-system)
11934 `(("python-certifi" ,python-certifi)))
11935 (home-page "http://github.com/mongodb/mongo-python-driver")
11936 (synopsis "Python driver for MongoDB")
11937 (description "Python driver for MongoDB.")
11938 (license license:asl2.0)))
11940 (define-public python2-pymongo
11941 (package-with-python2 python-pymongo))
11943 (define-public python-sh
11949 (uri (pypi-uri "sh" version))
11952 "192r0mpv6dmkysjzhc43ddffiwb5g7c76bgr1mb1z2xz9awbj3sr"))))
11953 (build-system python-build-system)
11955 `(#:tests? #f)) ; no tests
11956 (home-page "https://github.com/amoffat/sh")
11957 (synopsis "Python subprocess interface")
11958 (description "Abstracts process invocation by providing a function
11959 interface for programs.")
11960 (license license:expat)))
11962 (define-public python2-sh
11963 (package-with-python2 python-sh))
11965 (define-public python-consul
11967 (name "python-consul")
11972 (uri (pypi-uri "python-consul" version))
11975 "0rfyxcy4cr3x848vhx876ifalxd5ghq6l5x813m49h4vq2d4jiq8"))))
11976 (build-system python-build-system)
11978 `(("python-pytest" ,python-pytest)))
11980 `(("python-requests" ,python-requests)
11981 ("python-six" ,python-six)))
11982 (home-page "https://github.com/cablehead/python-consul")
11983 (synopsis "Python client for Consul")
11985 "Python client for @url{http://www.consul.io/,Consul}, a tool for service
11986 discovery, monitoring and configuration.")
11987 (license license:expat)))
11989 (define-public python2-consul
11990 (package-with-python2 python-consul))
11992 (define-public python-schematics
11994 (name "python-schematics")
11999 (uri (string-append
12000 "https://github.com/schematics/schematics/archive/v" version ".tar.gz"))
12001 (file-name (string-append name "-" version ".tar.gz"))
12004 "19v1i69bf3bzarfxmbv0v6ivpcn758x3shvbiy9l2hy0lvqwnp6l"))))
12005 (build-system python-build-system)
12007 `(("python-six" ,python-six)))
12009 `(#:tests? #f)) ; requires a bunch of not very nice packages with fixed
12010 ; version requirements (eg python-coveralls)
12011 (home-page "https://github.com/schematics/schematics")
12012 (synopsis "Python Data Structures for Humans")
12013 (description "Python Data Structures for Humans.")
12014 (license license:bsd-3)))
12016 (define-public python2-schematics
12017 (package-with-python2 python-schematics))
12019 (define-public python-publicsuffix
12021 (name "python-publicsuffix")
12025 (uri (pypi-uri "publicsuffix" version))
12028 "1adx520249z2cy7ykwjr1k190mn2888wqn9jf8qm27ly4qymjxxf"))))
12029 (build-system python-build-system)
12031 `(#:tests? #f)) ; tests use the internet
12032 (home-page "https://www.tablix.org/~avian/git/publicsuffix.git")
12033 (synopsis "Get suffix for a domain name")
12034 (description "Get a public suffix for a domain name using the Public Suffix
12036 (license license:expat)))
12038 (define-public python2-publicsuffix
12039 (package-with-python2 python-publicsuffix))
12041 (define-public python-publicsuffix2
12043 (name "python-publicsuffix2")
12044 (version "2.20160818")
12048 (uri (pypi-uri "publicsuffix2" version ".tar.bz2"))
12051 "1bb55yka9vkn7i6y1kjzxa516kh6v4gsrxa90w5wdz5p5n968r68"))))
12052 (build-system python-build-system)
12054 '(#:tests? #f)) ; The test suite requires network access.
12055 (home-page "https://github.com/pombredanne/python-publicsuffix2")
12056 (synopsis "Get a public suffix for a domain name using the Public Suffix List")
12057 (description "Get a public suffix for a domain name using the Public Suffix
12058 List. Forked from and using the same API as the publicsuffix package.")
12059 (license (list license:expat license:mpl2.0))))
12061 (define-public python2-publicsuffix2
12062 (package-with-python2 python-publicsuffix2))
12064 (define-public python-url
12066 (name "python-url")
12070 (uri (pypi-uri "url" version))
12073 "0v879yadcz9qxfl41ak6wkga1kimp9cflla9ddz03hjjvgkqy5ki"))))
12074 (build-system python-build-system)
12076 `(("python-publicsuffix" ,python-publicsuffix)))
12078 `(("python-coverage" ,python-coverage)
12079 ("python-nose" ,python-nose)))
12081 `(#:tests? #f)) ; FIXME: tests fail with "ImportError: No module named 'tests'"
12082 (home-page "http://github.com/seomoz/url-py")
12083 (synopsis "URL Parsing")
12084 (description "Library for parsing urls.")
12085 (license license:expat)
12086 (properties `((python2-variant . ,(delay python2-url))))))
12088 (define-public python2-url
12089 (let ((base (package-with-python2 (strip-python2-variant python-url))))
12090 (package (inherit base)
12092 `(("python2-publicsuffix" ,python2-publicsuffix))))))
12094 (define-public python-freezegun
12096 (name "python-freezegun")
12101 (uri (pypi-uri "freezegun" version))
12104 "1sf38d3ibv1jhhvr52x7dhrsiyqk1hm165dfv8w8wh0fhmgxg151"))))
12105 (build-system python-build-system)
12107 `(("python-mock" ,python-mock)
12108 ("python-nose" ,python-nose)
12109 ("python-coverage" ,python-coverage)))
12111 `(("python-six" ,python-six)
12112 ("python-dateutil" ,python-dateutil)))
12114 `(#:phases (modify-phases %standard-phases
12115 ;; The tests are normally executed via `make test`, but the PyPi
12116 ;; package does not include the Makefile.
12119 (zero? (system* "nosetests" "./tests/")))))))
12120 (home-page "https://github.com/spulec/freezegun")
12121 (synopsis "Test utility for mocking the datetime module")
12123 "FreezeGun is a library that allows your python tests to travel through
12124 time by mocking the datetime module.")
12125 (license license:asl2.0)))
12127 (define-public python2-freezegun
12128 (package-with-python2 python-freezegun))
12131 (define-public python-odfpy
12133 (name "python-odfpy")
12137 (uri (pypi-uri "odfpy" version))
12140 "1a6ms0w9zfhhkqhvrnynwwbxrivw6hgjc0s5k7j06npc7rq0blxw"))))
12142 `(#:modules ((srfi srfi-1)
12143 (guix build python-build-system)
12144 (guix build utils))
12146 (modify-phases %standard-phases
12148 ;; The test runner invokes python2 and python3 for test*.py.
12149 ;; To avoid having both in inputs, we replicate it here.
12151 (every (lambda (test-file)
12152 (zero? (system* "python" test-file)))
12153 (find-files "tests" "^test.*\\.py$")))))))
12154 (build-system python-build-system)
12155 (home-page "https://github.com/eea/odfpy")
12156 (synopsis "Python API and tools to manipulate OpenDocument files")
12157 (description "Collection of libraries and utility programs written in
12158 Python to manipulate OpenDocument 1.2 files.")
12160 ;; The software is mainly dual GPL2+ and ASL2.0, but includes a
12161 ;; number of files with other licenses.
12162 (list license:gpl2+ license:asl2.0 license:lgpl2.1+ license:cc-by-sa3.0))))
12164 (define-public python2-odfpy
12165 (package-with-python2 python-odfpy))
12167 (define-public python-cachecontrol
12169 (name "python-cachecontrol")
12174 ;; Pypi does not have tests.
12175 (uri (string-append
12176 "https://github.com/ionrock/cachecontrol/archive/v"
12177 version ".tar.gz"))
12178 (file-name (string-append name "-" version ".tar.gz"))
12181 "0yj60d0f69a2l8p7y86k4zhzzm6rnxpq74sfl240pry9l0lfw2vw"))))
12182 (build-system python-build-system)
12185 (modify-phases %standard-phases
12188 ;; Drop test that requires internet access.
12189 (delete-file "tests/test_regressions.py")
12190 (setenv "PYTHONPATH"
12191 (string-append (getcwd) "/build/lib:"
12192 (getenv "PYTHONPATH")))
12193 (zero? (system* "py.test" "-vv")))))))
12195 `(("python-pytest" ,python-pytest)
12196 ("python-redis" ,python-redis)
12197 ("python-webtest" ,python-webtest)
12198 ("python-mock" ,python-mock)))
12200 `(("python-requests" ,python-requests)
12201 ("python-lockfile" ,python-lockfile)))
12202 (home-page "https://github.com/ionrock/cachecontrol")
12203 (synopsis "The httplib2 caching algorithms for use with requests")
12204 (description "CacheControl is a port of the caching algorithms in
12205 @code{httplib2} for use with @code{requests} session objects.")
12206 (license license:asl2.0)))
12208 (define-public python2-cachecontrol
12209 (package-with-python2 python-cachecontrol))
12211 (define-public python-lit
12213 (name "python-lit")
12218 (uri (pypi-uri "lit" version))
12221 "135m2b9cwih85g66rjggavck328z7lj37srgpq3jxszbg0g2b91y"))))
12222 (build-system python-build-system)
12223 (home-page "http://llvm.org/")
12224 (synopsis "LLVM Software Testing Tool")
12225 (description "@code{lit} is a portable tool for executing LLVM and Clang
12226 style test suites, summarizing their results, and providing indication of
12228 (license license:ncsa)))
12230 (define-public python2-lit
12231 (package-with-python2 python-lit))
12233 (define-public python-pytest-pep8
12235 (name "python-pytest-pep8")
12239 (uri (pypi-uri "pytest-pep8" version))
12242 "06032agzhw1i9d9qlhfblnl3dw5hcyxhagn7b120zhrszbjzfbh3"))))
12243 (build-system python-build-system)
12245 `(#:tests? #f)) ; Fails with recent pytest and pep8. See upstream issues #8 and #12.
12247 `(("python-pytest" ,python-pytest)))
12249 `(("python-pep8" ,python-pep8)))
12250 (home-page "https://bitbucket.org/pytest-dev/pytest-pep8")
12251 (synopsis "Py.test plugin to check PEP8 requirements")
12252 (description "Pytest plugin for checking PEP8 compliance.")
12253 (license license:expat)))
12255 (define-public python2-pytest-pep8
12256 (package-with-python2 python-pytest-pep8))
12258 (define-public python-pytest-flakes
12260 (name "python-pytest-flakes")
12264 (uri (pypi-uri "pytest-flakes" version))
12267 "0flag3n33kbhyjrhzmq990rvg4yb8hhhl0i48q9hw0ll89jp28lw"))))
12268 (build-system python-build-system)
12271 (modify-phases %standard-phases
12273 (add-after 'install 'check
12274 (lambda* (#:key outputs inputs #:allow-other-keys)
12275 ;; It's easier to run tests after install.
12276 ;; Make installed package available for running the tests
12277 (add-installed-pythonpath inputs outputs)
12278 (zero? (system* "py.test" "-vv")))))))
12280 `(("python-coverage" ,python-coverage)
12281 ("python-pytest" ,python-pytest)
12282 ("python-pytest-cache" ,python-pytest-cache)
12283 ("python-pytest-pep8" ,python-pytest-pep8)))
12285 `(("python-pyflakes" ,python-pyflakes)))
12286 (home-page "https://github.com/fschulze/pytest-flakes")
12287 (synopsis "Py.test plugin to check source code with pyflakes")
12288 (description "Pytest plugin for checking Python source code with pyflakes.")
12289 (license license:expat)))
12291 (define-public python2-pytest-flakes
12292 (package-with-python2 python-pytest-flakes))
12294 (define-public python-natsort
12296 (name "python-natsort")
12300 (uri (pypi-uri "natsort" version))
12303 "0bh6j0l8iapjnsgg3bs6q075cnzjl6zw1vlgqyv3qrygm2cxypkn"))))
12304 (build-system python-build-system)
12307 (modify-phases %standard-phases
12308 (add-before 'check 'set-cachedir
12309 ;; Tests require write access to $HOME by default
12310 (lambda _ (setenv "PYTHON_EGG_CACHE" "/tmp") #t)))))
12312 `(("python-hypothesis" ,python-hypothesis)
12313 ("python-pytest-cache" ,python-pytest-cache)
12314 ("python-pytest-cov" ,python-pytest-cov)
12315 ("python-pytest-flakes" ,python-pytest-flakes)
12316 ("python-pytest-pep8" ,python-pytest-pep8)))
12317 (propagated-inputs ; TODO: Add python-fastnumbers.
12318 `(("python-pyicu" ,python-pyicu)))
12319 (home-page "https://github.com/SethMMorton/natsort")
12320 (synopsis "Natural sorting for python and shell")
12322 "Natsort lets you apply natural sorting on lists instead of
12323 lexicographical. If you use the built-in @code{sorted} method in python
12324 on a list such as @code{['a20', 'a9', 'a1', 'a4', 'a10']}, it would be
12325 returned as @code{['a1', 'a10', 'a20', 'a4', 'a9']}. Natsort provides a
12326 function @code{natsorted} that identifies numbers and sorts them separately
12327 from strings. It can also sort version numbers, real numbers, mixed types
12328 and more, and comes with a shell command @command{natsort} that exposes this
12329 functionality in the command line.")
12330 (license license:expat)
12331 (properties `((python2-variant . ,(delay python2-natsort))))))
12333 (define-public python2-natsort
12334 (let ((base (package-with-python2 (strip-python2-variant python-natsort))))
12335 (package (inherit base)
12337 `(("python2-pathlib" ,python2-pathlib)
12338 ("python2-mock" ,python2-mock)
12339 ("python2-enum34" ,python2-enum34)
12340 ,@(package-native-inputs base))))))
12342 (define-public python-glances
12344 (name "python-glances")
12349 (uri (pypi-uri "Glances" version))
12352 "11jbq40g8alsbirnd4kiagznqg270247i0m8qhi48ldf2i5xppxg"))))
12353 (build-system python-build-system)
12355 `(("python-psutil" ,python-psutil)))
12357 "https://github.com/nicolargo/glances")
12359 "A cross-platform curses-based monitoring tool")
12361 "Glances is a curses-based monitoring tool for a wide variety of platforms.
12362 Glances uses the PsUtil library to get information from your system. It monitors
12363 CPU, load, memory, network bandwidth, disk I/O, disk use, and more.")
12364 (license license:lgpl3+)))
12366 (define-public python2-glances
12367 (package-with-python2 python-glances))
12369 (define-public python-graphql-core
12371 (name "python-graphql-core")
12376 (uri (pypi-uri "graphql-core" version))
12379 "0rsaarx2sj4xnw9966rhh4haiqaapm4lm2mfqm48ywd51j5vh1a0"))))
12380 (build-system python-build-system)
12382 `(#:tests? #f ; Tests require the unpackaged pytest-benchmark.
12384 (modify-phases %standard-phases
12385 (add-after 'unpack 'patch-hardcoded-version
12386 (lambda _ (substitute*
12388 (("'gevent==1.1rc1'") "'gevent'"))
12391 `(("python-gevent" ,python-gevent)
12392 ("python-mock" ,python-mock)
12393 ("python-pytest-mock" ,python-pytest-mock)))
12395 `(("python-promise" ,python-promise)
12396 ("python-six" ,python-six)))
12397 (home-page "https://github.com/graphql-python/graphql-core")
12398 (synopsis "GraphQL implementation for Python")
12400 "GraphQL implementation for Python. GraphQL is a data query language and
12401 runtime designed and used to request and deliver data to mobile and web apps.
12402 This library is a port of @url{https://github.com/graphql/graphql-js,graphql-js}
12404 (license license:expat)))
12406 (define-public python2-graphql-core
12407 (package-with-python2 python-graphql-core))
12409 (define-public python-graphql-relay
12411 (name "python-graphql-relay")
12416 (uri (pypi-uri "graphql-relay" version))
12419 "1nv5dxcj59zv31qvl8bd142njmxcmymny2dz3br1l2cpbljbf5i7"))))
12420 (build-system python-build-system)
12422 `(("python-pytest" ,python-pytest)))
12424 `(("python-graphql-core" ,python-graphql-core)
12425 ("python-promise" ,python-promise)
12426 ("python-six" ,python-six)))
12427 (home-page "https://github.com/graphql-python/graphql-relay-py")
12428 (synopsis "Relay implementation for Python")
12430 "This is a library to allow the easy creation of Relay-compliant servers
12431 using the GraphQL Python reference implementation of a GraphQL server. It
12432 should be noted that the code is a exact port of the original
12433 @url{https://github.com/graphql/graphql-relay-js,graphql-relay js implementation}
12435 (license license:expat)))
12437 (define-public python2-graphql-relay
12438 (package-with-python2 python-graphql-relay))
12440 (define-public python-graphene
12442 (name "python-graphene")
12447 (uri (pypi-uri "graphene" version))
12450 "09zhac7igh9ixdz0ay6csy35b40l1jwbf2wrbxmgxwfhy51iy06q"))))
12451 (build-system python-build-system)
12453 `(("python-django-filter" ,python-django-filter)
12454 ("python-mock" ,python-mock)
12455 ("python-psycopg2" ,python-psycopg2)
12456 ("python-pytest-django" ,python-pytest-django)
12457 ("python-sqlalchemy-utils" ,python-sqlalchemy-utils)))
12459 `(("python-graphql-core" ,python-graphql-core)
12460 ("python-graphql-relay" ,python-graphql-relay)
12461 ("python-iso8601" ,python-iso8601)
12462 ("python-promise" ,python-promise)
12463 ("python-six" ,python-six)))
12464 (home-page "http://graphene-python.org/")
12465 (synopsis "GraphQL Framework for Python")
12467 "Graphene is a Python library for building GraphQL schemas/types.
12468 A GraphQL schema describes your data model, and provides a GraphQL server
12469 with an associated set of resolve methods that know how to fetch data.")
12470 (properties `((python2-variant . ,(delay python2-graphene))))
12471 (license license:expat)))
12473 (define-public python2-graphene
12474 (let ((base (package-with-python2
12475 (strip-python2-variant python-graphene))))
12476 (package (inherit base)
12478 `(("python2-sqlalchemy" ,python2-sqlalchemy)
12479 ,@(package-native-inputs base))))))
12481 (define-public python-nautilus
12483 (name "python-nautilus")
12488 (uri (pypi-uri "nautilus" version))
12491 "01hwzjc1zshk4vvxrcghm398fpy4jls66dyz06g07mrwqif8878p"))))
12492 (build-system python-build-system)
12493 (arguments `(#:tests? #f)) ; fails to import test modules
12495 `(("python-bcrypt" ,python-bcrypt)
12496 ("python-click" ,python-click)
12497 ("python-consul" ,python-consul)
12498 ("python-graphene" ,python-graphene)
12499 ("python-jinja2" ,python-jinja2)
12500 ("python-peewee" ,python-peewee)
12501 ("python-pika" ,python-pika)
12502 ("python-tornado" ,python-tornado)
12503 ("python-wtforms" ,python-wtforms)))
12505 `(("python-nose2" ,python-nose2)))
12506 (home-page "https://github.com/AlecAivazis/nautilus")
12507 (synopsis "Library for creating microservice applications")
12509 "Nautilus is a framework for flux based microservices that looks to
12510 provide extendible implementations of common aspects of a cloud so that you can
12511 focus on building massively scalable web applications.")
12512 (license license:expat)))
12514 (define-public python-snowballstemmer
12516 (name "python-snowballstemmer")
12520 (uri (pypi-uri "snowballstemmer" version))
12523 "0a0idq4y5frv7qsg2x62jd7rd272749xk4x99misf5rcifk2d7wi"))))
12524 (build-system python-build-system)
12526 `(;; No tests exist
12528 (home-page "https://github.com/shibukawa/snowball_py")
12529 (synopsis "Snowball stemming library collection for Python")
12530 (description "This package provides 16 word stemmer algorithms generated
12531 from Snowball algorithms. It includes the 15 original ones plus the Poerter
12533 (license license:bsd-3)))
12535 (define-public python2-snowballstemmer
12536 (package-with-python2 python-snowballstemmer))
12538 (define-public python-sphinx-cloud-sptheme
12540 (name "python-sphinx-cloud-sptheme")
12544 (uri (pypi-uri "cloud_sptheme" version))
12547 "1dniqb6a39yh786f86c4jn666rwnyi1jvzn4616zhcchb7sfdshd"))))
12548 (build-system python-build-system)
12549 ;; FIXME: The 'pypi' release archive does not contain tests.
12550 (arguments '(#:tests? #f))
12552 `(("python-sphinx" ,python-sphinx)))
12553 (home-page "https://bitbucket.org/ecollins/cloud_sptheme")
12554 (synopsis "'Cloud' theme for Sphinx documenter")
12555 (description "This package contains the \"Cloud\" theme for Sphinx and some
12556 related extensions.")
12557 (license license:bsd-3)))
12559 (define-public python2-sphinx-cloud-sptheme
12560 (package-with-python2 python-sphinx-cloud-sptheme))
12562 (define-public python-sphinx-alabaster-theme
12564 (name "python-sphinx-alabaster-theme")
12568 (uri (pypi-uri "alabaster" version))
12571 "027anxzcb951gjlcc43y3rbn9qrw36d16vj9wd2smv5410xx9bs7"))))
12572 (build-system python-build-system)
12574 `(("python-pygments" ,python-pygments)))
12575 (home-page "https://alabaster.readthedocs.io/")
12576 (synopsis "Configurable sidebar-enabled Sphinx theme")
12577 (description "Alabaster is a visually (c)lean, responsive, configurable
12578 theme for the Sphinx documentation system. It's the default theme of Sphinx.")
12579 (license license:bsd-3)))
12581 (define-public python2-sphinx-alabaster-theme
12582 (package-with-python2 python-sphinx-alabaster-theme))
12584 (define-public python-betamax
12586 (name "python-betamax")
12591 (uri (pypi-uri "betamax" version))
12594 "18f8v5gng3j773jlbbzx4rg1i4y2zw3m2l1zpmbvp8bh5a2q1i42"))))
12595 (build-system python-build-system)
12597 '(;; Many tests fail because they require networking.
12600 `(("python-requests" ,python-requests)))
12601 (home-page "https://github.com/sigmavirus24/betamax")
12602 (synopsis "Record HTTP interactions with python-requests")
12603 (description "Betamax will record your test suite's HTTP interactions and
12604 replay them during future tests. It is designed to work with python-requests.")
12605 (license license:expat)))
12607 (define-public python2-betamax
12608 (package-with-python2 python-betamax))
12610 (define-public python-s3transfer
12612 (name "python-s3transfer")
12616 (uri (pypi-uri "s3transfer" version))
12619 "1h8g9bknvxflxkpbnxyfxmk8pvgykbbk9ljdvhqh6z4vjc2926ms"))))
12620 (build-system python-build-system)
12623 (modify-phases %standard-phases
12626 ;; 7 of the 'integration' tests require network access or login
12628 (zero? (system* "nosetests" "--exclude=integration")))))))
12630 `(("python-docutils" ,python-docutils)
12631 ("python-mock" ,python-mock)
12632 ("python-nose" ,python-nose)))
12634 `(("python-botocore" ,python-botocore)))
12635 (synopsis "Amazon S3 Transfer Manager")
12636 (description "S3transfer is a Python library for managing Amazon S3
12638 (home-page "https://github.com/boto/s3transfer")
12639 (license license:asl2.0)
12640 (properties `((python2-variant . ,(delay python2-s3transfer))))))
12642 (define-public python2-s3transfer
12643 (let ((base (package-with-python2 (strip-python2-variant python-s3transfer))))
12647 `(("python2-futures" ,python2-futures)
12648 ,@(package-native-inputs base))))))
12650 (define-public python-setproctitle
12652 (name "python-setproctitle")
12657 (uri (pypi-uri "setproctitle" version))
12660 "163kplw9dcrw0lffq1bvli5yws3rngpnvrxrzdw89pbphjjvg0v2"))))
12661 (build-system python-build-system)
12664 (modify-phases %standard-phases
12665 (add-before 'check 'patch-Makefile
12666 ;; Stricly this is only required for the python2 variant.
12667 ;; But adding a phase in an inherited package seems to be
12668 ;; cumbersum. So we patch even for python3.
12670 (let ((nose (assoc-ref %build-inputs "python2-nose")))
12672 (substitute* "Makefile"
12673 (("\\$\\(PYTHON\\) [^ ]which nosetests[^ ] ")
12674 (string-append nose "/bin/nosetests "))))
12678 (setenv "PYTHON" (or (which "python3") (which "python")))
12679 (setenv "PYCONFIG" (or (which "python3-config")
12680 (which "python-config")))
12681 (setenv "CC" "gcc")
12682 ;; No need to extend PYTHONPATH to find the built package, since
12683 ;; the Makefile will build anyway
12684 (zero? (system* "make" "check")))))))
12686 `(("procps" ,procps))) ; required for tests
12688 "https://github.com/dvarrazzo/py-setproctitle")
12690 "Setproctitle implementation for Python to customize the process title")
12691 (description "The library allows a process to change its title (as displayed
12692 by system tools such as ps and top).
12694 Changing the title is mostly useful in multi-process systems, for
12695 example when a master process is forked: changing the children's title
12696 allows to identify the task each process is busy with. The technique
12697 is used by PostgreSQL and the OpenSSH Server for example.")
12698 (license license:bsd-3)
12699 (properties `((python2-variant . ,(delay python2-setproctitle))))))
12701 (define-public python2-setproctitle
12702 (let ((base (package-with-python2
12703 (strip-python2-variant python-setproctitle))))
12706 (native-inputs `(("python2-nose" ,python2-nose)
12707 ,@(package-native-inputs base))))))
12709 (define-public python-validictory
12711 (name "python-validictory")
12716 (uri (pypi-uri "validictory" version))
12719 "1zf1g9sw47xzp5f80bd94pb42j9yqv82lcrgcvdwr6nkaphfi37q"))))
12720 (build-system python-build-system)
12723 (modify-phases %standard-phases
12724 (add-after 'unpack 'bootstrap
12725 ;; Move the tests out of the package directory to avoid
12728 (rename-file "validictory/tests" "tests")
12729 (delete-file "tests/__init__.py")))
12732 ;; Extend PYTHONPATH so the built package will be found.
12733 (setenv "PYTHONPATH"
12734 (string-append (getcwd) "/build/lib:"
12735 (getenv "PYTHONPATH")))
12736 (zero? (system* "py.test" "-vv" )))))))
12738 `(("python-pytest" ,python-pytest)))
12740 "https://github.com/jamesturk/validictory")
12741 (synopsis "General purpose Python data validator")
12742 (description "It allows validation of arbitrary Python data structures.
12744 The schema format is based on the JSON Schema
12745 proposal (http://json-schema.org), so combined with json the library is also
12746 useful as a validator for JSON data.")
12747 (license license:expat)))
12749 (define-public python2-validictory
12750 (package-with-python2 python-validictory))
12752 (define-public python-aniso8601
12754 (name "python-aniso8601")
12759 (uri (pypi-uri "aniso8601" version))
12762 "1k5mjg9iqbjfslb5prrsfz7dhlvi6s35p1jxq8dm87w1b7dn5i2g"))))
12763 (build-system python-build-system)
12765 `(("python-dateutil" ,python-dateutil)))
12767 "https://bitbucket.org/nielsenb/aniso8601")
12769 "Python library for parsing ISO 8601 strings")
12771 "This package contains a library for parsing ISO 8601 datetime strings.")
12772 (license license:bsd-3)))
12774 (define-public python-flask-restful
12776 (name "python-flask-restful")
12781 (uri (pypi-uri "Flask-RESTful" version))
12784 "0hjcmdb56b7z4bkw848lxfkyrpnkwzmqn2dgnlv12mwvjpzsxr6c"))))
12785 (build-system python-build-system)
12787 `(("python-aniso8601" ,python-aniso8601)
12788 ("python-flask" ,python-flask)
12789 ("python-pycrypto" ,python-pycrypto)
12790 ("python-pytz" ,python-pytz)))
12792 `(;; Optional dependency of Flask. Tests need it.
12793 ("python-blinker" ,python-blinker)
12794 ("python-mock" ,python-mock) ; For tests
12795 ("python-nose" ,python-nose) ; For tests
12796 ("python-sphinx" ,python-sphinx)))
12798 "https://www.github.com/flask-restful/flask-restful/")
12800 "Flask module for creating REST APIs")
12802 "This package contains a Flask module for creating REST APIs.")
12803 (license license:bsd-3)))
12805 (define-public python-flask-basicauth
12807 (name "python-flask-basicauth")
12812 (uri (pypi-uri "Flask-BasicAuth" version))
12815 "1zq1spkjr4sjdnalpp8wl242kdqyk6fhbnhr8hi4r4f0km4bspnz"))))
12816 (build-system python-build-system)
12818 `(("python-flask" ,python-flask)))
12820 "https://github.com/jpvanhal/flask-basicauth")
12822 "HTTP basic access authentication for Flask")
12824 "This package provides HTTP basic access authentication for Flask.")
12825 (license license:bsd-3)))
12827 (define-public python-flask-sqlalchemy
12829 (name "python-flask-sqlalchemy")
12834 (uri (pypi-uri "Flask-SQLAlchemy" version))
12837 "1i9ps5d5snih9xlqhrvmi3qfiygkmqzxh92n25kj4pf89kj4s965"))))
12838 (build-system python-build-system)
12840 `(("python-flask" ,python-flask)
12841 ("python-sqlalchemy" ,python-sqlalchemy)))
12843 "http://github.com/mitsuhiko/flask-sqlalchemy")
12845 "Module adding SQLAlchemy support to your Flask application")
12847 "This package adds SQLAlchemy support to your Flask application.")
12848 (license license:bsd-3)))
12850 (define-public python-pyev
12852 (name "python-pyev")
12857 (uri (pypi-uri "pyev" version))
12860 "0rf603lc0s6zpa1nb25vhd8g4y337wg2wyz56i0agsdh7jchl0sx"))))
12861 (build-system python-build-system)
12863 `(#:tests? #f ; no test suite
12865 (modify-phases %standard-phases
12866 (add-after 'unpack 'patch
12867 (lambda* (#:key inputs #:allow-other-keys)
12868 (let ((libev (string-append (assoc-ref inputs "libev")
12869 "/lib/libev.so.4")))
12870 (substitute* "setup.py"
12871 (("libev_dll_name = find_library\\(\\\"ev\\\"\\)")
12872 (string-append "libev_dll_name = \"" libev "\"")))))))))
12874 `(("libev" ,libev)))
12875 (home-page "http://pythonhosted.org/pyev/")
12876 (synopsis "Python libev interface")
12877 (description "Pyev provides a Python interface to libev.")
12878 (license license:gpl3)))
12880 (define-public python2-pyev
12881 (package-with-python2 python-pyev))
12883 (define-public python-imagesize
12885 (name "python-imagesize")
12890 (uri (pypi-uri "imagesize" version))
12893 "0qk07k0z4241lkzzjji7z4da04pcvg7bfc4xz1934zlqhwmwdcha"))))
12894 (build-system python-build-system)
12896 '(;; Test files are not distributed on PyPi:
12897 ;; https://github.com/shibukawa/imagesize_py/issues/7
12899 (home-page "https://github.com/shibukawa/imagesize_py")
12900 (synopsis "Gets image size of files in variaous formats in Python")
12902 "This package allows determination of image size from
12903 PNG, JPEG, JPEG2000 and GIF files in pure Python.")
12904 (license license:expat)))
12906 (define-public python2-imagesize
12907 (package-with-python2 python-imagesize))
12909 (define-public python-axolotl-curve25519
12911 (name "python-axolotl-curve25519")
12916 (uri (git-reference
12917 (url "git://github.com/tgalal/python-axolotl-curve25519")
12918 (commit "e4a9c4de0eae27223200579c58d1f8f6d20637e2")))
12919 (file-name (string-append name "-" version "-checkout"))
12922 "0agap5q0hmvf6cwzjqc05kw53pjgf6942pcivpazksmg1vk400ra"))))
12923 (build-system python-build-system)
12925 `(;; Prevent creation of the egg. This works around
12926 ;; https://debbugs.gnu.org/cgi/bugreport.cgi?bug=20765
12927 #:configure-flags '("--root=/")))
12928 (home-page "https://github.com/tgalal/python-axolotl-curve25519")
12929 (synopsis "Python wrapper for curve25519 library")
12930 (description "This is a python wrapper for the curve25519 library
12931 with ed25519 signatures. The C code was pulled from
12932 libaxolotl-android. At the moment this wrapper is meant for use by
12934 (license (list license:gpl3 ; Most files
12935 license:bsd-3)))) ; curve/curve25519-donna.c
12937 (define-public python2-axolotl-curve25519
12938 (package-with-python2 python-axolotl-curve25519))
12940 (define-public python-axolotl
12942 (name "python-axolotl")
12947 (uri (string-append
12948 "https://github.com/tgalal/python-axolotl/archive/"
12949 version ".tar.gz"))
12950 (file-name (string-append name "-" version ".tar.gz"))
12952 (base32 "1z8d89p7v40p4bwywjm9h4z28fdvra79ddw06azlkrfjbl7dxmz8"))))
12953 (build-system python-build-system)
12956 (modify-phases %standard-phases
12957 ;; Don't install tests
12958 (add-before 'install 'remove-tests
12960 (for-each delete-file-recursively
12961 '("axolotl/tests" "build/lib/axolotl/tests"))
12964 `(("python-axolotl-curve25519" ,python-axolotl-curve25519)
12965 ("python-dateutil" ,python-dateutil)
12966 ("python-protobuf" ,python-protobuf)
12967 ("python-pycrypto" ,python-pycrypto)))
12968 (home-page "https://github.com/tgalal/python-axolotl")
12969 (synopsis "Python port of libaxolotl-android")
12970 (description "This is a python port of libaxolotl-android. This
12971 is a ratcheting forward secrecy protocol that works in synchronous and
12972 asynchronous messaging environments.")
12973 (license license:gpl3)))
12975 (define-public python2-axolotl
12976 (package-with-python2 python-axolotl))
12978 (define-public python-termstyle
12980 (name "python-termstyle")
12985 (uri (pypi-uri "termstyle" version))
12988 "17wzkkcqy5zc0g68xlad3kcv66iw14d2pwqc0h9420gak0vbhx7g"))))
12989 (build-system python-build-system)
12992 (modify-phases %standard-phases
12995 (zero? (system* "python" "test3.py")))))))
12996 (home-page "http://github.com/gfxmonk/termstyle")
12997 (synopsis "Console text coloring for Python")
12998 (description "This package provides console text coloring for Python.")
12999 (license license:bsd-3)))
13001 (define-public python-rednose
13003 (name "python-rednose")
13008 (uri (pypi-uri "rednose" version))
13011 "0b0bsna217lr1nykyhl5fgjly15zhdvqd4prg4wy1zrgfv7al6m0"))))
13012 (build-system python-build-system)
13015 (modify-phases %standard-phases
13016 (add-after 'unpack 'fix-deps
13018 ;; See <https://github.com/JBKahn/rednose/issues/12>
13019 (substitute* "setup.py"
13020 (("python-termstyle") "termstyle"))
13023 `(("python-colorama" ,python-colorama)
13024 ("python-termstyle" ,python-termstyle)))
13026 `(("python-six" ,python-six)
13027 ("python-nose" ,python-nose)))
13028 (home-page "https://github.com/JBKahn/rednose")
13029 (synopsis "Colored output for Python nosetests")
13030 (description "This package provides colored output for the
13031 @command{nosetests} command of the Python Nose unit test framework.")
13032 (license license:bsd-3)))
13034 (define-public python-flask-restplus
13036 (name "python-flask-restplus")
13041 (uri (pypi-uri "flask-restplus" version))
13044 "11his6ii5brpkhld0d5bwzjjw4q3vmplpd6fmgzjrvvklsbk0cf4"))))
13045 (build-system python-build-system)
13047 '(#:tests? #f)) ; FIXME: 35/882 tests failing.
13049 ;; (modify-phases %standard-phases
13052 ;; (zero? (system* "nosetests")))))))
13054 `(("python-aniso8601" ,python-aniso8601)
13055 ("python-flask" ,python-flask)
13056 ("python-jsonschema" ,python-jsonschema)
13057 ("python-pytz" ,python-pytz)
13058 ("python-six" ,python-six)))
13060 `(("python-tzlocal" ,python-tzlocal)
13061 ("python-blinker" ,python-blinker)
13062 ("python-nose" ,python-nose)
13063 ("python-rednose" ,python-rednose)))
13064 (home-page "https://github.com/noirbizarre/flask-restplus")
13065 (synopsis "Framework for documented API development with Flask")
13066 (description "This package provides a framework for API development with
13067 the Flask web framework in Python. It is similar to package
13068 @code{python-flask-restful} but supports the @code{python-swagger}
13069 documentation builder.")
13070 (license license:expat)))
13072 (define-public python-sadisplay
13074 (name "python-sadisplay")
13079 (uri (pypi-uri "sadisplay" version))
13082 "0zqad2fl7q26p090qmqgmxbm6iwgf9zij1w8da1g3wdgjj72ql05"))))
13083 (build-system python-build-system)
13085 `(("python-sqlalchemy" ,python-sqlalchemy)))
13087 `(("python-nose" ,python-nose)))
13088 (home-page "https://bitbucket.org/estin/sadisplay")
13089 (synopsis "SQLAlchemy schema displayer")
13090 (description "This package provides a program to build Entity
13091 Relationship diagrams from a SQLAlchemy model (or directly from the
13093 (license license:bsd-3)))
13095 (define-public python2-sadisplay
13096 (package-with-python2 python-sadisplay))
13098 (define-public python-flask-restful-swagger
13100 (name "python-flask-restful-swagger")
13105 (uri (pypi-uri "flask-restful-swagger" version))
13108 "16msl8hd5xjmj833bpy264v98cpl5hkw5bgl5gf5vgndxbv3rm6v"))))
13109 (build-system python-build-system)
13111 `(("python-flask-restful" ,python-flask-restful)))
13112 (home-page "https://github.com/rantav/flask-restful-swagger")
13113 (synopsis "Extract Swagger specs from Flask-Restful projects")
13114 (description "This package lets you extract Swagger API documentation
13115 specs from your Flask-Restful projects.")
13116 (license license:expat)))
13118 (define-public python2-flask-restful-swagger
13119 (package-with-python2 python-flask-restful-swagger))
13121 (define-public python-argcomplete
13123 (name "python-argcomplete")
13128 (uri (pypi-uri "argcomplete" version))
13131 "11bwiw6j0nilgz81xnw6f1npyga3prp8asjqrm87cdr3ria5l03x"))))
13132 (build-system python-build-system)
13134 `(("python-pexpect" ,python-pexpect)
13136 (home-page "https://github.com/kislyuk/argcomplete")
13137 (synopsis "Shell tab completion for Python argparse")
13138 (description "argcomplete provides extensible command line tab completion
13139 of arguments and options for Python scripts using @code{argparse}. It's
13140 particularly useful for programs with many options or sub-parsers that can
13141 dynamically suggest completions; for example, when browsing resources over the
13143 (license license:asl2.0)))
13145 (define-public python2-argcomplete
13146 (package-with-python2 python-argcomplete))
13148 (define-public python-xopen
13150 (name "python-xopen")
13155 (uri (pypi-uri "xopen" version))
13158 "1wx6mylzcsyhjl19ycb83qq6iqpmr927lz62njfsar6ldsj0qcni"))
13159 (file-name (string-append name "-" version ".tar.gz"))))
13160 (build-system python-build-system)
13161 (home-page "https://github.com/marcelm/xopen/")
13162 (synopsis "Open compressed files transparently")
13163 (description "This module provides an @code{xopen} function that works like
13164 Python's built-in @code{open} function, but can also deal with compressed files.
13165 Supported compression formats are gzip, bzip2 and, xz, and are automatically
13166 recognized by their file extensions. The focus is on being as efficient as
13167 possible on all supported Python versions.")
13168 (license license:expat)))
13170 (define-public python2-xopen
13171 (package-with-python2 python-xopen))
13173 (define-public python2-cheetah
13175 (name "python2-cheetah")
13180 (uri (pypi-uri "Cheetah" version))
13183 "0l5mm4lnysjkzpjr95q5ydm9xc8bv43fxmr79ypybrf1y0lq4c5y"))))
13184 (build-system python-build-system)
13186 `(#:python ,python-2))
13188 `(("python2-markdown" ,python2-markdown)))
13189 (home-page "https://pythonhosted.org/Cheetah/")
13190 (synopsis "Template engine")
13191 (description "Cheetah is a text-based template engine and Python code
13194 Cheetah can be used as a standalone templating utility or referenced as
13195 a library from other Python applications. It has many potential uses,
13196 but web developers looking for a viable alternative to ASP, JSP, PHP and
13197 PSP are expected to be its principle user group.
13201 @item Generates HTML, SGML, XML, SQL, Postscript, form email, LaTeX, or any other
13203 @item Cleanly separates content, graphic design, and program code.
13204 @item Blends the power and flexibility of Python with a simple template language
13205 that non-programmers can understand.
13206 @item Gives template writers full access to any Python data structure, module,
13207 function, object, or method in their templates.
13208 @item Makes code reuse easy by providing an object-orientated interface to
13209 templates that is accessible from Python code or other Cheetah templates.
13210 One template can subclass another and selectively reimplement sections of it.
13211 @item Provides a simple, yet powerful, caching mechanism that can dramatically
13212 improve the performance of a dynamic website.
13213 @item Compiles templates into optimized, yet readable, Python code.
13215 (license (license:x11-style "file://LICENSE"))))
13217 (define-public python-dulwich
13219 (name "python-dulwich")
13224 (uri (list (string-append "https://www.dulwich.io/releases/"
13225 "dulwich-" version ".tar.gz")
13226 (pypi-uri "dulwich" version)))
13228 (base32 "0fl47vzfgc3w3rmhn8naii905cjqcp0vc68iyvymxp7567hh6als"))))
13229 (build-system python-build-system)
13232 (modify-phases %standard-phases
13233 (add-before 'check 'fix-tests
13234 (lambda* (#:key inputs #:allow-other-keys)
13235 ;; The tests use Popen with a custom environment which doesn't
13237 (substitute* "dulwich/tests/compat/utils.py"
13238 (("'git'") (string-append "'"
13241 (substitute* '("dulwich/tests/test_repository.py"
13242 "dulwich/tests/test_hooks.py")
13243 (("#!/bin/sh") (string-append "#!" (which "sh"))))
13244 (setenv "TEST_RUNNER" "unittest")
13245 (setenv "PYTHONHASHSEED" "random")
13248 `(("python-fastimport" ,python-fastimport)))
13250 `(("python-mock" ,python-mock)
13251 ("python-geventhttpclient" ,python-geventhttpclient)
13253 (home-page "https://www.dulwich.io/")
13254 (synopsis "Git implementation in Python")
13255 (description "Dulwich is an implementation of the Git file formats and
13256 protocols written in pure Python.")
13257 ;; Can be used with either license.
13258 (license (list license:asl2.0 license:gpl2+))))
13260 (define-public python2-dulwich
13261 (package-with-python2 python-dulwich))
13263 (define-public python-pbkdf2
13265 (name "python-pbkdf2")
13270 (uri (pypi-uri "pbkdf2" version))
13273 "0yb99rl2mbsaamj571s1mf6vgniqh23v98k4632150hjkwv9fqxc"))))
13274 (build-system python-build-system)
13277 (modify-phases %standard-phases
13280 (setenv "PYTHONPATH"
13281 (string-append (getcwd) "/build/lib:"
13282 (getenv "PYTHONPATH")))
13283 (zero? (system* "python" "test/test_pbkdf2.py")))))))
13285 `(("python-pycrypto" ,python-pycrypto))) ; optional
13286 (home-page "http://www.dlitz.net/software/python-pbkdf2/")
13287 (synopsis "Password-based key derivation")
13288 (description "This module implements the password-based key derivation
13289 function, PBKDF2, specified in RSA PKCS#5 v2.0.
13291 PKCS#5 v2.0 Password-Based Key Derivation is a key derivation function which
13292 is part of the RSA Public Key Cryptography Standards series. The provided
13293 implementation takes a password or a passphrase and a salt value (and
13294 optionally a iteration count, a digest module, and a MAC module) and provides
13295 a file-like object from which an arbitrarly-sized key can be read.")
13296 (license license:expat)))
13298 (define-public python2-pbkdf2
13299 (package-with-python2 python-pbkdf2))
13301 (define-public python-qrcode
13303 (name "python-qrcode")
13308 (uri (pypi-uri "qrcode" version))
13311 "0kljfrfq0c2rmxf8am57333ia41kd0snbm2rnqbdy816hgpcq5a1"))))
13312 (build-system python-build-system)
13314 ;; FIXME: Tests require packaging 'pymaging'.
13317 `(("python-lxml" ,python-lxml) ; for SVG output
13318 ("python-pillow" ,python-pillow) ; for PNG output
13319 ("python-six" ,python-six)))
13320 (home-page "https://github.com/lincolnloop/python-qrcode")
13321 (synopsis "QR Code image generator")
13322 (description "This package provides a pure Python QR Code generator
13323 module. It uses the Python Imaging Library (PIL) to allow for the generation
13326 In addition this package provides a command line tool to generate QR codes and
13327 either write these QR codes to a file or do the output as ascii art at the
13329 (license license:bsd-3)))
13331 (define-public python2-qrcode
13332 (package-with-python2 python-qrcode))
13334 ;; SlowAES isn't compatible with Python 3.
13335 (define-public python2-slowaes
13337 (name "python2-slowaes")
13342 (uri (pypi-uri "slowaes" version))
13345 "02dzajm83a7lqgxf6r3hgj64wfmcxz8gs4nvgxpvj5n19kjqlrc3"))))
13346 (build-system python-build-system)
13347 (arguments `(#:python ,python-2))
13348 (home-page "http://code.google.com/p/slowaes/")
13349 (synopsis "Implementation of AES in Python")
13350 (description "This package contains an implementation of AES in Python.
13351 This implementation is slow (hence the project name) but still useful when
13352 faster ones are not available.")
13353 (license license:asl2.0)))
13355 (define-public python-rst2ansi
13357 (name "python-rst2ansi")
13362 (uri (pypi-uri "rst2ansi" version))
13365 "0vzy6gd60l79ff750scl0sz48r1laalkl6md6dwzah4dcadgn5qv"))))
13366 (build-system python-build-system)
13368 `(("python-docutils" ,python-docutils)))
13369 (home-page "https://github.com/Snaipe/python-rst-to-ansi")
13370 (synopsis "Convert RST to ANSI-decorated console output")
13372 "Python module dedicated to rendering RST (reStructuredText) documents
13373 to ansi-escaped strings suitable for display in a terminal.")
13374 (license license:expat)))
13376 (define-public python-ddt
13378 (name "python-ddt")
13383 (uri (pypi-uri "ddt" version))
13386 "1c00ikkxr7lha97c81k938bzhgd4pbwamkjn0h4nkhr3xk00zp6n"))))
13387 (build-system python-build-system)
13389 `(("python-mock" ,python-mock)
13390 ("python-nose" ,python-nose)))
13392 `(("python-six" ,python-six)
13393 ("python-pyyaml" ,python-pyyaml)))
13394 (home-page "https://github.com/txels/ddt")
13395 (synopsis "Data-Driven Tests")
13397 "DDT (Data-Driven Tests) allows you to multiply one test case by running
13398 it with different test data, and make it appear as multiple test cases.")
13399 (license license:expat)))
13401 (define-public python2-ddt
13402 (package-with-python2 python-ddt))
13404 (define-public python-pycosat
13406 (name "python-pycosat")
13411 (uri (pypi-uri "pycosat" version))
13414 "1kl3wh1f47rc712n4bmwplbx3fqz3x9i1b587jrbpmvdva4c8f6l"))))
13415 ;; TODO: Unundle picosat. http://fmv.jku.at/picosat/
13416 (build-system python-build-system)
13417 (home-page "https://github.com/ContinuumIO/pycosat")
13418 (synopsis "Bindings to picosat (a SAT solver)")
13420 "This package provides efficient Python bindings to @code{picosat} on
13421 the C level. When importing pycosat, the @code{picosat} solver becomes part
13422 of the Python process itself. @code{picosat} is a @dfn{Boolean Satisfiability
13423 Problem} (SAT) solver.")
13424 (license license:expat)))
13426 (define-public python2-pycosat
13427 (package-with-python2 python-pycosat))
13429 (define-public python2-ruamel.ordereddict
13431 (name "python2-ruamel.ordereddict")
13436 (uri (pypi-uri "ruamel.ordereddict" version))
13439 "1xmkl8v9l9inm2pyxgc1fm5005yxm7fkd5gv74q7lj1iy5qc8n3h"))))
13440 (build-system python-build-system)
13442 `(#:python ,python-2
13444 (modify-phases %standard-phases
13446 (add-after 'install 'check
13447 (lambda* (#:key inputs outputs #:allow-other-keys)
13448 (add-installed-pythonpath inputs outputs)
13449 (zero? (system* "python" "test/testordereddict.py")))))))
13450 (home-page "https://bitbucket.org/ruamel/ordereddict")
13451 (synopsis "Version of dict that keeps keys in insertion order")
13453 "This is an implementation of an ordered dictionary with @dfn{Key
13454 Insertion Order} (KIO: updates of values do not affect the position of the
13455 key), @dfn{Key Value Insertion Order} (KVIO, an existing key's position is
13456 removed and put at the back). The standard library module @code{OrderedDict},
13457 implemented later, implements a subset of @code{ordereddict} functionality.
13458 Sorted dictionaries are also provided. Currently only with @dfn{Key Sorted
13459 Order} (KSO, no sorting function can be specified, but a transform can be
13460 specified to apply on the key before comparison (e.g. @code{string.lower})).")
13461 (license license:expat)))
13463 (define-public python-pypeg2
13465 (name "python-pypeg2")
13470 (uri (pypi-uri "pyPEG2" version))
13473 "0v8ziaam2r637v94ra4dbjw6jzxz99gs5x4i585kgag1v204yb9b"))))
13474 (build-system python-build-system)
13475 (propagated-inputs `(("python-lxml" ,python-lxml)))
13477 ;;https://bitbucket.org/fdik/pypeg/issues/36/test-failures-on-py35
13479 (home-page "https://fdik.org/pyPEG/")
13480 (synopsis "Parsering Expression Grammars in Python")
13481 (description "PyPEG is an intrinsic parser interpreter framework for
13482 Python. It is based on Parsing Expression Grammars, PEG. With pyPEG you can
13483 parse many formal languages.")
13484 (license license:gpl2)))
13486 (define-public python2-cliapp
13488 (name "python2-cliapp")
13489 (version "1.20160724")
13493 (uri (string-append
13494 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/cliapp/snapshot/cliapp-"
13495 version ".tar.gz"))
13498 "025cyi75vxyghbm4hav8dz4fzwksshddavy9g9fwr440awcvw74f"))))
13499 (build-system python-build-system)
13501 `(#:python ,python-2))
13503 `(("python2-pyaml" ,python2-pyaml)))
13504 (home-page "https://liw.fi/cliapp/")
13505 (synopsis "Python framework for command line programs")
13506 (description "@code{python2-cliapp} is a python framework for
13507 command line programs. It contains the typical stuff such programs
13508 need to do, such as parsing the command line for options, and
13509 iterating over input files.")
13510 (license license:gpl2+)))
13512 (define-public python2-ttystatus
13514 (name "python2-ttystatus")
13519 (uri (string-append
13520 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/ttystatus/snapshot/ttystatus-"
13521 version ".tar.gz"))
13524 "0b5g889jj23r2w1hi300cdldx6jvspanp0ybf5n1qvdvl150aamf"))))
13525 (build-system python-build-system)
13527 `(#:python ,python-2))
13528 (home-page "https://liw.fi/ttystatus/")
13529 (synopsis "Python library for showing progress reporting and
13530 status updates on terminals")
13531 (description "@code{python2-ttystatus} is a python library for
13532 showing progress reporting and status updates on terminals, for
13533 command line programs. Output is automatically adapted to the width
13534 of the terminal: truncated if it does not fit, and resized if the
13535 terminal size changes.")
13536 (license license:gpl3+)))
13538 (define-public python2-tracing
13540 (name "python2-tracing")
13545 (uri (string-append
13546 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/python-tracing/snapshot/tracing-"
13547 version ".tar.gz"))
13550 "06cw4zg42fsvqy372vi2whj26w56vzg5axhzwdjc2bgwf03garbw"))))
13551 (build-system python-build-system)
13553 `(#:python ,python-2))
13554 (home-page "https://liw.fi/tracing/")
13555 (synopsis "Python debug logging helper")
13556 (description "@code{python2-tracing} is a python library for
13557 logging debug messages. It provides a way to turn debugging messages
13558 on and off, based on the filename they occur in. It is much faster
13559 than using @code{logging.Filter} to accomplish the same thing, which
13560 matters when code is run in production mode. The actual logging still
13561 happens using the @code{logging} library.")
13562 (license license:gpl3+)))
13564 (define-public python2-larch
13566 (name "python2-larch")
13567 (version "1.20151025")
13571 (uri (string-append
13572 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/larch/snapshot/larch-"
13573 version ".tar.gz"))
13576 "1p4knkkavlqymgciz2wbcnfrdgdbafhg14maplnk4vbw0q8xs663"))))
13577 (build-system python-build-system)
13579 `(#:python ,python-2))
13581 `(("python2-tracing" ,python2-tracing)))
13582 (home-page "https://liw.fi/larch/")
13583 (synopsis "Python copy-on-write B-tree library")
13584 (description "@code{python2-larch} is an implementation of
13585 particular kind of B-tree, based on research by Ohad Rodeh. See
13586 @url{http://liw.fi/larch/ohad-btrees-shadowing-clones.pdf} for details
13587 on the data structure.
13589 The distinctive feature of this B-tree is that a node is never
13590 (conceptually) modified. Instead, all updates are done by
13591 copy-on-write. This makes it easy to clone a tree, and modify only the
13592 clone, while other processes access the original tree.")
13593 (license license:gpl3+)))
13595 (define-public python-htmlmin
13597 (name "python-htmlmin")
13602 (uri (pypi-uri "htmlmin" version))
13605 "0qxa93j3p1ak32qh8d9kshqv8v3z0hkc13dwbhp5cn7sn3xmsp6a"))))
13607 `(#:tests? #f)) ;htmlmin has no tests
13608 (build-system python-build-system)
13609 (home-page "https://htmlmin.readthedocs.org/en/latest/")
13610 (synopsis "HTML minifier")
13611 (description "@code{htmlmin} is an HTML minifier that just works.
13612 It comes with safe defaults and easily configurable options.")
13613 (license license:bsd-3)))
13615 (define-public python2-htmlmin
13616 (package-with-python2 python-htmlmin))
13618 (define-public python-flask-htmlmin
13620 (name "python-flask-htmlmin")
13625 (uri (pypi-uri "Flask-HTMLmin" version))
13628 "1n6zlq72kakkw0z2jpq6nh74lfsmxybm4g053pwhc14fbr809348"))))
13630 `(("python-flask" ,python-flask)
13631 ("python-htmlmin" ,python-htmlmin)))
13632 (build-system python-build-system)
13633 (home-page "https://github.com/hamidfzm/Flask-HTMLmin")
13634 (synopsis "HTML response minifier for Flask")
13636 "Minify @code{text/html} MIME type responses when using @code{Flask}.")
13637 (license license:bsd-3)))
13639 (define-public python2-flask-htmlmin
13640 (package-with-python2 python-flask-htmlmin))
13642 (define-public python-flask-login
13644 (name "python-flask-login")
13649 (uri (string-append "https://github.com/maxcountryman/flask-login/archive/"
13650 version ".tar.gz"))
13651 (file-name (string-append name "-" version ".tar.gz"))
13654 "1pdqp7a2gyb7k06xda004x0fi2w66s6kn2i0ndkqndmg12d83f9w"))))
13656 ;; Tests fail PEP8 compliance. See:
13657 ;; https://github.com/maxcountryman/flask-login/issues/340
13659 (build-system python-build-system)
13660 (home-page "https://github.com/maxcountryman/flask-login")
13661 (synopsis "User session management for Flask")
13663 "@code{Flask-Login} provides user session management for Flask. It
13664 handles the common tasks of logging in, logging out, and remembering your
13665 users' sessions over extended periods of time.")
13666 (license license:expat)))
13668 (define-public python2-flask-login
13669 (package-with-python2 python-flask-login))
13671 (define-public python-astroid
13673 (name "python-astroid")
13678 (uri (string-append
13679 "https://github.com/PyCQA/astroid/archive/astroid-"
13680 version ".tar.gz"))
13683 "0j0wgy54d13a470vm4b9rdjk99n1hmdxpf34x9k3pbmi9w9b566z"))))
13684 (build-system python-build-system)
13686 `(("python-lazy-object-proxy" ,python-lazy-object-proxy)
13687 ("python-six" ,python-six)
13688 ("python-wrapt" ,python-wrapt)))
13691 (modify-phases %standard-phases
13694 (zero? (system* "python" "-m" "unittest" "discover"
13695 "-p" "unittest*.py")))))))
13696 (home-page "https://github.com/PyCQA/astroid")
13697 (synopsis "Common base representation of python source code for pylint and
13699 (description "@code{python-astroid} provides a common base representation
13700 of python source code for projects such as pychecker, pyreverse, pylint, etc.
13702 It provides a compatible representation which comes from the _ast module. It
13703 rebuilds the tree generated by the builtin _ast module by recursively walking
13704 down the AST and building an extended ast. The new node classes have
13705 additional methods and attributes for different usages. They include some
13706 support for static inference and local name scopes. Furthermore, astroid
13707 builds partial trees by inspecting living objects.")
13708 (license license:lgpl2.1+)))
13710 (define-public python2-astroid
13711 (package-with-python2 python-astroid))
13713 (define-public python-isort
13715 (name "python-isort")
13720 (uri (string-append
13721 "https://github.com/timothycrosley/isort/archive/"
13722 version ".tar.gz"))
13723 (file-name (string-append name "-" version ".tar.gz"))
13726 "0zsrgkb0krn5476yncy5dd56k7dk34zqb4bnlvwy44ixgilyjmfh"))))
13727 (build-system python-build-system)
13729 `(("python-mock" ,python-mock)
13730 ("python-pytest" ,python-pytest)))
13731 (home-page "https://github.com/timothycrosley/isort")
13732 (synopsis "Python utility/library to sort python imports")
13733 (description "@code{python-isort} is a python utility/library to sort
13734 imports alphabetically, and automatically separated into sections. It
13735 provides a command line utility, a python library and plugins for various
13737 (license license:expat)))
13739 (define-public python2-isort
13740 (package-with-python2 python-isort))
13742 (define-public python2-backports-functools-lru-cache
13744 (name "python2-backports-functools-lru-cache")
13749 ;; only the pypi tarballs contain the necessary metadata
13750 (uri (pypi-uri "backports.functools_lru_cache" version))
13753 "158ysf2hb0q4p4695abfiym9x1ywg0dgh8a3apd7gqaaxjy22jj4"))))
13754 (build-system python-build-system)
13756 `(("python2-setuptools-scm" ,python2-setuptools-scm)))
13758 `(#:python ,python-2))
13759 (home-page "https://github.com/jaraco/backports.functools_lru_cache")
13760 (synopsis "Backport of functools.lru_cache from Python 3.3")
13761 (description "@code{python2-backports-functools-lru-cache} is a backport
13762 of @code{functools.lru_cache} from python 3.3.")
13763 (license license:expat)))
13765 (define-public python-configparser
13767 (name "python-configparser")
13772 (uri (string-append
13773 "https://bitbucket.org/ambv/configparser/get/"
13774 version ".tar.bz2"))
13775 (file-name (string-append name "-" version ".tar.gz"))
13778 "0waq40as14abwzbb321hfz4vr1fi363nscy32ga14qvfygrg96wa"))))
13779 (build-system python-build-system)
13780 (home-page "http://docs.python.org/py3k/library/configparser.html")
13781 (synopsis "Backport of configparser from python 3.5")
13782 (description "@code{python-configparser} is a backport of
13783 @code{configparser} from Python 3.5 so that it can be used directly
13784 in other versions.")
13785 (license license:expat)))
13787 (define-public python2-configparser
13788 (package-with-python2 python-configparser))
13790 (define-public python2-coverage-test-runner
13792 (name "python2-coverage-test-runner")
13797 (uri (string-append
13798 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/"
13799 "coverage-test-runner/snapshot/coverage-test-runner-"
13800 version ".tar.gz"))
13803 "0y1m7z3dl63kmhcmydl1mwg0hacnf6ghrx9dah17j9iasssfa3g7"))))
13804 (build-system python-build-system)
13806 `(#:python ,python-2
13808 (modify-phases %standard-phases
13811 (zero? (system* "./testrun")))))))
13813 `(("python2-coverage" ,python2-coverage)))
13814 (home-page "https://liw.fi/coverage-test-runner/")
13815 (synopsis "Python module for running unit tests")
13816 (description "@code{CoverageTestRunner} is a python module for running
13817 unit tests and failing them if the unit test module does not excercise all
13818 statements in the module it tests.")
13819 (license license:gpl3+)))
13821 (define-public python-pylint
13823 (name "python-pylint")
13828 (uri (string-append
13829 "https://github.com/PyCQA/pylint/archive/pylint-"
13830 version ".tar.gz"))
13833 "08pmgflmq2zrzrn9nkfadzwa5vybz46wvwxhrsd2mjlcgsh4rzbm"))))
13834 (build-system python-build-system)
13836 `(("python-tox" ,python-tox)))
13838 `(("python-astroid" ,python-astroid)
13839 ("python-isort" ,python-isort)
13840 ("python-mccabe" ,python-mccabe)
13841 ("python-six" ,python-six)))
13844 (modify-phases %standard-phases
13847 ;; Somehow, tests for python2-pylint
13848 ;; fail if run from the build directory
13849 (let ((work "/tmp/work"))
13851 (setenv "PYTHONPATH"
13852 (string-append (getenv "PYTHONPATH") ":" work))
13853 (copy-recursively "." work)
13854 (with-directory-excursion "/tmp"
13855 (zero? (system* "python" "-m" "unittest" "discover"
13856 "-s" (string-append work "/pylint/test")
13857 "-p" "*test_*.py")))))))))
13858 (home-page "https://github.com/PyCQA/pylint")
13859 (synopsis "Python source code analyzer which looks for coding standard
13861 (description "Pylint is a Python source code analyzer which looks
13862 for programming errors, helps enforcing a coding standard and sniffs
13863 for some code smells (as defined in Martin Fowler's Refactoring book).
13865 Pylint has many rules enabled by default, way too much to silence them
13866 all on a minimally sized program. It's highly configurable and handle
13867 pragmas to control it from within your code. Additionally, it is
13868 possible to write plugins to add your own checks.")
13869 (license license:gpl2+)))
13871 (define-public python2-pylint
13872 (let ((pylint (package-with-python2 python-pylint)))
13873 (package (inherit pylint)
13875 `(("python2-backports-functools-lru-cache"
13876 ,python2-backports-functools-lru-cache)
13877 ("python2-configparser" ,python2-configparser)
13878 ,@(package-propagated-inputs pylint))))))