gnu: python-oauthlib, python-oauthlib2: Correct inputs.
[jackhill/guix/guix.git] / gnu / packages / python.scm
1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2013 Nikita Karetnikov <nikita@karetnikov.org>
3 ;;; Copyright © 2013, 2014, 2015, 2016 Ludovic Courtès <ludo@gnu.org>
4 ;;; Copyright © 2013, 2014, 2015, 2016 Andreas Enge <andreas@enge.fr>
5 ;;; Copyright © 2014, 2015 Mark H Weaver <mhw@netris.org>
6 ;;; Copyright © 2014 Eric Bavier <bavier@member.fsf.org>
7 ;;; Copyright © 2014, 2015 Federico Beffa <beffa@fbengineering.ch>
8 ;;; Copyright © 2015 Omar Radwan <toxemicsquire4@gmail.com>
9 ;;; Copyright © 2015 Pierre-Antoine Rault <par@rigelk.eu>
10 ;;; Copyright © 2015, 2016 Ricardo Wurmus <rekado@elephly.net>
11 ;;; Copyright © 2015, 2016 Christopher Allan Webber <cwebber@dustycloud.org>
12 ;;; Copyright © 2015 Eric Dvorsak <eric@dvorsak.fr>
13 ;;; Copyright © 2015, 2016 David Thompson <davet@gnu.org>
14 ;;; Copyright © 2015, 2016 Leo Famulari <leo@famulari.name>
15 ;;; Copyright © 2015 Ben Woodcroft <donttrustben@gmail.com>
16 ;;; Copyright © 2015, 2016 Erik Edrosa <erik.edrosa@gmail.com>
17 ;;; Copyright © 2015, 2016 Efraim Flashner <efraim@flashner.co.il>
18 ;;; Copyright © 2015 Kyle Meyer <kyle@kyleam.com>
19 ;;; Copyright © 2015, 2016 Chris Marusich <cmmarusich@gmail.com>
20 ;;; Copyright © 2016 Danny Milosavljevic <dannym+a@scratchpost.org>
21 ;;; Copyright © 2016 Lukas Gradl <lgradl@openmailbox.org>
22 ;;; Copyright © 2016 Hartmut Goebel <h.goebel@crazy-compilers.com>
23 ;;; Copyright © 2016 Daniel Pimentel <d4n1@d4n1.org>
24 ;;; Copyright © 2016 Sou Bunnbu <iyzsong@gmail.com>
25 ;;; Copyright © 2016 Troy Sankey <sankeytms@gmail.com>
26 ;;; Copyright © 2016 ng0 <ng0@we.make.ritual.n0.is>
27 ;;; Copyright © 2016 Dylan Jeffers <sapientech@sapientech@openmailbox.org>
28 ;;; Copyright © 2016 David Craven <david@craven.ch>
29 ;;; Copyright © 2016 Marius Bakke <mbakke@fastmail.com>
30 ;;; Copyright © 2016 Stefan Reichoer <stefan@xsteve.at>
31 ;;; Copyright © 2016 Dylan Jeffers <sapientech@sapientech@openmailbox.org>
32 ;;; Copyright © 2016 Alex Vong <alexvong1995@gmail.com>
33 ;;; Copyright © 2016 Arun Isaac <arunisaac@systemreboot.net>
34 ;;;
35 ;;; This file is part of GNU Guix.
36 ;;;
37 ;;; GNU Guix is free software; you can redistribute it and/or modify it
38 ;;; under the terms of the GNU General Public License as published by
39 ;;; the Free Software Foundation; either version 3 of the License, or (at
40 ;;; your option) any later version.
41 ;;;
42 ;;; GNU Guix is distributed in the hope that it will be useful, but
43 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
44 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
45 ;;; GNU General Public License for more details.
46 ;;;
47 ;;; You should have received a copy of the GNU General Public License
48 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
49
50 (define-module (gnu packages python)
51 #:use-module ((guix licenses) #:prefix license:)
52 #:use-module (gnu packages)
53 #:use-module (gnu packages algebra)
54 #:use-module (gnu packages adns)
55 #:use-module (gnu packages attr)
56 #:use-module (gnu packages backup)
57 #:use-module (gnu packages bash)
58 #:use-module (gnu packages compression)
59 #:use-module (gnu packages databases)
60 #:use-module (gnu packages django)
61 #:use-module (gnu packages file)
62 #:use-module (gnu packages fontutils)
63 #:use-module (gnu packages gcc)
64 #:use-module (gnu packages ghostscript)
65 #:use-module (gnu packages gl)
66 #:use-module (gnu packages glib)
67 #:use-module (gnu packages gstreamer)
68 #:use-module (gnu packages gtk)
69 #:use-module (gnu packages icu4c)
70 #:use-module (gnu packages image)
71 #:use-module (gnu packages imagemagick)
72 #:use-module (gnu packages libevent)
73 #:use-module (gnu packages libffi)
74 #:use-module (gnu packages linux)
75 #:use-module (gnu packages maths)
76 #:use-module (gnu packages multiprecision)
77 #:use-module (gnu packages networking)
78 #:use-module (gnu packages ncurses)
79 #:use-module (gnu packages openstack)
80 #:use-module (gnu packages password-utils)
81 #:use-module (gnu packages pcre)
82 #:use-module (gnu packages perl)
83 #:use-module (gnu packages pkg-config)
84 #:use-module (gnu packages protobuf)
85 #:use-module (gnu packages readline)
86 #:use-module (gnu packages sdl)
87 #:use-module (gnu packages statistics)
88 #:use-module (gnu packages tex)
89 #:use-module (gnu packages texinfo)
90 #:use-module (gnu packages tls)
91 #:use-module (gnu packages version-control)
92 #:use-module (gnu packages video)
93 #:use-module (gnu packages web)
94 #:use-module (gnu packages base)
95 #:use-module (gnu packages xml)
96 #:use-module (gnu packages xorg)
97 #:use-module (gnu packages xdisorg)
98 #:use-module (gnu packages zip)
99 #:use-module (gnu packages tcl)
100 #:use-module (gnu packages bdw-gc)
101 #:use-module (guix packages)
102 #:use-module (guix download)
103 #:use-module (guix git-download)
104 #:use-module (guix utils)
105 #:use-module (guix build-system gnu)
106 #:use-module (guix build-system cmake)
107 #:use-module (guix build-system python)
108 #:use-module (guix build-system trivial)
109 #:use-module (srfi srfi-1))
110
111 (define-public python-2.7
112 (package
113 (name "python")
114 (version "2.7.12")
115 (source
116 (origin
117 (method url-fetch)
118 (uri (string-append "https://www.python.org/ftp/python/"
119 version "/Python-" version ".tar.xz"))
120 (sha256
121 (base32
122 "0y7rl603vmwlxm6ilkhc51rx2mfj14ckcz40xxgs0ljnvlhp30yp"))
123 (patches (search-patches "python-2.7-search-paths.patch"
124 "python-2-deterministic-build-info.patch"
125 "python-2.7-site-prefixes.patch"
126 "python-2.7-source-date-epoch.patch"))
127 (modules '((guix build utils)))
128 ;; suboptimal to delete failing tests here, but if we delete them in the
129 ;; arguments then we need to make sure to strip out that phase when it
130 ;; gets inherited by python and python-minimal.
131 (snippet
132 '(begin
133 (for-each delete-file
134 '("Lib/test/test_compileall.py"
135 "Lib/test/test_ctypes.py" ; fails on mips64el
136 "Lib/test/test_distutils.py"
137 "Lib/test/test_import.py"
138 "Lib/test/test_shutil.py"
139 "Lib/test/test_socket.py"
140 "Lib/test/test_subprocess.py"))
141 #t))))
142 (outputs '("out"
143 "tk")) ;tkinter; adds 50 MiB to the closure
144 (build-system gnu-build-system)
145 (arguments
146 `(;; 356 tests OK.
147 ;; 6 tests failed:
148 ;; test_compileall test_distutils test_import test_shutil test_socket
149 ;; test_subprocess
150 ;; 39 tests skipped:
151 ;; test_aepack test_al test_applesingle test_bsddb test_bsddb185
152 ;; test_bsddb3 test_cd test_cl test_codecmaps_cn test_codecmaps_hk
153 ;; test_codecmaps_jp test_codecmaps_kr test_codecmaps_tw test_curses
154 ;; test_dl test_gdb test_gl test_imageop test_imgfile test_ioctl
155 ;; test_kqueue test_linuxaudiodev test_macos test_macostools
156 ;; test_msilib test_ossaudiodev test_scriptpackages test_smtpnet
157 ;; test_socketserver test_startfile test_sunaudiodev test_timeout
158 ;; test_tk test_ttk_guionly test_urllib2net test_urllibnet
159 ;; test_winreg test_winsound test_zipfile64
160 ;; 4 skips unexpected on linux2:
161 ;; test_bsddb test_bsddb3 test_gdb test_ioctl
162 #:test-target "test"
163 #:configure-flags
164 (list "--enable-shared" ;allow embedding
165 "--with-system-ffi" ;build ctypes
166 "--with-ensurepip=install" ;install pip and setuptools
167 (string-append "LDFLAGS=-Wl,-rpath="
168 (assoc-ref %outputs "out") "/lib"))
169
170 #:modules ((ice-9 ftw) (ice-9 match)
171 (guix build utils) (guix build gnu-build-system))
172 #:phases
173 (modify-phases %standard-phases
174 (add-before
175 'configure 'patch-lib-shells
176 (lambda _
177 ;; Filter for existing files, since some may not exist in all
178 ;; versions of python that are built with this recipe.
179 (substitute* (filter file-exists?
180 '("Lib/subprocess.py"
181 "Lib/popen2.py"
182 "Lib/distutils/tests/test_spawn.py"
183 "Lib/test/test_subprocess.py"))
184 (("/bin/sh") (which "sh")))
185
186 ;; Use zero as the timestamp in .pyc files so that builds are
187 ;; deterministic. TODO: Remove it when this variable is set in
188 ;; gnu-build-system.scm.
189 (setenv "SOURCE_DATE_EPOCH" "1")
190 #t))
191 (add-before 'configure 'do-not-record-configure-flags
192 (lambda* (#:key configure-flags #:allow-other-keys)
193 ;; Remove configure flags from the installed '_sysconfigdata.py'
194 ;; and 'Makefile' so we don't end up keeping references to the
195 ;; build tools.
196 ;;
197 ;; Preserve at least '--with-system-ffi' since otherwise the
198 ;; thing tries to build libffi, fails, and we end up with a
199 ;; Python that lacks ctypes.
200 (substitute* "configure"
201 (("^CONFIG_ARGS=.*$")
202 (format #f "CONFIG_ARGS='~a'\n"
203 (if (member "--with-system-ffi" configure-flags)
204 "--with-system-ffi"
205 ""))))
206 #t))
207 (add-before
208 'check 'pre-check
209 (lambda _
210 ;; 'Lib/test/test_site.py' needs a valid $HOME
211 (setenv "HOME" (getcwd))
212 #t))
213 (add-after
214 'unpack 'set-source-file-times-to-1980
215 ;; XXX One of the tests uses a ZIP library to pack up some of the
216 ;; source tree, and fails with "ZIP does not support timestamps
217 ;; before 1980". Work around this by setting the file times in the
218 ;; source tree to sometime in early 1980.
219 (lambda _
220 (let ((circa-1980 (* 10 366 24 60 60)))
221 (ftw "." (lambda (file stat flag)
222 (utime file circa-1980 circa-1980)
223 #t))
224 #t)))
225 (add-after 'install 'remove-tests
226 ;; Remove 25 MiB of unneeded unit tests. Keep test_support.*
227 ;; because these files are used by some libraries out there.
228 (lambda* (#:key outputs #:allow-other-keys)
229 (let ((out (assoc-ref outputs "out")))
230 (match (scandir (string-append out "/lib")
231 (lambda (name)
232 (string-prefix? "python" name)))
233 ((pythonX.Y)
234 (let ((testdir (string-append out "/lib/" pythonX.Y
235 "/test")))
236 (with-directory-excursion testdir
237 (for-each delete-file-recursively
238 (scandir testdir
239 (match-lambda
240 ((or "." "..") #f)
241 (file
242 (not
243 (string-prefix? "test_support."
244 file))))))
245 (call-with-output-file "__init__.py" (const #t))
246 #t)))))))
247 (add-before 'strip 'make-libraries-writable
248 (lambda* (#:key outputs #:allow-other-keys)
249 ;; Make .so files writable so they can be stripped.
250 (let ((out (assoc-ref outputs "out")))
251 (for-each (lambda (file)
252 (chmod file #o755))
253 (find-files (string-append out "/lib")
254 "\\.so"))
255 #t)))
256 (add-after 'install 'move-tk-inter
257 (lambda* (#:key outputs #:allow-other-keys)
258 ;; When Tkinter support is built move it to a separate output so
259 ;; that the main output doesn't contain a reference to Tcl/Tk.
260 (let ((out (assoc-ref outputs "out"))
261 (tk (assoc-ref outputs "tk")))
262 (when tk
263 (match (find-files out "tkinter.*\\.so")
264 ((tkinter.so)
265 ;; The .so is in OUT/lib/pythonX.Y/lib-dynload, but we
266 ;; want it under TK/lib/pythonX.Y/site-packages.
267 (let* ((len (string-length out))
268 (target (string-append
269 tk "/"
270 (string-drop
271 (dirname (dirname tkinter.so))
272 len)
273 "/site-packages")))
274 (install-file tkinter.so target)
275 (delete-file tkinter.so)))))
276 #t))))))
277 (inputs
278 `(("bzip2" ,bzip2)
279 ("gdbm" ,gdbm)
280 ("libffi" ,libffi) ; for ctypes
281 ("sqlite" ,sqlite) ; for sqlite extension
282 ("openssl" ,openssl)
283 ("readline" ,readline)
284 ("zlib" ,zlib)
285 ("tcl" ,tcl)
286 ("tk" ,tk))) ; for tkinter
287 (native-inputs
288 `(("pkg-config" ,pkg-config)))
289 (native-search-paths
290 (list (search-path-specification
291 (variable "PYTHONPATH")
292 (files '("lib/python2.7/site-packages")))))
293 (home-page "https://www.python.org")
294 (synopsis "High-level, dynamically-typed programming language")
295 (description
296 "Python is a remarkably powerful dynamic programming language that
297 is used in a wide variety of application domains. Some of its key
298 distinguishing features include: clear, readable syntax; strong
299 introspection capabilities; intuitive object orientation; natural
300 expression of procedural code; full modularity, supporting hierarchical
301 packages; exception-based error handling; and very high level dynamic
302 data types.")
303 (license license:psfl)))
304
305 ;; Current 2.x version.
306 (define-public python-2 python-2.7)
307
308 (define-public python-3.5
309 (package (inherit python-2)
310 (version "3.5.2")
311 (source (origin
312 (method url-fetch)
313 (uri (string-append "https://www.python.org/ftp/python/"
314 version "/Python-" version ".tar.xz"))
315 (patches (search-patches
316 "python-fix-tests.patch"
317 "python-3.5-fix-tests.patch"
318 "python-3-deterministic-build-info.patch"
319 "python-3-search-paths.patch"))
320 (patch-flags '("-p0"))
321 (sha256
322 (base32
323 "0h6a5fr7ram2s483lh0pnmc4ncijb8llnpfdxdcl5dxr01hza400"))))
324 (arguments (substitute-keyword-arguments (package-arguments python-2)
325 ((#:tests? _) #t)))
326 (native-search-paths
327 (list (search-path-specification
328 (variable "PYTHONPATH")
329 (files (list (string-append "lib/python"
330 (version-major+minor version)
331 "/site-packages"))))))))
332
333 (define-public python-3.4
334 (package (inherit python-3.5)
335 (version "3.4.5")
336 (source (origin
337 (method url-fetch)
338 (uri (string-append "https://www.python.org/ftp/python/"
339 version "/Python-" version ".tar.xz"))
340 (patches (search-patches
341 "python-fix-tests.patch"
342 "python-3.4-fix-tests.patch"
343 "python-3-deterministic-build-info.patch"
344 "python-3-search-paths.patch"))
345 (patch-flags '("-p0"))
346 (sha256
347 (base32
348 "12l9klp778wklxmckhghniy5hklss8r26995pyd00qbllk4b2r7f"))))))
349
350 ;; Current 3.x version.
351 (define-public python-3 python-3.5)
352
353 ;; Current major version.
354 (define-public python python-3)
355
356 ;; Minimal variants of Python, mostly used to break the cycle between Tk and
357 ;; Python (Tk -> libxcb -> Python.)
358
359 (define-public python2-minimal
360 (package (inherit python-2)
361 (name "python-minimal")
362 (outputs '("out"))
363 (arguments
364 (substitute-keyword-arguments (package-arguments python-2)
365 ((#:configure-flags cf)
366 `(append ,cf '("--without-system-ffi")))))
367 (inputs '()))) ;none of the optional dependencies
368
369 (define-public python-minimal
370 (package (inherit python)
371 (name "python-minimal")
372 (outputs '("out"))
373
374 ;; Build fails due to missing ctypes without libffi.
375 ;; OpenSSL is a mandatory dependency of Python 3.x, for urllib;
376 ;; zlib is required by 'zipimport', used by pip.
377 (inputs `(("libffi" ,libffi)
378 ("openssl" ,openssl)
379 ("zlib" ,zlib)))))
380
381 (define* (wrap-python3 python
382 #:optional
383 (name (string-append (package-name python) "-wrapper")))
384 (package (inherit python)
385 (name name)
386 (source #f)
387 (build-system trivial-build-system)
388 (outputs '("out"))
389 (inputs `(("bash" ,bash)))
390 (propagated-inputs `(("python" ,python)))
391 (arguments
392 `(#:modules ((guix build utils))
393 #:builder
394 (begin
395 (use-modules (guix build utils))
396 (let ((bin (string-append (assoc-ref %outputs "out") "/bin"))
397 (python (string-append (assoc-ref %build-inputs "python") "/bin/")))
398 (mkdir-p bin)
399 (for-each
400 (lambda (old new)
401 (symlink (string-append python old)
402 (string-append bin "/" new)))
403 `("python3" ,"pydoc3" ,"idle3" ,"pip3")
404 `("python" ,"pydoc" ,"idle" ,"pip"))
405 ;; python-config outputs search paths based upon its location,
406 ;; use a bash wrapper to avoid changing its outputs.
407 (let ((bash (string-append (assoc-ref %build-inputs "bash")
408 "/bin/bash"))
409 (old (string-append python "python3-config"))
410 (new (string-append bin "/python-config")))
411 (with-output-to-file new
412 (lambda ()
413 (format #t "#!~a~%" bash)
414 (format #t "exec \"~a\" \"$@\"~%" old)
415 (chmod new #o755)
416 #t)))))))
417 (synopsis "Wrapper for the Python 3 commands")
418 (description
419 "This package provides wrappers for the commands of Python@tie{}3.x such
420 that they can be invoked under their usual name---e.g., @command{python}
421 instead of @command{python3}.")))
422
423 (define-public python-wrapper (wrap-python3 python))
424 (define-public python-minimal-wrapper (wrap-python3 python-minimal))
425
426 (define-public python-psutil
427 (package
428 (name "python-psutil")
429 (version "4.3.0")
430 (source
431 (origin
432 (method url-fetch)
433 (uri (pypi-uri "psutil" version))
434 (sha256
435 (base32
436 "1w4r09fvn6kd80m5mx4ws1wz100brkaq6hzzpwrns8cgjzjpl6c6"))))
437 (build-system python-build-system)
438 (home-page "https://www.github.com/giampaolo/psutil")
439 (synopsis "Library for retrieving information on running processes")
440 (description
441 "psutil (Python system and process utilities) is a library for retrieving
442 information on running processes and system utilization (CPU, memory, disks,
443 network) in Python. It is useful mainly for system monitoring, profiling and
444 limiting process resources and management of running processes. It implements
445 many functionalities offered by command line tools such as: ps, top, lsof,
446 netstat, ifconfig, who, df, kill, free, nice, ionice, iostat, iotop, uptime,
447 pidof, tty, taskset, pmap.")
448 (license license:bsd-3)))
449
450 (define-public python2-psutil
451 (package-with-python2 python-psutil))
452
453 (define-public python-passlib
454 (package
455 (name "python-passlib")
456 (version "1.6.5")
457 (source
458 (origin
459 (method url-fetch)
460 (uri (pypi-uri "passlib" version))
461 (sha256
462 (base32
463 "1z27wdxs5rj5xhhqfzvzn3yg682irkxw6dcs5jj7mcf97psk8gd8"))))
464 (build-system python-build-system)
465 (native-inputs
466 `(("python-nose" ,python-nose)))
467 (propagated-inputs
468 `(("python-py-bcrypt" ,python-py-bcrypt)))
469 (arguments
470 `(#:phases
471 (alist-cons-before
472 'check 'set-PYTHON_EGG_CACHE
473 ;; some tests require access to "$HOME/.cython"
474 (lambda* _ (setenv "PYTHON_EGG_CACHE" "/tmp"))
475 %standard-phases)))
476 (home-page "https://bitbucket.org/ecollins/passlib")
477 (synopsis
478 "Comprehensive password hashing framework")
479 (description
480 "Passlib is a password hashing library for Python 2 & 3, which provides
481 cross-platform implementations of over 30 password hashing algorithms, as well
482 as a framework for managing existing password hashes. It's designed to be
483 useful for a wide range of tasks, from verifying a hash found in /etc/shadow,
484 to providing full-strength password hashing for multi-user application.")
485 (license license:bsd-3)))
486
487 (define-public python2-passlib
488 (package-with-python2 python-passlib))
489
490 (define-public python-py-bcrypt
491 (package
492 (name "python-py-bcrypt")
493 (version "0.4")
494 (source
495 (origin
496 (method url-fetch)
497 (uri (string-append
498 "https://pypi.python.org/packages/source/p/py-bcrypt/py-bcrypt-"
499 version
500 ".tar.gz"))
501 (sha256
502 (base32
503 "0y6smdggwi5s72v6p1nn53dg6w05hna3d264cq6kas0lap73p8az"))))
504 (build-system python-build-system)
505 (home-page "https://code.google.com/p/py-bcrypt")
506 (synopsis
507 "Bcrypt password hashing and key derivation")
508 (description
509 "A python wrapper of OpenBSD's Blowfish password hashing code. This
510 system hashes passwords using a version of Bruce Schneier's Blowfish block
511 cipher with modifications designed to raise the cost of off-line password
512 cracking and frustrate fast hardware implementation. The computation cost of
513 the algorithm is parametised, so it can be increased as computers get faster.
514 The intent is to make a compromise of a password database less likely to
515 result in an attacker gaining knowledge of the plaintext passwords (e.g. using
516 John the Ripper).")
517 ;; "sha2.c" is under BSD-3;
518 ;; "blowfish.c" and "bcrypt.c" are under BSD-4;
519 ;; the rest is under ISC.
520 (license (list license:isc license:bsd-3 license:bsd-4))))
521
522 (define-public python2-py-bcrypt
523 (package-with-python2 python-py-bcrypt))
524
525
526 (define-public python-paramiko
527 (package
528 (name "python-paramiko")
529 (version "1.16.0")
530 (source
531 (origin
532 (method url-fetch)
533 (uri (pypi-uri "paramiko" version))
534 (sha256
535 (base32
536 "14k8z7ndc3zk5xivnm4d8lncchx475ll5izpf8vmfbq7rp9yp5rj"))))
537 (build-system python-build-system)
538 (propagated-inputs
539 `(("python-pycrypto" ,python-pycrypto)
540 ("python-ecdsa" ,python-ecdsa)))
541 (home-page "http://www.paramiko.org/")
542 (synopsis "SSHv2 protocol library")
543 (description "Paramiko is a python implementation of the SSHv2 protocol,
544 providing both client and server functionality. While it leverages a Python C
545 extension for low level cryptography (PyCrypto), Paramiko itself is a pure
546 Python interface around SSH networking concepts.")
547 (license license:lgpl2.1+)))
548
549 (define-public python2-paramiko
550 (package-with-python2 python-paramiko))
551
552
553 (define-public python-httplib2
554 (package
555 (name "python-httplib2")
556 (version "0.9.2")
557 (source
558 (origin
559 (method url-fetch)
560 (uri (pypi-uri "httplib2" version))
561 (sha256
562 (base32
563 "126rsryvw9vhbf3qmsfw9lf4l4xm2srmgs439lgma4cpag4s3ay3"))))
564 (build-system python-build-system)
565 (home-page "https://github.com/jcgregorio/httplib2")
566 (synopsis "Comprehensive HTTP client library")
567 (description
568 "A comprehensive HTTP client library supporting many features left out of
569 other HTTP libraries.")
570 (license license:expat)))
571
572 (define-public python2-httplib2
573 (package-with-python2 python-httplib2))
574
575 (define-public python-ecdsa
576 (package
577 (name "python-ecdsa")
578 (version "0.13")
579 (source
580 (origin
581 (method url-fetch)
582 (uri (string-append
583 "https://pypi.python.org/packages/source/e/ecdsa/ecdsa-"
584 version
585 ".tar.gz"))
586 (sha256
587 (base32
588 "1yj31j0asmrx4an9xvsaj2icdmzy6pw0glfpqrrkrphwdpi1xkv4"))))
589 (build-system python-build-system)
590 (inputs
591 `(("openssl" ,openssl)))
592 (home-page
593 "http://github.com/warner/python-ecdsa")
594 (synopsis
595 "ECDSA cryptographic signature library (pure python)")
596 (description
597 "This is an easy-to-use implementation of ECDSA cryptography (Elliptic
598 Curve Digital Signature Algorithm), implemented purely in Python. With this
599 library, you can quickly create keypairs (signing key and verifying key), sign
600 messages, and verify the signatures. The keys and signatures are very short,
601 making them easy to handle and incorporate into other protocols.")
602 (license license:expat)))
603
604 (define-public python2-ecdsa
605 (package-with-python2 python-ecdsa))
606
607 (define-public python-ccm
608 (package
609 (name "python-ccm")
610 (version "2.1.6")
611 (source
612 (origin
613 (method url-fetch)
614 (uri (pypi-uri "ccm" version))
615 (sha256
616 (base32
617 "177dfxsmk3k4cih6fh6v8d91bh4nqx7ns6pc07w7m7i3cvdx3c8n"))))
618 (build-system python-build-system)
619 (propagated-inputs
620 `(("python-pyyaml" ,python-pyyaml)
621 ;; 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 (modules '((guix build utils)))
830 (snippet
831 '(begin
832 ;; Remove included binaries which are used to build self-extracting
833 ;; installers for Windows.
834 ;; TODO: Find some way to build them ourself so we can include them.
835 (for-each delete-file (find-files "setuptools" "^(cli|gui).*\\.exe$"))
836 #t))))
837 (build-system python-build-system)
838 ;; FIXME: Tests require pytest, which itself relies on setuptools.
839 ;; One could bootstrap with an internal untested setuptools.
840 (arguments
841 `(#:tests? #f))
842 (home-page "https://pypi.python.org/pypi/setuptools")
843 (synopsis
844 "Library designed to facilitate packaging Python projects")
845 (description
846 "Setuptools is a fully-featured, stable library designed to facilitate
847 packaging Python projects, where packaging includes:
848 Python package and module definitions,
849 distribution package metadata,
850 test hooks,
851 project installation,
852 platform-specific details,
853 Python 3 support.")
854 (license license:psfl)))
855
856 (define-public python2-setuptools
857 (package-with-python2 python-setuptools))
858
859
860 (define-public python-pycrypto
861 (package
862 (name "python-pycrypto")
863 (version "2.6.1")
864 (source
865 (origin
866 (method url-fetch)
867 (uri (string-append "https://pypi.python.org/packages/source/p/"
868 "pycrypto/pycrypto-" version ".tar.gz"))
869 (sha256
870 (base32
871 "0g0ayql5b9mkjam8hym6zyg6bv77lbh66rv1fyvgqb17kfc1xkpj"))))
872 (build-system python-build-system)
873 (inputs
874 `(("python" ,python)
875 ("gmp" ,gmp)))
876 (arguments
877 `(#:phases
878 (alist-cons-before
879 'build 'set-build-env
880 ;; pycrypto runs an autoconf configure script behind the scenes
881 (lambda _
882 (setenv "CONFIG_SHELL" (which "bash")))
883 %standard-phases)))
884 (home-page "http://www.pycrypto.org/")
885 (synopsis "Cryptographic modules for Python")
886 (description
887 "Pycrypto is a collection of both secure hash functions (such as SHA256
888 and RIPEMD160), and various encryption algorithms (AES, DES, RSA, ElGamal,
889 etc.). The package is structured to make adding new modules easy.")
890 (license license:public-domain)))
891
892 (define-public python2-pycrypto
893 (let ((pycrypto (package-with-python2 python-pycrypto)))
894 (package (inherit pycrypto)
895 (inputs
896 `(("python" ,python-2)
897 ,@(alist-delete
898 "python"
899 (package-inputs pycrypto)))))))
900
901 (define-public python-keyring
902 (package
903 (name "python-keyring")
904 (version "8.7")
905 (source
906 (origin
907 (method url-fetch)
908 (uri (pypi-uri "keyring" version))
909 (sha256
910 (base32
911 "0482rmi2x6p78wl2kz8qzyq21xz1sbbfwnv5x7dggar4vkwxhzfx"))))
912 (build-system python-build-system)
913 (native-inputs
914 `(("python-setuptools-scm" ,python-setuptools-scm)))
915 (propagated-inputs
916 `(("python-pycrypto" ,python-pycrypto)))
917 (arguments
918 `(#:tests? #f)) ;TODO: tests require pytest
919 (home-page "https://github.com/jaraco/keyring")
920 (synopsis "Store and access your passwords safely")
921 (description
922 "The Python keyring lib provides a easy way to access the system keyring
923 service from python. It can be used in any application that needs safe
924 password storage.")
925 ;; "MIT" and PSF dual license
926 (license license:x11)))
927
928 (define-public python2-keyring
929 (package-with-python2 python-keyring))
930
931 (define-public python-six
932 (package
933 (name "python-six")
934 (version "1.10.0")
935 (source
936 (origin
937 (method url-fetch)
938 (uri (pypi-uri "six" version))
939 (sha256
940 (base32
941 "0snmb8xffb3vsma0z67i0h0w2g2dy0p3gsgh9gi4i0kgc5l8spqh"))))
942 (build-system python-build-system)
943 (home-page "http://pypi.python.org/pypi/six/")
944 (synopsis "Python 2 and 3 compatibility utilities")
945 (description
946 "Six is a Python 2 and 3 compatibility library. It provides utility
947 functions for smoothing over the differences between the Python versions with
948 the goal of writing Python code that is compatible on both Python versions.
949 Six supports every Python version since 2.5. It is contained in only one
950 Python file, so it can be easily copied into your project.")
951 (license license:x11)))
952
953 (define-public python2-six
954 (package-with-python2 python-six))
955
956 (define-public python-dateutil-2
957 (package
958 (name "python-dateutil")
959 (version "2.5.2")
960 (source
961 (origin
962 (method url-fetch)
963 (uri (pypi-uri "python-dateutil" version))
964 (sha256
965 (base32
966 "0jrfpcgvgya6hs45dhrd9yiqgdgz9qp9aa07zsw8gqgn8zphff86"))))
967 (build-system python-build-system)
968 (propagated-inputs
969 `(("python-six" ,python-six)))
970 (home-page "https://dateutil.readthedocs.io/en/stable/")
971 (synopsis "Extensions to the standard datetime module")
972 (description
973 "The dateutil module provides powerful extensions to the standard
974 datetime module, available in Python 2.3+.")
975 (license license:bsd-3)))
976
977 (define-public python2-dateutil-2
978 (package-with-python2 python-dateutil-2))
979
980 (define-public python-dateutil
981 (package
982 (name "python-dateutil")
983 (version "1.5") ; last version for python < 3
984 (source
985 (origin
986 (method url-fetch)
987 (uri (string-append "http://labix.org/download/python-dateutil/"
988 "python-dateutil-" version ".tar.gz"))
989 (sha256
990 (base32
991 "0fqfglhy5khbvsipr3x7m6bcaqljh8xl5cw33vbfxy7qhmywm2n0"))))
992 (build-system python-build-system)
993 (home-page "https://dateutil.readthedocs.io/en/stable/")
994 (synopsis "Extensions to the standard datetime module")
995 (description
996 "The dateutil module provides powerful extensions to the standard
997 datetime module, available in Python 2.3+.")
998 (license license:psfl)))
999
1000 (define-public python2-dateutil
1001 (package-with-python2 python-dateutil))
1002
1003 (define-public python-parsedatetime
1004 (package
1005 (name "python-parsedatetime")
1006 (version "2.1")
1007 (source
1008 (origin
1009 (method url-fetch)
1010 (uri (pypi-uri "parsedatetime" version))
1011 (sha256
1012 (base32
1013 "0bdgyw6y3v7bcxlx0p50s8drxsh5bb5cy2afccqr3j90amvpii8p"))))
1014 (build-system python-build-system)
1015 (native-inputs
1016 `(("python-nose" ,python-nose)
1017 ("python-pyicu" ,python-pyicu)))
1018 (home-page "http://github.com/bear/parsedatetime/")
1019 (synopsis
1020 "Parse human-readable date/time text")
1021 (description
1022 "Parse human-readable date/time text.")
1023 (license license:asl2.0)))
1024
1025 (define-public python2-parsedatetime
1026 (package-with-python2 python-parsedatetime))
1027
1028 (define-public python-pandas
1029 (package
1030 (name "python-pandas")
1031 (version "0.18.1")
1032 (source
1033 (origin
1034 (method url-fetch)
1035 (uri (string-append
1036 "https://pypi.python.org/packages/11/09/"
1037 "e66eb844daba8680ddff26335d5b4fead77f60f957678243549a8dd4830d/"
1038 "pandas-" version ".tar.gz"))
1039 (sha256
1040 (base32 "1ckpxrvvjj6zxmn68icd9hib8qcpx9b35f6izxnr25br5ilq7r6j"))))
1041 (build-system python-build-system)
1042 (propagated-inputs
1043 `(("python-numpy" ,python-numpy)
1044 ("python-pytz" ,python-pytz)
1045 ("python-dateutil" ,python-dateutil-2)))
1046 (native-inputs
1047 `(("python-nose" ,python-nose)
1048 ("python-cython" ,python-cython)))
1049 (home-page "http://pandas.pydata.org")
1050 (synopsis "Data structures for data analysis, time series, and statistics")
1051 (description
1052 "Pandas is a Python package providing fast, flexible, and expressive data
1053 structures designed to make working with structured (tabular,
1054 multidimensional, potentially heterogeneous) and time series data both easy
1055 and intuitive. It aims to be the fundamental high-level building block for
1056 doing practical, real world data analysis in Python.")
1057 (license license:bsd-3)))
1058
1059 (define-public python2-pandas
1060 (package-with-python2 python-pandas))
1061
1062 (define-public python-tzlocal
1063 (package
1064 (name "python-tzlocal")
1065 (version "1.2.2")
1066 (source
1067 (origin
1068 (method url-fetch)
1069 (uri (pypi-uri "tzlocal" version))
1070 (sha256
1071 (base32
1072 "0paj7vlsb0np8b5sp4bv64wxv7qk2piyp7xg29pkhdjwsbls9fnb"))))
1073 (build-system python-build-system)
1074 (propagated-inputs
1075 `(("python-pytz" ,python-pytz)))
1076 (home-page "https://github.com/regebro/tzlocal")
1077 (synopsis
1078 "Local timezone information for Python")
1079 (description
1080 "Tzlocal returns a tzinfo object with the local timezone information.
1081 This module attempts to fix a glaring hole in pytz, that there is no way to
1082 get the local timezone information, unless you know the zoneinfo name, and
1083 under several distributions that's hard or impossible to figure out.")
1084 (license license:cc0)))
1085
1086 (define-public python2-pysqlite
1087 (package
1088 (name "python2-pysqlite")
1089 (version "2.8.1")
1090 (source
1091 (origin
1092 (method url-fetch)
1093 (uri (pypi-uri "pysqlite" version))
1094 (sha256
1095 (base32
1096 "0rm0zqyb363y6wljhfmbxs16jjv7p8nk1d8zgq9sdwj6js7y3jkm"))))
1097 (build-system python-build-system)
1098 (inputs
1099 `(("sqlite" ,sqlite)))
1100 (arguments
1101 `(#:python ,python-2 ; incompatible with Python 3
1102 #:tests? #f)) ; no test target
1103 (home-page "http://github.com/ghaering/pysqlite")
1104 (synopsis "SQLite bindings for Python")
1105 (description
1106 "Pysqlite provides SQLite bindings for Python that comply to the
1107 Database API 2.0T.")
1108 (license license:zlib)))
1109
1110
1111 (define-public python2-mechanize
1112 (package
1113 (name "python2-mechanize")
1114 (version "0.2.5")
1115 (source
1116 (origin
1117 (method url-fetch)
1118 (uri (string-append "https://pypi.python.org/packages/source/m/mechanize/mechanize-"
1119 version ".tar.gz"))
1120 (sha256
1121 (base32
1122 "0rj7r166i1dyrq0ihm5rijfmvhs8a04im28lv05c0c3v206v4rrf"))))
1123 (build-system python-build-system)
1124 (arguments
1125 `(#:python ,python-2 ; apparently incompatible with Python 3
1126 #:tests? #f))
1127 ;; test fails with message
1128 ;; AttributeError: 'module' object has no attribute 'test_pullparser'
1129 ;; (python-3.3.2) or
1130 ;; AttributeError: 'module' object has no attribute 'test_urllib2_localnet'
1131 ;; (python-2.7.5).
1132 ;; The source code is from March 2011 and probably not up-to-date
1133 ;; with respect to python unit tests.
1134 (home-page "http://wwwsearch.sourceforge.net/mechanize/")
1135 (synopsis
1136 "Stateful programmatic web browsing in Python")
1137 (description
1138 "Mechanize implements stateful programmatic web browsing in Python,
1139 after Andy Lester’s Perl module WWW::Mechanize.")
1140 (license (license:non-copyleft
1141 "file://COPYING"
1142 "See COPYING in the distribution."))))
1143
1144
1145 (define-public python-simplejson
1146 (package
1147 (name "python-simplejson")
1148 (version "3.8.2")
1149 (source
1150 (origin
1151 (method url-fetch)
1152 (uri (pypi-uri "simplejson" version))
1153 (sha256
1154 (base32
1155 "0zylrnax8b6r0ndgni4w9c599fi6wm9vx5g6k3ddqfj3932kk16m"))))
1156 (build-system python-build-system)
1157 (home-page "http://simplejson.readthedocs.org/en/latest/")
1158 (synopsis
1159 "Json library for Python")
1160 (description
1161 "JSON (JavaScript Object Notation) is a subset of JavaScript
1162 syntax (ECMA-262 3rd edition) used as a lightweight data interchange
1163 format.
1164
1165 Simplejson exposes an API familiar to users of the standard library marshal
1166 and pickle modules. It is the externally maintained version of the json
1167 library contained in Python 2.6, but maintains compatibility with Python 2.5
1168 and (currently) has significant performance advantages, even without using
1169 the optional C extension for speedups. Simplejson is also supported on
1170 Python 3.3+.")
1171 (license license:x11)))
1172
1173 (define-public python2-simplejson
1174 (package-with-python2 python-simplejson))
1175
1176
1177 (define-public python-pyicu
1178 (package
1179 (name "python-pyicu")
1180 (version "1.9.2")
1181 (source
1182 (origin
1183 (method url-fetch)
1184 (uri (string-append "https://pypi.python.org/packages/source/P/PyICU/PyICU-"
1185 version ".tar.gz"))
1186 (sha256
1187 (base32
1188 "1diba0g8md614fvm9yf50paiwdkhj6rd7xwf1rg9mc0pxc0hhn4v"))))
1189 (build-system python-build-system)
1190 (inputs
1191 `(("icu4c" ,icu4c)))
1192 (home-page "http://pyicu.osafoundation.org/")
1193 (synopsis "Python extension wrapping the ICU C++ API")
1194 (description
1195 "PyICU is a python extension wrapping the ICU C++ API.")
1196 (license license:x11)))
1197
1198 (define-public python2-pyicu
1199 (package-with-python2 python-pyicu))
1200
1201 (define-public python2-dogtail
1202 ;; Python 2 only, as it leads to "TabError: inconsistent use of tabs and
1203 ;; spaces in indentation" with Python 3.
1204 (package
1205 (name "python2-dogtail")
1206 (version "0.8.2")
1207 (source (origin
1208 (method url-fetch)
1209 (uri (string-append
1210 "https://fedorahosted.org/released/dogtail/dogtail-"
1211 version ".tar.gz"))
1212 (sha256
1213 (base32
1214 "1yc4cg7ip87z15gyd4wy2vzbywrjc52a3m8r8gqy2b50d65llcg1"))))
1215 (build-system python-build-system)
1216 (arguments `(#:python ,python-2
1217 #:tests? #f)) ; invalid command "test"
1218 (home-page "https://fedorahosted.org/dogtail/")
1219 (synopsis "GUI test tool and automation framework written in ​Python")
1220 (description
1221 "Dogtail is a GUI test tool and automation framework written in Python.
1222 It uses Accessibility (a11y) technologies to communicate with desktop
1223 applications. dogtail scripts are written in Python and executed like any
1224 other Python program.")
1225 (license license:gpl2+)))
1226
1227 (define-public python2-empy
1228 (package
1229 (name "python2-empy")
1230 (version "3.3")
1231 (source (origin
1232 (method url-fetch)
1233 (uri (string-append "http://www.alcyone.com/software/empy/empy-"
1234 version ".tar.gz"))
1235 (sha256
1236 (base32
1237 "01g8mmkfnvjdmlhsihwyx56lrg7r5m5d2fg6mnxsvy6g0dnl69f6"))))
1238 (build-system python-build-system)
1239 (arguments
1240 `(#:python ,python-2
1241 #:phases (alist-replace
1242 'check
1243 (lambda _
1244 (zero? (system* "./test.sh")))
1245 %standard-phases)))
1246 (home-page "http://www.alcyone.com/software/empy/")
1247 (synopsis "Templating system for Python")
1248 (description
1249 "EmPy is a system for embedding Python expressions and statements in
1250 template text; it takes an EmPy source file, processes it, and produces
1251 output. This is accomplished via expansions, which are special signals to the
1252 EmPy system and are set off by a special prefix (by default the at sign, @@).
1253 EmPy can expand arbitrary Python expressions and statements in this way, as
1254 well as a variety of special forms. Textual data not explicitly delimited in
1255 this way is sent unaffected to the output, allowing Python to be used in
1256 effect as a markup language. Also supported are callbacks via hooks,
1257 recording and playback via diversions, and dynamic, chainable filters. The
1258 system is highly configurable via command line options and embedded
1259 commands.")
1260 (license license:lgpl2.1+)))
1261
1262 (define-public python2-element-tree
1263 (package
1264 (name "python2-element-tree")
1265 (version "1.2.6")
1266 (source (origin
1267 (method url-fetch)
1268 (uri (string-append
1269 "http://effbot.org/media/downloads/elementtree-"
1270 version "-20050316.tar.gz"))
1271 (sha256
1272 (base32
1273 "016bphqnlg0l4vslahhw4r0aanw95bpypy65r1i1acyb2wj5z7dj"))))
1274 (build-system python-build-system)
1275 (arguments
1276 `(#:python ,python-2 ; seems to be part of Python 3
1277 #:tests? #f)) ; no 'test' sub-command
1278 (synopsis "Toolkit for XML processing in Python")
1279 (description
1280 "ElementTree is a Python library supporting lightweight XML processing.")
1281 (home-page "http://effbot.org/zone/element-index.htm")
1282 (license (license:x11-style
1283 "http://docs.python.org/2/license.html"
1284 "Like \"CWI LICENSE AGREEMENT FOR PYTHON 0.9.0 THROUGH 1.2\"."))))
1285
1286 (define-public python2-pybugz
1287 (package
1288 (name "python2-pybugz")
1289 (version "0.6.11")
1290 (source (origin
1291 (method url-fetch)
1292 (uri (string-append
1293 "http://bits.liquidx.net/projects/pybugz/pybugz-"
1294 version ".tar.gz"))
1295 (sha256
1296 (base32
1297 "17ni00p08gp5lkxlrrcnvi3x09fmajnlbz4da03qcgl9q21ym4jd"))
1298 (patches (search-patches "pybugz-stty.patch"
1299 "pybugz-encode-error.patch"))))
1300 (build-system python-build-system)
1301 (arguments
1302 `(#:python ,python-2 ; SyntaxError with Python 3
1303 #:tests? #f)) ; no 'test' sub-command
1304 (propagated-inputs
1305 `(("element-tree" ,python2-element-tree)))
1306 (synopsis "Python and command-line interface to Bugzilla")
1307 (description
1308 "PyBugz is a Python library and command-line tool to query the Bugzilla
1309 bug tracking system. It is meant as an aid to speed up interaction with the
1310 bug tracker.")
1311 (home-page "http://www.liquidx.net/pybugz/")
1312 (license license:gpl2)))
1313
1314 (define-public python-enum34
1315 (package
1316 (name "python-enum34")
1317 (version "1.1.0")
1318 (source
1319 (origin
1320 (method url-fetch)
1321 (uri (pypi-uri "enum34" version))
1322 (sha256
1323 (base32
1324 "0yx1m4564wxgbm4glb3457hi16xihd9w63rv13y2przkdir9dfgp"))))
1325 (build-system python-build-system)
1326 (arguments
1327 `(#:phases
1328 (alist-replace
1329 'check
1330 (lambda _ (zero? (system* "python" "enum/test_enum.py")))
1331 %standard-phases)))
1332 (home-page "https://pypi.python.org/pypi/enum34")
1333 (synopsis "Backported Python 3.4 Enum")
1334 (description
1335 "Enum34 is the new Python stdlib enum module available in Python 3.4
1336 backported for previous versions of Python from 2.4 to 3.3.")
1337 (license license:bsd-3)))
1338
1339 (define-public python2-enum34
1340 (package-with-python2 python-enum34))
1341
1342 (define-public python-parse-type
1343 (package
1344 (name "python-parse-type")
1345 (version "0.3.4")
1346 (source
1347 (origin
1348 (method url-fetch)
1349 (uri (string-append "https://pypi.python.org/packages/source/p/"
1350 "parse_type/parse_type-" version ".tar.gz"))
1351 (sha256
1352 (base32
1353 "0iv1c34npr4iynwpgv1vkjx9rjd18a85ir8c01gc5f7wp8iv7l1x"))))
1354 (build-system python-build-system)
1355 (propagated-inputs
1356 `(("python-six" ,python-six)
1357 ("python-parse" ,python-parse)))
1358 (arguments '(#:tests? #f)) ;TODO: tests require pytest
1359 (home-page "https://github.com/jenisys/parse_type")
1360 (synopsis "Extended parse module")
1361 (description
1362 "Parse_type extends the python parse module.")
1363 (license license:bsd-3)))
1364
1365 (define-public python-parse
1366 (package
1367 (name "python-parse")
1368 (version "1.6.6")
1369 (source
1370 (origin
1371 (method url-fetch)
1372 (uri (pypi-uri "parse" version))
1373 (sha256
1374 (base32
1375 "0y31i3mwgv35qn0kzzjn9q8jqfdqmbi6sr6yfvn8rq4lqjm5lhvi"))
1376 (patches (search-patches "python-parse-too-many-fields.patch"))))
1377 (build-system python-build-system)
1378 (arguments
1379 `(#:phases
1380 (modify-phases %standard-phases
1381 (replace 'check
1382 (lambda _ (zero? (system* "python" "test_parse.py")))))))
1383 (home-page "https://github.com/r1chardj0n3s/parse")
1384 (synopsis "Parse strings")
1385 (description
1386 "Parse strings using a specification based on the Python format()
1387 syntax.")
1388 (license license:x11)))
1389
1390
1391 (define-public scons
1392 (package
1393 (name "scons")
1394 (version "2.3.4")
1395 (source (origin
1396 (method url-fetch)
1397 (uri (string-append "mirror://sourceforge/scons/scons/" version
1398 "/scons-" version ".tar.gz"))
1399 (sha256
1400 (base32
1401 "0hdlci43wjz8maryj83mz04ir6rwcdrrzpd7cpzvdlzycqhdfmsb"))))
1402 (build-system python-build-system)
1403 (arguments
1404 ;; With Python 3.x, fails to build with a syntax error.
1405 `(#:python ,python-2
1406 #:use-setuptools? #f ; still relies on distutils
1407 #:tests? #f)) ; no 'python setup.py test' command
1408 (home-page "http://scons.org/")
1409 (synopsis "Software construction tool written in Python")
1410 (description
1411 "SCons is a software construction tool. Think of SCons as an improved,
1412 cross-platform substitute for the classic Make utility with integrated
1413 functionality similar to autoconf/automake and compiler caches such as ccache.
1414 In short, SCons is an easier, more reliable and faster way to build
1415 software.")
1416 (license license:x11)))
1417
1418 (define-public python-extras
1419 (package
1420 (name "python-extras")
1421 (version "0.0.3")
1422 (source
1423 (origin
1424 (method url-fetch)
1425 (uri (string-append
1426 "https://pypi.python.org/packages/source/e/extras/extras-"
1427 version ".tar.gz"))
1428 (sha256
1429 (base32
1430 "1h7zx4dfyclalg0fqnfjijpn0f793a9mx8sy3b27gd31nr6dhq3s"))))
1431 (build-system python-build-system)
1432 (arguments
1433 ;; error in setup.cfg: command 'test' has no such option 'buffer'
1434 '(#:tests? #f))
1435 (home-page "https://github.com/testing-cabal/extras")
1436 (synopsis "Useful extensions to the Python standard library")
1437 (description
1438 "Extras is a set of extensions to the Python standard library.")
1439 (license license:expat)))
1440
1441 (define-public python2-extras
1442 (package-with-python2 python-extras))
1443
1444 (define-public python-mimeparse
1445 (package
1446 (name "python-mimeparse")
1447 (version "0.1.4")
1448 (source
1449 (origin
1450 (method url-fetch)
1451 (uri (string-append
1452 "https://pypi.python.org/packages/source/p/python-mimeparse/python-mimeparse-"
1453 version ".tar.gz"))
1454 (sha256
1455 (base32
1456 "1hyxg09kaj02ri0rmwjqi86wk4nd1akvv7n0dx77azz76wga4s9w"))))
1457 (build-system python-build-system)
1458 (arguments
1459 '(#:tests? #f)) ; no setup.py test command
1460 (home-page
1461 "https://github.com/dbtsai/python-mimeparse")
1462 (synopsis "Python library for parsing MIME types")
1463 (description
1464 "Mimeparse provides basic functions for parsing MIME type names and
1465 matching them against a list of media-ranges.")
1466 (license license:expat)))
1467
1468 (define-public python2-mimeparse
1469 (package-with-python2 python-mimeparse))
1470
1471 (define-public python-nose
1472 (package
1473 (name "python-nose")
1474 (version "1.3.7")
1475 (source
1476 (origin
1477 (method url-fetch)
1478 (uri (pypi-uri "nose" version))
1479 (sha256
1480 (base32
1481 "164a43k7k2wsqqk1s6vavcdamvss4mz0vd6pwzv2h9n8rgwzxgzi"))))
1482 (build-system python-build-system)
1483 (arguments
1484 '(#:tests? #f)) ; FIXME: test suite fails
1485 (home-page "http://readthedocs.org/docs/nose/")
1486 (synopsis "Python testing library")
1487 (description
1488 "Nose extends the unittest library to make testing easier.")
1489 (license license:lgpl2.0+)))
1490
1491 (define-public python2-nose
1492 (package-with-python2 python-nose))
1493
1494 (define-public python-nose2
1495 (package
1496 (name "python-nose2")
1497 (version "0.6.5")
1498 (source
1499 (origin
1500 (method url-fetch)
1501 (uri (pypi-uri "nose2" version))
1502 (sha256
1503 (base32
1504 "1x4zjq1zlyrh8b9ba0cmafd3w94pxhid408kibyjd3s6h1lap6s7"))))
1505 (build-system python-build-system)
1506 (arguments `(#:tests? #f)) ; 'module' object has no attribute 'collector'
1507 (propagated-inputs
1508 `(("python-cov-core" ,python-cov-core)
1509 ("python-pytest-cov" ,python-pytest-cov)
1510 ("python-six" ,python-six)))
1511 (home-page "https://github.com/nose-devs/nose2")
1512 (synopsis "Next generation of nicer testing for Python")
1513 (description
1514 "Nose2 is the next generation of nicer testing for Python, based on the
1515 plugins branch of unittest2. Nose2 aims to improve on nose by providing a
1516 better plugin api, being easier for users to configure, and simplifying internal
1517 interfaces and processes.")
1518 (license license:bsd-2)))
1519
1520 (define-public python2-nose2
1521 (package-with-python2 python-nose2))
1522
1523 (define-public python-unittest2
1524 (package
1525 (name "python-unittest2")
1526 (version "0.5.1")
1527 (source
1528 (origin
1529 (method url-fetch)
1530 (uri (string-append
1531 "https://pypi.python.org/packages/source/u/unittest2py3k/unittest2py3k-"
1532 version ".tar.gz"))
1533 (sha256
1534 (base32
1535 "00yl6lskygcrddx5zspkhr0ibgvpknl4678kkm6s626539grq93q"))))
1536 (build-system python-build-system)
1537 (home-page "http://pypi.python.org/pypi/unittest2")
1538 (synopsis "Python unit testing library")
1539 (description
1540 "Unittest2 is a replacement for the unittest module in the Python
1541 standard library.")
1542 (license license:psfl)))
1543
1544 (define-public python2-unittest2
1545 (package (inherit python-unittest2)
1546 (name "python2-unittest2")
1547 (version "0.5.1")
1548 (source
1549 (origin
1550 (method url-fetch)
1551 (uri (string-append
1552 "https://pypi.python.org/packages/source/u/unittest2/unittest2-"
1553 version ".tar.gz"))
1554 (sha256
1555 (base32
1556 "0wbs4i4x3x7klr3v35ss6p9mcqz883i1xgcpkhvl7n2lyv6yhpda"))))
1557 (arguments
1558 `(#:python ,python-2
1559 #:tests? #f)))) ; no setup.py test command
1560
1561 (define-public python-pafy
1562 (package
1563 (name "python-pafy")
1564 (version "0.5.2")
1565 (source
1566 (origin
1567 (method url-fetch)
1568 (uri (pypi-uri "pafy" version))
1569 (sha256
1570 (base32
1571 "1ckvrypyvb7jbqlgwdz0y337ajagjv7dgxyns326nqwypn1wpq0i"))))
1572 (build-system python-build-system)
1573 (propagated-inputs
1574 ;; Youtube-dl is a python package which is imported in the file
1575 ;; "backend_youtube_dl.py", therefore it needs to be propagated.
1576 `(("youtube-dl" ,youtube-dl)))
1577 (home-page "https://np1.github.io/pafy/")
1578 (synopsis "Retrieve YouTube content and metadata")
1579 (description
1580 "@code{pafy} is a python library to retrieve YouTube content and metadata.")
1581 (license license:lgpl3+)))
1582
1583 (define-public python-py
1584 (package
1585 (name "python-py")
1586 (version "1.4.31")
1587 (source
1588 (origin
1589 (method url-fetch)
1590 (uri (pypi-uri "py" version))
1591 (sha256
1592 (base32
1593 "0561gz2w3i825gyl42mcq14y3dcgkapfiv5zv9a2bz15qxiijl56"))))
1594 (build-system python-build-system)
1595 (home-page "http://pylib.readthedocs.org/")
1596 (synopsis "Python library for parsing, I/O, instrospection, and logging")
1597 (description
1598 "Py is a Python library for file name parsing, .ini file parsing, I/O,
1599 code introspection, and logging.")
1600 (license license:expat)))
1601
1602 (define-public python2-py
1603 (package-with-python2 python-py))
1604
1605 (define-public python-pytest
1606 (package
1607 (name "python-pytest")
1608 (version "2.7.3")
1609 (source
1610 (origin
1611 (method url-fetch)
1612 (uri (string-append
1613 "https://pypi.python.org/packages/source/p/pytest/pytest-"
1614 version ".tar.gz"))
1615 (sha256
1616 (base32
1617 "1z4yi986f9n0p8qmzmn21m21m8j1x78hk3505f89baqm6pdw7afm"))
1618 (modules '((guix build utils)))
1619 (snippet
1620 ;; One of the tests involves the /usr directory, so it fails.
1621 '(substitute* "testing/test_argcomplete.py"
1622 (("def test_remove_dir_prefix\\(self\\):")
1623 "@pytest.mark.xfail\n def test_remove_dir_prefix(self):")))))
1624 (build-system python-build-system)
1625 (propagated-inputs
1626 `(("python-py" ,python-py)))
1627 (native-inputs
1628 `(("python-nose" ,python-nose)
1629 ("python-mock" ,python-mock)))
1630 (home-page "http://pytest.org")
1631 (synopsis "Python testing library")
1632 (description
1633 "Pytest is a testing tool that provides auto-discovery of test modules
1634 and functions, detailed info on failing assert statements, modular fixtures,
1635 and many external plugins.")
1636 (license license:expat)))
1637
1638 (define-public python2-pytest
1639 (package-with-python2 python-pytest))
1640
1641 ;; This package is used by Borg until we can upgrade all our Python packages to
1642 ;; use a more recent pytest.
1643 (define-public python-pytest-2.9.2
1644 (package
1645 (inherit python-pytest)
1646 (name "python-pytest")
1647 (version "2.9.2")
1648 (source (origin
1649 (method url-fetch)
1650 (uri (pypi-uri "pytest" version))
1651 (sha256
1652 (base32
1653 "1n6igbc1b138wx1q5gca4pqw1j6nsyicfxds5n0b5989kaxqmh8j"))))
1654 (arguments
1655 `(#:phases
1656 (modify-phases %standard-phases
1657 (add-before 'check 'disable-invalid-test
1658 (lambda _
1659 (substitute* "testing/test_argcomplete.py"
1660 (("def test_remove_dir_prefix" line)
1661 (string-append "@pytest.mark.skip"
1662 "(reason=\"Assumes that /usr exists.\")\n "
1663 line)))
1664 #t)))))))
1665
1666 (define-public python-pytest-cov
1667 (package
1668 (name "python-pytest-cov")
1669 (version "2.2.1")
1670 (source
1671 (origin
1672 (method url-fetch)
1673 (uri (pypi-uri "pytest-cov" version))
1674 (sha256
1675 (base32
1676 "1yl4nbhzfgsxqlsyk4clafgp9x11zvgrkprm9i2p3fgkwx9jxcm8"))))
1677 (build-system python-build-system)
1678 (arguments
1679 `(#:phases
1680 (modify-phases %standard-phases
1681 (replace 'check
1682 (lambda _
1683 ;; options taken from tox.ini
1684 ;; TODO: make "--restructuredtext" tests pass. They currently fail
1685 ;; with "Duplicate implicit target name"
1686 (zero? (system* "python" "./setup.py" "check"
1687 "--strict" "--metadata")))))))
1688 (propagated-inputs
1689 `(("python-coverage" ,python-coverage)
1690 ("python-pytest" ,python-pytest)))
1691 (home-page "https://github.com/pytest-dev/pytest-cov")
1692 (synopsis "Pytest plugin for measuring coverage")
1693 (description
1694 "Pytest-cov produces coverage reports. It supports centralised testing and
1695 distributed testing in both @code{load} and @code{each} modes. It also
1696 supports coverage of subprocesses.")
1697 (license license:expat)))
1698
1699 (define-public python2-pytest-cov
1700 (package-with-python2 python-pytest-cov))
1701
1702 (define-public python-pytest-runner
1703 (package
1704 (name "python-pytest-runner")
1705 (version "2.6.2")
1706 (source
1707 (origin
1708 (method url-fetch)
1709 (uri (pypi-uri "pytest-runner" version))
1710 (sha256
1711 (base32
1712 "1nwcqx0l3fv52kv8526wy8ypzghbq96c96di318d98d3wh7a8xg7"))))
1713 (build-system python-build-system)
1714 (arguments
1715 `(#:phases
1716 (modify-phases %standard-phases
1717 ;; The fancy way of setting the version with setuptools_scm does not
1718 ;; seem to work here.
1719 (add-after 'unpack 'set-version
1720 (lambda _
1721 (substitute* "docs/conf.py"
1722 (("version = setuptools_scm\\.get_version\\(root='\\.\\.')")
1723 (string-append "version = \"" ,version "\"")))
1724 #t)))))
1725 (native-inputs
1726 `(("python-pytest" ,python-pytest)
1727 ("python-setuptools-scm" ,python-setuptools-scm)))
1728 (home-page "https://github.com/pytest-dev/pytest-runner")
1729 (synopsis "Invoke py.test as a distutils command")
1730 (description
1731 "This package provides a @command{pytest-runner} command that
1732 @file{setup.py} files can use to run tests.")
1733 (license license:expat)))
1734
1735 (define-public python2-pytest-runner
1736 (package-with-python2 python-pytest-runner))
1737
1738 (define-public python-pytest-mock
1739 (package
1740 (name "python-pytest-mock")
1741 (version "1.2")
1742 (source
1743 (origin
1744 (method url-fetch)
1745 (uri (pypi-uri "pytest-mock" version ".zip"))
1746 (sha256
1747 (base32
1748 "03zxar5drzm7ksqyrwypjaza3cri6wqvpr6iam92djvg6znp32gp"))))
1749 (build-system python-build-system)
1750 (native-inputs
1751 `(("unzip" ,unzip)))
1752 (propagated-inputs
1753 `(("python-pytest" ,python-pytest)))
1754 (home-page "https://github.com/pytest-dev/pytest-mock/")
1755 (synopsis "Thin-wrapper around the mock package for easier use with py.test")
1756 (description
1757 "This plugin installs a @code{mocker} fixture which is a thin-wrapper
1758 around the patching API provided by the @code{mock} package, but with the
1759 benefit of not having to worry about undoing patches at the end of a test.
1760 The mocker fixture has the same API as @code{mock.patch}, supporting the
1761 same arguments.")
1762 (properties `((python2-variant . ,(delay python2-pytest-mock))))
1763 (license license:expat)))
1764
1765 (define-public python2-pytest-mock
1766 (let ((base (package-with-python2
1767 (strip-python2-variant python-pytest-mock))))
1768 (package (inherit base)
1769 (propagated-inputs
1770 `(("python2-mock" ,python2-mock)
1771 ,@(package-propagated-inputs base))))))
1772
1773 (define-public python-pytest-xdist
1774 (package
1775 (name "python-pytest-xdist")
1776 (version "1.14")
1777 (source
1778 (origin
1779 (method url-fetch)
1780 (uri (pypi-uri "pytest-xdist" version ".zip"))
1781 (sha256
1782 (base32
1783 "08rn2l39ds60xshs4js787l84pfckksqklfq2wq9x8ig2aci2pja"))
1784 (modules '((guix build utils)))
1785 (snippet
1786 '(begin
1787 ;; Remove pre-compiled .pyc files from source.
1788 (for-each delete-file-recursively
1789 (find-files "." "__pycache__" #:directories? #t))
1790 (for-each delete-file (find-files "." "\\.pyc$"))
1791 #t))))
1792 (build-system python-build-system)
1793 (native-inputs
1794 `(("unzip" ,unzip)
1795 ("python-setuptools-scm" ,python-setuptools-scm)))
1796 (propagated-inputs
1797 `(("python-execnet" ,python-execnet)
1798 ("python-pytest" ,python-pytest)
1799 ("python-py" ,python-py)))
1800 (home-page
1801 "https://github.com/pytest-dev/pytest-xdist")
1802 (synopsis
1803 "Plugin for py.test with distributed testing and loop-on-failing modes")
1804 (description
1805 "The pytest-xdist plugin extends py.test with some unique test execution
1806 modes: parallelization, running tests in boxed subprocesses, the ability
1807 to run tests repeatedly when failed, and the ability to run tests on multiple
1808 Python interpreters or platforms. It uses rsync to copy the existing
1809 program code to a remote location, executes there, and then syncs the
1810 result back.")
1811 (license license:expat)))
1812
1813 (define-public python2-pytest-xdist
1814 (package-with-python2 python-pytest-xdist))
1815
1816 (define-public python-scripttest
1817 (package
1818 (name "python-scripttest")
1819 (version "1.3")
1820 (source
1821 (origin
1822 (method url-fetch)
1823 (uri (string-append
1824 "https://pypi.python.org/packages/source/s/scripttest/scripttest-"
1825 version ".tar.gz"))
1826 (sha256
1827 (base32
1828 "0f4w84k8ck82syys7yg9maz93mqzc8p5ymis941x034v44jzq74m"))))
1829 (build-system python-build-system)
1830 (native-inputs
1831 `(("python-pytest" ,python-pytest)))
1832 (home-page "http://pythonpaste.org/scripttest/")
1833 (synopsis "Python library to test command-line scripts")
1834 (description "Scripttest is a Python helper library for testing
1835 interactive command-line applications. With it you can run a script in a
1836 subprocess and see the output as well as any file modifications.")
1837 (license license:expat)))
1838
1839 (define-public python2-scripttest
1840 (package-with-python2 python-scripttest))
1841
1842 (define-public python-testtools
1843 (package
1844 (name "python-testtools")
1845 (version "1.0.0")
1846 (source
1847 (origin
1848 (method url-fetch)
1849 (uri (string-append
1850 "https://pypi.python.org/packages/source/t/testtools/testtools-"
1851 version ".tar.gz"))
1852 (sha256
1853 (base32
1854 "1dyml28ykpl5jb9khdmcdvhy1cxqingys6qvj2k04fzlaj6z3bbx"))))
1855 (build-system python-build-system)
1856 (propagated-inputs
1857 `(("python-mimeparse" ,python-mimeparse)
1858 ("python-extras" ,python-extras)))
1859 (home-page "https://github.com/testing-cabal/testtools")
1860 (synopsis
1861 "Extensions to the Python standard library unit testing framework")
1862 (description
1863 "Testtools extends the Python standard library unit testing framework to
1864 provide matchers, more debugging information, and cross-Python
1865 compatibility.")
1866 (license license:psfl)))
1867
1868 (define-public python2-testtools
1869 (package-with-python2 python-testtools))
1870
1871 (define-public python-testscenarios
1872 (package
1873 (name "python-testscenarios")
1874 (version "0.4")
1875 (source
1876 (origin
1877 (method url-fetch)
1878 (uri (string-append
1879 "https://pypi.python.org/packages/source/t/testscenarios/testscenarios-"
1880 version ".tar.gz"))
1881 (sha256
1882 (base32
1883 "1671jvrvqlmbnc42j7pc5y6vc37q44aiwrq0zic652pxyy2fxvjg"))))
1884 (build-system python-build-system)
1885 (propagated-inputs
1886 `(("python-testtools" ,python-testtools)))
1887 (home-page "https://launchpad.net/testscenarios")
1888 (synopsis "Pyunit extension for dependency injection")
1889 (description
1890 "Testscenarios provides clean dependency injection for Python unittest
1891 style tests.")
1892 (license (list license:bsd-3 license:asl2.0)))) ; at the user's option
1893
1894 (define-public python2-testscenarios
1895 (package-with-python2 python-testscenarios))
1896
1897 (define-public python-testresources
1898 (package
1899 (name "python-testresources")
1900 (version "0.2.7")
1901 (source
1902 (origin
1903 (method url-fetch)
1904 (uri (string-append
1905 "https://pypi.python.org/packages/source/t/testresources/testresources-"
1906 version ".tar.gz"))
1907 (sha256
1908 (base32
1909 "0cbj3plbllyz42c4b5xxgwaa7mml54lakslrn4kkhinxhdri22md"))))
1910 (build-system python-build-system)
1911 (home-page "https://launchpad.net/testresources")
1912 (synopsis
1913 "Pyunit extension for managing test resources")
1914 (description
1915 "Testresources is an extension to Python's unittest to allow declarative
1916 use of resources by test cases.")
1917 (license (list license:bsd-3 license:asl2.0)))) ; at the user's option
1918
1919 (define-public python2-testresources
1920 (package-with-python2 python-testresources))
1921
1922 (define-public python-subunit
1923 (package
1924 (name "python-subunit")
1925 (version "0.0.21")
1926 (source
1927 (origin
1928 (method url-fetch)
1929 (uri (string-append
1930 "https://pypi.python.org/packages/source/p/python-subunit/python-subunit-"
1931 version ".tar.gz"))
1932 (sha256
1933 (base32
1934 "1nkw9wfbvizmpajbj3in8ns07g7lwkiv8hip14jjlwk3cacls6jv"))))
1935 (build-system python-build-system)
1936 (propagated-inputs
1937 `(("python-extras" ,python-extras)
1938 ("python-mimeparse" ,python-mimeparse)))
1939 (native-inputs
1940 `(("python-testscenarios" ,python-testscenarios)))
1941 (home-page "http://launchpad.net/subunit")
1942 (synopsis "Python implementation of the subunit protocol")
1943 (description
1944 "Python-subunit is a Python implementation of the subunit test streaming
1945 protocol.")
1946 (license (list license:bsd-3 license:asl2.0)))) ; at the user's option
1947
1948 (define-public python2-subunit
1949 (package-with-python2 python-subunit))
1950
1951 ;; Recent versions of python-fixtures and python-testrepository need
1952 ;; python-pbr for packaging, which itself needs these two packages for
1953 ;; testing.
1954 ;; To fix this circular dependency, we use a build of python-pbr, based on the
1955 ;; same source, just without any test dependencies and with tests disabled.
1956 ;; python-pbr-minmal is then used to package python-fixtures and
1957 ;; python-testrepository.
1958 ;; Strictly speaking we currently could remove the test-requirements from the
1959 ;; normal python-pbr package (and save this package) since test are disabled
1960 ;; there anyway. But this may change in future.
1961 (define python-pbr-minimal
1962 (package
1963 (name "python-pbr-minimal")
1964 (version "1.8.1")
1965 (source
1966 (origin
1967 (method url-fetch)
1968 (uri (pypi-uri "pbr" version))
1969 (sha256
1970 (base32
1971 "0jcny36cf3s8ar5r4a575npz080hndnrfs4np1fqhv0ym4k7c4p2"))))
1972 (build-system python-build-system)
1973 (arguments
1974 `(#:tests? #f))
1975 (home-page "http://docs.openstack.org/developer/pbr/")
1976 (synopsis "Minimal build of python-pbr used for bootstrapping")
1977 (description
1978 "Used only for bootstrapping python2-pbr, you should not need this.")
1979 (license license:asl2.0)))
1980
1981 (define python2-pbr-minimal
1982 (package-with-python2 python-pbr-minimal))
1983
1984 (define-public python-pbr
1985 (package
1986 (inherit python-pbr-minimal)
1987 (name "python-pbr")
1988 (arguments
1989 `(#:tests? #f)) ;; Most tests seem to use the Internet.
1990 (propagated-inputs
1991 `(("git" ,git))) ;; pbr actually uses the "git" binary.
1992 (native-inputs
1993 `(("python-fixtures" ,python-fixtures)
1994 ;; discover, coverage, hacking, subunit
1995 ("python-mock" ,python-mock)
1996 ("python-six" ,python-six)
1997 ("python-sphinx" ,python-sphinx)
1998 ("python-testrepository" ,python-testrepository)
1999 ("python-testresources" ,python-testresources)
2000 ("python-testscenarios" ,python-testscenarios)
2001 ("python-testtools" ,python-testtools)
2002 ("python-virtualenv" ,python-virtualenv)))
2003 (synopsis "Enhance the default behavior of Python’s setuptools")
2004 (description
2005 "Python Build Reasonableness (PBR) is a library that injects some useful
2006 and sensible default behaviors into your setuptools run. It will set
2007 versions, process requirements files and generate AUTHORS and ChangeLog file
2008 from git information.
2009 ")))
2010
2011 (define-public python2-pbr
2012 (package-with-python2 python-pbr))
2013
2014 (define-public python-fixtures
2015 (package
2016 (name "python-fixtures")
2017 (version "1.4.0")
2018 (source
2019 (origin
2020 (method url-fetch)
2021 (uri (pypi-uri "fixtures" version))
2022 (sha256
2023 (base32
2024 "0djxvdwm8s60dbfn7bhf40x6g818p3b3mlwijm1c3bqg7msn271y"))))
2025 (build-system python-build-system)
2026 (propagated-inputs
2027 `(("python-six" ,python-six)))
2028 (native-inputs
2029 `(("python-pbr-minimal" ,python-pbr-minimal)
2030 ("python-testtools" ,python-testtools)))
2031 (home-page "https://launchpad.net/python-fixtures")
2032 (synopsis "Python test fixture library")
2033 (description
2034 "Fixtures provides a way to create reusable state, useful when writing
2035 Python tests.")
2036 (license (list license:bsd-3 license:asl2.0)))) ; at user's option
2037
2038 (define-public python2-fixtures
2039 (package-with-python2 python-fixtures))
2040
2041 (define-public python-testrepository
2042 (package
2043 (name "python-testrepository")
2044 (version "0.0.20")
2045 (source
2046 (origin
2047 (method url-fetch)
2048 (uri (string-append
2049 "https://pypi.python.org/packages/source/t/testrepository/testrepository-"
2050 version ".tar.gz"))
2051 (sha256
2052 (base32
2053 "1ssqb07c277010i6gzzkbdd46gd9mrj0bi0i8vn560n2k2y4j93m"))))
2054 (build-system python-build-system)
2055 (propagated-inputs
2056 `(("python-fixtures" ,python-fixtures)
2057 ("python-subunit" ,python-subunit)
2058 ("python-testtools" ,python-testtools)))
2059 (native-inputs
2060 `(("python-pbr-minimal" ,python-pbr-minimal) ;; same as for building fixture
2061 ("python-mimeparse" ,python-mimeparse)))
2062 (home-page "https://launchpad.net/testrepository")
2063 (synopsis "Database for Python test results")
2064 (description "Testrepository provides a database of test results which can
2065 be used as part of a developer's workflow to check things such as what tests
2066 have failed since the last commit or what tests are currently failing.")
2067 (license (list license:bsd-3 license:asl2.0)))) ; at user's option
2068
2069 (define-public python2-testrepository
2070 (package-with-python2 python-testrepository))
2071
2072 (define-public python-coverage
2073 (package
2074 (name "python-coverage")
2075 (version "4.1")
2076 (source
2077 (origin
2078 (method url-fetch)
2079 (uri (pypi-uri "coverage" version))
2080 (sha256
2081 (base32
2082 "01rbr4br4lsk0lwn8fb96zwd2xr4f0mg1w7iq3j11i8f5ig2nqs1"))))
2083 (build-system python-build-system)
2084 (home-page "http://nedbatchelder.com/code/coverage")
2085 (synopsis "Code coverage measurement for Python")
2086 (description
2087 "Coverage measures code coverage, typically during test execution. It
2088 uses the code analysis tools and tracing hooks provided in the Python standard
2089 library to determine which lines are executable, and which have been
2090 executed.")
2091 (license license:bsd-3)))
2092
2093 (define-public python2-coverage
2094 (package-with-python2 python-coverage))
2095
2096 (define-public python-cov-core
2097 (package
2098 (name "python-cov-core")
2099 (version "1.15.0")
2100 (source
2101 (origin
2102 (method url-fetch)
2103 (uri (pypi-uri "cov-core" version))
2104 (sha256
2105 (base32
2106 "0k3np9ymh06yv1ib96sb6wfsxjkqhmik8qfsn119vnhga9ywc52a"))))
2107 (build-system python-build-system)
2108 (propagated-inputs
2109 `(("python-coverage" ,python-coverage)))
2110 (home-page "https://github.com/schlamar/cov-core")
2111 (synopsis "plugin core for use by pytest-cov, nose-cov and nose2-cov")
2112 (description
2113 "This is a library package for use by pytest-cov, nose-cov and nose2-cov.
2114 It is useful for developing coverage plugins for these testing frameworks.")
2115 (license license:expat)))
2116
2117 (define-public python2-cov-core
2118 (package-with-python2 python-cov-core))
2119
2120 (define-public python-discover
2121 (package
2122 (name "python-discover")
2123 (version "0.4.0")
2124 (source
2125 (origin
2126 (method url-fetch)
2127 (uri (string-append
2128 "https://pypi.python.org/packages/source/d/discover/discover-"
2129 version ".tar.gz"))
2130 (sha256
2131 (base32
2132 "0y8d0zwiqar51kxj8lzmkvwc3b8kazb04gk5zcb4nzg5k68zmhq5"))))
2133 (build-system python-build-system)
2134 (home-page "http://pypi.python.org/pypi/discover/")
2135 (synopsis
2136 "Python test discovery for unittest")
2137 (description
2138 "Discover provides test discovery for unittest, a feature that has been
2139 backported from Python 2.7 for Python 2.4+.")
2140 (license license:bsd-3)))
2141
2142 (define-public python2-discover
2143 (package-with-python2 python-discover))
2144
2145 (define-public behave
2146 (package
2147 (name "behave")
2148 (version "1.2.5")
2149 (source (origin
2150 (method url-fetch)
2151 (uri (pypi-uri "behave" version ".tar.bz2"))
2152 (sha256
2153 (base32
2154 "1iypp6z46r19n4xmgx6m1lwmlpfjh8vapq8izigrqlaarvp2y64c"))))
2155 (build-system python-build-system)
2156 (propagated-inputs
2157 `(("python-six" ,python-six)
2158 ("python-parse" ,python-parse)
2159 ("python-parse-type" ,python-parse-type)))
2160 (arguments `(#:tests? #f)) ;TODO: tests require nose>=1.3 and
2161 ;PyHamcrest>=1.8
2162 (home-page "http://github.com/behave/behave")
2163 (synopsis "Python behavior-driven development")
2164 (description
2165 "Behave is a tool for behavior-driven development in python.
2166 Behavior-driven development (or BDD) is an agile software development
2167 technique that encourages collaboration between developers, QA and
2168 non-technical or business participants in a software project. Behave uses
2169 tests written in a natural language style, backed up by Python code.")
2170 (license license:x11)))
2171
2172 (define-public python-exif-read
2173 (package
2174 (name "python-exif-read")
2175 (version "2.1.2")
2176 (source (origin
2177 (method url-fetch)
2178 (uri (pypi-uri "ExifRead" version))
2179 (sha256
2180 (base32
2181 "1b90jf6m9vxh9nanhpyvqdq7hmfx5iggw1l8kq10jrs6xgr49qkr"))))
2182 (build-system python-build-system)
2183 (arguments `(#:tests? #f)) ; no tests
2184 (home-page "https://github.com/ianare/exif-py")
2185 (synopsis "Python library to extract EXIF data from image files")
2186 (description
2187 "ExifRead is a Python library to extract EXIF data from tiff and jpeg
2188 files.")
2189 (license license:bsd-3)))
2190
2191 (define-public python2-exif-read
2192 (package-with-python2 python-exif-read))
2193
2194 (define-public python-pyld
2195 (package
2196 (name "python-pyld")
2197 (version "0.6.8")
2198 (source (origin
2199 (method url-fetch)
2200 (uri (pypi-uri "PyLD" version))
2201 (sha256
2202 (base32
2203 "0k881ffazpf8q1z8862g4bb3pzwpnz9whrci2mf311mvn1qbyqad"))))
2204 (build-system python-build-system)
2205 (arguments `(#:tests? #f)) ; no tests
2206 (home-page "http://github.com/digitalbazaar/pyld")
2207 (synopsis "Python implementation of the JSON-LD specification")
2208 (description
2209 "PyLD is an implementation of the JSON-LD specification.")
2210 (license license:bsd-3)))
2211
2212 (define-public python2-pyld
2213 (package-with-python2 python-pyld))
2214
2215 (define-public python-certifi
2216 (package
2217 (name "python-certifi")
2218 (version "2016.8.31")
2219 (source (origin
2220 (method url-fetch)
2221 (uri (pypi-uri "certifi" version))
2222 (sha256
2223 (base32
2224 "06c9dcyv8ss050gkv5xjivbxhm6qm0s9vzy4r33wqabgv118lw7p"))))
2225 (build-system python-build-system)
2226 (arguments `(#:tests? #f)) ; no tests
2227 (home-page "http://python-requests.org/")
2228 (synopsis "Python CA certificate bundle")
2229 (description
2230 "Certifi is a Python library that contains a CA certificate bundle, which
2231 is used by the Requests library to verify HTTPS requests.")
2232 (license license:asl2.0)))
2233
2234 (define-public python2-certifi
2235 (package-with-python2 python-certifi))
2236
2237 (define-public python-click
2238 (package
2239 (name "python-click")
2240 (version "6.6")
2241 (source
2242 (origin
2243 (method url-fetch)
2244 (uri (pypi-uri "click" version))
2245 (sha256
2246 (base32
2247 "1sggipyz52crrybwbr9xvwxd4aqigvplf53k9w3ygxmzivd1jsnc"))))
2248 (build-system python-build-system)
2249 (arguments
2250 `(#:phases
2251 (modify-phases %standard-phases
2252 (add-after 'unpack 'fix-paths
2253 (lambda* (#:key inputs #:allow-other-keys)
2254 (let ((glibc (assoc-ref inputs ,(if (%current-target-system)
2255 "cross-libc" "libc"))))
2256 (substitute* "click/_unicodefun.py"
2257 (("'locale'")
2258 (string-append "'" glibc "/bin/locale'"))))
2259 #t)))))
2260 (home-page "http://click.pocoo.org")
2261 (synopsis "Command line library for Python")
2262 (description
2263 "Click is a Python package for creating command line interfaces in a
2264 composable way with as little code as necessary. Its name stands for
2265 \"Command Line Interface Creation Kit\". It's highly configurable but comes
2266 with sensible defaults out of the box.")
2267 (license license:bsd-3)))
2268
2269 (define-public python2-click
2270 (package-with-python2 python-click))
2271
2272 (define-public python-wheel
2273 (package
2274 (name "python-wheel")
2275 (version "0.29.0")
2276 (source
2277 (origin
2278 (method url-fetch)
2279 (uri (pypi-uri "wheel" version))
2280 (sha256
2281 (base32
2282 "0j0n38hg1jvrmyy68f9ikvzq1gs9g0sx4ws7maf8wi3bwbbqmfqy"))))
2283 (build-system python-build-system)
2284 (native-inputs
2285 `(("python-jsonschema" ,python-jsonschema)
2286 ("python-pytest-cov" ,python-pytest-cov)))
2287 (home-page "https://bitbucket.org/pypa/wheel/")
2288 (synopsis "Format for built Python packages")
2289 (description
2290 "A wheel is a ZIP-format archive with a specially formatted filename and
2291 the @code{.whl} extension. It is designed to contain all the files for a PEP
2292 376 compatible install in a way that is very close to the on-disk format. Many
2293 packages will be properly installed with only the @code{Unpack} step and the
2294 unpacked archive preserves enough information to @code{Spread} (copy data and
2295 scripts to their final locations) at any later time. Wheel files can be
2296 installed with a newer @code{pip} or with wheel's own command line utility.")
2297 (license license:expat)
2298 (properties `((python2-variant . ,(delay python2-wheel))))))
2299
2300 (define-public python2-wheel
2301 (let ((wheel (package-with-python2
2302 (strip-python2-variant python-wheel))))
2303 (package (inherit wheel)
2304 (native-inputs `(("python2-functools32" ,python2-functools32)
2305 ,@(package-native-inputs wheel))))))
2306
2307
2308 (define-public python-requests
2309 (package
2310 (name "python-requests")
2311 (version "2.9.1")
2312 (source (origin
2313 (method url-fetch)
2314 (uri (pypi-uri "requests" version))
2315 (sha256
2316 (base32
2317 "0zsqrzlybf25xscgi7ja4s48y2abf9wvjkn47wh984qgs1fq2xy5"))))
2318 (build-system python-build-system)
2319 (native-inputs
2320 `(("python-py" ,python-py)
2321 ("python-pytest" ,python-pytest)
2322 ("python-pytest-cov" ,python-pytest-cov)
2323 ("python-wheel" ,python-wheel)))
2324 (home-page "http://python-requests.org/")
2325 (synopsis "Python HTTP library")
2326 (description
2327 "Requests is a Python HTTP client library. It aims to be easier to use
2328 than Python’s urllib2 library.")
2329 (license license:asl2.0)))
2330
2331 ;; Some software requires an older version of Requests, notably Docker
2332 ;; Compose.
2333 (define-public python-requests-2.7
2334 (package (inherit python-requests)
2335 (version "2.7.0")
2336 (source (origin
2337 (method url-fetch)
2338 (uri (pypi-uri "requests" version))
2339 (sha256
2340 (base32
2341 "0gdr9dxm24amxpbyqpbh3lbwxc2i42hnqv50sigx568qssv3v2ir"))))))
2342
2343 (define-public python2-requests
2344 (package-with-python2 python-requests))
2345
2346 (define-public python-vcversioner
2347 (package
2348 (name "python-vcversioner")
2349 (version "2.16.0.0")
2350 (source
2351 (origin
2352 (method url-fetch)
2353 (uri (pypi-uri "vcversioner" version))
2354 (sha256
2355 (base32
2356 "16z10sm78jd7ca3jbkgc3q5i8a8q7y1h21q1li21yy3rlhbhrrns"))))
2357 (build-system python-build-system)
2358 (synopsis "Python library for version number discovery")
2359 (description "Vcversioner is a Python library that inspects tagging
2360 information in a variety of version control systems in order to discover
2361 version numbers.")
2362 (home-page "https://github.com/habnabit/vcversioner")
2363 (license license:isc)))
2364
2365 (define-public python2-vcversioner
2366 (package-with-python2 python-vcversioner))
2367
2368 (define-public python-jsonschema
2369 (package
2370 (name "python-jsonschema")
2371 (version "2.5.1")
2372 (source (origin
2373 (method url-fetch)
2374 (uri
2375 (string-append
2376 "https://pypi.python.org/packages/source/j/jsonschema/jsonschema-"
2377 version ".tar.gz"))
2378 (sha256
2379 (base32
2380 "0hddbqjm4jq63y8jf44nswina1crjs16l9snb6m3vvgyg31klrrn"))))
2381 (build-system python-build-system)
2382 (arguments
2383 '(#:phases
2384 (modify-phases %standard-phases
2385 (replace 'check (lambda _ (zero? (system* "nosetests")))))))
2386 (native-inputs
2387 `(("python-nose" ,python-nose)
2388 ("python-vcversioner" ,python-vcversioner)))
2389 (home-page "https://github.com/Julian/jsonschema")
2390 (synopsis "Implementation of JSON Schema for Python")
2391 (description
2392 "Jsonschema is an implementation of JSON Schema for Python.")
2393 (license license:expat)
2394 (properties `((python2-variant . ,(delay python2-jsonschema))))))
2395
2396 (define-public python2-jsonschema
2397 (let ((jsonschema (package-with-python2
2398 (strip-python2-variant python-jsonschema))))
2399 (package (inherit jsonschema)
2400 (native-inputs
2401 `(("python2-mock" ,python2-mock)
2402 ,@(package-native-inputs jsonschema)))
2403 (propagated-inputs
2404 `(("python2-functools32" ,python2-functools32))))))
2405
2406 (define-public python-unidecode
2407 (package
2408 (name "python-unidecode")
2409 (version "0.04.18")
2410 (source (origin
2411 (method url-fetch)
2412 (uri (pypi-uri "Unidecode" version))
2413 (sha256
2414 (base32
2415 "12hhblqy1ajvidm38im4171x4arg83pfmziyn53nizp29p3m14gi"))))
2416 (build-system python-build-system)
2417 (home-page "https://pypi.python.org/pypi/Unidecode")
2418 (synopsis "ASCII transliterations of Unicode text")
2419 (description
2420 "Unidecode provides ASCII transliterations of Unicode text. Unidecode is
2421 useful when integrating with legacy code that doesn't support Unicode, or for
2422 ease of entry of non-Roman names on a US keyboard, or when constructing ASCII
2423 machine identifiers from human-readable Unicode strings that should still be
2424 somewhat intelligeble.")
2425 (license license:gpl2+)))
2426
2427 (define-public python2-unidecode
2428 (package-with-python2 python-unidecode))
2429
2430 (define-public python-pyjwt
2431 (package
2432 (name "python-pyjwt")
2433 (version "1.4.0")
2434 (source
2435 (origin
2436 (method url-fetch)
2437 (uri (pypi-uri "PyJWT" version))
2438 (sha256
2439 (base32
2440 "1556v2jppd8mjkkj66pxb5rcazm35jq81r233mdl8hfmz9n3icp1"))))
2441 (build-system python-build-system)
2442 (native-inputs
2443 `(("python-pytest" ,python-pytest)
2444 ("python-pytest-cov" ,python-pytest-cov)
2445 ("python-pytest-runner" ,python-pytest-runner)))
2446 (home-page "http://github.com/progrium/pyjwt")
2447 (synopsis "JSON Web Token implementation in Python")
2448 (description
2449 "PyJWT is a JSON Web Token implementation written in Python.")
2450 (license license:expat)))
2451
2452 (define-public python2-pyjwt
2453 (package-with-python2 python-pyjwt))
2454
2455 (define-public python-oauthlib
2456 (package
2457 (name "python-oauthlib")
2458 (version "1.0.3")
2459 (source (origin
2460 (method url-fetch)
2461 (uri (pypi-uri "oauthlib" version))
2462 (sha256
2463 (base32
2464 "1bfrj70vdjxjw74khbyh6f0dksv7p5rh2346jnlrffyacd3gwjzg"))))
2465 (build-system python-build-system)
2466 (native-inputs
2467 `(("python-nose" ,python-nose)
2468 ("python-cryptography" ,python-cryptography)
2469 ("python-pyjwt" ,python-pyjwt)
2470 ("python-blinker" ,python-blinker)))
2471 (home-page "https://github.com/idan/oauthlib")
2472 (synopsis "OAuth implementation for Python")
2473 (description
2474 "Oauthlib is a generic, spec-compliant, thorough implementation of the
2475 OAuth request-signing logic.")
2476 (license license:bsd-3)
2477 (properties `((python2-variant . ,(delay python2-oauthlib))))))
2478
2479 (define-public python2-oauthlib
2480 (let ((base (package-with-python2 (strip-python2-variant python-oauthlib))))
2481 (package
2482 (inherit base)
2483 (native-inputs `(("python2-unittest2" ,python2-unittest2)
2484 ("python2-mock" ,python2-mock)
2485 ,@(package-native-inputs base))))))
2486
2487 (define-public python-itsdangerous
2488 (package
2489 (name "python-itsdangerous")
2490 (version "0.24")
2491 (source
2492 (origin
2493 (method url-fetch)
2494 (uri (string-append
2495 "https://pypi.python.org/packages/source/i/itsdangerous/itsdangerous-"
2496 version ".tar.gz"))
2497 (sha256
2498 (base32
2499 "06856q6x675ly542ig0plbqcyab6ksfzijlyf1hzhgg3sgwgrcyb"))))
2500 (build-system python-build-system)
2501 (home-page "http://github.com/mitsuhiko/itsdangerous")
2502 (synopsis "Python library for passing data to/from untrusted environments")
2503 (description
2504 "Itsdangerous provides various helpers to pass trusted data to untrusted
2505 environments and back.")
2506 (license license:bsd-3)))
2507
2508 (define-public python2-itsdangerous
2509 (package-with-python2 python-itsdangerous))
2510
2511 (define-public python-pyyaml
2512 (package
2513 (name "python-pyyaml")
2514 (version "3.11")
2515 (source
2516 (origin
2517 (method url-fetch)
2518 (uri (string-append
2519 "https://pypi.python.org/packages/source/P/PyYAML/PyYAML-"
2520 version ".tar.gz"))
2521 (sha256
2522 (base32
2523 "1s26125vfnskng58ym37xhwv8v0mm95b2cwbjfag8prfhy596v63"))))
2524 (build-system python-build-system)
2525 (inputs
2526 `(("libyaml" ,libyaml)))
2527 (home-page "http://pyyaml.org/wiki/PyYAML")
2528 (synopsis "YAML parser and emitter for Python")
2529 (description
2530 "PyYAML is a YAML parser and emitter for Python. PyYAML features a
2531 complete YAML 1.1 parser, Unicode support, pickle support, capable extension
2532 API, and sensible error messages. PyYAML supports standard YAML tags and
2533 provides Python-specific tags that allow to represent an arbitrary Python
2534 object.")
2535 (license license:expat)))
2536
2537 (define-public python2-pyyaml
2538 (package-with-python2 python-pyyaml))
2539
2540 (define-public python-virtualenv
2541 (package
2542 (name "python-virtualenv")
2543 (version "15.0.3")
2544 (source
2545 (origin
2546 (method url-fetch)
2547 (uri (pypi-uri "virtualenv" version))
2548 (sha256
2549 (base32
2550 "07cbajzk8l05k5zhlw0b9wbf2is65bl9v6zrn2a0iyn57w6pd73d"))))
2551 (build-system python-build-system)
2552 (arguments
2553 `(#:phases
2554 (modify-phases %standard-phases
2555 (replace 'check
2556 (lambda _
2557 ;; Disable failing test. See upstream bug report
2558 ;; https://github.com/pypa/virtualenv/issues/957
2559 (substitute* "tests/test_virtualenv.py"
2560 (("skipif.*") "skipif(True, reason=\"Guix\")\n"))
2561 (zero? (system* "py.test")))))))
2562 (native-inputs
2563 `(("python-mock" ,python-mock)
2564 ("python-pytest" ,python-pytest)))
2565 (home-page "https://virtualenv.pypa.io/")
2566 (synopsis "Virtual Python environment builder")
2567 (description
2568 "Virtualenv is a tool to create isolated Python environments.")
2569 (license license:expat)))
2570
2571 (define-public python2-virtualenv
2572 (package-with-python2 python-virtualenv))
2573
2574 (define-public python-markupsafe
2575 (package
2576 (name "python-markupsafe")
2577 (version "0.23")
2578 (source
2579 (origin
2580 (method url-fetch)
2581 (uri (string-append
2582 "https://pypi.python.org/packages/source/M/MarkupSafe/MarkupSafe-"
2583 version ".tar.gz"))
2584 (sha256
2585 (base32
2586 "1hvip33wva3fnmvfp9x5klqri7hpl1hkgqmjbss18nmrb7zimv54"))))
2587 (build-system python-build-system)
2588 (home-page "http://github.com/mitsuhiko/markupsafe")
2589 (synopsis "XML/HTML/XHTML markup safe string implementation for Python")
2590 (description
2591 "Markupsafe provides an XML/HTML/XHTML markup safe string implementation
2592 for Python.")
2593 (license license:bsd-3)))
2594
2595 (define-public python2-markupsafe
2596 (package-with-python2 python-markupsafe))
2597
2598 (define-public python-jinja2
2599 (package
2600 (name "python-jinja2")
2601 (version "2.8")
2602 (source
2603 (origin
2604 (method url-fetch)
2605 (uri (pypi-uri "Jinja2" version))
2606 (sha256
2607 (base32
2608 "1x0v41lp5m1pjix3l46zx02b7lqp2hflgpnxwkywxynvi3zz47xw"))))
2609 (build-system python-build-system)
2610 (propagated-inputs
2611 `(("python-markupsafe" ,python-markupsafe)))
2612 (home-page "http://jinja.pocoo.org/")
2613 (synopsis "Python template engine")
2614 (description
2615 "Jinja2 is a small but fast and easy to use stand-alone template engine
2616 written in pure Python.")
2617 (license license:bsd-3)))
2618
2619 (define-public python2-jinja2
2620 (package-with-python2 python-jinja2))
2621
2622 (define-public python-pystache
2623 (package
2624 (name "python-pystache")
2625 (version "0.5.4")
2626 (source (origin
2627 (method url-fetch)
2628 (uri (pypi-uri "pystache" version))
2629 (sha256
2630 (base32
2631 "0nmqsfmiw4arjxqkmf9z66ml950pcdjk6aq4gin4sywmzdjw5fzp"))))
2632 (build-system python-build-system)
2633 (home-page "http://defunkt.io/pystache/")
2634 (synopsis "Python logic-less template engine")
2635 (description
2636 "Pystache is a Python implementation of the framework agnostic,
2637 logic-free templating system Mustache.")
2638 (license license:expat)))
2639
2640 (define-public python2-pystache
2641 (package-with-python2 python-pystache))
2642
2643 (define-public python-joblib
2644 (package
2645 (name "python-joblib")
2646 (version "0.10.3")
2647 (source (origin
2648 (method url-fetch)
2649 (uri (pypi-uri "joblib" version))
2650 (sha256
2651 (base32
2652 "0787k919zlfmgymprz5bzv0v1df5bbirlf3awrghmjgvkrd9dci9"))))
2653 (build-system python-build-system)
2654 (arguments
2655 `(#:phases
2656 (modify-phases %standard-phases
2657 (add-before 'check 'disable-failing-tests
2658 (lambda _
2659 ;; This numpydoc tests fails for unknown reasons
2660 (delete-file "doc/sphinxext/numpydoc/tests/test_docscrape.py")
2661 ;; This numpydoc test depends on matplotlib, which is not a
2662 ;; required input.
2663 (delete-file "doc/sphinxext/numpydoc/tests/test_plot_directive.py")
2664 ;; These tests fail to execute sys.executable
2665 (substitute* "joblib/test/test_parallel.py"
2666 (("import nose" line)
2667 (string-append "from nose.plugins.skip import SkipTest\n" line))
2668 (("def test_nested_parallel_warnings" line)
2669 (string-append "@SkipTest\n" line))
2670 (("def test_parallel_with_interactively_defined_functions" line)
2671 (string-append "@SkipTest\n" line)))
2672 #t)))))
2673 (native-inputs
2674 `(("python-nose" ,python-nose)
2675 ("python-sphinx" ,python-sphinx)
2676 ("python-docutils" ,python-docutils)
2677 ("python-numpydoc" ,python-numpydoc)))
2678 (home-page "http://pythonhosted.org/joblib/")
2679 (synopsis "Using Python functions as pipeline jobs")
2680 (description
2681 "Joblib is a set of tools to provide lightweight pipelining in Python.
2682 In particular, joblib offers: transparent disk-caching of the output values
2683 and lazy re-evaluation (memoize pattern), easy simple parallel computing
2684 logging and tracing of the execution.")
2685 (license license:bsd-3)))
2686
2687 (define-public python2-joblib
2688 (package-with-python2 python-joblib))
2689
2690 (define-public python-docutils
2691 (package
2692 (name "python-docutils")
2693 (version "0.12")
2694 (source
2695 (origin
2696 (method url-fetch)
2697 (uri (string-append
2698 "https://pypi.python.org/packages/source/d/docutils/docutils-"
2699 version ".tar.gz"))
2700 (sha256
2701 (base32
2702 "1ylnjnw1x4b2y7blr6x35ncdzn69k253kw4cdkv6asdb21w73ny7"))))
2703 (build-system python-build-system)
2704 (arguments
2705 '(#:tests? #f)) ; no setup.py test command
2706 (home-page "http://docutils.sourceforge.net/")
2707 (synopsis "Python Documentation Utilities")
2708 (description
2709 "Docutils is a modular system for processing documentation into useful
2710 formats, such as HTML, XML, and LaTeX. For input Docutils supports
2711 reStructuredText.")
2712 ;; Most of the source code is public domain, but some source files are
2713 ;; licensed under the PFSL, BSD 2-clause, and GPLv3+ licenses.
2714 (license (list license:public-domain license:psfl license:bsd-2 license:gpl3+))))
2715
2716 (define-public python2-docutils
2717 (package-with-python2 python-docutils))
2718
2719 (define-public python-pygments
2720 (package
2721 (name "python-pygments")
2722 (version "2.0.2")
2723 (source
2724 (origin
2725 (method url-fetch)
2726 (uri (pypi-uri "Pygments" version))
2727 (sha256
2728 (base32
2729 "0lagrwifsgn0s8bzqahpr87p7gd38xja8f06akscinp6hj89283k"))))
2730 (build-system python-build-system)
2731 (home-page "http://pygments.org/")
2732 (synopsis "Syntax highlighting")
2733 (description
2734 "Pygments is a syntax highlighting package written in Python.")
2735 (license license:bsd-2)))
2736
2737 (define-public python2-pygments
2738 (package-with-python2 python-pygments))
2739
2740 (define-public python-sphinx
2741 (package
2742 (name "python-sphinx")
2743 (version "1.2.3")
2744 (source
2745 (origin
2746 (method url-fetch)
2747 (uri (string-append
2748 "https://pypi.python.org/packages/source/S/Sphinx/Sphinx-"
2749 version ".tar.gz"))
2750 (sha256
2751 (base32
2752 "011xizm3jnmf4cvs5i6kgf6c5nn046h79i8j0vd0f27yw9j3p4wl"))))
2753 (build-system python-build-system)
2754 (propagated-inputs
2755 `(("python-jinja2" ,python-jinja2)
2756 ("python-docutils" ,python-docutils)
2757 ("python-pygments" ,python-pygments)))
2758 (home-page "http://sphinx-doc.org/")
2759 (synopsis "Python documentation generator")
2760 (description "Sphinx is a tool that makes it easy to create documentation
2761 for Python projects or other documents consisting of multiple reStructuredText
2762 sources.")
2763 (license license:bsd-3)))
2764
2765 (define-public python2-sphinx
2766 (package-with-python2 python-sphinx))
2767
2768 (define-public python-sphinx-rtd-theme
2769 (package
2770 (name "python-sphinx-rtd-theme")
2771 (version "0.1.6")
2772 (source
2773 (origin
2774 (method url-fetch)
2775 (uri (string-append "https://pypi.python.org/packages/source/s/"
2776 "sphinx_rtd_theme/sphinx_rtd_theme-"
2777 version ".tar.gz"))
2778 (sha256
2779 (base32
2780 "19nw3rn7awplcdrz63kg1njqwkbymfg9lwn7l2grhdyhyr2gaa8g"))))
2781 (build-system python-build-system)
2782 (home-page "https://github.com/snide/sphinx_rtd_theme/")
2783 (synopsis "ReadTheDocs.org theme for Sphinx")
2784 (description "A theme for Sphinx used by ReadTheDocs.org.")
2785 (license license:expat)))
2786
2787 (define-public python2-sphinx-rtd-theme
2788 (package-with-python2 python-sphinx-rtd-theme))
2789
2790 (define-public python-feedgenerator
2791 (package
2792 (name "python-feedgenerator")
2793 (version "1.8")
2794 (source
2795 (origin
2796 (method url-fetch)
2797 (uri (pypi-uri "feedgenerator" version))
2798 (sha256
2799 (base32
2800 "0mkimp1fpdan4p3882vzcws4l594k71ich4g0wq97jbra7p602n0"))))
2801 (build-system python-build-system)
2802 (propagated-inputs
2803 `(("python-pytz" ,python-pytz)
2804 ("python-six" ,python-six)))
2805 (home-page "https://github.com/getpelican/feedgenerator")
2806 (synopsis
2807 "Standalone version of Django's Atom/RSS feed generator")
2808 (description
2809 "Feedgenerator-py3k is a standalone version of Django's feedgenerator,
2810 which can produce feeds in RSS 2.0, RSS 0.91, and Atom formats.")
2811 (license license:bsd-3)))
2812
2813 (define-public python2-feedgenerator
2814 (package-with-python2 python-feedgenerator))
2815
2816 (define-public python-blinker
2817 (package
2818 (name "python-blinker")
2819 (version "1.4")
2820 (source
2821 (origin
2822 (method url-fetch)
2823 (uri (pypi-uri "blinker" version))
2824 (sha256
2825 (base32
2826 "1dpq0vb01p36jjwbhhd08ylvrnyvcc82yxx3mwjx6awrycjyw6j7"))))
2827 (build-system python-build-system)
2828 ;; No "test" command supplied to setuptools, so unless there's another way
2829 ;; to run tests, we're skipping them!
2830 (arguments '(#:tests? #f))
2831 (home-page "http://pythonhosted.org/blinker/")
2832 (synopsis "Fast, simple object-to-object and broadcast signaling")
2833 (description
2834 "Blinker provides a fast dispatching system that allows any number of
2835 interested parties to subscribe to events, or \"signals\".")
2836 (license license:expat)))
2837
2838 (define-public python2-blinker
2839 (package-with-python2 python-blinker))
2840
2841 (define-public pelican
2842 (package
2843 (name "pelican")
2844 (version "3.6.3")
2845 (source
2846 (origin
2847 (method url-fetch)
2848 (uri (pypi-uri "pelican" version))
2849 (sha256
2850 (base32
2851 "1hn94rb4q3zmcq16in055xikal4dba5hfx3zznq7warllcgc9f8k"))))
2852 (build-system python-build-system)
2853 (propagated-inputs
2854 `(("python-feedgenerator" ,python-feedgenerator)
2855 ("python-jinja2" ,python-jinja2)
2856 ("python-pygments" ,python-pygments)
2857 ("python-docutils" ,python-docutils)
2858 ("python-pytz" ,python-pytz)
2859 ("python-blinker" ,python-blinker)
2860 ("python-unidecode" ,python-unidecode)
2861 ("python-six" ,python-six)
2862 ("python-dateutil-2" ,python-dateutil-2)))
2863 (home-page "http://getpelican.com/")
2864 (arguments
2865 `(;; XXX Requires a lot more packages to do unit tests :P
2866 #:tests? #f
2867 #:phases (modify-phases %standard-phases
2868 (add-before
2869 'install 'adjust-requires
2870 ;; Since feedgenerator is installed from git, it doesn't
2871 ;; conform to the version requirements.
2872 ;;
2873 ;; We *do have* "feedgenerator >= 1.6", but strip off the
2874 ;; version requirement so setuptools doesn't get confused.
2875 (lambda _
2876 (substitute* "setup.py"
2877 (("['\"]feedgenerator.*?['\"]")
2878 "'feedgenerator'")))))))
2879 (synopsis "Python-based static site publishing system")
2880 (description
2881 "Pelican is a tool to generate a static blog from reStructuredText,
2882 Markdown input files, and more. Pelican uses Jinja2 for templating
2883 and is very extensible.")
2884 (license license:agpl3+)))
2885
2886 (define-public python-scikit-learn
2887 (package
2888 (name "python-scikit-learn")
2889 (version "0.16.1")
2890 (source
2891 (origin
2892 (method url-fetch)
2893 (uri (string-append
2894 "https://github.com/scikit-learn/scikit-learn/archive/"
2895 version ".tar.gz"))
2896 (file-name (string-append name "-" version ".tar.gz"))
2897 (sha256
2898 (base32
2899 "140skabifgc7lvvj873pnzlwx0ni6q8qkrsyad2ccjb3h8rxzkih"))))
2900 (build-system python-build-system)
2901 (arguments
2902 `(#:phases
2903 (alist-cons-before
2904 'check 'set-HOME
2905 ;; some tests require access to "$HOME"
2906 (lambda _ (setenv "HOME" "/tmp"))
2907 ;; Tests can only be run after the library has been installed and not
2908 ;; within the source directory.
2909 (alist-cons-after
2910 'install 'check
2911 (lambda _
2912 (with-directory-excursion "/tmp"
2913 ;; With Python 3 one test of 3334 fails
2914 ;; (sklearn.tests.test_common.test_transformers); see
2915 ;; https://github.com/scikit-learn/scikit-learn/issues/3693
2916 (system* "nosetests" "-v" "sklearn")))
2917 (alist-delete 'check %standard-phases)))))
2918 (inputs
2919 `(("openblas" ,openblas)))
2920 (native-inputs
2921 `(("python-nose" ,python-nose)))
2922 (propagated-inputs
2923 `(("python-numpy" ,python-numpy)
2924 ("python-scipy" ,python-scipy)))
2925 (home-page "http://scikit-learn.org/")
2926 (synopsis "Machine Learning in Python")
2927 (description
2928 "Scikit-learn provides simple and efficient tools for data
2929 mining and data analysis.")
2930 (license license:bsd-3)
2931 (properties `((python2-variant . ,(delay python2-scikit-learn))))))
2932
2933 (define-public python2-scikit-learn
2934 (package-with-python2 (strip-python2-variant python-scikit-learn)))
2935
2936 (define-public python-scikit-image
2937 (package
2938 (name "python-scikit-image")
2939 (version "0.11.3")
2940 (source
2941 (origin
2942 (method url-fetch)
2943 (uri (string-append
2944 "https://pypi.python.org/packages/source/s/scikit-image/scikit-image-"
2945 version ".tar.gz"))
2946 (sha256
2947 (base32 "0jz416fqvpahqyffw8plmszzfj669w8wvf3y9clnr5lr6a7md3kn"))))
2948 (build-system python-build-system)
2949 (propagated-inputs
2950 `(("python-matplotlib" ,python-matplotlib)
2951 ("python-networkx" ,python-networkx)
2952 ("python-numpy" ,python-numpy)
2953 ("python-scipy" ,python-scipy)
2954 ("python-six" ,python-six)
2955 ("python-pillow" ,python-pillow)))
2956 (native-inputs
2957 `(("python-cython" ,python-cython)))
2958 (home-page "http://scikit-image.org/")
2959 (synopsis "Image processing in Python")
2960 (description
2961 "Scikit-image is a collection of algorithms for image processing.")
2962 (license license:bsd-3)
2963 (properties `((python2-variant . ,(delay python2-scikit-image))))))
2964
2965 (define-public python2-scikit-image
2966 (let ((scikit-image (package-with-python2
2967 (strip-python2-variant python-scikit-image))))
2968 (package (inherit scikit-image)
2969 (native-inputs
2970 `(("python2-mock" ,python2-mock)
2971 ,@(package-native-inputs scikit-image)))
2972 (propagated-inputs
2973 `(("python2-pytz" ,python2-pytz)
2974 ,@(package-propagated-inputs scikit-image))))))
2975
2976 (define-public python-redis
2977 (package
2978 (name "python-redis")
2979 (version "2.10.3")
2980 (source
2981 (origin
2982 (method url-fetch)
2983 (uri (string-append
2984 "https://pypi.python.org/packages/source/r/redis/redis-"
2985 version ".tar.gz"))
2986 (sha256
2987 (base32 "1701qjwn4n05q90fdg4bsg96s27xf5s4hsb4gxhv3xk052q3gyx4"))))
2988 (build-system python-build-system)
2989 ;; Tests require a running Redis server
2990 (arguments '(#:tests? #f))
2991 (native-inputs
2992 `(("python-pytest" ,python-pytest)))
2993 (home-page "https://github.com/andymccurdy/redis-py")
2994 (synopsis "Redis Python client")
2995 (description
2996 "This package provides a Python interface to the Redis key-value store.")
2997 (license license:expat)))
2998
2999 (define-public python2-redis
3000 (package-with-python2 python-redis))
3001
3002 (define-public python-rq
3003 (package
3004 (name "python-rq")
3005 (version "0.5.2")
3006 (source
3007 (origin
3008 (method url-fetch)
3009 (uri (string-append
3010 "https://pypi.python.org/packages/source/r/rq/rq-"
3011 version ".tar.gz"))
3012 (sha256
3013 (base32 "0b0z5hn8wkfg300hx7816csgv3bcfamlr29fi3yzgqmpqxwj3fix"))))
3014 (build-system python-build-system)
3015 (propagated-inputs
3016 `(("python-click" ,python-click)
3017 ("python-redis" ,python-redis)))
3018 (home-page "http://python-rq.org/")
3019 (synopsis "Simple job queues for Python")
3020 (description
3021 "RQ (Redis Queue) is a simple Python library for queueing jobs and
3022 processing them in the background with workers. It is backed by Redis and it
3023 is designed to have a low barrier to entry.")
3024 (license license:bsd-2)))
3025
3026 (define-public python2-rq
3027 (package-with-python2 python-rq))
3028
3029 (define-public python-cython
3030 (package
3031 (name "python-cython")
3032 (version "0.24.1")
3033 (source
3034 (origin
3035 (method url-fetch)
3036 (uri (pypi-uri "Cython" version))
3037 (sha256
3038 (base32
3039 "1fg7fmpvfcq9md4ncyqnnylyjy4z3ksdrshzis95g1sh03d8z044"))))
3040 (build-system python-build-system)
3041 ;; we need the full python package and not just the python-wrapper
3042 ;; because we need libpython3.3m.so
3043 (inputs
3044 `(("python" ,python)))
3045 (arguments
3046 `(#:phases
3047 (modify-phases %standard-phases
3048 (add-before 'check 'set-HOME
3049 ;; some tests require access to "$HOME/.cython"
3050 (lambda _ (setenv "HOME" "/tmp")))
3051 (replace 'check
3052 (lambda _ (zero? (system* "python" "runtests.py" "-vv")))))))
3053 (home-page "http://cython.org/")
3054 (synopsis "C extensions for Python")
3055 (description "Cython is an optimising static compiler for both the Python
3056 programming language and the extended Cython programming language. It makes
3057 writing C extensions for Python as easy as Python itself.")
3058 (license license:asl2.0)
3059 (properties `((python2-variant . ,(delay python2-cython))))))
3060
3061 (define-public python2-cython
3062 (package (inherit (package-with-python2
3063 (strip-python2-variant python-cython)))
3064 (name "python2-cython")
3065 (inputs
3066 `(("python-2" ,python-2))))) ; this is not automatically changed
3067
3068 ;; The RPython toolchain currently does not support Python 3.
3069 (define-public python2-rpython
3070 (package
3071 (name "python2-rpython")
3072 (version "0.1.4")
3073 (source
3074 (origin
3075 (method url-fetch)
3076 (uri (pypi-uri "rpython" version))
3077 (sha256
3078 (base32
3079 "07pps06fq4c4wmi5ii0sgh9zgwniz5y7frqhm28g3a154l163fxc"))))
3080 (build-system python-build-system)
3081 (arguments `(#:python ,python-2))
3082 (native-inputs
3083 `(("python2-pytest" ,python2-pytest))) ; needed for running tests
3084 (home-page "https://rpython.readthedocs.org")
3085 (synopsis "Framework for implementing interpreters and virtual machines")
3086 (description "RPython is a translation and support framework for
3087 producing implementations of dynamic languages, emphasizing a clean separation
3088 between language specification and implementation aspects.")
3089 (license license:expat)))
3090
3091 ;; This version of numpy is missing the documentation and is only used to
3092 ;; build matplotlib which is required to build numpy's documentation.
3093 (define python-numpy-bootstrap
3094 (package
3095 (name "python-numpy-bootstrap")
3096 (version "1.10.4")
3097 (source
3098 (origin
3099 (method url-fetch)
3100 (uri (string-append "mirror://sourceforge/numpy/NumPy/" version
3101 "/numpy-" version ".tar.gz"))
3102 (sha256
3103 (base32
3104 "1bjjhvncraka5s6i4lg644jrxij6bvycxy7an20gcz3a0m11iygp"))))
3105 (build-system python-build-system)
3106 (inputs
3107 `(("openblas" ,openblas)
3108 ("lapack" ,lapack)))
3109 (native-inputs
3110 `(("python-nose" ,python-nose)
3111 ("gfortran" ,gfortran)))
3112 (arguments
3113 `(#:phases
3114 (modify-phases %standard-phases
3115 (add-before 'build 'set-environment-variables
3116 (lambda* (#:key inputs #:allow-other-keys)
3117 (call-with-output-file "site.cfg"
3118 (lambda (port)
3119 (format port
3120 "[openblas]
3121 libraries = openblas
3122 library_dirs = ~a/lib
3123 include_dirs = ~a/include
3124
3125 # backslash-n to make emacs happy
3126 \n[lapack]
3127 lapack_libs = lapack
3128 library_dirs = ~a/lib
3129 include_dirs = ~a/include
3130 "
3131 (assoc-ref inputs "openblas")
3132 (assoc-ref inputs "openblas")
3133 (assoc-ref inputs "lapack")
3134 (assoc-ref inputs "lapack"))))
3135 ;; Use "gcc" executable, not "cc".
3136 (substitute* "numpy/distutils/system_info.py"
3137 (("c = distutils\\.ccompiler\\.new_compiler\\(\\)")
3138 "c = distutils.ccompiler.new_compiler(); c.set_executables(compiler='gcc',compiler_so='gcc',linker_exe='gcc',linker_so='gcc -shared')"))
3139 #t))
3140 ;; Tests can only be run after the library has been installed and not
3141 ;; within the source directory.
3142 (delete 'check)
3143 (add-after 'install 'check
3144 (lambda* (#:key outputs inputs #:allow-other-keys)
3145 ;; Make installed package available for running the tests
3146 (add-installed-pythonpath inputs outputs)
3147 (with-directory-excursion "/tmp"
3148 (zero? (system* "python" "-c"
3149 "import numpy; numpy.test(verbose=2)"))))))))
3150 (home-page "http://www.numpy.org/")
3151 (synopsis "Fundamental package for scientific computing with Python")
3152 (description "NumPy is the fundamental package for scientific computing
3153 with Python. It contains among other things: a powerful N-dimensional array
3154 object, sophisticated (broadcasting) functions, tools for integrating C/C++
3155 and Fortran code, useful linear algebra, Fourier transform, and random number
3156 capabilities.")
3157 (license license:bsd-3)))
3158
3159 (define python2-numpy-bootstrap
3160 (package-with-python2 python-numpy-bootstrap))
3161
3162 (define-public python2-fastlmm
3163 (package
3164 (name "python2-fastlmm")
3165 (version "0.2.21")
3166 (source
3167 (origin
3168 (method url-fetch)
3169 (uri (pypi-uri "fastlmm" version ".zip"))
3170 (sha256
3171 (base32
3172 "1q8c34rpmwkfy3r4d5172pzdkpfryj561897z9r3x22gq7813x1m"))))
3173 (build-system python-build-system)
3174 (arguments
3175 `(#:python ,python-2)) ; only Python 2.7 is supported
3176 (propagated-inputs
3177 `(("python2-numpy" ,python2-numpy)
3178 ("python2-scipy" ,python2-scipy)
3179 ("python2-matplotlib" ,python2-matplotlib)
3180 ("python2-pandas" ,python2-pandas)
3181 ("python2-scikit-learn" ,python2-scikit-learn)
3182 ("python2-pysnptools" ,python2-pysnptools)))
3183 (native-inputs
3184 `(("unzip" ,unzip)
3185 ("python2-cython" ,python2-cython)
3186 ("python2-mock" ,python2-mock)))
3187 (home-page "http://research.microsoft.com/en-us/um/redmond/projects/mscompbio/fastlmm/")
3188 (synopsis "Perform genome-wide association studies on large data sets")
3189 (description
3190 "FaST-LMM, which stands for Factored Spectrally Transformed Linear Mixed
3191 Models, is a program for performing both single-SNP and SNP-set genome-wide
3192 association studies (GWAS) on extremely large data sets.")
3193 (license license:asl2.0)))
3194
3195 (define-public python-numpy
3196 (package (inherit python-numpy-bootstrap)
3197 (name "python-numpy")
3198 (outputs '("out" "doc"))
3199 (inputs
3200 `(("which" ,which)))
3201 (propagated-inputs
3202 `(("python-matplotlib" ,python-matplotlib)
3203 ("python-pyparsing" ,python-pyparsing)
3204 ,@(package-inputs python-numpy-bootstrap)))
3205 (native-inputs
3206 `(("pkg-config" ,pkg-config)
3207 ("python-sphinx" ,python-sphinx)
3208 ("python-numpydoc" ,python-numpydoc)
3209 ("texlive" ,texlive)
3210 ("texinfo" ,texinfo)
3211 ("perl" ,perl)
3212 ,@(package-native-inputs python-numpy-bootstrap)))
3213 (arguments
3214 `(,@(substitute-keyword-arguments
3215 (package-arguments python-numpy-bootstrap)
3216 ((#:phases phases)
3217 `(alist-cons-after
3218 'install 'install-doc
3219 (lambda* (#:key inputs outputs #:allow-other-keys)
3220 ;; Make installed package available for building the
3221 ;; documentation
3222 (add-installed-pythonpath inputs outputs)
3223 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
3224 (doc (string-append
3225 data "/doc/" ,name "-"
3226 ,(package-version python-numpy-bootstrap)))
3227 (info (string-append data "/info"))
3228 (html (string-append doc "/html"))
3229 (pyver ,(string-append "PYVER=")))
3230 (with-directory-excursion "doc"
3231 (mkdir-p html)
3232 (system* "make" "html" pyver)
3233 (system* "make" "latex" "PAPER=a4" pyver)
3234 (system* "make" "-C" "build/latex"
3235 "all-pdf" "PAPER=a4" pyver)
3236 ;; FIXME: Generation of the info file fails.
3237 ;; (system* "make" "info" pyver)
3238 ;; (mkdir-p info)
3239 ;; (copy-file "build/texinfo/numpy.info"
3240 ;; (string-append info "/numpy.info"))
3241 (for-each (lambda (file)
3242 (copy-file (string-append "build/latex" file)
3243 (string-append doc file)))
3244 '("/numpy-ref.pdf" "/numpy-user.pdf"))
3245 (with-directory-excursion "build/html"
3246 (for-each (lambda (file)
3247 (let* ((dir (dirname file))
3248 (tgt-dir (string-append html "/" dir)))
3249 (unless (equal? "." dir)
3250 (mkdir-p tgt-dir))
3251 (install-file file html)))
3252 (find-files "." ".*"))))))
3253 ,phases)))))))
3254
3255 (define-public python2-numpy
3256 (package-with-python2 python-numpy))
3257
3258 (define-public python-pyparsing
3259 (package
3260 (name "python-pyparsing")
3261 (version "2.0.3")
3262 (source
3263 (origin
3264 (method url-fetch)
3265 (uri (string-append "mirror://sourceforge/pyparsing/pyparsing"
3266 "/pyparsing-" version
3267 "/pyparsing-" version ".tar.gz"))
3268 (sha256
3269 (base32
3270 "0kw4py7gn45j93q8r7bzajfrjdc3xlsn2yzln41lf9zmrghjkrq6"))))
3271 (build-system python-build-system)
3272 (outputs '("out" "doc"))
3273 (arguments
3274 `(#:tests? #f ; no test target
3275 #:modules ((guix build python-build-system)
3276 (guix build utils))
3277 #:phases
3278 (alist-cons-after
3279 'install 'install-doc
3280 (lambda* (#:key outputs #:allow-other-keys)
3281 (let* ((doc (string-append (assoc-ref outputs "doc")
3282 "/share/doc/" ,name "-" ,version))
3283 (html-doc (string-append doc "/html"))
3284 (examples (string-append doc "/examples")))
3285 (mkdir-p html-doc)
3286 (mkdir-p examples)
3287 (for-each
3288 (lambda (dir tgt)
3289 (map (lambda (file)
3290 (install-file file tgt))
3291 (find-files dir ".*")))
3292 (list "docs" "htmldoc" "examples")
3293 (list doc html-doc examples))))
3294 %standard-phases)))
3295 (home-page "http://pyparsing.wikispaces.com")
3296 (synopsis "Python parsing class library")
3297 (description
3298 "The pyparsing module is an alternative approach to creating and
3299 executing simple grammars, vs. the traditional lex/yacc approach, or the use
3300 of regular expressions. The pyparsing module provides a library of classes
3301 that client code uses to construct the grammar directly in Python code.")
3302 (license license:expat)))
3303
3304 (define-public python2-pyparsing
3305 (package-with-python2 python-pyparsing))
3306
3307 (define-public python-numpydoc
3308 (package
3309 (name "python-numpydoc")
3310 (version "0.5")
3311 (source
3312 (origin
3313 (method url-fetch)
3314 (uri (string-append
3315 "https://pypi.python.org/packages/source/n/numpydoc/numpydoc-"
3316 version ".tar.gz"))
3317 (sha256
3318 (base32
3319 "0d4dnifaxkll50jx6czj05y8cb4ny60njd2wz299sj2jxfy51w4k"))
3320 (modules '((guix build utils)))
3321 (snippet
3322 '(begin
3323 ;; Drop a test requiring matplotlib, which we cannot add as an
3324 ;; input since it would create a circular dependency: Extend the
3325 ;; test for Python 3, where it is already dropped, to Python 2.
3326 (substitute* "numpydoc/tests/test_plot_directive.py"
3327 (("3") "2"))))))
3328 (build-system python-build-system)
3329 (native-inputs
3330 `(("python-docutils" ,python-docutils)
3331 ("python-sphinx" ,python-sphinx)
3332 ("python-nose" ,python-nose)))
3333 (home-page "https://pypi.python.org/pypi/numpydoc")
3334 (synopsis
3335 "Numpy's Sphinx extensions")
3336 (description
3337 "Sphinx extension to support docstrings in Numpy format.")
3338 (license license:bsd-2)))
3339
3340 (define-public python2-numpydoc
3341 (package-with-python2 python-numpydoc))
3342
3343 (define-public python-numexpr
3344 (package
3345 (name "python-numexpr")
3346 (version "2.6.0")
3347 (source
3348 (origin
3349 (method url-fetch)
3350 (uri (pypi-uri "numexpr" version))
3351 (sha256
3352 (base32
3353 "0i6iagl2hhbr8q4qzbbjd859v5806vqylq87fq7pi914ps6d6cag"))))
3354 (build-system python-build-system)
3355 (arguments `(#:tests? #f)) ; no tests included
3356 (propagated-inputs
3357 `(("python-numpy" ,python-numpy)))
3358 (home-page "https://github.com/pydata/numexpr")
3359 (synopsis "Fast numerical expression evaluator for NumPy")
3360 (description
3361 "Numexpr is a fast numerical expression evaluator for NumPy. With it,
3362 expressions that operate on arrays are accelerated and use less memory than
3363 doing the same calculation in Python. In addition, its multi-threaded
3364 capabilities can make use of all your cores, which may accelerate
3365 computations, most specially if they are not memory-bounded (e.g. those using
3366 transcendental functions).")
3367 (license license:expat)))
3368
3369 (define-public python2-numexpr
3370 (package-with-python2 python-numexpr))
3371
3372 (define-public python-matplotlib
3373 (package
3374 (name "python-matplotlib")
3375 (version "1.4.3")
3376 (source
3377 (origin
3378 (method url-fetch)
3379 (uri (string-append "mirror://sourceforge/matplotlib/matplotlib"
3380 "/matplotlib-" version
3381 "/matplotlib-" version ".tar.gz"))
3382 (sha256
3383 (base32
3384 "1dn05cvd0g984lzhh72wa0z93psgwshbbg93fkab6slx5m3l95av"))
3385 (patches (search-patches "matplotlib-setupext-tk.patch"))))
3386 (build-system python-build-system)
3387 (outputs '("out" "doc"))
3388 (propagated-inputs ; the following packages are all needed at run time
3389 `(("python-pyparsing" ,python-pyparsing)
3390 ("python-pygobject" ,python-pygobject)
3391 ("gobject-introspection" ,gobject-introspection)
3392 ("python-tkinter" ,python "tk")
3393 ("python-dateutil" ,python-dateutil-2)
3394 ("python-numpy" ,python-numpy-bootstrap)
3395 ("python-pillow" ,python-pillow)
3396 ("python-pytz" ,python-pytz)
3397 ("python-six" ,python-six)
3398 ;; The 'gtk+' package (and 'gdk-pixbuf', 'atk' and 'pango' propagated
3399 ;; from 'gtk+') provides the required 'typelib' files used by
3400 ;; 'gobject-introspection'. The location of these files is set with the
3401 ;; help of the environment variable GI_TYPELIB_PATH. At build time this
3402 ;; is done automatically by a 'native-search-path' procedure. However,
3403 ;; at run-time the user must set this variable as follows:
3404 ;;
3405 ;; export GI_TYPELIB_PATH=~/.guix-profile/lib/girepository-1.0
3406 ("gtk+" ,gtk+)
3407 ;; From version 1.4.0 'matplotlib' makes use of 'cairocffi' instead of
3408 ;; 'pycairo'. However, 'pygobject' makes use of a 'pycairo' 'context'
3409 ;; object. For this reason we need to import both libraries.
3410 ;; https://pythonhosted.org/cairocffi/cffi_api.html#converting-pycairo
3411 ("python-pycairo" ,python-pycairo)
3412 ("python-cairocffi" ,python-cairocffi)))
3413 (inputs
3414 `(("libpng" ,libpng)
3415 ("imagemagick" ,imagemagick)
3416 ("freetype" ,freetype)
3417 ("cairo" ,cairo)
3418 ("glib" ,glib)
3419 ;; FIXME: Add backends when available.
3420 ;("python-wxpython" ,python-wxpython)
3421 ;("python-pyqt" ,python-pyqt)
3422 ("tcl" ,tcl)
3423 ("tk" ,tk)))
3424 (native-inputs
3425 `(("pkg-config" ,pkg-config)
3426 ("python-sphinx" ,python-sphinx)
3427 ("python-numpydoc" ,python-numpydoc)
3428 ("python-nose" ,python-nose)
3429 ("python-mock" ,python-mock)
3430 ("texlive" ,texlive)
3431 ("texinfo" ,texinfo)))
3432 (arguments
3433 `(#:phases
3434 (alist-cons-before
3435 'build 'configure-environment
3436 (lambda* (#:key outputs inputs #:allow-other-keys)
3437 (let ((cairo (assoc-ref inputs "cairo"))
3438 (gtk+ (assoc-ref inputs "gtk+")))
3439 ;; Setting these directories in the 'basedirlist' of 'setup.cfg'
3440 ;; has not effect.
3441 (setenv "LD_LIBRARY_PATH"
3442 (string-append cairo "/lib:" gtk+ "/lib"))
3443 (setenv "HOME" (getcwd))
3444 (call-with-output-file "setup.cfg"
3445 (lambda (port)
3446 (format port "[directories]~%
3447 basedirlist = ~a,~a~%
3448 [rc_options]~%
3449 backend = TkAgg~%"
3450 (assoc-ref inputs "tcl")
3451 (assoc-ref inputs "tk"))))))
3452 (alist-cons-after
3453 'install 'install-doc
3454 (lambda* (#:key inputs outputs #:allow-other-keys)
3455 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
3456 (doc (string-append data "/doc/" ,name "-" ,version))
3457 (info (string-append data "/info"))
3458 (html (string-append doc "/html")))
3459 ;; Make installed package available for building the
3460 ;; documentation
3461 (add-installed-pythonpath inputs outputs)
3462 (with-directory-excursion "doc"
3463 ;; Produce pdf in 'A4' format.
3464 (substitute* (find-files "." "conf\\.py")
3465 (("latex_paper_size = 'letter'")
3466 "latex_paper_size = 'a4'"))
3467 (mkdir-p html)
3468 (mkdir-p info)
3469 ;; The doc recommends to run the 'html' target twice.
3470 (system* "python" "make.py" "html")
3471 (system* "python" "make.py" "html")
3472 (copy-recursively "build/html" html)
3473 (system* "python" "make.py" "latex")
3474 (system* "python" "make.py" "texinfo")
3475 (symlink (string-append html "/_images")
3476 (string-append info "/matplotlib-figures"))
3477 (with-directory-excursion "build/texinfo"
3478 (substitute* "matplotlib.texi"
3479 (("@image\\{([^,]*)" all file)
3480 (string-append "@image{matplotlib-figures/" file)))
3481 (symlink (string-append html "/_images")
3482 "./matplotlib-figures")
3483 (system* "makeinfo" "--no-split"
3484 "-o" "matplotlib.info" "matplotlib.texi"))
3485 (copy-file "build/texinfo/matplotlib.info"
3486 (string-append info "/matplotlib.info"))
3487 (copy-file "build/latex/Matplotlib.pdf"
3488 (string-append doc "/Matplotlib.pdf")))))
3489 %standard-phases))))
3490 (home-page "http://matplotlib.org")
3491 (synopsis "2D plotting library for Python")
3492 (description
3493 "Matplotlib is a Python 2D plotting library which produces publication
3494 quality figures in a variety of hardcopy formats and interactive environments
3495 across platforms. Matplotlib can be used in Python scripts, the python and
3496 ipython shell, web application servers, and six graphical user interface
3497 toolkits.")
3498 (license license:psfl)
3499 (properties `((python2-variant . ,(delay python2-matplotlib))))))
3500
3501 (define-public python2-matplotlib
3502 (let ((matplotlib (package-with-python2
3503 (strip-python2-variant python-matplotlib))))
3504 (package (inherit matplotlib)
3505 ;; Make sure to use special packages for Python 2 instead
3506 ;; of those automatically rewritten by package-with-python2.
3507 (propagated-inputs
3508 `(("python2-pycairo" ,python2-pycairo)
3509 ("python2-pygobject-2" ,python2-pygobject-2)
3510 ("python2-tkinter" ,python-2 "tk")
3511 ,@(fold alist-delete (package-propagated-inputs matplotlib)
3512 '("python-pycairo" "python-pygobject" "python-tkinter")))))))
3513
3514 (define-public python2-pysnptools
3515 (package
3516 (name "python2-pysnptools")
3517 (version "0.3.9")
3518 (source
3519 (origin
3520 (method url-fetch)
3521 (uri (pypi-uri "pysnptools" version ".zip"))
3522 (sha256
3523 (base32
3524 "1wybggjzz8zw7aav4pjsg2h22xp17a1lghrprza1pxwlm7wf96y2"))))
3525 (build-system python-build-system)
3526 (arguments
3527 `(#:python ,python-2)) ; only Python 2.7 is supported
3528 (propagated-inputs
3529 `(("python2-numpy" ,python2-numpy)
3530 ("python2-scipy" ,python2-scipy)
3531 ("python2-pandas" ,python2-pandas)))
3532 (native-inputs
3533 `(("python2-cython" ,python2-cython)))
3534 (native-inputs
3535 `(("unzip" ,unzip)))
3536 (home-page "http://research.microsoft.com/en-us/um/redmond/projects/mscompbio/")
3537 (synopsis "Library for reading and manipulating genetic data")
3538 (description
3539 "PySnpTools is a library for reading and manipulating genetic data. It
3540 can, for example, efficiently read whole PLINK *.bed/bim/fam files or parts of
3541 those files. It can also efficiently manipulate ranges of integers using set
3542 operators such as union, intersection, and difference.")
3543 (license license:asl2.0)))
3544
3545 (define-public python-rpy2
3546 (package
3547 (name "python-rpy2")
3548 (version "2.7.6")
3549 (source
3550 (origin
3551 (method url-fetch)
3552 (uri (pypi-uri "rpy2" version))
3553 (sha256
3554 (base32
3555 "0nhan2qvrw7b7gg5zddwa22kybdv3x1g26vkd7q8lvnkgzrs4dga"))))
3556 (build-system python-build-system)
3557 (propagated-inputs
3558 `(("python-six" ,python-six)))
3559 (inputs
3560 `(("readline" ,readline)
3561 ("icu4c" ,icu4c)
3562 ("pcre" ,pcre)
3563 ("r" ,r)))
3564 (native-inputs
3565 `(("zlib" ,zlib)))
3566 (home-page "http://rpy.sourceforge.net/")
3567 (synopsis "Python interface to the R language")
3568 (description "rpy2 is a redesign and rewrite of rpy. It is providing a
3569 low-level interface to R from Python, a proposed high-level interface,
3570 including wrappers to graphical libraries, as well as R-like structures and
3571 functions.")
3572 (license license:gpl3+)))
3573
3574 (define-public python2-rpy2
3575 (let ((rpy2 (package-with-python2 python-rpy2)))
3576 (package (inherit rpy2)
3577 (native-inputs
3578 `(("python2-singledispatch" ,python2-singledispatch)
3579 ,@(package-native-inputs rpy2))))))
3580
3581 (define-public python-scipy
3582 (package
3583 (name "python-scipy")
3584 (version "0.16.0")
3585 (source
3586 (origin
3587 (method url-fetch)
3588 ; http://downloads.sourceforge.net/project/scipy/scipy/0.16.1/scipy-0.16.1.tar.gz
3589 (uri (string-append "mirror://sourceforge/scipy/scipy/" version
3590 "/scipy-" version ".tar.xz"))
3591 (sha256
3592 (base32
3593 "0wa0a4skpda3gx7lb12yn19nhbairlyxrvda2lz2bcawk3x5qzz2"))))
3594 (build-system python-build-system)
3595 (propagated-inputs
3596 `(("python-numpy" ,python-numpy)
3597 ("python-matplotlib" ,python-matplotlib)
3598 ("python-pyparsing" ,python-pyparsing)))
3599 (inputs
3600 `(("lapack" ,lapack)
3601 ("openblas" ,openblas)))
3602 (native-inputs
3603 `(("python-nose" ,python-nose)
3604 ("python-sphinx" ,python-sphinx)
3605 ("python-numpydoc" ,python-numpydoc)
3606 ("gfortran" ,gfortran)
3607 ("texlive" ,texlive)
3608 ("perl" ,perl)))
3609 (outputs '("out" "doc"))
3610 (arguments
3611 `(#:phases
3612 (alist-cons-before
3613 'build 'configure-openblas
3614 (lambda* (#:key inputs #:allow-other-keys)
3615 (call-with-output-file "site.cfg"
3616 (lambda (port)
3617 (format port
3618 "[blas]
3619 libraries = openblas
3620 library_dirs = ~a/lib
3621 include_dirs = ~a/include
3622
3623 # backslash-n to make emacs happy
3624 \n[atlas]
3625 library_dirs = ~a/lib
3626 atlas_libs = openblas
3627 "
3628 (assoc-ref inputs "openblas")
3629 (assoc-ref inputs "openblas")
3630 (assoc-ref inputs "openblas"))))
3631 #t)
3632 (alist-cons-after
3633 'install 'install-doc
3634 (lambda* (#:key inputs outputs #:allow-other-keys)
3635 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
3636 (doc (string-append data "/doc/" ,name "-" ,version))
3637 (html (string-append doc "/html"))
3638 (pyver ,(string-append "PYVER=")))
3639 ;; Make installed package available for building the
3640 ;; documentation
3641 (add-installed-pythonpath inputs outputs)
3642 (with-directory-excursion "doc"
3643 ;; Fix generation of images for mathematical expressions.
3644 (substitute* (find-files "source" "conf\\.py")
3645 (("pngmath_use_preview = True")
3646 "pngmath_use_preview = False"))
3647 (mkdir-p html)
3648 (system* "make" "html" pyver)
3649 (system* "make" "latex" "PAPER=a4" pyver)
3650 (system* "make" "-C" "build/latex" "all-pdf" "PAPER=a4" pyver)
3651 (copy-file "build/latex/scipy-ref.pdf"
3652 (string-append doc "/scipy-ref.pdf"))
3653 (with-directory-excursion "build/html"
3654 (for-each (lambda (file)
3655 (let* ((dir (dirname file))
3656 (tgt-dir (string-append html "/" dir)))
3657 (install-file file html)))
3658 (find-files "." ".*"))))))
3659 ;; Tests can only be run after the library has been installed and not
3660 ;; within the source directory.
3661 (alist-cons-after
3662 'install 'check
3663 (lambda _
3664 (with-directory-excursion "/tmp"
3665 (zero? (system* "python" "-c" "import scipy; scipy.test()"))))
3666 (alist-delete
3667 'check
3668 (alist-cons-after
3669 'unpack 'fix-tests
3670 (lambda _
3671 (substitute* "scipy/integrate/tests/test_quadpack.py"
3672 (("libm.so") "libm.so.6"))
3673 #t)
3674 %standard-phases)))))))
3675 (home-page "http://www.scipy.org/")
3676 (synopsis "The Scipy library provides efficient numerical routines")
3677 (description "The SciPy library is one of the core packages that make up
3678 the SciPy stack. It provides many user-friendly and efficient numerical
3679 routines such as routines for numerical integration and optimization.")
3680 (license license:bsd-3)))
3681
3682 (define-public python2-scipy
3683 (package-with-python2 python-scipy))
3684
3685 (define-public python-socksipy-branch
3686 (package
3687 (name "python-socksipy-branch")
3688 (version "1.01")
3689 (source
3690 (origin
3691 (method url-fetch)
3692 (uri (pypi-uri "SocksiPy-branch" version))
3693 (sha256
3694 (base32
3695 "01l41v4g7fy9fzvinmjxy6zcbhgqaif8dhdqm4w90fwcw9h51a8p"))))
3696 (build-system python-build-system)
3697 (arguments
3698 `(#:tests? #f)) ; There are no tests
3699 (home-page "https://code.google.com/archive/p/socksipy-branch/")
3700 (synopsis "Python SOCKS module")
3701 (description
3702 "SocksiPy - A Python SOCKS client module. It provides a
3703 socket-like interface that supports connections to any TCP
3704 service through the use of a SOCKS4, SOCKS5 or HTTP proxy.
3705 The original version was developed by Dan Haim, this is a
3706 branch created by Mario Vilas to address some open issues,
3707 as the original project seems to have been abandoned circa 2007.")
3708 (license license:bsd-3)))
3709
3710 (define-public python2-socksipy-branch
3711 (package-with-python2 python-socksipy-branch))
3712
3713 (define-public python-sqlalchemy
3714 (package
3715 (name "python-sqlalchemy")
3716 (version "1.0.12")
3717 (source
3718 (origin
3719 (method url-fetch)
3720 (uri (string-append "https://pypi.python.org/packages/source/S/"
3721 "SQLAlchemy/SQLAlchemy-" version ".tar.gz"))
3722 (sha256
3723 (base32
3724 "1l8qclhd0s90w3pvwhi5mjxdwr5j7gw7cjka2fx6f2vqmq7f4yb6"))))
3725 (build-system python-build-system)
3726 (native-inputs
3727 `(("python-cython" ,python-cython) ;for c extensions
3728 ("python-pytest" ,python-pytest)
3729 ("python-mock" ,python-mock))) ;for tests
3730 (arguments
3731 `(#:phases (alist-replace
3732 'check
3733 (lambda _ (zero? (system* "py.test")))
3734 %standard-phases)))
3735 (home-page "http://www.sqlalchemy.org")
3736 (synopsis "Database abstraction library")
3737 (description
3738 "SQLAlchemy is the Python SQL toolkit and Object Relational Mapper that
3739 gives application developers the full power and flexibility of SQL. It
3740 provides a full suite of well known enterprise-level persistence patterns,
3741 designed for efficient and high-performing database access, adapted into a
3742 simple and Pythonic domain language.")
3743 (license license:x11)))
3744
3745 (define-public python2-sqlalchemy
3746 (package-with-python2 python-sqlalchemy))
3747
3748 (define-public python-pycodestyle
3749 (package
3750 (name "python-pycodestyle")
3751 (version "2.0.0")
3752 (source
3753 (origin
3754 (method url-fetch)
3755 (uri (pypi-uri "pycodestyle" version))
3756 (sha256
3757 (base32
3758 "1rz2v8506mdjdyxcnv9ygiw6v0d4dqx8z5sjyjm0w2v32h5l5w1p"))))
3759 (build-system python-build-system)
3760 (home-page "https://pycodestyle.readthedocs.io/")
3761 (synopsis "Python style guide checker")
3762 (description "@code{pycodestyle} (formerly pep8) is a tool to check
3763 Python code against some of the style conventions in
3764 @url{http://www.python.org/dev/peps/pep-0008/,PEP 8}.")
3765 (license license:expat)))
3766
3767 (define-public python2-pycodestyle
3768 (package-with-python2 python-pycodestyle))
3769
3770 (define-public python-orderedmultidict
3771 (package
3772 (name "python-orderedmultidict")
3773 (version "0.7.10")
3774 (source
3775 (origin
3776 (method url-fetch)
3777 (uri (pypi-uri "orderedmultidict" version))
3778 (sha256
3779 (base32
3780 "1gvqk0jd432wsn88kq4svad68xz3r012jfpnhh9in7bqrkyxidky"))))
3781 (build-system python-build-system)
3782 (arguments
3783 `(#:phases
3784 (modify-phases %standard-phases
3785 (add-after 'unpack 'fix-tests
3786 (lambda _
3787 ;; The package uses nosetest for running the tests.
3788 ;; Adding this initfile allows to run the test suite
3789 ;; without requiring nosetest.
3790 (zero? (system* "touch" "tests/__init__.py")))))))
3791 (propagated-inputs
3792 `(("python-six" ,python-six)))
3793 (native-inputs
3794 `(("python-pycodestyle" ,python-pycodestyle)))
3795 (home-page "https://github.com/gruns/orderedmultidict")
3796 (synopsis "Python Ordered Multivalue Dictionary - omdict")
3797 (description "This package contains a library for ordered multivalue
3798 dictionaries. A multivalue dictionary is a dictionary that can store
3799 multiple values for the same key. An ordered multivalue dictionary is a
3800 multivalue dictionary that retains the order of insertions and deletions.")
3801 (license license:unlicense)))
3802
3803 (define-public python2-orderedmultidict
3804 (package-with-python2 python-orderedmultidict))
3805
3806 (define-public python-furl
3807 (package
3808 (name "python-furl")
3809 (version "0.5.6")
3810 (source
3811 (origin
3812 (method url-fetch)
3813 (uri (pypi-uri "furl" version))
3814 (sha256
3815 (base32
3816 "0lzpfpm686hvz3sr1mcrnd1b3lgmnw8v59gb43wfi98r3b671pqc"))))
3817 (build-system python-build-system)
3818 (propagated-inputs
3819 `(("python-six" ,python-six)
3820 ("python-orderedmultidict" ,python-orderedmultidict)))
3821 (native-inputs
3822 `(("python-pycodestyle" ,python-pycodestyle)))
3823 (home-page "https://github.com/gruns/furl")
3824 (synopsis "URL manipulation in Python")
3825 (description "Furl provides an easy-to-use alternative to the
3826 @code{urllib} and @code{urlparse} modules for manipulating URLs.")
3827 (license license:unlicense)))
3828
3829 (define-public python2-furl
3830 (package-with-python2 python-furl))
3831
3832 (define-public python-flask-babel
3833 (package
3834 (name "python-flask-babel")
3835 (version "0.11.1")
3836 (source
3837 (origin
3838 (method url-fetch)
3839 (uri (pypi-uri "Flask-Babel" version))
3840 (sha256
3841 (base32
3842 "16b80cipdba9xj3jlaiaq6wgrgpjb70w3j01jjy9hbp4k71kd6yj"))))
3843 (build-system python-build-system)
3844 (propagated-inputs
3845 `(("python-flask" ,python-flask)
3846 ("python-babel" ,python-babel)
3847 ("python-jinja2" ,python-jinja2)
3848 ("python-pytz" ,python-pytz)))
3849 (home-page "https://github.com/python-babel/flask-babel")
3850 (synopsis "Add i18n/l10n support to Flask applications")
3851 (description "This package implements internationalization and localization
3852 support for Flask. This is based on the Python babel module as well as pytz -
3853 both of which are installed automatically if you install this library.")
3854 (license license:bsd-3)))
3855
3856 (define-public python2-flask-babel
3857 (package-with-python2 python-flask-babel))
3858
3859 (define-public python-sqlalchemy-utils
3860 (package
3861 (name "python-sqlalchemy-utils")
3862 (version "0.32.9")
3863 (source
3864 (origin
3865 (method url-fetch)
3866 (uri (pypi-uri "SQLAlchemy-Utils" version))
3867 (sha256
3868 (base32
3869 "1zbmmh7n8m01ikizn2mj1mfwch26nsr1awv9mvskqry7av0mpy98"))))
3870 (build-system python-build-system)
3871 (propagated-inputs
3872 `(("python-six" ,python-six)
3873 ("python-sqlalchemy" ,python-sqlalchemy)))
3874 (native-inputs
3875 `(("python-pytest" ,python-pytest)))
3876 (home-page "https://github.com/kvesteri/sqlalchemy-utils")
3877 (synopsis "Various utility functions for SQLAlchemy")
3878 (description
3879 "SQLAlchemy-utils provides various utility functions and custom data types
3880 for SQLAlchemy. SQLAlchemy is an SQL database abstraction library for Python.
3881
3882 You might also want to install the following optional dependencies:
3883 @enumerate
3884 @item @code{python-passlib}
3885 @item @code{python-babel}
3886 @item @code{python-cryptography}
3887 @item @code{python-pytz}
3888 @item @code{python-psycopg2}
3889 @item @code{python-furl}
3890 @item @code{python-flask-babel}
3891 @end enumerate
3892 ")
3893 (license license:bsd-3)))
3894
3895 (define-public python2-sqlalchemy-utils
3896 (package-with-python2 python-sqlalchemy-utils))
3897
3898 (define-public python-alembic
3899 (package
3900 (name "python-alembic")
3901 (version "0.8.7")
3902 (source
3903 (origin
3904 (method url-fetch)
3905 (uri (pypi-uri "alembic" version))
3906 (sha256
3907 (base32
3908 "0ias6fdzwr2s220fnjspkdgm9510bd0cnap0hx5y4zy4srba9f3z"))))
3909 (build-system python-build-system)
3910 (native-inputs
3911 `(("python-mock" ,python-mock)
3912 ("python-pytest-cov" ,python-pytest-cov)))
3913 (propagated-inputs
3914 `(("python-sqlalchemy" ,python-sqlalchemy)
3915 ("python-mako" ,python-mako)
3916 ("python-editor" ,python-editor)))
3917 (home-page "http://bitbucket.org/zzzeek/alembic")
3918 (synopsis
3919 "Database migration tool for SQLAlchemy")
3920 (description
3921 "Alembic is a lightweight database migration tool for usage with the
3922 SQLAlchemy Database Toolkit for Python.")
3923 (license license:expat)))
3924
3925 (define-public python2-alembic
3926 (package-with-python2 python-alembic))
3927
3928 (define-public python-distutils-extra
3929 (package
3930 (name "python-distutils-extra")
3931 (version "2.38")
3932 (source
3933 (origin
3934 (method url-fetch)
3935 (uri (string-append "https://launchpad.net/python-distutils-extra/trunk/"
3936 version "/+download/python-distutils-extra-"
3937 version ".tar.gz"))
3938 (sha256
3939 (base32
3940 "0lx15kcbby9zisx33p2h5hgakgwh2bvh0ibag8z0px4j6ifhs41x"))))
3941 (build-system python-build-system)
3942 (home-page "https://launchpad.net/python-distutils-extra/")
3943 (synopsis "Enhancements to Python's distutils")
3944 (description
3945 "The python-distutils-extra module enables you to easily integrate
3946 gettext support, themed icons, and scrollkeeper-based documentation into
3947 Python's distutils.")
3948 (license license:gpl2)))
3949
3950 (define-public python2-distutils-extra
3951 (package-with-python2 python-distutils-extra))
3952
3953 (define-public python2-elib.intl
3954 (package
3955 (name "python2-elib.intl")
3956 (version "0.0.3")
3957 (source
3958 (origin
3959 ;; This project doesn't tag releases or publish tarballs, so we take
3960 ;; source from a (semi-arbitrary, i.e. latest as of now) git commit.
3961 (method git-fetch)
3962 (uri (git-reference
3963 (url "https://github.com/dieterv/elib.intl.git")
3964 (commit "d09997cfef")))
3965 (sha256
3966 (base32
3967 "0y7vzff9xgbnaay7m0va1arl6g68ncwrvbgwl7jqlclsahzzb09d"))))
3968 (build-system python-build-system)
3969 (arguments
3970 ;; incompatible with Python 3 (exception syntax)
3971 `(#:python ,python-2
3972 #:tests? #f))
3973 (home-page "https://github.com/dieterv/elib.intl")
3974 (synopsis "Enhanced internationalization for Python")
3975 (description
3976 "The elib.intl module provides enhanced internationalization (I18N)
3977 services for your Python modules and applications.")
3978 (license license:lgpl3+)))
3979
3980 (define-public python-pillow
3981 (package
3982 (name "python-pillow")
3983 (version "3.3.3")
3984 (source
3985 (origin
3986 (method url-fetch)
3987 (uri (pypi-uri "Pillow" version))
3988 (sha256
3989 (base32
3990 "0xkv0p1d73gz0a1qaasf0ai4262g8f334j07vd60bjrxs2wr3nmj"))))
3991 (build-system python-build-system)
3992 (native-inputs
3993 `(("python-nose" ,python-nose)))
3994 (inputs
3995 `(("freetype" ,freetype)
3996 ("lcms" ,lcms)
3997 ("zlib" ,zlib)
3998 ("libjpeg" ,libjpeg)
3999 ("openjpeg" ,openjpeg)
4000 ("libtiff" ,libtiff)
4001 ("libwebp" ,libwebp)))
4002 ;; Note: setuptools used at runtime for pkg_resources
4003 (arguments
4004 `(#:phases (modify-phases %standard-phases
4005 (add-after
4006 'install 'check-installed
4007 (lambda* (#:key outputs inputs #:allow-other-keys)
4008 (begin
4009 (setenv "HOME" (getcwd))
4010 ;; Make installed package available for running the
4011 ;; tests
4012 (add-installed-pythonpath inputs outputs)
4013 (and (zero? (system* "python" "selftest.py"
4014 "--installed"))
4015 (zero? (system* "python" "test-installed.py"))))))
4016 (delete 'check))))
4017 (home-page "https://pypi.python.org/pypi/Pillow")
4018 (synopsis "Fork of the Python Imaging Library")
4019 (description
4020 "The Python Imaging Library adds image processing capabilities to your
4021 Python interpreter. This library provides extensive file format support, an
4022 efficient internal representation, and fairly powerful image processing
4023 capabilities. The core image library is designed for fast access to data
4024 stored in a few basic pixel formats. It should provide a solid foundation for
4025 a general image processing tool.")
4026 (license (license:x11-style
4027 "http://www.pythonware.com/products/pil/license.htm"
4028 "The PIL Software License"))))
4029
4030 (define-public python2-pillow
4031 (package-with-python2 python-pillow))
4032
4033 (define-public python-pycparser
4034 (package
4035 (name "python-pycparser")
4036 (version "2.14")
4037 (source
4038 (origin
4039 (method url-fetch)
4040 (uri (pypi-uri "pycparser" version))
4041 (sha256
4042 (base32
4043 "0wvzyb6rxsfj3xcnpa4ynbh9qc7rrbk2277d5wqpphmx9akv8nbr"))))
4044 (outputs '("out" "doc"))
4045 (build-system python-build-system)
4046 (native-inputs
4047 `(("pkg-config" ,pkg-config)))
4048 (arguments
4049 `(#:phases
4050 (alist-replace
4051 'check
4052 (lambda _
4053 (with-directory-excursion "tests"
4054 (zero? (system* "python" "all_tests.py"))))
4055 (alist-cons-after
4056 'install 'install-doc
4057 (lambda* (#:key outputs #:allow-other-keys)
4058 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4059 (doc (string-append data "/doc/" ,name "-" ,version))
4060 (examples (string-append doc "/examples")))
4061 (mkdir-p examples)
4062 (for-each (lambda (file)
4063 (copy-file (string-append "." file)
4064 (string-append doc file)))
4065 '("/README.rst" "/CHANGES" "/LICENSE"))
4066 (copy-recursively "examples" examples)))
4067 %standard-phases))))
4068 (home-page "https://github.com/eliben/pycparser")
4069 (synopsis "C parser in Python")
4070 (description
4071 "Pycparser is a complete parser of the C language, written in pure Python
4072 using the PLY parsing library. It parses C code into an AST and can serve as
4073 a front-end for C compilers or analysis tools.")
4074 (license license:bsd-3)))
4075
4076 (define-public python2-pycparser
4077 (package-with-python2 python-pycparser))
4078
4079 (define-public python-cffi
4080 (package
4081 (name "python-cffi")
4082 (version "1.4.2")
4083 (source
4084 (origin
4085 (method url-fetch)
4086 (uri (pypi-uri "cffi" version))
4087 (sha256
4088 (base32 "161rj52rzi3880lij17d6i9kvgkiwjilrqjs8405k8sf6ryif7cg"))))
4089 (build-system python-build-system)
4090 (outputs '("out" "doc"))
4091 (inputs
4092 `(("libffi" ,libffi)))
4093 (propagated-inputs ; required at run-time
4094 `(("python-pycparser" ,python-pycparser)))
4095 (native-inputs
4096 `(("pkg-config" ,pkg-config)
4097 ("python-sphinx" ,python-sphinx)
4098 ("python-pytest" ,python-pytest)))
4099 (arguments
4100 `(#:phases
4101 (alist-cons-after
4102 'install 'install-doc
4103 (lambda* (#:key outputs #:allow-other-keys)
4104 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4105 (doc (string-append data "/doc/" ,name "-" ,version))
4106 (html (string-append doc "/html")))
4107 (with-directory-excursion "doc"
4108 (system* "make" "html")
4109 (mkdir-p html)
4110 (copy-recursively "build/html" html))
4111 (copy-file "LICENSE" (string-append doc "/LICENSE"))))
4112 %standard-phases)))
4113 (home-page "http://cffi.readthedocs.org")
4114 (synopsis "Foreign function interface for Python")
4115 (description
4116 "Foreign Function Interface for Python calling C code.")
4117 (license license:expat)))
4118
4119 (define-public python2-cffi
4120 (package-with-python2 python-cffi))
4121
4122 (define-public python-xcffib
4123 (package
4124 (name "python-xcffib")
4125 (version "0.1.9")
4126 (source
4127 (origin
4128 (method url-fetch)
4129 (uri (string-append "https://pypi.python.org/packages/source/x/"
4130 "xcffib/xcffib-" version ".tar.gz"))
4131 (sha256
4132 (base32
4133 "0655hzxv57h1a9ja9kwp0ichbkhf3djw32k33d66xp0q37dq2y81"))))
4134 (build-system python-build-system)
4135 (inputs
4136 `(("libxcb" ,libxcb)))
4137 (propagated-inputs
4138 `(("python-cffi" ,python-cffi) ; used at run time
4139 ("python-six" ,python-six)))
4140 (arguments
4141 `(#:phases
4142 (alist-cons-after
4143 'install 'install-doc
4144 (lambda* (#:key outputs #:allow-other-keys)
4145 (let ((doc (string-append (assoc-ref outputs "out") "/share"
4146 "/doc/" ,name "-" ,version)))
4147 (mkdir-p doc)
4148 (copy-file "README.md"
4149 (string-append doc "/README.md"))))
4150 %standard-phases)))
4151 (home-page "https://github.com/tych0/xcffib")
4152 (synopsis "XCB Python bindings")
4153 (description
4154 "Xcffib is a replacement for xpyb, an XCB Python bindings. It adds
4155 support for Python 3 and PyPy. It is based on cffi.")
4156 (license license:expat)))
4157
4158 (define-public python2-xcffib
4159 (package-with-python2 python-xcffib))
4160
4161 (define-public python-cairocffi
4162 (package
4163 (name "python-cairocffi")
4164 (version "0.6")
4165 (source
4166 (origin
4167 (method url-fetch)
4168 ;; The archive on pypi is missing the 'utils' directory!
4169 (uri (string-append "https://github.com/SimonSapin/cairocffi/archive/v"
4170 version ".tar.gz"))
4171 (file-name (string-append name "-" version ".tar.gz"))
4172 (sha256
4173 (base32
4174 "03w5p62sp3nqiccx864sbq0jvh7946277jqx3rcc3dch5xwfvv51"))))
4175 (build-system python-build-system)
4176 (outputs '("out" "doc"))
4177 (inputs
4178 `(("gdk-pixbuf" ,gdk-pixbuf)
4179 ("cairo" ,cairo)))
4180 (native-inputs
4181 `(("pkg-config" ,pkg-config)
4182 ("python-sphinx" ,python-sphinx)
4183 ("python-docutils" ,python-docutils)))
4184 (propagated-inputs
4185 `(("python-xcffib" ,python-xcffib))) ; used at run time
4186 (arguments
4187 `(#:phases
4188 (alist-cons-after
4189 'install 'install-doc
4190 (lambda* (#:key inputs outputs #:allow-other-keys)
4191 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4192 (doc (string-append data "/doc/" ,name "-" ,version))
4193 (html (string-append doc "/html")))
4194 (setenv "LD_LIBRARY_PATH"
4195 (string-append (assoc-ref inputs "cairo") "/lib" ":"
4196 (assoc-ref inputs "gdk-pixbuf") "/lib"))
4197 (setenv "LANG" "en_US.UTF-8")
4198 (mkdir-p html)
4199 (for-each (lambda (file)
4200 (copy-file (string-append "." file)
4201 (string-append doc file)))
4202 '("/README.rst" "/CHANGES" "/LICENSE"))
4203 (system* "python" "setup.py" "build_sphinx")
4204 (copy-recursively "docs/_build/html" html)))
4205 %standard-phases)))
4206 (home-page "https://github.com/SimonSapin/cairocffi")
4207 (synopsis "Python bindings and object-oriented API for Cairo")
4208 (description
4209 "Cairocffi is a CFFI-based drop-in replacement for Pycairo, a set of
4210 Python bindings and object-oriented API for cairo. Cairo is a 2D vector
4211 graphics library with support for multiple backends including image buffers,
4212 PNG, PostScript, PDF, and SVG file output.")
4213 (license license:bsd-3)))
4214
4215 (define-public python2-cairocffi
4216 (package-with-python2 python-cairocffi))
4217
4218 (define-public python-decorator
4219 (package
4220 (name "python-decorator")
4221 (version "4.0.9")
4222 (source
4223 (origin
4224 (method url-fetch)
4225 (uri (pypi-uri "decorator" version))
4226 (sha256
4227 (base32 "1a5vwhflfd9sh3rfb40xlyipldgdzfff6brman57hqv3661jw0lh"))))
4228 (build-system python-build-system)
4229 (arguments '(#:tests? #f)) ; no test target
4230 (home-page "https://pypi.python.org/pypi/decorator/")
4231 (synopsis "Python module to simplify usage of decorators")
4232 (description
4233 "The aim of the decorator module is to simplify the usage of decorators
4234 for the average programmer, and to popularize decorators usage giving examples
4235 of useful decorators, such as memoize, tracing, redirecting_stdout, locked,
4236 etc. The core of this module is a decorator factory.")
4237 (license license:expat)))
4238
4239 (define-public python2-decorator
4240 (package-with-python2 python-decorator))
4241
4242 (define-public python-drmaa
4243 (package
4244 (name "python-drmaa")
4245 (version "0.7.6")
4246 (source
4247 (origin
4248 (method url-fetch)
4249 (uri (string-append
4250 "https://pypi.python.org/packages/source/d/drmaa/drmaa-"
4251 version ".tar.gz"))
4252 (sha256
4253 (base32 "0bzl9f9g34dlhwf09i3fdv7dqqzf2iq0w7d6c2bafx1nlap8qfbh"))))
4254 (build-system python-build-system)
4255 ;; The test suite requires libdrmaa which is provided by the cluster
4256 ;; environment. At runtime the environment variable DRMAA_LIBRARY_PATH
4257 ;; should be set to the path of the libdrmaa library.
4258 (arguments '(#:tests? #f))
4259 (native-inputs
4260 `(("python-nose" ,python-nose)))
4261 (home-page "https://pypi.python.org/pypi/drmaa")
4262 (synopsis "Python bindings for the DRMAA library")
4263 (description
4264 "A Python package for Distributed Resource Management (DRM) job
4265 submission and control. This package is an implementation of the DRMAA 1.0
4266 Python language binding specification.")
4267 (license license:bsd-3)))
4268
4269 (define-public python2-drmaa
4270 (package-with-python2 python-drmaa))
4271
4272 (define-public python-gridmap
4273 (package
4274 (name "python-gridmap")
4275 (version "0.13.0")
4276 (source
4277 (origin
4278 (method url-fetch)
4279 (uri (string-append
4280 "https://github.com/pygridtools/gridmap/archive/v"
4281 version ".tar.gz"))
4282 (file-name (string-append name "-" version ".tar.gz"))
4283 (sha256
4284 (base32 "1gzjg2k6f14i1msm2b0ax8d9ds1hvk6qd5nlaivg8m4cxqp4cp1x"))))
4285 (build-system python-build-system)
4286 (propagated-inputs
4287 `(("python-psutil" ,python-psutil)
4288 ("python-drmaa" ,python-drmaa)
4289 ("python-pyzmq" ,python-pyzmq)))
4290 (home-page "https://github.com/pygridtools/gridmap")
4291 (synopsis "Create jobs on a cluster directly from Python")
4292 (description
4293 "Gridmap is a Python package to allow you to easily create jobs on the
4294 cluster directly from Python. You can directly map Python functions onto the
4295 cluster without needing to write any wrapper code yourself.")
4296 (license license:gpl3+)))
4297
4298 (define-public python2-gridmap
4299 (package-with-python2 python-gridmap))
4300
4301 (define-public python-pexpect
4302 (package
4303 (name "python-pexpect")
4304 (version "3.3")
4305 (source
4306 (origin
4307 (method url-fetch)
4308 (uri (string-append "https://pypi.python.org/packages/source/p/"
4309 "pexpect/pexpect-" version ".tar.gz"))
4310 (sha256
4311 (base32 "1fp5gm976z7ghm8jw57463rj19cv06c8zw842prgyg788f6n3snz"))))
4312 (build-system python-build-system)
4313 (arguments
4314 `(#:phases
4315 (modify-phases %standard-phases
4316 (replace 'check (lambda _ (zero? (system* "nosetests")))))))
4317 (native-inputs
4318 `(("python-nose" ,python-nose)))
4319 (home-page "http://pexpect.readthedocs.org/")
4320 (synopsis "Controlling interactive console applications")
4321 (description
4322 "Pexpect is a pure Python module for spawning child applications;
4323 controlling them; and responding to expected patterns in their output.
4324 Pexpect works like Don Libes’ Expect. Pexpect allows your script to spawn a
4325 child application and control it as if a human were typing commands.")
4326 (license license:isc)))
4327
4328 (define-public python2-pexpect
4329 (package-with-python2 python-pexpect))
4330
4331 (define-public python-setuptools-scm
4332 (package
4333 (name "python-setuptools-scm")
4334 (version "1.11.1")
4335 (source (origin
4336 (method url-fetch)
4337 (uri (pypi-uri "setuptools_scm" version))
4338 (sha256
4339 (base32
4340 "1gqr73i150yzj3mz32854vj93x07yr52kn8fdckwa41ll8wgficc"))))
4341 (build-system python-build-system)
4342 (home-page "https://github.com/pypa/setuptools_scm/")
4343 (synopsis "Manage Python package versions in SCM metadata")
4344 (description
4345 "Setuptools_scm handles managing your Python package versions in
4346 @dfn{software configuration management} (SCM) metadata instead of declaring
4347 them as the version argument or in a SCM managed file.")
4348 (license license:expat)))
4349
4350 (define-public python2-setuptools-scm
4351 (package-with-python2 python-setuptools-scm))
4352
4353 (define-public python-pathpy
4354 (package
4355 (name "python-pathpy")
4356 (version "8.1.1")
4357 (source
4358 (origin
4359 (method url-fetch)
4360 (uri (string-append "https://pypi.python.org/packages/source/p/"
4361 "path.py/path.py-" version ".tar.gz"))
4362 (sha256
4363 (base32 "1p8s1l2vfkqhqxdhqlj0g1jjw4f1as2frr35sjcpjjpd5a89y41f"))))
4364 (build-system python-build-system)
4365 (propagated-inputs
4366 `(("python-appdirs" ,python-appdirs)))
4367 (native-inputs
4368 `(("python-setuptools-scm" ,python-setuptools-scm)
4369 ("python-pytest" ,python-pytest)
4370 ("python-pytest-runner" ,python-pytest-runner)))
4371 (home-page "http://github.com/jaraco/path.py")
4372 (synopsis "Python module wrapper for built-in os.path")
4373 (description
4374 "@code{path.py} implements path objects as first-class entities, allowing
4375 common operations on files to be invoked on those path objects directly.")
4376 (license license:expat)))
4377
4378 (define-public python2-pathpy
4379 (package-with-python2 python-pathpy))
4380
4381 (define-public python-pickleshare
4382 (package
4383 (name "python-pickleshare")
4384 (version "0.5")
4385 (source
4386 (origin
4387 (method url-fetch)
4388 (uri (string-append "https://pypi.python.org/packages/source/p/"
4389 "pickleshare/pickleshare-" version ".tar.gz"))
4390 (sha256
4391 (base32 "11ljr90j3p6qswdrbl7p4cjb2i93f6vn0vx9anzpshsx0d2mggn0"))))
4392 (build-system python-build-system)
4393 (propagated-inputs
4394 `(("python-pathpy" ,python-pathpy)))
4395 (home-page "https://github.com/vivainio/pickleshare")
4396 (synopsis "Tiny key value database with concurrency support")
4397 (description
4398 "PickleShare is a small ‘shelve’-like datastore with concurrency support.
4399 Like shelve, a PickleShareDB object acts like a normal dictionary. Unlike
4400 shelve, many processes can access the database simultaneously. Changing a
4401 value in database is immediately visible to other processes accessing the same
4402 database. Concurrency is possible because the values are stored in separate
4403 files. Hence the “database” is a directory where all files are governed by
4404 PickleShare.")
4405 (license license:expat)))
4406
4407 (define-public python2-pickleshare
4408 (package-with-python2 python-pickleshare))
4409
4410 (define-public python-simplegeneric
4411 (package
4412 (name "python-simplegeneric")
4413 (version "0.8.1")
4414 (source
4415 (origin
4416 (method url-fetch)
4417 (uri (string-append "https://pypi.python.org/packages/source/s/"
4418 "simplegeneric/simplegeneric-" version ".zip"))
4419 (sha256
4420 (base32 "0wwi1c6md4vkbcsfsf8dklf3vr4mcdj4mpxkanwgb6jb1432x5yw"))))
4421 (build-system python-build-system)
4422 (native-inputs
4423 `(("unzip" ,unzip)))
4424 (home-page "http://cheeseshop.python.org/pypi/simplegeneric")
4425 (synopsis "Python module for simple generic functions")
4426 (description
4427 "The simplegeneric module lets you define simple single-dispatch generic
4428 functions, akin to Python’s built-in generic functions like @code{len()},
4429 @code{iter()} and so on. However, instead of using specially-named methods,
4430 these generic functions use simple lookup tables, akin to those used by
4431 e.g. @code{pickle.dump()} and other generic functions found in the Python
4432 standard library.")
4433 (license license:zpl2.1)))
4434
4435 (define-public python2-simplegeneric
4436 (package-with-python2 python-simplegeneric))
4437
4438 (define-public python-ipython-genutils
4439 (package
4440 (name "python-ipython-genutils")
4441 (version "0.1.0")
4442 (source
4443 (origin
4444 (method url-fetch)
4445 (uri (string-append "https://pypi.python.org/packages/source/i/"
4446 "ipython_genutils/ipython_genutils-"
4447 version ".tar.gz"))
4448 (sha256
4449 (base32 "19l2pp1c64ansr89l3cqh19jdi2ixhssdzx0vz4n6r52a6i281is"))))
4450 (build-system python-build-system)
4451 (arguments `(#:tests? #f)) ; no tests
4452 (home-page "http://ipython.org")
4453 (synopsis "Vestigial utilities from IPython")
4454 (description
4455 "This package provides retired utilities from IPython.")
4456 (license license:bsd-3)))
4457
4458 (define-public python2-ipython-genutils
4459 (package-with-python2 python-ipython-genutils))
4460
4461 (define-public python-traitlets
4462 (package
4463 (name "python-traitlets")
4464 (version "4.2.0")
4465 (source
4466 (origin
4467 (method url-fetch)
4468 (uri (pypi-uri "traitlets" version))
4469 (sha256
4470 (base32
4471 "1afy08sa5n9gnkvh3da49c16zkyv598vchv0p1hp7zzjy8895hz4"))))
4472 (build-system python-build-system)
4473 (arguments
4474 `(#:phases
4475 (modify-phases %standard-phases
4476 (replace 'check (lambda _ (zero? (system* "nosetests")))))))
4477 (propagated-inputs
4478 `(("python-ipython-genutils" ,python-ipython-genutils)
4479 ("python-decorator" ,python-decorator)))
4480 (native-inputs
4481 `(("python-mock" ,python-mock)
4482 ("python-nose" ,python-nose)))
4483 (home-page "http://ipython.org")
4484 (synopsis "Configuration system for Python applications")
4485 (description
4486 "Traitlets is a framework that lets Python classes have attributes with
4487 type checking, dynamically calculated default values, and ‘on change’
4488 callbacks. The package also includes a mechanism to use traitlets for
4489 configuration, loading values from files or from command line arguments. This
4490 is a distinct layer on top of traitlets, so you can use traitlets in your code
4491 without using the configuration machinery.")
4492 (license license:bsd-3)))
4493
4494 (define-public python2-traitlets
4495 (package-with-python2 python-traitlets))
4496
4497 (define-public python-jupyter-core
4498 (package
4499 (name "python-jupyter-core")
4500 (version "4.2.0")
4501 (source
4502 (origin
4503 (method url-fetch)
4504 (uri (string-append (pypi-uri "jupyter_core" version)))
4505 (sha256
4506 (base32
4507 "177d9csqldzhsh6xs1p4nf6lzvhzyg6gklqjf69lxgxyadx87v24"))))
4508 (build-system python-build-system)
4509 ;; FIXME: not sure how to run the tests
4510 (arguments `(#:tests? #f))
4511 (propagated-inputs
4512 `(("python-traitlets" ,python-traitlets)))
4513 (home-page "http://jupyter.org/")
4514 (synopsis "Jupyter base package")
4515 (description
4516 "Jupyter core is the base package on which Jupyter projects rely.")
4517 (license license:bsd-3)))
4518
4519 (define-public python2-jupyter-core
4520 (package-with-python2 python-jupyter-core))
4521
4522 (define-public python-jupyter-client
4523 (package
4524 (name "python-jupyter-client")
4525 (version "4.4.0")
4526 (source
4527 (origin
4528 (method url-fetch)
4529 (uri (pypi-uri "jupyter_client" version))
4530 (sha256
4531 (base32
4532 "1vjjrpjw7k5sh982pbjnslv7byfbfazjw9g92jvs7dz5qbx556n9"))))
4533 (build-system python-build-system)
4534 ;; Tests fail because of missing native python kernel which I assume is
4535 ;; provided by the ipython package, which we cannot use because it would
4536 ;; cause a dependency cycle.
4537 (arguments `(#:tests? #f))
4538 (propagated-inputs
4539 `(("python-pyzmq" ,python-pyzmq)
4540 ("python-traitlets" ,python-traitlets)
4541 ("python-jupyter-core" ,python-jupyter-core)))
4542 (home-page "http://jupyter.org/")
4543 (synopsis "Jupyter protocol implementation and client libraries")
4544 (description
4545 "The @code{jupyter_client} package contains the reference implementation
4546 of the Jupyter protocol. It also provides client and kernel management APIs
4547 for working with kernels, and the @code{jupyter kernelspec} entrypoint for
4548 installing @code{kernelspec}s for use with Jupyter frontends.")
4549 (license license:bsd-3)))
4550
4551 (define-public python2-jupyter-client
4552 (package-with-python2 python-jupyter-client))
4553
4554 (define-public python-ipykernel
4555 (package
4556 (name "python-ipykernel")
4557 (version "4.5.0")
4558 (source
4559 (origin
4560 (method url-fetch)
4561 (uri (pypi-uri "ipykernel" version))
4562 (sha256
4563 (base32 "15c2bp1x3i6s4xb7vz7742h3kmvdfdfn9n2haywm3mwgvf77jni4"))))
4564 (build-system python-build-system)
4565 ;; The tests load a submodule of IPython. However, IPython itself depends
4566 ;; on ipykernel.
4567 (arguments `(#:tests? #f))
4568 (propagated-inputs
4569 ;; imported at runtime during connect
4570 `(("python-jupyter-client" ,python-jupyter-client)))
4571 (home-page "http://ipython.org")
4572 (synopsis "IPython Kernel for Jupyter")
4573 (description
4574 "This package provides the IPython kernel for Jupyter.")
4575 (license license:bsd-3)))
4576
4577 (define-public python2-ipykernel
4578 (package-with-python2 python-ipykernel))
4579
4580 (define-public python-testpath
4581 (package
4582 (name "python-testpath")
4583 (version "0.2")
4584 (source
4585 (origin
4586 (method url-fetch)
4587 (uri (string-append "https://github.com/jupyter/testpath/archive/"
4588 version ".tar.gz"))
4589 (file-name (string-append name "-" version ".tar.gz"))
4590 (sha256
4591 (base32
4592 "04kh3fgvmqz6cfcw79q70qwjz7ib7lxm27cc548iy2rpr33qqf55"))))
4593 (build-system python-build-system)
4594 (arguments
4595 `(#:tests? #f ; this package does not even have a setup.py
4596 #:phases
4597 (modify-phases %standard-phases
4598 (delete 'install)
4599 (replace 'build
4600 (lambda* (#:key inputs outputs #:allow-other-keys)
4601 (let ((dir (string-append
4602 (assoc-ref outputs "out")
4603 "/lib/python"
4604 (string-take (string-take-right
4605 (assoc-ref inputs "python") 5) 3)
4606 "/site-packages/testpath")))
4607 (mkdir-p dir)
4608 (copy-recursively "testpath" dir))
4609 #t)))))
4610 (home-page "https://github.com/takluyver/testpath")
4611 (synopsis "Test utilities for code working with files and commands")
4612 (description
4613 "Testpath is a collection of utilities for Python code working with files
4614 and commands. It contains functions to check things on the filesystem, and
4615 tools for mocking system commands and recording calls to those.")
4616 (license license:expat)))
4617
4618 (define-public python2-testpath
4619 (package-with-python2 python-testpath))
4620
4621 (define-public python-ipython
4622 (package
4623 (name "python-ipython")
4624 (version "4.0.0")
4625 (source
4626 (origin
4627 (method url-fetch)
4628 (uri (pypi-uri "ipython" version ".tar.gz"))
4629 (sha256
4630 (base32 "1npl8g6bfsff9j938ypx0q5fyzy2l8lp0jl8skjjj2zv0z27dlig"))))
4631 (build-system python-build-system)
4632 (outputs '("out" "doc"))
4633 (propagated-inputs
4634 `(("python-pyzmq" ,python-pyzmq)
4635 ("python-terminado" ,python-terminado)
4636 ("python-matplotlib" ,python-matplotlib)
4637 ("python-numpy" ,python-numpy)
4638 ("python-numpydoc" ,python-numpydoc)
4639 ("python-jinja2" ,python-jinja2)
4640 ("python-mistune" ,python-mistune)
4641 ("python-pexpect" ,python-pexpect)
4642 ("python-pickleshare" ,python-pickleshare)
4643 ("python-simplegeneric" ,python-simplegeneric)
4644 ("python-jsonschema" ,python-jsonschema)
4645 ("python-traitlets" ,python-traitlets)
4646 ("python-ipykernel" ,python-ipykernel)
4647 ("python-pygments" ,python-pygments)))
4648 (inputs
4649 `(("readline" ,readline)
4650 ("which" ,which)))
4651 (native-inputs
4652 `(("pkg-config" ,pkg-config)
4653 ("python-requests" ,python-requests) ;; for tests
4654 ("python-testpath" ,python-testpath)
4655 ("python-nose" ,python-nose)
4656 ("python-sphinx" ,python-sphinx)
4657 ("texlive" ,texlive)
4658 ("texinfo" ,texinfo)))
4659 (arguments
4660 `(#:phases
4661 (modify-phases %standard-phases
4662 (add-after
4663 'install 'install-doc
4664 (lambda* (#:key inputs outputs #:allow-other-keys)
4665 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4666 (doc (string-append data "/doc/" ,name "-" ,version))
4667 (html (string-append doc "/html"))
4668 (man1 (string-append data "/man/man1"))
4669 (info (string-append data "/info"))
4670 (examples (string-append doc "/examples")))
4671 (setenv "LANG" "en_US.utf8")
4672 ;; Make installed package available for running the tests
4673 (add-installed-pythonpath inputs outputs)
4674 (with-directory-excursion "docs"
4675 ;; FIXME: pdf fails to build
4676 ;;(system* "make" "pdf" "PAPER=a4")
4677 (system* "make" "html")
4678 (system* "make" "info"))
4679 (copy-recursively "docs/man" man1)
4680 (copy-recursively "examples" examples)
4681 (copy-recursively "docs/build/html" html)
4682 ;; (copy-file "docs/build/latex/ipython.pdf"
4683 ;; (string-append doc "/ipython.pdf"))
4684 (mkdir-p info)
4685 (copy-file "docs/build/texinfo/ipython.info"
4686 (string-append info "/ipython.info"))
4687 (copy-file "COPYING.rst" (string-append doc "/COPYING.rst")))))
4688 ;; Tests can only be run after the library has been installed and not
4689 ;; within the source directory.
4690 (delete 'check)
4691 (add-after
4692 'install 'check
4693 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
4694 (if tests?
4695 (with-directory-excursion "/tmp"
4696 ;; Make installed package available for running the tests
4697 (add-installed-pythonpath inputs outputs)
4698 (setenv "HOME" "/tmp/") ;; required by a test
4699 (zero? (system* (string-append (assoc-ref outputs "out")
4700 "/bin/iptest"))))
4701 #t)))
4702 (add-before
4703 'install 'fix-tests
4704 (lambda* (#:key inputs #:allow-other-keys)
4705 (substitute* "./IPython/utils/_process_posix.py"
4706 (("/usr/bin/env', 'which") (which "which")))
4707 (substitute* "./IPython/core/tests/test_inputtransformer.py"
4708 (("#!/usr/bin/env python")
4709 (string-append "#!" (which "python"))))
4710 ;; Disable 1 failing test
4711 (substitute* "./IPython/core/tests/test_magic.py"
4712 (("def test_dirops\\(\\):" all)
4713 (string-append "@dec.skipif(True)\n" all))))))))
4714 (home-page "http://ipython.org")
4715 (synopsis "IPython is a tool for interactive computing in Python")
4716 (description
4717 "IPython provides a rich architecture for interactive computing with:
4718 Powerful interactive shells, a browser-based notebook, support for interactive
4719 data visualization, embeddable interpreters and tools for parallel
4720 computing.")
4721 (license license:bsd-3)
4722 (properties `((python2-variant . ,(delay python2-ipython))))))
4723
4724 (define-public python2-ipython
4725 (let ((ipython (package-with-python2 (strip-python2-variant python-ipython))))
4726 (package
4727 (inherit ipython)
4728 ;; FIXME: some tests are failing
4729 (arguments
4730 `(#:tests? #f ,@(package-arguments ipython)))
4731 ;; FIXME: add pyreadline once available.
4732 (inputs
4733 `(("python2-mock" ,python2-mock)
4734 ,@(package-inputs ipython))))))
4735
4736 (define-public python-isodate
4737 (package
4738 (name "python-isodate")
4739 (version "0.5.4")
4740 (source
4741 (origin
4742 (method url-fetch)
4743 (uri (pypi-uri "isodate" version))
4744 (sha256
4745 (base32
4746 "0cafaiwixgpxwh9dsd28qb0dbzsj6xpxjdkyk30ns91ps10mq422"))))
4747 (build-system python-build-system)
4748 (home-page
4749 "http://cheeseshop.python.org/pypi/isodate")
4750 (synopsis
4751 "Python date parser and formatter")
4752 (description
4753 "Python-isodate is a python module for parsing and formatting
4754 ISO 8601 dates, time and duration.")
4755 (license license:bsd-3)))
4756
4757 (define-public python2-isodate
4758 (package-with-python2 python-isodate))
4759
4760 (define-public python-html5lib
4761 (package
4762 (name "python-html5lib")
4763 (version "1.0b8")
4764 (source
4765 (origin
4766 (method url-fetch)
4767 (uri (pypi-uri "html5lib" version))
4768 (sha256
4769 (base32
4770 "1lknq5j3nh11xrl268ks76zaj0gyzh34v94n5vbf6dk8llzxdx0q"))))
4771 (build-system python-build-system)
4772 (propagated-inputs
4773 `(("python-six" ,python-six))) ; required to "import html5lib"
4774 (arguments
4775 `(#:test-target "check"))
4776 (home-page
4777 "https://github.com/html5lib/html5lib-python")
4778 (synopsis
4779 "Python HTML parser based on the WHATWG HTML specifcation")
4780 (description
4781 "Html5lib is an HTML parser based on the WHATWG HTML specifcation
4782 and written in Python.")
4783 (license license:expat)))
4784
4785 (define-public python2-html5lib
4786 (package-with-python2 python-html5lib))
4787
4788 ;; Needed for python-bleach, a dependency of python-notebook
4789 (define-public python-html5lib-0.9
4790 (package
4791 (inherit python-html5lib)
4792 (version "0.999")
4793 (source
4794 (origin
4795 (method url-fetch)
4796 (uri (pypi-uri "html5lib" version))
4797 (sha256
4798 (base32
4799 "17n4zfsj6ynmbwdwviywmj8r6nzr3xvfx2zs0xhndmvm51z7z263"))))))
4800
4801 (define-public python2-html5lib-0.9
4802 (package-with-python2 python-html5lib-0.9))
4803
4804 (define-public python-urwid
4805 (package
4806 (name "python-urwid")
4807 (version "1.3.1")
4808 (source
4809 (origin
4810 (method url-fetch)
4811 (uri (pypi-uri "urwid" version))
4812 (sha256
4813 (base32
4814 "18cnd1wdjcas08x5qwa5ayw6jsfcn33w4d9f7q3s29fy6qzc1kng"))))
4815 (build-system python-build-system)
4816 (arguments
4817 `(#:phases
4818 (modify-phases %standard-phases
4819 ;; Disable failing test. Bug filed upstream:
4820 ;; https://github.com/wardi/urwid/issues/164
4821 ;; TODO: check again for python-urwid > 1.3.1 or python > 3.4.3.
4822 (add-after 'unpack 'disable-failing-test
4823 (lambda _
4824 (substitute* "urwid/tests/test_event_loops.py"
4825 (("test_remove_watch_file")
4826 "disable_remove_watch_file")))))))
4827 (home-page "http://urwid.org")
4828 (synopsis "Console user interface library for Python")
4829 (description
4830 "Urwid is a curses-based UI/widget library for Python. It includes many
4831 features useful for text console applications.")
4832 (license license:lgpl2.1+)))
4833
4834 (define-public python2-urwid
4835 (package-with-python2 python-urwid))
4836
4837 (define-public python-urwidtrees
4838 (package
4839 (name "python-urwidtrees")
4840 (version "1.0.2")
4841 (source
4842 (origin
4843 (method url-fetch)
4844 ;; package author intends on distributing via github rather than pypi:
4845 ;; https://github.com/pazz/alot/issues/877#issuecomment-230173331
4846 (uri (string-append "https://github.com/pazz/urwidtrees/archive/"
4847 version ".tar.gz"))
4848 (file-name (string-append name "-" version ".tar.gz"))
4849 (sha256
4850 (base32
4851 "0d30lyd3s2a97rhqfax5w9ssqds2z6aydqx3c6j2c2lk3cb4ngvh"))))
4852 (build-system python-build-system)
4853 (arguments
4854 '(#:tests? #f)) ; no tests
4855 (propagated-inputs `(("python-urwid" ,python-urwid)))
4856 (home-page "https://github.com/pazz/urwidtrees")
4857 (synopsis "Tree widgets for urwid")
4858 (description "Urwidtrees is a Widget Container API for the @code{urwid}
4859 toolkit. Use it to build trees of widgets.")
4860 (license license:gpl3+)))
4861
4862 (define-public python2-urwidtrees
4863 (package-with-python2 python-urwidtrees))
4864
4865 (define-public python-dbus
4866 (package
4867 (name "python-dbus")
4868 (version "1.2.0")
4869 (source
4870 (origin
4871 (method url-fetch)
4872 (uri (string-append
4873 "https://dbus.freedesktop.org/releases/dbus-python/dbus-python-"
4874 version ".tar.gz"))
4875 (sha256
4876 (base32 "1py62qir966lvdkngg0v8k1khsqxwk5m4s8nflpk1agk5f5nqb71"))))
4877 (build-system gnu-build-system)
4878 (arguments
4879 '(#:phases
4880 (modify-phases %standard-phases
4881 (add-before
4882 'check 'pre-check
4883 (lambda _
4884 ;; XXX: For the missing '/etc/machine-id'.
4885 (substitute* "test/run-test.sh"
4886 (("DBUS_FATAL_WARNINGS=1")
4887 "DBUS_FATAL_WARNINGS=0"))
4888 #t)))))
4889 (native-inputs
4890 `(("pkg-config" ,pkg-config)))
4891 (inputs
4892 `(("python" ,python)
4893 ("dbus-glib" ,dbus-glib)))
4894 (synopsis "Python bindings for D-bus")
4895 (description "python-dbus provides bindings for libdbus, the reference
4896 implementation of D-Bus.")
4897 (home-page "http://www.freedesktop.org/wiki/Software/DBusBindings/")
4898 (license license:expat)))
4899
4900 (define-public python2-dbus
4901 (package (inherit python-dbus)
4902 (name "python2-dbus")
4903 (inputs `(("python" ,python-2)
4904 ,@(alist-delete "python"
4905 (package-inputs python-dbus)
4906 equal?)))
4907 ;; FIXME: on Python 2, the test_utf8 fails with:
4908 ;; "ValueError: unichr() arg not in range(0x10000) (narrow Python build)"
4909 (arguments `(#:tests? #f))))
4910
4911 (define-public python-apsw
4912 (package
4913 (name "python-apsw")
4914 (version "3.9.2-r1")
4915 (source
4916 (origin
4917 (method url-fetch)
4918 (uri (pypi-uri "apsw" version))
4919 (sha256
4920 (base32
4921 "0w4jb0wpx785qw42r3h4fh7gl5w2968q48i7gygybsfxck8nzffs"))))
4922 (build-system python-build-system)
4923 (inputs
4924 `(("sqlite" ,sqlite)))
4925 (arguments
4926 `(#:phases
4927 ;; swap check and install phases
4928 (alist-cons-after
4929 'install 'check
4930 (assoc-ref %standard-phases 'check)
4931 (alist-delete
4932 'check
4933 %standard-phases))))
4934 (home-page "https://github.com/rogerbinns/apsw/")
4935 (synopsis "Another Python SQLite Wrapper")
4936 (description "APSW is a Python wrapper for the SQLite
4937 embedded relational database engine. In contrast to other wrappers such as
4938 pysqlite it focuses on being a minimal layer over SQLite attempting just to
4939 translate the complete SQLite API into Python.")
4940 (license license:zlib)))
4941
4942 (define-public python2-apsw
4943 (package-with-python2 python-apsw))
4944
4945 (define-public python-lxml
4946 (package
4947 (name "python-lxml")
4948 (version "3.6.0")
4949 (source
4950 (origin
4951 (method url-fetch)
4952 (uri (pypi-uri "lxml" version))
4953 (sha256
4954 (base32
4955 "1pvbmiy2m7jwv493kilbghhj2pkh8wy1na3ji350vhzhlwlclx4w"))))
4956 (build-system python-build-system)
4957 (inputs
4958 `(("libxml2" ,libxml2)
4959 ("libxslt" ,libxslt)))
4960 (home-page "http://lxml.de/")
4961 (synopsis
4962 "Python XML processing library")
4963 (description
4964 "The lxml XML toolkit is a Pythonic binding for the C libraries
4965 libxml2 and libxslt.")
4966 (license license:bsd-3))) ; and a few more, see LICENSES.txt
4967
4968 (define-public python2-lxml
4969 (package-with-python2 python-lxml))
4970
4971 ;; beautifulsoup4 has a totally different namespace than 3.x,
4972 ;; and pypi seems to put it under its own name, so I guess we should too
4973 (define-public python-beautifulsoup4
4974 (package
4975 (name "python-beautifulsoup4")
4976 (version "4.5.1")
4977 (source
4978 (origin
4979 (method url-fetch)
4980 (uri (pypi-uri "beautifulsoup4" version))
4981 (sha256
4982 (base32
4983 "1qgmhw65ncsgccjhslgkkszif47q6gvxwqv4mim17agxd81p951w"))))
4984 (build-system python-build-system)
4985 (arguments
4986 `(#:phases
4987 (modify-phases %standard-phases
4988 ;; The Python 2 source is the definitive source of beautifulsoup4. We
4989 ;; must use this conversion script when building with Python 3. The
4990 ;; conversion script also runs the tests.
4991 ;; For more information, see the file 'convert-py3k' in the source
4992 ;; distribution.
4993 (replace 'check
4994 (lambda _ (zero? (system* "./convert-py3k")))))))
4995 (home-page
4996 "http://www.crummy.com/software/BeautifulSoup/bs4/")
4997 (synopsis
4998 "Python screen-scraping library")
4999 (description
5000 "Beautiful Soup is a Python library designed for rapidly setting up
5001 screen-scraping projects. It offers Pythonic idioms for navigating,
5002 searching, and modifying a parse tree, providing a toolkit for
5003 dissecting a document and extracting what you need. It automatically
5004 converts incoming documents to Unicode and outgoing documents to UTF-8.")
5005 (license license:expat)))
5006
5007 (define-public python2-beautifulsoup4
5008 (package
5009 (inherit (package-with-python2
5010 (strip-python2-variant python-beautifulsoup4)))
5011 (arguments `(#:python ,python-2))))
5012
5013 (define-public python2-cssutils
5014 (package
5015 (name "python2-cssutils")
5016 (version "1.0.1")
5017 (source
5018 (origin
5019 (method url-fetch)
5020 (uri (pypi-uri "cssutils" version))
5021 (sha256
5022 (base32
5023 "0qwha9x1wml2qmipbcz03gndnlwhzrjdvw9i09si247a90l8p8fq"))))
5024 (build-system python-build-system)
5025 (native-inputs
5026 `(("python2-mock" ,python2-mock) ; for the tests
5027 ("unzip" ,unzip))) ; for unpacking the source
5028 (arguments
5029 `(#:python ,python-2 ; Otherwise tests fail with a syntax error.
5030 #:tests? #f ; The tests apparently download an external URL.
5031 ))
5032 (home-page "http://cthedot.de/cssutils/")
5033 (synopsis
5034 "CSS Cascading Style Sheets library for Python")
5035 (description
5036 "Cssutils is a Python package for parsing and building CSS
5037 Cascading Style Sheets. Currently it provides a DOM only and no rendering
5038 options.")
5039 (license license:lgpl3+)))
5040
5041 (define-public python-cssselect
5042 (package
5043 (name "python-cssselect")
5044 (version "0.9.2")
5045 (source
5046 (origin
5047 (method url-fetch)
5048 (uri (pypi-uri "cssselect" version))
5049 (sha256
5050 (base32
5051 "1xg6gbva1yswghiycmgincv6ab4bn7hpm720ndbj40h8xycmnfvi"))))
5052 (build-system python-build-system)
5053 (arguments
5054 ;; tests fail with message
5055 ;; AttributeError: 'module' object has no attribute 'tests'
5056 `(#:tests? #f))
5057 (home-page
5058 "https://pythonhosted.org/cssselect/")
5059 (synopsis
5060 "CSS3 selector parser and translator to XPath 1.0")
5061 (description
5062 "Cssselect ia a Python module that parses CSS3 Selectors and translates
5063 them to XPath 1.0 expressions. Such expressions can be used in lxml or
5064 another XPath engine to find the matching elements in an XML or HTML document.")
5065 (license license:bsd-3)))
5066
5067 (define-public python2-cssselect
5068 (package-with-python2 python-cssselect))
5069
5070 (define-public python-netifaces
5071 (package
5072 (name "python-netifaces")
5073 (version "0.10.4")
5074 (source
5075 (origin
5076 (method url-fetch)
5077 (uri (string-append
5078 "https://pypi.python.org/packages/source/n/netifaces/netifaces-"
5079 version
5080 ".tar.gz"))
5081 (sha256
5082 (base32
5083 "1plw237a4zib4z8s62g0mrs8gm3kjfrp5sxh6bbk9nl3rdls2mln"))))
5084 (build-system python-build-system)
5085 (home-page
5086 "https://bitbucket.org/al45tair/netifaces")
5087 (synopsis
5088 "Python module for portable network interface information")
5089 (description
5090 "Netifaces is a Python module providing information on network
5091 interfaces in an easy and portable manner.")
5092 (license license:expat)))
5093
5094 (define-public python2-netifaces
5095 (package-with-python2 python-netifaces))
5096
5097 (define-public python-networkx
5098 (package
5099 (name "python-networkx")
5100 (version "1.11")
5101 (source
5102 (origin
5103 (method url-fetch)
5104 (uri (pypi-uri "networkx" version))
5105 (sha256
5106 (base32 "1f74s56xb4ggixiq0vxyfxsfk8p20c7a099lpcf60izv1php03hd"))))
5107 (build-system python-build-system)
5108 ;; python-decorator is needed at runtime
5109 (propagated-inputs
5110 `(("python-decorator" ,python-decorator)))
5111 (native-inputs
5112 `(("python-nose" ,python-nose)))
5113 (home-page "http://networkx.github.io/")
5114 (synopsis "Python module for creating and manipulating graphs and networks")
5115 (description
5116 "NetworkX is a Python package for the creation, manipulation, and study
5117 of the structure, dynamics, and functions of complex networks.")
5118 (license license:bsd-3)))
5119
5120 (define-public python2-networkx
5121 (package-with-python2 python-networkx))
5122
5123 (define-public snakemake
5124 (package
5125 (name "snakemake")
5126 (version "3.2.1")
5127 (source
5128 (origin
5129 (method url-fetch)
5130 (uri (string-append
5131 "https://pypi.python.org/packages/source/s/snakemake/snakemake-"
5132 version ".tar.gz"))
5133 (sha256
5134 (base32 "0fi4b63sj60hvi7rfydvmz2icl4wj74djw5sn2gl8hxd02qw4b91"))))
5135 (build-system python-build-system)
5136 (home-page "https://bitbucket.org/johanneskoester/snakemake")
5137 (synopsis "Python-based execution environment for make-like workflows")
5138 (description
5139 "Snakemake aims to reduce the complexity of creating workflows by
5140 providing a clean and modern domain specific specification language (DSL) in
5141 Python style, together with a fast and comfortable execution environment.")
5142 (license license:expat)))
5143
5144 (define-public python-seaborn
5145 (package
5146 (name "python-seaborn")
5147 (version "0.7.0")
5148 (source
5149 (origin
5150 (method url-fetch)
5151 (uri (pypi-uri "seaborn" version))
5152 (sha256
5153 (base32 "0ibi3xsfm2kysph61mnfy0pf8d5rkgxgrdb0z9nbizgcgdsb5a0m"))))
5154 (build-system python-build-system)
5155 (propagated-inputs
5156 `(("python-pandas" ,python-pandas)
5157 ("python-matplotlib" ,python-matplotlib)
5158 ("python-scipy" ,python-scipy)))
5159 (home-page "http://stanford.edu/~mwaskom/software/seaborn/")
5160 (synopsis "Statistical data visualization")
5161 (description
5162 "Seaborn is a library for making attractive and informative statistical
5163 graphics in Python. It is built on top of matplotlib and tightly integrated
5164 with the PyData stack, including support for numpy and pandas data structures
5165 and statistical routines from scipy and statsmodels.")
5166 (license license:bsd-3)
5167 (properties `((python2-variant . ,(delay python2-seaborn))))))
5168
5169 (define-public python2-seaborn
5170 (let ((base (package-with-python2 (strip-python2-variant python-seaborn))))
5171 (package
5172 (inherit base)
5173 (propagated-inputs `(("python2-pytz" ,python2-pytz)
5174 ,@(package-propagated-inputs base))))))
5175
5176 (define-public python-sympy
5177 (package
5178 (name "python-sympy")
5179 (version "0.7.6")
5180 (source
5181 (origin
5182 (method url-fetch)
5183 (uri (string-append
5184 "https://github.com/sympy/sympy/releases/download/sympy-"
5185 version "/sympy-" version ".tar.gz"))
5186 (sha256
5187 (base32 "19yp0gy4i7p4g6l3b8vaqkj9qj7yqb5kqy0qgbdagpzgkdz958yz"))))
5188 (build-system python-build-system)
5189 (home-page "http://www.sympy.org/")
5190 (synopsis "Python library for symbolic mathematics")
5191 (description
5192 "SymPy is a Python library for symbolic mathematics. It aims to become a
5193 full-featured computer algebra system (CAS) while keeping the code as simple
5194 as possible in order to be comprehensible and easily extensible.")
5195 (license license:bsd-3)))
5196
5197 (define-public python2-sympy
5198 (package-with-python2 python-sympy))
5199
5200 (define-public python-q
5201 (package
5202 (name "python-q")
5203 (version "2.6")
5204 (source
5205 (origin
5206 (method url-fetch)
5207 (uri (pypi-uri "q" version))
5208 (sha256
5209 (base32
5210 "1mgfazh8fkizh6walra2zv885f3lcgr3nb02v1frfm4p8ddcy3yy"))))
5211 (build-system python-build-system)
5212 (home-page "https://github.com/zestyping/q")
5213 (synopsis "Quick-and-dirty debugging output for tired programmers")
5214 (description
5215 "q is a Python module for \"print\" style of debugging Python code. It
5216 provides convenient short API for print out of values, tracebacks, and
5217 falling into the Python interpreter.")
5218 (license license:asl2.0)))
5219
5220 (define-public python2-q
5221 (package-with-python2 python-q))
5222
5223 (define-public python-testlib
5224 (package
5225 (name "python-testlib")
5226 (version "0.6.5")
5227 (source
5228 (origin
5229 (method url-fetch)
5230 (uri (string-append
5231 "https://pypi.python.org/packages/source/t/testlib/testlib-"
5232 version ".zip"))
5233 (sha256
5234 (base32 "1mz26cxn4x8bbgv0rn0mvj2z05y31rkc8009nvdlb3lam5b4mj3y"))))
5235 (build-system python-build-system)
5236 (native-inputs
5237 `(("unzip" ,unzip)))
5238 (arguments
5239 `(#:phases
5240 (alist-replace
5241 'unpack
5242 (lambda* (#:key inputs outputs #:allow-other-keys)
5243 (let ((unzip (string-append (assoc-ref inputs "unzip")
5244 "/bin/unzip"))
5245 (source (assoc-ref inputs "source")))
5246 (and (zero? (system* unzip source))
5247 (chdir (string-append "testlib-" ,version)))))
5248 %standard-phases)))
5249 (synopsis "Python micro test suite harness")
5250 (description "A micro unittest suite harness for Python.")
5251 (home-page "https://github.com/trentm/testlib")
5252 (license license:expat)))
5253
5254 (define-public python2-testlib
5255 (package-with-python2 python-testlib))
5256
5257 (define-public python2-xlib
5258 (package
5259 (name "python2-xlib")
5260 (version "0.14")
5261 (source (origin
5262 (method url-fetch)
5263 (uri (string-append "mirror://sourceforge/python-xlib/python-xlib"
5264 "/" version "/"
5265 "python-xlib-" version ".tar.gz"))
5266 (sha256
5267 (base32
5268 "1sv0447j0rx8cgs3jhjl695p5pv13ihglcjlrrz1kq05lsvb0wa7"))))
5269 (build-system python-build-system)
5270 (arguments
5271 `(#:python ,python-2 ;Python 2 only
5272 #:tests? #f)) ;no tests
5273 (home-page "http://python-xlib.sourceforge.net/")
5274 (synopsis "Python X11 client library")
5275 (description
5276 "The Python X Library is intended to be a fully functional X client
5277 library for Python programs. It is useful to implement low-level X clients.
5278 It is written entirely in Python.")
5279 (license license:gpl2+)))
5280
5281 (define-public python-singledispatch
5282 (package
5283 (name "python-singledispatch")
5284 (version "3.4.0.3")
5285 (source
5286 (origin
5287 (method url-fetch)
5288 (uri (pypi-uri "singledispatch" version))
5289 (sha256
5290 (base32
5291 "171b7ip0hsq5qm83np40h3phlr36ym18w0lay0a8v08kvy3sy1jv"))))
5292 (build-system python-build-system)
5293 (native-inputs
5294 `(("python-six" ,python-six))) ; required for conversion, not at run-time
5295 (home-page
5296 "http://docs.python.org/3/library/functools.html#functools.singledispatch")
5297 (synopsis "Backport of singledispatch feature from Python 3.4")
5298 (description
5299 "This library brings functools.singledispatch from Python 3.4 to Python
5300 2.6-3.3.")
5301 (license license:expat)))
5302
5303 (define-public python2-singledispatch
5304 (package-with-python2 python-singledispatch))
5305
5306 (define-public python-tornado
5307 (package
5308 (name "python-tornado")
5309 (version "4.3")
5310 (source
5311 (origin
5312 (method url-fetch)
5313 (uri (pypi-uri "tornado" version))
5314 (sha256
5315 (base32 "1gzgwayl6hmc9jfcl88bni4jcsk2jcca9dn1rvrfsvnijcjx7hn9"))))
5316 (build-system python-build-system)
5317 (native-inputs
5318 `(("python-certifi" ,python-certifi)))
5319 (propagated-inputs
5320 `(("python-backports-abc" ,python-backports-abc)))
5321 (home-page "http://www.tornadoweb.org/")
5322 (synopsis "Python web framework and asynchronous networking library")
5323 (description
5324 "Tornado is a Python web framework and asynchronous networking library,
5325 originally developed at FriendFeed. By using non-blocking network I/O,
5326 Tornado can scale to tens of thousands of open connections, making it ideal
5327 for long polling, WebSockets, and other applications that require a long-lived
5328 connection to each user.")
5329 (license license:asl2.0)
5330 (properties `((python2-variant . ,(delay python2-tornado))))))
5331
5332 (define-public python2-tornado
5333 (let ((tornado (package-with-python2 (strip-python2-variant python-tornado))))
5334 (package (inherit tornado)
5335 (propagated-inputs
5336 `(("python2-backport-ssl-match-hostname"
5337 ,python2-backport-ssl-match-hostname)
5338 ("python2-singledispatch" ,python2-singledispatch)
5339 ,@(package-propagated-inputs tornado))))))
5340
5341 ;; the python- version can be removed with python-3.5
5342 (define-public python-backports-abc
5343 (package
5344 (name "python-backports-abc")
5345 (version "0.4")
5346 (source
5347 (origin
5348 (method url-fetch)
5349 (uri (pypi-uri "backports_abc" version))
5350 (sha256
5351 (base32
5352 "19fh75lni9pb673n2fn505m1rckm0af0szcv5xx1qm1xpa940glb"))))
5353 (build-system python-build-system)
5354 (home-page "https://github.com/cython/backports_abc")
5355 (synopsis "Backport of additions to the 'collections.abc' module")
5356 (description
5357 "Python-backports-abc provides a backport of additions to the
5358 'collections.abc' module in Python-3.5.")
5359 (license license:psfl)))
5360
5361 (define-public python2-backports-abc
5362 (package-with-python2 python-backports-abc))
5363
5364 (define-public python-waf
5365 (package
5366 (name "python-waf")
5367 (version "1.9.5")
5368 (source (origin
5369 (method url-fetch)
5370 (uri (string-append "https://waf.io/"
5371 "waf-" version ".tar.bz2"))
5372 (sha256
5373 (base32
5374 "1sl3ipi2czds57rlzjnpdzqa0skx8asfvmh3qmibpvdwf15rpppg"))))
5375 (build-system python-build-system)
5376 (arguments
5377 '(#:phases
5378 (modify-phases %standard-phases
5379 (replace 'build
5380 (lambda _
5381 (zero? (system* "python" "waf-light" "configure" "build"))))
5382 (replace 'check
5383 (lambda _
5384 (zero? (system* "python" "waf" "--version"))))
5385 (replace 'install
5386 (lambda _
5387 (copy-file "waf" %output))))))
5388 (home-page "http://waf.io/")
5389 (synopsis "Python-based build system")
5390 (description
5391 "Waf is a Python-based framework for configuring, compiling and installing
5392 applications.")
5393 (license license:bsd-3)))
5394
5395 (define-public python2-waf
5396 (package-with-python2 python-waf))
5397
5398 (define-public python-pyzmq
5399 (package
5400 (name "python-pyzmq")
5401 (version "15.1.0")
5402 (source
5403 (origin
5404 (method url-fetch)
5405 (uri (pypi-uri "pyzmq" version))
5406 (sha256
5407 (base32 "13fhwnlvsvxv72kfhqbpn6qi7msh8mc8377mpabv32skk2cjfnxx"))))
5408 (build-system python-build-system)
5409 (arguments
5410 `(#:configure-flags
5411 (list (string-append "--zmq=" (assoc-ref %build-inputs "zeromq")))
5412 ;; FIXME: You must build pyzmq with 'python setup.py build_ext
5413 ;; --inplace' for 'python setup.py test' to work.
5414 #:tests? #f))
5415 (inputs
5416 `(("zeromq" ,zeromq)))
5417 (native-inputs
5418 `(("pkg-config" ,pkg-config)
5419 ("python-nose" ,python-nose)))
5420 (home-page "http://github.com/zeromq/pyzmq")
5421 (synopsis "Python bindings for 0MQ")
5422 (description
5423 "PyZMQ is the official Python binding for the ZeroMQ messaging library.")
5424 (license license:bsd-4)))
5425
5426 (define-public python2-pyzmq
5427 (package-with-python2 python-pyzmq))
5428
5429 (define-public python-pep8
5430 (package
5431 (name "python-pep8")
5432 (version "1.7.0")
5433 (source
5434 (origin
5435 (method url-fetch)
5436 (uri (pypi-uri "pep8" version))
5437 (sha256
5438 (base32
5439 "002rkl4lsn6x2mxmf8ar00l0m8i3mzrc6pnzz77blyksmpsxa4x1"))))
5440 (build-system python-build-system)
5441 (home-page "http://pep8.readthedocs.org/")
5442 (synopsis "Python style guide checker")
5443 (description
5444 "This tools checks Python code against some of the style conventions in
5445 PEP 8.")
5446 (license license:expat)))
5447
5448 (define-public python2-pep8
5449 (package-with-python2 python-pep8))
5450
5451 (define-public python-pyflakes
5452 (package
5453 (name "python-pyflakes")
5454 (version "1.0.0")
5455 (source
5456 (origin
5457 (method url-fetch)
5458 (uri (pypi-uri "pyflakes" version))
5459 (sha256
5460 (base32
5461 "0qs2sgqszq7wcplis8509wk2ygqcrwzbs1ghfj3svvivq2j377pk"))))
5462 (build-system python-build-system)
5463 (home-page
5464 "https://github.com/pyflakes/pyflakes")
5465 (synopsis "Passive checker of Python programs")
5466 (description
5467 "Pyflakes statically checks Python source code for common errors.")
5468 (license license:expat)))
5469
5470 (define-public python2-pyflakes
5471 (package-with-python2 python-pyflakes))
5472
5473 (define-public python-mccabe
5474 (package
5475 (name "python-mccabe")
5476 (version "0.4.0")
5477 (source
5478 (origin
5479 (method url-fetch)
5480 (uri (pypi-uri "mccabe" version))
5481 (sha256
5482 (base32
5483 "0yr08a36h8lqlif10l4xcikbbig7q8f41gqywir7rrvnv3mi4aws"))))
5484 (build-system python-build-system)
5485 (native-inputs
5486 `(("python-pytest" ,python-pytest)
5487 ("python-pytest-runner" ,python-pytest-runner)))
5488 (home-page "https://github.com/flintwork/mccabe")
5489 (synopsis "McCabe checker, plugin for flake8")
5490 (description
5491 "This package provides a Flake8 plug-in to compute the McCabe cyclomatic
5492 complexity of Python source code.")
5493 (license license:expat)))
5494
5495 (define-public python2-mccabe
5496 (package-with-python2 python-mccabe))
5497
5498 (define-public python-mccabe-0.2.1
5499 (package (inherit python-mccabe)
5500 (version "0.2.1")
5501 (source
5502 (origin
5503 (method url-fetch)
5504 (uri (pypi-uri "mccabe" version))
5505 (sha256
5506 (base32
5507 "0fi4a81kr5bcv5p4xgibqr595hyj5dafkqgsmfk96mfy8w71fajs"))))))
5508
5509 (define-public python2-mccabe-0.2.1
5510 (package-with-python2 python-mccabe-0.2.1))
5511
5512 ;; Flake8 2.4.1 requires an older version of pep8.
5513 ;; This should be removed ASAP.
5514 (define-public python-pep8-1.5.7
5515 (package (inherit python-pep8)
5516 (version "1.5.7")
5517 (source
5518 (origin
5519 (method url-fetch)
5520 (uri (string-append
5521 "https://pypi.python.org/packages/source/p/pep8/pep8-"
5522 version
5523 ".tar.gz"))
5524 (sha256
5525 (base32
5526 "12b9bbdbwnspxgak14xg58c130x2n0blxzlms5jn2dszn8qj3d0m"))))))
5527
5528 (define-public python2-pep8-1.5.7
5529 (package-with-python2 python-pep8-1.5.7))
5530
5531 ;; Flake8 2.4.1 requires an older version of pyflakes.
5532 ;; This should be removed ASAP.
5533 (define-public python-pyflakes-0.8.1
5534 (package (inherit python-pyflakes)
5535 (version "0.8.1")
5536 (source
5537 (origin
5538 (method url-fetch)
5539 (uri (string-append
5540 "https://pypi.python.org/packages/source/p/pyflakes/pyflakes-"
5541 version
5542 ".tar.gz"))
5543 (sha256
5544 (base32
5545 "0sbpq6pqm1i9wqi41mlfrsc5rk92jv4mskvlyxmnhlbdnc80ma1z"))))))
5546
5547 (define-public python2-pyflakes-0.8.1
5548 (package-with-python2 python-pyflakes-0.8.1))
5549
5550 (define-public python-flake8
5551 (package
5552 (name "python-flake8")
5553 (version "2.5.4")
5554 (source
5555 (origin
5556 (method url-fetch)
5557 (uri (pypi-uri "flake8" version))
5558 (sha256
5559 (base32
5560 "0bs9cz4fr99r2rwig1b8jwaadl1nan7kgpdzqwj0bwbckwbmh7nc"))))
5561 (build-system python-build-system)
5562 (propagated-inputs
5563 `(("python-pep8" ,python-pep8)
5564 ("python-pyflakes" ,python-pyflakes)
5565 ("python-mccabe" ,python-mccabe)))
5566 (native-inputs
5567 `(("python-mock" ,python-mock) ; TODO: only required for < 3.3
5568 ("python-nose" ,python-nose)))
5569 (home-page "https://gitlab.com/pycqa/flake8")
5570 (synopsis
5571 "The modular source code checker: pep8, pyflakes and co")
5572 (description
5573 "Flake8 is a wrapper around PyFlakes, pep8 and python-mccabe.")
5574 (license license:expat)))
5575
5576 (define-public python2-flake8
5577 (package-with-python2 python-flake8))
5578
5579 ;; This will only be needed by the python-hacking package and will not be
5580 ;; necessary once python-hacking > 0.10.2 is released.
5581 (define-public python-flake8-2.2.4
5582 (package (inherit python-flake8)
5583 (propagated-inputs
5584 `(("python-pep8" ,python-pep8-1.5.7)
5585 ("python-pyflakes" ,python-pyflakes-0.8.1)
5586 ("python-mccabe" ,python-mccabe-0.2.1)))
5587 (native-inputs
5588 `(("python-mock" ,python-mock)
5589 ("python-nose" ,python-nose)))
5590 (version "2.2.4")
5591 (source
5592 (origin
5593 (method url-fetch)
5594 (uri (pypi-uri "flake8" version))
5595 (sha256
5596 (base32
5597 "1r9wsry4va45h1rck5hxd3vzsg2q3y6lnl6pym1bxvz8ry19jwx8"))))))
5598
5599 (define-public python2-flake8-2.2.4
5600 (package-with-python2 python-flake8-2.2.4))
5601
5602 (define-public python-mistune
5603 (package
5604 (name "python-mistune")
5605 (version "0.7")
5606 (source
5607 (origin
5608 (method url-fetch)
5609 (uri (string-append
5610 "https://pypi.python.org/packages/source/m/mistune/mistune-"
5611 version
5612 ".tar.gz"))
5613 (sha256
5614 (base32
5615 "17zqjp9m4d1w3jf2rbbq5xshcw24q1vlcv24gkgfqqyyymajxahx"))))
5616 (build-system python-build-system)
5617 (native-inputs
5618 `(("python-nose" ,python-nose)
5619 ("python-cython" ,python-cython)))
5620 (home-page "https://github.com/lepture/mistune")
5621 (synopsis "Markdown parser in pure Python")
5622 (description "This package provides a fast markdown parser in pure
5623 Python.")
5624 (license license:bsd-3)))
5625
5626 (define-public python2-mistune
5627 (package-with-python2 python-mistune))
5628
5629 (define-public python-markdown
5630 (package
5631 (name "python-markdown")
5632 (version "2.6.5")
5633 (source
5634 (origin
5635 (method url-fetch)
5636 (uri (pypi-uri "Markdown" version))
5637 (sha256
5638 (base32
5639 "0q758a3fiiawr20b3hhjfs677cwj6xi284yb7xspcvv0fdicz54d"))))
5640 (build-system python-build-system)
5641 (arguments
5642 `(#:phases
5643 (modify-phases %standard-phases
5644 (replace 'check
5645 (lambda _
5646 (zero? (system* "python" "run-tests.py")))))))
5647 (native-inputs
5648 `(("python-nose" ,python-nose)
5649 ("python-pyyaml" ,python-pyyaml)))
5650 (home-page "https://pythonhosted.org/Markdown/")
5651 (synopsis "Python implementation of Markdown")
5652 (description
5653 "This package provides a Python implementation of John Gruber's
5654 Markdown. The library features international input, various Markdown
5655 extensions, and several HTML output formats. A command line wrapper
5656 markdown_py is also provided to convert Markdown files to HTML.")
5657 (license license:bsd-3)))
5658
5659 (define-public python2-markdown
5660 (package-with-python2 python-markdown))
5661
5662 (define-public python-ptyprocess
5663 (package
5664 (name "python-ptyprocess")
5665 (version "0.5")
5666 (source
5667 (origin
5668 (method url-fetch)
5669 (uri (string-append
5670 "https://pypi.python.org/packages/source/p/ptyprocess/ptyprocess-"
5671 version ".tar.gz"))
5672 (sha256
5673 (base32
5674 "0nggns5kikn32yyda2zrj1xdmh49pi3v0drggcdwljbv36r8zdyw"))))
5675 (build-system python-build-system)
5676 (native-inputs
5677 `(("python-nose" ,python-nose)))
5678 (arguments
5679 `(#:phases
5680 (modify-phases %standard-phases
5681 (replace 'check
5682 (lambda _
5683 (zero? (system* "nosetests")))))))
5684 (home-page "https://github.com/pexpect/ptyprocess")
5685 (synopsis "Run a subprocess in a pseudo terminal")
5686 (description
5687 "This package provides a Python library used to launch a subprocess in a
5688 pseudo terminal (pty), and interact with both the process and its pty.")
5689 (license license:isc)))
5690
5691 (define-public python2-ptyprocess
5692 (package-with-python2 python-ptyprocess))
5693
5694 (define-public python-terminado
5695 (package
5696 (name "python-terminado")
5697 (version "0.6")
5698 (source
5699 (origin
5700 (method url-fetch)
5701 (uri (pypi-uri "terminado" version))
5702 (sha256
5703 (base32
5704 "09h1kwi86g5mrk14s4pgbhshd602zry29lnpxamcqz864kva22rc"))))
5705 (build-system python-build-system)
5706 (propagated-inputs
5707 `(("python-tornado" ,python-tornado)
5708 ("python-ptyprocess" ,python-ptyprocess)))
5709 (native-inputs
5710 `(("python-nose" ,python-nose)))
5711 (arguments
5712 `(#:phases
5713 (modify-phases %standard-phases
5714 (replace 'check
5715 (lambda _
5716 (zero? (system* "nosetests")))))))
5717 (home-page "https://github.com/takluyver/terminado")
5718 (synopsis "Terminals served to term.js using Tornado websockets")
5719 (description "This package provides a Tornado websocket backend for the
5720 term.js Javascript terminal emulator library.")
5721 (license license:bsd-2)
5722 (properties `((python2-variant . ,(delay python2-terminado))))))
5723
5724 (define-public python2-terminado
5725 (let ((terminado (package-with-python2 (strip-python2-variant python-terminado))))
5726 (package (inherit terminado)
5727 (propagated-inputs
5728 `(("python2-backport-ssl-match-hostname"
5729 ,python2-backport-ssl-match-hostname)
5730 ,@(package-propagated-inputs terminado))))))
5731
5732 (define-public python-fonttools
5733 (package
5734 (name "python-fonttools")
5735 (version "2.5")
5736 (source (origin
5737 (method url-fetch)
5738 (uri (string-append
5739 "https://pypi.python.org/packages/source/F/FontTools/"
5740 "fonttools-" version ".tar.gz"))
5741 (sha256
5742 (base32
5743 "08ay3x4ijarwhl60gqx2i9jzq6pxs20p4snc2d1q5jagh4rn39lb"))))
5744 (build-system python-build-system)
5745 (arguments
5746 '(#:test-target "check"
5747 #:phases
5748 (modify-phases %standard-phases
5749 (add-after 'unpack 'patch-setuppy
5750 ;; Remove the undocumented "extra_path" argument, which adds an
5751 ;; intervening directories between site-packages and the package
5752 ;; directory.
5753 (lambda _
5754 (substitute* "setup.py"
5755 (("^[ \t]*extra_path *= *'FontTools',") ""))
5756 #t)))))
5757 (home-page "http://github.com/behdad/fonttools")
5758 (synopsis "Tools to manipulate font files")
5759 (description
5760 "FontTools/TTX is a library to manipulate font files from Python. It
5761 supports reading and writing of TrueType/OpenType fonts, reading and writing
5762 of AFM files, reading (and partially writing) of PS Type 1 fonts. The package
5763 also contains a tool called “TTX” which converts TrueType/OpenType fonts to and
5764 from an XML-based format.")
5765 (license (license:non-copyleft
5766 "file://LICENSE.txt"
5767 "See LICENSE.txt in the distribution."))))
5768
5769 (define-public python2-fonttools
5770 (package-with-python2 python-fonttools))
5771
5772 (define-public python-ly
5773 (package
5774 (name "python-ly")
5775 (version "0.9.4")
5776 (source
5777 (origin
5778 (method url-fetch)
5779 (uri (string-append "https://pypi.python.org/packages/57/4f/"
5780 "889579244947368f28eda66b782331b1e75f83fd72e63f9ece93cd7a18f9"
5781 "/python-ly-" version ".tar.gz"))
5782 (sha256
5783 (base32
5784 "0g6n288l83sfwavxh1aryi0aqvsr3sp7v6f903mckwqa4scpky62"))))
5785 (build-system python-build-system)
5786 (synopsis "Tool and library for manipulating LilyPond files")
5787 (description "This package provides a Python library to parse, manipulate
5788 or create documents in LilyPond format. A command line program ly is also
5789 provided that can be used to do various manipulations with LilyPond files.")
5790 (home-page "https://pypi.python.org/pypi/python-ly")
5791 (license license:gpl2+)))
5792
5793 (define-public python-appdirs
5794 (package
5795 (name "python-appdirs")
5796 (version "1.4.0")
5797 (source
5798 (origin
5799 (method url-fetch)
5800 (uri (string-append
5801 "https://pypi.python.org/packages/source/a/appdirs/appdirs-"
5802 version
5803 ".tar.gz"))
5804 (sha256
5805 (base32
5806 "1iddva7v3fq0aqzsahkazxr7vpw28mqcrsy818z4wyiqnkplbhlg"))))
5807 (build-system python-build-system)
5808 (home-page "http://github.com/ActiveState/appdirs")
5809 (synopsis
5810 "Determine platform-specific dirs, e.g. a \"user data dir\"")
5811 (description
5812 "This module provides a portable way of finding out where user data
5813 should be stored on various operating systems.")
5814 (license license:expat)))
5815
5816 (define-public python2-appdirs
5817 (package-with-python2 python-appdirs))
5818
5819 (define-public python-llfuse
5820 (package
5821 (name "python-llfuse")
5822 (version "1.1.1")
5823 (source (origin
5824 (method url-fetch)
5825 (uri (string-append
5826 "https://bitbucket.org/nikratio/python-llfuse/downloads/"
5827 "llfuse-" version ".tar.bz2"))
5828 (sha256
5829 (base32
5830 "0v6vj9mb286njgd1szg9hz2qdh5f3vkhsvajripfcqg458av310v"))))
5831 (build-system python-build-system)
5832 (inputs
5833 `(("fuse" ,fuse)
5834 ("attr" ,attr)))
5835 (native-inputs
5836 `(("pkg-config" ,pkg-config)))
5837 (synopsis "Python bindings for FUSE")
5838 (description
5839 "Python-LLFUSE is a set of Python bindings for the low level FUSE API.")
5840 (home-page "https://bitbucket.org/nikratio/python-llfuse/")
5841 (license license:lgpl2.0+)
5842 (properties `((python2-variant . ,(delay python2-llfuse))))))
5843
5844 (define-public python2-llfuse
5845 (package (inherit (package-with-python2
5846 (strip-python2-variant python-llfuse)))
5847 (propagated-inputs `(("python2-contextlib2" ,python2-contextlib2)))))
5848
5849 ;; For attic-0.16
5850 (define-public python-llfuse-0.41
5851 (package (inherit python-llfuse)
5852 (version "0.41.1")
5853 (source (origin
5854 (method url-fetch)
5855 (uri (string-append
5856 "https://bitbucket.org/nikratio/python-llfuse/downloads/"
5857 "llfuse-" version ".tar.bz2"))
5858 (sha256
5859 (base32
5860 "1imlqw9b73086y97izr036f58pgc5akv4ihc2rrf8j5h75jbrlaa"))))
5861 ;; Python-LLFUSE < 0.42 includes underscore.js, which is MIT (expat)
5862 ;; licensed. The rest of the package is licensed under LGPL2.0 or later.
5863 (license (list license:expat license:lgpl2.0+))))
5864
5865 (define-public python-msgpack
5866 (package
5867 (name "python-msgpack")
5868 (version "0.4.8")
5869 (source (origin
5870 (method url-fetch)
5871 (uri (pypi-uri "msgpack-python" version))
5872 (sha256
5873 (base32
5874 "11pqk5braa6wndpnr1dhg64js82vjgxnm0lzy73rwl831zgijaqs"))))
5875 (build-system python-build-system)
5876 (synopsis "MessagePack (de)serializer")
5877 (description "MessagePack is a fast, compact binary serialization format,
5878 suitable for similar data to JSON. This package provides CPython bindings for
5879 reading and writing MessagePack data.")
5880 (home-page "https://pypi.python.org/pypi/msgpack-python/")
5881 (license license:asl2.0)))
5882
5883 (define-public python2-msgpack
5884 (package-with-python2 python-msgpack))
5885
5886 (define-public python-netaddr
5887 (package
5888 (name "python-netaddr")
5889 (version "0.7.18")
5890 (source
5891 (origin
5892 (method url-fetch)
5893 (uri (string-append
5894 "https://pypi.python.org/packages/source/n/netaddr/netaddr-"
5895 version
5896 ".tar.gz"))
5897 (sha256
5898 (base32
5899 "06dxjlbcicq7q3vqy8agq11ra01kvvd47j4mk6dmghjsyzyckxd1"))))
5900 (build-system python-build-system)
5901 (arguments `(#:tests? #f)) ;; No tests.
5902 (home-page "https://github.com/drkjam/netaddr/")
5903 (synopsis "Pythonic manipulation of network addresses")
5904 (description
5905 "A Python library for representing and manipulating IPv4, IPv6, CIDR, EUI
5906 and MAC network addresses.")
5907 (license license:bsd-3)))
5908
5909 (define-public python2-netaddr
5910 (package-with-python2 python-netaddr))
5911
5912 (define-public python-wrapt
5913 (package
5914 (name "python-wrapt")
5915 (version "1.10.5")
5916 (source
5917 (origin
5918 (method url-fetch)
5919 (uri (string-append
5920 "https://pypi.python.org/packages/source/w/wrapt/wrapt-"
5921 version
5922 ".tar.gz"))
5923 (sha256
5924 (base32
5925 "0cq8rlpzkxzk48b50yrfhzn1d1hrq4gjcdqlrgq4v5palgiv9jwr"))))
5926 (build-system python-build-system)
5927 (arguments
5928 ;; Tests are not included in the tarball, they are only available in the
5929 ;; git repository.
5930 `(#:tests? #f))
5931 (home-page "https://github.com/GrahamDumpleton/wrapt")
5932 (synopsis "Module for decorators, wrappers and monkey patching")
5933 (description
5934 "The aim of the wrapt module is to provide a transparent object proxy for
5935 Python, which can be used as the basis for the construction of function
5936 wrappers and decorator functions.")
5937 (license license:bsd-2)))
5938
5939 (define-public python2-wrapt
5940 (package-with-python2 python-wrapt))
5941
5942 (define-public python-iso8601
5943 (package
5944 (name "python-iso8601")
5945 (version "0.1.11")
5946 (source
5947 (origin
5948 (method url-fetch)
5949 (uri (pypi-uri "iso8601" version))
5950 (sha256
5951 (base32
5952 "0c7gh3lsdjds262h0v1sqc66l7hqgfwbakn96qrhdbl0i3vm5yz8"))))
5953 (build-system python-build-system)
5954 (home-page "https://bitbucket.org/micktwomey/pyiso8601")
5955 (synopsis "Module to parse ISO 8601 dates")
5956 (description
5957 "This module parses the most common forms of ISO 8601 date strings (e.g.
5958 @code{2007-01-14T20:34:22+00:00}) into @code{datetime} objects.")
5959 (license license:expat)))
5960
5961 (define-public python2-iso8601
5962 (package-with-python2 python-iso8601))
5963
5964 (define-public python-monotonic
5965 (package
5966 (name "python-monotonic")
5967 (version "0.3")
5968 (source
5969 (origin
5970 (method url-fetch)
5971 (uri (string-append
5972 "https://pypi.python.org/packages/source/m/monotonic/monotonic-"
5973 version
5974 ".tar.gz"))
5975 (sha256
5976 (base32
5977 "0yz0bcbwx8r2c01czzfpbrxddynxyk9k95jj8h6sgcb7xmfvl998"))))
5978 (build-system python-build-system)
5979 (home-page "https://github.com/atdt/monotonic")
5980 (synopsis "Implementation of time.monotonic() for Python 2 & < 3.3")
5981 (description
5982 "This module provides a monotonic() function which returns the value (in
5983 fractional seconds) of a clock which never goes backwards.")
5984 (license license:asl2.0)))
5985
5986 (define-public python2-monotonic
5987 (package-with-python2 python-monotonic))
5988
5989 (define-public python-webob
5990 (package
5991 (name "python-webob")
5992 (version "1.5.1")
5993 (source
5994 (origin
5995 (method url-fetch)
5996 (uri (pypi-uri "WebOb" version))
5997 (sha256
5998 (base32
5999 "02bhhzijfhv8hmi1i54d4b0v43liwhnywhflvxsv4x3zax9s3afq"))))
6000 (build-system python-build-system)
6001 (native-inputs
6002 `(("python-nose" ,python-nose)))
6003 (home-page "http://webob.org/")
6004 (synopsis "WSGI request and response object")
6005 (description
6006 "WebOb provides wrappers around the WSGI request environment, and an
6007 object to help create WSGI responses.")
6008 (license license:expat)))
6009
6010 (define-public python2-webob
6011 (package-with-python2 python-webob))
6012
6013 (define-public python-xlrd
6014 (package
6015 (name "python-xlrd")
6016 (version "1.0.0")
6017 (source (origin
6018 (method url-fetch)
6019 (uri (pypi-uri "xlrd" version))
6020 (sha256
6021 (base32
6022 "0s8hjiz01vbhy85xalrz0qlsmd9ypf36zjqrf97hh984spapvy0g"))))
6023 (build-system python-build-system)
6024 (arguments
6025 `(#:phases
6026 (modify-phases %standard-phases
6027 ;; Current test in setup.py does not work as of 1.0.0, so use nose to
6028 ;; run tests instead for now.
6029 (replace 'check (lambda _ (zero? (system* "nosetests")))))))
6030 (native-inputs `(("python-nose" ,python-nose)))
6031 (home-page "http://www.python-excel.org/")
6032 (synopsis "Library for extracting data from Excel files")
6033 (description "This packages provides a library to extract data from
6034 spreadsheets using Microsoft Excel proprietary file formats @samp{.xls} and
6035 @samp{.xlsx} (versions 2.0 onwards). It has support for Excel dates and is
6036 Unicode-aware. It is not intended as an end-user tool.")
6037 (license license:bsd-3)))
6038
6039 (define-public python2-xlrd
6040 (package-with-python2 python-xlrd))
6041
6042 (define-public python-prettytable
6043 (package
6044 (name "python-prettytable")
6045 (version "0.7.2")
6046 (source
6047 (origin
6048 (method url-fetch)
6049 (uri (string-append
6050 "https://pypi.python.org/packages/source/P/PrettyTable/"
6051 "prettytable-" version ".tar.bz2"))
6052 (sha256
6053 (base32
6054 "0diwsicwmiq2cpzpxri7cyl5fmsvicafw6nfqf6p6p322dji2g45"))))
6055 (build-system python-build-system)
6056 (home-page "http://code.google.com/p/prettytable/")
6057 (synopsis "Display tabular data in an ASCII table format")
6058 (description
6059 "A library designed to represent tabular data in visually appealing ASCII
6060 tables. PrettyTable allows for selection of which columns are to be printed,
6061 independent alignment of columns (left or right justified or centred) and
6062 printing of sub-tables by specifying a row range.")
6063 (license license:bsd-3)))
6064
6065 (define-public python2-prettytable
6066 (package-with-python2 python-prettytable))
6067
6068 (define-public python-tables
6069 (package
6070 (name "python-tables")
6071 (version "3.2.2")
6072 (source
6073 (origin
6074 (method url-fetch)
6075 (uri (pypi-uri "tables" version))
6076 (sha256
6077 (base32
6078 "117s6w7s3yxafpmf3zz3svana7xfrsviw01va1xp7h8ylx8v6r1m"))))
6079 (build-system python-build-system)
6080 (arguments
6081 `(;; FIXME: python-build-system does not pass configure-flags to "build"
6082 ;; or "check", so we must override the build and check phases.
6083 #:phases
6084 (modify-phases %standard-phases
6085 (add-after 'unpack 'use-gcc
6086 (lambda _
6087 (substitute* "setup.py"
6088 (("compiler = new_compiler\\(\\)" line)
6089 (string-append line
6090 "\ncompiler.set_executables(compiler='gcc',"
6091 "compiler_so='gcc',"
6092 "linker_exe='gcc',"
6093 "linker_so='gcc -shared')")))
6094 #t))
6095 (replace 'build
6096 (lambda* (#:key inputs #:allow-other-keys)
6097 (zero? (system* "python" "setup.py" "build"
6098 (string-append "--hdf5="
6099 (assoc-ref inputs "hdf5"))))))
6100 (replace 'check
6101 (lambda* (#:key inputs #:allow-other-keys)
6102 (zero? (system* "python" "setup.py" "check"
6103 (string-append "--hdf5="
6104 (assoc-ref inputs "hdf5")))))))))
6105 (propagated-inputs
6106 `(("python-numexpr" ,python-numexpr)
6107 ("python-numpy" ,python-numpy)))
6108 (native-inputs
6109 `(("python-cython" ,python-cython)
6110 ("pkg-config" ,pkg-config)))
6111 (inputs
6112 `(("hdf5" ,hdf5)
6113 ("bzip2" ,bzip2)
6114 ("zlib" ,zlib)))
6115 (home-page "http://www.pytables.org/")
6116 (synopsis "Hierarchical datasets for Python")
6117 (description "PyTables is a package for managing hierarchical datasets and
6118 designed to efficently cope with extremely large amounts of data.")
6119 (license license:bsd-3)))
6120
6121 (define-public python2-tables
6122 (package-with-python2 python-tables))
6123
6124 (define-public python-pyasn1
6125 (package
6126 (name "python-pyasn1")
6127 (version "0.1.9")
6128 (source
6129 (origin
6130 (method url-fetch)
6131 (uri (pypi-uri "pyasn1" version))
6132 (sha256
6133 (base32
6134 "0zraxni14bqi20kr4bi6nwsh32aibz0fq0xaczfisw0zdpcsqg45"))))
6135 (build-system python-build-system)
6136 (home-page "http://pyasn1.sourceforge.net/")
6137 (synopsis "ASN.1 types and codecs")
6138 (description
6139 "This is an implementation of ASN.1 types and codecs in Python. It is
6140 suitable for a wide range of protocols based on the ASN.1 specification.")
6141 (license license:bsd-2)))
6142
6143 (define-public python2-pyasn1
6144 (package-with-python2 python-pyasn1))
6145
6146 (define-public python-pyasn1-modules
6147 (package
6148 (name "python-pyasn1-modules")
6149 (version "0.0.8")
6150 (source
6151 (origin
6152 (method url-fetch)
6153 (uri (pypi-uri "pyasn1-modules" version))
6154 (sha256
6155 (base32
6156 "0drqgw81xd3fxdlg89kgd79zzrabvfncvkbybi2wr6w2y4s1jmhh"))))
6157 (build-system python-build-system)
6158 (propagated-inputs
6159 `(("python-pyasn1" ,python-pyasn1)))
6160 (home-page "http://sourceforge.net/projects/pyasn1/")
6161 (synopsis "ASN.1 codec implementations")
6162 (description
6163 "Pyasn1-modules is a collection of Python modules providing ASN.1 types and
6164 implementations of ASN.1-based codecs and protocols.")
6165 (license license:bsd-3)))
6166
6167 (define-public python2-pyasn1-modules
6168 (package-with-python2 python-pyasn1-modules))
6169
6170 (define-public python-ipaddress
6171 (package
6172 (name "python-ipaddress")
6173 (version "1.0.16")
6174 (source (origin
6175 (method url-fetch)
6176 (uri (pypi-uri "ipaddress" version))
6177 (sha256
6178 (base32
6179 "1c3imabdrw8nfksgjjflzg7h4ynjckqacb188rf541m74arq4cas"))))
6180 (build-system python-build-system)
6181 (home-page "https://github.com/phihag/ipaddress")
6182 (synopsis "IP address manipulation library")
6183 (description
6184 "This package provides a fast, lightweight IPv4/IPv6 manipulation library
6185 in Python. This library is used to create, poke at, and manipulate IPv4 and
6186 IPv6 addresses and networks. This is a port of the Python 3.3 ipaddress
6187 module to older versions of Python.")
6188 (license license:psfl)))
6189
6190 (define-public python2-ipaddress
6191 (package-with-python2 python-ipaddress))
6192
6193 (define-public python2-ipaddr
6194 (package
6195 (name "python2-ipaddr")
6196 (version "2.1.11")
6197 (source
6198 (origin
6199 (method url-fetch)
6200 (uri (pypi-uri "ipaddr" version))
6201 (sha256
6202 (base32 "1dwq3ngsapjc93fw61rp17fvzggmab5x1drjzvd4y4q0i255nm8v"))))
6203 (build-system python-build-system)
6204 (arguments
6205 `(#:python ,python-2 ;version 2 only
6206 #:phases
6207 (modify-phases %standard-phases
6208 (replace 'check
6209 (lambda* _
6210 (zero? (system* "python" "ipaddr_test.py")))))))
6211 (home-page "https://github.com/google/ipaddr-py")
6212 (synopsis "IP address manipulation library")
6213 (description
6214 "Ipaddr is a Python@tie{}2 library for creating and manupilating IPv4 and
6215 IPv6 addresses and networks.
6216
6217 For new implementations you may prefer to use the standard module
6218 @code{ipaddress}, which was introduced in Python 3.3 and backported to older
6219 versions of Python.")
6220 (license license:asl2.0)))
6221
6222 (define-public python-idna
6223 (package
6224 (name "python-idna")
6225 (version "2.0")
6226 (source
6227 (origin
6228 (method url-fetch)
6229 (uri (string-append "https://pypi.python.org/packages/source/i/"
6230 "idna/idna-" version ".tar.gz"))
6231 (sha256
6232 (base32
6233 "0frxgmgi234lr9hylg62j69j4ik5zhg0wz05w5dhyacbjfnrl68n"))))
6234 (build-system python-build-system)
6235 (home-page "https://github.com/kjd/idna")
6236 (synopsis "Internationalized domain names in applications")
6237 (description
6238 "This is a library to support the Internationalised Domain Names in
6239 Applications (IDNA) protocol as specified in RFC 5891. This version of the
6240 protocol is often referred to as “IDNA2008” and can produce different results
6241 from the earlier standard from 2003. The library is also intended to act as a
6242 suitable drop-in replacement for the “encodings.idna” module that comes with
6243 the Python standard library but currently only supports the older 2003
6244 specification.")
6245 (license license:bsd-4)))
6246
6247 (define-public python2-idna
6248 (package-with-python2 python-idna))
6249
6250 (define-public python-pretend
6251 (package
6252 (name "python-pretend")
6253 (version "1.0.8")
6254 (source
6255 (origin
6256 (method url-fetch)
6257 (uri (string-append "https://pypi.python.org/packages/source/p/"
6258 "pretend/pretend-" version ".tar.gz"))
6259 (sha256
6260 (base32
6261 "0r5r7ygz9m6d2bklflbl84cqhjkc2q12xgis8268ygjh30g2q3wk"))))
6262 (build-system python-build-system)
6263 (home-page "https://github.com/alex/pretend")
6264 (synopsis "Library for stubbing in Python")
6265 (description
6266 "Pretend is a library to make stubbing with Python easier. Stubbing is a
6267 technique for writing tests. You may hear the term mixed up with mocks,
6268 fakes, or doubles. Basically, a stub is an object that returns pre-canned
6269 responses, rather than doing any computation.")
6270 (license license:bsd-3)))
6271
6272 (define-public python2-pretend
6273 (package-with-python2 python-pretend))
6274
6275 (define-public python-cryptography-vectors
6276 (package
6277 (name "python-cryptography-vectors")
6278 (version "1.5.3")
6279 (source
6280 (origin
6281 (method url-fetch)
6282 (uri (pypi-uri "cryptography_vectors" version))
6283 (sha256
6284 (base32
6285 "1bnd1bricyhxa27rhr0ljk0kacxzvysd3ar2j2hlv13a2k6zw4z5"))))
6286 (build-system python-build-system)
6287 (home-page "https://github.com/pyca/cryptography")
6288 (synopsis "Test vectors for the cryptography package")
6289 (description
6290 "This package contains test vectors for the cryptography package.")
6291 ;; Distributed under either BSD-3 or ASL2.0
6292 (license (list license:bsd-3 license:asl2.0))))
6293
6294 (define-public python2-cryptography-vectors
6295 (package-with-python2 python-cryptography-vectors))
6296
6297 (define-public python-cryptography
6298 (package
6299 (name "python-cryptography")
6300 (version "1.5.3")
6301 (source
6302 (origin
6303 (method url-fetch)
6304 (uri (pypi-uri "cryptography" version))
6305 (sha256
6306 (base32
6307 "1raanvkdfw5ai56ymlij6ghc4k126fs7jx948ig7yn4vj6ndv0ng"))))
6308 (build-system python-build-system)
6309 (arguments
6310 `(#:phases
6311 (modify-phases %standard-phases
6312 (add-before 'check 'disable-failing-test
6313 (lambda _
6314 ;; This test is known to fail with OpenSSL >= 1.0.2i and older
6315 ;; versions of python-cryptography:
6316 ;; https://github.com/pyca/cryptography/issues/3196
6317 ;; TODO: Try re-enabling the test when upgrading
6318 ;; python-cryptography.
6319 (substitute* "tests/hazmat/backends/test_openssl.py"
6320 (("def test_numeric_string_x509_name_entry")
6321 "@pytest.mark.xfail\n def test_numeric_string_x509_name_entry"))
6322 #t)))))
6323 (inputs
6324 `(("openssl" ,openssl)))
6325 (propagated-inputs
6326 `(("python-cffi" ,python-cffi)
6327 ("python-six" ,python-six)
6328 ("python-pyasn1" ,python-pyasn1)
6329 ("python-idna" ,python-idna)
6330 ("python-iso8601" ,python-iso8601)))
6331 (native-inputs
6332 `(("python-cryptography-vectors" ,python-cryptography-vectors)
6333 ("python-hypothesis" ,python-hypothesis)
6334 ("python-pretend" ,python-pretend)
6335 ("python-pyasn1" ,python-pyasn1)
6336 ("python-pyasn1-modules" ,python-pyasn1-modules)
6337 ("python-pytz" ,python-pytz)
6338 ("python-pytest" ,python-pytest-2.9.2)))
6339 (home-page "https://github.com/pyca/cryptography")
6340 (synopsis "Cryptographic recipes and primitives for Python")
6341 (description
6342 "cryptography is a package which provides cryptographic recipes and
6343 primitives to Python developers. It aims to be the “cryptographic standard
6344 library” for Python. The package includes both high level recipes, and low
6345 level interfaces to common cryptographic algorithms such as symmetric ciphers,
6346 message digests and key derivation functions.")
6347 ;; Distributed under either BSD-3 or ASL2.0
6348 (license (list license:bsd-3 license:asl2.0))
6349 (properties `((python2-variant . ,(delay python2-cryptography))))))
6350
6351 (define-public python2-cryptography
6352 (let ((crypto (package-with-python2
6353 (strip-python2-variant python-cryptography))))
6354 (package (inherit crypto)
6355 (propagated-inputs
6356 `(("python2-ipaddress" ,python2-ipaddress)
6357 ("python2-backport-ssl-match-hostname"
6358 ,python2-backport-ssl-match-hostname)
6359 ("python2-enum34" ,python2-enum34)
6360 ,@(package-propagated-inputs crypto))))))
6361
6362 (define-public python-pyopenssl
6363 (package
6364 (name "python-pyopenssl")
6365 (version "16.1.0")
6366 (source
6367 (origin
6368 (method url-fetch)
6369 (uri (pypi-uri "pyOpenSSL" version))
6370 (sha256
6371 (base32
6372 "0prm06zz7hl6bk5s2lqzw25lq6smayfv2fgiliw2rbqxlyiavxw8"))))
6373 (build-system python-build-system)
6374 (propagated-inputs
6375 `(("python-cryptography" ,python-cryptography)
6376 ("python-six" ,python-six)))
6377 (inputs
6378 `(("openssl" ,openssl)))
6379 (home-page "https://github.com/pyca/pyopenssl")
6380 (synopsis "Python wrapper module around the OpenSSL library")
6381 (description
6382 "PyOpenSSL is a high-level wrapper around a subset of the OpenSSL
6383 library.")
6384 (license license:asl2.0)))
6385
6386 (define-public python2-pyopenssl
6387 (package-with-python2 python-pyopenssl))
6388
6389 (define-public python-pip
6390 (package
6391 (name "python-pip")
6392 (version "8.0.2")
6393 (source
6394 (origin
6395 (method url-fetch)
6396 (uri (pypi-uri "pip" version))
6397 (sha256
6398 (base32
6399 "08cm8d4228fj0qnrysy3qv1a6022zr3dcs25amd14lgxil6vvx26"))))
6400 (build-system python-build-system)
6401 (inputs
6402 `(("python-virtualenv" ,python-virtualenv)
6403 ;; Tests
6404 ("python-mock" ,python-mock)
6405 ("python-pytest" ,python-pytest)
6406 ("python-scripttest" ,python-scripttest)))
6407 (home-page "https://pip.pypa.io/")
6408 (synopsis
6409 "Package manager for Python software")
6410 (description
6411 "Pip is a package manager for Python software, that finds packages on the
6412 Python Package Index (PyPI).")
6413 (license license:expat)))
6414
6415 (define-public python2-pip
6416 (package-with-python2 python-pip))
6417
6418 (define-public python-tlsh
6419 (package
6420 (name "python-tlsh")
6421 (version "3.4.4")
6422 (home-page "https://github.com/trendmicro/tlsh")
6423 (source (origin
6424 (method url-fetch)
6425 (uri (string-append "https://github.com/trendmicro/tlsh/archive/v"
6426 version ".tar.gz"))
6427 (sha256
6428 (base32
6429 "00bhzjqrlh7v538kbkbn8lgx976j1138al3sdhklaizqjvpwyk4r"))
6430 (file-name (string-append name "-" version ".tar.gz"))))
6431 (build-system cmake-build-system)
6432 (arguments
6433 '(#:out-of-source? #f
6434 #:phases (modify-phases %standard-phases
6435 (replace
6436 'install
6437 (lambda* (#:key outputs #:allow-other-keys)
6438 ;; Build and install the Python bindings. The underlying
6439 ;; C++ library is apparently not meant to be installed.
6440 (let ((out (assoc-ref outputs "out")))
6441 (with-directory-excursion "py_ext"
6442 (and (system* "python" "setup.py" "build")
6443 (system* "python" "setup.py" "install"
6444 (string-append "--prefix=" out))))))))))
6445 (inputs `(("python" ,python-wrapper))) ;for the bindings
6446 (synopsis "Fuzzy matching library for Python")
6447 (description
6448 "Trend Micro Locality Sensitive Hash (TLSH) is a fuzzy matching library.
6449 Given a byte stream with a minimum length of 256 bytes, TLSH generates a hash
6450 value which can be used for similarity comparisons. Similar objects have
6451 similar hash values, which allows for the detection of similar objects by
6452 comparing their hash values. The byte stream should have a sufficient amount
6453 of complexity; for example, a byte stream of identical bytes will not generate
6454 a hash value.")
6455 (license license:asl2.0)))
6456
6457 (define-public python2-tlsh
6458 (package
6459 (inherit python-tlsh)
6460 (name "python2-tlsh")
6461 (inputs `(("python" ,python-2)))))
6462
6463 (define-public python-termcolor
6464 (package
6465 (name "python-termcolor")
6466 (version "1.1.0")
6467 (source
6468 (origin
6469 (method url-fetch)
6470 (uri (pypi-uri "python-termcolor" version))
6471 (sha256
6472 (base32
6473 "0fv1vq14rpqwgazxg4981904lfyp84mnammw7y046491cv76jv8x"))))
6474 (build-system python-build-system)
6475 (arguments
6476 ;; There are no tests.
6477 `(#:tests? #f))
6478 (home-page "http://pypi.python.org/pypi/termcolor")
6479 (synopsis "ANSII Color formatting for terminal output")
6480 (description
6481 "This package provides ANSII Color formatting for output in terminals.")
6482 (license license:expat)))
6483
6484 (define-public python2-termcolor
6485 (package-with-python2 python-termcolor))
6486
6487 (define-public python-libarchive-c
6488 (package
6489 (name "python-libarchive-c")
6490 (version "2.2")
6491 (source (origin
6492 (method url-fetch)
6493 (uri (pypi-uri "libarchive-c" version))
6494 (sha256
6495 (base32
6496 "0z4r7v3dhd6b3120mav05ff08srih176r2rg5k8kn7mjd9pslm2x"))))
6497 (build-system python-build-system)
6498 (arguments
6499 '(#:phases (modify-phases %standard-phases
6500 (add-before
6501 'build 'reference-libarchive
6502 (lambda* (#:key inputs #:allow-other-keys)
6503 ;; Retain the absolute file name of libarchive.so.
6504 (let ((libarchive (assoc-ref inputs "libarchive")))
6505 (substitute* "libarchive/ffi.py"
6506 (("find_library\\('archive'\\)")
6507 (string-append "'" libarchive
6508 "/lib/libarchive.so'")))))))))
6509 (inputs
6510 `(("libarchive" ,libarchive)))
6511 (home-page "https://github.com/Changaco/python-libarchive-c")
6512 (synopsis "Python interface to libarchive")
6513 (description
6514 "This package provides Python bindings to libarchive, a C library to
6515 access possibly compressed archives in many different formats. It uses
6516 Python's @code{ctypes} foreign function interface (FFI).")
6517 (license license:lgpl2.0+)))
6518
6519 (define-public python2-libarchive-c
6520 (package-with-python2 python-libarchive-c))
6521
6522 (define-public python-file
6523 (package
6524 (inherit file)
6525 (name "python-file")
6526 (source (origin
6527 (inherit (package-source file))
6528 ;; This patch should not be applied to python2-file.
6529 (patches (search-patches "python-file-double-encoding-bug.patch"))))
6530 (build-system python-build-system)
6531 (arguments
6532 '(#:tests? #f ;no tests
6533 #:configure-flags '("--single-version-externally-managed" "--root=/")
6534 #:phases (modify-phases %standard-phases
6535 (add-before 'build 'change-directory
6536 (lambda _
6537 (chdir "python")
6538 #t))
6539 (add-before 'build 'set-library-file-name
6540 (lambda* (#:key inputs #:allow-other-keys)
6541 (let ((file (assoc-ref inputs "file")))
6542 (substitute* "magic.py"
6543 (("find_library\\('magic'\\)")
6544 (string-append "'" file "/lib/libmagic.so'")))
6545 #t))))))
6546 (inputs `(("file" ,file)))
6547 (self-native-input? #f)
6548 (synopsis "Python bindings to the libmagic file type guesser. Note that
6549 this module and the python-magic module both provide a \"magic.py\" file;
6550 these two modules, which are different and were developed separately, both
6551 serve the same purpose: provide Python bindings for libmagic.")))
6552
6553 (define-public python2-file
6554 (package-with-python2 python-file))
6555
6556 (define-public python-debian
6557 (package
6558 (name "python-debian")
6559 (version "0.1.23")
6560 (source
6561 (origin
6562 (method url-fetch)
6563 (uri (string-append
6564 "https://pypi.python.org/packages/source/p/python-debian/python-debian-"
6565 version ".tar.gz"))
6566 (sha256
6567 (base32
6568 "193faznwnjc3n5991wyzim6h9gyq1zxifmfrnpm3avgkh7ahyynh"))))
6569 (build-system python-build-system)
6570 (propagated-inputs
6571 `(("python-six" ,python-six)))
6572 (home-page "http://packages.debian.org/sid/python-debian")
6573 (synopsis "Debian package related modules")
6574 (description
6575 ;; XXX: Use @enumerate instead of @itemize to work around
6576 ;; <http://bugs.gnu.org/21772>.
6577 "This package provides Python modules that abstract many formats of
6578 Debian-related files, such as:
6579
6580 @enumerate
6581 @item Debtags information;
6582 @item @file{debian/changelog} files;
6583 @item packages files, pdiffs;
6584 @item control files of single or multiple RFC822-style paragraphs---e.g.
6585 @file{debian/control}, @file{.changes}, @file{.dsc};
6586 @item Raw @file{.deb} and @file{.ar} files, with (read-only) access to
6587 contained files and meta-information.
6588 @end enumerate\n")
6589
6590 ;; Modules are either GPLv2+ or GPLv3+.
6591 (license license:gpl3+)))
6592
6593 (define-public python2-debian
6594 (package-with-python2 python-debian))
6595
6596 (define-public python-nbformat
6597 (package
6598 (name "python-nbformat")
6599 (version "4.1.0")
6600 (source
6601 (origin
6602 (method url-fetch)
6603 (uri (pypi-uri "nbformat" version))
6604 (sha256
6605 (base32
6606 "0mq8iki3d4mnx7wy05phss7x98mds4fqydin8lcagidp1knw1xnv"))))
6607 (build-system python-build-system)
6608 (arguments `(#:tests? #f)) ; no test target
6609 (propagated-inputs
6610 `(("python-ipython-genutils" ,python-ipython-genutils)
6611 ("python-jsonschema" ,python-jsonschema)
6612 ("python-jupyter-core" ,python-jupyter-core)
6613 ("python-traitlets" ,python-traitlets)))
6614 (home-page "http://jupyter.org")
6615 (synopsis "Jupyter Notebook format")
6616 (description "This package provides the reference implementation of the
6617 Jupyter Notebook format and Python APIs for working with notebooks.")
6618 (license license:bsd-3)))
6619
6620 (define-public python2-nbformat
6621 (package-with-python2 python-nbformat))
6622
6623 (define-public python-bleach
6624 (package
6625 (name "python-bleach")
6626 (version "1.4.3")
6627 (source
6628 (origin
6629 (method url-fetch)
6630 (uri (pypi-uri "bleach" version))
6631 (sha256
6632 (base32
6633 "0jvg3jxrvnx7xmm9gj262v60ib452xlnwlb0navyp7jsvcd0d4qj"))))
6634 (build-system python-build-system)
6635 (propagated-inputs
6636 `(("python-html5lib" ,python-html5lib-0.9)
6637 ("python-six" ,python-six)))
6638 (native-inputs
6639 `(("python-nose" ,python-nose)))
6640 (home-page "http://github.com/jsocol/bleach")
6641 (synopsis "Whitelist-based HTML-sanitizing tool")
6642 (description "Bleach is an easy whitelist-based HTML-sanitizing tool.")
6643 (license license:asl2.0)))
6644
6645 (define-public python2-bleach
6646 (package-with-python2 python-bleach))
6647
6648 (define-public python-entrypoints
6649 (package
6650 (name "python-entrypoints")
6651 (version "0.2.2")
6652 (source
6653 (origin
6654 (method url-fetch)
6655 (uri (string-append "https://github.com/takluyver/entrypoints/archive/"
6656 version ".tar.gz"))
6657 (file-name (string-append name "-" version ".tar.gz"))
6658 (sha256
6659 (base32
6660 "0azqlkh3j0za080lsf5crnhaxx3c93k9dpv5ihkhf5cppgw5sjz5"))))
6661 (build-system python-build-system)
6662 ;; The package does not come with a setup.py file, so we have to generate
6663 ;; one ourselves.
6664 (arguments
6665 `(#:tests? #f
6666 #:phases
6667 (modify-phases %standard-phases
6668 (add-after 'unpack 'create-setup.py
6669 (lambda _
6670 (call-with-output-file "setup.py"
6671 (lambda (port)
6672 (format port "\
6673 from setuptools import setup
6674 setup(name='entrypoints', version='~a', py_modules=['entrypoints'])
6675 " ,version))))))))
6676 (home-page "https://github.com/takluyver/entrypoints")
6677 (synopsis "Discover and load entry points from installed Python packages")
6678 (description "Entry points are a way for Python packages to advertise
6679 objects with some common interface. The most common examples are
6680 @code{console_scripts} entry points, which define shell commands by
6681 identifying a Python function to run. The @code{entrypoints} module contains
6682 functions to find and load entry points.")
6683 (license license:expat)))
6684
6685 (define-public python2-entrypoints
6686 (package-with-python2 python-entrypoints))
6687
6688 (define-public python-nbconvert
6689 (package
6690 (name "python-nbconvert")
6691 (version "5.0.0b1")
6692 (source
6693 (origin
6694 (method url-fetch)
6695 (uri (pypi-uri "nbconvert" version))
6696 (sha256
6697 (base32
6698 "0brclbb18l4nmd5qy3dl9wn05rjdh1fz4rmzdlfqacj12rcdvdgp"))))
6699 (build-system python-build-system)
6700 ;; The "bdist_egg" target is disabled by default, causing the installation
6701 ;; to fail.
6702 (arguments `(#:configure-flags (list "bdist_egg")))
6703 (propagated-inputs
6704 `(("python-bleach" ,python-bleach)
6705 ("python-entrypoints" ,python-entrypoints)
6706 ("python-jinja2" ,python-jinja2)
6707 ("python-jupyter-core" ,python-jupyter-core)
6708 ("python-mistune" ,python-mistune)
6709 ("python-nbformat" ,python-nbformat)
6710 ("python-pygments" ,python-pygments)
6711 ("python-traitlets" ,python-traitlets)))
6712 (home-page "http://jupyter.org")
6713 (synopsis "Converting Jupyter Notebooks")
6714 (description "The @code{nbconvert} tool, @{jupyter nbconvert}, converts
6715 notebooks to various other formats via Jinja templates. It allows you to
6716 convert an @code{.ipynb} notebook file into various static formats including:
6717
6718 @enumerate
6719 @item HTML
6720 @item LaTeX
6721 @item PDF
6722 @item Reveal JS
6723 @item Markdown (md)
6724 @item ReStructured Text (rst)
6725 @item executable script
6726 @end enumerate\n")
6727 (license license:bsd-3)))
6728
6729 (define-public python2-nbconvert
6730 (package-with-python2 python-nbconvert))
6731
6732 (define-public python-notebook
6733 (package
6734 (name "python-notebook")
6735 (version "4.2.3")
6736 (source (origin
6737 (method url-fetch)
6738 (uri (pypi-uri "notebook" version))
6739 (sha256
6740 (base32
6741 "0laq5c2f21frq6xcdckgq7raqhznbjb0qs0357g612z87wyn1a9r"))))
6742 (build-system python-build-system)
6743 (arguments
6744 `(#:phases
6745 (modify-phases %standard-phases
6746 (replace 'check
6747 (lambda _
6748 ;; HOME must be set for tests
6749 (setenv "HOME" "/tmp")
6750 (zero? (system* "nosetests")))))))
6751 (propagated-inputs
6752 `(("python-jupyter-core" ,python-jupyter-core)
6753 ("python-nbformat" ,python-nbformat)
6754 ("python-nbconvert" ,python-nbconvert)
6755 ("python-ipython" ,python-ipython)))
6756 (native-inputs
6757 `(("python-nose" ,python-nose)
6758 ("python-sphinx" ,python-sphinx)
6759 ("python-requests" ,python-requests)))
6760 (home-page "http://jupyter.org/")
6761 (synopsis "Web-based notebook environment for interactive computing")
6762 (description
6763 "The Jupyter HTML notebook is a web-based notebook environment for
6764 interactive computing.")
6765 (license license:bsd-3)))
6766
6767 (define-public python2-notebook
6768 (package-with-python2 python-notebook))
6769
6770 (define-public python-widgetsnbextension
6771 (package
6772 (name "python-widgetsnbextension")
6773 (version "1.2.6")
6774 (source
6775 (origin
6776 (method url-fetch)
6777 (uri (pypi-uri "widgetsnbextension" version))
6778 (sha256
6779 (base32
6780 "0lff2mrwrgsa1mxmwx3phl9xvy0jqfpg6khbmxy53jbq56rwy666"))))
6781 (build-system python-build-system)
6782 (propagated-inputs
6783 `(("python-notebook" ,python-notebook)))
6784 (native-inputs
6785 `(("python-nose" ,python-nose)))
6786 (home-page "http://ipython.org")
6787 (synopsis "IPython HTML widgets for Jupyter")
6788 (description "This package provides interactive HTML widgets for Jupyter
6789 notebooks.")
6790 (license license:bsd-3)))
6791
6792 (define-public python2-widgetsnbextension
6793 (package-with-python2 python-widgetsnbextension))
6794
6795 (define-public python-ipywidgets
6796 (package
6797 (name "python-ipywidgets")
6798 (version "5.2.2")
6799 (source
6800 (origin
6801 (method url-fetch)
6802 (uri (pypi-uri "ipywidgets" version))
6803 (sha256
6804 (base32
6805 "1lk0qrr5l9a0z7qkkn30hv5832whxwxymf1l576fmmad0n7hkxms"))))
6806 (build-system python-build-system)
6807 ;; FIXME: it's not clear how to run the tests.
6808 (arguments `(#:tests? #f))
6809 (propagated-inputs
6810 `(("python-ipykernel" ,python-ipykernel)
6811 ("python-ipython" ,python-ipython)
6812 ("python-traitlets" ,python-traitlets)
6813 ("python-widgetsnbextension" ,python-widgetsnbextension)))
6814 (home-page "http://ipython.org")
6815 (synopsis "IPython HTML widgets for Jupyter")
6816 (description "Ipywidgets are interactive HTML widgets for Jupyter
6817 notebooks and the IPython kernel. Notebooks come alive when interactive
6818 widgets are used. Users gain control of their data and can visualize changes
6819 in the data.")
6820 (license license:bsd-3)))
6821
6822 (define-public python2-ipywidgets
6823 (package-with-python2 python-ipywidgets))
6824
6825 (define-public python-jupyter-console
6826 (package
6827 (name "python-jupyter-console")
6828 (version "5.0.0")
6829 (source
6830 (origin
6831 (method url-fetch)
6832 (uri (pypi-uri "jupyter_console" version))
6833 (sha256
6834 (base32
6835 "04acmkwsi99rcg3vb54c6n492zv35s92h2ahabc0w6wj976cipvx"))))
6836 (build-system python-build-system)
6837 ;; FIXME: it's not clear how to run the tests.
6838 (arguments `(#:tests? #f))
6839 (propagated-inputs
6840 `(("python-ipykernel" ,python-ipykernel)
6841 ("python-ipython" ,python-ipython)
6842 ("python-jupyter-client" ,python-jupyter-client)
6843 ("python-prompt-toolkit" ,python-prompt-toolkit)
6844 ("python-pygments" ,python-pygments)))
6845 (home-page "https://jupyter.org")
6846 (synopsis "Jupyter terminal console")
6847 (description "This package provides a terminal-based console frontend for
6848 Jupyter kernels. It also allows for console-based interaction with non-Python
6849 Jupyter kernels such as IJulia and IRKernel.")
6850 (license license:bsd-3)))
6851
6852 (define-public python2-jupyter-console
6853 (package-with-python2 python-jupyter-console))
6854
6855 (define-public jupyter
6856 (package
6857 (name "jupyter")
6858 (version "1.0.0")
6859 (source
6860 (origin
6861 (method url-fetch)
6862 (uri (pypi-uri "jupyter" version))
6863 (sha256
6864 (base32
6865 "0pwf3pminkzyzgx5kcplvvbvwrrzd3baa7lmh96f647k30rlpp6r"))))
6866 (build-system python-build-system)
6867 ;; FIXME: it's not clear how to run the tests.
6868 (arguments `(#:tests? #f))
6869 (propagated-inputs
6870 `(("python-ipykernel" ,python-ipykernel)
6871 ("python-ipywidgets" ,python-ipywidgets)
6872 ("python-jupyter-console" ,python-jupyter-console)
6873 ("python-nbconvert" ,python-nbconvert)
6874 ("python-notebook" ,python-notebook)))
6875 (home-page "http://jupyter.org")
6876 (synopsis "Web application for interactive documents")
6877 (description
6878 "The Jupyter Notebook is a web application that allows you to create and
6879 share documents that contain live code, equations, visualizations and
6880 explanatory text. Uses include: data cleaning and transformation, numerical
6881 simulation, statistical modeling, machine learning and much more.")
6882 (license license:bsd-3)))
6883
6884 (define-public python-chardet
6885 (package
6886 (name "python-chardet")
6887 (version "2.3.0")
6888 (source
6889 (origin
6890 (method url-fetch)
6891 (uri (string-append
6892 "https://pypi.python.org/packages/source/c/chardet/chardet-"
6893 version
6894 ".tar.gz"))
6895 (sha256
6896 (base32
6897 "1ak87ikcw34fivcgiz2xvi938dmclh078az65l9x3rmgljrkhgp5"))))
6898 (build-system python-build-system)
6899 (home-page "https://github.com/chardet/chardet")
6900 (synopsis "Universal encoding detector for Python 2 and 3")
6901 (description
6902 "This package provides @code{chardet}, a Python module that can
6903 automatically detect a wide range of file encodings.")
6904 (license license:lgpl2.1+)))
6905
6906 (define-public python2-chardet
6907 (package-with-python2 python-chardet))
6908
6909 (define-public python-docopt
6910 (package
6911 (name "python-docopt")
6912 (version "0.6.2")
6913 (source
6914 (origin
6915 (method url-fetch)
6916 ;; The release on PyPI does not include tests.
6917 (uri (string-append
6918 "https://github.com/docopt/docopt/archive/"
6919 version ".tar.gz"))
6920 (file-name (string-append name "-" version ".tar.gz"))
6921 (sha256
6922 (base32
6923 "16bf890xbdz3m30rsv2qacklh2rdn1zrfspfnwzx9g7vwz8yw4r1"))))
6924 (build-system python-build-system)
6925 (native-inputs
6926 `(("python-pytest" ,python-pytest)))
6927 (arguments
6928 `(#:phases (alist-replace
6929 'check
6930 (lambda _ (zero? (system* "py.test")))
6931 %standard-phases)))
6932 (home-page "http://docopt.org")
6933 (synopsis "Command-line interface description language for Python")
6934 (description "This library allows the user to define a command-line
6935 interface from a program's help message rather than specifying it
6936 programatically with command-line parsers like @code{getopt} and
6937 @code{argparse}.")
6938 (license license:expat)))
6939
6940 (define-public python2-docopt
6941 (package-with-python2 python-docopt))
6942
6943 (define-public python-zope-event
6944 (package
6945 (name "python-zope-event")
6946 (version "4.1.0")
6947 (source
6948 (origin
6949 (method url-fetch)
6950 (uri (string-append "https://pypi.python.org/packages/source/z"
6951 "/zope.event/zope.event-" version ".tar.gz"))
6952 (sha256
6953 (base32
6954 "11p75zpfz3ffhz21nzx9wb23xs993ck5s6hkjcvhswwizni5jynw"))))
6955 (build-system python-build-system)
6956 (home-page "http://pypi.python.org/pypi/zope.event")
6957 (synopsis "Event publishing system for Python")
6958 (description "Zope.event provides an event publishing API, intended for
6959 use by applications which are unaware of any subscribers to their events. It
6960 is a simple event-dispatching system on which more sophisticated event
6961 dispatching systems can be built.")
6962 (license license:zpl2.1)))
6963
6964 (define-public python2-zope-event
6965 (package-with-python2 python-zope-event))
6966
6967 (define-public python-zope-interface
6968 (package
6969 (name "python-zope-interface")
6970 (version "4.1.3")
6971 (source
6972 (origin
6973 (method url-fetch)
6974 (uri (string-append "https://pypi.python.org/packages/source/z"
6975 "/zope.interface/zope.interface-" version ".tar.gz"))
6976 (sha256
6977 (base32
6978 "0ks8h73b2g4bkad821qbv0wzjppdrwys33i7ka45ik3wxjg1l8if"))))
6979 (build-system python-build-system)
6980 (propagated-inputs
6981 `(("python-zope-event" ,python-zope-event)))
6982 (home-page "https://github.com/zopefoundation/zope.interface")
6983 (synopsis "Python implementation of the \"design by contract\"
6984 methodology")
6985 (description "Zope.interface provides an implementation of \"object
6986 interfaces\" for Python. Interfaces are a mechanism for labeling objects as
6987 conforming to a given API or contract.")
6988 (license license:zpl2.1)))
6989
6990 (define-public python2-zope-interface
6991 (package-with-python2 python-zope-interface))
6992
6993 (define-public python-zope-exceptions
6994 (package
6995 (name "python-zope-exceptions")
6996 (version "4.0.8")
6997 (source
6998 (origin
6999 (method url-fetch)
7000 (uri (string-append "https://pypi.python.org/packages/source/z"
7001 "/zope.exceptions/zope.exceptions-"
7002 version ".tar.gz"))
7003 (sha256
7004 (base32
7005 "0zwxaaa66sqxg5k7zcrvs0fbg9ym1njnxnr28dfmchzhwjvwnfzl"))))
7006 (build-system python-build-system)
7007 (arguments
7008 '(#:tests? #f)) ; circular dependency with zope.testrunner
7009 (propagated-inputs
7010 `(("python-zope-interface" ,python-zope-interface)))
7011 (home-page "http://cheeseshop.python.org/pypi/zope.exceptions")
7012 (synopsis "Zope exceptions")
7013 (description "Zope.exceptions provides general-purpose exception types
7014 that have uses outside of the Zope framework.")
7015 (license license:zpl2.1)))
7016
7017 (define-public python2-zope-exceptions
7018 (package-with-python2 python-zope-exceptions))
7019
7020 (define-public python-zope-testing
7021 (package
7022 (name "python-zope-testing")
7023 (version "4.5.0")
7024 (source
7025 (origin
7026 (method url-fetch)
7027 (uri (string-append "https://pypi.python.org/packages/source/z"
7028 "/zope.testing/zope.testing-" version ".tar.gz"))
7029 (sha256
7030 (base32
7031 "1yvglxhzvhl45mndvn9gskx2ph30zz1bz7rrlyfs62fv2pvih90s"))
7032 (modules '((guix build utils)))
7033 (snippet
7034 '(begin
7035 ;; Remove pre-compiled .pyc files backup files from source.
7036 (for-each delete-file (find-files "." "(\\.pyc|~)$"))
7037 #t))))
7038 (build-system python-build-system)
7039 (native-inputs
7040 `(("python-zope-exceptions" ,python-zope-exceptions)))
7041 (propagated-inputs
7042 `(("python-zope-interface" ,python-zope-interface)))
7043 (home-page "http://pypi.python.org/pypi/zope.testing")
7044 (synopsis "Zope testing helpers")
7045 (description "Zope.testing provides a number of testing utilities for HTML
7046 forms, HTTP servers, regular expressions, and more.")
7047 (license license:zpl2.1)))
7048
7049 (define-public python2-zope-testing
7050 (package-with-python2 python-zope-testing))
7051
7052 (define-public python-zope-testrunner
7053 (package
7054 (name "python-zope-testrunner")
7055 (version "4.4.9")
7056 (source
7057 (origin
7058 (method url-fetch)
7059 (uri (string-append "https://pypi.python.org/packages/source/z"
7060 "/zope.testrunner/zope.testrunner-"
7061 version ".zip"))
7062 (sha256
7063 (base32
7064 "1r7iqknhh55y45f64mz5hghgvzx34h1i11k350s0avx6q8gznja1"))))
7065 (build-system python-build-system)
7066 (native-inputs
7067 `(("python-six" ,python-six)
7068 ;("python-zope-interface" ,python-zope-interface)
7069 ("python-zope-exceptions" ,python-zope-exceptions)
7070 ("python-zope-testing" ,python-zope-testing)
7071 ("unzip" ,unzip)))
7072 (propagated-inputs
7073 `(("python-zope-interface" ,python-zope-interface)))
7074 (home-page "http://pypi.python.org/pypi/zope.testrunner")
7075 (synopsis "Zope testrunner script")
7076 (description "Zope.testrunner provides a script for running Python
7077 tests.")
7078 (license license:zpl2.1)))
7079
7080 (define-public python2-zope-testrunner
7081 (let ((base (package-with-python2 python-zope-testrunner)))
7082 (package
7083 (inherit base)
7084 (native-inputs
7085 (append (package-native-inputs base)
7086 `(("python2-subunit" ,python2-subunit)
7087 ("python2-mimeparse" ,python2-mimeparse)))))))
7088
7089 (define-public python-zope-i18nmessageid
7090 (package
7091 (name "python-zope-i18nmessageid")
7092 (version "4.0.3")
7093 (source
7094 (origin
7095 (method url-fetch)
7096 (uri (string-append
7097 "https://pypi.python.org/packages/source/z"
7098 "/zope.i18nmessageid/zope.i18nmessageid-"
7099 version ".tar.gz"))
7100 (sha256
7101 (base32
7102 "1rslyph0klk58dmjjy4j0jxy21k03azksixc3x2xhqbkv97cmzml"))))
7103 (build-system python-build-system)
7104 (home-page "http://pypi.python.org/pypi/zope.i18nmessageid")
7105 (synopsis "Message identifiers for internationalization")
7106 (description "Zope.i18nmessageid provides facilities for declaring
7107 internationalized messages within program source text.")
7108 (license license:zpl2.1)))
7109
7110 (define-public python2-zope-i18nmessageid
7111 (package-with-python2 python-zope-i18nmessageid))
7112
7113 (define-public python-zope-schema
7114 (package
7115 (name "python-zope-schema")
7116 (version "4.4.2")
7117 (source
7118 (origin
7119 (method url-fetch)
7120 (uri (string-append "https://pypi.python.org/packages/source/z"
7121 "/zope.schema/zope.schema-" version ".tar.gz"))
7122 (sha256
7123 (base32
7124 "1p943jdxb587dh7php4vx04qvn7b2877hr4qs5zyckvp5afhhank"))))
7125 (build-system python-build-system)
7126 (propagated-inputs
7127 `(("python-zope-event" ,python-zope-event)
7128 ("python-zope-interface" ,python-zope-interface)))
7129 (native-inputs
7130 `(("python-zope-testing" ,python-zope-testing)
7131 ("python-coverage" ,python-coverage)
7132 ("python-nose" ,python-nose)))
7133 (home-page "http://pypi.python.org/pypi/zope.schema")
7134 (synopsis "Zope data schemas")
7135 (description "Zope.scheme provides extensions to zope.interface for
7136 defining data schemas.")
7137 (license license:zpl2.1)))
7138
7139 (define-public python2-zope-schema
7140 (package-with-python2 python-zope-schema))
7141
7142 (define-public python-zope-configuration
7143 (package
7144 (name "python-zope-configuration")
7145 (version "4.0.3")
7146 (source (origin
7147 (method url-fetch)
7148 (uri (string-append "https://pypi.python.org/packages/source/z"
7149 "/zope.configuration/zope.configuration-"
7150 version ".tar.gz"))
7151 (sha256
7152 (base32
7153 "1x9dfqypgympnlm25p9m43xh4qv3p7d75vksv9pzqibrb4cggw5n"))))
7154 (build-system python-build-system)
7155 (propagated-inputs
7156 `(("python-zope-i18nmessageid" ,python-zope-i18nmessageid)
7157 ("python-zope-schema" ,python-zope-schema)))
7158 (home-page "http://pypi.python.org/pypi/zope.configuration")
7159 (synopsis "Zope Configuration Markup Language")
7160 (description "Zope.configuration implements ZCML, the Zope Configuration
7161 Markup Language.")
7162 (license license:zpl2.1)))
7163
7164 (define-public python2-zope-configuration
7165 (package-with-python2 python-zope-configuration))
7166
7167 (define-public python-zope-proxy
7168 (package
7169 (name "python-zope-proxy")
7170 (version "4.1.6")
7171 (source
7172 (origin
7173 (method url-fetch)
7174 (uri (string-append "https://pypi.python.org/packages/source/z"
7175 "/zope.proxy/zope.proxy-" version ".tar.gz"))
7176 (sha256
7177 (base32
7178 "0pqwwmvm1prhwv1ziv9lp8iirz7xkwb6n2kyj36p2h0ppyyhjnm4"))))
7179 (build-system python-build-system)
7180 (propagated-inputs
7181 `(("python-zope-interface" ,python-zope-interface)))
7182 (home-page "http://pypi.python.org/pypi/zope.proxy")
7183 (synopsis "Generic, transparent proxies")
7184 (description "Zope.proxy provides generic, transparent proxies for Python.
7185 Proxies are special objects which serve as mostly-transparent wrappers around
7186 another object, intervening in the apparent behavior of the wrapped object
7187 only when necessary to apply the policy (e.g., access checking, location
7188 brokering, etc.) for which the proxy is responsible.")
7189 (license license:zpl2.1)))
7190
7191 (define-public python2-zope-proxy
7192 (package-with-python2 python-zope-proxy))
7193
7194 (define-public python-zope-location
7195 (package
7196 (name "python-zope-location")
7197 (version "4.0.3")
7198 (source
7199 (origin
7200 (method url-fetch)
7201 (uri (string-append "https://pypi.python.org/packages/source/z"
7202 "/zope.location/zope.location-" version ".tar.gz"))
7203 (sha256
7204 (base32
7205 "1nj9da4ksiyv3h8n2vpzwd0pb03mdsh7zy87hfpx72b6p2zcwg74"))))
7206 (build-system python-build-system)
7207 (native-inputs
7208 `(("python-zope-proxy" ,python-zope-proxy)
7209 ("python-zope-schema" ,python-zope-schema)))
7210 (home-page "http://pypi.python.org/pypi/zope.location/")
7211 (synopsis "Zope location library")
7212 (description "Zope.location implements the concept of \"locations\" in
7213 Zope3, which are are special objects that have a structural location.")
7214 (license license:zpl2.1)))
7215
7216 (define-public python2-zope-location
7217 (package-with-python2 python-zope-location))
7218
7219 (define-public python-zope-security
7220 (package
7221 (name "python-zope-security")
7222 (version "4.0.3")
7223 (source
7224 (origin
7225 (method url-fetch)
7226 (uri (string-append "https://pypi.python.org/packages/source/z"
7227 "/zope.security/zope.security-" version ".tar.gz"))
7228 (sha256
7229 (base32
7230 "14zmf684amc0x32kq05yxnhfqd1cmyhafkw05gn81rn90zjv6ssy"))))
7231 (build-system python-build-system)
7232 (propagated-inputs
7233 `(("python-zope-i18nmessageid" ,python-zope-i18nmessageid)
7234 ("python-zope-component" ,python-zope-component)
7235 ("python-zope-location" ,python-zope-location)
7236 ("python-zope-proxy" ,python-zope-proxy)
7237 ("python-zope-schema" ,python-zope-schema)
7238 ("python-zope-testrunner" ,python-zope-testrunner)
7239 ("python-zope-testing" ,python-zope-testing)))
7240 (home-page "http://pypi.python.org/pypi/zope.security")
7241 (synopsis "Zope security framework")
7242 (description "Zope.security provides a generic mechanism to implement
7243 security policies on Python objects.")
7244 (license license:zpl2.1)))
7245
7246 (define-public python2-zope-security
7247 (let ((zope-security (package-with-python2 python-zope-security)))
7248 (package (inherit zope-security)
7249 (propagated-inputs
7250 `(("python2-zope-testrunner" ,python2-zope-testrunner)
7251 ,@(alist-delete
7252 "python-zope-testrunner"
7253 (package-propagated-inputs zope-security)))))))
7254
7255 (define-public python-zope-component
7256 (package
7257 (name "python-zope-component")
7258 (version "4.2.2")
7259 (source
7260 (origin
7261 (method url-fetch)
7262 (uri (string-append "https://pypi.python.org/packages/source/z"
7263 "/zope.component/zope.component-" version ".tar.gz"))
7264 (sha256
7265 (base32
7266 "06pqr8m5jv12xjyy5b59hh9anl61cxkzhw9mka33r3nxalmi2b18"))))
7267 (build-system python-build-system)
7268 (arguments
7269 ;; Skip tests due to circular dependency with python-zope-security.
7270 '(#:tests? #f))
7271 (native-inputs
7272 `(("python-zope-testing" ,python-zope-testing)))
7273 (propagated-inputs
7274 `(("python-zope-event" ,python-zope-event)
7275 ("python-zope-interface" ,python-zope-interface)
7276 ("python-zope-i18nmessageid" ,python-zope-i18nmessageid)
7277 ("python-zope-configuration" ,python-zope-configuration)))
7278 (home-page "https://github.com/zopefoundation/zope.component")
7279 (synopsis "Zope Component Architecture")
7280 (description "Zope.component represents the core of the Zope Component
7281 Architecture. Together with the zope.interface package, it provides
7282 facilities for defining, registering and looking up components.")
7283 (license license:zpl2.1)))
7284
7285 (define-public python2-zope-component
7286 (package-with-python2 python-zope-component))
7287
7288 (define-public python-pythondialog
7289 (package
7290 (name "python-pythondialog")
7291 (version "3.4.0")
7292 (source
7293 (origin
7294 (method url-fetch)
7295 (uri (pypi-uri "pythondialog" version))
7296 (sha256
7297 (base32
7298 "1728ghsran47jczn9bhlnkvk5bvqmmbihabgif5h705b84r1272c"))))
7299 (build-system python-build-system)
7300 (arguments
7301 `(#:phases
7302 (modify-phases %standard-phases
7303 (add-after 'unpack 'patch-path
7304 (lambda* (#:key inputs #:allow-other-keys)
7305 (let* ((dialog (assoc-ref inputs "dialog")))
7306 ;; Since this library really wants to grovel the search path, we
7307 ;; must hardcode dialog's store path into it.
7308 (substitute* "dialog.py"
7309 (("os.getenv\\(\"PATH\", \":/bin:/usr/bin\"\\)")
7310 (string-append "os.getenv(\"PATH\") + \":" dialog "/bin\"")))
7311 #t))))
7312 #:tests? #f)) ; no test suite
7313 (propagated-inputs
7314 `(("dialog" ,dialog)))
7315 (home-page "http://pythondialog.sourceforge.net/")
7316 (synopsis "Python interface to the UNIX dialog utility")
7317 (description "A Python wrapper for the dialog utility. Its purpose is to
7318 provide an easy to use, pythonic and comprehensive Python interface to dialog.
7319 This allows one to make simple text-mode user interfaces on Unix-like systems")
7320 (license license:lgpl2.1)
7321 (properties `((python2-variant . ,(delay python2-pythondialog))))))
7322
7323 (define-public python2-pythondialog
7324 (let ((base (package-with-python2 (strip-python2-variant python-pythondialog))))
7325 (package
7326 (inherit base)
7327 (version (package-version python-pythondialog))
7328 (source (origin
7329 (method url-fetch)
7330 (uri (pypi-uri "python2-pythondialog" version))
7331 (sha256
7332 (base32
7333 "0d8k7lxk50imdyx85lv8j98i4c93a71iwpapnl1506rpkbm9qvd9")))))))
7334
7335 (define-public python-pyrfc3339
7336 (package
7337 (name "python-pyrfc3339")
7338 (version "1.0")
7339 (source
7340 (origin
7341 (method url-fetch)
7342 (uri (pypi-uri "pyRFC3339" version))
7343 (sha256
7344 (base32
7345 "0dgm4l9y8jiax5cp6yxjd2i27cq8h33sh81n1wfbmnmqb32cdywd"))))
7346 (build-system python-build-system)
7347 (propagated-inputs
7348 `(("python-pytz" ,python-pytz)))
7349 (native-inputs
7350 `(("python-nose" ,python-nose)))
7351 (home-page "https://github.com/kurtraschke/pyRFC3339")
7352 (synopsis "Python timestamp library")
7353 (description "Python library for generating and parsing RFC 3339-compliant
7354 timestamps.")
7355 (license license:expat)))
7356
7357 (define-public python2-pyrfc3339
7358 (package-with-python2 python-pyrfc3339))
7359
7360 (define-public python-werkzeug
7361 (package
7362 (name "python-werkzeug")
7363 (version "0.11.11")
7364 (source
7365 (origin
7366 (method url-fetch)
7367 (uri (pypi-uri "Werkzeug" version))
7368 (sha256
7369 (base32
7370 "1rgpq8a2qv26d75v9j3b074inirlyy6y4b5x4rxblp202jy4cb77"))))
7371 (build-system python-build-system)
7372 (native-inputs
7373 `(("python-pytest" ,python-pytest)))
7374 (home-page "http://werkzeug.pocoo.org/")
7375 (synopsis "Utilities for WSGI applications")
7376 (description "One of the most advanced WSGI utility modules. It includes a
7377 powerful debugger, full-featured request and response objects, HTTP utilities to
7378 handle entity tags, cache control headers, HTTP dates, cookie handling, file
7379 uploads, a powerful URL routing system and a bunch of community-contributed
7380 addon modules.")
7381 (license license:x11)))
7382
7383 (define-public python2-werkzeug
7384 (package-with-python2 python-werkzeug))
7385
7386 (define-public python-configobj
7387 (package
7388 (name "python-configobj")
7389 (version "5.0.6")
7390 (source (origin
7391 (method url-fetch)
7392 (uri (string-append
7393 "https://pypi.python.org/packages/source/c/configobj/"
7394 "configobj-" version ".tar.gz"))
7395 (sha256
7396 (base32
7397 "00h9rcmws03xvdlfni11yb60bz3kxfvsj6dg6nrpzj71f03nbxd2"))
7398 ;; Patch setup.py so it looks for python-setuptools, which is
7399 ;; required to parse the keyword 'install_requires' in setup.py.
7400 (patches (search-patches "python-configobj-setuptools.patch"))))
7401 (build-system python-build-system)
7402 (native-inputs
7403 `(("python-six" ,python-six)))
7404 (synopsis "Config file reading, writing and validation")
7405 (description "ConfigObj is a simple but powerful config file reader and
7406 writer: an ini file round tripper. Its main feature is that it is very easy to
7407 use, with a straightforward programmer’s interface and a simple syntax for
7408 config files.")
7409 (home-page "https://github.com/DiffSK/configobj")
7410 (license license:bsd-3)))
7411
7412 (define-public python2-configobj
7413 (package-with-python2 python-configobj))
7414
7415 (define-public python-configargparse
7416 (package
7417 (name "python-configargparse")
7418 (version "0.10.0")
7419 (source (origin
7420 (method url-fetch)
7421 (uri (string-append
7422 "https://pypi.python.org/packages/source/C/ConfigArgParse/"
7423 "ConfigArgParse-" version ".tar.gz"))
7424 (sha256
7425 (base32
7426 "19wh919gbdbzxzpagg52q3lm62yicm95ddlcx77dyjc1slyshl1v"))))
7427 (build-system python-build-system)
7428 (arguments
7429 ;; FIXME: Bug in test suite filed upstream:
7430 ;; https://github.com/bw2/ConfigArgParse/issues/32
7431 '(#:tests? #f))
7432 (synopsis "Replacement for argparse")
7433 (description "A drop-in replacement for argparse that allows options to also
7434 be set via config files and/or environment variables.")
7435 (home-page "https://github.com/bw2/ConfigArgParse")
7436 (license license:expat)))
7437
7438 (define-public python2-configargparse
7439 (package-with-python2 python-configargparse))
7440
7441 (define-public python-ndg-httpsclient
7442 (package
7443 (name "python-ndg-httpsclient")
7444 (version "0.4.0")
7445 (source (origin
7446 (method url-fetch)
7447 (uri (string-append
7448 "https://pypi.python.org/packages/source/n/ndg-httpsclient/"
7449 "ndg_httpsclient-" version ".tar.gz"))
7450 (sha256
7451 (base32
7452 "0x32ibixm3vv5m9xfk83xsqm8xcqw4dd0khbh6qbri6rxgymbhg8"))))
7453 (build-system python-build-system)
7454 (arguments
7455 '(;; The tests appear to require networking.
7456 #:tests? #f))
7457 (propagated-inputs
7458 `(("python-pyopenssl" ,python-pyopenssl)))
7459 (synopsis "HTTPS support for Python's httplib and urllib2")
7460 (description "This is a HTTPS client implementation for httplib and urllib2
7461 based on PyOpenSSL. PyOpenSSL provides a more fully featured SSL implementation
7462 over the default provided with Python and importantly enables full verification
7463 of the SSL peer.")
7464 (home-page "https://github.com/cedadev/ndg_httpsclient/")
7465 (license license:bsd-3)))
7466
7467 ;; python2-openssl requires special care, so package-with-python2 is
7468 ;; insufficient.
7469 (define-public python2-ndg-httpsclient
7470 (package (inherit python-ndg-httpsclient)
7471 (name "python2-ndg-httpsclient")
7472 (arguments `(#:python ,python-2))
7473 (propagated-inputs
7474 `(("python2-pyopenssl" ,python2-pyopenssl)))))
7475
7476 (define-public python-contextlib2
7477 (package
7478 (name "python-contextlib2")
7479 (version "0.4.0")
7480 (source
7481 (origin
7482 (method url-fetch)
7483 (uri (pypi-uri "contextlib2" version))
7484 (sha256
7485 (base32
7486 "0cmp131dlh0d0zvw0aza1zd13glvngzk8lb4avks0hm7yxwdr9am"))))
7487 (build-system python-build-system)
7488 (arguments
7489 `(#:phases
7490 (modify-phases %standard-phases
7491 (replace 'check
7492 (lambda _ (zero?
7493 (system*
7494 "python" "test_contextlib2.py" "-v")))))))
7495 (home-page "http://contextlib2.readthedocs.org/")
7496 (synopsis "Tools for decorators and context managers")
7497 (description "This module is primarily a backport of the Python
7498 3.2 contextlib to earlier Python versions. Like contextlib, it
7499 provides utilities for common tasks involving decorators and context
7500 managers. It also contains additional features that are not part of
7501 the standard library.")
7502 (license license:psfl)))
7503
7504 (define-public python2-contextlib2
7505 (package-with-python2 python-contextlib2))
7506
7507 (define-public python-texttable
7508 (package
7509 (name "python-texttable")
7510 (version "0.8.4")
7511 (source
7512 (origin
7513 (method url-fetch)
7514 (uri (pypi-uri "texttable" version))
7515 (sha256
7516 (base32
7517 "0bkhs4dx9s6g7fpb969hygq56hyz4ncfamlynw72s0n6nqfbd1w5"))))
7518 (build-system python-build-system)
7519 (arguments '(#:tests? #f)) ; no tests
7520 (home-page "https://github.com/foutaise/texttable/")
7521 (synopsis "Python module for creating simple ASCII tables")
7522 (description "Texttable is a Python module for creating simple ASCII
7523 tables.")
7524 (license license:lgpl2.1+)))
7525
7526 (define-public python2-texttable
7527 (package-with-python2 python-texttable))
7528
7529 (define-public python-websocket-client
7530 (package
7531 (name "python-websocket-client")
7532 (version "0.37.0")
7533 (source
7534 (origin
7535 (method url-fetch)
7536 (uri (pypi-uri "websocket_client" version))
7537 (sha256
7538 (base32
7539 "0h9glp1jll3z76ly3kg08aqgxqk0a68p4zi9yn50353bh5nj92v7"))))
7540 (build-system python-build-system)
7541 (native-inputs
7542 `(("python-six" ,python-six))) ; for tests
7543 (home-page "https://github.com/liris/websocket-client")
7544 (synopsis "WebSocket client for Python")
7545 (description "The Websocket-client module provides the low level APIs for
7546 WebSocket usage in Python programs.")
7547 (license license:lgpl2.1+)))
7548
7549 (define-public python2-websocket-client
7550 (package-with-python2 python-websocket-client))
7551
7552 (define-public python-atomicwrites
7553 (package
7554 (name "python-atomicwrites")
7555 (version "1.1.0")
7556 (source (origin
7557 (method url-fetch)
7558 (uri (pypi-uri "atomicwrites" version))
7559 (sha256
7560 (base32
7561 "1s01dci8arsl9d9vr5nz1fk9znldp1z3l4yl43f0c27z12b8yxl0"))))
7562 (build-system python-build-system)
7563 (synopsis "Atomic file writes in Python")
7564 (description "Library for atomic file writes using platform dependent tools
7565 for atomic file system operations.")
7566 (home-page "https://github.com/untitaker/python-atomicwrites")
7567 (license license:expat)))
7568
7569 (define-public python2-atomicwrites
7570 (package-with-python2 python-atomicwrites))
7571
7572 (define-public python-requests-toolbelt
7573 (package
7574 (name "python-requests-toolbelt")
7575 (version "0.6.2")
7576 (source (origin
7577 (method url-fetch)
7578 (uri (string-append
7579 "https://pypi.python.org/packages/"
7580 "e1/a4/a94c037bc72ad70441aff1403d3243510d2542ddca7759faaeffeb11aefe/"
7581 "requests-toolbelt-" version ".tar.gz"))
7582 (sha256
7583 (base32
7584 "15q9nrgp85nqlr4kdz1zvj8z2npafi2sr12y7fqgxbkq28j1aci6"))))
7585 (build-system python-build-system)
7586 (native-inputs
7587 `(("python-betamax" ,python-betamax)
7588 ("python-mock" ,python-mock)
7589 ("python-pytest" ,python-pytest)))
7590 (propagated-inputs
7591 `(("python-requests" ,python-requests)))
7592 (synopsis "Extensions to python-requests")
7593 (description "This is a toolbelt of useful classes and functions to be used
7594 with python-requests.")
7595 (home-page "https://github.com/sigmavirus24/requests-toolbelt")
7596 (license license:asl2.0)))
7597
7598 (define-public python-click-threading
7599 (package
7600 (name "python-click-threading")
7601 (version "0.2.0")
7602 (source (origin
7603 (method url-fetch)
7604 (uri (string-append
7605 "https://pypi.python.org/packages/"
7606 "fe/b7/e7f609d18a2a351cb71616adcf54df1acd82f83cb9b5936935a4d20e2c23/"
7607 "click-threading-" version ".tar.gz"))
7608 (sha256
7609 (base32
7610 "18bcqikxwb3drb8rf60cclxkxw52521b38ax3byah6j8cn8y9p4j"))))
7611 (build-system python-build-system)
7612 (propagated-inputs
7613 `(("python-click" ,python-click)))
7614 (synopsis "Utilities for multithreading in Click")
7615 (description "This package provides utilities for multithreading in Click
7616 applications.")
7617 (home-page "https://github.com/click-contrib/click-threading")
7618 (license license:expat)))
7619
7620 (define-public python-click-log
7621 (package
7622 (name "python-click-log")
7623 (version "0.1.3")
7624 (source (origin
7625 (method url-fetch)
7626 (uri (pypi-uri "click-log" version))
7627 (sha256
7628 (base32
7629 "0kdd1vminxpcfczxl2kkf285n0dr1gxh2cdbx1p6vkj7b7bci3gx"))))
7630 (build-system python-build-system)
7631 (propagated-inputs
7632 `(("python-click" ,python-click)))
7633 (synopsis "Logging for click applications")
7634 (description "This package provides a Python library for logging Click
7635 applications.")
7636 (home-page "https://github.com/click-contrib/click-log")
7637 (license license:expat)))
7638
7639 (define-public python-apipkg
7640 (package
7641 (name "python-apipkg")
7642 (version "1.4")
7643 (source (origin
7644 (method url-fetch)
7645 (uri (pypi-uri "apipkg" version))
7646 (sha256
7647 (base32
7648 "1iks5701qnp3dlr3q1d9qm68y2plp2m029irhpz92a44psfkjf1f"))))
7649 (build-system python-build-system)
7650 (native-inputs
7651 `(("python-pytest" ,python-pytest)))
7652 (synopsis "Namespace control and lazy-import mechanism")
7653 (description "With apipkg you can control the exported namespace of a Python
7654 package and greatly reduce the number of imports for your users. It is a small
7655 pure Python module that works on virtually all Python versions.")
7656 (home-page "https://bitbucket.org/hpk42/apipkg")
7657 (license license:expat)))
7658
7659 (define-public python2-apipkg
7660 (package-with-python2 python-apipkg))
7661
7662 (define-public python-execnet
7663 (package
7664 (name "python-execnet")
7665 (version "1.4.1")
7666 (source (origin
7667 (method url-fetch)
7668 (uri (pypi-uri "execnet" version))
7669 (sha256
7670 (base32
7671 "1rpk1vyclhg911p3hql0m0nrpq7q7mysxnaaw6vs29cpa6kx8vgn"))))
7672 (build-system python-build-system)
7673 (arguments
7674 `(;; 2 failed, 275 passed, 670 skipped, 4 xfailed
7675 ;; The two test failures are caused by the lack of an `ssh` executable.
7676 ;; The test suite can be run with pytest after the 'install' phase.
7677 #:tests? #f))
7678 (native-inputs
7679 `(("python-pytest" ,python-pytest)
7680 ("python-setuptools-scm" ,python-setuptools-scm)))
7681 (propagated-inputs
7682 `(("python-apipkg" ,python-apipkg)))
7683 (synopsis "Rapid multi-Python deployment")
7684 (description "Execnet provides a share-nothing model with
7685 channel-send/receive communication for distributing execution across many
7686 Python interpreters across version, platform and network barriers. It has a
7687 minimal and fast API targetting the following uses:
7688 @enumerate
7689 @item distribute tasks to (many) local or remote CPUs
7690 @item write and deploy hybrid multi-process applications
7691 @item write scripts to administer multiple environments
7692 @end enumerate")
7693 (home-page "http://codespeak.net/execnet/")
7694 (license license:expat)))
7695
7696 (define-public python2-execnet
7697 (package-with-python2 python-execnet))
7698
7699 ;;; The software provided by this package was integrated into pytest 2.8.
7700 (define-public python-pytest-cache
7701 (package
7702 (name "python-pytest-cache")
7703 (version "1.0")
7704 (source (origin
7705 (method url-fetch)
7706 (uri (pypi-uri "pytest-cache" version))
7707 (sha256
7708 (base32
7709 "1a873fihw4rhshc722j4h6j7g3nj7xpgsna9hhg3zn6ksknnhx5y"))))
7710 (build-system python-build-system)
7711 (propagated-inputs
7712 `(("python-apipkg" ,python-apipkg)
7713 ("python-execnet" ,python-execnet)
7714 ("python-py" ,python-py)
7715 ("python-pytest" ,python-pytest)))
7716 (synopsis "Py.test plugin with mechanisms for caching across test runs")
7717 (description "The pytest-cache plugin provides tools to rerun failures from
7718 the last py.test invocation.")
7719 (home-page "https://bitbucket.org/hpk42/pytest-cache/")
7720 (license license:expat)))
7721
7722 (define-public python2-pytest-cache
7723 (package-with-python2 python-pytest-cache))
7724
7725 (define-public python-pytest-localserver
7726 (package
7727 (name "python-pytest-localserver")
7728 (version "0.3.5")
7729 (source (origin
7730 (method url-fetch)
7731 (uri (pypi-uri "pytest-localserver" version))
7732 (sha256
7733 (base32
7734 "0dvqspjr6va55zwmnnc2mmpqc7mm65kxig9ya44x1z8aadzxpa4p"))))
7735 (build-system python-build-system)
7736 (arguments
7737 `(#:phases (modify-phases %standard-phases
7738 (replace 'check
7739 (lambda _
7740 (zero? (system* "py.test" "--genscript=runtests.py"))
7741 (zero? (system* "py.test")))))))
7742 (native-inputs
7743 `(("python-pytest" ,python-pytest)
7744 ("python-requests" ,python-requests)
7745 ("python-six" ,python-six)))
7746 (propagated-inputs
7747 `(("python-werkzeug" ,python-werkzeug)))
7748 (synopsis "Py.test plugin to test server connections locally")
7749 (description "Pytest-localserver is a plugin for the pytest testing
7750 framework which enables you to test server connections locally.")
7751 (home-page "https://pypi.python.org/pypi/pytest-localserver")
7752 (license license:expat)))
7753
7754 (define-public python-wsgi-intercept
7755 (package
7756 (name "python-wsgi-intercept")
7757 (version "1.2.2")
7758 (source (origin
7759 (method url-fetch)
7760 (uri (string-append
7761 "https://pypi.python.org/packages/"
7762 "38/76/ebcbc24d0cb77db34520a3ca6ed1bd43ace17d182bbd8dd7d976f1c176fb/"
7763 "wsgi_intercept-" version ".tar.gz"))
7764 (sha256
7765 (base32
7766 "0kjj2v2dvmnpdd5h5gk9rzz0f54rhjb0yiz3zg65bmp65slfw65d"))))
7767 (build-system python-build-system)
7768 (native-inputs
7769 `(("python-pytest" ,python-pytest)
7770 ("python-six" ,python-six)
7771 ("python-urllib3" ,python-urllib3)))
7772 (propagated-inputs
7773 `(("python-httplib2" ,python-httplib2)
7774 ("python-requests" ,python-requests)))
7775 (synopsis "Puts a WSGI application in place of a real URI for testing")
7776 (description "Wsgi_intercept installs a WSGI application in place of a real
7777 URI for testing. Testing a WSGI application normally involves starting a
7778 server at a local host and port, then pointing your test code to that address.
7779 Instead, this library lets you intercept calls to any specific host/port
7780 combination and redirect them into a WSGI application importable by your test
7781 program. Thus, you can avoid spawning multiple processes or threads to test
7782 your Web app.")
7783 (home-page "https://github.com/cdent/wsgi-intercept")
7784 (license license:expat)))
7785
7786 (define-public python-pytest-xprocess
7787 (package
7788 (name "python-pytest-xprocess")
7789 (version "0.9.1")
7790 (source (origin
7791 (method url-fetch)
7792 (uri (pypi-uri "pytest-xprocess" version))
7793 (sha256
7794 (base32
7795 "17zlql1xqw3ywcgwwbqmw633aly99lab12hm02asr8awvg5603pp"))))
7796 (build-system python-build-system)
7797 (propagated-inputs
7798 `(("python-pytest" ,python-pytest)
7799 ("python-pytest-cache" ,python-pytest-cache)
7800 ("python-psutil" ,python-psutil)))
7801 (synopsis "Pytest plugin to manage external processes across test runs")
7802 (description "Pytest-xprocess is an experimental py.test plugin for managing
7803 processes across test runs.")
7804 (home-page "https://bitbucket.org/pytest-dev/pytest-xprocess")
7805 (license license:expat)))
7806
7807 (define-public python-icalendar
7808 (package
7809 (name "python-icalendar")
7810 (version "3.10")
7811 (source (origin
7812 (method url-fetch)
7813 (uri (pypi-uri "icalendar" version))
7814 (sha256
7815 (base32
7816 "01amnk3621s7fagfla86npd25knbqirchg7h1jpqxqp103d02bs7"))))
7817 (build-system python-build-system)
7818 (propagated-inputs
7819 `(("python-dateutil-2" ,python-dateutil-2)
7820 ("python-pytz" ,python-pytz)))
7821 (synopsis "Python library for parsing iCalendar files")
7822 (description "The icalendar package is a parser/generator of iCalendar
7823 files for use with Python.")
7824 (home-page "https://github.com/collective/icalendar")
7825 (license license:bsd-2)))
7826
7827 (define-public python-sphinxcontrib-newsfeed
7828 (package
7829 (name "python-sphinxcontrib-newsfeed")
7830 (version "0.1.4")
7831 (source (origin
7832 (method url-fetch)
7833 (uri (pypi-uri "sphinxcontrib-newsfeed" version))
7834 (sha256
7835 (base32
7836 "1d7gam3mn8v4in4p16yn3v10vps7nnaz6ilw99j4klij39dqd37p"))))
7837 (build-system python-build-system)
7838 (propagated-inputs
7839 `(("python-docutils" ,python-docutils)
7840 ("python-sphinx" ,python-sphinx)))
7841 (synopsis "News Feed extension for Sphinx")
7842 (description "Sphinxcontrib-newsfeed is an extension for adding a simple
7843 Blog, News or Announcements section to a Sphinx website.")
7844 (home-page "https://bitbucket.org/prometheus/sphinxcontrib-newsfeed")
7845 (license license:bsd-2)))
7846
7847 (define-public python-args
7848 (package
7849 (name "python-args")
7850 (version "0.1.0")
7851 (source (origin
7852 (method url-fetch)
7853 (uri (pypi-uri "args" version))
7854 (sha256
7855 (base32
7856 "057qzi46h5dmxdqknsbrssn78lmqjlnm624iqdhrnpk26zcbi1d7"))))
7857 (build-system python-build-system)
7858 (home-page "https://github.com/kennethreitz/args")
7859 (synopsis "Command-line argument parser")
7860 (description
7861 "This library provides a Python module to parse command-line arguments.")
7862 (license license:bsd-3)))
7863
7864 (define-public python2-args
7865 (package-with-python2 python-args))
7866
7867 (define-public python-clint
7868 (package
7869 (name "python-clint")
7870 (version "0.5.1")
7871 (source (origin
7872 (method url-fetch)
7873 (uri (pypi-uri "clint" version))
7874 (sha256
7875 (base32
7876 "1an5lkkqk1zha47198p42ji3m94xmzx1a03dn7866m87n4r4q8h5"))))
7877 (build-system python-build-system)
7878 (propagated-inputs
7879 `(("python-args" ,python-args)))
7880 (home-page "https://github.com/kennethreitz/clint")
7881 (synopsis "Command-line interface tools")
7882 (description
7883 "Clint is a Python module filled with a set of tools for developing
7884 command-line applications, including tools for colored and indented
7885 output, progress bar display, and pipes.")
7886 (license license:isc)))
7887
7888 (define-public python2-clint
7889 (package-with-python2 python-clint))
7890
7891 (define-public python-astor
7892 (package
7893 (name "python-astor")
7894 (version "0.5")
7895 (source (origin
7896 (method url-fetch)
7897 (uri (pypi-uri "astor" version))
7898 (sha256
7899 (base32
7900 "1fdafq5hkis1fxqlmhw0sn44zp2ar46nxhbc22cvwg7hsd8z5gsa"))))
7901 (build-system python-build-system)
7902 (home-page "https://github.com/berkerpeksag/astor")
7903 (synopsis "Read and write Python ASTs")
7904 (description
7905 "Astor is designed to allow easy manipulation of Python source via the
7906 Abstract Syntax Tree.")
7907 (license license:bsd-3)))
7908
7909 (define-public python2-astor
7910 (package-with-python2 python-astor))
7911
7912 (define-public python-rply
7913 (package
7914 (name "python-rply")
7915 (version "0.7.4")
7916 (source (origin
7917 (method url-fetch)
7918 (uri (pypi-uri "rply" version))
7919 (sha256
7920 (base32
7921 "12rp1d9ba7nvd5rhaxi6xzx1rm67r1k1ylsrkzhpwnphqpb06cvj"))))
7922 (build-system python-build-system)
7923 (propagated-inputs
7924 `(("python-appdirs" ,python-appdirs)))
7925 (home-page "https://github.com/alex/rply")
7926 (synopsis "Parser generator for Python")
7927 (description
7928 "This package provides a pure Python based parser generator, that also
7929 works with RPython. It is a more-or-less direct port of David Bazzley's PLY,
7930 with a new public API, and RPython support.")
7931 (license license:bsd-3)))
7932
7933 (define-public python2-rply
7934 (package-with-python2 python-rply))
7935
7936 (define-public python-hy
7937 (package
7938 (name "python-hy")
7939 (version "0.11.1")
7940 (source (origin
7941 (method url-fetch)
7942 (uri (pypi-uri "hy" version))
7943 (sha256
7944 (base32
7945 "1msqv747iz12r73mz4qvsmlwkddwjvrahlrk7ysrcz07h7dsscxs"))))
7946 (build-system python-build-system)
7947 (propagated-inputs
7948 `(("python-astor" ,python-astor)
7949 ("python-clint" ,python-clint)
7950 ("python-rply" ,python-rply)))
7951 (home-page "http://hylang.org/")
7952 (synopsis "Lisp frontend to Python")
7953 (description
7954 "Hy is a dialect of Lisp that's embedded in Python. Since Hy transforms
7955 its Lisp code into the Python Abstract Syntax Tree, you have the whole world of
7956 Python at your fingertips, in Lisp form.")
7957 (license license:expat)))
7958
7959 (define-public python2-hy
7960 (package-with-python2 python-hy))
7961
7962 (define-public python-rauth
7963 (package
7964 (name "python-rauth")
7965 (version "0.7.2")
7966 (source
7967 (origin
7968 (method url-fetch)
7969 (uri (pypi-uri "rauth" version))
7970 (sha256
7971 (base32
7972 "00pq7zw429hhza9c0qzxiqp77m653jv09z92nralnmzwdf6pzicf"))))
7973 (build-system python-build-system)
7974 (arguments
7975 `(#:test-target "check"))
7976 (propagated-inputs
7977 `(("python-requests" ,python-requests)))
7978 (home-page "https://github.com/litl/rauth")
7979 (synopsis "Python library for OAuth 1.0/a, 2.0, and Ofly")
7980 (description
7981 "Rauth is a Python library for OAuth 1.0/a, 2.0, and Ofly. It also
7982 provides service wrappers for convenient connection initialization and
7983 authenticated session objects providing things like keep-alive.")
7984 (license license:expat)
7985 (properties `((python2-variant . ,(delay python2-rauth))))))
7986
7987 (define-public python2-rauth
7988 (let ((base (package-with-python2 (strip-python2-variant python-rauth))))
7989 (package
7990 (inherit base)
7991 (native-inputs `(("python2-unittest2" ,python2-unittest2)
7992 ,@(package-native-inputs base))))))
7993
7994 (define-public python2-functools32
7995 (package
7996 (name "python2-functools32")
7997 (version "3.2.3-2")
7998 (source
7999 (origin
8000 (method url-fetch)
8001 (uri (pypi-uri "functools32" version))
8002 (sha256
8003 (base32
8004 "0v8ya0b58x47wp216n1zamimv4iw57cxz3xxhzix52jkw3xks9gn"))))
8005 (build-system python-build-system)
8006 (arguments
8007 `(#:python ,python-2
8008 #:tests? #f)) ; no test target
8009 (home-page "https://github.com/MiCHiLU/python-functools32")
8010 (synopsis
8011 "Backport of the functools module from Python 3.2.3")
8012 (description
8013 "This package is a backport of the @code{functools} module from Python
8014 3.2.3 for use with older versions of Python and PyPy.")
8015 (license license:expat)))
8016
8017 (define-public python2-futures
8018 (package
8019 (name "python2-futures")
8020 (version "3.0.3")
8021 (source
8022 (origin
8023 (method url-fetch)
8024 (uri (pypi-uri "futures" version))
8025 (sha256
8026 (base32
8027 "1vcb34dqhzkhbq1957vdjszhhm5y3j9ba88dgwhqx2zynhmk9qig"))))
8028 (build-system python-build-system)
8029 (arguments `(#:python ,python-2))
8030 (home-page "https://github.com/agronholm/pythonfutures")
8031 (synopsis
8032 "Backport of the concurrent.futures package from Python 3.2")
8033 (description
8034 "The concurrent.futures module provides a high-level interface for
8035 asynchronously executing callables. This package backports the
8036 concurrent.futures package from Python 3.2")
8037 (license license:bsd-3)))
8038
8039 (define-public python-promise
8040 (package
8041 (name "python-promise")
8042 (version "0.4.2")
8043 (source
8044 (origin
8045 (method url-fetch)
8046 (uri (pypi-uri "promise" version))
8047 (sha256
8048 (base32
8049 "1k19ms8l3d5jzjh557rgkxb5sg4mqgfc315rn4hx1z3n8qq6lr3h"))))
8050 (build-system python-build-system)
8051 ;; Tests wants python-futures, which is a python2 only program, and
8052 ;; can't be found by python-promise at test time.
8053 (arguments `(#:tests? #f))
8054 (home-page "https://github.com/syrusakbary/promise")
8055 (synopsis "Promises/A+ implementation for Python")
8056 (description
8057 "Promises/A+ implementation for Python")
8058 (properties `((python2-variant . ,(delay python2-promise))))
8059 (license license:expat)))
8060
8061 (define-public python2-promise
8062 (let ((promise (package-with-python2
8063 (strip-python2-variant python-promise))))
8064 (package (inherit promise)
8065 (arguments (substitute-keyword-arguments (package-arguments promise)
8066 ((#:tests? _) #t)))
8067 (native-inputs
8068 `(("python2-futures" ,python2-futures)
8069 ("python2-pytest" ,python2-pytest)
8070 ,@(package-native-inputs promise))))))
8071
8072 (define-public python-urllib3
8073 (package
8074 (name "python-urllib3")
8075 (version "1.18.1")
8076 (source
8077 (origin
8078 (method url-fetch)
8079 (uri (pypi-uri "urllib3" version))
8080 (sha256
8081 (base32
8082 "1wb8aqnq53vzh2amrv8kc66f3h6fx217y0q62y6n30a64p2yqmam"))))
8083 (build-system python-build-system)
8084 (arguments `(#:tests? #f))
8085 (native-inputs
8086 `(;; some packages for tests
8087 ("python-nose" ,python-nose)
8088 ("python-mock" ,python-mock)
8089 ("python-tornado" ,python-tornado)))
8090 (propagated-inputs
8091 `(;; packages for https security
8092 ("python-certifi" ,python-certifi)
8093 ("python-ndg-httpsclient" ,python-ndg-httpsclient)
8094 ("python-pyasn1" ,python-pyasn1)
8095 ("python-pyopenssl" ,python-pyopenssl)))
8096 (home-page "https://urllib3.readthedocs.org/")
8097 (synopsis "HTTP library with thread-safe connection pooling")
8098 (description
8099 "Urllib3 supports features left out of urllib and urllib2 libraries. It
8100 can reuse the same socket connection for multiple requests, it can POST files,
8101 supports url redirection and retries, and also gzip and deflate decoding.")
8102 (license license:expat)))
8103
8104 (define-public python2-urllib3
8105 (package-with-python2 python-urllib3))
8106
8107 (define-public python-colorama
8108 (package
8109 (name "python-colorama")
8110 (version "0.3.3")
8111 (source
8112 (origin
8113 (method url-fetch)
8114 (uri (pypi-uri "colorama" version))
8115 (sha256
8116 (base32
8117 "1716z9pq1r5ys3nkg7wdrb3h2f9rmd0zdxpxzmx3bgwgf6xg48gb"))))
8118 (build-system python-build-system)
8119 (synopsis "colored terminal text rendering for Python")
8120 (description "Colorama is a Python library for rendering colored terminal
8121 text.")
8122 (home-page "https://pypi.python.org/pypi/colorama")
8123 (license license:bsd-3)))
8124
8125 (define-public python2-colorama
8126 (package-with-python2 python-colorama))
8127
8128 (define-public python-rsa
8129 (package
8130 (name "python-rsa")
8131 (version "3.4.2")
8132 (source
8133 (origin
8134 (method url-fetch)
8135 (uri (pypi-uri "rsa" version))
8136 (sha256
8137 (base32
8138 "1dcxvszbikgzh99ybdc7jq0zb9wspy2ds8z9mjsqiyv3q884xpr5"))))
8139 (build-system python-build-system)
8140 (propagated-inputs
8141 `(("python-pyasn1" ,python-pyasn1)))
8142 (synopsis "Pure-Python RSA implementation")
8143 (description "Python-RSA is a pure-Python RSA implementation. It supports
8144 encryption and decryption, signing and verifying signatures, and key
8145 generation according to PKCS#1 version 1.5. It can be used as a Python
8146 library as well as on the command line.")
8147 (home-page "http://stuvel.eu/rsa")
8148 (license license:asl2.0)))
8149
8150 (define-public python2-rsa
8151 (package-with-python2 python-rsa))
8152
8153 (define-public python-pluggy
8154 (package
8155 (name "python-pluggy")
8156 (version "0.3.1")
8157 (source
8158 (origin
8159 (method url-fetch)
8160 (uri (pypi-uri "pluggy" version))
8161 (sha256
8162 (base32
8163 "18qfzfm40bgx672lkg8q9x5hdh76n7vax99aank7vh2nw21wg70m"))))
8164 (build-system python-build-system)
8165 (synopsis "Plugin and hook calling mechanism for Python")
8166 (description "Pluggy is an extraction of the plugin manager as used by
8167 Pytest but stripped of Pytest specific details.")
8168 (home-page "https://pypi.python.org/pypi/pluggy")
8169 (license license:expat)))
8170
8171 (define-public python2-pluggy
8172 (package-with-python2 python-pluggy))
8173
8174 (define-public python-tox
8175 (package
8176 (name "python-tox")
8177 (version "2.3.1")
8178 (source
8179 (origin
8180 (method url-fetch)
8181 (uri (pypi-uri "tox" version))
8182 (sha256
8183 (base32
8184 "1vj73ar4rimq3fwy5r2z3jv4g9qbh8rmpmncsc00g0k310acqzxz"))))
8185 (build-system python-build-system)
8186 (arguments
8187 ;; FIXME: Tests require a newer version of pytest, but upgrading our
8188 ;; pytest breaks other packages.
8189 '(#:tests? #f))
8190 (propagated-inputs
8191 `(("python-pluggy" ,python-pluggy) ; >=0.3.0,<0.4.0
8192 ("python-py" ,python-py)
8193 ("python-virtualenv" ,python-virtualenv)))
8194 (native-inputs
8195 `(("python-pytest" ,python-pytest))) ; >= 2.3.5
8196 (home-page "http://tox.testrun.org/")
8197 (synopsis "Virtualenv-based automation of test activities")
8198 (description "Tox is a generic virtualenv management and test command line
8199 tool. It can be used to check that a package installs correctly with
8200 different Python versions and interpreters, or run tests in each type of
8201 supported environment, or act as a frontend to continuous integration
8202 servers.")
8203 (license license:expat)))
8204
8205 (define-public python2-tox
8206 (package-with-python2 python-tox))
8207
8208 (define-public python-jmespath
8209 (package
8210 (name "python-jmespath")
8211 (version "0.9.0")
8212 (source
8213 (origin
8214 (method url-fetch)
8215 (uri (pypi-uri "jmespath" version))
8216 (sha256
8217 (base32
8218 "0g9xvl69y7nr3w7ag4fsp6sm4fqf6vrqjw7504x2hzrrsh3ampq8"))))
8219 (build-system python-build-system)
8220 (synopsis "JSON Matching Expressions")
8221 (description "JMESPath (pronounced “james path”) is a Python library that
8222 allows one to declaratively specify how to extract elements from a JSON
8223 document.")
8224 (home-page "https://github.com/jmespath/jmespath.py")
8225 (license license:expat)))
8226
8227 (define-public python2-jmespath
8228 (package-with-python2 python-jmespath))
8229
8230 (define-public python-botocore
8231 (package
8232 (name "python-botocore")
8233 (version "1.4.62")
8234 (source
8235 (origin
8236 (method url-fetch)
8237 (uri (pypi-uri "botocore" version))
8238 (sha256
8239 (base32
8240 "1zxczlwqy9bl27d9bc5x99mb5mcsxm350240lp5nx7014xb311lj"))))
8241 (build-system python-build-system)
8242 (propagated-inputs
8243 `(("python-dateutil" ,python-dateutil-2)
8244 ("python-docutils" ,python-docutils)
8245 ("python-jmespath" ,python-jmespath)))
8246 (inputs
8247 `(("python-mock" ,python-mock)
8248 ("python-nose" ,python-nose)
8249 ("behave" ,behave)
8250 ("python-tox" ,python-tox)
8251 ("python-wheel" ,python-wheel)))
8252 (home-page "https://github.com/boto/botocore")
8253 (synopsis "Low-level interface to AWS")
8254 (description "Botocore is a Python library that provides a low-level
8255 interface to the Amazon Web Services (AWS) API.")
8256 (license license:asl2.0)))
8257
8258 (define-public python2-botocore
8259 (package-with-python2 python-botocore))
8260
8261 (define-public awscli
8262 (package
8263 (name "awscli")
8264 (version "1.11.5")
8265 (source
8266 (origin
8267 (method url-fetch)
8268 (uri (pypi-uri name version))
8269 (sha256
8270 (base32
8271 "0lclasm0wnayd3b8zl9l91i32nbgrhh0ncf9lksss4cv0myfwmfg"))))
8272 (build-system python-build-system)
8273 (propagated-inputs
8274 `(("python-colorama" ,python-colorama)
8275 ("python-botocore" ,python-botocore)
8276 ("python-s3transfer" ,python-s3transfer)
8277 ("python-docutils" ,python-docutils)
8278 ("python-rsa" ,python-rsa)))
8279 (inputs
8280 `(("python-mock" ,python-mock)
8281 ("python-nose" ,python-nose)
8282 ("python-sphinx" ,python-sphinx)
8283 ("python-tox" ,python-tox)
8284 ("python-wheel" ,python-wheel)))
8285 (home-page "http://aws.amazon.com/cli/")
8286 (synopsis "Command line client for AWS")
8287 (description "AWS CLI provides a unified command line interface to the
8288 Amazon Web Services (AWS) API.")
8289 (license license:asl2.0)))
8290
8291 (define-public python-hypothesis
8292 (package
8293 (name "python-hypothesis")
8294 (version "3.1.0")
8295 (source (origin
8296 (method url-fetch)
8297 (uri (pypi-uri "hypothesis" version))
8298 (sha256
8299 (base32
8300 "0qyqq9akm4vshhn8cngjc1qykcvsn7cz6dlm6njfsgpbraqrmbbw"))))
8301 (build-system python-build-system)
8302 (propagated-inputs
8303 `(("python-flake8" ,python-flake8)
8304 ("python-pytest" ,python-pytest)))
8305 (synopsis "Library for property based testing")
8306 (description "Hypothesis is a library for testing your Python code against a
8307 much larger range of examples than you would ever want to write by hand. It’s
8308 based on the Haskell library, Quickcheck, and is designed to integrate
8309 seamlessly into your existing Python unit testing work flow.")
8310 (home-page "https://github.com/DRMacIver/hypothesis")
8311 (license license:mpl2.0)
8312 (properties `((python2-variant . ,(delay python2-hypothesis))))))
8313
8314 (define-public python2-hypothesis
8315 (let ((hypothesis (package-with-python2
8316 (strip-python2-variant python-hypothesis))))
8317 (package (inherit hypothesis)
8318 (native-inputs
8319 `(("python2-enum34" ,python2-enum34))))))
8320
8321 (define-public python-pytest-subtesthack
8322 (package
8323 (name "python-pytest-subtesthack")
8324 (version "0.1.1")
8325 (source (origin
8326 (method url-fetch)
8327 (uri (pypi-uri "pytest-subtesthack" version))
8328 (sha256
8329 (base32
8330 "15kzcr5pchf3id4ikdvlv752rc0j4d912n589l4rifp8qsj19l1x"))))
8331 (build-system python-build-system)
8332 (propagated-inputs
8333 `(("python-pytest" ,python-pytest)))
8334 (synopsis "Set-up and tear-down fixtures for unit tests")
8335 (description "This plugin allows you to set up and tear down fixtures within
8336 unit test functions that use @code{py.test}. This is useful for using
8337 @command{hypothesis} inside py.test, as @command{hypothesis} will call the test
8338 function multiple times, without setting up or tearing down fixture state as is
8339 normally the case.")
8340 (home-page "https://github.com/untitaker/pytest-subtesthack/")
8341 (license license:unlicense)))
8342
8343 (define-public python2-pytest-subtesthack
8344 (package-with-python2 python-pytest-subtesthack))
8345
8346 (define-public python2-xdo
8347 (package
8348 (name "python2-xdo")
8349 (version "0.2")
8350 (source (origin
8351 (method url-fetch)
8352 (uri (string-append
8353 "http://http.debian.net/debian/pool/main/p/python-xdo/"
8354 "python-xdo_" version ".orig.tar.gz"))
8355 (sha256
8356 (base32
8357 "1kl5c1p0dyxf62plnk6fl77ycfb4whwjms16r14dxx8kn90hlqz4"))))
8358 (build-system python-build-system)
8359 (arguments
8360 `(#:python ,python-2
8361 #:tests? #f)) ; no tests provided
8362 (inputs
8363 `(("xdotool" ,xdotool)
8364 ("libX11" ,libx11)))
8365 (home-page "https://tracker.debian.org/pkg/python-xdo")
8366 (synopsis "Python library for simulating X11 keyboard/mouse input")
8367 (description "Provides bindings to libxdo for manipulating X11 via simulated
8368 input. (Note that this is mostly a legacy library; you may wish to look at
8369 python-xdo for newer bindings.)")
8370 (license license:bsd-3)))
8371
8372 (define-public python-wtforms
8373 (package
8374 (name "python-wtforms")
8375 (version "2.1")
8376 (source
8377 (origin
8378 (method url-fetch)
8379 (uri (pypi-uri "WTForms" version ".zip"))
8380 (sha256
8381 (base32
8382 "0vyl26y9cg409cfyj8rhqxazsdnd0jipgjw06civhrd53yyi1pzz"))))
8383 (build-system python-build-system)
8384 (arguments
8385 '(#:phases
8386 (modify-phases %standard-phases
8387 (add-after 'unpack 'remove-django-test
8388 ;; Don't fail the tests when the inputs for the optional tests cannot be found.
8389 (lambda _
8390 (substitute*
8391 "tests/runtests.py"
8392 (("'ext_django.tests', 'ext_sqlalchemy', 'ext_dateutil', 'locale_babel'") "")
8393 (("sys.stderr.write(\"### Disabled test '%s', dependency not found\n\" % name)") ""))
8394 #t)))))
8395 (native-inputs
8396 `(("unzip" ,unzip)))
8397 (home-page "http://wtforms.simplecodes.com/")
8398 (synopsis
8399 "Form validation and rendering library for Python web development")
8400 (description
8401 "WTForms is a flexible forms validation and rendering library
8402 for Python web development. It is very similar to the web form API
8403 available in Django, but is a standalone package.")
8404 (license license:bsd-3)))
8405
8406 (define-public python2-wtforms
8407 (package-with-python2 python-wtforms))
8408
8409 (define-public python-mako
8410 (package
8411 (name "python-mako")
8412 (version "1.0.3")
8413 (source
8414 (origin
8415 (method url-fetch)
8416 (uri (pypi-uri "Mako" version))
8417 (sha256
8418 (base32
8419 "136kcjbs0s98qkx8a418b05dfblqp0kiiqyx8vhx4rarwc7bqi3n"))))
8420 (build-system python-build-system)
8421 (propagated-inputs
8422 `(("python-markupsafe" ,python-markupsafe)))
8423 (native-inputs
8424 `(("python-mock" ,python-mock)
8425 ("python-nose" ,python-nose)))
8426 (home-page "http://www.makotemplates.org/")
8427 (synopsis "Templating language for Python")
8428 (description "Mako is a templating language for Python that compiles
8429 templates into Python modules.")
8430 (license license:expat)))
8431
8432 (define-public python2-mako
8433 (package-with-python2 python-mako))
8434
8435 (define-public python-waitress
8436 (package
8437 (name "python-waitress")
8438 (version "0.8.10")
8439 (source
8440 (origin
8441 (method url-fetch)
8442 (uri (pypi-uri "waitress" version))
8443 (sha256
8444 (base32
8445 "017n9ra6vvmq9d5sfhdzyzr1mg15x2hj2dhm4pdlw98c1ypw2h3w"))))
8446 (build-system python-build-system)
8447 (home-page "https://github.com/Pylons/waitress")
8448 (synopsis "Waitress WSGI server")
8449 (description "Waitress is meant to be a production-quality pure-Python WSGI
8450 server with very acceptable performance.")
8451 (license license:zpl2.1)))
8452
8453 (define-public python2-waitress
8454 (package-with-python2 python-waitress))
8455
8456 (define-public python-wsgiproxy2
8457 (package
8458 (name "python-wsgiproxy2")
8459 (version "0.4.2")
8460 (source
8461 (origin
8462 (method url-fetch)
8463 (uri (pypi-uri "WSGIProxy2" version ".zip"))
8464 (sha256
8465 (base32
8466 "13kf9bdxrc95y9vriaz0viry3ah11nz4rlrykcfvb8nlqpx3dcm4"))))
8467 (build-system python-build-system)
8468 (arguments
8469 '(;; Wsgiproxy2's test suite requires Restkit, which does not yet fully
8470 ;; support Python 3:
8471 ;; https://github.com/benoitc/restkit/issues/140
8472 #:tests? #f))
8473 (native-inputs
8474 `(("unzip" ,unzip)
8475 ("python-nose" ,python-nose)
8476 ("python-coverage" ,python-coverage)))
8477 (propagated-inputs
8478 `(("python-six" ,python-six)
8479 ("python-webob" ,python-webob)))
8480 (home-page
8481 "https://github.com/gawel/WSGIProxy2/")
8482 (synopsis "WSGI Proxy with various http client backends")
8483 (description "WSGI turns HTTP requests into WSGI function calls.
8484 WSGIProxy turns WSGI function calls into HTTP requests.
8485 It also includes code to sign requests and pass private data,
8486 and to spawn subprocesses to handle requests.")
8487 (license license:expat)))
8488
8489 (define-public python2-wsgiproxy2
8490 (package-with-python2 python-wsgiproxy2))
8491
8492 (define-public python-pastedeploy
8493 (package
8494 (name "python-pastedeploy")
8495 (version "1.5.2")
8496 (source
8497 (origin
8498 (method url-fetch)
8499 (uri (pypi-uri "PasteDeploy" version))
8500 (sha256
8501 (base32
8502 "1jz3m4hq8v6hyhfjz9425nd3nvn52cvbfipdcd72krjmla4qz1fm"))))
8503 (build-system python-build-system)
8504 (native-inputs
8505 `(("python-nose" ,python-nose)))
8506 ;; Note: setuptools used at runtime for pkg_resources
8507 (home-page "http://pythonpaste.org/deploy/")
8508 (synopsis
8509 "Load, configure, and compose WSGI applications and servers")
8510 (description
8511 "This tool provides code to load WSGI applications and servers from URIs;
8512 these URIs can refer to Python Eggs for INI-style configuration files. Paste
8513 Script provides commands to serve applications based on this configuration
8514 file.")
8515 (license license:expat)))
8516
8517 (define-public python2-pastedeploy
8518 (package-with-python2 python-pastedeploy))
8519
8520 (define-public python-paste
8521 (package
8522 (name "python-paste")
8523 (version "2.0.2")
8524 (source
8525 (origin
8526 (method url-fetch)
8527 (uri (pypi-uri "Paste" version))
8528 (sha256
8529 (base32
8530 "16dsv9qi0r4qsrsb6dilpq2rx0fnglvh36flzywcdnm2jg43mb5d"))
8531 (patches (search-patches "python-paste-remove-website-test.patch"
8532 "python-paste-remove-timing-test.patch"))))
8533 (build-system python-build-system)
8534 (native-inputs
8535 `(("python-nose" ,python-nose)))
8536 ;; Note: setuptools used at runtime for pkg_resources
8537 (propagated-inputs
8538 `(("python-six" ,python-six)))
8539 (arguments
8540 '(;; Tests don't pass on Python 3, but work fine on Python 2.
8541 ;; (As of 2.0.2, Python 3 support in Paste is presently a bit broken,
8542 ;; but is usable enough for the minimal amount it's used in MediaGoblin
8543 ;; still... things should be better by the next Paste release.)
8544 #:tests? #f))
8545 (home-page "http://pythonpaste.org")
8546 (synopsis
8547 "Python web development tools, focusing on WSGI")
8548 (description
8549 "Paste provides a variety of web development tools and middleware which
8550 can be nested together to build web applications. Paste's design closely
8551 follows ideas flowing from WSGI (Web Standard Gateway Interface).")
8552 (license license:expat)
8553 (properties `((python2-variant . ,(delay python2-paste))))))
8554
8555 (define-public python2-paste
8556 (let ((paste (package-with-python2
8557 (strip-python2-variant python-paste))))
8558 (package
8559 (inherit paste)
8560 (arguments
8561 ;; Tests are back for Python 2!
8562 `(#:tests? #t
8563 ,@(package-arguments paste))))))
8564
8565 (define-public python-pastescript
8566 (package
8567 (name "python-pastescript")
8568 (version "2.0.2")
8569 (source
8570 (origin
8571 (method url-fetch)
8572 (uri (pypi-uri "PasteScript" version))
8573 (sha256
8574 (base32
8575 "1h3nnhn45kf4pbcv669ik4faw04j58k8vbj1hwrc532k0nc28gy0"))))
8576 (build-system python-build-system)
8577 (native-inputs
8578 `(("python-nose" ,python-nose)))
8579 ;; Note: setuptools used at runtime for pkg_resources
8580 (propagated-inputs
8581 `(("python-paste" ,python-paste)
8582 ("python-pastedeploy" ,python-pastedeploy)))
8583 (home-page "http://pythonpaste.org/script/")
8584 (arguments
8585 '(;; Unfortunately, this requires the latest unittest2,
8586 ;; but that requires traceback2 which requires linecache2 which requires
8587 ;; unittest2. So we're skipping tests for now.
8588 ;; (Note: Apparently linetest2 only needs unittest2 for its tests,
8589 ;; so in theory we could get around this situation somehow.)
8590 #:tests? #f))
8591 (synopsis
8592 "Pluggable command line tool for serving web applications and more")
8593 (description
8594 "PasteScript is a plugin-friendly command line tool which provides a
8595 variety of features, from launching web applications to bootstrapping project
8596 layouts.")
8597 (license license:expat)))
8598
8599 (define-public python2-pastescript
8600 (package-with-python2 python-pastescript))
8601
8602 (define-public python-pyquery
8603 (package
8604 (name "python-pyquery")
8605 (version "1.2.13")
8606 (source
8607 (origin
8608 (method url-fetch)
8609 (uri (pypi-uri "pyquery" version))
8610 (sha256
8611 (base32
8612 "0j9fsisip21qv4xljsg5dmni1pgpvwrjyyhhql0glydc4bs5rjgv"))))
8613 (build-system python-build-system)
8614 (native-inputs
8615 `(("python-webob" ,python-webob)
8616 ("python-webtest" ,python-webtest)))
8617 (propagated-inputs
8618 `(("python-lxml" ,python-lxml)
8619 ("python-cssselect" ,python-cssselect)))
8620 (home-page "https://github.com/gawel/pyquery")
8621 (synopsis "Make jQuery-like queries on xml documents")
8622 (description "pyquery allows you to make jQuery queries on xml documents.
8623 The API is as much as possible the similar to jQuery. pyquery uses lxml for
8624 fast xml and html manipulation.")
8625 (license license:bsd-3)))
8626
8627 (define-public python2-pyquery
8628 (package-with-python2 python-pyquery))
8629
8630 (define-public python-webtest
8631 (package
8632 (name "python-webtest")
8633 (version "2.0.20")
8634 (source
8635 (origin
8636 (method url-fetch)
8637 (uri (pypi-uri "WebTest" version))
8638 (sha256
8639 (base32
8640 "0bv0qhdjakdsdgj4sk21gnpp8xp8bga4x03p6gjb83ihrsb7n4xv"))))
8641 (build-system python-build-system)
8642 (arguments
8643 `(;; Unfortunately we have to disable tests!
8644 ;; This release of WebTest is pinned to python-nose < 1.3,
8645 ;; but older versions of python-nose are plagued with the following
8646 ;; bug(s), which rears its ugly head during test execution:
8647 ;; https://github.com/nose-devs/nose/issues/759
8648 ;; https://github.com/nose-devs/nose/pull/811
8649 #:tests? #f))
8650 ;; Commented out code is no good, but in this case, once tests
8651 ;; are ready to be enabled again, we should put the following
8652 ;; in place:
8653 ;; (native-inputs
8654 ;; `(("python-nose" ,python-nose) ; technially < 1.3,
8655 ;; ; but see above comment
8656 ;; ("python-coverage" ,python-coverage)
8657 ;; ("python-mock" ,python-mock)
8658 ;; ("python-pastedeploy" ,python-pastedeploy)
8659 ;; ("python-wsgiproxy2" ,python-wsgiproxy2)
8660 ;; ("python-pyquery" ,python-pyquery)))
8661 (propagated-inputs
8662 `(("python-waitress" ,python-waitress)
8663 ("python-webob" ,python-webob)
8664 ("python-six" ,python-six)
8665 ("python-beautifulsoup4" ,python-beautifulsoup4)))
8666 (home-page "http://webtest.pythonpaste.org/")
8667 (synopsis "Helper to test WSGI applications")
8668 (description "Webtest allows you to test your Python web applications
8669 without starting an HTTP server. It supports anything that supports the
8670 minimum of WSGI.")
8671 (license license:expat)))
8672
8673 (define-public python2-webtest
8674 (package-with-python2 python-webtest))
8675
8676 (define-public python-anyjson
8677 (package
8678 (name "python-anyjson")
8679 (version "0.3.3")
8680 (source
8681 (origin
8682 (method url-fetch)
8683 (uri (pypi-uri "anyjson" version))
8684 (sha256
8685 (base32
8686 "1fjph4alvcscsl5d4b6qpv1yh31jy05jxi1l0xff7lws7j32v09p"))))
8687 (build-system python-build-system)
8688 (arguments
8689 `(;; We could possibly get tests working, but on Python 3 it's not so easy.
8690 ;; Very strangely, 2to3 is run *during setup.py install* (or bdist, or
8691 ;; whatever) so this transformation needs to be done before the tests
8692 ;; can be run. Maybe we could add a build step to transform beforehand
8693 ;; but it could be annoying/difficult.
8694 ;; We can enable tests for the Python 2 version, though, and do below.
8695 #:tests? #f))
8696 (home-page "http://bitbucket.org/runeh/anyjson/")
8697 (synopsis
8698 "Wraps best available JSON implementation in a common interface")
8699 (description
8700 "Anyjson loads whichever is the fastest JSON module installed
8701 and provides a uniform API regardless of which JSON implementation is used.")
8702 (license license:bsd-3)
8703 (properties `((python2-variant . ,(delay python2-anyjson))))))
8704
8705 (define-public python2-anyjson
8706 (let ((anyjson (package-with-python2
8707 (strip-python2-variant python-anyjson))))
8708 (package
8709 (inherit anyjson)
8710 (arguments `(;; Unlike the python 3 variant, we do run tests. See above!
8711 #:tests? #t
8712 ,@(package-arguments anyjson)))
8713 (native-inputs `(("python2-nose" ,python2-nose))))))
8714
8715 (define-public python-amqp
8716 (package
8717 (name "python-amqp")
8718 (version "1.4.9")
8719 (source
8720 (origin
8721 (method url-fetch)
8722 (uri (pypi-uri "amqp" version))
8723 (sha256
8724 (base32
8725 "06n6q0kxhjnbfz3vn8x9yz09lwmn1xi9d6wxp31h5jbks0b4vsid"))))
8726 (build-system python-build-system)
8727 (native-inputs
8728 `(("python-nose" ,python-nose)
8729 ("python-mock" ,python-mock)))
8730 (home-page "http://github.com/celery/py-amqp")
8731 (synopsis
8732 "Low-level AMQP client for Python (fork of amqplib)")
8733 (description
8734 "This is a fork of amqplib which was originally written by Barry Pederson.
8735 It is maintained by the Celery project, and used by kombu as a pure python
8736 alternative when librabbitmq is not available.")
8737 (license license:lgpl2.1+)
8738 (properties `((python2-variant . ,(delay python2-amqp))))))
8739
8740 (define-public python2-amqp
8741 (let ((amqp (package-with-python2
8742 (strip-python2-variant python-amqp))))
8743 (package
8744 (inherit amqp)
8745 (arguments `(;; Tries to run coverage tests with nose-cover3, which seems
8746 ;; unmaintained. Weirdly, does not do this on the python 3
8747 ;; version?
8748 #:tests? #f
8749 ,@(package-arguments amqp))))))
8750
8751 (define-public python-kombu
8752 (package
8753 (name "python-kombu")
8754 (version "3.0.37")
8755 (source
8756 (origin
8757 (method url-fetch)
8758 (uri (pypi-uri "kombu" version))
8759 (sha256
8760 (base32
8761 "0l16chb314gpq2v7fh94a22c30lcv6w3ylmhsa60bldlcq6a0r70"))))
8762 (build-system python-build-system)
8763 (native-inputs
8764 `(("python-mock" ,python-mock)
8765 ("python-nose" ,python-nose)))
8766 (propagated-inputs
8767 `(("python-anyjson" ,python-anyjson)
8768 ("python-amqp" ,python-amqp)
8769 ("python-redis" ,python-redis)))
8770 (home-page "http://kombu.readthedocs.org")
8771 (synopsis "Message passing library for Python")
8772 (description "The aim of Kombu is to make messaging in Python as easy as
8773 possible by providing an idiomatic high-level interface for the AMQ protocol,
8774 and also provide proven and tested solutions to common messaging problems.
8775 AMQP is the Advanced Message Queuing Protocol, an open standard protocol for
8776 message orientation, queuing, routing, reliability and security, for which the
8777 RabbitMQ messaging server is the most popular implementation.")
8778 (license license:bsd-3)
8779 (properties `((python2-variant . ,(delay python2-kombu))))))
8780
8781 (define-public python2-kombu
8782 (let ((kombu (package-with-python2
8783 (strip-python2-variant python-kombu))))
8784 (package
8785 (inherit kombu)
8786 (native-inputs `(("python2-unittest2" ,python2-unittest2)
8787 ,@(package-native-inputs kombu))))))
8788
8789 (define-public python-billiard
8790 (package
8791 (name "python-billiard")
8792 (version "3.3.0.23")
8793 (source
8794 (origin
8795 (method url-fetch)
8796 (uri (pypi-uri "billiard" version))
8797 (sha256
8798 (base32
8799 "02wxsc6bhqvzh8j6w758kvgqbnj14l796mvmrcms8fgfamd2lak9"))))
8800 (build-system python-build-system)
8801 (native-inputs
8802 `(("python-nose" ,python-nose)))
8803 (home-page "http://github.com/celery/billiard")
8804 (synopsis
8805 "Python multiprocessing fork with improvements and bugfixes")
8806 (description
8807 "Billiard is a fork of the Python 2.7 multiprocessing package. The
8808 multiprocessing package itself is a renamed and updated version of R Oudkerk's
8809 pyprocessing package. This standalone variant is intended to be compatible with
8810 Python 2.4 and 2.5, and will draw its fixes/improvements from python-trunk.")
8811 (license license:bsd-3)
8812 (properties `((python2-variant . ,(delay python2-billiard))))))
8813
8814 (define-public python2-billiard
8815 (let ((billiard (package-with-python2
8816 (strip-python2-variant python-billiard))))
8817 (package
8818 (inherit billiard)
8819 (native-inputs `(("python2-unittest2" ,python2-unittest2)
8820 ("python2-mock" ,python2-mock)
8821 ,@(package-native-inputs billiard))))))
8822
8823 (define-public python-celery
8824 (package
8825 (name "python-celery")
8826 (version "3.1.24")
8827 (source
8828 (origin
8829 (method url-fetch)
8830 (uri (pypi-uri "celery" version))
8831 (sha256
8832 (base32
8833 "0yh2prhdnx2dgkb67a5drj12hh2zvzx5f611p7mqqg01ydghif4r"))))
8834 (build-system python-build-system)
8835 (arguments
8836 `(#:phases
8837 (modify-phases %standard-phases
8838 ;; These tests break with Python 3.5:
8839 ;; https://github.com/celery/celery/issues/2897#issuecomment-253066295
8840 (replace 'check
8841 (lambda _
8842 (zero?
8843 (system* "nosetests" "--exclude=^test_safe_to_remove.*")))))))
8844 (native-inputs
8845 `(("python-nose" ,python-nose)))
8846 (propagated-inputs
8847 `(("python-pytz" ,python-pytz)
8848 ("python-amqp" ,python-amqp)
8849 ("python-anyjson" ,python-anyjson)
8850 ("python-billiard" ,python-billiard)
8851 ("python-kombu" ,python-kombu)))
8852 (home-page "http://celeryproject.org")
8853 (synopsis "Distributed Task Queue")
8854 (description "Celery is an asynchronous task queue/job queue based on
8855 distributed message passing. It is focused on real-time operation, but
8856 supports scheduling as well. The execution units, called tasks, are executed
8857 concurrently on a single or more worker servers using multiprocessing,
8858 Eventlet, or gevent. Tasks can execute asynchronously (in the background) or
8859 synchronously (wait until ready).")
8860 (license license:bsd-3)
8861 (properties `((python2-variant . ,(delay python2-celery))))))
8862
8863 (define-public python2-celery
8864 (let ((celery (package-with-python2
8865 (strip-python2-variant python-celery))))
8866 (package
8867 (inherit celery)
8868 (native-inputs `(("python2-unittest2" ,python2-unittest2)
8869 ("python2-mock" ,python2-mock)
8870 ,@(package-native-inputs celery))))))
8871
8872 (define-public python-translitcodec
8873 (package
8874 (name "python-translitcodec")
8875 (version "0.4.0")
8876 (source
8877 (origin
8878 (method url-fetch)
8879 (uri (pypi-uri "translitcodec" version))
8880 (sha256
8881 (base32
8882 "10x6pvblkzky1zhjs8nmx64nb9jdzxad4bxhq4iwv0j4z2aqjnki"))))
8883 (build-system python-build-system)
8884 (arguments
8885 `(#:tests? #f)) ; no tests provided
8886 (home-page
8887 "https://github.com/claudep/translitcodec")
8888 (synopsis
8889 "Unicode to 8-bit charset transliteration codec")
8890 (description
8891 "This package contains codecs for transliterating ISO 10646 texts into
8892 best-effort representations using smaller coded character sets (ASCII,
8893 ISO 8859, etc.).")
8894 (license license:expat)))
8895
8896 (define-public python2-translitcodec
8897 (package-with-python2 python-translitcodec))
8898
8899 (define-public python-editor
8900 (package
8901 (name "python-editor")
8902 (version "0.5")
8903 (source
8904 (origin
8905 (method url-fetch)
8906 (uri (pypi-uri "python-editor" version))
8907 (sha256
8908 (base32
8909 "1ypnpgvzpkbwsg4rdvy4sy51j28b5xq9v8pnkwxncn07vqz06p7n"))))
8910 (build-system python-build-system)
8911 (home-page
8912 "https://github.com/fmoo/python-editor")
8913 (synopsis
8914 "Programmatically open an editor, capture the result")
8915 (description
8916 "python-editor is a library that provides the editor module for
8917 programmatically interfacing with your system's $EDITOR.")
8918 (license license:asl2.0)))
8919
8920 (define-public python2-editor
8921 (package-with-python2 python-editor))
8922
8923 (define-public python-sphinxcontrib-programoutput
8924 (package
8925 (name "python-sphinxcontrib-programoutput")
8926 (version "0.8")
8927 (source (origin
8928 (method url-fetch)
8929 (uri (pypi-uri "sphinxcontrib-programoutput" version))
8930 (sha256
8931 (base32
8932 "098as6z1s0gb4dh5xcr1fd2vpm91zj93jzvgawspxf5s4hqs0xhp"))))
8933 (build-system python-build-system)
8934 (propagated-inputs
8935 `(("python-docutils" ,python-docutils)
8936 ("python-sphinx" ,python-sphinx)))
8937 (synopsis "Sphinx extension to include program output")
8938 (description "A Sphinx extension to literally insert the output of arbitrary
8939 commands into documents, helping you to keep your command examples up to date.")
8940 (home-page "https://github.com/lunaryorn/sphinxcontrib-programoutput")
8941 (license license:bsd-2)))
8942
8943 (define-public python2-sphinxcontrib-programoutput
8944 (package-with-python2 python-sphinxcontrib-programoutput))
8945
8946 (define-public python-sphinx-repoze-autointerface
8947 (package
8948 (name "python-sphinx-repoze-autointerface")
8949 (version "0.8")
8950 (source (origin
8951 (method url-fetch)
8952 (uri (pypi-uri "repoze.sphinx.autointerface" version))
8953 (sha256
8954 (base32
8955 "08ycivzf7bh4a1zcyp31hbyqs1b2c9r26raa3vxjwwmbfqr3iw4f"))))
8956 (build-system python-build-system)
8957 (propagated-inputs
8958 `(("python-docutils" ,python-docutils)
8959 ("python-sphinx" ,python-sphinx)
8960 ("python-zope-interface" ,python-zope-interface)))
8961 (synopsis "Auto-generate Sphinx API docs from Zope interfaces")
8962 (description "This package defines an extension for the Sphinx documentation
8963 system. The extension allows generation of API documentation by
8964 introspection of @code{zope.interface} instances in code.")
8965 (home-page "https://github.com/repoze/repoze.sphinx.autointerface")
8966 (license license:repoze)))
8967
8968 (define-public python2-sphinx-repoze-autointerface
8969 (package-with-python2 python-sphinx-repoze-autointerface))
8970
8971 (define-public python-psycopg2
8972 (package
8973 (name "python-psycopg2")
8974 (version "2.6.1")
8975 (source
8976 (origin
8977 (method url-fetch)
8978 (uri (pypi-uri "psycopg2" version))
8979 (sha256
8980 (base32
8981 "0k4hshvrwsh8yagydyxgmd0pjm29lwdxkngcq9fzfzkmpsxrmkva"))))
8982 (build-system python-build-system)
8983 (arguments
8984 ;; Tests would require a postgresql database "psycopg2_test"
8985 ;; and a running postgresql database management service.
8986 `(#:tests? #f)) ; TODO re-enable after providing a test-db.
8987 (inputs
8988 `(("postgresql" ,postgresql))) ; libpq
8989 (home-page "http://initd.org/psycopg/")
8990 (synopsis "Python PostgreSQL adapter")
8991 (description
8992 "psycopg2 is a thread-safe PostgreSQL adapter that implements DB-API 2.0. ")
8993 (license license:lgpl3+)))
8994
8995 (define-public python2-psycopg2
8996 (package-with-python2 python-psycopg2))
8997
8998 (define-public python-vobject
8999 (package
9000 (name "python-vobject")
9001 (version "0.9.2")
9002 (source (origin
9003 (method url-fetch)
9004 (uri (pypi-uri "vobject" version))
9005 (sha256
9006 (base32
9007 "1qfnwlx8qwkgr6nf5wvl6ff1r3kll53dh3z6nyp173nmlhhhqccb"))))
9008 (build-system python-build-system)
9009 (arguments
9010 '(;; The test suite relies on some non-portable Windows interfaces.
9011 #:tests? #f))
9012 (propagated-inputs
9013 `(("python-dateutil-2" ,python-dateutil-2)
9014 ("python-pyicu" ,python-pyicu)))
9015 (synopsis "Parse and generate vCard and vCalendar files")
9016 (description "Vobject is intended to be a full featured Python package for
9017 parsing and generating vCard and vCalendar files. Currently, iCalendar files
9018 are supported and well tested. vCard 3.0 files are supported, and all data
9019 should be imported, but only a few components are understood in a sophisticated
9020 way.")
9021 (home-page "http://eventable.github.io/vobject/")
9022 (license license:asl2.0)))
9023
9024 (define-public python2-vobject
9025 (package-with-python2 python-vobject))
9026
9027 (define-public python-munkres
9028 (package
9029 (name "python-munkres")
9030 (version "1.0.7")
9031 (source (origin
9032 (method url-fetch)
9033 (uri (pypi-uri "munkres" version))
9034 (sha256
9035 (base32
9036 "1i6nf45i0kkzdx6k70giybsqxz4dxsjbrkrfqgjd7znfkf25sjik"))))
9037 (build-system python-build-system)
9038 (arguments
9039 '(#:tests? #f)) ; no test suite
9040 (home-page "http://software.clapper.org/munkres/")
9041 (synopsis "Implementation of the Munkres algorithm")
9042 (description "The Munkres module provides an implementation of the Munkres
9043 algorithm (also called the Hungarian algorithm or the Kuhn-Munkres algorithm),
9044 useful for solving the Assignment Problem.")
9045 (license license:bsd-3)))
9046
9047 (define-public python2-munkres
9048 (package-with-python2 python-munkres))
9049
9050 (define-public python-flask
9051 (package
9052 (name "python-flask")
9053 (version "0.10.1")
9054 (source (origin
9055 (method url-fetch)
9056 (uri (pypi-uri "Flask" version))
9057 (sha256
9058 (base32
9059 "0wrkavjdjndknhp8ya8j850jq7a1cli4g5a93mg8nh1xz2gq50sc"))))
9060 (build-system python-build-system)
9061 (propagated-inputs
9062 `(("python-itsdangerous" ,python-itsdangerous)
9063 ("python-jinja2" ,python-jinja2)
9064 ("python-werkzeug" ,python-werkzeug)))
9065 (home-page "https://github.com/mitsuhiko/flask/")
9066 (synopsis "Microframework based on Werkzeug, Jinja2 and good intentions")
9067 (description "Flask is a micro web framework based on the Werkzeug toolkit
9068 and Jinja2 template engine. It is called a micro framework because it does not
9069 presume or force a developer to use a particular tool or library.")
9070 (license license:bsd-3)))
9071
9072 (define-public python2-flask
9073 (package-with-python2 python-flask))
9074
9075 (define-public python-cookies
9076 (package
9077 (name "python-cookies")
9078 (version "2.2.1")
9079 (source (origin
9080 (method url-fetch)
9081 (uri (pypi-uri "cookies" version))
9082 (sha256
9083 (base32
9084 "13pfndz8vbk4p2a44cfbjsypjarkrall71pgc97glk5fiiw9idnn"))))
9085 (build-system python-build-system)
9086 (arguments
9087 `(;; test are broken: https://gitlab.com/sashahart/cookies/issues/3
9088 #:tests? #f))
9089 (native-inputs
9090 `(("python-pytest" ,python2-pytest)))
9091 (synopsis "HTTP cookie parser and renderer")
9092 (description "A RFC 6265-compliant HTTP cookie parser and renderer in
9093 Python.")
9094 (home-page "https://gitlab.com/sashahart/cookies")
9095 (license license:expat)))
9096
9097 (define-public python2-cookies
9098 (package-with-python2 python-cookies))
9099
9100 (define-public python-responses
9101 (package
9102 (name "python-responses")
9103 (version "0.5.1")
9104 (source (origin
9105 (method url-fetch)
9106 (uri (pypi-uri "responses" version))
9107 (sha256
9108 (base32
9109 "1spcfxixyk9k7pk82jm6zqkwk031s95lh8q0mz7539jrb7269bcc"))))
9110 (build-system python-build-system)
9111 (arguments
9112 `(;; Test suite is not distributed:
9113 ;; https://github.com/getsentry/responses/issues/38
9114 #:tests? #f))
9115 (native-inputs
9116 `(("python-cookies" ,python-cookies)
9117 ("python-mock" ,python-mock)))
9118 (propagated-inputs
9119 `(("python-requests" ,python-requests)
9120 ("python-six" ,python-six)))
9121 (home-page "https://github.com/getsentry/responses")
9122 (synopsis "Utility for mocking out the `requests` Python library")
9123 (description "A utility library for mocking out the `requests` Python
9124 library.")
9125 (license license:asl2.0)))
9126
9127 (define-public python2-responses
9128 (package-with-python2 python-responses))
9129
9130 (define-public python-whoosh
9131 (package
9132 (name "python-whoosh")
9133 (version "2.7.4")
9134 (source
9135 (origin
9136 (method url-fetch)
9137 (uri (pypi-uri "Whoosh" version))
9138 (sha256
9139 (base32
9140 "10qsqdjpbc85fykc1vgcs8xwbgn4l2l52c8d83xf1q59pwyn79bw"))))
9141 (build-system python-build-system)
9142 (native-inputs
9143 `(("python-pytest" ,python-pytest)))
9144 (home-page "http://bitbucket.org/mchaput/whoosh")
9145 (synopsis "Full text indexing, search, and spell checking library")
9146 (description
9147 "Whoosh is a fast, pure-Python full text indexing, search, and spell
9148 checking library.")
9149 (license license:bsd-2)))
9150
9151 (define-public python2-whoosh
9152 (let ((whoosh (package-with-python2 (strip-python2-variant python-whoosh))))
9153 (package (inherit whoosh)
9154 (propagated-inputs
9155 `(("python2-backport-ssl-match-hostname"
9156 ,python2-backport-ssl-match-hostname)
9157 ,@(package-propagated-inputs whoosh))))))
9158
9159 (define-public python-pathlib
9160 (package
9161 (name "python-pathlib")
9162 (version "1.0.1")
9163 (source (origin
9164 (method url-fetch)
9165 (uri (pypi-uri "pathlib" version))
9166 (sha256
9167 (base32
9168 "17zajiw4mjbkkv6ahp3xf025qglkj0805m9s41c45zryzj6p2h39"))))
9169 (build-system python-build-system)
9170 ;; The tests depend on the internal "test" module, which does not provide
9171 ;; a stable interface.
9172 (arguments `(#:tests? #f))
9173 (home-page "https://pathlib.readthedocs.org/")
9174 (synopsis "Object-oriented file system paths")
9175 (description "Pathlib offers a set of classes to handle file system paths.
9176 It offers the following advantages over using string objects:
9177
9178 @enumerate
9179 @item No more cumbersome use of os and os.path functions. Everything can
9180 be done easily through operators, attribute accesses, and method calls.
9181 @item Embodies the semantics of different path types. For example,
9182 comparing Windows paths ignores casing.
9183 @item Well-defined semantics, eliminating any inconsistencies or
9184 ambiguities (forward vs. backward slashes, etc.).
9185 @end enumerate
9186
9187 Note: In Python 3.4, pathlib is now part of the standard library. For other
9188 Python versions please consider python-pathlib2 instead, which tracks the
9189 standard library module. This module (python-pathlib) isn't maintained
9190 anymore.")
9191 (license license:expat)))
9192
9193 (define-public python2-pathlib
9194 (package-with-python2 python-pathlib))
9195
9196 (define-public python2-pathlib2
9197 (package
9198 (name "python2-pathlib2")
9199 (version "2.1.0")
9200 (source (origin
9201 (method url-fetch)
9202 (uri (pypi-uri "pathlib2" version))
9203 (sha256
9204 (base32
9205 "0p050msg5c8d0kadv702jnfshaxrb0il765cpkgnhn6mq5hakcyy"))))
9206 (build-system python-build-system)
9207 ;; We only need the the Python 2 variant, since for Python 3 our minimum
9208 ;; version is 3.4 which already includes this package as part of the
9209 ;; standard library.
9210 (arguments
9211 `(#:python ,python-2))
9212 (native-inputs
9213 `(("python2-six" ,python2-six)))
9214 (home-page "http://pypi.python.org/pypi/pathlib2/")
9215 (synopsis "Object-oriented file system paths - backport of standard
9216 pathlib module")
9217 (description "The goal of pathlib2 is to provide a backport of standard
9218 pathlib module which tracks the standard library module, so all the newest
9219 features of the standard pathlib can be used also on older Python versions.
9220
9221 Pathlib offers a set of classes to handle file system paths. It offers the
9222 following advantages over using string objects:
9223
9224 @enumerate
9225 @item No more cumbersome use of os and os.path functions. Everything can
9226 be done easily through operators, attribute accesses, and method calls.
9227 @item Embodies the semantics of different path types. For example,
9228 comparing Windows paths ignores casing.
9229 @item Well-defined semantics, eliminating any inconsistencies or
9230 ambiguities (forward vs. backward slashes, etc.).
9231 @end enumerate")
9232 (license license:expat)))
9233
9234 (define-public python-jellyfish
9235 (package
9236 (name "python-jellyfish")
9237 (version "0.5.3")
9238 (source (origin
9239 (method url-fetch)
9240 (uri (pypi-uri "jellyfish" version))
9241 (sha256
9242 (base32
9243 "12bxh8cy9xmvyrjz7aw159nd5pyvb645rkvw4r6bvm4xbvs8gd07"))))
9244 (build-system python-build-system)
9245 (native-inputs
9246 `(("python-pytest" ,python-pytest)))
9247 (home-page "https://github.com/jamesturk/jellyfish")
9248 (synopsis "Approximate and phonetic matching of strings")
9249 (description "Jellyfish uses a variety of string comparison and phonetic
9250 encoding algorithms to do fuzzy string matching.")
9251 (license license:bsd-2)
9252 (properties `((python2-variant . ,(delay python2-jellyfish))))))
9253
9254 (define-public python2-jellyfish
9255 (let ((jellyfish (package-with-python2
9256 (strip-python2-variant python-jellyfish))))
9257 (package (inherit jellyfish)
9258 (native-inputs `(("python2-unicodecsv" ,python2-unicodecsv)
9259 ,@(package-native-inputs jellyfish))))))
9260
9261 (define-public python2-unicodecsv
9262 (package
9263 (name "python2-unicodecsv")
9264 (version "0.14.1")
9265 (source (origin
9266 (method url-fetch)
9267 ;; The test suite is not included in the PyPi release.
9268 ;; https://github.com/jdunck/python-unicodecsv/issues/19
9269 (uri (string-append "https://github.com/jdunck/python-unicodecsv/"
9270 "archive/" version ".tar.gz"))
9271 (file-name (string-append name "-" version ".tar.gz"))
9272 (sha256
9273 (base32
9274 "087nqanfcyp6mlfbbr5lva5f3w6iz1bybls9xlrb8icmc474wh4w"))))
9275 (build-system python-build-system)
9276 (arguments
9277 `(;; It supports Python 3, but Python 3 can already do Unicode CSV.
9278 #:python ,python-2))
9279 (native-inputs
9280 `(("python2-unittest2" ,python2-unittest2)))
9281 (home-page "https://github.com/jdunck/python-unicodecsv")
9282 (synopsis "Unicode CSV module for Python 2")
9283 (description "Unicodecsv is a drop-in replacement for Python 2.7's CSV
9284 module, adding support for Unicode strings.")
9285 (license license:bsd-2)))
9286
9287 (define-public python-rarfile
9288 (package
9289 (name "python-rarfile")
9290 (version "2.7")
9291 (source (origin
9292 (method url-fetch)
9293 (uri (pypi-uri "rarfile" version))
9294 (sha256
9295 (base32
9296 "0d8n1dlpiz7av8dmbp0vclrwl9cnxizr4f2c9xvj1h5nvn480527"))
9297 ;; https://github.com/markokr/rarfile/pull/17/
9298 (patches (search-patches "python-rarfile-fix-tests.patch"))))
9299 (build-system python-build-system)
9300 (arguments
9301 '(#:phases
9302 (modify-phases %standard-phases
9303 (replace 'check
9304 ;; Many tests fail, but the installation proceeds.
9305 (lambda _ (zero? (system* "make" "-C" "test" "test")))))))
9306 (native-inputs
9307 `(("which" ,which))) ; required for tests
9308 (propagated-inputs
9309 `(("libarchive" ,libarchive)))
9310 (home-page "https://github.com/markokr/rarfile")
9311 (synopsis "RAR archive reader for Python")
9312 (description "This is Python module for RAR archive reading. The interface
9313 is made as zipfile like as possible.")
9314 (license license:isc)))
9315
9316 (define-public python2-rarfile
9317 (package-with-python2 python-rarfile))
9318
9319 (define-public python-magic
9320 (package
9321 (name "python-magic")
9322 (version "0.4.3")
9323 (source
9324 (origin
9325 (method url-fetch)
9326 (uri (string-append "https://github.com/ahupp/python-magic/archive/"
9327 version ".tar.gz"))
9328 (sha256
9329 (base32
9330 "17bgy92i7sb021f2s4mw1dcvpm6p1mi9jihridwy1pyn8mzvpjgk"))
9331 (file-name (string-append name "-" version "-checkout"))))
9332 (build-system python-build-system)
9333 (arguments
9334 ;; The tests are unreliable, so don't run them. The tests fail
9335 ;; under Python3 because they were written for Python2 and
9336 ;; contain import statements that do not work in Python3. One of
9337 ;; the tests fails under Python2 because its assertions are
9338 ;; overly stringent; it relies on comparing output strings which
9339 ;; are brittle and can change depending on the version of
9340 ;; libmagic being used and the system on which the test is
9341 ;; running. In my case, under GuixSD 0.10.0, only one test
9342 ;; failed, and it seems to have failed only because the version
9343 ;; of libmagic that is packaged in Guix outputs a slightly
9344 ;; different (but not wrong) string than the one that the test
9345 ;; expected.
9346 '(#:tests? #f
9347 #:phases (modify-phases %standard-phases
9348 ;; Replace a specific method call with a hard-coded
9349 ;; path to the necessary libmagic.so file in the
9350 ;; store. If we don't do this, then the method call
9351 ;; will fail to find the libmagic.so file, which in
9352 ;; turn will cause any application using
9353 ;; python-magic to fail.
9354 (add-before 'build 'hard-code-path-to-libmagic
9355 (lambda* (#:key inputs #:allow-other-keys)
9356 (let ((file (assoc-ref inputs "file")))
9357 (substitute* "magic.py"
9358 (("ctypes.util.find_library\\('magic'\\)")
9359 (string-append "'" file "/lib/libmagic.so'")))
9360 #t)))
9361 (add-before 'install 'disable-egg-compression
9362 (lambda _
9363 (let ((port (open-file "setup.cfg" "a")))
9364 (display "\n[easy_install]\nzip_ok = 0\n"
9365 port)
9366 (close-port port)
9367 #t))))))
9368 (inputs
9369 ;; python-magic needs to be able to find libmagic.so.
9370 `(("file" ,file)))
9371 (home-page "https://github.com/ahupp/python-magic")
9372 (synopsis "File type identification using libmagic")
9373 (description
9374 "This module uses ctypes to access the libmagic file type
9375 identification library. It makes use of the local magic database and
9376 supports both textual and MIME-type output. Note that this module and
9377 the python-file module both provide a \"magic.py\" file; these two
9378 modules, which are different and were developed separately, both serve
9379 the same purpose: to provide Python bindings for libmagic.")
9380 (license license:expat)))
9381
9382 (define-public python2-magic
9383 (package-with-python2 python-magic))
9384
9385 (define-public python2-s3cmd
9386 (package
9387 (name "python2-s3cmd")
9388 (version "1.6.1")
9389 (source
9390 (origin
9391 (method url-fetch)
9392 (uri (string-append "mirror://sourceforge/s3tools/s3cmd/" version "/"
9393 "s3cmd-" version ".tar.gz"))
9394 (sha256
9395 (base32
9396 "0ki1rzhm5icvi9ry5jswi4b22yqwyj0d2wsqsgilwx6qhi7pjxa6"))))
9397 (build-system python-build-system)
9398 (arguments
9399 ;; s3cmd is written for python2 only and contains no tests.
9400 `(#:python ,python-2
9401 #:tests? #f))
9402 (propagated-inputs
9403 `(("python2-dateutil" ,python2-dateutil)
9404 ;; The python-file package also provides a magic.py module.
9405 ;; This is an unfortunate state of affairs; however, s3cmd
9406 ;; fails to install if it cannot find specifically the
9407 ;; python-magic package. Thus we include it, instead of using
9408 ;; python-file. Ironically, s3cmd sometimes works better
9409 ;; without libmagic bindings at all:
9410 ;; https://github.com/s3tools/s3cmd/issues/198
9411 ("python2-magic" ,python2-magic)))
9412 (home-page "http://s3tools.org/s3cmd")
9413 (synopsis "Command line tool for S3-compatible storage services")
9414 (description
9415 "S3cmd is a command line tool for uploading, retrieving and managing data
9416 in storage services that are compatible with the Amazon Simple Storage
9417 Service (S3) protocol, including S3 itself. It supports rsync-like backup,
9418 GnuPG encryption, and more. It also supports management of Amazon's
9419 CloudFront content delivery network.")
9420 (license license:gpl2+)))
9421
9422 (define-public python-pkgconfig
9423 (package
9424 (name "python-pkgconfig")
9425 (version "1.1.0")
9426 (source
9427 (origin
9428 (method url-fetch)
9429 (uri (pypi-uri "pkgconfig" version))
9430 (sha256
9431 (base32
9432 "1pw0kmvc57sjmaxi6c54fqsnihqj6hvhc9y1vaz36axafzqam7bh"))))
9433 (build-system python-build-system)
9434 (native-inputs
9435 `(("python-nose" ,python-nose)))
9436 (inputs
9437 `(("pkg-config" ,pkg-config)))
9438 (arguments
9439 `(;; Tests fail with "ValueError: _type_ 'v' not supported" on Python 3,
9440 ;; and on Python 2 they need the dl module deprecated since Python 2.6.
9441 #:tests? #f
9442 ;; Hard-code the path to pkg-config.
9443 #:phases
9444 (modify-phases %standard-phases
9445 (add-before
9446 'build 'patch
9447 (lambda _
9448 (substitute* "pkgconfig/pkgconfig.py"
9449 (("cmd = 'pkg-config")
9450 (string-append "cmd = '" (which "pkg-config"))))
9451 #t)))))
9452 (home-page "http://github.com/matze/pkgconfig")
9453 (synopsis "Python interface for pkg-config")
9454 (description "This module provides a Python interface to pkg-config. It
9455 can be used to find all pkg-config packages, check if a package exists,
9456 check if a package meets certain version requirements, query CFLAGS and
9457 LDFLAGS and parse the output to build extensions with setup.py.")
9458 (license license:expat)))
9459
9460 (define-public python2-pkgconfig
9461 (package-with-python2 python-pkgconfig))
9462
9463 (define-public python-bz2file
9464 (package
9465 (name "python-bz2file")
9466 (version "0.98")
9467 (source
9468 (origin
9469 (method url-fetch)
9470 (uri (pypi-uri "bz2file" version))
9471 (sha256
9472 (base32
9473 "126s53fkpx04f33a829yqqk8fj4png3qwg4m66cvlmhmwc8zihb4"))))
9474 (build-system python-build-system)
9475 (arguments
9476 `(#:tests? #f)) ; Tests use deprecated python modules.
9477 (home-page "https://github.com/nvawda/bz2file")
9478 (synopsis "Read and write bzip2-compressed files")
9479 (description
9480 "Bz2file is a Python library for reading and writing bzip2-compressed
9481 files. It contains a drop-in replacement for the I/O interface in the
9482 standard library's @code{bz2} module, including features from the latest
9483 development version of CPython that are not available in older releases.")
9484 (license license:asl2.0)
9485 (properties `((python2-variant . ,(delay python2-bz2file))))))
9486
9487 (define-public python2-bz2file
9488 (let ((base (package-with-python2
9489 (strip-python2-variant python-bz2file))))
9490 (package
9491 (inherit base)
9492 (arguments
9493 `(#:python ,python-2
9494 #:phases
9495 (modify-phases %standard-phases
9496 ;; 'python setup.py test' does not work as of 0.98.
9497 ;; There is only the one test file, so we run it directly.
9498 (replace 'check
9499 (lambda _ (zero? (system* "python"
9500 "test_bz2file.py"))))))))))
9501
9502 (define-public python-future
9503 (package
9504 (name "python-future")
9505 (version "0.15.2")
9506 (source
9507 (origin
9508 (method url-fetch)
9509 (uri (pypi-uri "future" version))
9510 (sha256
9511 (base32
9512 "15wvcfzssc68xqnqi1dq4fhd0848hwi9jn42hxyvlqna40zijfrx"))))
9513 (build-system python-build-system)
9514 ;; Many tests connect to the network or are otherwise flawed.
9515 ;; https://github.com/PythonCharmers/python-future/issues/210
9516 (arguments
9517 `(#:tests? #f))
9518 (home-page "http://python-future.org")
9519 (synopsis "Single-source support for Python 3 and 2")
9520 (description
9521 "@code{python-future} is the missing compatibility layer between Python 2 and
9522 Python 3. It allows you to use a single, clean Python 3.x-compatible codebase
9523 to support both Python 2 and Python 3 with minimal overhead.")
9524 (license license:expat)))
9525
9526 (define-public python2-future
9527 (package-with-python2 python-future))
9528
9529 (define-public python-cysignals
9530 (package
9531 (name "python-cysignals")
9532 (version "1.1.0")
9533 (source
9534 (origin
9535 (method url-fetch)
9536 (uri (pypi-uri "cysignals" version ".tar.bz2"))
9537 (sha256
9538 (base32
9539 "14cbyd9znlz6cxy1s3g6v6dv5jj45hn27pywkidd9b1zanaysqc6"))))
9540 (build-system python-build-system)
9541 (native-inputs
9542 `(("python-cython" ,python-cython)
9543 ("python-sphinx" ,python-sphinx)))
9544 (inputs
9545 `(("pari-gp" ,pari-gp)))
9546 (arguments
9547 `(#:modules ((guix build python-build-system)
9548 ((guix build gnu-build-system) #:prefix gnu:)
9549 (guix build utils))
9550 ;; FIXME: Tests are executed after installation and currently fail
9551 ;; when not installing into standard locations; the author is working
9552 ;; on a fix.
9553 #:tests? #f
9554 #:phases
9555 (modify-phases %standard-phases
9556 (add-before
9557 'build 'configure
9558 (assoc-ref gnu:%standard-phases 'configure)))))
9559 (home-page
9560 "https://github.com/sagemath/cysignals")
9561 (synopsis
9562 "Handling of interrupts and signals for Cython")
9563 (description
9564 "The cysignals package provides mechanisms to handle interrupts (and
9565 other signals and errors) in Cython code, using two related approaches,
9566 for mixed Cython/Python code or external C libraries and pure Cython code,
9567 respectively.")
9568 (license license:lgpl3+)))
9569
9570 (define-public python2-cysignals
9571 (package-with-python2 python-cysignals))
9572
9573 (define-public python2-shedskin
9574 (package
9575 (name "python2-shedskin")
9576 (version "0.9.4")
9577 (source
9578 (origin
9579 (method url-fetch)
9580 (uri (string-append "https://github.com/shedskin/shedskin/"
9581 "releases/download/v" version
9582 "/shedskin-" version ".tgz"))
9583 (sha256
9584 (base32
9585 "0nzwrzgw1ga8rw6f0ryq7zr9kkiavd1cqz5hzxkcbicl1dk7kz41"))))
9586 (build-system python-build-system)
9587 (arguments
9588 `(#:python ,python-2
9589 #:phases (modify-phases %standard-phases
9590 (add-after 'unpack 'fix-resulting-include-libs
9591 (lambda* (#:key inputs #:allow-other-keys)
9592 (let ((libgc (assoc-ref inputs "libgc"))
9593 (pcre (assoc-ref inputs "pcre")))
9594 (substitute* "shedskin/makefile.py"
9595 (("variable == 'CCFLAGS':[ ]*")
9596 (string-append "variable == 'CCFLAGS':\n"
9597 " line += ' -I " pcre "/include"
9598 " -I " libgc "/include'"))
9599 (("variable == 'LFLAGS':[ ]*")
9600 (string-append "variable == 'LFLAGS':\n"
9601 " line += ' -L" pcre "/lib"
9602 " -L " libgc "/lib'")))
9603 #t))))))
9604 (inputs `(("pcre" ,pcre)
9605 ("libgc" ,libgc)))
9606 (home-page "https://shedskin.github.io/")
9607 (synopsis "Experimental Python-2 to C++ Compiler")
9608 (description (string-append "This is an experimental compiler for a subset of
9609 Python. It generates C++ code and a Makefile."))
9610 (license (list license:gpl3 license:bsd-3 license:expat))))
9611
9612 (define-public python2-rope
9613 (package
9614 (name "python2-rope")
9615 (version "0.10.3")
9616 (source
9617 (origin
9618 (method url-fetch)
9619 (uri (pypi-uri "rope" version))
9620 (sha256
9621 (base32
9622 "18k5znhpwvrfck3yp0jmhd5j8r0f0s8bk1zh5yhs2cfgmfhbwigb"))))
9623 (arguments
9624 ;; Rope is currently python-2 only.
9625 ;; https://github.com/python-rope/rope/issues/57
9626 `(#:python ,python-2))
9627 (build-system python-build-system)
9628 (native-inputs
9629 `(("python2-unittest2" ,python2-unittest2)))
9630 (home-page "https://github.com/python-rope/rope")
9631 (synopsis "Refactoring library for Python")
9632 (description "Rope is a refactoring library for Python. It facilitates
9633 the renaming, moving and extracting of attributes, functions, modules, fields
9634 and parameters in Python 2 source code. These refactorings can also be applied
9635 to occurences in strings and comments.")
9636 (license license:gpl2)))
9637
9638 (define-public python-py3status
9639 (package
9640 (name "python-py3status")
9641 (version "3.1")
9642 (source
9643 (origin
9644 (method url-fetch)
9645 (uri (pypi-uri "py3status" version))
9646 (sha256
9647 (base32
9648 "0i283z1pivmir61z8kbiycigc94l61v33ygzkhczf1ifq7cppyds"))))
9649 (build-system python-build-system)
9650 (home-page "https://github.com/ultrabug/py3status")
9651 (synopsis "Extensible i3status wrapper written in Python")
9652 (description "py3status is an i3status wrapper which extends i3status
9653 functionality in a modular way, allowing you to extend your panel with your
9654 own code, responding to click events and updating clock every second.")
9655 (license license:bsd-3)))
9656
9657 (define-public python-tblib
9658 (package
9659 (name "python-tblib")
9660 (version "1.3.0")
9661 (source (origin
9662 (method url-fetch)
9663 (uri (pypi-uri "tblib" version))
9664 (sha256 (base32
9665 "02iahfkfa927hb4jq2bak36ldihwapzacfiq5lyxg8llwn98a1yi"))))
9666 (build-system python-build-system)
9667 (arguments
9668 `(#:phases
9669 (modify-phases %standard-phases
9670 (replace 'check
9671 (lambda _
9672 ;; Upstream runs tests after installation and the package itself
9673 ;; resides in a subdirectory. Extend PYTHONPATH so it will be
9674 ;; found.
9675 (setenv "PYTHONPATH"
9676 (string-append (getcwd) "/build/lib:"
9677 (getenv "PYTHONPATH")))
9678 (zero? (system* "py.test" "-vv" "tests" "README.rst")))))))
9679 (native-inputs
9680 `(("python-pytest" ,python-pytest)
9681 ("python-six" ,python-six)))
9682 (home-page "https://github.com/ionelmc/python-tblib")
9683 (synopsis "Traceback serialization library")
9684 (description
9685 "Traceback serialization allows you to:
9686
9687 @enumerate
9688 @item Pickle tracebacks and raise exceptions with pickled tracebacks in
9689 different processes. This allows better error handling when running code over
9690 multiple processes (imagine multiprocessing, billiard, futures, celery etc).
9691
9692 @item Parse traceback strings and raise with the parsed tracebacks.
9693 @end itemize")
9694 (license license:bsd-3)))
9695
9696 (define-public python2-tblib
9697 (package-with-python2 python-tblib))
9698
9699 (define-public python-sqlparse
9700 (package
9701 (name "python-sqlparse")
9702 (version "0.1.19")
9703 (source (origin
9704 (method url-fetch)
9705 (uri (pypi-uri "sqlparse" version))
9706 (sha256
9707 (base32
9708 "1s2fvaxgh9kqzrd6iwy5h7i61ckn05plx9np13zby93z3hdbx5nq"))))
9709 (build-system python-build-system)
9710 (arguments
9711 `(#:phases
9712 (modify-phases %standard-phases
9713 (replace 'check
9714 (lambda* _
9715 ;; setup.py-integrated 2to3 only affects the build files, but
9716 ;; py.test is using the source files. So we need to convert them
9717 ;; manually.
9718 (when (zero? (system* "python3"))
9719 (system* "2to3" "--no-diff" "-wn" "sqlparse" "tests"))
9720 (zero? (system* "py.test")))))))
9721 (native-inputs
9722 `(("python-pytest" ,python-pytest)))
9723 (home-page "https://github.com/andialbrecht/sqlparse")
9724 (synopsis "Non-validating SQL parser")
9725 (description "Sqlparse is a non-validating SQL parser for Python. It
9726 provides support for parsing, splitting and formatting SQL statements.")
9727 (license license:bsd-3)))
9728
9729 (define-public python2-sqlparse
9730 (package-with-python2 python-sqlparse))
9731
9732 (define-public python-greenlet
9733 (package
9734 (name "python-greenlet")
9735 (version "0.4.9")
9736 (source (origin
9737 (method url-fetch)
9738 (uri (pypi-uri "greenlet" version))
9739 (sha256
9740 (base32
9741 "04h0m54dyqg49vyarq26mry6kbivnpl47rnmmrk9qn8wpfxviybr"))))
9742 (build-system python-build-system)
9743 (home-page "https://greenlet.readthedocs.io/")
9744 (synopsis "Lightweight in-process concurrent programming")
9745 (description
9746 "Greenlet package is a spin-off of Stackless, a version of CPython
9747 that supports micro-threads called \"tasklets\". Tasklets run
9748 pseudo-concurrently (typically in a single or a few OS-level threads) and
9749 are synchronized with data exchanges on \"channels\".")
9750 (license (list license:psfl license:expat))))
9751
9752 (define-public python2-greenlet
9753 (package-with-python2 python-greenlet))
9754
9755 (define-public python-gevent
9756 (package
9757 (name "python-gevent")
9758 (version "1.1.1")
9759 (source (origin
9760 (method url-fetch)
9761 (uri (pypi-uri "gevent" version))
9762 (sha256
9763 (base32
9764 "1smf3kvidpdiyi2c81alal74p2zm0clrm6xbyy6y1k9a3f2vkrbf"))
9765 (modules '((guix build utils)))
9766 (snippet
9767 '(begin
9768 ;; unbunding libev and c-ares
9769 (for-each delete-file-recursively '("libev" "c-ares"))
9770 ;; fixing testsuite
9771 (call-with-output-file "greentest/__init__.py" noop)
9772 (substitute* "greentest/testrunner.py"
9773 (("import util") "from . import util")
9774 (("from util import log") "from .util import log"))))))
9775 (build-system python-build-system)
9776 (propagated-inputs
9777 `(("python-greenlet" ,python-greenlet)))
9778 (native-inputs
9779 `(("python-six" ,python-six)))
9780 (inputs
9781 `(("c-ares" ,c-ares)
9782 ("libev" ,libev)))
9783 (home-page "http://www.gevent.org/")
9784 (synopsis "Coroutine-based network library")
9785 (description
9786 "gevent is a coroutine-based Python networking library that uses greenlet
9787 to provide a high-level synchronous API on top of the libev event loop.")
9788 (license license:expat)))
9789
9790 (define-public python2-gevent
9791 (package-with-python2 python-gevent))
9792
9793 (define-public python-twisted
9794 (package
9795 (name "python-twisted")
9796 (version "16.2.0")
9797 (source (origin
9798 (method url-fetch)
9799 (uri (pypi-uri "Twisted" version ".tar.bz2"))
9800 (sha256
9801 (base32
9802 "0ydxrp9myw1mvsz3qfzx5579y5llmqa82pxvqchgp5syczffi450"))))
9803 (build-system python-build-system)
9804 (propagated-inputs
9805 `(("python-zope-interface" ,python-zope-interface)))
9806 (home-page "https://twistedmatrix.com/")
9807 (synopsis "Asynchronous networking framework written in Python")
9808 (description
9809 "Twisted is an extensible framework for Python programming, with special
9810 focus on event-based network programming and multiprotocol integration.")
9811 (license license:expat)))
9812
9813 (define-public python2-twisted
9814 (package-with-python2 python-twisted))
9815
9816 (define-public python-pika
9817 (package
9818 (name "python-pika")
9819 (version "0.10.0")
9820 (source
9821 (origin
9822 (method url-fetch)
9823 (uri (pypi-uri "pika" version))
9824 (sha256
9825 (base32
9826 "0nb4h08di432lv7dy2v9kpwgk0w92f24sqc2hw2s9vwr5b8v8xvj"))))
9827 (build-system python-build-system)
9828 (native-inputs
9829 `(("python-pyev" ,python-pyev)
9830 ("python-tornado" ,python-tornado)
9831 ("python-twisted" ,python-twisted)))
9832 (home-page "https://pika.readthedocs.org")
9833 (synopsis "Pure Python AMQP Client Library")
9834 (description
9835 "Pika is a pure-Python implementation of the AMQP (Advanced Message Queuing
9836 Protocol) 0-9-1 protocol that tries to stay fairly independent of the underlying
9837 network support library.")
9838 (license license:bsd-3)))
9839
9840 (define-public python2-pika
9841 (package-with-python2 python-pika))
9842
9843 (define-public python-ply
9844 (package
9845 (name "python-ply")
9846 (version "3.8")
9847 (source
9848 (origin
9849 (method url-fetch)
9850 (uri (string-append
9851 "https://pypi.python.org/packages/"
9852 "96/e0/430fcdb6b3ef1ae534d231397bee7e9304be14a47a267e82ebcb3323d0b5"
9853 "/ply-" version ".tar.gz"))
9854 (sha256
9855 (base32
9856 "1f70ipynmiy09k6px2j7v4w5cdrc21za3xs2k6f1bsvb0bzvvlg7"))))
9857 (build-system python-build-system)
9858 (home-page "http://www.dabeaz.com/ply/")
9859 (synopsis "Python Lex & Yacc")
9860 (description "PLY is a @code{lex}/@code{yacc} implemented purely in Python.
9861 It uses LR parsing and does extensive error checking.")
9862 (license license:bsd-3)))
9863
9864 (define-public python2-ply
9865 (package-with-python2 python-ply))
9866
9867 (define-public python-tabulate
9868 (package
9869 (name "python-tabulate")
9870 (version "0.7.5")
9871 (source (origin
9872 (method url-fetch)
9873 (uri (pypi-uri "tabulate" version))
9874 (sha256
9875 (base32
9876 "03l1r7ddd1a0j2snv1yd0hlnghjad3fg1an1jr8936ksv75slwch"))
9877 ;; Fix tests
9878 (modules '((guix build utils)))
9879 (snippet '(substitute* '("test/test_cli.py"
9880 "test/test_input.py"
9881 "test/test_output.py"
9882 "test/test_regression.py")
9883 (("from common") "from nose.tools")))))
9884 (build-system python-build-system)
9885 (native-inputs
9886 `(;; For testing
9887 ("python-nose" ,python-nose)))
9888 (home-page "https://bitbucket.org/astanin/python-tabulate")
9889 (synopsis "Pretty-print tabular data")
9890 (description
9891 "Tabulate is a library and command-line utility to pretty-print tabular
9892 data in Python.")
9893 (license license:expat)))
9894
9895 (define-public python2-tabulate
9896 (package-with-python2 python-tabulate))
9897
9898 (define-public python-kazoo
9899 (package
9900 (name "python-kazoo")
9901 (version "2.2.1")
9902 (source
9903 (origin
9904 (method url-fetch)
9905 (uri (pypi-uri "kazoo" version))
9906 (sha256
9907 (base32
9908 "10pb864if9qi2pq9lfb9m8f7z7ss6rml80gf1d9h64lap5crjnjj"))))
9909 (build-system python-build-system)
9910 (arguments '(#:tests? #f)) ; XXX: needs zookeeper
9911 (propagated-inputs
9912 `(("python-six" ,python-six)))
9913 (home-page "https://kazoo.readthedocs.org")
9914 (synopsis "High-level Zookeeper client library")
9915 (description
9916 "Kazoo is a Python client library for the Apache Zookeeper distributed
9917 application service. It is designed to be easy to use and to avoid common
9918 programming errors.")
9919 (license license:asl2.0)))
9920
9921 (define-public python2-kazoo
9922 (package-with-python2 python-kazoo))
9923
9924 (define-public python-pykafka
9925 (package
9926 (name "python-pykafka")
9927 (version "2.4.0")
9928 (source (origin
9929 (method url-fetch)
9930 (uri (string-append
9931 "https://pypi.python.org/packages/8b/3e/"
9932 "384eeff406b06315738b62483fd2126c6e4f544167116b17cc04ea7d2a59/"
9933 "pykafka-" version ".tar.gz"))
9934 (sha256
9935 (base32
9936 "1id6sr159p6aa13bxcqyr9gln8sqg1l0ddzns5iws8kk5q1p5cfv"))))
9937 (build-system python-build-system)
9938 (arguments '(#:tests? #f)) ; XXX: needs zookeeper, kafka, etc.
9939 (propagated-inputs
9940 `(("python-gevent" ,python-gevent)
9941 ("python-kazoo" ,python-kazoo)
9942 ("python-tabulate" ,python-tabulate)))
9943 (inputs
9944 `(("librdkafka" ,librdkafka)))
9945 (home-page "https://pykafka.readthedocs.io/")
9946 (synopsis "Apache Kafka client for Python")
9947 (description
9948 "PyKafka is a client for the Apache Kafka distributed messaging system.
9949 It includes Python implementations of Kafka producers and consumers, which
9950 are optionally backed by a C extension built on librdkafka.")
9951 (license license:asl2.0)))
9952
9953 (define-public python2-pykafka
9954 (package-with-python2 python-pykafka))
9955
9956 (define-public python-wcwidth
9957 (package
9958 (name "python-wcwidth")
9959 (version "0.1.6")
9960 (source
9961 (origin
9962 (method url-fetch)
9963 (uri (string-append
9964 "https://pypi.python.org/packages/"
9965 "c2/d1/7689293086a8d5320025080cde0e3155b94ae0a7496fb89a3fbaa92c354a/"
9966 "wcwidth-" version ".tar.gz"))
9967 (sha256
9968 (base32
9969 "02wjrpf001gjdjsaxxbzcwfg19crlk2dbddayrfc2v06f53yrcyw"))))
9970 (build-system python-build-system)
9971 (home-page "https://github.com/jquast/wcwidth")
9972 (synopsis "Measure number of terminal column cells of wide-character codes")
9973 (description "Wcwidth measures the number of terminal column cells of
9974 wide-character codes. It is useful for those implementing a terminal emulator,
9975 or programs that carefully produce output to be interpreted by one. It is a
9976 Python implementation of the @code{wcwidth} and @code{wcswidth} C functions
9977 specified in POSIX.1-2001 and POSIX.1-2008.")
9978 (license license:expat)))
9979
9980 (define-public python2-wcwidth
9981 (package-with-python2 python-wcwidth))
9982
9983 (define-public python2-jsonrpclib
9984 (package
9985 (name "python2-jsonrpclib")
9986 (version "0.1.7")
9987 (source (origin
9988 (method url-fetch)
9989 (uri (string-append
9990 "https://pypi.python.org/packages/source/j/jsonrpclib/"
9991 "jsonrpclib-" version ".tar.gz"))
9992 (sha256
9993 (base32
9994 "02vgirw2bcgvpcxhv5hf3yvvb4h5wzd1lpjx8na5psdmaffj6l3z"))))
9995 (build-system python-build-system)
9996 (arguments
9997 `(#:tests? #f
9998 #:python ,python-2))
9999 (home-page "https://github.com/joshmarshall/jsonrpclib/")
10000 (synopsis "Implementation of JSON-RPC specification for Python")
10001 (description
10002 "This library is an implementation of the JSON-RPC specification.
10003 It supports both the original 1.0 specification, as well as the
10004 new (proposed) 2.0 spec, which includes batch submission, keyword arguments,
10005 etc.")
10006 (license license:asl2.0)))
10007
10008 (define-public python-chai
10009 (package
10010 (name "python-chai")
10011 (version "1.1.1")
10012 (source (origin
10013 (method url-fetch)
10014 (uri (pypi-uri "chai" version))
10015 (sha256
10016 (base32
10017 "016kf3irrclpkpvcm7q0gmkfibq7jgy30a9v73pp42bq9h9a32bl"))))
10018 (build-system python-build-system)
10019 (home-page "https://github.com/agoragames/chai")
10020 (synopsis "Mocking framework for Python")
10021 (description
10022 "Chai provides an api for mocking, stubbing and spying your python
10023 objects, patterned after the Mocha library for Ruby.")
10024 (license license:bsd-3)))
10025
10026 (define-public python2-chai
10027 (package-with-python2 python-chai))
10028
10029 (define-public python-arrow
10030 (package
10031 (name "python-arrow")
10032 (version "0.8.0")
10033 (source (origin
10034 (method url-fetch)
10035 (uri (pypi-uri "arrow" version))
10036 (sha256
10037 (base32
10038 "1bz7hkdgpqcjs866y58z8jywpy7al0f4rxdr00bh2l5qddyw245j"))))
10039 (build-system python-build-system)
10040 (native-inputs
10041 `(;; For testing
10042 ("python-chai" ,python-chai)
10043 ("python-simplejson" ,python-simplejson)))
10044 (propagated-inputs
10045 `(("python-dateutil" ,python-dateutil-2)))
10046 (home-page "https://github.com/crsmithdev/arrow/")
10047 (synopsis "Dates and times for Python")
10048 (description
10049 "Arrow is a Python library to creating, manipulating, formatting and
10050 converting dates, times, and timestamps. It implements and updates the
10051 datetime type.")
10052 (license license:asl2.0)))
10053
10054 (define-public python2-arrow
10055 (package-with-python2 python-arrow))
10056
10057 (define-public python-inflection
10058 (package
10059 (name "python-inflection")
10060 (version "0.3.1")
10061 (source
10062 (origin (method url-fetch)
10063 (uri (pypi-uri "inflection" version))
10064 (sha256
10065 (base32
10066 "1jhnxgnw8y3mbzjssixh6qkc7a3afc4fygajhqrqalnilyvpzshq"))))
10067 (build-system python-build-system)
10068 (home-page "http://github.com/jpvanhal/inflection")
10069 (synopsis "Python string transformation library")
10070 (description
10071 "Inflection is a string transformation library. It singularizes
10072 and pluralizes English words, and transforms strings from CamelCase to
10073 underscored string.")
10074 (license license:expat)))
10075
10076 (define-public python2-inflection
10077 (package-with-python2 python-inflection))
10078
10079 (define-public python-pylev
10080 (package
10081 (name "python-pylev")
10082 (version "1.3.0")
10083 (source (origin
10084 (method url-fetch)
10085 (uri (pypi-uri "pylev" version))
10086 (sha256
10087 (base32
10088 "1hz1x9blsbxya1y9nnhnwwdnqmakxi9mc0jkwj0rn6b1h44i0f86"))))
10089 (build-system python-build-system)
10090 (home-page "http://github.com/toastdriven/pylev")
10091 (synopsis "Levenshtein distance implementation in Python")
10092 (description "Pure Python Levenshtein implementation, based off the
10093 Wikipedia code samples at
10094 @url{http://en.wikipedia.org/wiki/Levenshtein_distance}.")
10095 (license license:bsd-3)))
10096
10097 (define-public python2-pylev
10098 (package-with-python2 python-pylev))
10099
10100 (define-public python-cleo
10101 (package
10102 (name "python-cleo")
10103 (version "0.4.1")
10104 (source (origin
10105 (method url-fetch)
10106 (uri (pypi-uri "cleo" version))
10107 (sha256
10108 (base32
10109 "1k2dcl6mqpn5bljyl6w42rqyd9mb3y9kh2mg7m2x3kfjwvg0rpva"))))
10110 (build-system python-build-system)
10111 (native-inputs
10112 `(;; For testing
10113 ("python-mock" ,python-mock)
10114 ("python-pytest" ,python-pytest)))
10115 (propagated-inputs
10116 `(("python-psutil" ,python-psutil)
10117 ("python-pylev" ,python-pylev)))
10118 (home-page "https://github.com/sdispater/cleo")
10119 (synopsis "Command-line arguments library for Python")
10120 (description
10121 "Cleo allows you to create command-line commands with signature in
10122 docstring and colored output.")
10123 (license license:expat)))
10124
10125 (define-public python2-cleo
10126 (package-with-python2 python-cleo))
10127
10128 (define-public python-lazy-object-proxy
10129 (package
10130 (name "python-lazy-object-proxy")
10131 (version "1.2.2")
10132 (source (origin
10133 (method url-fetch)
10134 (uri (pypi-uri "lazy-object-proxy" version))
10135 (sha256
10136 (base32
10137 "0s22aqqkdscyh8sjspyyax7qa1aiz8p4midrnyf39717fhfczm6x"))))
10138 (build-system python-build-system)
10139 (home-page "https://github.com/ionelmc/python-lazy-object-proxy")
10140 (synopsis "Lazy object proxy for python")
10141 (description
10142 "Lazy object proxy is an object that wraps a callable but defers the call
10143 until the object is actually required, and caches the result of said call.")
10144 (license license:bsd-2)))
10145
10146 (define-public python2-lazy-object-proxy
10147 (package-with-python2 python-lazy-object-proxy))
10148
10149 (define-public python-dnspython
10150 (package
10151 (name "python-dnspython")
10152 (version "1.15.0")
10153 (source (origin
10154 (method url-fetch)
10155 (uri (string-append "http://www.dnspython.org/kits/"
10156 version "/dnspython-" version ".tar.gz"))
10157 (sha256
10158 (base32
10159 "0jr4v2pd90i6l1xxbss2m05psbjaxvyvvvpq44wycijpfgjqln8i"))))
10160 (build-system python-build-system)
10161 (arguments '(#:tests? #f)) ; XXX: requires internet access
10162 (home-page "http://www.dnspython.org")
10163 (synopsis "DNS toolkit for Python")
10164 (description
10165 "dnspython is a DNS toolkit for Python. It supports almost all record
10166 types. It can be used for queries, zone transfers, and dynamic updates.
10167 It supports TSIG authenticated messages and EDNS0.")
10168 (license license:expat)))
10169
10170 (define-public python2-dnspython
10171 (package-with-python2 python-dnspython))
10172
10173 (define-public python-email-validator
10174 (package
10175 (name "python-email-validator")
10176 (version "1.0.1")
10177 (source
10178 (origin (method url-fetch)
10179 (uri (pypi-uri "email_validator" version))
10180 (sha256
10181 (base32
10182 "0mn8jg5h8ifl8w6a6m0hq8kbk0mzw9vm054qfamkn89b3npz52qw"))))
10183 (build-system python-build-system)
10184 (arguments
10185 '(#:phases
10186 (modify-phases %standard-phases
10187 (add-before 'build 'use-dnspython
10188 (lambda _
10189 (substitute* "setup.py"
10190 (("dnspython3") "dnspython"))
10191 #t)))))
10192 (propagated-inputs
10193 `(("python-dnspython" ,python-dnspython)
10194 ("python-idna" ,python-idna)))
10195 (home-page "https://github.com/JoshData/python-email-validator")
10196 (synopsis "Email address validation library for Python")
10197 (description
10198 "This library validates email address syntax and deliverability.")
10199 (license license:cc0)))
10200
10201 (define-public python2-email-validator
10202 (package-with-python2 python-email-validator))
10203
10204 (define-public python-ukpostcodeparser
10205 (package
10206 (name "python-ukpostcodeparser")
10207 (version "1.0.3")
10208 (source (origin
10209 (method url-fetch)
10210 (uri (pypi-uri "UkPostcodeParser" version))
10211 (sha256
10212 (base32
10213 "1jwg9z4rz51mcka1821rwgycsd0mcicyp1kiwjfa2kvg8bm9p2qd"))))
10214 (build-system python-build-system)
10215 (home-page "https://github.com/hamstah/ukpostcodeparser")
10216 (synopsis "UK Postcode parser for Python")
10217 (description
10218 "This library provides the @code{parse_uk_postcode} function for
10219 parsing UK postcodes.")
10220 (license license:expat)))
10221
10222 (define-public python2-ukpostcodeparser
10223 (package-with-python2 python-ukpostcodeparser))
10224
10225 (define-public python-fake-factory
10226 (package
10227 (name "python-fake-factory")
10228 (version "0.7.2")
10229 (source (origin
10230 (method url-fetch)
10231 (uri (pypi-uri "fake-factory" version))
10232 (sha256
10233 (base32
10234 "0vs0dkmg0dlaxf8w6q2i3k0i03gmp56ablldv7ci9x3nbadkn71g"))))
10235 (build-system python-build-system)
10236 (native-inputs
10237 `(;; For testing
10238 ("python-email-validator" ,python-email-validator)
10239 ("python-mock" ,python-mock)
10240 ("python-ukpostcodeparser" ,python-ukpostcodeparser)))
10241 (propagated-inputs
10242 `(("python-dateutil" ,python-dateutil-2)
10243 ("python-six" ,python-six)))
10244 (home-page "https://github.com/joke2k/faker")
10245 (synopsis "Python package that generates fake data")
10246 (description
10247 "Faker is a Python package that generates fake data such as names,
10248 addresses, and phone numbers.")
10249 (license license:expat)
10250 (properties `((python2-variant . ,(delay python2-fake-factory))))))
10251
10252 (define-public python2-fake-factory
10253 (let ((base (package-with-python2 (strip-python2-variant
10254 python-fake-factory))))
10255 (package
10256 (inherit base)
10257 (propagated-inputs
10258 `(("python2-ipaddress" ,python2-ipaddress)
10259 ,@(package-propagated-inputs base))))))
10260
10261 (define-public python-pyaml
10262 (package
10263 (name "python-pyaml")
10264 (version "15.8.2")
10265 (source (origin
10266 (method url-fetch)
10267 (uri (pypi-uri "pyaml" version))
10268 (sha256
10269 (base32
10270 "1f5m28vkh4ksq3d80d8mmd2z8wxvc3mgy2pmrv2751dm2xgznm4w"))))
10271 (build-system python-build-system)
10272 (propagated-inputs
10273 `(("python-pyyaml" ,python-pyyaml)))
10274 (home-page "https://github.com/mk-fg/pretty-yaml")
10275 (synopsis "YAML pretty-print library for Python")
10276 (description
10277 "pyaml is a PyYAML based python module to produce pretty and readable
10278 YAML-serialized data.")
10279 (license (license:non-copyleft "http://www.wtfpl.net/txt/copying/"))))
10280
10281 (define-public python2-pyaml
10282 (package-with-python2 python-pyaml))
10283
10284 (define-public python-flexmock
10285 (package
10286 (name "python-flexmock")
10287 (version "0.10.2")
10288 (source (origin
10289 (method url-fetch)
10290 (uri (pypi-uri "flexmock" version))
10291 (sha256
10292 (base32
10293 "0arc6njvs6i9v9hgvzk5m50296g7zy5m9d7pyb43vdsdgxrci5gy"))))
10294 (build-system python-build-system)
10295 (home-page "https://flexmock.readthedocs.org")
10296 (synopsis "Testing library for Python")
10297 (description
10298 "flexmock is a testing library for Python that makes it easy to create
10299 mocks, stubs and fakes.")
10300 (license license:bsd-3)))
10301
10302 (define-public python2-flexmock
10303 (package-with-python2 python-flexmock))
10304
10305 (define-public python-orator
10306 (package
10307 (name "python-orator")
10308 (version "0.8.2")
10309 (source (origin
10310 (method url-fetch)
10311 (uri (pypi-uri "orator" version))
10312 (sha256
10313 (base32
10314 "1li49irsqha17nrda4nsb48biyy0rarp9pphf0jpqwm5zr8hv569"))))
10315 (build-system python-build-system)
10316 (arguments '(#:tests? #f)) ; no tests
10317 (propagated-inputs
10318 `(("python-arrow" ,python-arrow)
10319 ("python-blinker" ,python-blinker)
10320 ("python-cleo" ,python-cleo)
10321 ("python-fake-factory" ,python-fake-factory)
10322 ("python-inflection" ,python-inflection)
10323 ("python-lazy-object-proxy" ,python-lazy-object-proxy)
10324 ("python-pyaml" ,python-pyaml)
10325 ("python-simplejson" ,python-simplejson)
10326 ("python-wrapt" ,python-wrapt)))
10327 (home-page "https://orator-orm.com/")
10328 (synopsis "ActiveRecord ORM for Python")
10329 (description
10330 "Orator provides a simple ActiveRecord-like Object Relational Mapping
10331 implementation for Python.")
10332 (license license:expat)
10333 (properties `((python2-variant . ,(delay python2-orator))))))
10334
10335 (define-public python2-orator
10336 (let ((base (package-with-python2 (strip-python2-variant python-orator))))
10337 (package
10338 (inherit base)
10339 (propagated-inputs
10340 `(("python2-ipaddress" ,python2-ipaddress)
10341 ,@(package-propagated-inputs base))))))
10342
10343 (define-public python-prompt-toolkit
10344 (package
10345 (name "python-prompt-toolkit")
10346 (version "1.0.7")
10347 (source
10348 (origin
10349 (method url-fetch)
10350 (uri (pypi-uri "prompt_toolkit" version ".tar.gz"))
10351 (sha256
10352 (base32
10353 "1vyjd0b7wciv55i19l44zy0adx8q7ss79lhy2r9d1rwz2y4822zg"))))
10354 (build-system python-build-system)
10355 (arguments
10356 '(#:tests? #f)) ; The test suite uses some Windows-specific data types.
10357 (propagated-inputs
10358 `(("python-wcwidth" ,python-wcwidth)
10359 ("python-pygments" ,python-pygments)))
10360 (native-inputs `(("python-six" ,python-six)))
10361 (home-page "https://github.com/jonathanslenders/python-prompt-toolkit")
10362 (synopsis "Library for building command line interfaces in Python")
10363 (description
10364 "Prompt-Toolkit is a library for building interactive command line
10365 interfaces in Python. It's like GNU Readline but it also features syntax
10366 highlighting while typing, out-of-the-box multi-line input editing, advanced
10367 code completion, incremental search, support for Chinese double-width
10368 characters, mouse support, and auto suggestions.")
10369 (license license:bsd-3)))
10370
10371 (define-public python2-prompt-toolkit
10372 (package-with-python2 python-prompt-toolkit))
10373
10374 (define-public python-jedi
10375 (package
10376 (name "python-jedi")
10377 (version "0.9.0")
10378 (source
10379 (origin
10380 (method url-fetch)
10381 (uri (pypi-uri "jedi" version))
10382 (sha256
10383 (base32
10384 "0c8x962ynpx001fdvp07m2q5jk4igkxbj3rmnydavphvlgxijk1v"))))
10385 (build-system python-build-system)
10386 (home-page "https://github.com/davidhalter/jedi")
10387 (synopsis
10388 "Autocompletion for Python that can be used for text editors")
10389 (description
10390 "Jedi is an autocompletion tool for Python that can be used for text editors.")
10391 (license license:expat)))
10392
10393 (define-public python2-jedi
10394 (package-with-python2 python-jedi))
10395
10396 (define-public ptpython
10397 (package
10398 (name "ptpython")
10399 (version "0.34")
10400 (source (origin
10401 (method url-fetch)
10402 (uri (pypi-uri "ptpython" version))
10403 (sha256
10404 (base32
10405 "1mmbiyzf0n8hm7z2a562x7w5cbl6jc0zsk6vp40q1z4cyblv1k13"))))
10406 (build-system python-build-system)
10407 (propagated-inputs
10408 `(("python-docopt" ,python-docopt)
10409 ("python-jedi" ,python-jedi)
10410 ("python-prompt-toolkit" ,python-prompt-toolkit)
10411 ("python-pygments" ,python-pygments)))
10412 (home-page "https://github.com/jonathanslenders/ptpython")
10413 (synopsis "Python Read-Eval-Print-Loop with nice IDE-like features")
10414 (description
10415 "ptpython is a Python read-eval-print loop with IDE-like features.
10416 It supports syntax highlighting, multiline editing, autocompletion, mouse,
10417 color schemes, bracketed paste, Vi and Emacs keybindings, Chinese characters
10418 etc.")
10419 (license license:bsd-3)
10420 (properties `((python2-variant . ,(delay ptpython-2))))))
10421
10422 (define-public ptpython-2
10423 (let ((base (package-with-python2 (strip-python2-variant ptpython))))
10424 (package
10425 (inherit base)
10426 (name "ptpython2"))))
10427
10428 (define-public python-requests-oauthlib
10429 (package
10430 (name "python-requests-oauthlib")
10431 (version "0.6.2")
10432 (source
10433 (origin
10434 (method url-fetch)
10435 (uri (pypi-uri "requests-oauthlib" version))
10436 (sha256
10437 (base32
10438 "0ykff67sjcl227c23g0rxzfx34rr5bf21kwv0z3zmgk0lfmch7hn"))))
10439 (build-system python-build-system)
10440 (arguments
10441 `(#:phases
10442 (modify-phases %standard-phases
10443 ;; removes tests that require network access
10444 (add-before 'check 'pre-check
10445 (lambda _
10446 (delete-file "tests/test_core.py")
10447 #t)))))
10448 (native-inputs
10449 `(("python-requests-mock" ,python-requests-mock)
10450 ("python-mock" ,python-mock)))
10451 (propagated-inputs
10452 `(("python-oauthlib" ,python-oauthlib)
10453 ("python-requests" ,python-requests)))
10454 (home-page
10455 "https://github.com/requests/requests-oauthlib")
10456 (synopsis
10457 "OAuthlib authentication support for Requests")
10458 (description
10459 "Requests-OAuthlib uses the Python Requests and OAuthlib libraries to
10460 provide an easy-to-use Python interface for building OAuth1 and OAuth2 clients.")
10461 (license license:isc)))
10462
10463 (define-public python2-requests-oauthlib
10464 (package-with-python2 python-requests-oauthlib))
10465
10466 (define-public python-stem
10467 (package
10468 (name "python-stem")
10469 (version "1.4.1b")
10470 (source
10471 (origin
10472 (method url-fetch)
10473 (uri (pypi-uri "stem" version ".tar.bz2"))
10474 (sha256
10475 (base32
10476 "09a3amp1y351nwz088ckiibbp666qi2lxwkyknavswfm400s0ns7"))))
10477 (build-system python-build-system)
10478 (arguments
10479 `(#:phases
10480 (modify-phases %standard-phases
10481 (replace 'check
10482 (lambda _
10483 (zero? (system* "./run_tests.py" "--unit")))))))
10484 (native-inputs
10485 `(("python-mock" ,python-mock)
10486 ("python-pep8" ,python-pep8)
10487 ("python-pyflakes" ,python-pyflakes)))
10488 (propagated-inputs
10489 `(("python-pycrypto" ,python-pycrypto)))
10490 (home-page "https://stem.torproject.org/")
10491 (synopsis
10492 "Python controller library that allows applications to interact with Tor")
10493 (description
10494 "Stem is a Python controller library for Tor. With it you can use Tor's
10495 control protocol to script against the Tor process and read descriptor data
10496 relays publish about themselves.")
10497 (license license:lgpl3)))
10498
10499 (define-public python2-stem
10500 (package-with-python2 python-stem))
10501
10502 (define-public python-pyserial
10503 (package
10504 (name "python-pyserial")
10505 (version "3.1.1")
10506 (source
10507 (origin
10508 (method url-fetch)
10509 (uri (pypi-uri "pyserial" version))
10510 (sha256
10511 (base32
10512 "0k1nfdrxxkdlv4zgaqsdv8li0pj3gbh2pyxw8q2bsg6f9490amyn"))))
10513 (build-system python-build-system)
10514 (home-page
10515 "https://github.com/pyserial/pyserial")
10516 (synopsis "Python Serial Port Bindings")
10517 (description "@code{pyserial} provide serial port bindings for Python. It
10518 supports different byte sizes, stop bits, parity and flow control with RTS/CTS
10519 and/or Xon/Xoff. The port is accessed in RAW mode.")
10520 (license license:bsd-3)))
10521
10522 (define-public python2-pyserial
10523 (package-with-python2 python-pyserial))
10524
10525 (define-public python-kivy
10526 (package
10527 (name "python-kivy")
10528 (version "1.9.1")
10529 (source
10530 (origin
10531 (method url-fetch)
10532 (uri (pypi-uri "kivy" version))
10533 (file-name (string-append name "-" version ".tar.gz"))
10534 (sha256
10535 (base32
10536 "0zk3g1j1z0lzcm9d0k1lprrs95zr8n8k5pdg3p5qlsn26jz4bg19"))))
10537 (build-system python-build-system)
10538 (arguments
10539 `(#:tests? #f ; Tests require many optional packages
10540 #:phases
10541 (modify-phases %standard-phases
10542 (replace 'build (lambda _ (zero? (system* "make" "force"))))
10543 (add-after 'patch-generated-file-shebangs 'set-sdl-paths
10544 (lambda* (#:key inputs #:allow-other-keys)
10545 (setenv "KIVY_SDL2_PATH"
10546 (string-append (assoc-ref inputs "sdl-union")
10547 "/include/SDL2"))
10548 #t)))))
10549 (native-inputs
10550 `(("pkg-config" ,pkg-config)
10551 ("python-cython" ,python-cython)))
10552 (inputs
10553 `(("gstreamer" ,gstreamer)
10554 ("mesa" ,mesa)
10555 ("sdl-union"
10556 ,(sdl-union (list sdl2 sdl2-image sdl2-mixer sdl2-ttf)))))
10557 (home-page "http://kivy.org")
10558 (synopsis
10559 "Multitouch application framework")
10560 (description
10561 "A software library for rapid development of
10562 hardware-accelerated multitouch applications.")
10563 (license license:expat)))
10564
10565 (define-public python2-kivy
10566 (package-with-python2 python-kivy))
10567
10568 (define-public python-kivy-next
10569 (let ((commit "a988c5e7a47da56263ff39514264a3de516ef2fe")
10570 (revision "1"))
10571 (package (inherit python-kivy)
10572 (name "python-kivy-next")
10573 (version (string-append "1.9.1-" revision "."
10574 (string-take commit 7)))
10575 (source
10576 (origin
10577 (method git-fetch)
10578 (uri (git-reference
10579 (url "https://github.com/kivy/kivy")
10580 (commit commit)))
10581 (file-name (string-append name "-" version "-checkout"))
10582 (sha256
10583 (base32
10584 "0jk92b4a8l7blkvkgkjihk171s0dfnq582cckff5srwc8kal5m0p")))))))
10585
10586 (define-public python2-kivy-next
10587 (package-with-python2 python-kivy-next))
10588
10589 (define-public python-binaryornot
10590 (package
10591 (name "python-binaryornot")
10592 (version "0.4.0")
10593 (source (origin
10594 (method url-fetch)
10595 (uri (pypi-uri "binaryornot" version))
10596 (sha256
10597 (base32
10598 "1j4f51dxic39mdwf6alj7gd769wy6mhk916v031wjali51xkh3xb"))))
10599 (build-system python-build-system)
10600 (propagated-inputs
10601 `(("python-chardet" ,python-chardet)
10602 ("python-hypothesis" ,python-hypothesis)))
10603 (home-page "https://github.com/audreyr/binaryornot")
10604 (synopsis "Package to check if a file is binary or text")
10605 (description "Ultra-lightweight pure Python package to check if a file is
10606 binary or text.")
10607 (license license:bsd-3)
10608 (properties `((python2-variant . ,(delay python2-binaryornot))))))
10609
10610 (define-public python2-binaryornot
10611 (let ((base (package-with-python2 (strip-python2-variant python-binaryornot))))
10612 (package (inherit base)
10613 (propagated-inputs
10614 `(("python2-enum34" ,python2-enum34)
10615 ,@(package-propagated-inputs base))))))
10616
10617 (define-public python-nltk
10618 (package
10619 (name "python-nltk")
10620 (version "3.2.1")
10621 (source (origin
10622 (method url-fetch)
10623 (uri (pypi-uri "nltk" version))
10624 (sha256
10625 (base32
10626 "0skxbhnymwlspjkzga0f7x1hg3y50fwpfghs8g8k7fh6f4nknlym"))))
10627 (build-system python-build-system)
10628 (arguments
10629 '(;; The tests require some extra resources to be downloaded.
10630 ;; TODO Try packaging these resources.
10631 #:tests? #f))
10632 (home-page "http://nltk.org/")
10633 (synopsis "Natural Language Toolkit")
10634 (description "It provides interfaces to over 50 corpora and lexical
10635 resources such as WordNet, along with a suite of text processing libraries
10636 for classification, tokenization, stemming, tagging, parsing, and semantic
10637 reasoning, wrappers for natural language processing libraries.")
10638 (license license:asl2.0)))
10639
10640 (define-public python2-nltk
10641 (package-with-python2 python-nltk))
10642
10643 (define-public python-pymongo
10644 (package
10645 (name "python-pymongo")
10646 (version "3.3.0")
10647 (source (origin
10648 (method url-fetch)
10649 (uri (pypi-uri "pymongo" version))
10650 (sha256
10651 (base32
10652 "07mra6w86wjqy4lx5fvimidjhhfzd562gfjn8grsnbv2q8pk0i9x"))))
10653 (build-system python-build-system)
10654 (propagated-inputs
10655 `(("python-certifi" ,python-certifi)))
10656 (home-page "http://github.com/mongodb/mongo-python-driver")
10657 (synopsis "Python driver for MongoDB")
10658 (description "Python driver for MongoDB.")
10659 (license license:asl2.0)))
10660
10661 (define-public python2-pymongo
10662 (package-with-python2 python-pymongo))
10663
10664 (define-public python-sh
10665 (package
10666 (name "python-sh")
10667 (version "1.11")
10668 (source (origin
10669 (method url-fetch)
10670 (uri (pypi-uri "sh" version))
10671 (sha256
10672 (base32
10673 "192r0mpv6dmkysjzhc43ddffiwb5g7c76bgr1mb1z2xz9awbj3sr"))))
10674 (build-system python-build-system)
10675 (arguments
10676 `(#:tests? #f)) ; no tests
10677 (home-page "https://github.com/amoffat/sh")
10678 (synopsis "Python subprocess interface")
10679 (description "Abstracts process invocation by providing a function
10680 interface for programs.")
10681 (license license:expat)))
10682
10683 (define-public python2-sh
10684 (package-with-python2 python-sh))
10685
10686 (define-public python-consul
10687 (package
10688 (name "python-consul")
10689 (version "0.6.1")
10690 (source
10691 (origin
10692 (method url-fetch)
10693 (uri (pypi-uri "python-consul" version))
10694 (sha256
10695 (base32
10696 "0rfyxcy4cr3x848vhx876ifalxd5ghq6l5x813m49h4vq2d4jiq8"))))
10697 (build-system python-build-system)
10698 (native-inputs
10699 `(("python-pytest" ,python-pytest)
10700 ("python-requests" ,python-requests)
10701 ("python-six" ,python-six)))
10702 (home-page "https://github.com/cablehead/python-consul")
10703 (synopsis "Python client for Consul")
10704 (description
10705 "Python client for @url{http://www.consul.io/,Consul}, a tool for service
10706 discovery, monitoring and configuration.")
10707 (license license:expat)))
10708
10709 (define-public python2-consul
10710 (package-with-python2 python-consul))
10711
10712 (define-public python-schematics
10713 (package
10714 (name "python-schematics")
10715 (version "1.1.1")
10716 (source
10717 (origin
10718 (method url-fetch)
10719 (uri (string-append
10720 "https://github.com/schematics/schematics/archive/v" version ".tar.gz"))
10721 (file-name (string-append name "-" version ".tar.gz"))
10722 (sha256
10723 (base32
10724 "19v1i69bf3bzarfxmbv0v6ivpcn758x3shvbiy9l2hy0lvqwnp6l"))))
10725 (build-system python-build-system)
10726 (propagated-inputs
10727 `(("python-six" ,python-six)))
10728 (arguments
10729 `(#:tests? #f)) ; requires a bunch of not very nice packages with fixed
10730 ; version requirements (eg python-coveralls)
10731 (home-page "https://github.com/schematics/schematics")
10732 (synopsis "Python Data Structures for Humans")
10733 (description "Python Data Structures for Humans.")
10734 (license license:bsd-3)))
10735
10736 (define-public python2-schematics
10737 (package-with-python2 python-schematics))
10738
10739 (define-public python-publicsuffix
10740 (package
10741 (name "python-publicsuffix")
10742 (version "1.1.0")
10743 (source (origin
10744 (method url-fetch)
10745 (uri (pypi-uri "publicsuffix" version))
10746 (sha256
10747 (base32
10748 "1adx520249z2cy7ykwjr1k190mn2888wqn9jf8qm27ly4qymjxxf"))))
10749 (build-system python-build-system)
10750 (arguments
10751 `(#:tests? #f)) ; tests use the internet
10752 (home-page "https://www.tablix.org/~avian/git/publicsuffix.git")
10753 (synopsis "Get suffix for a domain name")
10754 (description "Get a public suffix for a domain name using the Public Suffix
10755 List.")
10756 (license license:expat)))
10757
10758 (define-public python2-publicsuffix
10759 (package-with-python2 python-publicsuffix))
10760
10761 (define-public python-publicsuffix2
10762 (package
10763 (name "python-publicsuffix2")
10764 (version "2.20160621")
10765 (source
10766 (origin
10767 (method url-fetch)
10768 (uri (pypi-uri "publicsuffix2" version ".tar.bz2"))
10769 (sha256
10770 (base32
10771 "06lx603gdwad5hc3hmn763ngq0rq9bzz1ni3ga72nzk5n872arkd"))))
10772 (build-system python-build-system)
10773 (arguments
10774 '(#:tests? #f)) ; The test suite requires network access.
10775 (home-page "https://github.com/pombredanne/python-publicsuffix2")
10776 (synopsis "Get a public suffix for a domain name using the Public Suffix List")
10777 (description "Get a public suffix for a domain name using the Public Suffix
10778 List. Forked from and using the same API as the publicsuffix package.")
10779 (license (list license:expat license:mpl2.0))))
10780
10781 (define-public python2-publicsuffix2
10782 (package-with-python2 python-publicsuffix2))
10783
10784 (define-public python-url
10785 (package
10786 (name "python-url")
10787 (version "0.2.0")
10788 (source (origin
10789 (method url-fetch)
10790 (uri (pypi-uri "url" version))
10791 (sha256
10792 (base32
10793 "0v879yadcz9qxfl41ak6wkga1kimp9cflla9ddz03hjjvgkqy5ki"))))
10794 (build-system python-build-system)
10795 (propagated-inputs
10796 `(("python-publicsuffix" ,python-publicsuffix)))
10797 (native-inputs
10798 `(("python-coverage" ,python-coverage)
10799 ("python-nose" ,python-nose)))
10800 (arguments
10801 `(#:tests? #f)) ; FIXME: tests fail with "ImportError: No module named 'tests'"
10802 (home-page "http://github.com/seomoz/url-py")
10803 (synopsis "URL Parsing")
10804 (description "Library for parsing urls.")
10805 (license license:expat)
10806 (properties `((python2-variant . ,(delay python2-url))))))
10807
10808 (define-public python2-url
10809 (let ((base (package-with-python2 (strip-python2-variant python-url))))
10810 (package (inherit base)
10811 (propagated-inputs
10812 `(("python2-publicsuffix" ,python2-publicsuffix))))))
10813
10814 (define-public python-freezegun
10815 (package
10816 (name "python-freezegun")
10817 (version "0.3.7")
10818 (source
10819 (origin
10820 (method url-fetch)
10821 (uri (pypi-uri "freezegun" version))
10822 (sha256
10823 (base32
10824 "14l19x06v5jkq4rdwbmfyw4x9lrjb2300afrk21r1ash7y1y9a0w"))))
10825 (build-system python-build-system)
10826 (native-inputs
10827 `(("python-mock" ,python-mock)
10828 ("python-nose" ,python-nose)
10829 ("python-coverage" ,python-coverage)
10830 ("python-dateutil-2" ,python-dateutil-2)))
10831 (propagated-inputs
10832 `(("python-six" ,python-six)))
10833 (arguments
10834 `(#:phases (modify-phases %standard-phases
10835 ;; The tests are normally executed via `make test`, but the PyPi
10836 ;; package does not include the Makefile.
10837 (replace 'check
10838 (lambda _
10839 (zero? (system* "nosetests" "./tests/")))))))
10840 (home-page "https://github.com/spulec/freezegun")
10841 (synopsis "Test utility for mocking the datetime module")
10842 (description
10843 "FreezeGun is a library that allows your python tests to travel through
10844 time by mocking the datetime module.")
10845 (license license:asl2.0)))
10846
10847 (define-public python2-freezegun
10848 (package-with-python2 python-freezegun))
10849
10850
10851 (define-public python-odfpy
10852 (package
10853 (name "python-odfpy")
10854 (version "1.3.3")
10855 (source (origin
10856 (method url-fetch)
10857 (uri (pypi-uri "odfpy" version))
10858 (sha256
10859 (base32
10860 "1a6ms0w9zfhhkqhvrnynwwbxrivw6hgjc0s5k7j06npc7rq0blxw"))))
10861 (arguments
10862 `(#:modules ((srfi srfi-1)
10863 (guix build python-build-system)
10864 (guix build utils))
10865 #:phases
10866 (modify-phases %standard-phases
10867 (replace 'check
10868 ;; The test runner invokes python2 and python3 for test*.py.
10869 ;; To avoid having both in inputs, we replicate it here.
10870 (lambda _
10871 (every (lambda (test-file)
10872 (zero? (system* "python" test-file)))
10873 (find-files "tests" "^test.*\\.py$")))))))
10874 (build-system python-build-system)
10875 (home-page "https://github.com/eea/odfpy")
10876 (synopsis "Python API and tools to manipulate OpenDocument files")
10877 (description "Collection of libraries and utility programs written in
10878 Python to manipulate OpenDocument 1.2 files.")
10879 (license
10880 ;; The software is mainly dual GPL2+ and ASL2.0, but includes a
10881 ;; number of files with other licenses.
10882 (list license:gpl2+ license:asl2.0 license:lgpl2.1+ license:cc-by-sa3.0))))
10883
10884 (define-public python2-odfpy
10885 (package-with-python2 python-odfpy))
10886
10887 (define-public python-cachecontrol
10888 (package
10889 (name "python-cachecontrol")
10890 (version "0.11.6")
10891 (source
10892 (origin
10893 (method url-fetch)
10894 ;; Pypi does not have tests.
10895 (uri (string-append
10896 "https://github.com/ionrock/cachecontrol/archive/v"
10897 version ".tar.gz"))
10898 (file-name (string-append name "-" version ".tar.gz"))
10899 (sha256
10900 (base32
10901 "0yj60d0f69a2l8p7y86k4zhzzm6rnxpq74sfl240pry9l0lfw2vw"))))
10902 (build-system python-build-system)
10903 (arguments
10904 `(#:phases
10905 (modify-phases %standard-phases
10906 (replace 'check
10907 (lambda _
10908 ;; Drop test that requires internet access.
10909 (delete-file "tests/test_regressions.py")
10910 (setenv "PYTHONPATH"
10911 (string-append (getcwd) "/build/lib:"
10912 (getenv "PYTHONPATH")))
10913 (zero? (system* "py.test" "-vv")))))))
10914 (native-inputs
10915 `(("python-pytest" ,python-pytest)
10916 ("python-redis" ,python-redis)
10917 ("python-webtest" ,python-webtest)
10918 ("python-mock" ,python-mock)))
10919 (propagated-inputs
10920 `(("python-requests" ,python-requests)
10921 ("python-lockfile" ,python-lockfile)))
10922 (home-page "https://github.com/ionrock/cachecontrol")
10923 (synopsis "The httplib2 caching algorithms for use with requests")
10924 (description "CacheControl is a port of the caching algorithms in
10925 @code{httplib2} for use with @code{requests} session objects.")
10926 (license license:asl2.0)))
10927
10928 (define-public python2-cachecontrol
10929 (package-with-python2 python-cachecontrol))
10930
10931 (define-public python-lit
10932 (package
10933 (name "python-lit")
10934 (version "0.5.0")
10935 (source
10936 (origin
10937 (method url-fetch)
10938 (uri (pypi-uri "lit" version))
10939 (sha256
10940 (base32
10941 "135m2b9cwih85g66rjggavck328z7lj37srgpq3jxszbg0g2b91y"))))
10942 (build-system python-build-system)
10943 (home-page "http://llvm.org/")
10944 (synopsis "LLVM Software Testing Tool")
10945 (description "@code{lit} is a portable tool for executing LLVM and Clang
10946 style test suites, summarizing their results, and providing indication of
10947 failures.")
10948 (license license:ncsa)))
10949
10950 (define-public python2-lit
10951 (package-with-python2 python-lit))
10952
10953 (define-public python-pytest-pep8
10954 (package
10955 (name "python-pytest-pep8")
10956 (version "1.0.6")
10957 (source (origin
10958 (method url-fetch)
10959 (uri (pypi-uri "pytest-pep8" version))
10960 (sha256
10961 (base32
10962 "06032agzhw1i9d9qlhfblnl3dw5hcyxhagn7b120zhrszbjzfbh3"))))
10963 (build-system python-build-system)
10964 (arguments
10965 `(#:tests? #f)) ; Fails with recent pytest and pep8. See upstream issues #8 and #12.
10966 (native-inputs
10967 `(("python-pytest" ,python-pytest)))
10968 (propagated-inputs
10969 `(("python-pep8" ,python-pep8)))
10970 (home-page "https://bitbucket.org/pytest-dev/pytest-pep8")
10971 (synopsis "Py.test plugin to check PEP8 requirements")
10972 (description "Pytest plugin for checking PEP8 compliance.")
10973 (license license:expat)))
10974
10975 (define-public python2-pytest-pep8
10976 (package-with-python2 python-pytest-pep8))
10977
10978 (define-public python-pytest-flakes
10979 (package
10980 (name "python-pytest-flakes")
10981 (version "1.0.1")
10982 (source (origin
10983 (method url-fetch)
10984 (uri (pypi-uri "pytest-flakes" version))
10985 (sha256
10986 (base32
10987 "0flag3n33kbhyjrhzmq990rvg4yb8hhhl0i48q9hw0ll89jp28lw"))))
10988 (build-system python-build-system)
10989 (arguments
10990 `(#:phases
10991 (modify-phases %standard-phases
10992 (delete 'check)
10993 (add-after 'install 'check
10994 (lambda* (#:key outputs inputs #:allow-other-keys)
10995 ;; It's easier to run tests after install.
10996 ;; Make installed package available for running the tests
10997 (add-installed-pythonpath inputs outputs)
10998 (zero? (system* "py.test" "-vv")))))))
10999 (native-inputs
11000 `(("python-coverage" ,python-coverage)
11001 ("python-pytest" ,python-pytest)
11002 ("python-pytest-cache" ,python-pytest-cache)
11003 ("python-pytest-pep8" ,python-pytest-pep8)))
11004 (propagated-inputs
11005 `(("python-pyflakes" ,python-pyflakes)))
11006 (home-page "https://github.com/fschulze/pytest-flakes")
11007 (synopsis "Py.test plugin to check source code with pyflakes")
11008 (description "Pytest plugin for checking Python source code with pyflakes.")
11009 (license license:expat)))
11010
11011 (define-public python2-pytest-flakes
11012 (package-with-python2 python-pytest-flakes))
11013
11014 (define-public python-natsort
11015 (package
11016 (name "python-natsort")
11017 (version "5.0.1")
11018 (source (origin
11019 (method url-fetch)
11020 (uri (pypi-uri "natsort" version))
11021 (sha256
11022 (base32
11023 "1abld5p4a6n5zjnyw5mi2pv37gqalcybv2brjr2y6l9l2p8v9mja"))))
11024 (build-system python-build-system)
11025 (arguments
11026 `(#:phases
11027 (modify-phases %standard-phases
11028 (add-before 'check 'set-cachedir
11029 ;; Tests require write access to $HOME by default
11030 (lambda _ (setenv "PYTHON_EGG_CACHE" "/tmp") #t)))))
11031 (native-inputs
11032 `(("python-hypothesis" ,python-hypothesis)
11033 ("python-pytest-cache" ,python-pytest-cache)
11034 ("python-pytest-cov" ,python-pytest-cov)
11035 ("python-pytest-flakes" ,python-pytest-flakes)
11036 ("python-pytest-pep8" ,python-pytest-pep8)))
11037 (propagated-inputs ; TODO: Add python-fastnumbers.
11038 `(("python-pyicu" ,python-pyicu)))
11039 (home-page "https://github.com/SethMMorton/natsort")
11040 (synopsis "Natural sorting for python and shell")
11041 (description
11042 "Natsort lets you apply natural sorting on lists instead of
11043 lexicographical. If you use the built-in @code{sorted} method in python
11044 on a list such as @code{['a20', 'a9', 'a1', 'a4', 'a10']}, it would be
11045 returned as @code{['a1', 'a10', 'a20', 'a4', 'a9']}. Natsort provides a
11046 function @code{natsorted} that identifies numbers and sorts them separately
11047 from strings. It can also sort version numbers, real numbers, mixed types
11048 and more, and comes with a shell command @command{natsort} that exposes this
11049 functionality in the command line.")
11050 (license license:expat)
11051 (properties `((python2-variant . ,(delay python2-natsort))))))
11052
11053 (define-public python2-natsort
11054 (let ((base (package-with-python2 (strip-python2-variant python-natsort))))
11055 (package (inherit base)
11056 (native-inputs
11057 `(("python2-pathlib" ,python2-pathlib)
11058 ("python2-mock" ,python2-mock)
11059 ("python2-enum34" ,python2-enum34)
11060 ,@(package-native-inputs base))))))
11061
11062 (define-public python-glances
11063 (package
11064 (name "python-glances")
11065 (version "2.7.1")
11066 (source
11067 (origin
11068 (method url-fetch)
11069 (uri (pypi-uri "Glances" version))
11070 (sha256
11071 (base32
11072 "11jbq40g8alsbirnd4kiagznqg270247i0m8qhi48ldf2i5xppxg"))))
11073 (build-system python-build-system)
11074 (propagated-inputs
11075 `(("python-psutil" ,python-psutil)))
11076 (home-page
11077 "https://github.com/nicolargo/glances")
11078 (synopsis
11079 "A cross-platform curses-based monitoring tool")
11080 (description
11081 "Glances is a curses-based monitoring tool for a wide variety of platforms.
11082 Glances uses the PsUtil library to get information from your system. It monitors
11083 CPU, load, memory, network bandwidth, disk I/O, disk use, and more.")
11084 (license license:lgpl3+)))
11085
11086 (define-public python2-glances
11087 (package-with-python2 python-glances))
11088
11089 (define-public python-graphql-core
11090 (package
11091 (name "python-graphql-core")
11092 (version "0.5.3")
11093 (source
11094 (origin
11095 (method url-fetch)
11096 (uri (pypi-uri "graphql-core" version))
11097 (sha256
11098 (base32
11099 "0rsaarx2sj4xnw9966rhh4haiqaapm4lm2mfqm48ywd51j5vh1a0"))))
11100 (build-system python-build-system)
11101 (arguments
11102 `(#:tests? #f ; Tests require the unpackaged pytest-benchmark.
11103 #:phases
11104 (modify-phases %standard-phases
11105 (add-after 'unpack 'patch-hardcoded-version
11106 (lambda _ (substitute*
11107 "setup.py"
11108 (("'gevent==1.1rc1'") "'gevent'"))
11109 #t)))))
11110 (native-inputs
11111 `(("python-gevent" ,python-gevent)
11112 ("python-mock" ,python-mock)
11113 ("python-pytest-mock" ,python-pytest-mock)))
11114 (propagated-inputs
11115 `(("python-promise" ,python-promise)
11116 ("python-six" ,python-six)))
11117 (home-page "https://github.com/graphql-python/graphql-core")
11118 (synopsis "GraphQL implementation for Python")
11119 (description
11120 "GraphQL implementation for Python. GraphQL is a data query language and
11121 runtime designed and used to request and deliver data to mobile and web apps.
11122 This library is a port of @url{https://github.com/graphql/graphql-js,graphql-js}
11123 to Python.")
11124 (license license:expat)))
11125
11126 (define-public python2-graphql-core
11127 (package-with-python2 python-graphql-core))
11128
11129 (define-public python-graphql-relay
11130 (package
11131 (name "python-graphql-relay")
11132 (version "0.4.4")
11133 (source
11134 (origin
11135 (method url-fetch)
11136 (uri (pypi-uri "graphql-relay" version))
11137 (sha256
11138 (base32
11139 "04wr9ayshxjjdcg2v21c7ffbz36kif1wjl3604fqd3qignb3fbxi"))))
11140 (build-system python-build-system)
11141 (native-inputs
11142 `(("python-pytest" ,python-pytest)))
11143 (propagated-inputs
11144 `(("python-graphql-core" ,python-graphql-core)
11145 ("python-promise" ,python-promise)
11146 ("python-six" ,python-six)))
11147 (home-page "https://github.com/graphql-python/graphql-relay-py")
11148 (synopsis "Relay implementation for Python")
11149 (description
11150 "This is a library to allow the easy creation of Relay-compliant servers
11151 using the GraphQL Python reference implementation of a GraphQL server. It
11152 should be noted that the code is a exact port of the original
11153 @url{https://github.com/graphql/graphql-relay-js,graphql-relay js implementation}
11154 from Facebook.")
11155 (license license:expat)))
11156
11157 (define-public python2-graphql-relay
11158 (package-with-python2 python-graphql-relay))
11159
11160 (define-public python-graphene
11161 (package
11162 (name "python-graphene")
11163 (version "0.10.2")
11164 (source
11165 (origin
11166 (method url-fetch)
11167 (uri (pypi-uri "graphene" version))
11168 (sha256
11169 (base32
11170 "09zhac7igh9ixdz0ay6csy35b40l1jwbf2wrbxmgxwfhy51iy06q"))))
11171 (build-system python-build-system)
11172 (native-inputs
11173 `(("python-django-filter" ,python-django-filter)
11174 ("python-mock" ,python-mock)
11175 ("python-psycopg2" ,python-psycopg2)
11176 ("python-pytest-django" ,python-pytest-django)
11177 ("python-sqlalchemy-utils" ,python-sqlalchemy-utils)))
11178 (propagated-inputs
11179 `(("python-graphql-core" ,python-graphql-core)
11180 ("python-graphql-relay" ,python-graphql-relay)
11181 ("python-iso8601" ,python-iso8601)
11182 ("python-promise" ,python-promise)
11183 ("python-six" ,python-six)))
11184 (home-page "http://graphene-python.org/")
11185 (synopsis "GraphQL Framework for Python")
11186 (description
11187 "Graphene is a Python library for building GraphQL schemas/types.
11188 A GraphQL schema describes your data model, and provides a GraphQL server
11189 with an associated set of resolve methods that know how to fetch data.")
11190 (properties `((python2-variant . ,(delay python2-graphene))))
11191 (license license:expat)))
11192
11193 (define-public python2-graphene
11194 (let ((base (package-with-python2
11195 (strip-python2-variant python-graphene))))
11196 (package (inherit base)
11197 (native-inputs
11198 `(("python2-sqlalchemy" ,python2-sqlalchemy)
11199 ,@(package-native-inputs base))))))
11200
11201 (define-public python-nautilus
11202 (package
11203 (name "python-nautilus")
11204 (version "0.4.9")
11205 (source
11206 (origin
11207 (method url-fetch)
11208 (uri (pypi-uri "nautilus" version))
11209 (sha256
11210 (base32
11211 "01hwzjc1zshk4vvxrcghm398fpy4jls66dyz06g07mrwqif8878p"))))
11212 (build-system python-build-system)
11213 (arguments `(#:tests? #f)) ; fails to import test modules
11214 (propagated-inputs
11215 `(("python-bcrypt" ,python-bcrypt)
11216 ("python-click" ,python-click)
11217 ("python-consul" ,python-consul)
11218 ("python-graphql-core" ,python-graphql-core)
11219 ("python-graphql-relay" ,python-graphql-relay)
11220 ("python-graphene" ,python-graphene)
11221 ("python-jinja2" ,python-jinja2)
11222 ("python-nose2" ,python-nose2)
11223 ("python-peewee" ,python-peewee)
11224 ("python-pika" ,python-pika)
11225 ("python-pycparser" ,python-pycparser)
11226 ("python-requests" ,python-requests)
11227 ("python-tornado" ,python-tornado)
11228 ("python-wtforms" ,python-wtforms)))
11229 (home-page "https://github.com/AlecAivazis/nautilus")
11230 (synopsis "Library for creating microservice applications")
11231 (description
11232 "Nautilus is a framework for flux based microservices that looks to
11233 provide extendible implementations of common aspects of a cloud so that you can
11234 focus on building massively scalable web applications.")
11235 (license license:expat)))
11236
11237 (define-public python-betamax
11238 (package
11239 (name "python-betamax")
11240 (version "0.8.0")
11241 (source
11242 (origin
11243 (method url-fetch)
11244 (uri (pypi-uri "betamax" version))
11245 (sha256
11246 (base32
11247 "18f8v5gng3j773jlbbzx4rg1i4y2zw3m2l1zpmbvp8bh5a2q1i42"))))
11248 (build-system python-build-system)
11249 (arguments
11250 '(;; Many tests fail because they require networking.
11251 #:tests? #f))
11252 (inputs
11253 `(("python-requests" ,python-requests)))
11254 (home-page "https://github.com/sigmavirus24/betamax")
11255 (synopsis "Record HTTP interactions with python-requests")
11256 (description "Betamax will record your test suite's HTTP interactions and
11257 replay them during future tests. It is designed to work with python-requests.")
11258 (license license:expat)))
11259
11260 (define-public python2-betamax
11261 (package-with-python2 python-betamax))
11262
11263 (define-public python-s3transfer
11264 (package
11265 (name "python-s3transfer")
11266 (version "0.1.8")
11267 (source (origin
11268 (method url-fetch)
11269 (uri (pypi-uri "s3transfer" version))
11270 (sha256
11271 (base32
11272 "1jivjkp3xqif9gzr5fiq28jsskmh50vzzd7ldsb4rbyiw1iyv3hy"))))
11273 (build-system python-build-system)
11274 (arguments
11275 `(#:phases
11276 (modify-phases %standard-phases
11277 (replace 'check
11278 (lambda _
11279 ;; 7 of the 'integration' tests require network access or login
11280 ;; credentials.
11281 (zero? (system* "nosetests" "--exclude=integration")))))))
11282 (native-inputs
11283 `(("python-docutils" ,python-docutils)
11284 ("python-mock" ,python-mock)
11285 ("python-nose" ,python-nose)))
11286 (propagated-inputs
11287 `(("python-botocore" ,python-botocore)))
11288 (synopsis "Amazon S3 Transfer Manager")
11289 (description "S3transfer is a Python library for managing Amazon S3
11290 transfers.")
11291 (home-page "https://github.com/boto/s3transfer")
11292 (license license:asl2.0)
11293 (properties `((python2-variant . ,(delay python2-s3transfer))))))
11294
11295 (define-public python2-s3transfer
11296 (let ((base (package-with-python2 (strip-python2-variant python-s3transfer))))
11297 (package
11298 (inherit base)
11299 (native-inputs
11300 `(("python2-futures" ,python2-futures)
11301 ,@(package-native-inputs base))))))
11302
11303 (define-public python-setproctitle
11304 (package
11305 (name "python-setproctitle")
11306 (version "1.1.10")
11307 (source
11308 (origin
11309 (method url-fetch)
11310 (uri (pypi-uri "setproctitle" version))
11311 (sha256
11312 (base32
11313 "163kplw9dcrw0lffq1bvli5yws3rngpnvrxrzdw89pbphjjvg0v2"))))
11314 (build-system python-build-system)
11315 (arguments
11316 '(#:phases
11317 (modify-phases %standard-phases
11318 (add-before 'check 'patch-Makefile
11319 ;; Stricly this is only required for the python2 variant.
11320 ;; But adding a phase in an inherited package seems to be
11321 ;; cumbersum. So we patch even for python3.
11322 (lambda _
11323 (let ((nose (assoc-ref %build-inputs "python2-nose")))
11324 (when nose
11325 (substitute* "Makefile"
11326 (("\\$\\(PYTHON\\) [^ ]which nosetests[^ ] ")
11327 (string-append nose "/bin/nosetests "))))
11328 #t)))
11329 (replace 'check
11330 (lambda _
11331 (setenv "PYTHON" (or (which "python3") (which "python")))
11332 (setenv "PYCONFIG" (or (which "python3-config")
11333 (which "python-config")))
11334 (setenv "CC" "gcc")
11335 ;; No need to extend PYTHONPATH to find the built package, since
11336 ;; the Makefile will build anyway
11337 (zero? (system* "make" "check")))))))
11338 (native-inputs
11339 `(("procps" ,procps))) ; required for tests
11340 (home-page
11341 "https://github.com/dvarrazzo/py-setproctitle")
11342 (synopsis
11343 "Setproctitle implementation for Python to customize the process title")
11344 (description "The library allows a process to change its title (as displayed
11345 by system tools such as ps and top).
11346
11347 Changing the title is mostly useful in multi-process systems, for
11348 example when a master process is forked: changing the children's title
11349 allows to identify the task each process is busy with. The technique
11350 is used by PostgreSQL and the OpenSSH Server for example.")
11351 (license license:bsd-3)
11352 (properties `((python2-variant . ,(delay python2-setproctitle))))))
11353
11354 (define-public python2-setproctitle
11355 (let ((base (package-with-python2
11356 (strip-python2-variant python-setproctitle))))
11357 (package
11358 (inherit base)
11359 (native-inputs `(("python2-nose" ,python2-nose)
11360 ,@(package-native-inputs base))))))
11361
11362 (define-public python-validictory
11363 (package
11364 (name "python-validictory")
11365 (version "1.0.1")
11366 (source
11367 (origin
11368 (method url-fetch)
11369 (uri (pypi-uri "validictory" version))
11370 (sha256
11371 (base32
11372 "1zf1g9sw47xzp5f80bd94pb42j9yqv82lcrgcvdwr6nkaphfi37q"))))
11373 (build-system python-build-system)
11374 (arguments
11375 '(#:phases
11376 (modify-phases %standard-phases
11377 (add-after 'unpack 'bootstrap
11378 ;; Move the tests out of the package directory to avoid
11379 ;; packaging them.
11380 (lambda* _
11381 (rename-file "validictory/tests" "tests")
11382 (delete-file "tests/__init__.py")))
11383 (replace 'check
11384 (lambda _
11385 ;; Extend PYTHONPATH so the built package will be found.
11386 (setenv "PYTHONPATH"
11387 (string-append (getcwd) "/build/lib:"
11388 (getenv "PYTHONPATH")))
11389 (zero? (system* "py.test" "-vv" )))))))
11390 (native-inputs
11391 `(("python-pytest" ,python-pytest)))
11392 (home-page
11393 "https://github.com/jamesturk/validictory")
11394 (synopsis "General purpose Python data validator")
11395 (description "It allows validation of arbitrary Python data structures.
11396
11397 The schema format is based on the JSON Schema
11398 proposal (http://json-schema.org), so combined with json the library is also
11399 useful as a validator for JSON data.")
11400 (license license:expat)))
11401
11402 (define-public python2-validictory
11403 (package-with-python2 python-validictory))
11404
11405 (define-public python-aniso8601
11406 (package
11407 (name "python-aniso8601")
11408 (version "1.1.0")
11409 (source
11410 (origin
11411 (method url-fetch)
11412 (uri (pypi-uri "aniso8601" version))
11413 (sha256
11414 (base32
11415 "1k5mjg9iqbjfslb5prrsfz7dhlvi6s35p1jxq8dm87w1b7dn5i2g"))))
11416 (build-system python-build-system)
11417 (propagated-inputs
11418 `(("python-dateutil-2" ,python-dateutil-2)))
11419 (home-page
11420 "https://bitbucket.org/nielsenb/aniso8601")
11421 (synopsis
11422 "Python library for parsing ISO 8601 strings")
11423 (description
11424 "This package contains a library for parsing ISO 8601 datetime strings.")
11425 (license license:bsd-3)))
11426
11427 (define-public python-flask-restful
11428 (package
11429 (name "python-flask-restful")
11430 (version "0.3.5")
11431 (source
11432 (origin
11433 (method url-fetch)
11434 (uri (pypi-uri "Flask-RESTful" version))
11435 (sha256
11436 (base32
11437 "0hjcmdb56b7z4bkw848lxfkyrpnkwzmqn2dgnlv12mwvjpzsxr6c"))))
11438 (build-system python-build-system)
11439 (propagated-inputs
11440 `(("python-aniso8601" ,python-aniso8601)
11441 ("python-flask" ,python-flask)
11442 ("python-pycrypto" ,python-pycrypto)
11443 ("python-pytz" ,python-pytz)))
11444 (native-inputs
11445 `(;; Optional dependency of Flask. Tests need it.
11446 ("python-blinker" ,python-blinker)
11447 ("python-mock" ,python-mock) ; For tests
11448 ("python-nose" ,python-nose) ; For tests
11449 ("python-sphinx" ,python-sphinx)))
11450 (home-page
11451 "https://www.github.com/flask-restful/flask-restful/")
11452 (synopsis
11453 "Flask module for creating REST APIs")
11454 (description
11455 "This package contains a Flask module for creating REST APIs.")
11456 (license license:bsd-3)))
11457
11458 (define-public python-flask-basicauth
11459 (package
11460 (name "python-flask-basicauth")
11461 (version "0.2.0")
11462 (source
11463 (origin
11464 (method url-fetch)
11465 (uri (pypi-uri "Flask-BasicAuth" version))
11466 (sha256
11467 (base32
11468 "1zq1spkjr4sjdnalpp8wl242kdqyk6fhbnhr8hi4r4f0km4bspnz"))))
11469 (build-system python-build-system)
11470 (propagated-inputs
11471 `(("python-flask" ,python-flask)))
11472 (home-page
11473 "https://github.com/jpvanhal/flask-basicauth")
11474 (synopsis
11475 "HTTP basic access authentication for Flask")
11476 (description
11477 "This package provides HTTP basic access authentication for Flask.")
11478 (license license:bsd-3)))
11479
11480 (define-public python-flask-sqlalchemy
11481 (package
11482 (name "python-flask-sqlalchemy")
11483 (version "2.1")
11484 (source
11485 (origin
11486 (method url-fetch)
11487 (uri (pypi-uri "Flask-SQLAlchemy" version))
11488 (sha256
11489 (base32
11490 "1i9ps5d5snih9xlqhrvmi3qfiygkmqzxh92n25kj4pf89kj4s965"))))
11491 (build-system python-build-system)
11492 (propagated-inputs
11493 `(("python-flask" ,python-flask)
11494 ("python-sqlalchemy" ,python-sqlalchemy)))
11495 (home-page
11496 "http://github.com/mitsuhiko/flask-sqlalchemy")
11497 (synopsis
11498 "Module adding SQLAlchemy support to your Flask application")
11499 (description
11500 "This package adds SQLAlchemy support to your Flask application.")
11501 (license license:bsd-3)))
11502
11503 (define-public python-pyev
11504 (package
11505 (name "python-pyev")
11506 (version "0.9.0")
11507 (source
11508 (origin
11509 (method url-fetch)
11510 (uri (pypi-uri "pyev" version))
11511 (sha256
11512 (base32
11513 "0rf603lc0s6zpa1nb25vhd8g4y337wg2wyz56i0agsdh7jchl0sx"))))
11514 (build-system python-build-system)
11515 (arguments
11516 `(#:tests? #f ; no test suite
11517 #:phases
11518 (modify-phases %standard-phases
11519 (add-after 'unpack 'patch
11520 (lambda* (#:key inputs #:allow-other-keys)
11521 (let ((libev (string-append (assoc-ref inputs "libev")
11522 "/lib/libev.so.4")))
11523 (substitute* "setup.py"
11524 (("libev_dll_name = find_library\\(\\\"ev\\\"\\)")
11525 (string-append "libev_dll_name = \"" libev "\"")))))))))
11526 (inputs
11527 `(("libev" ,libev)))
11528 (home-page "http://pythonhosted.org/pyev/")
11529 (synopsis "Python libev interface")
11530 (description "Pyev provides a Python interface to libev.")
11531 (license license:gpl3)))
11532
11533 (define-public python2-pyev
11534 (package-with-python2 python-pyev))
11535
11536 (define-public python-imagesize
11537 (package
11538 (name "python-imagesize")
11539 (version "0.7.1")
11540 (source
11541 (origin
11542 (method url-fetch)
11543 (uri (pypi-uri "imagesize" version))
11544 (sha256
11545 (base32
11546 "0qk07k0z4241lkzzjji7z4da04pcvg7bfc4xz1934zlqhwmwdcha"))))
11547 (build-system python-build-system)
11548 (arguments
11549 '(;; Test files are not distributed on PyPi:
11550 ;; https://github.com/shibukawa/imagesize_py/issues/7
11551 #:tests? #f))
11552 (home-page "https://github.com/shibukawa/imagesize_py")
11553 (synopsis "Gets image size of files in variaous formats in Python")
11554 (description
11555 "This package allows determination of image size from
11556 PNG, JPEG, JPEG2000 and GIF files in pure Python.")
11557 (license license:expat)))
11558
11559 (define-public python2-imagesize
11560 (package-with-python2 python-imagesize))
11561
11562 (define-public python-axolotl-curve25519
11563 (package
11564 (name "python-axolotl-curve25519")
11565 (version "0.1")
11566 (source
11567 (origin
11568 (method git-fetch)
11569 (uri (git-reference
11570 (url "git://github.com/tgalal/python-axolotl-curve25519")
11571 (commit "e4a9c4de0eae27223200579c58d1f8f6d20637e2")))
11572 (file-name (string-append name "-" version "-checkout"))
11573 (sha256
11574 (base32
11575 "0agap5q0hmvf6cwzjqc05kw53pjgf6942pcivpazksmg1vk400ra"))))
11576 (build-system python-build-system)
11577 (arguments
11578 `(;; Prevent creation of the egg. This works around
11579 ;; https://debbugs.gnu.org/cgi/bugreport.cgi?bug=20765
11580 #:configure-flags '("--root=/")))
11581 (home-page "https://github.com/tgalal/python-axolotl-curve25519")
11582 (synopsis "Python wrapper for curve25519 library")
11583 (description "This is a python wrapper for the curve25519 library
11584 with ed25519 signatures. The C code was pulled from
11585 libaxolotl-android. At the moment this wrapper is meant for use by
11586 python-axolotl.")
11587 (license (list license:gpl3 ; Most files
11588 license:bsd-3)))) ; curve/curve25519-donna.c
11589
11590 (define-public python2-axolotl-curve25519
11591 (package-with-python2 python-axolotl-curve25519))
11592
11593 (define-public python-axolotl
11594 (package
11595 (name "python-axolotl")
11596 (version "0.1.35")
11597 (source
11598 (origin
11599 (method url-fetch)
11600 (uri (string-append
11601 "https://github.com/tgalal/python-axolotl/archive/"
11602 version ".tar.gz"))
11603 (file-name (string-append name "-" version ".tar.gz"))
11604 (sha256
11605 (base32 "1z8d89p7v40p4bwywjm9h4z28fdvra79ddw06azlkrfjbl7dxmz8"))))
11606 (build-system python-build-system)
11607 (arguments
11608 `(#:phases
11609 (modify-phases %standard-phases
11610 ;; Don't install tests
11611 (add-before 'install 'remove-tests
11612 (lambda _
11613 (for-each delete-file-recursively
11614 '("axolotl/tests" "build/lib/axolotl/tests"))
11615 #t)))
11616 ;; Prevent creation of the egg. This works around
11617 ;; https://debbugs.gnu.org/cgi/bugreport.cgi?bug=20765
11618 #:configure-flags '("--root=/")))
11619 (propagated-inputs
11620 `(("python-axolotl-curve25519" ,python-axolotl-curve25519)
11621 ("python-dateutil" ,python-dateutil)
11622 ("python-protobuf" ,python-protobuf)
11623 ("python-pycrypto" ,python-pycrypto)))
11624 (home-page "https://github.com/tgalal/python-axolotl")
11625 (synopsis "Python port of libaxolotl-android")
11626 (description "This is a python port of libaxolotl-android. This
11627 is a ratcheting forward secrecy protocol that works in synchronous and
11628 asynchronous messaging environments.")
11629 (license license:gpl3)))
11630
11631 (define-public python2-axolotl
11632 (package-with-python2 python-axolotl))
11633
11634 (define-public python-termstyle
11635 (package
11636 (name "python-termstyle")
11637 (version "0.1.11")
11638 (source
11639 (origin
11640 (method url-fetch)
11641 (uri (pypi-uri "termstyle" version))
11642 (sha256
11643 (base32
11644 "17wzkkcqy5zc0g68xlad3kcv66iw14d2pwqc0h9420gak0vbhx7g"))))
11645 (build-system python-build-system)
11646 (home-page "http://github.com/gfxmonk/termstyle")
11647 (synopsis "Console text coloring for Python")
11648 (description "This package provides console text coloring for Python.")
11649 (license license:bsd-3)))
11650
11651 (define-public python-rednose
11652 (package
11653 (name "python-rednose")
11654 (version "1.2.1")
11655 (source
11656 (origin
11657 (method url-fetch)
11658 (uri (pypi-uri "rednose" version))
11659 (sha256
11660 (base32
11661 "0b0bsna217lr1nykyhl5fgjly15zhdvqd4prg4wy1zrgfv7al6m0"))))
11662 (build-system python-build-system)
11663 (arguments
11664 `(#:phases
11665 (modify-phases %standard-phases
11666 (add-after 'unpack 'fix-deps
11667 (lambda _
11668 ;; See <https://github.com/JBKahn/rednose/issues/12>
11669 (substitute* "setup.py"
11670 (("python-termstyle") "termstyle"))
11671 #t)))))
11672 (propagated-inputs
11673 `(("python-colorama" ,python-colorama)
11674 ("python-termstyle" ,python-termstyle)))
11675 (native-inputs
11676 `(("python-six" ,python-six)
11677 ("python-nose" ,python-nose)))
11678 (home-page "https://github.com/JBKahn/rednose")
11679 (synopsis "Colored output for Python nosetests")
11680 (description "This package provides colored output for the
11681 @command{nosetests} command of the Python Nose unit test framework.")
11682 (license license:bsd-3)))
11683
11684 (define-public python-flask-restplus
11685 (package
11686 (name "python-flask-restplus")
11687 (version "0.9.2")
11688 (source
11689 (origin
11690 (method url-fetch)
11691 (uri (pypi-uri "flask-restplus" version))
11692 (sha256
11693 (base32
11694 "11his6ii5brpkhld0d5bwzjjw4q3vmplpd6fmgzjrvvklsbk0cf4"))))
11695 (build-system python-build-system)
11696 (propagated-inputs
11697 `(("python-aniso8601" ,python-aniso8601)
11698 ("python-flask" ,python-flask)
11699 ("python-jsonschema" ,python-jsonschema)
11700 ("python-pytz" ,python-pytz)
11701 ("python-six" ,python-six)))
11702 (native-inputs
11703 `(("python-tzlocal" ,python-tzlocal)
11704 ("python-blinker" ,python-blinker)
11705 ("python-nose" ,python-nose)
11706 ("python-rednose" ,python-rednose)))
11707 (home-page "https://github.com/noirbizarre/flask-restplus")
11708 (synopsis "Framework for documented API development with Flask")
11709 (description "This package provides a framework for API development with
11710 the Flask web framework in Python. It is similar to package
11711 @code{python-flask-restful} but supports the @code{python-swagger}
11712 documentation builder.")
11713 (license license:expat)))