gnu: python-file: Don't create a compressed egg.
[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 bash)
56 #:use-module (gnu packages compression)
57 #:use-module (gnu packages databases)
58 #:use-module (gnu packages django)
59 #:use-module (gnu packages file)
60 #:use-module (gnu packages fontutils)
61 #:use-module (gnu packages gcc)
62 #:use-module (gnu packages ghostscript)
63 #:use-module (gnu packages gl)
64 #:use-module (gnu packages glib)
65 #:use-module (gnu packages gstreamer)
66 #:use-module (gnu packages gtk)
67 #:use-module (gnu packages icu4c)
68 #:use-module (gnu packages image)
69 #:use-module (gnu packages imagemagick)
70 #:use-module (gnu packages libevent)
71 #:use-module (gnu packages libffi)
72 #:use-module (gnu packages linux)
73 #:use-module (gnu packages maths)
74 #:use-module (gnu packages multiprecision)
75 #:use-module (gnu packages networking)
76 #:use-module (gnu packages ncurses)
77 #:use-module (gnu packages openstack)
78 #:use-module (gnu packages password-utils)
79 #:use-module (gnu packages pcre)
80 #:use-module (gnu packages perl)
81 #:use-module (gnu packages pkg-config)
82 #:use-module (gnu packages readline)
83 #:use-module (gnu packages sdl)
84 #:use-module (gnu packages statistics)
85 #:use-module (gnu packages tex)
86 #:use-module (gnu packages texinfo)
87 #:use-module (gnu packages tls)
88 #:use-module (gnu packages version-control)
89 #:use-module (gnu packages web)
90 #:use-module (gnu packages base)
91 #:use-module (gnu packages xml)
92 #:use-module (gnu packages xorg)
93 #:use-module (gnu packages xdisorg)
94 #:use-module (gnu packages zip)
95 #:use-module (gnu packages tcl)
96 #:use-module (gnu packages bdw-gc)
97 #:use-module (guix packages)
98 #:use-module (guix download)
99 #:use-module (guix git-download)
100 #:use-module (guix utils)
101 #:use-module (guix build-system gnu)
102 #:use-module (guix build-system cmake)
103 #:use-module (guix build-system python)
104 #:use-module (guix build-system trivial)
105 #:use-module (srfi srfi-1))
106
107 (define-public python-2.7
108 (package
109 (name "python")
110 (version "2.7.12")
111 (source
112 (origin
113 (method url-fetch)
114 (uri (string-append "https://www.python.org/ftp/python/"
115 version "/Python-" version ".tar.xz"))
116 (sha256
117 (base32
118 "0y7rl603vmwlxm6ilkhc51rx2mfj14ckcz40xxgs0ljnvlhp30yp"))
119 (patches (search-patches "python-2.7-search-paths.patch"
120 "python-2-deterministic-build-info.patch"
121 "python-2.7-source-date-epoch.patch"))
122 (modules '((guix build utils)))
123 ;; suboptimal to delete failing tests here, but if we delete them in the
124 ;; arguments then we need to make sure to strip out that phase when it
125 ;; gets inherited by python and python-minimal.
126 (snippet
127 '(begin
128 (for-each delete-file
129 '("Lib/test/test_compileall.py"
130 "Lib/test/test_ctypes.py" ; fails on mips64el
131 "Lib/test/test_distutils.py"
132 "Lib/test/test_import.py"
133 "Lib/test/test_shutil.py"
134 "Lib/test/test_socket.py"
135 "Lib/test/test_subprocess.py"))
136 #t))))
137 (outputs '("out"
138 "tk")) ;tkinter; adds 50 MiB to the closure
139 (build-system gnu-build-system)
140 (arguments
141 `(;; 356 tests OK.
142 ;; 6 tests failed:
143 ;; test_compileall test_distutils test_import test_shutil test_socket
144 ;; test_subprocess
145 ;; 39 tests skipped:
146 ;; test_aepack test_al test_applesingle test_bsddb test_bsddb185
147 ;; test_bsddb3 test_cd test_cl test_codecmaps_cn test_codecmaps_hk
148 ;; test_codecmaps_jp test_codecmaps_kr test_codecmaps_tw test_curses
149 ;; test_dl test_gdb test_gl test_imageop test_imgfile test_ioctl
150 ;; test_kqueue test_linuxaudiodev test_macos test_macostools
151 ;; test_msilib test_ossaudiodev test_scriptpackages test_smtpnet
152 ;; test_socketserver test_startfile test_sunaudiodev test_timeout
153 ;; test_tk test_ttk_guionly test_urllib2net test_urllibnet
154 ;; test_winreg test_winsound test_zipfile64
155 ;; 4 skips unexpected on linux2:
156 ;; test_bsddb test_bsddb3 test_gdb test_ioctl
157 #:test-target "test"
158 #:configure-flags
159 (list "--enable-shared" ;allow embedding
160 "--with-system-ffi" ;build ctypes
161 (string-append "LDFLAGS=-Wl,-rpath="
162 (assoc-ref %outputs "out") "/lib"))
163
164 #:modules ((ice-9 ftw) (ice-9 match)
165 (guix build utils) (guix build gnu-build-system))
166 #:phases
167 (modify-phases %standard-phases
168 (add-before
169 'configure 'patch-lib-shells
170 (lambda _
171 ;; Filter for existing files, since some may not exist in all
172 ;; versions of python that are built with this recipe.
173 (substitute* (filter file-exists?
174 '("Lib/subprocess.py"
175 "Lib/popen2.py"
176 "Lib/distutils/tests/test_spawn.py"
177 "Lib/test/test_subprocess.py"))
178 (("/bin/sh") (which "sh")))
179
180 ;; Use zero as the timestamp in .pyc files so that builds are
181 ;; deterministic. TODO: Remove it when this variable is set in
182 ;; gnu-build-system.scm.
183 (setenv "SOURCE_DATE_EPOCH" "1")
184 #t))
185 (add-before 'configure 'do-not-record-configure-flags
186 (lambda* (#:key configure-flags #:allow-other-keys)
187 ;; Remove configure flags from the installed '_sysconfigdata.py'
188 ;; and 'Makefile' so we don't end up keeping references to the
189 ;; build tools.
190 ;;
191 ;; Preserve at least '--with-system-ffi' since otherwise the
192 ;; thing tries to build libffi, fails, and we end up with a
193 ;; Python that lacks ctypes.
194 (substitute* "configure"
195 (("^CONFIG_ARGS=.*$")
196 (format #f "CONFIG_ARGS='~a'\n"
197 (if (member "--with-system-ffi" configure-flags)
198 "--with-system-ffi"
199 ""))))
200 #t))
201 (add-before
202 'check 'pre-check
203 (lambda _
204 ;; 'Lib/test/test_site.py' needs a valid $HOME
205 (setenv "HOME" (getcwd))
206 #t))
207 (add-after
208 'unpack 'set-source-file-times-to-1980
209 ;; XXX One of the tests uses a ZIP library to pack up some of the
210 ;; source tree, and fails with "ZIP does not support timestamps
211 ;; before 1980". Work around this by setting the file times in the
212 ;; source tree to sometime in early 1980.
213 (lambda _
214 (let ((circa-1980 (* 10 366 24 60 60)))
215 (ftw "." (lambda (file stat flag)
216 (utime file circa-1980 circa-1980)
217 #t))
218 #t)))
219 (add-after 'install 'remove-tests
220 ;; Remove 25 MiB of unneeded unit tests. Keep test_support.*
221 ;; because these files are used by some libraries out there.
222 (lambda* (#:key outputs #:allow-other-keys)
223 (let ((out (assoc-ref outputs "out")))
224 (match (scandir (string-append out "/lib")
225 (lambda (name)
226 (string-prefix? "python" name)))
227 ((pythonX.Y)
228 (let ((testdir (string-append out "/lib/" pythonX.Y
229 "/test")))
230 (with-directory-excursion testdir
231 (for-each delete-file-recursively
232 (scandir testdir
233 (match-lambda
234 ((or "." "..") #f)
235 (file
236 (not
237 (string-prefix? "test_support."
238 file))))))
239 (call-with-output-file "__init__.py" (const #t))
240 #t)))))))
241 (add-before 'strip 'make-libraries-writable
242 (lambda* (#:key outputs #:allow-other-keys)
243 ;; Make .so files writable so they can be stripped.
244 (let ((out (assoc-ref outputs "out")))
245 (for-each (lambda (file)
246 (chmod file #o755))
247 (find-files (string-append out "/lib")
248 "\\.so"))
249 #t)))
250 (add-after 'install 'move-tk-inter
251 (lambda* (#:key outputs #:allow-other-keys)
252 ;; When Tkinter support is built move it to a separate output so
253 ;; that the main output doesn't contain a reference to Tcl/Tk.
254 (let ((out (assoc-ref outputs "out"))
255 (tk (assoc-ref outputs "tk")))
256 (when tk
257 (match (find-files out "tkinter.*\\.so")
258 ((tkinter.so)
259 ;; The .so is in OUT/lib/pythonX.Y/lib-dynload, but we
260 ;; want it under TK/lib/pythonX.Y/site-packages.
261 (let* ((len (string-length out))
262 (target (string-append
263 tk "/"
264 (string-drop
265 (dirname (dirname tkinter.so))
266 len)
267 "/site-packages")))
268 (install-file tkinter.so target)
269 (delete-file tkinter.so)))))
270 #t))))))
271 (inputs
272 `(("bzip2" ,bzip2)
273 ("gdbm" ,gdbm)
274 ("libffi" ,libffi) ; for ctypes
275 ("sqlite" ,sqlite) ; for sqlite extension
276 ("openssl" ,openssl)
277 ("readline" ,readline)
278 ("zlib" ,zlib)
279 ("tcl" ,tcl)
280 ("tk" ,tk))) ; for tkinter
281 (native-inputs
282 `(("pkg-config" ,pkg-config)))
283 (native-search-paths
284 (list (search-path-specification
285 (variable "PYTHONPATH")
286 (files '("lib/python2.7/site-packages")))))
287 (home-page "https://www.python.org")
288 (synopsis "High-level, dynamically-typed programming language")
289 (description
290 "Python is a remarkably powerful dynamic programming language that
291 is used in a wide variety of application domains. Some of its key
292 distinguishing features include: clear, readable syntax; strong
293 introspection capabilities; intuitive object orientation; natural
294 expression of procedural code; full modularity, supporting hierarchical
295 packages; exception-based error handling; and very high level dynamic
296 data types.")
297 (license license:psfl)))
298
299 ;; Current 2.x version.
300 (define-public python-2 python-2.7)
301
302 (define-public python-3.5
303 (package (inherit python-2)
304 (version "3.5.2")
305 (source (origin
306 (method url-fetch)
307 (uri (string-append "https://www.python.org/ftp/python/"
308 version "/Python-" version ".tar.xz"))
309 (patches (search-patches
310 "python-fix-tests.patch"
311 "python-3.5-fix-tests.patch"
312 "python-3-deterministic-build-info.patch"
313 "python-3-search-paths.patch"))
314 (patch-flags '("-p0"))
315 (sha256
316 (base32
317 "0h6a5fr7ram2s483lh0pnmc4ncijb8llnpfdxdcl5dxr01hza400"))))
318 (arguments (substitute-keyword-arguments (package-arguments python-2)
319 ((#:tests? _) #t)))
320 (native-search-paths
321 (list (search-path-specification
322 (variable "PYTHONPATH")
323 (files (list (string-append "lib/python"
324 (version-major+minor version)
325 "/site-packages"))))))))
326
327 (define-public python-3.4
328 (package (inherit python-3.5)
329 (version "3.4.5")
330 (source (origin
331 (method url-fetch)
332 (uri (string-append "https://www.python.org/ftp/python/"
333 version "/Python-" version ".tar.xz"))
334 (patches (search-patches
335 "python-fix-tests.patch"
336 "python-3.4-fix-tests.patch"
337 "python-3-deterministic-build-info.patch"
338 "python-3-search-paths.patch"))
339 (patch-flags '("-p0"))
340 (sha256
341 (base32
342 "12l9klp778wklxmckhghniy5hklss8r26995pyd00qbllk4b2r7f"))))))
343
344 ;; Current 3.x version.
345 (define-public python-3 python-3.5)
346
347 ;; Current major version.
348 (define-public python python-3)
349
350 ;; Minimal variants of Python, mostly used to break the cycle between Tk and
351 ;; Python (Tk -> libxcb -> Python.)
352
353 (define-public python2-minimal
354 (package (inherit python-2)
355 (name "python-minimal")
356 (outputs '("out"))
357 (arguments
358 (substitute-keyword-arguments (package-arguments python-2)
359 ((#:configure-flags cf)
360 `(append ,cf '("--without-system-ffi")))))
361 (inputs '()))) ;none of the optional dependencies
362
363 (define-public python-minimal
364 (package (inherit python)
365 (name "python-minimal")
366 (outputs '("out"))
367
368 ;; Build fails due to missing ctypes without libffi.
369 ;; OpenSSL is a mandatory dependency of Python 3.x, for urllib;
370 ;; zlib is required by 'zipimport', used by pip.
371 (inputs `(("libffi" ,libffi)
372 ("openssl" ,openssl)
373 ("zlib" ,zlib)))))
374
375 (define* (wrap-python3 python
376 #:optional
377 (name (string-append (package-name python) "-wrapper")))
378 (package (inherit python)
379 (name name)
380 (source #f)
381 (build-system trivial-build-system)
382 (outputs '("out"))
383 (inputs `(("bash" ,bash)))
384 (propagated-inputs `(("python" ,python)))
385 (arguments
386 `(#:modules ((guix build utils))
387 #:builder
388 (begin
389 (use-modules (guix build utils))
390 (let ((bin (string-append (assoc-ref %outputs "out") "/bin"))
391 (python (string-append (assoc-ref %build-inputs "python") "/bin/")))
392 (mkdir-p bin)
393 (for-each
394 (lambda (old new)
395 (symlink (string-append python old)
396 (string-append bin "/" new)))
397 `("python3" ,"pydoc3" ,"idle3" ,"pip3")
398 `("python" ,"pydoc" ,"idle" ,"pip"))
399 ;; python-config outputs search paths based upon its location,
400 ;; use a bash wrapper to avoid changing its outputs.
401 (let ((bash (string-append (assoc-ref %build-inputs "bash")
402 "/bin/bash"))
403 (old (string-append python "python3-config"))
404 (new (string-append bin "/python-config")))
405 (with-output-to-file new
406 (lambda ()
407 (format #t "#!~a~%" bash)
408 (format #t "exec \"~a\" \"$@\"~%" old)
409 (chmod new #o755)
410 #t)))))))
411 (synopsis "Wrapper for the Python 3 commands")
412 (description
413 "This package provides wrappers for the commands of Python@tie{}3.x such
414 that they can be invoked under their usual name---e.g., @command{python}
415 instead of @command{python3}.")))
416
417 (define-public python-wrapper (wrap-python3 python))
418 (define-public python-minimal-wrapper (wrap-python3 python-minimal))
419
420 (define-public python-psutil
421 (package
422 (name "python-psutil")
423 (version "4.3.0")
424 (source
425 (origin
426 (method url-fetch)
427 (uri (pypi-uri "psutil" version))
428 (sha256
429 (base32
430 "1w4r09fvn6kd80m5mx4ws1wz100brkaq6hzzpwrns8cgjzjpl6c6"))))
431 (build-system python-build-system)
432 (native-inputs
433 `(("python-setuptools" ,python-setuptools)))
434 (home-page "https://www.github.com/giampaolo/psutil")
435 (synopsis "Library for retrieving information on running processes")
436 (description
437 "psutil (Python system and process utilities) is a library for retrieving
438 information on running processes and system utilization (CPU, memory, disks,
439 network) in Python. It is useful mainly for system monitoring, profiling and
440 limiting process resources and management of running processes. It implements
441 many functionalities offered by command line tools such as: ps, top, lsof,
442 netstat, ifconfig, who, df, kill, free, nice, ionice, iostat, iotop, uptime,
443 pidof, tty, taskset, pmap.")
444 (license license:bsd-3)))
445
446 (define-public python2-psutil
447 (package-with-python2 python-psutil))
448
449 (define-public python-passlib
450 (package
451 (name "python-passlib")
452 (version "1.6.5")
453 (source
454 (origin
455 (method url-fetch)
456 (uri (pypi-uri "passlib" version))
457 (sha256
458 (base32
459 "1z27wdxs5rj5xhhqfzvzn3yg682irkxw6dcs5jj7mcf97psk8gd8"))))
460 (build-system python-build-system)
461 (native-inputs
462 `(("python-nose" ,python-nose)
463 ("python-setuptools" ,python-setuptools)))
464 (inputs
465 `(("python-py-bcrypt" ,python-py-bcrypt)))
466 (arguments
467 `(#:phases
468 (alist-cons-before
469 'check 'set-PYTHON_EGG_CACHE
470 ;; some tests require access to "$HOME/.cython"
471 (lambda* _ (setenv "PYTHON_EGG_CACHE" "/tmp"))
472 %standard-phases)))
473 (home-page "https://bitbucket.org/ecollins/passlib")
474 (synopsis
475 "Comprehensive password hashing framework")
476 (description
477 "Passlib is a password hashing library for Python 2 & 3, which provides
478 cross-platform implementations of over 30 password hashing algorithms, as well
479 as a framework for managing existing password hashes. It's designed to be
480 useful for a wide range of tasks, from verifying a hash found in /etc/shadow,
481 to providing full-strength password hashing for multi-user application.")
482 (license license:bsd-3)))
483
484 (define-public python2-passlib
485 (package-with-python2 python-passlib))
486
487 (define-public python-py-bcrypt
488 (package
489 (name "python-py-bcrypt")
490 (version "0.4")
491 (source
492 (origin
493 (method url-fetch)
494 (uri (string-append
495 "https://pypi.python.org/packages/source/p/py-bcrypt/py-bcrypt-"
496 version
497 ".tar.gz"))
498 (sha256
499 (base32
500 "0y6smdggwi5s72v6p1nn53dg6w05hna3d264cq6kas0lap73p8az"))))
501 (build-system python-build-system)
502 (native-inputs
503 `(("python-setuptools" ,python-setuptools)))
504 (home-page "https://code.google.com/p/py-bcrypt")
505 (synopsis
506 "Bcrypt password hashing and key derivation")
507 (description
508 "A python wrapper of OpenBSD's Blowfish password hashing code. This
509 system hashes passwords using a version of Bruce Schneier's Blowfish block
510 cipher with modifications designed to raise the cost of off-line password
511 cracking and frustrate fast hardware implementation. The computation cost of
512 the algorithm is parametised, so it can be increased as computers get faster.
513 The intent is to make a compromise of a password database less likely to
514 result in an attacker gaining knowledge of the plaintext passwords (e.g. using
515 John the Ripper).")
516 ;; "sha2.c" is under BSD-3;
517 ;; "blowfish.c" and "bcrypt.c" are under BSD-4;
518 ;; the rest is under ISC.
519 (license (list license:isc license:bsd-3 license:bsd-4))))
520
521 (define-public python2-py-bcrypt
522 (package-with-python2 python-py-bcrypt))
523
524
525 (define-public python-paramiko
526 (package
527 (name "python-paramiko")
528 (version "1.16.0")
529 (source
530 (origin
531 (method url-fetch)
532 (uri (pypi-uri "paramiko" version))
533 (sha256
534 (base32
535 "14k8z7ndc3zk5xivnm4d8lncchx475ll5izpf8vmfbq7rp9yp5rj"))))
536 (build-system python-build-system)
537 (native-inputs
538 `(("python-setuptools" ,python-setuptools)))
539 (propagated-inputs
540 `(("python-pycrypto" ,python-pycrypto)))
541 (inputs
542 `(("python-ecdsa" ,python-ecdsa)))
543 (home-page "http://www.paramiko.org/")
544 (synopsis "SSHv2 protocol library")
545 (description "Paramiko is a python implementation of the SSHv2 protocol,
546 providing both client and server functionality. While it leverages a Python C
547 extension for low level cryptography (PyCrypto), Paramiko itself is a pure
548 Python interface around SSH networking concepts.")
549 (license license:lgpl2.1+)))
550
551 (define-public python2-paramiko
552 (package-with-python2 python-paramiko))
553
554
555 (define-public python-httplib2
556 (package
557 (name "python-httplib2")
558 (version "0.9.2")
559 (source
560 (origin
561 (method url-fetch)
562 (uri (pypi-uri "httplib2" version))
563 (sha256
564 (base32
565 "126rsryvw9vhbf3qmsfw9lf4l4xm2srmgs439lgma4cpag4s3ay3"))))
566 (build-system python-build-system)
567 (native-inputs
568 `(("python-setuptools" ,python-setuptools)))
569 (home-page "https://github.com/jcgregorio/httplib2")
570 (synopsis "Comprehensive HTTP client library")
571 (description
572 "A comprehensive HTTP client library supporting many features left out of
573 other HTTP libraries.")
574 (license license:expat)))
575
576 (define-public python2-httplib2
577 (package-with-python2 python-httplib2))
578
579 (define-public python-ecdsa
580 (package
581 (name "python-ecdsa")
582 (version "0.13")
583 (source
584 (origin
585 (method url-fetch)
586 (uri (string-append
587 "https://pypi.python.org/packages/source/e/ecdsa/ecdsa-"
588 version
589 ".tar.gz"))
590 (sha256
591 (base32
592 "1yj31j0asmrx4an9xvsaj2icdmzy6pw0glfpqrrkrphwdpi1xkv4"))))
593 (build-system python-build-system)
594 (native-inputs
595 `(("python-setuptools" ,python-setuptools)))
596 (inputs
597 `(("openssl" ,openssl)))
598 (home-page
599 "http://github.com/warner/python-ecdsa")
600 (synopsis
601 "ECDSA cryptographic signature library (pure python)")
602 (description
603 "This is an easy-to-use implementation of ECDSA cryptography (Elliptic
604 Curve Digital Signature Algorithm), implemented purely in Python. With this
605 library, you can quickly create keypairs (signing key and verifying key), sign
606 messages, and verify the signatures. The keys and signatures are very short,
607 making them easy to handle and incorporate into other protocols.")
608 (license license:expat)))
609
610 (define-public python2-ecdsa
611 (package-with-python2 python-ecdsa))
612
613 (define-public python-ccm
614 (package
615 (name "python-ccm")
616 (version "2.1.6")
617 (source
618 (origin
619 (method url-fetch)
620 (uri (pypi-uri "ccm" version))
621 (sha256
622 (base32
623 "177dfxsmk3k4cih6fh6v8d91bh4nqx7ns6pc07w7m7i3cvdx3c8n"))))
624 (build-system python-build-system)
625 (native-inputs
626 `(("python-setuptools" ,python-setuptools)))
627 (inputs
628 `(("python-pyyaml" ,python-pyyaml)
629 ("python-six" ,python-six)))
630 (home-page "https://github.com/pcmanus/ccm")
631 (synopsis "Cassandra Cluster Manager")
632 (description "A script/library to create, launch and remove an Apache
633 Cassandra cluster on localhost.")
634 (license license:asl2.0)))
635
636 (define-public python2-ccm
637 (package-with-python2 python-ccm))
638
639 (define-public python-pytz
640 (package
641 (name "python-pytz")
642 (version "2016.3")
643 (source
644 (origin
645 (method url-fetch)
646 (uri (pypi-uri "pytz" version ".tar.bz2"))
647 (sha256
648 (base32
649 "1mjmrkk4vc5xzppw7fm0pli1nnbj57cvqv7jjv5whcmccyhxz4y1"))))
650 (build-system python-build-system)
651 (arguments `(#:tests? #f)) ; no test target
652 (home-page "http://pythonhosted.org/pytz")
653 (synopsis "Python timezone library")
654 (description
655 "This library allows accurate and cross platform timezone calculations
656 using Python 2.4 or higher and provides access to the Olson timezone database.")
657 (license license:expat)))
658
659 (define-public python2-pytz
660 (package-with-python2 python-pytz))
661
662
663 (define-public python-babel
664 (package
665 (name "python-babel")
666 (version "2.3.2")
667 (source
668 (origin
669 (method url-fetch)
670 (uri (pypi-uri "Babel" version))
671 (sha256
672 (base32
673 "0k43pi0p1dwpds2w0km3fw92wixzxv2vw7p09capxmjz5cfh23lw"))))
674 (build-system python-build-system)
675 (inputs
676 `(("python-pytz" ,python-pytz)
677 ("python-setuptools" ,python-setuptools)))
678 (arguments `(#:tests? #f)) ; no test target
679 (home-page "http://babel.pocoo.org/")
680 (synopsis
681 "Tools for internationalizing Python applications")
682 (description
683 "Babel is composed of two major parts:
684 - tools to build and work with gettext message catalogs
685 - a Python interface to the CLDR (Common Locale Data Repository), providing
686 access to various locale display names, localized number and date formatting,
687 etc. ")
688 (license license:bsd-3)))
689
690 (define-public python2-babel
691 (package-with-python2 python-babel))
692
693 (define-public python2-backport-ssl-match-hostname
694 (package
695 (name "python2-backport-ssl-match-hostname")
696 (version "3.5.0.1")
697 (source
698 (origin
699 (method url-fetch)
700 (uri (string-append
701 "https://pypi.python.org/packages/source/b/"
702 "backports.ssl_match_hostname/backports.ssl_match_hostname-"
703 version ".tar.gz"))
704 (sha256
705 (base32
706 "1wndipik52cyqy0677zdgp90i435pmvwd89cz98lm7ri0y3xjajh"))))
707 (build-system python-build-system)
708 (arguments
709 `(#:python ,python-2
710 #:tests? #f)) ; no test target
711 (inputs
712 `(("python2-setuptools" ,python2-setuptools)))
713 (home-page "https://bitbucket.org/brandon/backports.ssl_match_hostname")
714 (synopsis "Backport of ssl.match_hostname() function from Python 3.5")
715 (description
716 "This backport brings the ssl.match_hostname() function to users of
717 earlier versions of Python. The function checks the hostname in the
718 certificate returned by the server to which a connection has been established,
719 and verifies that it matches the intended target hostname.")
720 (license license:psfl)))
721
722 (define-public python-h5py
723 (package
724 (name "python-h5py")
725 (version "2.6.0")
726 (source
727 (origin
728 (method url-fetch)
729 (uri (pypi-uri "h5py" version))
730 (sha256
731 (base32
732 "0df46dg7i7xfking9lp221bfm8dbl974yvlrbi1w7r6m61ac7bxj"))))
733 (build-system python-build-system)
734 (arguments
735 `(#:tests? #f ; no test target
736 #:phases
737 (modify-phases %standard-phases
738 (add-after 'unpack 'fix-hdf5-paths
739 (lambda* (#:key inputs #:allow-other-keys)
740 (let ((prefix (assoc-ref inputs "hdf5")))
741 (substitute* "setup_build.py"
742 (("\\['/opt/local/lib', '/usr/local/lib'\\]")
743 (string-append "['" prefix "/lib" "']"))
744 (("'/opt/local/include', '/usr/local/include'")
745 (string-append "'" prefix "/include" "'")))
746 (substitute* "setup_configure.py"
747 (("\\['/usr/local/lib', '/opt/local/lib'\\]")
748 (string-append "['" prefix "/lib" "']")))
749 #t))))))
750 (propagated-inputs
751 `(("python-numpy" ,python-numpy)))
752 (inputs
753 `(("hdf5" ,hdf5)
754 ("python-six" ,python-six)))
755 (native-inputs
756 `(("python-cython" ,python-cython)
757 ("python-pkgconfig" ,python-pkgconfig)))
758 (home-page "http://www.h5py.org/")
759 (synopsis "Read and write HDF5 files from Python")
760 (description
761 "The h5py package provides both a high- and low-level interface to the
762 HDF5 library from Python. The low-level interface is intended to be a
763 complete wrapping of the HDF5 API, while the high-level component supports
764 access to HDF5 files, datasets and groups using established Python and NumPy
765 concepts.")
766 (license license:bsd-3)
767 (properties `((python2-variant . ,(delay python2-h5py))))))
768
769 (define-public python2-h5py
770 (package-with-python2 (strip-python2-variant python-h5py)))
771
772 (define-public python-lockfile
773 (package
774 (name "python-lockfile")
775 (version "0.12.2")
776 (source
777 (origin
778 (method url-fetch)
779 (uri (string-append "https://pypi.python.org/packages/source/l/lockfile/"
780 "lockfile-" version ".tar.gz"))
781 (sha256
782 (base32
783 "16gpx5hm73ah5n1079ng0vy381hl802v606npkx4x8nb0gg05vba"))))
784 (build-system python-build-system)
785 (arguments '(#:test-target "check"))
786 (native-inputs
787 `(("python-pbr" ,python-pbr)))
788 (home-page "https://launchpad.net/pylockfile")
789 (synopsis "Platform-independent file locking module")
790 (description
791 "The lockfile package exports a LockFile class which provides a simple
792 API for locking files.")
793 (license license:expat)
794 (properties `((python2-variant . ,(delay python2-lockfile))))))
795
796 (define-public python2-lockfile
797 (let ((base (package-with-python2 (strip-python2-variant python-lockfile))))
798 (package
799 (inherit base)
800 (native-inputs `(("python2-setuptools" ,python2-setuptools)
801 ,@(package-native-inputs base))))))
802
803 (define-public python-mock
804 (package
805 (name "python-mock")
806 (version "1.0.1")
807 (source
808 (origin
809 (method url-fetch)
810 (uri (string-append "https://pypi.python.org/packages/source/m/mock/"
811 "mock-" version ".tar.gz"))
812 (sha256
813 (base32
814 "0kzlsbki6q0awf89rc287f3aj8x431lrajf160a70z0ikhnxsfdq"))))
815 (build-system python-build-system)
816 (arguments '(#:test-target "check"))
817 (home-page "http://code.google.com/p/mock/")
818 (synopsis "Python mocking and patching library for testing")
819 (description
820 "Mock is a library for testing in Python. It allows you to replace parts
821 of your system under test with mock objects and make assertions about how they
822 have been used.")
823 (license license:expat)))
824
825 (define-public python2-mock
826 (package-with-python2 python-mock))
827
828
829 (define-public python-setuptools
830 (package
831 (name "python-setuptools")
832 (version "18.3.1")
833 (source
834 (origin
835 (method url-fetch)
836 (uri (string-append "https://pypi.python.org/packages/source/s/setuptools/setuptools-"
837 version ".tar.gz"))
838 (sha256
839 (base32
840 "0kc7rbav00ks6iaw14p38y81q12fx0lpkhgf5m97xc04f5r318ig"))))
841 (build-system python-build-system)
842 ;; FIXME: Tests require pytest, which itself relies on setuptools.
843 ;; One could bootstrap with an internal untested setuptools.
844 (arguments
845 `(#:tests? #f))
846 (home-page "https://pypi.python.org/pypi/setuptools")
847 (synopsis
848 "Library designed to facilitate packaging Python projects")
849 (description
850 "Setuptools is a fully-featured, stable library designed to facilitate
851 packaging Python projects, where packaging includes:
852 Python package and module definitions,
853 distribution package metadata,
854 test hooks,
855 project installation,
856 platform-specific details,
857 Python 3 support.")
858 (license license:psfl)))
859
860 (define-public python2-setuptools
861 (package-with-python2 python-setuptools))
862
863
864 (define-public python-pycrypto
865 (package
866 (name "python-pycrypto")
867 (version "2.6.1")
868 (source
869 (origin
870 (method url-fetch)
871 (uri (string-append "https://pypi.python.org/packages/source/p/"
872 "pycrypto/pycrypto-" version ".tar.gz"))
873 (sha256
874 (base32
875 "0g0ayql5b9mkjam8hym6zyg6bv77lbh66rv1fyvgqb17kfc1xkpj"))))
876 (build-system python-build-system)
877 (native-inputs
878 `(("python-setuptools" ,python-setuptools)))
879 (inputs
880 `(("python" ,python)
881 ("gmp" ,gmp)))
882 (arguments
883 `(#:phases
884 (alist-cons-before
885 'build 'set-build-env
886 ;; pycrypto runs an autoconf configure script behind the scenes
887 (lambda _
888 (setenv "CONFIG_SHELL" (which "bash")))
889 %standard-phases)))
890 (home-page "http://www.pycrypto.org/")
891 (synopsis "Cryptographic modules for Python")
892 (description
893 "Pycrypto is a collection of both secure hash functions (such as SHA256
894 and RIPEMD160), and various encryption algorithms (AES, DES, RSA, ElGamal,
895 etc.). The package is structured to make adding new modules easy.")
896 (license license:public-domain)))
897
898 (define-public python2-pycrypto
899 (let ((pycrypto (package-with-python2 python-pycrypto)))
900 (package (inherit pycrypto)
901 (inputs
902 `(("python" ,python-2)
903 ,@(alist-delete
904 "python"
905 (package-inputs pycrypto)))))))
906
907 (define-public python-keyring
908 (package
909 (name "python-keyring")
910 (version "8.7")
911 (source
912 (origin
913 (method url-fetch)
914 (uri (pypi-uri "keyring" version))
915 (sha256
916 (base32
917 "0482rmi2x6p78wl2kz8qzyq21xz1sbbfwnv5x7dggar4vkwxhzfx"))))
918 (build-system python-build-system)
919 (native-inputs
920 `(("python-setuptools-scm" ,python-setuptools-scm)))
921 (inputs
922 `(("python-pycrypto" ,python-pycrypto)))
923 (arguments
924 `(#:tests? #f)) ;TODO: tests require pytest
925 (home-page "https://github.com/jaraco/keyring")
926 (synopsis "Store and access your passwords safely")
927 (description
928 "The Python keyring lib provides a easy way to access the system keyring
929 service from python. It can be used in any application that needs safe
930 password storage.")
931 ;; "MIT" and PSF dual license
932 (license license:x11)
933 (properties `((python2-variant . ,(delay python2-keyring))))))
934
935 (define-public python2-keyring
936 (let ((base (package-with-python2 (strip-python2-variant python-keyring))))
937 (package
938 (inherit base)
939 (native-inputs `(("python2-setuptools" ,python2-setuptools)
940 ,@(package-native-inputs base))))))
941
942 (define-public python-six
943 (package
944 (name "python-six")
945 (version "1.10.0")
946 (source
947 (origin
948 (method url-fetch)
949 (uri (pypi-uri "six" version))
950 (sha256
951 (base32
952 "0snmb8xffb3vsma0z67i0h0w2g2dy0p3gsgh9gi4i0kgc5l8spqh"))))
953 (build-system python-build-system)
954 (inputs
955 `(("python-setuptools" ,python-setuptools)))
956 (home-page "http://pypi.python.org/pypi/six/")
957 (synopsis "Python 2 and 3 compatibility utilities")
958 (description
959 "Six is a Python 2 and 3 compatibility library. It provides utility
960 functions for smoothing over the differences between the Python versions with
961 the goal of writing Python code that is compatible on both Python versions.
962 Six supports every Python version since 2.5. It is contained in only one
963 Python file, so it can be easily copied into your project.")
964 (license license:x11)))
965
966 (define-public python2-six
967 (package-with-python2 python-six))
968
969 (define-public python-dateutil-2
970 (package
971 (name "python-dateutil")
972 (version "2.5.2")
973 (source
974 (origin
975 (method url-fetch)
976 (uri (pypi-uri "python-dateutil" version))
977 (sha256
978 (base32
979 "0jrfpcgvgya6hs45dhrd9yiqgdgz9qp9aa07zsw8gqgn8zphff86"))))
980 (build-system python-build-system)
981 (inputs
982 `(("python-six" ,python-six)))
983 (home-page "https://dateutil.readthedocs.io/en/stable/")
984 (synopsis "Extensions to the standard datetime module")
985 (description
986 "The dateutil module provides powerful extensions to the standard
987 datetime module, available in Python 2.3+.")
988 (license license:bsd-3)
989 (properties `((python2-variant . ,(delay python2-dateutil-2))))))
990
991 (define-public python2-dateutil-2
992 (let ((base (package-with-python2 (strip-python2-variant python-dateutil-2))))
993 (package
994 (inherit base)
995 (inputs `(("python2-setuptools" ,python2-setuptools)
996 ,@(package-inputs base))))))
997
998 (define-public python-dateutil
999 (package
1000 (name "python-dateutil")
1001 (version "1.5") ; last version for python < 3
1002 (source
1003 (origin
1004 (method url-fetch)
1005 (uri (string-append "http://labix.org/download/python-dateutil/"
1006 "python-dateutil-" version ".tar.gz"))
1007 (sha256
1008 (base32
1009 "0fqfglhy5khbvsipr3x7m6bcaqljh8xl5cw33vbfxy7qhmywm2n0"))))
1010 (build-system python-build-system)
1011 (inputs
1012 `(("python-setuptools" ,python-setuptools)))
1013 (home-page "https://dateutil.readthedocs.io/en/stable/")
1014 (synopsis "Extensions to the standard datetime module")
1015 (description
1016 "The dateutil module provides powerful extensions to the standard
1017 datetime module, available in Python 2.3+.")
1018 (license license:psfl)))
1019
1020 (define-public python2-dateutil
1021 (package-with-python2 python-dateutil))
1022
1023 (define-public python-parsedatetime
1024 (package
1025 (name "python-parsedatetime")
1026 (version "2.1")
1027 (source
1028 (origin
1029 (method url-fetch)
1030 (uri (pypi-uri "parsedatetime" version))
1031 (sha256
1032 (base32
1033 "0bdgyw6y3v7bcxlx0p50s8drxsh5bb5cy2afccqr3j90amvpii8p"))))
1034 (build-system python-build-system)
1035 (native-inputs
1036 `(("python-nose" ,python-nose)
1037 ("python-pyicu" ,python-pyicu)))
1038 (home-page "http://github.com/bear/parsedatetime/")
1039 (synopsis
1040 "Parse human-readable date/time text")
1041 (description
1042 "Parse human-readable date/time text.")
1043 (license license:asl2.0)
1044 (properties `((python2-variant . ,(delay python2-parsedatetime))))))
1045
1046 (define-public python2-parsedatetime
1047 (let ((base (package-with-python2 (strip-python2-variant python-parsedatetime))))
1048 (package
1049 (inherit base)
1050 (native-inputs `(("python2-setuptools" ,python2-setuptools)
1051 ,@(package-native-inputs base))))))
1052
1053 (define-public python-pandas
1054 (package
1055 (name "python-pandas")
1056 (version "0.18.1")
1057 (source
1058 (origin
1059 (method url-fetch)
1060 (uri (string-append
1061 "https://pypi.python.org/packages/11/09/"
1062 "e66eb844daba8680ddff26335d5b4fead77f60f957678243549a8dd4830d/"
1063 "pandas-" version ".tar.gz"))
1064 (sha256
1065 (base32 "1ckpxrvvjj6zxmn68icd9hib8qcpx9b35f6izxnr25br5ilq7r6j"))))
1066 (build-system python-build-system)
1067 (propagated-inputs
1068 `(("python-numpy" ,python-numpy)))
1069 (inputs
1070 `(("python-pytz" ,python-pytz)
1071 ("python-dateutil" ,python-dateutil-2)))
1072 (native-inputs
1073 `(("python-nose" ,python-nose)))
1074 (home-page "http://pandas.pydata.org")
1075 (synopsis "Data structures for data analysis, time series, and statistics")
1076 (description
1077 "Pandas is a Python package providing fast, flexible, and expressive data
1078 structures designed to make working with structured (tabular,
1079 multidimensional, potentially heterogeneous) and time series data both easy
1080 and intuitive. It aims to be the fundamental high-level building block for
1081 doing practical, real world data analysis in Python.")
1082 (license license:bsd-3)
1083 (properties `((python2-variant . ,(delay python2-pandas))))))
1084
1085 (define-public python2-pandas
1086 (let ((base (package-with-python2 (strip-python2-variant python-pandas))))
1087 (package
1088 (inherit base)
1089 (native-inputs `(("python2-setuptools" ,python2-setuptools)
1090 ,@(package-native-inputs base))))))
1091
1092 (define-public python-tzlocal
1093 (package
1094 (name "python-tzlocal")
1095 (version "1.2.2")
1096 (source
1097 (origin
1098 (method url-fetch)
1099 (uri (pypi-uri "tzlocal" version))
1100 (sha256
1101 (base32
1102 "0paj7vlsb0np8b5sp4bv64wxv7qk2piyp7xg29pkhdjwsbls9fnb"))))
1103 (build-system python-build-system)
1104 (inputs `(("python-pytz" ,python-pytz)))
1105 (home-page "https://github.com/regebro/tzlocal")
1106 (synopsis
1107 "Local timezone information for Python")
1108 (description
1109 "Tzlocal returns a tzinfo object with the local timezone information.
1110 This module attempts to fix a glaring hole in pytz, that there is no way to
1111 get the local timezone information, unless you know the zoneinfo name, and
1112 under several distributions that's hard or impossible to figure out.")
1113 (license license:cc0)))
1114
1115 (define-public python2-pysqlite
1116 (package
1117 (name "python2-pysqlite")
1118 (version "2.8.1")
1119 (source
1120 (origin
1121 (method url-fetch)
1122 (uri (pypi-uri "pysqlite" version))
1123 (sha256
1124 (base32
1125 "0rm0zqyb363y6wljhfmbxs16jjv7p8nk1d8zgq9sdwj6js7y3jkm"))))
1126 (build-system python-build-system)
1127 (inputs
1128 `(("sqlite" ,sqlite)))
1129 (arguments
1130 `(#:python ,python-2 ; incompatible with Python 3
1131 #:tests? #f)) ; no test target
1132 (home-page "http://github.com/ghaering/pysqlite")
1133 (synopsis "SQLite bindings for Python")
1134 (description
1135 "Pysqlite provides SQLite bindings for Python that comply to the
1136 Database API 2.0T.")
1137 (license license:zlib)))
1138
1139
1140 (define-public python2-mechanize
1141 (package
1142 (name "python2-mechanize")
1143 (version "0.2.5")
1144 (source
1145 (origin
1146 (method url-fetch)
1147 (uri (string-append "https://pypi.python.org/packages/source/m/mechanize/mechanize-"
1148 version ".tar.gz"))
1149 (sha256
1150 (base32
1151 "0rj7r166i1dyrq0ihm5rijfmvhs8a04im28lv05c0c3v206v4rrf"))))
1152 (build-system python-build-system)
1153 (inputs
1154 `(("python2-setuptools" ,python2-setuptools)))
1155 (arguments
1156 `(#:python ,python-2 ; apparently incompatible with Python 3
1157 #:tests? #f))
1158 ;; test fails with message
1159 ;; AttributeError: 'module' object has no attribute 'test_pullparser'
1160 ;; (python-3.3.2) or
1161 ;; AttributeError: 'module' object has no attribute 'test_urllib2_localnet'
1162 ;; (python-2.7.5).
1163 ;; The source code is from March 2011 and probably not up-to-date
1164 ;; with respect to python unit tests.
1165 (home-page "http://wwwsearch.sourceforge.net/mechanize/")
1166 (synopsis
1167 "Stateful programmatic web browsing in Python")
1168 (description
1169 "Mechanize implements stateful programmatic web browsing in Python,
1170 after Andy Lester’s Perl module WWW::Mechanize.")
1171 (license (license:non-copyleft
1172 "file://COPYING"
1173 "See COPYING in the distribution."))))
1174
1175
1176 (define-public python-simplejson
1177 (package
1178 (name "python-simplejson")
1179 (version "3.8.2")
1180 (source
1181 (origin
1182 (method url-fetch)
1183 (uri (pypi-uri "simplejson" version))
1184 (sha256
1185 (base32
1186 "0zylrnax8b6r0ndgni4w9c599fi6wm9vx5g6k3ddqfj3932kk16m"))))
1187 (build-system python-build-system)
1188 (home-page "http://simplejson.readthedocs.org/en/latest/")
1189 (synopsis
1190 "Json library for Python")
1191 (description
1192 "JSON (JavaScript Object Notation) is a subset of JavaScript
1193 syntax (ECMA-262 3rd edition) used as a lightweight data interchange
1194 format.
1195
1196 Simplejson exposes an API familiar to users of the standard library marshal
1197 and pickle modules. It is the externally maintained version of the json
1198 library contained in Python 2.6, but maintains compatibility with Python 2.5
1199 and (currently) has significant performance advantages, even without using
1200 the optional C extension for speedups. Simplejson is also supported on
1201 Python 3.3+.")
1202 (license license:x11)))
1203
1204 (define-public python2-simplejson
1205 (package-with-python2 python-simplejson))
1206
1207
1208 (define-public python-pyicu
1209 (package
1210 (name "python-pyicu")
1211 (version "1.9.2")
1212 (source
1213 (origin
1214 (method url-fetch)
1215 (uri (string-append "https://pypi.python.org/packages/source/P/PyICU/PyICU-"
1216 version ".tar.gz"))
1217 (sha256
1218 (base32
1219 "1diba0g8md614fvm9yf50paiwdkhj6rd7xwf1rg9mc0pxc0hhn4v"))))
1220 (build-system python-build-system)
1221 (inputs
1222 `(("icu4c" ,icu4c)))
1223 (home-page "http://pyicu.osafoundation.org/")
1224 (synopsis "Python extension wrapping the ICU C++ API")
1225 (description
1226 "PyICU is a python extension wrapping the ICU C++ API.")
1227 (license license:x11)
1228 (properties `((python2-variant . ,(delay python2-pyicu))))))
1229
1230 (define-public python2-pyicu
1231 (package
1232 (inherit (package-with-python2
1233 (strip-python2-variant python-pyicu)))
1234 (native-inputs `(("python2-setuptools" ,python2-setuptools)))))
1235
1236 (define-public python2-dogtail
1237 ;; Python 2 only, as it leads to "TabError: inconsistent use of tabs and
1238 ;; spaces in indentation" with Python 3.
1239 (package
1240 (name "python2-dogtail")
1241 (version "0.8.2")
1242 (source (origin
1243 (method url-fetch)
1244 (uri (string-append
1245 "https://fedorahosted.org/released/dogtail/dogtail-"
1246 version ".tar.gz"))
1247 (sha256
1248 (base32
1249 "1yc4cg7ip87z15gyd4wy2vzbywrjc52a3m8r8gqy2b50d65llcg1"))))
1250 (build-system python-build-system)
1251 (arguments `(#:python ,python-2
1252 #:tests? #f)) ; invalid command "test"
1253 (home-page "https://fedorahosted.org/dogtail/")
1254 (synopsis "GUI test tool and automation framework written in ​Python")
1255 (description
1256 "Dogtail is a GUI test tool and automation framework written in Python.
1257 It uses Accessibility (a11y) technologies to communicate with desktop
1258 applications. dogtail scripts are written in Python and executed like any
1259 other Python program.")
1260 (license license:gpl2+)))
1261
1262 (define-public python2-empy
1263 (package
1264 (name "python2-empy")
1265 (version "3.3")
1266 (source (origin
1267 (method url-fetch)
1268 (uri (string-append "http://www.alcyone.com/software/empy/empy-"
1269 version ".tar.gz"))
1270 (sha256
1271 (base32
1272 "01g8mmkfnvjdmlhsihwyx56lrg7r5m5d2fg6mnxsvy6g0dnl69f6"))))
1273 (build-system python-build-system)
1274 (arguments
1275 `(#:python ,python-2
1276 #:phases (alist-replace
1277 'check
1278 (lambda _
1279 (zero? (system* "./test.sh")))
1280 %standard-phases)))
1281 (home-page "http://www.alcyone.com/software/empy/")
1282 (synopsis "Templating system for Python")
1283 (description
1284 "EmPy is a system for embedding Python expressions and statements in
1285 template text; it takes an EmPy source file, processes it, and produces
1286 output. This is accomplished via expansions, which are special signals to the
1287 EmPy system and are set off by a special prefix (by default the at sign, @@).
1288 EmPy can expand arbitrary Python expressions and statements in this way, as
1289 well as a variety of special forms. Textual data not explicitly delimited in
1290 this way is sent unaffected to the output, allowing Python to be used in
1291 effect as a markup language. Also supported are callbacks via hooks,
1292 recording and playback via diversions, and dynamic, chainable filters. The
1293 system is highly configurable via command line options and embedded
1294 commands.")
1295 (license license:lgpl2.1+)))
1296
1297 (define-public python2-element-tree
1298 (package
1299 (name "python2-element-tree")
1300 (version "1.2.6")
1301 (source (origin
1302 (method url-fetch)
1303 (uri (string-append
1304 "http://effbot.org/media/downloads/elementtree-"
1305 version "-20050316.tar.gz"))
1306 (sha256
1307 (base32
1308 "016bphqnlg0l4vslahhw4r0aanw95bpypy65r1i1acyb2wj5z7dj"))))
1309 (build-system python-build-system)
1310 (arguments
1311 `(#:python ,python-2 ; seems to be part of Python 3
1312 #:tests? #f)) ; no 'test' sub-command
1313 (synopsis "Toolkit for XML processing in Python")
1314 (description
1315 "ElementTree is a Python library supporting lightweight XML processing.")
1316 (home-page "http://effbot.org/zone/element-index.htm")
1317 (license (license:x11-style
1318 "http://docs.python.org/2/license.html"
1319 "Like \"CWI LICENSE AGREEMENT FOR PYTHON 0.9.0 THROUGH 1.2\"."))))
1320
1321 (define-public python2-pybugz
1322 (package
1323 (name "python2-pybugz")
1324 (version "0.6.11")
1325 (source (origin
1326 (method url-fetch)
1327 (uri (string-append
1328 "http://bits.liquidx.net/projects/pybugz/pybugz-"
1329 version ".tar.gz"))
1330 (sha256
1331 (base32
1332 "17ni00p08gp5lkxlrrcnvi3x09fmajnlbz4da03qcgl9q21ym4jd"))
1333 (patches (search-patches "pybugz-stty.patch"
1334 "pybugz-encode-error.patch"))))
1335 (build-system python-build-system)
1336 (arguments
1337 `(#:python ,python-2 ; SyntaxError with Python 3
1338 #:tests? #f)) ; no 'test' sub-command
1339 (inputs `(("element-tree" ,python2-element-tree)))
1340 (synopsis "Python and command-line interface to Bugzilla")
1341 (description
1342 "PyBugz is a Python library and command-line tool to query the Bugzilla
1343 bug tracking system. It is meant as an aid to speed up interaction with the
1344 bug tracker.")
1345 (home-page "http://www.liquidx.net/pybugz/")
1346 (license license:gpl2)))
1347
1348 (define-public python-enum34
1349 (package
1350 (name "python-enum34")
1351 (version "1.1.0")
1352 (source
1353 (origin
1354 (method url-fetch)
1355 (uri (pypi-uri "enum34" version))
1356 (sha256
1357 (base32
1358 "0yx1m4564wxgbm4glb3457hi16xihd9w63rv13y2przkdir9dfgp"))))
1359 (build-system python-build-system)
1360 (arguments
1361 `(#:phases
1362 (alist-replace
1363 'check
1364 (lambda _ (zero? (system* "python" "enum/test_enum.py")))
1365 %standard-phases)))
1366 (home-page "https://pypi.python.org/pypi/enum34")
1367 (synopsis "Backported Python 3.4 Enum")
1368 (description
1369 "Enum34 is the new Python stdlib enum module available in Python 3.4
1370 backported for previous versions of Python from 2.4 to 3.3.")
1371 (license license:bsd-3)))
1372
1373 (define-public python2-enum34
1374 (package-with-python2 python-enum34))
1375
1376 (define-public python-parse-type
1377 (package
1378 (name "python-parse-type")
1379 (version "0.3.4")
1380 (source
1381 (origin
1382 (method url-fetch)
1383 (uri (string-append "https://pypi.python.org/packages/source/p/"
1384 "parse_type/parse_type-" version ".tar.gz"))
1385 (sha256
1386 (base32
1387 "0iv1c34npr4iynwpgv1vkjx9rjd18a85ir8c01gc5f7wp8iv7l1x"))))
1388 (build-system python-build-system)
1389 (inputs
1390 `(("python-setuptools" ,python-setuptools)
1391 ("python-six" ,python-six)
1392 ("python-parse" ,python-parse)))
1393 (arguments '(#:tests? #f)) ;TODO: tests require pytest
1394 (home-page "https://github.com/jenisys/parse_type")
1395 (synopsis "Extended parse module")
1396 (description
1397 "Parse_type extends the python parse module.")
1398 (license license:bsd-3)))
1399
1400 (define-public python-parse
1401 (package
1402 (name "python-parse")
1403 (version "1.6.6")
1404 (source
1405 (origin
1406 (method url-fetch)
1407 (uri (pypi-uri "parse" version))
1408 (sha256
1409 (base32
1410 "0y31i3mwgv35qn0kzzjn9q8jqfdqmbi6sr6yfvn8rq4lqjm5lhvi"))))
1411 (build-system python-build-system)
1412 (arguments
1413 `(#:phases
1414 (alist-replace
1415 'check
1416 (lambda _ (zero? (system* "python" "test_parse.py")))
1417 %standard-phases)))
1418 (home-page "https://github.com/r1chardj0n3s/parse")
1419 (synopsis "Parse strings")
1420 (description
1421 "Parse strings using a specification based on the Python format()
1422 syntax.")
1423 (license license:x11)))
1424
1425
1426 (define-public scons
1427 (package
1428 (name "scons")
1429 (version "2.3.4")
1430 (source (origin
1431 (method url-fetch)
1432 (uri (string-append "mirror://sourceforge/scons/scons/" version
1433 "/scons-" version ".tar.gz"))
1434 (sha256
1435 (base32
1436 "0hdlci43wjz8maryj83mz04ir6rwcdrrzpd7cpzvdlzycqhdfmsb"))))
1437 (build-system python-build-system)
1438 (arguments
1439 ;; With Python 3.x, fails to build with a syntax error.
1440 `(#:python ,python-2
1441 #:tests? #f)) ; no 'python setup.py test' command
1442 (home-page "http://scons.org/")
1443 (synopsis "Software construction tool written in Python")
1444 (description
1445 "SCons is a software construction tool. Think of SCons as an improved,
1446 cross-platform substitute for the classic Make utility with integrated
1447 functionality similar to autoconf/automake and compiler caches such as ccache.
1448 In short, SCons is an easier, more reliable and faster way to build
1449 software.")
1450 (license license:x11)))
1451
1452 (define-public python-extras
1453 (package
1454 (name "python-extras")
1455 (version "0.0.3")
1456 (source
1457 (origin
1458 (method url-fetch)
1459 (uri (string-append
1460 "https://pypi.python.org/packages/source/e/extras/extras-"
1461 version ".tar.gz"))
1462 (sha256
1463 (base32
1464 "1h7zx4dfyclalg0fqnfjijpn0f793a9mx8sy3b27gd31nr6dhq3s"))))
1465 (build-system python-build-system)
1466 (inputs
1467 `(("python-setuptools" ,python-setuptools)))
1468 (arguments
1469 ;; error in setup.cfg: command 'test' has no such option 'buffer'
1470 '(#:tests? #f))
1471 (home-page "https://github.com/testing-cabal/extras")
1472 (synopsis "Useful extensions to the Python standard library")
1473 (description
1474 "Extras is a set of extensions to the Python standard library.")
1475 (license license:expat)))
1476
1477 (define-public python2-extras
1478 (package-with-python2 python-extras))
1479
1480 (define-public python-mimeparse
1481 (package
1482 (name "python-mimeparse")
1483 (version "0.1.4")
1484 (source
1485 (origin
1486 (method url-fetch)
1487 (uri (string-append
1488 "https://pypi.python.org/packages/source/p/python-mimeparse/python-mimeparse-"
1489 version ".tar.gz"))
1490 (sha256
1491 (base32
1492 "1hyxg09kaj02ri0rmwjqi86wk4nd1akvv7n0dx77azz76wga4s9w"))))
1493 (build-system python-build-system)
1494 (inputs
1495 `(("python-setuptools" ,python-setuptools)))
1496 (arguments
1497 '(#:tests? #f)) ; no setup.py test command
1498 (home-page
1499 "https://github.com/dbtsai/python-mimeparse")
1500 (synopsis "Python library for parsing MIME types")
1501 (description
1502 "Mimeparse provides basic functions for parsing MIME type names and
1503 matching them against a list of media-ranges.")
1504 (license license:expat)))
1505
1506 (define-public python2-mimeparse
1507 (package-with-python2 python-mimeparse))
1508
1509 (define-public python-nose
1510 (package
1511 (name "python-nose")
1512 (version "1.3.7")
1513 (source
1514 (origin
1515 (method url-fetch)
1516 (uri (pypi-uri "nose" version))
1517 (sha256
1518 (base32
1519 "164a43k7k2wsqqk1s6vavcdamvss4mz0vd6pwzv2h9n8rgwzxgzi"))))
1520 (build-system python-build-system)
1521 (inputs
1522 `(("python-setuptools" ,python-setuptools)))
1523 (arguments
1524 '(#:tests? #f)) ; FIXME: test suite fails
1525 (home-page "http://readthedocs.org/docs/nose/")
1526 (synopsis "Python testing library")
1527 (description
1528 "Nose extends the unittest library to make testing easier.")
1529 (license license:lgpl2.0+)))
1530
1531 (define-public python2-nose
1532 (package-with-python2 python-nose))
1533
1534 (define-public python-nose2
1535 (package
1536 (name "python-nose2")
1537 (version "0.6.5")
1538 (source
1539 (origin
1540 (method url-fetch)
1541 (uri (pypi-uri "nose2" version))
1542 (sha256
1543 (base32
1544 "1x4zjq1zlyrh8b9ba0cmafd3w94pxhid408kibyjd3s6h1lap6s7"))))
1545 (build-system python-build-system)
1546 (arguments `(#:tests? #f)) ; 'module' object has no attribute 'collector'
1547 (native-inputs
1548 `(("python-setuptools" ,python-setuptools)))
1549 (inputs
1550 `(("python-cov-core" ,python-cov-core)
1551 ("python-pytest-cov" ,python-pytest-cov)
1552 ("python-six" ,python-six)))
1553 (home-page "https://github.com/nose-devs/nose2")
1554 (synopsis "Next generation of nicer testing for Python")
1555 (description
1556 "Nose2 is the next generation of nicer testing for Python, based on the
1557 plugins branch of unittest2. Nose2 aims to improve on nose by providing a
1558 better plugin api, being easier for users to configure, and simplifying internal
1559 interfaces and processes.")
1560 (license license:bsd-2)))
1561
1562 (define-public python2-nose2
1563 (package-with-python2 python-nose2))
1564
1565 (define-public python-unittest2
1566 (package
1567 (name "python-unittest2")
1568 (version "0.5.1")
1569 (source
1570 (origin
1571 (method url-fetch)
1572 (uri (string-append
1573 "https://pypi.python.org/packages/source/u/unittest2py3k/unittest2py3k-"
1574 version ".tar.gz"))
1575 (sha256
1576 (base32
1577 "00yl6lskygcrddx5zspkhr0ibgvpknl4678kkm6s626539grq93q"))))
1578 (build-system python-build-system)
1579 (inputs
1580 `(("python-setuptools" ,python-setuptools)))
1581 (home-page "http://pypi.python.org/pypi/unittest2")
1582 (synopsis "Python unit testing library")
1583 (description
1584 "Unittest2 is a replacement for the unittest module in the Python
1585 standard library.")
1586 (license license:psfl)))
1587
1588 (define-public python2-unittest2
1589 (package (inherit python-unittest2)
1590 (name "python2-unittest2")
1591 (version "0.5.1")
1592 (source
1593 (origin
1594 (method url-fetch)
1595 (uri (string-append
1596 "https://pypi.python.org/packages/source/u/unittest2/unittest2-"
1597 version ".tar.gz"))
1598 (sha256
1599 (base32
1600 "0wbs4i4x3x7klr3v35ss6p9mcqz883i1xgcpkhvl7n2lyv6yhpda"))))
1601 (inputs
1602 `(("python2-setuptools" ,python2-setuptools)))
1603 (arguments
1604 `(#:python ,python-2
1605 #:tests? #f)))) ; no setup.py test command
1606
1607 (define-public python-py
1608 (package
1609 (name "python-py")
1610 (version "1.4.31")
1611 (source
1612 (origin
1613 (method url-fetch)
1614 (uri (pypi-uri "py" version))
1615 (sha256
1616 (base32
1617 "0561gz2w3i825gyl42mcq14y3dcgkapfiv5zv9a2bz15qxiijl56"))))
1618 (build-system python-build-system)
1619 (inputs
1620 `(("python-setuptools" ,python-setuptools)))
1621 (home-page "http://pylib.readthedocs.org/")
1622 (synopsis "Python library for parsing, I/O, instrospection, and logging")
1623 (description
1624 "Py is a Python library for file name parsing, .ini file parsing, I/O,
1625 code introspection, and logging.")
1626 (license license:expat)))
1627
1628 (define-public python2-py
1629 (package-with-python2 python-py))
1630
1631 (define-public python-pytest
1632 (package
1633 (name "python-pytest")
1634 (version "2.7.3")
1635 (source
1636 (origin
1637 (method url-fetch)
1638 (uri (string-append
1639 "https://pypi.python.org/packages/source/p/pytest/pytest-"
1640 version ".tar.gz"))
1641 (sha256
1642 (base32
1643 "1z4yi986f9n0p8qmzmn21m21m8j1x78hk3505f89baqm6pdw7afm"))
1644 (modules '((guix build utils)))
1645 (snippet
1646 ;; One of the tests involves the /usr directory, so it fails.
1647 '(substitute* "testing/test_argcomplete.py"
1648 (("def test_remove_dir_prefix\\(self\\):")
1649 "@pytest.mark.xfail\n def test_remove_dir_prefix(self):")))))
1650 (build-system python-build-system)
1651 (inputs
1652 `(("python-setuptools" ,python-setuptools)
1653 ("python-py" ,python-py)
1654 ("python-nose" ,python-nose)
1655 ("python-mock" ,python-mock)))
1656 (home-page "http://pytest.org")
1657 (synopsis "Python testing library")
1658 (description
1659 "Pytest is a testing tool that provides auto-discovery of test modules
1660 and functions, detailed info on failing assert statements, modular fixtures,
1661 and many external plugins.")
1662 (license license:expat)))
1663
1664 (define-public python2-pytest
1665 (package-with-python2 python-pytest))
1666
1667 (define-public python-pytest-cov
1668 (package
1669 (name "python-pytest-cov")
1670 (version "2.2.1")
1671 (source
1672 (origin
1673 (method url-fetch)
1674 (uri (pypi-uri "pytest-cov" version))
1675 (sha256
1676 (base32
1677 "1yl4nbhzfgsxqlsyk4clafgp9x11zvgrkprm9i2p3fgkwx9jxcm8"))))
1678 (build-system python-build-system)
1679 (inputs
1680 `(("python-coverage" ,python-coverage)
1681 ("python-pytest" ,python-pytest)))
1682 (home-page "https://github.com/pytest-dev/pytest-cov")
1683 (synopsis "Pytest plugin for measuring coverage")
1684 (description
1685 "Pytest-cov produces coverage reports. It supports centralised testing and
1686 distributed testing in both @code{load} and @code{each} modes. It also
1687 supports coverage of subprocesses.")
1688 (license license:expat)
1689 (properties `((python2-variant . ,(delay python2-pytest-cov))))))
1690
1691 (define-public python2-pytest-cov
1692 (let ((base (package-with-python2 (strip-python2-variant python-pytest-cov))))
1693 (package
1694 (inherit base)
1695 (inputs `(("python2-setuptools" ,python2-setuptools)
1696 ,@(package-inputs base))))))
1697
1698 (define-public python-pytest-runner
1699 (package
1700 (name "python-pytest-runner")
1701 (version "2.6.2")
1702 (source
1703 (origin
1704 (method url-fetch)
1705 (uri (pypi-uri "pytest-runner" version))
1706 (sha256
1707 (base32
1708 "1nwcqx0l3fv52kv8526wy8ypzghbq96c96di318d98d3wh7a8xg7"))))
1709 (build-system python-build-system)
1710 (arguments
1711 `(#:phases
1712 (modify-phases %standard-phases
1713 ;; The fancy way of setting the version with setuptools_scm does not
1714 ;; seem to work here.
1715 (add-after 'unpack 'set-version
1716 (lambda _
1717 (substitute* "docs/conf.py"
1718 (("version = setuptools_scm\\.get_version\\(root='\\.\\.')")
1719 (string-append "version = \"" ,version "\"")))
1720 #t)))))
1721 (native-inputs
1722 `(("python-pytest" ,python-pytest)
1723 ("python-setuptools-scm" ,python-setuptools-scm)))
1724 (home-page "https://github.com/pytest-dev/pytest-runner")
1725 (synopsis "Invoke py.test as a distutils command")
1726 (description
1727 "This package provides a @command{pytest-runner} command that
1728 @file{setup.py} files can use to run tests.")
1729 (license license:expat)
1730 (properties `((python2-variant . ,(delay python2-pytest-runner))))))
1731
1732 (define-public python2-pytest-runner
1733 (let ((base (package-with-python2
1734 (strip-python2-variant python-pytest-runner))))
1735 (package
1736 (inherit base)
1737 (native-inputs `(("python2-setuptools" ,python2-setuptools)
1738 ,@(package-native-inputs base))))))
1739
1740 (define-public python-pytest-mock
1741 (package
1742 (name "python-pytest-mock")
1743 (version "1.2")
1744 (source
1745 (origin
1746 (method url-fetch)
1747 (uri (pypi-uri "pytest-mock" version ".zip"))
1748 (sha256
1749 (base32
1750 "03zxar5drzm7ksqyrwypjaza3cri6wqvpr6iam92djvg6znp32gp"))))
1751 (build-system python-build-system)
1752 (native-inputs
1753 `(("unzip" ,unzip)))
1754 (inputs
1755 `(("python-py" ,python-py)
1756 ("python-pytest" ,python-pytest)))
1757 (home-page "https://github.com/pytest-dev/pytest-mock/")
1758 (synopsis "Thin-wrapper around the mock package for easier use with py.test")
1759 (description
1760 "This plugin installs a @code{mocker} fixture which is a thin-wrapper
1761 around the patching API provided by the @code{mock} package, but with the
1762 benefit of not having to worry about undoing patches at the end of a test.
1763 The mocker fixture has the same API as @code{mock.patch}, supporting the
1764 same arguments.")
1765 (properties `((python2-variant . ,(delay python2-pytest-mock))))
1766 (license license:expat)))
1767
1768 (define-public python2-pytest-mock
1769 (let ((base (package-with-python2
1770 (strip-python2-variant python-pytest-mock))))
1771 (package (inherit base)
1772 (native-inputs
1773 `(("python2-setuptools" ,python2-setuptools)
1774 ,@(package-native-inputs base)))
1775 (inputs
1776 `(("python2-mock" ,python2-mock)
1777 ,@(package-inputs base))))))
1778
1779 (define-public python-pytest-xdist
1780 (package
1781 (name "python-pytest-xdist")
1782 (version "1.14")
1783 (source
1784 (origin
1785 (method url-fetch)
1786 (uri (pypi-uri "pytest-xdist" version ".zip"))
1787 (sha256
1788 (base32
1789 "08rn2l39ds60xshs4js787l84pfckksqklfq2wq9x8ig2aci2pja"))
1790 (modules '((guix build utils)))
1791 (snippet
1792 '(begin
1793 ;; Remove pre-compiled .pyc files from source.
1794 (for-each delete-file-recursively
1795 (find-files "." "__pycache__" #:directories? #t))
1796 (for-each delete-file (find-files "." "\\.pyc$"))
1797 #t))))
1798 (build-system python-build-system)
1799 (native-inputs
1800 `(("unzip" ,unzip)
1801 ("python-setuptools-scm" ,python-setuptools-scm)))
1802 (inputs
1803 `(("python-apipkg" ,python-apipkg)
1804 ("python-execnet" ,python-execnet)
1805 ("python-pytest" ,python-pytest)
1806 ("python-py" ,python-py)))
1807 (home-page
1808 "https://github.com/pytest-dev/pytest-xdist")
1809 (synopsis
1810 "Plugin for py.test with distributed testing and loop-on-failing modes")
1811 (description
1812 "The pytest-xdist plugin extends py.test with some unique test execution
1813 modes: parallelization, running tests in boxed subprocesses, the ability
1814 to run tests repeatedly when failed, and the ability to run tests on multiple
1815 Python interpreters or platforms. It uses rsync to copy the existing
1816 program code to a remote location, executes there, and then syncs the
1817 result back.")
1818 (license license:expat)
1819 (properties `((python2-variant . ,(delay python2-pytest-xdist))))))
1820
1821 (define-public python2-pytest-xdist
1822 (let ((base (package-with-python2
1823 (strip-python2-variant python-pytest-xdist))))
1824 (package
1825 (inherit base)
1826 (native-inputs `(("python2-setuptools" ,python2-setuptools)
1827 ,@(package-native-inputs base))))))
1828
1829 (define-public python-scripttest
1830 (package
1831 (name "python-scripttest")
1832 (version "1.3")
1833 (source
1834 (origin
1835 (method url-fetch)
1836 (uri (string-append
1837 "https://pypi.python.org/packages/source/s/scripttest/scripttest-"
1838 version ".tar.gz"))
1839 (sha256
1840 (base32
1841 "0f4w84k8ck82syys7yg9maz93mqzc8p5ymis941x034v44jzq74m"))))
1842 (build-system python-build-system)
1843 (inputs
1844 `(("python-setuptools" ,python-setuptools)
1845 ("python-pytest" ,python-pytest)))
1846 (home-page "http://pythonpaste.org/scripttest/")
1847 (synopsis "Python library to test command-line scripts")
1848 (description "Scripttest is a Python helper library for testing
1849 interactive command-line applications. With it you can run a script in a
1850 subprocess and see the output as well as any file modifications.")
1851 (license license:expat)))
1852
1853 (define-public python2-scripttest
1854 (package-with-python2 python-scripttest))
1855
1856 (define-public python-testtools
1857 (package
1858 (name "python-testtools")
1859 (version "1.0.0")
1860 (source
1861 (origin
1862 (method url-fetch)
1863 (uri (string-append
1864 "https://pypi.python.org/packages/source/t/testtools/testtools-"
1865 version ".tar.gz"))
1866 (sha256
1867 (base32
1868 "1dyml28ykpl5jb9khdmcdvhy1cxqingys6qvj2k04fzlaj6z3bbx"))))
1869 (build-system python-build-system)
1870 (propagated-inputs
1871 `(("python-mimeparse" ,python-mimeparse)))
1872 (inputs
1873 `(("python-setuptools" ,python-setuptools)
1874 ("python-extras" ,python-extras)))
1875 (home-page "https://github.com/testing-cabal/testtools")
1876 (synopsis
1877 "Extensions to the Python standard library unit testing framework")
1878 (description
1879 "Testtools extends the Python standard library unit testing framework to
1880 provide matchers, more debugging information, and cross-Python
1881 compatibility.")
1882 (license license:psfl)))
1883
1884 (define-public python2-testtools
1885 (package-with-python2 python-testtools))
1886
1887 (define-public python-testscenarios
1888 (package
1889 (name "python-testscenarios")
1890 (version "0.4")
1891 (source
1892 (origin
1893 (method url-fetch)
1894 (uri (string-append
1895 "https://pypi.python.org/packages/source/t/testscenarios/testscenarios-"
1896 version ".tar.gz"))
1897 (sha256
1898 (base32
1899 "1671jvrvqlmbnc42j7pc5y6vc37q44aiwrq0zic652pxyy2fxvjg"))))
1900 (build-system python-build-system)
1901 (inputs
1902 `(("python-setuptools" ,python-setuptools)
1903 ("python-testtools" ,python-testtools)
1904 ("python-mimeparse" ,python-mimeparse)))
1905 (home-page "https://launchpad.net/testscenarios")
1906 (synopsis "Pyunit extension for dependency injection")
1907 (description
1908 "Testscenarios provides clean dependency injection for Python unittest
1909 style tests.")
1910 (license (list license:bsd-3 license:asl2.0)))) ; at the user's option
1911
1912 (define-public python2-testscenarios
1913 (package-with-python2 python-testscenarios))
1914
1915 (define-public python-testresources
1916 (package
1917 (name "python-testresources")
1918 (version "0.2.7")
1919 (source
1920 (origin
1921 (method url-fetch)
1922 (uri (string-append
1923 "https://pypi.python.org/packages/source/t/testresources/testresources-"
1924 version ".tar.gz"))
1925 (sha256
1926 (base32
1927 "0cbj3plbllyz42c4b5xxgwaa7mml54lakslrn4kkhinxhdri22md"))))
1928 (build-system python-build-system)
1929 (inputs
1930 `(("python-setuptools" ,python-setuptools)))
1931 (home-page "https://launchpad.net/testresources")
1932 (synopsis
1933 "Pyunit extension for managing test resources")
1934 (description
1935 "Testresources is an extension to Python's unittest to allow declarative
1936 use of resources by test cases.")
1937 (license (list license:bsd-3 license:asl2.0)))) ; at the user's option
1938
1939 (define-public python2-testresources
1940 (package-with-python2 python-testresources))
1941
1942 (define-public python-subunit
1943 (package
1944 (name "python-subunit")
1945 (version "0.0.21")
1946 (source
1947 (origin
1948 (method url-fetch)
1949 (uri (string-append
1950 "https://pypi.python.org/packages/source/p/python-subunit/python-subunit-"
1951 version ".tar.gz"))
1952 (sha256
1953 (base32
1954 "1nkw9wfbvizmpajbj3in8ns07g7lwkiv8hip14jjlwk3cacls6jv"))))
1955 (build-system python-build-system)
1956 (inputs
1957 `(("python-setuptools" ,python-setuptools)
1958 ("python-testtools" ,python-testtools)
1959 ("python-mimeparse" ,python-mimeparse)
1960 ("python-testscenarios" ,python-testscenarios)))
1961 (home-page "http://launchpad.net/subunit")
1962 (synopsis "Python implementation of the subunit protocol")
1963 (description
1964 "Python-subunit is a Python implementation of the subunit test streaming
1965 protocol.")
1966 (license (list license:bsd-3 license:asl2.0)))) ; at the user's option
1967
1968 (define-public python2-subunit
1969 (package-with-python2 python-subunit))
1970
1971 ;; Recent versions of python-fixtures need a recent version of python-pbr,
1972 ;; which needs a recent version of python-fixtures. To fix this circular
1973 ;; dependency, we keep old versions of python-fixtures and python-pbr to
1974 ;; bootstrap the whole thing:
1975 ;; - python-fixtures-0.3.16 is used to build python-pbr-0.11
1976 ;; - python-pbr-0.11 is used to build python-fixtures
1977 ;; - python-fixtures is used to build python-pbr
1978 (define-public python-fixtures-0.3.16
1979 (package
1980 (name "python-fixtures")
1981 (version "0.3.16")
1982 (source
1983 (origin
1984 (method url-fetch)
1985 (uri (string-append
1986 "https://pypi.python.org/packages/source/f/fixtures/fixtures-"
1987 version ".tar.gz"))
1988 (sha256
1989 (base32
1990 "0x9r2gwilcig5g54k60bxzg96zabizq1855lrprlb4zckalp9asc"))))
1991 (build-system python-build-system)
1992 (inputs
1993 `(("python-setuptools" ,python-setuptools)))
1994 (arguments
1995 '(#:tests? #f)) ; no setup.py test command
1996 (home-page "https://launchpad.net/python-fixtures")
1997 (synopsis "Python test fixture library")
1998 (description
1999 "Fixtures provides a way to create reusable state, useful when writing
2000 Python tests.")
2001 (license (list license:bsd-3 license:asl2.0)))) ; at user's option
2002
2003 (define-public python2-fixtures-0.3.16
2004 (package-with-python2 python-fixtures-0.3.16))
2005
2006 (define-public python-pbr-0.11
2007 (package
2008 (name "python-pbr")
2009 (version "0.11.0")
2010 (source
2011 (origin
2012 (method url-fetch)
2013 (uri (string-append
2014 "https://pypi.python.org/packages/source/p/pbr/pbr-"
2015 version ".tar.gz"))
2016 (sha256
2017 (base32
2018 "0v9gb7gyqf7q9s99l0nnjj9ww9b0jvyqlwm4d56pcyinxydddw6p"))))
2019 (build-system python-build-system)
2020 (arguments
2021 `(#:tests? #f)) ;; Most tests seem to use the Internet.
2022 (inputs
2023 `(("python-fixtures-0.3.16" ,python-fixtures-0.3.16)
2024 ("python-pip" ,python-pip)
2025 ("python-setuptools" ,python-setuptools)))
2026 (home-page "https://launchpad.net/pbr")
2027 (synopsis "Change the default behavior of Python’s setuptools")
2028 (description
2029 "Python Build Reasonableness (PBR) is a library that injects some useful
2030 and sensible default behaviors into your setuptools run.")
2031 (license license:asl2.0)))
2032
2033 (define-public python2-pbr-0.11
2034 (package-with-python2 python-pbr-0.11))
2035
2036 (define-public python-pbr
2037 (package
2038 (name "python-pbr")
2039 (version "1.8.1")
2040 (source
2041 (origin
2042 (method url-fetch)
2043 (uri (string-append
2044 "https://pypi.python.org/packages/source/p/pbr/pbr-"
2045 version
2046 ".tar.gz"))
2047 (sha256
2048 (base32
2049 "0jcny36cf3s8ar5r4a575npz080hndnrfs4np1fqhv0ym4k7c4p2"))))
2050 (build-system python-build-system)
2051 (arguments
2052 `(#:tests? #f)) ;; Most tests seem to use the Internet.
2053 (propagated-inputs
2054 `(("python-testrepository" ,python-testrepository)
2055 ("git" ,git))) ;; pbr actually uses the "git" binary.
2056 (inputs
2057 `(("python-fixtures" ,python-fixtures)
2058 ("python-mimeparse" ,python-mimeparse)
2059 ("python-mock" ,python-mock)
2060 ("python-setuptools" ,python-setuptools)
2061 ("python-six" ,python-six)
2062 ("python-sphinx" ,python-sphinx)
2063 ("python-testrepository" ,python-testrepository)
2064 ("python-testresources" ,python-testresources)
2065 ("python-testscenarios" ,python-testscenarios)
2066 ("python-testtools" ,python-testtools)
2067 ("python-virtualenv" ,python-virtualenv)))
2068 (home-page "https://launchpad.net/pbr")
2069 (synopsis "Change the default behavior of Python’s setuptools")
2070 (description
2071 "Python Build Reasonableness (PBR) is a library that injects some useful
2072 and sensible default behaviors into your setuptools run.")
2073 (license license:asl2.0)))
2074
2075 (define-public python2-pbr
2076 (package-with-python2 python-pbr))
2077
2078 (define-public python-fixtures
2079 (package
2080 (name "python-fixtures")
2081 (version "1.4.0")
2082 (source
2083 (origin
2084 (method url-fetch)
2085 (uri (pypi-uri "fixtures" version))
2086 (sha256
2087 (base32
2088 "0djxvdwm8s60dbfn7bhf40x6g818p3b3mlwijm1c3bqg7msn271y"))))
2089 (build-system python-build-system)
2090 (propagated-inputs
2091 `(("python-six" ,python-six)
2092 ("python-pbr-0.11" ,python-pbr-0.11)))
2093 (inputs
2094 `(("python-pip" ,python-pip)
2095 ("python-setuptools" ,python-setuptools)
2096 ;; Tests
2097 ("python-testtools" ,python-testtools)))
2098 (arguments
2099 '(#:tests? #f)) ; no setup.py test command
2100 (home-page "https://launchpad.net/python-fixtures")
2101 (synopsis "Python test fixture library")
2102 (description
2103 "Fixtures provides a way to create reusable state, useful when writing
2104 Python tests.")
2105 (license (list license:bsd-3 license:asl2.0)))) ; at user's option
2106
2107 (define-public python2-fixtures
2108 (package-with-python2 python-fixtures))
2109
2110 (define-public python-testrepository
2111 (package
2112 (name "python-testrepository")
2113 (version "0.0.20")
2114 (source
2115 (origin
2116 (method url-fetch)
2117 (uri (string-append
2118 "https://pypi.python.org/packages/source/t/testrepository/testrepository-"
2119 version ".tar.gz"))
2120 (sha256
2121 (base32
2122 "1ssqb07c277010i6gzzkbdd46gd9mrj0bi0i8vn560n2k2y4j93m"))))
2123 (build-system python-build-system)
2124 (propagated-inputs
2125 `(("python-fixtures-0.3.16" ,python-fixtures-0.3.16)
2126 ("python-testtools" ,python-testtools)))
2127 (inputs
2128 `(("python-setuptools" ,python-setuptools)
2129 ("python-subunit" ,python-subunit)
2130 ("python-mimeparse" ,python-mimeparse)))
2131 (home-page "https://launchpad.net/testrepository")
2132 (synopsis "Database for Python test results")
2133 (description "Testrepository provides a database of test results which can
2134 be used as part of a developer's workflow to check things such as what tests
2135 have failed since the last commit or what tests are currently failing.")
2136 (license (list license:bsd-3 license:asl2.0)))) ; at user's option
2137
2138 (define-public python2-testrepository
2139 (package-with-python2 python-testrepository))
2140
2141 (define-public python-coverage
2142 (package
2143 (name "python-coverage")
2144 (version "4.1")
2145 (source
2146 (origin
2147 (method url-fetch)
2148 (uri (pypi-uri "coverage" version))
2149 (sha256
2150 (base32
2151 "01rbr4br4lsk0lwn8fb96zwd2xr4f0mg1w7iq3j11i8f5ig2nqs1"))))
2152 (build-system python-build-system)
2153 (inputs
2154 `(("python-setuptools" ,python-setuptools)))
2155 (home-page "http://nedbatchelder.com/code/coverage")
2156 (synopsis "Code coverage measurement for Python")
2157 (description
2158 "Coverage measures code coverage, typically during test execution. It
2159 uses the code analysis tools and tracing hooks provided in the Python standard
2160 library to determine which lines are executable, and which have been
2161 executed.")
2162 (license license:bsd-3)))
2163
2164 (define-public python2-coverage
2165 (package-with-python2 python-coverage))
2166
2167 (define-public python-cov-core
2168 (package
2169 (name "python-cov-core")
2170 (version "1.15.0")
2171 (source
2172 (origin
2173 (method url-fetch)
2174 (uri (pypi-uri "cov-core" version))
2175 (sha256
2176 (base32
2177 "0k3np9ymh06yv1ib96sb6wfsxjkqhmik8qfsn119vnhga9ywc52a"))))
2178 (build-system python-build-system)
2179 (native-inputs
2180 `(("python-coverage" ,python-coverage)))
2181 (home-page "https://github.com/schlamar/cov-core")
2182 (synopsis "plugin core for use by pytest-cov, nose-cov and nose2-cov")
2183 (description
2184 "This is a library package for use by pytest-cov, nose-cov and nose2-cov.
2185 It is useful for developing coverage plugins for these testing frameworks.")
2186 (license license:expat)
2187 (properties `((python2-variant . ,(delay python2-cov-core))))))
2188
2189 (define-public python2-cov-core
2190 (let ((cov-core (package-with-python2 (strip-python2-variant python-cov-core))))
2191 (package (inherit cov-core)
2192 (native-inputs
2193 `(("python2-setuptools" ,python2-setuptools)
2194 ,@(package-native-inputs cov-core))))))
2195
2196 (define-public python-discover
2197 (package
2198 (name "python-discover")
2199 (version "0.4.0")
2200 (source
2201 (origin
2202 (method url-fetch)
2203 (uri (string-append
2204 "https://pypi.python.org/packages/source/d/discover/discover-"
2205 version ".tar.gz"))
2206 (sha256
2207 (base32
2208 "0y8d0zwiqar51kxj8lzmkvwc3b8kazb04gk5zcb4nzg5k68zmhq5"))))
2209 (build-system python-build-system)
2210 (inputs
2211 `(("python-setuptools" ,python-setuptools)))
2212 (home-page "http://pypi.python.org/pypi/discover/")
2213 (synopsis
2214 "Python test discovery for unittest")
2215 (description
2216 "Discover provides test discovery for unittest, a feature that has been
2217 backported from Python 2.7 for Python 2.4+.")
2218 (license license:bsd-3)))
2219
2220 (define-public python2-discover
2221 (package-with-python2 python-discover))
2222
2223 (define-public behave
2224 (package
2225 (name "behave")
2226 (version "1.2.5")
2227 (source (origin
2228 (method url-fetch)
2229 (uri (pypi-uri "behave" version ".tar.bz2"))
2230 (sha256
2231 (base32
2232 "1iypp6z46r19n4xmgx6m1lwmlpfjh8vapq8izigrqlaarvp2y64c"))))
2233 (build-system python-build-system)
2234 (inputs
2235 `(("python-setuptools" ,python-setuptools)
2236 ("python-six" ,python-six)
2237 ("python-parse" ,python-parse)
2238 ("python-parse-type" ,python-parse-type)))
2239 (arguments `(#:tests? #f)) ;TODO: tests require nose>=1.3 and
2240 ;PyHamcrest>=1.8
2241 (home-page "http://github.com/behave/behave")
2242 (synopsis "Python behavior-driven development")
2243 (description
2244 "Behave is a tool for behavior-driven development in python.
2245 Behavior-driven development (or BDD) is an agile software development
2246 technique that encourages collaboration between developers, QA and
2247 non-technical or business participants in a software project. Behave uses
2248 tests written in a natural language style, backed up by Python code.")
2249 (license license:x11)))
2250
2251 (define-public python-exif-read
2252 (package
2253 (name "python-exif-read")
2254 (version "2.1.2")
2255 (source (origin
2256 (method url-fetch)
2257 (uri (pypi-uri "ExifRead" version))
2258 (sha256
2259 (base32
2260 "1b90jf6m9vxh9nanhpyvqdq7hmfx5iggw1l8kq10jrs6xgr49qkr"))))
2261 (build-system python-build-system)
2262 (inputs
2263 `(("python-setuptools" ,python-setuptools)))
2264 (arguments `(#:tests? #f)) ; no tests
2265 (home-page "https://github.com/ianare/exif-py")
2266 (synopsis "Python library to extract EXIF data from image files")
2267 (description
2268 "ExifRead is a Python library to extract EXIF data from tiff and jpeg
2269 files.")
2270 (license license:bsd-3)))
2271
2272 (define-public python2-exif-read
2273 (package-with-python2 python-exif-read))
2274
2275 (define-public python-pyld
2276 (package
2277 (name "python-pyld")
2278 (version "0.6.8")
2279 (source (origin
2280 (method url-fetch)
2281 (uri (pypi-uri "PyLD" version))
2282 (sha256
2283 (base32
2284 "0k881ffazpf8q1z8862g4bb3pzwpnz9whrci2mf311mvn1qbyqad"))))
2285 (build-system python-build-system)
2286 (inputs
2287 `(("python-setuptools" ,python-setuptools)))
2288 (arguments `(#:tests? #f)) ; no tests
2289 (home-page "http://github.com/digitalbazaar/pyld")
2290 (synopsis "Python implementation of the JSON-LD specification")
2291 (description
2292 "PyLD is an implementation of the JSON-LD specification.")
2293 (license license:bsd-3)))
2294
2295 (define-public python2-pyld
2296 (package-with-python2 python-pyld))
2297
2298 (define-public python-certifi
2299 (package
2300 (name "python-certifi")
2301 (version "2015.11.20.1")
2302 (source (origin
2303 (method url-fetch)
2304 (uri (pypi-uri "certifi" version))
2305 (sha256
2306 (base32
2307 "05lgwf9rz1kn465azy2bpb3zmpnsn9gkypbhnjlclchv98ssgc1h"))))
2308 (build-system python-build-system)
2309 (inputs
2310 `(("python-setuptools" ,python-setuptools)))
2311 (arguments `(#:tests? #f)) ; no tests
2312 (home-page "http://python-requests.org/")
2313 (synopsis "Python CA certificate bundle")
2314 (description
2315 "Certifi is a Python library that contains a CA certificate bundle, which
2316 is used by the Requests library to verify HTTPS requests.")
2317 (license license:asl2.0)))
2318
2319 (define-public python2-certifi
2320 (package-with-python2 python-certifi))
2321
2322 (define-public python-click
2323 (package
2324 (name "python-click")
2325 (version "6.6")
2326 (source
2327 (origin
2328 (method url-fetch)
2329 (uri (pypi-uri "click" version))
2330 (sha256
2331 (base32
2332 "1sggipyz52crrybwbr9xvwxd4aqigvplf53k9w3ygxmzivd1jsnc"))))
2333 (build-system python-build-system)
2334 (arguments
2335 `(#:phases
2336 (modify-phases %standard-phases
2337 (add-after 'unpack 'fix-paths
2338 (lambda* (#:key inputs #:allow-other-keys)
2339 (let ((glibc (assoc-ref inputs ,(if (%current-target-system)
2340 "cross-libc" "libc"))))
2341 (substitute* "click/_unicodefun.py"
2342 (("'locale'")
2343 (string-append "'" glibc "/bin/locale'"))))
2344 #t)))))
2345 (native-inputs
2346 `(("python-setuptools" ,python-setuptools)))
2347 (home-page "http://click.pocoo.org")
2348 (synopsis "Command line library for Python")
2349 (description
2350 "Click is a Python package for creating command line interfaces in a
2351 composable way with as little code as necessary. Its name stands for
2352 \"Command Line Interface Creation Kit\". It's highly configurable but comes
2353 with sensible defaults out of the box.")
2354 (license license:bsd-3)))
2355
2356 (define-public python2-click
2357 (package-with-python2 python-click))
2358
2359 (define-public python-wheel
2360 (package
2361 (name "python-wheel")
2362 (version "0.29.0")
2363 (source
2364 (origin
2365 (method url-fetch)
2366 (uri (pypi-uri "wheel" version))
2367 (sha256
2368 (base32
2369 "0j0n38hg1jvrmyy68f9ikvzq1gs9g0sx4ws7maf8wi3bwbbqmfqy"))))
2370 (build-system python-build-system)
2371 (native-inputs
2372 `(("python-setuptools" ,python-setuptools)
2373 ("python-jsonschema" ,python-jsonschema)
2374 ("python-pytest-cov" ,python-pytest-cov)))
2375 (home-page "https://bitbucket.org/pypa/wheel/")
2376 (synopsis "Format for built Python packages")
2377 (description
2378 "A wheel is a ZIP-format archive with a specially formatted filename and
2379 the @code{.whl} extension. It is designed to contain all the files for a PEP
2380 376 compatible install in a way that is very close to the on-disk format. Many
2381 packages will be properly installed with only the @code{Unpack} step and the
2382 unpacked archive preserves enough information to @code{Spread} (copy data and
2383 scripts to their final locations) at any later time. Wheel files can be
2384 installed with a newer @code{pip} or with wheel's own command line utility.")
2385 (license license:expat)
2386 (properties `((python2-variant . ,(delay python2-wheel))))))
2387
2388 (define-public python2-wheel
2389 (let ((wheel (package-with-python2
2390 (strip-python2-variant python-wheel))))
2391 (package (inherit wheel)
2392 (native-inputs `(("python2-functools32" ,python2-functools32)
2393 ,@(package-native-inputs wheel))))))
2394
2395
2396 (define-public python-requests
2397 (package
2398 (name "python-requests")
2399 (version "2.9.1")
2400 (source (origin
2401 (method url-fetch)
2402 (uri (pypi-uri "requests" version))
2403 (sha256
2404 (base32
2405 "0zsqrzlybf25xscgi7ja4s48y2abf9wvjkn47wh984qgs1fq2xy5"))))
2406 (build-system python-build-system)
2407 (native-inputs
2408 `(("python-setuptools" ,python-setuptools)
2409 ("python-py" ,python-py)
2410 ("python-pytest" ,python-pytest)
2411 ("python-pytest-cov" ,python-pytest-cov)
2412 ("python-wheel" ,python-wheel)))
2413 (home-page "http://python-requests.org/")
2414 (synopsis "Python HTTP library")
2415 (description
2416 "Requests is a Python HTTP client library. It aims to be easier to use
2417 than Python’s urllib2 library.")
2418 (license license:asl2.0)))
2419
2420 ;; Some software requires an older version of Requests, notably Docker
2421 ;; Compose.
2422 (define-public python-requests-2.7
2423 (package (inherit python-requests)
2424 (version "2.7.0")
2425 (source (origin
2426 (method url-fetch)
2427 (uri (pypi-uri "requests" version))
2428 (sha256
2429 (base32
2430 "0gdr9dxm24amxpbyqpbh3lbwxc2i42hnqv50sigx568qssv3v2ir"))))))
2431
2432 (define-public python2-requests
2433 (package-with-python2 python-requests))
2434
2435 (define-public python-vcversioner
2436 (package
2437 (name "python-vcversioner")
2438 (version "2.14.0.0")
2439 (source
2440 (origin
2441 (method url-fetch)
2442 (uri (pypi-uri "vcversioner" version))
2443 (sha256
2444 (base32
2445 "11ivq1bm7v0yb4nsfbv9m7g7lyjn112gbvpjnjz8nv1fx633dm5c"))))
2446 (build-system python-build-system)
2447 (inputs
2448 `(("python-setuptools" ,python-setuptools)))
2449 (synopsis "Python library for version number discovery")
2450 (description "Vcversioner is a Python library that inspects tagging
2451 information in a variety of version control systems in order to discover
2452 version numbers.")
2453 (home-page "https://github.com/habnabit/vcversioner")
2454 (license license:isc)))
2455
2456 (define-public python2-vcversioner
2457 (package-with-python2 python-vcversioner))
2458
2459 (define-public python-jsonschema
2460 (package
2461 (name "python-jsonschema")
2462 (version "2.5.1")
2463 (source (origin
2464 (method url-fetch)
2465 (uri
2466 (string-append
2467 "https://pypi.python.org/packages/source/j/jsonschema/jsonschema-"
2468 version ".tar.gz"))
2469 (sha256
2470 (base32
2471 "0hddbqjm4jq63y8jf44nswina1crjs16l9snb6m3vvgyg31klrrn"))))
2472 (build-system python-build-system)
2473 (inputs
2474 `(("python-setuptools" ,python-setuptools)
2475 ("python-vcversioner" ,python-vcversioner)))
2476 (home-page "http://github.com/Julian/jsonschema")
2477 (synopsis "Implementation of JSON Schema for Python")
2478 (description
2479 "Jsonschema is an implementation of JSON Schema for Python.")
2480 (license license:expat)
2481 (properties `((python2-variant . ,(delay python2-jsonschema))))))
2482
2483 (define-public python2-jsonschema
2484 (let ((jsonschema (package-with-python2
2485 (strip-python2-variant python-jsonschema))))
2486 (package (inherit jsonschema)
2487 (inputs
2488 `(("python2-functools32" ,python2-functools32)
2489 ,@(package-inputs jsonschema))))))
2490
2491 (define-public python-unidecode
2492 (package
2493 (name "python-unidecode")
2494 (version "0.04.18")
2495 (source (origin
2496 (method url-fetch)
2497 (uri (pypi-uri "Unidecode" version))
2498 (sha256
2499 (base32
2500 "12hhblqy1ajvidm38im4171x4arg83pfmziyn53nizp29p3m14gi"))))
2501 (build-system python-build-system)
2502 (inputs
2503 `(("python-setuptools" ,python-setuptools)))
2504 (home-page "https://pypi.python.org/pypi/Unidecode")
2505 (synopsis "ASCII transliterations of Unicode text")
2506 (description
2507 "Unidecode provides ASCII transliterations of Unicode text. Unidecode is
2508 useful when integrating with legacy code that doesn't support Unicode, or for
2509 ease of entry of non-Roman names on a US keyboard, or when constructing ASCII
2510 machine identifiers from human-readable Unicode strings that should still be
2511 somewhat intelligeble.")
2512 (license license:gpl2+)))
2513
2514 (define-public python2-unidecode
2515 (package-with-python2 python-unidecode))
2516
2517 (define-public python-pyjwt
2518 (package
2519 (name "python-pyjwt")
2520 (version "1.4.0")
2521 (source
2522 (origin
2523 (method url-fetch)
2524 (uri (pypi-uri "PyJWT" version))
2525 (sha256
2526 (base32
2527 "1556v2jppd8mjkkj66pxb5rcazm35jq81r233mdl8hfmz9n3icp1"))))
2528 (build-system python-build-system)
2529 (native-inputs
2530 `(("python-setuptools" ,python-setuptools)
2531 ("python-pytest-runner" ,python-pytest-runner)))
2532 (arguments
2533 '(#:tests? #f)) ; test suite doesn't work
2534 (home-page "http://github.com/progrium/pyjwt")
2535 (synopsis "JSON Web Token implementation in Python")
2536 (description
2537 "PyJWT is a JSON Web Token implementation written in Python.")
2538 (license license:expat)))
2539
2540 (define-public python2-pyjwt
2541 (package-with-python2 python-pyjwt))
2542
2543 (define-public python-oauthlib
2544 (package
2545 (name "python-oauthlib")
2546 (version "1.0.3")
2547 (source (origin
2548 (method url-fetch)
2549 (uri (pypi-uri "oauthlib" version))
2550 (sha256
2551 (base32
2552 "1bfrj70vdjxjw74khbyh6f0dksv7p5rh2346jnlrffyacd3gwjzg"))))
2553 (build-system python-build-system)
2554 (native-inputs
2555 `(("python-coverage" ,python-coverage)
2556 ("python-nose" ,python-nose)
2557 ("python-mock" ,python-mock)))
2558 (inputs
2559 `(("python-blinker" ,python-blinker)
2560 ("python-cryptography" ,python-cryptography)
2561 ("python-pyjwt" ,python-pyjwt)))
2562 (home-page "https://github.com/idan/oauthlib")
2563 (synopsis "OAuth implementation for Python")
2564 (description
2565 "Oauthlib is a generic, spec-compliant, thorough implementation of the
2566 OAuth request-signing logic.")
2567 (license license:bsd-3)
2568 (properties `((python2-variant . ,(delay python2-oauthlib))))))
2569
2570 (define-public python2-oauthlib
2571 (let ((base (package-with-python2 (strip-python2-variant python-oauthlib))))
2572 (package
2573 (inherit base)
2574 (native-inputs `(("python2-setuptools" ,python2-setuptools)
2575 ("python2-unittest2" ,python2-unittest2)
2576 ,@(package-native-inputs base))))))
2577
2578 (define-public python-itsdangerous
2579 (package
2580 (name "python-itsdangerous")
2581 (version "0.24")
2582 (source
2583 (origin
2584 (method url-fetch)
2585 (uri (string-append
2586 "https://pypi.python.org/packages/source/i/itsdangerous/itsdangerous-"
2587 version ".tar.gz"))
2588 (sha256
2589 (base32
2590 "06856q6x675ly542ig0plbqcyab6ksfzijlyf1hzhgg3sgwgrcyb"))))
2591 (build-system python-build-system)
2592 (home-page "http://github.com/mitsuhiko/itsdangerous")
2593 (synopsis "Python library for passing data to/from untrusted environments")
2594 (description
2595 "Itsdangerous provides various helpers to pass trusted data to untrusted
2596 environments and back.")
2597 (license license:bsd-3)
2598 (properties `((python2-variant . ,(delay python2-itsdangerous))))))
2599
2600 (define-public python2-itsdangerous
2601 (let ((base (package-with-python2
2602 (strip-python2-variant python-itsdangerous))))
2603 (package
2604 (inherit base)
2605 (native-inputs `(("python2-setuptools" ,python2-setuptools)
2606 ,@(package-native-inputs base))))))
2607
2608 (define-public python-pyyaml
2609 (package
2610 (name "python-pyyaml")
2611 (version "3.11")
2612 (source
2613 (origin
2614 (method url-fetch)
2615 (uri (string-append
2616 "https://pypi.python.org/packages/source/P/PyYAML/PyYAML-"
2617 version ".tar.gz"))
2618 (sha256
2619 (base32
2620 "1s26125vfnskng58ym37xhwv8v0mm95b2cwbjfag8prfhy596v63"))))
2621 (build-system python-build-system)
2622 (inputs
2623 `(("libyaml" ,libyaml)))
2624 (native-inputs
2625 `(("python-setuptools" ,python-setuptools)))
2626 (home-page "http://pyyaml.org/wiki/PyYAML")
2627 (synopsis "YAML parser and emitter for Python")
2628 (description
2629 "PyYAML is a YAML parser and emitter for Python. PyYAML features a
2630 complete YAML 1.1 parser, Unicode support, pickle support, capable extension
2631 API, and sensible error messages. PyYAML supports standard YAML tags and
2632 provides Python-specific tags that allow to represent an arbitrary Python
2633 object.")
2634 (license license:expat)))
2635
2636 (define-public python2-pyyaml
2637 (package-with-python2 python-pyyaml))
2638
2639 (define-public python-virtualenv
2640 (package
2641 (name "python-virtualenv")
2642 (version "15.0.3")
2643 (source
2644 (origin
2645 (method url-fetch)
2646 (uri (pypi-uri "virtualenv" version))
2647 (sha256
2648 (base32
2649 "07cbajzk8l05k5zhlw0b9wbf2is65bl9v6zrn2a0iyn57w6pd73d"))))
2650 (build-system python-build-system)
2651 (arguments
2652 `(#:phases
2653 (modify-phases %standard-phases
2654 (replace 'check
2655 (lambda _
2656 ;; Disable failing test. See upstream bug report
2657 ;; https://github.com/pypa/virtualenv/issues/957
2658 (substitute* "tests/test_virtualenv.py"
2659 (("skipif.*") "skipif(True, reason=\"Guix\")\n"))
2660 (zero? (system* "py.test")))))))
2661 (inputs
2662 `(("python-setuptools" ,python-setuptools)
2663 ("python-mock" ,python-mock)
2664 ("python-pytest" ,python-pytest)))
2665 (home-page "https://virtualenv.pypa.io/")
2666 (synopsis "Virtual Python environment builder")
2667 (description
2668 "Virtualenv is a tool to create isolated Python environments.")
2669 (license license:expat)))
2670
2671 (define-public python2-virtualenv
2672 (package-with-python2 python-virtualenv))
2673
2674 (define-public python-markupsafe
2675 (package
2676 (name "python-markupsafe")
2677 (version "0.23")
2678 (source
2679 (origin
2680 (method url-fetch)
2681 (uri (string-append
2682 "https://pypi.python.org/packages/source/M/MarkupSafe/MarkupSafe-"
2683 version ".tar.gz"))
2684 (sha256
2685 (base32
2686 "1hvip33wva3fnmvfp9x5klqri7hpl1hkgqmjbss18nmrb7zimv54"))))
2687 (build-system python-build-system)
2688 (inputs
2689 `(("python-setuptools" ,python-setuptools)))
2690 (home-page "http://github.com/mitsuhiko/markupsafe")
2691 (synopsis "XML/HTML/XHTML markup safe string implementation for Python")
2692 (description
2693 "Markupsafe provides an XML/HTML/XHTML markup safe string implementation
2694 for Python.")
2695 (license license:bsd-3)))
2696
2697 (define-public python2-markupsafe
2698 (package-with-python2 python-markupsafe))
2699
2700 (define-public python-jinja2
2701 (package
2702 (name "python-jinja2")
2703 (version "2.8")
2704 (source
2705 (origin
2706 (method url-fetch)
2707 (uri (pypi-uri "Jinja2" version))
2708 (sha256
2709 (base32
2710 "1x0v41lp5m1pjix3l46zx02b7lqp2hflgpnxwkywxynvi3zz47xw"))))
2711 (build-system python-build-system)
2712 (inputs
2713 `(("python-setuptools" ,python-setuptools)
2714 ("python-markupsafe" ,python-markupsafe)))
2715 (home-page "http://jinja.pocoo.org/")
2716 (synopsis "Python template engine")
2717 (description
2718 "Jinja2 is a small but fast and easy to use stand-alone template engine
2719 written in pure Python.")
2720 (license license:bsd-3)))
2721
2722 (define-public python2-jinja2
2723 (package-with-python2 python-jinja2))
2724
2725 (define-public python-pystache
2726 (package
2727 (name "python-pystache")
2728 (version "0.5.4")
2729 (source (origin
2730 (method url-fetch)
2731 (uri (pypi-uri "pystache" version))
2732 (sha256
2733 (base32
2734 "0nmqsfmiw4arjxqkmf9z66ml950pcdjk6aq4gin4sywmzdjw5fzp"))))
2735 (build-system python-build-system)
2736 (native-inputs
2737 `(("python-setuptools" ,python-setuptools)))
2738 (home-page "http://defunkt.io/pystache/")
2739 (synopsis "Python logic-less template engine")
2740 (description
2741 "Pystache is a Python implementation of the framework agnostic,
2742 logic-free templating system Mustache.")
2743 (license license:expat)))
2744
2745 (define-public python2-pystache
2746 (package-with-python2 python-pystache))
2747
2748 (define-public python-joblib
2749 (package
2750 (name "python-joblib")
2751 (version "0.9.0b4")
2752 (source (origin
2753 (method url-fetch)
2754 (uri (string-append "https://pypi.python.org/packages/source/"
2755 "j/joblib/joblib-" version ".tar.gz"))
2756 (sha256
2757 (base32
2758 "1dvw3f8jgj6h0fxkghbgyclvdzc7l0ig7n0vis70awb5kczb9bs3"))))
2759 (build-system python-build-system)
2760 (native-inputs
2761 `(("python-setuptools" ,python-setuptools)
2762 ("python-nose" ,python-nose)))
2763 (home-page "http://pythonhosted.org/joblib/")
2764 (synopsis "Using Python functions as pipeline jobs")
2765 (description
2766 "Joblib is a set of tools to provide lightweight pipelining in Python.
2767 In particular, joblib offers: transparent disk-caching of the output values
2768 and lazy re-evaluation (memoize pattern), easy simple parallel computing
2769 logging and tracing of the execution.")
2770 (license license:bsd-3)))
2771
2772 (define-public python2-joblib
2773 (package-with-python2 python-joblib))
2774
2775 (define-public python-docutils
2776 (package
2777 (name "python-docutils")
2778 (version "0.12")
2779 (source
2780 (origin
2781 (method url-fetch)
2782 (uri (string-append
2783 "https://pypi.python.org/packages/source/d/docutils/docutils-"
2784 version ".tar.gz"))
2785 (sha256
2786 (base32
2787 "1ylnjnw1x4b2y7blr6x35ncdzn69k253kw4cdkv6asdb21w73ny7"))))
2788 (build-system python-build-system)
2789 (inputs
2790 `(("python-setuptools" ,python-setuptools)))
2791 (arguments
2792 '(#:tests? #f)) ; no setup.py test command
2793 (home-page "http://docutils.sourceforge.net/")
2794 (synopsis "Python Documentation Utilities")
2795 (description
2796 "Docutils is a modular system for processing documentation into useful
2797 formats, such as HTML, XML, and LaTeX. For input Docutils supports
2798 reStructuredText.")
2799 ;; Most of the source code is public domain, but some source files are
2800 ;; licensed under the PFSL, BSD 2-clause, and GPLv3+ licenses.
2801 (license (list license:public-domain license:psfl license:bsd-2 license:gpl3+))))
2802
2803 (define-public python2-docutils
2804 (package-with-python2 python-docutils))
2805
2806 (define-public python-pygments
2807 (package
2808 (name "python-pygments")
2809 (version "2.0.2")
2810 (source
2811 (origin
2812 (method url-fetch)
2813 (uri (pypi-uri "Pygments" version))
2814 (sha256
2815 (base32
2816 "0lagrwifsgn0s8bzqahpr87p7gd38xja8f06akscinp6hj89283k"))))
2817 (build-system python-build-system)
2818 (inputs
2819 `(("python-setuptools" ,python-setuptools)))
2820 (home-page "http://pygments.org/")
2821 (synopsis "Syntax highlighting")
2822 (description
2823 "Pygments is a syntax highlighting package written in Python.")
2824 (license license:bsd-2)))
2825
2826 (define-public python2-pygments
2827 (package-with-python2 python-pygments))
2828
2829 (define-public python-sphinx
2830 (package
2831 (name "python-sphinx")
2832 (version "1.2.3")
2833 (source
2834 (origin
2835 (method url-fetch)
2836 (uri (string-append
2837 "https://pypi.python.org/packages/source/S/Sphinx/Sphinx-"
2838 version ".tar.gz"))
2839 (sha256
2840 (base32
2841 "011xizm3jnmf4cvs5i6kgf6c5nn046h79i8j0vd0f27yw9j3p4wl"))))
2842 (build-system python-build-system)
2843 (inputs
2844 `(("python-setuptools" ,python-setuptools)
2845 ("python-jinja2" ,python-jinja2)
2846 ("python-docutils" ,python-docutils)
2847 ("python-pygments" ,python-pygments)))
2848 (home-page "http://sphinx-doc.org/")
2849 (synopsis "Python documentation generator")
2850 (description "Sphinx is a tool that makes it easy to create documentation
2851 for Python projects or other documents consisting of multiple reStructuredText
2852 sources.")
2853 (license license:bsd-3)))
2854
2855 (define-public python2-sphinx
2856 (package-with-python2 python-sphinx))
2857
2858 (define-public python-sphinx-rtd-theme
2859 (package
2860 (name "python-sphinx-rtd-theme")
2861 (version "0.1.6")
2862 (source
2863 (origin
2864 (method url-fetch)
2865 (uri (string-append "https://pypi.python.org/packages/source/s/"
2866 "sphinx_rtd_theme/sphinx_rtd_theme-"
2867 version ".tar.gz"))
2868 (sha256
2869 (base32
2870 "19nw3rn7awplcdrz63kg1njqwkbymfg9lwn7l2grhdyhyr2gaa8g"))))
2871 (build-system python-build-system)
2872 (arguments
2873 `(;; With standard flags, the install phase attempts to create a zip'd
2874 ;; egg file, and fails with an error: 'ZIP does not support timestamps
2875 ;; before 1980'
2876 #:configure-flags '("--single-version-externally-managed"
2877 "--record=sphinx-rtd-theme.txt")))
2878 (native-inputs
2879 `(("python-setuptools" ,python-setuptools)))
2880 (inputs
2881 `(("python-docutils" ,python-docutils)
2882 ("python-sphinx" ,python-sphinx)))
2883 (home-page "https://github.com/snide/sphinx_rtd_theme/")
2884 (synopsis "ReadTheDocs.org theme for Sphinx")
2885 (description "A theme for Sphinx used by ReadTheDocs.org.")
2886 (license license:expat)))
2887
2888 (define-public python2-sphinx-rtd-theme
2889 (package-with-python2 python-sphinx-rtd-theme))
2890
2891 (define-public python-feedgenerator
2892 (package
2893 (name "python-feedgenerator")
2894 (version "1.8")
2895 (source
2896 (origin
2897 (method url-fetch)
2898 (uri (pypi-uri "feedgenerator" version))
2899 (sha256
2900 (base32
2901 "0mkimp1fpdan4p3882vzcws4l594k71ich4g0wq97jbra7p602n0"))))
2902 (build-system python-build-system)
2903 (native-inputs
2904 `(("python-setuptools" ,python-setuptools)
2905 ("python-pytz" ,python-pytz)
2906 ("python-six" ,python-six)))
2907 (home-page "https://github.com/getpelican/feedgenerator")
2908 (synopsis
2909 "Standalone version of Django's Atom/RSS feed generator")
2910 (description
2911 "Feedgenerator-py3k is a standalone version of Django's feedgenerator,
2912 which can produce feeds in RSS 2.0, RSS 0.91, and Atom formats.")
2913 (license license:bsd-3)))
2914
2915 (define-public python2-feedgenerator
2916 (package-with-python2 python-feedgenerator))
2917
2918 (define-public python-blinker
2919 (package
2920 (name "python-blinker")
2921 (version "1.4")
2922 (source
2923 (origin
2924 (method url-fetch)
2925 (uri (pypi-uri "blinker" version))
2926 (sha256
2927 (base32
2928 "1dpq0vb01p36jjwbhhd08ylvrnyvcc82yxx3mwjx6awrycjyw6j7"))))
2929 (build-system python-build-system)
2930 (native-inputs
2931 `(("python-setuptools" ,python-setuptools)))
2932 ;; No "test" command supplied to setuptools, so unless there's another way
2933 ;; to run tests, we're skipping them!
2934 (arguments '(#:tests? #f))
2935 (home-page "http://pythonhosted.org/blinker/")
2936 (synopsis "Fast, simple object-to-object and broadcast signaling")
2937 (description
2938 "Blinker provides a fast dispatching system that allows any number of
2939 interested parties to subscribe to events, or \"signals\".")
2940 (license license:expat)))
2941
2942 (define-public python2-blinker
2943 (package-with-python2 python-blinker))
2944
2945 (define-public pelican
2946 (package
2947 (name "pelican")
2948 (version "3.6.3")
2949 (source
2950 (origin
2951 (method url-fetch)
2952 (uri (pypi-uri "pelican" version))
2953 (sha256
2954 (base32
2955 "1hn94rb4q3zmcq16in055xikal4dba5hfx3zznq7warllcgc9f8k"))))
2956 (build-system python-build-system)
2957 (inputs
2958 `(("python-feedgenerator" ,python-feedgenerator)
2959 ("python-jinja2" ,python-jinja2)
2960 ("python-pygments" ,python-pygments)
2961 ("python-docutils" ,python-docutils)
2962 ("python-pytz" ,python-pytz)
2963 ("python-blinker" ,python-blinker)
2964 ("python-unidecode" ,python-unidecode)
2965 ("python-six" ,python-six)
2966 ("python-dateutil-2" ,python-dateutil-2)))
2967 (home-page "http://getpelican.com/")
2968 (arguments
2969 `(;; XXX Requires a lot more packages to do unit tests :P
2970 #:tests? #f
2971 #:phases (modify-phases %standard-phases
2972 (add-before
2973 'install 'adjust-requires
2974 ;; Since feedgenerator is installed from git, it doesn't
2975 ;; conform to the version requirements.
2976 ;;
2977 ;; We *do have* "feedgenerator >= 1.6", but strip off the
2978 ;; version requirement so setuptools doesn't get confused.
2979 (lambda _
2980 (substitute* "setup.py"
2981 (("['\"]feedgenerator.*?['\"]")
2982 "'feedgenerator'")))))))
2983 (synopsis "Python-based static site publishing system")
2984 (description
2985 "Pelican is a tool to generate a static blog from reStructuredText,
2986 Markdown input files, and more. Pelican uses Jinja2 for templating
2987 and is very extensible.")
2988 (license license:agpl3+)))
2989
2990 (define-public python-scikit-learn
2991 (package
2992 (name "python-scikit-learn")
2993 (version "0.16.1")
2994 (source
2995 (origin
2996 (method url-fetch)
2997 (uri (string-append
2998 "https://github.com/scikit-learn/scikit-learn/archive/"
2999 version ".tar.gz"))
3000 (file-name (string-append name "-" version ".tar.gz"))
3001 (sha256
3002 (base32
3003 "140skabifgc7lvvj873pnzlwx0ni6q8qkrsyad2ccjb3h8rxzkih"))))
3004 (build-system python-build-system)
3005 (arguments
3006 `(#:phases
3007 (alist-cons-before
3008 'check 'set-HOME
3009 ;; some tests require access to "$HOME"
3010 (lambda _ (setenv "HOME" "/tmp"))
3011 ;; Tests can only be run after the library has been installed and not
3012 ;; within the source directory.
3013 (alist-cons-after
3014 'install 'check
3015 (lambda _
3016 (with-directory-excursion "/tmp"
3017 ;; With Python 3 one test of 3334 fails
3018 ;; (sklearn.tests.test_common.test_transformers); see
3019 ;; https://github.com/scikit-learn/scikit-learn/issues/3693
3020 (system* "nosetests" "-v" "sklearn")))
3021 (alist-delete 'check %standard-phases)))))
3022 (inputs
3023 `(("openblas" ,openblas)
3024 ("python-nose" ,python-nose)))
3025 (propagated-inputs
3026 `(("python-numpy" ,python-numpy)
3027 ("python-scipy" ,python-scipy)))
3028 (home-page "http://scikit-learn.org/")
3029 (synopsis "Machine Learning in Python")
3030 (description
3031 "Scikit-learn provides simple and efficient tools for data
3032 mining and data analysis.")
3033 (license license:bsd-3)
3034 (properties `((python2-variant . ,(delay python2-scikit-learn))))))
3035
3036 (define-public python2-scikit-learn
3037 (package-with-python2 (strip-python2-variant python-scikit-learn)))
3038
3039 (define-public python-scikit-image
3040 (package
3041 (name "python-scikit-image")
3042 (version "0.11.3")
3043 (source
3044 (origin
3045 (method url-fetch)
3046 (uri (string-append
3047 "https://pypi.python.org/packages/source/s/scikit-image/scikit-image-"
3048 version ".tar.gz"))
3049 (sha256
3050 (base32 "0jz416fqvpahqyffw8plmszzfj669w8wvf3y9clnr5lr6a7md3kn"))))
3051 (build-system python-build-system)
3052 (propagated-inputs
3053 `(("python-matplotlib" ,python-matplotlib)
3054 ("python-networkx" ,python-networkx)
3055 ("python-numpy" ,python-numpy)
3056 ("python-scipy" ,python-scipy)
3057 ("python-six" ,python-six)
3058 ("python-pillow" ,python-pillow)))
3059 (native-inputs
3060 `(("python-cython" ,python-cython)
3061 ("python-setuptools" ,python-setuptools)))
3062 (home-page "http://scikit-image.org/")
3063 (synopsis "Image processing in Python")
3064 (description
3065 "Scikit-image is a collection of algorithms for image processing.")
3066 (license license:bsd-3)
3067 (properties `((python2-variant . ,(delay python2-scikit-image))))))
3068
3069 (define-public python2-scikit-image
3070 (let ((scikit-image (package-with-python2
3071 (strip-python2-variant python-scikit-image))))
3072 (package (inherit scikit-image)
3073 (native-inputs
3074 `(("python2-mock" ,python2-mock)
3075 ,@(package-native-inputs scikit-image)))
3076 (propagated-inputs
3077 `(("python2-pytz" ,python2-pytz)
3078 ,@(package-propagated-inputs scikit-image))))))
3079
3080 (define-public python-redis
3081 (package
3082 (name "python-redis")
3083 (version "2.10.3")
3084 (source
3085 (origin
3086 (method url-fetch)
3087 (uri (string-append
3088 "https://pypi.python.org/packages/source/r/redis/redis-"
3089 version ".tar.gz"))
3090 (sha256
3091 (base32 "1701qjwn4n05q90fdg4bsg96s27xf5s4hsb4gxhv3xk052q3gyx4"))))
3092 (build-system python-build-system)
3093 ;; Tests require a running Redis server
3094 (arguments '(#:tests? #f))
3095 (native-inputs
3096 `(("python-setuptools" ,python-setuptools)
3097 ("python-pytest" ,python-pytest)))
3098 (home-page "https://github.com/andymccurdy/redis-py")
3099 (synopsis "Redis Python client")
3100 (description
3101 "This package provides a Python interface to the Redis key-value store.")
3102 (license license:expat)))
3103
3104 (define-public python2-redis
3105 (package-with-python2 python-redis))
3106
3107 (define-public python-rq
3108 (package
3109 (name "python-rq")
3110 (version "0.5.2")
3111 (source
3112 (origin
3113 (method url-fetch)
3114 (uri (string-append
3115 "https://pypi.python.org/packages/source/r/rq/rq-"
3116 version ".tar.gz"))
3117 (sha256
3118 (base32 "0b0z5hn8wkfg300hx7816csgv3bcfamlr29fi3yzgqmpqxwj3fix"))))
3119 (build-system python-build-system)
3120 (propagated-inputs
3121 `(("python-click" ,python-click)
3122 ("python-redis" ,python-redis)))
3123 (native-inputs
3124 `(("python-setuptools" ,python-setuptools)))
3125 (home-page "http://python-rq.org/")
3126 (synopsis "Simple job queues for Python")
3127 (description
3128 "RQ (Redis Queue) is a simple Python library for queueing jobs and
3129 processing them in the background with workers. It is backed by Redis and it
3130 is designed to have a low barrier to entry.")
3131 (license license:bsd-2)))
3132
3133 (define-public python2-rq
3134 (package-with-python2 python-rq))
3135
3136 (define-public python-cython
3137 (package
3138 (name "python-cython")
3139 (version "0.24.1")
3140 (source
3141 (origin
3142 (method url-fetch)
3143 (uri (pypi-uri "Cython" version))
3144 (sha256
3145 (base32
3146 "1fg7fmpvfcq9md4ncyqnnylyjy4z3ksdrshzis95g1sh03d8z044"))))
3147 (build-system python-build-system)
3148 ;; we need the full python package and not just the python-wrapper
3149 ;; because we need libpython3.3m.so
3150 (inputs
3151 `(("python" ,python)))
3152 (arguments
3153 `(#:phases
3154 (modify-phases %standard-phases
3155 (add-before 'check 'set-HOME
3156 ;; some tests require access to "$HOME/.cython"
3157 (lambda _ (setenv "HOME" "/tmp")))
3158 (replace 'check
3159 (lambda _ (zero? (system* "python" "runtests.py" "-vv")))))))
3160 (home-page "http://cython.org/")
3161 (synopsis "C extensions for Python")
3162 (description "Cython is an optimising static compiler for both the Python
3163 programming language and the extended Cython programming language. It makes
3164 writing C extensions for Python as easy as Python itself.")
3165 (license license:asl2.0)
3166 (properties `((python2-variant . ,(delay python2-cython))))))
3167
3168 (define-public python2-cython
3169 (package (inherit (package-with-python2
3170 (strip-python2-variant python-cython)))
3171 (name "python2-cython")
3172 (inputs
3173 `(("python-2" ,python-2))))) ; this is not automatically changed
3174
3175 ;; This version of numpy is missing the documentation and is only used to
3176 ;; build matplotlib which is required to build numpy's documentation.
3177 (define python-numpy-bootstrap
3178 (package
3179 (name "python-numpy-bootstrap")
3180 (version "1.10.4")
3181 (source
3182 (origin
3183 (method url-fetch)
3184 (uri (string-append "mirror://sourceforge/numpy/NumPy/" version
3185 "/numpy-" version ".tar.gz"))
3186 (sha256
3187 (base32
3188 "1bjjhvncraka5s6i4lg644jrxij6bvycxy7an20gcz3a0m11iygp"))))
3189 (build-system python-build-system)
3190 (inputs
3191 `(("python-nose" ,python-nose)
3192 ("openblas" ,openblas)
3193 ("lapack" ,lapack)))
3194 (native-inputs
3195 `(("gfortran" ,gfortran)))
3196 (arguments
3197 `(#:phases
3198 (alist-cons-before
3199 'build 'set-environment-variables
3200 (lambda* (#:key inputs #:allow-other-keys)
3201 (call-with-output-file "site.cfg"
3202 (lambda (port)
3203 (format port
3204 "[openblas]
3205 libraries = openblas
3206 library_dirs = ~a/lib
3207 include_dirs = ~a/include
3208
3209 [lapack]
3210 lapack_libs = lapack
3211 library_dirs = ~a/lib
3212 include_dirs = ~a/include
3213 "
3214 (assoc-ref inputs "openblas")
3215 (assoc-ref inputs "openblas")
3216 (assoc-ref inputs "lapack")
3217 (assoc-ref inputs "lapack"))))
3218 ;; Use "gcc" executable, not "cc".
3219 (substitute* "numpy/distutils/system_info.py"
3220 (("c = distutils\\.ccompiler\\.new_compiler\\(\\)")
3221 "c = distutils.ccompiler.new_compiler(); c.set_executables(compiler='gcc',compiler_so='gcc',linker_exe='gcc',linker_so='gcc -shared')"))
3222 #t)
3223 ;; Tests can only be run after the library has been installed and not
3224 ;; within the source directory.
3225 (alist-cons-after
3226 'install 'check
3227 (lambda _
3228 (with-directory-excursion "/tmp"
3229 (zero? (system* "python" "-c"
3230 "import numpy; numpy.test(verbose=2)"))))
3231 (alist-delete
3232 'check
3233 %standard-phases)))))
3234 (home-page "http://www.numpy.org/")
3235 (synopsis "Fundamental package for scientific computing with Python")
3236 (description "NumPy is the fundamental package for scientific computing
3237 with Python. It contains among other things: a powerful N-dimensional array
3238 object, sophisticated (broadcasting) functions, tools for integrating C/C++
3239 and Fortran code, useful linear algebra, Fourier transform, and random number
3240 capabilities.")
3241 (license license:bsd-3)))
3242
3243 (define python2-numpy-bootstrap
3244 (package-with-python2 python-numpy-bootstrap))
3245
3246 (define-public python2-fastlmm
3247 (package
3248 (name "python2-fastlmm")
3249 (version "0.2.21")
3250 (source
3251 (origin
3252 (method url-fetch)
3253 (uri (pypi-uri "fastlmm" version ".zip"))
3254 (sha256
3255 (base32
3256 "1q8c34rpmwkfy3r4d5172pzdkpfryj561897z9r3x22gq7813x1m"))))
3257 (build-system python-build-system)
3258 (arguments
3259 `(#:python ,python-2)) ; only Python 2.7 is supported
3260 (propagated-inputs
3261 `(("python2-numpy" ,python2-numpy)
3262 ("python2-scipy" ,python2-scipy)
3263 ("python2-matplotlib" ,python2-matplotlib)
3264 ("python2-pandas" ,python2-pandas)
3265 ("python2-scikit-learn" ,python2-scikit-learn)
3266 ("python2-cython" ,python2-cython)
3267 ("python2-pysnptools" ,python2-pysnptools)))
3268 (native-inputs
3269 `(("unzip" ,unzip)
3270 ("python2-mock" ,python2-mock)
3271 ("python2-setuptools" ,python2-setuptools)))
3272 (home-page "http://research.microsoft.com/en-us/um/redmond/projects/mscompbio/fastlmm/")
3273 (synopsis "Perform genome-wide association studies on large data sets")
3274 (description
3275 "FaST-LMM, which stands for Factored Spectrally Transformed Linear Mixed
3276 Models, is a program for performing both single-SNP and SNP-set genome-wide
3277 association studies (GWAS) on extremely large data sets.")
3278 (license license:asl2.0)))
3279
3280 (define-public python-numpy
3281 (package (inherit python-numpy-bootstrap)
3282 (name "python-numpy")
3283 (outputs '("out" "doc"))
3284 (inputs
3285 `(("which" ,which)
3286 ("python-setuptools" ,python-setuptools)
3287 ("python-matplotlib" ,python-matplotlib)
3288 ("python-sphinx" ,python-sphinx)
3289 ("python-pyparsing" ,python-pyparsing)
3290 ("python-numpydoc" ,python-numpydoc)
3291 ,@(package-inputs python-numpy-bootstrap)))
3292 (native-inputs
3293 `(("pkg-config" ,pkg-config)
3294 ("texlive" ,texlive)
3295 ("texinfo" ,texinfo)
3296 ("perl" ,perl)
3297 ,@(package-native-inputs python-numpy-bootstrap)))
3298 (arguments
3299 `(,@(substitute-keyword-arguments
3300 (package-arguments python-numpy-bootstrap)
3301 ((#:phases phases)
3302 `(alist-cons-after
3303 'install 'install-doc
3304 (lambda* (#:key outputs #:allow-other-keys)
3305 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
3306 (doc (string-append
3307 data "/doc/" ,name "-"
3308 ,(package-version python-numpy-bootstrap)))
3309 (info (string-append data "/info"))
3310 (html (string-append doc "/html"))
3311 (pyver ,(string-append "PYVER=")))
3312 (with-directory-excursion "doc"
3313 (mkdir-p html)
3314 (system* "make" "html" pyver)
3315 (system* "make" "latex" "PAPER=a4" pyver)
3316 (system* "make" "-C" "build/latex"
3317 "all-pdf" "PAPER=a4" pyver)
3318 ;; FIXME: Generation of the info file fails.
3319 ;; (system* "make" "info" pyver)
3320 ;; (mkdir-p info)
3321 ;; (copy-file "build/texinfo/numpy.info"
3322 ;; (string-append info "/numpy.info"))
3323 (for-each (lambda (file)
3324 (copy-file (string-append "build/latex" file)
3325 (string-append doc file)))
3326 '("/numpy-ref.pdf" "/numpy-user.pdf"))
3327 (with-directory-excursion "build/html"
3328 (for-each (lambda (file)
3329 (let* ((dir (dirname file))
3330 (tgt-dir (string-append html "/" dir)))
3331 (unless (equal? "." dir)
3332 (mkdir-p tgt-dir))
3333 (install-file file html)))
3334 (find-files "." ".*"))))))
3335 ,phases)))))))
3336
3337 (define-public python2-numpy
3338 (package-with-python2 python-numpy))
3339
3340 (define-public python-pyparsing
3341 (package
3342 (name "python-pyparsing")
3343 (version "2.0.3")
3344 (source
3345 (origin
3346 (method url-fetch)
3347 (uri (string-append "mirror://sourceforge/pyparsing/pyparsing"
3348 "/pyparsing-" version
3349 "/pyparsing-" version ".tar.gz"))
3350 (sha256
3351 (base32
3352 "0kw4py7gn45j93q8r7bzajfrjdc3xlsn2yzln41lf9zmrghjkrq6"))))
3353 (build-system python-build-system)
3354 (outputs '("out" "doc"))
3355 (arguments
3356 `(#:tests? #f ; no test target
3357 #:modules ((guix build python-build-system)
3358 (guix build utils))
3359 #:phases
3360 (alist-cons-after
3361 'install 'install-doc
3362 (lambda* (#:key outputs #:allow-other-keys)
3363 (let* ((doc (string-append (assoc-ref outputs "doc")
3364 "/share/doc/" ,name "-" ,version))
3365 (html-doc (string-append doc "/html"))
3366 (examples (string-append doc "/examples")))
3367 (mkdir-p html-doc)
3368 (mkdir-p examples)
3369 (for-each
3370 (lambda (dir tgt)
3371 (map (lambda (file)
3372 (install-file file tgt))
3373 (find-files dir ".*")))
3374 (list "docs" "htmldoc" "examples")
3375 (list doc html-doc examples))))
3376 %standard-phases)))
3377 (home-page "http://pyparsing.wikispaces.com")
3378 (synopsis "Python parsing class library")
3379 (description
3380 "The pyparsing module is an alternative approach to creating and
3381 executing simple grammars, vs. the traditional lex/yacc approach, or the use
3382 of regular expressions. The pyparsing module provides a library of classes
3383 that client code uses to construct the grammar directly in Python code.")
3384 (license license:expat)))
3385
3386 (define-public python2-pyparsing
3387 (package-with-python2 python-pyparsing))
3388
3389 (define-public python-numpydoc
3390 (package
3391 (name "python-numpydoc")
3392 (version "0.5")
3393 (source
3394 (origin
3395 (method url-fetch)
3396 (uri (string-append
3397 "https://pypi.python.org/packages/source/n/numpydoc/numpydoc-"
3398 version ".tar.gz"))
3399 (sha256
3400 (base32
3401 "0d4dnifaxkll50jx6czj05y8cb4ny60njd2wz299sj2jxfy51w4k"))
3402 (modules '((guix build utils)))
3403 (snippet
3404 '(begin
3405 ;; Drop a test requiring matplotlib, which we cannot add as an
3406 ;; input since it would create a circular dependency: Extend the
3407 ;; test for Python 3, where it is already dropped, to Python 2.
3408 (substitute* "numpydoc/tests/test_plot_directive.py"
3409 (("3") "2"))))))
3410 (build-system python-build-system)
3411 (inputs
3412 `(("python-setuptools" ,python-setuptools)
3413 ("python-docutils" ,python-docutils)
3414 ("python-sphinx" ,python-sphinx)
3415 ("python-nose" ,python-nose)))
3416 (home-page "https://pypi.python.org/pypi/numpydoc")
3417 (synopsis
3418 "Numpy's Sphinx extensions")
3419 (description
3420 "Sphinx extension to support docstrings in Numpy format.")
3421 (license license:bsd-2)))
3422
3423 (define-public python2-numpydoc
3424 (package-with-python2 python-numpydoc))
3425
3426 (define-public python-numexpr
3427 (package
3428 (name "python-numexpr")
3429 (version "2.6.0")
3430 (source
3431 (origin
3432 (method url-fetch)
3433 (uri (pypi-uri "numexpr" version))
3434 (sha256
3435 (base32
3436 "0i6iagl2hhbr8q4qzbbjd859v5806vqylq87fq7pi914ps6d6cag"))))
3437 (build-system python-build-system)
3438 (arguments `(#:tests? #f)) ; no tests included
3439 (propagated-inputs
3440 `(("python-numpy" ,python-numpy)))
3441 (home-page "https://github.com/pydata/numexpr")
3442 (synopsis "Fast numerical expression evaluator for NumPy")
3443 (description
3444 "Numexpr is a fast numerical expression evaluator for NumPy. With it,
3445 expressions that operate on arrays are accelerated and use less memory than
3446 doing the same calculation in Python. In addition, its multi-threaded
3447 capabilities can make use of all your cores, which may accelerate
3448 computations, most specially if they are not memory-bounded (e.g. those using
3449 transcendental functions).")
3450 (license license:expat)
3451 (properties `((python2-variant . ,(delay python2-numexpr))))))
3452
3453 (define-public python2-numexpr
3454 (package-with-python2 (strip-python2-variant python-numexpr)))
3455
3456 (define-public python-matplotlib
3457 (package
3458 (name "python-matplotlib")
3459 (version "1.4.3")
3460 (source
3461 (origin
3462 (method url-fetch)
3463 (uri (string-append "mirror://sourceforge/matplotlib/matplotlib"
3464 "/matplotlib-" version
3465 "/matplotlib-" version ".tar.gz"))
3466 (sha256
3467 (base32
3468 "1dn05cvd0g984lzhh72wa0z93psgwshbbg93fkab6slx5m3l95av"))
3469 (patches (search-patches "matplotlib-setupext-tk.patch"))))
3470 (build-system python-build-system)
3471 (outputs '("out" "doc"))
3472 (propagated-inputs ; the following packages are all needed at run time
3473 `(("python-pyparsing" ,python-pyparsing)
3474 ("python-pygobject" ,python-pygobject)
3475 ("gobject-introspection" ,gobject-introspection)
3476 ("python-tkinter" ,python "tk")
3477 ;; The 'gtk+' package (and 'gdk-pixbuf', 'atk' and 'pango' propagated
3478 ;; from 'gtk+') provides the required 'typelib' files used by
3479 ;; 'gobject-introspection'. The location of these files is set with the
3480 ;; help of the environment variable GI_TYPELIB_PATH. At build time this
3481 ;; is done automatically by a 'native-search-path' procedure. However,
3482 ;; at run-time the user must set this variable as follows:
3483 ;;
3484 ;; export GI_TYPELIB_PATH=~/.guix-profile/lib/girepository-1.0
3485 ("gtk+" ,gtk+)
3486 ;; From version 1.4.0 'matplotlib' makes use of 'cairocffi' instead of
3487 ;; 'pycairo'. However, 'pygobject' makes use of a 'pycairo' 'context'
3488 ;; object. For this reason we need to import both libraries.
3489 ;; https://pythonhosted.org/cairocffi/cffi_api.html#converting-pycairo
3490 ("python-pycairo" ,python-pycairo)
3491 ("python-cairocffi" ,python-cairocffi)))
3492 (inputs
3493 `(("python-setuptools" ,python-setuptools)
3494 ("python-dateutil" ,python-dateutil-2)
3495 ("python-six" ,python-six)
3496 ("python-pytz" ,python-pytz)
3497 ("python-numpy" ,python-numpy-bootstrap)
3498 ("python-sphinx" ,python-sphinx)
3499 ("python-numpydoc" ,python-numpydoc)
3500 ("python-nose" ,python-nose)
3501 ("python-mock" ,python-mock)
3502 ("libpng" ,libpng)
3503 ("imagemagick" ,imagemagick)
3504 ("freetype" ,freetype)
3505 ("cairo" ,cairo)
3506 ("glib" ,glib)
3507 ("python-pillow" ,python-pillow)
3508 ;; FIXME: Add backends when available.
3509 ;("python-wxpython" ,python-wxpython)
3510 ;("python-pyqt" ,python-pyqt)
3511 ("tcl" ,tcl)
3512 ("tk" ,tk)))
3513 (native-inputs
3514 `(("pkg-config" ,pkg-config)
3515 ("texlive" ,texlive)
3516 ("texinfo" ,texinfo)))
3517 (arguments
3518 `(#:phases
3519 (alist-cons-before
3520 'build 'configure-environment
3521 (lambda* (#:key outputs inputs #:allow-other-keys)
3522 (let ((cairo (assoc-ref inputs "cairo"))
3523 (gtk+ (assoc-ref inputs "gtk+")))
3524 ;; Setting these directories in the 'basedirlist' of 'setup.cfg'
3525 ;; has not effect.
3526 (setenv "LD_LIBRARY_PATH"
3527 (string-append cairo "/lib:" gtk+ "/lib"))
3528 (setenv "HOME" (getcwd))
3529 (call-with-output-file "setup.cfg"
3530 (lambda (port)
3531 (format port "[directories]~%
3532 basedirlist = ~a,~a~%
3533 [rc_options]~%
3534 backend = TkAgg~%"
3535 (assoc-ref inputs "tcl")
3536 (assoc-ref inputs "tk"))))))
3537 (alist-cons-after
3538 'install 'install-doc
3539 (lambda* (#:key outputs #:allow-other-keys)
3540 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
3541 (doc (string-append data "/doc/" ,name "-" ,version))
3542 (info (string-append data "/info"))
3543 (html (string-append doc "/html")))
3544 (with-directory-excursion "doc"
3545 ;; Produce pdf in 'A4' format.
3546 (substitute* (find-files "." "conf\\.py")
3547 (("latex_paper_size = 'letter'")
3548 "latex_paper_size = 'a4'"))
3549 (mkdir-p html)
3550 (mkdir-p info)
3551 ;; The doc recommends to run the 'html' target twice.
3552 (system* "python" "make.py" "html")
3553 (system* "python" "make.py" "html")
3554 (copy-recursively "build/html" html)
3555 (system* "python" "make.py" "latex")
3556 (system* "python" "make.py" "texinfo")
3557 (symlink (string-append html "/_images")
3558 (string-append info "/matplotlib-figures"))
3559 (with-directory-excursion "build/texinfo"
3560 (substitute* "matplotlib.texi"
3561 (("@image\\{([^,]*)" all file)
3562 (string-append "@image{matplotlib-figures/" file)))
3563 (symlink (string-append html "/_images")
3564 "./matplotlib-figures")
3565 (system* "makeinfo" "--no-split"
3566 "-o" "matplotlib.info" "matplotlib.texi"))
3567 (copy-file "build/texinfo/matplotlib.info"
3568 (string-append info "/matplotlib.info"))
3569 (copy-file "build/latex/Matplotlib.pdf"
3570 (string-append doc "/Matplotlib.pdf")))))
3571 %standard-phases))))
3572 (home-page "http://matplotlib.org")
3573 (synopsis "2D plotting library for Python")
3574 (description
3575 "Matplotlib is a Python 2D plotting library which produces publication
3576 quality figures in a variety of hardcopy formats and interactive environments
3577 across platforms. Matplotlib can be used in Python scripts, the python and
3578 ipython shell, web application servers, and six graphical user interface
3579 toolkits.")
3580 (license license:psfl)
3581 (properties `((python2-variant . ,(delay python2-matplotlib))))))
3582
3583 (define-public python2-matplotlib
3584 (let ((matplotlib (package-with-python2
3585 (strip-python2-variant python-matplotlib))))
3586 (package (inherit matplotlib)
3587 ;; Make sure to use special packages for Python 2 instead
3588 ;; of those automatically rewritten by package-with-python2.
3589 (propagated-inputs
3590 `(("python2-pycairo" ,python2-pycairo)
3591 ("python2-pygobject-2" ,python2-pygobject-2)
3592 ("python2-tkinter" ,python-2 "tk")
3593 ,@(fold alist-delete (package-propagated-inputs matplotlib)
3594 '("python-pycairo" "python-pygobject" "python-tkinter")))))))
3595
3596 (define-public python2-pysnptools
3597 (package
3598 (name "python2-pysnptools")
3599 (version "0.3.9")
3600 (source
3601 (origin
3602 (method url-fetch)
3603 (uri (pypi-uri "pysnptools" version ".zip"))
3604 (sha256
3605 (base32
3606 "1wybggjzz8zw7aav4pjsg2h22xp17a1lghrprza1pxwlm7wf96y2"))))
3607 (build-system python-build-system)
3608 (arguments
3609 `(#:python ,python-2)) ; only Python 2.7 is supported
3610 (propagated-inputs
3611 `(("python2-numpy" ,python2-numpy)
3612 ("python2-scipy" ,python2-scipy)
3613 ("python2-pytz" ,python2-pytz)
3614 ("python2-cython" ,python2-cython)))
3615 (inputs
3616 `(("python2-dateutil-2" ,python2-dateutil-2)
3617 ("python2-pandas" ,python2-pandas)
3618 ("python2-six" ,python2-six)))
3619 (native-inputs
3620 `(("unzip" ,unzip)
3621 ("python2-setuptools" ,python2-setuptools)))
3622 (home-page "http://research.microsoft.com/en-us/um/redmond/projects/mscompbio/")
3623 (synopsis "Library for reading and manipulating genetic data")
3624 (description
3625 "PySnpTools is a library for reading and manipulating genetic data. It
3626 can, for example, efficiently read whole PLINK *.bed/bim/fam files or parts of
3627 those files. It can also efficiently manipulate ranges of integers using set
3628 operators such as union, intersection, and difference.")
3629 (license license:asl2.0)))
3630
3631 (define-public python-rpy2
3632 (package
3633 (name "python-rpy2")
3634 (version "2.7.6")
3635 (source
3636 (origin
3637 (method url-fetch)
3638 (uri (pypi-uri "rpy2" version))
3639 (sha256
3640 (base32
3641 "0nhan2qvrw7b7gg5zddwa22kybdv3x1g26vkd7q8lvnkgzrs4dga"))))
3642 (build-system python-build-system)
3643 (inputs
3644 `(("python-six" ,python-six)
3645 ("readline" ,readline)
3646 ("icu4c" ,icu4c)
3647 ("pcre" ,pcre)
3648 ("r" ,r)))
3649 (native-inputs
3650 `(("python-setuptools" ,python-setuptools)
3651 ("zlib" ,zlib)))
3652 (home-page "http://rpy.sourceforge.net/")
3653 (synopsis "Python interface to the R language")
3654 (description "rpy2 is a redesign and rewrite of rpy. It is providing a
3655 low-level interface to R from Python, a proposed high-level interface,
3656 including wrappers to graphical libraries, as well as R-like structures and
3657 functions.")
3658 (license license:gpl3+)))
3659
3660 (define-public python2-rpy2
3661 (let ((rpy2 (package-with-python2 python-rpy2)))
3662 (package (inherit rpy2)
3663 (native-inputs
3664 `(("python2-singledispatch" ,python2-singledispatch)
3665 ,@(package-native-inputs rpy2))))))
3666
3667 (define-public python-scipy
3668 (package
3669 (name "python-scipy")
3670 (version "0.16.0")
3671 (source
3672 (origin
3673 (method url-fetch)
3674 ; http://downloads.sourceforge.net/project/scipy/scipy/0.16.1/scipy-0.16.1.tar.gz
3675 (uri (string-append "mirror://sourceforge/scipy/scipy/" version
3676 "/scipy-" version ".tar.xz"))
3677 (sha256
3678 (base32
3679 "0wa0a4skpda3gx7lb12yn19nhbairlyxrvda2lz2bcawk3x5qzz2"))))
3680 (build-system python-build-system)
3681 (propagated-inputs
3682 `(("python-numpy" ,python-numpy)
3683 ("python-matplotlib" ,python-matplotlib)
3684 ("python-pyparsing" ,python-pyparsing)))
3685 (inputs
3686 `(("lapack" ,lapack)
3687 ("openblas" ,openblas)))
3688 (native-inputs
3689 `(("python-nose" ,python-nose)
3690 ("python-sphinx" ,python-sphinx)
3691 ("python-numpydoc" ,python-numpydoc)
3692 ("gfortran" ,gfortran)
3693 ("texlive" ,texlive)
3694 ("perl" ,perl)))
3695 (outputs '("out" "doc"))
3696 (arguments
3697 `(#:phases
3698 (alist-cons-before
3699 'build 'configure-openblas
3700 (lambda* (#:key inputs #:allow-other-keys)
3701 (call-with-output-file "site.cfg"
3702 (lambda (port)
3703 (format port
3704 "[blas]
3705 libraries = openblas
3706 library_dirs = ~a/lib
3707 include_dirs = ~a/include
3708 [atlas]
3709 library_dirs = ~a/lib
3710 atlas_libs = openblas
3711 "
3712 (assoc-ref inputs "openblas")
3713 (assoc-ref inputs "openblas")
3714 (assoc-ref inputs "openblas"))))
3715 #t)
3716 (alist-cons-after
3717 'install 'install-doc
3718 (lambda* (#:key outputs #:allow-other-keys)
3719 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
3720 (doc (string-append data "/doc/" ,name "-" ,version))
3721 (html (string-append doc "/html"))
3722 (pyver ,(string-append "PYVER=")))
3723 (with-directory-excursion "doc"
3724 ;; Fix generation of images for mathematical expressions.
3725 (substitute* (find-files "source" "conf\\.py")
3726 (("pngmath_use_preview = True")
3727 "pngmath_use_preview = False"))
3728 (mkdir-p html)
3729 (system* "make" "html" pyver)
3730 (system* "make" "latex" "PAPER=a4" pyver)
3731 (system* "make" "-C" "build/latex" "all-pdf" "PAPER=a4" pyver)
3732 (copy-file "build/latex/scipy-ref.pdf"
3733 (string-append doc "/scipy-ref.pdf"))
3734 (with-directory-excursion "build/html"
3735 (for-each (lambda (file)
3736 (let* ((dir (dirname file))
3737 (tgt-dir (string-append html "/" dir)))
3738 (install-file file html)))
3739 (find-files "." ".*"))))))
3740 ;; Tests can only be run after the library has been installed and not
3741 ;; within the source directory.
3742 (alist-cons-after
3743 'install 'check
3744 (lambda _
3745 (with-directory-excursion "/tmp"
3746 (zero? (system* "python" "-c" "import scipy; scipy.test()"))))
3747 (alist-delete
3748 'check
3749 (alist-cons-after
3750 'unpack 'fix-tests
3751 (lambda _
3752 (substitute* "scipy/integrate/tests/test_quadpack.py"
3753 (("libm.so") "libm.so.6"))
3754 #t)
3755 %standard-phases)))))))
3756 (home-page "http://www.scipy.org/")
3757 (synopsis "The Scipy library provides efficient numerical routines")
3758 (description "The SciPy library is one of the core packages that make up
3759 the SciPy stack. It provides many user-friendly and efficient numerical
3760 routines such as routines for numerical integration and optimization.")
3761 (license license:bsd-3)))
3762
3763 (define-public python2-scipy
3764 (package-with-python2 python-scipy))
3765
3766 (define-public python-socksipy-branch
3767 (package
3768 (name "python-socksipy-branch")
3769 (version "1.01")
3770 (source
3771 (origin
3772 (method url-fetch)
3773 (uri (pypi-uri "SocksiPy-branch" version))
3774 (sha256
3775 (base32
3776 "01l41v4g7fy9fzvinmjxy6zcbhgqaif8dhdqm4w90fwcw9h51a8p"))))
3777 (build-system python-build-system)
3778 (arguments
3779 `(#:tests? #f)) ; There are no tests
3780 (home-page "https://code.google.com/archive/p/socksipy-branch/")
3781 (synopsis "Python SOCKS module")
3782 (description
3783 "SocksiPy - A Python SOCKS client module. It provides a
3784 socket-like interface that supports connections to any TCP
3785 service through the use of a SOCKS4, SOCKS5 or HTTP proxy.
3786 The original version was developed by Dan Haim, this is a
3787 branch created by Mario Vilas to address some open issues,
3788 as the original project seems to have been abandoned circa 2007.")
3789 (license license:bsd-3)))
3790
3791 (define-public python2-socksipy-branch
3792 (package-with-python2 python-socksipy-branch))
3793
3794 (define-public python-sqlalchemy
3795 (package
3796 (name "python-sqlalchemy")
3797 (version "1.0.12")
3798 (source
3799 (origin
3800 (method url-fetch)
3801 (uri (string-append "https://pypi.python.org/packages/source/S/"
3802 "SQLAlchemy/SQLAlchemy-" version ".tar.gz"))
3803 (sha256
3804 (base32
3805 "1l8qclhd0s90w3pvwhi5mjxdwr5j7gw7cjka2fx6f2vqmq7f4yb6"))))
3806 (build-system python-build-system)
3807 (native-inputs
3808 `(("python-cython" ,python-cython) ;for c extensions
3809 ("python-pytest" ,python-pytest)
3810 ("python-mock" ,python-mock))) ;for tests
3811 (arguments
3812 `(#:phases (alist-replace
3813 'check
3814 (lambda _ (zero? (system* "py.test")))
3815 %standard-phases)))
3816 (home-page "http://www.sqlalchemy.org")
3817 (synopsis "Database abstraction library")
3818 (description
3819 "SQLAlchemy is the Python SQL toolkit and Object Relational Mapper that
3820 gives application developers the full power and flexibility of SQL. It
3821 provides a full suite of well known enterprise-level persistence patterns,
3822 designed for efficient and high-performing database access, adapted into a
3823 simple and Pythonic domain language.")
3824 (license license:x11)))
3825
3826 (define-public python2-sqlalchemy
3827 (package-with-python2 python-sqlalchemy))
3828
3829 (define-public python-sqlalchemy-utils
3830 (package
3831 (name "python-sqlalchemy-utils")
3832 (version "0.32.9")
3833 (source
3834 (origin
3835 (method url-fetch)
3836 (uri (pypi-uri "SQLAlchemy-Utils" version))
3837 (sha256
3838 (base32
3839 "1zbmmh7n8m01ikizn2mj1mfwch26nsr1awv9mvskqry7av0mpy98"))))
3840 (build-system python-build-system)
3841 (inputs
3842 `(("python-six" ,python-six)
3843 ("python-sqlalchemy" ,python-sqlalchemy)))
3844 (home-page "https://github.com/kvesteri/sqlalchemy-utils")
3845 (synopsis "Various utility functions for SQLAlchemy")
3846 (description
3847 "SQLAlchemy-utils provides various utility functions and custom data types
3848 for SQLAlchemy. SQLAlchemy is an SQL database abstraction library for Python.")
3849 (properties `((python2-variant . ,(delay python2-sqlalchemy-utils))))
3850 (license license:bsd-3)))
3851
3852 (define-public python2-sqlalchemy-utils
3853 (let ((base (package-with-python2
3854 (strip-python2-variant python-sqlalchemy-utils))))
3855 (package (inherit base)
3856 (native-inputs
3857 `(("python2-setuptools" ,python2-setuptools)
3858 ,@(package-native-inputs base))))))
3859
3860 (define-public python-alembic
3861 (package
3862 (name "python-alembic")
3863 (version "0.8.7")
3864 (source
3865 (origin
3866 (method url-fetch)
3867 (uri (pypi-uri "alembic" version))
3868 (sha256
3869 (base32
3870 "0ias6fdzwr2s220fnjspkdgm9510bd0cnap0hx5y4zy4srba9f3z"))))
3871 (build-system python-build-system)
3872 (native-inputs
3873 `(("python-mock" ,python-mock)
3874 ("python-pytest-cov" ,python-pytest-cov)))
3875 (propagated-inputs
3876 `(("python-sqlalchemy" ,python-sqlalchemy)
3877 ("python-mako" ,python-mako)
3878 ("python-editor" ,python-editor)))
3879 (home-page "http://bitbucket.org/zzzeek/alembic")
3880 (synopsis
3881 "Database migration tool for SQLAlchemy")
3882 (description
3883 "Alembic is a lightweight database migration tool for usage with the
3884 SQLAlchemy Database Toolkit for Python.")
3885 (license license:expat)
3886 (properties `((python2-variant . ,(delay python2-alembic))))))
3887
3888 (define-public python2-alembic
3889 (let ((alembic (package-with-python2
3890 (strip-python2-variant python-alembic))))
3891 (package
3892 (inherit alembic)
3893 (native-inputs `(("python2-setuptools" ,python2-setuptools)
3894 ,@(package-native-inputs alembic))))))
3895
3896 (define-public python-distutils-extra
3897 (package
3898 (name "python-distutils-extra")
3899 (version "2.38")
3900 (source
3901 (origin
3902 (method url-fetch)
3903 (uri (string-append "https://launchpad.net/python-distutils-extra/trunk/"
3904 version "/+download/python-distutils-extra-"
3905 version ".tar.gz"))
3906 (sha256
3907 (base32
3908 "0lx15kcbby9zisx33p2h5hgakgwh2bvh0ibag8z0px4j6ifhs41x"))))
3909 (build-system python-build-system)
3910 (native-inputs
3911 `(("python-setuptools" ,python-setuptools)))
3912 (home-page "https://launchpad.net/python-distutils-extra/")
3913 (synopsis "Enhancements to Python's distutils")
3914 (description
3915 "The python-distutils-extra module enables you to easily integrate
3916 gettext support, themed icons, and scrollkeeper-based documentation into
3917 Python's distutils.")
3918 (license license:gpl2)))
3919
3920 (define-public python2-distutils-extra
3921 (package-with-python2 python-distutils-extra))
3922
3923 (define-public python2-elib.intl
3924 (package
3925 (name "python2-elib.intl")
3926 (version "0.0.3")
3927 (source
3928 (origin
3929 ;; This project doesn't tag releases or publish tarballs, so we take
3930 ;; source from a (semi-arbitrary, i.e. latest as of now) git commit.
3931 (method git-fetch)
3932 (uri (git-reference
3933 (url "https://github.com/dieterv/elib.intl.git")
3934 (commit "d09997cfef")))
3935 (sha256
3936 (base32
3937 "0y7vzff9xgbnaay7m0va1arl6g68ncwrvbgwl7jqlclsahzzb09d"))))
3938 (build-system python-build-system)
3939 (native-inputs
3940 `(("python2-setuptools" ,python2-setuptools)))
3941 (arguments
3942 ;; incompatible with Python 3 (exception syntax)
3943 `(#:python ,python-2
3944 #:tests? #f
3945 ;; With standard flags, the install phase attempts to create a zip'd
3946 ;; egg file, and fails with an error: 'ZIP does not support timestamps
3947 ;; before 1980'
3948 #:configure-flags '("--single-version-externally-managed"
3949 "--record=elib.txt")))
3950 (home-page "https://github.com/dieterv/elib.intl")
3951 (synopsis "Enhanced internationalization for Python")
3952 (description
3953 "The elib.intl module provides enhanced internationalization (I18N)
3954 services for your Python modules and applications.")
3955 (license license:lgpl3+)))
3956
3957 (define-public python-pillow
3958 (package
3959 (name "python-pillow")
3960 (version "3.3.1")
3961 (source
3962 (origin
3963 (method url-fetch)
3964 (uri (pypi-uri "Pillow" version))
3965 (sha256
3966 (base32
3967 "1w9x3dfrg8b5lqhpjl0fczfyf9842wbqwgxbjjq4vfpxv5jwm49l"))))
3968 (build-system python-build-system)
3969 (native-inputs
3970 `(("python-setuptools" ,python-setuptools)
3971 ("python-nose" ,python-nose)))
3972 (inputs
3973 `(("freetype" ,freetype)
3974 ("lcms" ,lcms)
3975 ("zlib" ,zlib)
3976 ("libjpeg" ,libjpeg)
3977 ("openjpeg" ,openjpeg)
3978 ("libtiff" ,libtiff)
3979 ("libwebp" ,libwebp)))
3980 (propagated-inputs
3981 `(;; Used at runtime for pkg_resources
3982 ("python-setuptools" ,python-setuptools)))
3983 (arguments
3984 `(#:phases (modify-phases %standard-phases
3985 (add-before
3986 'install 'disable-egg-compression
3987 (lambda _
3988 ;; Leave the .egg uncompressed since compressing it would
3989 ;; prevent the GC from identifying run-time dependencies.
3990 ;; See <http://bugs.gnu.org/20765>.
3991 (let ((port (open-file "setup.cfg" "a")))
3992 (display "\n[easy_install]\nzip_ok = 0\n"
3993 port)
3994 (close-port port)
3995 #t)))
3996 (add-after
3997 'install 'check-installed
3998 (lambda _
3999 (begin
4000 (setenv "HOME" (getcwd))
4001 (and (zero? (system* "python" "selftest.py"
4002 "--installed"))
4003 (zero? (system* "python" "test-installed.py"))))))
4004 (delete 'check))))
4005 (home-page "https://pypi.python.org/pypi/Pillow")
4006 (synopsis "Fork of the Python Imaging Library")
4007 (description
4008 "The Python Imaging Library adds image processing capabilities to your
4009 Python interpreter. This library provides extensive file format support, an
4010 efficient internal representation, and fairly powerful image processing
4011 capabilities. The core image library is designed for fast access to data
4012 stored in a few basic pixel formats. It should provide a solid foundation for
4013 a general image processing tool.")
4014 (license (license:x11-style
4015 "http://www.pythonware.com/products/pil/license.htm"
4016 "The PIL Software License"))))
4017
4018 (define-public python2-pillow
4019 (package-with-python2 python-pillow))
4020
4021 (define-public python-pycparser
4022 (package
4023 (name "python-pycparser")
4024 (version "2.14")
4025 (source
4026 (origin
4027 (method url-fetch)
4028 (uri (pypi-uri "pycparser" version))
4029 (sha256
4030 (base32
4031 "0wvzyb6rxsfj3xcnpa4ynbh9qc7rrbk2277d5wqpphmx9akv8nbr"))))
4032 (outputs '("out" "doc"))
4033 (build-system python-build-system)
4034 (native-inputs
4035 `(("pkg-config" ,pkg-config)
4036 ("python-setuptools" ,python-setuptools)))
4037 (arguments
4038 `(#:phases
4039 (alist-replace
4040 'check
4041 (lambda _
4042 (with-directory-excursion "tests"
4043 (zero? (system* "python" "all_tests.py"))))
4044 (alist-cons-after
4045 'install 'install-doc
4046 (lambda* (#:key outputs #:allow-other-keys)
4047 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4048 (doc (string-append data "/doc/" ,name "-" ,version))
4049 (examples (string-append doc "/examples")))
4050 (mkdir-p examples)
4051 (for-each (lambda (file)
4052 (copy-file (string-append "." file)
4053 (string-append doc file)))
4054 '("/README.rst" "/CHANGES" "/LICENSE"))
4055 (copy-recursively "examples" examples)))
4056 %standard-phases))))
4057 (home-page "https://github.com/eliben/pycparser")
4058 (synopsis "C parser in Python")
4059 (description
4060 "Pycparser is a complete parser of the C language, written in pure Python
4061 using the PLY parsing library. It parses C code into an AST and can serve as
4062 a front-end for C compilers or analysis tools.")
4063 (license license:bsd-3)))
4064
4065 (define-public python2-pycparser
4066 (package-with-python2 python-pycparser))
4067
4068 (define-public python-cffi
4069 (package
4070 (name "python-cffi")
4071 (version "1.4.2")
4072 (source
4073 (origin
4074 (method url-fetch)
4075 (uri (pypi-uri "cffi" version))
4076 (sha256
4077 (base32 "161rj52rzi3880lij17d6i9kvgkiwjilrqjs8405k8sf6ryif7cg"))))
4078 (build-system python-build-system)
4079 (outputs '("out" "doc"))
4080 (inputs
4081 `(("libffi" ,libffi)))
4082 (propagated-inputs ; required at run-time
4083 `(("python-pycparser" ,python-pycparser)))
4084 (native-inputs
4085 `(("pkg-config" ,pkg-config)
4086 ("python-sphinx" ,python-sphinx)
4087 ("python-pytest" ,python-pytest)
4088 ("python-setuptools" ,python-setuptools)))
4089 (arguments
4090 `(#:phases
4091 (alist-cons-after
4092 'install 'install-doc
4093 (lambda* (#:key outputs #:allow-other-keys)
4094 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4095 (doc (string-append data "/doc/" ,name "-" ,version))
4096 (html (string-append doc "/html")))
4097 (with-directory-excursion "doc"
4098 (system* "make" "html")
4099 (mkdir-p html)
4100 (copy-recursively "build/html" html))
4101 (copy-file "LICENSE" (string-append doc "/LICENSE"))))
4102 %standard-phases)))
4103 (home-page "http://cffi.readthedocs.org")
4104 (synopsis "Foreign function interface for Python")
4105 (description
4106 "Foreign Function Interface for Python calling C code.")
4107 (license license:expat)))
4108
4109 (define-public python2-cffi
4110 (package-with-python2 python-cffi))
4111
4112 (define-public python-xcffib
4113 (package
4114 (name "python-xcffib")
4115 (version "0.1.9")
4116 (source
4117 (origin
4118 (method url-fetch)
4119 (uri (string-append "https://pypi.python.org/packages/source/x/"
4120 "xcffib/xcffib-" version ".tar.gz"))
4121 (sha256
4122 (base32
4123 "0655hzxv57h1a9ja9kwp0ichbkhf3djw32k33d66xp0q37dq2y81"))))
4124 (build-system python-build-system)
4125 (inputs
4126 `(("libxcb" ,libxcb)
4127 ("python-six" ,python-six)))
4128 (native-inputs
4129 `(("python-setuptools" ,python-setuptools)))
4130 (propagated-inputs
4131 `(("python-cffi" ,python-cffi))) ; used at run time
4132 (arguments
4133 `(#:phases
4134 (alist-cons-after
4135 'install 'install-doc
4136 (lambda* (#:key outputs #:allow-other-keys)
4137 (let ((doc (string-append (assoc-ref outputs "out") "/share"
4138 "/doc/" ,name "-" ,version)))
4139 (mkdir-p doc)
4140 (copy-file "README.md"
4141 (string-append doc "/README.md"))))
4142 %standard-phases)))
4143 (home-page "https://github.com/tych0/xcffib")
4144 (synopsis "XCB Python bindings")
4145 (description
4146 "Xcffib is a replacement for xpyb, an XCB Python bindings. It adds
4147 support for Python 3 and PyPy. It is based on cffi.")
4148 (license license:expat)))
4149
4150 (define-public python2-xcffib
4151 (package-with-python2 python-xcffib))
4152
4153 (define-public python-cairocffi
4154 (package
4155 (name "python-cairocffi")
4156 (version "0.6")
4157 (source
4158 (origin
4159 (method url-fetch)
4160 ;; The archive on pypi is missing the 'utils' directory!
4161 (uri (string-append "https://github.com/SimonSapin/cairocffi/archive/v"
4162 version ".tar.gz"))
4163 (file-name (string-append name "-" version ".tar.gz"))
4164 (sha256
4165 (base32
4166 "03w5p62sp3nqiccx864sbq0jvh7946277jqx3rcc3dch5xwfvv51"))))
4167 (build-system python-build-system)
4168 (outputs '("out" "doc"))
4169 (inputs
4170 `(("gdk-pixbuf" ,gdk-pixbuf)
4171 ("cairo" ,cairo)))
4172 (native-inputs
4173 `(("pkg-config" ,pkg-config)
4174 ("python-sphinx" ,python-sphinx)
4175 ("python-docutils" ,python-docutils)
4176 ("python-setuptools" ,python-setuptools)))
4177 (propagated-inputs
4178 `(("python-xcffib" ,python-xcffib))) ; used at run time
4179 (arguments
4180 `(#:phases
4181 (alist-cons-after
4182 'install 'install-doc
4183 (lambda* (#:key inputs outputs #:allow-other-keys)
4184 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4185 (doc (string-append data "/doc/" ,name "-" ,version))
4186 (html (string-append doc "/html")))
4187 (setenv "LD_LIBRARY_PATH"
4188 (string-append (assoc-ref inputs "cairo") "/lib" ":"
4189 (assoc-ref inputs "gdk-pixbuf") "/lib"))
4190 (setenv "LANG" "en_US.UTF-8")
4191 (mkdir-p html)
4192 (for-each (lambda (file)
4193 (copy-file (string-append "." file)
4194 (string-append doc file)))
4195 '("/README.rst" "/CHANGES" "/LICENSE"))
4196 (system* "python" "setup.py" "build_sphinx")
4197 (copy-recursively "docs/_build/html" html)))
4198 %standard-phases)))
4199 (home-page "https://github.com/SimonSapin/cairocffi")
4200 (synopsis "Python bindings and object-oriented API for Cairo")
4201 (description
4202 "Cairocffi is a CFFI-based drop-in replacement for Pycairo, a set of
4203 Python bindings and object-oriented API for cairo. Cairo is a 2D vector
4204 graphics library with support for multiple backends including image buffers,
4205 PNG, PostScript, PDF, and SVG file output.")
4206 (license license:bsd-3)))
4207
4208 (define-public python2-cairocffi
4209 (package-with-python2 python-cairocffi))
4210
4211 (define-public python-decorator
4212 (package
4213 (name "python-decorator")
4214 (version "4.0.9")
4215 (source
4216 (origin
4217 (method url-fetch)
4218 (uri (pypi-uri "decorator" version))
4219 (sha256
4220 (base32 "1a5vwhflfd9sh3rfb40xlyipldgdzfff6brman57hqv3661jw0lh"))))
4221 (build-system python-build-system)
4222 (arguments '(#:tests? #f)) ; no test target
4223 (native-inputs
4224 `(("python-setuptools" ,python-setuptools)))
4225 (home-page "https://pypi.python.org/pypi/decorator/")
4226 (synopsis "Python module to simplify usage of decorators")
4227 (description
4228 "The aim of the decorator module is to simplify the usage of decorators
4229 for the average programmer, and to popularize decorators usage giving examples
4230 of useful decorators, such as memoize, tracing, redirecting_stdout, locked,
4231 etc. The core of this module is a decorator factory.")
4232 (license license:expat)))
4233
4234 (define-public python2-decorator
4235 (package-with-python2 python-decorator))
4236
4237 (define-public python-drmaa
4238 (package
4239 (name "python-drmaa")
4240 (version "0.7.6")
4241 (source
4242 (origin
4243 (method url-fetch)
4244 (uri (string-append
4245 "https://pypi.python.org/packages/source/d/drmaa/drmaa-"
4246 version ".tar.gz"))
4247 (sha256
4248 (base32 "0bzl9f9g34dlhwf09i3fdv7dqqzf2iq0w7d6c2bafx1nlap8qfbh"))))
4249 (build-system python-build-system)
4250 ;; The test suite requires libdrmaa which is provided by the cluster
4251 ;; environment. At runtime the environment variable DRMAA_LIBRARY_PATH
4252 ;; should be set to the path of the libdrmaa library.
4253 (arguments '(#:tests? #f))
4254 (native-inputs
4255 `(("python-nose" ,python-nose)
4256 ("python-setuptools" ,python-setuptools)))
4257 (home-page "https://pypi.python.org/pypi/drmaa")
4258 (synopsis "Python bindings for the DRMAA library")
4259 (description
4260 "A Python package for Distributed Resource Management (DRM) job
4261 submission and control. This package is an implementation of the DRMAA 1.0
4262 Python language binding specification.")
4263 (license license:bsd-3)))
4264
4265 (define-public python2-drmaa
4266 (package-with-python2 python-drmaa))
4267
4268 (define-public python-gridmap
4269 (package
4270 (name "python-gridmap")
4271 (version "0.13.0")
4272 (source
4273 (origin
4274 (method url-fetch)
4275 (uri (string-append
4276 "https://github.com/pygridtools/gridmap/archive/v"
4277 version ".tar.gz"))
4278 (file-name (string-append name "-" version ".tar.gz"))
4279 (sha256
4280 (base32 "1gzjg2k6f14i1msm2b0ax8d9ds1hvk6qd5nlaivg8m4cxqp4cp1x"))))
4281 (build-system python-build-system)
4282 (inputs
4283 `(("python-psutil" ,python-psutil)
4284 ("python-drmaa" ,python-drmaa)
4285 ("python-pyzmq" ,python-pyzmq)))
4286 (native-inputs
4287 `(("python-setuptools" ,python-setuptools)))
4288 (home-page "https://github.com/pygridtools/gridmap")
4289 (synopsis "Create jobs on a cluster directly from Python")
4290 (description
4291 "Gridmap is a Python package to allow you to easily create jobs on the
4292 cluster directly from Python. You can directly map Python functions onto the
4293 cluster without needing to write any wrapper code yourself.")
4294 (license license:gpl3+)))
4295
4296 (define-public python2-gridmap
4297 (package-with-python2 python-gridmap))
4298
4299 (define-public python-pexpect
4300 (package
4301 (name "python-pexpect")
4302 (version "3.3")
4303 (source
4304 (origin
4305 (method url-fetch)
4306 (uri (string-append "https://pypi.python.org/packages/source/p/"
4307 "pexpect/pexpect-" version ".tar.gz"))
4308 (sha256
4309 (base32 "1fp5gm976z7ghm8jw57463rj19cv06c8zw842prgyg788f6n3snz"))))
4310 (build-system python-build-system)
4311 (arguments
4312 `(#:phases
4313 (modify-phases %standard-phases
4314 (replace 'check (lambda _ (zero? (system* "nosetests")))))))
4315 (native-inputs
4316 `(("python-nose" ,python-nose)))
4317 (home-page "http://pexpect.readthedocs.org/")
4318 (synopsis "Controlling interactive console applications")
4319 (description
4320 "Pexpect is a pure Python module for spawning child applications;
4321 controlling them; and responding to expected patterns in their output.
4322 Pexpect works like Don Libes’ Expect. Pexpect allows your script to spawn a
4323 child application and control it as if a human were typing commands.")
4324 (license license:isc)))
4325
4326 (define-public python2-pexpect
4327 (package-with-python2 python-pexpect))
4328
4329 (define-public python-setuptools-scm
4330 (package
4331 (name "python-setuptools-scm")
4332 (version "1.11.1")
4333 (source (origin
4334 (method url-fetch)
4335 (uri (pypi-uri "setuptools_scm" version))
4336 (sha256
4337 (base32
4338 "1gqr73i150yzj3mz32854vj93x07yr52kn8fdckwa41ll8wgficc"))))
4339 (build-system python-build-system)
4340 (native-inputs `(("python-setuptools" ,python-setuptools)))
4341 (home-page "https://github.com/pypa/setuptools_scm/")
4342 (synopsis "Manage Python package versions in SCM metadata")
4343 (description
4344 "Setuptools_scm handles managing your Python package versions in
4345 @dfn{software configuration management} (SCM) metadata instead of declaring
4346 them as the version argument or in a SCM managed file.")
4347 (license license:expat)))
4348
4349 (define-public python2-setuptools-scm
4350 (package-with-python2 python-setuptools-scm))
4351
4352 (define-public python-pathpy
4353 (package
4354 (name "python-pathpy")
4355 (version "8.1.1")
4356 (source
4357 (origin
4358 (method url-fetch)
4359 (uri (string-append "https://pypi.python.org/packages/source/p/"
4360 "path.py/path.py-" version ".tar.gz"))
4361 (sha256
4362 (base32 "1p8s1l2vfkqhqxdhqlj0g1jjw4f1as2frr35sjcpjjpd5a89y41f"))))
4363 (build-system python-build-system)
4364 (propagated-inputs
4365 `(("python-appdirs" ,python-appdirs)))
4366 (native-inputs
4367 `(("python-setuptools" ,python-setuptools)
4368 ("python-setuptools-scm" ,python-setuptools-scm)
4369 ("python-pytest" ,python-pytest)
4370 ("python-pytest-runner" ,python-pytest-runner)))
4371 (home-page "http://github.com/jaraco/path.py")
4372 (synopsis "Python module wrapper for built-in os.path")
4373 (description
4374 "@code{path.py} implements path objects as first-class entities, allowing
4375 common operations on files to be invoked on those path objects directly.")
4376 (license license:expat)))
4377
4378 (define-public python2-pathpy
4379 (package-with-python2 python-pathpy))
4380
4381 (define-public python-pickleshare
4382 (package
4383 (name "python-pickleshare")
4384 (version "0.5")
4385 (source
4386 (origin
4387 (method url-fetch)
4388 (uri (string-append "https://pypi.python.org/packages/source/p/"
4389 "pickleshare/pickleshare-" version ".tar.gz"))
4390 (sha256
4391 (base32 "11ljr90j3p6qswdrbl7p4cjb2i93f6vn0vx9anzpshsx0d2mggn0"))))
4392 (build-system python-build-system)
4393 (propagated-inputs
4394 `(("python-pathpy" ,python-pathpy)))
4395 (native-inputs
4396 `(("python-setuptools" ,python-setuptools)))
4397 (home-page "https://github.com/vivainio/pickleshare")
4398 (synopsis "Tiny key value database with concurrency support")
4399 (description
4400 "PickleShare is a small ‘shelve’-like datastore with concurrency support.
4401 Like shelve, a PickleShareDB object acts like a normal dictionary. Unlike
4402 shelve, many processes can access the database simultaneously. Changing a
4403 value in database is immediately visible to other processes accessing the same
4404 database. Concurrency is possible because the values are stored in separate
4405 files. Hence the “database” is a directory where all files are governed by
4406 PickleShare.")
4407 (license license:expat)))
4408
4409 (define-public python2-pickleshare
4410 (package-with-python2 python-pickleshare))
4411
4412 (define-public python-simplegeneric
4413 (package
4414 (name "python-simplegeneric")
4415 (version "0.8.1")
4416 (source
4417 (origin
4418 (method url-fetch)
4419 (uri (string-append "https://pypi.python.org/packages/source/s/"
4420 "simplegeneric/simplegeneric-" version ".zip"))
4421 (sha256
4422 (base32 "0wwi1c6md4vkbcsfsf8dklf3vr4mcdj4mpxkanwgb6jb1432x5yw"))))
4423 (build-system python-build-system)
4424 (native-inputs
4425 `(("python-setuptools" ,python-setuptools)
4426 ("unzip" ,unzip)))
4427 (home-page "http://cheeseshop.python.org/pypi/simplegeneric")
4428 (synopsis "Python module for simple generic functions")
4429 (description
4430 "The simplegeneric module lets you define simple single-dispatch generic
4431 functions, akin to Python’s built-in generic functions like @code{len()},
4432 @code{iter()} and so on. However, instead of using specially-named methods,
4433 these generic functions use simple lookup tables, akin to those used by
4434 e.g. @code{pickle.dump()} and other generic functions found in the Python
4435 standard library.")
4436 (license license:zpl2.1)))
4437
4438 (define-public python2-simplegeneric
4439 (package-with-python2 python-simplegeneric))
4440
4441 (define-public python-ipython-genutils
4442 (package
4443 (name "python-ipython-genutils")
4444 (version "0.1.0")
4445 (source
4446 (origin
4447 (method url-fetch)
4448 (uri (string-append "https://pypi.python.org/packages/source/i/"
4449 "ipython_genutils/ipython_genutils-"
4450 version ".tar.gz"))
4451 (sha256
4452 (base32 "19l2pp1c64ansr89l3cqh19jdi2ixhssdzx0vz4n6r52a6i281is"))))
4453 (build-system python-build-system)
4454 (arguments `(#:tests? #f)) ; no tests
4455 (home-page "http://ipython.org")
4456 (synopsis "Vestigial utilities from IPython")
4457 (description
4458 "This package provides retired utilities from IPython.")
4459 (license license:bsd-3)))
4460
4461 (define-public python2-ipython-genutils
4462 (package-with-python2 python-ipython-genutils))
4463
4464 (define-public python-traitlets
4465 (package
4466 (name "python-traitlets")
4467 (version "4.1.0")
4468 (source
4469 (origin
4470 (method url-fetch)
4471 (uri (pypi-uri "traitlets" version))
4472 (sha256
4473 (base32
4474 "0nxgj8jxlm1kqf8cx2x7vjid05zdgbxpqhjbdl46r8njlpgkh3j4"))))
4475 (build-system python-build-system)
4476 (arguments
4477 `(#:phases
4478 (modify-phases %standard-phases
4479 (replace 'check (lambda _ (zero? (system* "nosetests")))))))
4480 (propagated-inputs
4481 `(("python-ipython-genutils" ,python-ipython-genutils)
4482 ("python-decorator" ,python-decorator)))
4483 (native-inputs
4484 `(("python-mock" ,python-mock)
4485 ("python-nose" ,python-nose)))
4486 (home-page "http://ipython.org")
4487 (synopsis "Configuration system for Python applications")
4488 (description
4489 "Traitlets is a framework that lets Python classes have attributes with
4490 type checking, dynamically calculated default values, and ‘on change’
4491 callbacks. The package also includes a mechanism to use traitlets for
4492 configuration, loading values from files or from command line arguments. This
4493 is a distinct layer on top of traitlets, so you can use traitlets in your code
4494 without using the configuration machinery.")
4495 (license license:bsd-3)))
4496
4497 (define-public python2-traitlets
4498 (package-with-python2 python-traitlets))
4499
4500 (define-public python-ipython
4501 (package
4502 (name "python-ipython")
4503 (version "3.2.1")
4504 (source
4505 (origin
4506 (method url-fetch)
4507 (patches (search-patches "python-ipython-inputhook-ctype.patch"))
4508 (uri (string-append "https://pypi.python.org/packages/source/i/"
4509 "ipython/ipython-" version ".tar.gz"))
4510 (sha256
4511 (base32 "0xwin0sa9n0cabx4cq1ibf5ldsiw5dyimibla82kicz5gbpas4y9"))))
4512 (build-system python-build-system)
4513 (outputs '("out" "doc"))
4514 (propagated-inputs
4515 `(("python-pyzmq" ,python-pyzmq)
4516 ("python-terminado" ,python-terminado)))
4517 (inputs
4518 `(("readline" ,readline)
4519 ("which" ,which)
4520 ("python-matplotlib" ,python-matplotlib)
4521 ("python-numpy" ,python-numpy)
4522 ("python-numpydoc" ,python-numpydoc)
4523 ("python-jinja2" ,python-jinja2)
4524 ("python-mistune" ,python-mistune)
4525 ("python-jsonschema" ,python-jsonschema)
4526 ("python-pygments" ,python-pygments)
4527 ("python-requests" ,python-requests) ;; for tests
4528 ("python-nose" ,python-nose)))
4529 (native-inputs
4530 `(("pkg-config" ,pkg-config)
4531 ("python-sphinx" ,python-sphinx)
4532 ("texlive" ,texlive)
4533 ("texinfo" ,texinfo)
4534 ("python-setuptools" ,python-setuptools)))
4535 (arguments
4536 `(#:phases
4537 (modify-phases %standard-phases
4538 (add-after
4539 'install 'install-doc
4540 (lambda* (#:key inputs outputs #:allow-other-keys)
4541 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4542 (doc (string-append data "/doc/" ,name "-" ,version))
4543 (html (string-append doc "/html"))
4544 (man1 (string-append data "/man/man1"))
4545 (info (string-append data "/info"))
4546 (examples (string-append doc "/examples")))
4547 (setenv "LANG" "en_US.utf8")
4548 (with-directory-excursion "docs"
4549 ;; FIXME: html and pdf fail to build
4550 ;; (system* "make" "html")
4551 ;; (system* "make" "pdf" "PAPER=a4")
4552 (system* "make" "info"))
4553 (copy-recursively "docs/man" man1)
4554 (copy-recursively "examples" examples)
4555 ;; (copy-recursively "docs/build/html" html)
4556 ;; (copy-file "docs/build/latex/ipython.pdf"
4557 ;; (string-append doc "/ipython.pdf"))
4558 (mkdir-p info)
4559 (copy-file "docs/build/texinfo/ipython.info"
4560 (string-append info "/ipython.info"))
4561 (copy-file "COPYING.rst" (string-append doc "/COPYING.rst")))))
4562 ;; Tests can only be run after the library has been installed and not
4563 ;; within the source directory.
4564 (delete 'check)
4565 (add-after
4566 'install 'check
4567 (lambda* (#:key outputs tests? #:allow-other-keys)
4568 (if tests?
4569 (with-directory-excursion "/tmp"
4570 (setenv "HOME" "/tmp/") ;; required by a test
4571 (zero? (system* (string-append (assoc-ref outputs "out")
4572 "/bin/iptest"))))
4573 #t)))
4574 (add-before
4575 'install 'fix-tests
4576 (lambda* (#:key inputs #:allow-other-keys)
4577 (substitute* "./IPython/utils/_process_posix.py"
4578 (("/usr/bin/env', 'which") (which "which")))
4579 (substitute* "./IPython/core/tests/test_inputtransformer.py"
4580 (("#!/usr/bin/env python")
4581 (string-append "#!" (which "python"))))
4582 ;; Disable 1 failing test
4583 (substitute* "./IPython/core/tests/test_magic.py"
4584 (("def test_dirops\\(\\):" all)
4585 (string-append "@dec.skipif(True)\n" all))))))))
4586 (home-page "http://ipython.org")
4587 (synopsis "IPython is a tool for interactive computing in Python")
4588 (description
4589 "IPython provides a rich architecture for interactive computing with:
4590 Powerful interactive shells, a browser-based notebook, support for interactive
4591 data visualization, embeddable interpreters and tools for parallel
4592 computing.")
4593 (license license:bsd-3)
4594 (properties `((python2-variant . ,(delay python2-ipython))))))
4595
4596 (define-public python2-ipython
4597 (let ((ipython (package-with-python2 (strip-python2-variant python-ipython))))
4598 (package
4599 (inherit ipython)
4600 ;; FIXME: some tests are failing
4601 (arguments
4602 `(#:tests? #f ,@(package-arguments ipython)))
4603 ;; FIXME: add pyreadline once available.
4604 (inputs
4605 `(("python2-mock" ,python2-mock)
4606 ,@(package-inputs ipython))))))
4607
4608 (define-public python-isodate
4609 (package
4610 (name "python-isodate")
4611 (version "0.5.4")
4612 (source
4613 (origin
4614 (method url-fetch)
4615 (uri (pypi-uri "isodate" version))
4616 (sha256
4617 (base32
4618 "0cafaiwixgpxwh9dsd28qb0dbzsj6xpxjdkyk30ns91ps10mq422"))))
4619 (build-system python-build-system)
4620 (inputs
4621 `(("python-setuptools" ,python-setuptools)))
4622 (home-page
4623 "http://cheeseshop.python.org/pypi/isodate")
4624 (synopsis
4625 "Python date parser and formatter")
4626 (description
4627 "Python-isodate is a python module for parsing and formatting
4628 ISO 8601 dates, time and duration.")
4629 (license license:bsd-3)))
4630
4631 (define-public python2-isodate
4632 (package-with-python2 python-isodate))
4633
4634 (define-public python-html5lib
4635 (package
4636 (name "python-html5lib")
4637 (version "1.0b8")
4638 (source
4639 (origin
4640 (method url-fetch)
4641 (uri (pypi-uri "html5lib" version))
4642 (sha256
4643 (base32
4644 "1lknq5j3nh11xrl268ks76zaj0gyzh34v94n5vbf6dk8llzxdx0q"))))
4645 (build-system python-build-system)
4646 (propagated-inputs
4647 `(("python-six" ,python-six))) ; required to "import html5lib"
4648 (inputs
4649 `(("python-setuptools" ,python-setuptools)))
4650 (arguments
4651 `(#:test-target "check"))
4652 (home-page
4653 "https://github.com/html5lib/html5lib-python")
4654 (synopsis
4655 "Python HTML parser based on the WHATWG HTML specifcation")
4656 (description
4657 "Html5lib is an HTML parser based on the WHATWG HTML specifcation
4658 and written in Python.")
4659 (license license:expat)))
4660
4661 (define-public python2-html5lib
4662 (package-with-python2 python-html5lib))
4663
4664 (define-public python-urwid
4665 (package
4666 (name "python-urwid")
4667 (version "1.3.1")
4668 (source
4669 (origin
4670 (method url-fetch)
4671 (uri (pypi-uri "urwid" version))
4672 (sha256
4673 (base32
4674 "18cnd1wdjcas08x5qwa5ayw6jsfcn33w4d9f7q3s29fy6qzc1kng"))))
4675 (build-system python-build-system)
4676 (arguments
4677 `(#:phases
4678 (modify-phases %standard-phases
4679 ;; Disable failing test. Bug filed upstream:
4680 ;; https://github.com/wardi/urwid/issues/164
4681 ;; TODO: check again for python-urwid > 1.3.1 or python > 3.4.3.
4682 (add-after 'unpack 'disable-failing-test
4683 (lambda _
4684 (substitute* "urwid/tests/test_event_loops.py"
4685 (("test_remove_watch_file")
4686 "disable_remove_watch_file")))))))
4687 (native-inputs `(("python-setuptools" ,python-setuptools)))
4688 (home-page "http://urwid.org")
4689 (synopsis "Console user interface library for Python")
4690 (description
4691 "Urwid is a curses-based UI/widget library for Python. It includes many
4692 features useful for text console applications.")
4693 (license license:lgpl2.1+)))
4694
4695 (define-public python2-urwid
4696 (package-with-python2 python-urwid))
4697
4698 (define-public python-urwidtrees
4699 (package
4700 (name "python-urwidtrees")
4701 (version "1.0.2")
4702 (source
4703 (origin
4704 (method url-fetch)
4705 ;; package author intends on distributing via github rather than pypi:
4706 ;; https://github.com/pazz/alot/issues/877#issuecomment-230173331
4707 (uri (string-append "https://github.com/pazz/urwidtrees/archive/"
4708 version ".tar.gz"))
4709 (file-name (string-append name "-" version ".tar.gz"))
4710 (sha256
4711 (base32
4712 "0d30lyd3s2a97rhqfax5w9ssqds2z6aydqx3c6j2c2lk3cb4ngvh"))))
4713 (build-system python-build-system)
4714 (arguments
4715 '(#:tests? #f)) ; no tests
4716 (inputs `(("python-urwid" ,python-urwid)))
4717 (home-page "https://github.com/pazz/urwidtrees")
4718 (synopsis "Tree widgets for urwid")
4719 (description "Urwidtrees is a Widget Container API for the @code{urwid}
4720 toolkit. Use it to build trees of widgets.")
4721 (license license:gpl3+)))
4722
4723 (define-public python2-urwidtrees
4724 (package-with-python2 python-urwidtrees))
4725
4726 (define-public python-dbus
4727 (package
4728 (name "python-dbus")
4729 (version "1.2.0")
4730 (source
4731 (origin
4732 (method url-fetch)
4733 (uri (string-append
4734 "https://dbus.freedesktop.org/releases/dbus-python/dbus-python-"
4735 version ".tar.gz"))
4736 (sha256
4737 (base32 "1py62qir966lvdkngg0v8k1khsqxwk5m4s8nflpk1agk5f5nqb71"))))
4738 (build-system gnu-build-system)
4739 (arguments
4740 '(#:phases
4741 (modify-phases %standard-phases
4742 (add-before
4743 'check 'pre-check
4744 (lambda _
4745 ;; XXX: For the missing '/etc/machine-id'.
4746 (substitute* "test/run-test.sh"
4747 (("DBUS_FATAL_WARNINGS=1")
4748 "DBUS_FATAL_WARNINGS=0"))
4749 #t)))))
4750 (native-inputs
4751 `(("pkg-config" ,pkg-config)))
4752 (inputs
4753 `(("python" ,python)
4754 ("dbus-glib" ,dbus-glib)))
4755 (synopsis "Python bindings for D-bus")
4756 (description "python-dbus provides bindings for libdbus, the reference
4757 implementation of D-Bus.")
4758 (home-page "http://www.freedesktop.org/wiki/Software/DBusBindings/")
4759 (license license:expat)))
4760
4761 (define-public python2-dbus
4762 (package (inherit python-dbus)
4763 (name "python2-dbus")
4764 (inputs `(("python" ,python-2)
4765 ,@(alist-delete "python"
4766 (package-inputs python-dbus)
4767 equal?)))
4768 ;; FIXME: on Python 2, the test_utf8 fails with:
4769 ;; "ValueError: unichr() arg not in range(0x10000) (narrow Python build)"
4770 (arguments `(#:tests? #f))))
4771
4772 (define-public python-apsw
4773 (package
4774 (name "python-apsw")
4775 (version "3.9.2-r1")
4776 (source
4777 (origin
4778 (method url-fetch)
4779 (uri (pypi-uri "apsw" version))
4780 (sha256
4781 (base32
4782 "0w4jb0wpx785qw42r3h4fh7gl5w2968q48i7gygybsfxck8nzffs"))))
4783 (build-system python-build-system)
4784 (inputs
4785 `(("python-setuptools" ,python-setuptools)
4786 ("sqlite" ,sqlite)))
4787 (arguments
4788 `(#:phases
4789 ;; swap check and install phases
4790 (alist-cons-after
4791 'install 'check
4792 (assoc-ref %standard-phases 'check)
4793 (alist-delete
4794 'check
4795 %standard-phases))))
4796 (home-page "https://github.com/rogerbinns/apsw/")
4797 (synopsis "Another Python SQLite Wrapper")
4798 (description "APSW is a Python wrapper for the SQLite
4799 embedded relational database engine. In contrast to other wrappers such as
4800 pysqlite it focuses on being a minimal layer over SQLite attempting just to
4801 translate the complete SQLite API into Python.")
4802 (license license:zlib)))
4803
4804 (define-public python2-apsw
4805 (package-with-python2 python-apsw))
4806
4807 (define-public python-lxml
4808 (package
4809 (name "python-lxml")
4810 (version "3.6.0")
4811 (source
4812 (origin
4813 (method url-fetch)
4814 (uri (pypi-uri "lxml" version))
4815 (sha256
4816 (base32
4817 "1pvbmiy2m7jwv493kilbghhj2pkh8wy1na3ji350vhzhlwlclx4w"))))
4818 (build-system python-build-system)
4819 (inputs
4820 `(("libxml2" ,libxml2)
4821 ("libxslt" ,libxslt)
4822 ("python-setuptools" ,python-setuptools)))
4823 (home-page "http://lxml.de/")
4824 (synopsis
4825 "Python XML processing library")
4826 (description
4827 "The lxml XML toolkit is a Pythonic binding for the C libraries
4828 libxml2 and libxslt.")
4829 (license license:bsd-3))) ; and a few more, see LICENSES.txt
4830
4831 (define-public python2-lxml
4832 (package-with-python2 python-lxml))
4833
4834 ;; beautifulsoup4 has a totally different namespace than 3.x,
4835 ;; and pypi seems to put it under its own name, so I guess we should too
4836 (define-public python-beautifulsoup4
4837 (package
4838 (name "python-beautifulsoup4")
4839 (version "4.5.0")
4840 (source
4841 (origin
4842 (method url-fetch)
4843 (uri (pypi-uri "beautifulsoup4" version))
4844 (sha256
4845 (base32
4846 "1rf94360s8pmn37vxqjl0g74krq2p6nj3wbn6pj94ik6ny44q24f"))))
4847 (build-system python-build-system)
4848 (home-page
4849 "http://www.crummy.com/software/BeautifulSoup/bs4/")
4850 (synopsis
4851 "Python screen-scraping library")
4852 (description
4853 "Beautiful Soup is a Python library designed for rapidly setting up
4854 screen-scraping projects. It offers Pythonic idioms for navigating,
4855 searching, and modifying a parse tree, providing a toolkit for
4856 dissecting a document and extracting what you need. It automatically
4857 converts incoming documents to Unicode and outgoing documents to UTF-8.")
4858 (license license:expat)
4859 (properties `((python2-variant . ,(delay python2-beautifulsoup4))))))
4860
4861 (define-public python2-beautifulsoup4
4862 (package
4863 (inherit (package-with-python2
4864 (strip-python2-variant python-beautifulsoup4)))
4865 (native-inputs `(("python2-setuptools" ,python2-setuptools)))))
4866
4867 (define-public python2-cssutils
4868 (package
4869 (name "python2-cssutils")
4870 (version "1.0.1")
4871 (source
4872 (origin
4873 (method url-fetch)
4874 (uri (pypi-uri "cssutils" version))
4875 (sha256
4876 (base32
4877 "0qwha9x1wml2qmipbcz03gndnlwhzrjdvw9i09si247a90l8p8fq"))))
4878 (build-system python-build-system)
4879 (native-inputs
4880 `(("python2-mock" ,python2-mock) ; for the tests
4881 ("unzip" ,unzip))) ; for unpacking the source
4882 (inputs
4883 `(("python2-setuptools" ,python2-setuptools)))
4884 (arguments
4885 `(#:python ,python-2 ; Otherwise tests fail with a syntax error.
4886 #:tests? #f ; The tests apparently download an external URL.
4887 ))
4888 (home-page "http://cthedot.de/cssutils/")
4889 (synopsis
4890 "CSS Cascading Style Sheets library for Python")
4891 (description
4892 "Cssutils is a Python package for parsing and building CSS
4893 Cascading Style Sheets. Currently it provides a DOM only and no rendering
4894 options.")
4895 (license license:lgpl3+)))
4896
4897 (define-public python-cssselect
4898 (package
4899 (name "python-cssselect")
4900 (version "0.9.2")
4901 (source
4902 (origin
4903 (method url-fetch)
4904 (uri (pypi-uri "cssselect" version))
4905 (sha256
4906 (base32
4907 "1xg6gbva1yswghiycmgincv6ab4bn7hpm720ndbj40h8xycmnfvi"))))
4908 (build-system python-build-system)
4909 (inputs
4910 `(("python-setuptools" ,python-setuptools)))
4911 (arguments
4912 ;; tests fail with message
4913 ;; AttributeError: 'module' object has no attribute 'tests'
4914 `(#:tests? #f))
4915 (home-page
4916 "https://pythonhosted.org/cssselect/")
4917 (synopsis
4918 "CSS3 selector parser and translator to XPath 1.0")
4919 (description
4920 "Cssselect ia a Python module that parses CSS3 Selectors and translates
4921 them to XPath 1.0 expressions. Such expressions can be used in lxml or
4922 another XPath engine to find the matching elements in an XML or HTML document.")
4923 (license license:bsd-3)))
4924
4925 (define-public python2-cssselect
4926 (package-with-python2 python-cssselect))
4927
4928 (define-public python-netifaces
4929 (package
4930 (name "python-netifaces")
4931 (version "0.10.4")
4932 (source
4933 (origin
4934 (method url-fetch)
4935 (uri (string-append
4936 "https://pypi.python.org/packages/source/n/netifaces/netifaces-"
4937 version
4938 ".tar.gz"))
4939 (sha256
4940 (base32
4941 "1plw237a4zib4z8s62g0mrs8gm3kjfrp5sxh6bbk9nl3rdls2mln"))))
4942 (build-system python-build-system)
4943 (inputs
4944 `(("python-setuptools" ,python-setuptools)))
4945 (home-page
4946 "https://bitbucket.org/al45tair/netifaces")
4947 (synopsis
4948 "Python module for portable network interface information")
4949 (description
4950 "Netifaces is a Python module providing information on network
4951 interfaces in an easy and portable manner.")
4952 (license license:expat)))
4953
4954 (define-public python2-netifaces
4955 (package-with-python2 python-netifaces))
4956
4957 (define-public python-networkx
4958 (package
4959 (name "python-networkx")
4960 (version "1.11")
4961 (source
4962 (origin
4963 (method url-fetch)
4964 (uri (pypi-uri "networkx" version))
4965 (sha256
4966 (base32 "1f74s56xb4ggixiq0vxyfxsfk8p20c7a099lpcf60izv1php03hd"))))
4967 (build-system python-build-system)
4968 ;; python-decorator is needed at runtime
4969 (propagated-inputs
4970 `(("python-decorator" ,python-decorator)))
4971 (native-inputs
4972 `(("python-setuptools" ,python-setuptools)
4973 ("python-nose" ,python-nose)))
4974 (home-page "http://networkx.github.io/")
4975 (synopsis "Python module for creating and manipulating graphs and networks")
4976 (description
4977 "NetworkX is a Python package for the creation, manipulation, and study
4978 of the structure, dynamics, and functions of complex networks.")
4979 (license license:bsd-3)))
4980
4981 (define-public python2-networkx
4982 (package-with-python2 python-networkx))
4983
4984 (define-public snakemake
4985 (package
4986 (name "snakemake")
4987 (version "3.2.1")
4988 (source
4989 (origin
4990 (method url-fetch)
4991 (uri (string-append
4992 "https://pypi.python.org/packages/source/s/snakemake/snakemake-"
4993 version ".tar.gz"))
4994 (sha256
4995 (base32 "0fi4b63sj60hvi7rfydvmz2icl4wj74djw5sn2gl8hxd02qw4b91"))))
4996 (build-system python-build-system)
4997 (inputs `(("python-setuptools" ,python-setuptools)))
4998 (home-page "https://bitbucket.org/johanneskoester/snakemake")
4999 (synopsis "Python-based execution environment for make-like workflows")
5000 (description
5001 "Snakemake aims to reduce the complexity of creating workflows by
5002 providing a clean and modern domain specific specification language (DSL) in
5003 Python style, together with a fast and comfortable execution environment.")
5004 (license license:expat)))
5005
5006 (define-public python-seaborn
5007 (package
5008 (name "python-seaborn")
5009 (version "0.7.0")
5010 (source
5011 (origin
5012 (method url-fetch)
5013 (uri (pypi-uri "seaborn" version))
5014 (sha256
5015 (base32 "0ibi3xsfm2kysph61mnfy0pf8d5rkgxgrdb0z9nbizgcgdsb5a0m"))))
5016 (build-system python-build-system)
5017 (propagated-inputs
5018 `(("python-pandas" ,python-pandas)
5019 ("python-matplotlib" ,python-matplotlib)
5020 ("python-scipy" ,python-scipy)))
5021 (home-page "http://stanford.edu/~mwaskom/software/seaborn/")
5022 (synopsis "Statistical data visualization")
5023 (description
5024 "Seaborn is a library for making attractive and informative statistical
5025 graphics in Python. It is built on top of matplotlib and tightly integrated
5026 with the PyData stack, including support for numpy and pandas data structures
5027 and statistical routines from scipy and statsmodels.")
5028 (license license:bsd-3)
5029 (properties `((python2-variant . ,(delay python2-seaborn))))))
5030
5031 (define-public python2-seaborn
5032 (let ((base (package-with-python2 (strip-python2-variant python-seaborn))))
5033 (package
5034 (inherit base)
5035 (propagated-inputs `(("python2-pytz" ,python2-pytz)
5036 ,@(package-propagated-inputs base)))
5037 (native-inputs `(("python2-setuptools" ,python2-setuptools)
5038 ,@(package-native-inputs base))))))
5039
5040 (define-public python-sympy
5041 (package
5042 (name "python-sympy")
5043 (version "0.7.6")
5044 (source
5045 (origin
5046 (method url-fetch)
5047 (uri (string-append
5048 "https://github.com/sympy/sympy/releases/download/sympy-"
5049 version "/sympy-" version ".tar.gz"))
5050 (sha256
5051 (base32 "19yp0gy4i7p4g6l3b8vaqkj9qj7yqb5kqy0qgbdagpzgkdz958yz"))))
5052 (build-system python-build-system)
5053 (native-inputs
5054 `(("python-setuptools" ,python-setuptools)))
5055 (home-page "http://www.sympy.org/")
5056 (synopsis "Python library for symbolic mathematics")
5057 (description
5058 "SymPy is a Python library for symbolic mathematics. It aims to become a
5059 full-featured computer algebra system (CAS) while keeping the code as simple
5060 as possible in order to be comprehensible and easily extensible.")
5061 (license license:bsd-3)))
5062
5063 (define-public python2-sympy
5064 (package-with-python2 python-sympy))
5065
5066 (define-public python-q
5067 (package
5068 (name "python-q")
5069 (version "2.6")
5070 (source
5071 (origin
5072 (method url-fetch)
5073 (uri (pypi-uri "q" version))
5074 (sha256
5075 (base32
5076 "1mgfazh8fkizh6walra2zv885f3lcgr3nb02v1frfm4p8ddcy3yy"))))
5077 (build-system python-build-system)
5078 (home-page "https://github.com/zestyping/q")
5079 (synopsis "Quick-and-dirty debugging output for tired programmers")
5080 (description
5081 "q is a Python module for \"print\" style of debugging Python code. It
5082 provides convenient short API for print out of values, tracebacks, and
5083 falling into the Python interpreter.")
5084 (license license:asl2.0)
5085 (properties `((python2-variant . ,(delay python2-q))))))
5086
5087 (define-public python2-q
5088 (let ((base (package-with-python2 (strip-python2-variant python-q))))
5089 (package
5090 (inherit base)
5091 (native-inputs
5092 `(("python2-setuptools" ,python2-setuptools)
5093 ,@(package-native-inputs base))))))
5094
5095 (define-public python-testlib
5096 (package
5097 (name "python-testlib")
5098 (version "0.6.5")
5099 (source
5100 (origin
5101 (method url-fetch)
5102 (uri (string-append
5103 "https://pypi.python.org/packages/source/t/testlib/testlib-"
5104 version ".zip"))
5105 (sha256
5106 (base32 "1mz26cxn4x8bbgv0rn0mvj2z05y31rkc8009nvdlb3lam5b4mj3y"))))
5107 (build-system python-build-system)
5108 (inputs
5109 `(("python-setuptools" ,python-setuptools)))
5110 (native-inputs
5111 `(("unzip" ,unzip)))
5112 (arguments
5113 `(#:phases
5114 (alist-replace
5115 'unpack
5116 (lambda* (#:key inputs outputs #:allow-other-keys)
5117 (let ((unzip (string-append (assoc-ref inputs "unzip")
5118 "/bin/unzip"))
5119 (source (assoc-ref inputs "source")))
5120 (and (zero? (system* unzip source))
5121 (chdir (string-append "testlib-" ,version)))))
5122 %standard-phases)))
5123 (synopsis "Python micro test suite harness")
5124 (description "A micro unittest suite harness for Python.")
5125 (home-page "https://github.com/trentm/testlib")
5126 (license license:expat)))
5127
5128 (define-public python2-testlib
5129 (package-with-python2 python-testlib))
5130
5131 (define-public python2-xlib
5132 (package
5133 (name "python2-xlib")
5134 (version "0.14")
5135 (source (origin
5136 (method url-fetch)
5137 (uri (string-append "mirror://sourceforge/python-xlib/python-xlib"
5138 "/" version "/"
5139 "python-xlib-" version ".tar.gz"))
5140 (sha256
5141 (base32
5142 "1sv0447j0rx8cgs3jhjl695p5pv13ihglcjlrrz1kq05lsvb0wa7"))))
5143 (build-system python-build-system)
5144 (arguments
5145 `(#:python ,python-2 ;Python 2 only
5146 #:tests? #f)) ;no tests
5147 (inputs
5148 `(("python-setuptools" ,python-setuptools)))
5149 (home-page "http://python-xlib.sourceforge.net/")
5150 (synopsis "Python X11 client library")
5151 (description
5152 "The Python X Library is intended to be a fully functional X client
5153 library for Python programs. It is useful to implement low-level X clients.
5154 It is written entirely in Python.")
5155 (license license:gpl2+)))
5156
5157 (define-public python-singledispatch
5158 (package
5159 (name "python-singledispatch")
5160 (version "3.4.0.3")
5161 (source
5162 (origin
5163 (method url-fetch)
5164 (uri (pypi-uri "singledispatch" version))
5165 (sha256
5166 (base32
5167 "171b7ip0hsq5qm83np40h3phlr36ym18w0lay0a8v08kvy3sy1jv"))))
5168 (build-system python-build-system)
5169 (native-inputs
5170 `(("python-setuptools" ,python-setuptools)))
5171 (inputs
5172 `(("python-six" ,python-six)))
5173 (home-page
5174 "http://docs.python.org/3/library/functools.html#functools.singledispatch")
5175 (synopsis "Backport of singledispatch feature from Python 3.4")
5176 (description
5177 "This library brings functools.singledispatch from Python 3.4 to Python
5178 2.6-3.3.")
5179 (license license:expat)))
5180
5181 (define-public python2-singledispatch
5182 (package-with-python2 python-singledispatch))
5183
5184 (define-public python-tornado
5185 (package
5186 (name "python-tornado")
5187 (version "4.3")
5188 (source
5189 (origin
5190 (method url-fetch)
5191 (uri (pypi-uri "tornado" version))
5192 (sha256
5193 (base32 "1gzgwayl6hmc9jfcl88bni4jcsk2jcca9dn1rvrfsvnijcjx7hn9"))))
5194 (build-system python-build-system)
5195 (native-inputs
5196 `(("python-certifi" ,python-certifi)))
5197 (inputs
5198 `(("python-backports-abc" ,python-backports-abc)))
5199 (home-page "http://www.tornadoweb.org/")
5200 (synopsis "Python web framework and asynchronous networking library")
5201 (description
5202 "Tornado is a Python web framework and asynchronous networking library,
5203 originally developed at FriendFeed. By using non-blocking network I/O,
5204 Tornado can scale to tens of thousands of open connections, making it ideal
5205 for long polling, WebSockets, and other applications that require a long-lived
5206 connection to each user.")
5207 (license license:asl2.0)
5208 (properties `((python2-variant . ,(delay python2-tornado))))))
5209
5210 (define-public python2-tornado
5211 (let ((tornado (package-with-python2 (strip-python2-variant python-tornado))))
5212 (package (inherit tornado)
5213 (inputs
5214 `(("python2-backport-ssl-match-hostname"
5215 ,python2-backport-ssl-match-hostname)
5216 ("python2-singledispatch" ,python2-singledispatch)
5217 ,@(package-inputs tornado)))
5218 (native-inputs
5219 `(("python2-setuptools" ,python2-setuptools)
5220 ,@(package-native-inputs tornado))))))
5221
5222 ;; the python- version can be removed with python-3.5
5223 (define-public python-backports-abc
5224 (package
5225 (name "python-backports-abc")
5226 (version "0.4")
5227 (source
5228 (origin
5229 (method url-fetch)
5230 (uri (pypi-uri "backports_abc" version))
5231 (sha256
5232 (base32
5233 "19fh75lni9pb673n2fn505m1rckm0af0szcv5xx1qm1xpa940glb"))))
5234 (build-system python-build-system)
5235 (inputs
5236 `(("python-setuptools" ,python-setuptools)))
5237 (home-page "https://github.com/cython/backports_abc")
5238 (synopsis "Backport of additions to the 'collections.abc' module")
5239 (description
5240 "Python-backports-abc provides a backport of additions to the
5241 'collections.abc' module in Python-3.5.")
5242 (license license:psfl)))
5243
5244 (define-public python2-backports-abc
5245 (package-with-python2 python-backports-abc))
5246
5247 (define-public python-waf
5248 (package
5249 (name "python-waf")
5250 (version "1.9.1")
5251 (source (origin
5252 (method url-fetch)
5253 (uri (string-append "https://waf.io/"
5254 "waf-" version ".tar.bz2"))
5255 (sha256
5256 (base32
5257 "1nc4qaqx2vsanlpp9mcwvf91xjqpkvcc6fcxd5sb4fwvaxamw5v6"))))
5258 (build-system python-build-system)
5259 (arguments
5260 '(#:phases
5261 (modify-phases %standard-phases
5262 (replace 'build
5263 (lambda _
5264 (zero? (begin
5265 (system* "python" "waf-light" "configure")
5266 (system* "python" "waf-light" "build")))))
5267 (replace 'check
5268 (lambda _
5269 (zero? (system* "python" "waf" "--version"))))
5270 (replace 'install
5271 (lambda _
5272 (copy-file "waf" %output))))))
5273 (home-page "https://waf.io/")
5274 (synopsis "Python-based build system")
5275 (description
5276 "Waf is a Python-based framework for configuring, compiling and installing
5277 applications.")
5278 (license license:bsd-3)))
5279
5280 (define-public python2-waf
5281 (package-with-python2 python-waf))
5282
5283 (define-public python-pyzmq
5284 (package
5285 (name "python-pyzmq")
5286 (version "15.1.0")
5287 (source
5288 (origin
5289 (method url-fetch)
5290 (uri (pypi-uri "pyzmq" version))
5291 (sha256
5292 (base32 "13fhwnlvsvxv72kfhqbpn6qi7msh8mc8377mpabv32skk2cjfnxx"))))
5293 (build-system python-build-system)
5294 (arguments
5295 `(#:configure-flags
5296 (list (string-append "--zmq=" (assoc-ref %build-inputs "zeromq")))
5297 ;; FIXME: You must build pyzmq with 'python setup.py build_ext
5298 ;; --inplace' for 'python setup.py test' to work.
5299 #:tests? #f))
5300 (inputs
5301 `(("zeromq" ,zeromq)))
5302 (native-inputs
5303 `(("pkg-config" ,pkg-config)
5304 ("python-nose" ,python-nose)
5305 ("python-setuptools" ,python-setuptools)))
5306 (home-page "http://github.com/zeromq/pyzmq")
5307 (synopsis "Python bindings for 0MQ")
5308 (description
5309 "PyZMQ is the official Python binding for the ZeroMQ messaging library.")
5310 (license license:bsd-4)))
5311
5312 (define-public python2-pyzmq
5313 (package-with-python2 python-pyzmq))
5314
5315 (define-public python-pep8
5316 (package
5317 (name "python-pep8")
5318 (version "1.7.0")
5319 (source
5320 (origin
5321 (method url-fetch)
5322 (uri (pypi-uri "pep8" version))
5323 (sha256
5324 (base32
5325 "002rkl4lsn6x2mxmf8ar00l0m8i3mzrc6pnzz77blyksmpsxa4x1"))))
5326 (build-system python-build-system)
5327 (inputs
5328 `(("python-setuptools" ,python-setuptools)))
5329 (home-page "http://pep8.readthedocs.org/")
5330 (synopsis "Python style guide checker")
5331 (description
5332 "This tools checks Python code against some of the style conventions in
5333 PEP 8.")
5334 (license license:expat)))
5335
5336 (define-public python2-pep8
5337 (package-with-python2 python-pep8))
5338
5339 (define-public python-pyflakes
5340 (package
5341 (name "python-pyflakes")
5342 (version "1.0.0")
5343 (source
5344 (origin
5345 (method url-fetch)
5346 (uri (pypi-uri "pyflakes" version))
5347 (sha256
5348 (base32
5349 "0qs2sgqszq7wcplis8509wk2ygqcrwzbs1ghfj3svvivq2j377pk"))))
5350 (build-system python-build-system)
5351 (inputs
5352 `(("python-setuptools" ,python-setuptools)))
5353 (home-page
5354 "https://github.com/pyflakes/pyflakes")
5355 (synopsis "Passive checker of Python programs")
5356 (description
5357 "Pyflakes statically checks Python source code for common errors.")
5358 (license license:expat)))
5359
5360 (define-public python2-pyflakes
5361 (package-with-python2 python-pyflakes))
5362
5363 (define-public python-mccabe
5364 (package
5365 (name "python-mccabe")
5366 (version "0.4.0")
5367 (source
5368 (origin
5369 (method url-fetch)
5370 (uri (pypi-uri "mccabe" version))
5371 (sha256
5372 (base32
5373 "0yr08a36h8lqlif10l4xcikbbig7q8f41gqywir7rrvnv3mi4aws"))))
5374 (build-system python-build-system)
5375 (inputs
5376 `(("python-pytest" ,python-pytest)
5377 ("python-pytest-runner" ,python-pytest-runner)
5378 ("python-setuptools" ,python-setuptools)))
5379 (home-page "https://github.com/flintwork/mccabe")
5380 (synopsis "McCabe checker, plugin for flake8")
5381 (description
5382 "This package provides a Flake8 plug-in to compute the McCabe cyclomatic
5383 complexity of Python source code.")
5384 (license license:expat)))
5385
5386 (define-public python2-mccabe
5387 (package-with-python2 python-mccabe))
5388
5389 (define-public python-mccabe-0.2.1
5390 (package (inherit python-mccabe)
5391 (version "0.2.1")
5392 (source
5393 (origin
5394 (method url-fetch)
5395 (uri (pypi-uri "mccabe" version))
5396 (sha256
5397 (base32
5398 "0fi4a81kr5bcv5p4xgibqr595hyj5dafkqgsmfk96mfy8w71fajs"))))
5399 (inputs `(("python-setuptools" ,python-setuptools)))))
5400
5401 (define-public python2-mccabe-0.2.1
5402 (package-with-python2 python-mccabe-0.2.1))
5403
5404 ;; Flake8 2.4.1 requires an older version of pep8.
5405 ;; This should be removed ASAP.
5406 (define-public python-pep8-1.5.7
5407 (package (inherit python-pep8)
5408 (version "1.5.7")
5409 (source
5410 (origin
5411 (method url-fetch)
5412 (uri (string-append
5413 "https://pypi.python.org/packages/source/p/pep8/pep8-"
5414 version
5415 ".tar.gz"))
5416 (sha256
5417 (base32
5418 "12b9bbdbwnspxgak14xg58c130x2n0blxzlms5jn2dszn8qj3d0m"))))))
5419
5420 (define-public python2-pep8-1.5.7
5421 (package-with-python2 python-pep8-1.5.7))
5422
5423 ;; Flake8 2.4.1 requires an older version of pyflakes.
5424 ;; This should be removed ASAP.
5425 (define-public python-pyflakes-0.8.1
5426 (package (inherit python-pyflakes)
5427 (version "0.8.1")
5428 (source
5429 (origin
5430 (method url-fetch)
5431 (uri (string-append
5432 "https://pypi.python.org/packages/source/p/pyflakes/pyflakes-"
5433 version
5434 ".tar.gz"))
5435 (sha256
5436 (base32
5437 "0sbpq6pqm1i9wqi41mlfrsc5rk92jv4mskvlyxmnhlbdnc80ma1z"))))))
5438
5439 (define-public python2-pyflakes-0.8.1
5440 (package-with-python2 python-pyflakes-0.8.1))
5441
5442 (define-public python-flake8
5443 (package
5444 (name "python-flake8")
5445 (version "2.5.4")
5446 (source
5447 (origin
5448 (method url-fetch)
5449 (uri (pypi-uri "flake8" version))
5450 (sha256
5451 (base32
5452 "0bs9cz4fr99r2rwig1b8jwaadl1nan7kgpdzqwj0bwbckwbmh7nc"))))
5453 (build-system python-build-system)
5454 (inputs
5455 `(("python-setuptools" ,python-setuptools)
5456 ("python-pep8" ,python-pep8)
5457 ("python-pyflakes" ,python-pyflakes)
5458 ("python-mccabe" ,python-mccabe)
5459 ("python-mock" ,python-mock)
5460 ("python-nose" ,python-nose)))
5461 (home-page "https://gitlab.com/pycqa/flake8")
5462 (synopsis
5463 "The modular source code checker: pep8, pyflakes and co")
5464 (description
5465 "Flake8 is a wrapper around PyFlakes, pep8 and python-mccabe.")
5466 (license license:expat)))
5467
5468 (define-public python2-flake8
5469 (package-with-python2 python-flake8))
5470
5471 ;; This will only be needed by the python-hacking package and will not be
5472 ;; necessary once python-hacking > 0.10.2 is released.
5473 (define-public python-flake8-2.2.4
5474 (package (inherit python-flake8)
5475 (inputs
5476 `(("python-setuptools" ,python-setuptools)
5477 ("python-pep8" ,python-pep8-1.5.7)
5478 ("python-pyflakes" ,python-pyflakes-0.8.1)
5479 ("python-mccabe" ,python-mccabe-0.2.1)
5480 ("python-mock" ,python-mock)
5481 ("python-nose" ,python-nose)))
5482 (version "2.2.4")
5483 (source
5484 (origin
5485 (method url-fetch)
5486 (uri (pypi-uri "flake8" version))
5487 (sha256
5488 (base32
5489 "1r9wsry4va45h1rck5hxd3vzsg2q3y6lnl6pym1bxvz8ry19jwx8"))))))
5490
5491 (define-public python2-flake8-2.2.4
5492 (package-with-python2 python-flake8-2.2.4))
5493
5494 (define-public python-mistune
5495 (package
5496 (name "python-mistune")
5497 (version "0.7")
5498 (source
5499 (origin
5500 (method url-fetch)
5501 (uri (string-append
5502 "https://pypi.python.org/packages/source/m/mistune/mistune-"
5503 version
5504 ".tar.gz"))
5505 (sha256
5506 (base32
5507 "17zqjp9m4d1w3jf2rbbq5xshcw24q1vlcv24gkgfqqyyymajxahx"))))
5508 (build-system python-build-system)
5509 (inputs
5510 `(("python-setuptools" ,python-setuptools)
5511 ("python-nose" ,python-nose)
5512 ("python-cython" ,python-cython)))
5513 (home-page "https://github.com/lepture/mistune")
5514 (synopsis "Markdown parser in pure Python")
5515 (description "This package provides a fast markdown parser in pure
5516 Python.")
5517 (license license:bsd-3)))
5518
5519 (define-public python2-mistune
5520 (package-with-python2 python-mistune))
5521
5522 (define-public python-markdown
5523 (package
5524 (name "python-markdown")
5525 (version "2.6.5")
5526 (source
5527 (origin
5528 (method url-fetch)
5529 (uri (pypi-uri "Markdown" version))
5530 (sha256
5531 (base32
5532 "0q758a3fiiawr20b3hhjfs677cwj6xi284yb7xspcvv0fdicz54d"))))
5533 (build-system python-build-system)
5534 (arguments
5535 `(#:phases
5536 (modify-phases %standard-phases
5537 (replace 'check
5538 (lambda _
5539 (zero? (system* "python" "run-tests.py")))))))
5540 (native-inputs
5541 `(("python-nose" ,python-nose)
5542 ("python-pyyaml" ,python-pyyaml)))
5543 (home-page "https://pythonhosted.org/Markdown/")
5544 (synopsis "Python implementation of Markdown")
5545 (description
5546 "This package provides a Python implementation of John Gruber's
5547 Markdown. The library features international input, various Markdown
5548 extensions, and several HTML output formats. A command line wrapper
5549 markdown_py is also provided to convert Markdown files to HTML.")
5550 (license license:bsd-3)))
5551
5552 (define-public python2-markdown
5553 (package-with-python2 python-markdown))
5554
5555 (define-public python-ptyprocess
5556 (package
5557 (name "python-ptyprocess")
5558 (version "0.5")
5559 (source
5560 (origin
5561 (method url-fetch)
5562 (uri (string-append
5563 "https://pypi.python.org/packages/source/p/ptyprocess/ptyprocess-"
5564 version ".tar.gz"))
5565 (sha256
5566 (base32
5567 "0nggns5kikn32yyda2zrj1xdmh49pi3v0drggcdwljbv36r8zdyw"))))
5568 (build-system python-build-system)
5569 (inputs
5570 `(("python-setuptools" ,python-setuptools)
5571 ("python-nose" ,python-nose)))
5572 (arguments
5573 `(#:phases
5574 (modify-phases %standard-phases
5575 (replace 'check
5576 (lambda _
5577 (zero? (system* "nosetests")))))))
5578 (home-page "https://github.com/pexpect/ptyprocess")
5579 (synopsis "Run a subprocess in a pseudo terminal")
5580 (description
5581 "This package provides a Python library used to launch a subprocess in a
5582 pseudo terminal (pty), and interact with both the process and its pty.")
5583 (license license:isc)))
5584
5585 (define-public python2-ptyprocess
5586 (package-with-python2 python-ptyprocess))
5587
5588 (define-public python-terminado
5589 (package
5590 (name "python-terminado")
5591 (version "0.6")
5592 (source
5593 (origin
5594 (method url-fetch)
5595 (uri (pypi-uri "terminado" version))
5596 (sha256
5597 (base32
5598 "09h1kwi86g5mrk14s4pgbhshd602zry29lnpxamcqz864kva22rc"))))
5599 (build-system python-build-system)
5600 (propagated-inputs
5601 `(("python-tornado" ,python-tornado)
5602 ("python-ptyprocess" ,python-ptyprocess)))
5603 (native-inputs
5604 `(("python-nose" ,python-nose)))
5605 (arguments
5606 `(#:phases
5607 (modify-phases %standard-phases
5608 (replace 'check
5609 (lambda _
5610 (zero? (system* "nosetests")))))))
5611 (home-page "https://github.com/takluyver/terminado")
5612 (synopsis "Terminals served to term.js using Tornado websockets")
5613 (description "This package provides a Tornado websocket backend for the
5614 term.js Javascript terminal emulator library.")
5615 (license license:bsd-2)
5616 (properties `((python2-variant . ,(delay python2-terminado))))))
5617
5618 (define-public python2-terminado
5619 (let ((terminado (package-with-python2 (strip-python2-variant python-terminado))))
5620 (package (inherit terminado)
5621 (propagated-inputs
5622 `(("python2-backport-ssl-match-hostname"
5623 ,python2-backport-ssl-match-hostname)
5624 ,@(package-propagated-inputs terminado)))
5625 (native-inputs
5626 `(("python2-setuptools" ,python2-setuptools)
5627 ,@(package-native-inputs terminado))))))
5628
5629 (define-public python-fonttools
5630 (package
5631 (name "python-fonttools")
5632 (version "2.5")
5633 (source (origin
5634 (method url-fetch)
5635 (uri (string-append
5636 "https://pypi.python.org/packages/source/F/FontTools/"
5637 "fonttools-" version ".tar.gz"))
5638 (sha256
5639 (base32
5640 "08ay3x4ijarwhl60gqx2i9jzq6pxs20p4snc2d1q5jagh4rn39lb"))))
5641 (build-system python-build-system)
5642 (arguments '(#:test-target "check"))
5643 (propagated-inputs
5644 ;; XXX: module not found if setuptools is not available.
5645 `(("python-setuptools" ,python-setuptools)))
5646 (home-page "http://github.com/behdad/fonttools")
5647 (synopsis "Tools to manipulate font files")
5648 (description
5649 "FontTools/TTX is a library to manipulate font files from Python. It
5650 supports reading and writinfg of TrueType/OpenType fonts, reading and writing
5651 of AFM files, reading (and partially writing) of PS Type 1 fonts. The package
5652 also contains a tool called “TTX” which converts TrueType/OpenType fonts to and
5653 from an XML-based format.")
5654 (license (license:non-copyleft
5655 "file://LICENSE.txt"
5656 "See LICENSE.txt in the distribution."))))
5657
5658 (define-public python2-fonttools
5659 (package-with-python2 python-fonttools))
5660
5661 (define-public python-ly
5662 (package
5663 (name "python-ly")
5664 (version "0.9.4")
5665 (source
5666 (origin
5667 (method url-fetch)
5668 (uri (string-append "https://pypi.python.org/packages/57/4f/"
5669 "889579244947368f28eda66b782331b1e75f83fd72e63f9ece93cd7a18f9"
5670 "/python-ly-" version ".tar.gz"))
5671 (sha256
5672 (base32
5673 "0g6n288l83sfwavxh1aryi0aqvsr3sp7v6f903mckwqa4scpky62"))))
5674 (build-system python-build-system)
5675 (native-inputs
5676 `(("python-setuptools" ,python-setuptools)))
5677 (synopsis "Tool and library for manipulating LilyPond files")
5678 (description "This package provides a Python library to parse, manipulate
5679 or create documents in LilyPond format. A command line program ly is also
5680 provided that can be used to do various manipulations with LilyPond files.")
5681 (home-page "https://pypi.python.org/pypi/python-ly")
5682 (license license:gpl2+)))
5683
5684 (define-public python-appdirs
5685 (package
5686 (name "python-appdirs")
5687 (version "1.4.0")
5688 (source
5689 (origin
5690 (method url-fetch)
5691 (uri (string-append
5692 "https://pypi.python.org/packages/source/a/appdirs/appdirs-"
5693 version
5694 ".tar.gz"))
5695 (sha256
5696 (base32
5697 "1iddva7v3fq0aqzsahkazxr7vpw28mqcrsy818z4wyiqnkplbhlg"))))
5698 (build-system python-build-system)
5699 (inputs
5700 `(("python-setuptools" ,python-setuptools)))
5701 (home-page "http://github.com/ActiveState/appdirs")
5702 (synopsis
5703 "Determine platform-specific dirs, e.g. a \"user data dir\"")
5704 (description
5705 "This module provides a portable way of finding out where user data
5706 should be stored on various operating systems.")
5707 (license license:expat)))
5708
5709 (define-public python2-appdirs
5710 (package-with-python2 python-appdirs))
5711
5712 (define-public python-llfuse
5713 (package
5714 (name "python-llfuse")
5715 (version "1.1.1")
5716 (source (origin
5717 (method url-fetch)
5718 (uri (string-append
5719 "https://bitbucket.org/nikratio/python-llfuse/downloads/"
5720 "llfuse-" version ".tar.bz2"))
5721 (sha256
5722 (base32
5723 "0v6vj9mb286njgd1szg9hz2qdh5f3vkhsvajripfcqg458av310v"))))
5724 (build-system python-build-system)
5725 (inputs
5726 `(("fuse" ,fuse)
5727 ("attr" ,attr)))
5728 (native-inputs
5729 `(("pkg-config" ,pkg-config)
5730 ("python-setuptools" ,python-setuptools)))
5731 (synopsis "Python bindings for FUSE")
5732 (description
5733 "Python-LLFUSE is a set of Python bindings for the low level FUSE API.")
5734 (home-page "https://bitbucket.org/nikratio/python-llfuse/")
5735 (license license:lgpl2.0+)
5736 (properties `((python2-variant . ,(delay python2-llfuse))))))
5737
5738 (define-public python2-llfuse
5739 (package (inherit (package-with-python2
5740 (strip-python2-variant python-llfuse)))
5741 (propagated-inputs `(("python2-contextlib2" ,python2-contextlib2)))))
5742
5743 ;; For attic-0.16
5744 (define-public python-llfuse-0.41
5745 (package (inherit python-llfuse)
5746 (version "0.41.1")
5747 (source (origin
5748 (method url-fetch)
5749 (uri (string-append
5750 "https://bitbucket.org/nikratio/python-llfuse/downloads/"
5751 "llfuse-" version ".tar.bz2"))
5752 (sha256
5753 (base32
5754 "1imlqw9b73086y97izr036f58pgc5akv4ihc2rrf8j5h75jbrlaa"))))
5755 ;; Python-LLFUSE < 0.42 includes underscore.js, which is MIT (expat)
5756 ;; licensed. The rest of the package is licensed under LGPL2.0 or later.
5757 (license (list license:expat license:lgpl2.0+))))
5758
5759 (define-public python-msgpack
5760 (package
5761 (name "python-msgpack")
5762 (version "0.4.8")
5763 (source (origin
5764 (method url-fetch)
5765 (uri (pypi-uri "msgpack-python" version))
5766 (sha256
5767 (base32
5768 "11pqk5braa6wndpnr1dhg64js82vjgxnm0lzy73rwl831zgijaqs"))))
5769 (build-system python-build-system)
5770 (synopsis "MessagePack (de)serializer")
5771 (description "MessagePack is a fast, compact binary serialization format,
5772 suitable for similar data to JSON. This package provides CPython bindings for
5773 reading and writing MessagePack data.")
5774 (home-page "https://pypi.python.org/pypi/msgpack-python/")
5775 (license license:asl2.0)
5776 (properties `((python2-variant . ,(delay python2-msgpack))))))
5777
5778 (define-public python2-msgpack
5779 (package (inherit (package-with-python2
5780 (strip-python2-variant python-msgpack)))
5781 (native-inputs
5782 `(("python2-setuptools" ,python2-setuptools)))))
5783
5784 (define-public python-netaddr
5785 (package
5786 (name "python-netaddr")
5787 (version "0.7.18")
5788 (source
5789 (origin
5790 (method url-fetch)
5791 (uri (string-append
5792 "https://pypi.python.org/packages/source/n/netaddr/netaddr-"
5793 version
5794 ".tar.gz"))
5795 (sha256
5796 (base32
5797 "06dxjlbcicq7q3vqy8agq11ra01kvvd47j4mk6dmghjsyzyckxd1"))))
5798 (build-system python-build-system)
5799 (arguments `(#:tests? #f)) ;; No tests.
5800 (inputs
5801 `(("python-setuptools" ,python-setuptools)))
5802 (home-page "https://github.com/drkjam/netaddr/")
5803 (synopsis "Pythonic manipulation of network addresses")
5804 (description
5805 "A Python library for representing and manipulating IPv4, IPv6, CIDR, EUI
5806 and MAC network addresses.")
5807 (license license:bsd-3)))
5808
5809 (define-public python2-netaddr
5810 (package-with-python2 python-netaddr))
5811
5812 (define-public python-wrapt
5813 (package
5814 (name "python-wrapt")
5815 (version "1.10.5")
5816 (source
5817 (origin
5818 (method url-fetch)
5819 (uri (string-append
5820 "https://pypi.python.org/packages/source/w/wrapt/wrapt-"
5821 version
5822 ".tar.gz"))
5823 (sha256
5824 (base32
5825 "0cq8rlpzkxzk48b50yrfhzn1d1hrq4gjcdqlrgq4v5palgiv9jwr"))))
5826 (build-system python-build-system)
5827 (arguments
5828 ;; Tests are not included in the tarball, they are only available in the
5829 ;; git repository.
5830 `(#:tests? #f))
5831 (inputs
5832 `(("python-setuptools" ,python-setuptools)))
5833 (home-page "https://github.com/GrahamDumpleton/wrapt")
5834 (synopsis "Module for decorators, wrappers and monkey patching")
5835 (description
5836 "The aim of the wrapt module is to provide a transparent object proxy for
5837 Python, which can be used as the basis for the construction of function
5838 wrappers and decorator functions.")
5839 (license license:bsd-2)))
5840
5841 (define-public python2-wrapt
5842 (package-with-python2 python-wrapt))
5843
5844 (define-public python-iso8601
5845 (package
5846 (name "python-iso8601")
5847 (version "0.1.11")
5848 (source
5849 (origin
5850 (method url-fetch)
5851 (uri (pypi-uri "iso8601" version))
5852 (sha256
5853 (base32
5854 "0c7gh3lsdjds262h0v1sqc66l7hqgfwbakn96qrhdbl0i3vm5yz8"))))
5855 (build-system python-build-system)
5856 (inputs
5857 `(("python-setuptools" ,python-setuptools)))
5858 (home-page "https://bitbucket.org/micktwomey/pyiso8601")
5859 (synopsis "Module to parse ISO 8601 dates")
5860 (description
5861 "This module parses the most common forms of ISO 8601 date strings (e.g.
5862 @code{2007-01-14T20:34:22+00:00}) into @code{datetime} objects.")
5863 (license license:expat)))
5864
5865 (define-public python2-iso8601
5866 (package-with-python2 python-iso8601))
5867
5868 (define-public python-monotonic
5869 (package
5870 (name "python-monotonic")
5871 (version "0.3")
5872 (source
5873 (origin
5874 (method url-fetch)
5875 (uri (string-append
5876 "https://pypi.python.org/packages/source/m/monotonic/monotonic-"
5877 version
5878 ".tar.gz"))
5879 (sha256
5880 (base32
5881 "0yz0bcbwx8r2c01czzfpbrxddynxyk9k95jj8h6sgcb7xmfvl998"))))
5882 (build-system python-build-system)
5883 (inputs
5884 `(("python-setuptools" ,python-setuptools)))
5885 (home-page "https://github.com/atdt/monotonic")
5886 (synopsis "Implementation of time.monotonic() for Python 2 & < 3.3")
5887 (description
5888 "This module provides a monotonic() function which returns the value (in
5889 fractional seconds) of a clock which never goes backwards.")
5890 (license license:asl2.0)))
5891
5892 (define-public python2-monotonic
5893 (package-with-python2 python-monotonic))
5894
5895 (define-public python-webob
5896 (package
5897 (name "python-webob")
5898 (version "1.5.1")
5899 (source
5900 (origin
5901 (method url-fetch)
5902 (uri (pypi-uri "WebOb" version))
5903 (sha256
5904 (base32
5905 "02bhhzijfhv8hmi1i54d4b0v43liwhnywhflvxsv4x3zax9s3afq"))))
5906 (build-system python-build-system)
5907 (inputs
5908 `(("python-nose" ,python-nose)
5909 ("python-setuptools" ,python-setuptools)))
5910 (home-page "http://webob.org/")
5911 (synopsis "WSGI request and response object")
5912 (description
5913 "WebOb provides wrappers around the WSGI request environment, and an
5914 object to help create WSGI responses.")
5915 (license license:expat)))
5916
5917 (define-public python2-webob
5918 (package-with-python2 python-webob))
5919
5920 (define-public python-xlrd
5921 (package
5922 (name "python-xlrd")
5923 (version "1.0.0")
5924 (source (origin
5925 (method url-fetch)
5926 (uri (pypi-uri "xlrd" version))
5927 (sha256
5928 (base32
5929 "0s8hjiz01vbhy85xalrz0qlsmd9ypf36zjqrf97hh984spapvy0g"))))
5930 (build-system python-build-system)
5931 (arguments
5932 `(#:phases
5933 (modify-phases %standard-phases
5934 ;; Current test in setup.py does not work as of 1.0.0, so use nose to
5935 ;; run tests instead for now.
5936 (replace 'check (lambda _ (zero? (system* "nosetests")))))))
5937 (native-inputs `(("python-nose" ,python-nose)
5938 ("python-setuptools" ,python-setuptools)))
5939 (home-page "http://www.python-excel.org/")
5940 (synopsis "Library for extracting data from Excel files")
5941 (description "This packages provides a library to extract data from
5942 spreadsheets using Microsoft Excel proprietary file formats @samp{.xls} and
5943 @samp{.xlsx} (versions 2.0 onwards). It has support for Excel dates and is
5944 Unicode-aware. It is not intended as an end-user tool.")
5945 (license license:bsd-3)))
5946
5947 (define-public python2-xlrd
5948 (package-with-python2 python-xlrd))
5949
5950 (define-public python-prettytable
5951 (package
5952 (name "python-prettytable")
5953 (version "0.7.2")
5954 (source
5955 (origin
5956 (method url-fetch)
5957 (uri (string-append
5958 "https://pypi.python.org/packages/source/P/PrettyTable/"
5959 "prettytable-" version ".tar.bz2"))
5960 (sha256
5961 (base32
5962 "0diwsicwmiq2cpzpxri7cyl5fmsvicafw6nfqf6p6p322dji2g45"))))
5963 (build-system python-build-system)
5964 (inputs
5965 `(("python-setuptools" ,python-setuptools)))
5966 (home-page "http://code.google.com/p/prettytable/")
5967 (synopsis "Display tabular data in an ASCII table format")
5968 (description
5969 "A library designed to represent tabular data in visually appealing ASCII
5970 tables. PrettyTable allows for selection of which columns are to be printed,
5971 independent alignment of columns (left or right justified or centred) and
5972 printing of sub-tables by specifying a row range.")
5973 (license license:bsd-3)))
5974
5975 (define-public python2-prettytable
5976 (package-with-python2 python-prettytable))
5977
5978 (define-public python-tables
5979 (package
5980 (name "python-tables")
5981 (version "3.2.2")
5982 (source
5983 (origin
5984 (method url-fetch)
5985 (uri (pypi-uri "tables" version))
5986 (sha256
5987 (base32
5988 "117s6w7s3yxafpmf3zz3svana7xfrsviw01va1xp7h8ylx8v6r1m"))))
5989 (build-system python-build-system)
5990 (arguments
5991 `(;; FIXME: python-build-system does not pass configure-flags to "build"
5992 ;; or "check", so we must override the build and check phases.
5993 #:phases
5994 (modify-phases %standard-phases
5995 (add-after 'unpack 'use-gcc
5996 (lambda _
5997 (substitute* "setup.py"
5998 (("compiler = new_compiler\\(\\)" line)
5999 (string-append line
6000 "\ncompiler.set_executables(compiler='gcc',"
6001 "compiler_so='gcc',"
6002 "linker_exe='gcc',"
6003 "linker_so='gcc -shared')")))
6004 #t))
6005 (replace 'build
6006 (lambda* (#:key inputs #:allow-other-keys)
6007 (zero? (system* "python" "setup.py" "build"
6008 (string-append "--hdf5="
6009 (assoc-ref inputs "hdf5"))))))
6010 (replace 'check
6011 (lambda* (#:key inputs #:allow-other-keys)
6012 (zero? (system* "python" "setup.py" "check"
6013 (string-append "--hdf5="
6014 (assoc-ref inputs "hdf5")))))))))
6015 (propagated-inputs
6016 `(("python-numexpr" ,python-numexpr)
6017 ("python-numpy" ,python-numpy)))
6018 (native-inputs
6019 `(("python-setuptools" ,python-setuptools)
6020 ("python-cython" ,python-cython)
6021 ("pkg-config" ,pkg-config)))
6022 (inputs
6023 `(("hdf5" ,hdf5)
6024 ("bzip2" ,bzip2)
6025 ("zlib" ,zlib)))
6026 (home-page "http://www.pytables.org/")
6027 (synopsis "Hierarchical datasets for Python")
6028 (description "PyTables is a package for managing hierarchical datasets and
6029 designed to efficently cope with extremely large amounts of data.")
6030 (license license:bsd-3)))
6031
6032 (define-public python2-tables
6033 (package-with-python2 python-tables))
6034
6035 (define-public python-pyasn1
6036 (package
6037 (name "python-pyasn1")
6038 (version "0.1.9")
6039 (source
6040 (origin
6041 (method url-fetch)
6042 (uri (pypi-uri "pyasn1" version))
6043 (sha256
6044 (base32
6045 "0zraxni14bqi20kr4bi6nwsh32aibz0fq0xaczfisw0zdpcsqg45"))))
6046 (build-system python-build-system)
6047 (home-page "http://pyasn1.sourceforge.net/")
6048 (synopsis "ASN.1 types and codecs")
6049 (description
6050 "This is an implementation of ASN.1 types and codecs in Python. It is
6051 suitable for a wide range of protocols based on the ASN.1 specification.")
6052 (license license:bsd-2)))
6053
6054 (define-public python2-pyasn1
6055 (package-with-python2 python-pyasn1))
6056
6057 (define-public python-pyasn1-modules
6058 (package
6059 (name "python-pyasn1-modules")
6060 (version "0.0.8")
6061 (source
6062 (origin
6063 (method url-fetch)
6064 (uri (pypi-uri "pyasn1-modules" version))
6065 (sha256
6066 (base32
6067 "0drqgw81xd3fxdlg89kgd79zzrabvfncvkbybi2wr6w2y4s1jmhh"))))
6068 (build-system python-build-system)
6069 (native-inputs
6070 `(("python-setuptools" ,python-setuptools)))
6071 (propagated-inputs
6072 `(("python-pyasn1" ,python-pyasn1)))
6073 (home-page "http://sourceforge.net/projects/pyasn1/")
6074 (synopsis "ASN.1 codec implementations")
6075 (description
6076 "Pyasn1-modules is a collection of Python modules providing ASN.1 types and
6077 implementations of ASN.1-based codecs and protocols.")
6078 (license license:bsd-3)))
6079
6080 (define-public python2-pyasn1-modules
6081 (package-with-python2 python-pyasn1-modules))
6082
6083 (define-public python-ipaddress
6084 (package
6085 (name "python-ipaddress")
6086 (version "1.0.16")
6087 (source (origin
6088 (method url-fetch)
6089 (uri (pypi-uri "ipaddress" version))
6090 (sha256
6091 (base32
6092 "1c3imabdrw8nfksgjjflzg7h4ynjckqacb188rf541m74arq4cas"))))
6093 (build-system python-build-system)
6094 (home-page "https://github.com/phihag/ipaddress")
6095 (synopsis "IP address manipulation library")
6096 (description
6097 "This package provides a fast, lightweight IPv4/IPv6 manipulation library
6098 in Python. This library is used to create, poke at, and manipulate IPv4 and
6099 IPv6 addresses and networks. This is a port of the Python 3.3 ipaddress
6100 module to older versions of Python.")
6101 (license license:psfl)
6102 (properties `((python2-variant . ,(delay python2-ipaddress))))))
6103
6104 (define-public python2-ipaddress
6105 (let ((base (package-with-python2 (strip-python2-variant python-ipaddress))))
6106 (package (inherit base)
6107 (native-inputs
6108 `(("python2-setuptools" ,python2-setuptools)
6109 ,@(package-native-inputs base))))))
6110
6111 (define-public python2-ipaddr
6112 (package
6113 (name "python2-ipaddr")
6114 (version "2.1.11")
6115 (source
6116 (origin
6117 (method url-fetch)
6118 (uri (pypi-uri "ipaddr" version))
6119 (sha256
6120 (base32 "1dwq3ngsapjc93fw61rp17fvzggmab5x1drjzvd4y4q0i255nm8v"))))
6121 (build-system python-build-system)
6122 (arguments
6123 `(#:python ,python-2 ;version 2 only
6124 #:phases
6125 (modify-phases %standard-phases
6126 (replace 'check
6127 (lambda* _
6128 (zero? (system* "python" "ipaddr_test.py")))))))
6129 (home-page "https://github.com/google/ipaddr-py")
6130 (synopsis "IP address manipulation library")
6131 (description
6132 "Ipaddr is a Python@tie{}2 library for creating and manupilating IPv4 and
6133 IPv6 addresses and networks.
6134
6135 For new implementations you may prefer to use the standard module
6136 @code{ipaddress}, which was introduced in Python 3.3 and backported to older
6137 versions of Python.")
6138 (license license:asl2.0)))
6139
6140 (define-public python-idna
6141 (package
6142 (name "python-idna")
6143 (version "2.0")
6144 (source
6145 (origin
6146 (method url-fetch)
6147 (uri (string-append "https://pypi.python.org/packages/source/i/"
6148 "idna/idna-" version ".tar.gz"))
6149 (sha256
6150 (base32
6151 "0frxgmgi234lr9hylg62j69j4ik5zhg0wz05w5dhyacbjfnrl68n"))))
6152 (build-system python-build-system)
6153 (native-inputs
6154 `(("python-setuptools" ,python-setuptools)))
6155 (home-page "https://github.com/kjd/idna")
6156 (synopsis "Internationalized domain names in applications")
6157 (description
6158 "This is a library to support the Internationalised Domain Names in
6159 Applications (IDNA) protocol as specified in RFC 5891. This version of the
6160 protocol is often referred to as “IDNA2008” and can produce different results
6161 from the earlier standard from 2003. The library is also intended to act as a
6162 suitable drop-in replacement for the “encodings.idna” module that comes with
6163 the Python standard library but currently only supports the older 2003
6164 specification.")
6165 (license license:bsd-4)))
6166
6167 (define-public python2-idna
6168 (package-with-python2 python-idna))
6169
6170 (define-public python-pretend
6171 (package
6172 (name "python-pretend")
6173 (version "1.0.8")
6174 (source
6175 (origin
6176 (method url-fetch)
6177 (uri (string-append "https://pypi.python.org/packages/source/p/"
6178 "pretend/pretend-" version ".tar.gz"))
6179 (sha256
6180 (base32
6181 "0r5r7ygz9m6d2bklflbl84cqhjkc2q12xgis8268ygjh30g2q3wk"))))
6182 (build-system python-build-system)
6183 (native-inputs
6184 `(("python-setuptools" ,python-setuptools)))
6185 (home-page "https://github.com/alex/pretend")
6186 (synopsis "Library for stubbing in Python")
6187 (description
6188 "Pretend is a library to make stubbing with Python easier. Stubbing is a
6189 technique for writing tests. You may hear the term mixed up with mocks,
6190 fakes, or doubles. Basically, a stub is an object that returns pre-canned
6191 responses, rather than doing any computation.")
6192 (license license:bsd-3)))
6193
6194 (define-public python2-pretend
6195 (package-with-python2 python-pretend))
6196
6197 (define-public python-cryptography-vectors
6198 (package
6199 (name "python-cryptography-vectors")
6200 (version "1.3.4")
6201 (source
6202 (origin
6203 (method url-fetch)
6204 (uri (pypi-uri "cryptography_vectors" version))
6205 (sha256
6206 (base32
6207 "15h1iz2klnpb4f8djxy7cpbnyn3wbjp7bnj4pz6s7w6plghbq524"))))
6208 (build-system python-build-system)
6209 (native-inputs
6210 `(("python-setuptools" ,python-setuptools)))
6211 (home-page "https://github.com/pyca/cryptography")
6212 (synopsis "Test vectors for the cryptography package")
6213 (description
6214 "This package contains test vectors for the cryptography package.")
6215 ;; Distributed under either BSD-3 or ASL2.0
6216 (license (list license:bsd-3 license:asl2.0))))
6217
6218 (define-public python2-cryptography-vectors
6219 (package-with-python2 python-cryptography-vectors))
6220
6221 (define-public python-cryptography
6222 (package
6223 (name "python-cryptography")
6224 (version "1.3.4")
6225 (source
6226 (origin
6227 (method url-fetch)
6228 (uri (pypi-uri "cryptography" version))
6229 (sha256
6230 (base32
6231 "1a85l548w5vvq3yhz0az7ajg2ijixzp6gagapw6wgrqvq28ghgs2"))))
6232 (build-system python-build-system)
6233 (arguments
6234 `(#:phases
6235 (modify-phases %standard-phases
6236 (add-before 'check 'disable-failing-test
6237 (lambda _
6238 ;; This test is known to fail with OpenSSL >= 1.0.2i and older
6239 ;; versions of python-cryptography:
6240 ;; https://github.com/pyca/cryptography/issues/3196
6241 ;; TODO: Try re-enabling the test when upgrading
6242 ;; python-cryptography.
6243 (substitute* "tests/hazmat/backends/test_openssl.py"
6244 (("def test_numeric_string_x509_name_entry")
6245 "@pytest.mark.xfail\n def test_numeric_string_x509_name_entry"))
6246 #t)))))
6247 (inputs
6248 `(("openssl" ,openssl)))
6249 (propagated-inputs
6250 `(("python-cffi" ,python-cffi)
6251 ("python-six" ,python-six)
6252 ("python-pyasn1" ,python-pyasn1)
6253 ("python-idna" ,python-idna)
6254 ("python-iso8601" ,python-iso8601)))
6255 (native-inputs
6256 `(("python-cryptography-vectors" ,python-cryptography-vectors)
6257 ("python-hypothesis" ,python-hypothesis)
6258 ("python-setuptools" ,python-setuptools)
6259 ("python-pretend" ,python-pretend)
6260 ("python-pyasn1" ,python-pyasn1)
6261 ("python-pyasn1-modules" ,python-pyasn1-modules)
6262 ("python-pytest" ,python-pytest)))
6263 (home-page "https://github.com/pyca/cryptography")
6264 (synopsis "Cryptographic recipes and primitives for Python")
6265 (description
6266 "cryptography is a package which provides cryptographic recipes and
6267 primitives to Python developers. It aims to be the “cryptographic standard
6268 library” for Python. The package includes both high level recipes, and low
6269 level interfaces to common cryptographic algorithms such as symmetric ciphers,
6270 message digests and key derivation functions.")
6271 ;; Distributed under either BSD-3 or ASL2.0
6272 (license (list license:bsd-3 license:asl2.0))
6273 (properties `((python2-variant . ,(delay python2-cryptography))))))
6274
6275 (define-public python2-cryptography
6276 (let ((crypto (package-with-python2
6277 (strip-python2-variant python-cryptography))))
6278 (package (inherit crypto)
6279 (propagated-inputs
6280 `(("python2-ipaddress" ,python2-ipaddress)
6281 ("python2-backport-ssl-match-hostname"
6282 ,python2-backport-ssl-match-hostname)
6283 ("python2-enum34" ,python2-enum34)
6284 ,@(package-propagated-inputs crypto))))))
6285
6286 (define-public python-pyopenssl
6287 (package
6288 (name "python-pyopenssl")
6289 (version "16.1.0")
6290 (source
6291 (origin
6292 (method url-fetch)
6293 (uri (pypi-uri "pyOpenSSL" version))
6294 (sha256
6295 (base32
6296 "0prm06zz7hl6bk5s2lqzw25lq6smayfv2fgiliw2rbqxlyiavxw8"))))
6297 (build-system python-build-system)
6298 (propagated-inputs
6299 `(("python-cryptography" ,python-cryptography)
6300 ("python-six" ,python-six)))
6301 (inputs
6302 `(("openssl" ,openssl)))
6303 (native-inputs
6304 `(("python-setuptools" ,python-setuptools)))
6305 (home-page "https://github.com/pyca/pyopenssl")
6306 (synopsis "Python wrapper module around the OpenSSL library")
6307 (description
6308 "PyOpenSSL is a high-level wrapper around a subset of the OpenSSL
6309 library.")
6310 (license license:asl2.0)))
6311
6312 (define-public python2-pyopenssl
6313 (package-with-python2 python-pyopenssl))
6314
6315 (define-public python-pip
6316 (package
6317 (name "python-pip")
6318 (version "8.0.2")
6319 (source
6320 (origin
6321 (method url-fetch)
6322 (uri (pypi-uri "pip" version))
6323 (sha256
6324 (base32
6325 "08cm8d4228fj0qnrysy3qv1a6022zr3dcs25amd14lgxil6vvx26"))))
6326 (build-system python-build-system)
6327 (inputs
6328 `(("python-setuptools" ,python-setuptools)
6329 ("python-virtualenv" ,python-virtualenv)
6330 ;; Tests
6331 ("python-mock" ,python-mock)
6332 ("python-pytest" ,python-pytest)
6333 ("python-scripttest" ,python-scripttest)))
6334 (home-page "https://pip.pypa.io/")
6335 (synopsis
6336 "Package manager for Python software")
6337 (description
6338 "Pip is a package manager for Python software, that finds packages on the
6339 Python Package Index (PyPI).")
6340 (license license:expat)))
6341
6342 (define-public python2-pip
6343 (package-with-python2 python-pip))
6344
6345 (define-public python-tlsh
6346 (package
6347 (name "python-tlsh")
6348 (version "3.4.4")
6349 (home-page "https://github.com/trendmicro/tlsh")
6350 (source (origin
6351 (method url-fetch)
6352 (uri (string-append "https://github.com/trendmicro/tlsh/archive/v"
6353 version ".tar.gz"))
6354 (sha256
6355 (base32
6356 "00bhzjqrlh7v538kbkbn8lgx976j1138al3sdhklaizqjvpwyk4r"))
6357 (file-name (string-append name "-" version ".tar.gz"))))
6358 (build-system cmake-build-system)
6359 (arguments
6360 '(#:out-of-source? #f
6361 #:phases (modify-phases %standard-phases
6362 (replace
6363 'install
6364 (lambda* (#:key outputs #:allow-other-keys)
6365 ;; Build and install the Python bindings. The underlying
6366 ;; C++ library is apparently not meant to be installed.
6367 (let ((out (assoc-ref outputs "out")))
6368 (with-directory-excursion "py_ext"
6369 (and (system* "python" "setup.py" "build")
6370 (system* "python" "setup.py" "install"
6371 (string-append "--prefix=" out))))))))))
6372 (inputs `(("python" ,python-wrapper))) ;for the bindings
6373 (synopsis "Fuzzy matching library for Python")
6374 (description
6375 "Trend Micro Locality Sensitive Hash (TLSH) is a fuzzy matching library.
6376 Given a byte stream with a minimum length of 256 bytes, TLSH generates a hash
6377 value which can be used for similarity comparisons. Similar objects have
6378 similar hash values, which allows for the detection of similar objects by
6379 comparing their hash values. The byte stream should have a sufficient amount
6380 of complexity; for example, a byte stream of identical bytes will not generate
6381 a hash value.")
6382 (license license:asl2.0)))
6383
6384 (define-public python2-tlsh
6385 (package
6386 (inherit python-tlsh)
6387 (name "python2-tlsh")
6388 (inputs `(("python" ,python-2)))))
6389
6390 (define-public python-termcolor
6391 (package
6392 (name "python-termcolor")
6393 (version "1.1.0")
6394 (source
6395 (origin
6396 (method url-fetch)
6397 (uri (pypi-uri "python-termcolor" version))
6398 (sha256
6399 (base32
6400 "0fv1vq14rpqwgazxg4981904lfyp84mnammw7y046491cv76jv8x"))))
6401 (build-system python-build-system)
6402 (arguments
6403 ;; There are no tests.
6404 `(#:tests? #f))
6405 (home-page "http://pypi.python.org/pypi/termcolor")
6406 (synopsis "ANSII Color formatting for terminal output")
6407 (description
6408 "This package provides ANSII Color formatting for output in terminals.")
6409 (license license:expat)))
6410
6411 (define-public python2-termcolor
6412 (package-with-python2 python-termcolor))
6413
6414 (define-public python-libarchive-c
6415 (package
6416 (name "python-libarchive-c")
6417 (version "2.2")
6418 (source (origin
6419 (method url-fetch)
6420 (uri (pypi-uri "libarchive-c" version))
6421 (sha256
6422 (base32
6423 "0z4r7v3dhd6b3120mav05ff08srih176r2rg5k8kn7mjd9pslm2x"))))
6424 (build-system python-build-system)
6425 (arguments
6426 '(#:phases (modify-phases %standard-phases
6427 (add-before
6428 'build 'reference-libarchive
6429 (lambda* (#:key inputs #:allow-other-keys)
6430 ;; Retain the absolute file name of libarchive.so.
6431 (let ((libarchive (assoc-ref inputs "libarchive")))
6432 (substitute* "libarchive/ffi.py"
6433 (("find_library\\('archive'\\)")
6434 (string-append "'" libarchive
6435 "/lib/libarchive.so'"))))
6436
6437 ;; Do not make a compressed egg (see
6438 ;; <http://bugs.gnu.org/20765>).
6439 (let ((port (open-file "setup.cfg" "a")))
6440 (display "\n[easy_install]\nzip_ok = 0\n"
6441 port)
6442 (close-port port)
6443 #t))))))
6444 (inputs
6445 `(("python-setuptools" ,python-setuptools)
6446 ("libarchive" ,libarchive)))
6447 (home-page "https://github.com/Changaco/python-libarchive-c")
6448 (synopsis "Python interface to libarchive")
6449 (description
6450 "This package provides Python bindings to libarchive, a C library to
6451 access possibly compressed archives in many different formats. It uses
6452 Python's @code{ctypes} foreign function interface (FFI).")
6453 (license license:lgpl2.0+)))
6454
6455 (define-public python2-libarchive-c
6456 (package-with-python2 python-libarchive-c))
6457
6458 (define-public python-file
6459 (package
6460 (inherit file)
6461 (name "python-file")
6462 (build-system python-build-system)
6463 (arguments
6464 '(#:tests? #f ;no tests
6465 #:configure-flags '("--single-version-externally-managed" "--root=/")
6466 #:phases (modify-phases %standard-phases
6467 (add-before 'build 'change-directory
6468 (lambda _
6469 (chdir "python")
6470 #t))
6471 (add-before 'build 'set-library-file-name
6472 (lambda* (#:key inputs #:allow-other-keys)
6473 (let ((file (assoc-ref inputs "file")))
6474 (substitute* "magic.py"
6475 (("find_library\\('magic'\\)")
6476 (string-append "'" file "/lib/libmagic.so'")))
6477 #t))))))
6478 (inputs `(("file" ,file)))
6479 (self-native-input? #f)
6480 (synopsis "Python bindings to the libmagic file type guesser. Note that
6481 this module and the python-magic module both provide a \"magic.py\" file;
6482 these two modules, which are different and were developed separately, both
6483 serve the same purpose: provide Python bindings for libmagic.")
6484 (properties `((python2-variant . ,(delay python2-file))))))
6485
6486 (define-public python2-file
6487 (let ((base (package-with-python2 (strip-python2-variant python-file))))
6488 (package
6489 (inherit base)
6490 (native-inputs
6491 `(("python2-setuptools" ,python2-setuptools)
6492 ,@(package-native-inputs base))))))
6493
6494 (define-public python-debian
6495 (package
6496 (name "python-debian")
6497 (version "0.1.23")
6498 (source
6499 (origin
6500 (method url-fetch)
6501 (uri (string-append
6502 "https://pypi.python.org/packages/source/p/python-debian/python-debian-"
6503 version ".tar.gz"))
6504 (sha256
6505 (base32
6506 "193faznwnjc3n5991wyzim6h9gyq1zxifmfrnpm3avgkh7ahyynh"))))
6507 (build-system python-build-system)
6508 (inputs
6509 `(("python-six" ,python-six)))
6510 (native-inputs
6511 `(("python-setuptools" ,python-setuptools)))
6512 (home-page "http://packages.debian.org/sid/python-debian")
6513 (synopsis "Debian package related modules")
6514 (description
6515 ;; XXX: Use @enumerate instead of @itemize to work around
6516 ;; <http://bugs.gnu.org/21772>.
6517 "This package provides Python modules that abstract many formats of
6518 Debian-related files, such as:
6519
6520 @enumerate
6521 @item Debtags information;
6522 @item @file{debian/changelog} files;
6523 @item packages files, pdiffs;
6524 @item control files of single or multiple RFC822-style paragraphs---e.g.
6525 @file{debian/control}, @file{.changes}, @file{.dsc};
6526 @item Raw @file{.deb} and @file{.ar} files, with (read-only) access to
6527 contained files and meta-information.
6528 @end enumerate\n")
6529
6530 ;; Modules are either GPLv2+ or GPLv3+.
6531 (license license:gpl3+)))
6532
6533 (define-public python2-debian
6534 (package-with-python2 python-debian))
6535
6536 (define-public python-chardet
6537 (package
6538 (name "python-chardet")
6539 (version "2.3.0")
6540 (source
6541 (origin
6542 (method url-fetch)
6543 (uri (string-append
6544 "https://pypi.python.org/packages/source/c/chardet/chardet-"
6545 version
6546 ".tar.gz"))
6547 (sha256
6548 (base32
6549 "1ak87ikcw34fivcgiz2xvi938dmclh078az65l9x3rmgljrkhgp5"))))
6550 (build-system python-build-system)
6551 (native-inputs
6552 `(("python-setuptools" ,python-setuptools)))
6553 (home-page "https://github.com/chardet/chardet")
6554 (synopsis "Universal encoding detector for Python 2 and 3")
6555 (description
6556 "This package provides @code{chardet}, a Python module that can
6557 automatically detect a wide range of file encodings.")
6558 (license license:lgpl2.1+)))
6559
6560 (define-public python2-chardet
6561 (package-with-python2 python-chardet))
6562
6563 (define-public python-docopt
6564 (package
6565 (name "python-docopt")
6566 (version "0.6.2")
6567 (source
6568 (origin
6569 (method url-fetch)
6570 ;; The release on PyPI does not include tests.
6571 (uri (string-append
6572 "https://github.com/docopt/docopt/archive/"
6573 version ".tar.gz"))
6574 (file-name (string-append name "-" version ".tar.gz"))
6575 (sha256
6576 (base32
6577 "16bf890xbdz3m30rsv2qacklh2rdn1zrfspfnwzx9g7vwz8yw4r1"))))
6578 (build-system python-build-system)
6579 (native-inputs
6580 `(("python-pytest" ,python-pytest)
6581 ("python-setuptools" ,python-setuptools)))
6582 (arguments
6583 `(#:phases (alist-replace
6584 'check
6585 (lambda _ (zero? (system* "py.test")))
6586 %standard-phases)))
6587 (home-page "http://docopt.org")
6588 (synopsis "Command-line interface description language for Python")
6589 (description "This library allows the user to define a command-line
6590 interface from a program's help message rather than specifying it
6591 programatically with command-line parsers like @code{getopt} and
6592 @code{argparse}.")
6593 (license license:expat)))
6594
6595 (define-public python2-docopt
6596 (package-with-python2 python-docopt))
6597
6598 (define-public python-zope-event
6599 (package
6600 (name "python-zope-event")
6601 (version "4.1.0")
6602 (source
6603 (origin
6604 (method url-fetch)
6605 (uri (string-append "https://pypi.python.org/packages/source/z"
6606 "/zope.event/zope.event-" version ".tar.gz"))
6607 (sha256
6608 (base32
6609 "11p75zpfz3ffhz21nzx9wb23xs993ck5s6hkjcvhswwizni5jynw"))))
6610 (build-system python-build-system)
6611 (inputs
6612 `(("python-setuptools" ,python-setuptools)))
6613 (home-page "http://pypi.python.org/pypi/zope.event")
6614 (synopsis "Event publishing system for Python")
6615 (description "Zope.event provides an event publishing API, intended for
6616 use by applications which are unaware of any subscribers to their events. It
6617 is a simple event-dispatching system on which more sophisticated event
6618 dispatching systems can be built.")
6619 (license license:zpl2.1)))
6620
6621 (define-public python2-zope-event
6622 (package-with-python2 python-zope-event))
6623
6624 (define-public python-zope-interface
6625 (package
6626 (name "python-zope-interface")
6627 (version "4.1.3")
6628 (source
6629 (origin
6630 (method url-fetch)
6631 (uri (string-append "https://pypi.python.org/packages/source/z"
6632 "/zope.interface/zope.interface-" version ".tar.gz"))
6633 (sha256
6634 (base32
6635 "0ks8h73b2g4bkad821qbv0wzjppdrwys33i7ka45ik3wxjg1l8if"))))
6636 (build-system python-build-system)
6637 (propagated-inputs
6638 `(("python-zope-event" ,python-zope-event)))
6639 (home-page "https://github.com/zopefoundation/zope.interface")
6640 (synopsis "Python implementation of the \"design by contract\"
6641 methodology")
6642 (description "Zope.interface provides an implementation of \"object
6643 interfaces\" for Python. Interfaces are a mechanism for labeling objects as
6644 conforming to a given API or contract.")
6645 (license license:zpl2.1)))
6646
6647 (define-public python2-zope-interface
6648 (package-with-python2 python-zope-interface))
6649
6650 (define-public python-zope-exceptions
6651 (package
6652 (name "python-zope-exceptions")
6653 (version "4.0.8")
6654 (source
6655 (origin
6656 (method url-fetch)
6657 (uri (string-append "https://pypi.python.org/packages/source/z"
6658 "/zope.exceptions/zope.exceptions-"
6659 version ".tar.gz"))
6660 (sha256
6661 (base32
6662 "0zwxaaa66sqxg5k7zcrvs0fbg9ym1njnxnr28dfmchzhwjvwnfzl"))))
6663 (build-system python-build-system)
6664 (arguments
6665 '(#:tests? #f)) ; circular dependency with zope.testrunner
6666 (propagated-inputs
6667 `(("python-zope-interface" ,python-zope-interface)))
6668 (home-page "http://cheeseshop.python.org/pypi/zope.exceptions")
6669 (synopsis "Zope exceptions")
6670 (description "Zope.exceptions provides general-purpose exception types
6671 that have uses outside of the Zope framework.")
6672 (license license:zpl2.1)))
6673
6674 (define-public python2-zope-exceptions
6675 (package-with-python2 python-zope-exceptions))
6676
6677 (define-public python-zope-testing
6678 (package
6679 (name "python-zope-testing")
6680 (version "4.5.0")
6681 (source
6682 (origin
6683 (method url-fetch)
6684 (uri (string-append "https://pypi.python.org/packages/source/z"
6685 "/zope.testing/zope.testing-" version ".tar.gz"))
6686 (sha256
6687 (base32
6688 "1yvglxhzvhl45mndvn9gskx2ph30zz1bz7rrlyfs62fv2pvih90s"))
6689 (modules '((guix build utils)))
6690 (snippet
6691 '(begin
6692 ;; Remove pre-compiled .pyc files backup files from source.
6693 (for-each delete-file (find-files "." "(\\.pyc|~)$"))
6694 #t))))
6695 (build-system python-build-system)
6696 (native-inputs
6697 `(("python-zope-exceptions" ,python-zope-exceptions)))
6698 (propagated-inputs
6699 `(("python-zope-interface" ,python-zope-interface)))
6700 (home-page "http://pypi.python.org/pypi/zope.testing")
6701 (synopsis "Zope testing helpers")
6702 (description "Zope.testing provides a number of testing utilities for HTML
6703 forms, HTTP servers, regular expressions, and more.")
6704 (license license:zpl2.1)))
6705
6706 (define-public python2-zope-testing
6707 (package-with-python2 python-zope-testing))
6708
6709 (define-public python-zope-testrunner
6710 (package
6711 (name "python-zope-testrunner")
6712 (version "4.4.9")
6713 (source
6714 (origin
6715 (method url-fetch)
6716 (uri (string-append "https://pypi.python.org/packages/source/z"
6717 "/zope.testrunner/zope.testrunner-"
6718 version ".zip"))
6719 (sha256
6720 (base32
6721 "1r7iqknhh55y45f64mz5hghgvzx34h1i11k350s0avx6q8gznja1"))))
6722 (build-system python-build-system)
6723 (native-inputs
6724 `(("python-six" ,python-six)
6725 ("python-zope-exceptions" ,python-zope-exceptions)
6726 ("python-zope-testing" ,python-zope-testing)
6727 ("unzip" ,unzip)))
6728 (propagated-inputs
6729 `(("python-zope-interface" ,python-zope-interface)))
6730 (home-page "http://pypi.python.org/pypi/zope.testrunner")
6731 (synopsis "Zope testrunner script")
6732 (description "Zope.testrunner provides a script for running Python
6733 tests.")
6734 (license license:zpl2.1)))
6735
6736 (define-public python2-zope-testrunner
6737 (let ((base (package-with-python2 python-zope-testrunner)))
6738 (package
6739 (inherit base)
6740 (native-inputs
6741 (append (package-native-inputs base)
6742 `(("python2-subunit" ,python2-subunit)
6743 ("python2-mimeparse" ,python2-mimeparse)))))))
6744
6745 (define-public python-zope-i18nmessageid
6746 (package
6747 (name "python-zope-i18nmessageid")
6748 (version "4.0.3")
6749 (source
6750 (origin
6751 (method url-fetch)
6752 (uri (string-append
6753 "https://pypi.python.org/packages/source/z"
6754 "/zope.i18nmessageid/zope.i18nmessageid-"
6755 version ".tar.gz"))
6756 (sha256
6757 (base32
6758 "1rslyph0klk58dmjjy4j0jxy21k03azksixc3x2xhqbkv97cmzml"))))
6759 (build-system python-build-system)
6760 (inputs
6761 `(("python-setuptools" ,python-setuptools)))
6762 (home-page "http://pypi.python.org/pypi/zope.i18nmessageid")
6763 (synopsis "Message identifiers for internationalization")
6764 (description "Zope.i18nmessageid provides facilities for declaring
6765 internationalized messages within program source text.")
6766 (license license:zpl2.1)))
6767
6768 (define-public python2-zope-i18nmessageid
6769 (package-with-python2 python-zope-i18nmessageid))
6770
6771 (define-public python-zope-schema
6772 (package
6773 (name "python-zope-schema")
6774 (version "4.4.2")
6775 (source
6776 (origin
6777 (method url-fetch)
6778 (uri (string-append "https://pypi.python.org/packages/source/z"
6779 "/zope.schema/zope.schema-" version ".tar.gz"))
6780 (sha256
6781 (base32
6782 "1p943jdxb587dh7php4vx04qvn7b2877hr4qs5zyckvp5afhhank"))))
6783 (build-system python-build-system)
6784 (propagated-inputs
6785 `(("python-zope-event" ,python-zope-event)
6786 ("python-zope-interface" ,python-zope-interface)))
6787 (native-inputs
6788 `(("python-zope-testing" ,python-zope-testing)))
6789 (home-page "http://pypi.python.org/pypi/zope.schema")
6790 (synopsis "Zope data schemas")
6791 (description "Zope.scheme provides extensions to zope.interface for
6792 defining data schemas.")
6793 (license license:zpl2.1)))
6794
6795 (define-public python2-zope-schema
6796 (package-with-python2 python-zope-schema))
6797
6798 (define-public python-zope-configuration
6799 (package
6800 (name "python-zope-configuration")
6801 (version "4.0.3")
6802 (source (origin
6803 (method url-fetch)
6804 (uri (string-append "https://pypi.python.org/packages/source/z"
6805 "/zope.configuration/zope.configuration-"
6806 version ".tar.gz"))
6807 (sha256
6808 (base32
6809 "1x9dfqypgympnlm25p9m43xh4qv3p7d75vksv9pzqibrb4cggw5n"))))
6810 (build-system python-build-system)
6811 (propagated-inputs
6812 `(("python-zope-i18nmessageid" ,python-zope-i18nmessageid)
6813 ("python-zope-schema" ,python-zope-schema)))
6814 (home-page "http://pypi.python.org/pypi/zope.configuration")
6815 (synopsis "Zope Configuration Markup Language")
6816 (description "Zope.configuration implements ZCML, the Zope Configuration
6817 Markup Language.")
6818 (license license:zpl2.1)))
6819
6820 (define-public python2-zope-configuration
6821 (package-with-python2 python-zope-configuration))
6822
6823 (define-public python-zope-proxy
6824 (package
6825 (name "python-zope-proxy")
6826 (version "4.1.6")
6827 (source
6828 (origin
6829 (method url-fetch)
6830 (uri (string-append "https://pypi.python.org/packages/source/z"
6831 "/zope.proxy/zope.proxy-" version ".tar.gz"))
6832 (sha256
6833 (base32
6834 "0pqwwmvm1prhwv1ziv9lp8iirz7xkwb6n2kyj36p2h0ppyyhjnm4"))))
6835 (build-system python-build-system)
6836 (propagated-inputs
6837 `(("python-zope-interface" ,python-zope-interface)))
6838 (home-page "http://pypi.python.org/pypi/zope.proxy")
6839 (synopsis "Generic, transparent proxies")
6840 (description "Zope.proxy provides generic, transparent proxies for Python.
6841 Proxies are special objects which serve as mostly-transparent wrappers around
6842 another object, intervening in the apparent behavior of the wrapped object
6843 only when necessary to apply the policy (e.g., access checking, location
6844 brokering, etc.) for which the proxy is responsible.")
6845 (license license:zpl2.1)))
6846
6847 (define-public python2-zope-proxy
6848 (package-with-python2 python-zope-proxy))
6849
6850 (define-public python-zope-location
6851 (package
6852 (name "python-zope-location")
6853 (version "4.0.3")
6854 (source
6855 (origin
6856 (method url-fetch)
6857 (uri (string-append "https://pypi.python.org/packages/source/z"
6858 "/zope.location/zope.location-" version ".tar.gz"))
6859 (sha256
6860 (base32
6861 "1nj9da4ksiyv3h8n2vpzwd0pb03mdsh7zy87hfpx72b6p2zcwg74"))))
6862 (build-system python-build-system)
6863 (native-inputs
6864 `(("python-zope-proxy" ,python-zope-proxy)
6865 ("python-zope-schema" ,python-zope-schema)))
6866 (home-page "http://pypi.python.org/pypi/zope.location/")
6867 (synopsis "Zope location library")
6868 (description "Zope.location implements the concept of \"locations\" in
6869 Zope3, which are are special objects that have a structural location.")
6870 (license license:zpl2.1)))
6871
6872 (define-public python2-zope-location
6873 (package-with-python2 python-zope-location))
6874
6875 (define-public python-zope-security
6876 (package
6877 (name "python-zope-security")
6878 (version "4.0.3")
6879 (source
6880 (origin
6881 (method url-fetch)
6882 (uri (string-append "https://pypi.python.org/packages/source/z"
6883 "/zope.security/zope.security-" version ".tar.gz"))
6884 (sha256
6885 (base32
6886 "14zmf684amc0x32kq05yxnhfqd1cmyhafkw05gn81rn90zjv6ssy"))))
6887 (build-system python-build-system)
6888 (propagated-inputs
6889 `(("python-zope-i18nmessageid" ,python-zope-i18nmessageid)
6890 ("python-zope-component" ,python-zope-component)
6891 ("python-zope-location" ,python-zope-location)
6892 ("python-zope-proxy" ,python-zope-proxy)
6893 ("python-zope-schema" ,python-zope-schema)
6894 ("python-zope-testrunner" ,python-zope-testrunner)
6895 ("python-zope-testing" ,python-zope-testing)))
6896 (home-page "http://pypi.python.org/pypi/zope.security")
6897 (synopsis "Zope security framework")
6898 (description "Zope.security provides a generic mechanism to implement
6899 security policies on Python objects.")
6900 (license license:zpl2.1)))
6901
6902 (define-public python2-zope-security
6903 (let ((zope-security (package-with-python2 python-zope-security)))
6904 (package (inherit zope-security)
6905 (propagated-inputs
6906 `(("python2-zope-testrunner" ,python2-zope-testrunner)
6907 ,@(alist-delete
6908 "python-zope-testrunner"
6909 (package-propagated-inputs zope-security)))))))
6910
6911 (define-public python-zope-component
6912 (package
6913 (name "python-zope-component")
6914 (version "4.2.2")
6915 (source
6916 (origin
6917 (method url-fetch)
6918 (uri (string-append "https://pypi.python.org/packages/source/z"
6919 "/zope.component/zope.component-" version ".tar.gz"))
6920 (sha256
6921 (base32
6922 "06pqr8m5jv12xjyy5b59hh9anl61cxkzhw9mka33r3nxalmi2b18"))))
6923 (build-system python-build-system)
6924 (arguments
6925 ;; Skip tests due to circular dependency with python-zope-security.
6926 '(#:tests? #f))
6927 (native-inputs
6928 `(("python-zope-testing" ,python-zope-testing)))
6929 (propagated-inputs
6930 `(("python-zope-event" ,python-zope-event)
6931 ("python-zope-interface" ,python-zope-interface)
6932 ("python-zope-i18nmessageid" ,python-zope-i18nmessageid)
6933 ("python-zope-configuration" ,python-zope-configuration)))
6934 (home-page "https://github.com/zopefoundation/zope.component")
6935 (synopsis "Zope Component Architecture")
6936 (description "Zope.component represents the core of the Zope Component
6937 Architecture. Together with the zope.interface package, it provides
6938 facilities for defining, registering and looking up components.")
6939 (license license:zpl2.1)))
6940
6941 (define-public python2-zope-component
6942 (package-with-python2 python-zope-component))
6943
6944 (define-public python-pythondialog
6945 (package
6946 (name "python-pythondialog")
6947 (version "3.4.0")
6948 (source
6949 (origin
6950 (method url-fetch)
6951 (uri (pypi-uri "pythondialog" version))
6952 (sha256
6953 (base32
6954 "1728ghsran47jczn9bhlnkvk5bvqmmbihabgif5h705b84r1272c"))))
6955 (build-system python-build-system)
6956 (arguments
6957 `(#:phases
6958 (modify-phases %standard-phases
6959 (add-after 'unpack 'patch-path
6960 (lambda* (#:key inputs #:allow-other-keys)
6961 (let* ((dialog (assoc-ref inputs "dialog")))
6962 ;; Since this library really wants to grovel the search path, we
6963 ;; must hardcode dialog's store path into it.
6964 (substitute* "dialog.py"
6965 (("os.getenv\\(\"PATH\", \":/bin:/usr/bin\"\\)")
6966 (string-append "os.getenv(\"PATH\") + \":" dialog "/bin\"")))
6967 #t))))
6968 #:tests? #f)) ; no test suite
6969 (propagated-inputs
6970 `(("dialog" ,dialog)))
6971 (home-page "http://pythondialog.sourceforge.net/")
6972 (synopsis "Python interface to the UNIX dialog utility")
6973 (description "A Python wrapper for the dialog utility. Its purpose is to
6974 provide an easy to use, pythonic and comprehensive Python interface to dialog.
6975 This allows one to make simple text-mode user interfaces on Unix-like systems")
6976 (license license:lgpl2.1)
6977 (properties `((python2-variant . ,(delay python2-pythondialog))))))
6978
6979 (define-public python2-pythondialog
6980 (let ((base (package-with-python2 (strip-python2-variant python-pythondialog))))
6981 (package
6982 (inherit base)
6983 (version (package-version python-pythondialog))
6984 (source (origin
6985 (method url-fetch)
6986 (uri (pypi-uri "python2-pythondialog" version))
6987 (sha256
6988 (base32
6989 "0d8k7lxk50imdyx85lv8j98i4c93a71iwpapnl1506rpkbm9qvd9")))))))
6990
6991 (define-public python-pyrfc3339
6992 (package
6993 (name "python-pyrfc3339")
6994 (version "1.0")
6995 (source
6996 (origin
6997 (method url-fetch)
6998 (uri (pypi-uri "pyRFC3339" version))
6999 (sha256
7000 (base32
7001 "0dgm4l9y8jiax5cp6yxjd2i27cq8h33sh81n1wfbmnmqb32cdywd"))))
7002 (build-system python-build-system)
7003 (propagated-inputs
7004 `(("python-pytz" ,python-pytz)))
7005 (native-inputs
7006 `(("python-nose" ,python-nose)
7007 ("python-setuptools" ,python-setuptools)))
7008 (home-page "https://github.com/kurtraschke/pyRFC3339")
7009 (synopsis "Python timestamp library")
7010 (description "Python library for generating and parsing RFC 3339-compliant
7011 timestamps.")
7012 (license license:expat)))
7013
7014 (define-public python2-pyrfc3339
7015 (package-with-python2 python-pyrfc3339))
7016
7017 (define-public python-werkzeug
7018 (package
7019 (name "python-werkzeug")
7020 (version "0.11.11")
7021 (source
7022 (origin
7023 (method url-fetch)
7024 (uri (pypi-uri "Werkzeug" version))
7025 (sha256
7026 (base32
7027 "1rgpq8a2qv26d75v9j3b074inirlyy6y4b5x4rxblp202jy4cb77"))))
7028 (build-system python-build-system)
7029 (native-inputs
7030 `(("python-pytest" ,python-pytest)))
7031 (home-page "http://werkzeug.pocoo.org/")
7032 (synopsis "Utilities for WSGI applications")
7033 (description "One of the most advanced WSGI utility modules. It includes a
7034 powerful debugger, full-featured request and response objects, HTTP utilities to
7035 handle entity tags, cache control headers, HTTP dates, cookie handling, file
7036 uploads, a powerful URL routing system and a bunch of community-contributed
7037 addon modules.")
7038 (license license:x11)))
7039
7040 (define-public python2-werkzeug
7041 (package-with-python2 python-werkzeug))
7042
7043 (define-public python-configobj
7044 (package
7045 (name "python-configobj")
7046 (version "5.0.6")
7047 (source (origin
7048 (method url-fetch)
7049 (uri (string-append
7050 "https://pypi.python.org/packages/source/c/configobj/"
7051 "configobj-" version ".tar.gz"))
7052 (sha256
7053 (base32
7054 "00h9rcmws03xvdlfni11yb60bz3kxfvsj6dg6nrpzj71f03nbxd2"))
7055 ;; Patch setup.py so it looks for python-setuptools, which is
7056 ;; required to parse the keyword 'install_requires' in setup.py.
7057 (patches (search-patches "python-configobj-setuptools.patch"))))
7058 (build-system python-build-system)
7059 (native-inputs
7060 `(("python-setuptools" ,python-setuptools)
7061 ("python-six" ,python-six)))
7062 (synopsis "Config file reading, writing and validation")
7063 (description "ConfigObj is a simple but powerful config file reader and
7064 writer: an ini file round tripper. Its main feature is that it is very easy to
7065 use, with a straightforward programmer’s interface and a simple syntax for
7066 config files.")
7067 (home-page "https://github.com/DiffSK/configobj")
7068 (license license:bsd-3)))
7069
7070 (define-public python2-configobj
7071 (package-with-python2 python-configobj))
7072
7073 (define-public python-configargparse
7074 (package
7075 (name "python-configargparse")
7076 (version "0.10.0")
7077 (source (origin
7078 (method url-fetch)
7079 (uri (string-append
7080 "https://pypi.python.org/packages/source/C/ConfigArgParse/"
7081 "ConfigArgParse-" version ".tar.gz"))
7082 (sha256
7083 (base32
7084 "19wh919gbdbzxzpagg52q3lm62yicm95ddlcx77dyjc1slyshl1v"))))
7085 (build-system python-build-system)
7086 (arguments
7087 ;; FIXME: Bug in test suite filed upstream:
7088 ;; https://github.com/bw2/ConfigArgParse/issues/32
7089 '(#:tests? #f))
7090 (synopsis "Replacement for argparse")
7091 (description "A drop-in replacement for argparse that allows options to also
7092 be set via config files and/or environment variables.")
7093 (home-page "https://github.com/bw2/ConfigArgParse")
7094 (license license:expat)))
7095
7096 (define-public python2-configargparse
7097 (package-with-python2 python-configargparse))
7098
7099 (define-public python-ndg-httpsclient
7100 (package
7101 (name "python-ndg-httpsclient")
7102 (version "0.4.0")
7103 (source (origin
7104 (method url-fetch)
7105 (uri (string-append
7106 "https://pypi.python.org/packages/source/n/ndg-httpsclient/"
7107 "ndg_httpsclient-" version ".tar.gz"))
7108 (sha256
7109 (base32
7110 "0x32ibixm3vv5m9xfk83xsqm8xcqw4dd0khbh6qbri6rxgymbhg8"))))
7111 (build-system python-build-system)
7112 (arguments
7113 '(;; The tests appear to require networking.
7114 #:tests? #f))
7115 (propagated-inputs
7116 `(("python-pyopenssl" ,python-pyopenssl)))
7117 (synopsis "HTTPS support for Python's httplib and urllib2")
7118 (description "This is a HTTPS client implementation for httplib and urllib2
7119 based on PyOpenSSL. PyOpenSSL provides a more fully featured SSL implementation
7120 over the default provided with Python and importantly enables full verification
7121 of the SSL peer.")
7122 (home-page "https://github.com/cedadev/ndg_httpsclient/")
7123 (license license:bsd-3)))
7124
7125 ;; python2-openssl requires special care, so package-with-python2 is
7126 ;; insufficient.
7127 (define-public python2-ndg-httpsclient
7128 (package (inherit python-ndg-httpsclient)
7129 (name "python2-ndg-httpsclient")
7130 (arguments `(#:python ,python-2))
7131 (propagated-inputs
7132 `(("python2-pyopenssl" ,python2-pyopenssl)))))
7133
7134 (define-public python-contextlib2
7135 (package
7136 (name "python-contextlib2")
7137 (version "0.4.0")
7138 (source
7139 (origin
7140 (method url-fetch)
7141 (uri (pypi-uri "contextlib2" version))
7142 (sha256
7143 (base32
7144 "0cmp131dlh0d0zvw0aza1zd13glvngzk8lb4avks0hm7yxwdr9am"))))
7145 (build-system python-build-system)
7146 (arguments
7147 `(#:phases
7148 (modify-phases %standard-phases
7149 (replace 'check
7150 (lambda _ (zero?
7151 (system*
7152 "python" "test_contextlib2.py" "-v")))))))
7153 (home-page "http://contextlib2.readthedocs.org/")
7154 (synopsis "Tools for decorators and context managers")
7155 (description "This module is primarily a backport of the Python
7156 3.2 contextlib to earlier Python versions. Like contextlib, it
7157 provides utilities for common tasks involving decorators and context
7158 managers. It also contains additional features that are not part of
7159 the standard library.")
7160 (license license:psfl)))
7161
7162 (define-public python2-contextlib2
7163 (package-with-python2 python-contextlib2))
7164
7165 (define-public python-texttable
7166 (package
7167 (name "python-texttable")
7168 (version "0.8.4")
7169 (source
7170 (origin
7171 (method url-fetch)
7172 (uri (pypi-uri "texttable" version))
7173 (sha256
7174 (base32
7175 "0bkhs4dx9s6g7fpb969hygq56hyz4ncfamlynw72s0n6nqfbd1w5"))))
7176 (build-system python-build-system)
7177 (arguments '(#:tests? #f)) ; no tests
7178 (home-page "https://github.com/foutaise/texttable/")
7179 (synopsis "Python module for creating simple ASCII tables")
7180 (description "Texttable is a Python module for creating simple ASCII
7181 tables.")
7182 (license license:lgpl2.1+)))
7183
7184 (define-public python2-texttable
7185 (package-with-python2 python-texttable))
7186
7187 (define-public python-websocket-client
7188 (package
7189 (name "python-websocket-client")
7190 (version "0.37.0")
7191 (source
7192 (origin
7193 (method url-fetch)
7194 (uri (pypi-uri "websocket_client" version))
7195 (sha256
7196 (base32
7197 "0h9glp1jll3z76ly3kg08aqgxqk0a68p4zi9yn50353bh5nj92v7"))))
7198 (build-system python-build-system)
7199 (native-inputs
7200 `(("python-six" ,python-six))) ; for tests
7201 (inputs
7202 `(("python-setuptools" ,python-setuptools)))
7203 (home-page "https://github.com/liris/websocket-client")
7204 (synopsis "WebSocket client for Python")
7205 (description "The Websocket-client module provides the low level APIs for
7206 WebSocket usage in Python programs.")
7207 (license license:lgpl2.1+)))
7208
7209 (define-public python2-websocket-client
7210 (package-with-python2 python-websocket-client))
7211
7212 (define-public python-atomicwrites
7213 (package
7214 (name "python-atomicwrites")
7215 (version "1.1.0")
7216 (source (origin
7217 (method url-fetch)
7218 (uri (pypi-uri "atomicwrites" version))
7219 (sha256
7220 (base32
7221 "1s01dci8arsl9d9vr5nz1fk9znldp1z3l4yl43f0c27z12b8yxl0"))))
7222 (build-system python-build-system)
7223 (synopsis "Atomic file writes in Python")
7224 (description "Library for atomic file writes using platform dependent tools
7225 for atomic file system operations.")
7226 (home-page "https://github.com/untitaker/python-atomicwrites")
7227 (license license:expat)
7228 (properties `((python2-variant . ,(delay python2-atomicwrites))))))
7229
7230 (define-public python2-atomicwrites
7231 (package (inherit (package-with-python2
7232 (strip-python2-variant python-atomicwrites)))
7233 (native-inputs
7234 `(("python2-setuptools" ,python2-setuptools)))))
7235
7236 (define-public python-requests-toolbelt
7237 (package
7238 (name "python-requests-toolbelt")
7239 (version "0.6.2")
7240 (source (origin
7241 (method url-fetch)
7242 (uri (string-append
7243 "https://pypi.python.org/packages/"
7244 "e1/a4/a94c037bc72ad70441aff1403d3243510d2542ddca7759faaeffeb11aefe/"
7245 "requests-toolbelt-" version ".tar.gz"))
7246 (sha256
7247 (base32
7248 "15q9nrgp85nqlr4kdz1zvj8z2npafi2sr12y7fqgxbkq28j1aci6"))))
7249 (build-system python-build-system)
7250 (native-inputs
7251 `(("python-betamax" ,python-betamax)
7252 ("python-mock" ,python-mock)
7253 ("python-pytest" ,python-pytest)))
7254 (propagated-inputs
7255 `(("python-requests" ,python-requests)))
7256 (synopsis "Extensions to python-requests")
7257 (description "This is a toolbelt of useful classes and functions to be used
7258 with python-requests.")
7259 (home-page "https://github.com/sigmavirus24/requests-toolbelt")
7260 (license license:asl2.0)))
7261
7262 (define-public python-click-threading
7263 (package
7264 (name "python-click-threading")
7265 (version "0.2.0")
7266 (source (origin
7267 (method url-fetch)
7268 (uri (string-append
7269 "https://pypi.python.org/packages/"
7270 "fe/b7/e7f609d18a2a351cb71616adcf54df1acd82f83cb9b5936935a4d20e2c23/"
7271 "click-threading-" version ".tar.gz"))
7272 (sha256
7273 (base32
7274 "18bcqikxwb3drb8rf60cclxkxw52521b38ax3byah6j8cn8y9p4j"))))
7275 (build-system python-build-system)
7276 (propagated-inputs
7277 `(("python-click" ,python-click)))
7278 (synopsis "Utilities for multithreading in Click")
7279 (description "This package provides utilities for multithreading in Click
7280 applications.")
7281 (home-page "https://github.com/click-contrib/click-threading")
7282 (license license:expat)))
7283
7284 (define-public python-click-log
7285 (package
7286 (name "python-click-log")
7287 (version "0.1.3")
7288 (source (origin
7289 (method url-fetch)
7290 (uri (pypi-uri "click-log" version))
7291 (sha256
7292 (base32
7293 "0kdd1vminxpcfczxl2kkf285n0dr1gxh2cdbx1p6vkj7b7bci3gx"))))
7294 (build-system python-build-system)
7295 (propagated-inputs
7296 `(("python-click" ,python-click)))
7297 (synopsis "Logging for click applications")
7298 (description "This package provides a Python library for logging Click
7299 applications.")
7300 (home-page "https://github.com/click-contrib/click-log")
7301 (license license:expat)))
7302
7303 (define-public python-apipkg
7304 (package
7305 (name "python-apipkg")
7306 (version "1.4")
7307 (source (origin
7308 (method url-fetch)
7309 (uri (pypi-uri "apipkg" version))
7310 (sha256
7311 (base32
7312 "1iks5701qnp3dlr3q1d9qm68y2plp2m029irhpz92a44psfkjf1f"))))
7313 (build-system python-build-system)
7314 (inputs
7315 `(("python-pytest" ,python-pytest)))
7316 (synopsis "Namespace control and lazy-import mechanism")
7317 (description "With apipkg you can control the exported namespace of a Python
7318 package and greatly reduce the number of imports for your users. It is a small
7319 pure Python module that works on virtually all Python versions.")
7320 (home-page "https://bitbucket.org/hpk42/apipkg")
7321 (license license:expat)
7322 (properties `((python2-variant . ,(delay python2-apipkg))))))
7323
7324 (define-public python2-apipkg
7325 (package
7326 (inherit (package-with-python2
7327 (strip-python2-variant python-apipkg)))
7328 (native-inputs
7329 `(("python2-setuptools" ,python2-setuptools)))))
7330
7331 (define-public python-execnet
7332 (package
7333 (name "python-execnet")
7334 (version "1.4.1")
7335 (source (origin
7336 (method url-fetch)
7337 (uri (pypi-uri "execnet" version))
7338 (sha256
7339 (base32
7340 "1rpk1vyclhg911p3hql0m0nrpq7q7mysxnaaw6vs29cpa6kx8vgn"))))
7341 (build-system python-build-system)
7342 (arguments
7343 `(;; 2 failed, 275 passed, 670 skipped, 4 xfailed
7344 ;; The two test failures are caused by the lack of an `ssh` executable.
7345 ;; The test suite can be run with pytest after the 'install' phase.
7346 #:tests? #f))
7347 (native-inputs
7348 `(("python-pytest" ,python-pytest)
7349 ("python-setuptools-scm" ,python-setuptools-scm)))
7350 (inputs
7351 `(("python-apipkg" ,python-apipkg)))
7352 (synopsis "Rapid multi-Python deployment")
7353 (description "Execnet provides a share-nothing model with
7354 channel-send/receive communication for distributing execution across many
7355 Python interpreters across version, platform and network barriers. It has a
7356 minimal and fast API targetting the following uses:
7357 @enumerate
7358 @item distribute tasks to (many) local or remote CPUs
7359 @item write and deploy hybrid multi-process applications
7360 @item write scripts to administer multiple environments
7361 @end enumerate")
7362 (home-page "http://codespeak.net/execnet/")
7363 (license license:expat)
7364 (properties `((python2-variant . ,(delay python2-execnet))))))
7365
7366 (define-public python2-execnet
7367 (let ((execnet (package-with-python2
7368 (strip-python2-variant python-execnet))))
7369 (package
7370 (inherit execnet)
7371 (native-inputs
7372 `(("python2-setuptools" ,python2-setuptools)
7373 ,@(package-native-inputs execnet))))))
7374
7375 ;;; The software provided by this package was integrated into pytest 2.8.
7376 (define-public python-pytest-cache
7377 (package
7378 (name "python-pytest-cache")
7379 (version "1.0")
7380 (source (origin
7381 (method url-fetch)
7382 (uri (pypi-uri "pytest-cache" version))
7383 (sha256
7384 (base32
7385 "1a873fihw4rhshc722j4h6j7g3nj7xpgsna9hhg3zn6ksknnhx5y"))))
7386 (build-system python-build-system)
7387 (inputs
7388 `(("python-apipkg" ,python-apipkg)
7389 ("python-execnet" ,python-execnet)
7390 ("python-py" ,python-py)
7391 ("python-pytest" ,python-pytest)))
7392 (synopsis "Py.test plugin with mechanisms for caching across test runs")
7393 (description "The pytest-cache plugin provides tools to rerun failures from
7394 the last py.test invocation.")
7395 (home-page "https://bitbucket.org/hpk42/pytest-cache/")
7396 (license license:expat)
7397 (properties `((python2-variant . ,(delay python2-pytest-cache))))))
7398
7399 (define-public python2-pytest-cache
7400 (let ((pytest-cache (package-with-python2
7401 (strip-python2-variant python-pytest-cache))))
7402 (package
7403 (inherit pytest-cache)
7404 (native-inputs
7405 `(("python2-setuptools" ,python2-setuptools)
7406 ,@(package-native-inputs pytest-cache))))))
7407
7408 (define-public python-pytest-localserver
7409 (package
7410 (name "python-pytest-localserver")
7411 (version "0.3.5")
7412 (source (origin
7413 (method url-fetch)
7414 (uri (pypi-uri "pytest-localserver" version))
7415 (sha256
7416 (base32
7417 "0dvqspjr6va55zwmnnc2mmpqc7mm65kxig9ya44x1z8aadzxpa4p"))))
7418 (build-system python-build-system)
7419 (arguments
7420 `(#:phases (modify-phases %standard-phases
7421 (replace 'check
7422 (lambda _
7423 (zero? (system* "py.test" "--genscript=runtests.py"))
7424 (zero? (system* "py.test")))))))
7425 (native-inputs
7426 `(("python-pytest" ,python-pytest)
7427 ("python-requests" ,python-requests)
7428 ("python-six" ,python-six)))
7429 (inputs
7430 `(("python-werkzeug" ,python-werkzeug)))
7431 (synopsis "Py.test plugin to test server connections locally")
7432 (description "Pytest-localserver is a plugin for the pytest testing
7433 framework which enables you to test server connections locally.")
7434 (home-page "https://pypi.python.org/pypi/pytest-localserver")
7435 (license license:expat)))
7436
7437 (define-public python-wsgi-intercept
7438 (package
7439 (name "python-wsgi-intercept")
7440 (version "1.2.2")
7441 (source (origin
7442 (method url-fetch)
7443 (uri (string-append
7444 "https://pypi.python.org/packages/"
7445 "38/76/ebcbc24d0cb77db34520a3ca6ed1bd43ace17d182bbd8dd7d976f1c176fb/"
7446 "wsgi_intercept-" version ".tar.gz"))
7447 (sha256
7448 (base32
7449 "0kjj2v2dvmnpdd5h5gk9rzz0f54rhjb0yiz3zg65bmp65slfw65d"))))
7450 (build-system python-build-system)
7451 (native-inputs
7452 `(("python-pytest" ,python-pytest)
7453 ("python-six" ,python-six)
7454 ("python-urllib3" ,python-urllib3)))
7455 (propagated-inputs
7456 `(("python-httplib2" ,python-httplib2)
7457 ("python-requests" ,python-requests)))
7458 (synopsis "Puts a WSGI application in place of a real URI for testing")
7459 (description "Wsgi_intercept installs a WSGI application in place of a real
7460 URI for testing. Testing a WSGI application normally involves starting a
7461 server at a local host and port, then pointing your test code to that address.
7462 Instead, this library lets you intercept calls to any specific host/port
7463 combination and redirect them into a WSGI application importable by your test
7464 program. Thus, you can avoid spawning multiple processes or threads to test
7465 your Web app.")
7466 (home-page "https://github.com/cdent/wsgi-intercept")
7467 (license license:expat)))
7468
7469 (define-public python-pytest-xprocess
7470 (package
7471 (name "python-pytest-xprocess")
7472 (version "0.9.1")
7473 (source (origin
7474 (method url-fetch)
7475 (uri (pypi-uri "pytest-xprocess" version))
7476 (sha256
7477 (base32
7478 "17zlql1xqw3ywcgwwbqmw633aly99lab12hm02asr8awvg5603pp"))))
7479 (build-system python-build-system)
7480 (propagated-inputs
7481 `(("python-pytest" ,python-pytest)
7482 ("python-pytest-cache" ,python-pytest-cache)
7483 ("python-psutil" ,python-psutil)))
7484 (synopsis "Pytest plugin to manage external processes across test runs")
7485 (description "Pytest-xprocess is an experimental py.test plugin for managing
7486 processes across test runs.")
7487 (home-page "https://bitbucket.org/pytest-dev/pytest-xprocess")
7488 (license license:expat)))
7489
7490 (define-public python-icalendar
7491 (package
7492 (name "python-icalendar")
7493 (version "3.10")
7494 (source (origin
7495 (method url-fetch)
7496 (uri (pypi-uri "icalendar" version))
7497 (sha256
7498 (base32
7499 "01amnk3621s7fagfla86npd25knbqirchg7h1jpqxqp103d02bs7"))))
7500 (build-system python-build-system)
7501 (propagated-inputs
7502 `(("python-dateutil-2" ,python-dateutil-2)
7503 ("python-pytz" ,python-pytz)))
7504 (synopsis "Python library for parsing iCalendar files")
7505 (description "The icalendar package is a parser/generator of iCalendar
7506 files for use with Python.")
7507 (home-page "https://github.com/collective/icalendar")
7508 (license license:bsd-2)))
7509
7510 (define-public python-sphinxcontrib-newsfeed
7511 (package
7512 (name "python-sphinxcontrib-newsfeed")
7513 (version "0.1.4")
7514 (source (origin
7515 (method url-fetch)
7516 (uri (pypi-uri "sphinxcontrib-newsfeed" version))
7517 (sha256
7518 (base32
7519 "1d7gam3mn8v4in4p16yn3v10vps7nnaz6ilw99j4klij39dqd37p"))))
7520 (build-system python-build-system)
7521 (propagated-inputs
7522 `(("python-docutils" ,python-docutils)
7523 ("python-sphinx" ,python-sphinx)))
7524 (synopsis "News Feed extension for Sphinx")
7525 (description "Sphinxcontrib-newsfeed is an extension for adding a simple
7526 Blog, News or Announcements section to a Sphinx website.")
7527 (home-page "https://bitbucket.org/prometheus/sphinxcontrib-newsfeed")
7528 (license license:bsd-2)))
7529
7530 (define-public python-args
7531 (package
7532 (name "python-args")
7533 (version "0.1.0")
7534 (source (origin
7535 (method url-fetch)
7536 (uri (pypi-uri "args" version))
7537 (sha256
7538 (base32
7539 "057qzi46h5dmxdqknsbrssn78lmqjlnm624iqdhrnpk26zcbi1d7"))))
7540 (build-system python-build-system)
7541 (inputs
7542 `(("python-setuptools" ,python-setuptools)))
7543 (home-page "https://github.com/kennethreitz/args")
7544 (synopsis "Command-line argument parser")
7545 (description
7546 "This library provides a Python module to parse command-line arguments.")
7547 (license license:bsd-3)))
7548
7549 (define-public python2-args
7550 (package-with-python2 python-args))
7551
7552 (define-public python-clint
7553 (package
7554 (name "python-clint")
7555 (version "0.5.1")
7556 (source (origin
7557 (method url-fetch)
7558 (uri (pypi-uri "clint" version))
7559 (sha256
7560 (base32
7561 "1an5lkkqk1zha47198p42ji3m94xmzx1a03dn7866m87n4r4q8h5"))))
7562 (build-system python-build-system)
7563 (inputs
7564 `(("python-args" ,python-args)
7565 ("python-setuptools" ,python-setuptools)))
7566 (home-page "https://github.com/kennethreitz/clint")
7567 (synopsis "Command-line interface tools")
7568 (description
7569 "Clint is a Python module filled with a set of tools for developing
7570 command-line applications, including tools for colored and indented
7571 output, progress bar display, and pipes.")
7572 (license license:isc)))
7573
7574 (define-public python2-clint
7575 (package-with-python2 python-clint))
7576
7577 (define-public python-astor
7578 (package
7579 (name "python-astor")
7580 (version "0.5")
7581 (source (origin
7582 (method url-fetch)
7583 (uri (pypi-uri "astor" version))
7584 (sha256
7585 (base32
7586 "1fdafq5hkis1fxqlmhw0sn44zp2ar46nxhbc22cvwg7hsd8z5gsa"))))
7587 (build-system python-build-system)
7588 (inputs
7589 `(("python-setuptools" ,python-setuptools)))
7590 (home-page "https://github.com/berkerpeksag/astor")
7591 (synopsis "Read and write Python ASTs")
7592 (description
7593 "Astor is designed to allow easy manipulation of Python source via the
7594 Abstract Syntax Tree.")
7595 (license license:bsd-3)))
7596
7597 (define-public python2-astor
7598 (package-with-python2 python-astor))
7599
7600 (define-public python-rply
7601 (package
7602 (name "python-rply")
7603 (version "0.7.4")
7604 (source (origin
7605 (method url-fetch)
7606 (uri (pypi-uri "rply" version))
7607 (sha256
7608 (base32
7609 "12rp1d9ba7nvd5rhaxi6xzx1rm67r1k1ylsrkzhpwnphqpb06cvj"))))
7610 (build-system python-build-system)
7611 (inputs
7612 `(("python-appdirs" ,python-appdirs)
7613 ("python-setuptools" ,python-setuptools)))
7614 (home-page "https://github.com/alex/rply")
7615 (synopsis "Parser generator for Python")
7616 (description
7617 "This package provides a pure Python based parser generator, that also
7618 works with RPython. It is a more-or-less direct port of David Bazzley's PLY,
7619 with a new public API, and RPython support.")
7620 (license license:bsd-3)))
7621
7622 (define-public python2-rply
7623 (package-with-python2 python-rply))
7624
7625 (define-public python-hy
7626 (package
7627 (name "python-hy")
7628 (version "0.11.1")
7629 (source (origin
7630 (method url-fetch)
7631 (uri (pypi-uri "hy" version))
7632 (sha256
7633 (base32
7634 "1msqv747iz12r73mz4qvsmlwkddwjvrahlrk7ysrcz07h7dsscxs"))))
7635 (build-system python-build-system)
7636 (inputs
7637 `(("python-astor" ,python-astor)
7638 ("python-clint" ,python-clint)
7639 ("python-rply" ,python-rply)
7640 ("python-setuptools" ,python-setuptools)))
7641 (home-page "http://hylang.org/")
7642 (synopsis "Lisp frontend to Python")
7643 (description
7644 "Hy is a dialect of Lisp that's embedded in Python. Since Hy transforms
7645 its Lisp code into the Python Abstract Syntax Tree, you have the whole world of
7646 Python at your fingertips, in Lisp form.")
7647 (license license:expat)))
7648
7649 (define-public python2-hy
7650 (package-with-python2 python-hy))
7651
7652 (define-public python-rauth
7653 (package
7654 (name "python-rauth")
7655 (version "0.7.2")
7656 (source
7657 (origin
7658 (method url-fetch)
7659 (uri (pypi-uri "rauth" version))
7660 (sha256
7661 (base32
7662 "00pq7zw429hhza9c0qzxiqp77m653jv09z92nralnmzwdf6pzicf"))))
7663 (build-system python-build-system)
7664 (arguments
7665 `(#:test-target "check"))
7666 (inputs
7667 `(("python-requests" ,python-requests)))
7668 (home-page "https://github.com/litl/rauth")
7669 (synopsis "Python library for OAuth 1.0/a, 2.0, and Ofly")
7670 (description
7671 "Rauth is a Python library for OAuth 1.0/a, 2.0, and Ofly. It also
7672 provides service wrappers for convenient connection initialization and
7673 authenticated session objects providing things like keep-alive.")
7674 (license license:expat)
7675 (properties `((python2-variant . ,(delay python2-rauth))))))
7676
7677 (define-public python2-rauth
7678 (let ((base (package-with-python2 (strip-python2-variant python-rauth))))
7679 (package
7680 (inherit base)
7681 (native-inputs `(("python2-setuptools" ,python2-setuptools)
7682 ("python2-unittest2" ,python2-unittest2)
7683 ,@(package-native-inputs base))))))
7684
7685 (define-public python2-functools32
7686 (package
7687 (name "python2-functools32")
7688 (version "3.2.3-2")
7689 (source
7690 (origin
7691 (method url-fetch)
7692 (uri (pypi-uri "functools32" version))
7693 (sha256
7694 (base32
7695 "0v8ya0b58x47wp216n1zamimv4iw57cxz3xxhzix52jkw3xks9gn"))))
7696 (build-system python-build-system)
7697 (arguments
7698 `(#:python ,python-2
7699 #:tests? #f)) ; no test target
7700 (native-inputs
7701 `(("python2-setuptools" ,python2-setuptools)))
7702 (home-page "https://github.com/MiCHiLU/python-functools32")
7703 (synopsis
7704 "Backport of the functools module from Python 3.2.3")
7705 (description
7706 "This package is a backport of the @code{functools} module from Python
7707 3.2.3 for use with older versions of Python and PyPy.")
7708 (license license:expat)))
7709
7710 (define-public python2-futures
7711 (package
7712 (name "python2-futures")
7713 (version "3.0.3")
7714 (source
7715 (origin
7716 (method url-fetch)
7717 (uri (pypi-uri "futures" version))
7718 (sha256
7719 (base32
7720 "1vcb34dqhzkhbq1957vdjszhhm5y3j9ba88dgwhqx2zynhmk9qig"))))
7721 (build-system python-build-system)
7722 (arguments `(#:python ,python-2))
7723 (native-inputs
7724 `(("python2-setuptools" ,python2-setuptools)))
7725 (home-page "https://github.com/agronholm/pythonfutures")
7726 (synopsis
7727 "Backport of the concurrent.futures package from Python 3.2")
7728 (description
7729 "The concurrent.futures module provides a high-level interface for
7730 asynchronously executing callables. This package backports the
7731 concurrent.futures package from Python 3.2")
7732 (license license:bsd-3)))
7733
7734 (define-public python-promise
7735 (package
7736 (name "python-promise")
7737 (version "0.4.2")
7738 (source
7739 (origin
7740 (method url-fetch)
7741 (uri (pypi-uri "promise" version))
7742 (sha256
7743 (base32
7744 "1k19ms8l3d5jzjh557rgkxb5sg4mqgfc315rn4hx1z3n8qq6lr3h"))))
7745 (build-system python-build-system)
7746 ;; Tests wants python-futures, which is a python2 only program, and
7747 ;; can't be found by python-promise at test time.
7748 (arguments `(#:tests? #f))
7749 (home-page "https://github.com/syrusakbary/promise")
7750 (synopsis "Promises/A+ implementation for Python")
7751 (description
7752 "Promises/A+ implementation for Python")
7753 (properties `((python2-variant . ,(delay python2-promise))))
7754 (license license:expat)))
7755
7756 (define-public python2-promise
7757 (let ((promise (package-with-python2
7758 (strip-python2-variant python-promise))))
7759 (package (inherit promise)
7760 (arguments (substitute-keyword-arguments (package-arguments promise)
7761 ((#:tests? _) #t)))
7762 (native-inputs
7763 `(("python2-futures" ,python2-futures)
7764 ("python2-pytest" ,python2-pytest)
7765 ("python2-setuptools" ,python2-setuptools)
7766 ,@(package-native-inputs promise))))))
7767
7768 (define-public python-urllib3
7769 (package
7770 (name "python-urllib3")
7771 (version "1.13.1")
7772 (source
7773 (origin
7774 (method url-fetch)
7775 (uri (pypi-uri "urllib3" version))
7776 (sha256
7777 (base32
7778 "10rrbr6c6k7j5dvfsyj4b2gsgxg9gggnn708qixf6ll57xqivfkf"))))
7779 (build-system python-build-system)
7780 (arguments `(#:tests? #f))
7781 (native-inputs
7782 `(("python-setuptools" ,python-setuptools)
7783 ;; some packages for tests
7784 ("python-nose" ,python-nose)
7785 ("python-mock" ,python-mock)
7786 ("python-tornado" ,python-tornado)))
7787 (propagated-inputs
7788 `(;; packages for https security
7789 ("python-certifi" ,python-certifi)
7790 ("python-ndg-httpsclient" ,python-ndg-httpsclient)
7791 ("python-pyasn1" ,python-pyasn1)
7792 ("python-pyopenssl" ,python-pyopenssl)))
7793 (home-page "http://urllib3.readthedocs.org/")
7794 (synopsis "HTTP library with thread-safe connection pooling")
7795 (description
7796 "Urllib3 supports features left out of urllib and urllib2 libraries. It
7797 can reuse the same socket connection for multiple requests, it can POST files,
7798 supports url redirection and retries, and also gzip and deflate decoding.")
7799 (license license:expat)))
7800
7801 (define-public python2-urllib3
7802 (package-with-python2 python-urllib3))
7803
7804 (define-public python-colorama
7805 (package
7806 (name "python-colorama")
7807 (version "0.3.3")
7808 (source
7809 (origin
7810 (method url-fetch)
7811 (uri (pypi-uri "colorama" version))
7812 (sha256
7813 (base32
7814 "1716z9pq1r5ys3nkg7wdrb3h2f9rmd0zdxpxzmx3bgwgf6xg48gb"))))
7815 (build-system python-build-system)
7816 (inputs
7817 `(("python-setuptools" ,python-setuptools)))
7818 (synopsis "colored terminal text rendering for Python")
7819 (description "Colorama is a Python library for rendering colored terminal
7820 text.")
7821 (home-page "https://pypi.python.org/pypi/colorama")
7822 (license license:bsd-3)))
7823
7824 (define-public python2-colorama
7825 (package-with-python2 python-colorama))
7826
7827 (define-public python-rsa
7828 (package
7829 (name "python-rsa")
7830 (version "3.2")
7831 (source
7832 (origin
7833 (method url-fetch)
7834 (uri (pypi-uri "rsa" version))
7835 (sha256
7836 (base32
7837 "0xwp929g7lvb1sghxfpqlxvgg96qcwqdbhh27sjplx30n3xp3wrh"))))
7838 (build-system python-build-system)
7839 (inputs
7840 `(("python-pyasn1" ,python-pyasn1)
7841 ("python-setuptools" ,python-setuptools)))
7842 (synopsis "Pure-Python RSA implementation")
7843 (description "Python-RSA is a pure-Python RSA implementation. It supports
7844 encryption and decryption, signing and verifying signatures, and key
7845 generation according to PKCS#1 version 1.5. It can be used as a Python
7846 library as well as on the command line.")
7847 (home-page "http://stuvel.eu/rsa")
7848 (license license:asl2.0)))
7849
7850 (define-public python2-rsa
7851 (package-with-python2 python-rsa))
7852
7853 (define-public python-pluggy
7854 (package
7855 (name "python-pluggy")
7856 (version "0.3.1")
7857 (source
7858 (origin
7859 (method url-fetch)
7860 (uri (pypi-uri "pluggy" version))
7861 (sha256
7862 (base32
7863 "18qfzfm40bgx672lkg8q9x5hdh76n7vax99aank7vh2nw21wg70m"))))
7864 (build-system python-build-system)
7865 (inputs
7866 `(("python-setuptools" ,python-setuptools)))
7867 (synopsis "Plugin and hook calling mechanism for Python")
7868 (description "Pluggy is an extraction of the plugin manager as used by
7869 Pytest but stripped of Pytest specific details.")
7870 (home-page "https://pypi.python.org/pypi/pluggy")
7871 (license license:expat)))
7872
7873 (define-public python2-pluggy
7874 (package-with-python2 python-pluggy))
7875
7876 (define-public python-tox
7877 (package
7878 (name "python-tox")
7879 (version "2.3.1")
7880 (source
7881 (origin
7882 (method url-fetch)
7883 (uri (pypi-uri "tox" version))
7884 (sha256
7885 (base32
7886 "1vj73ar4rimq3fwy5r2z3jv4g9qbh8rmpmncsc00g0k310acqzxz"))))
7887 (build-system python-build-system)
7888 (arguments
7889 ;; FIXME: Tests require a newer version of pytest, but upgrading our
7890 ;; pytest breaks other packages.
7891 '(#:tests? #f))
7892 (inputs
7893 `(("python-setuptools" ,python-setuptools)
7894 ("python-pluggy" ,python-pluggy)
7895 ("python-py" ,python-py)
7896 ("python-virtualenv" ,python-virtualenv)
7897 ("python-pytest" ,python-pytest)))
7898 (home-page "http://tox.testrun.org/")
7899 (synopsis "Virtualenv-based automation of test activities")
7900 (description "Tox is a generic virtualenv management and test command line
7901 tool. It can be used to check that a package installs correctly with
7902 different Python versions and interpreters, or run tests in each type of
7903 supported environment, or act as a frontend to continuous integration
7904 servers.")
7905 (license license:expat)))
7906
7907 (define-public python2-tox
7908 (package-with-python2 python-tox))
7909
7910 (define-public python-jmespath
7911 (package
7912 (name "python-jmespath")
7913 (version "0.9.0")
7914 (source
7915 (origin
7916 (method url-fetch)
7917 (uri (pypi-uri "jmespath" version))
7918 (sha256
7919 (base32
7920 "0g9xvl69y7nr3w7ag4fsp6sm4fqf6vrqjw7504x2hzrrsh3ampq8"))))
7921 (build-system python-build-system)
7922 (inputs
7923 `(("python-setuptools" ,python-setuptools)))
7924 (synopsis "JSON Matching Expressions")
7925 (description "JMESPath (pronounced “james path”) is a Python library that
7926 allows one to declaratively specify how to extract elements from a JSON
7927 document.")
7928 (home-page "https://github.com/jmespath/jmespath.py")
7929 (license license:expat)))
7930
7931 (define-public python2-jmespath
7932 (package-with-python2 python-jmespath))
7933
7934 (define-public python-botocore
7935 (package
7936 (name "python-botocore")
7937 (version "1.3.17")
7938 (source
7939 (origin
7940 (method url-fetch)
7941 (uri (pypi-uri "botocore" version))
7942 (sha256
7943 (base32
7944 "08vpvdixx1c1lfv6vzjig68bpiir7wfyhzf49ysxgvhbprg5ra0w"))))
7945 (build-system python-build-system)
7946 (inputs
7947 `(("python-dateutil" ,python-dateutil-2)
7948 ("python-docutils" ,python-docutils)
7949 ("python-mock" ,python-mock)
7950 ("python-nose" ,python-nose)
7951 ("python-setuptools" ,python-setuptools)
7952 ("python-tox" ,python-tox)
7953 ("python-wheel" ,python-wheel)
7954 ("python-jmespath" ,python-jmespath)))
7955 (home-page "https://github.com/boto/botocore")
7956 (synopsis "Low-level interface to AWS")
7957 (description "Botocore is a Python library that provides a low-level
7958 interface to the Amazon Web Services (AWS) API.")
7959 (license license:asl2.0)))
7960
7961 (define-public python2-botocore
7962 (package-with-python2 python-botocore))
7963
7964 (define-public awscli
7965 (package
7966 (name "awscli")
7967 (version "1.9.17")
7968 (source
7969 (origin
7970 (method url-fetch)
7971 (uri (string-append
7972 "https://pypi.python.org/packages/source/a/awscli/awscli-"
7973 version ".tar.gz"))
7974 (sha256
7975 (base32
7976 "1nj7jqvlpq57hfhby1njsbf8303gapa3njc4dramr6p3ffzvfi2i"))))
7977 (build-system python-build-system)
7978 (inputs
7979 `(("python-colorama" ,python-colorama)
7980 ("python-docutils" ,python-docutils)
7981 ("python-mock" ,python-mock)
7982 ("python-nose" ,python-nose)
7983 ("python-rsa" ,python-rsa)
7984 ("python-setuptools" ,python-setuptools)
7985 ("python-sphinx" ,python-sphinx)
7986 ("python-tox" ,python-tox)
7987 ("python-wheel" ,python-wheel)
7988 ("python-botocore" ,python-botocore)))
7989 (home-page "http://aws.amazon.com/cli/")
7990 (synopsis "Command line client for AWS")
7991 (description "AWS CLI provides a unified command line interface to the
7992 Amazon Web Services (AWS) API.")
7993 (license license:asl2.0)))
7994
7995 (define-public python-hypothesis
7996 (package
7997 (name "python-hypothesis")
7998 (version "3.1.0")
7999 (source (origin
8000 (method url-fetch)
8001 (uri (pypi-uri "hypothesis" version))
8002 (sha256
8003 (base32
8004 "0qyqq9akm4vshhn8cngjc1qykcvsn7cz6dlm6njfsgpbraqrmbbw"))))
8005 (build-system python-build-system)
8006 (propagated-inputs
8007 `(("python-flake8" ,python-flake8)
8008 ("python-pytest" ,python-pytest)))
8009 (synopsis "Library for property based testing")
8010 (description "Hypothesis is a library for testing your Python code against a
8011 much larger range of examples than you would ever want to write by hand. It’s
8012 based on the Haskell library, Quickcheck, and is designed to integrate
8013 seamlessly into your existing Python unit testing work flow.")
8014 (home-page "https://github.com/DRMacIver/hypothesis")
8015 (license license:mpl2.0)
8016 (properties `((python2-variant . ,(delay python2-hypothesis))))))
8017
8018 (define-public python2-hypothesis
8019 (let ((hypothesis (package-with-python2
8020 (strip-python2-variant python-hypothesis))))
8021 (package (inherit hypothesis)
8022 (native-inputs
8023 `(("python2-enum34" ,python2-enum34)
8024 ("python2-setuptools" ,python2-setuptools))))))
8025
8026 (define-public python-pytest-subtesthack
8027 (package
8028 (name "python-pytest-subtesthack")
8029 (version "0.1.1")
8030 (source (origin
8031 (method url-fetch)
8032 (uri (pypi-uri "pytest-subtesthack" version))
8033 (sha256
8034 (base32
8035 "15kzcr5pchf3id4ikdvlv752rc0j4d912n589l4rifp8qsj19l1x"))))
8036 (build-system python-build-system)
8037 (native-inputs
8038 `(;; setuptools required for python-2 variant
8039 ("python-setuptools" ,python-setuptools)))
8040 (propagated-inputs
8041 `(("python-pytest" ,python-pytest)))
8042 (synopsis "Set-up and tear-down fixtures for unit tests")
8043 (description "This plugin allows you to set up and tear down fixtures within
8044 unit test functions that use @code{py.test}. This is useful for using
8045 @command{hypothesis} inside py.test, as @command{hypothesis} will call the test
8046 function multiple times, without setting up or tearing down fixture state as is
8047 normally the case.")
8048 (home-page "https://github.com/untitaker/pytest-subtesthack/")
8049 (license license:unlicense)))
8050
8051 (define-public python2-pytest-subtesthack
8052 (package-with-python2 python-pytest-subtesthack))
8053
8054 (define-public python2-xdo
8055 (package
8056 (name "python2-xdo")
8057 (version "0.2")
8058 (source (origin
8059 (method url-fetch)
8060 (uri (string-append
8061 "http://http.debian.net/debian/pool/main/p/python-xdo/"
8062 "python-xdo_" version ".orig.tar.gz"))
8063 (sha256
8064 (base32
8065 "1kl5c1p0dyxf62plnk6fl77ycfb4whwjms16r14dxx8kn90hlqz4"))))
8066 (build-system python-build-system)
8067 (arguments
8068 `(#:python ,python-2
8069 #:tests? #f)) ; no tests provided
8070 (inputs
8071 `(("xdotool" ,xdotool)
8072 ("libX11" ,libx11)))
8073 (home-page "https://tracker.debian.org/pkg/python-xdo")
8074 (synopsis "Python library for simulating X11 keyboard/mouse input")
8075 (description "Provides bindings to libxdo for manipulating X11 via simulated
8076 input. (Note that this is mostly a legacy library; you may wish to look at
8077 python-xdo for newer bindings.)")
8078 (license license:bsd-3)))
8079
8080 (define-public python-wtforms
8081 (package
8082 (name "python-wtforms")
8083 (version "2.1")
8084 (source
8085 (origin
8086 (method url-fetch)
8087 (uri (pypi-uri "WTForms" version ".zip"))
8088 (sha256
8089 (base32
8090 "0vyl26y9cg409cfyj8rhqxazsdnd0jipgjw06civhrd53yyi1pzz"))))
8091 (build-system python-build-system)
8092 (native-inputs
8093 `(("unzip" ,unzip)))
8094 (home-page "http://wtforms.simplecodes.com/")
8095 (synopsis
8096 "Form validation and rendering library for Python web development")
8097 (description
8098 "WTForms is a flexible forms validation and rendering library
8099 for Python web development. It is very similar to the web form API
8100 available in Django, but is a standalone package.")
8101 (license license:bsd-3)
8102 (properties `((python2-variant . ,(delay python2-wtforms))))))
8103
8104 (define-public python2-wtforms
8105 (package
8106 (inherit (package-with-python2
8107 (strip-python2-variant python-wtforms)))
8108 (inputs `(("python2-setuptools" ,python2-setuptools)))))
8109
8110 (define-public python-mako
8111 (package
8112 (name "python-mako")
8113 (version "1.0.3")
8114 (source
8115 (origin
8116 (method url-fetch)
8117 (uri (pypi-uri "Mako" version))
8118 (sha256
8119 (base32
8120 "136kcjbs0s98qkx8a418b05dfblqp0kiiqyx8vhx4rarwc7bqi3n"))))
8121 (build-system python-build-system)
8122 (native-inputs
8123 `(("python-markupsafe" ,python-markupsafe)
8124 ("python-mock" ,python-mock)
8125 ("python-nose" ,python-nose)))
8126 (home-page "http://www.makotemplates.org/")
8127 (synopsis "Templating language for Python")
8128 (description "Mako is a templating language for Python that compiles
8129 templates into Python modules.")
8130 (license license:expat)
8131 (properties `((python2-variant . ,(delay python2-mako))))))
8132
8133 (define-public python2-mako
8134 (let ((base (package-with-python2
8135 (strip-python2-variant python-mako))))
8136 (package
8137 (inherit base)
8138 (native-inputs
8139 (cons `("python2-setuptools" ,python2-setuptools)
8140 (package-native-inputs base))))))
8141
8142 (define-public python-waitress
8143 (package
8144 (name "python-waitress")
8145 (version "0.8.10")
8146 (source
8147 (origin
8148 (method url-fetch)
8149 (uri (pypi-uri "waitress" version))
8150 (sha256
8151 (base32
8152 "017n9ra6vvmq9d5sfhdzyzr1mg15x2hj2dhm4pdlw98c1ypw2h3w"))))
8153 (build-system python-build-system)
8154 (home-page "https://github.com/Pylons/waitress")
8155 (synopsis "Waitress WSGI server")
8156 (description "Waitress is meant to be a production-quality pure-Python WSGI
8157 server with very acceptable performance.")
8158 (license license:zpl2.1)
8159 (properties `((python2-variant . ,(delay python2-waitress))))))
8160
8161 (define-public python2-waitress
8162 (package
8163 (inherit (package-with-python2
8164 (strip-python2-variant python-waitress)))
8165 (native-inputs `(("python2-setuptools" ,python2-setuptools)))))
8166
8167 (define-public python-wsgiproxy2
8168 (package
8169 (name "python-wsgiproxy2")
8170 (version "0.4.2")
8171 (source
8172 (origin
8173 (method url-fetch)
8174 (uri (pypi-uri "WSGIProxy2" version ".zip"))
8175 (sha256
8176 (base32
8177 "13kf9bdxrc95y9vriaz0viry3ah11nz4rlrykcfvb8nlqpx3dcm4"))))
8178 (build-system python-build-system)
8179 (native-inputs
8180 `(("unzip" ,unzip)
8181 ("python-nose" ,python-nose)
8182 ("python-coverage" ,python-coverage)))
8183 (propagated-inputs
8184 `(("python-six" ,python-six)
8185 ("python-webob" ,python-webob)))
8186 (home-page
8187 "https://github.com/gawel/WSGIProxy2/")
8188 (synopsis "WSGI Proxy with various http client backends")
8189 (description "WSGI turns HTTP requests into WSGI function calls.
8190 WSGIProxy turns WSGI function calls into HTTP requests.
8191 It also includes code to sign requests and pass private data,
8192 and to spawn subprocesses to handle requests.")
8193 (license license:expat)
8194 (properties `((python2-variant . ,(delay python2-wsgiproxy2))))))
8195
8196 (define-public python2-wsgiproxy2
8197 (let ((wsgiproxy2 (package-with-python2
8198 (strip-python2-variant python-wsgiproxy2))))
8199 (package
8200 (inherit wsgiproxy2)
8201 (inputs `(("python2-setuptools" ,python2-setuptools)
8202 ,@(package-inputs wsgiproxy2))))))
8203
8204 (define-public python-pastedeploy
8205 (package
8206 (name "python-pastedeploy")
8207 (version "1.5.2")
8208 (source
8209 (origin
8210 (method url-fetch)
8211 (uri (pypi-uri "PasteDeploy" version))
8212 (sha256
8213 (base32
8214 "1jz3m4hq8v6hyhfjz9425nd3nvn52cvbfipdcd72krjmla4qz1fm"))))
8215 (build-system python-build-system)
8216 (native-inputs
8217 `(("python-nose" ,python-nose)))
8218 (propagated-inputs
8219 ;; This package uses pkg_resources, part of setuptools, during runtime,
8220 ;; hence why not a native-input.
8221 `(("python-setuptools" ,python-setuptools)))
8222 (home-page "http://pythonpaste.org/deploy/")
8223 (synopsis
8224 "Load, configure, and compose WSGI applications and servers")
8225 (description
8226 "This tool provides code to load WSGI applications and servers from URIs;
8227 these URIs can refer to Python Eggs for INI-style configuration files. Paste
8228 Script provides commands to serve applications based on this configuration
8229 file.")
8230 (license license:expat)))
8231
8232 (define-public python2-pastedeploy
8233 (package-with-python2 python-pastedeploy))
8234
8235 (define-public python-paste
8236 (package
8237 (name "python-paste")
8238 (version "2.0.2")
8239 (source
8240 (origin
8241 (method url-fetch)
8242 (uri (pypi-uri "Paste" version))
8243 (sha256
8244 (base32
8245 "16dsv9qi0r4qsrsb6dilpq2rx0fnglvh36flzywcdnm2jg43mb5d"))
8246 (patches (search-patches "python-paste-remove-website-test.patch"
8247 "python-paste-remove-timing-test.patch"))))
8248 (build-system python-build-system)
8249 (native-inputs
8250 `(("python-nose" ,python-nose)))
8251 (propagated-inputs
8252 `(;; Uses pkg_resources provided by setuptools internally.
8253 ("python-setuptools" ,python-setuptools)
8254 ("python-six" ,python-six)))
8255 (arguments
8256 '(;; Tests don't pass on Python 3, but work fine on Python 2.
8257 ;; (As of 2.0.2, Python 3 support in Paste is presently a bit broken,
8258 ;; but is usable enough for the minimal amount it's used in MediaGoblin
8259 ;; still... things should be better by the next Paste release.)
8260 #:tests? #f))
8261 (home-page "http://pythonpaste.org")
8262 (synopsis
8263 "Python web development tools, focusing on WSGI")
8264 (description
8265 "Paste provides a variety of web development tools and middleware which
8266 can be nested together to build web applications. Paste's design closely
8267 follows ideas flowing from WSGI (Web Standard Gateway Interface).")
8268 (license license:expat)
8269 (properties `((python2-variant . ,(delay python2-paste))))))
8270
8271 (define-public python2-paste
8272 (let ((paste (package-with-python2
8273 (strip-python2-variant python-paste))))
8274 (package
8275 (inherit paste)
8276 (arguments
8277 ;; Tests are back for Python 2!
8278 `(#:tests? #t
8279 ,@(package-arguments paste))))))
8280
8281 (define-public python-pastescript
8282 (package
8283 (name "python-pastescript")
8284 (version "2.0.2")
8285 (source
8286 (origin
8287 (method url-fetch)
8288 (uri (pypi-uri "PasteScript" version))
8289 (sha256
8290 (base32
8291 "1h3nnhn45kf4pbcv669ik4faw04j58k8vbj1hwrc532k0nc28gy0"))))
8292 (build-system python-build-system)
8293 (native-inputs
8294 `(("python-nose" ,python-nose)))
8295 (propagated-inputs
8296 `(;; Uses pkg_resources provided by setuptools internally.
8297 ("python-setuptools" ,python-setuptools)
8298 ("python-paste" ,python-paste)
8299 ("python-pastedeploy" ,python-pastedeploy)))
8300 (home-page "http://pythonpaste.org/script/")
8301 (arguments
8302 '(;; Unfortunately, this requires the latest unittest2,
8303 ;; but that requires traceback2 which requires linecache2 which requires
8304 ;; unittest2. So we're skipping tests for now.
8305 ;; (Note: Apparently linetest2 only needs unittest2 for its tests,
8306 ;; so in theory we could get around this situation somehow.)
8307 #:tests? #f))
8308 (synopsis
8309 "Pluggable command line tool for serving web applications and more")
8310 (description
8311 "PasteScript is a plugin-friendly command line tool which provides a
8312 variety of features, from launching web applications to bootstrapping project
8313 layouts.")
8314 (license license:expat)))
8315
8316 (define-public python2-pastescript
8317 (package-with-python2 python-pastescript))
8318
8319 (define-public python-pyquery
8320 (package
8321 (name "python-pyquery")
8322 (version "1.2.13")
8323 (source
8324 (origin
8325 (method url-fetch)
8326 (uri (pypi-uri "pyquery" version))
8327 (sha256
8328 (base32
8329 "0j9fsisip21qv4xljsg5dmni1pgpvwrjyyhhql0glydc4bs5rjgv"))))
8330 (build-system python-build-system)
8331 (propagated-inputs
8332 `(("python-lxml" ,python-lxml)
8333 ("python-cssselect" ,python-cssselect)))
8334 (home-page "https://github.com/gawel/pyquery")
8335 (synopsis "Make jQuery-like queries on xml documents")
8336 (description "pyquery allows you to make jQuery queries on xml documents.
8337 The API is as much as possible the similar to jQuery. pyquery uses lxml for
8338 fast xml and html manipulation.")
8339 (license license:bsd-3)
8340 (properties `((python2-variant . ,(delay python2-pyquery))))))
8341
8342 (define-public python2-pyquery
8343 (let ((pyquery (package-with-python2
8344 (strip-python2-variant python-pyquery))))
8345 (package
8346 (inherit pyquery)
8347 (native-inputs `(("python2-setuptools" ,python2-setuptools))))))
8348
8349 (define-public python-webtest
8350 (package
8351 (name "python-webtest")
8352 (version "2.0.20")
8353 (source
8354 (origin
8355 (method url-fetch)
8356 (uri (pypi-uri "WebTest" version))
8357 (sha256
8358 (base32
8359 "0bv0qhdjakdsdgj4sk21gnpp8xp8bga4x03p6gjb83ihrsb7n4xv"))))
8360 (build-system python-build-system)
8361 (arguments
8362 `(;; Unfortunately we have to disable tests!
8363 ;; This release of WebTest is pinned to python-nose < 1.3,
8364 ;; but older versions of python-nose are plagued with the following
8365 ;; bug(s), which rears its ugly head during test execution:
8366 ;; https://github.com/nose-devs/nose/issues/759
8367 ;; https://github.com/nose-devs/nose/pull/811
8368 #:tests? #f))
8369 ;; Commented out code is no good, but in this case, once tests
8370 ;; are ready to be enabled again, we should put the following
8371 ;; in place:
8372 ;; (native-inputs
8373 ;; `(("python-nose" ,python-nose) ; technially < 1.3,
8374 ;; ; but see above comment
8375 ;; ("python-coverage" ,python-coverage)
8376 ;; ("python-mock" ,python-mock)
8377 ;; ("python-pastedeploy" ,python-pastedeploy)
8378 ;; ("python-wsgiproxy2" ,python-wsgiproxy2)
8379 ;; ("python-pyquery" ,python-pyquery)))
8380 (propagated-inputs
8381 `(("python-waitress" ,python-waitress)
8382 ("python-webob" ,python-webob)
8383 ("python-six" ,python-six)
8384 ("python-beautifulsoup4" ,python-beautifulsoup4)))
8385 (home-page "http://webtest.pythonpaste.org/")
8386 (synopsis "Helper to test WSGI applications")
8387 (description "Webtest allows you to test your Python web applications
8388 without starting an HTTP server. It supports anything that supports the
8389 minimum of WSGI.")
8390 (license license:expat)
8391 (properties `((python2-variant . ,(delay python2-webtest))))))
8392
8393 (define-public python2-webtest
8394 (let ((webtest (package-with-python2
8395 (strip-python2-variant python-webtest))))
8396 (package
8397 (inherit webtest)
8398 (native-inputs `(("python2-setuptools" ,python2-setuptools)
8399 ,@(package-native-inputs webtest))))))
8400
8401 (define-public python-anyjson
8402 (package
8403 (name "python-anyjson")
8404 (version "0.3.3")
8405 (source
8406 (origin
8407 (method url-fetch)
8408 (uri (pypi-uri "anyjson" version))
8409 (sha256
8410 (base32
8411 "1fjph4alvcscsl5d4b6qpv1yh31jy05jxi1l0xff7lws7j32v09p"))))
8412 (build-system python-build-system)
8413 (arguments
8414 `(;; We could possibly get tests working, but on Python 3 it's not so easy.
8415 ;; Very strangely, 2to3 is run *during setup.py install* (or bdist, or
8416 ;; whatever) so this transformation needs to be done before the tests
8417 ;; can be run. Maybe we could add a build step to transform beforehand
8418 ;; but it could be annoying/difficult.
8419 ;; We can enable tests for the Python 2 version, though, and do below.
8420 #:tests? #f))
8421 (home-page "http://bitbucket.org/runeh/anyjson/")
8422 (synopsis
8423 "Wraps best available JSON implementation in a common interface")
8424 (description
8425 "Anyjson loads whichever is the fastest JSON module installed
8426 and provides a uniform API regardless of which JSON implementation is used.")
8427 (license license:bsd-3)
8428 (properties `((python2-variant . ,(delay python2-anyjson))))))
8429
8430 (define-public python2-anyjson
8431 (let ((anyjson (package-with-python2
8432 (strip-python2-variant python-anyjson))))
8433 (package
8434 (inherit anyjson)
8435 (arguments `(;; Unlike the python 3 variant, we do run tests. See above!
8436 #:tests? #t
8437 ,@(package-arguments anyjson)))
8438 (native-inputs `(("python2-setuptools" ,python2-setuptools)
8439 ("python2-nose" ,python2-nose))))))
8440
8441 (define-public python-amqp
8442 (package
8443 (name "python-amqp")
8444 (version "1.4.9")
8445 (source
8446 (origin
8447 (method url-fetch)
8448 (uri (pypi-uri "amqp" version))
8449 (sha256
8450 (base32
8451 "06n6q0kxhjnbfz3vn8x9yz09lwmn1xi9d6wxp31h5jbks0b4vsid"))))
8452 (build-system python-build-system)
8453 (native-inputs
8454 `(("python-nose" ,python-nose)
8455 ("python-mock" ,python-mock)))
8456 (home-page "http://github.com/celery/py-amqp")
8457 (synopsis
8458 "Low-level AMQP client for Python (fork of amqplib)")
8459 (description
8460 "This is a fork of amqplib which was originally written by Barry Pederson.
8461 It is maintained by the Celery project, and used by kombu as a pure python
8462 alternative when librabbitmq is not available.")
8463 (license license:lgpl2.1+)
8464 (properties `((python2-variant . ,(delay python2-amqp))))))
8465
8466 (define-public python2-amqp
8467 (let ((amqp (package-with-python2
8468 (strip-python2-variant python-amqp))))
8469 (package
8470 (inherit amqp)
8471 (arguments `(;; Tries to run coverage tests with nose-cover3, which seems
8472 ;; unmaintained. Weirdly, does not do this on the python 3
8473 ;; version?
8474 #:tests? #f
8475 ,@(package-arguments amqp)))
8476 (native-inputs `(("python2-setuptools" ,python2-setuptools)
8477 ,@(package-native-inputs amqp))))))
8478
8479 (define-public python-kombu
8480 (package
8481 (name "python-kombu")
8482 (version "3.0.37")
8483 (source
8484 (origin
8485 (method url-fetch)
8486 (uri (pypi-uri "kombu" version))
8487 (sha256
8488 (base32
8489 "0l16chb314gpq2v7fh94a22c30lcv6w3ylmhsa60bldlcq6a0r70"))))
8490 (build-system python-build-system)
8491 (native-inputs
8492 `(("python-mock" ,python-mock)
8493 ("python-nose" ,python-nose)))
8494 (propagated-inputs
8495 `(("python-anyjson" ,python-anyjson)
8496 ("python-amqp" ,python-amqp)
8497 ("python-redis" ,python-redis)))
8498 (home-page "http://kombu.readthedocs.org")
8499 (synopsis "Message passing library for Python")
8500 (description "The aim of Kombu is to make messaging in Python as easy as
8501 possible by providing an idiomatic high-level interface for the AMQ protocol,
8502 and also provide proven and tested solutions to common messaging problems.
8503 AMQP is the Advanced Message Queuing Protocol, an open standard protocol for
8504 message orientation, queuing, routing, reliability and security, for which the
8505 RabbitMQ messaging server is the most popular implementation.")
8506 (license license:bsd-3)
8507 (properties `((python2-variant . ,(delay python2-kombu))))))
8508
8509 (define-public python2-kombu
8510 (let ((kombu (package-with-python2
8511 (strip-python2-variant python-kombu))))
8512 (package
8513 (inherit kombu)
8514 (inputs `(("python2-setuptools" ,python2-setuptools)
8515 ("python2-unittest2" ,python2-unittest2)
8516 ,@(package-inputs kombu))))))
8517
8518 (define-public python-billiard
8519 (package
8520 (name "python-billiard")
8521 (version "3.3.0.23")
8522 (source
8523 (origin
8524 (method url-fetch)
8525 (uri (pypi-uri "billiard" version))
8526 (sha256
8527 (base32
8528 "02wxsc6bhqvzh8j6w758kvgqbnj14l796mvmrcms8fgfamd2lak9"))))
8529 (build-system python-build-system)
8530 (native-inputs
8531 `(("python-nose" ,python-nose)))
8532 (home-page "http://github.com/celery/billiard")
8533 (synopsis
8534 "Python multiprocessing fork with improvements and bugfixes")
8535 (description
8536 "Billiard is a fork of the Python 2.7 multiprocessing package. The
8537 multiprocessing package itself is a renamed and updated version of R Oudkerk's
8538 pyprocessing package. This standalone variant is intended to be compatible with
8539 Python 2.4 and 2.5, and will draw its fixes/improvements from python-trunk.")
8540 (license license:bsd-3)
8541 (properties `((python2-variant . ,(delay python2-billiard))))))
8542
8543 (define-public python2-billiard
8544 (let ((billiard (package-with-python2
8545 (strip-python2-variant python-billiard))))
8546 (package
8547 (inherit billiard)
8548 (native-inputs `(("python2-setuptools" ,python2-setuptools)
8549 ("python2-unittest2" ,python2-unittest2)
8550 ("python2-mock" ,python2-mock)
8551 ,@(package-native-inputs billiard))))))
8552
8553 (define-public python-celery
8554 (package
8555 (name "python-celery")
8556 (version "3.1.24")
8557 (source
8558 (origin
8559 (method url-fetch)
8560 (uri (pypi-uri "celery" version))
8561 (sha256
8562 (base32
8563 "0yh2prhdnx2dgkb67a5drj12hh2zvzx5f611p7mqqg01ydghif4r"))))
8564 (build-system python-build-system)
8565 (arguments
8566 `(#:phases
8567 (modify-phases %standard-phases
8568 ;; These tests break with Python 3.5:
8569 ;; https://github.com/celery/celery/issues/2897#issuecomment-253066295
8570 (replace 'check
8571 (lambda _
8572 (zero?
8573 (system* "nosetests" "--exclude=^test_safe_to_remove.*")))))))
8574 (native-inputs
8575 `(("python-nose" ,python-nose)))
8576 (inputs
8577 `(("python-pytz" ,python-pytz)
8578 ("python-amqp" ,python-amqp)
8579 ("python-anyjson" ,python-anyjson)
8580 ("python-billiard" ,python-billiard)
8581 ("python-kombu" ,python-kombu)))
8582 (home-page "http://celeryproject.org")
8583 (synopsis "Distributed Task Queue")
8584 (description "Celery is an asynchronous task queue/job queue based on
8585 distributed message passing. It is focused on real-time operation, but
8586 supports scheduling as well. The execution units, called tasks, are executed
8587 concurrently on a single or more worker servers using multiprocessing,
8588 Eventlet, or gevent. Tasks can execute asynchronously (in the background) or
8589 synchronously (wait until ready).")
8590 (license license:bsd-3)
8591 (properties `((python2-variant . ,(delay python2-celery))))))
8592
8593 (define-public python2-celery
8594 (let ((celery (package-with-python2
8595 (strip-python2-variant python-celery))))
8596 (package
8597 (inherit celery)
8598 (native-inputs `(("python2-setuptools" ,python2-setuptools)
8599 ("python2-unittest2" ,python2-unittest2)
8600 ("python2-mock" ,python2-mock)
8601 ,@(package-native-inputs celery))))))
8602
8603 (define-public python-translitcodec
8604 (package
8605 (name "python-translitcodec")
8606 (version "0.4.0")
8607 (source
8608 (origin
8609 (method url-fetch)
8610 (uri (pypi-uri "translitcodec" version))
8611 (sha256
8612 (base32
8613 "10x6pvblkzky1zhjs8nmx64nb9jdzxad4bxhq4iwv0j4z2aqjnki"))))
8614 (build-system python-build-system)
8615 (arguments
8616 `(#:tests? #f)) ; no tests provided
8617 (home-page
8618 "https://github.com/claudep/translitcodec")
8619 (synopsis
8620 "Unicode to 8-bit charset transliteration codec")
8621 (description
8622 "This package contains codecs for transliterating ISO 10646 texts into
8623 best-effort representations using smaller coded character sets (ASCII,
8624 ISO 8859, etc.).")
8625 (license license:expat)
8626 (properties `((python2-variant . ,(delay python2-translitcodec))))))
8627
8628 (define-public python2-translitcodec
8629 (package
8630 (inherit (package-with-python2
8631 (strip-python2-variant python-translitcodec)))
8632 (native-inputs `(("python2-setuptools" ,python2-setuptools)))))
8633
8634 (define-public python-editor
8635 (package
8636 (name "python-editor")
8637 (version "0.5")
8638 (source
8639 (origin
8640 (method url-fetch)
8641 (uri (pypi-uri "python-editor" version))
8642 (sha256
8643 (base32
8644 "1ypnpgvzpkbwsg4rdvy4sy51j28b5xq9v8pnkwxncn07vqz06p7n"))))
8645 (build-system python-build-system)
8646 (home-page
8647 "https://github.com/fmoo/python-editor")
8648 (synopsis
8649 "Programmatically open an editor, capture the result")
8650 (description
8651 "python-editor is a library that provides the editor module for
8652 programmatically interfacing with your system's $EDITOR.")
8653 (license license:asl2.0)
8654 (properties `((python2-variant . ,(delay python2-editor))))))
8655
8656 (define-public python2-editor
8657 (package
8658 (inherit (package-with-python2
8659 (strip-python2-variant python-editor)))
8660 (inputs `(("python2-setuptools" ,python2-setuptools)))))
8661
8662 (define-public python-sphinxcontrib-programoutput
8663 (package
8664 (name "python-sphinxcontrib-programoutput")
8665 (version "0.8")
8666 (source (origin
8667 (method url-fetch)
8668 (uri (pypi-uri "sphinxcontrib-programoutput" version))
8669 (sha256
8670 (base32
8671 "098as6z1s0gb4dh5xcr1fd2vpm91zj93jzvgawspxf5s4hqs0xhp"))))
8672 (build-system python-build-system)
8673 (propagated-inputs
8674 `(("python-docutils" ,python-docutils)
8675 ("python-sphinx" ,python-sphinx)))
8676 (synopsis "Sphinx extension to include program output")
8677 (description "A Sphinx extension to literally insert the output of arbitrary
8678 commands into documents, helping you to keep your command examples up to date.")
8679 (home-page "https://github.com/lunaryorn/sphinxcontrib-programoutput")
8680 (license license:bsd-2)
8681 (properties `((python2-variant . ,(delay python2-sphinxcontrib-programoutput))))))
8682
8683 (define-public python2-sphinxcontrib-programoutput
8684 (package
8685 (inherit (package-with-python2
8686 (strip-python2-variant python-sphinxcontrib-programoutput)))
8687 (native-inputs `(("python2-setuptools" ,python2-setuptools)))))
8688
8689 (define-public python-sphinx-repoze-autointerface
8690 (package
8691 (name "python-sphinx-repoze-autointerface")
8692 (version "0.8")
8693 (source (origin
8694 (method url-fetch)
8695 (uri (pypi-uri "repoze.sphinx.autointerface" version))
8696 (sha256
8697 (base32
8698 "08ycivzf7bh4a1zcyp31hbyqs1b2c9r26raa3vxjwwmbfqr3iw4f"))))
8699 (build-system python-build-system)
8700 (propagated-inputs
8701 `(("python-docutils" ,python-docutils)
8702 ("python-sphinx" ,python-sphinx)
8703 ("python-zope-interface" ,python-zope-interface)))
8704 (synopsis "Auto-generate Sphinx API docs from Zope interfaces")
8705 (description "This package defines an extension for the Sphinx documentation
8706 system. The extension allows generation of API documentation by
8707 introspection of @code{zope.interface} instances in code.")
8708 (home-page "https://github.com/repoze/repoze.sphinx.autointerface")
8709 (license license:repoze)))
8710
8711 (define-public python2-sphinx-repoze-autointerface
8712 (package-with-python2 python-sphinx-repoze-autointerface))
8713
8714 (define-public python-psycopg2
8715 (package
8716 (name "python-psycopg2")
8717 (version "2.6.1")
8718 (source
8719 (origin
8720 (method url-fetch)
8721 (uri (pypi-uri "psycopg2" version))
8722 (sha256
8723 (base32
8724 "0k4hshvrwsh8yagydyxgmd0pjm29lwdxkngcq9fzfzkmpsxrmkva"))))
8725 (build-system python-build-system)
8726 (arguments
8727 ;; Tests would require a postgresql database "psycopg2_test"
8728 ;; and a running postgresql database management service.
8729 `(#:tests? #f)) ; TODO re-enable after providing a test-db.
8730 (inputs
8731 `(("postgresql" ,postgresql))) ; libpq
8732 (home-page "http://initd.org/psycopg/")
8733 (synopsis "Python PostgreSQL adapter")
8734 (description
8735 "psycopg2 is a thread-safe PostgreSQL adapter that implements DB-API 2.0. ")
8736 (license license:lgpl3+)
8737 (properties `((python2-variant . ,(delay python2-psycopg2))))))
8738
8739 (define-public python2-psycopg2
8740 (package
8741 (inherit (package-with-python2
8742 (strip-python2-variant python-psycopg2)))
8743 (native-inputs `(("python2-setuptools" ,python2-setuptools)))))
8744
8745 (define-public python-vobject
8746 (package
8747 (name "python-vobject")
8748 (version "0.9.2")
8749 (source (origin
8750 (method url-fetch)
8751 (uri (pypi-uri "vobject" version))
8752 (sha256
8753 (base32
8754 "1qfnwlx8qwkgr6nf5wvl6ff1r3kll53dh3z6nyp173nmlhhhqccb"))))
8755 (build-system python-build-system)
8756 (arguments
8757 '(;; The test suite relies on some non-portable Windows interfaces.
8758 #:tests? #f))
8759 (inputs
8760 `(("python-dateutil-2" ,python-dateutil-2)
8761 ("python-pyicu" ,python-pyicu)))
8762 (synopsis "Parse and generate vCard and vCalendar files")
8763 (description "Vobject is intended to be a full featured Python package for
8764 parsing and generating vCard and vCalendar files. Currently, iCalendar files
8765 are supported and well tested. vCard 3.0 files are supported, and all data
8766 should be imported, but only a few components are understood in a sophisticated
8767 way.")
8768 (home-page "http://eventable.github.io/vobject/")
8769 (license license:asl2.0)
8770 (properties `((python2-variant . ,(delay python2-vobject))))))
8771
8772 (define-public python2-vobject
8773 (package
8774 (inherit (package-with-python2
8775 (strip-python2-variant python-vobject)))
8776 (native-inputs `(("python2-setuptools" ,python2-setuptools)))))
8777
8778 (define-public python-munkres
8779 (package
8780 (name "python-munkres")
8781 (version "1.0.7")
8782 (source (origin
8783 (method url-fetch)
8784 (uri (pypi-uri "munkres" version))
8785 (sha256
8786 (base32
8787 "1i6nf45i0kkzdx6k70giybsqxz4dxsjbrkrfqgjd7znfkf25sjik"))))
8788 (build-system python-build-system)
8789 (arguments
8790 '(#:tests? #f)) ; no test suite
8791 (home-page "http://software.clapper.org/munkres/")
8792 (synopsis "Implementation of the Munkres algorithm")
8793 (description "The Munkres module provides an implementation of the Munkres
8794 algorithm (also called the Hungarian algorithm or the Kuhn-Munkres algorithm),
8795 useful for solving the Assignment Problem.")
8796 (license license:bsd-3)))
8797
8798 (define-public python2-munkres
8799 (package-with-python2 python-munkres))
8800
8801 (define-public python-flask
8802 (package
8803 (name "python-flask")
8804 (version "0.10.1")
8805 (source (origin
8806 (method url-fetch)
8807 (uri (pypi-uri "Flask" version))
8808 (sha256
8809 (base32
8810 "0wrkavjdjndknhp8ya8j850jq7a1cli4g5a93mg8nh1xz2gq50sc"))))
8811 (build-system python-build-system)
8812 (propagated-inputs
8813 `(("python-itsdangerous" ,python-itsdangerous)
8814 ("python-jinja2" ,python-jinja2)
8815 ("python-werkzeug" ,python-werkzeug)))
8816 (home-page "https://github.com/mitsuhiko/flask/")
8817 (synopsis "Microframework based on Werkzeug, Jinja2 and good intentions")
8818 (description "Flask is a micro web framework based on the Werkzeug toolkit
8819 and Jinja2 template engine. It is called a micro framework because it does not
8820 presume or force a developer to use a particular tool or library.")
8821 (license license:bsd-3)
8822 (properties `((python2-variant . ,(delay python2-flask))))))
8823
8824 (define-public python2-flask
8825 (package (inherit (package-with-python2
8826 (strip-python2-variant python-flask)))
8827 (native-inputs `(("python2-setuptools" ,python2-setuptools)))))
8828
8829 (define-public python-cookies
8830 (package
8831 (name "python-cookies")
8832 (version "2.2.1")
8833 (source (origin
8834 (method url-fetch)
8835 (uri (pypi-uri "cookies" version))
8836 (sha256
8837 (base32
8838 "13pfndz8vbk4p2a44cfbjsypjarkrall71pgc97glk5fiiw9idnn"))))
8839 (build-system python-build-system)
8840 (arguments
8841 `(;; test are broken: https://gitlab.com/sashahart/cookies/issues/3
8842 #:tests? #f))
8843 (native-inputs
8844 `(("python-pytest" ,python2-pytest)))
8845 (synopsis "HTTP cookie parser and renderer")
8846 (description "A RFC 6265-compliant HTTP cookie parser and renderer in
8847 Python.")
8848 (home-page "https://gitlab.com/sashahart/cookies")
8849 (license license:expat)
8850 (properties `((python2-variant . ,(delay python2-cookies))))))
8851
8852 (define-public python2-cookies
8853 (let ((cookies (package-with-python2
8854 (strip-python2-variant python-cookies))))
8855 (package (inherit cookies)
8856 (native-inputs `(("python2-setuptools" ,python2-setuptools)
8857 ,@(package-native-inputs cookies))))))
8858
8859 (define-public python-responses
8860 (package
8861 (name "python-responses")
8862 (version "0.5.1")
8863 (source (origin
8864 (method url-fetch)
8865 (uri (pypi-uri "responses" version))
8866 (sha256
8867 (base32
8868 "1spcfxixyk9k7pk82jm6zqkwk031s95lh8q0mz7539jrb7269bcc"))))
8869 (build-system python-build-system)
8870 (arguments
8871 `(;; Test suite is not distributed:
8872 ;; https://github.com/getsentry/responses/issues/38
8873 #:tests? #f))
8874 (native-inputs
8875 `(("python-cookies" ,python-cookies)
8876 ("python-mock" ,python-mock)))
8877 (propagated-inputs
8878 `(("python-requests" ,python-requests)
8879 ("python-six" ,python-six)))
8880 (home-page "https://github.com/getsentry/responses")
8881 (synopsis "Utility for mocking out the `requests` Python library")
8882 (description "A utility library for mocking out the `requests` Python
8883 library.")
8884 (license license:asl2.0)
8885 (properties `((python2-variant . ,(delay python2-responses))))))
8886
8887 (define-public python2-responses
8888 (let ((responses (package-with-python2
8889 (strip-python2-variant python-responses))))
8890 (package (inherit responses)
8891 (native-inputs `(("python2-setuptools" ,python2-setuptools)
8892 ,@(package-native-inputs responses))))))
8893
8894 (define-public python-whoosh
8895 (package
8896 (name "python-whoosh")
8897 (version "2.7.4")
8898 (source
8899 (origin
8900 (method url-fetch)
8901 (uri (pypi-uri "Whoosh" version))
8902 (sha256
8903 (base32
8904 "10qsqdjpbc85fykc1vgcs8xwbgn4l2l52c8d83xf1q59pwyn79bw"))))
8905 (build-system python-build-system)
8906 (native-inputs
8907 `(("python-setuptools" ,python-setuptools)
8908 ("python-pytest" ,python-pytest)))
8909 (home-page "http://bitbucket.org/mchaput/whoosh")
8910 (synopsis "Full text indexing, search, and spell checking library")
8911 (description
8912 "Whoosh is a fast, pure-Python full text indexing, search, and spell
8913 checking library.")
8914 (license license:bsd-2)))
8915
8916 (define-public python2-whoosh
8917 (let ((whoosh (package-with-python2 (strip-python2-variant python-whoosh))))
8918 (package (inherit whoosh)
8919 (propagated-inputs
8920 `(("python2-backport-ssl-match-hostname"
8921 ,python2-backport-ssl-match-hostname)
8922 ,@(package-propagated-inputs whoosh))))))
8923
8924 (define-public python-pathlib
8925 (package
8926 (name "python-pathlib")
8927 (version "1.0.1")
8928 (source (origin
8929 (method url-fetch)
8930 (uri (pypi-uri "pathlib" version))
8931 (sha256
8932 (base32
8933 "17zajiw4mjbkkv6ahp3xf025qglkj0805m9s41c45zryzj6p2h39"))))
8934 (build-system python-build-system)
8935 ;; The tests depend on the internal "test" module, which does not provide
8936 ;; a stable interface.
8937 (arguments `(#:tests? #f))
8938 (home-page "https://pathlib.readthedocs.org/")
8939 (synopsis "Object-oriented file system paths")
8940 (description "Pathlib offers a set of classes to handle file system paths.
8941 It offers the following advantages over using string objects:
8942
8943 @enumerate
8944 @item No more cumbersome use of os and os.path functions. Everything can
8945 be done easily through operators, attribute accesses, and method calls.
8946 @item Embodies the semantics of different path types. For example,
8947 comparing Windows paths ignores casing.
8948 @item Well-defined semantics, eliminating any inconsistencies or
8949 ambiguities (forward vs. backward slashes, etc.).
8950 @end enumerate
8951
8952 Note: In Python 3.4, pathlib is now part of the standard library. For other
8953 Python versions please consider python-pathlib2 instead, which tracks the
8954 standard library module. This module (python-pathlib) isn't maintained
8955 anymore.")
8956 (license license:expat)))
8957
8958 (define-public python2-pathlib
8959 (package-with-python2 python-pathlib))
8960
8961 (define-public python-jellyfish
8962 (package
8963 (name "python-jellyfish")
8964 (version "0.5.3")
8965 (source (origin
8966 (method url-fetch)
8967 (uri (pypi-uri "jellyfish" version))
8968 (sha256
8969 (base32
8970 "12bxh8cy9xmvyrjz7aw159nd5pyvb645rkvw4r6bvm4xbvs8gd07"))))
8971 (build-system python-build-system)
8972 (native-inputs
8973 `(("python-pytest" ,python-pytest)))
8974 (home-page "https://github.com/jamesturk/jellyfish")
8975 (synopsis "Approximate and phonetic matching of strings")
8976 (description "Jellyfish uses a variety of string comparison and phonetic
8977 encoding algorithms to do fuzzy string matching.")
8978 (license license:bsd-2)
8979 (properties `((python2-variant . ,(delay python2-jellyfish))))))
8980
8981 (define-public python2-jellyfish
8982 (let ((jellyfish (package-with-python2
8983 (strip-python2-variant python-jellyfish))))
8984 (package (inherit jellyfish)
8985 (native-inputs `(("python2-setuptools" ,python2-setuptools)
8986 ("python2-unicodecsv" ,python2-unicodecsv)
8987 ,@(package-native-inputs jellyfish))))))
8988
8989 (define-public python2-unicodecsv
8990 (package
8991 (name "python2-unicodecsv")
8992 (version "0.14.1")
8993 (source (origin
8994 (method url-fetch)
8995 ;; The test suite is not included in the PyPi release.
8996 ;; https://github.com/jdunck/python-unicodecsv/issues/19
8997 (uri (string-append "https://github.com/jdunck/python-unicodecsv/"
8998 "archive/" version ".tar.gz"))
8999 (file-name (string-append name "-" version ".tar.gz"))
9000 (sha256
9001 (base32
9002 "087nqanfcyp6mlfbbr5lva5f3w6iz1bybls9xlrb8icmc474wh4w"))))
9003 (build-system python-build-system)
9004 (arguments
9005 `(;; It supports Python 3, but Python 3 can already do Unicode CSV.
9006 #:python ,python-2))
9007 (native-inputs
9008 `(("python2-setuptools" ,python2-setuptools)
9009 ("python2-unittest2" ,python2-unittest2)))
9010 (home-page "https://github.com/jdunck/python-unicodecsv")
9011 (synopsis "Unicode CSV module for Python 2")
9012 (description "Unicodecsv is a drop-in replacement for Python 2.7's CSV
9013 module, adding support for Unicode strings.")
9014 (license license:bsd-2)))
9015
9016 (define-public python-rarfile
9017 (package
9018 (name "python-rarfile")
9019 (version "2.7")
9020 (source (origin
9021 (method url-fetch)
9022 (uri (pypi-uri "rarfile" version))
9023 (sha256
9024 (base32
9025 "0d8n1dlpiz7av8dmbp0vclrwl9cnxizr4f2c9xvj1h5nvn480527"))
9026 ;; https://github.com/markokr/rarfile/pull/17/
9027 (patches (search-patches "python-rarfile-fix-tests.patch"))))
9028 (build-system python-build-system)
9029 (arguments
9030 '(#:phases
9031 (modify-phases %standard-phases
9032 (replace 'check
9033 ;; Many tests fail, but the installation proceeds.
9034 (lambda _ (zero? (system* "make" "-C" "test" "test")))))))
9035 (native-inputs
9036 `(("which" ,which))) ; required for tests
9037 (propagated-inputs
9038 `(("libarchive" ,libarchive)))
9039 (home-page "https://github.com/markokr/rarfile")
9040 (synopsis "RAR archive reader for Python")
9041 (description "This is Python module for RAR archive reading. The interface
9042 is made as zipfile like as possible.")
9043 (license license:isc)))
9044
9045 (define-public python2-rarfile
9046 (package-with-python2 python-rarfile))
9047
9048 (define-public python-magic
9049 (package
9050 (name "python-magic")
9051 (version "0.4.3")
9052 (source
9053 (origin
9054 (method url-fetch)
9055 (uri (string-append "https://github.com/ahupp/python-magic/archive/"
9056 version ".tar.gz"))
9057 (sha256
9058 (base32
9059 "17bgy92i7sb021f2s4mw1dcvpm6p1mi9jihridwy1pyn8mzvpjgk"))
9060 (file-name (string-append name "-" version "-checkout"))))
9061 (build-system python-build-system)
9062 (arguments
9063 ;; The tests are unreliable, so don't run them. The tests fail
9064 ;; under Python3 because they were written for Python2 and
9065 ;; contain import statements that do not work in Python3. One of
9066 ;; the tests fails under Python2 because its assertions are
9067 ;; overly stringent; it relies on comparing output strings which
9068 ;; are brittle and can change depending on the version of
9069 ;; libmagic being used and the system on which the test is
9070 ;; running. In my case, under GuixSD 0.10.0, only one test
9071 ;; failed, and it seems to have failed only because the version
9072 ;; of libmagic that is packaged in Guix outputs a slightly
9073 ;; different (but not wrong) string than the one that the test
9074 ;; expected.
9075 '(#:tests? #f
9076 #:phases (modify-phases %standard-phases
9077 ;; Replace a specific method call with a hard-coded
9078 ;; path to the necessary libmagic.so file in the
9079 ;; store. If we don't do this, then the method call
9080 ;; will fail to find the libmagic.so file, which in
9081 ;; turn will cause any application using
9082 ;; python-magic to fail.
9083 (add-before 'build 'hard-code-path-to-libmagic
9084 (lambda* (#:key inputs #:allow-other-keys)
9085 (let ((file (assoc-ref inputs "file")))
9086 (substitute* "magic.py"
9087 (("ctypes.util.find_library\\('magic'\\)")
9088 (string-append "'" file "/lib/libmagic.so'")))
9089 #t)))
9090 (add-before 'install 'disable-egg-compression
9091 (lambda _
9092 (let ((port (open-file "setup.cfg" "a")))
9093 (display "\n[easy_install]\nzip_ok = 0\n"
9094 port)
9095 (close-port port)
9096 #t))))))
9097 (native-inputs
9098 `(("python-setuptools" ,python-setuptools)))
9099 (inputs
9100 ;; python-magic needs to be able to find libmagic.so.
9101 `(("file" ,file)))
9102 (home-page "https://github.com/ahupp/python-magic")
9103 (synopsis "File type identification using libmagic")
9104 (description
9105 "This module uses ctypes to access the libmagic file type
9106 identification library. It makes use of the local magic database and
9107 supports both textual and MIME-type output. Note that this module and
9108 the python-file module both provide a \"magic.py\" file; these two
9109 modules, which are different and were developed separately, both serve
9110 the same purpose: to provide Python bindings for libmagic.")
9111 (license license:expat)))
9112
9113 (define-public python2-magic
9114 (package-with-python2 python-magic))
9115
9116 (define-public python2-s3cmd
9117 (package
9118 (name "python2-s3cmd")
9119 (version "1.6.1")
9120 (source
9121 (origin
9122 (method url-fetch)
9123 (uri (string-append "mirror://sourceforge/s3tools/s3cmd/" version "/"
9124 "s3cmd-" version ".tar.gz"))
9125 (sha256
9126 (base32
9127 "0ki1rzhm5icvi9ry5jswi4b22yqwyj0d2wsqsgilwx6qhi7pjxa6"))))
9128 (build-system python-build-system)
9129 (arguments
9130 ;; s3cmd is written for python2 only and contains no tests.
9131 `(#:python ,python-2
9132 #:tests? #f))
9133 (native-inputs
9134 `(("python2-setuptools" ,python2-setuptools)))
9135 (inputs
9136 `(("python2-dateutil" ,python2-dateutil)
9137 ;; The python-file package also provides a magic.py module.
9138 ;; This is an unfortunate state of affairs; however, s3cmd
9139 ;; fails to install if it cannot find specifically the
9140 ;; python-magic package. Thus we include it, instead of using
9141 ;; python-file. Ironically, s3cmd sometimes works better
9142 ;; without libmagic bindings at all:
9143 ;; https://github.com/s3tools/s3cmd/issues/198
9144 ("python2-magic" ,python2-magic)))
9145 (home-page "http://s3tools.org/s3cmd")
9146 (synopsis "Command line tool for S3-compatible storage services")
9147 (description
9148 "S3cmd is a command line tool for uploading, retrieving and managing data
9149 in storage services that are compatible with the Amazon Simple Storage
9150 Service (S3) protocol, including S3 itself. It supports rsync-like backup,
9151 GnuPG encryption, and more. It also supports management of Amazon's
9152 CloudFront content delivery network.")
9153 (license license:gpl2+)))
9154
9155 (define-public python-pkgconfig
9156 (package
9157 (name "python-pkgconfig")
9158 (version "1.1.0")
9159 (source
9160 (origin
9161 (method url-fetch)
9162 (uri (pypi-uri "pkgconfig" version))
9163 (sha256
9164 (base32
9165 "1pw0kmvc57sjmaxi6c54fqsnihqj6hvhc9y1vaz36axafzqam7bh"))))
9166 (build-system python-build-system)
9167 (native-inputs
9168 `(("python-nose" ,python-nose)
9169 ("python-setuptools" ,python-setuptools)))
9170 (inputs
9171 `(("pkg-config" ,pkg-config)))
9172 (arguments
9173 `(;; Tests fail with "ValueError: _type_ 'v' not supported" on Python 3,
9174 ;; and on Python 2 they need the dl module deprecated since Python 2.6.
9175 #:tests? #f
9176 ;; Prevent creation of the egg. This works around
9177 ;; https://debbugs.gnu.org/cgi/bugreport.cgi?bug=20765 .
9178 #:configure-flags '("--single-version-externally-managed" "--root=/")
9179 ;; Hard-code the path to pkg-config.
9180 #:phases
9181 (modify-phases %standard-phases
9182 (add-before
9183 'build 'patch
9184 (lambda _
9185 (substitute* "pkgconfig/pkgconfig.py"
9186 (("cmd = 'pkg-config")
9187 (string-append "cmd = '" (which "pkg-config"))))
9188 #t)))))
9189 (home-page "http://github.com/matze/pkgconfig")
9190 (synopsis "Python interface for pkg-config")
9191 (description "This module provides a Python interface to pkg-config. It
9192 can be used to find all pkg-config packages, check if a package exists,
9193 check if a package meets certain version requirements, query CFLAGS and
9194 LDFLAGS and parse the output to build extensions with setup.py.")
9195 (license license:expat)))
9196
9197 (define-public python2-pkgconfig
9198 (package-with-python2 python-pkgconfig))
9199
9200 (define-public python-bz2file
9201 (package
9202 (name "python-bz2file")
9203 (version "0.98")
9204 (source
9205 (origin
9206 (method url-fetch)
9207 (uri (pypi-uri "bz2file" version))
9208 (sha256
9209 (base32
9210 "126s53fkpx04f33a829yqqk8fj4png3qwg4m66cvlmhmwc8zihb4"))))
9211 (build-system python-build-system)
9212 (arguments
9213 `(#:tests? #f)) ; Tests use deprecated python modules.
9214 (home-page "https://github.com/nvawda/bz2file")
9215 (synopsis "Read and write bzip2-compressed files")
9216 (description
9217 "Bz2file is a Python library for reading and writing bzip2-compressed
9218 files. It contains a drop-in replacement for the I/O interface in the
9219 standard library's @code{bz2} module, including features from the latest
9220 development version of CPython that are not available in older releases.")
9221 (license license:asl2.0)
9222 (properties `((python2-variant . ,(delay python2-bz2file))))))
9223
9224 (define-public python2-bz2file
9225 (let ((base (package-with-python2
9226 (strip-python2-variant python-bz2file))))
9227 (package
9228 (inherit base)
9229 (native-inputs
9230 `(("python2-setuptools" ,python2-setuptools)))
9231 (arguments
9232 `(#:python ,python-2
9233 #:phases
9234 (modify-phases %standard-phases
9235 ;; 'python setup.py test' does not work as of 0.98.
9236 ;; There is only the one test file, so we run it directly.
9237 (replace 'check
9238 (lambda _ (zero? (system* "python"
9239 "test_bz2file.py"))))))))))
9240
9241 (define-public python-future
9242 (package
9243 (name "python-future")
9244 (version "0.15.2")
9245 (source
9246 (origin
9247 (method url-fetch)
9248 (uri (pypi-uri "future" version))
9249 (sha256
9250 (base32
9251 "15wvcfzssc68xqnqi1dq4fhd0848hwi9jn42hxyvlqna40zijfrx"))))
9252 (build-system python-build-system)
9253 ;; Many tests connect to the network or are otherwise flawed.
9254 ;; https://github.com/PythonCharmers/python-future/issues/210
9255 (arguments
9256 `(#:tests? #f))
9257 (home-page "http://python-future.org")
9258 (synopsis "Single-source support for Python 3 and 2")
9259 (description
9260 "@code{python-future} is the missing compatibility layer between Python 2 and
9261 Python 3. It allows you to use a single, clean Python 3.x-compatible codebase
9262 to support both Python 2 and Python 3 with minimal overhead.")
9263 (license license:expat)
9264 (properties `((python2-variant . ,(delay python2-future))))))
9265
9266 (define-public python2-future
9267 (let ((base (package-with-python2
9268 (strip-python2-variant python-future))))
9269 (package
9270 (inherit base)
9271 (native-inputs `(("python2-setuptools" ,python2-setuptools))))))
9272
9273 (define-public python-cysignals
9274 (package
9275 (name "python-cysignals")
9276 (version "1.1.0")
9277 (source
9278 (origin
9279 (method url-fetch)
9280 (uri (pypi-uri "cysignals" version ".tar.bz2"))
9281 (sha256
9282 (base32
9283 "14cbyd9znlz6cxy1s3g6v6dv5jj45hn27pywkidd9b1zanaysqc6"))))
9284 (build-system python-build-system)
9285 (native-inputs
9286 `(("python-cython" ,python-cython)
9287 ("python-setuptools" ,python-setuptools)
9288 ("python-sphinx" ,python-sphinx)))
9289 (inputs
9290 `(("pari-gp" ,pari-gp)))
9291 (arguments
9292 `(#:modules ((guix build python-build-system)
9293 ((guix build gnu-build-system) #:prefix gnu:)
9294 (guix build utils))
9295 ;; FIXME: Tests are executed after installation and currently fail
9296 ;; when not installing into standard locations; the author is working
9297 ;; on a fix.
9298 #:tests? #f
9299 #:phases
9300 (modify-phases %standard-phases
9301 (add-before
9302 'build 'configure
9303 (assoc-ref gnu:%standard-phases 'configure)))))
9304 (home-page
9305 "https://github.com/sagemath/cysignals")
9306 (synopsis
9307 "Handling of interrupts and signals for Cython")
9308 (description
9309 "The cysignals package provides mechanisms to handle interrupts (and
9310 other signals and errors) in Cython code, using two related approaches,
9311 for mixed Cython/Python code or external C libraries and pure Cython code,
9312 respectively.")
9313 (license license:lgpl3+)))
9314
9315 (define-public python2-cysignals
9316 (package-with-python2 python-cysignals))
9317
9318 (define-public python2-shedskin
9319 (package
9320 (name "python2-shedskin")
9321 (version "0.9.4")
9322 (source
9323 (origin
9324 (method url-fetch)
9325 (uri (string-append "https://github.com/shedskin/shedskin/"
9326 "releases/download/v" version
9327 "/shedskin-" version ".tgz"))
9328 (sha256
9329 (base32
9330 "0nzwrzgw1ga8rw6f0ryq7zr9kkiavd1cqz5hzxkcbicl1dk7kz41"))))
9331 (build-system python-build-system)
9332 (arguments
9333 `(#:python ,python-2
9334 #:phases (modify-phases %standard-phases
9335 (add-after 'unpack 'fix-resulting-include-libs
9336 (lambda* (#:key inputs #:allow-other-keys)
9337 (let ((libgc (assoc-ref inputs "libgc"))
9338 (pcre (assoc-ref inputs "pcre")))
9339 (substitute* "shedskin/makefile.py"
9340 (("variable == 'CCFLAGS':[ ]*")
9341 (string-append "variable == 'CCFLAGS':\n"
9342 " line += ' -I " pcre "/include"
9343 " -I " libgc "/include'"))
9344 (("variable == 'LFLAGS':[ ]*")
9345 (string-append "variable == 'LFLAGS':\n"
9346 " line += ' -L" pcre "/lib"
9347 " -L " libgc "/lib'")))
9348 #t))))))
9349 (native-inputs `(("python2-setuptools" ,python2-setuptools)))
9350 (inputs `(("pcre" ,pcre)
9351 ("libgc" ,libgc)))
9352 (home-page "https://shedskin.github.io/")
9353 (synopsis "Experimental Python-2 to C++ Compiler")
9354 (description (string-append "This is an experimental compiler for a subset of
9355 Python. It generates C++ code and a Makefile."))
9356 (license (list license:gpl3 license:bsd-3 license:expat))))
9357
9358 (define-public python2-rope
9359 (package
9360 (name "python2-rope")
9361 (version "0.10.3")
9362 (source
9363 (origin
9364 (method url-fetch)
9365 (uri (pypi-uri "rope" version))
9366 (sha256
9367 (base32
9368 "18k5znhpwvrfck3yp0jmhd5j8r0f0s8bk1zh5yhs2cfgmfhbwigb"))))
9369 (arguments
9370 ;; Rope is currently python-2 only.
9371 ;; https://github.com/python-rope/rope/issues/57
9372 `(#:python ,python-2))
9373 (build-system python-build-system)
9374 (native-inputs
9375 `(("python2-unittest2" ,python2-unittest2)
9376 ("python2-setuptools" ,python2-setuptools)))
9377 (home-page "https://github.com/python-rope/rope")
9378 (synopsis "Refactoring library for Python")
9379 (description "Rope is a refactoring library for Python. It facilitates
9380 the renaming, moving and extracting of attributes, functions, modules, fields
9381 and parameters in Python 2 source code. These refactorings can also be applied
9382 to occurences in strings and comments.")
9383 (license license:gpl2)))
9384
9385 (define-public python-py3status
9386 (package
9387 (name "python-py3status")
9388 (version "3.1")
9389 (source
9390 (origin
9391 (method url-fetch)
9392 (uri (pypi-uri "py3status" version))
9393 (sha256
9394 (base32
9395 "0i283z1pivmir61z8kbiycigc94l61v33ygzkhczf1ifq7cppyds"))))
9396 (build-system python-build-system)
9397 (native-inputs
9398 `(("python-setuptools" ,python-setuptools)))
9399 (home-page "https://github.com/ultrabug/py3status")
9400 (synopsis "Extensible i3status wrapper written in Python")
9401 (description "py3status is an i3status wrapper which extends i3status
9402 functionality in a modular way, allowing you to extend your panel with your
9403 own code, responding to click events and updating clock every second.")
9404 (license license:bsd-3)))
9405
9406 (define-public python-tblib
9407 (package
9408 (name "python-tblib")
9409 (version "1.3.0")
9410 (source (origin
9411 (method url-fetch)
9412 (uri (pypi-uri "tblib" version))
9413 (sha256 (base32
9414 "02iahfkfa927hb4jq2bak36ldihwapzacfiq5lyxg8llwn98a1yi"))))
9415 (build-system python-build-system)
9416 (arguments
9417 `(#:phases
9418 (modify-phases %standard-phases
9419 (replace 'check
9420 (lambda _
9421 ;; Upstream runs tests after installation and the package itself
9422 ;; resides in a subdirectory. Extend PYTHONPATH so it will be
9423 ;; found.
9424 (setenv "PYTHONPATH"
9425 (string-append (getcwd) "/build/lib:"
9426 (getenv "PYTHONPATH")))
9427 (zero? (system* "py.test" "-vv" "tests" "README.rst")))))))
9428 (native-inputs
9429 `(("python-pytest" ,python-pytest)
9430 ("python-setuptools" ,python-setuptools)
9431 ("python-six" ,python-six)))
9432 (home-page "https://github.com/ionelmc/python-tblib")
9433 (synopsis "Traceback serialization library")
9434 (description
9435 "Traceback serialization allows you to:
9436
9437 @enumerate
9438 @item Pickle tracebacks and raise exceptions with pickled tracebacks in
9439 different processes. This allows better error handling when running code over
9440 multiple processes (imagine multiprocessing, billiard, futures, celery etc).
9441
9442 @item Parse traceback strings and raise with the parsed tracebacks.
9443 @end itemize")
9444 (license license:bsd-3)))
9445
9446 (define-public python2-tblib
9447 (package-with-python2 python-tblib))
9448
9449 (define-public python-sqlparse
9450 (package
9451 (name "python-sqlparse")
9452 (version "0.1.19")
9453 (source (origin
9454 (method url-fetch)
9455 (uri (pypi-uri "sqlparse" version))
9456 (sha256
9457 (base32
9458 "1s2fvaxgh9kqzrd6iwy5h7i61ckn05plx9np13zby93z3hdbx5nq"))))
9459 (build-system python-build-system)
9460 (arguments
9461 `(#:phases
9462 (modify-phases %standard-phases
9463 (replace 'check
9464 (lambda* _
9465 ;; setup.py-integrated 2to3 only affects the build files, but
9466 ;; py.test is using the source files. So we need to convert them
9467 ;; manually.
9468 (when (zero? (system* "python3"))
9469 (system* "2to3" "--no-diff" "-wn" "sqlparse" "tests"))
9470 (zero? (system* "py.test")))))))
9471 (native-inputs
9472 `(("python-pytest" ,python-pytest)
9473 ("python-setuptools" ,python-setuptools)))
9474 (home-page "https://github.com/andialbrecht/sqlparse")
9475 (synopsis "Non-validating SQL parser")
9476 (description "Sqlparse is a non-validating SQL parser for Python. It
9477 provides support for parsing, splitting and formatting SQL statements.")
9478 (license license:bsd-3)))
9479
9480 (define-public python2-sqlparse
9481 (package-with-python2 python-sqlparse))
9482
9483 (define-public python-greenlet
9484 (package
9485 (name "python-greenlet")
9486 (version "0.4.9")
9487 (source (origin
9488 (method url-fetch)
9489 (uri (pypi-uri "greenlet" version))
9490 (sha256
9491 (base32
9492 "04h0m54dyqg49vyarq26mry6kbivnpl47rnmmrk9qn8wpfxviybr"))))
9493 (build-system python-build-system)
9494 (native-inputs
9495 `(("python-setuptools" ,python-setuptools)))
9496 (home-page "https://greenlet.readthedocs.io/")
9497 (synopsis "Lightweight in-process concurrent programming")
9498 (description
9499 "Greenlet package is a spin-off of Stackless, a version of CPython
9500 that supports micro-threads called \"tasklets\". Tasklets run
9501 pseudo-concurrently (typically in a single or a few OS-level threads) and
9502 are synchronized with data exchanges on \"channels\".")
9503 (license (list license:psfl license:expat))))
9504
9505 (define-public python2-greenlet
9506 (package-with-python2 python-greenlet))
9507
9508 (define-public python-gevent
9509 (package
9510 (name "python-gevent")
9511 (version "1.1.1")
9512 (source (origin
9513 (method url-fetch)
9514 (uri (pypi-uri "gevent" version))
9515 (sha256
9516 (base32
9517 "1smf3kvidpdiyi2c81alal74p2zm0clrm6xbyy6y1k9a3f2vkrbf"))
9518 (modules '((guix build utils)))
9519 (snippet
9520 '(begin
9521 ;; unbunding libev and c-ares
9522 (for-each delete-file-recursively '("libev" "c-ares"))
9523 ;; fixing testsuite
9524 (call-with-output-file "greentest/__init__.py" noop)
9525 (substitute* "greentest/testrunner.py"
9526 (("import util") "from . import util")
9527 (("from util import log") "from .util import log"))))))
9528 (build-system python-build-system)
9529 (propagated-inputs
9530 `(("python-greenlet" ,python-greenlet)))
9531 (native-inputs
9532 `(("python-setuptools" ,python-setuptools)
9533 ("python-six" ,python-six)))
9534 (inputs
9535 `(("c-ares" ,c-ares)
9536 ("libev" ,libev)))
9537 (home-page "http://www.gevent.org/")
9538 (synopsis "Coroutine-based network library")
9539 (description
9540 "gevent is a coroutine-based Python networking library that uses greenlet
9541 to provide a high-level synchronous API on top of the libev event loop.")
9542 (license license:expat)))
9543
9544 (define-public python2-gevent
9545 (package-with-python2 python-gevent))
9546
9547 (define-public python-twisted
9548 (package
9549 (name "python-twisted")
9550 (version "16.2.0")
9551 (source (origin
9552 (method url-fetch)
9553 (uri (pypi-uri "Twisted" version ".tar.bz2"))
9554 (sha256
9555 (base32
9556 "0ydxrp9myw1mvsz3qfzx5579y5llmqa82pxvqchgp5syczffi450"))))
9557 (build-system python-build-system)
9558 (native-inputs
9559 `(("python-setuptools" ,python-setuptools)))
9560 (propagated-inputs
9561 `(("python-zope-interface" ,python-zope-interface)))
9562 (home-page "https://twistedmatrix.com/")
9563 (synopsis "Asynchronous networking framework written in Python")
9564 (description
9565 "Twisted is an extensible framework for Python programming, with special
9566 focus on event-based network programming and multiprotocol integration.")
9567 (license license:expat)))
9568
9569 (define-public python2-twisted
9570 (package-with-python2 python-twisted))
9571
9572 (define-public python-pika
9573 (package
9574 (name "python-pika")
9575 (version "0.10.0")
9576 (source
9577 (origin
9578 (method url-fetch)
9579 (uri (pypi-uri "pika" version))
9580 (sha256
9581 (base32
9582 "0nb4h08di432lv7dy2v9kpwgk0w92f24sqc2hw2s9vwr5b8v8xvj"))))
9583 (build-system python-build-system)
9584 (native-inputs
9585 `(("python-twisted" ,python-twisted)))
9586 (home-page "https://pika.readthedocs.org")
9587 (synopsis "Pure Python AMQP Client Library")
9588 (description
9589 "Pika is a pure-Python implementation of the AMQP (Advanced Message Queuing
9590 Protocol) 0-9-1 protocol that tries to stay fairly independent of the underlying
9591 network support library.")
9592 (license license:bsd-3)))
9593
9594 (define-public python2-pika
9595 (package-with-python2 python-pika))
9596
9597 (define-public python-ply
9598 (package
9599 (name "python-ply")
9600 (version "3.8")
9601 (source
9602 (origin
9603 (method url-fetch)
9604 (uri (string-append
9605 "https://pypi.python.org/packages/"
9606 "96/e0/430fcdb6b3ef1ae534d231397bee7e9304be14a47a267e82ebcb3323d0b5"
9607 "/ply-" version ".tar.gz"))
9608 (sha256
9609 (base32
9610 "1f70ipynmiy09k6px2j7v4w5cdrc21za3xs2k6f1bsvb0bzvvlg7"))))
9611 (build-system python-build-system)
9612 (home-page "http://www.dabeaz.com/ply/")
9613 (synopsis "Python Lex & Yacc")
9614 (description "PLY is a @code{lex}/@code{yacc} implemented purely in Python.
9615 It uses LR parsing and does extensive error checking.")
9616 (license license:bsd-3)
9617 (properties `((python2-variant . ,(delay python2-ply))))))
9618
9619 (define-public python2-ply
9620 (package
9621 (inherit (package-with-python2
9622 (strip-python2-variant python-ply)))
9623 (native-inputs `(("python2-setuptools" ,python2-setuptools)))))
9624
9625 (define-public python-tabulate
9626 (package
9627 (name "python-tabulate")
9628 (version "0.7.5")
9629 (source (origin
9630 (method url-fetch)
9631 (uri (pypi-uri "tabulate" version))
9632 (sha256
9633 (base32
9634 "03l1r7ddd1a0j2snv1yd0hlnghjad3fg1an1jr8936ksv75slwch"))
9635 ;; Fix tests
9636 (modules '((guix build utils)))
9637 (snippet '(substitute* '("test/test_cli.py"
9638 "test/test_input.py"
9639 "test/test_output.py"
9640 "test/test_regression.py")
9641 (("from common") "from nose.tools")))))
9642 (build-system python-build-system)
9643 (native-inputs
9644 `(("python-setuptools" ,python-setuptools)
9645 ;; For testing
9646 ("python-nose" ,python-nose)))
9647 (home-page "https://bitbucket.org/astanin/python-tabulate")
9648 (synopsis "Pretty-print tabular data")
9649 (description
9650 "Tabulate is a library and command-line utility to pretty-print tabular
9651 data in Python.")
9652 (license license:expat)))
9653
9654 (define-public python2-tabulate
9655 (package-with-python2 python-tabulate))
9656
9657 (define-public python-kazoo
9658 (package
9659 (name "python-kazoo")
9660 (version "2.2.1")
9661 (source
9662 (origin
9663 (method url-fetch)
9664 (uri (pypi-uri "kazoo" version))
9665 (sha256
9666 (base32
9667 "10pb864if9qi2pq9lfb9m8f7z7ss6rml80gf1d9h64lap5crjnjj"))))
9668 (build-system python-build-system)
9669 (arguments '(#:tests? #f)) ; XXX: needs zookeeper
9670 (native-inputs
9671 `(("python-setuptools" ,python-setuptools)))
9672 (propagated-inputs
9673 `(("python-six" ,python-six)))
9674 (home-page "https://kazoo.readthedocs.org")
9675 (synopsis "High-level Zookeeper client library")
9676 (description
9677 "Kazoo is a Python client library for the Apache Zookeeper distributed
9678 application service. It is designed to be easy to use and to avoid common
9679 programming errors.")
9680 (license license:asl2.0)))
9681
9682 (define-public python2-kazoo
9683 (package-with-python2 python-kazoo))
9684
9685 (define-public python-pykafka
9686 (package
9687 (name "python-pykafka")
9688 (version "2.4.0")
9689 (source (origin
9690 (method url-fetch)
9691 (uri (string-append
9692 "https://pypi.python.org/packages/8b/3e/"
9693 "384eeff406b06315738b62483fd2126c6e4f544167116b17cc04ea7d2a59/"
9694 "pykafka-" version ".tar.gz"))
9695 (sha256
9696 (base32
9697 "1id6sr159p6aa13bxcqyr9gln8sqg1l0ddzns5iws8kk5q1p5cfv"))))
9698 (build-system python-build-system)
9699 (arguments '(#:tests? #f)) ; XXX: needs zookeeper, kafka, etc.
9700 (native-inputs
9701 `(("python-setuptools" ,python-setuptools)))
9702 (propagated-inputs
9703 `(("python-gevent" ,python-gevent)
9704 ("python-kazoo" ,python-kazoo)
9705 ("python-tabulate" ,python-tabulate)))
9706 (inputs
9707 `(("librdkafka" ,librdkafka)))
9708 (home-page "https://pykafka.readthedocs.io/")
9709 (synopsis "Apache Kafka client for Python")
9710 (description
9711 "PyKafka is a client for the Apache Kafka distributed messaging system.
9712 It includes Python implementations of Kafka producers and consumers, which
9713 are optionally backed by a C extension built on librdkafka.")
9714 (license license:asl2.0)))
9715
9716 (define-public python2-pykafka
9717 (package-with-python2 python-pykafka))
9718
9719 (define-public python-wcwidth
9720 (package
9721 (name "python-wcwidth")
9722 (version "0.1.6")
9723 (source
9724 (origin
9725 (method url-fetch)
9726 (uri (string-append
9727 "https://pypi.python.org/packages/"
9728 "c2/d1/7689293086a8d5320025080cde0e3155b94ae0a7496fb89a3fbaa92c354a/"
9729 "wcwidth-" version ".tar.gz"))
9730 (sha256
9731 (base32
9732 "02wjrpf001gjdjsaxxbzcwfg19crlk2dbddayrfc2v06f53yrcyw"))))
9733 (build-system python-build-system)
9734 (home-page "https://github.com/jquast/wcwidth")
9735 (synopsis "Measure number of terminal column cells of wide-character codes")
9736 (description "Wcwidth measures the number of terminal column cells of
9737 wide-character codes. It is useful for those implementing a terminal emulator,
9738 or programs that carefully produce output to be interpreted by one. It is a
9739 Python implementation of the @code{wcwidth} and @code{wcswidth} C functions
9740 specified in POSIX.1-2001 and POSIX.1-2008.")
9741 (license license:expat)
9742 (properties `((python2-variant . ,(delay python2-wcwidth))))))
9743
9744 (define-public python2-wcwidth
9745 (package
9746 (inherit (package-with-python2
9747 (strip-python2-variant python-wcwidth)))
9748 (native-inputs `(("python2-setuptools" ,python2-setuptools)))))
9749
9750 (define-public python2-jsonrpclib
9751 (package
9752 (name "python2-jsonrpclib")
9753 (version "0.1.7")
9754 (source (origin
9755 (method url-fetch)
9756 (uri (string-append
9757 "https://pypi.python.org/packages/source/j/jsonrpclib/"
9758 "jsonrpclib-" version ".tar.gz"))
9759 (sha256
9760 (base32
9761 "02vgirw2bcgvpcxhv5hf3yvvb4h5wzd1lpjx8na5psdmaffj6l3z"))))
9762 (build-system python-build-system)
9763 (native-inputs
9764 `(("python2-setuptools" ,python2-setuptools)))
9765 (arguments
9766 `(#:tests? #f
9767 #:python ,python-2))
9768 (home-page "https://github.com/joshmarshall/jsonrpclib/")
9769 (synopsis "Implementation of JSON-RPC specification for Python")
9770 (description
9771 "This library is an implementation of the JSON-RPC specification.
9772 It supports both the original 1.0 specification, as well as the
9773 new (proposed) 2.0 spec, which includes batch submission, keyword arguments,
9774 etc.")
9775 (license license:asl2.0)))
9776
9777 (define-public python-chai
9778 (package
9779 (name "python-chai")
9780 (version "1.1.1")
9781 (source (origin
9782 (method url-fetch)
9783 (uri (pypi-uri "chai" version))
9784 (sha256
9785 (base32
9786 "016kf3irrclpkpvcm7q0gmkfibq7jgy30a9v73pp42bq9h9a32bl"))))
9787 (build-system python-build-system)
9788 (native-inputs
9789 `(("python-setuptools" ,python-setuptools)))
9790 (home-page "https://github.com/agoragames/chai")
9791 (synopsis "Mocking framework for Python")
9792 (description
9793 "Chai provides an api for mocking, stubbing and spying your python
9794 objects, patterned after the Mocha library for Ruby.")
9795 (license license:bsd-3)))
9796
9797 (define-public python2-chai
9798 (package-with-python2 python-chai))
9799
9800 (define-public python-arrow
9801 (package
9802 (name "python-arrow")
9803 (version "0.8.0")
9804 (source (origin
9805 (method url-fetch)
9806 (uri (pypi-uri "arrow" version))
9807 (sha256
9808 (base32
9809 "1bz7hkdgpqcjs866y58z8jywpy7al0f4rxdr00bh2l5qddyw245j"))))
9810 (build-system python-build-system)
9811 (native-inputs
9812 `(("python-setuptools" ,python-setuptools)
9813 ;; For testing
9814 ("python-chai" ,python-chai)
9815 ("python-simplejson" ,python-simplejson)))
9816 (propagated-inputs
9817 `(("python-dateutil" ,python-dateutil-2)))
9818 (home-page "https://github.com/crsmithdev/arrow/")
9819 (synopsis "Dates and times for Python")
9820 (description
9821 "Arrow is a Python library to creating, manipulating, formatting and
9822 converting dates, times, and timestamps. It implements and updates the
9823 datetime type.")
9824 (license license:asl2.0)))
9825
9826 (define-public python2-arrow
9827 (package-with-python2 python-arrow))
9828
9829 (define-public python-inflection
9830 (package
9831 (name "python-inflection")
9832 (version "0.3.1")
9833 (source
9834 (origin (method url-fetch)
9835 (uri (pypi-uri "inflection" version))
9836 (sha256
9837 (base32
9838 "1jhnxgnw8y3mbzjssixh6qkc7a3afc4fygajhqrqalnilyvpzshq"))))
9839 (build-system python-build-system)
9840 (native-inputs
9841 `(("python-setuptools" ,python-setuptools)))
9842 (home-page "http://github.com/jpvanhal/inflection")
9843 (synopsis "Python string transformation library")
9844 (description
9845 "Inflection is a string transformation library. It singularizes
9846 and pluralizes English words, and transforms strings from CamelCase to
9847 underscored string.")
9848 (license license:expat)))
9849
9850 (define-public python2-inflection
9851 (package-with-python2 python-inflection))
9852
9853 (define-public python-pylev
9854 (package
9855 (name "python-pylev")
9856 (version "1.3.0")
9857 (source (origin
9858 (method url-fetch)
9859 (uri (pypi-uri "pylev" version))
9860 (sha256
9861 (base32
9862 "1hz1x9blsbxya1y9nnhnwwdnqmakxi9mc0jkwj0rn6b1h44i0f86"))))
9863 (build-system python-build-system)
9864 (native-inputs
9865 `(("python-setuptools" ,python-setuptools)))
9866 (home-page "http://github.com/toastdriven/pylev")
9867 (synopsis "Levenshtein distance implementation in Python")
9868 (description "Pure Python Levenshtein implementation, based off the
9869 Wikipedia code samples at
9870 @url{http://en.wikipedia.org/wiki/Levenshtein_distance}.")
9871 (license license:bsd-3)))
9872
9873 (define-public python2-pylev
9874 (package-with-python2 python-pylev))
9875
9876 (define-public python-cleo
9877 (package
9878 (name "python-cleo")
9879 (version "0.4.1")
9880 (source (origin
9881 (method url-fetch)
9882 (uri (pypi-uri "cleo" version))
9883 (sha256
9884 (base32
9885 "1k2dcl6mqpn5bljyl6w42rqyd9mb3y9kh2mg7m2x3kfjwvg0rpva"))))
9886 (build-system python-build-system)
9887 (native-inputs
9888 `(("python-setuptools" ,python-setuptools)
9889 ;; For testing
9890 ("python-mock" ,python-mock)
9891 ("python-pytest" ,python-pytest)))
9892 (propagated-inputs
9893 `(("python-psutil" ,python-psutil)
9894 ("python-pylev" ,python-pylev)))
9895 (home-page "https://github.com/sdispater/cleo")
9896 (synopsis "Command-line arguments library for Python")
9897 (description
9898 "Cleo allows you to create command-line commands with signature in
9899 docstring and colored output.")
9900 (license license:expat)))
9901
9902 (define-public python2-cleo
9903 (package-with-python2 python-cleo))
9904
9905 (define-public python-lazy-object-proxy
9906 (package
9907 (name "python-lazy-object-proxy")
9908 (version "1.2.2")
9909 (source (origin
9910 (method url-fetch)
9911 (uri (pypi-uri "lazy-object-proxy" version))
9912 (sha256
9913 (base32
9914 "0s22aqqkdscyh8sjspyyax7qa1aiz8p4midrnyf39717fhfczm6x"))))
9915 (build-system python-build-system)
9916 (native-inputs
9917 `(("python-setuptools" ,python-setuptools)))
9918 (home-page "https://github.com/ionelmc/python-lazy-object-proxy")
9919 (synopsis "Lazy object proxy for python")
9920 (description
9921 "Lazy object proxy is an object that wraps a callable but defers the call
9922 until the object is actually required, and caches the result of said call.")
9923 (license license:bsd-2)))
9924
9925 (define-public python2-lazy-object-proxy
9926 (package-with-python2 python-lazy-object-proxy))
9927
9928 (define-public python-dnspython
9929 (package
9930 (name "python-dnspython")
9931 (version "1.15.0")
9932 (source (origin
9933 (method url-fetch)
9934 (uri (string-append "http://www.dnspython.org/kits/"
9935 version "/dnspython-" version ".tar.gz"))
9936 (sha256
9937 (base32
9938 "0jr4v2pd90i6l1xxbss2m05psbjaxvyvvvpq44wycijpfgjqln8i"))))
9939 (build-system python-build-system)
9940 (arguments '(#:tests? #f)) ; XXX: requires internet access
9941 (native-inputs
9942 `(("python-setuptools" ,python-setuptools)))
9943 (home-page "http://www.dnspython.org")
9944 (synopsis "DNS toolkit for Python")
9945 (description
9946 "dnspython is a DNS toolkit for Python. It supports almost all record
9947 types. It can be used for queries, zone transfers, and dynamic updates.
9948 It supports TSIG authenticated messages and EDNS0.")
9949 (license license:expat)))
9950
9951 (define-public python2-dnspython
9952 (package-with-python2 python-dnspython))
9953
9954 (define-public python-email-validator
9955 (package
9956 (name "python-email-validator")
9957 (version "1.0.1")
9958 (source
9959 (origin (method url-fetch)
9960 (uri (pypi-uri "email_validator" version))
9961 (sha256
9962 (base32
9963 "0mn8jg5h8ifl8w6a6m0hq8kbk0mzw9vm054qfamkn89b3npz52qw"))))
9964 (build-system python-build-system)
9965 (arguments
9966 '(#:phases
9967 (modify-phases %standard-phases
9968 (add-before 'build 'use-dnspython
9969 (lambda _
9970 (substitute* "setup.py"
9971 (("dnspython3") "dnspython"))
9972 #t)))))
9973 (native-inputs
9974 `(("python-setuptools" ,python-setuptools)))
9975 (propagated-inputs
9976 `(("python-dnspython" ,python-dnspython)
9977 ("python-idna" ,python-idna)))
9978 (home-page "https://github.com/JoshData/python-email-validator")
9979 (synopsis "Email address validation library for Python")
9980 (description
9981 "This library validates email address syntax and deliverability.")
9982 (license license:cc0)))
9983
9984 (define-public python2-email-validator
9985 (package-with-python2 python-email-validator))
9986
9987 (define-public python-ukpostcodeparser
9988 (package
9989 (name "python-ukpostcodeparser")
9990 (version "1.0.3")
9991 (source (origin
9992 (method url-fetch)
9993 (uri (pypi-uri "UkPostcodeParser" version))
9994 (sha256
9995 (base32
9996 "1jwg9z4rz51mcka1821rwgycsd0mcicyp1kiwjfa2kvg8bm9p2qd"))))
9997 (build-system python-build-system)
9998 (native-inputs
9999 `(("python-setuptools" ,python-setuptools)))
10000 (home-page "https://github.com/hamstah/ukpostcodeparser")
10001 (synopsis "UK Postcode parser for Python")
10002 (description
10003 "This library provides the @code{parse_uk_postcode} function for
10004 parsing UK postcodes.")
10005 (license license:expat)))
10006
10007 (define-public python2-ukpostcodeparser
10008 (package-with-python2 python-ukpostcodeparser))
10009
10010 (define-public python-fake-factory
10011 (package
10012 (name "python-fake-factory")
10013 (version "0.7.2")
10014 (source (origin
10015 (method url-fetch)
10016 (uri (pypi-uri "fake-factory" version))
10017 (sha256
10018 (base32
10019 "0vs0dkmg0dlaxf8w6q2i3k0i03gmp56ablldv7ci9x3nbadkn71g"))))
10020 (build-system python-build-system)
10021 (native-inputs
10022 `(("python-setuptools" ,python-setuptools)
10023 ;; For testing
10024 ("python-email-validator" ,python-email-validator)
10025 ("python-mock" ,python-mock)
10026 ("python-ukpostcodeparser" ,python-ukpostcodeparser)))
10027 (propagated-inputs
10028 `(("python-dateutil" ,python-dateutil-2)
10029 ("python-six" ,python-six)))
10030 (home-page "https://github.com/joke2k/faker")
10031 (synopsis "Python package that generates fake data")
10032 (description
10033 "Faker is a Python package that generates fake data such as names,
10034 addresses, and phone numbers.")
10035 (license license:expat)
10036 (properties `((python2-variant . ,(delay python2-fake-factory))))))
10037
10038 (define-public python2-fake-factory
10039 (let ((base (package-with-python2 (strip-python2-variant
10040 python-fake-factory))))
10041 (package
10042 (inherit base)
10043 (propagated-inputs
10044 `(("python2-ipaddress" ,python2-ipaddress)
10045 ,@(package-propagated-inputs base))))))
10046
10047 (define-public python-pyaml
10048 (package
10049 (name "python-pyaml")
10050 (version "15.8.2")
10051 (source (origin
10052 (method url-fetch)
10053 (uri (pypi-uri "pyaml" version))
10054 (sha256
10055 (base32
10056 "1f5m28vkh4ksq3d80d8mmd2z8wxvc3mgy2pmrv2751dm2xgznm4w"))))
10057 (build-system python-build-system)
10058 (native-inputs
10059 `(("python-setuptools" ,python-setuptools)))
10060 (propagated-inputs
10061 `(("python-pyyaml" ,python-pyyaml)))
10062 (home-page "https://github.com/mk-fg/pretty-yaml")
10063 (synopsis "YAML pretty-print library for Python")
10064 (description
10065 "pyaml is a PyYAML based python module to produce pretty and readable
10066 YAML-serialized data.")
10067 (license (license:non-copyleft "http://www.wtfpl.net/txt/copying/"))))
10068
10069 (define-public python2-pyaml
10070 (package-with-python2 python-pyaml))
10071
10072 (define-public python-flexmock
10073 (package
10074 (name "python-flexmock")
10075 (version "0.10.2")
10076 (source (origin
10077 (method url-fetch)
10078 (uri (pypi-uri "flexmock" version))
10079 (sha256
10080 (base32
10081 "0arc6njvs6i9v9hgvzk5m50296g7zy5m9d7pyb43vdsdgxrci5gy"))))
10082 (build-system python-build-system)
10083 (native-inputs
10084 `(("python-setuptools" ,python-setuptools)))
10085 (home-page "https://flexmock.readthedocs.org")
10086 (synopsis "Testing library for Python")
10087 (description
10088 "flexmock is a testing library for Python that makes it easy to create
10089 mocks, stubs and fakes.")
10090 (license license:bsd-3)))
10091
10092 (define-public python2-flexmock
10093 (package-with-python2 python-flexmock))
10094
10095 (define-public python-orator
10096 (package
10097 (name "python-orator")
10098 (version "0.8.2")
10099 (source (origin
10100 (method url-fetch)
10101 (uri (pypi-uri "orator" version))
10102 (sha256
10103 (base32
10104 "1li49irsqha17nrda4nsb48biyy0rarp9pphf0jpqwm5zr8hv569"))))
10105 (build-system python-build-system)
10106 (arguments '(#:tests? #f)) ; no tests
10107 (native-inputs
10108 `(("python-setuptools" ,python-setuptools)))
10109 (propagated-inputs
10110 `(("python-arrow" ,python-arrow)
10111 ("python-blinker" ,python-blinker)
10112 ("python-cleo" ,python-cleo)
10113 ("python-fake-factory" ,python-fake-factory)
10114 ("python-inflection" ,python-inflection)
10115 ("python-lazy-object-proxy" ,python-lazy-object-proxy)
10116 ("python-pyaml" ,python-pyaml)
10117 ("python-simplejson" ,python-simplejson)
10118 ("python-wrapt" ,python-wrapt)))
10119 (home-page "https://orator-orm.com/")
10120 (synopsis "ActiveRecord ORM for Python")
10121 (description
10122 "Orator provides a simple ActiveRecord-like Object Relational Mapping
10123 implementation for Python.")
10124 (license license:expat)
10125 (properties `((python2-variant . ,(delay python2-orator))))))
10126
10127 (define-public python2-orator
10128 (let ((base (package-with-python2 (strip-python2-variant python-orator))))
10129 (package
10130 (inherit base)
10131 (propagated-inputs
10132 `(("python2-ipaddress" ,python2-ipaddress)
10133 ,@(package-propagated-inputs base))))))
10134
10135 (define-public python-prompt-toolkit
10136 (package
10137 (name "python-prompt-toolkit")
10138 (version "1.0.7")
10139 (source
10140 (origin
10141 (method url-fetch)
10142 (uri (pypi-uri "prompt_toolkit" version ".tar.gz"))
10143 (sha256
10144 (base32
10145 "1vyjd0b7wciv55i19l44zy0adx8q7ss79lhy2r9d1rwz2y4822zg"))))
10146 (build-system python-build-system)
10147 (inputs `(("python-wcwidth" ,python-wcwidth)
10148 ("python-pygments" ,python-pygments)))
10149 (native-inputs `(("python-six" ,python-six)))
10150 (home-page "https://github.com/jonathanslenders/python-prompt-toolkit")
10151 (synopsis "Library for building command line interfaces in Python")
10152 (description
10153 "Prompt-Toolkit is a library for building interactive command line
10154 interfaces in Python. It's like GNU Readline but it also features syntax
10155 highlighting while typing, out-of-the-box multi-line input editing, advanced
10156 code completion, incremental search, support for Chinese double-width
10157 characters, mouse support, and auto suggestions.")
10158 (license license:bsd-3)
10159 (properties `((python2-variant . ,(delay python2-prompt-toolkit))))))
10160
10161 (define-public python2-prompt-toolkit
10162 (let ((base (package-with-python2 (strip-python2-variant python-prompt-toolkit))))
10163 (package
10164 (inherit base)
10165 (native-inputs
10166 `(("python2-setuptools" ,python2-setuptools)
10167 ,@(package-native-inputs base))))))
10168
10169 (define-public python-jedi
10170 (package
10171 (name "python-jedi")
10172 (version "0.9.0")
10173 (source
10174 (origin
10175 (method url-fetch)
10176 (uri (pypi-uri "jedi" version))
10177 (sha256
10178 (base32
10179 "0c8x962ynpx001fdvp07m2q5jk4igkxbj3rmnydavphvlgxijk1v"))))
10180 (build-system python-build-system)
10181 (home-page "https://github.com/davidhalter/jedi")
10182 (synopsis
10183 "Autocompletion for Python that can be used for text editors")
10184 (description
10185 "Jedi is an autocompletion tool for Python that can be used for text editors.")
10186 (license license:expat)
10187 (properties `((python2-variant . ,(delay python2-jedi))))))
10188
10189 (define-public python2-jedi
10190 (let ((base (package-with-python2 (strip-python2-variant python-jedi))))
10191 (package
10192 (inherit base)
10193 (native-inputs
10194 `(("python2-setuptools" ,python2-setuptools)
10195 ,@(package-native-inputs base))))))
10196
10197 (define-public ptpython
10198 (package
10199 (name "ptpython")
10200 (version "0.34")
10201 (source (origin
10202 (method url-fetch)
10203 (uri (pypi-uri "ptpython" version))
10204 (sha256
10205 (base32
10206 "1mmbiyzf0n8hm7z2a562x7w5cbl6jc0zsk6vp40q1z4cyblv1k13"))))
10207 (build-system python-build-system)
10208 (inputs
10209 `(("python-docopt" ,python-docopt)
10210 ("python-jedi" ,python-jedi)
10211 ("python-prompt-toolkit" ,python-prompt-toolkit)
10212 ("python-pygments" ,python-pygments)
10213 ("python-setuptools" ,python-setuptools)))
10214 (home-page "https://github.com/jonathanslenders/ptpython")
10215 (synopsis "Python Read-Eval-Print-Loop with nice IDE-like features")
10216 (description
10217 "ptpython is a Python read-eval-print loop with IDE-like features.
10218 It supports syntax highlighting, multiline editing, autocompletion, mouse,
10219 color schemes, bracketed paste, Vi and Emacs keybindings, Chinese characters
10220 etc.")
10221 (license license:bsd-3)
10222 (properties `((python2-variant . ,(delay ptpython-2))))))
10223
10224 (define-public ptpython-2
10225 (let ((base (package-with-python2 (strip-python2-variant ptpython))))
10226 (package
10227 (inherit base)
10228 (name "ptpython2"))))
10229
10230 (define-public python-requests-oauthlib
10231 (package
10232 (name "python-requests-oauthlib")
10233 (version "0.6.2")
10234 (source
10235 (origin
10236 (method url-fetch)
10237 (uri (pypi-uri "requests-oauthlib" version))
10238 (sha256
10239 (base32
10240 "0ykff67sjcl227c23g0rxzfx34rr5bf21kwv0z3zmgk0lfmch7hn"))))
10241 (build-system python-build-system)
10242 (arguments
10243 `(#:phases
10244 (modify-phases %standard-phases
10245 ;; removes tests that require network access
10246 (add-before 'check 'pre-check
10247 (lambda _
10248 (delete-file "tests/test_core.py")
10249 #t)))))
10250 (native-inputs
10251 `(("python-requests-mock" ,python-requests-mock)
10252 ("python-mock" ,python-mock)))
10253 (inputs
10254 `(("python-oauthlib" ,python-oauthlib)
10255 ("python-requests" ,python-requests)))
10256 (home-page
10257 "https://github.com/requests/requests-oauthlib")
10258 (synopsis
10259 "OAuthlib authentication support for Requests")
10260 (description
10261 "Requests-OAuthlib uses the Python Requests and OAuthlib libraries to
10262 provide an easy-to-use Python interface for building OAuth1 and OAuth2 clients.")
10263 (license license:isc)
10264 (properties `((python2-variant . ,(delay python2-requests-oauthlib))))))
10265
10266 (define-public python2-requests-oauthlib
10267 (let ((base (package-with-python2 (strip-python2-variant python-requests-oauthlib))))
10268 (package
10269 (inherit base)
10270 (native-inputs `(("python2-setuptools" ,python2-setuptools)
10271 ,@(package-native-inputs base))))))
10272
10273 (define-public python-stem
10274 (package
10275 (name "python-stem")
10276 (version "1.4.1b")
10277 (source
10278 (origin
10279 (method url-fetch)
10280 (uri (pypi-uri "stem" version ".tar.bz2"))
10281 (sha256
10282 (base32
10283 "09a3amp1y351nwz088ckiibbp666qi2lxwkyknavswfm400s0ns7"))))
10284 (build-system python-build-system)
10285 (arguments
10286 `(#:phases
10287 (modify-phases %standard-phases
10288 (replace 'check
10289 (lambda _
10290 (zero? (system* "./run_tests.py" "--unit")))))))
10291 (native-inputs
10292 `(("python-mock" ,python-mock)
10293 ("python-pep8" ,python-pep8)
10294 ("python-pyflakes" ,python-pyflakes)))
10295 (inputs
10296 `(("python-pycrypto" ,python-pycrypto)))
10297 (home-page "https://stem.torproject.org/")
10298 (synopsis
10299 "Python controller library that allows applications to interact with Tor")
10300 (description
10301 "Stem is a Python controller library for Tor. With it you can use Tor's
10302 control protocol to script against the Tor process and read descriptor data
10303 relays publish about themselves.")
10304 (license license:lgpl3)))
10305
10306 (define-public python2-stem
10307 (package-with-python2 python-stem))
10308
10309 (define-public python-pyserial
10310 (package
10311 (name "python-pyserial")
10312 (version "3.1.1")
10313 (source
10314 (origin
10315 (method url-fetch)
10316 (uri (pypi-uri "pyserial" version))
10317 (sha256
10318 (base32
10319 "0k1nfdrxxkdlv4zgaqsdv8li0pj3gbh2pyxw8q2bsg6f9490amyn"))))
10320 (build-system python-build-system)
10321 (home-page
10322 "https://github.com/pyserial/pyserial")
10323 (synopsis "Python Serial Port Bindings")
10324 (description "@code{pyserial} provide serial port bindings for Python. It
10325 supports different byte sizes, stop bits, parity and flow control with RTS/CTS
10326 and/or Xon/Xoff. The port is accessed in RAW mode.")
10327 (license license:bsd-3)
10328 (properties `((python2-variant . ,(delay python2-pyserial))))))
10329
10330 (define-public python2-pyserial
10331 (let ((base (package-with-python2 (strip-python2-variant python-pyserial))))
10332 (package
10333 (inherit base)
10334 (native-inputs
10335 `(("python2-setuptools" ,python2-setuptools)
10336 ,@(package-native-inputs base))))))
10337
10338 (define-public python-kivy
10339 (package
10340 (name "python-kivy")
10341 (version "1.9.1")
10342 (source
10343 (origin
10344 (method url-fetch)
10345 (uri (pypi-uri "kivy" version))
10346 (file-name (string-append name "-" version ".tar.gz"))
10347 (sha256
10348 (base32
10349 "0zk3g1j1z0lzcm9d0k1lprrs95zr8n8k5pdg3p5qlsn26jz4bg19"))))
10350 (build-system python-build-system)
10351 (arguments
10352 `(#:tests? #f ; Tests require many optional packages
10353 #:phases
10354 (modify-phases %standard-phases
10355 (replace 'build (lambda _ (zero? (system* "make" "force"))))
10356 (add-after 'patch-generated-file-shebangs 'set-sdl-paths
10357 (lambda* (#:key inputs #:allow-other-keys)
10358 (setenv "KIVY_SDL2_PATH"
10359 (string-append (assoc-ref inputs "sdl-union")
10360 "/include/SDL2"))
10361 #t)))))
10362 (native-inputs
10363 `(("pkg-config" ,pkg-config)))
10364 (inputs
10365 `(("python-cython" ,python-cython)
10366 ("gstreamer" ,gstreamer)
10367 ("mesa" ,mesa)
10368 ("sdl-union"
10369 ,(sdl-union (list sdl2 sdl2-image sdl2-mixer sdl2-ttf)))))
10370 (home-page "http://kivy.org")
10371 (synopsis
10372 "Multitouch application framework")
10373 (description
10374 "A software library for rapid development of
10375 hardware-accelerated multitouch applications.")
10376 (license license:expat)))
10377
10378 (define-public python2-kivy
10379 (package-with-python2 python-kivy))
10380
10381 (define-public python-kivy-next
10382 (let ((commit "a988c5e7a47da56263ff39514264a3de516ef2fe")
10383 (revision "1"))
10384 (package (inherit python-kivy)
10385 (name "python-kivy-next")
10386 (version (string-append "1.9.1-" revision "."
10387 (string-take commit 7)))
10388 (source
10389 (origin
10390 (method git-fetch)
10391 (uri (git-reference
10392 (url "https://github.com/kivy/kivy")
10393 (commit commit)))
10394 (file-name (string-append name "-" version "-checkout"))
10395 (sha256
10396 (base32
10397 "0jk92b4a8l7blkvkgkjihk171s0dfnq582cckff5srwc8kal5m0p")))))))
10398
10399 (define-public python2-kivy-next
10400 (package-with-python2 python-kivy-next))
10401
10402 (define-public python-binaryornot
10403 (package
10404 (name "python-binaryornot")
10405 (version "0.4.0")
10406 (source (origin
10407 (method url-fetch)
10408 (uri (pypi-uri "binaryornot" version))
10409 (sha256
10410 (base32
10411 "1j4f51dxic39mdwf6alj7gd769wy6mhk916v031wjali51xkh3xb"))))
10412 (build-system python-build-system)
10413 (inputs
10414 `(("python-chardet" ,python-chardet)
10415 ("python-hypothesis" ,python-hypothesis)))
10416 (home-page "https://github.com/audreyr/binaryornot")
10417 (synopsis "Package to check if a file is binary or text")
10418 (description "Ultra-lightweight pure Python package to check if a file is
10419 binary or text.")
10420 (license license:bsd-3)
10421 (properties `((python2-variant . ,(delay python2-binaryornot))))))
10422
10423 (define-public python2-binaryornot
10424 (let ((base (package-with-python2 (strip-python2-variant python-binaryornot))))
10425 (package (inherit base)
10426 (native-inputs
10427 `(("python2-setuptools" ,python2-setuptools)
10428 ,@(package-native-inputs base)))
10429 (inputs
10430 `(("python2-enum34" ,python2-enum34)
10431 ,@(package-inputs base))))))
10432
10433 (define-public python-nltk
10434 (package
10435 (name "python-nltk")
10436 (version "3.2.1")
10437 (source (origin
10438 (method url-fetch)
10439 (uri (pypi-uri "nltk" version))
10440 (sha256
10441 (base32
10442 "0skxbhnymwlspjkzga0f7x1hg3y50fwpfghs8g8k7fh6f4nknlym"))))
10443 (build-system python-build-system)
10444 (home-page "http://nltk.org/")
10445 (synopsis "Natural Language Toolkit")
10446 (description "It provides interfaces to over 50 corpora and lexical
10447 resources such as WordNet, along with a suite of text processing libraries
10448 for classification, tokenization, stemming, tagging, parsing, and semantic
10449 reasoning, wrappers for natural language processing libraries.")
10450 (license license:asl2.0)
10451 (properties `((python2-variant . ,(delay python2-nltk))))))
10452
10453 (define-public python2-nltk
10454 (let ((base (package-with-python2 (strip-python2-variant python-nltk))))
10455 (package (inherit base)
10456 (native-inputs
10457 `(("python2-setuptools" ,python2-setuptools)
10458 ,@(package-native-inputs base))))))
10459
10460 (define-public python-pymongo
10461 (package
10462 (name "python-pymongo")
10463 (version "3.3.0")
10464 (source (origin
10465 (method url-fetch)
10466 (uri (pypi-uri "pymongo" version))
10467 (sha256
10468 (base32
10469 "07mra6w86wjqy4lx5fvimidjhhfzd562gfjn8grsnbv2q8pk0i9x"))))
10470 (build-system python-build-system)
10471 (inputs
10472 `(("python-certifi" ,python-certifi)))
10473 (home-page "http://github.com/mongodb/mongo-python-driver")
10474 (synopsis "Python driver for MongoDB")
10475 (description "Python driver for MongoDB.")
10476 (license license:asl2.0)
10477 (properties `((python2-variant . ,(delay python2-pymongo))))))
10478
10479 (define-public python2-pymongo
10480 (let ((base (package-with-python2 (strip-python2-variant python-pymongo))))
10481 (package (inherit base)
10482 (native-inputs
10483 `(("python2-setuptools" ,python2-setuptools)
10484 ,@(package-native-inputs base))))))
10485
10486 (define-public python-sh
10487 (package
10488 (name "python-sh")
10489 (version "1.11")
10490 (source (origin
10491 (method url-fetch)
10492 (uri (pypi-uri "sh" version))
10493 (sha256
10494 (base32
10495 "192r0mpv6dmkysjzhc43ddffiwb5g7c76bgr1mb1z2xz9awbj3sr"))))
10496 (build-system python-build-system)
10497 (arguments
10498 `(#:tests? #f)) ; no tests
10499 (home-page "https://github.com/amoffat/sh")
10500 (synopsis "Python subprocess interface")
10501 (description "Abstracts process invocation by providing a function
10502 interface for programs.")
10503 (license license:expat)
10504 (properties `((python2-variant . ,(delay python2-sh))))))
10505
10506 (define-public python2-sh
10507 (let ((base (package-with-python2 (strip-python2-variant python-sh))))
10508 (package (inherit base)
10509 (native-inputs
10510 `(("python2-setuptools" ,python2-setuptools)
10511 ,@(package-native-inputs base))))))
10512
10513 (define-public python-consul
10514 (package
10515 (name "python-consul")
10516 (version "0.6.1")
10517 (source
10518 (origin
10519 (method url-fetch)
10520 (uri (pypi-uri "python-consul" version))
10521 (sha256
10522 (base32
10523 "0rfyxcy4cr3x848vhx876ifalxd5ghq6l5x813m49h4vq2d4jiq8"))))
10524 (build-system python-build-system)
10525 (native-inputs
10526 `(("python-pytest" ,python-pytest)
10527 ("python-requests" ,python-requests)
10528 ("python-six" ,python-six)))
10529 (home-page "https://github.com/cablehead/python-consul")
10530 (synopsis "Python client for Consul")
10531 (description
10532 "Python client for @url{http://www.consul.io/,Consul}, a tool for service
10533 discovery, monitoring and configuration.")
10534 (license license:expat)))
10535
10536 (define-public python2-consul
10537 (let ((consul (package-with-python2 python-consul)))
10538 (package (inherit consul)
10539 (native-inputs
10540 `(("python2-setuptools" ,python2-setuptools)
10541 ,@(package-native-inputs consul))))))
10542
10543 (define-public python-schematics
10544 (package
10545 (name "python-schematics")
10546 (version "1.1.1")
10547 (source
10548 (origin
10549 (method url-fetch)
10550 (uri (string-append
10551 "https://github.com/schematics/schematics/archive/v" version ".tar.gz"))
10552 (file-name (string-append name "-" version ".tar.gz"))
10553 (sha256
10554 (base32
10555 "19v1i69bf3bzarfxmbv0v6ivpcn758x3shvbiy9l2hy0lvqwnp6l"))))
10556 (build-system python-build-system)
10557 (inputs
10558 `(("python-six" ,python-six)))
10559 (arguments
10560 `(#:tests? #f)) ; requires a bunch of not very nice packages with fixed
10561 ; version requirements (eg python-coveralls)
10562 (home-page "https://github.com/schematics/schematics")
10563 (synopsis "Python Data Structures for Humans")
10564 (description "Python Data Structures for Humans.")
10565 (license license:bsd-3)
10566 (properties `((python2-variant . ,(delay python2-schematics))))))
10567
10568 (define-public python2-schematics
10569 (let ((base (package-with-python2 (strip-python2-variant python-schematics))))
10570 (package (inherit base)
10571 (native-inputs
10572 `(("python2-setuptools" ,python2-setuptools)
10573 ,@(package-native-inputs base))))))
10574
10575 (define-public python-publicsuffix
10576 (package
10577 (name "python-publicsuffix")
10578 (version "1.1.0")
10579 (source (origin
10580 (method url-fetch)
10581 (uri (pypi-uri "publicsuffix" version))
10582 (sha256
10583 (base32
10584 "1adx520249z2cy7ykwjr1k190mn2888wqn9jf8qm27ly4qymjxxf"))))
10585 (build-system python-build-system)
10586 (arguments
10587 `(#:tests? #f)) ; tests use the internet
10588 (home-page "https://www.tablix.org/~avian/git/publicsuffix.git")
10589 (synopsis "Get suffix for a domain name")
10590 (description "Get a public suffix for a domain name using the Public Suffix
10591 List.")
10592 (license license:expat)
10593 (properties `((python2-variant . ,(delay python2-nltk))))))
10594
10595 (define-public python2-publicsuffix
10596 (let ((base (package-with-python2 (strip-python2-variant python-publicsuffix))))
10597 (package (inherit base)
10598 (native-inputs
10599 `(("python2-setuptools" ,python2-setuptools)
10600 ,@(package-native-inputs base))))))
10601
10602 (define-public python-publicsuffix2
10603 (package
10604 (name "python-publicsuffix2")
10605 (version "2.20160621")
10606 (source
10607 (origin
10608 (method url-fetch)
10609 (uri (pypi-uri "publicsuffix2" version ".tar.bz2"))
10610 (sha256
10611 (base32
10612 "06lx603gdwad5hc3hmn763ngq0rq9bzz1ni3ga72nzk5n872arkd"))))
10613 (build-system python-build-system)
10614 (home-page "https://github.com/pombredanne/python-publicsuffix2")
10615 (synopsis "Get a public suffix for a domain name using the Public Suffix List")
10616 (description "Get a public suffix for a domain name using the Public Suffix
10617 List. Forked from and using the same API as the publicsuffix package.")
10618 (license (list license:expat license:mpl2.0))
10619 (properties `((python2-variant . ,(delay python2-publicsuffix2))))))
10620
10621 (define-public python2-publicsuffix2
10622 (let ((base (package-with-python2 (strip-python2-variant python-publicsuffix2))))
10623 (package (inherit base)
10624 (native-inputs
10625 `(("python2-setuptools" ,python2-setuptools)
10626 ,@(package-native-inputs base))))))
10627
10628 (define-public python-url
10629 (package
10630 (name "python-url")
10631 (version "0.2.0")
10632 (source (origin
10633 (method url-fetch)
10634 (uri (pypi-uri "url" version))
10635 (sha256
10636 (base32
10637 "0v879yadcz9qxfl41ak6wkga1kimp9cflla9ddz03hjjvgkqy5ki"))))
10638 (build-system python-build-system)
10639 (inputs
10640 `(("python-publicsuffix" ,python-publicsuffix)))
10641 (native-inputs
10642 `(("python-coverage" ,python-coverage)
10643 ("python-nose" ,python-nose)))
10644 (arguments
10645 `(#:tests? #f)) ; FIXME: tests fail with "ImportError: No module named 'tests'"
10646 (home-page "http://github.com/seomoz/url-py")
10647 (synopsis "URL Parsing")
10648 (description "Library for parsing urls.")
10649 (license license:expat)
10650 (properties `((python2-variant . ,(delay python2-url))))))
10651
10652 (define-public python2-url
10653 (let ((base (package-with-python2 (strip-python2-variant python-url))))
10654 (package (inherit base)
10655 (inputs
10656 `(("python2-publicsuffix" ,python2-publicsuffix)))
10657 (native-inputs
10658 `(("python2-setuptools" ,python2-setuptools)
10659 ,@(package-native-inputs base))))))
10660
10661 (define-public python-freezegun
10662 (package
10663 (name "python-freezegun")
10664 (version "0.3.7")
10665 (source
10666 (origin
10667 (method url-fetch)
10668 (uri (pypi-uri "freezegun" version))
10669 (sha256
10670 (base32
10671 "14l19x06v5jkq4rdwbmfyw4x9lrjb2300afrk21r1ash7y1y9a0w"))))
10672 (build-system python-build-system)
10673 (native-inputs
10674 `(("python-mock" ,python-mock)
10675 ("python-nose" ,python-nose)
10676 ("python-coverage" ,python-coverage)
10677 ("python-dateutil-2" ,python-dateutil-2)))
10678 (inputs
10679 `(("python-six" ,python-six)))
10680 (arguments
10681 `(#:phases (modify-phases %standard-phases
10682 ;; The tests are normally executed via `make test`, but the PyPi
10683 ;; package does not include the Makefile.
10684 (replace 'check
10685 (lambda _
10686 (zero? (system* "nosetests" "./tests/")))))))
10687 (home-page "https://github.com/spulec/freezegun")
10688 (synopsis "Test utility for mocking the datetime module")
10689 (description
10690 "FreezeGun is a library that allows your python tests to travel through
10691 time by mocking the datetime module.")
10692 (license license:asl2.0)))
10693
10694 (define-public python2-freezegun
10695 (let ((base (package-with-python2 (strip-python2-variant python-freezegun))))
10696 (package (inherit base)
10697 (native-inputs
10698 `(("python2-setuptools" ,python2-setuptools)
10699 ,@(package-native-inputs base))))))
10700
10701 (define-public python-odfpy
10702 (package
10703 (name "python-odfpy")
10704 (version "1.3.3")
10705 (source (origin
10706 (method url-fetch)
10707 (uri (pypi-uri "odfpy" version))
10708 (sha256
10709 (base32
10710 "1a6ms0w9zfhhkqhvrnynwwbxrivw6hgjc0s5k7j06npc7rq0blxw"))))
10711 (arguments
10712 `(#:modules ((srfi srfi-1)
10713 (guix build python-build-system)
10714 (guix build utils))
10715 #:phases
10716 (modify-phases %standard-phases
10717 (replace 'check
10718 ;; The test runner invokes python2 and python3 for test*.py.
10719 ;; To avoid having both in inputs, we replicate it here.
10720 (lambda _
10721 (every (lambda (test-file)
10722 (zero? (system* "python" test-file)))
10723 (find-files "tests" "^test.*\\.py$")))))))
10724 (build-system python-build-system)
10725 (home-page "https://github.com/eea/odfpy")
10726 (synopsis "Python API and tools to manipulate OpenDocument files")
10727 (description "Collection of libraries and utility programs written in
10728 Python to manipulate OpenDocument 1.2 files.")
10729 (license
10730 ;; The software is mainly dual GPL2+ and ASL2.0, but includes a
10731 ;; number of files with other licenses.
10732 (list license:gpl2+ license:asl2.0 license:lgpl2.1+ license:cc-by-sa3.0))))
10733
10734 (define-public python2-odfpy
10735 (package-with-python2 python-odfpy))
10736
10737 (define-public python-cachecontrol
10738 (package
10739 (name "python-cachecontrol")
10740 (version "0.11.6")
10741 (source
10742 (origin
10743 (method url-fetch)
10744 ;; Pypi does not have tests.
10745 (uri (string-append
10746 "https://github.com/ionrock/cachecontrol/archive/v"
10747 version ".tar.gz"))
10748 (file-name (string-append name "-" version ".tar.gz"))
10749 (sha256
10750 (base32
10751 "0yj60d0f69a2l8p7y86k4zhzzm6rnxpq74sfl240pry9l0lfw2vw"))))
10752 (build-system python-build-system)
10753 (arguments
10754 `(#:phases
10755 (modify-phases %standard-phases
10756 (replace 'check
10757 (lambda _
10758 ;; Drop test that requires internet access.
10759 (delete-file "tests/test_regressions.py")
10760 (setenv "PYTHONPATH"
10761 (string-append (getcwd) "/build/lib:"
10762 (getenv "PYTHONPATH")))
10763 (zero? (system* "py.test" "-vv")))))))
10764 (native-inputs
10765 `(("python-pytest" ,python-pytest)
10766 ("python-redis" ,python-redis)
10767 ("python-webtest" ,python-webtest)
10768 ("python-mock" ,python-mock)))
10769 (propagated-inputs
10770 `(("python-requests" ,python-requests)
10771 ("python-lockfile" ,python-lockfile)))
10772 (home-page "https://github.com/ionrock/cachecontrol")
10773 (synopsis "The httplib2 caching algorithms for use with requests")
10774 (description "CacheControl is a port of the caching algorithms in
10775 @code{httplib2} for use with @code{requests} session objects.")
10776 (license license:asl2.0)
10777 (properties `((python2-variant . ,(delay python2-cachecontrol))))))
10778
10779 (define-public python2-cachecontrol
10780 (let ((base (package-with-python2 (strip-python2-variant python-cachecontrol))))
10781 (package (inherit base)
10782 (native-inputs
10783 `(("python2-setuptools" ,python2-setuptools)
10784 ,@(package-native-inputs base))))))
10785
10786 (define-public python-lit
10787 (package
10788 (name "python-lit")
10789 (version "0.5.0")
10790 (source
10791 (origin
10792 (method url-fetch)
10793 (uri (pypi-uri "lit" version))
10794 (sha256
10795 (base32
10796 "135m2b9cwih85g66rjggavck328z7lj37srgpq3jxszbg0g2b91y"))))
10797 (build-system python-build-system)
10798 (home-page "http://llvm.org/")
10799 (synopsis "LLVM Software Testing Tool")
10800 (description "@code{lit} is a portable tool for executing LLVM and Clang
10801 style test suites, summarizing their results, and providing indication of
10802 failures.")
10803 (license license:ncsa)
10804 (properties `((python2-variant . ,(delay python2-lit))))))
10805
10806 (define-public python2-lit
10807 (let ((base (package-with-python2 (strip-python2-variant python-lit))))
10808 (package
10809 (inherit base)
10810 (native-inputs
10811 `(("python2-setuptools" ,python2-setuptools)
10812 ,@(package-native-inputs base))))))
10813
10814 (define-public python-pytest-pep8
10815 (package
10816 (name "python-pytest-pep8")
10817 (version "1.0.6")
10818 (source (origin
10819 (method url-fetch)
10820 (uri (pypi-uri "pytest-pep8" version))
10821 (sha256
10822 (base32
10823 "06032agzhw1i9d9qlhfblnl3dw5hcyxhagn7b120zhrszbjzfbh3"))))
10824 (build-system python-build-system)
10825 (arguments
10826 `(#:tests? #f ; Fails with recent pytest and pep8. See upstream issues #8 and #12.
10827 ;; Prevent creation of the egg. This works around
10828 ;; https://debbugs.gnu.org/cgi/bugreport.cgi?bug=20765 .
10829 #:configure-flags '("--single-version-externally-managed" "--root=/")))
10830 (native-inputs
10831 `(("python-pytest" ,python-pytest)))
10832 (propagated-inputs
10833 `(("python-pep8" ,python-pep8)))
10834 (home-page "https://bitbucket.org/pytest-dev/pytest-pep8")
10835 (synopsis "Py.test plugin to check PEP8 requirements")
10836 (description "Pytest plugin for checking PEP8 compliance.")
10837 (license license:expat)
10838 (properties `((python2-variant . ,(delay python2-pytest-pep8))))))
10839
10840 (define-public python2-pytest-pep8
10841 (let ((base (package-with-python2 (strip-python2-variant python-pytest-pep8))))
10842 (package (inherit base)
10843 (native-inputs
10844 `(("python2-setuptools" ,python2-setuptools)
10845 ,@(package-native-inputs base))))))
10846
10847 (define-public python-pytest-flakes
10848 (package
10849 (name "python-pytest-flakes")
10850 (version "1.0.1")
10851 (source (origin
10852 (method url-fetch)
10853 (uri (pypi-uri "pytest-flakes" version))
10854 (sha256
10855 (base32
10856 "0flag3n33kbhyjrhzmq990rvg4yb8hhhl0i48q9hw0ll89jp28lw"))))
10857 (build-system python-build-system)
10858 (arguments
10859 `(;; Prevent creation of the egg. This works around
10860 ;; https://debbugs.gnu.org/cgi/bugreport.cgi?bug=20765 .
10861 #:configure-flags '("--single-version-externally-managed" "--root=/")
10862 #:phases
10863 (modify-phases %standard-phases
10864 (delete 'check)
10865 (add-after 'install 'check
10866 (lambda _ ; It's easier to run tests after install.
10867 (zero? (system* "py.test" "-vv")))))))
10868 (native-inputs
10869 `(("python-coverage" ,python-coverage)
10870 ("python-pytest" ,python-pytest)
10871 ("python-pytest-cache" ,python-pytest-cache)
10872 ("python-pytest-pep8" ,python-pytest-pep8)))
10873 (propagated-inputs
10874 `(("python-pyflakes" ,python-pyflakes)))
10875 (home-page "https://github.com/fschulze/pytest-flakes")
10876 (synopsis "Py.test plugin to check source code with pyflakes")
10877 (description "Pytest plugin for checking Python source code with pyflakes.")
10878 (license license:expat)
10879 (properties `((python2-variant . ,(delay python2-pytest-flakes))))))
10880
10881 (define-public python2-pytest-flakes
10882 (let ((base (package-with-python2 (strip-python2-variant python-pytest-flakes))))
10883 (package (inherit base)
10884 (native-inputs
10885 `(("python2-setuptools" ,python2-setuptools)
10886 ,@(package-native-inputs base))))))
10887
10888 (define-public python-natsort
10889 (package
10890 (name "python-natsort")
10891 (version "5.0.1")
10892 (source (origin
10893 (method url-fetch)
10894 (uri (pypi-uri "natsort" version))
10895 (sha256
10896 (base32
10897 "1abld5p4a6n5zjnyw5mi2pv37gqalcybv2brjr2y6l9l2p8v9mja"))))
10898 (build-system python-build-system)
10899 (arguments
10900 `(#:phases
10901 (modify-phases %standard-phases
10902 (add-before 'check 'set-cachedir
10903 ;; Tests require write access to $HOME by default
10904 (lambda _ (setenv "PYTHON_EGG_CACHE" "/tmp") #t)))))
10905 (native-inputs
10906 `(("python-hypothesis" ,python-hypothesis)
10907 ("python-pytest-cache" ,python-pytest-cache)
10908 ("python-pytest-cov" ,python-pytest-cov)
10909 ("python-pytest-flakes" ,python-pytest-flakes)
10910 ("python-pytest-pep8" ,python-pytest-pep8)))
10911 (propagated-inputs ; TODO: Add python-fastnumbers.
10912 `(("python-pyicu" ,python-pyicu)))
10913 (home-page "https://github.com/SethMMorton/natsort")
10914 (synopsis "Natural sorting for python and shell")
10915 (description
10916 "Natsort lets you apply natural sorting on lists instead of
10917 lexicographical. If you use the built-in @code{sorted} method in python
10918 on a list such as @code{['a20', 'a9', 'a1', 'a4', 'a10']}, it would be
10919 returned as @code{['a1', 'a10', 'a20', 'a4', 'a9']}. Natsort provides a
10920 function @code{natsorted} that identifies numbers and sorts them separately
10921 from strings. It can also sort version numbers, real numbers, mixed types
10922 and more, and comes with a shell command @command{natsort} that exposes this
10923 functionality in the command line.")
10924 (license license:expat)
10925 (properties `((python2-variant . ,(delay python2-natsort))))))
10926
10927 (define-public python2-natsort
10928 (let ((base (package-with-python2 (strip-python2-variant python-natsort))))
10929 (package (inherit base)
10930 (native-inputs
10931 `(("python2-setuptools" ,python2-setuptools)
10932 ("python2-pathlib" ,python2-pathlib)
10933 ("python2-mock" ,python2-mock)
10934 ("python2-enum34" ,python2-enum34)
10935 ,@(package-native-inputs base))))))
10936
10937 (define-public python-glances
10938 (package
10939 (name "python-glances")
10940 (version "2.7.1")
10941 (source
10942 (origin
10943 (method url-fetch)
10944 (uri (pypi-uri "Glances" version))
10945 (sha256
10946 (base32
10947 "11jbq40g8alsbirnd4kiagznqg270247i0m8qhi48ldf2i5xppxg"))))
10948 (build-system python-build-system)
10949 (inputs
10950 `(("python-psutil" ,python-psutil)))
10951 (home-page
10952 "https://github.com/nicolargo/glances")
10953 (synopsis
10954 "A cross-platform curses-based monitoring tool")
10955 (description
10956 "Glances is a curses-based monitoring tool for a wide variety of platforms.
10957 Glances uses the PsUtil library to get information from your system. It monitors
10958 CPU, load, memory, network bandwidth, disk I/O, disk use, and more.")
10959 (license license:lgpl3+)
10960 (properties `((python2-variant . ,(delay python2-glances))))))
10961
10962 (define-public python2-glances
10963 (let ((base (package-with-python2 (strip-python2-variant python-glances))))
10964 (package
10965 (inherit base)
10966 (native-inputs
10967 `(("python2-setuptools" ,python2-setuptools)
10968 ,@(package-native-inputs base))))))
10969
10970 (define-public python-graphql-core
10971 (package
10972 (name "python-graphql-core")
10973 (version "0.5.3")
10974 (source
10975 (origin
10976 (method url-fetch)
10977 (uri (pypi-uri "graphql-core" version))
10978 (sha256
10979 (base32
10980 "0rsaarx2sj4xnw9966rhh4haiqaapm4lm2mfqm48ywd51j5vh1a0"))))
10981 (build-system python-build-system)
10982 (arguments
10983 `(#:phases
10984 (modify-phases %standard-phases
10985 (add-after 'unpack 'patch-hardcoded-version
10986 (lambda _ (substitute*
10987 "setup.py"
10988 (("'gevent==1.1rc1'") "'gevent'"))
10989 #t)))))
10990 (native-inputs
10991 `(("python-gevent" ,python-gevent)
10992 ("python-mock" ,python-mock)
10993 ("python-pytest-mock" ,python-pytest-mock)))
10994 (inputs
10995 `(("python-promise" ,python-promise)
10996 ("python-six" ,python-six)))
10997 (home-page "https://github.com/graphql-python/graphql-core")
10998 (synopsis "GraphQL implementation for Python")
10999 (description
11000 "GraphQL implementation for Python. GraphQL is a data query language and
11001 runtime designed and used to request and deliver data to mobile and web apps.
11002 This library is a port of @url{https://github.com/graphql/graphql-js,graphql-js}
11003 to Python.")
11004 (properties `((python2-variant . ,(delay python2-graphql-core))))
11005 (license license:expat)))
11006
11007 (define-public python2-graphql-core
11008 (let ((base (package-with-python2
11009 (strip-python2-variant python-graphql-core))))
11010 (package (inherit base)
11011 (native-inputs
11012 `(("python2-setuptools" ,python2-setuptools)
11013 ,@(package-native-inputs base))))))
11014
11015 (define-public python-graphql-relay
11016 (package
11017 (name "python-graphql-relay")
11018 (version "0.4.4")
11019 (source
11020 (origin
11021 (method url-fetch)
11022 (uri (pypi-uri "graphql-relay" version))
11023 (sha256
11024 (base32
11025 "04wr9ayshxjjdcg2v21c7ffbz36kif1wjl3604fqd3qignb3fbxi"))))
11026 (build-system python-build-system)
11027 (native-inputs
11028 `(("python-pytest" ,python-pytest)))
11029 (inputs
11030 `(("python-graphql-core" ,python-graphql-core)
11031 ("python-promise" ,python-promise)
11032 ("python-six" ,python-six)))
11033 (home-page "https://github.com/graphql-python/graphql-relay-py")
11034 (synopsis "Relay implementation for Python")
11035 (description
11036 "This is a library to allow the easy creation of Relay-compliant servers
11037 using the GraphQL Python reference implementation of a GraphQL server. It
11038 should be noted that the code is a exact port of the original
11039 @url{https://github.com/graphql/graphql-relay-js,graphql-relay js implementation}
11040 from Facebook.")
11041 (properties `((python2-variant . ,(delay python2-graphql-relay))))
11042 (license license:expat)))
11043
11044 (define-public python2-graphql-relay
11045 (let ((base (package-with-python2
11046 (strip-python2-variant python-graphql-relay))))
11047 (package (inherit base)
11048 (native-inputs
11049 `(("python2-setuptools" ,python2-setuptools)
11050 ,@(package-native-inputs base))))))
11051
11052 (define-public python-graphene
11053 (package
11054 (name "python-graphene")
11055 (version "0.10.2")
11056 (source
11057 (origin
11058 (method url-fetch)
11059 (uri (pypi-uri "graphene" version))
11060 (sha256
11061 (base32
11062 "09zhac7igh9ixdz0ay6csy35b40l1jwbf2wrbxmgxwfhy51iy06q"))))
11063 (build-system python-build-system)
11064 (native-inputs
11065 `(("python-django-filter" ,python-django-filter)
11066 ("python-mock" ,python-mock)
11067 ("python-psycopg2" ,python-psycopg2)
11068 ("python-pytest-django" ,python-pytest-django)
11069 ("python-sqlalchemy-utils" ,python-sqlalchemy-utils)))
11070 (inputs
11071 `(("python-graphql-core" ,python-graphql-core)
11072 ("python-graphql-relay" ,python-graphql-relay)
11073 ("python-iso8601" ,python-iso8601)
11074 ("python-promise" ,python-promise)
11075 ("python-six" ,python-six)))
11076 (home-page "http://graphene-python.org/")
11077 (synopsis "GraphQL Framework for Python")
11078 (description
11079 "Graphene is a Python library for building GraphQL schemas/types.
11080 A GraphQL schema describes your data model, and provides a GraphQL server
11081 with an associated set of resolve methods that know how to fetch data.")
11082 (properties `((python2-variant . ,(delay python2-graphene))))
11083 (license license:expat)))
11084
11085 (define-public python2-graphene
11086 (let ((base (package-with-python2
11087 (strip-python2-variant python-graphene))))
11088 (package (inherit base)
11089 (native-inputs
11090 `(("python2-setuptools" ,python2-setuptools)
11091 ("python2-sqlalchemy" ,python2-sqlalchemy)
11092 ,@(package-native-inputs base))))))
11093
11094 (define-public python-nautilus
11095 (package
11096 (name "python-nautilus")
11097 (version "0.4.9")
11098 (source
11099 (origin
11100 (method url-fetch)
11101 (uri (pypi-uri "nautilus" version))
11102 (sha256
11103 (base32
11104 "01hwzjc1zshk4vvxrcghm398fpy4jls66dyz06g07mrwqif8878p"))))
11105 (build-system python-build-system)
11106 (arguments `(#:tests? #f)) ; fails to import test modules
11107 (native-inputs
11108 `(("python-setuptools" ,python-setuptools)))
11109 (inputs
11110 `(("python-bcrypt" ,python-bcrypt)
11111 ("python-click" ,python-click)
11112 ("python-consul" ,python-consul)
11113 ("python-graphql-core" ,python-graphql-core)
11114 ("python-graphql-relay" ,python-graphql-relay)
11115 ("python-graphene" ,python-graphene)
11116 ("python-jinja2" ,python-jinja2)
11117 ("python-nose2" ,python-nose2)
11118 ("python-peewee" ,python-peewee)
11119 ("python-pika" ,python-pika)
11120 ("python-pycparser" ,python-pycparser)
11121 ("python-requests" ,python-requests)
11122 ("python-tornado" ,python-tornado)
11123 ("python-wtforms" ,python-wtforms)))
11124 (home-page "https://github.com/AlecAivazis/nautilus")
11125 (synopsis "Library for creating microservice applications")
11126 (description
11127 "Nautilus is a framework for flux based microservices that looks to
11128 provide extendible implementations of common aspects of a cloud so that you can
11129 focus on building massively scalable web applications.")
11130 (license license:expat)))
11131
11132 (define-public python-betamax
11133 (package
11134 (name "python-betamax")
11135 (version "0.8.0")
11136 (source
11137 (origin
11138 (method url-fetch)
11139 (uri (pypi-uri "betamax" version))
11140 (sha256
11141 (base32
11142 "18f8v5gng3j773jlbbzx4rg1i4y2zw3m2l1zpmbvp8bh5a2q1i42"))))
11143 (build-system python-build-system)
11144 (arguments
11145 '(;; Many tests fail because they require networking.
11146 #:tests? #f))
11147 (inputs
11148 `(("python-requests" ,python-requests)))
11149 (home-page "https://github.com/sigmavirus24/betamax")
11150 (synopsis "Record HTTP interactions with python-requests")
11151 (description "Betamax will record your test suite's HTTP interactions and
11152 replay them during future tests. It is designed to work with python-requests.")
11153 (license license:expat)
11154 (properties `((python2-variant . ,(delay python2-betamax))))))
11155
11156 (define-public python2-betamax
11157 (let ((base (package-with-python2 (strip-python2-variant python-betamax))))
11158 (package
11159 (inherit base)
11160 (native-inputs
11161 `(("python2-setuptools" ,python2-setuptools)
11162 ,@(package-native-inputs base))))))