gnu: python-virtualenv: Update to 15.0.3.
[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 ;;;
33 ;;; This file is part of GNU Guix.
34 ;;;
35 ;;; GNU Guix is free software; you can redistribute it and/or modify it
36 ;;; under the terms of the GNU General Public License as published by
37 ;;; the Free Software Foundation; either version 3 of the License, or (at
38 ;;; your option) any later version.
39 ;;;
40 ;;; GNU Guix is distributed in the hope that it will be useful, but
41 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
42 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
43 ;;; GNU General Public License for more details.
44 ;;;
45 ;;; You should have received a copy of the GNU General Public License
46 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
47
48 (define-module (gnu packages python)
49 #:use-module ((guix licenses) #:prefix license:)
50 #:use-module (gnu packages)
51 #:use-module (gnu packages algebra)
52 #:use-module (gnu packages adns)
53 #:use-module (gnu packages attr)
54 #:use-module (gnu packages backup)
55 #:use-module (gnu packages compression)
56 #:use-module (gnu packages databases)
57 #:use-module (gnu packages django)
58 #:use-module (gnu packages file)
59 #:use-module (gnu packages fontutils)
60 #:use-module (gnu packages gcc)
61 #:use-module (gnu packages ghostscript)
62 #:use-module (gnu packages gl)
63 #:use-module (gnu packages glib)
64 #:use-module (gnu packages gstreamer)
65 #:use-module (gnu packages gtk)
66 #:use-module (gnu packages icu4c)
67 #:use-module (gnu packages image)
68 #:use-module (gnu packages imagemagick)
69 #:use-module (gnu packages libevent)
70 #:use-module (gnu packages libffi)
71 #:use-module (gnu packages linux)
72 #:use-module (gnu packages maths)
73 #:use-module (gnu packages multiprecision)
74 #:use-module (gnu packages networking)
75 #:use-module (gnu packages ncurses)
76 #:use-module (gnu packages openstack)
77 #:use-module (gnu packages password-utils)
78 #:use-module (gnu packages pcre)
79 #:use-module (gnu packages perl)
80 #:use-module (gnu packages pkg-config)
81 #:use-module (gnu packages readline)
82 #:use-module (gnu packages sdl)
83 #:use-module (gnu packages statistics)
84 #:use-module (gnu packages tex)
85 #:use-module (gnu packages texinfo)
86 #:use-module (gnu packages tls)
87 #:use-module (gnu packages version-control)
88 #:use-module (gnu packages web)
89 #:use-module (gnu packages base)
90 #:use-module (gnu packages xml)
91 #:use-module (gnu packages xorg)
92 #:use-module (gnu packages xdisorg)
93 #:use-module (gnu packages zip)
94 #:use-module (gnu packages tcl)
95 #:use-module (gnu packages bdw-gc)
96 #:use-module (guix packages)
97 #:use-module (guix download)
98 #:use-module (guix git-download)
99 #:use-module (guix utils)
100 #:use-module (guix build-system gnu)
101 #:use-module (guix build-system cmake)
102 #:use-module (guix build-system python)
103 #:use-module (guix build-system trivial)
104 #:use-module (srfi srfi-1))
105
106 (define-public python-2.7
107 (package
108 (name "python")
109 (version "2.7.11")
110 (source
111 (origin
112 (method url-fetch)
113 (uri (string-append "https://www.python.org/ftp/python/"
114 version "/Python-" version ".tar.xz"))
115 (sha256
116 (base32
117 "0iiz844riiznsyhhyy962710pz228gmhv8qi3yk4w4jhmx2lqawn"))
118 (patches (search-patches "python-2.7-search-paths.patch"
119 "python-2-deterministic-build-info.patch"
120 "python-2.7-source-date-epoch.patch"))
121 (modules '((guix build utils)))
122 ;; suboptimal to delete failing tests here, but if we delete them in the
123 ;; arguments then we need to make sure to strip out that phase when it
124 ;; gets inherited by python and python-minimal.
125 (snippet
126 '(begin
127 (for-each delete-file
128 '("Lib/test/test_compileall.py"
129 "Lib/test/test_distutils.py"
130 "Lib/test/test_import.py"
131 "Lib/test/test_shutil.py"
132 "Lib/test/test_socket.py"
133 "Lib/test/test_subprocess.py"))
134 #t))))
135 (outputs '("out"
136 "tk")) ;tkinter; adds 50 MiB to the closure
137 (build-system gnu-build-system)
138 (arguments
139 `(;; 356 tests OK.
140 ;; 6 tests failed:
141 ;; test_compileall test_distutils test_import test_shutil test_socket
142 ;; test_subprocess
143 ;; 39 tests skipped:
144 ;; test_aepack test_al test_applesingle test_bsddb test_bsddb185
145 ;; test_bsddb3 test_cd test_cl test_codecmaps_cn test_codecmaps_hk
146 ;; test_codecmaps_jp test_codecmaps_kr test_codecmaps_tw test_curses
147 ;; test_dl test_gdb test_gl test_imageop test_imgfile test_ioctl
148 ;; test_kqueue test_linuxaudiodev test_macos test_macostools
149 ;; test_msilib test_ossaudiodev test_scriptpackages test_smtpnet
150 ;; test_socketserver test_startfile test_sunaudiodev test_timeout
151 ;; test_tk test_ttk_guionly test_urllib2net test_urllibnet
152 ;; test_winreg test_winsound test_zipfile64
153 ;; 4 skips unexpected on linux2:
154 ;; test_bsddb test_bsddb3 test_gdb test_ioctl
155 #:test-target "test"
156 #:configure-flags
157 (list "--enable-shared" ;allow embedding
158 "--with-system-ffi" ;build ctypes
159 (string-append "LDFLAGS=-Wl,-rpath="
160 (assoc-ref %outputs "out") "/lib"))
161
162 #:modules ((ice-9 ftw) (ice-9 match)
163 (guix build utils) (guix build gnu-build-system))
164 #:phases
165 (modify-phases %standard-phases
166 (add-before
167 'configure 'patch-lib-shells
168 (lambda _
169 ;; Filter for existing files, since some may not exist in all
170 ;; versions of python that are built with this recipe.
171 (substitute* (filter file-exists?
172 '("Lib/subprocess.py"
173 "Lib/popen2.py"
174 "Lib/distutils/tests/test_spawn.py"
175 "Lib/test/test_subprocess.py"))
176 (("/bin/sh") (which "sh")))
177
178 ;; Use zero as the timestamp in .pyc files so that builds are
179 ;; deterministic. TODO: Remove it when this variable is set in
180 ;; gnu-build-system.scm.
181 (setenv "SOURCE_DATE_EPOCH" "1")
182 #t))
183 (add-before 'configure 'do-not-record-configure-flags
184 (lambda* (#:key configure-flags #:allow-other-keys)
185 ;; Remove configure flags from the installed '_sysconfigdata.py'
186 ;; and 'Makefile' so we don't end up keeping references to the
187 ;; build tools.
188 ;;
189 ;; Preserve at least '--with-system-ffi' since otherwise the
190 ;; thing tries to build libffi, fails, and we end up with a
191 ;; Python that lacks ctypes.
192 (substitute* "configure"
193 (("^CONFIG_ARGS=.*$")
194 (format #f "CONFIG_ARGS='~a'\n"
195 (if (member "--with-system-ffi" configure-flags)
196 "--with-system-ffi"
197 ""))))
198 #t))
199 (add-before
200 'check 'pre-check
201 (lambda _
202 ;; 'Lib/test/test_site.py' needs a valid $HOME
203 (setenv "HOME" (getcwd))
204 ,@(if (string-prefix? "mips64el" (%current-system))
205
206 ;; XXX: The following test fails on mips64el.
207 '((false-if-exception
208 (delete-file "Lib/test/test_ctypes.py")))
209
210 '())
211 #t))
212 (add-after
213 'unpack 'set-source-file-times-to-1980
214 ;; XXX One of the tests uses a ZIP library to pack up some of the
215 ;; source tree, and fails with "ZIP does not support timestamps
216 ;; before 1980". Work around this by setting the file times in the
217 ;; source tree to sometime in early 1980.
218 (lambda _
219 (let ((circa-1980 (* 10 366 24 60 60)))
220 (ftw "." (lambda (file stat flag)
221 (utime file circa-1980 circa-1980)
222 #t))
223 #t)))
224 (add-after 'install 'remove-tests
225 ;; Remove 25 MiB of unneeded unit tests. Keep test_support.*
226 ;; because these files are used by some libraries out there.
227 (lambda* (#:key outputs #:allow-other-keys)
228 (let ((out (assoc-ref outputs "out")))
229 (match (scandir (string-append out "/lib")
230 (lambda (name)
231 (string-prefix? "python" name)))
232 ((pythonX.Y)
233 (let ((testdir (string-append out "/lib/" pythonX.Y
234 "/test")))
235 (with-directory-excursion testdir
236 (for-each delete-file-recursively
237 (scandir testdir
238 (match-lambda
239 ((or "." "..") #f)
240 (file
241 (not
242 (string-prefix? "test_support."
243 file))))))
244 (call-with-output-file "__init__.py" (const #t))
245 #t)))))))
246 (add-before 'strip 'make-libraries-writable
247 (lambda* (#:key outputs #:allow-other-keys)
248 ;; Make .so files writable so they can be stripped.
249 (let ((out (assoc-ref outputs "out")))
250 (for-each (lambda (file)
251 (chmod file #o755))
252 (find-files (string-append out "/lib")
253 "\\.so"))
254 #t)))
255 (add-after 'install 'move-tk-inter
256 (lambda* (#:key outputs #:allow-other-keys)
257 ;; When Tkinter support is built move it to a separate output so
258 ;; that the main output doesn't contain a reference to Tcl/Tk.
259 (let ((out (assoc-ref outputs "out"))
260 (tk (assoc-ref outputs "tk")))
261 (when tk
262 (match (find-files out "tkinter.*\\.so")
263 ((tkinter.so)
264 ;; The .so is in OUT/lib/pythonX.Y/lib-dynload, but we
265 ;; want it under TK/lib/pythonX.Y/site-packages.
266 (let* ((len (string-length out))
267 (target (string-append
268 tk "/"
269 (string-drop
270 (dirname (dirname tkinter.so))
271 len)
272 "/site-packages")))
273 (install-file tkinter.so target)
274 (delete-file tkinter.so)))))
275 #t))))))
276 (inputs
277 `(("bzip2" ,bzip2)
278 ("gdbm" ,gdbm)
279 ("libffi" ,libffi) ; for ctypes
280 ("sqlite" ,sqlite) ; for sqlite extension
281 ("openssl" ,openssl)
282 ("readline" ,readline)
283 ("zlib" ,zlib)
284 ("tcl" ,tcl)
285 ("tk" ,tk))) ; for tkinter
286 (native-inputs
287 `(("pkg-config" ,pkg-config)))
288 (native-search-paths
289 (list (search-path-specification
290 (variable "PYTHONPATH")
291 (files '("lib/python2.7/site-packages")))))
292 (home-page "http://python.org")
293 (synopsis "High-level, dynamically-typed programming language")
294 (description
295 "Python is a remarkably powerful dynamic programming language that
296 is used in a wide variety of application domains. Some of its key
297 distinguishing features include: clear, readable syntax; strong
298 introspection capabilities; intuitive object orientation; natural
299 expression of procedural code; full modularity, supporting hierarchical
300 packages; exception-based error handling; and very high level dynamic
301 data types.")
302 (license license:psfl)))
303
304 ;; Current 2.x version.
305 (define-public python-2 python-2.7)
306
307 (define-public python-3.4
308 (package (inherit python-2)
309 (version "3.4.3")
310 (source (origin
311 (method url-fetch)
312 (uri (string-append "https://www.python.org/ftp/python/"
313 version "/Python-" version ".tar.xz"))
314 (patches (search-patches
315 "python-fix-tests.patch"
316 ;; XXX Try removing this patch for python > 3.4.3
317 "python-disable-ssl-test.patch"
318 "python-3-deterministic-build-info.patch"
319 "python-3-search-paths.patch"))
320 (patch-flags '("-p0"))
321 (sha256
322 (base32
323 "1f4nm4z08sy0kqwisvv95l02crv6dyysdmx44p1mz3bn6csrdcxm"))))
324 (arguments (substitute-keyword-arguments (package-arguments python-2)
325 ((#:tests? _) #t)))
326 (native-search-paths
327 (list (search-path-specification
328 (variable "PYTHONPATH")
329 (files (list (string-append "lib/python"
330 (version-major+minor version)
331 "/site-packages"))))))))
332
333 ;; Current 3.x version.
334 (define-public python-3 python-3.4)
335
336 ;; Current major version.
337 (define-public python python-3)
338
339 ;; Minimal variants of Python, mostly used to break the cycle between Tk and
340 ;; Python (Tk -> libxcb -> Python.)
341
342 (define-public python2-minimal
343 (package (inherit python-2)
344 (name "python-minimal")
345 (outputs '("out"))
346 (arguments
347 (substitute-keyword-arguments (package-arguments python-2)
348 ((#:configure-flags cf)
349 `(append ,cf '("--without-system-ffi")))))
350 (inputs '()))) ;none of the optional dependencies
351
352 (define-public python-minimal
353 (package (inherit python)
354 (name "python-minimal")
355 (outputs '("out"))
356 (arguments
357 (substitute-keyword-arguments (package-arguments python)
358 ((#:configure-flags cf)
359 `(append ,cf '("--without-system-ffi")))))
360
361 ;; OpenSSL is a mandatory dependency of Python 3.x, for urllib;
362 ;; zlib is required by 'zipimport', used by pip.
363 (inputs `(("openssl" ,openssl)
364 ("zlib" ,zlib)))))
365
366 (define* (wrap-python3 python
367 #:optional
368 (name (string-append (package-name python) "-wrapper")))
369 (package (inherit python)
370 (name name)
371 (source #f)
372 (build-system trivial-build-system)
373 (outputs '("out"))
374 (propagated-inputs `(("python" ,python)))
375 (arguments
376 `(#:modules ((guix build utils))
377 #:builder
378 (begin
379 (use-modules (guix build utils))
380 (let ((bin (string-append (assoc-ref %outputs "out") "/bin"))
381 (python (string-append (assoc-ref %build-inputs "python") "/bin/")))
382 (mkdir-p bin)
383 (for-each
384 (lambda (old new)
385 (symlink (string-append python old)
386 (string-append bin "/" new)))
387 '("python3" "pydoc3" "idle3")
388 '("python" "pydoc" "idle"))))))
389 (synopsis "Wrapper for the Python 3 commands")
390 (description
391 "This package provides wrappers for the commands of Python@tie{}3.x such
392 that they can be invoked under their usual name---e.g., @command{python}
393 instead of @command{python3}.")))
394
395 (define-public python-wrapper (wrap-python3 python))
396 (define-public python-minimal-wrapper (wrap-python3 python-minimal))
397
398 (define-public python-psutil
399 (package
400 (name "python-psutil")
401 (version "4.3.0")
402 (source
403 (origin
404 (method url-fetch)
405 (uri (pypi-uri "psutil" version))
406 (sha256
407 (base32
408 "1w4r09fvn6kd80m5mx4ws1wz100brkaq6hzzpwrns8cgjzjpl6c6"))))
409 (build-system python-build-system)
410 (native-inputs
411 `(("python-setuptools" ,python-setuptools)))
412 (home-page "https://www.github.com/giampaolo/psutil")
413 (synopsis "Library for retrieving information on running processes")
414 (description
415 "psutil (Python system and process utilities) is a library for retrieving
416 information on running processes and system utilization (CPU, memory, disks,
417 network) in Python. It is useful mainly for system monitoring, profiling and
418 limiting process resources and management of running processes. It implements
419 many functionalities offered by command line tools such as: ps, top, lsof,
420 netstat, ifconfig, who, df, kill, free, nice, ionice, iostat, iotop, uptime,
421 pidof, tty, taskset, pmap.")
422 (license license:bsd-3)))
423
424 (define-public python2-psutil
425 (package-with-python2 python-psutil))
426
427 (define-public python-passlib
428 (package
429 (name "python-passlib")
430 (version "1.6.5")
431 (source
432 (origin
433 (method url-fetch)
434 (uri (pypi-uri "passlib" version))
435 (sha256
436 (base32
437 "1z27wdxs5rj5xhhqfzvzn3yg682irkxw6dcs5jj7mcf97psk8gd8"))))
438 (build-system python-build-system)
439 (native-inputs
440 `(("python-nose" ,python-nose)
441 ("python-setuptools" ,python-setuptools)))
442 (inputs
443 `(("python-py-bcrypt" ,python-py-bcrypt)))
444 (arguments
445 `(#:phases
446 (alist-cons-before
447 'check 'set-PYTHON_EGG_CACHE
448 ;; some tests require access to "$HOME/.cython"
449 (lambda* _ (setenv "PYTHON_EGG_CACHE" "/tmp"))
450 %standard-phases)))
451 (home-page "https://bitbucket.org/ecollins/passlib")
452 (synopsis
453 "Comprehensive password hashing framework")
454 (description
455 "Passlib is a password hashing library for Python 2 & 3, which provides
456 cross-platform implementations of over 30 password hashing algorithms, as well
457 as a framework for managing existing password hashes. It's designed to be
458 useful for a wide range of tasks, from verifying a hash found in /etc/shadow,
459 to providing full-strength password hashing for multi-user application.")
460 (license license:bsd-3)))
461
462 (define-public python2-passlib
463 (package-with-python2 python-passlib))
464
465 (define-public python-py-bcrypt
466 (package
467 (name "python-py-bcrypt")
468 (version "0.4")
469 (source
470 (origin
471 (method url-fetch)
472 (uri (string-append
473 "https://pypi.python.org/packages/source/p/py-bcrypt/py-bcrypt-"
474 version
475 ".tar.gz"))
476 (sha256
477 (base32
478 "0y6smdggwi5s72v6p1nn53dg6w05hna3d264cq6kas0lap73p8az"))))
479 (build-system python-build-system)
480 (native-inputs
481 `(("python-setuptools" ,python-setuptools)))
482 (home-page "https://code.google.com/p/py-bcrypt")
483 (synopsis
484 "Bcrypt password hashing and key derivation")
485 (description
486 "A python wrapper of OpenBSD's Blowfish password hashing code. This
487 system hashes passwords using a version of Bruce Schneier's Blowfish block
488 cipher with modifications designed to raise the cost of off-line password
489 cracking and frustrate fast hardware implementation. The computation cost of
490 the algorithm is parametised, so it can be increased as computers get faster.
491 The intent is to make a compromise of a password database less likely to
492 result in an attacker gaining knowledge of the plaintext passwords (e.g. using
493 John the Ripper).")
494 ;; "sha2.c" is under BSD-3;
495 ;; "blowfish.c" and "bcrypt.c" are under BSD-4;
496 ;; the rest is under ISC.
497 (license (list license:isc license:bsd-3 license:bsd-4))))
498
499 (define-public python2-py-bcrypt
500 (package-with-python2 python-py-bcrypt))
501
502
503 (define-public python-paramiko
504 (package
505 (name "python-paramiko")
506 (version "1.16.0")
507 (source
508 (origin
509 (method url-fetch)
510 (uri (pypi-uri "paramiko" version))
511 (sha256
512 (base32
513 "14k8z7ndc3zk5xivnm4d8lncchx475ll5izpf8vmfbq7rp9yp5rj"))))
514 (build-system python-build-system)
515 (native-inputs
516 `(("python-setuptools" ,python-setuptools)))
517 (propagated-inputs
518 `(("python-pycrypto" ,python-pycrypto)))
519 (inputs
520 `(("python-ecdsa" ,python-ecdsa)))
521 (home-page "http://www.paramiko.org/")
522 (synopsis "SSHv2 protocol library")
523 (description "Paramiko is a python implementation of the SSHv2 protocol,
524 providing both client and server functionality. While it leverages a Python C
525 extension for low level cryptography (PyCrypto), Paramiko itself is a pure
526 Python interface around SSH networking concepts.")
527 (license license:lgpl2.1+)))
528
529 (define-public python2-paramiko
530 (package-with-python2 python-paramiko))
531
532
533 (define-public python-httplib2
534 (package
535 (name "python-httplib2")
536 (version "0.9.2")
537 (source
538 (origin
539 (method url-fetch)
540 (uri (pypi-uri "httplib2" version))
541 (sha256
542 (base32
543 "126rsryvw9vhbf3qmsfw9lf4l4xm2srmgs439lgma4cpag4s3ay3"))))
544 (build-system python-build-system)
545 (native-inputs
546 `(("python-setuptools" ,python-setuptools)))
547 (home-page "https://github.com/jcgregorio/httplib2")
548 (synopsis "Comprehensive HTTP client library")
549 (description
550 "A comprehensive HTTP client library supporting many features left out of
551 other HTTP libraries.")
552 (license license:expat)))
553
554 (define-public python2-httplib2
555 (package-with-python2 python-httplib2))
556
557 (define-public python-ecdsa
558 (package
559 (name "python-ecdsa")
560 (version "0.13")
561 (source
562 (origin
563 (method url-fetch)
564 (uri (string-append
565 "https://pypi.python.org/packages/source/e/ecdsa/ecdsa-"
566 version
567 ".tar.gz"))
568 (sha256
569 (base32
570 "1yj31j0asmrx4an9xvsaj2icdmzy6pw0glfpqrrkrphwdpi1xkv4"))))
571 (build-system python-build-system)
572 (native-inputs
573 `(("python-setuptools" ,python-setuptools)))
574 (inputs
575 `(("openssl" ,openssl)))
576 (home-page
577 "http://github.com/warner/python-ecdsa")
578 (synopsis
579 "ECDSA cryptographic signature library (pure python)")
580 (description
581 "This is an easy-to-use implementation of ECDSA cryptography (Elliptic
582 Curve Digital Signature Algorithm), implemented purely in Python. With this
583 library, you can quickly create keypairs (signing key and verifying key), sign
584 messages, and verify the signatures. The keys and signatures are very short,
585 making them easy to handle and incorporate into other protocols.")
586 (license license:expat)))
587
588 (define-public python2-ecdsa
589 (package-with-python2 python-ecdsa))
590
591 (define-public python-ccm
592 (package
593 (name "python-ccm")
594 (version "2.1.6")
595 (source
596 (origin
597 (method url-fetch)
598 (uri (pypi-uri "ccm" version))
599 (sha256
600 (base32
601 "177dfxsmk3k4cih6fh6v8d91bh4nqx7ns6pc07w7m7i3cvdx3c8n"))))
602 (build-system python-build-system)
603 (native-inputs
604 `(("python-setuptools" ,python-setuptools)))
605 (inputs
606 `(("python-pyyaml" ,python-pyyaml)
607 ("python-six" ,python-six)))
608 (home-page "https://github.com/pcmanus/ccm")
609 (synopsis "Cassandra Cluster Manager")
610 (description "A script/library to create, launch and remove an Apache
611 Cassandra cluster on localhost.")
612 (license license:asl2.0)))
613
614 (define-public python2-ccm
615 (package-with-python2 python-ccm))
616
617 (define-public python-pytz
618 (package
619 (name "python-pytz")
620 (version "2016.3")
621 (source
622 (origin
623 (method url-fetch)
624 (uri (pypi-uri "pytz" version ".tar.bz2"))
625 (sha256
626 (base32
627 "1mjmrkk4vc5xzppw7fm0pli1nnbj57cvqv7jjv5whcmccyhxz4y1"))))
628 (build-system python-build-system)
629 (arguments `(#:tests? #f)) ; no test target
630 (home-page "http://pythonhosted.org/pytz")
631 (synopsis "Python timezone library")
632 (description
633 "This library allows accurate and cross platform timezone calculations
634 using Python 2.4 or higher and provides access to the Olson timezone database.")
635 (license license:expat)))
636
637 (define-public python2-pytz
638 (package-with-python2 python-pytz))
639
640
641 (define-public python-babel
642 (package
643 (name "python-babel")
644 (version "2.3.2")
645 (source
646 (origin
647 (method url-fetch)
648 (uri (pypi-uri "Babel" version))
649 (sha256
650 (base32
651 "0k43pi0p1dwpds2w0km3fw92wixzxv2vw7p09capxmjz5cfh23lw"))))
652 (build-system python-build-system)
653 (inputs
654 `(("python-pytz" ,python-pytz)
655 ("python-setuptools" ,python-setuptools)))
656 (arguments `(#:tests? #f)) ; no test target
657 (home-page "http://babel.pocoo.org/")
658 (synopsis
659 "Tools for internationalizing Python applications")
660 (description
661 "Babel is composed of two major parts:
662 - tools to build and work with gettext message catalogs
663 - a Python interface to the CLDR (Common Locale Data Repository), providing
664 access to various locale display names, localized number and date formatting,
665 etc. ")
666 (license license:bsd-3)))
667
668 (define-public python2-babel
669 (package-with-python2 python-babel))
670
671 (define-public python2-backport-ssl-match-hostname
672 (package
673 (name "python2-backport-ssl-match-hostname")
674 (version "3.5.0.1")
675 (source
676 (origin
677 (method url-fetch)
678 (uri (string-append
679 "https://pypi.python.org/packages/source/b/"
680 "backports.ssl_match_hostname/backports.ssl_match_hostname-"
681 version ".tar.gz"))
682 (sha256
683 (base32
684 "1wndipik52cyqy0677zdgp90i435pmvwd89cz98lm7ri0y3xjajh"))))
685 (build-system python-build-system)
686 (arguments
687 `(#:python ,python-2
688 #:tests? #f)) ; no test target
689 (inputs
690 `(("python2-setuptools" ,python2-setuptools)))
691 (home-page "https://bitbucket.org/brandon/backports.ssl_match_hostname")
692 (synopsis "Backport of ssl.match_hostname() function from Python 3.5")
693 (description
694 "This backport brings the ssl.match_hostname() function to users of
695 earlier versions of Python. The function checks the hostname in the
696 certificate returned by the server to which a connection has been established,
697 and verifies that it matches the intended target hostname.")
698 (license license:psfl)))
699
700 (define-public python-h5py
701 (package
702 (name "python-h5py")
703 (version "2.6.0")
704 (source
705 (origin
706 (method url-fetch)
707 (uri (pypi-uri "h5py" version))
708 (sha256
709 (base32
710 "0df46dg7i7xfking9lp221bfm8dbl974yvlrbi1w7r6m61ac7bxj"))))
711 (build-system python-build-system)
712 (arguments
713 `(#:tests? #f ; no test target
714 #:phases
715 (modify-phases %standard-phases
716 (add-after 'unpack 'fix-hdf5-paths
717 (lambda* (#:key inputs #:allow-other-keys)
718 (let ((prefix (assoc-ref inputs "hdf5")))
719 (substitute* "setup_build.py"
720 (("\\['/opt/local/lib', '/usr/local/lib'\\]")
721 (string-append "['" prefix "/lib" "']"))
722 (("'/opt/local/include', '/usr/local/include'")
723 (string-append "'" prefix "/include" "'")))
724 (substitute* "setup_configure.py"
725 (("\\['/usr/local/lib', '/opt/local/lib'\\]")
726 (string-append "['" prefix "/lib" "']")))
727 #t))))))
728 (propagated-inputs
729 `(("python-numpy" ,python-numpy)))
730 (inputs
731 `(("hdf5" ,hdf5)
732 ("python-six" ,python-six)))
733 (native-inputs
734 `(("python-cython" ,python-cython)
735 ("python-pkgconfig" ,python-pkgconfig)))
736 (home-page "http://www.h5py.org/")
737 (synopsis "Read and write HDF5 files from Python")
738 (description
739 "The h5py package provides both a high- and low-level interface to the
740 HDF5 library from Python. The low-level interface is intended to be a
741 complete wrapping of the HDF5 API, while the high-level component supports
742 access to HDF5 files, datasets and groups using established Python and NumPy
743 concepts.")
744 (license license:bsd-3)
745 (properties `((python2-variant . ,(delay python2-h5py))))))
746
747 (define-public python2-h5py
748 (package-with-python2 (strip-python2-variant python-h5py)))
749
750 (define-public python-lockfile
751 (package
752 (name "python-lockfile")
753 (version "0.12.2")
754 (source
755 (origin
756 (method url-fetch)
757 (uri (string-append "https://pypi.python.org/packages/source/l/lockfile/"
758 "lockfile-" version ".tar.gz"))
759 (sha256
760 (base32
761 "16gpx5hm73ah5n1079ng0vy381hl802v606npkx4x8nb0gg05vba"))))
762 (build-system python-build-system)
763 (arguments '(#:test-target "check"))
764 (native-inputs
765 `(("python-pbr" ,python-pbr)))
766 (home-page "http://code.google.com/p/pylockfile/")
767 (synopsis "Platform-independent file locking module")
768 (description
769 "The lockfile package exports a LockFile class which provides a simple
770 API for locking files.")
771 (license license:expat)
772 (properties `((python2-variant . ,(delay python2-lockfile))))))
773
774 (define-public python2-lockfile
775 (let ((base (package-with-python2 (strip-python2-variant python-lockfile))))
776 (package
777 (inherit base)
778 (native-inputs `(("python2-setuptools" ,python2-setuptools)
779 ,@(package-native-inputs base))))))
780
781 (define-public python-mock
782 (package
783 (name "python-mock")
784 (version "1.0.1")
785 (source
786 (origin
787 (method url-fetch)
788 (uri (string-append "https://pypi.python.org/packages/source/m/mock/"
789 "mock-" version ".tar.gz"))
790 (sha256
791 (base32
792 "0kzlsbki6q0awf89rc287f3aj8x431lrajf160a70z0ikhnxsfdq"))))
793 (build-system python-build-system)
794 (arguments '(#:test-target "check"))
795 (home-page "http://code.google.com/p/mock/")
796 (synopsis "Python mocking and patching library for testing")
797 (description
798 "Mock is a library for testing in Python. It allows you to replace parts
799 of your system under test with mock objects and make assertions about how they
800 have been used.")
801 (license license:expat)))
802
803 (define-public python2-mock
804 (package-with-python2 python-mock))
805
806
807 (define-public python-setuptools
808 (package
809 (name "python-setuptools")
810 (version "18.3.1")
811 (source
812 (origin
813 (method url-fetch)
814 (uri (string-append "https://pypi.python.org/packages/source/s/setuptools/setuptools-"
815 version ".tar.gz"))
816 (sha256
817 (base32
818 "0kc7rbav00ks6iaw14p38y81q12fx0lpkhgf5m97xc04f5r318ig"))))
819 (build-system python-build-system)
820 ;; FIXME: Tests require pytest, which itself relies on setuptools.
821 ;; One could bootstrap with an internal untested setuptools.
822 (arguments
823 `(#:tests? #f))
824 (home-page "https://pypi.python.org/pypi/setuptools")
825 (synopsis
826 "Library designed to facilitate packaging Python projects")
827 (description
828 "Setuptools is a fully-featured, stable library designed to facilitate
829 packaging Python projects, where packaging includes:
830 Python package and module definitions,
831 distribution package metadata,
832 test hooks,
833 project installation,
834 platform-specific details,
835 Python 3 support.")
836 (license license:psfl)))
837
838 (define-public python2-setuptools
839 (package-with-python2 python-setuptools))
840
841
842 (define-public python-pycrypto
843 (package
844 (name "python-pycrypto")
845 (version "2.6.1")
846 (source
847 (origin
848 (method url-fetch)
849 (uri (string-append "https://pypi.python.org/packages/source/p/"
850 "pycrypto/pycrypto-" version ".tar.gz"))
851 (sha256
852 (base32
853 "0g0ayql5b9mkjam8hym6zyg6bv77lbh66rv1fyvgqb17kfc1xkpj"))))
854 (build-system python-build-system)
855 (native-inputs
856 `(("python-setuptools" ,python-setuptools)))
857 (inputs
858 `(("python" ,python)
859 ("gmp" ,gmp)))
860 (arguments
861 `(#:phases
862 (alist-cons-before
863 'build 'set-build-env
864 ;; pycrypto runs an autoconf configure script behind the scenes
865 (lambda _
866 (setenv "CONFIG_SHELL" (which "bash")))
867 %standard-phases)))
868 (home-page "http://www.pycrypto.org/")
869 (synopsis "Cryptographic modules for Python")
870 (description
871 "Pycrypto is a collection of both secure hash functions (such as SHA256
872 and RIPEMD160), and various encryption algorithms (AES, DES, RSA, ElGamal,
873 etc.). The package is structured to make adding new modules easy.")
874 (license license:public-domain)))
875
876 (define-public python2-pycrypto
877 (let ((pycrypto (package-with-python2 python-pycrypto)))
878 (package (inherit pycrypto)
879 (inputs
880 `(("python" ,python-2)
881 ,@(alist-delete
882 "python"
883 (package-inputs pycrypto)))))))
884
885 (define-public python-keyring
886 (package
887 (name "python-keyring")
888 (version "8.7")
889 (source
890 (origin
891 (method url-fetch)
892 (uri (pypi-uri "keyring" version))
893 (sha256
894 (base32
895 "0482rmi2x6p78wl2kz8qzyq21xz1sbbfwnv5x7dggar4vkwxhzfx"))))
896 (build-system python-build-system)
897 (native-inputs
898 `(("python-setuptools-scm" ,python-setuptools-scm)))
899 (inputs
900 `(("python-pycrypto" ,python-pycrypto)))
901 (arguments
902 `(#:tests? #f)) ;TODO: tests require pytest
903 (home-page "http://bitbucket.org/kang/python-keyring-lib")
904 (synopsis "Store and access your passwords safely")
905 (description
906 "The Python keyring lib provides a easy way to access the system keyring
907 service from python. It can be used in any application that needs safe
908 password storage.")
909 ;; "MIT" and PSF dual license
910 (license license:x11)
911 (properties `((python2-variant . ,(delay python2-keyring))))))
912
913 (define-public python2-keyring
914 (let ((base (package-with-python2 (strip-python2-variant python-keyring))))
915 (package
916 (inherit base)
917 (native-inputs `(("python2-setuptools" ,python2-setuptools)
918 ,@(package-native-inputs base))))))
919
920 (define-public python-six
921 (package
922 (name "python-six")
923 (version "1.10.0")
924 (source
925 (origin
926 (method url-fetch)
927 (uri (pypi-uri "six" version))
928 (sha256
929 (base32
930 "0snmb8xffb3vsma0z67i0h0w2g2dy0p3gsgh9gi4i0kgc5l8spqh"))))
931 (build-system python-build-system)
932 (inputs
933 `(("python-setuptools" ,python-setuptools)))
934 (home-page "http://pypi.python.org/pypi/six/")
935 (synopsis "Python 2 and 3 compatibility utilities")
936 (description
937 "Six is a Python 2 and 3 compatibility library. It provides utility
938 functions for smoothing over the differences between the Python versions with
939 the goal of writing Python code that is compatible on both Python versions.
940 Six supports every Python version since 2.5. It is contained in only one
941 Python file, so it can be easily copied into your project.")
942 (license license:x11)))
943
944 (define-public python2-six
945 (package-with-python2 python-six))
946
947 (define-public python-dateutil-2
948 (package
949 (name "python-dateutil")
950 (version "2.5.2")
951 (source
952 (origin
953 (method url-fetch)
954 (uri (pypi-uri "python-dateutil" version))
955 (sha256
956 (base32
957 "0jrfpcgvgya6hs45dhrd9yiqgdgz9qp9aa07zsw8gqgn8zphff86"))))
958 (build-system python-build-system)
959 (inputs
960 `(("python-six" ,python-six)))
961 (home-page "http://labix.org/python-dateutil")
962 (synopsis "Extensions to the standard datetime module")
963 (description
964 "The dateutil module provides powerful extensions to the standard
965 datetime module, available in Python 2.3+.")
966 (license license:bsd-3)
967 (properties `((python2-variant . ,(delay python2-dateutil-2))))))
968
969 (define-public python2-dateutil-2
970 (let ((base (package-with-python2 (strip-python2-variant python-dateutil-2))))
971 (package
972 (inherit base)
973 (inputs `(("python2-setuptools" ,python2-setuptools)
974 ,@(package-inputs base))))))
975
976 (define-public python-dateutil
977 (package
978 (name "python-dateutil")
979 (version "1.5") ; last version for python < 3
980 (source
981 (origin
982 (method url-fetch)
983 (uri (string-append "http://labix.org/download/python-dateutil/"
984 "python-dateutil-" version ".tar.gz"))
985 (sha256
986 (base32
987 "0fqfglhy5khbvsipr3x7m6bcaqljh8xl5cw33vbfxy7qhmywm2n0"))))
988 (build-system python-build-system)
989 (inputs
990 `(("python-setuptools" ,python-setuptools)))
991 (home-page "http://labix.org/python-dateutil")
992 (synopsis "Extensions to the standard datetime module")
993 (description
994 "The dateutil module provides powerful extensions to the standard
995 datetime module, available in Python 2.3+.")
996 (license license:psfl)))
997
998 (define-public python2-dateutil
999 (package-with-python2 python-dateutil))
1000
1001 (define-public python-parsedatetime
1002 (package
1003 (name "python-parsedatetime")
1004 (version "2.1")
1005 (source
1006 (origin
1007 (method url-fetch)
1008 (uri (pypi-uri "parsedatetime" version))
1009 (sha256
1010 (base32
1011 "0bdgyw6y3v7bcxlx0p50s8drxsh5bb5cy2afccqr3j90amvpii8p"))))
1012 (build-system python-build-system)
1013 (native-inputs
1014 `(("python-nose" ,python-nose)
1015 ("python-pyicu" ,python-pyicu)))
1016 (home-page "http://github.com/bear/parsedatetime/")
1017 (synopsis
1018 "Parse human-readable date/time text")
1019 (description
1020 "Parse human-readable date/time text.")
1021 (license license:asl2.0)
1022 (properties `((python2-variant . ,(delay python2-parsedatetime))))))
1023
1024 (define-public python2-parsedatetime
1025 (let ((base (package-with-python2 (strip-python2-variant python-parsedatetime))))
1026 (package
1027 (inherit base)
1028 (native-inputs `(("python2-setuptools" ,python2-setuptools)
1029 ,@(package-native-inputs base))))))
1030
1031 (define-public python-pandas
1032 (package
1033 (name "python-pandas")
1034 (version "0.18.1")
1035 (source
1036 (origin
1037 (method url-fetch)
1038 (uri (string-append
1039 "https://pypi.python.org/packages/11/09/"
1040 "e66eb844daba8680ddff26335d5b4fead77f60f957678243549a8dd4830d/"
1041 "pandas-" version ".tar.gz"))
1042 (sha256
1043 (base32 "1ckpxrvvjj6zxmn68icd9hib8qcpx9b35f6izxnr25br5ilq7r6j"))))
1044 (build-system python-build-system)
1045 (propagated-inputs
1046 `(("python-numpy" ,python-numpy)))
1047 (inputs
1048 `(("python-pytz" ,python-pytz)
1049 ("python-dateutil" ,python-dateutil-2)))
1050 (native-inputs
1051 `(("python-nose" ,python-nose)))
1052 (home-page "http://pandas.pydata.org")
1053 (synopsis "Data structures for data analysis, time series, and statistics")
1054 (description
1055 "Pandas is a Python package providing fast, flexible, and expressive data
1056 structures designed to make working with structured (tabular,
1057 multidimensional, potentially heterogeneous) and time series data both easy
1058 and intuitive. It aims to be the fundamental high-level building block for
1059 doing practical, real world data analysis in Python.")
1060 (license license:bsd-3)
1061 (properties `((python2-variant . ,(delay python2-pandas))))))
1062
1063 (define-public python2-pandas
1064 (let ((base (package-with-python2 (strip-python2-variant python-pandas))))
1065 (package
1066 (inherit base)
1067 (native-inputs `(("python2-setuptools" ,python2-setuptools)
1068 ,@(package-native-inputs base))))))
1069
1070 (define-public python-tzlocal
1071 (package
1072 (name "python-tzlocal")
1073 (version "1.2.2")
1074 (source
1075 (origin
1076 (method url-fetch)
1077 (uri (pypi-uri "tzlocal" version))
1078 (sha256
1079 (base32
1080 "0paj7vlsb0np8b5sp4bv64wxv7qk2piyp7xg29pkhdjwsbls9fnb"))))
1081 (build-system python-build-system)
1082 (inputs `(("python-pytz" ,python-pytz)))
1083 (home-page "https://github.com/regebro/tzlocal")
1084 (synopsis
1085 "Local timezone information for Python")
1086 (description
1087 "Tzlocal returns a tzinfo object with the local timezone information.
1088 This module attempts to fix a glaring hole in pytz, that there is no way to
1089 get the local timezone information, unless you know the zoneinfo name, and
1090 under several distributions that's hard or impossible to figure out.")
1091 (license license:cc0)))
1092
1093 (define-public python2-pysqlite
1094 (package
1095 (name "python2-pysqlite")
1096 (version "2.8.1")
1097 (source
1098 (origin
1099 (method url-fetch)
1100 (uri (pypi-uri "pysqlite" version))
1101 (sha256
1102 (base32
1103 "0rm0zqyb363y6wljhfmbxs16jjv7p8nk1d8zgq9sdwj6js7y3jkm"))))
1104 (build-system python-build-system)
1105 (inputs
1106 `(("sqlite" ,sqlite)))
1107 (arguments
1108 `(#:python ,python-2 ; incompatible with Python 3
1109 #:tests? #f)) ; no test target
1110 (home-page "http://github.com/ghaering/pysqlite")
1111 (synopsis "SQLite bindings for Python")
1112 (description
1113 "Pysqlite provides SQLite bindings for Python that comply to the
1114 Database API 2.0T.")
1115 (license license:zlib)))
1116
1117
1118 (define-public python2-mechanize
1119 (package
1120 (name "python2-mechanize")
1121 (version "0.2.5")
1122 (source
1123 (origin
1124 (method url-fetch)
1125 (uri (string-append "https://pypi.python.org/packages/source/m/mechanize/mechanize-"
1126 version ".tar.gz"))
1127 (sha256
1128 (base32
1129 "0rj7r166i1dyrq0ihm5rijfmvhs8a04im28lv05c0c3v206v4rrf"))))
1130 (build-system python-build-system)
1131 (inputs
1132 `(("python2-setuptools" ,python2-setuptools)))
1133 (arguments
1134 `(#:python ,python-2 ; apparently incompatible with Python 3
1135 #:tests? #f))
1136 ;; test fails with message
1137 ;; AttributeError: 'module' object has no attribute 'test_pullparser'
1138 ;; (python-3.3.2) or
1139 ;; AttributeError: 'module' object has no attribute 'test_urllib2_localnet'
1140 ;; (python-2.7.5).
1141 ;; The source code is from March 2011 and probably not up-to-date
1142 ;; with respect to python unit tests.
1143 (home-page "http://wwwsearch.sourceforge.net/mechanize/")
1144 (synopsis
1145 "Stateful programmatic web browsing in Python")
1146 (description
1147 "Mechanize implements stateful programmatic web browsing in Python,
1148 after Andy Lester’s Perl module WWW::Mechanize.")
1149 (license (license:non-copyleft
1150 "file://COPYING"
1151 "See COPYING in the distribution."))))
1152
1153
1154 (define-public python-simplejson
1155 (package
1156 (name "python-simplejson")
1157 (version "3.8.2")
1158 (source
1159 (origin
1160 (method url-fetch)
1161 (uri (pypi-uri "simplejson" version))
1162 (sha256
1163 (base32
1164 "0zylrnax8b6r0ndgni4w9c599fi6wm9vx5g6k3ddqfj3932kk16m"))))
1165 (build-system python-build-system)
1166 (home-page "http://simplejson.readthedocs.org/en/latest/")
1167 (synopsis
1168 "Json library for Python")
1169 (description
1170 "JSON (JavaScript Object Notation) is a subset of JavaScript
1171 syntax (ECMA-262 3rd edition) used as a lightweight data interchange
1172 format.
1173
1174 Simplejson exposes an API familiar to users of the standard library marshal
1175 and pickle modules. It is the externally maintained version of the json
1176 library contained in Python 2.6, but maintains compatibility with Python 2.5
1177 and (currently) has significant performance advantages, even without using
1178 the optional C extension for speedups. Simplejson is also supported on
1179 Python 3.3+.")
1180 (license license:x11)))
1181
1182 (define-public python2-simplejson
1183 (package-with-python2 python-simplejson))
1184
1185
1186 (define-public python-pyicu
1187 (package
1188 (name "python-pyicu")
1189 (version "1.9.2")
1190 (source
1191 (origin
1192 (method url-fetch)
1193 (uri (string-append "https://pypi.python.org/packages/source/P/PyICU/PyICU-"
1194 version ".tar.gz"))
1195 (sha256
1196 (base32
1197 "1diba0g8md614fvm9yf50paiwdkhj6rd7xwf1rg9mc0pxc0hhn4v"))))
1198 (build-system python-build-system)
1199 (inputs
1200 `(("icu4c" ,icu4c)))
1201 (home-page "http://pyicu.osafoundation.org/")
1202 (synopsis "Python extension wrapping the ICU C++ API")
1203 (description
1204 "PyICU is a python extension wrapping the ICU C++ API.")
1205 (license license:x11)
1206 (properties `((python2-variant . ,(delay python2-pyicu))))))
1207
1208 (define-public python2-pyicu
1209 (package
1210 (inherit (package-with-python2
1211 (strip-python2-variant python-pyicu)))
1212 (native-inputs `(("python2-setuptools" ,python2-setuptools)))))
1213
1214 (define-public python2-dogtail
1215 ;; Python 2 only, as it leads to "TabError: inconsistent use of tabs and
1216 ;; spaces in indentation" with Python 3.
1217 (package
1218 (name "python2-dogtail")
1219 (version "0.8.2")
1220 (source (origin
1221 (method url-fetch)
1222 (uri (string-append
1223 "https://fedorahosted.org/released/dogtail/dogtail-"
1224 version ".tar.gz"))
1225 (sha256
1226 (base32
1227 "1yc4cg7ip87z15gyd4wy2vzbywrjc52a3m8r8gqy2b50d65llcg1"))))
1228 (build-system python-build-system)
1229 (arguments `(#:python ,python-2
1230 #:tests? #f)) ; invalid command "test"
1231 (home-page "https://fedorahosted.org/dogtail/")
1232 (synopsis "GUI test tool and automation framework written in ​Python")
1233 (description
1234 "Dogtail is a GUI test tool and automation framework written in Python.
1235 It uses Accessibility (a11y) technologies to communicate with desktop
1236 applications. dogtail scripts are written in Python and executed like any
1237 other Python program.")
1238 (license license:gpl2+)))
1239
1240 (define-public python2-empy
1241 (package
1242 (name "python2-empy")
1243 (version "3.3")
1244 (source (origin
1245 (method url-fetch)
1246 (uri (string-append "http://www.alcyone.com/software/empy/empy-"
1247 version ".tar.gz"))
1248 (sha256
1249 (base32
1250 "01g8mmkfnvjdmlhsihwyx56lrg7r5m5d2fg6mnxsvy6g0dnl69f6"))))
1251 (build-system python-build-system)
1252 (arguments
1253 `(#:python ,python-2
1254 #:phases (alist-replace
1255 'check
1256 (lambda _
1257 (zero? (system* "./test.sh")))
1258 %standard-phases)))
1259 (home-page "http://www.alcyone.com/software/empy/")
1260 (synopsis "Templating system for Python")
1261 (description
1262 "EmPy is a system for embedding Python expressions and statements in
1263 template text; it takes an EmPy source file, processes it, and produces
1264 output. This is accomplished via expansions, which are special signals to the
1265 EmPy system and are set off by a special prefix (by default the at sign, @@).
1266 EmPy can expand arbitrary Python expressions and statements in this way, as
1267 well as a variety of special forms. Textual data not explicitly delimited in
1268 this way is sent unaffected to the output, allowing Python to be used in
1269 effect as a markup language. Also supported are callbacks via hooks,
1270 recording and playback via diversions, and dynamic, chainable filters. The
1271 system is highly configurable via command line options and embedded
1272 commands.")
1273 (license license:lgpl2.1+)))
1274
1275 (define-public python2-element-tree
1276 (package
1277 (name "python2-element-tree")
1278 (version "1.2.6")
1279 (source (origin
1280 (method url-fetch)
1281 (uri (string-append
1282 "http://effbot.org/media/downloads/elementtree-"
1283 version "-20050316.tar.gz"))
1284 (sha256
1285 (base32
1286 "016bphqnlg0l4vslahhw4r0aanw95bpypy65r1i1acyb2wj5z7dj"))))
1287 (build-system python-build-system)
1288 (arguments
1289 `(#:python ,python-2 ; seems to be part of Python 3
1290 #:tests? #f)) ; no 'test' sub-command
1291 (synopsis "Toolkit for XML processing in Python")
1292 (description
1293 "ElementTree is a Python library supporting lightweight XML processing.")
1294 (home-page "http://effbot.org/zone/element-index.htm")
1295 (license (license:x11-style
1296 "http://docs.python.org/2/license.html"
1297 "Like \"CWI LICENSE AGREEMENT FOR PYTHON 0.9.0 THROUGH 1.2\"."))))
1298
1299 (define-public python2-pybugz
1300 (package
1301 (name "python2-pybugz")
1302 (version "0.6.11")
1303 (source (origin
1304 (method url-fetch)
1305 (uri (string-append
1306 "http://bits.liquidx.net/projects/pybugz/pybugz-"
1307 version ".tar.gz"))
1308 (sha256
1309 (base32
1310 "17ni00p08gp5lkxlrrcnvi3x09fmajnlbz4da03qcgl9q21ym4jd"))
1311 (patches (search-patches "pybugz-stty.patch"
1312 "pybugz-encode-error.patch"))))
1313 (build-system python-build-system)
1314 (arguments
1315 `(#:python ,python-2 ; SyntaxError with Python 3
1316 #:tests? #f)) ; no 'test' sub-command
1317 (inputs `(("element-tree" ,python2-element-tree)))
1318 (synopsis "Python and command-line interface to Bugzilla")
1319 (description
1320 "PyBugz is a Python library and command-line tool to query the Bugzilla
1321 bug tracking system. It is meant as an aid to speed up interaction with the
1322 bug tracker.")
1323 (home-page "http://www.liquidx.net/pybugz/")
1324 (license license:gpl2)))
1325
1326 (define-public python-enum34
1327 (package
1328 (name "python-enum34")
1329 (version "1.1.0")
1330 (source
1331 (origin
1332 (method url-fetch)
1333 (uri (pypi-uri "enum34" version))
1334 (sha256
1335 (base32
1336 "0yx1m4564wxgbm4glb3457hi16xihd9w63rv13y2przkdir9dfgp"))))
1337 (build-system python-build-system)
1338 (arguments
1339 `(#:phases
1340 (alist-replace
1341 'check
1342 (lambda _ (zero? (system* "python" "enum/test_enum.py")))
1343 %standard-phases)))
1344 (home-page "https://pypi.python.org/pypi/enum34")
1345 (synopsis "Backported Python 3.4 Enum")
1346 (description
1347 "Enum34 is the new Python stdlib enum module available in Python 3.4
1348 backported for previous versions of Python from 2.4 to 3.3.")
1349 (license license:bsd-3)))
1350
1351 (define-public python2-enum34
1352 (package-with-python2 python-enum34))
1353
1354 (define-public python-parse-type
1355 (package
1356 (name "python-parse-type")
1357 (version "0.3.4")
1358 (source
1359 (origin
1360 (method url-fetch)
1361 (uri (string-append "https://pypi.python.org/packages/source/p/"
1362 "parse_type/parse_type-" version ".tar.gz"))
1363 (sha256
1364 (base32
1365 "0iv1c34npr4iynwpgv1vkjx9rjd18a85ir8c01gc5f7wp8iv7l1x"))))
1366 (build-system python-build-system)
1367 (inputs
1368 `(("python-setuptools" ,python-setuptools)
1369 ("python-six" ,python-six)
1370 ("python-parse" ,python-parse)))
1371 (arguments '(#:tests? #f)) ;TODO: tests require pytest
1372 (home-page "https://github.com/jenisys/parse_type")
1373 (synopsis "Extended parse module")
1374 (description
1375 "Parse_type extends the python parse module.")
1376 (license license:bsd-3)))
1377
1378 (define-public python-parse
1379 (package
1380 (name "python-parse")
1381 (version "1.6.6")
1382 (source
1383 (origin
1384 (method url-fetch)
1385 (uri (pypi-uri "parse" version))
1386 (sha256
1387 (base32
1388 "0y31i3mwgv35qn0kzzjn9q8jqfdqmbi6sr6yfvn8rq4lqjm5lhvi"))))
1389 (build-system python-build-system)
1390 (arguments
1391 `(#:phases
1392 (alist-replace
1393 'check
1394 (lambda _ (zero? (system* "python" "test_parse.py")))
1395 %standard-phases)))
1396 (home-page "https://github.com/r1chardj0n3s/parse")
1397 (synopsis "Parse strings")
1398 (description
1399 "Parse strings using a specification based on the Python format()
1400 syntax.")
1401 (license license:x11)))
1402
1403
1404 (define-public scons
1405 (package
1406 (name "scons")
1407 (version "2.3.4")
1408 (source (origin
1409 (method url-fetch)
1410 (uri (string-append "mirror://sourceforge/scons/scons/" version
1411 "/scons-" version ".tar.gz"))
1412 (sha256
1413 (base32
1414 "0hdlci43wjz8maryj83mz04ir6rwcdrrzpd7cpzvdlzycqhdfmsb"))))
1415 (build-system python-build-system)
1416 (arguments
1417 ;; With Python 3.x, fails to build with a syntax error.
1418 `(#:python ,python-2
1419 #:tests? #f)) ; no 'python setup.py test' command
1420 (home-page "http://scons.org/")
1421 (synopsis "Software construction tool written in Python")
1422 (description
1423 "SCons is a software construction tool. Think of SCons as an improved,
1424 cross-platform substitute for the classic Make utility with integrated
1425 functionality similar to autoconf/automake and compiler caches such as ccache.
1426 In short, SCons is an easier, more reliable and faster way to build
1427 software.")
1428 (license license:x11)))
1429
1430 (define-public python-extras
1431 (package
1432 (name "python-extras")
1433 (version "0.0.3")
1434 (source
1435 (origin
1436 (method url-fetch)
1437 (uri (string-append
1438 "https://pypi.python.org/packages/source/e/extras/extras-"
1439 version ".tar.gz"))
1440 (sha256
1441 (base32
1442 "1h7zx4dfyclalg0fqnfjijpn0f793a9mx8sy3b27gd31nr6dhq3s"))))
1443 (build-system python-build-system)
1444 (inputs
1445 `(("python-setuptools" ,python-setuptools)))
1446 (arguments
1447 ;; error in setup.cfg: command 'test' has no such option 'buffer'
1448 '(#:tests? #f))
1449 (home-page "https://github.com/testing-cabal/extras")
1450 (synopsis "Useful extensions to the Python standard library")
1451 (description
1452 "Extras is a set of extensions to the Python standard library.")
1453 (license license:expat)))
1454
1455 (define-public python2-extras
1456 (package-with-python2 python-extras))
1457
1458 (define-public python-mimeparse
1459 (package
1460 (name "python-mimeparse")
1461 (version "0.1.4")
1462 (source
1463 (origin
1464 (method url-fetch)
1465 (uri (string-append
1466 "https://pypi.python.org/packages/source/p/python-mimeparse/python-mimeparse-"
1467 version ".tar.gz"))
1468 (sha256
1469 (base32
1470 "1hyxg09kaj02ri0rmwjqi86wk4nd1akvv7n0dx77azz76wga4s9w"))))
1471 (build-system python-build-system)
1472 (inputs
1473 `(("python-setuptools" ,python-setuptools)))
1474 (arguments
1475 '(#:tests? #f)) ; no setup.py test command
1476 (home-page
1477 "https://github.com/dbtsai/python-mimeparse")
1478 (synopsis "Python library for parsing MIME types")
1479 (description
1480 "Mimeparse provides basic functions for parsing MIME type names and
1481 matching them against a list of media-ranges.")
1482 (license license:expat)))
1483
1484 (define-public python2-mimeparse
1485 (package-with-python2 python-mimeparse))
1486
1487 (define-public python-nose
1488 (package
1489 (name "python-nose")
1490 (version "1.3.7")
1491 (source
1492 (origin
1493 (method url-fetch)
1494 (uri (pypi-uri "nose" version))
1495 (sha256
1496 (base32
1497 "164a43k7k2wsqqk1s6vavcdamvss4mz0vd6pwzv2h9n8rgwzxgzi"))))
1498 (build-system python-build-system)
1499 (inputs
1500 `(("python-setuptools" ,python-setuptools)))
1501 (arguments
1502 '(#:tests? #f)) ; FIXME: test suite fails
1503 (home-page "http://readthedocs.org/docs/nose/")
1504 (synopsis "Python testing library")
1505 (description
1506 "Nose extends the unittest library to make testing easier.")
1507 (license license:lgpl2.0+)))
1508
1509 (define-public python2-nose
1510 (package-with-python2 python-nose))
1511
1512 (define-public python-nose2
1513 (package
1514 (name "python-nose2")
1515 (version "0.6.5")
1516 (source
1517 (origin
1518 (method url-fetch)
1519 (uri (pypi-uri "nose2" version))
1520 (sha256
1521 (base32
1522 "1x4zjq1zlyrh8b9ba0cmafd3w94pxhid408kibyjd3s6h1lap6s7"))))
1523 (build-system python-build-system)
1524 (arguments `(#:tests? #f)) ; 'module' object has no attribute 'collector'
1525 (native-inputs
1526 `(("python-setuptools" ,python-setuptools)))
1527 (inputs
1528 `(("python-cov-core" ,python-cov-core)
1529 ("python-pytest-cov" ,python-pytest-cov)
1530 ("python-six" ,python-six)))
1531 (home-page "https://github.com/nose-devs/nose2")
1532 (synopsis "Next generation of nicer testing for Python")
1533 (description
1534 "Nose2 is the next generation of nicer testing for Python, based on the
1535 plugins branch of unittest2. Nose2 aims to improve on nose by providing a
1536 better plugin api, being easier for users to configure, and simplifying internal
1537 interfaces and processes.")
1538 (license license:bsd-2)))
1539
1540 (define-public python2-nose2
1541 (package-with-python2 python-nose2))
1542
1543 (define-public python-unittest2
1544 (package
1545 (name "python-unittest2")
1546 (version "0.5.1")
1547 (source
1548 (origin
1549 (method url-fetch)
1550 (uri (string-append
1551 "https://pypi.python.org/packages/source/u/unittest2py3k/unittest2py3k-"
1552 version ".tar.gz"))
1553 (sha256
1554 (base32
1555 "00yl6lskygcrddx5zspkhr0ibgvpknl4678kkm6s626539grq93q"))))
1556 (build-system python-build-system)
1557 (inputs
1558 `(("python-setuptools" ,python-setuptools)))
1559 (home-page "http://pypi.python.org/pypi/unittest2")
1560 (synopsis "Python unit testing library")
1561 (description
1562 "Unittest2 is a replacement for the unittest module in the Python
1563 standard library.")
1564 (license license:psfl)))
1565
1566 (define-public python2-unittest2
1567 (package (inherit python-unittest2)
1568 (name "python2-unittest2")
1569 (version "0.5.1")
1570 (source
1571 (origin
1572 (method url-fetch)
1573 (uri (string-append
1574 "https://pypi.python.org/packages/source/u/unittest2/unittest2-"
1575 version ".tar.gz"))
1576 (sha256
1577 (base32
1578 "0wbs4i4x3x7klr3v35ss6p9mcqz883i1xgcpkhvl7n2lyv6yhpda"))))
1579 (inputs
1580 `(("python2-setuptools" ,python2-setuptools)))
1581 (arguments
1582 `(#:python ,python-2
1583 #:tests? #f)))) ; no setup.py test command
1584
1585 (define-public python-py
1586 (package
1587 (name "python-py")
1588 (version "1.4.31")
1589 (source
1590 (origin
1591 (method url-fetch)
1592 (uri (pypi-uri "py" version))
1593 (sha256
1594 (base32
1595 "0561gz2w3i825gyl42mcq14y3dcgkapfiv5zv9a2bz15qxiijl56"))))
1596 (build-system python-build-system)
1597 (inputs
1598 `(("python-setuptools" ,python-setuptools)))
1599 (home-page "http://pylib.readthedocs.org/")
1600 (synopsis "Python library for parsing, I/O, instrospection, and logging")
1601 (description
1602 "Py is a Python library for file name parsing, .ini file parsing, I/O,
1603 code introspection, and logging.")
1604 (license license:expat)))
1605
1606 (define-public python2-py
1607 (package-with-python2 python-py))
1608
1609 (define-public python-pytest
1610 (package
1611 (name "python-pytest")
1612 (version "2.7.3")
1613 (source
1614 (origin
1615 (method url-fetch)
1616 (uri (string-append
1617 "https://pypi.python.org/packages/source/p/pytest/pytest-"
1618 version ".tar.gz"))
1619 (sha256
1620 (base32
1621 "1z4yi986f9n0p8qmzmn21m21m8j1x78hk3505f89baqm6pdw7afm"))
1622 (modules '((guix build utils)))
1623 (snippet
1624 ;; One of the tests involves the /usr directory, so it fails.
1625 '(substitute* "testing/test_argcomplete.py"
1626 (("def test_remove_dir_prefix\\(self\\):")
1627 "@pytest.mark.xfail\n def test_remove_dir_prefix(self):")))))
1628 (build-system python-build-system)
1629 (inputs
1630 `(("python-setuptools" ,python-setuptools)
1631 ("python-py" ,python-py)
1632 ("python-nose" ,python-nose)
1633 ("python-mock" ,python-mock)))
1634 (home-page "http://pytest.org")
1635 (synopsis "Python testing library")
1636 (description
1637 "Pytest is a testing tool that provides auto-discovery of test modules
1638 and functions, detailed info on failing assert statements, modular fixtures,
1639 and many external plugins.")
1640 (license license:expat)))
1641
1642 (define-public python2-pytest
1643 (package-with-python2 python-pytest))
1644
1645 (define-public python-pytest-cov
1646 (package
1647 (name "python-pytest-cov")
1648 (version "2.2.1")
1649 (source
1650 (origin
1651 (method url-fetch)
1652 (uri (pypi-uri "pytest-cov" version))
1653 (sha256
1654 (base32
1655 "1yl4nbhzfgsxqlsyk4clafgp9x11zvgrkprm9i2p3fgkwx9jxcm8"))))
1656 (build-system python-build-system)
1657 (inputs
1658 `(("python-coverage" ,python-coverage)
1659 ("python-pytest" ,python-pytest)))
1660 (home-page "https://github.com/pytest-dev/pytest-cov")
1661 (synopsis "Pytest plugin for measuring coverage")
1662 (description
1663 "Pytest-cov produces coverage reports. It supports centralised testing and
1664 distributed testing in both @code{load} and @code{each} modes. It also
1665 supports coverage of subprocesses.")
1666 (license license:expat)
1667 (properties `((python2-variant . ,(delay python2-pytest-cov))))))
1668
1669 (define-public python2-pytest-cov
1670 (let ((base (package-with-python2 (strip-python2-variant python-pytest-cov))))
1671 (package
1672 (inherit base)
1673 (inputs `(("python2-setuptools" ,python2-setuptools)
1674 ,@(package-inputs base))))))
1675
1676 (define-public python-pytest-runner
1677 (package
1678 (name "python-pytest-runner")
1679 (version "2.6.2")
1680 (source
1681 (origin
1682 (method url-fetch)
1683 (uri (pypi-uri "pytest-runner" version))
1684 (sha256
1685 (base32
1686 "1nwcqx0l3fv52kv8526wy8ypzghbq96c96di318d98d3wh7a8xg7"))))
1687 (build-system python-build-system)
1688 (arguments
1689 `(#:phases
1690 (modify-phases %standard-phases
1691 ;; The fancy way of setting the version with setuptools_scm does not
1692 ;; seem to work here.
1693 (add-after 'unpack 'set-version
1694 (lambda _
1695 (substitute* "docs/conf.py"
1696 (("version = setuptools_scm\\.get_version\\(root='\\.\\.')")
1697 (string-append "version = \"" ,version "\"")))
1698 #t)))))
1699 (native-inputs
1700 `(("python-pytest" ,python-pytest)
1701 ("python-setuptools-scm" ,python-setuptools-scm)))
1702 (home-page "https://github.com/pytest-dev/pytest-runner")
1703 (synopsis "Invoke py.test as a distutils command")
1704 (description
1705 "This package provides a @command{pytest-runner} command that
1706 @file{setup.py} files can use to run tests.")
1707 (license license:expat)
1708 (properties `((python2-variant . ,(delay python2-pytest-runner))))))
1709
1710 (define-public python2-pytest-runner
1711 (let ((base (package-with-python2
1712 (strip-python2-variant python-pytest-runner))))
1713 (package
1714 (inherit base)
1715 (native-inputs `(("python2-setuptools" ,python2-setuptools)
1716 ,@(package-native-inputs base))))))
1717
1718 (define-public python2-pytest-runner
1719 (package-with-python2 python-pytest-runner))
1720
1721 (define-public python-pytest-mock
1722 (package
1723 (name "python-pytest-mock")
1724 (version "1.2")
1725 (source
1726 (origin
1727 (method url-fetch)
1728 (uri (pypi-uri "pytest-mock" version ".zip"))
1729 (sha256
1730 (base32
1731 "03zxar5drzm7ksqyrwypjaza3cri6wqvpr6iam92djvg6znp32gp"))))
1732 (build-system python-build-system)
1733 (native-inputs
1734 `(("unzip" ,unzip)))
1735 (inputs
1736 `(("python-py" ,python-py)
1737 ("python-pytest" ,python-pytest)))
1738 (home-page "https://github.com/pytest-dev/pytest-mock/")
1739 (synopsis "Thin-wrapper around the mock package for easier use with py.test")
1740 (description
1741 "This plugin installs a @code{mocker} fixture which is a thin-wrapper
1742 around the patching API provided by the @code{mock} package, but with the
1743 benefit of not having to worry about undoing patches at the end of a test.
1744 The mocker fixture has the same API as @code{mock.patch}, supporting the
1745 same arguments.")
1746 (properties `((python2-variant . ,(delay python2-pytest-mock))))
1747 (license license:expat)))
1748
1749 (define-public python2-pytest-mock
1750 (let ((base (package-with-python2
1751 (strip-python2-variant python-pytest-mock))))
1752 (package (inherit base)
1753 (native-inputs
1754 `(("python2-setuptools" ,python2-setuptools)
1755 ,@(package-native-inputs base)))
1756 (inputs
1757 `(("python2-mock" ,python2-mock)
1758 ,@(package-inputs base))))))
1759
1760 (define-public python-pytest-xdist
1761 (package
1762 (name "python-pytest-xdist")
1763 (version "1.14")
1764 (source
1765 (origin
1766 (method url-fetch)
1767 (uri (pypi-uri "pytest-xdist" version ".zip"))
1768 (sha256
1769 (base32
1770 "08rn2l39ds60xshs4js787l84pfckksqklfq2wq9x8ig2aci2pja"))))
1771 (build-system python-build-system)
1772 (native-inputs
1773 `(("unzip" ,unzip)
1774 ("python-setuptools-scm" ,python-setuptools-scm)))
1775 (inputs
1776 `(("python-apipkg" ,python-apipkg)
1777 ("python-execnet" ,python-execnet)
1778 ("python-pytest" ,python-pytest)
1779 ("python-py" ,python-py)))
1780 (home-page
1781 "https://github.com/pytest-dev/pytest-xdist")
1782 (synopsis
1783 "Plugin for py.test with distributed testing and loop-on-failing modes")
1784 (description
1785 "The pytest-xdist plugin extends py.test with some unique test execution
1786 modes: parallelization, running tests in boxed subprocesses, the ability
1787 to run tests repeatedly when failed, and the ability to run tests on multiple
1788 Python interpreters or platforms. It uses rsync to copy the existing
1789 program code to a remote location, executes there, and then syncs the
1790 result back.")
1791 (license license:expat)
1792 (properties `((python2-variant . ,(delay python2-pytest-xdist))))))
1793
1794 (define-public python2-pytest-xdist
1795 (let ((base (package-with-python2
1796 (strip-python2-variant python-pytest-xdist))))
1797 (package
1798 (inherit base)
1799 (native-inputs `(("python2-setuptools" ,python2-setuptools)
1800 ,@(package-native-inputs base))))))
1801
1802 (define-public python-scripttest
1803 (package
1804 (name "python-scripttest")
1805 (version "1.3")
1806 (source
1807 (origin
1808 (method url-fetch)
1809 (uri (string-append
1810 "https://pypi.python.org/packages/source/s/scripttest/scripttest-"
1811 version ".tar.gz"))
1812 (sha256
1813 (base32
1814 "0f4w84k8ck82syys7yg9maz93mqzc8p5ymis941x034v44jzq74m"))))
1815 (build-system python-build-system)
1816 (inputs
1817 `(("python-setuptools" ,python-setuptools)
1818 ("python-pytest" ,python-pytest)))
1819 (home-page "http://pythonpaste.org/scripttest/")
1820 (synopsis "Python library to test command-line scripts")
1821 (description "Scripttest is a Python helper library for testing
1822 interactive command-line applications. With it you can run a script in a
1823 subprocess and see the output as well as any file modifications.")
1824 (license license:expat)))
1825
1826 (define-public python2-scripttest
1827 (package-with-python2 python-scripttest))
1828
1829 (define-public python-testtools
1830 (package
1831 (name "python-testtools")
1832 (version "1.0.0")
1833 (source
1834 (origin
1835 (method url-fetch)
1836 (uri (string-append
1837 "https://pypi.python.org/packages/source/t/testtools/testtools-"
1838 version ".tar.gz"))
1839 (sha256
1840 (base32
1841 "1dyml28ykpl5jb9khdmcdvhy1cxqingys6qvj2k04fzlaj6z3bbx"))))
1842 (build-system python-build-system)
1843 (propagated-inputs
1844 `(("python-mimeparse" ,python-mimeparse)))
1845 (inputs
1846 `(("python-setuptools" ,python-setuptools)
1847 ("python-extras" ,python-extras)))
1848 (home-page "https://github.com/testing-cabal/testtools")
1849 (synopsis
1850 "Extensions to the Python standard library unit testing framework")
1851 (description
1852 "Testtools extends the Python standard library unit testing framework to
1853 provide matchers, more debugging information, and cross-Python
1854 compatibility.")
1855 (license license:psfl)))
1856
1857 (define-public python2-testtools
1858 (package-with-python2 python-testtools))
1859
1860 (define-public python-testscenarios
1861 (package
1862 (name "python-testscenarios")
1863 (version "0.4")
1864 (source
1865 (origin
1866 (method url-fetch)
1867 (uri (string-append
1868 "https://pypi.python.org/packages/source/t/testscenarios/testscenarios-"
1869 version ".tar.gz"))
1870 (sha256
1871 (base32
1872 "1671jvrvqlmbnc42j7pc5y6vc37q44aiwrq0zic652pxyy2fxvjg"))))
1873 (build-system python-build-system)
1874 (inputs
1875 `(("python-setuptools" ,python-setuptools)
1876 ("python-testtools" ,python-testtools)
1877 ("python-mimeparse" ,python-mimeparse)))
1878 (home-page "https://launchpad.net/testscenarios")
1879 (synopsis "Pyunit extension for dependency injection")
1880 (description
1881 "Testscenarios provides clean dependency injection for Python unittest
1882 style tests.")
1883 (license (list license:bsd-3 license:asl2.0)))) ; at the user's option
1884
1885 (define-public python2-testscenarios
1886 (package-with-python2 python-testscenarios))
1887
1888 (define-public python-testresources
1889 (package
1890 (name "python-testresources")
1891 (version "0.2.7")
1892 (source
1893 (origin
1894 (method url-fetch)
1895 (uri (string-append
1896 "https://pypi.python.org/packages/source/t/testresources/testresources-"
1897 version ".tar.gz"))
1898 (sha256
1899 (base32
1900 "0cbj3plbllyz42c4b5xxgwaa7mml54lakslrn4kkhinxhdri22md"))))
1901 (build-system python-build-system)
1902 (inputs
1903 `(("python-setuptools" ,python-setuptools)))
1904 (home-page "https://launchpad.net/testresources")
1905 (synopsis
1906 "Pyunit extension for managing test resources")
1907 (description
1908 "Testresources is an extension to Python's unittest to allow declarative
1909 use of resources by test cases.")
1910 (license (list license:bsd-3 license:asl2.0)))) ; at the user's option
1911
1912 (define-public python2-testresources
1913 (package-with-python2 python-testresources))
1914
1915 (define-public python-subunit
1916 (package
1917 (name "python-subunit")
1918 (version "0.0.21")
1919 (source
1920 (origin
1921 (method url-fetch)
1922 (uri (string-append
1923 "https://pypi.python.org/packages/source/p/python-subunit/python-subunit-"
1924 version ".tar.gz"))
1925 (sha256
1926 (base32
1927 "1nkw9wfbvizmpajbj3in8ns07g7lwkiv8hip14jjlwk3cacls6jv"))))
1928 (build-system python-build-system)
1929 (inputs
1930 `(("python-setuptools" ,python-setuptools)
1931 ("python-testtools" ,python-testtools)
1932 ("python-mimeparse" ,python-mimeparse)
1933 ("python-testscenarios" ,python-testscenarios)))
1934 (home-page "http://launchpad.net/subunit")
1935 (synopsis "Python implementation of the subunit protocol")
1936 (description
1937 "Python-subunit is a Python implementation of the subunit test streaming
1938 protocol.")
1939 (license (list license:bsd-3 license:asl2.0)))) ; at the user's option
1940
1941 (define-public python2-subunit
1942 (package-with-python2 python-subunit))
1943
1944 ;; Recent versions of python-fixtures need a recent version of python-pbr,
1945 ;; which needs a recent version of python-fixtures. To fix this circular
1946 ;; dependency, we keep old versions of python-fixtures and python-pbr to
1947 ;; bootstrap the whole thing:
1948 ;; - python-fixtures-0.3.16 is used to build python-pbr-0.11
1949 ;; - python-pbr-0.11 is used to build python-fixtures
1950 ;; - python-fixtures is used to build python-pbr
1951 (define-public python-fixtures-0.3.16
1952 (package
1953 (name "python-fixtures")
1954 (version "0.3.16")
1955 (source
1956 (origin
1957 (method url-fetch)
1958 (uri (string-append
1959 "https://pypi.python.org/packages/source/f/fixtures/fixtures-"
1960 version ".tar.gz"))
1961 (sha256
1962 (base32
1963 "0x9r2gwilcig5g54k60bxzg96zabizq1855lrprlb4zckalp9asc"))))
1964 (build-system python-build-system)
1965 (inputs
1966 `(("python-setuptools" ,python-setuptools)))
1967 (arguments
1968 '(#:tests? #f)) ; no setup.py test command
1969 (home-page "https://launchpad.net/python-fixtures")
1970 (synopsis "Python test fixture library")
1971 (description
1972 "Fixtures provides a way to create reusable state, useful when writing
1973 Python tests.")
1974 (license (list license:bsd-3 license:asl2.0)))) ; at user's option
1975
1976 (define-public python2-fixtures-0.3.16
1977 (package-with-python2 python-fixtures-0.3.16))
1978
1979 (define-public python-pbr-0.11
1980 (package
1981 (name "python-pbr")
1982 (version "0.11.0")
1983 (source
1984 (origin
1985 (method url-fetch)
1986 (uri (string-append
1987 "https://pypi.python.org/packages/source/p/pbr/pbr-"
1988 version ".tar.gz"))
1989 (sha256
1990 (base32
1991 "0v9gb7gyqf7q9s99l0nnjj9ww9b0jvyqlwm4d56pcyinxydddw6p"))))
1992 (build-system python-build-system)
1993 (arguments
1994 `(#:tests? #f)) ;; Most tests seem to use the Internet.
1995 (inputs
1996 `(("python-fixtures-0.3.16" ,python-fixtures-0.3.16)
1997 ("python-pip" ,python-pip)
1998 ("python-setuptools" ,python-setuptools)))
1999 (home-page "https://launchpad.net/pbr")
2000 (synopsis "Change the default behavior of Python’s setuptools")
2001 (description
2002 "Python Build Reasonableness (PBR) is a library that injects some useful
2003 and sensible default behaviors into your setuptools run.")
2004 (license license:asl2.0)))
2005
2006 (define-public python2-pbr-0.11
2007 (package-with-python2 python-pbr-0.11))
2008
2009 (define-public python-pbr
2010 (package
2011 (name "python-pbr")
2012 (version "1.8.1")
2013 (source
2014 (origin
2015 (method url-fetch)
2016 (uri (string-append
2017 "https://pypi.python.org/packages/source/p/pbr/pbr-"
2018 version
2019 ".tar.gz"))
2020 (sha256
2021 (base32
2022 "0jcny36cf3s8ar5r4a575npz080hndnrfs4np1fqhv0ym4k7c4p2"))))
2023 (build-system python-build-system)
2024 (arguments
2025 `(#:tests? #f)) ;; Most tests seem to use the Internet.
2026 (propagated-inputs
2027 `(("python-testrepository" ,python-testrepository)
2028 ("git" ,git))) ;; pbr actually uses the "git" binary.
2029 (inputs
2030 `(("python-fixtures" ,python-fixtures)
2031 ("python-mimeparse" ,python-mimeparse)
2032 ("python-mock" ,python-mock)
2033 ("python-setuptools" ,python-setuptools)
2034 ("python-six" ,python-six)
2035 ("python-sphinx" ,python-sphinx)
2036 ("python-testrepository" ,python-testrepository)
2037 ("python-testresources" ,python-testresources)
2038 ("python-testscenarios" ,python-testscenarios)
2039 ("python-testtools" ,python-testtools)
2040 ("python-virtualenv" ,python-virtualenv)))
2041 (home-page "https://launchpad.net/pbr")
2042 (synopsis "Change the default behavior of Python’s setuptools")
2043 (description
2044 "Python Build Reasonableness (PBR) is a library that injects some useful
2045 and sensible default behaviors into your setuptools run.")
2046 (license license:asl2.0)))
2047
2048 (define-public python2-pbr
2049 (package-with-python2 python-pbr))
2050
2051 (define-public python-fixtures
2052 (package
2053 (name "python-fixtures")
2054 (version "1.4.0")
2055 (source
2056 (origin
2057 (method url-fetch)
2058 (uri (pypi-uri "fixtures" version))
2059 (sha256
2060 (base32
2061 "0djxvdwm8s60dbfn7bhf40x6g818p3b3mlwijm1c3bqg7msn271y"))))
2062 (build-system python-build-system)
2063 (propagated-inputs
2064 `(("python-six" ,python-six)
2065 ("python-pbr-0.11" ,python-pbr-0.11)))
2066 (inputs
2067 `(("python-pip" ,python-pip)
2068 ("python-setuptools" ,python-setuptools)
2069 ;; Tests
2070 ("python-testtools" ,python-testtools)))
2071 (arguments
2072 '(#:tests? #f)) ; no setup.py test command
2073 (home-page "https://launchpad.net/python-fixtures")
2074 (synopsis "Python test fixture library")
2075 (description
2076 "Fixtures provides a way to create reusable state, useful when writing
2077 Python tests.")
2078 (license (list license:bsd-3 license:asl2.0)))) ; at user's option
2079
2080 (define-public python2-fixtures
2081 (package-with-python2 python-fixtures))
2082
2083 (define-public python-testrepository
2084 (package
2085 (name "python-testrepository")
2086 (version "0.0.20")
2087 (source
2088 (origin
2089 (method url-fetch)
2090 (uri (string-append
2091 "https://pypi.python.org/packages/source/t/testrepository/testrepository-"
2092 version ".tar.gz"))
2093 (sha256
2094 (base32
2095 "1ssqb07c277010i6gzzkbdd46gd9mrj0bi0i8vn560n2k2y4j93m"))))
2096 (build-system python-build-system)
2097 (propagated-inputs
2098 `(("python-fixtures-0.3.16" ,python-fixtures-0.3.16)
2099 ("python-testtools" ,python-testtools)))
2100 (inputs
2101 `(("python-setuptools" ,python-setuptools)
2102 ("python-subunit" ,python-subunit)
2103 ("python-mimeparse" ,python-mimeparse)))
2104 (home-page "https://launchpad.net/testrepository")
2105 (synopsis "Database for Python test results")
2106 (description "Testrepository provides a database of test results which can
2107 be used as part of a developer's workflow to check things such as what tests
2108 have failed since the last commit or what tests are currently failing.")
2109 (license (list license:bsd-3 license:asl2.0)))) ; at user's option
2110
2111 (define-public python2-testrepository
2112 (package-with-python2 python-testrepository))
2113
2114 (define-public python-coverage
2115 (package
2116 (name "python-coverage")
2117 (version "4.1")
2118 (source
2119 (origin
2120 (method url-fetch)
2121 (uri (pypi-uri "coverage" version))
2122 (sha256
2123 (base32
2124 "01rbr4br4lsk0lwn8fb96zwd2xr4f0mg1w7iq3j11i8f5ig2nqs1"))))
2125 (build-system python-build-system)
2126 (inputs
2127 `(("python-setuptools" ,python-setuptools)))
2128 (home-page "http://nedbatchelder.com/code/coverage")
2129 (synopsis "Code coverage measurement for Python")
2130 (description
2131 "Coverage measures code coverage, typically during test execution. It
2132 uses the code analysis tools and tracing hooks provided in the Python standard
2133 library to determine which lines are executable, and which have been
2134 executed.")
2135 (license license:bsd-3)))
2136
2137 (define-public python2-coverage
2138 (package-with-python2 python-coverage))
2139
2140 (define-public python-cov-core
2141 (package
2142 (name "python-cov-core")
2143 (version "1.15.0")
2144 (source
2145 (origin
2146 (method url-fetch)
2147 (uri (pypi-uri "cov-core" version))
2148 (sha256
2149 (base32
2150 "0k3np9ymh06yv1ib96sb6wfsxjkqhmik8qfsn119vnhga9ywc52a"))))
2151 (build-system python-build-system)
2152 (native-inputs
2153 `(("python-coverage" ,python-coverage)))
2154 (home-page "https://github.com/schlamar/cov-core")
2155 (synopsis "plugin core for use by pytest-cov, nose-cov and nose2-cov")
2156 (description
2157 "This is a library package for use by pytest-cov, nose-cov and nose2-cov.
2158 It is useful for developing coverage plugins for these testing frameworks.")
2159 (license license:expat)
2160 (properties `((python2-variant . ,(delay python2-cov-core))))))
2161
2162 (define-public python2-cov-core
2163 (let ((cov-core (package-with-python2 (strip-python2-variant python-cov-core))))
2164 (package (inherit cov-core)
2165 (native-inputs
2166 `(("python2-setuptools" ,python2-setuptools)
2167 ,@(package-native-inputs cov-core))))))
2168
2169 (define-public python-discover
2170 (package
2171 (name "python-discover")
2172 (version "0.4.0")
2173 (source
2174 (origin
2175 (method url-fetch)
2176 (uri (string-append
2177 "https://pypi.python.org/packages/source/d/discover/discover-"
2178 version ".tar.gz"))
2179 (sha256
2180 (base32
2181 "0y8d0zwiqar51kxj8lzmkvwc3b8kazb04gk5zcb4nzg5k68zmhq5"))))
2182 (build-system python-build-system)
2183 (inputs
2184 `(("python-setuptools" ,python-setuptools)))
2185 (home-page "http://pypi.python.org/pypi/discover/")
2186 (synopsis
2187 "Python test discovery for unittest")
2188 (description
2189 "Discover provides test discovery for unittest, a feature that has been
2190 backported from Python 2.7 for Python 2.4+.")
2191 (license license:bsd-3)))
2192
2193 (define-public python2-discover
2194 (package-with-python2 python-discover))
2195
2196 (define-public behave
2197 (package
2198 (name "behave")
2199 (version "1.2.5")
2200 (source (origin
2201 (method url-fetch)
2202 (uri (pypi-uri "behave" version ".tar.bz2"))
2203 (sha256
2204 (base32
2205 "1iypp6z46r19n4xmgx6m1lwmlpfjh8vapq8izigrqlaarvp2y64c"))))
2206 (build-system python-build-system)
2207 (inputs
2208 `(("python-setuptools" ,python-setuptools)
2209 ("python-six" ,python-six)
2210 ("python-parse" ,python-parse)
2211 ("python-parse-type" ,python-parse-type)))
2212 (arguments `(#:tests? #f)) ;TODO: tests require nose>=1.3 and
2213 ;PyHamcrest>=1.8
2214 (home-page "http://github.com/behave/behave")
2215 (synopsis "Python behavior-driven development")
2216 (description
2217 "Behave is a tool for behavior-driven development in python.
2218 Behavior-driven development (or BDD) is an agile software development
2219 technique that encourages collaboration between developers, QA and
2220 non-technical or business participants in a software project. Behave uses
2221 tests written in a natural language style, backed up by Python code.")
2222 (license license:x11)))
2223
2224 (define-public python-exif-read
2225 (package
2226 (name "python-exif-read")
2227 (version "2.1.2")
2228 (source (origin
2229 (method url-fetch)
2230 (uri (pypi-uri "ExifRead" version))
2231 (sha256
2232 (base32
2233 "1b90jf6m9vxh9nanhpyvqdq7hmfx5iggw1l8kq10jrs6xgr49qkr"))))
2234 (build-system python-build-system)
2235 (inputs
2236 `(("python-setuptools" ,python-setuptools)))
2237 (arguments `(#:tests? #f)) ; no tests
2238 (home-page "https://github.com/ianare/exif-py")
2239 (synopsis "Python library to extract EXIF data from image files")
2240 (description
2241 "ExifRead is a Python library to extract EXIF data from tiff and jpeg
2242 files.")
2243 (license license:bsd-3)))
2244
2245 (define-public python2-exif-read
2246 (package-with-python2 python-exif-read))
2247
2248 (define-public python-pyld
2249 (package
2250 (name "python-pyld")
2251 (version "0.6.8")
2252 (source (origin
2253 (method url-fetch)
2254 (uri (pypi-uri "PyLD" version))
2255 (sha256
2256 (base32
2257 "0k881ffazpf8q1z8862g4bb3pzwpnz9whrci2mf311mvn1qbyqad"))))
2258 (build-system python-build-system)
2259 (inputs
2260 `(("python-setuptools" ,python-setuptools)))
2261 (arguments `(#:tests? #f)) ; no tests
2262 (home-page "http://github.com/digitalbazaar/pyld")
2263 (synopsis "Python implementation of the JSON-LD specification")
2264 (description
2265 "PyLD is an implementation of the JSON-LD specification.")
2266 (license license:bsd-3)))
2267
2268 (define-public python2-pyld
2269 (package-with-python2 python-pyld))
2270
2271 (define-public python-certifi
2272 (package
2273 (name "python-certifi")
2274 (version "2015.11.20.1")
2275 (source (origin
2276 (method url-fetch)
2277 (uri (pypi-uri "certifi" version))
2278 (sha256
2279 (base32
2280 "05lgwf9rz1kn465azy2bpb3zmpnsn9gkypbhnjlclchv98ssgc1h"))))
2281 (build-system python-build-system)
2282 (inputs
2283 `(("python-setuptools" ,python-setuptools)))
2284 (arguments `(#:tests? #f)) ; no tests
2285 (home-page "http://python-requests.org/")
2286 (synopsis "Python CA certificate bundle")
2287 (description
2288 "Certifi is a Python library that contains a CA certificate bundle, which
2289 is used by the Requests library to verify HTTPS requests.")
2290 (license license:asl2.0)))
2291
2292 (define-public python2-certifi
2293 (package-with-python2 python-certifi))
2294
2295 (define-public python-click
2296 (package
2297 (name "python-click")
2298 (version "6.6")
2299 (source
2300 (origin
2301 (method url-fetch)
2302 (uri (pypi-uri "click" version))
2303 (sha256
2304 (base32
2305 "1sggipyz52crrybwbr9xvwxd4aqigvplf53k9w3ygxmzivd1jsnc"))))
2306 (build-system python-build-system)
2307 (arguments
2308 `(#:phases
2309 (modify-phases %standard-phases
2310 (add-after 'unpack 'fix-paths
2311 (lambda* (#:key inputs #:allow-other-keys)
2312 (let ((glibc (assoc-ref inputs ,(if (%current-target-system)
2313 "cross-libc" "libc"))))
2314 (substitute* "click/_unicodefun.py"
2315 (("'locale'")
2316 (string-append "'" glibc "/bin/locale'"))))
2317 #t)))))
2318 (native-inputs
2319 `(("python-setuptools" ,python-setuptools)))
2320 (home-page "http://click.pocoo.org")
2321 (synopsis "Command line library for Python")
2322 (description
2323 "Click is a Python package for creating command line interfaces in a
2324 composable way with as little code as necessary. Its name stands for
2325 \"Command Line Interface Creation Kit\". It's highly configurable but comes
2326 with sensible defaults out of the box.")
2327 (license license:bsd-3)))
2328
2329 (define-public python2-click
2330 (package-with-python2 python-click))
2331
2332 (define-public python-wheel
2333 (package
2334 (name "python-wheel")
2335 (version "0.29.0")
2336 (source
2337 (origin
2338 (method url-fetch)
2339 (uri (pypi-uri "wheel" version))
2340 (sha256
2341 (base32
2342 "0j0n38hg1jvrmyy68f9ikvzq1gs9g0sx4ws7maf8wi3bwbbqmfqy"))))
2343 (build-system python-build-system)
2344 (native-inputs
2345 `(("python-setuptools" ,python-setuptools)
2346 ("python-jsonschema" ,python-jsonschema)
2347 ("python-pytest-cov" ,python-pytest-cov)))
2348 (home-page "https://bitbucket.org/pypa/wheel/")
2349 (synopsis "Format for built Python packages")
2350 (description
2351 "A wheel is a ZIP-format archive with a specially formatted filename and
2352 the @code{.whl} extension. It is designed to contain all the files for a PEP
2353 376 compatible install in a way that is very close to the on-disk format. Many
2354 packages will be properly installed with only the @code{Unpack} step and the
2355 unpacked archive preserves enough information to @code{Spread} (copy data and
2356 scripts to their final locations) at any later time. Wheel files can be
2357 installed with a newer @code{pip} or with wheel's own command line utility.")
2358 (license license:expat)
2359 (properties `((python2-variant . ,(delay python2-wheel))))))
2360
2361 (define-public python2-wheel
2362 (let ((wheel (package-with-python2
2363 (strip-python2-variant python-wheel))))
2364 (package (inherit wheel)
2365 (native-inputs `(("python2-functools32" ,python2-functools32)
2366 ,@(package-native-inputs wheel))))))
2367
2368
2369 (define-public python-requests
2370 (package
2371 (name "python-requests")
2372 (version "2.9.1")
2373 (source (origin
2374 (method url-fetch)
2375 (uri (pypi-uri "requests" version))
2376 (sha256
2377 (base32
2378 "0zsqrzlybf25xscgi7ja4s48y2abf9wvjkn47wh984qgs1fq2xy5"))))
2379 (build-system python-build-system)
2380 (native-inputs
2381 `(("python-setuptools" ,python-setuptools)
2382 ("python-py" ,python-py)
2383 ("python-pytest" ,python-pytest)
2384 ("python-pytest-cov" ,python-pytest-cov)
2385 ("python-wheel" ,python-wheel)))
2386 (home-page "http://python-requests.org/")
2387 (synopsis "Python HTTP library")
2388 (description
2389 "Requests is a Python HTTP client library. It aims to be easier to use
2390 than Python’s urllib2 library.")
2391 (license license:asl2.0)))
2392
2393 ;; Some software requires an older version of Requests, notably Docker
2394 ;; Compose.
2395 (define-public python-requests-2.7
2396 (package (inherit python-requests)
2397 (version "2.7.0")
2398 (source (origin
2399 (method url-fetch)
2400 (uri (pypi-uri "requests" version))
2401 (sha256
2402 (base32
2403 "0gdr9dxm24amxpbyqpbh3lbwxc2i42hnqv50sigx568qssv3v2ir"))))))
2404
2405 (define-public python2-requests
2406 (package-with-python2 python-requests))
2407
2408 (define-public python-vcversioner
2409 (package
2410 (name "python-vcversioner")
2411 (version "2.14.0.0")
2412 (source
2413 (origin
2414 (method url-fetch)
2415 (uri (pypi-uri "vcversioner" version))
2416 (sha256
2417 (base32
2418 "11ivq1bm7v0yb4nsfbv9m7g7lyjn112gbvpjnjz8nv1fx633dm5c"))))
2419 (build-system python-build-system)
2420 (inputs
2421 `(("python-setuptools" ,python-setuptools)))
2422 (synopsis "Python library for version number discovery")
2423 (description "Vcversioner is a Python library that inspects tagging
2424 information in a variety of version control systems in order to discover
2425 version numbers.")
2426 (home-page "https://github.com/habnabit/vcversioner")
2427 (license license:isc)))
2428
2429 (define-public python2-vcversioner
2430 (package-with-python2 python-vcversioner))
2431
2432 (define-public python-jsonschema
2433 (package
2434 (name "python-jsonschema")
2435 (version "2.5.1")
2436 (source (origin
2437 (method url-fetch)
2438 (uri
2439 (string-append
2440 "https://pypi.python.org/packages/source/j/jsonschema/jsonschema-"
2441 version ".tar.gz"))
2442 (sha256
2443 (base32
2444 "0hddbqjm4jq63y8jf44nswina1crjs16l9snb6m3vvgyg31klrrn"))))
2445 (build-system python-build-system)
2446 (inputs
2447 `(("python-setuptools" ,python-setuptools)
2448 ("python-vcversioner" ,python-vcversioner)))
2449 (home-page "http://github.com/Julian/jsonschema")
2450 (synopsis "Implementation of JSON Schema for Python")
2451 (description
2452 "Jsonschema is an implementation of JSON Schema for Python.")
2453 (license license:expat)
2454 (properties `((python2-variant . ,(delay python2-jsonschema))))))
2455
2456 (define-public python2-jsonschema
2457 (let ((jsonschema (package-with-python2
2458 (strip-python2-variant python-jsonschema))))
2459 (package (inherit jsonschema)
2460 (inputs
2461 `(("python2-functools32" ,python2-functools32)
2462 ,@(package-inputs jsonschema))))))
2463
2464 (define-public python-unidecode
2465 (package
2466 (name "python-unidecode")
2467 (version "0.04.18")
2468 (source (origin
2469 (method url-fetch)
2470 (uri (pypi-uri "Unidecode" version))
2471 (sha256
2472 (base32
2473 "12hhblqy1ajvidm38im4171x4arg83pfmziyn53nizp29p3m14gi"))))
2474 (build-system python-build-system)
2475 (inputs
2476 `(("python-setuptools" ,python-setuptools)))
2477 (home-page "https://pypi.python.org/pypi/Unidecode")
2478 (synopsis "ASCII transliterations of Unicode text")
2479 (description
2480 "Unidecode provides ASCII transliterations of Unicode text. Unidecode is
2481 useful when integrating with legacy code that doesn't support Unicode, or for
2482 ease of entry of non-Roman names on a US keyboard, or when constructing ASCII
2483 machine identifiers from human-readable Unicode strings that should still be
2484 somewhat intelligeble.")
2485 (license license:gpl2+)))
2486
2487 (define-public python2-unidecode
2488 (package-with-python2 python-unidecode))
2489
2490 (define-public python-pyjwt
2491 (package
2492 (name "python-pyjwt")
2493 (version "1.4.0")
2494 (source
2495 (origin
2496 (method url-fetch)
2497 (uri (pypi-uri "PyJWT" version))
2498 (sha256
2499 (base32
2500 "1556v2jppd8mjkkj66pxb5rcazm35jq81r233mdl8hfmz9n3icp1"))))
2501 (build-system python-build-system)
2502 (native-inputs
2503 `(("python-setuptools" ,python-setuptools)
2504 ("python-pytest-runner" ,python-pytest-runner)))
2505 (arguments
2506 '(#:tests? #f)) ; test suite doesn't work
2507 (home-page "http://github.com/progrium/pyjwt")
2508 (synopsis "JSON Web Token implementation in Python")
2509 (description
2510 "PyJWT is a JSON Web Token implementation written in Python.")
2511 (license license:expat)))
2512
2513 (define-public python2-pyjwt
2514 (package-with-python2 python-pyjwt))
2515
2516 (define-public python-oauthlib
2517 (package
2518 (name "python-oauthlib")
2519 (version "1.0.3")
2520 (source (origin
2521 (method url-fetch)
2522 (uri (pypi-uri "oauthlib" version))
2523 (sha256
2524 (base32
2525 "1bfrj70vdjxjw74khbyh6f0dksv7p5rh2346jnlrffyacd3gwjzg"))))
2526 (build-system python-build-system)
2527 (native-inputs
2528 `(("python-coverage" ,python-coverage)
2529 ("python-nose" ,python-nose)
2530 ("python-mock" ,python-mock)))
2531 (inputs
2532 `(("python-blinker" ,python-blinker)
2533 ("python-cryptography" ,python-cryptography)
2534 ("python-pyjwt" ,python-pyjwt)))
2535 (home-page "https://github.com/idan/oauthlib")
2536 (synopsis "OAuth implementation for Python")
2537 (description
2538 "Oauthlib is a generic, spec-compliant, thorough implementation of the
2539 OAuth request-signing logic.")
2540 (license license:bsd-3)
2541 (properties `((python2-variant . ,(delay python2-oauthlib))))))
2542
2543 (define-public python2-oauthlib
2544 (let ((base (package-with-python2 (strip-python2-variant python-oauthlib))))
2545 (package
2546 (inherit base)
2547 (native-inputs `(("python2-setuptools" ,python2-setuptools)
2548 ("python2-unittest2" ,python2-unittest2)
2549 ,@(package-native-inputs base))))))
2550
2551 (define-public python-itsdangerous
2552 (package
2553 (name "python-itsdangerous")
2554 (version "0.24")
2555 (source
2556 (origin
2557 (method url-fetch)
2558 (uri (string-append
2559 "https://pypi.python.org/packages/source/i/itsdangerous/itsdangerous-"
2560 version ".tar.gz"))
2561 (sha256
2562 (base32
2563 "06856q6x675ly542ig0plbqcyab6ksfzijlyf1hzhgg3sgwgrcyb"))))
2564 (build-system python-build-system)
2565 (home-page "http://github.com/mitsuhiko/itsdangerous")
2566 (synopsis "Python library for passing data to/from untrusted environments")
2567 (description
2568 "Itsdangerous provides various helpers to pass trusted data to untrusted
2569 environments and back.")
2570 (license license:bsd-3)
2571 (properties `((python2-variant . ,(delay python2-itsdangerous))))))
2572
2573 (define-public python2-itsdangerous
2574 (let ((base (package-with-python2
2575 (strip-python2-variant python-itsdangerous))))
2576 (package
2577 (inherit base)
2578 (native-inputs `(("python2-setuptools" ,python2-setuptools)
2579 ,@(package-native-inputs base))))))
2580
2581 (define-public python-pyyaml
2582 (package
2583 (name "python-pyyaml")
2584 (version "3.11")
2585 (source
2586 (origin
2587 (method url-fetch)
2588 (uri (string-append
2589 "https://pypi.python.org/packages/source/P/PyYAML/PyYAML-"
2590 version ".tar.gz"))
2591 (sha256
2592 (base32
2593 "1s26125vfnskng58ym37xhwv8v0mm95b2cwbjfag8prfhy596v63"))))
2594 (build-system python-build-system)
2595 (inputs
2596 `(("libyaml" ,libyaml)))
2597 (native-inputs
2598 `(("python-setuptools" ,python-setuptools)))
2599 (home-page "http://pyyaml.org/wiki/PyYAML")
2600 (synopsis "YAML parser and emitter for Python")
2601 (description
2602 "PyYAML is a YAML parser and emitter for Python. PyYAML features a
2603 complete YAML 1.1 parser, Unicode support, pickle support, capable extension
2604 API, and sensible error messages. PyYAML supports standard YAML tags and
2605 provides Python-specific tags that allow to represent an arbitrary Python
2606 object.")
2607 (license license:expat)))
2608
2609 (define-public python2-pyyaml
2610 (package-with-python2 python-pyyaml))
2611
2612 (define-public python-virtualenv
2613 (package
2614 (name "python-virtualenv")
2615 (version "15.0.3")
2616 (source
2617 (origin
2618 (method url-fetch)
2619 (uri (pypi-uri "virtualenv" version))
2620 (sha256
2621 (base32
2622 "07cbajzk8l05k5zhlw0b9wbf2is65bl9v6zrn2a0iyn57w6pd73d"))))
2623 (build-system python-build-system)
2624 (arguments
2625 `(#:phases
2626 (modify-phases %standard-phases
2627 (replace 'check
2628 (lambda _
2629 ;; Disable failing test. See upstream bug report
2630 ;; https://github.com/pypa/virtualenv/issues/957
2631 (substitute* "tests/test_virtualenv.py"
2632 (("skipif.*") "skipif(True, reason=\"Guix\")\n"))
2633 (zero? (system* "py.test")))))))
2634 (inputs
2635 `(("python-setuptools" ,python-setuptools)
2636 ("python-mock" ,python-mock)
2637 ("python-pytest" ,python-pytest)))
2638 (home-page "https://virtualenv.pypa.io/")
2639 (synopsis "Virtual Python environment builder")
2640 (description
2641 "Virtualenv is a tool to create isolated Python environments.")
2642 (license license:expat)))
2643
2644 (define-public python2-virtualenv
2645 (package-with-python2 python-virtualenv))
2646
2647 (define-public python-markupsafe
2648 (package
2649 (name "python-markupsafe")
2650 (version "0.23")
2651 (source
2652 (origin
2653 (method url-fetch)
2654 (uri (string-append
2655 "https://pypi.python.org/packages/source/M/MarkupSafe/MarkupSafe-"
2656 version ".tar.gz"))
2657 (sha256
2658 (base32
2659 "1hvip33wva3fnmvfp9x5klqri7hpl1hkgqmjbss18nmrb7zimv54"))))
2660 (build-system python-build-system)
2661 (inputs
2662 `(("python-setuptools" ,python-setuptools)))
2663 (home-page "http://github.com/mitsuhiko/markupsafe")
2664 (synopsis "XML/HTML/XHTML markup safe string implementation for Python")
2665 (description
2666 "Markupsafe provides an XML/HTML/XHTML markup safe string implementation
2667 for Python.")
2668 (license license:bsd-3)))
2669
2670 (define-public python2-markupsafe
2671 (package-with-python2 python-markupsafe))
2672
2673 (define-public python-jinja2
2674 (package
2675 (name "python-jinja2")
2676 (version "2.8")
2677 (source
2678 (origin
2679 (method url-fetch)
2680 (uri (pypi-uri "Jinja2" version))
2681 (sha256
2682 (base32
2683 "1x0v41lp5m1pjix3l46zx02b7lqp2hflgpnxwkywxynvi3zz47xw"))))
2684 (build-system python-build-system)
2685 (inputs
2686 `(("python-setuptools" ,python-setuptools)
2687 ("python-markupsafe" ,python-markupsafe)))
2688 (home-page "http://jinja.pocoo.org/")
2689 (synopsis "Python template engine")
2690 (description
2691 "Jinja2 is a small but fast and easy to use stand-alone template engine
2692 written in pure Python.")
2693 (license license:bsd-3)))
2694
2695 (define-public python2-jinja2
2696 (package-with-python2 python-jinja2))
2697
2698 (define-public python-pystache
2699 (package
2700 (name "python-pystache")
2701 (version "0.5.4")
2702 (source (origin
2703 (method url-fetch)
2704 (uri (pypi-uri "pystache" version))
2705 (sha256
2706 (base32
2707 "0nmqsfmiw4arjxqkmf9z66ml950pcdjk6aq4gin4sywmzdjw5fzp"))))
2708 (build-system python-build-system)
2709 (native-inputs
2710 `(("python-setuptools" ,python-setuptools)))
2711 (home-page "http://defunkt.io/pystache/")
2712 (synopsis "Python logic-less template engine")
2713 (description
2714 "Pystache is a Python implementation of the framework agnostic,
2715 logic-free templating system Mustache.")
2716 (license license:expat)))
2717
2718 (define-public python2-pystache
2719 (package-with-python2 python-pystache))
2720
2721 (define-public python-joblib
2722 (package
2723 (name "python-joblib")
2724 (version "0.9.0b4")
2725 (source (origin
2726 (method url-fetch)
2727 (uri (string-append "https://pypi.python.org/packages/source/"
2728 "j/joblib/joblib-" version ".tar.gz"))
2729 (sha256
2730 (base32
2731 "1dvw3f8jgj6h0fxkghbgyclvdzc7l0ig7n0vis70awb5kczb9bs3"))))
2732 (build-system python-build-system)
2733 (native-inputs
2734 `(("python-setuptools" ,python-setuptools)
2735 ("python-nose" ,python-nose)))
2736 (home-page "http://pythonhosted.org/joblib/")
2737 (synopsis "Using Python functions as pipeline jobs")
2738 (description
2739 "Joblib is a set of tools to provide lightweight pipelining in Python.
2740 In particular, joblib offers: transparent disk-caching of the output values
2741 and lazy re-evaluation (memoize pattern), easy simple parallel computing
2742 logging and tracing of the execution.")
2743 (license license:bsd-3)))
2744
2745 (define-public python2-joblib
2746 (package-with-python2 python-joblib))
2747
2748 (define-public python-docutils
2749 (package
2750 (name "python-docutils")
2751 (version "0.12")
2752 (source
2753 (origin
2754 (method url-fetch)
2755 (uri (string-append
2756 "https://pypi.python.org/packages/source/d/docutils/docutils-"
2757 version ".tar.gz"))
2758 (sha256
2759 (base32
2760 "1ylnjnw1x4b2y7blr6x35ncdzn69k253kw4cdkv6asdb21w73ny7"))))
2761 (build-system python-build-system)
2762 (inputs
2763 `(("python-setuptools" ,python-setuptools)))
2764 (arguments
2765 '(#:tests? #f)) ; no setup.py test command
2766 (home-page "http://docutils.sourceforge.net/")
2767 (synopsis "Python Documentation Utilities")
2768 (description
2769 "Docutils is a modular system for processing documentation into useful
2770 formats, such as HTML, XML, and LaTeX. For input Docutils supports
2771 reStructuredText.")
2772 ;; Most of the source code is public domain, but some source files are
2773 ;; licensed under the PFSL, BSD 2-clause, and GPLv3+ licenses.
2774 (license (list license:public-domain license:psfl license:bsd-2 license:gpl3+))))
2775
2776 (define-public python2-docutils
2777 (package-with-python2 python-docutils))
2778
2779 (define-public python-pygments
2780 (package
2781 (name "python-pygments")
2782 (version "2.0.2")
2783 (source
2784 (origin
2785 (method url-fetch)
2786 (uri (pypi-uri "Pygments" version))
2787 (sha256
2788 (base32
2789 "0lagrwifsgn0s8bzqahpr87p7gd38xja8f06akscinp6hj89283k"))))
2790 (build-system python-build-system)
2791 (inputs
2792 `(("python-setuptools" ,python-setuptools)))
2793 (home-page "http://pygments.org/")
2794 (synopsis "Syntax highlighting")
2795 (description
2796 "Pygments is a syntax highlighting package written in Python.")
2797 (license license:bsd-2)))
2798
2799 (define-public python2-pygments
2800 (package-with-python2 python-pygments))
2801
2802 (define-public python-sphinx
2803 (package
2804 (name "python-sphinx")
2805 (version "1.2.3")
2806 (source
2807 (origin
2808 (method url-fetch)
2809 (uri (string-append
2810 "https://pypi.python.org/packages/source/S/Sphinx/Sphinx-"
2811 version ".tar.gz"))
2812 (sha256
2813 (base32
2814 "011xizm3jnmf4cvs5i6kgf6c5nn046h79i8j0vd0f27yw9j3p4wl"))))
2815 (build-system python-build-system)
2816 (inputs
2817 `(("python-setuptools" ,python-setuptools)
2818 ("python-jinja2" ,python-jinja2)
2819 ("python-docutils" ,python-docutils)
2820 ("python-pygments" ,python-pygments)))
2821 (home-page "http://sphinx-doc.org/")
2822 (synopsis "Python documentation generator")
2823 (description "Sphinx is a tool that makes it easy to create documentation
2824 for Python projects or other documents consisting of multiple reStructuredText
2825 sources.")
2826 (license license:bsd-3)))
2827
2828 (define-public python2-sphinx
2829 (package-with-python2 python-sphinx))
2830
2831 (define-public python-sphinx-rtd-theme
2832 (package
2833 (name "python-sphinx-rtd-theme")
2834 (version "0.1.6")
2835 (source
2836 (origin
2837 (method url-fetch)
2838 (uri (string-append "https://pypi.python.org/packages/source/s/"
2839 "sphinx_rtd_theme/sphinx_rtd_theme-"
2840 version ".tar.gz"))
2841 (sha256
2842 (base32
2843 "19nw3rn7awplcdrz63kg1njqwkbymfg9lwn7l2grhdyhyr2gaa8g"))))
2844 (build-system python-build-system)
2845 (arguments
2846 `(;; With standard flags, the install phase attempts to create a zip'd
2847 ;; egg file, and fails with an error: 'ZIP does not support timestamps
2848 ;; before 1980'
2849 #:configure-flags '("--single-version-externally-managed"
2850 "--record=sphinx-rtd-theme.txt")))
2851 (native-inputs
2852 `(("python-setuptools" ,python-setuptools)))
2853 (inputs
2854 `(("python-docutils" ,python-docutils)
2855 ("python-sphinx" ,python-sphinx)))
2856 (home-page "https://github.com/snide/sphinx_rtd_theme/")
2857 (synopsis "ReadTheDocs.org theme for Sphinx")
2858 (description "A theme for Sphinx used by ReadTheDocs.org.")
2859 (license license:expat)))
2860
2861 (define-public python2-sphinx-rtd-theme
2862 (package-with-python2 python-sphinx-rtd-theme))
2863
2864 (define-public python-feedgenerator
2865 (package
2866 (name "python-feedgenerator")
2867 (version "1.8")
2868 (source
2869 (origin
2870 (method url-fetch)
2871 (uri (pypi-uri "feedgenerator" version))
2872 (sha256
2873 (base32
2874 "0mkimp1fpdan4p3882vzcws4l594k71ich4g0wq97jbra7p602n0"))))
2875 (build-system python-build-system)
2876 (native-inputs
2877 `(("python-setuptools" ,python-setuptools)
2878 ("python-pytz" ,python-pytz)
2879 ("python-six" ,python-six)))
2880 (home-page "https://github.com/getpelican/feedgenerator")
2881 (synopsis
2882 "Standalone version of Django's Atom/RSS feed generator")
2883 (description
2884 "Feedgenerator-py3k is a standalone version of Django's feedgenerator,
2885 which can produce feeds in RSS 2.0, RSS 0.91, and Atom formats.")
2886 (license license:bsd-3)))
2887
2888 (define-public python2-feedgenerator
2889 (package-with-python2 python-feedgenerator))
2890
2891 (define-public python-blinker
2892 (package
2893 (name "python-blinker")
2894 (version "1.4")
2895 (source
2896 (origin
2897 (method url-fetch)
2898 (uri (pypi-uri "blinker" version))
2899 (sha256
2900 (base32
2901 "1dpq0vb01p36jjwbhhd08ylvrnyvcc82yxx3mwjx6awrycjyw6j7"))))
2902 (build-system python-build-system)
2903 (native-inputs
2904 `(("python-setuptools" ,python-setuptools)))
2905 ;; No "test" command supplied to setuptools, so unless there's another way
2906 ;; to run tests, we're skipping them!
2907 (arguments '(#:tests? #f))
2908 (home-page "http://pythonhosted.org/blinker/")
2909 (synopsis "Fast, simple object-to-object and broadcast signaling")
2910 (description
2911 "Blinker provides a fast dispatching system that allows any number of
2912 interested parties to subscribe to events, or \"signals\".")
2913 (license license:expat)))
2914
2915 (define-public python2-blinker
2916 (package-with-python2 python-blinker))
2917
2918 (define-public pelican
2919 (package
2920 (name "pelican")
2921 (version "3.6.3")
2922 (source
2923 (origin
2924 (method url-fetch)
2925 (uri (pypi-uri "pelican" version))
2926 (sha256
2927 (base32
2928 "1hn94rb4q3zmcq16in055xikal4dba5hfx3zznq7warllcgc9f8k"))))
2929 (build-system python-build-system)
2930 (inputs
2931 `(("python-feedgenerator" ,python-feedgenerator)
2932 ("python-jinja2" ,python-jinja2)
2933 ("python-pygments" ,python-pygments)
2934 ("python-docutils" ,python-docutils)
2935 ("python-pytz" ,python-pytz)
2936 ("python-blinker" ,python-blinker)
2937 ("python-unidecode" ,python-unidecode)
2938 ("python-six" ,python-six)
2939 ("python-dateutil-2" ,python-dateutil-2)))
2940 (home-page "http://getpelican.com/")
2941 (arguments
2942 `(;; XXX Requires a lot more packages to do unit tests :P
2943 #:tests? #f
2944 #:phases (modify-phases %standard-phases
2945 (add-before
2946 'install 'adjust-requires
2947 ;; Since feedgenerator is installed from git, it doesn't
2948 ;; conform to the version requirements.
2949 ;;
2950 ;; We *do have* "feedgenerator >= 1.6", but strip off the
2951 ;; version requirement so setuptools doesn't get confused.
2952 (lambda _
2953 (substitute* "setup.py"
2954 (("['\"]feedgenerator.*?['\"]")
2955 "'feedgenerator'")))))))
2956 (synopsis "Python-based static site publishing system")
2957 (description
2958 "Pelican is a tool to generate a static blog from reStructuredText,
2959 Markdown input files, and more. Pelican uses Jinja2 for templating
2960 and is very extensible.")
2961 (license license:agpl3+)))
2962
2963 (define-public python-scikit-learn
2964 (package
2965 (name "python-scikit-learn")
2966 (version "0.16.1")
2967 (source
2968 (origin
2969 (method url-fetch)
2970 (uri (string-append
2971 "https://github.com/scikit-learn/scikit-learn/archive/"
2972 version ".tar.gz"))
2973 (file-name (string-append name "-" version ".tar.gz"))
2974 (sha256
2975 (base32
2976 "140skabifgc7lvvj873pnzlwx0ni6q8qkrsyad2ccjb3h8rxzkih"))))
2977 (build-system python-build-system)
2978 (arguments
2979 `(#:phases
2980 (alist-cons-before
2981 'check 'set-HOME
2982 ;; some tests require access to "$HOME"
2983 (lambda _ (setenv "HOME" "/tmp"))
2984 ;; Tests can only be run after the library has been installed and not
2985 ;; within the source directory.
2986 (alist-cons-after
2987 'install 'check
2988 (lambda _
2989 (with-directory-excursion "/tmp"
2990 ;; With Python 3 one test of 3334 fails
2991 ;; (sklearn.tests.test_common.test_transformers); see
2992 ;; https://github.com/scikit-learn/scikit-learn/issues/3693
2993 (system* "nosetests" "-v" "sklearn")))
2994 (alist-delete 'check %standard-phases)))))
2995 (inputs
2996 `(("openblas" ,openblas)
2997 ("python-nose" ,python-nose)))
2998 (propagated-inputs
2999 `(("python-numpy" ,python-numpy)
3000 ("python-scipy" ,python-scipy)))
3001 (home-page "http://scikit-learn.org/")
3002 (synopsis "Machine Learning in Python")
3003 (description
3004 "Scikit-learn provides simple and efficient tools for data
3005 mining and data analysis.")
3006 (license license:bsd-3)
3007 (properties `((python2-variant . ,(delay python2-scikit-learn))))))
3008
3009 (define-public python2-scikit-learn
3010 (package-with-python2 (strip-python2-variant python-scikit-learn)))
3011
3012 (define-public python-scikit-image
3013 (package
3014 (name "python-scikit-image")
3015 (version "0.11.3")
3016 (source
3017 (origin
3018 (method url-fetch)
3019 (uri (string-append
3020 "https://pypi.python.org/packages/source/s/scikit-image/scikit-image-"
3021 version ".tar.gz"))
3022 (sha256
3023 (base32 "0jz416fqvpahqyffw8plmszzfj669w8wvf3y9clnr5lr6a7md3kn"))))
3024 (build-system python-build-system)
3025 (propagated-inputs
3026 `(("python-matplotlib" ,python-matplotlib)
3027 ("python-networkx" ,python-networkx)
3028 ("python-numpy" ,python-numpy)
3029 ("python-scipy" ,python-scipy)
3030 ("python-six" ,python-six)
3031 ("python-pillow" ,python-pillow)))
3032 (native-inputs
3033 `(("python-cython" ,python-cython)
3034 ("python-setuptools" ,python-setuptools)))
3035 (home-page "http://scikit-image.org/")
3036 (synopsis "Image processing in Python")
3037 (description
3038 "Scikit-image is a collection of algorithms for image processing.")
3039 (license license:bsd-3)
3040 (properties `((python2-variant . ,(delay python2-scikit-image))))))
3041
3042 (define-public python2-scikit-image
3043 (let ((scikit-image (package-with-python2
3044 (strip-python2-variant python-scikit-image))))
3045 (package (inherit scikit-image)
3046 (native-inputs
3047 `(("python2-mock" ,python2-mock)
3048 ,@(package-native-inputs scikit-image)))
3049 (propagated-inputs
3050 `(("python2-pytz" ,python2-pytz)
3051 ,@(package-propagated-inputs scikit-image))))))
3052
3053 (define-public python-redis
3054 (package
3055 (name "python-redis")
3056 (version "2.10.3")
3057 (source
3058 (origin
3059 (method url-fetch)
3060 (uri (string-append
3061 "https://pypi.python.org/packages/source/r/redis/redis-"
3062 version ".tar.gz"))
3063 (sha256
3064 (base32 "1701qjwn4n05q90fdg4bsg96s27xf5s4hsb4gxhv3xk052q3gyx4"))))
3065 (build-system python-build-system)
3066 ;; Tests require a running Redis server
3067 (arguments '(#:tests? #f))
3068 (native-inputs
3069 `(("python-setuptools" ,python-setuptools)
3070 ("python-pytest" ,python-pytest)))
3071 (home-page "https://github.com/andymccurdy/redis-py")
3072 (synopsis "Redis Python client")
3073 (description
3074 "This package provides a Python interface to the Redis key-value store.")
3075 (license license:expat)))
3076
3077 (define-public python2-redis
3078 (package-with-python2 python-redis))
3079
3080 (define-public python-rq
3081 (package
3082 (name "python-rq")
3083 (version "0.5.2")
3084 (source
3085 (origin
3086 (method url-fetch)
3087 (uri (string-append
3088 "https://pypi.python.org/packages/source/r/rq/rq-"
3089 version ".tar.gz"))
3090 (sha256
3091 (base32 "0b0z5hn8wkfg300hx7816csgv3bcfamlr29fi3yzgqmpqxwj3fix"))))
3092 (build-system python-build-system)
3093 (propagated-inputs
3094 `(("python-click" ,python-click)
3095 ("python-redis" ,python-redis)))
3096 (native-inputs
3097 `(("python-setuptools" ,python-setuptools)))
3098 (home-page "http://python-rq.org/")
3099 (synopsis "Simple job queues for Python")
3100 (description
3101 "RQ (Redis Queue) is a simple Python library for queueing jobs and
3102 processing them in the background with workers. It is backed by Redis and it
3103 is designed to have a low barrier to entry.")
3104 (license license:bsd-2)))
3105
3106 (define-public python2-rq
3107 (package-with-python2 python-rq))
3108
3109 (define-public python-cython
3110 (package
3111 (name "python-cython")
3112 (version "0.24.1")
3113 (source
3114 (origin
3115 (method url-fetch)
3116 (uri (pypi-uri "Cython" version))
3117 (sha256
3118 (base32
3119 "1fg7fmpvfcq9md4ncyqnnylyjy4z3ksdrshzis95g1sh03d8z044"))))
3120 (build-system python-build-system)
3121 ;; we need the full python package and not just the python-wrapper
3122 ;; because we need libpython3.3m.so
3123 (inputs
3124 `(("python" ,python)))
3125 (arguments
3126 `(#:phases
3127 (modify-phases %standard-phases
3128 (add-before 'check 'set-HOME
3129 ;; some tests require access to "$HOME/.cython"
3130 (lambda _ (setenv "HOME" "/tmp")))
3131 (replace 'check
3132 (lambda _ (zero? (system* "python" "runtests.py" "-vv")))))))
3133 (home-page "http://cython.org/")
3134 (synopsis "C extensions for Python")
3135 (description "Cython is an optimising static compiler for both the Python
3136 programming language and the extended Cython programming language. It makes
3137 writing C extensions for Python as easy as Python itself.")
3138 (license license:asl2.0)
3139 (properties `((python2-variant . ,(delay python2-cython))))))
3140
3141 (define-public python2-cython
3142 (package (inherit (package-with-python2
3143 (strip-python2-variant python-cython)))
3144 (name "python2-cython")
3145 (inputs
3146 `(("python-2" ,python-2))))) ; this is not automatically changed
3147
3148 ;; This version of numpy is missing the documentation and is only used to
3149 ;; build matplotlib which is required to build numpy's documentation.
3150 (define python-numpy-bootstrap
3151 (package
3152 (name "python-numpy-bootstrap")
3153 (version "1.10.4")
3154 (source
3155 (origin
3156 (method url-fetch)
3157 (uri (string-append "mirror://sourceforge/numpy/NumPy/" version
3158 "/numpy-" version ".tar.gz"))
3159 (sha256
3160 (base32
3161 "1bjjhvncraka5s6i4lg644jrxij6bvycxy7an20gcz3a0m11iygp"))))
3162 (build-system python-build-system)
3163 (inputs
3164 `(("python-nose" ,python-nose)
3165 ("openblas" ,openblas)
3166 ("lapack" ,lapack)))
3167 (native-inputs
3168 `(("gfortran" ,gfortran)))
3169 (arguments
3170 `(#:phases
3171 (alist-cons-before
3172 'build 'set-environment-variables
3173 (lambda* (#:key inputs #:allow-other-keys)
3174 (call-with-output-file "site.cfg"
3175 (lambda (port)
3176 (format port
3177 "[openblas]
3178 libraries = openblas
3179 library_dirs = ~a/lib
3180 include_dirs = ~a/include
3181
3182 [lapack]
3183 lapack_libs = lapack
3184 library_dirs = ~a/lib
3185 include_dirs = ~a/include
3186 "
3187 (assoc-ref inputs "openblas")
3188 (assoc-ref inputs "openblas")
3189 (assoc-ref inputs "lapack")
3190 (assoc-ref inputs "lapack"))))
3191 ;; Use "gcc" executable, not "cc".
3192 (substitute* "numpy/distutils/system_info.py"
3193 (("c = distutils\\.ccompiler\\.new_compiler\\(\\)")
3194 "c = distutils.ccompiler.new_compiler(); c.set_executables(compiler='gcc',compiler_so='gcc',linker_exe='gcc',linker_so='gcc -shared')"))
3195 #t)
3196 ;; Tests can only be run after the library has been installed and not
3197 ;; within the source directory.
3198 (alist-cons-after
3199 'install 'check
3200 (lambda _
3201 (with-directory-excursion "/tmp"
3202 (zero? (system* "python" "-c"
3203 "import numpy; numpy.test(verbose=2)"))))
3204 (alist-delete
3205 'check
3206 %standard-phases)))))
3207 (home-page "http://www.numpy.org/")
3208 (synopsis "Fundamental package for scientific computing with Python")
3209 (description "NumPy is the fundamental package for scientific computing
3210 with Python. It contains among other things: a powerful N-dimensional array
3211 object, sophisticated (broadcasting) functions, tools for integrating C/C++
3212 and Fortran code, useful linear algebra, Fourier transform, and random number
3213 capabilities.")
3214 (license license:bsd-3)))
3215
3216 (define python2-numpy-bootstrap
3217 (package-with-python2 python-numpy-bootstrap))
3218
3219 (define-public python2-fastlmm
3220 (package
3221 (name "python2-fastlmm")
3222 (version "0.2.21")
3223 (source
3224 (origin
3225 (method url-fetch)
3226 (uri (pypi-uri "fastlmm" version ".zip"))
3227 (sha256
3228 (base32
3229 "1q8c34rpmwkfy3r4d5172pzdkpfryj561897z9r3x22gq7813x1m"))))
3230 (build-system python-build-system)
3231 (arguments
3232 `(#:python ,python-2)) ; only Python 2.7 is supported
3233 (propagated-inputs
3234 `(("python2-numpy" ,python2-numpy)
3235 ("python2-scipy" ,python2-scipy)
3236 ("python2-matplotlib" ,python2-matplotlib)
3237 ("python2-pandas" ,python2-pandas)
3238 ("python2-scikit-learn" ,python2-scikit-learn)
3239 ("python2-cython" ,python2-cython)
3240 ("python2-pysnptools" ,python2-pysnptools)))
3241 (native-inputs
3242 `(("unzip" ,unzip)
3243 ("python2-mock" ,python2-mock)
3244 ("python2-setuptools" ,python2-setuptools)))
3245 (home-page "http://research.microsoft.com/en-us/um/redmond/projects/mscompbio/fastlmm/")
3246 (synopsis "Perform genome-wide association studies on large data sets")
3247 (description
3248 "FaST-LMM, which stands for Factored Spectrally Transformed Linear Mixed
3249 Models, is a program for performing both single-SNP and SNP-set genome-wide
3250 association studies (GWAS) on extremely large data sets.")
3251 (license license:asl2.0)))
3252
3253 (define-public python-numpy
3254 (package (inherit python-numpy-bootstrap)
3255 (name "python-numpy")
3256 (outputs '("out" "doc"))
3257 (inputs
3258 `(("which" ,which)
3259 ("python-setuptools" ,python-setuptools)
3260 ("python-matplotlib" ,python-matplotlib)
3261 ("python-sphinx" ,python-sphinx)
3262 ("python-pyparsing" ,python-pyparsing)
3263 ("python-numpydoc" ,python-numpydoc)
3264 ,@(package-inputs python-numpy-bootstrap)))
3265 (native-inputs
3266 `(("pkg-config" ,pkg-config)
3267 ("texlive" ,texlive)
3268 ("texinfo" ,texinfo)
3269 ("perl" ,perl)
3270 ,@(package-native-inputs python-numpy-bootstrap)))
3271 (arguments
3272 `(,@(substitute-keyword-arguments
3273 (package-arguments python-numpy-bootstrap)
3274 ((#:phases phases)
3275 `(alist-cons-after
3276 'install 'install-doc
3277 (lambda* (#:key outputs #:allow-other-keys)
3278 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
3279 (doc (string-append
3280 data "/doc/" ,name "-"
3281 ,(package-version python-numpy-bootstrap)))
3282 (info (string-append data "/info"))
3283 (html (string-append doc "/html"))
3284 (pyver ,(string-append "PYVER=")))
3285 (with-directory-excursion "doc"
3286 (mkdir-p html)
3287 (system* "make" "html" pyver)
3288 (system* "make" "latex" "PAPER=a4" pyver)
3289 (system* "make" "-C" "build/latex"
3290 "all-pdf" "PAPER=a4" pyver)
3291 ;; FIXME: Generation of the info file fails.
3292 ;; (system* "make" "info" pyver)
3293 ;; (mkdir-p info)
3294 ;; (copy-file "build/texinfo/numpy.info"
3295 ;; (string-append info "/numpy.info"))
3296 (for-each (lambda (file)
3297 (copy-file (string-append "build/latex" file)
3298 (string-append doc file)))
3299 '("/numpy-ref.pdf" "/numpy-user.pdf"))
3300 (with-directory-excursion "build/html"
3301 (for-each (lambda (file)
3302 (let* ((dir (dirname file))
3303 (tgt-dir (string-append html "/" dir)))
3304 (unless (equal? "." dir)
3305 (mkdir-p tgt-dir))
3306 (install-file file html)))
3307 (find-files "." ".*"))))))
3308 ,phases)))))))
3309
3310 (define-public python2-numpy
3311 (package-with-python2 python-numpy))
3312
3313 (define-public python-pyparsing
3314 (package
3315 (name "python-pyparsing")
3316 (version "2.0.3")
3317 (source
3318 (origin
3319 (method url-fetch)
3320 (uri (string-append "mirror://sourceforge/pyparsing/pyparsing"
3321 "/pyparsing-" version
3322 "/pyparsing-" version ".tar.gz"))
3323 (sha256
3324 (base32
3325 "0kw4py7gn45j93q8r7bzajfrjdc3xlsn2yzln41lf9zmrghjkrq6"))))
3326 (build-system python-build-system)
3327 (outputs '("out" "doc"))
3328 (arguments
3329 `(#:tests? #f ; no test target
3330 #:modules ((guix build python-build-system)
3331 (guix build utils))
3332 #:phases
3333 (alist-cons-after
3334 'install 'install-doc
3335 (lambda* (#:key outputs #:allow-other-keys)
3336 (let* ((doc (string-append (assoc-ref outputs "doc")
3337 "/share/doc/" ,name "-" ,version))
3338 (html-doc (string-append doc "/html"))
3339 (examples (string-append doc "/examples")))
3340 (mkdir-p html-doc)
3341 (mkdir-p examples)
3342 (for-each
3343 (lambda (dir tgt)
3344 (map (lambda (file)
3345 (install-file file tgt))
3346 (find-files dir ".*")))
3347 (list "docs" "htmldoc" "examples")
3348 (list doc html-doc examples))))
3349 %standard-phases)))
3350 (home-page "http://pyparsing.wikispaces.com")
3351 (synopsis "Python parsing class library")
3352 (description
3353 "The pyparsing module is an alternative approach to creating and
3354 executing simple grammars, vs. the traditional lex/yacc approach, or the use
3355 of regular expressions. The pyparsing module provides a library of classes
3356 that client code uses to construct the grammar directly in Python code.")
3357 (license license:expat)))
3358
3359 (define-public python2-pyparsing
3360 (package-with-python2 python-pyparsing))
3361
3362 (define-public python-numpydoc
3363 (package
3364 (name "python-numpydoc")
3365 (version "0.5")
3366 (source
3367 (origin
3368 (method url-fetch)
3369 (uri (string-append
3370 "https://pypi.python.org/packages/source/n/numpydoc/numpydoc-"
3371 version ".tar.gz"))
3372 (sha256
3373 (base32
3374 "0d4dnifaxkll50jx6czj05y8cb4ny60njd2wz299sj2jxfy51w4k"))
3375 (modules '((guix build utils)))
3376 (snippet
3377 '(begin
3378 ;; Drop a test requiring matplotlib, which we cannot add as an
3379 ;; input since it would create a circular dependency: Extend the
3380 ;; test for Python 3, where it is already dropped, to Python 2.
3381 (substitute* "numpydoc/tests/test_plot_directive.py"
3382 (("3") "2"))))))
3383 (build-system python-build-system)
3384 (inputs
3385 `(("python-setuptools" ,python-setuptools)
3386 ("python-docutils" ,python-docutils)
3387 ("python-sphinx" ,python-sphinx)
3388 ("python-nose" ,python-nose)))
3389 (home-page "https://pypi.python.org/pypi/numpydoc")
3390 (synopsis
3391 "Numpy's Sphinx extensions")
3392 (description
3393 "Sphinx extension to support docstrings in Numpy format.")
3394 (license license:bsd-2)))
3395
3396 (define-public python2-numpydoc
3397 (package-with-python2 python-numpydoc))
3398
3399 (define-public python-numexpr
3400 (package
3401 (name "python-numexpr")
3402 (version "2.6.0")
3403 (source
3404 (origin
3405 (method url-fetch)
3406 (uri (pypi-uri "numexpr" version))
3407 (sha256
3408 (base32
3409 "0i6iagl2hhbr8q4qzbbjd859v5806vqylq87fq7pi914ps6d6cag"))))
3410 (build-system python-build-system)
3411 (arguments `(#:tests? #f)) ; no tests included
3412 (propagated-inputs
3413 `(("python-numpy" ,python-numpy)))
3414 (home-page "https://github.com/pydata/numexpr")
3415 (synopsis "Fast numerical expression evaluator for NumPy")
3416 (description
3417 "Numexpr is a fast numerical expression evaluator for NumPy. With it,
3418 expressions that operate on arrays are accelerated and use less memory than
3419 doing the same calculation in Python. In addition, its multi-threaded
3420 capabilities can make use of all your cores, which may accelerate
3421 computations, most specially if they are not memory-bounded (e.g. those using
3422 transcendental functions).")
3423 (license license:expat)
3424 (properties `((python2-variant . ,(delay python2-numexpr))))))
3425
3426 (define-public python2-numexpr
3427 (package-with-python2 (strip-python2-variant python-numexpr)))
3428
3429 (define-public python-matplotlib
3430 (package
3431 (name "python-matplotlib")
3432 (version "1.4.3")
3433 (source
3434 (origin
3435 (method url-fetch)
3436 (uri (string-append "mirror://sourceforge/matplotlib/matplotlib"
3437 "/matplotlib-" version
3438 "/matplotlib-" version ".tar.gz"))
3439 (sha256
3440 (base32
3441 "1dn05cvd0g984lzhh72wa0z93psgwshbbg93fkab6slx5m3l95av"))
3442 (patches (search-patches "matplotlib-setupext-tk.patch"))))
3443 (build-system python-build-system)
3444 (outputs '("out" "doc"))
3445 (propagated-inputs ; the following packages are all needed at run time
3446 `(("python-pyparsing" ,python-pyparsing)
3447 ("python-pygobject" ,python-pygobject)
3448 ("gobject-introspection" ,gobject-introspection)
3449 ("python-tkinter" ,python "tk")
3450 ;; The 'gtk+' package (and 'gdk-pixbuf', 'atk' and 'pango' propagated
3451 ;; from 'gtk+') provides the required 'typelib' files used by
3452 ;; 'gobject-introspection'. The location of these files is set with the
3453 ;; help of the environment variable GI_TYPELIB_PATH. At build time this
3454 ;; is done automatically by a 'native-search-path' procedure. However,
3455 ;; at run-time the user must set this variable as follows:
3456 ;;
3457 ;; export GI_TYPELIB_PATH=~/.guix-profile/lib/girepository-1.0
3458 ("gtk+" ,gtk+)
3459 ;; From version 1.4.0 'matplotlib' makes use of 'cairocffi' instead of
3460 ;; 'pycairo'. However, 'pygobject' makes use of a 'pycairo' 'context'
3461 ;; object. For this reason we need to import both libraries.
3462 ;; https://pythonhosted.org/cairocffi/cffi_api.html#converting-pycairo
3463 ("python-pycairo" ,python-pycairo)
3464 ("python-cairocffi" ,python-cairocffi)))
3465 (inputs
3466 `(("python-setuptools" ,python-setuptools)
3467 ("python-dateutil" ,python-dateutil-2)
3468 ("python-six" ,python-six)
3469 ("python-pytz" ,python-pytz)
3470 ("python-numpy" ,python-numpy-bootstrap)
3471 ("python-sphinx" ,python-sphinx)
3472 ("python-numpydoc" ,python-numpydoc)
3473 ("python-nose" ,python-nose)
3474 ("python-mock" ,python-mock)
3475 ("libpng" ,libpng)
3476 ("imagemagick" ,imagemagick)
3477 ("freetype" ,freetype)
3478 ("cairo" ,cairo)
3479 ("glib" ,glib)
3480 ("python-pillow" ,python-pillow)
3481 ;; FIXME: Add backends when available.
3482 ;("python-wxpython" ,python-wxpython)
3483 ;("python-pyqt" ,python-pyqt)
3484 ("tcl" ,tcl)
3485 ("tk" ,tk)))
3486 (native-inputs
3487 `(("pkg-config" ,pkg-config)
3488 ("texlive" ,texlive)
3489 ("texinfo" ,texinfo)))
3490 (arguments
3491 `(#:phases
3492 (alist-cons-before
3493 'build 'configure-environment
3494 (lambda* (#:key outputs inputs #:allow-other-keys)
3495 (let ((cairo (assoc-ref inputs "cairo"))
3496 (gtk+ (assoc-ref inputs "gtk+")))
3497 ;; Setting these directories in the 'basedirlist' of 'setup.cfg'
3498 ;; has not effect.
3499 (setenv "LD_LIBRARY_PATH"
3500 (string-append cairo "/lib:" gtk+ "/lib"))
3501 (setenv "HOME" (getcwd))
3502 (call-with-output-file "setup.cfg"
3503 (lambda (port)
3504 (format port "[directories]~%
3505 basedirlist = ~a,~a~%
3506 [rc_options]~%
3507 backend = TkAgg~%"
3508 (assoc-ref inputs "tcl")
3509 (assoc-ref inputs "tk"))))))
3510 (alist-cons-after
3511 'install 'install-doc
3512 (lambda* (#:key outputs #:allow-other-keys)
3513 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
3514 (doc (string-append data "/doc/" ,name "-" ,version))
3515 (info (string-append data "/info"))
3516 (html (string-append doc "/html")))
3517 (with-directory-excursion "doc"
3518 ;; Produce pdf in 'A4' format.
3519 (substitute* (find-files "." "conf\\.py")
3520 (("latex_paper_size = 'letter'")
3521 "latex_paper_size = 'a4'"))
3522 (mkdir-p html)
3523 (mkdir-p info)
3524 ;; The doc recommends to run the 'html' target twice.
3525 (system* "python" "make.py" "html")
3526 (system* "python" "make.py" "html")
3527 (copy-recursively "build/html" html)
3528 (system* "python" "make.py" "latex")
3529 (system* "python" "make.py" "texinfo")
3530 (symlink (string-append html "/_images")
3531 (string-append info "/matplotlib-figures"))
3532 (with-directory-excursion "build/texinfo"
3533 (substitute* "matplotlib.texi"
3534 (("@image\\{([^,]*)" all file)
3535 (string-append "@image{matplotlib-figures/" file)))
3536 (symlink (string-append html "/_images")
3537 "./matplotlib-figures")
3538 (system* "makeinfo" "--no-split"
3539 "-o" "matplotlib.info" "matplotlib.texi"))
3540 (copy-file "build/texinfo/matplotlib.info"
3541 (string-append info "/matplotlib.info"))
3542 (copy-file "build/latex/Matplotlib.pdf"
3543 (string-append doc "/Matplotlib.pdf")))))
3544 %standard-phases))))
3545 (home-page "http://matplotlib.org")
3546 (synopsis "2D plotting library for Python")
3547 (description
3548 "Matplotlib is a Python 2D plotting library which produces publication
3549 quality figures in a variety of hardcopy formats and interactive environments
3550 across platforms. Matplotlib can be used in Python scripts, the python and
3551 ipython shell, web application servers, and six graphical user interface
3552 toolkits.")
3553 (license license:psfl)
3554 (properties `((python2-variant . ,(delay python2-matplotlib))))))
3555
3556 (define-public python2-matplotlib
3557 (let ((matplotlib (package-with-python2
3558 (strip-python2-variant python-matplotlib))))
3559 (package (inherit matplotlib)
3560 ;; Make sure to use special packages for Python 2 instead
3561 ;; of those automatically rewritten by package-with-python2.
3562 (propagated-inputs
3563 `(("python2-pycairo" ,python2-pycairo)
3564 ("python2-pygobject-2" ,python2-pygobject-2)
3565 ("python2-tkinter" ,python-2 "tk")
3566 ,@(fold alist-delete (package-propagated-inputs matplotlib)
3567 '("python-pycairo" "python-pygobject" "python-tkinter")))))))
3568
3569 (define-public python2-pysnptools
3570 (package
3571 (name "python2-pysnptools")
3572 (version "0.3.9")
3573 (source
3574 (origin
3575 (method url-fetch)
3576 (uri (pypi-uri "pysnptools" version ".zip"))
3577 (sha256
3578 (base32
3579 "1wybggjzz8zw7aav4pjsg2h22xp17a1lghrprza1pxwlm7wf96y2"))))
3580 (build-system python-build-system)
3581 (arguments
3582 `(#:python ,python-2)) ; only Python 2.7 is supported
3583 (propagated-inputs
3584 `(("python2-numpy" ,python2-numpy)
3585 ("python2-scipy" ,python2-scipy)
3586 ("python2-pytz" ,python2-pytz)
3587 ("python2-cython" ,python2-cython)))
3588 (inputs
3589 `(("python2-dateutil-2" ,python2-dateutil-2)
3590 ("python2-pandas" ,python2-pandas)
3591 ("python2-six" ,python2-six)))
3592 (native-inputs
3593 `(("unzip" ,unzip)
3594 ("python2-setuptools" ,python2-setuptools)))
3595 (home-page "http://research.microsoft.com/en-us/um/redmond/projects/mscompbio/")
3596 (synopsis "Library for reading and manipulating genetic data")
3597 (description
3598 "PySnpTools is a library for reading and manipulating genetic data. It
3599 can, for example, efficiently read whole PLINK *.bed/bim/fam files or parts of
3600 those files. It can also efficiently manipulate ranges of integers using set
3601 operators such as union, intersection, and difference.")
3602 (license license:asl2.0)))
3603
3604 (define-public python-rpy2
3605 (package
3606 (name "python-rpy2")
3607 (version "2.7.6")
3608 (source
3609 (origin
3610 (method url-fetch)
3611 (uri (pypi-uri "rpy2" version))
3612 (sha256
3613 (base32
3614 "0nhan2qvrw7b7gg5zddwa22kybdv3x1g26vkd7q8lvnkgzrs4dga"))))
3615 (build-system python-build-system)
3616 (inputs
3617 `(("python-six" ,python-six)
3618 ("readline" ,readline)
3619 ("icu4c" ,icu4c)
3620 ("pcre" ,pcre)
3621 ("r" ,r)))
3622 (native-inputs
3623 `(("python-setuptools" ,python-setuptools)
3624 ("zlib" ,zlib)))
3625 (home-page "http://rpy.sourceforge.net/")
3626 (synopsis "Python interface to the R language")
3627 (description "rpy2 is a redesign and rewrite of rpy. It is providing a
3628 low-level interface to R from Python, a proposed high-level interface,
3629 including wrappers to graphical libraries, as well as R-like structures and
3630 functions.")
3631 (license license:gpl3+)))
3632
3633 (define-public python2-rpy2
3634 (let ((rpy2 (package-with-python2 python-rpy2)))
3635 (package (inherit rpy2)
3636 (native-inputs
3637 `(("python2-singledispatch" ,python2-singledispatch)
3638 ,@(package-native-inputs rpy2))))))
3639
3640 (define-public python-scipy
3641 (package
3642 (name "python-scipy")
3643 (version "0.16.0")
3644 (source
3645 (origin
3646 (method url-fetch)
3647 ; http://downloads.sourceforge.net/project/scipy/scipy/0.16.1/scipy-0.16.1.tar.gz
3648 (uri (string-append "mirror://sourceforge/scipy/scipy/" version
3649 "/scipy-" version ".tar.xz"))
3650 (sha256
3651 (base32
3652 "0wa0a4skpda3gx7lb12yn19nhbairlyxrvda2lz2bcawk3x5qzz2"))))
3653 (build-system python-build-system)
3654 (propagated-inputs
3655 `(("python-numpy" ,python-numpy)
3656 ("python-matplotlib" ,python-matplotlib)
3657 ("python-pyparsing" ,python-pyparsing)))
3658 (inputs
3659 `(("lapack" ,lapack)
3660 ("openblas" ,openblas)))
3661 (native-inputs
3662 `(("python-nose" ,python-nose)
3663 ("python-sphinx" ,python-sphinx)
3664 ("python-numpydoc" ,python-numpydoc)
3665 ("gfortran" ,gfortran)
3666 ("texlive" ,texlive)
3667 ("perl" ,perl)))
3668 (outputs '("out" "doc"))
3669 (arguments
3670 `(#:phases
3671 (alist-cons-before
3672 'build 'configure-openblas
3673 (lambda* (#:key inputs #:allow-other-keys)
3674 (call-with-output-file "site.cfg"
3675 (lambda (port)
3676 (format port
3677 "[blas]
3678 libraries = openblas
3679 library_dirs = ~a/lib
3680 include_dirs = ~a/include
3681 [atlas]
3682 library_dirs = ~a/lib
3683 atlas_libs = openblas
3684 "
3685 (assoc-ref inputs "openblas")
3686 (assoc-ref inputs "openblas")
3687 (assoc-ref inputs "openblas"))))
3688 #t)
3689 (alist-cons-after
3690 'install 'install-doc
3691 (lambda* (#:key outputs #:allow-other-keys)
3692 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
3693 (doc (string-append data "/doc/" ,name "-" ,version))
3694 (html (string-append doc "/html"))
3695 (pyver ,(string-append "PYVER=")))
3696 (with-directory-excursion "doc"
3697 ;; Fix generation of images for mathematical expressions.
3698 (substitute* (find-files "source" "conf\\.py")
3699 (("pngmath_use_preview = True")
3700 "pngmath_use_preview = False"))
3701 (mkdir-p html)
3702 (system* "make" "html" pyver)
3703 (system* "make" "latex" "PAPER=a4" pyver)
3704 (system* "make" "-C" "build/latex" "all-pdf" "PAPER=a4" pyver)
3705 (copy-file "build/latex/scipy-ref.pdf"
3706 (string-append doc "/scipy-ref.pdf"))
3707 (with-directory-excursion "build/html"
3708 (for-each (lambda (file)
3709 (let* ((dir (dirname file))
3710 (tgt-dir (string-append html "/" dir)))
3711 (install-file file html)))
3712 (find-files "." ".*"))))))
3713 ;; Tests can only be run after the library has been installed and not
3714 ;; within the source directory.
3715 (alist-cons-after
3716 'install 'check
3717 (lambda _
3718 (with-directory-excursion "/tmp"
3719 (zero? (system* "python" "-c" "import scipy; scipy.test()"))))
3720 (alist-delete
3721 'check
3722 (alist-cons-after
3723 'unpack 'fix-tests
3724 (lambda _
3725 (substitute* "scipy/integrate/tests/test_quadpack.py"
3726 (("libm.so") "libm.so.6"))
3727 #t)
3728 %standard-phases)))))))
3729 (home-page "http://www.scipy.org/")
3730 (synopsis "The Scipy library provides efficient numerical routines")
3731 (description "The SciPy library is one of the core packages that make up
3732 the SciPy stack. It provides many user-friendly and efficient numerical
3733 routines such as routines for numerical integration and optimization.")
3734 (license license:bsd-3)))
3735
3736 (define-public python2-scipy
3737 (package-with-python2 python-scipy))
3738
3739 (define-public python-sqlalchemy
3740 (package
3741 (name "python-sqlalchemy")
3742 (version "1.0.12")
3743 (source
3744 (origin
3745 (method url-fetch)
3746 (uri (string-append "https://pypi.python.org/packages/source/S/"
3747 "SQLAlchemy/SQLAlchemy-" version ".tar.gz"))
3748 (sha256
3749 (base32
3750 "1l8qclhd0s90w3pvwhi5mjxdwr5j7gw7cjka2fx6f2vqmq7f4yb6"))))
3751 (build-system python-build-system)
3752 (native-inputs
3753 `(("python-cython" ,python-cython) ;for c extensions
3754 ("python-pytest" ,python-pytest)
3755 ("python-mock" ,python-mock))) ;for tests
3756 (arguments
3757 `(#:phases (alist-replace
3758 'check
3759 (lambda _ (zero? (system* "py.test")))
3760 %standard-phases)))
3761 (home-page "http://www.sqlalchemy.org")
3762 (synopsis "Database abstraction library")
3763 (description
3764 "SQLAlchemy is the Python SQL toolkit and Object Relational Mapper that
3765 gives application developers the full power and flexibility of SQL. It
3766 provides a full suite of well known enterprise-level persistence patterns,
3767 designed for efficient and high-performing database access, adapted into a
3768 simple and Pythonic domain language.")
3769 (license license:x11)))
3770
3771 (define-public python2-sqlalchemy
3772 (package-with-python2 python-sqlalchemy))
3773
3774 (define-public python-sqlalchemy-utils
3775 (package
3776 (name "python-sqlalchemy-utils")
3777 (version "0.32.9")
3778 (source
3779 (origin
3780 (method url-fetch)
3781 (uri (pypi-uri "SQLAlchemy-Utils" version))
3782 (sha256
3783 (base32
3784 "1zbmmh7n8m01ikizn2mj1mfwch26nsr1awv9mvskqry7av0mpy98"))))
3785 (build-system python-build-system)
3786 (inputs
3787 `(("python-six" ,python-six)
3788 ("python-sqlalchemy" ,python-sqlalchemy)))
3789 (home-page "https://github.com/kvesteri/sqlalchemy-utils")
3790 (synopsis "Various utility functions for SQLAlchemy")
3791 (description
3792 "SQLAlchemy-utils provides various utility functions and custom data types
3793 for SQLAlchemy. SQLAlchemy is an SQL database abstraction library for Python.")
3794 (properties `((python2-variant . ,(delay python2-sqlalchemy-utils))))
3795 (license license:bsd-3)))
3796
3797 (define-public python2-sqlalchemy-utils
3798 (let ((base (package-with-python2
3799 (strip-python2-variant python-sqlalchemy-utils))))
3800 (package (inherit base)
3801 (native-inputs
3802 `(("python2-setuptools" ,python2-setuptools)
3803 ,@(package-native-inputs base))))))
3804
3805 (define-public python-alembic
3806 (package
3807 (name "python-alembic")
3808 (version "0.8.7")
3809 (source
3810 (origin
3811 (method url-fetch)
3812 (uri (pypi-uri "alembic" version))
3813 (sha256
3814 (base32
3815 "0ias6fdzwr2s220fnjspkdgm9510bd0cnap0hx5y4zy4srba9f3z"))))
3816 (build-system python-build-system)
3817 (native-inputs
3818 `(("python-mock" ,python-mock)
3819 ("python-pytest-cov" ,python-pytest-cov)))
3820 (propagated-inputs
3821 `(("python-sqlalchemy" ,python-sqlalchemy)
3822 ("python-mako" ,python-mako)
3823 ("python-editor" ,python-editor)))
3824 (home-page "http://bitbucket.org/zzzeek/alembic")
3825 (synopsis
3826 "Database migration tool for SQLAlchemy")
3827 (description
3828 "Alembic is a lightweight database migration tool for usage with the
3829 SQLAlchemy Database Toolkit for Python.")
3830 (license license:expat)
3831 (properties `((python2-variant . ,(delay python2-alembic))))))
3832
3833 (define-public python2-alembic
3834 (let ((alembic (package-with-python2
3835 (strip-python2-variant python-alembic))))
3836 (package
3837 (inherit alembic)
3838 (native-inputs `(("python2-setuptools" ,python2-setuptools)
3839 ,@(package-native-inputs alembic))))))
3840
3841 (define-public python-distutils-extra
3842 (package
3843 (name "python-distutils-extra")
3844 (version "2.38")
3845 (source
3846 (origin
3847 (method url-fetch)
3848 (uri (string-append "https://launchpad.net/python-distutils-extra/trunk/"
3849 version "/+download/python-distutils-extra-"
3850 version ".tar.gz"))
3851 (sha256
3852 (base32
3853 "0lx15kcbby9zisx33p2h5hgakgwh2bvh0ibag8z0px4j6ifhs41x"))))
3854 (build-system python-build-system)
3855 (native-inputs
3856 `(("python-setuptools" ,python-setuptools)))
3857 (home-page "https://launchpad.net/python-distutils-extra/")
3858 (synopsis "Enhancements to Python's distutils")
3859 (description
3860 "The python-distutils-extra module enables you to easily integrate
3861 gettext support, themed icons, and scrollkeeper-based documentation into
3862 Python's distutils.")
3863 (license license:gpl2)))
3864
3865 (define-public python2-distutils-extra
3866 (package-with-python2 python-distutils-extra))
3867
3868 (define-public python2-elib.intl
3869 (package
3870 (name "python2-elib.intl")
3871 (version "0.0.3")
3872 (source
3873 (origin
3874 ;; This project doesn't tag releases or publish tarballs, so we take
3875 ;; source from a (semi-arbitrary, i.e. latest as of now) git commit.
3876 (method git-fetch)
3877 (uri (git-reference
3878 (url "https://github.com/dieterv/elib.intl.git")
3879 (commit "d09997cfef")))
3880 (sha256
3881 (base32
3882 "0y7vzff9xgbnaay7m0va1arl6g68ncwrvbgwl7jqlclsahzzb09d"))))
3883 (build-system python-build-system)
3884 (native-inputs
3885 `(("python2-setuptools" ,python2-setuptools)))
3886 (arguments
3887 ;; incompatible with Python 3 (exception syntax)
3888 `(#:python ,python-2
3889 #:tests? #f
3890 ;; With standard flags, the install phase attempts to create a zip'd
3891 ;; egg file, and fails with an error: 'ZIP does not support timestamps
3892 ;; before 1980'
3893 #:configure-flags '("--single-version-externally-managed"
3894 "--record=elib.txt")))
3895 (home-page "https://github.com/dieterv/elib.intl")
3896 (synopsis "Enhanced internationalization for Python")
3897 (description
3898 "The elib.intl module provides enhanced internationalization (I18N)
3899 services for your Python modules and applications.")
3900 (license license:lgpl3+)))
3901
3902 (define-public python-pillow
3903 (package
3904 (name "python-pillow")
3905 (version "3.3.1")
3906 (source
3907 (origin
3908 (method url-fetch)
3909 (uri (pypi-uri "Pillow" version))
3910 (sha256
3911 (base32
3912 "1w9x3dfrg8b5lqhpjl0fczfyf9842wbqwgxbjjq4vfpxv5jwm49l"))))
3913 (build-system python-build-system)
3914 (native-inputs
3915 `(("python-setuptools" ,python-setuptools)
3916 ("python-nose" ,python-nose)))
3917 (inputs
3918 `(("freetype" ,freetype)
3919 ("lcms" ,lcms)
3920 ("zlib" ,zlib)
3921 ("libjpeg" ,libjpeg)
3922 ("openjpeg" ,openjpeg)
3923 ("libtiff" ,libtiff)
3924 ("libwebp" ,libwebp)))
3925 (propagated-inputs
3926 `(;; Used at runtime for pkg_resources
3927 ("python-setuptools" ,python-setuptools)))
3928 (arguments
3929 `(#:phases (modify-phases %standard-phases
3930 (add-before
3931 'install 'disable-egg-compression
3932 (lambda _
3933 ;; Leave the .egg uncompressed since compressing it would
3934 ;; prevent the GC from identifying run-time dependencies.
3935 ;; See <http://bugs.gnu.org/20765>.
3936 (let ((port (open-file "setup.cfg" "a")))
3937 (display "\n[easy_install]\nzip_ok = 0\n"
3938 port)
3939 (close-port port)
3940 #t)))
3941 (add-after
3942 'install 'check-installed
3943 (lambda _
3944 (begin
3945 (setenv "HOME" (getcwd))
3946 (and (zero? (system* "python" "selftest.py"
3947 "--installed"))
3948 (zero? (system* "python" "test-installed.py"))))))
3949 (delete 'check))))
3950 (home-page "https://pypi.python.org/pypi/Pillow")
3951 (synopsis "Fork of the Python Imaging Library")
3952 (description
3953 "The Python Imaging Library adds image processing capabilities to your
3954 Python interpreter. This library provides extensive file format support, an
3955 efficient internal representation, and fairly powerful image processing
3956 capabilities. The core image library is designed for fast access to data
3957 stored in a few basic pixel formats. It should provide a solid foundation for
3958 a general image processing tool.")
3959 (license (license:x11-style
3960 "http://www.pythonware.com/products/pil/license.htm"
3961 "The PIL Software License"))))
3962
3963 (define-public python2-pillow
3964 (package-with-python2 python-pillow))
3965
3966 (define-public python-pycparser
3967 (package
3968 (name "python-pycparser")
3969 (version "2.14")
3970 (source
3971 (origin
3972 (method url-fetch)
3973 (uri (pypi-uri "pycparser" version))
3974 (sha256
3975 (base32
3976 "0wvzyb6rxsfj3xcnpa4ynbh9qc7rrbk2277d5wqpphmx9akv8nbr"))))
3977 (outputs '("out" "doc"))
3978 (build-system python-build-system)
3979 (native-inputs
3980 `(("pkg-config" ,pkg-config)
3981 ("python-setuptools" ,python-setuptools)))
3982 (arguments
3983 `(#:phases
3984 (alist-replace
3985 'check
3986 (lambda _
3987 (with-directory-excursion "tests"
3988 (zero? (system* "python" "all_tests.py"))))
3989 (alist-cons-after
3990 'install 'install-doc
3991 (lambda* (#:key outputs #:allow-other-keys)
3992 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
3993 (doc (string-append data "/doc/" ,name "-" ,version))
3994 (examples (string-append doc "/examples")))
3995 (mkdir-p examples)
3996 (for-each (lambda (file)
3997 (copy-file (string-append "." file)
3998 (string-append doc file)))
3999 '("/README.rst" "/CHANGES" "/LICENSE"))
4000 (copy-recursively "examples" examples)))
4001 %standard-phases))))
4002 (home-page "https://github.com/eliben/pycparser")
4003 (synopsis "C parser in Python")
4004 (description
4005 "Pycparser is a complete parser of the C language, written in pure Python
4006 using the PLY parsing library. It parses C code into an AST and can serve as
4007 a front-end for C compilers or analysis tools.")
4008 (license license:bsd-3)))
4009
4010 (define-public python2-pycparser
4011 (package-with-python2 python-pycparser))
4012
4013 (define-public python-cffi
4014 (package
4015 (name "python-cffi")
4016 (version "1.4.2")
4017 (source
4018 (origin
4019 (method url-fetch)
4020 (uri (pypi-uri "cffi" version))
4021 (sha256
4022 (base32 "161rj52rzi3880lij17d6i9kvgkiwjilrqjs8405k8sf6ryif7cg"))))
4023 (build-system python-build-system)
4024 (outputs '("out" "doc"))
4025 (inputs
4026 `(("libffi" ,libffi)))
4027 (propagated-inputs ; required at run-time
4028 `(("python-pycparser" ,python-pycparser)))
4029 (native-inputs
4030 `(("pkg-config" ,pkg-config)
4031 ("python-sphinx" ,python-sphinx)
4032 ("python-pytest" ,python-pytest)
4033 ("python-setuptools" ,python-setuptools)))
4034 (arguments
4035 `(#:phases
4036 (alist-cons-after
4037 'install 'install-doc
4038 (lambda* (#:key outputs #:allow-other-keys)
4039 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4040 (doc (string-append data "/doc/" ,name "-" ,version))
4041 (html (string-append doc "/html")))
4042 (with-directory-excursion "doc"
4043 (system* "make" "html")
4044 (mkdir-p html)
4045 (copy-recursively "build/html" html))
4046 (copy-file "LICENSE" (string-append doc "/LICENSE"))))
4047 %standard-phases)))
4048 (home-page "http://cffi.readthedocs.org")
4049 (synopsis "Foreign function interface for Python")
4050 (description
4051 "Foreign Function Interface for Python calling C code.")
4052 (license license:expat)))
4053
4054 (define-public python2-cffi
4055 (package-with-python2 python-cffi))
4056
4057 (define-public python-xcffib
4058 (package
4059 (name "python-xcffib")
4060 (version "0.1.9")
4061 (source
4062 (origin
4063 (method url-fetch)
4064 (uri (string-append "https://pypi.python.org/packages/source/x/"
4065 "xcffib/xcffib-" version ".tar.gz"))
4066 (sha256
4067 (base32
4068 "0655hzxv57h1a9ja9kwp0ichbkhf3djw32k33d66xp0q37dq2y81"))))
4069 (build-system python-build-system)
4070 (inputs
4071 `(("libxcb" ,libxcb)
4072 ("python-six" ,python-six)))
4073 (native-inputs
4074 `(("python-setuptools" ,python-setuptools)))
4075 (propagated-inputs
4076 `(("python-cffi" ,python-cffi))) ; used at run time
4077 (arguments
4078 `(#:phases
4079 (alist-cons-after
4080 'install 'install-doc
4081 (lambda* (#:key outputs #:allow-other-keys)
4082 (let ((doc (string-append (assoc-ref outputs "out") "/share"
4083 "/doc/" ,name "-" ,version)))
4084 (mkdir-p doc)
4085 (copy-file "README.md"
4086 (string-append doc "/README.md"))))
4087 %standard-phases)))
4088 (home-page "https://github.com/tych0/xcffib")
4089 (synopsis "XCB Python bindings")
4090 (description
4091 "Xcffib is a replacement for xpyb, an XCB Python bindings. It adds
4092 support for Python 3 and PyPy. It is based on cffi.")
4093 (license license:expat)))
4094
4095 (define-public python2-xcffib
4096 (package-with-python2 python-xcffib))
4097
4098 (define-public python-cairocffi
4099 (package
4100 (name "python-cairocffi")
4101 (version "0.6")
4102 (source
4103 (origin
4104 (method url-fetch)
4105 ;; The archive on pypi is missing the 'utils' directory!
4106 (uri (string-append "https://github.com/SimonSapin/cairocffi/archive/v"
4107 version ".tar.gz"))
4108 (file-name (string-append name "-" version ".tar.gz"))
4109 (sha256
4110 (base32
4111 "03w5p62sp3nqiccx864sbq0jvh7946277jqx3rcc3dch5xwfvv51"))))
4112 (build-system python-build-system)
4113 (outputs '("out" "doc"))
4114 (inputs
4115 `(("gdk-pixbuf" ,gdk-pixbuf)
4116 ("cairo" ,cairo)))
4117 (native-inputs
4118 `(("pkg-config" ,pkg-config)
4119 ("python-sphinx" ,python-sphinx)
4120 ("python-docutils" ,python-docutils)
4121 ("python-setuptools" ,python-setuptools)))
4122 (propagated-inputs
4123 `(("python-xcffib" ,python-xcffib))) ; used at run time
4124 (arguments
4125 `(#:phases
4126 (alist-cons-after
4127 'install 'install-doc
4128 (lambda* (#:key inputs outputs #:allow-other-keys)
4129 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4130 (doc (string-append data "/doc/" ,name "-" ,version))
4131 (html (string-append doc "/html")))
4132 (setenv "LD_LIBRARY_PATH"
4133 (string-append (assoc-ref inputs "cairo") "/lib" ":"
4134 (assoc-ref inputs "gdk-pixbuf") "/lib"))
4135 (setenv "LANG" "en_US.UTF-8")
4136 (mkdir-p html)
4137 (for-each (lambda (file)
4138 (copy-file (string-append "." file)
4139 (string-append doc file)))
4140 '("/README.rst" "/CHANGES" "/LICENSE"))
4141 (system* "python" "setup.py" "build_sphinx")
4142 (copy-recursively "docs/_build/html" html)))
4143 %standard-phases)))
4144 (home-page "https://github.com/SimonSapin/cairocffi")
4145 (synopsis "Python bindings and object-oriented API for Cairo")
4146 (description
4147 "Cairocffi is a CFFI-based drop-in replacement for Pycairo, a set of
4148 Python bindings and object-oriented API for cairo. Cairo is a 2D vector
4149 graphics library with support for multiple backends including image buffers,
4150 PNG, PostScript, PDF, and SVG file output.")
4151 (license license:bsd-3)))
4152
4153 (define-public python2-cairocffi
4154 (package-with-python2 python-cairocffi))
4155
4156 (define-public python-decorator
4157 (package
4158 (name "python-decorator")
4159 (version "4.0.9")
4160 (source
4161 (origin
4162 (method url-fetch)
4163 (uri (pypi-uri "decorator" version))
4164 (sha256
4165 (base32 "1a5vwhflfd9sh3rfb40xlyipldgdzfff6brman57hqv3661jw0lh"))))
4166 (build-system python-build-system)
4167 (arguments '(#:tests? #f)) ; no test target
4168 (native-inputs
4169 `(("python-setuptools" ,python-setuptools)))
4170 (home-page "https://pypi.python.org/pypi/decorator/")
4171 (synopsis "Python module to simplify usage of decorators")
4172 (description
4173 "The aim of the decorator module is to simplify the usage of decorators
4174 for the average programmer, and to popularize decorators usage giving examples
4175 of useful decorators, such as memoize, tracing, redirecting_stdout, locked,
4176 etc. The core of this module is a decorator factory.")
4177 (license license:expat)))
4178
4179 (define-public python2-decorator
4180 (package-with-python2 python-decorator))
4181
4182 (define-public python-drmaa
4183 (package
4184 (name "python-drmaa")
4185 (version "0.7.6")
4186 (source
4187 (origin
4188 (method url-fetch)
4189 (uri (string-append
4190 "https://pypi.python.org/packages/source/d/drmaa/drmaa-"
4191 version ".tar.gz"))
4192 (sha256
4193 (base32 "0bzl9f9g34dlhwf09i3fdv7dqqzf2iq0w7d6c2bafx1nlap8qfbh"))))
4194 (build-system python-build-system)
4195 ;; The test suite requires libdrmaa which is provided by the cluster
4196 ;; environment. At runtime the environment variable DRMAA_LIBRARY_PATH
4197 ;; should be set to the path of the libdrmaa library.
4198 (arguments '(#:tests? #f))
4199 (native-inputs
4200 `(("python-nose" ,python-nose)
4201 ("python-setuptools" ,python-setuptools)))
4202 (home-page "https://pypi.python.org/pypi/drmaa")
4203 (synopsis "Python bindings for the DRMAA library")
4204 (description
4205 "A Python package for Distributed Resource Management (DRM) job
4206 submission and control. This package is an implementation of the DRMAA 1.0
4207 Python language binding specification.")
4208 (license license:bsd-3)))
4209
4210 (define-public python2-drmaa
4211 (package-with-python2 python-drmaa))
4212
4213 (define-public python-gridmap
4214 (package
4215 (name "python-gridmap")
4216 (version "0.13.0")
4217 (source
4218 (origin
4219 (method url-fetch)
4220 (uri (string-append
4221 "https://github.com/pygridtools/gridmap/archive/v"
4222 version ".tar.gz"))
4223 (file-name (string-append name "-" version ".tar.gz"))
4224 (sha256
4225 (base32 "1gzjg2k6f14i1msm2b0ax8d9ds1hvk6qd5nlaivg8m4cxqp4cp1x"))))
4226 (build-system python-build-system)
4227 (inputs
4228 `(("python-psutil" ,python-psutil)
4229 ("python-drmaa" ,python-drmaa)
4230 ("python-pyzmq" ,python-pyzmq)))
4231 (native-inputs
4232 `(("python-setuptools" ,python-setuptools)))
4233 (home-page "https://github.com/pygridtools/gridmap")
4234 (synopsis "Create jobs on a cluster directly from Python")
4235 (description
4236 "Gridmap is a Python package to allow you to easily create jobs on the
4237 cluster directly from Python. You can directly map Python functions onto the
4238 cluster without needing to write any wrapper code yourself.")
4239 (license license:gpl3+)))
4240
4241 (define-public python2-gridmap
4242 (package-with-python2 python-gridmap))
4243
4244 (define-public python-pexpect
4245 (package
4246 (name "python-pexpect")
4247 (version "3.3")
4248 (source
4249 (origin
4250 (method url-fetch)
4251 (uri (string-append "https://pypi.python.org/packages/source/p/"
4252 "pexpect/pexpect-" version ".tar.gz"))
4253 (sha256
4254 (base32 "1fp5gm976z7ghm8jw57463rj19cv06c8zw842prgyg788f6n3snz"))))
4255 (build-system python-build-system)
4256 (arguments
4257 `(#:phases
4258 (modify-phases %standard-phases
4259 (replace 'check (lambda _ (zero? (system* "nosetests")))))))
4260 (native-inputs
4261 `(("python-nose" ,python-nose)))
4262 (home-page "http://pexpect.readthedocs.org/")
4263 (synopsis "Controlling interactive console applications")
4264 (description
4265 "Pexpect is a pure Python module for spawning child applications;
4266 controlling them; and responding to expected patterns in their output.
4267 Pexpect works like Don Libes’ Expect. Pexpect allows your script to spawn a
4268 child application and control it as if a human were typing commands.")
4269 (license license:isc)))
4270
4271 (define-public python2-pexpect
4272 (package-with-python2 python-pexpect))
4273
4274 (define-public python-setuptools-scm
4275 (package
4276 (name "python-setuptools-scm")
4277 (version "1.11.1")
4278 (source (origin
4279 (method url-fetch)
4280 (uri (pypi-uri "setuptools_scm" version))
4281 (sha256
4282 (base32
4283 "1gqr73i150yzj3mz32854vj93x07yr52kn8fdckwa41ll8wgficc"))))
4284 (build-system python-build-system)
4285 (native-inputs `(("python-setuptools" ,python-setuptools)))
4286 (home-page "https://github.com/pypa/setuptools_scm/")
4287 (synopsis "Manage Python package versions in SCM metadata")
4288 (description
4289 "Setuptools_scm handles managing your Python package versions in
4290 @dfn{software configuration management} (SCM) metadata instead of declaring
4291 them as the version argument or in a SCM managed file.")
4292 (license license:expat)))
4293
4294 (define-public python2-setuptools-scm
4295 (package-with-python2 python-setuptools-scm))
4296
4297 (define-public python-pathpy
4298 (package
4299 (name "python-pathpy")
4300 (version "8.1.1")
4301 (source
4302 (origin
4303 (method url-fetch)
4304 (uri (string-append "https://pypi.python.org/packages/source/p/"
4305 "path.py/path.py-" version ".tar.gz"))
4306 (sha256
4307 (base32 "1p8s1l2vfkqhqxdhqlj0g1jjw4f1as2frr35sjcpjjpd5a89y41f"))))
4308 (build-system python-build-system)
4309 (propagated-inputs
4310 `(("python-appdirs" ,python-appdirs)))
4311 (native-inputs
4312 `(("python-setuptools" ,python-setuptools)
4313 ("python-setuptools-scm" ,python-setuptools-scm)
4314 ("python-pytest" ,python-pytest)
4315 ("python-pytest-runner" ,python-pytest-runner)))
4316 (home-page "http://github.com/jaraco/path.py")
4317 (synopsis "Python module wrapper for built-in os.path")
4318 (description
4319 "@code{path.py} implements path objects as first-class entities, allowing
4320 common operations on files to be invoked on those path objects directly.")
4321 (license license:expat)))
4322
4323 (define-public python2-pathpy
4324 (package-with-python2 python-pathpy))
4325
4326 (define-public python-pickleshare
4327 (package
4328 (name "python-pickleshare")
4329 (version "0.5")
4330 (source
4331 (origin
4332 (method url-fetch)
4333 (uri (string-append "https://pypi.python.org/packages/source/p/"
4334 "pickleshare/pickleshare-" version ".tar.gz"))
4335 (sha256
4336 (base32 "11ljr90j3p6qswdrbl7p4cjb2i93f6vn0vx9anzpshsx0d2mggn0"))))
4337 (build-system python-build-system)
4338 (propagated-inputs
4339 `(("python-pathpy" ,python-pathpy)))
4340 (native-inputs
4341 `(("python-setuptools" ,python-setuptools)))
4342 (home-page "https://github.com/vivainio/pickleshare")
4343 (synopsis "Tiny key value database with concurrency support")
4344 (description
4345 "PickleShare is a small ‘shelve’-like datastore with concurrency support.
4346 Like shelve, a PickleShareDB object acts like a normal dictionary. Unlike
4347 shelve, many processes can access the database simultaneously. Changing a
4348 value in database is immediately visible to other processes accessing the same
4349 database. Concurrency is possible because the values are stored in separate
4350 files. Hence the “database” is a directory where all files are governed by
4351 PickleShare.")
4352 (license license:expat)))
4353
4354 (define-public python2-pickleshare
4355 (package-with-python2 python-pickleshare))
4356
4357 (define-public python-simplegeneric
4358 (package
4359 (name "python-simplegeneric")
4360 (version "0.8.1")
4361 (source
4362 (origin
4363 (method url-fetch)
4364 (uri (string-append "https://pypi.python.org/packages/source/s/"
4365 "simplegeneric/simplegeneric-" version ".zip"))
4366 (sha256
4367 (base32 "0wwi1c6md4vkbcsfsf8dklf3vr4mcdj4mpxkanwgb6jb1432x5yw"))))
4368 (build-system python-build-system)
4369 (native-inputs
4370 `(("python-setuptools" ,python-setuptools)
4371 ("unzip" ,unzip)))
4372 (home-page "http://cheeseshop.python.org/pypi/simplegeneric")
4373 (synopsis "Python module for simple generic functions")
4374 (description
4375 "The simplegeneric module lets you define simple single-dispatch generic
4376 functions, akin to Python’s built-in generic functions like @code{len()},
4377 @code{iter()} and so on. However, instead of using specially-named methods,
4378 these generic functions use simple lookup tables, akin to those used by
4379 e.g. @code{pickle.dump()} and other generic functions found in the Python
4380 standard library.")
4381 (license license:zpl2.1)))
4382
4383 (define-public python2-simplegeneric
4384 (package-with-python2 python-simplegeneric))
4385
4386 (define-public python-ipython-genutils
4387 (package
4388 (name "python-ipython-genutils")
4389 (version "0.1.0")
4390 (source
4391 (origin
4392 (method url-fetch)
4393 (uri (string-append "https://pypi.python.org/packages/source/i/"
4394 "ipython_genutils/ipython_genutils-"
4395 version ".tar.gz"))
4396 (sha256
4397 (base32 "19l2pp1c64ansr89l3cqh19jdi2ixhssdzx0vz4n6r52a6i281is"))))
4398 (build-system python-build-system)
4399 (arguments `(#:tests? #f)) ; no tests
4400 (home-page "http://ipython.org")
4401 (synopsis "Vestigial utilities from IPython")
4402 (description
4403 "This package provides retired utilities from IPython.")
4404 (license license:bsd-3)))
4405
4406 (define-public python2-ipython-genutils
4407 (package-with-python2 python-ipython-genutils))
4408
4409 (define-public python-traitlets
4410 (package
4411 (name "python-traitlets")
4412 (version "4.1.0")
4413 (source
4414 (origin
4415 (method url-fetch)
4416 (uri (pypi-uri "traitlets" version))
4417 (sha256
4418 (base32
4419 "0nxgj8jxlm1kqf8cx2x7vjid05zdgbxpqhjbdl46r8njlpgkh3j4"))))
4420 (build-system python-build-system)
4421 (arguments
4422 `(#:phases
4423 (modify-phases %standard-phases
4424 (replace 'check (lambda _ (zero? (system* "nosetests")))))))
4425 (propagated-inputs
4426 `(("python-ipython-genutils" ,python-ipython-genutils)
4427 ("python-decorator" ,python-decorator)))
4428 (native-inputs
4429 `(("python-mock" ,python-mock)
4430 ("python-nose" ,python-nose)))
4431 (home-page "http://ipython.org")
4432 (synopsis "Configuration system for Python applications")
4433 (description
4434 "Traitlets is a framework that lets Python classes have attributes with
4435 type checking, dynamically calculated default values, and ‘on change’
4436 callbacks. The package also includes a mechanism to use traitlets for
4437 configuration, loading values from files or from command line arguments. This
4438 is a distinct layer on top of traitlets, so you can use traitlets in your code
4439 without using the configuration machinery.")
4440 (license license:bsd-3)))
4441
4442 (define-public python2-traitlets
4443 (package-with-python2 python-traitlets))
4444
4445 (define-public python-ipython
4446 (package
4447 (name "python-ipython")
4448 (version "3.2.1")
4449 (source
4450 (origin
4451 (method url-fetch)
4452 (patches (search-patches "python-ipython-inputhook-ctype.patch"))
4453 (uri (string-append "https://pypi.python.org/packages/source/i/"
4454 "ipython/ipython-" version ".tar.gz"))
4455 (sha256
4456 (base32 "0xwin0sa9n0cabx4cq1ibf5ldsiw5dyimibla82kicz5gbpas4y9"))))
4457 (build-system python-build-system)
4458 (outputs '("out" "doc"))
4459 (propagated-inputs
4460 `(("python-pyzmq" ,python-pyzmq)
4461 ("python-terminado" ,python-terminado)))
4462 (inputs
4463 `(("readline" ,readline)
4464 ("which" ,which)
4465 ("python-matplotlib" ,python-matplotlib)
4466 ("python-numpy" ,python-numpy)
4467 ("python-numpydoc" ,python-numpydoc)
4468 ("python-jinja2" ,python-jinja2)
4469 ("python-mistune" ,python-mistune)
4470 ("python-jsonschema" ,python-jsonschema)
4471 ("python-pygments" ,python-pygments)
4472 ("python-requests" ,python-requests) ;; for tests
4473 ("python-nose" ,python-nose)))
4474 (native-inputs
4475 `(("pkg-config" ,pkg-config)
4476 ("python-sphinx" ,python-sphinx)
4477 ("texlive" ,texlive)
4478 ("texinfo" ,texinfo)
4479 ("python-setuptools" ,python-setuptools)))
4480 (arguments
4481 `(#:phases
4482 (modify-phases %standard-phases
4483 (add-after
4484 'install 'install-doc
4485 (lambda* (#:key inputs outputs #:allow-other-keys)
4486 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4487 (doc (string-append data "/doc/" ,name "-" ,version))
4488 (html (string-append doc "/html"))
4489 (man1 (string-append data "/man/man1"))
4490 (info (string-append data "/info"))
4491 (examples (string-append doc "/examples")))
4492 (setenv "LANG" "en_US.utf8")
4493 (with-directory-excursion "docs"
4494 ;; FIXME: html and pdf fail to build
4495 ;; (system* "make" "html")
4496 ;; (system* "make" "pdf" "PAPER=a4")
4497 (system* "make" "info"))
4498 (copy-recursively "docs/man" man1)
4499 (copy-recursively "examples" examples)
4500 ;; (copy-recursively "docs/build/html" html)
4501 ;; (copy-file "docs/build/latex/ipython.pdf"
4502 ;; (string-append doc "/ipython.pdf"))
4503 (mkdir-p info)
4504 (copy-file "docs/build/texinfo/ipython.info"
4505 (string-append info "/ipython.info"))
4506 (copy-file "COPYING.rst" (string-append doc "/COPYING.rst")))))
4507 ;; Tests can only be run after the library has been installed and not
4508 ;; within the source directory.
4509 (delete 'check)
4510 (add-after
4511 'install 'check
4512 (lambda* (#:key outputs tests? #:allow-other-keys)
4513 (if tests?
4514 (with-directory-excursion "/tmp"
4515 (setenv "HOME" "/tmp/") ;; required by a test
4516 (zero? (system* (string-append (assoc-ref outputs "out")
4517 "/bin/iptest"))))
4518 #t)))
4519 (add-before
4520 'install 'fix-tests
4521 (lambda* (#:key inputs #:allow-other-keys)
4522 (substitute* "./IPython/utils/_process_posix.py"
4523 (("/usr/bin/env', 'which") (which "which")))
4524 (substitute* "./IPython/core/tests/test_inputtransformer.py"
4525 (("#!/usr/bin/env python")
4526 (string-append "#!" (which "python"))))
4527 ;; Disable 1 failing test
4528 (substitute* "./IPython/core/tests/test_magic.py"
4529 (("def test_dirops\\(\\):" all)
4530 (string-append "@dec.skipif(True)\n" all))))))))
4531 (home-page "http://ipython.org")
4532 (synopsis "IPython is a tool for interactive computing in Python")
4533 (description
4534 "IPython provides a rich architecture for interactive computing with:
4535 Powerful interactive shells, a browser-based notebook, support for interactive
4536 data visualization, embeddable interpreters and tools for parallel
4537 computing.")
4538 (license license:bsd-3)
4539 (properties `((python2-variant . ,(delay python2-ipython))))))
4540
4541 (define-public python2-ipython
4542 (let ((ipython (package-with-python2 (strip-python2-variant python-ipython))))
4543 (package
4544 (inherit ipython)
4545 ;; FIXME: some tests are failing
4546 (arguments
4547 `(#:tests? #f ,@(package-arguments ipython)))
4548 ;; FIXME: add pyreadline once available.
4549 (inputs
4550 `(("python2-mock" ,python2-mock)
4551 ,@(package-inputs ipython))))))
4552
4553 (define-public python-isodate
4554 (package
4555 (name "python-isodate")
4556 (version "0.5.4")
4557 (source
4558 (origin
4559 (method url-fetch)
4560 (uri (pypi-uri "isodate" version))
4561 (sha256
4562 (base32
4563 "0cafaiwixgpxwh9dsd28qb0dbzsj6xpxjdkyk30ns91ps10mq422"))))
4564 (build-system python-build-system)
4565 (inputs
4566 `(("python-setuptools" ,python-setuptools)))
4567 (home-page
4568 "http://cheeseshop.python.org/pypi/isodate")
4569 (synopsis
4570 "Python date parser and formatter")
4571 (description
4572 "Python-isodate is a python module for parsing and formatting
4573 ISO 8601 dates, time and duration.")
4574 (license license:bsd-3)))
4575
4576 (define-public python2-isodate
4577 (package-with-python2 python-isodate))
4578
4579 (define-public python-html5lib
4580 (package
4581 (name "python-html5lib")
4582 (version "1.0b8")
4583 (source
4584 (origin
4585 (method url-fetch)
4586 (uri (pypi-uri "html5lib" version))
4587 (sha256
4588 (base32
4589 "1lknq5j3nh11xrl268ks76zaj0gyzh34v94n5vbf6dk8llzxdx0q"))))
4590 (build-system python-build-system)
4591 (propagated-inputs
4592 `(("python-six" ,python-six))) ; required to "import html5lib"
4593 (inputs
4594 `(("python-setuptools" ,python-setuptools)))
4595 (arguments
4596 `(#:test-target "check"))
4597 (home-page
4598 "https://github.com/html5lib/html5lib-python")
4599 (synopsis
4600 "Python HTML parser based on the WHATWG HTML specifcation")
4601 (description
4602 "Html5lib is an HTML parser based on the WHATWG HTML specifcation
4603 and written in Python.")
4604 (license license:expat)))
4605
4606 (define-public python2-html5lib
4607 (package-with-python2 python-html5lib))
4608
4609 (define-public python-urwid
4610 (package
4611 (name "python-urwid")
4612 (version "1.3.1")
4613 (source
4614 (origin
4615 (method url-fetch)
4616 (uri (pypi-uri "urwid" version))
4617 (sha256
4618 (base32
4619 "18cnd1wdjcas08x5qwa5ayw6jsfcn33w4d9f7q3s29fy6qzc1kng"))))
4620 (build-system python-build-system)
4621 (arguments
4622 `(#:phases
4623 (modify-phases %standard-phases
4624 ;; Disable failing test. Bug filed upstream:
4625 ;; https://github.com/wardi/urwid/issues/164
4626 ;; TODO: check again for python-urwid > 1.3.1 or python > 3.4.3.
4627 (add-after 'unpack 'disable-failing-test
4628 (lambda _
4629 (substitute* "urwid/tests/test_event_loops.py"
4630 (("test_remove_watch_file")
4631 "disable_remove_watch_file")))))))
4632 (native-inputs `(("python-setuptools" ,python-setuptools)))
4633 (home-page "http://urwid.org")
4634 (synopsis "Console user interface library for Python")
4635 (description
4636 "Urwid is a curses-based UI/widget library for Python. It includes many
4637 features useful for text console applications.")
4638 (license license:lgpl2.1+)))
4639
4640 (define-public python2-urwid
4641 (package-with-python2 python-urwid))
4642
4643 (define-public python-urwidtrees
4644 (package
4645 (name "python-urwidtrees")
4646 (version "1.0.2")
4647 (source
4648 (origin
4649 (method url-fetch)
4650 ;; package author intends on distributing via github rather than pypi:
4651 ;; https://github.com/pazz/alot/issues/877#issuecomment-230173331
4652 (uri (string-append "https://github.com/pazz/urwidtrees/archive/"
4653 version ".tar.gz"))
4654 (file-name (string-append name "-" version ".tar.gz"))
4655 (sha256
4656 (base32
4657 "0d30lyd3s2a97rhqfax5w9ssqds2z6aydqx3c6j2c2lk3cb4ngvh"))))
4658 (build-system python-build-system)
4659 (arguments
4660 '(#:tests? #f)) ; no tests
4661 (inputs `(("python-urwid" ,python-urwid)))
4662 (home-page "https://github.com/pazz/urwidtrees")
4663 (synopsis "Tree widgets for urwid")
4664 (description "Urwidtrees is a Widget Container API for the @code{urwid}
4665 toolkit. Use it to build trees of widgets.")
4666 (license license:gpl3+)))
4667
4668 (define-public python2-urwidtrees
4669 (package-with-python2 python-urwidtrees))
4670
4671 (define-public python-dbus
4672 (package
4673 (name "python-dbus")
4674 (version "1.2.0")
4675 (source
4676 (origin
4677 (method url-fetch)
4678 (uri (string-append
4679 "https://dbus.freedesktop.org/releases/dbus-python/dbus-python-"
4680 version ".tar.gz"))
4681 (sha256
4682 (base32 "1py62qir966lvdkngg0v8k1khsqxwk5m4s8nflpk1agk5f5nqb71"))))
4683 (build-system gnu-build-system)
4684 (arguments
4685 '(#:phases
4686 (modify-phases %standard-phases
4687 (add-before
4688 'check 'pre-check
4689 (lambda _
4690 ;; XXX: For the missing '/etc/machine-id'.
4691 (substitute* "test/run-test.sh"
4692 (("DBUS_FATAL_WARNINGS=1")
4693 "DBUS_FATAL_WARNINGS=0"))
4694 #t)))))
4695 (native-inputs
4696 `(("pkg-config" ,pkg-config)))
4697 (inputs
4698 `(("python" ,python)
4699 ("dbus-glib" ,dbus-glib)))
4700 (synopsis "Python bindings for D-bus")
4701 (description "python-dbus provides bindings for libdbus, the reference
4702 implementation of D-Bus.")
4703 (home-page "http://www.freedesktop.org/wiki/Software/DBusBindings/")
4704 (license license:expat)))
4705
4706 (define-public python2-dbus
4707 (package (inherit python-dbus)
4708 (name "python2-dbus")
4709 (inputs `(("python" ,python-2)
4710 ,@(alist-delete "python"
4711 (package-inputs python-dbus)
4712 equal?)))
4713 ;; FIXME: on Python 2, the test_utf8 fails with:
4714 ;; "ValueError: unichr() arg not in range(0x10000) (narrow Python build)"
4715 (arguments `(#:tests? #f))))
4716
4717 (define-public python-apsw
4718 (package
4719 (name "python-apsw")
4720 (version "3.9.2-r1")
4721 (source
4722 (origin
4723 (method url-fetch)
4724 (uri (pypi-uri "apsw" version))
4725 (sha256
4726 (base32
4727 "0w4jb0wpx785qw42r3h4fh7gl5w2968q48i7gygybsfxck8nzffs"))))
4728 (build-system python-build-system)
4729 (inputs
4730 `(("python-setuptools" ,python-setuptools)
4731 ("sqlite" ,sqlite)))
4732 (arguments
4733 `(#:phases
4734 ;; swap check and install phases
4735 (alist-cons-after
4736 'install 'check
4737 (assoc-ref %standard-phases 'check)
4738 (alist-delete
4739 'check
4740 %standard-phases))))
4741 (home-page "https://github.com/rogerbinns/apsw/")
4742 (synopsis "Another Python SQLite Wrapper")
4743 (description "APSW is a Python wrapper for the SQLite
4744 embedded relational database engine. In contrast to other wrappers such as
4745 pysqlite it focuses on being a minimal layer over SQLite attempting just to
4746 translate the complete SQLite API into Python.")
4747 (license license:zlib)))
4748
4749 (define-public python2-apsw
4750 (package-with-python2 python-apsw))
4751
4752 (define-public python-lxml
4753 (package
4754 (name "python-lxml")
4755 (version "3.6.0")
4756 (source
4757 (origin
4758 (method url-fetch)
4759 (uri (pypi-uri "lxml" version))
4760 (sha256
4761 (base32
4762 "1pvbmiy2m7jwv493kilbghhj2pkh8wy1na3ji350vhzhlwlclx4w"))))
4763 (build-system python-build-system)
4764 (inputs
4765 `(("libxml2" ,libxml2)
4766 ("libxslt" ,libxslt)
4767 ("python-setuptools" ,python-setuptools)))
4768 (home-page "http://lxml.de/")
4769 (synopsis
4770 "Python XML processing library")
4771 (description
4772 "The lxml XML toolkit is a Pythonic binding for the C libraries
4773 libxml2 and libxslt.")
4774 (license license:bsd-3))) ; and a few more, see LICENSES.txt
4775
4776 (define-public python2-lxml
4777 (package-with-python2 python-lxml))
4778
4779 ;; beautifulsoup4 has a totally different namespace than 3.x,
4780 ;; and pypi seems to put it under its own name, so I guess we should too
4781 (define-public python-beautifulsoup4
4782 (package
4783 (name "python-beautifulsoup4")
4784 (version "4.5.0")
4785 (source
4786 (origin
4787 (method url-fetch)
4788 (uri (pypi-uri "beautifulsoup4" version))
4789 (sha256
4790 (base32
4791 "1rf94360s8pmn37vxqjl0g74krq2p6nj3wbn6pj94ik6ny44q24f"))))
4792 (build-system python-build-system)
4793 (home-page
4794 "http://www.crummy.com/software/BeautifulSoup/bs4/")
4795 (synopsis
4796 "Python screen-scraping library")
4797 (description
4798 "Beautiful Soup is a Python library designed for rapidly setting up
4799 screen-scraping projects. It offers Pythonic idioms for navigating,
4800 searching, and modifying a parse tree, providing a toolkit for
4801 dissecting a document and extracting what you need. It automatically
4802 converts incoming documents to Unicode and outgoing documents to UTF-8.")
4803 (license license:expat)
4804 (properties `((python2-variant . ,(delay python2-beautifulsoup4))))))
4805
4806 (define-public python2-beautifulsoup4
4807 (package
4808 (inherit (package-with-python2
4809 (strip-python2-variant python-beautifulsoup4)))
4810 (native-inputs `(("python2-setuptools" ,python2-setuptools)))))
4811
4812 (define-public python2-cssutils
4813 (package
4814 (name "python2-cssutils")
4815 (version "1.0.1")
4816 (source
4817 (origin
4818 (method url-fetch)
4819 (uri (pypi-uri "cssutils" version))
4820 (sha256
4821 (base32
4822 "0qwha9x1wml2qmipbcz03gndnlwhzrjdvw9i09si247a90l8p8fq"))))
4823 (build-system python-build-system)
4824 (native-inputs
4825 `(("python2-mock" ,python2-mock) ; for the tests
4826 ("unzip" ,unzip))) ; for unpacking the source
4827 (inputs
4828 `(("python2-setuptools" ,python2-setuptools)))
4829 (arguments
4830 `(#:python ,python-2 ; Otherwise tests fail with a syntax error.
4831 #:tests? #f ; The tests apparently download an external URL.
4832 ))
4833 (home-page "http://cthedot.de/cssutils/")
4834 (synopsis
4835 "CSS Cascading Style Sheets library for Python")
4836 (description
4837 "Cssutils is a Python package for parsing and building CSS
4838 Cascading Style Sheets. Currently it provides a DOM only and no rendering
4839 options.")
4840 (license license:lgpl3+)))
4841
4842 (define-public python-cssselect
4843 (package
4844 (name "python-cssselect")
4845 (version "0.9.2")
4846 (source
4847 (origin
4848 (method url-fetch)
4849 (uri (pypi-uri "cssselect" version))
4850 (sha256
4851 (base32
4852 "1xg6gbva1yswghiycmgincv6ab4bn7hpm720ndbj40h8xycmnfvi"))))
4853 (build-system python-build-system)
4854 (inputs
4855 `(("python-setuptools" ,python-setuptools)))
4856 (arguments
4857 ;; tests fail with message
4858 ;; AttributeError: 'module' object has no attribute 'tests'
4859 `(#:tests? #f))
4860 (home-page
4861 "https://pythonhosted.org/cssselect/")
4862 (synopsis
4863 "CSS3 selector parser and translator to XPath 1.0")
4864 (description
4865 "Cssselect ia a Python module that parses CSS3 Selectors and translates
4866 them to XPath 1.0 expressions. Such expressions can be used in lxml or
4867 another XPath engine to find the matching elements in an XML or HTML document.")
4868 (license license:bsd-3)))
4869
4870 (define-public python2-cssselect
4871 (package-with-python2 python-cssselect))
4872
4873 (define-public python-netifaces
4874 (package
4875 (name "python-netifaces")
4876 (version "0.10.4")
4877 (source
4878 (origin
4879 (method url-fetch)
4880 (uri (string-append
4881 "https://pypi.python.org/packages/source/n/netifaces/netifaces-"
4882 version
4883 ".tar.gz"))
4884 (sha256
4885 (base32
4886 "1plw237a4zib4z8s62g0mrs8gm3kjfrp5sxh6bbk9nl3rdls2mln"))))
4887 (build-system python-build-system)
4888 (inputs
4889 `(("python-setuptools" ,python-setuptools)))
4890 (home-page
4891 "https://bitbucket.org/al45tair/netifaces")
4892 (synopsis
4893 "Python module for portable network interface information")
4894 (description
4895 "Netifaces is a Python module providing information on network
4896 interfaces in an easy and portable manner.")
4897 (license license:expat)))
4898
4899 (define-public python2-netifaces
4900 (package-with-python2 python-netifaces))
4901
4902 (define-public python-networkx
4903 (package
4904 (name "python-networkx")
4905 (version "1.11")
4906 (source
4907 (origin
4908 (method url-fetch)
4909 (uri (pypi-uri "networkx" version))
4910 (sha256
4911 (base32 "1f74s56xb4ggixiq0vxyfxsfk8p20c7a099lpcf60izv1php03hd"))))
4912 (build-system python-build-system)
4913 ;; python-decorator is needed at runtime
4914 (propagated-inputs
4915 `(("python-decorator" ,python-decorator)))
4916 (native-inputs
4917 `(("python-setuptools" ,python-setuptools)
4918 ("python-nose" ,python-nose)))
4919 (home-page "http://networkx.github.io/")
4920 (synopsis "Python module for creating and manipulating graphs and networks")
4921 (description
4922 "NetworkX is a Python package for the creation, manipulation, and study
4923 of the structure, dynamics, and functions of complex networks.")
4924 (license license:bsd-3)))
4925
4926 (define-public python2-networkx
4927 (package-with-python2 python-networkx))
4928
4929 (define-public snakemake
4930 (package
4931 (name "snakemake")
4932 (version "3.2.1")
4933 (source
4934 (origin
4935 (method url-fetch)
4936 (uri (string-append
4937 "https://pypi.python.org/packages/source/s/snakemake/snakemake-"
4938 version ".tar.gz"))
4939 (sha256
4940 (base32 "0fi4b63sj60hvi7rfydvmz2icl4wj74djw5sn2gl8hxd02qw4b91"))))
4941 (build-system python-build-system)
4942 (inputs `(("python-setuptools" ,python-setuptools)))
4943 (home-page "https://bitbucket.org/johanneskoester/snakemake")
4944 (synopsis "Python-based execution environment for make-like workflows")
4945 (description
4946 "Snakemake aims to reduce the complexity of creating workflows by
4947 providing a clean and modern domain specific specification language (DSL) in
4948 Python style, together with a fast and comfortable execution environment.")
4949 (license license:expat)))
4950
4951 (define-public python-seaborn
4952 (package
4953 (name "python-seaborn")
4954 (version "0.7.0")
4955 (source
4956 (origin
4957 (method url-fetch)
4958 (uri (pypi-uri "seaborn" version))
4959 (sha256
4960 (base32 "0ibi3xsfm2kysph61mnfy0pf8d5rkgxgrdb0z9nbizgcgdsb5a0m"))))
4961 (build-system python-build-system)
4962 (propagated-inputs
4963 `(("python-pandas" ,python-pandas)
4964 ("python-matplotlib" ,python-matplotlib)
4965 ("python-scipy" ,python-scipy)))
4966 (home-page "http://stanford.edu/~mwaskom/software/seaborn/")
4967 (synopsis "Statistical data visualization")
4968 (description
4969 "Seaborn is a library for making attractive and informative statistical
4970 graphics in Python. It is built on top of matplotlib and tightly integrated
4971 with the PyData stack, including support for numpy and pandas data structures
4972 and statistical routines from scipy and statsmodels.")
4973 (license license:bsd-3)
4974 (properties `((python2-variant . ,(delay python2-seaborn))))))
4975
4976 (define-public python2-seaborn
4977 (let ((base (package-with-python2 (strip-python2-variant python-seaborn))))
4978 (package
4979 (inherit base)
4980 (propagated-inputs `(("python2-pytz" ,python2-pytz)
4981 ,@(package-propagated-inputs base)))
4982 (native-inputs `(("python2-setuptools" ,python2-setuptools)
4983 ,@(package-native-inputs base))))))
4984
4985 (define-public python-sympy
4986 (package
4987 (name "python-sympy")
4988 (version "0.7.6")
4989 (source
4990 (origin
4991 (method url-fetch)
4992 (uri (string-append
4993 "https://github.com/sympy/sympy/releases/download/sympy-"
4994 version "/sympy-" version ".tar.gz"))
4995 (sha256
4996 (base32 "19yp0gy4i7p4g6l3b8vaqkj9qj7yqb5kqy0qgbdagpzgkdz958yz"))))
4997 (build-system python-build-system)
4998 (native-inputs
4999 `(("python-setuptools" ,python-setuptools)))
5000 (home-page "http://www.sympy.org/")
5001 (synopsis "Python library for symbolic mathematics")
5002 (description
5003 "SymPy is a Python library for symbolic mathematics. It aims to become a
5004 full-featured computer algebra system (CAS) while keeping the code as simple
5005 as possible in order to be comprehensible and easily extensible.")
5006 (license license:bsd-3)))
5007
5008 (define-public python2-sympy
5009 (package-with-python2 python-sympy))
5010
5011 (define-public python-testlib
5012 (package
5013 (name "python-testlib")
5014 (version "0.6.5")
5015 (source
5016 (origin
5017 (method url-fetch)
5018 (uri (string-append
5019 "https://pypi.python.org/packages/source/t/testlib/testlib-"
5020 version ".zip"))
5021 (sha256
5022 (base32 "1mz26cxn4x8bbgv0rn0mvj2z05y31rkc8009nvdlb3lam5b4mj3y"))))
5023 (build-system python-build-system)
5024 (inputs
5025 `(("python-setuptools" ,python-setuptools)))
5026 (native-inputs
5027 `(("unzip" ,unzip)))
5028 (arguments
5029 `(#:phases
5030 (alist-replace
5031 'unpack
5032 (lambda* (#:key inputs outputs #:allow-other-keys)
5033 (let ((unzip (string-append (assoc-ref inputs "unzip")
5034 "/bin/unzip"))
5035 (source (assoc-ref inputs "source")))
5036 (and (zero? (system* unzip source))
5037 (chdir (string-append "testlib-" ,version)))))
5038 %standard-phases)))
5039 (synopsis "Python micro test suite harness")
5040 (description "A micro unittest suite harness for Python.")
5041 (home-page "https://github.com/trentm/testlib")
5042 (license license:expat)))
5043
5044 (define-public python2-testlib
5045 (package-with-python2 python-testlib))
5046
5047 (define-public python2-xlib
5048 (package
5049 (name "python2-xlib")
5050 (version "0.14")
5051 (source (origin
5052 (method url-fetch)
5053 (uri (string-append "mirror://sourceforge/python-xlib/python-xlib"
5054 "/" version "/"
5055 "python-xlib-" version ".tar.gz"))
5056 (sha256
5057 (base32
5058 "1sv0447j0rx8cgs3jhjl695p5pv13ihglcjlrrz1kq05lsvb0wa7"))))
5059 (build-system python-build-system)
5060 (arguments
5061 `(#:python ,python-2 ;Python 2 only
5062 #:tests? #f)) ;no tests
5063 (inputs
5064 `(("python-setuptools" ,python-setuptools)))
5065 (home-page "http://python-xlib.sourceforge.net/")
5066 (synopsis "Python X11 client library")
5067 (description
5068 "The Python X Library is intended to be a fully functional X client
5069 library for Python programs. It is useful to implement low-level X clients.
5070 It is written entirely in Python.")
5071 (license license:gpl2+)))
5072
5073 (define-public python-singledispatch
5074 (package
5075 (name "python-singledispatch")
5076 (version "3.4.0.3")
5077 (source
5078 (origin
5079 (method url-fetch)
5080 (uri (pypi-uri "singledispatch" version))
5081 (sha256
5082 (base32
5083 "171b7ip0hsq5qm83np40h3phlr36ym18w0lay0a8v08kvy3sy1jv"))))
5084 (build-system python-build-system)
5085 (native-inputs
5086 `(("python-setuptools" ,python-setuptools)))
5087 (inputs
5088 `(("python-six" ,python-six)))
5089 (home-page
5090 "http://docs.python.org/3/library/functools.html#functools.singledispatch")
5091 (synopsis "Backport of singledispatch feature from Python 3.4")
5092 (description
5093 "This library brings functools.singledispatch from Python 3.4 to Python
5094 2.6-3.3.")
5095 (license license:expat)))
5096
5097 (define-public python2-singledispatch
5098 (package-with-python2 python-singledispatch))
5099
5100 (define-public python-tornado
5101 (package
5102 (name "python-tornado")
5103 (version "4.3")
5104 (source
5105 (origin
5106 (method url-fetch)
5107 (uri (pypi-uri "tornado" version))
5108 (sha256
5109 (base32 "1gzgwayl6hmc9jfcl88bni4jcsk2jcca9dn1rvrfsvnijcjx7hn9"))))
5110 (build-system python-build-system)
5111 (native-inputs
5112 `(("python-certifi" ,python-certifi)))
5113 (inputs
5114 `(("python-backports-abc" ,python-backports-abc)))
5115 (home-page "http://www.tornadoweb.org/")
5116 (synopsis "Python web framework and asynchronous networking library")
5117 (description
5118 "Tornado is a Python web framework and asynchronous networking library,
5119 originally developed at FriendFeed. By using non-blocking network I/O,
5120 Tornado can scale to tens of thousands of open connections, making it ideal
5121 for long polling, WebSockets, and other applications that require a long-lived
5122 connection to each user.")
5123 (license license:asl2.0)
5124 (properties `((python2-variant . ,(delay python2-tornado))))))
5125
5126 (define-public python2-tornado
5127 (let ((tornado (package-with-python2 (strip-python2-variant python-tornado))))
5128 (package (inherit tornado)
5129 (inputs
5130 `(("python2-backport-ssl-match-hostname"
5131 ,python2-backport-ssl-match-hostname)
5132 ("python2-singledispatch" ,python2-singledispatch)
5133 ,@(package-inputs tornado)))
5134 (native-inputs
5135 `(("python2-setuptools" ,python2-setuptools)
5136 ,@(package-native-inputs tornado))))))
5137
5138 ;; the python- version can be removed with python-3.5
5139 (define-public python-backports-abc
5140 (package
5141 (name "python-backports-abc")
5142 (version "0.4")
5143 (source
5144 (origin
5145 (method url-fetch)
5146 (uri (pypi-uri "backports_abc" version))
5147 (sha256
5148 (base32
5149 "19fh75lni9pb673n2fn505m1rckm0af0szcv5xx1qm1xpa940glb"))))
5150 (build-system python-build-system)
5151 (inputs
5152 `(("python-setuptools" ,python-setuptools)))
5153 (home-page "https://github.com/cython/backports_abc")
5154 (synopsis "Backport of additions to the 'collections.abc' module")
5155 (description
5156 "Python-backports-abc provides a backport of additions to the
5157 'collections.abc' module in Python-3.5.")
5158 (license license:psfl)))
5159
5160 (define-public python2-backports-abc
5161 (package-with-python2 python-backports-abc))
5162
5163 (define-public python-waf
5164 (package
5165 (name "python-waf")
5166 (version "1.9.1")
5167 (source (origin
5168 (method url-fetch)
5169 (uri (string-append "https://waf.io/"
5170 "waf-" version ".tar.bz2"))
5171 (sha256
5172 (base32
5173 "1nc4qaqx2vsanlpp9mcwvf91xjqpkvcc6fcxd5sb4fwvaxamw5v6"))))
5174 (build-system python-build-system)
5175 (arguments
5176 '(#:phases
5177 (modify-phases %standard-phases
5178 (replace 'build
5179 (lambda _
5180 (zero? (begin
5181 (system* "python" "waf-light" "configure")
5182 (system* "python" "waf-light" "build")))))
5183 (replace 'check
5184 (lambda _
5185 (zero? (system* "python" "waf" "--version"))))
5186 (replace 'install
5187 (lambda _
5188 (copy-file "waf" %output))))))
5189 (home-page "https://waf.io/")
5190 (synopsis "Python-based build system")
5191 (description
5192 "Waf is a Python-based framework for configuring, compiling and installing
5193 applications.")
5194 (license license:bsd-3)))
5195
5196 (define-public python2-waf
5197 (package-with-python2 python-waf))
5198
5199 (define-public python-pyzmq
5200 (package
5201 (name "python-pyzmq")
5202 (version "15.1.0")
5203 (source
5204 (origin
5205 (method url-fetch)
5206 (uri (pypi-uri "pyzmq" version))
5207 (sha256
5208 (base32 "13fhwnlvsvxv72kfhqbpn6qi7msh8mc8377mpabv32skk2cjfnxx"))))
5209 (build-system python-build-system)
5210 (arguments
5211 `(#:configure-flags
5212 (list (string-append "--zmq=" (assoc-ref %build-inputs "zeromq")))
5213 ;; FIXME: You must build pyzmq with 'python setup.py build_ext
5214 ;; --inplace' for 'python setup.py test' to work.
5215 #:tests? #f))
5216 (inputs
5217 `(("zeromq" ,zeromq)))
5218 (native-inputs
5219 `(("pkg-config" ,pkg-config)
5220 ("python-nose" ,python-nose)
5221 ("python-setuptools" ,python-setuptools)))
5222 (home-page "http://github.com/zeromq/pyzmq")
5223 (synopsis "Python bindings for 0MQ")
5224 (description
5225 "PyZMQ is the official Python binding for the ZeroMQ messaging library.")
5226 (license license:bsd-4)))
5227
5228 (define-public python2-pyzmq
5229 (package-with-python2 python-pyzmq))
5230
5231 (define-public python-pep8
5232 (package
5233 (name "python-pep8")
5234 (version "1.7.0")
5235 (source
5236 (origin
5237 (method url-fetch)
5238 (uri (pypi-uri "pep8" version))
5239 (sha256
5240 (base32
5241 "002rkl4lsn6x2mxmf8ar00l0m8i3mzrc6pnzz77blyksmpsxa4x1"))))
5242 (build-system python-build-system)
5243 (inputs
5244 `(("python-setuptools" ,python-setuptools)))
5245 (home-page "http://pep8.readthedocs.org/")
5246 (synopsis "Python style guide checker")
5247 (description
5248 "This tools checks Python code against some of the style conventions in
5249 PEP 8.")
5250 (license license:expat)))
5251
5252 (define-public python2-pep8
5253 (package-with-python2 python-pep8))
5254
5255 (define-public python-pyflakes
5256 (package
5257 (name "python-pyflakes")
5258 (version "1.0.0")
5259 (source
5260 (origin
5261 (method url-fetch)
5262 (uri (pypi-uri "pyflakes" version))
5263 (sha256
5264 (base32
5265 "0qs2sgqszq7wcplis8509wk2ygqcrwzbs1ghfj3svvivq2j377pk"))))
5266 (build-system python-build-system)
5267 (inputs
5268 `(("python-setuptools" ,python-setuptools)))
5269 (home-page
5270 "https://github.com/pyflakes/pyflakes")
5271 (synopsis "Passive checker of Python programs")
5272 (description
5273 "Pyflakes statically checks Python source code for common errors.")
5274 (license license:expat)))
5275
5276 (define-public python2-pyflakes
5277 (package-with-python2 python-pyflakes))
5278
5279 (define-public python-mccabe
5280 (package
5281 (name "python-mccabe")
5282 (version "0.4.0")
5283 (source
5284 (origin
5285 (method url-fetch)
5286 (uri (pypi-uri "mccabe" version))
5287 (sha256
5288 (base32
5289 "0yr08a36h8lqlif10l4xcikbbig7q8f41gqywir7rrvnv3mi4aws"))))
5290 (build-system python-build-system)
5291 (inputs
5292 `(("python-pytest" ,python-pytest)
5293 ("python-pytest-runner" ,python-pytest-runner)
5294 ("python-setuptools" ,python-setuptools)))
5295 (home-page "https://github.com/flintwork/mccabe")
5296 (synopsis "McCabe checker, plugin for flake8")
5297 (description
5298 "This package provides a Flake8 plug-in to compute the McCabe cyclomatic
5299 complexity of Python source code.")
5300 (license license:expat)))
5301
5302 (define-public python2-mccabe
5303 (package-with-python2 python-mccabe))
5304
5305 (define-public python-mccabe-0.2.1
5306 (package (inherit python-mccabe)
5307 (version "0.2.1")
5308 (source
5309 (origin
5310 (method url-fetch)
5311 (uri (pypi-uri "mccabe" version))
5312 (sha256
5313 (base32
5314 "0fi4a81kr5bcv5p4xgibqr595hyj5dafkqgsmfk96mfy8w71fajs"))))
5315 (inputs `(("python-setuptools" ,python-setuptools)))))
5316
5317 (define-public python2-mccabe-0.2.1
5318 (package-with-python2 python-mccabe-0.2.1))
5319
5320 ;; Flake8 2.4.1 requires an older version of pep8.
5321 ;; This should be removed ASAP.
5322 (define-public python-pep8-1.5.7
5323 (package (inherit python-pep8)
5324 (version "1.5.7")
5325 (source
5326 (origin
5327 (method url-fetch)
5328 (uri (string-append
5329 "https://pypi.python.org/packages/source/p/pep8/pep8-"
5330 version
5331 ".tar.gz"))
5332 (sha256
5333 (base32
5334 "12b9bbdbwnspxgak14xg58c130x2n0blxzlms5jn2dszn8qj3d0m"))))))
5335
5336 (define-public python2-pep8-1.5.7
5337 (package-with-python2 python-pep8-1.5.7))
5338
5339 ;; Flake8 2.4.1 requires an older version of pyflakes.
5340 ;; This should be removed ASAP.
5341 (define-public python-pyflakes-0.8.1
5342 (package (inherit python-pyflakes)
5343 (version "0.8.1")
5344 (source
5345 (origin
5346 (method url-fetch)
5347 (uri (string-append
5348 "https://pypi.python.org/packages/source/p/pyflakes/pyflakes-"
5349 version
5350 ".tar.gz"))
5351 (sha256
5352 (base32
5353 "0sbpq6pqm1i9wqi41mlfrsc5rk92jv4mskvlyxmnhlbdnc80ma1z"))))))
5354
5355 (define-public python2-pyflakes-0.8.1
5356 (package-with-python2 python-pyflakes-0.8.1))
5357
5358 (define-public python-flake8
5359 (package
5360 (name "python-flake8")
5361 (version "2.5.4")
5362 (source
5363 (origin
5364 (method url-fetch)
5365 (uri (pypi-uri "flake8" version))
5366 (sha256
5367 (base32
5368 "0bs9cz4fr99r2rwig1b8jwaadl1nan7kgpdzqwj0bwbckwbmh7nc"))))
5369 (build-system python-build-system)
5370 (inputs
5371 `(("python-setuptools" ,python-setuptools)
5372 ("python-pep8" ,python-pep8)
5373 ("python-pyflakes" ,python-pyflakes)
5374 ("python-mccabe" ,python-mccabe)
5375 ("python-mock" ,python-mock)
5376 ("python-nose" ,python-nose)))
5377 (home-page "https://gitlab.com/pycqa/flake8")
5378 (synopsis
5379 "The modular source code checker: pep8, pyflakes and co")
5380 (description
5381 "Flake8 is a wrapper around PyFlakes, pep8 and python-mccabe.")
5382 (license license:expat)))
5383
5384 (define-public python2-flake8
5385 (package-with-python2 python-flake8))
5386
5387 ;; This will only be needed by the python-hacking package and will not be
5388 ;; necessary once python-hacking > 0.10.2 is released.
5389 (define-public python-flake8-2.2.4
5390 (package (inherit python-flake8)
5391 (inputs
5392 `(("python-setuptools" ,python-setuptools)
5393 ("python-pep8" ,python-pep8-1.5.7)
5394 ("python-pyflakes" ,python-pyflakes-0.8.1)
5395 ("python-mccabe" ,python-mccabe-0.2.1)
5396 ("python-mock" ,python-mock)
5397 ("python-nose" ,python-nose)))
5398 (version "2.2.4")
5399 (source
5400 (origin
5401 (method url-fetch)
5402 (uri (pypi-uri "flake8" version))
5403 (sha256
5404 (base32
5405 "1r9wsry4va45h1rck5hxd3vzsg2q3y6lnl6pym1bxvz8ry19jwx8"))))))
5406
5407 (define-public python2-flake8-2.2.4
5408 (package-with-python2 python-flake8-2.2.4))
5409
5410 (define-public python-mistune
5411 (package
5412 (name "python-mistune")
5413 (version "0.7")
5414 (source
5415 (origin
5416 (method url-fetch)
5417 (uri (string-append
5418 "https://pypi.python.org/packages/source/m/mistune/mistune-"
5419 version
5420 ".tar.gz"))
5421 (sha256
5422 (base32
5423 "17zqjp9m4d1w3jf2rbbq5xshcw24q1vlcv24gkgfqqyyymajxahx"))))
5424 (build-system python-build-system)
5425 (inputs
5426 `(("python-setuptools" ,python-setuptools)
5427 ("python-nose" ,python-nose)
5428 ("python-cython" ,python-cython)))
5429 (home-page "https://github.com/lepture/mistune")
5430 (synopsis "Markdown parser in pure Python")
5431 (description "This package provides a fast markdown parser in pure
5432 Python.")
5433 (license license:bsd-3)))
5434
5435 (define-public python2-mistune
5436 (package-with-python2 python-mistune))
5437
5438 (define-public python-markdown
5439 (package
5440 (name "python-markdown")
5441 (version "2.6.5")
5442 (source
5443 (origin
5444 (method url-fetch)
5445 (uri (pypi-uri "Markdown" version))
5446 (sha256
5447 (base32
5448 "0q758a3fiiawr20b3hhjfs677cwj6xi284yb7xspcvv0fdicz54d"))))
5449 (build-system python-build-system)
5450 (arguments
5451 `(#:phases
5452 (modify-phases %standard-phases
5453 (replace 'check
5454 (lambda _
5455 (zero? (system* "python" "run-tests.py")))))))
5456 (native-inputs
5457 `(("python-nose" ,python-nose)
5458 ("python-pyyaml" ,python-pyyaml)))
5459 (home-page "https://pythonhosted.org/Markdown/")
5460 (synopsis "Python implementation of Markdown")
5461 (description
5462 "This package provides a Python implementation of John Gruber's
5463 Markdown. The library features international input, various Markdown
5464 extensions, and several HTML output formats. A command line wrapper
5465 markdown_py is also provided to convert Markdown files to HTML.")
5466 (license license:bsd-3)))
5467
5468 (define-public python2-markdown
5469 (package-with-python2 python-markdown))
5470
5471 (define-public python-ptyprocess
5472 (package
5473 (name "python-ptyprocess")
5474 (version "0.5")
5475 (source
5476 (origin
5477 (method url-fetch)
5478 (uri (string-append
5479 "https://pypi.python.org/packages/source/p/ptyprocess/ptyprocess-"
5480 version ".tar.gz"))
5481 (sha256
5482 (base32
5483 "0nggns5kikn32yyda2zrj1xdmh49pi3v0drggcdwljbv36r8zdyw"))))
5484 (build-system python-build-system)
5485 (inputs
5486 `(("python-setuptools" ,python-setuptools)
5487 ("python-nose" ,python-nose)))
5488 (arguments
5489 `(#:phases
5490 (modify-phases %standard-phases
5491 (replace 'check
5492 (lambda _
5493 (zero? (system* "nosetests")))))))
5494 (home-page "https://github.com/pexpect/ptyprocess")
5495 (synopsis "Run a subprocess in a pseudo terminal")
5496 (description
5497 "This package provides a Python library used to launch a subprocess in a
5498 pseudo terminal (pty), and interact with both the process and its pty.")
5499 (license license:isc)))
5500
5501 (define-public python2-ptyprocess
5502 (package-with-python2 python-ptyprocess))
5503
5504 (define-public python-terminado
5505 (package
5506 (name "python-terminado")
5507 (version "0.6")
5508 (source
5509 (origin
5510 (method url-fetch)
5511 (uri (pypi-uri "terminado" version))
5512 (sha256
5513 (base32
5514 "09h1kwi86g5mrk14s4pgbhshd602zry29lnpxamcqz864kva22rc"))))
5515 (build-system python-build-system)
5516 (propagated-inputs
5517 `(("python-tornado" ,python-tornado)
5518 ("python-ptyprocess" ,python-ptyprocess)))
5519 (native-inputs
5520 `(("python-nose" ,python-nose)))
5521 (arguments
5522 `(#:phases
5523 (modify-phases %standard-phases
5524 (replace 'check
5525 (lambda _
5526 (zero? (system* "nosetests")))))))
5527 (home-page "https://github.com/takluyver/terminado")
5528 (synopsis "Terminals served to term.js using Tornado websockets")
5529 (description "This package provides a Tornado websocket backend for the
5530 term.js Javascript terminal emulator library.")
5531 (license license:bsd-2)
5532 (properties `((python2-variant . ,(delay python2-terminado))))))
5533
5534 (define-public python2-terminado
5535 (let ((terminado (package-with-python2 (strip-python2-variant python-terminado))))
5536 (package (inherit terminado)
5537 (propagated-inputs
5538 `(("python2-backport-ssl-match-hostname"
5539 ,python2-backport-ssl-match-hostname)
5540 ,@(package-propagated-inputs terminado)))
5541 (native-inputs
5542 `(("python2-setuptools" ,python2-setuptools)
5543 ,@(package-native-inputs terminado))))))
5544
5545 (define-public python-fonttools
5546 (package
5547 (name "python-fonttools")
5548 (version "2.5")
5549 (source (origin
5550 (method url-fetch)
5551 (uri (string-append
5552 "https://pypi.python.org/packages/source/F/FontTools/"
5553 "fonttools-" version ".tar.gz"))
5554 (sha256
5555 (base32
5556 "08ay3x4ijarwhl60gqx2i9jzq6pxs20p4snc2d1q5jagh4rn39lb"))))
5557 (build-system python-build-system)
5558 (arguments '(#:test-target "check"))
5559 (propagated-inputs
5560 ;; XXX: module not found if setuptools is not available.
5561 `(("python-setuptools" ,python-setuptools)))
5562 (home-page "http://github.com/behdad/fonttools")
5563 (synopsis "Tools to manipulate font files")
5564 (description
5565 "FontTools/TTX is a library to manipulate font files from Python. It
5566 supports reading and writinfg of TrueType/OpenType fonts, reading and writing
5567 of AFM files, reading (and partially writing) of PS Type 1 fonts. The package
5568 also contains a tool called “TTX” which converts TrueType/OpenType fonts to and
5569 from an XML-based format.")
5570 (license (license:non-copyleft
5571 "file://LICENSE.txt"
5572 "See LICENSE.txt in the distribution."))))
5573
5574 (define-public python2-fonttools
5575 (package-with-python2 python-fonttools))
5576
5577 (define-public python-ly
5578 (package
5579 (name "python-ly")
5580 (version "0.9.4")
5581 (source
5582 (origin
5583 (method url-fetch)
5584 (uri (string-append "https://pypi.python.org/packages/57/4f/"
5585 "889579244947368f28eda66b782331b1e75f83fd72e63f9ece93cd7a18f9"
5586 "/python-ly-" version ".tar.gz"))
5587 (sha256
5588 (base32
5589 "0g6n288l83sfwavxh1aryi0aqvsr3sp7v6f903mckwqa4scpky62"))))
5590 (build-system python-build-system)
5591 (native-inputs
5592 `(("python-setuptools" ,python-setuptools)))
5593 (synopsis "Tool and library for manipulating LilyPond files")
5594 (description "This package provides a Python library to parse, manipulate
5595 or create documents in LilyPond format. A command line program ly is also
5596 provided that can be used to do various manipulations with LilyPond files.")
5597 (home-page "https://pypi.python.org/pypi/python-ly")
5598 (license license:gpl2+)))
5599
5600 (define-public python-appdirs
5601 (package
5602 (name "python-appdirs")
5603 (version "1.4.0")
5604 (source
5605 (origin
5606 (method url-fetch)
5607 (uri (string-append
5608 "https://pypi.python.org/packages/source/a/appdirs/appdirs-"
5609 version
5610 ".tar.gz"))
5611 (sha256
5612 (base32
5613 "1iddva7v3fq0aqzsahkazxr7vpw28mqcrsy818z4wyiqnkplbhlg"))))
5614 (build-system python-build-system)
5615 (inputs
5616 `(("python-setuptools" ,python-setuptools)))
5617 (home-page "http://github.com/ActiveState/appdirs")
5618 (synopsis
5619 "Determine platform-specific dirs, e.g. a \"user data dir\"")
5620 (description
5621 "This module provides a portable way of finding out where user data
5622 should be stored on various operating systems.")
5623 (license license:expat)))
5624
5625 (define-public python2-appdirs
5626 (package-with-python2 python-appdirs))
5627
5628 (define-public python-llfuse
5629 (package
5630 (name "python-llfuse")
5631 (version "1.1.1")
5632 (source (origin
5633 (method url-fetch)
5634 (uri (string-append
5635 "https://bitbucket.org/nikratio/python-llfuse/downloads/"
5636 "llfuse-" version ".tar.bz2"))
5637 (sha256
5638 (base32
5639 "0v6vj9mb286njgd1szg9hz2qdh5f3vkhsvajripfcqg458av310v"))))
5640 (build-system python-build-system)
5641 (inputs
5642 `(("fuse" ,fuse)
5643 ("attr" ,attr)))
5644 (native-inputs
5645 `(("pkg-config" ,pkg-config)
5646 ("python-setuptools" ,python-setuptools)))
5647 (synopsis "Python bindings for FUSE")
5648 (description
5649 "Python-LLFUSE is a set of Python bindings for the low level FUSE API.")
5650 (home-page "https://bitbucket.org/nikratio/python-llfuse/")
5651 (license license:lgpl2.0+)
5652 (properties `((python2-variant . ,(delay python2-llfuse))))))
5653
5654 (define-public python2-llfuse
5655 (package (inherit (package-with-python2
5656 (strip-python2-variant python-llfuse)))
5657 (propagated-inputs `(("python2-contextlib2" ,python2-contextlib2)))))
5658
5659 ;; For attic-0.16
5660 (define-public python-llfuse-0.41
5661 (package (inherit python-llfuse)
5662 (version "0.41.1")
5663 (source (origin
5664 (method url-fetch)
5665 (uri (string-append
5666 "https://bitbucket.org/nikratio/python-llfuse/downloads/"
5667 "llfuse-" version ".tar.bz2"))
5668 (sha256
5669 (base32
5670 "1imlqw9b73086y97izr036f58pgc5akv4ihc2rrf8j5h75jbrlaa"))))
5671 ;; Python-LLFUSE < 0.42 includes underscore.js, which is MIT (expat)
5672 ;; licensed. The rest of the package is licensed under LGPL2.0 or later.
5673 (license (list license:expat license:lgpl2.0+))))
5674
5675 (define-public python-msgpack
5676 (package
5677 (name "python-msgpack")
5678 (version "0.4.8")
5679 (source (origin
5680 (method url-fetch)
5681 (uri (pypi-uri "msgpack-python" version))
5682 (sha256
5683 (base32
5684 "11pqk5braa6wndpnr1dhg64js82vjgxnm0lzy73rwl831zgijaqs"))))
5685 (build-system python-build-system)
5686 (synopsis "MessagePack (de)serializer")
5687 (description "MessagePack is a fast, compact binary serialization format,
5688 suitable for similar data to JSON. This package provides CPython bindings for
5689 reading and writing MessagePack data.")
5690 (home-page "https://pypi.python.org/pypi/msgpack-python/")
5691 (license license:asl2.0)
5692 (properties `((python2-variant . ,(delay python2-msgpack))))))
5693
5694 (define-public python2-msgpack
5695 (package (inherit (package-with-python2
5696 (strip-python2-variant python-msgpack)))
5697 (native-inputs
5698 `(("python2-setuptools" ,python2-setuptools)))))
5699
5700 (define-public python2-msgpack
5701 (package-with-python2 python-msgpack))
5702
5703 (define-public python-netaddr
5704 (package
5705 (name "python-netaddr")
5706 (version "0.7.18")
5707 (source
5708 (origin
5709 (method url-fetch)
5710 (uri (string-append
5711 "https://pypi.python.org/packages/source/n/netaddr/netaddr-"
5712 version
5713 ".tar.gz"))
5714 (sha256
5715 (base32
5716 "06dxjlbcicq7q3vqy8agq11ra01kvvd47j4mk6dmghjsyzyckxd1"))))
5717 (build-system python-build-system)
5718 (arguments `(#:tests? #f)) ;; No tests.
5719 (inputs
5720 `(("python-setuptools" ,python-setuptools)))
5721 (home-page "https://github.com/drkjam/netaddr/")
5722 (synopsis "Pythonic manipulation of network addresses")
5723 (description
5724 "A Python library for representing and manipulating IPv4, IPv6, CIDR, EUI
5725 and MAC network addresses.")
5726 (license license:bsd-3)))
5727
5728 (define-public python2-netaddr
5729 (package-with-python2 python-netaddr))
5730
5731 (define-public python-wrapt
5732 (package
5733 (name "python-wrapt")
5734 (version "1.10.5")
5735 (source
5736 (origin
5737 (method url-fetch)
5738 (uri (string-append
5739 "https://pypi.python.org/packages/source/w/wrapt/wrapt-"
5740 version
5741 ".tar.gz"))
5742 (sha256
5743 (base32
5744 "0cq8rlpzkxzk48b50yrfhzn1d1hrq4gjcdqlrgq4v5palgiv9jwr"))))
5745 (build-system python-build-system)
5746 (arguments
5747 ;; Tests are not included in the tarball, they are only available in the
5748 ;; git repository.
5749 `(#:tests? #f))
5750 (inputs
5751 `(("python-setuptools" ,python-setuptools)))
5752 (home-page "https://github.com/GrahamDumpleton/wrapt")
5753 (synopsis "Module for decorators, wrappers and monkey patching")
5754 (description
5755 "The aim of the wrapt module is to provide a transparent object proxy for
5756 Python, which can be used as the basis for the construction of function
5757 wrappers and decorator functions.")
5758 (license license:bsd-2)))
5759
5760 (define-public python2-wrapt
5761 (package-with-python2 python-wrapt))
5762
5763 (define-public python-iso8601
5764 (package
5765 (name "python-iso8601")
5766 (version "0.1.11")
5767 (source
5768 (origin
5769 (method url-fetch)
5770 (uri (pypi-uri "iso8601" version))
5771 (sha256
5772 (base32
5773 "0c7gh3lsdjds262h0v1sqc66l7hqgfwbakn96qrhdbl0i3vm5yz8"))))
5774 (build-system python-build-system)
5775 (inputs
5776 `(("python-setuptools" ,python-setuptools)))
5777 (home-page "https://bitbucket.org/micktwomey/pyiso8601")
5778 (synopsis "Module to parse ISO 8601 dates")
5779 (description
5780 "This module parses the most common forms of ISO 8601 date strings (e.g.
5781 @code{2007-01-14T20:34:22+00:00}) into @code{datetime} objects.")
5782 (license license:expat)))
5783
5784 (define-public python2-iso8601
5785 (package-with-python2 python-iso8601))
5786
5787 (define-public python-monotonic
5788 (package
5789 (name "python-monotonic")
5790 (version "0.3")
5791 (source
5792 (origin
5793 (method url-fetch)
5794 (uri (string-append
5795 "https://pypi.python.org/packages/source/m/monotonic/monotonic-"
5796 version
5797 ".tar.gz"))
5798 (sha256
5799 (base32
5800 "0yz0bcbwx8r2c01czzfpbrxddynxyk9k95jj8h6sgcb7xmfvl998"))))
5801 (build-system python-build-system)
5802 (inputs
5803 `(("python-setuptools" ,python-setuptools)))
5804 (home-page "https://github.com/atdt/monotonic")
5805 (synopsis "Implementation of time.monotonic() for Python 2 & < 3.3")
5806 (description
5807 "This module provides a monotonic() function which returns the value (in
5808 fractional seconds) of a clock which never goes backwards.")
5809 (license license:asl2.0)))
5810
5811 (define-public python2-monotonic
5812 (package-with-python2 python-monotonic))
5813
5814 (define-public python-webob
5815 (package
5816 (name "python-webob")
5817 (version "1.5.1")
5818 (source
5819 (origin
5820 (method url-fetch)
5821 (uri (pypi-uri "WebOb" version))
5822 (sha256
5823 (base32
5824 "02bhhzijfhv8hmi1i54d4b0v43liwhnywhflvxsv4x3zax9s3afq"))))
5825 (build-system python-build-system)
5826 (inputs
5827 `(("python-nose" ,python-nose)
5828 ("python-setuptools" ,python-setuptools)))
5829 (home-page "http://webob.org/")
5830 (synopsis "WSGI request and response object")
5831 (description
5832 "WebOb provides wrappers around the WSGI request environment, and an
5833 object to help create WSGI responses.")
5834 (license license:expat)))
5835
5836 (define-public python2-webob
5837 (package-with-python2 python-webob))
5838
5839 (define-public python-xlrd
5840 (package
5841 (name "python-xlrd")
5842 (version "0.9.4")
5843 (source (origin
5844 (method url-fetch)
5845 (uri (string-append "https://pypi.python.org/packages/source/x/"
5846 "xlrd/xlrd-" version ".tar.gz"))
5847 (sha256
5848 (base32
5849 "0wpa55nvidmm5m2qr622dsh3cj46akdk0h3zjgzschcmydck73cf"))))
5850 (build-system python-build-system)
5851 (arguments
5852 `(#:phases
5853 (modify-phases %standard-phases
5854 ;; Current test in setup.py does not work as of 0.9.4, so use nose to
5855 ;; run tests instead for now.
5856 (replace 'check (lambda _ (zero? (system* "nosetests")))))))
5857 (native-inputs `(("python-nose" ,python-nose)
5858 ("python-setuptools" ,python-setuptools)))
5859 (home-page "http://www.python-excel.org/")
5860 (synopsis "Library for extracting data from Excel files")
5861 (description "This packages provides a library to extract data from
5862 spreadsheets using Microsoft Excel proprietary file formats @samp{.xls} and
5863 @samp{.xlsx} (versions 2.0 onwards). It has support for Excel dates and is
5864 Unicode-aware. It is not intended as an end-user tool.")
5865 (license license:bsd-3)))
5866
5867 (define-public python2-xlrd
5868 (package-with-python2 python-xlrd))
5869
5870 (define-public python-prettytable
5871 (package
5872 (name "python-prettytable")
5873 (version "0.7.2")
5874 (source
5875 (origin
5876 (method url-fetch)
5877 (uri (string-append
5878 "https://pypi.python.org/packages/source/P/PrettyTable/"
5879 "prettytable-" version ".tar.bz2"))
5880 (sha256
5881 (base32
5882 "0diwsicwmiq2cpzpxri7cyl5fmsvicafw6nfqf6p6p322dji2g45"))))
5883 (build-system python-build-system)
5884 (inputs
5885 `(("python-setuptools" ,python-setuptools)))
5886 (home-page "http://code.google.com/p/prettytable/")
5887 (synopsis "Display tabular data in an ASCII table format")
5888 (description
5889 "A library designed to represent tabular data in visually appealing ASCII
5890 tables. PrettyTable allows for selection of which columns are to be printed,
5891 independent alignment of columns (left or right justified or centred) and
5892 printing of sub-tables by specifying a row range.")
5893 (license license:bsd-3)))
5894
5895 (define-public python2-prettytable
5896 (package-with-python2 python-prettytable))
5897
5898 (define-public python-tables
5899 (package
5900 (name "python-tables")
5901 (version "3.2.2")
5902 (source
5903 (origin
5904 (method url-fetch)
5905 (uri (pypi-uri "tables" version))
5906 (sha256
5907 (base32
5908 "117s6w7s3yxafpmf3zz3svana7xfrsviw01va1xp7h8ylx8v6r1m"))))
5909 (build-system python-build-system)
5910 (arguments
5911 `(;; FIXME: python-build-system does not pass configure-flags to "build"
5912 ;; or "check", so we must override the build and check phases.
5913 #:phases
5914 (modify-phases %standard-phases
5915 (add-after 'unpack 'use-gcc
5916 (lambda _
5917 (substitute* "setup.py"
5918 (("compiler = new_compiler\\(\\)" line)
5919 (string-append line
5920 "\ncompiler.set_executables(compiler='gcc',"
5921 "compiler_so='gcc',"
5922 "linker_exe='gcc',"
5923 "linker_so='gcc -shared')")))
5924 #t))
5925 (replace 'build
5926 (lambda* (#:key inputs #:allow-other-keys)
5927 (zero? (system* "python" "setup.py" "build"
5928 (string-append "--hdf5="
5929 (assoc-ref inputs "hdf5"))))))
5930 (replace 'check
5931 (lambda* (#:key inputs #:allow-other-keys)
5932 (zero? (system* "python" "setup.py" "check"
5933 (string-append "--hdf5="
5934 (assoc-ref inputs "hdf5")))))))))
5935 (propagated-inputs
5936 `(("python-numexpr" ,python-numexpr)
5937 ("python-numpy" ,python-numpy)))
5938 (native-inputs
5939 `(("python-setuptools" ,python-setuptools)
5940 ("python-cython" ,python-cython)
5941 ("pkg-config" ,pkg-config)))
5942 (inputs
5943 `(("hdf5" ,hdf5)
5944 ("bzip2" ,bzip2)
5945 ("zlib" ,zlib)))
5946 (home-page "http://www.pytables.org/")
5947 (synopsis "Hierarchical datasets for Python")
5948 (description "PyTables is a package for managing hierarchical datasets and
5949 designed to efficently cope with extremely large amounts of data.")
5950 (license license:bsd-3)))
5951
5952 (define-public python2-tables
5953 (package-with-python2 python-tables))
5954
5955 (define-public python-pyasn1
5956 (package
5957 (name "python-pyasn1")
5958 (version "0.1.8")
5959 (source
5960 (origin
5961 (method url-fetch)
5962 (uri (string-append "https://pypi.python.org/packages/source/p/"
5963 "pyasn1/pyasn1-" version ".tar.gz"))
5964 (sha256
5965 (base32
5966 "0iw31d9l0zwx35szkzq72hiw002wnqrlrsi9dpbrfngcl1ybwcsx"))))
5967 (build-system python-build-system)
5968 (home-page "http://pyasn1.sourceforge.net/")
5969 (synopsis "ASN.1 types and codecs")
5970 (description
5971 "This is an implementation of ASN.1 types and codecs in Python. It is
5972 suitable for a wide range of protocols based on the ASN.1 specification.")
5973 (license license:bsd-2)))
5974
5975 (define-public python2-pyasn1
5976 (package-with-python2 python-pyasn1))
5977
5978 (define-public python-pyasn1-modules
5979 (package
5980 (name "python-pyasn1-modules")
5981 (version "0.0.8")
5982 (source
5983 (origin
5984 (method url-fetch)
5985 (uri (pypi-uri "pyasn1-modules" version))
5986 (sha256
5987 (base32
5988 "0drqgw81xd3fxdlg89kgd79zzrabvfncvkbybi2wr6w2y4s1jmhh"))))
5989 (build-system python-build-system)
5990 (native-inputs
5991 `(("python-setuptools" ,python-setuptools)))
5992 (propagated-inputs
5993 `(("python-pyasn1" ,python-pyasn1)))
5994 (home-page "http://sourceforge.net/projects/pyasn1/")
5995 (synopsis "ASN.1 codec implementations")
5996 (description
5997 "Pyasn1-modules is a collection of Python modules providing ASN.1 types and
5998 implementations of ASN.1-based codecs and protocols.")
5999 (license license:bsd-3)))
6000
6001 (define-public python2-pyasn1-modules
6002 (package-with-python2 python-pyasn1-modules))
6003
6004 (define-public python-ipaddress
6005 (package
6006 (name "python-ipaddress")
6007 (version "1.0.16")
6008 (source (origin
6009 (method url-fetch)
6010 (uri (pypi-uri "ipaddress" version))
6011 (sha256
6012 (base32
6013 "1c3imabdrw8nfksgjjflzg7h4ynjckqacb188rf541m74arq4cas"))))
6014 (build-system python-build-system)
6015 (home-page "https://github.com/phihag/ipaddress")
6016 (synopsis "IP address manipulation library")
6017 (description
6018 "This package provides a fast, lightweight IPv4/IPv6 manipulation library
6019 in Python. This library is used to create, poke at, and manipulate IPv4 and
6020 IPv6 addresses and networks. This is a port of the Python 3.3 ipaddress
6021 module to older versions of Python.")
6022 (license license:psfl)
6023 (properties `((python2-variant . ,(delay python2-ipaddress))))))
6024
6025 (define-public python2-ipaddress
6026 (let ((base (package-with-python2 (strip-python2-variant python-ipaddress))))
6027 (package (inherit base)
6028 (native-inputs
6029 `(("python2-setuptools" ,python2-setuptools)
6030 ,@(package-native-inputs base))))))
6031
6032 (define-public python2-ipaddr
6033 (package
6034 (name "python2-ipaddr")
6035 (version "2.1.11")
6036 (source
6037 (origin
6038 (method url-fetch)
6039 (uri (pypi-uri "ipaddr" version))
6040 (sha256
6041 (base32 "1dwq3ngsapjc93fw61rp17fvzggmab5x1drjzvd4y4q0i255nm8v"))))
6042 (build-system python-build-system)
6043 (arguments
6044 `(#:python ,python-2 ;version 2 only
6045 #:phases
6046 (modify-phases %standard-phases
6047 (replace 'check
6048 (lambda* _
6049 (zero? (system* "python" "ipaddr_test.py")))))))
6050 (home-page "https://github.com/google/ipaddr-py")
6051 (synopsis "IP address manipulation library")
6052 (description
6053 "Ipaddr is a Python@tie{}2 library for creating and manupilating IPv4 and
6054 IPv6 addresses and networks.
6055
6056 For new implementations you may prefer to use the standard module
6057 @code{ipaddress}, which was introduced in Python 3.3 and backported to older
6058 versions of Python.")
6059 (license license:asl2.0)))
6060
6061 (define-public python-idna
6062 (package
6063 (name "python-idna")
6064 (version "2.0")
6065 (source
6066 (origin
6067 (method url-fetch)
6068 (uri (string-append "https://pypi.python.org/packages/source/i/"
6069 "idna/idna-" version ".tar.gz"))
6070 (sha256
6071 (base32
6072 "0frxgmgi234lr9hylg62j69j4ik5zhg0wz05w5dhyacbjfnrl68n"))))
6073 (build-system python-build-system)
6074 (native-inputs
6075 `(("python-setuptools" ,python-setuptools)))
6076 (home-page "https://github.com/kjd/idna")
6077 (synopsis "Internationalized domain names in applications")
6078 (description
6079 "This is a library to support the Internationalised Domain Names in
6080 Applications (IDNA) protocol as specified in RFC 5891. This version of the
6081 protocol is often referred to as “IDNA2008” and can produce different results
6082 from the earlier standard from 2003. The library is also intended to act as a
6083 suitable drop-in replacement for the “encodings.idna” module that comes with
6084 the Python standard library but currently only supports the older 2003
6085 specification.")
6086 (license license:bsd-4)))
6087
6088 (define-public python2-idna
6089 (package-with-python2 python-idna))
6090
6091 (define-public python-pretend
6092 (package
6093 (name "python-pretend")
6094 (version "1.0.8")
6095 (source
6096 (origin
6097 (method url-fetch)
6098 (uri (string-append "https://pypi.python.org/packages/source/p/"
6099 "pretend/pretend-" version ".tar.gz"))
6100 (sha256
6101 (base32
6102 "0r5r7ygz9m6d2bklflbl84cqhjkc2q12xgis8268ygjh30g2q3wk"))))
6103 (build-system python-build-system)
6104 (native-inputs
6105 `(("python-setuptools" ,python-setuptools)))
6106 (home-page "https://github.com/alex/pretend")
6107 (synopsis "Library for stubbing in Python")
6108 (description
6109 "Pretend is a library to make stubbing with Python easier. Stubbing is a
6110 technique for writing tests. You may hear the term mixed up with mocks,
6111 fakes, or doubles. Basically, a stub is an object that returns pre-canned
6112 responses, rather than doing any computation.")
6113 (license license:bsd-3)))
6114
6115 (define-public python2-pretend
6116 (package-with-python2 python-pretend))
6117
6118 (define-public python-cryptography-vectors
6119 (package
6120 (name "python-cryptography-vectors")
6121 (version "1.3.4")
6122 (source
6123 (origin
6124 (method url-fetch)
6125 (uri (pypi-uri "cryptography_vectors" version))
6126 (sha256
6127 (base32
6128 "15h1iz2klnpb4f8djxy7cpbnyn3wbjp7bnj4pz6s7w6plghbq524"))))
6129 (build-system python-build-system)
6130 (native-inputs
6131 `(("python-setuptools" ,python-setuptools)))
6132 (home-page "https://github.com/pyca/cryptography")
6133 (synopsis "Test vectors for the cryptography package")
6134 (description
6135 "This package contains test vectors for the cryptography package.")
6136 ;; Distributed under either BSD-3 or ASL2.0
6137 (license (list license:bsd-3 license:asl2.0))))
6138
6139 (define-public python2-cryptography-vectors
6140 (package-with-python2 python-cryptography-vectors))
6141
6142 (define-public python-cryptography
6143 (package
6144 (name "python-cryptography")
6145 (version "1.3.4")
6146 (source
6147 (origin
6148 (method url-fetch)
6149 (uri (pypi-uri "cryptography" version))
6150 (sha256
6151 (base32
6152 "1a85l548w5vvq3yhz0az7ajg2ijixzp6gagapw6wgrqvq28ghgs2"))))
6153 (build-system python-build-system)
6154 (inputs
6155 `(("openssl" ,openssl)))
6156 (propagated-inputs
6157 `(("python-cffi" ,python-cffi)
6158 ("python-six" ,python-six)
6159 ("python-pyasn1" ,python-pyasn1)
6160 ("python-idna" ,python-idna)
6161 ("python-iso8601" ,python-iso8601)))
6162 (native-inputs
6163 `(("python-cryptography-vectors" ,python-cryptography-vectors)
6164 ("python-hypothesis" ,python-hypothesis)
6165 ("python-setuptools" ,python-setuptools)
6166 ("python-pretend" ,python-pretend)
6167 ("python-pyasn1" ,python-pyasn1)
6168 ("python-pyasn1-modules" ,python-pyasn1-modules)
6169 ("python-pytest" ,python-pytest)))
6170 (home-page "https://github.com/pyca/cryptography")
6171 (synopsis "Cryptographic recipes and primitives for Python")
6172 (description
6173 "cryptography is a package which provides cryptographic recipes and
6174 primitives to Python developers. It aims to be the “cryptographic standard
6175 library” for Python. The package includes both high level recipes, and low
6176 level interfaces to common cryptographic algorithms such as symmetric ciphers,
6177 message digests and key derivation functions.")
6178 ;; Distributed under either BSD-3 or ASL2.0
6179 (license (list license:bsd-3 license:asl2.0))
6180 (properties `((python2-variant . ,(delay python2-cryptography))))))
6181
6182 (define-public python2-cryptography
6183 (let ((crypto (package-with-python2
6184 (strip-python2-variant python-cryptography))))
6185 (package (inherit crypto)
6186 (propagated-inputs
6187 `(("python2-ipaddress" ,python2-ipaddress)
6188 ("python2-backport-ssl-match-hostname"
6189 ,python2-backport-ssl-match-hostname)
6190 ("python2-enum34" ,python2-enum34)
6191 ,@(package-propagated-inputs crypto))))))
6192
6193 (define-public python-pyopenssl
6194 (package
6195 (name "python-pyopenssl")
6196 (version "16.0.0")
6197 (source
6198 (origin
6199 (method url-fetch)
6200 (uri (string-append "https://pypi.python.org/packages/source/p/"
6201 "pyOpenSSL/pyOpenSSL-" version ".tar.gz"))
6202 (sha256
6203 (base32
6204 "0zfijaxlq4vgi6jz0d4i5xq9ygqnyps6br7lmigjhqnh8gp10g9n"))))
6205 (build-system python-build-system)
6206 (propagated-inputs
6207 `(("python-cryptography" ,python-cryptography)
6208 ("python-six" ,python-six)))
6209 (inputs
6210 `(("openssl" ,openssl)))
6211 (native-inputs
6212 `(("python-setuptools" ,python-setuptools)))
6213 (home-page "https://github.com/pyca/pyopenssl")
6214 (synopsis "Python wrapper module around the OpenSSL library")
6215 (description
6216 "PyOpenSSL is a high-level wrapper around a subset of the OpenSSL
6217 library.")
6218 (license license:asl2.0)))
6219
6220 (define-public python2-pyopenssl
6221 (package-with-python2 python-pyopenssl))
6222
6223 (define-public python-pip
6224 (package
6225 (name "python-pip")
6226 (version "8.0.2")
6227 (source
6228 (origin
6229 (method url-fetch)
6230 (uri (pypi-uri "pip" version))
6231 (sha256
6232 (base32
6233 "08cm8d4228fj0qnrysy3qv1a6022zr3dcs25amd14lgxil6vvx26"))))
6234 (build-system python-build-system)
6235 (inputs
6236 `(("python-setuptools" ,python-setuptools)
6237 ("python-virtualenv" ,python-virtualenv)
6238 ;; Tests
6239 ("python-mock" ,python-mock)
6240 ("python-pytest" ,python-pytest)
6241 ("python-scripttest" ,python-scripttest)))
6242 (home-page "https://pip.pypa.io/")
6243 (synopsis
6244 "Package manager for Python software")
6245 (description
6246 "Pip is a package manager for Python software, that finds packages on the
6247 Python Package Index (PyPI).")
6248 (license license:expat)))
6249
6250 (define-public python2-pip
6251 (package-with-python2 python-pip))
6252
6253 (define-public python-tlsh
6254 (package
6255 (name "python-tlsh")
6256 (version "3.4.4")
6257 (home-page "https://github.com/trendmicro/tlsh")
6258 (source (origin
6259 (method url-fetch)
6260 (uri (string-append "https://github.com/trendmicro/tlsh/archive/v"
6261 version ".tar.gz"))
6262 (sha256
6263 (base32
6264 "00bhzjqrlh7v538kbkbn8lgx976j1138al3sdhklaizqjvpwyk4r"))
6265 (file-name (string-append name "-" version ".tar.gz"))))
6266 (build-system cmake-build-system)
6267 (arguments
6268 '(#:out-of-source? #f
6269 #:phases (modify-phases %standard-phases
6270 (replace
6271 'install
6272 (lambda* (#:key outputs #:allow-other-keys)
6273 ;; Build and install the Python bindings. The underlying
6274 ;; C++ library is apparently not meant to be installed.
6275 (let ((out (assoc-ref outputs "out")))
6276 (with-directory-excursion "py_ext"
6277 (and (system* "python" "setup.py" "build")
6278 (system* "python" "setup.py" "install"
6279 (string-append "--prefix=" out))))))))))
6280 (inputs `(("python" ,python-wrapper))) ;for the bindings
6281 (synopsis "Fuzzy matching library for Python")
6282 (description
6283 "Trend Micro Locality Sensitive Hash (TLSH) is a fuzzy matching library.
6284 Given a byte stream with a minimum length of 256 bytes, TLSH generates a hash
6285 value which can be used for similarity comparisons. Similar objects have
6286 similar hash values, which allows for the detection of similar objects by
6287 comparing their hash values. The byte stream should have a sufficient amount
6288 of complexity; for example, a byte stream of identical bytes will not generate
6289 a hash value.")
6290 (license license:asl2.0)))
6291
6292 (define-public python2-tlsh
6293 (package
6294 (inherit python-tlsh)
6295 (name "python2-tlsh")
6296 (inputs `(("python" ,python-2)))))
6297
6298 (define-public python-libarchive-c
6299 (package
6300 (name "python-libarchive-c")
6301 (version "2.2")
6302 (source (origin
6303 (method url-fetch)
6304 (uri (pypi-uri "libarchive-c" version))
6305 (sha256
6306 (base32
6307 "0z4r7v3dhd6b3120mav05ff08srih176r2rg5k8kn7mjd9pslm2x"))))
6308 (build-system python-build-system)
6309 (arguments
6310 '(#:phases (modify-phases %standard-phases
6311 (add-before
6312 'build 'reference-libarchive
6313 (lambda* (#:key inputs #:allow-other-keys)
6314 ;; Retain the absolute file name of libarchive.so.
6315 (let ((libarchive (assoc-ref inputs "libarchive")))
6316 (substitute* "libarchive/ffi.py"
6317 (("find_library\\('archive'\\)")
6318 (string-append "'" libarchive
6319 "/lib/libarchive.so'"))))
6320
6321 ;; Do not make a compressed egg (see
6322 ;; <http://bugs.gnu.org/20765>).
6323 (let ((port (open-file "setup.cfg" "a")))
6324 (display "\n[easy_install]\nzip_ok = 0\n"
6325 port)
6326 (close-port port)
6327 #t))))))
6328 (inputs
6329 `(("python-setuptools" ,python-setuptools)
6330 ("libarchive" ,libarchive)))
6331 (home-page "https://github.com/Changaco/python-libarchive-c")
6332 (synopsis "Python interface to libarchive")
6333 (description
6334 "This package provides Python bindings to libarchive, a C library to
6335 access possibly compressed archives in many different formats. It uses
6336 Python's @code{ctypes} foreign function interface (FFI).")
6337 (license license:lgpl2.0+)))
6338
6339 (define-public python2-libarchive-c
6340 (package-with-python2 python-libarchive-c))
6341
6342 (define-public python-file
6343 (package
6344 (inherit file)
6345 (name "python-file")
6346 (build-system python-build-system)
6347 (arguments
6348 '(#:tests? #f ;no tests
6349 #:phases (modify-phases %standard-phases
6350 (add-before 'build 'change-directory
6351 (lambda _
6352 (chdir "python")
6353 #t))
6354 (add-before 'build 'set-library-file-name
6355 (lambda* (#:key inputs #:allow-other-keys)
6356 (let ((file (assoc-ref inputs "file")))
6357 (substitute* "magic.py"
6358 (("find_library\\('magic'\\)")
6359 (string-append "'" file "/lib/libmagic.so'")))
6360 #t))))))
6361 (inputs `(("file" ,file)))
6362 (self-native-input? #f)
6363 (synopsis "Python bindings to the libmagic file type guesser. Note that
6364 this module and the python-magic module both provide a \"magic.py\" file;
6365 these two modules, which are different and were developed separately, both
6366 serve the same purpose: provide Python bindings for libmagic.")))
6367
6368 (define-public python2-file
6369 (package-with-python2 python-file))
6370
6371 (define-public python-debian
6372 (package
6373 (name "python-debian")
6374 (version "0.1.23")
6375 (source
6376 (origin
6377 (method url-fetch)
6378 (uri (string-append
6379 "https://pypi.python.org/packages/source/p/python-debian/python-debian-"
6380 version ".tar.gz"))
6381 (sha256
6382 (base32
6383 "193faznwnjc3n5991wyzim6h9gyq1zxifmfrnpm3avgkh7ahyynh"))))
6384 (build-system python-build-system)
6385 (inputs
6386 `(("python-six" ,python-six)))
6387 (native-inputs
6388 `(("python-setuptools" ,python-setuptools)))
6389 (home-page "http://packages.debian.org/sid/python-debian")
6390 (synopsis "Debian package related modules")
6391 (description
6392 ;; XXX: Use @enumerate instead of @itemize to work around
6393 ;; <http://bugs.gnu.org/21772>.
6394 "This package provides Python modules that abstract many formats of
6395 Debian-related files, such as:
6396
6397 @enumerate
6398 @item Debtags information;
6399 @item @file{debian/changelog} files;
6400 @item packages files, pdiffs;
6401 @item control files of single or multiple RFC822-style paragraphs---e.g.
6402 @file{debian/control}, @file{.changes}, @file{.dsc};
6403 @item Raw @file{.deb} and @file{.ar} files, with (read-only) access to
6404 contained files and meta-information.
6405 @end enumerate\n")
6406
6407 ;; Modules are either GPLv2+ or GPLv3+.
6408 (license license:gpl3+)))
6409
6410 (define-public python2-debian
6411 (package-with-python2 python-debian))
6412
6413 (define-public python-chardet
6414 (package
6415 (name "python-chardet")
6416 (version "2.3.0")
6417 (source
6418 (origin
6419 (method url-fetch)
6420 (uri (string-append
6421 "https://pypi.python.org/packages/source/c/chardet/chardet-"
6422 version
6423 ".tar.gz"))
6424 (sha256
6425 (base32
6426 "1ak87ikcw34fivcgiz2xvi938dmclh078az65l9x3rmgljrkhgp5"))))
6427 (build-system python-build-system)
6428 (native-inputs
6429 `(("python-setuptools" ,python-setuptools)))
6430 (home-page "https://github.com/chardet/chardet")
6431 (synopsis "Universal encoding detector for Python 2 and 3")
6432 (description
6433 "This package provides @code{chardet}, a Python module that can
6434 automatically detect a wide range of file encodings.")
6435 (license license:lgpl2.1+)))
6436
6437 (define-public python2-chardet
6438 (package-with-python2 python-chardet))
6439
6440 (define-public python-docopt
6441 (package
6442 (name "python-docopt")
6443 (version "0.6.2")
6444 (source
6445 (origin
6446 (method url-fetch)
6447 ;; The release on PyPI does not include tests.
6448 (uri (string-append
6449 "https://github.com/docopt/docopt/archive/"
6450 version ".tar.gz"))
6451 (file-name (string-append name "-" version ".tar.gz"))
6452 (sha256
6453 (base32
6454 "16bf890xbdz3m30rsv2qacklh2rdn1zrfspfnwzx9g7vwz8yw4r1"))))
6455 (build-system python-build-system)
6456 (native-inputs
6457 `(("python-pytest" ,python-pytest)
6458 ("python-setuptools" ,python-setuptools)))
6459 (arguments
6460 `(#:phases (alist-replace
6461 'check
6462 (lambda _ (zero? (system* "py.test")))
6463 %standard-phases)))
6464 (home-page "http://docopt.org")
6465 (synopsis "Command-line interface description language for Python")
6466 (description "This library allows the user to define a command-line
6467 interface from a program's help message rather than specifying it
6468 programatically with command-line parsers like @code{getopt} and
6469 @code{argparse}.")
6470 (license license:expat)))
6471
6472 (define-public python2-docopt
6473 (package-with-python2 python-docopt))
6474
6475 (define-public python-zope-event
6476 (package
6477 (name "python-zope-event")
6478 (version "4.1.0")
6479 (source
6480 (origin
6481 (method url-fetch)
6482 (uri (string-append "https://pypi.python.org/packages/source/z"
6483 "/zope.event/zope.event-" version ".tar.gz"))
6484 (sha256
6485 (base32
6486 "11p75zpfz3ffhz21nzx9wb23xs993ck5s6hkjcvhswwizni5jynw"))))
6487 (build-system python-build-system)
6488 (inputs
6489 `(("python-setuptools" ,python-setuptools)))
6490 (home-page "http://pypi.python.org/pypi/zope.event")
6491 (synopsis "Event publishing system for Python")
6492 (description "Zope.event provides an event publishing API, intended for
6493 use by applications which are unaware of any subscribers to their events. It
6494 is a simple event-dispatching system on which more sophisticated event
6495 dispatching systems can be built.")
6496 (license license:zpl2.1)))
6497
6498 (define-public python2-zope-event
6499 (package-with-python2 python-zope-event))
6500
6501 (define-public python-zope-interface
6502 (package
6503 (name "python-zope-interface")
6504 (version "4.1.3")
6505 (source
6506 (origin
6507 (method url-fetch)
6508 (uri (string-append "https://pypi.python.org/packages/source/z"
6509 "/zope.interface/zope.interface-" version ".tar.gz"))
6510 (sha256
6511 (base32
6512 "0ks8h73b2g4bkad821qbv0wzjppdrwys33i7ka45ik3wxjg1l8if"))))
6513 (build-system python-build-system)
6514 (propagated-inputs
6515 `(("python-zope-event" ,python-zope-event)))
6516 (home-page "https://github.com/zopefoundation/zope.interface")
6517 (synopsis "Python implementation of the \"design by contract\"
6518 methodology")
6519 (description "Zope.interface provides an implementation of \"object
6520 interfaces\" for Python. Interfaces are a mechanism for labeling objects as
6521 conforming to a given API or contract.")
6522 (license license:zpl2.1)))
6523
6524 (define-public python2-zope-interface
6525 (package-with-python2 python-zope-interface))
6526
6527 (define-public python-zope-exceptions
6528 (package
6529 (name "python-zope-exceptions")
6530 (version "4.0.8")
6531 (source
6532 (origin
6533 (method url-fetch)
6534 (uri (string-append "https://pypi.python.org/packages/source/z"
6535 "/zope.exceptions/zope.exceptions-"
6536 version ".tar.gz"))
6537 (sha256
6538 (base32
6539 "0zwxaaa66sqxg5k7zcrvs0fbg9ym1njnxnr28dfmchzhwjvwnfzl"))))
6540 (build-system python-build-system)
6541 (arguments
6542 '(#:tests? #f)) ; circular dependency with zope.testrunner
6543 (propagated-inputs
6544 `(("python-zope-interface" ,python-zope-interface)))
6545 (home-page "http://cheeseshop.python.org/pypi/zope.exceptions")
6546 (synopsis "Zope exceptions")
6547 (description "Zope.exceptions provides general-purpose exception types
6548 that have uses outside of the Zope framework.")
6549 (license license:zpl2.1)))
6550
6551 (define-public python2-zope-exceptions
6552 (package-with-python2 python-zope-exceptions))
6553
6554 (define-public python-zope-testing
6555 (package
6556 (name "python-zope-testing")
6557 (version "4.5.0")
6558 (source
6559 (origin
6560 (method url-fetch)
6561 (uri (string-append "https://pypi.python.org/packages/source/z"
6562 "/zope.testing/zope.testing-" version ".tar.gz"))
6563 (sha256
6564 (base32
6565 "1yvglxhzvhl45mndvn9gskx2ph30zz1bz7rrlyfs62fv2pvih90s"))))
6566 (build-system python-build-system)
6567 (native-inputs
6568 `(("python-zope-exceptions" ,python-zope-exceptions)))
6569 (propagated-inputs
6570 `(("python-zope-interface" ,python-zope-interface)))
6571 (home-page "http://pypi.python.org/pypi/zope.testing")
6572 (synopsis "Zope testing helpers")
6573 (description "Zope.testing provides a number of testing utilities for HTML
6574 forms, HTTP servers, regular expressions, and more.")
6575 (license license:zpl2.1)))
6576
6577 (define-public python2-zope-testing
6578 (package-with-python2 python-zope-testing))
6579
6580 (define-public python-zope-testrunner
6581 (package
6582 (name "python-zope-testrunner")
6583 (version "4.4.9")
6584 (source
6585 (origin
6586 (method url-fetch)
6587 (uri (string-append "https://pypi.python.org/packages/source/z"
6588 "/zope.testrunner/zope.testrunner-"
6589 version ".zip"))
6590 (sha256
6591 (base32
6592 "1r7iqknhh55y45f64mz5hghgvzx34h1i11k350s0avx6q8gznja1"))))
6593 (build-system python-build-system)
6594 (native-inputs
6595 `(("python-six" ,python-six)
6596 ("python-zope-exceptions" ,python-zope-exceptions)
6597 ("python-zope-testing" ,python-zope-testing)
6598 ("unzip" ,unzip)))
6599 (propagated-inputs
6600 `(("python-zope-interface" ,python-zope-interface)))
6601 (home-page "http://pypi.python.org/pypi/zope.testrunner")
6602 (synopsis "Zope testrunner script")
6603 (description "Zope.testrunner provides a script for running Python
6604 tests.")
6605 (license license:zpl2.1)))
6606
6607 (define-public python2-zope-testrunner
6608 (let ((base (package-with-python2 python-zope-testrunner)))
6609 (package
6610 (inherit base)
6611 (native-inputs
6612 (append (package-native-inputs base)
6613 `(("python2-subunit" ,python2-subunit)
6614 ("python2-mimeparse" ,python2-mimeparse)))))))
6615
6616 (define-public python-zope-i18nmessageid
6617 (package
6618 (name "python-zope-i18nmessageid")
6619 (version "4.0.3")
6620 (source
6621 (origin
6622 (method url-fetch)
6623 (uri (string-append
6624 "https://pypi.python.org/packages/source/z"
6625 "/zope.i18nmessageid/zope.i18nmessageid-"
6626 version ".tar.gz"))
6627 (sha256
6628 (base32
6629 "1rslyph0klk58dmjjy4j0jxy21k03azksixc3x2xhqbkv97cmzml"))))
6630 (build-system python-build-system)
6631 (inputs
6632 `(("python-setuptools" ,python-setuptools)))
6633 (home-page "http://pypi.python.org/pypi/zope.i18nmessageid")
6634 (synopsis "Message identifiers for internationalization")
6635 (description "Zope.i18nmessageid provides facilities for declaring
6636 internationalized messages within program source text.")
6637 (license license:zpl2.1)))
6638
6639 (define-public python2-zope-i18nmessageid
6640 (package-with-python2 python-zope-i18nmessageid))
6641
6642 (define-public python-zope-schema
6643 (package
6644 (name "python-zope-schema")
6645 (version "4.4.2")
6646 (source
6647 (origin
6648 (method url-fetch)
6649 (uri (string-append "https://pypi.python.org/packages/source/z"
6650 "/zope.schema/zope.schema-" version ".tar.gz"))
6651 (sha256
6652 (base32
6653 "1p943jdxb587dh7php4vx04qvn7b2877hr4qs5zyckvp5afhhank"))))
6654 (build-system python-build-system)
6655 (propagated-inputs
6656 `(("python-zope-event" ,python-zope-event)
6657 ("python-zope-interface" ,python-zope-interface)))
6658 (native-inputs
6659 `(("python-zope-testing" ,python-zope-testing)))
6660 (home-page "http://pypi.python.org/pypi/zope.schema")
6661 (synopsis "Zope data schemas")
6662 (description "Zope.scheme provides extensions to zope.interface for
6663 defining data schemas.")
6664 (license license:zpl2.1)))
6665
6666 (define-public python2-zope-schema
6667 (package-with-python2 python-zope-schema))
6668
6669 (define-public python-zope-configuration
6670 (package
6671 (name "python-zope-configuration")
6672 (version "4.0.3")
6673 (source (origin
6674 (method url-fetch)
6675 (uri (string-append "https://pypi.python.org/packages/source/z"
6676 "/zope.configuration/zope.configuration-"
6677 version ".tar.gz"))
6678 (sha256
6679 (base32
6680 "1x9dfqypgympnlm25p9m43xh4qv3p7d75vksv9pzqibrb4cggw5n"))))
6681 (build-system python-build-system)
6682 (propagated-inputs
6683 `(("python-zope-i18nmessageid" ,python-zope-i18nmessageid)
6684 ("python-zope-schema" ,python-zope-schema)))
6685 (home-page "http://pypi.python.org/pypi/zope.configuration")
6686 (synopsis "Zope Configuration Markup Language")
6687 (description "Zope.configuration implements ZCML, the Zope Configuration
6688 Markup Language.")
6689 (license license:zpl2.1)))
6690
6691 (define-public python2-zope-configuration
6692 (package-with-python2 python-zope-configuration))
6693
6694 (define-public python-zope-proxy
6695 (package
6696 (name "python-zope-proxy")
6697 (version "4.1.6")
6698 (source
6699 (origin
6700 (method url-fetch)
6701 (uri (string-append "https://pypi.python.org/packages/source/z"
6702 "/zope.proxy/zope.proxy-" version ".tar.gz"))
6703 (sha256
6704 (base32
6705 "0pqwwmvm1prhwv1ziv9lp8iirz7xkwb6n2kyj36p2h0ppyyhjnm4"))))
6706 (build-system python-build-system)
6707 (propagated-inputs
6708 `(("python-zope-interface" ,python-zope-interface)))
6709 (home-page "http://pypi.python.org/pypi/zope.proxy")
6710 (synopsis "Generic, transparent proxies")
6711 (description "Zope.proxy provides generic, transparent proxies for Python.
6712 Proxies are special objects which serve as mostly-transparent wrappers around
6713 another object, intervening in the apparent behavior of the wrapped object
6714 only when necessary to apply the policy (e.g., access checking, location
6715 brokering, etc.) for which the proxy is responsible.")
6716 (license license:zpl2.1)))
6717
6718 (define-public python2-zope-proxy
6719 (package-with-python2 python-zope-proxy))
6720
6721 (define-public python-zope-location
6722 (package
6723 (name "python-zope-location")
6724 (version "4.0.3")
6725 (source
6726 (origin
6727 (method url-fetch)
6728 (uri (string-append "https://pypi.python.org/packages/source/z"
6729 "/zope.location/zope.location-" version ".tar.gz"))
6730 (sha256
6731 (base32
6732 "1nj9da4ksiyv3h8n2vpzwd0pb03mdsh7zy87hfpx72b6p2zcwg74"))))
6733 (build-system python-build-system)
6734 (native-inputs
6735 `(("python-zope-proxy" ,python-zope-proxy)
6736 ("python-zope-schema" ,python-zope-schema)))
6737 (home-page "http://pypi.python.org/pypi/zope.location/")
6738 (synopsis "Zope location library")
6739 (description "Zope.location implements the concept of \"locations\" in
6740 Zope3, which are are special objects that have a structural location.")
6741 (license license:zpl2.1)))
6742
6743 (define-public python2-zope-location
6744 (package-with-python2 python-zope-location))
6745
6746 (define-public python-zope-security
6747 (package
6748 (name "python-zope-security")
6749 (version "4.0.3")
6750 (source
6751 (origin
6752 (method url-fetch)
6753 (uri (string-append "https://pypi.python.org/packages/source/z"
6754 "/zope.security/zope.security-" version ".tar.gz"))
6755 (sha256
6756 (base32
6757 "14zmf684amc0x32kq05yxnhfqd1cmyhafkw05gn81rn90zjv6ssy"))))
6758 (build-system python-build-system)
6759 (propagated-inputs
6760 `(("python-zope-i18nmessageid" ,python-zope-i18nmessageid)
6761 ("python-zope-component" ,python-zope-component)
6762 ("python-zope-location" ,python-zope-location)
6763 ("python-zope-proxy" ,python-zope-proxy)
6764 ("python-zope-schema" ,python-zope-schema)
6765 ("python-zope-testrunner" ,python-zope-testrunner)
6766 ("python-zope-testing" ,python-zope-testing)))
6767 (home-page "http://pypi.python.org/pypi/zope.security")
6768 (synopsis "Zope security framework")
6769 (description "Zope.security provides a generic mechanism to implement
6770 security policies on Python objects.")
6771 (license license:zpl2.1)))
6772
6773 (define-public python2-zope-security
6774 (let ((zope-security (package-with-python2 python-zope-security)))
6775 (package (inherit zope-security)
6776 (propagated-inputs
6777 `(("python2-zope-testrunner" ,python2-zope-testrunner)
6778 ,@(alist-delete
6779 "python-zope-testrunner"
6780 (package-propagated-inputs zope-security)))))))
6781
6782 (define-public python-zope-component
6783 (package
6784 (name "python-zope-component")
6785 (version "4.2.2")
6786 (source
6787 (origin
6788 (method url-fetch)
6789 (uri (string-append "https://pypi.python.org/packages/source/z"
6790 "/zope.component/zope.component-" version ".tar.gz"))
6791 (sha256
6792 (base32
6793 "06pqr8m5jv12xjyy5b59hh9anl61cxkzhw9mka33r3nxalmi2b18"))))
6794 (build-system python-build-system)
6795 (arguments
6796 ;; Skip tests due to circular dependency with python-zope-security.
6797 '(#:tests? #f))
6798 (native-inputs
6799 `(("python-zope-testing" ,python-zope-testing)))
6800 (propagated-inputs
6801 `(("python-zope-event" ,python-zope-event)
6802 ("python-zope-interface" ,python-zope-interface)
6803 ("python-zope-i18nmessageid" ,python-zope-i18nmessageid)
6804 ("python-zope-configuration" ,python-zope-configuration)))
6805 (home-page "https://github.com/zopefoundation/zope.component")
6806 (synopsis "Zope Component Architecture")
6807 (description "Zope.component represents the core of the Zope Component
6808 Architecture. Together with the zope.interface package, it provides
6809 facilities for defining, registering and looking up components.")
6810 (license license:zpl2.1)))
6811
6812 (define-public python2-zope-component
6813 (package-with-python2 python-zope-component))
6814
6815 (define-public python-pythondialog
6816 (package
6817 (name "python-pythondialog")
6818 (version "3.4.0")
6819 (source
6820 (origin
6821 (method url-fetch)
6822 (uri (pypi-uri "pythondialog" version))
6823 (sha256
6824 (base32
6825 "1728ghsran47jczn9bhlnkvk5bvqmmbihabgif5h705b84r1272c"))))
6826 (build-system python-build-system)
6827 (arguments
6828 `(#:phases
6829 (modify-phases %standard-phases
6830 (add-after 'unpack 'patch-path
6831 (lambda* (#:key inputs #:allow-other-keys)
6832 (let* ((dialog (assoc-ref inputs "dialog")))
6833 ;; Since this library really wants to grovel the search path, we
6834 ;; must hardcode dialog's store path into it.
6835 (substitute* "dialog.py"
6836 (("os.getenv\\(\"PATH\", \":/bin:/usr/bin\"\\)")
6837 (string-append "os.getenv(\"PATH\") + \":" dialog "/bin\"")))
6838 #t))))
6839 #:tests? #f)) ; no test suite
6840 (propagated-inputs
6841 `(("dialog" ,dialog)))
6842 (home-page "http://pythondialog.sourceforge.net/")
6843 (synopsis "Python interface to the UNIX dialog utility")
6844 (description "A Python wrapper for the dialog utility. Its purpose is to
6845 provide an easy to use, pythonic and comprehensive Python interface to dialog.
6846 This allows one to make simple text-mode user interfaces on Unix-like systems")
6847 (license license:lgpl2.1)
6848 (properties `((python2-variant . ,(delay python2-pythondialog))))))
6849
6850 (define-public python2-pythondialog
6851 (let ((base (package-with-python2 (strip-python2-variant python-pythondialog))))
6852 (package
6853 (inherit base)
6854 (version (package-version python-pythondialog))
6855 (source (origin
6856 (method url-fetch)
6857 (uri (pypi-uri "python2-pythondialog" version))
6858 (sha256
6859 (base32
6860 "0d8k7lxk50imdyx85lv8j98i4c93a71iwpapnl1506rpkbm9qvd9")))))))
6861
6862 (define-public python-pyrfc3339
6863 (package
6864 (name "python-pyrfc3339")
6865 (version "1.0")
6866 (source
6867 (origin
6868 (method url-fetch)
6869 (uri (pypi-uri "pyRFC3339" version))
6870 (sha256
6871 (base32
6872 "0dgm4l9y8jiax5cp6yxjd2i27cq8h33sh81n1wfbmnmqb32cdywd"))))
6873 (build-system python-build-system)
6874 (propagated-inputs
6875 `(("python-pytz" ,python-pytz)))
6876 (native-inputs
6877 `(("python-nose" ,python-nose)
6878 ("python-setuptools" ,python-setuptools)))
6879 (home-page "https://github.com/kurtraschke/pyRFC3339")
6880 (synopsis "Python timestamp library")
6881 (description "Python library for generating and parsing RFC 3339-compliant
6882 timestamps.")
6883 (license license:expat)))
6884
6885 (define-public python2-pyrfc3339
6886 (package-with-python2 python-pyrfc3339))
6887
6888 (define-public python-werkzeug
6889 (package
6890 (name "python-werkzeug")
6891 (version "0.11.5")
6892 (source
6893 (origin
6894 (method url-fetch)
6895 (uri (pypi-uri "Werkzeug" version))
6896 (sha256
6897 (base32
6898 "0r41xqp4cypzcgsf6zbspbqd272wnzf20igb4w4b5wzfhgqh9nxg"))))
6899 (build-system python-build-system)
6900 (native-inputs
6901 `(("python-pytest" ,python-pytest)))
6902 (home-page "http://werkzeug.pocoo.org/")
6903 (synopsis "Utilities for WSGI applications")
6904 (description "One of the most advanced WSGI utility modules. It includes a
6905 powerful debugger, full-featured request and response objects, HTTP utilities to
6906 handle entity tags, cache control headers, HTTP dates, cookie handling, file
6907 uploads, a powerful URL routing system and a bunch of community-contributed
6908 addon modules.")
6909 (license license:x11)))
6910
6911 (define-public python2-werkzeug
6912 (package-with-python2 python-werkzeug))
6913
6914 (define-public python-configobj
6915 (package
6916 (name "python-configobj")
6917 (version "5.0.6")
6918 (source (origin
6919 (method url-fetch)
6920 (uri (string-append
6921 "https://pypi.python.org/packages/source/c/configobj/"
6922 "configobj-" version ".tar.gz"))
6923 (sha256
6924 (base32
6925 "00h9rcmws03xvdlfni11yb60bz3kxfvsj6dg6nrpzj71f03nbxd2"))
6926 ;; Patch setup.py so it looks for python-setuptools, which is
6927 ;; required to parse the keyword 'install_requires' in setup.py.
6928 (patches (search-patches "python-configobj-setuptools.patch"))))
6929 (build-system python-build-system)
6930 (native-inputs
6931 `(("python-setuptools" ,python-setuptools)
6932 ("python-six" ,python-six)))
6933 (synopsis "Config file reading, writing and validation")
6934 (description "ConfigObj is a simple but powerful config file reader and
6935 writer: an ini file round tripper. Its main feature is that it is very easy to
6936 use, with a straightforward programmer’s interface and a simple syntax for
6937 config files.")
6938 (home-page "https://github.com/DiffSK/configobj")
6939 (license license:bsd-3)))
6940
6941 (define-public python2-configobj
6942 (package-with-python2 python-configobj))
6943
6944 (define-public python-configargparse
6945 (package
6946 (name "python-configargparse")
6947 (version "0.10.0")
6948 (source (origin
6949 (method url-fetch)
6950 (uri (string-append
6951 "https://pypi.python.org/packages/source/C/ConfigArgParse/"
6952 "ConfigArgParse-" version ".tar.gz"))
6953 (sha256
6954 (base32
6955 "19wh919gbdbzxzpagg52q3lm62yicm95ddlcx77dyjc1slyshl1v"))))
6956 (build-system python-build-system)
6957 (arguments
6958 ;; FIXME: Bug in test suite filed upstream:
6959 ;; https://github.com/bw2/ConfigArgParse/issues/32
6960 '(#:tests? #f))
6961 (synopsis "Replacement for argparse")
6962 (description "A drop-in replacement for argparse that allows options to also
6963 be set via config files and/or environment variables.")
6964 (home-page "https://github.com/bw2/ConfigArgParse")
6965 (license license:expat)))
6966
6967 (define-public python2-configargparse
6968 (package-with-python2 python-configargparse))
6969
6970 (define-public python-ndg-httpsclient
6971 (package
6972 (name "python-ndg-httpsclient")
6973 (version "0.4.0")
6974 (source (origin
6975 (method url-fetch)
6976 (uri (string-append
6977 "https://pypi.python.org/packages/source/n/ndg-httpsclient/"
6978 "ndg_httpsclient-" version ".tar.gz"))
6979 (sha256
6980 (base32
6981 "0x32ibixm3vv5m9xfk83xsqm8xcqw4dd0khbh6qbri6rxgymbhg8"))))
6982 (build-system python-build-system)
6983 (propagated-inputs
6984 `(("python-pyopenssl" ,python-pyopenssl)))
6985 (synopsis "HTTPS support for Python's httplib and urllib2")
6986 (description "This is a HTTPS client implementation for httplib and urllib2
6987 based on PyOpenSSL. PyOpenSSL provides a more fully featured SSL implementation
6988 over the default provided with Python and importantly enables full verification
6989 of the SSL peer.")
6990 (home-page "https://github.com/cedadev/ndg_httpsclient/")
6991 (license license:bsd-3)))
6992
6993 ;; python2-openssl requires special care, so package-with-python2 is
6994 ;; insufficient.
6995 (define-public python2-ndg-httpsclient
6996 (package (inherit python-ndg-httpsclient)
6997 (name "python2-ndg-httpsclient")
6998 (arguments `(#:python ,python-2))
6999 (propagated-inputs
7000 `(("python2-pyopenssl" ,python2-pyopenssl)))))
7001
7002 (define-public python-contextlib2
7003 (package
7004 (name "python-contextlib2")
7005 (version "0.4.0")
7006 (source
7007 (origin
7008 (method url-fetch)
7009 (uri (pypi-uri "contextlib2" version))
7010 (sha256
7011 (base32
7012 "0cmp131dlh0d0zvw0aza1zd13glvngzk8lb4avks0hm7yxwdr9am"))))
7013 (build-system python-build-system)
7014 (arguments
7015 `(#:phases
7016 (modify-phases %standard-phases
7017 (replace 'check
7018 (lambda _ (zero?
7019 (system*
7020 "python" "test_contextlib2.py" "-v")))))))
7021 (home-page "http://contextlib2.readthedocs.org/")
7022 (synopsis "Tools for decorators and context managers")
7023 (description "This module is primarily a backport of the Python
7024 3.2 contextlib to earlier Python versions. Like contextlib, it
7025 provides utilities for common tasks involving decorators and context
7026 managers. It also contains additional features that are not part of
7027 the standard library.")
7028 (license license:psfl)))
7029
7030 (define-public python2-contextlib2
7031 (package-with-python2 python-contextlib2))
7032
7033 (define-public python-texttable
7034 (package
7035 (name "python-texttable")
7036 (version "0.8.4")
7037 (source
7038 (origin
7039 (method url-fetch)
7040 (uri (pypi-uri "texttable" version))
7041 (sha256
7042 (base32
7043 "0bkhs4dx9s6g7fpb969hygq56hyz4ncfamlynw72s0n6nqfbd1w5"))))
7044 (build-system python-build-system)
7045 (arguments '(#:tests? #f)) ; no tests
7046 (home-page "https://github.com/foutaise/texttable/")
7047 (synopsis "Python module for creating simple ASCII tables")
7048 (description "Texttable is a Python module for creating simple ASCII
7049 tables.")
7050 (license license:lgpl2.1+)))
7051
7052 (define-public python2-texttable
7053 (package-with-python2 python-texttable))
7054
7055 (define-public python-websocket-client
7056 (package
7057 (name "python-websocket-client")
7058 (version "0.37.0")
7059 (source
7060 (origin
7061 (method url-fetch)
7062 (uri (pypi-uri "websocket_client" version))
7063 (sha256
7064 (base32
7065 "0h9glp1jll3z76ly3kg08aqgxqk0a68p4zi9yn50353bh5nj92v7"))))
7066 (build-system python-build-system)
7067 (native-inputs
7068 `(("python-six" ,python-six))) ; for tests
7069 (inputs
7070 `(("python-setuptools" ,python-setuptools)))
7071 (home-page "https://github.com/liris/websocket-client")
7072 (synopsis "WebSocket client for Python")
7073 (description "The Websocket-client module provides the low level APIs for
7074 WebSocket usage in Python programs.")
7075 (license license:lgpl2.1+)))
7076
7077 (define-public python2-websocket-client
7078 (package-with-python2 python-websocket-client))
7079
7080 (define-public python-atomicwrites
7081 (package
7082 (name "python-atomicwrites")
7083 (version "1.1.0")
7084 (source (origin
7085 (method url-fetch)
7086 (uri (pypi-uri "atomicwrites" version))
7087 (sha256
7088 (base32
7089 "1s01dci8arsl9d9vr5nz1fk9znldp1z3l4yl43f0c27z12b8yxl0"))))
7090 (build-system python-build-system)
7091 (synopsis "Atomic file writes in Python")
7092 (description "Library for atomic file writes using platform dependent tools
7093 for atomic file system operations.")
7094 (home-page "https://github.com/untitaker/python-atomicwrites")
7095 (license license:expat)
7096 (properties `((python2-variant . ,(delay python2-atomicwrites))))))
7097
7098 (define-public python2-atomicwrites
7099 (package (inherit (package-with-python2
7100 (strip-python2-variant python-atomicwrites)))
7101 (native-inputs
7102 `(("python2-setuptools" ,python2-setuptools)))))
7103
7104 (define-public python-requests-toolbelt
7105 (package
7106 (name "python-requests-toolbelt")
7107 (version "0.6.2")
7108 (source (origin
7109 (method url-fetch)
7110 (uri (string-append
7111 "https://pypi.python.org/packages/"
7112 "e1/a4/a94c037bc72ad70441aff1403d3243510d2542ddca7759faaeffeb11aefe/"
7113 "requests-toolbelt-" version ".tar.gz"))
7114 (sha256
7115 (base32
7116 "15q9nrgp85nqlr4kdz1zvj8z2npafi2sr12y7fqgxbkq28j1aci6"))))
7117 (build-system python-build-system)
7118 (propagated-inputs
7119 `(("python-requests" ,python-requests)))
7120 (synopsis "Extensions to python-requests")
7121 (description "This is a toolbelt of useful classes and functions to be used
7122 with python-requests.")
7123 (home-page "https://github.com/sigmavirus24/requests-toolbelt")
7124 (license license:asl2.0)))
7125
7126 (define-public python-click-threading
7127 (package
7128 (name "python-click-threading")
7129 (version "0.2.0")
7130 (source (origin
7131 (method url-fetch)
7132 (uri (string-append
7133 "https://pypi.python.org/packages/"
7134 "fe/b7/e7f609d18a2a351cb71616adcf54df1acd82f83cb9b5936935a4d20e2c23/"
7135 "click-threading-" version ".tar.gz"))
7136 (sha256
7137 (base32
7138 "18bcqikxwb3drb8rf60cclxkxw52521b38ax3byah6j8cn8y9p4j"))))
7139 (build-system python-build-system)
7140 (propagated-inputs
7141 `(("python-click" ,python-click)))
7142 (synopsis "Utilities for multithreading in Click")
7143 (description "This package provides utilities for multithreading in Click
7144 applications.")
7145 (home-page "https://github.com/click-contrib/click-threading")
7146 (license license:expat)))
7147
7148 (define-public python-click-log
7149 (package
7150 (name "python-click-log")
7151 (version "0.1.3")
7152 (source (origin
7153 (method url-fetch)
7154 (uri (pypi-uri "click-log" version))
7155 (sha256
7156 (base32
7157 "0kdd1vminxpcfczxl2kkf285n0dr1gxh2cdbx1p6vkj7b7bci3gx"))))
7158 (build-system python-build-system)
7159 (propagated-inputs
7160 `(("python-click" ,python-click)))
7161 (synopsis "Logging for click applications")
7162 (description "This package provides a Python library for logging Click
7163 applications.")
7164 (home-page "https://github.com/click-contrib/click-log")
7165 (license license:expat)))
7166
7167 (define-public python-apipkg
7168 (package
7169 (name "python-apipkg")
7170 (version "1.4")
7171 (source (origin
7172 (method url-fetch)
7173 (uri (pypi-uri "apipkg" version))
7174 (sha256
7175 (base32
7176 "1iks5701qnp3dlr3q1d9qm68y2plp2m029irhpz92a44psfkjf1f"))))
7177 (build-system python-build-system)
7178 (inputs
7179 `(("python-pytest" ,python-pytest)))
7180 (synopsis "Namespace control and lazy-import mechanism")
7181 (description "With apipkg you can control the exported namespace of a Python
7182 package and greatly reduce the number of imports for your users. It is a small
7183 pure Python module that works on virtually all Python versions.")
7184 (home-page "https://bitbucket.org/hpk42/apipkg")
7185 (license license:expat)
7186 (properties `((python2-variant . ,(delay python2-apipkg))))))
7187
7188 (define-public python2-apipkg
7189 (package
7190 (inherit (package-with-python2
7191 (strip-python2-variant python-apipkg)))
7192 (native-inputs
7193 `(("python2-setuptools" ,python2-setuptools)))))
7194
7195 (define-public python-execnet
7196 (package
7197 (name "python-execnet")
7198 (version "1.4.1")
7199 (source (origin
7200 (method url-fetch)
7201 (uri (pypi-uri "execnet" version))
7202 (sha256
7203 (base32
7204 "1rpk1vyclhg911p3hql0m0nrpq7q7mysxnaaw6vs29cpa6kx8vgn"))))
7205 (build-system python-build-system)
7206 (native-inputs
7207 `(("python-setuptools-scm" ,python-setuptools-scm)))
7208 (inputs
7209 `(("python-apipkg" ,python-apipkg)))
7210 (synopsis "Rapid multi-Python deployment")
7211 (description "Execnet provides a share-nothing model with
7212 channel-send/receive communication for distributing execution across many
7213 Python interpreters across version, platform and network barriers. It has a
7214 minimal and fast API targetting the following uses:
7215 @enumerate
7216 @item distribute tasks to (many) local or remote CPUs
7217 @item write and deploy hybrid multi-process applications
7218 @item write scripts to administer multiple environments
7219 @end enumerate")
7220 (home-page "http://codespeak.net/execnet/")
7221 (license license:expat)
7222 (properties `((python2-variant . ,(delay python2-execnet))))))
7223
7224 (define-public python2-execnet
7225 (let ((execnet (package-with-python2
7226 (strip-python2-variant python-execnet))))
7227 (package
7228 (inherit execnet)
7229 (native-inputs
7230 `(("python2-setuptools" ,python2-setuptools)
7231 ,@(package-native-inputs execnet))))))
7232
7233 ;;; The software provided by this package was integrated into pytest 2.8.
7234 (define-public python-pytest-cache
7235 (package
7236 (name "python-pytest-cache")
7237 (version "1.0")
7238 (source (origin
7239 (method url-fetch)
7240 (uri (pypi-uri "pytest-cache" version))
7241 (sha256
7242 (base32
7243 "1a873fihw4rhshc722j4h6j7g3nj7xpgsna9hhg3zn6ksknnhx5y"))))
7244 (build-system python-build-system)
7245 (inputs
7246 `(("python-apipkg" ,python-apipkg)
7247 ("python-execnet" ,python-execnet)
7248 ("python-py" ,python-py)
7249 ("python-pytest" ,python-pytest)))
7250 (synopsis "Py.test plugin with mechanisms for caching across test runs")
7251 (description "The pytest-cache plugin provides tools to rerun failures from
7252 the last py.test invocation.")
7253 (home-page "https://bitbucket.org/hpk42/pytest-cache/")
7254 (license license:expat)
7255 (properties `((python2-variant . ,(delay python2-pytest-cache))))))
7256
7257 (define-public python2-pytest-cache
7258 (let ((pytest-cache (package-with-python2
7259 (strip-python2-variant python-pytest-cache))))
7260 (package
7261 (inherit pytest-cache)
7262 (native-inputs
7263 `(("python2-setuptools" ,python2-setuptools)
7264 ,@(package-native-inputs pytest-cache))))))
7265
7266 (define-public python-pytest-localserver
7267 (package
7268 (name "python-pytest-localserver")
7269 (version "0.3.5")
7270 (source (origin
7271 (method url-fetch)
7272 (uri (pypi-uri "pytest-localserver" version))
7273 (sha256
7274 (base32
7275 "0dvqspjr6va55zwmnnc2mmpqc7mm65kxig9ya44x1z8aadzxpa4p"))))
7276 (build-system python-build-system)
7277 (arguments
7278 `(#:phases (modify-phases %standard-phases
7279 (replace 'check
7280 (lambda _
7281 (zero? (system* "py.test" "--genscript=runtests.py"))
7282 (zero? (system* "py.test")))))))
7283 (native-inputs
7284 `(("python-pytest" ,python-pytest)
7285 ("python-requests" ,python-requests)
7286 ("python-six" ,python-six)))
7287 (inputs
7288 `(("python-werkzeug" ,python-werkzeug)))
7289 (synopsis "Py.test plugin to test server connections locally")
7290 (description "Pytest-localserver is a plugin for the pytest testing
7291 framework which enables you to test server connections locally.")
7292 (home-page "https://pypi.python.org/pypi/pytest-localserver")
7293 (license license:expat)))
7294
7295 (define-public python-wsgi-intercept
7296 (package
7297 (name "python-wsgi-intercept")
7298 (version "1.2.2")
7299 (source (origin
7300 (method url-fetch)
7301 (uri (string-append
7302 "https://pypi.python.org/packages/"
7303 "38/76/ebcbc24d0cb77db34520a3ca6ed1bd43ace17d182bbd8dd7d976f1c176fb/"
7304 "wsgi_intercept-" version ".tar.gz"))
7305 (sha256
7306 (base32
7307 "0kjj2v2dvmnpdd5h5gk9rzz0f54rhjb0yiz3zg65bmp65slfw65d"))))
7308 (build-system python-build-system)
7309 (native-inputs
7310 `(("python-pytest" ,python-pytest)
7311 ("python-six" ,python-six)))
7312 (propagated-inputs
7313 `(("python-httplib2" ,python-httplib2)
7314 ("python-requests" ,python-requests)))
7315 (synopsis "Puts a WSGI application in place of a real URI for testing")
7316 (description "Wsgi_intercept installs a WSGI application in place of a real
7317 URI for testing. Testing a WSGI application normally involves starting a
7318 server at a local host and port, then pointing your test code to that address.
7319 Instead, this library lets you intercept calls to any specific host/port
7320 combination and redirect them into a WSGI application importable by your test
7321 program. Thus, you can avoid spawning multiple processes or threads to test
7322 your Web app.")
7323 (home-page "https://github.com/cdent/wsgi-intercept")
7324 (license license:expat)))
7325
7326 (define-public python-pytest-xprocess
7327 (package
7328 (name "python-pytest-xprocess")
7329 (version "0.9.1")
7330 (source (origin
7331 (method url-fetch)
7332 (uri (pypi-uri "pytest-xprocess" version))
7333 (sha256
7334 (base32
7335 "17zlql1xqw3ywcgwwbqmw633aly99lab12hm02asr8awvg5603pp"))))
7336 (build-system python-build-system)
7337 (propagated-inputs
7338 `(("python-pytest" ,python-pytest)
7339 ("python-pytest-cache" ,python-pytest-cache)
7340 ("python-psutil" ,python-psutil)))
7341 (synopsis "Pytest plugin to manage external processes across test runs")
7342 (description "Pytest-xprocess is an experimental py.test plugin for managing
7343 processes across test runs.")
7344 (home-page "https://bitbucket.org/pytest-dev/pytest-xprocess")
7345 (license license:expat)))
7346
7347 (define-public python-icalendar
7348 (package
7349 (name "python-icalendar")
7350 (version "3.10")
7351 (source (origin
7352 (method url-fetch)
7353 (uri (pypi-uri "icalendar" version))
7354 (sha256
7355 (base32
7356 "01amnk3621s7fagfla86npd25knbqirchg7h1jpqxqp103d02bs7"))))
7357 (build-system python-build-system)
7358 (propagated-inputs
7359 `(("python-dateutil-2" ,python-dateutil-2)
7360 ("python-pytz" ,python-pytz)))
7361 (synopsis "Python library for parsing iCalendar files")
7362 (description "The icalendar package is a parser/generator of iCalendar
7363 files for use with Python.")
7364 (home-page "https://github.com/collective/icalendar")
7365 (license license:bsd-2)))
7366
7367 (define-public python-sphinxcontrib-newsfeed
7368 (package
7369 (name "python-sphinxcontrib-newsfeed")
7370 (version "0.1.4")
7371 (source (origin
7372 (method url-fetch)
7373 (uri (pypi-uri "sphinxcontrib-newsfeed" version))
7374 (sha256
7375 (base32
7376 "1d7gam3mn8v4in4p16yn3v10vps7nnaz6ilw99j4klij39dqd37p"))))
7377 (build-system python-build-system)
7378 (propagated-inputs
7379 `(("python-docutils" ,python-docutils)
7380 ("python-sphinx" ,python-sphinx)))
7381 (synopsis "News Feed extension for Sphinx")
7382 (description "Sphinxcontrib-newsfeed is an extension for adding a simple
7383 Blog, News or Announcements section to a Sphinx website.")
7384 (home-page "https://bitbucket.org/prometheus/sphinxcontrib-newsfeed")
7385 (license license:bsd-2)))
7386
7387 (define-public python-args
7388 (package
7389 (name "python-args")
7390 (version "0.1.0")
7391 (source (origin
7392 (method url-fetch)
7393 (uri (pypi-uri "args" version))
7394 (sha256
7395 (base32
7396 "057qzi46h5dmxdqknsbrssn78lmqjlnm624iqdhrnpk26zcbi1d7"))))
7397 (build-system python-build-system)
7398 (inputs
7399 `(("python-setuptools" ,python-setuptools)))
7400 (home-page "https://github.com/kennethreitz/args")
7401 (synopsis "Command-line argument parser")
7402 (description
7403 "This library provides a Python module to parse command-line arguments.")
7404 (license license:bsd-3)))
7405
7406 (define-public python2-args
7407 (package-with-python2 python-args))
7408
7409 (define-public python-clint
7410 (package
7411 (name "python-clint")
7412 (version "0.5.1")
7413 (source (origin
7414 (method url-fetch)
7415 (uri (pypi-uri "clint" version))
7416 (sha256
7417 (base32
7418 "1an5lkkqk1zha47198p42ji3m94xmzx1a03dn7866m87n4r4q8h5"))))
7419 (build-system python-build-system)
7420 (inputs
7421 `(("python-args" ,python-args)
7422 ("python-setuptools" ,python-setuptools)))
7423 (home-page "https://github.com/kennethreitz/clint")
7424 (synopsis "Command-line interface tools")
7425 (description
7426 "Clint is a Python module filled with a set of tools for developing
7427 command-line applications, including tools for colored and indented
7428 output, progress bar display, and pipes.")
7429 (license license:isc)))
7430
7431 (define-public python2-clint
7432 (package-with-python2 python-clint))
7433
7434 (define-public python-astor
7435 (package
7436 (name "python-astor")
7437 (version "0.5")
7438 (source (origin
7439 (method url-fetch)
7440 (uri (pypi-uri "astor" version))
7441 (sha256
7442 (base32
7443 "1fdafq5hkis1fxqlmhw0sn44zp2ar46nxhbc22cvwg7hsd8z5gsa"))))
7444 (build-system python-build-system)
7445 (inputs
7446 `(("python-setuptools" ,python-setuptools)))
7447 (home-page "https://github.com/berkerpeksag/astor")
7448 (synopsis "Read and write Python ASTs")
7449 (description
7450 "Astor is designed to allow easy manipulation of Python source via the
7451 Abstract Syntax Tree.")
7452 (license license:bsd-3)))
7453
7454 (define-public python2-astor
7455 (package-with-python2 python-astor))
7456
7457 (define-public python-rply
7458 (package
7459 (name "python-rply")
7460 (version "0.7.4")
7461 (source (origin
7462 (method url-fetch)
7463 (uri (pypi-uri "rply" version))
7464 (sha256
7465 (base32
7466 "12rp1d9ba7nvd5rhaxi6xzx1rm67r1k1ylsrkzhpwnphqpb06cvj"))))
7467 (build-system python-build-system)
7468 (inputs
7469 `(("python-appdirs" ,python-appdirs)
7470 ("python-setuptools" ,python-setuptools)))
7471 (home-page "https://github.com/alex/rply")
7472 (synopsis "Parser generator for Python")
7473 (description
7474 "This package provides a pure Python based parser generator, that also
7475 works with RPython. It is a more-or-less direct port of David Bazzley's PLY,
7476 with a new public API, and RPython support.")
7477 (license license:bsd-3)))
7478
7479 (define-public python2-rply
7480 (package-with-python2 python-rply))
7481
7482 (define-public python-hy
7483 (package
7484 (name "python-hy")
7485 (version "0.11.1")
7486 (source (origin
7487 (method url-fetch)
7488 (uri (pypi-uri "hy" version))
7489 (sha256
7490 (base32
7491 "1msqv747iz12r73mz4qvsmlwkddwjvrahlrk7ysrcz07h7dsscxs"))))
7492 (build-system python-build-system)
7493 (inputs
7494 `(("python-astor" ,python-astor)
7495 ("python-clint" ,python-clint)
7496 ("python-rply" ,python-rply)
7497 ("python-setuptools" ,python-setuptools)))
7498 (home-page "http://hylang.org/")
7499 (synopsis "Lisp frontend to Python")
7500 (description
7501 "Hy is a dialect of Lisp that's embedded in Python. Since Hy transforms
7502 its Lisp code into the Python Abstract Syntax Tree, you have the whole world of
7503 Python at your fingertips, in Lisp form.")
7504 (license license:expat)))
7505
7506 (define-public python2-hy
7507 (package-with-python2 python-hy))
7508
7509 (define-public python-rauth
7510 (package
7511 (name "python-rauth")
7512 (version "0.7.2")
7513 (source
7514 (origin
7515 (method url-fetch)
7516 (uri (pypi-uri "rauth" version))
7517 (sha256
7518 (base32
7519 "00pq7zw429hhza9c0qzxiqp77m653jv09z92nralnmzwdf6pzicf"))))
7520 (build-system python-build-system)
7521 (arguments
7522 `(#:test-target "check"))
7523 (inputs
7524 `(("python-requests" ,python-requests)))
7525 (home-page "https://github.com/litl/rauth")
7526 (synopsis "Python library for OAuth 1.0/a, 2.0, and Ofly")
7527 (description
7528 "Rauth is a Python library for OAuth 1.0/a, 2.0, and Ofly. It also
7529 provides service wrappers for convenient connection initialization and
7530 authenticated session objects providing things like keep-alive.")
7531 (license license:expat)
7532 (properties `((python2-variant . ,(delay python2-rauth))))))
7533
7534 (define-public python2-rauth
7535 (let ((base (package-with-python2 (strip-python2-variant python-rauth))))
7536 (package
7537 (inherit base)
7538 (native-inputs `(("python2-setuptools" ,python2-setuptools)
7539 ("python2-unittest2" ,python2-unittest2)
7540 ,@(package-native-inputs base))))))
7541
7542 (define-public python2-functools32
7543 (package
7544 (name "python2-functools32")
7545 (version "3.2.3-2")
7546 (source
7547 (origin
7548 (method url-fetch)
7549 (uri (pypi-uri "functools32" version))
7550 (sha256
7551 (base32
7552 "0v8ya0b58x47wp216n1zamimv4iw57cxz3xxhzix52jkw3xks9gn"))))
7553 (build-system python-build-system)
7554 (arguments
7555 `(#:python ,python-2
7556 #:tests? #f)) ; no test target
7557 (native-inputs
7558 `(("python2-setuptools" ,python2-setuptools)))
7559 (home-page "https://github.com/MiCHiLU/python-functools32")
7560 (synopsis
7561 "Backport of the functools module from Python 3.2.3")
7562 (description
7563 "This package is a backport of the @code{functools} module from Python
7564 3.2.3 for use with older versions of Python and PyPy.")
7565 (license license:expat)))
7566
7567 (define-public python2-futures
7568 (package
7569 (name "python2-futures")
7570 (version "3.0.3")
7571 (source
7572 (origin
7573 (method url-fetch)
7574 (uri (pypi-uri "futures" version))
7575 (sha256
7576 (base32
7577 "1vcb34dqhzkhbq1957vdjszhhm5y3j9ba88dgwhqx2zynhmk9qig"))))
7578 (build-system python-build-system)
7579 (arguments `(#:python ,python-2))
7580 (native-inputs
7581 `(("python2-setuptools" ,python2-setuptools)))
7582 (home-page "https://github.com/agronholm/pythonfutures")
7583 (synopsis
7584 "Backport of the concurrent.futures package from Python 3.2")
7585 (description
7586 "The concurrent.futures module provides a high-level interface for
7587 asynchronously executing callables. This package backports the
7588 concurrent.futures package from Python 3.2")
7589 (license license:bsd-3)))
7590
7591 (define-public python-promise
7592 (package
7593 (name "python-promise")
7594 (version "0.4.2")
7595 (source
7596 (origin
7597 (method url-fetch)
7598 (uri (pypi-uri "promise" version))
7599 (sha256
7600 (base32
7601 "1k19ms8l3d5jzjh557rgkxb5sg4mqgfc315rn4hx1z3n8qq6lr3h"))))
7602 (build-system python-build-system)
7603 ;; Tests wants python-futures, which is a python2 only program, and
7604 ;; can't be found by python-promise at test time.
7605 (arguments `(#:tests? #f))
7606 (home-page "https://github.com/syrusakbary/promise")
7607 (synopsis "Promises/A+ implementation for Python")
7608 (description
7609 "Promises/A+ implementation for Python")
7610 (properties `((python2-variant . ,(delay python2-promise))))
7611 (license license:expat)))
7612
7613 (define-public python2-promise
7614 (let ((promise (package-with-python2
7615 (strip-python2-variant python-promise))))
7616 (package (inherit promise)
7617 (arguments (substitute-keyword-arguments (package-arguments promise)
7618 ((#:tests? _) #t)))
7619 (native-inputs
7620 `(("python2-futures" ,python2-futures)
7621 ("python2-pytest" ,python2-pytest)
7622 ("python2-setuptools" ,python2-setuptools)
7623 ,@(package-native-inputs promise))))))
7624
7625 (define-public python-urllib3
7626 (package
7627 (name "python-urllib3")
7628 (version "1.13.1")
7629 (source
7630 (origin
7631 (method url-fetch)
7632 (uri (pypi-uri "urllib3" version))
7633 (sha256
7634 (base32
7635 "10rrbr6c6k7j5dvfsyj4b2gsgxg9gggnn708qixf6ll57xqivfkf"))))
7636 (build-system python-build-system)
7637 (arguments `(#:tests? #f))
7638 (native-inputs
7639 `(("python-setuptools" ,python-setuptools)
7640 ;; some packages for tests
7641 ("python-nose" ,python-nose)
7642 ("python-mock" ,python-mock)
7643 ("python-tornado" ,python-tornado)))
7644 (propagated-inputs
7645 `(;; packages for https security
7646 ("python-certifi" ,python-certifi)
7647 ("python-ndg-httpsclient" ,python-ndg-httpsclient)
7648 ("python-pyasn1" ,python-pyasn1)
7649 ("python-pyopenssl" ,python-pyopenssl)))
7650 (home-page "http://urllib3.readthedocs.org/")
7651 (synopsis "HTTP library with thread-safe connection pooling")
7652 (description
7653 "Urllib3 supports features left out of urllib and urllib2 libraries. It
7654 can reuse the same socket connection for multiple requests, it can POST files,
7655 supports url redirection and retries, and also gzip and deflate decoding.")
7656 (license license:expat)))
7657
7658 (define-public python2-urllib3
7659 (package-with-python2 python-urllib3))
7660
7661 (define-public python-colorama
7662 (package
7663 (name "python-colorama")
7664 (version "0.3.3")
7665 (source
7666 (origin
7667 (method url-fetch)
7668 (uri (pypi-uri "colorama" version))
7669 (sha256
7670 (base32
7671 "1716z9pq1r5ys3nkg7wdrb3h2f9rmd0zdxpxzmx3bgwgf6xg48gb"))))
7672 (build-system python-build-system)
7673 (inputs
7674 `(("python-setuptools" ,python-setuptools)))
7675 (synopsis "colored terminal text rendering for Python")
7676 (description "Colorama is a Python library for rendering colored terminal
7677 text.")
7678 (home-page "https://pypi.python.org/pypi/colorama")
7679 (license license:bsd-3)))
7680
7681 (define-public python2-colorama
7682 (package-with-python2 python-colorama))
7683
7684 (define-public python-rsa
7685 (package
7686 (name "python-rsa")
7687 (version "3.2")
7688 (source
7689 (origin
7690 (method url-fetch)
7691 (uri (pypi-uri "rsa" version))
7692 (sha256
7693 (base32
7694 "0xwp929g7lvb1sghxfpqlxvgg96qcwqdbhh27sjplx30n3xp3wrh"))))
7695 (build-system python-build-system)
7696 (inputs
7697 `(("python-pyasn1" ,python-pyasn1)
7698 ("python-setuptools" ,python-setuptools)))
7699 (synopsis "Pure-Python RSA implementation")
7700 (description "Python-RSA is a pure-Python RSA implementation. It supports
7701 encryption and decryption, signing and verifying signatures, and key
7702 generation according to PKCS#1 version 1.5. It can be used as a Python
7703 library as well as on the command line.")
7704 (home-page "http://stuvel.eu/rsa")
7705 (license license:asl2.0)))
7706
7707 (define-public python2-rsa
7708 (package-with-python2 python-rsa))
7709
7710 (define-public python-pluggy
7711 (package
7712 (name "python-pluggy")
7713 (version "0.3.1")
7714 (source
7715 (origin
7716 (method url-fetch)
7717 (uri (pypi-uri "pluggy" version))
7718 (sha256
7719 (base32
7720 "18qfzfm40bgx672lkg8q9x5hdh76n7vax99aank7vh2nw21wg70m"))))
7721 (build-system python-build-system)
7722 (inputs
7723 `(("python-setuptools" ,python-setuptools)))
7724 (synopsis "Plugin and hook calling mechanism for Python")
7725 (description "Pluggy is an extraction of the plugin manager as used by
7726 Pytest but stripped of Pytest specific details.")
7727 (home-page "https://pypi.python.org/pypi/pluggy")
7728 (license license:expat)))
7729
7730 (define-public python2-pluggy
7731 (package-with-python2 python-pluggy))
7732
7733 (define-public python-tox
7734 (package
7735 (name "python-tox")
7736 (version "2.3.1")
7737 (source
7738 (origin
7739 (method url-fetch)
7740 (uri (pypi-uri "tox" version))
7741 (sha256
7742 (base32
7743 "1vj73ar4rimq3fwy5r2z3jv4g9qbh8rmpmncsc00g0k310acqzxz"))))
7744 (build-system python-build-system)
7745 (arguments
7746 ;; FIXME: Tests require a newer version of pytest, but upgrading our
7747 ;; pytest breaks other packages.
7748 '(#:tests? #f))
7749 (inputs
7750 `(("python-setuptools" ,python-setuptools)
7751 ("python-pluggy" ,python-pluggy)
7752 ("python-py" ,python-py)
7753 ("python-virtualenv" ,python-virtualenv)
7754 ("python-pytest" ,python-pytest)))
7755 (home-page "http://tox.testrun.org/")
7756 (synopsis "Virtualenv-based automation of test activities")
7757 (description "Tox is a generic virtualenv management and test command line
7758 tool. It can be used to check that a package installs correctly with
7759 different Python versions and interpreters, or run tests in each type of
7760 supported environment, or act as a frontend to continuous integration
7761 servers.")
7762 (license license:expat)))
7763
7764 (define-public python2-tox
7765 (package-with-python2 python-tox))
7766
7767 (define-public python-jmespath
7768 (package
7769 (name "python-jmespath")
7770 (version "0.9.0")
7771 (source
7772 (origin
7773 (method url-fetch)
7774 (uri (pypi-uri "jmespath" version))
7775 (sha256
7776 (base32
7777 "0g9xvl69y7nr3w7ag4fsp6sm4fqf6vrqjw7504x2hzrrsh3ampq8"))))
7778 (build-system python-build-system)
7779 (inputs
7780 `(("python-setuptools" ,python-setuptools)))
7781 (synopsis "JSON Matching Expressions")
7782 (description "JMESPath (pronounced “james path”) is a Python library that
7783 allows one to declaratively specify how to extract elements from a JSON
7784 document.")
7785 (home-page "https://github.com/jmespath/jmespath.py")
7786 (license license:expat)))
7787
7788 (define-public python2-jmespath
7789 (package-with-python2 python-jmespath))
7790
7791 (define-public python-botocore
7792 (package
7793 (name "python-botocore")
7794 (version "1.3.17")
7795 (source
7796 (origin
7797 (method url-fetch)
7798 (uri (pypi-uri "botocore" version))
7799 (sha256
7800 (base32
7801 "08vpvdixx1c1lfv6vzjig68bpiir7wfyhzf49ysxgvhbprg5ra0w"))))
7802 (build-system python-build-system)
7803 (inputs
7804 `(("python-dateutil" ,python-dateutil-2)
7805 ("python-docutils" ,python-docutils)
7806 ("python-mock" ,python-mock)
7807 ("python-nose" ,python-nose)
7808 ("python-setuptools" ,python-setuptools)
7809 ("python-tox" ,python-tox)
7810 ("python-wheel" ,python-wheel)
7811 ("python-jmespath" ,python-jmespath)))
7812 (home-page "https://github.com/boto/botocore")
7813 (synopsis "Low-level interface to AWS")
7814 (description "Botocore is a Python library that provides a low-level
7815 interface to the Amazon Web Services (AWS) API.")
7816 (license license:asl2.0)))
7817
7818 (define-public python2-botocore
7819 (package-with-python2 python-botocore))
7820
7821 (define-public awscli
7822 (package
7823 (name "awscli")
7824 (version "1.9.17")
7825 (source
7826 (origin
7827 (method url-fetch)
7828 (uri (string-append
7829 "https://pypi.python.org/packages/source/a/awscli/awscli-"
7830 version ".tar.gz"))
7831 (sha256
7832 (base32
7833 "1nj7jqvlpq57hfhby1njsbf8303gapa3njc4dramr6p3ffzvfi2i"))))
7834 (build-system python-build-system)
7835 (inputs
7836 `(("python-colorama" ,python-colorama)
7837 ("python-docutils" ,python-docutils)
7838 ("python-mock" ,python-mock)
7839 ("python-nose" ,python-nose)
7840 ("python-rsa" ,python-rsa)
7841 ("python-setuptools" ,python-setuptools)
7842 ("python-sphinx" ,python-sphinx)
7843 ("python-tox" ,python-tox)
7844 ("python-wheel" ,python-wheel)
7845 ("python-botocore" ,python-botocore)))
7846 (home-page "http://aws.amazon.com/cli/")
7847 (synopsis "Command line client for AWS")
7848 (description "AWS CLI provides a unified command line interface to the
7849 Amazon Web Services (AWS) API.")
7850 (license license:asl2.0)))
7851
7852 (define-public python-hypothesis
7853 (package
7854 (name "python-hypothesis")
7855 (version "3.1.0")
7856 (source (origin
7857 (method url-fetch)
7858 (uri (pypi-uri "hypothesis" version))
7859 (sha256
7860 (base32
7861 "0qyqq9akm4vshhn8cngjc1qykcvsn7cz6dlm6njfsgpbraqrmbbw"))))
7862 (build-system python-build-system)
7863 (propagated-inputs
7864 `(("python-flake8" ,python-flake8)
7865 ("python-pytest" ,python-pytest)))
7866 (synopsis "Library for property based testing")
7867 (description "Hypothesis is a library for testing your Python code against a
7868 much larger range of examples than you would ever want to write by hand. It’s
7869 based on the Haskell library, Quickcheck, and is designed to integrate
7870 seamlessly into your existing Python unit testing work flow.")
7871 (home-page "https://github.com/DRMacIver/hypothesis")
7872 (license license:mpl2.0)
7873 (properties `((python2-variant . ,(delay python2-hypothesis))))))
7874
7875 (define-public python2-hypothesis
7876 (let ((hypothesis (package-with-python2
7877 (strip-python2-variant python-hypothesis))))
7878 (package (inherit hypothesis)
7879 (native-inputs
7880 `(("python2-enum34" ,python2-enum34)
7881 ("python2-setuptools" ,python2-setuptools))))))
7882
7883 (define-public python-pytest-subtesthack
7884 (package
7885 (name "python-pytest-subtesthack")
7886 (version "0.1.1")
7887 (source (origin
7888 (method url-fetch)
7889 (uri (pypi-uri "pytest-subtesthack" version))
7890 (sha256
7891 (base32
7892 "15kzcr5pchf3id4ikdvlv752rc0j4d912n589l4rifp8qsj19l1x"))))
7893 (build-system python-build-system)
7894 (native-inputs
7895 `(;; setuptools required for python-2 variant
7896 ("python-setuptools" ,python-setuptools)))
7897 (propagated-inputs
7898 `(("python-pytest" ,python-pytest)))
7899 (synopsis "Set-up and tear-down fixtures for unit tests")
7900 (description "This plugin allows you to set up and tear down fixtures within
7901 unit test functions that use @code{py.test}. This is useful for using
7902 @command{hypothesis} inside py.test, as @command{hypothesis} will call the test
7903 function multiple times, without setting up or tearing down fixture state as is
7904 normally the case.")
7905 (home-page "https://github.com/untitaker/pytest-subtesthack/")
7906 (license license:unlicense)))
7907
7908 (define-public python2-pytest-subtesthack
7909 (package-with-python2 python-pytest-subtesthack))
7910
7911 (define-public python2-xdo
7912 (package
7913 (name "python2-xdo")
7914 (version "0.2")
7915 (source (origin
7916 (method url-fetch)
7917 (uri (string-append
7918 "http://http.debian.net/debian/pool/main/p/python-xdo/"
7919 "python-xdo_" version ".orig.tar.gz"))
7920 (sha256
7921 (base32
7922 "1kl5c1p0dyxf62plnk6fl77ycfb4whwjms16r14dxx8kn90hlqz4"))))
7923 (build-system python-build-system)
7924 (arguments
7925 `(#:python ,python-2
7926 #:tests? #f)) ; no tests provided
7927 (inputs
7928 `(("xdotool" ,xdotool)
7929 ("libX11" ,libx11)))
7930 (home-page "https://tracker.debian.org/pkg/python-xdo")
7931 (synopsis "Python library for simulating X11 keyboard/mouse input")
7932 (description "Provides bindings to libxdo for manipulating X11 via simulated
7933 input. (Note that this is mostly a legacy library; you may wish to look at
7934 python-xdo for newer bindings.)")
7935 (license license:bsd-3)))
7936
7937 (define-public python-wtforms
7938 (package
7939 (name "python-wtforms")
7940 (version "2.1")
7941 (source
7942 (origin
7943 (method url-fetch)
7944 (uri (pypi-uri "WTForms" version ".zip"))
7945 (sha256
7946 (base32
7947 "0vyl26y9cg409cfyj8rhqxazsdnd0jipgjw06civhrd53yyi1pzz"))))
7948 (build-system python-build-system)
7949 (native-inputs
7950 `(("unzip" ,unzip)))
7951 (home-page "http://wtforms.simplecodes.com/")
7952 (synopsis
7953 "Form validation and rendering library for Python web development")
7954 (description
7955 "WTForms is a flexible forms validation and rendering library
7956 for Python web development. It is very similar to the web form API
7957 available in Django, but is a standalone package.")
7958 (license license:bsd-3)
7959 (properties `((python2-variant . ,(delay python2-wtforms))))))
7960
7961 (define-public python2-wtforms
7962 (package
7963 (inherit (package-with-python2
7964 (strip-python2-variant python-wtforms)))
7965 (inputs `(("python2-setuptools" ,python2-setuptools)))))
7966
7967 (define-public python-mako
7968 (package
7969 (name "python-mako")
7970 (version "1.0.3")
7971 (source
7972 (origin
7973 (method url-fetch)
7974 (uri (pypi-uri "Mako" version))
7975 (sha256
7976 (base32
7977 "136kcjbs0s98qkx8a418b05dfblqp0kiiqyx8vhx4rarwc7bqi3n"))))
7978 (build-system python-build-system)
7979 (native-inputs
7980 `(("python-markupsafe" ,python-markupsafe)
7981 ("python-mock" ,python-mock)
7982 ("python-nose" ,python-nose)))
7983 (home-page "http://www.makotemplates.org/")
7984 (synopsis "Templating language for Python")
7985 (description "Mako is a templating language for Python that compiles
7986 templates into Python modules.")
7987 (license license:expat)
7988 (properties `((python2-variant . ,(delay python2-mako))))))
7989
7990 (define-public python2-mako
7991 (let ((base (package-with-python2
7992 (strip-python2-variant python-mako))))
7993 (package
7994 (inherit base)
7995 (native-inputs
7996 (cons `("python2-setuptools" ,python2-setuptools)
7997 (package-native-inputs base))))))
7998
7999 (define-public python-waitress
8000 (package
8001 (name "python-waitress")
8002 (version "0.8.10")
8003 (source
8004 (origin
8005 (method url-fetch)
8006 (uri (pypi-uri "waitress" version))
8007 (sha256
8008 (base32
8009 "017n9ra6vvmq9d5sfhdzyzr1mg15x2hj2dhm4pdlw98c1ypw2h3w"))))
8010 (build-system python-build-system)
8011 (home-page "https://github.com/Pylons/waitress")
8012 (synopsis "Waitress WSGI server")
8013 (description "Waitress is meant to be a production-quality pure-Python WSGI
8014 server with very acceptable performance.")
8015 (license license:zpl2.1)
8016 (properties `((python2-variant . ,(delay python2-waitress))))))
8017
8018 (define-public python2-waitress
8019 (package
8020 (inherit (package-with-python2
8021 (strip-python2-variant python-waitress)))
8022 (native-inputs `(("python2-setuptools" ,python2-setuptools)))))
8023
8024 (define-public python-wsgiproxy2
8025 (package
8026 (name "python-wsgiproxy2")
8027 (version "0.4.2")
8028 (source
8029 (origin
8030 (method url-fetch)
8031 (uri (pypi-uri "WSGIProxy2" version ".zip"))
8032 (sha256
8033 (base32
8034 "13kf9bdxrc95y9vriaz0viry3ah11nz4rlrykcfvb8nlqpx3dcm4"))))
8035 (build-system python-build-system)
8036 (native-inputs
8037 `(("unzip" ,unzip)
8038 ("python-nose" ,python-nose)
8039 ("python-coverage" ,python-coverage)))
8040 (propagated-inputs
8041 `(("python-six" ,python-six)
8042 ("python-webob" ,python-webob)))
8043 (home-page
8044 "https://github.com/gawel/WSGIProxy2/")
8045 (synopsis "WSGI Proxy with various http client backends")
8046 (description "WSGI turns HTTP requests into WSGI function calls.
8047 WSGIProxy turns WSGI function calls into HTTP requests.
8048 It also includes code to sign requests and pass private data,
8049 and to spawn subprocesses to handle requests.")
8050 (license license:expat)
8051 (properties `((python2-variant . ,(delay python2-wsgiproxy2))))))
8052
8053 (define-public python2-wsgiproxy2
8054 (let ((wsgiproxy2 (package-with-python2
8055 (strip-python2-variant python-wsgiproxy2))))
8056 (package
8057 (inherit wsgiproxy2)
8058 (inputs `(("python2-setuptools" ,python2-setuptools)
8059 ,@(package-inputs wsgiproxy2))))))
8060
8061 (define-public python-pastedeploy
8062 (package
8063 (name "python-pastedeploy")
8064 (version "1.5.2")
8065 (source
8066 (origin
8067 (method url-fetch)
8068 (uri (pypi-uri "PasteDeploy" version))
8069 (sha256
8070 (base32
8071 "1jz3m4hq8v6hyhfjz9425nd3nvn52cvbfipdcd72krjmla4qz1fm"))))
8072 (build-system python-build-system)
8073 (native-inputs
8074 `(("python-nose" ,python-nose)))
8075 (propagated-inputs
8076 ;; This package uses pkg_resources, part of setuptools, during runtime,
8077 ;; hence why not a native-input.
8078 `(("python-setuptools" ,python-setuptools)))
8079 (home-page "http://pythonpaste.org/deploy/")
8080 (synopsis
8081 "Load, configure, and compose WSGI applications and servers")
8082 (description
8083 "This tool provides code to load WSGI applications and servers from URIs;
8084 these URIs can refer to Python Eggs for INI-style configuration files. Paste
8085 Script provides commands to serve applications based on this configuration
8086 file.")
8087 (license license:expat)))
8088
8089 (define-public python2-pastedeploy
8090 (package-with-python2 python-pastedeploy))
8091
8092 (define-public python-paste
8093 (package
8094 (name "python-paste")
8095 (version "2.0.2")
8096 (source
8097 (origin
8098 (method url-fetch)
8099 (uri (pypi-uri "Paste" version))
8100 (sha256
8101 (base32
8102 "16dsv9qi0r4qsrsb6dilpq2rx0fnglvh36flzywcdnm2jg43mb5d"))
8103 (patches (search-patches "python-paste-remove-website-test.patch"
8104 "python-paste-remove-timing-test.patch"))))
8105 (build-system python-build-system)
8106 (native-inputs
8107 `(("python-nose" ,python-nose)))
8108 (propagated-inputs
8109 `(;; Uses pkg_resources provided by setuptools internally.
8110 ("python-setuptools" ,python-setuptools)
8111 ("python-six" ,python-six)))
8112 (arguments
8113 '(;; Tests don't pass on Python 3, but work fine on Python 2.
8114 ;; (As of 2.0.2, Python 3 support in Paste is presently a bit broken,
8115 ;; but is usable enough for the minimal amount it's used in MediaGoblin
8116 ;; still... things should be better by the next Paste release.)
8117 #:tests? #f))
8118 (home-page "http://pythonpaste.org")
8119 (synopsis
8120 "Python web development tools, focusing on WSGI")
8121 (description
8122 "Paste provides a variety of web development tools and middleware which
8123 can be nested together to build web applications. Paste's design closely
8124 follows ideas flowing from WSGI (Web Standard Gateway Interface).")
8125 (license license:expat)
8126 (properties `((python2-variant . ,(delay python2-paste))))))
8127
8128 (define-public python2-paste
8129 (let ((paste (package-with-python2
8130 (strip-python2-variant python-paste))))
8131 (package
8132 (inherit paste)
8133 (arguments
8134 ;; Tests are back for Python 2!
8135 `(#:tests? #t
8136 ,@(package-arguments paste))))))
8137
8138 (define-public python-pastescript
8139 (package
8140 (name "python-pastescript")
8141 (version "2.0.2")
8142 (source
8143 (origin
8144 (method url-fetch)
8145 (uri (pypi-uri "PasteScript" version))
8146 (sha256
8147 (base32
8148 "1h3nnhn45kf4pbcv669ik4faw04j58k8vbj1hwrc532k0nc28gy0"))))
8149 (build-system python-build-system)
8150 (native-inputs
8151 `(("python-nose" ,python-nose)))
8152 (propagated-inputs
8153 `(;; Uses pkg_resources provided by setuptools internally.
8154 ("python-setuptools" ,python-setuptools)
8155 ("python-paste" ,python-paste)
8156 ("python-pastedeploy" ,python-pastedeploy)))
8157 (home-page "http://pythonpaste.org/script/")
8158 (arguments
8159 '(;; Unfortunately, this requires the latest unittest2,
8160 ;; but that requires traceback2 which requires linecache2 which requires
8161 ;; unittest2. So we're skipping tests for now.
8162 ;; (Note: Apparently linetest2 only needs unittest2 for its tests,
8163 ;; so in theory we could get around this situation somehow.)
8164 #:tests? #f))
8165 (synopsis
8166 "Pluggable command line tool for serving web applications and more")
8167 (description
8168 "PasteScript is a plugin-friendly command line tool which provides a
8169 variety of features, from launching web applications to bootstrapping project
8170 layouts.")
8171 (license license:expat)))
8172
8173 (define-public python2-pastescript
8174 (package-with-python2 python-pastescript))
8175
8176 (define-public python-pyquery
8177 (package
8178 (name "python-pyquery")
8179 (version "1.2.13")
8180 (source
8181 (origin
8182 (method url-fetch)
8183 (uri (pypi-uri "pyquery" version))
8184 (sha256
8185 (base32
8186 "0j9fsisip21qv4xljsg5dmni1pgpvwrjyyhhql0glydc4bs5rjgv"))))
8187 (build-system python-build-system)
8188 (propagated-inputs
8189 `(("python-lxml" ,python-lxml)
8190 ("python-cssselect" ,python-cssselect)))
8191 (home-page "https://github.com/gawel/pyquery")
8192 (synopsis "Make jQuery-like queries on xml documents")
8193 (description "pyquery allows you to make jQuery queries on xml documents.
8194 The API is as much as possible the similar to jQuery. pyquery uses lxml for
8195 fast xml and html manipulation.")
8196 (license license:bsd-3)
8197 (properties `((python2-variant . ,(delay python2-pyquery))))))
8198
8199 (define-public python2-pyquery
8200 (let ((pyquery (package-with-python2
8201 (strip-python2-variant python-pyquery))))
8202 (package
8203 (inherit pyquery)
8204 (native-inputs `(("python2-setuptools" ,python2-setuptools))))))
8205
8206 (define-public python-webtest
8207 (package
8208 (name "python-webtest")
8209 (version "2.0.20")
8210 (source
8211 (origin
8212 (method url-fetch)
8213 (uri (pypi-uri "WebTest" version))
8214 (sha256
8215 (base32
8216 "0bv0qhdjakdsdgj4sk21gnpp8xp8bga4x03p6gjb83ihrsb7n4xv"))))
8217 (build-system python-build-system)
8218 (arguments
8219 `(;; Unfortunately we have to disable tests!
8220 ;; This release of WebTest is pinned to python-nose < 1.3,
8221 ;; but older versions of python-nose are plagued with the following
8222 ;; bug(s), which rears its ugly head during test execution:
8223 ;; https://github.com/nose-devs/nose/issues/759
8224 ;; https://github.com/nose-devs/nose/pull/811
8225 #:tests? #f))
8226 ;; Commented out code is no good, but in this case, once tests
8227 ;; are ready to be enabled again, we should put the following
8228 ;; in place:
8229 ;; (native-inputs
8230 ;; `(("python-nose" ,python-nose) ; technially < 1.3,
8231 ;; ; but see above comment
8232 ;; ("python-coverage" ,python-coverage)
8233 ;; ("python-mock" ,python-mock)
8234 ;; ("python-pastedeploy" ,python-pastedeploy)
8235 ;; ("python-wsgiproxy2" ,python-wsgiproxy2)
8236 ;; ("python-pyquery" ,python-pyquery)))
8237 (propagated-inputs
8238 `(("python-waitress" ,python-waitress)
8239 ("python-webob" ,python-webob)
8240 ("python-six" ,python-six)
8241 ("python-beautifulsoup4" ,python-beautifulsoup4)))
8242 (home-page "http://webtest.pythonpaste.org/")
8243 (synopsis "Helper to test WSGI applications")
8244 (description "Webtest allows you to test your Python web applications
8245 without starting an HTTP server. It supports anything that supports the
8246 minimum of WSGI.")
8247 (license license:expat)
8248 (properties `((python2-variant . ,(delay python2-webtest))))))
8249
8250 (define-public python2-webtest
8251 (let ((webtest (package-with-python2
8252 (strip-python2-variant python-webtest))))
8253 (package
8254 (inherit webtest)
8255 (native-inputs `(("python2-setuptools" ,python2-setuptools)
8256 ,@(package-native-inputs webtest))))))
8257
8258 (define-public python-anyjson
8259 (package
8260 (name "python-anyjson")
8261 (version "0.3.3")
8262 (source
8263 (origin
8264 (method url-fetch)
8265 (uri (pypi-uri "anyjson" version))
8266 (sha256
8267 (base32
8268 "1fjph4alvcscsl5d4b6qpv1yh31jy05jxi1l0xff7lws7j32v09p"))))
8269 (build-system python-build-system)
8270 (arguments
8271 `(;; We could possibly get tests working, but on Python 3 it's not so easy.
8272 ;; Very strangely, 2to3 is run *during setup.py install* (or bdist, or
8273 ;; whatever) so this transformation needs to be done before the tests
8274 ;; can be run. Maybe we could add a build step to transform beforehand
8275 ;; but it could be annoying/difficult.
8276 ;; We can enable tests for the Python 2 version, though, and do below.
8277 #:tests? #f))
8278 (home-page "http://bitbucket.org/runeh/anyjson/")
8279 (synopsis
8280 "Wraps best available JSON implementation in a common interface")
8281 (description
8282 "Anyjson loads whichever is the fastest JSON module installed
8283 and provides a uniform API regardless of which JSON implementation is used.")
8284 (license license:bsd-3)
8285 (properties `((python2-variant . ,(delay python2-anyjson))))))
8286
8287 (define-public python2-anyjson
8288 (let ((anyjson (package-with-python2
8289 (strip-python2-variant python-anyjson))))
8290 (package
8291 (inherit anyjson)
8292 (arguments `(;; Unlike the python 3 variant, we do run tests. See above!
8293 #:tests? #t
8294 ,@(package-arguments anyjson)))
8295 (native-inputs `(("python2-setuptools" ,python2-setuptools)
8296 ("python2-nose" ,python2-nose))))))
8297
8298 (define-public python-amqp
8299 (package
8300 (name "python-amqp")
8301 (version "1.4.9")
8302 (source
8303 (origin
8304 (method url-fetch)
8305 (uri (pypi-uri "amqp" version))
8306 (sha256
8307 (base32
8308 "06n6q0kxhjnbfz3vn8x9yz09lwmn1xi9d6wxp31h5jbks0b4vsid"))))
8309 (build-system python-build-system)
8310 (native-inputs
8311 `(("python-nose" ,python-nose)
8312 ("python-mock" ,python-mock)))
8313 (home-page "http://github.com/celery/py-amqp")
8314 (synopsis
8315 "Low-level AMQP client for Python (fork of amqplib)")
8316 (description
8317 "This is a fork of amqplib which was originally written by Barry Pederson.
8318 It is maintained by the Celery project, and used by kombu as a pure python
8319 alternative when librabbitmq is not available.")
8320 (license license:lgpl2.1+)
8321 (properties `((python2-variant . ,(delay python2-amqp))))))
8322
8323 (define-public python2-amqp
8324 (let ((amqp (package-with-python2
8325 (strip-python2-variant python-amqp))))
8326 (package
8327 (inherit amqp)
8328 (arguments `(;; Tries to run coverage tests with nose-cover3, which seems
8329 ;; unmaintained. Weirdly, does not do this on the python 3
8330 ;; version?
8331 #:tests? #f
8332 ,@(package-arguments amqp)))
8333 (native-inputs `(("python2-setuptools" ,python2-setuptools)
8334 ,@(package-native-inputs amqp))))))
8335
8336 (define-public python-kombu
8337 (package
8338 (name "python-kombu")
8339 (version "3.0.33")
8340 (source
8341 (origin
8342 (method url-fetch)
8343 (uri (pypi-uri "kombu" version))
8344 (sha256
8345 (base32
8346 "16brjx2lgwbj2a37d0pjbfb84nvld6irghmqrs3qfncajp51hgc5"))))
8347 (build-system python-build-system)
8348 (native-inputs
8349 `(("python-mock" ,python-mock)
8350 ("python-nose" ,python-nose)))
8351 (propagated-inputs
8352 `(("python-anyjson" ,python-anyjson)
8353 ("python-amqp" ,python-amqp)))
8354 (home-page "http://kombu.readthedocs.org")
8355 (synopsis "Message passing library for Python")
8356 (description "The aim of Kombu is to make messaging in Python as easy as
8357 possible by providing an idiomatic high-level interface for the AMQ protocol,
8358 and also provide proven and tested solutions to common messaging problems.
8359 AMQP is the Advanced Message Queuing Protocol, an open standard protocol for
8360 message orientation, queuing, routing, reliability and security, for which the
8361 RabbitMQ messaging server is the most popular implementation.")
8362 (license license:bsd-3)
8363 (properties `((python2-variant . ,(delay python2-kombu))))))
8364
8365 (define-public python2-kombu
8366 (let ((kombu (package-with-python2
8367 (strip-python2-variant python-kombu))))
8368 (package
8369 (inherit kombu)
8370 (inputs `(("python2-setuptools" ,python2-setuptools)
8371 ("python2-unittest2" ,python2-unittest2)
8372 ,@(package-inputs kombu))))))
8373
8374 (define-public python-billiard
8375 (package
8376 (name "python-billiard")
8377 (version "3.3.0.22")
8378 (source
8379 (origin
8380 (method url-fetch)
8381 (uri (pypi-uri "billiard" version))
8382 (sha256
8383 (base32
8384 "0zp7h6a58alrb3mwdw61jds07395j4j0mj6iqsb8czrihw9ih5nj"))))
8385 (build-system python-build-system)
8386 (native-inputs
8387 `(("python-nose" ,python-nose)))
8388 (home-page "http://github.com/celery/billiard")
8389 (synopsis
8390 "Python multiprocessing fork with improvements and bugfixes")
8391 (description
8392 "Billiard is a fork of the Python 2.7 multiprocessing package. The
8393 multiprocessing package itself is a renamed and updated version of R Oudkerk's
8394 pyprocessing package. This standalone variant is intended to be compatible with
8395 Python 2.4 and 2.5, and will draw its fixes/improvements from python-trunk.")
8396 (license license:bsd-3)
8397 (properties `((python2-variant . ,(delay python2-billiard))))))
8398
8399 (define-public python2-billiard
8400 (let ((billiard (package-with-python2
8401 (strip-python2-variant python-billiard))))
8402 (package
8403 (inherit billiard)
8404 (native-inputs `(("python2-setuptools" ,python2-setuptools)
8405 ("python2-unittest2" ,python2-unittest2)
8406 ("python2-mock" ,python2-mock)
8407 ,@(package-native-inputs billiard))))))
8408
8409 (define-public python-celery
8410 (package
8411 (name "python-celery")
8412 (version "3.1.20")
8413 (source
8414 (origin
8415 (method url-fetch)
8416 (uri (pypi-uri "celery" version))
8417 (sha256
8418 (base32
8419 "1md6ywg1s0946qyp8ndnsd677wm0yax933h2sb4m3a4j7lf1jbyh"))))
8420 (build-system python-build-system)
8421 (native-inputs
8422 `(("python-nose" ,python-nose)))
8423 (inputs
8424 `(("python-pytz" ,python-pytz)
8425 ("python-amqp" ,python-amqp)
8426 ("python-anyjson" ,python-anyjson)
8427 ("python-billiard" ,python-billiard)
8428 ("python-kombu" ,python-kombu)))
8429 (home-page "http://celeryproject.org")
8430 (synopsis "Distributed Task Queue")
8431 (description "Celery is an asynchronous task queue/job queue based on
8432 distributed message passing. It is focused on real-time operation, but
8433 supports scheduling as well. The execution units, called tasks, are executed
8434 concurrently on a single or more worker servers using multiprocessing,
8435 Eventlet, or gevent. Tasks can execute asynchronously (in the background) or
8436 synchronously (wait until ready).")
8437 (license license:bsd-3)
8438 (properties `((python2-variant . ,(delay python2-celery))))))
8439
8440 (define-public python2-celery
8441 (let ((celery (package-with-python2
8442 (strip-python2-variant python-celery))))
8443 (package
8444 (inherit celery)
8445 (native-inputs `(("python2-setuptools" ,python2-setuptools)
8446 ("python2-unittest2" ,python2-unittest2)
8447 ("python2-mock" ,python2-mock)
8448 ,@(package-native-inputs celery))))))
8449
8450 (define-public python-translitcodec
8451 (package
8452 (name "python-translitcodec")
8453 (version "0.4.0")
8454 (source
8455 (origin
8456 (method url-fetch)
8457 (uri (pypi-uri "translitcodec" version))
8458 (sha256
8459 (base32
8460 "10x6pvblkzky1zhjs8nmx64nb9jdzxad4bxhq4iwv0j4z2aqjnki"))))
8461 (build-system python-build-system)
8462 (arguments
8463 `(#:tests? #f)) ; no tests provided
8464 (home-page
8465 "https://github.com/claudep/translitcodec")
8466 (synopsis
8467 "Unicode to 8-bit charset transliteration codec")
8468 (description
8469 "This package contains codecs for transliterating ISO 10646 texts into
8470 best-effort representations using smaller coded character sets (ASCII,
8471 ISO 8859, etc.).")
8472 (license license:expat)
8473 (properties `((python2-variant . ,(delay python2-translitcodec))))))
8474
8475 (define-public python2-translitcodec
8476 (package
8477 (inherit (package-with-python2
8478 (strip-python2-variant python-translitcodec)))
8479 (native-inputs `(("python2-setuptools" ,python2-setuptools)))))
8480
8481 (define-public python-editor
8482 (package
8483 (name "python-editor")
8484 (version "0.5")
8485 (source
8486 (origin
8487 (method url-fetch)
8488 (uri (pypi-uri "python-editor" version))
8489 (sha256
8490 (base32
8491 "1ypnpgvzpkbwsg4rdvy4sy51j28b5xq9v8pnkwxncn07vqz06p7n"))))
8492 (build-system python-build-system)
8493 (home-page
8494 "https://github.com/fmoo/python-editor")
8495 (synopsis
8496 "Programmatically open an editor, capture the result")
8497 (description
8498 "python-editor is a library that provides the editor module for
8499 programmatically interfacing with your system's $EDITOR.")
8500 (license license:asl2.0)
8501 (properties `((python2-variant . ,(delay python2-editor))))))
8502
8503 (define-public python2-editor
8504 (package
8505 (inherit (package-with-python2
8506 (strip-python2-variant python-editor)))
8507 (inputs `(("python2-setuptools" ,python2-setuptools)))))
8508
8509 (define-public python-sphinxcontrib-programoutput
8510 (package
8511 (name "python-sphinxcontrib-programoutput")
8512 (version "0.8")
8513 (source (origin
8514 (method url-fetch)
8515 (uri (pypi-uri "sphinxcontrib-programoutput" version))
8516 (sha256
8517 (base32
8518 "098as6z1s0gb4dh5xcr1fd2vpm91zj93jzvgawspxf5s4hqs0xhp"))))
8519 (build-system python-build-system)
8520 (propagated-inputs
8521 `(("python-docutils" ,python-docutils)
8522 ("python-sphinx" ,python-sphinx)))
8523 (synopsis "Sphinx extension to include program output")
8524 (description "A Sphinx extension to literally insert the output of arbitrary
8525 commands into documents, helping you to keep your command examples up to date.")
8526 (home-page "https://github.com/lunaryorn/sphinxcontrib-programoutput")
8527 (license license:bsd-2)
8528 (properties `((python2-variant . ,(delay python2-sphinxcontrib-programoutput))))))
8529
8530 (define-public python2-sphinxcontrib-programoutput
8531 (package
8532 (inherit (package-with-python2
8533 (strip-python2-variant python-sphinxcontrib-programoutput)))
8534 (native-inputs `(("python2-setuptools" ,python2-setuptools)))))
8535
8536 (define-public python-sphinx-repoze-autointerface
8537 (package
8538 (name "python-sphinx-repoze-autointerface")
8539 (version "0.8")
8540 (source (origin
8541 (method url-fetch)
8542 (uri (pypi-uri "repoze.sphinx.autointerface" version))
8543 (sha256
8544 (base32
8545 "08ycivzf7bh4a1zcyp31hbyqs1b2c9r26raa3vxjwwmbfqr3iw4f"))))
8546 (build-system python-build-system)
8547 (propagated-inputs
8548 `(("python-docutils" ,python-docutils)
8549 ("python-sphinx" ,python-sphinx)
8550 ("python-zope-interface" ,python-zope-interface)))
8551 (synopsis "Auto-generate Sphinx API docs from Zope interfaces")
8552 (description "This package defines an extension for the Sphinx documentation
8553 system. The extension allows generation of API documentation by
8554 introspection of @code{zope.interface} instances in code.")
8555 (home-page "https://github.com/repoze/repoze.sphinx.autointerface")
8556 (license license:repoze)))
8557
8558 (define-public python2-sphinx-repoze-autointerface
8559 (package-with-python2 python-sphinx-repoze-autointerface))
8560
8561 (define-public python-psycopg2
8562 (package
8563 (name "python-psycopg2")
8564 (version "2.6.1")
8565 (source
8566 (origin
8567 (method url-fetch)
8568 (uri (pypi-uri "psycopg2" version))
8569 (sha256
8570 (base32
8571 "0k4hshvrwsh8yagydyxgmd0pjm29lwdxkngcq9fzfzkmpsxrmkva"))))
8572 (build-system python-build-system)
8573 (arguments
8574 ;; Tests would require a postgresql database "psycopg2_test"
8575 ;; and a running postgresql database management service.
8576 `(#:tests? #f)) ; TODO re-enable after providing a test-db.
8577 (inputs
8578 `(("postgresql" ,postgresql))) ; libpq
8579 (home-page "http://initd.org/psycopg/")
8580 (synopsis "Python PostgreSQL adapter")
8581 (description
8582 "psycopg2 is a thread-safe PostgreSQL adapter that implements DB-API 2.0. ")
8583 (license license:lgpl3+)
8584 (properties `((python2-variant . ,(delay python2-psycopg2))))))
8585
8586 (define-public python2-psycopg2
8587 (package
8588 (inherit (package-with-python2
8589 (strip-python2-variant python-psycopg2)))
8590 (native-inputs `(("python2-setuptools" ,python2-setuptools)))))
8591
8592 (define-public python-vobject
8593 (package
8594 (name "python-vobject")
8595 (version "0.9.2")
8596 (source (origin
8597 (method url-fetch)
8598 (uri (pypi-uri "vobject" version))
8599 (sha256
8600 (base32
8601 "1qfnwlx8qwkgr6nf5wvl6ff1r3kll53dh3z6nyp173nmlhhhqccb"))))
8602 (build-system python-build-system)
8603 (inputs
8604 `(("python-dateutil-2" ,python-dateutil-2)
8605 ("python-pyicu" ,python-pyicu)))
8606 (synopsis "Parse and generate vCard and vCalendar files")
8607 (description "Vobject is intended to be a full featured Python package for
8608 parsing and generating vCard and vCalendar files. Currently, iCalendar files
8609 are supported and well tested. vCard 3.0 files are supported, and all data
8610 should be imported, but only a few components are understood in a sophisticated
8611 way.")
8612 (home-page "http://eventable.github.io/vobject/")
8613 (license license:asl2.0)
8614 (properties `((python2-variant . ,(delay python2-vobject))))))
8615
8616 (define-public python2-vobject
8617 (package
8618 (inherit (package-with-python2
8619 (strip-python2-variant python-vobject)))
8620 (native-inputs `(("python2-setuptools" ,python2-setuptools)))))
8621
8622 (define-public python-munkres
8623 (package
8624 (name "python-munkres")
8625 (version "1.0.7")
8626 (source (origin
8627 (method url-fetch)
8628 (uri (pypi-uri "munkres" version))
8629 (sha256
8630 (base32
8631 "1i6nf45i0kkzdx6k70giybsqxz4dxsjbrkrfqgjd7znfkf25sjik"))))
8632 (build-system python-build-system)
8633 (arguments
8634 '(#:tests? #f)) ; no test suite
8635 (home-page "http://software.clapper.org/munkres/")
8636 (synopsis "Implementation of the Munkres algorithm")
8637 (description "The Munkres module provides an implementation of the Munkres
8638 algorithm (also called the Hungarian algorithm or the Kuhn-Munkres algorithm),
8639 useful for solving the Assignment Problem.")
8640 (license license:bsd-3)))
8641
8642 (define-public python2-munkres
8643 (package-with-python2 python-munkres))
8644
8645 (define-public python-flask
8646 (package
8647 (name "python-flask")
8648 (version "0.10.1")
8649 (source (origin
8650 (method url-fetch)
8651 (uri (pypi-uri "Flask" version))
8652 (sha256
8653 (base32
8654 "0wrkavjdjndknhp8ya8j850jq7a1cli4g5a93mg8nh1xz2gq50sc"))))
8655 (build-system python-build-system)
8656 (propagated-inputs
8657 `(("python-itsdangerous" ,python-itsdangerous)
8658 ("python-jinja2" ,python-jinja2)
8659 ("python-werkzeug" ,python-werkzeug)))
8660 (home-page "https://github.com/mitsuhiko/flask/")
8661 (synopsis "Microframework based on Werkzeug, Jinja2 and good intentions")
8662 (description "Flask is a micro web framework based on the Werkzeug toolkit
8663 and Jinja2 template engine. It is called a micro framework because it does not
8664 presume or force a developer to use a particular tool or library.")
8665 (license license:bsd-3)
8666 (properties `((python2-variant . ,(delay python2-flask))))))
8667
8668 (define-public python2-flask
8669 (package (inherit (package-with-python2
8670 (strip-python2-variant python-flask)))
8671 (native-inputs `(("python2-setuptools" ,python2-setuptools)))))
8672
8673 (define-public python-cookies
8674 (package
8675 (name "python-cookies")
8676 (version "2.2.1")
8677 (source (origin
8678 (method url-fetch)
8679 (uri (pypi-uri "cookies" version))
8680 (sha256
8681 (base32
8682 "13pfndz8vbk4p2a44cfbjsypjarkrall71pgc97glk5fiiw9idnn"))))
8683 (build-system python-build-system)
8684 (arguments
8685 `(;; test are broken: https://gitlab.com/sashahart/cookies/issues/3
8686 #:tests? #f))
8687 (native-inputs
8688 `(("python-pytest" ,python2-pytest)))
8689 (synopsis "HTTP cookie parser and renderer")
8690 (description "A RFC 6265-compliant HTTP cookie parser and renderer in
8691 Python.")
8692 (home-page "https://gitlab.com/sashahart/cookies")
8693 (license license:expat)
8694 (properties `((python2-variant . ,(delay python2-cookies))))))
8695
8696 (define-public python2-cookies
8697 (let ((cookies (package-with-python2
8698 (strip-python2-variant python-cookies))))
8699 (package (inherit cookies)
8700 (native-inputs `(("python2-setuptools" ,python2-setuptools)
8701 ,@(package-native-inputs cookies))))))
8702
8703 (define-public python-responses
8704 (package
8705 (name "python-responses")
8706 (version "0.5.1")
8707 (source (origin
8708 (method url-fetch)
8709 (uri (pypi-uri "responses" version))
8710 (sha256
8711 (base32
8712 "1spcfxixyk9k7pk82jm6zqkwk031s95lh8q0mz7539jrb7269bcc"))))
8713 (build-system python-build-system)
8714 (arguments
8715 `(;; Test suite is not distributed:
8716 ;; https://github.com/getsentry/responses/issues/38
8717 #:tests? #f))
8718 (native-inputs
8719 `(("python-cookies" ,python-cookies)
8720 ("python-mock" ,python-mock)))
8721 (propagated-inputs
8722 `(("python-requests" ,python-requests)
8723 ("python-six" ,python-six)))
8724 (home-page "https://github.com/getsentry/responses")
8725 (synopsis "Utility for mocking out the `requests` Python library")
8726 (description "A utility library for mocking out the `requests` Python
8727 library.")
8728 (license license:asl2.0)
8729 (properties `((python2-variant . ,(delay python2-responses))))))
8730
8731 (define-public python2-responses
8732 (let ((responses (package-with-python2
8733 (strip-python2-variant python-responses))))
8734 (package (inherit responses)
8735 (native-inputs `(("python2-setuptools" ,python2-setuptools)
8736 ,@(package-native-inputs responses))))))
8737
8738 (define-public python-pathlib
8739 (package
8740 (name "python-pathlib")
8741 (version "1.0.1")
8742 (source (origin
8743 (method url-fetch)
8744 (uri (pypi-uri "pathlib" version))
8745 (sha256
8746 (base32
8747 "17zajiw4mjbkkv6ahp3xf025qglkj0805m9s41c45zryzj6p2h39"))))
8748 (build-system python-build-system)
8749 (arguments
8750 `(#:phases
8751 (modify-phases %standard-phases
8752 (replace 'check
8753 (lambda _ (zero? (system* "python" "./test_pathlib.py")))))))
8754 (home-page "https://pathlib.readthedocs.org/")
8755 (synopsis "Object-oriented file system paths")
8756 (description "Pathlib offers a set of classes to handle file system paths.
8757 It offers the following advantages over using string objects:
8758
8759 @enumerate
8760 @item No more cumbersome use of os and os.path functions. Everything can
8761 be done easily through operators, attribute accesses, and method calls.
8762 @item Embodies the semantics of different path types. For example,
8763 comparing Windows paths ignores casing.
8764 @item Well-defined semantics, eliminating any inconsistencies or
8765 ambiguities (forward vs. backward slashes, etc.).
8766 @end enumerate\n")
8767 (license license:expat)))
8768
8769 (define-public python2-pathlib
8770 (package-with-python2 python-pathlib))
8771
8772 (define-public python-jellyfish
8773 (package
8774 (name "python-jellyfish")
8775 (version "0.5.3")
8776 (source (origin
8777 (method url-fetch)
8778 (uri (pypi-uri "jellyfish" version))
8779 (sha256
8780 (base32
8781 "12bxh8cy9xmvyrjz7aw159nd5pyvb645rkvw4r6bvm4xbvs8gd07"))))
8782 (build-system python-build-system)
8783 (native-inputs
8784 `(("python-pytest" ,python-pytest)))
8785 (home-page "https://github.com/jamesturk/jellyfish")
8786 (synopsis "Approximate and phonetic matching of strings")
8787 (description "Jellyfish uses a variety of string comparison and phonetic
8788 encoding algorithms to do fuzzy string matching.")
8789 (license license:bsd-2)
8790 (properties `((python2-variant . ,(delay python2-jellyfish))))))
8791
8792 (define-public python2-jellyfish
8793 (let ((jellyfish (package-with-python2
8794 (strip-python2-variant python-jellyfish))))
8795 (package (inherit jellyfish)
8796 (native-inputs `(("python2-setuptools" ,python2-setuptools)
8797 ("python2-unicodecsv" ,python2-unicodecsv)
8798 ,@(package-native-inputs jellyfish))))))
8799
8800 (define-public python2-unicodecsv
8801 (package
8802 (name "python2-unicodecsv")
8803 (version "0.14.1")
8804 (source (origin
8805 (method url-fetch)
8806 ;; The test suite is not included in the PyPi release.
8807 ;; https://github.com/jdunck/python-unicodecsv/issues/19
8808 (uri (string-append "https://github.com/jdunck/python-unicodecsv/"
8809 "archive/" version ".tar.gz"))
8810 (file-name (string-append name "-" version ".tar.gz"))
8811 (sha256
8812 (base32
8813 "087nqanfcyp6mlfbbr5lva5f3w6iz1bybls9xlrb8icmc474wh4w"))))
8814 (build-system python-build-system)
8815 (arguments
8816 `(;; It supports Python 3, but Python 3 can already do Unicode CSV.
8817 #:python ,python-2))
8818 (native-inputs
8819 `(("python2-setuptools" ,python2-setuptools)
8820 ("python2-unittest2" ,python2-unittest2)))
8821 (home-page "https://github.com/jdunck/python-unicodecsv")
8822 (synopsis "Unicode CSV module for Python 2")
8823 (description "Unicodecsv is a drop-in replacement for Python 2.7's CSV
8824 module, adding support for Unicode strings.")
8825 (license license:bsd-2)))
8826
8827 (define-public python-rarfile
8828 (package
8829 (name "python-rarfile")
8830 (version "2.7")
8831 (source (origin
8832 (method url-fetch)
8833 (uri (pypi-uri "rarfile" version))
8834 (sha256
8835 (base32
8836 "0d8n1dlpiz7av8dmbp0vclrwl9cnxizr4f2c9xvj1h5nvn480527"))
8837 ;; https://github.com/markokr/rarfile/pull/17/
8838 (patches (search-patches "python-rarfile-fix-tests.patch"))))
8839 (build-system python-build-system)
8840 (arguments
8841 '(#:phases
8842 (modify-phases %standard-phases
8843 (replace 'check
8844 ;; Many tests fail, but the installation proceeds.
8845 (lambda _ (zero? (system* "make" "-C" "test" "test")))))))
8846 (native-inputs
8847 `(("which" ,which))) ; required for tests
8848 (propagated-inputs
8849 `(("libarchive" ,libarchive)))
8850 (home-page "https://github.com/markokr/rarfile")
8851 (synopsis "RAR archive reader for Python")
8852 (description "This is Python module for RAR archive reading. The interface
8853 is made as zipfile like as possible.")
8854 (license license:isc)))
8855
8856 (define-public python2-rarfile
8857 (package-with-python2 python-rarfile))
8858
8859 (define-public python-magic
8860 (package
8861 (name "python-magic")
8862 (version "0.4.3")
8863 (source
8864 (origin
8865 (method url-fetch)
8866 (uri (string-append "https://github.com/ahupp/python-magic/archive/"
8867 version ".tar.gz"))
8868 (sha256
8869 (base32
8870 "17bgy92i7sb021f2s4mw1dcvpm6p1mi9jihridwy1pyn8mzvpjgk"))
8871 (file-name (string-append name "-" version "-checkout"))))
8872 (build-system python-build-system)
8873 (arguments
8874 ;; The tests are unreliable, so don't run them. The tests fail
8875 ;; under Python3 because they were written for Python2 and
8876 ;; contain import statements that do not work in Python3. One of
8877 ;; the tests fails under Python2 because its assertions are
8878 ;; overly stringent; it relies on comparing output strings which
8879 ;; are brittle and can change depending on the version of
8880 ;; libmagic being used and the system on which the test is
8881 ;; running. In my case, under GuixSD 0.10.0, only one test
8882 ;; failed, and it seems to have failed only because the version
8883 ;; of libmagic that is packaged in Guix outputs a slightly
8884 ;; different (but not wrong) string than the one that the test
8885 ;; expected.
8886 '(#:tests? #f
8887 #:phases (modify-phases %standard-phases
8888 ;; Replace a specific method call with a hard-coded
8889 ;; path to the necessary libmagic.so file in the
8890 ;; store. If we don't do this, then the method call
8891 ;; will fail to find the libmagic.so file, which in
8892 ;; turn will cause any application using
8893 ;; python-magic to fail.
8894 (add-before 'build 'hard-code-path-to-libmagic
8895 (lambda* (#:key inputs #:allow-other-keys)
8896 (let ((file (assoc-ref inputs "file")))
8897 (substitute* "magic.py"
8898 (("ctypes.util.find_library\\('magic'\\)")
8899 (string-append "'" file "/lib/libmagic.so'")))
8900 #t)))
8901 (add-before 'install 'disable-egg-compression
8902 (lambda _
8903 (let ((port (open-file "setup.cfg" "a")))
8904 (display "\n[easy_install]\nzip_ok = 0\n"
8905 port)
8906 (close-port port)
8907 #t))))))
8908 (native-inputs
8909 `(("python-setuptools" ,python-setuptools)))
8910 (inputs
8911 ;; python-magic needs to be able to find libmagic.so.
8912 `(("file" ,file)))
8913 (home-page "https://github.com/ahupp/python-magic")
8914 (synopsis "File type identification using libmagic")
8915 (description
8916 "This module uses ctypes to access the libmagic file type
8917 identification library. It makes use of the local magic database and
8918 supports both textual and MIME-type output. Note that this module and
8919 the python-file module both provide a \"magic.py\" file; these two
8920 modules, which are different and were developed separately, both serve
8921 the same purpose: to provide Python bindings for libmagic.")
8922 (license license:expat)))
8923
8924 (define-public python2-magic
8925 (package-with-python2 python-magic))
8926
8927 (define-public python2-s3cmd
8928 (package
8929 (name "python2-s3cmd")
8930 (version "1.6.1")
8931 (source
8932 (origin
8933 (method url-fetch)
8934 (uri (string-append "mirror://sourceforge/s3tools/s3cmd/" version "/"
8935 "s3cmd-" version ".tar.gz"))
8936 (sha256
8937 (base32
8938 "0ki1rzhm5icvi9ry5jswi4b22yqwyj0d2wsqsgilwx6qhi7pjxa6"))))
8939 (build-system python-build-system)
8940 (arguments
8941 ;; s3cmd is written for python2 only and contains no tests.
8942 `(#:python ,python-2
8943 #:tests? #f))
8944 (native-inputs
8945 `(("python2-setuptools" ,python2-setuptools)))
8946 (inputs
8947 `(("python2-dateutil" ,python2-dateutil)
8948 ;; The python-file package also provides a magic.py module.
8949 ;; This is an unfortunate state of affairs; however, s3cmd
8950 ;; fails to install if it cannot find specifically the
8951 ;; python-magic package. Thus we include it, instead of using
8952 ;; python-file. Ironically, s3cmd sometimes works better
8953 ;; without libmagic bindings at all:
8954 ;; https://github.com/s3tools/s3cmd/issues/198
8955 ("python2-magic" ,python2-magic)))
8956 (home-page "http://s3tools.org/s3cmd")
8957 (synopsis "Command line tool for S3-compatible storage services")
8958 (description
8959 "S3cmd is a command line tool for uploading, retrieving and managing data
8960 in storage services that are compatible with the Amazon Simple Storage
8961 Service (S3) protocol, including S3 itself. It supports rsync-like backup,
8962 GnuPG encryption, and more. It also supports management of Amazon's
8963 CloudFront content delivery network.")
8964 (license license:gpl2+)))
8965
8966 (define-public python-pkgconfig
8967 (package
8968 (name "python-pkgconfig")
8969 (version "1.1.0")
8970 (source
8971 (origin
8972 (method url-fetch)
8973 (uri (pypi-uri "pkgconfig" version))
8974 (sha256
8975 (base32
8976 "1pw0kmvc57sjmaxi6c54fqsnihqj6hvhc9y1vaz36axafzqam7bh"))))
8977 (build-system python-build-system)
8978 (native-inputs
8979 `(("python-nose" ,python-nose)
8980 ("python-setuptools" ,python-setuptools)))
8981 (inputs
8982 `(("pkg-config" ,pkg-config)))
8983 (arguments
8984 `(;; Tests fail with "ValueError: _type_ 'v' not supported" on Python 3,
8985 ;; and on Python 2 they need the dl module deprecated since Python 2.6.
8986 #:tests? #f
8987 ;; Prevent creation of the egg. This works around
8988 ;; https://debbugs.gnu.org/cgi/bugreport.cgi?bug=20765 .
8989 #:configure-flags '("--single-version-externally-managed" "--root=/")
8990 ;; Hard-code the path to pkg-config.
8991 #:phases
8992 (modify-phases %standard-phases
8993 (add-before
8994 'build 'patch
8995 (lambda _
8996 (substitute* "pkgconfig/pkgconfig.py"
8997 (("cmd = 'pkg-config")
8998 (string-append "cmd = '" (which "pkg-config"))))
8999 #t)))))
9000 (home-page "http://github.com/matze/pkgconfig")
9001 (synopsis "Python interface for pkg-config")
9002 (description "This module provides a Python interface to pkg-config. It
9003 can be used to find all pkg-config packages, check if a package exists,
9004 check if a package meets certain version requirements, query CFLAGS and
9005 LDFLAGS and parse the output to build extensions with setup.py.")
9006 (license license:expat)))
9007
9008 (define-public python2-pkgconfig
9009 (package-with-python2 python-pkgconfig))
9010
9011 (define-public python-bz2file
9012 (package
9013 (name "python-bz2file")
9014 (version "0.98")
9015 (source
9016 (origin
9017 (method url-fetch)
9018 (uri (pypi-uri "bz2file" version))
9019 (sha256
9020 (base32
9021 "126s53fkpx04f33a829yqqk8fj4png3qwg4m66cvlmhmwc8zihb4"))))
9022 (build-system python-build-system)
9023 (arguments
9024 `(#:tests? #f)) ; Tests use deprecated python modules.
9025 (home-page "https://github.com/nvawda/bz2file")
9026 (synopsis "Read and write bzip2-compressed files")
9027 (description
9028 "Bz2file is a Python library for reading and writing bzip2-compressed
9029 files. It contains a drop-in replacement for the I/O interface in the
9030 standard library's @code{bz2} module, including features from the latest
9031 development version of CPython that are not available in older releases.")
9032 (license license:asl2.0)
9033 (properties `((python2-variant . ,(delay python2-bz2file))))))
9034
9035 (define-public python2-bz2file
9036 (let ((base (package-with-python2
9037 (strip-python2-variant python-bz2file))))
9038 (package
9039 (inherit base)
9040 (native-inputs
9041 `(("python2-setuptools" ,python2-setuptools)))
9042 (arguments
9043 `(#:python ,python-2
9044 #:phases
9045 (modify-phases %standard-phases
9046 ;; 'python setup.py test' does not work as of 0.98.
9047 ;; There is only the one test file, so we run it directly.
9048 (replace 'check
9049 (lambda _ (zero? (system* "python"
9050 "test_bz2file.py"))))))))))
9051
9052 (define-public python-future
9053 (package
9054 (name "python-future")
9055 (version "0.15.2")
9056 (source
9057 (origin
9058 (method url-fetch)
9059 (uri (pypi-uri "future" version))
9060 (sha256
9061 (base32
9062 "15wvcfzssc68xqnqi1dq4fhd0848hwi9jn42hxyvlqna40zijfrx"))))
9063 (build-system python-build-system)
9064 ;; Many tests connect to the network or are otherwise flawed.
9065 ;; https://github.com/PythonCharmers/python-future/issues/210
9066 (arguments
9067 `(#:tests? #f))
9068 (home-page "http://python-future.org")
9069 (synopsis "Single-source support for Python 3 and 2")
9070 (description
9071 "@code{python-future} is the missing compatibility layer between Python 2 and
9072 Python 3. It allows you to use a single, clean Python 3.x-compatible codebase
9073 to support both Python 2 and Python 3 with minimal overhead.")
9074 (license license:expat)
9075 (properties `((python2-variant . ,(delay python2-future))))))
9076
9077 (define-public python2-future
9078 (let ((base (package-with-python2
9079 (strip-python2-variant python-future))))
9080 (package
9081 (inherit base)
9082 (native-inputs `(("python2-setuptools" ,python2-setuptools))))))
9083
9084 (define-public python-cysignals
9085 (package
9086 (name "python-cysignals")
9087 (version "1.1.0")
9088 (source
9089 (origin
9090 (method url-fetch)
9091 (uri (pypi-uri "cysignals" version ".tar.bz2"))
9092 (sha256
9093 (base32
9094 "14cbyd9znlz6cxy1s3g6v6dv5jj45hn27pywkidd9b1zanaysqc6"))))
9095 (build-system python-build-system)
9096 (native-inputs
9097 `(("python-cython" ,python-cython)
9098 ("python-setuptools" ,python-setuptools)
9099 ("python-sphinx" ,python-sphinx)))
9100 (inputs
9101 `(("pari-gp" ,pari-gp)))
9102 (arguments
9103 `(#:modules ((guix build python-build-system)
9104 ((guix build gnu-build-system) #:prefix gnu:)
9105 (guix build utils))
9106 ;; FIXME: Tests are executed after installation and currently fail
9107 ;; when not installing into standard locations; the author is working
9108 ;; on a fix.
9109 #:tests? #f
9110 #:phases
9111 (modify-phases %standard-phases
9112 (add-before
9113 'build 'configure
9114 (assoc-ref gnu:%standard-phases 'configure)))))
9115 (home-page
9116 "https://github.com/sagemath/cysignals")
9117 (synopsis
9118 "Handling of interrupts and signals for Cython")
9119 (description
9120 "The cysignals package provides mechanisms to handle interrupts (and
9121 other signals and errors) in Cython code, using two related approaches,
9122 for mixed Cython/Python code or external C libraries and pure Cython code,
9123 respectively.")
9124 (license license:lgpl3+)))
9125
9126 (define-public python2-cysignals
9127 (package-with-python2 python-cysignals))
9128
9129 (define-public python2-shedskin
9130 (package
9131 (name "python2-shedskin")
9132 (version "0.9.4")
9133 (source
9134 (origin
9135 (method url-fetch)
9136 (uri (string-append "https://github.com/shedskin/shedskin/"
9137 "releases/download/v" version
9138 "/shedskin-" version ".tgz"))
9139 (sha256
9140 (base32
9141 "0nzwrzgw1ga8rw6f0ryq7zr9kkiavd1cqz5hzxkcbicl1dk7kz41"))))
9142 (build-system python-build-system)
9143 (arguments
9144 `(#:python ,python-2
9145 #:phases (modify-phases %standard-phases
9146 (add-after 'unpack 'fix-resulting-include-libs
9147 (lambda* (#:key inputs #:allow-other-keys)
9148 (let ((libgc (assoc-ref inputs "libgc"))
9149 (pcre (assoc-ref inputs "pcre")))
9150 (substitute* "shedskin/makefile.py"
9151 (("variable == 'CCFLAGS':[ ]*")
9152 (string-append "variable == 'CCFLAGS':\n"
9153 " line += ' -I " pcre "/include"
9154 " -I " libgc "/include'"))
9155 (("variable == 'LFLAGS':[ ]*")
9156 (string-append "variable == 'LFLAGS':\n"
9157 " line += ' -L" pcre "/lib"
9158 " -L " libgc "/lib'")))
9159 #t))))))
9160 (native-inputs `(("python2-setuptools" ,python2-setuptools)))
9161 (inputs `(("pcre" ,pcre)
9162 ("libgc" ,libgc)))
9163 (home-page "https://shedskin.github.io/")
9164 (synopsis "Experimental Python-2 to C++ Compiler")
9165 (description (string-append "This is an experimental compiler for a subset of
9166 Python. It generates C++ code and a Makefile."))
9167 (license (list license:gpl3 license:bsd-3 license:expat))))
9168
9169 (define-public python2-rope
9170 (package
9171 (name "python2-rope")
9172 (version "0.10.3")
9173 (source
9174 (origin
9175 (method url-fetch)
9176 (uri (pypi-uri "rope" version))
9177 (sha256
9178 (base32
9179 "18k5znhpwvrfck3yp0jmhd5j8r0f0s8bk1zh5yhs2cfgmfhbwigb"))))
9180 (arguments
9181 ;; Rope is currently python-2 only.
9182 ;; https://github.com/python-rope/rope/issues/57
9183 `(#:python ,python-2))
9184 (build-system python-build-system)
9185 (native-inputs
9186 `(("python2-unittest2" ,python2-unittest2)
9187 ("python2-setuptools" ,python2-setuptools)))
9188 (home-page "https://github.com/python-rope/rope")
9189 (synopsis "Refactoring library for Python")
9190 (description "Rope is a refactoring library for Python. It facilitates
9191 the renaming, moving and extracting of attributes, functions, modules, fields
9192 and parameters in Python 2 source code. These refactorings can also be applied
9193 to occurences in strings and comments.")
9194 (license license:gpl2)))
9195
9196 (define-public python-py3status
9197 (package
9198 (name "python-py3status")
9199 (version "3.1")
9200 (source
9201 (origin
9202 (method url-fetch)
9203 (uri (pypi-uri "py3status" version))
9204 (sha256
9205 (base32
9206 "0i283z1pivmir61z8kbiycigc94l61v33ygzkhczf1ifq7cppyds"))))
9207 (build-system python-build-system)
9208 (native-inputs
9209 `(("python-setuptools" ,python-setuptools)))
9210 (home-page "https://github.com/ultrabug/py3status")
9211 (synopsis "Extensible i3status wrapper written in Python")
9212 (description "py3status is an i3status wrapper which extends i3status
9213 functionality in a modular way, allowing you to extend your panel with your
9214 own code, responding to click events and updating clock every second.")
9215 (license license:bsd-3)))
9216
9217 (define-public python-tblib
9218 (package
9219 (name "python-tblib")
9220 (version "1.3.0")
9221 (source (origin
9222 (method url-fetch)
9223 (uri (pypi-uri "tblib" version))
9224 (sha256 (base32
9225 "02iahfkfa927hb4jq2bak36ldihwapzacfiq5lyxg8llwn98a1yi"))))
9226 (build-system python-build-system)
9227 (arguments
9228 `(#:phases
9229 (modify-phases %standard-phases
9230 (replace 'check
9231 (lambda _
9232 ;; Upstream runs tests after installation and the package itself
9233 ;; resides in a subdirectory. Extend PYTHONPATH so it will be
9234 ;; found.
9235 (setenv "PYTHONPATH"
9236 (string-append (getcwd) "/build/lib:"
9237 (getenv "PYTHONPATH")))
9238 (zero? (system* "py.test" "-vv" "tests" "README.rst")))))))
9239 (native-inputs
9240 `(("python-pytest" ,python-pytest)
9241 ("python-setuptools" ,python-setuptools)
9242 ("python-six" ,python-six)))
9243 (home-page "https://github.com/ionelmc/python-tblib")
9244 (synopsis "Traceback serialization library")
9245 (description
9246 "Traceback serialization allows you to:
9247
9248 @enumerate
9249 @item Pickle tracebacks and raise exceptions with pickled tracebacks in
9250 different processes. This allows better error handling when running code over
9251 multiple processes (imagine multiprocessing, billiard, futures, celery etc).
9252
9253 @item Parse traceback strings and raise with the parsed tracebacks.
9254 @end itemize")
9255 (license license:bsd-3)))
9256
9257 (define-public python2-tblib
9258 (package-with-python2 python-tblib))
9259
9260 (define-public python-sqlparse
9261 (package
9262 (name "python-sqlparse")
9263 (version "0.1.19")
9264 (source (origin
9265 (method url-fetch)
9266 (uri (pypi-uri "sqlparse" version))
9267 (sha256
9268 (base32
9269 "1s2fvaxgh9kqzrd6iwy5h7i61ckn05plx9np13zby93z3hdbx5nq"))))
9270 (build-system python-build-system)
9271 (arguments
9272 `(#:phases
9273 (modify-phases %standard-phases
9274 (replace 'check
9275 (lambda* _
9276 ;; setup.py-integrated 2to3 only affects the build files, but
9277 ;; py.test is using the source files. So we need to convert them
9278 ;; manually.
9279 (when (zero? (system* "python3"))
9280 (system* "2to3" "--no-diff" "-wn" "sqlparse" "tests"))
9281 (zero? (system* "py.test")))))))
9282 (native-inputs
9283 `(("python-pytest" ,python-pytest)
9284 ("python-setuptools" ,python-setuptools)))
9285 (home-page "https://github.com/andialbrecht/sqlparse")
9286 (synopsis "Non-validating SQL parser")
9287 (description "Sqlparse is a non-validating SQL parser for Python. It
9288 provides support for parsing, splitting and formatting SQL statements.")
9289 (license license:bsd-3)))
9290
9291 (define-public python2-sqlparse
9292 (package-with-python2 python-sqlparse))
9293
9294 (define-public python-greenlet
9295 (package
9296 (name "python-greenlet")
9297 (version "0.4.9")
9298 (source (origin
9299 (method url-fetch)
9300 (uri (pypi-uri "greenlet" version))
9301 (sha256
9302 (base32
9303 "04h0m54dyqg49vyarq26mry6kbivnpl47rnmmrk9qn8wpfxviybr"))))
9304 (build-system python-build-system)
9305 (native-inputs
9306 `(("python-setuptools" ,python-setuptools)))
9307 (home-page "https://greenlet.readthedocs.io/")
9308 (synopsis "Lightweight in-process concurrent programming")
9309 (description
9310 "Greenlet package is a spin-off of Stackless, a version of CPython
9311 that supports micro-threads called \"tasklets\". Tasklets run
9312 pseudo-concurrently (typically in a single or a few OS-level threads) and
9313 are synchronized with data exchanges on \"channels\".")
9314 (license (list license:psfl license:expat))))
9315
9316 (define-public python2-greenlet
9317 (package-with-python2 python-greenlet))
9318
9319 (define-public python-gevent
9320 (package
9321 (name "python-gevent")
9322 (version "1.1.1")
9323 (source (origin
9324 (method url-fetch)
9325 (uri (pypi-uri "gevent" version))
9326 (sha256
9327 (base32
9328 "1smf3kvidpdiyi2c81alal74p2zm0clrm6xbyy6y1k9a3f2vkrbf"))
9329 (modules '((guix build utils)))
9330 (snippet
9331 '(begin
9332 ;; unbunding libev and c-ares
9333 (for-each delete-file-recursively '("libev" "c-ares"))
9334 ;; fixing testsuite
9335 (call-with-output-file "greentest/__init__.py" noop)
9336 (substitute* "greentest/testrunner.py"
9337 (("import util") "from . import util")
9338 (("from util import log") "from .util import log"))))))
9339 (build-system python-build-system)
9340 (propagated-inputs
9341 `(("python-greenlet" ,python-greenlet)))
9342 (native-inputs
9343 `(("python-setuptools" ,python-setuptools)
9344 ("python-six" ,python-six)))
9345 (inputs
9346 `(("c-ares" ,c-ares)
9347 ("libev" ,libev)))
9348 (home-page "http://www.gevent.org/")
9349 (synopsis "Coroutine-based network library")
9350 (description
9351 "gevent is a coroutine-based Python networking library that uses greenlet
9352 to provide a high-level synchronous API on top of the libev event loop.")
9353 (license license:expat)))
9354
9355 (define-public python2-gevent
9356 (package-with-python2 python-gevent))
9357
9358 (define-public python-twisted
9359 (package
9360 (name "python-twisted")
9361 (version "16.2.0")
9362 (source (origin
9363 (method url-fetch)
9364 (uri (pypi-uri "Twisted" version ".tar.bz2"))
9365 (sha256
9366 (base32
9367 "0ydxrp9myw1mvsz3qfzx5579y5llmqa82pxvqchgp5syczffi450"))))
9368 (build-system python-build-system)
9369 (native-inputs
9370 `(("python-setuptools" ,python-setuptools)))
9371 (propagated-inputs
9372 `(("python-zope-interface" ,python-zope-interface)))
9373 (home-page "https://twistedmatrix.com/")
9374 (synopsis "Asynchronous networking framework written in Python")
9375 (description
9376 "Twisted is an extensible framework for Python programming, with special
9377 focus on event-based network programming and multiprotocol integration.")
9378 (license license:expat)))
9379
9380 (define-public python2-twisted
9381 (package-with-python2 python-twisted))
9382
9383 (define-public python-pika
9384 (package
9385 (name "python-pika")
9386 (version "0.10.0")
9387 (source
9388 (origin
9389 (method url-fetch)
9390 (uri (pypi-uri "pika" version))
9391 (sha256
9392 (base32
9393 "0nb4h08di432lv7dy2v9kpwgk0w92f24sqc2hw2s9vwr5b8v8xvj"))))
9394 (build-system python-build-system)
9395 (native-inputs
9396 `(("python-twisted" ,python-twisted)))
9397 (home-page "https://pika.readthedocs.org")
9398 (synopsis "Pure Python AMQP Client Library")
9399 (description
9400 "Pika is a pure-Python implementation of the AMQP (Advanced Message Queuing
9401 Protocol) 0-9-1 protocol that tries to stay fairly independent of the underlying
9402 network support library.")
9403 (license license:bsd-3)))
9404
9405 (define-public python2-pika
9406 (package-with-python2 python-pika))
9407
9408 (define-public python-ply
9409 (package
9410 (name "python-ply")
9411 (version "3.8")
9412 (source
9413 (origin
9414 (method url-fetch)
9415 (uri (string-append
9416 "https://pypi.python.org/packages/"
9417 "96/e0/430fcdb6b3ef1ae534d231397bee7e9304be14a47a267e82ebcb3323d0b5"
9418 "/ply-" version ".tar.gz"))
9419 (sha256
9420 (base32
9421 "1f70ipynmiy09k6px2j7v4w5cdrc21za3xs2k6f1bsvb0bzvvlg7"))))
9422 (build-system python-build-system)
9423 (home-page "http://www.dabeaz.com/ply/")
9424 (synopsis "Python Lex & Yacc")
9425 (description "PLY is a @code{lex}/@code{yacc} implemented purely in Python.
9426 It uses LR parsing and does extensive error checking.")
9427 (license license:bsd-3)
9428 (properties `((python2-variant . ,(delay python2-ply))))))
9429
9430 (define-public python2-ply
9431 (package
9432 (inherit (package-with-python2
9433 (strip-python2-variant python-ply)))
9434 (native-inputs `(("python2-setuptools" ,python2-setuptools)))))
9435
9436 (define-public python-tabulate
9437 (package
9438 (name "python-tabulate")
9439 (version "0.7.5")
9440 (source (origin
9441 (method url-fetch)
9442 (uri (pypi-uri "tabulate" version))
9443 (sha256
9444 (base32
9445 "03l1r7ddd1a0j2snv1yd0hlnghjad3fg1an1jr8936ksv75slwch"))
9446 ;; Fix tests
9447 (modules '((guix build utils)))
9448 (snippet '(substitute* '("test/test_cli.py"
9449 "test/test_input.py"
9450 "test/test_output.py"
9451 "test/test_regression.py")
9452 (("from common") "from nose.tools")))))
9453 (build-system python-build-system)
9454 (native-inputs
9455 `(("python-setuptools" ,python-setuptools)
9456 ;; For testing
9457 ("python-nose" ,python-nose)))
9458 (home-page "https://bitbucket.org/astanin/python-tabulate")
9459 (synopsis "Pretty-print tabular data")
9460 (description
9461 "Tabulate is a library and command-line utility to pretty-print tabular
9462 data in Python.")
9463 (license license:expat)))
9464
9465 (define-public python2-tabulate
9466 (package-with-python2 python-tabulate))
9467
9468 (define-public python-kazoo
9469 (package
9470 (name "python-kazoo")
9471 (version "2.2.1")
9472 (source
9473 (origin
9474 (method url-fetch)
9475 (uri (pypi-uri "kazoo" version))
9476 (sha256
9477 (base32
9478 "10pb864if9qi2pq9lfb9m8f7z7ss6rml80gf1d9h64lap5crjnjj"))))
9479 (build-system python-build-system)
9480 (arguments '(#:tests? #f)) ; XXX: needs zookeeper
9481 (native-inputs
9482 `(("python-setuptools" ,python-setuptools)))
9483 (propagated-inputs
9484 `(("python-six" ,python-six)))
9485 (home-page "https://kazoo.readthedocs.org")
9486 (synopsis "High-level Zookeeper client library")
9487 (description
9488 "Kazoo is a Python client library for the Apache Zookeeper distributed
9489 application service. It is designed to be easy to use and to avoid common
9490 programming errors.")
9491 (license license:asl2.0)))
9492
9493 (define-public python2-kazoo
9494 (package-with-python2 python-kazoo))
9495
9496 (define-public python-pykafka
9497 (package
9498 (name "python-pykafka")
9499 (version "2.4.0")
9500 (source (origin
9501 (method url-fetch)
9502 (uri (string-append
9503 "https://pypi.python.org/packages/8b/3e/"
9504 "384eeff406b06315738b62483fd2126c6e4f544167116b17cc04ea7d2a59/"
9505 "pykafka-" version ".tar.gz"))
9506 (sha256
9507 (base32
9508 "1id6sr159p6aa13bxcqyr9gln8sqg1l0ddzns5iws8kk5q1p5cfv"))))
9509 (build-system python-build-system)
9510 (arguments '(#:tests? #f)) ; XXX: needs zookeeper, kafka, etc.
9511 (native-inputs
9512 `(("python-setuptools" ,python-setuptools)))
9513 (propagated-inputs
9514 `(("python-gevent" ,python-gevent)
9515 ("python-kazoo" ,python-kazoo)
9516 ("python-tabulate" ,python-tabulate)))
9517 (inputs
9518 `(("librdkafka" ,librdkafka)))
9519 (home-page "https://pykafka.readthedocs.io/")
9520 (synopsis "Apache Kafka client for Python")
9521 (description
9522 "PyKafka is a client for the Apache Kafka distributed messaging system.
9523 It includes Python implementations of Kafka producers and consumers, which
9524 are optionally backed by a C extension built on librdkafka.")
9525 (license license:asl2.0)))
9526
9527 (define-public python2-pykafka
9528 (package-with-python2 python-pykafka))
9529
9530 (define-public python-wcwidth
9531 (package
9532 (name "python-wcwidth")
9533 (version "0.1.6")
9534 (source
9535 (origin
9536 (method url-fetch)
9537 (uri (string-append
9538 "https://pypi.python.org/packages/"
9539 "c2/d1/7689293086a8d5320025080cde0e3155b94ae0a7496fb89a3fbaa92c354a/"
9540 "wcwidth-" version ".tar.gz"))
9541 (sha256
9542 (base32
9543 "02wjrpf001gjdjsaxxbzcwfg19crlk2dbddayrfc2v06f53yrcyw"))))
9544 (build-system python-build-system)
9545 (home-page "https://github.com/jquast/wcwidth")
9546 (synopsis "Measure number of terminal column cells of wide-character codes")
9547 (description "Wcwidth measures the number of terminal column cells of
9548 wide-character codes. It is useful for those implementing a terminal emulator,
9549 or programs that carefully produce output to be interpreted by one. It is a
9550 Python implementation of the @code{wcwidth} and @code{wcswidth} C functions
9551 specified in POSIX.1-2001 and POSIX.1-2008.")
9552 (license license:expat)
9553 (properties `((python2-variant . ,(delay python2-wcwidth))))))
9554
9555 (define-public python2-wcwidth
9556 (package
9557 (inherit (package-with-python2
9558 (strip-python2-variant python-wcwidth)))
9559 (native-inputs `(("python2-setuptools" ,python2-setuptools)))))
9560
9561 (define-public python2-jsonrpclib
9562 (package
9563 (name "python2-jsonrpclib")
9564 (version "0.1.7")
9565 (source (origin
9566 (method url-fetch)
9567 (uri (string-append
9568 "https://pypi.python.org/packages/source/j/jsonrpclib/"
9569 "jsonrpclib-" version ".tar.gz"))
9570 (sha256
9571 (base32
9572 "02vgirw2bcgvpcxhv5hf3yvvb4h5wzd1lpjx8na5psdmaffj6l3z"))))
9573 (build-system python-build-system)
9574 (native-inputs
9575 `(("python2-setuptools" ,python2-setuptools)))
9576 (arguments
9577 `(#:tests? #f
9578 #:python ,python-2))
9579 (home-page "https://github.com/joshmarshall/jsonrpclib/")
9580 (synopsis "Implementation of JSON-RPC specification for Python")
9581 (description
9582 "This library is an implementation of the JSON-RPC specification.
9583 It supports both the original 1.0 specification, as well as the
9584 new (proposed) 2.0 spec, which includes batch submission, keyword arguments,
9585 etc.")
9586 (license license:asl2.0)))
9587
9588 (define-public python-chai
9589 (package
9590 (name "python-chai")
9591 (version "1.1.1")
9592 (source (origin
9593 (method url-fetch)
9594 (uri (pypi-uri "chai" version))
9595 (sha256
9596 (base32
9597 "016kf3irrclpkpvcm7q0gmkfibq7jgy30a9v73pp42bq9h9a32bl"))))
9598 (build-system python-build-system)
9599 (native-inputs
9600 `(("python-setuptools" ,python-setuptools)))
9601 (home-page "https://github.com/agoragames/chai")
9602 (synopsis "Mocking framework for Python")
9603 (description
9604 "Chai provides an api for mocking, stubbing and spying your python
9605 objects, patterned after the Mocha library for Ruby.")
9606 (license license:bsd-3)))
9607
9608 (define-public python2-chai
9609 (package-with-python2 python-chai))
9610
9611 (define-public python-arrow
9612 (package
9613 (name "python-arrow")
9614 (version "0.8.0")
9615 (source (origin
9616 (method url-fetch)
9617 (uri (pypi-uri "arrow" version))
9618 (sha256
9619 (base32
9620 "1bz7hkdgpqcjs866y58z8jywpy7al0f4rxdr00bh2l5qddyw245j"))))
9621 (build-system python-build-system)
9622 (native-inputs
9623 `(("python-setuptools" ,python-setuptools)
9624 ;; For testing
9625 ("python-chai" ,python-chai)
9626 ("python-simplejson" ,python-simplejson)))
9627 (propagated-inputs
9628 `(("python-dateutil" ,python-dateutil-2)))
9629 (home-page "https://github.com/crsmithdev/arrow/")
9630 (synopsis "Dates and times for Python")
9631 (description
9632 "Arrow is a Python library to creating, manipulating, formatting and
9633 converting dates, times, and timestamps. It implements and updates the
9634 datetime type.")
9635 (license license:asl2.0)))
9636
9637 (define-public python2-arrow
9638 (package-with-python2 python-arrow))
9639
9640 (define-public python-inflection
9641 (package
9642 (name "python-inflection")
9643 (version "0.3.1")
9644 (source
9645 (origin (method url-fetch)
9646 (uri (pypi-uri "inflection" version))
9647 (sha256
9648 (base32
9649 "1jhnxgnw8y3mbzjssixh6qkc7a3afc4fygajhqrqalnilyvpzshq"))))
9650 (build-system python-build-system)
9651 (native-inputs
9652 `(("python-setuptools" ,python-setuptools)))
9653 (home-page "http://github.com/jpvanhal/inflection")
9654 (synopsis "Python string transformation library")
9655 (description
9656 "Inflection is a string transformation library. It singularizes
9657 and pluralizes English words, and transforms strings from CamelCase to
9658 underscored string.")
9659 (license license:expat)))
9660
9661 (define-public python2-inflection
9662 (package-with-python2 python-inflection))
9663
9664 (define-public python-pylev
9665 (package
9666 (name "python-pylev")
9667 (version "1.3.0")
9668 (source (origin
9669 (method url-fetch)
9670 (uri (pypi-uri "pylev" version))
9671 (sha256
9672 (base32
9673 "1hz1x9blsbxya1y9nnhnwwdnqmakxi9mc0jkwj0rn6b1h44i0f86"))))
9674 (build-system python-build-system)
9675 (native-inputs
9676 `(("python-setuptools" ,python-setuptools)))
9677 (home-page "http://github.com/toastdriven/pylev")
9678 (synopsis "Levenshtein distance implementation in Python")
9679 (description "Pure Python Levenshtein implementation, based off the
9680 Wikipedia code samples at
9681 @url{http://en.wikipedia.org/wiki/Levenshtein_distance}.")
9682 (license license:bsd-3)))
9683
9684 (define-public python2-pylev
9685 (package-with-python2 python-pylev))
9686
9687 (define-public python-cleo
9688 (package
9689 (name "python-cleo")
9690 (version "0.4.1")
9691 (source (origin
9692 (method url-fetch)
9693 (uri (pypi-uri "cleo" version))
9694 (sha256
9695 (base32
9696 "1k2dcl6mqpn5bljyl6w42rqyd9mb3y9kh2mg7m2x3kfjwvg0rpva"))))
9697 (build-system python-build-system)
9698 (native-inputs
9699 `(("python-setuptools" ,python-setuptools)
9700 ;; For testing
9701 ("python-mock" ,python-mock)
9702 ("python-pytest" ,python-pytest)))
9703 (propagated-inputs
9704 `(("python-psutil" ,python-psutil)
9705 ("python-pylev" ,python-pylev)))
9706 (home-page "https://github.com/sdispater/cleo")
9707 (synopsis "Command-line arguments library for Python")
9708 (description
9709 "Cleo allows you to create command-line commands with signature in
9710 docstring and colored output.")
9711 (license license:expat)))
9712
9713 (define-public python2-cleo
9714 (package-with-python2 python-cleo))
9715
9716 (define-public python-lazy-object-proxy
9717 (package
9718 (name "python-lazy-object-proxy")
9719 (version "1.2.2")
9720 (source (origin
9721 (method url-fetch)
9722 (uri (pypi-uri "lazy-object-proxy" version))
9723 (sha256
9724 (base32
9725 "0s22aqqkdscyh8sjspyyax7qa1aiz8p4midrnyf39717fhfczm6x"))))
9726 (build-system python-build-system)
9727 (native-inputs
9728 `(("python-setuptools" ,python-setuptools)))
9729 (home-page "https://github.com/ionelmc/python-lazy-object-proxy")
9730 (synopsis "Lazy object proxy for python")
9731 (description
9732 "Lazy object proxy is an object that wraps a callable but defers the call
9733 until the object is actually required, and caches the result of said call.")
9734 (license license:bsd-2)))
9735
9736 (define-public python2-lazy-object-proxy
9737 (package-with-python2 python-lazy-object-proxy))
9738
9739 (define-public python-dnspython
9740 (package
9741 (name "python-dnspython")
9742 (version "1.14.0")
9743 (source (origin
9744 (method url-fetch)
9745 (uri (string-append "http://www.dnspython.org/kits/"
9746 version "/dnspython-" version ".tar.gz"))
9747 (sha256
9748 (base32
9749 "1z472r63gdqsxhsxj3plr5vs478yf4303vrqxxpsccc940g441hl"))))
9750 (build-system python-build-system)
9751 (arguments '(#:tests? #f)) ; XXX: requires internet access
9752 (native-inputs
9753 `(("python-setuptools" ,python-setuptools)))
9754 (home-page "http://www.dnspython.org")
9755 (synopsis "DNS toolkit for Python")
9756 (description
9757 "dnspython is a DNS toolkit for Python. It supports almost all record
9758 types. It can be used for queries, zone transfers, and dynamic updates.
9759 It supports TSIG authenticated messages and EDNS0.")
9760 (license license:expat)))
9761
9762 (define-public python2-dnspython
9763 (package-with-python2 python-dnspython))
9764
9765 (define-public python-email-validator
9766 (package
9767 (name "python-email-validator")
9768 (version "1.0.1")
9769 (source
9770 (origin (method url-fetch)
9771 (uri (pypi-uri "email_validator" version))
9772 (sha256
9773 (base32
9774 "0mn8jg5h8ifl8w6a6m0hq8kbk0mzw9vm054qfamkn89b3npz52qw"))))
9775 (build-system python-build-system)
9776 (arguments
9777 '(#:phases
9778 (modify-phases %standard-phases
9779 (add-before 'build 'use-dnspython
9780 (lambda _
9781 (substitute* "setup.py"
9782 (("dnspython3") "dnspython"))
9783 #t)))))
9784 (native-inputs
9785 `(("python-setuptools" ,python-setuptools)))
9786 (propagated-inputs
9787 `(("python-dnspython" ,python-dnspython)
9788 ("python-idna" ,python-idna)))
9789 (home-page "https://github.com/JoshData/python-email-validator")
9790 (synopsis "Email address validation library for Python")
9791 (description
9792 "This library validates email address syntax and deliverability.")
9793 (license license:cc0)))
9794
9795 (define-public python2-email-validator
9796 (package-with-python2 python-email-validator))
9797
9798 (define-public python-ukpostcodeparser
9799 (package
9800 (name "python-ukpostcodeparser")
9801 (version "1.0.3")
9802 (source (origin
9803 (method url-fetch)
9804 (uri (pypi-uri "UkPostcodeParser" version))
9805 (sha256
9806 (base32
9807 "1jwg9z4rz51mcka1821rwgycsd0mcicyp1kiwjfa2kvg8bm9p2qd"))))
9808 (build-system python-build-system)
9809 (native-inputs
9810 `(("python-setuptools" ,python-setuptools)))
9811 (home-page "https://github.com/hamstah/ukpostcodeparser")
9812 (synopsis "UK Postcode parser for Python")
9813 (description
9814 "This library provides the @code{parse_uk_postcode} function for
9815 parsing UK postcodes.")
9816 (license license:expat)))
9817
9818 (define-public python2-ukpostcodeparser
9819 (package-with-python2 python-ukpostcodeparser))
9820
9821 (define-public python-fake-factory
9822 (package
9823 (name "python-fake-factory")
9824 (version "0.7.2")
9825 (source (origin
9826 (method url-fetch)
9827 (uri (pypi-uri "fake-factory" version))
9828 (sha256
9829 (base32
9830 "0vs0dkmg0dlaxf8w6q2i3k0i03gmp56ablldv7ci9x3nbadkn71g"))))
9831 (build-system python-build-system)
9832 (native-inputs
9833 `(("python-setuptools" ,python-setuptools)
9834 ;; For testing
9835 ("python-email-validator" ,python-email-validator)
9836 ("python-mock" ,python-mock)
9837 ("python-ukpostcodeparser" ,python-ukpostcodeparser)))
9838 (propagated-inputs
9839 `(("python-dateutil" ,python-dateutil-2)
9840 ("python-six" ,python-six)))
9841 (home-page "https://github.com/joke2k/faker")
9842 (synopsis "Python package that generates fake data")
9843 (description
9844 "Faker is a Python package that generates fake data such as names,
9845 addresses, and phone numbers.")
9846 (license license:expat)
9847 (properties `((python2-variant . ,(delay python2-fake-factory))))))
9848
9849 (define-public python2-fake-factory
9850 (let ((base (package-with-python2 (strip-python2-variant
9851 python-fake-factory))))
9852 (package
9853 (inherit base)
9854 (propagated-inputs
9855 `(("python2-ipaddress" ,python2-ipaddress)
9856 ,@(package-propagated-inputs base))))))
9857
9858 (define-public python-pyaml
9859 (package
9860 (name "python-pyaml")
9861 (version "15.8.2")
9862 (source (origin
9863 (method url-fetch)
9864 (uri (pypi-uri "pyaml" version))
9865 (sha256
9866 (base32
9867 "1f5m28vkh4ksq3d80d8mmd2z8wxvc3mgy2pmrv2751dm2xgznm4w"))))
9868 (build-system python-build-system)
9869 (native-inputs
9870 `(("python-setuptools" ,python-setuptools)))
9871 (propagated-inputs
9872 `(("python-pyyaml" ,python-pyyaml)))
9873 (home-page "https://github.com/mk-fg/pretty-yaml")
9874 (synopsis "YAML pretty-print library for Python")
9875 (description
9876 "pyaml is a PyYAML based python module to produce pretty and readable
9877 YAML-serialized data.")
9878 (license (license:non-copyleft "http://www.wtfpl.net/txt/copying/"))))
9879
9880 (define-public python2-pyaml
9881 (package-with-python2 python-pyaml))
9882
9883 (define-public python-flexmock
9884 (package
9885 (name "python-flexmock")
9886 (version "0.10.2")
9887 (source (origin
9888 (method url-fetch)
9889 (uri (pypi-uri "flexmock" version))
9890 (sha256
9891 (base32
9892 "0arc6njvs6i9v9hgvzk5m50296g7zy5m9d7pyb43vdsdgxrci5gy"))))
9893 (build-system python-build-system)
9894 (native-inputs
9895 `(("python-setuptools" ,python-setuptools)))
9896 (home-page "https://flexmock.readthedocs.org")
9897 (synopsis "Testing library for Python")
9898 (description
9899 "flexmock is a testing library for Python that makes it easy to create
9900 mocks, stubs and fakes.")
9901 (license license:bsd-3)))
9902
9903 (define-public python2-flexmock
9904 (package-with-python2 python-flexmock))
9905
9906 (define-public python-orator
9907 (package
9908 (name "python-orator")
9909 (version "0.8.2")
9910 (source (origin
9911 (method url-fetch)
9912 (uri (pypi-uri "orator" version))
9913 (sha256
9914 (base32
9915 "1li49irsqha17nrda4nsb48biyy0rarp9pphf0jpqwm5zr8hv569"))))
9916 (build-system python-build-system)
9917 (arguments '(#:tests? #f)) ; no tests
9918 (native-inputs
9919 `(("python-setuptools" ,python-setuptools)))
9920 (propagated-inputs
9921 `(("python-arrow" ,python-arrow)
9922 ("python-blinker" ,python-blinker)
9923 ("python-cleo" ,python-cleo)
9924 ("python-fake-factory" ,python-fake-factory)
9925 ("python-inflection" ,python-inflection)
9926 ("python-lazy-object-proxy" ,python-lazy-object-proxy)
9927 ("python-pyaml" ,python-pyaml)
9928 ("python-simplejson" ,python-simplejson)
9929 ("python-wrapt" ,python-wrapt)))
9930 (home-page "https://orator-orm.com/")
9931 (synopsis "ActiveRecord ORM for Python")
9932 (description
9933 "Orator provides a simple ActiveRecord-like Object Relational Mapping
9934 implementation for Python.")
9935 (license license:expat)
9936 (properties `((python2-variant . ,(delay python2-orator))))))
9937
9938 (define-public python2-orator
9939 (let ((base (package-with-python2 (strip-python2-variant python-orator))))
9940 (package
9941 (inherit base)
9942 (propagated-inputs
9943 `(("python2-ipaddress" ,python2-ipaddress)
9944 ,@(package-propagated-inputs base))))))
9945
9946 (define-public python-prompt-toolkit
9947 (package
9948 (name "python-prompt-toolkit")
9949 (version "1.0.7")
9950 (source
9951 (origin
9952 (method url-fetch)
9953 (uri (pypi-uri "prompt_toolkit" version ".tar.gz"))
9954 (sha256
9955 (base32
9956 "1vyjd0b7wciv55i19l44zy0adx8q7ss79lhy2r9d1rwz2y4822zg"))))
9957 (build-system python-build-system)
9958 (inputs `(("python-wcwidth" ,python-wcwidth)
9959 ("python-pygments" ,python-pygments)))
9960 (native-inputs `(("python-six" ,python-six)))
9961 (home-page "https://github.com/jonathanslenders/python-prompt-toolkit")
9962 (synopsis "Library for building command line interfaces in Python")
9963 (description
9964 "Prompt-Toolkit is a library for building interactive command line
9965 interfaces in Python. It's like GNU Readline but it also features syntax
9966 highlighting while typing, out-of-the-box multi-line input editing, advanced
9967 code completion, incremental search, support for Chinese double-width
9968 characters, mouse support, and auto suggestions.")
9969 (license license:bsd-3)
9970 (properties `((python2-variant . ,(delay python2-prompt-toolkit))))))
9971
9972 (define-public python2-prompt-toolkit
9973 (let ((base (package-with-python2 (strip-python2-variant python-prompt-toolkit))))
9974 (package
9975 (inherit base)
9976 (native-inputs
9977 `(("python2-setuptools" ,python2-setuptools)
9978 ,@(package-native-inputs base))))))
9979
9980 (define-public python-jedi
9981 (package
9982 (name "python-jedi")
9983 (version "0.9.0")
9984 (source
9985 (origin
9986 (method url-fetch)
9987 (uri (pypi-uri "jedi" version))
9988 (sha256
9989 (base32
9990 "0c8x962ynpx001fdvp07m2q5jk4igkxbj3rmnydavphvlgxijk1v"))))
9991 (build-system python-build-system)
9992 (home-page "https://github.com/davidhalter/jedi")
9993 (synopsis
9994 "Autocompletion for Python that can be used for text editors")
9995 (description
9996 "Jedi is an autocompletion tool for Python that can be used for text editors.")
9997 (license license:expat)
9998 (properties `((python2-variant . ,(delay python2-jedi))))))
9999
10000 (define-public python2-jedi
10001 (let ((base (package-with-python2 (strip-python2-variant python-jedi))))
10002 (package
10003 (inherit base)
10004 (native-inputs
10005 `(("python2-setuptools" ,python2-setuptools)
10006 ,@(package-native-inputs base))))))
10007
10008 (define-public ptpython
10009 (package
10010 (name "ptpython")
10011 (version "0.34")
10012 (source (origin
10013 (method url-fetch)
10014 (uri (pypi-uri "ptpython" version))
10015 (sha256
10016 (base32
10017 "1mmbiyzf0n8hm7z2a562x7w5cbl6jc0zsk6vp40q1z4cyblv1k13"))))
10018 (build-system python-build-system)
10019 (inputs
10020 `(("python-docopt" ,python-docopt)
10021 ("python-jedi" ,python-jedi)
10022 ("python-prompt-toolkit" ,python-prompt-toolkit)
10023 ("python-pygments" ,python-pygments)
10024 ("python-setuptools" ,python-setuptools)))
10025 (home-page "https://github.com/jonathanslenders/ptpython")
10026 (synopsis "Python Read-Eval-Print-Loop with nice IDE-like features")
10027 (description
10028 "ptpython is a Python read-eval-print loop with IDE-like features.
10029 It supports syntax highlighting, multiline editing, autocompletion, mouse,
10030 color schemes, bracketed paste, Vi and Emacs keybindings, Chinese characters
10031 etc.")
10032 (license license:bsd-3)
10033 (properties `((python2-variant . ,(delay ptpython-2))))))
10034
10035 (define-public ptpython-2
10036 (let ((base (package-with-python2 (strip-python2-variant ptpython))))
10037 (package
10038 (inherit base)
10039 (name "ptpython2"))))
10040
10041 (define-public python-requests-oauthlib
10042 (package
10043 (name "python-requests-oauthlib")
10044 (version "0.6.2")
10045 (source
10046 (origin
10047 (method url-fetch)
10048 (uri (pypi-uri "requests-oauthlib" version))
10049 (sha256
10050 (base32
10051 "0ykff67sjcl227c23g0rxzfx34rr5bf21kwv0z3zmgk0lfmch7hn"))))
10052 (build-system python-build-system)
10053 (arguments
10054 `(#:phases
10055 (modify-phases %standard-phases
10056 ;; removes tests that require network access
10057 (add-before 'check 'pre-check
10058 (lambda _
10059 (delete-file "tests/test_core.py")
10060 #t)))))
10061 (native-inputs
10062 `(("python-requests-mock" ,python-requests-mock)
10063 ("python-mock" ,python-mock)))
10064 (inputs
10065 `(("python-oauthlib" ,python-oauthlib)
10066 ("python-requests" ,python-requests)))
10067 (home-page
10068 "https://github.com/requests/requests-oauthlib")
10069 (synopsis
10070 "OAuthlib authentication support for Requests")
10071 (description
10072 "Requests-OAuthlib uses the Python Requests and OAuthlib libraries to
10073 provide an easy-to-use Python interface for building OAuth1 and OAuth2 clients.")
10074 (license license:isc)
10075 (properties `((python2-variant . ,(delay python2-requests-oauthlib))))))
10076
10077 (define-public python2-requests-oauthlib
10078 (let ((base (package-with-python2 (strip-python2-variant python-requests-oauthlib))))
10079 (package
10080 (inherit base)
10081 (native-inputs `(("python2-setuptools" ,python2-setuptools)
10082 ,@(package-native-inputs base))))))
10083
10084 (define-public python-stem
10085 (package
10086 (name "python-stem")
10087 (version "1.4.1b")
10088 (source
10089 (origin
10090 (method url-fetch)
10091 (uri (pypi-uri "stem" version ".tar.bz2"))
10092 (sha256
10093 (base32
10094 "09a3amp1y351nwz088ckiibbp666qi2lxwkyknavswfm400s0ns7"))))
10095 (build-system python-build-system)
10096 (arguments
10097 `(#:phases
10098 (modify-phases %standard-phases
10099 (replace 'check
10100 (lambda _
10101 (zero? (system* "./run_tests.py" "--unit")))))))
10102 (native-inputs
10103 `(("python-mock" ,python-mock)
10104 ("python-pep8" ,python-pep8)
10105 ("python-pyflakes" ,python-pyflakes)))
10106 (inputs
10107 `(("python-pycrypto" ,python-pycrypto)))
10108 (home-page "https://stem.torproject.org/")
10109 (synopsis
10110 "Python controller library that allows applications to interact with Tor")
10111 (description
10112 "Stem is a Python controller library for Tor. With it you can use Tor's
10113 control protocol to script against the Tor process and read descriptor data
10114 relays publish about themselves.")
10115 (license license:lgpl3)))
10116
10117 (define-public python2-stem
10118 (package-with-python2 python-stem))
10119
10120 (define-public python-pyserial
10121 (package
10122 (name "python-pyserial")
10123 (version "3.1.1")
10124 (source
10125 (origin
10126 (method url-fetch)
10127 (uri (pypi-uri "pyserial" version))
10128 (sha256
10129 (base32
10130 "0k1nfdrxxkdlv4zgaqsdv8li0pj3gbh2pyxw8q2bsg6f9490amyn"))))
10131 (build-system python-build-system)
10132 (home-page
10133 "https://github.com/pyserial/pyserial")
10134 (synopsis "Python Serial Port Bindings")
10135 (description "@code{pyserial} provide serial port bindings for Python. It
10136 supports different byte sizes, stop bits, parity and flow control with RTS/CTS
10137 and/or Xon/Xoff. The port is accessed in RAW mode.")
10138 (license license:bsd-3)
10139 (properties `((python2-variant . ,(delay python2-pyserial))))))
10140
10141 (define-public python2-pyserial
10142 (let ((base (package-with-python2 (strip-python2-variant python-pyserial))))
10143 (package
10144 (inherit base)
10145 (native-inputs
10146 `(("python2-setuptools" ,python2-setuptools)
10147 ,@(package-native-inputs base))))))
10148
10149 (define-public python-kivy
10150 (package
10151 (name "python-kivy")
10152 (version "1.9.1")
10153 (source
10154 (origin
10155 (method url-fetch)
10156 (uri (pypi-uri "kivy" version))
10157 (file-name (string-append name "-" version ".tar.gz"))
10158 (sha256
10159 (base32
10160 "0zk3g1j1z0lzcm9d0k1lprrs95zr8n8k5pdg3p5qlsn26jz4bg19"))))
10161 (build-system python-build-system)
10162 (arguments
10163 `(#:tests? #f ; Tests require many optional packages
10164 #:phases
10165 (modify-phases %standard-phases
10166 (replace 'build (lambda _ (zero? (system* "make" "force"))))
10167 (add-after 'patch-generated-file-shebangs 'set-sdl-paths
10168 (lambda* (#:key inputs #:allow-other-keys)
10169 (setenv "KIVY_SDL2_PATH"
10170 (string-append (assoc-ref inputs "sdl-union")
10171 "/include/SDL2"))
10172 #t)))))
10173 (native-inputs
10174 `(("pkg-config" ,pkg-config)))
10175 (inputs
10176 `(("python-cython" ,python-cython)
10177 ("gstreamer" ,gstreamer)
10178 ("mesa" ,mesa)
10179 ("sdl-union"
10180 ,(sdl-union (list sdl2 sdl2-image sdl2-mixer sdl2-ttf)))))
10181 (home-page "http://kivy.org")
10182 (synopsis
10183 "Multitouch application framework")
10184 (description
10185 "A software library for rapid development of
10186 hardware-accelerated multitouch applications.")
10187 (license license:expat)))
10188
10189 (define-public python2-kivy
10190 (package-with-python2 python-kivy))
10191
10192 (define-public python-kivy-next
10193 (let ((commit "a988c5e7a47da56263ff39514264a3de516ef2fe")
10194 (revision "1"))
10195 (package (inherit python-kivy)
10196 (name "python-kivy-next")
10197 (version (string-append "1.9.1-" revision "."
10198 (string-take commit 7)))
10199 (source
10200 (origin
10201 (method git-fetch)
10202 (uri (git-reference
10203 (url "https://github.com/kivy/kivy")
10204 (commit commit)))
10205 (file-name (string-append name "-" version "-checkout"))
10206 (sha256
10207 (base32
10208 "0jk92b4a8l7blkvkgkjihk171s0dfnq582cckff5srwc8kal5m0p")))))))
10209
10210 (define-public python2-kivy-next
10211 (package-with-python2 python-kivy-next))
10212
10213 (define-public python-binaryornot
10214 (package
10215 (name "python-binaryornot")
10216 (version "0.4.0")
10217 (source (origin
10218 (method url-fetch)
10219 (uri (pypi-uri "binaryornot" version))
10220 (sha256
10221 (base32
10222 "1j4f51dxic39mdwf6alj7gd769wy6mhk916v031wjali51xkh3xb"))))
10223 (build-system python-build-system)
10224 (inputs
10225 `(("python-chardet" ,python-chardet)
10226 ("python-hypothesis" ,python-hypothesis)))
10227 (home-page "https://github.com/audreyr/binaryornot")
10228 (synopsis "Package to check if a file is binary or text")
10229 (description "Ultra-lightweight pure Python package to check if a file is
10230 binary or text.")
10231 (license license:bsd-3)
10232 (properties `((python2-variant . ,(delay python2-binaryornot))))))
10233
10234 (define-public python2-binaryornot
10235 (let ((base (package-with-python2 (strip-python2-variant python-binaryornot))))
10236 (package (inherit base)
10237 (native-inputs
10238 `(("python2-setuptools" ,python2-setuptools)
10239 ,@(package-native-inputs base)))
10240 (inputs
10241 `(("python2-enum34" ,python2-enum34)
10242 ,@(package-inputs base))))))
10243
10244 (define-public python-nltk
10245 (package
10246 (name "python-nltk")
10247 (version "3.2.1")
10248 (source (origin
10249 (method url-fetch)
10250 (uri (pypi-uri "nltk" version))
10251 (sha256
10252 (base32
10253 "0skxbhnymwlspjkzga0f7x1hg3y50fwpfghs8g8k7fh6f4nknlym"))))
10254 (build-system python-build-system)
10255 (home-page "http://nltk.org/")
10256 (synopsis "Natural Language Toolkit")
10257 (description "It provides interfaces to over 50 corpora and lexical
10258 resources such as WordNet, along with a suite of text processing libraries
10259 for classification, tokenization, stemming, tagging, parsing, and semantic
10260 reasoning, wrappers for natural language processing libraries.")
10261 (license license:asl2.0)
10262 (properties `((python2-variant . ,(delay python2-nltk))))))
10263
10264 (define-public python2-nltk
10265 (let ((base (package-with-python2 (strip-python2-variant python-nltk))))
10266 (package (inherit base)
10267 (native-inputs
10268 `(("python2-setuptools" ,python2-setuptools)
10269 ,@(package-native-inputs base))))))
10270
10271 (define-public python-pymongo
10272 (package
10273 (name "python-pymongo")
10274 (version "3.3.0")
10275 (source (origin
10276 (method url-fetch)
10277 (uri (pypi-uri "pymongo" version))
10278 (sha256
10279 (base32
10280 "07mra6w86wjqy4lx5fvimidjhhfzd562gfjn8grsnbv2q8pk0i9x"))))
10281 (build-system python-build-system)
10282 (inputs
10283 `(("python-certifi" ,python-certifi)))
10284 (home-page "http://github.com/mongodb/mongo-python-driver")
10285 (synopsis "Python driver for MongoDB")
10286 (description "Python driver for MongoDB.")
10287 (license license:asl2.0)
10288 (properties `((python2-variant . ,(delay python2-pymongo))))))
10289
10290 (define-public python2-pymongo
10291 (let ((base (package-with-python2 (strip-python2-variant python-pymongo))))
10292 (package (inherit base)
10293 (native-inputs
10294 `(("python2-setuptools" ,python2-setuptools)
10295 ,@(package-native-inputs base))))))
10296
10297 (define-public python-sh
10298 (package
10299 (name "python-sh")
10300 (version "1.11")
10301 (source (origin
10302 (method url-fetch)
10303 (uri (pypi-uri "sh" version))
10304 (sha256
10305 (base32
10306 "192r0mpv6dmkysjzhc43ddffiwb5g7c76bgr1mb1z2xz9awbj3sr"))))
10307 (build-system python-build-system)
10308 (arguments
10309 `(#:tests? #f)) ; no tests
10310 (home-page "https://github.com/amoffat/sh")
10311 (synopsis "Python subprocess interface")
10312 (description "Abstracts process invocation by providing a function
10313 interface for programs.")
10314 (license license:expat)
10315 (properties `((python2-variant . ,(delay python2-sh))))))
10316
10317 (define-public python2-sh
10318 (let ((base (package-with-python2 (strip-python2-variant python-sh))))
10319 (package (inherit base)
10320 (native-inputs
10321 `(("python2-setuptools" ,python2-setuptools)
10322 ,@(package-native-inputs base))))))
10323
10324 (define-public python-consul
10325 (package
10326 (name "python-consul")
10327 (version "0.6.1")
10328 (source
10329 (origin
10330 (method url-fetch)
10331 (uri (pypi-uri "python-consul" version))
10332 (sha256
10333 (base32
10334 "0rfyxcy4cr3x848vhx876ifalxd5ghq6l5x813m49h4vq2d4jiq8"))))
10335 (build-system python-build-system)
10336 (native-inputs
10337 `(("python-pytest" ,python-pytest)
10338 ("python-requests" ,python-requests)
10339 ("python-six" ,python-six)))
10340 (home-page "https://github.com/cablehead/python-consul")
10341 (synopsis "Python client for Consul")
10342 (description
10343 "Python client for @url{http://www.consul.io/,Consul}, a tool for service
10344 discovery, monitoring and configuration.")
10345 (license license:expat)))
10346
10347 (define-public python2-consul
10348 (let ((consul (package-with-python2 python-consul)))
10349 (package (inherit consul)
10350 (native-inputs
10351 `(("python2-setuptools" ,python2-setuptools)
10352 ,@(package-native-inputs consul))))))
10353
10354 (define-public python-schematics
10355 (package
10356 (name "python-schematics")
10357 (version "1.1.1")
10358 (source
10359 (origin
10360 (method url-fetch)
10361 (uri (string-append
10362 "https://github.com/schematics/schematics/archive/v" version ".tar.gz"))
10363 (file-name (string-append name "-" version ".tar.gz"))
10364 (sha256
10365 (base32
10366 "19v1i69bf3bzarfxmbv0v6ivpcn758x3shvbiy9l2hy0lvqwnp6l"))))
10367 (build-system python-build-system)
10368 (inputs
10369 `(("python-six" ,python-six)))
10370 (arguments
10371 `(#:tests? #f)) ; requires a bunch of not very nice packages with fixed
10372 ; version requirements (eg python-coveralls)
10373 (home-page "https://github.com/schematics/schematics")
10374 (synopsis "Python Data Structures for Humans")
10375 (description "Python Data Structures for Humans.")
10376 (license license:bsd-3)
10377 (properties `((python2-variant . ,(delay python2-schematics))))))
10378
10379 (define-public python2-schematics
10380 (let ((base (package-with-python2 (strip-python2-variant python-schematics))))
10381 (package (inherit base)
10382 (native-inputs
10383 `(("python2-setuptools" ,python2-setuptools)
10384 ,@(package-native-inputs base))))))
10385
10386 (define-public python-publicsuffix
10387 (package
10388 (name "python-publicsuffix")
10389 (version "1.1.0")
10390 (source (origin
10391 (method url-fetch)
10392 (uri (pypi-uri "publicsuffix" version))
10393 (sha256
10394 (base32
10395 "1adx520249z2cy7ykwjr1k190mn2888wqn9jf8qm27ly4qymjxxf"))))
10396 (build-system python-build-system)
10397 (arguments
10398 `(#:tests? #f)) ; tests use the internet
10399 (home-page "https://www.tablix.org/~avian/git/publicsuffix.git")
10400 (synopsis "Get suffix for a domain name")
10401 (description "Get a public suffix for a domain name using the Public Suffix
10402 List.")
10403 (license license:expat)
10404 (properties `((python2-variant . ,(delay python2-nltk))))))
10405
10406 (define-public python2-publicsuffix
10407 (let ((base (package-with-python2 (strip-python2-variant python-publicsuffix))))
10408 (package (inherit base)
10409 (native-inputs
10410 `(("python2-setuptools" ,python2-setuptools)
10411 ,@(package-native-inputs base))))))
10412
10413 (define-public python-publicsuffix2
10414 (package
10415 (name "python-publicsuffix2")
10416 (version "2.20160621")
10417 (source
10418 (origin
10419 (method url-fetch)
10420 (uri (pypi-uri "publicsuffix2" version ".tar.bz2"))
10421 (sha256
10422 (base32
10423 "06lx603gdwad5hc3hmn763ngq0rq9bzz1ni3ga72nzk5n872arkd"))))
10424 (build-system python-build-system)
10425 (home-page "https://github.com/pombredanne/python-publicsuffix2")
10426 (synopsis "Get a public suffix for a domain name using the Public Suffix List")
10427 (description "Get a public suffix for a domain name using the Public Suffix
10428 List. Forked from and using the same API as the publicsuffix package.")
10429 (license (list license:expat license:mpl2.0))
10430 (properties `((python2-variant . ,(delay python2-publicsuffix2))))))
10431
10432 (define-public python2-publicsuffix2
10433 (let ((base (package-with-python2 (strip-python2-variant python-publicsuffix2))))
10434 (package (inherit base)
10435 (native-inputs
10436 `(("python2-setuptools" ,python2-setuptools)
10437 ,@(package-native-inputs base))))))
10438
10439 (define-public python-url
10440 (package
10441 (name "python-url")
10442 (version "0.2.0")
10443 (source (origin
10444 (method url-fetch)
10445 (uri (pypi-uri "url" version))
10446 (sha256
10447 (base32
10448 "0v879yadcz9qxfl41ak6wkga1kimp9cflla9ddz03hjjvgkqy5ki"))))
10449 (build-system python-build-system)
10450 (inputs
10451 `(("python-publicsuffix" ,python-publicsuffix)))
10452 (native-inputs
10453 `(("python-coverage" ,python-coverage)
10454 ("python-nose" ,python-nose)))
10455 (arguments
10456 `(#:tests? #f)) ; FIXME: tests fail with "ImportError: No module named 'tests'"
10457 (home-page "http://github.com/seomoz/url-py")
10458 (synopsis "URL Parsing")
10459 (description "Library for parsing urls.")
10460 (license license:expat)
10461 (properties `((python2-variant . ,(delay python2-url))))))
10462
10463 (define-public python2-url
10464 (let ((base (package-with-python2 (strip-python2-variant python-url))))
10465 (package (inherit base)
10466 (inputs
10467 `(("python2-publicsuffix" ,python2-publicsuffix)))
10468 (native-inputs
10469 `(("python2-setuptools" ,python2-setuptools)
10470 ,@(package-native-inputs base))))))
10471
10472 (define-public python-freezegun
10473 (package
10474 (name "python-freezegun")
10475 (version "0.3.7")
10476 (source
10477 (origin
10478 (method url-fetch)
10479 (uri (pypi-uri "freezegun" version))
10480 (sha256
10481 (base32
10482 "14l19x06v5jkq4rdwbmfyw4x9lrjb2300afrk21r1ash7y1y9a0w"))))
10483 (build-system python-build-system)
10484 (native-inputs
10485 `(("python-mock" ,python-mock)
10486 ("python-nose" ,python-nose)
10487 ("python-coverage" ,python-coverage)
10488 ("python-dateutil-2" ,python-dateutil-2)))
10489 (inputs
10490 `(("python-six" ,python-six)))
10491 (arguments
10492 `(#:phases (modify-phases %standard-phases
10493 ;; The tests are normally executed via `make test`, but the PyPi
10494 ;; package does not include the Makefile.
10495 (replace 'check
10496 (lambda _
10497 (zero? (system* "nosetests" "./tests/")))))))
10498 (home-page "https://github.com/spulec/freezegun")
10499 (synopsis "Test utility for mocking the datetime module")
10500 (description
10501 "FreezeGun is a library that allows your python tests to travel through
10502 time by mocking the datetime module.")
10503 (license license:asl2.0)))
10504
10505 (define-public python2-freezegun
10506 (let ((base (package-with-python2 (strip-python2-variant python-freezegun))))
10507 (package (inherit base)
10508 (native-inputs
10509 `(("python2-setuptools" ,python2-setuptools)
10510 ,@(package-native-inputs base))))))
10511
10512 (define-public python-odfpy
10513 (package
10514 (name "python-odfpy")
10515 (version "1.3.3")
10516 (source (origin
10517 (method url-fetch)
10518 (uri (pypi-uri "odfpy" version))
10519 (sha256
10520 (base32
10521 "1a6ms0w9zfhhkqhvrnynwwbxrivw6hgjc0s5k7j06npc7rq0blxw"))))
10522 (arguments
10523 `(#:modules ((srfi srfi-1)
10524 (guix build python-build-system)
10525 (guix build utils))
10526 #:phases
10527 (modify-phases %standard-phases
10528 (replace 'check
10529 ;; The test runner invokes python2 and python3 for test*.py.
10530 ;; To avoid having both in inputs, we replicate it here.
10531 (lambda _
10532 (every (lambda (test-file)
10533 (zero? (system* "python" test-file)))
10534 (find-files "tests" "^test.*\\.py$")))))))
10535 (build-system python-build-system)
10536 (home-page "https://github.com/eea/odfpy")
10537 (synopsis "Python API and tools to manipulate OpenDocument files")
10538 (description "Collection of libraries and utility programs written in
10539 Python to manipulate OpenDocument 1.2 files.")
10540 (license
10541 ;; The software is mainly dual GPL2+ and ASL2.0, but includes a
10542 ;; number of files with other licenses.
10543 (list license:gpl2+ license:asl2.0 license:lgpl2.1+ license:cc-by-sa3.0))))
10544
10545 (define-public python2-odfpy
10546 (package-with-python2 python-odfpy))
10547
10548 (define-public python-cachecontrol
10549 (package
10550 (name "python-cachecontrol")
10551 (version "0.11.6")
10552 (source
10553 (origin
10554 (method url-fetch)
10555 ;; Pypi does not have tests.
10556 (uri (string-append
10557 "https://github.com/ionrock/cachecontrol/archive/v"
10558 version ".tar.gz"))
10559 (file-name (string-append name "-" version ".tar.gz"))
10560 (sha256
10561 (base32
10562 "0yj60d0f69a2l8p7y86k4zhzzm6rnxpq74sfl240pry9l0lfw2vw"))))
10563 (build-system python-build-system)
10564 (arguments
10565 `(#:phases
10566 (modify-phases %standard-phases
10567 (replace 'check
10568 (lambda _
10569 ;; Drop test that requires internet access.
10570 (delete-file "tests/test_regressions.py")
10571 (setenv "PYTHONPATH"
10572 (string-append (getcwd) "/build/lib:"
10573 (getenv "PYTHONPATH")))
10574 (zero? (system* "py.test" "-vv")))))))
10575 (native-inputs
10576 `(("python-pytest" ,python-pytest)
10577 ("python-redis" ,python-redis)
10578 ("python-webtest" ,python-webtest)
10579 ("python-mock" ,python-mock)))
10580 (propagated-inputs
10581 `(("python-requests" ,python-requests)
10582 ("python-lockfile" ,python-lockfile)))
10583 (home-page "https://github.com/ionrock/cachecontrol")
10584 (synopsis "The httplib2 caching algorithms for use with requests")
10585 (description "CacheControl is a port of the caching algorithms in
10586 @code{httplib2} for use with @code{requests} session objects.")
10587 (license license:asl2.0)
10588 (properties `((python2-variant . ,(delay python2-cachecontrol))))))
10589
10590 (define-public python2-cachecontrol
10591 (let ((base (package-with-python2 (strip-python2-variant python-cachecontrol))))
10592 (package (inherit base)
10593 (native-inputs
10594 `(("python2-setuptools" ,python2-setuptools)
10595 ,@(package-native-inputs base))))))
10596
10597 (define-public python-lit
10598 (package
10599 (name "python-lit")
10600 (version "0.5.0")
10601 (source
10602 (origin
10603 (method url-fetch)
10604 (uri (pypi-uri "lit" version))
10605 (sha256
10606 (base32
10607 "135m2b9cwih85g66rjggavck328z7lj37srgpq3jxszbg0g2b91y"))))
10608 (build-system python-build-system)
10609 (home-page "http://llvm.org/")
10610 (synopsis "LLVM Software Testing Tool")
10611 (description "@code{lit} is a portable tool for executing LLVM and Clang
10612 style test suites, summarizing their results, and providing indication of
10613 failures.")
10614 (license license:ncsa)
10615 (properties `((python2-variant . ,(delay python2-lit))))))
10616
10617 (define-public python2-lit
10618 (let ((base (package-with-python2 (strip-python2-variant python-lit))))
10619 (package
10620 (inherit base)
10621 (native-inputs
10622 `(("python2-setuptools" ,python2-setuptools)
10623 ,@(package-native-inputs base))))))
10624
10625 (define-public python-pytest-pep8
10626 (package
10627 (name "python-pytest-pep8")
10628 (version "1.0.6")
10629 (source (origin
10630 (method url-fetch)
10631 (uri (pypi-uri "pytest-pep8" version))
10632 (sha256
10633 (base32
10634 "06032agzhw1i9d9qlhfblnl3dw5hcyxhagn7b120zhrszbjzfbh3"))))
10635 (build-system python-build-system)
10636 (arguments
10637 `(#:tests? #f ; Fails with recent pytest and pep8. See upstream issues #8 and #12.
10638 ;; Prevent creation of the egg. This works around
10639 ;; https://debbugs.gnu.org/cgi/bugreport.cgi?bug=20765 .
10640 #:configure-flags '("--single-version-externally-managed" "--root=/")))
10641 (native-inputs
10642 `(("python-pytest" ,python-pytest)))
10643 (propagated-inputs
10644 `(("python-pep8" ,python-pep8)))
10645 (home-page "https://bitbucket.org/pytest-dev/pytest-pep8")
10646 (synopsis "Py.test plugin to check PEP8 requirements")
10647 (description "Pytest plugin for checking PEP8 compliance.")
10648 (license license:expat)
10649 (properties `((python2-variant . ,(delay python2-pytest-pep8))))))
10650
10651 (define-public python2-pytest-pep8
10652 (let ((base (package-with-python2 (strip-python2-variant python-pytest-pep8))))
10653 (package (inherit base)
10654 (native-inputs
10655 `(("python2-setuptools" ,python2-setuptools)
10656 ,@(package-native-inputs base))))))
10657
10658 (define-public python-pytest-flakes
10659 (package
10660 (name "python-pytest-flakes")
10661 (version "1.0.1")
10662 (source (origin
10663 (method url-fetch)
10664 (uri (pypi-uri "pytest-flakes" version))
10665 (sha256
10666 (base32
10667 "0flag3n33kbhyjrhzmq990rvg4yb8hhhl0i48q9hw0ll89jp28lw"))))
10668 (build-system python-build-system)
10669 (arguments
10670 `(;; Prevent creation of the egg. This works around
10671 ;; https://debbugs.gnu.org/cgi/bugreport.cgi?bug=20765 .
10672 #:configure-flags '("--single-version-externally-managed" "--root=/")
10673 #:phases
10674 (modify-phases %standard-phases
10675 (delete 'check)
10676 (add-after 'install 'check
10677 (lambda _ ; It's easier to run tests after install.
10678 (zero? (system* "py.test" "-vv")))))))
10679 (native-inputs
10680 `(("python-coverage" ,python-coverage)
10681 ("python-pytest" ,python-pytest)
10682 ("python-pytest-cache" ,python-pytest-cache)
10683 ("python-pytest-pep8" ,python-pytest-pep8)))
10684 (propagated-inputs
10685 `(("python-pyflakes" ,python-pyflakes)))
10686 (home-page "https://github.com/fschulze/pytest-flakes")
10687 (synopsis "Py.test plugin to check source code with pyflakes")
10688 (description "Pytest plugin for checking Python source code with pyflakes.")
10689 (license license:expat)
10690 (properties `((python2-variant . ,(delay python2-pytest-flakes))))))
10691
10692 (define-public python2-pytest-flakes
10693 (let ((base (package-with-python2 (strip-python2-variant python-pytest-flakes))))
10694 (package (inherit base)
10695 (native-inputs
10696 `(("python2-setuptools" ,python2-setuptools)
10697 ,@(package-native-inputs base))))))
10698
10699 (define-public python-natsort
10700 (package
10701 (name "python-natsort")
10702 (version "5.0.1")
10703 (source (origin
10704 (method url-fetch)
10705 (uri (pypi-uri "natsort" version))
10706 (sha256
10707 (base32
10708 "1abld5p4a6n5zjnyw5mi2pv37gqalcybv2brjr2y6l9l2p8v9mja"))))
10709 (build-system python-build-system)
10710 (arguments
10711 `(#:phases
10712 (modify-phases %standard-phases
10713 (add-before 'check 'set-cachedir
10714 ;; Tests require write access to $HOME by default
10715 (lambda _ (setenv "PYTHON_EGG_CACHE" "/tmp") #t)))))
10716 (native-inputs
10717 `(("python-hypothesis" ,python-hypothesis)
10718 ("python-pytest-cache" ,python-pytest-cache)
10719 ("python-pytest-cov" ,python-pytest-cov)
10720 ("python-pytest-flakes" ,python-pytest-flakes)
10721 ("python-pytest-pep8" ,python-pytest-pep8)))
10722 (propagated-inputs ; TODO: Add python-fastnumbers.
10723 `(("python-pyicu" ,python-pyicu)))
10724 (home-page "https://github.com/SethMMorton/natsort")
10725 (synopsis "Natural sorting for python and shell")
10726 (description
10727 "Natsort lets you apply natural sorting on lists instead of
10728 lexicographical. If you use the built-in @code{sorted} method in python
10729 on a list such as @code{['a20', 'a9', 'a1', 'a4', 'a10']}, it would be
10730 returned as @code{['a1', 'a10', 'a20', 'a4', 'a9']}. Natsort provides a
10731 function @code{natsorted} that identifies numbers and sorts them separately
10732 from strings. It can also sort version numbers, real numbers, mixed types
10733 and more, and comes with a shell command @command{natsort} that exposes this
10734 functionality in the command line.")
10735 (license license:expat)
10736 (properties `((python2-variant . ,(delay python2-natsort))))))
10737
10738 (define-public python2-natsort
10739 (let ((base (package-with-python2 (strip-python2-variant python-natsort))))
10740 (package (inherit base)
10741 (native-inputs
10742 `(("python2-setuptools" ,python2-setuptools)
10743 ("python2-pathlib" ,python2-pathlib)
10744 ("python2-mock" ,python2-mock)
10745 ("python2-enum34" ,python2-enum34)
10746 ,@(package-native-inputs base))))))
10747
10748 (define-public python-glances
10749 (package
10750 (name "python-glances")
10751 (version "2.7.1")
10752 (source
10753 (origin
10754 (method url-fetch)
10755 (uri (pypi-uri "Glances" version))
10756 (sha256
10757 (base32
10758 "11jbq40g8alsbirnd4kiagznqg270247i0m8qhi48ldf2i5xppxg"))))
10759 (build-system python-build-system)
10760 (inputs
10761 `(("python-psutil" ,python-psutil)))
10762 (home-page
10763 "https://github.com/nicolargo/glances")
10764 (synopsis
10765 "A cross-platform curses-based monitoring tool")
10766 (description
10767 "Glances is a curses-based monitoring tool for a wide variety of platforms.
10768 Glances uses the PsUtil library to get information from your system. It monitors
10769 CPU, load, memory, network bandwidth, disk I/O, disk use, and more.")
10770 (license license:lgpl3+)
10771 (properties `((python2-variant . ,(delay python2-glances))))))
10772
10773 (define-public python2-glances
10774 (let ((base (package-with-python2 (strip-python2-variant python-glances))))
10775 (package
10776 (inherit base)
10777 (native-inputs
10778 `(("python2-setuptools" ,python2-setuptools)
10779 ,@(package-native-inputs base))))))
10780
10781 (define-public python-graphql-core
10782 (package
10783 (name "python-graphql-core")
10784 (version "0.5.3")
10785 (source
10786 (origin
10787 (method url-fetch)
10788 (uri (pypi-uri "graphql-core" version))
10789 (sha256
10790 (base32
10791 "0rsaarx2sj4xnw9966rhh4haiqaapm4lm2mfqm48ywd51j5vh1a0"))))
10792 (build-system python-build-system)
10793 (arguments
10794 `(#:phases
10795 (modify-phases %standard-phases
10796 (add-after 'unpack 'patch-hardcoded-version
10797 (lambda _ (substitute*
10798 "setup.py"
10799 (("'gevent==1.1rc1'") "'gevent'"))
10800 #t)))))
10801 (native-inputs
10802 `(("python-gevent" ,python-gevent)
10803 ("python-mock" ,python-mock)
10804 ("python-pytest-mock" ,python-pytest-mock)))
10805 (inputs
10806 `(("python-promise" ,python-promise)
10807 ("python-six" ,python-six)))
10808 (home-page "https://github.com/graphql-python/graphql-core")
10809 (synopsis "GraphQL implementation for Python")
10810 (description
10811 "GraphQL implementation for Python. GraphQL is a data query language and
10812 runtime designed and used to request and deliver data to mobile and web apps.
10813 This library is a port of @url{https://github.com/graphql/graphql-js,graphql-js}
10814 to Python.")
10815 (properties `((python2-variant . ,(delay python2-graphql-core))))
10816 (license license:expat)))
10817
10818 (define-public python2-graphql-core
10819 (let ((base (package-with-python2
10820 (strip-python2-variant python-graphql-core))))
10821 (package (inherit base)
10822 (native-inputs
10823 `(("python2-setuptools" ,python2-setuptools)
10824 ,@(package-native-inputs base))))))
10825
10826 (define-public python-graphql-relay
10827 (package
10828 (name "python-graphql-relay")
10829 (version "0.4.4")
10830 (source
10831 (origin
10832 (method url-fetch)
10833 (uri (pypi-uri "graphql-relay" version))
10834 (sha256
10835 (base32
10836 "04wr9ayshxjjdcg2v21c7ffbz36kif1wjl3604fqd3qignb3fbxi"))))
10837 (build-system python-build-system)
10838 (native-inputs
10839 `(("python-pytest" ,python-pytest)))
10840 (inputs
10841 `(("python-graphql-core" ,python-graphql-core)
10842 ("python-promise" ,python-promise)
10843 ("python-six" ,python-six)))
10844 (home-page "https://github.com/graphql-python/graphql-relay-py")
10845 (synopsis "Relay implementation for Python")
10846 (description
10847 "This is a library to allow the easy creation of Relay-compliant servers
10848 using the GraphQL Python reference implementation of a GraphQL server. It
10849 should be noted that the code is a exact port of the original
10850 @url{https://github.com/graphql/graphql-relay-js,graphql-relay js implementation}
10851 from Facebook.")
10852 (properties `((python2-variant . ,(delay python2-graphql-relay))))
10853 (license license:expat)))
10854
10855 (define-public python2-graphql-relay
10856 (let ((base (package-with-python2
10857 (strip-python2-variant python-graphql-relay))))
10858 (package (inherit base)
10859 (native-inputs
10860 `(("python2-setuptools" ,python2-setuptools)
10861 ,@(package-native-inputs base))))))
10862
10863 (define-public python-graphene
10864 (package
10865 (name "python-graphene")
10866 (version "0.10.2")
10867 (source
10868 (origin
10869 (method url-fetch)
10870 (uri (pypi-uri "graphene" version))
10871 (sha256
10872 (base32
10873 "09zhac7igh9ixdz0ay6csy35b40l1jwbf2wrbxmgxwfhy51iy06q"))))
10874 (build-system python-build-system)
10875 (native-inputs
10876 `(("python-django-filter" ,python-django-filter)
10877 ("python-mock" ,python-mock)
10878 ("python-psycopg2" ,python-psycopg2)
10879 ("python-pytest-django" ,python-pytest-django)
10880 ("python-sqlalchemy-utils" ,python-sqlalchemy-utils)))
10881 (inputs
10882 `(("python-graphql-core" ,python-graphql-core)
10883 ("python-graphql-relay" ,python-graphql-relay)
10884 ("python-iso8601" ,python-iso8601)
10885 ("python-promise" ,python-promise)
10886 ("python-six" ,python-six)))
10887 (home-page "http://graphene-python.org/")
10888 (synopsis "GraphQL Framework for Python")
10889 (description
10890 "Graphene is a Python library for building GraphQL schemas/types.
10891 A GraphQL schema describes your data model, and provides a GraphQL server
10892 with an associated set of resolve methods that know how to fetch data.")
10893 (properties `((python2-variant . ,(delay python2-graphene))))
10894 (license license:expat)))
10895
10896 (define-public python2-graphene
10897 (let ((base (package-with-python2
10898 (strip-python2-variant python-graphene))))
10899 (package (inherit base)
10900 (native-inputs
10901 `(("python2-setuptools" ,python2-setuptools)
10902 ("python2-sqlalchemy" ,python2-sqlalchemy)
10903 ,@(package-native-inputs base))))))
10904
10905 (define-public python-nautilus
10906 (package
10907 (name "python-nautilus")
10908 (version "0.4.9")
10909 (source
10910 (origin
10911 (method url-fetch)
10912 (uri (pypi-uri "nautilus" version))
10913 (sha256
10914 (base32
10915 "01hwzjc1zshk4vvxrcghm398fpy4jls66dyz06g07mrwqif8878p"))))
10916 (build-system python-build-system)
10917 (arguments `(#:tests? #f)) ; fails to import test modules
10918 (native-inputs
10919 `(("python-setuptools" ,python-setuptools)))
10920 (inputs
10921 `(("python-bcrypt" ,python-bcrypt)
10922 ("python-click" ,python-click)
10923 ("python-consul" ,python-consul)
10924 ("python-graphql-core" ,python-graphql-core)
10925 ("python-graphql-relay" ,python-graphql-relay)
10926 ("python-graphene" ,python-graphene)
10927 ("python-jinja2" ,python-jinja2)
10928 ("python-nose2" ,python-nose2)
10929 ("python-peewee" ,python-peewee)
10930 ("python-pika" ,python-pika)
10931 ("python-pycparser" ,python-pycparser)
10932 ("python-requests" ,python-requests)
10933 ("python-tornado" ,python-tornado)
10934 ("python-wtforms" ,python-wtforms)))
10935 (home-page "https://github.com/AlecAivazis/nautilus")
10936 (synopsis "Library for creating microservice applications")
10937 (description
10938 "Nautilus is a framework for flux based microservices that looks to
10939 provide extendible implementations of common aspects of a cloud so that you can
10940 focus on building massively scalable web applications.")
10941 (license license:expat)))