gnu: python-pandas: Fix build.
[jackhill/guix/guix.git] / gnu / packages / python.scm
1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2013 Nikita Karetnikov <nikita@karetnikov.org>
3 ;;; Copyright © 2013, 2014, 2015, 2016 Ludovic Courtès <ludo@gnu.org>
4 ;;; Copyright © 2013, 2014, 2015, 2016 Andreas Enge <andreas@enge.fr>
5 ;;; Copyright © 2014, 2015 Mark H Weaver <mhw@netris.org>
6 ;;; Copyright © 2014 Eric Bavier <bavier@member.fsf.org>
7 ;;; Copyright © 2014, 2015 Federico Beffa <beffa@fbengineering.ch>
8 ;;; Copyright © 2015 Omar Radwan <toxemicsquire4@gmail.com>
9 ;;; Copyright © 2015 Pierre-Antoine Rault <par@rigelk.eu>
10 ;;; Copyright © 2015, 2016 Ricardo Wurmus <rekado@elephly.net>
11 ;;; Copyright © 2015, 2016 Christopher Allan Webber <cwebber@dustycloud.org>
12 ;;; Copyright © 2015 Eric Dvorsak <eric@dvorsak.fr>
13 ;;; Copyright © 2015, 2016 David Thompson <davet@gnu.org>
14 ;;; Copyright © 2015, 2016 Leo Famulari <leo@famulari.name>
15 ;;; Copyright © 2015 Ben Woodcroft <donttrustben@gmail.com>
16 ;;; Copyright © 2015, 2016 Erik Edrosa <erik.edrosa@gmail.com>
17 ;;; Copyright © 2015, 2016 Efraim Flashner <efraim@flashner.co.il>
18 ;;; Copyright © 2015 Kyle Meyer <kyle@kyleam.com>
19 ;;; Copyright © 2015, 2016 Chris Marusich <cmmarusich@gmail.com>
20 ;;; Copyright © 2016 Danny Milosavljevic <dannym+a@scratchpost.org>
21 ;;; Copyright © 2016 Lukas Gradl <lgradl@openmailbox.org>
22 ;;; Copyright © 2016 Hartmut Goebel <h.goebel@crazy-compilers.com>
23 ;;; Copyright © 2016 Daniel Pimentel <d4n1@d4n1.org>
24 ;;; Copyright © 2016 Sou Bunnbu <iyzsong@gmail.com>
25 ;;; Copyright © 2016 Troy Sankey <sankeytms@gmail.com>
26 ;;; Copyright © 2016 ng0 <ng0@we.make.ritual.n0.is>
27 ;;; Copyright © 2016 Dylan Jeffers <sapientech@sapientech@openmailbox.org>
28 ;;; Copyright © 2016 David Craven <david@craven.ch>
29 ;;; Copyright © 2016 Marius Bakke <mbakke@fastmail.com>
30 ;;; Copyright © 2016 Stefan Reichoer <stefan@xsteve.at>
31 ;;; Copyright © 2016 Dylan Jeffers <sapientech@sapientech@openmailbox.org>
32 ;;; Copyright © 2016 Alex Vong <alexvong1995@gmail.com>
33 ;;; Copyright © 2016 Arun Isaac <arunisaac@systemreboot.net>
34 ;;;
35 ;;; This file is part of GNU Guix.
36 ;;;
37 ;;; GNU Guix is free software; you can redistribute it and/or modify it
38 ;;; under the terms of the GNU General Public License as published by
39 ;;; the Free Software Foundation; either version 3 of the License, or (at
40 ;;; your option) any later version.
41 ;;;
42 ;;; GNU Guix is distributed in the hope that it will be useful, but
43 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
44 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
45 ;;; GNU General Public License for more details.
46 ;;;
47 ;;; You should have received a copy of the GNU General Public License
48 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
49
50 (define-module (gnu packages python)
51 #:use-module ((guix licenses) #:prefix license:)
52 #:use-module (gnu packages)
53 #:use-module (gnu packages algebra)
54 #:use-module (gnu packages adns)
55 #:use-module (gnu packages attr)
56 #:use-module (gnu packages backup)
57 #:use-module (gnu packages bash)
58 #:use-module (gnu packages compression)
59 #:use-module (gnu packages databases)
60 #:use-module (gnu packages django)
61 #:use-module (gnu packages file)
62 #:use-module (gnu packages fontutils)
63 #:use-module (gnu packages gcc)
64 #:use-module (gnu packages ghostscript)
65 #:use-module (gnu packages gl)
66 #:use-module (gnu packages glib)
67 #:use-module (gnu packages gstreamer)
68 #:use-module (gnu packages gtk)
69 #:use-module (gnu packages icu4c)
70 #:use-module (gnu packages image)
71 #:use-module (gnu packages imagemagick)
72 #:use-module (gnu packages libevent)
73 #:use-module (gnu packages libffi)
74 #:use-module (gnu packages linux)
75 #:use-module (gnu packages maths)
76 #:use-module (gnu packages multiprecision)
77 #:use-module (gnu packages networking)
78 #:use-module (gnu packages ncurses)
79 #:use-module (gnu packages openstack)
80 #:use-module (gnu packages password-utils)
81 #:use-module (gnu packages pcre)
82 #:use-module (gnu packages perl)
83 #:use-module (gnu packages pkg-config)
84 #:use-module (gnu packages protobuf)
85 #:use-module (gnu packages readline)
86 #:use-module (gnu packages sdl)
87 #:use-module (gnu packages statistics)
88 #:use-module (gnu packages tex)
89 #:use-module (gnu packages texinfo)
90 #:use-module (gnu packages tls)
91 #:use-module (gnu packages version-control)
92 #:use-module (gnu packages video)
93 #:use-module (gnu packages web)
94 #:use-module (gnu packages base)
95 #:use-module (gnu packages xml)
96 #:use-module (gnu packages xorg)
97 #:use-module (gnu packages xdisorg)
98 #:use-module (gnu packages zip)
99 #:use-module (gnu packages tcl)
100 #:use-module (gnu packages bdw-gc)
101 #:use-module (guix packages)
102 #:use-module (guix download)
103 #:use-module (guix git-download)
104 #:use-module (guix utils)
105 #:use-module (guix build-system gnu)
106 #:use-module (guix build-system cmake)
107 #:use-module (guix build-system python)
108 #:use-module (guix build-system trivial)
109 #:use-module (srfi srfi-1))
110
111 (define-public python-2.7
112 (package
113 (name "python")
114 (version "2.7.12")
115 (source
116 (origin
117 (method url-fetch)
118 (uri (string-append "https://www.python.org/ftp/python/"
119 version "/Python-" version ".tar.xz"))
120 (sha256
121 (base32
122 "0y7rl603vmwlxm6ilkhc51rx2mfj14ckcz40xxgs0ljnvlhp30yp"))
123 (patches (search-patches "python-2.7-search-paths.patch"
124 "python-2-deterministic-build-info.patch"
125 "python-2.7-site-prefixes.patch"
126 "python-2.7-source-date-epoch.patch"))
127 (modules '((guix build utils)))
128 ;; suboptimal to delete failing tests here, but if we delete them in the
129 ;; arguments then we need to make sure to strip out that phase when it
130 ;; gets inherited by python and python-minimal.
131 (snippet
132 '(begin
133 (for-each delete-file
134 '("Lib/test/test_compileall.py"
135 "Lib/test/test_ctypes.py" ; fails on mips64el
136 "Lib/test/test_distutils.py"
137 "Lib/test/test_import.py"
138 "Lib/test/test_shutil.py"
139 "Lib/test/test_socket.py"
140 "Lib/test/test_subprocess.py"))
141 #t))))
142 (outputs '("out"
143 "tk")) ;tkinter; adds 50 MiB to the closure
144 (build-system gnu-build-system)
145 (arguments
146 `(;; 356 tests OK.
147 ;; 6 tests failed:
148 ;; test_compileall test_distutils test_import test_shutil test_socket
149 ;; test_subprocess
150 ;; 39 tests skipped:
151 ;; test_aepack test_al test_applesingle test_bsddb test_bsddb185
152 ;; test_bsddb3 test_cd test_cl test_codecmaps_cn test_codecmaps_hk
153 ;; test_codecmaps_jp test_codecmaps_kr test_codecmaps_tw test_curses
154 ;; test_dl test_gdb test_gl test_imageop test_imgfile test_ioctl
155 ;; test_kqueue test_linuxaudiodev test_macos test_macostools
156 ;; test_msilib test_ossaudiodev test_scriptpackages test_smtpnet
157 ;; test_socketserver test_startfile test_sunaudiodev test_timeout
158 ;; test_tk test_ttk_guionly test_urllib2net test_urllibnet
159 ;; test_winreg test_winsound test_zipfile64
160 ;; 4 skips unexpected on linux2:
161 ;; test_bsddb test_bsddb3 test_gdb test_ioctl
162 #:test-target "test"
163 #:configure-flags
164 (list "--enable-shared" ;allow embedding
165 "--with-system-ffi" ;build ctypes
166 "--with-ensurepip=install" ;install pip and setuptools
167 (string-append "LDFLAGS=-Wl,-rpath="
168 (assoc-ref %outputs "out") "/lib"))
169
170 #:modules ((ice-9 ftw) (ice-9 match)
171 (guix build utils) (guix build gnu-build-system))
172 #:phases
173 (modify-phases %standard-phases
174 (add-before
175 'configure 'patch-lib-shells
176 (lambda _
177 ;; Filter for existing files, since some may not exist in all
178 ;; versions of python that are built with this recipe.
179 (substitute* (filter file-exists?
180 '("Lib/subprocess.py"
181 "Lib/popen2.py"
182 "Lib/distutils/tests/test_spawn.py"
183 "Lib/test/test_subprocess.py"))
184 (("/bin/sh") (which "sh")))
185
186 ;; Use zero as the timestamp in .pyc files so that builds are
187 ;; deterministic. TODO: Remove it when this variable is set in
188 ;; gnu-build-system.scm.
189 (setenv "SOURCE_DATE_EPOCH" "1")
190 #t))
191 (add-before 'configure 'do-not-record-configure-flags
192 (lambda* (#:key configure-flags #:allow-other-keys)
193 ;; Remove configure flags from the installed '_sysconfigdata.py'
194 ;; and 'Makefile' so we don't end up keeping references to the
195 ;; build tools.
196 ;;
197 ;; Preserve at least '--with-system-ffi' since otherwise the
198 ;; thing tries to build libffi, fails, and we end up with a
199 ;; Python that lacks ctypes.
200 (substitute* "configure"
201 (("^CONFIG_ARGS=.*$")
202 (format #f "CONFIG_ARGS='~a'\n"
203 (if (member "--with-system-ffi" configure-flags)
204 "--with-system-ffi"
205 ""))))
206 #t))
207 (add-before
208 'check 'pre-check
209 (lambda _
210 ;; 'Lib/test/test_site.py' needs a valid $HOME
211 (setenv "HOME" (getcwd))
212 #t))
213 (add-after
214 'unpack 'set-source-file-times-to-1980
215 ;; XXX One of the tests uses a ZIP library to pack up some of the
216 ;; source tree, and fails with "ZIP does not support timestamps
217 ;; before 1980". Work around this by setting the file times in the
218 ;; source tree to sometime in early 1980.
219 (lambda _
220 (let ((circa-1980 (* 10 366 24 60 60)))
221 (ftw "." (lambda (file stat flag)
222 (utime file circa-1980 circa-1980)
223 #t))
224 #t)))
225 (add-after 'install 'remove-tests
226 ;; Remove 25 MiB of unneeded unit tests. Keep test_support.*
227 ;; because these files are used by some libraries out there.
228 (lambda* (#:key outputs #:allow-other-keys)
229 (let ((out (assoc-ref outputs "out")))
230 (match (scandir (string-append out "/lib")
231 (lambda (name)
232 (string-prefix? "python" name)))
233 ((pythonX.Y)
234 (let ((testdir (string-append out "/lib/" pythonX.Y
235 "/test")))
236 (with-directory-excursion testdir
237 (for-each delete-file-recursively
238 (scandir testdir
239 (match-lambda
240 ((or "." "..") #f)
241 (file
242 (not
243 (string-prefix? "test_support."
244 file))))))
245 (call-with-output-file "__init__.py" (const #t))
246 #t)))))))
247 (add-before 'strip 'make-libraries-writable
248 (lambda* (#:key outputs #:allow-other-keys)
249 ;; Make .so files writable so they can be stripped.
250 (let ((out (assoc-ref outputs "out")))
251 (for-each (lambda (file)
252 (chmod file #o755))
253 (find-files (string-append out "/lib")
254 "\\.so"))
255 #t)))
256 (add-after 'install 'move-tk-inter
257 (lambda* (#:key outputs #:allow-other-keys)
258 ;; When Tkinter support is built move it to a separate output so
259 ;; that the main output doesn't contain a reference to Tcl/Tk.
260 (let ((out (assoc-ref outputs "out"))
261 (tk (assoc-ref outputs "tk")))
262 (when tk
263 (match (find-files out "tkinter.*\\.so")
264 ((tkinter.so)
265 ;; The .so is in OUT/lib/pythonX.Y/lib-dynload, but we
266 ;; want it under TK/lib/pythonX.Y/site-packages.
267 (let* ((len (string-length out))
268 (target (string-append
269 tk "/"
270 (string-drop
271 (dirname (dirname tkinter.so))
272 len)
273 "/site-packages")))
274 (install-file tkinter.so target)
275 (delete-file tkinter.so)))))
276 #t))))))
277 (inputs
278 `(("bzip2" ,bzip2)
279 ("gdbm" ,gdbm)
280 ("libffi" ,libffi) ; for ctypes
281 ("sqlite" ,sqlite) ; for sqlite extension
282 ("openssl" ,openssl)
283 ("readline" ,readline)
284 ("zlib" ,zlib)
285 ("tcl" ,tcl)
286 ("tk" ,tk))) ; for tkinter
287 (native-inputs
288 `(("pkg-config" ,pkg-config)))
289 (native-search-paths
290 (list (search-path-specification
291 (variable "PYTHONPATH")
292 (files '("lib/python2.7/site-packages")))))
293 (home-page "https://www.python.org")
294 (synopsis "High-level, dynamically-typed programming language")
295 (description
296 "Python is a remarkably powerful dynamic programming language that
297 is used in a wide variety of application domains. Some of its key
298 distinguishing features include: clear, readable syntax; strong
299 introspection capabilities; intuitive object orientation; natural
300 expression of procedural code; full modularity, supporting hierarchical
301 packages; exception-based error handling; and very high level dynamic
302 data types.")
303 (license license:psfl)))
304
305 ;; Current 2.x version.
306 (define-public python-2 python-2.7)
307
308 (define-public python-3.5
309 (package (inherit python-2)
310 (version "3.5.2")
311 (source (origin
312 (method url-fetch)
313 (uri (string-append "https://www.python.org/ftp/python/"
314 version "/Python-" version ".tar.xz"))
315 (patches (search-patches
316 "python-fix-tests.patch"
317 "python-3.5-fix-tests.patch"
318 "python-3-deterministic-build-info.patch"
319 "python-3-search-paths.patch"))
320 (patch-flags '("-p0"))
321 (sha256
322 (base32
323 "0h6a5fr7ram2s483lh0pnmc4ncijb8llnpfdxdcl5dxr01hza400"))))
324 (arguments (substitute-keyword-arguments (package-arguments python-2)
325 ((#:tests? _) #t)))
326 (native-search-paths
327 (list (search-path-specification
328 (variable "PYTHONPATH")
329 (files (list (string-append "lib/python"
330 (version-major+minor version)
331 "/site-packages"))))))))
332
333 (define-public python-3.4
334 (package (inherit python-3.5)
335 (version "3.4.5")
336 (source (origin
337 (method url-fetch)
338 (uri (string-append "https://www.python.org/ftp/python/"
339 version "/Python-" version ".tar.xz"))
340 (patches (search-patches
341 "python-fix-tests.patch"
342 "python-3.4-fix-tests.patch"
343 "python-3-deterministic-build-info.patch"
344 "python-3-search-paths.patch"))
345 (patch-flags '("-p0"))
346 (sha256
347 (base32
348 "12l9klp778wklxmckhghniy5hklss8r26995pyd00qbllk4b2r7f"))))))
349
350 ;; Current 3.x version.
351 (define-public python-3 python-3.5)
352
353 ;; Current major version.
354 (define-public python python-3)
355
356 ;; Minimal variants of Python, mostly used to break the cycle between Tk and
357 ;; Python (Tk -> libxcb -> Python.)
358
359 (define-public python2-minimal
360 (package (inherit python-2)
361 (name "python-minimal")
362 (outputs '("out"))
363 (arguments
364 (substitute-keyword-arguments (package-arguments python-2)
365 ((#:configure-flags cf)
366 `(append ,cf '("--without-system-ffi")))))
367 (inputs '()))) ;none of the optional dependencies
368
369 (define-public python-minimal
370 (package (inherit python)
371 (name "python-minimal")
372 (outputs '("out"))
373
374 ;; Build fails due to missing ctypes without libffi.
375 ;; OpenSSL is a mandatory dependency of Python 3.x, for urllib;
376 ;; zlib is required by 'zipimport', used by pip.
377 (inputs `(("libffi" ,libffi)
378 ("openssl" ,openssl)
379 ("zlib" ,zlib)))))
380
381 (define* (wrap-python3 python
382 #:optional
383 (name (string-append (package-name python) "-wrapper")))
384 (package (inherit python)
385 (name name)
386 (source #f)
387 (build-system trivial-build-system)
388 (outputs '("out"))
389 (inputs `(("bash" ,bash)))
390 (propagated-inputs `(("python" ,python)))
391 (arguments
392 `(#:modules ((guix build utils))
393 #:builder
394 (begin
395 (use-modules (guix build utils))
396 (let ((bin (string-append (assoc-ref %outputs "out") "/bin"))
397 (python (string-append (assoc-ref %build-inputs "python") "/bin/")))
398 (mkdir-p bin)
399 (for-each
400 (lambda (old new)
401 (symlink (string-append python old)
402 (string-append bin "/" new)))
403 `("python3" ,"pydoc3" ,"idle3" ,"pip3")
404 `("python" ,"pydoc" ,"idle" ,"pip"))
405 ;; python-config outputs search paths based upon its location,
406 ;; use a bash wrapper to avoid changing its outputs.
407 (let ((bash (string-append (assoc-ref %build-inputs "bash")
408 "/bin/bash"))
409 (old (string-append python "python3-config"))
410 (new (string-append bin "/python-config")))
411 (with-output-to-file new
412 (lambda ()
413 (format #t "#!~a~%" bash)
414 (format #t "exec \"~a\" \"$@\"~%" old)
415 (chmod new #o755)
416 #t)))))))
417 (synopsis "Wrapper for the Python 3 commands")
418 (description
419 "This package provides wrappers for the commands of Python@tie{}3.x such
420 that they can be invoked under their usual name---e.g., @command{python}
421 instead of @command{python3}.")))
422
423 (define-public python-wrapper (wrap-python3 python))
424 (define-public python-minimal-wrapper (wrap-python3 python-minimal))
425
426 (define-public python-psutil
427 (package
428 (name "python-psutil")
429 (version "4.3.0")
430 (source
431 (origin
432 (method url-fetch)
433 (uri (pypi-uri "psutil" version))
434 (sha256
435 (base32
436 "1w4r09fvn6kd80m5mx4ws1wz100brkaq6hzzpwrns8cgjzjpl6c6"))))
437 (build-system python-build-system)
438 (home-page "https://www.github.com/giampaolo/psutil")
439 (synopsis "Library for retrieving information on running processes")
440 (description
441 "psutil (Python system and process utilities) is a library for retrieving
442 information on running processes and system utilization (CPU, memory, disks,
443 network) in Python. It is useful mainly for system monitoring, profiling and
444 limiting process resources and management of running processes. It implements
445 many functionalities offered by command line tools such as: ps, top, lsof,
446 netstat, ifconfig, who, df, kill, free, nice, ionice, iostat, iotop, uptime,
447 pidof, tty, taskset, pmap.")
448 (license license:bsd-3)))
449
450 (define-public python2-psutil
451 (package-with-python2 python-psutil))
452
453 (define-public python-passlib
454 (package
455 (name "python-passlib")
456 (version "1.6.5")
457 (source
458 (origin
459 (method url-fetch)
460 (uri (pypi-uri "passlib" version))
461 (sha256
462 (base32
463 "1z27wdxs5rj5xhhqfzvzn3yg682irkxw6dcs5jj7mcf97psk8gd8"))))
464 (build-system python-build-system)
465 (native-inputs
466 `(("python-nose" ,python-nose)))
467 (propagated-inputs
468 `(("python-py-bcrypt" ,python-py-bcrypt)))
469 (arguments
470 `(#:phases
471 (alist-cons-before
472 'check 'set-PYTHON_EGG_CACHE
473 ;; some tests require access to "$HOME/.cython"
474 (lambda* _ (setenv "PYTHON_EGG_CACHE" "/tmp"))
475 %standard-phases)))
476 (home-page "https://bitbucket.org/ecollins/passlib")
477 (synopsis
478 "Comprehensive password hashing framework")
479 (description
480 "Passlib is a password hashing library for Python 2 & 3, which provides
481 cross-platform implementations of over 30 password hashing algorithms, as well
482 as a framework for managing existing password hashes. It's designed to be
483 useful for a wide range of tasks, from verifying a hash found in /etc/shadow,
484 to providing full-strength password hashing for multi-user application.")
485 (license license:bsd-3)))
486
487 (define-public python2-passlib
488 (package-with-python2 python-passlib))
489
490 (define-public python-py-bcrypt
491 (package
492 (name "python-py-bcrypt")
493 (version "0.4")
494 (source
495 (origin
496 (method url-fetch)
497 (uri (string-append
498 "https://pypi.python.org/packages/source/p/py-bcrypt/py-bcrypt-"
499 version
500 ".tar.gz"))
501 (sha256
502 (base32
503 "0y6smdggwi5s72v6p1nn53dg6w05hna3d264cq6kas0lap73p8az"))))
504 (build-system python-build-system)
505 (home-page "https://code.google.com/p/py-bcrypt")
506 (synopsis
507 "Bcrypt password hashing and key derivation")
508 (description
509 "A python wrapper of OpenBSD's Blowfish password hashing code. This
510 system hashes passwords using a version of Bruce Schneier's Blowfish block
511 cipher with modifications designed to raise the cost of off-line password
512 cracking and frustrate fast hardware implementation. The computation cost of
513 the algorithm is parametised, so it can be increased as computers get faster.
514 The intent is to make a compromise of a password database less likely to
515 result in an attacker gaining knowledge of the plaintext passwords (e.g. using
516 John the Ripper).")
517 ;; "sha2.c" is under BSD-3;
518 ;; "blowfish.c" and "bcrypt.c" are under BSD-4;
519 ;; the rest is under ISC.
520 (license (list license:isc license:bsd-3 license:bsd-4))))
521
522 (define-public python2-py-bcrypt
523 (package-with-python2 python-py-bcrypt))
524
525
526 (define-public python-paramiko
527 (package
528 (name "python-paramiko")
529 (version "1.16.0")
530 (source
531 (origin
532 (method url-fetch)
533 (uri (pypi-uri "paramiko" version))
534 (sha256
535 (base32
536 "14k8z7ndc3zk5xivnm4d8lncchx475ll5izpf8vmfbq7rp9yp5rj"))))
537 (build-system python-build-system)
538 (propagated-inputs
539 `(("python-pycrypto" ,python-pycrypto)
540 ("python-ecdsa" ,python-ecdsa)))
541 (home-page "http://www.paramiko.org/")
542 (synopsis "SSHv2 protocol library")
543 (description "Paramiko is a python implementation of the SSHv2 protocol,
544 providing both client and server functionality. While it leverages a Python C
545 extension for low level cryptography (PyCrypto), Paramiko itself is a pure
546 Python interface around SSH networking concepts.")
547 (license license:lgpl2.1+)))
548
549 (define-public python2-paramiko
550 (package-with-python2 python-paramiko))
551
552
553 (define-public python-httplib2
554 (package
555 (name "python-httplib2")
556 (version "0.9.2")
557 (source
558 (origin
559 (method url-fetch)
560 (uri (pypi-uri "httplib2" version))
561 (sha256
562 (base32
563 "126rsryvw9vhbf3qmsfw9lf4l4xm2srmgs439lgma4cpag4s3ay3"))))
564 (build-system python-build-system)
565 (home-page "https://github.com/jcgregorio/httplib2")
566 (synopsis "Comprehensive HTTP client library")
567 (description
568 "A comprehensive HTTP client library supporting many features left out of
569 other HTTP libraries.")
570 (license license:expat)))
571
572 (define-public python2-httplib2
573 (package-with-python2 python-httplib2))
574
575 (define-public python-ecdsa
576 (package
577 (name "python-ecdsa")
578 (version "0.13")
579 (source
580 (origin
581 (method url-fetch)
582 (uri (string-append
583 "https://pypi.python.org/packages/source/e/ecdsa/ecdsa-"
584 version
585 ".tar.gz"))
586 (sha256
587 (base32
588 "1yj31j0asmrx4an9xvsaj2icdmzy6pw0glfpqrrkrphwdpi1xkv4"))))
589 (build-system python-build-system)
590 (inputs
591 `(("openssl" ,openssl)))
592 (home-page
593 "http://github.com/warner/python-ecdsa")
594 (synopsis
595 "ECDSA cryptographic signature library (pure python)")
596 (description
597 "This is an easy-to-use implementation of ECDSA cryptography (Elliptic
598 Curve Digital Signature Algorithm), implemented purely in Python. With this
599 library, you can quickly create keypairs (signing key and verifying key), sign
600 messages, and verify the signatures. The keys and signatures are very short,
601 making them easy to handle and incorporate into other protocols.")
602 (license license:expat)))
603
604 (define-public python2-ecdsa
605 (package-with-python2 python-ecdsa))
606
607 (define-public python-ccm
608 (package
609 (name "python-ccm")
610 (version "2.1.6")
611 (source
612 (origin
613 (method url-fetch)
614 (uri (pypi-uri "ccm" version))
615 (sha256
616 (base32
617 "177dfxsmk3k4cih6fh6v8d91bh4nqx7ns6pc07w7m7i3cvdx3c8n"))))
618 (build-system python-build-system)
619 (propagated-inputs
620 `(("python-pyyaml" ,python-pyyaml)
621 ;; Not listed in setup.py, but used in ccmlib/node.py for full
622 ;; functionality
623 ("python-psutil" ,python-psutil)
624 ("python-six" ,python-six)))
625 (home-page "https://github.com/pcmanus/ccm")
626 (synopsis "Cassandra Cluster Manager for Apache Cassandra clusters on
627 localhost")
628 (description "Cassandra Cluster Manager is a development tool for testing
629 local Cassandra clusters. It creates, launches and removes Cassandra clusters
630 on localhost.")
631 (license license:asl2.0)))
632
633 (define-public python2-ccm
634 (package-with-python2 python-ccm))
635
636 (define-public python-pytz
637 (package
638 (name "python-pytz")
639 (version "2016.3")
640 (source
641 (origin
642 (method url-fetch)
643 (uri (pypi-uri "pytz" version ".tar.bz2"))
644 (sha256
645 (base32
646 "1mjmrkk4vc5xzppw7fm0pli1nnbj57cvqv7jjv5whcmccyhxz4y1"))))
647 (build-system python-build-system)
648 (arguments `(#:tests? #f)) ; no test target
649 (home-page "http://pythonhosted.org/pytz")
650 (synopsis "Python timezone library")
651 (description
652 "This library allows accurate and cross platform timezone calculations
653 using Python 2.4 or higher and provides access to the Olson timezone database.")
654 (license license:expat)))
655
656 (define-public python2-pytz
657 (package-with-python2 python-pytz))
658
659
660 (define-public python-babel
661 (package
662 (name "python-babel")
663 (version "2.3.2")
664 (source
665 (origin
666 (method url-fetch)
667 (uri (pypi-uri "Babel" version))
668 (sha256
669 (base32
670 "0k43pi0p1dwpds2w0km3fw92wixzxv2vw7p09capxmjz5cfh23lw"))))
671 (build-system python-build-system)
672 (propagated-inputs
673 `(("python-pytz" ,python-pytz)))
674 (arguments `(#:tests? #f)) ; no test target
675 (home-page "http://babel.pocoo.org/")
676 (synopsis
677 "Tools for internationalizing Python applications")
678 (description
679 "Babel is composed of two major parts:
680 - tools to build and work with gettext message catalogs
681 - a Python interface to the CLDR (Common Locale Data Repository), providing
682 access to various locale display names, localized number and date formatting,
683 etc. ")
684 (license license:bsd-3)))
685
686 (define-public python2-babel
687 (package-with-python2 python-babel))
688
689 (define-public python2-backport-ssl-match-hostname
690 (package
691 (name "python2-backport-ssl-match-hostname")
692 (version "3.5.0.1")
693 (source
694 (origin
695 (method url-fetch)
696 (uri (string-append
697 "https://pypi.python.org/packages/source/b/"
698 "backports.ssl_match_hostname/backports.ssl_match_hostname-"
699 version ".tar.gz"))
700 (sha256
701 (base32
702 "1wndipik52cyqy0677zdgp90i435pmvwd89cz98lm7ri0y3xjajh"))))
703 (build-system python-build-system)
704 (arguments
705 `(#:python ,python-2
706 #:tests? #f)) ; no test target
707 (home-page "https://bitbucket.org/brandon/backports.ssl_match_hostname")
708 (synopsis "Backport of ssl.match_hostname() function from Python 3.5")
709 (description
710 "This backport brings the ssl.match_hostname() function to users of
711 earlier versions of Python. The function checks the hostname in the
712 certificate returned by the server to which a connection has been established,
713 and verifies that it matches the intended target hostname.")
714 (license license:psfl)))
715
716 (define-public python-h5py
717 (package
718 (name "python-h5py")
719 (version "2.6.0")
720 (source
721 (origin
722 (method url-fetch)
723 (uri (pypi-uri "h5py" version))
724 (sha256
725 (base32
726 "0df46dg7i7xfking9lp221bfm8dbl974yvlrbi1w7r6m61ac7bxj"))))
727 (build-system python-build-system)
728 (arguments
729 `(#:tests? #f ; no test target
730 #:phases
731 (modify-phases %standard-phases
732 (add-after 'unpack 'fix-hdf5-paths
733 (lambda* (#:key inputs #:allow-other-keys)
734 (let ((prefix (assoc-ref inputs "hdf5")))
735 (substitute* "setup_build.py"
736 (("\\['/opt/local/lib', '/usr/local/lib'\\]")
737 (string-append "['" prefix "/lib" "']"))
738 (("'/opt/local/include', '/usr/local/include'")
739 (string-append "'" prefix "/include" "'")))
740 (substitute* "setup_configure.py"
741 (("\\['/usr/local/lib', '/opt/local/lib'\\]")
742 (string-append "['" prefix "/lib" "']")))
743 #t))))))
744 (propagated-inputs
745 `(("python-six" ,python-six)
746 ("python-numpy" ,python-numpy)))
747 (inputs
748 `(("hdf5" ,hdf5)))
749 (native-inputs
750 `(("python-cython" ,python-cython)
751 ("python-pkgconfig" ,python-pkgconfig)))
752 (home-page "http://www.h5py.org/")
753 (synopsis "Read and write HDF5 files from Python")
754 (description
755 "The h5py package provides both a high- and low-level interface to the
756 HDF5 library from Python. The low-level interface is intended to be a
757 complete wrapping of the HDF5 API, while the high-level component supports
758 access to HDF5 files, datasets and groups using established Python and NumPy
759 concepts.")
760 (license license:bsd-3)))
761
762 (define-public python2-h5py
763 (package-with-python2 python-h5py))
764
765 (define-public python-lockfile
766 (package
767 (name "python-lockfile")
768 (version "0.12.2")
769 (source
770 (origin
771 (method url-fetch)
772 (uri (string-append "https://pypi.python.org/packages/source/l/lockfile/"
773 "lockfile-" version ".tar.gz"))
774 (sha256
775 (base32
776 "16gpx5hm73ah5n1079ng0vy381hl802v606npkx4x8nb0gg05vba"))))
777 (build-system python-build-system)
778 (arguments '(#:test-target "check"))
779 (native-inputs
780 `(("python-pbr" ,python-pbr)))
781 (home-page "https://launchpad.net/pylockfile")
782 (synopsis "Platform-independent file locking module")
783 (description
784 "The lockfile package exports a LockFile class which provides a simple
785 API for locking files.")
786 (license license:expat)))
787
788 (define-public python2-lockfile
789 (package-with-python2 python-lockfile))
790
791 (define-public python-mock
792 (package
793 (name "python-mock")
794 (version "1.0.1")
795 (source
796 (origin
797 (method url-fetch)
798 (uri (string-append "https://pypi.python.org/packages/source/m/mock/"
799 "mock-" version ".tar.gz"))
800 (sha256
801 (base32
802 "0kzlsbki6q0awf89rc287f3aj8x431lrajf160a70z0ikhnxsfdq"))))
803 (build-system python-build-system)
804 (arguments '(#:test-target "check"))
805 (home-page "http://code.google.com/p/mock/")
806 (synopsis "Python mocking and patching library for testing")
807 (description
808 "Mock is a library for testing in Python. It allows you to replace parts
809 of your system under test with mock objects and make assertions about how they
810 have been used.")
811 (license license:expat)))
812
813 (define-public python2-mock
814 (package-with-python2 python-mock))
815
816
817 (define-public python-setuptools
818 (package
819 (name "python-setuptools")
820 (version "18.3.1")
821 (source
822 (origin
823 (method url-fetch)
824 (uri (string-append "https://pypi.python.org/packages/source/s/setuptools/setuptools-"
825 version ".tar.gz"))
826 (sha256
827 (base32
828 "0kc7rbav00ks6iaw14p38y81q12fx0lpkhgf5m97xc04f5r318ig"))))
829 (build-system python-build-system)
830 ;; FIXME: Tests require pytest, which itself relies on setuptools.
831 ;; One could bootstrap with an internal untested setuptools.
832 (arguments
833 `(#:tests? #f))
834 (home-page "https://pypi.python.org/pypi/setuptools")
835 (synopsis
836 "Library designed to facilitate packaging Python projects")
837 (description
838 "Setuptools is a fully-featured, stable library designed to facilitate
839 packaging Python projects, where packaging includes:
840 Python package and module definitions,
841 distribution package metadata,
842 test hooks,
843 project installation,
844 platform-specific details,
845 Python 3 support.")
846 (license license:psfl)))
847
848 (define-public python2-setuptools
849 (package-with-python2 python-setuptools))
850
851
852 (define-public python-pycrypto
853 (package
854 (name "python-pycrypto")
855 (version "2.6.1")
856 (source
857 (origin
858 (method url-fetch)
859 (uri (string-append "https://pypi.python.org/packages/source/p/"
860 "pycrypto/pycrypto-" version ".tar.gz"))
861 (sha256
862 (base32
863 "0g0ayql5b9mkjam8hym6zyg6bv77lbh66rv1fyvgqb17kfc1xkpj"))))
864 (build-system python-build-system)
865 (inputs
866 `(("python" ,python)
867 ("gmp" ,gmp)))
868 (arguments
869 `(#:phases
870 (alist-cons-before
871 'build 'set-build-env
872 ;; pycrypto runs an autoconf configure script behind the scenes
873 (lambda _
874 (setenv "CONFIG_SHELL" (which "bash")))
875 %standard-phases)))
876 (home-page "http://www.pycrypto.org/")
877 (synopsis "Cryptographic modules for Python")
878 (description
879 "Pycrypto is a collection of both secure hash functions (such as SHA256
880 and RIPEMD160), and various encryption algorithms (AES, DES, RSA, ElGamal,
881 etc.). The package is structured to make adding new modules easy.")
882 (license license:public-domain)))
883
884 (define-public python2-pycrypto
885 (let ((pycrypto (package-with-python2 python-pycrypto)))
886 (package (inherit pycrypto)
887 (inputs
888 `(("python" ,python-2)
889 ,@(alist-delete
890 "python"
891 (package-inputs pycrypto)))))))
892
893 (define-public python-keyring
894 (package
895 (name "python-keyring")
896 (version "8.7")
897 (source
898 (origin
899 (method url-fetch)
900 (uri (pypi-uri "keyring" version))
901 (sha256
902 (base32
903 "0482rmi2x6p78wl2kz8qzyq21xz1sbbfwnv5x7dggar4vkwxhzfx"))))
904 (build-system python-build-system)
905 (native-inputs
906 `(("python-setuptools-scm" ,python-setuptools-scm)))
907 (propagated-inputs
908 `(("python-pycrypto" ,python-pycrypto)))
909 (arguments
910 `(#:tests? #f)) ;TODO: tests require pytest
911 (home-page "https://github.com/jaraco/keyring")
912 (synopsis "Store and access your passwords safely")
913 (description
914 "The Python keyring lib provides a easy way to access the system keyring
915 service from python. It can be used in any application that needs safe
916 password storage.")
917 ;; "MIT" and PSF dual license
918 (license license:x11)))
919
920 (define-public python2-keyring
921 (package-with-python2 python-keyring))
922
923 (define-public python-six
924 (package
925 (name "python-six")
926 (version "1.10.0")
927 (source
928 (origin
929 (method url-fetch)
930 (uri (pypi-uri "six" version))
931 (sha256
932 (base32
933 "0snmb8xffb3vsma0z67i0h0w2g2dy0p3gsgh9gi4i0kgc5l8spqh"))))
934 (build-system python-build-system)
935 (home-page "http://pypi.python.org/pypi/six/")
936 (synopsis "Python 2 and 3 compatibility utilities")
937 (description
938 "Six is a Python 2 and 3 compatibility library. It provides utility
939 functions for smoothing over the differences between the Python versions with
940 the goal of writing Python code that is compatible on both Python versions.
941 Six supports every Python version since 2.5. It is contained in only one
942 Python file, so it can be easily copied into your project.")
943 (license license:x11)))
944
945 (define-public python2-six
946 (package-with-python2 python-six))
947
948 (define-public python-dateutil-2
949 (package
950 (name "python-dateutil")
951 (version "2.5.2")
952 (source
953 (origin
954 (method url-fetch)
955 (uri (pypi-uri "python-dateutil" version))
956 (sha256
957 (base32
958 "0jrfpcgvgya6hs45dhrd9yiqgdgz9qp9aa07zsw8gqgn8zphff86"))))
959 (build-system python-build-system)
960 (propagated-inputs
961 `(("python-six" ,python-six)))
962 (home-page "https://dateutil.readthedocs.io/en/stable/")
963 (synopsis "Extensions to the standard datetime module")
964 (description
965 "The dateutil module provides powerful extensions to the standard
966 datetime module, available in Python 2.3+.")
967 (license license:bsd-3)))
968
969 (define-public python2-dateutil-2
970 (package-with-python2 python-dateutil-2))
971
972 (define-public python-dateutil
973 (package
974 (name "python-dateutil")
975 (version "1.5") ; last version for python < 3
976 (source
977 (origin
978 (method url-fetch)
979 (uri (string-append "http://labix.org/download/python-dateutil/"
980 "python-dateutil-" version ".tar.gz"))
981 (sha256
982 (base32
983 "0fqfglhy5khbvsipr3x7m6bcaqljh8xl5cw33vbfxy7qhmywm2n0"))))
984 (build-system python-build-system)
985 (home-page "https://dateutil.readthedocs.io/en/stable/")
986 (synopsis "Extensions to the standard datetime module")
987 (description
988 "The dateutil module provides powerful extensions to the standard
989 datetime module, available in Python 2.3+.")
990 (license license:psfl)))
991
992 (define-public python2-dateutil
993 (package-with-python2 python-dateutil))
994
995 (define-public python-parsedatetime
996 (package
997 (name "python-parsedatetime")
998 (version "2.1")
999 (source
1000 (origin
1001 (method url-fetch)
1002 (uri (pypi-uri "parsedatetime" version))
1003 (sha256
1004 (base32
1005 "0bdgyw6y3v7bcxlx0p50s8drxsh5bb5cy2afccqr3j90amvpii8p"))))
1006 (build-system python-build-system)
1007 (native-inputs
1008 `(("python-nose" ,python-nose)
1009 ("python-pyicu" ,python-pyicu)))
1010 (home-page "http://github.com/bear/parsedatetime/")
1011 (synopsis
1012 "Parse human-readable date/time text")
1013 (description
1014 "Parse human-readable date/time text.")
1015 (license license:asl2.0)))
1016
1017 (define-public python2-parsedatetime
1018 (package-with-python2 python-parsedatetime))
1019
1020 (define-public python-pandas
1021 (package
1022 (name "python-pandas")
1023 (version "0.18.1")
1024 (source
1025 (origin
1026 (method url-fetch)
1027 (uri (string-append
1028 "https://pypi.python.org/packages/11/09/"
1029 "e66eb844daba8680ddff26335d5b4fead77f60f957678243549a8dd4830d/"
1030 "pandas-" version ".tar.gz"))
1031 (sha256
1032 (base32 "1ckpxrvvjj6zxmn68icd9hib8qcpx9b35f6izxnr25br5ilq7r6j"))))
1033 (build-system python-build-system)
1034 (propagated-inputs
1035 `(("python-numpy" ,python-numpy)
1036 ("python-pytz" ,python-pytz)
1037 ("python-dateutil" ,python-dateutil-2)))
1038 (native-inputs
1039 `(("python-nose" ,python-nose)
1040 ("python-cython" ,python-cython)))
1041 (home-page "http://pandas.pydata.org")
1042 (synopsis "Data structures for data analysis, time series, and statistics")
1043 (description
1044 "Pandas is a Python package providing fast, flexible, and expressive data
1045 structures designed to make working with structured (tabular,
1046 multidimensional, potentially heterogeneous) and time series data both easy
1047 and intuitive. It aims to be the fundamental high-level building block for
1048 doing practical, real world data analysis in Python.")
1049 (license license:bsd-3)))
1050
1051 (define-public python2-pandas
1052 (package-with-python2 python-pandas))
1053
1054 (define-public python-tzlocal
1055 (package
1056 (name "python-tzlocal")
1057 (version "1.2.2")
1058 (source
1059 (origin
1060 (method url-fetch)
1061 (uri (pypi-uri "tzlocal" version))
1062 (sha256
1063 (base32
1064 "0paj7vlsb0np8b5sp4bv64wxv7qk2piyp7xg29pkhdjwsbls9fnb"))))
1065 (build-system python-build-system)
1066 (propagated-inputs
1067 `(("python-pytz" ,python-pytz)))
1068 (home-page "https://github.com/regebro/tzlocal")
1069 (synopsis
1070 "Local timezone information for Python")
1071 (description
1072 "Tzlocal returns a tzinfo object with the local timezone information.
1073 This module attempts to fix a glaring hole in pytz, that there is no way to
1074 get the local timezone information, unless you know the zoneinfo name, and
1075 under several distributions that's hard or impossible to figure out.")
1076 (license license:cc0)))
1077
1078 (define-public python2-pysqlite
1079 (package
1080 (name "python2-pysqlite")
1081 (version "2.8.1")
1082 (source
1083 (origin
1084 (method url-fetch)
1085 (uri (pypi-uri "pysqlite" version))
1086 (sha256
1087 (base32
1088 "0rm0zqyb363y6wljhfmbxs16jjv7p8nk1d8zgq9sdwj6js7y3jkm"))))
1089 (build-system python-build-system)
1090 (inputs
1091 `(("sqlite" ,sqlite)))
1092 (arguments
1093 `(#:python ,python-2 ; incompatible with Python 3
1094 #:tests? #f)) ; no test target
1095 (home-page "http://github.com/ghaering/pysqlite")
1096 (synopsis "SQLite bindings for Python")
1097 (description
1098 "Pysqlite provides SQLite bindings for Python that comply to the
1099 Database API 2.0T.")
1100 (license license:zlib)))
1101
1102
1103 (define-public python2-mechanize
1104 (package
1105 (name "python2-mechanize")
1106 (version "0.2.5")
1107 (source
1108 (origin
1109 (method url-fetch)
1110 (uri (string-append "https://pypi.python.org/packages/source/m/mechanize/mechanize-"
1111 version ".tar.gz"))
1112 (sha256
1113 (base32
1114 "0rj7r166i1dyrq0ihm5rijfmvhs8a04im28lv05c0c3v206v4rrf"))))
1115 (build-system python-build-system)
1116 (arguments
1117 `(#:python ,python-2 ; apparently incompatible with Python 3
1118 #:tests? #f))
1119 ;; test fails with message
1120 ;; AttributeError: 'module' object has no attribute 'test_pullparser'
1121 ;; (python-3.3.2) or
1122 ;; AttributeError: 'module' object has no attribute 'test_urllib2_localnet'
1123 ;; (python-2.7.5).
1124 ;; The source code is from March 2011 and probably not up-to-date
1125 ;; with respect to python unit tests.
1126 (home-page "http://wwwsearch.sourceforge.net/mechanize/")
1127 (synopsis
1128 "Stateful programmatic web browsing in Python")
1129 (description
1130 "Mechanize implements stateful programmatic web browsing in Python,
1131 after Andy Lester’s Perl module WWW::Mechanize.")
1132 (license (license:non-copyleft
1133 "file://COPYING"
1134 "See COPYING in the distribution."))))
1135
1136
1137 (define-public python-simplejson
1138 (package
1139 (name "python-simplejson")
1140 (version "3.8.2")
1141 (source
1142 (origin
1143 (method url-fetch)
1144 (uri (pypi-uri "simplejson" version))
1145 (sha256
1146 (base32
1147 "0zylrnax8b6r0ndgni4w9c599fi6wm9vx5g6k3ddqfj3932kk16m"))))
1148 (build-system python-build-system)
1149 (home-page "http://simplejson.readthedocs.org/en/latest/")
1150 (synopsis
1151 "Json library for Python")
1152 (description
1153 "JSON (JavaScript Object Notation) is a subset of JavaScript
1154 syntax (ECMA-262 3rd edition) used as a lightweight data interchange
1155 format.
1156
1157 Simplejson exposes an API familiar to users of the standard library marshal
1158 and pickle modules. It is the externally maintained version of the json
1159 library contained in Python 2.6, but maintains compatibility with Python 2.5
1160 and (currently) has significant performance advantages, even without using
1161 the optional C extension for speedups. Simplejson is also supported on
1162 Python 3.3+.")
1163 (license license:x11)))
1164
1165 (define-public python2-simplejson
1166 (package-with-python2 python-simplejson))
1167
1168
1169 (define-public python-pyicu
1170 (package
1171 (name "python-pyicu")
1172 (version "1.9.2")
1173 (source
1174 (origin
1175 (method url-fetch)
1176 (uri (string-append "https://pypi.python.org/packages/source/P/PyICU/PyICU-"
1177 version ".tar.gz"))
1178 (sha256
1179 (base32
1180 "1diba0g8md614fvm9yf50paiwdkhj6rd7xwf1rg9mc0pxc0hhn4v"))))
1181 (build-system python-build-system)
1182 (inputs
1183 `(("icu4c" ,icu4c)))
1184 (home-page "http://pyicu.osafoundation.org/")
1185 (synopsis "Python extension wrapping the ICU C++ API")
1186 (description
1187 "PyICU is a python extension wrapping the ICU C++ API.")
1188 (license license:x11)))
1189
1190 (define-public python2-pyicu
1191 (package-with-python2 python-pyicu))
1192
1193 (define-public python2-dogtail
1194 ;; Python 2 only, as it leads to "TabError: inconsistent use of tabs and
1195 ;; spaces in indentation" with Python 3.
1196 (package
1197 (name "python2-dogtail")
1198 (version "0.8.2")
1199 (source (origin
1200 (method url-fetch)
1201 (uri (string-append
1202 "https://fedorahosted.org/released/dogtail/dogtail-"
1203 version ".tar.gz"))
1204 (sha256
1205 (base32
1206 "1yc4cg7ip87z15gyd4wy2vzbywrjc52a3m8r8gqy2b50d65llcg1"))))
1207 (build-system python-build-system)
1208 (arguments `(#:python ,python-2
1209 #:tests? #f)) ; invalid command "test"
1210 (home-page "https://fedorahosted.org/dogtail/")
1211 (synopsis "GUI test tool and automation framework written in ​Python")
1212 (description
1213 "Dogtail is a GUI test tool and automation framework written in Python.
1214 It uses Accessibility (a11y) technologies to communicate with desktop
1215 applications. dogtail scripts are written in Python and executed like any
1216 other Python program.")
1217 (license license:gpl2+)))
1218
1219 (define-public python2-empy
1220 (package
1221 (name "python2-empy")
1222 (version "3.3")
1223 (source (origin
1224 (method url-fetch)
1225 (uri (string-append "http://www.alcyone.com/software/empy/empy-"
1226 version ".tar.gz"))
1227 (sha256
1228 (base32
1229 "01g8mmkfnvjdmlhsihwyx56lrg7r5m5d2fg6mnxsvy6g0dnl69f6"))))
1230 (build-system python-build-system)
1231 (arguments
1232 `(#:python ,python-2
1233 #:phases (alist-replace
1234 'check
1235 (lambda _
1236 (zero? (system* "./test.sh")))
1237 %standard-phases)))
1238 (home-page "http://www.alcyone.com/software/empy/")
1239 (synopsis "Templating system for Python")
1240 (description
1241 "EmPy is a system for embedding Python expressions and statements in
1242 template text; it takes an EmPy source file, processes it, and produces
1243 output. This is accomplished via expansions, which are special signals to the
1244 EmPy system and are set off by a special prefix (by default the at sign, @@).
1245 EmPy can expand arbitrary Python expressions and statements in this way, as
1246 well as a variety of special forms. Textual data not explicitly delimited in
1247 this way is sent unaffected to the output, allowing Python to be used in
1248 effect as a markup language. Also supported are callbacks via hooks,
1249 recording and playback via diversions, and dynamic, chainable filters. The
1250 system is highly configurable via command line options and embedded
1251 commands.")
1252 (license license:lgpl2.1+)))
1253
1254 (define-public python2-element-tree
1255 (package
1256 (name "python2-element-tree")
1257 (version "1.2.6")
1258 (source (origin
1259 (method url-fetch)
1260 (uri (string-append
1261 "http://effbot.org/media/downloads/elementtree-"
1262 version "-20050316.tar.gz"))
1263 (sha256
1264 (base32
1265 "016bphqnlg0l4vslahhw4r0aanw95bpypy65r1i1acyb2wj5z7dj"))))
1266 (build-system python-build-system)
1267 (arguments
1268 `(#:python ,python-2 ; seems to be part of Python 3
1269 #:tests? #f)) ; no 'test' sub-command
1270 (synopsis "Toolkit for XML processing in Python")
1271 (description
1272 "ElementTree is a Python library supporting lightweight XML processing.")
1273 (home-page "http://effbot.org/zone/element-index.htm")
1274 (license (license:x11-style
1275 "http://docs.python.org/2/license.html"
1276 "Like \"CWI LICENSE AGREEMENT FOR PYTHON 0.9.0 THROUGH 1.2\"."))))
1277
1278 (define-public python2-pybugz
1279 (package
1280 (name "python2-pybugz")
1281 (version "0.6.11")
1282 (source (origin
1283 (method url-fetch)
1284 (uri (string-append
1285 "http://bits.liquidx.net/projects/pybugz/pybugz-"
1286 version ".tar.gz"))
1287 (sha256
1288 (base32
1289 "17ni00p08gp5lkxlrrcnvi3x09fmajnlbz4da03qcgl9q21ym4jd"))
1290 (patches (search-patches "pybugz-stty.patch"
1291 "pybugz-encode-error.patch"))))
1292 (build-system python-build-system)
1293 (arguments
1294 `(#:python ,python-2 ; SyntaxError with Python 3
1295 #:tests? #f)) ; no 'test' sub-command
1296 (propagated-inputs
1297 `(("element-tree" ,python2-element-tree)))
1298 (synopsis "Python and command-line interface to Bugzilla")
1299 (description
1300 "PyBugz is a Python library and command-line tool to query the Bugzilla
1301 bug tracking system. It is meant as an aid to speed up interaction with the
1302 bug tracker.")
1303 (home-page "http://www.liquidx.net/pybugz/")
1304 (license license:gpl2)))
1305
1306 (define-public python-enum34
1307 (package
1308 (name "python-enum34")
1309 (version "1.1.0")
1310 (source
1311 (origin
1312 (method url-fetch)
1313 (uri (pypi-uri "enum34" version))
1314 (sha256
1315 (base32
1316 "0yx1m4564wxgbm4glb3457hi16xihd9w63rv13y2przkdir9dfgp"))))
1317 (build-system python-build-system)
1318 (arguments
1319 `(#:phases
1320 (alist-replace
1321 'check
1322 (lambda _ (zero? (system* "python" "enum/test_enum.py")))
1323 %standard-phases)))
1324 (home-page "https://pypi.python.org/pypi/enum34")
1325 (synopsis "Backported Python 3.4 Enum")
1326 (description
1327 "Enum34 is the new Python stdlib enum module available in Python 3.4
1328 backported for previous versions of Python from 2.4 to 3.3.")
1329 (license license:bsd-3)))
1330
1331 (define-public python2-enum34
1332 (package-with-python2 python-enum34))
1333
1334 (define-public python-parse-type
1335 (package
1336 (name "python-parse-type")
1337 (version "0.3.4")
1338 (source
1339 (origin
1340 (method url-fetch)
1341 (uri (string-append "https://pypi.python.org/packages/source/p/"
1342 "parse_type/parse_type-" version ".tar.gz"))
1343 (sha256
1344 (base32
1345 "0iv1c34npr4iynwpgv1vkjx9rjd18a85ir8c01gc5f7wp8iv7l1x"))))
1346 (build-system python-build-system)
1347 (propagated-inputs
1348 `(("python-six" ,python-six)
1349 ("python-parse" ,python-parse)))
1350 (arguments '(#:tests? #f)) ;TODO: tests require pytest
1351 (home-page "https://github.com/jenisys/parse_type")
1352 (synopsis "Extended parse module")
1353 (description
1354 "Parse_type extends the python parse module.")
1355 (license license:bsd-3)))
1356
1357 (define-public python-parse
1358 (package
1359 (name "python-parse")
1360 (version "1.6.6")
1361 (source
1362 (origin
1363 (method url-fetch)
1364 (uri (pypi-uri "parse" version))
1365 (sha256
1366 (base32
1367 "0y31i3mwgv35qn0kzzjn9q8jqfdqmbi6sr6yfvn8rq4lqjm5lhvi"))
1368 (patches (search-patches "python-parse-too-many-fields.patch"))))
1369 (build-system python-build-system)
1370 (arguments
1371 `(#:phases
1372 (modify-phases %standard-phases
1373 (replace 'check
1374 (lambda _ (zero? (system* "python" "test_parse.py")))))))
1375 (home-page "https://github.com/r1chardj0n3s/parse")
1376 (synopsis "Parse strings")
1377 (description
1378 "Parse strings using a specification based on the Python format()
1379 syntax.")
1380 (license license:x11)))
1381
1382
1383 (define-public scons
1384 (package
1385 (name "scons")
1386 (version "2.3.4")
1387 (source (origin
1388 (method url-fetch)
1389 (uri (string-append "mirror://sourceforge/scons/scons/" version
1390 "/scons-" version ".tar.gz"))
1391 (sha256
1392 (base32
1393 "0hdlci43wjz8maryj83mz04ir6rwcdrrzpd7cpzvdlzycqhdfmsb"))))
1394 (build-system python-build-system)
1395 (arguments
1396 ;; With Python 3.x, fails to build with a syntax error.
1397 `(#:python ,python-2
1398 #:use-setuptools? #f ; still relies on distutils
1399 #:tests? #f)) ; no 'python setup.py test' command
1400 (home-page "http://scons.org/")
1401 (synopsis "Software construction tool written in Python")
1402 (description
1403 "SCons is a software construction tool. Think of SCons as an improved,
1404 cross-platform substitute for the classic Make utility with integrated
1405 functionality similar to autoconf/automake and compiler caches such as ccache.
1406 In short, SCons is an easier, more reliable and faster way to build
1407 software.")
1408 (license license:x11)))
1409
1410 (define-public python-extras
1411 (package
1412 (name "python-extras")
1413 (version "0.0.3")
1414 (source
1415 (origin
1416 (method url-fetch)
1417 (uri (string-append
1418 "https://pypi.python.org/packages/source/e/extras/extras-"
1419 version ".tar.gz"))
1420 (sha256
1421 (base32
1422 "1h7zx4dfyclalg0fqnfjijpn0f793a9mx8sy3b27gd31nr6dhq3s"))))
1423 (build-system python-build-system)
1424 (arguments
1425 ;; error in setup.cfg: command 'test' has no such option 'buffer'
1426 '(#:tests? #f))
1427 (home-page "https://github.com/testing-cabal/extras")
1428 (synopsis "Useful extensions to the Python standard library")
1429 (description
1430 "Extras is a set of extensions to the Python standard library.")
1431 (license license:expat)))
1432
1433 (define-public python2-extras
1434 (package-with-python2 python-extras))
1435
1436 (define-public python-mimeparse
1437 (package
1438 (name "python-mimeparse")
1439 (version "0.1.4")
1440 (source
1441 (origin
1442 (method url-fetch)
1443 (uri (string-append
1444 "https://pypi.python.org/packages/source/p/python-mimeparse/python-mimeparse-"
1445 version ".tar.gz"))
1446 (sha256
1447 (base32
1448 "1hyxg09kaj02ri0rmwjqi86wk4nd1akvv7n0dx77azz76wga4s9w"))))
1449 (build-system python-build-system)
1450 (arguments
1451 '(#:tests? #f)) ; no setup.py test command
1452 (home-page
1453 "https://github.com/dbtsai/python-mimeparse")
1454 (synopsis "Python library for parsing MIME types")
1455 (description
1456 "Mimeparse provides basic functions for parsing MIME type names and
1457 matching them against a list of media-ranges.")
1458 (license license:expat)))
1459
1460 (define-public python2-mimeparse
1461 (package-with-python2 python-mimeparse))
1462
1463 (define-public python-nose
1464 (package
1465 (name "python-nose")
1466 (version "1.3.7")
1467 (source
1468 (origin
1469 (method url-fetch)
1470 (uri (pypi-uri "nose" version))
1471 (sha256
1472 (base32
1473 "164a43k7k2wsqqk1s6vavcdamvss4mz0vd6pwzv2h9n8rgwzxgzi"))))
1474 (build-system python-build-system)
1475 (arguments
1476 '(#:tests? #f)) ; FIXME: test suite fails
1477 (home-page "http://readthedocs.org/docs/nose/")
1478 (synopsis "Python testing library")
1479 (description
1480 "Nose extends the unittest library to make testing easier.")
1481 (license license:lgpl2.0+)))
1482
1483 (define-public python2-nose
1484 (package-with-python2 python-nose))
1485
1486 (define-public python-nose2
1487 (package
1488 (name "python-nose2")
1489 (version "0.6.5")
1490 (source
1491 (origin
1492 (method url-fetch)
1493 (uri (pypi-uri "nose2" version))
1494 (sha256
1495 (base32
1496 "1x4zjq1zlyrh8b9ba0cmafd3w94pxhid408kibyjd3s6h1lap6s7"))))
1497 (build-system python-build-system)
1498 (arguments `(#:tests? #f)) ; 'module' object has no attribute 'collector'
1499 (propagated-inputs
1500 `(("python-cov-core" ,python-cov-core)
1501 ("python-pytest-cov" ,python-pytest-cov)
1502 ("python-six" ,python-six)))
1503 (home-page "https://github.com/nose-devs/nose2")
1504 (synopsis "Next generation of nicer testing for Python")
1505 (description
1506 "Nose2 is the next generation of nicer testing for Python, based on the
1507 plugins branch of unittest2. Nose2 aims to improve on nose by providing a
1508 better plugin api, being easier for users to configure, and simplifying internal
1509 interfaces and processes.")
1510 (license license:bsd-2)))
1511
1512 (define-public python2-nose2
1513 (package-with-python2 python-nose2))
1514
1515 (define-public python-unittest2
1516 (package
1517 (name "python-unittest2")
1518 (version "0.5.1")
1519 (source
1520 (origin
1521 (method url-fetch)
1522 (uri (string-append
1523 "https://pypi.python.org/packages/source/u/unittest2py3k/unittest2py3k-"
1524 version ".tar.gz"))
1525 (sha256
1526 (base32
1527 "00yl6lskygcrddx5zspkhr0ibgvpknl4678kkm6s626539grq93q"))))
1528 (build-system python-build-system)
1529 (home-page "http://pypi.python.org/pypi/unittest2")
1530 (synopsis "Python unit testing library")
1531 (description
1532 "Unittest2 is a replacement for the unittest module in the Python
1533 standard library.")
1534 (license license:psfl)))
1535
1536 (define-public python2-unittest2
1537 (package (inherit python-unittest2)
1538 (name "python2-unittest2")
1539 (version "0.5.1")
1540 (source
1541 (origin
1542 (method url-fetch)
1543 (uri (string-append
1544 "https://pypi.python.org/packages/source/u/unittest2/unittest2-"
1545 version ".tar.gz"))
1546 (sha256
1547 (base32
1548 "0wbs4i4x3x7klr3v35ss6p9mcqz883i1xgcpkhvl7n2lyv6yhpda"))))
1549 (arguments
1550 `(#:python ,python-2
1551 #:tests? #f)))) ; no setup.py test command
1552
1553 (define-public python-pafy
1554 (package
1555 (name "python-pafy")
1556 (version "0.5.2")
1557 (source
1558 (origin
1559 (method url-fetch)
1560 (uri (pypi-uri "pafy" version))
1561 (sha256
1562 (base32
1563 "1ckvrypyvb7jbqlgwdz0y337ajagjv7dgxyns326nqwypn1wpq0i"))))
1564 (build-system python-build-system)
1565 (propagated-inputs
1566 ;; Youtube-dl is a python package which is imported in the file
1567 ;; "backend_youtube_dl.py", therefore it needs to be propagated.
1568 `(("youtube-dl" ,youtube-dl)))
1569 (home-page "https://np1.github.io/pafy/")
1570 (synopsis "Retrieve YouTube content and metadata")
1571 (description
1572 "@code{pafy} is a python library to retrieve YouTube content and metadata.")
1573 (license license:lgpl3+)))
1574
1575 (define-public python-py
1576 (package
1577 (name "python-py")
1578 (version "1.4.31")
1579 (source
1580 (origin
1581 (method url-fetch)
1582 (uri (pypi-uri "py" version))
1583 (sha256
1584 (base32
1585 "0561gz2w3i825gyl42mcq14y3dcgkapfiv5zv9a2bz15qxiijl56"))))
1586 (build-system python-build-system)
1587 (home-page "http://pylib.readthedocs.org/")
1588 (synopsis "Python library for parsing, I/O, instrospection, and logging")
1589 (description
1590 "Py is a Python library for file name parsing, .ini file parsing, I/O,
1591 code introspection, and logging.")
1592 (license license:expat)))
1593
1594 (define-public python2-py
1595 (package-with-python2 python-py))
1596
1597 (define-public python-pytest
1598 (package
1599 (name "python-pytest")
1600 (version "2.7.3")
1601 (source
1602 (origin
1603 (method url-fetch)
1604 (uri (string-append
1605 "https://pypi.python.org/packages/source/p/pytest/pytest-"
1606 version ".tar.gz"))
1607 (sha256
1608 (base32
1609 "1z4yi986f9n0p8qmzmn21m21m8j1x78hk3505f89baqm6pdw7afm"))
1610 (modules '((guix build utils)))
1611 (snippet
1612 ;; One of the tests involves the /usr directory, so it fails.
1613 '(substitute* "testing/test_argcomplete.py"
1614 (("def test_remove_dir_prefix\\(self\\):")
1615 "@pytest.mark.xfail\n def test_remove_dir_prefix(self):")))))
1616 (build-system python-build-system)
1617 (propagated-inputs
1618 `(("python-py" ,python-py)))
1619 (native-inputs
1620 `(("python-nose" ,python-nose)
1621 ("python-mock" ,python-mock)))
1622 (home-page "http://pytest.org")
1623 (synopsis "Python testing library")
1624 (description
1625 "Pytest is a testing tool that provides auto-discovery of test modules
1626 and functions, detailed info on failing assert statements, modular fixtures,
1627 and many external plugins.")
1628 (license license:expat)))
1629
1630 (define-public python2-pytest
1631 (package-with-python2 python-pytest))
1632
1633 ;; This package is used by Borg until we can upgrade all our Python packages to
1634 ;; use a more recent pytest.
1635 (define-public python-pytest-2.9.2
1636 (package
1637 (inherit python-pytest)
1638 (name "python-pytest")
1639 (version "2.9.2")
1640 (source (origin
1641 (method url-fetch)
1642 (uri (pypi-uri "pytest" version))
1643 (sha256
1644 (base32
1645 "1n6igbc1b138wx1q5gca4pqw1j6nsyicfxds5n0b5989kaxqmh8j"))))
1646 (arguments
1647 `(#:phases
1648 (modify-phases %standard-phases
1649 (add-before 'check 'disable-invalid-test
1650 (lambda _
1651 (substitute* "testing/test_argcomplete.py"
1652 (("def test_remove_dir_prefix" line)
1653 (string-append "@pytest.mark.skip"
1654 "(reason=\"Assumes that /usr exists.\")\n "
1655 line)))
1656 #t)))))))
1657
1658 (define-public python-pytest-cov
1659 (package
1660 (name "python-pytest-cov")
1661 (version "2.2.1")
1662 (source
1663 (origin
1664 (method url-fetch)
1665 (uri (pypi-uri "pytest-cov" version))
1666 (sha256
1667 (base32
1668 "1yl4nbhzfgsxqlsyk4clafgp9x11zvgrkprm9i2p3fgkwx9jxcm8"))))
1669 (build-system python-build-system)
1670 (arguments
1671 `(#:phases
1672 (modify-phases %standard-phases
1673 (replace 'check
1674 (lambda _
1675 ;; options taken from tox.ini
1676 ;; TODO: make "--restructuredtext" tests pass. They currently fail
1677 ;; with "Duplicate implicit target name"
1678 (zero? (system* "python" "./setup.py" "check"
1679 "--strict" "--metadata")))))))
1680 (propagated-inputs
1681 `(("python-coverage" ,python-coverage)
1682 ("python-pytest" ,python-pytest)))
1683 (home-page "https://github.com/pytest-dev/pytest-cov")
1684 (synopsis "Pytest plugin for measuring coverage")
1685 (description
1686 "Pytest-cov produces coverage reports. It supports centralised testing and
1687 distributed testing in both @code{load} and @code{each} modes. It also
1688 supports coverage of subprocesses.")
1689 (license license:expat)))
1690
1691 (define-public python2-pytest-cov
1692 (package-with-python2 python-pytest-cov))
1693
1694 (define-public python-pytest-runner
1695 (package
1696 (name "python-pytest-runner")
1697 (version "2.6.2")
1698 (source
1699 (origin
1700 (method url-fetch)
1701 (uri (pypi-uri "pytest-runner" version))
1702 (sha256
1703 (base32
1704 "1nwcqx0l3fv52kv8526wy8ypzghbq96c96di318d98d3wh7a8xg7"))))
1705 (build-system python-build-system)
1706 (arguments
1707 `(#:phases
1708 (modify-phases %standard-phases
1709 ;; The fancy way of setting the version with setuptools_scm does not
1710 ;; seem to work here.
1711 (add-after 'unpack 'set-version
1712 (lambda _
1713 (substitute* "docs/conf.py"
1714 (("version = setuptools_scm\\.get_version\\(root='\\.\\.')")
1715 (string-append "version = \"" ,version "\"")))
1716 #t)))))
1717 (native-inputs
1718 `(("python-pytest" ,python-pytest)
1719 ("python-setuptools-scm" ,python-setuptools-scm)))
1720 (home-page "https://github.com/pytest-dev/pytest-runner")
1721 (synopsis "Invoke py.test as a distutils command")
1722 (description
1723 "This package provides a @command{pytest-runner} command that
1724 @file{setup.py} files can use to run tests.")
1725 (license license:expat)))
1726
1727 (define-public python2-pytest-runner
1728 (package-with-python2 python-pytest-runner))
1729
1730 (define-public python-pytest-mock
1731 (package
1732 (name "python-pytest-mock")
1733 (version "1.2")
1734 (source
1735 (origin
1736 (method url-fetch)
1737 (uri (pypi-uri "pytest-mock" version ".zip"))
1738 (sha256
1739 (base32
1740 "03zxar5drzm7ksqyrwypjaza3cri6wqvpr6iam92djvg6znp32gp"))))
1741 (build-system python-build-system)
1742 (native-inputs
1743 `(("unzip" ,unzip)))
1744 (propagated-inputs
1745 `(("python-py" ,python-py)
1746 ("python-pytest" ,python-pytest)))
1747 (home-page "https://github.com/pytest-dev/pytest-mock/")
1748 (synopsis "Thin-wrapper around the mock package for easier use with py.test")
1749 (description
1750 "This plugin installs a @code{mocker} fixture which is a thin-wrapper
1751 around the patching API provided by the @code{mock} package, but with the
1752 benefit of not having to worry about undoing patches at the end of a test.
1753 The mocker fixture has the same API as @code{mock.patch}, supporting the
1754 same arguments.")
1755 (properties `((python2-variant . ,(delay python2-pytest-mock))))
1756 (license license:expat)))
1757
1758 (define-public python2-pytest-mock
1759 (let ((base (package-with-python2
1760 (strip-python2-variant python-pytest-mock))))
1761 (package (inherit base)
1762 (propagated-inputs
1763 `(("python2-mock" ,python2-mock)
1764 ,@(package-propagated-inputs base))))))
1765
1766 (define-public python-pytest-xdist
1767 (package
1768 (name "python-pytest-xdist")
1769 (version "1.14")
1770 (source
1771 (origin
1772 (method url-fetch)
1773 (uri (pypi-uri "pytest-xdist" version ".zip"))
1774 (sha256
1775 (base32
1776 "08rn2l39ds60xshs4js787l84pfckksqklfq2wq9x8ig2aci2pja"))
1777 (modules '((guix build utils)))
1778 (snippet
1779 '(begin
1780 ;; Remove pre-compiled .pyc files from source.
1781 (for-each delete-file-recursively
1782 (find-files "." "__pycache__" #:directories? #t))
1783 (for-each delete-file (find-files "." "\\.pyc$"))
1784 #t))))
1785 (build-system python-build-system)
1786 (native-inputs
1787 `(("unzip" ,unzip)
1788 ("python-setuptools-scm" ,python-setuptools-scm)))
1789 (propagated-inputs
1790 `(("python-apipkg" ,python-apipkg)
1791 ("python-execnet" ,python-execnet)
1792 ("python-pytest" ,python-pytest)
1793 ("python-py" ,python-py)))
1794 (home-page
1795 "https://github.com/pytest-dev/pytest-xdist")
1796 (synopsis
1797 "Plugin for py.test with distributed testing and loop-on-failing modes")
1798 (description
1799 "The pytest-xdist plugin extends py.test with some unique test execution
1800 modes: parallelization, running tests in boxed subprocesses, the ability
1801 to run tests repeatedly when failed, and the ability to run tests on multiple
1802 Python interpreters or platforms. It uses rsync to copy the existing
1803 program code to a remote location, executes there, and then syncs the
1804 result back.")
1805 (license license:expat)))
1806
1807 (define-public python2-pytest-xdist
1808 (package-with-python2 python-pytest-xdist))
1809
1810 (define-public python-scripttest
1811 (package
1812 (name "python-scripttest")
1813 (version "1.3")
1814 (source
1815 (origin
1816 (method url-fetch)
1817 (uri (string-append
1818 "https://pypi.python.org/packages/source/s/scripttest/scripttest-"
1819 version ".tar.gz"))
1820 (sha256
1821 (base32
1822 "0f4w84k8ck82syys7yg9maz93mqzc8p5ymis941x034v44jzq74m"))))
1823 (build-system python-build-system)
1824 (propagated-inputs
1825 `(("python-pytest" ,python-pytest)))
1826 (home-page "http://pythonpaste.org/scripttest/")
1827 (synopsis "Python library to test command-line scripts")
1828 (description "Scripttest is a Python helper library for testing
1829 interactive command-line applications. With it you can run a script in a
1830 subprocess and see the output as well as any file modifications.")
1831 (license license:expat)))
1832
1833 (define-public python2-scripttest
1834 (package-with-python2 python-scripttest))
1835
1836 (define-public python-testtools
1837 (package
1838 (name "python-testtools")
1839 (version "1.0.0")
1840 (source
1841 (origin
1842 (method url-fetch)
1843 (uri (string-append
1844 "https://pypi.python.org/packages/source/t/testtools/testtools-"
1845 version ".tar.gz"))
1846 (sha256
1847 (base32
1848 "1dyml28ykpl5jb9khdmcdvhy1cxqingys6qvj2k04fzlaj6z3bbx"))))
1849 (build-system python-build-system)
1850 (propagated-inputs
1851 `(("python-mimeparse" ,python-mimeparse)
1852 ("python-extras" ,python-extras)))
1853 (home-page "https://github.com/testing-cabal/testtools")
1854 (synopsis
1855 "Extensions to the Python standard library unit testing framework")
1856 (description
1857 "Testtools extends the Python standard library unit testing framework to
1858 provide matchers, more debugging information, and cross-Python
1859 compatibility.")
1860 (license license:psfl)))
1861
1862 (define-public python2-testtools
1863 (package-with-python2 python-testtools))
1864
1865 (define-public python-testscenarios
1866 (package
1867 (name "python-testscenarios")
1868 (version "0.4")
1869 (source
1870 (origin
1871 (method url-fetch)
1872 (uri (string-append
1873 "https://pypi.python.org/packages/source/t/testscenarios/testscenarios-"
1874 version ".tar.gz"))
1875 (sha256
1876 (base32
1877 "1671jvrvqlmbnc42j7pc5y6vc37q44aiwrq0zic652pxyy2fxvjg"))))
1878 (build-system python-build-system)
1879 (propagated-inputs
1880 `(("python-testtools" ,python-testtools)
1881 ("python-mimeparse" ,python-mimeparse)))
1882 (home-page "https://launchpad.net/testscenarios")
1883 (synopsis "Pyunit extension for dependency injection")
1884 (description
1885 "Testscenarios provides clean dependency injection for Python unittest
1886 style tests.")
1887 (license (list license:bsd-3 license:asl2.0)))) ; at the user's option
1888
1889 (define-public python2-testscenarios
1890 (package-with-python2 python-testscenarios))
1891
1892 (define-public python-testresources
1893 (package
1894 (name "python-testresources")
1895 (version "0.2.7")
1896 (source
1897 (origin
1898 (method url-fetch)
1899 (uri (string-append
1900 "https://pypi.python.org/packages/source/t/testresources/testresources-"
1901 version ".tar.gz"))
1902 (sha256
1903 (base32
1904 "0cbj3plbllyz42c4b5xxgwaa7mml54lakslrn4kkhinxhdri22md"))))
1905 (build-system python-build-system)
1906 (home-page "https://launchpad.net/testresources")
1907 (synopsis
1908 "Pyunit extension for managing test resources")
1909 (description
1910 "Testresources is an extension to Python's unittest to allow declarative
1911 use of resources by test cases.")
1912 (license (list license:bsd-3 license:asl2.0)))) ; at the user's option
1913
1914 (define-public python2-testresources
1915 (package-with-python2 python-testresources))
1916
1917 (define-public python-subunit
1918 (package
1919 (name "python-subunit")
1920 (version "0.0.21")
1921 (source
1922 (origin
1923 (method url-fetch)
1924 (uri (string-append
1925 "https://pypi.python.org/packages/source/p/python-subunit/python-subunit-"
1926 version ".tar.gz"))
1927 (sha256
1928 (base32
1929 "1nkw9wfbvizmpajbj3in8ns07g7lwkiv8hip14jjlwk3cacls6jv"))))
1930 (build-system python-build-system)
1931 (propagated-inputs
1932 `(("python-testtools" ,python-testtools)
1933 ("python-mimeparse" ,python-mimeparse)
1934 ("python-testscenarios" ,python-testscenarios)))
1935 (home-page "http://launchpad.net/subunit")
1936 (synopsis "Python implementation of the subunit protocol")
1937 (description
1938 "Python-subunit is a Python implementation of the subunit test streaming
1939 protocol.")
1940 (license (list license:bsd-3 license:asl2.0)))) ; at the user's option
1941
1942 (define-public python2-subunit
1943 (package-with-python2 python-subunit))
1944
1945 ;; Recent versions of python-fixtures and python-testrepository need
1946 ;; python-pbr for packaging, which itself needs these two packages for
1947 ;; testing.
1948 ;; To fix this circular dependency, we use a build of python-pbr, based on the
1949 ;; same source, just without any test dependencies and with tests disabled.
1950 ;; python-pbr-minmal is then used to package python-fixtures and
1951 ;; python-testrepository.
1952 ;; Strictly speaking we currently could remove the test-requirements from the
1953 ;; normal python-pbr package (and save this package) since test are disabled
1954 ;; there anyway. But this may change in future.
1955 (define python-pbr-minimal
1956 (package
1957 (name "python-pbr-minimal")
1958 (version "1.8.1")
1959 (source
1960 (origin
1961 (method url-fetch)
1962 (uri (pypi-uri "pbr" version))
1963 (sha256
1964 (base32
1965 "0jcny36cf3s8ar5r4a575npz080hndnrfs4np1fqhv0ym4k7c4p2"))))
1966 (build-system python-build-system)
1967 (arguments
1968 `(#:tests? #f))
1969 (home-page "http://docs.openstack.org/developer/pbr/")
1970 (synopsis "Minimal build of python-pbr used for bootstrapping")
1971 (description
1972 "Used only for bootstrapping python2-pbr, you should not need this.")
1973 (license license:asl2.0)))
1974
1975 (define python2-pbr-minimal
1976 (package-with-python2 python-pbr-minimal))
1977
1978 (define-public python-pbr
1979 (package
1980 (inherit python-pbr-minimal)
1981 (name "python-pbr")
1982 (arguments
1983 `(#:tests? #f)) ;; Most tests seem to use the Internet.
1984 (propagated-inputs
1985 `(("git" ,git))) ;; pbr actually uses the "git" binary.
1986 (native-inputs
1987 `(("python-fixtures" ,python-fixtures)
1988 ;; discover, coverage, hacking, subunit
1989 ("python-mock" ,python-mock)
1990 ("python-six" ,python-six)
1991 ("python-sphinx" ,python-sphinx)
1992 ("python-testrepository" ,python-testrepository)
1993 ("python-testresources" ,python-testresources)
1994 ("python-testscenarios" ,python-testscenarios)
1995 ("python-testtools" ,python-testtools)
1996 ("python-virtualenv" ,python-virtualenv)))
1997 (synopsis "Enhance the default behavior of Python’s setuptools")
1998 (description
1999 "Python Build Reasonableness (PBR) is a library that injects some useful
2000 and sensible default behaviors into your setuptools run. It will set
2001 versions, process requirements files and generate AUTHORS and ChangeLog file
2002 from git information.
2003 ")))
2004
2005 (define-public python2-pbr
2006 (package-with-python2 python-pbr))
2007
2008 (define-public python-fixtures
2009 (package
2010 (name "python-fixtures")
2011 (version "1.4.0")
2012 (source
2013 (origin
2014 (method url-fetch)
2015 (uri (pypi-uri "fixtures" version))
2016 (sha256
2017 (base32
2018 "0djxvdwm8s60dbfn7bhf40x6g818p3b3mlwijm1c3bqg7msn271y"))))
2019 (build-system python-build-system)
2020 (propagated-inputs
2021 `(("python-six" ,python-six)))
2022 (native-inputs
2023 `(("python-pbr-minimal" ,python-pbr-minimal)
2024 ("python-testtools" ,python-testtools)))
2025 (home-page "https://launchpad.net/python-fixtures")
2026 (synopsis "Python test fixture library")
2027 (description
2028 "Fixtures provides a way to create reusable state, useful when writing
2029 Python tests.")
2030 (license (list license:bsd-3 license:asl2.0)))) ; at user's option
2031
2032 (define-public python2-fixtures
2033 (package-with-python2 python-fixtures))
2034
2035 (define-public python-testrepository
2036 (package
2037 (name "python-testrepository")
2038 (version "0.0.20")
2039 (source
2040 (origin
2041 (method url-fetch)
2042 (uri (string-append
2043 "https://pypi.python.org/packages/source/t/testrepository/testrepository-"
2044 version ".tar.gz"))
2045 (sha256
2046 (base32
2047 "1ssqb07c277010i6gzzkbdd46gd9mrj0bi0i8vn560n2k2y4j93m"))))
2048 (build-system python-build-system)
2049 (propagated-inputs
2050 `(("python-testtools" ,python-testtools)))
2051 (native-inputs
2052 `(("python-fixtures" ,python-fixtures)
2053 ("python-pbr-minimal" ,python-pbr-minimal) ;; same as for building fixture
2054 ("python-subunit" ,python-subunit)
2055 ("python-mimeparse" ,python-mimeparse)))
2056 (home-page "https://launchpad.net/testrepository")
2057 (synopsis "Database for Python test results")
2058 (description "Testrepository provides a database of test results which can
2059 be used as part of a developer's workflow to check things such as what tests
2060 have failed since the last commit or what tests are currently failing.")
2061 (license (list license:bsd-3 license:asl2.0)))) ; at user's option
2062
2063 (define-public python2-testrepository
2064 (package-with-python2 python-testrepository))
2065
2066 (define-public python-coverage
2067 (package
2068 (name "python-coverage")
2069 (version "4.1")
2070 (source
2071 (origin
2072 (method url-fetch)
2073 (uri (pypi-uri "coverage" version))
2074 (sha256
2075 (base32
2076 "01rbr4br4lsk0lwn8fb96zwd2xr4f0mg1w7iq3j11i8f5ig2nqs1"))))
2077 (build-system python-build-system)
2078 (home-page "http://nedbatchelder.com/code/coverage")
2079 (synopsis "Code coverage measurement for Python")
2080 (description
2081 "Coverage measures code coverage, typically during test execution. It
2082 uses the code analysis tools and tracing hooks provided in the Python standard
2083 library to determine which lines are executable, and which have been
2084 executed.")
2085 (license license:bsd-3)))
2086
2087 (define-public python2-coverage
2088 (package-with-python2 python-coverage))
2089
2090 (define-public python-cov-core
2091 (package
2092 (name "python-cov-core")
2093 (version "1.15.0")
2094 (source
2095 (origin
2096 (method url-fetch)
2097 (uri (pypi-uri "cov-core" version))
2098 (sha256
2099 (base32
2100 "0k3np9ymh06yv1ib96sb6wfsxjkqhmik8qfsn119vnhga9ywc52a"))))
2101 (build-system python-build-system)
2102 (native-inputs
2103 `(("python-coverage" ,python-coverage)))
2104 (home-page "https://github.com/schlamar/cov-core")
2105 (synopsis "plugin core for use by pytest-cov, nose-cov and nose2-cov")
2106 (description
2107 "This is a library package for use by pytest-cov, nose-cov and nose2-cov.
2108 It is useful for developing coverage plugins for these testing frameworks.")
2109 (license license:expat)))
2110
2111 (define-public python2-cov-core
2112 (package-with-python2 python-cov-core))
2113
2114 (define-public python-discover
2115 (package
2116 (name "python-discover")
2117 (version "0.4.0")
2118 (source
2119 (origin
2120 (method url-fetch)
2121 (uri (string-append
2122 "https://pypi.python.org/packages/source/d/discover/discover-"
2123 version ".tar.gz"))
2124 (sha256
2125 (base32
2126 "0y8d0zwiqar51kxj8lzmkvwc3b8kazb04gk5zcb4nzg5k68zmhq5"))))
2127 (build-system python-build-system)
2128 (home-page "http://pypi.python.org/pypi/discover/")
2129 (synopsis
2130 "Python test discovery for unittest")
2131 (description
2132 "Discover provides test discovery for unittest, a feature that has been
2133 backported from Python 2.7 for Python 2.4+.")
2134 (license license:bsd-3)))
2135
2136 (define-public python2-discover
2137 (package-with-python2 python-discover))
2138
2139 (define-public behave
2140 (package
2141 (name "behave")
2142 (version "1.2.5")
2143 (source (origin
2144 (method url-fetch)
2145 (uri (pypi-uri "behave" version ".tar.bz2"))
2146 (sha256
2147 (base32
2148 "1iypp6z46r19n4xmgx6m1lwmlpfjh8vapq8izigrqlaarvp2y64c"))))
2149 (build-system python-build-system)
2150 (propagated-inputs
2151 `(("python-six" ,python-six)
2152 ("python-parse" ,python-parse)
2153 ("python-parse-type" ,python-parse-type)))
2154 (arguments `(#:tests? #f)) ;TODO: tests require nose>=1.3 and
2155 ;PyHamcrest>=1.8
2156 (home-page "http://github.com/behave/behave")
2157 (synopsis "Python behavior-driven development")
2158 (description
2159 "Behave is a tool for behavior-driven development in python.
2160 Behavior-driven development (or BDD) is an agile software development
2161 technique that encourages collaboration between developers, QA and
2162 non-technical or business participants in a software project. Behave uses
2163 tests written in a natural language style, backed up by Python code.")
2164 (license license:x11)))
2165
2166 (define-public python-exif-read
2167 (package
2168 (name "python-exif-read")
2169 (version "2.1.2")
2170 (source (origin
2171 (method url-fetch)
2172 (uri (pypi-uri "ExifRead" version))
2173 (sha256
2174 (base32
2175 "1b90jf6m9vxh9nanhpyvqdq7hmfx5iggw1l8kq10jrs6xgr49qkr"))))
2176 (build-system python-build-system)
2177 (arguments `(#:tests? #f)) ; no tests
2178 (home-page "https://github.com/ianare/exif-py")
2179 (synopsis "Python library to extract EXIF data from image files")
2180 (description
2181 "ExifRead is a Python library to extract EXIF data from tiff and jpeg
2182 files.")
2183 (license license:bsd-3)))
2184
2185 (define-public python2-exif-read
2186 (package-with-python2 python-exif-read))
2187
2188 (define-public python-pyld
2189 (package
2190 (name "python-pyld")
2191 (version "0.6.8")
2192 (source (origin
2193 (method url-fetch)
2194 (uri (pypi-uri "PyLD" version))
2195 (sha256
2196 (base32
2197 "0k881ffazpf8q1z8862g4bb3pzwpnz9whrci2mf311mvn1qbyqad"))))
2198 (build-system python-build-system)
2199 (arguments `(#:tests? #f)) ; no tests
2200 (home-page "http://github.com/digitalbazaar/pyld")
2201 (synopsis "Python implementation of the JSON-LD specification")
2202 (description
2203 "PyLD is an implementation of the JSON-LD specification.")
2204 (license license:bsd-3)))
2205
2206 (define-public python2-pyld
2207 (package-with-python2 python-pyld))
2208
2209 (define-public python-certifi
2210 (package
2211 (name "python-certifi")
2212 (version "2016.8.31")
2213 (source (origin
2214 (method url-fetch)
2215 (uri (pypi-uri "certifi" version))
2216 (sha256
2217 (base32
2218 "06c9dcyv8ss050gkv5xjivbxhm6qm0s9vzy4r33wqabgv118lw7p"))))
2219 (build-system python-build-system)
2220 (arguments `(#:tests? #f)) ; no tests
2221 (home-page "http://python-requests.org/")
2222 (synopsis "Python CA certificate bundle")
2223 (description
2224 "Certifi is a Python library that contains a CA certificate bundle, which
2225 is used by the Requests library to verify HTTPS requests.")
2226 (license license:asl2.0)))
2227
2228 (define-public python2-certifi
2229 (package-with-python2 python-certifi))
2230
2231 (define-public python-click
2232 (package
2233 (name "python-click")
2234 (version "6.6")
2235 (source
2236 (origin
2237 (method url-fetch)
2238 (uri (pypi-uri "click" version))
2239 (sha256
2240 (base32
2241 "1sggipyz52crrybwbr9xvwxd4aqigvplf53k9w3ygxmzivd1jsnc"))))
2242 (build-system python-build-system)
2243 (arguments
2244 `(#:phases
2245 (modify-phases %standard-phases
2246 (add-after 'unpack 'fix-paths
2247 (lambda* (#:key inputs #:allow-other-keys)
2248 (let ((glibc (assoc-ref inputs ,(if (%current-target-system)
2249 "cross-libc" "libc"))))
2250 (substitute* "click/_unicodefun.py"
2251 (("'locale'")
2252 (string-append "'" glibc "/bin/locale'"))))
2253 #t)))))
2254 (home-page "http://click.pocoo.org")
2255 (synopsis "Command line library for Python")
2256 (description
2257 "Click is a Python package for creating command line interfaces in a
2258 composable way with as little code as necessary. Its name stands for
2259 \"Command Line Interface Creation Kit\". It's highly configurable but comes
2260 with sensible defaults out of the box.")
2261 (license license:bsd-3)))
2262
2263 (define-public python2-click
2264 (package-with-python2 python-click))
2265
2266 (define-public python-wheel
2267 (package
2268 (name "python-wheel")
2269 (version "0.29.0")
2270 (source
2271 (origin
2272 (method url-fetch)
2273 (uri (pypi-uri "wheel" version))
2274 (sha256
2275 (base32
2276 "0j0n38hg1jvrmyy68f9ikvzq1gs9g0sx4ws7maf8wi3bwbbqmfqy"))))
2277 (build-system python-build-system)
2278 (native-inputs
2279 `(("python-jsonschema" ,python-jsonschema)
2280 ("python-pytest-cov" ,python-pytest-cov)))
2281 (home-page "https://bitbucket.org/pypa/wheel/")
2282 (synopsis "Format for built Python packages")
2283 (description
2284 "A wheel is a ZIP-format archive with a specially formatted filename and
2285 the @code{.whl} extension. It is designed to contain all the files for a PEP
2286 376 compatible install in a way that is very close to the on-disk format. Many
2287 packages will be properly installed with only the @code{Unpack} step and the
2288 unpacked archive preserves enough information to @code{Spread} (copy data and
2289 scripts to their final locations) at any later time. Wheel files can be
2290 installed with a newer @code{pip} or with wheel's own command line utility.")
2291 (license license:expat)
2292 (properties `((python2-variant . ,(delay python2-wheel))))))
2293
2294 (define-public python2-wheel
2295 (let ((wheel (package-with-python2
2296 (strip-python2-variant python-wheel))))
2297 (package (inherit wheel)
2298 (native-inputs `(("python2-functools32" ,python2-functools32)
2299 ,@(package-native-inputs wheel))))))
2300
2301
2302 (define-public python-requests
2303 (package
2304 (name "python-requests")
2305 (version "2.9.1")
2306 (source (origin
2307 (method url-fetch)
2308 (uri (pypi-uri "requests" version))
2309 (sha256
2310 (base32
2311 "0zsqrzlybf25xscgi7ja4s48y2abf9wvjkn47wh984qgs1fq2xy5"))))
2312 (build-system python-build-system)
2313 (native-inputs
2314 `(("python-py" ,python-py)
2315 ("python-pytest" ,python-pytest)
2316 ("python-pytest-cov" ,python-pytest-cov)
2317 ("python-wheel" ,python-wheel)))
2318 (home-page "http://python-requests.org/")
2319 (synopsis "Python HTTP library")
2320 (description
2321 "Requests is a Python HTTP client library. It aims to be easier to use
2322 than Python’s urllib2 library.")
2323 (license license:asl2.0)))
2324
2325 ;; Some software requires an older version of Requests, notably Docker
2326 ;; Compose.
2327 (define-public python-requests-2.7
2328 (package (inherit python-requests)
2329 (version "2.7.0")
2330 (source (origin
2331 (method url-fetch)
2332 (uri (pypi-uri "requests" version))
2333 (sha256
2334 (base32
2335 "0gdr9dxm24amxpbyqpbh3lbwxc2i42hnqv50sigx568qssv3v2ir"))))))
2336
2337 (define-public python2-requests
2338 (package-with-python2 python-requests))
2339
2340 (define-public python-vcversioner
2341 (package
2342 (name "python-vcversioner")
2343 (version "2.16.0.0")
2344 (source
2345 (origin
2346 (method url-fetch)
2347 (uri (pypi-uri "vcversioner" version))
2348 (sha256
2349 (base32
2350 "16z10sm78jd7ca3jbkgc3q5i8a8q7y1h21q1li21yy3rlhbhrrns"))))
2351 (build-system python-build-system)
2352 (synopsis "Python library for version number discovery")
2353 (description "Vcversioner is a Python library that inspects tagging
2354 information in a variety of version control systems in order to discover
2355 version numbers.")
2356 (home-page "https://github.com/habnabit/vcversioner")
2357 (license license:isc)))
2358
2359 (define-public python2-vcversioner
2360 (package-with-python2 python-vcversioner))
2361
2362 (define-public python-jsonschema
2363 (package
2364 (name "python-jsonschema")
2365 (version "2.5.1")
2366 (source (origin
2367 (method url-fetch)
2368 (uri
2369 (string-append
2370 "https://pypi.python.org/packages/source/j/jsonschema/jsonschema-"
2371 version ".tar.gz"))
2372 (sha256
2373 (base32
2374 "0hddbqjm4jq63y8jf44nswina1crjs16l9snb6m3vvgyg31klrrn"))))
2375 (build-system python-build-system)
2376 (arguments
2377 '(#:phases
2378 (modify-phases %standard-phases
2379 (replace 'check (lambda _ (zero? (system* "nosetests")))))))
2380 (native-inputs
2381 `(("python-nose" ,python-nose)
2382 ("python-vcversioner" ,python-vcversioner)))
2383 (home-page "https://github.com/Julian/jsonschema")
2384 (synopsis "Implementation of JSON Schema for Python")
2385 (description
2386 "Jsonschema is an implementation of JSON Schema for Python.")
2387 (license license:expat)
2388 (properties `((python2-variant . ,(delay python2-jsonschema))))))
2389
2390 (define-public python2-jsonschema
2391 (let ((jsonschema (package-with-python2
2392 (strip-python2-variant python-jsonschema))))
2393 (package (inherit jsonschema)
2394 (native-inputs
2395 `(("python2-mock" ,python2-mock)
2396 ,@(package-native-inputs jsonschema)))
2397 (propagated-inputs
2398 `(("python2-functools32" ,python2-functools32))))))
2399
2400 (define-public python-unidecode
2401 (package
2402 (name "python-unidecode")
2403 (version "0.04.18")
2404 (source (origin
2405 (method url-fetch)
2406 (uri (pypi-uri "Unidecode" version))
2407 (sha256
2408 (base32
2409 "12hhblqy1ajvidm38im4171x4arg83pfmziyn53nizp29p3m14gi"))))
2410 (build-system python-build-system)
2411 (home-page "https://pypi.python.org/pypi/Unidecode")
2412 (synopsis "ASCII transliterations of Unicode text")
2413 (description
2414 "Unidecode provides ASCII transliterations of Unicode text. Unidecode is
2415 useful when integrating with legacy code that doesn't support Unicode, or for
2416 ease of entry of non-Roman names on a US keyboard, or when constructing ASCII
2417 machine identifiers from human-readable Unicode strings that should still be
2418 somewhat intelligeble.")
2419 (license license:gpl2+)))
2420
2421 (define-public python2-unidecode
2422 (package-with-python2 python-unidecode))
2423
2424 (define-public python-pyjwt
2425 (package
2426 (name "python-pyjwt")
2427 (version "1.4.0")
2428 (source
2429 (origin
2430 (method url-fetch)
2431 (uri (pypi-uri "PyJWT" version))
2432 (sha256
2433 (base32
2434 "1556v2jppd8mjkkj66pxb5rcazm35jq81r233mdl8hfmz9n3icp1"))))
2435 (build-system python-build-system)
2436 (native-inputs
2437 `(("python-pytest-runner" ,python-pytest-runner)))
2438 (arguments
2439 '(#:tests? #f)) ; test suite doesn't work
2440 (home-page "http://github.com/progrium/pyjwt")
2441 (synopsis "JSON Web Token implementation in Python")
2442 (description
2443 "PyJWT is a JSON Web Token implementation written in Python.")
2444 (license license:expat)))
2445
2446 (define-public python2-pyjwt
2447 (package-with-python2 python-pyjwt))
2448
2449 (define-public python-oauthlib
2450 (package
2451 (name "python-oauthlib")
2452 (version "1.0.3")
2453 (source (origin
2454 (method url-fetch)
2455 (uri (pypi-uri "oauthlib" version))
2456 (sha256
2457 (base32
2458 "1bfrj70vdjxjw74khbyh6f0dksv7p5rh2346jnlrffyacd3gwjzg"))))
2459 (build-system python-build-system)
2460 (native-inputs
2461 `(("python-coverage" ,python-coverage)
2462 ("python-nose" ,python-nose)
2463 ("python-mock" ,python-mock)))
2464 (propagated-inputs
2465 `(("python-blinker" ,python-blinker)
2466 ("python-cryptography" ,python-cryptography)
2467 ("python-pyjwt" ,python-pyjwt)))
2468 (home-page "https://github.com/idan/oauthlib")
2469 (synopsis "OAuth implementation for Python")
2470 (description
2471 "Oauthlib is a generic, spec-compliant, thorough implementation of the
2472 OAuth request-signing logic.")
2473 (license license:bsd-3)
2474 (properties `((python2-variant . ,(delay python2-oauthlib))))))
2475
2476 (define-public python2-oauthlib
2477 (let ((base (package-with-python2 (strip-python2-variant python-oauthlib))))
2478 (package
2479 (inherit base)
2480 (native-inputs `(("python2-unittest2" ,python2-unittest2)
2481 ,@(package-native-inputs base))))))
2482
2483 (define-public python-itsdangerous
2484 (package
2485 (name "python-itsdangerous")
2486 (version "0.24")
2487 (source
2488 (origin
2489 (method url-fetch)
2490 (uri (string-append
2491 "https://pypi.python.org/packages/source/i/itsdangerous/itsdangerous-"
2492 version ".tar.gz"))
2493 (sha256
2494 (base32
2495 "06856q6x675ly542ig0plbqcyab6ksfzijlyf1hzhgg3sgwgrcyb"))))
2496 (build-system python-build-system)
2497 (home-page "http://github.com/mitsuhiko/itsdangerous")
2498 (synopsis "Python library for passing data to/from untrusted environments")
2499 (description
2500 "Itsdangerous provides various helpers to pass trusted data to untrusted
2501 environments and back.")
2502 (license license:bsd-3)))
2503
2504 (define-public python2-itsdangerous
2505 (package-with-python2 python-itsdangerous))
2506
2507 (define-public python-pyyaml
2508 (package
2509 (name "python-pyyaml")
2510 (version "3.11")
2511 (source
2512 (origin
2513 (method url-fetch)
2514 (uri (string-append
2515 "https://pypi.python.org/packages/source/P/PyYAML/PyYAML-"
2516 version ".tar.gz"))
2517 (sha256
2518 (base32
2519 "1s26125vfnskng58ym37xhwv8v0mm95b2cwbjfag8prfhy596v63"))))
2520 (build-system python-build-system)
2521 (inputs
2522 `(("libyaml" ,libyaml)))
2523 (home-page "http://pyyaml.org/wiki/PyYAML")
2524 (synopsis "YAML parser and emitter for Python")
2525 (description
2526 "PyYAML is a YAML parser and emitter for Python. PyYAML features a
2527 complete YAML 1.1 parser, Unicode support, pickle support, capable extension
2528 API, and sensible error messages. PyYAML supports standard YAML tags and
2529 provides Python-specific tags that allow to represent an arbitrary Python
2530 object.")
2531 (license license:expat)))
2532
2533 (define-public python2-pyyaml
2534 (package-with-python2 python-pyyaml))
2535
2536 (define-public python-virtualenv
2537 (package
2538 (name "python-virtualenv")
2539 (version "15.0.3")
2540 (source
2541 (origin
2542 (method url-fetch)
2543 (uri (pypi-uri "virtualenv" version))
2544 (sha256
2545 (base32
2546 "07cbajzk8l05k5zhlw0b9wbf2is65bl9v6zrn2a0iyn57w6pd73d"))))
2547 (build-system python-build-system)
2548 (arguments
2549 `(#:phases
2550 (modify-phases %standard-phases
2551 (replace 'check
2552 (lambda _
2553 ;; Disable failing test. See upstream bug report
2554 ;; https://github.com/pypa/virtualenv/issues/957
2555 (substitute* "tests/test_virtualenv.py"
2556 (("skipif.*") "skipif(True, reason=\"Guix\")\n"))
2557 (zero? (system* "py.test")))))))
2558 (native-inputs
2559 `(("python-mock" ,python-mock)
2560 ("python-pytest" ,python-pytest)))
2561 (home-page "https://virtualenv.pypa.io/")
2562 (synopsis "Virtual Python environment builder")
2563 (description
2564 "Virtualenv is a tool to create isolated Python environments.")
2565 (license license:expat)))
2566
2567 (define-public python2-virtualenv
2568 (package-with-python2 python-virtualenv))
2569
2570 (define-public python-markupsafe
2571 (package
2572 (name "python-markupsafe")
2573 (version "0.23")
2574 (source
2575 (origin
2576 (method url-fetch)
2577 (uri (string-append
2578 "https://pypi.python.org/packages/source/M/MarkupSafe/MarkupSafe-"
2579 version ".tar.gz"))
2580 (sha256
2581 (base32
2582 "1hvip33wva3fnmvfp9x5klqri7hpl1hkgqmjbss18nmrb7zimv54"))))
2583 (build-system python-build-system)
2584 (home-page "http://github.com/mitsuhiko/markupsafe")
2585 (synopsis "XML/HTML/XHTML markup safe string implementation for Python")
2586 (description
2587 "Markupsafe provides an XML/HTML/XHTML markup safe string implementation
2588 for Python.")
2589 (license license:bsd-3)))
2590
2591 (define-public python2-markupsafe
2592 (package-with-python2 python-markupsafe))
2593
2594 (define-public python-jinja2
2595 (package
2596 (name "python-jinja2")
2597 (version "2.8")
2598 (source
2599 (origin
2600 (method url-fetch)
2601 (uri (pypi-uri "Jinja2" version))
2602 (sha256
2603 (base32
2604 "1x0v41lp5m1pjix3l46zx02b7lqp2hflgpnxwkywxynvi3zz47xw"))))
2605 (build-system python-build-system)
2606 (propagated-inputs
2607 `(("python-markupsafe" ,python-markupsafe)))
2608 (home-page "http://jinja.pocoo.org/")
2609 (synopsis "Python template engine")
2610 (description
2611 "Jinja2 is a small but fast and easy to use stand-alone template engine
2612 written in pure Python.")
2613 (license license:bsd-3)))
2614
2615 (define-public python2-jinja2
2616 (package-with-python2 python-jinja2))
2617
2618 (define-public python-pystache
2619 (package
2620 (name "python-pystache")
2621 (version "0.5.4")
2622 (source (origin
2623 (method url-fetch)
2624 (uri (pypi-uri "pystache" version))
2625 (sha256
2626 (base32
2627 "0nmqsfmiw4arjxqkmf9z66ml950pcdjk6aq4gin4sywmzdjw5fzp"))))
2628 (build-system python-build-system)
2629 (home-page "http://defunkt.io/pystache/")
2630 (synopsis "Python logic-less template engine")
2631 (description
2632 "Pystache is a Python implementation of the framework agnostic,
2633 logic-free templating system Mustache.")
2634 (license license:expat)))
2635
2636 (define-public python2-pystache
2637 (package-with-python2 python-pystache))
2638
2639 (define-public python-joblib
2640 (package
2641 (name "python-joblib")
2642 (version "0.10.3")
2643 (source (origin
2644 (method url-fetch)
2645 (uri (pypi-uri "joblib" version))
2646 (sha256
2647 (base32
2648 "0787k919zlfmgymprz5bzv0v1df5bbirlf3awrghmjgvkrd9dci9"))))
2649 (build-system python-build-system)
2650 (arguments
2651 `(#:phases
2652 (modify-phases %standard-phases
2653 (add-before 'check 'disable-failing-tests
2654 (lambda _
2655 ;; This numpydoc tests fails for unknown reasons
2656 (delete-file "doc/sphinxext/numpydoc/tests/test_docscrape.py")
2657 ;; This numpydoc test depends on matplotlib, which is not a
2658 ;; required input.
2659 (delete-file "doc/sphinxext/numpydoc/tests/test_plot_directive.py")
2660 ;; These tests fail to execute sys.executable
2661 (substitute* "joblib/test/test_parallel.py"
2662 (("import nose" line)
2663 (string-append "from nose.plugins.skip import SkipTest\n" line))
2664 (("def test_nested_parallel_warnings" line)
2665 (string-append "@SkipTest\n" line))
2666 (("def test_parallel_with_interactively_defined_functions" line)
2667 (string-append "@SkipTest\n" line)))
2668 #t)))))
2669 (native-inputs
2670 `(("python-nose" ,python-nose)
2671 ("python-sphinx" ,python-sphinx)
2672 ("python-docutils" ,python-docutils)
2673 ("python-numpydoc" ,python-numpydoc)))
2674 (home-page "http://pythonhosted.org/joblib/")
2675 (synopsis "Using Python functions as pipeline jobs")
2676 (description
2677 "Joblib is a set of tools to provide lightweight pipelining in Python.
2678 In particular, joblib offers: transparent disk-caching of the output values
2679 and lazy re-evaluation (memoize pattern), easy simple parallel computing
2680 logging and tracing of the execution.")
2681 (license license:bsd-3)))
2682
2683 (define-public python2-joblib
2684 (package-with-python2 python-joblib))
2685
2686 (define-public python-docutils
2687 (package
2688 (name "python-docutils")
2689 (version "0.12")
2690 (source
2691 (origin
2692 (method url-fetch)
2693 (uri (string-append
2694 "https://pypi.python.org/packages/source/d/docutils/docutils-"
2695 version ".tar.gz"))
2696 (sha256
2697 (base32
2698 "1ylnjnw1x4b2y7blr6x35ncdzn69k253kw4cdkv6asdb21w73ny7"))))
2699 (build-system python-build-system)
2700 (arguments
2701 '(#:tests? #f)) ; no setup.py test command
2702 (home-page "http://docutils.sourceforge.net/")
2703 (synopsis "Python Documentation Utilities")
2704 (description
2705 "Docutils is a modular system for processing documentation into useful
2706 formats, such as HTML, XML, and LaTeX. For input Docutils supports
2707 reStructuredText.")
2708 ;; Most of the source code is public domain, but some source files are
2709 ;; licensed under the PFSL, BSD 2-clause, and GPLv3+ licenses.
2710 (license (list license:public-domain license:psfl license:bsd-2 license:gpl3+))))
2711
2712 (define-public python2-docutils
2713 (package-with-python2 python-docutils))
2714
2715 (define-public python-pygments
2716 (package
2717 (name "python-pygments")
2718 (version "2.0.2")
2719 (source
2720 (origin
2721 (method url-fetch)
2722 (uri (pypi-uri "Pygments" version))
2723 (sha256
2724 (base32
2725 "0lagrwifsgn0s8bzqahpr87p7gd38xja8f06akscinp6hj89283k"))))
2726 (build-system python-build-system)
2727 (home-page "http://pygments.org/")
2728 (synopsis "Syntax highlighting")
2729 (description
2730 "Pygments is a syntax highlighting package written in Python.")
2731 (license license:bsd-2)))
2732
2733 (define-public python2-pygments
2734 (package-with-python2 python-pygments))
2735
2736 (define-public python-sphinx
2737 (package
2738 (name "python-sphinx")
2739 (version "1.2.3")
2740 (source
2741 (origin
2742 (method url-fetch)
2743 (uri (string-append
2744 "https://pypi.python.org/packages/source/S/Sphinx/Sphinx-"
2745 version ".tar.gz"))
2746 (sha256
2747 (base32
2748 "011xizm3jnmf4cvs5i6kgf6c5nn046h79i8j0vd0f27yw9j3p4wl"))))
2749 (build-system python-build-system)
2750 (propagated-inputs
2751 `(("python-jinja2" ,python-jinja2)
2752 ("python-docutils" ,python-docutils)
2753 ("python-pygments" ,python-pygments)))
2754 (home-page "http://sphinx-doc.org/")
2755 (synopsis "Python documentation generator")
2756 (description "Sphinx is a tool that makes it easy to create documentation
2757 for Python projects or other documents consisting of multiple reStructuredText
2758 sources.")
2759 (license license:bsd-3)))
2760
2761 (define-public python2-sphinx
2762 (package-with-python2 python-sphinx))
2763
2764 (define-public python-sphinx-rtd-theme
2765 (package
2766 (name "python-sphinx-rtd-theme")
2767 (version "0.1.6")
2768 (source
2769 (origin
2770 (method url-fetch)
2771 (uri (string-append "https://pypi.python.org/packages/source/s/"
2772 "sphinx_rtd_theme/sphinx_rtd_theme-"
2773 version ".tar.gz"))
2774 (sha256
2775 (base32
2776 "19nw3rn7awplcdrz63kg1njqwkbymfg9lwn7l2grhdyhyr2gaa8g"))))
2777 (build-system python-build-system)
2778 (home-page "https://github.com/snide/sphinx_rtd_theme/")
2779 (synopsis "ReadTheDocs.org theme for Sphinx")
2780 (description "A theme for Sphinx used by ReadTheDocs.org.")
2781 (license license:expat)))
2782
2783 (define-public python2-sphinx-rtd-theme
2784 (package-with-python2 python-sphinx-rtd-theme))
2785
2786 (define-public python-feedgenerator
2787 (package
2788 (name "python-feedgenerator")
2789 (version "1.8")
2790 (source
2791 (origin
2792 (method url-fetch)
2793 (uri (pypi-uri "feedgenerator" version))
2794 (sha256
2795 (base32
2796 "0mkimp1fpdan4p3882vzcws4l594k71ich4g0wq97jbra7p602n0"))))
2797 (build-system python-build-system)
2798 (propagated-inputs
2799 `(("python-pytz" ,python-pytz)
2800 ("python-six" ,python-six)))
2801 (home-page "https://github.com/getpelican/feedgenerator")
2802 (synopsis
2803 "Standalone version of Django's Atom/RSS feed generator")
2804 (description
2805 "Feedgenerator-py3k is a standalone version of Django's feedgenerator,
2806 which can produce feeds in RSS 2.0, RSS 0.91, and Atom formats.")
2807 (license license:bsd-3)))
2808
2809 (define-public python2-feedgenerator
2810 (package-with-python2 python-feedgenerator))
2811
2812 (define-public python-blinker
2813 (package
2814 (name "python-blinker")
2815 (version "1.4")
2816 (source
2817 (origin
2818 (method url-fetch)
2819 (uri (pypi-uri "blinker" version))
2820 (sha256
2821 (base32
2822 "1dpq0vb01p36jjwbhhd08ylvrnyvcc82yxx3mwjx6awrycjyw6j7"))))
2823 (build-system python-build-system)
2824 ;; No "test" command supplied to setuptools, so unless there's another way
2825 ;; to run tests, we're skipping them!
2826 (arguments '(#:tests? #f))
2827 (home-page "http://pythonhosted.org/blinker/")
2828 (synopsis "Fast, simple object-to-object and broadcast signaling")
2829 (description
2830 "Blinker provides a fast dispatching system that allows any number of
2831 interested parties to subscribe to events, or \"signals\".")
2832 (license license:expat)))
2833
2834 (define-public python2-blinker
2835 (package-with-python2 python-blinker))
2836
2837 (define-public pelican
2838 (package
2839 (name "pelican")
2840 (version "3.6.3")
2841 (source
2842 (origin
2843 (method url-fetch)
2844 (uri (pypi-uri "pelican" version))
2845 (sha256
2846 (base32
2847 "1hn94rb4q3zmcq16in055xikal4dba5hfx3zznq7warllcgc9f8k"))))
2848 (build-system python-build-system)
2849 (propagated-inputs
2850 `(("python-feedgenerator" ,python-feedgenerator)
2851 ("python-jinja2" ,python-jinja2)
2852 ("python-pygments" ,python-pygments)
2853 ("python-docutils" ,python-docutils)
2854 ("python-pytz" ,python-pytz)
2855 ("python-blinker" ,python-blinker)
2856 ("python-unidecode" ,python-unidecode)
2857 ("python-six" ,python-six)
2858 ("python-dateutil-2" ,python-dateutil-2)))
2859 (home-page "http://getpelican.com/")
2860 (arguments
2861 `(;; XXX Requires a lot more packages to do unit tests :P
2862 #:tests? #f
2863 #:phases (modify-phases %standard-phases
2864 (add-before
2865 'install 'adjust-requires
2866 ;; Since feedgenerator is installed from git, it doesn't
2867 ;; conform to the version requirements.
2868 ;;
2869 ;; We *do have* "feedgenerator >= 1.6", but strip off the
2870 ;; version requirement so setuptools doesn't get confused.
2871 (lambda _
2872 (substitute* "setup.py"
2873 (("['\"]feedgenerator.*?['\"]")
2874 "'feedgenerator'")))))))
2875 (synopsis "Python-based static site publishing system")
2876 (description
2877 "Pelican is a tool to generate a static blog from reStructuredText,
2878 Markdown input files, and more. Pelican uses Jinja2 for templating
2879 and is very extensible.")
2880 (license license:agpl3+)))
2881
2882 (define-public python-scikit-learn
2883 (package
2884 (name "python-scikit-learn")
2885 (version "0.16.1")
2886 (source
2887 (origin
2888 (method url-fetch)
2889 (uri (string-append
2890 "https://github.com/scikit-learn/scikit-learn/archive/"
2891 version ".tar.gz"))
2892 (file-name (string-append name "-" version ".tar.gz"))
2893 (sha256
2894 (base32
2895 "140skabifgc7lvvj873pnzlwx0ni6q8qkrsyad2ccjb3h8rxzkih"))))
2896 (build-system python-build-system)
2897 (arguments
2898 `(#:phases
2899 (alist-cons-before
2900 'check 'set-HOME
2901 ;; some tests require access to "$HOME"
2902 (lambda _ (setenv "HOME" "/tmp"))
2903 ;; Tests can only be run after the library has been installed and not
2904 ;; within the source directory.
2905 (alist-cons-after
2906 'install 'check
2907 (lambda _
2908 (with-directory-excursion "/tmp"
2909 ;; With Python 3 one test of 3334 fails
2910 ;; (sklearn.tests.test_common.test_transformers); see
2911 ;; https://github.com/scikit-learn/scikit-learn/issues/3693
2912 (system* "nosetests" "-v" "sklearn")))
2913 (alist-delete 'check %standard-phases)))))
2914 (inputs
2915 `(("openblas" ,openblas)))
2916 (native-inputs
2917 `(("python-nose" ,python-nose)))
2918 (propagated-inputs
2919 `(("python-numpy" ,python-numpy)
2920 ("python-scipy" ,python-scipy)))
2921 (home-page "http://scikit-learn.org/")
2922 (synopsis "Machine Learning in Python")
2923 (description
2924 "Scikit-learn provides simple and efficient tools for data
2925 mining and data analysis.")
2926 (license license:bsd-3)
2927 (properties `((python2-variant . ,(delay python2-scikit-learn))))))
2928
2929 (define-public python2-scikit-learn
2930 (package-with-python2 (strip-python2-variant python-scikit-learn)))
2931
2932 (define-public python-scikit-image
2933 (package
2934 (name "python-scikit-image")
2935 (version "0.11.3")
2936 (source
2937 (origin
2938 (method url-fetch)
2939 (uri (string-append
2940 "https://pypi.python.org/packages/source/s/scikit-image/scikit-image-"
2941 version ".tar.gz"))
2942 (sha256
2943 (base32 "0jz416fqvpahqyffw8plmszzfj669w8wvf3y9clnr5lr6a7md3kn"))))
2944 (build-system python-build-system)
2945 (propagated-inputs
2946 `(("python-matplotlib" ,python-matplotlib)
2947 ("python-networkx" ,python-networkx)
2948 ("python-numpy" ,python-numpy)
2949 ("python-scipy" ,python-scipy)
2950 ("python-six" ,python-six)
2951 ("python-pillow" ,python-pillow)))
2952 (native-inputs
2953 `(("python-cython" ,python-cython)))
2954 (home-page "http://scikit-image.org/")
2955 (synopsis "Image processing in Python")
2956 (description
2957 "Scikit-image is a collection of algorithms for image processing.")
2958 (license license:bsd-3)
2959 (properties `((python2-variant . ,(delay python2-scikit-image))))))
2960
2961 (define-public python2-scikit-image
2962 (let ((scikit-image (package-with-python2
2963 (strip-python2-variant python-scikit-image))))
2964 (package (inherit scikit-image)
2965 (native-inputs
2966 `(("python2-mock" ,python2-mock)
2967 ,@(package-native-inputs scikit-image)))
2968 (propagated-inputs
2969 `(("python2-pytz" ,python2-pytz)
2970 ,@(package-propagated-inputs scikit-image))))))
2971
2972 (define-public python-redis
2973 (package
2974 (name "python-redis")
2975 (version "2.10.3")
2976 (source
2977 (origin
2978 (method url-fetch)
2979 (uri (string-append
2980 "https://pypi.python.org/packages/source/r/redis/redis-"
2981 version ".tar.gz"))
2982 (sha256
2983 (base32 "1701qjwn4n05q90fdg4bsg96s27xf5s4hsb4gxhv3xk052q3gyx4"))))
2984 (build-system python-build-system)
2985 ;; Tests require a running Redis server
2986 (arguments '(#:tests? #f))
2987 (native-inputs
2988 `(("python-pytest" ,python-pytest)))
2989 (home-page "https://github.com/andymccurdy/redis-py")
2990 (synopsis "Redis Python client")
2991 (description
2992 "This package provides a Python interface to the Redis key-value store.")
2993 (license license:expat)))
2994
2995 (define-public python2-redis
2996 (package-with-python2 python-redis))
2997
2998 (define-public python-rq
2999 (package
3000 (name "python-rq")
3001 (version "0.5.2")
3002 (source
3003 (origin
3004 (method url-fetch)
3005 (uri (string-append
3006 "https://pypi.python.org/packages/source/r/rq/rq-"
3007 version ".tar.gz"))
3008 (sha256
3009 (base32 "0b0z5hn8wkfg300hx7816csgv3bcfamlr29fi3yzgqmpqxwj3fix"))))
3010 (build-system python-build-system)
3011 (propagated-inputs
3012 `(("python-click" ,python-click)
3013 ("python-redis" ,python-redis)))
3014 (home-page "http://python-rq.org/")
3015 (synopsis "Simple job queues for Python")
3016 (description
3017 "RQ (Redis Queue) is a simple Python library for queueing jobs and
3018 processing them in the background with workers. It is backed by Redis and it
3019 is designed to have a low barrier to entry.")
3020 (license license:bsd-2)))
3021
3022 (define-public python2-rq
3023 (package-with-python2 python-rq))
3024
3025 (define-public python-cython
3026 (package
3027 (name "python-cython")
3028 (version "0.24.1")
3029 (source
3030 (origin
3031 (method url-fetch)
3032 (uri (pypi-uri "Cython" version))
3033 (sha256
3034 (base32
3035 "1fg7fmpvfcq9md4ncyqnnylyjy4z3ksdrshzis95g1sh03d8z044"))))
3036 (build-system python-build-system)
3037 ;; we need the full python package and not just the python-wrapper
3038 ;; because we need libpython3.3m.so
3039 (inputs
3040 `(("python" ,python)))
3041 (arguments
3042 `(#:phases
3043 (modify-phases %standard-phases
3044 (add-before 'check 'set-HOME
3045 ;; some tests require access to "$HOME/.cython"
3046 (lambda _ (setenv "HOME" "/tmp")))
3047 (replace 'check
3048 (lambda _ (zero? (system* "python" "runtests.py" "-vv")))))))
3049 (home-page "http://cython.org/")
3050 (synopsis "C extensions for Python")
3051 (description "Cython is an optimising static compiler for both the Python
3052 programming language and the extended Cython programming language. It makes
3053 writing C extensions for Python as easy as Python itself.")
3054 (license license:asl2.0)
3055 (properties `((python2-variant . ,(delay python2-cython))))))
3056
3057 (define-public python2-cython
3058 (package (inherit (package-with-python2
3059 (strip-python2-variant python-cython)))
3060 (name "python2-cython")
3061 (inputs
3062 `(("python-2" ,python-2))))) ; this is not automatically changed
3063
3064 ;; The RPython toolchain currently does not support Python 3.
3065 (define-public python2-rpython
3066 (package
3067 (name "python2-rpython")
3068 (version "0.1.4")
3069 (source
3070 (origin
3071 (method url-fetch)
3072 (uri (pypi-uri "rpython" version))
3073 (sha256
3074 (base32
3075 "07pps06fq4c4wmi5ii0sgh9zgwniz5y7frqhm28g3a154l163fxc"))))
3076 (build-system python-build-system)
3077 (arguments `(#:python ,python-2))
3078 (native-inputs
3079 `(("python2-pytest" ,python2-pytest))) ; needed for running tests
3080 (home-page "https://rpython.readthedocs.org")
3081 (synopsis "Framework for implementing interpreters and virtual machines")
3082 (description "RPython is a translation and support framework for
3083 producing implementations of dynamic languages, emphasizing a clean separation
3084 between language specification and implementation aspects.")
3085 (license license:expat)))
3086
3087 ;; This version of numpy is missing the documentation and is only used to
3088 ;; build matplotlib which is required to build numpy's documentation.
3089 (define python-numpy-bootstrap
3090 (package
3091 (name "python-numpy-bootstrap")
3092 (version "1.10.4")
3093 (source
3094 (origin
3095 (method url-fetch)
3096 (uri (string-append "mirror://sourceforge/numpy/NumPy/" version
3097 "/numpy-" version ".tar.gz"))
3098 (sha256
3099 (base32
3100 "1bjjhvncraka5s6i4lg644jrxij6bvycxy7an20gcz3a0m11iygp"))))
3101 (build-system python-build-system)
3102 (inputs
3103 `(("openblas" ,openblas)
3104 ("lapack" ,lapack)))
3105 (native-inputs
3106 `(("python-nose" ,python-nose)
3107 ("gfortran" ,gfortran)))
3108 (arguments
3109 `(#:phases
3110 (modify-phases %standard-phases
3111 (add-before 'build 'set-environment-variables
3112 (lambda* (#:key inputs #:allow-other-keys)
3113 (call-with-output-file "site.cfg"
3114 (lambda (port)
3115 (format port
3116 "[openblas]
3117 libraries = openblas
3118 library_dirs = ~a/lib
3119 include_dirs = ~a/include
3120
3121 # backslash-n to make emacs happy
3122 \n[lapack]
3123 lapack_libs = lapack
3124 library_dirs = ~a/lib
3125 include_dirs = ~a/include
3126 "
3127 (assoc-ref inputs "openblas")
3128 (assoc-ref inputs "openblas")
3129 (assoc-ref inputs "lapack")
3130 (assoc-ref inputs "lapack"))))
3131 ;; Use "gcc" executable, not "cc".
3132 (substitute* "numpy/distutils/system_info.py"
3133 (("c = distutils\\.ccompiler\\.new_compiler\\(\\)")
3134 "c = distutils.ccompiler.new_compiler(); c.set_executables(compiler='gcc',compiler_so='gcc',linker_exe='gcc',linker_so='gcc -shared')"))
3135 #t))
3136 ;; Tests can only be run after the library has been installed and not
3137 ;; within the source directory.
3138 (delete 'check)
3139 (add-after 'install 'check
3140 (lambda* (#:key outputs inputs #:allow-other-keys)
3141 ;; Make installed package available for running the tests
3142 (add-installed-pythonpath inputs outputs)
3143 (with-directory-excursion "/tmp"
3144 (zero? (system* "python" "-c"
3145 "import numpy; numpy.test(verbose=2)"))))))))
3146 (home-page "http://www.numpy.org/")
3147 (synopsis "Fundamental package for scientific computing with Python")
3148 (description "NumPy is the fundamental package for scientific computing
3149 with Python. It contains among other things: a powerful N-dimensional array
3150 object, sophisticated (broadcasting) functions, tools for integrating C/C++
3151 and Fortran code, useful linear algebra, Fourier transform, and random number
3152 capabilities.")
3153 (license license:bsd-3)))
3154
3155 (define python2-numpy-bootstrap
3156 (package-with-python2 python-numpy-bootstrap))
3157
3158 (define-public python2-fastlmm
3159 (package
3160 (name "python2-fastlmm")
3161 (version "0.2.21")
3162 (source
3163 (origin
3164 (method url-fetch)
3165 (uri (pypi-uri "fastlmm" version ".zip"))
3166 (sha256
3167 (base32
3168 "1q8c34rpmwkfy3r4d5172pzdkpfryj561897z9r3x22gq7813x1m"))))
3169 (build-system python-build-system)
3170 (arguments
3171 `(#:python ,python-2)) ; only Python 2.7 is supported
3172 (propagated-inputs
3173 `(("python2-numpy" ,python2-numpy)
3174 ("python2-scipy" ,python2-scipy)
3175 ("python2-matplotlib" ,python2-matplotlib)
3176 ("python2-pandas" ,python2-pandas)
3177 ("python2-scikit-learn" ,python2-scikit-learn)
3178 ("python2-pysnptools" ,python2-pysnptools)))
3179 (native-inputs
3180 `(("unzip" ,unzip)
3181 ("python2-cython" ,python2-cython)
3182 ("python2-mock" ,python2-mock)))
3183 (home-page "http://research.microsoft.com/en-us/um/redmond/projects/mscompbio/fastlmm/")
3184 (synopsis "Perform genome-wide association studies on large data sets")
3185 (description
3186 "FaST-LMM, which stands for Factored Spectrally Transformed Linear Mixed
3187 Models, is a program for performing both single-SNP and SNP-set genome-wide
3188 association studies (GWAS) on extremely large data sets.")
3189 (license license:asl2.0)))
3190
3191 (define-public python-numpy
3192 (package (inherit python-numpy-bootstrap)
3193 (name "python-numpy")
3194 (outputs '("out" "doc"))
3195 (inputs
3196 `(("which" ,which)))
3197 (propagated-inputs
3198 `(("python-matplotlib" ,python-matplotlib)
3199 ("python-pyparsing" ,python-pyparsing)
3200 ,@(package-inputs python-numpy-bootstrap)))
3201 (native-inputs
3202 `(("pkg-config" ,pkg-config)
3203 ("python-sphinx" ,python-sphinx)
3204 ("python-numpydoc" ,python-numpydoc)
3205 ("texlive" ,texlive)
3206 ("texinfo" ,texinfo)
3207 ("perl" ,perl)
3208 ,@(package-native-inputs python-numpy-bootstrap)))
3209 (arguments
3210 `(,@(substitute-keyword-arguments
3211 (package-arguments python-numpy-bootstrap)
3212 ((#:phases phases)
3213 `(alist-cons-after
3214 'install 'install-doc
3215 (lambda* (#:key inputs outputs #:allow-other-keys)
3216 ;; Make installed package available for building the
3217 ;; documentation
3218 (add-installed-pythonpath inputs outputs)
3219 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
3220 (doc (string-append
3221 data "/doc/" ,name "-"
3222 ,(package-version python-numpy-bootstrap)))
3223 (info (string-append data "/info"))
3224 (html (string-append doc "/html"))
3225 (pyver ,(string-append "PYVER=")))
3226 (with-directory-excursion "doc"
3227 (mkdir-p html)
3228 (system* "make" "html" pyver)
3229 (system* "make" "latex" "PAPER=a4" pyver)
3230 (system* "make" "-C" "build/latex"
3231 "all-pdf" "PAPER=a4" pyver)
3232 ;; FIXME: Generation of the info file fails.
3233 ;; (system* "make" "info" pyver)
3234 ;; (mkdir-p info)
3235 ;; (copy-file "build/texinfo/numpy.info"
3236 ;; (string-append info "/numpy.info"))
3237 (for-each (lambda (file)
3238 (copy-file (string-append "build/latex" file)
3239 (string-append doc file)))
3240 '("/numpy-ref.pdf" "/numpy-user.pdf"))
3241 (with-directory-excursion "build/html"
3242 (for-each (lambda (file)
3243 (let* ((dir (dirname file))
3244 (tgt-dir (string-append html "/" dir)))
3245 (unless (equal? "." dir)
3246 (mkdir-p tgt-dir))
3247 (install-file file html)))
3248 (find-files "." ".*"))))))
3249 ,phases)))))))
3250
3251 (define-public python2-numpy
3252 (package-with-python2 python-numpy))
3253
3254 (define-public python-pyparsing
3255 (package
3256 (name "python-pyparsing")
3257 (version "2.0.3")
3258 (source
3259 (origin
3260 (method url-fetch)
3261 (uri (string-append "mirror://sourceforge/pyparsing/pyparsing"
3262 "/pyparsing-" version
3263 "/pyparsing-" version ".tar.gz"))
3264 (sha256
3265 (base32
3266 "0kw4py7gn45j93q8r7bzajfrjdc3xlsn2yzln41lf9zmrghjkrq6"))))
3267 (build-system python-build-system)
3268 (outputs '("out" "doc"))
3269 (arguments
3270 `(#:tests? #f ; no test target
3271 #:modules ((guix build python-build-system)
3272 (guix build utils))
3273 #:phases
3274 (alist-cons-after
3275 'install 'install-doc
3276 (lambda* (#:key outputs #:allow-other-keys)
3277 (let* ((doc (string-append (assoc-ref outputs "doc")
3278 "/share/doc/" ,name "-" ,version))
3279 (html-doc (string-append doc "/html"))
3280 (examples (string-append doc "/examples")))
3281 (mkdir-p html-doc)
3282 (mkdir-p examples)
3283 (for-each
3284 (lambda (dir tgt)
3285 (map (lambda (file)
3286 (install-file file tgt))
3287 (find-files dir ".*")))
3288 (list "docs" "htmldoc" "examples")
3289 (list doc html-doc examples))))
3290 %standard-phases)))
3291 (home-page "http://pyparsing.wikispaces.com")
3292 (synopsis "Python parsing class library")
3293 (description
3294 "The pyparsing module is an alternative approach to creating and
3295 executing simple grammars, vs. the traditional lex/yacc approach, or the use
3296 of regular expressions. The pyparsing module provides a library of classes
3297 that client code uses to construct the grammar directly in Python code.")
3298 (license license:expat)))
3299
3300 (define-public python2-pyparsing
3301 (package-with-python2 python-pyparsing))
3302
3303 (define-public python-numpydoc
3304 (package
3305 (name "python-numpydoc")
3306 (version "0.5")
3307 (source
3308 (origin
3309 (method url-fetch)
3310 (uri (string-append
3311 "https://pypi.python.org/packages/source/n/numpydoc/numpydoc-"
3312 version ".tar.gz"))
3313 (sha256
3314 (base32
3315 "0d4dnifaxkll50jx6czj05y8cb4ny60njd2wz299sj2jxfy51w4k"))
3316 (modules '((guix build utils)))
3317 (snippet
3318 '(begin
3319 ;; Drop a test requiring matplotlib, which we cannot add as an
3320 ;; input since it would create a circular dependency: Extend the
3321 ;; test for Python 3, where it is already dropped, to Python 2.
3322 (substitute* "numpydoc/tests/test_plot_directive.py"
3323 (("3") "2"))))))
3324 (build-system python-build-system)
3325 (native-inputs
3326 `(("python-docutils" ,python-docutils)
3327 ("python-sphinx" ,python-sphinx)
3328 ("python-nose" ,python-nose)))
3329 (home-page "https://pypi.python.org/pypi/numpydoc")
3330 (synopsis
3331 "Numpy's Sphinx extensions")
3332 (description
3333 "Sphinx extension to support docstrings in Numpy format.")
3334 (license license:bsd-2)))
3335
3336 (define-public python2-numpydoc
3337 (package-with-python2 python-numpydoc))
3338
3339 (define-public python-numexpr
3340 (package
3341 (name "python-numexpr")
3342 (version "2.6.0")
3343 (source
3344 (origin
3345 (method url-fetch)
3346 (uri (pypi-uri "numexpr" version))
3347 (sha256
3348 (base32
3349 "0i6iagl2hhbr8q4qzbbjd859v5806vqylq87fq7pi914ps6d6cag"))))
3350 (build-system python-build-system)
3351 (arguments `(#:tests? #f)) ; no tests included
3352 (propagated-inputs
3353 `(("python-numpy" ,python-numpy)))
3354 (home-page "https://github.com/pydata/numexpr")
3355 (synopsis "Fast numerical expression evaluator for NumPy")
3356 (description
3357 "Numexpr is a fast numerical expression evaluator for NumPy. With it,
3358 expressions that operate on arrays are accelerated and use less memory than
3359 doing the same calculation in Python. In addition, its multi-threaded
3360 capabilities can make use of all your cores, which may accelerate
3361 computations, most specially if they are not memory-bounded (e.g. those using
3362 transcendental functions).")
3363 (license license:expat)))
3364
3365 (define-public python2-numexpr
3366 (package-with-python2 python-numexpr))
3367
3368 (define-public python-matplotlib
3369 (package
3370 (name "python-matplotlib")
3371 (version "1.4.3")
3372 (source
3373 (origin
3374 (method url-fetch)
3375 (uri (string-append "mirror://sourceforge/matplotlib/matplotlib"
3376 "/matplotlib-" version
3377 "/matplotlib-" version ".tar.gz"))
3378 (sha256
3379 (base32
3380 "1dn05cvd0g984lzhh72wa0z93psgwshbbg93fkab6slx5m3l95av"))
3381 (patches (search-patches "matplotlib-setupext-tk.patch"))))
3382 (build-system python-build-system)
3383 (outputs '("out" "doc"))
3384 (propagated-inputs ; the following packages are all needed at run time
3385 `(("python-pyparsing" ,python-pyparsing)
3386 ("python-pygobject" ,python-pygobject)
3387 ("gobject-introspection" ,gobject-introspection)
3388 ("python-tkinter" ,python "tk")
3389 ("python-dateutil" ,python-dateutil-2)
3390 ("python-numpy" ,python-numpy-bootstrap)
3391 ("python-pillow" ,python-pillow)
3392 ("python-pytz" ,python-pytz)
3393 ("python-six" ,python-six)
3394 ;; The 'gtk+' package (and 'gdk-pixbuf', 'atk' and 'pango' propagated
3395 ;; from 'gtk+') provides the required 'typelib' files used by
3396 ;; 'gobject-introspection'. The location of these files is set with the
3397 ;; help of the environment variable GI_TYPELIB_PATH. At build time this
3398 ;; is done automatically by a 'native-search-path' procedure. However,
3399 ;; at run-time the user must set this variable as follows:
3400 ;;
3401 ;; export GI_TYPELIB_PATH=~/.guix-profile/lib/girepository-1.0
3402 ("gtk+" ,gtk+)
3403 ;; From version 1.4.0 'matplotlib' makes use of 'cairocffi' instead of
3404 ;; 'pycairo'. However, 'pygobject' makes use of a 'pycairo' 'context'
3405 ;; object. For this reason we need to import both libraries.
3406 ;; https://pythonhosted.org/cairocffi/cffi_api.html#converting-pycairo
3407 ("python-pycairo" ,python-pycairo)
3408 ("python-cairocffi" ,python-cairocffi)))
3409 (inputs
3410 `(("libpng" ,libpng)
3411 ("imagemagick" ,imagemagick)
3412 ("freetype" ,freetype)
3413 ("cairo" ,cairo)
3414 ("glib" ,glib)
3415 ;; FIXME: Add backends when available.
3416 ;("python-wxpython" ,python-wxpython)
3417 ;("python-pyqt" ,python-pyqt)
3418 ("tcl" ,tcl)
3419 ("tk" ,tk)))
3420 (native-inputs
3421 `(("pkg-config" ,pkg-config)
3422 ("python-sphinx" ,python-sphinx)
3423 ("python-numpydoc" ,python-numpydoc)
3424 ("python-nose" ,python-nose)
3425 ("python-mock" ,python-mock)
3426 ("texlive" ,texlive)
3427 ("texinfo" ,texinfo)))
3428 (arguments
3429 `(#:phases
3430 (alist-cons-before
3431 'build 'configure-environment
3432 (lambda* (#:key outputs inputs #:allow-other-keys)
3433 (let ((cairo (assoc-ref inputs "cairo"))
3434 (gtk+ (assoc-ref inputs "gtk+")))
3435 ;; Setting these directories in the 'basedirlist' of 'setup.cfg'
3436 ;; has not effect.
3437 (setenv "LD_LIBRARY_PATH"
3438 (string-append cairo "/lib:" gtk+ "/lib"))
3439 (setenv "HOME" (getcwd))
3440 (call-with-output-file "setup.cfg"
3441 (lambda (port)
3442 (format port "[directories]~%
3443 basedirlist = ~a,~a~%
3444 [rc_options]~%
3445 backend = TkAgg~%"
3446 (assoc-ref inputs "tcl")
3447 (assoc-ref inputs "tk"))))))
3448 (alist-cons-after
3449 'install 'install-doc
3450 (lambda* (#:key inputs outputs #:allow-other-keys)
3451 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
3452 (doc (string-append data "/doc/" ,name "-" ,version))
3453 (info (string-append data "/info"))
3454 (html (string-append doc "/html")))
3455 ;; Make installed package available for building the
3456 ;; documentation
3457 (add-installed-pythonpath inputs outputs)
3458 (with-directory-excursion "doc"
3459 ;; Produce pdf in 'A4' format.
3460 (substitute* (find-files "." "conf\\.py")
3461 (("latex_paper_size = 'letter'")
3462 "latex_paper_size = 'a4'"))
3463 (mkdir-p html)
3464 (mkdir-p info)
3465 ;; The doc recommends to run the 'html' target twice.
3466 (system* "python" "make.py" "html")
3467 (system* "python" "make.py" "html")
3468 (copy-recursively "build/html" html)
3469 (system* "python" "make.py" "latex")
3470 (system* "python" "make.py" "texinfo")
3471 (symlink (string-append html "/_images")
3472 (string-append info "/matplotlib-figures"))
3473 (with-directory-excursion "build/texinfo"
3474 (substitute* "matplotlib.texi"
3475 (("@image\\{([^,]*)" all file)
3476 (string-append "@image{matplotlib-figures/" file)))
3477 (symlink (string-append html "/_images")
3478 "./matplotlib-figures")
3479 (system* "makeinfo" "--no-split"
3480 "-o" "matplotlib.info" "matplotlib.texi"))
3481 (copy-file "build/texinfo/matplotlib.info"
3482 (string-append info "/matplotlib.info"))
3483 (copy-file "build/latex/Matplotlib.pdf"
3484 (string-append doc "/Matplotlib.pdf")))))
3485 %standard-phases))))
3486 (home-page "http://matplotlib.org")
3487 (synopsis "2D plotting library for Python")
3488 (description
3489 "Matplotlib is a Python 2D plotting library which produces publication
3490 quality figures in a variety of hardcopy formats and interactive environments
3491 across platforms. Matplotlib can be used in Python scripts, the python and
3492 ipython shell, web application servers, and six graphical user interface
3493 toolkits.")
3494 (license license:psfl)
3495 (properties `((python2-variant . ,(delay python2-matplotlib))))))
3496
3497 (define-public python2-matplotlib
3498 (let ((matplotlib (package-with-python2
3499 (strip-python2-variant python-matplotlib))))
3500 (package (inherit matplotlib)
3501 ;; Make sure to use special packages for Python 2 instead
3502 ;; of those automatically rewritten by package-with-python2.
3503 (propagated-inputs
3504 `(("python2-pycairo" ,python2-pycairo)
3505 ("python2-pygobject-2" ,python2-pygobject-2)
3506 ("python2-tkinter" ,python-2 "tk")
3507 ,@(fold alist-delete (package-propagated-inputs matplotlib)
3508 '("python-pycairo" "python-pygobject" "python-tkinter")))))))
3509
3510 (define-public python2-pysnptools
3511 (package
3512 (name "python2-pysnptools")
3513 (version "0.3.9")
3514 (source
3515 (origin
3516 (method url-fetch)
3517 (uri (pypi-uri "pysnptools" version ".zip"))
3518 (sha256
3519 (base32
3520 "1wybggjzz8zw7aav4pjsg2h22xp17a1lghrprza1pxwlm7wf96y2"))))
3521 (build-system python-build-system)
3522 (arguments
3523 `(#:python ,python-2)) ; only Python 2.7 is supported
3524 (propagated-inputs
3525 `(("python2-numpy" ,python2-numpy)
3526 ("python2-scipy" ,python2-scipy)
3527 ("python2-pandas" ,python2-pandas)))
3528 (native-inputs
3529 `(("python2-cython" ,python2-cython)))
3530 (native-inputs
3531 `(("unzip" ,unzip)))
3532 (home-page "http://research.microsoft.com/en-us/um/redmond/projects/mscompbio/")
3533 (synopsis "Library for reading and manipulating genetic data")
3534 (description
3535 "PySnpTools is a library for reading and manipulating genetic data. It
3536 can, for example, efficiently read whole PLINK *.bed/bim/fam files or parts of
3537 those files. It can also efficiently manipulate ranges of integers using set
3538 operators such as union, intersection, and difference.")
3539 (license license:asl2.0)))
3540
3541 (define-public python-rpy2
3542 (package
3543 (name "python-rpy2")
3544 (version "2.7.6")
3545 (source
3546 (origin
3547 (method url-fetch)
3548 (uri (pypi-uri "rpy2" version))
3549 (sha256
3550 (base32
3551 "0nhan2qvrw7b7gg5zddwa22kybdv3x1g26vkd7q8lvnkgzrs4dga"))))
3552 (build-system python-build-system)
3553 (propagated-inputs
3554 `(("python-six" ,python-six)))
3555 (inputs
3556 `(("readline" ,readline)
3557 ("icu4c" ,icu4c)
3558 ("pcre" ,pcre)
3559 ("r" ,r)))
3560 (native-inputs
3561 `(("zlib" ,zlib)))
3562 (home-page "http://rpy.sourceforge.net/")
3563 (synopsis "Python interface to the R language")
3564 (description "rpy2 is a redesign and rewrite of rpy. It is providing a
3565 low-level interface to R from Python, a proposed high-level interface,
3566 including wrappers to graphical libraries, as well as R-like structures and
3567 functions.")
3568 (license license:gpl3+)))
3569
3570 (define-public python2-rpy2
3571 (let ((rpy2 (package-with-python2 python-rpy2)))
3572 (package (inherit rpy2)
3573 (native-inputs
3574 `(("python2-singledispatch" ,python2-singledispatch)
3575 ,@(package-native-inputs rpy2))))))
3576
3577 (define-public python-scipy
3578 (package
3579 (name "python-scipy")
3580 (version "0.16.0")
3581 (source
3582 (origin
3583 (method url-fetch)
3584 ; http://downloads.sourceforge.net/project/scipy/scipy/0.16.1/scipy-0.16.1.tar.gz
3585 (uri (string-append "mirror://sourceforge/scipy/scipy/" version
3586 "/scipy-" version ".tar.xz"))
3587 (sha256
3588 (base32
3589 "0wa0a4skpda3gx7lb12yn19nhbairlyxrvda2lz2bcawk3x5qzz2"))))
3590 (build-system python-build-system)
3591 (propagated-inputs
3592 `(("python-numpy" ,python-numpy)
3593 ("python-matplotlib" ,python-matplotlib)
3594 ("python-pyparsing" ,python-pyparsing)))
3595 (inputs
3596 `(("lapack" ,lapack)
3597 ("openblas" ,openblas)))
3598 (native-inputs
3599 `(("python-nose" ,python-nose)
3600 ("python-sphinx" ,python-sphinx)
3601 ("python-numpydoc" ,python-numpydoc)
3602 ("gfortran" ,gfortran)
3603 ("texlive" ,texlive)
3604 ("perl" ,perl)))
3605 (outputs '("out" "doc"))
3606 (arguments
3607 `(#:phases
3608 (alist-cons-before
3609 'build 'configure-openblas
3610 (lambda* (#:key inputs #:allow-other-keys)
3611 (call-with-output-file "site.cfg"
3612 (lambda (port)
3613 (format port
3614 "[blas]
3615 libraries = openblas
3616 library_dirs = ~a/lib
3617 include_dirs = ~a/include
3618
3619 # backslash-n to make emacs happy
3620 \n[atlas]
3621 library_dirs = ~a/lib
3622 atlas_libs = openblas
3623 "
3624 (assoc-ref inputs "openblas")
3625 (assoc-ref inputs "openblas")
3626 (assoc-ref inputs "openblas"))))
3627 #t)
3628 (alist-cons-after
3629 'install 'install-doc
3630 (lambda* (#:key inputs outputs #:allow-other-keys)
3631 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
3632 (doc (string-append data "/doc/" ,name "-" ,version))
3633 (html (string-append doc "/html"))
3634 (pyver ,(string-append "PYVER=")))
3635 ;; Make installed package available for building the
3636 ;; documentation
3637 (add-installed-pythonpath inputs outputs)
3638 (with-directory-excursion "doc"
3639 ;; Fix generation of images for mathematical expressions.
3640 (substitute* (find-files "source" "conf\\.py")
3641 (("pngmath_use_preview = True")
3642 "pngmath_use_preview = False"))
3643 (mkdir-p html)
3644 (system* "make" "html" pyver)
3645 (system* "make" "latex" "PAPER=a4" pyver)
3646 (system* "make" "-C" "build/latex" "all-pdf" "PAPER=a4" pyver)
3647 (copy-file "build/latex/scipy-ref.pdf"
3648 (string-append doc "/scipy-ref.pdf"))
3649 (with-directory-excursion "build/html"
3650 (for-each (lambda (file)
3651 (let* ((dir (dirname file))
3652 (tgt-dir (string-append html "/" dir)))
3653 (install-file file html)))
3654 (find-files "." ".*"))))))
3655 ;; Tests can only be run after the library has been installed and not
3656 ;; within the source directory.
3657 (alist-cons-after
3658 'install 'check
3659 (lambda _
3660 (with-directory-excursion "/tmp"
3661 (zero? (system* "python" "-c" "import scipy; scipy.test()"))))
3662 (alist-delete
3663 'check
3664 (alist-cons-after
3665 'unpack 'fix-tests
3666 (lambda _
3667 (substitute* "scipy/integrate/tests/test_quadpack.py"
3668 (("libm.so") "libm.so.6"))
3669 #t)
3670 %standard-phases)))))))
3671 (home-page "http://www.scipy.org/")
3672 (synopsis "The Scipy library provides efficient numerical routines")
3673 (description "The SciPy library is one of the core packages that make up
3674 the SciPy stack. It provides many user-friendly and efficient numerical
3675 routines such as routines for numerical integration and optimization.")
3676 (license license:bsd-3)))
3677
3678 (define-public python2-scipy
3679 (package-with-python2 python-scipy))
3680
3681 (define-public python-socksipy-branch
3682 (package
3683 (name "python-socksipy-branch")
3684 (version "1.01")
3685 (source
3686 (origin
3687 (method url-fetch)
3688 (uri (pypi-uri "SocksiPy-branch" version))
3689 (sha256
3690 (base32
3691 "01l41v4g7fy9fzvinmjxy6zcbhgqaif8dhdqm4w90fwcw9h51a8p"))))
3692 (build-system python-build-system)
3693 (arguments
3694 `(#:tests? #f)) ; There are no tests
3695 (home-page "https://code.google.com/archive/p/socksipy-branch/")
3696 (synopsis "Python SOCKS module")
3697 (description
3698 "SocksiPy - A Python SOCKS client module. It provides a
3699 socket-like interface that supports connections to any TCP
3700 service through the use of a SOCKS4, SOCKS5 or HTTP proxy.
3701 The original version was developed by Dan Haim, this is a
3702 branch created by Mario Vilas to address some open issues,
3703 as the original project seems to have been abandoned circa 2007.")
3704 (license license:bsd-3)))
3705
3706 (define-public python2-socksipy-branch
3707 (package-with-python2 python-socksipy-branch))
3708
3709 (define-public python-sqlalchemy
3710 (package
3711 (name "python-sqlalchemy")
3712 (version "1.0.12")
3713 (source
3714 (origin
3715 (method url-fetch)
3716 (uri (string-append "https://pypi.python.org/packages/source/S/"
3717 "SQLAlchemy/SQLAlchemy-" version ".tar.gz"))
3718 (sha256
3719 (base32
3720 "1l8qclhd0s90w3pvwhi5mjxdwr5j7gw7cjka2fx6f2vqmq7f4yb6"))))
3721 (build-system python-build-system)
3722 (native-inputs
3723 `(("python-cython" ,python-cython) ;for c extensions
3724 ("python-pytest" ,python-pytest)
3725 ("python-mock" ,python-mock))) ;for tests
3726 (arguments
3727 `(#:phases (alist-replace
3728 'check
3729 (lambda _ (zero? (system* "py.test")))
3730 %standard-phases)))
3731 (home-page "http://www.sqlalchemy.org")
3732 (synopsis "Database abstraction library")
3733 (description
3734 "SQLAlchemy is the Python SQL toolkit and Object Relational Mapper that
3735 gives application developers the full power and flexibility of SQL. It
3736 provides a full suite of well known enterprise-level persistence patterns,
3737 designed for efficient and high-performing database access, adapted into a
3738 simple and Pythonic domain language.")
3739 (license license:x11)))
3740
3741 (define-public python2-sqlalchemy
3742 (package-with-python2 python-sqlalchemy))
3743
3744 (define-public python-pycodestyle
3745 (package
3746 (name "python-pycodestyle")
3747 (version "2.0.0")
3748 (source
3749 (origin
3750 (method url-fetch)
3751 (uri (pypi-uri "pycodestyle" version))
3752 (sha256
3753 (base32
3754 "1rz2v8506mdjdyxcnv9ygiw6v0d4dqx8z5sjyjm0w2v32h5l5w1p"))))
3755 (build-system python-build-system)
3756 (home-page "https://pycodestyle.readthedocs.io/")
3757 (synopsis "Python style guide checker")
3758 (description "@code{pycodestyle} (formerly pep8) is a tool to check
3759 Python code against some of the style conventions in
3760 @url{http://www.python.org/dev/peps/pep-0008/,PEP 8}.")
3761 (license license:expat)))
3762
3763 (define-public python2-pycodestyle
3764 (package-with-python2 python-pycodestyle))
3765
3766 (define-public python-orderedmultidict
3767 (package
3768 (name "python-orderedmultidict")
3769 (version "0.7.10")
3770 (source
3771 (origin
3772 (method url-fetch)
3773 (uri (pypi-uri "orderedmultidict" version))
3774 (sha256
3775 (base32
3776 "1gvqk0jd432wsn88kq4svad68xz3r012jfpnhh9in7bqrkyxidky"))))
3777 (build-system python-build-system)
3778 (arguments
3779 `(#:phases
3780 (modify-phases %standard-phases
3781 (add-after 'unpack 'fix-tests
3782 (lambda _
3783 ;; The package uses nosetest for running the tests.
3784 ;; Adding this initfile allows to run the test suite
3785 ;; without requiring nosetest.
3786 (zero? (system* "touch" "tests/__init__.py")))))))
3787 (propagated-inputs
3788 `(("python-six" ,python-six)))
3789 (native-inputs
3790 `(("python-pycodestyle" ,python-pycodestyle)))
3791 (home-page "https://github.com/gruns/orderedmultidict")
3792 (synopsis "Python Ordered Multivalue Dictionary - omdict")
3793 (description "This package contains a library for ordered multivalue
3794 dictionaries. A multivalue dictionary is a dictionary that can store
3795 multiple values for the same key. An ordered multivalue dictionary is a
3796 multivalue dictionary that retains the order of insertions and deletions.")
3797 (license license:unlicense)))
3798
3799 (define-public python2-orderedmultidict
3800 (package-with-python2 python-orderedmultidict))
3801
3802 (define-public python-furl
3803 (package
3804 (name "python-furl")
3805 (version "0.5.6")
3806 (source
3807 (origin
3808 (method url-fetch)
3809 (uri (pypi-uri "furl" version))
3810 (sha256
3811 (base32
3812 "0lzpfpm686hvz3sr1mcrnd1b3lgmnw8v59gb43wfi98r3b671pqc"))))
3813 (build-system python-build-system)
3814 (propagated-inputs
3815 `(("python-six" ,python-six)
3816 ("python-orderedmultidict" ,python-orderedmultidict)))
3817 (native-inputs
3818 `(("python-pycodestyle" ,python-pycodestyle)))
3819 (home-page "https://github.com/gruns/furl")
3820 (synopsis "URL manipulation in Python")
3821 (description "Furl provides an easy-to-use alternative to the
3822 @code{urllib} and @code{urlparse} modules for manipulating URLs.")
3823 (license license:unlicense)))
3824
3825 (define-public python2-furl
3826 (package-with-python2 python-furl))
3827
3828 (define-public python-flask-babel
3829 (package
3830 (name "python-flask-babel")
3831 (version "0.11.1")
3832 (source
3833 (origin
3834 (method url-fetch)
3835 (uri (pypi-uri "Flask-Babel" version))
3836 (sha256
3837 (base32
3838 "16b80cipdba9xj3jlaiaq6wgrgpjb70w3j01jjy9hbp4k71kd6yj"))))
3839 (build-system python-build-system)
3840 (propagated-inputs
3841 `(("python-flask" ,python-flask)
3842 ("python-babel" ,python-babel)
3843 ("python-jinja2" ,python-jinja2)
3844 ("python-pytz" ,python-pytz)))
3845 (home-page "https://github.com/python-babel/flask-babel")
3846 (synopsis "Add i18n/l10n support to Flask applications")
3847 (description "This package implements internationalization and localization
3848 support for Flask. This is based on the Python babel module as well as pytz -
3849 both of which are installed automatically if you install this library.")
3850 (license license:bsd-3)))
3851
3852 (define-public python2-flask-babel
3853 (package-with-python2 python-flask-babel))
3854
3855 (define-public python-sqlalchemy-utils
3856 (package
3857 (name "python-sqlalchemy-utils")
3858 (version "0.32.9")
3859 (source
3860 (origin
3861 (method url-fetch)
3862 (uri (pypi-uri "SQLAlchemy-Utils" version))
3863 (sha256
3864 (base32
3865 "1zbmmh7n8m01ikizn2mj1mfwch26nsr1awv9mvskqry7av0mpy98"))))
3866 (build-system python-build-system)
3867 (propagated-inputs
3868 `(("python-six" ,python-six)
3869 ("python-sqlalchemy" ,python-sqlalchemy)))
3870 (native-inputs
3871 `(("python-pytest" ,python-pytest)))
3872 (home-page "https://github.com/kvesteri/sqlalchemy-utils")
3873 (synopsis "Various utility functions for SQLAlchemy")
3874 (description
3875 "SQLAlchemy-utils provides various utility functions and custom data types
3876 for SQLAlchemy. SQLAlchemy is an SQL database abstraction library for Python.
3877
3878 You might also want to install the following optional dependencies:
3879 @enumerate
3880 @item @code{python-passlib}
3881 @item @code{python-babel}
3882 @item @code{python-cryptography}
3883 @item @code{python-pytz}
3884 @item @code{python-psycopg2}
3885 @item @code{python-furl}
3886 @item @code{python-flask-babel}
3887 @end enumerate
3888 ")
3889 (license license:bsd-3)))
3890
3891 (define-public python2-sqlalchemy-utils
3892 (package-with-python2 python-sqlalchemy-utils))
3893
3894 (define-public python-alembic
3895 (package
3896 (name "python-alembic")
3897 (version "0.8.7")
3898 (source
3899 (origin
3900 (method url-fetch)
3901 (uri (pypi-uri "alembic" version))
3902 (sha256
3903 (base32
3904 "0ias6fdzwr2s220fnjspkdgm9510bd0cnap0hx5y4zy4srba9f3z"))))
3905 (build-system python-build-system)
3906 (native-inputs
3907 `(("python-mock" ,python-mock)
3908 ("python-pytest-cov" ,python-pytest-cov)))
3909 (propagated-inputs
3910 `(("python-sqlalchemy" ,python-sqlalchemy)
3911 ("python-mako" ,python-mako)
3912 ("python-editor" ,python-editor)))
3913 (home-page "http://bitbucket.org/zzzeek/alembic")
3914 (synopsis
3915 "Database migration tool for SQLAlchemy")
3916 (description
3917 "Alembic is a lightweight database migration tool for usage with the
3918 SQLAlchemy Database Toolkit for Python.")
3919 (license license:expat)))
3920
3921 (define-public python2-alembic
3922 (package-with-python2 python-alembic))
3923
3924 (define-public python-distutils-extra
3925 (package
3926 (name "python-distutils-extra")
3927 (version "2.38")
3928 (source
3929 (origin
3930 (method url-fetch)
3931 (uri (string-append "https://launchpad.net/python-distutils-extra/trunk/"
3932 version "/+download/python-distutils-extra-"
3933 version ".tar.gz"))
3934 (sha256
3935 (base32
3936 "0lx15kcbby9zisx33p2h5hgakgwh2bvh0ibag8z0px4j6ifhs41x"))))
3937 (build-system python-build-system)
3938 (home-page "https://launchpad.net/python-distutils-extra/")
3939 (synopsis "Enhancements to Python's distutils")
3940 (description
3941 "The python-distutils-extra module enables you to easily integrate
3942 gettext support, themed icons, and scrollkeeper-based documentation into
3943 Python's distutils.")
3944 (license license:gpl2)))
3945
3946 (define-public python2-distutils-extra
3947 (package-with-python2 python-distutils-extra))
3948
3949 (define-public python2-elib.intl
3950 (package
3951 (name "python2-elib.intl")
3952 (version "0.0.3")
3953 (source
3954 (origin
3955 ;; This project doesn't tag releases or publish tarballs, so we take
3956 ;; source from a (semi-arbitrary, i.e. latest as of now) git commit.
3957 (method git-fetch)
3958 (uri (git-reference
3959 (url "https://github.com/dieterv/elib.intl.git")
3960 (commit "d09997cfef")))
3961 (sha256
3962 (base32
3963 "0y7vzff9xgbnaay7m0va1arl6g68ncwrvbgwl7jqlclsahzzb09d"))))
3964 (build-system python-build-system)
3965 (arguments
3966 ;; incompatible with Python 3 (exception syntax)
3967 `(#:python ,python-2
3968 #:tests? #f))
3969 (home-page "https://github.com/dieterv/elib.intl")
3970 (synopsis "Enhanced internationalization for Python")
3971 (description
3972 "The elib.intl module provides enhanced internationalization (I18N)
3973 services for your Python modules and applications.")
3974 (license license:lgpl3+)))
3975
3976 (define-public python-pillow
3977 (package
3978 (name "python-pillow")
3979 (version "3.3.3")
3980 (source
3981 (origin
3982 (method url-fetch)
3983 (uri (pypi-uri "Pillow" version))
3984 (sha256
3985 (base32
3986 "0xkv0p1d73gz0a1qaasf0ai4262g8f334j07vd60bjrxs2wr3nmj"))))
3987 (build-system python-build-system)
3988 (native-inputs
3989 `(("python-nose" ,python-nose)))
3990 (inputs
3991 `(("freetype" ,freetype)
3992 ("lcms" ,lcms)
3993 ("zlib" ,zlib)
3994 ("libjpeg" ,libjpeg)
3995 ("openjpeg" ,openjpeg)
3996 ("libtiff" ,libtiff)
3997 ("libwebp" ,libwebp)))
3998 ;; Note: setuptools used at runtime for pkg_resources
3999 (arguments
4000 `(#:phases (modify-phases %standard-phases
4001 (add-after
4002 'install 'check-installed
4003 (lambda* (#:key outputs inputs #:allow-other-keys)
4004 (begin
4005 (setenv "HOME" (getcwd))
4006 ;; Make installed package available for running the
4007 ;; tests
4008 (add-installed-pythonpath inputs outputs)
4009 (and (zero? (system* "python" "selftest.py"
4010 "--installed"))
4011 (zero? (system* "python" "test-installed.py"))))))
4012 (delete 'check))))
4013 (home-page "https://pypi.python.org/pypi/Pillow")
4014 (synopsis "Fork of the Python Imaging Library")
4015 (description
4016 "The Python Imaging Library adds image processing capabilities to your
4017 Python interpreter. This library provides extensive file format support, an
4018 efficient internal representation, and fairly powerful image processing
4019 capabilities. The core image library is designed for fast access to data
4020 stored in a few basic pixel formats. It should provide a solid foundation for
4021 a general image processing tool.")
4022 (license (license:x11-style
4023 "http://www.pythonware.com/products/pil/license.htm"
4024 "The PIL Software License"))))
4025
4026 (define-public python2-pillow
4027 (package-with-python2 python-pillow))
4028
4029 (define-public python-pycparser
4030 (package
4031 (name "python-pycparser")
4032 (version "2.14")
4033 (source
4034 (origin
4035 (method url-fetch)
4036 (uri (pypi-uri "pycparser" version))
4037 (sha256
4038 (base32
4039 "0wvzyb6rxsfj3xcnpa4ynbh9qc7rrbk2277d5wqpphmx9akv8nbr"))))
4040 (outputs '("out" "doc"))
4041 (build-system python-build-system)
4042 (native-inputs
4043 `(("pkg-config" ,pkg-config)))
4044 (arguments
4045 `(#:phases
4046 (alist-replace
4047 'check
4048 (lambda _
4049 (with-directory-excursion "tests"
4050 (zero? (system* "python" "all_tests.py"))))
4051 (alist-cons-after
4052 'install 'install-doc
4053 (lambda* (#:key outputs #:allow-other-keys)
4054 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4055 (doc (string-append data "/doc/" ,name "-" ,version))
4056 (examples (string-append doc "/examples")))
4057 (mkdir-p examples)
4058 (for-each (lambda (file)
4059 (copy-file (string-append "." file)
4060 (string-append doc file)))
4061 '("/README.rst" "/CHANGES" "/LICENSE"))
4062 (copy-recursively "examples" examples)))
4063 %standard-phases))))
4064 (home-page "https://github.com/eliben/pycparser")
4065 (synopsis "C parser in Python")
4066 (description
4067 "Pycparser is a complete parser of the C language, written in pure Python
4068 using the PLY parsing library. It parses C code into an AST and can serve as
4069 a front-end for C compilers or analysis tools.")
4070 (license license:bsd-3)))
4071
4072 (define-public python2-pycparser
4073 (package-with-python2 python-pycparser))
4074
4075 (define-public python-cffi
4076 (package
4077 (name "python-cffi")
4078 (version "1.4.2")
4079 (source
4080 (origin
4081 (method url-fetch)
4082 (uri (pypi-uri "cffi" version))
4083 (sha256
4084 (base32 "161rj52rzi3880lij17d6i9kvgkiwjilrqjs8405k8sf6ryif7cg"))))
4085 (build-system python-build-system)
4086 (outputs '("out" "doc"))
4087 (inputs
4088 `(("libffi" ,libffi)))
4089 (propagated-inputs ; required at run-time
4090 `(("python-pycparser" ,python-pycparser)))
4091 (native-inputs
4092 `(("pkg-config" ,pkg-config)
4093 ("python-sphinx" ,python-sphinx)
4094 ("python-pytest" ,python-pytest)))
4095 (arguments
4096 `(#:phases
4097 (alist-cons-after
4098 'install 'install-doc
4099 (lambda* (#:key outputs #:allow-other-keys)
4100 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4101 (doc (string-append data "/doc/" ,name "-" ,version))
4102 (html (string-append doc "/html")))
4103 (with-directory-excursion "doc"
4104 (system* "make" "html")
4105 (mkdir-p html)
4106 (copy-recursively "build/html" html))
4107 (copy-file "LICENSE" (string-append doc "/LICENSE"))))
4108 %standard-phases)))
4109 (home-page "http://cffi.readthedocs.org")
4110 (synopsis "Foreign function interface for Python")
4111 (description
4112 "Foreign Function Interface for Python calling C code.")
4113 (license license:expat)))
4114
4115 (define-public python2-cffi
4116 (package-with-python2 python-cffi))
4117
4118 (define-public python-xcffib
4119 (package
4120 (name "python-xcffib")
4121 (version "0.1.9")
4122 (source
4123 (origin
4124 (method url-fetch)
4125 (uri (string-append "https://pypi.python.org/packages/source/x/"
4126 "xcffib/xcffib-" version ".tar.gz"))
4127 (sha256
4128 (base32
4129 "0655hzxv57h1a9ja9kwp0ichbkhf3djw32k33d66xp0q37dq2y81"))))
4130 (build-system python-build-system)
4131 (inputs
4132 `(("libxcb" ,libxcb)))
4133 (propagated-inputs
4134 `(("python-cffi" ,python-cffi) ; used at run time
4135 ("python-six" ,python-six)))
4136 (arguments
4137 `(#:phases
4138 (alist-cons-after
4139 'install 'install-doc
4140 (lambda* (#:key outputs #:allow-other-keys)
4141 (let ((doc (string-append (assoc-ref outputs "out") "/share"
4142 "/doc/" ,name "-" ,version)))
4143 (mkdir-p doc)
4144 (copy-file "README.md"
4145 (string-append doc "/README.md"))))
4146 %standard-phases)))
4147 (home-page "https://github.com/tych0/xcffib")
4148 (synopsis "XCB Python bindings")
4149 (description
4150 "Xcffib is a replacement for xpyb, an XCB Python bindings. It adds
4151 support for Python 3 and PyPy. It is based on cffi.")
4152 (license license:expat)))
4153
4154 (define-public python2-xcffib
4155 (package-with-python2 python-xcffib))
4156
4157 (define-public python-cairocffi
4158 (package
4159 (name "python-cairocffi")
4160 (version "0.6")
4161 (source
4162 (origin
4163 (method url-fetch)
4164 ;; The archive on pypi is missing the 'utils' directory!
4165 (uri (string-append "https://github.com/SimonSapin/cairocffi/archive/v"
4166 version ".tar.gz"))
4167 (file-name (string-append name "-" version ".tar.gz"))
4168 (sha256
4169 (base32
4170 "03w5p62sp3nqiccx864sbq0jvh7946277jqx3rcc3dch5xwfvv51"))))
4171 (build-system python-build-system)
4172 (outputs '("out" "doc"))
4173 (inputs
4174 `(("gdk-pixbuf" ,gdk-pixbuf)
4175 ("cairo" ,cairo)))
4176 (native-inputs
4177 `(("pkg-config" ,pkg-config)
4178 ("python-sphinx" ,python-sphinx)
4179 ("python-docutils" ,python-docutils)))
4180 (propagated-inputs
4181 `(("python-xcffib" ,python-xcffib))) ; used at run time
4182 (arguments
4183 `(#:phases
4184 (alist-cons-after
4185 'install 'install-doc
4186 (lambda* (#:key inputs outputs #:allow-other-keys)
4187 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4188 (doc (string-append data "/doc/" ,name "-" ,version))
4189 (html (string-append doc "/html")))
4190 (setenv "LD_LIBRARY_PATH"
4191 (string-append (assoc-ref inputs "cairo") "/lib" ":"
4192 (assoc-ref inputs "gdk-pixbuf") "/lib"))
4193 (setenv "LANG" "en_US.UTF-8")
4194 (mkdir-p html)
4195 (for-each (lambda (file)
4196 (copy-file (string-append "." file)
4197 (string-append doc file)))
4198 '("/README.rst" "/CHANGES" "/LICENSE"))
4199 (system* "python" "setup.py" "build_sphinx")
4200 (copy-recursively "docs/_build/html" html)))
4201 %standard-phases)))
4202 (home-page "https://github.com/SimonSapin/cairocffi")
4203 (synopsis "Python bindings and object-oriented API for Cairo")
4204 (description
4205 "Cairocffi is a CFFI-based drop-in replacement for Pycairo, a set of
4206 Python bindings and object-oriented API for cairo. Cairo is a 2D vector
4207 graphics library with support for multiple backends including image buffers,
4208 PNG, PostScript, PDF, and SVG file output.")
4209 (license license:bsd-3)))
4210
4211 (define-public python2-cairocffi
4212 (package-with-python2 python-cairocffi))
4213
4214 (define-public python-decorator
4215 (package
4216 (name "python-decorator")
4217 (version "4.0.9")
4218 (source
4219 (origin
4220 (method url-fetch)
4221 (uri (pypi-uri "decorator" version))
4222 (sha256
4223 (base32 "1a5vwhflfd9sh3rfb40xlyipldgdzfff6brman57hqv3661jw0lh"))))
4224 (build-system python-build-system)
4225 (arguments '(#:tests? #f)) ; no test target
4226 (home-page "https://pypi.python.org/pypi/decorator/")
4227 (synopsis "Python module to simplify usage of decorators")
4228 (description
4229 "The aim of the decorator module is to simplify the usage of decorators
4230 for the average programmer, and to popularize decorators usage giving examples
4231 of useful decorators, such as memoize, tracing, redirecting_stdout, locked,
4232 etc. The core of this module is a decorator factory.")
4233 (license license:expat)))
4234
4235 (define-public python2-decorator
4236 (package-with-python2 python-decorator))
4237
4238 (define-public python-drmaa
4239 (package
4240 (name "python-drmaa")
4241 (version "0.7.6")
4242 (source
4243 (origin
4244 (method url-fetch)
4245 (uri (string-append
4246 "https://pypi.python.org/packages/source/d/drmaa/drmaa-"
4247 version ".tar.gz"))
4248 (sha256
4249 (base32 "0bzl9f9g34dlhwf09i3fdv7dqqzf2iq0w7d6c2bafx1nlap8qfbh"))))
4250 (build-system python-build-system)
4251 ;; The test suite requires libdrmaa which is provided by the cluster
4252 ;; environment. At runtime the environment variable DRMAA_LIBRARY_PATH
4253 ;; should be set to the path of the libdrmaa library.
4254 (arguments '(#:tests? #f))
4255 (native-inputs
4256 `(("python-nose" ,python-nose)))
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 (propagated-inputs
4283 `(("python-psutil" ,python-psutil)
4284 ("python-drmaa" ,python-drmaa)
4285 ("python-pyzmq" ,python-pyzmq)))
4286 (home-page "https://github.com/pygridtools/gridmap")
4287 (synopsis "Create jobs on a cluster directly from Python")
4288 (description
4289 "Gridmap is a Python package to allow you to easily create jobs on the
4290 cluster directly from Python. You can directly map Python functions onto the
4291 cluster without needing to write any wrapper code yourself.")
4292 (license license:gpl3+)))
4293
4294 (define-public python2-gridmap
4295 (package-with-python2 python-gridmap))
4296
4297 (define-public python-pexpect
4298 (package
4299 (name "python-pexpect")
4300 (version "3.3")
4301 (source
4302 (origin
4303 (method url-fetch)
4304 (uri (string-append "https://pypi.python.org/packages/source/p/"
4305 "pexpect/pexpect-" version ".tar.gz"))
4306 (sha256
4307 (base32 "1fp5gm976z7ghm8jw57463rj19cv06c8zw842prgyg788f6n3snz"))))
4308 (build-system python-build-system)
4309 (arguments
4310 `(#:phases
4311 (modify-phases %standard-phases
4312 (replace 'check (lambda _ (zero? (system* "nosetests")))))))
4313 (native-inputs
4314 `(("python-nose" ,python-nose)))
4315 (home-page "http://pexpect.readthedocs.org/")
4316 (synopsis "Controlling interactive console applications")
4317 (description
4318 "Pexpect is a pure Python module for spawning child applications;
4319 controlling them; and responding to expected patterns in their output.
4320 Pexpect works like Don Libes’ Expect. Pexpect allows your script to spawn a
4321 child application and control it as if a human were typing commands.")
4322 (license license:isc)))
4323
4324 (define-public python2-pexpect
4325 (package-with-python2 python-pexpect))
4326
4327 (define-public python-setuptools-scm
4328 (package
4329 (name "python-setuptools-scm")
4330 (version "1.11.1")
4331 (source (origin
4332 (method url-fetch)
4333 (uri (pypi-uri "setuptools_scm" version))
4334 (sha256
4335 (base32
4336 "1gqr73i150yzj3mz32854vj93x07yr52kn8fdckwa41ll8wgficc"))))
4337 (build-system python-build-system)
4338 (home-page "https://github.com/pypa/setuptools_scm/")
4339 (synopsis "Manage Python package versions in SCM metadata")
4340 (description
4341 "Setuptools_scm handles managing your Python package versions in
4342 @dfn{software configuration management} (SCM) metadata instead of declaring
4343 them as the version argument or in a SCM managed file.")
4344 (license license:expat)))
4345
4346 (define-public python2-setuptools-scm
4347 (package-with-python2 python-setuptools-scm))
4348
4349 (define-public python-pathpy
4350 (package
4351 (name "python-pathpy")
4352 (version "8.1.1")
4353 (source
4354 (origin
4355 (method url-fetch)
4356 (uri (string-append "https://pypi.python.org/packages/source/p/"
4357 "path.py/path.py-" version ".tar.gz"))
4358 (sha256
4359 (base32 "1p8s1l2vfkqhqxdhqlj0g1jjw4f1as2frr35sjcpjjpd5a89y41f"))))
4360 (build-system python-build-system)
4361 (propagated-inputs
4362 `(("python-appdirs" ,python-appdirs)))
4363 (native-inputs
4364 `(("python-setuptools-scm" ,python-setuptools-scm)
4365 ("python-pytest" ,python-pytest)
4366 ("python-pytest-runner" ,python-pytest-runner)))
4367 (home-page "http://github.com/jaraco/path.py")
4368 (synopsis "Python module wrapper for built-in os.path")
4369 (description
4370 "@code{path.py} implements path objects as first-class entities, allowing
4371 common operations on files to be invoked on those path objects directly.")
4372 (license license:expat)))
4373
4374 (define-public python2-pathpy
4375 (package-with-python2 python-pathpy))
4376
4377 (define-public python-pickleshare
4378 (package
4379 (name "python-pickleshare")
4380 (version "0.5")
4381 (source
4382 (origin
4383 (method url-fetch)
4384 (uri (string-append "https://pypi.python.org/packages/source/p/"
4385 "pickleshare/pickleshare-" version ".tar.gz"))
4386 (sha256
4387 (base32 "11ljr90j3p6qswdrbl7p4cjb2i93f6vn0vx9anzpshsx0d2mggn0"))))
4388 (build-system python-build-system)
4389 (propagated-inputs
4390 `(("python-pathpy" ,python-pathpy)))
4391 (home-page "https://github.com/vivainio/pickleshare")
4392 (synopsis "Tiny key value database with concurrency support")
4393 (description
4394 "PickleShare is a small ‘shelve’-like datastore with concurrency support.
4395 Like shelve, a PickleShareDB object acts like a normal dictionary. Unlike
4396 shelve, many processes can access the database simultaneously. Changing a
4397 value in database is immediately visible to other processes accessing the same
4398 database. Concurrency is possible because the values are stored in separate
4399 files. Hence the “database” is a directory where all files are governed by
4400 PickleShare.")
4401 (license license:expat)))
4402
4403 (define-public python2-pickleshare
4404 (package-with-python2 python-pickleshare))
4405
4406 (define-public python-simplegeneric
4407 (package
4408 (name "python-simplegeneric")
4409 (version "0.8.1")
4410 (source
4411 (origin
4412 (method url-fetch)
4413 (uri (string-append "https://pypi.python.org/packages/source/s/"
4414 "simplegeneric/simplegeneric-" version ".zip"))
4415 (sha256
4416 (base32 "0wwi1c6md4vkbcsfsf8dklf3vr4mcdj4mpxkanwgb6jb1432x5yw"))))
4417 (build-system python-build-system)
4418 (native-inputs
4419 `(("unzip" ,unzip)))
4420 (home-page "http://cheeseshop.python.org/pypi/simplegeneric")
4421 (synopsis "Python module for simple generic functions")
4422 (description
4423 "The simplegeneric module lets you define simple single-dispatch generic
4424 functions, akin to Python’s built-in generic functions like @code{len()},
4425 @code{iter()} and so on. However, instead of using specially-named methods,
4426 these generic functions use simple lookup tables, akin to those used by
4427 e.g. @code{pickle.dump()} and other generic functions found in the Python
4428 standard library.")
4429 (license license:zpl2.1)))
4430
4431 (define-public python2-simplegeneric
4432 (package-with-python2 python-simplegeneric))
4433
4434 (define-public python-ipython-genutils
4435 (package
4436 (name "python-ipython-genutils")
4437 (version "0.1.0")
4438 (source
4439 (origin
4440 (method url-fetch)
4441 (uri (string-append "https://pypi.python.org/packages/source/i/"
4442 "ipython_genutils/ipython_genutils-"
4443 version ".tar.gz"))
4444 (sha256
4445 (base32 "19l2pp1c64ansr89l3cqh19jdi2ixhssdzx0vz4n6r52a6i281is"))))
4446 (build-system python-build-system)
4447 (arguments `(#:tests? #f)) ; no tests
4448 (home-page "http://ipython.org")
4449 (synopsis "Vestigial utilities from IPython")
4450 (description
4451 "This package provides retired utilities from IPython.")
4452 (license license:bsd-3)))
4453
4454 (define-public python2-ipython-genutils
4455 (package-with-python2 python-ipython-genutils))
4456
4457 (define-public python-traitlets
4458 (package
4459 (name "python-traitlets")
4460 (version "4.2.0")
4461 (source
4462 (origin
4463 (method url-fetch)
4464 (uri (pypi-uri "traitlets" version))
4465 (sha256
4466 (base32
4467 "1afy08sa5n9gnkvh3da49c16zkyv598vchv0p1hp7zzjy8895hz4"))))
4468 (build-system python-build-system)
4469 (arguments
4470 `(#:phases
4471 (modify-phases %standard-phases
4472 (replace 'check (lambda _ (zero? (system* "nosetests")))))))
4473 (propagated-inputs
4474 `(("python-ipython-genutils" ,python-ipython-genutils)
4475 ("python-decorator" ,python-decorator)))
4476 (native-inputs
4477 `(("python-mock" ,python-mock)
4478 ("python-nose" ,python-nose)))
4479 (home-page "http://ipython.org")
4480 (synopsis "Configuration system for Python applications")
4481 (description
4482 "Traitlets is a framework that lets Python classes have attributes with
4483 type checking, dynamically calculated default values, and ‘on change’
4484 callbacks. The package also includes a mechanism to use traitlets for
4485 configuration, loading values from files or from command line arguments. This
4486 is a distinct layer on top of traitlets, so you can use traitlets in your code
4487 without using the configuration machinery.")
4488 (license license:bsd-3)))
4489
4490 (define-public python2-traitlets
4491 (package-with-python2 python-traitlets))
4492
4493 (define-public python-jupyter-core
4494 (package
4495 (name "python-jupyter-core")
4496 (version "4.2.0")
4497 (source
4498 (origin
4499 (method url-fetch)
4500 (uri (string-append (pypi-uri "jupyter_core" version)))
4501 (sha256
4502 (base32
4503 "177d9csqldzhsh6xs1p4nf6lzvhzyg6gklqjf69lxgxyadx87v24"))))
4504 (build-system python-build-system)
4505 ;; FIXME: not sure how to run the tests
4506 (arguments `(#:tests? #f))
4507 (propagated-inputs
4508 `(("python-traitlets" ,python-traitlets)))
4509 (home-page "http://jupyter.org/")
4510 (synopsis "Jupyter base package")
4511 (description
4512 "Jupyter core is the base package on which Jupyter projects rely.")
4513 (license license:bsd-3)))
4514
4515 (define-public python2-jupyter-core
4516 (package-with-python2 python-jupyter-core))
4517
4518 (define-public python-jupyter-client
4519 (package
4520 (name "python-jupyter-client")
4521 (version "4.4.0")
4522 (source
4523 (origin
4524 (method url-fetch)
4525 (uri (pypi-uri "jupyter_client" version))
4526 (sha256
4527 (base32
4528 "1vjjrpjw7k5sh982pbjnslv7byfbfazjw9g92jvs7dz5qbx556n9"))))
4529 (build-system python-build-system)
4530 ;; Tests fail because of missing native python kernel which I assume is
4531 ;; provided by the ipython package, which we cannot use because it would
4532 ;; cause a dependency cycle.
4533 (arguments `(#:tests? #f))
4534 (propagated-inputs
4535 `(("python-pyzmq" ,python-pyzmq)
4536 ("python-traitlets" ,python-traitlets)
4537 ("python-jupyter-core" ,python-jupyter-core)))
4538 (home-page "http://jupyter.org/")
4539 (synopsis "Jupyter protocol implementation and client libraries")
4540 (description
4541 "The @code{jupyter_client} package contains the reference implementation
4542 of the Jupyter protocol. It also provides client and kernel management APIs
4543 for working with kernels, and the @code{jupyter kernelspec} entrypoint for
4544 installing @code{kernelspec}s for use with Jupyter frontends.")
4545 (license license:bsd-3)))
4546
4547 (define-public python2-jupyter-client
4548 (package-with-python2 python-jupyter-client))
4549
4550 (define-public python-ipykernel
4551 (package
4552 (name "python-ipykernel")
4553 (version "4.5.0")
4554 (source
4555 (origin
4556 (method url-fetch)
4557 (uri (pypi-uri "ipykernel" version))
4558 (sha256
4559 (base32 "15c2bp1x3i6s4xb7vz7742h3kmvdfdfn9n2haywm3mwgvf77jni4"))))
4560 (build-system python-build-system)
4561 ;; The tests load a submodule of IPython. However, IPython itself depends
4562 ;; on ipykernel.
4563 (arguments `(#:tests? #f))
4564 (propagated-inputs
4565 ;; imported at runtime during connect
4566 `(("python-jupyter-client" ,python-jupyter-client)))
4567 (home-page "http://ipython.org")
4568 (synopsis "IPython Kernel for Jupyter")
4569 (description
4570 "This package provides the IPython kernel for Jupyter.")
4571 (license license:bsd-3)))
4572
4573 (define-public python2-ipykernel
4574 (package-with-python2 python-ipykernel))
4575
4576 (define-public python-testpath
4577 (package
4578 (name "python-testpath")
4579 (version "0.2")
4580 (source
4581 (origin
4582 (method url-fetch)
4583 (uri (string-append "https://github.com/jupyter/testpath/archive/"
4584 version ".tar.gz"))
4585 (file-name (string-append name "-" version ".tar.gz"))
4586 (sha256
4587 (base32
4588 "04kh3fgvmqz6cfcw79q70qwjz7ib7lxm27cc548iy2rpr33qqf55"))))
4589 (build-system python-build-system)
4590 (arguments
4591 `(#:tests? #f ; this package does not even have a setup.py
4592 #:phases
4593 (modify-phases %standard-phases
4594 (delete 'install)
4595 (replace 'build
4596 (lambda* (#:key inputs outputs #:allow-other-keys)
4597 (let ((dir (string-append
4598 (assoc-ref outputs "out")
4599 "/lib/python"
4600 (string-take (string-take-right
4601 (assoc-ref inputs "python") 5) 3)
4602 "/site-packages/testpath")))
4603 (mkdir-p dir)
4604 (copy-recursively "testpath" dir))
4605 #t)))))
4606 (home-page "https://github.com/takluyver/testpath")
4607 (synopsis "Test utilities for code working with files and commands")
4608 (description
4609 "Testpath is a collection of utilities for Python code working with files
4610 and commands. It contains functions to check things on the filesystem, and
4611 tools for mocking system commands and recording calls to those.")
4612 (license license:expat)))
4613
4614 (define-public python2-testpath
4615 (package-with-python2 python-testpath))
4616
4617 (define-public python-ipython
4618 (package
4619 (name "python-ipython")
4620 (version "4.0.0")
4621 (source
4622 (origin
4623 (method url-fetch)
4624 (uri (pypi-uri "ipython" version ".tar.gz"))
4625 (sha256
4626 (base32 "1npl8g6bfsff9j938ypx0q5fyzy2l8lp0jl8skjjj2zv0z27dlig"))))
4627 (build-system python-build-system)
4628 (outputs '("out" "doc"))
4629 (propagated-inputs
4630 `(("python-pyzmq" ,python-pyzmq)
4631 ("python-terminado" ,python-terminado)
4632 ("python-matplotlib" ,python-matplotlib)
4633 ("python-numpy" ,python-numpy)
4634 ("python-numpydoc" ,python-numpydoc)
4635 ("python-jinja2" ,python-jinja2)
4636 ("python-mistune" ,python-mistune)
4637 ("python-pexpect" ,python-pexpect)
4638 ("python-pickleshare" ,python-pickleshare)
4639 ("python-simplegeneric" ,python-simplegeneric)
4640 ("python-jsonschema" ,python-jsonschema)
4641 ("python-traitlets" ,python-traitlets)
4642 ("python-ipykernel" ,python-ipykernel)
4643 ("python-pygments" ,python-pygments)))
4644 (inputs
4645 `(("readline" ,readline)
4646 ("which" ,which)))
4647 (native-inputs
4648 `(("pkg-config" ,pkg-config)
4649 ("python-requests" ,python-requests) ;; for tests
4650 ("python-testpath" ,python-testpath)
4651 ("python-nose" ,python-nose)
4652 ("python-sphinx" ,python-sphinx)
4653 ("texlive" ,texlive)
4654 ("texinfo" ,texinfo)))
4655 (arguments
4656 `(#:phases
4657 (modify-phases %standard-phases
4658 (add-after
4659 'install 'install-doc
4660 (lambda* (#:key inputs outputs #:allow-other-keys)
4661 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4662 (doc (string-append data "/doc/" ,name "-" ,version))
4663 (html (string-append doc "/html"))
4664 (man1 (string-append data "/man/man1"))
4665 (info (string-append data "/info"))
4666 (examples (string-append doc "/examples")))
4667 (setenv "LANG" "en_US.utf8")
4668 ;; Make installed package available for running the tests
4669 (add-installed-pythonpath inputs outputs)
4670 (with-directory-excursion "docs"
4671 ;; FIXME: pdf fails to build
4672 ;;(system* "make" "pdf" "PAPER=a4")
4673 (system* "make" "html")
4674 (system* "make" "info"))
4675 (copy-recursively "docs/man" man1)
4676 (copy-recursively "examples" examples)
4677 (copy-recursively "docs/build/html" html)
4678 ;; (copy-file "docs/build/latex/ipython.pdf"
4679 ;; (string-append doc "/ipython.pdf"))
4680 (mkdir-p info)
4681 (copy-file "docs/build/texinfo/ipython.info"
4682 (string-append info "/ipython.info"))
4683 (copy-file "COPYING.rst" (string-append doc "/COPYING.rst")))))
4684 ;; Tests can only be run after the library has been installed and not
4685 ;; within the source directory.
4686 (delete 'check)
4687 (add-after
4688 'install 'check
4689 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
4690 (if tests?
4691 (with-directory-excursion "/tmp"
4692 ;; Make installed package available for running the tests
4693 (add-installed-pythonpath inputs outputs)
4694 (setenv "HOME" "/tmp/") ;; required by a test
4695 (zero? (system* (string-append (assoc-ref outputs "out")
4696 "/bin/iptest"))))
4697 #t)))
4698 (add-before
4699 'install 'fix-tests
4700 (lambda* (#:key inputs #:allow-other-keys)
4701 (substitute* "./IPython/utils/_process_posix.py"
4702 (("/usr/bin/env', 'which") (which "which")))
4703 (substitute* "./IPython/core/tests/test_inputtransformer.py"
4704 (("#!/usr/bin/env python")
4705 (string-append "#!" (which "python"))))
4706 ;; Disable 1 failing test
4707 (substitute* "./IPython/core/tests/test_magic.py"
4708 (("def test_dirops\\(\\):" all)
4709 (string-append "@dec.skipif(True)\n" all))))))))
4710 (home-page "http://ipython.org")
4711 (synopsis "IPython is a tool for interactive computing in Python")
4712 (description
4713 "IPython provides a rich architecture for interactive computing with:
4714 Powerful interactive shells, a browser-based notebook, support for interactive
4715 data visualization, embeddable interpreters and tools for parallel
4716 computing.")
4717 (license license:bsd-3)
4718 (properties `((python2-variant . ,(delay python2-ipython))))))
4719
4720 (define-public python2-ipython
4721 (let ((ipython (package-with-python2 (strip-python2-variant python-ipython))))
4722 (package
4723 (inherit ipython)
4724 ;; FIXME: some tests are failing
4725 (arguments
4726 `(#:tests? #f ,@(package-arguments ipython)))
4727 ;; FIXME: add pyreadline once available.
4728 (inputs
4729 `(("python2-mock" ,python2-mock)
4730 ,@(package-inputs ipython))))))
4731
4732 (define-public python-isodate
4733 (package
4734 (name "python-isodate")
4735 (version "0.5.4")
4736 (source
4737 (origin
4738 (method url-fetch)
4739 (uri (pypi-uri "isodate" version))
4740 (sha256
4741 (base32
4742 "0cafaiwixgpxwh9dsd28qb0dbzsj6xpxjdkyk30ns91ps10mq422"))))
4743 (build-system python-build-system)
4744 (home-page
4745 "http://cheeseshop.python.org/pypi/isodate")
4746 (synopsis
4747 "Python date parser and formatter")
4748 (description
4749 "Python-isodate is a python module for parsing and formatting
4750 ISO 8601 dates, time and duration.")
4751 (license license:bsd-3)))
4752
4753 (define-public python2-isodate
4754 (package-with-python2 python-isodate))
4755
4756 (define-public python-html5lib
4757 (package
4758 (name "python-html5lib")
4759 (version "1.0b8")
4760 (source
4761 (origin
4762 (method url-fetch)
4763 (uri (pypi-uri "html5lib" version))
4764 (sha256
4765 (base32
4766 "1lknq5j3nh11xrl268ks76zaj0gyzh34v94n5vbf6dk8llzxdx0q"))))
4767 (build-system python-build-system)
4768 (propagated-inputs
4769 `(("python-six" ,python-six))) ; required to "import html5lib"
4770 (arguments
4771 `(#:test-target "check"))
4772 (home-page
4773 "https://github.com/html5lib/html5lib-python")
4774 (synopsis
4775 "Python HTML parser based on the WHATWG HTML specifcation")
4776 (description
4777 "Html5lib is an HTML parser based on the WHATWG HTML specifcation
4778 and written in Python.")
4779 (license license:expat)))
4780
4781 (define-public python2-html5lib
4782 (package-with-python2 python-html5lib))
4783
4784 ;; Needed for python-bleach, a dependency of python-notebook
4785 (define-public python-html5lib-0.9
4786 (package
4787 (inherit python-html5lib)
4788 (version "0.999")
4789 (source
4790 (origin
4791 (method url-fetch)
4792 (uri (pypi-uri "html5lib" version))
4793 (sha256
4794 (base32
4795 "17n4zfsj6ynmbwdwviywmj8r6nzr3xvfx2zs0xhndmvm51z7z263"))))))
4796
4797 (define-public python2-html5lib-0.9
4798 (package-with-python2 python-html5lib-0.9))
4799
4800 (define-public python-urwid
4801 (package
4802 (name "python-urwid")
4803 (version "1.3.1")
4804 (source
4805 (origin
4806 (method url-fetch)
4807 (uri (pypi-uri "urwid" version))
4808 (sha256
4809 (base32
4810 "18cnd1wdjcas08x5qwa5ayw6jsfcn33w4d9f7q3s29fy6qzc1kng"))))
4811 (build-system python-build-system)
4812 (arguments
4813 `(#:phases
4814 (modify-phases %standard-phases
4815 ;; Disable failing test. Bug filed upstream:
4816 ;; https://github.com/wardi/urwid/issues/164
4817 ;; TODO: check again for python-urwid > 1.3.1 or python > 3.4.3.
4818 (add-after 'unpack 'disable-failing-test
4819 (lambda _
4820 (substitute* "urwid/tests/test_event_loops.py"
4821 (("test_remove_watch_file")
4822 "disable_remove_watch_file")))))))
4823 (home-page "http://urwid.org")
4824 (synopsis "Console user interface library for Python")
4825 (description
4826 "Urwid is a curses-based UI/widget library for Python. It includes many
4827 features useful for text console applications.")
4828 (license license:lgpl2.1+)))
4829
4830 (define-public python2-urwid
4831 (package-with-python2 python-urwid))
4832
4833 (define-public python-urwidtrees
4834 (package
4835 (name "python-urwidtrees")
4836 (version "1.0.2")
4837 (source
4838 (origin
4839 (method url-fetch)
4840 ;; package author intends on distributing via github rather than pypi:
4841 ;; https://github.com/pazz/alot/issues/877#issuecomment-230173331
4842 (uri (string-append "https://github.com/pazz/urwidtrees/archive/"
4843 version ".tar.gz"))
4844 (file-name (string-append name "-" version ".tar.gz"))
4845 (sha256
4846 (base32
4847 "0d30lyd3s2a97rhqfax5w9ssqds2z6aydqx3c6j2c2lk3cb4ngvh"))))
4848 (build-system python-build-system)
4849 (arguments
4850 '(#:tests? #f)) ; no tests
4851 (propagated-inputs `(("python-urwid" ,python-urwid)))
4852 (home-page "https://github.com/pazz/urwidtrees")
4853 (synopsis "Tree widgets for urwid")
4854 (description "Urwidtrees is a Widget Container API for the @code{urwid}
4855 toolkit. Use it to build trees of widgets.")
4856 (license license:gpl3+)))
4857
4858 (define-public python2-urwidtrees
4859 (package-with-python2 python-urwidtrees))
4860
4861 (define-public python-dbus
4862 (package
4863 (name "python-dbus")
4864 (version "1.2.0")
4865 (source
4866 (origin
4867 (method url-fetch)
4868 (uri (string-append
4869 "https://dbus.freedesktop.org/releases/dbus-python/dbus-python-"
4870 version ".tar.gz"))
4871 (sha256
4872 (base32 "1py62qir966lvdkngg0v8k1khsqxwk5m4s8nflpk1agk5f5nqb71"))))
4873 (build-system gnu-build-system)
4874 (arguments
4875 '(#:phases
4876 (modify-phases %standard-phases
4877 (add-before
4878 'check 'pre-check
4879 (lambda _
4880 ;; XXX: For the missing '/etc/machine-id'.
4881 (substitute* "test/run-test.sh"
4882 (("DBUS_FATAL_WARNINGS=1")
4883 "DBUS_FATAL_WARNINGS=0"))
4884 #t)))))
4885 (native-inputs
4886 `(("pkg-config" ,pkg-config)))
4887 (inputs
4888 `(("python" ,python)
4889 ("dbus-glib" ,dbus-glib)))
4890 (synopsis "Python bindings for D-bus")
4891 (description "python-dbus provides bindings for libdbus, the reference
4892 implementation of D-Bus.")
4893 (home-page "http://www.freedesktop.org/wiki/Software/DBusBindings/")
4894 (license license:expat)))
4895
4896 (define-public python2-dbus
4897 (package (inherit python-dbus)
4898 (name "python2-dbus")
4899 (inputs `(("python" ,python-2)
4900 ,@(alist-delete "python"
4901 (package-inputs python-dbus)
4902 equal?)))
4903 ;; FIXME: on Python 2, the test_utf8 fails with:
4904 ;; "ValueError: unichr() arg not in range(0x10000) (narrow Python build)"
4905 (arguments `(#:tests? #f))))
4906
4907 (define-public python-apsw
4908 (package
4909 (name "python-apsw")
4910 (version "3.9.2-r1")
4911 (source
4912 (origin
4913 (method url-fetch)
4914 (uri (pypi-uri "apsw" version))
4915 (sha256
4916 (base32
4917 "0w4jb0wpx785qw42r3h4fh7gl5w2968q48i7gygybsfxck8nzffs"))))
4918 (build-system python-build-system)
4919 (inputs
4920 `(("sqlite" ,sqlite)))
4921 (arguments
4922 `(#:phases
4923 ;; swap check and install phases
4924 (alist-cons-after
4925 'install 'check
4926 (assoc-ref %standard-phases 'check)
4927 (alist-delete
4928 'check
4929 %standard-phases))))
4930 (home-page "https://github.com/rogerbinns/apsw/")
4931 (synopsis "Another Python SQLite Wrapper")
4932 (description "APSW is a Python wrapper for the SQLite
4933 embedded relational database engine. In contrast to other wrappers such as
4934 pysqlite it focuses on being a minimal layer over SQLite attempting just to
4935 translate the complete SQLite API into Python.")
4936 (license license:zlib)))
4937
4938 (define-public python2-apsw
4939 (package-with-python2 python-apsw))
4940
4941 (define-public python-lxml
4942 (package
4943 (name "python-lxml")
4944 (version "3.6.0")
4945 (source
4946 (origin
4947 (method url-fetch)
4948 (uri (pypi-uri "lxml" version))
4949 (sha256
4950 (base32
4951 "1pvbmiy2m7jwv493kilbghhj2pkh8wy1na3ji350vhzhlwlclx4w"))))
4952 (build-system python-build-system)
4953 (inputs
4954 `(("libxml2" ,libxml2)
4955 ("libxslt" ,libxslt)))
4956 (home-page "http://lxml.de/")
4957 (synopsis
4958 "Python XML processing library")
4959 (description
4960 "The lxml XML toolkit is a Pythonic binding for the C libraries
4961 libxml2 and libxslt.")
4962 (license license:bsd-3))) ; and a few more, see LICENSES.txt
4963
4964 (define-public python2-lxml
4965 (package-with-python2 python-lxml))
4966
4967 ;; beautifulsoup4 has a totally different namespace than 3.x,
4968 ;; and pypi seems to put it under its own name, so I guess we should too
4969 (define-public python-beautifulsoup4
4970 (package
4971 (name "python-beautifulsoup4")
4972 (version "4.5.1")
4973 (source
4974 (origin
4975 (method url-fetch)
4976 (uri (pypi-uri "beautifulsoup4" version))
4977 (sha256
4978 (base32
4979 "1qgmhw65ncsgccjhslgkkszif47q6gvxwqv4mim17agxd81p951w"))))
4980 (build-system python-build-system)
4981 (arguments
4982 `(#:phases
4983 (modify-phases %standard-phases
4984 ;; The Python 2 source is the definitive source of beautifulsoup4. We
4985 ;; must use this conversion script when building with Python 3. The
4986 ;; conversion script also runs the tests.
4987 ;; For more information, see the file 'convert-py3k' in the source
4988 ;; distribution.
4989 (replace 'check
4990 (lambda _ (zero? (system* "./convert-py3k")))))))
4991 (home-page
4992 "http://www.crummy.com/software/BeautifulSoup/bs4/")
4993 (synopsis
4994 "Python screen-scraping library")
4995 (description
4996 "Beautiful Soup is a Python library designed for rapidly setting up
4997 screen-scraping projects. It offers Pythonic idioms for navigating,
4998 searching, and modifying a parse tree, providing a toolkit for
4999 dissecting a document and extracting what you need. It automatically
5000 converts incoming documents to Unicode and outgoing documents to UTF-8.")
5001 (license license:expat)))
5002
5003 (define-public python2-beautifulsoup4
5004 (package
5005 (inherit (package-with-python2
5006 (strip-python2-variant python-beautifulsoup4)))
5007 (arguments `(#:python ,python-2))))
5008
5009 (define-public python2-cssutils
5010 (package
5011 (name "python2-cssutils")
5012 (version "1.0.1")
5013 (source
5014 (origin
5015 (method url-fetch)
5016 (uri (pypi-uri "cssutils" version))
5017 (sha256
5018 (base32
5019 "0qwha9x1wml2qmipbcz03gndnlwhzrjdvw9i09si247a90l8p8fq"))))
5020 (build-system python-build-system)
5021 (native-inputs
5022 `(("python2-mock" ,python2-mock) ; for the tests
5023 ("unzip" ,unzip))) ; for unpacking the source
5024 (arguments
5025 `(#:python ,python-2 ; Otherwise tests fail with a syntax error.
5026 #:tests? #f ; The tests apparently download an external URL.
5027 ))
5028 (home-page "http://cthedot.de/cssutils/")
5029 (synopsis
5030 "CSS Cascading Style Sheets library for Python")
5031 (description
5032 "Cssutils is a Python package for parsing and building CSS
5033 Cascading Style Sheets. Currently it provides a DOM only and no rendering
5034 options.")
5035 (license license:lgpl3+)))
5036
5037 (define-public python-cssselect
5038 (package
5039 (name "python-cssselect")
5040 (version "0.9.2")
5041 (source
5042 (origin
5043 (method url-fetch)
5044 (uri (pypi-uri "cssselect" version))
5045 (sha256
5046 (base32
5047 "1xg6gbva1yswghiycmgincv6ab4bn7hpm720ndbj40h8xycmnfvi"))))
5048 (build-system python-build-system)
5049 (arguments
5050 ;; tests fail with message
5051 ;; AttributeError: 'module' object has no attribute 'tests'
5052 `(#:tests? #f))
5053 (home-page
5054 "https://pythonhosted.org/cssselect/")
5055 (synopsis
5056 "CSS3 selector parser and translator to XPath 1.0")
5057 (description
5058 "Cssselect ia a Python module that parses CSS3 Selectors and translates
5059 them to XPath 1.0 expressions. Such expressions can be used in lxml or
5060 another XPath engine to find the matching elements in an XML or HTML document.")
5061 (license license:bsd-3)))
5062
5063 (define-public python2-cssselect
5064 (package-with-python2 python-cssselect))
5065
5066 (define-public python-netifaces
5067 (package
5068 (name "python-netifaces")
5069 (version "0.10.4")
5070 (source
5071 (origin
5072 (method url-fetch)
5073 (uri (string-append
5074 "https://pypi.python.org/packages/source/n/netifaces/netifaces-"
5075 version
5076 ".tar.gz"))
5077 (sha256
5078 (base32
5079 "1plw237a4zib4z8s62g0mrs8gm3kjfrp5sxh6bbk9nl3rdls2mln"))))
5080 (build-system python-build-system)
5081 (home-page
5082 "https://bitbucket.org/al45tair/netifaces")
5083 (synopsis
5084 "Python module for portable network interface information")
5085 (description
5086 "Netifaces is a Python module providing information on network
5087 interfaces in an easy and portable manner.")
5088 (license license:expat)))
5089
5090 (define-public python2-netifaces
5091 (package-with-python2 python-netifaces))
5092
5093 (define-public python-networkx
5094 (package
5095 (name "python-networkx")
5096 (version "1.11")
5097 (source
5098 (origin
5099 (method url-fetch)
5100 (uri (pypi-uri "networkx" version))
5101 (sha256
5102 (base32 "1f74s56xb4ggixiq0vxyfxsfk8p20c7a099lpcf60izv1php03hd"))))
5103 (build-system python-build-system)
5104 ;; python-decorator is needed at runtime
5105 (propagated-inputs
5106 `(("python-decorator" ,python-decorator)))
5107 (native-inputs
5108 `(("python-nose" ,python-nose)))
5109 (home-page "http://networkx.github.io/")
5110 (synopsis "Python module for creating and manipulating graphs and networks")
5111 (description
5112 "NetworkX is a Python package for the creation, manipulation, and study
5113 of the structure, dynamics, and functions of complex networks.")
5114 (license license:bsd-3)))
5115
5116 (define-public python2-networkx
5117 (package-with-python2 python-networkx))
5118
5119 (define-public snakemake
5120 (package
5121 (name "snakemake")
5122 (version "3.2.1")
5123 (source
5124 (origin
5125 (method url-fetch)
5126 (uri (string-append
5127 "https://pypi.python.org/packages/source/s/snakemake/snakemake-"
5128 version ".tar.gz"))
5129 (sha256
5130 (base32 "0fi4b63sj60hvi7rfydvmz2icl4wj74djw5sn2gl8hxd02qw4b91"))))
5131 (build-system python-build-system)
5132 (home-page "https://bitbucket.org/johanneskoester/snakemake")
5133 (synopsis "Python-based execution environment for make-like workflows")
5134 (description
5135 "Snakemake aims to reduce the complexity of creating workflows by
5136 providing a clean and modern domain specific specification language (DSL) in
5137 Python style, together with a fast and comfortable execution environment.")
5138 (license license:expat)))
5139
5140 (define-public python-seaborn
5141 (package
5142 (name "python-seaborn")
5143 (version "0.7.0")
5144 (source
5145 (origin
5146 (method url-fetch)
5147 (uri (pypi-uri "seaborn" version))
5148 (sha256
5149 (base32 "0ibi3xsfm2kysph61mnfy0pf8d5rkgxgrdb0z9nbizgcgdsb5a0m"))))
5150 (build-system python-build-system)
5151 (propagated-inputs
5152 `(("python-pandas" ,python-pandas)
5153 ("python-matplotlib" ,python-matplotlib)
5154 ("python-scipy" ,python-scipy)))
5155 (home-page "http://stanford.edu/~mwaskom/software/seaborn/")
5156 (synopsis "Statistical data visualization")
5157 (description
5158 "Seaborn is a library for making attractive and informative statistical
5159 graphics in Python. It is built on top of matplotlib and tightly integrated
5160 with the PyData stack, including support for numpy and pandas data structures
5161 and statistical routines from scipy and statsmodels.")
5162 (license license:bsd-3)
5163 (properties `((python2-variant . ,(delay python2-seaborn))))))
5164
5165 (define-public python2-seaborn
5166 (let ((base (package-with-python2 (strip-python2-variant python-seaborn))))
5167 (package
5168 (inherit base)
5169 (propagated-inputs `(("python2-pytz" ,python2-pytz)
5170 ,@(package-propagated-inputs base))))))
5171
5172 (define-public python-sympy
5173 (package
5174 (name "python-sympy")
5175 (version "0.7.6")
5176 (source
5177 (origin
5178 (method url-fetch)
5179 (uri (string-append
5180 "https://github.com/sympy/sympy/releases/download/sympy-"
5181 version "/sympy-" version ".tar.gz"))
5182 (sha256
5183 (base32 "19yp0gy4i7p4g6l3b8vaqkj9qj7yqb5kqy0qgbdagpzgkdz958yz"))))
5184 (build-system python-build-system)
5185 (home-page "http://www.sympy.org/")
5186 (synopsis "Python library for symbolic mathematics")
5187 (description
5188 "SymPy is a Python library for symbolic mathematics. It aims to become a
5189 full-featured computer algebra system (CAS) while keeping the code as simple
5190 as possible in order to be comprehensible and easily extensible.")
5191 (license license:bsd-3)))
5192
5193 (define-public python2-sympy
5194 (package-with-python2 python-sympy))
5195
5196 (define-public python-q
5197 (package
5198 (name "python-q")
5199 (version "2.6")
5200 (source
5201 (origin
5202 (method url-fetch)
5203 (uri (pypi-uri "q" version))
5204 (sha256
5205 (base32
5206 "1mgfazh8fkizh6walra2zv885f3lcgr3nb02v1frfm4p8ddcy3yy"))))
5207 (build-system python-build-system)
5208 (home-page "https://github.com/zestyping/q")
5209 (synopsis "Quick-and-dirty debugging output for tired programmers")
5210 (description
5211 "q is a Python module for \"print\" style of debugging Python code. It
5212 provides convenient short API for print out of values, tracebacks, and
5213 falling into the Python interpreter.")
5214 (license license:asl2.0)))
5215
5216 (define-public python2-q
5217 (package-with-python2 python-q))
5218
5219 (define-public python-testlib
5220 (package
5221 (name "python-testlib")
5222 (version "0.6.5")
5223 (source
5224 (origin
5225 (method url-fetch)
5226 (uri (string-append
5227 "https://pypi.python.org/packages/source/t/testlib/testlib-"
5228 version ".zip"))
5229 (sha256
5230 (base32 "1mz26cxn4x8bbgv0rn0mvj2z05y31rkc8009nvdlb3lam5b4mj3y"))))
5231 (build-system python-build-system)
5232 (native-inputs
5233 `(("unzip" ,unzip)))
5234 (arguments
5235 `(#:phases
5236 (alist-replace
5237 'unpack
5238 (lambda* (#:key inputs outputs #:allow-other-keys)
5239 (let ((unzip (string-append (assoc-ref inputs "unzip")
5240 "/bin/unzip"))
5241 (source (assoc-ref inputs "source")))
5242 (and (zero? (system* unzip source))
5243 (chdir (string-append "testlib-" ,version)))))
5244 %standard-phases)))
5245 (synopsis "Python micro test suite harness")
5246 (description "A micro unittest suite harness for Python.")
5247 (home-page "https://github.com/trentm/testlib")
5248 (license license:expat)))
5249
5250 (define-public python2-testlib
5251 (package-with-python2 python-testlib))
5252
5253 (define-public python2-xlib
5254 (package
5255 (name "python2-xlib")
5256 (version "0.14")
5257 (source (origin
5258 (method url-fetch)
5259 (uri (string-append "mirror://sourceforge/python-xlib/python-xlib"
5260 "/" version "/"
5261 "python-xlib-" version ".tar.gz"))
5262 (sha256
5263 (base32
5264 "1sv0447j0rx8cgs3jhjl695p5pv13ihglcjlrrz1kq05lsvb0wa7"))))
5265 (build-system python-build-system)
5266 (arguments
5267 `(#:python ,python-2 ;Python 2 only
5268 #:tests? #f)) ;no tests
5269 (home-page "http://python-xlib.sourceforge.net/")
5270 (synopsis "Python X11 client library")
5271 (description
5272 "The Python X Library is intended to be a fully functional X client
5273 library for Python programs. It is useful to implement low-level X clients.
5274 It is written entirely in Python.")
5275 (license license:gpl2+)))
5276
5277 (define-public python-singledispatch
5278 (package
5279 (name "python-singledispatch")
5280 (version "3.4.0.3")
5281 (source
5282 (origin
5283 (method url-fetch)
5284 (uri (pypi-uri "singledispatch" version))
5285 (sha256
5286 (base32
5287 "171b7ip0hsq5qm83np40h3phlr36ym18w0lay0a8v08kvy3sy1jv"))))
5288 (build-system python-build-system)
5289 (native-inputs
5290 `(("python-six" ,python-six))) ; required for conversion, not at run-time
5291 (home-page
5292 "http://docs.python.org/3/library/functools.html#functools.singledispatch")
5293 (synopsis "Backport of singledispatch feature from Python 3.4")
5294 (description
5295 "This library brings functools.singledispatch from Python 3.4 to Python
5296 2.6-3.3.")
5297 (license license:expat)))
5298
5299 (define-public python2-singledispatch
5300 (package-with-python2 python-singledispatch))
5301
5302 (define-public python-tornado
5303 (package
5304 (name "python-tornado")
5305 (version "4.3")
5306 (source
5307 (origin
5308 (method url-fetch)
5309 (uri (pypi-uri "tornado" version))
5310 (sha256
5311 (base32 "1gzgwayl6hmc9jfcl88bni4jcsk2jcca9dn1rvrfsvnijcjx7hn9"))))
5312 (build-system python-build-system)
5313 (native-inputs
5314 `(("python-certifi" ,python-certifi)))
5315 (propagated-inputs
5316 `(("python-backports-abc" ,python-backports-abc)))
5317 (home-page "http://www.tornadoweb.org/")
5318 (synopsis "Python web framework and asynchronous networking library")
5319 (description
5320 "Tornado is a Python web framework and asynchronous networking library,
5321 originally developed at FriendFeed. By using non-blocking network I/O,
5322 Tornado can scale to tens of thousands of open connections, making it ideal
5323 for long polling, WebSockets, and other applications that require a long-lived
5324 connection to each user.")
5325 (license license:asl2.0)
5326 (properties `((python2-variant . ,(delay python2-tornado))))))
5327
5328 (define-public python2-tornado
5329 (let ((tornado (package-with-python2 (strip-python2-variant python-tornado))))
5330 (package (inherit tornado)
5331 (propagated-inputs
5332 `(("python2-backport-ssl-match-hostname"
5333 ,python2-backport-ssl-match-hostname)
5334 ("python2-singledispatch" ,python2-singledispatch)
5335 ,@(package-propagated-inputs tornado))))))
5336
5337 ;; the python- version can be removed with python-3.5
5338 (define-public python-backports-abc
5339 (package
5340 (name "python-backports-abc")
5341 (version "0.4")
5342 (source
5343 (origin
5344 (method url-fetch)
5345 (uri (pypi-uri "backports_abc" version))
5346 (sha256
5347 (base32
5348 "19fh75lni9pb673n2fn505m1rckm0af0szcv5xx1qm1xpa940glb"))))
5349 (build-system python-build-system)
5350 (home-page "https://github.com/cython/backports_abc")
5351 (synopsis "Backport of additions to the 'collections.abc' module")
5352 (description
5353 "Python-backports-abc provides a backport of additions to the
5354 'collections.abc' module in Python-3.5.")
5355 (license license:psfl)))
5356
5357 (define-public python2-backports-abc
5358 (package-with-python2 python-backports-abc))
5359
5360 (define-public python-waf
5361 (package
5362 (name "python-waf")
5363 (version "1.9.5")
5364 (source (origin
5365 (method url-fetch)
5366 (uri (string-append "https://waf.io/"
5367 "waf-" version ".tar.bz2"))
5368 (sha256
5369 (base32
5370 "1sl3ipi2czds57rlzjnpdzqa0skx8asfvmh3qmibpvdwf15rpppg"))))
5371 (build-system python-build-system)
5372 (arguments
5373 '(#:phases
5374 (modify-phases %standard-phases
5375 (replace 'build
5376 (lambda _
5377 (zero? (system* "python" "waf-light" "configure" "build"))))
5378 (replace 'check
5379 (lambda _
5380 (zero? (system* "python" "waf" "--version"))))
5381 (replace 'install
5382 (lambda _
5383 (copy-file "waf" %output))))))
5384 (home-page "http://waf.io/")
5385 (synopsis "Python-based build system")
5386 (description
5387 "Waf is a Python-based framework for configuring, compiling and installing
5388 applications.")
5389 (license license:bsd-3)))
5390
5391 (define-public python2-waf
5392 (package-with-python2 python-waf))
5393
5394 (define-public python-pyzmq
5395 (package
5396 (name "python-pyzmq")
5397 (version "15.1.0")
5398 (source
5399 (origin
5400 (method url-fetch)
5401 (uri (pypi-uri "pyzmq" version))
5402 (sha256
5403 (base32 "13fhwnlvsvxv72kfhqbpn6qi7msh8mc8377mpabv32skk2cjfnxx"))))
5404 (build-system python-build-system)
5405 (arguments
5406 `(#:configure-flags
5407 (list (string-append "--zmq=" (assoc-ref %build-inputs "zeromq")))
5408 ;; FIXME: You must build pyzmq with 'python setup.py build_ext
5409 ;; --inplace' for 'python setup.py test' to work.
5410 #:tests? #f))
5411 (inputs
5412 `(("zeromq" ,zeromq)))
5413 (native-inputs
5414 `(("pkg-config" ,pkg-config)
5415 ("python-nose" ,python-nose)))
5416 (home-page "http://github.com/zeromq/pyzmq")
5417 (synopsis "Python bindings for 0MQ")
5418 (description
5419 "PyZMQ is the official Python binding for the ZeroMQ messaging library.")
5420 (license license:bsd-4)))
5421
5422 (define-public python2-pyzmq
5423 (package-with-python2 python-pyzmq))
5424
5425 (define-public python-pep8
5426 (package
5427 (name "python-pep8")
5428 (version "1.7.0")
5429 (source
5430 (origin
5431 (method url-fetch)
5432 (uri (pypi-uri "pep8" version))
5433 (sha256
5434 (base32
5435 "002rkl4lsn6x2mxmf8ar00l0m8i3mzrc6pnzz77blyksmpsxa4x1"))))
5436 (build-system python-build-system)
5437 (home-page "http://pep8.readthedocs.org/")
5438 (synopsis "Python style guide checker")
5439 (description
5440 "This tools checks Python code against some of the style conventions in
5441 PEP 8.")
5442 (license license:expat)))
5443
5444 (define-public python2-pep8
5445 (package-with-python2 python-pep8))
5446
5447 (define-public python-pyflakes
5448 (package
5449 (name "python-pyflakes")
5450 (version "1.0.0")
5451 (source
5452 (origin
5453 (method url-fetch)
5454 (uri (pypi-uri "pyflakes" version))
5455 (sha256
5456 (base32
5457 "0qs2sgqszq7wcplis8509wk2ygqcrwzbs1ghfj3svvivq2j377pk"))))
5458 (build-system python-build-system)
5459 (home-page
5460 "https://github.com/pyflakes/pyflakes")
5461 (synopsis "Passive checker of Python programs")
5462 (description
5463 "Pyflakes statically checks Python source code for common errors.")
5464 (license license:expat)))
5465
5466 (define-public python2-pyflakes
5467 (package-with-python2 python-pyflakes))
5468
5469 (define-public python-mccabe
5470 (package
5471 (name "python-mccabe")
5472 (version "0.4.0")
5473 (source
5474 (origin
5475 (method url-fetch)
5476 (uri (pypi-uri "mccabe" version))
5477 (sha256
5478 (base32
5479 "0yr08a36h8lqlif10l4xcikbbig7q8f41gqywir7rrvnv3mi4aws"))))
5480 (build-system python-build-system)
5481 (native-inputs
5482 `(("python-pytest" ,python-pytest)
5483 ("python-pytest-runner" ,python-pytest-runner)))
5484 (home-page "https://github.com/flintwork/mccabe")
5485 (synopsis "McCabe checker, plugin for flake8")
5486 (description
5487 "This package provides a Flake8 plug-in to compute the McCabe cyclomatic
5488 complexity of Python source code.")
5489 (license license:expat)))
5490
5491 (define-public python2-mccabe
5492 (package-with-python2 python-mccabe))
5493
5494 (define-public python-mccabe-0.2.1
5495 (package (inherit python-mccabe)
5496 (version "0.2.1")
5497 (source
5498 (origin
5499 (method url-fetch)
5500 (uri (pypi-uri "mccabe" version))
5501 (sha256
5502 (base32
5503 "0fi4a81kr5bcv5p4xgibqr595hyj5dafkqgsmfk96mfy8w71fajs"))))))
5504
5505 (define-public python2-mccabe-0.2.1
5506 (package-with-python2 python-mccabe-0.2.1))
5507
5508 ;; Flake8 2.4.1 requires an older version of pep8.
5509 ;; This should be removed ASAP.
5510 (define-public python-pep8-1.5.7
5511 (package (inherit python-pep8)
5512 (version "1.5.7")
5513 (source
5514 (origin
5515 (method url-fetch)
5516 (uri (string-append
5517 "https://pypi.python.org/packages/source/p/pep8/pep8-"
5518 version
5519 ".tar.gz"))
5520 (sha256
5521 (base32
5522 "12b9bbdbwnspxgak14xg58c130x2n0blxzlms5jn2dszn8qj3d0m"))))))
5523
5524 (define-public python2-pep8-1.5.7
5525 (package-with-python2 python-pep8-1.5.7))
5526
5527 ;; Flake8 2.4.1 requires an older version of pyflakes.
5528 ;; This should be removed ASAP.
5529 (define-public python-pyflakes-0.8.1
5530 (package (inherit python-pyflakes)
5531 (version "0.8.1")
5532 (source
5533 (origin
5534 (method url-fetch)
5535 (uri (string-append
5536 "https://pypi.python.org/packages/source/p/pyflakes/pyflakes-"
5537 version
5538 ".tar.gz"))
5539 (sha256
5540 (base32
5541 "0sbpq6pqm1i9wqi41mlfrsc5rk92jv4mskvlyxmnhlbdnc80ma1z"))))))
5542
5543 (define-public python2-pyflakes-0.8.1
5544 (package-with-python2 python-pyflakes-0.8.1))
5545
5546 (define-public python-flake8
5547 (package
5548 (name "python-flake8")
5549 (version "2.5.4")
5550 (source
5551 (origin
5552 (method url-fetch)
5553 (uri (pypi-uri "flake8" version))
5554 (sha256
5555 (base32
5556 "0bs9cz4fr99r2rwig1b8jwaadl1nan7kgpdzqwj0bwbckwbmh7nc"))))
5557 (build-system python-build-system)
5558 (propagated-inputs
5559 `(("python-pep8" ,python-pep8)
5560 ("python-pyflakes" ,python-pyflakes)
5561 ("python-mccabe" ,python-mccabe)))
5562 (native-inputs
5563 `(("python-mock" ,python-mock) ; TODO: only required for < 3.3
5564 ("python-nose" ,python-nose)))
5565 (home-page "https://gitlab.com/pycqa/flake8")
5566 (synopsis
5567 "The modular source code checker: pep8, pyflakes and co")
5568 (description
5569 "Flake8 is a wrapper around PyFlakes, pep8 and python-mccabe.")
5570 (license license:expat)))
5571
5572 (define-public python2-flake8
5573 (package-with-python2 python-flake8))
5574
5575 ;; This will only be needed by the python-hacking package and will not be
5576 ;; necessary once python-hacking > 0.10.2 is released.
5577 (define-public python-flake8-2.2.4
5578 (package (inherit python-flake8)
5579 (propagated-inputs
5580 `(("python-pep8" ,python-pep8-1.5.7)
5581 ("python-pyflakes" ,python-pyflakes-0.8.1)
5582 ("python-mccabe" ,python-mccabe-0.2.1)))
5583 (native-inputs
5584 `(("python-mock" ,python-mock)
5585 ("python-nose" ,python-nose)))
5586 (version "2.2.4")
5587 (source
5588 (origin
5589 (method url-fetch)
5590 (uri (pypi-uri "flake8" version))
5591 (sha256
5592 (base32
5593 "1r9wsry4va45h1rck5hxd3vzsg2q3y6lnl6pym1bxvz8ry19jwx8"))))))
5594
5595 (define-public python2-flake8-2.2.4
5596 (package-with-python2 python-flake8-2.2.4))
5597
5598 (define-public python-mistune
5599 (package
5600 (name "python-mistune")
5601 (version "0.7")
5602 (source
5603 (origin
5604 (method url-fetch)
5605 (uri (string-append
5606 "https://pypi.python.org/packages/source/m/mistune/mistune-"
5607 version
5608 ".tar.gz"))
5609 (sha256
5610 (base32
5611 "17zqjp9m4d1w3jf2rbbq5xshcw24q1vlcv24gkgfqqyyymajxahx"))))
5612 (build-system python-build-system)
5613 (native-inputs
5614 `(("python-nose" ,python-nose)
5615 ("python-cython" ,python-cython)))
5616 (home-page "https://github.com/lepture/mistune")
5617 (synopsis "Markdown parser in pure Python")
5618 (description "This package provides a fast markdown parser in pure
5619 Python.")
5620 (license license:bsd-3)))
5621
5622 (define-public python2-mistune
5623 (package-with-python2 python-mistune))
5624
5625 (define-public python-markdown
5626 (package
5627 (name "python-markdown")
5628 (version "2.6.5")
5629 (source
5630 (origin
5631 (method url-fetch)
5632 (uri (pypi-uri "Markdown" version))
5633 (sha256
5634 (base32
5635 "0q758a3fiiawr20b3hhjfs677cwj6xi284yb7xspcvv0fdicz54d"))))
5636 (build-system python-build-system)
5637 (arguments
5638 `(#:phases
5639 (modify-phases %standard-phases
5640 (replace 'check
5641 (lambda _
5642 (zero? (system* "python" "run-tests.py")))))))
5643 (native-inputs
5644 `(("python-nose" ,python-nose)
5645 ("python-pyyaml" ,python-pyyaml)))
5646 (home-page "https://pythonhosted.org/Markdown/")
5647 (synopsis "Python implementation of Markdown")
5648 (description
5649 "This package provides a Python implementation of John Gruber's
5650 Markdown. The library features international input, various Markdown
5651 extensions, and several HTML output formats. A command line wrapper
5652 markdown_py is also provided to convert Markdown files to HTML.")
5653 (license license:bsd-3)))
5654
5655 (define-public python2-markdown
5656 (package-with-python2 python-markdown))
5657
5658 (define-public python-ptyprocess
5659 (package
5660 (name "python-ptyprocess")
5661 (version "0.5")
5662 (source
5663 (origin
5664 (method url-fetch)
5665 (uri (string-append
5666 "https://pypi.python.org/packages/source/p/ptyprocess/ptyprocess-"
5667 version ".tar.gz"))
5668 (sha256
5669 (base32
5670 "0nggns5kikn32yyda2zrj1xdmh49pi3v0drggcdwljbv36r8zdyw"))))
5671 (build-system python-build-system)
5672 (native-inputs
5673 `(("python-nose" ,python-nose)))
5674 (arguments
5675 `(#:phases
5676 (modify-phases %standard-phases
5677 (replace 'check
5678 (lambda _
5679 (zero? (system* "nosetests")))))))
5680 (home-page "https://github.com/pexpect/ptyprocess")
5681 (synopsis "Run a subprocess in a pseudo terminal")
5682 (description
5683 "This package provides a Python library used to launch a subprocess in a
5684 pseudo terminal (pty), and interact with both the process and its pty.")
5685 (license license:isc)))
5686
5687 (define-public python2-ptyprocess
5688 (package-with-python2 python-ptyprocess))
5689
5690 (define-public python-terminado
5691 (package
5692 (name "python-terminado")
5693 (version "0.6")
5694 (source
5695 (origin
5696 (method url-fetch)
5697 (uri (pypi-uri "terminado" version))
5698 (sha256
5699 (base32
5700 "09h1kwi86g5mrk14s4pgbhshd602zry29lnpxamcqz864kva22rc"))))
5701 (build-system python-build-system)
5702 (propagated-inputs
5703 `(("python-tornado" ,python-tornado)
5704 ("python-ptyprocess" ,python-ptyprocess)))
5705 (native-inputs
5706 `(("python-nose" ,python-nose)))
5707 (arguments
5708 `(#:phases
5709 (modify-phases %standard-phases
5710 (replace 'check
5711 (lambda _
5712 (zero? (system* "nosetests")))))))
5713 (home-page "https://github.com/takluyver/terminado")
5714 (synopsis "Terminals served to term.js using Tornado websockets")
5715 (description "This package provides a Tornado websocket backend for the
5716 term.js Javascript terminal emulator library.")
5717 (license license:bsd-2)
5718 (properties `((python2-variant . ,(delay python2-terminado))))))
5719
5720 (define-public python2-terminado
5721 (let ((terminado (package-with-python2 (strip-python2-variant python-terminado))))
5722 (package (inherit terminado)
5723 (propagated-inputs
5724 `(("python2-backport-ssl-match-hostname"
5725 ,python2-backport-ssl-match-hostname)
5726 ,@(package-propagated-inputs terminado))))))
5727
5728 (define-public python-fonttools
5729 (package
5730 (name "python-fonttools")
5731 (version "2.5")
5732 (source (origin
5733 (method url-fetch)
5734 (uri (string-append
5735 "https://pypi.python.org/packages/source/F/FontTools/"
5736 "fonttools-" version ".tar.gz"))
5737 (sha256
5738 (base32
5739 "08ay3x4ijarwhl60gqx2i9jzq6pxs20p4snc2d1q5jagh4rn39lb"))))
5740 (build-system python-build-system)
5741 (arguments
5742 '(#:test-target "check"
5743 #:phases
5744 (modify-phases %standard-phases
5745 (add-after 'unpack 'patch-setuppy
5746 ;; Remove the undocumented "extra_path" argument, which adds an
5747 ;; intervening directories between site-packages and the package
5748 ;; directory.
5749 (lambda _
5750 (substitute* "setup.py"
5751 (("^[ \t]*extra_path *= *'FontTools',") ""))
5752 #t)))))
5753 (home-page "http://github.com/behdad/fonttools")
5754 (synopsis "Tools to manipulate font files")
5755 (description
5756 "FontTools/TTX is a library to manipulate font files from Python. It
5757 supports reading and writing of TrueType/OpenType fonts, reading and writing
5758 of AFM files, reading (and partially writing) of PS Type 1 fonts. The package
5759 also contains a tool called “TTX” which converts TrueType/OpenType fonts to and
5760 from an XML-based format.")
5761 (license (license:non-copyleft
5762 "file://LICENSE.txt"
5763 "See LICENSE.txt in the distribution."))))
5764
5765 (define-public python2-fonttools
5766 (package-with-python2 python-fonttools))
5767
5768 (define-public python-ly
5769 (package
5770 (name "python-ly")
5771 (version "0.9.4")
5772 (source
5773 (origin
5774 (method url-fetch)
5775 (uri (string-append "https://pypi.python.org/packages/57/4f/"
5776 "889579244947368f28eda66b782331b1e75f83fd72e63f9ece93cd7a18f9"
5777 "/python-ly-" version ".tar.gz"))
5778 (sha256
5779 (base32
5780 "0g6n288l83sfwavxh1aryi0aqvsr3sp7v6f903mckwqa4scpky62"))))
5781 (build-system python-build-system)
5782 (synopsis "Tool and library for manipulating LilyPond files")
5783 (description "This package provides a Python library to parse, manipulate
5784 or create documents in LilyPond format. A command line program ly is also
5785 provided that can be used to do various manipulations with LilyPond files.")
5786 (home-page "https://pypi.python.org/pypi/python-ly")
5787 (license license:gpl2+)))
5788
5789 (define-public python-appdirs
5790 (package
5791 (name "python-appdirs")
5792 (version "1.4.0")
5793 (source
5794 (origin
5795 (method url-fetch)
5796 (uri (string-append
5797 "https://pypi.python.org/packages/source/a/appdirs/appdirs-"
5798 version
5799 ".tar.gz"))
5800 (sha256
5801 (base32
5802 "1iddva7v3fq0aqzsahkazxr7vpw28mqcrsy818z4wyiqnkplbhlg"))))
5803 (build-system python-build-system)
5804 (home-page "http://github.com/ActiveState/appdirs")
5805 (synopsis
5806 "Determine platform-specific dirs, e.g. a \"user data dir\"")
5807 (description
5808 "This module provides a portable way of finding out where user data
5809 should be stored on various operating systems.")
5810 (license license:expat)))
5811
5812 (define-public python2-appdirs
5813 (package-with-python2 python-appdirs))
5814
5815 (define-public python-llfuse
5816 (package
5817 (name "python-llfuse")
5818 (version "1.1.1")
5819 (source (origin
5820 (method url-fetch)
5821 (uri (string-append
5822 "https://bitbucket.org/nikratio/python-llfuse/downloads/"
5823 "llfuse-" version ".tar.bz2"))
5824 (sha256
5825 (base32
5826 "0v6vj9mb286njgd1szg9hz2qdh5f3vkhsvajripfcqg458av310v"))))
5827 (build-system python-build-system)
5828 (inputs
5829 `(("fuse" ,fuse)
5830 ("attr" ,attr)))
5831 (native-inputs
5832 `(("pkg-config" ,pkg-config)))
5833 (synopsis "Python bindings for FUSE")
5834 (description
5835 "Python-LLFUSE is a set of Python bindings for the low level FUSE API.")
5836 (home-page "https://bitbucket.org/nikratio/python-llfuse/")
5837 (license license:lgpl2.0+)
5838 (properties `((python2-variant . ,(delay python2-llfuse))))))
5839
5840 (define-public python2-llfuse
5841 (package (inherit (package-with-python2
5842 (strip-python2-variant python-llfuse)))
5843 (propagated-inputs `(("python2-contextlib2" ,python2-contextlib2)))))
5844
5845 ;; For attic-0.16
5846 (define-public python-llfuse-0.41
5847 (package (inherit python-llfuse)
5848 (version "0.41.1")
5849 (source (origin
5850 (method url-fetch)
5851 (uri (string-append
5852 "https://bitbucket.org/nikratio/python-llfuse/downloads/"
5853 "llfuse-" version ".tar.bz2"))
5854 (sha256
5855 (base32
5856 "1imlqw9b73086y97izr036f58pgc5akv4ihc2rrf8j5h75jbrlaa"))))
5857 ;; Python-LLFUSE < 0.42 includes underscore.js, which is MIT (expat)
5858 ;; licensed. The rest of the package is licensed under LGPL2.0 or later.
5859 (license (list license:expat license:lgpl2.0+))))
5860
5861 (define-public python-msgpack
5862 (package
5863 (name "python-msgpack")
5864 (version "0.4.8")
5865 (source (origin
5866 (method url-fetch)
5867 (uri (pypi-uri "msgpack-python" version))
5868 (sha256
5869 (base32
5870 "11pqk5braa6wndpnr1dhg64js82vjgxnm0lzy73rwl831zgijaqs"))))
5871 (build-system python-build-system)
5872 (synopsis "MessagePack (de)serializer")
5873 (description "MessagePack is a fast, compact binary serialization format,
5874 suitable for similar data to JSON. This package provides CPython bindings for
5875 reading and writing MessagePack data.")
5876 (home-page "https://pypi.python.org/pypi/msgpack-python/")
5877 (license license:asl2.0)))
5878
5879 (define-public python2-msgpack
5880 (package-with-python2 python-msgpack))
5881
5882 (define-public python-netaddr
5883 (package
5884 (name "python-netaddr")
5885 (version "0.7.18")
5886 (source
5887 (origin
5888 (method url-fetch)
5889 (uri (string-append
5890 "https://pypi.python.org/packages/source/n/netaddr/netaddr-"
5891 version
5892 ".tar.gz"))
5893 (sha256
5894 (base32
5895 "06dxjlbcicq7q3vqy8agq11ra01kvvd47j4mk6dmghjsyzyckxd1"))))
5896 (build-system python-build-system)
5897 (arguments `(#:tests? #f)) ;; No tests.
5898 (home-page "https://github.com/drkjam/netaddr/")
5899 (synopsis "Pythonic manipulation of network addresses")
5900 (description
5901 "A Python library for representing and manipulating IPv4, IPv6, CIDR, EUI
5902 and MAC network addresses.")
5903 (license license:bsd-3)))
5904
5905 (define-public python2-netaddr
5906 (package-with-python2 python-netaddr))
5907
5908 (define-public python-wrapt
5909 (package
5910 (name "python-wrapt")
5911 (version "1.10.5")
5912 (source
5913 (origin
5914 (method url-fetch)
5915 (uri (string-append
5916 "https://pypi.python.org/packages/source/w/wrapt/wrapt-"
5917 version
5918 ".tar.gz"))
5919 (sha256
5920 (base32
5921 "0cq8rlpzkxzk48b50yrfhzn1d1hrq4gjcdqlrgq4v5palgiv9jwr"))))
5922 (build-system python-build-system)
5923 (arguments
5924 ;; Tests are not included in the tarball, they are only available in the
5925 ;; git repository.
5926 `(#:tests? #f))
5927 (home-page "https://github.com/GrahamDumpleton/wrapt")
5928 (synopsis "Module for decorators, wrappers and monkey patching")
5929 (description
5930 "The aim of the wrapt module is to provide a transparent object proxy for
5931 Python, which can be used as the basis for the construction of function
5932 wrappers and decorator functions.")
5933 (license license:bsd-2)))
5934
5935 (define-public python2-wrapt
5936 (package-with-python2 python-wrapt))
5937
5938 (define-public python-iso8601
5939 (package
5940 (name "python-iso8601")
5941 (version "0.1.11")
5942 (source
5943 (origin
5944 (method url-fetch)
5945 (uri (pypi-uri "iso8601" version))
5946 (sha256
5947 (base32
5948 "0c7gh3lsdjds262h0v1sqc66l7hqgfwbakn96qrhdbl0i3vm5yz8"))))
5949 (build-system python-build-system)
5950 (home-page "https://bitbucket.org/micktwomey/pyiso8601")
5951 (synopsis "Module to parse ISO 8601 dates")
5952 (description
5953 "This module parses the most common forms of ISO 8601 date strings (e.g.
5954 @code{2007-01-14T20:34:22+00:00}) into @code{datetime} objects.")
5955 (license license:expat)))
5956
5957 (define-public python2-iso8601
5958 (package-with-python2 python-iso8601))
5959
5960 (define-public python-monotonic
5961 (package
5962 (name "python-monotonic")
5963 (version "0.3")
5964 (source
5965 (origin
5966 (method url-fetch)
5967 (uri (string-append
5968 "https://pypi.python.org/packages/source/m/monotonic/monotonic-"
5969 version
5970 ".tar.gz"))
5971 (sha256
5972 (base32
5973 "0yz0bcbwx8r2c01czzfpbrxddynxyk9k95jj8h6sgcb7xmfvl998"))))
5974 (build-system python-build-system)
5975 (home-page "https://github.com/atdt/monotonic")
5976 (synopsis "Implementation of time.monotonic() for Python 2 & < 3.3")
5977 (description
5978 "This module provides a monotonic() function which returns the value (in
5979 fractional seconds) of a clock which never goes backwards.")
5980 (license license:asl2.0)))
5981
5982 (define-public python2-monotonic
5983 (package-with-python2 python-monotonic))
5984
5985 (define-public python-webob
5986 (package
5987 (name "python-webob")
5988 (version "1.5.1")
5989 (source
5990 (origin
5991 (method url-fetch)
5992 (uri (pypi-uri "WebOb" version))
5993 (sha256
5994 (base32
5995 "02bhhzijfhv8hmi1i54d4b0v43liwhnywhflvxsv4x3zax9s3afq"))))
5996 (build-system python-build-system)
5997 (native-inputs
5998 `(("python-nose" ,python-nose)))
5999 (home-page "http://webob.org/")
6000 (synopsis "WSGI request and response object")
6001 (description
6002 "WebOb provides wrappers around the WSGI request environment, and an
6003 object to help create WSGI responses.")
6004 (license license:expat)))
6005
6006 (define-public python2-webob
6007 (package-with-python2 python-webob))
6008
6009 (define-public python-xlrd
6010 (package
6011 (name "python-xlrd")
6012 (version "1.0.0")
6013 (source (origin
6014 (method url-fetch)
6015 (uri (pypi-uri "xlrd" version))
6016 (sha256
6017 (base32
6018 "0s8hjiz01vbhy85xalrz0qlsmd9ypf36zjqrf97hh984spapvy0g"))))
6019 (build-system python-build-system)
6020 (arguments
6021 `(#:phases
6022 (modify-phases %standard-phases
6023 ;; Current test in setup.py does not work as of 1.0.0, so use nose to
6024 ;; run tests instead for now.
6025 (replace 'check (lambda _ (zero? (system* "nosetests")))))))
6026 (native-inputs `(("python-nose" ,python-nose)))
6027 (home-page "http://www.python-excel.org/")
6028 (synopsis "Library for extracting data from Excel files")
6029 (description "This packages provides a library to extract data from
6030 spreadsheets using Microsoft Excel proprietary file formats @samp{.xls} and
6031 @samp{.xlsx} (versions 2.0 onwards). It has support for Excel dates and is
6032 Unicode-aware. It is not intended as an end-user tool.")
6033 (license license:bsd-3)))
6034
6035 (define-public python2-xlrd
6036 (package-with-python2 python-xlrd))
6037
6038 (define-public python-prettytable
6039 (package
6040 (name "python-prettytable")
6041 (version "0.7.2")
6042 (source
6043 (origin
6044 (method url-fetch)
6045 (uri (string-append
6046 "https://pypi.python.org/packages/source/P/PrettyTable/"
6047 "prettytable-" version ".tar.bz2"))
6048 (sha256
6049 (base32
6050 "0diwsicwmiq2cpzpxri7cyl5fmsvicafw6nfqf6p6p322dji2g45"))))
6051 (build-system python-build-system)
6052 (home-page "http://code.google.com/p/prettytable/")
6053 (synopsis "Display tabular data in an ASCII table format")
6054 (description
6055 "A library designed to represent tabular data in visually appealing ASCII
6056 tables. PrettyTable allows for selection of which columns are to be printed,
6057 independent alignment of columns (left or right justified or centred) and
6058 printing of sub-tables by specifying a row range.")
6059 (license license:bsd-3)))
6060
6061 (define-public python2-prettytable
6062 (package-with-python2 python-prettytable))
6063
6064 (define-public python-tables
6065 (package
6066 (name "python-tables")
6067 (version "3.2.2")
6068 (source
6069 (origin
6070 (method url-fetch)
6071 (uri (pypi-uri "tables" version))
6072 (sha256
6073 (base32
6074 "117s6w7s3yxafpmf3zz3svana7xfrsviw01va1xp7h8ylx8v6r1m"))))
6075 (build-system python-build-system)
6076 (arguments
6077 `(;; FIXME: python-build-system does not pass configure-flags to "build"
6078 ;; or "check", so we must override the build and check phases.
6079 #:phases
6080 (modify-phases %standard-phases
6081 (add-after 'unpack 'use-gcc
6082 (lambda _
6083 (substitute* "setup.py"
6084 (("compiler = new_compiler\\(\\)" line)
6085 (string-append line
6086 "\ncompiler.set_executables(compiler='gcc',"
6087 "compiler_so='gcc',"
6088 "linker_exe='gcc',"
6089 "linker_so='gcc -shared')")))
6090 #t))
6091 (replace 'build
6092 (lambda* (#:key inputs #:allow-other-keys)
6093 (zero? (system* "python" "setup.py" "build"
6094 (string-append "--hdf5="
6095 (assoc-ref inputs "hdf5"))))))
6096 (replace 'check
6097 (lambda* (#:key inputs #:allow-other-keys)
6098 (zero? (system* "python" "setup.py" "check"
6099 (string-append "--hdf5="
6100 (assoc-ref inputs "hdf5")))))))))
6101 (propagated-inputs
6102 `(("python-numexpr" ,python-numexpr)
6103 ("python-numpy" ,python-numpy)))
6104 (native-inputs
6105 `(("python-cython" ,python-cython)
6106 ("pkg-config" ,pkg-config)))
6107 (inputs
6108 `(("hdf5" ,hdf5)
6109 ("bzip2" ,bzip2)
6110 ("zlib" ,zlib)))
6111 (home-page "http://www.pytables.org/")
6112 (synopsis "Hierarchical datasets for Python")
6113 (description "PyTables is a package for managing hierarchical datasets and
6114 designed to efficently cope with extremely large amounts of data.")
6115 (license license:bsd-3)))
6116
6117 (define-public python2-tables
6118 (package-with-python2 python-tables))
6119
6120 (define-public python-pyasn1
6121 (package
6122 (name "python-pyasn1")
6123 (version "0.1.9")
6124 (source
6125 (origin
6126 (method url-fetch)
6127 (uri (pypi-uri "pyasn1" version))
6128 (sha256
6129 (base32
6130 "0zraxni14bqi20kr4bi6nwsh32aibz0fq0xaczfisw0zdpcsqg45"))))
6131 (build-system python-build-system)
6132 (home-page "http://pyasn1.sourceforge.net/")
6133 (synopsis "ASN.1 types and codecs")
6134 (description
6135 "This is an implementation of ASN.1 types and codecs in Python. It is
6136 suitable for a wide range of protocols based on the ASN.1 specification.")
6137 (license license:bsd-2)))
6138
6139 (define-public python2-pyasn1
6140 (package-with-python2 python-pyasn1))
6141
6142 (define-public python-pyasn1-modules
6143 (package
6144 (name "python-pyasn1-modules")
6145 (version "0.0.8")
6146 (source
6147 (origin
6148 (method url-fetch)
6149 (uri (pypi-uri "pyasn1-modules" version))
6150 (sha256
6151 (base32
6152 "0drqgw81xd3fxdlg89kgd79zzrabvfncvkbybi2wr6w2y4s1jmhh"))))
6153 (build-system python-build-system)
6154 (propagated-inputs
6155 `(("python-pyasn1" ,python-pyasn1)))
6156 (home-page "http://sourceforge.net/projects/pyasn1/")
6157 (synopsis "ASN.1 codec implementations")
6158 (description
6159 "Pyasn1-modules is a collection of Python modules providing ASN.1 types and
6160 implementations of ASN.1-based codecs and protocols.")
6161 (license license:bsd-3)))
6162
6163 (define-public python2-pyasn1-modules
6164 (package-with-python2 python-pyasn1-modules))
6165
6166 (define-public python-ipaddress
6167 (package
6168 (name "python-ipaddress")
6169 (version "1.0.16")
6170 (source (origin
6171 (method url-fetch)
6172 (uri (pypi-uri "ipaddress" version))
6173 (sha256
6174 (base32
6175 "1c3imabdrw8nfksgjjflzg7h4ynjckqacb188rf541m74arq4cas"))))
6176 (build-system python-build-system)
6177 (home-page "https://github.com/phihag/ipaddress")
6178 (synopsis "IP address manipulation library")
6179 (description
6180 "This package provides a fast, lightweight IPv4/IPv6 manipulation library
6181 in Python. This library is used to create, poke at, and manipulate IPv4 and
6182 IPv6 addresses and networks. This is a port of the Python 3.3 ipaddress
6183 module to older versions of Python.")
6184 (license license:psfl)))
6185
6186 (define-public python2-ipaddress
6187 (package-with-python2 python-ipaddress))
6188
6189 (define-public python2-ipaddr
6190 (package
6191 (name "python2-ipaddr")
6192 (version "2.1.11")
6193 (source
6194 (origin
6195 (method url-fetch)
6196 (uri (pypi-uri "ipaddr" version))
6197 (sha256
6198 (base32 "1dwq3ngsapjc93fw61rp17fvzggmab5x1drjzvd4y4q0i255nm8v"))))
6199 (build-system python-build-system)
6200 (arguments
6201 `(#:python ,python-2 ;version 2 only
6202 #:phases
6203 (modify-phases %standard-phases
6204 (replace 'check
6205 (lambda* _
6206 (zero? (system* "python" "ipaddr_test.py")))))))
6207 (home-page "https://github.com/google/ipaddr-py")
6208 (synopsis "IP address manipulation library")
6209 (description
6210 "Ipaddr is a Python@tie{}2 library for creating and manupilating IPv4 and
6211 IPv6 addresses and networks.
6212
6213 For new implementations you may prefer to use the standard module
6214 @code{ipaddress}, which was introduced in Python 3.3 and backported to older
6215 versions of Python.")
6216 (license license:asl2.0)))
6217
6218 (define-public python-idna
6219 (package
6220 (name "python-idna")
6221 (version "2.0")
6222 (source
6223 (origin
6224 (method url-fetch)
6225 (uri (string-append "https://pypi.python.org/packages/source/i/"
6226 "idna/idna-" version ".tar.gz"))
6227 (sha256
6228 (base32
6229 "0frxgmgi234lr9hylg62j69j4ik5zhg0wz05w5dhyacbjfnrl68n"))))
6230 (build-system python-build-system)
6231 (home-page "https://github.com/kjd/idna")
6232 (synopsis "Internationalized domain names in applications")
6233 (description
6234 "This is a library to support the Internationalised Domain Names in
6235 Applications (IDNA) protocol as specified in RFC 5891. This version of the
6236 protocol is often referred to as “IDNA2008” and can produce different results
6237 from the earlier standard from 2003. The library is also intended to act as a
6238 suitable drop-in replacement for the “encodings.idna” module that comes with
6239 the Python standard library but currently only supports the older 2003
6240 specification.")
6241 (license license:bsd-4)))
6242
6243 (define-public python2-idna
6244 (package-with-python2 python-idna))
6245
6246 (define-public python-pretend
6247 (package
6248 (name "python-pretend")
6249 (version "1.0.8")
6250 (source
6251 (origin
6252 (method url-fetch)
6253 (uri (string-append "https://pypi.python.org/packages/source/p/"
6254 "pretend/pretend-" version ".tar.gz"))
6255 (sha256
6256 (base32
6257 "0r5r7ygz9m6d2bklflbl84cqhjkc2q12xgis8268ygjh30g2q3wk"))))
6258 (build-system python-build-system)
6259 (home-page "https://github.com/alex/pretend")
6260 (synopsis "Library for stubbing in Python")
6261 (description
6262 "Pretend is a library to make stubbing with Python easier. Stubbing is a
6263 technique for writing tests. You may hear the term mixed up with mocks,
6264 fakes, or doubles. Basically, a stub is an object that returns pre-canned
6265 responses, rather than doing any computation.")
6266 (license license:bsd-3)))
6267
6268 (define-public python2-pretend
6269 (package-with-python2 python-pretend))
6270
6271 (define-public python-cryptography-vectors
6272 (package
6273 (name "python-cryptography-vectors")
6274 (version "1.5.3")
6275 (source
6276 (origin
6277 (method url-fetch)
6278 (uri (pypi-uri "cryptography_vectors" version))
6279 (sha256
6280 (base32
6281 "1bnd1bricyhxa27rhr0ljk0kacxzvysd3ar2j2hlv13a2k6zw4z5"))))
6282 (build-system python-build-system)
6283 (home-page "https://github.com/pyca/cryptography")
6284 (synopsis "Test vectors for the cryptography package")
6285 (description
6286 "This package contains test vectors for the cryptography package.")
6287 ;; Distributed under either BSD-3 or ASL2.0
6288 (license (list license:bsd-3 license:asl2.0))))
6289
6290 (define-public python2-cryptography-vectors
6291 (package-with-python2 python-cryptography-vectors))
6292
6293 (define-public python-cryptography
6294 (package
6295 (name "python-cryptography")
6296 (version "1.5.3")
6297 (source
6298 (origin
6299 (method url-fetch)
6300 (uri (pypi-uri "cryptography" version))
6301 (sha256
6302 (base32
6303 "1raanvkdfw5ai56ymlij6ghc4k126fs7jx948ig7yn4vj6ndv0ng"))))
6304 (build-system python-build-system)
6305 (arguments
6306 `(#:phases
6307 (modify-phases %standard-phases
6308 (add-before 'check 'disable-failing-test
6309 (lambda _
6310 ;; This test is known to fail with OpenSSL >= 1.0.2i and older
6311 ;; versions of python-cryptography:
6312 ;; https://github.com/pyca/cryptography/issues/3196
6313 ;; TODO: Try re-enabling the test when upgrading
6314 ;; python-cryptography.
6315 (substitute* "tests/hazmat/backends/test_openssl.py"
6316 (("def test_numeric_string_x509_name_entry")
6317 "@pytest.mark.xfail\n def test_numeric_string_x509_name_entry"))
6318 #t)))))
6319 (inputs
6320 `(("openssl" ,openssl)))
6321 (propagated-inputs
6322 `(("python-cffi" ,python-cffi)
6323 ("python-six" ,python-six)
6324 ("python-pyasn1" ,python-pyasn1)
6325 ("python-idna" ,python-idna)
6326 ("python-iso8601" ,python-iso8601)))
6327 (native-inputs
6328 `(("python-cryptography-vectors" ,python-cryptography-vectors)
6329 ("python-hypothesis" ,python-hypothesis)
6330 ("python-pretend" ,python-pretend)
6331 ("python-pyasn1" ,python-pyasn1)
6332 ("python-pyasn1-modules" ,python-pyasn1-modules)
6333 ("python-pytz" ,python-pytz)
6334 ("python-pytest" ,python-pytest-2.9.2)))
6335 (home-page "https://github.com/pyca/cryptography")
6336 (synopsis "Cryptographic recipes and primitives for Python")
6337 (description
6338 "cryptography is a package which provides cryptographic recipes and
6339 primitives to Python developers. It aims to be the “cryptographic standard
6340 library” for Python. The package includes both high level recipes, and low
6341 level interfaces to common cryptographic algorithms such as symmetric ciphers,
6342 message digests and key derivation functions.")
6343 ;; Distributed under either BSD-3 or ASL2.0
6344 (license (list license:bsd-3 license:asl2.0))
6345 (properties `((python2-variant . ,(delay python2-cryptography))))))
6346
6347 (define-public python2-cryptography
6348 (let ((crypto (package-with-python2
6349 (strip-python2-variant python-cryptography))))
6350 (package (inherit crypto)
6351 (propagated-inputs
6352 `(("python2-ipaddress" ,python2-ipaddress)
6353 ("python2-backport-ssl-match-hostname"
6354 ,python2-backport-ssl-match-hostname)
6355 ("python2-enum34" ,python2-enum34)
6356 ,@(package-propagated-inputs crypto))))))
6357
6358 (define-public python-pyopenssl
6359 (package
6360 (name "python-pyopenssl")
6361 (version "16.1.0")
6362 (source
6363 (origin
6364 (method url-fetch)
6365 (uri (pypi-uri "pyOpenSSL" version))
6366 (sha256
6367 (base32
6368 "0prm06zz7hl6bk5s2lqzw25lq6smayfv2fgiliw2rbqxlyiavxw8"))))
6369 (build-system python-build-system)
6370 (propagated-inputs
6371 `(("python-cryptography" ,python-cryptography)
6372 ("python-six" ,python-six)))
6373 (inputs
6374 `(("openssl" ,openssl)))
6375 (home-page "https://github.com/pyca/pyopenssl")
6376 (synopsis "Python wrapper module around the OpenSSL library")
6377 (description
6378 "PyOpenSSL is a high-level wrapper around a subset of the OpenSSL
6379 library.")
6380 (license license:asl2.0)))
6381
6382 (define-public python2-pyopenssl
6383 (package-with-python2 python-pyopenssl))
6384
6385 (define-public python-pip
6386 (package
6387 (name "python-pip")
6388 (version "8.0.2")
6389 (source
6390 (origin
6391 (method url-fetch)
6392 (uri (pypi-uri "pip" version))
6393 (sha256
6394 (base32
6395 "08cm8d4228fj0qnrysy3qv1a6022zr3dcs25amd14lgxil6vvx26"))))
6396 (build-system python-build-system)
6397 (inputs
6398 `(("python-virtualenv" ,python-virtualenv)
6399 ;; Tests
6400 ("python-mock" ,python-mock)
6401 ("python-pytest" ,python-pytest)
6402 ("python-scripttest" ,python-scripttest)))
6403 (home-page "https://pip.pypa.io/")
6404 (synopsis
6405 "Package manager for Python software")
6406 (description
6407 "Pip is a package manager for Python software, that finds packages on the
6408 Python Package Index (PyPI).")
6409 (license license:expat)))
6410
6411 (define-public python2-pip
6412 (package-with-python2 python-pip))
6413
6414 (define-public python-tlsh
6415 (package
6416 (name "python-tlsh")
6417 (version "3.4.4")
6418 (home-page "https://github.com/trendmicro/tlsh")
6419 (source (origin
6420 (method url-fetch)
6421 (uri (string-append "https://github.com/trendmicro/tlsh/archive/v"
6422 version ".tar.gz"))
6423 (sha256
6424 (base32
6425 "00bhzjqrlh7v538kbkbn8lgx976j1138al3sdhklaizqjvpwyk4r"))
6426 (file-name (string-append name "-" version ".tar.gz"))))
6427 (build-system cmake-build-system)
6428 (arguments
6429 '(#:out-of-source? #f
6430 #:phases (modify-phases %standard-phases
6431 (replace
6432 'install
6433 (lambda* (#:key outputs #:allow-other-keys)
6434 ;; Build and install the Python bindings. The underlying
6435 ;; C++ library is apparently not meant to be installed.
6436 (let ((out (assoc-ref outputs "out")))
6437 (with-directory-excursion "py_ext"
6438 (and (system* "python" "setup.py" "build")
6439 (system* "python" "setup.py" "install"
6440 (string-append "--prefix=" out))))))))))
6441 (inputs `(("python" ,python-wrapper))) ;for the bindings
6442 (synopsis "Fuzzy matching library for Python")
6443 (description
6444 "Trend Micro Locality Sensitive Hash (TLSH) is a fuzzy matching library.
6445 Given a byte stream with a minimum length of 256 bytes, TLSH generates a hash
6446 value which can be used for similarity comparisons. Similar objects have
6447 similar hash values, which allows for the detection of similar objects by
6448 comparing their hash values. The byte stream should have a sufficient amount
6449 of complexity; for example, a byte stream of identical bytes will not generate
6450 a hash value.")
6451 (license license:asl2.0)))
6452
6453 (define-public python2-tlsh
6454 (package
6455 (inherit python-tlsh)
6456 (name "python2-tlsh")
6457 (inputs `(("python" ,python-2)))))
6458
6459 (define-public python-termcolor
6460 (package
6461 (name "python-termcolor")
6462 (version "1.1.0")
6463 (source
6464 (origin
6465 (method url-fetch)
6466 (uri (pypi-uri "python-termcolor" version))
6467 (sha256
6468 (base32
6469 "0fv1vq14rpqwgazxg4981904lfyp84mnammw7y046491cv76jv8x"))))
6470 (build-system python-build-system)
6471 (arguments
6472 ;; There are no tests.
6473 `(#:tests? #f))
6474 (home-page "http://pypi.python.org/pypi/termcolor")
6475 (synopsis "ANSII Color formatting for terminal output")
6476 (description
6477 "This package provides ANSII Color formatting for output in terminals.")
6478 (license license:expat)))
6479
6480 (define-public python2-termcolor
6481 (package-with-python2 python-termcolor))
6482
6483 (define-public python-libarchive-c
6484 (package
6485 (name "python-libarchive-c")
6486 (version "2.2")
6487 (source (origin
6488 (method url-fetch)
6489 (uri (pypi-uri "libarchive-c" version))
6490 (sha256
6491 (base32
6492 "0z4r7v3dhd6b3120mav05ff08srih176r2rg5k8kn7mjd9pslm2x"))))
6493 (build-system python-build-system)
6494 (arguments
6495 '(#:phases (modify-phases %standard-phases
6496 (add-before
6497 'build 'reference-libarchive
6498 (lambda* (#:key inputs #:allow-other-keys)
6499 ;; Retain the absolute file name of libarchive.so.
6500 (let ((libarchive (assoc-ref inputs "libarchive")))
6501 (substitute* "libarchive/ffi.py"
6502 (("find_library\\('archive'\\)")
6503 (string-append "'" libarchive
6504 "/lib/libarchive.so'")))))))))
6505 (inputs
6506 `(("libarchive" ,libarchive)))
6507 (home-page "https://github.com/Changaco/python-libarchive-c")
6508 (synopsis "Python interface to libarchive")
6509 (description
6510 "This package provides Python bindings to libarchive, a C library to
6511 access possibly compressed archives in many different formats. It uses
6512 Python's @code{ctypes} foreign function interface (FFI).")
6513 (license license:lgpl2.0+)))
6514
6515 (define-public python2-libarchive-c
6516 (package-with-python2 python-libarchive-c))
6517
6518 (define-public python-file
6519 (package
6520 (inherit file)
6521 (name "python-file")
6522 (source (origin
6523 (inherit (package-source file))
6524 ;; This patch should not be applied to python2-file.
6525 (patches (search-patches "python-file-double-encoding-bug.patch"))))
6526 (build-system python-build-system)
6527 (arguments
6528 '(#:tests? #f ;no tests
6529 #:configure-flags '("--single-version-externally-managed" "--root=/")
6530 #:phases (modify-phases %standard-phases
6531 (add-before 'build 'change-directory
6532 (lambda _
6533 (chdir "python")
6534 #t))
6535 (add-before 'build 'set-library-file-name
6536 (lambda* (#:key inputs #:allow-other-keys)
6537 (let ((file (assoc-ref inputs "file")))
6538 (substitute* "magic.py"
6539 (("find_library\\('magic'\\)")
6540 (string-append "'" file "/lib/libmagic.so'")))
6541 #t))))))
6542 (inputs `(("file" ,file)))
6543 (self-native-input? #f)
6544 (synopsis "Python bindings to the libmagic file type guesser. Note that
6545 this module and the python-magic module both provide a \"magic.py\" file;
6546 these two modules, which are different and were developed separately, both
6547 serve the same purpose: provide Python bindings for libmagic.")))
6548
6549 (define-public python2-file
6550 (package-with-python2 python-file))
6551
6552 (define-public python-debian
6553 (package
6554 (name "python-debian")
6555 (version "0.1.23")
6556 (source
6557 (origin
6558 (method url-fetch)
6559 (uri (string-append
6560 "https://pypi.python.org/packages/source/p/python-debian/python-debian-"
6561 version ".tar.gz"))
6562 (sha256
6563 (base32
6564 "193faznwnjc3n5991wyzim6h9gyq1zxifmfrnpm3avgkh7ahyynh"))))
6565 (build-system python-build-system)
6566 (propagated-inputs
6567 `(("python-six" ,python-six)))
6568 (home-page "http://packages.debian.org/sid/python-debian")
6569 (synopsis "Debian package related modules")
6570 (description
6571 ;; XXX: Use @enumerate instead of @itemize to work around
6572 ;; <http://bugs.gnu.org/21772>.
6573 "This package provides Python modules that abstract many formats of
6574 Debian-related files, such as:
6575
6576 @enumerate
6577 @item Debtags information;
6578 @item @file{debian/changelog} files;
6579 @item packages files, pdiffs;
6580 @item control files of single or multiple RFC822-style paragraphs---e.g.
6581 @file{debian/control}, @file{.changes}, @file{.dsc};
6582 @item Raw @file{.deb} and @file{.ar} files, with (read-only) access to
6583 contained files and meta-information.
6584 @end enumerate\n")
6585
6586 ;; Modules are either GPLv2+ or GPLv3+.
6587 (license license:gpl3+)))
6588
6589 (define-public python2-debian
6590 (package-with-python2 python-debian))
6591
6592 (define-public python-nbformat
6593 (package
6594 (name "python-nbformat")
6595 (version "4.1.0")
6596 (source
6597 (origin
6598 (method url-fetch)
6599 (uri (pypi-uri "nbformat" version))
6600 (sha256
6601 (base32
6602 "0mq8iki3d4mnx7wy05phss7x98mds4fqydin8lcagidp1knw1xnv"))))
6603 (build-system python-build-system)
6604 (arguments `(#:tests? #f)) ; no test target
6605 (propagated-inputs
6606 `(("python-ipython-genutils" ,python-ipython-genutils)
6607 ("python-jsonschema" ,python-jsonschema)
6608 ("python-jupyter-core" ,python-jupyter-core)
6609 ("python-traitlets" ,python-traitlets)))
6610 (home-page "http://jupyter.org")
6611 (synopsis "Jupyter Notebook format")
6612 (description "This package provides the reference implementation of the
6613 Jupyter Notebook format and Python APIs for working with notebooks.")
6614 (license license:bsd-3)))
6615
6616 (define-public python2-nbformat
6617 (package-with-python2 python-nbformat))
6618
6619 (define-public python-bleach
6620 (package
6621 (name "python-bleach")
6622 (version "1.4.3")
6623 (source
6624 (origin
6625 (method url-fetch)
6626 (uri (pypi-uri "bleach" version))
6627 (sha256
6628 (base32
6629 "0jvg3jxrvnx7xmm9gj262v60ib452xlnwlb0navyp7jsvcd0d4qj"))))
6630 (build-system python-build-system)
6631 (propagated-inputs
6632 `(("python-html5lib" ,python-html5lib-0.9)
6633 ("python-six" ,python-six)))
6634 (native-inputs
6635 `(("python-nose" ,python-nose)))
6636 (home-page "http://github.com/jsocol/bleach")
6637 (synopsis "Whitelist-based HTML-sanitizing tool")
6638 (description "Bleach is an easy whitelist-based HTML-sanitizing tool.")
6639 (license license:asl2.0)))
6640
6641 (define-public python2-bleach
6642 (package-with-python2 python-bleach))
6643
6644 (define-public python-entrypoints
6645 (package
6646 (name "python-entrypoints")
6647 (version "0.2.2")
6648 (source
6649 (origin
6650 (method url-fetch)
6651 (uri (string-append "https://github.com/takluyver/entrypoints/archive/"
6652 version ".tar.gz"))
6653 (file-name (string-append name "-" version ".tar.gz"))
6654 (sha256
6655 (base32
6656 "0azqlkh3j0za080lsf5crnhaxx3c93k9dpv5ihkhf5cppgw5sjz5"))))
6657 (build-system python-build-system)
6658 ;; The package does not come with a setup.py file, so we have to generate
6659 ;; one ourselves.
6660 (arguments
6661 `(#:tests? #f
6662 #:phases
6663 (modify-phases %standard-phases
6664 (add-after 'unpack 'create-setup.py
6665 (lambda _
6666 (call-with-output-file "setup.py"
6667 (lambda (port)
6668 (format port "\
6669 from setuptools import setup
6670 setup(name='entrypoints', version='~a', py_modules=['entrypoints'])
6671 " ,version))))))))
6672 (home-page "https://github.com/takluyver/entrypoints")
6673 (synopsis "Discover and load entry points from installed Python packages")
6674 (description "Entry points are a way for Python packages to advertise
6675 objects with some common interface. The most common examples are
6676 @code{console_scripts} entry points, which define shell commands by
6677 identifying a Python function to run. The @code{entrypoints} module contains
6678 functions to find and load entry points.")
6679 (license license:expat)))
6680
6681 (define-public python2-entrypoints
6682 (package-with-python2 python-entrypoints))
6683
6684 (define-public python-nbconvert
6685 (package
6686 (name "python-nbconvert")
6687 (version "5.0.0b1")
6688 (source
6689 (origin
6690 (method url-fetch)
6691 (uri (pypi-uri "nbconvert" version))
6692 (sha256
6693 (base32
6694 "0brclbb18l4nmd5qy3dl9wn05rjdh1fz4rmzdlfqacj12rcdvdgp"))))
6695 (build-system python-build-system)
6696 ;; The "bdist_egg" target is disabled by default, causing the installation
6697 ;; to fail.
6698 (arguments `(#:configure-flags (list "bdist_egg")))
6699 (propagated-inputs
6700 `(("python-bleach" ,python-bleach)
6701 ("python-entrypoints" ,python-entrypoints)
6702 ("python-jinja2" ,python-jinja2)
6703 ("python-jupyter-core" ,python-jupyter-core)
6704 ("python-mistune" ,python-mistune)
6705 ("python-nbformat" ,python-nbformat)
6706 ("python-pygments" ,python-pygments)
6707 ("python-traitlets" ,python-traitlets)))
6708 (home-page "http://jupyter.org")
6709 (synopsis "Converting Jupyter Notebooks")
6710 (description "The @code{nbconvert} tool, @{jupyter nbconvert}, converts
6711 notebooks to various other formats via Jinja templates. It allows you to
6712 convert an @code{.ipynb} notebook file into various static formats including:
6713
6714 @enumerate
6715 @item HTML
6716 @item LaTeX
6717 @item PDF
6718 @item Reveal JS
6719 @item Markdown (md)
6720 @item ReStructured Text (rst)
6721 @item executable script
6722 @end enumerate\n")
6723 (license license:bsd-3)))
6724
6725 (define-public python2-nbconvert
6726 (package-with-python2 python-nbconvert))
6727
6728 (define-public python-notebook
6729 (package
6730 (name "python-notebook")
6731 (version "4.2.3")
6732 (source (origin
6733 (method url-fetch)
6734 (uri (pypi-uri "notebook" version))
6735 (sha256
6736 (base32
6737 "0laq5c2f21frq6xcdckgq7raqhznbjb0qs0357g612z87wyn1a9r"))))
6738 (build-system python-build-system)
6739 (arguments
6740 `(#:phases
6741 (modify-phases %standard-phases
6742 (replace 'check
6743 (lambda _
6744 ;; HOME must be set for tests
6745 (setenv "HOME" "/tmp")
6746 (zero? (system* "nosetests")))))))
6747 (propagated-inputs
6748 `(("python-jupyter-core" ,python-jupyter-core)
6749 ("python-nbformat" ,python-nbformat)
6750 ("python-nbconvert" ,python-nbconvert)
6751 ("python-ipython" ,python-ipython)))
6752 (native-inputs
6753 `(("python-nose" ,python-nose)
6754 ("python-sphinx" ,python-sphinx)
6755 ("python-requests" ,python-requests)))
6756 (home-page "http://jupyter.org/")
6757 (synopsis "Web-based notebook environment for interactive computing")
6758 (description
6759 "The Jupyter HTML notebook is a web-based notebook environment for
6760 interactive computing.")
6761 (license license:bsd-3)))
6762
6763 (define-public python2-notebook
6764 (package-with-python2 python-notebook))
6765
6766 (define-public python-widgetsnbextension
6767 (package
6768 (name "python-widgetsnbextension")
6769 (version "1.2.6")
6770 (source
6771 (origin
6772 (method url-fetch)
6773 (uri (pypi-uri "widgetsnbextension" version))
6774 (sha256
6775 (base32
6776 "0lff2mrwrgsa1mxmwx3phl9xvy0jqfpg6khbmxy53jbq56rwy666"))))
6777 (build-system python-build-system)
6778 (propagated-inputs
6779 `(("python-notebook" ,python-notebook)))
6780 (native-inputs
6781 `(("python-nose" ,python-nose)))
6782 (home-page "http://ipython.org")
6783 (synopsis "IPython HTML widgets for Jupyter")
6784 (description "This package provides interactive HTML widgets for Jupyter
6785 notebooks.")
6786 (license license:bsd-3)))
6787
6788 (define-public python2-widgetsnbextension
6789 (package-with-python2 python-widgetsnbextension))
6790
6791 (define-public python-ipywidgets
6792 (package
6793 (name "python-ipywidgets")
6794 (version "5.2.2")
6795 (source
6796 (origin
6797 (method url-fetch)
6798 (uri (pypi-uri "ipywidgets" version))
6799 (sha256
6800 (base32
6801 "1lk0qrr5l9a0z7qkkn30hv5832whxwxymf1l576fmmad0n7hkxms"))))
6802 (build-system python-build-system)
6803 ;; FIXME: it's not clear how to run the tests.
6804 (arguments `(#:tests? #f))
6805 (propagated-inputs
6806 `(("python-ipykernel" ,python-ipykernel)
6807 ("python-ipython" ,python-ipython)
6808 ("python-traitlets" ,python-traitlets)
6809 ("python-widgetsnbextension" ,python-widgetsnbextension)))
6810 (home-page "http://ipython.org")
6811 (synopsis "IPython HTML widgets for Jupyter")
6812 (description "Ipywidgets are interactive HTML widgets for Jupyter
6813 notebooks and the IPython kernel. Notebooks come alive when interactive
6814 widgets are used. Users gain control of their data and can visualize changes
6815 in the data.")
6816 (license license:bsd-3)))
6817
6818 (define-public python2-ipywidgets
6819 (package-with-python2 python-ipywidgets))
6820
6821 (define-public python-jupyter-console
6822 (package
6823 (name "python-jupyter-console")
6824 (version "5.0.0")
6825 (source
6826 (origin
6827 (method url-fetch)
6828 (uri (pypi-uri "jupyter_console" version))
6829 (sha256
6830 (base32
6831 "04acmkwsi99rcg3vb54c6n492zv35s92h2ahabc0w6wj976cipvx"))))
6832 (build-system python-build-system)
6833 ;; FIXME: it's not clear how to run the tests.
6834 (arguments `(#:tests? #f))
6835 (propagated-inputs
6836 `(("python-ipykernel" ,python-ipykernel)
6837 ("python-ipython" ,python-ipython)
6838 ("python-jupyter-client" ,python-jupyter-client)
6839 ("python-prompt-toolkit" ,python-prompt-toolkit)
6840 ("python-pygments" ,python-pygments)))
6841 (home-page "https://jupyter.org")
6842 (synopsis "Jupyter terminal console")
6843 (description "This package provides a terminal-based console frontend for
6844 Jupyter kernels. It also allows for console-based interaction with non-Python
6845 Jupyter kernels such as IJulia and IRKernel.")
6846 (license license:bsd-3)))
6847
6848 (define-public python2-jupyter-console
6849 (package-with-python2 python-jupyter-console))
6850
6851 (define-public jupyter
6852 (package
6853 (name "jupyter")
6854 (version "1.0.0")
6855 (source
6856 (origin
6857 (method url-fetch)
6858 (uri (pypi-uri "jupyter" version))
6859 (sha256
6860 (base32
6861 "0pwf3pminkzyzgx5kcplvvbvwrrzd3baa7lmh96f647k30rlpp6r"))))
6862 (build-system python-build-system)
6863 ;; FIXME: it's not clear how to run the tests.
6864 (arguments `(#:tests? #f))
6865 (propagated-inputs
6866 `(("python-ipykernel" ,python-ipykernel)
6867 ("python-ipywidgets" ,python-ipywidgets)
6868 ("python-jupyter-console" ,python-jupyter-console)
6869 ("python-nbconvert" ,python-nbconvert)
6870 ("python-notebook" ,python-notebook)))
6871 (home-page "http://jupyter.org")
6872 (synopsis "Web application for interactive documents")
6873 (description
6874 "The Jupyter Notebook is a web application that allows you to create and
6875 share documents that contain live code, equations, visualizations and
6876 explanatory text. Uses include: data cleaning and transformation, numerical
6877 simulation, statistical modeling, machine learning and much more.")
6878 (license license:bsd-3)))
6879
6880 (define-public python-chardet
6881 (package
6882 (name "python-chardet")
6883 (version "2.3.0")
6884 (source
6885 (origin
6886 (method url-fetch)
6887 (uri (string-append
6888 "https://pypi.python.org/packages/source/c/chardet/chardet-"
6889 version
6890 ".tar.gz"))
6891 (sha256
6892 (base32
6893 "1ak87ikcw34fivcgiz2xvi938dmclh078az65l9x3rmgljrkhgp5"))))
6894 (build-system python-build-system)
6895 (home-page "https://github.com/chardet/chardet")
6896 (synopsis "Universal encoding detector for Python 2 and 3")
6897 (description
6898 "This package provides @code{chardet}, a Python module that can
6899 automatically detect a wide range of file encodings.")
6900 (license license:lgpl2.1+)))
6901
6902 (define-public python2-chardet
6903 (package-with-python2 python-chardet))
6904
6905 (define-public python-docopt
6906 (package
6907 (name "python-docopt")
6908 (version "0.6.2")
6909 (source
6910 (origin
6911 (method url-fetch)
6912 ;; The release on PyPI does not include tests.
6913 (uri (string-append
6914 "https://github.com/docopt/docopt/archive/"
6915 version ".tar.gz"))
6916 (file-name (string-append name "-" version ".tar.gz"))
6917 (sha256
6918 (base32
6919 "16bf890xbdz3m30rsv2qacklh2rdn1zrfspfnwzx9g7vwz8yw4r1"))))
6920 (build-system python-build-system)
6921 (native-inputs
6922 `(("python-pytest" ,python-pytest)))
6923 (arguments
6924 `(#:phases (alist-replace
6925 'check
6926 (lambda _ (zero? (system* "py.test")))
6927 %standard-phases)))
6928 (home-page "http://docopt.org")
6929 (synopsis "Command-line interface description language for Python")
6930 (description "This library allows the user to define a command-line
6931 interface from a program's help message rather than specifying it
6932 programatically with command-line parsers like @code{getopt} and
6933 @code{argparse}.")
6934 (license license:expat)))
6935
6936 (define-public python2-docopt
6937 (package-with-python2 python-docopt))
6938
6939 (define-public python-zope-event
6940 (package
6941 (name "python-zope-event")
6942 (version "4.1.0")
6943 (source
6944 (origin
6945 (method url-fetch)
6946 (uri (string-append "https://pypi.python.org/packages/source/z"
6947 "/zope.event/zope.event-" version ".tar.gz"))
6948 (sha256
6949 (base32
6950 "11p75zpfz3ffhz21nzx9wb23xs993ck5s6hkjcvhswwizni5jynw"))))
6951 (build-system python-build-system)
6952 (home-page "http://pypi.python.org/pypi/zope.event")
6953 (synopsis "Event publishing system for Python")
6954 (description "Zope.event provides an event publishing API, intended for
6955 use by applications which are unaware of any subscribers to their events. It
6956 is a simple event-dispatching system on which more sophisticated event
6957 dispatching systems can be built.")
6958 (license license:zpl2.1)))
6959
6960 (define-public python2-zope-event
6961 (package-with-python2 python-zope-event))
6962
6963 (define-public python-zope-interface
6964 (package
6965 (name "python-zope-interface")
6966 (version "4.1.3")
6967 (source
6968 (origin
6969 (method url-fetch)
6970 (uri (string-append "https://pypi.python.org/packages/source/z"
6971 "/zope.interface/zope.interface-" version ".tar.gz"))
6972 (sha256
6973 (base32
6974 "0ks8h73b2g4bkad821qbv0wzjppdrwys33i7ka45ik3wxjg1l8if"))))
6975 (build-system python-build-system)
6976 (propagated-inputs
6977 `(("python-zope-event" ,python-zope-event)))
6978 (home-page "https://github.com/zopefoundation/zope.interface")
6979 (synopsis "Python implementation of the \"design by contract\"
6980 methodology")
6981 (description "Zope.interface provides an implementation of \"object
6982 interfaces\" for Python. Interfaces are a mechanism for labeling objects as
6983 conforming to a given API or contract.")
6984 (license license:zpl2.1)))
6985
6986 (define-public python2-zope-interface
6987 (package-with-python2 python-zope-interface))
6988
6989 (define-public python-zope-exceptions
6990 (package
6991 (name "python-zope-exceptions")
6992 (version "4.0.8")
6993 (source
6994 (origin
6995 (method url-fetch)
6996 (uri (string-append "https://pypi.python.org/packages/source/z"
6997 "/zope.exceptions/zope.exceptions-"
6998 version ".tar.gz"))
6999 (sha256
7000 (base32
7001 "0zwxaaa66sqxg5k7zcrvs0fbg9ym1njnxnr28dfmchzhwjvwnfzl"))))
7002 (build-system python-build-system)
7003 (arguments
7004 '(#:tests? #f)) ; circular dependency with zope.testrunner
7005 (propagated-inputs
7006 `(("python-zope-interface" ,python-zope-interface)))
7007 (home-page "http://cheeseshop.python.org/pypi/zope.exceptions")
7008 (synopsis "Zope exceptions")
7009 (description "Zope.exceptions provides general-purpose exception types
7010 that have uses outside of the Zope framework.")
7011 (license license:zpl2.1)))
7012
7013 (define-public python2-zope-exceptions
7014 (package-with-python2 python-zope-exceptions))
7015
7016 (define-public python-zope-testing
7017 (package
7018 (name "python-zope-testing")
7019 (version "4.5.0")
7020 (source
7021 (origin
7022 (method url-fetch)
7023 (uri (string-append "https://pypi.python.org/packages/source/z"
7024 "/zope.testing/zope.testing-" version ".tar.gz"))
7025 (sha256
7026 (base32
7027 "1yvglxhzvhl45mndvn9gskx2ph30zz1bz7rrlyfs62fv2pvih90s"))
7028 (modules '((guix build utils)))
7029 (snippet
7030 '(begin
7031 ;; Remove pre-compiled .pyc files backup files from source.
7032 (for-each delete-file (find-files "." "(\\.pyc|~)$"))
7033 #t))))
7034 (build-system python-build-system)
7035 (native-inputs
7036 `(("python-zope-exceptions" ,python-zope-exceptions)))
7037 (propagated-inputs
7038 `(("python-zope-interface" ,python-zope-interface)))
7039 (home-page "http://pypi.python.org/pypi/zope.testing")
7040 (synopsis "Zope testing helpers")
7041 (description "Zope.testing provides a number of testing utilities for HTML
7042 forms, HTTP servers, regular expressions, and more.")
7043 (license license:zpl2.1)))
7044
7045 (define-public python2-zope-testing
7046 (package-with-python2 python-zope-testing))
7047
7048 (define-public python-zope-testrunner
7049 (package
7050 (name "python-zope-testrunner")
7051 (version "4.4.9")
7052 (source
7053 (origin
7054 (method url-fetch)
7055 (uri (string-append "https://pypi.python.org/packages/source/z"
7056 "/zope.testrunner/zope.testrunner-"
7057 version ".zip"))
7058 (sha256
7059 (base32
7060 "1r7iqknhh55y45f64mz5hghgvzx34h1i11k350s0avx6q8gznja1"))))
7061 (build-system python-build-system)
7062 (native-inputs
7063 `(("python-six" ,python-six)
7064 ;("python-zope-interface" ,python-zope-interface)
7065 ("python-zope-exceptions" ,python-zope-exceptions)
7066 ("python-zope-testing" ,python-zope-testing)
7067 ("unzip" ,unzip)))
7068 (propagated-inputs
7069 `(("python-zope-interface" ,python-zope-interface)))
7070 (home-page "http://pypi.python.org/pypi/zope.testrunner")
7071 (synopsis "Zope testrunner script")
7072 (description "Zope.testrunner provides a script for running Python
7073 tests.")
7074 (license license:zpl2.1)))
7075
7076 (define-public python2-zope-testrunner
7077 (let ((base (package-with-python2 python-zope-testrunner)))
7078 (package
7079 (inherit base)
7080 (native-inputs
7081 (append (package-native-inputs base)
7082 `(("python2-subunit" ,python2-subunit)
7083 ("python2-mimeparse" ,python2-mimeparse)))))))
7084
7085 (define-public python-zope-i18nmessageid
7086 (package
7087 (name "python-zope-i18nmessageid")
7088 (version "4.0.3")
7089 (source
7090 (origin
7091 (method url-fetch)
7092 (uri (string-append
7093 "https://pypi.python.org/packages/source/z"
7094 "/zope.i18nmessageid/zope.i18nmessageid-"
7095 version ".tar.gz"))
7096 (sha256
7097 (base32
7098 "1rslyph0klk58dmjjy4j0jxy21k03azksixc3x2xhqbkv97cmzml"))))
7099 (build-system python-build-system)
7100 (home-page "http://pypi.python.org/pypi/zope.i18nmessageid")
7101 (synopsis "Message identifiers for internationalization")
7102 (description "Zope.i18nmessageid provides facilities for declaring
7103 internationalized messages within program source text.")
7104 (license license:zpl2.1)))
7105
7106 (define-public python2-zope-i18nmessageid
7107 (package-with-python2 python-zope-i18nmessageid))
7108
7109 (define-public python-zope-schema
7110 (package
7111 (name "python-zope-schema")
7112 (version "4.4.2")
7113 (source
7114 (origin
7115 (method url-fetch)
7116 (uri (string-append "https://pypi.python.org/packages/source/z"
7117 "/zope.schema/zope.schema-" version ".tar.gz"))
7118 (sha256
7119 (base32
7120 "1p943jdxb587dh7php4vx04qvn7b2877hr4qs5zyckvp5afhhank"))))
7121 (build-system python-build-system)
7122 (propagated-inputs
7123 `(("python-zope-event" ,python-zope-event)
7124 ("python-zope-interface" ,python-zope-interface)))
7125 (native-inputs
7126 `(("python-zope-testing" ,python-zope-testing)
7127 ("python-coverage" ,python-coverage)
7128 ("python-nose" ,python-nose)))
7129 (home-page "http://pypi.python.org/pypi/zope.schema")
7130 (synopsis "Zope data schemas")
7131 (description "Zope.scheme provides extensions to zope.interface for
7132 defining data schemas.")
7133 (license license:zpl2.1)))
7134
7135 (define-public python2-zope-schema
7136 (package-with-python2 python-zope-schema))
7137
7138 (define-public python-zope-configuration
7139 (package
7140 (name "python-zope-configuration")
7141 (version "4.0.3")
7142 (source (origin
7143 (method url-fetch)
7144 (uri (string-append "https://pypi.python.org/packages/source/z"
7145 "/zope.configuration/zope.configuration-"
7146 version ".tar.gz"))
7147 (sha256
7148 (base32
7149 "1x9dfqypgympnlm25p9m43xh4qv3p7d75vksv9pzqibrb4cggw5n"))))
7150 (build-system python-build-system)
7151 (propagated-inputs
7152 `(("python-zope-i18nmessageid" ,python-zope-i18nmessageid)
7153 ("python-zope-schema" ,python-zope-schema)))
7154 (home-page "http://pypi.python.org/pypi/zope.configuration")
7155 (synopsis "Zope Configuration Markup Language")
7156 (description "Zope.configuration implements ZCML, the Zope Configuration
7157 Markup Language.")
7158 (license license:zpl2.1)))
7159
7160 (define-public python2-zope-configuration
7161 (package-with-python2 python-zope-configuration))
7162
7163 (define-public python-zope-proxy
7164 (package
7165 (name "python-zope-proxy")
7166 (version "4.1.6")
7167 (source
7168 (origin
7169 (method url-fetch)
7170 (uri (string-append "https://pypi.python.org/packages/source/z"
7171 "/zope.proxy/zope.proxy-" version ".tar.gz"))
7172 (sha256
7173 (base32
7174 "0pqwwmvm1prhwv1ziv9lp8iirz7xkwb6n2kyj36p2h0ppyyhjnm4"))))
7175 (build-system python-build-system)
7176 (propagated-inputs
7177 `(("python-zope-interface" ,python-zope-interface)))
7178 (home-page "http://pypi.python.org/pypi/zope.proxy")
7179 (synopsis "Generic, transparent proxies")
7180 (description "Zope.proxy provides generic, transparent proxies for Python.
7181 Proxies are special objects which serve as mostly-transparent wrappers around
7182 another object, intervening in the apparent behavior of the wrapped object
7183 only when necessary to apply the policy (e.g., access checking, location
7184 brokering, etc.) for which the proxy is responsible.")
7185 (license license:zpl2.1)))
7186
7187 (define-public python2-zope-proxy
7188 (package-with-python2 python-zope-proxy))
7189
7190 (define-public python-zope-location
7191 (package
7192 (name "python-zope-location")
7193 (version "4.0.3")
7194 (source
7195 (origin
7196 (method url-fetch)
7197 (uri (string-append "https://pypi.python.org/packages/source/z"
7198 "/zope.location/zope.location-" version ".tar.gz"))
7199 (sha256
7200 (base32
7201 "1nj9da4ksiyv3h8n2vpzwd0pb03mdsh7zy87hfpx72b6p2zcwg74"))))
7202 (build-system python-build-system)
7203 (native-inputs
7204 `(("python-zope-proxy" ,python-zope-proxy)
7205 ("python-zope-schema" ,python-zope-schema)))
7206 (home-page "http://pypi.python.org/pypi/zope.location/")
7207 (synopsis "Zope location library")
7208 (description "Zope.location implements the concept of \"locations\" in
7209 Zope3, which are are special objects that have a structural location.")
7210 (license license:zpl2.1)))
7211
7212 (define-public python2-zope-location
7213 (package-with-python2 python-zope-location))
7214
7215 (define-public python-zope-security
7216 (package
7217 (name "python-zope-security")
7218 (version "4.0.3")
7219 (source
7220 (origin
7221 (method url-fetch)
7222 (uri (string-append "https://pypi.python.org/packages/source/z"
7223 "/zope.security/zope.security-" version ".tar.gz"))
7224 (sha256
7225 (base32
7226 "14zmf684amc0x32kq05yxnhfqd1cmyhafkw05gn81rn90zjv6ssy"))))
7227 (build-system python-build-system)
7228 (propagated-inputs
7229 `(("python-zope-i18nmessageid" ,python-zope-i18nmessageid)
7230 ("python-zope-component" ,python-zope-component)
7231 ("python-zope-location" ,python-zope-location)
7232 ("python-zope-proxy" ,python-zope-proxy)
7233 ("python-zope-schema" ,python-zope-schema)
7234 ("python-zope-testrunner" ,python-zope-testrunner)
7235 ("python-zope-testing" ,python-zope-testing)))
7236 (home-page "http://pypi.python.org/pypi/zope.security")
7237 (synopsis "Zope security framework")
7238 (description "Zope.security provides a generic mechanism to implement
7239 security policies on Python objects.")
7240 (license license:zpl2.1)))
7241
7242 (define-public python2-zope-security
7243 (let ((zope-security (package-with-python2 python-zope-security)))
7244 (package (inherit zope-security)
7245 (propagated-inputs
7246 `(("python2-zope-testrunner" ,python2-zope-testrunner)
7247 ,@(alist-delete
7248 "python-zope-testrunner"
7249 (package-propagated-inputs zope-security)))))))
7250
7251 (define-public python-zope-component
7252 (package
7253 (name "python-zope-component")
7254 (version "4.2.2")
7255 (source
7256 (origin
7257 (method url-fetch)
7258 (uri (string-append "https://pypi.python.org/packages/source/z"
7259 "/zope.component/zope.component-" version ".tar.gz"))
7260 (sha256
7261 (base32
7262 "06pqr8m5jv12xjyy5b59hh9anl61cxkzhw9mka33r3nxalmi2b18"))))
7263 (build-system python-build-system)
7264 (arguments
7265 ;; Skip tests due to circular dependency with python-zope-security.
7266 '(#:tests? #f))
7267 (native-inputs
7268 `(("python-zope-testing" ,python-zope-testing)))
7269 (propagated-inputs
7270 `(("python-zope-event" ,python-zope-event)
7271 ("python-zope-interface" ,python-zope-interface)
7272 ("python-zope-i18nmessageid" ,python-zope-i18nmessageid)
7273 ("python-zope-configuration" ,python-zope-configuration)))
7274 (home-page "https://github.com/zopefoundation/zope.component")
7275 (synopsis "Zope Component Architecture")
7276 (description "Zope.component represents the core of the Zope Component
7277 Architecture. Together with the zope.interface package, it provides
7278 facilities for defining, registering and looking up components.")
7279 (license license:zpl2.1)))
7280
7281 (define-public python2-zope-component
7282 (package-with-python2 python-zope-component))
7283
7284 (define-public python-pythondialog
7285 (package
7286 (name "python-pythondialog")
7287 (version "3.4.0")
7288 (source
7289 (origin
7290 (method url-fetch)
7291 (uri (pypi-uri "pythondialog" version))
7292 (sha256
7293 (base32
7294 "1728ghsran47jczn9bhlnkvk5bvqmmbihabgif5h705b84r1272c"))))
7295 (build-system python-build-system)
7296 (arguments
7297 `(#:phases
7298 (modify-phases %standard-phases
7299 (add-after 'unpack 'patch-path
7300 (lambda* (#:key inputs #:allow-other-keys)
7301 (let* ((dialog (assoc-ref inputs "dialog")))
7302 ;; Since this library really wants to grovel the search path, we
7303 ;; must hardcode dialog's store path into it.
7304 (substitute* "dialog.py"
7305 (("os.getenv\\(\"PATH\", \":/bin:/usr/bin\"\\)")
7306 (string-append "os.getenv(\"PATH\") + \":" dialog "/bin\"")))
7307 #t))))
7308 #:tests? #f)) ; no test suite
7309 (propagated-inputs
7310 `(("dialog" ,dialog)))
7311 (home-page "http://pythondialog.sourceforge.net/")
7312 (synopsis "Python interface to the UNIX dialog utility")
7313 (description "A Python wrapper for the dialog utility. Its purpose is to
7314 provide an easy to use, pythonic and comprehensive Python interface to dialog.
7315 This allows one to make simple text-mode user interfaces on Unix-like systems")
7316 (license license:lgpl2.1)
7317 (properties `((python2-variant . ,(delay python2-pythondialog))))))
7318
7319 (define-public python2-pythondialog
7320 (let ((base (package-with-python2 (strip-python2-variant python-pythondialog))))
7321 (package
7322 (inherit base)
7323 (version (package-version python-pythondialog))
7324 (source (origin
7325 (method url-fetch)
7326 (uri (pypi-uri "python2-pythondialog" version))
7327 (sha256
7328 (base32
7329 "0d8k7lxk50imdyx85lv8j98i4c93a71iwpapnl1506rpkbm9qvd9")))))))
7330
7331 (define-public python-pyrfc3339
7332 (package
7333 (name "python-pyrfc3339")
7334 (version "1.0")
7335 (source
7336 (origin
7337 (method url-fetch)
7338 (uri (pypi-uri "pyRFC3339" version))
7339 (sha256
7340 (base32
7341 "0dgm4l9y8jiax5cp6yxjd2i27cq8h33sh81n1wfbmnmqb32cdywd"))))
7342 (build-system python-build-system)
7343 (propagated-inputs
7344 `(("python-pytz" ,python-pytz)))
7345 (native-inputs
7346 `(("python-nose" ,python-nose)))
7347 (home-page "https://github.com/kurtraschke/pyRFC3339")
7348 (synopsis "Python timestamp library")
7349 (description "Python library for generating and parsing RFC 3339-compliant
7350 timestamps.")
7351 (license license:expat)))
7352
7353 (define-public python2-pyrfc3339
7354 (package-with-python2 python-pyrfc3339))
7355
7356 (define-public python-werkzeug
7357 (package
7358 (name "python-werkzeug")
7359 (version "0.11.11")
7360 (source
7361 (origin
7362 (method url-fetch)
7363 (uri (pypi-uri "Werkzeug" version))
7364 (sha256
7365 (base32
7366 "1rgpq8a2qv26d75v9j3b074inirlyy6y4b5x4rxblp202jy4cb77"))))
7367 (build-system python-build-system)
7368 (native-inputs
7369 `(("python-pytest" ,python-pytest)))
7370 (home-page "http://werkzeug.pocoo.org/")
7371 (synopsis "Utilities for WSGI applications")
7372 (description "One of the most advanced WSGI utility modules. It includes a
7373 powerful debugger, full-featured request and response objects, HTTP utilities to
7374 handle entity tags, cache control headers, HTTP dates, cookie handling, file
7375 uploads, a powerful URL routing system and a bunch of community-contributed
7376 addon modules.")
7377 (license license:x11)))
7378
7379 (define-public python2-werkzeug
7380 (package-with-python2 python-werkzeug))
7381
7382 (define-public python-configobj
7383 (package
7384 (name "python-configobj")
7385 (version "5.0.6")
7386 (source (origin
7387 (method url-fetch)
7388 (uri (string-append
7389 "https://pypi.python.org/packages/source/c/configobj/"
7390 "configobj-" version ".tar.gz"))
7391 (sha256
7392 (base32
7393 "00h9rcmws03xvdlfni11yb60bz3kxfvsj6dg6nrpzj71f03nbxd2"))
7394 ;; Patch setup.py so it looks for python-setuptools, which is
7395 ;; required to parse the keyword 'install_requires' in setup.py.
7396 (patches (search-patches "python-configobj-setuptools.patch"))))
7397 (build-system python-build-system)
7398 (native-inputs
7399 `(("python-six" ,python-six)))
7400 (synopsis "Config file reading, writing and validation")
7401 (description "ConfigObj is a simple but powerful config file reader and
7402 writer: an ini file round tripper. Its main feature is that it is very easy to
7403 use, with a straightforward programmer’s interface and a simple syntax for
7404 config files.")
7405 (home-page "https://github.com/DiffSK/configobj")
7406 (license license:bsd-3)))
7407
7408 (define-public python2-configobj
7409 (package-with-python2 python-configobj))
7410
7411 (define-public python-configargparse
7412 (package
7413 (name "python-configargparse")
7414 (version "0.10.0")
7415 (source (origin
7416 (method url-fetch)
7417 (uri (string-append
7418 "https://pypi.python.org/packages/source/C/ConfigArgParse/"
7419 "ConfigArgParse-" version ".tar.gz"))
7420 (sha256
7421 (base32
7422 "19wh919gbdbzxzpagg52q3lm62yicm95ddlcx77dyjc1slyshl1v"))))
7423 (build-system python-build-system)
7424 (arguments
7425 ;; FIXME: Bug in test suite filed upstream:
7426 ;; https://github.com/bw2/ConfigArgParse/issues/32
7427 '(#:tests? #f))
7428 (synopsis "Replacement for argparse")
7429 (description "A drop-in replacement for argparse that allows options to also
7430 be set via config files and/or environment variables.")
7431 (home-page "https://github.com/bw2/ConfigArgParse")
7432 (license license:expat)))
7433
7434 (define-public python2-configargparse
7435 (package-with-python2 python-configargparse))
7436
7437 (define-public python-ndg-httpsclient
7438 (package
7439 (name "python-ndg-httpsclient")
7440 (version "0.4.0")
7441 (source (origin
7442 (method url-fetch)
7443 (uri (string-append
7444 "https://pypi.python.org/packages/source/n/ndg-httpsclient/"
7445 "ndg_httpsclient-" version ".tar.gz"))
7446 (sha256
7447 (base32
7448 "0x32ibixm3vv5m9xfk83xsqm8xcqw4dd0khbh6qbri6rxgymbhg8"))))
7449 (build-system python-build-system)
7450 (arguments
7451 '(;; The tests appear to require networking.
7452 #:tests? #f))
7453 (propagated-inputs
7454 `(("python-pyopenssl" ,python-pyopenssl)))
7455 (synopsis "HTTPS support for Python's httplib and urllib2")
7456 (description "This is a HTTPS client implementation for httplib and urllib2
7457 based on PyOpenSSL. PyOpenSSL provides a more fully featured SSL implementation
7458 over the default provided with Python and importantly enables full verification
7459 of the SSL peer.")
7460 (home-page "https://github.com/cedadev/ndg_httpsclient/")
7461 (license license:bsd-3)))
7462
7463 ;; python2-openssl requires special care, so package-with-python2 is
7464 ;; insufficient.
7465 (define-public python2-ndg-httpsclient
7466 (package (inherit python-ndg-httpsclient)
7467 (name "python2-ndg-httpsclient")
7468 (arguments `(#:python ,python-2))
7469 (propagated-inputs
7470 `(("python2-pyopenssl" ,python2-pyopenssl)))))
7471
7472 (define-public python-contextlib2
7473 (package
7474 (name "python-contextlib2")
7475 (version "0.4.0")
7476 (source
7477 (origin
7478 (method url-fetch)
7479 (uri (pypi-uri "contextlib2" version))
7480 (sha256
7481 (base32
7482 "0cmp131dlh0d0zvw0aza1zd13glvngzk8lb4avks0hm7yxwdr9am"))))
7483 (build-system python-build-system)
7484 (arguments
7485 `(#:phases
7486 (modify-phases %standard-phases
7487 (replace 'check
7488 (lambda _ (zero?
7489 (system*
7490 "python" "test_contextlib2.py" "-v")))))))
7491 (home-page "http://contextlib2.readthedocs.org/")
7492 (synopsis "Tools for decorators and context managers")
7493 (description "This module is primarily a backport of the Python
7494 3.2 contextlib to earlier Python versions. Like contextlib, it
7495 provides utilities for common tasks involving decorators and context
7496 managers. It also contains additional features that are not part of
7497 the standard library.")
7498 (license license:psfl)))
7499
7500 (define-public python2-contextlib2
7501 (package-with-python2 python-contextlib2))
7502
7503 (define-public python-texttable
7504 (package
7505 (name "python-texttable")
7506 (version "0.8.4")
7507 (source
7508 (origin
7509 (method url-fetch)
7510 (uri (pypi-uri "texttable" version))
7511 (sha256
7512 (base32
7513 "0bkhs4dx9s6g7fpb969hygq56hyz4ncfamlynw72s0n6nqfbd1w5"))))
7514 (build-system python-build-system)
7515 (arguments '(#:tests? #f)) ; no tests
7516 (home-page "https://github.com/foutaise/texttable/")
7517 (synopsis "Python module for creating simple ASCII tables")
7518 (description "Texttable is a Python module for creating simple ASCII
7519 tables.")
7520 (license license:lgpl2.1+)))
7521
7522 (define-public python2-texttable
7523 (package-with-python2 python-texttable))
7524
7525 (define-public python-websocket-client
7526 (package
7527 (name "python-websocket-client")
7528 (version "0.37.0")
7529 (source
7530 (origin
7531 (method url-fetch)
7532 (uri (pypi-uri "websocket_client" version))
7533 (sha256
7534 (base32
7535 "0h9glp1jll3z76ly3kg08aqgxqk0a68p4zi9yn50353bh5nj92v7"))))
7536 (build-system python-build-system)
7537 (native-inputs
7538 `(("python-six" ,python-six))) ; for tests
7539 (home-page "https://github.com/liris/websocket-client")
7540 (synopsis "WebSocket client for Python")
7541 (description "The Websocket-client module provides the low level APIs for
7542 WebSocket usage in Python programs.")
7543 (license license:lgpl2.1+)))
7544
7545 (define-public python2-websocket-client
7546 (package-with-python2 python-websocket-client))
7547
7548 (define-public python-atomicwrites
7549 (package
7550 (name "python-atomicwrites")
7551 (version "1.1.0")
7552 (source (origin
7553 (method url-fetch)
7554 (uri (pypi-uri "atomicwrites" version))
7555 (sha256
7556 (base32
7557 "1s01dci8arsl9d9vr5nz1fk9znldp1z3l4yl43f0c27z12b8yxl0"))))
7558 (build-system python-build-system)
7559 (synopsis "Atomic file writes in Python")
7560 (description "Library for atomic file writes using platform dependent tools
7561 for atomic file system operations.")
7562 (home-page "https://github.com/untitaker/python-atomicwrites")
7563 (license license:expat)))
7564
7565 (define-public python2-atomicwrites
7566 (package-with-python2 python-atomicwrites))
7567
7568 (define-public python-requests-toolbelt
7569 (package
7570 (name "python-requests-toolbelt")
7571 (version "0.6.2")
7572 (source (origin
7573 (method url-fetch)
7574 (uri (string-append
7575 "https://pypi.python.org/packages/"
7576 "e1/a4/a94c037bc72ad70441aff1403d3243510d2542ddca7759faaeffeb11aefe/"
7577 "requests-toolbelt-" version ".tar.gz"))
7578 (sha256
7579 (base32
7580 "15q9nrgp85nqlr4kdz1zvj8z2npafi2sr12y7fqgxbkq28j1aci6"))))
7581 (build-system python-build-system)
7582 (native-inputs
7583 `(("python-betamax" ,python-betamax)
7584 ("python-mock" ,python-mock)
7585 ("python-pytest" ,python-pytest)))
7586 (propagated-inputs
7587 `(("python-requests" ,python-requests)))
7588 (synopsis "Extensions to python-requests")
7589 (description "This is a toolbelt of useful classes and functions to be used
7590 with python-requests.")
7591 (home-page "https://github.com/sigmavirus24/requests-toolbelt")
7592 (license license:asl2.0)))
7593
7594 (define-public python-click-threading
7595 (package
7596 (name "python-click-threading")
7597 (version "0.2.0")
7598 (source (origin
7599 (method url-fetch)
7600 (uri (string-append
7601 "https://pypi.python.org/packages/"
7602 "fe/b7/e7f609d18a2a351cb71616adcf54df1acd82f83cb9b5936935a4d20e2c23/"
7603 "click-threading-" version ".tar.gz"))
7604 (sha256
7605 (base32
7606 "18bcqikxwb3drb8rf60cclxkxw52521b38ax3byah6j8cn8y9p4j"))))
7607 (build-system python-build-system)
7608 (propagated-inputs
7609 `(("python-click" ,python-click)))
7610 (synopsis "Utilities for multithreading in Click")
7611 (description "This package provides utilities for multithreading in Click
7612 applications.")
7613 (home-page "https://github.com/click-contrib/click-threading")
7614 (license license:expat)))
7615
7616 (define-public python-click-log
7617 (package
7618 (name "python-click-log")
7619 (version "0.1.3")
7620 (source (origin
7621 (method url-fetch)
7622 (uri (pypi-uri "click-log" version))
7623 (sha256
7624 (base32
7625 "0kdd1vminxpcfczxl2kkf285n0dr1gxh2cdbx1p6vkj7b7bci3gx"))))
7626 (build-system python-build-system)
7627 (propagated-inputs
7628 `(("python-click" ,python-click)))
7629 (synopsis "Logging for click applications")
7630 (description "This package provides a Python library for logging Click
7631 applications.")
7632 (home-page "https://github.com/click-contrib/click-log")
7633 (license license:expat)))
7634
7635 (define-public python-apipkg
7636 (package
7637 (name "python-apipkg")
7638 (version "1.4")
7639 (source (origin
7640 (method url-fetch)
7641 (uri (pypi-uri "apipkg" version))
7642 (sha256
7643 (base32
7644 "1iks5701qnp3dlr3q1d9qm68y2plp2m029irhpz92a44psfkjf1f"))))
7645 (build-system python-build-system)
7646 (native-inputs
7647 `(("python-pytest" ,python-pytest)))
7648 (synopsis "Namespace control and lazy-import mechanism")
7649 (description "With apipkg you can control the exported namespace of a Python
7650 package and greatly reduce the number of imports for your users. It is a small
7651 pure Python module that works on virtually all Python versions.")
7652 (home-page "https://bitbucket.org/hpk42/apipkg")
7653 (license license:expat)))
7654
7655 (define-public python2-apipkg
7656 (package-with-python2 python-apipkg))
7657
7658 (define-public python-execnet
7659 (package
7660 (name "python-execnet")
7661 (version "1.4.1")
7662 (source (origin
7663 (method url-fetch)
7664 (uri (pypi-uri "execnet" version))
7665 (sha256
7666 (base32
7667 "1rpk1vyclhg911p3hql0m0nrpq7q7mysxnaaw6vs29cpa6kx8vgn"))))
7668 (build-system python-build-system)
7669 (arguments
7670 `(;; 2 failed, 275 passed, 670 skipped, 4 xfailed
7671 ;; The two test failures are caused by the lack of an `ssh` executable.
7672 ;; The test suite can be run with pytest after the 'install' phase.
7673 #:tests? #f))
7674 (native-inputs
7675 `(("python-pytest" ,python-pytest)
7676 ("python-setuptools-scm" ,python-setuptools-scm)))
7677 (propagated-inputs
7678 `(("python-apipkg" ,python-apipkg)))
7679 (synopsis "Rapid multi-Python deployment")
7680 (description "Execnet provides a share-nothing model with
7681 channel-send/receive communication for distributing execution across many
7682 Python interpreters across version, platform and network barriers. It has a
7683 minimal and fast API targetting the following uses:
7684 @enumerate
7685 @item distribute tasks to (many) local or remote CPUs
7686 @item write and deploy hybrid multi-process applications
7687 @item write scripts to administer multiple environments
7688 @end enumerate")
7689 (home-page "http://codespeak.net/execnet/")
7690 (license license:expat)))
7691
7692 (define-public python2-execnet
7693 (package-with-python2 python-execnet))
7694
7695 ;;; The software provided by this package was integrated into pytest 2.8.
7696 (define-public python-pytest-cache
7697 (package
7698 (name "python-pytest-cache")
7699 (version "1.0")
7700 (source (origin
7701 (method url-fetch)
7702 (uri (pypi-uri "pytest-cache" version))
7703 (sha256
7704 (base32
7705 "1a873fihw4rhshc722j4h6j7g3nj7xpgsna9hhg3zn6ksknnhx5y"))))
7706 (build-system python-build-system)
7707 (propagated-inputs
7708 `(("python-apipkg" ,python-apipkg)
7709 ("python-execnet" ,python-execnet)
7710 ("python-py" ,python-py)
7711 ("python-pytest" ,python-pytest)))
7712 (synopsis "Py.test plugin with mechanisms for caching across test runs")
7713 (description "The pytest-cache plugin provides tools to rerun failures from
7714 the last py.test invocation.")
7715 (home-page "https://bitbucket.org/hpk42/pytest-cache/")
7716 (license license:expat)))
7717
7718 (define-public python2-pytest-cache
7719 (package-with-python2 python-pytest-cache))
7720
7721 (define-public python-pytest-localserver
7722 (package
7723 (name "python-pytest-localserver")
7724 (version "0.3.5")
7725 (source (origin
7726 (method url-fetch)
7727 (uri (pypi-uri "pytest-localserver" version))
7728 (sha256
7729 (base32
7730 "0dvqspjr6va55zwmnnc2mmpqc7mm65kxig9ya44x1z8aadzxpa4p"))))
7731 (build-system python-build-system)
7732 (arguments
7733 `(#:phases (modify-phases %standard-phases
7734 (replace 'check
7735 (lambda _
7736 (zero? (system* "py.test" "--genscript=runtests.py"))
7737 (zero? (system* "py.test")))))))
7738 (native-inputs
7739 `(("python-pytest" ,python-pytest)
7740 ("python-requests" ,python-requests)
7741 ("python-six" ,python-six)))
7742 (propagated-inputs
7743 `(("python-werkzeug" ,python-werkzeug)))
7744 (synopsis "Py.test plugin to test server connections locally")
7745 (description "Pytest-localserver is a plugin for the pytest testing
7746 framework which enables you to test server connections locally.")
7747 (home-page "https://pypi.python.org/pypi/pytest-localserver")
7748 (license license:expat)))
7749
7750 (define-public python-wsgi-intercept
7751 (package
7752 (name "python-wsgi-intercept")
7753 (version "1.2.2")
7754 (source (origin
7755 (method url-fetch)
7756 (uri (string-append
7757 "https://pypi.python.org/packages/"
7758 "38/76/ebcbc24d0cb77db34520a3ca6ed1bd43ace17d182bbd8dd7d976f1c176fb/"
7759 "wsgi_intercept-" version ".tar.gz"))
7760 (sha256
7761 (base32
7762 "0kjj2v2dvmnpdd5h5gk9rzz0f54rhjb0yiz3zg65bmp65slfw65d"))))
7763 (build-system python-build-system)
7764 (native-inputs
7765 `(("python-pytest" ,python-pytest)
7766 ("python-six" ,python-six)
7767 ("python-urllib3" ,python-urllib3)))
7768 (propagated-inputs
7769 `(("python-httplib2" ,python-httplib2)
7770 ("python-requests" ,python-requests)))
7771 (synopsis "Puts a WSGI application in place of a real URI for testing")
7772 (description "Wsgi_intercept installs a WSGI application in place of a real
7773 URI for testing. Testing a WSGI application normally involves starting a
7774 server at a local host and port, then pointing your test code to that address.
7775 Instead, this library lets you intercept calls to any specific host/port
7776 combination and redirect them into a WSGI application importable by your test
7777 program. Thus, you can avoid spawning multiple processes or threads to test
7778 your Web app.")
7779 (home-page "https://github.com/cdent/wsgi-intercept")
7780 (license license:expat)))
7781
7782 (define-public python-pytest-xprocess
7783 (package
7784 (name "python-pytest-xprocess")
7785 (version "0.9.1")
7786 (source (origin
7787 (method url-fetch)
7788 (uri (pypi-uri "pytest-xprocess" version))
7789 (sha256
7790 (base32
7791 "17zlql1xqw3ywcgwwbqmw633aly99lab12hm02asr8awvg5603pp"))))
7792 (build-system python-build-system)
7793 (propagated-inputs
7794 `(("python-pytest" ,python-pytest)
7795 ("python-pytest-cache" ,python-pytest-cache)
7796 ("python-psutil" ,python-psutil)))
7797 (synopsis "Pytest plugin to manage external processes across test runs")
7798 (description "Pytest-xprocess is an experimental py.test plugin for managing
7799 processes across test runs.")
7800 (home-page "https://bitbucket.org/pytest-dev/pytest-xprocess")
7801 (license license:expat)))
7802
7803 (define-public python-icalendar
7804 (package
7805 (name "python-icalendar")
7806 (version "3.10")
7807 (source (origin
7808 (method url-fetch)
7809 (uri (pypi-uri "icalendar" version))
7810 (sha256
7811 (base32
7812 "01amnk3621s7fagfla86npd25knbqirchg7h1jpqxqp103d02bs7"))))
7813 (build-system python-build-system)
7814 (propagated-inputs
7815 `(("python-dateutil-2" ,python-dateutil-2)
7816 ("python-pytz" ,python-pytz)))
7817 (synopsis "Python library for parsing iCalendar files")
7818 (description "The icalendar package is a parser/generator of iCalendar
7819 files for use with Python.")
7820 (home-page "https://github.com/collective/icalendar")
7821 (license license:bsd-2)))
7822
7823 (define-public python-sphinxcontrib-newsfeed
7824 (package
7825 (name "python-sphinxcontrib-newsfeed")
7826 (version "0.1.4")
7827 (source (origin
7828 (method url-fetch)
7829 (uri (pypi-uri "sphinxcontrib-newsfeed" version))
7830 (sha256
7831 (base32
7832 "1d7gam3mn8v4in4p16yn3v10vps7nnaz6ilw99j4klij39dqd37p"))))
7833 (build-system python-build-system)
7834 (propagated-inputs
7835 `(("python-docutils" ,python-docutils)
7836 ("python-sphinx" ,python-sphinx)))
7837 (synopsis "News Feed extension for Sphinx")
7838 (description "Sphinxcontrib-newsfeed is an extension for adding a simple
7839 Blog, News or Announcements section to a Sphinx website.")
7840 (home-page "https://bitbucket.org/prometheus/sphinxcontrib-newsfeed")
7841 (license license:bsd-2)))
7842
7843 (define-public python-args
7844 (package
7845 (name "python-args")
7846 (version "0.1.0")
7847 (source (origin
7848 (method url-fetch)
7849 (uri (pypi-uri "args" version))
7850 (sha256
7851 (base32
7852 "057qzi46h5dmxdqknsbrssn78lmqjlnm624iqdhrnpk26zcbi1d7"))))
7853 (build-system python-build-system)
7854 (home-page "https://github.com/kennethreitz/args")
7855 (synopsis "Command-line argument parser")
7856 (description
7857 "This library provides a Python module to parse command-line arguments.")
7858 (license license:bsd-3)))
7859
7860 (define-public python2-args
7861 (package-with-python2 python-args))
7862
7863 (define-public python-clint
7864 (package
7865 (name "python-clint")
7866 (version "0.5.1")
7867 (source (origin
7868 (method url-fetch)
7869 (uri (pypi-uri "clint" version))
7870 (sha256
7871 (base32
7872 "1an5lkkqk1zha47198p42ji3m94xmzx1a03dn7866m87n4r4q8h5"))))
7873 (build-system python-build-system)
7874 (propagated-inputs
7875 `(("python-args" ,python-args)))
7876 (home-page "https://github.com/kennethreitz/clint")
7877 (synopsis "Command-line interface tools")
7878 (description
7879 "Clint is a Python module filled with a set of tools for developing
7880 command-line applications, including tools for colored and indented
7881 output, progress bar display, and pipes.")
7882 (license license:isc)))
7883
7884 (define-public python2-clint
7885 (package-with-python2 python-clint))
7886
7887 (define-public python-astor
7888 (package
7889 (name "python-astor")
7890 (version "0.5")
7891 (source (origin
7892 (method url-fetch)
7893 (uri (pypi-uri "astor" version))
7894 (sha256
7895 (base32
7896 "1fdafq5hkis1fxqlmhw0sn44zp2ar46nxhbc22cvwg7hsd8z5gsa"))))
7897 (build-system python-build-system)
7898 (home-page "https://github.com/berkerpeksag/astor")
7899 (synopsis "Read and write Python ASTs")
7900 (description
7901 "Astor is designed to allow easy manipulation of Python source via the
7902 Abstract Syntax Tree.")
7903 (license license:bsd-3)))
7904
7905 (define-public python2-astor
7906 (package-with-python2 python-astor))
7907
7908 (define-public python-rply
7909 (package
7910 (name "python-rply")
7911 (version "0.7.4")
7912 (source (origin
7913 (method url-fetch)
7914 (uri (pypi-uri "rply" version))
7915 (sha256
7916 (base32
7917 "12rp1d9ba7nvd5rhaxi6xzx1rm67r1k1ylsrkzhpwnphqpb06cvj"))))
7918 (build-system python-build-system)
7919 (propagated-inputs
7920 `(("python-appdirs" ,python-appdirs)))
7921 (home-page "https://github.com/alex/rply")
7922 (synopsis "Parser generator for Python")
7923 (description
7924 "This package provides a pure Python based parser generator, that also
7925 works with RPython. It is a more-or-less direct port of David Bazzley's PLY,
7926 with a new public API, and RPython support.")
7927 (license license:bsd-3)))
7928
7929 (define-public python2-rply
7930 (package-with-python2 python-rply))
7931
7932 (define-public python-hy
7933 (package
7934 (name "python-hy")
7935 (version "0.11.1")
7936 (source (origin
7937 (method url-fetch)
7938 (uri (pypi-uri "hy" version))
7939 (sha256
7940 (base32
7941 "1msqv747iz12r73mz4qvsmlwkddwjvrahlrk7ysrcz07h7dsscxs"))))
7942 (build-system python-build-system)
7943 (propagated-inputs
7944 `(("python-astor" ,python-astor)
7945 ("python-clint" ,python-clint)
7946 ("python-rply" ,python-rply)))
7947 (home-page "http://hylang.org/")
7948 (synopsis "Lisp frontend to Python")
7949 (description
7950 "Hy is a dialect of Lisp that's embedded in Python. Since Hy transforms
7951 its Lisp code into the Python Abstract Syntax Tree, you have the whole world of
7952 Python at your fingertips, in Lisp form.")
7953 (license license:expat)))
7954
7955 (define-public python2-hy
7956 (package-with-python2 python-hy))
7957
7958 (define-public python-rauth
7959 (package
7960 (name "python-rauth")
7961 (version "0.7.2")
7962 (source
7963 (origin
7964 (method url-fetch)
7965 (uri (pypi-uri "rauth" version))
7966 (sha256
7967 (base32
7968 "00pq7zw429hhza9c0qzxiqp77m653jv09z92nralnmzwdf6pzicf"))))
7969 (build-system python-build-system)
7970 (arguments
7971 `(#:test-target "check"))
7972 (propagated-inputs
7973 `(("python-requests" ,python-requests)))
7974 (home-page "https://github.com/litl/rauth")
7975 (synopsis "Python library for OAuth 1.0/a, 2.0, and Ofly")
7976 (description
7977 "Rauth is a Python library for OAuth 1.0/a, 2.0, and Ofly. It also
7978 provides service wrappers for convenient connection initialization and
7979 authenticated session objects providing things like keep-alive.")
7980 (license license:expat)
7981 (properties `((python2-variant . ,(delay python2-rauth))))))
7982
7983 (define-public python2-rauth
7984 (let ((base (package-with-python2 (strip-python2-variant python-rauth))))
7985 (package
7986 (inherit base)
7987 (native-inputs `(("python2-unittest2" ,python2-unittest2)
7988 ,@(package-native-inputs base))))))
7989
7990 (define-public python2-functools32
7991 (package
7992 (name "python2-functools32")
7993 (version "3.2.3-2")
7994 (source
7995 (origin
7996 (method url-fetch)
7997 (uri (pypi-uri "functools32" version))
7998 (sha256
7999 (base32
8000 "0v8ya0b58x47wp216n1zamimv4iw57cxz3xxhzix52jkw3xks9gn"))))
8001 (build-system python-build-system)
8002 (arguments
8003 `(#:python ,python-2
8004 #:tests? #f)) ; no test target
8005 (home-page "https://github.com/MiCHiLU/python-functools32")
8006 (synopsis
8007 "Backport of the functools module from Python 3.2.3")
8008 (description
8009 "This package is a backport of the @code{functools} module from Python
8010 3.2.3 for use with older versions of Python and PyPy.")
8011 (license license:expat)))
8012
8013 (define-public python2-futures
8014 (package
8015 (name "python2-futures")
8016 (version "3.0.3")
8017 (source
8018 (origin
8019 (method url-fetch)
8020 (uri (pypi-uri "futures" version))
8021 (sha256
8022 (base32
8023 "1vcb34dqhzkhbq1957vdjszhhm5y3j9ba88dgwhqx2zynhmk9qig"))))
8024 (build-system python-build-system)
8025 (arguments `(#:python ,python-2))
8026 (home-page "https://github.com/agronholm/pythonfutures")
8027 (synopsis
8028 "Backport of the concurrent.futures package from Python 3.2")
8029 (description
8030 "The concurrent.futures module provides a high-level interface for
8031 asynchronously executing callables. This package backports the
8032 concurrent.futures package from Python 3.2")
8033 (license license:bsd-3)))
8034
8035 (define-public python-promise
8036 (package
8037 (name "python-promise")
8038 (version "0.4.2")
8039 (source
8040 (origin
8041 (method url-fetch)
8042 (uri (pypi-uri "promise" version))
8043 (sha256
8044 (base32
8045 "1k19ms8l3d5jzjh557rgkxb5sg4mqgfc315rn4hx1z3n8qq6lr3h"))))
8046 (build-system python-build-system)
8047 ;; Tests wants python-futures, which is a python2 only program, and
8048 ;; can't be found by python-promise at test time.
8049 (arguments `(#:tests? #f))
8050 (home-page "https://github.com/syrusakbary/promise")
8051 (synopsis "Promises/A+ implementation for Python")
8052 (description
8053 "Promises/A+ implementation for Python")
8054 (properties `((python2-variant . ,(delay python2-promise))))
8055 (license license:expat)))
8056
8057 (define-public python2-promise
8058 (let ((promise (package-with-python2
8059 (strip-python2-variant python-promise))))
8060 (package (inherit promise)
8061 (arguments (substitute-keyword-arguments (package-arguments promise)
8062 ((#:tests? _) #t)))
8063 (native-inputs
8064 `(("python2-futures" ,python2-futures)
8065 ("python2-pytest" ,python2-pytest)
8066 ,@(package-native-inputs promise))))))
8067
8068 (define-public python-urllib3
8069 (package
8070 (name "python-urllib3")
8071 (version "1.18.1")
8072 (source
8073 (origin
8074 (method url-fetch)
8075 (uri (pypi-uri "urllib3" version))
8076 (sha256
8077 (base32
8078 "1wb8aqnq53vzh2amrv8kc66f3h6fx217y0q62y6n30a64p2yqmam"))))
8079 (build-system python-build-system)
8080 (arguments `(#:tests? #f))
8081 (native-inputs
8082 `(;; some packages for tests
8083 ("python-nose" ,python-nose)
8084 ("python-mock" ,python-mock)
8085 ("python-tornado" ,python-tornado)))
8086 (propagated-inputs
8087 `(;; packages for https security
8088 ("python-certifi" ,python-certifi)
8089 ("python-ndg-httpsclient" ,python-ndg-httpsclient)
8090 ("python-pyasn1" ,python-pyasn1)
8091 ("python-pyopenssl" ,python-pyopenssl)))
8092 (home-page "https://urllib3.readthedocs.org/")
8093 (synopsis "HTTP library with thread-safe connection pooling")
8094 (description
8095 "Urllib3 supports features left out of urllib and urllib2 libraries. It
8096 can reuse the same socket connection for multiple requests, it can POST files,
8097 supports url redirection and retries, and also gzip and deflate decoding.")
8098 (license license:expat)))
8099
8100 (define-public python2-urllib3
8101 (package-with-python2 python-urllib3))
8102
8103 (define-public python-colorama
8104 (package
8105 (name "python-colorama")
8106 (version "0.3.3")
8107 (source
8108 (origin
8109 (method url-fetch)
8110 (uri (pypi-uri "colorama" version))
8111 (sha256
8112 (base32
8113 "1716z9pq1r5ys3nkg7wdrb3h2f9rmd0zdxpxzmx3bgwgf6xg48gb"))))
8114 (build-system python-build-system)
8115 (synopsis "colored terminal text rendering for Python")
8116 (description "Colorama is a Python library for rendering colored terminal
8117 text.")
8118 (home-page "https://pypi.python.org/pypi/colorama")
8119 (license license:bsd-3)))
8120
8121 (define-public python2-colorama
8122 (package-with-python2 python-colorama))
8123
8124 (define-public python-rsa
8125 (package
8126 (name "python-rsa")
8127 (version "3.4.2")
8128 (source
8129 (origin
8130 (method url-fetch)
8131 (uri (pypi-uri "rsa" version))
8132 (sha256
8133 (base32
8134 "1dcxvszbikgzh99ybdc7jq0zb9wspy2ds8z9mjsqiyv3q884xpr5"))))
8135 (build-system python-build-system)
8136 (propagated-inputs
8137 `(("python-pyasn1" ,python-pyasn1)))
8138 (synopsis "Pure-Python RSA implementation")
8139 (description "Python-RSA is a pure-Python RSA implementation. It supports
8140 encryption and decryption, signing and verifying signatures, and key
8141 generation according to PKCS#1 version 1.5. It can be used as a Python
8142 library as well as on the command line.")
8143 (home-page "http://stuvel.eu/rsa")
8144 (license license:asl2.0)))
8145
8146 (define-public python2-rsa
8147 (package-with-python2 python-rsa))
8148
8149 (define-public python-pluggy
8150 (package
8151 (name "python-pluggy")
8152 (version "0.3.1")
8153 (source
8154 (origin
8155 (method url-fetch)
8156 (uri (pypi-uri "pluggy" version))
8157 (sha256
8158 (base32
8159 "18qfzfm40bgx672lkg8q9x5hdh76n7vax99aank7vh2nw21wg70m"))))
8160 (build-system python-build-system)
8161 (synopsis "Plugin and hook calling mechanism for Python")
8162 (description "Pluggy is an extraction of the plugin manager as used by
8163 Pytest but stripped of Pytest specific details.")
8164 (home-page "https://pypi.python.org/pypi/pluggy")
8165 (license license:expat)))
8166
8167 (define-public python2-pluggy
8168 (package-with-python2 python-pluggy))
8169
8170 (define-public python-tox
8171 (package
8172 (name "python-tox")
8173 (version "2.3.1")
8174 (source
8175 (origin
8176 (method url-fetch)
8177 (uri (pypi-uri "tox" version))
8178 (sha256
8179 (base32
8180 "1vj73ar4rimq3fwy5r2z3jv4g9qbh8rmpmncsc00g0k310acqzxz"))))
8181 (build-system python-build-system)
8182 (arguments
8183 ;; FIXME: Tests require a newer version of pytest, but upgrading our
8184 ;; pytest breaks other packages.
8185 '(#:tests? #f))
8186 (propagated-inputs
8187 `(("python-pluggy" ,python-pluggy) ; >=0.3.0,<0.4.0
8188 ("python-py" ,python-py)
8189 ("python-virtualenv" ,python-virtualenv)))
8190 (native-inputs
8191 `(("python-pytest" ,python-pytest))) ; >= 2.3.5
8192 (home-page "http://tox.testrun.org/")
8193 (synopsis "Virtualenv-based automation of test activities")
8194 (description "Tox is a generic virtualenv management and test command line
8195 tool. It can be used to check that a package installs correctly with
8196 different Python versions and interpreters, or run tests in each type of
8197 supported environment, or act as a frontend to continuous integration
8198 servers.")
8199 (license license:expat)))
8200
8201 (define-public python2-tox
8202 (package-with-python2 python-tox))
8203
8204 (define-public python-jmespath
8205 (package
8206 (name "python-jmespath")
8207 (version "0.9.0")
8208 (source
8209 (origin
8210 (method url-fetch)
8211 (uri (pypi-uri "jmespath" version))
8212 (sha256
8213 (base32
8214 "0g9xvl69y7nr3w7ag4fsp6sm4fqf6vrqjw7504x2hzrrsh3ampq8"))))
8215 (build-system python-build-system)
8216 (synopsis "JSON Matching Expressions")
8217 (description "JMESPath (pronounced “james path”) is a Python library that
8218 allows one to declaratively specify how to extract elements from a JSON
8219 document.")
8220 (home-page "https://github.com/jmespath/jmespath.py")
8221 (license license:expat)))
8222
8223 (define-public python2-jmespath
8224 (package-with-python2 python-jmespath))
8225
8226 (define-public python-botocore
8227 (package
8228 (name "python-botocore")
8229 (version "1.4.62")
8230 (source
8231 (origin
8232 (method url-fetch)
8233 (uri (pypi-uri "botocore" version))
8234 (sha256
8235 (base32
8236 "1zxczlwqy9bl27d9bc5x99mb5mcsxm350240lp5nx7014xb311lj"))))
8237 (build-system python-build-system)
8238 (propagated-inputs
8239 `(("python-dateutil" ,python-dateutil-2)
8240 ("python-docutils" ,python-docutils)
8241 ("python-jmespath" ,python-jmespath)))
8242 (inputs
8243 `(("python-mock" ,python-mock)
8244 ("python-nose" ,python-nose)
8245 ("behave" ,behave)
8246 ("python-tox" ,python-tox)
8247 ("python-wheel" ,python-wheel)))
8248 (home-page "https://github.com/boto/botocore")
8249 (synopsis "Low-level interface to AWS")
8250 (description "Botocore is a Python library that provides a low-level
8251 interface to the Amazon Web Services (AWS) API.")
8252 (license license:asl2.0)))
8253
8254 (define-public python2-botocore
8255 (package-with-python2 python-botocore))
8256
8257 (define-public awscli
8258 (package
8259 (name "awscli")
8260 (version "1.11.5")
8261 (source
8262 (origin
8263 (method url-fetch)
8264 (uri (pypi-uri name version))
8265 (sha256
8266 (base32
8267 "0lclasm0wnayd3b8zl9l91i32nbgrhh0ncf9lksss4cv0myfwmfg"))))
8268 (build-system python-build-system)
8269 (propagated-inputs
8270 `(("python-colorama" ,python-colorama)
8271 ("python-botocore" ,python-botocore)
8272 ("python-s3transfer" ,python-s3transfer)
8273 ("python-docutils" ,python-docutils)
8274 ("python-rsa" ,python-rsa)))
8275 (inputs
8276 `(("python-mock" ,python-mock)
8277 ("python-nose" ,python-nose)
8278 ("python-sphinx" ,python-sphinx)
8279 ("python-tox" ,python-tox)
8280 ("python-wheel" ,python-wheel)))
8281 (home-page "http://aws.amazon.com/cli/")
8282 (synopsis "Command line client for AWS")
8283 (description "AWS CLI provides a unified command line interface to the
8284 Amazon Web Services (AWS) API.")
8285 (license license:asl2.0)))
8286
8287 (define-public python-hypothesis
8288 (package
8289 (name "python-hypothesis")
8290 (version "3.1.0")
8291 (source (origin
8292 (method url-fetch)
8293 (uri (pypi-uri "hypothesis" version))
8294 (sha256
8295 (base32
8296 "0qyqq9akm4vshhn8cngjc1qykcvsn7cz6dlm6njfsgpbraqrmbbw"))))
8297 (build-system python-build-system)
8298 (propagated-inputs
8299 `(("python-flake8" ,python-flake8)
8300 ("python-pytest" ,python-pytest)))
8301 (synopsis "Library for property based testing")
8302 (description "Hypothesis is a library for testing your Python code against a
8303 much larger range of examples than you would ever want to write by hand. It’s
8304 based on the Haskell library, Quickcheck, and is designed to integrate
8305 seamlessly into your existing Python unit testing work flow.")
8306 (home-page "https://github.com/DRMacIver/hypothesis")
8307 (license license:mpl2.0)
8308 (properties `((python2-variant . ,(delay python2-hypothesis))))))
8309
8310 (define-public python2-hypothesis
8311 (let ((hypothesis (package-with-python2
8312 (strip-python2-variant python-hypothesis))))
8313 (package (inherit hypothesis)
8314 (native-inputs
8315 `(("python2-enum34" ,python2-enum34))))))
8316
8317 (define-public python-pytest-subtesthack
8318 (package
8319 (name "python-pytest-subtesthack")
8320 (version "0.1.1")
8321 (source (origin
8322 (method url-fetch)
8323 (uri (pypi-uri "pytest-subtesthack" version))
8324 (sha256
8325 (base32
8326 "15kzcr5pchf3id4ikdvlv752rc0j4d912n589l4rifp8qsj19l1x"))))
8327 (build-system python-build-system)
8328 (propagated-inputs
8329 `(("python-pytest" ,python-pytest)))
8330 (synopsis "Set-up and tear-down fixtures for unit tests")
8331 (description "This plugin allows you to set up and tear down fixtures within
8332 unit test functions that use @code{py.test}. This is useful for using
8333 @command{hypothesis} inside py.test, as @command{hypothesis} will call the test
8334 function multiple times, without setting up or tearing down fixture state as is
8335 normally the case.")
8336 (home-page "https://github.com/untitaker/pytest-subtesthack/")
8337 (license license:unlicense)))
8338
8339 (define-public python2-pytest-subtesthack
8340 (package-with-python2 python-pytest-subtesthack))
8341
8342 (define-public python2-xdo
8343 (package
8344 (name "python2-xdo")
8345 (version "0.2")
8346 (source (origin
8347 (method url-fetch)
8348 (uri (string-append
8349 "http://http.debian.net/debian/pool/main/p/python-xdo/"
8350 "python-xdo_" version ".orig.tar.gz"))
8351 (sha256
8352 (base32
8353 "1kl5c1p0dyxf62plnk6fl77ycfb4whwjms16r14dxx8kn90hlqz4"))))
8354 (build-system python-build-system)
8355 (arguments
8356 `(#:python ,python-2
8357 #:tests? #f)) ; no tests provided
8358 (inputs
8359 `(("xdotool" ,xdotool)
8360 ("libX11" ,libx11)))
8361 (home-page "https://tracker.debian.org/pkg/python-xdo")
8362 (synopsis "Python library for simulating X11 keyboard/mouse input")
8363 (description "Provides bindings to libxdo for manipulating X11 via simulated
8364 input. (Note that this is mostly a legacy library; you may wish to look at
8365 python-xdo for newer bindings.)")
8366 (license license:bsd-3)))
8367
8368 (define-public python-wtforms
8369 (package
8370 (name "python-wtforms")
8371 (version "2.1")
8372 (source
8373 (origin
8374 (method url-fetch)
8375 (uri (pypi-uri "WTForms" version ".zip"))
8376 (sha256
8377 (base32
8378 "0vyl26y9cg409cfyj8rhqxazsdnd0jipgjw06civhrd53yyi1pzz"))))
8379 (build-system python-build-system)
8380 (arguments
8381 '(#:phases
8382 (modify-phases %standard-phases
8383 (add-after 'unpack 'remove-django-test
8384 ;; Don't fail the tests when the inputs for the optional tests cannot be found.
8385 (lambda _
8386 (substitute*
8387 "tests/runtests.py"
8388 (("'ext_django.tests', 'ext_sqlalchemy', 'ext_dateutil', 'locale_babel'") "")
8389 (("sys.stderr.write(\"### Disabled test '%s', dependency not found\n\" % name)") ""))
8390 #t)))))
8391 (native-inputs
8392 `(("unzip" ,unzip)))
8393 (home-page "http://wtforms.simplecodes.com/")
8394 (synopsis
8395 "Form validation and rendering library for Python web development")
8396 (description
8397 "WTForms is a flexible forms validation and rendering library
8398 for Python web development. It is very similar to the web form API
8399 available in Django, but is a standalone package.")
8400 (license license:bsd-3)))
8401
8402 (define-public python2-wtforms
8403 (package-with-python2 python-wtforms))
8404
8405 (define-public python-mako
8406 (package
8407 (name "python-mako")
8408 (version "1.0.3")
8409 (source
8410 (origin
8411 (method url-fetch)
8412 (uri (pypi-uri "Mako" version))
8413 (sha256
8414 (base32
8415 "136kcjbs0s98qkx8a418b05dfblqp0kiiqyx8vhx4rarwc7bqi3n"))))
8416 (build-system python-build-system)
8417 (propagated-inputs
8418 `(("python-markupsafe" ,python-markupsafe)))
8419 (native-inputs
8420 `(("python-mock" ,python-mock)
8421 ("python-nose" ,python-nose)))
8422 (home-page "http://www.makotemplates.org/")
8423 (synopsis "Templating language for Python")
8424 (description "Mako is a templating language for Python that compiles
8425 templates into Python modules.")
8426 (license license:expat)))
8427
8428 (define-public python2-mako
8429 (package-with-python2 python-mako))
8430
8431 (define-public python-waitress
8432 (package
8433 (name "python-waitress")
8434 (version "0.8.10")
8435 (source
8436 (origin
8437 (method url-fetch)
8438 (uri (pypi-uri "waitress" version))
8439 (sha256
8440 (base32
8441 "017n9ra6vvmq9d5sfhdzyzr1mg15x2hj2dhm4pdlw98c1ypw2h3w"))))
8442 (build-system python-build-system)
8443 (home-page "https://github.com/Pylons/waitress")
8444 (synopsis "Waitress WSGI server")
8445 (description "Waitress is meant to be a production-quality pure-Python WSGI
8446 server with very acceptable performance.")
8447 (license license:zpl2.1)))
8448
8449 (define-public python2-waitress
8450 (package-with-python2 python-waitress))
8451
8452 (define-public python-wsgiproxy2
8453 (package
8454 (name "python-wsgiproxy2")
8455 (version "0.4.2")
8456 (source
8457 (origin
8458 (method url-fetch)
8459 (uri (pypi-uri "WSGIProxy2" version ".zip"))
8460 (sha256
8461 (base32
8462 "13kf9bdxrc95y9vriaz0viry3ah11nz4rlrykcfvb8nlqpx3dcm4"))))
8463 (build-system python-build-system)
8464 (arguments
8465 '(;; Wsgiproxy2's test suite requires Restkit, which does not yet fully
8466 ;; support Python 3:
8467 ;; https://github.com/benoitc/restkit/issues/140
8468 #:tests? #f))
8469 (native-inputs
8470 `(("unzip" ,unzip)
8471 ("python-nose" ,python-nose)
8472 ("python-coverage" ,python-coverage)))
8473 (propagated-inputs
8474 `(("python-six" ,python-six)
8475 ("python-webob" ,python-webob)))
8476 (home-page
8477 "https://github.com/gawel/WSGIProxy2/")
8478 (synopsis "WSGI Proxy with various http client backends")
8479 (description "WSGI turns HTTP requests into WSGI function calls.
8480 WSGIProxy turns WSGI function calls into HTTP requests.
8481 It also includes code to sign requests and pass private data,
8482 and to spawn subprocesses to handle requests.")
8483 (license license:expat)))
8484
8485 (define-public python2-wsgiproxy2
8486 (package-with-python2 python-wsgiproxy2))
8487
8488 (define-public python-pastedeploy
8489 (package
8490 (name "python-pastedeploy")
8491 (version "1.5.2")
8492 (source
8493 (origin
8494 (method url-fetch)
8495 (uri (pypi-uri "PasteDeploy" version))
8496 (sha256
8497 (base32
8498 "1jz3m4hq8v6hyhfjz9425nd3nvn52cvbfipdcd72krjmla4qz1fm"))))
8499 (build-system python-build-system)
8500 (native-inputs
8501 `(("python-nose" ,python-nose)))
8502 ;; Note: setuptools used at runtime for pkg_resources
8503 (home-page "http://pythonpaste.org/deploy/")
8504 (synopsis
8505 "Load, configure, and compose WSGI applications and servers")
8506 (description
8507 "This tool provides code to load WSGI applications and servers from URIs;
8508 these URIs can refer to Python Eggs for INI-style configuration files. Paste
8509 Script provides commands to serve applications based on this configuration
8510 file.")
8511 (license license:expat)))
8512
8513 (define-public python2-pastedeploy
8514 (package-with-python2 python-pastedeploy))
8515
8516 (define-public python-paste
8517 (package
8518 (name "python-paste")
8519 (version "2.0.2")
8520 (source
8521 (origin
8522 (method url-fetch)
8523 (uri (pypi-uri "Paste" version))
8524 (sha256
8525 (base32
8526 "16dsv9qi0r4qsrsb6dilpq2rx0fnglvh36flzywcdnm2jg43mb5d"))
8527 (patches (search-patches "python-paste-remove-website-test.patch"
8528 "python-paste-remove-timing-test.patch"))))
8529 (build-system python-build-system)
8530 (native-inputs
8531 `(("python-nose" ,python-nose)))
8532 ;; Note: setuptools used at runtime for pkg_resources
8533 (propagated-inputs
8534 `(("python-six" ,python-six)))
8535 (arguments
8536 '(;; Tests don't pass on Python 3, but work fine on Python 2.
8537 ;; (As of 2.0.2, Python 3 support in Paste is presently a bit broken,
8538 ;; but is usable enough for the minimal amount it's used in MediaGoblin
8539 ;; still... things should be better by the next Paste release.)
8540 #:tests? #f))
8541 (home-page "http://pythonpaste.org")
8542 (synopsis
8543 "Python web development tools, focusing on WSGI")
8544 (description
8545 "Paste provides a variety of web development tools and middleware which
8546 can be nested together to build web applications. Paste's design closely
8547 follows ideas flowing from WSGI (Web Standard Gateway Interface).")
8548 (license license:expat)
8549 (properties `((python2-variant . ,(delay python2-paste))))))
8550
8551 (define-public python2-paste
8552 (let ((paste (package-with-python2
8553 (strip-python2-variant python-paste))))
8554 (package
8555 (inherit paste)
8556 (arguments
8557 ;; Tests are back for Python 2!
8558 `(#:tests? #t
8559 ,@(package-arguments paste))))))
8560
8561 (define-public python-pastescript
8562 (package
8563 (name "python-pastescript")
8564 (version "2.0.2")
8565 (source
8566 (origin
8567 (method url-fetch)
8568 (uri (pypi-uri "PasteScript" version))
8569 (sha256
8570 (base32
8571 "1h3nnhn45kf4pbcv669ik4faw04j58k8vbj1hwrc532k0nc28gy0"))))
8572 (build-system python-build-system)
8573 (native-inputs
8574 `(("python-nose" ,python-nose)))
8575 ;; Note: setuptools used at runtime for pkg_resources
8576 (propagated-inputs
8577 `(("python-paste" ,python-paste)
8578 ("python-pastedeploy" ,python-pastedeploy)))
8579 (home-page "http://pythonpaste.org/script/")
8580 (arguments
8581 '(;; Unfortunately, this requires the latest unittest2,
8582 ;; but that requires traceback2 which requires linecache2 which requires
8583 ;; unittest2. So we're skipping tests for now.
8584 ;; (Note: Apparently linetest2 only needs unittest2 for its tests,
8585 ;; so in theory we could get around this situation somehow.)
8586 #:tests? #f))
8587 (synopsis
8588 "Pluggable command line tool for serving web applications and more")
8589 (description
8590 "PasteScript is a plugin-friendly command line tool which provides a
8591 variety of features, from launching web applications to bootstrapping project
8592 layouts.")
8593 (license license:expat)))
8594
8595 (define-public python2-pastescript
8596 (package-with-python2 python-pastescript))
8597
8598 (define-public python-pyquery
8599 (package
8600 (name "python-pyquery")
8601 (version "1.2.13")
8602 (source
8603 (origin
8604 (method url-fetch)
8605 (uri (pypi-uri "pyquery" version))
8606 (sha256
8607 (base32
8608 "0j9fsisip21qv4xljsg5dmni1pgpvwrjyyhhql0glydc4bs5rjgv"))))
8609 (build-system python-build-system)
8610 (native-inputs
8611 `(("python-webob" ,python-webob)
8612 ("python-webtest" ,python-webtest)))
8613 (propagated-inputs
8614 `(("python-lxml" ,python-lxml)
8615 ("python-cssselect" ,python-cssselect)))
8616 (home-page "https://github.com/gawel/pyquery")
8617 (synopsis "Make jQuery-like queries on xml documents")
8618 (description "pyquery allows you to make jQuery queries on xml documents.
8619 The API is as much as possible the similar to jQuery. pyquery uses lxml for
8620 fast xml and html manipulation.")
8621 (license license:bsd-3)))
8622
8623 (define-public python2-pyquery
8624 (package-with-python2 python-pyquery))
8625
8626 (define-public python-webtest
8627 (package
8628 (name "python-webtest")
8629 (version "2.0.20")
8630 (source
8631 (origin
8632 (method url-fetch)
8633 (uri (pypi-uri "WebTest" version))
8634 (sha256
8635 (base32
8636 "0bv0qhdjakdsdgj4sk21gnpp8xp8bga4x03p6gjb83ihrsb7n4xv"))))
8637 (build-system python-build-system)
8638 (arguments
8639 `(;; Unfortunately we have to disable tests!
8640 ;; This release of WebTest is pinned to python-nose < 1.3,
8641 ;; but older versions of python-nose are plagued with the following
8642 ;; bug(s), which rears its ugly head during test execution:
8643 ;; https://github.com/nose-devs/nose/issues/759
8644 ;; https://github.com/nose-devs/nose/pull/811
8645 #:tests? #f))
8646 ;; Commented out code is no good, but in this case, once tests
8647 ;; are ready to be enabled again, we should put the following
8648 ;; in place:
8649 ;; (native-inputs
8650 ;; `(("python-nose" ,python-nose) ; technially < 1.3,
8651 ;; ; but see above comment
8652 ;; ("python-coverage" ,python-coverage)
8653 ;; ("python-mock" ,python-mock)
8654 ;; ("python-pastedeploy" ,python-pastedeploy)
8655 ;; ("python-wsgiproxy2" ,python-wsgiproxy2)
8656 ;; ("python-pyquery" ,python-pyquery)))
8657 (propagated-inputs
8658 `(("python-waitress" ,python-waitress)
8659 ("python-webob" ,python-webob)
8660 ("python-six" ,python-six)
8661 ("python-beautifulsoup4" ,python-beautifulsoup4)))
8662 (home-page "http://webtest.pythonpaste.org/")
8663 (synopsis "Helper to test WSGI applications")
8664 (description "Webtest allows you to test your Python web applications
8665 without starting an HTTP server. It supports anything that supports the
8666 minimum of WSGI.")
8667 (license license:expat)))
8668
8669 (define-public python2-webtest
8670 (package-with-python2 python-webtest))
8671
8672 (define-public python-anyjson
8673 (package
8674 (name "python-anyjson")
8675 (version "0.3.3")
8676 (source
8677 (origin
8678 (method url-fetch)
8679 (uri (pypi-uri "anyjson" version))
8680 (sha256
8681 (base32
8682 "1fjph4alvcscsl5d4b6qpv1yh31jy05jxi1l0xff7lws7j32v09p"))))
8683 (build-system python-build-system)
8684 (arguments
8685 `(;; We could possibly get tests working, but on Python 3 it's not so easy.
8686 ;; Very strangely, 2to3 is run *during setup.py install* (or bdist, or
8687 ;; whatever) so this transformation needs to be done before the tests
8688 ;; can be run. Maybe we could add a build step to transform beforehand
8689 ;; but it could be annoying/difficult.
8690 ;; We can enable tests for the Python 2 version, though, and do below.
8691 #:tests? #f))
8692 (home-page "http://bitbucket.org/runeh/anyjson/")
8693 (synopsis
8694 "Wraps best available JSON implementation in a common interface")
8695 (description
8696 "Anyjson loads whichever is the fastest JSON module installed
8697 and provides a uniform API regardless of which JSON implementation is used.")
8698 (license license:bsd-3)
8699 (properties `((python2-variant . ,(delay python2-anyjson))))))
8700
8701 (define-public python2-anyjson
8702 (let ((anyjson (package-with-python2
8703 (strip-python2-variant python-anyjson))))
8704 (package
8705 (inherit anyjson)
8706 (arguments `(;; Unlike the python 3 variant, we do run tests. See above!
8707 #:tests? #t
8708 ,@(package-arguments anyjson)))
8709 (native-inputs `(("python2-nose" ,python2-nose))))))
8710
8711 (define-public python-amqp
8712 (package
8713 (name "python-amqp")
8714 (version "1.4.9")
8715 (source
8716 (origin
8717 (method url-fetch)
8718 (uri (pypi-uri "amqp" version))
8719 (sha256
8720 (base32
8721 "06n6q0kxhjnbfz3vn8x9yz09lwmn1xi9d6wxp31h5jbks0b4vsid"))))
8722 (build-system python-build-system)
8723 (native-inputs
8724 `(("python-nose" ,python-nose)
8725 ("python-mock" ,python-mock)))
8726 (home-page "http://github.com/celery/py-amqp")
8727 (synopsis
8728 "Low-level AMQP client for Python (fork of amqplib)")
8729 (description
8730 "This is a fork of amqplib which was originally written by Barry Pederson.
8731 It is maintained by the Celery project, and used by kombu as a pure python
8732 alternative when librabbitmq is not available.")
8733 (license license:lgpl2.1+)
8734 (properties `((python2-variant . ,(delay python2-amqp))))))
8735
8736 (define-public python2-amqp
8737 (let ((amqp (package-with-python2
8738 (strip-python2-variant python-amqp))))
8739 (package
8740 (inherit amqp)
8741 (arguments `(;; Tries to run coverage tests with nose-cover3, which seems
8742 ;; unmaintained. Weirdly, does not do this on the python 3
8743 ;; version?
8744 #:tests? #f
8745 ,@(package-arguments amqp))))))
8746
8747 (define-public python-kombu
8748 (package
8749 (name "python-kombu")
8750 (version "3.0.37")
8751 (source
8752 (origin
8753 (method url-fetch)
8754 (uri (pypi-uri "kombu" version))
8755 (sha256
8756 (base32
8757 "0l16chb314gpq2v7fh94a22c30lcv6w3ylmhsa60bldlcq6a0r70"))))
8758 (build-system python-build-system)
8759 (native-inputs
8760 `(("python-mock" ,python-mock)
8761 ("python-nose" ,python-nose)))
8762 (propagated-inputs
8763 `(("python-anyjson" ,python-anyjson)
8764 ("python-amqp" ,python-amqp)
8765 ("python-redis" ,python-redis)))
8766 (home-page "http://kombu.readthedocs.org")
8767 (synopsis "Message passing library for Python")
8768 (description "The aim of Kombu is to make messaging in Python as easy as
8769 possible by providing an idiomatic high-level interface for the AMQ protocol,
8770 and also provide proven and tested solutions to common messaging problems.
8771 AMQP is the Advanced Message Queuing Protocol, an open standard protocol for
8772 message orientation, queuing, routing, reliability and security, for which the
8773 RabbitMQ messaging server is the most popular implementation.")
8774 (license license:bsd-3)
8775 (properties `((python2-variant . ,(delay python2-kombu))))))
8776
8777 (define-public python2-kombu
8778 (let ((kombu (package-with-python2
8779 (strip-python2-variant python-kombu))))
8780 (package
8781 (inherit kombu)
8782 (native-inputs `(("python2-unittest2" ,python2-unittest2)
8783 ,@(package-native-inputs kombu))))))
8784
8785 (define-public python-billiard
8786 (package
8787 (name "python-billiard")
8788 (version "3.3.0.23")
8789 (source
8790 (origin
8791 (method url-fetch)
8792 (uri (pypi-uri "billiard" version))
8793 (sha256
8794 (base32
8795 "02wxsc6bhqvzh8j6w758kvgqbnj14l796mvmrcms8fgfamd2lak9"))))
8796 (build-system python-build-system)
8797 (native-inputs
8798 `(("python-nose" ,python-nose)))
8799 (home-page "http://github.com/celery/billiard")
8800 (synopsis
8801 "Python multiprocessing fork with improvements and bugfixes")
8802 (description
8803 "Billiard is a fork of the Python 2.7 multiprocessing package. The
8804 multiprocessing package itself is a renamed and updated version of R Oudkerk's
8805 pyprocessing package. This standalone variant is intended to be compatible with
8806 Python 2.4 and 2.5, and will draw its fixes/improvements from python-trunk.")
8807 (license license:bsd-3)
8808 (properties `((python2-variant . ,(delay python2-billiard))))))
8809
8810 (define-public python2-billiard
8811 (let ((billiard (package-with-python2
8812 (strip-python2-variant python-billiard))))
8813 (package
8814 (inherit billiard)
8815 (native-inputs `(("python2-unittest2" ,python2-unittest2)
8816 ("python2-mock" ,python2-mock)
8817 ,@(package-native-inputs billiard))))))
8818
8819 (define-public python-celery
8820 (package
8821 (name "python-celery")
8822 (version "3.1.24")
8823 (source
8824 (origin
8825 (method url-fetch)
8826 (uri (pypi-uri "celery" version))
8827 (sha256
8828 (base32
8829 "0yh2prhdnx2dgkb67a5drj12hh2zvzx5f611p7mqqg01ydghif4r"))))
8830 (build-system python-build-system)
8831 (arguments
8832 `(#:phases
8833 (modify-phases %standard-phases
8834 ;; These tests break with Python 3.5:
8835 ;; https://github.com/celery/celery/issues/2897#issuecomment-253066295
8836 (replace 'check
8837 (lambda _
8838 (zero?
8839 (system* "nosetests" "--exclude=^test_safe_to_remove.*")))))))
8840 (native-inputs
8841 `(("python-nose" ,python-nose)))
8842 (propagated-inputs
8843 `(("python-pytz" ,python-pytz)
8844 ("python-amqp" ,python-amqp)
8845 ("python-anyjson" ,python-anyjson)
8846 ("python-billiard" ,python-billiard)
8847 ("python-kombu" ,python-kombu)))
8848 (home-page "http://celeryproject.org")
8849 (synopsis "Distributed Task Queue")
8850 (description "Celery is an asynchronous task queue/job queue based on
8851 distributed message passing. It is focused on real-time operation, but
8852 supports scheduling as well. The execution units, called tasks, are executed
8853 concurrently on a single or more worker servers using multiprocessing,
8854 Eventlet, or gevent. Tasks can execute asynchronously (in the background) or
8855 synchronously (wait until ready).")
8856 (license license:bsd-3)
8857 (properties `((python2-variant . ,(delay python2-celery))))))
8858
8859 (define-public python2-celery
8860 (let ((celery (package-with-python2
8861 (strip-python2-variant python-celery))))
8862 (package
8863 (inherit celery)
8864 (native-inputs `(("python2-unittest2" ,python2-unittest2)
8865 ("python2-mock" ,python2-mock)
8866 ,@(package-native-inputs celery))))))
8867
8868 (define-public python-translitcodec
8869 (package
8870 (name "python-translitcodec")
8871 (version "0.4.0")
8872 (source
8873 (origin
8874 (method url-fetch)
8875 (uri (pypi-uri "translitcodec" version))
8876 (sha256
8877 (base32
8878 "10x6pvblkzky1zhjs8nmx64nb9jdzxad4bxhq4iwv0j4z2aqjnki"))))
8879 (build-system python-build-system)
8880 (arguments
8881 `(#:tests? #f)) ; no tests provided
8882 (home-page
8883 "https://github.com/claudep/translitcodec")
8884 (synopsis
8885 "Unicode to 8-bit charset transliteration codec")
8886 (description
8887 "This package contains codecs for transliterating ISO 10646 texts into
8888 best-effort representations using smaller coded character sets (ASCII,
8889 ISO 8859, etc.).")
8890 (license license:expat)))
8891
8892 (define-public python2-translitcodec
8893 (package-with-python2 python-translitcodec))
8894
8895 (define-public python-editor
8896 (package
8897 (name "python-editor")
8898 (version "0.5")
8899 (source
8900 (origin
8901 (method url-fetch)
8902 (uri (pypi-uri "python-editor" version))
8903 (sha256
8904 (base32
8905 "1ypnpgvzpkbwsg4rdvy4sy51j28b5xq9v8pnkwxncn07vqz06p7n"))))
8906 (build-system python-build-system)
8907 (home-page
8908 "https://github.com/fmoo/python-editor")
8909 (synopsis
8910 "Programmatically open an editor, capture the result")
8911 (description
8912 "python-editor is a library that provides the editor module for
8913 programmatically interfacing with your system's $EDITOR.")
8914 (license license:asl2.0)))
8915
8916 (define-public python2-editor
8917 (package-with-python2 python-editor))
8918
8919 (define-public python-sphinxcontrib-programoutput
8920 (package
8921 (name "python-sphinxcontrib-programoutput")
8922 (version "0.8")
8923 (source (origin
8924 (method url-fetch)
8925 (uri (pypi-uri "sphinxcontrib-programoutput" version))
8926 (sha256
8927 (base32
8928 "098as6z1s0gb4dh5xcr1fd2vpm91zj93jzvgawspxf5s4hqs0xhp"))))
8929 (build-system python-build-system)
8930 (propagated-inputs
8931 `(("python-docutils" ,python-docutils)
8932 ("python-sphinx" ,python-sphinx)))
8933 (synopsis "Sphinx extension to include program output")
8934 (description "A Sphinx extension to literally insert the output of arbitrary
8935 commands into documents, helping you to keep your command examples up to date.")
8936 (home-page "https://github.com/lunaryorn/sphinxcontrib-programoutput")
8937 (license license:bsd-2)))
8938
8939 (define-public python2-sphinxcontrib-programoutput
8940 (package-with-python2 python-sphinxcontrib-programoutput))
8941
8942 (define-public python-sphinx-repoze-autointerface
8943 (package
8944 (name "python-sphinx-repoze-autointerface")
8945 (version "0.8")
8946 (source (origin
8947 (method url-fetch)
8948 (uri (pypi-uri "repoze.sphinx.autointerface" version))
8949 (sha256
8950 (base32
8951 "08ycivzf7bh4a1zcyp31hbyqs1b2c9r26raa3vxjwwmbfqr3iw4f"))))
8952 (build-system python-build-system)
8953 (propagated-inputs
8954 `(("python-docutils" ,python-docutils)
8955 ("python-sphinx" ,python-sphinx)
8956 ("python-zope-interface" ,python-zope-interface)))
8957 (synopsis "Auto-generate Sphinx API docs from Zope interfaces")
8958 (description "This package defines an extension for the Sphinx documentation
8959 system. The extension allows generation of API documentation by
8960 introspection of @code{zope.interface} instances in code.")
8961 (home-page "https://github.com/repoze/repoze.sphinx.autointerface")
8962 (license license:repoze)))
8963
8964 (define-public python2-sphinx-repoze-autointerface
8965 (package-with-python2 python-sphinx-repoze-autointerface))
8966
8967 (define-public python-psycopg2
8968 (package
8969 (name "python-psycopg2")
8970 (version "2.6.1")
8971 (source
8972 (origin
8973 (method url-fetch)
8974 (uri (pypi-uri "psycopg2" version))
8975 (sha256
8976 (base32
8977 "0k4hshvrwsh8yagydyxgmd0pjm29lwdxkngcq9fzfzkmpsxrmkva"))))
8978 (build-system python-build-system)
8979 (arguments
8980 ;; Tests would require a postgresql database "psycopg2_test"
8981 ;; and a running postgresql database management service.
8982 `(#:tests? #f)) ; TODO re-enable after providing a test-db.
8983 (inputs
8984 `(("postgresql" ,postgresql))) ; libpq
8985 (home-page "http://initd.org/psycopg/")
8986 (synopsis "Python PostgreSQL adapter")
8987 (description
8988 "psycopg2 is a thread-safe PostgreSQL adapter that implements DB-API 2.0. ")
8989 (license license:lgpl3+)))
8990
8991 (define-public python2-psycopg2
8992 (package-with-python2 python-psycopg2))
8993
8994 (define-public python-vobject
8995 (package
8996 (name "python-vobject")
8997 (version "0.9.2")
8998 (source (origin
8999 (method url-fetch)
9000 (uri (pypi-uri "vobject" version))
9001 (sha256
9002 (base32
9003 "1qfnwlx8qwkgr6nf5wvl6ff1r3kll53dh3z6nyp173nmlhhhqccb"))))
9004 (build-system python-build-system)
9005 (arguments
9006 '(;; The test suite relies on some non-portable Windows interfaces.
9007 #:tests? #f))
9008 (propagated-inputs
9009 `(("python-dateutil-2" ,python-dateutil-2)
9010 ("python-pyicu" ,python-pyicu)))
9011 (synopsis "Parse and generate vCard and vCalendar files")
9012 (description "Vobject is intended to be a full featured Python package for
9013 parsing and generating vCard and vCalendar files. Currently, iCalendar files
9014 are supported and well tested. vCard 3.0 files are supported, and all data
9015 should be imported, but only a few components are understood in a sophisticated
9016 way.")
9017 (home-page "http://eventable.github.io/vobject/")
9018 (license license:asl2.0)))
9019
9020 (define-public python2-vobject
9021 (package-with-python2 python-vobject))
9022
9023 (define-public python-munkres
9024 (package
9025 (name "python-munkres")
9026 (version "1.0.7")
9027 (source (origin
9028 (method url-fetch)
9029 (uri (pypi-uri "munkres" version))
9030 (sha256
9031 (base32
9032 "1i6nf45i0kkzdx6k70giybsqxz4dxsjbrkrfqgjd7znfkf25sjik"))))
9033 (build-system python-build-system)
9034 (arguments
9035 '(#:tests? #f)) ; no test suite
9036 (home-page "http://software.clapper.org/munkres/")
9037 (synopsis "Implementation of the Munkres algorithm")
9038 (description "The Munkres module provides an implementation of the Munkres
9039 algorithm (also called the Hungarian algorithm or the Kuhn-Munkres algorithm),
9040 useful for solving the Assignment Problem.")
9041 (license license:bsd-3)))
9042
9043 (define-public python2-munkres
9044 (package-with-python2 python-munkres))
9045
9046 (define-public python-flask
9047 (package
9048 (name "python-flask")
9049 (version "0.10.1")
9050 (source (origin
9051 (method url-fetch)
9052 (uri (pypi-uri "Flask" version))
9053 (sha256
9054 (base32
9055 "0wrkavjdjndknhp8ya8j850jq7a1cli4g5a93mg8nh1xz2gq50sc"))))
9056 (build-system python-build-system)
9057 (propagated-inputs
9058 `(("python-itsdangerous" ,python-itsdangerous)
9059 ("python-jinja2" ,python-jinja2)
9060 ("python-werkzeug" ,python-werkzeug)))
9061 (home-page "https://github.com/mitsuhiko/flask/")
9062 (synopsis "Microframework based on Werkzeug, Jinja2 and good intentions")
9063 (description "Flask is a micro web framework based on the Werkzeug toolkit
9064 and Jinja2 template engine. It is called a micro framework because it does not
9065 presume or force a developer to use a particular tool or library.")
9066 (license license:bsd-3)))
9067
9068 (define-public python2-flask
9069 (package-with-python2 python-flask))
9070
9071 (define-public python-cookies
9072 (package
9073 (name "python-cookies")
9074 (version "2.2.1")
9075 (source (origin
9076 (method url-fetch)
9077 (uri (pypi-uri "cookies" version))
9078 (sha256
9079 (base32
9080 "13pfndz8vbk4p2a44cfbjsypjarkrall71pgc97glk5fiiw9idnn"))))
9081 (build-system python-build-system)
9082 (arguments
9083 `(;; test are broken: https://gitlab.com/sashahart/cookies/issues/3
9084 #:tests? #f))
9085 (native-inputs
9086 `(("python-pytest" ,python2-pytest)))
9087 (synopsis "HTTP cookie parser and renderer")
9088 (description "A RFC 6265-compliant HTTP cookie parser and renderer in
9089 Python.")
9090 (home-page "https://gitlab.com/sashahart/cookies")
9091 (license license:expat)))
9092
9093 (define-public python2-cookies
9094 (package-with-python2 python-cookies))
9095
9096 (define-public python-responses
9097 (package
9098 (name "python-responses")
9099 (version "0.5.1")
9100 (source (origin
9101 (method url-fetch)
9102 (uri (pypi-uri "responses" version))
9103 (sha256
9104 (base32
9105 "1spcfxixyk9k7pk82jm6zqkwk031s95lh8q0mz7539jrb7269bcc"))))
9106 (build-system python-build-system)
9107 (arguments
9108 `(;; Test suite is not distributed:
9109 ;; https://github.com/getsentry/responses/issues/38
9110 #:tests? #f))
9111 (native-inputs
9112 `(("python-cookies" ,python-cookies)
9113 ("python-mock" ,python-mock)))
9114 (propagated-inputs
9115 `(("python-requests" ,python-requests)
9116 ("python-six" ,python-six)))
9117 (home-page "https://github.com/getsentry/responses")
9118 (synopsis "Utility for mocking out the `requests` Python library")
9119 (description "A utility library for mocking out the `requests` Python
9120 library.")
9121 (license license:asl2.0)))
9122
9123 (define-public python2-responses
9124 (package-with-python2 python-responses))
9125
9126 (define-public python-whoosh
9127 (package
9128 (name "python-whoosh")
9129 (version "2.7.4")
9130 (source
9131 (origin
9132 (method url-fetch)
9133 (uri (pypi-uri "Whoosh" version))
9134 (sha256
9135 (base32
9136 "10qsqdjpbc85fykc1vgcs8xwbgn4l2l52c8d83xf1q59pwyn79bw"))))
9137 (build-system python-build-system)
9138 (native-inputs
9139 `(("python-pytest" ,python-pytest)))
9140 (home-page "http://bitbucket.org/mchaput/whoosh")
9141 (synopsis "Full text indexing, search, and spell checking library")
9142 (description
9143 "Whoosh is a fast, pure-Python full text indexing, search, and spell
9144 checking library.")
9145 (license license:bsd-2)))
9146
9147 (define-public python2-whoosh
9148 (let ((whoosh (package-with-python2 (strip-python2-variant python-whoosh))))
9149 (package (inherit whoosh)
9150 (propagated-inputs
9151 `(("python2-backport-ssl-match-hostname"
9152 ,python2-backport-ssl-match-hostname)
9153 ,@(package-propagated-inputs whoosh))))))
9154
9155 (define-public python-pathlib
9156 (package
9157 (name "python-pathlib")
9158 (version "1.0.1")
9159 (source (origin
9160 (method url-fetch)
9161 (uri (pypi-uri "pathlib" version))
9162 (sha256
9163 (base32
9164 "17zajiw4mjbkkv6ahp3xf025qglkj0805m9s41c45zryzj6p2h39"))))
9165 (build-system python-build-system)
9166 ;; The tests depend on the internal "test" module, which does not provide
9167 ;; a stable interface.
9168 (arguments `(#:tests? #f))
9169 (home-page "https://pathlib.readthedocs.org/")
9170 (synopsis "Object-oriented file system paths")
9171 (description "Pathlib offers a set of classes to handle file system paths.
9172 It offers the following advantages over using string objects:
9173
9174 @enumerate
9175 @item No more cumbersome use of os and os.path functions. Everything can
9176 be done easily through operators, attribute accesses, and method calls.
9177 @item Embodies the semantics of different path types. For example,
9178 comparing Windows paths ignores casing.
9179 @item Well-defined semantics, eliminating any inconsistencies or
9180 ambiguities (forward vs. backward slashes, etc.).
9181 @end enumerate
9182
9183 Note: In Python 3.4, pathlib is now part of the standard library. For other
9184 Python versions please consider python-pathlib2 instead, which tracks the
9185 standard library module. This module (python-pathlib) isn't maintained
9186 anymore.")
9187 (license license:expat)))
9188
9189 (define-public python2-pathlib
9190 (package-with-python2 python-pathlib))
9191
9192 (define-public python2-pathlib2
9193 (package
9194 (name "python2-pathlib2")
9195 (version "2.1.0")
9196 (source (origin
9197 (method url-fetch)
9198 (uri (pypi-uri "pathlib2" version))
9199 (sha256
9200 (base32
9201 "0p050msg5c8d0kadv702jnfshaxrb0il765cpkgnhn6mq5hakcyy"))))
9202 (build-system python-build-system)
9203 ;; We only need the the Python 2 variant, since for Python 3 our minimum
9204 ;; version is 3.4 which already includes this package as part of the
9205 ;; standard library.
9206 (arguments
9207 `(#:python ,python-2))
9208 (native-inputs
9209 `(("python2-six" ,python2-six)))
9210 (home-page "http://pypi.python.org/pypi/pathlib2/")
9211 (synopsis "Object-oriented file system paths - backport of standard
9212 pathlib module")
9213 (description "The goal of pathlib2 is to provide a backport of standard
9214 pathlib module which tracks the standard library module, so all the newest
9215 features of the standard pathlib can be used also on older Python versions.
9216
9217 Pathlib offers a set of classes to handle file system paths. It offers the
9218 following advantages over using string objects:
9219
9220 @enumerate
9221 @item No more cumbersome use of os and os.path functions. Everything can
9222 be done easily through operators, attribute accesses, and method calls.
9223 @item Embodies the semantics of different path types. For example,
9224 comparing Windows paths ignores casing.
9225 @item Well-defined semantics, eliminating any inconsistencies or
9226 ambiguities (forward vs. backward slashes, etc.).
9227 @end enumerate")
9228 (license license:expat)))
9229
9230 (define-public python-jellyfish
9231 (package
9232 (name "python-jellyfish")
9233 (version "0.5.3")
9234 (source (origin
9235 (method url-fetch)
9236 (uri (pypi-uri "jellyfish" version))
9237 (sha256
9238 (base32
9239 "12bxh8cy9xmvyrjz7aw159nd5pyvb645rkvw4r6bvm4xbvs8gd07"))))
9240 (build-system python-build-system)
9241 (native-inputs
9242 `(("python-pytest" ,python-pytest)))
9243 (home-page "https://github.com/jamesturk/jellyfish")
9244 (synopsis "Approximate and phonetic matching of strings")
9245 (description "Jellyfish uses a variety of string comparison and phonetic
9246 encoding algorithms to do fuzzy string matching.")
9247 (license license:bsd-2)
9248 (properties `((python2-variant . ,(delay python2-jellyfish))))))
9249
9250 (define-public python2-jellyfish
9251 (let ((jellyfish (package-with-python2
9252 (strip-python2-variant python-jellyfish))))
9253 (package (inherit jellyfish)
9254 (native-inputs `(("python2-unicodecsv" ,python2-unicodecsv)
9255 ,@(package-native-inputs jellyfish))))))
9256
9257 (define-public python2-unicodecsv
9258 (package
9259 (name "python2-unicodecsv")
9260 (version "0.14.1")
9261 (source (origin
9262 (method url-fetch)
9263 ;; The test suite is not included in the PyPi release.
9264 ;; https://github.com/jdunck/python-unicodecsv/issues/19
9265 (uri (string-append "https://github.com/jdunck/python-unicodecsv/"
9266 "archive/" version ".tar.gz"))
9267 (file-name (string-append name "-" version ".tar.gz"))
9268 (sha256
9269 (base32
9270 "087nqanfcyp6mlfbbr5lva5f3w6iz1bybls9xlrb8icmc474wh4w"))))
9271 (build-system python-build-system)
9272 (arguments
9273 `(;; It supports Python 3, but Python 3 can already do Unicode CSV.
9274 #:python ,python-2))
9275 (native-inputs
9276 `(("python2-unittest2" ,python2-unittest2)))
9277 (home-page "https://github.com/jdunck/python-unicodecsv")
9278 (synopsis "Unicode CSV module for Python 2")
9279 (description "Unicodecsv is a drop-in replacement for Python 2.7's CSV
9280 module, adding support for Unicode strings.")
9281 (license license:bsd-2)))
9282
9283 (define-public python-rarfile
9284 (package
9285 (name "python-rarfile")
9286 (version "2.7")
9287 (source (origin
9288 (method url-fetch)
9289 (uri (pypi-uri "rarfile" version))
9290 (sha256
9291 (base32
9292 "0d8n1dlpiz7av8dmbp0vclrwl9cnxizr4f2c9xvj1h5nvn480527"))
9293 ;; https://github.com/markokr/rarfile/pull/17/
9294 (patches (search-patches "python-rarfile-fix-tests.patch"))))
9295 (build-system python-build-system)
9296 (arguments
9297 '(#:phases
9298 (modify-phases %standard-phases
9299 (replace 'check
9300 ;; Many tests fail, but the installation proceeds.
9301 (lambda _ (zero? (system* "make" "-C" "test" "test")))))))
9302 (native-inputs
9303 `(("which" ,which))) ; required for tests
9304 (propagated-inputs
9305 `(("libarchive" ,libarchive)))
9306 (home-page "https://github.com/markokr/rarfile")
9307 (synopsis "RAR archive reader for Python")
9308 (description "This is Python module for RAR archive reading. The interface
9309 is made as zipfile like as possible.")
9310 (license license:isc)))
9311
9312 (define-public python2-rarfile
9313 (package-with-python2 python-rarfile))
9314
9315 (define-public python-magic
9316 (package
9317 (name "python-magic")
9318 (version "0.4.3")
9319 (source
9320 (origin
9321 (method url-fetch)
9322 (uri (string-append "https://github.com/ahupp/python-magic/archive/"
9323 version ".tar.gz"))
9324 (sha256
9325 (base32
9326 "17bgy92i7sb021f2s4mw1dcvpm6p1mi9jihridwy1pyn8mzvpjgk"))
9327 (file-name (string-append name "-" version "-checkout"))))
9328 (build-system python-build-system)
9329 (arguments
9330 ;; The tests are unreliable, so don't run them. The tests fail
9331 ;; under Python3 because they were written for Python2 and
9332 ;; contain import statements that do not work in Python3. One of
9333 ;; the tests fails under Python2 because its assertions are
9334 ;; overly stringent; it relies on comparing output strings which
9335 ;; are brittle and can change depending on the version of
9336 ;; libmagic being used and the system on which the test is
9337 ;; running. In my case, under GuixSD 0.10.0, only one test
9338 ;; failed, and it seems to have failed only because the version
9339 ;; of libmagic that is packaged in Guix outputs a slightly
9340 ;; different (but not wrong) string than the one that the test
9341 ;; expected.
9342 '(#:tests? #f
9343 #:phases (modify-phases %standard-phases
9344 ;; Replace a specific method call with a hard-coded
9345 ;; path to the necessary libmagic.so file in the
9346 ;; store. If we don't do this, then the method call
9347 ;; will fail to find the libmagic.so file, which in
9348 ;; turn will cause any application using
9349 ;; python-magic to fail.
9350 (add-before 'build 'hard-code-path-to-libmagic
9351 (lambda* (#:key inputs #:allow-other-keys)
9352 (let ((file (assoc-ref inputs "file")))
9353 (substitute* "magic.py"
9354 (("ctypes.util.find_library\\('magic'\\)")
9355 (string-append "'" file "/lib/libmagic.so'")))
9356 #t)))
9357 (add-before 'install 'disable-egg-compression
9358 (lambda _
9359 (let ((port (open-file "setup.cfg" "a")))
9360 (display "\n[easy_install]\nzip_ok = 0\n"
9361 port)
9362 (close-port port)
9363 #t))))))
9364 (inputs
9365 ;; python-magic needs to be able to find libmagic.so.
9366 `(("file" ,file)))
9367 (home-page "https://github.com/ahupp/python-magic")
9368 (synopsis "File type identification using libmagic")
9369 (description
9370 "This module uses ctypes to access the libmagic file type
9371 identification library. It makes use of the local magic database and
9372 supports both textual and MIME-type output. Note that this module and
9373 the python-file module both provide a \"magic.py\" file; these two
9374 modules, which are different and were developed separately, both serve
9375 the same purpose: to provide Python bindings for libmagic.")
9376 (license license:expat)))
9377
9378 (define-public python2-magic
9379 (package-with-python2 python-magic))
9380
9381 (define-public python2-s3cmd
9382 (package
9383 (name "python2-s3cmd")
9384 (version "1.6.1")
9385 (source
9386 (origin
9387 (method url-fetch)
9388 (uri (string-append "mirror://sourceforge/s3tools/s3cmd/" version "/"
9389 "s3cmd-" version ".tar.gz"))
9390 (sha256
9391 (base32
9392 "0ki1rzhm5icvi9ry5jswi4b22yqwyj0d2wsqsgilwx6qhi7pjxa6"))))
9393 (build-system python-build-system)
9394 (arguments
9395 ;; s3cmd is written for python2 only and contains no tests.
9396 `(#:python ,python-2
9397 #:tests? #f))
9398 (propagated-inputs
9399 `(("python2-dateutil" ,python2-dateutil)
9400 ;; The python-file package also provides a magic.py module.
9401 ;; This is an unfortunate state of affairs; however, s3cmd
9402 ;; fails to install if it cannot find specifically the
9403 ;; python-magic package. Thus we include it, instead of using
9404 ;; python-file. Ironically, s3cmd sometimes works better
9405 ;; without libmagic bindings at all:
9406 ;; https://github.com/s3tools/s3cmd/issues/198
9407 ("python2-magic" ,python2-magic)))
9408 (home-page "http://s3tools.org/s3cmd")
9409 (synopsis "Command line tool for S3-compatible storage services")
9410 (description
9411 "S3cmd is a command line tool for uploading, retrieving and managing data
9412 in storage services that are compatible with the Amazon Simple Storage
9413 Service (S3) protocol, including S3 itself. It supports rsync-like backup,
9414 GnuPG encryption, and more. It also supports management of Amazon's
9415 CloudFront content delivery network.")
9416 (license license:gpl2+)))
9417
9418 (define-public python-pkgconfig
9419 (package
9420 (name "python-pkgconfig")
9421 (version "1.1.0")
9422 (source
9423 (origin
9424 (method url-fetch)
9425 (uri (pypi-uri "pkgconfig" version))
9426 (sha256
9427 (base32
9428 "1pw0kmvc57sjmaxi6c54fqsnihqj6hvhc9y1vaz36axafzqam7bh"))))
9429 (build-system python-build-system)
9430 (native-inputs
9431 `(("python-nose" ,python-nose)))
9432 (inputs
9433 `(("pkg-config" ,pkg-config)))
9434 (arguments
9435 `(;; Tests fail with "ValueError: _type_ 'v' not supported" on Python 3,
9436 ;; and on Python 2 they need the dl module deprecated since Python 2.6.
9437 #:tests? #f
9438 ;; Hard-code the path to pkg-config.
9439 #:phases
9440 (modify-phases %standard-phases
9441 (add-before
9442 'build 'patch
9443 (lambda _
9444 (substitute* "pkgconfig/pkgconfig.py"
9445 (("cmd = 'pkg-config")
9446 (string-append "cmd = '" (which "pkg-config"))))
9447 #t)))))
9448 (home-page "http://github.com/matze/pkgconfig")
9449 (synopsis "Python interface for pkg-config")
9450 (description "This module provides a Python interface to pkg-config. It
9451 can be used to find all pkg-config packages, check if a package exists,
9452 check if a package meets certain version requirements, query CFLAGS and
9453 LDFLAGS and parse the output to build extensions with setup.py.")
9454 (license license:expat)))
9455
9456 (define-public python2-pkgconfig
9457 (package-with-python2 python-pkgconfig))
9458
9459 (define-public python-bz2file
9460 (package
9461 (name "python-bz2file")
9462 (version "0.98")
9463 (source
9464 (origin
9465 (method url-fetch)
9466 (uri (pypi-uri "bz2file" version))
9467 (sha256
9468 (base32
9469 "126s53fkpx04f33a829yqqk8fj4png3qwg4m66cvlmhmwc8zihb4"))))
9470 (build-system python-build-system)
9471 (arguments
9472 `(#:tests? #f)) ; Tests use deprecated python modules.
9473 (home-page "https://github.com/nvawda/bz2file")
9474 (synopsis "Read and write bzip2-compressed files")
9475 (description
9476 "Bz2file is a Python library for reading and writing bzip2-compressed
9477 files. It contains a drop-in replacement for the I/O interface in the
9478 standard library's @code{bz2} module, including features from the latest
9479 development version of CPython that are not available in older releases.")
9480 (license license:asl2.0)
9481 (properties `((python2-variant . ,(delay python2-bz2file))))))
9482
9483 (define-public python2-bz2file
9484 (let ((base (package-with-python2
9485 (strip-python2-variant python-bz2file))))
9486 (package
9487 (inherit base)
9488 (arguments
9489 `(#:python ,python-2
9490 #:phases
9491 (modify-phases %standard-phases
9492 ;; 'python setup.py test' does not work as of 0.98.
9493 ;; There is only the one test file, so we run it directly.
9494 (replace 'check
9495 (lambda _ (zero? (system* "python"
9496 "test_bz2file.py"))))))))))
9497
9498 (define-public python-future
9499 (package
9500 (name "python-future")
9501 (version "0.15.2")
9502 (source
9503 (origin
9504 (method url-fetch)
9505 (uri (pypi-uri "future" version))
9506 (sha256
9507 (base32
9508 "15wvcfzssc68xqnqi1dq4fhd0848hwi9jn42hxyvlqna40zijfrx"))))
9509 (build-system python-build-system)
9510 ;; Many tests connect to the network or are otherwise flawed.
9511 ;; https://github.com/PythonCharmers/python-future/issues/210
9512 (arguments
9513 `(#:tests? #f))
9514 (home-page "http://python-future.org")
9515 (synopsis "Single-source support for Python 3 and 2")
9516 (description
9517 "@code{python-future} is the missing compatibility layer between Python 2 and
9518 Python 3. It allows you to use a single, clean Python 3.x-compatible codebase
9519 to support both Python 2 and Python 3 with minimal overhead.")
9520 (license license:expat)))
9521
9522 (define-public python2-future
9523 (package-with-python2 python-future))
9524
9525 (define-public python-cysignals
9526 (package
9527 (name "python-cysignals")
9528 (version "1.1.0")
9529 (source
9530 (origin
9531 (method url-fetch)
9532 (uri (pypi-uri "cysignals" version ".tar.bz2"))
9533 (sha256
9534 (base32
9535 "14cbyd9znlz6cxy1s3g6v6dv5jj45hn27pywkidd9b1zanaysqc6"))))
9536 (build-system python-build-system)
9537 (native-inputs
9538 `(("python-cython" ,python-cython)
9539 ("python-sphinx" ,python-sphinx)))
9540 (inputs
9541 `(("pari-gp" ,pari-gp)))
9542 (arguments
9543 `(#:modules ((guix build python-build-system)
9544 ((guix build gnu-build-system) #:prefix gnu:)
9545 (guix build utils))
9546 ;; FIXME: Tests are executed after installation and currently fail
9547 ;; when not installing into standard locations; the author is working
9548 ;; on a fix.
9549 #:tests? #f
9550 #:phases
9551 (modify-phases %standard-phases
9552 (add-before
9553 'build 'configure
9554 (assoc-ref gnu:%standard-phases 'configure)))))
9555 (home-page
9556 "https://github.com/sagemath/cysignals")
9557 (synopsis
9558 "Handling of interrupts and signals for Cython")
9559 (description
9560 "The cysignals package provides mechanisms to handle interrupts (and
9561 other signals and errors) in Cython code, using two related approaches,
9562 for mixed Cython/Python code or external C libraries and pure Cython code,
9563 respectively.")
9564 (license license:lgpl3+)))
9565
9566 (define-public python2-cysignals
9567 (package-with-python2 python-cysignals))
9568
9569 (define-public python2-shedskin
9570 (package
9571 (name "python2-shedskin")
9572 (version "0.9.4")
9573 (source
9574 (origin
9575 (method url-fetch)
9576 (uri (string-append "https://github.com/shedskin/shedskin/"
9577 "releases/download/v" version
9578 "/shedskin-" version ".tgz"))
9579 (sha256
9580 (base32
9581 "0nzwrzgw1ga8rw6f0ryq7zr9kkiavd1cqz5hzxkcbicl1dk7kz41"))))
9582 (build-system python-build-system)
9583 (arguments
9584 `(#:python ,python-2
9585 #:phases (modify-phases %standard-phases
9586 (add-after 'unpack 'fix-resulting-include-libs
9587 (lambda* (#:key inputs #:allow-other-keys)
9588 (let ((libgc (assoc-ref inputs "libgc"))
9589 (pcre (assoc-ref inputs "pcre")))
9590 (substitute* "shedskin/makefile.py"
9591 (("variable == 'CCFLAGS':[ ]*")
9592 (string-append "variable == 'CCFLAGS':\n"
9593 " line += ' -I " pcre "/include"
9594 " -I " libgc "/include'"))
9595 (("variable == 'LFLAGS':[ ]*")
9596 (string-append "variable == 'LFLAGS':\n"
9597 " line += ' -L" pcre "/lib"
9598 " -L " libgc "/lib'")))
9599 #t))))))
9600 (inputs `(("pcre" ,pcre)
9601 ("libgc" ,libgc)))
9602 (home-page "https://shedskin.github.io/")
9603 (synopsis "Experimental Python-2 to C++ Compiler")
9604 (description (string-append "This is an experimental compiler for a subset of
9605 Python. It generates C++ code and a Makefile."))
9606 (license (list license:gpl3 license:bsd-3 license:expat))))
9607
9608 (define-public python2-rope
9609 (package
9610 (name "python2-rope")
9611 (version "0.10.3")
9612 (source
9613 (origin
9614 (method url-fetch)
9615 (uri (pypi-uri "rope" version))
9616 (sha256
9617 (base32
9618 "18k5znhpwvrfck3yp0jmhd5j8r0f0s8bk1zh5yhs2cfgmfhbwigb"))))
9619 (arguments
9620 ;; Rope is currently python-2 only.
9621 ;; https://github.com/python-rope/rope/issues/57
9622 `(#:python ,python-2))
9623 (build-system python-build-system)
9624 (native-inputs
9625 `(("python2-unittest2" ,python2-unittest2)))
9626 (home-page "https://github.com/python-rope/rope")
9627 (synopsis "Refactoring library for Python")
9628 (description "Rope is a refactoring library for Python. It facilitates
9629 the renaming, moving and extracting of attributes, functions, modules, fields
9630 and parameters in Python 2 source code. These refactorings can also be applied
9631 to occurences in strings and comments.")
9632 (license license:gpl2)))
9633
9634 (define-public python-py3status
9635 (package
9636 (name "python-py3status")
9637 (version "3.1")
9638 (source
9639 (origin
9640 (method url-fetch)
9641 (uri (pypi-uri "py3status" version))
9642 (sha256
9643 (base32
9644 "0i283z1pivmir61z8kbiycigc94l61v33ygzkhczf1ifq7cppyds"))))
9645 (build-system python-build-system)
9646 (home-page "https://github.com/ultrabug/py3status")
9647 (synopsis "Extensible i3status wrapper written in Python")
9648 (description "py3status is an i3status wrapper which extends i3status
9649 functionality in a modular way, allowing you to extend your panel with your
9650 own code, responding to click events and updating clock every second.")
9651 (license license:bsd-3)))
9652
9653 (define-public python-tblib
9654 (package
9655 (name "python-tblib")
9656 (version "1.3.0")
9657 (source (origin
9658 (method url-fetch)
9659 (uri (pypi-uri "tblib" version))
9660 (sha256 (base32
9661 "02iahfkfa927hb4jq2bak36ldihwapzacfiq5lyxg8llwn98a1yi"))))
9662 (build-system python-build-system)
9663 (arguments
9664 `(#:phases
9665 (modify-phases %standard-phases
9666 (replace 'check
9667 (lambda _
9668 ;; Upstream runs tests after installation and the package itself
9669 ;; resides in a subdirectory. Extend PYTHONPATH so it will be
9670 ;; found.
9671 (setenv "PYTHONPATH"
9672 (string-append (getcwd) "/build/lib:"
9673 (getenv "PYTHONPATH")))
9674 (zero? (system* "py.test" "-vv" "tests" "README.rst")))))))
9675 (native-inputs
9676 `(("python-pytest" ,python-pytest)
9677 ("python-six" ,python-six)))
9678 (home-page "https://github.com/ionelmc/python-tblib")
9679 (synopsis "Traceback serialization library")
9680 (description
9681 "Traceback serialization allows you to:
9682
9683 @enumerate
9684 @item Pickle tracebacks and raise exceptions with pickled tracebacks in
9685 different processes. This allows better error handling when running code over
9686 multiple processes (imagine multiprocessing, billiard, futures, celery etc).
9687
9688 @item Parse traceback strings and raise with the parsed tracebacks.
9689 @end itemize")
9690 (license license:bsd-3)))
9691
9692 (define-public python2-tblib
9693 (package-with-python2 python-tblib))
9694
9695 (define-public python-sqlparse
9696 (package
9697 (name "python-sqlparse")
9698 (version "0.1.19")
9699 (source (origin
9700 (method url-fetch)
9701 (uri (pypi-uri "sqlparse" version))
9702 (sha256
9703 (base32
9704 "1s2fvaxgh9kqzrd6iwy5h7i61ckn05plx9np13zby93z3hdbx5nq"))))
9705 (build-system python-build-system)
9706 (arguments
9707 `(#:phases
9708 (modify-phases %standard-phases
9709 (replace 'check
9710 (lambda* _
9711 ;; setup.py-integrated 2to3 only affects the build files, but
9712 ;; py.test is using the source files. So we need to convert them
9713 ;; manually.
9714 (when (zero? (system* "python3"))
9715 (system* "2to3" "--no-diff" "-wn" "sqlparse" "tests"))
9716 (zero? (system* "py.test")))))))
9717 (native-inputs
9718 `(("python-pytest" ,python-pytest)))
9719 (home-page "https://github.com/andialbrecht/sqlparse")
9720 (synopsis "Non-validating SQL parser")
9721 (description "Sqlparse is a non-validating SQL parser for Python. It
9722 provides support for parsing, splitting and formatting SQL statements.")
9723 (license license:bsd-3)))
9724
9725 (define-public python2-sqlparse
9726 (package-with-python2 python-sqlparse))
9727
9728 (define-public python-greenlet
9729 (package
9730 (name "python-greenlet")
9731 (version "0.4.9")
9732 (source (origin
9733 (method url-fetch)
9734 (uri (pypi-uri "greenlet" version))
9735 (sha256
9736 (base32
9737 "04h0m54dyqg49vyarq26mry6kbivnpl47rnmmrk9qn8wpfxviybr"))))
9738 (build-system python-build-system)
9739 (home-page "https://greenlet.readthedocs.io/")
9740 (synopsis "Lightweight in-process concurrent programming")
9741 (description
9742 "Greenlet package is a spin-off of Stackless, a version of CPython
9743 that supports micro-threads called \"tasklets\". Tasklets run
9744 pseudo-concurrently (typically in a single or a few OS-level threads) and
9745 are synchronized with data exchanges on \"channels\".")
9746 (license (list license:psfl license:expat))))
9747
9748 (define-public python2-greenlet
9749 (package-with-python2 python-greenlet))
9750
9751 (define-public python-gevent
9752 (package
9753 (name "python-gevent")
9754 (version "1.1.1")
9755 (source (origin
9756 (method url-fetch)
9757 (uri (pypi-uri "gevent" version))
9758 (sha256
9759 (base32
9760 "1smf3kvidpdiyi2c81alal74p2zm0clrm6xbyy6y1k9a3f2vkrbf"))
9761 (modules '((guix build utils)))
9762 (snippet
9763 '(begin
9764 ;; unbunding libev and c-ares
9765 (for-each delete-file-recursively '("libev" "c-ares"))
9766 ;; fixing testsuite
9767 (call-with-output-file "greentest/__init__.py" noop)
9768 (substitute* "greentest/testrunner.py"
9769 (("import util") "from . import util")
9770 (("from util import log") "from .util import log"))))))
9771 (build-system python-build-system)
9772 (propagated-inputs
9773 `(("python-greenlet" ,python-greenlet)))
9774 (native-inputs
9775 `(("python-six" ,python-six)))
9776 (inputs
9777 `(("c-ares" ,c-ares)
9778 ("libev" ,libev)))
9779 (home-page "http://www.gevent.org/")
9780 (synopsis "Coroutine-based network library")
9781 (description
9782 "gevent is a coroutine-based Python networking library that uses greenlet
9783 to provide a high-level synchronous API on top of the libev event loop.")
9784 (license license:expat)))
9785
9786 (define-public python2-gevent
9787 (package-with-python2 python-gevent))
9788
9789 (define-public python-twisted
9790 (package
9791 (name "python-twisted")
9792 (version "16.2.0")
9793 (source (origin
9794 (method url-fetch)
9795 (uri (pypi-uri "Twisted" version ".tar.bz2"))
9796 (sha256
9797 (base32
9798 "0ydxrp9myw1mvsz3qfzx5579y5llmqa82pxvqchgp5syczffi450"))))
9799 (build-system python-build-system)
9800 (propagated-inputs
9801 `(("python-zope-interface" ,python-zope-interface)))
9802 (home-page "https://twistedmatrix.com/")
9803 (synopsis "Asynchronous networking framework written in Python")
9804 (description
9805 "Twisted is an extensible framework for Python programming, with special
9806 focus on event-based network programming and multiprotocol integration.")
9807 (license license:expat)))
9808
9809 (define-public python2-twisted
9810 (package-with-python2 python-twisted))
9811
9812 (define-public python-pika
9813 (package
9814 (name "python-pika")
9815 (version "0.10.0")
9816 (source
9817 (origin
9818 (method url-fetch)
9819 (uri (pypi-uri "pika" version))
9820 (sha256
9821 (base32
9822 "0nb4h08di432lv7dy2v9kpwgk0w92f24sqc2hw2s9vwr5b8v8xvj"))))
9823 (build-system python-build-system)
9824 (native-inputs
9825 `(("python-pyev" ,python-pyev)
9826 ("python-tornado" ,python-tornado)
9827 ("python-twisted" ,python-twisted)))
9828 (home-page "https://pika.readthedocs.org")
9829 (synopsis "Pure Python AMQP Client Library")
9830 (description
9831 "Pika is a pure-Python implementation of the AMQP (Advanced Message Queuing
9832 Protocol) 0-9-1 protocol that tries to stay fairly independent of the underlying
9833 network support library.")
9834 (license license:bsd-3)))
9835
9836 (define-public python2-pika
9837 (package-with-python2 python-pika))
9838
9839 (define-public python-ply
9840 (package
9841 (name "python-ply")
9842 (version "3.8")
9843 (source
9844 (origin
9845 (method url-fetch)
9846 (uri (string-append
9847 "https://pypi.python.org/packages/"
9848 "96/e0/430fcdb6b3ef1ae534d231397bee7e9304be14a47a267e82ebcb3323d0b5"
9849 "/ply-" version ".tar.gz"))
9850 (sha256
9851 (base32
9852 "1f70ipynmiy09k6px2j7v4w5cdrc21za3xs2k6f1bsvb0bzvvlg7"))))
9853 (build-system python-build-system)
9854 (home-page "http://www.dabeaz.com/ply/")
9855 (synopsis "Python Lex & Yacc")
9856 (description "PLY is a @code{lex}/@code{yacc} implemented purely in Python.
9857 It uses LR parsing and does extensive error checking.")
9858 (license license:bsd-3)))
9859
9860 (define-public python2-ply
9861 (package-with-python2 python-ply))
9862
9863 (define-public python-tabulate
9864 (package
9865 (name "python-tabulate")
9866 (version "0.7.5")
9867 (source (origin
9868 (method url-fetch)
9869 (uri (pypi-uri "tabulate" version))
9870 (sha256
9871 (base32
9872 "03l1r7ddd1a0j2snv1yd0hlnghjad3fg1an1jr8936ksv75slwch"))
9873 ;; Fix tests
9874 (modules '((guix build utils)))
9875 (snippet '(substitute* '("test/test_cli.py"
9876 "test/test_input.py"
9877 "test/test_output.py"
9878 "test/test_regression.py")
9879 (("from common") "from nose.tools")))))
9880 (build-system python-build-system)
9881 (native-inputs
9882 `(;; For testing
9883 ("python-nose" ,python-nose)))
9884 (home-page "https://bitbucket.org/astanin/python-tabulate")
9885 (synopsis "Pretty-print tabular data")
9886 (description
9887 "Tabulate is a library and command-line utility to pretty-print tabular
9888 data in Python.")
9889 (license license:expat)))
9890
9891 (define-public python2-tabulate
9892 (package-with-python2 python-tabulate))
9893
9894 (define-public python-kazoo
9895 (package
9896 (name "python-kazoo")
9897 (version "2.2.1")
9898 (source
9899 (origin
9900 (method url-fetch)
9901 (uri (pypi-uri "kazoo" version))
9902 (sha256
9903 (base32
9904 "10pb864if9qi2pq9lfb9m8f7z7ss6rml80gf1d9h64lap5crjnjj"))))
9905 (build-system python-build-system)
9906 (arguments '(#:tests? #f)) ; XXX: needs zookeeper
9907 (propagated-inputs
9908 `(("python-six" ,python-six)))
9909 (home-page "https://kazoo.readthedocs.org")
9910 (synopsis "High-level Zookeeper client library")
9911 (description
9912 "Kazoo is a Python client library for the Apache Zookeeper distributed
9913 application service. It is designed to be easy to use and to avoid common
9914 programming errors.")
9915 (license license:asl2.0)))
9916
9917 (define-public python2-kazoo
9918 (package-with-python2 python-kazoo))
9919
9920 (define-public python-pykafka
9921 (package
9922 (name "python-pykafka")
9923 (version "2.4.0")
9924 (source (origin
9925 (method url-fetch)
9926 (uri (string-append
9927 "https://pypi.python.org/packages/8b/3e/"
9928 "384eeff406b06315738b62483fd2126c6e4f544167116b17cc04ea7d2a59/"
9929 "pykafka-" version ".tar.gz"))
9930 (sha256
9931 (base32
9932 "1id6sr159p6aa13bxcqyr9gln8sqg1l0ddzns5iws8kk5q1p5cfv"))))
9933 (build-system python-build-system)
9934 (arguments '(#:tests? #f)) ; XXX: needs zookeeper, kafka, etc.
9935 (propagated-inputs
9936 `(("python-gevent" ,python-gevent)
9937 ("python-kazoo" ,python-kazoo)
9938 ("python-tabulate" ,python-tabulate)))
9939 (inputs
9940 `(("librdkafka" ,librdkafka)))
9941 (home-page "https://pykafka.readthedocs.io/")
9942 (synopsis "Apache Kafka client for Python")
9943 (description
9944 "PyKafka is a client for the Apache Kafka distributed messaging system.
9945 It includes Python implementations of Kafka producers and consumers, which
9946 are optionally backed by a C extension built on librdkafka.")
9947 (license license:asl2.0)))
9948
9949 (define-public python2-pykafka
9950 (package-with-python2 python-pykafka))
9951
9952 (define-public python-wcwidth
9953 (package
9954 (name "python-wcwidth")
9955 (version "0.1.6")
9956 (source
9957 (origin
9958 (method url-fetch)
9959 (uri (string-append
9960 "https://pypi.python.org/packages/"
9961 "c2/d1/7689293086a8d5320025080cde0e3155b94ae0a7496fb89a3fbaa92c354a/"
9962 "wcwidth-" version ".tar.gz"))
9963 (sha256
9964 (base32
9965 "02wjrpf001gjdjsaxxbzcwfg19crlk2dbddayrfc2v06f53yrcyw"))))
9966 (build-system python-build-system)
9967 (home-page "https://github.com/jquast/wcwidth")
9968 (synopsis "Measure number of terminal column cells of wide-character codes")
9969 (description "Wcwidth measures the number of terminal column cells of
9970 wide-character codes. It is useful for those implementing a terminal emulator,
9971 or programs that carefully produce output to be interpreted by one. It is a
9972 Python implementation of the @code{wcwidth} and @code{wcswidth} C functions
9973 specified in POSIX.1-2001 and POSIX.1-2008.")
9974 (license license:expat)))
9975
9976 (define-public python2-wcwidth
9977 (package-with-python2 python-wcwidth))
9978
9979 (define-public python2-jsonrpclib
9980 (package
9981 (name "python2-jsonrpclib")
9982 (version "0.1.7")
9983 (source (origin
9984 (method url-fetch)
9985 (uri (string-append
9986 "https://pypi.python.org/packages/source/j/jsonrpclib/"
9987 "jsonrpclib-" version ".tar.gz"))
9988 (sha256
9989 (base32
9990 "02vgirw2bcgvpcxhv5hf3yvvb4h5wzd1lpjx8na5psdmaffj6l3z"))))
9991 (build-system python-build-system)
9992 (arguments
9993 `(#:tests? #f
9994 #:python ,python-2))
9995 (home-page "https://github.com/joshmarshall/jsonrpclib/")
9996 (synopsis "Implementation of JSON-RPC specification for Python")
9997 (description
9998 "This library is an implementation of the JSON-RPC specification.
9999 It supports both the original 1.0 specification, as well as the
10000 new (proposed) 2.0 spec, which includes batch submission, keyword arguments,
10001 etc.")
10002 (license license:asl2.0)))
10003
10004 (define-public python-chai
10005 (package
10006 (name "python-chai")
10007 (version "1.1.1")
10008 (source (origin
10009 (method url-fetch)
10010 (uri (pypi-uri "chai" version))
10011 (sha256
10012 (base32
10013 "016kf3irrclpkpvcm7q0gmkfibq7jgy30a9v73pp42bq9h9a32bl"))))
10014 (build-system python-build-system)
10015 (home-page "https://github.com/agoragames/chai")
10016 (synopsis "Mocking framework for Python")
10017 (description
10018 "Chai provides an api for mocking, stubbing and spying your python
10019 objects, patterned after the Mocha library for Ruby.")
10020 (license license:bsd-3)))
10021
10022 (define-public python2-chai
10023 (package-with-python2 python-chai))
10024
10025 (define-public python-arrow
10026 (package
10027 (name "python-arrow")
10028 (version "0.8.0")
10029 (source (origin
10030 (method url-fetch)
10031 (uri (pypi-uri "arrow" version))
10032 (sha256
10033 (base32
10034 "1bz7hkdgpqcjs866y58z8jywpy7al0f4rxdr00bh2l5qddyw245j"))))
10035 (build-system python-build-system)
10036 (native-inputs
10037 `(;; For testing
10038 ("python-chai" ,python-chai)
10039 ("python-simplejson" ,python-simplejson)))
10040 (propagated-inputs
10041 `(("python-dateutil" ,python-dateutil-2)))
10042 (home-page "https://github.com/crsmithdev/arrow/")
10043 (synopsis "Dates and times for Python")
10044 (description
10045 "Arrow is a Python library to creating, manipulating, formatting and
10046 converting dates, times, and timestamps. It implements and updates the
10047 datetime type.")
10048 (license license:asl2.0)))
10049
10050 (define-public python2-arrow
10051 (package-with-python2 python-arrow))
10052
10053 (define-public python-inflection
10054 (package
10055 (name "python-inflection")
10056 (version "0.3.1")
10057 (source
10058 (origin (method url-fetch)
10059 (uri (pypi-uri "inflection" version))
10060 (sha256
10061 (base32
10062 "1jhnxgnw8y3mbzjssixh6qkc7a3afc4fygajhqrqalnilyvpzshq"))))
10063 (build-system python-build-system)
10064 (home-page "http://github.com/jpvanhal/inflection")
10065 (synopsis "Python string transformation library")
10066 (description
10067 "Inflection is a string transformation library. It singularizes
10068 and pluralizes English words, and transforms strings from CamelCase to
10069 underscored string.")
10070 (license license:expat)))
10071
10072 (define-public python2-inflection
10073 (package-with-python2 python-inflection))
10074
10075 (define-public python-pylev
10076 (package
10077 (name "python-pylev")
10078 (version "1.3.0")
10079 (source (origin
10080 (method url-fetch)
10081 (uri (pypi-uri "pylev" version))
10082 (sha256
10083 (base32
10084 "1hz1x9blsbxya1y9nnhnwwdnqmakxi9mc0jkwj0rn6b1h44i0f86"))))
10085 (build-system python-build-system)
10086 (home-page "http://github.com/toastdriven/pylev")
10087 (synopsis "Levenshtein distance implementation in Python")
10088 (description "Pure Python Levenshtein implementation, based off the
10089 Wikipedia code samples at
10090 @url{http://en.wikipedia.org/wiki/Levenshtein_distance}.")
10091 (license license:bsd-3)))
10092
10093 (define-public python2-pylev
10094 (package-with-python2 python-pylev))
10095
10096 (define-public python-cleo
10097 (package
10098 (name "python-cleo")
10099 (version "0.4.1")
10100 (source (origin
10101 (method url-fetch)
10102 (uri (pypi-uri "cleo" version))
10103 (sha256
10104 (base32
10105 "1k2dcl6mqpn5bljyl6w42rqyd9mb3y9kh2mg7m2x3kfjwvg0rpva"))))
10106 (build-system python-build-system)
10107 (native-inputs
10108 `(;; For testing
10109 ("python-mock" ,python-mock)
10110 ("python-pytest" ,python-pytest)))
10111 (propagated-inputs
10112 `(("python-psutil" ,python-psutil)
10113 ("python-pylev" ,python-pylev)))
10114 (home-page "https://github.com/sdispater/cleo")
10115 (synopsis "Command-line arguments library for Python")
10116 (description
10117 "Cleo allows you to create command-line commands with signature in
10118 docstring and colored output.")
10119 (license license:expat)))
10120
10121 (define-public python2-cleo
10122 (package-with-python2 python-cleo))
10123
10124 (define-public python-lazy-object-proxy
10125 (package
10126 (name "python-lazy-object-proxy")
10127 (version "1.2.2")
10128 (source (origin
10129 (method url-fetch)
10130 (uri (pypi-uri "lazy-object-proxy" version))
10131 (sha256
10132 (base32
10133 "0s22aqqkdscyh8sjspyyax7qa1aiz8p4midrnyf39717fhfczm6x"))))
10134 (build-system python-build-system)
10135 (home-page "https://github.com/ionelmc/python-lazy-object-proxy")
10136 (synopsis "Lazy object proxy for python")
10137 (description
10138 "Lazy object proxy is an object that wraps a callable but defers the call
10139 until the object is actually required, and caches the result of said call.")
10140 (license license:bsd-2)))
10141
10142 (define-public python2-lazy-object-proxy
10143 (package-with-python2 python-lazy-object-proxy))
10144
10145 (define-public python-dnspython
10146 (package
10147 (name "python-dnspython")
10148 (version "1.15.0")
10149 (source (origin
10150 (method url-fetch)
10151 (uri (string-append "http://www.dnspython.org/kits/"
10152 version "/dnspython-" version ".tar.gz"))
10153 (sha256
10154 (base32
10155 "0jr4v2pd90i6l1xxbss2m05psbjaxvyvvvpq44wycijpfgjqln8i"))))
10156 (build-system python-build-system)
10157 (arguments '(#:tests? #f)) ; XXX: requires internet access
10158 (home-page "http://www.dnspython.org")
10159 (synopsis "DNS toolkit for Python")
10160 (description
10161 "dnspython is a DNS toolkit for Python. It supports almost all record
10162 types. It can be used for queries, zone transfers, and dynamic updates.
10163 It supports TSIG authenticated messages and EDNS0.")
10164 (license license:expat)))
10165
10166 (define-public python2-dnspython
10167 (package-with-python2 python-dnspython))
10168
10169 (define-public python-email-validator
10170 (package
10171 (name "python-email-validator")
10172 (version "1.0.1")
10173 (source
10174 (origin (method url-fetch)
10175 (uri (pypi-uri "email_validator" version))
10176 (sha256
10177 (base32
10178 "0mn8jg5h8ifl8w6a6m0hq8kbk0mzw9vm054qfamkn89b3npz52qw"))))
10179 (build-system python-build-system)
10180 (arguments
10181 '(#:phases
10182 (modify-phases %standard-phases
10183 (add-before 'build 'use-dnspython
10184 (lambda _
10185 (substitute* "setup.py"
10186 (("dnspython3") "dnspython"))
10187 #t)))))
10188 (propagated-inputs
10189 `(("python-dnspython" ,python-dnspython)
10190 ("python-idna" ,python-idna)))
10191 (home-page "https://github.com/JoshData/python-email-validator")
10192 (synopsis "Email address validation library for Python")
10193 (description
10194 "This library validates email address syntax and deliverability.")
10195 (license license:cc0)))
10196
10197 (define-public python2-email-validator
10198 (package-with-python2 python-email-validator))
10199
10200 (define-public python-ukpostcodeparser
10201 (package
10202 (name "python-ukpostcodeparser")
10203 (version "1.0.3")
10204 (source (origin
10205 (method url-fetch)
10206 (uri (pypi-uri "UkPostcodeParser" version))
10207 (sha256
10208 (base32
10209 "1jwg9z4rz51mcka1821rwgycsd0mcicyp1kiwjfa2kvg8bm9p2qd"))))
10210 (build-system python-build-system)
10211 (home-page "https://github.com/hamstah/ukpostcodeparser")
10212 (synopsis "UK Postcode parser for Python")
10213 (description
10214 "This library provides the @code{parse_uk_postcode} function for
10215 parsing UK postcodes.")
10216 (license license:expat)))
10217
10218 (define-public python2-ukpostcodeparser
10219 (package-with-python2 python-ukpostcodeparser))
10220
10221 (define-public python-fake-factory
10222 (package
10223 (name "python-fake-factory")
10224 (version "0.7.2")
10225 (source (origin
10226 (method url-fetch)
10227 (uri (pypi-uri "fake-factory" version))
10228 (sha256
10229 (base32
10230 "0vs0dkmg0dlaxf8w6q2i3k0i03gmp56ablldv7ci9x3nbadkn71g"))))
10231 (build-system python-build-system)
10232 (native-inputs
10233 `(;; For testing
10234 ("python-email-validator" ,python-email-validator)
10235 ("python-mock" ,python-mock)
10236 ("python-ukpostcodeparser" ,python-ukpostcodeparser)))
10237 (propagated-inputs
10238 `(("python-dateutil" ,python-dateutil-2)
10239 ("python-six" ,python-six)))
10240 (home-page "https://github.com/joke2k/faker")
10241 (synopsis "Python package that generates fake data")
10242 (description
10243 "Faker is a Python package that generates fake data such as names,
10244 addresses, and phone numbers.")
10245 (license license:expat)
10246 (properties `((python2-variant . ,(delay python2-fake-factory))))))
10247
10248 (define-public python2-fake-factory
10249 (let ((base (package-with-python2 (strip-python2-variant
10250 python-fake-factory))))
10251 (package
10252 (inherit base)
10253 (propagated-inputs
10254 `(("python2-ipaddress" ,python2-ipaddress)
10255 ,@(package-propagated-inputs base))))))
10256
10257 (define-public python-pyaml
10258 (package
10259 (name "python-pyaml")
10260 (version "15.8.2")
10261 (source (origin
10262 (method url-fetch)
10263 (uri (pypi-uri "pyaml" version))
10264 (sha256
10265 (base32
10266 "1f5m28vkh4ksq3d80d8mmd2z8wxvc3mgy2pmrv2751dm2xgznm4w"))))
10267 (build-system python-build-system)
10268 (propagated-inputs
10269 `(("python-pyyaml" ,python-pyyaml)))
10270 (home-page "https://github.com/mk-fg/pretty-yaml")
10271 (synopsis "YAML pretty-print library for Python")
10272 (description
10273 "pyaml is a PyYAML based python module to produce pretty and readable
10274 YAML-serialized data.")
10275 (license (license:non-copyleft "http://www.wtfpl.net/txt/copying/"))))
10276
10277 (define-public python2-pyaml
10278 (package-with-python2 python-pyaml))
10279
10280 (define-public python-flexmock
10281 (package
10282 (name "python-flexmock")
10283 (version "0.10.2")
10284 (source (origin
10285 (method url-fetch)
10286 (uri (pypi-uri "flexmock" version))
10287 (sha256
10288 (base32
10289 "0arc6njvs6i9v9hgvzk5m50296g7zy5m9d7pyb43vdsdgxrci5gy"))))
10290 (build-system python-build-system)
10291 (home-page "https://flexmock.readthedocs.org")
10292 (synopsis "Testing library for Python")
10293 (description
10294 "flexmock is a testing library for Python that makes it easy to create
10295 mocks, stubs and fakes.")
10296 (license license:bsd-3)))
10297
10298 (define-public python2-flexmock
10299 (package-with-python2 python-flexmock))
10300
10301 (define-public python-orator
10302 (package
10303 (name "python-orator")
10304 (version "0.8.2")
10305 (source (origin
10306 (method url-fetch)
10307 (uri (pypi-uri "orator" version))
10308 (sha256
10309 (base32
10310 "1li49irsqha17nrda4nsb48biyy0rarp9pphf0jpqwm5zr8hv569"))))
10311 (build-system python-build-system)
10312 (arguments '(#:tests? #f)) ; no tests
10313 (propagated-inputs
10314 `(("python-arrow" ,python-arrow)
10315 ("python-blinker" ,python-blinker)
10316 ("python-cleo" ,python-cleo)
10317 ("python-fake-factory" ,python-fake-factory)
10318 ("python-inflection" ,python-inflection)
10319 ("python-lazy-object-proxy" ,python-lazy-object-proxy)
10320 ("python-pyaml" ,python-pyaml)
10321 ("python-simplejson" ,python-simplejson)
10322 ("python-wrapt" ,python-wrapt)))
10323 (home-page "https://orator-orm.com/")
10324 (synopsis "ActiveRecord ORM for Python")
10325 (description
10326 "Orator provides a simple ActiveRecord-like Object Relational Mapping
10327 implementation for Python.")
10328 (license license:expat)
10329 (properties `((python2-variant . ,(delay python2-orator))))))
10330
10331 (define-public python2-orator
10332 (let ((base (package-with-python2 (strip-python2-variant python-orator))))
10333 (package
10334 (inherit base)
10335 (propagated-inputs
10336 `(("python2-ipaddress" ,python2-ipaddress)
10337 ,@(package-propagated-inputs base))))))
10338
10339 (define-public python-prompt-toolkit
10340 (package
10341 (name "python-prompt-toolkit")
10342 (version "1.0.7")
10343 (source
10344 (origin
10345 (method url-fetch)
10346 (uri (pypi-uri "prompt_toolkit" version ".tar.gz"))
10347 (sha256
10348 (base32
10349 "1vyjd0b7wciv55i19l44zy0adx8q7ss79lhy2r9d1rwz2y4822zg"))))
10350 (build-system python-build-system)
10351 (arguments
10352 '(#:tests? #f)) ; The test suite uses some Windows-specific data types.
10353 (propagated-inputs
10354 `(("python-wcwidth" ,python-wcwidth)
10355 ("python-pygments" ,python-pygments)))
10356 (native-inputs `(("python-six" ,python-six)))
10357 (home-page "https://github.com/jonathanslenders/python-prompt-toolkit")
10358 (synopsis "Library for building command line interfaces in Python")
10359 (description
10360 "Prompt-Toolkit is a library for building interactive command line
10361 interfaces in Python. It's like GNU Readline but it also features syntax
10362 highlighting while typing, out-of-the-box multi-line input editing, advanced
10363 code completion, incremental search, support for Chinese double-width
10364 characters, mouse support, and auto suggestions.")
10365 (license license:bsd-3)))
10366
10367 (define-public python2-prompt-toolkit
10368 (package-with-python2 python-prompt-toolkit))
10369
10370 (define-public python-jedi
10371 (package
10372 (name "python-jedi")
10373 (version "0.9.0")
10374 (source
10375 (origin
10376 (method url-fetch)
10377 (uri (pypi-uri "jedi" version))
10378 (sha256
10379 (base32
10380 "0c8x962ynpx001fdvp07m2q5jk4igkxbj3rmnydavphvlgxijk1v"))))
10381 (build-system python-build-system)
10382 (home-page "https://github.com/davidhalter/jedi")
10383 (synopsis
10384 "Autocompletion for Python that can be used for text editors")
10385 (description
10386 "Jedi is an autocompletion tool for Python that can be used for text editors.")
10387 (license license:expat)))
10388
10389 (define-public python2-jedi
10390 (package-with-python2 python-jedi))
10391
10392 (define-public ptpython
10393 (package
10394 (name "ptpython")
10395 (version "0.34")
10396 (source (origin
10397 (method url-fetch)
10398 (uri (pypi-uri "ptpython" version))
10399 (sha256
10400 (base32
10401 "1mmbiyzf0n8hm7z2a562x7w5cbl6jc0zsk6vp40q1z4cyblv1k13"))))
10402 (build-system python-build-system)
10403 (propagated-inputs
10404 `(("python-docopt" ,python-docopt)
10405 ("python-jedi" ,python-jedi)
10406 ("python-prompt-toolkit" ,python-prompt-toolkit)
10407 ("python-pygments" ,python-pygments)))
10408 (home-page "https://github.com/jonathanslenders/ptpython")
10409 (synopsis "Python Read-Eval-Print-Loop with nice IDE-like features")
10410 (description
10411 "ptpython is a Python read-eval-print loop with IDE-like features.
10412 It supports syntax highlighting, multiline editing, autocompletion, mouse,
10413 color schemes, bracketed paste, Vi and Emacs keybindings, Chinese characters
10414 etc.")
10415 (license license:bsd-3)
10416 (properties `((python2-variant . ,(delay ptpython-2))))))
10417
10418 (define-public ptpython-2
10419 (let ((base (package-with-python2 (strip-python2-variant ptpython))))
10420 (package
10421 (inherit base)
10422 (name "ptpython2"))))
10423
10424 (define-public python-requests-oauthlib
10425 (package
10426 (name "python-requests-oauthlib")
10427 (version "0.6.2")
10428 (source
10429 (origin
10430 (method url-fetch)
10431 (uri (pypi-uri "requests-oauthlib" version))
10432 (sha256
10433 (base32
10434 "0ykff67sjcl227c23g0rxzfx34rr5bf21kwv0z3zmgk0lfmch7hn"))))
10435 (build-system python-build-system)
10436 (arguments
10437 `(#:phases
10438 (modify-phases %standard-phases
10439 ;; removes tests that require network access
10440 (add-before 'check 'pre-check
10441 (lambda _
10442 (delete-file "tests/test_core.py")
10443 #t)))))
10444 (native-inputs
10445 `(("python-requests-mock" ,python-requests-mock)
10446 ("python-mock" ,python-mock)))
10447 (propagated-inputs
10448 `(("python-oauthlib" ,python-oauthlib)
10449 ("python-requests" ,python-requests)))
10450 (home-page
10451 "https://github.com/requests/requests-oauthlib")
10452 (synopsis
10453 "OAuthlib authentication support for Requests")
10454 (description
10455 "Requests-OAuthlib uses the Python Requests and OAuthlib libraries to
10456 provide an easy-to-use Python interface for building OAuth1 and OAuth2 clients.")
10457 (license license:isc)))
10458
10459 (define-public python2-requests-oauthlib
10460 (package-with-python2 python-requests-oauthlib))
10461
10462 (define-public python-stem
10463 (package
10464 (name "python-stem")
10465 (version "1.4.1b")
10466 (source
10467 (origin
10468 (method url-fetch)
10469 (uri (pypi-uri "stem" version ".tar.bz2"))
10470 (sha256
10471 (base32
10472 "09a3amp1y351nwz088ckiibbp666qi2lxwkyknavswfm400s0ns7"))))
10473 (build-system python-build-system)
10474 (arguments
10475 `(#:phases
10476 (modify-phases %standard-phases
10477 (replace 'check
10478 (lambda _
10479 (zero? (system* "./run_tests.py" "--unit")))))))
10480 (native-inputs
10481 `(("python-mock" ,python-mock)
10482 ("python-pep8" ,python-pep8)
10483 ("python-pyflakes" ,python-pyflakes)))
10484 (propagated-inputs
10485 `(("python-pycrypto" ,python-pycrypto)))
10486 (home-page "https://stem.torproject.org/")
10487 (synopsis
10488 "Python controller library that allows applications to interact with Tor")
10489 (description
10490 "Stem is a Python controller library for Tor. With it you can use Tor's
10491 control protocol to script against the Tor process and read descriptor data
10492 relays publish about themselves.")
10493 (license license:lgpl3)))
10494
10495 (define-public python2-stem
10496 (package-with-python2 python-stem))
10497
10498 (define-public python-pyserial
10499 (package
10500 (name "python-pyserial")
10501 (version "3.1.1")
10502 (source
10503 (origin
10504 (method url-fetch)
10505 (uri (pypi-uri "pyserial" version))
10506 (sha256
10507 (base32
10508 "0k1nfdrxxkdlv4zgaqsdv8li0pj3gbh2pyxw8q2bsg6f9490amyn"))))
10509 (build-system python-build-system)
10510 (home-page
10511 "https://github.com/pyserial/pyserial")
10512 (synopsis "Python Serial Port Bindings")
10513 (description "@code{pyserial} provide serial port bindings for Python. It
10514 supports different byte sizes, stop bits, parity and flow control with RTS/CTS
10515 and/or Xon/Xoff. The port is accessed in RAW mode.")
10516 (license license:bsd-3)))
10517
10518 (define-public python2-pyserial
10519 (package-with-python2 python-pyserial))
10520
10521 (define-public python-kivy
10522 (package
10523 (name "python-kivy")
10524 (version "1.9.1")
10525 (source
10526 (origin
10527 (method url-fetch)
10528 (uri (pypi-uri "kivy" version))
10529 (file-name (string-append name "-" version ".tar.gz"))
10530 (sha256
10531 (base32
10532 "0zk3g1j1z0lzcm9d0k1lprrs95zr8n8k5pdg3p5qlsn26jz4bg19"))))
10533 (build-system python-build-system)
10534 (arguments
10535 `(#:tests? #f ; Tests require many optional packages
10536 #:phases
10537 (modify-phases %standard-phases
10538 (replace 'build (lambda _ (zero? (system* "make" "force"))))
10539 (add-after 'patch-generated-file-shebangs 'set-sdl-paths
10540 (lambda* (#:key inputs #:allow-other-keys)
10541 (setenv "KIVY_SDL2_PATH"
10542 (string-append (assoc-ref inputs "sdl-union")
10543 "/include/SDL2"))
10544 #t)))))
10545 (native-inputs
10546 `(("pkg-config" ,pkg-config)
10547 ("python-cython" ,python-cython)))
10548 (inputs
10549 `(("gstreamer" ,gstreamer)
10550 ("mesa" ,mesa)
10551 ("sdl-union"
10552 ,(sdl-union (list sdl2 sdl2-image sdl2-mixer sdl2-ttf)))))
10553 (home-page "http://kivy.org")
10554 (synopsis
10555 "Multitouch application framework")
10556 (description
10557 "A software library for rapid development of
10558 hardware-accelerated multitouch applications.")
10559 (license license:expat)))
10560
10561 (define-public python2-kivy
10562 (package-with-python2 python-kivy))
10563
10564 (define-public python-kivy-next
10565 (let ((commit "a988c5e7a47da56263ff39514264a3de516ef2fe")
10566 (revision "1"))
10567 (package (inherit python-kivy)
10568 (name "python-kivy-next")
10569 (version (string-append "1.9.1-" revision "."
10570 (string-take commit 7)))
10571 (source
10572 (origin
10573 (method git-fetch)
10574 (uri (git-reference
10575 (url "https://github.com/kivy/kivy")
10576 (commit commit)))
10577 (file-name (string-append name "-" version "-checkout"))
10578 (sha256
10579 (base32
10580 "0jk92b4a8l7blkvkgkjihk171s0dfnq582cckff5srwc8kal5m0p")))))))
10581
10582 (define-public python2-kivy-next
10583 (package-with-python2 python-kivy-next))
10584
10585 (define-public python-binaryornot
10586 (package
10587 (name "python-binaryornot")
10588 (version "0.4.0")
10589 (source (origin
10590 (method url-fetch)
10591 (uri (pypi-uri "binaryornot" version))
10592 (sha256
10593 (base32
10594 "1j4f51dxic39mdwf6alj7gd769wy6mhk916v031wjali51xkh3xb"))))
10595 (build-system python-build-system)
10596 (propagated-inputs
10597 `(("python-chardet" ,python-chardet)
10598 ("python-hypothesis" ,python-hypothesis)))
10599 (home-page "https://github.com/audreyr/binaryornot")
10600 (synopsis "Package to check if a file is binary or text")
10601 (description "Ultra-lightweight pure Python package to check if a file is
10602 binary or text.")
10603 (license license:bsd-3)
10604 (properties `((python2-variant . ,(delay python2-binaryornot))))))
10605
10606 (define-public python2-binaryornot
10607 (let ((base (package-with-python2 (strip-python2-variant python-binaryornot))))
10608 (package (inherit base)
10609 (propagated-inputs
10610 `(("python2-enum34" ,python2-enum34)
10611 ,@(package-propagated-inputs base))))))
10612
10613 (define-public python-nltk
10614 (package
10615 (name "python-nltk")
10616 (version "3.2.1")
10617 (source (origin
10618 (method url-fetch)
10619 (uri (pypi-uri "nltk" version))
10620 (sha256
10621 (base32
10622 "0skxbhnymwlspjkzga0f7x1hg3y50fwpfghs8g8k7fh6f4nknlym"))))
10623 (build-system python-build-system)
10624 (arguments
10625 '(;; The tests require some extra resources to be downloaded.
10626 ;; TODO Try packaging these resources.
10627 #:tests? #f))
10628 (home-page "http://nltk.org/")
10629 (synopsis "Natural Language Toolkit")
10630 (description "It provides interfaces to over 50 corpora and lexical
10631 resources such as WordNet, along with a suite of text processing libraries
10632 for classification, tokenization, stemming, tagging, parsing, and semantic
10633 reasoning, wrappers for natural language processing libraries.")
10634 (license license:asl2.0)))
10635
10636 (define-public python2-nltk
10637 (package-with-python2 python-nltk))
10638
10639 (define-public python-pymongo
10640 (package
10641 (name "python-pymongo")
10642 (version "3.3.0")
10643 (source (origin
10644 (method url-fetch)
10645 (uri (pypi-uri "pymongo" version))
10646 (sha256
10647 (base32
10648 "07mra6w86wjqy4lx5fvimidjhhfzd562gfjn8grsnbv2q8pk0i9x"))))
10649 (build-system python-build-system)
10650 (propagated-inputs
10651 `(("python-certifi" ,python-certifi)))
10652 (home-page "http://github.com/mongodb/mongo-python-driver")
10653 (synopsis "Python driver for MongoDB")
10654 (description "Python driver for MongoDB.")
10655 (license license:asl2.0)))
10656
10657 (define-public python2-pymongo
10658 (package-with-python2 python-pymongo))
10659
10660 (define-public python-sh
10661 (package
10662 (name "python-sh")
10663 (version "1.11")
10664 (source (origin
10665 (method url-fetch)
10666 (uri (pypi-uri "sh" version))
10667 (sha256
10668 (base32
10669 "192r0mpv6dmkysjzhc43ddffiwb5g7c76bgr1mb1z2xz9awbj3sr"))))
10670 (build-system python-build-system)
10671 (arguments
10672 `(#:tests? #f)) ; no tests
10673 (home-page "https://github.com/amoffat/sh")
10674 (synopsis "Python subprocess interface")
10675 (description "Abstracts process invocation by providing a function
10676 interface for programs.")
10677 (license license:expat)))
10678
10679 (define-public python2-sh
10680 (package-with-python2 python-sh))
10681
10682 (define-public python-consul
10683 (package
10684 (name "python-consul")
10685 (version "0.6.1")
10686 (source
10687 (origin
10688 (method url-fetch)
10689 (uri (pypi-uri "python-consul" version))
10690 (sha256
10691 (base32
10692 "0rfyxcy4cr3x848vhx876ifalxd5ghq6l5x813m49h4vq2d4jiq8"))))
10693 (build-system python-build-system)
10694 (native-inputs
10695 `(("python-pytest" ,python-pytest)
10696 ("python-requests" ,python-requests)
10697 ("python-six" ,python-six)))
10698 (home-page "https://github.com/cablehead/python-consul")
10699 (synopsis "Python client for Consul")
10700 (description
10701 "Python client for @url{http://www.consul.io/,Consul}, a tool for service
10702 discovery, monitoring and configuration.")
10703 (license license:expat)))
10704
10705 (define-public python2-consul
10706 (package-with-python2 python-consul))
10707
10708 (define-public python-schematics
10709 (package
10710 (name "python-schematics")
10711 (version "1.1.1")
10712 (source
10713 (origin
10714 (method url-fetch)
10715 (uri (string-append
10716 "https://github.com/schematics/schematics/archive/v" version ".tar.gz"))
10717 (file-name (string-append name "-" version ".tar.gz"))
10718 (sha256
10719 (base32
10720 "19v1i69bf3bzarfxmbv0v6ivpcn758x3shvbiy9l2hy0lvqwnp6l"))))
10721 (build-system python-build-system)
10722 (propagated-inputs
10723 `(("python-six" ,python-six)))
10724 (arguments
10725 `(#:tests? #f)) ; requires a bunch of not very nice packages with fixed
10726 ; version requirements (eg python-coveralls)
10727 (home-page "https://github.com/schematics/schematics")
10728 (synopsis "Python Data Structures for Humans")
10729 (description "Python Data Structures for Humans.")
10730 (license license:bsd-3)))
10731
10732 (define-public python2-schematics
10733 (package-with-python2 python-schematics))
10734
10735 (define-public python-publicsuffix
10736 (package
10737 (name "python-publicsuffix")
10738 (version "1.1.0")
10739 (source (origin
10740 (method url-fetch)
10741 (uri (pypi-uri "publicsuffix" version))
10742 (sha256
10743 (base32
10744 "1adx520249z2cy7ykwjr1k190mn2888wqn9jf8qm27ly4qymjxxf"))))
10745 (build-system python-build-system)
10746 (arguments
10747 `(#:tests? #f)) ; tests use the internet
10748 (home-page "https://www.tablix.org/~avian/git/publicsuffix.git")
10749 (synopsis "Get suffix for a domain name")
10750 (description "Get a public suffix for a domain name using the Public Suffix
10751 List.")
10752 (license license:expat)))
10753
10754 (define-public python2-publicsuffix
10755 (package-with-python2 python-publicsuffix))
10756
10757 (define-public python-publicsuffix2
10758 (package
10759 (name "python-publicsuffix2")
10760 (version "2.20160621")
10761 (source
10762 (origin
10763 (method url-fetch)
10764 (uri (pypi-uri "publicsuffix2" version ".tar.bz2"))
10765 (sha256
10766 (base32
10767 "06lx603gdwad5hc3hmn763ngq0rq9bzz1ni3ga72nzk5n872arkd"))))
10768 (build-system python-build-system)
10769 (arguments
10770 '(#:tests? #f)) ; The test suite requires network access.
10771 (home-page "https://github.com/pombredanne/python-publicsuffix2")
10772 (synopsis "Get a public suffix for a domain name using the Public Suffix List")
10773 (description "Get a public suffix for a domain name using the Public Suffix
10774 List. Forked from and using the same API as the publicsuffix package.")
10775 (license (list license:expat license:mpl2.0))))
10776
10777 (define-public python2-publicsuffix2
10778 (package-with-python2 python-publicsuffix2))
10779
10780 (define-public python-url
10781 (package
10782 (name "python-url")
10783 (version "0.2.0")
10784 (source (origin
10785 (method url-fetch)
10786 (uri (pypi-uri "url" version))
10787 (sha256
10788 (base32
10789 "0v879yadcz9qxfl41ak6wkga1kimp9cflla9ddz03hjjvgkqy5ki"))))
10790 (build-system python-build-system)
10791 (propagated-inputs
10792 `(("python-publicsuffix" ,python-publicsuffix)))
10793 (native-inputs
10794 `(("python-coverage" ,python-coverage)
10795 ("python-nose" ,python-nose)))
10796 (arguments
10797 `(#:tests? #f)) ; FIXME: tests fail with "ImportError: No module named 'tests'"
10798 (home-page "http://github.com/seomoz/url-py")
10799 (synopsis "URL Parsing")
10800 (description "Library for parsing urls.")
10801 (license license:expat)
10802 (properties `((python2-variant . ,(delay python2-url))))))
10803
10804 (define-public python2-url
10805 (let ((base (package-with-python2 (strip-python2-variant python-url))))
10806 (package (inherit base)
10807 (propagated-inputs
10808 `(("python2-publicsuffix" ,python2-publicsuffix))))))
10809
10810 (define-public python-freezegun
10811 (package
10812 (name "python-freezegun")
10813 (version "0.3.7")
10814 (source
10815 (origin
10816 (method url-fetch)
10817 (uri (pypi-uri "freezegun" version))
10818 (sha256
10819 (base32
10820 "14l19x06v5jkq4rdwbmfyw4x9lrjb2300afrk21r1ash7y1y9a0w"))))
10821 (build-system python-build-system)
10822 (native-inputs
10823 `(("python-mock" ,python-mock)
10824 ("python-nose" ,python-nose)
10825 ("python-coverage" ,python-coverage)
10826 ("python-dateutil-2" ,python-dateutil-2)))
10827 (propagated-inputs
10828 `(("python-six" ,python-six)))
10829 (arguments
10830 `(#:phases (modify-phases %standard-phases
10831 ;; The tests are normally executed via `make test`, but the PyPi
10832 ;; package does not include the Makefile.
10833 (replace 'check
10834 (lambda _
10835 (zero? (system* "nosetests" "./tests/")))))))
10836 (home-page "https://github.com/spulec/freezegun")
10837 (synopsis "Test utility for mocking the datetime module")
10838 (description
10839 "FreezeGun is a library that allows your python tests to travel through
10840 time by mocking the datetime module.")
10841 (license license:asl2.0)))
10842
10843 (define-public python2-freezegun
10844 (package-with-python2 python-freezegun))
10845
10846
10847 (define-public python-odfpy
10848 (package
10849 (name "python-odfpy")
10850 (version "1.3.3")
10851 (source (origin
10852 (method url-fetch)
10853 (uri (pypi-uri "odfpy" version))
10854 (sha256
10855 (base32
10856 "1a6ms0w9zfhhkqhvrnynwwbxrivw6hgjc0s5k7j06npc7rq0blxw"))))
10857 (arguments
10858 `(#:modules ((srfi srfi-1)
10859 (guix build python-build-system)
10860 (guix build utils))
10861 #:phases
10862 (modify-phases %standard-phases
10863 (replace 'check
10864 ;; The test runner invokes python2 and python3 for test*.py.
10865 ;; To avoid having both in inputs, we replicate it here.
10866 (lambda _
10867 (every (lambda (test-file)
10868 (zero? (system* "python" test-file)))
10869 (find-files "tests" "^test.*\\.py$")))))))
10870 (build-system python-build-system)
10871 (home-page "https://github.com/eea/odfpy")
10872 (synopsis "Python API and tools to manipulate OpenDocument files")
10873 (description "Collection of libraries and utility programs written in
10874 Python to manipulate OpenDocument 1.2 files.")
10875 (license
10876 ;; The software is mainly dual GPL2+ and ASL2.0, but includes a
10877 ;; number of files with other licenses.
10878 (list license:gpl2+ license:asl2.0 license:lgpl2.1+ license:cc-by-sa3.0))))
10879
10880 (define-public python2-odfpy
10881 (package-with-python2 python-odfpy))
10882
10883 (define-public python-cachecontrol
10884 (package
10885 (name "python-cachecontrol")
10886 (version "0.11.6")
10887 (source
10888 (origin
10889 (method url-fetch)
10890 ;; Pypi does not have tests.
10891 (uri (string-append
10892 "https://github.com/ionrock/cachecontrol/archive/v"
10893 version ".tar.gz"))
10894 (file-name (string-append name "-" version ".tar.gz"))
10895 (sha256
10896 (base32
10897 "0yj60d0f69a2l8p7y86k4zhzzm6rnxpq74sfl240pry9l0lfw2vw"))))
10898 (build-system python-build-system)
10899 (arguments
10900 `(#:phases
10901 (modify-phases %standard-phases
10902 (replace 'check
10903 (lambda _
10904 ;; Drop test that requires internet access.
10905 (delete-file "tests/test_regressions.py")
10906 (setenv "PYTHONPATH"
10907 (string-append (getcwd) "/build/lib:"
10908 (getenv "PYTHONPATH")))
10909 (zero? (system* "py.test" "-vv")))))))
10910 (native-inputs
10911 `(("python-pytest" ,python-pytest)
10912 ("python-redis" ,python-redis)
10913 ("python-webtest" ,python-webtest)
10914 ("python-mock" ,python-mock)))
10915 (propagated-inputs
10916 `(("python-requests" ,python-requests)
10917 ("python-lockfile" ,python-lockfile)))
10918 (home-page "https://github.com/ionrock/cachecontrol")
10919 (synopsis "The httplib2 caching algorithms for use with requests")
10920 (description "CacheControl is a port of the caching algorithms in
10921 @code{httplib2} for use with @code{requests} session objects.")
10922 (license license:asl2.0)))
10923
10924 (define-public python2-cachecontrol
10925 (package-with-python2 python-cachecontrol))
10926
10927 (define-public python-lit
10928 (package
10929 (name "python-lit")
10930 (version "0.5.0")
10931 (source
10932 (origin
10933 (method url-fetch)
10934 (uri (pypi-uri "lit" version))
10935 (sha256
10936 (base32
10937 "135m2b9cwih85g66rjggavck328z7lj37srgpq3jxszbg0g2b91y"))))
10938 (build-system python-build-system)
10939 (home-page "http://llvm.org/")
10940 (synopsis "LLVM Software Testing Tool")
10941 (description "@code{lit} is a portable tool for executing LLVM and Clang
10942 style test suites, summarizing their results, and providing indication of
10943 failures.")
10944 (license license:ncsa)))
10945
10946 (define-public python2-lit
10947 (package-with-python2 python-lit))
10948
10949 (define-public python-pytest-pep8
10950 (package
10951 (name "python-pytest-pep8")
10952 (version "1.0.6")
10953 (source (origin
10954 (method url-fetch)
10955 (uri (pypi-uri "pytest-pep8" version))
10956 (sha256
10957 (base32
10958 "06032agzhw1i9d9qlhfblnl3dw5hcyxhagn7b120zhrszbjzfbh3"))))
10959 (build-system python-build-system)
10960 (arguments
10961 `(#:tests? #f)) ; Fails with recent pytest and pep8. See upstream issues #8 and #12.
10962 (native-inputs
10963 `(("python-pytest" ,python-pytest)))
10964 (propagated-inputs
10965 `(("python-pep8" ,python-pep8)))
10966 (home-page "https://bitbucket.org/pytest-dev/pytest-pep8")
10967 (synopsis "Py.test plugin to check PEP8 requirements")
10968 (description "Pytest plugin for checking PEP8 compliance.")
10969 (license license:expat)))
10970
10971 (define-public python2-pytest-pep8
10972 (package-with-python2 python-pytest-pep8))
10973
10974 (define-public python-pytest-flakes
10975 (package
10976 (name "python-pytest-flakes")
10977 (version "1.0.1")
10978 (source (origin
10979 (method url-fetch)
10980 (uri (pypi-uri "pytest-flakes" version))
10981 (sha256
10982 (base32
10983 "0flag3n33kbhyjrhzmq990rvg4yb8hhhl0i48q9hw0ll89jp28lw"))))
10984 (build-system python-build-system)
10985 (arguments
10986 `(#:phases
10987 (modify-phases %standard-phases
10988 (delete 'check)
10989 (add-after 'install 'check
10990 (lambda* (#:key outputs inputs #:allow-other-keys)
10991 ;; It's easier to run tests after install.
10992 ;; Make installed package available for running the tests
10993 (add-installed-pythonpath inputs outputs)
10994 (zero? (system* "py.test" "-vv")))))))
10995 (native-inputs
10996 `(("python-coverage" ,python-coverage)
10997 ("python-pytest" ,python-pytest)
10998 ("python-pytest-cache" ,python-pytest-cache)
10999 ("python-pytest-pep8" ,python-pytest-pep8)))
11000 (propagated-inputs
11001 `(("python-pyflakes" ,python-pyflakes)))
11002 (home-page "https://github.com/fschulze/pytest-flakes")
11003 (synopsis "Py.test plugin to check source code with pyflakes")
11004 (description "Pytest plugin for checking Python source code with pyflakes.")
11005 (license license:expat)))
11006
11007 (define-public python2-pytest-flakes
11008 (package-with-python2 python-pytest-flakes))
11009
11010 (define-public python-natsort
11011 (package
11012 (name "python-natsort")
11013 (version "5.0.1")
11014 (source (origin
11015 (method url-fetch)
11016 (uri (pypi-uri "natsort" version))
11017 (sha256
11018 (base32
11019 "1abld5p4a6n5zjnyw5mi2pv37gqalcybv2brjr2y6l9l2p8v9mja"))))
11020 (build-system python-build-system)
11021 (arguments
11022 `(#:phases
11023 (modify-phases %standard-phases
11024 (add-before 'check 'set-cachedir
11025 ;; Tests require write access to $HOME by default
11026 (lambda _ (setenv "PYTHON_EGG_CACHE" "/tmp") #t)))))
11027 (native-inputs
11028 `(("python-hypothesis" ,python-hypothesis)
11029 ("python-pytest-cache" ,python-pytest-cache)
11030 ("python-pytest-cov" ,python-pytest-cov)
11031 ("python-pytest-flakes" ,python-pytest-flakes)
11032 ("python-pytest-pep8" ,python-pytest-pep8)))
11033 (propagated-inputs ; TODO: Add python-fastnumbers.
11034 `(("python-pyicu" ,python-pyicu)))
11035 (home-page "https://github.com/SethMMorton/natsort")
11036 (synopsis "Natural sorting for python and shell")
11037 (description
11038 "Natsort lets you apply natural sorting on lists instead of
11039 lexicographical. If you use the built-in @code{sorted} method in python
11040 on a list such as @code{['a20', 'a9', 'a1', 'a4', 'a10']}, it would be
11041 returned as @code{['a1', 'a10', 'a20', 'a4', 'a9']}. Natsort provides a
11042 function @code{natsorted} that identifies numbers and sorts them separately
11043 from strings. It can also sort version numbers, real numbers, mixed types
11044 and more, and comes with a shell command @command{natsort} that exposes this
11045 functionality in the command line.")
11046 (license license:expat)
11047 (properties `((python2-variant . ,(delay python2-natsort))))))
11048
11049 (define-public python2-natsort
11050 (let ((base (package-with-python2 (strip-python2-variant python-natsort))))
11051 (package (inherit base)
11052 (native-inputs
11053 `(("python2-pathlib" ,python2-pathlib)
11054 ("python2-mock" ,python2-mock)
11055 ("python2-enum34" ,python2-enum34)
11056 ,@(package-native-inputs base))))))
11057
11058 (define-public python-glances
11059 (package
11060 (name "python-glances")
11061 (version "2.7.1")
11062 (source
11063 (origin
11064 (method url-fetch)
11065 (uri (pypi-uri "Glances" version))
11066 (sha256
11067 (base32
11068 "11jbq40g8alsbirnd4kiagznqg270247i0m8qhi48ldf2i5xppxg"))))
11069 (build-system python-build-system)
11070 (propagated-inputs
11071 `(("python-psutil" ,python-psutil)))
11072 (home-page
11073 "https://github.com/nicolargo/glances")
11074 (synopsis
11075 "A cross-platform curses-based monitoring tool")
11076 (description
11077 "Glances is a curses-based monitoring tool for a wide variety of platforms.
11078 Glances uses the PsUtil library to get information from your system. It monitors
11079 CPU, load, memory, network bandwidth, disk I/O, disk use, and more.")
11080 (license license:lgpl3+)))
11081
11082 (define-public python2-glances
11083 (package-with-python2 python-glances))
11084
11085 (define-public python-graphql-core
11086 (package
11087 (name "python-graphql-core")
11088 (version "0.5.3")
11089 (source
11090 (origin
11091 (method url-fetch)
11092 (uri (pypi-uri "graphql-core" version))
11093 (sha256
11094 (base32
11095 "0rsaarx2sj4xnw9966rhh4haiqaapm4lm2mfqm48ywd51j5vh1a0"))))
11096 (build-system python-build-system)
11097 (arguments
11098 `(#:tests? #f ; Tests require the unpackaged pytest-benchmark.
11099 #:phases
11100 (modify-phases %standard-phases
11101 (add-after 'unpack 'patch-hardcoded-version
11102 (lambda _ (substitute*
11103 "setup.py"
11104 (("'gevent==1.1rc1'") "'gevent'"))
11105 #t)))))
11106 (native-inputs
11107 `(("python-gevent" ,python-gevent)
11108 ("python-mock" ,python-mock)
11109 ("python-pytest-mock" ,python-pytest-mock)))
11110 (propagated-inputs
11111 `(("python-promise" ,python-promise)
11112 ("python-six" ,python-six)))
11113 (home-page "https://github.com/graphql-python/graphql-core")
11114 (synopsis "GraphQL implementation for Python")
11115 (description
11116 "GraphQL implementation for Python. GraphQL is a data query language and
11117 runtime designed and used to request and deliver data to mobile and web apps.
11118 This library is a port of @url{https://github.com/graphql/graphql-js,graphql-js}
11119 to Python.")
11120 (license license:expat)))
11121
11122 (define-public python2-graphql-core
11123 (package-with-python2 python-graphql-core))
11124
11125 (define-public python-graphql-relay
11126 (package
11127 (name "python-graphql-relay")
11128 (version "0.4.4")
11129 (source
11130 (origin
11131 (method url-fetch)
11132 (uri (pypi-uri "graphql-relay" version))
11133 (sha256
11134 (base32
11135 "04wr9ayshxjjdcg2v21c7ffbz36kif1wjl3604fqd3qignb3fbxi"))))
11136 (build-system python-build-system)
11137 (native-inputs
11138 `(("python-pytest" ,python-pytest)))
11139 (propagated-inputs
11140 `(("python-graphql-core" ,python-graphql-core)
11141 ("python-promise" ,python-promise)
11142 ("python-six" ,python-six)))
11143 (home-page "https://github.com/graphql-python/graphql-relay-py")
11144 (synopsis "Relay implementation for Python")
11145 (description
11146 "This is a library to allow the easy creation of Relay-compliant servers
11147 using the GraphQL Python reference implementation of a GraphQL server. It
11148 should be noted that the code is a exact port of the original
11149 @url{https://github.com/graphql/graphql-relay-js,graphql-relay js implementation}
11150 from Facebook.")
11151 (license license:expat)))
11152
11153 (define-public python2-graphql-relay
11154 (package-with-python2 python-graphql-relay))
11155
11156 (define-public python-graphene
11157 (package
11158 (name "python-graphene")
11159 (version "0.10.2")
11160 (source
11161 (origin
11162 (method url-fetch)
11163 (uri (pypi-uri "graphene" version))
11164 (sha256
11165 (base32
11166 "09zhac7igh9ixdz0ay6csy35b40l1jwbf2wrbxmgxwfhy51iy06q"))))
11167 (build-system python-build-system)
11168 (native-inputs
11169 `(("python-django-filter" ,python-django-filter)
11170 ("python-mock" ,python-mock)
11171 ("python-psycopg2" ,python-psycopg2)
11172 ("python-pytest-django" ,python-pytest-django)
11173 ("python-sqlalchemy-utils" ,python-sqlalchemy-utils)))
11174 (propagated-inputs
11175 `(("python-graphql-core" ,python-graphql-core)
11176 ("python-graphql-relay" ,python-graphql-relay)
11177 ("python-iso8601" ,python-iso8601)
11178 ("python-promise" ,python-promise)
11179 ("python-six" ,python-six)))
11180 (home-page "http://graphene-python.org/")
11181 (synopsis "GraphQL Framework for Python")
11182 (description
11183 "Graphene is a Python library for building GraphQL schemas/types.
11184 A GraphQL schema describes your data model, and provides a GraphQL server
11185 with an associated set of resolve methods that know how to fetch data.")
11186 (properties `((python2-variant . ,(delay python2-graphene))))
11187 (license license:expat)))
11188
11189 (define-public python2-graphene
11190 (let ((base (package-with-python2
11191 (strip-python2-variant python-graphene))))
11192 (package (inherit base)
11193 (native-inputs
11194 `(("python2-sqlalchemy" ,python2-sqlalchemy)
11195 ,@(package-native-inputs base))))))
11196
11197 (define-public python-nautilus
11198 (package
11199 (name "python-nautilus")
11200 (version "0.4.9")
11201 (source
11202 (origin
11203 (method url-fetch)
11204 (uri (pypi-uri "nautilus" version))
11205 (sha256
11206 (base32
11207 "01hwzjc1zshk4vvxrcghm398fpy4jls66dyz06g07mrwqif8878p"))))
11208 (build-system python-build-system)
11209 (arguments `(#:tests? #f)) ; fails to import test modules
11210 (propagated-inputs
11211 `(("python-bcrypt" ,python-bcrypt)
11212 ("python-click" ,python-click)
11213 ("python-consul" ,python-consul)
11214 ("python-graphql-core" ,python-graphql-core)
11215 ("python-graphql-relay" ,python-graphql-relay)
11216 ("python-graphene" ,python-graphene)
11217 ("python-jinja2" ,python-jinja2)
11218 ("python-nose2" ,python-nose2)
11219 ("python-peewee" ,python-peewee)
11220 ("python-pika" ,python-pika)
11221 ("python-pycparser" ,python-pycparser)
11222 ("python-requests" ,python-requests)
11223 ("python-tornado" ,python-tornado)
11224 ("python-wtforms" ,python-wtforms)))
11225 (home-page "https://github.com/AlecAivazis/nautilus")
11226 (synopsis "Library for creating microservice applications")
11227 (description
11228 "Nautilus is a framework for flux based microservices that looks to
11229 provide extendible implementations of common aspects of a cloud so that you can
11230 focus on building massively scalable web applications.")
11231 (license license:expat)))
11232
11233 (define-public python-betamax
11234 (package
11235 (name "python-betamax")
11236 (version "0.8.0")
11237 (source
11238 (origin
11239 (method url-fetch)
11240 (uri (pypi-uri "betamax" version))
11241 (sha256
11242 (base32
11243 "18f8v5gng3j773jlbbzx4rg1i4y2zw3m2l1zpmbvp8bh5a2q1i42"))))
11244 (build-system python-build-system)
11245 (arguments
11246 '(;; Many tests fail because they require networking.
11247 #:tests? #f))
11248 (inputs
11249 `(("python-requests" ,python-requests)))
11250 (home-page "https://github.com/sigmavirus24/betamax")
11251 (synopsis "Record HTTP interactions with python-requests")
11252 (description "Betamax will record your test suite's HTTP interactions and
11253 replay them during future tests. It is designed to work with python-requests.")
11254 (license license:expat)))
11255
11256 (define-public python2-betamax
11257 (package-with-python2 python-betamax))
11258
11259 (define-public python-s3transfer
11260 (package
11261 (name "python-s3transfer")
11262 (version "0.1.8")
11263 (source (origin
11264 (method url-fetch)
11265 (uri (pypi-uri "s3transfer" version))
11266 (sha256
11267 (base32
11268 "1jivjkp3xqif9gzr5fiq28jsskmh50vzzd7ldsb4rbyiw1iyv3hy"))))
11269 (build-system python-build-system)
11270 (arguments
11271 `(#:phases
11272 (modify-phases %standard-phases
11273 (replace 'check
11274 (lambda _
11275 ;; 7 of the 'integration' tests require network access or login
11276 ;; credentials.
11277 (zero? (system* "nosetests" "--exclude=integration")))))))
11278 (native-inputs
11279 `(("python-docutils" ,python-docutils)
11280 ("python-mock" ,python-mock)
11281 ("python-nose" ,python-nose)))
11282 (propagated-inputs
11283 `(("python-botocore" ,python-botocore)))
11284 (synopsis "Amazon S3 Transfer Manager")
11285 (description "S3transfer is a Python library for managing Amazon S3
11286 transfers.")
11287 (home-page "https://github.com/boto/s3transfer")
11288 (license license:asl2.0)
11289 (properties `((python2-variant . ,(delay python2-s3transfer))))))
11290
11291 (define-public python2-s3transfer
11292 (let ((base (package-with-python2 (strip-python2-variant python-s3transfer))))
11293 (package
11294 (inherit base)
11295 (native-inputs
11296 `(("python2-futures" ,python2-futures)
11297 ,@(package-native-inputs base))))))
11298
11299 (define-public python-setproctitle
11300 (package
11301 (name "python-setproctitle")
11302 (version "1.1.10")
11303 (source
11304 (origin
11305 (method url-fetch)
11306 (uri (pypi-uri "setproctitle" version))
11307 (sha256
11308 (base32
11309 "163kplw9dcrw0lffq1bvli5yws3rngpnvrxrzdw89pbphjjvg0v2"))))
11310 (build-system python-build-system)
11311 (arguments
11312 '(#:phases
11313 (modify-phases %standard-phases
11314 (add-before 'check 'patch-Makefile
11315 ;; Stricly this is only required for the python2 variant.
11316 ;; But adding a phase in an inherited package seems to be
11317 ;; cumbersum. So we patch even for python3.
11318 (lambda _
11319 (let ((nose (assoc-ref %build-inputs "python2-nose")))
11320 (when nose
11321 (substitute* "Makefile"
11322 (("\\$\\(PYTHON\\) [^ ]which nosetests[^ ] ")
11323 (string-append nose "/bin/nosetests "))))
11324 #t)))
11325 (replace 'check
11326 (lambda _
11327 (setenv "PYTHON" (or (which "python3") (which "python")))
11328 (setenv "PYCONFIG" (or (which "python3-config")
11329 (which "python-config")))
11330 (setenv "CC" "gcc")
11331 ;; No need to extend PYTHONPATH to find the built package, since
11332 ;; the Makefile will build anyway
11333 (zero? (system* "make" "check")))))))
11334 (native-inputs
11335 `(("procps" ,procps))) ; required for tests
11336 (home-page
11337 "https://github.com/dvarrazzo/py-setproctitle")
11338 (synopsis
11339 "Setproctitle implementation for Python to customize the process title")
11340 (description "The library allows a process to change its title (as displayed
11341 by system tools such as ps and top).
11342
11343 Changing the title is mostly useful in multi-process systems, for
11344 example when a master process is forked: changing the children's title
11345 allows to identify the task each process is busy with. The technique
11346 is used by PostgreSQL and the OpenSSH Server for example.")
11347 (license license:bsd-3)
11348 (properties `((python2-variant . ,(delay python2-setproctitle))))))
11349
11350 (define-public python2-setproctitle
11351 (let ((base (package-with-python2
11352 (strip-python2-variant python-setproctitle))))
11353 (package
11354 (inherit base)
11355 (native-inputs `(("python2-nose" ,python2-nose)
11356 ,@(package-native-inputs base))))))
11357
11358 (define-public python-validictory
11359 (package
11360 (name "python-validictory")
11361 (version "1.0.1")
11362 (source
11363 (origin
11364 (method url-fetch)
11365 (uri (pypi-uri "validictory" version))
11366 (sha256
11367 (base32
11368 "1zf1g9sw47xzp5f80bd94pb42j9yqv82lcrgcvdwr6nkaphfi37q"))))
11369 (build-system python-build-system)
11370 (arguments
11371 '(#:phases
11372 (modify-phases %standard-phases
11373 (add-after 'unpack 'bootstrap
11374 ;; Move the tests out of the package directory to avoid
11375 ;; packaging them.
11376 (lambda* _
11377 (rename-file "validictory/tests" "tests")
11378 (delete-file "tests/__init__.py")))
11379 (replace 'check
11380 (lambda _
11381 ;; Extend PYTHONPATH so the built package will be found.
11382 (setenv "PYTHONPATH"
11383 (string-append (getcwd) "/build/lib:"
11384 (getenv "PYTHONPATH")))
11385 (zero? (system* "py.test" "-vv" )))))))
11386 (native-inputs
11387 `(("python-pytest" ,python-pytest)))
11388 (home-page
11389 "https://github.com/jamesturk/validictory")
11390 (synopsis "General purpose Python data validator")
11391 (description "It allows validation of arbitrary Python data structures.
11392
11393 The schema format is based on the JSON Schema
11394 proposal (http://json-schema.org), so combined with json the library is also
11395 useful as a validator for JSON data.")
11396 (license license:expat)))
11397
11398 (define-public python2-validictory
11399 (package-with-python2 python-validictory))
11400
11401 (define-public python-aniso8601
11402 (package
11403 (name "python-aniso8601")
11404 (version "1.1.0")
11405 (source
11406 (origin
11407 (method url-fetch)
11408 (uri (pypi-uri "aniso8601" version))
11409 (sha256
11410 (base32
11411 "1k5mjg9iqbjfslb5prrsfz7dhlvi6s35p1jxq8dm87w1b7dn5i2g"))))
11412 (build-system python-build-system)
11413 (propagated-inputs
11414 `(("python-dateutil-2" ,python-dateutil-2)))
11415 (home-page
11416 "https://bitbucket.org/nielsenb/aniso8601")
11417 (synopsis
11418 "Python library for parsing ISO 8601 strings")
11419 (description
11420 "This package contains a library for parsing ISO 8601 datetime strings.")
11421 (license license:bsd-3)))
11422
11423 (define-public python-flask-restful
11424 (package
11425 (name "python-flask-restful")
11426 (version "0.3.5")
11427 (source
11428 (origin
11429 (method url-fetch)
11430 (uri (pypi-uri "Flask-RESTful" version))
11431 (sha256
11432 (base32
11433 "0hjcmdb56b7z4bkw848lxfkyrpnkwzmqn2dgnlv12mwvjpzsxr6c"))))
11434 (build-system python-build-system)
11435 (propagated-inputs
11436 `(("python-aniso8601" ,python-aniso8601)
11437 ("python-flask" ,python-flask)
11438 ("python-pycrypto" ,python-pycrypto)
11439 ("python-pytz" ,python-pytz)))
11440 (native-inputs
11441 `(;; Optional dependency of Flask. Tests need it.
11442 ("python-blinker" ,python-blinker)
11443 ("python-mock" ,python-mock) ; For tests
11444 ("python-nose" ,python-nose) ; For tests
11445 ("python-sphinx" ,python-sphinx)))
11446 (home-page
11447 "https://www.github.com/flask-restful/flask-restful/")
11448 (synopsis
11449 "Flask module for creating REST APIs")
11450 (description
11451 "This package contains a Flask module for creating REST APIs.")
11452 (license license:bsd-3)))
11453
11454 (define-public python-flask-basicauth
11455 (package
11456 (name "python-flask-basicauth")
11457 (version "0.2.0")
11458 (source
11459 (origin
11460 (method url-fetch)
11461 (uri (pypi-uri "Flask-BasicAuth" version))
11462 (sha256
11463 (base32
11464 "1zq1spkjr4sjdnalpp8wl242kdqyk6fhbnhr8hi4r4f0km4bspnz"))))
11465 (build-system python-build-system)
11466 (propagated-inputs
11467 `(("python-flask" ,python-flask)))
11468 (home-page
11469 "https://github.com/jpvanhal/flask-basicauth")
11470 (synopsis
11471 "HTTP basic access authentication for Flask")
11472 (description
11473 "This package provides HTTP basic access authentication for Flask.")
11474 (license license:bsd-3)))
11475
11476 (define-public python-flask-sqlalchemy
11477 (package
11478 (name "python-flask-sqlalchemy")
11479 (version "2.1")
11480 (source
11481 (origin
11482 (method url-fetch)
11483 (uri (pypi-uri "Flask-SQLAlchemy" version))
11484 (sha256
11485 (base32
11486 "1i9ps5d5snih9xlqhrvmi3qfiygkmqzxh92n25kj4pf89kj4s965"))))
11487 (build-system python-build-system)
11488 (propagated-inputs
11489 `(("python-flask" ,python-flask)
11490 ("python-sqlalchemy" ,python-sqlalchemy)))
11491 (home-page
11492 "http://github.com/mitsuhiko/flask-sqlalchemy")
11493 (synopsis
11494 "Module adding SQLAlchemy support to your Flask application")
11495 (description
11496 "This package adds SQLAlchemy support to your Flask application.")
11497 (license license:bsd-3)))
11498
11499 (define-public python-pyev
11500 (package
11501 (name "python-pyev")
11502 (version "0.9.0")
11503 (source
11504 (origin
11505 (method url-fetch)
11506 (uri (pypi-uri "pyev" version))
11507 (sha256
11508 (base32
11509 "0rf603lc0s6zpa1nb25vhd8g4y337wg2wyz56i0agsdh7jchl0sx"))))
11510 (build-system python-build-system)
11511 (arguments
11512 `(#:tests? #f ; no test suite
11513 #:phases
11514 (modify-phases %standard-phases
11515 (add-after 'unpack 'patch
11516 (lambda* (#:key inputs #:allow-other-keys)
11517 (let ((libev (string-append (assoc-ref inputs "libev")
11518 "/lib/libev.so.4")))
11519 (substitute* "setup.py"
11520 (("libev_dll_name = find_library\\(\\\"ev\\\"\\)")
11521 (string-append "libev_dll_name = \"" libev "\"")))))))))
11522 (inputs
11523 `(("libev" ,libev)))
11524 (home-page "http://pythonhosted.org/pyev/")
11525 (synopsis "Python libev interface")
11526 (description "Pyev provides a Python interface to libev.")
11527 (license license:gpl3)))
11528
11529 (define-public python2-pyev
11530 (package-with-python2 python-pyev))
11531
11532 (define-public python-imagesize
11533 (package
11534 (name "python-imagesize")
11535 (version "0.7.1")
11536 (source
11537 (origin
11538 (method url-fetch)
11539 (uri (pypi-uri "imagesize" version))
11540 (sha256
11541 (base32
11542 "0qk07k0z4241lkzzjji7z4da04pcvg7bfc4xz1934zlqhwmwdcha"))))
11543 (build-system python-build-system)
11544 (arguments
11545 '(;; Test files are not distributed on PyPi:
11546 ;; https://github.com/shibukawa/imagesize_py/issues/7
11547 #:tests? #f))
11548 (home-page "https://github.com/shibukawa/imagesize_py")
11549 (synopsis "Gets image size of files in variaous formats in Python")
11550 (description
11551 "This package allows determination of image size from
11552 PNG, JPEG, JPEG2000 and GIF files in pure Python.")
11553 (license license:expat)))
11554
11555 (define-public python2-imagesize
11556 (package-with-python2 python-imagesize))
11557
11558 (define-public python-axolotl-curve25519
11559 (package
11560 (name "python-axolotl-curve25519")
11561 (version "0.1")
11562 (source
11563 (origin
11564 (method git-fetch)
11565 (uri (git-reference
11566 (url "git://github.com/tgalal/python-axolotl-curve25519")
11567 (commit "e4a9c4de0eae27223200579c58d1f8f6d20637e2")))
11568 (file-name (string-append name "-" version "-checkout"))
11569 (sha256
11570 (base32
11571 "0agap5q0hmvf6cwzjqc05kw53pjgf6942pcivpazksmg1vk400ra"))))
11572 (build-system python-build-system)
11573 (arguments
11574 `(;; Prevent creation of the egg. This works around
11575 ;; https://debbugs.gnu.org/cgi/bugreport.cgi?bug=20765
11576 #:configure-flags '("--root=/")))
11577 (home-page "https://github.com/tgalal/python-axolotl-curve25519")
11578 (synopsis "Python wrapper for curve25519 library")
11579 (description "This is a python wrapper for the curve25519 library
11580 with ed25519 signatures. The C code was pulled from
11581 libaxolotl-android. At the moment this wrapper is meant for use by
11582 python-axolotl.")
11583 (license (list license:gpl3 ; Most files
11584 license:bsd-3)))) ; curve/curve25519-donna.c
11585
11586 (define-public python2-axolotl-curve25519
11587 (package-with-python2 python-axolotl-curve25519))
11588
11589 (define-public python-axolotl
11590 (package
11591 (name "python-axolotl")
11592 (version "0.1.35")
11593 (source
11594 (origin
11595 (method url-fetch)
11596 (uri (string-append
11597 "https://github.com/tgalal/python-axolotl/archive/"
11598 version ".tar.gz"))
11599 (file-name (string-append name "-" version ".tar.gz"))
11600 (sha256
11601 (base32 "1z8d89p7v40p4bwywjm9h4z28fdvra79ddw06azlkrfjbl7dxmz8"))))
11602 (build-system python-build-system)
11603 (arguments
11604 `(#:phases
11605 (modify-phases %standard-phases
11606 ;; Don't install tests
11607 (add-before 'install 'remove-tests
11608 (lambda _
11609 (for-each delete-file-recursively
11610 '("axolotl/tests" "build/lib/axolotl/tests"))
11611 #t)))
11612 ;; Prevent creation of the egg. This works around
11613 ;; https://debbugs.gnu.org/cgi/bugreport.cgi?bug=20765
11614 #:configure-flags '("--root=/")))
11615 (propagated-inputs
11616 `(("python-axolotl-curve25519" ,python-axolotl-curve25519)
11617 ("python-dateutil" ,python-dateutil)
11618 ("python-protobuf" ,python-protobuf)
11619 ("python-pycrypto" ,python-pycrypto)))
11620 (home-page "https://github.com/tgalal/python-axolotl")
11621 (synopsis "Python port of libaxolotl-android")
11622 (description "This is a python port of libaxolotl-android. This
11623 is a ratcheting forward secrecy protocol that works in synchronous and
11624 asynchronous messaging environments.")
11625 (license license:gpl3)))
11626
11627 (define-public python2-axolotl
11628 (package-with-python2 python-axolotl))
11629
11630 (define-public python-termstyle
11631 (package
11632 (name "python-termstyle")
11633 (version "0.1.11")
11634 (source
11635 (origin
11636 (method url-fetch)
11637 (uri (pypi-uri "termstyle" version))
11638 (sha256
11639 (base32
11640 "17wzkkcqy5zc0g68xlad3kcv66iw14d2pwqc0h9420gak0vbhx7g"))))
11641 (build-system python-build-system)
11642 (home-page "http://github.com/gfxmonk/termstyle")
11643 (synopsis "Console text coloring for Python")
11644 (description "This package provides console text coloring for Python.")
11645 (license license:bsd-3)))
11646
11647 (define-public python-rednose
11648 (package
11649 (name "python-rednose")
11650 (version "1.2.1")
11651 (source
11652 (origin
11653 (method url-fetch)
11654 (uri (pypi-uri "rednose" version))
11655 (sha256
11656 (base32
11657 "0b0bsna217lr1nykyhl5fgjly15zhdvqd4prg4wy1zrgfv7al6m0"))))
11658 (build-system python-build-system)
11659 (arguments
11660 `(#:phases
11661 (modify-phases %standard-phases
11662 (add-after 'unpack 'fix-deps
11663 (lambda _
11664 ;; See <https://github.com/JBKahn/rednose/issues/12>
11665 (substitute* "setup.py"
11666 (("python-termstyle") "termstyle"))
11667 #t)))))
11668 (propagated-inputs
11669 `(("python-colorama" ,python-colorama)
11670 ("python-termstyle" ,python-termstyle)))
11671 (native-inputs
11672 `(("python-six" ,python-six)
11673 ("python-nose" ,python-nose)))
11674 (home-page "https://github.com/JBKahn/rednose")
11675 (synopsis "Colored output for Python nosetests")
11676 (description "This package provides colored output for the
11677 @command{nosetests} command of the Python Nose unit test framework.")
11678 (license license:bsd-3)))
11679
11680 (define-public python-flask-restplus
11681 (package
11682 (name "python-flask-restplus")
11683 (version "0.9.2")
11684 (source
11685 (origin
11686 (method url-fetch)
11687 (uri (pypi-uri "flask-restplus" version))
11688 (sha256
11689 (base32
11690 "11his6ii5brpkhld0d5bwzjjw4q3vmplpd6fmgzjrvvklsbk0cf4"))))
11691 (build-system python-build-system)
11692 (propagated-inputs
11693 `(("python-aniso8601" ,python-aniso8601)
11694 ("python-flask" ,python-flask)
11695 ("python-jsonschema" ,python-jsonschema)
11696 ("python-pytz" ,python-pytz)
11697 ("python-six" ,python-six)))
11698 (native-inputs
11699 `(("python-tzlocal" ,python-tzlocal)
11700 ("python-blinker" ,python-blinker)
11701 ("python-nose" ,python-nose)
11702 ("python-rednose" ,python-rednose)))
11703 (home-page "https://github.com/noirbizarre/flask-restplus")
11704 (synopsis "Framework for documented API development with Flask")
11705 (description "This package provides a framework for API development with
11706 the Flask web framework in Python. It is similar to package
11707 @code{python-flask-restful} but supports the @code{python-swagger}
11708 documentation builder.")
11709 (license license:expat)))