gnu: python-sphinx-rtd-theme: Remove inputs.
[jackhill/guix/guix.git] / gnu / packages / python.scm
1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2013 Nikita Karetnikov <nikita@karetnikov.org>
3 ;;; Copyright © 2013, 2014, 2015, 2016 Ludovic Courtès <ludo@gnu.org>
4 ;;; Copyright © 2013, 2014, 2015, 2016 Andreas Enge <andreas@enge.fr>
5 ;;; Copyright © 2014, 2015 Mark H Weaver <mhw@netris.org>
6 ;;; Copyright © 2014 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 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 ng0 <ng0@we.make.ritual.n0.is>
27 ;;; Copyright © 2016 Dylan Jeffers <sapientech@sapientech@openmailbox.org>
28 ;;; Copyright © 2016 David Craven <david@craven.ch>
29 ;;; Copyright © 2016 Marius Bakke <mbakke@fastmail.com>
30 ;;; Copyright © 2016 Stefan Reichoer <stefan@xsteve.at>
31 ;;; Copyright © 2016 Dylan Jeffers <sapientech@sapientech@openmailbox.org>
32 ;;; Copyright © 2016 Alex Vong <alexvong1995@gmail.com>
33 ;;; Copyright © 2016 Arun Isaac <arunisaac@systemreboot.net>
34 ;;;
35 ;;; This file is part of GNU Guix.
36 ;;;
37 ;;; GNU Guix is free software; you can redistribute it and/or modify it
38 ;;; under the terms of the GNU General Public License as published by
39 ;;; the Free Software Foundation; either version 3 of the License, or (at
40 ;;; your option) any later version.
41 ;;;
42 ;;; GNU Guix is distributed in the hope that it will be useful, but
43 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
44 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
45 ;;; GNU General Public License for more details.
46 ;;;
47 ;;; You should have received a copy of the GNU General Public License
48 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
49
50 (define-module (gnu packages python)
51 #:use-module ((guix licenses) #:prefix license:)
52 #:use-module (gnu packages)
53 #:use-module (gnu packages algebra)
54 #:use-module (gnu packages adns)
55 #:use-module (gnu packages attr)
56 #:use-module (gnu packages backup)
57 #:use-module (gnu packages bash)
58 #:use-module (gnu packages compression)
59 #:use-module (gnu packages databases)
60 #:use-module (gnu packages django)
61 #:use-module (gnu packages file)
62 #:use-module (gnu packages fontutils)
63 #:use-module (gnu packages gcc)
64 #:use-module (gnu packages ghostscript)
65 #:use-module (gnu packages gl)
66 #:use-module (gnu packages glib)
67 #:use-module (gnu packages gstreamer)
68 #:use-module (gnu packages gtk)
69 #:use-module (gnu packages icu4c)
70 #:use-module (gnu packages image)
71 #:use-module (gnu packages imagemagick)
72 #:use-module (gnu packages libevent)
73 #:use-module (gnu packages libffi)
74 #:use-module (gnu packages linux)
75 #:use-module (gnu packages maths)
76 #:use-module (gnu packages multiprecision)
77 #:use-module (gnu packages networking)
78 #:use-module (gnu packages ncurses)
79 #:use-module (gnu packages openstack)
80 #:use-module (gnu packages password-utils)
81 #:use-module (gnu packages pcre)
82 #:use-module (gnu packages perl)
83 #:use-module (gnu packages pkg-config)
84 #:use-module (gnu packages protobuf)
85 #:use-module (gnu packages readline)
86 #:use-module (gnu packages sdl)
87 #:use-module (gnu packages statistics)
88 #:use-module (gnu packages tex)
89 #:use-module (gnu packages texinfo)
90 #:use-module (gnu packages tls)
91 #:use-module (gnu packages version-control)
92 #:use-module (gnu packages video)
93 #:use-module (gnu packages web)
94 #:use-module (gnu packages base)
95 #:use-module (gnu packages xml)
96 #:use-module (gnu packages xorg)
97 #:use-module (gnu packages xdisorg)
98 #:use-module (gnu packages zip)
99 #:use-module (gnu packages tcl)
100 #:use-module (gnu packages bdw-gc)
101 #:use-module (guix packages)
102 #:use-module (guix download)
103 #:use-module (guix git-download)
104 #:use-module (guix utils)
105 #:use-module (guix build-system gnu)
106 #:use-module (guix build-system cmake)
107 #:use-module (guix build-system python)
108 #:use-module (guix build-system trivial)
109 #:use-module (srfi srfi-1))
110
111 (define-public python-2.7
112 (package
113 (name "python")
114 (version "2.7.12")
115 (source
116 (origin
117 (method url-fetch)
118 (uri (string-append "https://www.python.org/ftp/python/"
119 version "/Python-" version ".tar.xz"))
120 (sha256
121 (base32
122 "0y7rl603vmwlxm6ilkhc51rx2mfj14ckcz40xxgs0ljnvlhp30yp"))
123 (patches (search-patches "python-2.7-search-paths.patch"
124 "python-2-deterministic-build-info.patch"
125 "python-2.7-site-prefixes.patch"
126 "python-2.7-source-date-epoch.patch"))
127 (modules '((guix build utils)))
128 ;; suboptimal to delete failing tests here, but if we delete them in the
129 ;; arguments then we need to make sure to strip out that phase when it
130 ;; gets inherited by python and python-minimal.
131 (snippet
132 '(begin
133 (for-each delete-file
134 '("Lib/test/test_compileall.py"
135 "Lib/test/test_ctypes.py" ; fails on mips64el
136 "Lib/test/test_distutils.py"
137 "Lib/test/test_import.py"
138 "Lib/test/test_shutil.py"
139 "Lib/test/test_socket.py"
140 "Lib/test/test_subprocess.py"))
141 #t))))
142 (outputs '("out"
143 "tk")) ;tkinter; adds 50 MiB to the closure
144 (build-system gnu-build-system)
145 (arguments
146 `(;; 356 tests OK.
147 ;; 6 tests failed:
148 ;; test_compileall test_distutils test_import test_shutil test_socket
149 ;; test_subprocess
150 ;; 39 tests skipped:
151 ;; test_aepack test_al test_applesingle test_bsddb test_bsddb185
152 ;; test_bsddb3 test_cd test_cl test_codecmaps_cn test_codecmaps_hk
153 ;; test_codecmaps_jp test_codecmaps_kr test_codecmaps_tw test_curses
154 ;; test_dl test_gdb test_gl test_imageop test_imgfile test_ioctl
155 ;; test_kqueue test_linuxaudiodev test_macos test_macostools
156 ;; test_msilib test_ossaudiodev test_scriptpackages test_smtpnet
157 ;; test_socketserver test_startfile test_sunaudiodev test_timeout
158 ;; test_tk test_ttk_guionly test_urllib2net test_urllibnet
159 ;; test_winreg test_winsound test_zipfile64
160 ;; 4 skips unexpected on linux2:
161 ;; test_bsddb test_bsddb3 test_gdb test_ioctl
162 #:test-target "test"
163 #:configure-flags
164 (list "--enable-shared" ;allow embedding
165 "--with-system-ffi" ;build ctypes
166 "--with-ensurepip=install" ;install pip and setuptools
167 (string-append "LDFLAGS=-Wl,-rpath="
168 (assoc-ref %outputs "out") "/lib"))
169
170 #:modules ((ice-9 ftw) (ice-9 match)
171 (guix build utils) (guix build gnu-build-system))
172 #:phases
173 (modify-phases %standard-phases
174 (add-before
175 'configure 'patch-lib-shells
176 (lambda _
177 ;; Filter for existing files, since some may not exist in all
178 ;; versions of python that are built with this recipe.
179 (substitute* (filter file-exists?
180 '("Lib/subprocess.py"
181 "Lib/popen2.py"
182 "Lib/distutils/tests/test_spawn.py"
183 "Lib/test/test_subprocess.py"))
184 (("/bin/sh") (which "sh")))
185
186 ;; Use zero as the timestamp in .pyc files so that builds are
187 ;; deterministic. TODO: Remove it when this variable is set in
188 ;; gnu-build-system.scm.
189 (setenv "SOURCE_DATE_EPOCH" "1")
190 #t))
191 (add-before 'configure 'do-not-record-configure-flags
192 (lambda* (#:key configure-flags #:allow-other-keys)
193 ;; Remove configure flags from the installed '_sysconfigdata.py'
194 ;; and 'Makefile' so we don't end up keeping references to the
195 ;; build tools.
196 ;;
197 ;; Preserve at least '--with-system-ffi' since otherwise the
198 ;; thing tries to build libffi, fails, and we end up with a
199 ;; Python that lacks ctypes.
200 (substitute* "configure"
201 (("^CONFIG_ARGS=.*$")
202 (format #f "CONFIG_ARGS='~a'\n"
203 (if (member "--with-system-ffi" configure-flags)
204 "--with-system-ffi"
205 ""))))
206 #t))
207 (add-before
208 'check 'pre-check
209 (lambda _
210 ;; 'Lib/test/test_site.py' needs a valid $HOME
211 (setenv "HOME" (getcwd))
212 #t))
213 (add-after
214 'unpack 'set-source-file-times-to-1980
215 ;; XXX One of the tests uses a ZIP library to pack up some of the
216 ;; source tree, and fails with "ZIP does not support timestamps
217 ;; before 1980". Work around this by setting the file times in the
218 ;; source tree to sometime in early 1980.
219 (lambda _
220 (let ((circa-1980 (* 10 366 24 60 60)))
221 (ftw "." (lambda (file stat flag)
222 (utime file circa-1980 circa-1980)
223 #t))
224 #t)))
225 (add-after 'install 'remove-tests
226 ;; Remove 25 MiB of unneeded unit tests. Keep test_support.*
227 ;; because these files are used by some libraries out there.
228 (lambda* (#:key outputs #:allow-other-keys)
229 (let ((out (assoc-ref outputs "out")))
230 (match (scandir (string-append out "/lib")
231 (lambda (name)
232 (string-prefix? "python" name)))
233 ((pythonX.Y)
234 (let ((testdir (string-append out "/lib/" pythonX.Y
235 "/test")))
236 (with-directory-excursion testdir
237 (for-each delete-file-recursively
238 (scandir testdir
239 (match-lambda
240 ((or "." "..") #f)
241 (file
242 (not
243 (string-prefix? "test_support."
244 file))))))
245 (call-with-output-file "__init__.py" (const #t))
246 #t)))))))
247 (add-before 'strip 'make-libraries-writable
248 (lambda* (#:key outputs #:allow-other-keys)
249 ;; Make .so files writable so they can be stripped.
250 (let ((out (assoc-ref outputs "out")))
251 (for-each (lambda (file)
252 (chmod file #o755))
253 (find-files (string-append out "/lib")
254 "\\.so"))
255 #t)))
256 (add-after 'install 'move-tk-inter
257 (lambda* (#:key outputs #:allow-other-keys)
258 ;; When Tkinter support is built move it to a separate output so
259 ;; that the main output doesn't contain a reference to Tcl/Tk.
260 (let ((out (assoc-ref outputs "out"))
261 (tk (assoc-ref outputs "tk")))
262 (when tk
263 (match (find-files out "tkinter.*\\.so")
264 ((tkinter.so)
265 ;; The .so is in OUT/lib/pythonX.Y/lib-dynload, but we
266 ;; want it under TK/lib/pythonX.Y/site-packages.
267 (let* ((len (string-length out))
268 (target (string-append
269 tk "/"
270 (string-drop
271 (dirname (dirname tkinter.so))
272 len)
273 "/site-packages")))
274 (install-file tkinter.so target)
275 (delete-file tkinter.so)))))
276 #t))))))
277 (inputs
278 `(("bzip2" ,bzip2)
279 ("gdbm" ,gdbm)
280 ("libffi" ,libffi) ; for ctypes
281 ("sqlite" ,sqlite) ; for sqlite extension
282 ("openssl" ,openssl)
283 ("readline" ,readline)
284 ("zlib" ,zlib)
285 ("tcl" ,tcl)
286 ("tk" ,tk))) ; for tkinter
287 (native-inputs
288 `(("pkg-config" ,pkg-config)))
289 (native-search-paths
290 (list (search-path-specification
291 (variable "PYTHONPATH")
292 (files '("lib/python2.7/site-packages")))))
293 (home-page "https://www.python.org")
294 (synopsis "High-level, dynamically-typed programming language")
295 (description
296 "Python is a remarkably powerful dynamic programming language that
297 is used in a wide variety of application domains. Some of its key
298 distinguishing features include: clear, readable syntax; strong
299 introspection capabilities; intuitive object orientation; natural
300 expression of procedural code; full modularity, supporting hierarchical
301 packages; exception-based error handling; and very high level dynamic
302 data types.")
303 (license license:psfl)))
304
305 ;; Current 2.x version.
306 (define-public python-2 python-2.7)
307
308 (define-public python-3.5
309 (package (inherit python-2)
310 (version "3.5.2")
311 (source (origin
312 (method url-fetch)
313 (uri (string-append "https://www.python.org/ftp/python/"
314 version "/Python-" version ".tar.xz"))
315 (patches (search-patches
316 "python-fix-tests.patch"
317 "python-3.5-fix-tests.patch"
318 "python-3-deterministic-build-info.patch"
319 "python-3-search-paths.patch"))
320 (patch-flags '("-p0"))
321 (sha256
322 (base32
323 "0h6a5fr7ram2s483lh0pnmc4ncijb8llnpfdxdcl5dxr01hza400"))))
324 (arguments (substitute-keyword-arguments (package-arguments python-2)
325 ((#:tests? _) #t)))
326 (native-search-paths
327 (list (search-path-specification
328 (variable "PYTHONPATH")
329 (files (list (string-append "lib/python"
330 (version-major+minor version)
331 "/site-packages"))))))))
332
333 (define-public python-3.4
334 (package (inherit python-3.5)
335 (version "3.4.5")
336 (source (origin
337 (method url-fetch)
338 (uri (string-append "https://www.python.org/ftp/python/"
339 version "/Python-" version ".tar.xz"))
340 (patches (search-patches
341 "python-fix-tests.patch"
342 "python-3.4-fix-tests.patch"
343 "python-3-deterministic-build-info.patch"
344 "python-3-search-paths.patch"))
345 (patch-flags '("-p0"))
346 (sha256
347 (base32
348 "12l9klp778wklxmckhghniy5hklss8r26995pyd00qbllk4b2r7f"))))))
349
350 ;; Current 3.x version.
351 (define-public python-3 python-3.5)
352
353 ;; Current major version.
354 (define-public python python-3)
355
356 ;; Minimal variants of Python, mostly used to break the cycle between Tk and
357 ;; Python (Tk -> libxcb -> Python.)
358
359 (define-public python2-minimal
360 (package (inherit python-2)
361 (name "python-minimal")
362 (outputs '("out"))
363 (arguments
364 (substitute-keyword-arguments (package-arguments python-2)
365 ((#:configure-flags cf)
366 `(append ,cf '("--without-system-ffi")))))
367 (inputs '()))) ;none of the optional dependencies
368
369 (define-public python-minimal
370 (package (inherit python)
371 (name "python-minimal")
372 (outputs '("out"))
373
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)
378 ("openssl" ,openssl)
379 ("zlib" ,zlib)))))
380
381 (define* (wrap-python3 python
382 #:optional
383 (name (string-append (package-name python) "-wrapper")))
384 (package (inherit python)
385 (name name)
386 (source #f)
387 (build-system trivial-build-system)
388 (outputs '("out"))
389 (inputs `(("bash" ,bash)))
390 (propagated-inputs `(("python" ,python)))
391 (arguments
392 `(#:modules ((guix build utils))
393 #:builder
394 (begin
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/")))
398 (mkdir-p bin)
399 (for-each
400 (lambda (old new)
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")
408 "/bin/bash"))
409 (old (string-append python "python3-config"))
410 (new (string-append bin "/python-config")))
411 (with-output-to-file new
412 (lambda ()
413 (format #t "#!~a~%" bash)
414 (format #t "exec \"~a\" \"$@\"~%" old)
415 (chmod new #o755)
416 #t)))))))
417 (synopsis "Wrapper for the Python 3 commands")
418 (description
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}.")))
422
423 (define-public python-wrapper (wrap-python3 python))
424 (define-public python-minimal-wrapper (wrap-python3 python-minimal))
425
426 (define-public python-psutil
427 (package
428 (name "python-psutil")
429 (version "4.3.0")
430 (source
431 (origin
432 (method url-fetch)
433 (uri (pypi-uri "psutil" version))
434 (sha256
435 (base32
436 "1w4r09fvn6kd80m5mx4ws1wz100brkaq6hzzpwrns8cgjzjpl6c6"))))
437 (build-system python-build-system)
438 (home-page "https://www.github.com/giampaolo/psutil")
439 (synopsis "Library for retrieving information on running processes")
440 (description
441 "psutil (Python system and process utilities) is a library for retrieving
442 information on running processes and system utilization (CPU, memory, disks,
443 network) in Python. It is useful mainly for system monitoring, profiling and
444 limiting process resources and management of running processes. It implements
445 many functionalities offered by command line tools such as: ps, top, lsof,
446 netstat, ifconfig, who, df, kill, free, nice, ionice, iostat, iotop, uptime,
447 pidof, tty, taskset, pmap.")
448 (license license:bsd-3)))
449
450 (define-public python2-psutil
451 (package-with-python2 python-psutil))
452
453 (define-public python-passlib
454 (package
455 (name "python-passlib")
456 (version "1.6.5")
457 (source
458 (origin
459 (method url-fetch)
460 (uri (pypi-uri "passlib" version))
461 (sha256
462 (base32
463 "1z27wdxs5rj5xhhqfzvzn3yg682irkxw6dcs5jj7mcf97psk8gd8"))))
464 (build-system python-build-system)
465 (native-inputs
466 `(("python-nose" ,python-nose)))
467 (propagated-inputs
468 `(("python-py-bcrypt" ,python-py-bcrypt)))
469 (arguments
470 `(#:phases
471 (alist-cons-before
472 'check 'set-PYTHON_EGG_CACHE
473 ;; some tests require access to "$HOME/.cython"
474 (lambda* _ (setenv "PYTHON_EGG_CACHE" "/tmp"))
475 %standard-phases)))
476 (home-page "https://bitbucket.org/ecollins/passlib")
477 (synopsis
478 "Comprehensive password hashing framework")
479 (description
480 "Passlib is a password hashing library for Python 2 & 3, which provides
481 cross-platform implementations of over 30 password hashing algorithms, as well
482 as a framework for managing existing password hashes. It's designed to be
483 useful for a wide range of tasks, from verifying a hash found in /etc/shadow,
484 to providing full-strength password hashing for multi-user application.")
485 (license license:bsd-3)))
486
487 (define-public python2-passlib
488 (package-with-python2 python-passlib))
489
490 (define-public python-py-bcrypt
491 (package
492 (name "python-py-bcrypt")
493 (version "0.4")
494 (source
495 (origin
496 (method url-fetch)
497 (uri (string-append
498 "https://pypi.python.org/packages/source/p/py-bcrypt/py-bcrypt-"
499 version
500 ".tar.gz"))
501 (sha256
502 (base32
503 "0y6smdggwi5s72v6p1nn53dg6w05hna3d264cq6kas0lap73p8az"))))
504 (build-system python-build-system)
505 (home-page "https://code.google.com/p/py-bcrypt")
506 (synopsis
507 "Bcrypt password hashing and key derivation")
508 (description
509 "A python wrapper of OpenBSD's Blowfish password hashing code. This
510 system hashes passwords using a version of Bruce Schneier's Blowfish block
511 cipher with modifications designed to raise the cost of off-line password
512 cracking and frustrate fast hardware implementation. The computation cost of
513 the algorithm is parametised, so it can be increased as computers get faster.
514 The intent is to make a compromise of a password database less likely to
515 result in an attacker gaining knowledge of the plaintext passwords (e.g. using
516 John the Ripper).")
517 ;; "sha2.c" is under BSD-3;
518 ;; "blowfish.c" and "bcrypt.c" are under BSD-4;
519 ;; the rest is under ISC.
520 (license (list license:isc license:bsd-3 license:bsd-4))))
521
522 (define-public python2-py-bcrypt
523 (package-with-python2 python-py-bcrypt))
524
525
526 (define-public python-paramiko
527 (package
528 (name "python-paramiko")
529 (version "1.16.0")
530 (source
531 (origin
532 (method url-fetch)
533 (uri (pypi-uri "paramiko" version))
534 (sha256
535 (base32
536 "14k8z7ndc3zk5xivnm4d8lncchx475ll5izpf8vmfbq7rp9yp5rj"))))
537 (build-system python-build-system)
538 (propagated-inputs
539 `(("python-pycrypto" ,python-pycrypto)
540 ("python-ecdsa" ,python-ecdsa)))
541 (home-page "http://www.paramiko.org/")
542 (synopsis "SSHv2 protocol library")
543 (description "Paramiko is a python implementation of the SSHv2 protocol,
544 providing both client and server functionality. While it leverages a Python C
545 extension for low level cryptography (PyCrypto), Paramiko itself is a pure
546 Python interface around SSH networking concepts.")
547 (license license:lgpl2.1+)))
548
549 (define-public python2-paramiko
550 (package-with-python2 python-paramiko))
551
552
553 (define-public python-httplib2
554 (package
555 (name "python-httplib2")
556 (version "0.9.2")
557 (source
558 (origin
559 (method url-fetch)
560 (uri (pypi-uri "httplib2" version))
561 (sha256
562 (base32
563 "126rsryvw9vhbf3qmsfw9lf4l4xm2srmgs439lgma4cpag4s3ay3"))))
564 (build-system python-build-system)
565 (home-page "https://github.com/jcgregorio/httplib2")
566 (synopsis "Comprehensive HTTP client library")
567 (description
568 "A comprehensive HTTP client library supporting many features left out of
569 other HTTP libraries.")
570 (license license:expat)))
571
572 (define-public python2-httplib2
573 (package-with-python2 python-httplib2))
574
575 (define-public python-ecdsa
576 (package
577 (name "python-ecdsa")
578 (version "0.13")
579 (source
580 (origin
581 (method url-fetch)
582 (uri (string-append
583 "https://pypi.python.org/packages/source/e/ecdsa/ecdsa-"
584 version
585 ".tar.gz"))
586 (sha256
587 (base32
588 "1yj31j0asmrx4an9xvsaj2icdmzy6pw0glfpqrrkrphwdpi1xkv4"))))
589 (build-system python-build-system)
590 (inputs
591 `(("openssl" ,openssl)))
592 (home-page
593 "http://github.com/warner/python-ecdsa")
594 (synopsis
595 "ECDSA cryptographic signature library (pure python)")
596 (description
597 "This is an easy-to-use implementation of ECDSA cryptography (Elliptic
598 Curve Digital Signature Algorithm), implemented purely in Python. With this
599 library, you can quickly create keypairs (signing key and verifying key), sign
600 messages, and verify the signatures. The keys and signatures are very short,
601 making them easy to handle and incorporate into other protocols.")
602 (license license:expat)))
603
604 (define-public python2-ecdsa
605 (package-with-python2 python-ecdsa))
606
607 (define-public python-ccm
608 (package
609 (name "python-ccm")
610 (version "2.1.6")
611 (source
612 (origin
613 (method url-fetch)
614 (uri (pypi-uri "ccm" version))
615 (sha256
616 (base32
617 "177dfxsmk3k4cih6fh6v8d91bh4nqx7ns6pc07w7m7i3cvdx3c8n"))))
618 (build-system python-build-system)
619 (propagated-inputs
620 `(("python-pyyaml" ,python-pyyaml)
621 ("python-six" ,python-six)))
622 (home-page "https://github.com/pcmanus/ccm")
623 (synopsis "Cassandra Cluster Manager")
624 (description "A script/library to create, launch and remove an Apache
625 Cassandra cluster on localhost.")
626 (license license:asl2.0)))
627
628 (define-public python2-ccm
629 (package-with-python2 python-ccm))
630
631 (define-public python-pytz
632 (package
633 (name "python-pytz")
634 (version "2016.3")
635 (source
636 (origin
637 (method url-fetch)
638 (uri (pypi-uri "pytz" version ".tar.bz2"))
639 (sha256
640 (base32
641 "1mjmrkk4vc5xzppw7fm0pli1nnbj57cvqv7jjv5whcmccyhxz4y1"))))
642 (build-system python-build-system)
643 (arguments `(#:tests? #f)) ; no test target
644 (home-page "http://pythonhosted.org/pytz")
645 (synopsis "Python timezone library")
646 (description
647 "This library allows accurate and cross platform timezone calculations
648 using Python 2.4 or higher and provides access to the Olson timezone database.")
649 (license license:expat)))
650
651 (define-public python2-pytz
652 (package-with-python2 python-pytz))
653
654
655 (define-public python-babel
656 (package
657 (name "python-babel")
658 (version "2.3.2")
659 (source
660 (origin
661 (method url-fetch)
662 (uri (pypi-uri "Babel" version))
663 (sha256
664 (base32
665 "0k43pi0p1dwpds2w0km3fw92wixzxv2vw7p09capxmjz5cfh23lw"))))
666 (build-system python-build-system)
667 (propagated-inputs
668 `(("python-pytz" ,python-pytz)))
669 (arguments `(#:tests? #f)) ; no test target
670 (home-page "http://babel.pocoo.org/")
671 (synopsis
672 "Tools for internationalizing Python applications")
673 (description
674 "Babel is composed of two major parts:
675 - tools to build and work with gettext message catalogs
676 - a Python interface to the CLDR (Common Locale Data Repository), providing
677 access to various locale display names, localized number and date formatting,
678 etc. ")
679 (license license:bsd-3)))
680
681 (define-public python2-babel
682 (package-with-python2 python-babel))
683
684 (define-public python2-backport-ssl-match-hostname
685 (package
686 (name "python2-backport-ssl-match-hostname")
687 (version "3.5.0.1")
688 (source
689 (origin
690 (method url-fetch)
691 (uri (string-append
692 "https://pypi.python.org/packages/source/b/"
693 "backports.ssl_match_hostname/backports.ssl_match_hostname-"
694 version ".tar.gz"))
695 (sha256
696 (base32
697 "1wndipik52cyqy0677zdgp90i435pmvwd89cz98lm7ri0y3xjajh"))))
698 (build-system python-build-system)
699 (arguments
700 `(#:python ,python-2
701 #:tests? #f)) ; no test target
702 (home-page "https://bitbucket.org/brandon/backports.ssl_match_hostname")
703 (synopsis "Backport of ssl.match_hostname() function from Python 3.5")
704 (description
705 "This backport brings the ssl.match_hostname() function to users of
706 earlier versions of Python. The function checks the hostname in the
707 certificate returned by the server to which a connection has been established,
708 and verifies that it matches the intended target hostname.")
709 (license license:psfl)))
710
711 (define-public python-h5py
712 (package
713 (name "python-h5py")
714 (version "2.6.0")
715 (source
716 (origin
717 (method url-fetch)
718 (uri (pypi-uri "h5py" version))
719 (sha256
720 (base32
721 "0df46dg7i7xfking9lp221bfm8dbl974yvlrbi1w7r6m61ac7bxj"))))
722 (build-system python-build-system)
723 (arguments
724 `(#:tests? #f ; no test target
725 #:phases
726 (modify-phases %standard-phases
727 (add-after 'unpack 'fix-hdf5-paths
728 (lambda* (#:key inputs #:allow-other-keys)
729 (let ((prefix (assoc-ref inputs "hdf5")))
730 (substitute* "setup_build.py"
731 (("\\['/opt/local/lib', '/usr/local/lib'\\]")
732 (string-append "['" prefix "/lib" "']"))
733 (("'/opt/local/include', '/usr/local/include'")
734 (string-append "'" prefix "/include" "'")))
735 (substitute* "setup_configure.py"
736 (("\\['/usr/local/lib', '/opt/local/lib'\\]")
737 (string-append "['" prefix "/lib" "']")))
738 #t))))))
739 (propagated-inputs
740 `(("python-numpy" ,python-numpy)))
741 (inputs
742 `(("hdf5" ,hdf5)
743 ("python-six" ,python-six)))
744 (native-inputs
745 `(("python-cython" ,python-cython)
746 ("python-pkgconfig" ,python-pkgconfig)))
747 (home-page "http://www.h5py.org/")
748 (synopsis "Read and write HDF5 files from Python")
749 (description
750 "The h5py package provides both a high- and low-level interface to the
751 HDF5 library from Python. The low-level interface is intended to be a
752 complete wrapping of the HDF5 API, while the high-level component supports
753 access to HDF5 files, datasets and groups using established Python and NumPy
754 concepts.")
755 (license license:bsd-3)
756 (properties `((python2-variant . ,(delay python2-h5py))))))
757
758 (define-public python2-h5py
759 (package-with-python2 (strip-python2-variant python-h5py)))
760
761 (define-public python-lockfile
762 (package
763 (name "python-lockfile")
764 (version "0.12.2")
765 (source
766 (origin
767 (method url-fetch)
768 (uri (string-append "https://pypi.python.org/packages/source/l/lockfile/"
769 "lockfile-" version ".tar.gz"))
770 (sha256
771 (base32
772 "16gpx5hm73ah5n1079ng0vy381hl802v606npkx4x8nb0gg05vba"))))
773 (build-system python-build-system)
774 (arguments '(#:test-target "check"))
775 (native-inputs
776 `(("python-pbr" ,python-pbr)))
777 (home-page "https://launchpad.net/pylockfile")
778 (synopsis "Platform-independent file locking module")
779 (description
780 "The lockfile package exports a LockFile class which provides a simple
781 API for locking files.")
782 (license license:expat)))
783
784 (define-public python2-lockfile
785 (package-with-python2 python-lockfile))
786
787 (define-public python-mock
788 (package
789 (name "python-mock")
790 (version "1.0.1")
791 (source
792 (origin
793 (method url-fetch)
794 (uri (string-append "https://pypi.python.org/packages/source/m/mock/"
795 "mock-" version ".tar.gz"))
796 (sha256
797 (base32
798 "0kzlsbki6q0awf89rc287f3aj8x431lrajf160a70z0ikhnxsfdq"))))
799 (build-system python-build-system)
800 (arguments '(#:test-target "check"))
801 (home-page "http://code.google.com/p/mock/")
802 (synopsis "Python mocking and patching library for testing")
803 (description
804 "Mock is a library for testing in Python. It allows you to replace parts
805 of your system under test with mock objects and make assertions about how they
806 have been used.")
807 (license license:expat)))
808
809 (define-public python2-mock
810 (package-with-python2 python-mock))
811
812
813 (define-public python-setuptools
814 (package
815 (name "python-setuptools")
816 (version "18.3.1")
817 (source
818 (origin
819 (method url-fetch)
820 (uri (string-append "https://pypi.python.org/packages/source/s/setuptools/setuptools-"
821 version ".tar.gz"))
822 (sha256
823 (base32
824 "0kc7rbav00ks6iaw14p38y81q12fx0lpkhgf5m97xc04f5r318ig"))))
825 (build-system python-build-system)
826 ;; FIXME: Tests require pytest, which itself relies on setuptools.
827 ;; One could bootstrap with an internal untested setuptools.
828 (arguments
829 `(#:tests? #f))
830 (home-page "https://pypi.python.org/pypi/setuptools")
831 (synopsis
832 "Library designed to facilitate packaging Python projects")
833 (description
834 "Setuptools is a fully-featured, stable library designed to facilitate
835 packaging Python projects, where packaging includes:
836 Python package and module definitions,
837 distribution package metadata,
838 test hooks,
839 project installation,
840 platform-specific details,
841 Python 3 support.")
842 (license license:psfl)))
843
844 (define-public python2-setuptools
845 (package-with-python2 python-setuptools))
846
847
848 (define-public python-pycrypto
849 (package
850 (name "python-pycrypto")
851 (version "2.6.1")
852 (source
853 (origin
854 (method url-fetch)
855 (uri (string-append "https://pypi.python.org/packages/source/p/"
856 "pycrypto/pycrypto-" version ".tar.gz"))
857 (sha256
858 (base32
859 "0g0ayql5b9mkjam8hym6zyg6bv77lbh66rv1fyvgqb17kfc1xkpj"))))
860 (build-system python-build-system)
861 (inputs
862 `(("python" ,python)
863 ("gmp" ,gmp)))
864 (arguments
865 `(#:phases
866 (alist-cons-before
867 'build 'set-build-env
868 ;; pycrypto runs an autoconf configure script behind the scenes
869 (lambda _
870 (setenv "CONFIG_SHELL" (which "bash")))
871 %standard-phases)))
872 (home-page "http://www.pycrypto.org/")
873 (synopsis "Cryptographic modules for Python")
874 (description
875 "Pycrypto is a collection of both secure hash functions (such as SHA256
876 and RIPEMD160), and various encryption algorithms (AES, DES, RSA, ElGamal,
877 etc.). The package is structured to make adding new modules easy.")
878 (license license:public-domain)))
879
880 (define-public python2-pycrypto
881 (let ((pycrypto (package-with-python2 python-pycrypto)))
882 (package (inherit pycrypto)
883 (inputs
884 `(("python" ,python-2)
885 ,@(alist-delete
886 "python"
887 (package-inputs pycrypto)))))))
888
889 (define-public python-keyring
890 (package
891 (name "python-keyring")
892 (version "8.7")
893 (source
894 (origin
895 (method url-fetch)
896 (uri (pypi-uri "keyring" version))
897 (sha256
898 (base32
899 "0482rmi2x6p78wl2kz8qzyq21xz1sbbfwnv5x7dggar4vkwxhzfx"))))
900 (build-system python-build-system)
901 (native-inputs
902 `(("python-setuptools-scm" ,python-setuptools-scm)))
903 (propagated-inputs
904 `(("python-pycrypto" ,python-pycrypto)))
905 (arguments
906 `(#:tests? #f)) ;TODO: tests require pytest
907 (home-page "https://github.com/jaraco/keyring")
908 (synopsis "Store and access your passwords safely")
909 (description
910 "The Python keyring lib provides a easy way to access the system keyring
911 service from python. It can be used in any application that needs safe
912 password storage.")
913 ;; "MIT" and PSF dual license
914 (license license:x11)))
915
916 (define-public python2-keyring
917 (package-with-python2 python-keyring))
918
919 (define-public python-six
920 (package
921 (name "python-six")
922 (version "1.10.0")
923 (source
924 (origin
925 (method url-fetch)
926 (uri (pypi-uri "six" version))
927 (sha256
928 (base32
929 "0snmb8xffb3vsma0z67i0h0w2g2dy0p3gsgh9gi4i0kgc5l8spqh"))))
930 (build-system python-build-system)
931 (home-page "http://pypi.python.org/pypi/six/")
932 (synopsis "Python 2 and 3 compatibility utilities")
933 (description
934 "Six is a Python 2 and 3 compatibility library. It provides utility
935 functions for smoothing over the differences between the Python versions with
936 the goal of writing Python code that is compatible on both Python versions.
937 Six supports every Python version since 2.5. It is contained in only one
938 Python file, so it can be easily copied into your project.")
939 (license license:x11)))
940
941 (define-public python2-six
942 (package-with-python2 python-six))
943
944 (define-public python-dateutil-2
945 (package
946 (name "python-dateutil")
947 (version "2.5.2")
948 (source
949 (origin
950 (method url-fetch)
951 (uri (pypi-uri "python-dateutil" version))
952 (sha256
953 (base32
954 "0jrfpcgvgya6hs45dhrd9yiqgdgz9qp9aa07zsw8gqgn8zphff86"))))
955 (build-system python-build-system)
956 (propagated-inputs
957 `(("python-six" ,python-six)))
958 (home-page "https://dateutil.readthedocs.io/en/stable/")
959 (synopsis "Extensions to the standard datetime module")
960 (description
961 "The dateutil module provides powerful extensions to the standard
962 datetime module, available in Python 2.3+.")
963 (license license:bsd-3)))
964
965 (define-public python2-dateutil-2
966 (package-with-python2 python-dateutil-2))
967
968 (define-public python-dateutil
969 (package
970 (name "python-dateutil")
971 (version "1.5") ; last version for python < 3
972 (source
973 (origin
974 (method url-fetch)
975 (uri (string-append "http://labix.org/download/python-dateutil/"
976 "python-dateutil-" version ".tar.gz"))
977 (sha256
978 (base32
979 "0fqfglhy5khbvsipr3x7m6bcaqljh8xl5cw33vbfxy7qhmywm2n0"))))
980 (build-system python-build-system)
981 (home-page "https://dateutil.readthedocs.io/en/stable/")
982 (synopsis "Extensions to the standard datetime module")
983 (description
984 "The dateutil module provides powerful extensions to the standard
985 datetime module, available in Python 2.3+.")
986 (license license:psfl)))
987
988 (define-public python2-dateutil
989 (package-with-python2 python-dateutil))
990
991 (define-public python-parsedatetime
992 (package
993 (name "python-parsedatetime")
994 (version "2.1")
995 (source
996 (origin
997 (method url-fetch)
998 (uri (pypi-uri "parsedatetime" version))
999 (sha256
1000 (base32
1001 "0bdgyw6y3v7bcxlx0p50s8drxsh5bb5cy2afccqr3j90amvpii8p"))))
1002 (build-system python-build-system)
1003 (native-inputs
1004 `(("python-nose" ,python-nose)
1005 ("python-pyicu" ,python-pyicu)))
1006 (home-page "http://github.com/bear/parsedatetime/")
1007 (synopsis
1008 "Parse human-readable date/time text")
1009 (description
1010 "Parse human-readable date/time text.")
1011 (license license:asl2.0)))
1012
1013 (define-public python2-parsedatetime
1014 (package-with-python2 python-parsedatetime))
1015
1016 (define-public python-pandas
1017 (package
1018 (name "python-pandas")
1019 (version "0.18.1")
1020 (source
1021 (origin
1022 (method url-fetch)
1023 (uri (string-append
1024 "https://pypi.python.org/packages/11/09/"
1025 "e66eb844daba8680ddff26335d5b4fead77f60f957678243549a8dd4830d/"
1026 "pandas-" version ".tar.gz"))
1027 (sha256
1028 (base32 "1ckpxrvvjj6zxmn68icd9hib8qcpx9b35f6izxnr25br5ilq7r6j"))))
1029 (build-system python-build-system)
1030 (propagated-inputs
1031 `(("python-numpy" ,python-numpy)
1032 ("python-pytz" ,python-pytz)
1033 ("python-dateutil" ,python-dateutil-2)))
1034 (native-inputs
1035 `(("python-nose" ,python-nose)))
1036 (home-page "http://pandas.pydata.org")
1037 (synopsis "Data structures for data analysis, time series, and statistics")
1038 (description
1039 "Pandas is a Python package providing fast, flexible, and expressive data
1040 structures designed to make working with structured (tabular,
1041 multidimensional, potentially heterogeneous) and time series data both easy
1042 and intuitive. It aims to be the fundamental high-level building block for
1043 doing practical, real world data analysis in Python.")
1044 (license license:bsd-3)))
1045
1046 (define-public python2-pandas
1047 (package-with-python2 python-pandas))
1048
1049 (define-public python-tzlocal
1050 (package
1051 (name "python-tzlocal")
1052 (version "1.2.2")
1053 (source
1054 (origin
1055 (method url-fetch)
1056 (uri (pypi-uri "tzlocal" version))
1057 (sha256
1058 (base32
1059 "0paj7vlsb0np8b5sp4bv64wxv7qk2piyp7xg29pkhdjwsbls9fnb"))))
1060 (build-system python-build-system)
1061 (propagated-inputs
1062 `(("python-pytz" ,python-pytz)))
1063 (home-page "https://github.com/regebro/tzlocal")
1064 (synopsis
1065 "Local timezone information for Python")
1066 (description
1067 "Tzlocal returns a tzinfo object with the local timezone information.
1068 This module attempts to fix a glaring hole in pytz, that there is no way to
1069 get the local timezone information, unless you know the zoneinfo name, and
1070 under several distributions that's hard or impossible to figure out.")
1071 (license license:cc0)))
1072
1073 (define-public python2-pysqlite
1074 (package
1075 (name "python2-pysqlite")
1076 (version "2.8.1")
1077 (source
1078 (origin
1079 (method url-fetch)
1080 (uri (pypi-uri "pysqlite" version))
1081 (sha256
1082 (base32
1083 "0rm0zqyb363y6wljhfmbxs16jjv7p8nk1d8zgq9sdwj6js7y3jkm"))))
1084 (build-system python-build-system)
1085 (inputs
1086 `(("sqlite" ,sqlite)))
1087 (arguments
1088 `(#:python ,python-2 ; incompatible with Python 3
1089 #:tests? #f)) ; no test target
1090 (home-page "http://github.com/ghaering/pysqlite")
1091 (synopsis "SQLite bindings for Python")
1092 (description
1093 "Pysqlite provides SQLite bindings for Python that comply to the
1094 Database API 2.0T.")
1095 (license license:zlib)))
1096
1097
1098 (define-public python2-mechanize
1099 (package
1100 (name "python2-mechanize")
1101 (version "0.2.5")
1102 (source
1103 (origin
1104 (method url-fetch)
1105 (uri (string-append "https://pypi.python.org/packages/source/m/mechanize/mechanize-"
1106 version ".tar.gz"))
1107 (sha256
1108 (base32
1109 "0rj7r166i1dyrq0ihm5rijfmvhs8a04im28lv05c0c3v206v4rrf"))))
1110 (build-system python-build-system)
1111 (arguments
1112 `(#:python ,python-2 ; apparently incompatible with Python 3
1113 #:tests? #f))
1114 ;; test fails with message
1115 ;; AttributeError: 'module' object has no attribute 'test_pullparser'
1116 ;; (python-3.3.2) or
1117 ;; AttributeError: 'module' object has no attribute 'test_urllib2_localnet'
1118 ;; (python-2.7.5).
1119 ;; The source code is from March 2011 and probably not up-to-date
1120 ;; with respect to python unit tests.
1121 (home-page "http://wwwsearch.sourceforge.net/mechanize/")
1122 (synopsis
1123 "Stateful programmatic web browsing in Python")
1124 (description
1125 "Mechanize implements stateful programmatic web browsing in Python,
1126 after Andy Lester’s Perl module WWW::Mechanize.")
1127 (license (license:non-copyleft
1128 "file://COPYING"
1129 "See COPYING in the distribution."))))
1130
1131
1132 (define-public python-simplejson
1133 (package
1134 (name "python-simplejson")
1135 (version "3.8.2")
1136 (source
1137 (origin
1138 (method url-fetch)
1139 (uri (pypi-uri "simplejson" version))
1140 (sha256
1141 (base32
1142 "0zylrnax8b6r0ndgni4w9c599fi6wm9vx5g6k3ddqfj3932kk16m"))))
1143 (build-system python-build-system)
1144 (home-page "http://simplejson.readthedocs.org/en/latest/")
1145 (synopsis
1146 "Json library for Python")
1147 (description
1148 "JSON (JavaScript Object Notation) is a subset of JavaScript
1149 syntax (ECMA-262 3rd edition) used as a lightweight data interchange
1150 format.
1151
1152 Simplejson exposes an API familiar to users of the standard library marshal
1153 and pickle modules. It is the externally maintained version of the json
1154 library contained in Python 2.6, but maintains compatibility with Python 2.5
1155 and (currently) has significant performance advantages, even without using
1156 the optional C extension for speedups. Simplejson is also supported on
1157 Python 3.3+.")
1158 (license license:x11)))
1159
1160 (define-public python2-simplejson
1161 (package-with-python2 python-simplejson))
1162
1163
1164 (define-public python-pyicu
1165 (package
1166 (name "python-pyicu")
1167 (version "1.9.2")
1168 (source
1169 (origin
1170 (method url-fetch)
1171 (uri (string-append "https://pypi.python.org/packages/source/P/PyICU/PyICU-"
1172 version ".tar.gz"))
1173 (sha256
1174 (base32
1175 "1diba0g8md614fvm9yf50paiwdkhj6rd7xwf1rg9mc0pxc0hhn4v"))))
1176 (build-system python-build-system)
1177 (inputs
1178 `(("icu4c" ,icu4c)))
1179 (home-page "http://pyicu.osafoundation.org/")
1180 (synopsis "Python extension wrapping the ICU C++ API")
1181 (description
1182 "PyICU is a python extension wrapping the ICU C++ API.")
1183 (license license:x11)))
1184
1185 (define-public python2-pyicu
1186 (package-with-python2 python-pyicu))
1187
1188 (define-public python2-dogtail
1189 ;; Python 2 only, as it leads to "TabError: inconsistent use of tabs and
1190 ;; spaces in indentation" with Python 3.
1191 (package
1192 (name "python2-dogtail")
1193 (version "0.8.2")
1194 (source (origin
1195 (method url-fetch)
1196 (uri (string-append
1197 "https://fedorahosted.org/released/dogtail/dogtail-"
1198 version ".tar.gz"))
1199 (sha256
1200 (base32
1201 "1yc4cg7ip87z15gyd4wy2vzbywrjc52a3m8r8gqy2b50d65llcg1"))))
1202 (build-system python-build-system)
1203 (arguments `(#:python ,python-2
1204 #:tests? #f)) ; invalid command "test"
1205 (home-page "https://fedorahosted.org/dogtail/")
1206 (synopsis "GUI test tool and automation framework written in ​Python")
1207 (description
1208 "Dogtail is a GUI test tool and automation framework written in Python.
1209 It uses Accessibility (a11y) technologies to communicate with desktop
1210 applications. dogtail scripts are written in Python and executed like any
1211 other Python program.")
1212 (license license:gpl2+)))
1213
1214 (define-public python2-empy
1215 (package
1216 (name "python2-empy")
1217 (version "3.3")
1218 (source (origin
1219 (method url-fetch)
1220 (uri (string-append "http://www.alcyone.com/software/empy/empy-"
1221 version ".tar.gz"))
1222 (sha256
1223 (base32
1224 "01g8mmkfnvjdmlhsihwyx56lrg7r5m5d2fg6mnxsvy6g0dnl69f6"))))
1225 (build-system python-build-system)
1226 (arguments
1227 `(#:python ,python-2
1228 #:phases (alist-replace
1229 'check
1230 (lambda _
1231 (zero? (system* "./test.sh")))
1232 %standard-phases)))
1233 (home-page "http://www.alcyone.com/software/empy/")
1234 (synopsis "Templating system for Python")
1235 (description
1236 "EmPy is a system for embedding Python expressions and statements in
1237 template text; it takes an EmPy source file, processes it, and produces
1238 output. This is accomplished via expansions, which are special signals to the
1239 EmPy system and are set off by a special prefix (by default the at sign, @@).
1240 EmPy can expand arbitrary Python expressions and statements in this way, as
1241 well as a variety of special forms. Textual data not explicitly delimited in
1242 this way is sent unaffected to the output, allowing Python to be used in
1243 effect as a markup language. Also supported are callbacks via hooks,
1244 recording and playback via diversions, and dynamic, chainable filters. The
1245 system is highly configurable via command line options and embedded
1246 commands.")
1247 (license license:lgpl2.1+)))
1248
1249 (define-public python2-element-tree
1250 (package
1251 (name "python2-element-tree")
1252 (version "1.2.6")
1253 (source (origin
1254 (method url-fetch)
1255 (uri (string-append
1256 "http://effbot.org/media/downloads/elementtree-"
1257 version "-20050316.tar.gz"))
1258 (sha256
1259 (base32
1260 "016bphqnlg0l4vslahhw4r0aanw95bpypy65r1i1acyb2wj5z7dj"))))
1261 (build-system python-build-system)
1262 (arguments
1263 `(#:python ,python-2 ; seems to be part of Python 3
1264 #:tests? #f)) ; no 'test' sub-command
1265 (synopsis "Toolkit for XML processing in Python")
1266 (description
1267 "ElementTree is a Python library supporting lightweight XML processing.")
1268 (home-page "http://effbot.org/zone/element-index.htm")
1269 (license (license:x11-style
1270 "http://docs.python.org/2/license.html"
1271 "Like \"CWI LICENSE AGREEMENT FOR PYTHON 0.9.0 THROUGH 1.2\"."))))
1272
1273 (define-public python2-pybugz
1274 (package
1275 (name "python2-pybugz")
1276 (version "0.6.11")
1277 (source (origin
1278 (method url-fetch)
1279 (uri (string-append
1280 "http://bits.liquidx.net/projects/pybugz/pybugz-"
1281 version ".tar.gz"))
1282 (sha256
1283 (base32
1284 "17ni00p08gp5lkxlrrcnvi3x09fmajnlbz4da03qcgl9q21ym4jd"))
1285 (patches (search-patches "pybugz-stty.patch"
1286 "pybugz-encode-error.patch"))))
1287 (build-system python-build-system)
1288 (arguments
1289 `(#:python ,python-2 ; SyntaxError with Python 3
1290 #:tests? #f)) ; no 'test' sub-command
1291 (propagated-inputs
1292 `(("element-tree" ,python2-element-tree)))
1293 (synopsis "Python and command-line interface to Bugzilla")
1294 (description
1295 "PyBugz is a Python library and command-line tool to query the Bugzilla
1296 bug tracking system. It is meant as an aid to speed up interaction with the
1297 bug tracker.")
1298 (home-page "http://www.liquidx.net/pybugz/")
1299 (license license:gpl2)))
1300
1301 (define-public python-enum34
1302 (package
1303 (name "python-enum34")
1304 (version "1.1.0")
1305 (source
1306 (origin
1307 (method url-fetch)
1308 (uri (pypi-uri "enum34" version))
1309 (sha256
1310 (base32
1311 "0yx1m4564wxgbm4glb3457hi16xihd9w63rv13y2przkdir9dfgp"))))
1312 (build-system python-build-system)
1313 (arguments
1314 `(#:phases
1315 (alist-replace
1316 'check
1317 (lambda _ (zero? (system* "python" "enum/test_enum.py")))
1318 %standard-phases)))
1319 (home-page "https://pypi.python.org/pypi/enum34")
1320 (synopsis "Backported Python 3.4 Enum")
1321 (description
1322 "Enum34 is the new Python stdlib enum module available in Python 3.4
1323 backported for previous versions of Python from 2.4 to 3.3.")
1324 (license license:bsd-3)))
1325
1326 (define-public python2-enum34
1327 (package-with-python2 python-enum34))
1328
1329 (define-public python-parse-type
1330 (package
1331 (name "python-parse-type")
1332 (version "0.3.4")
1333 (source
1334 (origin
1335 (method url-fetch)
1336 (uri (string-append "https://pypi.python.org/packages/source/p/"
1337 "parse_type/parse_type-" version ".tar.gz"))
1338 (sha256
1339 (base32
1340 "0iv1c34npr4iynwpgv1vkjx9rjd18a85ir8c01gc5f7wp8iv7l1x"))))
1341 (build-system python-build-system)
1342 (propagated-inputs
1343 `(("python-six" ,python-six)
1344 ("python-parse" ,python-parse)))
1345 (arguments '(#:tests? #f)) ;TODO: tests require pytest
1346 (home-page "https://github.com/jenisys/parse_type")
1347 (synopsis "Extended parse module")
1348 (description
1349 "Parse_type extends the python parse module.")
1350 (license license:bsd-3)))
1351
1352 (define-public python-parse
1353 (package
1354 (name "python-parse")
1355 (version "1.6.6")
1356 (source
1357 (origin
1358 (method url-fetch)
1359 (uri (pypi-uri "parse" version))
1360 (sha256
1361 (base32
1362 "0y31i3mwgv35qn0kzzjn9q8jqfdqmbi6sr6yfvn8rq4lqjm5lhvi"))
1363 (patches (search-patches "python-parse-too-many-fields.patch"))))
1364 (build-system python-build-system)
1365 (arguments
1366 `(#:phases
1367 (modify-phases %standard-phases
1368 (replace 'check
1369 (lambda _ (zero? (system* "python" "test_parse.py")))))))
1370 (home-page "https://github.com/r1chardj0n3s/parse")
1371 (synopsis "Parse strings")
1372 (description
1373 "Parse strings using a specification based on the Python format()
1374 syntax.")
1375 (license license:x11)))
1376
1377
1378 (define-public scons
1379 (package
1380 (name "scons")
1381 (version "2.3.4")
1382 (source (origin
1383 (method url-fetch)
1384 (uri (string-append "mirror://sourceforge/scons/scons/" version
1385 "/scons-" version ".tar.gz"))
1386 (sha256
1387 (base32
1388 "0hdlci43wjz8maryj83mz04ir6rwcdrrzpd7cpzvdlzycqhdfmsb"))))
1389 (build-system python-build-system)
1390 (arguments
1391 ;; With Python 3.x, fails to build with a syntax error.
1392 `(#:python ,python-2
1393 #:use-setuptools? #f ; still relies on distutils
1394 #:tests? #f)) ; no 'python setup.py test' command
1395 (home-page "http://scons.org/")
1396 (synopsis "Software construction tool written in Python")
1397 (description
1398 "SCons is a software construction tool. Think of SCons as an improved,
1399 cross-platform substitute for the classic Make utility with integrated
1400 functionality similar to autoconf/automake and compiler caches such as ccache.
1401 In short, SCons is an easier, more reliable and faster way to build
1402 software.")
1403 (license license:x11)))
1404
1405 (define-public python-extras
1406 (package
1407 (name "python-extras")
1408 (version "0.0.3")
1409 (source
1410 (origin
1411 (method url-fetch)
1412 (uri (string-append
1413 "https://pypi.python.org/packages/source/e/extras/extras-"
1414 version ".tar.gz"))
1415 (sha256
1416 (base32
1417 "1h7zx4dfyclalg0fqnfjijpn0f793a9mx8sy3b27gd31nr6dhq3s"))))
1418 (build-system python-build-system)
1419 (arguments
1420 ;; error in setup.cfg: command 'test' has no such option 'buffer'
1421 '(#:tests? #f))
1422 (home-page "https://github.com/testing-cabal/extras")
1423 (synopsis "Useful extensions to the Python standard library")
1424 (description
1425 "Extras is a set of extensions to the Python standard library.")
1426 (license license:expat)))
1427
1428 (define-public python2-extras
1429 (package-with-python2 python-extras))
1430
1431 (define-public python-mimeparse
1432 (package
1433 (name "python-mimeparse")
1434 (version "0.1.4")
1435 (source
1436 (origin
1437 (method url-fetch)
1438 (uri (string-append
1439 "https://pypi.python.org/packages/source/p/python-mimeparse/python-mimeparse-"
1440 version ".tar.gz"))
1441 (sha256
1442 (base32
1443 "1hyxg09kaj02ri0rmwjqi86wk4nd1akvv7n0dx77azz76wga4s9w"))))
1444 (build-system python-build-system)
1445 (arguments
1446 '(#:tests? #f)) ; no setup.py test command
1447 (home-page
1448 "https://github.com/dbtsai/python-mimeparse")
1449 (synopsis "Python library for parsing MIME types")
1450 (description
1451 "Mimeparse provides basic functions for parsing MIME type names and
1452 matching them against a list of media-ranges.")
1453 (license license:expat)))
1454
1455 (define-public python2-mimeparse
1456 (package-with-python2 python-mimeparse))
1457
1458 (define-public python-nose
1459 (package
1460 (name "python-nose")
1461 (version "1.3.7")
1462 (source
1463 (origin
1464 (method url-fetch)
1465 (uri (pypi-uri "nose" version))
1466 (sha256
1467 (base32
1468 "164a43k7k2wsqqk1s6vavcdamvss4mz0vd6pwzv2h9n8rgwzxgzi"))))
1469 (build-system python-build-system)
1470 (arguments
1471 '(#:tests? #f)) ; FIXME: test suite fails
1472 (home-page "http://readthedocs.org/docs/nose/")
1473 (synopsis "Python testing library")
1474 (description
1475 "Nose extends the unittest library to make testing easier.")
1476 (license license:lgpl2.0+)))
1477
1478 (define-public python2-nose
1479 (package-with-python2 python-nose))
1480
1481 (define-public python-nose2
1482 (package
1483 (name "python-nose2")
1484 (version "0.6.5")
1485 (source
1486 (origin
1487 (method url-fetch)
1488 (uri (pypi-uri "nose2" version))
1489 (sha256
1490 (base32
1491 "1x4zjq1zlyrh8b9ba0cmafd3w94pxhid408kibyjd3s6h1lap6s7"))))
1492 (build-system python-build-system)
1493 (arguments `(#:tests? #f)) ; 'module' object has no attribute 'collector'
1494 (propagated-inputs
1495 `(("python-cov-core" ,python-cov-core)
1496 ("python-pytest-cov" ,python-pytest-cov)
1497 ("python-six" ,python-six)))
1498 (home-page "https://github.com/nose-devs/nose2")
1499 (synopsis "Next generation of nicer testing for Python")
1500 (description
1501 "Nose2 is the next generation of nicer testing for Python, based on the
1502 plugins branch of unittest2. Nose2 aims to improve on nose by providing a
1503 better plugin api, being easier for users to configure, and simplifying internal
1504 interfaces and processes.")
1505 (license license:bsd-2)))
1506
1507 (define-public python2-nose2
1508 (package-with-python2 python-nose2))
1509
1510 (define-public python-unittest2
1511 (package
1512 (name "python-unittest2")
1513 (version "0.5.1")
1514 (source
1515 (origin
1516 (method url-fetch)
1517 (uri (string-append
1518 "https://pypi.python.org/packages/source/u/unittest2py3k/unittest2py3k-"
1519 version ".tar.gz"))
1520 (sha256
1521 (base32
1522 "00yl6lskygcrddx5zspkhr0ibgvpknl4678kkm6s626539grq93q"))))
1523 (build-system python-build-system)
1524 (home-page "http://pypi.python.org/pypi/unittest2")
1525 (synopsis "Python unit testing library")
1526 (description
1527 "Unittest2 is a replacement for the unittest module in the Python
1528 standard library.")
1529 (license license:psfl)))
1530
1531 (define-public python2-unittest2
1532 (package (inherit python-unittest2)
1533 (name "python2-unittest2")
1534 (version "0.5.1")
1535 (source
1536 (origin
1537 (method url-fetch)
1538 (uri (string-append
1539 "https://pypi.python.org/packages/source/u/unittest2/unittest2-"
1540 version ".tar.gz"))
1541 (sha256
1542 (base32
1543 "0wbs4i4x3x7klr3v35ss6p9mcqz883i1xgcpkhvl7n2lyv6yhpda"))))
1544 (arguments
1545 `(#:python ,python-2
1546 #:tests? #f)))) ; no setup.py test command
1547
1548 (define-public python-pafy
1549 (package
1550 (name "python-pafy")
1551 (version "0.5.2")
1552 (source
1553 (origin
1554 (method url-fetch)
1555 (uri (pypi-uri "pafy" version))
1556 (sha256
1557 (base32
1558 "1ckvrypyvb7jbqlgwdz0y337ajagjv7dgxyns326nqwypn1wpq0i"))))
1559 (build-system python-build-system)
1560 (propagated-inputs
1561 ;; Youtube-dl is a python package which is imported in the file
1562 ;; "backend_youtube_dl.py", therefore it needs to be propagated.
1563 `(("youtube-dl" ,youtube-dl)))
1564 (home-page "https://np1.github.io/pafy/")
1565 (synopsis "Retrieve YouTube content and metadata")
1566 (description
1567 "@code{pafy} is a python library to retrieve YouTube content and metadata.")
1568 (license license:lgpl3+)))
1569
1570 (define-public python-py
1571 (package
1572 (name "python-py")
1573 (version "1.4.31")
1574 (source
1575 (origin
1576 (method url-fetch)
1577 (uri (pypi-uri "py" version))
1578 (sha256
1579 (base32
1580 "0561gz2w3i825gyl42mcq14y3dcgkapfiv5zv9a2bz15qxiijl56"))))
1581 (build-system python-build-system)
1582 (home-page "http://pylib.readthedocs.org/")
1583 (synopsis "Python library for parsing, I/O, instrospection, and logging")
1584 (description
1585 "Py is a Python library for file name parsing, .ini file parsing, I/O,
1586 code introspection, and logging.")
1587 (license license:expat)))
1588
1589 (define-public python2-py
1590 (package-with-python2 python-py))
1591
1592 (define-public python-pytest
1593 (package
1594 (name "python-pytest")
1595 (version "2.7.3")
1596 (source
1597 (origin
1598 (method url-fetch)
1599 (uri (string-append
1600 "https://pypi.python.org/packages/source/p/pytest/pytest-"
1601 version ".tar.gz"))
1602 (sha256
1603 (base32
1604 "1z4yi986f9n0p8qmzmn21m21m8j1x78hk3505f89baqm6pdw7afm"))
1605 (modules '((guix build utils)))
1606 (snippet
1607 ;; One of the tests involves the /usr directory, so it fails.
1608 '(substitute* "testing/test_argcomplete.py"
1609 (("def test_remove_dir_prefix\\(self\\):")
1610 "@pytest.mark.xfail\n def test_remove_dir_prefix(self):")))))
1611 (build-system python-build-system)
1612 (propagated-inputs
1613 `(("python-py" ,python-py)))
1614 (native-inputs
1615 `(("python-nose" ,python-nose)
1616 ("python-mock" ,python-mock)))
1617 (home-page "http://pytest.org")
1618 (synopsis "Python testing library")
1619 (description
1620 "Pytest is a testing tool that provides auto-discovery of test modules
1621 and functions, detailed info on failing assert statements, modular fixtures,
1622 and many external plugins.")
1623 (license license:expat)))
1624
1625 (define-public python2-pytest
1626 (package-with-python2 python-pytest))
1627
1628 ;; This package is used by Borg until we can upgrade all our Python packages to
1629 ;; use a more recent pytest.
1630 (define-public python-pytest-2.9.2
1631 (package
1632 (inherit python-pytest)
1633 (name "python-pytest")
1634 (version "2.9.2")
1635 (source (origin
1636 (method url-fetch)
1637 (uri (pypi-uri "pytest" version))
1638 (sha256
1639 (base32
1640 "1n6igbc1b138wx1q5gca4pqw1j6nsyicfxds5n0b5989kaxqmh8j"))))
1641 (arguments
1642 `(#:phases
1643 (modify-phases %standard-phases
1644 (add-before 'check 'disable-invalid-test
1645 (lambda _
1646 (substitute* "testing/test_argcomplete.py"
1647 (("def test_remove_dir_prefix" line)
1648 (string-append "@pytest.mark.skip"
1649 "(reason=\"Assumes that /usr exists.\")\n "
1650 line)))
1651 #t)))))))
1652
1653 (define-public python-pytest-cov
1654 (package
1655 (name "python-pytest-cov")
1656 (version "2.2.1")
1657 (source
1658 (origin
1659 (method url-fetch)
1660 (uri (pypi-uri "pytest-cov" version))
1661 (sha256
1662 (base32
1663 "1yl4nbhzfgsxqlsyk4clafgp9x11zvgrkprm9i2p3fgkwx9jxcm8"))))
1664 (build-system python-build-system)
1665 (arguments
1666 `(#:phases
1667 (modify-phases %standard-phases
1668 (replace 'check
1669 (lambda _
1670 ;; options taken from tox.ini
1671 ;; TODO: make "--restructuredtext" tests pass. They currently fail
1672 ;; with "Duplicate implicit target name"
1673 (zero? (system* "python" "./setup.py" "check"
1674 "--strict" "--metadata")))))))
1675 (propagated-inputs
1676 `(("python-coverage" ,python-coverage)
1677 ("python-pytest" ,python-pytest)))
1678 (home-page "https://github.com/pytest-dev/pytest-cov")
1679 (synopsis "Pytest plugin for measuring coverage")
1680 (description
1681 "Pytest-cov produces coverage reports. It supports centralised testing and
1682 distributed testing in both @code{load} and @code{each} modes. It also
1683 supports coverage of subprocesses.")
1684 (license license:expat)))
1685
1686 (define-public python2-pytest-cov
1687 (package-with-python2 python-pytest-cov))
1688
1689 (define-public python-pytest-runner
1690 (package
1691 (name "python-pytest-runner")
1692 (version "2.6.2")
1693 (source
1694 (origin
1695 (method url-fetch)
1696 (uri (pypi-uri "pytest-runner" version))
1697 (sha256
1698 (base32
1699 "1nwcqx0l3fv52kv8526wy8ypzghbq96c96di318d98d3wh7a8xg7"))))
1700 (build-system python-build-system)
1701 (arguments
1702 `(#:phases
1703 (modify-phases %standard-phases
1704 ;; The fancy way of setting the version with setuptools_scm does not
1705 ;; seem to work here.
1706 (add-after 'unpack 'set-version
1707 (lambda _
1708 (substitute* "docs/conf.py"
1709 (("version = setuptools_scm\\.get_version\\(root='\\.\\.')")
1710 (string-append "version = \"" ,version "\"")))
1711 #t)))))
1712 (native-inputs
1713 `(("python-pytest" ,python-pytest)
1714 ("python-setuptools-scm" ,python-setuptools-scm)))
1715 (home-page "https://github.com/pytest-dev/pytest-runner")
1716 (synopsis "Invoke py.test as a distutils command")
1717 (description
1718 "This package provides a @command{pytest-runner} command that
1719 @file{setup.py} files can use to run tests.")
1720 (license license:expat)))
1721
1722 (define-public python2-pytest-runner
1723 (package-with-python2 python-pytest-runner))
1724
1725 (define-public python-pytest-mock
1726 (package
1727 (name "python-pytest-mock")
1728 (version "1.2")
1729 (source
1730 (origin
1731 (method url-fetch)
1732 (uri (pypi-uri "pytest-mock" version ".zip"))
1733 (sha256
1734 (base32
1735 "03zxar5drzm7ksqyrwypjaza3cri6wqvpr6iam92djvg6znp32gp"))))
1736 (build-system python-build-system)
1737 (native-inputs
1738 `(("unzip" ,unzip)))
1739 (propagated-inputs
1740 `(("python-py" ,python-py)
1741 ("python-pytest" ,python-pytest)))
1742 (home-page "https://github.com/pytest-dev/pytest-mock/")
1743 (synopsis "Thin-wrapper around the mock package for easier use with py.test")
1744 (description
1745 "This plugin installs a @code{mocker} fixture which is a thin-wrapper
1746 around the patching API provided by the @code{mock} package, but with the
1747 benefit of not having to worry about undoing patches at the end of a test.
1748 The mocker fixture has the same API as @code{mock.patch}, supporting the
1749 same arguments.")
1750 (properties `((python2-variant . ,(delay python2-pytest-mock))))
1751 (license license:expat)))
1752
1753 (define-public python2-pytest-mock
1754 (let ((base (package-with-python2
1755 (strip-python2-variant python-pytest-mock))))
1756 (package (inherit base)
1757 (propagated-inputs
1758 `(("python2-mock" ,python2-mock)
1759 ,@(package-propagated-inputs base))))))
1760
1761 (define-public python-pytest-xdist
1762 (package
1763 (name "python-pytest-xdist")
1764 (version "1.14")
1765 (source
1766 (origin
1767 (method url-fetch)
1768 (uri (pypi-uri "pytest-xdist" version ".zip"))
1769 (sha256
1770 (base32
1771 "08rn2l39ds60xshs4js787l84pfckksqklfq2wq9x8ig2aci2pja"))
1772 (modules '((guix build utils)))
1773 (snippet
1774 '(begin
1775 ;; Remove pre-compiled .pyc files from source.
1776 (for-each delete-file-recursively
1777 (find-files "." "__pycache__" #:directories? #t))
1778 (for-each delete-file (find-files "." "\\.pyc$"))
1779 #t))))
1780 (build-system python-build-system)
1781 (native-inputs
1782 `(("unzip" ,unzip)
1783 ("python-setuptools-scm" ,python-setuptools-scm)))
1784 (propagated-inputs
1785 `(("python-apipkg" ,python-apipkg)
1786 ("python-execnet" ,python-execnet)
1787 ("python-pytest" ,python-pytest)
1788 ("python-py" ,python-py)))
1789 (home-page
1790 "https://github.com/pytest-dev/pytest-xdist")
1791 (synopsis
1792 "Plugin for py.test with distributed testing and loop-on-failing modes")
1793 (description
1794 "The pytest-xdist plugin extends py.test with some unique test execution
1795 modes: parallelization, running tests in boxed subprocesses, the ability
1796 to run tests repeatedly when failed, and the ability to run tests on multiple
1797 Python interpreters or platforms. It uses rsync to copy the existing
1798 program code to a remote location, executes there, and then syncs the
1799 result back.")
1800 (license license:expat)))
1801
1802 (define-public python2-pytest-xdist
1803 (package-with-python2 python-pytest-xdist))
1804
1805 (define-public python-scripttest
1806 (package
1807 (name "python-scripttest")
1808 (version "1.3")
1809 (source
1810 (origin
1811 (method url-fetch)
1812 (uri (string-append
1813 "https://pypi.python.org/packages/source/s/scripttest/scripttest-"
1814 version ".tar.gz"))
1815 (sha256
1816 (base32
1817 "0f4w84k8ck82syys7yg9maz93mqzc8p5ymis941x034v44jzq74m"))))
1818 (build-system python-build-system)
1819 (propagated-inputs
1820 `(("python-pytest" ,python-pytest)))
1821 (home-page "http://pythonpaste.org/scripttest/")
1822 (synopsis "Python library to test command-line scripts")
1823 (description "Scripttest is a Python helper library for testing
1824 interactive command-line applications. With it you can run a script in a
1825 subprocess and see the output as well as any file modifications.")
1826 (license license:expat)))
1827
1828 (define-public python2-scripttest
1829 (package-with-python2 python-scripttest))
1830
1831 (define-public python-testtools
1832 (package
1833 (name "python-testtools")
1834 (version "1.0.0")
1835 (source
1836 (origin
1837 (method url-fetch)
1838 (uri (string-append
1839 "https://pypi.python.org/packages/source/t/testtools/testtools-"
1840 version ".tar.gz"))
1841 (sha256
1842 (base32
1843 "1dyml28ykpl5jb9khdmcdvhy1cxqingys6qvj2k04fzlaj6z3bbx"))))
1844 (build-system python-build-system)
1845 (propagated-inputs
1846 `(("python-mimeparse" ,python-mimeparse)
1847 ("python-extras" ,python-extras)))
1848 (home-page "https://github.com/testing-cabal/testtools")
1849 (synopsis
1850 "Extensions to the Python standard library unit testing framework")
1851 (description
1852 "Testtools extends the Python standard library unit testing framework to
1853 provide matchers, more debugging information, and cross-Python
1854 compatibility.")
1855 (license license:psfl)))
1856
1857 (define-public python2-testtools
1858 (package-with-python2 python-testtools))
1859
1860 (define-public python-testscenarios
1861 (package
1862 (name "python-testscenarios")
1863 (version "0.4")
1864 (source
1865 (origin
1866 (method url-fetch)
1867 (uri (string-append
1868 "https://pypi.python.org/packages/source/t/testscenarios/testscenarios-"
1869 version ".tar.gz"))
1870 (sha256
1871 (base32
1872 "1671jvrvqlmbnc42j7pc5y6vc37q44aiwrq0zic652pxyy2fxvjg"))))
1873 (build-system python-build-system)
1874 (propagated-inputs
1875 `(("python-testtools" ,python-testtools)
1876 ("python-mimeparse" ,python-mimeparse)))
1877 (home-page "https://launchpad.net/testscenarios")
1878 (synopsis "Pyunit extension for dependency injection")
1879 (description
1880 "Testscenarios provides clean dependency injection for Python unittest
1881 style tests.")
1882 (license (list license:bsd-3 license:asl2.0)))) ; at the user's option
1883
1884 (define-public python2-testscenarios
1885 (package-with-python2 python-testscenarios))
1886
1887 (define-public python-testresources
1888 (package
1889 (name "python-testresources")
1890 (version "0.2.7")
1891 (source
1892 (origin
1893 (method url-fetch)
1894 (uri (string-append
1895 "https://pypi.python.org/packages/source/t/testresources/testresources-"
1896 version ".tar.gz"))
1897 (sha256
1898 (base32
1899 "0cbj3plbllyz42c4b5xxgwaa7mml54lakslrn4kkhinxhdri22md"))))
1900 (build-system python-build-system)
1901 (home-page "https://launchpad.net/testresources")
1902 (synopsis
1903 "Pyunit extension for managing test resources")
1904 (description
1905 "Testresources is an extension to Python's unittest to allow declarative
1906 use of resources by test cases.")
1907 (license (list license:bsd-3 license:asl2.0)))) ; at the user's option
1908
1909 (define-public python2-testresources
1910 (package-with-python2 python-testresources))
1911
1912 (define-public python-subunit
1913 (package
1914 (name "python-subunit")
1915 (version "0.0.21")
1916 (source
1917 (origin
1918 (method url-fetch)
1919 (uri (string-append
1920 "https://pypi.python.org/packages/source/p/python-subunit/python-subunit-"
1921 version ".tar.gz"))
1922 (sha256
1923 (base32
1924 "1nkw9wfbvizmpajbj3in8ns07g7lwkiv8hip14jjlwk3cacls6jv"))))
1925 (build-system python-build-system)
1926 (propagated-inputs
1927 `(("python-testtools" ,python-testtools)
1928 ("python-mimeparse" ,python-mimeparse)
1929 ("python-testscenarios" ,python-testscenarios)))
1930 (home-page "http://launchpad.net/subunit")
1931 (synopsis "Python implementation of the subunit protocol")
1932 (description
1933 "Python-subunit is a Python implementation of the subunit test streaming
1934 protocol.")
1935 (license (list license:bsd-3 license:asl2.0)))) ; at the user's option
1936
1937 (define-public python2-subunit
1938 (package-with-python2 python-subunit))
1939
1940 ;; Recent versions of python-fixtures need a recent version of python-pbr,
1941 ;; which needs a recent version of python-fixtures. To fix this circular
1942 ;; dependency, we keep old versions of python-fixtures and python-pbr to
1943 ;; bootstrap the whole thing:
1944 ;; - python-fixtures-0.3.16 is used to build python-pbr-0.11
1945 ;; - python-pbr-0.11 is used to build python-fixtures
1946 ;; - python-fixtures is used to build python-pbr
1947 (define-public python-fixtures-0.3.16
1948 (package
1949 (name "python-fixtures")
1950 (version "0.3.16")
1951 (source
1952 (origin
1953 (method url-fetch)
1954 (uri (string-append
1955 "https://pypi.python.org/packages/source/f/fixtures/fixtures-"
1956 version ".tar.gz"))
1957 (sha256
1958 (base32
1959 "0x9r2gwilcig5g54k60bxzg96zabizq1855lrprlb4zckalp9asc"))))
1960 (build-system python-build-system)
1961 (arguments
1962 '(#:tests? #f)) ; no setup.py test command
1963 (home-page "https://launchpad.net/python-fixtures")
1964 (synopsis "Python test fixture library")
1965 (description
1966 "Fixtures provides a way to create reusable state, useful when writing
1967 Python tests.")
1968 (license (list license:bsd-3 license:asl2.0)))) ; at user's option
1969
1970 (define-public python2-fixtures-0.3.16
1971 (package-with-python2 python-fixtures-0.3.16))
1972
1973 (define-public python-pbr-0.11
1974 (package
1975 (name "python-pbr")
1976 (version "0.11.0")
1977 (source
1978 (origin
1979 (method url-fetch)
1980 (uri (string-append
1981 "https://pypi.python.org/packages/source/p/pbr/pbr-"
1982 version ".tar.gz"))
1983 (sha256
1984 (base32
1985 "0v9gb7gyqf7q9s99l0nnjj9ww9b0jvyqlwm4d56pcyinxydddw6p"))))
1986 (build-system python-build-system)
1987 (arguments
1988 `(#:tests? #f)) ;; Most tests seem to use the Internet.
1989 (propagated-inputs
1990 `(("python-fixtures-0.3.16" ,python-fixtures-0.3.16)))
1991 (home-page "https://launchpad.net/pbr")
1992 (synopsis "Change the default behavior of Python’s setuptools")
1993 (description
1994 "Python Build Reasonableness (PBR) is a library that injects some useful
1995 and sensible default behaviors into your setuptools run.")
1996 (license license:asl2.0)))
1997
1998 (define-public python2-pbr-0.11
1999 (package-with-python2 python-pbr-0.11))
2000
2001 (define-public python-pbr
2002 (package
2003 (name "python-pbr")
2004 (version "1.8.1")
2005 (source
2006 (origin
2007 (method url-fetch)
2008 (uri (string-append
2009 "https://pypi.python.org/packages/source/p/pbr/pbr-"
2010 version
2011 ".tar.gz"))
2012 (sha256
2013 (base32
2014 "0jcny36cf3s8ar5r4a575npz080hndnrfs4np1fqhv0ym4k7c4p2"))))
2015 (build-system python-build-system)
2016 (arguments
2017 `(#:tests? #f)) ;; Most tests seem to use the Internet.
2018 (propagated-inputs
2019 `(("python-testrepository" ,python-testrepository)
2020 ("git" ,git))) ;; pbr actually uses the "git" binary.
2021 (inputs
2022 `(("python-fixtures" ,python-fixtures)
2023 ("python-mimeparse" ,python-mimeparse)
2024 ("python-mock" ,python-mock)
2025 ("python-six" ,python-six)
2026 ("python-sphinx" ,python-sphinx)
2027 ("python-testrepository" ,python-testrepository)
2028 ("python-testresources" ,python-testresources)
2029 ("python-testscenarios" ,python-testscenarios)
2030 ("python-testtools" ,python-testtools)
2031 ("python-virtualenv" ,python-virtualenv)))
2032 (home-page "https://launchpad.net/pbr")
2033 (synopsis "Change the default behavior of Python’s setuptools")
2034 (description
2035 "Python Build Reasonableness (PBR) is a library that injects some useful
2036 and sensible default behaviors into your setuptools run.")
2037 (license license:asl2.0)))
2038
2039 (define-public python2-pbr
2040 (package-with-python2 python-pbr))
2041
2042 (define-public python-fixtures
2043 (package
2044 (name "python-fixtures")
2045 (version "1.4.0")
2046 (source
2047 (origin
2048 (method url-fetch)
2049 (uri (pypi-uri "fixtures" version))
2050 (sha256
2051 (base32
2052 "0djxvdwm8s60dbfn7bhf40x6g818p3b3mlwijm1c3bqg7msn271y"))))
2053 (build-system python-build-system)
2054 (propagated-inputs
2055 `(("python-six" ,python-six)
2056 ("python-pbr-0.11" ,python-pbr-0.11)))
2057 (native-inputs
2058 `(;; Tests
2059 ("python-testtools" ,python-testtools)))
2060 (arguments
2061 '(#:tests? #f)) ; no setup.py test command
2062 (home-page "https://launchpad.net/python-fixtures")
2063 (synopsis "Python test fixture library")
2064 (description
2065 "Fixtures provides a way to create reusable state, useful when writing
2066 Python tests.")
2067 (license (list license:bsd-3 license:asl2.0)))) ; at user's option
2068
2069 (define-public python2-fixtures
2070 (package-with-python2 python-fixtures))
2071
2072 (define-public python-testrepository
2073 (package
2074 (name "python-testrepository")
2075 (version "0.0.20")
2076 (source
2077 (origin
2078 (method url-fetch)
2079 (uri (string-append
2080 "https://pypi.python.org/packages/source/t/testrepository/testrepository-"
2081 version ".tar.gz"))
2082 (sha256
2083 (base32
2084 "1ssqb07c277010i6gzzkbdd46gd9mrj0bi0i8vn560n2k2y4j93m"))))
2085 (build-system python-build-system)
2086 (propagated-inputs
2087 `(("python-fixtures-0.3.16" ,python-fixtures-0.3.16)
2088 ("python-testtools" ,python-testtools)))
2089 (native-inputs
2090 `(("python-subunit" ,python-subunit)
2091 ("python-mimeparse" ,python-mimeparse)))
2092 (home-page "https://launchpad.net/testrepository")
2093 (synopsis "Database for Python test results")
2094 (description "Testrepository provides a database of test results which can
2095 be used as part of a developer's workflow to check things such as what tests
2096 have failed since the last commit or what tests are currently failing.")
2097 (license (list license:bsd-3 license:asl2.0)))) ; at user's option
2098
2099 (define-public python2-testrepository
2100 (package-with-python2 python-testrepository))
2101
2102 (define-public python-coverage
2103 (package
2104 (name "python-coverage")
2105 (version "4.1")
2106 (source
2107 (origin
2108 (method url-fetch)
2109 (uri (pypi-uri "coverage" version))
2110 (sha256
2111 (base32
2112 "01rbr4br4lsk0lwn8fb96zwd2xr4f0mg1w7iq3j11i8f5ig2nqs1"))))
2113 (build-system python-build-system)
2114 (home-page "http://nedbatchelder.com/code/coverage")
2115 (synopsis "Code coverage measurement for Python")
2116 (description
2117 "Coverage measures code coverage, typically during test execution. It
2118 uses the code analysis tools and tracing hooks provided in the Python standard
2119 library to determine which lines are executable, and which have been
2120 executed.")
2121 (license license:bsd-3)))
2122
2123 (define-public python2-coverage
2124 (package-with-python2 python-coverage))
2125
2126 (define-public python-cov-core
2127 (package
2128 (name "python-cov-core")
2129 (version "1.15.0")
2130 (source
2131 (origin
2132 (method url-fetch)
2133 (uri (pypi-uri "cov-core" version))
2134 (sha256
2135 (base32
2136 "0k3np9ymh06yv1ib96sb6wfsxjkqhmik8qfsn119vnhga9ywc52a"))))
2137 (build-system python-build-system)
2138 (native-inputs
2139 `(("python-coverage" ,python-coverage)))
2140 (home-page "https://github.com/schlamar/cov-core")
2141 (synopsis "plugin core for use by pytest-cov, nose-cov and nose2-cov")
2142 (description
2143 "This is a library package for use by pytest-cov, nose-cov and nose2-cov.
2144 It is useful for developing coverage plugins for these testing frameworks.")
2145 (license license:expat)))
2146
2147 (define-public python2-cov-core
2148 (package-with-python2 python-cov-core))
2149
2150 (define-public python-discover
2151 (package
2152 (name "python-discover")
2153 (version "0.4.0")
2154 (source
2155 (origin
2156 (method url-fetch)
2157 (uri (string-append
2158 "https://pypi.python.org/packages/source/d/discover/discover-"
2159 version ".tar.gz"))
2160 (sha256
2161 (base32
2162 "0y8d0zwiqar51kxj8lzmkvwc3b8kazb04gk5zcb4nzg5k68zmhq5"))))
2163 (build-system python-build-system)
2164 (home-page "http://pypi.python.org/pypi/discover/")
2165 (synopsis
2166 "Python test discovery for unittest")
2167 (description
2168 "Discover provides test discovery for unittest, a feature that has been
2169 backported from Python 2.7 for Python 2.4+.")
2170 (license license:bsd-3)))
2171
2172 (define-public python2-discover
2173 (package-with-python2 python-discover))
2174
2175 (define-public behave
2176 (package
2177 (name "behave")
2178 (version "1.2.5")
2179 (source (origin
2180 (method url-fetch)
2181 (uri (pypi-uri "behave" version ".tar.bz2"))
2182 (sha256
2183 (base32
2184 "1iypp6z46r19n4xmgx6m1lwmlpfjh8vapq8izigrqlaarvp2y64c"))))
2185 (build-system python-build-system)
2186 (propagated-inputs
2187 `(("python-six" ,python-six)
2188 ("python-parse" ,python-parse)
2189 ("python-parse-type" ,python-parse-type)))
2190 (arguments `(#:tests? #f)) ;TODO: tests require nose>=1.3 and
2191 ;PyHamcrest>=1.8
2192 (home-page "http://github.com/behave/behave")
2193 (synopsis "Python behavior-driven development")
2194 (description
2195 "Behave is a tool for behavior-driven development in python.
2196 Behavior-driven development (or BDD) is an agile software development
2197 technique that encourages collaboration between developers, QA and
2198 non-technical or business participants in a software project. Behave uses
2199 tests written in a natural language style, backed up by Python code.")
2200 (license license:x11)))
2201
2202 (define-public python-exif-read
2203 (package
2204 (name "python-exif-read")
2205 (version "2.1.2")
2206 (source (origin
2207 (method url-fetch)
2208 (uri (pypi-uri "ExifRead" version))
2209 (sha256
2210 (base32
2211 "1b90jf6m9vxh9nanhpyvqdq7hmfx5iggw1l8kq10jrs6xgr49qkr"))))
2212 (build-system python-build-system)
2213 (arguments `(#:tests? #f)) ; no tests
2214 (home-page "https://github.com/ianare/exif-py")
2215 (synopsis "Python library to extract EXIF data from image files")
2216 (description
2217 "ExifRead is a Python library to extract EXIF data from tiff and jpeg
2218 files.")
2219 (license license:bsd-3)))
2220
2221 (define-public python2-exif-read
2222 (package-with-python2 python-exif-read))
2223
2224 (define-public python-pyld
2225 (package
2226 (name "python-pyld")
2227 (version "0.6.8")
2228 (source (origin
2229 (method url-fetch)
2230 (uri (pypi-uri "PyLD" version))
2231 (sha256
2232 (base32
2233 "0k881ffazpf8q1z8862g4bb3pzwpnz9whrci2mf311mvn1qbyqad"))))
2234 (build-system python-build-system)
2235 (arguments `(#:tests? #f)) ; no tests
2236 (home-page "http://github.com/digitalbazaar/pyld")
2237 (synopsis "Python implementation of the JSON-LD specification")
2238 (description
2239 "PyLD is an implementation of the JSON-LD specification.")
2240 (license license:bsd-3)))
2241
2242 (define-public python2-pyld
2243 (package-with-python2 python-pyld))
2244
2245 (define-public python-certifi
2246 (package
2247 (name "python-certifi")
2248 (version "2016.8.31")
2249 (source (origin
2250 (method url-fetch)
2251 (uri (pypi-uri "certifi" version))
2252 (sha256
2253 (base32
2254 "06c9dcyv8ss050gkv5xjivbxhm6qm0s9vzy4r33wqabgv118lw7p"))))
2255 (build-system python-build-system)
2256 (arguments `(#:tests? #f)) ; no tests
2257 (home-page "http://python-requests.org/")
2258 (synopsis "Python CA certificate bundle")
2259 (description
2260 "Certifi is a Python library that contains a CA certificate bundle, which
2261 is used by the Requests library to verify HTTPS requests.")
2262 (license license:asl2.0)))
2263
2264 (define-public python2-certifi
2265 (package-with-python2 python-certifi))
2266
2267 (define-public python-click
2268 (package
2269 (name "python-click")
2270 (version "6.6")
2271 (source
2272 (origin
2273 (method url-fetch)
2274 (uri (pypi-uri "click" version))
2275 (sha256
2276 (base32
2277 "1sggipyz52crrybwbr9xvwxd4aqigvplf53k9w3ygxmzivd1jsnc"))))
2278 (build-system python-build-system)
2279 (arguments
2280 `(#:phases
2281 (modify-phases %standard-phases
2282 (add-after 'unpack 'fix-paths
2283 (lambda* (#:key inputs #:allow-other-keys)
2284 (let ((glibc (assoc-ref inputs ,(if (%current-target-system)
2285 "cross-libc" "libc"))))
2286 (substitute* "click/_unicodefun.py"
2287 (("'locale'")
2288 (string-append "'" glibc "/bin/locale'"))))
2289 #t)))))
2290 (home-page "http://click.pocoo.org")
2291 (synopsis "Command line library for Python")
2292 (description
2293 "Click is a Python package for creating command line interfaces in a
2294 composable way with as little code as necessary. Its name stands for
2295 \"Command Line Interface Creation Kit\". It's highly configurable but comes
2296 with sensible defaults out of the box.")
2297 (license license:bsd-3)))
2298
2299 (define-public python2-click
2300 (package-with-python2 python-click))
2301
2302 (define-public python-wheel
2303 (package
2304 (name "python-wheel")
2305 (version "0.29.0")
2306 (source
2307 (origin
2308 (method url-fetch)
2309 (uri (pypi-uri "wheel" version))
2310 (sha256
2311 (base32
2312 "0j0n38hg1jvrmyy68f9ikvzq1gs9g0sx4ws7maf8wi3bwbbqmfqy"))))
2313 (build-system python-build-system)
2314 (native-inputs
2315 `(("python-jsonschema" ,python-jsonschema)
2316 ("python-pytest-cov" ,python-pytest-cov)))
2317 (home-page "https://bitbucket.org/pypa/wheel/")
2318 (synopsis "Format for built Python packages")
2319 (description
2320 "A wheel is a ZIP-format archive with a specially formatted filename and
2321 the @code{.whl} extension. It is designed to contain all the files for a PEP
2322 376 compatible install in a way that is very close to the on-disk format. Many
2323 packages will be properly installed with only the @code{Unpack} step and the
2324 unpacked archive preserves enough information to @code{Spread} (copy data and
2325 scripts to their final locations) at any later time. Wheel files can be
2326 installed with a newer @code{pip} or with wheel's own command line utility.")
2327 (license license:expat)
2328 (properties `((python2-variant . ,(delay python2-wheel))))))
2329
2330 (define-public python2-wheel
2331 (let ((wheel (package-with-python2
2332 (strip-python2-variant python-wheel))))
2333 (package (inherit wheel)
2334 (native-inputs `(("python2-functools32" ,python2-functools32)
2335 ,@(package-native-inputs wheel))))))
2336
2337
2338 (define-public python-requests
2339 (package
2340 (name "python-requests")
2341 (version "2.9.1")
2342 (source (origin
2343 (method url-fetch)
2344 (uri (pypi-uri "requests" version))
2345 (sha256
2346 (base32
2347 "0zsqrzlybf25xscgi7ja4s48y2abf9wvjkn47wh984qgs1fq2xy5"))))
2348 (build-system python-build-system)
2349 (native-inputs
2350 `(("python-py" ,python-py)
2351 ("python-pytest" ,python-pytest)
2352 ("python-pytest-cov" ,python-pytest-cov)
2353 ("python-wheel" ,python-wheel)))
2354 (home-page "http://python-requests.org/")
2355 (synopsis "Python HTTP library")
2356 (description
2357 "Requests is a Python HTTP client library. It aims to be easier to use
2358 than Python’s urllib2 library.")
2359 (license license:asl2.0)))
2360
2361 ;; Some software requires an older version of Requests, notably Docker
2362 ;; Compose.
2363 (define-public python-requests-2.7
2364 (package (inherit python-requests)
2365 (version "2.7.0")
2366 (source (origin
2367 (method url-fetch)
2368 (uri (pypi-uri "requests" version))
2369 (sha256
2370 (base32
2371 "0gdr9dxm24amxpbyqpbh3lbwxc2i42hnqv50sigx568qssv3v2ir"))))))
2372
2373 (define-public python2-requests
2374 (package-with-python2 python-requests))
2375
2376 (define-public python-vcversioner
2377 (package
2378 (name "python-vcversioner")
2379 (version "2.16.0.0")
2380 (source
2381 (origin
2382 (method url-fetch)
2383 (uri (pypi-uri "vcversioner" version))
2384 (sha256
2385 (base32
2386 "16z10sm78jd7ca3jbkgc3q5i8a8q7y1h21q1li21yy3rlhbhrrns"))))
2387 (build-system python-build-system)
2388 (synopsis "Python library for version number discovery")
2389 (description "Vcversioner is a Python library that inspects tagging
2390 information in a variety of version control systems in order to discover
2391 version numbers.")
2392 (home-page "https://github.com/habnabit/vcversioner")
2393 (license license:isc)))
2394
2395 (define-public python2-vcversioner
2396 (package-with-python2 python-vcversioner))
2397
2398 (define-public python-jsonschema
2399 (package
2400 (name "python-jsonschema")
2401 (version "2.5.1")
2402 (source (origin
2403 (method url-fetch)
2404 (uri
2405 (string-append
2406 "https://pypi.python.org/packages/source/j/jsonschema/jsonschema-"
2407 version ".tar.gz"))
2408 (sha256
2409 (base32
2410 "0hddbqjm4jq63y8jf44nswina1crjs16l9snb6m3vvgyg31klrrn"))))
2411 (build-system python-build-system)
2412 (arguments
2413 '(#:phases
2414 (modify-phases %standard-phases
2415 (replace 'check (lambda _ (zero? (system* "nosetests")))))))
2416 (native-inputs
2417 `(("python-nose" ,python-nose)
2418 ("python-vcversioner" ,python-vcversioner)))
2419 (home-page "https://github.com/Julian/jsonschema")
2420 (synopsis "Implementation of JSON Schema for Python")
2421 (description
2422 "Jsonschema is an implementation of JSON Schema for Python.")
2423 (license license:expat)
2424 (properties `((python2-variant . ,(delay python2-jsonschema))))))
2425
2426 (define-public python2-jsonschema
2427 (let ((jsonschema (package-with-python2
2428 (strip-python2-variant python-jsonschema))))
2429 (package (inherit jsonschema)
2430 (native-inputs
2431 `(("python2-mock" ,python2-mock)
2432 ,@(package-native-inputs jsonschema)))
2433 (propagated-inputs
2434 `(("python2-functools32" ,python2-functools32))))))
2435
2436 (define-public python-unidecode
2437 (package
2438 (name "python-unidecode")
2439 (version "0.04.18")
2440 (source (origin
2441 (method url-fetch)
2442 (uri (pypi-uri "Unidecode" version))
2443 (sha256
2444 (base32
2445 "12hhblqy1ajvidm38im4171x4arg83pfmziyn53nizp29p3m14gi"))))
2446 (build-system python-build-system)
2447 (home-page "https://pypi.python.org/pypi/Unidecode")
2448 (synopsis "ASCII transliterations of Unicode text")
2449 (description
2450 "Unidecode provides ASCII transliterations of Unicode text. Unidecode is
2451 useful when integrating with legacy code that doesn't support Unicode, or for
2452 ease of entry of non-Roman names on a US keyboard, or when constructing ASCII
2453 machine identifiers from human-readable Unicode strings that should still be
2454 somewhat intelligeble.")
2455 (license license:gpl2+)))
2456
2457 (define-public python2-unidecode
2458 (package-with-python2 python-unidecode))
2459
2460 (define-public python-pyjwt
2461 (package
2462 (name "python-pyjwt")
2463 (version "1.4.0")
2464 (source
2465 (origin
2466 (method url-fetch)
2467 (uri (pypi-uri "PyJWT" version))
2468 (sha256
2469 (base32
2470 "1556v2jppd8mjkkj66pxb5rcazm35jq81r233mdl8hfmz9n3icp1"))))
2471 (build-system python-build-system)
2472 (native-inputs
2473 `(("python-pytest-runner" ,python-pytest-runner)))
2474 (arguments
2475 '(#:tests? #f)) ; test suite doesn't work
2476 (home-page "http://github.com/progrium/pyjwt")
2477 (synopsis "JSON Web Token implementation in Python")
2478 (description
2479 "PyJWT is a JSON Web Token implementation written in Python.")
2480 (license license:expat)))
2481
2482 (define-public python2-pyjwt
2483 (package-with-python2 python-pyjwt))
2484
2485 (define-public python-oauthlib
2486 (package
2487 (name "python-oauthlib")
2488 (version "1.0.3")
2489 (source (origin
2490 (method url-fetch)
2491 (uri (pypi-uri "oauthlib" version))
2492 (sha256
2493 (base32
2494 "1bfrj70vdjxjw74khbyh6f0dksv7p5rh2346jnlrffyacd3gwjzg"))))
2495 (build-system python-build-system)
2496 (native-inputs
2497 `(("python-coverage" ,python-coverage)
2498 ("python-nose" ,python-nose)
2499 ("python-mock" ,python-mock)))
2500 (propagated-inputs
2501 `(("python-blinker" ,python-blinker)
2502 ("python-cryptography" ,python-cryptography)
2503 ("python-pyjwt" ,python-pyjwt)))
2504 (home-page "https://github.com/idan/oauthlib")
2505 (synopsis "OAuth implementation for Python")
2506 (description
2507 "Oauthlib is a generic, spec-compliant, thorough implementation of the
2508 OAuth request-signing logic.")
2509 (license license:bsd-3)
2510 (properties `((python2-variant . ,(delay python2-oauthlib))))))
2511
2512 (define-public python2-oauthlib
2513 (let ((base (package-with-python2 (strip-python2-variant python-oauthlib))))
2514 (package
2515 (inherit base)
2516 (native-inputs `(("python2-unittest2" ,python2-unittest2)
2517 ,@(package-native-inputs base))))))
2518
2519 (define-public python-itsdangerous
2520 (package
2521 (name "python-itsdangerous")
2522 (version "0.24")
2523 (source
2524 (origin
2525 (method url-fetch)
2526 (uri (string-append
2527 "https://pypi.python.org/packages/source/i/itsdangerous/itsdangerous-"
2528 version ".tar.gz"))
2529 (sha256
2530 (base32
2531 "06856q6x675ly542ig0plbqcyab6ksfzijlyf1hzhgg3sgwgrcyb"))))
2532 (build-system python-build-system)
2533 (home-page "http://github.com/mitsuhiko/itsdangerous")
2534 (synopsis "Python library for passing data to/from untrusted environments")
2535 (description
2536 "Itsdangerous provides various helpers to pass trusted data to untrusted
2537 environments and back.")
2538 (license license:bsd-3)))
2539
2540 (define-public python2-itsdangerous
2541 (package-with-python2 python-itsdangerous))
2542
2543 (define-public python-pyyaml
2544 (package
2545 (name "python-pyyaml")
2546 (version "3.11")
2547 (source
2548 (origin
2549 (method url-fetch)
2550 (uri (string-append
2551 "https://pypi.python.org/packages/source/P/PyYAML/PyYAML-"
2552 version ".tar.gz"))
2553 (sha256
2554 (base32
2555 "1s26125vfnskng58ym37xhwv8v0mm95b2cwbjfag8prfhy596v63"))))
2556 (build-system python-build-system)
2557 (inputs
2558 `(("libyaml" ,libyaml)))
2559 (home-page "http://pyyaml.org/wiki/PyYAML")
2560 (synopsis "YAML parser and emitter for Python")
2561 (description
2562 "PyYAML is a YAML parser and emitter for Python. PyYAML features a
2563 complete YAML 1.1 parser, Unicode support, pickle support, capable extension
2564 API, and sensible error messages. PyYAML supports standard YAML tags and
2565 provides Python-specific tags that allow to represent an arbitrary Python
2566 object.")
2567 (license license:expat)))
2568
2569 (define-public python2-pyyaml
2570 (package-with-python2 python-pyyaml))
2571
2572 (define-public python-virtualenv
2573 (package
2574 (name "python-virtualenv")
2575 (version "15.0.3")
2576 (source
2577 (origin
2578 (method url-fetch)
2579 (uri (pypi-uri "virtualenv" version))
2580 (sha256
2581 (base32
2582 "07cbajzk8l05k5zhlw0b9wbf2is65bl9v6zrn2a0iyn57w6pd73d"))))
2583 (build-system python-build-system)
2584 (arguments
2585 `(#:phases
2586 (modify-phases %standard-phases
2587 (replace 'check
2588 (lambda _
2589 ;; Disable failing test. See upstream bug report
2590 ;; https://github.com/pypa/virtualenv/issues/957
2591 (substitute* "tests/test_virtualenv.py"
2592 (("skipif.*") "skipif(True, reason=\"Guix\")\n"))
2593 (zero? (system* "py.test")))))))
2594 (native-inputs
2595 `(("python-mock" ,python-mock)
2596 ("python-pytest" ,python-pytest)))
2597 (home-page "https://virtualenv.pypa.io/")
2598 (synopsis "Virtual Python environment builder")
2599 (description
2600 "Virtualenv is a tool to create isolated Python environments.")
2601 (license license:expat)))
2602
2603 (define-public python2-virtualenv
2604 (package-with-python2 python-virtualenv))
2605
2606 (define-public python-markupsafe
2607 (package
2608 (name "python-markupsafe")
2609 (version "0.23")
2610 (source
2611 (origin
2612 (method url-fetch)
2613 (uri (string-append
2614 "https://pypi.python.org/packages/source/M/MarkupSafe/MarkupSafe-"
2615 version ".tar.gz"))
2616 (sha256
2617 (base32
2618 "1hvip33wva3fnmvfp9x5klqri7hpl1hkgqmjbss18nmrb7zimv54"))))
2619 (build-system python-build-system)
2620 (home-page "http://github.com/mitsuhiko/markupsafe")
2621 (synopsis "XML/HTML/XHTML markup safe string implementation for Python")
2622 (description
2623 "Markupsafe provides an XML/HTML/XHTML markup safe string implementation
2624 for Python.")
2625 (license license:bsd-3)))
2626
2627 (define-public python2-markupsafe
2628 (package-with-python2 python-markupsafe))
2629
2630 (define-public python-jinja2
2631 (package
2632 (name "python-jinja2")
2633 (version "2.8")
2634 (source
2635 (origin
2636 (method url-fetch)
2637 (uri (pypi-uri "Jinja2" version))
2638 (sha256
2639 (base32
2640 "1x0v41lp5m1pjix3l46zx02b7lqp2hflgpnxwkywxynvi3zz47xw"))))
2641 (build-system python-build-system)
2642 (propagated-inputs
2643 `(("python-markupsafe" ,python-markupsafe)))
2644 (home-page "http://jinja.pocoo.org/")
2645 (synopsis "Python template engine")
2646 (description
2647 "Jinja2 is a small but fast and easy to use stand-alone template engine
2648 written in pure Python.")
2649 (license license:bsd-3)))
2650
2651 (define-public python2-jinja2
2652 (package-with-python2 python-jinja2))
2653
2654 (define-public python-pystache
2655 (package
2656 (name "python-pystache")
2657 (version "0.5.4")
2658 (source (origin
2659 (method url-fetch)
2660 (uri (pypi-uri "pystache" version))
2661 (sha256
2662 (base32
2663 "0nmqsfmiw4arjxqkmf9z66ml950pcdjk6aq4gin4sywmzdjw5fzp"))))
2664 (build-system python-build-system)
2665 (home-page "http://defunkt.io/pystache/")
2666 (synopsis "Python logic-less template engine")
2667 (description
2668 "Pystache is a Python implementation of the framework agnostic,
2669 logic-free templating system Mustache.")
2670 (license license:expat)))
2671
2672 (define-public python2-pystache
2673 (package-with-python2 python-pystache))
2674
2675 (define-public python-joblib
2676 (package
2677 (name "python-joblib")
2678 (version "0.10.3")
2679 (source (origin
2680 (method url-fetch)
2681 (uri (pypi-uri "joblib" version))
2682 (sha256
2683 (base32
2684 "0787k919zlfmgymprz5bzv0v1df5bbirlf3awrghmjgvkrd9dci9"))))
2685 (build-system python-build-system)
2686 (arguments
2687 `(#:phases
2688 (modify-phases %standard-phases
2689 (add-before 'check 'disable-failing-tests
2690 (lambda _
2691 ;; This numpydoc tests fails for unknown reasons
2692 (delete-file "doc/sphinxext/numpydoc/tests/test_docscrape.py")
2693 ;; This numpydoc test depends on matplotlib, which is not a
2694 ;; required input.
2695 (delete-file "doc/sphinxext/numpydoc/tests/test_plot_directive.py")
2696 ;; These tests fail to execute sys.executable
2697 (substitute* "joblib/test/test_parallel.py"
2698 (("import nose" line)
2699 (string-append "from nose.plugins.skip import SkipTest\n" line))
2700 (("def test_nested_parallel_warnings" line)
2701 (string-append "@SkipTest\n" line))
2702 (("def test_parallel_with_interactively_defined_functions" line)
2703 (string-append "@SkipTest\n" line)))
2704 #t)))))
2705 (native-inputs
2706 `(("python-nose" ,python-nose)
2707 ("python-sphinx" ,python-sphinx)
2708 ("python-docutils" ,python-docutils)
2709 ("python-numpydoc" ,python-numpydoc)))
2710 (home-page "http://pythonhosted.org/joblib/")
2711 (synopsis "Using Python functions as pipeline jobs")
2712 (description
2713 "Joblib is a set of tools to provide lightweight pipelining in Python.
2714 In particular, joblib offers: transparent disk-caching of the output values
2715 and lazy re-evaluation (memoize pattern), easy simple parallel computing
2716 logging and tracing of the execution.")
2717 (license license:bsd-3)))
2718
2719 (define-public python2-joblib
2720 (package-with-python2 python-joblib))
2721
2722 (define-public python-docutils
2723 (package
2724 (name "python-docutils")
2725 (version "0.12")
2726 (source
2727 (origin
2728 (method url-fetch)
2729 (uri (string-append
2730 "https://pypi.python.org/packages/source/d/docutils/docutils-"
2731 version ".tar.gz"))
2732 (sha256
2733 (base32
2734 "1ylnjnw1x4b2y7blr6x35ncdzn69k253kw4cdkv6asdb21w73ny7"))))
2735 (build-system python-build-system)
2736 (arguments
2737 '(#:tests? #f)) ; no setup.py test command
2738 (home-page "http://docutils.sourceforge.net/")
2739 (synopsis "Python Documentation Utilities")
2740 (description
2741 "Docutils is a modular system for processing documentation into useful
2742 formats, such as HTML, XML, and LaTeX. For input Docutils supports
2743 reStructuredText.")
2744 ;; Most of the source code is public domain, but some source files are
2745 ;; licensed under the PFSL, BSD 2-clause, and GPLv3+ licenses.
2746 (license (list license:public-domain license:psfl license:bsd-2 license:gpl3+))))
2747
2748 (define-public python2-docutils
2749 (package-with-python2 python-docutils))
2750
2751 (define-public python-pygments
2752 (package
2753 (name "python-pygments")
2754 (version "2.0.2")
2755 (source
2756 (origin
2757 (method url-fetch)
2758 (uri (pypi-uri "Pygments" version))
2759 (sha256
2760 (base32
2761 "0lagrwifsgn0s8bzqahpr87p7gd38xja8f06akscinp6hj89283k"))))
2762 (build-system python-build-system)
2763 (home-page "http://pygments.org/")
2764 (synopsis "Syntax highlighting")
2765 (description
2766 "Pygments is a syntax highlighting package written in Python.")
2767 (license license:bsd-2)))
2768
2769 (define-public python2-pygments
2770 (package-with-python2 python-pygments))
2771
2772 (define-public python-sphinx
2773 (package
2774 (name "python-sphinx")
2775 (version "1.2.3")
2776 (source
2777 (origin
2778 (method url-fetch)
2779 (uri (string-append
2780 "https://pypi.python.org/packages/source/S/Sphinx/Sphinx-"
2781 version ".tar.gz"))
2782 (sha256
2783 (base32
2784 "011xizm3jnmf4cvs5i6kgf6c5nn046h79i8j0vd0f27yw9j3p4wl"))))
2785 (build-system python-build-system)
2786 (propagated-inputs
2787 `(("python-jinja2" ,python-jinja2)
2788 ("python-docutils" ,python-docutils)
2789 ("python-pygments" ,python-pygments)))
2790 (home-page "http://sphinx-doc.org/")
2791 (synopsis "Python documentation generator")
2792 (description "Sphinx is a tool that makes it easy to create documentation
2793 for Python projects or other documents consisting of multiple reStructuredText
2794 sources.")
2795 (license license:bsd-3)))
2796
2797 (define-public python2-sphinx
2798 (package-with-python2 python-sphinx))
2799
2800 (define-public python-sphinx-rtd-theme
2801 (package
2802 (name "python-sphinx-rtd-theme")
2803 (version "0.1.6")
2804 (source
2805 (origin
2806 (method url-fetch)
2807 (uri (string-append "https://pypi.python.org/packages/source/s/"
2808 "sphinx_rtd_theme/sphinx_rtd_theme-"
2809 version ".tar.gz"))
2810 (sha256
2811 (base32
2812 "19nw3rn7awplcdrz63kg1njqwkbymfg9lwn7l2grhdyhyr2gaa8g"))))
2813 (build-system python-build-system)
2814 (home-page "https://github.com/snide/sphinx_rtd_theme/")
2815 (synopsis "ReadTheDocs.org theme for Sphinx")
2816 (description "A theme for Sphinx used by ReadTheDocs.org.")
2817 (license license:expat)))
2818
2819 (define-public python2-sphinx-rtd-theme
2820 (package-with-python2 python-sphinx-rtd-theme))
2821
2822 (define-public python-feedgenerator
2823 (package
2824 (name "python-feedgenerator")
2825 (version "1.8")
2826 (source
2827 (origin
2828 (method url-fetch)
2829 (uri (pypi-uri "feedgenerator" version))
2830 (sha256
2831 (base32
2832 "0mkimp1fpdan4p3882vzcws4l594k71ich4g0wq97jbra7p602n0"))))
2833 (build-system python-build-system)
2834 (propagated-inputs
2835 `(("python-pytz" ,python-pytz)
2836 ("python-six" ,python-six)))
2837 (home-page "https://github.com/getpelican/feedgenerator")
2838 (synopsis
2839 "Standalone version of Django's Atom/RSS feed generator")
2840 (description
2841 "Feedgenerator-py3k is a standalone version of Django's feedgenerator,
2842 which can produce feeds in RSS 2.0, RSS 0.91, and Atom formats.")
2843 (license license:bsd-3)))
2844
2845 (define-public python2-feedgenerator
2846 (package-with-python2 python-feedgenerator))
2847
2848 (define-public python-blinker
2849 (package
2850 (name "python-blinker")
2851 (version "1.4")
2852 (source
2853 (origin
2854 (method url-fetch)
2855 (uri (pypi-uri "blinker" version))
2856 (sha256
2857 (base32
2858 "1dpq0vb01p36jjwbhhd08ylvrnyvcc82yxx3mwjx6awrycjyw6j7"))))
2859 (build-system python-build-system)
2860 ;; No "test" command supplied to setuptools, so unless there's another way
2861 ;; to run tests, we're skipping them!
2862 (arguments '(#:tests? #f))
2863 (home-page "http://pythonhosted.org/blinker/")
2864 (synopsis "Fast, simple object-to-object and broadcast signaling")
2865 (description
2866 "Blinker provides a fast dispatching system that allows any number of
2867 interested parties to subscribe to events, or \"signals\".")
2868 (license license:expat)))
2869
2870 (define-public python2-blinker
2871 (package-with-python2 python-blinker))
2872
2873 (define-public pelican
2874 (package
2875 (name "pelican")
2876 (version "3.6.3")
2877 (source
2878 (origin
2879 (method url-fetch)
2880 (uri (pypi-uri "pelican" version))
2881 (sha256
2882 (base32
2883 "1hn94rb4q3zmcq16in055xikal4dba5hfx3zznq7warllcgc9f8k"))))
2884 (build-system python-build-system)
2885 (propagated-inputs
2886 `(("python-feedgenerator" ,python-feedgenerator)
2887 ("python-jinja2" ,python-jinja2)
2888 ("python-pygments" ,python-pygments)
2889 ("python-docutils" ,python-docutils)
2890 ("python-pytz" ,python-pytz)
2891 ("python-blinker" ,python-blinker)
2892 ("python-unidecode" ,python-unidecode)
2893 ("python-six" ,python-six)
2894 ("python-dateutil-2" ,python-dateutil-2)))
2895 (home-page "http://getpelican.com/")
2896 (arguments
2897 `(;; XXX Requires a lot more packages to do unit tests :P
2898 #:tests? #f
2899 #:phases (modify-phases %standard-phases
2900 (add-before
2901 'install 'adjust-requires
2902 ;; Since feedgenerator is installed from git, it doesn't
2903 ;; conform to the version requirements.
2904 ;;
2905 ;; We *do have* "feedgenerator >= 1.6", but strip off the
2906 ;; version requirement so setuptools doesn't get confused.
2907 (lambda _
2908 (substitute* "setup.py"
2909 (("['\"]feedgenerator.*?['\"]")
2910 "'feedgenerator'")))))))
2911 (synopsis "Python-based static site publishing system")
2912 (description
2913 "Pelican is a tool to generate a static blog from reStructuredText,
2914 Markdown input files, and more. Pelican uses Jinja2 for templating
2915 and is very extensible.")
2916 (license license:agpl3+)))
2917
2918 (define-public python-scikit-learn
2919 (package
2920 (name "python-scikit-learn")
2921 (version "0.16.1")
2922 (source
2923 (origin
2924 (method url-fetch)
2925 (uri (string-append
2926 "https://github.com/scikit-learn/scikit-learn/archive/"
2927 version ".tar.gz"))
2928 (file-name (string-append name "-" version ".tar.gz"))
2929 (sha256
2930 (base32
2931 "140skabifgc7lvvj873pnzlwx0ni6q8qkrsyad2ccjb3h8rxzkih"))))
2932 (build-system python-build-system)
2933 (arguments
2934 `(#:phases
2935 (alist-cons-before
2936 'check 'set-HOME
2937 ;; some tests require access to "$HOME"
2938 (lambda _ (setenv "HOME" "/tmp"))
2939 ;; Tests can only be run after the library has been installed and not
2940 ;; within the source directory.
2941 (alist-cons-after
2942 'install 'check
2943 (lambda _
2944 (with-directory-excursion "/tmp"
2945 ;; With Python 3 one test of 3334 fails
2946 ;; (sklearn.tests.test_common.test_transformers); see
2947 ;; https://github.com/scikit-learn/scikit-learn/issues/3693
2948 (system* "nosetests" "-v" "sklearn")))
2949 (alist-delete 'check %standard-phases)))))
2950 (inputs
2951 `(("openblas" ,openblas)))
2952 (native-inputs
2953 `(("python-nose" ,python-nose)))
2954 (propagated-inputs
2955 `(("python-numpy" ,python-numpy)
2956 ("python-scipy" ,python-scipy)))
2957 (home-page "http://scikit-learn.org/")
2958 (synopsis "Machine Learning in Python")
2959 (description
2960 "Scikit-learn provides simple and efficient tools for data
2961 mining and data analysis.")
2962 (license license:bsd-3)
2963 (properties `((python2-variant . ,(delay python2-scikit-learn))))))
2964
2965 (define-public python2-scikit-learn
2966 (package-with-python2 (strip-python2-variant python-scikit-learn)))
2967
2968 (define-public python-scikit-image
2969 (package
2970 (name "python-scikit-image")
2971 (version "0.11.3")
2972 (source
2973 (origin
2974 (method url-fetch)
2975 (uri (string-append
2976 "https://pypi.python.org/packages/source/s/scikit-image/scikit-image-"
2977 version ".tar.gz"))
2978 (sha256
2979 (base32 "0jz416fqvpahqyffw8plmszzfj669w8wvf3y9clnr5lr6a7md3kn"))))
2980 (build-system python-build-system)
2981 (propagated-inputs
2982 `(("python-matplotlib" ,python-matplotlib)
2983 ("python-networkx" ,python-networkx)
2984 ("python-numpy" ,python-numpy)
2985 ("python-scipy" ,python-scipy)
2986 ("python-six" ,python-six)
2987 ("python-pillow" ,python-pillow)))
2988 (native-inputs
2989 `(("python-cython" ,python-cython)))
2990 (home-page "http://scikit-image.org/")
2991 (synopsis "Image processing in Python")
2992 (description
2993 "Scikit-image is a collection of algorithms for image processing.")
2994 (license license:bsd-3)
2995 (properties `((python2-variant . ,(delay python2-scikit-image))))))
2996
2997 (define-public python2-scikit-image
2998 (let ((scikit-image (package-with-python2
2999 (strip-python2-variant python-scikit-image))))
3000 (package (inherit scikit-image)
3001 (native-inputs
3002 `(("python2-mock" ,python2-mock)
3003 ,@(package-native-inputs scikit-image)))
3004 (propagated-inputs
3005 `(("python2-pytz" ,python2-pytz)
3006 ,@(package-propagated-inputs scikit-image))))))
3007
3008 (define-public python-redis
3009 (package
3010 (name "python-redis")
3011 (version "2.10.3")
3012 (source
3013 (origin
3014 (method url-fetch)
3015 (uri (string-append
3016 "https://pypi.python.org/packages/source/r/redis/redis-"
3017 version ".tar.gz"))
3018 (sha256
3019 (base32 "1701qjwn4n05q90fdg4bsg96s27xf5s4hsb4gxhv3xk052q3gyx4"))))
3020 (build-system python-build-system)
3021 ;; Tests require a running Redis server
3022 (arguments '(#:tests? #f))
3023 (native-inputs
3024 `(("python-pytest" ,python-pytest)))
3025 (home-page "https://github.com/andymccurdy/redis-py")
3026 (synopsis "Redis Python client")
3027 (description
3028 "This package provides a Python interface to the Redis key-value store.")
3029 (license license:expat)))
3030
3031 (define-public python2-redis
3032 (package-with-python2 python-redis))
3033
3034 (define-public python-rq
3035 (package
3036 (name "python-rq")
3037 (version "0.5.2")
3038 (source
3039 (origin
3040 (method url-fetch)
3041 (uri (string-append
3042 "https://pypi.python.org/packages/source/r/rq/rq-"
3043 version ".tar.gz"))
3044 (sha256
3045 (base32 "0b0z5hn8wkfg300hx7816csgv3bcfamlr29fi3yzgqmpqxwj3fix"))))
3046 (build-system python-build-system)
3047 (propagated-inputs
3048 `(("python-click" ,python-click)
3049 ("python-redis" ,python-redis)))
3050 (home-page "http://python-rq.org/")
3051 (synopsis "Simple job queues for Python")
3052 (description
3053 "RQ (Redis Queue) is a simple Python library for queueing jobs and
3054 processing them in the background with workers. It is backed by Redis and it
3055 is designed to have a low barrier to entry.")
3056 (license license:bsd-2)))
3057
3058 (define-public python2-rq
3059 (package-with-python2 python-rq))
3060
3061 (define-public python-cython
3062 (package
3063 (name "python-cython")
3064 (version "0.24.1")
3065 (source
3066 (origin
3067 (method url-fetch)
3068 (uri (pypi-uri "Cython" version))
3069 (sha256
3070 (base32
3071 "1fg7fmpvfcq9md4ncyqnnylyjy4z3ksdrshzis95g1sh03d8z044"))))
3072 (build-system python-build-system)
3073 ;; we need the full python package and not just the python-wrapper
3074 ;; because we need libpython3.3m.so
3075 (inputs
3076 `(("python" ,python)))
3077 (arguments
3078 `(#:phases
3079 (modify-phases %standard-phases
3080 (add-before 'check 'set-HOME
3081 ;; some tests require access to "$HOME/.cython"
3082 (lambda _ (setenv "HOME" "/tmp")))
3083 (replace 'check
3084 (lambda _ (zero? (system* "python" "runtests.py" "-vv")))))))
3085 (home-page "http://cython.org/")
3086 (synopsis "C extensions for Python")
3087 (description "Cython is an optimising static compiler for both the Python
3088 programming language and the extended Cython programming language. It makes
3089 writing C extensions for Python as easy as Python itself.")
3090 (license license:asl2.0)
3091 (properties `((python2-variant . ,(delay python2-cython))))))
3092
3093 (define-public python2-cython
3094 (package (inherit (package-with-python2
3095 (strip-python2-variant python-cython)))
3096 (name "python2-cython")
3097 (inputs
3098 `(("python-2" ,python-2))))) ; this is not automatically changed
3099
3100 ;; The RPython toolchain currently does not support Python 3.
3101 (define-public python2-rpython
3102 (package
3103 (name "python2-rpython")
3104 (version "0.1.4")
3105 (source
3106 (origin
3107 (method url-fetch)
3108 (uri (pypi-uri "rpython" version))
3109 (sha256
3110 (base32
3111 "07pps06fq4c4wmi5ii0sgh9zgwniz5y7frqhm28g3a154l163fxc"))))
3112 (build-system python-build-system)
3113 (arguments `(#:python ,python-2))
3114 (native-inputs
3115 `(("python2-pytest" ,python2-pytest))) ; needed for running tests
3116 (home-page "https://rpython.readthedocs.org")
3117 (synopsis "Framework for implementing interpreters and virtual machines")
3118 (description "RPython is a translation and support framework for
3119 producing implementations of dynamic languages, emphasizing a clean separation
3120 between language specification and implementation aspects.")
3121 (license license:expat)))
3122
3123 ;; This version of numpy is missing the documentation and is only used to
3124 ;; build matplotlib which is required to build numpy's documentation.
3125 (define python-numpy-bootstrap
3126 (package
3127 (name "python-numpy-bootstrap")
3128 (version "1.10.4")
3129 (source
3130 (origin
3131 (method url-fetch)
3132 (uri (string-append "mirror://sourceforge/numpy/NumPy/" version
3133 "/numpy-" version ".tar.gz"))
3134 (sha256
3135 (base32
3136 "1bjjhvncraka5s6i4lg644jrxij6bvycxy7an20gcz3a0m11iygp"))))
3137 (build-system python-build-system)
3138 (native-inputs
3139 `(("python-nose" ,python-nose)))
3140 (inputs
3141 `(("openblas" ,openblas)
3142 ("lapack" ,lapack)))
3143 (native-inputs
3144 `(("gfortran" ,gfortran)))
3145 (arguments
3146 `(#:phases
3147 (alist-cons-before
3148 'build 'set-environment-variables
3149 (lambda* (#:key inputs #:allow-other-keys)
3150 (call-with-output-file "site.cfg"
3151 (lambda (port)
3152 (format port
3153 "[openblas]
3154 libraries = openblas
3155 library_dirs = ~a/lib
3156 include_dirs = ~a/include
3157
3158 [lapack]
3159 lapack_libs = lapack
3160 library_dirs = ~a/lib
3161 include_dirs = ~a/include
3162 "
3163 (assoc-ref inputs "openblas")
3164 (assoc-ref inputs "openblas")
3165 (assoc-ref inputs "lapack")
3166 (assoc-ref inputs "lapack"))))
3167 ;; Use "gcc" executable, not "cc".
3168 (substitute* "numpy/distutils/system_info.py"
3169 (("c = distutils\\.ccompiler\\.new_compiler\\(\\)")
3170 "c = distutils.ccompiler.new_compiler(); c.set_executables(compiler='gcc',compiler_so='gcc',linker_exe='gcc',linker_so='gcc -shared')"))
3171 #t)
3172 ;; Tests can only be run after the library has been installed and not
3173 ;; within the source directory.
3174 (alist-cons-after
3175 'install 'check
3176 (lambda _
3177 (with-directory-excursion "/tmp"
3178 (zero? (system* "python" "-c"
3179 "import numpy; numpy.test(verbose=2)"))))
3180 (alist-delete
3181 'check
3182 %standard-phases)))))
3183 (home-page "http://www.numpy.org/")
3184 (synopsis "Fundamental package for scientific computing with Python")
3185 (description "NumPy is the fundamental package for scientific computing
3186 with Python. It contains among other things: a powerful N-dimensional array
3187 object, sophisticated (broadcasting) functions, tools for integrating C/C++
3188 and Fortran code, useful linear algebra, Fourier transform, and random number
3189 capabilities.")
3190 (license license:bsd-3)))
3191
3192 (define python2-numpy-bootstrap
3193 (package-with-python2 python-numpy-bootstrap))
3194
3195 (define-public python2-fastlmm
3196 (package
3197 (name "python2-fastlmm")
3198 (version "0.2.21")
3199 (source
3200 (origin
3201 (method url-fetch)
3202 (uri (pypi-uri "fastlmm" version ".zip"))
3203 (sha256
3204 (base32
3205 "1q8c34rpmwkfy3r4d5172pzdkpfryj561897z9r3x22gq7813x1m"))))
3206 (build-system python-build-system)
3207 (arguments
3208 `(#:python ,python-2)) ; only Python 2.7 is supported
3209 (propagated-inputs
3210 `(("python2-numpy" ,python2-numpy)
3211 ("python2-scipy" ,python2-scipy)
3212 ("python2-matplotlib" ,python2-matplotlib)
3213 ("python2-pandas" ,python2-pandas)
3214 ("python2-scikit-learn" ,python2-scikit-learn)
3215 ("python2-cython" ,python2-cython)
3216 ("python2-pysnptools" ,python2-pysnptools)))
3217 (native-inputs
3218 `(("unzip" ,unzip)
3219 ("python2-mock" ,python2-mock)))
3220 (home-page "http://research.microsoft.com/en-us/um/redmond/projects/mscompbio/fastlmm/")
3221 (synopsis "Perform genome-wide association studies on large data sets")
3222 (description
3223 "FaST-LMM, which stands for Factored Spectrally Transformed Linear Mixed
3224 Models, is a program for performing both single-SNP and SNP-set genome-wide
3225 association studies (GWAS) on extremely large data sets.")
3226 (license license:asl2.0)))
3227
3228 (define-public python-numpy
3229 (package (inherit python-numpy-bootstrap)
3230 (name "python-numpy")
3231 (outputs '("out" "doc"))
3232 (inputs
3233 `(("which" ,which)
3234 ("python-matplotlib" ,python-matplotlib)
3235 ("python-sphinx" ,python-sphinx)
3236 ("python-pyparsing" ,python-pyparsing)
3237 ("python-numpydoc" ,python-numpydoc)
3238 ,@(package-inputs python-numpy-bootstrap)))
3239 (native-inputs
3240 `(("pkg-config" ,pkg-config)
3241 ("texlive" ,texlive)
3242 ("texinfo" ,texinfo)
3243 ("perl" ,perl)
3244 ,@(package-native-inputs python-numpy-bootstrap)))
3245 (arguments
3246 `(,@(substitute-keyword-arguments
3247 (package-arguments python-numpy-bootstrap)
3248 ((#:phases phases)
3249 `(alist-cons-after
3250 'install 'install-doc
3251 (lambda* (#:key outputs #:allow-other-keys)
3252 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
3253 (doc (string-append
3254 data "/doc/" ,name "-"
3255 ,(package-version python-numpy-bootstrap)))
3256 (info (string-append data "/info"))
3257 (html (string-append doc "/html"))
3258 (pyver ,(string-append "PYVER=")))
3259 (with-directory-excursion "doc"
3260 (mkdir-p html)
3261 (system* "make" "html" pyver)
3262 (system* "make" "latex" "PAPER=a4" pyver)
3263 (system* "make" "-C" "build/latex"
3264 "all-pdf" "PAPER=a4" pyver)
3265 ;; FIXME: Generation of the info file fails.
3266 ;; (system* "make" "info" pyver)
3267 ;; (mkdir-p info)
3268 ;; (copy-file "build/texinfo/numpy.info"
3269 ;; (string-append info "/numpy.info"))
3270 (for-each (lambda (file)
3271 (copy-file (string-append "build/latex" file)
3272 (string-append doc file)))
3273 '("/numpy-ref.pdf" "/numpy-user.pdf"))
3274 (with-directory-excursion "build/html"
3275 (for-each (lambda (file)
3276 (let* ((dir (dirname file))
3277 (tgt-dir (string-append html "/" dir)))
3278 (unless (equal? "." dir)
3279 (mkdir-p tgt-dir))
3280 (install-file file html)))
3281 (find-files "." ".*"))))))
3282 ,phases)))))))
3283
3284 (define-public python2-numpy
3285 (package-with-python2 python-numpy))
3286
3287 (define-public python-pyparsing
3288 (package
3289 (name "python-pyparsing")
3290 (version "2.0.3")
3291 (source
3292 (origin
3293 (method url-fetch)
3294 (uri (string-append "mirror://sourceforge/pyparsing/pyparsing"
3295 "/pyparsing-" version
3296 "/pyparsing-" version ".tar.gz"))
3297 (sha256
3298 (base32
3299 "0kw4py7gn45j93q8r7bzajfrjdc3xlsn2yzln41lf9zmrghjkrq6"))))
3300 (build-system python-build-system)
3301 (outputs '("out" "doc"))
3302 (arguments
3303 `(#:tests? #f ; no test target
3304 #:modules ((guix build python-build-system)
3305 (guix build utils))
3306 #:phases
3307 (alist-cons-after
3308 'install 'install-doc
3309 (lambda* (#:key outputs #:allow-other-keys)
3310 (let* ((doc (string-append (assoc-ref outputs "doc")
3311 "/share/doc/" ,name "-" ,version))
3312 (html-doc (string-append doc "/html"))
3313 (examples (string-append doc "/examples")))
3314 (mkdir-p html-doc)
3315 (mkdir-p examples)
3316 (for-each
3317 (lambda (dir tgt)
3318 (map (lambda (file)
3319 (install-file file tgt))
3320 (find-files dir ".*")))
3321 (list "docs" "htmldoc" "examples")
3322 (list doc html-doc examples))))
3323 %standard-phases)))
3324 (home-page "http://pyparsing.wikispaces.com")
3325 (synopsis "Python parsing class library")
3326 (description
3327 "The pyparsing module is an alternative approach to creating and
3328 executing simple grammars, vs. the traditional lex/yacc approach, or the use
3329 of regular expressions. The pyparsing module provides a library of classes
3330 that client code uses to construct the grammar directly in Python code.")
3331 (license license:expat)))
3332
3333 (define-public python2-pyparsing
3334 (package-with-python2 python-pyparsing))
3335
3336 (define-public python-numpydoc
3337 (package
3338 (name "python-numpydoc")
3339 (version "0.5")
3340 (source
3341 (origin
3342 (method url-fetch)
3343 (uri (string-append
3344 "https://pypi.python.org/packages/source/n/numpydoc/numpydoc-"
3345 version ".tar.gz"))
3346 (sha256
3347 (base32
3348 "0d4dnifaxkll50jx6czj05y8cb4ny60njd2wz299sj2jxfy51w4k"))
3349 (modules '((guix build utils)))
3350 (snippet
3351 '(begin
3352 ;; Drop a test requiring matplotlib, which we cannot add as an
3353 ;; input since it would create a circular dependency: Extend the
3354 ;; test for Python 3, where it is already dropped, to Python 2.
3355 (substitute* "numpydoc/tests/test_plot_directive.py"
3356 (("3") "2"))))))
3357 (build-system python-build-system)
3358 (native-inputs
3359 `(("python-docutils" ,python-docutils)
3360 ("python-sphinx" ,python-sphinx)
3361 ("python-nose" ,python-nose)))
3362 (home-page "https://pypi.python.org/pypi/numpydoc")
3363 (synopsis
3364 "Numpy's Sphinx extensions")
3365 (description
3366 "Sphinx extension to support docstrings in Numpy format.")
3367 (license license:bsd-2)))
3368
3369 (define-public python2-numpydoc
3370 (package-with-python2 python-numpydoc))
3371
3372 (define-public python-numexpr
3373 (package
3374 (name "python-numexpr")
3375 (version "2.6.0")
3376 (source
3377 (origin
3378 (method url-fetch)
3379 (uri (pypi-uri "numexpr" version))
3380 (sha256
3381 (base32
3382 "0i6iagl2hhbr8q4qzbbjd859v5806vqylq87fq7pi914ps6d6cag"))))
3383 (build-system python-build-system)
3384 (arguments `(#:tests? #f)) ; no tests included
3385 (propagated-inputs
3386 `(("python-numpy" ,python-numpy)))
3387 (home-page "https://github.com/pydata/numexpr")
3388 (synopsis "Fast numerical expression evaluator for NumPy")
3389 (description
3390 "Numexpr is a fast numerical expression evaluator for NumPy. With it,
3391 expressions that operate on arrays are accelerated and use less memory than
3392 doing the same calculation in Python. In addition, its multi-threaded
3393 capabilities can make use of all your cores, which may accelerate
3394 computations, most specially if they are not memory-bounded (e.g. those using
3395 transcendental functions).")
3396 (license license:expat)))
3397
3398 (define-public python2-numexpr
3399 (package-with-python2 python-numexpr))
3400
3401 (define-public python-matplotlib
3402 (package
3403 (name "python-matplotlib")
3404 (version "1.4.3")
3405 (source
3406 (origin
3407 (method url-fetch)
3408 (uri (string-append "mirror://sourceforge/matplotlib/matplotlib"
3409 "/matplotlib-" version
3410 "/matplotlib-" version ".tar.gz"))
3411 (sha256
3412 (base32
3413 "1dn05cvd0g984lzhh72wa0z93psgwshbbg93fkab6slx5m3l95av"))
3414 (patches (search-patches "matplotlib-setupext-tk.patch"))))
3415 (build-system python-build-system)
3416 (outputs '("out" "doc"))
3417 (propagated-inputs ; the following packages are all needed at run time
3418 `(("python-pyparsing" ,python-pyparsing)
3419 ("python-pygobject" ,python-pygobject)
3420 ("gobject-introspection" ,gobject-introspection)
3421 ("python-tkinter" ,python "tk")
3422 ;; The 'gtk+' package (and 'gdk-pixbuf', 'atk' and 'pango' propagated
3423 ;; from 'gtk+') provides the required 'typelib' files used by
3424 ;; 'gobject-introspection'. The location of these files is set with the
3425 ;; help of the environment variable GI_TYPELIB_PATH. At build time this
3426 ;; is done automatically by a 'native-search-path' procedure. However,
3427 ;; at run-time the user must set this variable as follows:
3428 ;;
3429 ;; export GI_TYPELIB_PATH=~/.guix-profile/lib/girepository-1.0
3430 ("gtk+" ,gtk+)
3431 ;; From version 1.4.0 'matplotlib' makes use of 'cairocffi' instead of
3432 ;; 'pycairo'. However, 'pygobject' makes use of a 'pycairo' 'context'
3433 ;; object. For this reason we need to import both libraries.
3434 ;; https://pythonhosted.org/cairocffi/cffi_api.html#converting-pycairo
3435 ("python-pycairo" ,python-pycairo)
3436 ("python-cairocffi" ,python-cairocffi)))
3437 (inputs
3438 `(("python-dateutil" ,python-dateutil-2)
3439 ("python-six" ,python-six)
3440 ("python-pytz" ,python-pytz)
3441 ("python-numpy" ,python-numpy-bootstrap)
3442 ("python-sphinx" ,python-sphinx)
3443 ("python-numpydoc" ,python-numpydoc)
3444 ("python-nose" ,python-nose)
3445 ("python-mock" ,python-mock)
3446 ("libpng" ,libpng)
3447 ("imagemagick" ,imagemagick)
3448 ("freetype" ,freetype)
3449 ("cairo" ,cairo)
3450 ("glib" ,glib)
3451 ("python-pillow" ,python-pillow)
3452 ;; FIXME: Add backends when available.
3453 ;("python-wxpython" ,python-wxpython)
3454 ;("python-pyqt" ,python-pyqt)
3455 ("tcl" ,tcl)
3456 ("tk" ,tk)))
3457 (native-inputs
3458 `(("pkg-config" ,pkg-config)
3459 ("texlive" ,texlive)
3460 ("texinfo" ,texinfo)))
3461 (arguments
3462 `(#:phases
3463 (alist-cons-before
3464 'build 'configure-environment
3465 (lambda* (#:key outputs inputs #:allow-other-keys)
3466 (let ((cairo (assoc-ref inputs "cairo"))
3467 (gtk+ (assoc-ref inputs "gtk+")))
3468 ;; Setting these directories in the 'basedirlist' of 'setup.cfg'
3469 ;; has not effect.
3470 (setenv "LD_LIBRARY_PATH"
3471 (string-append cairo "/lib:" gtk+ "/lib"))
3472 (setenv "HOME" (getcwd))
3473 (call-with-output-file "setup.cfg"
3474 (lambda (port)
3475 (format port "[directories]~%
3476 basedirlist = ~a,~a~%
3477 [rc_options]~%
3478 backend = TkAgg~%"
3479 (assoc-ref inputs "tcl")
3480 (assoc-ref inputs "tk"))))))
3481 (alist-cons-after
3482 'install 'install-doc
3483 (lambda* (#:key outputs #:allow-other-keys)
3484 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
3485 (doc (string-append data "/doc/" ,name "-" ,version))
3486 (info (string-append data "/info"))
3487 (html (string-append doc "/html")))
3488 (with-directory-excursion "doc"
3489 ;; Produce pdf in 'A4' format.
3490 (substitute* (find-files "." "conf\\.py")
3491 (("latex_paper_size = 'letter'")
3492 "latex_paper_size = 'a4'"))
3493 (mkdir-p html)
3494 (mkdir-p info)
3495 ;; The doc recommends to run the 'html' target twice.
3496 (system* "python" "make.py" "html")
3497 (system* "python" "make.py" "html")
3498 (copy-recursively "build/html" html)
3499 (system* "python" "make.py" "latex")
3500 (system* "python" "make.py" "texinfo")
3501 (symlink (string-append html "/_images")
3502 (string-append info "/matplotlib-figures"))
3503 (with-directory-excursion "build/texinfo"
3504 (substitute* "matplotlib.texi"
3505 (("@image\\{([^,]*)" all file)
3506 (string-append "@image{matplotlib-figures/" file)))
3507 (symlink (string-append html "/_images")
3508 "./matplotlib-figures")
3509 (system* "makeinfo" "--no-split"
3510 "-o" "matplotlib.info" "matplotlib.texi"))
3511 (copy-file "build/texinfo/matplotlib.info"
3512 (string-append info "/matplotlib.info"))
3513 (copy-file "build/latex/Matplotlib.pdf"
3514 (string-append doc "/Matplotlib.pdf")))))
3515 %standard-phases))))
3516 (home-page "http://matplotlib.org")
3517 (synopsis "2D plotting library for Python")
3518 (description
3519 "Matplotlib is a Python 2D plotting library which produces publication
3520 quality figures in a variety of hardcopy formats and interactive environments
3521 across platforms. Matplotlib can be used in Python scripts, the python and
3522 ipython shell, web application servers, and six graphical user interface
3523 toolkits.")
3524 (license license:psfl)
3525 (properties `((python2-variant . ,(delay python2-matplotlib))))))
3526
3527 (define-public python2-matplotlib
3528 (let ((matplotlib (package-with-python2
3529 (strip-python2-variant python-matplotlib))))
3530 (package (inherit matplotlib)
3531 ;; Make sure to use special packages for Python 2 instead
3532 ;; of those automatically rewritten by package-with-python2.
3533 (propagated-inputs
3534 `(("python2-pycairo" ,python2-pycairo)
3535 ("python2-pygobject-2" ,python2-pygobject-2)
3536 ("python2-tkinter" ,python-2 "tk")
3537 ,@(fold alist-delete (package-propagated-inputs matplotlib)
3538 '("python-pycairo" "python-pygobject" "python-tkinter")))))))
3539
3540 (define-public python2-pysnptools
3541 (package
3542 (name "python2-pysnptools")
3543 (version "0.3.9")
3544 (source
3545 (origin
3546 (method url-fetch)
3547 (uri (pypi-uri "pysnptools" version ".zip"))
3548 (sha256
3549 (base32
3550 "1wybggjzz8zw7aav4pjsg2h22xp17a1lghrprza1pxwlm7wf96y2"))))
3551 (build-system python-build-system)
3552 (arguments
3553 `(#:python ,python-2)) ; only Python 2.7 is supported
3554 (propagated-inputs
3555 `(("python2-numpy" ,python2-numpy)
3556 ("python2-scipy" ,python2-scipy)
3557 ("python2-pytz" ,python2-pytz)
3558 ("python2-cython" ,python2-cython)))
3559 (inputs
3560 `(("python2-dateutil-2" ,python2-dateutil-2)
3561 ("python2-pandas" ,python2-pandas)
3562 ("python2-six" ,python2-six)))
3563 (native-inputs
3564 `(("unzip" ,unzip)))
3565 (home-page "http://research.microsoft.com/en-us/um/redmond/projects/mscompbio/")
3566 (synopsis "Library for reading and manipulating genetic data")
3567 (description
3568 "PySnpTools is a library for reading and manipulating genetic data. It
3569 can, for example, efficiently read whole PLINK *.bed/bim/fam files or parts of
3570 those files. It can also efficiently manipulate ranges of integers using set
3571 operators such as union, intersection, and difference.")
3572 (license license:asl2.0)))
3573
3574 (define-public python-rpy2
3575 (package
3576 (name "python-rpy2")
3577 (version "2.7.6")
3578 (source
3579 (origin
3580 (method url-fetch)
3581 (uri (pypi-uri "rpy2" version))
3582 (sha256
3583 (base32
3584 "0nhan2qvrw7b7gg5zddwa22kybdv3x1g26vkd7q8lvnkgzrs4dga"))))
3585 (build-system python-build-system)
3586 (propagated-inputs
3587 `(("python-six" ,python-six)))
3588 (inputs
3589 `(("readline" ,readline)
3590 ("icu4c" ,icu4c)
3591 ("pcre" ,pcre)
3592 ("r" ,r)))
3593 (native-inputs
3594 `(("zlib" ,zlib)))
3595 (home-page "http://rpy.sourceforge.net/")
3596 (synopsis "Python interface to the R language")
3597 (description "rpy2 is a redesign and rewrite of rpy. It is providing a
3598 low-level interface to R from Python, a proposed high-level interface,
3599 including wrappers to graphical libraries, as well as R-like structures and
3600 functions.")
3601 (license license:gpl3+)))
3602
3603 (define-public python2-rpy2
3604 (let ((rpy2 (package-with-python2 python-rpy2)))
3605 (package (inherit rpy2)
3606 (native-inputs
3607 `(("python2-singledispatch" ,python2-singledispatch)
3608 ,@(package-native-inputs rpy2))))))
3609
3610 (define-public python-scipy
3611 (package
3612 (name "python-scipy")
3613 (version "0.16.0")
3614 (source
3615 (origin
3616 (method url-fetch)
3617 ; http://downloads.sourceforge.net/project/scipy/scipy/0.16.1/scipy-0.16.1.tar.gz
3618 (uri (string-append "mirror://sourceforge/scipy/scipy/" version
3619 "/scipy-" version ".tar.xz"))
3620 (sha256
3621 (base32
3622 "0wa0a4skpda3gx7lb12yn19nhbairlyxrvda2lz2bcawk3x5qzz2"))))
3623 (build-system python-build-system)
3624 (propagated-inputs
3625 `(("python-numpy" ,python-numpy)
3626 ("python-matplotlib" ,python-matplotlib)
3627 ("python-pyparsing" ,python-pyparsing)))
3628 (inputs
3629 `(("lapack" ,lapack)
3630 ("openblas" ,openblas)))
3631 (native-inputs
3632 `(("python-nose" ,python-nose)
3633 ("python-sphinx" ,python-sphinx)
3634 ("python-numpydoc" ,python-numpydoc)
3635 ("gfortran" ,gfortran)
3636 ("texlive" ,texlive)
3637 ("perl" ,perl)))
3638 (outputs '("out" "doc"))
3639 (arguments
3640 `(#:phases
3641 (alist-cons-before
3642 'build 'configure-openblas
3643 (lambda* (#:key inputs #:allow-other-keys)
3644 (call-with-output-file "site.cfg"
3645 (lambda (port)
3646 (format port
3647 "[blas]
3648 libraries = openblas
3649 library_dirs = ~a/lib
3650 include_dirs = ~a/include
3651 [atlas]
3652 library_dirs = ~a/lib
3653 atlas_libs = openblas
3654 "
3655 (assoc-ref inputs "openblas")
3656 (assoc-ref inputs "openblas")
3657 (assoc-ref inputs "openblas"))))
3658 #t)
3659 (alist-cons-after
3660 'install 'install-doc
3661 (lambda* (#:key outputs #:allow-other-keys)
3662 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
3663 (doc (string-append data "/doc/" ,name "-" ,version))
3664 (html (string-append doc "/html"))
3665 (pyver ,(string-append "PYVER=")))
3666 (with-directory-excursion "doc"
3667 ;; Fix generation of images for mathematical expressions.
3668 (substitute* (find-files "source" "conf\\.py")
3669 (("pngmath_use_preview = True")
3670 "pngmath_use_preview = False"))
3671 (mkdir-p html)
3672 (system* "make" "html" pyver)
3673 (system* "make" "latex" "PAPER=a4" pyver)
3674 (system* "make" "-C" "build/latex" "all-pdf" "PAPER=a4" pyver)
3675 (copy-file "build/latex/scipy-ref.pdf"
3676 (string-append doc "/scipy-ref.pdf"))
3677 (with-directory-excursion "build/html"
3678 (for-each (lambda (file)
3679 (let* ((dir (dirname file))
3680 (tgt-dir (string-append html "/" dir)))
3681 (install-file file html)))
3682 (find-files "." ".*"))))))
3683 ;; Tests can only be run after the library has been installed and not
3684 ;; within the source directory.
3685 (alist-cons-after
3686 'install 'check
3687 (lambda _
3688 (with-directory-excursion "/tmp"
3689 (zero? (system* "python" "-c" "import scipy; scipy.test()"))))
3690 (alist-delete
3691 'check
3692 (alist-cons-after
3693 'unpack 'fix-tests
3694 (lambda _
3695 (substitute* "scipy/integrate/tests/test_quadpack.py"
3696 (("libm.so") "libm.so.6"))
3697 #t)
3698 %standard-phases)))))))
3699 (home-page "http://www.scipy.org/")
3700 (synopsis "The Scipy library provides efficient numerical routines")
3701 (description "The SciPy library is one of the core packages that make up
3702 the SciPy stack. It provides many user-friendly and efficient numerical
3703 routines such as routines for numerical integration and optimization.")
3704 (license license:bsd-3)))
3705
3706 (define-public python2-scipy
3707 (package-with-python2 python-scipy))
3708
3709 (define-public python-socksipy-branch
3710 (package
3711 (name "python-socksipy-branch")
3712 (version "1.01")
3713 (source
3714 (origin
3715 (method url-fetch)
3716 (uri (pypi-uri "SocksiPy-branch" version))
3717 (sha256
3718 (base32
3719 "01l41v4g7fy9fzvinmjxy6zcbhgqaif8dhdqm4w90fwcw9h51a8p"))))
3720 (build-system python-build-system)
3721 (arguments
3722 `(#:tests? #f)) ; There are no tests
3723 (home-page "https://code.google.com/archive/p/socksipy-branch/")
3724 (synopsis "Python SOCKS module")
3725 (description
3726 "SocksiPy - A Python SOCKS client module. It provides a
3727 socket-like interface that supports connections to any TCP
3728 service through the use of a SOCKS4, SOCKS5 or HTTP proxy.
3729 The original version was developed by Dan Haim, this is a
3730 branch created by Mario Vilas to address some open issues,
3731 as the original project seems to have been abandoned circa 2007.")
3732 (license license:bsd-3)))
3733
3734 (define-public python2-socksipy-branch
3735 (package-with-python2 python-socksipy-branch))
3736
3737 (define-public python-sqlalchemy
3738 (package
3739 (name "python-sqlalchemy")
3740 (version "1.0.12")
3741 (source
3742 (origin
3743 (method url-fetch)
3744 (uri (string-append "https://pypi.python.org/packages/source/S/"
3745 "SQLAlchemy/SQLAlchemy-" version ".tar.gz"))
3746 (sha256
3747 (base32
3748 "1l8qclhd0s90w3pvwhi5mjxdwr5j7gw7cjka2fx6f2vqmq7f4yb6"))))
3749 (build-system python-build-system)
3750 (native-inputs
3751 `(("python-cython" ,python-cython) ;for c extensions
3752 ("python-pytest" ,python-pytest)
3753 ("python-mock" ,python-mock))) ;for tests
3754 (arguments
3755 `(#:phases (alist-replace
3756 'check
3757 (lambda _ (zero? (system* "py.test")))
3758 %standard-phases)))
3759 (home-page "http://www.sqlalchemy.org")
3760 (synopsis "Database abstraction library")
3761 (description
3762 "SQLAlchemy is the Python SQL toolkit and Object Relational Mapper that
3763 gives application developers the full power and flexibility of SQL. It
3764 provides a full suite of well known enterprise-level persistence patterns,
3765 designed for efficient and high-performing database access, adapted into a
3766 simple and Pythonic domain language.")
3767 (license license:x11)))
3768
3769 (define-public python2-sqlalchemy
3770 (package-with-python2 python-sqlalchemy))
3771
3772 (define-public python-pycodestyle
3773 (package
3774 (name "python-pycodestyle")
3775 (version "2.0.0")
3776 (source
3777 (origin
3778 (method url-fetch)
3779 (uri (pypi-uri "pycodestyle" version))
3780 (sha256
3781 (base32
3782 "1rz2v8506mdjdyxcnv9ygiw6v0d4dqx8z5sjyjm0w2v32h5l5w1p"))))
3783 (build-system python-build-system)
3784 (home-page "https://pycodestyle.readthedocs.io/")
3785 (synopsis "Python style guide checker")
3786 (description "@code{pycodestyle} (formerly pep8) is a tool to check
3787 Python code against some of the style conventions in
3788 @url{http://www.python.org/dev/peps/pep-0008/,PEP 8}.")
3789 (license license:expat)))
3790
3791 (define-public python2-pycodestyle
3792 (package-with-python2 python-pycodestyle))
3793
3794 (define-public python-orderedmultidict
3795 (package
3796 (name "python-orderedmultidict")
3797 (version "0.7.10")
3798 (source
3799 (origin
3800 (method url-fetch)
3801 (uri (pypi-uri "orderedmultidict" version))
3802 (sha256
3803 (base32
3804 "1gvqk0jd432wsn88kq4svad68xz3r012jfpnhh9in7bqrkyxidky"))))
3805 (build-system python-build-system)
3806 (arguments
3807 `(#:phases
3808 (modify-phases %standard-phases
3809 (add-after 'unpack 'fix-tests
3810 (lambda _
3811 ;; The package uses nosetest for running the tests.
3812 ;; Adding this initfile allows to run the test suite
3813 ;; without requiring nosetest.
3814 (zero? (system* "touch" "tests/__init__.py")))))))
3815 (propagated-inputs
3816 `(("python-six" ,python-six)))
3817 (native-inputs
3818 `(("python-pycodestyle" ,python-pycodestyle)))
3819 (home-page "https://github.com/gruns/orderedmultidict")
3820 (synopsis "Python Ordered Multivalue Dictionary - omdict")
3821 (description "This package contains a library for ordered multivalue
3822 dictionaries. A multivalue dictionary is a dictionary that can store
3823 multiple values for the same key. An ordered multivalue dictionary is a
3824 multivalue dictionary that retains the order of insertions and deletions.")
3825 (license license:unlicense)))
3826
3827 (define-public python2-orderedmultidict
3828 (package-with-python2 python-orderedmultidict))
3829
3830 (define-public python-furl
3831 (package
3832 (name "python-furl")
3833 (version "0.5.6")
3834 (source
3835 (origin
3836 (method url-fetch)
3837 (uri (pypi-uri "furl" version))
3838 (sha256
3839 (base32
3840 "0lzpfpm686hvz3sr1mcrnd1b3lgmnw8v59gb43wfi98r3b671pqc"))))
3841 (build-system python-build-system)
3842 (propagated-inputs
3843 `(("python-six" ,python-six)
3844 ("python-orderedmultidict" ,python-orderedmultidict)))
3845 (native-inputs
3846 `(("python-pycodestyle" ,python-pycodestyle)))
3847 (home-page "https://github.com/gruns/furl")
3848 (synopsis "URL manipulation in Python")
3849 (description "Furl provides an easy-to-use alternative to the
3850 @code{urllib} and @code{urlparse} modules for manipulating URLs.")
3851 (license license:unlicense)))
3852
3853 (define-public python2-furl
3854 (package-with-python2 python-furl))
3855
3856 (define-public python-flask-babel
3857 (package
3858 (name "python-flask-babel")
3859 (version "0.11.1")
3860 (source
3861 (origin
3862 (method url-fetch)
3863 (uri (pypi-uri "Flask-Babel" version))
3864 (sha256
3865 (base32
3866 "16b80cipdba9xj3jlaiaq6wgrgpjb70w3j01jjy9hbp4k71kd6yj"))))
3867 (build-system python-build-system)
3868 (propagated-inputs
3869 `(("python-flask" ,python-flask)
3870 ("python-babel" ,python-babel)
3871 ("python-jinja2" ,python-jinja2)
3872 ("python-pytz" ,python-pytz)))
3873 (home-page "https://github.com/python-babel/flask-babel")
3874 (synopsis "Add i18n/l10n support to Flask applications")
3875 (description "This package implements internationalization and localization
3876 support for Flask. This is based on the Python babel module as well as pytz -
3877 both of which are installed automatically if you install this library.")
3878 (license license:bsd-3)))
3879
3880 (define-public python2-flask-babel
3881 (package-with-python2 python-flask-babel))
3882
3883 (define-public python-sqlalchemy-utils
3884 (package
3885 (name "python-sqlalchemy-utils")
3886 (version "0.32.9")
3887 (source
3888 (origin
3889 (method url-fetch)
3890 (uri (pypi-uri "SQLAlchemy-Utils" version))
3891 (sha256
3892 (base32
3893 "1zbmmh7n8m01ikizn2mj1mfwch26nsr1awv9mvskqry7av0mpy98"))))
3894 (build-system python-build-system)
3895 (propagated-inputs
3896 `(("python-six" ,python-six)
3897 ("python-sqlalchemy" ,python-sqlalchemy)))
3898 (native-inputs
3899 `(("python-pytest" ,python-pytest)))
3900 (home-page "https://github.com/kvesteri/sqlalchemy-utils")
3901 (synopsis "Various utility functions for SQLAlchemy")
3902 (description
3903 "SQLAlchemy-utils provides various utility functions and custom data types
3904 for SQLAlchemy. SQLAlchemy is an SQL database abstraction library for Python.
3905
3906 You might also want to install the following optional dependencies:
3907 @enumerate
3908 @item @code{python-passlib}
3909 @item @code{python-babel}
3910 @item @code{python-cryptography}
3911 @item @code{python-pytz}
3912 @item @code{python-psycopg2}
3913 @item @code{python-furl}
3914 @item @code{python-flask-babel}
3915 @end enumerate
3916 ")
3917 (license license:bsd-3)))
3918
3919 (define-public python2-sqlalchemy-utils
3920 (package-with-python2 python-sqlalchemy-utils))
3921
3922 (define-public python-alembic
3923 (package
3924 (name "python-alembic")
3925 (version "0.8.7")
3926 (source
3927 (origin
3928 (method url-fetch)
3929 (uri (pypi-uri "alembic" version))
3930 (sha256
3931 (base32
3932 "0ias6fdzwr2s220fnjspkdgm9510bd0cnap0hx5y4zy4srba9f3z"))))
3933 (build-system python-build-system)
3934 (native-inputs
3935 `(("python-mock" ,python-mock)
3936 ("python-pytest-cov" ,python-pytest-cov)))
3937 (propagated-inputs
3938 `(("python-sqlalchemy" ,python-sqlalchemy)
3939 ("python-mako" ,python-mako)
3940 ("python-editor" ,python-editor)))
3941 (home-page "http://bitbucket.org/zzzeek/alembic")
3942 (synopsis
3943 "Database migration tool for SQLAlchemy")
3944 (description
3945 "Alembic is a lightweight database migration tool for usage with the
3946 SQLAlchemy Database Toolkit for Python.")
3947 (license license:expat)))
3948
3949 (define-public python2-alembic
3950 (package-with-python2 python-alembic))
3951
3952 (define-public python-distutils-extra
3953 (package
3954 (name "python-distutils-extra")
3955 (version "2.38")
3956 (source
3957 (origin
3958 (method url-fetch)
3959 (uri (string-append "https://launchpad.net/python-distutils-extra/trunk/"
3960 version "/+download/python-distutils-extra-"
3961 version ".tar.gz"))
3962 (sha256
3963 (base32
3964 "0lx15kcbby9zisx33p2h5hgakgwh2bvh0ibag8z0px4j6ifhs41x"))))
3965 (build-system python-build-system)
3966 (home-page "https://launchpad.net/python-distutils-extra/")
3967 (synopsis "Enhancements to Python's distutils")
3968 (description
3969 "The python-distutils-extra module enables you to easily integrate
3970 gettext support, themed icons, and scrollkeeper-based documentation into
3971 Python's distutils.")
3972 (license license:gpl2)))
3973
3974 (define-public python2-distutils-extra
3975 (package-with-python2 python-distutils-extra))
3976
3977 (define-public python2-elib.intl
3978 (package
3979 (name "python2-elib.intl")
3980 (version "0.0.3")
3981 (source
3982 (origin
3983 ;; This project doesn't tag releases or publish tarballs, so we take
3984 ;; source from a (semi-arbitrary, i.e. latest as of now) git commit.
3985 (method git-fetch)
3986 (uri (git-reference
3987 (url "https://github.com/dieterv/elib.intl.git")
3988 (commit "d09997cfef")))
3989 (sha256
3990 (base32
3991 "0y7vzff9xgbnaay7m0va1arl6g68ncwrvbgwl7jqlclsahzzb09d"))))
3992 (build-system python-build-system)
3993 (arguments
3994 ;; incompatible with Python 3 (exception syntax)
3995 `(#:python ,python-2
3996 #:tests? #f))
3997 (home-page "https://github.com/dieterv/elib.intl")
3998 (synopsis "Enhanced internationalization for Python")
3999 (description
4000 "The elib.intl module provides enhanced internationalization (I18N)
4001 services for your Python modules and applications.")
4002 (license license:lgpl3+)))
4003
4004 (define-public python-pillow
4005 (package
4006 (name "python-pillow")
4007 (version "3.3.3")
4008 (source
4009 (origin
4010 (method url-fetch)
4011 (uri (pypi-uri "Pillow" version))
4012 (sha256
4013 (base32
4014 "0xkv0p1d73gz0a1qaasf0ai4262g8f334j07vd60bjrxs2wr3nmj"))))
4015 (build-system python-build-system)
4016 (native-inputs
4017 `(("python-nose" ,python-nose)))
4018 (inputs
4019 `(("freetype" ,freetype)
4020 ("lcms" ,lcms)
4021 ("zlib" ,zlib)
4022 ("libjpeg" ,libjpeg)
4023 ("openjpeg" ,openjpeg)
4024 ("libtiff" ,libtiff)
4025 ("libwebp" ,libwebp)))
4026 ;; Note: setuptools used at runtime for pkg_resources
4027 (arguments
4028 `(#:phases (modify-phases %standard-phases
4029 (add-after
4030 'install 'check-installed
4031 (lambda _
4032 (begin
4033 (setenv "HOME" (getcwd))
4034 (and (zero? (system* "python" "selftest.py"
4035 "--installed"))
4036 (zero? (system* "python" "test-installed.py"))))))
4037 (delete 'check))))
4038 (home-page "https://pypi.python.org/pypi/Pillow")
4039 (synopsis "Fork of the Python Imaging Library")
4040 (description
4041 "The Python Imaging Library adds image processing capabilities to your
4042 Python interpreter. This library provides extensive file format support, an
4043 efficient internal representation, and fairly powerful image processing
4044 capabilities. The core image library is designed for fast access to data
4045 stored in a few basic pixel formats. It should provide a solid foundation for
4046 a general image processing tool.")
4047 (license (license:x11-style
4048 "http://www.pythonware.com/products/pil/license.htm"
4049 "The PIL Software License"))))
4050
4051 (define-public python2-pillow
4052 (package-with-python2 python-pillow))
4053
4054 (define-public python-pycparser
4055 (package
4056 (name "python-pycparser")
4057 (version "2.14")
4058 (source
4059 (origin
4060 (method url-fetch)
4061 (uri (pypi-uri "pycparser" version))
4062 (sha256
4063 (base32
4064 "0wvzyb6rxsfj3xcnpa4ynbh9qc7rrbk2277d5wqpphmx9akv8nbr"))))
4065 (outputs '("out" "doc"))
4066 (build-system python-build-system)
4067 (native-inputs
4068 `(("pkg-config" ,pkg-config)))
4069 (arguments
4070 `(#:phases
4071 (alist-replace
4072 'check
4073 (lambda _
4074 (with-directory-excursion "tests"
4075 (zero? (system* "python" "all_tests.py"))))
4076 (alist-cons-after
4077 'install 'install-doc
4078 (lambda* (#:key outputs #:allow-other-keys)
4079 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4080 (doc (string-append data "/doc/" ,name "-" ,version))
4081 (examples (string-append doc "/examples")))
4082 (mkdir-p examples)
4083 (for-each (lambda (file)
4084 (copy-file (string-append "." file)
4085 (string-append doc file)))
4086 '("/README.rst" "/CHANGES" "/LICENSE"))
4087 (copy-recursively "examples" examples)))
4088 %standard-phases))))
4089 (home-page "https://github.com/eliben/pycparser")
4090 (synopsis "C parser in Python")
4091 (description
4092 "Pycparser is a complete parser of the C language, written in pure Python
4093 using the PLY parsing library. It parses C code into an AST and can serve as
4094 a front-end for C compilers or analysis tools.")
4095 (license license:bsd-3)))
4096
4097 (define-public python2-pycparser
4098 (package-with-python2 python-pycparser))
4099
4100 (define-public python-cffi
4101 (package
4102 (name "python-cffi")
4103 (version "1.4.2")
4104 (source
4105 (origin
4106 (method url-fetch)
4107 (uri (pypi-uri "cffi" version))
4108 (sha256
4109 (base32 "161rj52rzi3880lij17d6i9kvgkiwjilrqjs8405k8sf6ryif7cg"))))
4110 (build-system python-build-system)
4111 (outputs '("out" "doc"))
4112 (inputs
4113 `(("libffi" ,libffi)))
4114 (propagated-inputs ; required at run-time
4115 `(("python-pycparser" ,python-pycparser)))
4116 (native-inputs
4117 `(("pkg-config" ,pkg-config)
4118 ("python-sphinx" ,python-sphinx)
4119 ("python-pytest" ,python-pytest)))
4120 (arguments
4121 `(#:phases
4122 (alist-cons-after
4123 'install 'install-doc
4124 (lambda* (#:key outputs #:allow-other-keys)
4125 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4126 (doc (string-append data "/doc/" ,name "-" ,version))
4127 (html (string-append doc "/html")))
4128 (with-directory-excursion "doc"
4129 (system* "make" "html")
4130 (mkdir-p html)
4131 (copy-recursively "build/html" html))
4132 (copy-file "LICENSE" (string-append doc "/LICENSE"))))
4133 %standard-phases)))
4134 (home-page "http://cffi.readthedocs.org")
4135 (synopsis "Foreign function interface for Python")
4136 (description
4137 "Foreign Function Interface for Python calling C code.")
4138 (license license:expat)))
4139
4140 (define-public python2-cffi
4141 (package-with-python2 python-cffi))
4142
4143 (define-public python-xcffib
4144 (package
4145 (name "python-xcffib")
4146 (version "0.1.9")
4147 (source
4148 (origin
4149 (method url-fetch)
4150 (uri (string-append "https://pypi.python.org/packages/source/x/"
4151 "xcffib/xcffib-" version ".tar.gz"))
4152 (sha256
4153 (base32
4154 "0655hzxv57h1a9ja9kwp0ichbkhf3djw32k33d66xp0q37dq2y81"))))
4155 (build-system python-build-system)
4156 (inputs
4157 `(("libxcb" ,libxcb)))
4158 (propagated-inputs
4159 `(("python-cffi" ,python-cffi) ; used at run time
4160 ("python-six" ,python-six)))
4161 (arguments
4162 `(#:phases
4163 (alist-cons-after
4164 'install 'install-doc
4165 (lambda* (#:key outputs #:allow-other-keys)
4166 (let ((doc (string-append (assoc-ref outputs "out") "/share"
4167 "/doc/" ,name "-" ,version)))
4168 (mkdir-p doc)
4169 (copy-file "README.md"
4170 (string-append doc "/README.md"))))
4171 %standard-phases)))
4172 (home-page "https://github.com/tych0/xcffib")
4173 (synopsis "XCB Python bindings")
4174 (description
4175 "Xcffib is a replacement for xpyb, an XCB Python bindings. It adds
4176 support for Python 3 and PyPy. It is based on cffi.")
4177 (license license:expat)))
4178
4179 (define-public python2-xcffib
4180 (package-with-python2 python-xcffib))
4181
4182 (define-public python-cairocffi
4183 (package
4184 (name "python-cairocffi")
4185 (version "0.6")
4186 (source
4187 (origin
4188 (method url-fetch)
4189 ;; The archive on pypi is missing the 'utils' directory!
4190 (uri (string-append "https://github.com/SimonSapin/cairocffi/archive/v"
4191 version ".tar.gz"))
4192 (file-name (string-append name "-" version ".tar.gz"))
4193 (sha256
4194 (base32
4195 "03w5p62sp3nqiccx864sbq0jvh7946277jqx3rcc3dch5xwfvv51"))))
4196 (build-system python-build-system)
4197 (outputs '("out" "doc"))
4198 (inputs
4199 `(("gdk-pixbuf" ,gdk-pixbuf)
4200 ("cairo" ,cairo)))
4201 (native-inputs
4202 `(("pkg-config" ,pkg-config)
4203 ("python-sphinx" ,python-sphinx)
4204 ("python-docutils" ,python-docutils)))
4205 (propagated-inputs
4206 `(("python-xcffib" ,python-xcffib))) ; used at run time
4207 (arguments
4208 `(#:phases
4209 (alist-cons-after
4210 'install 'install-doc
4211 (lambda* (#:key inputs outputs #:allow-other-keys)
4212 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4213 (doc (string-append data "/doc/" ,name "-" ,version))
4214 (html (string-append doc "/html")))
4215 (setenv "LD_LIBRARY_PATH"
4216 (string-append (assoc-ref inputs "cairo") "/lib" ":"
4217 (assoc-ref inputs "gdk-pixbuf") "/lib"))
4218 (setenv "LANG" "en_US.UTF-8")
4219 (mkdir-p html)
4220 (for-each (lambda (file)
4221 (copy-file (string-append "." file)
4222 (string-append doc file)))
4223 '("/README.rst" "/CHANGES" "/LICENSE"))
4224 (system* "python" "setup.py" "build_sphinx")
4225 (copy-recursively "docs/_build/html" html)))
4226 %standard-phases)))
4227 (home-page "https://github.com/SimonSapin/cairocffi")
4228 (synopsis "Python bindings and object-oriented API for Cairo")
4229 (description
4230 "Cairocffi is a CFFI-based drop-in replacement for Pycairo, a set of
4231 Python bindings and object-oriented API for cairo. Cairo is a 2D vector
4232 graphics library with support for multiple backends including image buffers,
4233 PNG, PostScript, PDF, and SVG file output.")
4234 (license license:bsd-3)))
4235
4236 (define-public python2-cairocffi
4237 (package-with-python2 python-cairocffi))
4238
4239 (define-public python-decorator
4240 (package
4241 (name "python-decorator")
4242 (version "4.0.9")
4243 (source
4244 (origin
4245 (method url-fetch)
4246 (uri (pypi-uri "decorator" version))
4247 (sha256
4248 (base32 "1a5vwhflfd9sh3rfb40xlyipldgdzfff6brman57hqv3661jw0lh"))))
4249 (build-system python-build-system)
4250 (arguments '(#:tests? #f)) ; no test target
4251 (home-page "https://pypi.python.org/pypi/decorator/")
4252 (synopsis "Python module to simplify usage of decorators")
4253 (description
4254 "The aim of the decorator module is to simplify the usage of decorators
4255 for the average programmer, and to popularize decorators usage giving examples
4256 of useful decorators, such as memoize, tracing, redirecting_stdout, locked,
4257 etc. The core of this module is a decorator factory.")
4258 (license license:expat)))
4259
4260 (define-public python2-decorator
4261 (package-with-python2 python-decorator))
4262
4263 (define-public python-drmaa
4264 (package
4265 (name "python-drmaa")
4266 (version "0.7.6")
4267 (source
4268 (origin
4269 (method url-fetch)
4270 (uri (string-append
4271 "https://pypi.python.org/packages/source/d/drmaa/drmaa-"
4272 version ".tar.gz"))
4273 (sha256
4274 (base32 "0bzl9f9g34dlhwf09i3fdv7dqqzf2iq0w7d6c2bafx1nlap8qfbh"))))
4275 (build-system python-build-system)
4276 ;; The test suite requires libdrmaa which is provided by the cluster
4277 ;; environment. At runtime the environment variable DRMAA_LIBRARY_PATH
4278 ;; should be set to the path of the libdrmaa library.
4279 (arguments '(#:tests? #f))
4280 (native-inputs
4281 `(("python-nose" ,python-nose)))
4282 (home-page "https://pypi.python.org/pypi/drmaa")
4283 (synopsis "Python bindings for the DRMAA library")
4284 (description
4285 "A Python package for Distributed Resource Management (DRM) job
4286 submission and control. This package is an implementation of the DRMAA 1.0
4287 Python language binding specification.")
4288 (license license:bsd-3)))
4289
4290 (define-public python2-drmaa
4291 (package-with-python2 python-drmaa))
4292
4293 (define-public python-gridmap
4294 (package
4295 (name "python-gridmap")
4296 (version "0.13.0")
4297 (source
4298 (origin
4299 (method url-fetch)
4300 (uri (string-append
4301 "https://github.com/pygridtools/gridmap/archive/v"
4302 version ".tar.gz"))
4303 (file-name (string-append name "-" version ".tar.gz"))
4304 (sha256
4305 (base32 "1gzjg2k6f14i1msm2b0ax8d9ds1hvk6qd5nlaivg8m4cxqp4cp1x"))))
4306 (build-system python-build-system)
4307 (propagated-inputs
4308 `(("python-psutil" ,python-psutil)
4309 ("python-drmaa" ,python-drmaa)
4310 ("python-pyzmq" ,python-pyzmq)))
4311 (home-page "https://github.com/pygridtools/gridmap")
4312 (synopsis "Create jobs on a cluster directly from Python")
4313 (description
4314 "Gridmap is a Python package to allow you to easily create jobs on the
4315 cluster directly from Python. You can directly map Python functions onto the
4316 cluster without needing to write any wrapper code yourself.")
4317 (license license:gpl3+)))
4318
4319 (define-public python2-gridmap
4320 (package-with-python2 python-gridmap))
4321
4322 (define-public python-pexpect
4323 (package
4324 (name "python-pexpect")
4325 (version "3.3")
4326 (source
4327 (origin
4328 (method url-fetch)
4329 (uri (string-append "https://pypi.python.org/packages/source/p/"
4330 "pexpect/pexpect-" version ".tar.gz"))
4331 (sha256
4332 (base32 "1fp5gm976z7ghm8jw57463rj19cv06c8zw842prgyg788f6n3snz"))))
4333 (build-system python-build-system)
4334 (arguments
4335 `(#:phases
4336 (modify-phases %standard-phases
4337 (replace 'check (lambda _ (zero? (system* "nosetests")))))))
4338 (native-inputs
4339 `(("python-nose" ,python-nose)))
4340 (home-page "http://pexpect.readthedocs.org/")
4341 (synopsis "Controlling interactive console applications")
4342 (description
4343 "Pexpect is a pure Python module for spawning child applications;
4344 controlling them; and responding to expected patterns in their output.
4345 Pexpect works like Don Libes’ Expect. Pexpect allows your script to spawn a
4346 child application and control it as if a human were typing commands.")
4347 (license license:isc)))
4348
4349 (define-public python2-pexpect
4350 (package-with-python2 python-pexpect))
4351
4352 (define-public python-setuptools-scm
4353 (package
4354 (name "python-setuptools-scm")
4355 (version "1.11.1")
4356 (source (origin
4357 (method url-fetch)
4358 (uri (pypi-uri "setuptools_scm" version))
4359 (sha256
4360 (base32
4361 "1gqr73i150yzj3mz32854vj93x07yr52kn8fdckwa41ll8wgficc"))))
4362 (build-system python-build-system)
4363 (home-page "https://github.com/pypa/setuptools_scm/")
4364 (synopsis "Manage Python package versions in SCM metadata")
4365 (description
4366 "Setuptools_scm handles managing your Python package versions in
4367 @dfn{software configuration management} (SCM) metadata instead of declaring
4368 them as the version argument or in a SCM managed file.")
4369 (license license:expat)))
4370
4371 (define-public python2-setuptools-scm
4372 (package-with-python2 python-setuptools-scm))
4373
4374 (define-public python-pathpy
4375 (package
4376 (name "python-pathpy")
4377 (version "8.1.1")
4378 (source
4379 (origin
4380 (method url-fetch)
4381 (uri (string-append "https://pypi.python.org/packages/source/p/"
4382 "path.py/path.py-" version ".tar.gz"))
4383 (sha256
4384 (base32 "1p8s1l2vfkqhqxdhqlj0g1jjw4f1as2frr35sjcpjjpd5a89y41f"))))
4385 (build-system python-build-system)
4386 (propagated-inputs
4387 `(("python-appdirs" ,python-appdirs)))
4388 (native-inputs
4389 `(("python-setuptools-scm" ,python-setuptools-scm)
4390 ("python-pytest" ,python-pytest)
4391 ("python-pytest-runner" ,python-pytest-runner)))
4392 (home-page "http://github.com/jaraco/path.py")
4393 (synopsis "Python module wrapper for built-in os.path")
4394 (description
4395 "@code{path.py} implements path objects as first-class entities, allowing
4396 common operations on files to be invoked on those path objects directly.")
4397 (license license:expat)))
4398
4399 (define-public python2-pathpy
4400 (package-with-python2 python-pathpy))
4401
4402 (define-public python-pickleshare
4403 (package
4404 (name "python-pickleshare")
4405 (version "0.5")
4406 (source
4407 (origin
4408 (method url-fetch)
4409 (uri (string-append "https://pypi.python.org/packages/source/p/"
4410 "pickleshare/pickleshare-" version ".tar.gz"))
4411 (sha256
4412 (base32 "11ljr90j3p6qswdrbl7p4cjb2i93f6vn0vx9anzpshsx0d2mggn0"))))
4413 (build-system python-build-system)
4414 (propagated-inputs
4415 `(("python-pathpy" ,python-pathpy)))
4416 (home-page "https://github.com/vivainio/pickleshare")
4417 (synopsis "Tiny key value database with concurrency support")
4418 (description
4419 "PickleShare is a small ‘shelve’-like datastore with concurrency support.
4420 Like shelve, a PickleShareDB object acts like a normal dictionary. Unlike
4421 shelve, many processes can access the database simultaneously. Changing a
4422 value in database is immediately visible to other processes accessing the same
4423 database. Concurrency is possible because the values are stored in separate
4424 files. Hence the “database” is a directory where all files are governed by
4425 PickleShare.")
4426 (license license:expat)))
4427
4428 (define-public python2-pickleshare
4429 (package-with-python2 python-pickleshare))
4430
4431 (define-public python-simplegeneric
4432 (package
4433 (name "python-simplegeneric")
4434 (version "0.8.1")
4435 (source
4436 (origin
4437 (method url-fetch)
4438 (uri (string-append "https://pypi.python.org/packages/source/s/"
4439 "simplegeneric/simplegeneric-" version ".zip"))
4440 (sha256
4441 (base32 "0wwi1c6md4vkbcsfsf8dklf3vr4mcdj4mpxkanwgb6jb1432x5yw"))))
4442 (build-system python-build-system)
4443 (native-inputs
4444 `(("unzip" ,unzip)))
4445 (home-page "http://cheeseshop.python.org/pypi/simplegeneric")
4446 (synopsis "Python module for simple generic functions")
4447 (description
4448 "The simplegeneric module lets you define simple single-dispatch generic
4449 functions, akin to Python’s built-in generic functions like @code{len()},
4450 @code{iter()} and so on. However, instead of using specially-named methods,
4451 these generic functions use simple lookup tables, akin to those used by
4452 e.g. @code{pickle.dump()} and other generic functions found in the Python
4453 standard library.")
4454 (license license:zpl2.1)))
4455
4456 (define-public python2-simplegeneric
4457 (package-with-python2 python-simplegeneric))
4458
4459 (define-public python-ipython-genutils
4460 (package
4461 (name "python-ipython-genutils")
4462 (version "0.1.0")
4463 (source
4464 (origin
4465 (method url-fetch)
4466 (uri (string-append "https://pypi.python.org/packages/source/i/"
4467 "ipython_genutils/ipython_genutils-"
4468 version ".tar.gz"))
4469 (sha256
4470 (base32 "19l2pp1c64ansr89l3cqh19jdi2ixhssdzx0vz4n6r52a6i281is"))))
4471 (build-system python-build-system)
4472 (arguments `(#:tests? #f)) ; no tests
4473 (home-page "http://ipython.org")
4474 (synopsis "Vestigial utilities from IPython")
4475 (description
4476 "This package provides retired utilities from IPython.")
4477 (license license:bsd-3)))
4478
4479 (define-public python2-ipython-genutils
4480 (package-with-python2 python-ipython-genutils))
4481
4482 (define-public python-traitlets
4483 (package
4484 (name "python-traitlets")
4485 (version "4.2.0")
4486 (source
4487 (origin
4488 (method url-fetch)
4489 (uri (pypi-uri "traitlets" version))
4490 (sha256
4491 (base32
4492 "1afy08sa5n9gnkvh3da49c16zkyv598vchv0p1hp7zzjy8895hz4"))))
4493 (build-system python-build-system)
4494 (arguments
4495 `(#:phases
4496 (modify-phases %standard-phases
4497 (replace 'check (lambda _ (zero? (system* "nosetests")))))))
4498 (propagated-inputs
4499 `(("python-ipython-genutils" ,python-ipython-genutils)
4500 ("python-decorator" ,python-decorator)))
4501 (native-inputs
4502 `(("python-mock" ,python-mock)
4503 ("python-nose" ,python-nose)))
4504 (home-page "http://ipython.org")
4505 (synopsis "Configuration system for Python applications")
4506 (description
4507 "Traitlets is a framework that lets Python classes have attributes with
4508 type checking, dynamically calculated default values, and ‘on change’
4509 callbacks. The package also includes a mechanism to use traitlets for
4510 configuration, loading values from files or from command line arguments. This
4511 is a distinct layer on top of traitlets, so you can use traitlets in your code
4512 without using the configuration machinery.")
4513 (license license:bsd-3)))
4514
4515 (define-public python2-traitlets
4516 (package-with-python2 python-traitlets))
4517
4518 (define-public python-jupyter-core
4519 (package
4520 (name "python-jupyter-core")
4521 (version "4.2.0")
4522 (source
4523 (origin
4524 (method url-fetch)
4525 (uri (string-append (pypi-uri "jupyter_core" version)))
4526 (sha256
4527 (base32
4528 "177d9csqldzhsh6xs1p4nf6lzvhzyg6gklqjf69lxgxyadx87v24"))))
4529 (build-system python-build-system)
4530 ;; FIXME: not sure how to run the tests
4531 (arguments `(#:tests? #f))
4532 (propagated-inputs
4533 `(("python-traitlets" ,python-traitlets)))
4534 (home-page "http://jupyter.org/")
4535 (synopsis "Jupyter base package")
4536 (description
4537 "Jupyter core is the base package on which Jupyter projects rely.")
4538 (license license:bsd-3)))
4539
4540 (define-public python2-jupyter-core
4541 (package-with-python2 python-jupyter-core))
4542
4543 (define-public python-jupyter-client
4544 (package
4545 (name "python-jupyter-client")
4546 (version "4.4.0")
4547 (source
4548 (origin
4549 (method url-fetch)
4550 (uri (pypi-uri "jupyter_client" version))
4551 (sha256
4552 (base32
4553 "1vjjrpjw7k5sh982pbjnslv7byfbfazjw9g92jvs7dz5qbx556n9"))))
4554 (build-system python-build-system)
4555 ;; Tests fail because of missing native python kernel which I assume is
4556 ;; provided by the ipython package, which we cannot use because it would
4557 ;; cause a dependency cycle.
4558 (arguments `(#:tests? #f))
4559 (propagated-inputs
4560 `(("python-pyzmq" ,python-pyzmq)
4561 ("python-traitlets" ,python-traitlets)
4562 ("python-jupyter-core" ,python-jupyter-core)))
4563 (home-page "http://jupyter.org/")
4564 (synopsis "Jupyter protocol implementation and client libraries")
4565 (description
4566 "The @code{jupyter_client} package contains the reference implementation
4567 of the Jupyter protocol. It also provides client and kernel management APIs
4568 for working with kernels, and the @code{jupyter kernelspec} entrypoint for
4569 installing @code{kernelspec}s for use with Jupyter frontends.")
4570 (license license:bsd-3)))
4571
4572 (define-public python2-jupyter-client
4573 (package-with-python2 python-jupyter-client))
4574
4575 (define-public python-ipykernel
4576 (package
4577 (name "python-ipykernel")
4578 (version "4.5.0")
4579 (source
4580 (origin
4581 (method url-fetch)
4582 (uri (pypi-uri "ipykernel" version))
4583 (sha256
4584 (base32 "15c2bp1x3i6s4xb7vz7742h3kmvdfdfn9n2haywm3mwgvf77jni4"))))
4585 (build-system python-build-system)
4586 ;; The tests load a submodule of IPython. However, IPython itself depends
4587 ;; on ipykernel.
4588 (arguments `(#:tests? #f))
4589 (propagated-inputs
4590 ;; imported at runtime during connect
4591 `(("python-jupyter-client" ,python-jupyter-client)))
4592 (home-page "http://ipython.org")
4593 (synopsis "IPython Kernel for Jupyter")
4594 (description
4595 "This package provides the IPython kernel for Jupyter.")
4596 (license license:bsd-3)))
4597
4598 (define-public python2-ipykernel
4599 (package-with-python2 python-ipykernel))
4600
4601 (define-public python-testpath
4602 (package
4603 (name "python-testpath")
4604 (version "0.2")
4605 (source
4606 (origin
4607 (method url-fetch)
4608 (uri (string-append "https://github.com/jupyter/testpath/archive/"
4609 version ".tar.gz"))
4610 (file-name (string-append name "-" version ".tar.gz"))
4611 (sha256
4612 (base32
4613 "04kh3fgvmqz6cfcw79q70qwjz7ib7lxm27cc548iy2rpr33qqf55"))))
4614 (build-system python-build-system)
4615 (arguments
4616 `(#:tests? #f ; this package does not even have a setup.py
4617 #:phases
4618 (modify-phases %standard-phases
4619 (delete 'install)
4620 (replace 'build
4621 (lambda* (#:key inputs outputs #:allow-other-keys)
4622 (let ((dir (string-append
4623 (assoc-ref outputs "out")
4624 "/lib/python"
4625 (string-take (string-take-right
4626 (assoc-ref inputs "python") 5) 3)
4627 "/site-packages/testpath")))
4628 (mkdir-p dir)
4629 (copy-recursively "testpath" dir))
4630 #t)))))
4631 (home-page "https://github.com/takluyver/testpath")
4632 (synopsis "Test utilities for code working with files and commands")
4633 (description
4634 "Testpath is a collection of utilities for Python code working with files
4635 and commands. It contains functions to check things on the filesystem, and
4636 tools for mocking system commands and recording calls to those.")
4637 (license license:expat)))
4638
4639 (define-public python2-testpath
4640 (package-with-python2 python-testpath))
4641
4642 (define-public python-ipython
4643 (package
4644 (name "python-ipython")
4645 (version "4.0.0")
4646 (source
4647 (origin
4648 (method url-fetch)
4649 (uri (pypi-uri "ipython" version ".tar.gz"))
4650 (sha256
4651 (base32 "1npl8g6bfsff9j938ypx0q5fyzy2l8lp0jl8skjjj2zv0z27dlig"))))
4652 (build-system python-build-system)
4653 (outputs '("out" "doc"))
4654 (propagated-inputs
4655 `(("python-pyzmq" ,python-pyzmq)
4656 ("python-terminado" ,python-terminado)
4657 ("python-matplotlib" ,python-matplotlib)
4658 ("python-numpy" ,python-numpy)
4659 ("python-numpydoc" ,python-numpydoc)
4660 ("python-jinja2" ,python-jinja2)
4661 ("python-mistune" ,python-mistune)
4662 ("python-pexpect" ,python-pexpect)
4663 ("python-pickleshare" ,python-pickleshare)
4664 ("python-simplegeneric" ,python-simplegeneric)
4665 ("python-jsonschema" ,python-jsonschema)
4666 ("python-traitlets" ,python-traitlets)
4667 ("python-ipykernel" ,python-ipykernel)
4668 ("python-pygments" ,python-pygments)))
4669 (inputs
4670 `(("readline" ,readline)
4671 ("which" ,which)))
4672 (native-inputs
4673 `(("pkg-config" ,pkg-config)
4674 ("python-requests" ,python-requests) ;; for tests
4675 ("python-testpath" ,python-testpath)
4676 ("python-nose" ,python-nose)
4677 ("python-sphinx" ,python-sphinx)
4678 ("texlive" ,texlive)
4679 ("texinfo" ,texinfo)))
4680 (arguments
4681 `(#:phases
4682 (modify-phases %standard-phases
4683 (add-after
4684 'install 'install-doc
4685 (lambda* (#:key inputs outputs #:allow-other-keys)
4686 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4687 (doc (string-append data "/doc/" ,name "-" ,version))
4688 (html (string-append doc "/html"))
4689 (man1 (string-append data "/man/man1"))
4690 (info (string-append data "/info"))
4691 (examples (string-append doc "/examples")))
4692 (setenv "LANG" "en_US.utf8")
4693 (with-directory-excursion "docs"
4694 ;; FIXME: pdf fails to build
4695 ;;(system* "make" "pdf" "PAPER=a4")
4696 (system* "make" "html")
4697 (system* "make" "info"))
4698 (copy-recursively "docs/man" man1)
4699 (copy-recursively "examples" examples)
4700 (copy-recursively "docs/build/html" html)
4701 ;; (copy-file "docs/build/latex/ipython.pdf"
4702 ;; (string-append doc "/ipython.pdf"))
4703 (mkdir-p info)
4704 (copy-file "docs/build/texinfo/ipython.info"
4705 (string-append info "/ipython.info"))
4706 (copy-file "COPYING.rst" (string-append doc "/COPYING.rst")))))
4707 ;; Tests can only be run after the library has been installed and not
4708 ;; within the source directory.
4709 (delete 'check)
4710 (add-after
4711 'install 'check
4712 (lambda* (#:key outputs tests? #:allow-other-keys)
4713 (if tests?
4714 (with-directory-excursion "/tmp"
4715 (setenv "HOME" "/tmp/") ;; required by a test
4716 (zero? (system* (string-append (assoc-ref outputs "out")
4717 "/bin/iptest"))))
4718 #t)))
4719 (add-before
4720 'install 'fix-tests
4721 (lambda* (#:key inputs #:allow-other-keys)
4722 (substitute* "./IPython/utils/_process_posix.py"
4723 (("/usr/bin/env', 'which") (which "which")))
4724 (substitute* "./IPython/core/tests/test_inputtransformer.py"
4725 (("#!/usr/bin/env python")
4726 (string-append "#!" (which "python"))))
4727 ;; Disable 1 failing test
4728 (substitute* "./IPython/core/tests/test_magic.py"
4729 (("def test_dirops\\(\\):" all)
4730 (string-append "@dec.skipif(True)\n" all))))))))
4731 (home-page "http://ipython.org")
4732 (synopsis "IPython is a tool for interactive computing in Python")
4733 (description
4734 "IPython provides a rich architecture for interactive computing with:
4735 Powerful interactive shells, a browser-based notebook, support for interactive
4736 data visualization, embeddable interpreters and tools for parallel
4737 computing.")
4738 (license license:bsd-3)
4739 (properties `((python2-variant . ,(delay python2-ipython))))))
4740
4741 (define-public python2-ipython
4742 (let ((ipython (package-with-python2 (strip-python2-variant python-ipython))))
4743 (package
4744 (inherit ipython)
4745 ;; FIXME: some tests are failing
4746 (arguments
4747 `(#:tests? #f ,@(package-arguments ipython)))
4748 ;; FIXME: add pyreadline once available.
4749 (inputs
4750 `(("python2-mock" ,python2-mock)
4751 ,@(package-inputs ipython))))))
4752
4753 (define-public python-isodate
4754 (package
4755 (name "python-isodate")
4756 (version "0.5.4")
4757 (source
4758 (origin
4759 (method url-fetch)
4760 (uri (pypi-uri "isodate" version))
4761 (sha256
4762 (base32
4763 "0cafaiwixgpxwh9dsd28qb0dbzsj6xpxjdkyk30ns91ps10mq422"))))
4764 (build-system python-build-system)
4765 (home-page
4766 "http://cheeseshop.python.org/pypi/isodate")
4767 (synopsis
4768 "Python date parser and formatter")
4769 (description
4770 "Python-isodate is a python module for parsing and formatting
4771 ISO 8601 dates, time and duration.")
4772 (license license:bsd-3)))
4773
4774 (define-public python2-isodate
4775 (package-with-python2 python-isodate))
4776
4777 (define-public python-html5lib
4778 (package
4779 (name "python-html5lib")
4780 (version "1.0b8")
4781 (source
4782 (origin
4783 (method url-fetch)
4784 (uri (pypi-uri "html5lib" version))
4785 (sha256
4786 (base32
4787 "1lknq5j3nh11xrl268ks76zaj0gyzh34v94n5vbf6dk8llzxdx0q"))))
4788 (build-system python-build-system)
4789 (propagated-inputs
4790 `(("python-six" ,python-six))) ; required to "import html5lib"
4791 (arguments
4792 `(#:test-target "check"))
4793 (home-page
4794 "https://github.com/html5lib/html5lib-python")
4795 (synopsis
4796 "Python HTML parser based on the WHATWG HTML specifcation")
4797 (description
4798 "Html5lib is an HTML parser based on the WHATWG HTML specifcation
4799 and written in Python.")
4800 (license license:expat)))
4801
4802 (define-public python2-html5lib
4803 (package-with-python2 python-html5lib))
4804
4805 ;; Needed for python-bleach, a dependency of python-notebook
4806 (define-public python-html5lib-0.9
4807 (package
4808 (inherit python-html5lib)
4809 (version "0.999")
4810 (source
4811 (origin
4812 (method url-fetch)
4813 (uri (pypi-uri "html5lib" version))
4814 (sha256
4815 (base32
4816 "17n4zfsj6ynmbwdwviywmj8r6nzr3xvfx2zs0xhndmvm51z7z263"))))))
4817
4818 (define-public python2-html5lib-0.9
4819 (package-with-python2 python-html5lib-0.9))
4820
4821 (define-public python-urwid
4822 (package
4823 (name "python-urwid")
4824 (version "1.3.1")
4825 (source
4826 (origin
4827 (method url-fetch)
4828 (uri (pypi-uri "urwid" version))
4829 (sha256
4830 (base32
4831 "18cnd1wdjcas08x5qwa5ayw6jsfcn33w4d9f7q3s29fy6qzc1kng"))))
4832 (build-system python-build-system)
4833 (arguments
4834 `(#:phases
4835 (modify-phases %standard-phases
4836 ;; Disable failing test. Bug filed upstream:
4837 ;; https://github.com/wardi/urwid/issues/164
4838 ;; TODO: check again for python-urwid > 1.3.1 or python > 3.4.3.
4839 (add-after 'unpack 'disable-failing-test
4840 (lambda _
4841 (substitute* "urwid/tests/test_event_loops.py"
4842 (("test_remove_watch_file")
4843 "disable_remove_watch_file")))))))
4844 (home-page "http://urwid.org")
4845 (synopsis "Console user interface library for Python")
4846 (description
4847 "Urwid is a curses-based UI/widget library for Python. It includes many
4848 features useful for text console applications.")
4849 (license license:lgpl2.1+)))
4850
4851 (define-public python2-urwid
4852 (package-with-python2 python-urwid))
4853
4854 (define-public python-urwidtrees
4855 (package
4856 (name "python-urwidtrees")
4857 (version "1.0.2")
4858 (source
4859 (origin
4860 (method url-fetch)
4861 ;; package author intends on distributing via github rather than pypi:
4862 ;; https://github.com/pazz/alot/issues/877#issuecomment-230173331
4863 (uri (string-append "https://github.com/pazz/urwidtrees/archive/"
4864 version ".tar.gz"))
4865 (file-name (string-append name "-" version ".tar.gz"))
4866 (sha256
4867 (base32
4868 "0d30lyd3s2a97rhqfax5w9ssqds2z6aydqx3c6j2c2lk3cb4ngvh"))))
4869 (build-system python-build-system)
4870 (arguments
4871 '(#:tests? #f)) ; no tests
4872 (propagated-inputs `(("python-urwid" ,python-urwid)))
4873 (home-page "https://github.com/pazz/urwidtrees")
4874 (synopsis "Tree widgets for urwid")
4875 (description "Urwidtrees is a Widget Container API for the @code{urwid}
4876 toolkit. Use it to build trees of widgets.")
4877 (license license:gpl3+)))
4878
4879 (define-public python2-urwidtrees
4880 (package-with-python2 python-urwidtrees))
4881
4882 (define-public python-dbus
4883 (package
4884 (name "python-dbus")
4885 (version "1.2.0")
4886 (source
4887 (origin
4888 (method url-fetch)
4889 (uri (string-append
4890 "https://dbus.freedesktop.org/releases/dbus-python/dbus-python-"
4891 version ".tar.gz"))
4892 (sha256
4893 (base32 "1py62qir966lvdkngg0v8k1khsqxwk5m4s8nflpk1agk5f5nqb71"))))
4894 (build-system gnu-build-system)
4895 (arguments
4896 '(#:phases
4897 (modify-phases %standard-phases
4898 (add-before
4899 'check 'pre-check
4900 (lambda _
4901 ;; XXX: For the missing '/etc/machine-id'.
4902 (substitute* "test/run-test.sh"
4903 (("DBUS_FATAL_WARNINGS=1")
4904 "DBUS_FATAL_WARNINGS=0"))
4905 #t)))))
4906 (native-inputs
4907 `(("pkg-config" ,pkg-config)))
4908 (inputs
4909 `(("python" ,python)
4910 ("dbus-glib" ,dbus-glib)))
4911 (synopsis "Python bindings for D-bus")
4912 (description "python-dbus provides bindings for libdbus, the reference
4913 implementation of D-Bus.")
4914 (home-page "http://www.freedesktop.org/wiki/Software/DBusBindings/")
4915 (license license:expat)))
4916
4917 (define-public python2-dbus
4918 (package (inherit python-dbus)
4919 (name "python2-dbus")
4920 (inputs `(("python" ,python-2)
4921 ,@(alist-delete "python"
4922 (package-inputs python-dbus)
4923 equal?)))
4924 ;; FIXME: on Python 2, the test_utf8 fails with:
4925 ;; "ValueError: unichr() arg not in range(0x10000) (narrow Python build)"
4926 (arguments `(#:tests? #f))))
4927
4928 (define-public python-apsw
4929 (package
4930 (name "python-apsw")
4931 (version "3.9.2-r1")
4932 (source
4933 (origin
4934 (method url-fetch)
4935 (uri (pypi-uri "apsw" version))
4936 (sha256
4937 (base32
4938 "0w4jb0wpx785qw42r3h4fh7gl5w2968q48i7gygybsfxck8nzffs"))))
4939 (build-system python-build-system)
4940 (inputs
4941 `(("sqlite" ,sqlite)))
4942 (arguments
4943 `(#:phases
4944 ;; swap check and install phases
4945 (alist-cons-after
4946 'install 'check
4947 (assoc-ref %standard-phases 'check)
4948 (alist-delete
4949 'check
4950 %standard-phases))))
4951 (home-page "https://github.com/rogerbinns/apsw/")
4952 (synopsis "Another Python SQLite Wrapper")
4953 (description "APSW is a Python wrapper for the SQLite
4954 embedded relational database engine. In contrast to other wrappers such as
4955 pysqlite it focuses on being a minimal layer over SQLite attempting just to
4956 translate the complete SQLite API into Python.")
4957 (license license:zlib)))
4958
4959 (define-public python2-apsw
4960 (package-with-python2 python-apsw))
4961
4962 (define-public python-lxml
4963 (package
4964 (name "python-lxml")
4965 (version "3.6.0")
4966 (source
4967 (origin
4968 (method url-fetch)
4969 (uri (pypi-uri "lxml" version))
4970 (sha256
4971 (base32
4972 "1pvbmiy2m7jwv493kilbghhj2pkh8wy1na3ji350vhzhlwlclx4w"))))
4973 (build-system python-build-system)
4974 (inputs
4975 `(("libxml2" ,libxml2)
4976 ("libxslt" ,libxslt)))
4977 (home-page "http://lxml.de/")
4978 (synopsis
4979 "Python XML processing library")
4980 (description
4981 "The lxml XML toolkit is a Pythonic binding for the C libraries
4982 libxml2 and libxslt.")
4983 (license license:bsd-3))) ; and a few more, see LICENSES.txt
4984
4985 (define-public python2-lxml
4986 (package-with-python2 python-lxml))
4987
4988 ;; beautifulsoup4 has a totally different namespace than 3.x,
4989 ;; and pypi seems to put it under its own name, so I guess we should too
4990 (define-public python-beautifulsoup4
4991 (package
4992 (name "python-beautifulsoup4")
4993 (version "4.5.1")
4994 (source
4995 (origin
4996 (method url-fetch)
4997 (uri (pypi-uri "beautifulsoup4" version))
4998 (sha256
4999 (base32
5000 "1qgmhw65ncsgccjhslgkkszif47q6gvxwqv4mim17agxd81p951w"))))
5001 (build-system python-build-system)
5002 (arguments
5003 `(#:phases
5004 (modify-phases %standard-phases
5005 ;; The Python 2 source is the definitive source of beautifulsoup4. We
5006 ;; must use this conversion script when building with Python 3. The
5007 ;; conversion script also runs the tests.
5008 ;; For more information, see the file 'convert-py3k' in the source
5009 ;; distribution.
5010 (replace 'check
5011 (lambda _ (zero? (system* "./convert-py3k")))))))
5012 (home-page
5013 "http://www.crummy.com/software/BeautifulSoup/bs4/")
5014 (synopsis
5015 "Python screen-scraping library")
5016 (description
5017 "Beautiful Soup is a Python library designed for rapidly setting up
5018 screen-scraping projects. It offers Pythonic idioms for navigating,
5019 searching, and modifying a parse tree, providing a toolkit for
5020 dissecting a document and extracting what you need. It automatically
5021 converts incoming documents to Unicode and outgoing documents to UTF-8.")
5022 (license license:expat)))
5023
5024 (define-public python2-beautifulsoup4
5025 (package
5026 (inherit (package-with-python2
5027 (strip-python2-variant python-beautifulsoup4)))
5028 (arguments `(#:python ,python-2))))
5029
5030 (define-public python2-cssutils
5031 (package
5032 (name "python2-cssutils")
5033 (version "1.0.1")
5034 (source
5035 (origin
5036 (method url-fetch)
5037 (uri (pypi-uri "cssutils" version))
5038 (sha256
5039 (base32
5040 "0qwha9x1wml2qmipbcz03gndnlwhzrjdvw9i09si247a90l8p8fq"))))
5041 (build-system python-build-system)
5042 (native-inputs
5043 `(("python2-mock" ,python2-mock) ; for the tests
5044 ("unzip" ,unzip))) ; for unpacking the source
5045 (arguments
5046 `(#:python ,python-2 ; Otherwise tests fail with a syntax error.
5047 #:tests? #f ; The tests apparently download an external URL.
5048 ))
5049 (home-page "http://cthedot.de/cssutils/")
5050 (synopsis
5051 "CSS Cascading Style Sheets library for Python")
5052 (description
5053 "Cssutils is a Python package for parsing and building CSS
5054 Cascading Style Sheets. Currently it provides a DOM only and no rendering
5055 options.")
5056 (license license:lgpl3+)))
5057
5058 (define-public python-cssselect
5059 (package
5060 (name "python-cssselect")
5061 (version "0.9.2")
5062 (source
5063 (origin
5064 (method url-fetch)
5065 (uri (pypi-uri "cssselect" version))
5066 (sha256
5067 (base32
5068 "1xg6gbva1yswghiycmgincv6ab4bn7hpm720ndbj40h8xycmnfvi"))))
5069 (build-system python-build-system)
5070 (arguments
5071 ;; tests fail with message
5072 ;; AttributeError: 'module' object has no attribute 'tests'
5073 `(#:tests? #f))
5074 (home-page
5075 "https://pythonhosted.org/cssselect/")
5076 (synopsis
5077 "CSS3 selector parser and translator to XPath 1.0")
5078 (description
5079 "Cssselect ia a Python module that parses CSS3 Selectors and translates
5080 them to XPath 1.0 expressions. Such expressions can be used in lxml or
5081 another XPath engine to find the matching elements in an XML or HTML document.")
5082 (license license:bsd-3)))
5083
5084 (define-public python2-cssselect
5085 (package-with-python2 python-cssselect))
5086
5087 (define-public python-netifaces
5088 (package
5089 (name "python-netifaces")
5090 (version "0.10.4")
5091 (source
5092 (origin
5093 (method url-fetch)
5094 (uri (string-append
5095 "https://pypi.python.org/packages/source/n/netifaces/netifaces-"
5096 version
5097 ".tar.gz"))
5098 (sha256
5099 (base32
5100 "1plw237a4zib4z8s62g0mrs8gm3kjfrp5sxh6bbk9nl3rdls2mln"))))
5101 (build-system python-build-system)
5102 (home-page
5103 "https://bitbucket.org/al45tair/netifaces")
5104 (synopsis
5105 "Python module for portable network interface information")
5106 (description
5107 "Netifaces is a Python module providing information on network
5108 interfaces in an easy and portable manner.")
5109 (license license:expat)))
5110
5111 (define-public python2-netifaces
5112 (package-with-python2 python-netifaces))
5113
5114 (define-public python-networkx
5115 (package
5116 (name "python-networkx")
5117 (version "1.11")
5118 (source
5119 (origin
5120 (method url-fetch)
5121 (uri (pypi-uri "networkx" version))
5122 (sha256
5123 (base32 "1f74s56xb4ggixiq0vxyfxsfk8p20c7a099lpcf60izv1php03hd"))))
5124 (build-system python-build-system)
5125 ;; python-decorator is needed at runtime
5126 (propagated-inputs
5127 `(("python-decorator" ,python-decorator)))
5128 (native-inputs
5129 `(("python-nose" ,python-nose)))
5130 (home-page "http://networkx.github.io/")
5131 (synopsis "Python module for creating and manipulating graphs and networks")
5132 (description
5133 "NetworkX is a Python package for the creation, manipulation, and study
5134 of the structure, dynamics, and functions of complex networks.")
5135 (license license:bsd-3)))
5136
5137 (define-public python2-networkx
5138 (package-with-python2 python-networkx))
5139
5140 (define-public snakemake
5141 (package
5142 (name "snakemake")
5143 (version "3.2.1")
5144 (source
5145 (origin
5146 (method url-fetch)
5147 (uri (string-append
5148 "https://pypi.python.org/packages/source/s/snakemake/snakemake-"
5149 version ".tar.gz"))
5150 (sha256
5151 (base32 "0fi4b63sj60hvi7rfydvmz2icl4wj74djw5sn2gl8hxd02qw4b91"))))
5152 (build-system python-build-system)
5153 (home-page "https://bitbucket.org/johanneskoester/snakemake")
5154 (synopsis "Python-based execution environment for make-like workflows")
5155 (description
5156 "Snakemake aims to reduce the complexity of creating workflows by
5157 providing a clean and modern domain specific specification language (DSL) in
5158 Python style, together with a fast and comfortable execution environment.")
5159 (license license:expat)))
5160
5161 (define-public python-seaborn
5162 (package
5163 (name "python-seaborn")
5164 (version "0.7.0")
5165 (source
5166 (origin
5167 (method url-fetch)
5168 (uri (pypi-uri "seaborn" version))
5169 (sha256
5170 (base32 "0ibi3xsfm2kysph61mnfy0pf8d5rkgxgrdb0z9nbizgcgdsb5a0m"))))
5171 (build-system python-build-system)
5172 (propagated-inputs
5173 `(("python-pandas" ,python-pandas)
5174 ("python-matplotlib" ,python-matplotlib)
5175 ("python-scipy" ,python-scipy)))
5176 (home-page "http://stanford.edu/~mwaskom/software/seaborn/")
5177 (synopsis "Statistical data visualization")
5178 (description
5179 "Seaborn is a library for making attractive and informative statistical
5180 graphics in Python. It is built on top of matplotlib and tightly integrated
5181 with the PyData stack, including support for numpy and pandas data structures
5182 and statistical routines from scipy and statsmodels.")
5183 (license license:bsd-3)
5184 (properties `((python2-variant . ,(delay python2-seaborn))))))
5185
5186 (define-public python2-seaborn
5187 (let ((base (package-with-python2 (strip-python2-variant python-seaborn))))
5188 (package
5189 (inherit base)
5190 (propagated-inputs `(("python2-pytz" ,python2-pytz)
5191 ,@(package-propagated-inputs base))))))
5192
5193 (define-public python-sympy
5194 (package
5195 (name "python-sympy")
5196 (version "0.7.6")
5197 (source
5198 (origin
5199 (method url-fetch)
5200 (uri (string-append
5201 "https://github.com/sympy/sympy/releases/download/sympy-"
5202 version "/sympy-" version ".tar.gz"))
5203 (sha256
5204 (base32 "19yp0gy4i7p4g6l3b8vaqkj9qj7yqb5kqy0qgbdagpzgkdz958yz"))))
5205 (build-system python-build-system)
5206 (home-page "http://www.sympy.org/")
5207 (synopsis "Python library for symbolic mathematics")
5208 (description
5209 "SymPy is a Python library for symbolic mathematics. It aims to become a
5210 full-featured computer algebra system (CAS) while keeping the code as simple
5211 as possible in order to be comprehensible and easily extensible.")
5212 (license license:bsd-3)))
5213
5214 (define-public python2-sympy
5215 (package-with-python2 python-sympy))
5216
5217 (define-public python-q
5218 (package
5219 (name "python-q")
5220 (version "2.6")
5221 (source
5222 (origin
5223 (method url-fetch)
5224 (uri (pypi-uri "q" version))
5225 (sha256
5226 (base32
5227 "1mgfazh8fkizh6walra2zv885f3lcgr3nb02v1frfm4p8ddcy3yy"))))
5228 (build-system python-build-system)
5229 (home-page "https://github.com/zestyping/q")
5230 (synopsis "Quick-and-dirty debugging output for tired programmers")
5231 (description
5232 "q is a Python module for \"print\" style of debugging Python code. It
5233 provides convenient short API for print out of values, tracebacks, and
5234 falling into the Python interpreter.")
5235 (license license:asl2.0)))
5236
5237 (define-public python2-q
5238 (package-with-python2 python-q))
5239
5240 (define-public python-testlib
5241 (package
5242 (name "python-testlib")
5243 (version "0.6.5")
5244 (source
5245 (origin
5246 (method url-fetch)
5247 (uri (string-append
5248 "https://pypi.python.org/packages/source/t/testlib/testlib-"
5249 version ".zip"))
5250 (sha256
5251 (base32 "1mz26cxn4x8bbgv0rn0mvj2z05y31rkc8009nvdlb3lam5b4mj3y"))))
5252 (build-system python-build-system)
5253 (native-inputs
5254 `(("unzip" ,unzip)))
5255 (arguments
5256 `(#:phases
5257 (alist-replace
5258 'unpack
5259 (lambda* (#:key inputs outputs #:allow-other-keys)
5260 (let ((unzip (string-append (assoc-ref inputs "unzip")
5261 "/bin/unzip"))
5262 (source (assoc-ref inputs "source")))
5263 (and (zero? (system* unzip source))
5264 (chdir (string-append "testlib-" ,version)))))
5265 %standard-phases)))
5266 (synopsis "Python micro test suite harness")
5267 (description "A micro unittest suite harness for Python.")
5268 (home-page "https://github.com/trentm/testlib")
5269 (license license:expat)))
5270
5271 (define-public python2-testlib
5272 (package-with-python2 python-testlib))
5273
5274 (define-public python2-xlib
5275 (package
5276 (name "python2-xlib")
5277 (version "0.14")
5278 (source (origin
5279 (method url-fetch)
5280 (uri (string-append "mirror://sourceforge/python-xlib/python-xlib"
5281 "/" version "/"
5282 "python-xlib-" version ".tar.gz"))
5283 (sha256
5284 (base32
5285 "1sv0447j0rx8cgs3jhjl695p5pv13ihglcjlrrz1kq05lsvb0wa7"))))
5286 (build-system python-build-system)
5287 (arguments
5288 `(#:python ,python-2 ;Python 2 only
5289 #:tests? #f)) ;no tests
5290 (home-page "http://python-xlib.sourceforge.net/")
5291 (synopsis "Python X11 client library")
5292 (description
5293 "The Python X Library is intended to be a fully functional X client
5294 library for Python programs. It is useful to implement low-level X clients.
5295 It is written entirely in Python.")
5296 (license license:gpl2+)))
5297
5298 (define-public python-singledispatch
5299 (package
5300 (name "python-singledispatch")
5301 (version "3.4.0.3")
5302 (source
5303 (origin
5304 (method url-fetch)
5305 (uri (pypi-uri "singledispatch" version))
5306 (sha256
5307 (base32
5308 "171b7ip0hsq5qm83np40h3phlr36ym18w0lay0a8v08kvy3sy1jv"))))
5309 (build-system python-build-system)
5310 (inputs
5311 `(("python-six" ,python-six)))
5312 (home-page
5313 "http://docs.python.org/3/library/functools.html#functools.singledispatch")
5314 (synopsis "Backport of singledispatch feature from Python 3.4")
5315 (description
5316 "This library brings functools.singledispatch from Python 3.4 to Python
5317 2.6-3.3.")
5318 (license license:expat)))
5319
5320 (define-public python2-singledispatch
5321 (package-with-python2 python-singledispatch))
5322
5323 (define-public python-tornado
5324 (package
5325 (name "python-tornado")
5326 (version "4.3")
5327 (source
5328 (origin
5329 (method url-fetch)
5330 (uri (pypi-uri "tornado" version))
5331 (sha256
5332 (base32 "1gzgwayl6hmc9jfcl88bni4jcsk2jcca9dn1rvrfsvnijcjx7hn9"))))
5333 (build-system python-build-system)
5334 (native-inputs
5335 `(("python-certifi" ,python-certifi)))
5336 (propagated-inputs
5337 `(("python-backports-abc" ,python-backports-abc)))
5338 (home-page "http://www.tornadoweb.org/")
5339 (synopsis "Python web framework and asynchronous networking library")
5340 (description
5341 "Tornado is a Python web framework and asynchronous networking library,
5342 originally developed at FriendFeed. By using non-blocking network I/O,
5343 Tornado can scale to tens of thousands of open connections, making it ideal
5344 for long polling, WebSockets, and other applications that require a long-lived
5345 connection to each user.")
5346 (license license:asl2.0)
5347 (properties `((python2-variant . ,(delay python2-tornado))))))
5348
5349 (define-public python2-tornado
5350 (let ((tornado (package-with-python2 (strip-python2-variant python-tornado))))
5351 (package (inherit tornado)
5352 (propagated-inputs
5353 `(("python2-backport-ssl-match-hostname"
5354 ,python2-backport-ssl-match-hostname)
5355 ("python2-singledispatch" ,python2-singledispatch)
5356 ,@(package-propagated-inputs tornado))))))
5357
5358 ;; the python- version can be removed with python-3.5
5359 (define-public python-backports-abc
5360 (package
5361 (name "python-backports-abc")
5362 (version "0.4")
5363 (source
5364 (origin
5365 (method url-fetch)
5366 (uri (pypi-uri "backports_abc" version))
5367 (sha256
5368 (base32
5369 "19fh75lni9pb673n2fn505m1rckm0af0szcv5xx1qm1xpa940glb"))))
5370 (build-system python-build-system)
5371 (home-page "https://github.com/cython/backports_abc")
5372 (synopsis "Backport of additions to the 'collections.abc' module")
5373 (description
5374 "Python-backports-abc provides a backport of additions to the
5375 'collections.abc' module in Python-3.5.")
5376 (license license:psfl)))
5377
5378 (define-public python2-backports-abc
5379 (package-with-python2 python-backports-abc))
5380
5381 (define-public python-waf
5382 (package
5383 (name "python-waf")
5384 (version "1.9.5")
5385 (source (origin
5386 (method url-fetch)
5387 (uri (string-append "https://waf.io/"
5388 "waf-" version ".tar.bz2"))
5389 (sha256
5390 (base32
5391 "1sl3ipi2czds57rlzjnpdzqa0skx8asfvmh3qmibpvdwf15rpppg"))))
5392 (build-system python-build-system)
5393 (arguments
5394 '(#:phases
5395 (modify-phases %standard-phases
5396 (replace 'build
5397 (lambda _
5398 (zero? (system* "python" "waf-light" "configure" "build"))))
5399 (replace 'check
5400 (lambda _
5401 (zero? (system* "python" "waf" "--version"))))
5402 (replace 'install
5403 (lambda _
5404 (copy-file "waf" %output))))))
5405 (home-page "http://waf.io/")
5406 (synopsis "Python-based build system")
5407 (description
5408 "Waf is a Python-based framework for configuring, compiling and installing
5409 applications.")
5410 (license license:bsd-3)))
5411
5412 (define-public python2-waf
5413 (package-with-python2 python-waf))
5414
5415 (define-public python-pyzmq
5416 (package
5417 (name "python-pyzmq")
5418 (version "15.1.0")
5419 (source
5420 (origin
5421 (method url-fetch)
5422 (uri (pypi-uri "pyzmq" version))
5423 (sha256
5424 (base32 "13fhwnlvsvxv72kfhqbpn6qi7msh8mc8377mpabv32skk2cjfnxx"))))
5425 (build-system python-build-system)
5426 (arguments
5427 `(#:configure-flags
5428 (list (string-append "--zmq=" (assoc-ref %build-inputs "zeromq")))
5429 ;; FIXME: You must build pyzmq with 'python setup.py build_ext
5430 ;; --inplace' for 'python setup.py test' to work.
5431 #:tests? #f))
5432 (inputs
5433 `(("zeromq" ,zeromq)))
5434 (native-inputs
5435 `(("pkg-config" ,pkg-config)
5436 ("python-nose" ,python-nose)))
5437 (home-page "http://github.com/zeromq/pyzmq")
5438 (synopsis "Python bindings for 0MQ")
5439 (description
5440 "PyZMQ is the official Python binding for the ZeroMQ messaging library.")
5441 (license license:bsd-4)))
5442
5443 (define-public python2-pyzmq
5444 (package-with-python2 python-pyzmq))
5445
5446 (define-public python-pep8
5447 (package
5448 (name "python-pep8")
5449 (version "1.7.0")
5450 (source
5451 (origin
5452 (method url-fetch)
5453 (uri (pypi-uri "pep8" version))
5454 (sha256
5455 (base32
5456 "002rkl4lsn6x2mxmf8ar00l0m8i3mzrc6pnzz77blyksmpsxa4x1"))))
5457 (build-system python-build-system)
5458 (home-page "http://pep8.readthedocs.org/")
5459 (synopsis "Python style guide checker")
5460 (description
5461 "This tools checks Python code against some of the style conventions in
5462 PEP 8.")
5463 (license license:expat)))
5464
5465 (define-public python2-pep8
5466 (package-with-python2 python-pep8))
5467
5468 (define-public python-pyflakes
5469 (package
5470 (name "python-pyflakes")
5471 (version "1.0.0")
5472 (source
5473 (origin
5474 (method url-fetch)
5475 (uri (pypi-uri "pyflakes" version))
5476 (sha256
5477 (base32
5478 "0qs2sgqszq7wcplis8509wk2ygqcrwzbs1ghfj3svvivq2j377pk"))))
5479 (build-system python-build-system)
5480 (home-page
5481 "https://github.com/pyflakes/pyflakes")
5482 (synopsis "Passive checker of Python programs")
5483 (description
5484 "Pyflakes statically checks Python source code for common errors.")
5485 (license license:expat)))
5486
5487 (define-public python2-pyflakes
5488 (package-with-python2 python-pyflakes))
5489
5490 (define-public python-mccabe
5491 (package
5492 (name "python-mccabe")
5493 (version "0.4.0")
5494 (source
5495 (origin
5496 (method url-fetch)
5497 (uri (pypi-uri "mccabe" version))
5498 (sha256
5499 (base32
5500 "0yr08a36h8lqlif10l4xcikbbig7q8f41gqywir7rrvnv3mi4aws"))))
5501 (build-system python-build-system)
5502 (native-inputs
5503 `(("python-pytest" ,python-pytest)
5504 ("python-pytest-runner" ,python-pytest-runner)))
5505 (home-page "https://github.com/flintwork/mccabe")
5506 (synopsis "McCabe checker, plugin for flake8")
5507 (description
5508 "This package provides a Flake8 plug-in to compute the McCabe cyclomatic
5509 complexity of Python source code.")
5510 (license license:expat)))
5511
5512 (define-public python2-mccabe
5513 (package-with-python2 python-mccabe))
5514
5515 (define-public python-mccabe-0.2.1
5516 (package (inherit python-mccabe)
5517 (version "0.2.1")
5518 (source
5519 (origin
5520 (method url-fetch)
5521 (uri (pypi-uri "mccabe" version))
5522 (sha256
5523 (base32
5524 "0fi4a81kr5bcv5p4xgibqr595hyj5dafkqgsmfk96mfy8w71fajs"))))))
5525
5526 (define-public python2-mccabe-0.2.1
5527 (package-with-python2 python-mccabe-0.2.1))
5528
5529 ;; Flake8 2.4.1 requires an older version of pep8.
5530 ;; This should be removed ASAP.
5531 (define-public python-pep8-1.5.7
5532 (package (inherit python-pep8)
5533 (version "1.5.7")
5534 (source
5535 (origin
5536 (method url-fetch)
5537 (uri (string-append
5538 "https://pypi.python.org/packages/source/p/pep8/pep8-"
5539 version
5540 ".tar.gz"))
5541 (sha256
5542 (base32
5543 "12b9bbdbwnspxgak14xg58c130x2n0blxzlms5jn2dszn8qj3d0m"))))))
5544
5545 (define-public python2-pep8-1.5.7
5546 (package-with-python2 python-pep8-1.5.7))
5547
5548 ;; Flake8 2.4.1 requires an older version of pyflakes.
5549 ;; This should be removed ASAP.
5550 (define-public python-pyflakes-0.8.1
5551 (package (inherit python-pyflakes)
5552 (version "0.8.1")
5553 (source
5554 (origin
5555 (method url-fetch)
5556 (uri (string-append
5557 "https://pypi.python.org/packages/source/p/pyflakes/pyflakes-"
5558 version
5559 ".tar.gz"))
5560 (sha256
5561 (base32
5562 "0sbpq6pqm1i9wqi41mlfrsc5rk92jv4mskvlyxmnhlbdnc80ma1z"))))))
5563
5564 (define-public python2-pyflakes-0.8.1
5565 (package-with-python2 python-pyflakes-0.8.1))
5566
5567 (define-public python-flake8
5568 (package
5569 (name "python-flake8")
5570 (version "2.5.4")
5571 (source
5572 (origin
5573 (method url-fetch)
5574 (uri (pypi-uri "flake8" version))
5575 (sha256
5576 (base32
5577 "0bs9cz4fr99r2rwig1b8jwaadl1nan7kgpdzqwj0bwbckwbmh7nc"))))
5578 (build-system python-build-system)
5579 (propagated-inputs
5580 `(("python-pep8" ,python-pep8)
5581 ("python-pyflakes" ,python-pyflakes)
5582 ("python-mccabe" ,python-mccabe)))
5583 (native-inputs
5584 `(("python-mock" ,python-mock) ; TODO: only required for < 3.3
5585 ("python-nose" ,python-nose)))
5586 (home-page "https://gitlab.com/pycqa/flake8")
5587 (synopsis
5588 "The modular source code checker: pep8, pyflakes and co")
5589 (description
5590 "Flake8 is a wrapper around PyFlakes, pep8 and python-mccabe.")
5591 (license license:expat)))
5592
5593 (define-public python2-flake8
5594 (package-with-python2 python-flake8))
5595
5596 ;; This will only be needed by the python-hacking package and will not be
5597 ;; necessary once python-hacking > 0.10.2 is released.
5598 (define-public python-flake8-2.2.4
5599 (package (inherit python-flake8)
5600 (propagated-inputs
5601 `(("python-pep8" ,python-pep8-1.5.7)
5602 ("python-pyflakes" ,python-pyflakes-0.8.1)
5603 ("python-mccabe" ,python-mccabe-0.2.1)))
5604 (native-inputs
5605 `(("python-mock" ,python-mock)
5606 ("python-nose" ,python-nose)))
5607 (version "2.2.4")
5608 (source
5609 (origin
5610 (method url-fetch)
5611 (uri (pypi-uri "flake8" version))
5612 (sha256
5613 (base32
5614 "1r9wsry4va45h1rck5hxd3vzsg2q3y6lnl6pym1bxvz8ry19jwx8"))))))
5615
5616 (define-public python2-flake8-2.2.4
5617 (package-with-python2 python-flake8-2.2.4))
5618
5619 (define-public python-mistune
5620 (package
5621 (name "python-mistune")
5622 (version "0.7")
5623 (source
5624 (origin
5625 (method url-fetch)
5626 (uri (string-append
5627 "https://pypi.python.org/packages/source/m/mistune/mistune-"
5628 version
5629 ".tar.gz"))
5630 (sha256
5631 (base32
5632 "17zqjp9m4d1w3jf2rbbq5xshcw24q1vlcv24gkgfqqyyymajxahx"))))
5633 (build-system python-build-system)
5634 (native-inputs
5635 `(("python-nose" ,python-nose)
5636 ("python-cython" ,python-cython)))
5637 (home-page "https://github.com/lepture/mistune")
5638 (synopsis "Markdown parser in pure Python")
5639 (description "This package provides a fast markdown parser in pure
5640 Python.")
5641 (license license:bsd-3)))
5642
5643 (define-public python2-mistune
5644 (package-with-python2 python-mistune))
5645
5646 (define-public python-markdown
5647 (package
5648 (name "python-markdown")
5649 (version "2.6.5")
5650 (source
5651 (origin
5652 (method url-fetch)
5653 (uri (pypi-uri "Markdown" version))
5654 (sha256
5655 (base32
5656 "0q758a3fiiawr20b3hhjfs677cwj6xi284yb7xspcvv0fdicz54d"))))
5657 (build-system python-build-system)
5658 (arguments
5659 `(#:phases
5660 (modify-phases %standard-phases
5661 (replace 'check
5662 (lambda _
5663 (zero? (system* "python" "run-tests.py")))))))
5664 (native-inputs
5665 `(("python-nose" ,python-nose)
5666 ("python-pyyaml" ,python-pyyaml)))
5667 (home-page "https://pythonhosted.org/Markdown/")
5668 (synopsis "Python implementation of Markdown")
5669 (description
5670 "This package provides a Python implementation of John Gruber's
5671 Markdown. The library features international input, various Markdown
5672 extensions, and several HTML output formats. A command line wrapper
5673 markdown_py is also provided to convert Markdown files to HTML.")
5674 (license license:bsd-3)))
5675
5676 (define-public python2-markdown
5677 (package-with-python2 python-markdown))
5678
5679 (define-public python-ptyprocess
5680 (package
5681 (name "python-ptyprocess")
5682 (version "0.5")
5683 (source
5684 (origin
5685 (method url-fetch)
5686 (uri (string-append
5687 "https://pypi.python.org/packages/source/p/ptyprocess/ptyprocess-"
5688 version ".tar.gz"))
5689 (sha256
5690 (base32
5691 "0nggns5kikn32yyda2zrj1xdmh49pi3v0drggcdwljbv36r8zdyw"))))
5692 (build-system python-build-system)
5693 (native-inputs
5694 `(("python-nose" ,python-nose)))
5695 (arguments
5696 `(#:phases
5697 (modify-phases %standard-phases
5698 (replace 'check
5699 (lambda _
5700 (zero? (system* "nosetests")))))))
5701 (home-page "https://github.com/pexpect/ptyprocess")
5702 (synopsis "Run a subprocess in a pseudo terminal")
5703 (description
5704 "This package provides a Python library used to launch a subprocess in a
5705 pseudo terminal (pty), and interact with both the process and its pty.")
5706 (license license:isc)))
5707
5708 (define-public python2-ptyprocess
5709 (package-with-python2 python-ptyprocess))
5710
5711 (define-public python-terminado
5712 (package
5713 (name "python-terminado")
5714 (version "0.6")
5715 (source
5716 (origin
5717 (method url-fetch)
5718 (uri (pypi-uri "terminado" version))
5719 (sha256
5720 (base32
5721 "09h1kwi86g5mrk14s4pgbhshd602zry29lnpxamcqz864kva22rc"))))
5722 (build-system python-build-system)
5723 (propagated-inputs
5724 `(("python-tornado" ,python-tornado)
5725 ("python-ptyprocess" ,python-ptyprocess)))
5726 (native-inputs
5727 `(("python-nose" ,python-nose)))
5728 (arguments
5729 `(#:phases
5730 (modify-phases %standard-phases
5731 (replace 'check
5732 (lambda _
5733 (zero? (system* "nosetests")))))))
5734 (home-page "https://github.com/takluyver/terminado")
5735 (synopsis "Terminals served to term.js using Tornado websockets")
5736 (description "This package provides a Tornado websocket backend for the
5737 term.js Javascript terminal emulator library.")
5738 (license license:bsd-2)
5739 (properties `((python2-variant . ,(delay python2-terminado))))))
5740
5741 (define-public python2-terminado
5742 (let ((terminado (package-with-python2 (strip-python2-variant python-terminado))))
5743 (package (inherit terminado)
5744 (propagated-inputs
5745 `(("python2-backport-ssl-match-hostname"
5746 ,python2-backport-ssl-match-hostname)
5747 ,@(package-propagated-inputs terminado))))))
5748
5749 (define-public python-fonttools
5750 (package
5751 (name "python-fonttools")
5752 (version "2.5")
5753 (source (origin
5754 (method url-fetch)
5755 (uri (string-append
5756 "https://pypi.python.org/packages/source/F/FontTools/"
5757 "fonttools-" version ".tar.gz"))
5758 (sha256
5759 (base32
5760 "08ay3x4ijarwhl60gqx2i9jzq6pxs20p4snc2d1q5jagh4rn39lb"))))
5761 (build-system python-build-system)
5762 (arguments '(#:test-target "check"))
5763 (home-page "http://github.com/behdad/fonttools")
5764 (synopsis "Tools to manipulate font files")
5765 (description
5766 "FontTools/TTX is a library to manipulate font files from Python. It
5767 supports reading and writinfg of TrueType/OpenType fonts, reading and writing
5768 of AFM files, reading (and partially writing) of PS Type 1 fonts. The package
5769 also contains a tool called “TTX” which converts TrueType/OpenType fonts to and
5770 from an XML-based format.")
5771 (license (license:non-copyleft
5772 "file://LICENSE.txt"
5773 "See LICENSE.txt in the distribution."))))
5774
5775 (define-public python2-fonttools
5776 (package-with-python2 python-fonttools))
5777
5778 (define-public python-ly
5779 (package
5780 (name "python-ly")
5781 (version "0.9.4")
5782 (source
5783 (origin
5784 (method url-fetch)
5785 (uri (string-append "https://pypi.python.org/packages/57/4f/"
5786 "889579244947368f28eda66b782331b1e75f83fd72e63f9ece93cd7a18f9"
5787 "/python-ly-" version ".tar.gz"))
5788 (sha256
5789 (base32
5790 "0g6n288l83sfwavxh1aryi0aqvsr3sp7v6f903mckwqa4scpky62"))))
5791 (build-system python-build-system)
5792 (synopsis "Tool and library for manipulating LilyPond files")
5793 (description "This package provides a Python library to parse, manipulate
5794 or create documents in LilyPond format. A command line program ly is also
5795 provided that can be used to do various manipulations with LilyPond files.")
5796 (home-page "https://pypi.python.org/pypi/python-ly")
5797 (license license:gpl2+)))
5798
5799 (define-public python-appdirs
5800 (package
5801 (name "python-appdirs")
5802 (version "1.4.0")
5803 (source
5804 (origin
5805 (method url-fetch)
5806 (uri (string-append
5807 "https://pypi.python.org/packages/source/a/appdirs/appdirs-"
5808 version
5809 ".tar.gz"))
5810 (sha256
5811 (base32
5812 "1iddva7v3fq0aqzsahkazxr7vpw28mqcrsy818z4wyiqnkplbhlg"))))
5813 (build-system python-build-system)
5814 (home-page "http://github.com/ActiveState/appdirs")
5815 (synopsis
5816 "Determine platform-specific dirs, e.g. a \"user data dir\"")
5817 (description
5818 "This module provides a portable way of finding out where user data
5819 should be stored on various operating systems.")
5820 (license license:expat)))
5821
5822 (define-public python2-appdirs
5823 (package-with-python2 python-appdirs))
5824
5825 (define-public python-llfuse
5826 (package
5827 (name "python-llfuse")
5828 (version "1.1.1")
5829 (source (origin
5830 (method url-fetch)
5831 (uri (string-append
5832 "https://bitbucket.org/nikratio/python-llfuse/downloads/"
5833 "llfuse-" version ".tar.bz2"))
5834 (sha256
5835 (base32
5836 "0v6vj9mb286njgd1szg9hz2qdh5f3vkhsvajripfcqg458av310v"))))
5837 (build-system python-build-system)
5838 (inputs
5839 `(("fuse" ,fuse)
5840 ("attr" ,attr)))
5841 (native-inputs
5842 `(("pkg-config" ,pkg-config)))
5843 (synopsis "Python bindings for FUSE")
5844 (description
5845 "Python-LLFUSE is a set of Python bindings for the low level FUSE API.")
5846 (home-page "https://bitbucket.org/nikratio/python-llfuse/")
5847 (license license:lgpl2.0+)
5848 (properties `((python2-variant . ,(delay python2-llfuse))))))
5849
5850 (define-public python2-llfuse
5851 (package (inherit (package-with-python2
5852 (strip-python2-variant python-llfuse)))
5853 (propagated-inputs `(("python2-contextlib2" ,python2-contextlib2)))))
5854
5855 ;; For attic-0.16
5856 (define-public python-llfuse-0.41
5857 (package (inherit python-llfuse)
5858 (version "0.41.1")
5859 (source (origin
5860 (method url-fetch)
5861 (uri (string-append
5862 "https://bitbucket.org/nikratio/python-llfuse/downloads/"
5863 "llfuse-" version ".tar.bz2"))
5864 (sha256
5865 (base32
5866 "1imlqw9b73086y97izr036f58pgc5akv4ihc2rrf8j5h75jbrlaa"))))
5867 ;; Python-LLFUSE < 0.42 includes underscore.js, which is MIT (expat)
5868 ;; licensed. The rest of the package is licensed under LGPL2.0 or later.
5869 (license (list license:expat license:lgpl2.0+))))
5870
5871 (define-public python-msgpack
5872 (package
5873 (name "python-msgpack")
5874 (version "0.4.8")
5875 (source (origin
5876 (method url-fetch)
5877 (uri (pypi-uri "msgpack-python" version))
5878 (sha256
5879 (base32
5880 "11pqk5braa6wndpnr1dhg64js82vjgxnm0lzy73rwl831zgijaqs"))))
5881 (build-system python-build-system)
5882 (synopsis "MessagePack (de)serializer")
5883 (description "MessagePack is a fast, compact binary serialization format,
5884 suitable for similar data to JSON. This package provides CPython bindings for
5885 reading and writing MessagePack data.")
5886 (home-page "https://pypi.python.org/pypi/msgpack-python/")
5887 (license license:asl2.0)))
5888
5889 (define-public python2-msgpack
5890 (package-with-python2 python-msgpack))
5891
5892 (define-public python-netaddr
5893 (package
5894 (name "python-netaddr")
5895 (version "0.7.18")
5896 (source
5897 (origin
5898 (method url-fetch)
5899 (uri (string-append
5900 "https://pypi.python.org/packages/source/n/netaddr/netaddr-"
5901 version
5902 ".tar.gz"))
5903 (sha256
5904 (base32
5905 "06dxjlbcicq7q3vqy8agq11ra01kvvd47j4mk6dmghjsyzyckxd1"))))
5906 (build-system python-build-system)
5907 (arguments `(#:tests? #f)) ;; No tests.
5908 (home-page "https://github.com/drkjam/netaddr/")
5909 (synopsis "Pythonic manipulation of network addresses")
5910 (description
5911 "A Python library for representing and manipulating IPv4, IPv6, CIDR, EUI
5912 and MAC network addresses.")
5913 (license license:bsd-3)))
5914
5915 (define-public python2-netaddr
5916 (package-with-python2 python-netaddr))
5917
5918 (define-public python-wrapt
5919 (package
5920 (name "python-wrapt")
5921 (version "1.10.5")
5922 (source
5923 (origin
5924 (method url-fetch)
5925 (uri (string-append
5926 "https://pypi.python.org/packages/source/w/wrapt/wrapt-"
5927 version
5928 ".tar.gz"))
5929 (sha256
5930 (base32
5931 "0cq8rlpzkxzk48b50yrfhzn1d1hrq4gjcdqlrgq4v5palgiv9jwr"))))
5932 (build-system python-build-system)
5933 (arguments
5934 ;; Tests are not included in the tarball, they are only available in the
5935 ;; git repository.
5936 `(#:tests? #f))
5937 (home-page "https://github.com/GrahamDumpleton/wrapt")
5938 (synopsis "Module for decorators, wrappers and monkey patching")
5939 (description
5940 "The aim of the wrapt module is to provide a transparent object proxy for
5941 Python, which can be used as the basis for the construction of function
5942 wrappers and decorator functions.")
5943 (license license:bsd-2)))
5944
5945 (define-public python2-wrapt
5946 (package-with-python2 python-wrapt))
5947
5948 (define-public python-iso8601
5949 (package
5950 (name "python-iso8601")
5951 (version "0.1.11")
5952 (source
5953 (origin
5954 (method url-fetch)
5955 (uri (pypi-uri "iso8601" version))
5956 (sha256
5957 (base32
5958 "0c7gh3lsdjds262h0v1sqc66l7hqgfwbakn96qrhdbl0i3vm5yz8"))))
5959 (build-system python-build-system)
5960 (home-page "https://bitbucket.org/micktwomey/pyiso8601")
5961 (synopsis "Module to parse ISO 8601 dates")
5962 (description
5963 "This module parses the most common forms of ISO 8601 date strings (e.g.
5964 @code{2007-01-14T20:34:22+00:00}) into @code{datetime} objects.")
5965 (license license:expat)))
5966
5967 (define-public python2-iso8601
5968 (package-with-python2 python-iso8601))
5969
5970 (define-public python-monotonic
5971 (package
5972 (name "python-monotonic")
5973 (version "0.3")
5974 (source
5975 (origin
5976 (method url-fetch)
5977 (uri (string-append
5978 "https://pypi.python.org/packages/source/m/monotonic/monotonic-"
5979 version
5980 ".tar.gz"))
5981 (sha256
5982 (base32
5983 "0yz0bcbwx8r2c01czzfpbrxddynxyk9k95jj8h6sgcb7xmfvl998"))))
5984 (build-system python-build-system)
5985 (home-page "https://github.com/atdt/monotonic")
5986 (synopsis "Implementation of time.monotonic() for Python 2 & < 3.3")
5987 (description
5988 "This module provides a monotonic() function which returns the value (in
5989 fractional seconds) of a clock which never goes backwards.")
5990 (license license:asl2.0)))
5991
5992 (define-public python2-monotonic
5993 (package-with-python2 python-monotonic))
5994
5995 (define-public python-webob
5996 (package
5997 (name "python-webob")
5998 (version "1.5.1")
5999 (source
6000 (origin
6001 (method url-fetch)
6002 (uri (pypi-uri "WebOb" version))
6003 (sha256
6004 (base32
6005 "02bhhzijfhv8hmi1i54d4b0v43liwhnywhflvxsv4x3zax9s3afq"))))
6006 (build-system python-build-system)
6007 (native-inputs
6008 `(("python-nose" ,python-nose)))
6009 (home-page "http://webob.org/")
6010 (synopsis "WSGI request and response object")
6011 (description
6012 "WebOb provides wrappers around the WSGI request environment, and an
6013 object to help create WSGI responses.")
6014 (license license:expat)))
6015
6016 (define-public python2-webob
6017 (package-with-python2 python-webob))
6018
6019 (define-public python-xlrd
6020 (package
6021 (name "python-xlrd")
6022 (version "1.0.0")
6023 (source (origin
6024 (method url-fetch)
6025 (uri (pypi-uri "xlrd" version))
6026 (sha256
6027 (base32
6028 "0s8hjiz01vbhy85xalrz0qlsmd9ypf36zjqrf97hh984spapvy0g"))))
6029 (build-system python-build-system)
6030 (arguments
6031 `(#:phases
6032 (modify-phases %standard-phases
6033 ;; Current test in setup.py does not work as of 1.0.0, so use nose to
6034 ;; run tests instead for now.
6035 (replace 'check (lambda _ (zero? (system* "nosetests")))))))
6036 (native-inputs `(("python-nose" ,python-nose)))
6037 (home-page "http://www.python-excel.org/")
6038 (synopsis "Library for extracting data from Excel files")
6039 (description "This packages provides a library to extract data from
6040 spreadsheets using Microsoft Excel proprietary file formats @samp{.xls} and
6041 @samp{.xlsx} (versions 2.0 onwards). It has support for Excel dates and is
6042 Unicode-aware. It is not intended as an end-user tool.")
6043 (license license:bsd-3)))
6044
6045 (define-public python2-xlrd
6046 (package-with-python2 python-xlrd))
6047
6048 (define-public python-prettytable
6049 (package
6050 (name "python-prettytable")
6051 (version "0.7.2")
6052 (source
6053 (origin
6054 (method url-fetch)
6055 (uri (string-append
6056 "https://pypi.python.org/packages/source/P/PrettyTable/"
6057 "prettytable-" version ".tar.bz2"))
6058 (sha256
6059 (base32
6060 "0diwsicwmiq2cpzpxri7cyl5fmsvicafw6nfqf6p6p322dji2g45"))))
6061 (build-system python-build-system)
6062 (home-page "http://code.google.com/p/prettytable/")
6063 (synopsis "Display tabular data in an ASCII table format")
6064 (description
6065 "A library designed to represent tabular data in visually appealing ASCII
6066 tables. PrettyTable allows for selection of which columns are to be printed,
6067 independent alignment of columns (left or right justified or centred) and
6068 printing of sub-tables by specifying a row range.")
6069 (license license:bsd-3)))
6070
6071 (define-public python2-prettytable
6072 (package-with-python2 python-prettytable))
6073
6074 (define-public python-tables
6075 (package
6076 (name "python-tables")
6077 (version "3.2.2")
6078 (source
6079 (origin
6080 (method url-fetch)
6081 (uri (pypi-uri "tables" version))
6082 (sha256
6083 (base32
6084 "117s6w7s3yxafpmf3zz3svana7xfrsviw01va1xp7h8ylx8v6r1m"))))
6085 (build-system python-build-system)
6086 (arguments
6087 `(;; FIXME: python-build-system does not pass configure-flags to "build"
6088 ;; or "check", so we must override the build and check phases.
6089 #:phases
6090 (modify-phases %standard-phases
6091 (add-after 'unpack 'use-gcc
6092 (lambda _
6093 (substitute* "setup.py"
6094 (("compiler = new_compiler\\(\\)" line)
6095 (string-append line
6096 "\ncompiler.set_executables(compiler='gcc',"
6097 "compiler_so='gcc',"
6098 "linker_exe='gcc',"
6099 "linker_so='gcc -shared')")))
6100 #t))
6101 (replace 'build
6102 (lambda* (#:key inputs #:allow-other-keys)
6103 (zero? (system* "python" "setup.py" "build"
6104 (string-append "--hdf5="
6105 (assoc-ref inputs "hdf5"))))))
6106 (replace 'check
6107 (lambda* (#:key inputs #:allow-other-keys)
6108 (zero? (system* "python" "setup.py" "check"
6109 (string-append "--hdf5="
6110 (assoc-ref inputs "hdf5")))))))))
6111 (propagated-inputs
6112 `(("python-numexpr" ,python-numexpr)
6113 ("python-numpy" ,python-numpy)))
6114 (native-inputs
6115 `(("python-cython" ,python-cython)
6116 ("pkg-config" ,pkg-config)))
6117 (inputs
6118 `(("hdf5" ,hdf5)
6119 ("bzip2" ,bzip2)
6120 ("zlib" ,zlib)))
6121 (home-page "http://www.pytables.org/")
6122 (synopsis "Hierarchical datasets for Python")
6123 (description "PyTables is a package for managing hierarchical datasets and
6124 designed to efficently cope with extremely large amounts of data.")
6125 (license license:bsd-3)))
6126
6127 (define-public python2-tables
6128 (package-with-python2 python-tables))
6129
6130 (define-public python-pyasn1
6131 (package
6132 (name "python-pyasn1")
6133 (version "0.1.9")
6134 (source
6135 (origin
6136 (method url-fetch)
6137 (uri (pypi-uri "pyasn1" version))
6138 (sha256
6139 (base32
6140 "0zraxni14bqi20kr4bi6nwsh32aibz0fq0xaczfisw0zdpcsqg45"))))
6141 (build-system python-build-system)
6142 (home-page "http://pyasn1.sourceforge.net/")
6143 (synopsis "ASN.1 types and codecs")
6144 (description
6145 "This is an implementation of ASN.1 types and codecs in Python. It is
6146 suitable for a wide range of protocols based on the ASN.1 specification.")
6147 (license license:bsd-2)))
6148
6149 (define-public python2-pyasn1
6150 (package-with-python2 python-pyasn1))
6151
6152 (define-public python-pyasn1-modules
6153 (package
6154 (name "python-pyasn1-modules")
6155 (version "0.0.8")
6156 (source
6157 (origin
6158 (method url-fetch)
6159 (uri (pypi-uri "pyasn1-modules" version))
6160 (sha256
6161 (base32
6162 "0drqgw81xd3fxdlg89kgd79zzrabvfncvkbybi2wr6w2y4s1jmhh"))))
6163 (build-system python-build-system)
6164 (propagated-inputs
6165 `(("python-pyasn1" ,python-pyasn1)))
6166 (home-page "http://sourceforge.net/projects/pyasn1/")
6167 (synopsis "ASN.1 codec implementations")
6168 (description
6169 "Pyasn1-modules is a collection of Python modules providing ASN.1 types and
6170 implementations of ASN.1-based codecs and protocols.")
6171 (license license:bsd-3)))
6172
6173 (define-public python2-pyasn1-modules
6174 (package-with-python2 python-pyasn1-modules))
6175
6176 (define-public python-ipaddress
6177 (package
6178 (name "python-ipaddress")
6179 (version "1.0.16")
6180 (source (origin
6181 (method url-fetch)
6182 (uri (pypi-uri "ipaddress" version))
6183 (sha256
6184 (base32
6185 "1c3imabdrw8nfksgjjflzg7h4ynjckqacb188rf541m74arq4cas"))))
6186 (build-system python-build-system)
6187 (home-page "https://github.com/phihag/ipaddress")
6188 (synopsis "IP address manipulation library")
6189 (description
6190 "This package provides a fast, lightweight IPv4/IPv6 manipulation library
6191 in Python. This library is used to create, poke at, and manipulate IPv4 and
6192 IPv6 addresses and networks. This is a port of the Python 3.3 ipaddress
6193 module to older versions of Python.")
6194 (license license:psfl)))
6195
6196 (define-public python2-ipaddress
6197 (package-with-python2 python-ipaddress))
6198
6199 (define-public python2-ipaddr
6200 (package
6201 (name "python2-ipaddr")
6202 (version "2.1.11")
6203 (source
6204 (origin
6205 (method url-fetch)
6206 (uri (pypi-uri "ipaddr" version))
6207 (sha256
6208 (base32 "1dwq3ngsapjc93fw61rp17fvzggmab5x1drjzvd4y4q0i255nm8v"))))
6209 (build-system python-build-system)
6210 (arguments
6211 `(#:python ,python-2 ;version 2 only
6212 #:phases
6213 (modify-phases %standard-phases
6214 (replace 'check
6215 (lambda* _
6216 (zero? (system* "python" "ipaddr_test.py")))))))
6217 (home-page "https://github.com/google/ipaddr-py")
6218 (synopsis "IP address manipulation library")
6219 (description
6220 "Ipaddr is a Python@tie{}2 library for creating and manupilating IPv4 and
6221 IPv6 addresses and networks.
6222
6223 For new implementations you may prefer to use the standard module
6224 @code{ipaddress}, which was introduced in Python 3.3 and backported to older
6225 versions of Python.")
6226 (license license:asl2.0)))
6227
6228 (define-public python-idna
6229 (package
6230 (name "python-idna")
6231 (version "2.0")
6232 (source
6233 (origin
6234 (method url-fetch)
6235 (uri (string-append "https://pypi.python.org/packages/source/i/"
6236 "idna/idna-" version ".tar.gz"))
6237 (sha256
6238 (base32
6239 "0frxgmgi234lr9hylg62j69j4ik5zhg0wz05w5dhyacbjfnrl68n"))))
6240 (build-system python-build-system)
6241 (home-page "https://github.com/kjd/idna")
6242 (synopsis "Internationalized domain names in applications")
6243 (description
6244 "This is a library to support the Internationalised Domain Names in
6245 Applications (IDNA) protocol as specified in RFC 5891. This version of the
6246 protocol is often referred to as “IDNA2008” and can produce different results
6247 from the earlier standard from 2003. The library is also intended to act as a
6248 suitable drop-in replacement for the “encodings.idna” module that comes with
6249 the Python standard library but currently only supports the older 2003
6250 specification.")
6251 (license license:bsd-4)))
6252
6253 (define-public python2-idna
6254 (package-with-python2 python-idna))
6255
6256 (define-public python-pretend
6257 (package
6258 (name "python-pretend")
6259 (version "1.0.8")
6260 (source
6261 (origin
6262 (method url-fetch)
6263 (uri (string-append "https://pypi.python.org/packages/source/p/"
6264 "pretend/pretend-" version ".tar.gz"))
6265 (sha256
6266 (base32
6267 "0r5r7ygz9m6d2bklflbl84cqhjkc2q12xgis8268ygjh30g2q3wk"))))
6268 (build-system python-build-system)
6269 (home-page "https://github.com/alex/pretend")
6270 (synopsis "Library for stubbing in Python")
6271 (description
6272 "Pretend is a library to make stubbing with Python easier. Stubbing is a
6273 technique for writing tests. You may hear the term mixed up with mocks,
6274 fakes, or doubles. Basically, a stub is an object that returns pre-canned
6275 responses, rather than doing any computation.")
6276 (license license:bsd-3)))
6277
6278 (define-public python2-pretend
6279 (package-with-python2 python-pretend))
6280
6281 (define-public python-cryptography-vectors
6282 (package
6283 (name "python-cryptography-vectors")
6284 (version "1.5.3")
6285 (source
6286 (origin
6287 (method url-fetch)
6288 (uri (pypi-uri "cryptography_vectors" version))
6289 (sha256
6290 (base32
6291 "1bnd1bricyhxa27rhr0ljk0kacxzvysd3ar2j2hlv13a2k6zw4z5"))))
6292 (build-system python-build-system)
6293 (home-page "https://github.com/pyca/cryptography")
6294 (synopsis "Test vectors for the cryptography package")
6295 (description
6296 "This package contains test vectors for the cryptography package.")
6297 ;; Distributed under either BSD-3 or ASL2.0
6298 (license (list license:bsd-3 license:asl2.0))))
6299
6300 (define-public python2-cryptography-vectors
6301 (package-with-python2 python-cryptography-vectors))
6302
6303 (define-public python-cryptography
6304 (package
6305 (name "python-cryptography")
6306 (version "1.5.3")
6307 (source
6308 (origin
6309 (method url-fetch)
6310 (uri (pypi-uri "cryptography" version))
6311 (sha256
6312 (base32
6313 "1raanvkdfw5ai56ymlij6ghc4k126fs7jx948ig7yn4vj6ndv0ng"))))
6314 (build-system python-build-system)
6315 (arguments
6316 `(#:phases
6317 (modify-phases %standard-phases
6318 (add-before 'check 'disable-failing-test
6319 (lambda _
6320 ;; This test is known to fail with OpenSSL >= 1.0.2i and older
6321 ;; versions of python-cryptography:
6322 ;; https://github.com/pyca/cryptography/issues/3196
6323 ;; TODO: Try re-enabling the test when upgrading
6324 ;; python-cryptography.
6325 (substitute* "tests/hazmat/backends/test_openssl.py"
6326 (("def test_numeric_string_x509_name_entry")
6327 "@pytest.mark.xfail\n def test_numeric_string_x509_name_entry"))
6328 #t)))))
6329 (inputs
6330 `(("openssl" ,openssl)))
6331 (propagated-inputs
6332 `(("python-cffi" ,python-cffi)
6333 ("python-six" ,python-six)
6334 ("python-pyasn1" ,python-pyasn1)
6335 ("python-idna" ,python-idna)
6336 ("python-iso8601" ,python-iso8601)))
6337 (native-inputs
6338 `(("python-cryptography-vectors" ,python-cryptography-vectors)
6339 ("python-hypothesis" ,python-hypothesis)
6340 ("python-pretend" ,python-pretend)
6341 ("python-pyasn1" ,python-pyasn1)
6342 ("python-pyasn1-modules" ,python-pyasn1-modules)
6343 ("python-pytz" ,python-pytz)
6344 ("python-pytest" ,python-pytest-2.9.2)))
6345 (home-page "https://github.com/pyca/cryptography")
6346 (synopsis "Cryptographic recipes and primitives for Python")
6347 (description
6348 "cryptography is a package which provides cryptographic recipes and
6349 primitives to Python developers. It aims to be the “cryptographic standard
6350 library” for Python. The package includes both high level recipes, and low
6351 level interfaces to common cryptographic algorithms such as symmetric ciphers,
6352 message digests and key derivation functions.")
6353 ;; Distributed under either BSD-3 or ASL2.0
6354 (license (list license:bsd-3 license:asl2.0))
6355 (properties `((python2-variant . ,(delay python2-cryptography))))))
6356
6357 (define-public python2-cryptography
6358 (let ((crypto (package-with-python2
6359 (strip-python2-variant python-cryptography))))
6360 (package (inherit crypto)
6361 (propagated-inputs
6362 `(("python2-ipaddress" ,python2-ipaddress)
6363 ("python2-backport-ssl-match-hostname"
6364 ,python2-backport-ssl-match-hostname)
6365 ("python2-enum34" ,python2-enum34)
6366 ,@(package-propagated-inputs crypto))))))
6367
6368 (define-public python-pyopenssl
6369 (package
6370 (name "python-pyopenssl")
6371 (version "16.1.0")
6372 (source
6373 (origin
6374 (method url-fetch)
6375 (uri (pypi-uri "pyOpenSSL" version))
6376 (sha256
6377 (base32
6378 "0prm06zz7hl6bk5s2lqzw25lq6smayfv2fgiliw2rbqxlyiavxw8"))))
6379 (build-system python-build-system)
6380 (propagated-inputs
6381 `(("python-cryptography" ,python-cryptography)
6382 ("python-six" ,python-six)))
6383 (inputs
6384 `(("openssl" ,openssl)))
6385 (home-page "https://github.com/pyca/pyopenssl")
6386 (synopsis "Python wrapper module around the OpenSSL library")
6387 (description
6388 "PyOpenSSL is a high-level wrapper around a subset of the OpenSSL
6389 library.")
6390 (license license:asl2.0)))
6391
6392 (define-public python2-pyopenssl
6393 (package-with-python2 python-pyopenssl))
6394
6395 (define-public python-pip
6396 (package
6397 (name "python-pip")
6398 (version "8.0.2")
6399 (source
6400 (origin
6401 (method url-fetch)
6402 (uri (pypi-uri "pip" version))
6403 (sha256
6404 (base32
6405 "08cm8d4228fj0qnrysy3qv1a6022zr3dcs25amd14lgxil6vvx26"))))
6406 (build-system python-build-system)
6407 (inputs
6408 `(("python-virtualenv" ,python-virtualenv)
6409 ;; Tests
6410 ("python-mock" ,python-mock)
6411 ("python-pytest" ,python-pytest)
6412 ("python-scripttest" ,python-scripttest)))
6413 (home-page "https://pip.pypa.io/")
6414 (synopsis
6415 "Package manager for Python software")
6416 (description
6417 "Pip is a package manager for Python software, that finds packages on the
6418 Python Package Index (PyPI).")
6419 (license license:expat)))
6420
6421 (define-public python2-pip
6422 (package-with-python2 python-pip))
6423
6424 (define-public python-tlsh
6425 (package
6426 (name "python-tlsh")
6427 (version "3.4.4")
6428 (home-page "https://github.com/trendmicro/tlsh")
6429 (source (origin
6430 (method url-fetch)
6431 (uri (string-append "https://github.com/trendmicro/tlsh/archive/v"
6432 version ".tar.gz"))
6433 (sha256
6434 (base32
6435 "00bhzjqrlh7v538kbkbn8lgx976j1138al3sdhklaizqjvpwyk4r"))
6436 (file-name (string-append name "-" version ".tar.gz"))))
6437 (build-system cmake-build-system)
6438 (arguments
6439 '(#:out-of-source? #f
6440 #:phases (modify-phases %standard-phases
6441 (replace
6442 'install
6443 (lambda* (#:key outputs #:allow-other-keys)
6444 ;; Build and install the Python bindings. The underlying
6445 ;; C++ library is apparently not meant to be installed.
6446 (let ((out (assoc-ref outputs "out")))
6447 (with-directory-excursion "py_ext"
6448 (and (system* "python" "setup.py" "build")
6449 (system* "python" "setup.py" "install"
6450 (string-append "--prefix=" out))))))))))
6451 (inputs `(("python" ,python-wrapper))) ;for the bindings
6452 (synopsis "Fuzzy matching library for Python")
6453 (description
6454 "Trend Micro Locality Sensitive Hash (TLSH) is a fuzzy matching library.
6455 Given a byte stream with a minimum length of 256 bytes, TLSH generates a hash
6456 value which can be used for similarity comparisons. Similar objects have
6457 similar hash values, which allows for the detection of similar objects by
6458 comparing their hash values. The byte stream should have a sufficient amount
6459 of complexity; for example, a byte stream of identical bytes will not generate
6460 a hash value.")
6461 (license license:asl2.0)))
6462
6463 (define-public python2-tlsh
6464 (package
6465 (inherit python-tlsh)
6466 (name "python2-tlsh")
6467 (inputs `(("python" ,python-2)))))
6468
6469 (define-public python-termcolor
6470 (package
6471 (name "python-termcolor")
6472 (version "1.1.0")
6473 (source
6474 (origin
6475 (method url-fetch)
6476 (uri (pypi-uri "python-termcolor" version))
6477 (sha256
6478 (base32
6479 "0fv1vq14rpqwgazxg4981904lfyp84mnammw7y046491cv76jv8x"))))
6480 (build-system python-build-system)
6481 (arguments
6482 ;; There are no tests.
6483 `(#:tests? #f))
6484 (home-page "http://pypi.python.org/pypi/termcolor")
6485 (synopsis "ANSII Color formatting for terminal output")
6486 (description
6487 "This package provides ANSII Color formatting for output in terminals.")
6488 (license license:expat)))
6489
6490 (define-public python2-termcolor
6491 (package-with-python2 python-termcolor))
6492
6493 (define-public python-libarchive-c
6494 (package
6495 (name "python-libarchive-c")
6496 (version "2.2")
6497 (source (origin
6498 (method url-fetch)
6499 (uri (pypi-uri "libarchive-c" version))
6500 (sha256
6501 (base32
6502 "0z4r7v3dhd6b3120mav05ff08srih176r2rg5k8kn7mjd9pslm2x"))))
6503 (build-system python-build-system)
6504 (arguments
6505 '(#:phases (modify-phases %standard-phases
6506 (add-before
6507 'build 'reference-libarchive
6508 (lambda* (#:key inputs #:allow-other-keys)
6509 ;; Retain the absolute file name of libarchive.so.
6510 (let ((libarchive (assoc-ref inputs "libarchive")))
6511 (substitute* "libarchive/ffi.py"
6512 (("find_library\\('archive'\\)")
6513 (string-append "'" libarchive
6514 "/lib/libarchive.so'")))))))))
6515 (inputs
6516 `(("libarchive" ,libarchive)))
6517 (home-page "https://github.com/Changaco/python-libarchive-c")
6518 (synopsis "Python interface to libarchive")
6519 (description
6520 "This package provides Python bindings to libarchive, a C library to
6521 access possibly compressed archives in many different formats. It uses
6522 Python's @code{ctypes} foreign function interface (FFI).")
6523 (license license:lgpl2.0+)))
6524
6525 (define-public python2-libarchive-c
6526 (package-with-python2 python-libarchive-c))
6527
6528 (define-public python-file
6529 (package
6530 (inherit file)
6531 (name "python-file")
6532 (source (origin
6533 (inherit (package-source file))
6534 ;; This patch should not be applied to python2-file.
6535 (patches (search-patches "python-file-double-encoding-bug.patch"))))
6536 (build-system python-build-system)
6537 (arguments
6538 '(#:tests? #f ;no tests
6539 #:configure-flags '("--single-version-externally-managed" "--root=/")
6540 #:phases (modify-phases %standard-phases
6541 (add-before 'build 'change-directory
6542 (lambda _
6543 (chdir "python")
6544 #t))
6545 (add-before 'build 'set-library-file-name
6546 (lambda* (#:key inputs #:allow-other-keys)
6547 (let ((file (assoc-ref inputs "file")))
6548 (substitute* "magic.py"
6549 (("find_library\\('magic'\\)")
6550 (string-append "'" file "/lib/libmagic.so'")))
6551 #t))))))
6552 (inputs `(("file" ,file)))
6553 (self-native-input? #f)
6554 (synopsis "Python bindings to the libmagic file type guesser. Note that
6555 this module and the python-magic module both provide a \"magic.py\" file;
6556 these two modules, which are different and were developed separately, both
6557 serve the same purpose: provide Python bindings for libmagic.")))
6558
6559 (define-public python2-file
6560 (package-with-python2 python-file))
6561
6562 (define-public python-debian
6563 (package
6564 (name "python-debian")
6565 (version "0.1.23")
6566 (source
6567 (origin
6568 (method url-fetch)
6569 (uri (string-append
6570 "https://pypi.python.org/packages/source/p/python-debian/python-debian-"
6571 version ".tar.gz"))
6572 (sha256
6573 (base32
6574 "193faznwnjc3n5991wyzim6h9gyq1zxifmfrnpm3avgkh7ahyynh"))))
6575 (build-system python-build-system)
6576 (propagated-inputs
6577 `(("python-six" ,python-six)))
6578 (home-page "http://packages.debian.org/sid/python-debian")
6579 (synopsis "Debian package related modules")
6580 (description
6581 ;; XXX: Use @enumerate instead of @itemize to work around
6582 ;; <http://bugs.gnu.org/21772>.
6583 "This package provides Python modules that abstract many formats of
6584 Debian-related files, such as:
6585
6586 @enumerate
6587 @item Debtags information;
6588 @item @file{debian/changelog} files;
6589 @item packages files, pdiffs;
6590 @item control files of single or multiple RFC822-style paragraphs---e.g.
6591 @file{debian/control}, @file{.changes}, @file{.dsc};
6592 @item Raw @file{.deb} and @file{.ar} files, with (read-only) access to
6593 contained files and meta-information.
6594 @end enumerate\n")
6595
6596 ;; Modules are either GPLv2+ or GPLv3+.
6597 (license license:gpl3+)))
6598
6599 (define-public python2-debian
6600 (package-with-python2 python-debian))
6601
6602 (define-public python-nbformat
6603 (package
6604 (name "python-nbformat")
6605 (version "4.1.0")
6606 (source
6607 (origin
6608 (method url-fetch)
6609 (uri (pypi-uri "nbformat" version))
6610 (sha256
6611 (base32
6612 "0mq8iki3d4mnx7wy05phss7x98mds4fqydin8lcagidp1knw1xnv"))))
6613 (build-system python-build-system)
6614 (arguments `(#:tests? #f)) ; no test target
6615 (propagated-inputs
6616 `(("python-ipython-genutils" ,python-ipython-genutils)
6617 ("python-jsonschema" ,python-jsonschema)
6618 ("python-jupyter-core" ,python-jupyter-core)
6619 ("python-traitlets" ,python-traitlets)))
6620 (home-page "http://jupyter.org")
6621 (synopsis "Jupyter Notebook format")
6622 (description "This package provides the reference implementation of the
6623 Jupyter Notebook format and Python APIs for working with notebooks.")
6624 (license license:bsd-3)))
6625
6626 (define-public python2-nbformat
6627 (package-with-python2 python-nbformat))
6628
6629 (define-public python-bleach
6630 (package
6631 (name "python-bleach")
6632 (version "1.4.3")
6633 (source
6634 (origin
6635 (method url-fetch)
6636 (uri (pypi-uri "bleach" version))
6637 (sha256
6638 (base32
6639 "0jvg3jxrvnx7xmm9gj262v60ib452xlnwlb0navyp7jsvcd0d4qj"))))
6640 (build-system python-build-system)
6641 (propagated-inputs
6642 `(("python-html5lib" ,python-html5lib-0.9)
6643 ("python-six" ,python-six)))
6644 (native-inputs
6645 `(("python-nose" ,python-nose)))
6646 (home-page "http://github.com/jsocol/bleach")
6647 (synopsis "Whitelist-based HTML-sanitizing tool")
6648 (description "Bleach is an easy whitelist-based HTML-sanitizing tool.")
6649 (license license:asl2.0)))
6650
6651 (define-public python2-bleach
6652 (package-with-python2 python-bleach))
6653
6654 (define-public python-entrypoints
6655 (package
6656 (name "python-entrypoints")
6657 (version "0.2.2")
6658 (source
6659 (origin
6660 (method url-fetch)
6661 (uri (string-append "https://github.com/takluyver/entrypoints/archive/"
6662 version ".tar.gz"))
6663 (file-name (string-append name "-" version ".tar.gz"))
6664 (sha256
6665 (base32
6666 "0azqlkh3j0za080lsf5crnhaxx3c93k9dpv5ihkhf5cppgw5sjz5"))))
6667 (build-system python-build-system)
6668 ;; The package does not come with a setup.py file, so we have to generate
6669 ;; one ourselves.
6670 (arguments
6671 `(#:tests? #f
6672 #:phases
6673 (modify-phases %standard-phases
6674 (add-after 'unpack 'create-setup.py
6675 (lambda _
6676 (call-with-output-file "setup.py"
6677 (lambda (port)
6678 (format port "\
6679 from setuptools import setup
6680 setup(name='entrypoints', version='~a', py_modules=['entrypoints'])
6681 " ,version))))))))
6682 (home-page "https://github.com/takluyver/entrypoints")
6683 (synopsis "Discover and load entry points from installed Python packages")
6684 (description "Entry points are a way for Python packages to advertise
6685 objects with some common interface. The most common examples are
6686 @code{console_scripts} entry points, which define shell commands by
6687 identifying a Python function to run. The @code{entrypoints} module contains
6688 functions to find and load entry points.")
6689 (license license:expat)))
6690
6691 (define-public python2-entrypoints
6692 (package-with-python2 python-entrypoints))
6693
6694 (define-public python-nbconvert
6695 (package
6696 (name "python-nbconvert")
6697 (version "5.0.0b1")
6698 (source
6699 (origin
6700 (method url-fetch)
6701 (uri (pypi-uri "nbconvert" version))
6702 (sha256
6703 (base32
6704 "0brclbb18l4nmd5qy3dl9wn05rjdh1fz4rmzdlfqacj12rcdvdgp"))))
6705 (build-system python-build-system)
6706 ;; The "bdist_egg" target is disabled by default, causing the installation
6707 ;; to fail.
6708 (arguments `(#:configure-flags (list "bdist_egg")))
6709 (propagated-inputs
6710 `(("python-bleach" ,python-bleach)
6711 ("python-entrypoints" ,python-entrypoints)
6712 ("python-jinja2" ,python-jinja2)
6713 ("python-jupyter-core" ,python-jupyter-core)
6714 ("python-mistune" ,python-mistune)
6715 ("python-nbformat" ,python-nbformat)
6716 ("python-pygments" ,python-pygments)
6717 ("python-traitlets" ,python-traitlets)))
6718 (home-page "http://jupyter.org")
6719 (synopsis "Converting Jupyter Notebooks")
6720 (description "The @code{nbconvert} tool, @{jupyter nbconvert}, converts
6721 notebooks to various other formats via Jinja templates. It allows you to
6722 convert an @code{.ipynb} notebook file into various static formats including:
6723
6724 @enumerate
6725 @item HTML
6726 @item LaTeX
6727 @item PDF
6728 @item Reveal JS
6729 @item Markdown (md)
6730 @item ReStructured Text (rst)
6731 @item executable script
6732 @end enumerate\n")
6733 (license license:bsd-3)))
6734
6735 (define-public python2-nbconvert
6736 (package-with-python2 python-nbconvert))
6737
6738 (define-public python-notebook
6739 (package
6740 (name "python-notebook")
6741 (version "4.2.3")
6742 (source (origin
6743 (method url-fetch)
6744 (uri (pypi-uri "notebook" version))
6745 (sha256
6746 (base32
6747 "0laq5c2f21frq6xcdckgq7raqhznbjb0qs0357g612z87wyn1a9r"))))
6748 (build-system python-build-system)
6749 (arguments
6750 `(#:phases
6751 (modify-phases %standard-phases
6752 (replace 'check
6753 (lambda _
6754 ;; HOME must be set for tests
6755 (setenv "HOME" "/tmp")
6756 (zero? (system* "nosetests")))))))
6757 (propagated-inputs
6758 `(("python-jupyter-core" ,python-jupyter-core)
6759 ("python-nbformat" ,python-nbformat)
6760 ("python-nbconvert" ,python-nbconvert)
6761 ("python-ipython" ,python-ipython)))
6762 (native-inputs
6763 `(("python-nose" ,python-nose)
6764 ("python-sphinx" ,python-sphinx)
6765 ("python-requests" ,python-requests)))
6766 (home-page "http://jupyter.org/")
6767 (synopsis "Web-based notebook environment for interactive computing")
6768 (description
6769 "The Jupyter HTML notebook is a web-based notebook environment for
6770 interactive computing.")
6771 (license license:bsd-3)))
6772
6773 (define-public python2-notebook
6774 (package-with-python2 python-notebook))
6775
6776 (define-public python-widgetsnbextension
6777 (package
6778 (name "python-widgetsnbextension")
6779 (version "1.2.6")
6780 (source
6781 (origin
6782 (method url-fetch)
6783 (uri (pypi-uri "widgetsnbextension" version))
6784 (sha256
6785 (base32
6786 "0lff2mrwrgsa1mxmwx3phl9xvy0jqfpg6khbmxy53jbq56rwy666"))))
6787 (build-system python-build-system)
6788 (propagated-inputs
6789 `(("python-notebook" ,python-notebook)))
6790 (native-inputs
6791 `(("python-nose" ,python-nose)))
6792 (home-page "http://ipython.org")
6793 (synopsis "IPython HTML widgets for Jupyter")
6794 (description "This package provides interactive HTML widgets for Jupyter
6795 notebooks.")
6796 (license license:bsd-3)))
6797
6798 (define-public python2-widgetsnbextension
6799 (package-with-python2 python-widgetsnbextension))
6800
6801 (define-public python-ipywidgets
6802 (package
6803 (name "python-ipywidgets")
6804 (version "5.2.2")
6805 (source
6806 (origin
6807 (method url-fetch)
6808 (uri (pypi-uri "ipywidgets" version))
6809 (sha256
6810 (base32
6811 "1lk0qrr5l9a0z7qkkn30hv5832whxwxymf1l576fmmad0n7hkxms"))))
6812 (build-system python-build-system)
6813 ;; FIXME: it's not clear how to run the tests.
6814 (arguments `(#:tests? #f))
6815 (propagated-inputs
6816 `(("python-ipykernel" ,python-ipykernel)
6817 ("python-ipython" ,python-ipython)
6818 ("python-traitlets" ,python-traitlets)
6819 ("python-widgetsnbextension" ,python-widgetsnbextension)))
6820 (home-page "http://ipython.org")
6821 (synopsis "IPython HTML widgets for Jupyter")
6822 (description "Ipywidgets are interactive HTML widgets for Jupyter
6823 notebooks and the IPython kernel. Notebooks come alive when interactive
6824 widgets are used. Users gain control of their data and can visualize changes
6825 in the data.")
6826 (license license:bsd-3)))
6827
6828 (define-public python2-ipywidgets
6829 (package-with-python2 python-ipywidgets))
6830
6831 (define-public python-jupyter-console
6832 (package
6833 (name "python-jupyter-console")
6834 (version "5.0.0")
6835 (source
6836 (origin
6837 (method url-fetch)
6838 (uri (pypi-uri "jupyter_console" version))
6839 (sha256
6840 (base32
6841 "04acmkwsi99rcg3vb54c6n492zv35s92h2ahabc0w6wj976cipvx"))))
6842 (build-system python-build-system)
6843 ;; FIXME: it's not clear how to run the tests.
6844 (arguments `(#:tests? #f))
6845 (propagated-inputs
6846 `(("python-ipykernel" ,python-ipykernel)
6847 ("python-ipython" ,python-ipython)
6848 ("python-jupyter-client" ,python-jupyter-client)
6849 ("python-prompt-toolkit" ,python-prompt-toolkit)
6850 ("python-pygments" ,python-pygments)))
6851 (home-page "https://jupyter.org")
6852 (synopsis "Jupyter terminal console")
6853 (description "This package provides a terminal-based console frontend for
6854 Jupyter kernels. It also allows for console-based interaction with non-Python
6855 Jupyter kernels such as IJulia and IRKernel.")
6856 (license license:bsd-3)))
6857
6858 (define-public python2-jupyter-console
6859 (package-with-python2 python-jupyter-console))
6860
6861 (define-public jupyter
6862 (package
6863 (name "jupyter")
6864 (version "1.0.0")
6865 (source
6866 (origin
6867 (method url-fetch)
6868 (uri (pypi-uri "jupyter" version))
6869 (sha256
6870 (base32
6871 "0pwf3pminkzyzgx5kcplvvbvwrrzd3baa7lmh96f647k30rlpp6r"))))
6872 (build-system python-build-system)
6873 ;; FIXME: it's not clear how to run the tests.
6874 (arguments `(#:tests? #f))
6875 (propagated-inputs
6876 `(("python-ipykernel" ,python-ipykernel)
6877 ("python-ipywidgets" ,python-ipywidgets)
6878 ("python-jupyter-console" ,python-jupyter-console)
6879 ("python-nbconvert" ,python-nbconvert)
6880 ("python-notebook" ,python-notebook)))
6881 (home-page "http://jupyter.org")
6882 (synopsis "Web application for interactive documents")
6883 (description
6884 "The Jupyter Notebook is a web application that allows you to create and
6885 share documents that contain live code, equations, visualizations and
6886 explanatory text. Uses include: data cleaning and transformation, numerical
6887 simulation, statistical modeling, machine learning and much more.")
6888 (license license:bsd-3)))
6889
6890 (define-public python-chardet
6891 (package
6892 (name "python-chardet")
6893 (version "2.3.0")
6894 (source
6895 (origin
6896 (method url-fetch)
6897 (uri (string-append
6898 "https://pypi.python.org/packages/source/c/chardet/chardet-"
6899 version
6900 ".tar.gz"))
6901 (sha256
6902 (base32
6903 "1ak87ikcw34fivcgiz2xvi938dmclh078az65l9x3rmgljrkhgp5"))))
6904 (build-system python-build-system)
6905 (home-page "https://github.com/chardet/chardet")
6906 (synopsis "Universal encoding detector for Python 2 and 3")
6907 (description
6908 "This package provides @code{chardet}, a Python module that can
6909 automatically detect a wide range of file encodings.")
6910 (license license:lgpl2.1+)))
6911
6912 (define-public python2-chardet
6913 (package-with-python2 python-chardet))
6914
6915 (define-public python-docopt
6916 (package
6917 (name "python-docopt")
6918 (version "0.6.2")
6919 (source
6920 (origin
6921 (method url-fetch)
6922 ;; The release on PyPI does not include tests.
6923 (uri (string-append
6924 "https://github.com/docopt/docopt/archive/"
6925 version ".tar.gz"))
6926 (file-name (string-append name "-" version ".tar.gz"))
6927 (sha256
6928 (base32
6929 "16bf890xbdz3m30rsv2qacklh2rdn1zrfspfnwzx9g7vwz8yw4r1"))))
6930 (build-system python-build-system)
6931 (native-inputs
6932 `(("python-pytest" ,python-pytest)))
6933 (arguments
6934 `(#:phases (alist-replace
6935 'check
6936 (lambda _ (zero? (system* "py.test")))
6937 %standard-phases)))
6938 (home-page "http://docopt.org")
6939 (synopsis "Command-line interface description language for Python")
6940 (description "This library allows the user to define a command-line
6941 interface from a program's help message rather than specifying it
6942 programatically with command-line parsers like @code{getopt} and
6943 @code{argparse}.")
6944 (license license:expat)))
6945
6946 (define-public python2-docopt
6947 (package-with-python2 python-docopt))
6948
6949 (define-public python-zope-event
6950 (package
6951 (name "python-zope-event")
6952 (version "4.1.0")
6953 (source
6954 (origin
6955 (method url-fetch)
6956 (uri (string-append "https://pypi.python.org/packages/source/z"
6957 "/zope.event/zope.event-" version ".tar.gz"))
6958 (sha256
6959 (base32
6960 "11p75zpfz3ffhz21nzx9wb23xs993ck5s6hkjcvhswwizni5jynw"))))
6961 (build-system python-build-system)
6962 (home-page "http://pypi.python.org/pypi/zope.event")
6963 (synopsis "Event publishing system for Python")
6964 (description "Zope.event provides an event publishing API, intended for
6965 use by applications which are unaware of any subscribers to their events. It
6966 is a simple event-dispatching system on which more sophisticated event
6967 dispatching systems can be built.")
6968 (license license:zpl2.1)))
6969
6970 (define-public python2-zope-event
6971 (package-with-python2 python-zope-event))
6972
6973 (define-public python-zope-interface
6974 (package
6975 (name "python-zope-interface")
6976 (version "4.1.3")
6977 (source
6978 (origin
6979 (method url-fetch)
6980 (uri (string-append "https://pypi.python.org/packages/source/z"
6981 "/zope.interface/zope.interface-" version ".tar.gz"))
6982 (sha256
6983 (base32
6984 "0ks8h73b2g4bkad821qbv0wzjppdrwys33i7ka45ik3wxjg1l8if"))))
6985 (build-system python-build-system)
6986 (propagated-inputs
6987 `(("python-zope-event" ,python-zope-event)))
6988 (home-page "https://github.com/zopefoundation/zope.interface")
6989 (synopsis "Python implementation of the \"design by contract\"
6990 methodology")
6991 (description "Zope.interface provides an implementation of \"object
6992 interfaces\" for Python. Interfaces are a mechanism for labeling objects as
6993 conforming to a given API or contract.")
6994 (license license:zpl2.1)))
6995
6996 (define-public python2-zope-interface
6997 (package-with-python2 python-zope-interface))
6998
6999 (define-public python-zope-exceptions
7000 (package
7001 (name "python-zope-exceptions")
7002 (version "4.0.8")
7003 (source
7004 (origin
7005 (method url-fetch)
7006 (uri (string-append "https://pypi.python.org/packages/source/z"
7007 "/zope.exceptions/zope.exceptions-"
7008 version ".tar.gz"))
7009 (sha256
7010 (base32
7011 "0zwxaaa66sqxg5k7zcrvs0fbg9ym1njnxnr28dfmchzhwjvwnfzl"))))
7012 (build-system python-build-system)
7013 (arguments
7014 '(#:tests? #f)) ; circular dependency with zope.testrunner
7015 (propagated-inputs
7016 `(("python-zope-interface" ,python-zope-interface)))
7017 (home-page "http://cheeseshop.python.org/pypi/zope.exceptions")
7018 (synopsis "Zope exceptions")
7019 (description "Zope.exceptions provides general-purpose exception types
7020 that have uses outside of the Zope framework.")
7021 (license license:zpl2.1)))
7022
7023 (define-public python2-zope-exceptions
7024 (package-with-python2 python-zope-exceptions))
7025
7026 (define-public python-zope-testing
7027 (package
7028 (name "python-zope-testing")
7029 (version "4.5.0")
7030 (source
7031 (origin
7032 (method url-fetch)
7033 (uri (string-append "https://pypi.python.org/packages/source/z"
7034 "/zope.testing/zope.testing-" version ".tar.gz"))
7035 (sha256
7036 (base32
7037 "1yvglxhzvhl45mndvn9gskx2ph30zz1bz7rrlyfs62fv2pvih90s"))
7038 (modules '((guix build utils)))
7039 (snippet
7040 '(begin
7041 ;; Remove pre-compiled .pyc files backup files from source.
7042 (for-each delete-file (find-files "." "(\\.pyc|~)$"))
7043 #t))))
7044 (build-system python-build-system)
7045 (native-inputs
7046 `(("python-zope-exceptions" ,python-zope-exceptions)))
7047 (propagated-inputs
7048 `(("python-zope-interface" ,python-zope-interface)))
7049 (home-page "http://pypi.python.org/pypi/zope.testing")
7050 (synopsis "Zope testing helpers")
7051 (description "Zope.testing provides a number of testing utilities for HTML
7052 forms, HTTP servers, regular expressions, and more.")
7053 (license license:zpl2.1)))
7054
7055 (define-public python2-zope-testing
7056 (package-with-python2 python-zope-testing))
7057
7058 (define-public python-zope-testrunner
7059 (package
7060 (name "python-zope-testrunner")
7061 (version "4.4.9")
7062 (source
7063 (origin
7064 (method url-fetch)
7065 (uri (string-append "https://pypi.python.org/packages/source/z"
7066 "/zope.testrunner/zope.testrunner-"
7067 version ".zip"))
7068 (sha256
7069 (base32
7070 "1r7iqknhh55y45f64mz5hghgvzx34h1i11k350s0avx6q8gznja1"))))
7071 (build-system python-build-system)
7072 (native-inputs
7073 `(("python-six" ,python-six)
7074 ("python-zope-exceptions" ,python-zope-exceptions)
7075 ("python-zope-testing" ,python-zope-testing)
7076 ("unzip" ,unzip)))
7077 (propagated-inputs
7078 `(("python-zope-interface" ,python-zope-interface)))
7079 (home-page "http://pypi.python.org/pypi/zope.testrunner")
7080 (synopsis "Zope testrunner script")
7081 (description "Zope.testrunner provides a script for running Python
7082 tests.")
7083 (license license:zpl2.1)))
7084
7085 (define-public python2-zope-testrunner
7086 (let ((base (package-with-python2 python-zope-testrunner)))
7087 (package
7088 (inherit base)
7089 (native-inputs
7090 (append (package-native-inputs base)
7091 `(("python2-subunit" ,python2-subunit)
7092 ("python2-mimeparse" ,python2-mimeparse)))))))
7093
7094 (define-public python-zope-i18nmessageid
7095 (package
7096 (name "python-zope-i18nmessageid")
7097 (version "4.0.3")
7098 (source
7099 (origin
7100 (method url-fetch)
7101 (uri (string-append
7102 "https://pypi.python.org/packages/source/z"
7103 "/zope.i18nmessageid/zope.i18nmessageid-"
7104 version ".tar.gz"))
7105 (sha256
7106 (base32
7107 "1rslyph0klk58dmjjy4j0jxy21k03azksixc3x2xhqbkv97cmzml"))))
7108 (build-system python-build-system)
7109 (home-page "http://pypi.python.org/pypi/zope.i18nmessageid")
7110 (synopsis "Message identifiers for internationalization")
7111 (description "Zope.i18nmessageid provides facilities for declaring
7112 internationalized messages within program source text.")
7113 (license license:zpl2.1)))
7114
7115 (define-public python2-zope-i18nmessageid
7116 (package-with-python2 python-zope-i18nmessageid))
7117
7118 (define-public python-zope-schema
7119 (package
7120 (name "python-zope-schema")
7121 (version "4.4.2")
7122 (source
7123 (origin
7124 (method url-fetch)
7125 (uri (string-append "https://pypi.python.org/packages/source/z"
7126 "/zope.schema/zope.schema-" version ".tar.gz"))
7127 (sha256
7128 (base32
7129 "1p943jdxb587dh7php4vx04qvn7b2877hr4qs5zyckvp5afhhank"))))
7130 (build-system python-build-system)
7131 (propagated-inputs
7132 `(("python-zope-event" ,python-zope-event)
7133 ("python-zope-interface" ,python-zope-interface)))
7134 (native-inputs
7135 `(("python-zope-testing" ,python-zope-testing)))
7136 (home-page "http://pypi.python.org/pypi/zope.schema")
7137 (synopsis "Zope data schemas")
7138 (description "Zope.scheme provides extensions to zope.interface for
7139 defining data schemas.")
7140 (license license:zpl2.1)))
7141
7142 (define-public python2-zope-schema
7143 (package-with-python2 python-zope-schema))
7144
7145 (define-public python-zope-configuration
7146 (package
7147 (name "python-zope-configuration")
7148 (version "4.0.3")
7149 (source (origin
7150 (method url-fetch)
7151 (uri (string-append "https://pypi.python.org/packages/source/z"
7152 "/zope.configuration/zope.configuration-"
7153 version ".tar.gz"))
7154 (sha256
7155 (base32
7156 "1x9dfqypgympnlm25p9m43xh4qv3p7d75vksv9pzqibrb4cggw5n"))))
7157 (build-system python-build-system)
7158 (propagated-inputs
7159 `(("python-zope-i18nmessageid" ,python-zope-i18nmessageid)
7160 ("python-zope-schema" ,python-zope-schema)))
7161 (home-page "http://pypi.python.org/pypi/zope.configuration")
7162 (synopsis "Zope Configuration Markup Language")
7163 (description "Zope.configuration implements ZCML, the Zope Configuration
7164 Markup Language.")
7165 (license license:zpl2.1)))
7166
7167 (define-public python2-zope-configuration
7168 (package-with-python2 python-zope-configuration))
7169
7170 (define-public python-zope-proxy
7171 (package
7172 (name "python-zope-proxy")
7173 (version "4.1.6")
7174 (source
7175 (origin
7176 (method url-fetch)
7177 (uri (string-append "https://pypi.python.org/packages/source/z"
7178 "/zope.proxy/zope.proxy-" version ".tar.gz"))
7179 (sha256
7180 (base32
7181 "0pqwwmvm1prhwv1ziv9lp8iirz7xkwb6n2kyj36p2h0ppyyhjnm4"))))
7182 (build-system python-build-system)
7183 (propagated-inputs
7184 `(("python-zope-interface" ,python-zope-interface)))
7185 (home-page "http://pypi.python.org/pypi/zope.proxy")
7186 (synopsis "Generic, transparent proxies")
7187 (description "Zope.proxy provides generic, transparent proxies for Python.
7188 Proxies are special objects which serve as mostly-transparent wrappers around
7189 another object, intervening in the apparent behavior of the wrapped object
7190 only when necessary to apply the policy (e.g., access checking, location
7191 brokering, etc.) for which the proxy is responsible.")
7192 (license license:zpl2.1)))
7193
7194 (define-public python2-zope-proxy
7195 (package-with-python2 python-zope-proxy))
7196
7197 (define-public python-zope-location
7198 (package
7199 (name "python-zope-location")
7200 (version "4.0.3")
7201 (source
7202 (origin
7203 (method url-fetch)
7204 (uri (string-append "https://pypi.python.org/packages/source/z"
7205 "/zope.location/zope.location-" version ".tar.gz"))
7206 (sha256
7207 (base32
7208 "1nj9da4ksiyv3h8n2vpzwd0pb03mdsh7zy87hfpx72b6p2zcwg74"))))
7209 (build-system python-build-system)
7210 (native-inputs
7211 `(("python-zope-proxy" ,python-zope-proxy)
7212 ("python-zope-schema" ,python-zope-schema)))
7213 (home-page "http://pypi.python.org/pypi/zope.location/")
7214 (synopsis "Zope location library")
7215 (description "Zope.location implements the concept of \"locations\" in
7216 Zope3, which are are special objects that have a structural location.")
7217 (license license:zpl2.1)))
7218
7219 (define-public python2-zope-location
7220 (package-with-python2 python-zope-location))
7221
7222 (define-public python-zope-security
7223 (package
7224 (name "python-zope-security")
7225 (version "4.0.3")
7226 (source
7227 (origin
7228 (method url-fetch)
7229 (uri (string-append "https://pypi.python.org/packages/source/z"
7230 "/zope.security/zope.security-" version ".tar.gz"))
7231 (sha256
7232 (base32
7233 "14zmf684amc0x32kq05yxnhfqd1cmyhafkw05gn81rn90zjv6ssy"))))
7234 (build-system python-build-system)
7235 (propagated-inputs
7236 `(("python-zope-i18nmessageid" ,python-zope-i18nmessageid)
7237 ("python-zope-component" ,python-zope-component)
7238 ("python-zope-location" ,python-zope-location)
7239 ("python-zope-proxy" ,python-zope-proxy)
7240 ("python-zope-schema" ,python-zope-schema)
7241 ("python-zope-testrunner" ,python-zope-testrunner)
7242 ("python-zope-testing" ,python-zope-testing)))
7243 (home-page "http://pypi.python.org/pypi/zope.security")
7244 (synopsis "Zope security framework")
7245 (description "Zope.security provides a generic mechanism to implement
7246 security policies on Python objects.")
7247 (license license:zpl2.1)))
7248
7249 (define-public python2-zope-security
7250 (let ((zope-security (package-with-python2 python-zope-security)))
7251 (package (inherit zope-security)
7252 (propagated-inputs
7253 `(("python2-zope-testrunner" ,python2-zope-testrunner)
7254 ,@(alist-delete
7255 "python-zope-testrunner"
7256 (package-propagated-inputs zope-security)))))))
7257
7258 (define-public python-zope-component
7259 (package
7260 (name "python-zope-component")
7261 (version "4.2.2")
7262 (source
7263 (origin
7264 (method url-fetch)
7265 (uri (string-append "https://pypi.python.org/packages/source/z"
7266 "/zope.component/zope.component-" version ".tar.gz"))
7267 (sha256
7268 (base32
7269 "06pqr8m5jv12xjyy5b59hh9anl61cxkzhw9mka33r3nxalmi2b18"))))
7270 (build-system python-build-system)
7271 (arguments
7272 ;; Skip tests due to circular dependency with python-zope-security.
7273 '(#:tests? #f))
7274 (native-inputs
7275 `(("python-zope-testing" ,python-zope-testing)))
7276 (propagated-inputs
7277 `(("python-zope-event" ,python-zope-event)
7278 ("python-zope-interface" ,python-zope-interface)
7279 ("python-zope-i18nmessageid" ,python-zope-i18nmessageid)
7280 ("python-zope-configuration" ,python-zope-configuration)))
7281 (home-page "https://github.com/zopefoundation/zope.component")
7282 (synopsis "Zope Component Architecture")
7283 (description "Zope.component represents the core of the Zope Component
7284 Architecture. Together with the zope.interface package, it provides
7285 facilities for defining, registering and looking up components.")
7286 (license license:zpl2.1)))
7287
7288 (define-public python2-zope-component
7289 (package-with-python2 python-zope-component))
7290
7291 (define-public python-pythondialog
7292 (package
7293 (name "python-pythondialog")
7294 (version "3.4.0")
7295 (source
7296 (origin
7297 (method url-fetch)
7298 (uri (pypi-uri "pythondialog" version))
7299 (sha256
7300 (base32
7301 "1728ghsran47jczn9bhlnkvk5bvqmmbihabgif5h705b84r1272c"))))
7302 (build-system python-build-system)
7303 (arguments
7304 `(#:phases
7305 (modify-phases %standard-phases
7306 (add-after 'unpack 'patch-path
7307 (lambda* (#:key inputs #:allow-other-keys)
7308 (let* ((dialog (assoc-ref inputs "dialog")))
7309 ;; Since this library really wants to grovel the search path, we
7310 ;; must hardcode dialog's store path into it.
7311 (substitute* "dialog.py"
7312 (("os.getenv\\(\"PATH\", \":/bin:/usr/bin\"\\)")
7313 (string-append "os.getenv(\"PATH\") + \":" dialog "/bin\"")))
7314 #t))))
7315 #:tests? #f)) ; no test suite
7316 (propagated-inputs
7317 `(("dialog" ,dialog)))
7318 (home-page "http://pythondialog.sourceforge.net/")
7319 (synopsis "Python interface to the UNIX dialog utility")
7320 (description "A Python wrapper for the dialog utility. Its purpose is to
7321 provide an easy to use, pythonic and comprehensive Python interface to dialog.
7322 This allows one to make simple text-mode user interfaces on Unix-like systems")
7323 (license license:lgpl2.1)
7324 (properties `((python2-variant . ,(delay python2-pythondialog))))))
7325
7326 (define-public python2-pythondialog
7327 (let ((base (package-with-python2 (strip-python2-variant python-pythondialog))))
7328 (package
7329 (inherit base)
7330 (version (package-version python-pythondialog))
7331 (source (origin
7332 (method url-fetch)
7333 (uri (pypi-uri "python2-pythondialog" version))
7334 (sha256
7335 (base32
7336 "0d8k7lxk50imdyx85lv8j98i4c93a71iwpapnl1506rpkbm9qvd9")))))))
7337
7338 (define-public python-pyrfc3339
7339 (package
7340 (name "python-pyrfc3339")
7341 (version "1.0")
7342 (source
7343 (origin
7344 (method url-fetch)
7345 (uri (pypi-uri "pyRFC3339" version))
7346 (sha256
7347 (base32
7348 "0dgm4l9y8jiax5cp6yxjd2i27cq8h33sh81n1wfbmnmqb32cdywd"))))
7349 (build-system python-build-system)
7350 (propagated-inputs
7351 `(("python-pytz" ,python-pytz)))
7352 (native-inputs
7353 `(("python-nose" ,python-nose)))
7354 (home-page "https://github.com/kurtraschke/pyRFC3339")
7355 (synopsis "Python timestamp library")
7356 (description "Python library for generating and parsing RFC 3339-compliant
7357 timestamps.")
7358 (license license:expat)))
7359
7360 (define-public python2-pyrfc3339
7361 (package-with-python2 python-pyrfc3339))
7362
7363 (define-public python-werkzeug
7364 (package
7365 (name "python-werkzeug")
7366 (version "0.11.11")
7367 (source
7368 (origin
7369 (method url-fetch)
7370 (uri (pypi-uri "Werkzeug" version))
7371 (sha256
7372 (base32
7373 "1rgpq8a2qv26d75v9j3b074inirlyy6y4b5x4rxblp202jy4cb77"))))
7374 (build-system python-build-system)
7375 (native-inputs
7376 `(("python-pytest" ,python-pytest)))
7377 (home-page "http://werkzeug.pocoo.org/")
7378 (synopsis "Utilities for WSGI applications")
7379 (description "One of the most advanced WSGI utility modules. It includes a
7380 powerful debugger, full-featured request and response objects, HTTP utilities to
7381 handle entity tags, cache control headers, HTTP dates, cookie handling, file
7382 uploads, a powerful URL routing system and a bunch of community-contributed
7383 addon modules.")
7384 (license license:x11)))
7385
7386 (define-public python2-werkzeug
7387 (package-with-python2 python-werkzeug))
7388
7389 (define-public python-configobj
7390 (package
7391 (name "python-configobj")
7392 (version "5.0.6")
7393 (source (origin
7394 (method url-fetch)
7395 (uri (string-append
7396 "https://pypi.python.org/packages/source/c/configobj/"
7397 "configobj-" version ".tar.gz"))
7398 (sha256
7399 (base32
7400 "00h9rcmws03xvdlfni11yb60bz3kxfvsj6dg6nrpzj71f03nbxd2"))
7401 ;; Patch setup.py so it looks for python-setuptools, which is
7402 ;; required to parse the keyword 'install_requires' in setup.py.
7403 (patches (search-patches "python-configobj-setuptools.patch"))))
7404 (build-system python-build-system)
7405 (native-inputs
7406 `(("python-six" ,python-six)))
7407 (synopsis "Config file reading, writing and validation")
7408 (description "ConfigObj is a simple but powerful config file reader and
7409 writer: an ini file round tripper. Its main feature is that it is very easy to
7410 use, with a straightforward programmer’s interface and a simple syntax for
7411 config files.")
7412 (home-page "https://github.com/DiffSK/configobj")
7413 (license license:bsd-3)))
7414
7415 (define-public python2-configobj
7416 (package-with-python2 python-configobj))
7417
7418 (define-public python-configargparse
7419 (package
7420 (name "python-configargparse")
7421 (version "0.10.0")
7422 (source (origin
7423 (method url-fetch)
7424 (uri (string-append
7425 "https://pypi.python.org/packages/source/C/ConfigArgParse/"
7426 "ConfigArgParse-" version ".tar.gz"))
7427 (sha256
7428 (base32
7429 "19wh919gbdbzxzpagg52q3lm62yicm95ddlcx77dyjc1slyshl1v"))))
7430 (build-system python-build-system)
7431 (arguments
7432 ;; FIXME: Bug in test suite filed upstream:
7433 ;; https://github.com/bw2/ConfigArgParse/issues/32
7434 '(#:tests? #f))
7435 (synopsis "Replacement for argparse")
7436 (description "A drop-in replacement for argparse that allows options to also
7437 be set via config files and/or environment variables.")
7438 (home-page "https://github.com/bw2/ConfigArgParse")
7439 (license license:expat)))
7440
7441 (define-public python2-configargparse
7442 (package-with-python2 python-configargparse))
7443
7444 (define-public python-ndg-httpsclient
7445 (package
7446 (name "python-ndg-httpsclient")
7447 (version "0.4.0")
7448 (source (origin
7449 (method url-fetch)
7450 (uri (string-append
7451 "https://pypi.python.org/packages/source/n/ndg-httpsclient/"
7452 "ndg_httpsclient-" version ".tar.gz"))
7453 (sha256
7454 (base32
7455 "0x32ibixm3vv5m9xfk83xsqm8xcqw4dd0khbh6qbri6rxgymbhg8"))))
7456 (build-system python-build-system)
7457 (arguments
7458 '(;; The tests appear to require networking.
7459 #:tests? #f))
7460 (propagated-inputs
7461 `(("python-pyopenssl" ,python-pyopenssl)))
7462 (synopsis "HTTPS support for Python's httplib and urllib2")
7463 (description "This is a HTTPS client implementation for httplib and urllib2
7464 based on PyOpenSSL. PyOpenSSL provides a more fully featured SSL implementation
7465 over the default provided with Python and importantly enables full verification
7466 of the SSL peer.")
7467 (home-page "https://github.com/cedadev/ndg_httpsclient/")
7468 (license license:bsd-3)))
7469
7470 ;; python2-openssl requires special care, so package-with-python2 is
7471 ;; insufficient.
7472 (define-public python2-ndg-httpsclient
7473 (package (inherit python-ndg-httpsclient)
7474 (name "python2-ndg-httpsclient")
7475 (arguments `(#:python ,python-2))
7476 (propagated-inputs
7477 `(("python2-pyopenssl" ,python2-pyopenssl)))))
7478
7479 (define-public python-contextlib2
7480 (package
7481 (name "python-contextlib2")
7482 (version "0.4.0")
7483 (source
7484 (origin
7485 (method url-fetch)
7486 (uri (pypi-uri "contextlib2" version))
7487 (sha256
7488 (base32
7489 "0cmp131dlh0d0zvw0aza1zd13glvngzk8lb4avks0hm7yxwdr9am"))))
7490 (build-system python-build-system)
7491 (arguments
7492 `(#:phases
7493 (modify-phases %standard-phases
7494 (replace 'check
7495 (lambda _ (zero?
7496 (system*
7497 "python" "test_contextlib2.py" "-v")))))))
7498 (home-page "http://contextlib2.readthedocs.org/")
7499 (synopsis "Tools for decorators and context managers")
7500 (description "This module is primarily a backport of the Python
7501 3.2 contextlib to earlier Python versions. Like contextlib, it
7502 provides utilities for common tasks involving decorators and context
7503 managers. It also contains additional features that are not part of
7504 the standard library.")
7505 (license license:psfl)))
7506
7507 (define-public python2-contextlib2
7508 (package-with-python2 python-contextlib2))
7509
7510 (define-public python-texttable
7511 (package
7512 (name "python-texttable")
7513 (version "0.8.4")
7514 (source
7515 (origin
7516 (method url-fetch)
7517 (uri (pypi-uri "texttable" version))
7518 (sha256
7519 (base32
7520 "0bkhs4dx9s6g7fpb969hygq56hyz4ncfamlynw72s0n6nqfbd1w5"))))
7521 (build-system python-build-system)
7522 (arguments '(#:tests? #f)) ; no tests
7523 (home-page "https://github.com/foutaise/texttable/")
7524 (synopsis "Python module for creating simple ASCII tables")
7525 (description "Texttable is a Python module for creating simple ASCII
7526 tables.")
7527 (license license:lgpl2.1+)))
7528
7529 (define-public python2-texttable
7530 (package-with-python2 python-texttable))
7531
7532 (define-public python-websocket-client
7533 (package
7534 (name "python-websocket-client")
7535 (version "0.37.0")
7536 (source
7537 (origin
7538 (method url-fetch)
7539 (uri (pypi-uri "websocket_client" version))
7540 (sha256
7541 (base32
7542 "0h9glp1jll3z76ly3kg08aqgxqk0a68p4zi9yn50353bh5nj92v7"))))
7543 (build-system python-build-system)
7544 (native-inputs
7545 `(("python-six" ,python-six))) ; for tests
7546 (home-page "https://github.com/liris/websocket-client")
7547 (synopsis "WebSocket client for Python")
7548 (description "The Websocket-client module provides the low level APIs for
7549 WebSocket usage in Python programs.")
7550 (license license:lgpl2.1+)))
7551
7552 (define-public python2-websocket-client
7553 (package-with-python2 python-websocket-client))
7554
7555 (define-public python-atomicwrites
7556 (package
7557 (name "python-atomicwrites")
7558 (version "1.1.0")
7559 (source (origin
7560 (method url-fetch)
7561 (uri (pypi-uri "atomicwrites" version))
7562 (sha256
7563 (base32
7564 "1s01dci8arsl9d9vr5nz1fk9znldp1z3l4yl43f0c27z12b8yxl0"))))
7565 (build-system python-build-system)
7566 (synopsis "Atomic file writes in Python")
7567 (description "Library for atomic file writes using platform dependent tools
7568 for atomic file system operations.")
7569 (home-page "https://github.com/untitaker/python-atomicwrites")
7570 (license license:expat)))
7571
7572 (define-public python2-atomicwrites
7573 (package-with-python2 python-atomicwrites))
7574
7575 (define-public python-requests-toolbelt
7576 (package
7577 (name "python-requests-toolbelt")
7578 (version "0.6.2")
7579 (source (origin
7580 (method url-fetch)
7581 (uri (string-append
7582 "https://pypi.python.org/packages/"
7583 "e1/a4/a94c037bc72ad70441aff1403d3243510d2542ddca7759faaeffeb11aefe/"
7584 "requests-toolbelt-" version ".tar.gz"))
7585 (sha256
7586 (base32
7587 "15q9nrgp85nqlr4kdz1zvj8z2npafi2sr12y7fqgxbkq28j1aci6"))))
7588 (build-system python-build-system)
7589 (native-inputs
7590 `(("python-betamax" ,python-betamax)
7591 ("python-mock" ,python-mock)
7592 ("python-pytest" ,python-pytest)))
7593 (propagated-inputs
7594 `(("python-requests" ,python-requests)))
7595 (synopsis "Extensions to python-requests")
7596 (description "This is a toolbelt of useful classes and functions to be used
7597 with python-requests.")
7598 (home-page "https://github.com/sigmavirus24/requests-toolbelt")
7599 (license license:asl2.0)))
7600
7601 (define-public python-click-threading
7602 (package
7603 (name "python-click-threading")
7604 (version "0.2.0")
7605 (source (origin
7606 (method url-fetch)
7607 (uri (string-append
7608 "https://pypi.python.org/packages/"
7609 "fe/b7/e7f609d18a2a351cb71616adcf54df1acd82f83cb9b5936935a4d20e2c23/"
7610 "click-threading-" version ".tar.gz"))
7611 (sha256
7612 (base32
7613 "18bcqikxwb3drb8rf60cclxkxw52521b38ax3byah6j8cn8y9p4j"))))
7614 (build-system python-build-system)
7615 (propagated-inputs
7616 `(("python-click" ,python-click)))
7617 (synopsis "Utilities for multithreading in Click")
7618 (description "This package provides utilities for multithreading in Click
7619 applications.")
7620 (home-page "https://github.com/click-contrib/click-threading")
7621 (license license:expat)))
7622
7623 (define-public python-click-log
7624 (package
7625 (name "python-click-log")
7626 (version "0.1.3")
7627 (source (origin
7628 (method url-fetch)
7629 (uri (pypi-uri "click-log" version))
7630 (sha256
7631 (base32
7632 "0kdd1vminxpcfczxl2kkf285n0dr1gxh2cdbx1p6vkj7b7bci3gx"))))
7633 (build-system python-build-system)
7634 (propagated-inputs
7635 `(("python-click" ,python-click)))
7636 (synopsis "Logging for click applications")
7637 (description "This package provides a Python library for logging Click
7638 applications.")
7639 (home-page "https://github.com/click-contrib/click-log")
7640 (license license:expat)))
7641
7642 (define-public python-apipkg
7643 (package
7644 (name "python-apipkg")
7645 (version "1.4")
7646 (source (origin
7647 (method url-fetch)
7648 (uri (pypi-uri "apipkg" version))
7649 (sha256
7650 (base32
7651 "1iks5701qnp3dlr3q1d9qm68y2plp2m029irhpz92a44psfkjf1f"))))
7652 (build-system python-build-system)
7653 (native-inputs
7654 `(("python-pytest" ,python-pytest)))
7655 (synopsis "Namespace control and lazy-import mechanism")
7656 (description "With apipkg you can control the exported namespace of a Python
7657 package and greatly reduce the number of imports for your users. It is a small
7658 pure Python module that works on virtually all Python versions.")
7659 (home-page "https://bitbucket.org/hpk42/apipkg")
7660 (license license:expat)))
7661
7662 (define-public python2-apipkg
7663 (package-with-python2 python-apipkg))
7664
7665 (define-public python-execnet
7666 (package
7667 (name "python-execnet")
7668 (version "1.4.1")
7669 (source (origin
7670 (method url-fetch)
7671 (uri (pypi-uri "execnet" version))
7672 (sha256
7673 (base32
7674 "1rpk1vyclhg911p3hql0m0nrpq7q7mysxnaaw6vs29cpa6kx8vgn"))))
7675 (build-system python-build-system)
7676 (arguments
7677 `(;; 2 failed, 275 passed, 670 skipped, 4 xfailed
7678 ;; The two test failures are caused by the lack of an `ssh` executable.
7679 ;; The test suite can be run with pytest after the 'install' phase.
7680 #:tests? #f))
7681 (native-inputs
7682 `(("python-pytest" ,python-pytest)
7683 ("python-setuptools-scm" ,python-setuptools-scm)))
7684 (propagated-inputs
7685 `(("python-apipkg" ,python-apipkg)))
7686 (synopsis "Rapid multi-Python deployment")
7687 (description "Execnet provides a share-nothing model with
7688 channel-send/receive communication for distributing execution across many
7689 Python interpreters across version, platform and network barriers. It has a
7690 minimal and fast API targetting the following uses:
7691 @enumerate
7692 @item distribute tasks to (many) local or remote CPUs
7693 @item write and deploy hybrid multi-process applications
7694 @item write scripts to administer multiple environments
7695 @end enumerate")
7696 (home-page "http://codespeak.net/execnet/")
7697 (license license:expat)))
7698
7699 (define-public python2-execnet
7700 (package-with-python2 python-execnet))
7701
7702 ;;; The software provided by this package was integrated into pytest 2.8.
7703 (define-public python-pytest-cache
7704 (package
7705 (name "python-pytest-cache")
7706 (version "1.0")
7707 (source (origin
7708 (method url-fetch)
7709 (uri (pypi-uri "pytest-cache" version))
7710 (sha256
7711 (base32
7712 "1a873fihw4rhshc722j4h6j7g3nj7xpgsna9hhg3zn6ksknnhx5y"))))
7713 (build-system python-build-system)
7714 (propagated-inputs
7715 `(("python-apipkg" ,python-apipkg)
7716 ("python-execnet" ,python-execnet)
7717 ("python-py" ,python-py)
7718 ("python-pytest" ,python-pytest)))
7719 (synopsis "Py.test plugin with mechanisms for caching across test runs")
7720 (description "The pytest-cache plugin provides tools to rerun failures from
7721 the last py.test invocation.")
7722 (home-page "https://bitbucket.org/hpk42/pytest-cache/")
7723 (license license:expat)))
7724
7725 (define-public python2-pytest-cache
7726 (package-with-python2 python-pytest-cache))
7727
7728 (define-public python-pytest-localserver
7729 (package
7730 (name "python-pytest-localserver")
7731 (version "0.3.5")
7732 (source (origin
7733 (method url-fetch)
7734 (uri (pypi-uri "pytest-localserver" version))
7735 (sha256
7736 (base32
7737 "0dvqspjr6va55zwmnnc2mmpqc7mm65kxig9ya44x1z8aadzxpa4p"))))
7738 (build-system python-build-system)
7739 (arguments
7740 `(#:phases (modify-phases %standard-phases
7741 (replace 'check
7742 (lambda _
7743 (zero? (system* "py.test" "--genscript=runtests.py"))
7744 (zero? (system* "py.test")))))))
7745 (native-inputs
7746 `(("python-pytest" ,python-pytest)
7747 ("python-requests" ,python-requests)
7748 ("python-six" ,python-six)))
7749 (propagated-inputs
7750 `(("python-werkzeug" ,python-werkzeug)))
7751 (synopsis "Py.test plugin to test server connections locally")
7752 (description "Pytest-localserver is a plugin for the pytest testing
7753 framework which enables you to test server connections locally.")
7754 (home-page "https://pypi.python.org/pypi/pytest-localserver")
7755 (license license:expat)))
7756
7757 (define-public python-wsgi-intercept
7758 (package
7759 (name "python-wsgi-intercept")
7760 (version "1.2.2")
7761 (source (origin
7762 (method url-fetch)
7763 (uri (string-append
7764 "https://pypi.python.org/packages/"
7765 "38/76/ebcbc24d0cb77db34520a3ca6ed1bd43ace17d182bbd8dd7d976f1c176fb/"
7766 "wsgi_intercept-" version ".tar.gz"))
7767 (sha256
7768 (base32
7769 "0kjj2v2dvmnpdd5h5gk9rzz0f54rhjb0yiz3zg65bmp65slfw65d"))))
7770 (build-system python-build-system)
7771 (native-inputs
7772 `(("python-pytest" ,python-pytest)
7773 ("python-six" ,python-six)
7774 ("python-urllib3" ,python-urllib3)))
7775 (propagated-inputs
7776 `(("python-httplib2" ,python-httplib2)
7777 ("python-requests" ,python-requests)))
7778 (synopsis "Puts a WSGI application in place of a real URI for testing")
7779 (description "Wsgi_intercept installs a WSGI application in place of a real
7780 URI for testing. Testing a WSGI application normally involves starting a
7781 server at a local host and port, then pointing your test code to that address.
7782 Instead, this library lets you intercept calls to any specific host/port
7783 combination and redirect them into a WSGI application importable by your test
7784 program. Thus, you can avoid spawning multiple processes or threads to test
7785 your Web app.")
7786 (home-page "https://github.com/cdent/wsgi-intercept")
7787 (license license:expat)))
7788
7789 (define-public python-pytest-xprocess
7790 (package
7791 (name "python-pytest-xprocess")
7792 (version "0.9.1")
7793 (source (origin
7794 (method url-fetch)
7795 (uri (pypi-uri "pytest-xprocess" version))
7796 (sha256
7797 (base32
7798 "17zlql1xqw3ywcgwwbqmw633aly99lab12hm02asr8awvg5603pp"))))
7799 (build-system python-build-system)
7800 (propagated-inputs
7801 `(("python-pytest" ,python-pytest)
7802 ("python-pytest-cache" ,python-pytest-cache)
7803 ("python-psutil" ,python-psutil)))
7804 (synopsis "Pytest plugin to manage external processes across test runs")
7805 (description "Pytest-xprocess is an experimental py.test plugin for managing
7806 processes across test runs.")
7807 (home-page "https://bitbucket.org/pytest-dev/pytest-xprocess")
7808 (license license:expat)))
7809
7810 (define-public python-icalendar
7811 (package
7812 (name "python-icalendar")
7813 (version "3.10")
7814 (source (origin
7815 (method url-fetch)
7816 (uri (pypi-uri "icalendar" version))
7817 (sha256
7818 (base32
7819 "01amnk3621s7fagfla86npd25knbqirchg7h1jpqxqp103d02bs7"))))
7820 (build-system python-build-system)
7821 (propagated-inputs
7822 `(("python-dateutil-2" ,python-dateutil-2)
7823 ("python-pytz" ,python-pytz)))
7824 (synopsis "Python library for parsing iCalendar files")
7825 (description "The icalendar package is a parser/generator of iCalendar
7826 files for use with Python.")
7827 (home-page "https://github.com/collective/icalendar")
7828 (license license:bsd-2)))
7829
7830 (define-public python-sphinxcontrib-newsfeed
7831 (package
7832 (name "python-sphinxcontrib-newsfeed")
7833 (version "0.1.4")
7834 (source (origin
7835 (method url-fetch)
7836 (uri (pypi-uri "sphinxcontrib-newsfeed" version))
7837 (sha256
7838 (base32
7839 "1d7gam3mn8v4in4p16yn3v10vps7nnaz6ilw99j4klij39dqd37p"))))
7840 (build-system python-build-system)
7841 (propagated-inputs
7842 `(("python-docutils" ,python-docutils)
7843 ("python-sphinx" ,python-sphinx)))
7844 (synopsis "News Feed extension for Sphinx")
7845 (description "Sphinxcontrib-newsfeed is an extension for adding a simple
7846 Blog, News or Announcements section to a Sphinx website.")
7847 (home-page "https://bitbucket.org/prometheus/sphinxcontrib-newsfeed")
7848 (license license:bsd-2)))
7849
7850 (define-public python-args
7851 (package
7852 (name "python-args")
7853 (version "0.1.0")
7854 (source (origin
7855 (method url-fetch)
7856 (uri (pypi-uri "args" version))
7857 (sha256
7858 (base32
7859 "057qzi46h5dmxdqknsbrssn78lmqjlnm624iqdhrnpk26zcbi1d7"))))
7860 (build-system python-build-system)
7861 (home-page "https://github.com/kennethreitz/args")
7862 (synopsis "Command-line argument parser")
7863 (description
7864 "This library provides a Python module to parse command-line arguments.")
7865 (license license:bsd-3)))
7866
7867 (define-public python2-args
7868 (package-with-python2 python-args))
7869
7870 (define-public python-clint
7871 (package
7872 (name "python-clint")
7873 (version "0.5.1")
7874 (source (origin
7875 (method url-fetch)
7876 (uri (pypi-uri "clint" version))
7877 (sha256
7878 (base32
7879 "1an5lkkqk1zha47198p42ji3m94xmzx1a03dn7866m87n4r4q8h5"))))
7880 (build-system python-build-system)
7881 (propagated-inputs
7882 `(("python-args" ,python-args)))
7883 (home-page "https://github.com/kennethreitz/clint")
7884 (synopsis "Command-line interface tools")
7885 (description
7886 "Clint is a Python module filled with a set of tools for developing
7887 command-line applications, including tools for colored and indented
7888 output, progress bar display, and pipes.")
7889 (license license:isc)))
7890
7891 (define-public python2-clint
7892 (package-with-python2 python-clint))
7893
7894 (define-public python-astor
7895 (package
7896 (name "python-astor")
7897 (version "0.5")
7898 (source (origin
7899 (method url-fetch)
7900 (uri (pypi-uri "astor" version))
7901 (sha256
7902 (base32
7903 "1fdafq5hkis1fxqlmhw0sn44zp2ar46nxhbc22cvwg7hsd8z5gsa"))))
7904 (build-system python-build-system)
7905 (home-page "https://github.com/berkerpeksag/astor")
7906 (synopsis "Read and write Python ASTs")
7907 (description
7908 "Astor is designed to allow easy manipulation of Python source via the
7909 Abstract Syntax Tree.")
7910 (license license:bsd-3)))
7911
7912 (define-public python2-astor
7913 (package-with-python2 python-astor))
7914
7915 (define-public python-rply
7916 (package
7917 (name "python-rply")
7918 (version "0.7.4")
7919 (source (origin
7920 (method url-fetch)
7921 (uri (pypi-uri "rply" version))
7922 (sha256
7923 (base32
7924 "12rp1d9ba7nvd5rhaxi6xzx1rm67r1k1ylsrkzhpwnphqpb06cvj"))))
7925 (build-system python-build-system)
7926 (propagated-inputs
7927 `(("python-appdirs" ,python-appdirs)))
7928 (home-page "https://github.com/alex/rply")
7929 (synopsis "Parser generator for Python")
7930 (description
7931 "This package provides a pure Python based parser generator, that also
7932 works with RPython. It is a more-or-less direct port of David Bazzley's PLY,
7933 with a new public API, and RPython support.")
7934 (license license:bsd-3)))
7935
7936 (define-public python2-rply
7937 (package-with-python2 python-rply))
7938
7939 (define-public python-hy
7940 (package
7941 (name "python-hy")
7942 (version "0.11.1")
7943 (source (origin
7944 (method url-fetch)
7945 (uri (pypi-uri "hy" version))
7946 (sha256
7947 (base32
7948 "1msqv747iz12r73mz4qvsmlwkddwjvrahlrk7ysrcz07h7dsscxs"))))
7949 (build-system python-build-system)
7950 (propagated-inputs
7951 `(("python-astor" ,python-astor)
7952 ("python-clint" ,python-clint)
7953 ("python-rply" ,python-rply)))
7954 (home-page "http://hylang.org/")
7955 (synopsis "Lisp frontend to Python")
7956 (description
7957 "Hy is a dialect of Lisp that's embedded in Python. Since Hy transforms
7958 its Lisp code into the Python Abstract Syntax Tree, you have the whole world of
7959 Python at your fingertips, in Lisp form.")
7960 (license license:expat)))
7961
7962 (define-public python2-hy
7963 (package-with-python2 python-hy))
7964
7965 (define-public python-rauth
7966 (package
7967 (name "python-rauth")
7968 (version "0.7.2")
7969 (source
7970 (origin
7971 (method url-fetch)
7972 (uri (pypi-uri "rauth" version))
7973 (sha256
7974 (base32
7975 "00pq7zw429hhza9c0qzxiqp77m653jv09z92nralnmzwdf6pzicf"))))
7976 (build-system python-build-system)
7977 (arguments
7978 `(#:test-target "check"))
7979 (propagated-inputs
7980 `(("python-requests" ,python-requests)))
7981 (home-page "https://github.com/litl/rauth")
7982 (synopsis "Python library for OAuth 1.0/a, 2.0, and Ofly")
7983 (description
7984 "Rauth is a Python library for OAuth 1.0/a, 2.0, and Ofly. It also
7985 provides service wrappers for convenient connection initialization and
7986 authenticated session objects providing things like keep-alive.")
7987 (license license:expat)
7988 (properties `((python2-variant . ,(delay python2-rauth))))))
7989
7990 (define-public python2-rauth
7991 (let ((base (package-with-python2 (strip-python2-variant python-rauth))))
7992 (package
7993 (inherit base)
7994 (native-inputs `(("python2-unittest2" ,python2-unittest2)
7995 ,@(package-native-inputs base))))))
7996
7997 (define-public python2-functools32
7998 (package
7999 (name "python2-functools32")
8000 (version "3.2.3-2")
8001 (source
8002 (origin
8003 (method url-fetch)
8004 (uri (pypi-uri "functools32" version))
8005 (sha256
8006 (base32
8007 "0v8ya0b58x47wp216n1zamimv4iw57cxz3xxhzix52jkw3xks9gn"))))
8008 (build-system python-build-system)
8009 (arguments
8010 `(#:python ,python-2
8011 #:tests? #f)) ; no test target
8012 (home-page "https://github.com/MiCHiLU/python-functools32")
8013 (synopsis
8014 "Backport of the functools module from Python 3.2.3")
8015 (description
8016 "This package is a backport of the @code{functools} module from Python
8017 3.2.3 for use with older versions of Python and PyPy.")
8018 (license license:expat)))
8019
8020 (define-public python2-futures
8021 (package
8022 (name "python2-futures")
8023 (version "3.0.3")
8024 (source
8025 (origin
8026 (method url-fetch)
8027 (uri (pypi-uri "futures" version))
8028 (sha256
8029 (base32
8030 "1vcb34dqhzkhbq1957vdjszhhm5y3j9ba88dgwhqx2zynhmk9qig"))))
8031 (build-system python-build-system)
8032 (arguments `(#:python ,python-2))
8033 (home-page "https://github.com/agronholm/pythonfutures")
8034 (synopsis
8035 "Backport of the concurrent.futures package from Python 3.2")
8036 (description
8037 "The concurrent.futures module provides a high-level interface for
8038 asynchronously executing callables. This package backports the
8039 concurrent.futures package from Python 3.2")
8040 (license license:bsd-3)))
8041
8042 (define-public python-promise
8043 (package
8044 (name "python-promise")
8045 (version "0.4.2")
8046 (source
8047 (origin
8048 (method url-fetch)
8049 (uri (pypi-uri "promise" version))
8050 (sha256
8051 (base32
8052 "1k19ms8l3d5jzjh557rgkxb5sg4mqgfc315rn4hx1z3n8qq6lr3h"))))
8053 (build-system python-build-system)
8054 ;; Tests wants python-futures, which is a python2 only program, and
8055 ;; can't be found by python-promise at test time.
8056 (arguments `(#:tests? #f))
8057 (home-page "https://github.com/syrusakbary/promise")
8058 (synopsis "Promises/A+ implementation for Python")
8059 (description
8060 "Promises/A+ implementation for Python")
8061 (properties `((python2-variant . ,(delay python2-promise))))
8062 (license license:expat)))
8063
8064 (define-public python2-promise
8065 (let ((promise (package-with-python2
8066 (strip-python2-variant python-promise))))
8067 (package (inherit promise)
8068 (arguments (substitute-keyword-arguments (package-arguments promise)
8069 ((#:tests? _) #t)))
8070 (native-inputs
8071 `(("python2-futures" ,python2-futures)
8072 ("python2-pytest" ,python2-pytest)
8073 ,@(package-native-inputs promise))))))
8074
8075 (define-public python-urllib3
8076 (package
8077 (name "python-urllib3")
8078 (version "1.18.1")
8079 (source
8080 (origin
8081 (method url-fetch)
8082 (uri (pypi-uri "urllib3" version))
8083 (sha256
8084 (base32
8085 "1wb8aqnq53vzh2amrv8kc66f3h6fx217y0q62y6n30a64p2yqmam"))))
8086 (build-system python-build-system)
8087 (arguments `(#:tests? #f))
8088 (native-inputs
8089 `(;; some packages for tests
8090 ("python-nose" ,python-nose)
8091 ("python-mock" ,python-mock)
8092 ("python-tornado" ,python-tornado)))
8093 (propagated-inputs
8094 `(;; packages for https security
8095 ("python-certifi" ,python-certifi)
8096 ("python-ndg-httpsclient" ,python-ndg-httpsclient)
8097 ("python-pyasn1" ,python-pyasn1)
8098 ("python-pyopenssl" ,python-pyopenssl)))
8099 (home-page "https://urllib3.readthedocs.org/")
8100 (synopsis "HTTP library with thread-safe connection pooling")
8101 (description
8102 "Urllib3 supports features left out of urllib and urllib2 libraries. It
8103 can reuse the same socket connection for multiple requests, it can POST files,
8104 supports url redirection and retries, and also gzip and deflate decoding.")
8105 (license license:expat)))
8106
8107 (define-public python2-urllib3
8108 (package-with-python2 python-urllib3))
8109
8110 (define-public python-colorama
8111 (package
8112 (name "python-colorama")
8113 (version "0.3.3")
8114 (source
8115 (origin
8116 (method url-fetch)
8117 (uri (pypi-uri "colorama" version))
8118 (sha256
8119 (base32
8120 "1716z9pq1r5ys3nkg7wdrb3h2f9rmd0zdxpxzmx3bgwgf6xg48gb"))))
8121 (build-system python-build-system)
8122 (synopsis "colored terminal text rendering for Python")
8123 (description "Colorama is a Python library for rendering colored terminal
8124 text.")
8125 (home-page "https://pypi.python.org/pypi/colorama")
8126 (license license:bsd-3)))
8127
8128 (define-public python2-colorama
8129 (package-with-python2 python-colorama))
8130
8131 (define-public python-rsa
8132 (package
8133 (name "python-rsa")
8134 (version "3.4.2")
8135 (source
8136 (origin
8137 (method url-fetch)
8138 (uri (pypi-uri "rsa" version))
8139 (sha256
8140 (base32
8141 "1dcxvszbikgzh99ybdc7jq0zb9wspy2ds8z9mjsqiyv3q884xpr5"))))
8142 (build-system python-build-system)
8143 (propagated-inputs
8144 `(("python-pyasn1" ,python-pyasn1)))
8145 (synopsis "Pure-Python RSA implementation")
8146 (description "Python-RSA is a pure-Python RSA implementation. It supports
8147 encryption and decryption, signing and verifying signatures, and key
8148 generation according to PKCS#1 version 1.5. It can be used as a Python
8149 library as well as on the command line.")
8150 (home-page "http://stuvel.eu/rsa")
8151 (license license:asl2.0)))
8152
8153 (define-public python2-rsa
8154 (package-with-python2 python-rsa))
8155
8156 (define-public python-pluggy
8157 (package
8158 (name "python-pluggy")
8159 (version "0.3.1")
8160 (source
8161 (origin
8162 (method url-fetch)
8163 (uri (pypi-uri "pluggy" version))
8164 (sha256
8165 (base32
8166 "18qfzfm40bgx672lkg8q9x5hdh76n7vax99aank7vh2nw21wg70m"))))
8167 (build-system python-build-system)
8168 (synopsis "Plugin and hook calling mechanism for Python")
8169 (description "Pluggy is an extraction of the plugin manager as used by
8170 Pytest but stripped of Pytest specific details.")
8171 (home-page "https://pypi.python.org/pypi/pluggy")
8172 (license license:expat)))
8173
8174 (define-public python2-pluggy
8175 (package-with-python2 python-pluggy))
8176
8177 (define-public python-tox
8178 (package
8179 (name "python-tox")
8180 (version "2.3.1")
8181 (source
8182 (origin
8183 (method url-fetch)
8184 (uri (pypi-uri "tox" version))
8185 (sha256
8186 (base32
8187 "1vj73ar4rimq3fwy5r2z3jv4g9qbh8rmpmncsc00g0k310acqzxz"))))
8188 (build-system python-build-system)
8189 (arguments
8190 ;; FIXME: Tests require a newer version of pytest, but upgrading our
8191 ;; pytest breaks other packages.
8192 '(#:tests? #f))
8193 (propagated-inputs
8194 `(("python-pluggy" ,python-pluggy) ; >=0.3.0,<0.4.0
8195 ("python-py" ,python-py)
8196 ("python-virtualenv" ,python-virtualenv)))
8197 (native-inputs
8198 `(("python-pytest" ,python-pytest))) ; >= 2.3.5
8199 (home-page "http://tox.testrun.org/")
8200 (synopsis "Virtualenv-based automation of test activities")
8201 (description "Tox is a generic virtualenv management and test command line
8202 tool. It can be used to check that a package installs correctly with
8203 different Python versions and interpreters, or run tests in each type of
8204 supported environment, or act as a frontend to continuous integration
8205 servers.")
8206 (license license:expat)))
8207
8208 (define-public python2-tox
8209 (package-with-python2 python-tox))
8210
8211 (define-public python-jmespath
8212 (package
8213 (name "python-jmespath")
8214 (version "0.9.0")
8215 (source
8216 (origin
8217 (method url-fetch)
8218 (uri (pypi-uri "jmespath" version))
8219 (sha256
8220 (base32
8221 "0g9xvl69y7nr3w7ag4fsp6sm4fqf6vrqjw7504x2hzrrsh3ampq8"))))
8222 (build-system python-build-system)
8223 (synopsis "JSON Matching Expressions")
8224 (description "JMESPath (pronounced “james path”) is a Python library that
8225 allows one to declaratively specify how to extract elements from a JSON
8226 document.")
8227 (home-page "https://github.com/jmespath/jmespath.py")
8228 (license license:expat)))
8229
8230 (define-public python2-jmespath
8231 (package-with-python2 python-jmespath))
8232
8233 (define-public python-botocore
8234 (package
8235 (name "python-botocore")
8236 (version "1.4.62")
8237 (source
8238 (origin
8239 (method url-fetch)
8240 (uri (pypi-uri "botocore" version))
8241 (sha256
8242 (base32
8243 "1zxczlwqy9bl27d9bc5x99mb5mcsxm350240lp5nx7014xb311lj"))))
8244 (build-system python-build-system)
8245 (propagated-inputs
8246 `(("python-dateutil" ,python-dateutil-2)
8247 ("python-docutils" ,python-docutils)
8248 ("python-jmespath" ,python-jmespath)))
8249 (inputs
8250 `(("python-mock" ,python-mock)
8251 ("python-nose" ,python-nose)
8252 ("behave" ,behave)
8253 ("python-tox" ,python-tox)
8254 ("python-wheel" ,python-wheel)))
8255 (home-page "https://github.com/boto/botocore")
8256 (synopsis "Low-level interface to AWS")
8257 (description "Botocore is a Python library that provides a low-level
8258 interface to the Amazon Web Services (AWS) API.")
8259 (license license:asl2.0)))
8260
8261 (define-public python2-botocore
8262 (package-with-python2 python-botocore))
8263
8264 (define-public awscli
8265 (package
8266 (name "awscli")
8267 (version "1.11.5")
8268 (source
8269 (origin
8270 (method url-fetch)
8271 (uri (pypi-uri name version))
8272 (sha256
8273 (base32
8274 "0lclasm0wnayd3b8zl9l91i32nbgrhh0ncf9lksss4cv0myfwmfg"))))
8275 (build-system python-build-system)
8276 (propagated-inputs
8277 `(("python-colorama" ,python-colorama)
8278 ("python-botocore" ,python-botocore)
8279 ("python-s3transfer" ,python-s3transfer)
8280 ("python-docutils" ,python-docutils)
8281 ("python-rsa" ,python-rsa)))
8282 (inputs
8283 `(("python-mock" ,python-mock)
8284 ("python-nose" ,python-nose)
8285 ("python-sphinx" ,python-sphinx)
8286 ("python-tox" ,python-tox)
8287 ("python-wheel" ,python-wheel)))
8288 (home-page "http://aws.amazon.com/cli/")
8289 (synopsis "Command line client for AWS")
8290 (description "AWS CLI provides a unified command line interface to the
8291 Amazon Web Services (AWS) API.")
8292 (license license:asl2.0)))
8293
8294 (define-public python-hypothesis
8295 (package
8296 (name "python-hypothesis")
8297 (version "3.1.0")
8298 (source (origin
8299 (method url-fetch)
8300 (uri (pypi-uri "hypothesis" version))
8301 (sha256
8302 (base32
8303 "0qyqq9akm4vshhn8cngjc1qykcvsn7cz6dlm6njfsgpbraqrmbbw"))))
8304 (build-system python-build-system)
8305 (propagated-inputs
8306 `(("python-flake8" ,python-flake8)
8307 ("python-pytest" ,python-pytest)))
8308 (synopsis "Library for property based testing")
8309 (description "Hypothesis is a library for testing your Python code against a
8310 much larger range of examples than you would ever want to write by hand. It’s
8311 based on the Haskell library, Quickcheck, and is designed to integrate
8312 seamlessly into your existing Python unit testing work flow.")
8313 (home-page "https://github.com/DRMacIver/hypothesis")
8314 (license license:mpl2.0)
8315 (properties `((python2-variant . ,(delay python2-hypothesis))))))
8316
8317 (define-public python2-hypothesis
8318 (let ((hypothesis (package-with-python2
8319 (strip-python2-variant python-hypothesis))))
8320 (package (inherit hypothesis)
8321 (native-inputs
8322 `(("python2-enum34" ,python2-enum34))))))
8323
8324 (define-public python-pytest-subtesthack
8325 (package
8326 (name "python-pytest-subtesthack")
8327 (version "0.1.1")
8328 (source (origin
8329 (method url-fetch)
8330 (uri (pypi-uri "pytest-subtesthack" version))
8331 (sha256
8332 (base32
8333 "15kzcr5pchf3id4ikdvlv752rc0j4d912n589l4rifp8qsj19l1x"))))
8334 (build-system python-build-system)
8335 (propagated-inputs
8336 `(("python-pytest" ,python-pytest)))
8337 (synopsis "Set-up and tear-down fixtures for unit tests")
8338 (description "This plugin allows you to set up and tear down fixtures within
8339 unit test functions that use @code{py.test}. This is useful for using
8340 @command{hypothesis} inside py.test, as @command{hypothesis} will call the test
8341 function multiple times, without setting up or tearing down fixture state as is
8342 normally the case.")
8343 (home-page "https://github.com/untitaker/pytest-subtesthack/")
8344 (license license:unlicense)))
8345
8346 (define-public python2-pytest-subtesthack
8347 (package-with-python2 python-pytest-subtesthack))
8348
8349 (define-public python2-xdo
8350 (package
8351 (name "python2-xdo")
8352 (version "0.2")
8353 (source (origin
8354 (method url-fetch)
8355 (uri (string-append
8356 "http://http.debian.net/debian/pool/main/p/python-xdo/"
8357 "python-xdo_" version ".orig.tar.gz"))
8358 (sha256
8359 (base32
8360 "1kl5c1p0dyxf62plnk6fl77ycfb4whwjms16r14dxx8kn90hlqz4"))))
8361 (build-system python-build-system)
8362 (arguments
8363 `(#:python ,python-2
8364 #:tests? #f)) ; no tests provided
8365 (inputs
8366 `(("xdotool" ,xdotool)
8367 ("libX11" ,libx11)))
8368 (home-page "https://tracker.debian.org/pkg/python-xdo")
8369 (synopsis "Python library for simulating X11 keyboard/mouse input")
8370 (description "Provides bindings to libxdo for manipulating X11 via simulated
8371 input. (Note that this is mostly a legacy library; you may wish to look at
8372 python-xdo for newer bindings.)")
8373 (license license:bsd-3)))
8374
8375 (define-public python-wtforms
8376 (package
8377 (name "python-wtforms")
8378 (version "2.1")
8379 (source
8380 (origin
8381 (method url-fetch)
8382 (uri (pypi-uri "WTForms" version ".zip"))
8383 (sha256
8384 (base32
8385 "0vyl26y9cg409cfyj8rhqxazsdnd0jipgjw06civhrd53yyi1pzz"))))
8386 (build-system python-build-system)
8387 (arguments
8388 '(#:phases
8389 (modify-phases %standard-phases
8390 (add-after 'unpack 'remove-django-test
8391 ;; Don't fail the tests when the inputs for the optional tests cannot be found.
8392 (lambda _
8393 (substitute*
8394 "tests/runtests.py"
8395 (("'ext_django.tests', 'ext_sqlalchemy', 'ext_dateutil', 'locale_babel'") "")
8396 (("sys.stderr.write(\"### Disabled test '%s', dependency not found\n\" % name)") ""))
8397 #t)))))
8398 (native-inputs
8399 `(("unzip" ,unzip)))
8400 (home-page "http://wtforms.simplecodes.com/")
8401 (synopsis
8402 "Form validation and rendering library for Python web development")
8403 (description
8404 "WTForms is a flexible forms validation and rendering library
8405 for Python web development. It is very similar to the web form API
8406 available in Django, but is a standalone package.")
8407 (license license:bsd-3)))
8408
8409 (define-public python2-wtforms
8410 (package-with-python2 python-wtforms))
8411
8412 (define-public python-mako
8413 (package
8414 (name "python-mako")
8415 (version "1.0.3")
8416 (source
8417 (origin
8418 (method url-fetch)
8419 (uri (pypi-uri "Mako" version))
8420 (sha256
8421 (base32
8422 "136kcjbs0s98qkx8a418b05dfblqp0kiiqyx8vhx4rarwc7bqi3n"))))
8423 (build-system python-build-system)
8424 (propagated-inputs
8425 `(("python-markupsafe" ,python-markupsafe)))
8426 (native-inputs
8427 `(("python-mock" ,python-mock)
8428 ("python-nose" ,python-nose)))
8429 (home-page "http://www.makotemplates.org/")
8430 (synopsis "Templating language for Python")
8431 (description "Mako is a templating language for Python that compiles
8432 templates into Python modules.")
8433 (license license:expat)))
8434
8435 (define-public python2-mako
8436 (package-with-python2 python-mako))
8437
8438 (define-public python-waitress
8439 (package
8440 (name "python-waitress")
8441 (version "0.8.10")
8442 (source
8443 (origin
8444 (method url-fetch)
8445 (uri (pypi-uri "waitress" version))
8446 (sha256
8447 (base32
8448 "017n9ra6vvmq9d5sfhdzyzr1mg15x2hj2dhm4pdlw98c1ypw2h3w"))))
8449 (build-system python-build-system)
8450 (home-page "https://github.com/Pylons/waitress")
8451 (synopsis "Waitress WSGI server")
8452 (description "Waitress is meant to be a production-quality pure-Python WSGI
8453 server with very acceptable performance.")
8454 (license license:zpl2.1)))
8455
8456 (define-public python2-waitress
8457 (package-with-python2 python-waitress))
8458
8459 (define-public python-wsgiproxy2
8460 (package
8461 (name "python-wsgiproxy2")
8462 (version "0.4.2")
8463 (source
8464 (origin
8465 (method url-fetch)
8466 (uri (pypi-uri "WSGIProxy2" version ".zip"))
8467 (sha256
8468 (base32
8469 "13kf9bdxrc95y9vriaz0viry3ah11nz4rlrykcfvb8nlqpx3dcm4"))))
8470 (build-system python-build-system)
8471 (arguments
8472 '(;; Wsgiproxy2's test suite requires Restkit, which does not yet fully
8473 ;; support Python 3:
8474 ;; https://github.com/benoitc/restkit/issues/140
8475 #:tests? #f))
8476 (native-inputs
8477 `(("unzip" ,unzip)
8478 ("python-nose" ,python-nose)
8479 ("python-coverage" ,python-coverage)))
8480 (propagated-inputs
8481 `(("python-six" ,python-six)
8482 ("python-webob" ,python-webob)))
8483 (home-page
8484 "https://github.com/gawel/WSGIProxy2/")
8485 (synopsis "WSGI Proxy with various http client backends")
8486 (description "WSGI turns HTTP requests into WSGI function calls.
8487 WSGIProxy turns WSGI function calls into HTTP requests.
8488 It also includes code to sign requests and pass private data,
8489 and to spawn subprocesses to handle requests.")
8490 (license license:expat)))
8491
8492 (define-public python2-wsgiproxy2
8493 (package-with-python2 python-wsgiproxy2))
8494
8495 (define-public python-pastedeploy
8496 (package
8497 (name "python-pastedeploy")
8498 (version "1.5.2")
8499 (source
8500 (origin
8501 (method url-fetch)
8502 (uri (pypi-uri "PasteDeploy" version))
8503 (sha256
8504 (base32
8505 "1jz3m4hq8v6hyhfjz9425nd3nvn52cvbfipdcd72krjmla4qz1fm"))))
8506 (build-system python-build-system)
8507 (native-inputs
8508 `(("python-nose" ,python-nose)))
8509 ;; Note: setuptools used at runtime for pkg_resources
8510 (home-page "http://pythonpaste.org/deploy/")
8511 (synopsis
8512 "Load, configure, and compose WSGI applications and servers")
8513 (description
8514 "This tool provides code to load WSGI applications and servers from URIs;
8515 these URIs can refer to Python Eggs for INI-style configuration files. Paste
8516 Script provides commands to serve applications based on this configuration
8517 file.")
8518 (license license:expat)))
8519
8520 (define-public python2-pastedeploy
8521 (package-with-python2 python-pastedeploy))
8522
8523 (define-public python-paste
8524 (package
8525 (name "python-paste")
8526 (version "2.0.2")
8527 (source
8528 (origin
8529 (method url-fetch)
8530 (uri (pypi-uri "Paste" version))
8531 (sha256
8532 (base32
8533 "16dsv9qi0r4qsrsb6dilpq2rx0fnglvh36flzywcdnm2jg43mb5d"))
8534 (patches (search-patches "python-paste-remove-website-test.patch"
8535 "python-paste-remove-timing-test.patch"))))
8536 (build-system python-build-system)
8537 (native-inputs
8538 `(("python-nose" ,python-nose)))
8539 ;; Note: setuptools used at runtime for pkg_resources
8540 (propagated-inputs
8541 `(("python-six" ,python-six)))
8542 (arguments
8543 '(;; Tests don't pass on Python 3, but work fine on Python 2.
8544 ;; (As of 2.0.2, Python 3 support in Paste is presently a bit broken,
8545 ;; but is usable enough for the minimal amount it's used in MediaGoblin
8546 ;; still... things should be better by the next Paste release.)
8547 #:tests? #f))
8548 (home-page "http://pythonpaste.org")
8549 (synopsis
8550 "Python web development tools, focusing on WSGI")
8551 (description
8552 "Paste provides a variety of web development tools and middleware which
8553 can be nested together to build web applications. Paste's design closely
8554 follows ideas flowing from WSGI (Web Standard Gateway Interface).")
8555 (license license:expat)
8556 (properties `((python2-variant . ,(delay python2-paste))))))
8557
8558 (define-public python2-paste
8559 (let ((paste (package-with-python2
8560 (strip-python2-variant python-paste))))
8561 (package
8562 (inherit paste)
8563 (arguments
8564 ;; Tests are back for Python 2!
8565 `(#:tests? #t
8566 ,@(package-arguments paste))))))
8567
8568 (define-public python-pastescript
8569 (package
8570 (name "python-pastescript")
8571 (version "2.0.2")
8572 (source
8573 (origin
8574 (method url-fetch)
8575 (uri (pypi-uri "PasteScript" version))
8576 (sha256
8577 (base32
8578 "1h3nnhn45kf4pbcv669ik4faw04j58k8vbj1hwrc532k0nc28gy0"))))
8579 (build-system python-build-system)
8580 (native-inputs
8581 `(("python-nose" ,python-nose)))
8582 ;; Note: setuptools used at runtime for pkg_resources
8583 (propagated-inputs
8584 `(("python-paste" ,python-paste)
8585 ("python-pastedeploy" ,python-pastedeploy)))
8586 (home-page "http://pythonpaste.org/script/")
8587 (arguments
8588 '(;; Unfortunately, this requires the latest unittest2,
8589 ;; but that requires traceback2 which requires linecache2 which requires
8590 ;; unittest2. So we're skipping tests for now.
8591 ;; (Note: Apparently linetest2 only needs unittest2 for its tests,
8592 ;; so in theory we could get around this situation somehow.)
8593 #:tests? #f))
8594 (synopsis
8595 "Pluggable command line tool for serving web applications and more")
8596 (description
8597 "PasteScript is a plugin-friendly command line tool which provides a
8598 variety of features, from launching web applications to bootstrapping project
8599 layouts.")
8600 (license license:expat)))
8601
8602 (define-public python2-pastescript
8603 (package-with-python2 python-pastescript))
8604
8605 (define-public python-pyquery
8606 (package
8607 (name "python-pyquery")
8608 (version "1.2.13")
8609 (source
8610 (origin
8611 (method url-fetch)
8612 (uri (pypi-uri "pyquery" version))
8613 (sha256
8614 (base32
8615 "0j9fsisip21qv4xljsg5dmni1pgpvwrjyyhhql0glydc4bs5rjgv"))))
8616 (build-system python-build-system)
8617 (native-inputs
8618 `(("python-webob" ,python-webob)
8619 ("python-webtest" ,python-webtest)))
8620 (propagated-inputs
8621 `(("python-lxml" ,python-lxml)
8622 ("python-cssselect" ,python-cssselect)))
8623 (home-page "https://github.com/gawel/pyquery")
8624 (synopsis "Make jQuery-like queries on xml documents")
8625 (description "pyquery allows you to make jQuery queries on xml documents.
8626 The API is as much as possible the similar to jQuery. pyquery uses lxml for
8627 fast xml and html manipulation.")
8628 (license license:bsd-3)))
8629
8630 (define-public python2-pyquery
8631 (package-with-python2 python-pyquery))
8632
8633 (define-public python-webtest
8634 (package
8635 (name "python-webtest")
8636 (version "2.0.20")
8637 (source
8638 (origin
8639 (method url-fetch)
8640 (uri (pypi-uri "WebTest" version))
8641 (sha256
8642 (base32
8643 "0bv0qhdjakdsdgj4sk21gnpp8xp8bga4x03p6gjb83ihrsb7n4xv"))))
8644 (build-system python-build-system)
8645 (arguments
8646 `(;; Unfortunately we have to disable tests!
8647 ;; This release of WebTest is pinned to python-nose < 1.3,
8648 ;; but older versions of python-nose are plagued with the following
8649 ;; bug(s), which rears its ugly head during test execution:
8650 ;; https://github.com/nose-devs/nose/issues/759
8651 ;; https://github.com/nose-devs/nose/pull/811
8652 #:tests? #f))
8653 ;; Commented out code is no good, but in this case, once tests
8654 ;; are ready to be enabled again, we should put the following
8655 ;; in place:
8656 ;; (native-inputs
8657 ;; `(("python-nose" ,python-nose) ; technially < 1.3,
8658 ;; ; but see above comment
8659 ;; ("python-coverage" ,python-coverage)
8660 ;; ("python-mock" ,python-mock)
8661 ;; ("python-pastedeploy" ,python-pastedeploy)
8662 ;; ("python-wsgiproxy2" ,python-wsgiproxy2)
8663 ;; ("python-pyquery" ,python-pyquery)))
8664 (propagated-inputs
8665 `(("python-waitress" ,python-waitress)
8666 ("python-webob" ,python-webob)
8667 ("python-six" ,python-six)
8668 ("python-beautifulsoup4" ,python-beautifulsoup4)))
8669 (home-page "http://webtest.pythonpaste.org/")
8670 (synopsis "Helper to test WSGI applications")
8671 (description "Webtest allows you to test your Python web applications
8672 without starting an HTTP server. It supports anything that supports the
8673 minimum of WSGI.")
8674 (license license:expat)))
8675
8676 (define-public python2-webtest
8677 (package-with-python2 python-webtest))
8678
8679 (define-public python-anyjson
8680 (package
8681 (name "python-anyjson")
8682 (version "0.3.3")
8683 (source
8684 (origin
8685 (method url-fetch)
8686 (uri (pypi-uri "anyjson" version))
8687 (sha256
8688 (base32
8689 "1fjph4alvcscsl5d4b6qpv1yh31jy05jxi1l0xff7lws7j32v09p"))))
8690 (build-system python-build-system)
8691 (arguments
8692 `(;; We could possibly get tests working, but on Python 3 it's not so easy.
8693 ;; Very strangely, 2to3 is run *during setup.py install* (or bdist, or
8694 ;; whatever) so this transformation needs to be done before the tests
8695 ;; can be run. Maybe we could add a build step to transform beforehand
8696 ;; but it could be annoying/difficult.
8697 ;; We can enable tests for the Python 2 version, though, and do below.
8698 #:tests? #f))
8699 (home-page "http://bitbucket.org/runeh/anyjson/")
8700 (synopsis
8701 "Wraps best available JSON implementation in a common interface")
8702 (description
8703 "Anyjson loads whichever is the fastest JSON module installed
8704 and provides a uniform API regardless of which JSON implementation is used.")
8705 (license license:bsd-3)
8706 (properties `((python2-variant . ,(delay python2-anyjson))))))
8707
8708 (define-public python2-anyjson
8709 (let ((anyjson (package-with-python2
8710 (strip-python2-variant python-anyjson))))
8711 (package
8712 (inherit anyjson)
8713 (arguments `(;; Unlike the python 3 variant, we do run tests. See above!
8714 #:tests? #t
8715 ,@(package-arguments anyjson)))
8716 (native-inputs `(("python2-nose" ,python2-nose))))))
8717
8718 (define-public python-amqp
8719 (package
8720 (name "python-amqp")
8721 (version "1.4.9")
8722 (source
8723 (origin
8724 (method url-fetch)
8725 (uri (pypi-uri "amqp" version))
8726 (sha256
8727 (base32
8728 "06n6q0kxhjnbfz3vn8x9yz09lwmn1xi9d6wxp31h5jbks0b4vsid"))))
8729 (build-system python-build-system)
8730 (native-inputs
8731 `(("python-nose" ,python-nose)
8732 ("python-mock" ,python-mock)))
8733 (home-page "http://github.com/celery/py-amqp")
8734 (synopsis
8735 "Low-level AMQP client for Python (fork of amqplib)")
8736 (description
8737 "This is a fork of amqplib which was originally written by Barry Pederson.
8738 It is maintained by the Celery project, and used by kombu as a pure python
8739 alternative when librabbitmq is not available.")
8740 (license license:lgpl2.1+)
8741 (properties `((python2-variant . ,(delay python2-amqp))))))
8742
8743 (define-public python2-amqp
8744 (let ((amqp (package-with-python2
8745 (strip-python2-variant python-amqp))))
8746 (package
8747 (inherit amqp)
8748 (arguments `(;; Tries to run coverage tests with nose-cover3, which seems
8749 ;; unmaintained. Weirdly, does not do this on the python 3
8750 ;; version?
8751 #:tests? #f
8752 ,@(package-arguments amqp))))))
8753
8754 (define-public python-kombu
8755 (package
8756 (name "python-kombu")
8757 (version "3.0.37")
8758 (source
8759 (origin
8760 (method url-fetch)
8761 (uri (pypi-uri "kombu" version))
8762 (sha256
8763 (base32
8764 "0l16chb314gpq2v7fh94a22c30lcv6w3ylmhsa60bldlcq6a0r70"))))
8765 (build-system python-build-system)
8766 (native-inputs
8767 `(("python-mock" ,python-mock)
8768 ("python-nose" ,python-nose)))
8769 (propagated-inputs
8770 `(("python-anyjson" ,python-anyjson)
8771 ("python-amqp" ,python-amqp)
8772 ("python-redis" ,python-redis)))
8773 (home-page "http://kombu.readthedocs.org")
8774 (synopsis "Message passing library for Python")
8775 (description "The aim of Kombu is to make messaging in Python as easy as
8776 possible by providing an idiomatic high-level interface for the AMQ protocol,
8777 and also provide proven and tested solutions to common messaging problems.
8778 AMQP is the Advanced Message Queuing Protocol, an open standard protocol for
8779 message orientation, queuing, routing, reliability and security, for which the
8780 RabbitMQ messaging server is the most popular implementation.")
8781 (license license:bsd-3)
8782 (properties `((python2-variant . ,(delay python2-kombu))))))
8783
8784 (define-public python2-kombu
8785 (let ((kombu (package-with-python2
8786 (strip-python2-variant python-kombu))))
8787 (package
8788 (inherit kombu)
8789 (native-inputs `(("python2-unittest2" ,python2-unittest2)
8790 ,@(package-native-inputs kombu))))))
8791
8792 (define-public python-billiard
8793 (package
8794 (name "python-billiard")
8795 (version "3.3.0.23")
8796 (source
8797 (origin
8798 (method url-fetch)
8799 (uri (pypi-uri "billiard" version))
8800 (sha256
8801 (base32
8802 "02wxsc6bhqvzh8j6w758kvgqbnj14l796mvmrcms8fgfamd2lak9"))))
8803 (build-system python-build-system)
8804 (native-inputs
8805 `(("python-nose" ,python-nose)))
8806 (home-page "http://github.com/celery/billiard")
8807 (synopsis
8808 "Python multiprocessing fork with improvements and bugfixes")
8809 (description
8810 "Billiard is a fork of the Python 2.7 multiprocessing package. The
8811 multiprocessing package itself is a renamed and updated version of R Oudkerk's
8812 pyprocessing package. This standalone variant is intended to be compatible with
8813 Python 2.4 and 2.5, and will draw its fixes/improvements from python-trunk.")
8814 (license license:bsd-3)
8815 (properties `((python2-variant . ,(delay python2-billiard))))))
8816
8817 (define-public python2-billiard
8818 (let ((billiard (package-with-python2
8819 (strip-python2-variant python-billiard))))
8820 (package
8821 (inherit billiard)
8822 (native-inputs `(("python2-unittest2" ,python2-unittest2)
8823 ("python2-mock" ,python2-mock)
8824 ,@(package-native-inputs billiard))))))
8825
8826 (define-public python-celery
8827 (package
8828 (name "python-celery")
8829 (version "3.1.24")
8830 (source
8831 (origin
8832 (method url-fetch)
8833 (uri (pypi-uri "celery" version))
8834 (sha256
8835 (base32
8836 "0yh2prhdnx2dgkb67a5drj12hh2zvzx5f611p7mqqg01ydghif4r"))))
8837 (build-system python-build-system)
8838 (arguments
8839 `(#:phases
8840 (modify-phases %standard-phases
8841 ;; These tests break with Python 3.5:
8842 ;; https://github.com/celery/celery/issues/2897#issuecomment-253066295
8843 (replace 'check
8844 (lambda _
8845 (zero?
8846 (system* "nosetests" "--exclude=^test_safe_to_remove.*")))))))
8847 (native-inputs
8848 `(("python-nose" ,python-nose)))
8849 (propagated-inputs
8850 `(("python-pytz" ,python-pytz)
8851 ("python-amqp" ,python-amqp)
8852 ("python-anyjson" ,python-anyjson)
8853 ("python-billiard" ,python-billiard)
8854 ("python-kombu" ,python-kombu)))
8855 (home-page "http://celeryproject.org")
8856 (synopsis "Distributed Task Queue")
8857 (description "Celery is an asynchronous task queue/job queue based on
8858 distributed message passing. It is focused on real-time operation, but
8859 supports scheduling as well. The execution units, called tasks, are executed
8860 concurrently on a single or more worker servers using multiprocessing,
8861 Eventlet, or gevent. Tasks can execute asynchronously (in the background) or
8862 synchronously (wait until ready).")
8863 (license license:bsd-3)
8864 (properties `((python2-variant . ,(delay python2-celery))))))
8865
8866 (define-public python2-celery
8867 (let ((celery (package-with-python2
8868 (strip-python2-variant python-celery))))
8869 (package
8870 (inherit celery)
8871 (native-inputs `(("python2-unittest2" ,python2-unittest2)
8872 ("python2-mock" ,python2-mock)
8873 ,@(package-native-inputs celery))))))
8874
8875 (define-public python-translitcodec
8876 (package
8877 (name "python-translitcodec")
8878 (version "0.4.0")
8879 (source
8880 (origin
8881 (method url-fetch)
8882 (uri (pypi-uri "translitcodec" version))
8883 (sha256
8884 (base32
8885 "10x6pvblkzky1zhjs8nmx64nb9jdzxad4bxhq4iwv0j4z2aqjnki"))))
8886 (build-system python-build-system)
8887 (arguments
8888 `(#:tests? #f)) ; no tests provided
8889 (home-page
8890 "https://github.com/claudep/translitcodec")
8891 (synopsis
8892 "Unicode to 8-bit charset transliteration codec")
8893 (description
8894 "This package contains codecs for transliterating ISO 10646 texts into
8895 best-effort representations using smaller coded character sets (ASCII,
8896 ISO 8859, etc.).")
8897 (license license:expat)))
8898
8899 (define-public python2-translitcodec
8900 (package-with-python2 python-translitcodec))
8901
8902 (define-public python-editor
8903 (package
8904 (name "python-editor")
8905 (version "0.5")
8906 (source
8907 (origin
8908 (method url-fetch)
8909 (uri (pypi-uri "python-editor" version))
8910 (sha256
8911 (base32
8912 "1ypnpgvzpkbwsg4rdvy4sy51j28b5xq9v8pnkwxncn07vqz06p7n"))))
8913 (build-system python-build-system)
8914 (home-page
8915 "https://github.com/fmoo/python-editor")
8916 (synopsis
8917 "Programmatically open an editor, capture the result")
8918 (description
8919 "python-editor is a library that provides the editor module for
8920 programmatically interfacing with your system's $EDITOR.")
8921 (license license:asl2.0)))
8922
8923 (define-public python2-editor
8924 (package-with-python2 python-editor))
8925
8926 (define-public python-sphinxcontrib-programoutput
8927 (package
8928 (name "python-sphinxcontrib-programoutput")
8929 (version "0.8")
8930 (source (origin
8931 (method url-fetch)
8932 (uri (pypi-uri "sphinxcontrib-programoutput" version))
8933 (sha256
8934 (base32
8935 "098as6z1s0gb4dh5xcr1fd2vpm91zj93jzvgawspxf5s4hqs0xhp"))))
8936 (build-system python-build-system)
8937 (propagated-inputs
8938 `(("python-docutils" ,python-docutils)
8939 ("python-sphinx" ,python-sphinx)))
8940 (synopsis "Sphinx extension to include program output")
8941 (description "A Sphinx extension to literally insert the output of arbitrary
8942 commands into documents, helping you to keep your command examples up to date.")
8943 (home-page "https://github.com/lunaryorn/sphinxcontrib-programoutput")
8944 (license license:bsd-2)))
8945
8946 (define-public python2-sphinxcontrib-programoutput
8947 (package-with-python2 python-sphinxcontrib-programoutput))
8948
8949 (define-public python-sphinx-repoze-autointerface
8950 (package
8951 (name "python-sphinx-repoze-autointerface")
8952 (version "0.8")
8953 (source (origin
8954 (method url-fetch)
8955 (uri (pypi-uri "repoze.sphinx.autointerface" version))
8956 (sha256
8957 (base32
8958 "08ycivzf7bh4a1zcyp31hbyqs1b2c9r26raa3vxjwwmbfqr3iw4f"))))
8959 (build-system python-build-system)
8960 (propagated-inputs
8961 `(("python-docutils" ,python-docutils)
8962 ("python-sphinx" ,python-sphinx)
8963 ("python-zope-interface" ,python-zope-interface)))
8964 (synopsis "Auto-generate Sphinx API docs from Zope interfaces")
8965 (description "This package defines an extension for the Sphinx documentation
8966 system. The extension allows generation of API documentation by
8967 introspection of @code{zope.interface} instances in code.")
8968 (home-page "https://github.com/repoze/repoze.sphinx.autointerface")
8969 (license license:repoze)))
8970
8971 (define-public python2-sphinx-repoze-autointerface
8972 (package-with-python2 python-sphinx-repoze-autointerface))
8973
8974 (define-public python-psycopg2
8975 (package
8976 (name "python-psycopg2")
8977 (version "2.6.1")
8978 (source
8979 (origin
8980 (method url-fetch)
8981 (uri (pypi-uri "psycopg2" version))
8982 (sha256
8983 (base32
8984 "0k4hshvrwsh8yagydyxgmd0pjm29lwdxkngcq9fzfzkmpsxrmkva"))))
8985 (build-system python-build-system)
8986 (arguments
8987 ;; Tests would require a postgresql database "psycopg2_test"
8988 ;; and a running postgresql database management service.
8989 `(#:tests? #f)) ; TODO re-enable after providing a test-db.
8990 (inputs
8991 `(("postgresql" ,postgresql))) ; libpq
8992 (home-page "http://initd.org/psycopg/")
8993 (synopsis "Python PostgreSQL adapter")
8994 (description
8995 "psycopg2 is a thread-safe PostgreSQL adapter that implements DB-API 2.0. ")
8996 (license license:lgpl3+)))
8997
8998 (define-public python2-psycopg2
8999 (package-with-python2 python-psycopg2))
9000
9001 (define-public python-vobject
9002 (package
9003 (name "python-vobject")
9004 (version "0.9.2")
9005 (source (origin
9006 (method url-fetch)
9007 (uri (pypi-uri "vobject" version))
9008 (sha256
9009 (base32
9010 "1qfnwlx8qwkgr6nf5wvl6ff1r3kll53dh3z6nyp173nmlhhhqccb"))))
9011 (build-system python-build-system)
9012 (arguments
9013 '(;; The test suite relies on some non-portable Windows interfaces.
9014 #:tests? #f))
9015 (propagated-inputs
9016 `(("python-dateutil-2" ,python-dateutil-2)
9017 ("python-pyicu" ,python-pyicu)))
9018 (synopsis "Parse and generate vCard and vCalendar files")
9019 (description "Vobject is intended to be a full featured Python package for
9020 parsing and generating vCard and vCalendar files. Currently, iCalendar files
9021 are supported and well tested. vCard 3.0 files are supported, and all data
9022 should be imported, but only a few components are understood in a sophisticated
9023 way.")
9024 (home-page "http://eventable.github.io/vobject/")
9025 (license license:asl2.0)))
9026
9027 (define-public python2-vobject
9028 (package-with-python2 python-vobject))
9029
9030 (define-public python-munkres
9031 (package
9032 (name "python-munkres")
9033 (version "1.0.7")
9034 (source (origin
9035 (method url-fetch)
9036 (uri (pypi-uri "munkres" version))
9037 (sha256
9038 (base32
9039 "1i6nf45i0kkzdx6k70giybsqxz4dxsjbrkrfqgjd7znfkf25sjik"))))
9040 (build-system python-build-system)
9041 (arguments
9042 '(#:tests? #f)) ; no test suite
9043 (home-page "http://software.clapper.org/munkres/")
9044 (synopsis "Implementation of the Munkres algorithm")
9045 (description "The Munkres module provides an implementation of the Munkres
9046 algorithm (also called the Hungarian algorithm or the Kuhn-Munkres algorithm),
9047 useful for solving the Assignment Problem.")
9048 (license license:bsd-3)))
9049
9050 (define-public python2-munkres
9051 (package-with-python2 python-munkres))
9052
9053 (define-public python-flask
9054 (package
9055 (name "python-flask")
9056 (version "0.10.1")
9057 (source (origin
9058 (method url-fetch)
9059 (uri (pypi-uri "Flask" version))
9060 (sha256
9061 (base32
9062 "0wrkavjdjndknhp8ya8j850jq7a1cli4g5a93mg8nh1xz2gq50sc"))))
9063 (build-system python-build-system)
9064 (propagated-inputs
9065 `(("python-itsdangerous" ,python-itsdangerous)
9066 ("python-jinja2" ,python-jinja2)
9067 ("python-werkzeug" ,python-werkzeug)))
9068 (home-page "https://github.com/mitsuhiko/flask/")
9069 (synopsis "Microframework based on Werkzeug, Jinja2 and good intentions")
9070 (description "Flask is a micro web framework based on the Werkzeug toolkit
9071 and Jinja2 template engine. It is called a micro framework because it does not
9072 presume or force a developer to use a particular tool or library.")
9073 (license license:bsd-3)))
9074
9075 (define-public python2-flask
9076 (package-with-python2 python-flask))
9077
9078 (define-public python-cookies
9079 (package
9080 (name "python-cookies")
9081 (version "2.2.1")
9082 (source (origin
9083 (method url-fetch)
9084 (uri (pypi-uri "cookies" version))
9085 (sha256
9086 (base32
9087 "13pfndz8vbk4p2a44cfbjsypjarkrall71pgc97glk5fiiw9idnn"))))
9088 (build-system python-build-system)
9089 (arguments
9090 `(;; test are broken: https://gitlab.com/sashahart/cookies/issues/3
9091 #:tests? #f))
9092 (native-inputs
9093 `(("python-pytest" ,python2-pytest)))
9094 (synopsis "HTTP cookie parser and renderer")
9095 (description "A RFC 6265-compliant HTTP cookie parser and renderer in
9096 Python.")
9097 (home-page "https://gitlab.com/sashahart/cookies")
9098 (license license:expat)))
9099
9100 (define-public python2-cookies
9101 (package-with-python2 python-cookies))
9102
9103 (define-public python-responses
9104 (package
9105 (name "python-responses")
9106 (version "0.5.1")
9107 (source (origin
9108 (method url-fetch)
9109 (uri (pypi-uri "responses" version))
9110 (sha256
9111 (base32
9112 "1spcfxixyk9k7pk82jm6zqkwk031s95lh8q0mz7539jrb7269bcc"))))
9113 (build-system python-build-system)
9114 (arguments
9115 `(;; Test suite is not distributed:
9116 ;; https://github.com/getsentry/responses/issues/38
9117 #:tests? #f))
9118 (native-inputs
9119 `(("python-cookies" ,python-cookies)
9120 ("python-mock" ,python-mock)))
9121 (propagated-inputs
9122 `(("python-requests" ,python-requests)
9123 ("python-six" ,python-six)))
9124 (home-page "https://github.com/getsentry/responses")
9125 (synopsis "Utility for mocking out the `requests` Python library")
9126 (description "A utility library for mocking out the `requests` Python
9127 library.")
9128 (license license:asl2.0)))
9129
9130 (define-public python2-responses
9131 (package-with-python2 python-responses))
9132
9133 (define-public python-whoosh
9134 (package
9135 (name "python-whoosh")
9136 (version "2.7.4")
9137 (source
9138 (origin
9139 (method url-fetch)
9140 (uri (pypi-uri "Whoosh" version))
9141 (sha256
9142 (base32
9143 "10qsqdjpbc85fykc1vgcs8xwbgn4l2l52c8d83xf1q59pwyn79bw"))))
9144 (build-system python-build-system)
9145 (native-inputs
9146 `(("python-pytest" ,python-pytest)))
9147 (home-page "http://bitbucket.org/mchaput/whoosh")
9148 (synopsis "Full text indexing, search, and spell checking library")
9149 (description
9150 "Whoosh is a fast, pure-Python full text indexing, search, and spell
9151 checking library.")
9152 (license license:bsd-2)))
9153
9154 (define-public python2-whoosh
9155 (let ((whoosh (package-with-python2 (strip-python2-variant python-whoosh))))
9156 (package (inherit whoosh)
9157 (propagated-inputs
9158 `(("python2-backport-ssl-match-hostname"
9159 ,python2-backport-ssl-match-hostname)
9160 ,@(package-propagated-inputs whoosh))))))
9161
9162 (define-public python-pathlib
9163 (package
9164 (name "python-pathlib")
9165 (version "1.0.1")
9166 (source (origin
9167 (method url-fetch)
9168 (uri (pypi-uri "pathlib" version))
9169 (sha256
9170 (base32
9171 "17zajiw4mjbkkv6ahp3xf025qglkj0805m9s41c45zryzj6p2h39"))))
9172 (build-system python-build-system)
9173 ;; The tests depend on the internal "test" module, which does not provide
9174 ;; a stable interface.
9175 (arguments `(#:tests? #f))
9176 (home-page "https://pathlib.readthedocs.org/")
9177 (synopsis "Object-oriented file system paths")
9178 (description "Pathlib offers a set of classes to handle file system paths.
9179 It offers the following advantages over using string objects:
9180
9181 @enumerate
9182 @item No more cumbersome use of os and os.path functions. Everything can
9183 be done easily through operators, attribute accesses, and method calls.
9184 @item Embodies the semantics of different path types. For example,
9185 comparing Windows paths ignores casing.
9186 @item Well-defined semantics, eliminating any inconsistencies or
9187 ambiguities (forward vs. backward slashes, etc.).
9188 @end enumerate
9189
9190 Note: In Python 3.4, pathlib is now part of the standard library. For other
9191 Python versions please consider python-pathlib2 instead, which tracks the
9192 standard library module. This module (python-pathlib) isn't maintained
9193 anymore.")
9194 (license license:expat)))
9195
9196 (define-public python2-pathlib
9197 (package-with-python2 python-pathlib))
9198
9199 (define-public python2-pathlib2
9200 (package
9201 (name "python2-pathlib2")
9202 (version "2.1.0")
9203 (source (origin
9204 (method url-fetch)
9205 (uri (pypi-uri "pathlib2" version))
9206 (sha256
9207 (base32
9208 "0p050msg5c8d0kadv702jnfshaxrb0il765cpkgnhn6mq5hakcyy"))))
9209 (build-system python-build-system)
9210 ;; We only need the the Python 2 variant, since for Python 3 our minimum
9211 ;; version is 3.4 which already includes this package as part of the
9212 ;; standard library.
9213 (arguments
9214 `(#:python ,python-2))
9215 (native-inputs
9216 `(("python2-six" ,python2-six)))
9217 (home-page "http://pypi.python.org/pypi/pathlib2/")
9218 (synopsis "Object-oriented file system paths - backport of standard
9219 pathlib module")
9220 (description "The goal of pathlib2 is to provide a backport of standard
9221 pathlib module which tracks the standard library module, so all the newest
9222 features of the standard pathlib can be used also on older Python versions.
9223
9224 Pathlib offers a set of classes to handle file system paths. It offers the
9225 following advantages over using string objects:
9226
9227 @enumerate
9228 @item No more cumbersome use of os and os.path functions. Everything can
9229 be done easily through operators, attribute accesses, and method calls.
9230 @item Embodies the semantics of different path types. For example,
9231 comparing Windows paths ignores casing.
9232 @item Well-defined semantics, eliminating any inconsistencies or
9233 ambiguities (forward vs. backward slashes, etc.).
9234 @end enumerate")
9235 (license license:expat)))
9236
9237 (define-public python-jellyfish
9238 (package
9239 (name "python-jellyfish")
9240 (version "0.5.3")
9241 (source (origin
9242 (method url-fetch)
9243 (uri (pypi-uri "jellyfish" version))
9244 (sha256
9245 (base32
9246 "12bxh8cy9xmvyrjz7aw159nd5pyvb645rkvw4r6bvm4xbvs8gd07"))))
9247 (build-system python-build-system)
9248 (native-inputs
9249 `(("python-pytest" ,python-pytest)))
9250 (home-page "https://github.com/jamesturk/jellyfish")
9251 (synopsis "Approximate and phonetic matching of strings")
9252 (description "Jellyfish uses a variety of string comparison and phonetic
9253 encoding algorithms to do fuzzy string matching.")
9254 (license license:bsd-2)
9255 (properties `((python2-variant . ,(delay python2-jellyfish))))))
9256
9257 (define-public python2-jellyfish
9258 (let ((jellyfish (package-with-python2
9259 (strip-python2-variant python-jellyfish))))
9260 (package (inherit jellyfish)
9261 (native-inputs `(("python2-unicodecsv" ,python2-unicodecsv)
9262 ,@(package-native-inputs jellyfish))))))
9263
9264 (define-public python2-unicodecsv
9265 (package
9266 (name "python2-unicodecsv")
9267 (version "0.14.1")
9268 (source (origin
9269 (method url-fetch)
9270 ;; The test suite is not included in the PyPi release.
9271 ;; https://github.com/jdunck/python-unicodecsv/issues/19
9272 (uri (string-append "https://github.com/jdunck/python-unicodecsv/"
9273 "archive/" version ".tar.gz"))
9274 (file-name (string-append name "-" version ".tar.gz"))
9275 (sha256
9276 (base32
9277 "087nqanfcyp6mlfbbr5lva5f3w6iz1bybls9xlrb8icmc474wh4w"))))
9278 (build-system python-build-system)
9279 (arguments
9280 `(;; It supports Python 3, but Python 3 can already do Unicode CSV.
9281 #:python ,python-2))
9282 (native-inputs
9283 `(("python2-unittest2" ,python2-unittest2)))
9284 (home-page "https://github.com/jdunck/python-unicodecsv")
9285 (synopsis "Unicode CSV module for Python 2")
9286 (description "Unicodecsv is a drop-in replacement for Python 2.7's CSV
9287 module, adding support for Unicode strings.")
9288 (license license:bsd-2)))
9289
9290 (define-public python-rarfile
9291 (package
9292 (name "python-rarfile")
9293 (version "2.7")
9294 (source (origin
9295 (method url-fetch)
9296 (uri (pypi-uri "rarfile" version))
9297 (sha256
9298 (base32
9299 "0d8n1dlpiz7av8dmbp0vclrwl9cnxizr4f2c9xvj1h5nvn480527"))
9300 ;; https://github.com/markokr/rarfile/pull/17/
9301 (patches (search-patches "python-rarfile-fix-tests.patch"))))
9302 (build-system python-build-system)
9303 (arguments
9304 '(#:phases
9305 (modify-phases %standard-phases
9306 (replace 'check
9307 ;; Many tests fail, but the installation proceeds.
9308 (lambda _ (zero? (system* "make" "-C" "test" "test")))))))
9309 (native-inputs
9310 `(("which" ,which))) ; required for tests
9311 (propagated-inputs
9312 `(("libarchive" ,libarchive)))
9313 (home-page "https://github.com/markokr/rarfile")
9314 (synopsis "RAR archive reader for Python")
9315 (description "This is Python module for RAR archive reading. The interface
9316 is made as zipfile like as possible.")
9317 (license license:isc)))
9318
9319 (define-public python2-rarfile
9320 (package-with-python2 python-rarfile))
9321
9322 (define-public python-magic
9323 (package
9324 (name "python-magic")
9325 (version "0.4.3")
9326 (source
9327 (origin
9328 (method url-fetch)
9329 (uri (string-append "https://github.com/ahupp/python-magic/archive/"
9330 version ".tar.gz"))
9331 (sha256
9332 (base32
9333 "17bgy92i7sb021f2s4mw1dcvpm6p1mi9jihridwy1pyn8mzvpjgk"))
9334 (file-name (string-append name "-" version "-checkout"))))
9335 (build-system python-build-system)
9336 (arguments
9337 ;; The tests are unreliable, so don't run them. The tests fail
9338 ;; under Python3 because they were written for Python2 and
9339 ;; contain import statements that do not work in Python3. One of
9340 ;; the tests fails under Python2 because its assertions are
9341 ;; overly stringent; it relies on comparing output strings which
9342 ;; are brittle and can change depending on the version of
9343 ;; libmagic being used and the system on which the test is
9344 ;; running. In my case, under GuixSD 0.10.0, only one test
9345 ;; failed, and it seems to have failed only because the version
9346 ;; of libmagic that is packaged in Guix outputs a slightly
9347 ;; different (but not wrong) string than the one that the test
9348 ;; expected.
9349 '(#:tests? #f
9350 #:phases (modify-phases %standard-phases
9351 ;; Replace a specific method call with a hard-coded
9352 ;; path to the necessary libmagic.so file in the
9353 ;; store. If we don't do this, then the method call
9354 ;; will fail to find the libmagic.so file, which in
9355 ;; turn will cause any application using
9356 ;; python-magic to fail.
9357 (add-before 'build 'hard-code-path-to-libmagic
9358 (lambda* (#:key inputs #:allow-other-keys)
9359 (let ((file (assoc-ref inputs "file")))
9360 (substitute* "magic.py"
9361 (("ctypes.util.find_library\\('magic'\\)")
9362 (string-append "'" file "/lib/libmagic.so'")))
9363 #t)))
9364 (add-before 'install 'disable-egg-compression
9365 (lambda _
9366 (let ((port (open-file "setup.cfg" "a")))
9367 (display "\n[easy_install]\nzip_ok = 0\n"
9368 port)
9369 (close-port port)
9370 #t))))))
9371 (inputs
9372 ;; python-magic needs to be able to find libmagic.so.
9373 `(("file" ,file)))
9374 (home-page "https://github.com/ahupp/python-magic")
9375 (synopsis "File type identification using libmagic")
9376 (description
9377 "This module uses ctypes to access the libmagic file type
9378 identification library. It makes use of the local magic database and
9379 supports both textual and MIME-type output. Note that this module and
9380 the python-file module both provide a \"magic.py\" file; these two
9381 modules, which are different and were developed separately, both serve
9382 the same purpose: to provide Python bindings for libmagic.")
9383 (license license:expat)))
9384
9385 (define-public python2-magic
9386 (package-with-python2 python-magic))
9387
9388 (define-public python2-s3cmd
9389 (package
9390 (name "python2-s3cmd")
9391 (version "1.6.1")
9392 (source
9393 (origin
9394 (method url-fetch)
9395 (uri (string-append "mirror://sourceforge/s3tools/s3cmd/" version "/"
9396 "s3cmd-" version ".tar.gz"))
9397 (sha256
9398 (base32
9399 "0ki1rzhm5icvi9ry5jswi4b22yqwyj0d2wsqsgilwx6qhi7pjxa6"))))
9400 (build-system python-build-system)
9401 (arguments
9402 ;; s3cmd is written for python2 only and contains no tests.
9403 `(#:python ,python-2
9404 #:tests? #f))
9405 (propagated-inputs
9406 `(("python2-dateutil" ,python2-dateutil)
9407 ;; The python-file package also provides a magic.py module.
9408 ;; This is an unfortunate state of affairs; however, s3cmd
9409 ;; fails to install if it cannot find specifically the
9410 ;; python-magic package. Thus we include it, instead of using
9411 ;; python-file. Ironically, s3cmd sometimes works better
9412 ;; without libmagic bindings at all:
9413 ;; https://github.com/s3tools/s3cmd/issues/198
9414 ("python2-magic" ,python2-magic)))
9415 (home-page "http://s3tools.org/s3cmd")
9416 (synopsis "Command line tool for S3-compatible storage services")
9417 (description
9418 "S3cmd is a command line tool for uploading, retrieving and managing data
9419 in storage services that are compatible with the Amazon Simple Storage
9420 Service (S3) protocol, including S3 itself. It supports rsync-like backup,
9421 GnuPG encryption, and more. It also supports management of Amazon's
9422 CloudFront content delivery network.")
9423 (license license:gpl2+)))
9424
9425 (define-public python-pkgconfig
9426 (package
9427 (name "python-pkgconfig")
9428 (version "1.1.0")
9429 (source
9430 (origin
9431 (method url-fetch)
9432 (uri (pypi-uri "pkgconfig" version))
9433 (sha256
9434 (base32
9435 "1pw0kmvc57sjmaxi6c54fqsnihqj6hvhc9y1vaz36axafzqam7bh"))))
9436 (build-system python-build-system)
9437 (native-inputs
9438 `(("python-nose" ,python-nose)))
9439 (inputs
9440 `(("pkg-config" ,pkg-config)))
9441 (arguments
9442 `(;; Tests fail with "ValueError: _type_ 'v' not supported" on Python 3,
9443 ;; and on Python 2 they need the dl module deprecated since Python 2.6.
9444 #:tests? #f
9445 ;; Hard-code the path to pkg-config.
9446 #:phases
9447 (modify-phases %standard-phases
9448 (add-before
9449 'build 'patch
9450 (lambda _
9451 (substitute* "pkgconfig/pkgconfig.py"
9452 (("cmd = 'pkg-config")
9453 (string-append "cmd = '" (which "pkg-config"))))
9454 #t)))))
9455 (home-page "http://github.com/matze/pkgconfig")
9456 (synopsis "Python interface for pkg-config")
9457 (description "This module provides a Python interface to pkg-config. It
9458 can be used to find all pkg-config packages, check if a package exists,
9459 check if a package meets certain version requirements, query CFLAGS and
9460 LDFLAGS and parse the output to build extensions with setup.py.")
9461 (license license:expat)))
9462
9463 (define-public python2-pkgconfig
9464 (package-with-python2 python-pkgconfig))
9465
9466 (define-public python-bz2file
9467 (package
9468 (name "python-bz2file")
9469 (version "0.98")
9470 (source
9471 (origin
9472 (method url-fetch)
9473 (uri (pypi-uri "bz2file" version))
9474 (sha256
9475 (base32
9476 "126s53fkpx04f33a829yqqk8fj4png3qwg4m66cvlmhmwc8zihb4"))))
9477 (build-system python-build-system)
9478 (arguments
9479 `(#:tests? #f)) ; Tests use deprecated python modules.
9480 (home-page "https://github.com/nvawda/bz2file")
9481 (synopsis "Read and write bzip2-compressed files")
9482 (description
9483 "Bz2file is a Python library for reading and writing bzip2-compressed
9484 files. It contains a drop-in replacement for the I/O interface in the
9485 standard library's @code{bz2} module, including features from the latest
9486 development version of CPython that are not available in older releases.")
9487 (license license:asl2.0)
9488 (properties `((python2-variant . ,(delay python2-bz2file))))))
9489
9490 (define-public python2-bz2file
9491 (let ((base (package-with-python2
9492 (strip-python2-variant python-bz2file))))
9493 (package
9494 (inherit base)
9495 (arguments
9496 `(#:python ,python-2
9497 #:phases
9498 (modify-phases %standard-phases
9499 ;; 'python setup.py test' does not work as of 0.98.
9500 ;; There is only the one test file, so we run it directly.
9501 (replace 'check
9502 (lambda _ (zero? (system* "python"
9503 "test_bz2file.py"))))))))))
9504
9505 (define-public python-future
9506 (package
9507 (name "python-future")
9508 (version "0.15.2")
9509 (source
9510 (origin
9511 (method url-fetch)
9512 (uri (pypi-uri "future" version))
9513 (sha256
9514 (base32
9515 "15wvcfzssc68xqnqi1dq4fhd0848hwi9jn42hxyvlqna40zijfrx"))))
9516 (build-system python-build-system)
9517 ;; Many tests connect to the network or are otherwise flawed.
9518 ;; https://github.com/PythonCharmers/python-future/issues/210
9519 (arguments
9520 `(#:tests? #f))
9521 (home-page "http://python-future.org")
9522 (synopsis "Single-source support for Python 3 and 2")
9523 (description
9524 "@code{python-future} is the missing compatibility layer between Python 2 and
9525 Python 3. It allows you to use a single, clean Python 3.x-compatible codebase
9526 to support both Python 2 and Python 3 with minimal overhead.")
9527 (license license:expat)))
9528
9529 (define-public python2-future
9530 (package-with-python2 python-future))
9531
9532 (define-public python-cysignals
9533 (package
9534 (name "python-cysignals")
9535 (version "1.1.0")
9536 (source
9537 (origin
9538 (method url-fetch)
9539 (uri (pypi-uri "cysignals" version ".tar.bz2"))
9540 (sha256
9541 (base32
9542 "14cbyd9znlz6cxy1s3g6v6dv5jj45hn27pywkidd9b1zanaysqc6"))))
9543 (build-system python-build-system)
9544 (native-inputs
9545 `(("python-cython" ,python-cython)
9546 ("python-sphinx" ,python-sphinx)))
9547 (inputs
9548 `(("pari-gp" ,pari-gp)))
9549 (arguments
9550 `(#:modules ((guix build python-build-system)
9551 ((guix build gnu-build-system) #:prefix gnu:)
9552 (guix build utils))
9553 ;; FIXME: Tests are executed after installation and currently fail
9554 ;; when not installing into standard locations; the author is working
9555 ;; on a fix.
9556 #:tests? #f
9557 #:phases
9558 (modify-phases %standard-phases
9559 (add-before
9560 'build 'configure
9561 (assoc-ref gnu:%standard-phases 'configure)))))
9562 (home-page
9563 "https://github.com/sagemath/cysignals")
9564 (synopsis
9565 "Handling of interrupts and signals for Cython")
9566 (description
9567 "The cysignals package provides mechanisms to handle interrupts (and
9568 other signals and errors) in Cython code, using two related approaches,
9569 for mixed Cython/Python code or external C libraries and pure Cython code,
9570 respectively.")
9571 (license license:lgpl3+)))
9572
9573 (define-public python2-cysignals
9574 (package-with-python2 python-cysignals))
9575
9576 (define-public python2-shedskin
9577 (package
9578 (name "python2-shedskin")
9579 (version "0.9.4")
9580 (source
9581 (origin
9582 (method url-fetch)
9583 (uri (string-append "https://github.com/shedskin/shedskin/"
9584 "releases/download/v" version
9585 "/shedskin-" version ".tgz"))
9586 (sha256
9587 (base32
9588 "0nzwrzgw1ga8rw6f0ryq7zr9kkiavd1cqz5hzxkcbicl1dk7kz41"))))
9589 (build-system python-build-system)
9590 (arguments
9591 `(#:python ,python-2
9592 #:phases (modify-phases %standard-phases
9593 (add-after 'unpack 'fix-resulting-include-libs
9594 (lambda* (#:key inputs #:allow-other-keys)
9595 (let ((libgc (assoc-ref inputs "libgc"))
9596 (pcre (assoc-ref inputs "pcre")))
9597 (substitute* "shedskin/makefile.py"
9598 (("variable == 'CCFLAGS':[ ]*")
9599 (string-append "variable == 'CCFLAGS':\n"
9600 " line += ' -I " pcre "/include"
9601 " -I " libgc "/include'"))
9602 (("variable == 'LFLAGS':[ ]*")
9603 (string-append "variable == 'LFLAGS':\n"
9604 " line += ' -L" pcre "/lib"
9605 " -L " libgc "/lib'")))
9606 #t))))))
9607 (inputs `(("pcre" ,pcre)
9608 ("libgc" ,libgc)))
9609 (home-page "https://shedskin.github.io/")
9610 (synopsis "Experimental Python-2 to C++ Compiler")
9611 (description (string-append "This is an experimental compiler for a subset of
9612 Python. It generates C++ code and a Makefile."))
9613 (license (list license:gpl3 license:bsd-3 license:expat))))
9614
9615 (define-public python2-rope
9616 (package
9617 (name "python2-rope")
9618 (version "0.10.3")
9619 (source
9620 (origin
9621 (method url-fetch)
9622 (uri (pypi-uri "rope" version))
9623 (sha256
9624 (base32
9625 "18k5znhpwvrfck3yp0jmhd5j8r0f0s8bk1zh5yhs2cfgmfhbwigb"))))
9626 (arguments
9627 ;; Rope is currently python-2 only.
9628 ;; https://github.com/python-rope/rope/issues/57
9629 `(#:python ,python-2))
9630 (build-system python-build-system)
9631 (native-inputs
9632 `(("python2-unittest2" ,python2-unittest2)))
9633 (home-page "https://github.com/python-rope/rope")
9634 (synopsis "Refactoring library for Python")
9635 (description "Rope is a refactoring library for Python. It facilitates
9636 the renaming, moving and extracting of attributes, functions, modules, fields
9637 and parameters in Python 2 source code. These refactorings can also be applied
9638 to occurences in strings and comments.")
9639 (license license:gpl2)))
9640
9641 (define-public python-py3status
9642 (package
9643 (name "python-py3status")
9644 (version "3.1")
9645 (source
9646 (origin
9647 (method url-fetch)
9648 (uri (pypi-uri "py3status" version))
9649 (sha256
9650 (base32
9651 "0i283z1pivmir61z8kbiycigc94l61v33ygzkhczf1ifq7cppyds"))))
9652 (build-system python-build-system)
9653 (home-page "https://github.com/ultrabug/py3status")
9654 (synopsis "Extensible i3status wrapper written in Python")
9655 (description "py3status is an i3status wrapper which extends i3status
9656 functionality in a modular way, allowing you to extend your panel with your
9657 own code, responding to click events and updating clock every second.")
9658 (license license:bsd-3)))
9659
9660 (define-public python-tblib
9661 (package
9662 (name "python-tblib")
9663 (version "1.3.0")
9664 (source (origin
9665 (method url-fetch)
9666 (uri (pypi-uri "tblib" version))
9667 (sha256 (base32
9668 "02iahfkfa927hb4jq2bak36ldihwapzacfiq5lyxg8llwn98a1yi"))))
9669 (build-system python-build-system)
9670 (arguments
9671 `(#:phases
9672 (modify-phases %standard-phases
9673 (replace 'check
9674 (lambda _
9675 ;; Upstream runs tests after installation and the package itself
9676 ;; resides in a subdirectory. Extend PYTHONPATH so it will be
9677 ;; found.
9678 (setenv "PYTHONPATH"
9679 (string-append (getcwd) "/build/lib:"
9680 (getenv "PYTHONPATH")))
9681 (zero? (system* "py.test" "-vv" "tests" "README.rst")))))))
9682 (native-inputs
9683 `(("python-pytest" ,python-pytest)
9684 ("python-six" ,python-six)))
9685 (home-page "https://github.com/ionelmc/python-tblib")
9686 (synopsis "Traceback serialization library")
9687 (description
9688 "Traceback serialization allows you to:
9689
9690 @enumerate
9691 @item Pickle tracebacks and raise exceptions with pickled tracebacks in
9692 different processes. This allows better error handling when running code over
9693 multiple processes (imagine multiprocessing, billiard, futures, celery etc).
9694
9695 @item Parse traceback strings and raise with the parsed tracebacks.
9696 @end itemize")
9697 (license license:bsd-3)))
9698
9699 (define-public python2-tblib
9700 (package-with-python2 python-tblib))
9701
9702 (define-public python-sqlparse
9703 (package
9704 (name "python-sqlparse")
9705 (version "0.1.19")
9706 (source (origin
9707 (method url-fetch)
9708 (uri (pypi-uri "sqlparse" version))
9709 (sha256
9710 (base32
9711 "1s2fvaxgh9kqzrd6iwy5h7i61ckn05plx9np13zby93z3hdbx5nq"))))
9712 (build-system python-build-system)
9713 (arguments
9714 `(#:phases
9715 (modify-phases %standard-phases
9716 (replace 'check
9717 (lambda* _
9718 ;; setup.py-integrated 2to3 only affects the build files, but
9719 ;; py.test is using the source files. So we need to convert them
9720 ;; manually.
9721 (when (zero? (system* "python3"))
9722 (system* "2to3" "--no-diff" "-wn" "sqlparse" "tests"))
9723 (zero? (system* "py.test")))))))
9724 (native-inputs
9725 `(("python-pytest" ,python-pytest)))
9726 (home-page "https://github.com/andialbrecht/sqlparse")
9727 (synopsis "Non-validating SQL parser")
9728 (description "Sqlparse is a non-validating SQL parser for Python. It
9729 provides support for parsing, splitting and formatting SQL statements.")
9730 (license license:bsd-3)))
9731
9732 (define-public python2-sqlparse
9733 (package-with-python2 python-sqlparse))
9734
9735 (define-public python-greenlet
9736 (package
9737 (name "python-greenlet")
9738 (version "0.4.9")
9739 (source (origin
9740 (method url-fetch)
9741 (uri (pypi-uri "greenlet" version))
9742 (sha256
9743 (base32
9744 "04h0m54dyqg49vyarq26mry6kbivnpl47rnmmrk9qn8wpfxviybr"))))
9745 (build-system python-build-system)
9746 (home-page "https://greenlet.readthedocs.io/")
9747 (synopsis "Lightweight in-process concurrent programming")
9748 (description
9749 "Greenlet package is a spin-off of Stackless, a version of CPython
9750 that supports micro-threads called \"tasklets\". Tasklets run
9751 pseudo-concurrently (typically in a single or a few OS-level threads) and
9752 are synchronized with data exchanges on \"channels\".")
9753 (license (list license:psfl license:expat))))
9754
9755 (define-public python2-greenlet
9756 (package-with-python2 python-greenlet))
9757
9758 (define-public python-gevent
9759 (package
9760 (name "python-gevent")
9761 (version "1.1.1")
9762 (source (origin
9763 (method url-fetch)
9764 (uri (pypi-uri "gevent" version))
9765 (sha256
9766 (base32
9767 "1smf3kvidpdiyi2c81alal74p2zm0clrm6xbyy6y1k9a3f2vkrbf"))
9768 (modules '((guix build utils)))
9769 (snippet
9770 '(begin
9771 ;; unbunding libev and c-ares
9772 (for-each delete-file-recursively '("libev" "c-ares"))
9773 ;; fixing testsuite
9774 (call-with-output-file "greentest/__init__.py" noop)
9775 (substitute* "greentest/testrunner.py"
9776 (("import util") "from . import util")
9777 (("from util import log") "from .util import log"))))))
9778 (build-system python-build-system)
9779 (propagated-inputs
9780 `(("python-greenlet" ,python-greenlet)))
9781 (native-inputs
9782 `(("python-six" ,python-six)))
9783 (inputs
9784 `(("c-ares" ,c-ares)
9785 ("libev" ,libev)))
9786 (home-page "http://www.gevent.org/")
9787 (synopsis "Coroutine-based network library")
9788 (description
9789 "gevent is a coroutine-based Python networking library that uses greenlet
9790 to provide a high-level synchronous API on top of the libev event loop.")
9791 (license license:expat)))
9792
9793 (define-public python2-gevent
9794 (package-with-python2 python-gevent))
9795
9796 (define-public python-twisted
9797 (package
9798 (name "python-twisted")
9799 (version "16.2.0")
9800 (source (origin
9801 (method url-fetch)
9802 (uri (pypi-uri "Twisted" version ".tar.bz2"))
9803 (sha256
9804 (base32
9805 "0ydxrp9myw1mvsz3qfzx5579y5llmqa82pxvqchgp5syczffi450"))))
9806 (build-system python-build-system)
9807 (propagated-inputs
9808 `(("python-zope-interface" ,python-zope-interface)))
9809 (home-page "https://twistedmatrix.com/")
9810 (synopsis "Asynchronous networking framework written in Python")
9811 (description
9812 "Twisted is an extensible framework for Python programming, with special
9813 focus on event-based network programming and multiprotocol integration.")
9814 (license license:expat)))
9815
9816 (define-public python2-twisted
9817 (package-with-python2 python-twisted))
9818
9819 (define-public python-pika
9820 (package
9821 (name "python-pika")
9822 (version "0.10.0")
9823 (source
9824 (origin
9825 (method url-fetch)
9826 (uri (pypi-uri "pika" version))
9827 (sha256
9828 (base32
9829 "0nb4h08di432lv7dy2v9kpwgk0w92f24sqc2hw2s9vwr5b8v8xvj"))))
9830 (build-system python-build-system)
9831 (native-inputs
9832 `(("python-pyev" ,python-pyev)
9833 ("python-tornado" ,python-tornado)
9834 ("python-twisted" ,python-twisted)))
9835 (home-page "https://pika.readthedocs.org")
9836 (synopsis "Pure Python AMQP Client Library")
9837 (description
9838 "Pika is a pure-Python implementation of the AMQP (Advanced Message Queuing
9839 Protocol) 0-9-1 protocol that tries to stay fairly independent of the underlying
9840 network support library.")
9841 (license license:bsd-3)))
9842
9843 (define-public python2-pika
9844 (package-with-python2 python-pika))
9845
9846 (define-public python-ply
9847 (package
9848 (name "python-ply")
9849 (version "3.8")
9850 (source
9851 (origin
9852 (method url-fetch)
9853 (uri (string-append
9854 "https://pypi.python.org/packages/"
9855 "96/e0/430fcdb6b3ef1ae534d231397bee7e9304be14a47a267e82ebcb3323d0b5"
9856 "/ply-" version ".tar.gz"))
9857 (sha256
9858 (base32
9859 "1f70ipynmiy09k6px2j7v4w5cdrc21za3xs2k6f1bsvb0bzvvlg7"))))
9860 (build-system python-build-system)
9861 (home-page "http://www.dabeaz.com/ply/")
9862 (synopsis "Python Lex & Yacc")
9863 (description "PLY is a @code{lex}/@code{yacc} implemented purely in Python.
9864 It uses LR parsing and does extensive error checking.")
9865 (license license:bsd-3)))
9866
9867 (define-public python2-ply
9868 (package-with-python2 python-ply))
9869
9870 (define-public python-tabulate
9871 (package
9872 (name "python-tabulate")
9873 (version "0.7.5")
9874 (source (origin
9875 (method url-fetch)
9876 (uri (pypi-uri "tabulate" version))
9877 (sha256
9878 (base32
9879 "03l1r7ddd1a0j2snv1yd0hlnghjad3fg1an1jr8936ksv75slwch"))
9880 ;; Fix tests
9881 (modules '((guix build utils)))
9882 (snippet '(substitute* '("test/test_cli.py"
9883 "test/test_input.py"
9884 "test/test_output.py"
9885 "test/test_regression.py")
9886 (("from common") "from nose.tools")))))
9887 (build-system python-build-system)
9888 (native-inputs
9889 `(;; For testing
9890 ("python-nose" ,python-nose)))
9891 (home-page "https://bitbucket.org/astanin/python-tabulate")
9892 (synopsis "Pretty-print tabular data")
9893 (description
9894 "Tabulate is a library and command-line utility to pretty-print tabular
9895 data in Python.")
9896 (license license:expat)))
9897
9898 (define-public python2-tabulate
9899 (package-with-python2 python-tabulate))
9900
9901 (define-public python-kazoo
9902 (package
9903 (name "python-kazoo")
9904 (version "2.2.1")
9905 (source
9906 (origin
9907 (method url-fetch)
9908 (uri (pypi-uri "kazoo" version))
9909 (sha256
9910 (base32
9911 "10pb864if9qi2pq9lfb9m8f7z7ss6rml80gf1d9h64lap5crjnjj"))))
9912 (build-system python-build-system)
9913 (arguments '(#:tests? #f)) ; XXX: needs zookeeper
9914 (propagated-inputs
9915 `(("python-six" ,python-six)))
9916 (home-page "https://kazoo.readthedocs.org")
9917 (synopsis "High-level Zookeeper client library")
9918 (description
9919 "Kazoo is a Python client library for the Apache Zookeeper distributed
9920 application service. It is designed to be easy to use and to avoid common
9921 programming errors.")
9922 (license license:asl2.0)))
9923
9924 (define-public python2-kazoo
9925 (package-with-python2 python-kazoo))
9926
9927 (define-public python-pykafka
9928 (package
9929 (name "python-pykafka")
9930 (version "2.4.0")
9931 (source (origin
9932 (method url-fetch)
9933 (uri (string-append
9934 "https://pypi.python.org/packages/8b/3e/"
9935 "384eeff406b06315738b62483fd2126c6e4f544167116b17cc04ea7d2a59/"
9936 "pykafka-" version ".tar.gz"))
9937 (sha256
9938 (base32
9939 "1id6sr159p6aa13bxcqyr9gln8sqg1l0ddzns5iws8kk5q1p5cfv"))))
9940 (build-system python-build-system)
9941 (arguments '(#:tests? #f)) ; XXX: needs zookeeper, kafka, etc.
9942 (propagated-inputs
9943 `(("python-gevent" ,python-gevent)
9944 ("python-kazoo" ,python-kazoo)
9945 ("python-tabulate" ,python-tabulate)))
9946 (inputs
9947 `(("librdkafka" ,librdkafka)))
9948 (home-page "https://pykafka.readthedocs.io/")
9949 (synopsis "Apache Kafka client for Python")
9950 (description
9951 "PyKafka is a client for the Apache Kafka distributed messaging system.
9952 It includes Python implementations of Kafka producers and consumers, which
9953 are optionally backed by a C extension built on librdkafka.")
9954 (license license:asl2.0)))
9955
9956 (define-public python2-pykafka
9957 (package-with-python2 python-pykafka))
9958
9959 (define-public python-wcwidth
9960 (package
9961 (name "python-wcwidth")
9962 (version "0.1.6")
9963 (source
9964 (origin
9965 (method url-fetch)
9966 (uri (string-append
9967 "https://pypi.python.org/packages/"
9968 "c2/d1/7689293086a8d5320025080cde0e3155b94ae0a7496fb89a3fbaa92c354a/"
9969 "wcwidth-" version ".tar.gz"))
9970 (sha256
9971 (base32
9972 "02wjrpf001gjdjsaxxbzcwfg19crlk2dbddayrfc2v06f53yrcyw"))))
9973 (build-system python-build-system)
9974 (home-page "https://github.com/jquast/wcwidth")
9975 (synopsis "Measure number of terminal column cells of wide-character codes")
9976 (description "Wcwidth measures the number of terminal column cells of
9977 wide-character codes. It is useful for those implementing a terminal emulator,
9978 or programs that carefully produce output to be interpreted by one. It is a
9979 Python implementation of the @code{wcwidth} and @code{wcswidth} C functions
9980 specified in POSIX.1-2001 and POSIX.1-2008.")
9981 (license license:expat)))
9982
9983 (define-public python2-wcwidth
9984 (package-with-python2 python-wcwidth))
9985
9986 (define-public python2-jsonrpclib
9987 (package
9988 (name "python2-jsonrpclib")
9989 (version "0.1.7")
9990 (source (origin
9991 (method url-fetch)
9992 (uri (string-append
9993 "https://pypi.python.org/packages/source/j/jsonrpclib/"
9994 "jsonrpclib-" version ".tar.gz"))
9995 (sha256
9996 (base32
9997 "02vgirw2bcgvpcxhv5hf3yvvb4h5wzd1lpjx8na5psdmaffj6l3z"))))
9998 (build-system python-build-system)
9999 (arguments
10000 `(#:tests? #f
10001 #:python ,python-2))
10002 (home-page "https://github.com/joshmarshall/jsonrpclib/")
10003 (synopsis "Implementation of JSON-RPC specification for Python")
10004 (description
10005 "This library is an implementation of the JSON-RPC specification.
10006 It supports both the original 1.0 specification, as well as the
10007 new (proposed) 2.0 spec, which includes batch submission, keyword arguments,
10008 etc.")
10009 (license license:asl2.0)))
10010
10011 (define-public python-chai
10012 (package
10013 (name "python-chai")
10014 (version "1.1.1")
10015 (source (origin
10016 (method url-fetch)
10017 (uri (pypi-uri "chai" version))
10018 (sha256
10019 (base32
10020 "016kf3irrclpkpvcm7q0gmkfibq7jgy30a9v73pp42bq9h9a32bl"))))
10021 (build-system python-build-system)
10022 (home-page "https://github.com/agoragames/chai")
10023 (synopsis "Mocking framework for Python")
10024 (description
10025 "Chai provides an api for mocking, stubbing and spying your python
10026 objects, patterned after the Mocha library for Ruby.")
10027 (license license:bsd-3)))
10028
10029 (define-public python2-chai
10030 (package-with-python2 python-chai))
10031
10032 (define-public python-arrow
10033 (package
10034 (name "python-arrow")
10035 (version "0.8.0")
10036 (source (origin
10037 (method url-fetch)
10038 (uri (pypi-uri "arrow" version))
10039 (sha256
10040 (base32
10041 "1bz7hkdgpqcjs866y58z8jywpy7al0f4rxdr00bh2l5qddyw245j"))))
10042 (build-system python-build-system)
10043 (native-inputs
10044 `(;; For testing
10045 ("python-chai" ,python-chai)
10046 ("python-simplejson" ,python-simplejson)))
10047 (propagated-inputs
10048 `(("python-dateutil" ,python-dateutil-2)))
10049 (home-page "https://github.com/crsmithdev/arrow/")
10050 (synopsis "Dates and times for Python")
10051 (description
10052 "Arrow is a Python library to creating, manipulating, formatting and
10053 converting dates, times, and timestamps. It implements and updates the
10054 datetime type.")
10055 (license license:asl2.0)))
10056
10057 (define-public python2-arrow
10058 (package-with-python2 python-arrow))
10059
10060 (define-public python-inflection
10061 (package
10062 (name "python-inflection")
10063 (version "0.3.1")
10064 (source
10065 (origin (method url-fetch)
10066 (uri (pypi-uri "inflection" version))
10067 (sha256
10068 (base32
10069 "1jhnxgnw8y3mbzjssixh6qkc7a3afc4fygajhqrqalnilyvpzshq"))))
10070 (build-system python-build-system)
10071 (home-page "http://github.com/jpvanhal/inflection")
10072 (synopsis "Python string transformation library")
10073 (description
10074 "Inflection is a string transformation library. It singularizes
10075 and pluralizes English words, and transforms strings from CamelCase to
10076 underscored string.")
10077 (license license:expat)))
10078
10079 (define-public python2-inflection
10080 (package-with-python2 python-inflection))
10081
10082 (define-public python-pylev
10083 (package
10084 (name "python-pylev")
10085 (version "1.3.0")
10086 (source (origin
10087 (method url-fetch)
10088 (uri (pypi-uri "pylev" version))
10089 (sha256
10090 (base32
10091 "1hz1x9blsbxya1y9nnhnwwdnqmakxi9mc0jkwj0rn6b1h44i0f86"))))
10092 (build-system python-build-system)
10093 (home-page "http://github.com/toastdriven/pylev")
10094 (synopsis "Levenshtein distance implementation in Python")
10095 (description "Pure Python Levenshtein implementation, based off the
10096 Wikipedia code samples at
10097 @url{http://en.wikipedia.org/wiki/Levenshtein_distance}.")
10098 (license license:bsd-3)))
10099
10100 (define-public python2-pylev
10101 (package-with-python2 python-pylev))
10102
10103 (define-public python-cleo
10104 (package
10105 (name "python-cleo")
10106 (version "0.4.1")
10107 (source (origin
10108 (method url-fetch)
10109 (uri (pypi-uri "cleo" version))
10110 (sha256
10111 (base32
10112 "1k2dcl6mqpn5bljyl6w42rqyd9mb3y9kh2mg7m2x3kfjwvg0rpva"))))
10113 (build-system python-build-system)
10114 (native-inputs
10115 `(;; For testing
10116 ("python-mock" ,python-mock)
10117 ("python-pytest" ,python-pytest)))
10118 (propagated-inputs
10119 `(("python-psutil" ,python-psutil)
10120 ("python-pylev" ,python-pylev)))
10121 (home-page "https://github.com/sdispater/cleo")
10122 (synopsis "Command-line arguments library for Python")
10123 (description
10124 "Cleo allows you to create command-line commands with signature in
10125 docstring and colored output.")
10126 (license license:expat)))
10127
10128 (define-public python2-cleo
10129 (package-with-python2 python-cleo))
10130
10131 (define-public python-lazy-object-proxy
10132 (package
10133 (name "python-lazy-object-proxy")
10134 (version "1.2.2")
10135 (source (origin
10136 (method url-fetch)
10137 (uri (pypi-uri "lazy-object-proxy" version))
10138 (sha256
10139 (base32
10140 "0s22aqqkdscyh8sjspyyax7qa1aiz8p4midrnyf39717fhfczm6x"))))
10141 (build-system python-build-system)
10142 (home-page "https://github.com/ionelmc/python-lazy-object-proxy")
10143 (synopsis "Lazy object proxy for python")
10144 (description
10145 "Lazy object proxy is an object that wraps a callable but defers the call
10146 until the object is actually required, and caches the result of said call.")
10147 (license license:bsd-2)))
10148
10149 (define-public python2-lazy-object-proxy
10150 (package-with-python2 python-lazy-object-proxy))
10151
10152 (define-public python-dnspython
10153 (package
10154 (name "python-dnspython")
10155 (version "1.15.0")
10156 (source (origin
10157 (method url-fetch)
10158 (uri (string-append "http://www.dnspython.org/kits/"
10159 version "/dnspython-" version ".tar.gz"))
10160 (sha256
10161 (base32
10162 "0jr4v2pd90i6l1xxbss2m05psbjaxvyvvvpq44wycijpfgjqln8i"))))
10163 (build-system python-build-system)
10164 (arguments '(#:tests? #f)) ; XXX: requires internet access
10165 (home-page "http://www.dnspython.org")
10166 (synopsis "DNS toolkit for Python")
10167 (description
10168 "dnspython is a DNS toolkit for Python. It supports almost all record
10169 types. It can be used for queries, zone transfers, and dynamic updates.
10170 It supports TSIG authenticated messages and EDNS0.")
10171 (license license:expat)))
10172
10173 (define-public python2-dnspython
10174 (package-with-python2 python-dnspython))
10175
10176 (define-public python-email-validator
10177 (package
10178 (name "python-email-validator")
10179 (version "1.0.1")
10180 (source
10181 (origin (method url-fetch)
10182 (uri (pypi-uri "email_validator" version))
10183 (sha256
10184 (base32
10185 "0mn8jg5h8ifl8w6a6m0hq8kbk0mzw9vm054qfamkn89b3npz52qw"))))
10186 (build-system python-build-system)
10187 (arguments
10188 '(#:phases
10189 (modify-phases %standard-phases
10190 (add-before 'build 'use-dnspython
10191 (lambda _
10192 (substitute* "setup.py"
10193 (("dnspython3") "dnspython"))
10194 #t)))))
10195 (propagated-inputs
10196 `(("python-dnspython" ,python-dnspython)
10197 ("python-idna" ,python-idna)))
10198 (home-page "https://github.com/JoshData/python-email-validator")
10199 (synopsis "Email address validation library for Python")
10200 (description
10201 "This library validates email address syntax and deliverability.")
10202 (license license:cc0)))
10203
10204 (define-public python2-email-validator
10205 (package-with-python2 python-email-validator))
10206
10207 (define-public python-ukpostcodeparser
10208 (package
10209 (name "python-ukpostcodeparser")
10210 (version "1.0.3")
10211 (source (origin
10212 (method url-fetch)
10213 (uri (pypi-uri "UkPostcodeParser" version))
10214 (sha256
10215 (base32
10216 "1jwg9z4rz51mcka1821rwgycsd0mcicyp1kiwjfa2kvg8bm9p2qd"))))
10217 (build-system python-build-system)
10218 (home-page "https://github.com/hamstah/ukpostcodeparser")
10219 (synopsis "UK Postcode parser for Python")
10220 (description
10221 "This library provides the @code{parse_uk_postcode} function for
10222 parsing UK postcodes.")
10223 (license license:expat)))
10224
10225 (define-public python2-ukpostcodeparser
10226 (package-with-python2 python-ukpostcodeparser))
10227
10228 (define-public python-fake-factory
10229 (package
10230 (name "python-fake-factory")
10231 (version "0.7.2")
10232 (source (origin
10233 (method url-fetch)
10234 (uri (pypi-uri "fake-factory" version))
10235 (sha256
10236 (base32
10237 "0vs0dkmg0dlaxf8w6q2i3k0i03gmp56ablldv7ci9x3nbadkn71g"))))
10238 (build-system python-build-system)
10239 (native-inputs
10240 `(;; For testing
10241 ("python-email-validator" ,python-email-validator)
10242 ("python-mock" ,python-mock)
10243 ("python-ukpostcodeparser" ,python-ukpostcodeparser)))
10244 (propagated-inputs
10245 `(("python-dateutil" ,python-dateutil-2)
10246 ("python-six" ,python-six)))
10247 (home-page "https://github.com/joke2k/faker")
10248 (synopsis "Python package that generates fake data")
10249 (description
10250 "Faker is a Python package that generates fake data such as names,
10251 addresses, and phone numbers.")
10252 (license license:expat)
10253 (properties `((python2-variant . ,(delay python2-fake-factory))))))
10254
10255 (define-public python2-fake-factory
10256 (let ((base (package-with-python2 (strip-python2-variant
10257 python-fake-factory))))
10258 (package
10259 (inherit base)
10260 (propagated-inputs
10261 `(("python2-ipaddress" ,python2-ipaddress)
10262 ,@(package-propagated-inputs base))))))
10263
10264 (define-public python-pyaml
10265 (package
10266 (name "python-pyaml")
10267 (version "15.8.2")
10268 (source (origin
10269 (method url-fetch)
10270 (uri (pypi-uri "pyaml" version))
10271 (sha256
10272 (base32
10273 "1f5m28vkh4ksq3d80d8mmd2z8wxvc3mgy2pmrv2751dm2xgznm4w"))))
10274 (build-system python-build-system)
10275 (propagated-inputs
10276 `(("python-pyyaml" ,python-pyyaml)))
10277 (home-page "https://github.com/mk-fg/pretty-yaml")
10278 (synopsis "YAML pretty-print library for Python")
10279 (description
10280 "pyaml is a PyYAML based python module to produce pretty and readable
10281 YAML-serialized data.")
10282 (license (license:non-copyleft "http://www.wtfpl.net/txt/copying/"))))
10283
10284 (define-public python2-pyaml
10285 (package-with-python2 python-pyaml))
10286
10287 (define-public python-flexmock
10288 (package
10289 (name "python-flexmock")
10290 (version "0.10.2")
10291 (source (origin
10292 (method url-fetch)
10293 (uri (pypi-uri "flexmock" version))
10294 (sha256
10295 (base32
10296 "0arc6njvs6i9v9hgvzk5m50296g7zy5m9d7pyb43vdsdgxrci5gy"))))
10297 (build-system python-build-system)
10298 (home-page "https://flexmock.readthedocs.org")
10299 (synopsis "Testing library for Python")
10300 (description
10301 "flexmock is a testing library for Python that makes it easy to create
10302 mocks, stubs and fakes.")
10303 (license license:bsd-3)))
10304
10305 (define-public python2-flexmock
10306 (package-with-python2 python-flexmock))
10307
10308 (define-public python-orator
10309 (package
10310 (name "python-orator")
10311 (version "0.8.2")
10312 (source (origin
10313 (method url-fetch)
10314 (uri (pypi-uri "orator" version))
10315 (sha256
10316 (base32
10317 "1li49irsqha17nrda4nsb48biyy0rarp9pphf0jpqwm5zr8hv569"))))
10318 (build-system python-build-system)
10319 (arguments '(#:tests? #f)) ; no tests
10320 (propagated-inputs
10321 `(("python-arrow" ,python-arrow)
10322 ("python-blinker" ,python-blinker)
10323 ("python-cleo" ,python-cleo)
10324 ("python-fake-factory" ,python-fake-factory)
10325 ("python-inflection" ,python-inflection)
10326 ("python-lazy-object-proxy" ,python-lazy-object-proxy)
10327 ("python-pyaml" ,python-pyaml)
10328 ("python-simplejson" ,python-simplejson)
10329 ("python-wrapt" ,python-wrapt)))
10330 (home-page "https://orator-orm.com/")
10331 (synopsis "ActiveRecord ORM for Python")
10332 (description
10333 "Orator provides a simple ActiveRecord-like Object Relational Mapping
10334 implementation for Python.")
10335 (license license:expat)
10336 (properties `((python2-variant . ,(delay python2-orator))))))
10337
10338 (define-public python2-orator
10339 (let ((base (package-with-python2 (strip-python2-variant python-orator))))
10340 (package
10341 (inherit base)
10342 (propagated-inputs
10343 `(("python2-ipaddress" ,python2-ipaddress)
10344 ,@(package-propagated-inputs base))))))
10345
10346 (define-public python-prompt-toolkit
10347 (package
10348 (name "python-prompt-toolkit")
10349 (version "1.0.7")
10350 (source
10351 (origin
10352 (method url-fetch)
10353 (uri (pypi-uri "prompt_toolkit" version ".tar.gz"))
10354 (sha256
10355 (base32
10356 "1vyjd0b7wciv55i19l44zy0adx8q7ss79lhy2r9d1rwz2y4822zg"))))
10357 (build-system python-build-system)
10358 (arguments
10359 '(#:tests? #f)) ; The test suite uses some Windows-specific data types.
10360 (propagated-inputs
10361 `(("python-wcwidth" ,python-wcwidth)
10362 ("python-pygments" ,python-pygments)))
10363 (native-inputs `(("python-six" ,python-six)))
10364 (home-page "https://github.com/jonathanslenders/python-prompt-toolkit")
10365 (synopsis "Library for building command line interfaces in Python")
10366 (description
10367 "Prompt-Toolkit is a library for building interactive command line
10368 interfaces in Python. It's like GNU Readline but it also features syntax
10369 highlighting while typing, out-of-the-box multi-line input editing, advanced
10370 code completion, incremental search, support for Chinese double-width
10371 characters, mouse support, and auto suggestions.")
10372 (license license:bsd-3)))
10373
10374 (define-public python2-prompt-toolkit
10375 (package-with-python2 python-prompt-toolkit))
10376
10377 (define-public python-jedi
10378 (package
10379 (name "python-jedi")
10380 (version "0.9.0")
10381 (source
10382 (origin
10383 (method url-fetch)
10384 (uri (pypi-uri "jedi" version))
10385 (sha256
10386 (base32
10387 "0c8x962ynpx001fdvp07m2q5jk4igkxbj3rmnydavphvlgxijk1v"))))
10388 (build-system python-build-system)
10389 (home-page "https://github.com/davidhalter/jedi")
10390 (synopsis
10391 "Autocompletion for Python that can be used for text editors")
10392 (description
10393 "Jedi is an autocompletion tool for Python that can be used for text editors.")
10394 (license license:expat)))
10395
10396 (define-public python2-jedi
10397 (package-with-python2 python-jedi))
10398
10399 (define-public ptpython
10400 (package
10401 (name "ptpython")
10402 (version "0.34")
10403 (source (origin
10404 (method url-fetch)
10405 (uri (pypi-uri "ptpython" version))
10406 (sha256
10407 (base32
10408 "1mmbiyzf0n8hm7z2a562x7w5cbl6jc0zsk6vp40q1z4cyblv1k13"))))
10409 (build-system python-build-system)
10410 (propagated-inputs
10411 `(("python-docopt" ,python-docopt)
10412 ("python-jedi" ,python-jedi)
10413 ("python-prompt-toolkit" ,python-prompt-toolkit)
10414 ("python-pygments" ,python-pygments)))
10415 (home-page "https://github.com/jonathanslenders/ptpython")
10416 (synopsis "Python Read-Eval-Print-Loop with nice IDE-like features")
10417 (description
10418 "ptpython is a Python read-eval-print loop with IDE-like features.
10419 It supports syntax highlighting, multiline editing, autocompletion, mouse,
10420 color schemes, bracketed paste, Vi and Emacs keybindings, Chinese characters
10421 etc.")
10422 (license license:bsd-3)
10423 (properties `((python2-variant . ,(delay ptpython-2))))))
10424
10425 (define-public ptpython-2
10426 (let ((base (package-with-python2 (strip-python2-variant ptpython))))
10427 (package
10428 (inherit base)
10429 (name "ptpython2"))))
10430
10431 (define-public python-requests-oauthlib
10432 (package
10433 (name "python-requests-oauthlib")
10434 (version "0.6.2")
10435 (source
10436 (origin
10437 (method url-fetch)
10438 (uri (pypi-uri "requests-oauthlib" version))
10439 (sha256
10440 (base32
10441 "0ykff67sjcl227c23g0rxzfx34rr5bf21kwv0z3zmgk0lfmch7hn"))))
10442 (build-system python-build-system)
10443 (arguments
10444 `(#:phases
10445 (modify-phases %standard-phases
10446 ;; removes tests that require network access
10447 (add-before 'check 'pre-check
10448 (lambda _
10449 (delete-file "tests/test_core.py")
10450 #t)))))
10451 (native-inputs
10452 `(("python-requests-mock" ,python-requests-mock)
10453 ("python-mock" ,python-mock)))
10454 (propagated-inputs
10455 `(("python-oauthlib" ,python-oauthlib)
10456 ("python-requests" ,python-requests)))
10457 (home-page
10458 "https://github.com/requests/requests-oauthlib")
10459 (synopsis
10460 "OAuthlib authentication support for Requests")
10461 (description
10462 "Requests-OAuthlib uses the Python Requests and OAuthlib libraries to
10463 provide an easy-to-use Python interface for building OAuth1 and OAuth2 clients.")
10464 (license license:isc)))
10465
10466 (define-public python2-requests-oauthlib
10467 (package-with-python2 python-requests-oauthlib))
10468
10469 (define-public python-stem
10470 (package
10471 (name "python-stem")
10472 (version "1.4.1b")
10473 (source
10474 (origin
10475 (method url-fetch)
10476 (uri (pypi-uri "stem" version ".tar.bz2"))
10477 (sha256
10478 (base32
10479 "09a3amp1y351nwz088ckiibbp666qi2lxwkyknavswfm400s0ns7"))))
10480 (build-system python-build-system)
10481 (arguments
10482 `(#:phases
10483 (modify-phases %standard-phases
10484 (replace 'check
10485 (lambda _
10486 (zero? (system* "./run_tests.py" "--unit")))))))
10487 (native-inputs
10488 `(("python-mock" ,python-mock)
10489 ("python-pep8" ,python-pep8)
10490 ("python-pyflakes" ,python-pyflakes)))
10491 (propagated-inputs
10492 `(("python-pycrypto" ,python-pycrypto)))
10493 (home-page "https://stem.torproject.org/")
10494 (synopsis
10495 "Python controller library that allows applications to interact with Tor")
10496 (description
10497 "Stem is a Python controller library for Tor. With it you can use Tor's
10498 control protocol to script against the Tor process and read descriptor data
10499 relays publish about themselves.")
10500 (license license:lgpl3)))
10501
10502 (define-public python2-stem
10503 (package-with-python2 python-stem))
10504
10505 (define-public python-pyserial
10506 (package
10507 (name "python-pyserial")
10508 (version "3.1.1")
10509 (source
10510 (origin
10511 (method url-fetch)
10512 (uri (pypi-uri "pyserial" version))
10513 (sha256
10514 (base32
10515 "0k1nfdrxxkdlv4zgaqsdv8li0pj3gbh2pyxw8q2bsg6f9490amyn"))))
10516 (build-system python-build-system)
10517 (home-page
10518 "https://github.com/pyserial/pyserial")
10519 (synopsis "Python Serial Port Bindings")
10520 (description "@code{pyserial} provide serial port bindings for Python. It
10521 supports different byte sizes, stop bits, parity and flow control with RTS/CTS
10522 and/or Xon/Xoff. The port is accessed in RAW mode.")
10523 (license license:bsd-3)))
10524
10525 (define-public python2-pyserial
10526 (package-with-python2 python-pyserial))
10527
10528 (define-public python-kivy
10529 (package
10530 (name "python-kivy")
10531 (version "1.9.1")
10532 (source
10533 (origin
10534 (method url-fetch)
10535 (uri (pypi-uri "kivy" version))
10536 (file-name (string-append name "-" version ".tar.gz"))
10537 (sha256
10538 (base32
10539 "0zk3g1j1z0lzcm9d0k1lprrs95zr8n8k5pdg3p5qlsn26jz4bg19"))))
10540 (build-system python-build-system)
10541 (arguments
10542 `(#:tests? #f ; Tests require many optional packages
10543 #:phases
10544 (modify-phases %standard-phases
10545 (replace 'build (lambda _ (zero? (system* "make" "force"))))
10546 (add-after 'patch-generated-file-shebangs 'set-sdl-paths
10547 (lambda* (#:key inputs #:allow-other-keys)
10548 (setenv "KIVY_SDL2_PATH"
10549 (string-append (assoc-ref inputs "sdl-union")
10550 "/include/SDL2"))
10551 #t)))))
10552 (native-inputs
10553 `(("pkg-config" ,pkg-config)
10554 ("python-cython" ,python-cython)))
10555 (inputs
10556 `(("gstreamer" ,gstreamer)
10557 ("mesa" ,mesa)
10558 ("sdl-union"
10559 ,(sdl-union (list sdl2 sdl2-image sdl2-mixer sdl2-ttf)))))
10560 (home-page "http://kivy.org")
10561 (synopsis
10562 "Multitouch application framework")
10563 (description
10564 "A software library for rapid development of
10565 hardware-accelerated multitouch applications.")
10566 (license license:expat)))
10567
10568 (define-public python2-kivy
10569 (package-with-python2 python-kivy))
10570
10571 (define-public python-kivy-next
10572 (let ((commit "a988c5e7a47da56263ff39514264a3de516ef2fe")
10573 (revision "1"))
10574 (package (inherit python-kivy)
10575 (name "python-kivy-next")
10576 (version (string-append "1.9.1-" revision "."
10577 (string-take commit 7)))
10578 (source
10579 (origin
10580 (method git-fetch)
10581 (uri (git-reference
10582 (url "https://github.com/kivy/kivy")
10583 (commit commit)))
10584 (file-name (string-append name "-" version "-checkout"))
10585 (sha256
10586 (base32
10587 "0jk92b4a8l7blkvkgkjihk171s0dfnq582cckff5srwc8kal5m0p")))))))
10588
10589 (define-public python2-kivy-next
10590 (package-with-python2 python-kivy-next))
10591
10592 (define-public python-binaryornot
10593 (package
10594 (name "python-binaryornot")
10595 (version "0.4.0")
10596 (source (origin
10597 (method url-fetch)
10598 (uri (pypi-uri "binaryornot" version))
10599 (sha256
10600 (base32
10601 "1j4f51dxic39mdwf6alj7gd769wy6mhk916v031wjali51xkh3xb"))))
10602 (build-system python-build-system)
10603 (propagated-inputs
10604 `(("python-chardet" ,python-chardet)
10605 ("python-hypothesis" ,python-hypothesis)))
10606 (home-page "https://github.com/audreyr/binaryornot")
10607 (synopsis "Package to check if a file is binary or text")
10608 (description "Ultra-lightweight pure Python package to check if a file is
10609 binary or text.")
10610 (license license:bsd-3)
10611 (properties `((python2-variant . ,(delay python2-binaryornot))))))
10612
10613 (define-public python2-binaryornot
10614 (let ((base (package-with-python2 (strip-python2-variant python-binaryornot))))
10615 (package (inherit base)
10616 (propagated-inputs
10617 `(("python2-enum34" ,python2-enum34)
10618 ,@(package-propagated-inputs base))))))
10619
10620 (define-public python-nltk
10621 (package
10622 (name "python-nltk")
10623 (version "3.2.1")
10624 (source (origin
10625 (method url-fetch)
10626 (uri (pypi-uri "nltk" version))
10627 (sha256
10628 (base32
10629 "0skxbhnymwlspjkzga0f7x1hg3y50fwpfghs8g8k7fh6f4nknlym"))))
10630 (build-system python-build-system)
10631 (arguments
10632 '(;; The tests require some extra resources to be downloaded.
10633 ;; TODO Try packaging these resources.
10634 #:tests? #f))
10635 (home-page "http://nltk.org/")
10636 (synopsis "Natural Language Toolkit")
10637 (description "It provides interfaces to over 50 corpora and lexical
10638 resources such as WordNet, along with a suite of text processing libraries
10639 for classification, tokenization, stemming, tagging, parsing, and semantic
10640 reasoning, wrappers for natural language processing libraries.")
10641 (license license:asl2.0)))
10642
10643 (define-public python2-nltk
10644 (package-with-python2 python-nltk))
10645
10646 (define-public python-pymongo
10647 (package
10648 (name "python-pymongo")
10649 (version "3.3.0")
10650 (source (origin
10651 (method url-fetch)
10652 (uri (pypi-uri "pymongo" version))
10653 (sha256
10654 (base32
10655 "07mra6w86wjqy4lx5fvimidjhhfzd562gfjn8grsnbv2q8pk0i9x"))))
10656 (build-system python-build-system)
10657 (propagated-inputs
10658 `(("python-certifi" ,python-certifi)))
10659 (home-page "http://github.com/mongodb/mongo-python-driver")
10660 (synopsis "Python driver for MongoDB")
10661 (description "Python driver for MongoDB.")
10662 (license license:asl2.0)))
10663
10664 (define-public python2-pymongo
10665 (package-with-python2 python-pymongo))
10666
10667 (define-public python-sh
10668 (package
10669 (name "python-sh")
10670 (version "1.11")
10671 (source (origin
10672 (method url-fetch)
10673 (uri (pypi-uri "sh" version))
10674 (sha256
10675 (base32
10676 "192r0mpv6dmkysjzhc43ddffiwb5g7c76bgr1mb1z2xz9awbj3sr"))))
10677 (build-system python-build-system)
10678 (arguments
10679 `(#:tests? #f)) ; no tests
10680 (home-page "https://github.com/amoffat/sh")
10681 (synopsis "Python subprocess interface")
10682 (description "Abstracts process invocation by providing a function
10683 interface for programs.")
10684 (license license:expat)))
10685
10686 (define-public python2-sh
10687 (package-with-python2 python-sh))
10688
10689 (define-public python-consul
10690 (package
10691 (name "python-consul")
10692 (version "0.6.1")
10693 (source
10694 (origin
10695 (method url-fetch)
10696 (uri (pypi-uri "python-consul" version))
10697 (sha256
10698 (base32
10699 "0rfyxcy4cr3x848vhx876ifalxd5ghq6l5x813m49h4vq2d4jiq8"))))
10700 (build-system python-build-system)
10701 (native-inputs
10702 `(("python-pytest" ,python-pytest)
10703 ("python-requests" ,python-requests)
10704 ("python-six" ,python-six)))
10705 (home-page "https://github.com/cablehead/python-consul")
10706 (synopsis "Python client for Consul")
10707 (description
10708 "Python client for @url{http://www.consul.io/,Consul}, a tool for service
10709 discovery, monitoring and configuration.")
10710 (license license:expat)))
10711
10712 (define-public python2-consul
10713 (package-with-python2 python-consul))
10714
10715 (define-public python-schematics
10716 (package
10717 (name "python-schematics")
10718 (version "1.1.1")
10719 (source
10720 (origin
10721 (method url-fetch)
10722 (uri (string-append
10723 "https://github.com/schematics/schematics/archive/v" version ".tar.gz"))
10724 (file-name (string-append name "-" version ".tar.gz"))
10725 (sha256
10726 (base32
10727 "19v1i69bf3bzarfxmbv0v6ivpcn758x3shvbiy9l2hy0lvqwnp6l"))))
10728 (build-system python-build-system)
10729 (propagated-inputs
10730 `(("python-six" ,python-six)))
10731 (arguments
10732 `(#:tests? #f)) ; requires a bunch of not very nice packages with fixed
10733 ; version requirements (eg python-coveralls)
10734 (home-page "https://github.com/schematics/schematics")
10735 (synopsis "Python Data Structures for Humans")
10736 (description "Python Data Structures for Humans.")
10737 (license license:bsd-3)))
10738
10739 (define-public python2-schematics
10740 (package-with-python2 python-schematics))
10741
10742 (define-public python-publicsuffix
10743 (package
10744 (name "python-publicsuffix")
10745 (version "1.1.0")
10746 (source (origin
10747 (method url-fetch)
10748 (uri (pypi-uri "publicsuffix" version))
10749 (sha256
10750 (base32
10751 "1adx520249z2cy7ykwjr1k190mn2888wqn9jf8qm27ly4qymjxxf"))))
10752 (build-system python-build-system)
10753 (arguments
10754 `(#:tests? #f)) ; tests use the internet
10755 (home-page "https://www.tablix.org/~avian/git/publicsuffix.git")
10756 (synopsis "Get suffix for a domain name")
10757 (description "Get a public suffix for a domain name using the Public Suffix
10758 List.")
10759 (license license:expat)))
10760
10761 (define-public python2-publicsuffix
10762 (package-with-python2 python-publicsuffix))
10763
10764 (define-public python-publicsuffix2
10765 (package
10766 (name "python-publicsuffix2")
10767 (version "2.20160621")
10768 (source
10769 (origin
10770 (method url-fetch)
10771 (uri (pypi-uri "publicsuffix2" version ".tar.bz2"))
10772 (sha256
10773 (base32
10774 "06lx603gdwad5hc3hmn763ngq0rq9bzz1ni3ga72nzk5n872arkd"))))
10775 (build-system python-build-system)
10776 (arguments
10777 '(#:tests? #f)) ; The test suite requires network access.
10778 (home-page "https://github.com/pombredanne/python-publicsuffix2")
10779 (synopsis "Get a public suffix for a domain name using the Public Suffix List")
10780 (description "Get a public suffix for a domain name using the Public Suffix
10781 List. Forked from and using the same API as the publicsuffix package.")
10782 (license (list license:expat license:mpl2.0))))
10783
10784 (define-public python2-publicsuffix2
10785 (package-with-python2 python-publicsuffix2))
10786
10787 (define-public python-url
10788 (package
10789 (name "python-url")
10790 (version "0.2.0")
10791 (source (origin
10792 (method url-fetch)
10793 (uri (pypi-uri "url" version))
10794 (sha256
10795 (base32
10796 "0v879yadcz9qxfl41ak6wkga1kimp9cflla9ddz03hjjvgkqy5ki"))))
10797 (build-system python-build-system)
10798 (propagated-inputs
10799 `(("python-publicsuffix" ,python-publicsuffix)))
10800 (native-inputs
10801 `(("python-coverage" ,python-coverage)
10802 ("python-nose" ,python-nose)))
10803 (arguments
10804 `(#:tests? #f)) ; FIXME: tests fail with "ImportError: No module named 'tests'"
10805 (home-page "http://github.com/seomoz/url-py")
10806 (synopsis "URL Parsing")
10807 (description "Library for parsing urls.")
10808 (license license:expat)
10809 (properties `((python2-variant . ,(delay python2-url))))))
10810
10811 (define-public python2-url
10812 (let ((base (package-with-python2 (strip-python2-variant python-url))))
10813 (package (inherit base)
10814 (propagated-inputs
10815 `(("python2-publicsuffix" ,python2-publicsuffix))))))
10816
10817 (define-public python-freezegun
10818 (package
10819 (name "python-freezegun")
10820 (version "0.3.7")
10821 (source
10822 (origin
10823 (method url-fetch)
10824 (uri (pypi-uri "freezegun" version))
10825 (sha256
10826 (base32
10827 "14l19x06v5jkq4rdwbmfyw4x9lrjb2300afrk21r1ash7y1y9a0w"))))
10828 (build-system python-build-system)
10829 (native-inputs
10830 `(("python-mock" ,python-mock)
10831 ("python-nose" ,python-nose)
10832 ("python-coverage" ,python-coverage)
10833 ("python-dateutil-2" ,python-dateutil-2)))
10834 (propagated-inputs
10835 `(("python-six" ,python-six)))
10836 (arguments
10837 `(#:phases (modify-phases %standard-phases
10838 ;; The tests are normally executed via `make test`, but the PyPi
10839 ;; package does not include the Makefile.
10840 (replace 'check
10841 (lambda _
10842 (zero? (system* "nosetests" "./tests/")))))))
10843 (home-page "https://github.com/spulec/freezegun")
10844 (synopsis "Test utility for mocking the datetime module")
10845 (description
10846 "FreezeGun is a library that allows your python tests to travel through
10847 time by mocking the datetime module.")
10848 (license license:asl2.0)))
10849
10850 (define-public python2-freezegun
10851 (package-with-python2 python-freezegun))
10852
10853
10854 (define-public python-odfpy
10855 (package
10856 (name "python-odfpy")
10857 (version "1.3.3")
10858 (source (origin
10859 (method url-fetch)
10860 (uri (pypi-uri "odfpy" version))
10861 (sha256
10862 (base32
10863 "1a6ms0w9zfhhkqhvrnynwwbxrivw6hgjc0s5k7j06npc7rq0blxw"))))
10864 (arguments
10865 `(#:modules ((srfi srfi-1)
10866 (guix build python-build-system)
10867 (guix build utils))
10868 #:phases
10869 (modify-phases %standard-phases
10870 (replace 'check
10871 ;; The test runner invokes python2 and python3 for test*.py.
10872 ;; To avoid having both in inputs, we replicate it here.
10873 (lambda _
10874 (every (lambda (test-file)
10875 (zero? (system* "python" test-file)))
10876 (find-files "tests" "^test.*\\.py$")))))))
10877 (build-system python-build-system)
10878 (home-page "https://github.com/eea/odfpy")
10879 (synopsis "Python API and tools to manipulate OpenDocument files")
10880 (description "Collection of libraries and utility programs written in
10881 Python to manipulate OpenDocument 1.2 files.")
10882 (license
10883 ;; The software is mainly dual GPL2+ and ASL2.0, but includes a
10884 ;; number of files with other licenses.
10885 (list license:gpl2+ license:asl2.0 license:lgpl2.1+ license:cc-by-sa3.0))))
10886
10887 (define-public python2-odfpy
10888 (package-with-python2 python-odfpy))
10889
10890 (define-public python-cachecontrol
10891 (package
10892 (name "python-cachecontrol")
10893 (version "0.11.6")
10894 (source
10895 (origin
10896 (method url-fetch)
10897 ;; Pypi does not have tests.
10898 (uri (string-append
10899 "https://github.com/ionrock/cachecontrol/archive/v"
10900 version ".tar.gz"))
10901 (file-name (string-append name "-" version ".tar.gz"))
10902 (sha256
10903 (base32
10904 "0yj60d0f69a2l8p7y86k4zhzzm6rnxpq74sfl240pry9l0lfw2vw"))))
10905 (build-system python-build-system)
10906 (arguments
10907 `(#:phases
10908 (modify-phases %standard-phases
10909 (replace 'check
10910 (lambda _
10911 ;; Drop test that requires internet access.
10912 (delete-file "tests/test_regressions.py")
10913 (setenv "PYTHONPATH"
10914 (string-append (getcwd) "/build/lib:"
10915 (getenv "PYTHONPATH")))
10916 (zero? (system* "py.test" "-vv")))))))
10917 (native-inputs
10918 `(("python-pytest" ,python-pytest)
10919 ("python-redis" ,python-redis)
10920 ("python-webtest" ,python-webtest)
10921 ("python-mock" ,python-mock)))
10922 (propagated-inputs
10923 `(("python-requests" ,python-requests)
10924 ("python-lockfile" ,python-lockfile)))
10925 (home-page "https://github.com/ionrock/cachecontrol")
10926 (synopsis "The httplib2 caching algorithms for use with requests")
10927 (description "CacheControl is a port of the caching algorithms in
10928 @code{httplib2} for use with @code{requests} session objects.")
10929 (license license:asl2.0)))
10930
10931 (define-public python2-cachecontrol
10932 (package-with-python2 python-cachecontrol))
10933
10934 (define-public python-lit
10935 (package
10936 (name "python-lit")
10937 (version "0.5.0")
10938 (source
10939 (origin
10940 (method url-fetch)
10941 (uri (pypi-uri "lit" version))
10942 (sha256
10943 (base32
10944 "135m2b9cwih85g66rjggavck328z7lj37srgpq3jxszbg0g2b91y"))))
10945 (build-system python-build-system)
10946 (home-page "http://llvm.org/")
10947 (synopsis "LLVM Software Testing Tool")
10948 (description "@code{lit} is a portable tool for executing LLVM and Clang
10949 style test suites, summarizing their results, and providing indication of
10950 failures.")
10951 (license license:ncsa)))
10952
10953 (define-public python2-lit
10954 (package-with-python2 python-lit))
10955
10956 (define-public python-pytest-pep8
10957 (package
10958 (name "python-pytest-pep8")
10959 (version "1.0.6")
10960 (source (origin
10961 (method url-fetch)
10962 (uri (pypi-uri "pytest-pep8" version))
10963 (sha256
10964 (base32
10965 "06032agzhw1i9d9qlhfblnl3dw5hcyxhagn7b120zhrszbjzfbh3"))))
10966 (build-system python-build-system)
10967 (arguments
10968 `(#:tests? #f)) ; Fails with recent pytest and pep8. See upstream issues #8 and #12.
10969 (native-inputs
10970 `(("python-pytest" ,python-pytest)))
10971 (propagated-inputs
10972 `(("python-pep8" ,python-pep8)))
10973 (home-page "https://bitbucket.org/pytest-dev/pytest-pep8")
10974 (synopsis "Py.test plugin to check PEP8 requirements")
10975 (description "Pytest plugin for checking PEP8 compliance.")
10976 (license license:expat)))
10977
10978 (define-public python2-pytest-pep8
10979 (package-with-python2 python-pytest-pep8))
10980
10981 (define-public python-pytest-flakes
10982 (package
10983 (name "python-pytest-flakes")
10984 (version "1.0.1")
10985 (source (origin
10986 (method url-fetch)
10987 (uri (pypi-uri "pytest-flakes" version))
10988 (sha256
10989 (base32
10990 "0flag3n33kbhyjrhzmq990rvg4yb8hhhl0i48q9hw0ll89jp28lw"))))
10991 (build-system python-build-system)
10992 (arguments
10993 `(#:phases
10994 (modify-phases %standard-phases
10995 (delete 'check)
10996 (add-after 'install 'check
10997 (lambda _ ; It's easier to run tests after install.
10998 (zero? (system* "py.test" "-vv")))))))
10999 (native-inputs
11000 `(("python-coverage" ,python-coverage)
11001 ("python-pytest" ,python-pytest)
11002 ("python-pytest-cache" ,python-pytest-cache)
11003 ("python-pytest-pep8" ,python-pytest-pep8)))
11004 (propagated-inputs
11005 `(("python-pyflakes" ,python-pyflakes)))
11006 (home-page "https://github.com/fschulze/pytest-flakes")
11007 (synopsis "Py.test plugin to check source code with pyflakes")
11008 (description "Pytest plugin for checking Python source code with pyflakes.")
11009 (license license:expat)))
11010
11011 (define-public python2-pytest-flakes
11012 (package-with-python2 python-pytest-flakes))
11013
11014 (define-public python-natsort
11015 (package
11016 (name "python-natsort")
11017 (version "5.0.1")
11018 (source (origin
11019 (method url-fetch)
11020 (uri (pypi-uri "natsort" version))
11021 (sha256
11022 (base32
11023 "1abld5p4a6n5zjnyw5mi2pv37gqalcybv2brjr2y6l9l2p8v9mja"))))
11024 (build-system python-build-system)
11025 (arguments
11026 `(#:phases
11027 (modify-phases %standard-phases
11028 (add-before 'check 'set-cachedir
11029 ;; Tests require write access to $HOME by default
11030 (lambda _ (setenv "PYTHON_EGG_CACHE" "/tmp") #t)))))
11031 (native-inputs
11032 `(("python-hypothesis" ,python-hypothesis)
11033 ("python-pytest-cache" ,python-pytest-cache)
11034 ("python-pytest-cov" ,python-pytest-cov)
11035 ("python-pytest-flakes" ,python-pytest-flakes)
11036 ("python-pytest-pep8" ,python-pytest-pep8)))
11037 (propagated-inputs ; TODO: Add python-fastnumbers.
11038 `(("python-pyicu" ,python-pyicu)))
11039 (home-page "https://github.com/SethMMorton/natsort")
11040 (synopsis "Natural sorting for python and shell")
11041 (description
11042 "Natsort lets you apply natural sorting on lists instead of
11043 lexicographical. If you use the built-in @code{sorted} method in python
11044 on a list such as @code{['a20', 'a9', 'a1', 'a4', 'a10']}, it would be
11045 returned as @code{['a1', 'a10', 'a20', 'a4', 'a9']}. Natsort provides a
11046 function @code{natsorted} that identifies numbers and sorts them separately
11047 from strings. It can also sort version numbers, real numbers, mixed types
11048 and more, and comes with a shell command @command{natsort} that exposes this
11049 functionality in the command line.")
11050 (license license:expat)
11051 (properties `((python2-variant . ,(delay python2-natsort))))))
11052
11053 (define-public python2-natsort
11054 (let ((base (package-with-python2 (strip-python2-variant python-natsort))))
11055 (package (inherit base)
11056 (native-inputs
11057 `(("python2-pathlib" ,python2-pathlib)
11058 ("python2-mock" ,python2-mock)
11059 ("python2-enum34" ,python2-enum34)
11060 ,@(package-native-inputs base))))))
11061
11062 (define-public python-glances
11063 (package
11064 (name "python-glances")
11065 (version "2.7.1")
11066 (source
11067 (origin
11068 (method url-fetch)
11069 (uri (pypi-uri "Glances" version))
11070 (sha256
11071 (base32
11072 "11jbq40g8alsbirnd4kiagznqg270247i0m8qhi48ldf2i5xppxg"))))
11073 (build-system python-build-system)
11074 (propagated-inputs
11075 `(("python-psutil" ,python-psutil)))
11076 (home-page
11077 "https://github.com/nicolargo/glances")
11078 (synopsis
11079 "A cross-platform curses-based monitoring tool")
11080 (description
11081 "Glances is a curses-based monitoring tool for a wide variety of platforms.
11082 Glances uses the PsUtil library to get information from your system. It monitors
11083 CPU, load, memory, network bandwidth, disk I/O, disk use, and more.")
11084 (license license:lgpl3+)))
11085
11086 (define-public python2-glances
11087 (package-with-python2 python-glances))
11088
11089 (define-public python-graphql-core
11090 (package
11091 (name "python-graphql-core")
11092 (version "0.5.3")
11093 (source
11094 (origin
11095 (method url-fetch)
11096 (uri (pypi-uri "graphql-core" version))
11097 (sha256
11098 (base32
11099 "0rsaarx2sj4xnw9966rhh4haiqaapm4lm2mfqm48ywd51j5vh1a0"))))
11100 (build-system python-build-system)
11101 (arguments
11102 `(#:tests? #f ; Tests require the unpackaged pytest-benchmark.
11103 #:phases
11104 (modify-phases %standard-phases
11105 (add-after 'unpack 'patch-hardcoded-version
11106 (lambda _ (substitute*
11107 "setup.py"
11108 (("'gevent==1.1rc1'") "'gevent'"))
11109 #t)))))
11110 (native-inputs
11111 `(("python-gevent" ,python-gevent)
11112 ("python-mock" ,python-mock)
11113 ("python-pytest-mock" ,python-pytest-mock)))
11114 (propagated-inputs
11115 `(("python-promise" ,python-promise)
11116 ("python-six" ,python-six)))
11117 (home-page "https://github.com/graphql-python/graphql-core")
11118 (synopsis "GraphQL implementation for Python")
11119 (description
11120 "GraphQL implementation for Python. GraphQL is a data query language and
11121 runtime designed and used to request and deliver data to mobile and web apps.
11122 This library is a port of @url{https://github.com/graphql/graphql-js,graphql-js}
11123 to Python.")
11124 (license license:expat)))
11125
11126 (define-public python2-graphql-core
11127 (package-with-python2 python-graphql-core))
11128
11129 (define-public python-graphql-relay
11130 (package
11131 (name "python-graphql-relay")
11132 (version "0.4.4")
11133 (source
11134 (origin
11135 (method url-fetch)
11136 (uri (pypi-uri "graphql-relay" version))
11137 (sha256
11138 (base32
11139 "04wr9ayshxjjdcg2v21c7ffbz36kif1wjl3604fqd3qignb3fbxi"))))
11140 (build-system python-build-system)
11141 (native-inputs
11142 `(("python-pytest" ,python-pytest)))
11143 (propagated-inputs
11144 `(("python-graphql-core" ,python-graphql-core)
11145 ("python-promise" ,python-promise)
11146 ("python-six" ,python-six)))
11147 (home-page "https://github.com/graphql-python/graphql-relay-py")
11148 (synopsis "Relay implementation for Python")
11149 (description
11150 "This is a library to allow the easy creation of Relay-compliant servers
11151 using the GraphQL Python reference implementation of a GraphQL server. It
11152 should be noted that the code is a exact port of the original
11153 @url{https://github.com/graphql/graphql-relay-js,graphql-relay js implementation}
11154 from Facebook.")
11155 (license license:expat)))
11156
11157 (define-public python2-graphql-relay
11158 (package-with-python2 python-graphql-relay))
11159
11160 (define-public python-graphene
11161 (package
11162 (name "python-graphene")
11163 (version "0.10.2")
11164 (source
11165 (origin
11166 (method url-fetch)
11167 (uri (pypi-uri "graphene" version))
11168 (sha256
11169 (base32
11170 "09zhac7igh9ixdz0ay6csy35b40l1jwbf2wrbxmgxwfhy51iy06q"))))
11171 (build-system python-build-system)
11172 (native-inputs
11173 `(("python-django-filter" ,python-django-filter)
11174 ("python-mock" ,python-mock)
11175 ("python-psycopg2" ,python-psycopg2)
11176 ("python-pytest-django" ,python-pytest-django)
11177 ("python-sqlalchemy-utils" ,python-sqlalchemy-utils)))
11178 (propagated-inputs
11179 `(("python-graphql-core" ,python-graphql-core)
11180 ("python-graphql-relay" ,python-graphql-relay)
11181 ("python-iso8601" ,python-iso8601)
11182 ("python-promise" ,python-promise)
11183 ("python-six" ,python-six)))
11184 (home-page "http://graphene-python.org/")
11185 (synopsis "GraphQL Framework for Python")
11186 (description
11187 "Graphene is a Python library for building GraphQL schemas/types.
11188 A GraphQL schema describes your data model, and provides a GraphQL server
11189 with an associated set of resolve methods that know how to fetch data.")
11190 (properties `((python2-variant . ,(delay python2-graphene))))
11191 (license license:expat)))
11192
11193 (define-public python2-graphene
11194 (let ((base (package-with-python2
11195 (strip-python2-variant python-graphene))))
11196 (package (inherit base)
11197 (native-inputs
11198 `(("python2-sqlalchemy" ,python2-sqlalchemy)
11199 ,@(package-native-inputs base))))))
11200
11201 (define-public python-nautilus
11202 (package
11203 (name "python-nautilus")
11204 (version "0.4.9")
11205 (source
11206 (origin
11207 (method url-fetch)
11208 (uri (pypi-uri "nautilus" version))
11209 (sha256
11210 (base32
11211 "01hwzjc1zshk4vvxrcghm398fpy4jls66dyz06g07mrwqif8878p"))))
11212 (build-system python-build-system)
11213 (arguments `(#:tests? #f)) ; fails to import test modules
11214 (propagated-inputs
11215 `(("python-bcrypt" ,python-bcrypt)
11216 ("python-click" ,python-click)
11217 ("python-consul" ,python-consul)
11218 ("python-graphql-core" ,python-graphql-core)
11219 ("python-graphql-relay" ,python-graphql-relay)
11220 ("python-graphene" ,python-graphene)
11221 ("python-jinja2" ,python-jinja2)
11222 ("python-nose2" ,python-nose2)
11223 ("python-peewee" ,python-peewee)
11224 ("python-pika" ,python-pika)
11225 ("python-pycparser" ,python-pycparser)
11226 ("python-requests" ,python-requests)
11227 ("python-tornado" ,python-tornado)
11228 ("python-wtforms" ,python-wtforms)))
11229 (home-page "https://github.com/AlecAivazis/nautilus")
11230 (synopsis "Library for creating microservice applications")
11231 (description
11232 "Nautilus is a framework for flux based microservices that looks to
11233 provide extendible implementations of common aspects of a cloud so that you can
11234 focus on building massively scalable web applications.")
11235 (license license:expat)))
11236
11237 (define-public python-betamax
11238 (package
11239 (name "python-betamax")
11240 (version "0.8.0")
11241 (source
11242 (origin
11243 (method url-fetch)
11244 (uri (pypi-uri "betamax" version))
11245 (sha256
11246 (base32
11247 "18f8v5gng3j773jlbbzx4rg1i4y2zw3m2l1zpmbvp8bh5a2q1i42"))))
11248 (build-system python-build-system)
11249 (arguments
11250 '(;; Many tests fail because they require networking.
11251 #:tests? #f))
11252 (inputs
11253 `(("python-requests" ,python-requests)))
11254 (home-page "https://github.com/sigmavirus24/betamax")
11255 (synopsis "Record HTTP interactions with python-requests")
11256 (description "Betamax will record your test suite's HTTP interactions and
11257 replay them during future tests. It is designed to work with python-requests.")
11258 (license license:expat)))
11259
11260 (define-public python2-betamax
11261 (package-with-python2 python-betamax))
11262
11263 (define-public python-s3transfer
11264 (package
11265 (name "python-s3transfer")
11266 (version "0.1.8")
11267 (source (origin
11268 (method url-fetch)
11269 (uri (pypi-uri "s3transfer" version))
11270 (sha256
11271 (base32
11272 "1jivjkp3xqif9gzr5fiq28jsskmh50vzzd7ldsb4rbyiw1iyv3hy"))))
11273 (build-system python-build-system)
11274 (arguments
11275 `(#:phases
11276 (modify-phases %standard-phases
11277 (replace 'check
11278 (lambda _
11279 ;; 7 of the 'integration' tests require network access or login
11280 ;; credentials.
11281 (zero? (system* "nosetests" "--exclude=integration")))))))
11282 (native-inputs
11283 `(("python-docutils" ,python-docutils)
11284 ("python-mock" ,python-mock)
11285 ("python-nose" ,python-nose)))
11286 (propagated-inputs
11287 `(("python-botocore" ,python-botocore)))
11288 (synopsis "Amazon S3 Transfer Manager")
11289 (description "S3transfer is a Python library for managing Amazon S3
11290 transfers.")
11291 (home-page "https://github.com/boto/s3transfer")
11292 (license license:asl2.0)
11293 (properties `((python2-variant . ,(delay python2-s3transfer))))))
11294
11295 (define-public python2-s3transfer
11296 (let ((base (package-with-python2 (strip-python2-variant python-s3transfer))))
11297 (package
11298 (inherit base)
11299 (native-inputs
11300 `(("python2-futures" ,python2-futures)
11301 ,@(package-native-inputs base))))))
11302
11303 (define-public python-setproctitle
11304 (package
11305 (name "python-setproctitle")
11306 (version "1.1.10")
11307 (source
11308 (origin
11309 (method url-fetch)
11310 (uri (pypi-uri "setproctitle" version))
11311 (sha256
11312 (base32
11313 "163kplw9dcrw0lffq1bvli5yws3rngpnvrxrzdw89pbphjjvg0v2"))))
11314 (build-system python-build-system)
11315 (arguments
11316 '(#:phases
11317 (modify-phases %standard-phases
11318 (add-before 'check 'patch-Makefile
11319 ;; Stricly this is only required for the python2 variant.
11320 ;; But adding a phase in an inherited package seems to be
11321 ;; cumbersum. So we patch even for python3.
11322 (lambda _
11323 (let ((nose (assoc-ref %build-inputs "python2-nose")))
11324 (when nose
11325 (substitute* "Makefile"
11326 (("\\$\\(PYTHON\\) [^ ]which nosetests[^ ] ")
11327 (string-append nose "/bin/nosetests "))))
11328 #t)))
11329 (replace 'check
11330 (lambda _
11331 (setenv "PYTHON" (or (which "python3") (which "python")))
11332 (setenv "PYCONFIG" (or (which "python3-config")
11333 (which "python-config")))
11334 (setenv "CC" "gcc")
11335 ;; No need to extend PYTHONPATH to find the built package, since
11336 ;; the Makefile will build anyway
11337 (zero? (system* "make" "check")))))))
11338 (native-inputs
11339 `(("procps" ,procps))) ; required for tests
11340 (home-page
11341 "https://github.com/dvarrazzo/py-setproctitle")
11342 (synopsis
11343 "Setproctitle implementation for Python to customize the process title")
11344 (description "The library allows a process to change its title (as displayed
11345 by system tools such as ps and top).
11346
11347 Changing the title is mostly useful in multi-process systems, for
11348 example when a master process is forked: changing the children's title
11349 allows to identify the task each process is busy with. The technique
11350 is used by PostgreSQL and the OpenSSH Server for example.")
11351 (license license:bsd-3)
11352 (properties `((python2-variant . ,(delay python2-setproctitle))))))
11353
11354 (define-public python2-setproctitle
11355 (let ((base (package-with-python2
11356 (strip-python2-variant python-setproctitle))))
11357 (package
11358 (inherit base)
11359 (native-inputs `(("python2-nose" ,python2-nose)
11360 ,@(package-native-inputs base))))))
11361
11362 (define-public python-validictory
11363 (package
11364 (name "python-validictory")
11365 (version "1.0.1")
11366 (source
11367 (origin
11368 (method url-fetch)
11369 (uri (pypi-uri "validictory" version))
11370 (sha256
11371 (base32
11372 "1zf1g9sw47xzp5f80bd94pb42j9yqv82lcrgcvdwr6nkaphfi37q"))))
11373 (build-system python-build-system)
11374 (arguments
11375 '(#:phases
11376 (modify-phases %standard-phases
11377 (add-after 'unpack 'bootstrap
11378 ;; Move the tests out of the package directory to avoid
11379 ;; packaging them.
11380 (lambda* _
11381 (rename-file "validictory/tests" "tests")
11382 (delete-file "tests/__init__.py")))
11383 (replace 'check
11384 (lambda _
11385 ;; Extend PYTHONPATH so the built package will be found.
11386 (setenv "PYTHONPATH"
11387 (string-append (getcwd) "/build/lib:"
11388 (getenv "PYTHONPATH")))
11389 (zero? (system* "py.test" "-vv" )))))))
11390 (native-inputs
11391 `(("python-pytest" ,python-pytest)))
11392 (home-page
11393 "https://github.com/jamesturk/validictory")
11394 (synopsis "General purpose Python data validator")
11395 (description "It allows validation of arbitrary Python data structures.
11396
11397 The schema format is based on the JSON Schema
11398 proposal (http://json-schema.org), so combined with json the library is also
11399 useful as a validator for JSON data.")
11400 (license license:expat)))
11401
11402 (define-public python2-validictory
11403 (package-with-python2 python-validictory))
11404
11405 (define-public python-aniso8601
11406 (package
11407 (name "python-aniso8601")
11408 (version "1.1.0")
11409 (source
11410 (origin
11411 (method url-fetch)
11412 (uri (pypi-uri "aniso8601" version))
11413 (sha256
11414 (base32
11415 "1k5mjg9iqbjfslb5prrsfz7dhlvi6s35p1jxq8dm87w1b7dn5i2g"))))
11416 (build-system python-build-system)
11417 (propagated-inputs
11418 `(("python-dateutil-2" ,python-dateutil-2)))
11419 (home-page
11420 "https://bitbucket.org/nielsenb/aniso8601")
11421 (synopsis
11422 "Python library for parsing ISO 8601 strings")
11423 (description
11424 "This package contains a library for parsing ISO 8601 datetime strings.")
11425 (license license:bsd-3)))
11426
11427 (define-public python-flask-restful
11428 (package
11429 (name "python-flask-restful")
11430 (version "0.3.5")
11431 (source
11432 (origin
11433 (method url-fetch)
11434 (uri (pypi-uri "Flask-RESTful" version))
11435 (sha256
11436 (base32
11437 "0hjcmdb56b7z4bkw848lxfkyrpnkwzmqn2dgnlv12mwvjpzsxr6c"))))
11438 (build-system python-build-system)
11439 (propagated-inputs
11440 `(("python-aniso8601" ,python-aniso8601)
11441 ("python-flask" ,python-flask)
11442 ("python-pycrypto" ,python-pycrypto)
11443 ("python-pytz" ,python-pytz)))
11444 (native-inputs
11445 `(;; Optional dependency of Flask. Tests need it.
11446 ("python-blinker" ,python-blinker)
11447 ("python-mock" ,python-mock) ; For tests
11448 ("python-nose" ,python-nose) ; For tests
11449 ("python-sphinx" ,python-sphinx)))
11450 (home-page
11451 "https://www.github.com/flask-restful/flask-restful/")
11452 (synopsis
11453 "Flask module for creating REST APIs")
11454 (description
11455 "This package contains a Flask module for creating REST APIs.")
11456 (license license:bsd-3)))
11457
11458 (define-public python-flask-basicauth
11459 (package
11460 (name "python-flask-basicauth")
11461 (version "0.2.0")
11462 (source
11463 (origin
11464 (method url-fetch)
11465 (uri (pypi-uri "Flask-BasicAuth" version))
11466 (sha256
11467 (base32
11468 "1zq1spkjr4sjdnalpp8wl242kdqyk6fhbnhr8hi4r4f0km4bspnz"))))
11469 (build-system python-build-system)
11470 (propagated-inputs
11471 `(("python-flask" ,python-flask)))
11472 (home-page
11473 "https://github.com/jpvanhal/flask-basicauth")
11474 (synopsis
11475 "HTTP basic access authentication for Flask")
11476 (description
11477 "This package provides HTTP basic access authentication for Flask.")
11478 (license license:bsd-3)))
11479
11480 (define-public python-flask-sqlalchemy
11481 (package
11482 (name "python-flask-sqlalchemy")
11483 (version "2.1")
11484 (source
11485 (origin
11486 (method url-fetch)
11487 (uri (pypi-uri "Flask-SQLAlchemy" version))
11488 (sha256
11489 (base32
11490 "1i9ps5d5snih9xlqhrvmi3qfiygkmqzxh92n25kj4pf89kj4s965"))))
11491 (build-system python-build-system)
11492 (propagated-inputs
11493 `(("python-flask" ,python-flask)
11494 ("python-sqlalchemy" ,python-sqlalchemy)))
11495 (home-page
11496 "http://github.com/mitsuhiko/flask-sqlalchemy")
11497 (synopsis
11498 "Module adding SQLAlchemy support to your Flask application")
11499 (description
11500 "This package adds SQLAlchemy support to your Flask application.")
11501 (license license:bsd-3)))
11502
11503 (define-public python-pyev
11504 (package
11505 (name "python-pyev")
11506 (version "0.9.0")
11507 (source
11508 (origin
11509 (method url-fetch)
11510 (uri (pypi-uri "pyev" version))
11511 (sha256
11512 (base32
11513 "0rf603lc0s6zpa1nb25vhd8g4y337wg2wyz56i0agsdh7jchl0sx"))))
11514 (build-system python-build-system)
11515 (arguments
11516 `(#:tests? #f ; no test suite
11517 #:phases
11518 (modify-phases %standard-phases
11519 (add-after 'unpack 'patch
11520 (lambda* (#:key inputs #:allow-other-keys)
11521 (let ((libev (string-append (assoc-ref inputs "libev")
11522 "/lib/libev.so.4")))
11523 (substitute* "setup.py"
11524 (("libev_dll_name = find_library\\(\\\"ev\\\"\\)")
11525 (string-append "libev_dll_name = \"" libev "\"")))))))))
11526 (inputs
11527 `(("libev" ,libev)))
11528 (home-page "http://pythonhosted.org/pyev/")
11529 (synopsis "Python libev interface")
11530 (description "Pyev provides a Python interface to libev.")
11531 (license license:gpl3)))
11532
11533 (define-public python2-pyev
11534 (package-with-python2 python-pyev))
11535
11536 (define-public python-imagesize
11537 (package
11538 (name "python-imagesize")
11539 (version "0.7.1")
11540 (source
11541 (origin
11542 (method url-fetch)
11543 (uri (pypi-uri "imagesize" version))
11544 (sha256
11545 (base32
11546 "0qk07k0z4241lkzzjji7z4da04pcvg7bfc4xz1934zlqhwmwdcha"))))
11547 (build-system python-build-system)
11548 (arguments
11549 '(;; Test files are not distributed on PyPi:
11550 ;; https://github.com/shibukawa/imagesize_py/issues/7
11551 #:tests? #f))
11552 (home-page "https://github.com/shibukawa/imagesize_py")
11553 (synopsis "Gets image size of files in variaous formats in Python")
11554 (description
11555 "This package allows determination of image size from
11556 PNG, JPEG, JPEG2000 and GIF files in pure Python.")
11557 (license license:expat)))
11558
11559 (define-public python2-imagesize
11560 (package-with-python2 python-imagesize))
11561
11562 (define-public python-axolotl-curve25519
11563 (package
11564 (name "python-axolotl-curve25519")
11565 (version "0.1")
11566 (source
11567 (origin
11568 (method git-fetch)
11569 (uri (git-reference
11570 (url "git://github.com/tgalal/python-axolotl-curve25519")
11571 (commit "e4a9c4de0eae27223200579c58d1f8f6d20637e2")))
11572 (file-name (string-append name "-" version "-checkout"))
11573 (sha256
11574 (base32
11575 "0agap5q0hmvf6cwzjqc05kw53pjgf6942pcivpazksmg1vk400ra"))))
11576 (build-system python-build-system)
11577 (arguments
11578 `(;; Prevent creation of the egg. This works around
11579 ;; https://debbugs.gnu.org/cgi/bugreport.cgi?bug=20765
11580 #:configure-flags '("--root=/")))
11581 (home-page "https://github.com/tgalal/python-axolotl-curve25519")
11582 (synopsis "Python wrapper for curve25519 library")
11583 (description "This is a python wrapper for the curve25519 library
11584 with ed25519 signatures. The C code was pulled from
11585 libaxolotl-android. At the moment this wrapper is meant for use by
11586 python-axolotl.")
11587 (license (list license:gpl3 ; Most files
11588 license:bsd-3)))) ; curve/curve25519-donna.c
11589
11590 (define-public python2-axolotl-curve25519
11591 (package-with-python2 python-axolotl-curve25519))
11592
11593 (define-public python-axolotl
11594 (package
11595 (name "python-axolotl")
11596 (version "0.1.35")
11597 (source
11598 (origin
11599 (method url-fetch)
11600 (uri (string-append
11601 "https://github.com/tgalal/python-axolotl/archive/"
11602 version ".tar.gz"))
11603 (file-name (string-append name "-" version ".tar.gz"))
11604 (sha256
11605 (base32 "1z8d89p7v40p4bwywjm9h4z28fdvra79ddw06azlkrfjbl7dxmz8"))))
11606 (build-system python-build-system)
11607 (arguments
11608 `(#:phases
11609 (modify-phases %standard-phases
11610 ;; Don't install tests
11611 (add-before 'install 'remove-tests
11612 (lambda _
11613 (for-each delete-file-recursively
11614 '("axolotl/tests" "build/lib/axolotl/tests"))
11615 #t)))
11616 ;; Prevent creation of the egg. This works around
11617 ;; https://debbugs.gnu.org/cgi/bugreport.cgi?bug=20765
11618 #:configure-flags '("--root=/")))
11619 (propagated-inputs
11620 `(("python-axolotl-curve25519" ,python-axolotl-curve25519)
11621 ("python-dateutil" ,python-dateutil)
11622 ("python-protobuf" ,python-protobuf)
11623 ("python-pycrypto" ,python-pycrypto)))
11624 (home-page "https://github.com/tgalal/python-axolotl")
11625 (synopsis "Python port of libaxolotl-android")
11626 (description "This is a python port of libaxolotl-android. This
11627 is a ratcheting forward secrecy protocol that works in synchronous and
11628 asynchronous messaging environments.")
11629 (license license:gpl3)))
11630
11631 (define-public python2-axolotl
11632 (package-with-python2 python-axolotl))
11633
11634 (define-public python-termstyle
11635 (package
11636 (name "python-termstyle")
11637 (version "0.1.11")
11638 (source
11639 (origin
11640 (method url-fetch)
11641 (uri (pypi-uri "termstyle" version))
11642 (sha256
11643 (base32
11644 "17wzkkcqy5zc0g68xlad3kcv66iw14d2pwqc0h9420gak0vbhx7g"))))
11645 (build-system python-build-system)
11646 (home-page "http://github.com/gfxmonk/termstyle")
11647 (synopsis "Console text coloring for Python")
11648 (description "This package provides console text coloring for Python.")
11649 (license license:bsd-3)))
11650
11651 (define-public python-rednose
11652 (package
11653 (name "python-rednose")
11654 (version "1.2.1")
11655 (source
11656 (origin
11657 (method url-fetch)
11658 (uri (pypi-uri "rednose" version))
11659 (sha256
11660 (base32
11661 "0b0bsna217lr1nykyhl5fgjly15zhdvqd4prg4wy1zrgfv7al6m0"))))
11662 (build-system python-build-system)
11663 (arguments
11664 `(#:phases
11665 (modify-phases %standard-phases
11666 (add-after 'unpack 'fix-deps
11667 (lambda _
11668 ;; See <https://github.com/JBKahn/rednose/issues/12>
11669 (substitute* "setup.py"
11670 (("python-termstyle") "termstyle"))
11671 #t)))))
11672 (propagated-inputs
11673 `(("python-colorama" ,python-colorama)
11674 ("python-termstyle" ,python-termstyle)))
11675 (native-inputs
11676 `(("python-six" ,python-six)
11677 ("python-nose" ,python-nose)))
11678 (home-page "https://github.com/JBKahn/rednose")
11679 (synopsis "Colored output for Python nosetests")
11680 (description "This package provides colored output for the
11681 @command{nosetests} command of the Python Nose unit test framework.")
11682 (license license:bsd-3)))
11683
11684 (define-public python-flask-restplus
11685 (package
11686 (name "python-flask-restplus")
11687 (version "0.9.2")
11688 (source
11689 (origin
11690 (method url-fetch)
11691 (uri (pypi-uri "flask-restplus" version))
11692 (sha256
11693 (base32
11694 "11his6ii5brpkhld0d5bwzjjw4q3vmplpd6fmgzjrvvklsbk0cf4"))))
11695 (build-system python-build-system)
11696 (propagated-inputs
11697 `(("python-aniso8601" ,python-aniso8601)
11698 ("python-flask" ,python-flask)
11699 ("python-jsonschema" ,python-jsonschema)
11700 ("python-pytz" ,python-pytz)
11701 ("python-six" ,python-six)))
11702 (native-inputs
11703 `(("python-tzlocal" ,python-tzlocal)
11704 ("python-blinker" ,python-blinker)
11705 ("python-nose" ,python-nose)
11706 ("python-rednose" ,python-rednose)))
11707 (home-page "https://github.com/noirbizarre/flask-restplus")
11708 (synopsis "Framework for documented API development with Flask")
11709 (description "This package provides a framework for API development with
11710 the Flask web framework in Python. It is similar to package
11711 @code{python-flask-restful} but supports the @code{python-swagger}
11712 documentation builder.")
11713 (license license:expat)))