gnu: Add python-jupyter-client.
[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 ;;;
34 ;;; This file is part of GNU Guix.
35 ;;;
36 ;;; GNU Guix is free software; you can redistribute it and/or modify it
37 ;;; under the terms of the GNU General Public License as published by
38 ;;; the Free Software Foundation; either version 3 of the License, or (at
39 ;;; your option) any later version.
40 ;;;
41 ;;; GNU Guix is distributed in the hope that it will be useful, but
42 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
43 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
44 ;;; GNU General Public License for more details.
45 ;;;
46 ;;; You should have received a copy of the GNU General Public License
47 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
48
49 (define-module (gnu packages python)
50 #:use-module ((guix licenses) #:prefix license:)
51 #:use-module (gnu packages)
52 #:use-module (gnu packages algebra)
53 #:use-module (gnu packages adns)
54 #:use-module (gnu packages attr)
55 #:use-module (gnu packages backup)
56 #:use-module (gnu packages compression)
57 #:use-module (gnu packages databases)
58 #:use-module (gnu packages django)
59 #:use-module (gnu packages file)
60 #:use-module (gnu packages fontutils)
61 #:use-module (gnu packages gcc)
62 #:use-module (gnu packages ghostscript)
63 #:use-module (gnu packages gl)
64 #:use-module (gnu packages glib)
65 #:use-module (gnu packages gstreamer)
66 #:use-module (gnu packages gtk)
67 #:use-module (gnu packages icu4c)
68 #:use-module (gnu packages image)
69 #:use-module (gnu packages imagemagick)
70 #:use-module (gnu packages libevent)
71 #:use-module (gnu packages libffi)
72 #:use-module (gnu packages linux)
73 #:use-module (gnu packages maths)
74 #:use-module (gnu packages multiprecision)
75 #:use-module (gnu packages networking)
76 #:use-module (gnu packages ncurses)
77 #:use-module (gnu packages openstack)
78 #:use-module (gnu packages password-utils)
79 #:use-module (gnu packages pcre)
80 #:use-module (gnu packages perl)
81 #:use-module (gnu packages pkg-config)
82 #:use-module (gnu packages readline)
83 #:use-module (gnu packages sdl)
84 #:use-module (gnu packages statistics)
85 #:use-module (gnu packages tex)
86 #:use-module (gnu packages texinfo)
87 #:use-module (gnu packages tls)
88 #:use-module (gnu packages version-control)
89 #:use-module (gnu packages web)
90 #:use-module (gnu packages base)
91 #:use-module (gnu packages xml)
92 #:use-module (gnu packages xorg)
93 #:use-module (gnu packages xdisorg)
94 #:use-module (gnu packages zip)
95 #:use-module (gnu packages tcl)
96 #:use-module (gnu packages bdw-gc)
97 #:use-module (guix packages)
98 #:use-module (guix download)
99 #:use-module (guix git-download)
100 #:use-module (guix utils)
101 #:use-module (guix build-system gnu)
102 #:use-module (guix build-system cmake)
103 #:use-module (guix build-system python)
104 #:use-module (guix build-system trivial)
105 #:use-module (srfi srfi-1))
106
107 (define-public python-2.7
108 (package
109 (name "python")
110 (version "2.7.11")
111 (source
112 (origin
113 (method url-fetch)
114 (uri (string-append "https://www.python.org/ftp/python/"
115 version "/Python-" version ".tar.xz"))
116 (sha256
117 (base32
118 "0iiz844riiznsyhhyy962710pz228gmhv8qi3yk4w4jhmx2lqawn"))
119 (patches (search-patches "python-2.7-search-paths.patch"
120 "python-2-deterministic-build-info.patch"
121 "python-2.7-source-date-epoch.patch"))
122 (modules '((guix build utils)))
123 ;; suboptimal to delete failing tests here, but if we delete them in the
124 ;; arguments then we need to make sure to strip out that phase when it
125 ;; gets inherited by python and python-minimal.
126 (snippet
127 '(begin
128 (for-each delete-file
129 '("Lib/test/test_compileall.py"
130 "Lib/test/test_distutils.py"
131 "Lib/test/test_import.py"
132 "Lib/test/test_shutil.py"
133 "Lib/test/test_socket.py"
134 "Lib/test/test_subprocess.py"))
135 #t))))
136 (outputs '("out"
137 "tk")) ;tkinter; adds 50 MiB to the closure
138 (build-system gnu-build-system)
139 (arguments
140 `(;; 356 tests OK.
141 ;; 6 tests failed:
142 ;; test_compileall test_distutils test_import test_shutil test_socket
143 ;; test_subprocess
144 ;; 39 tests skipped:
145 ;; test_aepack test_al test_applesingle test_bsddb test_bsddb185
146 ;; test_bsddb3 test_cd test_cl test_codecmaps_cn test_codecmaps_hk
147 ;; test_codecmaps_jp test_codecmaps_kr test_codecmaps_tw test_curses
148 ;; test_dl test_gdb test_gl test_imageop test_imgfile test_ioctl
149 ;; test_kqueue test_linuxaudiodev test_macos test_macostools
150 ;; test_msilib test_ossaudiodev test_scriptpackages test_smtpnet
151 ;; test_socketserver test_startfile test_sunaudiodev test_timeout
152 ;; test_tk test_ttk_guionly test_urllib2net test_urllibnet
153 ;; test_winreg test_winsound test_zipfile64
154 ;; 4 skips unexpected on linux2:
155 ;; test_bsddb test_bsddb3 test_gdb test_ioctl
156 #:test-target "test"
157 #:configure-flags
158 (list "--enable-shared" ;allow embedding
159 "--with-system-ffi" ;build ctypes
160 (string-append "LDFLAGS=-Wl,-rpath="
161 (assoc-ref %outputs "out") "/lib"))
162
163 #:modules ((ice-9 ftw) (ice-9 match)
164 (guix build utils) (guix build gnu-build-system))
165 #:phases
166 (modify-phases %standard-phases
167 (add-before
168 'configure 'patch-lib-shells
169 (lambda _
170 ;; Filter for existing files, since some may not exist in all
171 ;; versions of python that are built with this recipe.
172 (substitute* (filter file-exists?
173 '("Lib/subprocess.py"
174 "Lib/popen2.py"
175 "Lib/distutils/tests/test_spawn.py"
176 "Lib/test/test_subprocess.py"))
177 (("/bin/sh") (which "sh")))
178
179 ;; Use zero as the timestamp in .pyc files so that builds are
180 ;; deterministic. TODO: Remove it when this variable is set in
181 ;; gnu-build-system.scm.
182 (setenv "SOURCE_DATE_EPOCH" "1")
183 #t))
184 (add-before 'configure 'do-not-record-configure-flags
185 (lambda* (#:key configure-flags #:allow-other-keys)
186 ;; Remove configure flags from the installed '_sysconfigdata.py'
187 ;; and 'Makefile' so we don't end up keeping references to the
188 ;; build tools.
189 ;;
190 ;; Preserve at least '--with-system-ffi' since otherwise the
191 ;; thing tries to build libffi, fails, and we end up with a
192 ;; Python that lacks ctypes.
193 (substitute* "configure"
194 (("^CONFIG_ARGS=.*$")
195 (format #f "CONFIG_ARGS='~a'\n"
196 (if (member "--with-system-ffi" configure-flags)
197 "--with-system-ffi"
198 ""))))
199 #t))
200 (add-before
201 'check 'pre-check
202 (lambda _
203 ;; 'Lib/test/test_site.py' needs a valid $HOME
204 (setenv "HOME" (getcwd))
205 ,@(if (string-prefix? "mips64el" (%current-system))
206
207 ;; XXX: The following test fails on mips64el.
208 '((false-if-exception
209 (delete-file "Lib/test/test_ctypes.py")))
210
211 '())
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 "http://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.4
309 (package (inherit python-2)
310 (version "3.4.3")
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 ;; XXX Try removing this patch for python > 3.4.3
318 "python-disable-ssl-test.patch"
319 "python-3-deterministic-build-info.patch"
320 "python-3-search-paths.patch"))
321 (patch-flags '("-p0"))
322 (sha256
323 (base32
324 "1f4nm4z08sy0kqwisvv95l02crv6dyysdmx44p1mz3bn6csrdcxm"))))
325 (arguments (substitute-keyword-arguments (package-arguments python-2)
326 ((#:tests? _) #t)))
327 (native-search-paths
328 (list (search-path-specification
329 (variable "PYTHONPATH")
330 (files (list (string-append "lib/python"
331 (version-major+minor version)
332 "/site-packages"))))))))
333
334 ;; Current 3.x version.
335 (define-public python-3 python-3.4)
336
337 ;; Current major version.
338 (define-public python python-3)
339
340 ;; Minimal variants of Python, mostly used to break the cycle between Tk and
341 ;; Python (Tk -> libxcb -> Python.)
342
343 (define-public python2-minimal
344 (package (inherit python-2)
345 (name "python-minimal")
346 (outputs '("out"))
347 (arguments
348 (substitute-keyword-arguments (package-arguments python-2)
349 ((#:configure-flags cf)
350 `(append ,cf '("--without-system-ffi")))))
351 (inputs '()))) ;none of the optional dependencies
352
353 (define-public python-minimal
354 (package (inherit python)
355 (name "python-minimal")
356 (outputs '("out"))
357 (arguments
358 (substitute-keyword-arguments (package-arguments python)
359 ((#:configure-flags cf)
360 `(append ,cf '("--without-system-ffi")))))
361
362 ;; OpenSSL is a mandatory dependency of Python 3.x, for urllib;
363 ;; zlib is required by 'zipimport', used by pip.
364 (inputs `(("openssl" ,openssl)
365 ("zlib" ,zlib)))))
366
367 (define* (wrap-python3 python
368 #:optional
369 (name (string-append (package-name python) "-wrapper")))
370 (package (inherit python)
371 (name name)
372 (source #f)
373 (build-system trivial-build-system)
374 (outputs '("out"))
375 (propagated-inputs `(("python" ,python)))
376 (arguments
377 `(#:modules ((guix build utils))
378 #:builder
379 (begin
380 (use-modules (guix build utils))
381 (let ((bin (string-append (assoc-ref %outputs "out") "/bin"))
382 (python (string-append (assoc-ref %build-inputs "python") "/bin/")))
383 (mkdir-p bin)
384 (for-each
385 (lambda (old new)
386 (symlink (string-append python old)
387 (string-append bin "/" new)))
388 '("python3" "pydoc3" "idle3")
389 '("python" "pydoc" "idle"))))))
390 (synopsis "Wrapper for the Python 3 commands")
391 (description
392 "This package provides wrappers for the commands of Python@tie{}3.x such
393 that they can be invoked under their usual name---e.g., @command{python}
394 instead of @command{python3}.")))
395
396 (define-public python-wrapper (wrap-python3 python))
397 (define-public python-minimal-wrapper (wrap-python3 python-minimal))
398
399 (define-public python-psutil
400 (package
401 (name "python-psutil")
402 (version "4.3.0")
403 (source
404 (origin
405 (method url-fetch)
406 (uri (pypi-uri "psutil" version))
407 (sha256
408 (base32
409 "1w4r09fvn6kd80m5mx4ws1wz100brkaq6hzzpwrns8cgjzjpl6c6"))))
410 (build-system python-build-system)
411 (native-inputs
412 `(("python-setuptools" ,python-setuptools)))
413 (home-page "https://www.github.com/giampaolo/psutil")
414 (synopsis "Library for retrieving information on running processes")
415 (description
416 "psutil (Python system and process utilities) is a library for retrieving
417 information on running processes and system utilization (CPU, memory, disks,
418 network) in Python. It is useful mainly for system monitoring, profiling and
419 limiting process resources and management of running processes. It implements
420 many functionalities offered by command line tools such as: ps, top, lsof,
421 netstat, ifconfig, who, df, kill, free, nice, ionice, iostat, iotop, uptime,
422 pidof, tty, taskset, pmap.")
423 (license license:bsd-3)))
424
425 (define-public python2-psutil
426 (package-with-python2 python-psutil))
427
428 (define-public python-passlib
429 (package
430 (name "python-passlib")
431 (version "1.6.5")
432 (source
433 (origin
434 (method url-fetch)
435 (uri (pypi-uri "passlib" version))
436 (sha256
437 (base32
438 "1z27wdxs5rj5xhhqfzvzn3yg682irkxw6dcs5jj7mcf97psk8gd8"))))
439 (build-system python-build-system)
440 (native-inputs
441 `(("python-nose" ,python-nose)
442 ("python-setuptools" ,python-setuptools)))
443 (inputs
444 `(("python-py-bcrypt" ,python-py-bcrypt)))
445 (arguments
446 `(#:phases
447 (alist-cons-before
448 'check 'set-PYTHON_EGG_CACHE
449 ;; some tests require access to "$HOME/.cython"
450 (lambda* _ (setenv "PYTHON_EGG_CACHE" "/tmp"))
451 %standard-phases)))
452 (home-page "https://bitbucket.org/ecollins/passlib")
453 (synopsis
454 "Comprehensive password hashing framework")
455 (description
456 "Passlib is a password hashing library for Python 2 & 3, which provides
457 cross-platform implementations of over 30 password hashing algorithms, as well
458 as a framework for managing existing password hashes. It's designed to be
459 useful for a wide range of tasks, from verifying a hash found in /etc/shadow,
460 to providing full-strength password hashing for multi-user application.")
461 (license license:bsd-3)))
462
463 (define-public python2-passlib
464 (package-with-python2 python-passlib))
465
466 (define-public python-py-bcrypt
467 (package
468 (name "python-py-bcrypt")
469 (version "0.4")
470 (source
471 (origin
472 (method url-fetch)
473 (uri (string-append
474 "https://pypi.python.org/packages/source/p/py-bcrypt/py-bcrypt-"
475 version
476 ".tar.gz"))
477 (sha256
478 (base32
479 "0y6smdggwi5s72v6p1nn53dg6w05hna3d264cq6kas0lap73p8az"))))
480 (build-system python-build-system)
481 (native-inputs
482 `(("python-setuptools" ,python-setuptools)))
483 (home-page "https://code.google.com/p/py-bcrypt")
484 (synopsis
485 "Bcrypt password hashing and key derivation")
486 (description
487 "A python wrapper of OpenBSD's Blowfish password hashing code. This
488 system hashes passwords using a version of Bruce Schneier's Blowfish block
489 cipher with modifications designed to raise the cost of off-line password
490 cracking and frustrate fast hardware implementation. The computation cost of
491 the algorithm is parametised, so it can be increased as computers get faster.
492 The intent is to make a compromise of a password database less likely to
493 result in an attacker gaining knowledge of the plaintext passwords (e.g. using
494 John the Ripper).")
495 ;; "sha2.c" is under BSD-3;
496 ;; "blowfish.c" and "bcrypt.c" are under BSD-4;
497 ;; the rest is under ISC.
498 (license (list license:isc license:bsd-3 license:bsd-4))))
499
500 (define-public python2-py-bcrypt
501 (package-with-python2 python-py-bcrypt))
502
503
504 (define-public python-paramiko
505 (package
506 (name "python-paramiko")
507 (version "1.16.0")
508 (source
509 (origin
510 (method url-fetch)
511 (uri (pypi-uri "paramiko" version))
512 (sha256
513 (base32
514 "14k8z7ndc3zk5xivnm4d8lncchx475ll5izpf8vmfbq7rp9yp5rj"))))
515 (build-system python-build-system)
516 (native-inputs
517 `(("python-setuptools" ,python-setuptools)))
518 (propagated-inputs
519 `(("python-pycrypto" ,python-pycrypto)))
520 (inputs
521 `(("python-ecdsa" ,python-ecdsa)))
522 (home-page "http://www.paramiko.org/")
523 (synopsis "SSHv2 protocol library")
524 (description "Paramiko is a python implementation of the SSHv2 protocol,
525 providing both client and server functionality. While it leverages a Python C
526 extension for low level cryptography (PyCrypto), Paramiko itself is a pure
527 Python interface around SSH networking concepts.")
528 (license license:lgpl2.1+)))
529
530 (define-public python2-paramiko
531 (package-with-python2 python-paramiko))
532
533
534 (define-public python-httplib2
535 (package
536 (name "python-httplib2")
537 (version "0.9.2")
538 (source
539 (origin
540 (method url-fetch)
541 (uri (pypi-uri "httplib2" version))
542 (sha256
543 (base32
544 "126rsryvw9vhbf3qmsfw9lf4l4xm2srmgs439lgma4cpag4s3ay3"))))
545 (build-system python-build-system)
546 (native-inputs
547 `(("python-setuptools" ,python-setuptools)))
548 (home-page "https://github.com/jcgregorio/httplib2")
549 (synopsis "Comprehensive HTTP client library")
550 (description
551 "A comprehensive HTTP client library supporting many features left out of
552 other HTTP libraries.")
553 (license license:expat)))
554
555 (define-public python2-httplib2
556 (package-with-python2 python-httplib2))
557
558 (define-public python-ecdsa
559 (package
560 (name "python-ecdsa")
561 (version "0.13")
562 (source
563 (origin
564 (method url-fetch)
565 (uri (string-append
566 "https://pypi.python.org/packages/source/e/ecdsa/ecdsa-"
567 version
568 ".tar.gz"))
569 (sha256
570 (base32
571 "1yj31j0asmrx4an9xvsaj2icdmzy6pw0glfpqrrkrphwdpi1xkv4"))))
572 (build-system python-build-system)
573 (native-inputs
574 `(("python-setuptools" ,python-setuptools)))
575 (inputs
576 `(("openssl" ,openssl)))
577 (home-page
578 "http://github.com/warner/python-ecdsa")
579 (synopsis
580 "ECDSA cryptographic signature library (pure python)")
581 (description
582 "This is an easy-to-use implementation of ECDSA cryptography (Elliptic
583 Curve Digital Signature Algorithm), implemented purely in Python. With this
584 library, you can quickly create keypairs (signing key and verifying key), sign
585 messages, and verify the signatures. The keys and signatures are very short,
586 making them easy to handle and incorporate into other protocols.")
587 (license license:expat)))
588
589 (define-public python2-ecdsa
590 (package-with-python2 python-ecdsa))
591
592 (define-public python-ccm
593 (package
594 (name "python-ccm")
595 (version "2.1.6")
596 (source
597 (origin
598 (method url-fetch)
599 (uri (pypi-uri "ccm" version))
600 (sha256
601 (base32
602 "177dfxsmk3k4cih6fh6v8d91bh4nqx7ns6pc07w7m7i3cvdx3c8n"))))
603 (build-system python-build-system)
604 (native-inputs
605 `(("python-setuptools" ,python-setuptools)))
606 (inputs
607 `(("python-pyyaml" ,python-pyyaml)
608 ("python-six" ,python-six)))
609 (home-page "https://github.com/pcmanus/ccm")
610 (synopsis "Cassandra Cluster Manager")
611 (description "A script/library to create, launch and remove an Apache
612 Cassandra cluster on localhost.")
613 (license license:asl2.0)))
614
615 (define-public python2-ccm
616 (package-with-python2 python-ccm))
617
618 (define-public python-pytz
619 (package
620 (name "python-pytz")
621 (version "2016.3")
622 (source
623 (origin
624 (method url-fetch)
625 (uri (pypi-uri "pytz" version ".tar.bz2"))
626 (sha256
627 (base32
628 "1mjmrkk4vc5xzppw7fm0pli1nnbj57cvqv7jjv5whcmccyhxz4y1"))))
629 (build-system python-build-system)
630 (arguments `(#:tests? #f)) ; no test target
631 (home-page "http://pythonhosted.org/pytz")
632 (synopsis "Python timezone library")
633 (description
634 "This library allows accurate and cross platform timezone calculations
635 using Python 2.4 or higher and provides access to the Olson timezone database.")
636 (license license:expat)))
637
638 (define-public python2-pytz
639 (package-with-python2 python-pytz))
640
641
642 (define-public python-babel
643 (package
644 (name "python-babel")
645 (version "2.3.2")
646 (source
647 (origin
648 (method url-fetch)
649 (uri (pypi-uri "Babel" version))
650 (sha256
651 (base32
652 "0k43pi0p1dwpds2w0km3fw92wixzxv2vw7p09capxmjz5cfh23lw"))))
653 (build-system python-build-system)
654 (inputs
655 `(("python-pytz" ,python-pytz)
656 ("python-setuptools" ,python-setuptools)))
657 (arguments `(#:tests? #f)) ; no test target
658 (home-page "http://babel.pocoo.org/")
659 (synopsis
660 "Tools for internationalizing Python applications")
661 (description
662 "Babel is composed of two major parts:
663 - tools to build and work with gettext message catalogs
664 - a Python interface to the CLDR (Common Locale Data Repository), providing
665 access to various locale display names, localized number and date formatting,
666 etc. ")
667 (license license:bsd-3)))
668
669 (define-public python2-babel
670 (package-with-python2 python-babel))
671
672 (define-public python2-backport-ssl-match-hostname
673 (package
674 (name "python2-backport-ssl-match-hostname")
675 (version "3.5.0.1")
676 (source
677 (origin
678 (method url-fetch)
679 (uri (string-append
680 "https://pypi.python.org/packages/source/b/"
681 "backports.ssl_match_hostname/backports.ssl_match_hostname-"
682 version ".tar.gz"))
683 (sha256
684 (base32
685 "1wndipik52cyqy0677zdgp90i435pmvwd89cz98lm7ri0y3xjajh"))))
686 (build-system python-build-system)
687 (arguments
688 `(#:python ,python-2
689 #:tests? #f)) ; no test target
690 (inputs
691 `(("python2-setuptools" ,python2-setuptools)))
692 (home-page "https://bitbucket.org/brandon/backports.ssl_match_hostname")
693 (synopsis "Backport of ssl.match_hostname() function from Python 3.5")
694 (description
695 "This backport brings the ssl.match_hostname() function to users of
696 earlier versions of Python. The function checks the hostname in the
697 certificate returned by the server to which a connection has been established,
698 and verifies that it matches the intended target hostname.")
699 (license license:psfl)))
700
701 (define-public python-h5py
702 (package
703 (name "python-h5py")
704 (version "2.6.0")
705 (source
706 (origin
707 (method url-fetch)
708 (uri (pypi-uri "h5py" version))
709 (sha256
710 (base32
711 "0df46dg7i7xfking9lp221bfm8dbl974yvlrbi1w7r6m61ac7bxj"))))
712 (build-system python-build-system)
713 (arguments
714 `(#:tests? #f ; no test target
715 #:phases
716 (modify-phases %standard-phases
717 (add-after 'unpack 'fix-hdf5-paths
718 (lambda* (#:key inputs #:allow-other-keys)
719 (let ((prefix (assoc-ref inputs "hdf5")))
720 (substitute* "setup_build.py"
721 (("\\['/opt/local/lib', '/usr/local/lib'\\]")
722 (string-append "['" prefix "/lib" "']"))
723 (("'/opt/local/include', '/usr/local/include'")
724 (string-append "'" prefix "/include" "'")))
725 (substitute* "setup_configure.py"
726 (("\\['/usr/local/lib', '/opt/local/lib'\\]")
727 (string-append "['" prefix "/lib" "']")))
728 #t))))))
729 (propagated-inputs
730 `(("python-numpy" ,python-numpy)))
731 (inputs
732 `(("hdf5" ,hdf5)
733 ("python-six" ,python-six)))
734 (native-inputs
735 `(("python-cython" ,python-cython)
736 ("python-pkgconfig" ,python-pkgconfig)))
737 (home-page "http://www.h5py.org/")
738 (synopsis "Read and write HDF5 files from Python")
739 (description
740 "The h5py package provides both a high- and low-level interface to the
741 HDF5 library from Python. The low-level interface is intended to be a
742 complete wrapping of the HDF5 API, while the high-level component supports
743 access to HDF5 files, datasets and groups using established Python and NumPy
744 concepts.")
745 (license license:bsd-3)
746 (properties `((python2-variant . ,(delay python2-h5py))))))
747
748 (define-public python2-h5py
749 (package-with-python2 (strip-python2-variant python-h5py)))
750
751 (define-public python-lockfile
752 (package
753 (name "python-lockfile")
754 (version "0.12.2")
755 (source
756 (origin
757 (method url-fetch)
758 (uri (string-append "https://pypi.python.org/packages/source/l/lockfile/"
759 "lockfile-" version ".tar.gz"))
760 (sha256
761 (base32
762 "16gpx5hm73ah5n1079ng0vy381hl802v606npkx4x8nb0gg05vba"))))
763 (build-system python-build-system)
764 (arguments '(#:test-target "check"))
765 (native-inputs
766 `(("python-pbr" ,python-pbr)))
767 (home-page "https://launchpad.net/pylockfile")
768 (synopsis "Platform-independent file locking module")
769 (description
770 "The lockfile package exports a LockFile class which provides a simple
771 API for locking files.")
772 (license license:expat)
773 (properties `((python2-variant . ,(delay python2-lockfile))))))
774
775 (define-public python2-lockfile
776 (let ((base (package-with-python2 (strip-python2-variant python-lockfile))))
777 (package
778 (inherit base)
779 (native-inputs `(("python2-setuptools" ,python2-setuptools)
780 ,@(package-native-inputs base))))))
781
782 (define-public python-mock
783 (package
784 (name "python-mock")
785 (version "1.0.1")
786 (source
787 (origin
788 (method url-fetch)
789 (uri (string-append "https://pypi.python.org/packages/source/m/mock/"
790 "mock-" version ".tar.gz"))
791 (sha256
792 (base32
793 "0kzlsbki6q0awf89rc287f3aj8x431lrajf160a70z0ikhnxsfdq"))))
794 (build-system python-build-system)
795 (arguments '(#:test-target "check"))
796 (home-page "http://code.google.com/p/mock/")
797 (synopsis "Python mocking and patching library for testing")
798 (description
799 "Mock is a library for testing in Python. It allows you to replace parts
800 of your system under test with mock objects and make assertions about how they
801 have been used.")
802 (license license:expat)))
803
804 (define-public python2-mock
805 (package-with-python2 python-mock))
806
807
808 (define-public python-setuptools
809 (package
810 (name "python-setuptools")
811 (version "18.3.1")
812 (source
813 (origin
814 (method url-fetch)
815 (uri (string-append "https://pypi.python.org/packages/source/s/setuptools/setuptools-"
816 version ".tar.gz"))
817 (sha256
818 (base32
819 "0kc7rbav00ks6iaw14p38y81q12fx0lpkhgf5m97xc04f5r318ig"))))
820 (build-system python-build-system)
821 ;; FIXME: Tests require pytest, which itself relies on setuptools.
822 ;; One could bootstrap with an internal untested setuptools.
823 (arguments
824 `(#:tests? #f))
825 (home-page "https://pypi.python.org/pypi/setuptools")
826 (synopsis
827 "Library designed to facilitate packaging Python projects")
828 (description
829 "Setuptools is a fully-featured, stable library designed to facilitate
830 packaging Python projects, where packaging includes:
831 Python package and module definitions,
832 distribution package metadata,
833 test hooks,
834 project installation,
835 platform-specific details,
836 Python 3 support.")
837 (license license:psfl)))
838
839 (define-public python2-setuptools
840 (package-with-python2 python-setuptools))
841
842
843 (define-public python-pycrypto
844 (package
845 (name "python-pycrypto")
846 (version "2.6.1")
847 (source
848 (origin
849 (method url-fetch)
850 (uri (string-append "https://pypi.python.org/packages/source/p/"
851 "pycrypto/pycrypto-" version ".tar.gz"))
852 (sha256
853 (base32
854 "0g0ayql5b9mkjam8hym6zyg6bv77lbh66rv1fyvgqb17kfc1xkpj"))))
855 (build-system python-build-system)
856 (native-inputs
857 `(("python-setuptools" ,python-setuptools)))
858 (inputs
859 `(("python" ,python)
860 ("gmp" ,gmp)))
861 (arguments
862 `(#:phases
863 (alist-cons-before
864 'build 'set-build-env
865 ;; pycrypto runs an autoconf configure script behind the scenes
866 (lambda _
867 (setenv "CONFIG_SHELL" (which "bash")))
868 %standard-phases)))
869 (home-page "http://www.pycrypto.org/")
870 (synopsis "Cryptographic modules for Python")
871 (description
872 "Pycrypto is a collection of both secure hash functions (such as SHA256
873 and RIPEMD160), and various encryption algorithms (AES, DES, RSA, ElGamal,
874 etc.). The package is structured to make adding new modules easy.")
875 (license license:public-domain)))
876
877 (define-public python2-pycrypto
878 (let ((pycrypto (package-with-python2 python-pycrypto)))
879 (package (inherit pycrypto)
880 (inputs
881 `(("python" ,python-2)
882 ,@(alist-delete
883 "python"
884 (package-inputs pycrypto)))))))
885
886 (define-public python-keyring
887 (package
888 (name "python-keyring")
889 (version "8.7")
890 (source
891 (origin
892 (method url-fetch)
893 (uri (pypi-uri "keyring" version))
894 (sha256
895 (base32
896 "0482rmi2x6p78wl2kz8qzyq21xz1sbbfwnv5x7dggar4vkwxhzfx"))))
897 (build-system python-build-system)
898 (native-inputs
899 `(("python-setuptools-scm" ,python-setuptools-scm)))
900 (inputs
901 `(("python-pycrypto" ,python-pycrypto)))
902 (arguments
903 `(#:tests? #f)) ;TODO: tests require pytest
904 (home-page "https://github.com/jaraco/keyring")
905 (synopsis "Store and access your passwords safely")
906 (description
907 "The Python keyring lib provides a easy way to access the system keyring
908 service from python. It can be used in any application that needs safe
909 password storage.")
910 ;; "MIT" and PSF dual license
911 (license license:x11)
912 (properties `((python2-variant . ,(delay python2-keyring))))))
913
914 (define-public python2-keyring
915 (let ((base (package-with-python2 (strip-python2-variant python-keyring))))
916 (package
917 (inherit base)
918 (native-inputs `(("python2-setuptools" ,python2-setuptools)
919 ,@(package-native-inputs base))))))
920
921 (define-public python-six
922 (package
923 (name "python-six")
924 (version "1.10.0")
925 (source
926 (origin
927 (method url-fetch)
928 (uri (pypi-uri "six" version))
929 (sha256
930 (base32
931 "0snmb8xffb3vsma0z67i0h0w2g2dy0p3gsgh9gi4i0kgc5l8spqh"))))
932 (build-system python-build-system)
933 (inputs
934 `(("python-setuptools" ,python-setuptools)))
935 (home-page "http://pypi.python.org/pypi/six/")
936 (synopsis "Python 2 and 3 compatibility utilities")
937 (description
938 "Six is a Python 2 and 3 compatibility library. It provides utility
939 functions for smoothing over the differences between the Python versions with
940 the goal of writing Python code that is compatible on both Python versions.
941 Six supports every Python version since 2.5. It is contained in only one
942 Python file, so it can be easily copied into your project.")
943 (license license:x11)))
944
945 (define-public python2-six
946 (package-with-python2 python-six))
947
948 (define-public python-dateutil-2
949 (package
950 (name "python-dateutil")
951 (version "2.5.2")
952 (source
953 (origin
954 (method url-fetch)
955 (uri (pypi-uri "python-dateutil" version))
956 (sha256
957 (base32
958 "0jrfpcgvgya6hs45dhrd9yiqgdgz9qp9aa07zsw8gqgn8zphff86"))))
959 (build-system python-build-system)
960 (inputs
961 `(("python-six" ,python-six)))
962 (home-page "https://dateutil.readthedocs.io/en/stable/")
963 (synopsis "Extensions to the standard datetime module")
964 (description
965 "The dateutil module provides powerful extensions to the standard
966 datetime module, available in Python 2.3+.")
967 (license license:bsd-3)
968 (properties `((python2-variant . ,(delay python2-dateutil-2))))))
969
970 (define-public python2-dateutil-2
971 (let ((base (package-with-python2 (strip-python2-variant python-dateutil-2))))
972 (package
973 (inherit base)
974 (inputs `(("python2-setuptools" ,python2-setuptools)
975 ,@(package-inputs base))))))
976
977 (define-public python-dateutil
978 (package
979 (name "python-dateutil")
980 (version "1.5") ; last version for python < 3
981 (source
982 (origin
983 (method url-fetch)
984 (uri (string-append "http://labix.org/download/python-dateutil/"
985 "python-dateutil-" version ".tar.gz"))
986 (sha256
987 (base32
988 "0fqfglhy5khbvsipr3x7m6bcaqljh8xl5cw33vbfxy7qhmywm2n0"))))
989 (build-system python-build-system)
990 (inputs
991 `(("python-setuptools" ,python-setuptools)))
992 (home-page "https://dateutil.readthedocs.io/en/stable/")
993 (synopsis "Extensions to the standard datetime module")
994 (description
995 "The dateutil module provides powerful extensions to the standard
996 datetime module, available in Python 2.3+.")
997 (license license:psfl)))
998
999 (define-public python2-dateutil
1000 (package-with-python2 python-dateutil))
1001
1002 (define-public python-parsedatetime
1003 (package
1004 (name "python-parsedatetime")
1005 (version "2.1")
1006 (source
1007 (origin
1008 (method url-fetch)
1009 (uri (pypi-uri "parsedatetime" version))
1010 (sha256
1011 (base32
1012 "0bdgyw6y3v7bcxlx0p50s8drxsh5bb5cy2afccqr3j90amvpii8p"))))
1013 (build-system python-build-system)
1014 (native-inputs
1015 `(("python-nose" ,python-nose)
1016 ("python-pyicu" ,python-pyicu)))
1017 (home-page "http://github.com/bear/parsedatetime/")
1018 (synopsis
1019 "Parse human-readable date/time text")
1020 (description
1021 "Parse human-readable date/time text.")
1022 (license license:asl2.0)
1023 (properties `((python2-variant . ,(delay python2-parsedatetime))))))
1024
1025 (define-public python2-parsedatetime
1026 (let ((base (package-with-python2 (strip-python2-variant python-parsedatetime))))
1027 (package
1028 (inherit base)
1029 (native-inputs `(("python2-setuptools" ,python2-setuptools)
1030 ,@(package-native-inputs base))))))
1031
1032 (define-public python-pandas
1033 (package
1034 (name "python-pandas")
1035 (version "0.18.1")
1036 (source
1037 (origin
1038 (method url-fetch)
1039 (uri (string-append
1040 "https://pypi.python.org/packages/11/09/"
1041 "e66eb844daba8680ddff26335d5b4fead77f60f957678243549a8dd4830d/"
1042 "pandas-" version ".tar.gz"))
1043 (sha256
1044 (base32 "1ckpxrvvjj6zxmn68icd9hib8qcpx9b35f6izxnr25br5ilq7r6j"))))
1045 (build-system python-build-system)
1046 (propagated-inputs
1047 `(("python-numpy" ,python-numpy)))
1048 (inputs
1049 `(("python-pytz" ,python-pytz)
1050 ("python-dateutil" ,python-dateutil-2)))
1051 (native-inputs
1052 `(("python-nose" ,python-nose)))
1053 (home-page "http://pandas.pydata.org")
1054 (synopsis "Data structures for data analysis, time series, and statistics")
1055 (description
1056 "Pandas is a Python package providing fast, flexible, and expressive data
1057 structures designed to make working with structured (tabular,
1058 multidimensional, potentially heterogeneous) and time series data both easy
1059 and intuitive. It aims to be the fundamental high-level building block for
1060 doing practical, real world data analysis in Python.")
1061 (license license:bsd-3)
1062 (properties `((python2-variant . ,(delay python2-pandas))))))
1063
1064 (define-public python2-pandas
1065 (let ((base (package-with-python2 (strip-python2-variant python-pandas))))
1066 (package
1067 (inherit base)
1068 (native-inputs `(("python2-setuptools" ,python2-setuptools)
1069 ,@(package-native-inputs base))))))
1070
1071 (define-public python-tzlocal
1072 (package
1073 (name "python-tzlocal")
1074 (version "1.2.2")
1075 (source
1076 (origin
1077 (method url-fetch)
1078 (uri (pypi-uri "tzlocal" version))
1079 (sha256
1080 (base32
1081 "0paj7vlsb0np8b5sp4bv64wxv7qk2piyp7xg29pkhdjwsbls9fnb"))))
1082 (build-system python-build-system)
1083 (inputs `(("python-pytz" ,python-pytz)))
1084 (home-page "https://github.com/regebro/tzlocal")
1085 (synopsis
1086 "Local timezone information for Python")
1087 (description
1088 "Tzlocal returns a tzinfo object with the local timezone information.
1089 This module attempts to fix a glaring hole in pytz, that there is no way to
1090 get the local timezone information, unless you know the zoneinfo name, and
1091 under several distributions that's hard or impossible to figure out.")
1092 (license license:cc0)))
1093
1094 (define-public python2-pysqlite
1095 (package
1096 (name "python2-pysqlite")
1097 (version "2.8.1")
1098 (source
1099 (origin
1100 (method url-fetch)
1101 (uri (pypi-uri "pysqlite" version))
1102 (sha256
1103 (base32
1104 "0rm0zqyb363y6wljhfmbxs16jjv7p8nk1d8zgq9sdwj6js7y3jkm"))))
1105 (build-system python-build-system)
1106 (inputs
1107 `(("sqlite" ,sqlite)))
1108 (arguments
1109 `(#:python ,python-2 ; incompatible with Python 3
1110 #:tests? #f)) ; no test target
1111 (home-page "http://github.com/ghaering/pysqlite")
1112 (synopsis "SQLite bindings for Python")
1113 (description
1114 "Pysqlite provides SQLite bindings for Python that comply to the
1115 Database API 2.0T.")
1116 (license license:zlib)))
1117
1118
1119 (define-public python2-mechanize
1120 (package
1121 (name "python2-mechanize")
1122 (version "0.2.5")
1123 (source
1124 (origin
1125 (method url-fetch)
1126 (uri (string-append "https://pypi.python.org/packages/source/m/mechanize/mechanize-"
1127 version ".tar.gz"))
1128 (sha256
1129 (base32
1130 "0rj7r166i1dyrq0ihm5rijfmvhs8a04im28lv05c0c3v206v4rrf"))))
1131 (build-system python-build-system)
1132 (inputs
1133 `(("python2-setuptools" ,python2-setuptools)))
1134 (arguments
1135 `(#:python ,python-2 ; apparently incompatible with Python 3
1136 #:tests? #f))
1137 ;; test fails with message
1138 ;; AttributeError: 'module' object has no attribute 'test_pullparser'
1139 ;; (python-3.3.2) or
1140 ;; AttributeError: 'module' object has no attribute 'test_urllib2_localnet'
1141 ;; (python-2.7.5).
1142 ;; The source code is from March 2011 and probably not up-to-date
1143 ;; with respect to python unit tests.
1144 (home-page "http://wwwsearch.sourceforge.net/mechanize/")
1145 (synopsis
1146 "Stateful programmatic web browsing in Python")
1147 (description
1148 "Mechanize implements stateful programmatic web browsing in Python,
1149 after Andy Lester’s Perl module WWW::Mechanize.")
1150 (license (license:non-copyleft
1151 "file://COPYING"
1152 "See COPYING in the distribution."))))
1153
1154
1155 (define-public python-simplejson
1156 (package
1157 (name "python-simplejson")
1158 (version "3.8.2")
1159 (source
1160 (origin
1161 (method url-fetch)
1162 (uri (pypi-uri "simplejson" version))
1163 (sha256
1164 (base32
1165 "0zylrnax8b6r0ndgni4w9c599fi6wm9vx5g6k3ddqfj3932kk16m"))))
1166 (build-system python-build-system)
1167 (home-page "http://simplejson.readthedocs.org/en/latest/")
1168 (synopsis
1169 "Json library for Python")
1170 (description
1171 "JSON (JavaScript Object Notation) is a subset of JavaScript
1172 syntax (ECMA-262 3rd edition) used as a lightweight data interchange
1173 format.
1174
1175 Simplejson exposes an API familiar to users of the standard library marshal
1176 and pickle modules. It is the externally maintained version of the json
1177 library contained in Python 2.6, but maintains compatibility with Python 2.5
1178 and (currently) has significant performance advantages, even without using
1179 the optional C extension for speedups. Simplejson is also supported on
1180 Python 3.3+.")
1181 (license license:x11)))
1182
1183 (define-public python2-simplejson
1184 (package-with-python2 python-simplejson))
1185
1186
1187 (define-public python-pyicu
1188 (package
1189 (name "python-pyicu")
1190 (version "1.9.2")
1191 (source
1192 (origin
1193 (method url-fetch)
1194 (uri (string-append "https://pypi.python.org/packages/source/P/PyICU/PyICU-"
1195 version ".tar.gz"))
1196 (sha256
1197 (base32
1198 "1diba0g8md614fvm9yf50paiwdkhj6rd7xwf1rg9mc0pxc0hhn4v"))))
1199 (build-system python-build-system)
1200 (inputs
1201 `(("icu4c" ,icu4c)))
1202 (home-page "http://pyicu.osafoundation.org/")
1203 (synopsis "Python extension wrapping the ICU C++ API")
1204 (description
1205 "PyICU is a python extension wrapping the ICU C++ API.")
1206 (license license:x11)
1207 (properties `((python2-variant . ,(delay python2-pyicu))))))
1208
1209 (define-public python2-pyicu
1210 (package
1211 (inherit (package-with-python2
1212 (strip-python2-variant python-pyicu)))
1213 (native-inputs `(("python2-setuptools" ,python2-setuptools)))))
1214
1215 (define-public python2-dogtail
1216 ;; Python 2 only, as it leads to "TabError: inconsistent use of tabs and
1217 ;; spaces in indentation" with Python 3.
1218 (package
1219 (name "python2-dogtail")
1220 (version "0.8.2")
1221 (source (origin
1222 (method url-fetch)
1223 (uri (string-append
1224 "https://fedorahosted.org/released/dogtail/dogtail-"
1225 version ".tar.gz"))
1226 (sha256
1227 (base32
1228 "1yc4cg7ip87z15gyd4wy2vzbywrjc52a3m8r8gqy2b50d65llcg1"))))
1229 (build-system python-build-system)
1230 (arguments `(#:python ,python-2
1231 #:tests? #f)) ; invalid command "test"
1232 (home-page "https://fedorahosted.org/dogtail/")
1233 (synopsis "GUI test tool and automation framework written in ​Python")
1234 (description
1235 "Dogtail is a GUI test tool and automation framework written in Python.
1236 It uses Accessibility (a11y) technologies to communicate with desktop
1237 applications. dogtail scripts are written in Python and executed like any
1238 other Python program.")
1239 (license license:gpl2+)))
1240
1241 (define-public python2-empy
1242 (package
1243 (name "python2-empy")
1244 (version "3.3")
1245 (source (origin
1246 (method url-fetch)
1247 (uri (string-append "http://www.alcyone.com/software/empy/empy-"
1248 version ".tar.gz"))
1249 (sha256
1250 (base32
1251 "01g8mmkfnvjdmlhsihwyx56lrg7r5m5d2fg6mnxsvy6g0dnl69f6"))))
1252 (build-system python-build-system)
1253 (arguments
1254 `(#:python ,python-2
1255 #:phases (alist-replace
1256 'check
1257 (lambda _
1258 (zero? (system* "./test.sh")))
1259 %standard-phases)))
1260 (home-page "http://www.alcyone.com/software/empy/")
1261 (synopsis "Templating system for Python")
1262 (description
1263 "EmPy is a system for embedding Python expressions and statements in
1264 template text; it takes an EmPy source file, processes it, and produces
1265 output. This is accomplished via expansions, which are special signals to the
1266 EmPy system and are set off by a special prefix (by default the at sign, @@).
1267 EmPy can expand arbitrary Python expressions and statements in this way, as
1268 well as a variety of special forms. Textual data not explicitly delimited in
1269 this way is sent unaffected to the output, allowing Python to be used in
1270 effect as a markup language. Also supported are callbacks via hooks,
1271 recording and playback via diversions, and dynamic, chainable filters. The
1272 system is highly configurable via command line options and embedded
1273 commands.")
1274 (license license:lgpl2.1+)))
1275
1276 (define-public python2-element-tree
1277 (package
1278 (name "python2-element-tree")
1279 (version "1.2.6")
1280 (source (origin
1281 (method url-fetch)
1282 (uri (string-append
1283 "http://effbot.org/media/downloads/elementtree-"
1284 version "-20050316.tar.gz"))
1285 (sha256
1286 (base32
1287 "016bphqnlg0l4vslahhw4r0aanw95bpypy65r1i1acyb2wj5z7dj"))))
1288 (build-system python-build-system)
1289 (arguments
1290 `(#:python ,python-2 ; seems to be part of Python 3
1291 #:tests? #f)) ; no 'test' sub-command
1292 (synopsis "Toolkit for XML processing in Python")
1293 (description
1294 "ElementTree is a Python library supporting lightweight XML processing.")
1295 (home-page "http://effbot.org/zone/element-index.htm")
1296 (license (license:x11-style
1297 "http://docs.python.org/2/license.html"
1298 "Like \"CWI LICENSE AGREEMENT FOR PYTHON 0.9.0 THROUGH 1.2\"."))))
1299
1300 (define-public python2-pybugz
1301 (package
1302 (name "python2-pybugz")
1303 (version "0.6.11")
1304 (source (origin
1305 (method url-fetch)
1306 (uri (string-append
1307 "http://bits.liquidx.net/projects/pybugz/pybugz-"
1308 version ".tar.gz"))
1309 (sha256
1310 (base32
1311 "17ni00p08gp5lkxlrrcnvi3x09fmajnlbz4da03qcgl9q21ym4jd"))
1312 (patches (search-patches "pybugz-stty.patch"
1313 "pybugz-encode-error.patch"))))
1314 (build-system python-build-system)
1315 (arguments
1316 `(#:python ,python-2 ; SyntaxError with Python 3
1317 #:tests? #f)) ; no 'test' sub-command
1318 (inputs `(("element-tree" ,python2-element-tree)))
1319 (synopsis "Python and command-line interface to Bugzilla")
1320 (description
1321 "PyBugz is a Python library and command-line tool to query the Bugzilla
1322 bug tracking system. It is meant as an aid to speed up interaction with the
1323 bug tracker.")
1324 (home-page "http://www.liquidx.net/pybugz/")
1325 (license license:gpl2)))
1326
1327 (define-public python-enum34
1328 (package
1329 (name "python-enum34")
1330 (version "1.1.0")
1331 (source
1332 (origin
1333 (method url-fetch)
1334 (uri (pypi-uri "enum34" version))
1335 (sha256
1336 (base32
1337 "0yx1m4564wxgbm4glb3457hi16xihd9w63rv13y2przkdir9dfgp"))))
1338 (build-system python-build-system)
1339 (arguments
1340 `(#:phases
1341 (alist-replace
1342 'check
1343 (lambda _ (zero? (system* "python" "enum/test_enum.py")))
1344 %standard-phases)))
1345 (home-page "https://pypi.python.org/pypi/enum34")
1346 (synopsis "Backported Python 3.4 Enum")
1347 (description
1348 "Enum34 is the new Python stdlib enum module available in Python 3.4
1349 backported for previous versions of Python from 2.4 to 3.3.")
1350 (license license:bsd-3)))
1351
1352 (define-public python2-enum34
1353 (package-with-python2 python-enum34))
1354
1355 (define-public python-parse-type
1356 (package
1357 (name "python-parse-type")
1358 (version "0.3.4")
1359 (source
1360 (origin
1361 (method url-fetch)
1362 (uri (string-append "https://pypi.python.org/packages/source/p/"
1363 "parse_type/parse_type-" version ".tar.gz"))
1364 (sha256
1365 (base32
1366 "0iv1c34npr4iynwpgv1vkjx9rjd18a85ir8c01gc5f7wp8iv7l1x"))))
1367 (build-system python-build-system)
1368 (inputs
1369 `(("python-setuptools" ,python-setuptools)
1370 ("python-six" ,python-six)
1371 ("python-parse" ,python-parse)))
1372 (arguments '(#:tests? #f)) ;TODO: tests require pytest
1373 (home-page "https://github.com/jenisys/parse_type")
1374 (synopsis "Extended parse module")
1375 (description
1376 "Parse_type extends the python parse module.")
1377 (license license:bsd-3)))
1378
1379 (define-public python-parse
1380 (package
1381 (name "python-parse")
1382 (version "1.6.6")
1383 (source
1384 (origin
1385 (method url-fetch)
1386 (uri (pypi-uri "parse" version))
1387 (sha256
1388 (base32
1389 "0y31i3mwgv35qn0kzzjn9q8jqfdqmbi6sr6yfvn8rq4lqjm5lhvi"))))
1390 (build-system python-build-system)
1391 (arguments
1392 `(#:phases
1393 (alist-replace
1394 'check
1395 (lambda _ (zero? (system* "python" "test_parse.py")))
1396 %standard-phases)))
1397 (home-page "https://github.com/r1chardj0n3s/parse")
1398 (synopsis "Parse strings")
1399 (description
1400 "Parse strings using a specification based on the Python format()
1401 syntax.")
1402 (license license:x11)))
1403
1404
1405 (define-public scons
1406 (package
1407 (name "scons")
1408 (version "2.3.4")
1409 (source (origin
1410 (method url-fetch)
1411 (uri (string-append "mirror://sourceforge/scons/scons/" version
1412 "/scons-" version ".tar.gz"))
1413 (sha256
1414 (base32
1415 "0hdlci43wjz8maryj83mz04ir6rwcdrrzpd7cpzvdlzycqhdfmsb"))))
1416 (build-system python-build-system)
1417 (arguments
1418 ;; With Python 3.x, fails to build with a syntax error.
1419 `(#:python ,python-2
1420 #:tests? #f)) ; no 'python setup.py test' command
1421 (home-page "http://scons.org/")
1422 (synopsis "Software construction tool written in Python")
1423 (description
1424 "SCons is a software construction tool. Think of SCons as an improved,
1425 cross-platform substitute for the classic Make utility with integrated
1426 functionality similar to autoconf/automake and compiler caches such as ccache.
1427 In short, SCons is an easier, more reliable and faster way to build
1428 software.")
1429 (license license:x11)))
1430
1431 (define-public python-extras
1432 (package
1433 (name "python-extras")
1434 (version "0.0.3")
1435 (source
1436 (origin
1437 (method url-fetch)
1438 (uri (string-append
1439 "https://pypi.python.org/packages/source/e/extras/extras-"
1440 version ".tar.gz"))
1441 (sha256
1442 (base32
1443 "1h7zx4dfyclalg0fqnfjijpn0f793a9mx8sy3b27gd31nr6dhq3s"))))
1444 (build-system python-build-system)
1445 (inputs
1446 `(("python-setuptools" ,python-setuptools)))
1447 (arguments
1448 ;; error in setup.cfg: command 'test' has no such option 'buffer'
1449 '(#:tests? #f))
1450 (home-page "https://github.com/testing-cabal/extras")
1451 (synopsis "Useful extensions to the Python standard library")
1452 (description
1453 "Extras is a set of extensions to the Python standard library.")
1454 (license license:expat)))
1455
1456 (define-public python2-extras
1457 (package-with-python2 python-extras))
1458
1459 (define-public python-mimeparse
1460 (package
1461 (name "python-mimeparse")
1462 (version "0.1.4")
1463 (source
1464 (origin
1465 (method url-fetch)
1466 (uri (string-append
1467 "https://pypi.python.org/packages/source/p/python-mimeparse/python-mimeparse-"
1468 version ".tar.gz"))
1469 (sha256
1470 (base32
1471 "1hyxg09kaj02ri0rmwjqi86wk4nd1akvv7n0dx77azz76wga4s9w"))))
1472 (build-system python-build-system)
1473 (inputs
1474 `(("python-setuptools" ,python-setuptools)))
1475 (arguments
1476 '(#:tests? #f)) ; no setup.py test command
1477 (home-page
1478 "https://github.com/dbtsai/python-mimeparse")
1479 (synopsis "Python library for parsing MIME types")
1480 (description
1481 "Mimeparse provides basic functions for parsing MIME type names and
1482 matching them against a list of media-ranges.")
1483 (license license:expat)))
1484
1485 (define-public python2-mimeparse
1486 (package-with-python2 python-mimeparse))
1487
1488 (define-public python-nose
1489 (package
1490 (name "python-nose")
1491 (version "1.3.7")
1492 (source
1493 (origin
1494 (method url-fetch)
1495 (uri (pypi-uri "nose" version))
1496 (sha256
1497 (base32
1498 "164a43k7k2wsqqk1s6vavcdamvss4mz0vd6pwzv2h9n8rgwzxgzi"))))
1499 (build-system python-build-system)
1500 (inputs
1501 `(("python-setuptools" ,python-setuptools)))
1502 (arguments
1503 '(#:tests? #f)) ; FIXME: test suite fails
1504 (home-page "http://readthedocs.org/docs/nose/")
1505 (synopsis "Python testing library")
1506 (description
1507 "Nose extends the unittest library to make testing easier.")
1508 (license license:lgpl2.0+)))
1509
1510 (define-public python2-nose
1511 (package-with-python2 python-nose))
1512
1513 (define-public python-nose2
1514 (package
1515 (name "python-nose2")
1516 (version "0.6.5")
1517 (source
1518 (origin
1519 (method url-fetch)
1520 (uri (pypi-uri "nose2" version))
1521 (sha256
1522 (base32
1523 "1x4zjq1zlyrh8b9ba0cmafd3w94pxhid408kibyjd3s6h1lap6s7"))))
1524 (build-system python-build-system)
1525 (arguments `(#:tests? #f)) ; 'module' object has no attribute 'collector'
1526 (native-inputs
1527 `(("python-setuptools" ,python-setuptools)))
1528 (inputs
1529 `(("python-cov-core" ,python-cov-core)
1530 ("python-pytest-cov" ,python-pytest-cov)
1531 ("python-six" ,python-six)))
1532 (home-page "https://github.com/nose-devs/nose2")
1533 (synopsis "Next generation of nicer testing for Python")
1534 (description
1535 "Nose2 is the next generation of nicer testing for Python, based on the
1536 plugins branch of unittest2. Nose2 aims to improve on nose by providing a
1537 better plugin api, being easier for users to configure, and simplifying internal
1538 interfaces and processes.")
1539 (license license:bsd-2)))
1540
1541 (define-public python2-nose2
1542 (package-with-python2 python-nose2))
1543
1544 (define-public python-unittest2
1545 (package
1546 (name "python-unittest2")
1547 (version "0.5.1")
1548 (source
1549 (origin
1550 (method url-fetch)
1551 (uri (string-append
1552 "https://pypi.python.org/packages/source/u/unittest2py3k/unittest2py3k-"
1553 version ".tar.gz"))
1554 (sha256
1555 (base32
1556 "00yl6lskygcrddx5zspkhr0ibgvpknl4678kkm6s626539grq93q"))))
1557 (build-system python-build-system)
1558 (inputs
1559 `(("python-setuptools" ,python-setuptools)))
1560 (home-page "http://pypi.python.org/pypi/unittest2")
1561 (synopsis "Python unit testing library")
1562 (description
1563 "Unittest2 is a replacement for the unittest module in the Python
1564 standard library.")
1565 (license license:psfl)))
1566
1567 (define-public python2-unittest2
1568 (package (inherit python-unittest2)
1569 (name "python2-unittest2")
1570 (version "0.5.1")
1571 (source
1572 (origin
1573 (method url-fetch)
1574 (uri (string-append
1575 "https://pypi.python.org/packages/source/u/unittest2/unittest2-"
1576 version ".tar.gz"))
1577 (sha256
1578 (base32
1579 "0wbs4i4x3x7klr3v35ss6p9mcqz883i1xgcpkhvl7n2lyv6yhpda"))))
1580 (inputs
1581 `(("python2-setuptools" ,python2-setuptools)))
1582 (arguments
1583 `(#:python ,python-2
1584 #:tests? #f)))) ; no setup.py test command
1585
1586 (define-public python-py
1587 (package
1588 (name "python-py")
1589 (version "1.4.31")
1590 (source
1591 (origin
1592 (method url-fetch)
1593 (uri (pypi-uri "py" version))
1594 (sha256
1595 (base32
1596 "0561gz2w3i825gyl42mcq14y3dcgkapfiv5zv9a2bz15qxiijl56"))))
1597 (build-system python-build-system)
1598 (inputs
1599 `(("python-setuptools" ,python-setuptools)))
1600 (home-page "http://pylib.readthedocs.org/")
1601 (synopsis "Python library for parsing, I/O, instrospection, and logging")
1602 (description
1603 "Py is a Python library for file name parsing, .ini file parsing, I/O,
1604 code introspection, and logging.")
1605 (license license:expat)))
1606
1607 (define-public python2-py
1608 (package-with-python2 python-py))
1609
1610 (define-public python-pytest
1611 (package
1612 (name "python-pytest")
1613 (version "2.7.3")
1614 (source
1615 (origin
1616 (method url-fetch)
1617 (uri (string-append
1618 "https://pypi.python.org/packages/source/p/pytest/pytest-"
1619 version ".tar.gz"))
1620 (sha256
1621 (base32
1622 "1z4yi986f9n0p8qmzmn21m21m8j1x78hk3505f89baqm6pdw7afm"))
1623 (modules '((guix build utils)))
1624 (snippet
1625 ;; One of the tests involves the /usr directory, so it fails.
1626 '(substitute* "testing/test_argcomplete.py"
1627 (("def test_remove_dir_prefix\\(self\\):")
1628 "@pytest.mark.xfail\n def test_remove_dir_prefix(self):")))))
1629 (build-system python-build-system)
1630 (inputs
1631 `(("python-setuptools" ,python-setuptools)
1632 ("python-py" ,python-py)
1633 ("python-nose" ,python-nose)
1634 ("python-mock" ,python-mock)))
1635 (home-page "http://pytest.org")
1636 (synopsis "Python testing library")
1637 (description
1638 "Pytest is a testing tool that provides auto-discovery of test modules
1639 and functions, detailed info on failing assert statements, modular fixtures,
1640 and many external plugins.")
1641 (license license:expat)))
1642
1643 (define-public python2-pytest
1644 (package-with-python2 python-pytest))
1645
1646 (define-public python-pytest-cov
1647 (package
1648 (name "python-pytest-cov")
1649 (version "2.2.1")
1650 (source
1651 (origin
1652 (method url-fetch)
1653 (uri (pypi-uri "pytest-cov" version))
1654 (sha256
1655 (base32
1656 "1yl4nbhzfgsxqlsyk4clafgp9x11zvgrkprm9i2p3fgkwx9jxcm8"))))
1657 (build-system python-build-system)
1658 (inputs
1659 `(("python-coverage" ,python-coverage)
1660 ("python-pytest" ,python-pytest)))
1661 (home-page "https://github.com/pytest-dev/pytest-cov")
1662 (synopsis "Pytest plugin for measuring coverage")
1663 (description
1664 "Pytest-cov produces coverage reports. It supports centralised testing and
1665 distributed testing in both @code{load} and @code{each} modes. It also
1666 supports coverage of subprocesses.")
1667 (license license:expat)
1668 (properties `((python2-variant . ,(delay python2-pytest-cov))))))
1669
1670 (define-public python2-pytest-cov
1671 (let ((base (package-with-python2 (strip-python2-variant python-pytest-cov))))
1672 (package
1673 (inherit base)
1674 (inputs `(("python2-setuptools" ,python2-setuptools)
1675 ,@(package-inputs base))))))
1676
1677 (define-public python-pytest-runner
1678 (package
1679 (name "python-pytest-runner")
1680 (version "2.6.2")
1681 (source
1682 (origin
1683 (method url-fetch)
1684 (uri (pypi-uri "pytest-runner" version))
1685 (sha256
1686 (base32
1687 "1nwcqx0l3fv52kv8526wy8ypzghbq96c96di318d98d3wh7a8xg7"))))
1688 (build-system python-build-system)
1689 (arguments
1690 `(#:phases
1691 (modify-phases %standard-phases
1692 ;; The fancy way of setting the version with setuptools_scm does not
1693 ;; seem to work here.
1694 (add-after 'unpack 'set-version
1695 (lambda _
1696 (substitute* "docs/conf.py"
1697 (("version = setuptools_scm\\.get_version\\(root='\\.\\.')")
1698 (string-append "version = \"" ,version "\"")))
1699 #t)))))
1700 (native-inputs
1701 `(("python-pytest" ,python-pytest)
1702 ("python-setuptools-scm" ,python-setuptools-scm)))
1703 (home-page "https://github.com/pytest-dev/pytest-runner")
1704 (synopsis "Invoke py.test as a distutils command")
1705 (description
1706 "This package provides a @command{pytest-runner} command that
1707 @file{setup.py} files can use to run tests.")
1708 (license license:expat)
1709 (properties `((python2-variant . ,(delay python2-pytest-runner))))))
1710
1711 (define-public python2-pytest-runner
1712 (let ((base (package-with-python2
1713 (strip-python2-variant python-pytest-runner))))
1714 (package
1715 (inherit base)
1716 (native-inputs `(("python2-setuptools" ,python2-setuptools)
1717 ,@(package-native-inputs base))))))
1718
1719 (define-public python-pytest-mock
1720 (package
1721 (name "python-pytest-mock")
1722 (version "1.2")
1723 (source
1724 (origin
1725 (method url-fetch)
1726 (uri (pypi-uri "pytest-mock" version ".zip"))
1727 (sha256
1728 (base32
1729 "03zxar5drzm7ksqyrwypjaza3cri6wqvpr6iam92djvg6znp32gp"))))
1730 (build-system python-build-system)
1731 (native-inputs
1732 `(("unzip" ,unzip)))
1733 (inputs
1734 `(("python-py" ,python-py)
1735 ("python-pytest" ,python-pytest)))
1736 (home-page "https://github.com/pytest-dev/pytest-mock/")
1737 (synopsis "Thin-wrapper around the mock package for easier use with py.test")
1738 (description
1739 "This plugin installs a @code{mocker} fixture which is a thin-wrapper
1740 around the patching API provided by the @code{mock} package, but with the
1741 benefit of not having to worry about undoing patches at the end of a test.
1742 The mocker fixture has the same API as @code{mock.patch}, supporting the
1743 same arguments.")
1744 (properties `((python2-variant . ,(delay python2-pytest-mock))))
1745 (license license:expat)))
1746
1747 (define-public python2-pytest-mock
1748 (let ((base (package-with-python2
1749 (strip-python2-variant python-pytest-mock))))
1750 (package (inherit base)
1751 (native-inputs
1752 `(("python2-setuptools" ,python2-setuptools)
1753 ,@(package-native-inputs base)))
1754 (inputs
1755 `(("python2-mock" ,python2-mock)
1756 ,@(package-inputs base))))))
1757
1758 (define-public python-pytest-xdist
1759 (package
1760 (name "python-pytest-xdist")
1761 (version "1.14")
1762 (source
1763 (origin
1764 (method url-fetch)
1765 (uri (pypi-uri "pytest-xdist" version ".zip"))
1766 (sha256
1767 (base32
1768 "08rn2l39ds60xshs4js787l84pfckksqklfq2wq9x8ig2aci2pja"))
1769 (modules '((guix build utils)))
1770 (snippet
1771 '(begin
1772 ;; Remove pre-compiled .pyc files from source.
1773 (for-each delete-file-recursively
1774 (find-files "." "__pycache__" #:directories? #t))
1775 (for-each delete-file (find-files "." "\\.pyc$"))
1776 #t))))
1777 (build-system python-build-system)
1778 (native-inputs
1779 `(("unzip" ,unzip)
1780 ("python-setuptools-scm" ,python-setuptools-scm)))
1781 (inputs
1782 `(("python-apipkg" ,python-apipkg)
1783 ("python-execnet" ,python-execnet)
1784 ("python-pytest" ,python-pytest)
1785 ("python-py" ,python-py)))
1786 (home-page
1787 "https://github.com/pytest-dev/pytest-xdist")
1788 (synopsis
1789 "Plugin for py.test with distributed testing and loop-on-failing modes")
1790 (description
1791 "The pytest-xdist plugin extends py.test with some unique test execution
1792 modes: parallelization, running tests in boxed subprocesses, the ability
1793 to run tests repeatedly when failed, and the ability to run tests on multiple
1794 Python interpreters or platforms. It uses rsync to copy the existing
1795 program code to a remote location, executes there, and then syncs the
1796 result back.")
1797 (license license:expat)
1798 (properties `((python2-variant . ,(delay python2-pytest-xdist))))))
1799
1800 (define-public python2-pytest-xdist
1801 (let ((base (package-with-python2
1802 (strip-python2-variant python-pytest-xdist))))
1803 (package
1804 (inherit base)
1805 (native-inputs `(("python2-setuptools" ,python2-setuptools)
1806 ,@(package-native-inputs base))))))
1807
1808 (define-public python-scripttest
1809 (package
1810 (name "python-scripttest")
1811 (version "1.3")
1812 (source
1813 (origin
1814 (method url-fetch)
1815 (uri (string-append
1816 "https://pypi.python.org/packages/source/s/scripttest/scripttest-"
1817 version ".tar.gz"))
1818 (sha256
1819 (base32
1820 "0f4w84k8ck82syys7yg9maz93mqzc8p5ymis941x034v44jzq74m"))))
1821 (build-system python-build-system)
1822 (inputs
1823 `(("python-setuptools" ,python-setuptools)
1824 ("python-pytest" ,python-pytest)))
1825 (home-page "http://pythonpaste.org/scripttest/")
1826 (synopsis "Python library to test command-line scripts")
1827 (description "Scripttest is a Python helper library for testing
1828 interactive command-line applications. With it you can run a script in a
1829 subprocess and see the output as well as any file modifications.")
1830 (license license:expat)))
1831
1832 (define-public python2-scripttest
1833 (package-with-python2 python-scripttest))
1834
1835 (define-public python-testtools
1836 (package
1837 (name "python-testtools")
1838 (version "1.0.0")
1839 (source
1840 (origin
1841 (method url-fetch)
1842 (uri (string-append
1843 "https://pypi.python.org/packages/source/t/testtools/testtools-"
1844 version ".tar.gz"))
1845 (sha256
1846 (base32
1847 "1dyml28ykpl5jb9khdmcdvhy1cxqingys6qvj2k04fzlaj6z3bbx"))))
1848 (build-system python-build-system)
1849 (propagated-inputs
1850 `(("python-mimeparse" ,python-mimeparse)))
1851 (inputs
1852 `(("python-setuptools" ,python-setuptools)
1853 ("python-extras" ,python-extras)))
1854 (home-page "https://github.com/testing-cabal/testtools")
1855 (synopsis
1856 "Extensions to the Python standard library unit testing framework")
1857 (description
1858 "Testtools extends the Python standard library unit testing framework to
1859 provide matchers, more debugging information, and cross-Python
1860 compatibility.")
1861 (license license:psfl)))
1862
1863 (define-public python2-testtools
1864 (package-with-python2 python-testtools))
1865
1866 (define-public python-testscenarios
1867 (package
1868 (name "python-testscenarios")
1869 (version "0.4")
1870 (source
1871 (origin
1872 (method url-fetch)
1873 (uri (string-append
1874 "https://pypi.python.org/packages/source/t/testscenarios/testscenarios-"
1875 version ".tar.gz"))
1876 (sha256
1877 (base32
1878 "1671jvrvqlmbnc42j7pc5y6vc37q44aiwrq0zic652pxyy2fxvjg"))))
1879 (build-system python-build-system)
1880 (inputs
1881 `(("python-setuptools" ,python-setuptools)
1882 ("python-testtools" ,python-testtools)
1883 ("python-mimeparse" ,python-mimeparse)))
1884 (home-page "https://launchpad.net/testscenarios")
1885 (synopsis "Pyunit extension for dependency injection")
1886 (description
1887 "Testscenarios provides clean dependency injection for Python unittest
1888 style tests.")
1889 (license (list license:bsd-3 license:asl2.0)))) ; at the user's option
1890
1891 (define-public python2-testscenarios
1892 (package-with-python2 python-testscenarios))
1893
1894 (define-public python-testresources
1895 (package
1896 (name "python-testresources")
1897 (version "0.2.7")
1898 (source
1899 (origin
1900 (method url-fetch)
1901 (uri (string-append
1902 "https://pypi.python.org/packages/source/t/testresources/testresources-"
1903 version ".tar.gz"))
1904 (sha256
1905 (base32
1906 "0cbj3plbllyz42c4b5xxgwaa7mml54lakslrn4kkhinxhdri22md"))))
1907 (build-system python-build-system)
1908 (inputs
1909 `(("python-setuptools" ,python-setuptools)))
1910 (home-page "https://launchpad.net/testresources")
1911 (synopsis
1912 "Pyunit extension for managing test resources")
1913 (description
1914 "Testresources is an extension to Python's unittest to allow declarative
1915 use of resources by test cases.")
1916 (license (list license:bsd-3 license:asl2.0)))) ; at the user's option
1917
1918 (define-public python2-testresources
1919 (package-with-python2 python-testresources))
1920
1921 (define-public python-subunit
1922 (package
1923 (name "python-subunit")
1924 (version "0.0.21")
1925 (source
1926 (origin
1927 (method url-fetch)
1928 (uri (string-append
1929 "https://pypi.python.org/packages/source/p/python-subunit/python-subunit-"
1930 version ".tar.gz"))
1931 (sha256
1932 (base32
1933 "1nkw9wfbvizmpajbj3in8ns07g7lwkiv8hip14jjlwk3cacls6jv"))))
1934 (build-system python-build-system)
1935 (inputs
1936 `(("python-setuptools" ,python-setuptools)
1937 ("python-testtools" ,python-testtools)
1938 ("python-mimeparse" ,python-mimeparse)
1939 ("python-testscenarios" ,python-testscenarios)))
1940 (home-page "http://launchpad.net/subunit")
1941 (synopsis "Python implementation of the subunit protocol")
1942 (description
1943 "Python-subunit is a Python implementation of the subunit test streaming
1944 protocol.")
1945 (license (list license:bsd-3 license:asl2.0)))) ; at the user's option
1946
1947 (define-public python2-subunit
1948 (package-with-python2 python-subunit))
1949
1950 ;; Recent versions of python-fixtures need a recent version of python-pbr,
1951 ;; which needs a recent version of python-fixtures. To fix this circular
1952 ;; dependency, we keep old versions of python-fixtures and python-pbr to
1953 ;; bootstrap the whole thing:
1954 ;; - python-fixtures-0.3.16 is used to build python-pbr-0.11
1955 ;; - python-pbr-0.11 is used to build python-fixtures
1956 ;; - python-fixtures is used to build python-pbr
1957 (define-public python-fixtures-0.3.16
1958 (package
1959 (name "python-fixtures")
1960 (version "0.3.16")
1961 (source
1962 (origin
1963 (method url-fetch)
1964 (uri (string-append
1965 "https://pypi.python.org/packages/source/f/fixtures/fixtures-"
1966 version ".tar.gz"))
1967 (sha256
1968 (base32
1969 "0x9r2gwilcig5g54k60bxzg96zabizq1855lrprlb4zckalp9asc"))))
1970 (build-system python-build-system)
1971 (inputs
1972 `(("python-setuptools" ,python-setuptools)))
1973 (arguments
1974 '(#:tests? #f)) ; no setup.py test command
1975 (home-page "https://launchpad.net/python-fixtures")
1976 (synopsis "Python test fixture library")
1977 (description
1978 "Fixtures provides a way to create reusable state, useful when writing
1979 Python tests.")
1980 (license (list license:bsd-3 license:asl2.0)))) ; at user's option
1981
1982 (define-public python2-fixtures-0.3.16
1983 (package-with-python2 python-fixtures-0.3.16))
1984
1985 (define-public python-pbr-0.11
1986 (package
1987 (name "python-pbr")
1988 (version "0.11.0")
1989 (source
1990 (origin
1991 (method url-fetch)
1992 (uri (string-append
1993 "https://pypi.python.org/packages/source/p/pbr/pbr-"
1994 version ".tar.gz"))
1995 (sha256
1996 (base32
1997 "0v9gb7gyqf7q9s99l0nnjj9ww9b0jvyqlwm4d56pcyinxydddw6p"))))
1998 (build-system python-build-system)
1999 (arguments
2000 `(#:tests? #f)) ;; Most tests seem to use the Internet.
2001 (inputs
2002 `(("python-fixtures-0.3.16" ,python-fixtures-0.3.16)
2003 ("python-pip" ,python-pip)
2004 ("python-setuptools" ,python-setuptools)))
2005 (home-page "https://launchpad.net/pbr")
2006 (synopsis "Change the default behavior of Python’s setuptools")
2007 (description
2008 "Python Build Reasonableness (PBR) is a library that injects some useful
2009 and sensible default behaviors into your setuptools run.")
2010 (license license:asl2.0)))
2011
2012 (define-public python2-pbr-0.11
2013 (package-with-python2 python-pbr-0.11))
2014
2015 (define-public python-pbr
2016 (package
2017 (name "python-pbr")
2018 (version "1.8.1")
2019 (source
2020 (origin
2021 (method url-fetch)
2022 (uri (string-append
2023 "https://pypi.python.org/packages/source/p/pbr/pbr-"
2024 version
2025 ".tar.gz"))
2026 (sha256
2027 (base32
2028 "0jcny36cf3s8ar5r4a575npz080hndnrfs4np1fqhv0ym4k7c4p2"))))
2029 (build-system python-build-system)
2030 (arguments
2031 `(#:tests? #f)) ;; Most tests seem to use the Internet.
2032 (propagated-inputs
2033 `(("python-testrepository" ,python-testrepository)
2034 ("git" ,git))) ;; pbr actually uses the "git" binary.
2035 (inputs
2036 `(("python-fixtures" ,python-fixtures)
2037 ("python-mimeparse" ,python-mimeparse)
2038 ("python-mock" ,python-mock)
2039 ("python-setuptools" ,python-setuptools)
2040 ("python-six" ,python-six)
2041 ("python-sphinx" ,python-sphinx)
2042 ("python-testrepository" ,python-testrepository)
2043 ("python-testresources" ,python-testresources)
2044 ("python-testscenarios" ,python-testscenarios)
2045 ("python-testtools" ,python-testtools)
2046 ("python-virtualenv" ,python-virtualenv)))
2047 (home-page "https://launchpad.net/pbr")
2048 (synopsis "Change the default behavior of Python’s setuptools")
2049 (description
2050 "Python Build Reasonableness (PBR) is a library that injects some useful
2051 and sensible default behaviors into your setuptools run.")
2052 (license license:asl2.0)))
2053
2054 (define-public python2-pbr
2055 (package-with-python2 python-pbr))
2056
2057 (define-public python-fixtures
2058 (package
2059 (name "python-fixtures")
2060 (version "1.4.0")
2061 (source
2062 (origin
2063 (method url-fetch)
2064 (uri (pypi-uri "fixtures" version))
2065 (sha256
2066 (base32
2067 "0djxvdwm8s60dbfn7bhf40x6g818p3b3mlwijm1c3bqg7msn271y"))))
2068 (build-system python-build-system)
2069 (propagated-inputs
2070 `(("python-six" ,python-six)
2071 ("python-pbr-0.11" ,python-pbr-0.11)))
2072 (inputs
2073 `(("python-pip" ,python-pip)
2074 ("python-setuptools" ,python-setuptools)
2075 ;; Tests
2076 ("python-testtools" ,python-testtools)))
2077 (arguments
2078 '(#:tests? #f)) ; no setup.py test command
2079 (home-page "https://launchpad.net/python-fixtures")
2080 (synopsis "Python test fixture library")
2081 (description
2082 "Fixtures provides a way to create reusable state, useful when writing
2083 Python tests.")
2084 (license (list license:bsd-3 license:asl2.0)))) ; at user's option
2085
2086 (define-public python2-fixtures
2087 (package-with-python2 python-fixtures))
2088
2089 (define-public python-testrepository
2090 (package
2091 (name "python-testrepository")
2092 (version "0.0.20")
2093 (source
2094 (origin
2095 (method url-fetch)
2096 (uri (string-append
2097 "https://pypi.python.org/packages/source/t/testrepository/testrepository-"
2098 version ".tar.gz"))
2099 (sha256
2100 (base32
2101 "1ssqb07c277010i6gzzkbdd46gd9mrj0bi0i8vn560n2k2y4j93m"))))
2102 (build-system python-build-system)
2103 (propagated-inputs
2104 `(("python-fixtures-0.3.16" ,python-fixtures-0.3.16)
2105 ("python-testtools" ,python-testtools)))
2106 (inputs
2107 `(("python-setuptools" ,python-setuptools)
2108 ("python-subunit" ,python-subunit)
2109 ("python-mimeparse" ,python-mimeparse)))
2110 (home-page "https://launchpad.net/testrepository")
2111 (synopsis "Database for Python test results")
2112 (description "Testrepository provides a database of test results which can
2113 be used as part of a developer's workflow to check things such as what tests
2114 have failed since the last commit or what tests are currently failing.")
2115 (license (list license:bsd-3 license:asl2.0)))) ; at user's option
2116
2117 (define-public python2-testrepository
2118 (package-with-python2 python-testrepository))
2119
2120 (define-public python-coverage
2121 (package
2122 (name "python-coverage")
2123 (version "4.1")
2124 (source
2125 (origin
2126 (method url-fetch)
2127 (uri (pypi-uri "coverage" version))
2128 (sha256
2129 (base32
2130 "01rbr4br4lsk0lwn8fb96zwd2xr4f0mg1w7iq3j11i8f5ig2nqs1"))))
2131 (build-system python-build-system)
2132 (inputs
2133 `(("python-setuptools" ,python-setuptools)))
2134 (home-page "http://nedbatchelder.com/code/coverage")
2135 (synopsis "Code coverage measurement for Python")
2136 (description
2137 "Coverage measures code coverage, typically during test execution. It
2138 uses the code analysis tools and tracing hooks provided in the Python standard
2139 library to determine which lines are executable, and which have been
2140 executed.")
2141 (license license:bsd-3)))
2142
2143 (define-public python2-coverage
2144 (package-with-python2 python-coverage))
2145
2146 (define-public python-cov-core
2147 (package
2148 (name "python-cov-core")
2149 (version "1.15.0")
2150 (source
2151 (origin
2152 (method url-fetch)
2153 (uri (pypi-uri "cov-core" version))
2154 (sha256
2155 (base32
2156 "0k3np9ymh06yv1ib96sb6wfsxjkqhmik8qfsn119vnhga9ywc52a"))))
2157 (build-system python-build-system)
2158 (native-inputs
2159 `(("python-coverage" ,python-coverage)))
2160 (home-page "https://github.com/schlamar/cov-core")
2161 (synopsis "plugin core for use by pytest-cov, nose-cov and nose2-cov")
2162 (description
2163 "This is a library package for use by pytest-cov, nose-cov and nose2-cov.
2164 It is useful for developing coverage plugins for these testing frameworks.")
2165 (license license:expat)
2166 (properties `((python2-variant . ,(delay python2-cov-core))))))
2167
2168 (define-public python2-cov-core
2169 (let ((cov-core (package-with-python2 (strip-python2-variant python-cov-core))))
2170 (package (inherit cov-core)
2171 (native-inputs
2172 `(("python2-setuptools" ,python2-setuptools)
2173 ,@(package-native-inputs cov-core))))))
2174
2175 (define-public python-discover
2176 (package
2177 (name "python-discover")
2178 (version "0.4.0")
2179 (source
2180 (origin
2181 (method url-fetch)
2182 (uri (string-append
2183 "https://pypi.python.org/packages/source/d/discover/discover-"
2184 version ".tar.gz"))
2185 (sha256
2186 (base32
2187 "0y8d0zwiqar51kxj8lzmkvwc3b8kazb04gk5zcb4nzg5k68zmhq5"))))
2188 (build-system python-build-system)
2189 (inputs
2190 `(("python-setuptools" ,python-setuptools)))
2191 (home-page "http://pypi.python.org/pypi/discover/")
2192 (synopsis
2193 "Python test discovery for unittest")
2194 (description
2195 "Discover provides test discovery for unittest, a feature that has been
2196 backported from Python 2.7 for Python 2.4+.")
2197 (license license:bsd-3)))
2198
2199 (define-public python2-discover
2200 (package-with-python2 python-discover))
2201
2202 (define-public behave
2203 (package
2204 (name "behave")
2205 (version "1.2.5")
2206 (source (origin
2207 (method url-fetch)
2208 (uri (pypi-uri "behave" version ".tar.bz2"))
2209 (sha256
2210 (base32
2211 "1iypp6z46r19n4xmgx6m1lwmlpfjh8vapq8izigrqlaarvp2y64c"))))
2212 (build-system python-build-system)
2213 (inputs
2214 `(("python-setuptools" ,python-setuptools)
2215 ("python-six" ,python-six)
2216 ("python-parse" ,python-parse)
2217 ("python-parse-type" ,python-parse-type)))
2218 (arguments `(#:tests? #f)) ;TODO: tests require nose>=1.3 and
2219 ;PyHamcrest>=1.8
2220 (home-page "http://github.com/behave/behave")
2221 (synopsis "Python behavior-driven development")
2222 (description
2223 "Behave is a tool for behavior-driven development in python.
2224 Behavior-driven development (or BDD) is an agile software development
2225 technique that encourages collaboration between developers, QA and
2226 non-technical or business participants in a software project. Behave uses
2227 tests written in a natural language style, backed up by Python code.")
2228 (license license:x11)))
2229
2230 (define-public python-exif-read
2231 (package
2232 (name "python-exif-read")
2233 (version "2.1.2")
2234 (source (origin
2235 (method url-fetch)
2236 (uri (pypi-uri "ExifRead" version))
2237 (sha256
2238 (base32
2239 "1b90jf6m9vxh9nanhpyvqdq7hmfx5iggw1l8kq10jrs6xgr49qkr"))))
2240 (build-system python-build-system)
2241 (inputs
2242 `(("python-setuptools" ,python-setuptools)))
2243 (arguments `(#:tests? #f)) ; no tests
2244 (home-page "https://github.com/ianare/exif-py")
2245 (synopsis "Python library to extract EXIF data from image files")
2246 (description
2247 "ExifRead is a Python library to extract EXIF data from tiff and jpeg
2248 files.")
2249 (license license:bsd-3)))
2250
2251 (define-public python2-exif-read
2252 (package-with-python2 python-exif-read))
2253
2254 (define-public python-pyld
2255 (package
2256 (name "python-pyld")
2257 (version "0.6.8")
2258 (source (origin
2259 (method url-fetch)
2260 (uri (pypi-uri "PyLD" version))
2261 (sha256
2262 (base32
2263 "0k881ffazpf8q1z8862g4bb3pzwpnz9whrci2mf311mvn1qbyqad"))))
2264 (build-system python-build-system)
2265 (inputs
2266 `(("python-setuptools" ,python-setuptools)))
2267 (arguments `(#:tests? #f)) ; no tests
2268 (home-page "http://github.com/digitalbazaar/pyld")
2269 (synopsis "Python implementation of the JSON-LD specification")
2270 (description
2271 "PyLD is an implementation of the JSON-LD specification.")
2272 (license license:bsd-3)))
2273
2274 (define-public python2-pyld
2275 (package-with-python2 python-pyld))
2276
2277 (define-public python-certifi
2278 (package
2279 (name "python-certifi")
2280 (version "2016.8.31")
2281 (source (origin
2282 (method url-fetch)
2283 (uri (pypi-uri "certifi" version))
2284 (sha256
2285 (base32
2286 "06c9dcyv8ss050gkv5xjivbxhm6qm0s9vzy4r33wqabgv118lw7p"))))
2287 (build-system python-build-system)
2288 (inputs
2289 `(("python-setuptools" ,python-setuptools)))
2290 (arguments `(#:tests? #f)) ; no tests
2291 (home-page "http://python-requests.org/")
2292 (synopsis "Python CA certificate bundle")
2293 (description
2294 "Certifi is a Python library that contains a CA certificate bundle, which
2295 is used by the Requests library to verify HTTPS requests.")
2296 (license license:asl2.0)))
2297
2298 (define-public python2-certifi
2299 (package-with-python2 python-certifi))
2300
2301 (define-public python-click
2302 (package
2303 (name "python-click")
2304 (version "6.6")
2305 (source
2306 (origin
2307 (method url-fetch)
2308 (uri (pypi-uri "click" version))
2309 (sha256
2310 (base32
2311 "1sggipyz52crrybwbr9xvwxd4aqigvplf53k9w3ygxmzivd1jsnc"))))
2312 (build-system python-build-system)
2313 (arguments
2314 `(#:phases
2315 (modify-phases %standard-phases
2316 (add-after 'unpack 'fix-paths
2317 (lambda* (#:key inputs #:allow-other-keys)
2318 (let ((glibc (assoc-ref inputs ,(if (%current-target-system)
2319 "cross-libc" "libc"))))
2320 (substitute* "click/_unicodefun.py"
2321 (("'locale'")
2322 (string-append "'" glibc "/bin/locale'"))))
2323 #t)))))
2324 (native-inputs
2325 `(("python-setuptools" ,python-setuptools)))
2326 (home-page "http://click.pocoo.org")
2327 (synopsis "Command line library for Python")
2328 (description
2329 "Click is a Python package for creating command line interfaces in a
2330 composable way with as little code as necessary. Its name stands for
2331 \"Command Line Interface Creation Kit\". It's highly configurable but comes
2332 with sensible defaults out of the box.")
2333 (license license:bsd-3)))
2334
2335 (define-public python2-click
2336 (package-with-python2 python-click))
2337
2338 (define-public python-wheel
2339 (package
2340 (name "python-wheel")
2341 (version "0.29.0")
2342 (source
2343 (origin
2344 (method url-fetch)
2345 (uri (pypi-uri "wheel" version))
2346 (sha256
2347 (base32
2348 "0j0n38hg1jvrmyy68f9ikvzq1gs9g0sx4ws7maf8wi3bwbbqmfqy"))))
2349 (build-system python-build-system)
2350 (native-inputs
2351 `(("python-setuptools" ,python-setuptools)
2352 ("python-jsonschema" ,python-jsonschema)
2353 ("python-pytest-cov" ,python-pytest-cov)))
2354 (home-page "https://bitbucket.org/pypa/wheel/")
2355 (synopsis "Format for built Python packages")
2356 (description
2357 "A wheel is a ZIP-format archive with a specially formatted filename and
2358 the @code{.whl} extension. It is designed to contain all the files for a PEP
2359 376 compatible install in a way that is very close to the on-disk format. Many
2360 packages will be properly installed with only the @code{Unpack} step and the
2361 unpacked archive preserves enough information to @code{Spread} (copy data and
2362 scripts to their final locations) at any later time. Wheel files can be
2363 installed with a newer @code{pip} or with wheel's own command line utility.")
2364 (license license:expat)
2365 (properties `((python2-variant . ,(delay python2-wheel))))))
2366
2367 (define-public python2-wheel
2368 (let ((wheel (package-with-python2
2369 (strip-python2-variant python-wheel))))
2370 (package (inherit wheel)
2371 (native-inputs `(("python2-functools32" ,python2-functools32)
2372 ,@(package-native-inputs wheel))))))
2373
2374
2375 (define-public python-requests
2376 (package
2377 (name "python-requests")
2378 (version "2.9.1")
2379 (source (origin
2380 (method url-fetch)
2381 (uri (pypi-uri "requests" version))
2382 (sha256
2383 (base32
2384 "0zsqrzlybf25xscgi7ja4s48y2abf9wvjkn47wh984qgs1fq2xy5"))))
2385 (build-system python-build-system)
2386 (native-inputs
2387 `(("python-setuptools" ,python-setuptools)
2388 ("python-py" ,python-py)
2389 ("python-pytest" ,python-pytest)
2390 ("python-pytest-cov" ,python-pytest-cov)
2391 ("python-wheel" ,python-wheel)))
2392 (home-page "http://python-requests.org/")
2393 (synopsis "Python HTTP library")
2394 (description
2395 "Requests is a Python HTTP client library. It aims to be easier to use
2396 than Python’s urllib2 library.")
2397 (license license:asl2.0)))
2398
2399 ;; Some software requires an older version of Requests, notably Docker
2400 ;; Compose.
2401 (define-public python-requests-2.7
2402 (package (inherit python-requests)
2403 (version "2.7.0")
2404 (source (origin
2405 (method url-fetch)
2406 (uri (pypi-uri "requests" version))
2407 (sha256
2408 (base32
2409 "0gdr9dxm24amxpbyqpbh3lbwxc2i42hnqv50sigx568qssv3v2ir"))))))
2410
2411 (define-public python2-requests
2412 (package-with-python2 python-requests))
2413
2414 (define-public python-vcversioner
2415 (package
2416 (name "python-vcversioner")
2417 (version "2.14.0.0")
2418 (source
2419 (origin
2420 (method url-fetch)
2421 (uri (pypi-uri "vcversioner" version))
2422 (sha256
2423 (base32
2424 "11ivq1bm7v0yb4nsfbv9m7g7lyjn112gbvpjnjz8nv1fx633dm5c"))))
2425 (build-system python-build-system)
2426 (inputs
2427 `(("python-setuptools" ,python-setuptools)))
2428 (synopsis "Python library for version number discovery")
2429 (description "Vcversioner is a Python library that inspects tagging
2430 information in a variety of version control systems in order to discover
2431 version numbers.")
2432 (home-page "https://github.com/habnabit/vcversioner")
2433 (license license:isc)))
2434
2435 (define-public python2-vcversioner
2436 (package-with-python2 python-vcversioner))
2437
2438 (define-public python-jsonschema
2439 (package
2440 (name "python-jsonschema")
2441 (version "2.5.1")
2442 (source (origin
2443 (method url-fetch)
2444 (uri
2445 (string-append
2446 "https://pypi.python.org/packages/source/j/jsonschema/jsonschema-"
2447 version ".tar.gz"))
2448 (sha256
2449 (base32
2450 "0hddbqjm4jq63y8jf44nswina1crjs16l9snb6m3vvgyg31klrrn"))))
2451 (build-system python-build-system)
2452 (inputs
2453 `(("python-setuptools" ,python-setuptools)
2454 ("python-vcversioner" ,python-vcversioner)))
2455 (home-page "http://github.com/Julian/jsonschema")
2456 (synopsis "Implementation of JSON Schema for Python")
2457 (description
2458 "Jsonschema is an implementation of JSON Schema for Python.")
2459 (license license:expat)
2460 (properties `((python2-variant . ,(delay python2-jsonschema))))))
2461
2462 (define-public python2-jsonschema
2463 (let ((jsonschema (package-with-python2
2464 (strip-python2-variant python-jsonschema))))
2465 (package (inherit jsonschema)
2466 (inputs
2467 `(("python2-functools32" ,python2-functools32)
2468 ,@(package-inputs jsonschema))))))
2469
2470 (define-public python-unidecode
2471 (package
2472 (name "python-unidecode")
2473 (version "0.04.18")
2474 (source (origin
2475 (method url-fetch)
2476 (uri (pypi-uri "Unidecode" version))
2477 (sha256
2478 (base32
2479 "12hhblqy1ajvidm38im4171x4arg83pfmziyn53nizp29p3m14gi"))))
2480 (build-system python-build-system)
2481 (inputs
2482 `(("python-setuptools" ,python-setuptools)))
2483 (home-page "https://pypi.python.org/pypi/Unidecode")
2484 (synopsis "ASCII transliterations of Unicode text")
2485 (description
2486 "Unidecode provides ASCII transliterations of Unicode text. Unidecode is
2487 useful when integrating with legacy code that doesn't support Unicode, or for
2488 ease of entry of non-Roman names on a US keyboard, or when constructing ASCII
2489 machine identifiers from human-readable Unicode strings that should still be
2490 somewhat intelligeble.")
2491 (license license:gpl2+)))
2492
2493 (define-public python2-unidecode
2494 (package-with-python2 python-unidecode))
2495
2496 (define-public python-pyjwt
2497 (package
2498 (name "python-pyjwt")
2499 (version "1.4.0")
2500 (source
2501 (origin
2502 (method url-fetch)
2503 (uri (pypi-uri "PyJWT" version))
2504 (sha256
2505 (base32
2506 "1556v2jppd8mjkkj66pxb5rcazm35jq81r233mdl8hfmz9n3icp1"))))
2507 (build-system python-build-system)
2508 (native-inputs
2509 `(("python-setuptools" ,python-setuptools)
2510 ("python-pytest-runner" ,python-pytest-runner)))
2511 (arguments
2512 '(#:tests? #f)) ; test suite doesn't work
2513 (home-page "http://github.com/progrium/pyjwt")
2514 (synopsis "JSON Web Token implementation in Python")
2515 (description
2516 "PyJWT is a JSON Web Token implementation written in Python.")
2517 (license license:expat)))
2518
2519 (define-public python2-pyjwt
2520 (package-with-python2 python-pyjwt))
2521
2522 (define-public python-oauthlib
2523 (package
2524 (name "python-oauthlib")
2525 (version "1.0.3")
2526 (source (origin
2527 (method url-fetch)
2528 (uri (pypi-uri "oauthlib" version))
2529 (sha256
2530 (base32
2531 "1bfrj70vdjxjw74khbyh6f0dksv7p5rh2346jnlrffyacd3gwjzg"))))
2532 (build-system python-build-system)
2533 (native-inputs
2534 `(("python-coverage" ,python-coverage)
2535 ("python-nose" ,python-nose)
2536 ("python-mock" ,python-mock)))
2537 (inputs
2538 `(("python-blinker" ,python-blinker)
2539 ("python-cryptography" ,python-cryptography)
2540 ("python-pyjwt" ,python-pyjwt)))
2541 (home-page "https://github.com/idan/oauthlib")
2542 (synopsis "OAuth implementation for Python")
2543 (description
2544 "Oauthlib is a generic, spec-compliant, thorough implementation of the
2545 OAuth request-signing logic.")
2546 (license license:bsd-3)
2547 (properties `((python2-variant . ,(delay python2-oauthlib))))))
2548
2549 (define-public python2-oauthlib
2550 (let ((base (package-with-python2 (strip-python2-variant python-oauthlib))))
2551 (package
2552 (inherit base)
2553 (native-inputs `(("python2-setuptools" ,python2-setuptools)
2554 ("python2-unittest2" ,python2-unittest2)
2555 ,@(package-native-inputs base))))))
2556
2557 (define-public python-itsdangerous
2558 (package
2559 (name "python-itsdangerous")
2560 (version "0.24")
2561 (source
2562 (origin
2563 (method url-fetch)
2564 (uri (string-append
2565 "https://pypi.python.org/packages/source/i/itsdangerous/itsdangerous-"
2566 version ".tar.gz"))
2567 (sha256
2568 (base32
2569 "06856q6x675ly542ig0plbqcyab6ksfzijlyf1hzhgg3sgwgrcyb"))))
2570 (build-system python-build-system)
2571 (home-page "http://github.com/mitsuhiko/itsdangerous")
2572 (synopsis "Python library for passing data to/from untrusted environments")
2573 (description
2574 "Itsdangerous provides various helpers to pass trusted data to untrusted
2575 environments and back.")
2576 (license license:bsd-3)
2577 (properties `((python2-variant . ,(delay python2-itsdangerous))))))
2578
2579 (define-public python2-itsdangerous
2580 (let ((base (package-with-python2
2581 (strip-python2-variant python-itsdangerous))))
2582 (package
2583 (inherit base)
2584 (native-inputs `(("python2-setuptools" ,python2-setuptools)
2585 ,@(package-native-inputs base))))))
2586
2587 (define-public python-pyyaml
2588 (package
2589 (name "python-pyyaml")
2590 (version "3.11")
2591 (source
2592 (origin
2593 (method url-fetch)
2594 (uri (string-append
2595 "https://pypi.python.org/packages/source/P/PyYAML/PyYAML-"
2596 version ".tar.gz"))
2597 (sha256
2598 (base32
2599 "1s26125vfnskng58ym37xhwv8v0mm95b2cwbjfag8prfhy596v63"))))
2600 (build-system python-build-system)
2601 (inputs
2602 `(("libyaml" ,libyaml)))
2603 (native-inputs
2604 `(("python-setuptools" ,python-setuptools)))
2605 (home-page "http://pyyaml.org/wiki/PyYAML")
2606 (synopsis "YAML parser and emitter for Python")
2607 (description
2608 "PyYAML is a YAML parser and emitter for Python. PyYAML features a
2609 complete YAML 1.1 parser, Unicode support, pickle support, capable extension
2610 API, and sensible error messages. PyYAML supports standard YAML tags and
2611 provides Python-specific tags that allow to represent an arbitrary Python
2612 object.")
2613 (license license:expat)))
2614
2615 (define-public python2-pyyaml
2616 (package-with-python2 python-pyyaml))
2617
2618 (define-public python-virtualenv
2619 (package
2620 (name "python-virtualenv")
2621 (version "15.0.3")
2622 (source
2623 (origin
2624 (method url-fetch)
2625 (uri (pypi-uri "virtualenv" version))
2626 (sha256
2627 (base32
2628 "07cbajzk8l05k5zhlw0b9wbf2is65bl9v6zrn2a0iyn57w6pd73d"))))
2629 (build-system python-build-system)
2630 (arguments
2631 `(#:phases
2632 (modify-phases %standard-phases
2633 (replace 'check
2634 (lambda _
2635 ;; Disable failing test. See upstream bug report
2636 ;; https://github.com/pypa/virtualenv/issues/957
2637 (substitute* "tests/test_virtualenv.py"
2638 (("skipif.*") "skipif(True, reason=\"Guix\")\n"))
2639 (zero? (system* "py.test")))))))
2640 (inputs
2641 `(("python-setuptools" ,python-setuptools)
2642 ("python-mock" ,python-mock)
2643 ("python-pytest" ,python-pytest)))
2644 (home-page "https://virtualenv.pypa.io/")
2645 (synopsis "Virtual Python environment builder")
2646 (description
2647 "Virtualenv is a tool to create isolated Python environments.")
2648 (license license:expat)))
2649
2650 (define-public python2-virtualenv
2651 (package-with-python2 python-virtualenv))
2652
2653 (define-public python-markupsafe
2654 (package
2655 (name "python-markupsafe")
2656 (version "0.23")
2657 (source
2658 (origin
2659 (method url-fetch)
2660 (uri (string-append
2661 "https://pypi.python.org/packages/source/M/MarkupSafe/MarkupSafe-"
2662 version ".tar.gz"))
2663 (sha256
2664 (base32
2665 "1hvip33wva3fnmvfp9x5klqri7hpl1hkgqmjbss18nmrb7zimv54"))))
2666 (build-system python-build-system)
2667 (inputs
2668 `(("python-setuptools" ,python-setuptools)))
2669 (home-page "http://github.com/mitsuhiko/markupsafe")
2670 (synopsis "XML/HTML/XHTML markup safe string implementation for Python")
2671 (description
2672 "Markupsafe provides an XML/HTML/XHTML markup safe string implementation
2673 for Python.")
2674 (license license:bsd-3)))
2675
2676 (define-public python2-markupsafe
2677 (package-with-python2 python-markupsafe))
2678
2679 (define-public python-jinja2
2680 (package
2681 (name "python-jinja2")
2682 (version "2.8")
2683 (source
2684 (origin
2685 (method url-fetch)
2686 (uri (pypi-uri "Jinja2" version))
2687 (sha256
2688 (base32
2689 "1x0v41lp5m1pjix3l46zx02b7lqp2hflgpnxwkywxynvi3zz47xw"))))
2690 (build-system python-build-system)
2691 (inputs
2692 `(("python-setuptools" ,python-setuptools)
2693 ("python-markupsafe" ,python-markupsafe)))
2694 (home-page "http://jinja.pocoo.org/")
2695 (synopsis "Python template engine")
2696 (description
2697 "Jinja2 is a small but fast and easy to use stand-alone template engine
2698 written in pure Python.")
2699 (license license:bsd-3)))
2700
2701 (define-public python2-jinja2
2702 (package-with-python2 python-jinja2))
2703
2704 (define-public python-pystache
2705 (package
2706 (name "python-pystache")
2707 (version "0.5.4")
2708 (source (origin
2709 (method url-fetch)
2710 (uri (pypi-uri "pystache" version))
2711 (sha256
2712 (base32
2713 "0nmqsfmiw4arjxqkmf9z66ml950pcdjk6aq4gin4sywmzdjw5fzp"))))
2714 (build-system python-build-system)
2715 (native-inputs
2716 `(("python-setuptools" ,python-setuptools)))
2717 (home-page "http://defunkt.io/pystache/")
2718 (synopsis "Python logic-less template engine")
2719 (description
2720 "Pystache is a Python implementation of the framework agnostic,
2721 logic-free templating system Mustache.")
2722 (license license:expat)))
2723
2724 (define-public python2-pystache
2725 (package-with-python2 python-pystache))
2726
2727 (define-public python-joblib
2728 (package
2729 (name "python-joblib")
2730 (version "0.9.0b4")
2731 (source (origin
2732 (method url-fetch)
2733 (uri (string-append "https://pypi.python.org/packages/source/"
2734 "j/joblib/joblib-" version ".tar.gz"))
2735 (sha256
2736 (base32
2737 "1dvw3f8jgj6h0fxkghbgyclvdzc7l0ig7n0vis70awb5kczb9bs3"))))
2738 (build-system python-build-system)
2739 (native-inputs
2740 `(("python-setuptools" ,python-setuptools)
2741 ("python-nose" ,python-nose)))
2742 (home-page "http://pythonhosted.org/joblib/")
2743 (synopsis "Using Python functions as pipeline jobs")
2744 (description
2745 "Joblib is a set of tools to provide lightweight pipelining in Python.
2746 In particular, joblib offers: transparent disk-caching of the output values
2747 and lazy re-evaluation (memoize pattern), easy simple parallel computing
2748 logging and tracing of the execution.")
2749 (license license:bsd-3)))
2750
2751 (define-public python2-joblib
2752 (package-with-python2 python-joblib))
2753
2754 (define-public python-docutils
2755 (package
2756 (name "python-docutils")
2757 (version "0.12")
2758 (source
2759 (origin
2760 (method url-fetch)
2761 (uri (string-append
2762 "https://pypi.python.org/packages/source/d/docutils/docutils-"
2763 version ".tar.gz"))
2764 (sha256
2765 (base32
2766 "1ylnjnw1x4b2y7blr6x35ncdzn69k253kw4cdkv6asdb21w73ny7"))))
2767 (build-system python-build-system)
2768 (inputs
2769 `(("python-setuptools" ,python-setuptools)))
2770 (arguments
2771 '(#:tests? #f)) ; no setup.py test command
2772 (home-page "http://docutils.sourceforge.net/")
2773 (synopsis "Python Documentation Utilities")
2774 (description
2775 "Docutils is a modular system for processing documentation into useful
2776 formats, such as HTML, XML, and LaTeX. For input Docutils supports
2777 reStructuredText.")
2778 ;; Most of the source code is public domain, but some source files are
2779 ;; licensed under the PFSL, BSD 2-clause, and GPLv3+ licenses.
2780 (license (list license:public-domain license:psfl license:bsd-2 license:gpl3+))))
2781
2782 (define-public python2-docutils
2783 (package-with-python2 python-docutils))
2784
2785 (define-public python-pygments
2786 (package
2787 (name "python-pygments")
2788 (version "2.0.2")
2789 (source
2790 (origin
2791 (method url-fetch)
2792 (uri (pypi-uri "Pygments" version))
2793 (sha256
2794 (base32
2795 "0lagrwifsgn0s8bzqahpr87p7gd38xja8f06akscinp6hj89283k"))))
2796 (build-system python-build-system)
2797 (inputs
2798 `(("python-setuptools" ,python-setuptools)))
2799 (home-page "http://pygments.org/")
2800 (synopsis "Syntax highlighting")
2801 (description
2802 "Pygments is a syntax highlighting package written in Python.")
2803 (license license:bsd-2)))
2804
2805 (define-public python2-pygments
2806 (package-with-python2 python-pygments))
2807
2808 (define-public python-sphinx
2809 (package
2810 (name "python-sphinx")
2811 (version "1.2.3")
2812 (source
2813 (origin
2814 (method url-fetch)
2815 (uri (string-append
2816 "https://pypi.python.org/packages/source/S/Sphinx/Sphinx-"
2817 version ".tar.gz"))
2818 (sha256
2819 (base32
2820 "011xizm3jnmf4cvs5i6kgf6c5nn046h79i8j0vd0f27yw9j3p4wl"))))
2821 (build-system python-build-system)
2822 (inputs
2823 `(("python-setuptools" ,python-setuptools)
2824 ("python-jinja2" ,python-jinja2)
2825 ("python-docutils" ,python-docutils)
2826 ("python-pygments" ,python-pygments)))
2827 (home-page "http://sphinx-doc.org/")
2828 (synopsis "Python documentation generator")
2829 (description "Sphinx is a tool that makes it easy to create documentation
2830 for Python projects or other documents consisting of multiple reStructuredText
2831 sources.")
2832 (license license:bsd-3)))
2833
2834 (define-public python2-sphinx
2835 (package-with-python2 python-sphinx))
2836
2837 (define-public python-sphinx-rtd-theme
2838 (package
2839 (name "python-sphinx-rtd-theme")
2840 (version "0.1.6")
2841 (source
2842 (origin
2843 (method url-fetch)
2844 (uri (string-append "https://pypi.python.org/packages/source/s/"
2845 "sphinx_rtd_theme/sphinx_rtd_theme-"
2846 version ".tar.gz"))
2847 (sha256
2848 (base32
2849 "19nw3rn7awplcdrz63kg1njqwkbymfg9lwn7l2grhdyhyr2gaa8g"))))
2850 (build-system python-build-system)
2851 (arguments
2852 `(;; With standard flags, the install phase attempts to create a zip'd
2853 ;; egg file, and fails with an error: 'ZIP does not support timestamps
2854 ;; before 1980'
2855 #:configure-flags '("--single-version-externally-managed"
2856 "--record=sphinx-rtd-theme.txt")))
2857 (native-inputs
2858 `(("python-setuptools" ,python-setuptools)))
2859 (inputs
2860 `(("python-docutils" ,python-docutils)
2861 ("python-sphinx" ,python-sphinx)))
2862 (home-page "https://github.com/snide/sphinx_rtd_theme/")
2863 (synopsis "ReadTheDocs.org theme for Sphinx")
2864 (description "A theme for Sphinx used by ReadTheDocs.org.")
2865 (license license:expat)))
2866
2867 (define-public python2-sphinx-rtd-theme
2868 (package-with-python2 python-sphinx-rtd-theme))
2869
2870 (define-public python-feedgenerator
2871 (package
2872 (name "python-feedgenerator")
2873 (version "1.8")
2874 (source
2875 (origin
2876 (method url-fetch)
2877 (uri (pypi-uri "feedgenerator" version))
2878 (sha256
2879 (base32
2880 "0mkimp1fpdan4p3882vzcws4l594k71ich4g0wq97jbra7p602n0"))))
2881 (build-system python-build-system)
2882 (native-inputs
2883 `(("python-setuptools" ,python-setuptools)
2884 ("python-pytz" ,python-pytz)
2885 ("python-six" ,python-six)))
2886 (home-page "https://github.com/getpelican/feedgenerator")
2887 (synopsis
2888 "Standalone version of Django's Atom/RSS feed generator")
2889 (description
2890 "Feedgenerator-py3k is a standalone version of Django's feedgenerator,
2891 which can produce feeds in RSS 2.0, RSS 0.91, and Atom formats.")
2892 (license license:bsd-3)))
2893
2894 (define-public python2-feedgenerator
2895 (package-with-python2 python-feedgenerator))
2896
2897 (define-public python-blinker
2898 (package
2899 (name "python-blinker")
2900 (version "1.4")
2901 (source
2902 (origin
2903 (method url-fetch)
2904 (uri (pypi-uri "blinker" version))
2905 (sha256
2906 (base32
2907 "1dpq0vb01p36jjwbhhd08ylvrnyvcc82yxx3mwjx6awrycjyw6j7"))))
2908 (build-system python-build-system)
2909 (native-inputs
2910 `(("python-setuptools" ,python-setuptools)))
2911 ;; No "test" command supplied to setuptools, so unless there's another way
2912 ;; to run tests, we're skipping them!
2913 (arguments '(#:tests? #f))
2914 (home-page "http://pythonhosted.org/blinker/")
2915 (synopsis "Fast, simple object-to-object and broadcast signaling")
2916 (description
2917 "Blinker provides a fast dispatching system that allows any number of
2918 interested parties to subscribe to events, or \"signals\".")
2919 (license license:expat)))
2920
2921 (define-public python2-blinker
2922 (package-with-python2 python-blinker))
2923
2924 (define-public pelican
2925 (package
2926 (name "pelican")
2927 (version "3.6.3")
2928 (source
2929 (origin
2930 (method url-fetch)
2931 (uri (pypi-uri "pelican" version))
2932 (sha256
2933 (base32
2934 "1hn94rb4q3zmcq16in055xikal4dba5hfx3zznq7warllcgc9f8k"))))
2935 (build-system python-build-system)
2936 (inputs
2937 `(("python-feedgenerator" ,python-feedgenerator)
2938 ("python-jinja2" ,python-jinja2)
2939 ("python-pygments" ,python-pygments)
2940 ("python-docutils" ,python-docutils)
2941 ("python-pytz" ,python-pytz)
2942 ("python-blinker" ,python-blinker)
2943 ("python-unidecode" ,python-unidecode)
2944 ("python-six" ,python-six)
2945 ("python-dateutil-2" ,python-dateutil-2)))
2946 (home-page "http://getpelican.com/")
2947 (arguments
2948 `(;; XXX Requires a lot more packages to do unit tests :P
2949 #:tests? #f
2950 #:phases (modify-phases %standard-phases
2951 (add-before
2952 'install 'adjust-requires
2953 ;; Since feedgenerator is installed from git, it doesn't
2954 ;; conform to the version requirements.
2955 ;;
2956 ;; We *do have* "feedgenerator >= 1.6", but strip off the
2957 ;; version requirement so setuptools doesn't get confused.
2958 (lambda _
2959 (substitute* "setup.py"
2960 (("['\"]feedgenerator.*?['\"]")
2961 "'feedgenerator'")))))))
2962 (synopsis "Python-based static site publishing system")
2963 (description
2964 "Pelican is a tool to generate a static blog from reStructuredText,
2965 Markdown input files, and more. Pelican uses Jinja2 for templating
2966 and is very extensible.")
2967 (license license:agpl3+)))
2968
2969 (define-public python-scikit-learn
2970 (package
2971 (name "python-scikit-learn")
2972 (version "0.16.1")
2973 (source
2974 (origin
2975 (method url-fetch)
2976 (uri (string-append
2977 "https://github.com/scikit-learn/scikit-learn/archive/"
2978 version ".tar.gz"))
2979 (file-name (string-append name "-" version ".tar.gz"))
2980 (sha256
2981 (base32
2982 "140skabifgc7lvvj873pnzlwx0ni6q8qkrsyad2ccjb3h8rxzkih"))))
2983 (build-system python-build-system)
2984 (arguments
2985 `(#:phases
2986 (alist-cons-before
2987 'check 'set-HOME
2988 ;; some tests require access to "$HOME"
2989 (lambda _ (setenv "HOME" "/tmp"))
2990 ;; Tests can only be run after the library has been installed and not
2991 ;; within the source directory.
2992 (alist-cons-after
2993 'install 'check
2994 (lambda _
2995 (with-directory-excursion "/tmp"
2996 ;; With Python 3 one test of 3334 fails
2997 ;; (sklearn.tests.test_common.test_transformers); see
2998 ;; https://github.com/scikit-learn/scikit-learn/issues/3693
2999 (system* "nosetests" "-v" "sklearn")))
3000 (alist-delete 'check %standard-phases)))))
3001 (inputs
3002 `(("openblas" ,openblas)
3003 ("python-nose" ,python-nose)))
3004 (propagated-inputs
3005 `(("python-numpy" ,python-numpy)
3006 ("python-scipy" ,python-scipy)))
3007 (home-page "http://scikit-learn.org/")
3008 (synopsis "Machine Learning in Python")
3009 (description
3010 "Scikit-learn provides simple and efficient tools for data
3011 mining and data analysis.")
3012 (license license:bsd-3)
3013 (properties `((python2-variant . ,(delay python2-scikit-learn))))))
3014
3015 (define-public python2-scikit-learn
3016 (package-with-python2 (strip-python2-variant python-scikit-learn)))
3017
3018 (define-public python-scikit-image
3019 (package
3020 (name "python-scikit-image")
3021 (version "0.11.3")
3022 (source
3023 (origin
3024 (method url-fetch)
3025 (uri (string-append
3026 "https://pypi.python.org/packages/source/s/scikit-image/scikit-image-"
3027 version ".tar.gz"))
3028 (sha256
3029 (base32 "0jz416fqvpahqyffw8plmszzfj669w8wvf3y9clnr5lr6a7md3kn"))))
3030 (build-system python-build-system)
3031 (propagated-inputs
3032 `(("python-matplotlib" ,python-matplotlib)
3033 ("python-networkx" ,python-networkx)
3034 ("python-numpy" ,python-numpy)
3035 ("python-scipy" ,python-scipy)
3036 ("python-six" ,python-six)
3037 ("python-pillow" ,python-pillow)))
3038 (native-inputs
3039 `(("python-cython" ,python-cython)
3040 ("python-setuptools" ,python-setuptools)))
3041 (home-page "http://scikit-image.org/")
3042 (synopsis "Image processing in Python")
3043 (description
3044 "Scikit-image is a collection of algorithms for image processing.")
3045 (license license:bsd-3)
3046 (properties `((python2-variant . ,(delay python2-scikit-image))))))
3047
3048 (define-public python2-scikit-image
3049 (let ((scikit-image (package-with-python2
3050 (strip-python2-variant python-scikit-image))))
3051 (package (inherit scikit-image)
3052 (native-inputs
3053 `(("python2-mock" ,python2-mock)
3054 ,@(package-native-inputs scikit-image)))
3055 (propagated-inputs
3056 `(("python2-pytz" ,python2-pytz)
3057 ,@(package-propagated-inputs scikit-image))))))
3058
3059 (define-public python-redis
3060 (package
3061 (name "python-redis")
3062 (version "2.10.3")
3063 (source
3064 (origin
3065 (method url-fetch)
3066 (uri (string-append
3067 "https://pypi.python.org/packages/source/r/redis/redis-"
3068 version ".tar.gz"))
3069 (sha256
3070 (base32 "1701qjwn4n05q90fdg4bsg96s27xf5s4hsb4gxhv3xk052q3gyx4"))))
3071 (build-system python-build-system)
3072 ;; Tests require a running Redis server
3073 (arguments '(#:tests? #f))
3074 (native-inputs
3075 `(("python-setuptools" ,python-setuptools)
3076 ("python-pytest" ,python-pytest)))
3077 (home-page "https://github.com/andymccurdy/redis-py")
3078 (synopsis "Redis Python client")
3079 (description
3080 "This package provides a Python interface to the Redis key-value store.")
3081 (license license:expat)))
3082
3083 (define-public python2-redis
3084 (package-with-python2 python-redis))
3085
3086 (define-public python-rq
3087 (package
3088 (name "python-rq")
3089 (version "0.5.2")
3090 (source
3091 (origin
3092 (method url-fetch)
3093 (uri (string-append
3094 "https://pypi.python.org/packages/source/r/rq/rq-"
3095 version ".tar.gz"))
3096 (sha256
3097 (base32 "0b0z5hn8wkfg300hx7816csgv3bcfamlr29fi3yzgqmpqxwj3fix"))))
3098 (build-system python-build-system)
3099 (propagated-inputs
3100 `(("python-click" ,python-click)
3101 ("python-redis" ,python-redis)))
3102 (native-inputs
3103 `(("python-setuptools" ,python-setuptools)))
3104 (home-page "http://python-rq.org/")
3105 (synopsis "Simple job queues for Python")
3106 (description
3107 "RQ (Redis Queue) is a simple Python library for queueing jobs and
3108 processing them in the background with workers. It is backed by Redis and it
3109 is designed to have a low barrier to entry.")
3110 (license license:bsd-2)))
3111
3112 (define-public python2-rq
3113 (package-with-python2 python-rq))
3114
3115 (define-public python-cython
3116 (package
3117 (name "python-cython")
3118 (version "0.24.1")
3119 (source
3120 (origin
3121 (method url-fetch)
3122 (uri (pypi-uri "Cython" version))
3123 (sha256
3124 (base32
3125 "1fg7fmpvfcq9md4ncyqnnylyjy4z3ksdrshzis95g1sh03d8z044"))))
3126 (build-system python-build-system)
3127 ;; we need the full python package and not just the python-wrapper
3128 ;; because we need libpython3.3m.so
3129 (inputs
3130 `(("python" ,python)))
3131 (arguments
3132 `(#:phases
3133 (modify-phases %standard-phases
3134 (add-before 'check 'set-HOME
3135 ;; some tests require access to "$HOME/.cython"
3136 (lambda _ (setenv "HOME" "/tmp")))
3137 (replace 'check
3138 (lambda _ (zero? (system* "python" "runtests.py" "-vv")))))))
3139 (home-page "http://cython.org/")
3140 (synopsis "C extensions for Python")
3141 (description "Cython is an optimising static compiler for both the Python
3142 programming language and the extended Cython programming language. It makes
3143 writing C extensions for Python as easy as Python itself.")
3144 (license license:asl2.0)
3145 (properties `((python2-variant . ,(delay python2-cython))))))
3146
3147 (define-public python2-cython
3148 (package (inherit (package-with-python2
3149 (strip-python2-variant python-cython)))
3150 (name "python2-cython")
3151 (inputs
3152 `(("python-2" ,python-2))))) ; this is not automatically changed
3153
3154 ;; The RPython toolchain currently does not support Python 3.
3155 (define-public python2-rpython
3156 (package
3157 (name "python2-rpython")
3158 (version "0.1.4")
3159 (source
3160 (origin
3161 (method url-fetch)
3162 (uri (pypi-uri "rpython" version))
3163 (sha256
3164 (base32
3165 "07pps06fq4c4wmi5ii0sgh9zgwniz5y7frqhm28g3a154l163fxc"))))
3166 (build-system python-build-system)
3167 (arguments `(#:python ,python-2))
3168 (native-inputs
3169 `(("python2-pytest" ,python2-pytest) ; needed for running tests
3170 ("python2-setuptools" ,python2-setuptools)))
3171 (home-page "https://rpython.readthedocs.org")
3172 (synopsis "Framework for implementing interpreters and virtual machines")
3173 (description "RPython is a translation and support framework for
3174 producing implementations of dynamic languages, emphasizing a clean separation
3175 between language specification and implementation aspects.")
3176 (license license:expat)))
3177
3178 ;; This version of numpy is missing the documentation and is only used to
3179 ;; build matplotlib which is required to build numpy's documentation.
3180 (define python-numpy-bootstrap
3181 (package
3182 (name "python-numpy-bootstrap")
3183 (version "1.10.4")
3184 (source
3185 (origin
3186 (method url-fetch)
3187 (uri (string-append "mirror://sourceforge/numpy/NumPy/" version
3188 "/numpy-" version ".tar.gz"))
3189 (sha256
3190 (base32
3191 "1bjjhvncraka5s6i4lg644jrxij6bvycxy7an20gcz3a0m11iygp"))))
3192 (build-system python-build-system)
3193 (inputs
3194 `(("python-nose" ,python-nose)
3195 ("openblas" ,openblas)
3196 ("lapack" ,lapack)))
3197 (native-inputs
3198 `(("gfortran" ,gfortran)))
3199 (arguments
3200 `(#:phases
3201 (alist-cons-before
3202 'build 'set-environment-variables
3203 (lambda* (#:key inputs #:allow-other-keys)
3204 (call-with-output-file "site.cfg"
3205 (lambda (port)
3206 (format port
3207 "[openblas]
3208 libraries = openblas
3209 library_dirs = ~a/lib
3210 include_dirs = ~a/include
3211
3212 [lapack]
3213 lapack_libs = lapack
3214 library_dirs = ~a/lib
3215 include_dirs = ~a/include
3216 "
3217 (assoc-ref inputs "openblas")
3218 (assoc-ref inputs "openblas")
3219 (assoc-ref inputs "lapack")
3220 (assoc-ref inputs "lapack"))))
3221 ;; Use "gcc" executable, not "cc".
3222 (substitute* "numpy/distutils/system_info.py"
3223 (("c = distutils\\.ccompiler\\.new_compiler\\(\\)")
3224 "c = distutils.ccompiler.new_compiler(); c.set_executables(compiler='gcc',compiler_so='gcc',linker_exe='gcc',linker_so='gcc -shared')"))
3225 #t)
3226 ;; Tests can only be run after the library has been installed and not
3227 ;; within the source directory.
3228 (alist-cons-after
3229 'install 'check
3230 (lambda _
3231 (with-directory-excursion "/tmp"
3232 (zero? (system* "python" "-c"
3233 "import numpy; numpy.test(verbose=2)"))))
3234 (alist-delete
3235 'check
3236 %standard-phases)))))
3237 (home-page "http://www.numpy.org/")
3238 (synopsis "Fundamental package for scientific computing with Python")
3239 (description "NumPy is the fundamental package for scientific computing
3240 with Python. It contains among other things: a powerful N-dimensional array
3241 object, sophisticated (broadcasting) functions, tools for integrating C/C++
3242 and Fortran code, useful linear algebra, Fourier transform, and random number
3243 capabilities.")
3244 (license license:bsd-3)))
3245
3246 (define python2-numpy-bootstrap
3247 (package-with-python2 python-numpy-bootstrap))
3248
3249 (define-public python2-fastlmm
3250 (package
3251 (name "python2-fastlmm")
3252 (version "0.2.21")
3253 (source
3254 (origin
3255 (method url-fetch)
3256 (uri (pypi-uri "fastlmm" version ".zip"))
3257 (sha256
3258 (base32
3259 "1q8c34rpmwkfy3r4d5172pzdkpfryj561897z9r3x22gq7813x1m"))))
3260 (build-system python-build-system)
3261 (arguments
3262 `(#:python ,python-2)) ; only Python 2.7 is supported
3263 (propagated-inputs
3264 `(("python2-numpy" ,python2-numpy)
3265 ("python2-scipy" ,python2-scipy)
3266 ("python2-matplotlib" ,python2-matplotlib)
3267 ("python2-pandas" ,python2-pandas)
3268 ("python2-scikit-learn" ,python2-scikit-learn)
3269 ("python2-cython" ,python2-cython)
3270 ("python2-pysnptools" ,python2-pysnptools)))
3271 (native-inputs
3272 `(("unzip" ,unzip)
3273 ("python2-mock" ,python2-mock)
3274 ("python2-setuptools" ,python2-setuptools)))
3275 (home-page "http://research.microsoft.com/en-us/um/redmond/projects/mscompbio/fastlmm/")
3276 (synopsis "Perform genome-wide association studies on large data sets")
3277 (description
3278 "FaST-LMM, which stands for Factored Spectrally Transformed Linear Mixed
3279 Models, is a program for performing both single-SNP and SNP-set genome-wide
3280 association studies (GWAS) on extremely large data sets.")
3281 (license license:asl2.0)))
3282
3283 (define-public python-numpy
3284 (package (inherit python-numpy-bootstrap)
3285 (name "python-numpy")
3286 (outputs '("out" "doc"))
3287 (inputs
3288 `(("which" ,which)
3289 ("python-setuptools" ,python-setuptools)
3290 ("python-matplotlib" ,python-matplotlib)
3291 ("python-sphinx" ,python-sphinx)
3292 ("python-pyparsing" ,python-pyparsing)
3293 ("python-numpydoc" ,python-numpydoc)
3294 ,@(package-inputs python-numpy-bootstrap)))
3295 (native-inputs
3296 `(("pkg-config" ,pkg-config)
3297 ("texlive" ,texlive)
3298 ("texinfo" ,texinfo)
3299 ("perl" ,perl)
3300 ,@(package-native-inputs python-numpy-bootstrap)))
3301 (arguments
3302 `(,@(substitute-keyword-arguments
3303 (package-arguments python-numpy-bootstrap)
3304 ((#:phases phases)
3305 `(alist-cons-after
3306 'install 'install-doc
3307 (lambda* (#:key outputs #:allow-other-keys)
3308 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
3309 (doc (string-append
3310 data "/doc/" ,name "-"
3311 ,(package-version python-numpy-bootstrap)))
3312 (info (string-append data "/info"))
3313 (html (string-append doc "/html"))
3314 (pyver ,(string-append "PYVER=")))
3315 (with-directory-excursion "doc"
3316 (mkdir-p html)
3317 (system* "make" "html" pyver)
3318 (system* "make" "latex" "PAPER=a4" pyver)
3319 (system* "make" "-C" "build/latex"
3320 "all-pdf" "PAPER=a4" pyver)
3321 ;; FIXME: Generation of the info file fails.
3322 ;; (system* "make" "info" pyver)
3323 ;; (mkdir-p info)
3324 ;; (copy-file "build/texinfo/numpy.info"
3325 ;; (string-append info "/numpy.info"))
3326 (for-each (lambda (file)
3327 (copy-file (string-append "build/latex" file)
3328 (string-append doc file)))
3329 '("/numpy-ref.pdf" "/numpy-user.pdf"))
3330 (with-directory-excursion "build/html"
3331 (for-each (lambda (file)
3332 (let* ((dir (dirname file))
3333 (tgt-dir (string-append html "/" dir)))
3334 (unless (equal? "." dir)
3335 (mkdir-p tgt-dir))
3336 (install-file file html)))
3337 (find-files "." ".*"))))))
3338 ,phases)))))))
3339
3340 (define-public python2-numpy
3341 (package-with-python2 python-numpy))
3342
3343 (define-public python-pyparsing
3344 (package
3345 (name "python-pyparsing")
3346 (version "2.0.3")
3347 (source
3348 (origin
3349 (method url-fetch)
3350 (uri (string-append "mirror://sourceforge/pyparsing/pyparsing"
3351 "/pyparsing-" version
3352 "/pyparsing-" version ".tar.gz"))
3353 (sha256
3354 (base32
3355 "0kw4py7gn45j93q8r7bzajfrjdc3xlsn2yzln41lf9zmrghjkrq6"))))
3356 (build-system python-build-system)
3357 (outputs '("out" "doc"))
3358 (arguments
3359 `(#:tests? #f ; no test target
3360 #:modules ((guix build python-build-system)
3361 (guix build utils))
3362 #:phases
3363 (alist-cons-after
3364 'install 'install-doc
3365 (lambda* (#:key outputs #:allow-other-keys)
3366 (let* ((doc (string-append (assoc-ref outputs "doc")
3367 "/share/doc/" ,name "-" ,version))
3368 (html-doc (string-append doc "/html"))
3369 (examples (string-append doc "/examples")))
3370 (mkdir-p html-doc)
3371 (mkdir-p examples)
3372 (for-each
3373 (lambda (dir tgt)
3374 (map (lambda (file)
3375 (install-file file tgt))
3376 (find-files dir ".*")))
3377 (list "docs" "htmldoc" "examples")
3378 (list doc html-doc examples))))
3379 %standard-phases)))
3380 (home-page "http://pyparsing.wikispaces.com")
3381 (synopsis "Python parsing class library")
3382 (description
3383 "The pyparsing module is an alternative approach to creating and
3384 executing simple grammars, vs. the traditional lex/yacc approach, or the use
3385 of regular expressions. The pyparsing module provides a library of classes
3386 that client code uses to construct the grammar directly in Python code.")
3387 (license license:expat)))
3388
3389 (define-public python2-pyparsing
3390 (package-with-python2 python-pyparsing))
3391
3392 (define-public python-numpydoc
3393 (package
3394 (name "python-numpydoc")
3395 (version "0.5")
3396 (source
3397 (origin
3398 (method url-fetch)
3399 (uri (string-append
3400 "https://pypi.python.org/packages/source/n/numpydoc/numpydoc-"
3401 version ".tar.gz"))
3402 (sha256
3403 (base32
3404 "0d4dnifaxkll50jx6czj05y8cb4ny60njd2wz299sj2jxfy51w4k"))
3405 (modules '((guix build utils)))
3406 (snippet
3407 '(begin
3408 ;; Drop a test requiring matplotlib, which we cannot add as an
3409 ;; input since it would create a circular dependency: Extend the
3410 ;; test for Python 3, where it is already dropped, to Python 2.
3411 (substitute* "numpydoc/tests/test_plot_directive.py"
3412 (("3") "2"))))))
3413 (build-system python-build-system)
3414 (inputs
3415 `(("python-setuptools" ,python-setuptools)
3416 ("python-docutils" ,python-docutils)
3417 ("python-sphinx" ,python-sphinx)
3418 ("python-nose" ,python-nose)))
3419 (home-page "https://pypi.python.org/pypi/numpydoc")
3420 (synopsis
3421 "Numpy's Sphinx extensions")
3422 (description
3423 "Sphinx extension to support docstrings in Numpy format.")
3424 (license license:bsd-2)))
3425
3426 (define-public python2-numpydoc
3427 (package-with-python2 python-numpydoc))
3428
3429 (define-public python-numexpr
3430 (package
3431 (name "python-numexpr")
3432 (version "2.6.0")
3433 (source
3434 (origin
3435 (method url-fetch)
3436 (uri (pypi-uri "numexpr" version))
3437 (sha256
3438 (base32
3439 "0i6iagl2hhbr8q4qzbbjd859v5806vqylq87fq7pi914ps6d6cag"))))
3440 (build-system python-build-system)
3441 (arguments `(#:tests? #f)) ; no tests included
3442 (propagated-inputs
3443 `(("python-numpy" ,python-numpy)))
3444 (home-page "https://github.com/pydata/numexpr")
3445 (synopsis "Fast numerical expression evaluator for NumPy")
3446 (description
3447 "Numexpr is a fast numerical expression evaluator for NumPy. With it,
3448 expressions that operate on arrays are accelerated and use less memory than
3449 doing the same calculation in Python. In addition, its multi-threaded
3450 capabilities can make use of all your cores, which may accelerate
3451 computations, most specially if they are not memory-bounded (e.g. those using
3452 transcendental functions).")
3453 (license license:expat)
3454 (properties `((python2-variant . ,(delay python2-numexpr))))))
3455
3456 (define-public python2-numexpr
3457 (package-with-python2 (strip-python2-variant python-numexpr)))
3458
3459 (define-public python-matplotlib
3460 (package
3461 (name "python-matplotlib")
3462 (version "1.4.3")
3463 (source
3464 (origin
3465 (method url-fetch)
3466 (uri (string-append "mirror://sourceforge/matplotlib/matplotlib"
3467 "/matplotlib-" version
3468 "/matplotlib-" version ".tar.gz"))
3469 (sha256
3470 (base32
3471 "1dn05cvd0g984lzhh72wa0z93psgwshbbg93fkab6slx5m3l95av"))
3472 (patches (search-patches "matplotlib-setupext-tk.patch"))))
3473 (build-system python-build-system)
3474 (outputs '("out" "doc"))
3475 (propagated-inputs ; the following packages are all needed at run time
3476 `(("python-pyparsing" ,python-pyparsing)
3477 ("python-pygobject" ,python-pygobject)
3478 ("gobject-introspection" ,gobject-introspection)
3479 ("python-tkinter" ,python "tk")
3480 ;; The 'gtk+' package (and 'gdk-pixbuf', 'atk' and 'pango' propagated
3481 ;; from 'gtk+') provides the required 'typelib' files used by
3482 ;; 'gobject-introspection'. The location of these files is set with the
3483 ;; help of the environment variable GI_TYPELIB_PATH. At build time this
3484 ;; is done automatically by a 'native-search-path' procedure. However,
3485 ;; at run-time the user must set this variable as follows:
3486 ;;
3487 ;; export GI_TYPELIB_PATH=~/.guix-profile/lib/girepository-1.0
3488 ("gtk+" ,gtk+)
3489 ;; From version 1.4.0 'matplotlib' makes use of 'cairocffi' instead of
3490 ;; 'pycairo'. However, 'pygobject' makes use of a 'pycairo' 'context'
3491 ;; object. For this reason we need to import both libraries.
3492 ;; https://pythonhosted.org/cairocffi/cffi_api.html#converting-pycairo
3493 ("python-pycairo" ,python-pycairo)
3494 ("python-cairocffi" ,python-cairocffi)))
3495 (inputs
3496 `(("python-setuptools" ,python-setuptools)
3497 ("python-dateutil" ,python-dateutil-2)
3498 ("python-six" ,python-six)
3499 ("python-pytz" ,python-pytz)
3500 ("python-numpy" ,python-numpy-bootstrap)
3501 ("python-sphinx" ,python-sphinx)
3502 ("python-numpydoc" ,python-numpydoc)
3503 ("python-nose" ,python-nose)
3504 ("python-mock" ,python-mock)
3505 ("libpng" ,libpng)
3506 ("imagemagick" ,imagemagick)
3507 ("freetype" ,freetype)
3508 ("cairo" ,cairo)
3509 ("glib" ,glib)
3510 ("python-pillow" ,python-pillow)
3511 ;; FIXME: Add backends when available.
3512 ;("python-wxpython" ,python-wxpython)
3513 ;("python-pyqt" ,python-pyqt)
3514 ("tcl" ,tcl)
3515 ("tk" ,tk)))
3516 (native-inputs
3517 `(("pkg-config" ,pkg-config)
3518 ("texlive" ,texlive)
3519 ("texinfo" ,texinfo)))
3520 (arguments
3521 `(#:phases
3522 (alist-cons-before
3523 'build 'configure-environment
3524 (lambda* (#:key outputs inputs #:allow-other-keys)
3525 (let ((cairo (assoc-ref inputs "cairo"))
3526 (gtk+ (assoc-ref inputs "gtk+")))
3527 ;; Setting these directories in the 'basedirlist' of 'setup.cfg'
3528 ;; has not effect.
3529 (setenv "LD_LIBRARY_PATH"
3530 (string-append cairo "/lib:" gtk+ "/lib"))
3531 (setenv "HOME" (getcwd))
3532 (call-with-output-file "setup.cfg"
3533 (lambda (port)
3534 (format port "[directories]~%
3535 basedirlist = ~a,~a~%
3536 [rc_options]~%
3537 backend = TkAgg~%"
3538 (assoc-ref inputs "tcl")
3539 (assoc-ref inputs "tk"))))))
3540 (alist-cons-after
3541 'install 'install-doc
3542 (lambda* (#:key outputs #:allow-other-keys)
3543 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
3544 (doc (string-append data "/doc/" ,name "-" ,version))
3545 (info (string-append data "/info"))
3546 (html (string-append doc "/html")))
3547 (with-directory-excursion "doc"
3548 ;; Produce pdf in 'A4' format.
3549 (substitute* (find-files "." "conf\\.py")
3550 (("latex_paper_size = 'letter'")
3551 "latex_paper_size = 'a4'"))
3552 (mkdir-p html)
3553 (mkdir-p info)
3554 ;; The doc recommends to run the 'html' target twice.
3555 (system* "python" "make.py" "html")
3556 (system* "python" "make.py" "html")
3557 (copy-recursively "build/html" html)
3558 (system* "python" "make.py" "latex")
3559 (system* "python" "make.py" "texinfo")
3560 (symlink (string-append html "/_images")
3561 (string-append info "/matplotlib-figures"))
3562 (with-directory-excursion "build/texinfo"
3563 (substitute* "matplotlib.texi"
3564 (("@image\\{([^,]*)" all file)
3565 (string-append "@image{matplotlib-figures/" file)))
3566 (symlink (string-append html "/_images")
3567 "./matplotlib-figures")
3568 (system* "makeinfo" "--no-split"
3569 "-o" "matplotlib.info" "matplotlib.texi"))
3570 (copy-file "build/texinfo/matplotlib.info"
3571 (string-append info "/matplotlib.info"))
3572 (copy-file "build/latex/Matplotlib.pdf"
3573 (string-append doc "/Matplotlib.pdf")))))
3574 %standard-phases))))
3575 (home-page "http://matplotlib.org")
3576 (synopsis "2D plotting library for Python")
3577 (description
3578 "Matplotlib is a Python 2D plotting library which produces publication
3579 quality figures in a variety of hardcopy formats and interactive environments
3580 across platforms. Matplotlib can be used in Python scripts, the python and
3581 ipython shell, web application servers, and six graphical user interface
3582 toolkits.")
3583 (license license:psfl)
3584 (properties `((python2-variant . ,(delay python2-matplotlib))))))
3585
3586 (define-public python2-matplotlib
3587 (let ((matplotlib (package-with-python2
3588 (strip-python2-variant python-matplotlib))))
3589 (package (inherit matplotlib)
3590 ;; Make sure to use special packages for Python 2 instead
3591 ;; of those automatically rewritten by package-with-python2.
3592 (propagated-inputs
3593 `(("python2-pycairo" ,python2-pycairo)
3594 ("python2-pygobject-2" ,python2-pygobject-2)
3595 ("python2-tkinter" ,python-2 "tk")
3596 ,@(fold alist-delete (package-propagated-inputs matplotlib)
3597 '("python-pycairo" "python-pygobject" "python-tkinter")))))))
3598
3599 (define-public python2-pysnptools
3600 (package
3601 (name "python2-pysnptools")
3602 (version "0.3.9")
3603 (source
3604 (origin
3605 (method url-fetch)
3606 (uri (pypi-uri "pysnptools" version ".zip"))
3607 (sha256
3608 (base32
3609 "1wybggjzz8zw7aav4pjsg2h22xp17a1lghrprza1pxwlm7wf96y2"))))
3610 (build-system python-build-system)
3611 (arguments
3612 `(#:python ,python-2)) ; only Python 2.7 is supported
3613 (propagated-inputs
3614 `(("python2-numpy" ,python2-numpy)
3615 ("python2-scipy" ,python2-scipy)
3616 ("python2-pytz" ,python2-pytz)
3617 ("python2-cython" ,python2-cython)))
3618 (inputs
3619 `(("python2-dateutil-2" ,python2-dateutil-2)
3620 ("python2-pandas" ,python2-pandas)
3621 ("python2-six" ,python2-six)))
3622 (native-inputs
3623 `(("unzip" ,unzip)
3624 ("python2-setuptools" ,python2-setuptools)))
3625 (home-page "http://research.microsoft.com/en-us/um/redmond/projects/mscompbio/")
3626 (synopsis "Library for reading and manipulating genetic data")
3627 (description
3628 "PySnpTools is a library for reading and manipulating genetic data. It
3629 can, for example, efficiently read whole PLINK *.bed/bim/fam files or parts of
3630 those files. It can also efficiently manipulate ranges of integers using set
3631 operators such as union, intersection, and difference.")
3632 (license license:asl2.0)))
3633
3634 (define-public python-rpy2
3635 (package
3636 (name "python-rpy2")
3637 (version "2.7.6")
3638 (source
3639 (origin
3640 (method url-fetch)
3641 (uri (pypi-uri "rpy2" version))
3642 (sha256
3643 (base32
3644 "0nhan2qvrw7b7gg5zddwa22kybdv3x1g26vkd7q8lvnkgzrs4dga"))))
3645 (build-system python-build-system)
3646 (inputs
3647 `(("python-six" ,python-six)
3648 ("readline" ,readline)
3649 ("icu4c" ,icu4c)
3650 ("pcre" ,pcre)
3651 ("r" ,r)))
3652 (native-inputs
3653 `(("python-setuptools" ,python-setuptools)
3654 ("zlib" ,zlib)))
3655 (home-page "http://rpy.sourceforge.net/")
3656 (synopsis "Python interface to the R language")
3657 (description "rpy2 is a redesign and rewrite of rpy. It is providing a
3658 low-level interface to R from Python, a proposed high-level interface,
3659 including wrappers to graphical libraries, as well as R-like structures and
3660 functions.")
3661 (license license:gpl3+)))
3662
3663 (define-public python2-rpy2
3664 (let ((rpy2 (package-with-python2 python-rpy2)))
3665 (package (inherit rpy2)
3666 (native-inputs
3667 `(("python2-singledispatch" ,python2-singledispatch)
3668 ,@(package-native-inputs rpy2))))))
3669
3670 (define-public python-scipy
3671 (package
3672 (name "python-scipy")
3673 (version "0.16.0")
3674 (source
3675 (origin
3676 (method url-fetch)
3677 ; http://downloads.sourceforge.net/project/scipy/scipy/0.16.1/scipy-0.16.1.tar.gz
3678 (uri (string-append "mirror://sourceforge/scipy/scipy/" version
3679 "/scipy-" version ".tar.xz"))
3680 (sha256
3681 (base32
3682 "0wa0a4skpda3gx7lb12yn19nhbairlyxrvda2lz2bcawk3x5qzz2"))))
3683 (build-system python-build-system)
3684 (propagated-inputs
3685 `(("python-numpy" ,python-numpy)
3686 ("python-matplotlib" ,python-matplotlib)
3687 ("python-pyparsing" ,python-pyparsing)))
3688 (inputs
3689 `(("lapack" ,lapack)
3690 ("openblas" ,openblas)))
3691 (native-inputs
3692 `(("python-nose" ,python-nose)
3693 ("python-sphinx" ,python-sphinx)
3694 ("python-numpydoc" ,python-numpydoc)
3695 ("gfortran" ,gfortran)
3696 ("texlive" ,texlive)
3697 ("perl" ,perl)))
3698 (outputs '("out" "doc"))
3699 (arguments
3700 `(#:phases
3701 (alist-cons-before
3702 'build 'configure-openblas
3703 (lambda* (#:key inputs #:allow-other-keys)
3704 (call-with-output-file "site.cfg"
3705 (lambda (port)
3706 (format port
3707 "[blas]
3708 libraries = openblas
3709 library_dirs = ~a/lib
3710 include_dirs = ~a/include
3711 [atlas]
3712 library_dirs = ~a/lib
3713 atlas_libs = openblas
3714 "
3715 (assoc-ref inputs "openblas")
3716 (assoc-ref inputs "openblas")
3717 (assoc-ref inputs "openblas"))))
3718 #t)
3719 (alist-cons-after
3720 'install 'install-doc
3721 (lambda* (#:key outputs #:allow-other-keys)
3722 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
3723 (doc (string-append data "/doc/" ,name "-" ,version))
3724 (html (string-append doc "/html"))
3725 (pyver ,(string-append "PYVER=")))
3726 (with-directory-excursion "doc"
3727 ;; Fix generation of images for mathematical expressions.
3728 (substitute* (find-files "source" "conf\\.py")
3729 (("pngmath_use_preview = True")
3730 "pngmath_use_preview = False"))
3731 (mkdir-p html)
3732 (system* "make" "html" pyver)
3733 (system* "make" "latex" "PAPER=a4" pyver)
3734 (system* "make" "-C" "build/latex" "all-pdf" "PAPER=a4" pyver)
3735 (copy-file "build/latex/scipy-ref.pdf"
3736 (string-append doc "/scipy-ref.pdf"))
3737 (with-directory-excursion "build/html"
3738 (for-each (lambda (file)
3739 (let* ((dir (dirname file))
3740 (tgt-dir (string-append html "/" dir)))
3741 (install-file file html)))
3742 (find-files "." ".*"))))))
3743 ;; Tests can only be run after the library has been installed and not
3744 ;; within the source directory.
3745 (alist-cons-after
3746 'install 'check
3747 (lambda _
3748 (with-directory-excursion "/tmp"
3749 (zero? (system* "python" "-c" "import scipy; scipy.test()"))))
3750 (alist-delete
3751 'check
3752 (alist-cons-after
3753 'unpack 'fix-tests
3754 (lambda _
3755 (substitute* "scipy/integrate/tests/test_quadpack.py"
3756 (("libm.so") "libm.so.6"))
3757 #t)
3758 %standard-phases)))))))
3759 (home-page "http://www.scipy.org/")
3760 (synopsis "The Scipy library provides efficient numerical routines")
3761 (description "The SciPy library is one of the core packages that make up
3762 the SciPy stack. It provides many user-friendly and efficient numerical
3763 routines such as routines for numerical integration and optimization.")
3764 (license license:bsd-3)))
3765
3766 (define-public python2-scipy
3767 (package-with-python2 python-scipy))
3768
3769 (define-public python-socksipy-branch
3770 (package
3771 (name "python-socksipy-branch")
3772 (version "1.01")
3773 (source
3774 (origin
3775 (method url-fetch)
3776 (uri (pypi-uri "SocksiPy-branch" version))
3777 (sha256
3778 (base32
3779 "01l41v4g7fy9fzvinmjxy6zcbhgqaif8dhdqm4w90fwcw9h51a8p"))))
3780 (build-system python-build-system)
3781 (arguments
3782 `(#:tests? #f)) ; There are no tests
3783 (home-page "https://code.google.com/archive/p/socksipy-branch/")
3784 (synopsis "Python SOCKS module")
3785 (description
3786 "SocksiPy - A Python SOCKS client module. It provides a
3787 socket-like interface that supports connections to any TCP
3788 service through the use of a SOCKS4, SOCKS5 or HTTP proxy.
3789 The original version was developed by Dan Haim, this is a
3790 branch created by Mario Vilas to address some open issues,
3791 as the original project seems to have been abandoned circa 2007.")
3792 (license license:bsd-3)))
3793
3794 (define-public python2-socksipy-branch
3795 (package-with-python2 python-socksipy-branch))
3796
3797 (define-public python-sqlalchemy
3798 (package
3799 (name "python-sqlalchemy")
3800 (version "1.0.12")
3801 (source
3802 (origin
3803 (method url-fetch)
3804 (uri (string-append "https://pypi.python.org/packages/source/S/"
3805 "SQLAlchemy/SQLAlchemy-" version ".tar.gz"))
3806 (sha256
3807 (base32
3808 "1l8qclhd0s90w3pvwhi5mjxdwr5j7gw7cjka2fx6f2vqmq7f4yb6"))))
3809 (build-system python-build-system)
3810 (native-inputs
3811 `(("python-cython" ,python-cython) ;for c extensions
3812 ("python-pytest" ,python-pytest)
3813 ("python-mock" ,python-mock))) ;for tests
3814 (arguments
3815 `(#:phases (alist-replace
3816 'check
3817 (lambda _ (zero? (system* "py.test")))
3818 %standard-phases)))
3819 (home-page "http://www.sqlalchemy.org")
3820 (synopsis "Database abstraction library")
3821 (description
3822 "SQLAlchemy is the Python SQL toolkit and Object Relational Mapper that
3823 gives application developers the full power and flexibility of SQL. It
3824 provides a full suite of well known enterprise-level persistence patterns,
3825 designed for efficient and high-performing database access, adapted into a
3826 simple and Pythonic domain language.")
3827 (license license:x11)))
3828
3829 (define-public python2-sqlalchemy
3830 (package-with-python2 python-sqlalchemy))
3831
3832 (define-public python-sqlalchemy-utils
3833 (package
3834 (name "python-sqlalchemy-utils")
3835 (version "0.32.9")
3836 (source
3837 (origin
3838 (method url-fetch)
3839 (uri (pypi-uri "SQLAlchemy-Utils" version))
3840 (sha256
3841 (base32
3842 "1zbmmh7n8m01ikizn2mj1mfwch26nsr1awv9mvskqry7av0mpy98"))))
3843 (build-system python-build-system)
3844 (inputs
3845 `(("python-six" ,python-six)
3846 ("python-sqlalchemy" ,python-sqlalchemy)))
3847 (home-page "https://github.com/kvesteri/sqlalchemy-utils")
3848 (synopsis "Various utility functions for SQLAlchemy")
3849 (description
3850 "SQLAlchemy-utils provides various utility functions and custom data types
3851 for SQLAlchemy. SQLAlchemy is an SQL database abstraction library for Python.")
3852 (properties `((python2-variant . ,(delay python2-sqlalchemy-utils))))
3853 (license license:bsd-3)))
3854
3855 (define-public python2-sqlalchemy-utils
3856 (let ((base (package-with-python2
3857 (strip-python2-variant python-sqlalchemy-utils))))
3858 (package (inherit base)
3859 (native-inputs
3860 `(("python2-setuptools" ,python2-setuptools)
3861 ,@(package-native-inputs base))))))
3862
3863 (define-public python-alembic
3864 (package
3865 (name "python-alembic")
3866 (version "0.8.7")
3867 (source
3868 (origin
3869 (method url-fetch)
3870 (uri (pypi-uri "alembic" version))
3871 (sha256
3872 (base32
3873 "0ias6fdzwr2s220fnjspkdgm9510bd0cnap0hx5y4zy4srba9f3z"))))
3874 (build-system python-build-system)
3875 (native-inputs
3876 `(("python-mock" ,python-mock)
3877 ("python-pytest-cov" ,python-pytest-cov)))
3878 (propagated-inputs
3879 `(("python-sqlalchemy" ,python-sqlalchemy)
3880 ("python-mako" ,python-mako)
3881 ("python-editor" ,python-editor)))
3882 (home-page "http://bitbucket.org/zzzeek/alembic")
3883 (synopsis
3884 "Database migration tool for SQLAlchemy")
3885 (description
3886 "Alembic is a lightweight database migration tool for usage with the
3887 SQLAlchemy Database Toolkit for Python.")
3888 (license license:expat)
3889 (properties `((python2-variant . ,(delay python2-alembic))))))
3890
3891 (define-public python2-alembic
3892 (let ((alembic (package-with-python2
3893 (strip-python2-variant python-alembic))))
3894 (package
3895 (inherit alembic)
3896 (native-inputs `(("python2-setuptools" ,python2-setuptools)
3897 ,@(package-native-inputs alembic))))))
3898
3899 (define-public python-distutils-extra
3900 (package
3901 (name "python-distutils-extra")
3902 (version "2.38")
3903 (source
3904 (origin
3905 (method url-fetch)
3906 (uri (string-append "https://launchpad.net/python-distutils-extra/trunk/"
3907 version "/+download/python-distutils-extra-"
3908 version ".tar.gz"))
3909 (sha256
3910 (base32
3911 "0lx15kcbby9zisx33p2h5hgakgwh2bvh0ibag8z0px4j6ifhs41x"))))
3912 (build-system python-build-system)
3913 (native-inputs
3914 `(("python-setuptools" ,python-setuptools)))
3915 (home-page "https://launchpad.net/python-distutils-extra/")
3916 (synopsis "Enhancements to Python's distutils")
3917 (description
3918 "The python-distutils-extra module enables you to easily integrate
3919 gettext support, themed icons, and scrollkeeper-based documentation into
3920 Python's distutils.")
3921 (license license:gpl2)))
3922
3923 (define-public python2-distutils-extra
3924 (package-with-python2 python-distutils-extra))
3925
3926 (define-public python2-elib.intl
3927 (package
3928 (name "python2-elib.intl")
3929 (version "0.0.3")
3930 (source
3931 (origin
3932 ;; This project doesn't tag releases or publish tarballs, so we take
3933 ;; source from a (semi-arbitrary, i.e. latest as of now) git commit.
3934 (method git-fetch)
3935 (uri (git-reference
3936 (url "https://github.com/dieterv/elib.intl.git")
3937 (commit "d09997cfef")))
3938 (sha256
3939 (base32
3940 "0y7vzff9xgbnaay7m0va1arl6g68ncwrvbgwl7jqlclsahzzb09d"))))
3941 (build-system python-build-system)
3942 (native-inputs
3943 `(("python2-setuptools" ,python2-setuptools)))
3944 (arguments
3945 ;; incompatible with Python 3 (exception syntax)
3946 `(#:python ,python-2
3947 #:tests? #f
3948 ;; With standard flags, the install phase attempts to create a zip'd
3949 ;; egg file, and fails with an error: 'ZIP does not support timestamps
3950 ;; before 1980'
3951 #:configure-flags '("--single-version-externally-managed"
3952 "--record=elib.txt")))
3953 (home-page "https://github.com/dieterv/elib.intl")
3954 (synopsis "Enhanced internationalization for Python")
3955 (description
3956 "The elib.intl module provides enhanced internationalization (I18N)
3957 services for your Python modules and applications.")
3958 (license license:lgpl3+)))
3959
3960 (define-public python-pillow
3961 (package
3962 (name "python-pillow")
3963 (version "3.3.1")
3964 (source
3965 (origin
3966 (method url-fetch)
3967 (uri (pypi-uri "Pillow" version))
3968 (sha256
3969 (base32
3970 "1w9x3dfrg8b5lqhpjl0fczfyf9842wbqwgxbjjq4vfpxv5jwm49l"))))
3971 (build-system python-build-system)
3972 (native-inputs
3973 `(("python-setuptools" ,python-setuptools)
3974 ("python-nose" ,python-nose)))
3975 (inputs
3976 `(("freetype" ,freetype)
3977 ("lcms" ,lcms)
3978 ("zlib" ,zlib)
3979 ("libjpeg" ,libjpeg)
3980 ("openjpeg" ,openjpeg)
3981 ("libtiff" ,libtiff)
3982 ("libwebp" ,libwebp)))
3983 (propagated-inputs
3984 `(;; Used at runtime for pkg_resources
3985 ("python-setuptools" ,python-setuptools)))
3986 (arguments
3987 `(#:phases (modify-phases %standard-phases
3988 (add-before
3989 'install 'disable-egg-compression
3990 (lambda _
3991 ;; Leave the .egg uncompressed since compressing it would
3992 ;; prevent the GC from identifying run-time dependencies.
3993 ;; See <http://bugs.gnu.org/20765>.
3994 (let ((port (open-file "setup.cfg" "a")))
3995 (display "\n[easy_install]\nzip_ok = 0\n"
3996 port)
3997 (close-port port)
3998 #t)))
3999 (add-after
4000 'install 'check-installed
4001 (lambda _
4002 (begin
4003 (setenv "HOME" (getcwd))
4004 (and (zero? (system* "python" "selftest.py"
4005 "--installed"))
4006 (zero? (system* "python" "test-installed.py"))))))
4007 (delete 'check))))
4008 (home-page "https://pypi.python.org/pypi/Pillow")
4009 (synopsis "Fork of the Python Imaging Library")
4010 (description
4011 "The Python Imaging Library adds image processing capabilities to your
4012 Python interpreter. This library provides extensive file format support, an
4013 efficient internal representation, and fairly powerful image processing
4014 capabilities. The core image library is designed for fast access to data
4015 stored in a few basic pixel formats. It should provide a solid foundation for
4016 a general image processing tool.")
4017 (license (license:x11-style
4018 "http://www.pythonware.com/products/pil/license.htm"
4019 "The PIL Software License"))))
4020
4021 (define-public python2-pillow
4022 (package-with-python2 python-pillow))
4023
4024 (define-public python-pycparser
4025 (package
4026 (name "python-pycparser")
4027 (version "2.14")
4028 (source
4029 (origin
4030 (method url-fetch)
4031 (uri (pypi-uri "pycparser" version))
4032 (sha256
4033 (base32
4034 "0wvzyb6rxsfj3xcnpa4ynbh9qc7rrbk2277d5wqpphmx9akv8nbr"))))
4035 (outputs '("out" "doc"))
4036 (build-system python-build-system)
4037 (native-inputs
4038 `(("pkg-config" ,pkg-config)
4039 ("python-setuptools" ,python-setuptools)))
4040 (arguments
4041 `(#:phases
4042 (alist-replace
4043 'check
4044 (lambda _
4045 (with-directory-excursion "tests"
4046 (zero? (system* "python" "all_tests.py"))))
4047 (alist-cons-after
4048 'install 'install-doc
4049 (lambda* (#:key outputs #:allow-other-keys)
4050 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4051 (doc (string-append data "/doc/" ,name "-" ,version))
4052 (examples (string-append doc "/examples")))
4053 (mkdir-p examples)
4054 (for-each (lambda (file)
4055 (copy-file (string-append "." file)
4056 (string-append doc file)))
4057 '("/README.rst" "/CHANGES" "/LICENSE"))
4058 (copy-recursively "examples" examples)))
4059 %standard-phases))))
4060 (home-page "https://github.com/eliben/pycparser")
4061 (synopsis "C parser in Python")
4062 (description
4063 "Pycparser is a complete parser of the C language, written in pure Python
4064 using the PLY parsing library. It parses C code into an AST and can serve as
4065 a front-end for C compilers or analysis tools.")
4066 (license license:bsd-3)))
4067
4068 (define-public python2-pycparser
4069 (package-with-python2 python-pycparser))
4070
4071 (define-public python-cffi
4072 (package
4073 (name "python-cffi")
4074 (version "1.4.2")
4075 (source
4076 (origin
4077 (method url-fetch)
4078 (uri (pypi-uri "cffi" version))
4079 (sha256
4080 (base32 "161rj52rzi3880lij17d6i9kvgkiwjilrqjs8405k8sf6ryif7cg"))))
4081 (build-system python-build-system)
4082 (outputs '("out" "doc"))
4083 (inputs
4084 `(("libffi" ,libffi)))
4085 (propagated-inputs ; required at run-time
4086 `(("python-pycparser" ,python-pycparser)))
4087 (native-inputs
4088 `(("pkg-config" ,pkg-config)
4089 ("python-sphinx" ,python-sphinx)
4090 ("python-pytest" ,python-pytest)
4091 ("python-setuptools" ,python-setuptools)))
4092 (arguments
4093 `(#:phases
4094 (alist-cons-after
4095 'install 'install-doc
4096 (lambda* (#:key outputs #:allow-other-keys)
4097 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4098 (doc (string-append data "/doc/" ,name "-" ,version))
4099 (html (string-append doc "/html")))
4100 (with-directory-excursion "doc"
4101 (system* "make" "html")
4102 (mkdir-p html)
4103 (copy-recursively "build/html" html))
4104 (copy-file "LICENSE" (string-append doc "/LICENSE"))))
4105 %standard-phases)))
4106 (home-page "http://cffi.readthedocs.org")
4107 (synopsis "Foreign function interface for Python")
4108 (description
4109 "Foreign Function Interface for Python calling C code.")
4110 (license license:expat)))
4111
4112 (define-public python2-cffi
4113 (package-with-python2 python-cffi))
4114
4115 (define-public python-xcffib
4116 (package
4117 (name "python-xcffib")
4118 (version "0.1.9")
4119 (source
4120 (origin
4121 (method url-fetch)
4122 (uri (string-append "https://pypi.python.org/packages/source/x/"
4123 "xcffib/xcffib-" version ".tar.gz"))
4124 (sha256
4125 (base32
4126 "0655hzxv57h1a9ja9kwp0ichbkhf3djw32k33d66xp0q37dq2y81"))))
4127 (build-system python-build-system)
4128 (inputs
4129 `(("libxcb" ,libxcb)
4130 ("python-six" ,python-six)))
4131 (native-inputs
4132 `(("python-setuptools" ,python-setuptools)))
4133 (propagated-inputs
4134 `(("python-cffi" ,python-cffi))) ; used at run time
4135 (arguments
4136 `(#:phases
4137 (alist-cons-after
4138 'install 'install-doc
4139 (lambda* (#:key outputs #:allow-other-keys)
4140 (let ((doc (string-append (assoc-ref outputs "out") "/share"
4141 "/doc/" ,name "-" ,version)))
4142 (mkdir-p doc)
4143 (copy-file "README.md"
4144 (string-append doc "/README.md"))))
4145 %standard-phases)))
4146 (home-page "https://github.com/tych0/xcffib")
4147 (synopsis "XCB Python bindings")
4148 (description
4149 "Xcffib is a replacement for xpyb, an XCB Python bindings. It adds
4150 support for Python 3 and PyPy. It is based on cffi.")
4151 (license license:expat)))
4152
4153 (define-public python2-xcffib
4154 (package-with-python2 python-xcffib))
4155
4156 (define-public python-cairocffi
4157 (package
4158 (name "python-cairocffi")
4159 (version "0.6")
4160 (source
4161 (origin
4162 (method url-fetch)
4163 ;; The archive on pypi is missing the 'utils' directory!
4164 (uri (string-append "https://github.com/SimonSapin/cairocffi/archive/v"
4165 version ".tar.gz"))
4166 (file-name (string-append name "-" version ".tar.gz"))
4167 (sha256
4168 (base32
4169 "03w5p62sp3nqiccx864sbq0jvh7946277jqx3rcc3dch5xwfvv51"))))
4170 (build-system python-build-system)
4171 (outputs '("out" "doc"))
4172 (inputs
4173 `(("gdk-pixbuf" ,gdk-pixbuf)
4174 ("cairo" ,cairo)))
4175 (native-inputs
4176 `(("pkg-config" ,pkg-config)
4177 ("python-sphinx" ,python-sphinx)
4178 ("python-docutils" ,python-docutils)
4179 ("python-setuptools" ,python-setuptools)))
4180 (propagated-inputs
4181 `(("python-xcffib" ,python-xcffib))) ; used at run time
4182 (arguments
4183 `(#:phases
4184 (alist-cons-after
4185 'install 'install-doc
4186 (lambda* (#:key inputs outputs #:allow-other-keys)
4187 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4188 (doc (string-append data "/doc/" ,name "-" ,version))
4189 (html (string-append doc "/html")))
4190 (setenv "LD_LIBRARY_PATH"
4191 (string-append (assoc-ref inputs "cairo") "/lib" ":"
4192 (assoc-ref inputs "gdk-pixbuf") "/lib"))
4193 (setenv "LANG" "en_US.UTF-8")
4194 (mkdir-p html)
4195 (for-each (lambda (file)
4196 (copy-file (string-append "." file)
4197 (string-append doc file)))
4198 '("/README.rst" "/CHANGES" "/LICENSE"))
4199 (system* "python" "setup.py" "build_sphinx")
4200 (copy-recursively "docs/_build/html" html)))
4201 %standard-phases)))
4202 (home-page "https://github.com/SimonSapin/cairocffi")
4203 (synopsis "Python bindings and object-oriented API for Cairo")
4204 (description
4205 "Cairocffi is a CFFI-based drop-in replacement for Pycairo, a set of
4206 Python bindings and object-oriented API for cairo. Cairo is a 2D vector
4207 graphics library with support for multiple backends including image buffers,
4208 PNG, PostScript, PDF, and SVG file output.")
4209 (license license:bsd-3)))
4210
4211 (define-public python2-cairocffi
4212 (package-with-python2 python-cairocffi))
4213
4214 (define-public python-decorator
4215 (package
4216 (name "python-decorator")
4217 (version "4.0.9")
4218 (source
4219 (origin
4220 (method url-fetch)
4221 (uri (pypi-uri "decorator" version))
4222 (sha256
4223 (base32 "1a5vwhflfd9sh3rfb40xlyipldgdzfff6brman57hqv3661jw0lh"))))
4224 (build-system python-build-system)
4225 (arguments '(#:tests? #f)) ; no test target
4226 (native-inputs
4227 `(("python-setuptools" ,python-setuptools)))
4228 (home-page "https://pypi.python.org/pypi/decorator/")
4229 (synopsis "Python module to simplify usage of decorators")
4230 (description
4231 "The aim of the decorator module is to simplify the usage of decorators
4232 for the average programmer, and to popularize decorators usage giving examples
4233 of useful decorators, such as memoize, tracing, redirecting_stdout, locked,
4234 etc. The core of this module is a decorator factory.")
4235 (license license:expat)))
4236
4237 (define-public python2-decorator
4238 (package-with-python2 python-decorator))
4239
4240 (define-public python-drmaa
4241 (package
4242 (name "python-drmaa")
4243 (version "0.7.6")
4244 (source
4245 (origin
4246 (method url-fetch)
4247 (uri (string-append
4248 "https://pypi.python.org/packages/source/d/drmaa/drmaa-"
4249 version ".tar.gz"))
4250 (sha256
4251 (base32 "0bzl9f9g34dlhwf09i3fdv7dqqzf2iq0w7d6c2bafx1nlap8qfbh"))))
4252 (build-system python-build-system)
4253 ;; The test suite requires libdrmaa which is provided by the cluster
4254 ;; environment. At runtime the environment variable DRMAA_LIBRARY_PATH
4255 ;; should be set to the path of the libdrmaa library.
4256 (arguments '(#:tests? #f))
4257 (native-inputs
4258 `(("python-nose" ,python-nose)
4259 ("python-setuptools" ,python-setuptools)))
4260 (home-page "https://pypi.python.org/pypi/drmaa")
4261 (synopsis "Python bindings for the DRMAA library")
4262 (description
4263 "A Python package for Distributed Resource Management (DRM) job
4264 submission and control. This package is an implementation of the DRMAA 1.0
4265 Python language binding specification.")
4266 (license license:bsd-3)))
4267
4268 (define-public python2-drmaa
4269 (package-with-python2 python-drmaa))
4270
4271 (define-public python-gridmap
4272 (package
4273 (name "python-gridmap")
4274 (version "0.13.0")
4275 (source
4276 (origin
4277 (method url-fetch)
4278 (uri (string-append
4279 "https://github.com/pygridtools/gridmap/archive/v"
4280 version ".tar.gz"))
4281 (file-name (string-append name "-" version ".tar.gz"))
4282 (sha256
4283 (base32 "1gzjg2k6f14i1msm2b0ax8d9ds1hvk6qd5nlaivg8m4cxqp4cp1x"))))
4284 (build-system python-build-system)
4285 (inputs
4286 `(("python-psutil" ,python-psutil)
4287 ("python-drmaa" ,python-drmaa)
4288 ("python-pyzmq" ,python-pyzmq)))
4289 (native-inputs
4290 `(("python-setuptools" ,python-setuptools)))
4291 (home-page "https://github.com/pygridtools/gridmap")
4292 (synopsis "Create jobs on a cluster directly from Python")
4293 (description
4294 "Gridmap is a Python package to allow you to easily create jobs on the
4295 cluster directly from Python. You can directly map Python functions onto the
4296 cluster without needing to write any wrapper code yourself.")
4297 (license license:gpl3+)))
4298
4299 (define-public python2-gridmap
4300 (package-with-python2 python-gridmap))
4301
4302 (define-public python-pexpect
4303 (package
4304 (name "python-pexpect")
4305 (version "3.3")
4306 (source
4307 (origin
4308 (method url-fetch)
4309 (uri (string-append "https://pypi.python.org/packages/source/p/"
4310 "pexpect/pexpect-" version ".tar.gz"))
4311 (sha256
4312 (base32 "1fp5gm976z7ghm8jw57463rj19cv06c8zw842prgyg788f6n3snz"))))
4313 (build-system python-build-system)
4314 (arguments
4315 `(#:phases
4316 (modify-phases %standard-phases
4317 (replace 'check (lambda _ (zero? (system* "nosetests")))))))
4318 (native-inputs
4319 `(("python-nose" ,python-nose)))
4320 (home-page "http://pexpect.readthedocs.org/")
4321 (synopsis "Controlling interactive console applications")
4322 (description
4323 "Pexpect is a pure Python module for spawning child applications;
4324 controlling them; and responding to expected patterns in their output.
4325 Pexpect works like Don Libes’ Expect. Pexpect allows your script to spawn a
4326 child application and control it as if a human were typing commands.")
4327 (license license:isc)))
4328
4329 (define-public python2-pexpect
4330 (package-with-python2 python-pexpect))
4331
4332 (define-public python-setuptools-scm
4333 (package
4334 (name "python-setuptools-scm")
4335 (version "1.11.1")
4336 (source (origin
4337 (method url-fetch)
4338 (uri (pypi-uri "setuptools_scm" version))
4339 (sha256
4340 (base32
4341 "1gqr73i150yzj3mz32854vj93x07yr52kn8fdckwa41ll8wgficc"))))
4342 (build-system python-build-system)
4343 (native-inputs `(("python-setuptools" ,python-setuptools)))
4344 (home-page "https://github.com/pypa/setuptools_scm/")
4345 (synopsis "Manage Python package versions in SCM metadata")
4346 (description
4347 "Setuptools_scm handles managing your Python package versions in
4348 @dfn{software configuration management} (SCM) metadata instead of declaring
4349 them as the version argument or in a SCM managed file.")
4350 (license license:expat)))
4351
4352 (define-public python2-setuptools-scm
4353 (package-with-python2 python-setuptools-scm))
4354
4355 (define-public python-pathpy
4356 (package
4357 (name "python-pathpy")
4358 (version "8.1.1")
4359 (source
4360 (origin
4361 (method url-fetch)
4362 (uri (string-append "https://pypi.python.org/packages/source/p/"
4363 "path.py/path.py-" version ".tar.gz"))
4364 (sha256
4365 (base32 "1p8s1l2vfkqhqxdhqlj0g1jjw4f1as2frr35sjcpjjpd5a89y41f"))))
4366 (build-system python-build-system)
4367 (propagated-inputs
4368 `(("python-appdirs" ,python-appdirs)))
4369 (native-inputs
4370 `(("python-setuptools" ,python-setuptools)
4371 ("python-setuptools-scm" ,python-setuptools-scm)
4372 ("python-pytest" ,python-pytest)
4373 ("python-pytest-runner" ,python-pytest-runner)))
4374 (home-page "http://github.com/jaraco/path.py")
4375 (synopsis "Python module wrapper for built-in os.path")
4376 (description
4377 "@code{path.py} implements path objects as first-class entities, allowing
4378 common operations on files to be invoked on those path objects directly.")
4379 (license license:expat)))
4380
4381 (define-public python2-pathpy
4382 (package-with-python2 python-pathpy))
4383
4384 (define-public python-pickleshare
4385 (package
4386 (name "python-pickleshare")
4387 (version "0.5")
4388 (source
4389 (origin
4390 (method url-fetch)
4391 (uri (string-append "https://pypi.python.org/packages/source/p/"
4392 "pickleshare/pickleshare-" version ".tar.gz"))
4393 (sha256
4394 (base32 "11ljr90j3p6qswdrbl7p4cjb2i93f6vn0vx9anzpshsx0d2mggn0"))))
4395 (build-system python-build-system)
4396 (propagated-inputs
4397 `(("python-pathpy" ,python-pathpy)))
4398 (native-inputs
4399 `(("python-setuptools" ,python-setuptools)))
4400 (home-page "https://github.com/vivainio/pickleshare")
4401 (synopsis "Tiny key value database with concurrency support")
4402 (description
4403 "PickleShare is a small ‘shelve’-like datastore with concurrency support.
4404 Like shelve, a PickleShareDB object acts like a normal dictionary. Unlike
4405 shelve, many processes can access the database simultaneously. Changing a
4406 value in database is immediately visible to other processes accessing the same
4407 database. Concurrency is possible because the values are stored in separate
4408 files. Hence the “database” is a directory where all files are governed by
4409 PickleShare.")
4410 (license license:expat)))
4411
4412 (define-public python2-pickleshare
4413 (package-with-python2 python-pickleshare))
4414
4415 (define-public python-simplegeneric
4416 (package
4417 (name "python-simplegeneric")
4418 (version "0.8.1")
4419 (source
4420 (origin
4421 (method url-fetch)
4422 (uri (string-append "https://pypi.python.org/packages/source/s/"
4423 "simplegeneric/simplegeneric-" version ".zip"))
4424 (sha256
4425 (base32 "0wwi1c6md4vkbcsfsf8dklf3vr4mcdj4mpxkanwgb6jb1432x5yw"))))
4426 (build-system python-build-system)
4427 (native-inputs
4428 `(("python-setuptools" ,python-setuptools)
4429 ("unzip" ,unzip)))
4430 (home-page "http://cheeseshop.python.org/pypi/simplegeneric")
4431 (synopsis "Python module for simple generic functions")
4432 (description
4433 "The simplegeneric module lets you define simple single-dispatch generic
4434 functions, akin to Python’s built-in generic functions like @code{len()},
4435 @code{iter()} and so on. However, instead of using specially-named methods,
4436 these generic functions use simple lookup tables, akin to those used by
4437 e.g. @code{pickle.dump()} and other generic functions found in the Python
4438 standard library.")
4439 (license license:zpl2.1)))
4440
4441 (define-public python2-simplegeneric
4442 (package-with-python2 python-simplegeneric))
4443
4444 (define-public python-ipython-genutils
4445 (package
4446 (name "python-ipython-genutils")
4447 (version "0.1.0")
4448 (source
4449 (origin
4450 (method url-fetch)
4451 (uri (string-append "https://pypi.python.org/packages/source/i/"
4452 "ipython_genutils/ipython_genutils-"
4453 version ".tar.gz"))
4454 (sha256
4455 (base32 "19l2pp1c64ansr89l3cqh19jdi2ixhssdzx0vz4n6r52a6i281is"))))
4456 (build-system python-build-system)
4457 (arguments `(#:tests? #f)) ; no tests
4458 (home-page "http://ipython.org")
4459 (synopsis "Vestigial utilities from IPython")
4460 (description
4461 "This package provides retired utilities from IPython.")
4462 (license license:bsd-3)))
4463
4464 (define-public python2-ipython-genutils
4465 (package-with-python2 python-ipython-genutils))
4466
4467 (define-public python-traitlets
4468 (package
4469 (name "python-traitlets")
4470 (version "4.2.0")
4471 (source
4472 (origin
4473 (method url-fetch)
4474 (uri (pypi-uri "traitlets" version))
4475 (sha256
4476 (base32
4477 "1afy08sa5n9gnkvh3da49c16zkyv598vchv0p1hp7zzjy8895hz4"))))
4478 (build-system python-build-system)
4479 (arguments
4480 `(#:phases
4481 (modify-phases %standard-phases
4482 (replace 'check (lambda _ (zero? (system* "nosetests")))))))
4483 (propagated-inputs
4484 `(("python-ipython-genutils" ,python-ipython-genutils)
4485 ("python-decorator" ,python-decorator)))
4486 (native-inputs
4487 `(("python-mock" ,python-mock)
4488 ("python-nose" ,python-nose)))
4489 (home-page "http://ipython.org")
4490 (synopsis "Configuration system for Python applications")
4491 (description
4492 "Traitlets is a framework that lets Python classes have attributes with
4493 type checking, dynamically calculated default values, and ‘on change’
4494 callbacks. The package also includes a mechanism to use traitlets for
4495 configuration, loading values from files or from command line arguments. This
4496 is a distinct layer on top of traitlets, so you can use traitlets in your code
4497 without using the configuration machinery.")
4498 (license license:bsd-3)))
4499
4500 (define-public python2-traitlets
4501 (package-with-python2 python-traitlets))
4502
4503 (define-public python-jupyter-core
4504 (package
4505 (name "python-jupyter-core")
4506 (version "4.2.0")
4507 (source
4508 (origin
4509 (method url-fetch)
4510 (uri (string-append (pypi-uri "jupyter_core" version)))
4511 (sha256
4512 (base32
4513 "177d9csqldzhsh6xs1p4nf6lzvhzyg6gklqjf69lxgxyadx87v24"))))
4514 (build-system python-build-system)
4515 ;; FIXME: not sure how to run the tests
4516 (arguments `(#:tests? #f))
4517 (propagated-inputs
4518 `(("python-traitlets" ,python-traitlets)))
4519 (home-page "http://jupyter.org/")
4520 (synopsis "Jupyter base package")
4521 (description
4522 "Jupyter core is the base package on which Jupyter projects rely.")
4523 (license license:bsd-3)))
4524
4525 (define-public python2-jupyter-core
4526 (package-with-python2 python-jupyter-core))
4527
4528 (define-public python-jupyter-client
4529 (package
4530 (name "python-jupyter-client")
4531 (version "4.4.0")
4532 (source
4533 (origin
4534 (method url-fetch)
4535 (uri (pypi-uri "jupyter_client" version))
4536 (sha256
4537 (base32
4538 "1vjjrpjw7k5sh982pbjnslv7byfbfazjw9g92jvs7dz5qbx556n9"))))
4539 (build-system python-build-system)
4540 ;; Tests fail because of missing native python kernel which I assume is
4541 ;; provided by the ipython package, which we cannot use because it would
4542 ;; cause a dependency cycle.
4543 (arguments `(#:tests? #f))
4544 (propagated-inputs
4545 `(("python-pyzmq" ,python-pyzmq)
4546 ("python-traitlets" ,python-traitlets)
4547 ("python-jupyter-core" ,python-jupyter-core)))
4548 (home-page "http://jupyter.org/")
4549 (synopsis "Jupyter protocol implementation and client libraries")
4550 (description
4551 "The @code{jupyter_client} package contains the reference implementation
4552 of the Jupyter protocol. It also provides client and kernel management APIs
4553 for working with kernels, and the @code{jupyter kernelspec} entrypoint for
4554 installing @code{kernelspec}s for use with Jupyter frontends.")
4555 (license license:bsd-3)))
4556
4557 (define-public python2-jupyter-client
4558 (package-with-python2 python-jupyter-client))
4559
4560 (define-public python-ipython
4561 (package
4562 (name "python-ipython")
4563 (version "3.2.1")
4564 (source
4565 (origin
4566 (method url-fetch)
4567 (patches (search-patches "python-ipython-inputhook-ctype.patch"))
4568 (uri (string-append "https://pypi.python.org/packages/source/i/"
4569 "ipython/ipython-" version ".tar.gz"))
4570 (sha256
4571 (base32 "0xwin0sa9n0cabx4cq1ibf5ldsiw5dyimibla82kicz5gbpas4y9"))))
4572 (build-system python-build-system)
4573 (outputs '("out" "doc"))
4574 (propagated-inputs
4575 `(("python-pyzmq" ,python-pyzmq)
4576 ("python-terminado" ,python-terminado)))
4577 (inputs
4578 `(("readline" ,readline)
4579 ("which" ,which)
4580 ("python-matplotlib" ,python-matplotlib)
4581 ("python-numpy" ,python-numpy)
4582 ("python-numpydoc" ,python-numpydoc)
4583 ("python-jinja2" ,python-jinja2)
4584 ("python-mistune" ,python-mistune)
4585 ("python-jsonschema" ,python-jsonschema)
4586 ("python-pygments" ,python-pygments)
4587 ("python-requests" ,python-requests) ;; for tests
4588 ("python-nose" ,python-nose)))
4589 (native-inputs
4590 `(("pkg-config" ,pkg-config)
4591 ("python-sphinx" ,python-sphinx)
4592 ("texlive" ,texlive)
4593 ("texinfo" ,texinfo)
4594 ("python-setuptools" ,python-setuptools)))
4595 (arguments
4596 `(#:phases
4597 (modify-phases %standard-phases
4598 (add-after
4599 'install 'install-doc
4600 (lambda* (#:key inputs outputs #:allow-other-keys)
4601 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4602 (doc (string-append data "/doc/" ,name "-" ,version))
4603 (html (string-append doc "/html"))
4604 (man1 (string-append data "/man/man1"))
4605 (info (string-append data "/info"))
4606 (examples (string-append doc "/examples")))
4607 (setenv "LANG" "en_US.utf8")
4608 (with-directory-excursion "docs"
4609 ;; FIXME: html and pdf fail to build
4610 ;; (system* "make" "html")
4611 ;; (system* "make" "pdf" "PAPER=a4")
4612 (system* "make" "info"))
4613 (copy-recursively "docs/man" man1)
4614 (copy-recursively "examples" examples)
4615 ;; (copy-recursively "docs/build/html" html)
4616 ;; (copy-file "docs/build/latex/ipython.pdf"
4617 ;; (string-append doc "/ipython.pdf"))
4618 (mkdir-p info)
4619 (copy-file "docs/build/texinfo/ipython.info"
4620 (string-append info "/ipython.info"))
4621 (copy-file "COPYING.rst" (string-append doc "/COPYING.rst")))))
4622 ;; Tests can only be run after the library has been installed and not
4623 ;; within the source directory.
4624 (delete 'check)
4625 (add-after
4626 'install 'check
4627 (lambda* (#:key outputs tests? #:allow-other-keys)
4628 (if tests?
4629 (with-directory-excursion "/tmp"
4630 (setenv "HOME" "/tmp/") ;; required by a test
4631 (zero? (system* (string-append (assoc-ref outputs "out")
4632 "/bin/iptest"))))
4633 #t)))
4634 (add-before
4635 'install 'fix-tests
4636 (lambda* (#:key inputs #:allow-other-keys)
4637 (substitute* "./IPython/utils/_process_posix.py"
4638 (("/usr/bin/env', 'which") (which "which")))
4639 (substitute* "./IPython/core/tests/test_inputtransformer.py"
4640 (("#!/usr/bin/env python")
4641 (string-append "#!" (which "python"))))
4642 ;; Disable 1 failing test
4643 (substitute* "./IPython/core/tests/test_magic.py"
4644 (("def test_dirops\\(\\):" all)
4645 (string-append "@dec.skipif(True)\n" all))))))))
4646 (home-page "http://ipython.org")
4647 (synopsis "IPython is a tool for interactive computing in Python")
4648 (description
4649 "IPython provides a rich architecture for interactive computing with:
4650 Powerful interactive shells, a browser-based notebook, support for interactive
4651 data visualization, embeddable interpreters and tools for parallel
4652 computing.")
4653 (license license:bsd-3)
4654 (properties `((python2-variant . ,(delay python2-ipython))))))
4655
4656 (define-public python2-ipython
4657 (let ((ipython (package-with-python2 (strip-python2-variant python-ipython))))
4658 (package
4659 (inherit ipython)
4660 ;; FIXME: some tests are failing
4661 (arguments
4662 `(#:tests? #f ,@(package-arguments ipython)))
4663 ;; FIXME: add pyreadline once available.
4664 (inputs
4665 `(("python2-mock" ,python2-mock)
4666 ,@(package-inputs ipython))))))
4667
4668 (define-public python-isodate
4669 (package
4670 (name "python-isodate")
4671 (version "0.5.4")
4672 (source
4673 (origin
4674 (method url-fetch)
4675 (uri (pypi-uri "isodate" version))
4676 (sha256
4677 (base32
4678 "0cafaiwixgpxwh9dsd28qb0dbzsj6xpxjdkyk30ns91ps10mq422"))))
4679 (build-system python-build-system)
4680 (inputs
4681 `(("python-setuptools" ,python-setuptools)))
4682 (home-page
4683 "http://cheeseshop.python.org/pypi/isodate")
4684 (synopsis
4685 "Python date parser and formatter")
4686 (description
4687 "Python-isodate is a python module for parsing and formatting
4688 ISO 8601 dates, time and duration.")
4689 (license license:bsd-3)))
4690
4691 (define-public python2-isodate
4692 (package-with-python2 python-isodate))
4693
4694 (define-public python-html5lib
4695 (package
4696 (name "python-html5lib")
4697 (version "1.0b8")
4698 (source
4699 (origin
4700 (method url-fetch)
4701 (uri (pypi-uri "html5lib" version))
4702 (sha256
4703 (base32
4704 "1lknq5j3nh11xrl268ks76zaj0gyzh34v94n5vbf6dk8llzxdx0q"))))
4705 (build-system python-build-system)
4706 (propagated-inputs
4707 `(("python-six" ,python-six))) ; required to "import html5lib"
4708 (inputs
4709 `(("python-setuptools" ,python-setuptools)))
4710 (arguments
4711 `(#:test-target "check"))
4712 (home-page
4713 "https://github.com/html5lib/html5lib-python")
4714 (synopsis
4715 "Python HTML parser based on the WHATWG HTML specifcation")
4716 (description
4717 "Html5lib is an HTML parser based on the WHATWG HTML specifcation
4718 and written in Python.")
4719 (license license:expat)))
4720
4721 (define-public python2-html5lib
4722 (package-with-python2 python-html5lib))
4723
4724 (define-public python-urwid
4725 (package
4726 (name "python-urwid")
4727 (version "1.3.1")
4728 (source
4729 (origin
4730 (method url-fetch)
4731 (uri (pypi-uri "urwid" version))
4732 (sha256
4733 (base32
4734 "18cnd1wdjcas08x5qwa5ayw6jsfcn33w4d9f7q3s29fy6qzc1kng"))))
4735 (build-system python-build-system)
4736 (arguments
4737 `(#:phases
4738 (modify-phases %standard-phases
4739 ;; Disable failing test. Bug filed upstream:
4740 ;; https://github.com/wardi/urwid/issues/164
4741 ;; TODO: check again for python-urwid > 1.3.1 or python > 3.4.3.
4742 (add-after 'unpack 'disable-failing-test
4743 (lambda _
4744 (substitute* "urwid/tests/test_event_loops.py"
4745 (("test_remove_watch_file")
4746 "disable_remove_watch_file")))))))
4747 (native-inputs `(("python-setuptools" ,python-setuptools)))
4748 (home-page "http://urwid.org")
4749 (synopsis "Console user interface library for Python")
4750 (description
4751 "Urwid is a curses-based UI/widget library for Python. It includes many
4752 features useful for text console applications.")
4753 (license license:lgpl2.1+)))
4754
4755 (define-public python2-urwid
4756 (package-with-python2 python-urwid))
4757
4758 (define-public python-urwidtrees
4759 (package
4760 (name "python-urwidtrees")
4761 (version "1.0.2")
4762 (source
4763 (origin
4764 (method url-fetch)
4765 ;; package author intends on distributing via github rather than pypi:
4766 ;; https://github.com/pazz/alot/issues/877#issuecomment-230173331
4767 (uri (string-append "https://github.com/pazz/urwidtrees/archive/"
4768 version ".tar.gz"))
4769 (file-name (string-append name "-" version ".tar.gz"))
4770 (sha256
4771 (base32
4772 "0d30lyd3s2a97rhqfax5w9ssqds2z6aydqx3c6j2c2lk3cb4ngvh"))))
4773 (build-system python-build-system)
4774 (arguments
4775 '(#:tests? #f)) ; no tests
4776 (inputs `(("python-urwid" ,python-urwid)))
4777 (home-page "https://github.com/pazz/urwidtrees")
4778 (synopsis "Tree widgets for urwid")
4779 (description "Urwidtrees is a Widget Container API for the @code{urwid}
4780 toolkit. Use it to build trees of widgets.")
4781 (license license:gpl3+)))
4782
4783 (define-public python2-urwidtrees
4784 (package-with-python2 python-urwidtrees))
4785
4786 (define-public python-dbus
4787 (package
4788 (name "python-dbus")
4789 (version "1.2.0")
4790 (source
4791 (origin
4792 (method url-fetch)
4793 (uri (string-append
4794 "https://dbus.freedesktop.org/releases/dbus-python/dbus-python-"
4795 version ".tar.gz"))
4796 (sha256
4797 (base32 "1py62qir966lvdkngg0v8k1khsqxwk5m4s8nflpk1agk5f5nqb71"))))
4798 (build-system gnu-build-system)
4799 (arguments
4800 '(#:phases
4801 (modify-phases %standard-phases
4802 (add-before
4803 'check 'pre-check
4804 (lambda _
4805 ;; XXX: For the missing '/etc/machine-id'.
4806 (substitute* "test/run-test.sh"
4807 (("DBUS_FATAL_WARNINGS=1")
4808 "DBUS_FATAL_WARNINGS=0"))
4809 #t)))))
4810 (native-inputs
4811 `(("pkg-config" ,pkg-config)))
4812 (inputs
4813 `(("python" ,python)
4814 ("dbus-glib" ,dbus-glib)))
4815 (synopsis "Python bindings for D-bus")
4816 (description "python-dbus provides bindings for libdbus, the reference
4817 implementation of D-Bus.")
4818 (home-page "http://www.freedesktop.org/wiki/Software/DBusBindings/")
4819 (license license:expat)))
4820
4821 (define-public python2-dbus
4822 (package (inherit python-dbus)
4823 (name "python2-dbus")
4824 (inputs `(("python" ,python-2)
4825 ,@(alist-delete "python"
4826 (package-inputs python-dbus)
4827 equal?)))
4828 ;; FIXME: on Python 2, the test_utf8 fails with:
4829 ;; "ValueError: unichr() arg not in range(0x10000) (narrow Python build)"
4830 (arguments `(#:tests? #f))))
4831
4832 (define-public python-apsw
4833 (package
4834 (name "python-apsw")
4835 (version "3.9.2-r1")
4836 (source
4837 (origin
4838 (method url-fetch)
4839 (uri (pypi-uri "apsw" version))
4840 (sha256
4841 (base32
4842 "0w4jb0wpx785qw42r3h4fh7gl5w2968q48i7gygybsfxck8nzffs"))))
4843 (build-system python-build-system)
4844 (inputs
4845 `(("python-setuptools" ,python-setuptools)
4846 ("sqlite" ,sqlite)))
4847 (arguments
4848 `(#:phases
4849 ;; swap check and install phases
4850 (alist-cons-after
4851 'install 'check
4852 (assoc-ref %standard-phases 'check)
4853 (alist-delete
4854 'check
4855 %standard-phases))))
4856 (home-page "https://github.com/rogerbinns/apsw/")
4857 (synopsis "Another Python SQLite Wrapper")
4858 (description "APSW is a Python wrapper for the SQLite
4859 embedded relational database engine. In contrast to other wrappers such as
4860 pysqlite it focuses on being a minimal layer over SQLite attempting just to
4861 translate the complete SQLite API into Python.")
4862 (license license:zlib)))
4863
4864 (define-public python2-apsw
4865 (package-with-python2 python-apsw))
4866
4867 (define-public python-lxml
4868 (package
4869 (name "python-lxml")
4870 (version "3.6.0")
4871 (source
4872 (origin
4873 (method url-fetch)
4874 (uri (pypi-uri "lxml" version))
4875 (sha256
4876 (base32
4877 "1pvbmiy2m7jwv493kilbghhj2pkh8wy1na3ji350vhzhlwlclx4w"))))
4878 (build-system python-build-system)
4879 (inputs
4880 `(("libxml2" ,libxml2)
4881 ("libxslt" ,libxslt)
4882 ("python-setuptools" ,python-setuptools)))
4883 (home-page "http://lxml.de/")
4884 (synopsis
4885 "Python XML processing library")
4886 (description
4887 "The lxml XML toolkit is a Pythonic binding for the C libraries
4888 libxml2 and libxslt.")
4889 (license license:bsd-3))) ; and a few more, see LICENSES.txt
4890
4891 (define-public python2-lxml
4892 (package-with-python2 python-lxml))
4893
4894 ;; beautifulsoup4 has a totally different namespace than 3.x,
4895 ;; and pypi seems to put it under its own name, so I guess we should too
4896 (define-public python-beautifulsoup4
4897 (package
4898 (name "python-beautifulsoup4")
4899 (version "4.5.1")
4900 (source
4901 (origin
4902 (method url-fetch)
4903 (uri (pypi-uri "beautifulsoup4" version))
4904 (sha256
4905 (base32
4906 "1qgmhw65ncsgccjhslgkkszif47q6gvxwqv4mim17agxd81p951w"))))
4907 (build-system python-build-system)
4908 (arguments
4909 `(#:phases
4910 (modify-phases %standard-phases
4911 ;; The Python 2 source is the definitive source of beautifulsoup4. We
4912 ;; must use this conversion script when building with Python 3. The
4913 ;; conversion script also runs the tests.
4914 ;; For more information, see the file 'convert-py3k' in the source
4915 ;; distribution.
4916 (replace 'check
4917 (lambda _ (zero? (system* "./convert-py3k")))))))
4918 (home-page
4919 "http://www.crummy.com/software/BeautifulSoup/bs4/")
4920 (synopsis
4921 "Python screen-scraping library")
4922 (description
4923 "Beautiful Soup is a Python library designed for rapidly setting up
4924 screen-scraping projects. It offers Pythonic idioms for navigating,
4925 searching, and modifying a parse tree, providing a toolkit for
4926 dissecting a document and extracting what you need. It automatically
4927 converts incoming documents to Unicode and outgoing documents to UTF-8.")
4928 (license license:expat)
4929 (properties `((python2-variant . ,(delay python2-beautifulsoup4))))))
4930
4931 (define-public python2-beautifulsoup4
4932 (package
4933 (inherit (package-with-python2
4934 (strip-python2-variant python-beautifulsoup4)))
4935 (native-inputs `(("python2-setuptools" ,python2-setuptools)))
4936 (arguments `(#:python ,python-2))))
4937
4938 (define-public python2-cssutils
4939 (package
4940 (name "python2-cssutils")
4941 (version "1.0.1")
4942 (source
4943 (origin
4944 (method url-fetch)
4945 (uri (pypi-uri "cssutils" version))
4946 (sha256
4947 (base32
4948 "0qwha9x1wml2qmipbcz03gndnlwhzrjdvw9i09si247a90l8p8fq"))))
4949 (build-system python-build-system)
4950 (native-inputs
4951 `(("python2-mock" ,python2-mock) ; for the tests
4952 ("unzip" ,unzip))) ; for unpacking the source
4953 (inputs
4954 `(("python2-setuptools" ,python2-setuptools)))
4955 (arguments
4956 `(#:python ,python-2 ; Otherwise tests fail with a syntax error.
4957 #:tests? #f ; The tests apparently download an external URL.
4958 ))
4959 (home-page "http://cthedot.de/cssutils/")
4960 (synopsis
4961 "CSS Cascading Style Sheets library for Python")
4962 (description
4963 "Cssutils is a Python package for parsing and building CSS
4964 Cascading Style Sheets. Currently it provides a DOM only and no rendering
4965 options.")
4966 (license license:lgpl3+)))
4967
4968 (define-public python-cssselect
4969 (package
4970 (name "python-cssselect")
4971 (version "0.9.2")
4972 (source
4973 (origin
4974 (method url-fetch)
4975 (uri (pypi-uri "cssselect" version))
4976 (sha256
4977 (base32
4978 "1xg6gbva1yswghiycmgincv6ab4bn7hpm720ndbj40h8xycmnfvi"))))
4979 (build-system python-build-system)
4980 (inputs
4981 `(("python-setuptools" ,python-setuptools)))
4982 (arguments
4983 ;; tests fail with message
4984 ;; AttributeError: 'module' object has no attribute 'tests'
4985 `(#:tests? #f))
4986 (home-page
4987 "https://pythonhosted.org/cssselect/")
4988 (synopsis
4989 "CSS3 selector parser and translator to XPath 1.0")
4990 (description
4991 "Cssselect ia a Python module that parses CSS3 Selectors and translates
4992 them to XPath 1.0 expressions. Such expressions can be used in lxml or
4993 another XPath engine to find the matching elements in an XML or HTML document.")
4994 (license license:bsd-3)))
4995
4996 (define-public python2-cssselect
4997 (package-with-python2 python-cssselect))
4998
4999 (define-public python-netifaces
5000 (package
5001 (name "python-netifaces")
5002 (version "0.10.4")
5003 (source
5004 (origin
5005 (method url-fetch)
5006 (uri (string-append
5007 "https://pypi.python.org/packages/source/n/netifaces/netifaces-"
5008 version
5009 ".tar.gz"))
5010 (sha256
5011 (base32
5012 "1plw237a4zib4z8s62g0mrs8gm3kjfrp5sxh6bbk9nl3rdls2mln"))))
5013 (build-system python-build-system)
5014 (inputs
5015 `(("python-setuptools" ,python-setuptools)))
5016 (home-page
5017 "https://bitbucket.org/al45tair/netifaces")
5018 (synopsis
5019 "Python module for portable network interface information")
5020 (description
5021 "Netifaces is a Python module providing information on network
5022 interfaces in an easy and portable manner.")
5023 (license license:expat)))
5024
5025 (define-public python2-netifaces
5026 (package-with-python2 python-netifaces))
5027
5028 (define-public python-networkx
5029 (package
5030 (name "python-networkx")
5031 (version "1.11")
5032 (source
5033 (origin
5034 (method url-fetch)
5035 (uri (pypi-uri "networkx" version))
5036 (sha256
5037 (base32 "1f74s56xb4ggixiq0vxyfxsfk8p20c7a099lpcf60izv1php03hd"))))
5038 (build-system python-build-system)
5039 ;; python-decorator is needed at runtime
5040 (propagated-inputs
5041 `(("python-decorator" ,python-decorator)))
5042 (native-inputs
5043 `(("python-setuptools" ,python-setuptools)
5044 ("python-nose" ,python-nose)))
5045 (home-page "http://networkx.github.io/")
5046 (synopsis "Python module for creating and manipulating graphs and networks")
5047 (description
5048 "NetworkX is a Python package for the creation, manipulation, and study
5049 of the structure, dynamics, and functions of complex networks.")
5050 (license license:bsd-3)))
5051
5052 (define-public python2-networkx
5053 (package-with-python2 python-networkx))
5054
5055 (define-public snakemake
5056 (package
5057 (name "snakemake")
5058 (version "3.2.1")
5059 (source
5060 (origin
5061 (method url-fetch)
5062 (uri (string-append
5063 "https://pypi.python.org/packages/source/s/snakemake/snakemake-"
5064 version ".tar.gz"))
5065 (sha256
5066 (base32 "0fi4b63sj60hvi7rfydvmz2icl4wj74djw5sn2gl8hxd02qw4b91"))))
5067 (build-system python-build-system)
5068 (inputs `(("python-setuptools" ,python-setuptools)))
5069 (home-page "https://bitbucket.org/johanneskoester/snakemake")
5070 (synopsis "Python-based execution environment for make-like workflows")
5071 (description
5072 "Snakemake aims to reduce the complexity of creating workflows by
5073 providing a clean and modern domain specific specification language (DSL) in
5074 Python style, together with a fast and comfortable execution environment.")
5075 (license license:expat)))
5076
5077 (define-public python-seaborn
5078 (package
5079 (name "python-seaborn")
5080 (version "0.7.0")
5081 (source
5082 (origin
5083 (method url-fetch)
5084 (uri (pypi-uri "seaborn" version))
5085 (sha256
5086 (base32 "0ibi3xsfm2kysph61mnfy0pf8d5rkgxgrdb0z9nbizgcgdsb5a0m"))))
5087 (build-system python-build-system)
5088 (propagated-inputs
5089 `(("python-pandas" ,python-pandas)
5090 ("python-matplotlib" ,python-matplotlib)
5091 ("python-scipy" ,python-scipy)))
5092 (home-page "http://stanford.edu/~mwaskom/software/seaborn/")
5093 (synopsis "Statistical data visualization")
5094 (description
5095 "Seaborn is a library for making attractive and informative statistical
5096 graphics in Python. It is built on top of matplotlib and tightly integrated
5097 with the PyData stack, including support for numpy and pandas data structures
5098 and statistical routines from scipy and statsmodels.")
5099 (license license:bsd-3)
5100 (properties `((python2-variant . ,(delay python2-seaborn))))))
5101
5102 (define-public python2-seaborn
5103 (let ((base (package-with-python2 (strip-python2-variant python-seaborn))))
5104 (package
5105 (inherit base)
5106 (propagated-inputs `(("python2-pytz" ,python2-pytz)
5107 ,@(package-propagated-inputs base)))
5108 (native-inputs `(("python2-setuptools" ,python2-setuptools)
5109 ,@(package-native-inputs base))))))
5110
5111 (define-public python-sympy
5112 (package
5113 (name "python-sympy")
5114 (version "0.7.6")
5115 (source
5116 (origin
5117 (method url-fetch)
5118 (uri (string-append
5119 "https://github.com/sympy/sympy/releases/download/sympy-"
5120 version "/sympy-" version ".tar.gz"))
5121 (sha256
5122 (base32 "19yp0gy4i7p4g6l3b8vaqkj9qj7yqb5kqy0qgbdagpzgkdz958yz"))))
5123 (build-system python-build-system)
5124 (native-inputs
5125 `(("python-setuptools" ,python-setuptools)))
5126 (home-page "http://www.sympy.org/")
5127 (synopsis "Python library for symbolic mathematics")
5128 (description
5129 "SymPy is a Python library for symbolic mathematics. It aims to become a
5130 full-featured computer algebra system (CAS) while keeping the code as simple
5131 as possible in order to be comprehensible and easily extensible.")
5132 (license license:bsd-3)))
5133
5134 (define-public python2-sympy
5135 (package-with-python2 python-sympy))
5136
5137 (define-public python-q
5138 (package
5139 (name "python-q")
5140 (version "2.6")
5141 (source
5142 (origin
5143 (method url-fetch)
5144 (uri (pypi-uri "q" version))
5145 (sha256
5146 (base32
5147 "1mgfazh8fkizh6walra2zv885f3lcgr3nb02v1frfm4p8ddcy3yy"))))
5148 (build-system python-build-system)
5149 (home-page "https://github.com/zestyping/q")
5150 (synopsis "Quick-and-dirty debugging output for tired programmers")
5151 (description
5152 "q is a Python module for \"print\" style of debugging Python code. It
5153 provides convenient short API for print out of values, tracebacks, and
5154 falling into the Python interpreter.")
5155 (license license:asl2.0)
5156 (properties `((python2-variant . ,(delay python2-q))))))
5157
5158 (define-public python2-q
5159 (let ((base (package-with-python2 (strip-python2-variant python-q))))
5160 (package
5161 (inherit base)
5162 (native-inputs
5163 `(("python2-setuptools" ,python2-setuptools)
5164 ,@(package-native-inputs base))))))
5165
5166 (define-public python-testlib
5167 (package
5168 (name "python-testlib")
5169 (version "0.6.5")
5170 (source
5171 (origin
5172 (method url-fetch)
5173 (uri (string-append
5174 "https://pypi.python.org/packages/source/t/testlib/testlib-"
5175 version ".zip"))
5176 (sha256
5177 (base32 "1mz26cxn4x8bbgv0rn0mvj2z05y31rkc8009nvdlb3lam5b4mj3y"))))
5178 (build-system python-build-system)
5179 (inputs
5180 `(("python-setuptools" ,python-setuptools)))
5181 (native-inputs
5182 `(("unzip" ,unzip)))
5183 (arguments
5184 `(#:phases
5185 (alist-replace
5186 'unpack
5187 (lambda* (#:key inputs outputs #:allow-other-keys)
5188 (let ((unzip (string-append (assoc-ref inputs "unzip")
5189 "/bin/unzip"))
5190 (source (assoc-ref inputs "source")))
5191 (and (zero? (system* unzip source))
5192 (chdir (string-append "testlib-" ,version)))))
5193 %standard-phases)))
5194 (synopsis "Python micro test suite harness")
5195 (description "A micro unittest suite harness for Python.")
5196 (home-page "https://github.com/trentm/testlib")
5197 (license license:expat)))
5198
5199 (define-public python2-testlib
5200 (package-with-python2 python-testlib))
5201
5202 (define-public python2-xlib
5203 (package
5204 (name "python2-xlib")
5205 (version "0.14")
5206 (source (origin
5207 (method url-fetch)
5208 (uri (string-append "mirror://sourceforge/python-xlib/python-xlib"
5209 "/" version "/"
5210 "python-xlib-" version ".tar.gz"))
5211 (sha256
5212 (base32
5213 "1sv0447j0rx8cgs3jhjl695p5pv13ihglcjlrrz1kq05lsvb0wa7"))))
5214 (build-system python-build-system)
5215 (arguments
5216 `(#:python ,python-2 ;Python 2 only
5217 #:tests? #f)) ;no tests
5218 (inputs
5219 `(("python-setuptools" ,python-setuptools)))
5220 (home-page "http://python-xlib.sourceforge.net/")
5221 (synopsis "Python X11 client library")
5222 (description
5223 "The Python X Library is intended to be a fully functional X client
5224 library for Python programs. It is useful to implement low-level X clients.
5225 It is written entirely in Python.")
5226 (license license:gpl2+)))
5227
5228 (define-public python-singledispatch
5229 (package
5230 (name "python-singledispatch")
5231 (version "3.4.0.3")
5232 (source
5233 (origin
5234 (method url-fetch)
5235 (uri (pypi-uri "singledispatch" version))
5236 (sha256
5237 (base32
5238 "171b7ip0hsq5qm83np40h3phlr36ym18w0lay0a8v08kvy3sy1jv"))))
5239 (build-system python-build-system)
5240 (native-inputs
5241 `(("python-setuptools" ,python-setuptools)))
5242 (inputs
5243 `(("python-six" ,python-six)))
5244 (home-page
5245 "http://docs.python.org/3/library/functools.html#functools.singledispatch")
5246 (synopsis "Backport of singledispatch feature from Python 3.4")
5247 (description
5248 "This library brings functools.singledispatch from Python 3.4 to Python
5249 2.6-3.3.")
5250 (license license:expat)))
5251
5252 (define-public python2-singledispatch
5253 (package-with-python2 python-singledispatch))
5254
5255 (define-public python-tornado
5256 (package
5257 (name "python-tornado")
5258 (version "4.3")
5259 (source
5260 (origin
5261 (method url-fetch)
5262 (uri (pypi-uri "tornado" version))
5263 (sha256
5264 (base32 "1gzgwayl6hmc9jfcl88bni4jcsk2jcca9dn1rvrfsvnijcjx7hn9"))))
5265 (build-system python-build-system)
5266 (native-inputs
5267 `(("python-certifi" ,python-certifi)))
5268 (inputs
5269 `(("python-backports-abc" ,python-backports-abc)))
5270 (home-page "http://www.tornadoweb.org/")
5271 (synopsis "Python web framework and asynchronous networking library")
5272 (description
5273 "Tornado is a Python web framework and asynchronous networking library,
5274 originally developed at FriendFeed. By using non-blocking network I/O,
5275 Tornado can scale to tens of thousands of open connections, making it ideal
5276 for long polling, WebSockets, and other applications that require a long-lived
5277 connection to each user.")
5278 (license license:asl2.0)
5279 (properties `((python2-variant . ,(delay python2-tornado))))))
5280
5281 (define-public python2-tornado
5282 (let ((tornado (package-with-python2 (strip-python2-variant python-tornado))))
5283 (package (inherit tornado)
5284 (inputs
5285 `(("python2-backport-ssl-match-hostname"
5286 ,python2-backport-ssl-match-hostname)
5287 ("python2-singledispatch" ,python2-singledispatch)
5288 ,@(package-inputs tornado)))
5289 (native-inputs
5290 `(("python2-setuptools" ,python2-setuptools)
5291 ,@(package-native-inputs tornado))))))
5292
5293 ;; the python- version can be removed with python-3.5
5294 (define-public python-backports-abc
5295 (package
5296 (name "python-backports-abc")
5297 (version "0.4")
5298 (source
5299 (origin
5300 (method url-fetch)
5301 (uri (pypi-uri "backports_abc" version))
5302 (sha256
5303 (base32
5304 "19fh75lni9pb673n2fn505m1rckm0af0szcv5xx1qm1xpa940glb"))))
5305 (build-system python-build-system)
5306 (inputs
5307 `(("python-setuptools" ,python-setuptools)))
5308 (home-page "https://github.com/cython/backports_abc")
5309 (synopsis "Backport of additions to the 'collections.abc' module")
5310 (description
5311 "Python-backports-abc provides a backport of additions to the
5312 'collections.abc' module in Python-3.5.")
5313 (license license:psfl)))
5314
5315 (define-public python2-backports-abc
5316 (package-with-python2 python-backports-abc))
5317
5318 (define-public python-waf
5319 (package
5320 (name "python-waf")
5321 (version "1.9.5")
5322 (source (origin
5323 (method url-fetch)
5324 (uri (string-append "https://waf.io/"
5325 "waf-" version ".tar.bz2"))
5326 (sha256
5327 (base32
5328 "1sl3ipi2czds57rlzjnpdzqa0skx8asfvmh3qmibpvdwf15rpppg"))))
5329 (build-system python-build-system)
5330 (arguments
5331 '(#:phases
5332 (modify-phases %standard-phases
5333 (replace 'build
5334 (lambda _
5335 (zero? (system* "python" "waf-light" "configure" "build"))))
5336 (replace 'check
5337 (lambda _
5338 (zero? (system* "python" "waf" "--version"))))
5339 (replace 'install
5340 (lambda _
5341 (copy-file "waf" %output))))))
5342 (home-page "http://waf.io/")
5343 (synopsis "Python-based build system")
5344 (description
5345 "Waf is a Python-based framework for configuring, compiling and installing
5346 applications.")
5347 (license license:bsd-3)))
5348
5349 (define-public python2-waf
5350 (package-with-python2 python-waf))
5351
5352 (define-public python-pyzmq
5353 (package
5354 (name "python-pyzmq")
5355 (version "15.1.0")
5356 (source
5357 (origin
5358 (method url-fetch)
5359 (uri (pypi-uri "pyzmq" version))
5360 (sha256
5361 (base32 "13fhwnlvsvxv72kfhqbpn6qi7msh8mc8377mpabv32skk2cjfnxx"))))
5362 (build-system python-build-system)
5363 (arguments
5364 `(#:configure-flags
5365 (list (string-append "--zmq=" (assoc-ref %build-inputs "zeromq")))
5366 ;; FIXME: You must build pyzmq with 'python setup.py build_ext
5367 ;; --inplace' for 'python setup.py test' to work.
5368 #:tests? #f))
5369 (inputs
5370 `(("zeromq" ,zeromq)))
5371 (native-inputs
5372 `(("pkg-config" ,pkg-config)
5373 ("python-nose" ,python-nose)
5374 ("python-setuptools" ,python-setuptools)))
5375 (home-page "http://github.com/zeromq/pyzmq")
5376 (synopsis "Python bindings for 0MQ")
5377 (description
5378 "PyZMQ is the official Python binding for the ZeroMQ messaging library.")
5379 (license license:bsd-4)))
5380
5381 (define-public python2-pyzmq
5382 (package-with-python2 python-pyzmq))
5383
5384 (define-public python-pep8
5385 (package
5386 (name "python-pep8")
5387 (version "1.7.0")
5388 (source
5389 (origin
5390 (method url-fetch)
5391 (uri (pypi-uri "pep8" version))
5392 (sha256
5393 (base32
5394 "002rkl4lsn6x2mxmf8ar00l0m8i3mzrc6pnzz77blyksmpsxa4x1"))))
5395 (build-system python-build-system)
5396 (inputs
5397 `(("python-setuptools" ,python-setuptools)))
5398 (home-page "http://pep8.readthedocs.org/")
5399 (synopsis "Python style guide checker")
5400 (description
5401 "This tools checks Python code against some of the style conventions in
5402 PEP 8.")
5403 (license license:expat)))
5404
5405 (define-public python2-pep8
5406 (package-with-python2 python-pep8))
5407
5408 (define-public python-pyflakes
5409 (package
5410 (name "python-pyflakes")
5411 (version "1.0.0")
5412 (source
5413 (origin
5414 (method url-fetch)
5415 (uri (pypi-uri "pyflakes" version))
5416 (sha256
5417 (base32
5418 "0qs2sgqszq7wcplis8509wk2ygqcrwzbs1ghfj3svvivq2j377pk"))))
5419 (build-system python-build-system)
5420 (inputs
5421 `(("python-setuptools" ,python-setuptools)))
5422 (home-page
5423 "https://github.com/pyflakes/pyflakes")
5424 (synopsis "Passive checker of Python programs")
5425 (description
5426 "Pyflakes statically checks Python source code for common errors.")
5427 (license license:expat)))
5428
5429 (define-public python2-pyflakes
5430 (package-with-python2 python-pyflakes))
5431
5432 (define-public python-mccabe
5433 (package
5434 (name "python-mccabe")
5435 (version "0.4.0")
5436 (source
5437 (origin
5438 (method url-fetch)
5439 (uri (pypi-uri "mccabe" version))
5440 (sha256
5441 (base32
5442 "0yr08a36h8lqlif10l4xcikbbig7q8f41gqywir7rrvnv3mi4aws"))))
5443 (build-system python-build-system)
5444 (inputs
5445 `(("python-pytest" ,python-pytest)
5446 ("python-pytest-runner" ,python-pytest-runner)
5447 ("python-setuptools" ,python-setuptools)))
5448 (home-page "https://github.com/flintwork/mccabe")
5449 (synopsis "McCabe checker, plugin for flake8")
5450 (description
5451 "This package provides a Flake8 plug-in to compute the McCabe cyclomatic
5452 complexity of Python source code.")
5453 (license license:expat)))
5454
5455 (define-public python2-mccabe
5456 (package-with-python2 python-mccabe))
5457
5458 (define-public python-mccabe-0.2.1
5459 (package (inherit python-mccabe)
5460 (version "0.2.1")
5461 (source
5462 (origin
5463 (method url-fetch)
5464 (uri (pypi-uri "mccabe" version))
5465 (sha256
5466 (base32
5467 "0fi4a81kr5bcv5p4xgibqr595hyj5dafkqgsmfk96mfy8w71fajs"))))
5468 (inputs `(("python-setuptools" ,python-setuptools)))))
5469
5470 (define-public python2-mccabe-0.2.1
5471 (package-with-python2 python-mccabe-0.2.1))
5472
5473 ;; Flake8 2.4.1 requires an older version of pep8.
5474 ;; This should be removed ASAP.
5475 (define-public python-pep8-1.5.7
5476 (package (inherit python-pep8)
5477 (version "1.5.7")
5478 (source
5479 (origin
5480 (method url-fetch)
5481 (uri (string-append
5482 "https://pypi.python.org/packages/source/p/pep8/pep8-"
5483 version
5484 ".tar.gz"))
5485 (sha256
5486 (base32
5487 "12b9bbdbwnspxgak14xg58c130x2n0blxzlms5jn2dszn8qj3d0m"))))))
5488
5489 (define-public python2-pep8-1.5.7
5490 (package-with-python2 python-pep8-1.5.7))
5491
5492 ;; Flake8 2.4.1 requires an older version of pyflakes.
5493 ;; This should be removed ASAP.
5494 (define-public python-pyflakes-0.8.1
5495 (package (inherit python-pyflakes)
5496 (version "0.8.1")
5497 (source
5498 (origin
5499 (method url-fetch)
5500 (uri (string-append
5501 "https://pypi.python.org/packages/source/p/pyflakes/pyflakes-"
5502 version
5503 ".tar.gz"))
5504 (sha256
5505 (base32
5506 "0sbpq6pqm1i9wqi41mlfrsc5rk92jv4mskvlyxmnhlbdnc80ma1z"))))))
5507
5508 (define-public python2-pyflakes-0.8.1
5509 (package-with-python2 python-pyflakes-0.8.1))
5510
5511 (define-public python-flake8
5512 (package
5513 (name "python-flake8")
5514 (version "2.5.4")
5515 (source
5516 (origin
5517 (method url-fetch)
5518 (uri (pypi-uri "flake8" version))
5519 (sha256
5520 (base32
5521 "0bs9cz4fr99r2rwig1b8jwaadl1nan7kgpdzqwj0bwbckwbmh7nc"))))
5522 (build-system python-build-system)
5523 (inputs
5524 `(("python-setuptools" ,python-setuptools)
5525 ("python-pep8" ,python-pep8)
5526 ("python-pyflakes" ,python-pyflakes)
5527 ("python-mccabe" ,python-mccabe)
5528 ("python-mock" ,python-mock)
5529 ("python-nose" ,python-nose)))
5530 (home-page "https://gitlab.com/pycqa/flake8")
5531 (synopsis
5532 "The modular source code checker: pep8, pyflakes and co")
5533 (description
5534 "Flake8 is a wrapper around PyFlakes, pep8 and python-mccabe.")
5535 (license license:expat)))
5536
5537 (define-public python2-flake8
5538 (package-with-python2 python-flake8))
5539
5540 ;; This will only be needed by the python-hacking package and will not be
5541 ;; necessary once python-hacking > 0.10.2 is released.
5542 (define-public python-flake8-2.2.4
5543 (package (inherit python-flake8)
5544 (inputs
5545 `(("python-setuptools" ,python-setuptools)
5546 ("python-pep8" ,python-pep8-1.5.7)
5547 ("python-pyflakes" ,python-pyflakes-0.8.1)
5548 ("python-mccabe" ,python-mccabe-0.2.1)
5549 ("python-mock" ,python-mock)
5550 ("python-nose" ,python-nose)))
5551 (version "2.2.4")
5552 (source
5553 (origin
5554 (method url-fetch)
5555 (uri (pypi-uri "flake8" version))
5556 (sha256
5557 (base32
5558 "1r9wsry4va45h1rck5hxd3vzsg2q3y6lnl6pym1bxvz8ry19jwx8"))))))
5559
5560 (define-public python2-flake8-2.2.4
5561 (package-with-python2 python-flake8-2.2.4))
5562
5563 (define-public python-mistune
5564 (package
5565 (name "python-mistune")
5566 (version "0.7")
5567 (source
5568 (origin
5569 (method url-fetch)
5570 (uri (string-append
5571 "https://pypi.python.org/packages/source/m/mistune/mistune-"
5572 version
5573 ".tar.gz"))
5574 (sha256
5575 (base32
5576 "17zqjp9m4d1w3jf2rbbq5xshcw24q1vlcv24gkgfqqyyymajxahx"))))
5577 (build-system python-build-system)
5578 (inputs
5579 `(("python-setuptools" ,python-setuptools)
5580 ("python-nose" ,python-nose)
5581 ("python-cython" ,python-cython)))
5582 (home-page "https://github.com/lepture/mistune")
5583 (synopsis "Markdown parser in pure Python")
5584 (description "This package provides a fast markdown parser in pure
5585 Python.")
5586 (license license:bsd-3)))
5587
5588 (define-public python2-mistune
5589 (package-with-python2 python-mistune))
5590
5591 (define-public python-markdown
5592 (package
5593 (name "python-markdown")
5594 (version "2.6.5")
5595 (source
5596 (origin
5597 (method url-fetch)
5598 (uri (pypi-uri "Markdown" version))
5599 (sha256
5600 (base32
5601 "0q758a3fiiawr20b3hhjfs677cwj6xi284yb7xspcvv0fdicz54d"))))
5602 (build-system python-build-system)
5603 (arguments
5604 `(#:phases
5605 (modify-phases %standard-phases
5606 (replace 'check
5607 (lambda _
5608 (zero? (system* "python" "run-tests.py")))))))
5609 (native-inputs
5610 `(("python-nose" ,python-nose)
5611 ("python-pyyaml" ,python-pyyaml)))
5612 (home-page "https://pythonhosted.org/Markdown/")
5613 (synopsis "Python implementation of Markdown")
5614 (description
5615 "This package provides a Python implementation of John Gruber's
5616 Markdown. The library features international input, various Markdown
5617 extensions, and several HTML output formats. A command line wrapper
5618 markdown_py is also provided to convert Markdown files to HTML.")
5619 (license license:bsd-3)))
5620
5621 (define-public python2-markdown
5622 (package-with-python2 python-markdown))
5623
5624 (define-public python-ptyprocess
5625 (package
5626 (name "python-ptyprocess")
5627 (version "0.5")
5628 (source
5629 (origin
5630 (method url-fetch)
5631 (uri (string-append
5632 "https://pypi.python.org/packages/source/p/ptyprocess/ptyprocess-"
5633 version ".tar.gz"))
5634 (sha256
5635 (base32
5636 "0nggns5kikn32yyda2zrj1xdmh49pi3v0drggcdwljbv36r8zdyw"))))
5637 (build-system python-build-system)
5638 (inputs
5639 `(("python-setuptools" ,python-setuptools)
5640 ("python-nose" ,python-nose)))
5641 (arguments
5642 `(#:phases
5643 (modify-phases %standard-phases
5644 (replace 'check
5645 (lambda _
5646 (zero? (system* "nosetests")))))))
5647 (home-page "https://github.com/pexpect/ptyprocess")
5648 (synopsis "Run a subprocess in a pseudo terminal")
5649 (description
5650 "This package provides a Python library used to launch a subprocess in a
5651 pseudo terminal (pty), and interact with both the process and its pty.")
5652 (license license:isc)))
5653
5654 (define-public python2-ptyprocess
5655 (package-with-python2 python-ptyprocess))
5656
5657 (define-public python-terminado
5658 (package
5659 (name "python-terminado")
5660 (version "0.6")
5661 (source
5662 (origin
5663 (method url-fetch)
5664 (uri (pypi-uri "terminado" version))
5665 (sha256
5666 (base32
5667 "09h1kwi86g5mrk14s4pgbhshd602zry29lnpxamcqz864kva22rc"))))
5668 (build-system python-build-system)
5669 (propagated-inputs
5670 `(("python-tornado" ,python-tornado)
5671 ("python-ptyprocess" ,python-ptyprocess)))
5672 (native-inputs
5673 `(("python-nose" ,python-nose)))
5674 (arguments
5675 `(#:phases
5676 (modify-phases %standard-phases
5677 (replace 'check
5678 (lambda _
5679 (zero? (system* "nosetests")))))))
5680 (home-page "https://github.com/takluyver/terminado")
5681 (synopsis "Terminals served to term.js using Tornado websockets")
5682 (description "This package provides a Tornado websocket backend for the
5683 term.js Javascript terminal emulator library.")
5684 (license license:bsd-2)
5685 (properties `((python2-variant . ,(delay python2-terminado))))))
5686
5687 (define-public python2-terminado
5688 (let ((terminado (package-with-python2 (strip-python2-variant python-terminado))))
5689 (package (inherit terminado)
5690 (propagated-inputs
5691 `(("python2-backport-ssl-match-hostname"
5692 ,python2-backport-ssl-match-hostname)
5693 ,@(package-propagated-inputs terminado)))
5694 (native-inputs
5695 `(("python2-setuptools" ,python2-setuptools)
5696 ,@(package-native-inputs terminado))))))
5697
5698 (define-public python-fonttools
5699 (package
5700 (name "python-fonttools")
5701 (version "2.5")
5702 (source (origin
5703 (method url-fetch)
5704 (uri (string-append
5705 "https://pypi.python.org/packages/source/F/FontTools/"
5706 "fonttools-" version ".tar.gz"))
5707 (sha256
5708 (base32
5709 "08ay3x4ijarwhl60gqx2i9jzq6pxs20p4snc2d1q5jagh4rn39lb"))))
5710 (build-system python-build-system)
5711 (arguments '(#:test-target "check"))
5712 (propagated-inputs
5713 ;; XXX: module not found if setuptools is not available.
5714 `(("python-setuptools" ,python-setuptools)))
5715 (home-page "http://github.com/behdad/fonttools")
5716 (synopsis "Tools to manipulate font files")
5717 (description
5718 "FontTools/TTX is a library to manipulate font files from Python. It
5719 supports reading and writinfg of TrueType/OpenType fonts, reading and writing
5720 of AFM files, reading (and partially writing) of PS Type 1 fonts. The package
5721 also contains a tool called “TTX” which converts TrueType/OpenType fonts to and
5722 from an XML-based format.")
5723 (license (license:non-copyleft
5724 "file://LICENSE.txt"
5725 "See LICENSE.txt in the distribution."))))
5726
5727 (define-public python2-fonttools
5728 (package-with-python2 python-fonttools))
5729
5730 (define-public python-ly
5731 (package
5732 (name "python-ly")
5733 (version "0.9.4")
5734 (source
5735 (origin
5736 (method url-fetch)
5737 (uri (string-append "https://pypi.python.org/packages/57/4f/"
5738 "889579244947368f28eda66b782331b1e75f83fd72e63f9ece93cd7a18f9"
5739 "/python-ly-" version ".tar.gz"))
5740 (sha256
5741 (base32
5742 "0g6n288l83sfwavxh1aryi0aqvsr3sp7v6f903mckwqa4scpky62"))))
5743 (build-system python-build-system)
5744 (native-inputs
5745 `(("python-setuptools" ,python-setuptools)))
5746 (synopsis "Tool and library for manipulating LilyPond files")
5747 (description "This package provides a Python library to parse, manipulate
5748 or create documents in LilyPond format. A command line program ly is also
5749 provided that can be used to do various manipulations with LilyPond files.")
5750 (home-page "https://pypi.python.org/pypi/python-ly")
5751 (license license:gpl2+)))
5752
5753 (define-public python-appdirs
5754 (package
5755 (name "python-appdirs")
5756 (version "1.4.0")
5757 (source
5758 (origin
5759 (method url-fetch)
5760 (uri (string-append
5761 "https://pypi.python.org/packages/source/a/appdirs/appdirs-"
5762 version
5763 ".tar.gz"))
5764 (sha256
5765 (base32
5766 "1iddva7v3fq0aqzsahkazxr7vpw28mqcrsy818z4wyiqnkplbhlg"))))
5767 (build-system python-build-system)
5768 (inputs
5769 `(("python-setuptools" ,python-setuptools)))
5770 (home-page "http://github.com/ActiveState/appdirs")
5771 (synopsis
5772 "Determine platform-specific dirs, e.g. a \"user data dir\"")
5773 (description
5774 "This module provides a portable way of finding out where user data
5775 should be stored on various operating systems.")
5776 (license license:expat)))
5777
5778 (define-public python2-appdirs
5779 (package-with-python2 python-appdirs))
5780
5781 (define-public python-llfuse
5782 (package
5783 (name "python-llfuse")
5784 (version "1.1.1")
5785 (source (origin
5786 (method url-fetch)
5787 (uri (string-append
5788 "https://bitbucket.org/nikratio/python-llfuse/downloads/"
5789 "llfuse-" version ".tar.bz2"))
5790 (sha256
5791 (base32
5792 "0v6vj9mb286njgd1szg9hz2qdh5f3vkhsvajripfcqg458av310v"))))
5793 (build-system python-build-system)
5794 (inputs
5795 `(("fuse" ,fuse)
5796 ("attr" ,attr)))
5797 (native-inputs
5798 `(("pkg-config" ,pkg-config)
5799 ("python-setuptools" ,python-setuptools)))
5800 (synopsis "Python bindings for FUSE")
5801 (description
5802 "Python-LLFUSE is a set of Python bindings for the low level FUSE API.")
5803 (home-page "https://bitbucket.org/nikratio/python-llfuse/")
5804 (license license:lgpl2.0+)
5805 (properties `((python2-variant . ,(delay python2-llfuse))))))
5806
5807 (define-public python2-llfuse
5808 (package (inherit (package-with-python2
5809 (strip-python2-variant python-llfuse)))
5810 (propagated-inputs `(("python2-contextlib2" ,python2-contextlib2)))))
5811
5812 ;; For attic-0.16
5813 (define-public python-llfuse-0.41
5814 (package (inherit python-llfuse)
5815 (version "0.41.1")
5816 (source (origin
5817 (method url-fetch)
5818 (uri (string-append
5819 "https://bitbucket.org/nikratio/python-llfuse/downloads/"
5820 "llfuse-" version ".tar.bz2"))
5821 (sha256
5822 (base32
5823 "1imlqw9b73086y97izr036f58pgc5akv4ihc2rrf8j5h75jbrlaa"))))
5824 ;; Python-LLFUSE < 0.42 includes underscore.js, which is MIT (expat)
5825 ;; licensed. The rest of the package is licensed under LGPL2.0 or later.
5826 (license (list license:expat license:lgpl2.0+))))
5827
5828 (define-public python-msgpack
5829 (package
5830 (name "python-msgpack")
5831 (version "0.4.8")
5832 (source (origin
5833 (method url-fetch)
5834 (uri (pypi-uri "msgpack-python" version))
5835 (sha256
5836 (base32
5837 "11pqk5braa6wndpnr1dhg64js82vjgxnm0lzy73rwl831zgijaqs"))))
5838 (build-system python-build-system)
5839 (synopsis "MessagePack (de)serializer")
5840 (description "MessagePack is a fast, compact binary serialization format,
5841 suitable for similar data to JSON. This package provides CPython bindings for
5842 reading and writing MessagePack data.")
5843 (home-page "https://pypi.python.org/pypi/msgpack-python/")
5844 (license license:asl2.0)
5845 (properties `((python2-variant . ,(delay python2-msgpack))))))
5846
5847 (define-public python2-msgpack
5848 (package (inherit (package-with-python2
5849 (strip-python2-variant python-msgpack)))
5850 (native-inputs
5851 `(("python2-setuptools" ,python2-setuptools)))))
5852
5853 (define-public python-netaddr
5854 (package
5855 (name "python-netaddr")
5856 (version "0.7.18")
5857 (source
5858 (origin
5859 (method url-fetch)
5860 (uri (string-append
5861 "https://pypi.python.org/packages/source/n/netaddr/netaddr-"
5862 version
5863 ".tar.gz"))
5864 (sha256
5865 (base32
5866 "06dxjlbcicq7q3vqy8agq11ra01kvvd47j4mk6dmghjsyzyckxd1"))))
5867 (build-system python-build-system)
5868 (arguments `(#:tests? #f)) ;; No tests.
5869 (inputs
5870 `(("python-setuptools" ,python-setuptools)))
5871 (home-page "https://github.com/drkjam/netaddr/")
5872 (synopsis "Pythonic manipulation of network addresses")
5873 (description
5874 "A Python library for representing and manipulating IPv4, IPv6, CIDR, EUI
5875 and MAC network addresses.")
5876 (license license:bsd-3)))
5877
5878 (define-public python2-netaddr
5879 (package-with-python2 python-netaddr))
5880
5881 (define-public python-wrapt
5882 (package
5883 (name "python-wrapt")
5884 (version "1.10.5")
5885 (source
5886 (origin
5887 (method url-fetch)
5888 (uri (string-append
5889 "https://pypi.python.org/packages/source/w/wrapt/wrapt-"
5890 version
5891 ".tar.gz"))
5892 (sha256
5893 (base32
5894 "0cq8rlpzkxzk48b50yrfhzn1d1hrq4gjcdqlrgq4v5palgiv9jwr"))))
5895 (build-system python-build-system)
5896 (arguments
5897 ;; Tests are not included in the tarball, they are only available in the
5898 ;; git repository.
5899 `(#:tests? #f))
5900 (inputs
5901 `(("python-setuptools" ,python-setuptools)))
5902 (home-page "https://github.com/GrahamDumpleton/wrapt")
5903 (synopsis "Module for decorators, wrappers and monkey patching")
5904 (description
5905 "The aim of the wrapt module is to provide a transparent object proxy for
5906 Python, which can be used as the basis for the construction of function
5907 wrappers and decorator functions.")
5908 (license license:bsd-2)))
5909
5910 (define-public python2-wrapt
5911 (package-with-python2 python-wrapt))
5912
5913 (define-public python-iso8601
5914 (package
5915 (name "python-iso8601")
5916 (version "0.1.11")
5917 (source
5918 (origin
5919 (method url-fetch)
5920 (uri (pypi-uri "iso8601" version))
5921 (sha256
5922 (base32
5923 "0c7gh3lsdjds262h0v1sqc66l7hqgfwbakn96qrhdbl0i3vm5yz8"))))
5924 (build-system python-build-system)
5925 (inputs
5926 `(("python-setuptools" ,python-setuptools)))
5927 (home-page "https://bitbucket.org/micktwomey/pyiso8601")
5928 (synopsis "Module to parse ISO 8601 dates")
5929 (description
5930 "This module parses the most common forms of ISO 8601 date strings (e.g.
5931 @code{2007-01-14T20:34:22+00:00}) into @code{datetime} objects.")
5932 (license license:expat)))
5933
5934 (define-public python2-iso8601
5935 (package-with-python2 python-iso8601))
5936
5937 (define-public python-monotonic
5938 (package
5939 (name "python-monotonic")
5940 (version "0.3")
5941 (source
5942 (origin
5943 (method url-fetch)
5944 (uri (string-append
5945 "https://pypi.python.org/packages/source/m/monotonic/monotonic-"
5946 version
5947 ".tar.gz"))
5948 (sha256
5949 (base32
5950 "0yz0bcbwx8r2c01czzfpbrxddynxyk9k95jj8h6sgcb7xmfvl998"))))
5951 (build-system python-build-system)
5952 (inputs
5953 `(("python-setuptools" ,python-setuptools)))
5954 (home-page "https://github.com/atdt/monotonic")
5955 (synopsis "Implementation of time.monotonic() for Python 2 & < 3.3")
5956 (description
5957 "This module provides a monotonic() function which returns the value (in
5958 fractional seconds) of a clock which never goes backwards.")
5959 (license license:asl2.0)))
5960
5961 (define-public python2-monotonic
5962 (package-with-python2 python-monotonic))
5963
5964 (define-public python-webob
5965 (package
5966 (name "python-webob")
5967 (version "1.5.1")
5968 (source
5969 (origin
5970 (method url-fetch)
5971 (uri (pypi-uri "WebOb" version))
5972 (sha256
5973 (base32
5974 "02bhhzijfhv8hmi1i54d4b0v43liwhnywhflvxsv4x3zax9s3afq"))))
5975 (build-system python-build-system)
5976 (inputs
5977 `(("python-nose" ,python-nose)
5978 ("python-setuptools" ,python-setuptools)))
5979 (home-page "http://webob.org/")
5980 (synopsis "WSGI request and response object")
5981 (description
5982 "WebOb provides wrappers around the WSGI request environment, and an
5983 object to help create WSGI responses.")
5984 (license license:expat)))
5985
5986 (define-public python2-webob
5987 (package-with-python2 python-webob))
5988
5989 (define-public python-xlrd
5990 (package
5991 (name "python-xlrd")
5992 (version "1.0.0")
5993 (source (origin
5994 (method url-fetch)
5995 (uri (pypi-uri "xlrd" version))
5996 (sha256
5997 (base32
5998 "0s8hjiz01vbhy85xalrz0qlsmd9ypf36zjqrf97hh984spapvy0g"))))
5999 (build-system python-build-system)
6000 (arguments
6001 `(#:phases
6002 (modify-phases %standard-phases
6003 ;; Current test in setup.py does not work as of 1.0.0, so use nose to
6004 ;; run tests instead for now.
6005 (replace 'check (lambda _ (zero? (system* "nosetests")))))))
6006 (native-inputs `(("python-nose" ,python-nose)
6007 ("python-setuptools" ,python-setuptools)))
6008 (home-page "http://www.python-excel.org/")
6009 (synopsis "Library for extracting data from Excel files")
6010 (description "This packages provides a library to extract data from
6011 spreadsheets using Microsoft Excel proprietary file formats @samp{.xls} and
6012 @samp{.xlsx} (versions 2.0 onwards). It has support for Excel dates and is
6013 Unicode-aware. It is not intended as an end-user tool.")
6014 (license license:bsd-3)))
6015
6016 (define-public python2-xlrd
6017 (package-with-python2 python-xlrd))
6018
6019 (define-public python-prettytable
6020 (package
6021 (name "python-prettytable")
6022 (version "0.7.2")
6023 (source
6024 (origin
6025 (method url-fetch)
6026 (uri (string-append
6027 "https://pypi.python.org/packages/source/P/PrettyTable/"
6028 "prettytable-" version ".tar.bz2"))
6029 (sha256
6030 (base32
6031 "0diwsicwmiq2cpzpxri7cyl5fmsvicafw6nfqf6p6p322dji2g45"))))
6032 (build-system python-build-system)
6033 (inputs
6034 `(("python-setuptools" ,python-setuptools)))
6035 (home-page "http://code.google.com/p/prettytable/")
6036 (synopsis "Display tabular data in an ASCII table format")
6037 (description
6038 "A library designed to represent tabular data in visually appealing ASCII
6039 tables. PrettyTable allows for selection of which columns are to be printed,
6040 independent alignment of columns (left or right justified or centred) and
6041 printing of sub-tables by specifying a row range.")
6042 (license license:bsd-3)))
6043
6044 (define-public python2-prettytable
6045 (package-with-python2 python-prettytable))
6046
6047 (define-public python-tables
6048 (package
6049 (name "python-tables")
6050 (version "3.2.2")
6051 (source
6052 (origin
6053 (method url-fetch)
6054 (uri (pypi-uri "tables" version))
6055 (sha256
6056 (base32
6057 "117s6w7s3yxafpmf3zz3svana7xfrsviw01va1xp7h8ylx8v6r1m"))))
6058 (build-system python-build-system)
6059 (arguments
6060 `(;; FIXME: python-build-system does not pass configure-flags to "build"
6061 ;; or "check", so we must override the build and check phases.
6062 #:phases
6063 (modify-phases %standard-phases
6064 (add-after 'unpack 'use-gcc
6065 (lambda _
6066 (substitute* "setup.py"
6067 (("compiler = new_compiler\\(\\)" line)
6068 (string-append line
6069 "\ncompiler.set_executables(compiler='gcc',"
6070 "compiler_so='gcc',"
6071 "linker_exe='gcc',"
6072 "linker_so='gcc -shared')")))
6073 #t))
6074 (replace 'build
6075 (lambda* (#:key inputs #:allow-other-keys)
6076 (zero? (system* "python" "setup.py" "build"
6077 (string-append "--hdf5="
6078 (assoc-ref inputs "hdf5"))))))
6079 (replace 'check
6080 (lambda* (#:key inputs #:allow-other-keys)
6081 (zero? (system* "python" "setup.py" "check"
6082 (string-append "--hdf5="
6083 (assoc-ref inputs "hdf5")))))))))
6084 (propagated-inputs
6085 `(("python-numexpr" ,python-numexpr)
6086 ("python-numpy" ,python-numpy)))
6087 (native-inputs
6088 `(("python-setuptools" ,python-setuptools)
6089 ("python-cython" ,python-cython)
6090 ("pkg-config" ,pkg-config)))
6091 (inputs
6092 `(("hdf5" ,hdf5)
6093 ("bzip2" ,bzip2)
6094 ("zlib" ,zlib)))
6095 (home-page "http://www.pytables.org/")
6096 (synopsis "Hierarchical datasets for Python")
6097 (description "PyTables is a package for managing hierarchical datasets and
6098 designed to efficently cope with extremely large amounts of data.")
6099 (license license:bsd-3)))
6100
6101 (define-public python2-tables
6102 (package-with-python2 python-tables))
6103
6104 (define-public python-pyasn1
6105 (package
6106 (name "python-pyasn1")
6107 (version "0.1.9")
6108 (source
6109 (origin
6110 (method url-fetch)
6111 (uri (pypi-uri "pyasn1" version))
6112 (sha256
6113 (base32
6114 "0zraxni14bqi20kr4bi6nwsh32aibz0fq0xaczfisw0zdpcsqg45"))))
6115 (build-system python-build-system)
6116 (home-page "http://pyasn1.sourceforge.net/")
6117 (synopsis "ASN.1 types and codecs")
6118 (description
6119 "This is an implementation of ASN.1 types and codecs in Python. It is
6120 suitable for a wide range of protocols based on the ASN.1 specification.")
6121 (license license:bsd-2)))
6122
6123 (define-public python2-pyasn1
6124 (package-with-python2 python-pyasn1))
6125
6126 (define-public python-pyasn1-modules
6127 (package
6128 (name "python-pyasn1-modules")
6129 (version "0.0.8")
6130 (source
6131 (origin
6132 (method url-fetch)
6133 (uri (pypi-uri "pyasn1-modules" version))
6134 (sha256
6135 (base32
6136 "0drqgw81xd3fxdlg89kgd79zzrabvfncvkbybi2wr6w2y4s1jmhh"))))
6137 (build-system python-build-system)
6138 (native-inputs
6139 `(("python-setuptools" ,python-setuptools)))
6140 (propagated-inputs
6141 `(("python-pyasn1" ,python-pyasn1)))
6142 (home-page "http://sourceforge.net/projects/pyasn1/")
6143 (synopsis "ASN.1 codec implementations")
6144 (description
6145 "Pyasn1-modules is a collection of Python modules providing ASN.1 types and
6146 implementations of ASN.1-based codecs and protocols.")
6147 (license license:bsd-3)))
6148
6149 (define-public python2-pyasn1-modules
6150 (package-with-python2 python-pyasn1-modules))
6151
6152 (define-public python-ipaddress
6153 (package
6154 (name "python-ipaddress")
6155 (version "1.0.16")
6156 (source (origin
6157 (method url-fetch)
6158 (uri (pypi-uri "ipaddress" version))
6159 (sha256
6160 (base32
6161 "1c3imabdrw8nfksgjjflzg7h4ynjckqacb188rf541m74arq4cas"))))
6162 (build-system python-build-system)
6163 (home-page "https://github.com/phihag/ipaddress")
6164 (synopsis "IP address manipulation library")
6165 (description
6166 "This package provides a fast, lightweight IPv4/IPv6 manipulation library
6167 in Python. This library is used to create, poke at, and manipulate IPv4 and
6168 IPv6 addresses and networks. This is a port of the Python 3.3 ipaddress
6169 module to older versions of Python.")
6170 (license license:psfl)
6171 (properties `((python2-variant . ,(delay python2-ipaddress))))))
6172
6173 (define-public python2-ipaddress
6174 (let ((base (package-with-python2 (strip-python2-variant python-ipaddress))))
6175 (package (inherit base)
6176 (native-inputs
6177 `(("python2-setuptools" ,python2-setuptools)
6178 ,@(package-native-inputs base))))))
6179
6180 (define-public python2-ipaddr
6181 (package
6182 (name "python2-ipaddr")
6183 (version "2.1.11")
6184 (source
6185 (origin
6186 (method url-fetch)
6187 (uri (pypi-uri "ipaddr" version))
6188 (sha256
6189 (base32 "1dwq3ngsapjc93fw61rp17fvzggmab5x1drjzvd4y4q0i255nm8v"))))
6190 (build-system python-build-system)
6191 (arguments
6192 `(#:python ,python-2 ;version 2 only
6193 #:phases
6194 (modify-phases %standard-phases
6195 (replace 'check
6196 (lambda* _
6197 (zero? (system* "python" "ipaddr_test.py")))))))
6198 (home-page "https://github.com/google/ipaddr-py")
6199 (synopsis "IP address manipulation library")
6200 (description
6201 "Ipaddr is a Python@tie{}2 library for creating and manupilating IPv4 and
6202 IPv6 addresses and networks.
6203
6204 For new implementations you may prefer to use the standard module
6205 @code{ipaddress}, which was introduced in Python 3.3 and backported to older
6206 versions of Python.")
6207 (license license:asl2.0)))
6208
6209 (define-public python-idna
6210 (package
6211 (name "python-idna")
6212 (version "2.0")
6213 (source
6214 (origin
6215 (method url-fetch)
6216 (uri (string-append "https://pypi.python.org/packages/source/i/"
6217 "idna/idna-" version ".tar.gz"))
6218 (sha256
6219 (base32
6220 "0frxgmgi234lr9hylg62j69j4ik5zhg0wz05w5dhyacbjfnrl68n"))))
6221 (build-system python-build-system)
6222 (native-inputs
6223 `(("python-setuptools" ,python-setuptools)))
6224 (home-page "https://github.com/kjd/idna")
6225 (synopsis "Internationalized domain names in applications")
6226 (description
6227 "This is a library to support the Internationalised Domain Names in
6228 Applications (IDNA) protocol as specified in RFC 5891. This version of the
6229 protocol is often referred to as “IDNA2008” and can produce different results
6230 from the earlier standard from 2003. The library is also intended to act as a
6231 suitable drop-in replacement for the “encodings.idna” module that comes with
6232 the Python standard library but currently only supports the older 2003
6233 specification.")
6234 (license license:bsd-4)))
6235
6236 (define-public python2-idna
6237 (package-with-python2 python-idna))
6238
6239 (define-public python-pretend
6240 (package
6241 (name "python-pretend")
6242 (version "1.0.8")
6243 (source
6244 (origin
6245 (method url-fetch)
6246 (uri (string-append "https://pypi.python.org/packages/source/p/"
6247 "pretend/pretend-" version ".tar.gz"))
6248 (sha256
6249 (base32
6250 "0r5r7ygz9m6d2bklflbl84cqhjkc2q12xgis8268ygjh30g2q3wk"))))
6251 (build-system python-build-system)
6252 (native-inputs
6253 `(("python-setuptools" ,python-setuptools)))
6254 (home-page "https://github.com/alex/pretend")
6255 (synopsis "Library for stubbing in Python")
6256 (description
6257 "Pretend is a library to make stubbing with Python easier. Stubbing is a
6258 technique for writing tests. You may hear the term mixed up with mocks,
6259 fakes, or doubles. Basically, a stub is an object that returns pre-canned
6260 responses, rather than doing any computation.")
6261 (license license:bsd-3)))
6262
6263 (define-public python2-pretend
6264 (package-with-python2 python-pretend))
6265
6266 (define-public python-cryptography-vectors
6267 (package
6268 (name "python-cryptography-vectors")
6269 (version "1.3.4")
6270 (source
6271 (origin
6272 (method url-fetch)
6273 (uri (pypi-uri "cryptography_vectors" version))
6274 (sha256
6275 (base32
6276 "15h1iz2klnpb4f8djxy7cpbnyn3wbjp7bnj4pz6s7w6plghbq524"))))
6277 (build-system python-build-system)
6278 (native-inputs
6279 `(("python-setuptools" ,python-setuptools)))
6280 (home-page "https://github.com/pyca/cryptography")
6281 (synopsis "Test vectors for the cryptography package")
6282 (description
6283 "This package contains test vectors for the cryptography package.")
6284 ;; Distributed under either BSD-3 or ASL2.0
6285 (license (list license:bsd-3 license:asl2.0))))
6286
6287 (define-public python2-cryptography-vectors
6288 (package-with-python2 python-cryptography-vectors))
6289
6290 (define-public python-cryptography
6291 (package
6292 (name "python-cryptography")
6293 (version "1.3.4")
6294 (source
6295 (origin
6296 (method url-fetch)
6297 (uri (pypi-uri "cryptography" version))
6298 (sha256
6299 (base32
6300 "1a85l548w5vvq3yhz0az7ajg2ijixzp6gagapw6wgrqvq28ghgs2"))))
6301 (build-system python-build-system)
6302 (inputs
6303 `(("openssl" ,openssl)))
6304 (propagated-inputs
6305 `(("python-cffi" ,python-cffi)
6306 ("python-six" ,python-six)
6307 ("python-pyasn1" ,python-pyasn1)
6308 ("python-idna" ,python-idna)
6309 ("python-iso8601" ,python-iso8601)))
6310 (native-inputs
6311 `(("python-cryptography-vectors" ,python-cryptography-vectors)
6312 ("python-hypothesis" ,python-hypothesis)
6313 ("python-setuptools" ,python-setuptools)
6314 ("python-pretend" ,python-pretend)
6315 ("python-pyasn1" ,python-pyasn1)
6316 ("python-pyasn1-modules" ,python-pyasn1-modules)
6317 ("python-pytest" ,python-pytest)))
6318 (home-page "https://github.com/pyca/cryptography")
6319 (synopsis "Cryptographic recipes and primitives for Python")
6320 (description
6321 "cryptography is a package which provides cryptographic recipes and
6322 primitives to Python developers. It aims to be the “cryptographic standard
6323 library” for Python. The package includes both high level recipes, and low
6324 level interfaces to common cryptographic algorithms such as symmetric ciphers,
6325 message digests and key derivation functions.")
6326 ;; Distributed under either BSD-3 or ASL2.0
6327 (license (list license:bsd-3 license:asl2.0))
6328 (properties `((python2-variant . ,(delay python2-cryptography))))))
6329
6330 (define-public python2-cryptography
6331 (let ((crypto (package-with-python2
6332 (strip-python2-variant python-cryptography))))
6333 (package (inherit crypto)
6334 (propagated-inputs
6335 `(("python2-ipaddress" ,python2-ipaddress)
6336 ("python2-backport-ssl-match-hostname"
6337 ,python2-backport-ssl-match-hostname)
6338 ("python2-enum34" ,python2-enum34)
6339 ,@(package-propagated-inputs crypto))))))
6340
6341 (define-public python-pyopenssl
6342 (package
6343 (name "python-pyopenssl")
6344 (version "16.1.0")
6345 (source
6346 (origin
6347 (method url-fetch)
6348 (uri (pypi-uri "pyOpenSSL" version))
6349 (sha256
6350 (base32
6351 "0prm06zz7hl6bk5s2lqzw25lq6smayfv2fgiliw2rbqxlyiavxw8"))))
6352 (build-system python-build-system)
6353 (propagated-inputs
6354 `(("python-cryptography" ,python-cryptography)
6355 ("python-six" ,python-six)))
6356 (inputs
6357 `(("openssl" ,openssl)))
6358 (native-inputs
6359 `(("python-setuptools" ,python-setuptools)))
6360 (home-page "https://github.com/pyca/pyopenssl")
6361 (synopsis "Python wrapper module around the OpenSSL library")
6362 (description
6363 "PyOpenSSL is a high-level wrapper around a subset of the OpenSSL
6364 library.")
6365 (license license:asl2.0)))
6366
6367 (define-public python2-pyopenssl
6368 (package-with-python2 python-pyopenssl))
6369
6370 (define-public python-pip
6371 (package
6372 (name "python-pip")
6373 (version "8.0.2")
6374 (source
6375 (origin
6376 (method url-fetch)
6377 (uri (pypi-uri "pip" version))
6378 (sha256
6379 (base32
6380 "08cm8d4228fj0qnrysy3qv1a6022zr3dcs25amd14lgxil6vvx26"))))
6381 (build-system python-build-system)
6382 (inputs
6383 `(("python-setuptools" ,python-setuptools)
6384 ("python-virtualenv" ,python-virtualenv)
6385 ;; Tests
6386 ("python-mock" ,python-mock)
6387 ("python-pytest" ,python-pytest)
6388 ("python-scripttest" ,python-scripttest)))
6389 (home-page "https://pip.pypa.io/")
6390 (synopsis
6391 "Package manager for Python software")
6392 (description
6393 "Pip is a package manager for Python software, that finds packages on the
6394 Python Package Index (PyPI).")
6395 (license license:expat)))
6396
6397 (define-public python2-pip
6398 (package-with-python2 python-pip))
6399
6400 (define-public python-tlsh
6401 (package
6402 (name "python-tlsh")
6403 (version "3.4.4")
6404 (home-page "https://github.com/trendmicro/tlsh")
6405 (source (origin
6406 (method url-fetch)
6407 (uri (string-append "https://github.com/trendmicro/tlsh/archive/v"
6408 version ".tar.gz"))
6409 (sha256
6410 (base32
6411 "00bhzjqrlh7v538kbkbn8lgx976j1138al3sdhklaizqjvpwyk4r"))
6412 (file-name (string-append name "-" version ".tar.gz"))))
6413 (build-system cmake-build-system)
6414 (arguments
6415 '(#:out-of-source? #f
6416 #:phases (modify-phases %standard-phases
6417 (replace
6418 'install
6419 (lambda* (#:key outputs #:allow-other-keys)
6420 ;; Build and install the Python bindings. The underlying
6421 ;; C++ library is apparently not meant to be installed.
6422 (let ((out (assoc-ref outputs "out")))
6423 (with-directory-excursion "py_ext"
6424 (and (system* "python" "setup.py" "build")
6425 (system* "python" "setup.py" "install"
6426 (string-append "--prefix=" out))))))))))
6427 (inputs `(("python" ,python-wrapper))) ;for the bindings
6428 (synopsis "Fuzzy matching library for Python")
6429 (description
6430 "Trend Micro Locality Sensitive Hash (TLSH) is a fuzzy matching library.
6431 Given a byte stream with a minimum length of 256 bytes, TLSH generates a hash
6432 value which can be used for similarity comparisons. Similar objects have
6433 similar hash values, which allows for the detection of similar objects by
6434 comparing their hash values. The byte stream should have a sufficient amount
6435 of complexity; for example, a byte stream of identical bytes will not generate
6436 a hash value.")
6437 (license license:asl2.0)))
6438
6439 (define-public python2-tlsh
6440 (package
6441 (inherit python-tlsh)
6442 (name "python2-tlsh")
6443 (inputs `(("python" ,python-2)))))
6444
6445 (define-public python-termcolor
6446 (package
6447 (name "python-termcolor")
6448 (version "1.1.0")
6449 (source
6450 (origin
6451 (method url-fetch)
6452 (uri (pypi-uri "python-termcolor" version))
6453 (sha256
6454 (base32
6455 "0fv1vq14rpqwgazxg4981904lfyp84mnammw7y046491cv76jv8x"))))
6456 (build-system python-build-system)
6457 (arguments
6458 ;; There are no tests.
6459 `(#:tests? #f))
6460 (home-page "http://pypi.python.org/pypi/termcolor")
6461 (synopsis "ANSII Color formatting for terminal output")
6462 (description
6463 "This package provides ANSII Color formatting for output in terminals.")
6464 (license license:expat)))
6465
6466 (define-public python2-termcolor
6467 (package-with-python2 python-termcolor))
6468
6469 (define-public python-libarchive-c
6470 (package
6471 (name "python-libarchive-c")
6472 (version "2.2")
6473 (source (origin
6474 (method url-fetch)
6475 (uri (pypi-uri "libarchive-c" version))
6476 (sha256
6477 (base32
6478 "0z4r7v3dhd6b3120mav05ff08srih176r2rg5k8kn7mjd9pslm2x"))))
6479 (build-system python-build-system)
6480 (arguments
6481 '(#:phases (modify-phases %standard-phases
6482 (add-before
6483 'build 'reference-libarchive
6484 (lambda* (#:key inputs #:allow-other-keys)
6485 ;; Retain the absolute file name of libarchive.so.
6486 (let ((libarchive (assoc-ref inputs "libarchive")))
6487 (substitute* "libarchive/ffi.py"
6488 (("find_library\\('archive'\\)")
6489 (string-append "'" libarchive
6490 "/lib/libarchive.so'"))))
6491
6492 ;; Do not make a compressed egg (see
6493 ;; <http://bugs.gnu.org/20765>).
6494 (let ((port (open-file "setup.cfg" "a")))
6495 (display "\n[easy_install]\nzip_ok = 0\n"
6496 port)
6497 (close-port port)
6498 #t))))))
6499 (inputs
6500 `(("python-setuptools" ,python-setuptools)
6501 ("libarchive" ,libarchive)))
6502 (home-page "https://github.com/Changaco/python-libarchive-c")
6503 (synopsis "Python interface to libarchive")
6504 (description
6505 "This package provides Python bindings to libarchive, a C library to
6506 access possibly compressed archives in many different formats. It uses
6507 Python's @code{ctypes} foreign function interface (FFI).")
6508 (license license:lgpl2.0+)))
6509
6510 (define-public python2-libarchive-c
6511 (package-with-python2 python-libarchive-c))
6512
6513 (define-public python-file
6514 (package
6515 (inherit file)
6516 (name "python-file")
6517 (build-system python-build-system)
6518 (arguments
6519 '(#:tests? #f ;no tests
6520 #:phases (modify-phases %standard-phases
6521 (add-before 'build 'change-directory
6522 (lambda _
6523 (chdir "python")
6524 #t))
6525 (add-before 'build 'set-library-file-name
6526 (lambda* (#:key inputs #:allow-other-keys)
6527 (let ((file (assoc-ref inputs "file")))
6528 (substitute* "magic.py"
6529 (("find_library\\('magic'\\)")
6530 (string-append "'" file "/lib/libmagic.so'")))
6531 #t))))))
6532 (inputs `(("file" ,file)))
6533 (self-native-input? #f)
6534 (synopsis "Python bindings to the libmagic file type guesser. Note that
6535 this module and the python-magic module both provide a \"magic.py\" file;
6536 these two modules, which are different and were developed separately, both
6537 serve the same purpose: provide Python bindings for libmagic.")))
6538
6539 (define-public python2-file
6540 (package-with-python2 python-file))
6541
6542 (define-public python-debian
6543 (package
6544 (name "python-debian")
6545 (version "0.1.23")
6546 (source
6547 (origin
6548 (method url-fetch)
6549 (uri (string-append
6550 "https://pypi.python.org/packages/source/p/python-debian/python-debian-"
6551 version ".tar.gz"))
6552 (sha256
6553 (base32
6554 "193faznwnjc3n5991wyzim6h9gyq1zxifmfrnpm3avgkh7ahyynh"))))
6555 (build-system python-build-system)
6556 (inputs
6557 `(("python-six" ,python-six)))
6558 (native-inputs
6559 `(("python-setuptools" ,python-setuptools)))
6560 (home-page "http://packages.debian.org/sid/python-debian")
6561 (synopsis "Debian package related modules")
6562 (description
6563 ;; XXX: Use @enumerate instead of @itemize to work around
6564 ;; <http://bugs.gnu.org/21772>.
6565 "This package provides Python modules that abstract many formats of
6566 Debian-related files, such as:
6567
6568 @enumerate
6569 @item Debtags information;
6570 @item @file{debian/changelog} files;
6571 @item packages files, pdiffs;
6572 @item control files of single or multiple RFC822-style paragraphs---e.g.
6573 @file{debian/control}, @file{.changes}, @file{.dsc};
6574 @item Raw @file{.deb} and @file{.ar} files, with (read-only) access to
6575 contained files and meta-information.
6576 @end enumerate\n")
6577
6578 ;; Modules are either GPLv2+ or GPLv3+.
6579 (license license:gpl3+)))
6580
6581 (define-public python2-debian
6582 (package-with-python2 python-debian))
6583
6584 (define-public python-chardet
6585 (package
6586 (name "python-chardet")
6587 (version "2.3.0")
6588 (source
6589 (origin
6590 (method url-fetch)
6591 (uri (string-append
6592 "https://pypi.python.org/packages/source/c/chardet/chardet-"
6593 version
6594 ".tar.gz"))
6595 (sha256
6596 (base32
6597 "1ak87ikcw34fivcgiz2xvi938dmclh078az65l9x3rmgljrkhgp5"))))
6598 (build-system python-build-system)
6599 (native-inputs
6600 `(("python-setuptools" ,python-setuptools)))
6601 (home-page "https://github.com/chardet/chardet")
6602 (synopsis "Universal encoding detector for Python 2 and 3")
6603 (description
6604 "This package provides @code{chardet}, a Python module that can
6605 automatically detect a wide range of file encodings.")
6606 (license license:lgpl2.1+)))
6607
6608 (define-public python2-chardet
6609 (package-with-python2 python-chardet))
6610
6611 (define-public python-docopt
6612 (package
6613 (name "python-docopt")
6614 (version "0.6.2")
6615 (source
6616 (origin
6617 (method url-fetch)
6618 ;; The release on PyPI does not include tests.
6619 (uri (string-append
6620 "https://github.com/docopt/docopt/archive/"
6621 version ".tar.gz"))
6622 (file-name (string-append name "-" version ".tar.gz"))
6623 (sha256
6624 (base32
6625 "16bf890xbdz3m30rsv2qacklh2rdn1zrfspfnwzx9g7vwz8yw4r1"))))
6626 (build-system python-build-system)
6627 (native-inputs
6628 `(("python-pytest" ,python-pytest)
6629 ("python-setuptools" ,python-setuptools)))
6630 (arguments
6631 `(#:phases (alist-replace
6632 'check
6633 (lambda _ (zero? (system* "py.test")))
6634 %standard-phases)))
6635 (home-page "http://docopt.org")
6636 (synopsis "Command-line interface description language for Python")
6637 (description "This library allows the user to define a command-line
6638 interface from a program's help message rather than specifying it
6639 programatically with command-line parsers like @code{getopt} and
6640 @code{argparse}.")
6641 (license license:expat)))
6642
6643 (define-public python2-docopt
6644 (package-with-python2 python-docopt))
6645
6646 (define-public python-zope-event
6647 (package
6648 (name "python-zope-event")
6649 (version "4.1.0")
6650 (source
6651 (origin
6652 (method url-fetch)
6653 (uri (string-append "https://pypi.python.org/packages/source/z"
6654 "/zope.event/zope.event-" version ".tar.gz"))
6655 (sha256
6656 (base32
6657 "11p75zpfz3ffhz21nzx9wb23xs993ck5s6hkjcvhswwizni5jynw"))))
6658 (build-system python-build-system)
6659 (inputs
6660 `(("python-setuptools" ,python-setuptools)))
6661 (home-page "http://pypi.python.org/pypi/zope.event")
6662 (synopsis "Event publishing system for Python")
6663 (description "Zope.event provides an event publishing API, intended for
6664 use by applications which are unaware of any subscribers to their events. It
6665 is a simple event-dispatching system on which more sophisticated event
6666 dispatching systems can be built.")
6667 (license license:zpl2.1)))
6668
6669 (define-public python2-zope-event
6670 (package-with-python2 python-zope-event))
6671
6672 (define-public python-zope-interface
6673 (package
6674 (name "python-zope-interface")
6675 (version "4.1.3")
6676 (source
6677 (origin
6678 (method url-fetch)
6679 (uri (string-append "https://pypi.python.org/packages/source/z"
6680 "/zope.interface/zope.interface-" version ".tar.gz"))
6681 (sha256
6682 (base32
6683 "0ks8h73b2g4bkad821qbv0wzjppdrwys33i7ka45ik3wxjg1l8if"))))
6684 (build-system python-build-system)
6685 (propagated-inputs
6686 `(("python-zope-event" ,python-zope-event)))
6687 (home-page "https://github.com/zopefoundation/zope.interface")
6688 (synopsis "Python implementation of the \"design by contract\"
6689 methodology")
6690 (description "Zope.interface provides an implementation of \"object
6691 interfaces\" for Python. Interfaces are a mechanism for labeling objects as
6692 conforming to a given API or contract.")
6693 (license license:zpl2.1)))
6694
6695 (define-public python2-zope-interface
6696 (package-with-python2 python-zope-interface))
6697
6698 (define-public python-zope-exceptions
6699 (package
6700 (name "python-zope-exceptions")
6701 (version "4.0.8")
6702 (source
6703 (origin
6704 (method url-fetch)
6705 (uri (string-append "https://pypi.python.org/packages/source/z"
6706 "/zope.exceptions/zope.exceptions-"
6707 version ".tar.gz"))
6708 (sha256
6709 (base32
6710 "0zwxaaa66sqxg5k7zcrvs0fbg9ym1njnxnr28dfmchzhwjvwnfzl"))))
6711 (build-system python-build-system)
6712 (arguments
6713 '(#:tests? #f)) ; circular dependency with zope.testrunner
6714 (propagated-inputs
6715 `(("python-zope-interface" ,python-zope-interface)))
6716 (home-page "http://cheeseshop.python.org/pypi/zope.exceptions")
6717 (synopsis "Zope exceptions")
6718 (description "Zope.exceptions provides general-purpose exception types
6719 that have uses outside of the Zope framework.")
6720 (license license:zpl2.1)))
6721
6722 (define-public python2-zope-exceptions
6723 (package-with-python2 python-zope-exceptions))
6724
6725 (define-public python-zope-testing
6726 (package
6727 (name "python-zope-testing")
6728 (version "4.5.0")
6729 (source
6730 (origin
6731 (method url-fetch)
6732 (uri (string-append "https://pypi.python.org/packages/source/z"
6733 "/zope.testing/zope.testing-" version ".tar.gz"))
6734 (sha256
6735 (base32
6736 "1yvglxhzvhl45mndvn9gskx2ph30zz1bz7rrlyfs62fv2pvih90s"))
6737 (modules '((guix build utils)))
6738 (snippet
6739 '(begin
6740 ;; Remove pre-compiled .pyc files backup files from source.
6741 (for-each delete-file (find-files "." "(\\.pyc|~)$"))
6742 #t))))
6743 (build-system python-build-system)
6744 (native-inputs
6745 `(("python-zope-exceptions" ,python-zope-exceptions)))
6746 (propagated-inputs
6747 `(("python-zope-interface" ,python-zope-interface)))
6748 (home-page "http://pypi.python.org/pypi/zope.testing")
6749 (synopsis "Zope testing helpers")
6750 (description "Zope.testing provides a number of testing utilities for HTML
6751 forms, HTTP servers, regular expressions, and more.")
6752 (license license:zpl2.1)))
6753
6754 (define-public python2-zope-testing
6755 (package-with-python2 python-zope-testing))
6756
6757 (define-public python-zope-testrunner
6758 (package
6759 (name "python-zope-testrunner")
6760 (version "4.4.9")
6761 (source
6762 (origin
6763 (method url-fetch)
6764 (uri (string-append "https://pypi.python.org/packages/source/z"
6765 "/zope.testrunner/zope.testrunner-"
6766 version ".zip"))
6767 (sha256
6768 (base32
6769 "1r7iqknhh55y45f64mz5hghgvzx34h1i11k350s0avx6q8gznja1"))))
6770 (build-system python-build-system)
6771 (native-inputs
6772 `(("python-six" ,python-six)
6773 ("python-zope-exceptions" ,python-zope-exceptions)
6774 ("python-zope-testing" ,python-zope-testing)
6775 ("unzip" ,unzip)))
6776 (propagated-inputs
6777 `(("python-zope-interface" ,python-zope-interface)))
6778 (home-page "http://pypi.python.org/pypi/zope.testrunner")
6779 (synopsis "Zope testrunner script")
6780 (description "Zope.testrunner provides a script for running Python
6781 tests.")
6782 (license license:zpl2.1)))
6783
6784 (define-public python2-zope-testrunner
6785 (let ((base (package-with-python2 python-zope-testrunner)))
6786 (package
6787 (inherit base)
6788 (native-inputs
6789 (append (package-native-inputs base)
6790 `(("python2-subunit" ,python2-subunit)
6791 ("python2-mimeparse" ,python2-mimeparse)))))))
6792
6793 (define-public python-zope-i18nmessageid
6794 (package
6795 (name "python-zope-i18nmessageid")
6796 (version "4.0.3")
6797 (source
6798 (origin
6799 (method url-fetch)
6800 (uri (string-append
6801 "https://pypi.python.org/packages/source/z"
6802 "/zope.i18nmessageid/zope.i18nmessageid-"
6803 version ".tar.gz"))
6804 (sha256
6805 (base32
6806 "1rslyph0klk58dmjjy4j0jxy21k03azksixc3x2xhqbkv97cmzml"))))
6807 (build-system python-build-system)
6808 (inputs
6809 `(("python-setuptools" ,python-setuptools)))
6810 (home-page "http://pypi.python.org/pypi/zope.i18nmessageid")
6811 (synopsis "Message identifiers for internationalization")
6812 (description "Zope.i18nmessageid provides facilities for declaring
6813 internationalized messages within program source text.")
6814 (license license:zpl2.1)))
6815
6816 (define-public python2-zope-i18nmessageid
6817 (package-with-python2 python-zope-i18nmessageid))
6818
6819 (define-public python-zope-schema
6820 (package
6821 (name "python-zope-schema")
6822 (version "4.4.2")
6823 (source
6824 (origin
6825 (method url-fetch)
6826 (uri (string-append "https://pypi.python.org/packages/source/z"
6827 "/zope.schema/zope.schema-" version ".tar.gz"))
6828 (sha256
6829 (base32
6830 "1p943jdxb587dh7php4vx04qvn7b2877hr4qs5zyckvp5afhhank"))))
6831 (build-system python-build-system)
6832 (propagated-inputs
6833 `(("python-zope-event" ,python-zope-event)
6834 ("python-zope-interface" ,python-zope-interface)))
6835 (native-inputs
6836 `(("python-zope-testing" ,python-zope-testing)))
6837 (home-page "http://pypi.python.org/pypi/zope.schema")
6838 (synopsis "Zope data schemas")
6839 (description "Zope.scheme provides extensions to zope.interface for
6840 defining data schemas.")
6841 (license license:zpl2.1)))
6842
6843 (define-public python2-zope-schema
6844 (package-with-python2 python-zope-schema))
6845
6846 (define-public python-zope-configuration
6847 (package
6848 (name "python-zope-configuration")
6849 (version "4.0.3")
6850 (source (origin
6851 (method url-fetch)
6852 (uri (string-append "https://pypi.python.org/packages/source/z"
6853 "/zope.configuration/zope.configuration-"
6854 version ".tar.gz"))
6855 (sha256
6856 (base32
6857 "1x9dfqypgympnlm25p9m43xh4qv3p7d75vksv9pzqibrb4cggw5n"))))
6858 (build-system python-build-system)
6859 (propagated-inputs
6860 `(("python-zope-i18nmessageid" ,python-zope-i18nmessageid)
6861 ("python-zope-schema" ,python-zope-schema)))
6862 (home-page "http://pypi.python.org/pypi/zope.configuration")
6863 (synopsis "Zope Configuration Markup Language")
6864 (description "Zope.configuration implements ZCML, the Zope Configuration
6865 Markup Language.")
6866 (license license:zpl2.1)))
6867
6868 (define-public python2-zope-configuration
6869 (package-with-python2 python-zope-configuration))
6870
6871 (define-public python-zope-proxy
6872 (package
6873 (name "python-zope-proxy")
6874 (version "4.1.6")
6875 (source
6876 (origin
6877 (method url-fetch)
6878 (uri (string-append "https://pypi.python.org/packages/source/z"
6879 "/zope.proxy/zope.proxy-" version ".tar.gz"))
6880 (sha256
6881 (base32
6882 "0pqwwmvm1prhwv1ziv9lp8iirz7xkwb6n2kyj36p2h0ppyyhjnm4"))))
6883 (build-system python-build-system)
6884 (propagated-inputs
6885 `(("python-zope-interface" ,python-zope-interface)))
6886 (home-page "http://pypi.python.org/pypi/zope.proxy")
6887 (synopsis "Generic, transparent proxies")
6888 (description "Zope.proxy provides generic, transparent proxies for Python.
6889 Proxies are special objects which serve as mostly-transparent wrappers around
6890 another object, intervening in the apparent behavior of the wrapped object
6891 only when necessary to apply the policy (e.g., access checking, location
6892 brokering, etc.) for which the proxy is responsible.")
6893 (license license:zpl2.1)))
6894
6895 (define-public python2-zope-proxy
6896 (package-with-python2 python-zope-proxy))
6897
6898 (define-public python-zope-location
6899 (package
6900 (name "python-zope-location")
6901 (version "4.0.3")
6902 (source
6903 (origin
6904 (method url-fetch)
6905 (uri (string-append "https://pypi.python.org/packages/source/z"
6906 "/zope.location/zope.location-" version ".tar.gz"))
6907 (sha256
6908 (base32
6909 "1nj9da4ksiyv3h8n2vpzwd0pb03mdsh7zy87hfpx72b6p2zcwg74"))))
6910 (build-system python-build-system)
6911 (native-inputs
6912 `(("python-zope-proxy" ,python-zope-proxy)
6913 ("python-zope-schema" ,python-zope-schema)))
6914 (home-page "http://pypi.python.org/pypi/zope.location/")
6915 (synopsis "Zope location library")
6916 (description "Zope.location implements the concept of \"locations\" in
6917 Zope3, which are are special objects that have a structural location.")
6918 (license license:zpl2.1)))
6919
6920 (define-public python2-zope-location
6921 (package-with-python2 python-zope-location))
6922
6923 (define-public python-zope-security
6924 (package
6925 (name "python-zope-security")
6926 (version "4.0.3")
6927 (source
6928 (origin
6929 (method url-fetch)
6930 (uri (string-append "https://pypi.python.org/packages/source/z"
6931 "/zope.security/zope.security-" version ".tar.gz"))
6932 (sha256
6933 (base32
6934 "14zmf684amc0x32kq05yxnhfqd1cmyhafkw05gn81rn90zjv6ssy"))))
6935 (build-system python-build-system)
6936 (propagated-inputs
6937 `(("python-zope-i18nmessageid" ,python-zope-i18nmessageid)
6938 ("python-zope-component" ,python-zope-component)
6939 ("python-zope-location" ,python-zope-location)
6940 ("python-zope-proxy" ,python-zope-proxy)
6941 ("python-zope-schema" ,python-zope-schema)
6942 ("python-zope-testrunner" ,python-zope-testrunner)
6943 ("python-zope-testing" ,python-zope-testing)))
6944 (home-page "http://pypi.python.org/pypi/zope.security")
6945 (synopsis "Zope security framework")
6946 (description "Zope.security provides a generic mechanism to implement
6947 security policies on Python objects.")
6948 (license license:zpl2.1)))
6949
6950 (define-public python2-zope-security
6951 (let ((zope-security (package-with-python2 python-zope-security)))
6952 (package (inherit zope-security)
6953 (propagated-inputs
6954 `(("python2-zope-testrunner" ,python2-zope-testrunner)
6955 ,@(alist-delete
6956 "python-zope-testrunner"
6957 (package-propagated-inputs zope-security)))))))
6958
6959 (define-public python-zope-component
6960 (package
6961 (name "python-zope-component")
6962 (version "4.2.2")
6963 (source
6964 (origin
6965 (method url-fetch)
6966 (uri (string-append "https://pypi.python.org/packages/source/z"
6967 "/zope.component/zope.component-" version ".tar.gz"))
6968 (sha256
6969 (base32
6970 "06pqr8m5jv12xjyy5b59hh9anl61cxkzhw9mka33r3nxalmi2b18"))))
6971 (build-system python-build-system)
6972 (arguments
6973 ;; Skip tests due to circular dependency with python-zope-security.
6974 '(#:tests? #f))
6975 (native-inputs
6976 `(("python-zope-testing" ,python-zope-testing)))
6977 (propagated-inputs
6978 `(("python-zope-event" ,python-zope-event)
6979 ("python-zope-interface" ,python-zope-interface)
6980 ("python-zope-i18nmessageid" ,python-zope-i18nmessageid)
6981 ("python-zope-configuration" ,python-zope-configuration)))
6982 (home-page "https://github.com/zopefoundation/zope.component")
6983 (synopsis "Zope Component Architecture")
6984 (description "Zope.component represents the core of the Zope Component
6985 Architecture. Together with the zope.interface package, it provides
6986 facilities for defining, registering and looking up components.")
6987 (license license:zpl2.1)))
6988
6989 (define-public python2-zope-component
6990 (package-with-python2 python-zope-component))
6991
6992 (define-public python-pythondialog
6993 (package
6994 (name "python-pythondialog")
6995 (version "3.4.0")
6996 (source
6997 (origin
6998 (method url-fetch)
6999 (uri (pypi-uri "pythondialog" version))
7000 (sha256
7001 (base32
7002 "1728ghsran47jczn9bhlnkvk5bvqmmbihabgif5h705b84r1272c"))))
7003 (build-system python-build-system)
7004 (arguments
7005 `(#:phases
7006 (modify-phases %standard-phases
7007 (add-after 'unpack 'patch-path
7008 (lambda* (#:key inputs #:allow-other-keys)
7009 (let* ((dialog (assoc-ref inputs "dialog")))
7010 ;; Since this library really wants to grovel the search path, we
7011 ;; must hardcode dialog's store path into it.
7012 (substitute* "dialog.py"
7013 (("os.getenv\\(\"PATH\", \":/bin:/usr/bin\"\\)")
7014 (string-append "os.getenv(\"PATH\") + \":" dialog "/bin\"")))
7015 #t))))
7016 #:tests? #f)) ; no test suite
7017 (propagated-inputs
7018 `(("dialog" ,dialog)))
7019 (home-page "http://pythondialog.sourceforge.net/")
7020 (synopsis "Python interface to the UNIX dialog utility")
7021 (description "A Python wrapper for the dialog utility. Its purpose is to
7022 provide an easy to use, pythonic and comprehensive Python interface to dialog.
7023 This allows one to make simple text-mode user interfaces on Unix-like systems")
7024 (license license:lgpl2.1)
7025 (properties `((python2-variant . ,(delay python2-pythondialog))))))
7026
7027 (define-public python2-pythondialog
7028 (let ((base (package-with-python2 (strip-python2-variant python-pythondialog))))
7029 (package
7030 (inherit base)
7031 (version (package-version python-pythondialog))
7032 (source (origin
7033 (method url-fetch)
7034 (uri (pypi-uri "python2-pythondialog" version))
7035 (sha256
7036 (base32
7037 "0d8k7lxk50imdyx85lv8j98i4c93a71iwpapnl1506rpkbm9qvd9")))))))
7038
7039 (define-public python-pyrfc3339
7040 (package
7041 (name "python-pyrfc3339")
7042 (version "1.0")
7043 (source
7044 (origin
7045 (method url-fetch)
7046 (uri (pypi-uri "pyRFC3339" version))
7047 (sha256
7048 (base32
7049 "0dgm4l9y8jiax5cp6yxjd2i27cq8h33sh81n1wfbmnmqb32cdywd"))))
7050 (build-system python-build-system)
7051 (propagated-inputs
7052 `(("python-pytz" ,python-pytz)))
7053 (native-inputs
7054 `(("python-nose" ,python-nose)
7055 ("python-setuptools" ,python-setuptools)))
7056 (home-page "https://github.com/kurtraschke/pyRFC3339")
7057 (synopsis "Python timestamp library")
7058 (description "Python library for generating and parsing RFC 3339-compliant
7059 timestamps.")
7060 (license license:expat)))
7061
7062 (define-public python2-pyrfc3339
7063 (package-with-python2 python-pyrfc3339))
7064
7065 (define-public python-werkzeug
7066 (package
7067 (name "python-werkzeug")
7068 (version "0.11.11")
7069 (source
7070 (origin
7071 (method url-fetch)
7072 (uri (pypi-uri "Werkzeug" version))
7073 (sha256
7074 (base32
7075 "1rgpq8a2qv26d75v9j3b074inirlyy6y4b5x4rxblp202jy4cb77"))))
7076 (build-system python-build-system)
7077 (native-inputs
7078 `(("python-pytest" ,python-pytest)))
7079 (home-page "http://werkzeug.pocoo.org/")
7080 (synopsis "Utilities for WSGI applications")
7081 (description "One of the most advanced WSGI utility modules. It includes a
7082 powerful debugger, full-featured request and response objects, HTTP utilities to
7083 handle entity tags, cache control headers, HTTP dates, cookie handling, file
7084 uploads, a powerful URL routing system and a bunch of community-contributed
7085 addon modules.")
7086 (license license:x11)))
7087
7088 (define-public python2-werkzeug
7089 (package-with-python2 python-werkzeug))
7090
7091 (define-public python-configobj
7092 (package
7093 (name "python-configobj")
7094 (version "5.0.6")
7095 (source (origin
7096 (method url-fetch)
7097 (uri (string-append
7098 "https://pypi.python.org/packages/source/c/configobj/"
7099 "configobj-" version ".tar.gz"))
7100 (sha256
7101 (base32
7102 "00h9rcmws03xvdlfni11yb60bz3kxfvsj6dg6nrpzj71f03nbxd2"))
7103 ;; Patch setup.py so it looks for python-setuptools, which is
7104 ;; required to parse the keyword 'install_requires' in setup.py.
7105 (patches (search-patches "python-configobj-setuptools.patch"))))
7106 (build-system python-build-system)
7107 (native-inputs
7108 `(("python-setuptools" ,python-setuptools)
7109 ("python-six" ,python-six)))
7110 (synopsis "Config file reading, writing and validation")
7111 (description "ConfigObj is a simple but powerful config file reader and
7112 writer: an ini file round tripper. Its main feature is that it is very easy to
7113 use, with a straightforward programmer’s interface and a simple syntax for
7114 config files.")
7115 (home-page "https://github.com/DiffSK/configobj")
7116 (license license:bsd-3)))
7117
7118 (define-public python2-configobj
7119 (package-with-python2 python-configobj))
7120
7121 (define-public python-configargparse
7122 (package
7123 (name "python-configargparse")
7124 (version "0.10.0")
7125 (source (origin
7126 (method url-fetch)
7127 (uri (string-append
7128 "https://pypi.python.org/packages/source/C/ConfigArgParse/"
7129 "ConfigArgParse-" version ".tar.gz"))
7130 (sha256
7131 (base32
7132 "19wh919gbdbzxzpagg52q3lm62yicm95ddlcx77dyjc1slyshl1v"))))
7133 (build-system python-build-system)
7134 (arguments
7135 ;; FIXME: Bug in test suite filed upstream:
7136 ;; https://github.com/bw2/ConfigArgParse/issues/32
7137 '(#:tests? #f))
7138 (synopsis "Replacement for argparse")
7139 (description "A drop-in replacement for argparse that allows options to also
7140 be set via config files and/or environment variables.")
7141 (home-page "https://github.com/bw2/ConfigArgParse")
7142 (license license:expat)))
7143
7144 (define-public python2-configargparse
7145 (package-with-python2 python-configargparse))
7146
7147 (define-public python-ndg-httpsclient
7148 (package
7149 (name "python-ndg-httpsclient")
7150 (version "0.4.0")
7151 (source (origin
7152 (method url-fetch)
7153 (uri (string-append
7154 "https://pypi.python.org/packages/source/n/ndg-httpsclient/"
7155 "ndg_httpsclient-" version ".tar.gz"))
7156 (sha256
7157 (base32
7158 "0x32ibixm3vv5m9xfk83xsqm8xcqw4dd0khbh6qbri6rxgymbhg8"))))
7159 (build-system python-build-system)
7160 (propagated-inputs
7161 `(("python-pyopenssl" ,python-pyopenssl)))
7162 (synopsis "HTTPS support for Python's httplib and urllib2")
7163 (description "This is a HTTPS client implementation for httplib and urllib2
7164 based on PyOpenSSL. PyOpenSSL provides a more fully featured SSL implementation
7165 over the default provided with Python and importantly enables full verification
7166 of the SSL peer.")
7167 (home-page "https://github.com/cedadev/ndg_httpsclient/")
7168 (license license:bsd-3)))
7169
7170 ;; python2-openssl requires special care, so package-with-python2 is
7171 ;; insufficient.
7172 (define-public python2-ndg-httpsclient
7173 (package (inherit python-ndg-httpsclient)
7174 (name "python2-ndg-httpsclient")
7175 (arguments `(#:python ,python-2))
7176 (propagated-inputs
7177 `(("python2-pyopenssl" ,python2-pyopenssl)))))
7178
7179 (define-public python-contextlib2
7180 (package
7181 (name "python-contextlib2")
7182 (version "0.4.0")
7183 (source
7184 (origin
7185 (method url-fetch)
7186 (uri (pypi-uri "contextlib2" version))
7187 (sha256
7188 (base32
7189 "0cmp131dlh0d0zvw0aza1zd13glvngzk8lb4avks0hm7yxwdr9am"))))
7190 (build-system python-build-system)
7191 (arguments
7192 `(#:phases
7193 (modify-phases %standard-phases
7194 (replace 'check
7195 (lambda _ (zero?
7196 (system*
7197 "python" "test_contextlib2.py" "-v")))))))
7198 (home-page "http://contextlib2.readthedocs.org/")
7199 (synopsis "Tools for decorators and context managers")
7200 (description "This module is primarily a backport of the Python
7201 3.2 contextlib to earlier Python versions. Like contextlib, it
7202 provides utilities for common tasks involving decorators and context
7203 managers. It also contains additional features that are not part of
7204 the standard library.")
7205 (license license:psfl)))
7206
7207 (define-public python2-contextlib2
7208 (package-with-python2 python-contextlib2))
7209
7210 (define-public python-texttable
7211 (package
7212 (name "python-texttable")
7213 (version "0.8.4")
7214 (source
7215 (origin
7216 (method url-fetch)
7217 (uri (pypi-uri "texttable" version))
7218 (sha256
7219 (base32
7220 "0bkhs4dx9s6g7fpb969hygq56hyz4ncfamlynw72s0n6nqfbd1w5"))))
7221 (build-system python-build-system)
7222 (arguments '(#:tests? #f)) ; no tests
7223 (home-page "https://github.com/foutaise/texttable/")
7224 (synopsis "Python module for creating simple ASCII tables")
7225 (description "Texttable is a Python module for creating simple ASCII
7226 tables.")
7227 (license license:lgpl2.1+)))
7228
7229 (define-public python2-texttable
7230 (package-with-python2 python-texttable))
7231
7232 (define-public python-websocket-client
7233 (package
7234 (name "python-websocket-client")
7235 (version "0.37.0")
7236 (source
7237 (origin
7238 (method url-fetch)
7239 (uri (pypi-uri "websocket_client" version))
7240 (sha256
7241 (base32
7242 "0h9glp1jll3z76ly3kg08aqgxqk0a68p4zi9yn50353bh5nj92v7"))))
7243 (build-system python-build-system)
7244 (native-inputs
7245 `(("python-six" ,python-six))) ; for tests
7246 (inputs
7247 `(("python-setuptools" ,python-setuptools)))
7248 (home-page "https://github.com/liris/websocket-client")
7249 (synopsis "WebSocket client for Python")
7250 (description "The Websocket-client module provides the low level APIs for
7251 WebSocket usage in Python programs.")
7252 (license license:lgpl2.1+)))
7253
7254 (define-public python2-websocket-client
7255 (package-with-python2 python-websocket-client))
7256
7257 (define-public python-atomicwrites
7258 (package
7259 (name "python-atomicwrites")
7260 (version "1.1.0")
7261 (source (origin
7262 (method url-fetch)
7263 (uri (pypi-uri "atomicwrites" version))
7264 (sha256
7265 (base32
7266 "1s01dci8arsl9d9vr5nz1fk9znldp1z3l4yl43f0c27z12b8yxl0"))))
7267 (build-system python-build-system)
7268 (synopsis "Atomic file writes in Python")
7269 (description "Library for atomic file writes using platform dependent tools
7270 for atomic file system operations.")
7271 (home-page "https://github.com/untitaker/python-atomicwrites")
7272 (license license:expat)
7273 (properties `((python2-variant . ,(delay python2-atomicwrites))))))
7274
7275 (define-public python2-atomicwrites
7276 (package (inherit (package-with-python2
7277 (strip-python2-variant python-atomicwrites)))
7278 (native-inputs
7279 `(("python2-setuptools" ,python2-setuptools)))))
7280
7281 (define-public python-requests-toolbelt
7282 (package
7283 (name "python-requests-toolbelt")
7284 (version "0.6.2")
7285 (source (origin
7286 (method url-fetch)
7287 (uri (string-append
7288 "https://pypi.python.org/packages/"
7289 "e1/a4/a94c037bc72ad70441aff1403d3243510d2542ddca7759faaeffeb11aefe/"
7290 "requests-toolbelt-" version ".tar.gz"))
7291 (sha256
7292 (base32
7293 "15q9nrgp85nqlr4kdz1zvj8z2npafi2sr12y7fqgxbkq28j1aci6"))))
7294 (build-system python-build-system)
7295 (propagated-inputs
7296 `(("python-requests" ,python-requests)))
7297 (synopsis "Extensions to python-requests")
7298 (description "This is a toolbelt of useful classes and functions to be used
7299 with python-requests.")
7300 (home-page "https://github.com/sigmavirus24/requests-toolbelt")
7301 (license license:asl2.0)))
7302
7303 (define-public python-click-threading
7304 (package
7305 (name "python-click-threading")
7306 (version "0.2.0")
7307 (source (origin
7308 (method url-fetch)
7309 (uri (string-append
7310 "https://pypi.python.org/packages/"
7311 "fe/b7/e7f609d18a2a351cb71616adcf54df1acd82f83cb9b5936935a4d20e2c23/"
7312 "click-threading-" version ".tar.gz"))
7313 (sha256
7314 (base32
7315 "18bcqikxwb3drb8rf60cclxkxw52521b38ax3byah6j8cn8y9p4j"))))
7316 (build-system python-build-system)
7317 (propagated-inputs
7318 `(("python-click" ,python-click)))
7319 (synopsis "Utilities for multithreading in Click")
7320 (description "This package provides utilities for multithreading in Click
7321 applications.")
7322 (home-page "https://github.com/click-contrib/click-threading")
7323 (license license:expat)))
7324
7325 (define-public python-click-log
7326 (package
7327 (name "python-click-log")
7328 (version "0.1.3")
7329 (source (origin
7330 (method url-fetch)
7331 (uri (pypi-uri "click-log" version))
7332 (sha256
7333 (base32
7334 "0kdd1vminxpcfczxl2kkf285n0dr1gxh2cdbx1p6vkj7b7bci3gx"))))
7335 (build-system python-build-system)
7336 (propagated-inputs
7337 `(("python-click" ,python-click)))
7338 (synopsis "Logging for click applications")
7339 (description "This package provides a Python library for logging Click
7340 applications.")
7341 (home-page "https://github.com/click-contrib/click-log")
7342 (license license:expat)))
7343
7344 (define-public python-apipkg
7345 (package
7346 (name "python-apipkg")
7347 (version "1.4")
7348 (source (origin
7349 (method url-fetch)
7350 (uri (pypi-uri "apipkg" version))
7351 (sha256
7352 (base32
7353 "1iks5701qnp3dlr3q1d9qm68y2plp2m029irhpz92a44psfkjf1f"))))
7354 (build-system python-build-system)
7355 (inputs
7356 `(("python-pytest" ,python-pytest)))
7357 (synopsis "Namespace control and lazy-import mechanism")
7358 (description "With apipkg you can control the exported namespace of a Python
7359 package and greatly reduce the number of imports for your users. It is a small
7360 pure Python module that works on virtually all Python versions.")
7361 (home-page "https://bitbucket.org/hpk42/apipkg")
7362 (license license:expat)
7363 (properties `((python2-variant . ,(delay python2-apipkg))))))
7364
7365 (define-public python2-apipkg
7366 (package
7367 (inherit (package-with-python2
7368 (strip-python2-variant python-apipkg)))
7369 (native-inputs
7370 `(("python2-setuptools" ,python2-setuptools)))))
7371
7372 (define-public python-execnet
7373 (package
7374 (name "python-execnet")
7375 (version "1.4.1")
7376 (source (origin
7377 (method url-fetch)
7378 (uri (pypi-uri "execnet" version))
7379 (sha256
7380 (base32
7381 "1rpk1vyclhg911p3hql0m0nrpq7q7mysxnaaw6vs29cpa6kx8vgn"))))
7382 (build-system python-build-system)
7383 (native-inputs
7384 `(("python-setuptools-scm" ,python-setuptools-scm)))
7385 (inputs
7386 `(("python-apipkg" ,python-apipkg)))
7387 (synopsis "Rapid multi-Python deployment")
7388 (description "Execnet provides a share-nothing model with
7389 channel-send/receive communication for distributing execution across many
7390 Python interpreters across version, platform and network barriers. It has a
7391 minimal and fast API targetting the following uses:
7392 @enumerate
7393 @item distribute tasks to (many) local or remote CPUs
7394 @item write and deploy hybrid multi-process applications
7395 @item write scripts to administer multiple environments
7396 @end enumerate")
7397 (home-page "http://codespeak.net/execnet/")
7398 (license license:expat)
7399 (properties `((python2-variant . ,(delay python2-execnet))))))
7400
7401 (define-public python2-execnet
7402 (let ((execnet (package-with-python2
7403 (strip-python2-variant python-execnet))))
7404 (package
7405 (inherit execnet)
7406 (native-inputs
7407 `(("python2-setuptools" ,python2-setuptools)
7408 ,@(package-native-inputs execnet))))))
7409
7410 ;;; The software provided by this package was integrated into pytest 2.8.
7411 (define-public python-pytest-cache
7412 (package
7413 (name "python-pytest-cache")
7414 (version "1.0")
7415 (source (origin
7416 (method url-fetch)
7417 (uri (pypi-uri "pytest-cache" version))
7418 (sha256
7419 (base32
7420 "1a873fihw4rhshc722j4h6j7g3nj7xpgsna9hhg3zn6ksknnhx5y"))))
7421 (build-system python-build-system)
7422 (inputs
7423 `(("python-apipkg" ,python-apipkg)
7424 ("python-execnet" ,python-execnet)
7425 ("python-py" ,python-py)
7426 ("python-pytest" ,python-pytest)))
7427 (synopsis "Py.test plugin with mechanisms for caching across test runs")
7428 (description "The pytest-cache plugin provides tools to rerun failures from
7429 the last py.test invocation.")
7430 (home-page "https://bitbucket.org/hpk42/pytest-cache/")
7431 (license license:expat)
7432 (properties `((python2-variant . ,(delay python2-pytest-cache))))))
7433
7434 (define-public python2-pytest-cache
7435 (let ((pytest-cache (package-with-python2
7436 (strip-python2-variant python-pytest-cache))))
7437 (package
7438 (inherit pytest-cache)
7439 (native-inputs
7440 `(("python2-setuptools" ,python2-setuptools)
7441 ,@(package-native-inputs pytest-cache))))))
7442
7443 (define-public python-pytest-localserver
7444 (package
7445 (name "python-pytest-localserver")
7446 (version "0.3.5")
7447 (source (origin
7448 (method url-fetch)
7449 (uri (pypi-uri "pytest-localserver" version))
7450 (sha256
7451 (base32
7452 "0dvqspjr6va55zwmnnc2mmpqc7mm65kxig9ya44x1z8aadzxpa4p"))))
7453 (build-system python-build-system)
7454 (arguments
7455 `(#:phases (modify-phases %standard-phases
7456 (replace 'check
7457 (lambda _
7458 (zero? (system* "py.test" "--genscript=runtests.py"))
7459 (zero? (system* "py.test")))))))
7460 (native-inputs
7461 `(("python-pytest" ,python-pytest)
7462 ("python-requests" ,python-requests)
7463 ("python-six" ,python-six)))
7464 (inputs
7465 `(("python-werkzeug" ,python-werkzeug)))
7466 (synopsis "Py.test plugin to test server connections locally")
7467 (description "Pytest-localserver is a plugin for the pytest testing
7468 framework which enables you to test server connections locally.")
7469 (home-page "https://pypi.python.org/pypi/pytest-localserver")
7470 (license license:expat)))
7471
7472 (define-public python-wsgi-intercept
7473 (package
7474 (name "python-wsgi-intercept")
7475 (version "1.2.2")
7476 (source (origin
7477 (method url-fetch)
7478 (uri (string-append
7479 "https://pypi.python.org/packages/"
7480 "38/76/ebcbc24d0cb77db34520a3ca6ed1bd43ace17d182bbd8dd7d976f1c176fb/"
7481 "wsgi_intercept-" version ".tar.gz"))
7482 (sha256
7483 (base32
7484 "0kjj2v2dvmnpdd5h5gk9rzz0f54rhjb0yiz3zg65bmp65slfw65d"))))
7485 (build-system python-build-system)
7486 (native-inputs
7487 `(("python-pytest" ,python-pytest)
7488 ("python-six" ,python-six)))
7489 (propagated-inputs
7490 `(("python-httplib2" ,python-httplib2)
7491 ("python-requests" ,python-requests)))
7492 (synopsis "Puts a WSGI application in place of a real URI for testing")
7493 (description "Wsgi_intercept installs a WSGI application in place of a real
7494 URI for testing. Testing a WSGI application normally involves starting a
7495 server at a local host and port, then pointing your test code to that address.
7496 Instead, this library lets you intercept calls to any specific host/port
7497 combination and redirect them into a WSGI application importable by your test
7498 program. Thus, you can avoid spawning multiple processes or threads to test
7499 your Web app.")
7500 (home-page "https://github.com/cdent/wsgi-intercept")
7501 (license license:expat)))
7502
7503 (define-public python-pytest-xprocess
7504 (package
7505 (name "python-pytest-xprocess")
7506 (version "0.9.1")
7507 (source (origin
7508 (method url-fetch)
7509 (uri (pypi-uri "pytest-xprocess" version))
7510 (sha256
7511 (base32
7512 "17zlql1xqw3ywcgwwbqmw633aly99lab12hm02asr8awvg5603pp"))))
7513 (build-system python-build-system)
7514 (propagated-inputs
7515 `(("python-pytest" ,python-pytest)
7516 ("python-pytest-cache" ,python-pytest-cache)
7517 ("python-psutil" ,python-psutil)))
7518 (synopsis "Pytest plugin to manage external processes across test runs")
7519 (description "Pytest-xprocess is an experimental py.test plugin for managing
7520 processes across test runs.")
7521 (home-page "https://bitbucket.org/pytest-dev/pytest-xprocess")
7522 (license license:expat)))
7523
7524 (define-public python-icalendar
7525 (package
7526 (name "python-icalendar")
7527 (version "3.10")
7528 (source (origin
7529 (method url-fetch)
7530 (uri (pypi-uri "icalendar" version))
7531 (sha256
7532 (base32
7533 "01amnk3621s7fagfla86npd25knbqirchg7h1jpqxqp103d02bs7"))))
7534 (build-system python-build-system)
7535 (propagated-inputs
7536 `(("python-dateutil-2" ,python-dateutil-2)
7537 ("python-pytz" ,python-pytz)))
7538 (synopsis "Python library for parsing iCalendar files")
7539 (description "The icalendar package is a parser/generator of iCalendar
7540 files for use with Python.")
7541 (home-page "https://github.com/collective/icalendar")
7542 (license license:bsd-2)))
7543
7544 (define-public python-sphinxcontrib-newsfeed
7545 (package
7546 (name "python-sphinxcontrib-newsfeed")
7547 (version "0.1.4")
7548 (source (origin
7549 (method url-fetch)
7550 (uri (pypi-uri "sphinxcontrib-newsfeed" version))
7551 (sha256
7552 (base32
7553 "1d7gam3mn8v4in4p16yn3v10vps7nnaz6ilw99j4klij39dqd37p"))))
7554 (build-system python-build-system)
7555 (propagated-inputs
7556 `(("python-docutils" ,python-docutils)
7557 ("python-sphinx" ,python-sphinx)))
7558 (synopsis "News Feed extension for Sphinx")
7559 (description "Sphinxcontrib-newsfeed is an extension for adding a simple
7560 Blog, News or Announcements section to a Sphinx website.")
7561 (home-page "https://bitbucket.org/prometheus/sphinxcontrib-newsfeed")
7562 (license license:bsd-2)))
7563
7564 (define-public python-args
7565 (package
7566 (name "python-args")
7567 (version "0.1.0")
7568 (source (origin
7569 (method url-fetch)
7570 (uri (pypi-uri "args" version))
7571 (sha256
7572 (base32
7573 "057qzi46h5dmxdqknsbrssn78lmqjlnm624iqdhrnpk26zcbi1d7"))))
7574 (build-system python-build-system)
7575 (inputs
7576 `(("python-setuptools" ,python-setuptools)))
7577 (home-page "https://github.com/kennethreitz/args")
7578 (synopsis "Command-line argument parser")
7579 (description
7580 "This library provides a Python module to parse command-line arguments.")
7581 (license license:bsd-3)))
7582
7583 (define-public python2-args
7584 (package-with-python2 python-args))
7585
7586 (define-public python-clint
7587 (package
7588 (name "python-clint")
7589 (version "0.5.1")
7590 (source (origin
7591 (method url-fetch)
7592 (uri (pypi-uri "clint" version))
7593 (sha256
7594 (base32
7595 "1an5lkkqk1zha47198p42ji3m94xmzx1a03dn7866m87n4r4q8h5"))))
7596 (build-system python-build-system)
7597 (inputs
7598 `(("python-args" ,python-args)
7599 ("python-setuptools" ,python-setuptools)))
7600 (home-page "https://github.com/kennethreitz/clint")
7601 (synopsis "Command-line interface tools")
7602 (description
7603 "Clint is a Python module filled with a set of tools for developing
7604 command-line applications, including tools for colored and indented
7605 output, progress bar display, and pipes.")
7606 (license license:isc)))
7607
7608 (define-public python2-clint
7609 (package-with-python2 python-clint))
7610
7611 (define-public python-astor
7612 (package
7613 (name "python-astor")
7614 (version "0.5")
7615 (source (origin
7616 (method url-fetch)
7617 (uri (pypi-uri "astor" version))
7618 (sha256
7619 (base32
7620 "1fdafq5hkis1fxqlmhw0sn44zp2ar46nxhbc22cvwg7hsd8z5gsa"))))
7621 (build-system python-build-system)
7622 (inputs
7623 `(("python-setuptools" ,python-setuptools)))
7624 (home-page "https://github.com/berkerpeksag/astor")
7625 (synopsis "Read and write Python ASTs")
7626 (description
7627 "Astor is designed to allow easy manipulation of Python source via the
7628 Abstract Syntax Tree.")
7629 (license license:bsd-3)))
7630
7631 (define-public python2-astor
7632 (package-with-python2 python-astor))
7633
7634 (define-public python-rply
7635 (package
7636 (name "python-rply")
7637 (version "0.7.4")
7638 (source (origin
7639 (method url-fetch)
7640 (uri (pypi-uri "rply" version))
7641 (sha256
7642 (base32
7643 "12rp1d9ba7nvd5rhaxi6xzx1rm67r1k1ylsrkzhpwnphqpb06cvj"))))
7644 (build-system python-build-system)
7645 (inputs
7646 `(("python-appdirs" ,python-appdirs)
7647 ("python-setuptools" ,python-setuptools)))
7648 (home-page "https://github.com/alex/rply")
7649 (synopsis "Parser generator for Python")
7650 (description
7651 "This package provides a pure Python based parser generator, that also
7652 works with RPython. It is a more-or-less direct port of David Bazzley's PLY,
7653 with a new public API, and RPython support.")
7654 (license license:bsd-3)))
7655
7656 (define-public python2-rply
7657 (package-with-python2 python-rply))
7658
7659 (define-public python-hy
7660 (package
7661 (name "python-hy")
7662 (version "0.11.1")
7663 (source (origin
7664 (method url-fetch)
7665 (uri (pypi-uri "hy" version))
7666 (sha256
7667 (base32
7668 "1msqv747iz12r73mz4qvsmlwkddwjvrahlrk7ysrcz07h7dsscxs"))))
7669 (build-system python-build-system)
7670 (inputs
7671 `(("python-astor" ,python-astor)
7672 ("python-clint" ,python-clint)
7673 ("python-rply" ,python-rply)
7674 ("python-setuptools" ,python-setuptools)))
7675 (home-page "http://hylang.org/")
7676 (synopsis "Lisp frontend to Python")
7677 (description
7678 "Hy is a dialect of Lisp that's embedded in Python. Since Hy transforms
7679 its Lisp code into the Python Abstract Syntax Tree, you have the whole world of
7680 Python at your fingertips, in Lisp form.")
7681 (license license:expat)))
7682
7683 (define-public python2-hy
7684 (package-with-python2 python-hy))
7685
7686 (define-public python-rauth
7687 (package
7688 (name "python-rauth")
7689 (version "0.7.2")
7690 (source
7691 (origin
7692 (method url-fetch)
7693 (uri (pypi-uri "rauth" version))
7694 (sha256
7695 (base32
7696 "00pq7zw429hhza9c0qzxiqp77m653jv09z92nralnmzwdf6pzicf"))))
7697 (build-system python-build-system)
7698 (arguments
7699 `(#:test-target "check"))
7700 (inputs
7701 `(("python-requests" ,python-requests)))
7702 (home-page "https://github.com/litl/rauth")
7703 (synopsis "Python library for OAuth 1.0/a, 2.0, and Ofly")
7704 (description
7705 "Rauth is a Python library for OAuth 1.0/a, 2.0, and Ofly. It also
7706 provides service wrappers for convenient connection initialization and
7707 authenticated session objects providing things like keep-alive.")
7708 (license license:expat)
7709 (properties `((python2-variant . ,(delay python2-rauth))))))
7710
7711 (define-public python2-rauth
7712 (let ((base (package-with-python2 (strip-python2-variant python-rauth))))
7713 (package
7714 (inherit base)
7715 (native-inputs `(("python2-setuptools" ,python2-setuptools)
7716 ("python2-unittest2" ,python2-unittest2)
7717 ,@(package-native-inputs base))))))
7718
7719 (define-public python2-functools32
7720 (package
7721 (name "python2-functools32")
7722 (version "3.2.3-2")
7723 (source
7724 (origin
7725 (method url-fetch)
7726 (uri (pypi-uri "functools32" version))
7727 (sha256
7728 (base32
7729 "0v8ya0b58x47wp216n1zamimv4iw57cxz3xxhzix52jkw3xks9gn"))))
7730 (build-system python-build-system)
7731 (arguments
7732 `(#:python ,python-2
7733 #:tests? #f)) ; no test target
7734 (native-inputs
7735 `(("python2-setuptools" ,python2-setuptools)))
7736 (home-page "https://github.com/MiCHiLU/python-functools32")
7737 (synopsis
7738 "Backport of the functools module from Python 3.2.3")
7739 (description
7740 "This package is a backport of the @code{functools} module from Python
7741 3.2.3 for use with older versions of Python and PyPy.")
7742 (license license:expat)))
7743
7744 (define-public python2-futures
7745 (package
7746 (name "python2-futures")
7747 (version "3.0.3")
7748 (source
7749 (origin
7750 (method url-fetch)
7751 (uri (pypi-uri "futures" version))
7752 (sha256
7753 (base32
7754 "1vcb34dqhzkhbq1957vdjszhhm5y3j9ba88dgwhqx2zynhmk9qig"))))
7755 (build-system python-build-system)
7756 (arguments `(#:python ,python-2))
7757 (native-inputs
7758 `(("python2-setuptools" ,python2-setuptools)))
7759 (home-page "https://github.com/agronholm/pythonfutures")
7760 (synopsis
7761 "Backport of the concurrent.futures package from Python 3.2")
7762 (description
7763 "The concurrent.futures module provides a high-level interface for
7764 asynchronously executing callables. This package backports the
7765 concurrent.futures package from Python 3.2")
7766 (license license:bsd-3)))
7767
7768 (define-public python-promise
7769 (package
7770 (name "python-promise")
7771 (version "0.4.2")
7772 (source
7773 (origin
7774 (method url-fetch)
7775 (uri (pypi-uri "promise" version))
7776 (sha256
7777 (base32
7778 "1k19ms8l3d5jzjh557rgkxb5sg4mqgfc315rn4hx1z3n8qq6lr3h"))))
7779 (build-system python-build-system)
7780 ;; Tests wants python-futures, which is a python2 only program, and
7781 ;; can't be found by python-promise at test time.
7782 (arguments `(#:tests? #f))
7783 (home-page "https://github.com/syrusakbary/promise")
7784 (synopsis "Promises/A+ implementation for Python")
7785 (description
7786 "Promises/A+ implementation for Python")
7787 (properties `((python2-variant . ,(delay python2-promise))))
7788 (license license:expat)))
7789
7790 (define-public python2-promise
7791 (let ((promise (package-with-python2
7792 (strip-python2-variant python-promise))))
7793 (package (inherit promise)
7794 (arguments (substitute-keyword-arguments (package-arguments promise)
7795 ((#:tests? _) #t)))
7796 (native-inputs
7797 `(("python2-futures" ,python2-futures)
7798 ("python2-pytest" ,python2-pytest)
7799 ("python2-setuptools" ,python2-setuptools)
7800 ,@(package-native-inputs promise))))))
7801
7802 (define-public python-urllib3
7803 (package
7804 (name "python-urllib3")
7805 (version "1.18.1")
7806 (source
7807 (origin
7808 (method url-fetch)
7809 (uri (pypi-uri "urllib3" version))
7810 (sha256
7811 (base32
7812 "1wb8aqnq53vzh2amrv8kc66f3h6fx217y0q62y6n30a64p2yqmam"))))
7813 (build-system python-build-system)
7814 (arguments `(#:tests? #f))
7815 (native-inputs
7816 `(("python-setuptools" ,python-setuptools)
7817 ;; some packages for tests
7818 ("python-nose" ,python-nose)
7819 ("python-mock" ,python-mock)
7820 ("python-tornado" ,python-tornado)))
7821 (propagated-inputs
7822 `(;; packages for https security
7823 ("python-certifi" ,python-certifi)
7824 ("python-ndg-httpsclient" ,python-ndg-httpsclient)
7825 ("python-pyasn1" ,python-pyasn1)
7826 ("python-pyopenssl" ,python-pyopenssl)))
7827 (home-page "https://urllib3.readthedocs.org/")
7828 (synopsis "HTTP library with thread-safe connection pooling")
7829 (description
7830 "Urllib3 supports features left out of urllib and urllib2 libraries. It
7831 can reuse the same socket connection for multiple requests, it can POST files,
7832 supports url redirection and retries, and also gzip and deflate decoding.")
7833 (license license:expat)))
7834
7835 (define-public python2-urllib3
7836 (package-with-python2 python-urllib3))
7837
7838 (define-public python-colorama
7839 (package
7840 (name "python-colorama")
7841 (version "0.3.3")
7842 (source
7843 (origin
7844 (method url-fetch)
7845 (uri (pypi-uri "colorama" version))
7846 (sha256
7847 (base32
7848 "1716z9pq1r5ys3nkg7wdrb3h2f9rmd0zdxpxzmx3bgwgf6xg48gb"))))
7849 (build-system python-build-system)
7850 (inputs
7851 `(("python-setuptools" ,python-setuptools)))
7852 (synopsis "colored terminal text rendering for Python")
7853 (description "Colorama is a Python library for rendering colored terminal
7854 text.")
7855 (home-page "https://pypi.python.org/pypi/colorama")
7856 (license license:bsd-3)))
7857
7858 (define-public python2-colorama
7859 (package-with-python2 python-colorama))
7860
7861 (define-public python-rsa
7862 (package
7863 (name "python-rsa")
7864 (version "3.4.2")
7865 (source
7866 (origin
7867 (method url-fetch)
7868 (uri (pypi-uri "rsa" version))
7869 (sha256
7870 (base32
7871 "1dcxvszbikgzh99ybdc7jq0zb9wspy2ds8z9mjsqiyv3q884xpr5"))))
7872 (build-system python-build-system)
7873 (inputs
7874 `(("python-pyasn1" ,python-pyasn1)
7875 ("python-setuptools" ,python-setuptools)))
7876 (synopsis "Pure-Python RSA implementation")
7877 (description "Python-RSA is a pure-Python RSA implementation. It supports
7878 encryption and decryption, signing and verifying signatures, and key
7879 generation according to PKCS#1 version 1.5. It can be used as a Python
7880 library as well as on the command line.")
7881 (home-page "http://stuvel.eu/rsa")
7882 (license license:asl2.0)))
7883
7884 (define-public python2-rsa
7885 (package-with-python2 python-rsa))
7886
7887 (define-public python-pluggy
7888 (package
7889 (name "python-pluggy")
7890 (version "0.3.1")
7891 (source
7892 (origin
7893 (method url-fetch)
7894 (uri (pypi-uri "pluggy" version))
7895 (sha256
7896 (base32
7897 "18qfzfm40bgx672lkg8q9x5hdh76n7vax99aank7vh2nw21wg70m"))))
7898 (build-system python-build-system)
7899 (inputs
7900 `(("python-setuptools" ,python-setuptools)))
7901 (synopsis "Plugin and hook calling mechanism for Python")
7902 (description "Pluggy is an extraction of the plugin manager as used by
7903 Pytest but stripped of Pytest specific details.")
7904 (home-page "https://pypi.python.org/pypi/pluggy")
7905 (license license:expat)))
7906
7907 (define-public python2-pluggy
7908 (package-with-python2 python-pluggy))
7909
7910 (define-public python-tox
7911 (package
7912 (name "python-tox")
7913 (version "2.3.1")
7914 (source
7915 (origin
7916 (method url-fetch)
7917 (uri (pypi-uri "tox" version))
7918 (sha256
7919 (base32
7920 "1vj73ar4rimq3fwy5r2z3jv4g9qbh8rmpmncsc00g0k310acqzxz"))))
7921 (build-system python-build-system)
7922 (arguments
7923 ;; FIXME: Tests require a newer version of pytest, but upgrading our
7924 ;; pytest breaks other packages.
7925 '(#:tests? #f))
7926 (inputs
7927 `(("python-setuptools" ,python-setuptools)
7928 ("python-pluggy" ,python-pluggy)
7929 ("python-py" ,python-py)
7930 ("python-virtualenv" ,python-virtualenv)
7931 ("python-pytest" ,python-pytest)))
7932 (home-page "http://tox.testrun.org/")
7933 (synopsis "Virtualenv-based automation of test activities")
7934 (description "Tox is a generic virtualenv management and test command line
7935 tool. It can be used to check that a package installs correctly with
7936 different Python versions and interpreters, or run tests in each type of
7937 supported environment, or act as a frontend to continuous integration
7938 servers.")
7939 (license license:expat)))
7940
7941 (define-public python2-tox
7942 (package-with-python2 python-tox))
7943
7944 (define-public python-jmespath
7945 (package
7946 (name "python-jmespath")
7947 (version "0.9.0")
7948 (source
7949 (origin
7950 (method url-fetch)
7951 (uri (pypi-uri "jmespath" version))
7952 (sha256
7953 (base32
7954 "0g9xvl69y7nr3w7ag4fsp6sm4fqf6vrqjw7504x2hzrrsh3ampq8"))))
7955 (build-system python-build-system)
7956 (inputs
7957 `(("python-setuptools" ,python-setuptools)))
7958 (synopsis "JSON Matching Expressions")
7959 (description "JMESPath (pronounced “james path”) is a Python library that
7960 allows one to declaratively specify how to extract elements from a JSON
7961 document.")
7962 (home-page "https://github.com/jmespath/jmespath.py")
7963 (license license:expat)))
7964
7965 (define-public python2-jmespath
7966 (package-with-python2 python-jmespath))
7967
7968 (define-public python-botocore
7969 (package
7970 (name "python-botocore")
7971 (version "1.4.62")
7972 (source
7973 (origin
7974 (method url-fetch)
7975 (uri (pypi-uri "botocore" version))
7976 (sha256
7977 (base32
7978 "1zxczlwqy9bl27d9bc5x99mb5mcsxm350240lp5nx7014xb311lj"))))
7979 (build-system python-build-system)
7980 (inputs
7981 `(("python-dateutil" ,python-dateutil-2)
7982 ("python-docutils" ,python-docutils)
7983 ("python-mock" ,python-mock)
7984 ("python-nose" ,python-nose)
7985 ("python-setuptools" ,python-setuptools)
7986 ("python-tox" ,python-tox)
7987 ("python-wheel" ,python-wheel)
7988 ("python-jmespath" ,python-jmespath)))
7989 (home-page "https://github.com/boto/botocore")
7990 (synopsis "Low-level interface to AWS")
7991 (description "Botocore is a Python library that provides a low-level
7992 interface to the Amazon Web Services (AWS) API.")
7993 (license license:asl2.0)))
7994
7995 (define-public python2-botocore
7996 (package-with-python2 python-botocore))
7997
7998 (define-public awscli
7999 (package
8000 (name "awscli")
8001 (version "1.11.5")
8002 (source
8003 (origin
8004 (method url-fetch)
8005 (uri (pypi-uri name version))
8006 (sha256
8007 (base32
8008 "0lclasm0wnayd3b8zl9l91i32nbgrhh0ncf9lksss4cv0myfwmfg"))))
8009 (build-system python-build-system)
8010 (inputs
8011 `(("python-colorama" ,python-colorama)
8012 ("python-docutils" ,python-docutils)
8013 ("python-mock" ,python-mock)
8014 ("python-nose" ,python-nose)
8015 ("python-rsa" ,python-rsa)
8016 ("python-setuptools" ,python-setuptools)
8017 ("python-sphinx" ,python-sphinx)
8018 ("python-tox" ,python-tox)
8019 ("python-wheel" ,python-wheel)
8020 ("python-botocore" ,python-botocore)
8021 ("python-s3transfer" ,python-s3transfer)))
8022 (home-page "http://aws.amazon.com/cli/")
8023 (synopsis "Command line client for AWS")
8024 (description "AWS CLI provides a unified command line interface to the
8025 Amazon Web Services (AWS) API.")
8026 (license license:asl2.0)))
8027
8028 (define-public python-hypothesis
8029 (package
8030 (name "python-hypothesis")
8031 (version "3.1.0")
8032 (source (origin
8033 (method url-fetch)
8034 (uri (pypi-uri "hypothesis" version))
8035 (sha256
8036 (base32
8037 "0qyqq9akm4vshhn8cngjc1qykcvsn7cz6dlm6njfsgpbraqrmbbw"))))
8038 (build-system python-build-system)
8039 (propagated-inputs
8040 `(("python-flake8" ,python-flake8)
8041 ("python-pytest" ,python-pytest)))
8042 (synopsis "Library for property based testing")
8043 (description "Hypothesis is a library for testing your Python code against a
8044 much larger range of examples than you would ever want to write by hand. It’s
8045 based on the Haskell library, Quickcheck, and is designed to integrate
8046 seamlessly into your existing Python unit testing work flow.")
8047 (home-page "https://github.com/DRMacIver/hypothesis")
8048 (license license:mpl2.0)
8049 (properties `((python2-variant . ,(delay python2-hypothesis))))))
8050
8051 (define-public python2-hypothesis
8052 (let ((hypothesis (package-with-python2
8053 (strip-python2-variant python-hypothesis))))
8054 (package (inherit hypothesis)
8055 (native-inputs
8056 `(("python2-enum34" ,python2-enum34)
8057 ("python2-setuptools" ,python2-setuptools))))))
8058
8059 (define-public python-pytest-subtesthack
8060 (package
8061 (name "python-pytest-subtesthack")
8062 (version "0.1.1")
8063 (source (origin
8064 (method url-fetch)
8065 (uri (pypi-uri "pytest-subtesthack" version))
8066 (sha256
8067 (base32
8068 "15kzcr5pchf3id4ikdvlv752rc0j4d912n589l4rifp8qsj19l1x"))))
8069 (build-system python-build-system)
8070 (native-inputs
8071 `(;; setuptools required for python-2 variant
8072 ("python-setuptools" ,python-setuptools)))
8073 (propagated-inputs
8074 `(("python-pytest" ,python-pytest)))
8075 (synopsis "Set-up and tear-down fixtures for unit tests")
8076 (description "This plugin allows you to set up and tear down fixtures within
8077 unit test functions that use @code{py.test}. This is useful for using
8078 @command{hypothesis} inside py.test, as @command{hypothesis} will call the test
8079 function multiple times, without setting up or tearing down fixture state as is
8080 normally the case.")
8081 (home-page "https://github.com/untitaker/pytest-subtesthack/")
8082 (license license:unlicense)))
8083
8084 (define-public python2-pytest-subtesthack
8085 (package-with-python2 python-pytest-subtesthack))
8086
8087 (define-public python2-xdo
8088 (package
8089 (name "python2-xdo")
8090 (version "0.2")
8091 (source (origin
8092 (method url-fetch)
8093 (uri (string-append
8094 "http://http.debian.net/debian/pool/main/p/python-xdo/"
8095 "python-xdo_" version ".orig.tar.gz"))
8096 (sha256
8097 (base32
8098 "1kl5c1p0dyxf62plnk6fl77ycfb4whwjms16r14dxx8kn90hlqz4"))))
8099 (build-system python-build-system)
8100 (arguments
8101 `(#:python ,python-2
8102 #:tests? #f)) ; no tests provided
8103 (inputs
8104 `(("xdotool" ,xdotool)
8105 ("libX11" ,libx11)))
8106 (home-page "https://tracker.debian.org/pkg/python-xdo")
8107 (synopsis "Python library for simulating X11 keyboard/mouse input")
8108 (description "Provides bindings to libxdo for manipulating X11 via simulated
8109 input. (Note that this is mostly a legacy library; you may wish to look at
8110 python-xdo for newer bindings.)")
8111 (license license:bsd-3)))
8112
8113 (define-public python-wtforms
8114 (package
8115 (name "python-wtforms")
8116 (version "2.1")
8117 (source
8118 (origin
8119 (method url-fetch)
8120 (uri (pypi-uri "WTForms" version ".zip"))
8121 (sha256
8122 (base32
8123 "0vyl26y9cg409cfyj8rhqxazsdnd0jipgjw06civhrd53yyi1pzz"))))
8124 (build-system python-build-system)
8125 (native-inputs
8126 `(("unzip" ,unzip)))
8127 (home-page "http://wtforms.simplecodes.com/")
8128 (synopsis
8129 "Form validation and rendering library for Python web development")
8130 (description
8131 "WTForms is a flexible forms validation and rendering library
8132 for Python web development. It is very similar to the web form API
8133 available in Django, but is a standalone package.")
8134 (license license:bsd-3)
8135 (properties `((python2-variant . ,(delay python2-wtforms))))))
8136
8137 (define-public python2-wtforms
8138 (package
8139 (inherit (package-with-python2
8140 (strip-python2-variant python-wtforms)))
8141 (inputs `(("python2-setuptools" ,python2-setuptools)))))
8142
8143 (define-public python-mako
8144 (package
8145 (name "python-mako")
8146 (version "1.0.3")
8147 (source
8148 (origin
8149 (method url-fetch)
8150 (uri (pypi-uri "Mako" version))
8151 (sha256
8152 (base32
8153 "136kcjbs0s98qkx8a418b05dfblqp0kiiqyx8vhx4rarwc7bqi3n"))))
8154 (build-system python-build-system)
8155 (native-inputs
8156 `(("python-markupsafe" ,python-markupsafe)
8157 ("python-mock" ,python-mock)
8158 ("python-nose" ,python-nose)))
8159 (home-page "http://www.makotemplates.org/")
8160 (synopsis "Templating language for Python")
8161 (description "Mako is a templating language for Python that compiles
8162 templates into Python modules.")
8163 (license license:expat)
8164 (properties `((python2-variant . ,(delay python2-mako))))))
8165
8166 (define-public python2-mako
8167 (let ((base (package-with-python2
8168 (strip-python2-variant python-mako))))
8169 (package
8170 (inherit base)
8171 (native-inputs
8172 (cons `("python2-setuptools" ,python2-setuptools)
8173 (package-native-inputs base))))))
8174
8175 (define-public python-waitress
8176 (package
8177 (name "python-waitress")
8178 (version "0.8.10")
8179 (source
8180 (origin
8181 (method url-fetch)
8182 (uri (pypi-uri "waitress" version))
8183 (sha256
8184 (base32
8185 "017n9ra6vvmq9d5sfhdzyzr1mg15x2hj2dhm4pdlw98c1ypw2h3w"))))
8186 (build-system python-build-system)
8187 (home-page "https://github.com/Pylons/waitress")
8188 (synopsis "Waitress WSGI server")
8189 (description "Waitress is meant to be a production-quality pure-Python WSGI
8190 server with very acceptable performance.")
8191 (license license:zpl2.1)
8192 (properties `((python2-variant . ,(delay python2-waitress))))))
8193
8194 (define-public python2-waitress
8195 (package
8196 (inherit (package-with-python2
8197 (strip-python2-variant python-waitress)))
8198 (native-inputs `(("python2-setuptools" ,python2-setuptools)))))
8199
8200 (define-public python-wsgiproxy2
8201 (package
8202 (name "python-wsgiproxy2")
8203 (version "0.4.2")
8204 (source
8205 (origin
8206 (method url-fetch)
8207 (uri (pypi-uri "WSGIProxy2" version ".zip"))
8208 (sha256
8209 (base32
8210 "13kf9bdxrc95y9vriaz0viry3ah11nz4rlrykcfvb8nlqpx3dcm4"))))
8211 (build-system python-build-system)
8212 (arguments
8213 '(;; Wsgiproxy2's test suite requires Restkit, which does not yet fully
8214 ;; support Python 3:
8215 ;; https://github.com/benoitc/restkit/issues/140
8216 #:tests? #f))
8217 (native-inputs
8218 `(("unzip" ,unzip)
8219 ("python-nose" ,python-nose)
8220 ("python-coverage" ,python-coverage)))
8221 (propagated-inputs
8222 `(("python-six" ,python-six)
8223 ("python-webob" ,python-webob)))
8224 (home-page
8225 "https://github.com/gawel/WSGIProxy2/")
8226 (synopsis "WSGI Proxy with various http client backends")
8227 (description "WSGI turns HTTP requests into WSGI function calls.
8228 WSGIProxy turns WSGI function calls into HTTP requests.
8229 It also includes code to sign requests and pass private data,
8230 and to spawn subprocesses to handle requests.")
8231 (license license:expat)
8232 (properties `((python2-variant . ,(delay python2-wsgiproxy2))))))
8233
8234 (define-public python2-wsgiproxy2
8235 (let ((wsgiproxy2 (package-with-python2
8236 (strip-python2-variant python-wsgiproxy2))))
8237 (package
8238 (inherit wsgiproxy2)
8239 (inputs `(("python2-setuptools" ,python2-setuptools)
8240 ,@(package-inputs wsgiproxy2))))))
8241
8242 (define-public python-pastedeploy
8243 (package
8244 (name "python-pastedeploy")
8245 (version "1.5.2")
8246 (source
8247 (origin
8248 (method url-fetch)
8249 (uri (pypi-uri "PasteDeploy" version))
8250 (sha256
8251 (base32
8252 "1jz3m4hq8v6hyhfjz9425nd3nvn52cvbfipdcd72krjmla4qz1fm"))))
8253 (build-system python-build-system)
8254 (native-inputs
8255 `(("python-nose" ,python-nose)))
8256 (propagated-inputs
8257 ;; This package uses pkg_resources, part of setuptools, during runtime,
8258 ;; hence why not a native-input.
8259 `(("python-setuptools" ,python-setuptools)))
8260 (home-page "http://pythonpaste.org/deploy/")
8261 (synopsis
8262 "Load, configure, and compose WSGI applications and servers")
8263 (description
8264 "This tool provides code to load WSGI applications and servers from URIs;
8265 these URIs can refer to Python Eggs for INI-style configuration files. Paste
8266 Script provides commands to serve applications based on this configuration
8267 file.")
8268 (license license:expat)))
8269
8270 (define-public python2-pastedeploy
8271 (package-with-python2 python-pastedeploy))
8272
8273 (define-public python-paste
8274 (package
8275 (name "python-paste")
8276 (version "2.0.2")
8277 (source
8278 (origin
8279 (method url-fetch)
8280 (uri (pypi-uri "Paste" version))
8281 (sha256
8282 (base32
8283 "16dsv9qi0r4qsrsb6dilpq2rx0fnglvh36flzywcdnm2jg43mb5d"))
8284 (patches (search-patches "python-paste-remove-website-test.patch"
8285 "python-paste-remove-timing-test.patch"))))
8286 (build-system python-build-system)
8287 (native-inputs
8288 `(("python-nose" ,python-nose)))
8289 (propagated-inputs
8290 `(;; Uses pkg_resources provided by setuptools internally.
8291 ("python-setuptools" ,python-setuptools)
8292 ("python-six" ,python-six)))
8293 (arguments
8294 '(;; Tests don't pass on Python 3, but work fine on Python 2.
8295 ;; (As of 2.0.2, Python 3 support in Paste is presently a bit broken,
8296 ;; but is usable enough for the minimal amount it's used in MediaGoblin
8297 ;; still... things should be better by the next Paste release.)
8298 #:tests? #f))
8299 (home-page "http://pythonpaste.org")
8300 (synopsis
8301 "Python web development tools, focusing on WSGI")
8302 (description
8303 "Paste provides a variety of web development tools and middleware which
8304 can be nested together to build web applications. Paste's design closely
8305 follows ideas flowing from WSGI (Web Standard Gateway Interface).")
8306 (license license:expat)
8307 (properties `((python2-variant . ,(delay python2-paste))))))
8308
8309 (define-public python2-paste
8310 (let ((paste (package-with-python2
8311 (strip-python2-variant python-paste))))
8312 (package
8313 (inherit paste)
8314 (arguments
8315 ;; Tests are back for Python 2!
8316 `(#:tests? #t
8317 ,@(package-arguments paste))))))
8318
8319 (define-public python-pastescript
8320 (package
8321 (name "python-pastescript")
8322 (version "2.0.2")
8323 (source
8324 (origin
8325 (method url-fetch)
8326 (uri (pypi-uri "PasteScript" version))
8327 (sha256
8328 (base32
8329 "1h3nnhn45kf4pbcv669ik4faw04j58k8vbj1hwrc532k0nc28gy0"))))
8330 (build-system python-build-system)
8331 (native-inputs
8332 `(("python-nose" ,python-nose)))
8333 (propagated-inputs
8334 `(;; Uses pkg_resources provided by setuptools internally.
8335 ("python-setuptools" ,python-setuptools)
8336 ("python-paste" ,python-paste)
8337 ("python-pastedeploy" ,python-pastedeploy)))
8338 (home-page "http://pythonpaste.org/script/")
8339 (arguments
8340 '(;; Unfortunately, this requires the latest unittest2,
8341 ;; but that requires traceback2 which requires linecache2 which requires
8342 ;; unittest2. So we're skipping tests for now.
8343 ;; (Note: Apparently linetest2 only needs unittest2 for its tests,
8344 ;; so in theory we could get around this situation somehow.)
8345 #:tests? #f))
8346 (synopsis
8347 "Pluggable command line tool for serving web applications and more")
8348 (description
8349 "PasteScript is a plugin-friendly command line tool which provides a
8350 variety of features, from launching web applications to bootstrapping project
8351 layouts.")
8352 (license license:expat)))
8353
8354 (define-public python2-pastescript
8355 (package-with-python2 python-pastescript))
8356
8357 (define-public python-pyquery
8358 (package
8359 (name "python-pyquery")
8360 (version "1.2.13")
8361 (source
8362 (origin
8363 (method url-fetch)
8364 (uri (pypi-uri "pyquery" version))
8365 (sha256
8366 (base32
8367 "0j9fsisip21qv4xljsg5dmni1pgpvwrjyyhhql0glydc4bs5rjgv"))))
8368 (build-system python-build-system)
8369 (native-inputs
8370 `(("python-webob" ,python-webob)
8371 ("python-webtest" ,python-webtest)))
8372 (propagated-inputs
8373 `(("python-lxml" ,python-lxml)
8374 ("python-cssselect" ,python-cssselect)))
8375 (home-page "https://github.com/gawel/pyquery")
8376 (synopsis "Make jQuery-like queries on xml documents")
8377 (description "pyquery allows you to make jQuery queries on xml documents.
8378 The API is as much as possible the similar to jQuery. pyquery uses lxml for
8379 fast xml and html manipulation.")
8380 (license license:bsd-3)
8381 (properties `((python2-variant . ,(delay python2-pyquery))))))
8382
8383 (define-public python2-pyquery
8384 (let ((pyquery (package-with-python2
8385 (strip-python2-variant python-pyquery))))
8386 (package
8387 (inherit pyquery)
8388 (native-inputs `(("python2-setuptools" ,python2-setuptools)
8389 ,@(package-native-inputs pyquery))))))
8390
8391 (define-public python-webtest
8392 (package
8393 (name "python-webtest")
8394 (version "2.0.20")
8395 (source
8396 (origin
8397 (method url-fetch)
8398 (uri (pypi-uri "WebTest" version))
8399 (sha256
8400 (base32
8401 "0bv0qhdjakdsdgj4sk21gnpp8xp8bga4x03p6gjb83ihrsb7n4xv"))))
8402 (build-system python-build-system)
8403 (arguments
8404 `(;; Unfortunately we have to disable tests!
8405 ;; This release of WebTest is pinned to python-nose < 1.3,
8406 ;; but older versions of python-nose are plagued with the following
8407 ;; bug(s), which rears its ugly head during test execution:
8408 ;; https://github.com/nose-devs/nose/issues/759
8409 ;; https://github.com/nose-devs/nose/pull/811
8410 #:tests? #f))
8411 ;; Commented out code is no good, but in this case, once tests
8412 ;; are ready to be enabled again, we should put the following
8413 ;; in place:
8414 ;; (native-inputs
8415 ;; `(("python-nose" ,python-nose) ; technially < 1.3,
8416 ;; ; but see above comment
8417 ;; ("python-coverage" ,python-coverage)
8418 ;; ("python-mock" ,python-mock)
8419 ;; ("python-pastedeploy" ,python-pastedeploy)
8420 ;; ("python-wsgiproxy2" ,python-wsgiproxy2)
8421 ;; ("python-pyquery" ,python-pyquery)))
8422 (propagated-inputs
8423 `(("python-waitress" ,python-waitress)
8424 ("python-webob" ,python-webob)
8425 ("python-six" ,python-six)
8426 ("python-beautifulsoup4" ,python-beautifulsoup4)))
8427 (home-page "http://webtest.pythonpaste.org/")
8428 (synopsis "Helper to test WSGI applications")
8429 (description "Webtest allows you to test your Python web applications
8430 without starting an HTTP server. It supports anything that supports the
8431 minimum of WSGI.")
8432 (license license:expat)
8433 (properties `((python2-variant . ,(delay python2-webtest))))))
8434
8435 (define-public python2-webtest
8436 (let ((webtest (package-with-python2
8437 (strip-python2-variant python-webtest))))
8438 (package
8439 (inherit webtest)
8440 (native-inputs `(("python2-setuptools" ,python2-setuptools)
8441 ,@(package-native-inputs webtest))))))
8442
8443 (define-public python-anyjson
8444 (package
8445 (name "python-anyjson")
8446 (version "0.3.3")
8447 (source
8448 (origin
8449 (method url-fetch)
8450 (uri (pypi-uri "anyjson" version))
8451 (sha256
8452 (base32
8453 "1fjph4alvcscsl5d4b6qpv1yh31jy05jxi1l0xff7lws7j32v09p"))))
8454 (build-system python-build-system)
8455 (arguments
8456 `(;; We could possibly get tests working, but on Python 3 it's not so easy.
8457 ;; Very strangely, 2to3 is run *during setup.py install* (or bdist, or
8458 ;; whatever) so this transformation needs to be done before the tests
8459 ;; can be run. Maybe we could add a build step to transform beforehand
8460 ;; but it could be annoying/difficult.
8461 ;; We can enable tests for the Python 2 version, though, and do below.
8462 #:tests? #f))
8463 (home-page "http://bitbucket.org/runeh/anyjson/")
8464 (synopsis
8465 "Wraps best available JSON implementation in a common interface")
8466 (description
8467 "Anyjson loads whichever is the fastest JSON module installed
8468 and provides a uniform API regardless of which JSON implementation is used.")
8469 (license license:bsd-3)
8470 (properties `((python2-variant . ,(delay python2-anyjson))))))
8471
8472 (define-public python2-anyjson
8473 (let ((anyjson (package-with-python2
8474 (strip-python2-variant python-anyjson))))
8475 (package
8476 (inherit anyjson)
8477 (arguments `(;; Unlike the python 3 variant, we do run tests. See above!
8478 #:tests? #t
8479 ,@(package-arguments anyjson)))
8480 (native-inputs `(("python2-setuptools" ,python2-setuptools)
8481 ("python2-nose" ,python2-nose))))))
8482
8483 (define-public python-amqp
8484 (package
8485 (name "python-amqp")
8486 (version "1.4.9")
8487 (source
8488 (origin
8489 (method url-fetch)
8490 (uri (pypi-uri "amqp" version))
8491 (sha256
8492 (base32
8493 "06n6q0kxhjnbfz3vn8x9yz09lwmn1xi9d6wxp31h5jbks0b4vsid"))))
8494 (build-system python-build-system)
8495 (native-inputs
8496 `(("python-nose" ,python-nose)
8497 ("python-mock" ,python-mock)))
8498 (home-page "http://github.com/celery/py-amqp")
8499 (synopsis
8500 "Low-level AMQP client for Python (fork of amqplib)")
8501 (description
8502 "This is a fork of amqplib which was originally written by Barry Pederson.
8503 It is maintained by the Celery project, and used by kombu as a pure python
8504 alternative when librabbitmq is not available.")
8505 (license license:lgpl2.1+)
8506 (properties `((python2-variant . ,(delay python2-amqp))))))
8507
8508 (define-public python2-amqp
8509 (let ((amqp (package-with-python2
8510 (strip-python2-variant python-amqp))))
8511 (package
8512 (inherit amqp)
8513 (arguments `(;; Tries to run coverage tests with nose-cover3, which seems
8514 ;; unmaintained. Weirdly, does not do this on the python 3
8515 ;; version?
8516 #:tests? #f
8517 ,@(package-arguments amqp)))
8518 (native-inputs `(("python2-setuptools" ,python2-setuptools)
8519 ,@(package-native-inputs amqp))))))
8520
8521 (define-public python-kombu
8522 (package
8523 (name "python-kombu")
8524 (version "3.0.33")
8525 (source
8526 (origin
8527 (method url-fetch)
8528 (uri (pypi-uri "kombu" version))
8529 (sha256
8530 (base32
8531 "16brjx2lgwbj2a37d0pjbfb84nvld6irghmqrs3qfncajp51hgc5"))))
8532 (build-system python-build-system)
8533 (native-inputs
8534 `(("python-mock" ,python-mock)
8535 ("python-nose" ,python-nose)))
8536 (propagated-inputs
8537 `(("python-anyjson" ,python-anyjson)
8538 ("python-amqp" ,python-amqp)))
8539 (home-page "http://kombu.readthedocs.org")
8540 (synopsis "Message passing library for Python")
8541 (description "The aim of Kombu is to make messaging in Python as easy as
8542 possible by providing an idiomatic high-level interface for the AMQ protocol,
8543 and also provide proven and tested solutions to common messaging problems.
8544 AMQP is the Advanced Message Queuing Protocol, an open standard protocol for
8545 message orientation, queuing, routing, reliability and security, for which the
8546 RabbitMQ messaging server is the most popular implementation.")
8547 (license license:bsd-3)
8548 (properties `((python2-variant . ,(delay python2-kombu))))))
8549
8550 (define-public python2-kombu
8551 (let ((kombu (package-with-python2
8552 (strip-python2-variant python-kombu))))
8553 (package
8554 (inherit kombu)
8555 (inputs `(("python2-setuptools" ,python2-setuptools)
8556 ("python2-unittest2" ,python2-unittest2)
8557 ,@(package-inputs kombu))))))
8558
8559 (define-public python-billiard
8560 (package
8561 (name "python-billiard")
8562 (version "3.3.0.22")
8563 (source
8564 (origin
8565 (method url-fetch)
8566 (uri (pypi-uri "billiard" version))
8567 (sha256
8568 (base32
8569 "0zp7h6a58alrb3mwdw61jds07395j4j0mj6iqsb8czrihw9ih5nj"))))
8570 (build-system python-build-system)
8571 (native-inputs
8572 `(("python-nose" ,python-nose)))
8573 (home-page "http://github.com/celery/billiard")
8574 (synopsis
8575 "Python multiprocessing fork with improvements and bugfixes")
8576 (description
8577 "Billiard is a fork of the Python 2.7 multiprocessing package. The
8578 multiprocessing package itself is a renamed and updated version of R Oudkerk's
8579 pyprocessing package. This standalone variant is intended to be compatible with
8580 Python 2.4 and 2.5, and will draw its fixes/improvements from python-trunk.")
8581 (license license:bsd-3)
8582 (properties `((python2-variant . ,(delay python2-billiard))))))
8583
8584 (define-public python2-billiard
8585 (let ((billiard (package-with-python2
8586 (strip-python2-variant python-billiard))))
8587 (package
8588 (inherit billiard)
8589 (native-inputs `(("python2-setuptools" ,python2-setuptools)
8590 ("python2-unittest2" ,python2-unittest2)
8591 ("python2-mock" ,python2-mock)
8592 ,@(package-native-inputs billiard))))))
8593
8594 (define-public python-celery
8595 (package
8596 (name "python-celery")
8597 (version "3.1.20")
8598 (source
8599 (origin
8600 (method url-fetch)
8601 (uri (pypi-uri "celery" version))
8602 (sha256
8603 (base32
8604 "1md6ywg1s0946qyp8ndnsd677wm0yax933h2sb4m3a4j7lf1jbyh"))))
8605 (build-system python-build-system)
8606 (native-inputs
8607 `(("python-nose" ,python-nose)))
8608 (inputs
8609 `(("python-pytz" ,python-pytz)
8610 ("python-amqp" ,python-amqp)
8611 ("python-anyjson" ,python-anyjson)
8612 ("python-billiard" ,python-billiard)
8613 ("python-kombu" ,python-kombu)))
8614 (home-page "http://celeryproject.org")
8615 (synopsis "Distributed Task Queue")
8616 (description "Celery is an asynchronous task queue/job queue based on
8617 distributed message passing. It is focused on real-time operation, but
8618 supports scheduling as well. The execution units, called tasks, are executed
8619 concurrently on a single or more worker servers using multiprocessing,
8620 Eventlet, or gevent. Tasks can execute asynchronously (in the background) or
8621 synchronously (wait until ready).")
8622 (license license:bsd-3)
8623 (properties `((python2-variant . ,(delay python2-celery))))))
8624
8625 (define-public python2-celery
8626 (let ((celery (package-with-python2
8627 (strip-python2-variant python-celery))))
8628 (package
8629 (inherit celery)
8630 (native-inputs `(("python2-setuptools" ,python2-setuptools)
8631 ("python2-unittest2" ,python2-unittest2)
8632 ("python2-mock" ,python2-mock)
8633 ,@(package-native-inputs celery))))))
8634
8635 (define-public python-translitcodec
8636 (package
8637 (name "python-translitcodec")
8638 (version "0.4.0")
8639 (source
8640 (origin
8641 (method url-fetch)
8642 (uri (pypi-uri "translitcodec" version))
8643 (sha256
8644 (base32
8645 "10x6pvblkzky1zhjs8nmx64nb9jdzxad4bxhq4iwv0j4z2aqjnki"))))
8646 (build-system python-build-system)
8647 (arguments
8648 `(#:tests? #f)) ; no tests provided
8649 (home-page
8650 "https://github.com/claudep/translitcodec")
8651 (synopsis
8652 "Unicode to 8-bit charset transliteration codec")
8653 (description
8654 "This package contains codecs for transliterating ISO 10646 texts into
8655 best-effort representations using smaller coded character sets (ASCII,
8656 ISO 8859, etc.).")
8657 (license license:expat)
8658 (properties `((python2-variant . ,(delay python2-translitcodec))))))
8659
8660 (define-public python2-translitcodec
8661 (package
8662 (inherit (package-with-python2
8663 (strip-python2-variant python-translitcodec)))
8664 (native-inputs `(("python2-setuptools" ,python2-setuptools)))))
8665
8666 (define-public python-editor
8667 (package
8668 (name "python-editor")
8669 (version "0.5")
8670 (source
8671 (origin
8672 (method url-fetch)
8673 (uri (pypi-uri "python-editor" version))
8674 (sha256
8675 (base32
8676 "1ypnpgvzpkbwsg4rdvy4sy51j28b5xq9v8pnkwxncn07vqz06p7n"))))
8677 (build-system python-build-system)
8678 (home-page
8679 "https://github.com/fmoo/python-editor")
8680 (synopsis
8681 "Programmatically open an editor, capture the result")
8682 (description
8683 "python-editor is a library that provides the editor module for
8684 programmatically interfacing with your system's $EDITOR.")
8685 (license license:asl2.0)
8686 (properties `((python2-variant . ,(delay python2-editor))))))
8687
8688 (define-public python2-editor
8689 (package
8690 (inherit (package-with-python2
8691 (strip-python2-variant python-editor)))
8692 (inputs `(("python2-setuptools" ,python2-setuptools)))))
8693
8694 (define-public python-sphinxcontrib-programoutput
8695 (package
8696 (name "python-sphinxcontrib-programoutput")
8697 (version "0.8")
8698 (source (origin
8699 (method url-fetch)
8700 (uri (pypi-uri "sphinxcontrib-programoutput" version))
8701 (sha256
8702 (base32
8703 "098as6z1s0gb4dh5xcr1fd2vpm91zj93jzvgawspxf5s4hqs0xhp"))))
8704 (build-system python-build-system)
8705 (propagated-inputs
8706 `(("python-docutils" ,python-docutils)
8707 ("python-sphinx" ,python-sphinx)))
8708 (synopsis "Sphinx extension to include program output")
8709 (description "A Sphinx extension to literally insert the output of arbitrary
8710 commands into documents, helping you to keep your command examples up to date.")
8711 (home-page "https://github.com/lunaryorn/sphinxcontrib-programoutput")
8712 (license license:bsd-2)
8713 (properties `((python2-variant . ,(delay python2-sphinxcontrib-programoutput))))))
8714
8715 (define-public python2-sphinxcontrib-programoutput
8716 (package
8717 (inherit (package-with-python2
8718 (strip-python2-variant python-sphinxcontrib-programoutput)))
8719 (native-inputs `(("python2-setuptools" ,python2-setuptools)))))
8720
8721 (define-public python-sphinx-repoze-autointerface
8722 (package
8723 (name "python-sphinx-repoze-autointerface")
8724 (version "0.8")
8725 (source (origin
8726 (method url-fetch)
8727 (uri (pypi-uri "repoze.sphinx.autointerface" version))
8728 (sha256
8729 (base32
8730 "08ycivzf7bh4a1zcyp31hbyqs1b2c9r26raa3vxjwwmbfqr3iw4f"))))
8731 (build-system python-build-system)
8732 (propagated-inputs
8733 `(("python-docutils" ,python-docutils)
8734 ("python-sphinx" ,python-sphinx)
8735 ("python-zope-interface" ,python-zope-interface)))
8736 (synopsis "Auto-generate Sphinx API docs from Zope interfaces")
8737 (description "This package defines an extension for the Sphinx documentation
8738 system. The extension allows generation of API documentation by
8739 introspection of @code{zope.interface} instances in code.")
8740 (home-page "https://github.com/repoze/repoze.sphinx.autointerface")
8741 (license license:repoze)))
8742
8743 (define-public python2-sphinx-repoze-autointerface
8744 (package-with-python2 python-sphinx-repoze-autointerface))
8745
8746 (define-public python-psycopg2
8747 (package
8748 (name "python-psycopg2")
8749 (version "2.6.1")
8750 (source
8751 (origin
8752 (method url-fetch)
8753 (uri (pypi-uri "psycopg2" version))
8754 (sha256
8755 (base32
8756 "0k4hshvrwsh8yagydyxgmd0pjm29lwdxkngcq9fzfzkmpsxrmkva"))))
8757 (build-system python-build-system)
8758 (arguments
8759 ;; Tests would require a postgresql database "psycopg2_test"
8760 ;; and a running postgresql database management service.
8761 `(#:tests? #f)) ; TODO re-enable after providing a test-db.
8762 (inputs
8763 `(("postgresql" ,postgresql))) ; libpq
8764 (home-page "http://initd.org/psycopg/")
8765 (synopsis "Python PostgreSQL adapter")
8766 (description
8767 "psycopg2 is a thread-safe PostgreSQL adapter that implements DB-API 2.0. ")
8768 (license license:lgpl3+)
8769 (properties `((python2-variant . ,(delay python2-psycopg2))))))
8770
8771 (define-public python2-psycopg2
8772 (package
8773 (inherit (package-with-python2
8774 (strip-python2-variant python-psycopg2)))
8775 (native-inputs `(("python2-setuptools" ,python2-setuptools)))))
8776
8777 (define-public python-vobject
8778 (package
8779 (name "python-vobject")
8780 (version "0.9.2")
8781 (source (origin
8782 (method url-fetch)
8783 (uri (pypi-uri "vobject" version))
8784 (sha256
8785 (base32
8786 "1qfnwlx8qwkgr6nf5wvl6ff1r3kll53dh3z6nyp173nmlhhhqccb"))))
8787 (build-system python-build-system)
8788 (inputs
8789 `(("python-dateutil-2" ,python-dateutil-2)
8790 ("python-pyicu" ,python-pyicu)))
8791 (synopsis "Parse and generate vCard and vCalendar files")
8792 (description "Vobject is intended to be a full featured Python package for
8793 parsing and generating vCard and vCalendar files. Currently, iCalendar files
8794 are supported and well tested. vCard 3.0 files are supported, and all data
8795 should be imported, but only a few components are understood in a sophisticated
8796 way.")
8797 (home-page "http://eventable.github.io/vobject/")
8798 (license license:asl2.0)
8799 (properties `((python2-variant . ,(delay python2-vobject))))))
8800
8801 (define-public python2-vobject
8802 (package
8803 (inherit (package-with-python2
8804 (strip-python2-variant python-vobject)))
8805 (native-inputs `(("python2-setuptools" ,python2-setuptools)))))
8806
8807 (define-public python-munkres
8808 (package
8809 (name "python-munkres")
8810 (version "1.0.7")
8811 (source (origin
8812 (method url-fetch)
8813 (uri (pypi-uri "munkres" version))
8814 (sha256
8815 (base32
8816 "1i6nf45i0kkzdx6k70giybsqxz4dxsjbrkrfqgjd7znfkf25sjik"))))
8817 (build-system python-build-system)
8818 (arguments
8819 '(#:tests? #f)) ; no test suite
8820 (home-page "http://software.clapper.org/munkres/")
8821 (synopsis "Implementation of the Munkres algorithm")
8822 (description "The Munkres module provides an implementation of the Munkres
8823 algorithm (also called the Hungarian algorithm or the Kuhn-Munkres algorithm),
8824 useful for solving the Assignment Problem.")
8825 (license license:bsd-3)))
8826
8827 (define-public python2-munkres
8828 (package-with-python2 python-munkres))
8829
8830 (define-public python-flask
8831 (package
8832 (name "python-flask")
8833 (version "0.10.1")
8834 (source (origin
8835 (method url-fetch)
8836 (uri (pypi-uri "Flask" version))
8837 (sha256
8838 (base32
8839 "0wrkavjdjndknhp8ya8j850jq7a1cli4g5a93mg8nh1xz2gq50sc"))))
8840 (build-system python-build-system)
8841 (propagated-inputs
8842 `(("python-itsdangerous" ,python-itsdangerous)
8843 ("python-jinja2" ,python-jinja2)
8844 ("python-werkzeug" ,python-werkzeug)))
8845 (home-page "https://github.com/mitsuhiko/flask/")
8846 (synopsis "Microframework based on Werkzeug, Jinja2 and good intentions")
8847 (description "Flask is a micro web framework based on the Werkzeug toolkit
8848 and Jinja2 template engine. It is called a micro framework because it does not
8849 presume or force a developer to use a particular tool or library.")
8850 (license license:bsd-3)
8851 (properties `((python2-variant . ,(delay python2-flask))))))
8852
8853 (define-public python2-flask
8854 (package (inherit (package-with-python2
8855 (strip-python2-variant python-flask)))
8856 (native-inputs `(("python2-setuptools" ,python2-setuptools)))))
8857
8858 (define-public python-cookies
8859 (package
8860 (name "python-cookies")
8861 (version "2.2.1")
8862 (source (origin
8863 (method url-fetch)
8864 (uri (pypi-uri "cookies" version))
8865 (sha256
8866 (base32
8867 "13pfndz8vbk4p2a44cfbjsypjarkrall71pgc97glk5fiiw9idnn"))))
8868 (build-system python-build-system)
8869 (arguments
8870 `(;; test are broken: https://gitlab.com/sashahart/cookies/issues/3
8871 #:tests? #f))
8872 (native-inputs
8873 `(("python-pytest" ,python2-pytest)))
8874 (synopsis "HTTP cookie parser and renderer")
8875 (description "A RFC 6265-compliant HTTP cookie parser and renderer in
8876 Python.")
8877 (home-page "https://gitlab.com/sashahart/cookies")
8878 (license license:expat)
8879 (properties `((python2-variant . ,(delay python2-cookies))))))
8880
8881 (define-public python2-cookies
8882 (let ((cookies (package-with-python2
8883 (strip-python2-variant python-cookies))))
8884 (package (inherit cookies)
8885 (native-inputs `(("python2-setuptools" ,python2-setuptools)
8886 ,@(package-native-inputs cookies))))))
8887
8888 (define-public python-responses
8889 (package
8890 (name "python-responses")
8891 (version "0.5.1")
8892 (source (origin
8893 (method url-fetch)
8894 (uri (pypi-uri "responses" version))
8895 (sha256
8896 (base32
8897 "1spcfxixyk9k7pk82jm6zqkwk031s95lh8q0mz7539jrb7269bcc"))))
8898 (build-system python-build-system)
8899 (arguments
8900 `(;; Test suite is not distributed:
8901 ;; https://github.com/getsentry/responses/issues/38
8902 #:tests? #f))
8903 (native-inputs
8904 `(("python-cookies" ,python-cookies)
8905 ("python-mock" ,python-mock)))
8906 (propagated-inputs
8907 `(("python-requests" ,python-requests)
8908 ("python-six" ,python-six)))
8909 (home-page "https://github.com/getsentry/responses")
8910 (synopsis "Utility for mocking out the `requests` Python library")
8911 (description "A utility library for mocking out the `requests` Python
8912 library.")
8913 (license license:asl2.0)
8914 (properties `((python2-variant . ,(delay python2-responses))))))
8915
8916 (define-public python2-responses
8917 (let ((responses (package-with-python2
8918 (strip-python2-variant python-responses))))
8919 (package (inherit responses)
8920 (native-inputs `(("python2-setuptools" ,python2-setuptools)
8921 ,@(package-native-inputs responses))))))
8922
8923 (define-public python-whoosh
8924 (package
8925 (name "python-whoosh")
8926 (version "2.7.4")
8927 (source
8928 (origin
8929 (method url-fetch)
8930 (uri (pypi-uri "Whoosh" version))
8931 (sha256
8932 (base32
8933 "10qsqdjpbc85fykc1vgcs8xwbgn4l2l52c8d83xf1q59pwyn79bw"))))
8934 (build-system python-build-system)
8935 (native-inputs
8936 `(("python-setuptools" ,python-setuptools)
8937 ("python-pytest" ,python-pytest)))
8938 (home-page "http://bitbucket.org/mchaput/whoosh")
8939 (synopsis "Full text indexing, search, and spell checking library")
8940 (description
8941 "Whoosh is a fast, pure-Python full text indexing, search, and spell
8942 checking library.")
8943 (license license:bsd-2)))
8944
8945 (define-public python2-whoosh
8946 (let ((whoosh (package-with-python2 (strip-python2-variant python-whoosh))))
8947 (package (inherit whoosh)
8948 (propagated-inputs
8949 `(("python2-backport-ssl-match-hostname"
8950 ,python2-backport-ssl-match-hostname)
8951 ,@(package-propagated-inputs whoosh))))))
8952
8953 (define-public python-pathlib
8954 (package
8955 (name "python-pathlib")
8956 (version "1.0.1")
8957 (source (origin
8958 (method url-fetch)
8959 (uri (pypi-uri "pathlib" version))
8960 (sha256
8961 (base32
8962 "17zajiw4mjbkkv6ahp3xf025qglkj0805m9s41c45zryzj6p2h39"))))
8963 (build-system python-build-system)
8964 ;; The tests depend on the internal "test" module, which does not provide
8965 ;; a stable interface.
8966 (arguments `(#:tests? #f))
8967 (home-page "https://pathlib.readthedocs.org/")
8968 (synopsis "Object-oriented file system paths")
8969 (description "Pathlib offers a set of classes to handle file system paths.
8970 It offers the following advantages over using string objects:
8971
8972 @enumerate
8973 @item No more cumbersome use of os and os.path functions. Everything can
8974 be done easily through operators, attribute accesses, and method calls.
8975 @item Embodies the semantics of different path types. For example,
8976 comparing Windows paths ignores casing.
8977 @item Well-defined semantics, eliminating any inconsistencies or
8978 ambiguities (forward vs. backward slashes, etc.).
8979 @end enumerate
8980
8981 Note: In Python 3.4, pathlib is now part of the standard library. For other
8982 Python versions please consider python-pathlib2 instead, which tracks the
8983 standard library module. This module (python-pathlib) isn't maintained
8984 anymore.")
8985 (license license:expat)))
8986
8987 (define-public python2-pathlib
8988 (package-with-python2 python-pathlib))
8989
8990 (define-public python2-pathlib2
8991 (package
8992 (name "python2-pathlib2")
8993 (version "2.1.0")
8994 (source (origin
8995 (method url-fetch)
8996 (uri (pypi-uri "pathlib2" version))
8997 (sha256
8998 (base32
8999 "0p050msg5c8d0kadv702jnfshaxrb0il765cpkgnhn6mq5hakcyy"))))
9000 (build-system python-build-system)
9001 ;; We only need the the Python 2 variant, since for Python 3 our minimum
9002 ;; version is 3.4 which already includes this package as part of the
9003 ;; standard library.
9004 (arguments
9005 `(#:python ,python-2))
9006 (native-inputs
9007 `(("python2-setuptools" ,python2-setuptools)
9008 ("python2-six" ,python2-six)))
9009 (home-page "http://pypi.python.org/pypi/pathlib2/")
9010 (synopsis "Object-oriented file system paths - backport of standard
9011 pathlib module")
9012 (description "The goal of pathlib2 is to provide a backport of standard
9013 pathlib module which tracks the standard library module, so all the newest
9014 features of the standard pathlib can be used also on older Python versions.
9015
9016 Pathlib offers a set of classes to handle file system paths. It offers the
9017 following advantages over using string objects:
9018
9019 @enumerate
9020 @item No more cumbersome use of os and os.path functions. Everything can
9021 be done easily through operators, attribute accesses, and method calls.
9022 @item Embodies the semantics of different path types. For example,
9023 comparing Windows paths ignores casing.
9024 @item Well-defined semantics, eliminating any inconsistencies or
9025 ambiguities (forward vs. backward slashes, etc.).
9026 @end enumerate")
9027 (license license:expat)))
9028
9029 (define-public python-jellyfish
9030 (package
9031 (name "python-jellyfish")
9032 (version "0.5.3")
9033 (source (origin
9034 (method url-fetch)
9035 (uri (pypi-uri "jellyfish" version))
9036 (sha256
9037 (base32
9038 "12bxh8cy9xmvyrjz7aw159nd5pyvb645rkvw4r6bvm4xbvs8gd07"))))
9039 (build-system python-build-system)
9040 (native-inputs
9041 `(("python-pytest" ,python-pytest)))
9042 (home-page "https://github.com/jamesturk/jellyfish")
9043 (synopsis "Approximate and phonetic matching of strings")
9044 (description "Jellyfish uses a variety of string comparison and phonetic
9045 encoding algorithms to do fuzzy string matching.")
9046 (license license:bsd-2)
9047 (properties `((python2-variant . ,(delay python2-jellyfish))))))
9048
9049 (define-public python2-jellyfish
9050 (let ((jellyfish (package-with-python2
9051 (strip-python2-variant python-jellyfish))))
9052 (package (inherit jellyfish)
9053 (native-inputs `(("python2-setuptools" ,python2-setuptools)
9054 ("python2-unicodecsv" ,python2-unicodecsv)
9055 ,@(package-native-inputs jellyfish))))))
9056
9057 (define-public python2-unicodecsv
9058 (package
9059 (name "python2-unicodecsv")
9060 (version "0.14.1")
9061 (source (origin
9062 (method url-fetch)
9063 ;; The test suite is not included in the PyPi release.
9064 ;; https://github.com/jdunck/python-unicodecsv/issues/19
9065 (uri (string-append "https://github.com/jdunck/python-unicodecsv/"
9066 "archive/" version ".tar.gz"))
9067 (file-name (string-append name "-" version ".tar.gz"))
9068 (sha256
9069 (base32
9070 "087nqanfcyp6mlfbbr5lva5f3w6iz1bybls9xlrb8icmc474wh4w"))))
9071 (build-system python-build-system)
9072 (arguments
9073 `(;; It supports Python 3, but Python 3 can already do Unicode CSV.
9074 #:python ,python-2))
9075 (native-inputs
9076 `(("python2-setuptools" ,python2-setuptools)
9077 ("python2-unittest2" ,python2-unittest2)))
9078 (home-page "https://github.com/jdunck/python-unicodecsv")
9079 (synopsis "Unicode CSV module for Python 2")
9080 (description "Unicodecsv is a drop-in replacement for Python 2.7's CSV
9081 module, adding support for Unicode strings.")
9082 (license license:bsd-2)))
9083
9084 (define-public python-rarfile
9085 (package
9086 (name "python-rarfile")
9087 (version "2.7")
9088 (source (origin
9089 (method url-fetch)
9090 (uri (pypi-uri "rarfile" version))
9091 (sha256
9092 (base32
9093 "0d8n1dlpiz7av8dmbp0vclrwl9cnxizr4f2c9xvj1h5nvn480527"))
9094 ;; https://github.com/markokr/rarfile/pull/17/
9095 (patches (search-patches "python-rarfile-fix-tests.patch"))))
9096 (build-system python-build-system)
9097 (arguments
9098 '(#:phases
9099 (modify-phases %standard-phases
9100 (replace 'check
9101 ;; Many tests fail, but the installation proceeds.
9102 (lambda _ (zero? (system* "make" "-C" "test" "test")))))))
9103 (native-inputs
9104 `(("which" ,which))) ; required for tests
9105 (propagated-inputs
9106 `(("libarchive" ,libarchive)))
9107 (home-page "https://github.com/markokr/rarfile")
9108 (synopsis "RAR archive reader for Python")
9109 (description "This is Python module for RAR archive reading. The interface
9110 is made as zipfile like as possible.")
9111 (license license:isc)))
9112
9113 (define-public python2-rarfile
9114 (package-with-python2 python-rarfile))
9115
9116 (define-public python-magic
9117 (package
9118 (name "python-magic")
9119 (version "0.4.3")
9120 (source
9121 (origin
9122 (method url-fetch)
9123 (uri (string-append "https://github.com/ahupp/python-magic/archive/"
9124 version ".tar.gz"))
9125 (sha256
9126 (base32
9127 "17bgy92i7sb021f2s4mw1dcvpm6p1mi9jihridwy1pyn8mzvpjgk"))
9128 (file-name (string-append name "-" version "-checkout"))))
9129 (build-system python-build-system)
9130 (arguments
9131 ;; The tests are unreliable, so don't run them. The tests fail
9132 ;; under Python3 because they were written for Python2 and
9133 ;; contain import statements that do not work in Python3. One of
9134 ;; the tests fails under Python2 because its assertions are
9135 ;; overly stringent; it relies on comparing output strings which
9136 ;; are brittle and can change depending on the version of
9137 ;; libmagic being used and the system on which the test is
9138 ;; running. In my case, under GuixSD 0.10.0, only one test
9139 ;; failed, and it seems to have failed only because the version
9140 ;; of libmagic that is packaged in Guix outputs a slightly
9141 ;; different (but not wrong) string than the one that the test
9142 ;; expected.
9143 '(#:tests? #f
9144 #:phases (modify-phases %standard-phases
9145 ;; Replace a specific method call with a hard-coded
9146 ;; path to the necessary libmagic.so file in the
9147 ;; store. If we don't do this, then the method call
9148 ;; will fail to find the libmagic.so file, which in
9149 ;; turn will cause any application using
9150 ;; python-magic to fail.
9151 (add-before 'build 'hard-code-path-to-libmagic
9152 (lambda* (#:key inputs #:allow-other-keys)
9153 (let ((file (assoc-ref inputs "file")))
9154 (substitute* "magic.py"
9155 (("ctypes.util.find_library\\('magic'\\)")
9156 (string-append "'" file "/lib/libmagic.so'")))
9157 #t)))
9158 (add-before 'install 'disable-egg-compression
9159 (lambda _
9160 (let ((port (open-file "setup.cfg" "a")))
9161 (display "\n[easy_install]\nzip_ok = 0\n"
9162 port)
9163 (close-port port)
9164 #t))))))
9165 (native-inputs
9166 `(("python-setuptools" ,python-setuptools)))
9167 (inputs
9168 ;; python-magic needs to be able to find libmagic.so.
9169 `(("file" ,file)))
9170 (home-page "https://github.com/ahupp/python-magic")
9171 (synopsis "File type identification using libmagic")
9172 (description
9173 "This module uses ctypes to access the libmagic file type
9174 identification library. It makes use of the local magic database and
9175 supports both textual and MIME-type output. Note that this module and
9176 the python-file module both provide a \"magic.py\" file; these two
9177 modules, which are different and were developed separately, both serve
9178 the same purpose: to provide Python bindings for libmagic.")
9179 (license license:expat)))
9180
9181 (define-public python2-magic
9182 (package-with-python2 python-magic))
9183
9184 (define-public python2-s3cmd
9185 (package
9186 (name "python2-s3cmd")
9187 (version "1.6.1")
9188 (source
9189 (origin
9190 (method url-fetch)
9191 (uri (string-append "mirror://sourceforge/s3tools/s3cmd/" version "/"
9192 "s3cmd-" version ".tar.gz"))
9193 (sha256
9194 (base32
9195 "0ki1rzhm5icvi9ry5jswi4b22yqwyj0d2wsqsgilwx6qhi7pjxa6"))))
9196 (build-system python-build-system)
9197 (arguments
9198 ;; s3cmd is written for python2 only and contains no tests.
9199 `(#:python ,python-2
9200 #:tests? #f))
9201 (native-inputs
9202 `(("python2-setuptools" ,python2-setuptools)))
9203 (inputs
9204 `(("python2-dateutil" ,python2-dateutil)
9205 ;; The python-file package also provides a magic.py module.
9206 ;; This is an unfortunate state of affairs; however, s3cmd
9207 ;; fails to install if it cannot find specifically the
9208 ;; python-magic package. Thus we include it, instead of using
9209 ;; python-file. Ironically, s3cmd sometimes works better
9210 ;; without libmagic bindings at all:
9211 ;; https://github.com/s3tools/s3cmd/issues/198
9212 ("python2-magic" ,python2-magic)))
9213 (home-page "http://s3tools.org/s3cmd")
9214 (synopsis "Command line tool for S3-compatible storage services")
9215 (description
9216 "S3cmd is a command line tool for uploading, retrieving and managing data
9217 in storage services that are compatible with the Amazon Simple Storage
9218 Service (S3) protocol, including S3 itself. It supports rsync-like backup,
9219 GnuPG encryption, and more. It also supports management of Amazon's
9220 CloudFront content delivery network.")
9221 (license license:gpl2+)))
9222
9223 (define-public python-pkgconfig
9224 (package
9225 (name "python-pkgconfig")
9226 (version "1.1.0")
9227 (source
9228 (origin
9229 (method url-fetch)
9230 (uri (pypi-uri "pkgconfig" version))
9231 (sha256
9232 (base32
9233 "1pw0kmvc57sjmaxi6c54fqsnihqj6hvhc9y1vaz36axafzqam7bh"))))
9234 (build-system python-build-system)
9235 (native-inputs
9236 `(("python-nose" ,python-nose)
9237 ("python-setuptools" ,python-setuptools)))
9238 (inputs
9239 `(("pkg-config" ,pkg-config)))
9240 (arguments
9241 `(;; Tests fail with "ValueError: _type_ 'v' not supported" on Python 3,
9242 ;; and on Python 2 they need the dl module deprecated since Python 2.6.
9243 #:tests? #f
9244 ;; Prevent creation of the egg. This works around
9245 ;; https://debbugs.gnu.org/cgi/bugreport.cgi?bug=20765 .
9246 #:configure-flags '("--single-version-externally-managed" "--root=/")
9247 ;; Hard-code the path to pkg-config.
9248 #:phases
9249 (modify-phases %standard-phases
9250 (add-before
9251 'build 'patch
9252 (lambda _
9253 (substitute* "pkgconfig/pkgconfig.py"
9254 (("cmd = 'pkg-config")
9255 (string-append "cmd = '" (which "pkg-config"))))
9256 #t)))))
9257 (home-page "http://github.com/matze/pkgconfig")
9258 (synopsis "Python interface for pkg-config")
9259 (description "This module provides a Python interface to pkg-config. It
9260 can be used to find all pkg-config packages, check if a package exists,
9261 check if a package meets certain version requirements, query CFLAGS and
9262 LDFLAGS and parse the output to build extensions with setup.py.")
9263 (license license:expat)))
9264
9265 (define-public python2-pkgconfig
9266 (package-with-python2 python-pkgconfig))
9267
9268 (define-public python-bz2file
9269 (package
9270 (name "python-bz2file")
9271 (version "0.98")
9272 (source
9273 (origin
9274 (method url-fetch)
9275 (uri (pypi-uri "bz2file" version))
9276 (sha256
9277 (base32
9278 "126s53fkpx04f33a829yqqk8fj4png3qwg4m66cvlmhmwc8zihb4"))))
9279 (build-system python-build-system)
9280 (arguments
9281 `(#:tests? #f)) ; Tests use deprecated python modules.
9282 (home-page "https://github.com/nvawda/bz2file")
9283 (synopsis "Read and write bzip2-compressed files")
9284 (description
9285 "Bz2file is a Python library for reading and writing bzip2-compressed
9286 files. It contains a drop-in replacement for the I/O interface in the
9287 standard library's @code{bz2} module, including features from the latest
9288 development version of CPython that are not available in older releases.")
9289 (license license:asl2.0)
9290 (properties `((python2-variant . ,(delay python2-bz2file))))))
9291
9292 (define-public python2-bz2file
9293 (let ((base (package-with-python2
9294 (strip-python2-variant python-bz2file))))
9295 (package
9296 (inherit base)
9297 (native-inputs
9298 `(("python2-setuptools" ,python2-setuptools)))
9299 (arguments
9300 `(#:python ,python-2
9301 #:phases
9302 (modify-phases %standard-phases
9303 ;; 'python setup.py test' does not work as of 0.98.
9304 ;; There is only the one test file, so we run it directly.
9305 (replace 'check
9306 (lambda _ (zero? (system* "python"
9307 "test_bz2file.py"))))))))))
9308
9309 (define-public python-future
9310 (package
9311 (name "python-future")
9312 (version "0.15.2")
9313 (source
9314 (origin
9315 (method url-fetch)
9316 (uri (pypi-uri "future" version))
9317 (sha256
9318 (base32
9319 "15wvcfzssc68xqnqi1dq4fhd0848hwi9jn42hxyvlqna40zijfrx"))))
9320 (build-system python-build-system)
9321 ;; Many tests connect to the network or are otherwise flawed.
9322 ;; https://github.com/PythonCharmers/python-future/issues/210
9323 (arguments
9324 `(#:tests? #f))
9325 (home-page "http://python-future.org")
9326 (synopsis "Single-source support for Python 3 and 2")
9327 (description
9328 "@code{python-future} is the missing compatibility layer between Python 2 and
9329 Python 3. It allows you to use a single, clean Python 3.x-compatible codebase
9330 to support both Python 2 and Python 3 with minimal overhead.")
9331 (license license:expat)
9332 (properties `((python2-variant . ,(delay python2-future))))))
9333
9334 (define-public python2-future
9335 (let ((base (package-with-python2
9336 (strip-python2-variant python-future))))
9337 (package
9338 (inherit base)
9339 (native-inputs `(("python2-setuptools" ,python2-setuptools))))))
9340
9341 (define-public python-cysignals
9342 (package
9343 (name "python-cysignals")
9344 (version "1.1.0")
9345 (source
9346 (origin
9347 (method url-fetch)
9348 (uri (pypi-uri "cysignals" version ".tar.bz2"))
9349 (sha256
9350 (base32
9351 "14cbyd9znlz6cxy1s3g6v6dv5jj45hn27pywkidd9b1zanaysqc6"))))
9352 (build-system python-build-system)
9353 (native-inputs
9354 `(("python-cython" ,python-cython)
9355 ("python-setuptools" ,python-setuptools)
9356 ("python-sphinx" ,python-sphinx)))
9357 (inputs
9358 `(("pari-gp" ,pari-gp)))
9359 (arguments
9360 `(#:modules ((guix build python-build-system)
9361 ((guix build gnu-build-system) #:prefix gnu:)
9362 (guix build utils))
9363 ;; FIXME: Tests are executed after installation and currently fail
9364 ;; when not installing into standard locations; the author is working
9365 ;; on a fix.
9366 #:tests? #f
9367 #:phases
9368 (modify-phases %standard-phases
9369 (add-before
9370 'build 'configure
9371 (assoc-ref gnu:%standard-phases 'configure)))))
9372 (home-page
9373 "https://github.com/sagemath/cysignals")
9374 (synopsis
9375 "Handling of interrupts and signals for Cython")
9376 (description
9377 "The cysignals package provides mechanisms to handle interrupts (and
9378 other signals and errors) in Cython code, using two related approaches,
9379 for mixed Cython/Python code or external C libraries and pure Cython code,
9380 respectively.")
9381 (license license:lgpl3+)))
9382
9383 (define-public python2-cysignals
9384 (package-with-python2 python-cysignals))
9385
9386 (define-public python2-shedskin
9387 (package
9388 (name "python2-shedskin")
9389 (version "0.9.4")
9390 (source
9391 (origin
9392 (method url-fetch)
9393 (uri (string-append "https://github.com/shedskin/shedskin/"
9394 "releases/download/v" version
9395 "/shedskin-" version ".tgz"))
9396 (sha256
9397 (base32
9398 "0nzwrzgw1ga8rw6f0ryq7zr9kkiavd1cqz5hzxkcbicl1dk7kz41"))))
9399 (build-system python-build-system)
9400 (arguments
9401 `(#:python ,python-2
9402 #:phases (modify-phases %standard-phases
9403 (add-after 'unpack 'fix-resulting-include-libs
9404 (lambda* (#:key inputs #:allow-other-keys)
9405 (let ((libgc (assoc-ref inputs "libgc"))
9406 (pcre (assoc-ref inputs "pcre")))
9407 (substitute* "shedskin/makefile.py"
9408 (("variable == 'CCFLAGS':[ ]*")
9409 (string-append "variable == 'CCFLAGS':\n"
9410 " line += ' -I " pcre "/include"
9411 " -I " libgc "/include'"))
9412 (("variable == 'LFLAGS':[ ]*")
9413 (string-append "variable == 'LFLAGS':\n"
9414 " line += ' -L" pcre "/lib"
9415 " -L " libgc "/lib'")))
9416 #t))))))
9417 (native-inputs `(("python2-setuptools" ,python2-setuptools)))
9418 (inputs `(("pcre" ,pcre)
9419 ("libgc" ,libgc)))
9420 (home-page "https://shedskin.github.io/")
9421 (synopsis "Experimental Python-2 to C++ Compiler")
9422 (description (string-append "This is an experimental compiler for a subset of
9423 Python. It generates C++ code and a Makefile."))
9424 (license (list license:gpl3 license:bsd-3 license:expat))))
9425
9426 (define-public python2-rope
9427 (package
9428 (name "python2-rope")
9429 (version "0.10.3")
9430 (source
9431 (origin
9432 (method url-fetch)
9433 (uri (pypi-uri "rope" version))
9434 (sha256
9435 (base32
9436 "18k5znhpwvrfck3yp0jmhd5j8r0f0s8bk1zh5yhs2cfgmfhbwigb"))))
9437 (arguments
9438 ;; Rope is currently python-2 only.
9439 ;; https://github.com/python-rope/rope/issues/57
9440 `(#:python ,python-2))
9441 (build-system python-build-system)
9442 (native-inputs
9443 `(("python2-unittest2" ,python2-unittest2)
9444 ("python2-setuptools" ,python2-setuptools)))
9445 (home-page "https://github.com/python-rope/rope")
9446 (synopsis "Refactoring library for Python")
9447 (description "Rope is a refactoring library for Python. It facilitates
9448 the renaming, moving and extracting of attributes, functions, modules, fields
9449 and parameters in Python 2 source code. These refactorings can also be applied
9450 to occurences in strings and comments.")
9451 (license license:gpl2)))
9452
9453 (define-public python-py3status
9454 (package
9455 (name "python-py3status")
9456 (version "3.1")
9457 (source
9458 (origin
9459 (method url-fetch)
9460 (uri (pypi-uri "py3status" version))
9461 (sha256
9462 (base32
9463 "0i283z1pivmir61z8kbiycigc94l61v33ygzkhczf1ifq7cppyds"))))
9464 (build-system python-build-system)
9465 (native-inputs
9466 `(("python-setuptools" ,python-setuptools)))
9467 (home-page "https://github.com/ultrabug/py3status")
9468 (synopsis "Extensible i3status wrapper written in Python")
9469 (description "py3status is an i3status wrapper which extends i3status
9470 functionality in a modular way, allowing you to extend your panel with your
9471 own code, responding to click events and updating clock every second.")
9472 (license license:bsd-3)))
9473
9474 (define-public python-tblib
9475 (package
9476 (name "python-tblib")
9477 (version "1.3.0")
9478 (source (origin
9479 (method url-fetch)
9480 (uri (pypi-uri "tblib" version))
9481 (sha256 (base32
9482 "02iahfkfa927hb4jq2bak36ldihwapzacfiq5lyxg8llwn98a1yi"))))
9483 (build-system python-build-system)
9484 (arguments
9485 `(#:phases
9486 (modify-phases %standard-phases
9487 (replace 'check
9488 (lambda _
9489 ;; Upstream runs tests after installation and the package itself
9490 ;; resides in a subdirectory. Extend PYTHONPATH so it will be
9491 ;; found.
9492 (setenv "PYTHONPATH"
9493 (string-append (getcwd) "/build/lib:"
9494 (getenv "PYTHONPATH")))
9495 (zero? (system* "py.test" "-vv" "tests" "README.rst")))))))
9496 (native-inputs
9497 `(("python-pytest" ,python-pytest)
9498 ("python-setuptools" ,python-setuptools)
9499 ("python-six" ,python-six)))
9500 (home-page "https://github.com/ionelmc/python-tblib")
9501 (synopsis "Traceback serialization library")
9502 (description
9503 "Traceback serialization allows you to:
9504
9505 @enumerate
9506 @item Pickle tracebacks and raise exceptions with pickled tracebacks in
9507 different processes. This allows better error handling when running code over
9508 multiple processes (imagine multiprocessing, billiard, futures, celery etc).
9509
9510 @item Parse traceback strings and raise with the parsed tracebacks.
9511 @end itemize")
9512 (license license:bsd-3)))
9513
9514 (define-public python2-tblib
9515 (package-with-python2 python-tblib))
9516
9517 (define-public python-sqlparse
9518 (package
9519 (name "python-sqlparse")
9520 (version "0.1.19")
9521 (source (origin
9522 (method url-fetch)
9523 (uri (pypi-uri "sqlparse" version))
9524 (sha256
9525 (base32
9526 "1s2fvaxgh9kqzrd6iwy5h7i61ckn05plx9np13zby93z3hdbx5nq"))))
9527 (build-system python-build-system)
9528 (arguments
9529 `(#:phases
9530 (modify-phases %standard-phases
9531 (replace 'check
9532 (lambda* _
9533 ;; setup.py-integrated 2to3 only affects the build files, but
9534 ;; py.test is using the source files. So we need to convert them
9535 ;; manually.
9536 (when (zero? (system* "python3"))
9537 (system* "2to3" "--no-diff" "-wn" "sqlparse" "tests"))
9538 (zero? (system* "py.test")))))))
9539 (native-inputs
9540 `(("python-pytest" ,python-pytest)
9541 ("python-setuptools" ,python-setuptools)))
9542 (home-page "https://github.com/andialbrecht/sqlparse")
9543 (synopsis "Non-validating SQL parser")
9544 (description "Sqlparse is a non-validating SQL parser for Python. It
9545 provides support for parsing, splitting and formatting SQL statements.")
9546 (license license:bsd-3)))
9547
9548 (define-public python2-sqlparse
9549 (package-with-python2 python-sqlparse))
9550
9551 (define-public python-greenlet
9552 (package
9553 (name "python-greenlet")
9554 (version "0.4.9")
9555 (source (origin
9556 (method url-fetch)
9557 (uri (pypi-uri "greenlet" version))
9558 (sha256
9559 (base32
9560 "04h0m54dyqg49vyarq26mry6kbivnpl47rnmmrk9qn8wpfxviybr"))))
9561 (build-system python-build-system)
9562 (native-inputs
9563 `(("python-setuptools" ,python-setuptools)))
9564 (home-page "https://greenlet.readthedocs.io/")
9565 (synopsis "Lightweight in-process concurrent programming")
9566 (description
9567 "Greenlet package is a spin-off of Stackless, a version of CPython
9568 that supports micro-threads called \"tasklets\". Tasklets run
9569 pseudo-concurrently (typically in a single or a few OS-level threads) and
9570 are synchronized with data exchanges on \"channels\".")
9571 (license (list license:psfl license:expat))))
9572
9573 (define-public python2-greenlet
9574 (package-with-python2 python-greenlet))
9575
9576 (define-public python-gevent
9577 (package
9578 (name "python-gevent")
9579 (version "1.1.1")
9580 (source (origin
9581 (method url-fetch)
9582 (uri (pypi-uri "gevent" version))
9583 (sha256
9584 (base32
9585 "1smf3kvidpdiyi2c81alal74p2zm0clrm6xbyy6y1k9a3f2vkrbf"))
9586 (modules '((guix build utils)))
9587 (snippet
9588 '(begin
9589 ;; unbunding libev and c-ares
9590 (for-each delete-file-recursively '("libev" "c-ares"))
9591 ;; fixing testsuite
9592 (call-with-output-file "greentest/__init__.py" noop)
9593 (substitute* "greentest/testrunner.py"
9594 (("import util") "from . import util")
9595 (("from util import log") "from .util import log"))))))
9596 (build-system python-build-system)
9597 (propagated-inputs
9598 `(("python-greenlet" ,python-greenlet)))
9599 (native-inputs
9600 `(("python-setuptools" ,python-setuptools)
9601 ("python-six" ,python-six)))
9602 (inputs
9603 `(("c-ares" ,c-ares)
9604 ("libev" ,libev)))
9605 (home-page "http://www.gevent.org/")
9606 (synopsis "Coroutine-based network library")
9607 (description
9608 "gevent is a coroutine-based Python networking library that uses greenlet
9609 to provide a high-level synchronous API on top of the libev event loop.")
9610 (license license:expat)))
9611
9612 (define-public python2-gevent
9613 (package-with-python2 python-gevent))
9614
9615 (define-public python-twisted
9616 (package
9617 (name "python-twisted")
9618 (version "16.2.0")
9619 (source (origin
9620 (method url-fetch)
9621 (uri (pypi-uri "Twisted" version ".tar.bz2"))
9622 (sha256
9623 (base32
9624 "0ydxrp9myw1mvsz3qfzx5579y5llmqa82pxvqchgp5syczffi450"))))
9625 (build-system python-build-system)
9626 (native-inputs
9627 `(("python-setuptools" ,python-setuptools)))
9628 (propagated-inputs
9629 `(("python-zope-interface" ,python-zope-interface)))
9630 (home-page "https://twistedmatrix.com/")
9631 (synopsis "Asynchronous networking framework written in Python")
9632 (description
9633 "Twisted is an extensible framework for Python programming, with special
9634 focus on event-based network programming and multiprotocol integration.")
9635 (license license:expat)))
9636
9637 (define-public python2-twisted
9638 (package-with-python2 python-twisted))
9639
9640 (define-public python-pika
9641 (package
9642 (name "python-pika")
9643 (version "0.10.0")
9644 (source
9645 (origin
9646 (method url-fetch)
9647 (uri (pypi-uri "pika" version))
9648 (sha256
9649 (base32
9650 "0nb4h08di432lv7dy2v9kpwgk0w92f24sqc2hw2s9vwr5b8v8xvj"))))
9651 (build-system python-build-system)
9652 (native-inputs
9653 `(("python-pyev" ,python-pyev)
9654 ("python-tornado" ,python-tornado)
9655 ("python-twisted" ,python-twisted)))
9656 (home-page "https://pika.readthedocs.org")
9657 (synopsis "Pure Python AMQP Client Library")
9658 (description
9659 "Pika is a pure-Python implementation of the AMQP (Advanced Message Queuing
9660 Protocol) 0-9-1 protocol that tries to stay fairly independent of the underlying
9661 network support library.")
9662 (license license:bsd-3)))
9663
9664 (define-public python2-pika
9665 (package-with-python2 python-pika))
9666
9667 (define-public python-ply
9668 (package
9669 (name "python-ply")
9670 (version "3.8")
9671 (source
9672 (origin
9673 (method url-fetch)
9674 (uri (string-append
9675 "https://pypi.python.org/packages/"
9676 "96/e0/430fcdb6b3ef1ae534d231397bee7e9304be14a47a267e82ebcb3323d0b5"
9677 "/ply-" version ".tar.gz"))
9678 (sha256
9679 (base32
9680 "1f70ipynmiy09k6px2j7v4w5cdrc21za3xs2k6f1bsvb0bzvvlg7"))))
9681 (build-system python-build-system)
9682 (home-page "http://www.dabeaz.com/ply/")
9683 (synopsis "Python Lex & Yacc")
9684 (description "PLY is a @code{lex}/@code{yacc} implemented purely in Python.
9685 It uses LR parsing and does extensive error checking.")
9686 (license license:bsd-3)
9687 (properties `((python2-variant . ,(delay python2-ply))))))
9688
9689 (define-public python2-ply
9690 (package
9691 (inherit (package-with-python2
9692 (strip-python2-variant python-ply)))
9693 (native-inputs `(("python2-setuptools" ,python2-setuptools)))))
9694
9695 (define-public python-tabulate
9696 (package
9697 (name "python-tabulate")
9698 (version "0.7.5")
9699 (source (origin
9700 (method url-fetch)
9701 (uri (pypi-uri "tabulate" version))
9702 (sha256
9703 (base32
9704 "03l1r7ddd1a0j2snv1yd0hlnghjad3fg1an1jr8936ksv75slwch"))
9705 ;; Fix tests
9706 (modules '((guix build utils)))
9707 (snippet '(substitute* '("test/test_cli.py"
9708 "test/test_input.py"
9709 "test/test_output.py"
9710 "test/test_regression.py")
9711 (("from common") "from nose.tools")))))
9712 (build-system python-build-system)
9713 (native-inputs
9714 `(("python-setuptools" ,python-setuptools)
9715 ;; For testing
9716 ("python-nose" ,python-nose)))
9717 (home-page "https://bitbucket.org/astanin/python-tabulate")
9718 (synopsis "Pretty-print tabular data")
9719 (description
9720 "Tabulate is a library and command-line utility to pretty-print tabular
9721 data in Python.")
9722 (license license:expat)))
9723
9724 (define-public python2-tabulate
9725 (package-with-python2 python-tabulate))
9726
9727 (define-public python-kazoo
9728 (package
9729 (name "python-kazoo")
9730 (version "2.2.1")
9731 (source
9732 (origin
9733 (method url-fetch)
9734 (uri (pypi-uri "kazoo" version))
9735 (sha256
9736 (base32
9737 "10pb864if9qi2pq9lfb9m8f7z7ss6rml80gf1d9h64lap5crjnjj"))))
9738 (build-system python-build-system)
9739 (arguments '(#:tests? #f)) ; XXX: needs zookeeper
9740 (native-inputs
9741 `(("python-setuptools" ,python-setuptools)))
9742 (propagated-inputs
9743 `(("python-six" ,python-six)))
9744 (home-page "https://kazoo.readthedocs.org")
9745 (synopsis "High-level Zookeeper client library")
9746 (description
9747 "Kazoo is a Python client library for the Apache Zookeeper distributed
9748 application service. It is designed to be easy to use and to avoid common
9749 programming errors.")
9750 (license license:asl2.0)))
9751
9752 (define-public python2-kazoo
9753 (package-with-python2 python-kazoo))
9754
9755 (define-public python-pykafka
9756 (package
9757 (name "python-pykafka")
9758 (version "2.4.0")
9759 (source (origin
9760 (method url-fetch)
9761 (uri (string-append
9762 "https://pypi.python.org/packages/8b/3e/"
9763 "384eeff406b06315738b62483fd2126c6e4f544167116b17cc04ea7d2a59/"
9764 "pykafka-" version ".tar.gz"))
9765 (sha256
9766 (base32
9767 "1id6sr159p6aa13bxcqyr9gln8sqg1l0ddzns5iws8kk5q1p5cfv"))))
9768 (build-system python-build-system)
9769 (arguments '(#:tests? #f)) ; XXX: needs zookeeper, kafka, etc.
9770 (native-inputs
9771 `(("python-setuptools" ,python-setuptools)))
9772 (propagated-inputs
9773 `(("python-gevent" ,python-gevent)
9774 ("python-kazoo" ,python-kazoo)
9775 ("python-tabulate" ,python-tabulate)))
9776 (inputs
9777 `(("librdkafka" ,librdkafka)))
9778 (home-page "https://pykafka.readthedocs.io/")
9779 (synopsis "Apache Kafka client for Python")
9780 (description
9781 "PyKafka is a client for the Apache Kafka distributed messaging system.
9782 It includes Python implementations of Kafka producers and consumers, which
9783 are optionally backed by a C extension built on librdkafka.")
9784 (license license:asl2.0)))
9785
9786 (define-public python2-pykafka
9787 (package-with-python2 python-pykafka))
9788
9789 (define-public python-wcwidth
9790 (package
9791 (name "python-wcwidth")
9792 (version "0.1.6")
9793 (source
9794 (origin
9795 (method url-fetch)
9796 (uri (string-append
9797 "https://pypi.python.org/packages/"
9798 "c2/d1/7689293086a8d5320025080cde0e3155b94ae0a7496fb89a3fbaa92c354a/"
9799 "wcwidth-" version ".tar.gz"))
9800 (sha256
9801 (base32
9802 "02wjrpf001gjdjsaxxbzcwfg19crlk2dbddayrfc2v06f53yrcyw"))))
9803 (build-system python-build-system)
9804 (home-page "https://github.com/jquast/wcwidth")
9805 (synopsis "Measure number of terminal column cells of wide-character codes")
9806 (description "Wcwidth measures the number of terminal column cells of
9807 wide-character codes. It is useful for those implementing a terminal emulator,
9808 or programs that carefully produce output to be interpreted by one. It is a
9809 Python implementation of the @code{wcwidth} and @code{wcswidth} C functions
9810 specified in POSIX.1-2001 and POSIX.1-2008.")
9811 (license license:expat)
9812 (properties `((python2-variant . ,(delay python2-wcwidth))))))
9813
9814 (define-public python2-wcwidth
9815 (package
9816 (inherit (package-with-python2
9817 (strip-python2-variant python-wcwidth)))
9818 (native-inputs `(("python2-setuptools" ,python2-setuptools)))))
9819
9820 (define-public python2-jsonrpclib
9821 (package
9822 (name "python2-jsonrpclib")
9823 (version "0.1.7")
9824 (source (origin
9825 (method url-fetch)
9826 (uri (string-append
9827 "https://pypi.python.org/packages/source/j/jsonrpclib/"
9828 "jsonrpclib-" version ".tar.gz"))
9829 (sha256
9830 (base32
9831 "02vgirw2bcgvpcxhv5hf3yvvb4h5wzd1lpjx8na5psdmaffj6l3z"))))
9832 (build-system python-build-system)
9833 (native-inputs
9834 `(("python2-setuptools" ,python2-setuptools)))
9835 (arguments
9836 `(#:tests? #f
9837 #:python ,python-2))
9838 (home-page "https://github.com/joshmarshall/jsonrpclib/")
9839 (synopsis "Implementation of JSON-RPC specification for Python")
9840 (description
9841 "This library is an implementation of the JSON-RPC specification.
9842 It supports both the original 1.0 specification, as well as the
9843 new (proposed) 2.0 spec, which includes batch submission, keyword arguments,
9844 etc.")
9845 (license license:asl2.0)))
9846
9847 (define-public python-chai
9848 (package
9849 (name "python-chai")
9850 (version "1.1.1")
9851 (source (origin
9852 (method url-fetch)
9853 (uri (pypi-uri "chai" version))
9854 (sha256
9855 (base32
9856 "016kf3irrclpkpvcm7q0gmkfibq7jgy30a9v73pp42bq9h9a32bl"))))
9857 (build-system python-build-system)
9858 (native-inputs
9859 `(("python-setuptools" ,python-setuptools)))
9860 (home-page "https://github.com/agoragames/chai")
9861 (synopsis "Mocking framework for Python")
9862 (description
9863 "Chai provides an api for mocking, stubbing and spying your python
9864 objects, patterned after the Mocha library for Ruby.")
9865 (license license:bsd-3)))
9866
9867 (define-public python2-chai
9868 (package-with-python2 python-chai))
9869
9870 (define-public python-arrow
9871 (package
9872 (name "python-arrow")
9873 (version "0.8.0")
9874 (source (origin
9875 (method url-fetch)
9876 (uri (pypi-uri "arrow" version))
9877 (sha256
9878 (base32
9879 "1bz7hkdgpqcjs866y58z8jywpy7al0f4rxdr00bh2l5qddyw245j"))))
9880 (build-system python-build-system)
9881 (native-inputs
9882 `(("python-setuptools" ,python-setuptools)
9883 ;; For testing
9884 ("python-chai" ,python-chai)
9885 ("python-simplejson" ,python-simplejson)))
9886 (propagated-inputs
9887 `(("python-dateutil" ,python-dateutil-2)))
9888 (home-page "https://github.com/crsmithdev/arrow/")
9889 (synopsis "Dates and times for Python")
9890 (description
9891 "Arrow is a Python library to creating, manipulating, formatting and
9892 converting dates, times, and timestamps. It implements and updates the
9893 datetime type.")
9894 (license license:asl2.0)))
9895
9896 (define-public python2-arrow
9897 (package-with-python2 python-arrow))
9898
9899 (define-public python-inflection
9900 (package
9901 (name "python-inflection")
9902 (version "0.3.1")
9903 (source
9904 (origin (method url-fetch)
9905 (uri (pypi-uri "inflection" version))
9906 (sha256
9907 (base32
9908 "1jhnxgnw8y3mbzjssixh6qkc7a3afc4fygajhqrqalnilyvpzshq"))))
9909 (build-system python-build-system)
9910 (native-inputs
9911 `(("python-setuptools" ,python-setuptools)))
9912 (home-page "http://github.com/jpvanhal/inflection")
9913 (synopsis "Python string transformation library")
9914 (description
9915 "Inflection is a string transformation library. It singularizes
9916 and pluralizes English words, and transforms strings from CamelCase to
9917 underscored string.")
9918 (license license:expat)))
9919
9920 (define-public python2-inflection
9921 (package-with-python2 python-inflection))
9922
9923 (define-public python-pylev
9924 (package
9925 (name "python-pylev")
9926 (version "1.3.0")
9927 (source (origin
9928 (method url-fetch)
9929 (uri (pypi-uri "pylev" version))
9930 (sha256
9931 (base32
9932 "1hz1x9blsbxya1y9nnhnwwdnqmakxi9mc0jkwj0rn6b1h44i0f86"))))
9933 (build-system python-build-system)
9934 (native-inputs
9935 `(("python-setuptools" ,python-setuptools)))
9936 (home-page "http://github.com/toastdriven/pylev")
9937 (synopsis "Levenshtein distance implementation in Python")
9938 (description "Pure Python Levenshtein implementation, based off the
9939 Wikipedia code samples at
9940 @url{http://en.wikipedia.org/wiki/Levenshtein_distance}.")
9941 (license license:bsd-3)))
9942
9943 (define-public python2-pylev
9944 (package-with-python2 python-pylev))
9945
9946 (define-public python-cleo
9947 (package
9948 (name "python-cleo")
9949 (version "0.4.1")
9950 (source (origin
9951 (method url-fetch)
9952 (uri (pypi-uri "cleo" version))
9953 (sha256
9954 (base32
9955 "1k2dcl6mqpn5bljyl6w42rqyd9mb3y9kh2mg7m2x3kfjwvg0rpva"))))
9956 (build-system python-build-system)
9957 (native-inputs
9958 `(("python-setuptools" ,python-setuptools)
9959 ;; For testing
9960 ("python-mock" ,python-mock)
9961 ("python-pytest" ,python-pytest)))
9962 (propagated-inputs
9963 `(("python-psutil" ,python-psutil)
9964 ("python-pylev" ,python-pylev)))
9965 (home-page "https://github.com/sdispater/cleo")
9966 (synopsis "Command-line arguments library for Python")
9967 (description
9968 "Cleo allows you to create command-line commands with signature in
9969 docstring and colored output.")
9970 (license license:expat)))
9971
9972 (define-public python2-cleo
9973 (package-with-python2 python-cleo))
9974
9975 (define-public python-lazy-object-proxy
9976 (package
9977 (name "python-lazy-object-proxy")
9978 (version "1.2.2")
9979 (source (origin
9980 (method url-fetch)
9981 (uri (pypi-uri "lazy-object-proxy" version))
9982 (sha256
9983 (base32
9984 "0s22aqqkdscyh8sjspyyax7qa1aiz8p4midrnyf39717fhfczm6x"))))
9985 (build-system python-build-system)
9986 (native-inputs
9987 `(("python-setuptools" ,python-setuptools)))
9988 (home-page "https://github.com/ionelmc/python-lazy-object-proxy")
9989 (synopsis "Lazy object proxy for python")
9990 (description
9991 "Lazy object proxy is an object that wraps a callable but defers the call
9992 until the object is actually required, and caches the result of said call.")
9993 (license license:bsd-2)))
9994
9995 (define-public python2-lazy-object-proxy
9996 (package-with-python2 python-lazy-object-proxy))
9997
9998 (define-public python-dnspython
9999 (package
10000 (name "python-dnspython")
10001 (version "1.15.0")
10002 (source (origin
10003 (method url-fetch)
10004 (uri (string-append "http://www.dnspython.org/kits/"
10005 version "/dnspython-" version ".tar.gz"))
10006 (sha256
10007 (base32
10008 "0jr4v2pd90i6l1xxbss2m05psbjaxvyvvvpq44wycijpfgjqln8i"))))
10009 (build-system python-build-system)
10010 (arguments '(#:tests? #f)) ; XXX: requires internet access
10011 (native-inputs
10012 `(("python-setuptools" ,python-setuptools)))
10013 (home-page "http://www.dnspython.org")
10014 (synopsis "DNS toolkit for Python")
10015 (description
10016 "dnspython is a DNS toolkit for Python. It supports almost all record
10017 types. It can be used for queries, zone transfers, and dynamic updates.
10018 It supports TSIG authenticated messages and EDNS0.")
10019 (license license:expat)))
10020
10021 (define-public python2-dnspython
10022 (package-with-python2 python-dnspython))
10023
10024 (define-public python-email-validator
10025 (package
10026 (name "python-email-validator")
10027 (version "1.0.1")
10028 (source
10029 (origin (method url-fetch)
10030 (uri (pypi-uri "email_validator" version))
10031 (sha256
10032 (base32
10033 "0mn8jg5h8ifl8w6a6m0hq8kbk0mzw9vm054qfamkn89b3npz52qw"))))
10034 (build-system python-build-system)
10035 (arguments
10036 '(#:phases
10037 (modify-phases %standard-phases
10038 (add-before 'build 'use-dnspython
10039 (lambda _
10040 (substitute* "setup.py"
10041 (("dnspython3") "dnspython"))
10042 #t)))))
10043 (native-inputs
10044 `(("python-setuptools" ,python-setuptools)))
10045 (propagated-inputs
10046 `(("python-dnspython" ,python-dnspython)
10047 ("python-idna" ,python-idna)))
10048 (home-page "https://github.com/JoshData/python-email-validator")
10049 (synopsis "Email address validation library for Python")
10050 (description
10051 "This library validates email address syntax and deliverability.")
10052 (license license:cc0)))
10053
10054 (define-public python2-email-validator
10055 (package-with-python2 python-email-validator))
10056
10057 (define-public python-ukpostcodeparser
10058 (package
10059 (name "python-ukpostcodeparser")
10060 (version "1.0.3")
10061 (source (origin
10062 (method url-fetch)
10063 (uri (pypi-uri "UkPostcodeParser" version))
10064 (sha256
10065 (base32
10066 "1jwg9z4rz51mcka1821rwgycsd0mcicyp1kiwjfa2kvg8bm9p2qd"))))
10067 (build-system python-build-system)
10068 (native-inputs
10069 `(("python-setuptools" ,python-setuptools)))
10070 (home-page "https://github.com/hamstah/ukpostcodeparser")
10071 (synopsis "UK Postcode parser for Python")
10072 (description
10073 "This library provides the @code{parse_uk_postcode} function for
10074 parsing UK postcodes.")
10075 (license license:expat)))
10076
10077 (define-public python2-ukpostcodeparser
10078 (package-with-python2 python-ukpostcodeparser))
10079
10080 (define-public python-fake-factory
10081 (package
10082 (name "python-fake-factory")
10083 (version "0.7.2")
10084 (source (origin
10085 (method url-fetch)
10086 (uri (pypi-uri "fake-factory" version))
10087 (sha256
10088 (base32
10089 "0vs0dkmg0dlaxf8w6q2i3k0i03gmp56ablldv7ci9x3nbadkn71g"))))
10090 (build-system python-build-system)
10091 (native-inputs
10092 `(("python-setuptools" ,python-setuptools)
10093 ;; For testing
10094 ("python-email-validator" ,python-email-validator)
10095 ("python-mock" ,python-mock)
10096 ("python-ukpostcodeparser" ,python-ukpostcodeparser)))
10097 (propagated-inputs
10098 `(("python-dateutil" ,python-dateutil-2)
10099 ("python-six" ,python-six)))
10100 (home-page "https://github.com/joke2k/faker")
10101 (synopsis "Python package that generates fake data")
10102 (description
10103 "Faker is a Python package that generates fake data such as names,
10104 addresses, and phone numbers.")
10105 (license license:expat)
10106 (properties `((python2-variant . ,(delay python2-fake-factory))))))
10107
10108 (define-public python2-fake-factory
10109 (let ((base (package-with-python2 (strip-python2-variant
10110 python-fake-factory))))
10111 (package
10112 (inherit base)
10113 (propagated-inputs
10114 `(("python2-ipaddress" ,python2-ipaddress)
10115 ,@(package-propagated-inputs base))))))
10116
10117 (define-public python-pyaml
10118 (package
10119 (name "python-pyaml")
10120 (version "15.8.2")
10121 (source (origin
10122 (method url-fetch)
10123 (uri (pypi-uri "pyaml" version))
10124 (sha256
10125 (base32
10126 "1f5m28vkh4ksq3d80d8mmd2z8wxvc3mgy2pmrv2751dm2xgznm4w"))))
10127 (build-system python-build-system)
10128 (native-inputs
10129 `(("python-setuptools" ,python-setuptools)))
10130 (propagated-inputs
10131 `(("python-pyyaml" ,python-pyyaml)))
10132 (home-page "https://github.com/mk-fg/pretty-yaml")
10133 (synopsis "YAML pretty-print library for Python")
10134 (description
10135 "pyaml is a PyYAML based python module to produce pretty and readable
10136 YAML-serialized data.")
10137 (license (license:non-copyleft "http://www.wtfpl.net/txt/copying/"))))
10138
10139 (define-public python2-pyaml
10140 (package-with-python2 python-pyaml))
10141
10142 (define-public python-flexmock
10143 (package
10144 (name "python-flexmock")
10145 (version "0.10.2")
10146 (source (origin
10147 (method url-fetch)
10148 (uri (pypi-uri "flexmock" version))
10149 (sha256
10150 (base32
10151 "0arc6njvs6i9v9hgvzk5m50296g7zy5m9d7pyb43vdsdgxrci5gy"))))
10152 (build-system python-build-system)
10153 (native-inputs
10154 `(("python-setuptools" ,python-setuptools)))
10155 (home-page "https://flexmock.readthedocs.org")
10156 (synopsis "Testing library for Python")
10157 (description
10158 "flexmock is a testing library for Python that makes it easy to create
10159 mocks, stubs and fakes.")
10160 (license license:bsd-3)))
10161
10162 (define-public python2-flexmock
10163 (package-with-python2 python-flexmock))
10164
10165 (define-public python-orator
10166 (package
10167 (name "python-orator")
10168 (version "0.8.2")
10169 (source (origin
10170 (method url-fetch)
10171 (uri (pypi-uri "orator" version))
10172 (sha256
10173 (base32
10174 "1li49irsqha17nrda4nsb48biyy0rarp9pphf0jpqwm5zr8hv569"))))
10175 (build-system python-build-system)
10176 (arguments '(#:tests? #f)) ; no tests
10177 (native-inputs
10178 `(("python-setuptools" ,python-setuptools)))
10179 (propagated-inputs
10180 `(("python-arrow" ,python-arrow)
10181 ("python-blinker" ,python-blinker)
10182 ("python-cleo" ,python-cleo)
10183 ("python-fake-factory" ,python-fake-factory)
10184 ("python-inflection" ,python-inflection)
10185 ("python-lazy-object-proxy" ,python-lazy-object-proxy)
10186 ("python-pyaml" ,python-pyaml)
10187 ("python-simplejson" ,python-simplejson)
10188 ("python-wrapt" ,python-wrapt)))
10189 (home-page "https://orator-orm.com/")
10190 (synopsis "ActiveRecord ORM for Python")
10191 (description
10192 "Orator provides a simple ActiveRecord-like Object Relational Mapping
10193 implementation for Python.")
10194 (license license:expat)
10195 (properties `((python2-variant . ,(delay python2-orator))))))
10196
10197 (define-public python2-orator
10198 (let ((base (package-with-python2 (strip-python2-variant python-orator))))
10199 (package
10200 (inherit base)
10201 (propagated-inputs
10202 `(("python2-ipaddress" ,python2-ipaddress)
10203 ,@(package-propagated-inputs base))))))
10204
10205 (define-public python-prompt-toolkit
10206 (package
10207 (name "python-prompt-toolkit")
10208 (version "1.0.7")
10209 (source
10210 (origin
10211 (method url-fetch)
10212 (uri (pypi-uri "prompt_toolkit" version ".tar.gz"))
10213 (sha256
10214 (base32
10215 "1vyjd0b7wciv55i19l44zy0adx8q7ss79lhy2r9d1rwz2y4822zg"))))
10216 (build-system python-build-system)
10217 (arguments
10218 '(#:tests? #f)) ; The test suite uses some Windows-specific data types.
10219 (inputs `(("python-wcwidth" ,python-wcwidth)
10220 ("python-pygments" ,python-pygments)))
10221 (native-inputs `(("python-six" ,python-six)))
10222 (home-page "https://github.com/jonathanslenders/python-prompt-toolkit")
10223 (synopsis "Library for building command line interfaces in Python")
10224 (description
10225 "Prompt-Toolkit is a library for building interactive command line
10226 interfaces in Python. It's like GNU Readline but it also features syntax
10227 highlighting while typing, out-of-the-box multi-line input editing, advanced
10228 code completion, incremental search, support for Chinese double-width
10229 characters, mouse support, and auto suggestions.")
10230 (license license:bsd-3)
10231 (properties `((python2-variant . ,(delay python2-prompt-toolkit))))))
10232
10233 (define-public python2-prompt-toolkit
10234 (let ((base (package-with-python2 (strip-python2-variant python-prompt-toolkit))))
10235 (package
10236 (inherit base)
10237 (native-inputs
10238 `(("python2-setuptools" ,python2-setuptools)
10239 ,@(package-native-inputs base))))))
10240
10241 (define-public python-jedi
10242 (package
10243 (name "python-jedi")
10244 (version "0.9.0")
10245 (source
10246 (origin
10247 (method url-fetch)
10248 (uri (pypi-uri "jedi" version))
10249 (sha256
10250 (base32
10251 "0c8x962ynpx001fdvp07m2q5jk4igkxbj3rmnydavphvlgxijk1v"))))
10252 (build-system python-build-system)
10253 (home-page "https://github.com/davidhalter/jedi")
10254 (synopsis
10255 "Autocompletion for Python that can be used for text editors")
10256 (description
10257 "Jedi is an autocompletion tool for Python that can be used for text editors.")
10258 (license license:expat)
10259 (properties `((python2-variant . ,(delay python2-jedi))))))
10260
10261 (define-public python2-jedi
10262 (let ((base (package-with-python2 (strip-python2-variant python-jedi))))
10263 (package
10264 (inherit base)
10265 (native-inputs
10266 `(("python2-setuptools" ,python2-setuptools)
10267 ,@(package-native-inputs base))))))
10268
10269 (define-public ptpython
10270 (package
10271 (name "ptpython")
10272 (version "0.34")
10273 (source (origin
10274 (method url-fetch)
10275 (uri (pypi-uri "ptpython" version))
10276 (sha256
10277 (base32
10278 "1mmbiyzf0n8hm7z2a562x7w5cbl6jc0zsk6vp40q1z4cyblv1k13"))))
10279 (build-system python-build-system)
10280 (inputs
10281 `(("python-docopt" ,python-docopt)
10282 ("python-jedi" ,python-jedi)
10283 ("python-prompt-toolkit" ,python-prompt-toolkit)
10284 ("python-pygments" ,python-pygments)
10285 ("python-setuptools" ,python-setuptools)))
10286 (home-page "https://github.com/jonathanslenders/ptpython")
10287 (synopsis "Python Read-Eval-Print-Loop with nice IDE-like features")
10288 (description
10289 "ptpython is a Python read-eval-print loop with IDE-like features.
10290 It supports syntax highlighting, multiline editing, autocompletion, mouse,
10291 color schemes, bracketed paste, Vi and Emacs keybindings, Chinese characters
10292 etc.")
10293 (license license:bsd-3)
10294 (properties `((python2-variant . ,(delay ptpython-2))))))
10295
10296 (define-public ptpython-2
10297 (let ((base (package-with-python2 (strip-python2-variant ptpython))))
10298 (package
10299 (inherit base)
10300 (name "ptpython2"))))
10301
10302 (define-public python-requests-oauthlib
10303 (package
10304 (name "python-requests-oauthlib")
10305 (version "0.6.2")
10306 (source
10307 (origin
10308 (method url-fetch)
10309 (uri (pypi-uri "requests-oauthlib" version))
10310 (sha256
10311 (base32
10312 "0ykff67sjcl227c23g0rxzfx34rr5bf21kwv0z3zmgk0lfmch7hn"))))
10313 (build-system python-build-system)
10314 (arguments
10315 `(#:phases
10316 (modify-phases %standard-phases
10317 ;; removes tests that require network access
10318 (add-before 'check 'pre-check
10319 (lambda _
10320 (delete-file "tests/test_core.py")
10321 #t)))))
10322 (native-inputs
10323 `(("python-requests-mock" ,python-requests-mock)
10324 ("python-mock" ,python-mock)))
10325 (inputs
10326 `(("python-oauthlib" ,python-oauthlib)
10327 ("python-requests" ,python-requests)))
10328 (home-page
10329 "https://github.com/requests/requests-oauthlib")
10330 (synopsis
10331 "OAuthlib authentication support for Requests")
10332 (description
10333 "Requests-OAuthlib uses the Python Requests and OAuthlib libraries to
10334 provide an easy-to-use Python interface for building OAuth1 and OAuth2 clients.")
10335 (license license:isc)
10336 (properties `((python2-variant . ,(delay python2-requests-oauthlib))))))
10337
10338 (define-public python2-requests-oauthlib
10339 (let ((base (package-with-python2 (strip-python2-variant python-requests-oauthlib))))
10340 (package
10341 (inherit base)
10342 (native-inputs `(("python2-setuptools" ,python2-setuptools)
10343 ,@(package-native-inputs base))))))
10344
10345 (define-public python-stem
10346 (package
10347 (name "python-stem")
10348 (version "1.4.1b")
10349 (source
10350 (origin
10351 (method url-fetch)
10352 (uri (pypi-uri "stem" version ".tar.bz2"))
10353 (sha256
10354 (base32
10355 "09a3amp1y351nwz088ckiibbp666qi2lxwkyknavswfm400s0ns7"))))
10356 (build-system python-build-system)
10357 (arguments
10358 `(#:phases
10359 (modify-phases %standard-phases
10360 (replace 'check
10361 (lambda _
10362 (zero? (system* "./run_tests.py" "--unit")))))))
10363 (native-inputs
10364 `(("python-mock" ,python-mock)
10365 ("python-pep8" ,python-pep8)
10366 ("python-pyflakes" ,python-pyflakes)))
10367 (inputs
10368 `(("python-pycrypto" ,python-pycrypto)))
10369 (home-page "https://stem.torproject.org/")
10370 (synopsis
10371 "Python controller library that allows applications to interact with Tor")
10372 (description
10373 "Stem is a Python controller library for Tor. With it you can use Tor's
10374 control protocol to script against the Tor process and read descriptor data
10375 relays publish about themselves.")
10376 (license license:lgpl3)))
10377
10378 (define-public python2-stem
10379 (package-with-python2 python-stem))
10380
10381 (define-public python-pyserial
10382 (package
10383 (name "python-pyserial")
10384 (version "3.1.1")
10385 (source
10386 (origin
10387 (method url-fetch)
10388 (uri (pypi-uri "pyserial" version))
10389 (sha256
10390 (base32
10391 "0k1nfdrxxkdlv4zgaqsdv8li0pj3gbh2pyxw8q2bsg6f9490amyn"))))
10392 (build-system python-build-system)
10393 (home-page
10394 "https://github.com/pyserial/pyserial")
10395 (synopsis "Python Serial Port Bindings")
10396 (description "@code{pyserial} provide serial port bindings for Python. It
10397 supports different byte sizes, stop bits, parity and flow control with RTS/CTS
10398 and/or Xon/Xoff. The port is accessed in RAW mode.")
10399 (license license:bsd-3)
10400 (properties `((python2-variant . ,(delay python2-pyserial))))))
10401
10402 (define-public python2-pyserial
10403 (let ((base (package-with-python2 (strip-python2-variant python-pyserial))))
10404 (package
10405 (inherit base)
10406 (native-inputs
10407 `(("python2-setuptools" ,python2-setuptools)
10408 ,@(package-native-inputs base))))))
10409
10410 (define-public python-kivy
10411 (package
10412 (name "python-kivy")
10413 (version "1.9.1")
10414 (source
10415 (origin
10416 (method url-fetch)
10417 (uri (pypi-uri "kivy" version))
10418 (file-name (string-append name "-" version ".tar.gz"))
10419 (sha256
10420 (base32
10421 "0zk3g1j1z0lzcm9d0k1lprrs95zr8n8k5pdg3p5qlsn26jz4bg19"))))
10422 (build-system python-build-system)
10423 (arguments
10424 `(#:tests? #f ; Tests require many optional packages
10425 #:phases
10426 (modify-phases %standard-phases
10427 (replace 'build (lambda _ (zero? (system* "make" "force"))))
10428 (add-after 'patch-generated-file-shebangs 'set-sdl-paths
10429 (lambda* (#:key inputs #:allow-other-keys)
10430 (setenv "KIVY_SDL2_PATH"
10431 (string-append (assoc-ref inputs "sdl-union")
10432 "/include/SDL2"))
10433 #t)))))
10434 (native-inputs
10435 `(("pkg-config" ,pkg-config)))
10436 (inputs
10437 `(("python-cython" ,python-cython)
10438 ("gstreamer" ,gstreamer)
10439 ("mesa" ,mesa)
10440 ("sdl-union"
10441 ,(sdl-union (list sdl2 sdl2-image sdl2-mixer sdl2-ttf)))))
10442 (home-page "http://kivy.org")
10443 (synopsis
10444 "Multitouch application framework")
10445 (description
10446 "A software library for rapid development of
10447 hardware-accelerated multitouch applications.")
10448 (license license:expat)))
10449
10450 (define-public python2-kivy
10451 (package-with-python2 python-kivy))
10452
10453 (define-public python-kivy-next
10454 (let ((commit "a988c5e7a47da56263ff39514264a3de516ef2fe")
10455 (revision "1"))
10456 (package (inherit python-kivy)
10457 (name "python-kivy-next")
10458 (version (string-append "1.9.1-" revision "."
10459 (string-take commit 7)))
10460 (source
10461 (origin
10462 (method git-fetch)
10463 (uri (git-reference
10464 (url "https://github.com/kivy/kivy")
10465 (commit commit)))
10466 (file-name (string-append name "-" version "-checkout"))
10467 (sha256
10468 (base32
10469 "0jk92b4a8l7blkvkgkjihk171s0dfnq582cckff5srwc8kal5m0p")))))))
10470
10471 (define-public python2-kivy-next
10472 (package-with-python2 python-kivy-next))
10473
10474 (define-public python-binaryornot
10475 (package
10476 (name "python-binaryornot")
10477 (version "0.4.0")
10478 (source (origin
10479 (method url-fetch)
10480 (uri (pypi-uri "binaryornot" version))
10481 (sha256
10482 (base32
10483 "1j4f51dxic39mdwf6alj7gd769wy6mhk916v031wjali51xkh3xb"))))
10484 (build-system python-build-system)
10485 (inputs
10486 `(("python-chardet" ,python-chardet)
10487 ("python-hypothesis" ,python-hypothesis)))
10488 (home-page "https://github.com/audreyr/binaryornot")
10489 (synopsis "Package to check if a file is binary or text")
10490 (description "Ultra-lightweight pure Python package to check if a file is
10491 binary or text.")
10492 (license license:bsd-3)
10493 (properties `((python2-variant . ,(delay python2-binaryornot))))))
10494
10495 (define-public python2-binaryornot
10496 (let ((base (package-with-python2 (strip-python2-variant python-binaryornot))))
10497 (package (inherit base)
10498 (native-inputs
10499 `(("python2-setuptools" ,python2-setuptools)
10500 ,@(package-native-inputs base)))
10501 (inputs
10502 `(("python2-enum34" ,python2-enum34)
10503 ,@(package-inputs base))))))
10504
10505 (define-public python-nltk
10506 (package
10507 (name "python-nltk")
10508 (version "3.2.1")
10509 (source (origin
10510 (method url-fetch)
10511 (uri (pypi-uri "nltk" version))
10512 (sha256
10513 (base32
10514 "0skxbhnymwlspjkzga0f7x1hg3y50fwpfghs8g8k7fh6f4nknlym"))))
10515 (build-system python-build-system)
10516 (arguments
10517 '(;; The tests require some extra resources to be downloaded.
10518 ;; TODO Try packaging these resources.
10519 #:tests? #f))
10520 (home-page "http://nltk.org/")
10521 (synopsis "Natural Language Toolkit")
10522 (description "It provides interfaces to over 50 corpora and lexical
10523 resources such as WordNet, along with a suite of text processing libraries
10524 for classification, tokenization, stemming, tagging, parsing, and semantic
10525 reasoning, wrappers for natural language processing libraries.")
10526 (license license:asl2.0)
10527 (properties `((python2-variant . ,(delay python2-nltk))))))
10528
10529 (define-public python2-nltk
10530 (let ((base (package-with-python2 (strip-python2-variant python-nltk))))
10531 (package (inherit base)
10532 (native-inputs
10533 `(("python2-setuptools" ,python2-setuptools)
10534 ,@(package-native-inputs base))))))
10535
10536 (define-public python-pymongo
10537 (package
10538 (name "python-pymongo")
10539 (version "3.3.0")
10540 (source (origin
10541 (method url-fetch)
10542 (uri (pypi-uri "pymongo" version))
10543 (sha256
10544 (base32
10545 "07mra6w86wjqy4lx5fvimidjhhfzd562gfjn8grsnbv2q8pk0i9x"))))
10546 (build-system python-build-system)
10547 (inputs
10548 `(("python-certifi" ,python-certifi)))
10549 (home-page "http://github.com/mongodb/mongo-python-driver")
10550 (synopsis "Python driver for MongoDB")
10551 (description "Python driver for MongoDB.")
10552 (license license:asl2.0)
10553 (properties `((python2-variant . ,(delay python2-pymongo))))))
10554
10555 (define-public python2-pymongo
10556 (let ((base (package-with-python2 (strip-python2-variant python-pymongo))))
10557 (package (inherit base)
10558 (native-inputs
10559 `(("python2-setuptools" ,python2-setuptools)
10560 ,@(package-native-inputs base))))))
10561
10562 (define-public python-sh
10563 (package
10564 (name "python-sh")
10565 (version "1.11")
10566 (source (origin
10567 (method url-fetch)
10568 (uri (pypi-uri "sh" version))
10569 (sha256
10570 (base32
10571 "192r0mpv6dmkysjzhc43ddffiwb5g7c76bgr1mb1z2xz9awbj3sr"))))
10572 (build-system python-build-system)
10573 (arguments
10574 `(#:tests? #f)) ; no tests
10575 (home-page "https://github.com/amoffat/sh")
10576 (synopsis "Python subprocess interface")
10577 (description "Abstracts process invocation by providing a function
10578 interface for programs.")
10579 (license license:expat)
10580 (properties `((python2-variant . ,(delay python2-sh))))))
10581
10582 (define-public python2-sh
10583 (let ((base (package-with-python2 (strip-python2-variant python-sh))))
10584 (package (inherit base)
10585 (native-inputs
10586 `(("python2-setuptools" ,python2-setuptools)
10587 ,@(package-native-inputs base))))))
10588
10589 (define-public python-consul
10590 (package
10591 (name "python-consul")
10592 (version "0.6.1")
10593 (source
10594 (origin
10595 (method url-fetch)
10596 (uri (pypi-uri "python-consul" version))
10597 (sha256
10598 (base32
10599 "0rfyxcy4cr3x848vhx876ifalxd5ghq6l5x813m49h4vq2d4jiq8"))))
10600 (build-system python-build-system)
10601 (native-inputs
10602 `(("python-pytest" ,python-pytest)
10603 ("python-requests" ,python-requests)
10604 ("python-six" ,python-six)))
10605 (home-page "https://github.com/cablehead/python-consul")
10606 (synopsis "Python client for Consul")
10607 (description
10608 "Python client for @url{http://www.consul.io/,Consul}, a tool for service
10609 discovery, monitoring and configuration.")
10610 (license license:expat)))
10611
10612 (define-public python2-consul
10613 (let ((consul (package-with-python2 python-consul)))
10614 (package (inherit consul)
10615 (native-inputs
10616 `(("python2-setuptools" ,python2-setuptools)
10617 ,@(package-native-inputs consul))))))
10618
10619 (define-public python-schematics
10620 (package
10621 (name "python-schematics")
10622 (version "1.1.1")
10623 (source
10624 (origin
10625 (method url-fetch)
10626 (uri (string-append
10627 "https://github.com/schematics/schematics/archive/v" version ".tar.gz"))
10628 (file-name (string-append name "-" version ".tar.gz"))
10629 (sha256
10630 (base32
10631 "19v1i69bf3bzarfxmbv0v6ivpcn758x3shvbiy9l2hy0lvqwnp6l"))))
10632 (build-system python-build-system)
10633 (inputs
10634 `(("python-six" ,python-six)))
10635 (arguments
10636 `(#:tests? #f)) ; requires a bunch of not very nice packages with fixed
10637 ; version requirements (eg python-coveralls)
10638 (home-page "https://github.com/schematics/schematics")
10639 (synopsis "Python Data Structures for Humans")
10640 (description "Python Data Structures for Humans.")
10641 (license license:bsd-3)
10642 (properties `((python2-variant . ,(delay python2-schematics))))))
10643
10644 (define-public python2-schematics
10645 (let ((base (package-with-python2 (strip-python2-variant python-schematics))))
10646 (package (inherit base)
10647 (native-inputs
10648 `(("python2-setuptools" ,python2-setuptools)
10649 ,@(package-native-inputs base))))))
10650
10651 (define-public python-publicsuffix
10652 (package
10653 (name "python-publicsuffix")
10654 (version "1.1.0")
10655 (source (origin
10656 (method url-fetch)
10657 (uri (pypi-uri "publicsuffix" version))
10658 (sha256
10659 (base32
10660 "1adx520249z2cy7ykwjr1k190mn2888wqn9jf8qm27ly4qymjxxf"))))
10661 (build-system python-build-system)
10662 (arguments
10663 `(#:tests? #f)) ; tests use the internet
10664 (home-page "https://www.tablix.org/~avian/git/publicsuffix.git")
10665 (synopsis "Get suffix for a domain name")
10666 (description "Get a public suffix for a domain name using the Public Suffix
10667 List.")
10668 (license license:expat)
10669 (properties `((python2-variant . ,(delay python2-nltk))))))
10670
10671 (define-public python2-publicsuffix
10672 (let ((base (package-with-python2 (strip-python2-variant python-publicsuffix))))
10673 (package (inherit base)
10674 (native-inputs
10675 `(("python2-setuptools" ,python2-setuptools)
10676 ,@(package-native-inputs base))))))
10677
10678 (define-public python-publicsuffix2
10679 (package
10680 (name "python-publicsuffix2")
10681 (version "2.20160621")
10682 (source
10683 (origin
10684 (method url-fetch)
10685 (uri (pypi-uri "publicsuffix2" version ".tar.bz2"))
10686 (sha256
10687 (base32
10688 "06lx603gdwad5hc3hmn763ngq0rq9bzz1ni3ga72nzk5n872arkd"))))
10689 (build-system python-build-system)
10690 (arguments
10691 '(#:tests? #f)) ; The test suite requires network access.
10692 (home-page "https://github.com/pombredanne/python-publicsuffix2")
10693 (synopsis "Get a public suffix for a domain name using the Public Suffix List")
10694 (description "Get a public suffix for a domain name using the Public Suffix
10695 List. Forked from and using the same API as the publicsuffix package.")
10696 (license (list license:expat license:mpl2.0))
10697 (properties `((python2-variant . ,(delay python2-publicsuffix2))))))
10698
10699 (define-public python2-publicsuffix2
10700 (let ((base (package-with-python2 (strip-python2-variant python-publicsuffix2))))
10701 (package (inherit base)
10702 (native-inputs
10703 `(("python2-setuptools" ,python2-setuptools)
10704 ,@(package-native-inputs base))))))
10705
10706 (define-public python-url
10707 (package
10708 (name "python-url")
10709 (version "0.2.0")
10710 (source (origin
10711 (method url-fetch)
10712 (uri (pypi-uri "url" version))
10713 (sha256
10714 (base32
10715 "0v879yadcz9qxfl41ak6wkga1kimp9cflla9ddz03hjjvgkqy5ki"))))
10716 (build-system python-build-system)
10717 (inputs
10718 `(("python-publicsuffix" ,python-publicsuffix)))
10719 (native-inputs
10720 `(("python-coverage" ,python-coverage)
10721 ("python-nose" ,python-nose)))
10722 (arguments
10723 `(#:tests? #f)) ; FIXME: tests fail with "ImportError: No module named 'tests'"
10724 (home-page "http://github.com/seomoz/url-py")
10725 (synopsis "URL Parsing")
10726 (description "Library for parsing urls.")
10727 (license license:expat)
10728 (properties `((python2-variant . ,(delay python2-url))))))
10729
10730 (define-public python2-url
10731 (let ((base (package-with-python2 (strip-python2-variant python-url))))
10732 (package (inherit base)
10733 (inputs
10734 `(("python2-publicsuffix" ,python2-publicsuffix)))
10735 (native-inputs
10736 `(("python2-setuptools" ,python2-setuptools)
10737 ,@(package-native-inputs base))))))
10738
10739 (define-public python-freezegun
10740 (package
10741 (name "python-freezegun")
10742 (version "0.3.7")
10743 (source
10744 (origin
10745 (method url-fetch)
10746 (uri (pypi-uri "freezegun" version))
10747 (sha256
10748 (base32
10749 "14l19x06v5jkq4rdwbmfyw4x9lrjb2300afrk21r1ash7y1y9a0w"))))
10750 (build-system python-build-system)
10751 (native-inputs
10752 `(("python-mock" ,python-mock)
10753 ("python-nose" ,python-nose)
10754 ("python-coverage" ,python-coverage)
10755 ("python-dateutil-2" ,python-dateutil-2)))
10756 (inputs
10757 `(("python-six" ,python-six)))
10758 (arguments
10759 `(#:phases (modify-phases %standard-phases
10760 ;; The tests are normally executed via `make test`, but the PyPi
10761 ;; package does not include the Makefile.
10762 (replace 'check
10763 (lambda _
10764 (zero? (system* "nosetests" "./tests/")))))))
10765 (home-page "https://github.com/spulec/freezegun")
10766 (synopsis "Test utility for mocking the datetime module")
10767 (description
10768 "FreezeGun is a library that allows your python tests to travel through
10769 time by mocking the datetime module.")
10770 (license license:asl2.0)))
10771
10772 (define-public python2-freezegun
10773 (let ((base (package-with-python2 (strip-python2-variant python-freezegun))))
10774 (package (inherit base)
10775 (native-inputs
10776 `(("python2-setuptools" ,python2-setuptools)
10777 ,@(package-native-inputs base))))))
10778
10779 (define-public python-odfpy
10780 (package
10781 (name "python-odfpy")
10782 (version "1.3.3")
10783 (source (origin
10784 (method url-fetch)
10785 (uri (pypi-uri "odfpy" version))
10786 (sha256
10787 (base32
10788 "1a6ms0w9zfhhkqhvrnynwwbxrivw6hgjc0s5k7j06npc7rq0blxw"))))
10789 (arguments
10790 `(#:modules ((srfi srfi-1)
10791 (guix build python-build-system)
10792 (guix build utils))
10793 #:phases
10794 (modify-phases %standard-phases
10795 (replace 'check
10796 ;; The test runner invokes python2 and python3 for test*.py.
10797 ;; To avoid having both in inputs, we replicate it here.
10798 (lambda _
10799 (every (lambda (test-file)
10800 (zero? (system* "python" test-file)))
10801 (find-files "tests" "^test.*\\.py$")))))))
10802 (build-system python-build-system)
10803 (home-page "https://github.com/eea/odfpy")
10804 (synopsis "Python API and tools to manipulate OpenDocument files")
10805 (description "Collection of libraries and utility programs written in
10806 Python to manipulate OpenDocument 1.2 files.")
10807 (license
10808 ;; The software is mainly dual GPL2+ and ASL2.0, but includes a
10809 ;; number of files with other licenses.
10810 (list license:gpl2+ license:asl2.0 license:lgpl2.1+ license:cc-by-sa3.0))))
10811
10812 (define-public python2-odfpy
10813 (package-with-python2 python-odfpy))
10814
10815 (define-public python-cachecontrol
10816 (package
10817 (name "python-cachecontrol")
10818 (version "0.11.6")
10819 (source
10820 (origin
10821 (method url-fetch)
10822 ;; Pypi does not have tests.
10823 (uri (string-append
10824 "https://github.com/ionrock/cachecontrol/archive/v"
10825 version ".tar.gz"))
10826 (file-name (string-append name "-" version ".tar.gz"))
10827 (sha256
10828 (base32
10829 "0yj60d0f69a2l8p7y86k4zhzzm6rnxpq74sfl240pry9l0lfw2vw"))))
10830 (build-system python-build-system)
10831 (arguments
10832 `(#:phases
10833 (modify-phases %standard-phases
10834 (replace 'check
10835 (lambda _
10836 ;; Drop test that requires internet access.
10837 (delete-file "tests/test_regressions.py")
10838 (setenv "PYTHONPATH"
10839 (string-append (getcwd) "/build/lib:"
10840 (getenv "PYTHONPATH")))
10841 (zero? (system* "py.test" "-vv")))))))
10842 (native-inputs
10843 `(("python-pytest" ,python-pytest)
10844 ("python-redis" ,python-redis)
10845 ("python-webtest" ,python-webtest)
10846 ("python-mock" ,python-mock)))
10847 (propagated-inputs
10848 `(("python-requests" ,python-requests)
10849 ("python-lockfile" ,python-lockfile)))
10850 (home-page "https://github.com/ionrock/cachecontrol")
10851 (synopsis "The httplib2 caching algorithms for use with requests")
10852 (description "CacheControl is a port of the caching algorithms in
10853 @code{httplib2} for use with @code{requests} session objects.")
10854 (license license:asl2.0)
10855 (properties `((python2-variant . ,(delay python2-cachecontrol))))))
10856
10857 (define-public python2-cachecontrol
10858 (let ((base (package-with-python2 (strip-python2-variant python-cachecontrol))))
10859 (package (inherit base)
10860 (native-inputs
10861 `(("python2-setuptools" ,python2-setuptools)
10862 ,@(package-native-inputs base))))))
10863
10864 (define-public python-lit
10865 (package
10866 (name "python-lit")
10867 (version "0.5.0")
10868 (source
10869 (origin
10870 (method url-fetch)
10871 (uri (pypi-uri "lit" version))
10872 (sha256
10873 (base32
10874 "135m2b9cwih85g66rjggavck328z7lj37srgpq3jxszbg0g2b91y"))))
10875 (build-system python-build-system)
10876 (home-page "http://llvm.org/")
10877 (synopsis "LLVM Software Testing Tool")
10878 (description "@code{lit} is a portable tool for executing LLVM and Clang
10879 style test suites, summarizing their results, and providing indication of
10880 failures.")
10881 (license license:ncsa)
10882 (properties `((python2-variant . ,(delay python2-lit))))))
10883
10884 (define-public python2-lit
10885 (let ((base (package-with-python2 (strip-python2-variant python-lit))))
10886 (package
10887 (inherit base)
10888 (native-inputs
10889 `(("python2-setuptools" ,python2-setuptools)
10890 ,@(package-native-inputs base))))))
10891
10892 (define-public python-pytest-pep8
10893 (package
10894 (name "python-pytest-pep8")
10895 (version "1.0.6")
10896 (source (origin
10897 (method url-fetch)
10898 (uri (pypi-uri "pytest-pep8" version))
10899 (sha256
10900 (base32
10901 "06032agzhw1i9d9qlhfblnl3dw5hcyxhagn7b120zhrszbjzfbh3"))))
10902 (build-system python-build-system)
10903 (arguments
10904 `(#:tests? #f ; Fails with recent pytest and pep8. See upstream issues #8 and #12.
10905 ;; Prevent creation of the egg. This works around
10906 ;; https://debbugs.gnu.org/cgi/bugreport.cgi?bug=20765 .
10907 #:configure-flags '("--single-version-externally-managed" "--root=/")))
10908 (native-inputs
10909 `(("python-pytest" ,python-pytest)))
10910 (propagated-inputs
10911 `(("python-pep8" ,python-pep8)))
10912 (home-page "https://bitbucket.org/pytest-dev/pytest-pep8")
10913 (synopsis "Py.test plugin to check PEP8 requirements")
10914 (description "Pytest plugin for checking PEP8 compliance.")
10915 (license license:expat)
10916 (properties `((python2-variant . ,(delay python2-pytest-pep8))))))
10917
10918 (define-public python2-pytest-pep8
10919 (let ((base (package-with-python2 (strip-python2-variant python-pytest-pep8))))
10920 (package (inherit base)
10921 (native-inputs
10922 `(("python2-setuptools" ,python2-setuptools)
10923 ,@(package-native-inputs base))))))
10924
10925 (define-public python-pytest-flakes
10926 (package
10927 (name "python-pytest-flakes")
10928 (version "1.0.1")
10929 (source (origin
10930 (method url-fetch)
10931 (uri (pypi-uri "pytest-flakes" version))
10932 (sha256
10933 (base32
10934 "0flag3n33kbhyjrhzmq990rvg4yb8hhhl0i48q9hw0ll89jp28lw"))))
10935 (build-system python-build-system)
10936 (arguments
10937 `(;; Prevent creation of the egg. This works around
10938 ;; https://debbugs.gnu.org/cgi/bugreport.cgi?bug=20765 .
10939 #:configure-flags '("--single-version-externally-managed" "--root=/")
10940 #:phases
10941 (modify-phases %standard-phases
10942 (delete 'check)
10943 (add-after 'install 'check
10944 (lambda _ ; It's easier to run tests after install.
10945 (zero? (system* "py.test" "-vv")))))))
10946 (native-inputs
10947 `(("python-coverage" ,python-coverage)
10948 ("python-pytest" ,python-pytest)
10949 ("python-pytest-cache" ,python-pytest-cache)
10950 ("python-pytest-pep8" ,python-pytest-pep8)))
10951 (propagated-inputs
10952 `(("python-pyflakes" ,python-pyflakes)))
10953 (home-page "https://github.com/fschulze/pytest-flakes")
10954 (synopsis "Py.test plugin to check source code with pyflakes")
10955 (description "Pytest plugin for checking Python source code with pyflakes.")
10956 (license license:expat)
10957 (properties `((python2-variant . ,(delay python2-pytest-flakes))))))
10958
10959 (define-public python2-pytest-flakes
10960 (let ((base (package-with-python2 (strip-python2-variant python-pytest-flakes))))
10961 (package (inherit base)
10962 (native-inputs
10963 `(("python2-setuptools" ,python2-setuptools)
10964 ,@(package-native-inputs base))))))
10965
10966 (define-public python-natsort
10967 (package
10968 (name "python-natsort")
10969 (version "5.0.1")
10970 (source (origin
10971 (method url-fetch)
10972 (uri (pypi-uri "natsort" version))
10973 (sha256
10974 (base32
10975 "1abld5p4a6n5zjnyw5mi2pv37gqalcybv2brjr2y6l9l2p8v9mja"))))
10976 (build-system python-build-system)
10977 (arguments
10978 `(#:phases
10979 (modify-phases %standard-phases
10980 (add-before 'check 'set-cachedir
10981 ;; Tests require write access to $HOME by default
10982 (lambda _ (setenv "PYTHON_EGG_CACHE" "/tmp") #t)))))
10983 (native-inputs
10984 `(("python-hypothesis" ,python-hypothesis)
10985 ("python-pytest-cache" ,python-pytest-cache)
10986 ("python-pytest-cov" ,python-pytest-cov)
10987 ("python-pytest-flakes" ,python-pytest-flakes)
10988 ("python-pytest-pep8" ,python-pytest-pep8)))
10989 (propagated-inputs ; TODO: Add python-fastnumbers.
10990 `(("python-pyicu" ,python-pyicu)))
10991 (home-page "https://github.com/SethMMorton/natsort")
10992 (synopsis "Natural sorting for python and shell")
10993 (description
10994 "Natsort lets you apply natural sorting on lists instead of
10995 lexicographical. If you use the built-in @code{sorted} method in python
10996 on a list such as @code{['a20', 'a9', 'a1', 'a4', 'a10']}, it would be
10997 returned as @code{['a1', 'a10', 'a20', 'a4', 'a9']}. Natsort provides a
10998 function @code{natsorted} that identifies numbers and sorts them separately
10999 from strings. It can also sort version numbers, real numbers, mixed types
11000 and more, and comes with a shell command @command{natsort} that exposes this
11001 functionality in the command line.")
11002 (license license:expat)
11003 (properties `((python2-variant . ,(delay python2-natsort))))))
11004
11005 (define-public python2-natsort
11006 (let ((base (package-with-python2 (strip-python2-variant python-natsort))))
11007 (package (inherit base)
11008 (native-inputs
11009 `(("python2-setuptools" ,python2-setuptools)
11010 ("python2-pathlib" ,python2-pathlib)
11011 ("python2-mock" ,python2-mock)
11012 ("python2-enum34" ,python2-enum34)
11013 ,@(package-native-inputs base))))))
11014
11015 (define-public python-glances
11016 (package
11017 (name "python-glances")
11018 (version "2.7.1")
11019 (source
11020 (origin
11021 (method url-fetch)
11022 (uri (pypi-uri "Glances" version))
11023 (sha256
11024 (base32
11025 "11jbq40g8alsbirnd4kiagznqg270247i0m8qhi48ldf2i5xppxg"))))
11026 (build-system python-build-system)
11027 (inputs
11028 `(("python-psutil" ,python-psutil)))
11029 (home-page
11030 "https://github.com/nicolargo/glances")
11031 (synopsis
11032 "A cross-platform curses-based monitoring tool")
11033 (description
11034 "Glances is a curses-based monitoring tool for a wide variety of platforms.
11035 Glances uses the PsUtil library to get information from your system. It monitors
11036 CPU, load, memory, network bandwidth, disk I/O, disk use, and more.")
11037 (license license:lgpl3+)
11038 (properties `((python2-variant . ,(delay python2-glances))))))
11039
11040 (define-public python2-glances
11041 (let ((base (package-with-python2 (strip-python2-variant python-glances))))
11042 (package
11043 (inherit base)
11044 (native-inputs
11045 `(("python2-setuptools" ,python2-setuptools)
11046 ,@(package-native-inputs base))))))
11047
11048 (define-public python-graphql-core
11049 (package
11050 (name "python-graphql-core")
11051 (version "0.5.3")
11052 (source
11053 (origin
11054 (method url-fetch)
11055 (uri (pypi-uri "graphql-core" version))
11056 (sha256
11057 (base32
11058 "0rsaarx2sj4xnw9966rhh4haiqaapm4lm2mfqm48ywd51j5vh1a0"))))
11059 (build-system python-build-system)
11060 (arguments
11061 `(#:phases
11062 (modify-phases %standard-phases
11063 (add-after 'unpack 'patch-hardcoded-version
11064 (lambda _ (substitute*
11065 "setup.py"
11066 (("'gevent==1.1rc1'") "'gevent'"))
11067 #t)))))
11068 (native-inputs
11069 `(("python-gevent" ,python-gevent)
11070 ("python-mock" ,python-mock)
11071 ("python-pytest-mock" ,python-pytest-mock)))
11072 (inputs
11073 `(("python-promise" ,python-promise)
11074 ("python-six" ,python-six)))
11075 (home-page "https://github.com/graphql-python/graphql-core")
11076 (synopsis "GraphQL implementation for Python")
11077 (description
11078 "GraphQL implementation for Python. GraphQL is a data query language and
11079 runtime designed and used to request and deliver data to mobile and web apps.
11080 This library is a port of @url{https://github.com/graphql/graphql-js,graphql-js}
11081 to Python.")
11082 (properties `((python2-variant . ,(delay python2-graphql-core))))
11083 (license license:expat)))
11084
11085 (define-public python2-graphql-core
11086 (let ((base (package-with-python2
11087 (strip-python2-variant python-graphql-core))))
11088 (package (inherit base)
11089 (native-inputs
11090 `(("python2-setuptools" ,python2-setuptools)
11091 ,@(package-native-inputs base))))))
11092
11093 (define-public python-graphql-relay
11094 (package
11095 (name "python-graphql-relay")
11096 (version "0.4.4")
11097 (source
11098 (origin
11099 (method url-fetch)
11100 (uri (pypi-uri "graphql-relay" version))
11101 (sha256
11102 (base32
11103 "04wr9ayshxjjdcg2v21c7ffbz36kif1wjl3604fqd3qignb3fbxi"))))
11104 (build-system python-build-system)
11105 (native-inputs
11106 `(("python-pytest" ,python-pytest)))
11107 (inputs
11108 `(("python-graphql-core" ,python-graphql-core)
11109 ("python-promise" ,python-promise)
11110 ("python-six" ,python-six)))
11111 (home-page "https://github.com/graphql-python/graphql-relay-py")
11112 (synopsis "Relay implementation for Python")
11113 (description
11114 "This is a library to allow the easy creation of Relay-compliant servers
11115 using the GraphQL Python reference implementation of a GraphQL server. It
11116 should be noted that the code is a exact port of the original
11117 @url{https://github.com/graphql/graphql-relay-js,graphql-relay js implementation}
11118 from Facebook.")
11119 (properties `((python2-variant . ,(delay python2-graphql-relay))))
11120 (license license:expat)))
11121
11122 (define-public python2-graphql-relay
11123 (let ((base (package-with-python2
11124 (strip-python2-variant python-graphql-relay))))
11125 (package (inherit base)
11126 (native-inputs
11127 `(("python2-setuptools" ,python2-setuptools)
11128 ,@(package-native-inputs base))))))
11129
11130 (define-public python-graphene
11131 (package
11132 (name "python-graphene")
11133 (version "0.10.2")
11134 (source
11135 (origin
11136 (method url-fetch)
11137 (uri (pypi-uri "graphene" version))
11138 (sha256
11139 (base32
11140 "09zhac7igh9ixdz0ay6csy35b40l1jwbf2wrbxmgxwfhy51iy06q"))))
11141 (build-system python-build-system)
11142 (native-inputs
11143 `(("python-django-filter" ,python-django-filter)
11144 ("python-mock" ,python-mock)
11145 ("python-psycopg2" ,python-psycopg2)
11146 ("python-pytest-django" ,python-pytest-django)
11147 ("python-sqlalchemy-utils" ,python-sqlalchemy-utils)))
11148 (inputs
11149 `(("python-graphql-core" ,python-graphql-core)
11150 ("python-graphql-relay" ,python-graphql-relay)
11151 ("python-iso8601" ,python-iso8601)
11152 ("python-promise" ,python-promise)
11153 ("python-six" ,python-six)))
11154 (home-page "http://graphene-python.org/")
11155 (synopsis "GraphQL Framework for Python")
11156 (description
11157 "Graphene is a Python library for building GraphQL schemas/types.
11158 A GraphQL schema describes your data model, and provides a GraphQL server
11159 with an associated set of resolve methods that know how to fetch data.")
11160 (properties `((python2-variant . ,(delay python2-graphene))))
11161 (license license:expat)))
11162
11163 (define-public python2-graphene
11164 (let ((base (package-with-python2
11165 (strip-python2-variant python-graphene))))
11166 (package (inherit base)
11167 (native-inputs
11168 `(("python2-setuptools" ,python2-setuptools)
11169 ("python2-sqlalchemy" ,python2-sqlalchemy)
11170 ,@(package-native-inputs base))))))
11171
11172 (define-public python-nautilus
11173 (package
11174 (name "python-nautilus")
11175 (version "0.4.9")
11176 (source
11177 (origin
11178 (method url-fetch)
11179 (uri (pypi-uri "nautilus" version))
11180 (sha256
11181 (base32
11182 "01hwzjc1zshk4vvxrcghm398fpy4jls66dyz06g07mrwqif8878p"))))
11183 (build-system python-build-system)
11184 (arguments `(#:tests? #f)) ; fails to import test modules
11185 (native-inputs
11186 `(("python-setuptools" ,python-setuptools)))
11187 (inputs
11188 `(("python-bcrypt" ,python-bcrypt)
11189 ("python-click" ,python-click)
11190 ("python-consul" ,python-consul)
11191 ("python-graphql-core" ,python-graphql-core)
11192 ("python-graphql-relay" ,python-graphql-relay)
11193 ("python-graphene" ,python-graphene)
11194 ("python-jinja2" ,python-jinja2)
11195 ("python-nose2" ,python-nose2)
11196 ("python-peewee" ,python-peewee)
11197 ("python-pika" ,python-pika)
11198 ("python-pycparser" ,python-pycparser)
11199 ("python-requests" ,python-requests)
11200 ("python-tornado" ,python-tornado)
11201 ("python-wtforms" ,python-wtforms)))
11202 (home-page "https://github.com/AlecAivazis/nautilus")
11203 (synopsis "Library for creating microservice applications")
11204 (description
11205 "Nautilus is a framework for flux based microservices that looks to
11206 provide extendible implementations of common aspects of a cloud so that you can
11207 focus on building massively scalable web applications.")
11208 (license license:expat)))
11209
11210 (define-public python-s3transfer
11211 (package
11212 (name "python-s3transfer")
11213 (version "0.1.8")
11214 (source (origin
11215 (method url-fetch)
11216 (uri (pypi-uri "s3transfer" version))
11217 (sha256
11218 (base32
11219 "1jivjkp3xqif9gzr5fiq28jsskmh50vzzd7ldsb4rbyiw1iyv3hy"))))
11220 (build-system python-build-system)
11221 (native-inputs
11222 `(("python-docutils" ,python-docutils)))
11223 (inputs
11224 `(("python-botocore" ,python-botocore)))
11225 (synopsis "Amazon S3 Transfer Manager")
11226 (description "S3transfer is a Python library for managing Amazon S3
11227 transfers.")
11228 (home-page "https://github.com/boto/s3transfer")
11229 (license license:asl2.0)
11230 (properties `((python2-variant . ,(delay python2-s3transfer))))))
11231
11232 (define-public python2-s3transfer
11233 (let ((base (package-with-python2 (strip-python2-variant python-s3transfer))))
11234 (package
11235 (inherit base)
11236 (native-inputs
11237 `(("python2-futures" ,python2-futures)
11238 ("python2-setuptools" ,python2-setuptools)
11239 ,@(package-native-inputs base))))))
11240
11241 (define-public python-setproctitle
11242 (package
11243 (name "python-setproctitle")
11244 (version "1.1.10")
11245 (source
11246 (origin
11247 (method url-fetch)
11248 (uri (pypi-uri "setproctitle" version))
11249 (sha256
11250 (base32
11251 "163kplw9dcrw0lffq1bvli5yws3rngpnvrxrzdw89pbphjjvg0v2"))))
11252 (build-system python-build-system)
11253 (arguments
11254 '(#:phases
11255 (modify-phases %standard-phases
11256 (add-before 'check 'patch-Makefile
11257 ;; Stricly this is only required for the python2 variant.
11258 ;; But adding a phase in an inherited package seems to be
11259 ;; cumbersum. So we patch even for python3.
11260 (lambda _
11261 (let ((nose (assoc-ref %build-inputs "python2-nose")))
11262 (when nose
11263 (substitute* "Makefile"
11264 (("\\$\\(PYTHON\\) [^ ]which nosetests[^ ] ")
11265 (string-append nose "/bin/nosetests "))))
11266 #t)))
11267 (replace 'check
11268 (lambda _
11269 (setenv "PYTHON" (or (which "python3") (which "python")))
11270 (setenv "PYCONFIG" (or (which "python3-config")
11271 (which "python-config")))
11272 (setenv "CC" "gcc")
11273 ;; No need to extend PYTHONPATH to find the built package, since
11274 ;; the Makefile will build anyway
11275 (zero? (system* "make" "check")))))))
11276 (native-inputs
11277 `(("procps" ,procps))) ; required for tests
11278 (home-page
11279 "https://github.com/dvarrazzo/py-setproctitle")
11280 (synopsis
11281 "Setproctitle implementation for Python to customize the process title")
11282 (description "The library allows a process to change its title (as displayed
11283 by system tools such as ps and top).
11284
11285 Changing the title is mostly useful in multi-process systems, for
11286 example when a master process is forked: changing the children's title
11287 allows to identify the task each process is busy with. The technique
11288 is used by PostgreSQL and the OpenSSH Server for example.")
11289 (license license:bsd-3)
11290 (properties `((python2-variant . ,(delay python2-setproctitle))))))
11291
11292 (define-public python2-setproctitle
11293 (let ((base (package-with-python2
11294 (strip-python2-variant python-setproctitle))))
11295 (package
11296 (inherit base)
11297 (native-inputs `(("python2-nose" ,python2-nose)
11298 ,@(package-native-inputs base))))))
11299
11300 (define-public python-validictory
11301 (package
11302 (name "python-validictory")
11303 (version "1.0.1")
11304 (source
11305 (origin
11306 (method url-fetch)
11307 (uri (pypi-uri "validictory" version))
11308 (sha256
11309 (base32
11310 "1zf1g9sw47xzp5f80bd94pb42j9yqv82lcrgcvdwr6nkaphfi37q"))))
11311 (build-system python-build-system)
11312 (arguments
11313 '(#:phases
11314 (modify-phases %standard-phases
11315 (add-after 'unpack 'bootstrap
11316 ;; Move the tests out of the package directory to avoid
11317 ;; packaging them.
11318 (lambda* _
11319 (rename-file "validictory/tests" "tests")
11320 (delete-file "tests/__init__.py")))
11321 (replace 'check
11322 (lambda _
11323 ;; Extend PYTHONPATH so the built package will be found.
11324 (setenv "PYTHONPATH"
11325 (string-append (getcwd) "/build/lib:"
11326 (getenv "PYTHONPATH")))
11327 (zero? (system* "py.test" "-vv" )))))))
11328 (native-inputs
11329 `(("python-pytest" ,python-pytest)))
11330 (home-page
11331 "https://github.com/jamesturk/validictory")
11332 (synopsis "General purpose Python data validator")
11333 (description "It allows validation of arbitrary Python data structures.
11334
11335 The schema format is based on the JSON Schema
11336 proposal (http://json-schema.org), so combined with json the library is also
11337 useful as a validator for JSON data.")
11338 (license license:expat)
11339 (properties `((python2-variant . ,(delay python2-validictory))))))
11340
11341 (define-public python2-validictory
11342 (let ((base (package-with-python2
11343 (strip-python2-variant python-validictory))))
11344 (package
11345 (inherit base)
11346 (native-inputs `(("python2-setuptools" ,python2-setuptools)
11347 ,@(package-native-inputs base))))))
11348
11349 (define-public python-aniso8601
11350 (package
11351 (name "python-aniso8601")
11352 (version "1.1.0")
11353 (source
11354 (origin
11355 (method url-fetch)
11356 (uri (pypi-uri "aniso8601" version))
11357 (sha256
11358 (base32
11359 "1k5mjg9iqbjfslb5prrsfz7dhlvi6s35p1jxq8dm87w1b7dn5i2g"))))
11360 (build-system python-build-system)
11361 (propagated-inputs
11362 `(("python-dateutil-2" ,python-dateutil-2)))
11363 (home-page
11364 "https://bitbucket.org/nielsenb/aniso8601")
11365 (synopsis
11366 "Python library for parsing ISO 8601 strings")
11367 (description
11368 "This package contains a library for parsing ISO 8601 datetime strings.")
11369 (license license:bsd-3)))
11370
11371 (define-public python-flask-restful
11372 (package
11373 (name "python-flask-restful")
11374 (version "0.3.5")
11375 (source
11376 (origin
11377 (method url-fetch)
11378 (uri (pypi-uri "Flask-RESTful" version))
11379 (sha256
11380 (base32
11381 "0hjcmdb56b7z4bkw848lxfkyrpnkwzmqn2dgnlv12mwvjpzsxr6c"))))
11382 (build-system python-build-system)
11383 (propagated-inputs
11384 `(("python-aniso8601" ,python-aniso8601)
11385 ("python-flask" ,python-flask)
11386 ("python-pycrypto" ,python-pycrypto)
11387 ("python-pytz" ,python-pytz)))
11388 (native-inputs
11389 `(;; Optional dependency of Flask. Tests need it.
11390 ("python-blinker" ,python-blinker)
11391 ("python-mock" ,python-mock) ; For tests
11392 ("python-nose" ,python-nose) ; For tests
11393 ("python-sphinx" ,python-sphinx)))
11394 (home-page
11395 "https://www.github.com/flask-restful/flask-restful/")
11396 (synopsis
11397 "Flask module for creating REST APIs")
11398 (description
11399 "This package contains a Flask module for creating REST APIs.")
11400 (license license:bsd-3)))
11401
11402 (define-public python-flask-basicauth
11403 (package
11404 (name "python-flask-basicauth")
11405 (version "0.2.0")
11406 (source
11407 (origin
11408 (method url-fetch)
11409 (uri (pypi-uri "Flask-BasicAuth" version))
11410 (sha256
11411 (base32
11412 "1zq1spkjr4sjdnalpp8wl242kdqyk6fhbnhr8hi4r4f0km4bspnz"))))
11413 (build-system python-build-system)
11414 (propagated-inputs
11415 `(("python-flask" ,python-flask)))
11416 (home-page
11417 "https://github.com/jpvanhal/flask-basicauth")
11418 (synopsis
11419 "HTTP basic access authentication for Flask")
11420 (description
11421 "This package provides HTTP basic access authentication for Flask.")
11422 (license license:bsd-3)))
11423
11424 (define-public python-flask-sqlalchemy
11425 (package
11426 (name "python-flask-sqlalchemy")
11427 (version "2.1")
11428 (source
11429 (origin
11430 (method url-fetch)
11431 (uri (pypi-uri "Flask-SQLAlchemy" version))
11432 (sha256
11433 (base32
11434 "1i9ps5d5snih9xlqhrvmi3qfiygkmqzxh92n25kj4pf89kj4s965"))))
11435 (build-system python-build-system)
11436 (propagated-inputs
11437 `(("python-flask" ,python-flask)
11438 ("python-sqlalchemy" ,python-sqlalchemy)))
11439 (home-page
11440 "http://github.com/mitsuhiko/flask-sqlalchemy")
11441 (synopsis
11442 "Module adding SQLAlchemy support to your Flask application")
11443 (description
11444 "This package adds SQLAlchemy support to your Flask application.")
11445 (license license:bsd-3)))
11446
11447 (define-public python-pyev
11448 (package
11449 (name "python-pyev")
11450 (version "0.9.0")
11451 (source
11452 (origin
11453 (method url-fetch)
11454 (uri (pypi-uri "pyev" version))
11455 (sha256
11456 (base32
11457 "0rf603lc0s6zpa1nb25vhd8g4y337wg2wyz56i0agsdh7jchl0sx"))))
11458 (build-system python-build-system)
11459 (arguments
11460 `(#:tests? #f ; no test suite
11461 #:phases
11462 (modify-phases %standard-phases
11463 (add-after 'unpack 'patch
11464 (lambda* (#:key inputs #:allow-other-keys)
11465 (let ((libev (string-append (assoc-ref inputs "libev")
11466 "/lib/libev.so.4")))
11467 (substitute* "setup.py"
11468 (("libev_dll_name = find_library\\(\\\"ev\\\"\\)")
11469 (string-append "libev_dll_name = \"" libev "\"")))))))))
11470 (inputs
11471 `(("libev" ,libev)))
11472 (home-page "http://pythonhosted.org/pyev/")
11473 (synopsis "Python libev interface")
11474 (description "Pyev provides a Python interface to libev.")
11475 (license license:gpl3)))
11476
11477 (define-public python2-pyev
11478 (package-with-python2 python-pyev))
11479
11480 (define-public python-imagesize
11481 (package
11482 (name "python-imagesize")
11483 (version "0.7.1")
11484 (source
11485 (origin
11486 (method url-fetch)
11487 (uri (pypi-uri "imagesize" version))
11488 (sha256
11489 (base32
11490 "0qk07k0z4241lkzzjji7z4da04pcvg7bfc4xz1934zlqhwmwdcha"))))
11491 (build-system python-build-system)
11492 (home-page "https://github.com/shibukawa/imagesize_py")
11493 (synopsis "Gets image size of files in variaous formats in Python")
11494 (description
11495 "This package allows determination of image size from
11496 PNG, JPEG, JPEG2000 and GIF files in pure Python.")
11497 (license license:expat)
11498 (properties `((python2-variant . ,(delay python2-imagesize))))))
11499
11500 (define-public python2-imagesize
11501 (let ((base (package-with-python2 (strip-python2-variant python-imagesize))))
11502 (package
11503 (inherit base)
11504 (native-inputs `(("python2-setuptools" ,python2-setuptools)
11505 ,@(package-native-inputs base))))))