gnu: python2-scikit-image: Remove needless native-input and inheritance.
[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 (modules '((guix build utils)))
2654 (snippet
2655 '(begin
2656 ;; Remove pre-compiled .pyc files from source.
2657 (for-each delete-file-recursively
2658 (find-files "." "__pycache__" #:directories? #t))
2659 (for-each delete-file (find-files "." "\\.pyc$"))
2660 #t))))
2661 (build-system python-build-system)
2662 (arguments
2663 `(#:phases
2664 (modify-phases %standard-phases
2665 (add-before 'check 'disable-failing-tests
2666 (lambda _
2667 ;; This numpydoc tests fails for unknown reasons
2668 (delete-file "doc/sphinxext/numpydoc/tests/test_docscrape.py")
2669 ;; This numpydoc test depends on matplotlib, which is not a
2670 ;; required input.
2671 (delete-file "doc/sphinxext/numpydoc/tests/test_plot_directive.py")
2672 ;; These tests fail to execute sys.executable
2673 (substitute* "joblib/test/test_parallel.py"
2674 (("import nose" line)
2675 (string-append "from nose.plugins.skip import SkipTest\n" line))
2676 (("def test_nested_parallel_warnings" line)
2677 (string-append "@SkipTest\n" line))
2678 (("def test_parallel_with_interactively_defined_functions" line)
2679 (string-append "@SkipTest\n" line)))
2680 #t)))))
2681 ;; Provide nose to enable tests command
2682 (native-inputs
2683 `(("python-nose" ,python-nose)
2684 ("python-sphinx" ,python-sphinx)
2685 ("python-docutils" ,python-docutils)
2686 ("python-numpydoc" ,python-numpydoc)))
2687 (home-page "http://pythonhosted.org/joblib/")
2688 (synopsis "Using Python functions as pipeline jobs")
2689 (description
2690 "Joblib is a set of tools to provide lightweight pipelining in Python.
2691 In particular, joblib offers: transparent disk-caching of the output values
2692 and lazy re-evaluation (memoize pattern), easy simple parallel computing
2693 logging and tracing of the execution.")
2694 (license license:bsd-3)))
2695
2696 (define-public python2-joblib
2697 (package-with-python2 python-joblib))
2698
2699 (define-public python-docutils
2700 (package
2701 (name "python-docutils")
2702 (version "0.12")
2703 (source
2704 (origin
2705 (method url-fetch)
2706 (uri (string-append
2707 "https://pypi.python.org/packages/source/d/docutils/docutils-"
2708 version ".tar.gz"))
2709 (sha256
2710 (base32
2711 "1ylnjnw1x4b2y7blr6x35ncdzn69k253kw4cdkv6asdb21w73ny7"))))
2712 (build-system python-build-system)
2713 (arguments
2714 '(#:tests? #f)) ; no setup.py test command
2715 (home-page "http://docutils.sourceforge.net/")
2716 (synopsis "Python Documentation Utilities")
2717 (description
2718 "Docutils is a modular system for processing documentation into useful
2719 formats, such as HTML, XML, and LaTeX. For input Docutils supports
2720 reStructuredText.")
2721 ;; Most of the source code is public domain, but some source files are
2722 ;; licensed under the PFSL, BSD 2-clause, and GPLv3+ licenses.
2723 (license (list license:public-domain license:psfl license:bsd-2 license:gpl3+))))
2724
2725 (define-public python2-docutils
2726 (package-with-python2 python-docutils))
2727
2728 (define-public python-pygments
2729 (package
2730 (name "python-pygments")
2731 (version "2.0.2")
2732 (source
2733 (origin
2734 (method url-fetch)
2735 (uri (pypi-uri "Pygments" version))
2736 (sha256
2737 (base32
2738 "0lagrwifsgn0s8bzqahpr87p7gd38xja8f06akscinp6hj89283k"))))
2739 (build-system python-build-system)
2740 (home-page "http://pygments.org/")
2741 (synopsis "Syntax highlighting")
2742 (description
2743 "Pygments is a syntax highlighting package written in Python.")
2744 (license license:bsd-2)))
2745
2746 (define-public python2-pygments
2747 (package-with-python2 python-pygments))
2748
2749 (define-public python-sphinx
2750 (package
2751 (name "python-sphinx")
2752 (version "1.2.3")
2753 (source
2754 (origin
2755 (method url-fetch)
2756 (uri (string-append
2757 "https://pypi.python.org/packages/source/S/Sphinx/Sphinx-"
2758 version ".tar.gz"))
2759 (sha256
2760 (base32
2761 "011xizm3jnmf4cvs5i6kgf6c5nn046h79i8j0vd0f27yw9j3p4wl"))))
2762 (build-system python-build-system)
2763 (propagated-inputs
2764 `(("python-jinja2" ,python-jinja2)
2765 ("python-docutils" ,python-docutils)
2766 ("python-pygments" ,python-pygments)))
2767 (home-page "http://sphinx-doc.org/")
2768 (synopsis "Python documentation generator")
2769 (description "Sphinx is a tool that makes it easy to create documentation
2770 for Python projects or other documents consisting of multiple reStructuredText
2771 sources.")
2772 (license license:bsd-3)))
2773
2774 (define-public python2-sphinx
2775 (package-with-python2 python-sphinx))
2776
2777 (define-public python-sphinx-rtd-theme
2778 (package
2779 (name "python-sphinx-rtd-theme")
2780 (version "0.1.6")
2781 (source
2782 (origin
2783 (method url-fetch)
2784 (uri (string-append "https://pypi.python.org/packages/source/s/"
2785 "sphinx_rtd_theme/sphinx_rtd_theme-"
2786 version ".tar.gz"))
2787 (sha256
2788 (base32
2789 "19nw3rn7awplcdrz63kg1njqwkbymfg9lwn7l2grhdyhyr2gaa8g"))))
2790 (build-system python-build-system)
2791 (home-page "https://github.com/snide/sphinx_rtd_theme/")
2792 (synopsis "ReadTheDocs.org theme for Sphinx")
2793 (description "A theme for Sphinx used by ReadTheDocs.org.")
2794 (license license:expat)))
2795
2796 (define-public python2-sphinx-rtd-theme
2797 (package-with-python2 python-sphinx-rtd-theme))
2798
2799 (define-public python-feedgenerator
2800 (package
2801 (name "python-feedgenerator")
2802 (version "1.8")
2803 (source
2804 (origin
2805 (method url-fetch)
2806 (uri (pypi-uri "feedgenerator" version))
2807 (sha256
2808 (base32
2809 "0mkimp1fpdan4p3882vzcws4l594k71ich4g0wq97jbra7p602n0"))
2810 (modules '((guix build utils)))
2811 (snippet
2812 '(begin
2813 ;; Remove pre-compiled .pyc files from source.
2814 (for-each delete-file-recursively
2815 (find-files "." "__pycache__" #:directories? #t))
2816 (for-each delete-file (find-files "." "\\.pyc$"))
2817 #t))))
2818 (build-system python-build-system)
2819 (propagated-inputs
2820 `(("python-pytz" ,python-pytz)
2821 ("python-six" ,python-six)))
2822 (home-page "https://github.com/getpelican/feedgenerator")
2823 (synopsis
2824 "Standalone version of Django's Atom/RSS feed generator")
2825 (description
2826 "Feedgenerator-py3k is a standalone version of Django's feedgenerator,
2827 which can produce feeds in RSS 2.0, RSS 0.91, and Atom formats.")
2828 (license license:bsd-3)))
2829
2830 (define-public python2-feedgenerator
2831 (package-with-python2 python-feedgenerator))
2832
2833 (define-public python-blinker
2834 (package
2835 (name "python-blinker")
2836 (version "1.4")
2837 (source
2838 (origin
2839 (method url-fetch)
2840 (uri (pypi-uri "blinker" version))
2841 (sha256
2842 (base32
2843 "1dpq0vb01p36jjwbhhd08ylvrnyvcc82yxx3mwjx6awrycjyw6j7"))))
2844 (build-system python-build-system)
2845 (home-page "http://pythonhosted.org/blinker/")
2846 (synopsis "Fast, simple object-to-object and broadcast signaling")
2847 (description
2848 "Blinker provides a fast dispatching system that allows any number of
2849 interested parties to subscribe to events, or \"signals\".")
2850 (license license:expat)))
2851
2852 (define-public python2-blinker
2853 (package-with-python2 python-blinker))
2854
2855 (define-public pelican
2856 (package
2857 (name "pelican")
2858 (version "3.6.3")
2859 (source
2860 (origin
2861 (method url-fetch)
2862 (uri (pypi-uri "pelican" version))
2863 (sha256
2864 (base32
2865 "1hn94rb4q3zmcq16in055xikal4dba5hfx3zznq7warllcgc9f8k"))))
2866 (build-system python-build-system)
2867 (propagated-inputs
2868 `(("python-feedgenerator" ,python-feedgenerator)
2869 ("python-jinja2" ,python-jinja2)
2870 ("python-pygments" ,python-pygments)
2871 ("python-docutils" ,python-docutils)
2872 ("python-pytz" ,python-pytz)
2873 ("python-blinker" ,python-blinker)
2874 ("python-unidecode" ,python-unidecode)
2875 ("python-six" ,python-six)
2876 ("python-dateutil-2" ,python-dateutil-2)))
2877 (home-page "http://getpelican.com/")
2878 (arguments
2879 `(;; XXX Requires a lot more packages to do unit tests :P
2880 #:tests? #f
2881 #:phases (modify-phases %standard-phases
2882 (add-before
2883 'install 'adjust-requires
2884 ;; Since feedgenerator is installed from git, it doesn't
2885 ;; conform to the version requirements.
2886 ;;
2887 ;; We *do have* "feedgenerator >= 1.6", but strip off the
2888 ;; version requirement so setuptools doesn't get confused.
2889 (lambda _
2890 (substitute* "setup.py"
2891 (("['\"]feedgenerator.*?['\"]")
2892 "'feedgenerator'")))))))
2893 (synopsis "Python-based static site publishing system")
2894 (description
2895 "Pelican is a tool to generate a static blog from reStructuredText,
2896 Markdown input files, and more. Pelican uses Jinja2 for templating
2897 and is very extensible.")
2898 (license license:agpl3+)))
2899
2900 (define-public python-scikit-learn
2901 (package
2902 (name "python-scikit-learn")
2903 (version "0.16.1")
2904 (source
2905 (origin
2906 (method url-fetch)
2907 (uri (string-append
2908 "https://github.com/scikit-learn/scikit-learn/archive/"
2909 version ".tar.gz"))
2910 (file-name (string-append name "-" version ".tar.gz"))
2911 (sha256
2912 (base32
2913 "140skabifgc7lvvj873pnzlwx0ni6q8qkrsyad2ccjb3h8rxzkih"))))
2914 (build-system python-build-system)
2915 (arguments
2916 `(#:phases
2917 (alist-cons-before
2918 'check 'set-HOME
2919 ;; some tests require access to "$HOME"
2920 (lambda _ (setenv "HOME" "/tmp"))
2921 ;; Tests can only be run after the library has been installed and not
2922 ;; within the source directory.
2923 (alist-cons-after
2924 'install 'check
2925 (lambda _
2926 (with-directory-excursion "/tmp"
2927 ;; With Python 3 one test of 3334 fails
2928 ;; (sklearn.tests.test_common.test_transformers); see
2929 ;; https://github.com/scikit-learn/scikit-learn/issues/3693
2930 (system* "nosetests" "-v" "sklearn")))
2931 (alist-delete 'check %standard-phases)))))
2932 (inputs
2933 `(("openblas" ,openblas)))
2934 (native-inputs
2935 `(("python-nose" ,python-nose)))
2936 (propagated-inputs
2937 `(("python-numpy" ,python-numpy)
2938 ("python-scipy" ,python-scipy)))
2939 (home-page "http://scikit-learn.org/")
2940 (synopsis "Machine Learning in Python")
2941 (description
2942 "Scikit-learn provides simple and efficient tools for data
2943 mining and data analysis.")
2944 (license license:bsd-3)
2945 (properties `((python2-variant . ,(delay python2-scikit-learn))))))
2946
2947 (define-public python2-scikit-learn
2948 (package-with-python2 (strip-python2-variant python-scikit-learn)))
2949
2950 (define-public python-scikit-image
2951 (package
2952 (name "python-scikit-image")
2953 (version "0.11.3")
2954 (source
2955 (origin
2956 (method url-fetch)
2957 (uri (string-append
2958 "https://pypi.python.org/packages/source/s/scikit-image/scikit-image-"
2959 version ".tar.gz"))
2960 (sha256
2961 (base32 "0jz416fqvpahqyffw8plmszzfj669w8wvf3y9clnr5lr6a7md3kn"))))
2962 (build-system python-build-system)
2963 ;; See DEPENDS.txt for the list of build and run time requiremnts
2964 (propagated-inputs
2965 `(("python-matplotlib" ,python-matplotlib)
2966 ("python-networkx" ,python-networkx)
2967 ("python-scipy" ,python-scipy)
2968 ("python-pillow" ,python-pillow)))
2969 (native-inputs
2970 `(("python-numpy" ,python-numpy)
2971 ("python-cython" ,python-cython)
2972 ("python-six" ,python-six)))
2973 (home-page "http://scikit-image.org/")
2974 (synopsis "Image processing in Python")
2975 (description
2976 "Scikit-image is a collection of algorithms for image processing.")
2977 (license license:bsd-3)))
2978
2979 (define-public python2-scikit-image
2980 (package-with-python2 python-scikit-image))
2981
2982 (define-public python-redis
2983 (package
2984 (name "python-redis")
2985 (version "2.10.3")
2986 (source
2987 (origin
2988 (method url-fetch)
2989 (uri (string-append
2990 "https://pypi.python.org/packages/source/r/redis/redis-"
2991 version ".tar.gz"))
2992 (sha256
2993 (base32 "1701qjwn4n05q90fdg4bsg96s27xf5s4hsb4gxhv3xk052q3gyx4"))))
2994 (build-system python-build-system)
2995 ;; Tests require a running Redis server
2996 (arguments '(#:tests? #f))
2997 (native-inputs
2998 `(("python-pytest" ,python-pytest)))
2999 (home-page "https://github.com/andymccurdy/redis-py")
3000 (synopsis "Redis Python client")
3001 (description
3002 "This package provides a Python interface to the Redis key-value store.")
3003 (license license:expat)))
3004
3005 (define-public python2-redis
3006 (package-with-python2 python-redis))
3007
3008 (define-public python-rq
3009 (package
3010 (name "python-rq")
3011 (version "0.5.2")
3012 (source
3013 (origin
3014 (method url-fetch)
3015 (uri (string-append
3016 "https://pypi.python.org/packages/source/r/rq/rq-"
3017 version ".tar.gz"))
3018 (sha256
3019 (base32 "0b0z5hn8wkfg300hx7816csgv3bcfamlr29fi3yzgqmpqxwj3fix"))))
3020 (build-system python-build-system)
3021 (propagated-inputs
3022 `(("python-click" ,python-click)
3023 ("python-redis" ,python-redis)))
3024 (home-page "http://python-rq.org/")
3025 (synopsis "Simple job queues for Python")
3026 (description
3027 "RQ (Redis Queue) is a simple Python library for queueing jobs and
3028 processing them in the background with workers. It is backed by Redis and it
3029 is designed to have a low barrier to entry.")
3030 (license license:bsd-2)))
3031
3032 (define-public python2-rq
3033 (package-with-python2 python-rq))
3034
3035 (define-public python-cython
3036 (package
3037 (name "python-cython")
3038 (version "0.24.1")
3039 (source
3040 (origin
3041 (method url-fetch)
3042 (uri (pypi-uri "Cython" version))
3043 (sha256
3044 (base32
3045 "1fg7fmpvfcq9md4ncyqnnylyjy4z3ksdrshzis95g1sh03d8z044"))))
3046 (build-system python-build-system)
3047 ;; we need the full python package and not just the python-wrapper
3048 ;; because we need libpython3.3m.so
3049 (inputs
3050 `(("python" ,python)))
3051 (arguments
3052 `(#:phases
3053 (modify-phases %standard-phases
3054 (add-before 'check 'set-HOME
3055 ;; some tests require access to "$HOME/.cython"
3056 (lambda _ (setenv "HOME" "/tmp")))
3057 (replace 'check
3058 (lambda _ (zero? (system* "python" "runtests.py" "-vv")))))))
3059 (home-page "http://cython.org/")
3060 (synopsis "C extensions for Python")
3061 (description "Cython is an optimising static compiler for both the Python
3062 programming language and the extended Cython programming language. It makes
3063 writing C extensions for Python as easy as Python itself.")
3064 (license license:asl2.0)
3065 (properties `((python2-variant . ,(delay python2-cython))))))
3066
3067 (define-public python2-cython
3068 (package (inherit (package-with-python2
3069 (strip-python2-variant python-cython)))
3070 (name "python2-cython")
3071 (inputs
3072 `(("python-2" ,python-2))))) ; this is not automatically changed
3073
3074 ;; The RPython toolchain currently does not support Python 3.
3075 (define-public python2-rpython
3076 (package
3077 (name "python2-rpython")
3078 (version "0.1.4")
3079 (source
3080 (origin
3081 (method url-fetch)
3082 (uri (pypi-uri "rpython" version))
3083 (sha256
3084 (base32
3085 "07pps06fq4c4wmi5ii0sgh9zgwniz5y7frqhm28g3a154l163fxc"))))
3086 (build-system python-build-system)
3087 (arguments `(#:python ,python-2))
3088 (native-inputs
3089 `(("python2-pytest" ,python2-pytest))) ; needed for running tests
3090 (home-page "https://rpython.readthedocs.org")
3091 (synopsis "Framework for implementing interpreters and virtual machines")
3092 (description "RPython is a translation and support framework for
3093 producing implementations of dynamic languages, emphasizing a clean separation
3094 between language specification and implementation aspects.")
3095 (license license:expat)))
3096
3097 ;; This version of numpy is missing the documentation and is only used to
3098 ;; build matplotlib which is required to build numpy's documentation.
3099 (define python-numpy-bootstrap
3100 (package
3101 (name "python-numpy-bootstrap")
3102 (version "1.10.4")
3103 (source
3104 (origin
3105 (method url-fetch)
3106 (uri (string-append "mirror://sourceforge/numpy/NumPy/" version
3107 "/numpy-" version ".tar.gz"))
3108 (sha256
3109 (base32
3110 "1bjjhvncraka5s6i4lg644jrxij6bvycxy7an20gcz3a0m11iygp"))))
3111 (build-system python-build-system)
3112 (inputs
3113 `(("openblas" ,openblas)
3114 ("lapack" ,lapack)))
3115 (native-inputs
3116 `(("python-nose" ,python-nose)
3117 ("gfortran" ,gfortran)))
3118 (arguments
3119 `(#:phases
3120 (modify-phases %standard-phases
3121 (add-before 'build 'set-environment-variables
3122 (lambda* (#:key inputs #:allow-other-keys)
3123 (call-with-output-file "site.cfg"
3124 (lambda (port)
3125 (format port
3126 "[openblas]
3127 libraries = openblas
3128 library_dirs = ~a/lib
3129 include_dirs = ~a/include
3130
3131 # backslash-n to make emacs happy
3132 \n[lapack]
3133 lapack_libs = lapack
3134 library_dirs = ~a/lib
3135 include_dirs = ~a/include
3136 "
3137 (assoc-ref inputs "openblas")
3138 (assoc-ref inputs "openblas")
3139 (assoc-ref inputs "lapack")
3140 (assoc-ref inputs "lapack"))))
3141 ;; Use "gcc" executable, not "cc".
3142 (substitute* "numpy/distutils/system_info.py"
3143 (("c = distutils\\.ccompiler\\.new_compiler\\(\\)")
3144 "c = distutils.ccompiler.new_compiler(); c.set_executables(compiler='gcc',compiler_so='gcc',linker_exe='gcc',linker_so='gcc -shared')"))
3145 #t))
3146 ;; Tests can only be run after the library has been installed and not
3147 ;; within the source directory.
3148 (delete 'check)
3149 (add-after 'install 'check
3150 (lambda* (#:key outputs inputs #:allow-other-keys)
3151 ;; Make installed package available for running the tests
3152 (add-installed-pythonpath inputs outputs)
3153 (with-directory-excursion "/tmp"
3154 (zero? (system* "python" "-c"
3155 "import numpy; numpy.test(verbose=2)"))))))))
3156 (home-page "http://www.numpy.org/")
3157 (synopsis "Fundamental package for scientific computing with Python")
3158 (description "NumPy is the fundamental package for scientific computing
3159 with Python. It contains among other things: a powerful N-dimensional array
3160 object, sophisticated (broadcasting) functions, tools for integrating C/C++
3161 and Fortran code, useful linear algebra, Fourier transform, and random number
3162 capabilities.")
3163 (license license:bsd-3)))
3164
3165 (define python2-numpy-bootstrap
3166 (package-with-python2 python-numpy-bootstrap))
3167
3168 (define-public python2-fastlmm
3169 (package
3170 (name "python2-fastlmm")
3171 (version "0.2.21")
3172 (source
3173 (origin
3174 (method url-fetch)
3175 (uri (pypi-uri "fastlmm" version ".zip"))
3176 (sha256
3177 (base32
3178 "1q8c34rpmwkfy3r4d5172pzdkpfryj561897z9r3x22gq7813x1m"))))
3179 (build-system python-build-system)
3180 (arguments
3181 `(#:python ,python-2)) ; only Python 2.7 is supported
3182 (propagated-inputs
3183 `(("python2-numpy" ,python2-numpy)
3184 ("python2-scipy" ,python2-scipy)
3185 ("python2-matplotlib" ,python2-matplotlib)
3186 ("python2-pandas" ,python2-pandas)
3187 ("python2-scikit-learn" ,python2-scikit-learn)
3188 ("python2-pysnptools" ,python2-pysnptools)))
3189 (native-inputs
3190 `(("unzip" ,unzip)
3191 ("python2-cython" ,python2-cython)
3192 ("python2-mock" ,python2-mock)))
3193 (home-page "http://research.microsoft.com/en-us/um/redmond/projects/mscompbio/fastlmm/")
3194 (synopsis "Perform genome-wide association studies on large data sets")
3195 (description
3196 "FaST-LMM, which stands for Factored Spectrally Transformed Linear Mixed
3197 Models, is a program for performing both single-SNP and SNP-set genome-wide
3198 association studies (GWAS) on extremely large data sets.")
3199 (license license:asl2.0)))
3200
3201 (define-public python-numpy
3202 (package (inherit python-numpy-bootstrap)
3203 (name "python-numpy")
3204 (outputs '("out" "doc"))
3205 (inputs
3206 `(("which" ,which)))
3207 (propagated-inputs
3208 `(("python-matplotlib" ,python-matplotlib)
3209 ("python-pyparsing" ,python-pyparsing)
3210 ,@(package-inputs python-numpy-bootstrap)))
3211 (native-inputs
3212 `(("pkg-config" ,pkg-config)
3213 ("python-sphinx" ,python-sphinx)
3214 ("python-numpydoc" ,python-numpydoc)
3215 ("texlive" ,texlive)
3216 ("texinfo" ,texinfo)
3217 ("perl" ,perl)
3218 ,@(package-native-inputs python-numpy-bootstrap)))
3219 (arguments
3220 `(,@(substitute-keyword-arguments
3221 (package-arguments python-numpy-bootstrap)
3222 ((#:phases phases)
3223 `(alist-cons-after
3224 'install 'install-doc
3225 (lambda* (#:key inputs outputs #:allow-other-keys)
3226 ;; Make installed package available for building the
3227 ;; documentation
3228 (add-installed-pythonpath inputs outputs)
3229 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
3230 (doc (string-append
3231 data "/doc/" ,name "-"
3232 ,(package-version python-numpy-bootstrap)))
3233 (info (string-append data "/info"))
3234 (html (string-append doc "/html"))
3235 (pyver ,(string-append "PYVER=")))
3236 (with-directory-excursion "doc"
3237 (mkdir-p html)
3238 (system* "make" "html" pyver)
3239 (system* "make" "latex" "PAPER=a4" pyver)
3240 (system* "make" "-C" "build/latex"
3241 "all-pdf" "PAPER=a4" pyver)
3242 ;; FIXME: Generation of the info file fails.
3243 ;; (system* "make" "info" pyver)
3244 ;; (mkdir-p info)
3245 ;; (copy-file "build/texinfo/numpy.info"
3246 ;; (string-append info "/numpy.info"))
3247 (for-each (lambda (file)
3248 (copy-file (string-append "build/latex" file)
3249 (string-append doc file)))
3250 '("/numpy-ref.pdf" "/numpy-user.pdf"))
3251 (with-directory-excursion "build/html"
3252 (for-each (lambda (file)
3253 (let* ((dir (dirname file))
3254 (tgt-dir (string-append html "/" dir)))
3255 (unless (equal? "." dir)
3256 (mkdir-p tgt-dir))
3257 (install-file file html)))
3258 (find-files "." ".*"))))))
3259 ,phases)))))))
3260
3261 (define-public python2-numpy
3262 (package-with-python2 python-numpy))
3263
3264 (define-public python-pyparsing
3265 (package
3266 (name "python-pyparsing")
3267 (version "2.0.3")
3268 (source
3269 (origin
3270 (method url-fetch)
3271 (uri (string-append "mirror://sourceforge/pyparsing/pyparsing"
3272 "/pyparsing-" version
3273 "/pyparsing-" version ".tar.gz"))
3274 (sha256
3275 (base32
3276 "0kw4py7gn45j93q8r7bzajfrjdc3xlsn2yzln41lf9zmrghjkrq6"))))
3277 (build-system python-build-system)
3278 (outputs '("out" "doc"))
3279 (arguments
3280 `(#:tests? #f ; no test target
3281 #:modules ((guix build python-build-system)
3282 (guix build utils))
3283 #:phases
3284 (alist-cons-after
3285 'install 'install-doc
3286 (lambda* (#:key outputs #:allow-other-keys)
3287 (let* ((doc (string-append (assoc-ref outputs "doc")
3288 "/share/doc/" ,name "-" ,version))
3289 (html-doc (string-append doc "/html"))
3290 (examples (string-append doc "/examples")))
3291 (mkdir-p html-doc)
3292 (mkdir-p examples)
3293 (for-each
3294 (lambda (dir tgt)
3295 (map (lambda (file)
3296 (install-file file tgt))
3297 (find-files dir ".*")))
3298 (list "docs" "htmldoc" "examples")
3299 (list doc html-doc examples))))
3300 %standard-phases)))
3301 (home-page "http://pyparsing.wikispaces.com")
3302 (synopsis "Python parsing class library")
3303 (description
3304 "The pyparsing module is an alternative approach to creating and
3305 executing simple grammars, vs. the traditional lex/yacc approach, or the use
3306 of regular expressions. The pyparsing module provides a library of classes
3307 that client code uses to construct the grammar directly in Python code.")
3308 (license license:expat)))
3309
3310 (define-public python2-pyparsing
3311 (package-with-python2 python-pyparsing))
3312
3313 (define-public python-numpydoc
3314 (package
3315 (name "python-numpydoc")
3316 (version "0.5")
3317 (source
3318 (origin
3319 (method url-fetch)
3320 (uri (string-append
3321 "https://pypi.python.org/packages/source/n/numpydoc/numpydoc-"
3322 version ".tar.gz"))
3323 (sha256
3324 (base32
3325 "0d4dnifaxkll50jx6czj05y8cb4ny60njd2wz299sj2jxfy51w4k"))
3326 (modules '((guix build utils)))
3327 (snippet
3328 '(begin
3329 ;; Drop a test requiring matplotlib, which we cannot add as an
3330 ;; input since it would create a circular dependency: Extend the
3331 ;; test for Python 3, where it is already dropped, to Python 2.
3332 (substitute* "numpydoc/tests/test_plot_directive.py"
3333 (("3") "2"))))))
3334 (build-system python-build-system)
3335 (native-inputs
3336 `(("python-docutils" ,python-docutils)
3337 ("python-sphinx" ,python-sphinx)
3338 ("python-nose" ,python-nose)))
3339 (home-page "https://pypi.python.org/pypi/numpydoc")
3340 (synopsis
3341 "Numpy's Sphinx extensions")
3342 (description
3343 "Sphinx extension to support docstrings in Numpy format.")
3344 (license license:bsd-2)))
3345
3346 (define-public python2-numpydoc
3347 (package-with-python2 python-numpydoc))
3348
3349 (define-public python-numexpr
3350 (package
3351 (name "python-numexpr")
3352 (version "2.6.0")
3353 (source
3354 (origin
3355 (method url-fetch)
3356 (uri (pypi-uri "numexpr" version))
3357 (sha256
3358 (base32
3359 "0i6iagl2hhbr8q4qzbbjd859v5806vqylq87fq7pi914ps6d6cag"))))
3360 (build-system python-build-system)
3361 (arguments `(#:tests? #f)) ; no tests included
3362 (propagated-inputs
3363 `(("python-numpy" ,python-numpy)))
3364 (home-page "https://github.com/pydata/numexpr")
3365 (synopsis "Fast numerical expression evaluator for NumPy")
3366 (description
3367 "Numexpr is a fast numerical expression evaluator for NumPy. With it,
3368 expressions that operate on arrays are accelerated and use less memory than
3369 doing the same calculation in Python. In addition, its multi-threaded
3370 capabilities can make use of all your cores, which may accelerate
3371 computations, most specially if they are not memory-bounded (e.g. those using
3372 transcendental functions).")
3373 (license license:expat)))
3374
3375 (define-public python2-numexpr
3376 (package-with-python2 python-numexpr))
3377
3378 (define-public python-matplotlib
3379 (package
3380 (name "python-matplotlib")
3381 (version "1.4.3")
3382 (source
3383 (origin
3384 (method url-fetch)
3385 (uri (string-append "mirror://sourceforge/matplotlib/matplotlib"
3386 "/matplotlib-" version
3387 "/matplotlib-" version ".tar.gz"))
3388 (sha256
3389 (base32
3390 "1dn05cvd0g984lzhh72wa0z93psgwshbbg93fkab6slx5m3l95av"))
3391 (patches (search-patches "matplotlib-setupext-tk.patch"))))
3392 (build-system python-build-system)
3393 (outputs '("out" "doc"))
3394 (propagated-inputs ; the following packages are all needed at run time
3395 `(("python-pyparsing" ,python-pyparsing)
3396 ("python-pygobject" ,python-pygobject)
3397 ("gobject-introspection" ,gobject-introspection)
3398 ("python-tkinter" ,python "tk")
3399 ("python-dateutil" ,python-dateutil-2)
3400 ("python-numpy" ,python-numpy-bootstrap)
3401 ("python-pillow" ,python-pillow)
3402 ("python-pytz" ,python-pytz)
3403 ("python-six" ,python-six)
3404 ;; The 'gtk+' package (and 'gdk-pixbuf', 'atk' and 'pango' propagated
3405 ;; from 'gtk+') provides the required 'typelib' files used by
3406 ;; 'gobject-introspection'. The location of these files is set with the
3407 ;; help of the environment variable GI_TYPELIB_PATH. At build time this
3408 ;; is done automatically by a 'native-search-path' procedure. However,
3409 ;; at run-time the user must set this variable as follows:
3410 ;;
3411 ;; export GI_TYPELIB_PATH=~/.guix-profile/lib/girepository-1.0
3412 ("gtk+" ,gtk+)
3413 ;; From version 1.4.0 'matplotlib' makes use of 'cairocffi' instead of
3414 ;; 'pycairo'. However, 'pygobject' makes use of a 'pycairo' 'context'
3415 ;; object. For this reason we need to import both libraries.
3416 ;; https://pythonhosted.org/cairocffi/cffi_api.html#converting-pycairo
3417 ("python-pycairo" ,python-pycairo)
3418 ("python-cairocffi" ,python-cairocffi)))
3419 (inputs
3420 `(("libpng" ,libpng)
3421 ("imagemagick" ,imagemagick)
3422 ("freetype" ,freetype)
3423 ("cairo" ,cairo)
3424 ("glib" ,glib)
3425 ;; FIXME: Add backends when available.
3426 ;("python-wxpython" ,python-wxpython)
3427 ;("python-pyqt" ,python-pyqt)
3428 ("tcl" ,tcl)
3429 ("tk" ,tk)))
3430 (native-inputs
3431 `(("pkg-config" ,pkg-config)
3432 ("python-sphinx" ,python-sphinx)
3433 ("python-numpydoc" ,python-numpydoc)
3434 ("python-nose" ,python-nose)
3435 ("python-mock" ,python-mock)
3436 ("texlive" ,texlive)
3437 ("texinfo" ,texinfo)))
3438 (arguments
3439 `(#:phases
3440 (alist-cons-before
3441 'build 'configure-environment
3442 (lambda* (#:key outputs inputs #:allow-other-keys)
3443 (let ((cairo (assoc-ref inputs "cairo"))
3444 (gtk+ (assoc-ref inputs "gtk+")))
3445 ;; Setting these directories in the 'basedirlist' of 'setup.cfg'
3446 ;; has not effect.
3447 (setenv "LD_LIBRARY_PATH"
3448 (string-append cairo "/lib:" gtk+ "/lib"))
3449 (setenv "HOME" (getcwd))
3450 (call-with-output-file "setup.cfg"
3451 (lambda (port)
3452 (format port "[directories]~%
3453 basedirlist = ~a,~a~%
3454 [rc_options]~%
3455 backend = TkAgg~%"
3456 (assoc-ref inputs "tcl")
3457 (assoc-ref inputs "tk"))))))
3458 (alist-cons-after
3459 'install 'install-doc
3460 (lambda* (#:key inputs outputs #:allow-other-keys)
3461 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
3462 (doc (string-append data "/doc/" ,name "-" ,version))
3463 (info (string-append data "/info"))
3464 (html (string-append doc "/html")))
3465 ;; Make installed package available for building the
3466 ;; documentation
3467 (add-installed-pythonpath inputs outputs)
3468 (with-directory-excursion "doc"
3469 ;; Produce pdf in 'A4' format.
3470 (substitute* (find-files "." "conf\\.py")
3471 (("latex_paper_size = 'letter'")
3472 "latex_paper_size = 'a4'"))
3473 (mkdir-p html)
3474 (mkdir-p info)
3475 ;; The doc recommends to run the 'html' target twice.
3476 (system* "python" "make.py" "html")
3477 (system* "python" "make.py" "html")
3478 (copy-recursively "build/html" html)
3479 (system* "python" "make.py" "latex")
3480 (system* "python" "make.py" "texinfo")
3481 (symlink (string-append html "/_images")
3482 (string-append info "/matplotlib-figures"))
3483 (with-directory-excursion "build/texinfo"
3484 (substitute* "matplotlib.texi"
3485 (("@image\\{([^,]*)" all file)
3486 (string-append "@image{matplotlib-figures/" file)))
3487 (symlink (string-append html "/_images")
3488 "./matplotlib-figures")
3489 (system* "makeinfo" "--no-split"
3490 "-o" "matplotlib.info" "matplotlib.texi"))
3491 (copy-file "build/texinfo/matplotlib.info"
3492 (string-append info "/matplotlib.info"))
3493 (copy-file "build/latex/Matplotlib.pdf"
3494 (string-append doc "/Matplotlib.pdf")))))
3495 %standard-phases))))
3496 (home-page "http://matplotlib.org")
3497 (synopsis "2D plotting library for Python")
3498 (description
3499 "Matplotlib is a Python 2D plotting library which produces publication
3500 quality figures in a variety of hardcopy formats and interactive environments
3501 across platforms. Matplotlib can be used in Python scripts, the python and
3502 ipython shell, web application servers, and six graphical user interface
3503 toolkits.")
3504 (license license:psfl)
3505 (properties `((python2-variant . ,(delay python2-matplotlib))))))
3506
3507 (define-public python2-matplotlib
3508 (let ((matplotlib (package-with-python2
3509 (strip-python2-variant python-matplotlib))))
3510 (package (inherit matplotlib)
3511 ;; Make sure to use special packages for Python 2 instead
3512 ;; of those automatically rewritten by package-with-python2.
3513 (propagated-inputs
3514 `(("python2-pycairo" ,python2-pycairo)
3515 ("python2-pygobject-2" ,python2-pygobject-2)
3516 ("python2-tkinter" ,python-2 "tk")
3517 ,@(fold alist-delete (package-propagated-inputs matplotlib)
3518 '("python-pycairo" "python-pygobject" "python-tkinter")))))))
3519
3520 (define-public python2-pysnptools
3521 (package
3522 (name "python2-pysnptools")
3523 (version "0.3.9")
3524 (source
3525 (origin
3526 (method url-fetch)
3527 (uri (pypi-uri "pysnptools" version ".zip"))
3528 (sha256
3529 (base32
3530 "1wybggjzz8zw7aav4pjsg2h22xp17a1lghrprza1pxwlm7wf96y2"))))
3531 (build-system python-build-system)
3532 (arguments
3533 `(#:python ,python-2)) ; only Python 2.7 is supported
3534 (propagated-inputs
3535 `(("python2-numpy" ,python2-numpy)
3536 ("python2-scipy" ,python2-scipy)
3537 ("python2-pandas" ,python2-pandas)))
3538 (native-inputs
3539 `(("python2-cython" ,python2-cython)))
3540 (native-inputs
3541 `(("unzip" ,unzip)))
3542 (home-page "http://research.microsoft.com/en-us/um/redmond/projects/mscompbio/")
3543 (synopsis "Library for reading and manipulating genetic data")
3544 (description
3545 "PySnpTools is a library for reading and manipulating genetic data. It
3546 can, for example, efficiently read whole PLINK *.bed/bim/fam files or parts of
3547 those files. It can also efficiently manipulate ranges of integers using set
3548 operators such as union, intersection, and difference.")
3549 (license license:asl2.0)))
3550
3551 (define-public python-rpy2
3552 (package
3553 (name "python-rpy2")
3554 (version "2.7.6")
3555 (source
3556 (origin
3557 (method url-fetch)
3558 (uri (pypi-uri "rpy2" version))
3559 (sha256
3560 (base32
3561 "0nhan2qvrw7b7gg5zddwa22kybdv3x1g26vkd7q8lvnkgzrs4dga"))))
3562 (build-system python-build-system)
3563 (propagated-inputs
3564 `(("python-six" ,python-six)))
3565 (inputs
3566 `(("readline" ,readline)
3567 ("icu4c" ,icu4c)
3568 ("pcre" ,pcre)
3569 ("r" ,r)))
3570 (native-inputs
3571 `(("zlib" ,zlib)))
3572 (home-page "http://rpy.sourceforge.net/")
3573 (synopsis "Python interface to the R language")
3574 (description "rpy2 is a redesign and rewrite of rpy. It is providing a
3575 low-level interface to R from Python, a proposed high-level interface,
3576 including wrappers to graphical libraries, as well as R-like structures and
3577 functions.")
3578 (license license:gpl3+)))
3579
3580 (define-public python2-rpy2
3581 (let ((rpy2 (package-with-python2 python-rpy2)))
3582 (package (inherit rpy2)
3583 (native-inputs
3584 `(("python2-singledispatch" ,python2-singledispatch)
3585 ,@(package-native-inputs rpy2))))))
3586
3587 (define-public python-scipy
3588 (package
3589 (name "python-scipy")
3590 (version "0.16.0")
3591 (source
3592 (origin
3593 (method url-fetch)
3594 ; http://downloads.sourceforge.net/project/scipy/scipy/0.16.1/scipy-0.16.1.tar.gz
3595 (uri (string-append "mirror://sourceforge/scipy/scipy/" version
3596 "/scipy-" version ".tar.xz"))
3597 (sha256
3598 (base32
3599 "0wa0a4skpda3gx7lb12yn19nhbairlyxrvda2lz2bcawk3x5qzz2"))))
3600 (build-system python-build-system)
3601 (propagated-inputs
3602 `(("python-numpy" ,python-numpy)
3603 ("python-matplotlib" ,python-matplotlib)
3604 ("python-pyparsing" ,python-pyparsing)))
3605 (inputs
3606 `(("lapack" ,lapack)
3607 ("openblas" ,openblas)))
3608 (native-inputs
3609 `(("python-nose" ,python-nose)
3610 ("python-sphinx" ,python-sphinx)
3611 ("python-numpydoc" ,python-numpydoc)
3612 ("gfortran" ,gfortran)
3613 ("texlive" ,texlive)
3614 ("perl" ,perl)))
3615 (outputs '("out" "doc"))
3616 (arguments
3617 `(#:phases
3618 (alist-cons-before
3619 'build 'configure-openblas
3620 (lambda* (#:key inputs #:allow-other-keys)
3621 (call-with-output-file "site.cfg"
3622 (lambda (port)
3623 (format port
3624 "[blas]
3625 libraries = openblas
3626 library_dirs = ~a/lib
3627 include_dirs = ~a/include
3628
3629 # backslash-n to make emacs happy
3630 \n[atlas]
3631 library_dirs = ~a/lib
3632 atlas_libs = openblas
3633 "
3634 (assoc-ref inputs "openblas")
3635 (assoc-ref inputs "openblas")
3636 (assoc-ref inputs "openblas"))))
3637 #t)
3638 (alist-cons-after
3639 'install 'install-doc
3640 (lambda* (#:key inputs outputs #:allow-other-keys)
3641 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
3642 (doc (string-append data "/doc/" ,name "-" ,version))
3643 (html (string-append doc "/html"))
3644 (pyver ,(string-append "PYVER=")))
3645 ;; Make installed package available for building the
3646 ;; documentation
3647 (add-installed-pythonpath inputs outputs)
3648 (with-directory-excursion "doc"
3649 ;; Fix generation of images for mathematical expressions.
3650 (substitute* (find-files "source" "conf\\.py")
3651 (("pngmath_use_preview = True")
3652 "pngmath_use_preview = False"))
3653 (mkdir-p html)
3654 (system* "make" "html" pyver)
3655 (system* "make" "latex" "PAPER=a4" pyver)
3656 (system* "make" "-C" "build/latex" "all-pdf" "PAPER=a4" pyver)
3657 (copy-file "build/latex/scipy-ref.pdf"
3658 (string-append doc "/scipy-ref.pdf"))
3659 (with-directory-excursion "build/html"
3660 (for-each (lambda (file)
3661 (let* ((dir (dirname file))
3662 (tgt-dir (string-append html "/" dir)))
3663 (install-file file html)))
3664 (find-files "." ".*"))))))
3665 ;; Tests can only be run after the library has been installed and not
3666 ;; within the source directory.
3667 (alist-cons-after
3668 'install 'check
3669 (lambda _
3670 (with-directory-excursion "/tmp"
3671 (zero? (system* "python" "-c" "import scipy; scipy.test()"))))
3672 (alist-delete
3673 'check
3674 (alist-cons-after
3675 'unpack 'fix-tests
3676 (lambda _
3677 (substitute* "scipy/integrate/tests/test_quadpack.py"
3678 (("libm.so") "libm.so.6"))
3679 #t)
3680 %standard-phases)))))))
3681 (home-page "http://www.scipy.org/")
3682 (synopsis "The Scipy library provides efficient numerical routines")
3683 (description "The SciPy library is one of the core packages that make up
3684 the SciPy stack. It provides many user-friendly and efficient numerical
3685 routines such as routines for numerical integration and optimization.")
3686 (license license:bsd-3)))
3687
3688 (define-public python2-scipy
3689 (package-with-python2 python-scipy))
3690
3691 (define-public python-socksipy-branch
3692 (package
3693 (name "python-socksipy-branch")
3694 (version "1.01")
3695 (source
3696 (origin
3697 (method url-fetch)
3698 (uri (pypi-uri "SocksiPy-branch" version))
3699 (sha256
3700 (base32
3701 "01l41v4g7fy9fzvinmjxy6zcbhgqaif8dhdqm4w90fwcw9h51a8p"))))
3702 (build-system python-build-system)
3703 (arguments
3704 `(#:tests? #f)) ; There are no tests
3705 (home-page "https://code.google.com/archive/p/socksipy-branch/")
3706 (synopsis "Python SOCKS module")
3707 (description
3708 "SocksiPy - A Python SOCKS client module. It provides a
3709 socket-like interface that supports connections to any TCP
3710 service through the use of a SOCKS4, SOCKS5 or HTTP proxy.
3711 The original version was developed by Dan Haim, this is a
3712 branch created by Mario Vilas to address some open issues,
3713 as the original project seems to have been abandoned circa 2007.")
3714 (license license:bsd-3)))
3715
3716 (define-public python2-socksipy-branch
3717 (package-with-python2 python-socksipy-branch))
3718
3719 (define-public python-sqlalchemy
3720 (package
3721 (name "python-sqlalchemy")
3722 (version "1.0.12")
3723 (source
3724 (origin
3725 (method url-fetch)
3726 (uri (string-append "https://pypi.python.org/packages/source/S/"
3727 "SQLAlchemy/SQLAlchemy-" version ".tar.gz"))
3728 (sha256
3729 (base32
3730 "1l8qclhd0s90w3pvwhi5mjxdwr5j7gw7cjka2fx6f2vqmq7f4yb6"))))
3731 (build-system python-build-system)
3732 (native-inputs
3733 `(("python-cython" ,python-cython) ;for c extensions
3734 ("python-pytest" ,python-pytest)
3735 ("python-mock" ,python-mock))) ;for tests
3736 (arguments
3737 `(#:phases (alist-replace
3738 'check
3739 (lambda _ (zero? (system* "py.test")))
3740 %standard-phases)))
3741 (home-page "http://www.sqlalchemy.org")
3742 (synopsis "Database abstraction library")
3743 (description
3744 "SQLAlchemy is the Python SQL toolkit and Object Relational Mapper that
3745 gives application developers the full power and flexibility of SQL. It
3746 provides a full suite of well known enterprise-level persistence patterns,
3747 designed for efficient and high-performing database access, adapted into a
3748 simple and Pythonic domain language.")
3749 (license license:x11)))
3750
3751 (define-public python2-sqlalchemy
3752 (package-with-python2 python-sqlalchemy))
3753
3754 (define-public python-pycodestyle
3755 (package
3756 (name "python-pycodestyle")
3757 (version "2.0.0")
3758 (source
3759 (origin
3760 (method url-fetch)
3761 (uri (pypi-uri "pycodestyle" version))
3762 (sha256
3763 (base32
3764 "1rz2v8506mdjdyxcnv9ygiw6v0d4dqx8z5sjyjm0w2v32h5l5w1p"))))
3765 (build-system python-build-system)
3766 (home-page "https://pycodestyle.readthedocs.io/")
3767 (synopsis "Python style guide checker")
3768 (description "@code{pycodestyle} (formerly pep8) is a tool to check
3769 Python code against some of the style conventions in
3770 @url{http://www.python.org/dev/peps/pep-0008/,PEP 8}.")
3771 (license license:expat)))
3772
3773 (define-public python2-pycodestyle
3774 (package-with-python2 python-pycodestyle))
3775
3776 (define-public python-orderedmultidict
3777 (package
3778 (name "python-orderedmultidict")
3779 (version "0.7.10")
3780 (source
3781 (origin
3782 (method url-fetch)
3783 (uri (pypi-uri "orderedmultidict" version))
3784 (sha256
3785 (base32
3786 "1gvqk0jd432wsn88kq4svad68xz3r012jfpnhh9in7bqrkyxidky"))))
3787 (build-system python-build-system)
3788 (arguments
3789 `(#:phases
3790 (modify-phases %standard-phases
3791 (add-after 'unpack 'fix-tests
3792 (lambda _
3793 ;; The package uses nosetest for running the tests.
3794 ;; Adding this initfile allows to run the test suite
3795 ;; without requiring nosetest.
3796 (zero? (system* "touch" "tests/__init__.py")))))))
3797 (propagated-inputs
3798 `(("python-six" ,python-six)))
3799 (native-inputs
3800 `(("python-pycodestyle" ,python-pycodestyle)))
3801 (home-page "https://github.com/gruns/orderedmultidict")
3802 (synopsis "Python Ordered Multivalue Dictionary - omdict")
3803 (description "This package contains a library for ordered multivalue
3804 dictionaries. A multivalue dictionary is a dictionary that can store
3805 multiple values for the same key. An ordered multivalue dictionary is a
3806 multivalue dictionary that retains the order of insertions and deletions.")
3807 (license license:unlicense)))
3808
3809 (define-public python2-orderedmultidict
3810 (package-with-python2 python-orderedmultidict))
3811
3812 (define-public python-furl
3813 (package
3814 (name "python-furl")
3815 (version "0.5.6")
3816 (source
3817 (origin
3818 (method url-fetch)
3819 (uri (pypi-uri "furl" version))
3820 (sha256
3821 (base32
3822 "0lzpfpm686hvz3sr1mcrnd1b3lgmnw8v59gb43wfi98r3b671pqc"))))
3823 (build-system python-build-system)
3824 (propagated-inputs
3825 `(("python-six" ,python-six)
3826 ("python-orderedmultidict" ,python-orderedmultidict)))
3827 (native-inputs
3828 `(("python-pycodestyle" ,python-pycodestyle)))
3829 (home-page "https://github.com/gruns/furl")
3830 (synopsis "URL manipulation in Python")
3831 (description "Furl provides an easy-to-use alternative to the
3832 @code{urllib} and @code{urlparse} modules for manipulating URLs.")
3833 (license license:unlicense)))
3834
3835 (define-public python2-furl
3836 (package-with-python2 python-furl))
3837
3838 (define-public python-flask-babel
3839 (package
3840 (name "python-flask-babel")
3841 (version "0.11.1")
3842 (source
3843 (origin
3844 (method url-fetch)
3845 (uri (pypi-uri "Flask-Babel" version))
3846 (sha256
3847 (base32
3848 "16b80cipdba9xj3jlaiaq6wgrgpjb70w3j01jjy9hbp4k71kd6yj"))))
3849 (build-system python-build-system)
3850 (propagated-inputs
3851 `(("python-flask" ,python-flask)
3852 ("python-babel" ,python-babel)
3853 ("python-jinja2" ,python-jinja2)
3854 ("python-pytz" ,python-pytz)))
3855 (home-page "https://github.com/python-babel/flask-babel")
3856 (synopsis "Add i18n/l10n support to Flask applications")
3857 (description "This package implements internationalization and localization
3858 support for Flask. This is based on the Python babel module as well as pytz -
3859 both of which are installed automatically if you install this library.")
3860 (license license:bsd-3)))
3861
3862 (define-public python2-flask-babel
3863 (package-with-python2 python-flask-babel))
3864
3865 (define-public python-sqlalchemy-utils
3866 (package
3867 (name "python-sqlalchemy-utils")
3868 (version "0.32.9")
3869 (source
3870 (origin
3871 (method url-fetch)
3872 (uri (pypi-uri "SQLAlchemy-Utils" version))
3873 (sha256
3874 (base32
3875 "1zbmmh7n8m01ikizn2mj1mfwch26nsr1awv9mvskqry7av0mpy98"))))
3876 (build-system python-build-system)
3877 (propagated-inputs
3878 `(("python-six" ,python-six)
3879 ("python-sqlalchemy" ,python-sqlalchemy)))
3880 (native-inputs
3881 `(("python-pytest" ,python-pytest)))
3882 (home-page "https://github.com/kvesteri/sqlalchemy-utils")
3883 (synopsis "Various utility functions for SQLAlchemy")
3884 (description
3885 "SQLAlchemy-utils provides various utility functions and custom data types
3886 for SQLAlchemy. SQLAlchemy is an SQL database abstraction library for Python.
3887
3888 You might also want to install the following optional dependencies:
3889 @enumerate
3890 @item @code{python-passlib}
3891 @item @code{python-babel}
3892 @item @code{python-cryptography}
3893 @item @code{python-pytz}
3894 @item @code{python-psycopg2}
3895 @item @code{python-furl}
3896 @item @code{python-flask-babel}
3897 @end enumerate
3898 ")
3899 (license license:bsd-3)))
3900
3901 (define-public python2-sqlalchemy-utils
3902 (package-with-python2 python-sqlalchemy-utils))
3903
3904 (define-public python-alembic
3905 (package
3906 (name "python-alembic")
3907 (version "0.8.7")
3908 (source
3909 (origin
3910 (method url-fetch)
3911 (uri (pypi-uri "alembic" version))
3912 (sha256
3913 (base32
3914 "0ias6fdzwr2s220fnjspkdgm9510bd0cnap0hx5y4zy4srba9f3z"))))
3915 (build-system python-build-system)
3916 (native-inputs
3917 `(("python-mock" ,python-mock)
3918 ("python-pytest-cov" ,python-pytest-cov)))
3919 (propagated-inputs
3920 `(("python-sqlalchemy" ,python-sqlalchemy)
3921 ("python-mako" ,python-mako)
3922 ("python-editor" ,python-editor)))
3923 (home-page "http://bitbucket.org/zzzeek/alembic")
3924 (synopsis
3925 "Database migration tool for SQLAlchemy")
3926 (description
3927 "Alembic is a lightweight database migration tool for usage with the
3928 SQLAlchemy Database Toolkit for Python.")
3929 (license license:expat)))
3930
3931 (define-public python2-alembic
3932 (package-with-python2 python-alembic))
3933
3934 (define-public python-distutils-extra
3935 (package
3936 (name "python-distutils-extra")
3937 (version "2.38")
3938 (source
3939 (origin
3940 (method url-fetch)
3941 (uri (string-append "https://launchpad.net/python-distutils-extra/trunk/"
3942 version "/+download/python-distutils-extra-"
3943 version ".tar.gz"))
3944 (sha256
3945 (base32
3946 "0lx15kcbby9zisx33p2h5hgakgwh2bvh0ibag8z0px4j6ifhs41x"))))
3947 (build-system python-build-system)
3948 (home-page "https://launchpad.net/python-distutils-extra/")
3949 (synopsis "Enhancements to Python's distutils")
3950 (description
3951 "The python-distutils-extra module enables you to easily integrate
3952 gettext support, themed icons, and scrollkeeper-based documentation into
3953 Python's distutils.")
3954 (license license:gpl2)))
3955
3956 (define-public python2-distutils-extra
3957 (package-with-python2 python-distutils-extra))
3958
3959 (define-public python2-elib.intl
3960 (package
3961 (name "python2-elib.intl")
3962 (version "0.0.3")
3963 (source
3964 (origin
3965 ;; This project doesn't tag releases or publish tarballs, so we take
3966 ;; source from a (semi-arbitrary, i.e. latest as of now) git commit.
3967 (method git-fetch)
3968 (uri (git-reference
3969 (url "https://github.com/dieterv/elib.intl.git")
3970 (commit "d09997cfef")))
3971 (sha256
3972 (base32
3973 "0y7vzff9xgbnaay7m0va1arl6g68ncwrvbgwl7jqlclsahzzb09d"))))
3974 (build-system python-build-system)
3975 (arguments
3976 ;; incompatible with Python 3 (exception syntax)
3977 `(#:python ,python-2
3978 #:tests? #f))
3979 (home-page "https://github.com/dieterv/elib.intl")
3980 (synopsis "Enhanced internationalization for Python")
3981 (description
3982 "The elib.intl module provides enhanced internationalization (I18N)
3983 services for your Python modules and applications.")
3984 (license license:lgpl3+)))
3985
3986 (define-public python-pillow
3987 (package
3988 (name "python-pillow")
3989 (version "3.3.3")
3990 (source
3991 (origin
3992 (method url-fetch)
3993 (uri (pypi-uri "Pillow" version))
3994 (sha256
3995 (base32
3996 "0xkv0p1d73gz0a1qaasf0ai4262g8f334j07vd60bjrxs2wr3nmj"))))
3997 (build-system python-build-system)
3998 (native-inputs
3999 `(("python-nose" ,python-nose)))
4000 (inputs
4001 `(("freetype" ,freetype)
4002 ("lcms" ,lcms)
4003 ("zlib" ,zlib)
4004 ("libjpeg" ,libjpeg)
4005 ("openjpeg" ,openjpeg)
4006 ("libtiff" ,libtiff)
4007 ("libwebp" ,libwebp)))
4008 ;; Note: setuptools used at runtime for pkg_resources
4009 (arguments
4010 `(#:phases (modify-phases %standard-phases
4011 (add-after
4012 'install 'check-installed
4013 (lambda* (#:key outputs inputs #:allow-other-keys)
4014 (begin
4015 (setenv "HOME" (getcwd))
4016 ;; Make installed package available for running the
4017 ;; tests
4018 (add-installed-pythonpath inputs outputs)
4019 (and (zero? (system* "python" "selftest.py"
4020 "--installed"))
4021 (zero? (system* "python" "test-installed.py"))))))
4022 (delete 'check))))
4023 (home-page "https://pypi.python.org/pypi/Pillow")
4024 (synopsis "Fork of the Python Imaging Library")
4025 (description
4026 "The Python Imaging Library adds image processing capabilities to your
4027 Python interpreter. This library provides extensive file format support, an
4028 efficient internal representation, and fairly powerful image processing
4029 capabilities. The core image library is designed for fast access to data
4030 stored in a few basic pixel formats. It should provide a solid foundation for
4031 a general image processing tool.")
4032 (license (license:x11-style
4033 "http://www.pythonware.com/products/pil/license.htm"
4034 "The PIL Software License"))))
4035
4036 (define-public python2-pillow
4037 (package-with-python2 python-pillow))
4038
4039 (define-public python-pycparser
4040 (package
4041 (name "python-pycparser")
4042 (version "2.14")
4043 (source
4044 (origin
4045 (method url-fetch)
4046 (uri (pypi-uri "pycparser" version))
4047 (sha256
4048 (base32
4049 "0wvzyb6rxsfj3xcnpa4ynbh9qc7rrbk2277d5wqpphmx9akv8nbr"))))
4050 (outputs '("out" "doc"))
4051 (build-system python-build-system)
4052 (native-inputs
4053 `(("pkg-config" ,pkg-config)))
4054 (arguments
4055 `(#:phases
4056 (alist-replace
4057 'check
4058 (lambda _
4059 (with-directory-excursion "tests"
4060 (zero? (system* "python" "all_tests.py"))))
4061 (alist-cons-after
4062 'install 'install-doc
4063 (lambda* (#:key outputs #:allow-other-keys)
4064 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4065 (doc (string-append data "/doc/" ,name "-" ,version))
4066 (examples (string-append doc "/examples")))
4067 (mkdir-p examples)
4068 (for-each (lambda (file)
4069 (copy-file (string-append "." file)
4070 (string-append doc file)))
4071 '("/README.rst" "/CHANGES" "/LICENSE"))
4072 (copy-recursively "examples" examples)))
4073 %standard-phases))))
4074 (home-page "https://github.com/eliben/pycparser")
4075 (synopsis "C parser in Python")
4076 (description
4077 "Pycparser is a complete parser of the C language, written in pure Python
4078 using the PLY parsing library. It parses C code into an AST and can serve as
4079 a front-end for C compilers or analysis tools.")
4080 (license license:bsd-3)))
4081
4082 (define-public python2-pycparser
4083 (package-with-python2 python-pycparser))
4084
4085 (define-public python-cffi
4086 (package
4087 (name "python-cffi")
4088 (version "1.4.2")
4089 (source
4090 (origin
4091 (method url-fetch)
4092 (uri (pypi-uri "cffi" version))
4093 (sha256
4094 (base32 "161rj52rzi3880lij17d6i9kvgkiwjilrqjs8405k8sf6ryif7cg"))))
4095 (build-system python-build-system)
4096 (outputs '("out" "doc"))
4097 (inputs
4098 `(("libffi" ,libffi)))
4099 (propagated-inputs ; required at run-time
4100 `(("python-pycparser" ,python-pycparser)))
4101 (native-inputs
4102 `(("pkg-config" ,pkg-config)
4103 ("python-sphinx" ,python-sphinx)
4104 ("python-pytest" ,python-pytest)))
4105 (arguments
4106 `(#:phases
4107 (alist-cons-after
4108 'install 'install-doc
4109 (lambda* (#:key outputs #:allow-other-keys)
4110 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4111 (doc (string-append data "/doc/" ,name "-" ,version))
4112 (html (string-append doc "/html")))
4113 (with-directory-excursion "doc"
4114 (system* "make" "html")
4115 (mkdir-p html)
4116 (copy-recursively "build/html" html))
4117 (copy-file "LICENSE" (string-append doc "/LICENSE"))))
4118 %standard-phases)))
4119 (home-page "http://cffi.readthedocs.org")
4120 (synopsis "Foreign function interface for Python")
4121 (description
4122 "Foreign Function Interface for Python calling C code.")
4123 (license license:expat)))
4124
4125 (define-public python2-cffi
4126 (package-with-python2 python-cffi))
4127
4128 (define-public python-xcffib
4129 (package
4130 (name "python-xcffib")
4131 (version "0.1.9")
4132 (source
4133 (origin
4134 (method url-fetch)
4135 (uri (string-append "https://pypi.python.org/packages/source/x/"
4136 "xcffib/xcffib-" version ".tar.gz"))
4137 (sha256
4138 (base32
4139 "0655hzxv57h1a9ja9kwp0ichbkhf3djw32k33d66xp0q37dq2y81"))))
4140 (build-system python-build-system)
4141 (inputs
4142 `(("libxcb" ,libxcb)))
4143 (propagated-inputs
4144 `(("python-cffi" ,python-cffi) ; used at run time
4145 ("python-six" ,python-six)))
4146 (arguments
4147 `(#:phases
4148 (alist-cons-after
4149 'install 'install-doc
4150 (lambda* (#:key outputs #:allow-other-keys)
4151 (let ((doc (string-append (assoc-ref outputs "out") "/share"
4152 "/doc/" ,name "-" ,version)))
4153 (mkdir-p doc)
4154 (copy-file "README.md"
4155 (string-append doc "/README.md"))))
4156 %standard-phases)))
4157 (home-page "https://github.com/tych0/xcffib")
4158 (synopsis "XCB Python bindings")
4159 (description
4160 "Xcffib is a replacement for xpyb, an XCB Python bindings. It adds
4161 support for Python 3 and PyPy. It is based on cffi.")
4162 (license license:expat)))
4163
4164 (define-public python2-xcffib
4165 (package-with-python2 python-xcffib))
4166
4167 (define-public python-cairocffi
4168 (package
4169 (name "python-cairocffi")
4170 (version "0.6")
4171 (source
4172 (origin
4173 (method url-fetch)
4174 ;; The archive on pypi is missing the 'utils' directory!
4175 (uri (string-append "https://github.com/SimonSapin/cairocffi/archive/v"
4176 version ".tar.gz"))
4177 (file-name (string-append name "-" version ".tar.gz"))
4178 (sha256
4179 (base32
4180 "03w5p62sp3nqiccx864sbq0jvh7946277jqx3rcc3dch5xwfvv51"))))
4181 (build-system python-build-system)
4182 (outputs '("out" "doc"))
4183 (inputs
4184 `(("gdk-pixbuf" ,gdk-pixbuf)
4185 ("cairo" ,cairo)))
4186 (native-inputs
4187 `(("pkg-config" ,pkg-config)
4188 ("python-sphinx" ,python-sphinx)
4189 ("python-docutils" ,python-docutils)))
4190 (propagated-inputs
4191 `(("python-xcffib" ,python-xcffib))) ; used at run time
4192 (arguments
4193 `(#:phases
4194 (alist-cons-after
4195 'install 'install-doc
4196 (lambda* (#:key inputs outputs #:allow-other-keys)
4197 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4198 (doc (string-append data "/doc/" ,name "-" ,version))
4199 (html (string-append doc "/html")))
4200 (setenv "LD_LIBRARY_PATH"
4201 (string-append (assoc-ref inputs "cairo") "/lib" ":"
4202 (assoc-ref inputs "gdk-pixbuf") "/lib"))
4203 (setenv "LANG" "en_US.UTF-8")
4204 (mkdir-p html)
4205 (for-each (lambda (file)
4206 (copy-file (string-append "." file)
4207 (string-append doc file)))
4208 '("/README.rst" "/CHANGES" "/LICENSE"))
4209 (system* "python" "setup.py" "build_sphinx")
4210 (copy-recursively "docs/_build/html" html)))
4211 %standard-phases)))
4212 (home-page "https://github.com/SimonSapin/cairocffi")
4213 (synopsis "Python bindings and object-oriented API for Cairo")
4214 (description
4215 "Cairocffi is a CFFI-based drop-in replacement for Pycairo, a set of
4216 Python bindings and object-oriented API for cairo. Cairo is a 2D vector
4217 graphics library with support for multiple backends including image buffers,
4218 PNG, PostScript, PDF, and SVG file output.")
4219 (license license:bsd-3)))
4220
4221 (define-public python2-cairocffi
4222 (package-with-python2 python-cairocffi))
4223
4224 (define-public python-decorator
4225 (package
4226 (name "python-decorator")
4227 (version "4.0.9")
4228 (source
4229 (origin
4230 (method url-fetch)
4231 (uri (pypi-uri "decorator" version))
4232 (sha256
4233 (base32 "1a5vwhflfd9sh3rfb40xlyipldgdzfff6brman57hqv3661jw0lh"))))
4234 (build-system python-build-system)
4235 (arguments '(#:tests? #f)) ; no test target
4236 (home-page "https://pypi.python.org/pypi/decorator/")
4237 (synopsis "Python module to simplify usage of decorators")
4238 (description
4239 "The aim of the decorator module is to simplify the usage of decorators
4240 for the average programmer, and to popularize decorators usage giving examples
4241 of useful decorators, such as memoize, tracing, redirecting_stdout, locked,
4242 etc. The core of this module is a decorator factory.")
4243 (license license:expat)))
4244
4245 (define-public python2-decorator
4246 (package-with-python2 python-decorator))
4247
4248 (define-public python-drmaa
4249 (package
4250 (name "python-drmaa")
4251 (version "0.7.6")
4252 (source
4253 (origin
4254 (method url-fetch)
4255 (uri (string-append
4256 "https://pypi.python.org/packages/source/d/drmaa/drmaa-"
4257 version ".tar.gz"))
4258 (sha256
4259 (base32 "0bzl9f9g34dlhwf09i3fdv7dqqzf2iq0w7d6c2bafx1nlap8qfbh"))))
4260 (build-system python-build-system)
4261 ;; The test suite requires libdrmaa which is provided by the cluster
4262 ;; environment. At runtime the environment variable DRMAA_LIBRARY_PATH
4263 ;; should be set to the path of the libdrmaa library.
4264 (arguments '(#:tests? #f))
4265 (native-inputs
4266 `(("python-nose" ,python-nose)))
4267 (home-page "https://pypi.python.org/pypi/drmaa")
4268 (synopsis "Python bindings for the DRMAA library")
4269 (description
4270 "A Python package for Distributed Resource Management (DRM) job
4271 submission and control. This package is an implementation of the DRMAA 1.0
4272 Python language binding specification.")
4273 (license license:bsd-3)))
4274
4275 (define-public python2-drmaa
4276 (package-with-python2 python-drmaa))
4277
4278 (define-public python-gridmap
4279 (package
4280 (name "python-gridmap")
4281 (version "0.13.0")
4282 (source
4283 (origin
4284 (method url-fetch)
4285 (uri (string-append
4286 "https://github.com/pygridtools/gridmap/archive/v"
4287 version ".tar.gz"))
4288 (file-name (string-append name "-" version ".tar.gz"))
4289 (sha256
4290 (base32 "1gzjg2k6f14i1msm2b0ax8d9ds1hvk6qd5nlaivg8m4cxqp4cp1x"))))
4291 (build-system python-build-system)
4292 (propagated-inputs
4293 `(("python-psutil" ,python-psutil)
4294 ("python-drmaa" ,python-drmaa)
4295 ("python-pyzmq" ,python-pyzmq)))
4296 (home-page "https://github.com/pygridtools/gridmap")
4297 (synopsis "Create jobs on a cluster directly from Python")
4298 (description
4299 "Gridmap is a Python package to allow you to easily create jobs on the
4300 cluster directly from Python. You can directly map Python functions onto the
4301 cluster without needing to write any wrapper code yourself.")
4302 (license license:gpl3+)))
4303
4304 (define-public python2-gridmap
4305 (package-with-python2 python-gridmap))
4306
4307 (define-public python-pexpect
4308 (package
4309 (name "python-pexpect")
4310 (version "3.3")
4311 (source
4312 (origin
4313 (method url-fetch)
4314 (uri (string-append "https://pypi.python.org/packages/source/p/"
4315 "pexpect/pexpect-" version ".tar.gz"))
4316 (sha256
4317 (base32 "1fp5gm976z7ghm8jw57463rj19cv06c8zw842prgyg788f6n3snz"))))
4318 (build-system python-build-system)
4319 (arguments
4320 `(#:phases
4321 (modify-phases %standard-phases
4322 (replace 'check (lambda _ (zero? (system* "nosetests")))))))
4323 (native-inputs
4324 `(("python-nose" ,python-nose)))
4325 (home-page "http://pexpect.readthedocs.org/")
4326 (synopsis "Controlling interactive console applications")
4327 (description
4328 "Pexpect is a pure Python module for spawning child applications;
4329 controlling them; and responding to expected patterns in their output.
4330 Pexpect works like Don Libes’ Expect. Pexpect allows your script to spawn a
4331 child application and control it as if a human were typing commands.")
4332 (license license:isc)))
4333
4334 (define-public python2-pexpect
4335 (package-with-python2 python-pexpect))
4336
4337 (define-public python-setuptools-scm
4338 (package
4339 (name "python-setuptools-scm")
4340 (version "1.11.1")
4341 (source (origin
4342 (method url-fetch)
4343 (uri (pypi-uri "setuptools_scm" version))
4344 (sha256
4345 (base32
4346 "1gqr73i150yzj3mz32854vj93x07yr52kn8fdckwa41ll8wgficc"))))
4347 (build-system python-build-system)
4348 (home-page "https://github.com/pypa/setuptools_scm/")
4349 (synopsis "Manage Python package versions in SCM metadata")
4350 (description
4351 "Setuptools_scm handles managing your Python package versions in
4352 @dfn{software configuration management} (SCM) metadata instead of declaring
4353 them as the version argument or in a SCM managed file.")
4354 (license license:expat)))
4355
4356 (define-public python2-setuptools-scm
4357 (package-with-python2 python-setuptools-scm))
4358
4359 (define-public python-pathpy
4360 (package
4361 (name "python-pathpy")
4362 (version "8.1.1")
4363 (source
4364 (origin
4365 (method url-fetch)
4366 (uri (string-append "https://pypi.python.org/packages/source/p/"
4367 "path.py/path.py-" version ".tar.gz"))
4368 (sha256
4369 (base32 "1p8s1l2vfkqhqxdhqlj0g1jjw4f1as2frr35sjcpjjpd5a89y41f"))))
4370 (build-system python-build-system)
4371 (propagated-inputs
4372 `(("python-appdirs" ,python-appdirs)))
4373 (native-inputs
4374 `(("python-setuptools-scm" ,python-setuptools-scm)
4375 ("python-pytest" ,python-pytest)
4376 ("python-pytest-runner" ,python-pytest-runner)))
4377 (home-page "http://github.com/jaraco/path.py")
4378 (synopsis "Python module wrapper for built-in os.path")
4379 (description
4380 "@code{path.py} implements path objects as first-class entities, allowing
4381 common operations on files to be invoked on those path objects directly.")
4382 (license license:expat)))
4383
4384 (define-public python2-pathpy
4385 (package-with-python2 python-pathpy))
4386
4387 (define-public python-pickleshare
4388 (package
4389 (name "python-pickleshare")
4390 (version "0.5")
4391 (source
4392 (origin
4393 (method url-fetch)
4394 (uri (string-append "https://pypi.python.org/packages/source/p/"
4395 "pickleshare/pickleshare-" version ".tar.gz"))
4396 (sha256
4397 (base32 "11ljr90j3p6qswdrbl7p4cjb2i93f6vn0vx9anzpshsx0d2mggn0"))))
4398 (build-system python-build-system)
4399 (propagated-inputs
4400 `(("python-pathpy" ,python-pathpy)))
4401 (home-page "https://github.com/vivainio/pickleshare")
4402 (synopsis "Tiny key value database with concurrency support")
4403 (description
4404 "PickleShare is a small ‘shelve’-like datastore with concurrency support.
4405 Like shelve, a PickleShareDB object acts like a normal dictionary. Unlike
4406 shelve, many processes can access the database simultaneously. Changing a
4407 value in database is immediately visible to other processes accessing the same
4408 database. Concurrency is possible because the values are stored in separate
4409 files. Hence the “database” is a directory where all files are governed by
4410 PickleShare.")
4411 (license license:expat)))
4412
4413 (define-public python2-pickleshare
4414 (package-with-python2 python-pickleshare))
4415
4416 (define-public python-simplegeneric
4417 (package
4418 (name "python-simplegeneric")
4419 (version "0.8.1")
4420 (source
4421 (origin
4422 (method url-fetch)
4423 (uri (string-append "https://pypi.python.org/packages/source/s/"
4424 "simplegeneric/simplegeneric-" version ".zip"))
4425 (sha256
4426 (base32 "0wwi1c6md4vkbcsfsf8dklf3vr4mcdj4mpxkanwgb6jb1432x5yw"))))
4427 (build-system python-build-system)
4428 (native-inputs
4429 `(("unzip" ,unzip)))
4430 (home-page "http://cheeseshop.python.org/pypi/simplegeneric")
4431 (synopsis "Python module for simple generic functions")
4432 (description
4433 "The simplegeneric module lets you define simple single-dispatch generic
4434 functions, akin to Python’s built-in generic functions like @code{len()},
4435 @code{iter()} and so on. However, instead of using specially-named methods,
4436 these generic functions use simple lookup tables, akin to those used by
4437 e.g. @code{pickle.dump()} and other generic functions found in the Python
4438 standard library.")
4439 (license license:zpl2.1)))
4440
4441 (define-public python2-simplegeneric
4442 (package-with-python2 python-simplegeneric))
4443
4444 (define-public python-ipython-genutils
4445 (package
4446 (name "python-ipython-genutils")
4447 (version "0.1.0")
4448 (source
4449 (origin
4450 (method url-fetch)
4451 (uri (string-append "https://pypi.python.org/packages/source/i/"
4452 "ipython_genutils/ipython_genutils-"
4453 version ".tar.gz"))
4454 (sha256
4455 (base32 "19l2pp1c64ansr89l3cqh19jdi2ixhssdzx0vz4n6r52a6i281is"))))
4456 (build-system python-build-system)
4457 (arguments `(#:tests? #f)) ; no tests
4458 (home-page "http://ipython.org")
4459 (synopsis "Vestigial utilities from IPython")
4460 (description
4461 "This package provides retired utilities from IPython.")
4462 (license license:bsd-3)))
4463
4464 (define-public python2-ipython-genutils
4465 (package-with-python2 python-ipython-genutils))
4466
4467 (define-public python-traitlets
4468 (package
4469 (name "python-traitlets")
4470 (version "4.2.0")
4471 (source
4472 (origin
4473 (method url-fetch)
4474 (uri (pypi-uri "traitlets" version))
4475 (sha256
4476 (base32
4477 "1afy08sa5n9gnkvh3da49c16zkyv598vchv0p1hp7zzjy8895hz4"))))
4478 (build-system python-build-system)
4479 (arguments
4480 `(#:phases
4481 (modify-phases %standard-phases
4482 (replace 'check (lambda _ (zero? (system* "nosetests")))))))
4483 (propagated-inputs
4484 `(("python-ipython-genutils" ,python-ipython-genutils)
4485 ("python-decorator" ,python-decorator)))
4486 (native-inputs
4487 `(("python-mock" ,python-mock)
4488 ("python-nose" ,python-nose)))
4489 (home-page "http://ipython.org")
4490 (synopsis "Configuration system for Python applications")
4491 (description
4492 "Traitlets is a framework that lets Python classes have attributes with
4493 type checking, dynamically calculated default values, and ‘on change’
4494 callbacks. The package also includes a mechanism to use traitlets for
4495 configuration, loading values from files or from command line arguments. This
4496 is a distinct layer on top of traitlets, so you can use traitlets in your code
4497 without using the configuration machinery.")
4498 (license license:bsd-3)))
4499
4500 (define-public python2-traitlets
4501 (package-with-python2 python-traitlets))
4502
4503 (define-public python-jupyter-core
4504 (package
4505 (name "python-jupyter-core")
4506 (version "4.2.0")
4507 (source
4508 (origin
4509 (method url-fetch)
4510 (uri (string-append (pypi-uri "jupyter_core" version)))
4511 (sha256
4512 (base32
4513 "177d9csqldzhsh6xs1p4nf6lzvhzyg6gklqjf69lxgxyadx87v24"))))
4514 (build-system python-build-system)
4515 ;; FIXME: not sure how to run the tests
4516 (arguments `(#:tests? #f))
4517 (propagated-inputs
4518 `(("python-traitlets" ,python-traitlets)))
4519 (home-page "http://jupyter.org/")
4520 (synopsis "Jupyter base package")
4521 (description
4522 "Jupyter core is the base package on which Jupyter projects rely.")
4523 (license license:bsd-3)))
4524
4525 (define-public python2-jupyter-core
4526 (package-with-python2 python-jupyter-core))
4527
4528 (define-public python-jupyter-client
4529 (package
4530 (name "python-jupyter-client")
4531 (version "4.4.0")
4532 (source
4533 (origin
4534 (method url-fetch)
4535 (uri (pypi-uri "jupyter_client" version))
4536 (sha256
4537 (base32
4538 "1vjjrpjw7k5sh982pbjnslv7byfbfazjw9g92jvs7dz5qbx556n9"))))
4539 (build-system python-build-system)
4540 ;; Tests fail because of missing native python kernel which I assume is
4541 ;; provided by the ipython package, which we cannot use because it would
4542 ;; cause a dependency cycle.
4543 (arguments `(#:tests? #f))
4544 (propagated-inputs
4545 `(("python-pyzmq" ,python-pyzmq)
4546 ("python-traitlets" ,python-traitlets)
4547 ("python-jupyter-core" ,python-jupyter-core)))
4548 (home-page "http://jupyter.org/")
4549 (synopsis "Jupyter protocol implementation and client libraries")
4550 (description
4551 "The @code{jupyter_client} package contains the reference implementation
4552 of the Jupyter protocol. It also provides client and kernel management APIs
4553 for working with kernels, and the @code{jupyter kernelspec} entrypoint for
4554 installing @code{kernelspec}s for use with Jupyter frontends.")
4555 (license license:bsd-3)))
4556
4557 (define-public python2-jupyter-client
4558 (package-with-python2 python-jupyter-client))
4559
4560 (define-public python-ipykernel
4561 (package
4562 (name "python-ipykernel")
4563 (version "4.5.0")
4564 (source
4565 (origin
4566 (method url-fetch)
4567 (uri (pypi-uri "ipykernel" version))
4568 (sha256
4569 (base32 "15c2bp1x3i6s4xb7vz7742h3kmvdfdfn9n2haywm3mwgvf77jni4"))))
4570 (build-system python-build-system)
4571 ;; The tests load a submodule of IPython. However, IPython itself depends
4572 ;; on ipykernel.
4573 (arguments `(#:tests? #f))
4574 (propagated-inputs
4575 ;; imported at runtime during connect
4576 `(("python-jupyter-client" ,python-jupyter-client)))
4577 (home-page "http://ipython.org")
4578 (synopsis "IPython Kernel for Jupyter")
4579 (description
4580 "This package provides the IPython kernel for Jupyter.")
4581 (license license:bsd-3)))
4582
4583 (define-public python2-ipykernel
4584 (package-with-python2 python-ipykernel))
4585
4586 (define-public python-testpath
4587 (package
4588 (name "python-testpath")
4589 (version "0.2")
4590 (source
4591 (origin
4592 (method url-fetch)
4593 (uri (string-append "https://github.com/jupyter/testpath/archive/"
4594 version ".tar.gz"))
4595 (file-name (string-append name "-" version ".tar.gz"))
4596 (sha256
4597 (base32
4598 "04kh3fgvmqz6cfcw79q70qwjz7ib7lxm27cc548iy2rpr33qqf55"))))
4599 (build-system python-build-system)
4600 (arguments
4601 `(#:tests? #f ; this package does not even have a setup.py
4602 #:phases
4603 (modify-phases %standard-phases
4604 (delete 'install)
4605 (replace 'build
4606 (lambda* (#:key inputs outputs #:allow-other-keys)
4607 (let ((dir (string-append
4608 (assoc-ref outputs "out")
4609 "/lib/python"
4610 (string-take (string-take-right
4611 (assoc-ref inputs "python") 5) 3)
4612 "/site-packages/testpath")))
4613 (mkdir-p dir)
4614 (copy-recursively "testpath" dir))
4615 #t)))))
4616 (home-page "https://github.com/takluyver/testpath")
4617 (synopsis "Test utilities for code working with files and commands")
4618 (description
4619 "Testpath is a collection of utilities for Python code working with files
4620 and commands. It contains functions to check things on the filesystem, and
4621 tools for mocking system commands and recording calls to those.")
4622 (license license:expat)))
4623
4624 (define-public python2-testpath
4625 (package-with-python2 python-testpath))
4626
4627 (define-public python-ipython
4628 (package
4629 (name "python-ipython")
4630 (version "4.0.0")
4631 (source
4632 (origin
4633 (method url-fetch)
4634 (uri (pypi-uri "ipython" version ".tar.gz"))
4635 (sha256
4636 (base32 "1npl8g6bfsff9j938ypx0q5fyzy2l8lp0jl8skjjj2zv0z27dlig"))))
4637 (build-system python-build-system)
4638 (outputs '("out" "doc"))
4639 (propagated-inputs
4640 `(("python-pyzmq" ,python-pyzmq)
4641 ("python-terminado" ,python-terminado)
4642 ("python-matplotlib" ,python-matplotlib)
4643 ("python-numpy" ,python-numpy)
4644 ("python-numpydoc" ,python-numpydoc)
4645 ("python-jinja2" ,python-jinja2)
4646 ("python-mistune" ,python-mistune)
4647 ("python-pexpect" ,python-pexpect)
4648 ("python-pickleshare" ,python-pickleshare)
4649 ("python-simplegeneric" ,python-simplegeneric)
4650 ("python-jsonschema" ,python-jsonschema)
4651 ("python-traitlets" ,python-traitlets)
4652 ("python-ipykernel" ,python-ipykernel)
4653 ("python-pygments" ,python-pygments)))
4654 (inputs
4655 `(("readline" ,readline)
4656 ("which" ,which)))
4657 (native-inputs
4658 `(("pkg-config" ,pkg-config)
4659 ("python-requests" ,python-requests) ;; for tests
4660 ("python-testpath" ,python-testpath)
4661 ("python-nose" ,python-nose)
4662 ("python-sphinx" ,python-sphinx)
4663 ("texlive" ,texlive)
4664 ("texinfo" ,texinfo)))
4665 (arguments
4666 `(#:phases
4667 (modify-phases %standard-phases
4668 (add-after
4669 'install 'install-doc
4670 (lambda* (#:key inputs outputs #:allow-other-keys)
4671 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4672 (doc (string-append data "/doc/" ,name "-" ,version))
4673 (html (string-append doc "/html"))
4674 (man1 (string-append data "/man/man1"))
4675 (info (string-append data "/info"))
4676 (examples (string-append doc "/examples")))
4677 (setenv "LANG" "en_US.utf8")
4678 ;; Make installed package available for running the tests
4679 (add-installed-pythonpath inputs outputs)
4680 (with-directory-excursion "docs"
4681 ;; FIXME: pdf fails to build
4682 ;;(system* "make" "pdf" "PAPER=a4")
4683 (system* "make" "html")
4684 (system* "make" "info"))
4685 (copy-recursively "docs/man" man1)
4686 (copy-recursively "examples" examples)
4687 (copy-recursively "docs/build/html" html)
4688 ;; (copy-file "docs/build/latex/ipython.pdf"
4689 ;; (string-append doc "/ipython.pdf"))
4690 (mkdir-p info)
4691 (copy-file "docs/build/texinfo/ipython.info"
4692 (string-append info "/ipython.info"))
4693 (copy-file "COPYING.rst" (string-append doc "/COPYING.rst")))))
4694 ;; Tests can only be run after the library has been installed and not
4695 ;; within the source directory.
4696 (delete 'check)
4697 (add-after
4698 'install 'check
4699 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
4700 (if tests?
4701 (with-directory-excursion "/tmp"
4702 ;; Make installed package available for running the tests
4703 (add-installed-pythonpath inputs outputs)
4704 (setenv "HOME" "/tmp/") ;; required by a test
4705 (zero? (system* (string-append (assoc-ref outputs "out")
4706 "/bin/iptest"))))
4707 #t)))
4708 (add-before
4709 'install 'fix-tests
4710 (lambda* (#:key inputs #:allow-other-keys)
4711 (substitute* "./IPython/utils/_process_posix.py"
4712 (("/usr/bin/env', 'which") (which "which")))
4713 (substitute* "./IPython/core/tests/test_inputtransformer.py"
4714 (("#!/usr/bin/env python")
4715 (string-append "#!" (which "python"))))
4716 ;; Disable 1 failing test
4717 (substitute* "./IPython/core/tests/test_magic.py"
4718 (("def test_dirops\\(\\):" all)
4719 (string-append "@dec.skipif(True)\n" all))))))))
4720 (home-page "http://ipython.org")
4721 (synopsis "IPython is a tool for interactive computing in Python")
4722 (description
4723 "IPython provides a rich architecture for interactive computing with:
4724 Powerful interactive shells, a browser-based notebook, support for interactive
4725 data visualization, embeddable interpreters and tools for parallel
4726 computing.")
4727 (license license:bsd-3)
4728 (properties `((python2-variant . ,(delay python2-ipython))))))
4729
4730 (define-public python2-ipython
4731 (let ((ipython (package-with-python2 (strip-python2-variant python-ipython))))
4732 (package
4733 (inherit ipython)
4734 ;; FIXME: some tests are failing
4735 (arguments
4736 `(#:tests? #f ,@(package-arguments ipython)))
4737 ;; FIXME: add pyreadline once available.
4738 (inputs
4739 `(("python2-mock" ,python2-mock)
4740 ,@(package-inputs ipython))))))
4741
4742 (define-public python-isodate
4743 (package
4744 (name "python-isodate")
4745 (version "0.5.4")
4746 (source
4747 (origin
4748 (method url-fetch)
4749 (uri (pypi-uri "isodate" version))
4750 (sha256
4751 (base32
4752 "0cafaiwixgpxwh9dsd28qb0dbzsj6xpxjdkyk30ns91ps10mq422"))))
4753 (build-system python-build-system)
4754 (home-page
4755 "http://cheeseshop.python.org/pypi/isodate")
4756 (synopsis
4757 "Python date parser and formatter")
4758 (description
4759 "Python-isodate is a python module for parsing and formatting
4760 ISO 8601 dates, time and duration.")
4761 (license license:bsd-3)))
4762
4763 (define-public python2-isodate
4764 (package-with-python2 python-isodate))
4765
4766 (define-public python-html5lib
4767 (package
4768 (name "python-html5lib")
4769 (version "1.0b8")
4770 (source
4771 (origin
4772 (method url-fetch)
4773 (uri (pypi-uri "html5lib" version))
4774 (sha256
4775 (base32
4776 "1lknq5j3nh11xrl268ks76zaj0gyzh34v94n5vbf6dk8llzxdx0q"))))
4777 (build-system python-build-system)
4778 (propagated-inputs
4779 `(("python-six" ,python-six))) ; required to "import html5lib"
4780 (arguments
4781 `(#:test-target "check"))
4782 (home-page
4783 "https://github.com/html5lib/html5lib-python")
4784 (synopsis
4785 "Python HTML parser based on the WHATWG HTML specifcation")
4786 (description
4787 "Html5lib is an HTML parser based on the WHATWG HTML specifcation
4788 and written in Python.")
4789 (license license:expat)))
4790
4791 (define-public python2-html5lib
4792 (package-with-python2 python-html5lib))
4793
4794 ;; Needed for python-bleach, a dependency of python-notebook
4795 (define-public python-html5lib-0.9
4796 (package
4797 (inherit python-html5lib)
4798 (version "0.999")
4799 (source
4800 (origin
4801 (method url-fetch)
4802 (uri (pypi-uri "html5lib" version))
4803 (sha256
4804 (base32
4805 "17n4zfsj6ynmbwdwviywmj8r6nzr3xvfx2zs0xhndmvm51z7z263"))))))
4806
4807 (define-public python2-html5lib-0.9
4808 (package-with-python2 python-html5lib-0.9))
4809
4810 (define-public python-urwid
4811 (package
4812 (name "python-urwid")
4813 (version "1.3.1")
4814 (source
4815 (origin
4816 (method url-fetch)
4817 (uri (pypi-uri "urwid" version))
4818 (sha256
4819 (base32
4820 "18cnd1wdjcas08x5qwa5ayw6jsfcn33w4d9f7q3s29fy6qzc1kng"))))
4821 (build-system python-build-system)
4822 (arguments
4823 `(#:phases
4824 (modify-phases %standard-phases
4825 ;; Disable failing test. Bug filed upstream:
4826 ;; https://github.com/wardi/urwid/issues/164
4827 ;; TODO: check again for python-urwid > 1.3.1 or python > 3.4.3.
4828 (add-after 'unpack 'disable-failing-test
4829 (lambda _
4830 (substitute* "urwid/tests/test_event_loops.py"
4831 (("test_remove_watch_file")
4832 "disable_remove_watch_file")))))))
4833 (home-page "http://urwid.org")
4834 (synopsis "Console user interface library for Python")
4835 (description
4836 "Urwid is a curses-based UI/widget library for Python. It includes many
4837 features useful for text console applications.")
4838 (license license:lgpl2.1+)))
4839
4840 (define-public python2-urwid
4841 (package-with-python2 python-urwid))
4842
4843 (define-public python-urwidtrees
4844 (package
4845 (name "python-urwidtrees")
4846 (version "1.0.2")
4847 (source
4848 (origin
4849 (method url-fetch)
4850 ;; package author intends on distributing via github rather than pypi:
4851 ;; https://github.com/pazz/alot/issues/877#issuecomment-230173331
4852 (uri (string-append "https://github.com/pazz/urwidtrees/archive/"
4853 version ".tar.gz"))
4854 (file-name (string-append name "-" version ".tar.gz"))
4855 (sha256
4856 (base32
4857 "0d30lyd3s2a97rhqfax5w9ssqds2z6aydqx3c6j2c2lk3cb4ngvh"))))
4858 (build-system python-build-system)
4859 (arguments
4860 '(#:tests? #f)) ; no tests
4861 (propagated-inputs `(("python-urwid" ,python-urwid)))
4862 (home-page "https://github.com/pazz/urwidtrees")
4863 (synopsis "Tree widgets for urwid")
4864 (description "Urwidtrees is a Widget Container API for the @code{urwid}
4865 toolkit. Use it to build trees of widgets.")
4866 (license license:gpl3+)))
4867
4868 (define-public python2-urwidtrees
4869 (package-with-python2 python-urwidtrees))
4870
4871 (define-public python-dbus
4872 (package
4873 (name "python-dbus")
4874 (version "1.2.0")
4875 (source
4876 (origin
4877 (method url-fetch)
4878 (uri (string-append
4879 "https://dbus.freedesktop.org/releases/dbus-python/dbus-python-"
4880 version ".tar.gz"))
4881 (sha256
4882 (base32 "1py62qir966lvdkngg0v8k1khsqxwk5m4s8nflpk1agk5f5nqb71"))))
4883 (build-system gnu-build-system)
4884 (arguments
4885 '(#:phases
4886 (modify-phases %standard-phases
4887 (add-before
4888 'check 'pre-check
4889 (lambda _
4890 ;; XXX: For the missing '/etc/machine-id'.
4891 (substitute* "test/run-test.sh"
4892 (("DBUS_FATAL_WARNINGS=1")
4893 "DBUS_FATAL_WARNINGS=0"))
4894 #t)))))
4895 (native-inputs
4896 `(("pkg-config" ,pkg-config)))
4897 (inputs
4898 `(("python" ,python)
4899 ("dbus-glib" ,dbus-glib)))
4900 (synopsis "Python bindings for D-bus")
4901 (description "python-dbus provides bindings for libdbus, the reference
4902 implementation of D-Bus.")
4903 (home-page "http://www.freedesktop.org/wiki/Software/DBusBindings/")
4904 (license license:expat)))
4905
4906 (define-public python2-dbus
4907 (package (inherit python-dbus)
4908 (name "python2-dbus")
4909 (inputs `(("python" ,python-2)
4910 ,@(alist-delete "python"
4911 (package-inputs python-dbus)
4912 equal?)))
4913 ;; FIXME: on Python 2, the test_utf8 fails with:
4914 ;; "ValueError: unichr() arg not in range(0x10000) (narrow Python build)"
4915 (arguments `(#:tests? #f))))
4916
4917 (define-public python-apsw
4918 (package
4919 (name "python-apsw")
4920 (version "3.9.2-r1")
4921 (source
4922 (origin
4923 (method url-fetch)
4924 (uri (pypi-uri "apsw" version))
4925 (sha256
4926 (base32
4927 "0w4jb0wpx785qw42r3h4fh7gl5w2968q48i7gygybsfxck8nzffs"))))
4928 (build-system python-build-system)
4929 (inputs
4930 `(("sqlite" ,sqlite)))
4931 (arguments
4932 `(#:phases
4933 ;; swap check and install phases
4934 (alist-cons-after
4935 'install 'check
4936 (assoc-ref %standard-phases 'check)
4937 (alist-delete
4938 'check
4939 %standard-phases))))
4940 (home-page "https://github.com/rogerbinns/apsw/")
4941 (synopsis "Another Python SQLite Wrapper")
4942 (description "APSW is a Python wrapper for the SQLite
4943 embedded relational database engine. In contrast to other wrappers such as
4944 pysqlite it focuses on being a minimal layer over SQLite attempting just to
4945 translate the complete SQLite API into Python.")
4946 (license license:zlib)))
4947
4948 (define-public python2-apsw
4949 (package-with-python2 python-apsw))
4950
4951 (define-public python-lxml
4952 (package
4953 (name "python-lxml")
4954 (version "3.6.0")
4955 (source
4956 (origin
4957 (method url-fetch)
4958 (uri (pypi-uri "lxml" version))
4959 (sha256
4960 (base32
4961 "1pvbmiy2m7jwv493kilbghhj2pkh8wy1na3ji350vhzhlwlclx4w"))))
4962 (build-system python-build-system)
4963 (inputs
4964 `(("libxml2" ,libxml2)
4965 ("libxslt" ,libxslt)))
4966 (home-page "http://lxml.de/")
4967 (synopsis
4968 "Python XML processing library")
4969 (description
4970 "The lxml XML toolkit is a Pythonic binding for the C libraries
4971 libxml2 and libxslt.")
4972 (license license:bsd-3))) ; and a few more, see LICENSES.txt
4973
4974 (define-public python2-lxml
4975 (package-with-python2 python-lxml))
4976
4977 ;; beautifulsoup4 has a totally different namespace than 3.x,
4978 ;; and pypi seems to put it under its own name, so I guess we should too
4979 (define-public python-beautifulsoup4
4980 (package
4981 (name "python-beautifulsoup4")
4982 (version "4.5.1")
4983 (source
4984 (origin
4985 (method url-fetch)
4986 (uri (pypi-uri "beautifulsoup4" version))
4987 (sha256
4988 (base32
4989 "1qgmhw65ncsgccjhslgkkszif47q6gvxwqv4mim17agxd81p951w"))))
4990 (build-system python-build-system)
4991 (arguments
4992 `(#:phases
4993 (modify-phases %standard-phases
4994 ;; The Python 2 source is the definitive source of beautifulsoup4. We
4995 ;; must use this conversion script when building with Python 3. The
4996 ;; conversion script also runs the tests.
4997 ;; For more information, see the file 'convert-py3k' in the source
4998 ;; distribution.
4999 (replace 'check
5000 (lambda _ (zero? (system* "./convert-py3k")))))))
5001 (home-page
5002 "http://www.crummy.com/software/BeautifulSoup/bs4/")
5003 (synopsis
5004 "Python screen-scraping library")
5005 (description
5006 "Beautiful Soup is a Python library designed for rapidly setting up
5007 screen-scraping projects. It offers Pythonic idioms for navigating,
5008 searching, and modifying a parse tree, providing a toolkit for
5009 dissecting a document and extracting what you need. It automatically
5010 converts incoming documents to Unicode and outgoing documents to UTF-8.")
5011 (license license:expat)))
5012
5013 (define-public python2-beautifulsoup4
5014 (package
5015 (inherit (package-with-python2
5016 (strip-python2-variant python-beautifulsoup4)))
5017 (arguments `(#:python ,python-2))))
5018
5019 (define-public python2-cssutils
5020 (package
5021 (name "python2-cssutils")
5022 (version "1.0.1")
5023 (source
5024 (origin
5025 (method url-fetch)
5026 (uri (pypi-uri "cssutils" version))
5027 (sha256
5028 (base32
5029 "0qwha9x1wml2qmipbcz03gndnlwhzrjdvw9i09si247a90l8p8fq"))))
5030 (build-system python-build-system)
5031 (native-inputs
5032 `(("python2-mock" ,python2-mock) ; for the tests
5033 ("unzip" ,unzip))) ; for unpacking the source
5034 (arguments
5035 `(#:python ,python-2 ; Otherwise tests fail with a syntax error.
5036 #:tests? #f ; The tests apparently download an external URL.
5037 ))
5038 (home-page "http://cthedot.de/cssutils/")
5039 (synopsis
5040 "CSS Cascading Style Sheets library for Python")
5041 (description
5042 "Cssutils is a Python package for parsing and building CSS
5043 Cascading Style Sheets. Currently it provides a DOM only and no rendering
5044 options.")
5045 (license license:lgpl3+)))
5046
5047 (define-public python-cssselect
5048 (package
5049 (name "python-cssselect")
5050 (version "0.9.2")
5051 (source
5052 (origin
5053 (method url-fetch)
5054 (uri (pypi-uri "cssselect" version))
5055 (sha256
5056 (base32
5057 "1xg6gbva1yswghiycmgincv6ab4bn7hpm720ndbj40h8xycmnfvi"))))
5058 (build-system python-build-system)
5059 (arguments
5060 ;; tests fail with message
5061 ;; AttributeError: 'module' object has no attribute 'tests'
5062 `(#:tests? #f))
5063 (home-page
5064 "https://pythonhosted.org/cssselect/")
5065 (synopsis
5066 "CSS3 selector parser and translator to XPath 1.0")
5067 (description
5068 "Cssselect ia a Python module that parses CSS3 Selectors and translates
5069 them to XPath 1.0 expressions. Such expressions can be used in lxml or
5070 another XPath engine to find the matching elements in an XML or HTML document.")
5071 (license license:bsd-3)))
5072
5073 (define-public python2-cssselect
5074 (package-with-python2 python-cssselect))
5075
5076 (define-public python-netifaces
5077 (package
5078 (name "python-netifaces")
5079 (version "0.10.4")
5080 (source
5081 (origin
5082 (method url-fetch)
5083 (uri (string-append
5084 "https://pypi.python.org/packages/source/n/netifaces/netifaces-"
5085 version
5086 ".tar.gz"))
5087 (sha256
5088 (base32
5089 "1plw237a4zib4z8s62g0mrs8gm3kjfrp5sxh6bbk9nl3rdls2mln"))))
5090 (build-system python-build-system)
5091 (home-page
5092 "https://bitbucket.org/al45tair/netifaces")
5093 (synopsis
5094 "Python module for portable network interface information")
5095 (description
5096 "Netifaces is a Python module providing information on network
5097 interfaces in an easy and portable manner.")
5098 (license license:expat)))
5099
5100 (define-public python2-netifaces
5101 (package-with-python2 python-netifaces))
5102
5103 (define-public python-networkx
5104 (package
5105 (name "python-networkx")
5106 (version "1.11")
5107 (source
5108 (origin
5109 (method url-fetch)
5110 (uri (pypi-uri "networkx" version))
5111 (sha256
5112 (base32 "1f74s56xb4ggixiq0vxyfxsfk8p20c7a099lpcf60izv1php03hd"))))
5113 (build-system python-build-system)
5114 ;; python-decorator is needed at runtime
5115 (propagated-inputs
5116 `(("python-decorator" ,python-decorator)))
5117 (native-inputs
5118 `(("python-nose" ,python-nose)))
5119 (home-page "http://networkx.github.io/")
5120 (synopsis "Python module for creating and manipulating graphs and networks")
5121 (description
5122 "NetworkX is a Python package for the creation, manipulation, and study
5123 of the structure, dynamics, and functions of complex networks.")
5124 (license license:bsd-3)))
5125
5126 (define-public python2-networkx
5127 (package-with-python2 python-networkx))
5128
5129 (define-public snakemake
5130 (package
5131 (name "snakemake")
5132 (version "3.2.1")
5133 (source
5134 (origin
5135 (method url-fetch)
5136 (uri (string-append
5137 "https://pypi.python.org/packages/source/s/snakemake/snakemake-"
5138 version ".tar.gz"))
5139 (sha256
5140 (base32 "0fi4b63sj60hvi7rfydvmz2icl4wj74djw5sn2gl8hxd02qw4b91"))))
5141 (build-system python-build-system)
5142 (home-page "https://bitbucket.org/johanneskoester/snakemake")
5143 (synopsis "Python-based execution environment for make-like workflows")
5144 (description
5145 "Snakemake aims to reduce the complexity of creating workflows by
5146 providing a clean and modern domain specific specification language (DSL) in
5147 Python style, together with a fast and comfortable execution environment.")
5148 (license license:expat)))
5149
5150 (define-public python-seaborn
5151 (package
5152 (name "python-seaborn")
5153 (version "0.7.0")
5154 (source
5155 (origin
5156 (method url-fetch)
5157 (uri (pypi-uri "seaborn" version))
5158 (sha256
5159 (base32 "0ibi3xsfm2kysph61mnfy0pf8d5rkgxgrdb0z9nbizgcgdsb5a0m"))))
5160 (build-system python-build-system)
5161 (propagated-inputs
5162 `(("python-pandas" ,python-pandas)
5163 ("python-matplotlib" ,python-matplotlib)
5164 ("python-scipy" ,python-scipy)))
5165 (home-page "http://stanford.edu/~mwaskom/software/seaborn/")
5166 (synopsis "Statistical data visualization")
5167 (description
5168 "Seaborn is a library for making attractive and informative statistical
5169 graphics in Python. It is built on top of matplotlib and tightly integrated
5170 with the PyData stack, including support for numpy and pandas data structures
5171 and statistical routines from scipy and statsmodels.")
5172 (license license:bsd-3)
5173 (properties `((python2-variant . ,(delay python2-seaborn))))))
5174
5175 (define-public python2-seaborn
5176 (let ((base (package-with-python2 (strip-python2-variant python-seaborn))))
5177 (package
5178 (inherit base)
5179 (propagated-inputs `(("python2-pytz" ,python2-pytz)
5180 ,@(package-propagated-inputs base))))))
5181
5182 (define-public python-sympy
5183 (package
5184 (name "python-sympy")
5185 (version "0.7.6")
5186 (source
5187 (origin
5188 (method url-fetch)
5189 (uri (string-append
5190 "https://github.com/sympy/sympy/releases/download/sympy-"
5191 version "/sympy-" version ".tar.gz"))
5192 (sha256
5193 (base32 "19yp0gy4i7p4g6l3b8vaqkj9qj7yqb5kqy0qgbdagpzgkdz958yz"))))
5194 (build-system python-build-system)
5195 (home-page "http://www.sympy.org/")
5196 (synopsis "Python library for symbolic mathematics")
5197 (description
5198 "SymPy is a Python library for symbolic mathematics. It aims to become a
5199 full-featured computer algebra system (CAS) while keeping the code as simple
5200 as possible in order to be comprehensible and easily extensible.")
5201 (license license:bsd-3)))
5202
5203 (define-public python2-sympy
5204 (package-with-python2 python-sympy))
5205
5206 (define-public python-q
5207 (package
5208 (name "python-q")
5209 (version "2.6")
5210 (source
5211 (origin
5212 (method url-fetch)
5213 (uri (pypi-uri "q" version))
5214 (sha256
5215 (base32
5216 "1mgfazh8fkizh6walra2zv885f3lcgr3nb02v1frfm4p8ddcy3yy"))))
5217 (build-system python-build-system)
5218 (home-page "https://github.com/zestyping/q")
5219 (synopsis "Quick-and-dirty debugging output for tired programmers")
5220 (description
5221 "q is a Python module for \"print\" style of debugging Python code. It
5222 provides convenient short API for print out of values, tracebacks, and
5223 falling into the Python interpreter.")
5224 (license license:asl2.0)))
5225
5226 (define-public python2-q
5227 (package-with-python2 python-q))
5228
5229 (define-public python-testlib
5230 (package
5231 (name "python-testlib")
5232 (version "0.6.5")
5233 (source
5234 (origin
5235 (method url-fetch)
5236 (uri (string-append
5237 "https://pypi.python.org/packages/source/t/testlib/testlib-"
5238 version ".zip"))
5239 (sha256
5240 (base32 "1mz26cxn4x8bbgv0rn0mvj2z05y31rkc8009nvdlb3lam5b4mj3y"))))
5241 (build-system python-build-system)
5242 (native-inputs
5243 `(("unzip" ,unzip)))
5244 (arguments
5245 `(#:phases
5246 (alist-replace
5247 'unpack
5248 (lambda* (#:key inputs outputs #:allow-other-keys)
5249 (let ((unzip (string-append (assoc-ref inputs "unzip")
5250 "/bin/unzip"))
5251 (source (assoc-ref inputs "source")))
5252 (and (zero? (system* unzip source))
5253 (chdir (string-append "testlib-" ,version)))))
5254 %standard-phases)))
5255 (synopsis "Python micro test suite harness")
5256 (description "A micro unittest suite harness for Python.")
5257 (home-page "https://github.com/trentm/testlib")
5258 (license license:expat)))
5259
5260 (define-public python2-testlib
5261 (package-with-python2 python-testlib))
5262
5263 (define-public python2-xlib
5264 (package
5265 (name "python2-xlib")
5266 (version "0.14")
5267 (source (origin
5268 (method url-fetch)
5269 (uri (string-append "mirror://sourceforge/python-xlib/python-xlib"
5270 "/" version "/"
5271 "python-xlib-" version ".tar.gz"))
5272 (sha256
5273 (base32
5274 "1sv0447j0rx8cgs3jhjl695p5pv13ihglcjlrrz1kq05lsvb0wa7"))))
5275 (build-system python-build-system)
5276 (arguments
5277 `(#:python ,python-2 ;Python 2 only
5278 #:tests? #f)) ;no tests
5279 (home-page "http://python-xlib.sourceforge.net/")
5280 (synopsis "Python X11 client library")
5281 (description
5282 "The Python X Library is intended to be a fully functional X client
5283 library for Python programs. It is useful to implement low-level X clients.
5284 It is written entirely in Python.")
5285 (license license:gpl2+)))
5286
5287 (define-public python-singledispatch
5288 (package
5289 (name "python-singledispatch")
5290 (version "3.4.0.3")
5291 (source
5292 (origin
5293 (method url-fetch)
5294 (uri (pypi-uri "singledispatch" version))
5295 (sha256
5296 (base32
5297 "171b7ip0hsq5qm83np40h3phlr36ym18w0lay0a8v08kvy3sy1jv"))))
5298 (build-system python-build-system)
5299 (native-inputs
5300 `(("python-six" ,python-six))) ; required for conversion, not at run-time
5301 (home-page
5302 "http://docs.python.org/3/library/functools.html#functools.singledispatch")
5303 (synopsis "Backport of singledispatch feature from Python 3.4")
5304 (description
5305 "This library brings functools.singledispatch from Python 3.4 to Python
5306 2.6-3.3.")
5307 (license license:expat)))
5308
5309 (define-public python2-singledispatch
5310 (package-with-python2 python-singledispatch))
5311
5312 (define-public python-tornado
5313 (package
5314 (name "python-tornado")
5315 (version "4.3")
5316 (source
5317 (origin
5318 (method url-fetch)
5319 (uri (pypi-uri "tornado" version))
5320 (sha256
5321 (base32 "1gzgwayl6hmc9jfcl88bni4jcsk2jcca9dn1rvrfsvnijcjx7hn9"))))
5322 (build-system python-build-system)
5323 (native-inputs
5324 `(("python-certifi" ,python-certifi)))
5325 (propagated-inputs
5326 `(("python-backports-abc" ,python-backports-abc)))
5327 (home-page "http://www.tornadoweb.org/")
5328 (synopsis "Python web framework and asynchronous networking library")
5329 (description
5330 "Tornado is a Python web framework and asynchronous networking library,
5331 originally developed at FriendFeed. By using non-blocking network I/O,
5332 Tornado can scale to tens of thousands of open connections, making it ideal
5333 for long polling, WebSockets, and other applications that require a long-lived
5334 connection to each user.")
5335 (license license:asl2.0)
5336 (properties `((python2-variant . ,(delay python2-tornado))))))
5337
5338 (define-public python2-tornado
5339 (let ((tornado (package-with-python2 (strip-python2-variant python-tornado))))
5340 (package (inherit tornado)
5341 (propagated-inputs
5342 `(("python2-backport-ssl-match-hostname"
5343 ,python2-backport-ssl-match-hostname)
5344 ("python2-singledispatch" ,python2-singledispatch)
5345 ,@(package-propagated-inputs tornado))))))
5346
5347 ;; the python- version can be removed with python-3.5
5348 (define-public python-backports-abc
5349 (package
5350 (name "python-backports-abc")
5351 (version "0.4")
5352 (source
5353 (origin
5354 (method url-fetch)
5355 (uri (pypi-uri "backports_abc" version))
5356 (sha256
5357 (base32
5358 "19fh75lni9pb673n2fn505m1rckm0af0szcv5xx1qm1xpa940glb"))))
5359 (build-system python-build-system)
5360 (home-page "https://github.com/cython/backports_abc")
5361 (synopsis "Backport of additions to the 'collections.abc' module")
5362 (description
5363 "Python-backports-abc provides a backport of additions to the
5364 'collections.abc' module in Python-3.5.")
5365 (license license:psfl)))
5366
5367 (define-public python2-backports-abc
5368 (package-with-python2 python-backports-abc))
5369
5370 (define-public python-waf
5371 (package
5372 (name "python-waf")
5373 (version "1.9.5")
5374 (source (origin
5375 (method url-fetch)
5376 (uri (string-append "https://waf.io/"
5377 "waf-" version ".tar.bz2"))
5378 (sha256
5379 (base32
5380 "1sl3ipi2czds57rlzjnpdzqa0skx8asfvmh3qmibpvdwf15rpppg"))))
5381 (build-system python-build-system)
5382 (arguments
5383 '(#:phases
5384 (modify-phases %standard-phases
5385 (replace 'build
5386 (lambda _
5387 (zero? (system* "python" "waf-light" "configure" "build"))))
5388 (replace 'check
5389 (lambda _
5390 (zero? (system* "python" "waf" "--version"))))
5391 (replace 'install
5392 (lambda _
5393 (copy-file "waf" %output))))))
5394 (home-page "http://waf.io/")
5395 (synopsis "Python-based build system")
5396 (description
5397 "Waf is a Python-based framework for configuring, compiling and installing
5398 applications.")
5399 (license license:bsd-3)))
5400
5401 (define-public python2-waf
5402 (package-with-python2 python-waf))
5403
5404 (define-public python-pyzmq
5405 (package
5406 (name "python-pyzmq")
5407 (version "15.1.0")
5408 (source
5409 (origin
5410 (method url-fetch)
5411 (uri (pypi-uri "pyzmq" version))
5412 (sha256
5413 (base32 "13fhwnlvsvxv72kfhqbpn6qi7msh8mc8377mpabv32skk2cjfnxx"))))
5414 (build-system python-build-system)
5415 (arguments
5416 `(#:configure-flags
5417 (list (string-append "--zmq=" (assoc-ref %build-inputs "zeromq")))
5418 ;; FIXME: You must build pyzmq with 'python setup.py build_ext
5419 ;; --inplace' for 'python setup.py test' to work.
5420 #:tests? #f))
5421 (inputs
5422 `(("zeromq" ,zeromq)))
5423 (native-inputs
5424 `(("pkg-config" ,pkg-config)
5425 ("python-nose" ,python-nose)))
5426 (home-page "http://github.com/zeromq/pyzmq")
5427 (synopsis "Python bindings for 0MQ")
5428 (description
5429 "PyZMQ is the official Python binding for the ZeroMQ messaging library.")
5430 (license license:bsd-4)))
5431
5432 (define-public python2-pyzmq
5433 (package-with-python2 python-pyzmq))
5434
5435 (define-public python-pep8
5436 (package
5437 (name "python-pep8")
5438 (version "1.7.0")
5439 (source
5440 (origin
5441 (method url-fetch)
5442 (uri (pypi-uri "pep8" version))
5443 (sha256
5444 (base32
5445 "002rkl4lsn6x2mxmf8ar00l0m8i3mzrc6pnzz77blyksmpsxa4x1"))))
5446 (build-system python-build-system)
5447 (home-page "http://pep8.readthedocs.org/")
5448 (synopsis "Python style guide checker")
5449 (description
5450 "This tools checks Python code against some of the style conventions in
5451 PEP 8.")
5452 (license license:expat)))
5453
5454 (define-public python2-pep8
5455 (package-with-python2 python-pep8))
5456
5457 (define-public python-pyflakes
5458 (package
5459 (name "python-pyflakes")
5460 (version "1.0.0")
5461 (source
5462 (origin
5463 (method url-fetch)
5464 (uri (pypi-uri "pyflakes" version))
5465 (sha256
5466 (base32
5467 "0qs2sgqszq7wcplis8509wk2ygqcrwzbs1ghfj3svvivq2j377pk"))))
5468 (build-system python-build-system)
5469 (home-page
5470 "https://github.com/pyflakes/pyflakes")
5471 (synopsis "Passive checker of Python programs")
5472 (description
5473 "Pyflakes statically checks Python source code for common errors.")
5474 (license license:expat)))
5475
5476 (define-public python2-pyflakes
5477 (package-with-python2 python-pyflakes))
5478
5479 (define-public python-mccabe
5480 (package
5481 (name "python-mccabe")
5482 (version "0.4.0")
5483 (source
5484 (origin
5485 (method url-fetch)
5486 (uri (pypi-uri "mccabe" version))
5487 (sha256
5488 (base32
5489 "0yr08a36h8lqlif10l4xcikbbig7q8f41gqywir7rrvnv3mi4aws"))))
5490 (build-system python-build-system)
5491 (native-inputs
5492 `(("python-pytest" ,python-pytest)
5493 ("python-pytest-runner" ,python-pytest-runner)))
5494 (home-page "https://github.com/flintwork/mccabe")
5495 (synopsis "McCabe checker, plugin for flake8")
5496 (description
5497 "This package provides a Flake8 plug-in to compute the McCabe cyclomatic
5498 complexity of Python source code.")
5499 (license license:expat)))
5500
5501 (define-public python2-mccabe
5502 (package-with-python2 python-mccabe))
5503
5504 (define-public python-mccabe-0.2.1
5505 (package (inherit python-mccabe)
5506 (version "0.2.1")
5507 (source
5508 (origin
5509 (method url-fetch)
5510 (uri (pypi-uri "mccabe" version))
5511 (sha256
5512 (base32
5513 "0fi4a81kr5bcv5p4xgibqr595hyj5dafkqgsmfk96mfy8w71fajs"))))))
5514
5515 (define-public python2-mccabe-0.2.1
5516 (package-with-python2 python-mccabe-0.2.1))
5517
5518 ;; Flake8 2.4.1 requires an older version of pep8.
5519 ;; This should be removed ASAP.
5520 (define-public python-pep8-1.5.7
5521 (package (inherit python-pep8)
5522 (version "1.5.7")
5523 (source
5524 (origin
5525 (method url-fetch)
5526 (uri (string-append
5527 "https://pypi.python.org/packages/source/p/pep8/pep8-"
5528 version
5529 ".tar.gz"))
5530 (sha256
5531 (base32
5532 "12b9bbdbwnspxgak14xg58c130x2n0blxzlms5jn2dszn8qj3d0m"))))))
5533
5534 (define-public python2-pep8-1.5.7
5535 (package-with-python2 python-pep8-1.5.7))
5536
5537 ;; Flake8 2.4.1 requires an older version of pyflakes.
5538 ;; This should be removed ASAP.
5539 (define-public python-pyflakes-0.8.1
5540 (package (inherit python-pyflakes)
5541 (version "0.8.1")
5542 (source
5543 (origin
5544 (method url-fetch)
5545 (uri (string-append
5546 "https://pypi.python.org/packages/source/p/pyflakes/pyflakes-"
5547 version
5548 ".tar.gz"))
5549 (sha256
5550 (base32
5551 "0sbpq6pqm1i9wqi41mlfrsc5rk92jv4mskvlyxmnhlbdnc80ma1z"))))))
5552
5553 (define-public python2-pyflakes-0.8.1
5554 (package-with-python2 python-pyflakes-0.8.1))
5555
5556 (define-public python-flake8
5557 (package
5558 (name "python-flake8")
5559 (version "2.5.4")
5560 (source
5561 (origin
5562 (method url-fetch)
5563 (uri (pypi-uri "flake8" version))
5564 (sha256
5565 (base32
5566 "0bs9cz4fr99r2rwig1b8jwaadl1nan7kgpdzqwj0bwbckwbmh7nc"))))
5567 (build-system python-build-system)
5568 (propagated-inputs
5569 `(("python-pep8" ,python-pep8)
5570 ("python-pyflakes" ,python-pyflakes)
5571 ("python-mccabe" ,python-mccabe)))
5572 (native-inputs
5573 `(("python-mock" ,python-mock) ; TODO: only required for < 3.3
5574 ("python-nose" ,python-nose)))
5575 (home-page "https://gitlab.com/pycqa/flake8")
5576 (synopsis
5577 "The modular source code checker: pep8, pyflakes and co")
5578 (description
5579 "Flake8 is a wrapper around PyFlakes, pep8 and python-mccabe.")
5580 (license license:expat)))
5581
5582 (define-public python2-flake8
5583 (package-with-python2 python-flake8))
5584
5585 ;; This will only be needed by the python-hacking package and will not be
5586 ;; necessary once python-hacking > 0.10.2 is released.
5587 (define-public python-flake8-2.2.4
5588 (package (inherit python-flake8)
5589 (propagated-inputs
5590 `(("python-pep8" ,python-pep8-1.5.7)
5591 ("python-pyflakes" ,python-pyflakes-0.8.1)
5592 ("python-mccabe" ,python-mccabe-0.2.1)))
5593 (native-inputs
5594 `(("python-mock" ,python-mock)
5595 ("python-nose" ,python-nose)))
5596 (version "2.2.4")
5597 (source
5598 (origin
5599 (method url-fetch)
5600 (uri (pypi-uri "flake8" version))
5601 (sha256
5602 (base32
5603 "1r9wsry4va45h1rck5hxd3vzsg2q3y6lnl6pym1bxvz8ry19jwx8"))))))
5604
5605 (define-public python2-flake8-2.2.4
5606 (package-with-python2 python-flake8-2.2.4))
5607
5608 (define-public python-mistune
5609 (package
5610 (name "python-mistune")
5611 (version "0.7")
5612 (source
5613 (origin
5614 (method url-fetch)
5615 (uri (string-append
5616 "https://pypi.python.org/packages/source/m/mistune/mistune-"
5617 version
5618 ".tar.gz"))
5619 (sha256
5620 (base32
5621 "17zqjp9m4d1w3jf2rbbq5xshcw24q1vlcv24gkgfqqyyymajxahx"))))
5622 (build-system python-build-system)
5623 (native-inputs
5624 `(("python-nose" ,python-nose)
5625 ("python-cython" ,python-cython)))
5626 (home-page "https://github.com/lepture/mistune")
5627 (synopsis "Markdown parser in pure Python")
5628 (description "This package provides a fast markdown parser in pure
5629 Python.")
5630 (license license:bsd-3)))
5631
5632 (define-public python2-mistune
5633 (package-with-python2 python-mistune))
5634
5635 (define-public python-markdown
5636 (package
5637 (name "python-markdown")
5638 (version "2.6.5")
5639 (source
5640 (origin
5641 (method url-fetch)
5642 (uri (pypi-uri "Markdown" version))
5643 (sha256
5644 (base32
5645 "0q758a3fiiawr20b3hhjfs677cwj6xi284yb7xspcvv0fdicz54d"))))
5646 (build-system python-build-system)
5647 (arguments
5648 `(#:phases
5649 (modify-phases %standard-phases
5650 (replace 'check
5651 (lambda _
5652 (zero? (system* "python" "run-tests.py")))))))
5653 (native-inputs
5654 `(("python-nose" ,python-nose)
5655 ("python-pyyaml" ,python-pyyaml)))
5656 (home-page "https://pythonhosted.org/Markdown/")
5657 (synopsis "Python implementation of Markdown")
5658 (description
5659 "This package provides a Python implementation of John Gruber's
5660 Markdown. The library features international input, various Markdown
5661 extensions, and several HTML output formats. A command line wrapper
5662 markdown_py is also provided to convert Markdown files to HTML.")
5663 (license license:bsd-3)))
5664
5665 (define-public python2-markdown
5666 (package-with-python2 python-markdown))
5667
5668 (define-public python-ptyprocess
5669 (package
5670 (name "python-ptyprocess")
5671 (version "0.5")
5672 (source
5673 (origin
5674 (method url-fetch)
5675 (uri (string-append
5676 "https://pypi.python.org/packages/source/p/ptyprocess/ptyprocess-"
5677 version ".tar.gz"))
5678 (sha256
5679 (base32
5680 "0nggns5kikn32yyda2zrj1xdmh49pi3v0drggcdwljbv36r8zdyw"))))
5681 (build-system python-build-system)
5682 (native-inputs
5683 `(("python-nose" ,python-nose)))
5684 (arguments
5685 `(#:phases
5686 (modify-phases %standard-phases
5687 (replace 'check
5688 (lambda _
5689 (zero? (system* "nosetests")))))))
5690 (home-page "https://github.com/pexpect/ptyprocess")
5691 (synopsis "Run a subprocess in a pseudo terminal")
5692 (description
5693 "This package provides a Python library used to launch a subprocess in a
5694 pseudo terminal (pty), and interact with both the process and its pty.")
5695 (license license:isc)))
5696
5697 (define-public python2-ptyprocess
5698 (package-with-python2 python-ptyprocess))
5699
5700 (define-public python-terminado
5701 (package
5702 (name "python-terminado")
5703 (version "0.6")
5704 (source
5705 (origin
5706 (method url-fetch)
5707 (uri (pypi-uri "terminado" version))
5708 (sha256
5709 (base32
5710 "09h1kwi86g5mrk14s4pgbhshd602zry29lnpxamcqz864kva22rc"))))
5711 (build-system python-build-system)
5712 (propagated-inputs
5713 `(("python-tornado" ,python-tornado)
5714 ("python-ptyprocess" ,python-ptyprocess)))
5715 (native-inputs
5716 `(("python-nose" ,python-nose)))
5717 (arguments
5718 `(#:phases
5719 (modify-phases %standard-phases
5720 (replace 'check
5721 (lambda _
5722 (zero? (system* "nosetests")))))))
5723 (home-page "https://github.com/takluyver/terminado")
5724 (synopsis "Terminals served to term.js using Tornado websockets")
5725 (description "This package provides a Tornado websocket backend for the
5726 term.js Javascript terminal emulator library.")
5727 (license license:bsd-2)
5728 (properties `((python2-variant . ,(delay python2-terminado))))))
5729
5730 (define-public python2-terminado
5731 (let ((terminado (package-with-python2 (strip-python2-variant python-terminado))))
5732 (package (inherit terminado)
5733 (propagated-inputs
5734 `(("python2-backport-ssl-match-hostname"
5735 ,python2-backport-ssl-match-hostname)
5736 ,@(package-propagated-inputs terminado))))))
5737
5738 (define-public python-fonttools
5739 (package
5740 (name "python-fonttools")
5741 (version "2.5")
5742 (source (origin
5743 (method url-fetch)
5744 (uri (string-append
5745 "https://pypi.python.org/packages/source/F/FontTools/"
5746 "fonttools-" version ".tar.gz"))
5747 (sha256
5748 (base32
5749 "08ay3x4ijarwhl60gqx2i9jzq6pxs20p4snc2d1q5jagh4rn39lb"))))
5750 (build-system python-build-system)
5751 (arguments
5752 '(#:test-target "check"
5753 #:phases
5754 (modify-phases %standard-phases
5755 (add-after 'unpack 'patch-setuppy
5756 ;; Remove the undocumented "extra_path" argument, which adds an
5757 ;; intervening directories between site-packages and the package
5758 ;; directory.
5759 (lambda _
5760 (substitute* "setup.py"
5761 (("^[ \t]*extra_path *= *'FontTools',") ""))
5762 #t)))))
5763 (home-page "http://github.com/behdad/fonttools")
5764 (synopsis "Tools to manipulate font files")
5765 (description
5766 "FontTools/TTX is a library to manipulate font files from Python. It
5767 supports reading and writing of TrueType/OpenType fonts, reading and writing
5768 of AFM files, reading (and partially writing) of PS Type 1 fonts. The package
5769 also contains a tool called “TTX” which converts TrueType/OpenType fonts to and
5770 from an XML-based format.")
5771 (license (license:non-copyleft
5772 "file://LICENSE.txt"
5773 "See LICENSE.txt in the distribution."))))
5774
5775 (define-public python2-fonttools
5776 (package-with-python2 python-fonttools))
5777
5778 (define-public python-ly
5779 (package
5780 (name "python-ly")
5781 (version "0.9.4")
5782 (source
5783 (origin
5784 (method url-fetch)
5785 (uri (string-append "https://pypi.python.org/packages/57/4f/"
5786 "889579244947368f28eda66b782331b1e75f83fd72e63f9ece93cd7a18f9"
5787 "/python-ly-" version ".tar.gz"))
5788 (sha256
5789 (base32
5790 "0g6n288l83sfwavxh1aryi0aqvsr3sp7v6f903mckwqa4scpky62"))))
5791 (build-system python-build-system)
5792 (synopsis "Tool and library for manipulating LilyPond files")
5793 (description "This package provides a Python library to parse, manipulate
5794 or create documents in LilyPond format. A command line program ly is also
5795 provided that can be used to do various manipulations with LilyPond files.")
5796 (home-page "https://pypi.python.org/pypi/python-ly")
5797 (license license:gpl2+)))
5798
5799 (define-public python-appdirs
5800 (package
5801 (name "python-appdirs")
5802 (version "1.4.0")
5803 (source
5804 (origin
5805 (method url-fetch)
5806 (uri (string-append
5807 "https://pypi.python.org/packages/source/a/appdirs/appdirs-"
5808 version
5809 ".tar.gz"))
5810 (sha256
5811 (base32
5812 "1iddva7v3fq0aqzsahkazxr7vpw28mqcrsy818z4wyiqnkplbhlg"))))
5813 (build-system python-build-system)
5814 (home-page "http://github.com/ActiveState/appdirs")
5815 (synopsis
5816 "Determine platform-specific dirs, e.g. a \"user data dir\"")
5817 (description
5818 "This module provides a portable way of finding out where user data
5819 should be stored on various operating systems.")
5820 (license license:expat)))
5821
5822 (define-public python2-appdirs
5823 (package-with-python2 python-appdirs))
5824
5825 (define-public python-llfuse
5826 (package
5827 (name "python-llfuse")
5828 (version "1.1.1")
5829 (source (origin
5830 (method url-fetch)
5831 (uri (string-append
5832 "https://bitbucket.org/nikratio/python-llfuse/downloads/"
5833 "llfuse-" version ".tar.bz2"))
5834 (sha256
5835 (base32
5836 "0v6vj9mb286njgd1szg9hz2qdh5f3vkhsvajripfcqg458av310v"))))
5837 (build-system python-build-system)
5838 (inputs
5839 `(("fuse" ,fuse)
5840 ("attr" ,attr)))
5841 (native-inputs
5842 `(("pkg-config" ,pkg-config)))
5843 (synopsis "Python bindings for FUSE")
5844 (description
5845 "Python-LLFUSE is a set of Python bindings for the low level FUSE API.")
5846 (home-page "https://bitbucket.org/nikratio/python-llfuse/")
5847 (license license:lgpl2.0+)
5848 (properties `((python2-variant . ,(delay python2-llfuse))))))
5849
5850 (define-public python2-llfuse
5851 (package (inherit (package-with-python2
5852 (strip-python2-variant python-llfuse)))
5853 (propagated-inputs `(("python2-contextlib2" ,python2-contextlib2)))))
5854
5855 ;; For attic-0.16
5856 (define-public python-llfuse-0.41
5857 (package (inherit python-llfuse)
5858 (version "0.41.1")
5859 (source (origin
5860 (method url-fetch)
5861 (uri (string-append
5862 "https://bitbucket.org/nikratio/python-llfuse/downloads/"
5863 "llfuse-" version ".tar.bz2"))
5864 (sha256
5865 (base32
5866 "1imlqw9b73086y97izr036f58pgc5akv4ihc2rrf8j5h75jbrlaa"))))
5867 ;; Python-LLFUSE < 0.42 includes underscore.js, which is MIT (expat)
5868 ;; licensed. The rest of the package is licensed under LGPL2.0 or later.
5869 (license (list license:expat license:lgpl2.0+))))
5870
5871 (define-public python-msgpack
5872 (package
5873 (name "python-msgpack")
5874 (version "0.4.8")
5875 (source (origin
5876 (method url-fetch)
5877 (uri (pypi-uri "msgpack-python" version))
5878 (sha256
5879 (base32
5880 "11pqk5braa6wndpnr1dhg64js82vjgxnm0lzy73rwl831zgijaqs"))))
5881 (build-system python-build-system)
5882 (synopsis "MessagePack (de)serializer")
5883 (description "MessagePack is a fast, compact binary serialization format,
5884 suitable for similar data to JSON. This package provides CPython bindings for
5885 reading and writing MessagePack data.")
5886 (home-page "https://pypi.python.org/pypi/msgpack-python/")
5887 (license license:asl2.0)))
5888
5889 (define-public python2-msgpack
5890 (package-with-python2 python-msgpack))
5891
5892 (define-public python-netaddr
5893 (package
5894 (name "python-netaddr")
5895 (version "0.7.18")
5896 (source
5897 (origin
5898 (method url-fetch)
5899 (uri (string-append
5900 "https://pypi.python.org/packages/source/n/netaddr/netaddr-"
5901 version
5902 ".tar.gz"))
5903 (sha256
5904 (base32
5905 "06dxjlbcicq7q3vqy8agq11ra01kvvd47j4mk6dmghjsyzyckxd1"))))
5906 (build-system python-build-system)
5907 (arguments `(#:tests? #f)) ;; No tests.
5908 (home-page "https://github.com/drkjam/netaddr/")
5909 (synopsis "Pythonic manipulation of network addresses")
5910 (description
5911 "A Python library for representing and manipulating IPv4, IPv6, CIDR, EUI
5912 and MAC network addresses.")
5913 (license license:bsd-3)))
5914
5915 (define-public python2-netaddr
5916 (package-with-python2 python-netaddr))
5917
5918 (define-public python-wrapt
5919 (package
5920 (name "python-wrapt")
5921 (version "1.10.5")
5922 (source
5923 (origin
5924 (method url-fetch)
5925 (uri (string-append
5926 "https://pypi.python.org/packages/source/w/wrapt/wrapt-"
5927 version
5928 ".tar.gz"))
5929 (sha256
5930 (base32
5931 "0cq8rlpzkxzk48b50yrfhzn1d1hrq4gjcdqlrgq4v5palgiv9jwr"))))
5932 (build-system python-build-system)
5933 (arguments
5934 ;; Tests are not included in the tarball, they are only available in the
5935 ;; git repository.
5936 `(#:tests? #f))
5937 (home-page "https://github.com/GrahamDumpleton/wrapt")
5938 (synopsis "Module for decorators, wrappers and monkey patching")
5939 (description
5940 "The aim of the wrapt module is to provide a transparent object proxy for
5941 Python, which can be used as the basis for the construction of function
5942 wrappers and decorator functions.")
5943 (license license:bsd-2)))
5944
5945 (define-public python2-wrapt
5946 (package-with-python2 python-wrapt))
5947
5948 (define-public python-iso8601
5949 (package
5950 (name "python-iso8601")
5951 (version "0.1.11")
5952 (source
5953 (origin
5954 (method url-fetch)
5955 (uri (pypi-uri "iso8601" version))
5956 (sha256
5957 (base32
5958 "0c7gh3lsdjds262h0v1sqc66l7hqgfwbakn96qrhdbl0i3vm5yz8"))))
5959 (build-system python-build-system)
5960 (home-page "https://bitbucket.org/micktwomey/pyiso8601")
5961 (synopsis "Module to parse ISO 8601 dates")
5962 (description
5963 "This module parses the most common forms of ISO 8601 date strings (e.g.
5964 @code{2007-01-14T20:34:22+00:00}) into @code{datetime} objects.")
5965 (license license:expat)))
5966
5967 (define-public python2-iso8601
5968 (package-with-python2 python-iso8601))
5969
5970 (define-public python-monotonic
5971 (package
5972 (name "python-monotonic")
5973 (version "0.3")
5974 (source
5975 (origin
5976 (method url-fetch)
5977 (uri (string-append
5978 "https://pypi.python.org/packages/source/m/monotonic/monotonic-"
5979 version
5980 ".tar.gz"))
5981 (sha256
5982 (base32
5983 "0yz0bcbwx8r2c01czzfpbrxddynxyk9k95jj8h6sgcb7xmfvl998"))))
5984 (build-system python-build-system)
5985 (home-page "https://github.com/atdt/monotonic")
5986 (synopsis "Implementation of time.monotonic() for Python 2 & < 3.3")
5987 (description
5988 "This module provides a monotonic() function which returns the value (in
5989 fractional seconds) of a clock which never goes backwards.")
5990 (license license:asl2.0)))
5991
5992 (define-public python2-monotonic
5993 (package-with-python2 python-monotonic))
5994
5995 (define-public python-webob
5996 (package
5997 (name "python-webob")
5998 (version "1.5.1")
5999 (source
6000 (origin
6001 (method url-fetch)
6002 (uri (pypi-uri "WebOb" version))
6003 (sha256
6004 (base32
6005 "02bhhzijfhv8hmi1i54d4b0v43liwhnywhflvxsv4x3zax9s3afq"))))
6006 (build-system python-build-system)
6007 (native-inputs
6008 `(("python-nose" ,python-nose)))
6009 (home-page "http://webob.org/")
6010 (synopsis "WSGI request and response object")
6011 (description
6012 "WebOb provides wrappers around the WSGI request environment, and an
6013 object to help create WSGI responses.")
6014 (license license:expat)))
6015
6016 (define-public python2-webob
6017 (package-with-python2 python-webob))
6018
6019 (define-public python-xlrd
6020 (package
6021 (name "python-xlrd")
6022 (version "1.0.0")
6023 (source (origin
6024 (method url-fetch)
6025 (uri (pypi-uri "xlrd" version))
6026 (sha256
6027 (base32
6028 "0s8hjiz01vbhy85xalrz0qlsmd9ypf36zjqrf97hh984spapvy0g"))))
6029 (build-system python-build-system)
6030 (arguments
6031 `(#:phases
6032 (modify-phases %standard-phases
6033 ;; Current test in setup.py does not work as of 1.0.0, so use nose to
6034 ;; run tests instead for now.
6035 (replace 'check (lambda _ (zero? (system* "nosetests")))))))
6036 (native-inputs `(("python-nose" ,python-nose)))
6037 (home-page "http://www.python-excel.org/")
6038 (synopsis "Library for extracting data from Excel files")
6039 (description "This packages provides a library to extract data from
6040 spreadsheets using Microsoft Excel proprietary file formats @samp{.xls} and
6041 @samp{.xlsx} (versions 2.0 onwards). It has support for Excel dates and is
6042 Unicode-aware. It is not intended as an end-user tool.")
6043 (license license:bsd-3)))
6044
6045 (define-public python2-xlrd
6046 (package-with-python2 python-xlrd))
6047
6048 (define-public python-prettytable
6049 (package
6050 (name "python-prettytable")
6051 (version "0.7.2")
6052 (source
6053 (origin
6054 (method url-fetch)
6055 (uri (string-append
6056 "https://pypi.python.org/packages/source/P/PrettyTable/"
6057 "prettytable-" version ".tar.bz2"))
6058 (sha256
6059 (base32
6060 "0diwsicwmiq2cpzpxri7cyl5fmsvicafw6nfqf6p6p322dji2g45"))))
6061 (build-system python-build-system)
6062 (home-page "http://code.google.com/p/prettytable/")
6063 (synopsis "Display tabular data in an ASCII table format")
6064 (description
6065 "A library designed to represent tabular data in visually appealing ASCII
6066 tables. PrettyTable allows for selection of which columns are to be printed,
6067 independent alignment of columns (left or right justified or centred) and
6068 printing of sub-tables by specifying a row range.")
6069 (license license:bsd-3)))
6070
6071 (define-public python2-prettytable
6072 (package-with-python2 python-prettytable))
6073
6074 (define-public python-tables
6075 (package
6076 (name "python-tables")
6077 (version "3.2.2")
6078 (source
6079 (origin
6080 (method url-fetch)
6081 (uri (pypi-uri "tables" version))
6082 (sha256
6083 (base32
6084 "117s6w7s3yxafpmf3zz3svana7xfrsviw01va1xp7h8ylx8v6r1m"))))
6085 (build-system python-build-system)
6086 (arguments
6087 `(;; FIXME: python-build-system does not pass configure-flags to "build"
6088 ;; or "check", so we must override the build and check phases.
6089 #:phases
6090 (modify-phases %standard-phases
6091 (add-after 'unpack 'use-gcc
6092 (lambda _
6093 (substitute* "setup.py"
6094 (("compiler = new_compiler\\(\\)" line)
6095 (string-append line
6096 "\ncompiler.set_executables(compiler='gcc',"
6097 "compiler_so='gcc',"
6098 "linker_exe='gcc',"
6099 "linker_so='gcc -shared')")))
6100 #t))
6101 (replace 'build
6102 (lambda* (#:key inputs #:allow-other-keys)
6103 (zero? (system* "python" "setup.py" "build"
6104 (string-append "--hdf5="
6105 (assoc-ref inputs "hdf5"))))))
6106 (replace 'check
6107 (lambda* (#:key inputs #:allow-other-keys)
6108 (zero? (system* "python" "setup.py" "check"
6109 (string-append "--hdf5="
6110 (assoc-ref inputs "hdf5")))))))))
6111 (propagated-inputs
6112 `(("python-numexpr" ,python-numexpr)
6113 ("python-numpy" ,python-numpy)))
6114 (native-inputs
6115 `(("python-cython" ,python-cython)
6116 ("pkg-config" ,pkg-config)))
6117 (inputs
6118 `(("hdf5" ,hdf5)
6119 ("bzip2" ,bzip2)
6120 ("zlib" ,zlib)))
6121 (home-page "http://www.pytables.org/")
6122 (synopsis "Hierarchical datasets for Python")
6123 (description "PyTables is a package for managing hierarchical datasets and
6124 designed to efficently cope with extremely large amounts of data.")
6125 (license license:bsd-3)))
6126
6127 (define-public python2-tables
6128 (package-with-python2 python-tables))
6129
6130 (define-public python-pyasn1
6131 (package
6132 (name "python-pyasn1")
6133 (version "0.1.9")
6134 (source
6135 (origin
6136 (method url-fetch)
6137 (uri (pypi-uri "pyasn1" version))
6138 (sha256
6139 (base32
6140 "0zraxni14bqi20kr4bi6nwsh32aibz0fq0xaczfisw0zdpcsqg45"))))
6141 (build-system python-build-system)
6142 (home-page "http://pyasn1.sourceforge.net/")
6143 (synopsis "ASN.1 types and codecs")
6144 (description
6145 "This is an implementation of ASN.1 types and codecs in Python. It is
6146 suitable for a wide range of protocols based on the ASN.1 specification.")
6147 (license license:bsd-2)))
6148
6149 (define-public python2-pyasn1
6150 (package-with-python2 python-pyasn1))
6151
6152 (define-public python-pyasn1-modules
6153 (package
6154 (name "python-pyasn1-modules")
6155 (version "0.0.8")
6156 (source
6157 (origin
6158 (method url-fetch)
6159 (uri (pypi-uri "pyasn1-modules" version))
6160 (sha256
6161 (base32
6162 "0drqgw81xd3fxdlg89kgd79zzrabvfncvkbybi2wr6w2y4s1jmhh"))))
6163 (build-system python-build-system)
6164 (propagated-inputs
6165 `(("python-pyasn1" ,python-pyasn1)))
6166 (home-page "http://sourceforge.net/projects/pyasn1/")
6167 (synopsis "ASN.1 codec implementations")
6168 (description
6169 "Pyasn1-modules is a collection of Python modules providing ASN.1 types and
6170 implementations of ASN.1-based codecs and protocols.")
6171 (license license:bsd-3)))
6172
6173 (define-public python2-pyasn1-modules
6174 (package-with-python2 python-pyasn1-modules))
6175
6176 (define-public python-ipaddress
6177 (package
6178 (name "python-ipaddress")
6179 (version "1.0.16")
6180 (source (origin
6181 (method url-fetch)
6182 (uri (pypi-uri "ipaddress" version))
6183 (sha256
6184 (base32
6185 "1c3imabdrw8nfksgjjflzg7h4ynjckqacb188rf541m74arq4cas"))))
6186 (build-system python-build-system)
6187 (home-page "https://github.com/phihag/ipaddress")
6188 (synopsis "IP address manipulation library")
6189 (description
6190 "This package provides a fast, lightweight IPv4/IPv6 manipulation library
6191 in Python. This library is used to create, poke at, and manipulate IPv4 and
6192 IPv6 addresses and networks. This is a port of the Python 3.3 ipaddress
6193 module to older versions of Python.")
6194 (license license:psfl)))
6195
6196 (define-public python2-ipaddress
6197 (package-with-python2 python-ipaddress))
6198
6199 (define-public python2-ipaddr
6200 (package
6201 (name "python2-ipaddr")
6202 (version "2.1.11")
6203 (source
6204 (origin
6205 (method url-fetch)
6206 (uri (pypi-uri "ipaddr" version))
6207 (sha256
6208 (base32 "1dwq3ngsapjc93fw61rp17fvzggmab5x1drjzvd4y4q0i255nm8v"))))
6209 (build-system python-build-system)
6210 (arguments
6211 `(#:python ,python-2 ;version 2 only
6212 #:phases
6213 (modify-phases %standard-phases
6214 (replace 'check
6215 (lambda* _
6216 (zero? (system* "python" "ipaddr_test.py")))))))
6217 (home-page "https://github.com/google/ipaddr-py")
6218 (synopsis "IP address manipulation library")
6219 (description
6220 "Ipaddr is a Python@tie{}2 library for creating and manupilating IPv4 and
6221 IPv6 addresses and networks.
6222
6223 For new implementations you may prefer to use the standard module
6224 @code{ipaddress}, which was introduced in Python 3.3 and backported to older
6225 versions of Python.")
6226 (license license:asl2.0)))
6227
6228 (define-public python-idna
6229 (package
6230 (name "python-idna")
6231 (version "2.0")
6232 (source
6233 (origin
6234 (method url-fetch)
6235 (uri (string-append "https://pypi.python.org/packages/source/i/"
6236 "idna/idna-" version ".tar.gz"))
6237 (sha256
6238 (base32
6239 "0frxgmgi234lr9hylg62j69j4ik5zhg0wz05w5dhyacbjfnrl68n"))))
6240 (build-system python-build-system)
6241 (home-page "https://github.com/kjd/idna")
6242 (synopsis "Internationalized domain names in applications")
6243 (description
6244 "This is a library to support the Internationalised Domain Names in
6245 Applications (IDNA) protocol as specified in RFC 5891. This version of the
6246 protocol is often referred to as “IDNA2008” and can produce different results
6247 from the earlier standard from 2003. The library is also intended to act as a
6248 suitable drop-in replacement for the “encodings.idna” module that comes with
6249 the Python standard library but currently only supports the older 2003
6250 specification.")
6251 (license license:bsd-4)))
6252
6253 (define-public python2-idna
6254 (package-with-python2 python-idna))
6255
6256 (define-public python-pretend
6257 (package
6258 (name "python-pretend")
6259 (version "1.0.8")
6260 (source
6261 (origin
6262 (method url-fetch)
6263 (uri (string-append "https://pypi.python.org/packages/source/p/"
6264 "pretend/pretend-" version ".tar.gz"))
6265 (sha256
6266 (base32
6267 "0r5r7ygz9m6d2bklflbl84cqhjkc2q12xgis8268ygjh30g2q3wk"))))
6268 (build-system python-build-system)
6269 (home-page "https://github.com/alex/pretend")
6270 (synopsis "Library for stubbing in Python")
6271 (description
6272 "Pretend is a library to make stubbing with Python easier. Stubbing is a
6273 technique for writing tests. You may hear the term mixed up with mocks,
6274 fakes, or doubles. Basically, a stub is an object that returns pre-canned
6275 responses, rather than doing any computation.")
6276 (license license:bsd-3)))
6277
6278 (define-public python2-pretend
6279 (package-with-python2 python-pretend))
6280
6281 (define-public python-cryptography-vectors
6282 (package
6283 (name "python-cryptography-vectors")
6284 (version "1.5.3")
6285 (source
6286 (origin
6287 (method url-fetch)
6288 (uri (pypi-uri "cryptography_vectors" version))
6289 (sha256
6290 (base32
6291 "1bnd1bricyhxa27rhr0ljk0kacxzvysd3ar2j2hlv13a2k6zw4z5"))))
6292 (build-system python-build-system)
6293 (home-page "https://github.com/pyca/cryptography")
6294 (synopsis "Test vectors for the cryptography package")
6295 (description
6296 "This package contains test vectors for the cryptography package.")
6297 ;; Distributed under either BSD-3 or ASL2.0
6298 (license (list license:bsd-3 license:asl2.0))))
6299
6300 (define-public python2-cryptography-vectors
6301 (package-with-python2 python-cryptography-vectors))
6302
6303 (define-public python-cryptography
6304 (package
6305 (name "python-cryptography")
6306 (version "1.5.3")
6307 (source
6308 (origin
6309 (method url-fetch)
6310 (uri (pypi-uri "cryptography" version))
6311 (sha256
6312 (base32
6313 "1raanvkdfw5ai56ymlij6ghc4k126fs7jx948ig7yn4vj6ndv0ng"))))
6314 (build-system python-build-system)
6315 (arguments
6316 `(#:phases
6317 (modify-phases %standard-phases
6318 (add-before 'check 'disable-failing-test
6319 (lambda _
6320 ;; This test is known to fail with OpenSSL >= 1.0.2i and older
6321 ;; versions of python-cryptography:
6322 ;; https://github.com/pyca/cryptography/issues/3196
6323 ;; TODO: Try re-enabling the test when upgrading
6324 ;; python-cryptography.
6325 (substitute* "tests/hazmat/backends/test_openssl.py"
6326 (("def test_numeric_string_x509_name_entry")
6327 "@pytest.mark.xfail\n def test_numeric_string_x509_name_entry"))
6328 #t)))))
6329 (inputs
6330 `(("openssl" ,openssl)))
6331 (propagated-inputs
6332 `(("python-cffi" ,python-cffi)
6333 ("python-six" ,python-six)
6334 ("python-pyasn1" ,python-pyasn1)
6335 ("python-idna" ,python-idna)
6336 ("python-iso8601" ,python-iso8601)))
6337 (native-inputs
6338 `(("python-cryptography-vectors" ,python-cryptography-vectors)
6339 ("python-hypothesis" ,python-hypothesis)
6340 ("python-pretend" ,python-pretend)
6341 ("python-pyasn1" ,python-pyasn1)
6342 ("python-pyasn1-modules" ,python-pyasn1-modules)
6343 ("python-pytz" ,python-pytz)
6344 ("python-pytest" ,python-pytest-2.9.2)))
6345 (home-page "https://github.com/pyca/cryptography")
6346 (synopsis "Cryptographic recipes and primitives for Python")
6347 (description
6348 "cryptography is a package which provides cryptographic recipes and
6349 primitives to Python developers. It aims to be the “cryptographic standard
6350 library” for Python. The package includes both high level recipes, and low
6351 level interfaces to common cryptographic algorithms such as symmetric ciphers,
6352 message digests and key derivation functions.")
6353 ;; Distributed under either BSD-3 or ASL2.0
6354 (license (list license:bsd-3 license:asl2.0))
6355 (properties `((python2-variant . ,(delay python2-cryptography))))))
6356
6357 (define-public python2-cryptography
6358 (let ((crypto (package-with-python2
6359 (strip-python2-variant python-cryptography))))
6360 (package (inherit crypto)
6361 (propagated-inputs
6362 `(("python2-ipaddress" ,python2-ipaddress)
6363 ("python2-backport-ssl-match-hostname"
6364 ,python2-backport-ssl-match-hostname)
6365 ("python2-enum34" ,python2-enum34)
6366 ,@(package-propagated-inputs crypto))))))
6367
6368 (define-public python-pyopenssl
6369 (package
6370 (name "python-pyopenssl")
6371 (version "16.1.0")
6372 (source
6373 (origin
6374 (method url-fetch)
6375 (uri (pypi-uri "pyOpenSSL" version))
6376 (sha256
6377 (base32
6378 "0prm06zz7hl6bk5s2lqzw25lq6smayfv2fgiliw2rbqxlyiavxw8"))))
6379 (build-system python-build-system)
6380 (propagated-inputs
6381 `(("python-cryptography" ,python-cryptography)
6382 ("python-six" ,python-six)))
6383 (inputs
6384 `(("openssl" ,openssl)))
6385 (home-page "https://github.com/pyca/pyopenssl")
6386 (synopsis "Python wrapper module around the OpenSSL library")
6387 (description
6388 "PyOpenSSL is a high-level wrapper around a subset of the OpenSSL
6389 library.")
6390 (license license:asl2.0)))
6391
6392 (define-public python2-pyopenssl
6393 (package-with-python2 python-pyopenssl))
6394
6395 (define-public python-pip
6396 (package
6397 (name "python-pip")
6398 (version "8.0.2")
6399 (source
6400 (origin
6401 (method url-fetch)
6402 (uri (pypi-uri "pip" version))
6403 (sha256
6404 (base32
6405 "08cm8d4228fj0qnrysy3qv1a6022zr3dcs25amd14lgxil6vvx26"))))
6406 (build-system python-build-system)
6407 (inputs
6408 `(("python-virtualenv" ,python-virtualenv)
6409 ;; Tests
6410 ("python-mock" ,python-mock)
6411 ("python-pytest" ,python-pytest)
6412 ("python-scripttest" ,python-scripttest)))
6413 (home-page "https://pip.pypa.io/")
6414 (synopsis
6415 "Package manager for Python software")
6416 (description
6417 "Pip is a package manager for Python software, that finds packages on the
6418 Python Package Index (PyPI).")
6419 (license license:expat)))
6420
6421 (define-public python2-pip
6422 (package-with-python2 python-pip))
6423
6424 (define-public python-tlsh
6425 (package
6426 (name "python-tlsh")
6427 (version "3.4.4")
6428 (home-page "https://github.com/trendmicro/tlsh")
6429 (source (origin
6430 (method url-fetch)
6431 (uri (string-append "https://github.com/trendmicro/tlsh/archive/v"
6432 version ".tar.gz"))
6433 (sha256
6434 (base32
6435 "00bhzjqrlh7v538kbkbn8lgx976j1138al3sdhklaizqjvpwyk4r"))
6436 (file-name (string-append name "-" version ".tar.gz"))))
6437 (build-system cmake-build-system)
6438 (arguments
6439 '(#:out-of-source? #f
6440 #:phases (modify-phases %standard-phases
6441 (replace
6442 'install
6443 (lambda* (#:key outputs #:allow-other-keys)
6444 ;; Build and install the Python bindings. The underlying
6445 ;; C++ library is apparently not meant to be installed.
6446 (let ((out (assoc-ref outputs "out")))
6447 (with-directory-excursion "py_ext"
6448 (and (system* "python" "setup.py" "build")
6449 (system* "python" "setup.py" "install"
6450 (string-append "--prefix=" out))))))))))
6451 (inputs `(("python" ,python-wrapper))) ;for the bindings
6452 (synopsis "Fuzzy matching library for Python")
6453 (description
6454 "Trend Micro Locality Sensitive Hash (TLSH) is a fuzzy matching library.
6455 Given a byte stream with a minimum length of 256 bytes, TLSH generates a hash
6456 value which can be used for similarity comparisons. Similar objects have
6457 similar hash values, which allows for the detection of similar objects by
6458 comparing their hash values. The byte stream should have a sufficient amount
6459 of complexity; for example, a byte stream of identical bytes will not generate
6460 a hash value.")
6461 (license license:asl2.0)))
6462
6463 (define-public python2-tlsh
6464 (package
6465 (inherit python-tlsh)
6466 (name "python2-tlsh")
6467 (inputs `(("python" ,python-2)))))
6468
6469 (define-public python-termcolor
6470 (package
6471 (name "python-termcolor")
6472 (version "1.1.0")
6473 (source
6474 (origin
6475 (method url-fetch)
6476 (uri (pypi-uri "python-termcolor" version))
6477 (sha256
6478 (base32
6479 "0fv1vq14rpqwgazxg4981904lfyp84mnammw7y046491cv76jv8x"))))
6480 (build-system python-build-system)
6481 (arguments
6482 ;; There are no tests.
6483 `(#:tests? #f))
6484 (home-page "http://pypi.python.org/pypi/termcolor")
6485 (synopsis "ANSII Color formatting for terminal output")
6486 (description
6487 "This package provides ANSII Color formatting for output in terminals.")
6488 (license license:expat)))
6489
6490 (define-public python2-termcolor
6491 (package-with-python2 python-termcolor))
6492
6493 (define-public python-libarchive-c
6494 (package
6495 (name "python-libarchive-c")
6496 (version "2.2")
6497 (source (origin
6498 (method url-fetch)
6499 (uri (pypi-uri "libarchive-c" version))
6500 (sha256
6501 (base32
6502 "0z4r7v3dhd6b3120mav05ff08srih176r2rg5k8kn7mjd9pslm2x"))))
6503 (build-system python-build-system)
6504 (arguments
6505 '(#:phases (modify-phases %standard-phases
6506 (add-before
6507 'build 'reference-libarchive
6508 (lambda* (#:key inputs #:allow-other-keys)
6509 ;; Retain the absolute file name of libarchive.so.
6510 (let ((libarchive (assoc-ref inputs "libarchive")))
6511 (substitute* "libarchive/ffi.py"
6512 (("find_library\\('archive'\\)")
6513 (string-append "'" libarchive
6514 "/lib/libarchive.so'")))))))))
6515 (inputs
6516 `(("libarchive" ,libarchive)))
6517 (home-page "https://github.com/Changaco/python-libarchive-c")
6518 (synopsis "Python interface to libarchive")
6519 (description
6520 "This package provides Python bindings to libarchive, a C library to
6521 access possibly compressed archives in many different formats. It uses
6522 Python's @code{ctypes} foreign function interface (FFI).")
6523 (license license:lgpl2.0+)))
6524
6525 (define-public python2-libarchive-c
6526 (package-with-python2 python-libarchive-c))
6527
6528 (define-public python-file
6529 (package
6530 (inherit file)
6531 (name "python-file")
6532 (source (origin
6533 (inherit (package-source file))
6534 ;; This patch should not be applied to python2-file.
6535 (patches (search-patches "python-file-double-encoding-bug.patch"))))
6536 (build-system python-build-system)
6537 (arguments
6538 '(#:tests? #f ;no tests
6539 #:configure-flags '("--single-version-externally-managed" "--root=/")
6540 #:phases (modify-phases %standard-phases
6541 (add-before 'build 'change-directory
6542 (lambda _
6543 (chdir "python")
6544 #t))
6545 (add-before 'build 'set-library-file-name
6546 (lambda* (#:key inputs #:allow-other-keys)
6547 (let ((file (assoc-ref inputs "file")))
6548 (substitute* "magic.py"
6549 (("find_library\\('magic'\\)")
6550 (string-append "'" file "/lib/libmagic.so'")))
6551 #t))))))
6552 (inputs `(("file" ,file)))
6553 (self-native-input? #f)
6554 (synopsis "Python bindings to the libmagic file type guesser. Note that
6555 this module and the python-magic module both provide a \"magic.py\" file;
6556 these two modules, which are different and were developed separately, both
6557 serve the same purpose: provide Python bindings for libmagic.")))
6558
6559 (define-public python2-file
6560 (package-with-python2 python-file))
6561
6562 (define-public python-debian
6563 (package
6564 (name "python-debian")
6565 (version "0.1.23")
6566 (source
6567 (origin
6568 (method url-fetch)
6569 (uri (string-append
6570 "https://pypi.python.org/packages/source/p/python-debian/python-debian-"
6571 version ".tar.gz"))
6572 (sha256
6573 (base32
6574 "193faznwnjc3n5991wyzim6h9gyq1zxifmfrnpm3avgkh7ahyynh"))))
6575 (build-system python-build-system)
6576 (propagated-inputs
6577 `(("python-six" ,python-six)))
6578 (home-page "http://packages.debian.org/sid/python-debian")
6579 (synopsis "Debian package related modules")
6580 (description
6581 ;; XXX: Use @enumerate instead of @itemize to work around
6582 ;; <http://bugs.gnu.org/21772>.
6583 "This package provides Python modules that abstract many formats of
6584 Debian-related files, such as:
6585
6586 @enumerate
6587 @item Debtags information;
6588 @item @file{debian/changelog} files;
6589 @item packages files, pdiffs;
6590 @item control files of single or multiple RFC822-style paragraphs---e.g.
6591 @file{debian/control}, @file{.changes}, @file{.dsc};
6592 @item Raw @file{.deb} and @file{.ar} files, with (read-only) access to
6593 contained files and meta-information.
6594 @end enumerate\n")
6595
6596 ;; Modules are either GPLv2+ or GPLv3+.
6597 (license license:gpl3+)))
6598
6599 (define-public python2-debian
6600 (package-with-python2 python-debian))
6601
6602 (define-public python-nbformat
6603 (package
6604 (name "python-nbformat")
6605 (version "4.1.0")
6606 (source
6607 (origin
6608 (method url-fetch)
6609 (uri (pypi-uri "nbformat" version))
6610 (sha256
6611 (base32
6612 "0mq8iki3d4mnx7wy05phss7x98mds4fqydin8lcagidp1knw1xnv"))))
6613 (build-system python-build-system)
6614 (arguments `(#:tests? #f)) ; no test target
6615 (propagated-inputs
6616 `(("python-ipython-genutils" ,python-ipython-genutils)
6617 ("python-jsonschema" ,python-jsonschema)
6618 ("python-jupyter-core" ,python-jupyter-core)
6619 ("python-traitlets" ,python-traitlets)))
6620 (home-page "http://jupyter.org")
6621 (synopsis "Jupyter Notebook format")
6622 (description "This package provides the reference implementation of the
6623 Jupyter Notebook format and Python APIs for working with notebooks.")
6624 (license license:bsd-3)))
6625
6626 (define-public python2-nbformat
6627 (package-with-python2 python-nbformat))
6628
6629 (define-public python-bleach
6630 (package
6631 (name "python-bleach")
6632 (version "1.4.3")
6633 (source
6634 (origin
6635 (method url-fetch)
6636 (uri (pypi-uri "bleach" version))
6637 (sha256
6638 (base32
6639 "0jvg3jxrvnx7xmm9gj262v60ib452xlnwlb0navyp7jsvcd0d4qj"))))
6640 (build-system python-build-system)
6641 (propagated-inputs
6642 `(("python-html5lib" ,python-html5lib-0.9)
6643 ("python-six" ,python-six)))
6644 (native-inputs
6645 `(("python-nose" ,python-nose)))
6646 (home-page "http://github.com/jsocol/bleach")
6647 (synopsis "Whitelist-based HTML-sanitizing tool")
6648 (description "Bleach is an easy whitelist-based HTML-sanitizing tool.")
6649 (license license:asl2.0)))
6650
6651 (define-public python2-bleach
6652 (package-with-python2 python-bleach))
6653
6654 (define-public python-entrypoints
6655 (package
6656 (name "python-entrypoints")
6657 (version "0.2.2")
6658 (source
6659 (origin
6660 (method url-fetch)
6661 (uri (string-append "https://github.com/takluyver/entrypoints/archive/"
6662 version ".tar.gz"))
6663 (file-name (string-append name "-" version ".tar.gz"))
6664 (sha256
6665 (base32
6666 "0azqlkh3j0za080lsf5crnhaxx3c93k9dpv5ihkhf5cppgw5sjz5"))))
6667 (build-system python-build-system)
6668 ;; The package does not come with a setup.py file, so we have to generate
6669 ;; one ourselves.
6670 (arguments
6671 `(#:tests? #f
6672 #:phases
6673 (modify-phases %standard-phases
6674 (add-after 'unpack 'create-setup.py
6675 (lambda _
6676 (call-with-output-file "setup.py"
6677 (lambda (port)
6678 (format port "\
6679 from setuptools import setup
6680 setup(name='entrypoints', version='~a', py_modules=['entrypoints'])
6681 " ,version))))))))
6682 (home-page "https://github.com/takluyver/entrypoints")
6683 (synopsis "Discover and load entry points from installed Python packages")
6684 (description "Entry points are a way for Python packages to advertise
6685 objects with some common interface. The most common examples are
6686 @code{console_scripts} entry points, which define shell commands by
6687 identifying a Python function to run. The @code{entrypoints} module contains
6688 functions to find and load entry points.")
6689 (license license:expat)))
6690
6691 (define-public python2-entrypoints
6692 (package-with-python2 python-entrypoints))
6693
6694 (define-public python-nbconvert
6695 (package
6696 (name "python-nbconvert")
6697 (version "5.0.0b1")
6698 (source
6699 (origin
6700 (method url-fetch)
6701 (uri (pypi-uri "nbconvert" version))
6702 (sha256
6703 (base32
6704 "0brclbb18l4nmd5qy3dl9wn05rjdh1fz4rmzdlfqacj12rcdvdgp"))))
6705 (build-system python-build-system)
6706 ;; The "bdist_egg" target is disabled by default, causing the installation
6707 ;; to fail.
6708 (arguments `(#:configure-flags (list "bdist_egg")))
6709 (propagated-inputs
6710 `(("python-bleach" ,python-bleach)
6711 ("python-entrypoints" ,python-entrypoints)
6712 ("python-jinja2" ,python-jinja2)
6713 ("python-jupyter-core" ,python-jupyter-core)
6714 ("python-mistune" ,python-mistune)
6715 ("python-nbformat" ,python-nbformat)
6716 ("python-pygments" ,python-pygments)
6717 ("python-traitlets" ,python-traitlets)))
6718 (home-page "http://jupyter.org")
6719 (synopsis "Converting Jupyter Notebooks")
6720 (description "The @code{nbconvert} tool, @{jupyter nbconvert}, converts
6721 notebooks to various other formats via Jinja templates. It allows you to
6722 convert an @code{.ipynb} notebook file into various static formats including:
6723
6724 @enumerate
6725 @item HTML
6726 @item LaTeX
6727 @item PDF
6728 @item Reveal JS
6729 @item Markdown (md)
6730 @item ReStructured Text (rst)
6731 @item executable script
6732 @end enumerate\n")
6733 (license license:bsd-3)))
6734
6735 (define-public python2-nbconvert
6736 (package-with-python2 python-nbconvert))
6737
6738 (define-public python-notebook
6739 (package
6740 (name "python-notebook")
6741 (version "4.2.3")
6742 (source (origin
6743 (method url-fetch)
6744 (uri (pypi-uri "notebook" version))
6745 (sha256
6746 (base32
6747 "0laq5c2f21frq6xcdckgq7raqhznbjb0qs0357g612z87wyn1a9r"))))
6748 (build-system python-build-system)
6749 (arguments
6750 `(#:phases
6751 (modify-phases %standard-phases
6752 (replace 'check
6753 (lambda _
6754 ;; HOME must be set for tests
6755 (setenv "HOME" "/tmp")
6756 (zero? (system* "nosetests")))))))
6757 (propagated-inputs
6758 `(("python-jupyter-core" ,python-jupyter-core)
6759 ("python-nbformat" ,python-nbformat)
6760 ("python-nbconvert" ,python-nbconvert)
6761 ("python-ipython" ,python-ipython)))
6762 (native-inputs
6763 `(("python-nose" ,python-nose)
6764 ("python-sphinx" ,python-sphinx)
6765 ("python-requests" ,python-requests)))
6766 (home-page "http://jupyter.org/")
6767 (synopsis "Web-based notebook environment for interactive computing")
6768 (description
6769 "The Jupyter HTML notebook is a web-based notebook environment for
6770 interactive computing.")
6771 (license license:bsd-3)))
6772
6773 (define-public python2-notebook
6774 (package-with-python2 python-notebook))
6775
6776 (define-public python-widgetsnbextension
6777 (package
6778 (name "python-widgetsnbextension")
6779 (version "1.2.6")
6780 (source
6781 (origin
6782 (method url-fetch)
6783 (uri (pypi-uri "widgetsnbextension" version))
6784 (sha256
6785 (base32
6786 "0lff2mrwrgsa1mxmwx3phl9xvy0jqfpg6khbmxy53jbq56rwy666"))))
6787 (build-system python-build-system)
6788 (propagated-inputs
6789 `(("python-notebook" ,python-notebook)))
6790 (native-inputs
6791 `(("python-nose" ,python-nose)))
6792 (home-page "http://ipython.org")
6793 (synopsis "IPython HTML widgets for Jupyter")
6794 (description "This package provides interactive HTML widgets for Jupyter
6795 notebooks.")
6796 (license license:bsd-3)))
6797
6798 (define-public python2-widgetsnbextension
6799 (package-with-python2 python-widgetsnbextension))
6800
6801 (define-public python-ipywidgets
6802 (package
6803 (name "python-ipywidgets")
6804 (version "5.2.2")
6805 (source
6806 (origin
6807 (method url-fetch)
6808 (uri (pypi-uri "ipywidgets" version))
6809 (sha256
6810 (base32
6811 "1lk0qrr5l9a0z7qkkn30hv5832whxwxymf1l576fmmad0n7hkxms"))))
6812 (build-system python-build-system)
6813 ;; FIXME: it's not clear how to run the tests.
6814 (arguments `(#:tests? #f))
6815 (propagated-inputs
6816 `(("python-ipykernel" ,python-ipykernel)
6817 ("python-ipython" ,python-ipython)
6818 ("python-traitlets" ,python-traitlets)
6819 ("python-widgetsnbextension" ,python-widgetsnbextension)))
6820 (home-page "http://ipython.org")
6821 (synopsis "IPython HTML widgets for Jupyter")
6822 (description "Ipywidgets are interactive HTML widgets for Jupyter
6823 notebooks and the IPython kernel. Notebooks come alive when interactive
6824 widgets are used. Users gain control of their data and can visualize changes
6825 in the data.")
6826 (license license:bsd-3)))
6827
6828 (define-public python2-ipywidgets
6829 (package-with-python2 python-ipywidgets))
6830
6831 (define-public python-jupyter-console
6832 (package
6833 (name "python-jupyter-console")
6834 (version "5.0.0")
6835 (source
6836 (origin
6837 (method url-fetch)
6838 (uri (pypi-uri "jupyter_console" version))
6839 (sha256
6840 (base32
6841 "04acmkwsi99rcg3vb54c6n492zv35s92h2ahabc0w6wj976cipvx"))))
6842 (build-system python-build-system)
6843 ;; FIXME: it's not clear how to run the tests.
6844 (arguments `(#:tests? #f))
6845 (propagated-inputs
6846 `(("python-ipykernel" ,python-ipykernel)
6847 ("python-ipython" ,python-ipython)
6848 ("python-jupyter-client" ,python-jupyter-client)
6849 ("python-prompt-toolkit" ,python-prompt-toolkit)
6850 ("python-pygments" ,python-pygments)))
6851 (home-page "https://jupyter.org")
6852 (synopsis "Jupyter terminal console")
6853 (description "This package provides a terminal-based console frontend for
6854 Jupyter kernels. It also allows for console-based interaction with non-Python
6855 Jupyter kernels such as IJulia and IRKernel.")
6856 (license license:bsd-3)))
6857
6858 (define-public python2-jupyter-console
6859 (package-with-python2 python-jupyter-console))
6860
6861 (define-public jupyter
6862 (package
6863 (name "jupyter")
6864 (version "1.0.0")
6865 (source
6866 (origin
6867 (method url-fetch)
6868 (uri (pypi-uri "jupyter" version))
6869 (sha256
6870 (base32
6871 "0pwf3pminkzyzgx5kcplvvbvwrrzd3baa7lmh96f647k30rlpp6r"))))
6872 (build-system python-build-system)
6873 ;; FIXME: it's not clear how to run the tests.
6874 (arguments `(#:tests? #f))
6875 (propagated-inputs
6876 `(("python-ipykernel" ,python-ipykernel)
6877 ("python-ipywidgets" ,python-ipywidgets)
6878 ("python-jupyter-console" ,python-jupyter-console)
6879 ("python-nbconvert" ,python-nbconvert)
6880 ("python-notebook" ,python-notebook)))
6881 (home-page "http://jupyter.org")
6882 (synopsis "Web application for interactive documents")
6883 (description
6884 "The Jupyter Notebook is a web application that allows you to create and
6885 share documents that contain live code, equations, visualizations and
6886 explanatory text. Uses include: data cleaning and transformation, numerical
6887 simulation, statistical modeling, machine learning and much more.")
6888 (license license:bsd-3)))
6889
6890 (define-public python-chardet
6891 (package
6892 (name "python-chardet")
6893 (version "2.3.0")
6894 (source
6895 (origin
6896 (method url-fetch)
6897 (uri (string-append
6898 "https://pypi.python.org/packages/source/c/chardet/chardet-"
6899 version
6900 ".tar.gz"))
6901 (sha256
6902 (base32
6903 "1ak87ikcw34fivcgiz2xvi938dmclh078az65l9x3rmgljrkhgp5"))))
6904 (build-system python-build-system)
6905 (home-page "https://github.com/chardet/chardet")
6906 (synopsis "Universal encoding detector for Python 2 and 3")
6907 (description
6908 "This package provides @code{chardet}, a Python module that can
6909 automatically detect a wide range of file encodings.")
6910 (license license:lgpl2.1+)))
6911
6912 (define-public python2-chardet
6913 (package-with-python2 python-chardet))
6914
6915 (define-public python-docopt
6916 (package
6917 (name "python-docopt")
6918 (version "0.6.2")
6919 (source
6920 (origin
6921 (method url-fetch)
6922 ;; The release on PyPI does not include tests.
6923 (uri (string-append
6924 "https://github.com/docopt/docopt/archive/"
6925 version ".tar.gz"))
6926 (file-name (string-append name "-" version ".tar.gz"))
6927 (sha256
6928 (base32
6929 "16bf890xbdz3m30rsv2qacklh2rdn1zrfspfnwzx9g7vwz8yw4r1"))))
6930 (build-system python-build-system)
6931 (native-inputs
6932 `(("python-pytest" ,python-pytest)))
6933 (arguments
6934 `(#:phases (alist-replace
6935 'check
6936 (lambda _ (zero? (system* "py.test")))
6937 %standard-phases)))
6938 (home-page "http://docopt.org")
6939 (synopsis "Command-line interface description language for Python")
6940 (description "This library allows the user to define a command-line
6941 interface from a program's help message rather than specifying it
6942 programatically with command-line parsers like @code{getopt} and
6943 @code{argparse}.")
6944 (license license:expat)))
6945
6946 (define-public python2-docopt
6947 (package-with-python2 python-docopt))
6948
6949 (define-public python-zope-event
6950 (package
6951 (name "python-zope-event")
6952 (version "4.1.0")
6953 (source
6954 (origin
6955 (method url-fetch)
6956 (uri (string-append "https://pypi.python.org/packages/source/z"
6957 "/zope.event/zope.event-" version ".tar.gz"))
6958 (sha256
6959 (base32
6960 "11p75zpfz3ffhz21nzx9wb23xs993ck5s6hkjcvhswwizni5jynw"))))
6961 (build-system python-build-system)
6962 (home-page "http://pypi.python.org/pypi/zope.event")
6963 (synopsis "Event publishing system for Python")
6964 (description "Zope.event provides an event publishing API, intended for
6965 use by applications which are unaware of any subscribers to their events. It
6966 is a simple event-dispatching system on which more sophisticated event
6967 dispatching systems can be built.")
6968 (license license:zpl2.1)))
6969
6970 (define-public python2-zope-event
6971 (package-with-python2 python-zope-event))
6972
6973 (define-public python-zope-interface
6974 (package
6975 (name "python-zope-interface")
6976 (version "4.1.3")
6977 (source
6978 (origin
6979 (method url-fetch)
6980 (uri (string-append "https://pypi.python.org/packages/source/z"
6981 "/zope.interface/zope.interface-" version ".tar.gz"))
6982 (sha256
6983 (base32
6984 "0ks8h73b2g4bkad821qbv0wzjppdrwys33i7ka45ik3wxjg1l8if"))))
6985 (build-system python-build-system)
6986 (propagated-inputs
6987 `(("python-zope-event" ,python-zope-event)))
6988 (home-page "https://github.com/zopefoundation/zope.interface")
6989 (synopsis "Python implementation of the \"design by contract\"
6990 methodology")
6991 (description "Zope.interface provides an implementation of \"object
6992 interfaces\" for Python. Interfaces are a mechanism for labeling objects as
6993 conforming to a given API or contract.")
6994 (license license:zpl2.1)))
6995
6996 (define-public python2-zope-interface
6997 (package-with-python2 python-zope-interface))
6998
6999 (define-public python-zope-exceptions
7000 (package
7001 (name "python-zope-exceptions")
7002 (version "4.0.8")
7003 (source
7004 (origin
7005 (method url-fetch)
7006 (uri (string-append "https://pypi.python.org/packages/source/z"
7007 "/zope.exceptions/zope.exceptions-"
7008 version ".tar.gz"))
7009 (sha256
7010 (base32
7011 "0zwxaaa66sqxg5k7zcrvs0fbg9ym1njnxnr28dfmchzhwjvwnfzl"))))
7012 (build-system python-build-system)
7013 (arguments
7014 '(#:tests? #f)) ; circular dependency with zope.testrunner
7015 (propagated-inputs
7016 `(("python-zope-interface" ,python-zope-interface)))
7017 (home-page "http://cheeseshop.python.org/pypi/zope.exceptions")
7018 (synopsis "Zope exceptions")
7019 (description "Zope.exceptions provides general-purpose exception types
7020 that have uses outside of the Zope framework.")
7021 (license license:zpl2.1)))
7022
7023 (define-public python2-zope-exceptions
7024 (package-with-python2 python-zope-exceptions))
7025
7026 (define-public python-zope-testing
7027 (package
7028 (name "python-zope-testing")
7029 (version "4.5.0")
7030 (source
7031 (origin
7032 (method url-fetch)
7033 (uri (string-append "https://pypi.python.org/packages/source/z"
7034 "/zope.testing/zope.testing-" version ".tar.gz"))
7035 (sha256
7036 (base32
7037 "1yvglxhzvhl45mndvn9gskx2ph30zz1bz7rrlyfs62fv2pvih90s"))
7038 (modules '((guix build utils)))
7039 (snippet
7040 '(begin
7041 ;; Remove pre-compiled .pyc files backup files from source.
7042 (for-each delete-file (find-files "." "(\\.pyc|~)$"))
7043 #t))))
7044 (build-system python-build-system)
7045 (native-inputs
7046 `(("python-zope-exceptions" ,python-zope-exceptions)))
7047 (propagated-inputs
7048 `(("python-zope-interface" ,python-zope-interface)))
7049 (home-page "http://pypi.python.org/pypi/zope.testing")
7050 (synopsis "Zope testing helpers")
7051 (description "Zope.testing provides a number of testing utilities for HTML
7052 forms, HTTP servers, regular expressions, and more.")
7053 (license license:zpl2.1)))
7054
7055 (define-public python2-zope-testing
7056 (package-with-python2 python-zope-testing))
7057
7058 (define-public python-zope-testrunner
7059 (package
7060 (name "python-zope-testrunner")
7061 (version "4.4.9")
7062 (source
7063 (origin
7064 (method url-fetch)
7065 (uri (string-append "https://pypi.python.org/packages/source/z"
7066 "/zope.testrunner/zope.testrunner-"
7067 version ".zip"))
7068 (sha256
7069 (base32
7070 "1r7iqknhh55y45f64mz5hghgvzx34h1i11k350s0avx6q8gznja1"))))
7071 (build-system python-build-system)
7072 (native-inputs
7073 `(("python-six" ,python-six)
7074 ;("python-zope-interface" ,python-zope-interface)
7075 ("python-zope-exceptions" ,python-zope-exceptions)
7076 ("python-zope-testing" ,python-zope-testing)
7077 ("unzip" ,unzip)))
7078 (propagated-inputs
7079 `(("python-zope-interface" ,python-zope-interface)))
7080 (home-page "http://pypi.python.org/pypi/zope.testrunner")
7081 (synopsis "Zope testrunner script")
7082 (description "Zope.testrunner provides a script for running Python
7083 tests.")
7084 (license license:zpl2.1)))
7085
7086 (define-public python2-zope-testrunner
7087 (let ((base (package-with-python2 python-zope-testrunner)))
7088 (package
7089 (inherit base)
7090 (native-inputs
7091 (append (package-native-inputs base)
7092 `(("python2-subunit" ,python2-subunit)
7093 ("python2-mimeparse" ,python2-mimeparse)))))))
7094
7095 (define-public python-zope-i18nmessageid
7096 (package
7097 (name "python-zope-i18nmessageid")
7098 (version "4.0.3")
7099 (source
7100 (origin
7101 (method url-fetch)
7102 (uri (string-append
7103 "https://pypi.python.org/packages/source/z"
7104 "/zope.i18nmessageid/zope.i18nmessageid-"
7105 version ".tar.gz"))
7106 (sha256
7107 (base32
7108 "1rslyph0klk58dmjjy4j0jxy21k03azksixc3x2xhqbkv97cmzml"))))
7109 (build-system python-build-system)
7110 (home-page "http://pypi.python.org/pypi/zope.i18nmessageid")
7111 (synopsis "Message identifiers for internationalization")
7112 (description "Zope.i18nmessageid provides facilities for declaring
7113 internationalized messages within program source text.")
7114 (license license:zpl2.1)))
7115
7116 (define-public python2-zope-i18nmessageid
7117 (package-with-python2 python-zope-i18nmessageid))
7118
7119 (define-public python-zope-schema
7120 (package
7121 (name "python-zope-schema")
7122 (version "4.4.2")
7123 (source
7124 (origin
7125 (method url-fetch)
7126 (uri (string-append "https://pypi.python.org/packages/source/z"
7127 "/zope.schema/zope.schema-" version ".tar.gz"))
7128 (sha256
7129 (base32
7130 "1p943jdxb587dh7php4vx04qvn7b2877hr4qs5zyckvp5afhhank"))))
7131 (build-system python-build-system)
7132 (propagated-inputs
7133 `(("python-zope-event" ,python-zope-event)
7134 ("python-zope-interface" ,python-zope-interface)))
7135 (native-inputs
7136 `(("python-zope-testing" ,python-zope-testing)
7137 ("python-coverage" ,python-coverage)
7138 ("python-nose" ,python-nose)))
7139 (home-page "http://pypi.python.org/pypi/zope.schema")
7140 (synopsis "Zope data schemas")
7141 (description "Zope.scheme provides extensions to zope.interface for
7142 defining data schemas.")
7143 (license license:zpl2.1)))
7144
7145 (define-public python2-zope-schema
7146 (package-with-python2 python-zope-schema))
7147
7148 (define-public python-zope-configuration
7149 (package
7150 (name "python-zope-configuration")
7151 (version "4.0.3")
7152 (source (origin
7153 (method url-fetch)
7154 (uri (string-append "https://pypi.python.org/packages/source/z"
7155 "/zope.configuration/zope.configuration-"
7156 version ".tar.gz"))
7157 (sha256
7158 (base32
7159 "1x9dfqypgympnlm25p9m43xh4qv3p7d75vksv9pzqibrb4cggw5n"))))
7160 (build-system python-build-system)
7161 (propagated-inputs
7162 `(("python-zope-i18nmessageid" ,python-zope-i18nmessageid)
7163 ("python-zope-schema" ,python-zope-schema)))
7164 (home-page "http://pypi.python.org/pypi/zope.configuration")
7165 (synopsis "Zope Configuration Markup Language")
7166 (description "Zope.configuration implements ZCML, the Zope Configuration
7167 Markup Language.")
7168 (license license:zpl2.1)))
7169
7170 (define-public python2-zope-configuration
7171 (package-with-python2 python-zope-configuration))
7172
7173 (define-public python-zope-proxy
7174 (package
7175 (name "python-zope-proxy")
7176 (version "4.1.6")
7177 (source
7178 (origin
7179 (method url-fetch)
7180 (uri (string-append "https://pypi.python.org/packages/source/z"
7181 "/zope.proxy/zope.proxy-" version ".tar.gz"))
7182 (sha256
7183 (base32
7184 "0pqwwmvm1prhwv1ziv9lp8iirz7xkwb6n2kyj36p2h0ppyyhjnm4"))))
7185 (build-system python-build-system)
7186 (propagated-inputs
7187 `(("python-zope-interface" ,python-zope-interface)))
7188 (home-page "http://pypi.python.org/pypi/zope.proxy")
7189 (synopsis "Generic, transparent proxies")
7190 (description "Zope.proxy provides generic, transparent proxies for Python.
7191 Proxies are special objects which serve as mostly-transparent wrappers around
7192 another object, intervening in the apparent behavior of the wrapped object
7193 only when necessary to apply the policy (e.g., access checking, location
7194 brokering, etc.) for which the proxy is responsible.")
7195 (license license:zpl2.1)))
7196
7197 (define-public python2-zope-proxy
7198 (package-with-python2 python-zope-proxy))
7199
7200 (define-public python-zope-location
7201 (package
7202 (name "python-zope-location")
7203 (version "4.0.3")
7204 (source
7205 (origin
7206 (method url-fetch)
7207 (uri (string-append "https://pypi.python.org/packages/source/z"
7208 "/zope.location/zope.location-" version ".tar.gz"))
7209 (sha256
7210 (base32
7211 "1nj9da4ksiyv3h8n2vpzwd0pb03mdsh7zy87hfpx72b6p2zcwg74"))))
7212 (build-system python-build-system)
7213 (native-inputs
7214 `(("python-zope-proxy" ,python-zope-proxy)
7215 ("python-zope-schema" ,python-zope-schema)))
7216 (home-page "http://pypi.python.org/pypi/zope.location/")
7217 (synopsis "Zope location library")
7218 (description "Zope.location implements the concept of \"locations\" in
7219 Zope3, which are are special objects that have a structural location.")
7220 (license license:zpl2.1)))
7221
7222 (define-public python2-zope-location
7223 (package-with-python2 python-zope-location))
7224
7225 (define-public python-zope-security
7226 (package
7227 (name "python-zope-security")
7228 (version "4.0.3")
7229 (source
7230 (origin
7231 (method url-fetch)
7232 (uri (string-append "https://pypi.python.org/packages/source/z"
7233 "/zope.security/zope.security-" version ".tar.gz"))
7234 (sha256
7235 (base32
7236 "14zmf684amc0x32kq05yxnhfqd1cmyhafkw05gn81rn90zjv6ssy"))))
7237 (build-system python-build-system)
7238 (propagated-inputs
7239 `(("python-zope-i18nmessageid" ,python-zope-i18nmessageid)
7240 ("python-zope-component" ,python-zope-component)
7241 ("python-zope-location" ,python-zope-location)
7242 ("python-zope-proxy" ,python-zope-proxy)
7243 ("python-zope-schema" ,python-zope-schema)
7244 ("python-zope-testrunner" ,python-zope-testrunner)
7245 ("python-zope-testing" ,python-zope-testing)))
7246 (home-page "http://pypi.python.org/pypi/zope.security")
7247 (synopsis "Zope security framework")
7248 (description "Zope.security provides a generic mechanism to implement
7249 security policies on Python objects.")
7250 (license license:zpl2.1)))
7251
7252 (define-public python2-zope-security
7253 (let ((zope-security (package-with-python2 python-zope-security)))
7254 (package (inherit zope-security)
7255 (propagated-inputs
7256 `(("python2-zope-testrunner" ,python2-zope-testrunner)
7257 ,@(alist-delete
7258 "python-zope-testrunner"
7259 (package-propagated-inputs zope-security)))))))
7260
7261 (define-public python-zope-component
7262 (package
7263 (name "python-zope-component")
7264 (version "4.2.2")
7265 (source
7266 (origin
7267 (method url-fetch)
7268 (uri (string-append "https://pypi.python.org/packages/source/z"
7269 "/zope.component/zope.component-" version ".tar.gz"))
7270 (sha256
7271 (base32
7272 "06pqr8m5jv12xjyy5b59hh9anl61cxkzhw9mka33r3nxalmi2b18"))))
7273 (build-system python-build-system)
7274 (arguments
7275 ;; Skip tests due to circular dependency with python-zope-security.
7276 '(#:tests? #f))
7277 (native-inputs
7278 `(("python-zope-testing" ,python-zope-testing)))
7279 (propagated-inputs
7280 `(("python-zope-event" ,python-zope-event)
7281 ("python-zope-interface" ,python-zope-interface)
7282 ("python-zope-i18nmessageid" ,python-zope-i18nmessageid)
7283 ("python-zope-configuration" ,python-zope-configuration)))
7284 (home-page "https://github.com/zopefoundation/zope.component")
7285 (synopsis "Zope Component Architecture")
7286 (description "Zope.component represents the core of the Zope Component
7287 Architecture. Together with the zope.interface package, it provides
7288 facilities for defining, registering and looking up components.")
7289 (license license:zpl2.1)))
7290
7291 (define-public python2-zope-component
7292 (package-with-python2 python-zope-component))
7293
7294 (define-public python-pythondialog
7295 (package
7296 (name "python-pythondialog")
7297 (version "3.4.0")
7298 (source
7299 (origin
7300 (method url-fetch)
7301 (uri (pypi-uri "pythondialog" version))
7302 (sha256
7303 (base32
7304 "1728ghsran47jczn9bhlnkvk5bvqmmbihabgif5h705b84r1272c"))))
7305 (build-system python-build-system)
7306 (arguments
7307 `(#:phases
7308 (modify-phases %standard-phases
7309 (add-after 'unpack 'patch-path
7310 (lambda* (#:key inputs #:allow-other-keys)
7311 (let* ((dialog (assoc-ref inputs "dialog")))
7312 ;; Since this library really wants to grovel the search path, we
7313 ;; must hardcode dialog's store path into it.
7314 (substitute* "dialog.py"
7315 (("os.getenv\\(\"PATH\", \":/bin:/usr/bin\"\\)")
7316 (string-append "os.getenv(\"PATH\") + \":" dialog "/bin\"")))
7317 #t))))
7318 #:tests? #f)) ; no test suite
7319 (propagated-inputs
7320 `(("dialog" ,dialog)))
7321 (home-page "http://pythondialog.sourceforge.net/")
7322 (synopsis "Python interface to the UNIX dialog utility")
7323 (description "A Python wrapper for the dialog utility. Its purpose is to
7324 provide an easy to use, pythonic and comprehensive Python interface to dialog.
7325 This allows one to make simple text-mode user interfaces on Unix-like systems")
7326 (license license:lgpl2.1)
7327 (properties `((python2-variant . ,(delay python2-pythondialog))))))
7328
7329 (define-public python2-pythondialog
7330 (let ((base (package-with-python2 (strip-python2-variant python-pythondialog))))
7331 (package
7332 (inherit base)
7333 (version (package-version python-pythondialog))
7334 (source (origin
7335 (method url-fetch)
7336 (uri (pypi-uri "python2-pythondialog" version))
7337 (sha256
7338 (base32
7339 "0d8k7lxk50imdyx85lv8j98i4c93a71iwpapnl1506rpkbm9qvd9")))))))
7340
7341 (define-public python-pyrfc3339
7342 (package
7343 (name "python-pyrfc3339")
7344 (version "1.0")
7345 (source
7346 (origin
7347 (method url-fetch)
7348 (uri (pypi-uri "pyRFC3339" version))
7349 (sha256
7350 (base32
7351 "0dgm4l9y8jiax5cp6yxjd2i27cq8h33sh81n1wfbmnmqb32cdywd"))))
7352 (build-system python-build-system)
7353 (propagated-inputs
7354 `(("python-pytz" ,python-pytz)))
7355 (native-inputs
7356 `(("python-nose" ,python-nose)))
7357 (home-page "https://github.com/kurtraschke/pyRFC3339")
7358 (synopsis "Python timestamp library")
7359 (description "Python library for generating and parsing RFC 3339-compliant
7360 timestamps.")
7361 (license license:expat)))
7362
7363 (define-public python2-pyrfc3339
7364 (package-with-python2 python-pyrfc3339))
7365
7366 (define-public python-werkzeug
7367 (package
7368 (name "python-werkzeug")
7369 (version "0.11.11")
7370 (source
7371 (origin
7372 (method url-fetch)
7373 (uri (pypi-uri "Werkzeug" version))
7374 (sha256
7375 (base32
7376 "1rgpq8a2qv26d75v9j3b074inirlyy6y4b5x4rxblp202jy4cb77"))))
7377 (build-system python-build-system)
7378 (native-inputs
7379 `(("python-pytest" ,python-pytest)))
7380 (home-page "http://werkzeug.pocoo.org/")
7381 (synopsis "Utilities for WSGI applications")
7382 (description "One of the most advanced WSGI utility modules. It includes a
7383 powerful debugger, full-featured request and response objects, HTTP utilities to
7384 handle entity tags, cache control headers, HTTP dates, cookie handling, file
7385 uploads, a powerful URL routing system and a bunch of community-contributed
7386 addon modules.")
7387 (license license:x11)))
7388
7389 (define-public python2-werkzeug
7390 (package-with-python2 python-werkzeug))
7391
7392 (define-public python-configobj
7393 (package
7394 (name "python-configobj")
7395 (version "5.0.6")
7396 (source (origin
7397 (method url-fetch)
7398 (uri (string-append
7399 "https://pypi.python.org/packages/source/c/configobj/"
7400 "configobj-" version ".tar.gz"))
7401 (sha256
7402 (base32
7403 "00h9rcmws03xvdlfni11yb60bz3kxfvsj6dg6nrpzj71f03nbxd2"))
7404 ;; Patch setup.py so it looks for python-setuptools, which is
7405 ;; required to parse the keyword 'install_requires' in setup.py.
7406 (patches (search-patches "python-configobj-setuptools.patch"))))
7407 (build-system python-build-system)
7408 (native-inputs
7409 `(("python-six" ,python-six)))
7410 (synopsis "Config file reading, writing and validation")
7411 (description "ConfigObj is a simple but powerful config file reader and
7412 writer: an ini file round tripper. Its main feature is that it is very easy to
7413 use, with a straightforward programmer’s interface and a simple syntax for
7414 config files.")
7415 (home-page "https://github.com/DiffSK/configobj")
7416 (license license:bsd-3)))
7417
7418 (define-public python2-configobj
7419 (package-with-python2 python-configobj))
7420
7421 (define-public python-configargparse
7422 (package
7423 (name "python-configargparse")
7424 (version "0.10.0")
7425 (source (origin
7426 (method url-fetch)
7427 (uri (string-append
7428 "https://pypi.python.org/packages/source/C/ConfigArgParse/"
7429 "ConfigArgParse-" version ".tar.gz"))
7430 (sha256
7431 (base32
7432 "19wh919gbdbzxzpagg52q3lm62yicm95ddlcx77dyjc1slyshl1v"))))
7433 (build-system python-build-system)
7434 (arguments
7435 ;; FIXME: Bug in test suite filed upstream:
7436 ;; https://github.com/bw2/ConfigArgParse/issues/32
7437 '(#:tests? #f))
7438 (synopsis "Replacement for argparse")
7439 (description "A drop-in replacement for argparse that allows options to also
7440 be set via config files and/or environment variables.")
7441 (home-page "https://github.com/bw2/ConfigArgParse")
7442 (license license:expat)))
7443
7444 (define-public python2-configargparse
7445 (package-with-python2 python-configargparse))
7446
7447 (define-public python-ndg-httpsclient
7448 (package
7449 (name "python-ndg-httpsclient")
7450 (version "0.4.0")
7451 (source (origin
7452 (method url-fetch)
7453 (uri (string-append
7454 "https://pypi.python.org/packages/source/n/ndg-httpsclient/"
7455 "ndg_httpsclient-" version ".tar.gz"))
7456 (sha256
7457 (base32
7458 "0x32ibixm3vv5m9xfk83xsqm8xcqw4dd0khbh6qbri6rxgymbhg8"))))
7459 (build-system python-build-system)
7460 (arguments
7461 '(;; The tests appear to require networking.
7462 #:tests? #f))
7463 (propagated-inputs
7464 `(("python-pyopenssl" ,python-pyopenssl)))
7465 (synopsis "HTTPS support for Python's httplib and urllib2")
7466 (description "This is a HTTPS client implementation for httplib and urllib2
7467 based on PyOpenSSL. PyOpenSSL provides a more fully featured SSL implementation
7468 over the default provided with Python and importantly enables full verification
7469 of the SSL peer.")
7470 (home-page "https://github.com/cedadev/ndg_httpsclient/")
7471 (license license:bsd-3)))
7472
7473 ;; python2-openssl requires special care, so package-with-python2 is
7474 ;; insufficient.
7475 (define-public python2-ndg-httpsclient
7476 (package (inherit python-ndg-httpsclient)
7477 (name "python2-ndg-httpsclient")
7478 (arguments `(#:python ,python-2))
7479 (propagated-inputs
7480 `(("python2-pyopenssl" ,python2-pyopenssl)))))
7481
7482 (define-public python-contextlib2
7483 (package
7484 (name "python-contextlib2")
7485 (version "0.4.0")
7486 (source
7487 (origin
7488 (method url-fetch)
7489 (uri (pypi-uri "contextlib2" version))
7490 (sha256
7491 (base32
7492 "0cmp131dlh0d0zvw0aza1zd13glvngzk8lb4avks0hm7yxwdr9am"))))
7493 (build-system python-build-system)
7494 (arguments
7495 `(#:phases
7496 (modify-phases %standard-phases
7497 (replace 'check
7498 (lambda _ (zero?
7499 (system*
7500 "python" "test_contextlib2.py" "-v")))))))
7501 (home-page "http://contextlib2.readthedocs.org/")
7502 (synopsis "Tools for decorators and context managers")
7503 (description "This module is primarily a backport of the Python
7504 3.2 contextlib to earlier Python versions. Like contextlib, it
7505 provides utilities for common tasks involving decorators and context
7506 managers. It also contains additional features that are not part of
7507 the standard library.")
7508 (license license:psfl)))
7509
7510 (define-public python2-contextlib2
7511 (package-with-python2 python-contextlib2))
7512
7513 (define-public python-texttable
7514 (package
7515 (name "python-texttable")
7516 (version "0.8.4")
7517 (source
7518 (origin
7519 (method url-fetch)
7520 (uri (pypi-uri "texttable" version))
7521 (sha256
7522 (base32
7523 "0bkhs4dx9s6g7fpb969hygq56hyz4ncfamlynw72s0n6nqfbd1w5"))))
7524 (build-system python-build-system)
7525 (arguments '(#:tests? #f)) ; no tests
7526 (home-page "https://github.com/foutaise/texttable/")
7527 (synopsis "Python module for creating simple ASCII tables")
7528 (description "Texttable is a Python module for creating simple ASCII
7529 tables.")
7530 (license license:lgpl2.1+)))
7531
7532 (define-public python2-texttable
7533 (package-with-python2 python-texttable))
7534
7535 (define-public python-websocket-client
7536 (package
7537 (name "python-websocket-client")
7538 (version "0.37.0")
7539 (source
7540 (origin
7541 (method url-fetch)
7542 (uri (pypi-uri "websocket_client" version))
7543 (sha256
7544 (base32
7545 "0h9glp1jll3z76ly3kg08aqgxqk0a68p4zi9yn50353bh5nj92v7"))))
7546 (build-system python-build-system)
7547 (native-inputs
7548 `(("python-six" ,python-six))) ; for tests
7549 (home-page "https://github.com/liris/websocket-client")
7550 (synopsis "WebSocket client for Python")
7551 (description "The Websocket-client module provides the low level APIs for
7552 WebSocket usage in Python programs.")
7553 (license license:lgpl2.1+)))
7554
7555 (define-public python2-websocket-client
7556 (package-with-python2 python-websocket-client))
7557
7558 (define-public python-atomicwrites
7559 (package
7560 (name "python-atomicwrites")
7561 (version "1.1.0")
7562 (source (origin
7563 (method url-fetch)
7564 (uri (pypi-uri "atomicwrites" version))
7565 (sha256
7566 (base32
7567 "1s01dci8arsl9d9vr5nz1fk9znldp1z3l4yl43f0c27z12b8yxl0"))))
7568 (build-system python-build-system)
7569 (synopsis "Atomic file writes in Python")
7570 (description "Library for atomic file writes using platform dependent tools
7571 for atomic file system operations.")
7572 (home-page "https://github.com/untitaker/python-atomicwrites")
7573 (license license:expat)))
7574
7575 (define-public python2-atomicwrites
7576 (package-with-python2 python-atomicwrites))
7577
7578 (define-public python-requests-toolbelt
7579 (package
7580 (name "python-requests-toolbelt")
7581 (version "0.6.2")
7582 (source (origin
7583 (method url-fetch)
7584 (uri (string-append
7585 "https://pypi.python.org/packages/"
7586 "e1/a4/a94c037bc72ad70441aff1403d3243510d2542ddca7759faaeffeb11aefe/"
7587 "requests-toolbelt-" version ".tar.gz"))
7588 (sha256
7589 (base32
7590 "15q9nrgp85nqlr4kdz1zvj8z2npafi2sr12y7fqgxbkq28j1aci6"))))
7591 (build-system python-build-system)
7592 (native-inputs
7593 `(("python-betamax" ,python-betamax)
7594 ("python-mock" ,python-mock)
7595 ("python-pytest" ,python-pytest)))
7596 (propagated-inputs
7597 `(("python-requests" ,python-requests)))
7598 (synopsis "Extensions to python-requests")
7599 (description "This is a toolbelt of useful classes and functions to be used
7600 with python-requests.")
7601 (home-page "https://github.com/sigmavirus24/requests-toolbelt")
7602 (license license:asl2.0)))
7603
7604 (define-public python-click-threading
7605 (package
7606 (name "python-click-threading")
7607 (version "0.2.0")
7608 (source (origin
7609 (method url-fetch)
7610 (uri (string-append
7611 "https://pypi.python.org/packages/"
7612 "fe/b7/e7f609d18a2a351cb71616adcf54df1acd82f83cb9b5936935a4d20e2c23/"
7613 "click-threading-" version ".tar.gz"))
7614 (sha256
7615 (base32
7616 "18bcqikxwb3drb8rf60cclxkxw52521b38ax3byah6j8cn8y9p4j"))))
7617 (build-system python-build-system)
7618 (propagated-inputs
7619 `(("python-click" ,python-click)))
7620 (synopsis "Utilities for multithreading in Click")
7621 (description "This package provides utilities for multithreading in Click
7622 applications.")
7623 (home-page "https://github.com/click-contrib/click-threading")
7624 (license license:expat)))
7625
7626 (define-public python-click-log
7627 (package
7628 (name "python-click-log")
7629 (version "0.1.3")
7630 (source (origin
7631 (method url-fetch)
7632 (uri (pypi-uri "click-log" version))
7633 (sha256
7634 (base32
7635 "0kdd1vminxpcfczxl2kkf285n0dr1gxh2cdbx1p6vkj7b7bci3gx"))))
7636 (build-system python-build-system)
7637 (propagated-inputs
7638 `(("python-click" ,python-click)))
7639 (synopsis "Logging for click applications")
7640 (description "This package provides a Python library for logging Click
7641 applications.")
7642 (home-page "https://github.com/click-contrib/click-log")
7643 (license license:expat)))
7644
7645 (define-public python-apipkg
7646 (package
7647 (name "python-apipkg")
7648 (version "1.4")
7649 (source (origin
7650 (method url-fetch)
7651 (uri (pypi-uri "apipkg" version))
7652 (sha256
7653 (base32
7654 "1iks5701qnp3dlr3q1d9qm68y2plp2m029irhpz92a44psfkjf1f"))))
7655 (build-system python-build-system)
7656 (native-inputs
7657 `(("python-pytest" ,python-pytest)))
7658 (synopsis "Namespace control and lazy-import mechanism")
7659 (description "With apipkg you can control the exported namespace of a Python
7660 package and greatly reduce the number of imports for your users. It is a small
7661 pure Python module that works on virtually all Python versions.")
7662 (home-page "https://bitbucket.org/hpk42/apipkg")
7663 (license license:expat)))
7664
7665 (define-public python2-apipkg
7666 (package-with-python2 python-apipkg))
7667
7668 (define-public python-execnet
7669 (package
7670 (name "python-execnet")
7671 (version "1.4.1")
7672 (source (origin
7673 (method url-fetch)
7674 (uri (pypi-uri "execnet" version))
7675 (sha256
7676 (base32
7677 "1rpk1vyclhg911p3hql0m0nrpq7q7mysxnaaw6vs29cpa6kx8vgn"))))
7678 (build-system python-build-system)
7679 (arguments
7680 `(;; 2 failed, 275 passed, 670 skipped, 4 xfailed
7681 ;; The two test failures are caused by the lack of an `ssh` executable.
7682 ;; The test suite can be run with pytest after the 'install' phase.
7683 #:tests? #f))
7684 (native-inputs
7685 `(("python-pytest" ,python-pytest)
7686 ("python-setuptools-scm" ,python-setuptools-scm)))
7687 (propagated-inputs
7688 `(("python-apipkg" ,python-apipkg)))
7689 (synopsis "Rapid multi-Python deployment")
7690 (description "Execnet provides a share-nothing model with
7691 channel-send/receive communication for distributing execution across many
7692 Python interpreters across version, platform and network barriers. It has a
7693 minimal and fast API targetting the following uses:
7694 @enumerate
7695 @item distribute tasks to (many) local or remote CPUs
7696 @item write and deploy hybrid multi-process applications
7697 @item write scripts to administer multiple environments
7698 @end enumerate")
7699 (home-page "http://codespeak.net/execnet/")
7700 (license license:expat)))
7701
7702 (define-public python2-execnet
7703 (package-with-python2 python-execnet))
7704
7705 ;;; The software provided by this package was integrated into pytest 2.8.
7706 (define-public python-pytest-cache
7707 (package
7708 (name "python-pytest-cache")
7709 (version "1.0")
7710 (source (origin
7711 (method url-fetch)
7712 (uri (pypi-uri "pytest-cache" version))
7713 (sha256
7714 (base32
7715 "1a873fihw4rhshc722j4h6j7g3nj7xpgsna9hhg3zn6ksknnhx5y"))))
7716 (build-system python-build-system)
7717 (propagated-inputs
7718 `(("python-apipkg" ,python-apipkg)
7719 ("python-execnet" ,python-execnet)
7720 ("python-py" ,python-py)
7721 ("python-pytest" ,python-pytest)))
7722 (synopsis "Py.test plugin with mechanisms for caching across test runs")
7723 (description "The pytest-cache plugin provides tools to rerun failures from
7724 the last py.test invocation.")
7725 (home-page "https://bitbucket.org/hpk42/pytest-cache/")
7726 (license license:expat)))
7727
7728 (define-public python2-pytest-cache
7729 (package-with-python2 python-pytest-cache))
7730
7731 (define-public python-pytest-localserver
7732 (package
7733 (name "python-pytest-localserver")
7734 (version "0.3.5")
7735 (source (origin
7736 (method url-fetch)
7737 (uri (pypi-uri "pytest-localserver" version))
7738 (sha256
7739 (base32
7740 "0dvqspjr6va55zwmnnc2mmpqc7mm65kxig9ya44x1z8aadzxpa4p"))))
7741 (build-system python-build-system)
7742 (arguments
7743 `(#:phases (modify-phases %standard-phases
7744 (replace 'check
7745 (lambda _
7746 (zero? (system* "py.test" "--genscript=runtests.py"))
7747 (zero? (system* "py.test")))))))
7748 (native-inputs
7749 `(("python-pytest" ,python-pytest)
7750 ("python-requests" ,python-requests)
7751 ("python-six" ,python-six)))
7752 (propagated-inputs
7753 `(("python-werkzeug" ,python-werkzeug)))
7754 (synopsis "Py.test plugin to test server connections locally")
7755 (description "Pytest-localserver is a plugin for the pytest testing
7756 framework which enables you to test server connections locally.")
7757 (home-page "https://pypi.python.org/pypi/pytest-localserver")
7758 (license license:expat)))
7759
7760 (define-public python-wsgi-intercept
7761 (package
7762 (name "python-wsgi-intercept")
7763 (version "1.2.2")
7764 (source (origin
7765 (method url-fetch)
7766 (uri (string-append
7767 "https://pypi.python.org/packages/"
7768 "38/76/ebcbc24d0cb77db34520a3ca6ed1bd43ace17d182bbd8dd7d976f1c176fb/"
7769 "wsgi_intercept-" version ".tar.gz"))
7770 (sha256
7771 (base32
7772 "0kjj2v2dvmnpdd5h5gk9rzz0f54rhjb0yiz3zg65bmp65slfw65d"))))
7773 (build-system python-build-system)
7774 (native-inputs
7775 `(("python-pytest" ,python-pytest)
7776 ("python-six" ,python-six)
7777 ("python-urllib3" ,python-urllib3)))
7778 (propagated-inputs
7779 `(("python-httplib2" ,python-httplib2)
7780 ("python-requests" ,python-requests)))
7781 (synopsis "Puts a WSGI application in place of a real URI for testing")
7782 (description "Wsgi_intercept installs a WSGI application in place of a real
7783 URI for testing. Testing a WSGI application normally involves starting a
7784 server at a local host and port, then pointing your test code to that address.
7785 Instead, this library lets you intercept calls to any specific host/port
7786 combination and redirect them into a WSGI application importable by your test
7787 program. Thus, you can avoid spawning multiple processes or threads to test
7788 your Web app.")
7789 (home-page "https://github.com/cdent/wsgi-intercept")
7790 (license license:expat)))
7791
7792 (define-public python-pytest-xprocess
7793 (package
7794 (name "python-pytest-xprocess")
7795 (version "0.9.1")
7796 (source (origin
7797 (method url-fetch)
7798 (uri (pypi-uri "pytest-xprocess" version))
7799 (sha256
7800 (base32
7801 "17zlql1xqw3ywcgwwbqmw633aly99lab12hm02asr8awvg5603pp"))))
7802 (build-system python-build-system)
7803 (propagated-inputs
7804 `(("python-pytest" ,python-pytest)
7805 ("python-pytest-cache" ,python-pytest-cache)
7806 ("python-psutil" ,python-psutil)))
7807 (synopsis "Pytest plugin to manage external processes across test runs")
7808 (description "Pytest-xprocess is an experimental py.test plugin for managing
7809 processes across test runs.")
7810 (home-page "https://bitbucket.org/pytest-dev/pytest-xprocess")
7811 (license license:expat)))
7812
7813 (define-public python-icalendar
7814 (package
7815 (name "python-icalendar")
7816 (version "3.10")
7817 (source (origin
7818 (method url-fetch)
7819 (uri (pypi-uri "icalendar" version))
7820 (sha256
7821 (base32
7822 "01amnk3621s7fagfla86npd25knbqirchg7h1jpqxqp103d02bs7"))))
7823 (build-system python-build-system)
7824 (propagated-inputs
7825 `(("python-dateutil-2" ,python-dateutil-2)
7826 ("python-pytz" ,python-pytz)))
7827 (synopsis "Python library for parsing iCalendar files")
7828 (description "The icalendar package is a parser/generator of iCalendar
7829 files for use with Python.")
7830 (home-page "https://github.com/collective/icalendar")
7831 (license license:bsd-2)))
7832
7833 (define-public python-sphinxcontrib-newsfeed
7834 (package
7835 (name "python-sphinxcontrib-newsfeed")
7836 (version "0.1.4")
7837 (source (origin
7838 (method url-fetch)
7839 (uri (pypi-uri "sphinxcontrib-newsfeed" version))
7840 (sha256
7841 (base32
7842 "1d7gam3mn8v4in4p16yn3v10vps7nnaz6ilw99j4klij39dqd37p"))))
7843 (build-system python-build-system)
7844 (propagated-inputs
7845 `(("python-docutils" ,python-docutils)
7846 ("python-sphinx" ,python-sphinx)))
7847 (synopsis "News Feed extension for Sphinx")
7848 (description "Sphinxcontrib-newsfeed is an extension for adding a simple
7849 Blog, News or Announcements section to a Sphinx website.")
7850 (home-page "https://bitbucket.org/prometheus/sphinxcontrib-newsfeed")
7851 (license license:bsd-2)))
7852
7853 (define-public python-args
7854 (package
7855 (name "python-args")
7856 (version "0.1.0")
7857 (source (origin
7858 (method url-fetch)
7859 (uri (pypi-uri "args" version))
7860 (sha256
7861 (base32
7862 "057qzi46h5dmxdqknsbrssn78lmqjlnm624iqdhrnpk26zcbi1d7"))))
7863 (build-system python-build-system)
7864 (home-page "https://github.com/kennethreitz/args")
7865 (synopsis "Command-line argument parser")
7866 (description
7867 "This library provides a Python module to parse command-line arguments.")
7868 (license license:bsd-3)))
7869
7870 (define-public python2-args
7871 (package-with-python2 python-args))
7872
7873 (define-public python-clint
7874 (package
7875 (name "python-clint")
7876 (version "0.5.1")
7877 (source (origin
7878 (method url-fetch)
7879 (uri (pypi-uri "clint" version))
7880 (sha256
7881 (base32
7882 "1an5lkkqk1zha47198p42ji3m94xmzx1a03dn7866m87n4r4q8h5"))))
7883 (build-system python-build-system)
7884 (propagated-inputs
7885 `(("python-args" ,python-args)))
7886 (home-page "https://github.com/kennethreitz/clint")
7887 (synopsis "Command-line interface tools")
7888 (description
7889 "Clint is a Python module filled with a set of tools for developing
7890 command-line applications, including tools for colored and indented
7891 output, progress bar display, and pipes.")
7892 (license license:isc)))
7893
7894 (define-public python2-clint
7895 (package-with-python2 python-clint))
7896
7897 (define-public python-astor
7898 (package
7899 (name "python-astor")
7900 (version "0.5")
7901 (source (origin
7902 (method url-fetch)
7903 (uri (pypi-uri "astor" version))
7904 (sha256
7905 (base32
7906 "1fdafq5hkis1fxqlmhw0sn44zp2ar46nxhbc22cvwg7hsd8z5gsa"))))
7907 (build-system python-build-system)
7908 (home-page "https://github.com/berkerpeksag/astor")
7909 (synopsis "Read and write Python ASTs")
7910 (description
7911 "Astor is designed to allow easy manipulation of Python source via the
7912 Abstract Syntax Tree.")
7913 (license license:bsd-3)))
7914
7915 (define-public python2-astor
7916 (package-with-python2 python-astor))
7917
7918 (define-public python-rply
7919 (package
7920 (name "python-rply")
7921 (version "0.7.4")
7922 (source (origin
7923 (method url-fetch)
7924 (uri (pypi-uri "rply" version))
7925 (sha256
7926 (base32
7927 "12rp1d9ba7nvd5rhaxi6xzx1rm67r1k1ylsrkzhpwnphqpb06cvj"))))
7928 (build-system python-build-system)
7929 (propagated-inputs
7930 `(("python-appdirs" ,python-appdirs)))
7931 (home-page "https://github.com/alex/rply")
7932 (synopsis "Parser generator for Python")
7933 (description
7934 "This package provides a pure Python based parser generator, that also
7935 works with RPython. It is a more-or-less direct port of David Bazzley's PLY,
7936 with a new public API, and RPython support.")
7937 (license license:bsd-3)))
7938
7939 (define-public python2-rply
7940 (package-with-python2 python-rply))
7941
7942 (define-public python-hy
7943 (package
7944 (name "python-hy")
7945 (version "0.11.1")
7946 (source (origin
7947 (method url-fetch)
7948 (uri (pypi-uri "hy" version))
7949 (sha256
7950 (base32
7951 "1msqv747iz12r73mz4qvsmlwkddwjvrahlrk7ysrcz07h7dsscxs"))))
7952 (build-system python-build-system)
7953 (propagated-inputs
7954 `(("python-astor" ,python-astor)
7955 ("python-clint" ,python-clint)
7956 ("python-rply" ,python-rply)))
7957 (home-page "http://hylang.org/")
7958 (synopsis "Lisp frontend to Python")
7959 (description
7960 "Hy is a dialect of Lisp that's embedded in Python. Since Hy transforms
7961 its Lisp code into the Python Abstract Syntax Tree, you have the whole world of
7962 Python at your fingertips, in Lisp form.")
7963 (license license:expat)))
7964
7965 (define-public python2-hy
7966 (package-with-python2 python-hy))
7967
7968 (define-public python-rauth
7969 (package
7970 (name "python-rauth")
7971 (version "0.7.2")
7972 (source
7973 (origin
7974 (method url-fetch)
7975 (uri (pypi-uri "rauth" version))
7976 (sha256
7977 (base32
7978 "00pq7zw429hhza9c0qzxiqp77m653jv09z92nralnmzwdf6pzicf"))))
7979 (build-system python-build-system)
7980 (arguments
7981 `(#:test-target "check"))
7982 (propagated-inputs
7983 `(("python-requests" ,python-requests)))
7984 (home-page "https://github.com/litl/rauth")
7985 (synopsis "Python library for OAuth 1.0/a, 2.0, and Ofly")
7986 (description
7987 "Rauth is a Python library for OAuth 1.0/a, 2.0, and Ofly. It also
7988 provides service wrappers for convenient connection initialization and
7989 authenticated session objects providing things like keep-alive.")
7990 (license license:expat)
7991 (properties `((python2-variant . ,(delay python2-rauth))))))
7992
7993 (define-public python2-rauth
7994 (let ((base (package-with-python2 (strip-python2-variant python-rauth))))
7995 (package
7996 (inherit base)
7997 (native-inputs `(("python2-unittest2" ,python2-unittest2)
7998 ,@(package-native-inputs base))))))
7999
8000 (define-public python2-functools32
8001 (package
8002 (name "python2-functools32")
8003 (version "3.2.3-2")
8004 (source
8005 (origin
8006 (method url-fetch)
8007 (uri (pypi-uri "functools32" version))
8008 (sha256
8009 (base32
8010 "0v8ya0b58x47wp216n1zamimv4iw57cxz3xxhzix52jkw3xks9gn"))))
8011 (build-system python-build-system)
8012 (arguments
8013 `(#:python ,python-2
8014 #:tests? #f)) ; no test target
8015 (home-page "https://github.com/MiCHiLU/python-functools32")
8016 (synopsis
8017 "Backport of the functools module from Python 3.2.3")
8018 (description
8019 "This package is a backport of the @code{functools} module from Python
8020 3.2.3 for use with older versions of Python and PyPy.")
8021 (license license:expat)))
8022
8023 (define-public python2-futures
8024 (package
8025 (name "python2-futures")
8026 (version "3.0.3")
8027 (source
8028 (origin
8029 (method url-fetch)
8030 (uri (pypi-uri "futures" version))
8031 (sha256
8032 (base32
8033 "1vcb34dqhzkhbq1957vdjszhhm5y3j9ba88dgwhqx2zynhmk9qig"))))
8034 (build-system python-build-system)
8035 (arguments `(#:python ,python-2))
8036 (home-page "https://github.com/agronholm/pythonfutures")
8037 (synopsis
8038 "Backport of the concurrent.futures package from Python 3.2")
8039 (description
8040 "The concurrent.futures module provides a high-level interface for
8041 asynchronously executing callables. This package backports the
8042 concurrent.futures package from Python 3.2")
8043 (license license:bsd-3)))
8044
8045 (define-public python-promise
8046 (package
8047 (name "python-promise")
8048 (version "0.4.2")
8049 (source
8050 (origin
8051 (method url-fetch)
8052 (uri (pypi-uri "promise" version))
8053 (sha256
8054 (base32
8055 "1k19ms8l3d5jzjh557rgkxb5sg4mqgfc315rn4hx1z3n8qq6lr3h"))))
8056 (build-system python-build-system)
8057 ;; Tests wants python-futures, which is a python2 only program, and
8058 ;; can't be found by python-promise at test time.
8059 (arguments `(#:tests? #f))
8060 (home-page "https://github.com/syrusakbary/promise")
8061 (synopsis "Promises/A+ implementation for Python")
8062 (description
8063 "Promises/A+ implementation for Python")
8064 (properties `((python2-variant . ,(delay python2-promise))))
8065 (license license:expat)))
8066
8067 (define-public python2-promise
8068 (let ((promise (package-with-python2
8069 (strip-python2-variant python-promise))))
8070 (package (inherit promise)
8071 (arguments (substitute-keyword-arguments (package-arguments promise)
8072 ((#:tests? _) #t)))
8073 (native-inputs
8074 `(("python2-futures" ,python2-futures)
8075 ("python2-pytest" ,python2-pytest)
8076 ,@(package-native-inputs promise))))))
8077
8078 (define-public python-urllib3
8079 (package
8080 (name "python-urllib3")
8081 (version "1.18.1")
8082 (source
8083 (origin
8084 (method url-fetch)
8085 (uri (pypi-uri "urllib3" version))
8086 (sha256
8087 (base32
8088 "1wb8aqnq53vzh2amrv8kc66f3h6fx217y0q62y6n30a64p2yqmam"))))
8089 (build-system python-build-system)
8090 (arguments `(#:tests? #f))
8091 (native-inputs
8092 `(;; some packages for tests
8093 ("python-nose" ,python-nose)
8094 ("python-mock" ,python-mock)
8095 ("python-tornado" ,python-tornado)))
8096 (propagated-inputs
8097 `(;; packages for https security
8098 ("python-certifi" ,python-certifi)
8099 ("python-ndg-httpsclient" ,python-ndg-httpsclient)
8100 ("python-pyasn1" ,python-pyasn1)
8101 ("python-pyopenssl" ,python-pyopenssl)))
8102 (home-page "https://urllib3.readthedocs.org/")
8103 (synopsis "HTTP library with thread-safe connection pooling")
8104 (description
8105 "Urllib3 supports features left out of urllib and urllib2 libraries. It
8106 can reuse the same socket connection for multiple requests, it can POST files,
8107 supports url redirection and retries, and also gzip and deflate decoding.")
8108 (license license:expat)))
8109
8110 (define-public python2-urllib3
8111 (package-with-python2 python-urllib3))
8112
8113 (define-public python-colorama
8114 (package
8115 (name "python-colorama")
8116 (version "0.3.3")
8117 (source
8118 (origin
8119 (method url-fetch)
8120 (uri (pypi-uri "colorama" version))
8121 (sha256
8122 (base32
8123 "1716z9pq1r5ys3nkg7wdrb3h2f9rmd0zdxpxzmx3bgwgf6xg48gb"))))
8124 (build-system python-build-system)
8125 (synopsis "colored terminal text rendering for Python")
8126 (description "Colorama is a Python library for rendering colored terminal
8127 text.")
8128 (home-page "https://pypi.python.org/pypi/colorama")
8129 (license license:bsd-3)))
8130
8131 (define-public python2-colorama
8132 (package-with-python2 python-colorama))
8133
8134 (define-public python-rsa
8135 (package
8136 (name "python-rsa")
8137 (version "3.4.2")
8138 (source
8139 (origin
8140 (method url-fetch)
8141 (uri (pypi-uri "rsa" version))
8142 (sha256
8143 (base32
8144 "1dcxvszbikgzh99ybdc7jq0zb9wspy2ds8z9mjsqiyv3q884xpr5"))))
8145 (build-system python-build-system)
8146 (propagated-inputs
8147 `(("python-pyasn1" ,python-pyasn1)))
8148 (synopsis "Pure-Python RSA implementation")
8149 (description "Python-RSA is a pure-Python RSA implementation. It supports
8150 encryption and decryption, signing and verifying signatures, and key
8151 generation according to PKCS#1 version 1.5. It can be used as a Python
8152 library as well as on the command line.")
8153 (home-page "http://stuvel.eu/rsa")
8154 (license license:asl2.0)))
8155
8156 (define-public python2-rsa
8157 (package-with-python2 python-rsa))
8158
8159 (define-public python-pluggy
8160 (package
8161 (name "python-pluggy")
8162 (version "0.3.1")
8163 (source
8164 (origin
8165 (method url-fetch)
8166 (uri (pypi-uri "pluggy" version))
8167 (sha256
8168 (base32
8169 "18qfzfm40bgx672lkg8q9x5hdh76n7vax99aank7vh2nw21wg70m"))))
8170 (build-system python-build-system)
8171 (synopsis "Plugin and hook calling mechanism for Python")
8172 (description "Pluggy is an extraction of the plugin manager as used by
8173 Pytest but stripped of Pytest specific details.")
8174 (home-page "https://pypi.python.org/pypi/pluggy")
8175 (license license:expat)))
8176
8177 (define-public python2-pluggy
8178 (package-with-python2 python-pluggy))
8179
8180 (define-public python-tox
8181 (package
8182 (name "python-tox")
8183 (version "2.3.1")
8184 (source
8185 (origin
8186 (method url-fetch)
8187 (uri (pypi-uri "tox" version))
8188 (sha256
8189 (base32
8190 "1vj73ar4rimq3fwy5r2z3jv4g9qbh8rmpmncsc00g0k310acqzxz"))))
8191 (build-system python-build-system)
8192 (arguments
8193 ;; FIXME: Tests require a newer version of pytest, but upgrading our
8194 ;; pytest breaks other packages.
8195 '(#:tests? #f))
8196 (propagated-inputs
8197 `(("python-pluggy" ,python-pluggy) ; >=0.3.0,<0.4.0
8198 ("python-py" ,python-py)
8199 ("python-virtualenv" ,python-virtualenv)))
8200 (native-inputs
8201 `(("python-pytest" ,python-pytest))) ; >= 2.3.5
8202 (home-page "http://tox.testrun.org/")
8203 (synopsis "Virtualenv-based automation of test activities")
8204 (description "Tox is a generic virtualenv management and test command line
8205 tool. It can be used to check that a package installs correctly with
8206 different Python versions and interpreters, or run tests in each type of
8207 supported environment, or act as a frontend to continuous integration
8208 servers.")
8209 (license license:expat)))
8210
8211 (define-public python2-tox
8212 (package-with-python2 python-tox))
8213
8214 (define-public python-jmespath
8215 (package
8216 (name "python-jmespath")
8217 (version "0.9.0")
8218 (source
8219 (origin
8220 (method url-fetch)
8221 (uri (pypi-uri "jmespath" version))
8222 (sha256
8223 (base32
8224 "0g9xvl69y7nr3w7ag4fsp6sm4fqf6vrqjw7504x2hzrrsh3ampq8"))))
8225 (build-system python-build-system)
8226 (synopsis "JSON Matching Expressions")
8227 (description "JMESPath (pronounced “james path”) is a Python library that
8228 allows one to declaratively specify how to extract elements from a JSON
8229 document.")
8230 (home-page "https://github.com/jmespath/jmespath.py")
8231 (license license:expat)))
8232
8233 (define-public python2-jmespath
8234 (package-with-python2 python-jmespath))
8235
8236 (define-public python-botocore
8237 (package
8238 (name "python-botocore")
8239 (version "1.4.62")
8240 (source
8241 (origin
8242 (method url-fetch)
8243 (uri (pypi-uri "botocore" version))
8244 (sha256
8245 (base32
8246 "1zxczlwqy9bl27d9bc5x99mb5mcsxm350240lp5nx7014xb311lj"))))
8247 (build-system python-build-system)
8248 (propagated-inputs
8249 `(("python-dateutil" ,python-dateutil-2)
8250 ("python-docutils" ,python-docutils)
8251 ("python-jmespath" ,python-jmespath)))
8252 (inputs
8253 `(("python-mock" ,python-mock)
8254 ("python-nose" ,python-nose)
8255 ("behave" ,behave)
8256 ("python-tox" ,python-tox)
8257 ("python-wheel" ,python-wheel)))
8258 (home-page "https://github.com/boto/botocore")
8259 (synopsis "Low-level interface to AWS")
8260 (description "Botocore is a Python library that provides a low-level
8261 interface to the Amazon Web Services (AWS) API.")
8262 (license license:asl2.0)))
8263
8264 (define-public python2-botocore
8265 (package-with-python2 python-botocore))
8266
8267 (define-public awscli
8268 (package
8269 (name "awscli")
8270 (version "1.11.5")
8271 (source
8272 (origin
8273 (method url-fetch)
8274 (uri (pypi-uri name version))
8275 (sha256
8276 (base32
8277 "0lclasm0wnayd3b8zl9l91i32nbgrhh0ncf9lksss4cv0myfwmfg"))))
8278 (build-system python-build-system)
8279 (propagated-inputs
8280 `(("python-colorama" ,python-colorama)
8281 ("python-botocore" ,python-botocore)
8282 ("python-s3transfer" ,python-s3transfer)
8283 ("python-docutils" ,python-docutils)
8284 ("python-rsa" ,python-rsa)))
8285 (inputs
8286 `(("python-mock" ,python-mock)
8287 ("python-nose" ,python-nose)
8288 ("python-sphinx" ,python-sphinx)
8289 ("python-tox" ,python-tox)
8290 ("python-wheel" ,python-wheel)))
8291 (home-page "http://aws.amazon.com/cli/")
8292 (synopsis "Command line client for AWS")
8293 (description "AWS CLI provides a unified command line interface to the
8294 Amazon Web Services (AWS) API.")
8295 (license license:asl2.0)))
8296
8297 (define-public python-hypothesis
8298 (package
8299 (name "python-hypothesis")
8300 (version "3.1.0")
8301 (source (origin
8302 (method url-fetch)
8303 (uri (pypi-uri "hypothesis" version))
8304 (sha256
8305 (base32
8306 "0qyqq9akm4vshhn8cngjc1qykcvsn7cz6dlm6njfsgpbraqrmbbw"))))
8307 (build-system python-build-system)
8308 (propagated-inputs
8309 `(("python-flake8" ,python-flake8)
8310 ("python-pytest" ,python-pytest)))
8311 (synopsis "Library for property based testing")
8312 (description "Hypothesis is a library for testing your Python code against a
8313 much larger range of examples than you would ever want to write by hand. It’s
8314 based on the Haskell library, Quickcheck, and is designed to integrate
8315 seamlessly into your existing Python unit testing work flow.")
8316 (home-page "https://github.com/DRMacIver/hypothesis")
8317 (license license:mpl2.0)
8318 (properties `((python2-variant . ,(delay python2-hypothesis))))))
8319
8320 (define-public python2-hypothesis
8321 (let ((hypothesis (package-with-python2
8322 (strip-python2-variant python-hypothesis))))
8323 (package (inherit hypothesis)
8324 (native-inputs
8325 `(("python2-enum34" ,python2-enum34))))))
8326
8327 (define-public python-pytest-subtesthack
8328 (package
8329 (name "python-pytest-subtesthack")
8330 (version "0.1.1")
8331 (source (origin
8332 (method url-fetch)
8333 (uri (pypi-uri "pytest-subtesthack" version))
8334 (sha256
8335 (base32
8336 "15kzcr5pchf3id4ikdvlv752rc0j4d912n589l4rifp8qsj19l1x"))))
8337 (build-system python-build-system)
8338 (propagated-inputs
8339 `(("python-pytest" ,python-pytest)))
8340 (synopsis "Set-up and tear-down fixtures for unit tests")
8341 (description "This plugin allows you to set up and tear down fixtures within
8342 unit test functions that use @code{py.test}. This is useful for using
8343 @command{hypothesis} inside py.test, as @command{hypothesis} will call the test
8344 function multiple times, without setting up or tearing down fixture state as is
8345 normally the case.")
8346 (home-page "https://github.com/untitaker/pytest-subtesthack/")
8347 (license license:unlicense)))
8348
8349 (define-public python2-pytest-subtesthack
8350 (package-with-python2 python-pytest-subtesthack))
8351
8352 (define-public python2-xdo
8353 (package
8354 (name "python2-xdo")
8355 (version "0.2")
8356 (source (origin
8357 (method url-fetch)
8358 (uri (string-append
8359 "http://http.debian.net/debian/pool/main/p/python-xdo/"
8360 "python-xdo_" version ".orig.tar.gz"))
8361 (sha256
8362 (base32
8363 "1kl5c1p0dyxf62plnk6fl77ycfb4whwjms16r14dxx8kn90hlqz4"))))
8364 (build-system python-build-system)
8365 (arguments
8366 `(#:python ,python-2
8367 #:tests? #f)) ; no tests provided
8368 (inputs
8369 `(("xdotool" ,xdotool)
8370 ("libX11" ,libx11)))
8371 (home-page "https://tracker.debian.org/pkg/python-xdo")
8372 (synopsis "Python library for simulating X11 keyboard/mouse input")
8373 (description "Provides bindings to libxdo for manipulating X11 via simulated
8374 input. (Note that this is mostly a legacy library; you may wish to look at
8375 python-xdo for newer bindings.)")
8376 (license license:bsd-3)))
8377
8378 (define-public python-wtforms
8379 (package
8380 (name "python-wtforms")
8381 (version "2.1")
8382 (source
8383 (origin
8384 (method url-fetch)
8385 (uri (pypi-uri "WTForms" version ".zip"))
8386 (sha256
8387 (base32
8388 "0vyl26y9cg409cfyj8rhqxazsdnd0jipgjw06civhrd53yyi1pzz"))))
8389 (build-system python-build-system)
8390 (arguments
8391 '(#:phases
8392 (modify-phases %standard-phases
8393 (add-after 'unpack 'remove-django-test
8394 ;; Don't fail the tests when the inputs for the optional tests cannot be found.
8395 (lambda _
8396 (substitute*
8397 "tests/runtests.py"
8398 (("'ext_django.tests', 'ext_sqlalchemy', 'ext_dateutil', 'locale_babel'") "")
8399 (("sys.stderr.write(\"### Disabled test '%s', dependency not found\n\" % name)") ""))
8400 #t)))))
8401 (native-inputs
8402 `(("unzip" ,unzip)))
8403 (home-page "http://wtforms.simplecodes.com/")
8404 (synopsis
8405 "Form validation and rendering library for Python web development")
8406 (description
8407 "WTForms is a flexible forms validation and rendering library
8408 for Python web development. It is very similar to the web form API
8409 available in Django, but is a standalone package.")
8410 (license license:bsd-3)))
8411
8412 (define-public python2-wtforms
8413 (package-with-python2 python-wtforms))
8414
8415 (define-public python-mako
8416 (package
8417 (name "python-mako")
8418 (version "1.0.3")
8419 (source
8420 (origin
8421 (method url-fetch)
8422 (uri (pypi-uri "Mako" version))
8423 (sha256
8424 (base32
8425 "136kcjbs0s98qkx8a418b05dfblqp0kiiqyx8vhx4rarwc7bqi3n"))))
8426 (build-system python-build-system)
8427 (propagated-inputs
8428 `(("python-markupsafe" ,python-markupsafe)))
8429 (native-inputs
8430 `(("python-mock" ,python-mock)
8431 ("python-nose" ,python-nose)))
8432 (home-page "http://www.makotemplates.org/")
8433 (synopsis "Templating language for Python")
8434 (description "Mako is a templating language for Python that compiles
8435 templates into Python modules.")
8436 (license license:expat)))
8437
8438 (define-public python2-mako
8439 (package-with-python2 python-mako))
8440
8441 (define-public python-waitress
8442 (package
8443 (name "python-waitress")
8444 (version "0.8.10")
8445 (source
8446 (origin
8447 (method url-fetch)
8448 (uri (pypi-uri "waitress" version))
8449 (sha256
8450 (base32
8451 "017n9ra6vvmq9d5sfhdzyzr1mg15x2hj2dhm4pdlw98c1ypw2h3w"))))
8452 (build-system python-build-system)
8453 (home-page "https://github.com/Pylons/waitress")
8454 (synopsis "Waitress WSGI server")
8455 (description "Waitress is meant to be a production-quality pure-Python WSGI
8456 server with very acceptable performance.")
8457 (license license:zpl2.1)))
8458
8459 (define-public python2-waitress
8460 (package-with-python2 python-waitress))
8461
8462 (define-public python-wsgiproxy2
8463 (package
8464 (name "python-wsgiproxy2")
8465 (version "0.4.2")
8466 (source
8467 (origin
8468 (method url-fetch)
8469 (uri (pypi-uri "WSGIProxy2" version ".zip"))
8470 (sha256
8471 (base32
8472 "13kf9bdxrc95y9vriaz0viry3ah11nz4rlrykcfvb8nlqpx3dcm4"))))
8473 (build-system python-build-system)
8474 (arguments
8475 '(;; Wsgiproxy2's test suite requires Restkit, which does not yet fully
8476 ;; support Python 3:
8477 ;; https://github.com/benoitc/restkit/issues/140
8478 #:tests? #f))
8479 (native-inputs
8480 `(("unzip" ,unzip)
8481 ("python-nose" ,python-nose)
8482 ("python-coverage" ,python-coverage)))
8483 (propagated-inputs
8484 `(("python-six" ,python-six)
8485 ("python-webob" ,python-webob)))
8486 (home-page
8487 "https://github.com/gawel/WSGIProxy2/")
8488 (synopsis "WSGI Proxy with various http client backends")
8489 (description "WSGI turns HTTP requests into WSGI function calls.
8490 WSGIProxy turns WSGI function calls into HTTP requests.
8491 It also includes code to sign requests and pass private data,
8492 and to spawn subprocesses to handle requests.")
8493 (license license:expat)))
8494
8495 (define-public python2-wsgiproxy2
8496 (package-with-python2 python-wsgiproxy2))
8497
8498 (define-public python-pastedeploy
8499 (package
8500 (name "python-pastedeploy")
8501 (version "1.5.2")
8502 (source
8503 (origin
8504 (method url-fetch)
8505 (uri (pypi-uri "PasteDeploy" version))
8506 (sha256
8507 (base32
8508 "1jz3m4hq8v6hyhfjz9425nd3nvn52cvbfipdcd72krjmla4qz1fm"))))
8509 (build-system python-build-system)
8510 (native-inputs
8511 `(("python-nose" ,python-nose)))
8512 ;; Note: setuptools used at runtime for pkg_resources
8513 (home-page "http://pythonpaste.org/deploy/")
8514 (synopsis
8515 "Load, configure, and compose WSGI applications and servers")
8516 (description
8517 "This tool provides code to load WSGI applications and servers from URIs;
8518 these URIs can refer to Python Eggs for INI-style configuration files. Paste
8519 Script provides commands to serve applications based on this configuration
8520 file.")
8521 (license license:expat)))
8522
8523 (define-public python2-pastedeploy
8524 (package-with-python2 python-pastedeploy))
8525
8526 (define-public python-paste
8527 (package
8528 (name "python-paste")
8529 (version "2.0.2")
8530 (source
8531 (origin
8532 (method url-fetch)
8533 (uri (pypi-uri "Paste" version))
8534 (sha256
8535 (base32
8536 "16dsv9qi0r4qsrsb6dilpq2rx0fnglvh36flzywcdnm2jg43mb5d"))
8537 (patches (search-patches "python-paste-remove-website-test.patch"
8538 "python-paste-remove-timing-test.patch"))))
8539 (build-system python-build-system)
8540 (native-inputs
8541 `(("python-nose" ,python-nose)))
8542 ;; Note: setuptools used at runtime for pkg_resources
8543 (propagated-inputs
8544 `(("python-six" ,python-six)))
8545 (arguments
8546 '(;; Tests don't pass on Python 3, but work fine on Python 2.
8547 ;; (As of 2.0.2, Python 3 support in Paste is presently a bit broken,
8548 ;; but is usable enough for the minimal amount it's used in MediaGoblin
8549 ;; still... things should be better by the next Paste release.)
8550 #:tests? #f))
8551 (home-page "http://pythonpaste.org")
8552 (synopsis
8553 "Python web development tools, focusing on WSGI")
8554 (description
8555 "Paste provides a variety of web development tools and middleware which
8556 can be nested together to build web applications. Paste's design closely
8557 follows ideas flowing from WSGI (Web Standard Gateway Interface).")
8558 (license license:expat)
8559 (properties `((python2-variant . ,(delay python2-paste))))))
8560
8561 (define-public python2-paste
8562 (let ((paste (package-with-python2
8563 (strip-python2-variant python-paste))))
8564 (package
8565 (inherit paste)
8566 (arguments
8567 ;; Tests are back for Python 2!
8568 `(#:tests? #t
8569 ,@(package-arguments paste))))))
8570
8571 (define-public python-pastescript
8572 (package
8573 (name "python-pastescript")
8574 (version "2.0.2")
8575 (source
8576 (origin
8577 (method url-fetch)
8578 (uri (pypi-uri "PasteScript" version))
8579 (sha256
8580 (base32
8581 "1h3nnhn45kf4pbcv669ik4faw04j58k8vbj1hwrc532k0nc28gy0"))))
8582 (build-system python-build-system)
8583 (native-inputs
8584 `(("python-nose" ,python-nose)))
8585 ;; Note: setuptools used at runtime for pkg_resources
8586 (propagated-inputs
8587 `(("python-paste" ,python-paste)
8588 ("python-pastedeploy" ,python-pastedeploy)))
8589 (home-page "http://pythonpaste.org/script/")
8590 (arguments
8591 '(;; Unfortunately, this requires the latest unittest2,
8592 ;; but that requires traceback2 which requires linecache2 which requires
8593 ;; unittest2. So we're skipping tests for now.
8594 ;; (Note: Apparently linetest2 only needs unittest2 for its tests,
8595 ;; so in theory we could get around this situation somehow.)
8596 #:tests? #f))
8597 (synopsis
8598 "Pluggable command line tool for serving web applications and more")
8599 (description
8600 "PasteScript is a plugin-friendly command line tool which provides a
8601 variety of features, from launching web applications to bootstrapping project
8602 layouts.")
8603 (license license:expat)))
8604
8605 (define-public python2-pastescript
8606 (package-with-python2 python-pastescript))
8607
8608 (define-public python-pyquery
8609 (package
8610 (name "python-pyquery")
8611 (version "1.2.13")
8612 (source
8613 (origin
8614 (method url-fetch)
8615 (uri (pypi-uri "pyquery" version))
8616 (sha256
8617 (base32
8618 "0j9fsisip21qv4xljsg5dmni1pgpvwrjyyhhql0glydc4bs5rjgv"))))
8619 (build-system python-build-system)
8620 (native-inputs
8621 `(("python-webob" ,python-webob)
8622 ("python-webtest" ,python-webtest)))
8623 (propagated-inputs
8624 `(("python-lxml" ,python-lxml)
8625 ("python-cssselect" ,python-cssselect)))
8626 (home-page "https://github.com/gawel/pyquery")
8627 (synopsis "Make jQuery-like queries on xml documents")
8628 (description "pyquery allows you to make jQuery queries on xml documents.
8629 The API is as much as possible the similar to jQuery. pyquery uses lxml for
8630 fast xml and html manipulation.")
8631 (license license:bsd-3)))
8632
8633 (define-public python2-pyquery
8634 (package-with-python2 python-pyquery))
8635
8636 (define-public python-webtest
8637 (package
8638 (name "python-webtest")
8639 (version "2.0.20")
8640 (source
8641 (origin
8642 (method url-fetch)
8643 (uri (pypi-uri "WebTest" version))
8644 (sha256
8645 (base32
8646 "0bv0qhdjakdsdgj4sk21gnpp8xp8bga4x03p6gjb83ihrsb7n4xv"))))
8647 (build-system python-build-system)
8648 (arguments
8649 `(;; Unfortunately we have to disable tests!
8650 ;; This release of WebTest is pinned to python-nose < 1.3,
8651 ;; but older versions of python-nose are plagued with the following
8652 ;; bug(s), which rears its ugly head during test execution:
8653 ;; https://github.com/nose-devs/nose/issues/759
8654 ;; https://github.com/nose-devs/nose/pull/811
8655 #:tests? #f))
8656 ;; Commented out code is no good, but in this case, once tests
8657 ;; are ready to be enabled again, we should put the following
8658 ;; in place:
8659 ;; (native-inputs
8660 ;; `(("python-nose" ,python-nose) ; technially < 1.3,
8661 ;; ; but see above comment
8662 ;; ("python-coverage" ,python-coverage)
8663 ;; ("python-mock" ,python-mock)
8664 ;; ("python-pastedeploy" ,python-pastedeploy)
8665 ;; ("python-wsgiproxy2" ,python-wsgiproxy2)
8666 ;; ("python-pyquery" ,python-pyquery)))
8667 (propagated-inputs
8668 `(("python-waitress" ,python-waitress)
8669 ("python-webob" ,python-webob)
8670 ("python-six" ,python-six)
8671 ("python-beautifulsoup4" ,python-beautifulsoup4)))
8672 (home-page "http://webtest.pythonpaste.org/")
8673 (synopsis "Helper to test WSGI applications")
8674 (description "Webtest allows you to test your Python web applications
8675 without starting an HTTP server. It supports anything that supports the
8676 minimum of WSGI.")
8677 (license license:expat)))
8678
8679 (define-public python2-webtest
8680 (package-with-python2 python-webtest))
8681
8682 (define-public python-anyjson
8683 (package
8684 (name "python-anyjson")
8685 (version "0.3.3")
8686 (source
8687 (origin
8688 (method url-fetch)
8689 (uri (pypi-uri "anyjson" version))
8690 (sha256
8691 (base32
8692 "1fjph4alvcscsl5d4b6qpv1yh31jy05jxi1l0xff7lws7j32v09p"))))
8693 (build-system python-build-system)
8694 (arguments
8695 `(;; We could possibly get tests working, but on Python 3 it's not so easy.
8696 ;; Very strangely, 2to3 is run *during setup.py install* (or bdist, or
8697 ;; whatever) so this transformation needs to be done before the tests
8698 ;; can be run. Maybe we could add a build step to transform beforehand
8699 ;; but it could be annoying/difficult.
8700 ;; We can enable tests for the Python 2 version, though, and do below.
8701 #:tests? #f))
8702 (home-page "http://bitbucket.org/runeh/anyjson/")
8703 (synopsis
8704 "Wraps best available JSON implementation in a common interface")
8705 (description
8706 "Anyjson loads whichever is the fastest JSON module installed
8707 and provides a uniform API regardless of which JSON implementation is used.")
8708 (license license:bsd-3)
8709 (properties `((python2-variant . ,(delay python2-anyjson))))))
8710
8711 (define-public python2-anyjson
8712 (let ((anyjson (package-with-python2
8713 (strip-python2-variant python-anyjson))))
8714 (package
8715 (inherit anyjson)
8716 (arguments `(;; Unlike the python 3 variant, we do run tests. See above!
8717 #:tests? #t
8718 ,@(package-arguments anyjson)))
8719 (native-inputs `(("python2-nose" ,python2-nose))))))
8720
8721 (define-public python-amqp
8722 (package
8723 (name "python-amqp")
8724 (version "1.4.9")
8725 (source
8726 (origin
8727 (method url-fetch)
8728 (uri (pypi-uri "amqp" version))
8729 (sha256
8730 (base32
8731 "06n6q0kxhjnbfz3vn8x9yz09lwmn1xi9d6wxp31h5jbks0b4vsid"))))
8732 (build-system python-build-system)
8733 (native-inputs
8734 `(("python-nose" ,python-nose)
8735 ("python-mock" ,python-mock)))
8736 (home-page "http://github.com/celery/py-amqp")
8737 (synopsis
8738 "Low-level AMQP client for Python (fork of amqplib)")
8739 (description
8740 "This is a fork of amqplib which was originally written by Barry Pederson.
8741 It is maintained by the Celery project, and used by kombu as a pure python
8742 alternative when librabbitmq is not available.")
8743 (license license:lgpl2.1+)
8744 (properties `((python2-variant . ,(delay python2-amqp))))))
8745
8746 (define-public python2-amqp
8747 (let ((amqp (package-with-python2
8748 (strip-python2-variant python-amqp))))
8749 (package
8750 (inherit amqp)
8751 (arguments `(;; Tries to run coverage tests with nose-cover3, which seems
8752 ;; unmaintained. Weirdly, does not do this on the python 3
8753 ;; version?
8754 #:tests? #f
8755 ,@(package-arguments amqp))))))
8756
8757 (define-public python-kombu
8758 (package
8759 (name "python-kombu")
8760 (version "3.0.37")
8761 (source
8762 (origin
8763 (method url-fetch)
8764 (uri (pypi-uri "kombu" version))
8765 (sha256
8766 (base32
8767 "0l16chb314gpq2v7fh94a22c30lcv6w3ylmhsa60bldlcq6a0r70"))))
8768 (build-system python-build-system)
8769 (native-inputs
8770 `(("python-mock" ,python-mock)
8771 ("python-nose" ,python-nose)))
8772 (propagated-inputs
8773 `(("python-anyjson" ,python-anyjson)
8774 ("python-amqp" ,python-amqp)
8775 ("python-redis" ,python-redis)))
8776 (home-page "http://kombu.readthedocs.org")
8777 (synopsis "Message passing library for Python")
8778 (description "The aim of Kombu is to make messaging in Python as easy as
8779 possible by providing an idiomatic high-level interface for the AMQ protocol,
8780 and also provide proven and tested solutions to common messaging problems.
8781 AMQP is the Advanced Message Queuing Protocol, an open standard protocol for
8782 message orientation, queuing, routing, reliability and security, for which the
8783 RabbitMQ messaging server is the most popular implementation.")
8784 (license license:bsd-3)
8785 (properties `((python2-variant . ,(delay python2-kombu))))))
8786
8787 (define-public python2-kombu
8788 (let ((kombu (package-with-python2
8789 (strip-python2-variant python-kombu))))
8790 (package
8791 (inherit kombu)
8792 (native-inputs `(("python2-unittest2" ,python2-unittest2)
8793 ,@(package-native-inputs kombu))))))
8794
8795 (define-public python-billiard
8796 (package
8797 (name "python-billiard")
8798 (version "3.3.0.23")
8799 (source
8800 (origin
8801 (method url-fetch)
8802 (uri (pypi-uri "billiard" version))
8803 (sha256
8804 (base32
8805 "02wxsc6bhqvzh8j6w758kvgqbnj14l796mvmrcms8fgfamd2lak9"))))
8806 (build-system python-build-system)
8807 (native-inputs
8808 `(("python-nose" ,python-nose)))
8809 (home-page "http://github.com/celery/billiard")
8810 (synopsis
8811 "Python multiprocessing fork with improvements and bugfixes")
8812 (description
8813 "Billiard is a fork of the Python 2.7 multiprocessing package. The
8814 multiprocessing package itself is a renamed and updated version of R Oudkerk's
8815 pyprocessing package. This standalone variant is intended to be compatible with
8816 Python 2.4 and 2.5, and will draw its fixes/improvements from python-trunk.")
8817 (license license:bsd-3)
8818 (properties `((python2-variant . ,(delay python2-billiard))))))
8819
8820 (define-public python2-billiard
8821 (let ((billiard (package-with-python2
8822 (strip-python2-variant python-billiard))))
8823 (package
8824 (inherit billiard)
8825 (native-inputs `(("python2-unittest2" ,python2-unittest2)
8826 ("python2-mock" ,python2-mock)
8827 ,@(package-native-inputs billiard))))))
8828
8829 (define-public python-celery
8830 (package
8831 (name "python-celery")
8832 (version "3.1.24")
8833 (source
8834 (origin
8835 (method url-fetch)
8836 (uri (pypi-uri "celery" version))
8837 (sha256
8838 (base32
8839 "0yh2prhdnx2dgkb67a5drj12hh2zvzx5f611p7mqqg01ydghif4r"))))
8840 (build-system python-build-system)
8841 (arguments
8842 `(#:phases
8843 (modify-phases %standard-phases
8844 ;; These tests break with Python 3.5:
8845 ;; https://github.com/celery/celery/issues/2897#issuecomment-253066295
8846 (replace 'check
8847 (lambda _
8848 (zero?
8849 (system* "nosetests" "--exclude=^test_safe_to_remove.*")))))))
8850 (native-inputs
8851 `(("python-nose" ,python-nose)))
8852 (propagated-inputs
8853 `(("python-pytz" ,python-pytz)
8854 ("python-amqp" ,python-amqp)
8855 ("python-anyjson" ,python-anyjson)
8856 ("python-billiard" ,python-billiard)
8857 ("python-kombu" ,python-kombu)))
8858 (home-page "http://celeryproject.org")
8859 (synopsis "Distributed Task Queue")
8860 (description "Celery is an asynchronous task queue/job queue based on
8861 distributed message passing. It is focused on real-time operation, but
8862 supports scheduling as well. The execution units, called tasks, are executed
8863 concurrently on a single or more worker servers using multiprocessing,
8864 Eventlet, or gevent. Tasks can execute asynchronously (in the background) or
8865 synchronously (wait until ready).")
8866 (license license:bsd-3)
8867 (properties `((python2-variant . ,(delay python2-celery))))))
8868
8869 (define-public python2-celery
8870 (let ((celery (package-with-python2
8871 (strip-python2-variant python-celery))))
8872 (package
8873 (inherit celery)
8874 (native-inputs `(("python2-unittest2" ,python2-unittest2)
8875 ("python2-mock" ,python2-mock)
8876 ,@(package-native-inputs celery))))))
8877
8878 (define-public python-translitcodec
8879 (package
8880 (name "python-translitcodec")
8881 (version "0.4.0")
8882 (source
8883 (origin
8884 (method url-fetch)
8885 (uri (pypi-uri "translitcodec" version))
8886 (sha256
8887 (base32
8888 "10x6pvblkzky1zhjs8nmx64nb9jdzxad4bxhq4iwv0j4z2aqjnki"))))
8889 (build-system python-build-system)
8890 (arguments
8891 `(#:tests? #f)) ; no tests provided
8892 (home-page
8893 "https://github.com/claudep/translitcodec")
8894 (synopsis
8895 "Unicode to 8-bit charset transliteration codec")
8896 (description
8897 "This package contains codecs for transliterating ISO 10646 texts into
8898 best-effort representations using smaller coded character sets (ASCII,
8899 ISO 8859, etc.).")
8900 (license license:expat)))
8901
8902 (define-public python2-translitcodec
8903 (package-with-python2 python-translitcodec))
8904
8905 (define-public python-editor
8906 (package
8907 (name "python-editor")
8908 (version "0.5")
8909 (source
8910 (origin
8911 (method url-fetch)
8912 (uri (pypi-uri "python-editor" version))
8913 (sha256
8914 (base32
8915 "1ypnpgvzpkbwsg4rdvy4sy51j28b5xq9v8pnkwxncn07vqz06p7n"))))
8916 (build-system python-build-system)
8917 (home-page
8918 "https://github.com/fmoo/python-editor")
8919 (synopsis
8920 "Programmatically open an editor, capture the result")
8921 (description
8922 "python-editor is a library that provides the editor module for
8923 programmatically interfacing with your system's $EDITOR.")
8924 (license license:asl2.0)))
8925
8926 (define-public python2-editor
8927 (package-with-python2 python-editor))
8928
8929 (define-public python-sphinxcontrib-programoutput
8930 (package
8931 (name "python-sphinxcontrib-programoutput")
8932 (version "0.8")
8933 (source (origin
8934 (method url-fetch)
8935 (uri (pypi-uri "sphinxcontrib-programoutput" version))
8936 (sha256
8937 (base32
8938 "098as6z1s0gb4dh5xcr1fd2vpm91zj93jzvgawspxf5s4hqs0xhp"))))
8939 (build-system python-build-system)
8940 (propagated-inputs
8941 `(("python-docutils" ,python-docutils)
8942 ("python-sphinx" ,python-sphinx)))
8943 (synopsis "Sphinx extension to include program output")
8944 (description "A Sphinx extension to literally insert the output of arbitrary
8945 commands into documents, helping you to keep your command examples up to date.")
8946 (home-page "https://github.com/lunaryorn/sphinxcontrib-programoutput")
8947 (license license:bsd-2)))
8948
8949 (define-public python2-sphinxcontrib-programoutput
8950 (package-with-python2 python-sphinxcontrib-programoutput))
8951
8952 (define-public python-sphinx-repoze-autointerface
8953 (package
8954 (name "python-sphinx-repoze-autointerface")
8955 (version "0.8")
8956 (source (origin
8957 (method url-fetch)
8958 (uri (pypi-uri "repoze.sphinx.autointerface" version))
8959 (sha256
8960 (base32
8961 "08ycivzf7bh4a1zcyp31hbyqs1b2c9r26raa3vxjwwmbfqr3iw4f"))))
8962 (build-system python-build-system)
8963 (propagated-inputs
8964 `(("python-docutils" ,python-docutils)
8965 ("python-sphinx" ,python-sphinx)
8966 ("python-zope-interface" ,python-zope-interface)))
8967 (synopsis "Auto-generate Sphinx API docs from Zope interfaces")
8968 (description "This package defines an extension for the Sphinx documentation
8969 system. The extension allows generation of API documentation by
8970 introspection of @code{zope.interface} instances in code.")
8971 (home-page "https://github.com/repoze/repoze.sphinx.autointerface")
8972 (license license:repoze)))
8973
8974 (define-public python2-sphinx-repoze-autointerface
8975 (package-with-python2 python-sphinx-repoze-autointerface))
8976
8977 (define-public python-psycopg2
8978 (package
8979 (name "python-psycopg2")
8980 (version "2.6.1")
8981 (source
8982 (origin
8983 (method url-fetch)
8984 (uri (pypi-uri "psycopg2" version))
8985 (sha256
8986 (base32
8987 "0k4hshvrwsh8yagydyxgmd0pjm29lwdxkngcq9fzfzkmpsxrmkva"))))
8988 (build-system python-build-system)
8989 (arguments
8990 ;; Tests would require a postgresql database "psycopg2_test"
8991 ;; and a running postgresql database management service.
8992 `(#:tests? #f)) ; TODO re-enable after providing a test-db.
8993 (inputs
8994 `(("postgresql" ,postgresql))) ; libpq
8995 (home-page "http://initd.org/psycopg/")
8996 (synopsis "Python PostgreSQL adapter")
8997 (description
8998 "psycopg2 is a thread-safe PostgreSQL adapter that implements DB-API 2.0. ")
8999 (license license:lgpl3+)))
9000
9001 (define-public python2-psycopg2
9002 (package-with-python2 python-psycopg2))
9003
9004 (define-public python-vobject
9005 (package
9006 (name "python-vobject")
9007 (version "0.9.2")
9008 (source (origin
9009 (method url-fetch)
9010 (uri (pypi-uri "vobject" version))
9011 (sha256
9012 (base32
9013 "1qfnwlx8qwkgr6nf5wvl6ff1r3kll53dh3z6nyp173nmlhhhqccb"))))
9014 (build-system python-build-system)
9015 (arguments
9016 '(;; The test suite relies on some non-portable Windows interfaces.
9017 #:tests? #f))
9018 (propagated-inputs
9019 `(("python-dateutil-2" ,python-dateutil-2)
9020 ("python-pyicu" ,python-pyicu)))
9021 (synopsis "Parse and generate vCard and vCalendar files")
9022 (description "Vobject is intended to be a full featured Python package for
9023 parsing and generating vCard and vCalendar files. Currently, iCalendar files
9024 are supported and well tested. vCard 3.0 files are supported, and all data
9025 should be imported, but only a few components are understood in a sophisticated
9026 way.")
9027 (home-page "http://eventable.github.io/vobject/")
9028 (license license:asl2.0)))
9029
9030 (define-public python2-vobject
9031 (package-with-python2 python-vobject))
9032
9033 (define-public python-munkres
9034 (package
9035 (name "python-munkres")
9036 (version "1.0.7")
9037 (source (origin
9038 (method url-fetch)
9039 (uri (pypi-uri "munkres" version))
9040 (sha256
9041 (base32
9042 "1i6nf45i0kkzdx6k70giybsqxz4dxsjbrkrfqgjd7znfkf25sjik"))))
9043 (build-system python-build-system)
9044 (arguments
9045 '(#:tests? #f)) ; no test suite
9046 (home-page "http://software.clapper.org/munkres/")
9047 (synopsis "Implementation of the Munkres algorithm")
9048 (description "The Munkres module provides an implementation of the Munkres
9049 algorithm (also called the Hungarian algorithm or the Kuhn-Munkres algorithm),
9050 useful for solving the Assignment Problem.")
9051 (license license:bsd-3)))
9052
9053 (define-public python2-munkres
9054 (package-with-python2 python-munkres))
9055
9056 (define-public python-flask
9057 (package
9058 (name "python-flask")
9059 (version "0.10.1")
9060 (source (origin
9061 (method url-fetch)
9062 (uri (pypi-uri "Flask" version))
9063 (sha256
9064 (base32
9065 "0wrkavjdjndknhp8ya8j850jq7a1cli4g5a93mg8nh1xz2gq50sc"))))
9066 (build-system python-build-system)
9067 (propagated-inputs
9068 `(("python-itsdangerous" ,python-itsdangerous)
9069 ("python-jinja2" ,python-jinja2)
9070 ("python-werkzeug" ,python-werkzeug)))
9071 (home-page "https://github.com/mitsuhiko/flask/")
9072 (synopsis "Microframework based on Werkzeug, Jinja2 and good intentions")
9073 (description "Flask is a micro web framework based on the Werkzeug toolkit
9074 and Jinja2 template engine. It is called a micro framework because it does not
9075 presume or force a developer to use a particular tool or library.")
9076 (license license:bsd-3)))
9077
9078 (define-public python2-flask
9079 (package-with-python2 python-flask))
9080
9081 (define-public python-cookies
9082 (package
9083 (name "python-cookies")
9084 (version "2.2.1")
9085 (source (origin
9086 (method url-fetch)
9087 (uri (pypi-uri "cookies" version))
9088 (sha256
9089 (base32
9090 "13pfndz8vbk4p2a44cfbjsypjarkrall71pgc97glk5fiiw9idnn"))))
9091 (build-system python-build-system)
9092 (arguments
9093 `(;; test are broken: https://gitlab.com/sashahart/cookies/issues/3
9094 #:tests? #f))
9095 (native-inputs
9096 `(("python-pytest" ,python2-pytest)))
9097 (synopsis "HTTP cookie parser and renderer")
9098 (description "A RFC 6265-compliant HTTP cookie parser and renderer in
9099 Python.")
9100 (home-page "https://gitlab.com/sashahart/cookies")
9101 (license license:expat)))
9102
9103 (define-public python2-cookies
9104 (package-with-python2 python-cookies))
9105
9106 (define-public python-responses
9107 (package
9108 (name "python-responses")
9109 (version "0.5.1")
9110 (source (origin
9111 (method url-fetch)
9112 (uri (pypi-uri "responses" version))
9113 (sha256
9114 (base32
9115 "1spcfxixyk9k7pk82jm6zqkwk031s95lh8q0mz7539jrb7269bcc"))))
9116 (build-system python-build-system)
9117 (arguments
9118 `(;; Test suite is not distributed:
9119 ;; https://github.com/getsentry/responses/issues/38
9120 #:tests? #f))
9121 (native-inputs
9122 `(("python-cookies" ,python-cookies)
9123 ("python-mock" ,python-mock)))
9124 (propagated-inputs
9125 `(("python-requests" ,python-requests)
9126 ("python-six" ,python-six)))
9127 (home-page "https://github.com/getsentry/responses")
9128 (synopsis "Utility for mocking out the `requests` Python library")
9129 (description "A utility library for mocking out the `requests` Python
9130 library.")
9131 (license license:asl2.0)))
9132
9133 (define-public python2-responses
9134 (package-with-python2 python-responses))
9135
9136 (define-public python-whoosh
9137 (package
9138 (name "python-whoosh")
9139 (version "2.7.4")
9140 (source
9141 (origin
9142 (method url-fetch)
9143 (uri (pypi-uri "Whoosh" version))
9144 (sha256
9145 (base32
9146 "10qsqdjpbc85fykc1vgcs8xwbgn4l2l52c8d83xf1q59pwyn79bw"))))
9147 (build-system python-build-system)
9148 (native-inputs
9149 `(("python-pytest" ,python-pytest)))
9150 (home-page "http://bitbucket.org/mchaput/whoosh")
9151 (synopsis "Full text indexing, search, and spell checking library")
9152 (description
9153 "Whoosh is a fast, pure-Python full text indexing, search, and spell
9154 checking library.")
9155 (license license:bsd-2)))
9156
9157 (define-public python2-whoosh
9158 (let ((whoosh (package-with-python2 (strip-python2-variant python-whoosh))))
9159 (package (inherit whoosh)
9160 (propagated-inputs
9161 `(("python2-backport-ssl-match-hostname"
9162 ,python2-backport-ssl-match-hostname)
9163 ,@(package-propagated-inputs whoosh))))))
9164
9165 (define-public python-pathlib
9166 (package
9167 (name "python-pathlib")
9168 (version "1.0.1")
9169 (source (origin
9170 (method url-fetch)
9171 (uri (pypi-uri "pathlib" version))
9172 (sha256
9173 (base32
9174 "17zajiw4mjbkkv6ahp3xf025qglkj0805m9s41c45zryzj6p2h39"))))
9175 (build-system python-build-system)
9176 ;; The tests depend on the internal "test" module, which does not provide
9177 ;; a stable interface.
9178 (arguments `(#:tests? #f))
9179 (home-page "https://pathlib.readthedocs.org/")
9180 (synopsis "Object-oriented file system paths")
9181 (description "Pathlib offers a set of classes to handle file system paths.
9182 It offers the following advantages over using string objects:
9183
9184 @enumerate
9185 @item No more cumbersome use of os and os.path functions. Everything can
9186 be done easily through operators, attribute accesses, and method calls.
9187 @item Embodies the semantics of different path types. For example,
9188 comparing Windows paths ignores casing.
9189 @item Well-defined semantics, eliminating any inconsistencies or
9190 ambiguities (forward vs. backward slashes, etc.).
9191 @end enumerate
9192
9193 Note: In Python 3.4, pathlib is now part of the standard library. For other
9194 Python versions please consider python-pathlib2 instead, which tracks the
9195 standard library module. This module (python-pathlib) isn't maintained
9196 anymore.")
9197 (license license:expat)))
9198
9199 (define-public python2-pathlib
9200 (package-with-python2 python-pathlib))
9201
9202 (define-public python2-pathlib2
9203 (package
9204 (name "python2-pathlib2")
9205 (version "2.1.0")
9206 (source (origin
9207 (method url-fetch)
9208 (uri (pypi-uri "pathlib2" version))
9209 (sha256
9210 (base32
9211 "0p050msg5c8d0kadv702jnfshaxrb0il765cpkgnhn6mq5hakcyy"))))
9212 (build-system python-build-system)
9213 ;; We only need the the Python 2 variant, since for Python 3 our minimum
9214 ;; version is 3.4 which already includes this package as part of the
9215 ;; standard library.
9216 (arguments
9217 `(#:python ,python-2))
9218 (native-inputs
9219 `(("python2-six" ,python2-six)))
9220 (home-page "http://pypi.python.org/pypi/pathlib2/")
9221 (synopsis "Object-oriented file system paths - backport of standard
9222 pathlib module")
9223 (description "The goal of pathlib2 is to provide a backport of standard
9224 pathlib module which tracks the standard library module, so all the newest
9225 features of the standard pathlib can be used also on older Python versions.
9226
9227 Pathlib offers a set of classes to handle file system paths. It offers the
9228 following advantages over using string objects:
9229
9230 @enumerate
9231 @item No more cumbersome use of os and os.path functions. Everything can
9232 be done easily through operators, attribute accesses, and method calls.
9233 @item Embodies the semantics of different path types. For example,
9234 comparing Windows paths ignores casing.
9235 @item Well-defined semantics, eliminating any inconsistencies or
9236 ambiguities (forward vs. backward slashes, etc.).
9237 @end enumerate")
9238 (license license:expat)))
9239
9240 (define-public python-jellyfish
9241 (package
9242 (name "python-jellyfish")
9243 (version "0.5.3")
9244 (source (origin
9245 (method url-fetch)
9246 (uri (pypi-uri "jellyfish" version))
9247 (sha256
9248 (base32
9249 "12bxh8cy9xmvyrjz7aw159nd5pyvb645rkvw4r6bvm4xbvs8gd07"))))
9250 (build-system python-build-system)
9251 (native-inputs
9252 `(("python-pytest" ,python-pytest)))
9253 (home-page "https://github.com/jamesturk/jellyfish")
9254 (synopsis "Approximate and phonetic matching of strings")
9255 (description "Jellyfish uses a variety of string comparison and phonetic
9256 encoding algorithms to do fuzzy string matching.")
9257 (license license:bsd-2)
9258 (properties `((python2-variant . ,(delay python2-jellyfish))))))
9259
9260 (define-public python2-jellyfish
9261 (let ((jellyfish (package-with-python2
9262 (strip-python2-variant python-jellyfish))))
9263 (package (inherit jellyfish)
9264 (native-inputs `(("python2-unicodecsv" ,python2-unicodecsv)
9265 ,@(package-native-inputs jellyfish))))))
9266
9267 (define-public python2-unicodecsv
9268 (package
9269 (name "python2-unicodecsv")
9270 (version "0.14.1")
9271 (source (origin
9272 (method url-fetch)
9273 ;; The test suite is not included in the PyPi release.
9274 ;; https://github.com/jdunck/python-unicodecsv/issues/19
9275 (uri (string-append "https://github.com/jdunck/python-unicodecsv/"
9276 "archive/" version ".tar.gz"))
9277 (file-name (string-append name "-" version ".tar.gz"))
9278 (sha256
9279 (base32
9280 "087nqanfcyp6mlfbbr5lva5f3w6iz1bybls9xlrb8icmc474wh4w"))))
9281 (build-system python-build-system)
9282 (arguments
9283 `(;; It supports Python 3, but Python 3 can already do Unicode CSV.
9284 #:python ,python-2))
9285 (native-inputs
9286 `(("python2-unittest2" ,python2-unittest2)))
9287 (home-page "https://github.com/jdunck/python-unicodecsv")
9288 (synopsis "Unicode CSV module for Python 2")
9289 (description "Unicodecsv is a drop-in replacement for Python 2.7's CSV
9290 module, adding support for Unicode strings.")
9291 (license license:bsd-2)))
9292
9293 (define-public python-rarfile
9294 (package
9295 (name "python-rarfile")
9296 (version "2.7")
9297 (source (origin
9298 (method url-fetch)
9299 (uri (pypi-uri "rarfile" version))
9300 (sha256
9301 (base32
9302 "0d8n1dlpiz7av8dmbp0vclrwl9cnxizr4f2c9xvj1h5nvn480527"))
9303 ;; https://github.com/markokr/rarfile/pull/17/
9304 (patches (search-patches "python-rarfile-fix-tests.patch"))))
9305 (build-system python-build-system)
9306 (arguments
9307 '(#:phases
9308 (modify-phases %standard-phases
9309 (replace 'check
9310 ;; Many tests fail, but the installation proceeds.
9311 (lambda _ (zero? (system* "make" "-C" "test" "test")))))))
9312 (native-inputs
9313 `(("which" ,which))) ; required for tests
9314 (propagated-inputs
9315 `(("libarchive" ,libarchive)))
9316 (home-page "https://github.com/markokr/rarfile")
9317 (synopsis "RAR archive reader for Python")
9318 (description "This is Python module for RAR archive reading. The interface
9319 is made as zipfile like as possible.")
9320 (license license:isc)))
9321
9322 (define-public python2-rarfile
9323 (package-with-python2 python-rarfile))
9324
9325 (define-public python-magic
9326 (package
9327 (name "python-magic")
9328 (version "0.4.3")
9329 (source
9330 (origin
9331 (method url-fetch)
9332 (uri (string-append "https://github.com/ahupp/python-magic/archive/"
9333 version ".tar.gz"))
9334 (sha256
9335 (base32
9336 "17bgy92i7sb021f2s4mw1dcvpm6p1mi9jihridwy1pyn8mzvpjgk"))
9337 (file-name (string-append name "-" version "-checkout"))))
9338 (build-system python-build-system)
9339 (arguments
9340 ;; The tests are unreliable, so don't run them. The tests fail
9341 ;; under Python3 because they were written for Python2 and
9342 ;; contain import statements that do not work in Python3. One of
9343 ;; the tests fails under Python2 because its assertions are
9344 ;; overly stringent; it relies on comparing output strings which
9345 ;; are brittle and can change depending on the version of
9346 ;; libmagic being used and the system on which the test is
9347 ;; running. In my case, under GuixSD 0.10.0, only one test
9348 ;; failed, and it seems to have failed only because the version
9349 ;; of libmagic that is packaged in Guix outputs a slightly
9350 ;; different (but not wrong) string than the one that the test
9351 ;; expected.
9352 '(#:tests? #f
9353 #:phases (modify-phases %standard-phases
9354 ;; Replace a specific method call with a hard-coded
9355 ;; path to the necessary libmagic.so file in the
9356 ;; store. If we don't do this, then the method call
9357 ;; will fail to find the libmagic.so file, which in
9358 ;; turn will cause any application using
9359 ;; python-magic to fail.
9360 (add-before 'build 'hard-code-path-to-libmagic
9361 (lambda* (#:key inputs #:allow-other-keys)
9362 (let ((file (assoc-ref inputs "file")))
9363 (substitute* "magic.py"
9364 (("ctypes.util.find_library\\('magic'\\)")
9365 (string-append "'" file "/lib/libmagic.so'")))
9366 #t)))
9367 (add-before 'install 'disable-egg-compression
9368 (lambda _
9369 (let ((port (open-file "setup.cfg" "a")))
9370 (display "\n[easy_install]\nzip_ok = 0\n"
9371 port)
9372 (close-port port)
9373 #t))))))
9374 (inputs
9375 ;; python-magic needs to be able to find libmagic.so.
9376 `(("file" ,file)))
9377 (home-page "https://github.com/ahupp/python-magic")
9378 (synopsis "File type identification using libmagic")
9379 (description
9380 "This module uses ctypes to access the libmagic file type
9381 identification library. It makes use of the local magic database and
9382 supports both textual and MIME-type output. Note that this module and
9383 the python-file module both provide a \"magic.py\" file; these two
9384 modules, which are different and were developed separately, both serve
9385 the same purpose: to provide Python bindings for libmagic.")
9386 (license license:expat)))
9387
9388 (define-public python2-magic
9389 (package-with-python2 python-magic))
9390
9391 (define-public python2-s3cmd
9392 (package
9393 (name "python2-s3cmd")
9394 (version "1.6.1")
9395 (source
9396 (origin
9397 (method url-fetch)
9398 (uri (string-append "mirror://sourceforge/s3tools/s3cmd/" version "/"
9399 "s3cmd-" version ".tar.gz"))
9400 (sha256
9401 (base32
9402 "0ki1rzhm5icvi9ry5jswi4b22yqwyj0d2wsqsgilwx6qhi7pjxa6"))))
9403 (build-system python-build-system)
9404 (arguments
9405 ;; s3cmd is written for python2 only and contains no tests.
9406 `(#:python ,python-2
9407 #:tests? #f))
9408 (propagated-inputs
9409 `(("python2-dateutil" ,python2-dateutil)
9410 ;; The python-file package also provides a magic.py module.
9411 ;; This is an unfortunate state of affairs; however, s3cmd
9412 ;; fails to install if it cannot find specifically the
9413 ;; python-magic package. Thus we include it, instead of using
9414 ;; python-file. Ironically, s3cmd sometimes works better
9415 ;; without libmagic bindings at all:
9416 ;; https://github.com/s3tools/s3cmd/issues/198
9417 ("python2-magic" ,python2-magic)))
9418 (home-page "http://s3tools.org/s3cmd")
9419 (synopsis "Command line tool for S3-compatible storage services")
9420 (description
9421 "S3cmd is a command line tool for uploading, retrieving and managing data
9422 in storage services that are compatible with the Amazon Simple Storage
9423 Service (S3) protocol, including S3 itself. It supports rsync-like backup,
9424 GnuPG encryption, and more. It also supports management of Amazon's
9425 CloudFront content delivery network.")
9426 (license license:gpl2+)))
9427
9428 (define-public python-pkgconfig
9429 (package
9430 (name "python-pkgconfig")
9431 (version "1.1.0")
9432 (source
9433 (origin
9434 (method url-fetch)
9435 (uri (pypi-uri "pkgconfig" version))
9436 (sha256
9437 (base32
9438 "1pw0kmvc57sjmaxi6c54fqsnihqj6hvhc9y1vaz36axafzqam7bh"))))
9439 (build-system python-build-system)
9440 (native-inputs
9441 `(("python-nose" ,python-nose)))
9442 (inputs
9443 `(("pkg-config" ,pkg-config)))
9444 (arguments
9445 `(;; Tests fail with "ValueError: _type_ 'v' not supported" on Python 3,
9446 ;; and on Python 2 they need the dl module deprecated since Python 2.6.
9447 #:tests? #f
9448 ;; Hard-code the path to pkg-config.
9449 #:phases
9450 (modify-phases %standard-phases
9451 (add-before
9452 'build 'patch
9453 (lambda _
9454 (substitute* "pkgconfig/pkgconfig.py"
9455 (("cmd = 'pkg-config")
9456 (string-append "cmd = '" (which "pkg-config"))))
9457 #t)))))
9458 (home-page "http://github.com/matze/pkgconfig")
9459 (synopsis "Python interface for pkg-config")
9460 (description "This module provides a Python interface to pkg-config. It
9461 can be used to find all pkg-config packages, check if a package exists,
9462 check if a package meets certain version requirements, query CFLAGS and
9463 LDFLAGS and parse the output to build extensions with setup.py.")
9464 (license license:expat)))
9465
9466 (define-public python2-pkgconfig
9467 (package-with-python2 python-pkgconfig))
9468
9469 (define-public python-bz2file
9470 (package
9471 (name "python-bz2file")
9472 (version "0.98")
9473 (source
9474 (origin
9475 (method url-fetch)
9476 (uri (pypi-uri "bz2file" version))
9477 (sha256
9478 (base32
9479 "126s53fkpx04f33a829yqqk8fj4png3qwg4m66cvlmhmwc8zihb4"))))
9480 (build-system python-build-system)
9481 (arguments
9482 `(#:tests? #f)) ; Tests use deprecated python modules.
9483 (home-page "https://github.com/nvawda/bz2file")
9484 (synopsis "Read and write bzip2-compressed files")
9485 (description
9486 "Bz2file is a Python library for reading and writing bzip2-compressed
9487 files. It contains a drop-in replacement for the I/O interface in the
9488 standard library's @code{bz2} module, including features from the latest
9489 development version of CPython that are not available in older releases.")
9490 (license license:asl2.0)
9491 (properties `((python2-variant . ,(delay python2-bz2file))))))
9492
9493 (define-public python2-bz2file
9494 (let ((base (package-with-python2
9495 (strip-python2-variant python-bz2file))))
9496 (package
9497 (inherit base)
9498 (arguments
9499 `(#:python ,python-2
9500 #:phases
9501 (modify-phases %standard-phases
9502 ;; 'python setup.py test' does not work as of 0.98.
9503 ;; There is only the one test file, so we run it directly.
9504 (replace 'check
9505 (lambda _ (zero? (system* "python"
9506 "test_bz2file.py"))))))))))
9507
9508 (define-public python-future
9509 (package
9510 (name "python-future")
9511 (version "0.15.2")
9512 (source
9513 (origin
9514 (method url-fetch)
9515 (uri (pypi-uri "future" version))
9516 (sha256
9517 (base32
9518 "15wvcfzssc68xqnqi1dq4fhd0848hwi9jn42hxyvlqna40zijfrx"))))
9519 (build-system python-build-system)
9520 ;; Many tests connect to the network or are otherwise flawed.
9521 ;; https://github.com/PythonCharmers/python-future/issues/210
9522 (arguments
9523 `(#:tests? #f))
9524 (home-page "http://python-future.org")
9525 (synopsis "Single-source support for Python 3 and 2")
9526 (description
9527 "@code{python-future} is the missing compatibility layer between Python 2 and
9528 Python 3. It allows you to use a single, clean Python 3.x-compatible codebase
9529 to support both Python 2 and Python 3 with minimal overhead.")
9530 (license license:expat)))
9531
9532 (define-public python2-future
9533 (package-with-python2 python-future))
9534
9535 (define-public python-cysignals
9536 (package
9537 (name "python-cysignals")
9538 (version "1.1.0")
9539 (source
9540 (origin
9541 (method url-fetch)
9542 (uri (pypi-uri "cysignals" version ".tar.bz2"))
9543 (sha256
9544 (base32
9545 "14cbyd9znlz6cxy1s3g6v6dv5jj45hn27pywkidd9b1zanaysqc6"))))
9546 (build-system python-build-system)
9547 (native-inputs
9548 `(("python-cython" ,python-cython)
9549 ("python-sphinx" ,python-sphinx)))
9550 (inputs
9551 `(("pari-gp" ,pari-gp)))
9552 (arguments
9553 `(#:modules ((guix build python-build-system)
9554 ((guix build gnu-build-system) #:prefix gnu:)
9555 (guix build utils))
9556 ;; FIXME: Tests are executed after installation and currently fail
9557 ;; when not installing into standard locations; the author is working
9558 ;; on a fix.
9559 #:tests? #f
9560 #:phases
9561 (modify-phases %standard-phases
9562 (add-before
9563 'build 'configure
9564 (assoc-ref gnu:%standard-phases 'configure)))))
9565 (home-page
9566 "https://github.com/sagemath/cysignals")
9567 (synopsis
9568 "Handling of interrupts and signals for Cython")
9569 (description
9570 "The cysignals package provides mechanisms to handle interrupts (and
9571 other signals and errors) in Cython code, using two related approaches,
9572 for mixed Cython/Python code or external C libraries and pure Cython code,
9573 respectively.")
9574 (license license:lgpl3+)))
9575
9576 (define-public python2-cysignals
9577 (package-with-python2 python-cysignals))
9578
9579 (define-public python2-shedskin
9580 (package
9581 (name "python2-shedskin")
9582 (version "0.9.4")
9583 (source
9584 (origin
9585 (method url-fetch)
9586 (uri (string-append "https://github.com/shedskin/shedskin/"
9587 "releases/download/v" version
9588 "/shedskin-" version ".tgz"))
9589 (sha256
9590 (base32
9591 "0nzwrzgw1ga8rw6f0ryq7zr9kkiavd1cqz5hzxkcbicl1dk7kz41"))))
9592 (build-system python-build-system)
9593 (arguments
9594 `(#:python ,python-2
9595 #:phases (modify-phases %standard-phases
9596 (add-after 'unpack 'fix-resulting-include-libs
9597 (lambda* (#:key inputs #:allow-other-keys)
9598 (let ((libgc (assoc-ref inputs "libgc"))
9599 (pcre (assoc-ref inputs "pcre")))
9600 (substitute* "shedskin/makefile.py"
9601 (("variable == 'CCFLAGS':[ ]*")
9602 (string-append "variable == 'CCFLAGS':\n"
9603 " line += ' -I " pcre "/include"
9604 " -I " libgc "/include'"))
9605 (("variable == 'LFLAGS':[ ]*")
9606 (string-append "variable == 'LFLAGS':\n"
9607 " line += ' -L" pcre "/lib"
9608 " -L " libgc "/lib'")))
9609 #t))))))
9610 (inputs `(("pcre" ,pcre)
9611 ("libgc" ,libgc)))
9612 (home-page "https://shedskin.github.io/")
9613 (synopsis "Experimental Python-2 to C++ Compiler")
9614 (description (string-append "This is an experimental compiler for a subset of
9615 Python. It generates C++ code and a Makefile."))
9616 (license (list license:gpl3 license:bsd-3 license:expat))))
9617
9618 (define-public python2-rope
9619 (package
9620 (name "python2-rope")
9621 (version "0.10.3")
9622 (source
9623 (origin
9624 (method url-fetch)
9625 (uri (pypi-uri "rope" version))
9626 (sha256
9627 (base32
9628 "18k5znhpwvrfck3yp0jmhd5j8r0f0s8bk1zh5yhs2cfgmfhbwigb"))))
9629 (arguments
9630 ;; Rope is currently python-2 only.
9631 ;; https://github.com/python-rope/rope/issues/57
9632 `(#:python ,python-2))
9633 (build-system python-build-system)
9634 (native-inputs
9635 `(("python2-unittest2" ,python2-unittest2)))
9636 (home-page "https://github.com/python-rope/rope")
9637 (synopsis "Refactoring library for Python")
9638 (description "Rope is a refactoring library for Python. It facilitates
9639 the renaming, moving and extracting of attributes, functions, modules, fields
9640 and parameters in Python 2 source code. These refactorings can also be applied
9641 to occurences in strings and comments.")
9642 (license license:gpl2)))
9643
9644 (define-public python-py3status
9645 (package
9646 (name "python-py3status")
9647 (version "3.1")
9648 (source
9649 (origin
9650 (method url-fetch)
9651 (uri (pypi-uri "py3status" version))
9652 (sha256
9653 (base32
9654 "0i283z1pivmir61z8kbiycigc94l61v33ygzkhczf1ifq7cppyds"))))
9655 (build-system python-build-system)
9656 (home-page "https://github.com/ultrabug/py3status")
9657 (synopsis "Extensible i3status wrapper written in Python")
9658 (description "py3status is an i3status wrapper which extends i3status
9659 functionality in a modular way, allowing you to extend your panel with your
9660 own code, responding to click events and updating clock every second.")
9661 (license license:bsd-3)))
9662
9663 (define-public python-tblib
9664 (package
9665 (name "python-tblib")
9666 (version "1.3.0")
9667 (source (origin
9668 (method url-fetch)
9669 (uri (pypi-uri "tblib" version))
9670 (sha256 (base32
9671 "02iahfkfa927hb4jq2bak36ldihwapzacfiq5lyxg8llwn98a1yi"))))
9672 (build-system python-build-system)
9673 (arguments
9674 `(#:phases
9675 (modify-phases %standard-phases
9676 (replace 'check
9677 (lambda _
9678 ;; Upstream runs tests after installation and the package itself
9679 ;; resides in a subdirectory. Extend PYTHONPATH so it will be
9680 ;; found.
9681 (setenv "PYTHONPATH"
9682 (string-append (getcwd) "/build/lib:"
9683 (getenv "PYTHONPATH")))
9684 (zero? (system* "py.test" "-vv" "tests" "README.rst")))))))
9685 (native-inputs
9686 `(("python-pytest" ,python-pytest)
9687 ("python-six" ,python-six)))
9688 (home-page "https://github.com/ionelmc/python-tblib")
9689 (synopsis "Traceback serialization library")
9690 (description
9691 "Traceback serialization allows you to:
9692
9693 @enumerate
9694 @item Pickle tracebacks and raise exceptions with pickled tracebacks in
9695 different processes. This allows better error handling when running code over
9696 multiple processes (imagine multiprocessing, billiard, futures, celery etc).
9697
9698 @item Parse traceback strings and raise with the parsed tracebacks.
9699 @end itemize")
9700 (license license:bsd-3)))
9701
9702 (define-public python2-tblib
9703 (package-with-python2 python-tblib))
9704
9705 (define-public python-sqlparse
9706 (package
9707 (name "python-sqlparse")
9708 (version "0.1.19")
9709 (source (origin
9710 (method url-fetch)
9711 (uri (pypi-uri "sqlparse" version))
9712 (sha256
9713 (base32
9714 "1s2fvaxgh9kqzrd6iwy5h7i61ckn05plx9np13zby93z3hdbx5nq"))))
9715 (build-system python-build-system)
9716 (arguments
9717 `(#:phases
9718 (modify-phases %standard-phases
9719 (replace 'check
9720 (lambda* _
9721 ;; setup.py-integrated 2to3 only affects the build files, but
9722 ;; py.test is using the source files. So we need to convert them
9723 ;; manually.
9724 (when (zero? (system* "python3"))
9725 (system* "2to3" "--no-diff" "-wn" "sqlparse" "tests"))
9726 (zero? (system* "py.test")))))))
9727 (native-inputs
9728 `(("python-pytest" ,python-pytest)))
9729 (home-page "https://github.com/andialbrecht/sqlparse")
9730 (synopsis "Non-validating SQL parser")
9731 (description "Sqlparse is a non-validating SQL parser for Python. It
9732 provides support for parsing, splitting and formatting SQL statements.")
9733 (license license:bsd-3)))
9734
9735 (define-public python2-sqlparse
9736 (package-with-python2 python-sqlparse))
9737
9738 (define-public python-greenlet
9739 (package
9740 (name "python-greenlet")
9741 (version "0.4.9")
9742 (source (origin
9743 (method url-fetch)
9744 (uri (pypi-uri "greenlet" version))
9745 (sha256
9746 (base32
9747 "04h0m54dyqg49vyarq26mry6kbivnpl47rnmmrk9qn8wpfxviybr"))))
9748 (build-system python-build-system)
9749 (home-page "https://greenlet.readthedocs.io/")
9750 (synopsis "Lightweight in-process concurrent programming")
9751 (description
9752 "Greenlet package is a spin-off of Stackless, a version of CPython
9753 that supports micro-threads called \"tasklets\". Tasklets run
9754 pseudo-concurrently (typically in a single or a few OS-level threads) and
9755 are synchronized with data exchanges on \"channels\".")
9756 (license (list license:psfl license:expat))))
9757
9758 (define-public python2-greenlet
9759 (package-with-python2 python-greenlet))
9760
9761 (define-public python-gevent
9762 (package
9763 (name "python-gevent")
9764 (version "1.1.1")
9765 (source (origin
9766 (method url-fetch)
9767 (uri (pypi-uri "gevent" version))
9768 (sha256
9769 (base32
9770 "1smf3kvidpdiyi2c81alal74p2zm0clrm6xbyy6y1k9a3f2vkrbf"))
9771 (modules '((guix build utils)))
9772 (snippet
9773 '(begin
9774 ;; unbunding libev and c-ares
9775 (for-each delete-file-recursively '("libev" "c-ares"))
9776 ;; fixing testsuite
9777 (call-with-output-file "greentest/__init__.py" noop)
9778 (substitute* "greentest/testrunner.py"
9779 (("import util") "from . import util")
9780 (("from util import log") "from .util import log"))))))
9781 (build-system python-build-system)
9782 (propagated-inputs
9783 `(("python-greenlet" ,python-greenlet)))
9784 (native-inputs
9785 `(("python-six" ,python-six)))
9786 (inputs
9787 `(("c-ares" ,c-ares)
9788 ("libev" ,libev)))
9789 (home-page "http://www.gevent.org/")
9790 (synopsis "Coroutine-based network library")
9791 (description
9792 "gevent is a coroutine-based Python networking library that uses greenlet
9793 to provide a high-level synchronous API on top of the libev event loop.")
9794 (license license:expat)))
9795
9796 (define-public python2-gevent
9797 (package-with-python2 python-gevent))
9798
9799 (define-public python-twisted
9800 (package
9801 (name "python-twisted")
9802 (version "16.2.0")
9803 (source (origin
9804 (method url-fetch)
9805 (uri (pypi-uri "Twisted" version ".tar.bz2"))
9806 (sha256
9807 (base32
9808 "0ydxrp9myw1mvsz3qfzx5579y5llmqa82pxvqchgp5syczffi450"))))
9809 (build-system python-build-system)
9810 (propagated-inputs
9811 `(("python-zope-interface" ,python-zope-interface)))
9812 (home-page "https://twistedmatrix.com/")
9813 (synopsis "Asynchronous networking framework written in Python")
9814 (description
9815 "Twisted is an extensible framework for Python programming, with special
9816 focus on event-based network programming and multiprotocol integration.")
9817 (license license:expat)))
9818
9819 (define-public python2-twisted
9820 (package-with-python2 python-twisted))
9821
9822 (define-public python-pika
9823 (package
9824 (name "python-pika")
9825 (version "0.10.0")
9826 (source
9827 (origin
9828 (method url-fetch)
9829 (uri (pypi-uri "pika" version))
9830 (sha256
9831 (base32
9832 "0nb4h08di432lv7dy2v9kpwgk0w92f24sqc2hw2s9vwr5b8v8xvj"))))
9833 (build-system python-build-system)
9834 (native-inputs
9835 `(("python-pyev" ,python-pyev)
9836 ("python-tornado" ,python-tornado)
9837 ("python-twisted" ,python-twisted)))
9838 (home-page "https://pika.readthedocs.org")
9839 (synopsis "Pure Python AMQP Client Library")
9840 (description
9841 "Pika is a pure-Python implementation of the AMQP (Advanced Message Queuing
9842 Protocol) 0-9-1 protocol that tries to stay fairly independent of the underlying
9843 network support library.")
9844 (license license:bsd-3)))
9845
9846 (define-public python2-pika
9847 (package-with-python2 python-pika))
9848
9849 (define-public python-ply
9850 (package
9851 (name "python-ply")
9852 (version "3.8")
9853 (source
9854 (origin
9855 (method url-fetch)
9856 (uri (string-append
9857 "https://pypi.python.org/packages/"
9858 "96/e0/430fcdb6b3ef1ae534d231397bee7e9304be14a47a267e82ebcb3323d0b5"
9859 "/ply-" version ".tar.gz"))
9860 (sha256
9861 (base32
9862 "1f70ipynmiy09k6px2j7v4w5cdrc21za3xs2k6f1bsvb0bzvvlg7"))))
9863 (build-system python-build-system)
9864 (home-page "http://www.dabeaz.com/ply/")
9865 (synopsis "Python Lex & Yacc")
9866 (description "PLY is a @code{lex}/@code{yacc} implemented purely in Python.
9867 It uses LR parsing and does extensive error checking.")
9868 (license license:bsd-3)))
9869
9870 (define-public python2-ply
9871 (package-with-python2 python-ply))
9872
9873 (define-public python-tabulate
9874 (package
9875 (name "python-tabulate")
9876 (version "0.7.5")
9877 (source (origin
9878 (method url-fetch)
9879 (uri (pypi-uri "tabulate" version))
9880 (sha256
9881 (base32
9882 "03l1r7ddd1a0j2snv1yd0hlnghjad3fg1an1jr8936ksv75slwch"))
9883 ;; Fix tests
9884 (modules '((guix build utils)))
9885 (snippet '(substitute* '("test/test_cli.py"
9886 "test/test_input.py"
9887 "test/test_output.py"
9888 "test/test_regression.py")
9889 (("from common") "from nose.tools")))))
9890 (build-system python-build-system)
9891 (native-inputs
9892 `(;; For testing
9893 ("python-nose" ,python-nose)))
9894 (home-page "https://bitbucket.org/astanin/python-tabulate")
9895 (synopsis "Pretty-print tabular data")
9896 (description
9897 "Tabulate is a library and command-line utility to pretty-print tabular
9898 data in Python.")
9899 (license license:expat)))
9900
9901 (define-public python2-tabulate
9902 (package-with-python2 python-tabulate))
9903
9904 (define-public python-kazoo
9905 (package
9906 (name "python-kazoo")
9907 (version "2.2.1")
9908 (source
9909 (origin
9910 (method url-fetch)
9911 (uri (pypi-uri "kazoo" version))
9912 (sha256
9913 (base32
9914 "10pb864if9qi2pq9lfb9m8f7z7ss6rml80gf1d9h64lap5crjnjj"))))
9915 (build-system python-build-system)
9916 (arguments '(#:tests? #f)) ; XXX: needs zookeeper
9917 (propagated-inputs
9918 `(("python-six" ,python-six)))
9919 (home-page "https://kazoo.readthedocs.org")
9920 (synopsis "High-level Zookeeper client library")
9921 (description
9922 "Kazoo is a Python client library for the Apache Zookeeper distributed
9923 application service. It is designed to be easy to use and to avoid common
9924 programming errors.")
9925 (license license:asl2.0)))
9926
9927 (define-public python2-kazoo
9928 (package-with-python2 python-kazoo))
9929
9930 (define-public python-pykafka
9931 (package
9932 (name "python-pykafka")
9933 (version "2.4.0")
9934 (source (origin
9935 (method url-fetch)
9936 (uri (string-append
9937 "https://pypi.python.org/packages/8b/3e/"
9938 "384eeff406b06315738b62483fd2126c6e4f544167116b17cc04ea7d2a59/"
9939 "pykafka-" version ".tar.gz"))
9940 (sha256
9941 (base32
9942 "1id6sr159p6aa13bxcqyr9gln8sqg1l0ddzns5iws8kk5q1p5cfv"))))
9943 (build-system python-build-system)
9944 (arguments '(#:tests? #f)) ; XXX: needs zookeeper, kafka, etc.
9945 (propagated-inputs
9946 `(("python-gevent" ,python-gevent)
9947 ("python-kazoo" ,python-kazoo)
9948 ("python-tabulate" ,python-tabulate)))
9949 (inputs
9950 `(("librdkafka" ,librdkafka)))
9951 (home-page "https://pykafka.readthedocs.io/")
9952 (synopsis "Apache Kafka client for Python")
9953 (description
9954 "PyKafka is a client for the Apache Kafka distributed messaging system.
9955 It includes Python implementations of Kafka producers and consumers, which
9956 are optionally backed by a C extension built on librdkafka.")
9957 (license license:asl2.0)))
9958
9959 (define-public python2-pykafka
9960 (package-with-python2 python-pykafka))
9961
9962 (define-public python-wcwidth
9963 (package
9964 (name "python-wcwidth")
9965 (version "0.1.6")
9966 (source
9967 (origin
9968 (method url-fetch)
9969 (uri (string-append
9970 "https://pypi.python.org/packages/"
9971 "c2/d1/7689293086a8d5320025080cde0e3155b94ae0a7496fb89a3fbaa92c354a/"
9972 "wcwidth-" version ".tar.gz"))
9973 (sha256
9974 (base32
9975 "02wjrpf001gjdjsaxxbzcwfg19crlk2dbddayrfc2v06f53yrcyw"))))
9976 (build-system python-build-system)
9977 (home-page "https://github.com/jquast/wcwidth")
9978 (synopsis "Measure number of terminal column cells of wide-character codes")
9979 (description "Wcwidth measures the number of terminal column cells of
9980 wide-character codes. It is useful for those implementing a terminal emulator,
9981 or programs that carefully produce output to be interpreted by one. It is a
9982 Python implementation of the @code{wcwidth} and @code{wcswidth} C functions
9983 specified in POSIX.1-2001 and POSIX.1-2008.")
9984 (license license:expat)))
9985
9986 (define-public python2-wcwidth
9987 (package-with-python2 python-wcwidth))
9988
9989 (define-public python2-jsonrpclib
9990 (package
9991 (name "python2-jsonrpclib")
9992 (version "0.1.7")
9993 (source (origin
9994 (method url-fetch)
9995 (uri (string-append
9996 "https://pypi.python.org/packages/source/j/jsonrpclib/"
9997 "jsonrpclib-" version ".tar.gz"))
9998 (sha256
9999 (base32
10000 "02vgirw2bcgvpcxhv5hf3yvvb4h5wzd1lpjx8na5psdmaffj6l3z"))))
10001 (build-system python-build-system)
10002 (arguments
10003 `(#:tests? #f
10004 #:python ,python-2))
10005 (home-page "https://github.com/joshmarshall/jsonrpclib/")
10006 (synopsis "Implementation of JSON-RPC specification for Python")
10007 (description
10008 "This library is an implementation of the JSON-RPC specification.
10009 It supports both the original 1.0 specification, as well as the
10010 new (proposed) 2.0 spec, which includes batch submission, keyword arguments,
10011 etc.")
10012 (license license:asl2.0)))
10013
10014 (define-public python-chai
10015 (package
10016 (name "python-chai")
10017 (version "1.1.1")
10018 (source (origin
10019 (method url-fetch)
10020 (uri (pypi-uri "chai" version))
10021 (sha256
10022 (base32
10023 "016kf3irrclpkpvcm7q0gmkfibq7jgy30a9v73pp42bq9h9a32bl"))))
10024 (build-system python-build-system)
10025 (home-page "https://github.com/agoragames/chai")
10026 (synopsis "Mocking framework for Python")
10027 (description
10028 "Chai provides an api for mocking, stubbing and spying your python
10029 objects, patterned after the Mocha library for Ruby.")
10030 (license license:bsd-3)))
10031
10032 (define-public python2-chai
10033 (package-with-python2 python-chai))
10034
10035 (define-public python-arrow
10036 (package
10037 (name "python-arrow")
10038 (version "0.8.0")
10039 (source (origin
10040 (method url-fetch)
10041 (uri (pypi-uri "arrow" version))
10042 (sha256
10043 (base32
10044 "1bz7hkdgpqcjs866y58z8jywpy7al0f4rxdr00bh2l5qddyw245j"))))
10045 (build-system python-build-system)
10046 (native-inputs
10047 `(;; For testing
10048 ("python-chai" ,python-chai)
10049 ("python-simplejson" ,python-simplejson)))
10050 (propagated-inputs
10051 `(("python-dateutil" ,python-dateutil-2)))
10052 (home-page "https://github.com/crsmithdev/arrow/")
10053 (synopsis "Dates and times for Python")
10054 (description
10055 "Arrow is a Python library to creating, manipulating, formatting and
10056 converting dates, times, and timestamps. It implements and updates the
10057 datetime type.")
10058 (license license:asl2.0)))
10059
10060 (define-public python2-arrow
10061 (package-with-python2 python-arrow))
10062
10063 (define-public python-inflection
10064 (package
10065 (name "python-inflection")
10066 (version "0.3.1")
10067 (source
10068 (origin (method url-fetch)
10069 (uri (pypi-uri "inflection" version))
10070 (sha256
10071 (base32
10072 "1jhnxgnw8y3mbzjssixh6qkc7a3afc4fygajhqrqalnilyvpzshq"))))
10073 (build-system python-build-system)
10074 (home-page "http://github.com/jpvanhal/inflection")
10075 (synopsis "Python string transformation library")
10076 (description
10077 "Inflection is a string transformation library. It singularizes
10078 and pluralizes English words, and transforms strings from CamelCase to
10079 underscored string.")
10080 (license license:expat)))
10081
10082 (define-public python2-inflection
10083 (package-with-python2 python-inflection))
10084
10085 (define-public python-pylev
10086 (package
10087 (name "python-pylev")
10088 (version "1.3.0")
10089 (source (origin
10090 (method url-fetch)
10091 (uri (pypi-uri "pylev" version))
10092 (sha256
10093 (base32
10094 "1hz1x9blsbxya1y9nnhnwwdnqmakxi9mc0jkwj0rn6b1h44i0f86"))))
10095 (build-system python-build-system)
10096 (home-page "http://github.com/toastdriven/pylev")
10097 (synopsis "Levenshtein distance implementation in Python")
10098 (description "Pure Python Levenshtein implementation, based off the
10099 Wikipedia code samples at
10100 @url{http://en.wikipedia.org/wiki/Levenshtein_distance}.")
10101 (license license:bsd-3)))
10102
10103 (define-public python2-pylev
10104 (package-with-python2 python-pylev))
10105
10106 (define-public python-cleo
10107 (package
10108 (name "python-cleo")
10109 (version "0.4.1")
10110 (source (origin
10111 (method url-fetch)
10112 (uri (pypi-uri "cleo" version))
10113 (sha256
10114 (base32
10115 "1k2dcl6mqpn5bljyl6w42rqyd9mb3y9kh2mg7m2x3kfjwvg0rpva"))))
10116 (build-system python-build-system)
10117 (native-inputs
10118 `(;; For testing
10119 ("python-mock" ,python-mock)
10120 ("python-pytest" ,python-pytest)))
10121 (propagated-inputs
10122 `(("python-psutil" ,python-psutil)
10123 ("python-pylev" ,python-pylev)))
10124 (home-page "https://github.com/sdispater/cleo")
10125 (synopsis "Command-line arguments library for Python")
10126 (description
10127 "Cleo allows you to create command-line commands with signature in
10128 docstring and colored output.")
10129 (license license:expat)))
10130
10131 (define-public python2-cleo
10132 (package-with-python2 python-cleo))
10133
10134 (define-public python-lazy-object-proxy
10135 (package
10136 (name "python-lazy-object-proxy")
10137 (version "1.2.2")
10138 (source (origin
10139 (method url-fetch)
10140 (uri (pypi-uri "lazy-object-proxy" version))
10141 (sha256
10142 (base32
10143 "0s22aqqkdscyh8sjspyyax7qa1aiz8p4midrnyf39717fhfczm6x"))))
10144 (build-system python-build-system)
10145 (home-page "https://github.com/ionelmc/python-lazy-object-proxy")
10146 (synopsis "Lazy object proxy for python")
10147 (description
10148 "Lazy object proxy is an object that wraps a callable but defers the call
10149 until the object is actually required, and caches the result of said call.")
10150 (license license:bsd-2)))
10151
10152 (define-public python2-lazy-object-proxy
10153 (package-with-python2 python-lazy-object-proxy))
10154
10155 (define-public python-dnspython
10156 (package
10157 (name "python-dnspython")
10158 (version "1.15.0")
10159 (source (origin
10160 (method url-fetch)
10161 (uri (string-append "http://www.dnspython.org/kits/"
10162 version "/dnspython-" version ".tar.gz"))
10163 (sha256
10164 (base32
10165 "0jr4v2pd90i6l1xxbss2m05psbjaxvyvvvpq44wycijpfgjqln8i"))))
10166 (build-system python-build-system)
10167 (arguments '(#:tests? #f)) ; XXX: requires internet access
10168 (home-page "http://www.dnspython.org")
10169 (synopsis "DNS toolkit for Python")
10170 (description
10171 "dnspython is a DNS toolkit for Python. It supports almost all record
10172 types. It can be used for queries, zone transfers, and dynamic updates.
10173 It supports TSIG authenticated messages and EDNS0.")
10174 (license license:expat)))
10175
10176 (define-public python2-dnspython
10177 (package-with-python2 python-dnspython))
10178
10179 (define-public python-email-validator
10180 (package
10181 (name "python-email-validator")
10182 (version "1.0.1")
10183 (source
10184 (origin (method url-fetch)
10185 (uri (pypi-uri "email_validator" version))
10186 (sha256
10187 (base32
10188 "0mn8jg5h8ifl8w6a6m0hq8kbk0mzw9vm054qfamkn89b3npz52qw"))))
10189 (build-system python-build-system)
10190 (arguments
10191 '(#:phases
10192 (modify-phases %standard-phases
10193 (add-before 'build 'use-dnspython
10194 (lambda _
10195 (substitute* "setup.py"
10196 (("dnspython3") "dnspython"))
10197 #t)))))
10198 (propagated-inputs
10199 `(("python-dnspython" ,python-dnspython)
10200 ("python-idna" ,python-idna)))
10201 (home-page "https://github.com/JoshData/python-email-validator")
10202 (synopsis "Email address validation library for Python")
10203 (description
10204 "This library validates email address syntax and deliverability.")
10205 (license license:cc0)))
10206
10207 (define-public python2-email-validator
10208 (package-with-python2 python-email-validator))
10209
10210 (define-public python-ukpostcodeparser
10211 (package
10212 (name "python-ukpostcodeparser")
10213 (version "1.0.3")
10214 (source (origin
10215 (method url-fetch)
10216 (uri (pypi-uri "UkPostcodeParser" version))
10217 (sha256
10218 (base32
10219 "1jwg9z4rz51mcka1821rwgycsd0mcicyp1kiwjfa2kvg8bm9p2qd"))))
10220 (build-system python-build-system)
10221 (home-page "https://github.com/hamstah/ukpostcodeparser")
10222 (synopsis "UK Postcode parser for Python")
10223 (description
10224 "This library provides the @code{parse_uk_postcode} function for
10225 parsing UK postcodes.")
10226 (license license:expat)))
10227
10228 (define-public python2-ukpostcodeparser
10229 (package-with-python2 python-ukpostcodeparser))
10230
10231 (define-public python-fake-factory
10232 (package
10233 (name "python-fake-factory")
10234 (version "0.7.2")
10235 (source (origin
10236 (method url-fetch)
10237 (uri (pypi-uri "fake-factory" version))
10238 (sha256
10239 (base32
10240 "0vs0dkmg0dlaxf8w6q2i3k0i03gmp56ablldv7ci9x3nbadkn71g"))))
10241 (build-system python-build-system)
10242 (native-inputs
10243 `(;; For testing
10244 ("python-email-validator" ,python-email-validator)
10245 ("python-mock" ,python-mock)
10246 ("python-ukpostcodeparser" ,python-ukpostcodeparser)))
10247 (propagated-inputs
10248 `(("python-dateutil" ,python-dateutil-2)
10249 ("python-six" ,python-six)))
10250 (home-page "https://github.com/joke2k/faker")
10251 (synopsis "Python package that generates fake data")
10252 (description
10253 "Faker is a Python package that generates fake data such as names,
10254 addresses, and phone numbers.")
10255 (license license:expat)
10256 (properties `((python2-variant . ,(delay python2-fake-factory))))))
10257
10258 (define-public python2-fake-factory
10259 (let ((base (package-with-python2 (strip-python2-variant
10260 python-fake-factory))))
10261 (package
10262 (inherit base)
10263 (propagated-inputs
10264 `(("python2-ipaddress" ,python2-ipaddress)
10265 ,@(package-propagated-inputs base))))))
10266
10267 (define-public python-pyaml
10268 (package
10269 (name "python-pyaml")
10270 (version "15.8.2")
10271 (source (origin
10272 (method url-fetch)
10273 (uri (pypi-uri "pyaml" version))
10274 (sha256
10275 (base32
10276 "1f5m28vkh4ksq3d80d8mmd2z8wxvc3mgy2pmrv2751dm2xgznm4w"))))
10277 (build-system python-build-system)
10278 (propagated-inputs
10279 `(("python-pyyaml" ,python-pyyaml)))
10280 (home-page "https://github.com/mk-fg/pretty-yaml")
10281 (synopsis "YAML pretty-print library for Python")
10282 (description
10283 "pyaml is a PyYAML based python module to produce pretty and readable
10284 YAML-serialized data.")
10285 (license (license:non-copyleft "http://www.wtfpl.net/txt/copying/"))))
10286
10287 (define-public python2-pyaml
10288 (package-with-python2 python-pyaml))
10289
10290 (define-public python-flexmock
10291 (package
10292 (name "python-flexmock")
10293 (version "0.10.2")
10294 (source (origin
10295 (method url-fetch)
10296 (uri (pypi-uri "flexmock" version))
10297 (sha256
10298 (base32
10299 "0arc6njvs6i9v9hgvzk5m50296g7zy5m9d7pyb43vdsdgxrci5gy"))))
10300 (build-system python-build-system)
10301 (home-page "https://flexmock.readthedocs.org")
10302 (synopsis "Testing library for Python")
10303 (description
10304 "flexmock is a testing library for Python that makes it easy to create
10305 mocks, stubs and fakes.")
10306 (license license:bsd-3)))
10307
10308 (define-public python2-flexmock
10309 (package-with-python2 python-flexmock))
10310
10311 (define-public python-orator
10312 (package
10313 (name "python-orator")
10314 (version "0.8.2")
10315 (source (origin
10316 (method url-fetch)
10317 (uri (pypi-uri "orator" version))
10318 (sha256
10319 (base32
10320 "1li49irsqha17nrda4nsb48biyy0rarp9pphf0jpqwm5zr8hv569"))))
10321 (build-system python-build-system)
10322 (arguments '(#:tests? #f)) ; no tests
10323 (propagated-inputs
10324 `(("python-arrow" ,python-arrow)
10325 ("python-blinker" ,python-blinker)
10326 ("python-cleo" ,python-cleo)
10327 ("python-fake-factory" ,python-fake-factory)
10328 ("python-inflection" ,python-inflection)
10329 ("python-lazy-object-proxy" ,python-lazy-object-proxy)
10330 ("python-pyaml" ,python-pyaml)
10331 ("python-simplejson" ,python-simplejson)
10332 ("python-wrapt" ,python-wrapt)))
10333 (home-page "https://orator-orm.com/")
10334 (synopsis "ActiveRecord ORM for Python")
10335 (description
10336 "Orator provides a simple ActiveRecord-like Object Relational Mapping
10337 implementation for Python.")
10338 (license license:expat)
10339 (properties `((python2-variant . ,(delay python2-orator))))))
10340
10341 (define-public python2-orator
10342 (let ((base (package-with-python2 (strip-python2-variant python-orator))))
10343 (package
10344 (inherit base)
10345 (propagated-inputs
10346 `(("python2-ipaddress" ,python2-ipaddress)
10347 ,@(package-propagated-inputs base))))))
10348
10349 (define-public python-prompt-toolkit
10350 (package
10351 (name "python-prompt-toolkit")
10352 (version "1.0.7")
10353 (source
10354 (origin
10355 (method url-fetch)
10356 (uri (pypi-uri "prompt_toolkit" version ".tar.gz"))
10357 (sha256
10358 (base32
10359 "1vyjd0b7wciv55i19l44zy0adx8q7ss79lhy2r9d1rwz2y4822zg"))))
10360 (build-system python-build-system)
10361 (arguments
10362 '(#:tests? #f)) ; The test suite uses some Windows-specific data types.
10363 (propagated-inputs
10364 `(("python-wcwidth" ,python-wcwidth)
10365 ("python-pygments" ,python-pygments)))
10366 (native-inputs `(("python-six" ,python-six)))
10367 (home-page "https://github.com/jonathanslenders/python-prompt-toolkit")
10368 (synopsis "Library for building command line interfaces in Python")
10369 (description
10370 "Prompt-Toolkit is a library for building interactive command line
10371 interfaces in Python. It's like GNU Readline but it also features syntax
10372 highlighting while typing, out-of-the-box multi-line input editing, advanced
10373 code completion, incremental search, support for Chinese double-width
10374 characters, mouse support, and auto suggestions.")
10375 (license license:bsd-3)))
10376
10377 (define-public python2-prompt-toolkit
10378 (package-with-python2 python-prompt-toolkit))
10379
10380 (define-public python-jedi
10381 (package
10382 (name "python-jedi")
10383 (version "0.9.0")
10384 (source
10385 (origin
10386 (method url-fetch)
10387 (uri (pypi-uri "jedi" version))
10388 (sha256
10389 (base32
10390 "0c8x962ynpx001fdvp07m2q5jk4igkxbj3rmnydavphvlgxijk1v"))))
10391 (build-system python-build-system)
10392 (home-page "https://github.com/davidhalter/jedi")
10393 (synopsis
10394 "Autocompletion for Python that can be used for text editors")
10395 (description
10396 "Jedi is an autocompletion tool for Python that can be used for text editors.")
10397 (license license:expat)))
10398
10399 (define-public python2-jedi
10400 (package-with-python2 python-jedi))
10401
10402 (define-public ptpython
10403 (package
10404 (name "ptpython")
10405 (version "0.34")
10406 (source (origin
10407 (method url-fetch)
10408 (uri (pypi-uri "ptpython" version))
10409 (sha256
10410 (base32
10411 "1mmbiyzf0n8hm7z2a562x7w5cbl6jc0zsk6vp40q1z4cyblv1k13"))))
10412 (build-system python-build-system)
10413 (propagated-inputs
10414 `(("python-docopt" ,python-docopt)
10415 ("python-jedi" ,python-jedi)
10416 ("python-prompt-toolkit" ,python-prompt-toolkit)
10417 ("python-pygments" ,python-pygments)))
10418 (home-page "https://github.com/jonathanslenders/ptpython")
10419 (synopsis "Python Read-Eval-Print-Loop with nice IDE-like features")
10420 (description
10421 "ptpython is a Python read-eval-print loop with IDE-like features.
10422 It supports syntax highlighting, multiline editing, autocompletion, mouse,
10423 color schemes, bracketed paste, Vi and Emacs keybindings, Chinese characters
10424 etc.")
10425 (license license:bsd-3)
10426 (properties `((python2-variant . ,(delay ptpython-2))))))
10427
10428 (define-public ptpython-2
10429 (let ((base (package-with-python2 (strip-python2-variant ptpython))))
10430 (package
10431 (inherit base)
10432 (name "ptpython2"))))
10433
10434 (define-public python-requests-oauthlib
10435 (package
10436 (name "python-requests-oauthlib")
10437 (version "0.6.2")
10438 (source
10439 (origin
10440 (method url-fetch)
10441 (uri (pypi-uri "requests-oauthlib" version))
10442 (sha256
10443 (base32
10444 "0ykff67sjcl227c23g0rxzfx34rr5bf21kwv0z3zmgk0lfmch7hn"))))
10445 (build-system python-build-system)
10446 (arguments
10447 `(#:phases
10448 (modify-phases %standard-phases
10449 ;; removes tests that require network access
10450 (add-before 'check 'pre-check
10451 (lambda _
10452 (delete-file "tests/test_core.py")
10453 #t)))))
10454 (native-inputs
10455 `(("python-requests-mock" ,python-requests-mock)
10456 ("python-mock" ,python-mock)))
10457 (propagated-inputs
10458 `(("python-oauthlib" ,python-oauthlib)
10459 ("python-requests" ,python-requests)))
10460 (home-page
10461 "https://github.com/requests/requests-oauthlib")
10462 (synopsis
10463 "OAuthlib authentication support for Requests")
10464 (description
10465 "Requests-OAuthlib uses the Python Requests and OAuthlib libraries to
10466 provide an easy-to-use Python interface for building OAuth1 and OAuth2 clients.")
10467 (license license:isc)))
10468
10469 (define-public python2-requests-oauthlib
10470 (package-with-python2 python-requests-oauthlib))
10471
10472 (define-public python-stem
10473 (package
10474 (name "python-stem")
10475 (version "1.4.1b")
10476 (source
10477 (origin
10478 (method url-fetch)
10479 (uri (pypi-uri "stem" version ".tar.bz2"))
10480 (sha256
10481 (base32
10482 "09a3amp1y351nwz088ckiibbp666qi2lxwkyknavswfm400s0ns7"))))
10483 (build-system python-build-system)
10484 (arguments
10485 `(#:phases
10486 (modify-phases %standard-phases
10487 (replace 'check
10488 (lambda _
10489 (zero? (system* "./run_tests.py" "--unit")))))))
10490 (native-inputs
10491 `(("python-mock" ,python-mock)
10492 ("python-pep8" ,python-pep8)
10493 ("python-pyflakes" ,python-pyflakes)))
10494 (propagated-inputs
10495 `(("python-pycrypto" ,python-pycrypto)))
10496 (home-page "https://stem.torproject.org/")
10497 (synopsis
10498 "Python controller library that allows applications to interact with Tor")
10499 (description
10500 "Stem is a Python controller library for Tor. With it you can use Tor's
10501 control protocol to script against the Tor process and read descriptor data
10502 relays publish about themselves.")
10503 (license license:lgpl3)))
10504
10505 (define-public python2-stem
10506 (package-with-python2 python-stem))
10507
10508 (define-public python-pyserial
10509 (package
10510 (name "python-pyserial")
10511 (version "3.1.1")
10512 (source
10513 (origin
10514 (method url-fetch)
10515 (uri (pypi-uri "pyserial" version))
10516 (sha256
10517 (base32
10518 "0k1nfdrxxkdlv4zgaqsdv8li0pj3gbh2pyxw8q2bsg6f9490amyn"))))
10519 (build-system python-build-system)
10520 (home-page
10521 "https://github.com/pyserial/pyserial")
10522 (synopsis "Python Serial Port Bindings")
10523 (description "@code{pyserial} provide serial port bindings for Python. It
10524 supports different byte sizes, stop bits, parity and flow control with RTS/CTS
10525 and/or Xon/Xoff. The port is accessed in RAW mode.")
10526 (license license:bsd-3)))
10527
10528 (define-public python2-pyserial
10529 (package-with-python2 python-pyserial))
10530
10531 (define-public python-kivy
10532 (package
10533 (name "python-kivy")
10534 (version "1.9.1")
10535 (source
10536 (origin
10537 (method url-fetch)
10538 (uri (pypi-uri "kivy" version))
10539 (file-name (string-append name "-" version ".tar.gz"))
10540 (sha256
10541 (base32
10542 "0zk3g1j1z0lzcm9d0k1lprrs95zr8n8k5pdg3p5qlsn26jz4bg19"))))
10543 (build-system python-build-system)
10544 (arguments
10545 `(#:tests? #f ; Tests require many optional packages
10546 #:phases
10547 (modify-phases %standard-phases
10548 (replace 'build (lambda _ (zero? (system* "make" "force"))))
10549 (add-after 'patch-generated-file-shebangs 'set-sdl-paths
10550 (lambda* (#:key inputs #:allow-other-keys)
10551 (setenv "KIVY_SDL2_PATH"
10552 (string-append (assoc-ref inputs "sdl-union")
10553 "/include/SDL2"))
10554 #t)))))
10555 (native-inputs
10556 `(("pkg-config" ,pkg-config)
10557 ("python-cython" ,python-cython)))
10558 (inputs
10559 `(("gstreamer" ,gstreamer)
10560 ("mesa" ,mesa)
10561 ("sdl-union"
10562 ,(sdl-union (list sdl2 sdl2-image sdl2-mixer sdl2-ttf)))))
10563 (home-page "http://kivy.org")
10564 (synopsis
10565 "Multitouch application framework")
10566 (description
10567 "A software library for rapid development of
10568 hardware-accelerated multitouch applications.")
10569 (license license:expat)))
10570
10571 (define-public python2-kivy
10572 (package-with-python2 python-kivy))
10573
10574 (define-public python-kivy-next
10575 (let ((commit "a988c5e7a47da56263ff39514264a3de516ef2fe")
10576 (revision "1"))
10577 (package (inherit python-kivy)
10578 (name "python-kivy-next")
10579 (version (string-append "1.9.1-" revision "."
10580 (string-take commit 7)))
10581 (source
10582 (origin
10583 (method git-fetch)
10584 (uri (git-reference
10585 (url "https://github.com/kivy/kivy")
10586 (commit commit)))
10587 (file-name (string-append name "-" version "-checkout"))
10588 (sha256
10589 (base32
10590 "0jk92b4a8l7blkvkgkjihk171s0dfnq582cckff5srwc8kal5m0p")))))))
10591
10592 (define-public python2-kivy-next
10593 (package-with-python2 python-kivy-next))
10594
10595 (define-public python-binaryornot
10596 (package
10597 (name "python-binaryornot")
10598 (version "0.4.0")
10599 (source (origin
10600 (method url-fetch)
10601 (uri (pypi-uri "binaryornot" version))
10602 (sha256
10603 (base32
10604 "1j4f51dxic39mdwf6alj7gd769wy6mhk916v031wjali51xkh3xb"))))
10605 (build-system python-build-system)
10606 (propagated-inputs
10607 `(("python-chardet" ,python-chardet)
10608 ("python-hypothesis" ,python-hypothesis)))
10609 (home-page "https://github.com/audreyr/binaryornot")
10610 (synopsis "Package to check if a file is binary or text")
10611 (description "Ultra-lightweight pure Python package to check if a file is
10612 binary or text.")
10613 (license license:bsd-3)
10614 (properties `((python2-variant . ,(delay python2-binaryornot))))))
10615
10616 (define-public python2-binaryornot
10617 (let ((base (package-with-python2 (strip-python2-variant python-binaryornot))))
10618 (package (inherit base)
10619 (propagated-inputs
10620 `(("python2-enum34" ,python2-enum34)
10621 ,@(package-propagated-inputs base))))))
10622
10623 (define-public python-nltk
10624 (package
10625 (name "python-nltk")
10626 (version "3.2.1")
10627 (source (origin
10628 (method url-fetch)
10629 (uri (pypi-uri "nltk" version))
10630 (sha256
10631 (base32
10632 "0skxbhnymwlspjkzga0f7x1hg3y50fwpfghs8g8k7fh6f4nknlym"))))
10633 (build-system python-build-system)
10634 (arguments
10635 '(;; The tests require some extra resources to be downloaded.
10636 ;; TODO Try packaging these resources.
10637 #:tests? #f))
10638 (home-page "http://nltk.org/")
10639 (synopsis "Natural Language Toolkit")
10640 (description "It provides interfaces to over 50 corpora and lexical
10641 resources such as WordNet, along with a suite of text processing libraries
10642 for classification, tokenization, stemming, tagging, parsing, and semantic
10643 reasoning, wrappers for natural language processing libraries.")
10644 (license license:asl2.0)))
10645
10646 (define-public python2-nltk
10647 (package-with-python2 python-nltk))
10648
10649 (define-public python-pymongo
10650 (package
10651 (name "python-pymongo")
10652 (version "3.3.0")
10653 (source (origin
10654 (method url-fetch)
10655 (uri (pypi-uri "pymongo" version))
10656 (sha256
10657 (base32
10658 "07mra6w86wjqy4lx5fvimidjhhfzd562gfjn8grsnbv2q8pk0i9x"))))
10659 (build-system python-build-system)
10660 (propagated-inputs
10661 `(("python-certifi" ,python-certifi)))
10662 (home-page "http://github.com/mongodb/mongo-python-driver")
10663 (synopsis "Python driver for MongoDB")
10664 (description "Python driver for MongoDB.")
10665 (license license:asl2.0)))
10666
10667 (define-public python2-pymongo
10668 (package-with-python2 python-pymongo))
10669
10670 (define-public python-sh
10671 (package
10672 (name "python-sh")
10673 (version "1.11")
10674 (source (origin
10675 (method url-fetch)
10676 (uri (pypi-uri "sh" version))
10677 (sha256
10678 (base32
10679 "192r0mpv6dmkysjzhc43ddffiwb5g7c76bgr1mb1z2xz9awbj3sr"))))
10680 (build-system python-build-system)
10681 (arguments
10682 `(#:tests? #f)) ; no tests
10683 (home-page "https://github.com/amoffat/sh")
10684 (synopsis "Python subprocess interface")
10685 (description "Abstracts process invocation by providing a function
10686 interface for programs.")
10687 (license license:expat)))
10688
10689 (define-public python2-sh
10690 (package-with-python2 python-sh))
10691
10692 (define-public python-consul
10693 (package
10694 (name "python-consul")
10695 (version "0.6.1")
10696 (source
10697 (origin
10698 (method url-fetch)
10699 (uri (pypi-uri "python-consul" version))
10700 (sha256
10701 (base32
10702 "0rfyxcy4cr3x848vhx876ifalxd5ghq6l5x813m49h4vq2d4jiq8"))))
10703 (build-system python-build-system)
10704 (native-inputs
10705 `(("python-pytest" ,python-pytest)
10706 ("python-requests" ,python-requests)
10707 ("python-six" ,python-six)))
10708 (home-page "https://github.com/cablehead/python-consul")
10709 (synopsis "Python client for Consul")
10710 (description
10711 "Python client for @url{http://www.consul.io/,Consul}, a tool for service
10712 discovery, monitoring and configuration.")
10713 (license license:expat)))
10714
10715 (define-public python2-consul
10716 (package-with-python2 python-consul))
10717
10718 (define-public python-schematics
10719 (package
10720 (name "python-schematics")
10721 (version "1.1.1")
10722 (source
10723 (origin
10724 (method url-fetch)
10725 (uri (string-append
10726 "https://github.com/schematics/schematics/archive/v" version ".tar.gz"))
10727 (file-name (string-append name "-" version ".tar.gz"))
10728 (sha256
10729 (base32
10730 "19v1i69bf3bzarfxmbv0v6ivpcn758x3shvbiy9l2hy0lvqwnp6l"))))
10731 (build-system python-build-system)
10732 (propagated-inputs
10733 `(("python-six" ,python-six)))
10734 (arguments
10735 `(#:tests? #f)) ; requires a bunch of not very nice packages with fixed
10736 ; version requirements (eg python-coveralls)
10737 (home-page "https://github.com/schematics/schematics")
10738 (synopsis "Python Data Structures for Humans")
10739 (description "Python Data Structures for Humans.")
10740 (license license:bsd-3)))
10741
10742 (define-public python2-schematics
10743 (package-with-python2 python-schematics))
10744
10745 (define-public python-publicsuffix
10746 (package
10747 (name "python-publicsuffix")
10748 (version "1.1.0")
10749 (source (origin
10750 (method url-fetch)
10751 (uri (pypi-uri "publicsuffix" version))
10752 (sha256
10753 (base32
10754 "1adx520249z2cy7ykwjr1k190mn2888wqn9jf8qm27ly4qymjxxf"))))
10755 (build-system python-build-system)
10756 (arguments
10757 `(#:tests? #f)) ; tests use the internet
10758 (home-page "https://www.tablix.org/~avian/git/publicsuffix.git")
10759 (synopsis "Get suffix for a domain name")
10760 (description "Get a public suffix for a domain name using the Public Suffix
10761 List.")
10762 (license license:expat)))
10763
10764 (define-public python2-publicsuffix
10765 (package-with-python2 python-publicsuffix))
10766
10767 (define-public python-publicsuffix2
10768 (package
10769 (name "python-publicsuffix2")
10770 (version "2.20160621")
10771 (source
10772 (origin
10773 (method url-fetch)
10774 (uri (pypi-uri "publicsuffix2" version ".tar.bz2"))
10775 (sha256
10776 (base32
10777 "06lx603gdwad5hc3hmn763ngq0rq9bzz1ni3ga72nzk5n872arkd"))))
10778 (build-system python-build-system)
10779 (arguments
10780 '(#:tests? #f)) ; The test suite requires network access.
10781 (home-page "https://github.com/pombredanne/python-publicsuffix2")
10782 (synopsis "Get a public suffix for a domain name using the Public Suffix List")
10783 (description "Get a public suffix for a domain name using the Public Suffix
10784 List. Forked from and using the same API as the publicsuffix package.")
10785 (license (list license:expat license:mpl2.0))))
10786
10787 (define-public python2-publicsuffix2
10788 (package-with-python2 python-publicsuffix2))
10789
10790 (define-public python-url
10791 (package
10792 (name "python-url")
10793 (version "0.2.0")
10794 (source (origin
10795 (method url-fetch)
10796 (uri (pypi-uri "url" version))
10797 (sha256
10798 (base32
10799 "0v879yadcz9qxfl41ak6wkga1kimp9cflla9ddz03hjjvgkqy5ki"))))
10800 (build-system python-build-system)
10801 (propagated-inputs
10802 `(("python-publicsuffix" ,python-publicsuffix)))
10803 (native-inputs
10804 `(("python-coverage" ,python-coverage)
10805 ("python-nose" ,python-nose)))
10806 (arguments
10807 `(#:tests? #f)) ; FIXME: tests fail with "ImportError: No module named 'tests'"
10808 (home-page "http://github.com/seomoz/url-py")
10809 (synopsis "URL Parsing")
10810 (description "Library for parsing urls.")
10811 (license license:expat)
10812 (properties `((python2-variant . ,(delay python2-url))))))
10813
10814 (define-public python2-url
10815 (let ((base (package-with-python2 (strip-python2-variant python-url))))
10816 (package (inherit base)
10817 (propagated-inputs
10818 `(("python2-publicsuffix" ,python2-publicsuffix))))))
10819
10820 (define-public python-freezegun
10821 (package
10822 (name "python-freezegun")
10823 (version "0.3.7")
10824 (source
10825 (origin
10826 (method url-fetch)
10827 (uri (pypi-uri "freezegun" version))
10828 (sha256
10829 (base32
10830 "14l19x06v5jkq4rdwbmfyw4x9lrjb2300afrk21r1ash7y1y9a0w"))))
10831 (build-system python-build-system)
10832 (native-inputs
10833 `(("python-mock" ,python-mock)
10834 ("python-nose" ,python-nose)
10835 ("python-coverage" ,python-coverage)
10836 ("python-dateutil-2" ,python-dateutil-2)))
10837 (propagated-inputs
10838 `(("python-six" ,python-six)))
10839 (arguments
10840 `(#:phases (modify-phases %standard-phases
10841 ;; The tests are normally executed via `make test`, but the PyPi
10842 ;; package does not include the Makefile.
10843 (replace 'check
10844 (lambda _
10845 (zero? (system* "nosetests" "./tests/")))))))
10846 (home-page "https://github.com/spulec/freezegun")
10847 (synopsis "Test utility for mocking the datetime module")
10848 (description
10849 "FreezeGun is a library that allows your python tests to travel through
10850 time by mocking the datetime module.")
10851 (license license:asl2.0)))
10852
10853 (define-public python2-freezegun
10854 (package-with-python2 python-freezegun))
10855
10856
10857 (define-public python-odfpy
10858 (package
10859 (name "python-odfpy")
10860 (version "1.3.3")
10861 (source (origin
10862 (method url-fetch)
10863 (uri (pypi-uri "odfpy" version))
10864 (sha256
10865 (base32
10866 "1a6ms0w9zfhhkqhvrnynwwbxrivw6hgjc0s5k7j06npc7rq0blxw"))))
10867 (arguments
10868 `(#:modules ((srfi srfi-1)
10869 (guix build python-build-system)
10870 (guix build utils))
10871 #:phases
10872 (modify-phases %standard-phases
10873 (replace 'check
10874 ;; The test runner invokes python2 and python3 for test*.py.
10875 ;; To avoid having both in inputs, we replicate it here.
10876 (lambda _
10877 (every (lambda (test-file)
10878 (zero? (system* "python" test-file)))
10879 (find-files "tests" "^test.*\\.py$")))))))
10880 (build-system python-build-system)
10881 (home-page "https://github.com/eea/odfpy")
10882 (synopsis "Python API and tools to manipulate OpenDocument files")
10883 (description "Collection of libraries and utility programs written in
10884 Python to manipulate OpenDocument 1.2 files.")
10885 (license
10886 ;; The software is mainly dual GPL2+ and ASL2.0, but includes a
10887 ;; number of files with other licenses.
10888 (list license:gpl2+ license:asl2.0 license:lgpl2.1+ license:cc-by-sa3.0))))
10889
10890 (define-public python2-odfpy
10891 (package-with-python2 python-odfpy))
10892
10893 (define-public python-cachecontrol
10894 (package
10895 (name "python-cachecontrol")
10896 (version "0.11.6")
10897 (source
10898 (origin
10899 (method url-fetch)
10900 ;; Pypi does not have tests.
10901 (uri (string-append
10902 "https://github.com/ionrock/cachecontrol/archive/v"
10903 version ".tar.gz"))
10904 (file-name (string-append name "-" version ".tar.gz"))
10905 (sha256
10906 (base32
10907 "0yj60d0f69a2l8p7y86k4zhzzm6rnxpq74sfl240pry9l0lfw2vw"))))
10908 (build-system python-build-system)
10909 (arguments
10910 `(#:phases
10911 (modify-phases %standard-phases
10912 (replace 'check
10913 (lambda _
10914 ;; Drop test that requires internet access.
10915 (delete-file "tests/test_regressions.py")
10916 (setenv "PYTHONPATH"
10917 (string-append (getcwd) "/build/lib:"
10918 (getenv "PYTHONPATH")))
10919 (zero? (system* "py.test" "-vv")))))))
10920 (native-inputs
10921 `(("python-pytest" ,python-pytest)
10922 ("python-redis" ,python-redis)
10923 ("python-webtest" ,python-webtest)
10924 ("python-mock" ,python-mock)))
10925 (propagated-inputs
10926 `(("python-requests" ,python-requests)
10927 ("python-lockfile" ,python-lockfile)))
10928 (home-page "https://github.com/ionrock/cachecontrol")
10929 (synopsis "The httplib2 caching algorithms for use with requests")
10930 (description "CacheControl is a port of the caching algorithms in
10931 @code{httplib2} for use with @code{requests} session objects.")
10932 (license license:asl2.0)))
10933
10934 (define-public python2-cachecontrol
10935 (package-with-python2 python-cachecontrol))
10936
10937 (define-public python-lit
10938 (package
10939 (name "python-lit")
10940 (version "0.5.0")
10941 (source
10942 (origin
10943 (method url-fetch)
10944 (uri (pypi-uri "lit" version))
10945 (sha256
10946 (base32
10947 "135m2b9cwih85g66rjggavck328z7lj37srgpq3jxszbg0g2b91y"))))
10948 (build-system python-build-system)
10949 (home-page "http://llvm.org/")
10950 (synopsis "LLVM Software Testing Tool")
10951 (description "@code{lit} is a portable tool for executing LLVM and Clang
10952 style test suites, summarizing their results, and providing indication of
10953 failures.")
10954 (license license:ncsa)))
10955
10956 (define-public python2-lit
10957 (package-with-python2 python-lit))
10958
10959 (define-public python-pytest-pep8
10960 (package
10961 (name "python-pytest-pep8")
10962 (version "1.0.6")
10963 (source (origin
10964 (method url-fetch)
10965 (uri (pypi-uri "pytest-pep8" version))
10966 (sha256
10967 (base32
10968 "06032agzhw1i9d9qlhfblnl3dw5hcyxhagn7b120zhrszbjzfbh3"))))
10969 (build-system python-build-system)
10970 (arguments
10971 `(#:tests? #f)) ; Fails with recent pytest and pep8. See upstream issues #8 and #12.
10972 (native-inputs
10973 `(("python-pytest" ,python-pytest)))
10974 (propagated-inputs
10975 `(("python-pep8" ,python-pep8)))
10976 (home-page "https://bitbucket.org/pytest-dev/pytest-pep8")
10977 (synopsis "Py.test plugin to check PEP8 requirements")
10978 (description "Pytest plugin for checking PEP8 compliance.")
10979 (license license:expat)))
10980
10981 (define-public python2-pytest-pep8
10982 (package-with-python2 python-pytest-pep8))
10983
10984 (define-public python-pytest-flakes
10985 (package
10986 (name "python-pytest-flakes")
10987 (version "1.0.1")
10988 (source (origin
10989 (method url-fetch)
10990 (uri (pypi-uri "pytest-flakes" version))
10991 (sha256
10992 (base32
10993 "0flag3n33kbhyjrhzmq990rvg4yb8hhhl0i48q9hw0ll89jp28lw"))))
10994 (build-system python-build-system)
10995 (arguments
10996 `(#:phases
10997 (modify-phases %standard-phases
10998 (delete 'check)
10999 (add-after 'install 'check
11000 (lambda* (#:key outputs inputs #:allow-other-keys)
11001 ;; It's easier to run tests after install.
11002 ;; Make installed package available for running the tests
11003 (add-installed-pythonpath inputs outputs)
11004 (zero? (system* "py.test" "-vv")))))))
11005 (native-inputs
11006 `(("python-coverage" ,python-coverage)
11007 ("python-pytest" ,python-pytest)
11008 ("python-pytest-cache" ,python-pytest-cache)
11009 ("python-pytest-pep8" ,python-pytest-pep8)))
11010 (propagated-inputs
11011 `(("python-pyflakes" ,python-pyflakes)))
11012 (home-page "https://github.com/fschulze/pytest-flakes")
11013 (synopsis "Py.test plugin to check source code with pyflakes")
11014 (description "Pytest plugin for checking Python source code with pyflakes.")
11015 (license license:expat)))
11016
11017 (define-public python2-pytest-flakes
11018 (package-with-python2 python-pytest-flakes))
11019
11020 (define-public python-natsort
11021 (package
11022 (name "python-natsort")
11023 (version "5.0.1")
11024 (source (origin
11025 (method url-fetch)
11026 (uri (pypi-uri "natsort" version))
11027 (sha256
11028 (base32
11029 "1abld5p4a6n5zjnyw5mi2pv37gqalcybv2brjr2y6l9l2p8v9mja"))))
11030 (build-system python-build-system)
11031 (arguments
11032 `(#:phases
11033 (modify-phases %standard-phases
11034 (add-before 'check 'set-cachedir
11035 ;; Tests require write access to $HOME by default
11036 (lambda _ (setenv "PYTHON_EGG_CACHE" "/tmp") #t)))))
11037 (native-inputs
11038 `(("python-hypothesis" ,python-hypothesis)
11039 ("python-pytest-cache" ,python-pytest-cache)
11040 ("python-pytest-cov" ,python-pytest-cov)
11041 ("python-pytest-flakes" ,python-pytest-flakes)
11042 ("python-pytest-pep8" ,python-pytest-pep8)))
11043 (propagated-inputs ; TODO: Add python-fastnumbers.
11044 `(("python-pyicu" ,python-pyicu)))
11045 (home-page "https://github.com/SethMMorton/natsort")
11046 (synopsis "Natural sorting for python and shell")
11047 (description
11048 "Natsort lets you apply natural sorting on lists instead of
11049 lexicographical. If you use the built-in @code{sorted} method in python
11050 on a list such as @code{['a20', 'a9', 'a1', 'a4', 'a10']}, it would be
11051 returned as @code{['a1', 'a10', 'a20', 'a4', 'a9']}. Natsort provides a
11052 function @code{natsorted} that identifies numbers and sorts them separately
11053 from strings. It can also sort version numbers, real numbers, mixed types
11054 and more, and comes with a shell command @command{natsort} that exposes this
11055 functionality in the command line.")
11056 (license license:expat)
11057 (properties `((python2-variant . ,(delay python2-natsort))))))
11058
11059 (define-public python2-natsort
11060 (let ((base (package-with-python2 (strip-python2-variant python-natsort))))
11061 (package (inherit base)
11062 (native-inputs
11063 `(("python2-pathlib" ,python2-pathlib)
11064 ("python2-mock" ,python2-mock)
11065 ("python2-enum34" ,python2-enum34)
11066 ,@(package-native-inputs base))))))
11067
11068 (define-public python-glances
11069 (package
11070 (name "python-glances")
11071 (version "2.7.1")
11072 (source
11073 (origin
11074 (method url-fetch)
11075 (uri (pypi-uri "Glances" version))
11076 (sha256
11077 (base32
11078 "11jbq40g8alsbirnd4kiagznqg270247i0m8qhi48ldf2i5xppxg"))))
11079 (build-system python-build-system)
11080 (propagated-inputs
11081 `(("python-psutil" ,python-psutil)))
11082 (home-page
11083 "https://github.com/nicolargo/glances")
11084 (synopsis
11085 "A cross-platform curses-based monitoring tool")
11086 (description
11087 "Glances is a curses-based monitoring tool for a wide variety of platforms.
11088 Glances uses the PsUtil library to get information from your system. It monitors
11089 CPU, load, memory, network bandwidth, disk I/O, disk use, and more.")
11090 (license license:lgpl3+)))
11091
11092 (define-public python2-glances
11093 (package-with-python2 python-glances))
11094
11095 (define-public python-graphql-core
11096 (package
11097 (name "python-graphql-core")
11098 (version "0.5.3")
11099 (source
11100 (origin
11101 (method url-fetch)
11102 (uri (pypi-uri "graphql-core" version))
11103 (sha256
11104 (base32
11105 "0rsaarx2sj4xnw9966rhh4haiqaapm4lm2mfqm48ywd51j5vh1a0"))))
11106 (build-system python-build-system)
11107 (arguments
11108 `(#:tests? #f ; Tests require the unpackaged pytest-benchmark.
11109 #:phases
11110 (modify-phases %standard-phases
11111 (add-after 'unpack 'patch-hardcoded-version
11112 (lambda _ (substitute*
11113 "setup.py"
11114 (("'gevent==1.1rc1'") "'gevent'"))
11115 #t)))))
11116 (native-inputs
11117 `(("python-gevent" ,python-gevent)
11118 ("python-mock" ,python-mock)
11119 ("python-pytest-mock" ,python-pytest-mock)))
11120 (propagated-inputs
11121 `(("python-promise" ,python-promise)
11122 ("python-six" ,python-six)))
11123 (home-page "https://github.com/graphql-python/graphql-core")
11124 (synopsis "GraphQL implementation for Python")
11125 (description
11126 "GraphQL implementation for Python. GraphQL is a data query language and
11127 runtime designed and used to request and deliver data to mobile and web apps.
11128 This library is a port of @url{https://github.com/graphql/graphql-js,graphql-js}
11129 to Python.")
11130 (license license:expat)))
11131
11132 (define-public python2-graphql-core
11133 (package-with-python2 python-graphql-core))
11134
11135 (define-public python-graphql-relay
11136 (package
11137 (name "python-graphql-relay")
11138 (version "0.4.4")
11139 (source
11140 (origin
11141 (method url-fetch)
11142 (uri (pypi-uri "graphql-relay" version))
11143 (sha256
11144 (base32
11145 "04wr9ayshxjjdcg2v21c7ffbz36kif1wjl3604fqd3qignb3fbxi"))))
11146 (build-system python-build-system)
11147 (native-inputs
11148 `(("python-pytest" ,python-pytest)))
11149 (propagated-inputs
11150 `(("python-graphql-core" ,python-graphql-core)
11151 ("python-promise" ,python-promise)
11152 ("python-six" ,python-six)))
11153 (home-page "https://github.com/graphql-python/graphql-relay-py")
11154 (synopsis "Relay implementation for Python")
11155 (description
11156 "This is a library to allow the easy creation of Relay-compliant servers
11157 using the GraphQL Python reference implementation of a GraphQL server. It
11158 should be noted that the code is a exact port of the original
11159 @url{https://github.com/graphql/graphql-relay-js,graphql-relay js implementation}
11160 from Facebook.")
11161 (license license:expat)))
11162
11163 (define-public python2-graphql-relay
11164 (package-with-python2 python-graphql-relay))
11165
11166 (define-public python-graphene
11167 (package
11168 (name "python-graphene")
11169 (version "0.10.2")
11170 (source
11171 (origin
11172 (method url-fetch)
11173 (uri (pypi-uri "graphene" version))
11174 (sha256
11175 (base32
11176 "09zhac7igh9ixdz0ay6csy35b40l1jwbf2wrbxmgxwfhy51iy06q"))))
11177 (build-system python-build-system)
11178 (native-inputs
11179 `(("python-django-filter" ,python-django-filter)
11180 ("python-mock" ,python-mock)
11181 ("python-psycopg2" ,python-psycopg2)
11182 ("python-pytest-django" ,python-pytest-django)
11183 ("python-sqlalchemy-utils" ,python-sqlalchemy-utils)))
11184 (propagated-inputs
11185 `(("python-graphql-core" ,python-graphql-core)
11186 ("python-graphql-relay" ,python-graphql-relay)
11187 ("python-iso8601" ,python-iso8601)
11188 ("python-promise" ,python-promise)
11189 ("python-six" ,python-six)))
11190 (home-page "http://graphene-python.org/")
11191 (synopsis "GraphQL Framework for Python")
11192 (description
11193 "Graphene is a Python library for building GraphQL schemas/types.
11194 A GraphQL schema describes your data model, and provides a GraphQL server
11195 with an associated set of resolve methods that know how to fetch data.")
11196 (properties `((python2-variant . ,(delay python2-graphene))))
11197 (license license:expat)))
11198
11199 (define-public python2-graphene
11200 (let ((base (package-with-python2
11201 (strip-python2-variant python-graphene))))
11202 (package (inherit base)
11203 (native-inputs
11204 `(("python2-sqlalchemy" ,python2-sqlalchemy)
11205 ,@(package-native-inputs base))))))
11206
11207 (define-public python-nautilus
11208 (package
11209 (name "python-nautilus")
11210 (version "0.4.9")
11211 (source
11212 (origin
11213 (method url-fetch)
11214 (uri (pypi-uri "nautilus" version))
11215 (sha256
11216 (base32
11217 "01hwzjc1zshk4vvxrcghm398fpy4jls66dyz06g07mrwqif8878p"))))
11218 (build-system python-build-system)
11219 (arguments `(#:tests? #f)) ; fails to import test modules
11220 (propagated-inputs
11221 `(("python-bcrypt" ,python-bcrypt)
11222 ("python-click" ,python-click)
11223 ("python-consul" ,python-consul)
11224 ("python-graphql-core" ,python-graphql-core)
11225 ("python-graphql-relay" ,python-graphql-relay)
11226 ("python-graphene" ,python-graphene)
11227 ("python-jinja2" ,python-jinja2)
11228 ("python-nose2" ,python-nose2)
11229 ("python-peewee" ,python-peewee)
11230 ("python-pika" ,python-pika)
11231 ("python-pycparser" ,python-pycparser)
11232 ("python-requests" ,python-requests)
11233 ("python-tornado" ,python-tornado)
11234 ("python-wtforms" ,python-wtforms)))
11235 (home-page "https://github.com/AlecAivazis/nautilus")
11236 (synopsis "Library for creating microservice applications")
11237 (description
11238 "Nautilus is a framework for flux based microservices that looks to
11239 provide extendible implementations of common aspects of a cloud so that you can
11240 focus on building massively scalable web applications.")
11241 (license license:expat)))
11242
11243 (define-public python-betamax
11244 (package
11245 (name "python-betamax")
11246 (version "0.8.0")
11247 (source
11248 (origin
11249 (method url-fetch)
11250 (uri (pypi-uri "betamax" version))
11251 (sha256
11252 (base32
11253 "18f8v5gng3j773jlbbzx4rg1i4y2zw3m2l1zpmbvp8bh5a2q1i42"))))
11254 (build-system python-build-system)
11255 (arguments
11256 '(;; Many tests fail because they require networking.
11257 #:tests? #f))
11258 (inputs
11259 `(("python-requests" ,python-requests)))
11260 (home-page "https://github.com/sigmavirus24/betamax")
11261 (synopsis "Record HTTP interactions with python-requests")
11262 (description "Betamax will record your test suite's HTTP interactions and
11263 replay them during future tests. It is designed to work with python-requests.")
11264 (license license:expat)))
11265
11266 (define-public python2-betamax
11267 (package-with-python2 python-betamax))
11268
11269 (define-public python-s3transfer
11270 (package
11271 (name "python-s3transfer")
11272 (version "0.1.8")
11273 (source (origin
11274 (method url-fetch)
11275 (uri (pypi-uri "s3transfer" version))
11276 (sha256
11277 (base32
11278 "1jivjkp3xqif9gzr5fiq28jsskmh50vzzd7ldsb4rbyiw1iyv3hy"))))
11279 (build-system python-build-system)
11280 (arguments
11281 `(#:phases
11282 (modify-phases %standard-phases
11283 (replace 'check
11284 (lambda _
11285 ;; 7 of the 'integration' tests require network access or login
11286 ;; credentials.
11287 (zero? (system* "nosetests" "--exclude=integration")))))))
11288 (native-inputs
11289 `(("python-docutils" ,python-docutils)
11290 ("python-mock" ,python-mock)
11291 ("python-nose" ,python-nose)))
11292 (propagated-inputs
11293 `(("python-botocore" ,python-botocore)))
11294 (synopsis "Amazon S3 Transfer Manager")
11295 (description "S3transfer is a Python library for managing Amazon S3
11296 transfers.")
11297 (home-page "https://github.com/boto/s3transfer")
11298 (license license:asl2.0)
11299 (properties `((python2-variant . ,(delay python2-s3transfer))))))
11300
11301 (define-public python2-s3transfer
11302 (let ((base (package-with-python2 (strip-python2-variant python-s3transfer))))
11303 (package
11304 (inherit base)
11305 (native-inputs
11306 `(("python2-futures" ,python2-futures)
11307 ,@(package-native-inputs base))))))
11308
11309 (define-public python-setproctitle
11310 (package
11311 (name "python-setproctitle")
11312 (version "1.1.10")
11313 (source
11314 (origin
11315 (method url-fetch)
11316 (uri (pypi-uri "setproctitle" version))
11317 (sha256
11318 (base32
11319 "163kplw9dcrw0lffq1bvli5yws3rngpnvrxrzdw89pbphjjvg0v2"))))
11320 (build-system python-build-system)
11321 (arguments
11322 '(#:phases
11323 (modify-phases %standard-phases
11324 (add-before 'check 'patch-Makefile
11325 ;; Stricly this is only required for the python2 variant.
11326 ;; But adding a phase in an inherited package seems to be
11327 ;; cumbersum. So we patch even for python3.
11328 (lambda _
11329 (let ((nose (assoc-ref %build-inputs "python2-nose")))
11330 (when nose
11331 (substitute* "Makefile"
11332 (("\\$\\(PYTHON\\) [^ ]which nosetests[^ ] ")
11333 (string-append nose "/bin/nosetests "))))
11334 #t)))
11335 (replace 'check
11336 (lambda _
11337 (setenv "PYTHON" (or (which "python3") (which "python")))
11338 (setenv "PYCONFIG" (or (which "python3-config")
11339 (which "python-config")))
11340 (setenv "CC" "gcc")
11341 ;; No need to extend PYTHONPATH to find the built package, since
11342 ;; the Makefile will build anyway
11343 (zero? (system* "make" "check")))))))
11344 (native-inputs
11345 `(("procps" ,procps))) ; required for tests
11346 (home-page
11347 "https://github.com/dvarrazzo/py-setproctitle")
11348 (synopsis
11349 "Setproctitle implementation for Python to customize the process title")
11350 (description "The library allows a process to change its title (as displayed
11351 by system tools such as ps and top).
11352
11353 Changing the title is mostly useful in multi-process systems, for
11354 example when a master process is forked: changing the children's title
11355 allows to identify the task each process is busy with. The technique
11356 is used by PostgreSQL and the OpenSSH Server for example.")
11357 (license license:bsd-3)
11358 (properties `((python2-variant . ,(delay python2-setproctitle))))))
11359
11360 (define-public python2-setproctitle
11361 (let ((base (package-with-python2
11362 (strip-python2-variant python-setproctitle))))
11363 (package
11364 (inherit base)
11365 (native-inputs `(("python2-nose" ,python2-nose)
11366 ,@(package-native-inputs base))))))
11367
11368 (define-public python-validictory
11369 (package
11370 (name "python-validictory")
11371 (version "1.0.1")
11372 (source
11373 (origin
11374 (method url-fetch)
11375 (uri (pypi-uri "validictory" version))
11376 (sha256
11377 (base32
11378 "1zf1g9sw47xzp5f80bd94pb42j9yqv82lcrgcvdwr6nkaphfi37q"))))
11379 (build-system python-build-system)
11380 (arguments
11381 '(#:phases
11382 (modify-phases %standard-phases
11383 (add-after 'unpack 'bootstrap
11384 ;; Move the tests out of the package directory to avoid
11385 ;; packaging them.
11386 (lambda* _
11387 (rename-file "validictory/tests" "tests")
11388 (delete-file "tests/__init__.py")))
11389 (replace 'check
11390 (lambda _
11391 ;; Extend PYTHONPATH so the built package will be found.
11392 (setenv "PYTHONPATH"
11393 (string-append (getcwd) "/build/lib:"
11394 (getenv "PYTHONPATH")))
11395 (zero? (system* "py.test" "-vv" )))))))
11396 (native-inputs
11397 `(("python-pytest" ,python-pytest)))
11398 (home-page
11399 "https://github.com/jamesturk/validictory")
11400 (synopsis "General purpose Python data validator")
11401 (description "It allows validation of arbitrary Python data structures.
11402
11403 The schema format is based on the JSON Schema
11404 proposal (http://json-schema.org), so combined with json the library is also
11405 useful as a validator for JSON data.")
11406 (license license:expat)))
11407
11408 (define-public python2-validictory
11409 (package-with-python2 python-validictory))
11410
11411 (define-public python-aniso8601
11412 (package
11413 (name "python-aniso8601")
11414 (version "1.1.0")
11415 (source
11416 (origin
11417 (method url-fetch)
11418 (uri (pypi-uri "aniso8601" version))
11419 (sha256
11420 (base32
11421 "1k5mjg9iqbjfslb5prrsfz7dhlvi6s35p1jxq8dm87w1b7dn5i2g"))))
11422 (build-system python-build-system)
11423 (propagated-inputs
11424 `(("python-dateutil-2" ,python-dateutil-2)))
11425 (home-page
11426 "https://bitbucket.org/nielsenb/aniso8601")
11427 (synopsis
11428 "Python library for parsing ISO 8601 strings")
11429 (description
11430 "This package contains a library for parsing ISO 8601 datetime strings.")
11431 (license license:bsd-3)))
11432
11433 (define-public python-flask-restful
11434 (package
11435 (name "python-flask-restful")
11436 (version "0.3.5")
11437 (source
11438 (origin
11439 (method url-fetch)
11440 (uri (pypi-uri "Flask-RESTful" version))
11441 (sha256
11442 (base32
11443 "0hjcmdb56b7z4bkw848lxfkyrpnkwzmqn2dgnlv12mwvjpzsxr6c"))))
11444 (build-system python-build-system)
11445 (propagated-inputs
11446 `(("python-aniso8601" ,python-aniso8601)
11447 ("python-flask" ,python-flask)
11448 ("python-pycrypto" ,python-pycrypto)
11449 ("python-pytz" ,python-pytz)))
11450 (native-inputs
11451 `(;; Optional dependency of Flask. Tests need it.
11452 ("python-blinker" ,python-blinker)
11453 ("python-mock" ,python-mock) ; For tests
11454 ("python-nose" ,python-nose) ; For tests
11455 ("python-sphinx" ,python-sphinx)))
11456 (home-page
11457 "https://www.github.com/flask-restful/flask-restful/")
11458 (synopsis
11459 "Flask module for creating REST APIs")
11460 (description
11461 "This package contains a Flask module for creating REST APIs.")
11462 (license license:bsd-3)))
11463
11464 (define-public python-flask-basicauth
11465 (package
11466 (name "python-flask-basicauth")
11467 (version "0.2.0")
11468 (source
11469 (origin
11470 (method url-fetch)
11471 (uri (pypi-uri "Flask-BasicAuth" version))
11472 (sha256
11473 (base32
11474 "1zq1spkjr4sjdnalpp8wl242kdqyk6fhbnhr8hi4r4f0km4bspnz"))))
11475 (build-system python-build-system)
11476 (propagated-inputs
11477 `(("python-flask" ,python-flask)))
11478 (home-page
11479 "https://github.com/jpvanhal/flask-basicauth")
11480 (synopsis
11481 "HTTP basic access authentication for Flask")
11482 (description
11483 "This package provides HTTP basic access authentication for Flask.")
11484 (license license:bsd-3)))
11485
11486 (define-public python-flask-sqlalchemy
11487 (package
11488 (name "python-flask-sqlalchemy")
11489 (version "2.1")
11490 (source
11491 (origin
11492 (method url-fetch)
11493 (uri (pypi-uri "Flask-SQLAlchemy" version))
11494 (sha256
11495 (base32
11496 "1i9ps5d5snih9xlqhrvmi3qfiygkmqzxh92n25kj4pf89kj4s965"))))
11497 (build-system python-build-system)
11498 (propagated-inputs
11499 `(("python-flask" ,python-flask)
11500 ("python-sqlalchemy" ,python-sqlalchemy)))
11501 (home-page
11502 "http://github.com/mitsuhiko/flask-sqlalchemy")
11503 (synopsis
11504 "Module adding SQLAlchemy support to your Flask application")
11505 (description
11506 "This package adds SQLAlchemy support to your Flask application.")
11507 (license license:bsd-3)))
11508
11509 (define-public python-pyev
11510 (package
11511 (name "python-pyev")
11512 (version "0.9.0")
11513 (source
11514 (origin
11515 (method url-fetch)
11516 (uri (pypi-uri "pyev" version))
11517 (sha256
11518 (base32
11519 "0rf603lc0s6zpa1nb25vhd8g4y337wg2wyz56i0agsdh7jchl0sx"))))
11520 (build-system python-build-system)
11521 (arguments
11522 `(#:tests? #f ; no test suite
11523 #:phases
11524 (modify-phases %standard-phases
11525 (add-after 'unpack 'patch
11526 (lambda* (#:key inputs #:allow-other-keys)
11527 (let ((libev (string-append (assoc-ref inputs "libev")
11528 "/lib/libev.so.4")))
11529 (substitute* "setup.py"
11530 (("libev_dll_name = find_library\\(\\\"ev\\\"\\)")
11531 (string-append "libev_dll_name = \"" libev "\"")))))))))
11532 (inputs
11533 `(("libev" ,libev)))
11534 (home-page "http://pythonhosted.org/pyev/")
11535 (synopsis "Python libev interface")
11536 (description "Pyev provides a Python interface to libev.")
11537 (license license:gpl3)))
11538
11539 (define-public python2-pyev
11540 (package-with-python2 python-pyev))
11541
11542 (define-public python-imagesize
11543 (package
11544 (name "python-imagesize")
11545 (version "0.7.1")
11546 (source
11547 (origin
11548 (method url-fetch)
11549 (uri (pypi-uri "imagesize" version))
11550 (sha256
11551 (base32
11552 "0qk07k0z4241lkzzjji7z4da04pcvg7bfc4xz1934zlqhwmwdcha"))))
11553 (build-system python-build-system)
11554 (arguments
11555 '(;; Test files are not distributed on PyPi:
11556 ;; https://github.com/shibukawa/imagesize_py/issues/7
11557 #:tests? #f))
11558 (home-page "https://github.com/shibukawa/imagesize_py")
11559 (synopsis "Gets image size of files in variaous formats in Python")
11560 (description
11561 "This package allows determination of image size from
11562 PNG, JPEG, JPEG2000 and GIF files in pure Python.")
11563 (license license:expat)))
11564
11565 (define-public python2-imagesize
11566 (package-with-python2 python-imagesize))
11567
11568 (define-public python-axolotl-curve25519
11569 (package
11570 (name "python-axolotl-curve25519")
11571 (version "0.1")
11572 (source
11573 (origin
11574 (method git-fetch)
11575 (uri (git-reference
11576 (url "git://github.com/tgalal/python-axolotl-curve25519")
11577 (commit "e4a9c4de0eae27223200579c58d1f8f6d20637e2")))
11578 (file-name (string-append name "-" version "-checkout"))
11579 (sha256
11580 (base32
11581 "0agap5q0hmvf6cwzjqc05kw53pjgf6942pcivpazksmg1vk400ra"))))
11582 (build-system python-build-system)
11583 (arguments
11584 `(;; Prevent creation of the egg. This works around
11585 ;; https://debbugs.gnu.org/cgi/bugreport.cgi?bug=20765
11586 #:configure-flags '("--root=/")))
11587 (home-page "https://github.com/tgalal/python-axolotl-curve25519")
11588 (synopsis "Python wrapper for curve25519 library")
11589 (description "This is a python wrapper for the curve25519 library
11590 with ed25519 signatures. The C code was pulled from
11591 libaxolotl-android. At the moment this wrapper is meant for use by
11592 python-axolotl.")
11593 (license (list license:gpl3 ; Most files
11594 license:bsd-3)))) ; curve/curve25519-donna.c
11595
11596 (define-public python2-axolotl-curve25519
11597 (package-with-python2 python-axolotl-curve25519))
11598
11599 (define-public python-axolotl
11600 (package
11601 (name "python-axolotl")
11602 (version "0.1.35")
11603 (source
11604 (origin
11605 (method url-fetch)
11606 (uri (string-append
11607 "https://github.com/tgalal/python-axolotl/archive/"
11608 version ".tar.gz"))
11609 (file-name (string-append name "-" version ".tar.gz"))
11610 (sha256
11611 (base32 "1z8d89p7v40p4bwywjm9h4z28fdvra79ddw06azlkrfjbl7dxmz8"))))
11612 (build-system python-build-system)
11613 (arguments
11614 `(#:phases
11615 (modify-phases %standard-phases
11616 ;; Don't install tests
11617 (add-before 'install 'remove-tests
11618 (lambda _
11619 (for-each delete-file-recursively
11620 '("axolotl/tests" "build/lib/axolotl/tests"))
11621 #t)))
11622 ;; Prevent creation of the egg. This works around
11623 ;; https://debbugs.gnu.org/cgi/bugreport.cgi?bug=20765
11624 #:configure-flags '("--root=/")))
11625 (propagated-inputs
11626 `(("python-axolotl-curve25519" ,python-axolotl-curve25519)
11627 ("python-dateutil" ,python-dateutil)
11628 ("python-protobuf" ,python-protobuf)
11629 ("python-pycrypto" ,python-pycrypto)))
11630 (home-page "https://github.com/tgalal/python-axolotl")
11631 (synopsis "Python port of libaxolotl-android")
11632 (description "This is a python port of libaxolotl-android. This
11633 is a ratcheting forward secrecy protocol that works in synchronous and
11634 asynchronous messaging environments.")
11635 (license license:gpl3)))
11636
11637 (define-public python2-axolotl
11638 (package-with-python2 python-axolotl))
11639
11640 (define-public python-termstyle
11641 (package
11642 (name "python-termstyle")
11643 (version "0.1.11")
11644 (source
11645 (origin
11646 (method url-fetch)
11647 (uri (pypi-uri "termstyle" version))
11648 (sha256
11649 (base32
11650 "17wzkkcqy5zc0g68xlad3kcv66iw14d2pwqc0h9420gak0vbhx7g"))))
11651 (build-system python-build-system)
11652 (home-page "http://github.com/gfxmonk/termstyle")
11653 (synopsis "Console text coloring for Python")
11654 (description "This package provides console text coloring for Python.")
11655 (license license:bsd-3)))
11656
11657 (define-public python-rednose
11658 (package
11659 (name "python-rednose")
11660 (version "1.2.1")
11661 (source
11662 (origin
11663 (method url-fetch)
11664 (uri (pypi-uri "rednose" version))
11665 (sha256
11666 (base32
11667 "0b0bsna217lr1nykyhl5fgjly15zhdvqd4prg4wy1zrgfv7al6m0"))))
11668 (build-system python-build-system)
11669 (arguments
11670 `(#:phases
11671 (modify-phases %standard-phases
11672 (add-after 'unpack 'fix-deps
11673 (lambda _
11674 ;; See <https://github.com/JBKahn/rednose/issues/12>
11675 (substitute* "setup.py"
11676 (("python-termstyle") "termstyle"))
11677 #t)))))
11678 (propagated-inputs
11679 `(("python-colorama" ,python-colorama)
11680 ("python-termstyle" ,python-termstyle)))
11681 (native-inputs
11682 `(("python-six" ,python-six)
11683 ("python-nose" ,python-nose)))
11684 (home-page "https://github.com/JBKahn/rednose")
11685 (synopsis "Colored output for Python nosetests")
11686 (description "This package provides colored output for the
11687 @command{nosetests} command of the Python Nose unit test framework.")
11688 (license license:bsd-3)))
11689
11690 (define-public python-flask-restplus
11691 (package
11692 (name "python-flask-restplus")
11693 (version "0.9.2")
11694 (source
11695 (origin
11696 (method url-fetch)
11697 (uri (pypi-uri "flask-restplus" version))
11698 (sha256
11699 (base32
11700 "11his6ii5brpkhld0d5bwzjjw4q3vmplpd6fmgzjrvvklsbk0cf4"))))
11701 (build-system python-build-system)
11702 (propagated-inputs
11703 `(("python-aniso8601" ,python-aniso8601)
11704 ("python-flask" ,python-flask)
11705 ("python-jsonschema" ,python-jsonschema)
11706 ("python-pytz" ,python-pytz)
11707 ("python-six" ,python-six)))
11708 (native-inputs
11709 `(("python-tzlocal" ,python-tzlocal)
11710 ("python-blinker" ,python-blinker)
11711 ("python-nose" ,python-nose)
11712 ("python-rednose" ,python-rednose)))
11713 (home-page "https://github.com/noirbizarre/flask-restplus")
11714 (synopsis "Framework for documented API development with Flask")
11715 (description "This package provides a framework for API development with
11716 the Flask web framework in Python. It is similar to package
11717 @code{python-flask-restful} but supports the @code{python-swagger}
11718 documentation builder.")
11719 (license license:expat)))