gnu: Fix python inputs, part 1: all inputs become propagated-inputs.
[jackhill/guix/guix.git] / gnu / packages / python.scm
1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2013 Nikita Karetnikov <nikita@karetnikov.org>
3 ;;; Copyright © 2013, 2014, 2015, 2016 Ludovic Courtès <ludo@gnu.org>
4 ;;; Copyright © 2013, 2014, 2015, 2016 Andreas Enge <andreas@enge.fr>
5 ;;; Copyright © 2014, 2015 Mark H Weaver <mhw@netris.org>
6 ;;; Copyright © 2014 Eric Bavier <bavier@member.fsf.org>
7 ;;; Copyright © 2014, 2015 Federico Beffa <beffa@fbengineering.ch>
8 ;;; Copyright © 2015 Omar Radwan <toxemicsquire4@gmail.com>
9 ;;; Copyright © 2015 Pierre-Antoine Rault <par@rigelk.eu>
10 ;;; Copyright © 2015, 2016 Ricardo Wurmus <rekado@elephly.net>
11 ;;; Copyright © 2015, 2016 Christopher Allan Webber <cwebber@dustycloud.org>
12 ;;; Copyright © 2015 Eric Dvorsak <eric@dvorsak.fr>
13 ;;; Copyright © 2015, 2016 David Thompson <davet@gnu.org>
14 ;;; Copyright © 2015, 2016 Leo Famulari <leo@famulari.name>
15 ;;; Copyright © 2015 Ben Woodcroft <donttrustben@gmail.com>
16 ;;; Copyright © 2015, 2016 Erik Edrosa <erik.edrosa@gmail.com>
17 ;;; Copyright © 2015, 2016 Efraim Flashner <efraim@flashner.co.il>
18 ;;; Copyright © 2015 Kyle Meyer <kyle@kyleam.com>
19 ;;; Copyright © 2015, 2016 Chris Marusich <cmmarusich@gmail.com>
20 ;;; Copyright © 2016 Danny Milosavljevic <dannym+a@scratchpost.org>
21 ;;; Copyright © 2016 Lukas Gradl <lgradl@openmailbox.org>
22 ;;; Copyright © 2016 Hartmut Goebel <h.goebel@crazy-compilers.com>
23 ;;; Copyright © 2016 Daniel Pimentel <d4n1@d4n1.org>
24 ;;; Copyright © 2016 Sou Bunnbu <iyzsong@gmail.com>
25 ;;; Copyright © 2016 Troy Sankey <sankeytms@gmail.com>
26 ;;; Copyright © 2016 ng0 <ng0@we.make.ritual.n0.is>
27 ;;; Copyright © 2016 Dylan Jeffers <sapientech@sapientech@openmailbox.org>
28 ;;; Copyright © 2016 David Craven <david@craven.ch>
29 ;;; Copyright © 2016 Marius Bakke <mbakke@fastmail.com>
30 ;;; Copyright © 2016 Stefan Reichoer <stefan@xsteve.at>
31 ;;; Copyright © 2016 Dylan Jeffers <sapientech@sapientech@openmailbox.org>
32 ;;; Copyright © 2016 Alex Vong <alexvong1995@gmail.com>
33 ;;; Copyright © 2016 Arun Isaac <arunisaac@systemreboot.net>
34 ;;;
35 ;;; This file is part of GNU Guix.
36 ;;;
37 ;;; GNU Guix is free software; you can redistribute it and/or modify it
38 ;;; under the terms of the GNU General Public License as published by
39 ;;; the Free Software Foundation; either version 3 of the License, or (at
40 ;;; your option) any later version.
41 ;;;
42 ;;; GNU Guix is distributed in the hope that it will be useful, but
43 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
44 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
45 ;;; GNU General Public License for more details.
46 ;;;
47 ;;; You should have received a copy of the GNU General Public License
48 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
49
50 (define-module (gnu packages python)
51 #:use-module ((guix licenses) #:prefix license:)
52 #:use-module (gnu packages)
53 #:use-module (gnu packages algebra)
54 #:use-module (gnu packages adns)
55 #:use-module (gnu packages attr)
56 #:use-module (gnu packages backup)
57 #:use-module (gnu packages bash)
58 #:use-module (gnu packages compression)
59 #:use-module (gnu packages databases)
60 #:use-module (gnu packages django)
61 #:use-module (gnu packages file)
62 #:use-module (gnu packages fontutils)
63 #:use-module (gnu packages gcc)
64 #:use-module (gnu packages ghostscript)
65 #:use-module (gnu packages gl)
66 #:use-module (gnu packages glib)
67 #:use-module (gnu packages gstreamer)
68 #:use-module (gnu packages gtk)
69 #:use-module (gnu packages icu4c)
70 #:use-module (gnu packages image)
71 #:use-module (gnu packages imagemagick)
72 #:use-module (gnu packages libevent)
73 #:use-module (gnu packages libffi)
74 #:use-module (gnu packages linux)
75 #:use-module (gnu packages maths)
76 #:use-module (gnu packages multiprecision)
77 #:use-module (gnu packages networking)
78 #:use-module (gnu packages ncurses)
79 #:use-module (gnu packages openstack)
80 #:use-module (gnu packages password-utils)
81 #:use-module (gnu packages pcre)
82 #:use-module (gnu packages perl)
83 #:use-module (gnu packages pkg-config)
84 #:use-module (gnu packages protobuf)
85 #:use-module (gnu packages readline)
86 #:use-module (gnu packages sdl)
87 #:use-module (gnu packages statistics)
88 #:use-module (gnu packages tex)
89 #:use-module (gnu packages texinfo)
90 #:use-module (gnu packages tls)
91 #:use-module (gnu packages version-control)
92 #:use-module (gnu packages video)
93 #:use-module (gnu packages web)
94 #:use-module (gnu packages base)
95 #:use-module (gnu packages xml)
96 #:use-module (gnu packages xorg)
97 #:use-module (gnu packages xdisorg)
98 #:use-module (gnu packages zip)
99 #:use-module (gnu packages tcl)
100 #:use-module (gnu packages bdw-gc)
101 #:use-module (guix packages)
102 #:use-module (guix download)
103 #:use-module (guix git-download)
104 #:use-module (guix utils)
105 #:use-module (guix build-system gnu)
106 #:use-module (guix build-system cmake)
107 #:use-module (guix build-system python)
108 #:use-module (guix build-system trivial)
109 #:use-module (srfi srfi-1))
110
111 (define-public python-2.7
112 (package
113 (name "python")
114 (version "2.7.12")
115 (source
116 (origin
117 (method url-fetch)
118 (uri (string-append "https://www.python.org/ftp/python/"
119 version "/Python-" version ".tar.xz"))
120 (sha256
121 (base32
122 "0y7rl603vmwlxm6ilkhc51rx2mfj14ckcz40xxgs0ljnvlhp30yp"))
123 (patches (search-patches "python-2.7-search-paths.patch"
124 "python-2-deterministic-build-info.patch"
125 "python-2.7-site-prefixes.patch"
126 "python-2.7-source-date-epoch.patch"))
127 (modules '((guix build utils)))
128 ;; suboptimal to delete failing tests here, but if we delete them in the
129 ;; arguments then we need to make sure to strip out that phase when it
130 ;; gets inherited by python and python-minimal.
131 (snippet
132 '(begin
133 (for-each delete-file
134 '("Lib/test/test_compileall.py"
135 "Lib/test/test_ctypes.py" ; fails on mips64el
136 "Lib/test/test_distutils.py"
137 "Lib/test/test_import.py"
138 "Lib/test/test_shutil.py"
139 "Lib/test/test_socket.py"
140 "Lib/test/test_subprocess.py"))
141 #t))))
142 (outputs '("out"
143 "tk")) ;tkinter; adds 50 MiB to the closure
144 (build-system gnu-build-system)
145 (arguments
146 `(;; 356 tests OK.
147 ;; 6 tests failed:
148 ;; test_compileall test_distutils test_import test_shutil test_socket
149 ;; test_subprocess
150 ;; 39 tests skipped:
151 ;; test_aepack test_al test_applesingle test_bsddb test_bsddb185
152 ;; test_bsddb3 test_cd test_cl test_codecmaps_cn test_codecmaps_hk
153 ;; test_codecmaps_jp test_codecmaps_kr test_codecmaps_tw test_curses
154 ;; test_dl test_gdb test_gl test_imageop test_imgfile test_ioctl
155 ;; test_kqueue test_linuxaudiodev test_macos test_macostools
156 ;; test_msilib test_ossaudiodev test_scriptpackages test_smtpnet
157 ;; test_socketserver test_startfile test_sunaudiodev test_timeout
158 ;; test_tk test_ttk_guionly test_urllib2net test_urllibnet
159 ;; test_winreg test_winsound test_zipfile64
160 ;; 4 skips unexpected on linux2:
161 ;; test_bsddb test_bsddb3 test_gdb test_ioctl
162 #:test-target "test"
163 #:configure-flags
164 (list "--enable-shared" ;allow embedding
165 "--with-system-ffi" ;build ctypes
166 "--with-ensurepip=install" ;install pip and setuptools
167 (string-append "LDFLAGS=-Wl,-rpath="
168 (assoc-ref %outputs "out") "/lib"))
169
170 #:modules ((ice-9 ftw) (ice-9 match)
171 (guix build utils) (guix build gnu-build-system))
172 #:phases
173 (modify-phases %standard-phases
174 (add-before
175 'configure 'patch-lib-shells
176 (lambda _
177 ;; Filter for existing files, since some may not exist in all
178 ;; versions of python that are built with this recipe.
179 (substitute* (filter file-exists?
180 '("Lib/subprocess.py"
181 "Lib/popen2.py"
182 "Lib/distutils/tests/test_spawn.py"
183 "Lib/test/test_subprocess.py"))
184 (("/bin/sh") (which "sh")))
185
186 ;; Use zero as the timestamp in .pyc files so that builds are
187 ;; deterministic. TODO: Remove it when this variable is set in
188 ;; gnu-build-system.scm.
189 (setenv "SOURCE_DATE_EPOCH" "1")
190 #t))
191 (add-before 'configure 'do-not-record-configure-flags
192 (lambda* (#:key configure-flags #:allow-other-keys)
193 ;; Remove configure flags from the installed '_sysconfigdata.py'
194 ;; and 'Makefile' so we don't end up keeping references to the
195 ;; build tools.
196 ;;
197 ;; Preserve at least '--with-system-ffi' since otherwise the
198 ;; thing tries to build libffi, fails, and we end up with a
199 ;; Python that lacks ctypes.
200 (substitute* "configure"
201 (("^CONFIG_ARGS=.*$")
202 (format #f "CONFIG_ARGS='~a'\n"
203 (if (member "--with-system-ffi" configure-flags)
204 "--with-system-ffi"
205 ""))))
206 #t))
207 (add-before
208 'check 'pre-check
209 (lambda _
210 ;; 'Lib/test/test_site.py' needs a valid $HOME
211 (setenv "HOME" (getcwd))
212 #t))
213 (add-after
214 'unpack 'set-source-file-times-to-1980
215 ;; XXX One of the tests uses a ZIP library to pack up some of the
216 ;; source tree, and fails with "ZIP does not support timestamps
217 ;; before 1980". Work around this by setting the file times in the
218 ;; source tree to sometime in early 1980.
219 (lambda _
220 (let ((circa-1980 (* 10 366 24 60 60)))
221 (ftw "." (lambda (file stat flag)
222 (utime file circa-1980 circa-1980)
223 #t))
224 #t)))
225 (add-after 'install 'remove-tests
226 ;; Remove 25 MiB of unneeded unit tests. Keep test_support.*
227 ;; because these files are used by some libraries out there.
228 (lambda* (#:key outputs #:allow-other-keys)
229 (let ((out (assoc-ref outputs "out")))
230 (match (scandir (string-append out "/lib")
231 (lambda (name)
232 (string-prefix? "python" name)))
233 ((pythonX.Y)
234 (let ((testdir (string-append out "/lib/" pythonX.Y
235 "/test")))
236 (with-directory-excursion testdir
237 (for-each delete-file-recursively
238 (scandir testdir
239 (match-lambda
240 ((or "." "..") #f)
241 (file
242 (not
243 (string-prefix? "test_support."
244 file))))))
245 (call-with-output-file "__init__.py" (const #t))
246 #t)))))))
247 (add-before 'strip 'make-libraries-writable
248 (lambda* (#:key outputs #:allow-other-keys)
249 ;; Make .so files writable so they can be stripped.
250 (let ((out (assoc-ref outputs "out")))
251 (for-each (lambda (file)
252 (chmod file #o755))
253 (find-files (string-append out "/lib")
254 "\\.so"))
255 #t)))
256 (add-after 'install 'move-tk-inter
257 (lambda* (#:key outputs #:allow-other-keys)
258 ;; When Tkinter support is built move it to a separate output so
259 ;; that the main output doesn't contain a reference to Tcl/Tk.
260 (let ((out (assoc-ref outputs "out"))
261 (tk (assoc-ref outputs "tk")))
262 (when tk
263 (match (find-files out "tkinter.*\\.so")
264 ((tkinter.so)
265 ;; The .so is in OUT/lib/pythonX.Y/lib-dynload, but we
266 ;; want it under TK/lib/pythonX.Y/site-packages.
267 (let* ((len (string-length out))
268 (target (string-append
269 tk "/"
270 (string-drop
271 (dirname (dirname tkinter.so))
272 len)
273 "/site-packages")))
274 (install-file tkinter.so target)
275 (delete-file tkinter.so)))))
276 #t))))))
277 (inputs
278 `(("bzip2" ,bzip2)
279 ("gdbm" ,gdbm)
280 ("libffi" ,libffi) ; for ctypes
281 ("sqlite" ,sqlite) ; for sqlite extension
282 ("openssl" ,openssl)
283 ("readline" ,readline)
284 ("zlib" ,zlib)
285 ("tcl" ,tcl)
286 ("tk" ,tk))) ; for tkinter
287 (native-inputs
288 `(("pkg-config" ,pkg-config)))
289 (native-search-paths
290 (list (search-path-specification
291 (variable "PYTHONPATH")
292 (files '("lib/python2.7/site-packages")))))
293 (home-page "https://www.python.org")
294 (synopsis "High-level, dynamically-typed programming language")
295 (description
296 "Python is a remarkably powerful dynamic programming language that
297 is used in a wide variety of application domains. Some of its key
298 distinguishing features include: clear, readable syntax; strong
299 introspection capabilities; intuitive object orientation; natural
300 expression of procedural code; full modularity, supporting hierarchical
301 packages; exception-based error handling; and very high level dynamic
302 data types.")
303 (license license:psfl)))
304
305 ;; Current 2.x version.
306 (define-public python-2 python-2.7)
307
308 (define-public python-3.5
309 (package (inherit python-2)
310 (version "3.5.2")
311 (source (origin
312 (method url-fetch)
313 (uri (string-append "https://www.python.org/ftp/python/"
314 version "/Python-" version ".tar.xz"))
315 (patches (search-patches
316 "python-fix-tests.patch"
317 "python-3.5-fix-tests.patch"
318 "python-3-deterministic-build-info.patch"
319 "python-3-search-paths.patch"))
320 (patch-flags '("-p0"))
321 (sha256
322 (base32
323 "0h6a5fr7ram2s483lh0pnmc4ncijb8llnpfdxdcl5dxr01hza400"))))
324 (arguments (substitute-keyword-arguments (package-arguments python-2)
325 ((#:tests? _) #t)))
326 (native-search-paths
327 (list (search-path-specification
328 (variable "PYTHONPATH")
329 (files (list (string-append "lib/python"
330 (version-major+minor version)
331 "/site-packages"))))))))
332
333 (define-public python-3.4
334 (package (inherit python-3.5)
335 (version "3.4.5")
336 (source (origin
337 (method url-fetch)
338 (uri (string-append "https://www.python.org/ftp/python/"
339 version "/Python-" version ".tar.xz"))
340 (patches (search-patches
341 "python-fix-tests.patch"
342 "python-3.4-fix-tests.patch"
343 "python-3-deterministic-build-info.patch"
344 "python-3-search-paths.patch"))
345 (patch-flags '("-p0"))
346 (sha256
347 (base32
348 "12l9klp778wklxmckhghniy5hklss8r26995pyd00qbllk4b2r7f"))))))
349
350 ;; Current 3.x version.
351 (define-public python-3 python-3.5)
352
353 ;; Current major version.
354 (define-public python python-3)
355
356 ;; Minimal variants of Python, mostly used to break the cycle between Tk and
357 ;; Python (Tk -> libxcb -> Python.)
358
359 (define-public python2-minimal
360 (package (inherit python-2)
361 (name "python-minimal")
362 (outputs '("out"))
363 (arguments
364 (substitute-keyword-arguments (package-arguments python-2)
365 ((#:configure-flags cf)
366 `(append ,cf '("--without-system-ffi")))))
367 (inputs '()))) ;none of the optional dependencies
368
369 (define-public python-minimal
370 (package (inherit python)
371 (name "python-minimal")
372 (outputs '("out"))
373
374 ;; Build fails due to missing ctypes without libffi.
375 ;; OpenSSL is a mandatory dependency of Python 3.x, for urllib;
376 ;; zlib is required by 'zipimport', used by pip.
377 (inputs `(("libffi" ,libffi)
378 ("openssl" ,openssl)
379 ("zlib" ,zlib)))))
380
381 (define* (wrap-python3 python
382 #:optional
383 (name (string-append (package-name python) "-wrapper")))
384 (package (inherit python)
385 (name name)
386 (source #f)
387 (build-system trivial-build-system)
388 (outputs '("out"))
389 (inputs `(("bash" ,bash)))
390 (propagated-inputs `(("python" ,python)))
391 (arguments
392 `(#:modules ((guix build utils))
393 #:builder
394 (begin
395 (use-modules (guix build utils))
396 (let ((bin (string-append (assoc-ref %outputs "out") "/bin"))
397 (python (string-append (assoc-ref %build-inputs "python") "/bin/")))
398 (mkdir-p bin)
399 (for-each
400 (lambda (old new)
401 (symlink (string-append python old)
402 (string-append bin "/" new)))
403 `("python3" ,"pydoc3" ,"idle3" ,"pip3")
404 `("python" ,"pydoc" ,"idle" ,"pip"))
405 ;; python-config outputs search paths based upon its location,
406 ;; use a bash wrapper to avoid changing its outputs.
407 (let ((bash (string-append (assoc-ref %build-inputs "bash")
408 "/bin/bash"))
409 (old (string-append python "python3-config"))
410 (new (string-append bin "/python-config")))
411 (with-output-to-file new
412 (lambda ()
413 (format #t "#!~a~%" bash)
414 (format #t "exec \"~a\" \"$@\"~%" old)
415 (chmod new #o755)
416 #t)))))))
417 (synopsis "Wrapper for the Python 3 commands")
418 (description
419 "This package provides wrappers for the commands of Python@tie{}3.x such
420 that they can be invoked under their usual name---e.g., @command{python}
421 instead of @command{python3}.")))
422
423 (define-public python-wrapper (wrap-python3 python))
424 (define-public python-minimal-wrapper (wrap-python3 python-minimal))
425
426 (define-public python-psutil
427 (package
428 (name "python-psutil")
429 (version "4.3.0")
430 (source
431 (origin
432 (method url-fetch)
433 (uri (pypi-uri "psutil" version))
434 (sha256
435 (base32
436 "1w4r09fvn6kd80m5mx4ws1wz100brkaq6hzzpwrns8cgjzjpl6c6"))))
437 (build-system python-build-system)
438 (home-page "https://www.github.com/giampaolo/psutil")
439 (synopsis "Library for retrieving information on running processes")
440 (description
441 "psutil (Python system and process utilities) is a library for retrieving
442 information on running processes and system utilization (CPU, memory, disks,
443 network) in Python. It is useful mainly for system monitoring, profiling and
444 limiting process resources and management of running processes. It implements
445 many functionalities offered by command line tools such as: ps, top, lsof,
446 netstat, ifconfig, who, df, kill, free, nice, ionice, iostat, iotop, uptime,
447 pidof, tty, taskset, pmap.")
448 (license license:bsd-3)))
449
450 (define-public python2-psutil
451 (package-with-python2 python-psutil))
452
453 (define-public python-passlib
454 (package
455 (name "python-passlib")
456 (version "1.6.5")
457 (source
458 (origin
459 (method url-fetch)
460 (uri (pypi-uri "passlib" version))
461 (sha256
462 (base32
463 "1z27wdxs5rj5xhhqfzvzn3yg682irkxw6dcs5jj7mcf97psk8gd8"))))
464 (build-system python-build-system)
465 (native-inputs
466 `(("python-nose" ,python-nose)))
467 (propagated-inputs
468 `(("python-py-bcrypt" ,python-py-bcrypt)))
469 (arguments
470 `(#:phases
471 (alist-cons-before
472 'check 'set-PYTHON_EGG_CACHE
473 ;; some tests require access to "$HOME/.cython"
474 (lambda* _ (setenv "PYTHON_EGG_CACHE" "/tmp"))
475 %standard-phases)))
476 (home-page "https://bitbucket.org/ecollins/passlib")
477 (synopsis
478 "Comprehensive password hashing framework")
479 (description
480 "Passlib is a password hashing library for Python 2 & 3, which provides
481 cross-platform implementations of over 30 password hashing algorithms, as well
482 as a framework for managing existing password hashes. It's designed to be
483 useful for a wide range of tasks, from verifying a hash found in /etc/shadow,
484 to providing full-strength password hashing for multi-user application.")
485 (license license:bsd-3)))
486
487 (define-public python2-passlib
488 (package-with-python2 python-passlib))
489
490 (define-public python-py-bcrypt
491 (package
492 (name "python-py-bcrypt")
493 (version "0.4")
494 (source
495 (origin
496 (method url-fetch)
497 (uri (string-append
498 "https://pypi.python.org/packages/source/p/py-bcrypt/py-bcrypt-"
499 version
500 ".tar.gz"))
501 (sha256
502 (base32
503 "0y6smdggwi5s72v6p1nn53dg6w05hna3d264cq6kas0lap73p8az"))))
504 (build-system python-build-system)
505 (home-page "https://code.google.com/p/py-bcrypt")
506 (synopsis
507 "Bcrypt password hashing and key derivation")
508 (description
509 "A python wrapper of OpenBSD's Blowfish password hashing code. This
510 system hashes passwords using a version of Bruce Schneier's Blowfish block
511 cipher with modifications designed to raise the cost of off-line password
512 cracking and frustrate fast hardware implementation. The computation cost of
513 the algorithm is parametised, so it can be increased as computers get faster.
514 The intent is to make a compromise of a password database less likely to
515 result in an attacker gaining knowledge of the plaintext passwords (e.g. using
516 John the Ripper).")
517 ;; "sha2.c" is under BSD-3;
518 ;; "blowfish.c" and "bcrypt.c" are under BSD-4;
519 ;; the rest is under ISC.
520 (license (list license:isc license:bsd-3 license:bsd-4))))
521
522 (define-public python2-py-bcrypt
523 (package-with-python2 python-py-bcrypt))
524
525
526 (define-public python-paramiko
527 (package
528 (name "python-paramiko")
529 (version "1.16.0")
530 (source
531 (origin
532 (method url-fetch)
533 (uri (pypi-uri "paramiko" version))
534 (sha256
535 (base32
536 "14k8z7ndc3zk5xivnm4d8lncchx475ll5izpf8vmfbq7rp9yp5rj"))))
537 (build-system python-build-system)
538 (propagated-inputs
539 `(("python-pycrypto" ,python-pycrypto)
540 ("python-ecdsa" ,python-ecdsa)))
541 (home-page "http://www.paramiko.org/")
542 (synopsis "SSHv2 protocol library")
543 (description "Paramiko is a python implementation of the SSHv2 protocol,
544 providing both client and server functionality. While it leverages a Python C
545 extension for low level cryptography (PyCrypto), Paramiko itself is a pure
546 Python interface around SSH networking concepts.")
547 (license license:lgpl2.1+)))
548
549 (define-public python2-paramiko
550 (package-with-python2 python-paramiko))
551
552
553 (define-public python-httplib2
554 (package
555 (name "python-httplib2")
556 (version "0.9.2")
557 (source
558 (origin
559 (method url-fetch)
560 (uri (pypi-uri "httplib2" version))
561 (sha256
562 (base32
563 "126rsryvw9vhbf3qmsfw9lf4l4xm2srmgs439lgma4cpag4s3ay3"))))
564 (build-system python-build-system)
565 (home-page "https://github.com/jcgregorio/httplib2")
566 (synopsis "Comprehensive HTTP client library")
567 (description
568 "A comprehensive HTTP client library supporting many features left out of
569 other HTTP libraries.")
570 (license license:expat)))
571
572 (define-public python2-httplib2
573 (package-with-python2 python-httplib2))
574
575 (define-public python-ecdsa
576 (package
577 (name "python-ecdsa")
578 (version "0.13")
579 (source
580 (origin
581 (method url-fetch)
582 (uri (string-append
583 "https://pypi.python.org/packages/source/e/ecdsa/ecdsa-"
584 version
585 ".tar.gz"))
586 (sha256
587 (base32
588 "1yj31j0asmrx4an9xvsaj2icdmzy6pw0glfpqrrkrphwdpi1xkv4"))))
589 (build-system python-build-system)
590 (inputs
591 `(("openssl" ,openssl)))
592 (home-page
593 "http://github.com/warner/python-ecdsa")
594 (synopsis
595 "ECDSA cryptographic signature library (pure python)")
596 (description
597 "This is an easy-to-use implementation of ECDSA cryptography (Elliptic
598 Curve Digital Signature Algorithm), implemented purely in Python. With this
599 library, you can quickly create keypairs (signing key and verifying key), sign
600 messages, and verify the signatures. The keys and signatures are very short,
601 making them easy to handle and incorporate into other protocols.")
602 (license license:expat)))
603
604 (define-public python2-ecdsa
605 (package-with-python2 python-ecdsa))
606
607 (define-public python-ccm
608 (package
609 (name "python-ccm")
610 (version "2.1.6")
611 (source
612 (origin
613 (method url-fetch)
614 (uri (pypi-uri "ccm" version))
615 (sha256
616 (base32
617 "177dfxsmk3k4cih6fh6v8d91bh4nqx7ns6pc07w7m7i3cvdx3c8n"))))
618 (build-system python-build-system)
619 (propagated-inputs
620 `(("python-pyyaml" ,python-pyyaml)
621 ("python-six" ,python-six)))
622 (home-page "https://github.com/pcmanus/ccm")
623 (synopsis "Cassandra Cluster Manager")
624 (description "A script/library to create, launch and remove an Apache
625 Cassandra cluster on localhost.")
626 (license license:asl2.0)))
627
628 (define-public python2-ccm
629 (package-with-python2 python-ccm))
630
631 (define-public python-pytz
632 (package
633 (name "python-pytz")
634 (version "2016.3")
635 (source
636 (origin
637 (method url-fetch)
638 (uri (pypi-uri "pytz" version ".tar.bz2"))
639 (sha256
640 (base32
641 "1mjmrkk4vc5xzppw7fm0pli1nnbj57cvqv7jjv5whcmccyhxz4y1"))))
642 (build-system python-build-system)
643 (arguments `(#:tests? #f)) ; no test target
644 (home-page "http://pythonhosted.org/pytz")
645 (synopsis "Python timezone library")
646 (description
647 "This library allows accurate and cross platform timezone calculations
648 using Python 2.4 or higher and provides access to the Olson timezone database.")
649 (license license:expat)))
650
651 (define-public python2-pytz
652 (package-with-python2 python-pytz))
653
654
655 (define-public python-babel
656 (package
657 (name "python-babel")
658 (version "2.3.2")
659 (source
660 (origin
661 (method url-fetch)
662 (uri (pypi-uri "Babel" version))
663 (sha256
664 (base32
665 "0k43pi0p1dwpds2w0km3fw92wixzxv2vw7p09capxmjz5cfh23lw"))))
666 (build-system python-build-system)
667 (propagated-inputs
668 `(("python-pytz" ,python-pytz)))
669 (arguments `(#:tests? #f)) ; no test target
670 (home-page "http://babel.pocoo.org/")
671 (synopsis
672 "Tools for internationalizing Python applications")
673 (description
674 "Babel is composed of two major parts:
675 - tools to build and work with gettext message catalogs
676 - a Python interface to the CLDR (Common Locale Data Repository), providing
677 access to various locale display names, localized number and date formatting,
678 etc. ")
679 (license license:bsd-3)))
680
681 (define-public python2-babel
682 (package-with-python2 python-babel))
683
684 (define-public python2-backport-ssl-match-hostname
685 (package
686 (name "python2-backport-ssl-match-hostname")
687 (version "3.5.0.1")
688 (source
689 (origin
690 (method url-fetch)
691 (uri (string-append
692 "https://pypi.python.org/packages/source/b/"
693 "backports.ssl_match_hostname/backports.ssl_match_hostname-"
694 version ".tar.gz"))
695 (sha256
696 (base32
697 "1wndipik52cyqy0677zdgp90i435pmvwd89cz98lm7ri0y3xjajh"))))
698 (build-system python-build-system)
699 (arguments
700 `(#:python ,python-2
701 #:tests? #f)) ; no test target
702 (home-page "https://bitbucket.org/brandon/backports.ssl_match_hostname")
703 (synopsis "Backport of ssl.match_hostname() function from Python 3.5")
704 (description
705 "This backport brings the ssl.match_hostname() function to users of
706 earlier versions of Python. The function checks the hostname in the
707 certificate returned by the server to which a connection has been established,
708 and verifies that it matches the intended target hostname.")
709 (license license:psfl)))
710
711 (define-public python-h5py
712 (package
713 (name "python-h5py")
714 (version "2.6.0")
715 (source
716 (origin
717 (method url-fetch)
718 (uri (pypi-uri "h5py" version))
719 (sha256
720 (base32
721 "0df46dg7i7xfking9lp221bfm8dbl974yvlrbi1w7r6m61ac7bxj"))))
722 (build-system python-build-system)
723 (arguments
724 `(#:tests? #f ; no test target
725 #:phases
726 (modify-phases %standard-phases
727 (add-after 'unpack 'fix-hdf5-paths
728 (lambda* (#:key inputs #:allow-other-keys)
729 (let ((prefix (assoc-ref inputs "hdf5")))
730 (substitute* "setup_build.py"
731 (("\\['/opt/local/lib', '/usr/local/lib'\\]")
732 (string-append "['" prefix "/lib" "']"))
733 (("'/opt/local/include', '/usr/local/include'")
734 (string-append "'" prefix "/include" "'")))
735 (substitute* "setup_configure.py"
736 (("\\['/usr/local/lib', '/opt/local/lib'\\]")
737 (string-append "['" prefix "/lib" "']")))
738 #t))))))
739 (propagated-inputs
740 `(("python-numpy" ,python-numpy)))
741 (inputs
742 `(("hdf5" ,hdf5)
743 ("python-six" ,python-six)))
744 (native-inputs
745 `(("python-cython" ,python-cython)
746 ("python-pkgconfig" ,python-pkgconfig)))
747 (home-page "http://www.h5py.org/")
748 (synopsis "Read and write HDF5 files from Python")
749 (description
750 "The h5py package provides both a high- and low-level interface to the
751 HDF5 library from Python. The low-level interface is intended to be a
752 complete wrapping of the HDF5 API, while the high-level component supports
753 access to HDF5 files, datasets and groups using established Python and NumPy
754 concepts.")
755 (license license:bsd-3)
756 (properties `((python2-variant . ,(delay python2-h5py))))))
757
758 (define-public python2-h5py
759 (package-with-python2 (strip-python2-variant python-h5py)))
760
761 (define-public python-lockfile
762 (package
763 (name "python-lockfile")
764 (version "0.12.2")
765 (source
766 (origin
767 (method url-fetch)
768 (uri (string-append "https://pypi.python.org/packages/source/l/lockfile/"
769 "lockfile-" version ".tar.gz"))
770 (sha256
771 (base32
772 "16gpx5hm73ah5n1079ng0vy381hl802v606npkx4x8nb0gg05vba"))))
773 (build-system python-build-system)
774 (arguments '(#:test-target "check"))
775 (native-inputs
776 `(("python-pbr" ,python-pbr)))
777 (home-page "https://launchpad.net/pylockfile")
778 (synopsis "Platform-independent file locking module")
779 (description
780 "The lockfile package exports a LockFile class which provides a simple
781 API for locking files.")
782 (license license:expat)))
783
784 (define-public python2-lockfile
785 (package-with-python2 python-lockfile))
786
787 (define-public python-mock
788 (package
789 (name "python-mock")
790 (version "1.0.1")
791 (source
792 (origin
793 (method url-fetch)
794 (uri (string-append "https://pypi.python.org/packages/source/m/mock/"
795 "mock-" version ".tar.gz"))
796 (sha256
797 (base32
798 "0kzlsbki6q0awf89rc287f3aj8x431lrajf160a70z0ikhnxsfdq"))))
799 (build-system python-build-system)
800 (arguments '(#:test-target "check"))
801 (home-page "http://code.google.com/p/mock/")
802 (synopsis "Python mocking and patching library for testing")
803 (description
804 "Mock is a library for testing in Python. It allows you to replace parts
805 of your system under test with mock objects and make assertions about how they
806 have been used.")
807 (license license:expat)))
808
809 (define-public python2-mock
810 (package-with-python2 python-mock))
811
812
813 (define-public python-setuptools
814 (package
815 (name "python-setuptools")
816 (version "18.3.1")
817 (source
818 (origin
819 (method url-fetch)
820 (uri (string-append "https://pypi.python.org/packages/source/s/setuptools/setuptools-"
821 version ".tar.gz"))
822 (sha256
823 (base32
824 "0kc7rbav00ks6iaw14p38y81q12fx0lpkhgf5m97xc04f5r318ig"))))
825 (build-system python-build-system)
826 ;; FIXME: Tests require pytest, which itself relies on setuptools.
827 ;; One could bootstrap with an internal untested setuptools.
828 (arguments
829 `(#:tests? #f))
830 (home-page "https://pypi.python.org/pypi/setuptools")
831 (synopsis
832 "Library designed to facilitate packaging Python projects")
833 (description
834 "Setuptools is a fully-featured, stable library designed to facilitate
835 packaging Python projects, where packaging includes:
836 Python package and module definitions,
837 distribution package metadata,
838 test hooks,
839 project installation,
840 platform-specific details,
841 Python 3 support.")
842 (license license:psfl)))
843
844 (define-public python2-setuptools
845 (package-with-python2 python-setuptools))
846
847
848 (define-public python-pycrypto
849 (package
850 (name "python-pycrypto")
851 (version "2.6.1")
852 (source
853 (origin
854 (method url-fetch)
855 (uri (string-append "https://pypi.python.org/packages/source/p/"
856 "pycrypto/pycrypto-" version ".tar.gz"))
857 (sha256
858 (base32
859 "0g0ayql5b9mkjam8hym6zyg6bv77lbh66rv1fyvgqb17kfc1xkpj"))))
860 (build-system python-build-system)
861 (inputs
862 `(("python" ,python)
863 ("gmp" ,gmp)))
864 (arguments
865 `(#:phases
866 (alist-cons-before
867 'build 'set-build-env
868 ;; pycrypto runs an autoconf configure script behind the scenes
869 (lambda _
870 (setenv "CONFIG_SHELL" (which "bash")))
871 %standard-phases)))
872 (home-page "http://www.pycrypto.org/")
873 (synopsis "Cryptographic modules for Python")
874 (description
875 "Pycrypto is a collection of both secure hash functions (such as SHA256
876 and RIPEMD160), and various encryption algorithms (AES, DES, RSA, ElGamal,
877 etc.). The package is structured to make adding new modules easy.")
878 (license license:public-domain)))
879
880 (define-public python2-pycrypto
881 (let ((pycrypto (package-with-python2 python-pycrypto)))
882 (package (inherit pycrypto)
883 (inputs
884 `(("python" ,python-2)
885 ,@(alist-delete
886 "python"
887 (package-inputs pycrypto)))))))
888
889 (define-public python-keyring
890 (package
891 (name "python-keyring")
892 (version "8.7")
893 (source
894 (origin
895 (method url-fetch)
896 (uri (pypi-uri "keyring" version))
897 (sha256
898 (base32
899 "0482rmi2x6p78wl2kz8qzyq21xz1sbbfwnv5x7dggar4vkwxhzfx"))))
900 (build-system python-build-system)
901 (native-inputs
902 `(("python-setuptools-scm" ,python-setuptools-scm)))
903 (propagated-inputs
904 `(("python-pycrypto" ,python-pycrypto)))
905 (arguments
906 `(#:tests? #f)) ;TODO: tests require pytest
907 (home-page "https://github.com/jaraco/keyring")
908 (synopsis "Store and access your passwords safely")
909 (description
910 "The Python keyring lib provides a easy way to access the system keyring
911 service from python. It can be used in any application that needs safe
912 password storage.")
913 ;; "MIT" and PSF dual license
914 (license license:x11)))
915
916 (define-public python2-keyring
917 (package-with-python2 python-keyring))
918
919 (define-public python-six
920 (package
921 (name "python-six")
922 (version "1.10.0")
923 (source
924 (origin
925 (method url-fetch)
926 (uri (pypi-uri "six" version))
927 (sha256
928 (base32
929 "0snmb8xffb3vsma0z67i0h0w2g2dy0p3gsgh9gi4i0kgc5l8spqh"))))
930 (build-system python-build-system)
931 (home-page "http://pypi.python.org/pypi/six/")
932 (synopsis "Python 2 and 3 compatibility utilities")
933 (description
934 "Six is a Python 2 and 3 compatibility library. It provides utility
935 functions for smoothing over the differences between the Python versions with
936 the goal of writing Python code that is compatible on both Python versions.
937 Six supports every Python version since 2.5. It is contained in only one
938 Python file, so it can be easily copied into your project.")
939 (license license:x11)))
940
941 (define-public python2-six
942 (package-with-python2 python-six))
943
944 (define-public python-dateutil-2
945 (package
946 (name "python-dateutil")
947 (version "2.5.2")
948 (source
949 (origin
950 (method url-fetch)
951 (uri (pypi-uri "python-dateutil" version))
952 (sha256
953 (base32
954 "0jrfpcgvgya6hs45dhrd9yiqgdgz9qp9aa07zsw8gqgn8zphff86"))))
955 (build-system python-build-system)
956 (propagated-inputs
957 `(("python-six" ,python-six)))
958 (home-page "https://dateutil.readthedocs.io/en/stable/")
959 (synopsis "Extensions to the standard datetime module")
960 (description
961 "The dateutil module provides powerful extensions to the standard
962 datetime module, available in Python 2.3+.")
963 (license license:bsd-3)))
964
965 (define-public python2-dateutil-2
966 (package-with-python2 python-dateutil-2))
967
968 (define-public python-dateutil
969 (package
970 (name "python-dateutil")
971 (version "1.5") ; last version for python < 3
972 (source
973 (origin
974 (method url-fetch)
975 (uri (string-append "http://labix.org/download/python-dateutil/"
976 "python-dateutil-" version ".tar.gz"))
977 (sha256
978 (base32
979 "0fqfglhy5khbvsipr3x7m6bcaqljh8xl5cw33vbfxy7qhmywm2n0"))))
980 (build-system python-build-system)
981 (home-page "https://dateutil.readthedocs.io/en/stable/")
982 (synopsis "Extensions to the standard datetime module")
983 (description
984 "The dateutil module provides powerful extensions to the standard
985 datetime module, available in Python 2.3+.")
986 (license license:psfl)))
987
988 (define-public python2-dateutil
989 (package-with-python2 python-dateutil))
990
991 (define-public python-parsedatetime
992 (package
993 (name "python-parsedatetime")
994 (version "2.1")
995 (source
996 (origin
997 (method url-fetch)
998 (uri (pypi-uri "parsedatetime" version))
999 (sha256
1000 (base32
1001 "0bdgyw6y3v7bcxlx0p50s8drxsh5bb5cy2afccqr3j90amvpii8p"))))
1002 (build-system python-build-system)
1003 (native-inputs
1004 `(("python-nose" ,python-nose)
1005 ("python-pyicu" ,python-pyicu)))
1006 (home-page "http://github.com/bear/parsedatetime/")
1007 (synopsis
1008 "Parse human-readable date/time text")
1009 (description
1010 "Parse human-readable date/time text.")
1011 (license license:asl2.0)))
1012
1013 (define-public python2-parsedatetime
1014 (package-with-python2 python-parsedatetime))
1015
1016 (define-public python-pandas
1017 (package
1018 (name "python-pandas")
1019 (version "0.18.1")
1020 (source
1021 (origin
1022 (method url-fetch)
1023 (uri (string-append
1024 "https://pypi.python.org/packages/11/09/"
1025 "e66eb844daba8680ddff26335d5b4fead77f60f957678243549a8dd4830d/"
1026 "pandas-" version ".tar.gz"))
1027 (sha256
1028 (base32 "1ckpxrvvjj6zxmn68icd9hib8qcpx9b35f6izxnr25br5ilq7r6j"))))
1029 (build-system python-build-system)
1030 (propagated-inputs
1031 `(("python-numpy" ,python-numpy)
1032 ("python-pytz" ,python-pytz)
1033 ("python-dateutil" ,python-dateutil-2)))
1034 (native-inputs
1035 `(("python-nose" ,python-nose)))
1036 (home-page "http://pandas.pydata.org")
1037 (synopsis "Data structures for data analysis, time series, and statistics")
1038 (description
1039 "Pandas is a Python package providing fast, flexible, and expressive data
1040 structures designed to make working with structured (tabular,
1041 multidimensional, potentially heterogeneous) and time series data both easy
1042 and intuitive. It aims to be the fundamental high-level building block for
1043 doing practical, real world data analysis in Python.")
1044 (license license:bsd-3)))
1045
1046 (define-public python2-pandas
1047 (package-with-python2 python-pandas))
1048
1049 (define-public python-tzlocal
1050 (package
1051 (name "python-tzlocal")
1052 (version "1.2.2")
1053 (source
1054 (origin
1055 (method url-fetch)
1056 (uri (pypi-uri "tzlocal" version))
1057 (sha256
1058 (base32
1059 "0paj7vlsb0np8b5sp4bv64wxv7qk2piyp7xg29pkhdjwsbls9fnb"))))
1060 (build-system python-build-system)
1061 (propagated-inputs
1062 `(("python-pytz" ,python-pytz)))
1063 (home-page "https://github.com/regebro/tzlocal")
1064 (synopsis
1065 "Local timezone information for Python")
1066 (description
1067 "Tzlocal returns a tzinfo object with the local timezone information.
1068 This module attempts to fix a glaring hole in pytz, that there is no way to
1069 get the local timezone information, unless you know the zoneinfo name, and
1070 under several distributions that's hard or impossible to figure out.")
1071 (license license:cc0)))
1072
1073 (define-public python2-pysqlite
1074 (package
1075 (name "python2-pysqlite")
1076 (version "2.8.1")
1077 (source
1078 (origin
1079 (method url-fetch)
1080 (uri (pypi-uri "pysqlite" version))
1081 (sha256
1082 (base32
1083 "0rm0zqyb363y6wljhfmbxs16jjv7p8nk1d8zgq9sdwj6js7y3jkm"))))
1084 (build-system python-build-system)
1085 (inputs
1086 `(("sqlite" ,sqlite)))
1087 (arguments
1088 `(#:python ,python-2 ; incompatible with Python 3
1089 #:tests? #f)) ; no test target
1090 (home-page "http://github.com/ghaering/pysqlite")
1091 (synopsis "SQLite bindings for Python")
1092 (description
1093 "Pysqlite provides SQLite bindings for Python that comply to the
1094 Database API 2.0T.")
1095 (license license:zlib)))
1096
1097
1098 (define-public python2-mechanize
1099 (package
1100 (name "python2-mechanize")
1101 (version "0.2.5")
1102 (source
1103 (origin
1104 (method url-fetch)
1105 (uri (string-append "https://pypi.python.org/packages/source/m/mechanize/mechanize-"
1106 version ".tar.gz"))
1107 (sha256
1108 (base32
1109 "0rj7r166i1dyrq0ihm5rijfmvhs8a04im28lv05c0c3v206v4rrf"))))
1110 (build-system python-build-system)
1111 (arguments
1112 `(#:python ,python-2 ; apparently incompatible with Python 3
1113 #:tests? #f))
1114 ;; test fails with message
1115 ;; AttributeError: 'module' object has no attribute 'test_pullparser'
1116 ;; (python-3.3.2) or
1117 ;; AttributeError: 'module' object has no attribute 'test_urllib2_localnet'
1118 ;; (python-2.7.5).
1119 ;; The source code is from March 2011 and probably not up-to-date
1120 ;; with respect to python unit tests.
1121 (home-page "http://wwwsearch.sourceforge.net/mechanize/")
1122 (synopsis
1123 "Stateful programmatic web browsing in Python")
1124 (description
1125 "Mechanize implements stateful programmatic web browsing in Python,
1126 after Andy Lester’s Perl module WWW::Mechanize.")
1127 (license (license:non-copyleft
1128 "file://COPYING"
1129 "See COPYING in the distribution."))))
1130
1131
1132 (define-public python-simplejson
1133 (package
1134 (name "python-simplejson")
1135 (version "3.8.2")
1136 (source
1137 (origin
1138 (method url-fetch)
1139 (uri (pypi-uri "simplejson" version))
1140 (sha256
1141 (base32
1142 "0zylrnax8b6r0ndgni4w9c599fi6wm9vx5g6k3ddqfj3932kk16m"))))
1143 (build-system python-build-system)
1144 (home-page "http://simplejson.readthedocs.org/en/latest/")
1145 (synopsis
1146 "Json library for Python")
1147 (description
1148 "JSON (JavaScript Object Notation) is a subset of JavaScript
1149 syntax (ECMA-262 3rd edition) used as a lightweight data interchange
1150 format.
1151
1152 Simplejson exposes an API familiar to users of the standard library marshal
1153 and pickle modules. It is the externally maintained version of the json
1154 library contained in Python 2.6, but maintains compatibility with Python 2.5
1155 and (currently) has significant performance advantages, even without using
1156 the optional C extension for speedups. Simplejson is also supported on
1157 Python 3.3+.")
1158 (license license:x11)))
1159
1160 (define-public python2-simplejson
1161 (package-with-python2 python-simplejson))
1162
1163
1164 (define-public python-pyicu
1165 (package
1166 (name "python-pyicu")
1167 (version "1.9.2")
1168 (source
1169 (origin
1170 (method url-fetch)
1171 (uri (string-append "https://pypi.python.org/packages/source/P/PyICU/PyICU-"
1172 version ".tar.gz"))
1173 (sha256
1174 (base32
1175 "1diba0g8md614fvm9yf50paiwdkhj6rd7xwf1rg9mc0pxc0hhn4v"))))
1176 (build-system python-build-system)
1177 (inputs
1178 `(("icu4c" ,icu4c)))
1179 (home-page "http://pyicu.osafoundation.org/")
1180 (synopsis "Python extension wrapping the ICU C++ API")
1181 (description
1182 "PyICU is a python extension wrapping the ICU C++ API.")
1183 (license license:x11)))
1184
1185 (define-public python2-pyicu
1186 (package-with-python2 python-pyicu))
1187
1188 (define-public python2-dogtail
1189 ;; Python 2 only, as it leads to "TabError: inconsistent use of tabs and
1190 ;; spaces in indentation" with Python 3.
1191 (package
1192 (name "python2-dogtail")
1193 (version "0.8.2")
1194 (source (origin
1195 (method url-fetch)
1196 (uri (string-append
1197 "https://fedorahosted.org/released/dogtail/dogtail-"
1198 version ".tar.gz"))
1199 (sha256
1200 (base32
1201 "1yc4cg7ip87z15gyd4wy2vzbywrjc52a3m8r8gqy2b50d65llcg1"))))
1202 (build-system python-build-system)
1203 (arguments `(#:python ,python-2
1204 #:tests? #f)) ; invalid command "test"
1205 (home-page "https://fedorahosted.org/dogtail/")
1206 (synopsis "GUI test tool and automation framework written in ​Python")
1207 (description
1208 "Dogtail is a GUI test tool and automation framework written in Python.
1209 It uses Accessibility (a11y) technologies to communicate with desktop
1210 applications. dogtail scripts are written in Python and executed like any
1211 other Python program.")
1212 (license license:gpl2+)))
1213
1214 (define-public python2-empy
1215 (package
1216 (name "python2-empy")
1217 (version "3.3")
1218 (source (origin
1219 (method url-fetch)
1220 (uri (string-append "http://www.alcyone.com/software/empy/empy-"
1221 version ".tar.gz"))
1222 (sha256
1223 (base32
1224 "01g8mmkfnvjdmlhsihwyx56lrg7r5m5d2fg6mnxsvy6g0dnl69f6"))))
1225 (build-system python-build-system)
1226 (arguments
1227 `(#:python ,python-2
1228 #:phases (alist-replace
1229 'check
1230 (lambda _
1231 (zero? (system* "./test.sh")))
1232 %standard-phases)))
1233 (home-page "http://www.alcyone.com/software/empy/")
1234 (synopsis "Templating system for Python")
1235 (description
1236 "EmPy is a system for embedding Python expressions and statements in
1237 template text; it takes an EmPy source file, processes it, and produces
1238 output. This is accomplished via expansions, which are special signals to the
1239 EmPy system and are set off by a special prefix (by default the at sign, @@).
1240 EmPy can expand arbitrary Python expressions and statements in this way, as
1241 well as a variety of special forms. Textual data not explicitly delimited in
1242 this way is sent unaffected to the output, allowing Python to be used in
1243 effect as a markup language. Also supported are callbacks via hooks,
1244 recording and playback via diversions, and dynamic, chainable filters. The
1245 system is highly configurable via command line options and embedded
1246 commands.")
1247 (license license:lgpl2.1+)))
1248
1249 (define-public python2-element-tree
1250 (package
1251 (name "python2-element-tree")
1252 (version "1.2.6")
1253 (source (origin
1254 (method url-fetch)
1255 (uri (string-append
1256 "http://effbot.org/media/downloads/elementtree-"
1257 version "-20050316.tar.gz"))
1258 (sha256
1259 (base32
1260 "016bphqnlg0l4vslahhw4r0aanw95bpypy65r1i1acyb2wj5z7dj"))))
1261 (build-system python-build-system)
1262 (arguments
1263 `(#:python ,python-2 ; seems to be part of Python 3
1264 #:tests? #f)) ; no 'test' sub-command
1265 (synopsis "Toolkit for XML processing in Python")
1266 (description
1267 "ElementTree is a Python library supporting lightweight XML processing.")
1268 (home-page "http://effbot.org/zone/element-index.htm")
1269 (license (license:x11-style
1270 "http://docs.python.org/2/license.html"
1271 "Like \"CWI LICENSE AGREEMENT FOR PYTHON 0.9.0 THROUGH 1.2\"."))))
1272
1273 (define-public python2-pybugz
1274 (package
1275 (name "python2-pybugz")
1276 (version "0.6.11")
1277 (source (origin
1278 (method url-fetch)
1279 (uri (string-append
1280 "http://bits.liquidx.net/projects/pybugz/pybugz-"
1281 version ".tar.gz"))
1282 (sha256
1283 (base32
1284 "17ni00p08gp5lkxlrrcnvi3x09fmajnlbz4da03qcgl9q21ym4jd"))
1285 (patches (search-patches "pybugz-stty.patch"
1286 "pybugz-encode-error.patch"))))
1287 (build-system python-build-system)
1288 (arguments
1289 `(#:python ,python-2 ; SyntaxError with Python 3
1290 #:tests? #f)) ; no 'test' sub-command
1291 (propagated-inputs
1292 `(("element-tree" ,python2-element-tree)))
1293 (synopsis "Python and command-line interface to Bugzilla")
1294 (description
1295 "PyBugz is a Python library and command-line tool to query the Bugzilla
1296 bug tracking system. It is meant as an aid to speed up interaction with the
1297 bug tracker.")
1298 (home-page "http://www.liquidx.net/pybugz/")
1299 (license license:gpl2)))
1300
1301 (define-public python-enum34
1302 (package
1303 (name "python-enum34")
1304 (version "1.1.0")
1305 (source
1306 (origin
1307 (method url-fetch)
1308 (uri (pypi-uri "enum34" version))
1309 (sha256
1310 (base32
1311 "0yx1m4564wxgbm4glb3457hi16xihd9w63rv13y2przkdir9dfgp"))))
1312 (build-system python-build-system)
1313 (arguments
1314 `(#:phases
1315 (alist-replace
1316 'check
1317 (lambda _ (zero? (system* "python" "enum/test_enum.py")))
1318 %standard-phases)))
1319 (home-page "https://pypi.python.org/pypi/enum34")
1320 (synopsis "Backported Python 3.4 Enum")
1321 (description
1322 "Enum34 is the new Python stdlib enum module available in Python 3.4
1323 backported for previous versions of Python from 2.4 to 3.3.")
1324 (license license:bsd-3)))
1325
1326 (define-public python2-enum34
1327 (package-with-python2 python-enum34))
1328
1329 (define-public python-parse-type
1330 (package
1331 (name "python-parse-type")
1332 (version "0.3.4")
1333 (source
1334 (origin
1335 (method url-fetch)
1336 (uri (string-append "https://pypi.python.org/packages/source/p/"
1337 "parse_type/parse_type-" version ".tar.gz"))
1338 (sha256
1339 (base32
1340 "0iv1c34npr4iynwpgv1vkjx9rjd18a85ir8c01gc5f7wp8iv7l1x"))))
1341 (build-system python-build-system)
1342 (propagated-inputs
1343 `(("python-six" ,python-six)
1344 ("python-parse" ,python-parse)))
1345 (arguments '(#:tests? #f)) ;TODO: tests require pytest
1346 (home-page "https://github.com/jenisys/parse_type")
1347 (synopsis "Extended parse module")
1348 (description
1349 "Parse_type extends the python parse module.")
1350 (license license:bsd-3)))
1351
1352 (define-public python-parse
1353 (package
1354 (name "python-parse")
1355 (version "1.6.6")
1356 (source
1357 (origin
1358 (method url-fetch)
1359 (uri (pypi-uri "parse" version))
1360 (sha256
1361 (base32
1362 "0y31i3mwgv35qn0kzzjn9q8jqfdqmbi6sr6yfvn8rq4lqjm5lhvi"))
1363 (patches (search-patches "python-parse-too-many-fields.patch"))))
1364 (build-system python-build-system)
1365 (arguments
1366 `(#:phases
1367 (modify-phases %standard-phases
1368 (replace 'check
1369 (lambda _ (zero? (system* "python" "test_parse.py")))))))
1370 (home-page "https://github.com/r1chardj0n3s/parse")
1371 (synopsis "Parse strings")
1372 (description
1373 "Parse strings using a specification based on the Python format()
1374 syntax.")
1375 (license license:x11)))
1376
1377
1378 (define-public scons
1379 (package
1380 (name "scons")
1381 (version "2.3.4")
1382 (source (origin
1383 (method url-fetch)
1384 (uri (string-append "mirror://sourceforge/scons/scons/" version
1385 "/scons-" version ".tar.gz"))
1386 (sha256
1387 (base32
1388 "0hdlci43wjz8maryj83mz04ir6rwcdrrzpd7cpzvdlzycqhdfmsb"))))
1389 (build-system python-build-system)
1390 (arguments
1391 ;; With Python 3.x, fails to build with a syntax error.
1392 `(#:python ,python-2
1393 #:tests? #f)) ; no 'python setup.py test' command
1394 (home-page "http://scons.org/")
1395 (synopsis "Software construction tool written in Python")
1396 (description
1397 "SCons is a software construction tool. Think of SCons as an improved,
1398 cross-platform substitute for the classic Make utility with integrated
1399 functionality similar to autoconf/automake and compiler caches such as ccache.
1400 In short, SCons is an easier, more reliable and faster way to build
1401 software.")
1402 (license license:x11)))
1403
1404 (define-public python-extras
1405 (package
1406 (name "python-extras")
1407 (version "0.0.3")
1408 (source
1409 (origin
1410 (method url-fetch)
1411 (uri (string-append
1412 "https://pypi.python.org/packages/source/e/extras/extras-"
1413 version ".tar.gz"))
1414 (sha256
1415 (base32
1416 "1h7zx4dfyclalg0fqnfjijpn0f793a9mx8sy3b27gd31nr6dhq3s"))))
1417 (build-system python-build-system)
1418 (arguments
1419 ;; error in setup.cfg: command 'test' has no such option 'buffer'
1420 '(#:tests? #f))
1421 (home-page "https://github.com/testing-cabal/extras")
1422 (synopsis "Useful extensions to the Python standard library")
1423 (description
1424 "Extras is a set of extensions to the Python standard library.")
1425 (license license:expat)))
1426
1427 (define-public python2-extras
1428 (package-with-python2 python-extras))
1429
1430 (define-public python-mimeparse
1431 (package
1432 (name "python-mimeparse")
1433 (version "0.1.4")
1434 (source
1435 (origin
1436 (method url-fetch)
1437 (uri (string-append
1438 "https://pypi.python.org/packages/source/p/python-mimeparse/python-mimeparse-"
1439 version ".tar.gz"))
1440 (sha256
1441 (base32
1442 "1hyxg09kaj02ri0rmwjqi86wk4nd1akvv7n0dx77azz76wga4s9w"))))
1443 (build-system python-build-system)
1444 (arguments
1445 '(#:tests? #f)) ; no setup.py test command
1446 (home-page
1447 "https://github.com/dbtsai/python-mimeparse")
1448 (synopsis "Python library for parsing MIME types")
1449 (description
1450 "Mimeparse provides basic functions for parsing MIME type names and
1451 matching them against a list of media-ranges.")
1452 (license license:expat)))
1453
1454 (define-public python2-mimeparse
1455 (package-with-python2 python-mimeparse))
1456
1457 (define-public python-nose
1458 (package
1459 (name "python-nose")
1460 (version "1.3.7")
1461 (source
1462 (origin
1463 (method url-fetch)
1464 (uri (pypi-uri "nose" version))
1465 (sha256
1466 (base32
1467 "164a43k7k2wsqqk1s6vavcdamvss4mz0vd6pwzv2h9n8rgwzxgzi"))))
1468 (build-system python-build-system)
1469 (arguments
1470 '(#:tests? #f)) ; FIXME: test suite fails
1471 (home-page "http://readthedocs.org/docs/nose/")
1472 (synopsis "Python testing library")
1473 (description
1474 "Nose extends the unittest library to make testing easier.")
1475 (license license:lgpl2.0+)))
1476
1477 (define-public python2-nose
1478 (package-with-python2 python-nose))
1479
1480 (define-public python-nose2
1481 (package
1482 (name "python-nose2")
1483 (version "0.6.5")
1484 (source
1485 (origin
1486 (method url-fetch)
1487 (uri (pypi-uri "nose2" version))
1488 (sha256
1489 (base32
1490 "1x4zjq1zlyrh8b9ba0cmafd3w94pxhid408kibyjd3s6h1lap6s7"))))
1491 (build-system python-build-system)
1492 (arguments `(#:tests? #f)) ; 'module' object has no attribute 'collector'
1493 (propagated-inputs
1494 `(("python-cov-core" ,python-cov-core)
1495 ("python-pytest-cov" ,python-pytest-cov)
1496 ("python-six" ,python-six)))
1497 (home-page "https://github.com/nose-devs/nose2")
1498 (synopsis "Next generation of nicer testing for Python")
1499 (description
1500 "Nose2 is the next generation of nicer testing for Python, based on the
1501 plugins branch of unittest2. Nose2 aims to improve on nose by providing a
1502 better plugin api, being easier for users to configure, and simplifying internal
1503 interfaces and processes.")
1504 (license license:bsd-2)))
1505
1506 (define-public python2-nose2
1507 (package-with-python2 python-nose2))
1508
1509 (define-public python-unittest2
1510 (package
1511 (name "python-unittest2")
1512 (version "0.5.1")
1513 (source
1514 (origin
1515 (method url-fetch)
1516 (uri (string-append
1517 "https://pypi.python.org/packages/source/u/unittest2py3k/unittest2py3k-"
1518 version ".tar.gz"))
1519 (sha256
1520 (base32
1521 "00yl6lskygcrddx5zspkhr0ibgvpknl4678kkm6s626539grq93q"))))
1522 (build-system python-build-system)
1523 (home-page "http://pypi.python.org/pypi/unittest2")
1524 (synopsis "Python unit testing library")
1525 (description
1526 "Unittest2 is a replacement for the unittest module in the Python
1527 standard library.")
1528 (license license:psfl)))
1529
1530 (define-public python2-unittest2
1531 (package (inherit python-unittest2)
1532 (name "python2-unittest2")
1533 (version "0.5.1")
1534 (source
1535 (origin
1536 (method url-fetch)
1537 (uri (string-append
1538 "https://pypi.python.org/packages/source/u/unittest2/unittest2-"
1539 version ".tar.gz"))
1540 (sha256
1541 (base32
1542 "0wbs4i4x3x7klr3v35ss6p9mcqz883i1xgcpkhvl7n2lyv6yhpda"))))
1543 (arguments
1544 `(#:python ,python-2
1545 #:tests? #f)))) ; no setup.py test command
1546
1547 (define-public python-pafy
1548 (package
1549 (name "python-pafy")
1550 (version "0.5.2")
1551 (source
1552 (origin
1553 (method url-fetch)
1554 (uri (pypi-uri "pafy" version))
1555 (sha256
1556 (base32
1557 "1ckvrypyvb7jbqlgwdz0y337ajagjv7dgxyns326nqwypn1wpq0i"))))
1558 (build-system python-build-system)
1559 (propagated-inputs
1560 ;; Youtube-dl is a python package which is imported in the file
1561 ;; "backend_youtube_dl.py", therefore it needs to be propagated.
1562 `(("youtube-dl" ,youtube-dl)))
1563 (home-page "https://np1.github.io/pafy/")
1564 (synopsis "Retrieve YouTube content and metadata")
1565 (description
1566 "@code{pafy} is a python library to retrieve YouTube content and metadata.")
1567 (license license:lgpl3+)))
1568
1569 (define-public python-py
1570 (package
1571 (name "python-py")
1572 (version "1.4.31")
1573 (source
1574 (origin
1575 (method url-fetch)
1576 (uri (pypi-uri "py" version))
1577 (sha256
1578 (base32
1579 "0561gz2w3i825gyl42mcq14y3dcgkapfiv5zv9a2bz15qxiijl56"))))
1580 (build-system python-build-system)
1581 (home-page "http://pylib.readthedocs.org/")
1582 (synopsis "Python library for parsing, I/O, instrospection, and logging")
1583 (description
1584 "Py is a Python library for file name parsing, .ini file parsing, I/O,
1585 code introspection, and logging.")
1586 (license license:expat)))
1587
1588 (define-public python2-py
1589 (package-with-python2 python-py))
1590
1591 (define-public python-pytest
1592 (package
1593 (name "python-pytest")
1594 (version "2.7.3")
1595 (source
1596 (origin
1597 (method url-fetch)
1598 (uri (string-append
1599 "https://pypi.python.org/packages/source/p/pytest/pytest-"
1600 version ".tar.gz"))
1601 (sha256
1602 (base32
1603 "1z4yi986f9n0p8qmzmn21m21m8j1x78hk3505f89baqm6pdw7afm"))
1604 (modules '((guix build utils)))
1605 (snippet
1606 ;; One of the tests involves the /usr directory, so it fails.
1607 '(substitute* "testing/test_argcomplete.py"
1608 (("def test_remove_dir_prefix\\(self\\):")
1609 "@pytest.mark.xfail\n def test_remove_dir_prefix(self):")))))
1610 (build-system python-build-system)
1611 (inputs
1612 `(("python-py" ,python-py)
1613 ("python-nose" ,python-nose)
1614 ("python-mock" ,python-mock)))
1615 (home-page "http://pytest.org")
1616 (synopsis "Python testing library")
1617 (description
1618 "Pytest is a testing tool that provides auto-discovery of test modules
1619 and functions, detailed info on failing assert statements, modular fixtures,
1620 and many external plugins.")
1621 (license license:expat)))
1622
1623 (define-public python2-pytest
1624 (package-with-python2 python-pytest))
1625
1626 ;; This package is used by Borg until we can upgrade all our Python packages to
1627 ;; use a more recent pytest.
1628 (define-public python-pytest-2.9.2
1629 (package
1630 (inherit python-pytest)
1631 (name "python-pytest")
1632 (version "2.9.2")
1633 (source (origin
1634 (method url-fetch)
1635 (uri (pypi-uri "pytest" version))
1636 (sha256
1637 (base32
1638 "1n6igbc1b138wx1q5gca4pqw1j6nsyicfxds5n0b5989kaxqmh8j"))))
1639 (arguments
1640 `(#:phases
1641 (modify-phases %standard-phases
1642 (add-before 'check 'disable-invalid-test
1643 (lambda _
1644 (substitute* "testing/test_argcomplete.py"
1645 (("def test_remove_dir_prefix" line)
1646 (string-append "@pytest.mark.skip"
1647 "(reason=\"Assumes that /usr exists.\")\n "
1648 line)))
1649 #t)))))))
1650
1651 (define-public python-pytest-cov
1652 (package
1653 (name "python-pytest-cov")
1654 (version "2.2.1")
1655 (source
1656 (origin
1657 (method url-fetch)
1658 (uri (pypi-uri "pytest-cov" version))
1659 (sha256
1660 (base32
1661 "1yl4nbhzfgsxqlsyk4clafgp9x11zvgrkprm9i2p3fgkwx9jxcm8"))))
1662 (build-system python-build-system)
1663 (propagated-inputs
1664 `(("python-coverage" ,python-coverage)
1665 ("python-pytest" ,python-pytest)))
1666 (home-page "https://github.com/pytest-dev/pytest-cov")
1667 (synopsis "Pytest plugin for measuring coverage")
1668 (description
1669 "Pytest-cov produces coverage reports. It supports centralised testing and
1670 distributed testing in both @code{load} and @code{each} modes. It also
1671 supports coverage of subprocesses.")
1672 (license license:expat)))
1673
1674 (define-public python2-pytest-cov
1675 (package-with-python2 python-pytest-cov))
1676
1677 (define-public python-pytest-runner
1678 (package
1679 (name "python-pytest-runner")
1680 (version "2.6.2")
1681 (source
1682 (origin
1683 (method url-fetch)
1684 (uri (pypi-uri "pytest-runner" version))
1685 (sha256
1686 (base32
1687 "1nwcqx0l3fv52kv8526wy8ypzghbq96c96di318d98d3wh7a8xg7"))))
1688 (build-system python-build-system)
1689 (arguments
1690 `(#:phases
1691 (modify-phases %standard-phases
1692 ;; The fancy way of setting the version with setuptools_scm does not
1693 ;; seem to work here.
1694 (add-after 'unpack 'set-version
1695 (lambda _
1696 (substitute* "docs/conf.py"
1697 (("version = setuptools_scm\\.get_version\\(root='\\.\\.')")
1698 (string-append "version = \"" ,version "\"")))
1699 #t)))))
1700 (native-inputs
1701 `(("python-pytest" ,python-pytest)
1702 ("python-setuptools-scm" ,python-setuptools-scm)))
1703 (home-page "https://github.com/pytest-dev/pytest-runner")
1704 (synopsis "Invoke py.test as a distutils command")
1705 (description
1706 "This package provides a @command{pytest-runner} command that
1707 @file{setup.py} files can use to run tests.")
1708 (license license:expat)))
1709
1710 (define-public python2-pytest-runner
1711 (package-with-python2 python-pytest-runner))
1712
1713 (define-public python-pytest-mock
1714 (package
1715 (name "python-pytest-mock")
1716 (version "1.2")
1717 (source
1718 (origin
1719 (method url-fetch)
1720 (uri (pypi-uri "pytest-mock" version ".zip"))
1721 (sha256
1722 (base32
1723 "03zxar5drzm7ksqyrwypjaza3cri6wqvpr6iam92djvg6znp32gp"))))
1724 (build-system python-build-system)
1725 (native-inputs
1726 `(("unzip" ,unzip)))
1727 (propagated-inputs
1728 `(("python-py" ,python-py)
1729 ("python-pytest" ,python-pytest)))
1730 (home-page "https://github.com/pytest-dev/pytest-mock/")
1731 (synopsis "Thin-wrapper around the mock package for easier use with py.test")
1732 (description
1733 "This plugin installs a @code{mocker} fixture which is a thin-wrapper
1734 around the patching API provided by the @code{mock} package, but with the
1735 benefit of not having to worry about undoing patches at the end of a test.
1736 The mocker fixture has the same API as @code{mock.patch}, supporting the
1737 same arguments.")
1738 (properties `((python2-variant . ,(delay python2-pytest-mock))))
1739 (license license:expat)))
1740
1741 (define-public python2-pytest-mock
1742 (let ((base (package-with-python2
1743 (strip-python2-variant python-pytest-mock))))
1744 (package (inherit base)
1745 (propagated-inputs
1746 `(("python2-mock" ,python2-mock)
1747 ,@(package-propagated-inputs base))))))
1748
1749 (define-public python-pytest-xdist
1750 (package
1751 (name "python-pytest-xdist")
1752 (version "1.14")
1753 (source
1754 (origin
1755 (method url-fetch)
1756 (uri (pypi-uri "pytest-xdist" version ".zip"))
1757 (sha256
1758 (base32
1759 "08rn2l39ds60xshs4js787l84pfckksqklfq2wq9x8ig2aci2pja"))
1760 (modules '((guix build utils)))
1761 (snippet
1762 '(begin
1763 ;; Remove pre-compiled .pyc files from source.
1764 (for-each delete-file-recursively
1765 (find-files "." "__pycache__" #:directories? #t))
1766 (for-each delete-file (find-files "." "\\.pyc$"))
1767 #t))))
1768 (build-system python-build-system)
1769 (native-inputs
1770 `(("unzip" ,unzip)
1771 ("python-setuptools-scm" ,python-setuptools-scm)))
1772 (propagated-inputs
1773 `(("python-apipkg" ,python-apipkg)
1774 ("python-execnet" ,python-execnet)
1775 ("python-pytest" ,python-pytest)
1776 ("python-py" ,python-py)))
1777 (home-page
1778 "https://github.com/pytest-dev/pytest-xdist")
1779 (synopsis
1780 "Plugin for py.test with distributed testing and loop-on-failing modes")
1781 (description
1782 "The pytest-xdist plugin extends py.test with some unique test execution
1783 modes: parallelization, running tests in boxed subprocesses, the ability
1784 to run tests repeatedly when failed, and the ability to run tests on multiple
1785 Python interpreters or platforms. It uses rsync to copy the existing
1786 program code to a remote location, executes there, and then syncs the
1787 result back.")
1788 (license license:expat)))
1789
1790 (define-public python2-pytest-xdist
1791 (package-with-python2 python-pytest-xdist))
1792
1793 (define-public python-scripttest
1794 (package
1795 (name "python-scripttest")
1796 (version "1.3")
1797 (source
1798 (origin
1799 (method url-fetch)
1800 (uri (string-append
1801 "https://pypi.python.org/packages/source/s/scripttest/scripttest-"
1802 version ".tar.gz"))
1803 (sha256
1804 (base32
1805 "0f4w84k8ck82syys7yg9maz93mqzc8p5ymis941x034v44jzq74m"))))
1806 (build-system python-build-system)
1807 (propagated-inputs
1808 `(("python-pytest" ,python-pytest)))
1809 (home-page "http://pythonpaste.org/scripttest/")
1810 (synopsis "Python library to test command-line scripts")
1811 (description "Scripttest is a Python helper library for testing
1812 interactive command-line applications. With it you can run a script in a
1813 subprocess and see the output as well as any file modifications.")
1814 (license license:expat)))
1815
1816 (define-public python2-scripttest
1817 (package-with-python2 python-scripttest))
1818
1819 (define-public python-testtools
1820 (package
1821 (name "python-testtools")
1822 (version "1.0.0")
1823 (source
1824 (origin
1825 (method url-fetch)
1826 (uri (string-append
1827 "https://pypi.python.org/packages/source/t/testtools/testtools-"
1828 version ".tar.gz"))
1829 (sha256
1830 (base32
1831 "1dyml28ykpl5jb9khdmcdvhy1cxqingys6qvj2k04fzlaj6z3bbx"))))
1832 (build-system python-build-system)
1833 (propagated-inputs
1834 `(("python-mimeparse" ,python-mimeparse)
1835 ("python-extras" ,python-extras)))
1836 (home-page "https://github.com/testing-cabal/testtools")
1837 (synopsis
1838 "Extensions to the Python standard library unit testing framework")
1839 (description
1840 "Testtools extends the Python standard library unit testing framework to
1841 provide matchers, more debugging information, and cross-Python
1842 compatibility.")
1843 (license license:psfl)))
1844
1845 (define-public python2-testtools
1846 (package-with-python2 python-testtools))
1847
1848 (define-public python-testscenarios
1849 (package
1850 (name "python-testscenarios")
1851 (version "0.4")
1852 (source
1853 (origin
1854 (method url-fetch)
1855 (uri (string-append
1856 "https://pypi.python.org/packages/source/t/testscenarios/testscenarios-"
1857 version ".tar.gz"))
1858 (sha256
1859 (base32
1860 "1671jvrvqlmbnc42j7pc5y6vc37q44aiwrq0zic652pxyy2fxvjg"))))
1861 (build-system python-build-system)
1862 (propagated-inputs
1863 `(("python-testtools" ,python-testtools)
1864 ("python-mimeparse" ,python-mimeparse)))
1865 (home-page "https://launchpad.net/testscenarios")
1866 (synopsis "Pyunit extension for dependency injection")
1867 (description
1868 "Testscenarios provides clean dependency injection for Python unittest
1869 style tests.")
1870 (license (list license:bsd-3 license:asl2.0)))) ; at the user's option
1871
1872 (define-public python2-testscenarios
1873 (package-with-python2 python-testscenarios))
1874
1875 (define-public python-testresources
1876 (package
1877 (name "python-testresources")
1878 (version "0.2.7")
1879 (source
1880 (origin
1881 (method url-fetch)
1882 (uri (string-append
1883 "https://pypi.python.org/packages/source/t/testresources/testresources-"
1884 version ".tar.gz"))
1885 (sha256
1886 (base32
1887 "0cbj3plbllyz42c4b5xxgwaa7mml54lakslrn4kkhinxhdri22md"))))
1888 (build-system python-build-system)
1889 (home-page "https://launchpad.net/testresources")
1890 (synopsis
1891 "Pyunit extension for managing test resources")
1892 (description
1893 "Testresources is an extension to Python's unittest to allow declarative
1894 use of resources by test cases.")
1895 (license (list license:bsd-3 license:asl2.0)))) ; at the user's option
1896
1897 (define-public python2-testresources
1898 (package-with-python2 python-testresources))
1899
1900 (define-public python-subunit
1901 (package
1902 (name "python-subunit")
1903 (version "0.0.21")
1904 (source
1905 (origin
1906 (method url-fetch)
1907 (uri (string-append
1908 "https://pypi.python.org/packages/source/p/python-subunit/python-subunit-"
1909 version ".tar.gz"))
1910 (sha256
1911 (base32
1912 "1nkw9wfbvizmpajbj3in8ns07g7lwkiv8hip14jjlwk3cacls6jv"))))
1913 (build-system python-build-system)
1914 (propagated-inputs
1915 `(("python-testtools" ,python-testtools)
1916 ("python-mimeparse" ,python-mimeparse)
1917 ("python-testscenarios" ,python-testscenarios)))
1918 (home-page "http://launchpad.net/subunit")
1919 (synopsis "Python implementation of the subunit protocol")
1920 (description
1921 "Python-subunit is a Python implementation of the subunit test streaming
1922 protocol.")
1923 (license (list license:bsd-3 license:asl2.0)))) ; at the user's option
1924
1925 (define-public python2-subunit
1926 (package-with-python2 python-subunit))
1927
1928 ;; Recent versions of python-fixtures need a recent version of python-pbr,
1929 ;; which needs a recent version of python-fixtures. To fix this circular
1930 ;; dependency, we keep old versions of python-fixtures and python-pbr to
1931 ;; bootstrap the whole thing:
1932 ;; - python-fixtures-0.3.16 is used to build python-pbr-0.11
1933 ;; - python-pbr-0.11 is used to build python-fixtures
1934 ;; - python-fixtures is used to build python-pbr
1935 (define-public python-fixtures-0.3.16
1936 (package
1937 (name "python-fixtures")
1938 (version "0.3.16")
1939 (source
1940 (origin
1941 (method url-fetch)
1942 (uri (string-append
1943 "https://pypi.python.org/packages/source/f/fixtures/fixtures-"
1944 version ".tar.gz"))
1945 (sha256
1946 (base32
1947 "0x9r2gwilcig5g54k60bxzg96zabizq1855lrprlb4zckalp9asc"))))
1948 (build-system python-build-system)
1949 (arguments
1950 '(#:tests? #f)) ; no setup.py test command
1951 (home-page "https://launchpad.net/python-fixtures")
1952 (synopsis "Python test fixture library")
1953 (description
1954 "Fixtures provides a way to create reusable state, useful when writing
1955 Python tests.")
1956 (license (list license:bsd-3 license:asl2.0)))) ; at user's option
1957
1958 (define-public python2-fixtures-0.3.16
1959 (package-with-python2 python-fixtures-0.3.16))
1960
1961 (define-public python-pbr-0.11
1962 (package
1963 (name "python-pbr")
1964 (version "0.11.0")
1965 (source
1966 (origin
1967 (method url-fetch)
1968 (uri (string-append
1969 "https://pypi.python.org/packages/source/p/pbr/pbr-"
1970 version ".tar.gz"))
1971 (sha256
1972 (base32
1973 "0v9gb7gyqf7q9s99l0nnjj9ww9b0jvyqlwm4d56pcyinxydddw6p"))))
1974 (build-system python-build-system)
1975 (arguments
1976 `(#:tests? #f)) ;; Most tests seem to use the Internet.
1977 (propagated-inputs
1978 `(("python-fixtures-0.3.16" ,python-fixtures-0.3.16)))
1979 (home-page "https://launchpad.net/pbr")
1980 (synopsis "Change the default behavior of Python’s setuptools")
1981 (description
1982 "Python Build Reasonableness (PBR) is a library that injects some useful
1983 and sensible default behaviors into your setuptools run.")
1984 (license license:asl2.0)))
1985
1986 (define-public python2-pbr-0.11
1987 (package-with-python2 python-pbr-0.11))
1988
1989 (define-public python-pbr
1990 (package
1991 (name "python-pbr")
1992 (version "1.8.1")
1993 (source
1994 (origin
1995 (method url-fetch)
1996 (uri (string-append
1997 "https://pypi.python.org/packages/source/p/pbr/pbr-"
1998 version
1999 ".tar.gz"))
2000 (sha256
2001 (base32
2002 "0jcny36cf3s8ar5r4a575npz080hndnrfs4np1fqhv0ym4k7c4p2"))))
2003 (build-system python-build-system)
2004 (arguments
2005 `(#:tests? #f)) ;; Most tests seem to use the Internet.
2006 (propagated-inputs
2007 `(("python-testrepository" ,python-testrepository)
2008 ("git" ,git))) ;; pbr actually uses the "git" binary.
2009 (inputs
2010 `(("python-fixtures" ,python-fixtures)
2011 ("python-mimeparse" ,python-mimeparse)
2012 ("python-mock" ,python-mock)
2013 ("python-six" ,python-six)
2014 ("python-sphinx" ,python-sphinx)
2015 ("python-testrepository" ,python-testrepository)
2016 ("python-testresources" ,python-testresources)
2017 ("python-testscenarios" ,python-testscenarios)
2018 ("python-testtools" ,python-testtools)
2019 ("python-virtualenv" ,python-virtualenv)))
2020 (home-page "https://launchpad.net/pbr")
2021 (synopsis "Change the default behavior of Python’s setuptools")
2022 (description
2023 "Python Build Reasonableness (PBR) is a library that injects some useful
2024 and sensible default behaviors into your setuptools run.")
2025 (license license:asl2.0)))
2026
2027 (define-public python2-pbr
2028 (package-with-python2 python-pbr))
2029
2030 (define-public python-fixtures
2031 (package
2032 (name "python-fixtures")
2033 (version "1.4.0")
2034 (source
2035 (origin
2036 (method url-fetch)
2037 (uri (pypi-uri "fixtures" version))
2038 (sha256
2039 (base32
2040 "0djxvdwm8s60dbfn7bhf40x6g818p3b3mlwijm1c3bqg7msn271y"))))
2041 (build-system python-build-system)
2042 (propagated-inputs
2043 `(("python-six" ,python-six)
2044 ("python-pbr-0.11" ,python-pbr-0.11)))
2045 (inputs
2046 `(;; Tests
2047 ("python-testtools" ,python-testtools)))
2048 (arguments
2049 '(#:tests? #f)) ; no setup.py test command
2050 (home-page "https://launchpad.net/python-fixtures")
2051 (synopsis "Python test fixture library")
2052 (description
2053 "Fixtures provides a way to create reusable state, useful when writing
2054 Python tests.")
2055 (license (list license:bsd-3 license:asl2.0)))) ; at user's option
2056
2057 (define-public python2-fixtures
2058 (package-with-python2 python-fixtures))
2059
2060 (define-public python-testrepository
2061 (package
2062 (name "python-testrepository")
2063 (version "0.0.20")
2064 (source
2065 (origin
2066 (method url-fetch)
2067 (uri (string-append
2068 "https://pypi.python.org/packages/source/t/testrepository/testrepository-"
2069 version ".tar.gz"))
2070 (sha256
2071 (base32
2072 "1ssqb07c277010i6gzzkbdd46gd9mrj0bi0i8vn560n2k2y4j93m"))))
2073 (build-system python-build-system)
2074 (propagated-inputs
2075 `(("python-fixtures-0.3.16" ,python-fixtures-0.3.16)
2076 ("python-testtools" ,python-testtools)))
2077 (inputs
2078 `(("python-subunit" ,python-subunit)
2079 ("python-mimeparse" ,python-mimeparse)))
2080 (home-page "https://launchpad.net/testrepository")
2081 (synopsis "Database for Python test results")
2082 (description "Testrepository provides a database of test results which can
2083 be used as part of a developer's workflow to check things such as what tests
2084 have failed since the last commit or what tests are currently failing.")
2085 (license (list license:bsd-3 license:asl2.0)))) ; at user's option
2086
2087 (define-public python2-testrepository
2088 (package-with-python2 python-testrepository))
2089
2090 (define-public python-coverage
2091 (package
2092 (name "python-coverage")
2093 (version "4.1")
2094 (source
2095 (origin
2096 (method url-fetch)
2097 (uri (pypi-uri "coverage" version))
2098 (sha256
2099 (base32
2100 "01rbr4br4lsk0lwn8fb96zwd2xr4f0mg1w7iq3j11i8f5ig2nqs1"))))
2101 (build-system python-build-system)
2102 (home-page "http://nedbatchelder.com/code/coverage")
2103 (synopsis "Code coverage measurement for Python")
2104 (description
2105 "Coverage measures code coverage, typically during test execution. It
2106 uses the code analysis tools and tracing hooks provided in the Python standard
2107 library to determine which lines are executable, and which have been
2108 executed.")
2109 (license license:bsd-3)))
2110
2111 (define-public python2-coverage
2112 (package-with-python2 python-coverage))
2113
2114 (define-public python-cov-core
2115 (package
2116 (name "python-cov-core")
2117 (version "1.15.0")
2118 (source
2119 (origin
2120 (method url-fetch)
2121 (uri (pypi-uri "cov-core" version))
2122 (sha256
2123 (base32
2124 "0k3np9ymh06yv1ib96sb6wfsxjkqhmik8qfsn119vnhga9ywc52a"))))
2125 (build-system python-build-system)
2126 (native-inputs
2127 `(("python-coverage" ,python-coverage)))
2128 (home-page "https://github.com/schlamar/cov-core")
2129 (synopsis "plugin core for use by pytest-cov, nose-cov and nose2-cov")
2130 (description
2131 "This is a library package for use by pytest-cov, nose-cov and nose2-cov.
2132 It is useful for developing coverage plugins for these testing frameworks.")
2133 (license license:expat)))
2134
2135 (define-public python2-cov-core
2136 (package-with-python2 python-cov-core))
2137
2138 (define-public python-discover
2139 (package
2140 (name "python-discover")
2141 (version "0.4.0")
2142 (source
2143 (origin
2144 (method url-fetch)
2145 (uri (string-append
2146 "https://pypi.python.org/packages/source/d/discover/discover-"
2147 version ".tar.gz"))
2148 (sha256
2149 (base32
2150 "0y8d0zwiqar51kxj8lzmkvwc3b8kazb04gk5zcb4nzg5k68zmhq5"))))
2151 (build-system python-build-system)
2152 (home-page "http://pypi.python.org/pypi/discover/")
2153 (synopsis
2154 "Python test discovery for unittest")
2155 (description
2156 "Discover provides test discovery for unittest, a feature that has been
2157 backported from Python 2.7 for Python 2.4+.")
2158 (license license:bsd-3)))
2159
2160 (define-public python2-discover
2161 (package-with-python2 python-discover))
2162
2163 (define-public behave
2164 (package
2165 (name "behave")
2166 (version "1.2.5")
2167 (source (origin
2168 (method url-fetch)
2169 (uri (pypi-uri "behave" version ".tar.bz2"))
2170 (sha256
2171 (base32
2172 "1iypp6z46r19n4xmgx6m1lwmlpfjh8vapq8izigrqlaarvp2y64c"))))
2173 (build-system python-build-system)
2174 (propagated-inputs
2175 `(("python-six" ,python-six)
2176 ("python-parse" ,python-parse)
2177 ("python-parse-type" ,python-parse-type)))
2178 (arguments `(#:tests? #f)) ;TODO: tests require nose>=1.3 and
2179 ;PyHamcrest>=1.8
2180 (home-page "http://github.com/behave/behave")
2181 (synopsis "Python behavior-driven development")
2182 (description
2183 "Behave is a tool for behavior-driven development in python.
2184 Behavior-driven development (or BDD) is an agile software development
2185 technique that encourages collaboration between developers, QA and
2186 non-technical or business participants in a software project. Behave uses
2187 tests written in a natural language style, backed up by Python code.")
2188 (license license:x11)))
2189
2190 (define-public python-exif-read
2191 (package
2192 (name "python-exif-read")
2193 (version "2.1.2")
2194 (source (origin
2195 (method url-fetch)
2196 (uri (pypi-uri "ExifRead" version))
2197 (sha256
2198 (base32
2199 "1b90jf6m9vxh9nanhpyvqdq7hmfx5iggw1l8kq10jrs6xgr49qkr"))))
2200 (build-system python-build-system)
2201 (arguments `(#:tests? #f)) ; no tests
2202 (home-page "https://github.com/ianare/exif-py")
2203 (synopsis "Python library to extract EXIF data from image files")
2204 (description
2205 "ExifRead is a Python library to extract EXIF data from tiff and jpeg
2206 files.")
2207 (license license:bsd-3)))
2208
2209 (define-public python2-exif-read
2210 (package-with-python2 python-exif-read))
2211
2212 (define-public python-pyld
2213 (package
2214 (name "python-pyld")
2215 (version "0.6.8")
2216 (source (origin
2217 (method url-fetch)
2218 (uri (pypi-uri "PyLD" version))
2219 (sha256
2220 (base32
2221 "0k881ffazpf8q1z8862g4bb3pzwpnz9whrci2mf311mvn1qbyqad"))))
2222 (build-system python-build-system)
2223 (arguments `(#:tests? #f)) ; no tests
2224 (home-page "http://github.com/digitalbazaar/pyld")
2225 (synopsis "Python implementation of the JSON-LD specification")
2226 (description
2227 "PyLD is an implementation of the JSON-LD specification.")
2228 (license license:bsd-3)))
2229
2230 (define-public python2-pyld
2231 (package-with-python2 python-pyld))
2232
2233 (define-public python-certifi
2234 (package
2235 (name "python-certifi")
2236 (version "2016.8.31")
2237 (source (origin
2238 (method url-fetch)
2239 (uri (pypi-uri "certifi" version))
2240 (sha256
2241 (base32
2242 "06c9dcyv8ss050gkv5xjivbxhm6qm0s9vzy4r33wqabgv118lw7p"))))
2243 (build-system python-build-system)
2244 (arguments `(#:tests? #f)) ; no tests
2245 (home-page "http://python-requests.org/")
2246 (synopsis "Python CA certificate bundle")
2247 (description
2248 "Certifi is a Python library that contains a CA certificate bundle, which
2249 is used by the Requests library to verify HTTPS requests.")
2250 (license license:asl2.0)))
2251
2252 (define-public python2-certifi
2253 (package-with-python2 python-certifi))
2254
2255 (define-public python-click
2256 (package
2257 (name "python-click")
2258 (version "6.6")
2259 (source
2260 (origin
2261 (method url-fetch)
2262 (uri (pypi-uri "click" version))
2263 (sha256
2264 (base32
2265 "1sggipyz52crrybwbr9xvwxd4aqigvplf53k9w3ygxmzivd1jsnc"))))
2266 (build-system python-build-system)
2267 (arguments
2268 `(#:phases
2269 (modify-phases %standard-phases
2270 (add-after 'unpack 'fix-paths
2271 (lambda* (#:key inputs #:allow-other-keys)
2272 (let ((glibc (assoc-ref inputs ,(if (%current-target-system)
2273 "cross-libc" "libc"))))
2274 (substitute* "click/_unicodefun.py"
2275 (("'locale'")
2276 (string-append "'" glibc "/bin/locale'"))))
2277 #t)))))
2278 (home-page "http://click.pocoo.org")
2279 (synopsis "Command line library for Python")
2280 (description
2281 "Click is a Python package for creating command line interfaces in a
2282 composable way with as little code as necessary. Its name stands for
2283 \"Command Line Interface Creation Kit\". It's highly configurable but comes
2284 with sensible defaults out of the box.")
2285 (license license:bsd-3)))
2286
2287 (define-public python2-click
2288 (package-with-python2 python-click))
2289
2290 (define-public python-wheel
2291 (package
2292 (name "python-wheel")
2293 (version "0.29.0")
2294 (source
2295 (origin
2296 (method url-fetch)
2297 (uri (pypi-uri "wheel" version))
2298 (sha256
2299 (base32
2300 "0j0n38hg1jvrmyy68f9ikvzq1gs9g0sx4ws7maf8wi3bwbbqmfqy"))))
2301 (build-system python-build-system)
2302 (native-inputs
2303 `(("python-jsonschema" ,python-jsonschema)
2304 ("python-pytest-cov" ,python-pytest-cov)))
2305 (home-page "https://bitbucket.org/pypa/wheel/")
2306 (synopsis "Format for built Python packages")
2307 (description
2308 "A wheel is a ZIP-format archive with a specially formatted filename and
2309 the @code{.whl} extension. It is designed to contain all the files for a PEP
2310 376 compatible install in a way that is very close to the on-disk format. Many
2311 packages will be properly installed with only the @code{Unpack} step and the
2312 unpacked archive preserves enough information to @code{Spread} (copy data and
2313 scripts to their final locations) at any later time. Wheel files can be
2314 installed with a newer @code{pip} or with wheel's own command line utility.")
2315 (license license:expat)
2316 (properties `((python2-variant . ,(delay python2-wheel))))))
2317
2318 (define-public python2-wheel
2319 (let ((wheel (package-with-python2
2320 (strip-python2-variant python-wheel))))
2321 (package (inherit wheel)
2322 (native-inputs `(("python2-functools32" ,python2-functools32)
2323 ,@(package-native-inputs wheel))))))
2324
2325
2326 (define-public python-requests
2327 (package
2328 (name "python-requests")
2329 (version "2.9.1")
2330 (source (origin
2331 (method url-fetch)
2332 (uri (pypi-uri "requests" version))
2333 (sha256
2334 (base32
2335 "0zsqrzlybf25xscgi7ja4s48y2abf9wvjkn47wh984qgs1fq2xy5"))))
2336 (build-system python-build-system)
2337 (native-inputs
2338 `(("python-py" ,python-py)
2339 ("python-pytest" ,python-pytest)
2340 ("python-pytest-cov" ,python-pytest-cov)
2341 ("python-wheel" ,python-wheel)))
2342 (home-page "http://python-requests.org/")
2343 (synopsis "Python HTTP library")
2344 (description
2345 "Requests is a Python HTTP client library. It aims to be easier to use
2346 than Python’s urllib2 library.")
2347 (license license:asl2.0)))
2348
2349 ;; Some software requires an older version of Requests, notably Docker
2350 ;; Compose.
2351 (define-public python-requests-2.7
2352 (package (inherit python-requests)
2353 (version "2.7.0")
2354 (source (origin
2355 (method url-fetch)
2356 (uri (pypi-uri "requests" version))
2357 (sha256
2358 (base32
2359 "0gdr9dxm24amxpbyqpbh3lbwxc2i42hnqv50sigx568qssv3v2ir"))))))
2360
2361 (define-public python2-requests
2362 (package-with-python2 python-requests))
2363
2364 (define-public python-vcversioner
2365 (package
2366 (name "python-vcversioner")
2367 (version "2.16.0.0")
2368 (source
2369 (origin
2370 (method url-fetch)
2371 (uri (pypi-uri "vcversioner" version))
2372 (sha256
2373 (base32
2374 "16z10sm78jd7ca3jbkgc3q5i8a8q7y1h21q1li21yy3rlhbhrrns"))))
2375 (build-system python-build-system)
2376 (synopsis "Python library for version number discovery")
2377 (description "Vcversioner is a Python library that inspects tagging
2378 information in a variety of version control systems in order to discover
2379 version numbers.")
2380 (home-page "https://github.com/habnabit/vcversioner")
2381 (license license:isc)))
2382
2383 (define-public python2-vcversioner
2384 (package-with-python2 python-vcversioner))
2385
2386 (define-public python-jsonschema
2387 (package
2388 (name "python-jsonschema")
2389 (version "2.5.1")
2390 (source (origin
2391 (method url-fetch)
2392 (uri
2393 (string-append
2394 "https://pypi.python.org/packages/source/j/jsonschema/jsonschema-"
2395 version ".tar.gz"))
2396 (sha256
2397 (base32
2398 "0hddbqjm4jq63y8jf44nswina1crjs16l9snb6m3vvgyg31klrrn"))))
2399 (build-system python-build-system)
2400 (arguments
2401 '(#:phases
2402 (modify-phases %standard-phases
2403 (replace 'check (lambda _ (zero? (system* "nosetests")))))))
2404 (native-inputs
2405 `(("python-nose" ,python-nose)
2406 ("python-vcversioner" ,python-vcversioner)))
2407 (home-page "https://github.com/Julian/jsonschema")
2408 (synopsis "Implementation of JSON Schema for Python")
2409 (description
2410 "Jsonschema is an implementation of JSON Schema for Python.")
2411 (license license:expat)
2412 (properties `((python2-variant . ,(delay python2-jsonschema))))))
2413
2414 (define-public python2-jsonschema
2415 (let ((jsonschema (package-with-python2
2416 (strip-python2-variant python-jsonschema))))
2417 (package (inherit jsonschema)
2418 (native-inputs
2419 `(("python2-mock" ,python2-mock)
2420 ,@(package-native-inputs jsonschema)))
2421 (propagated-inputs
2422 `(("python2-functools32" ,python2-functools32))))))
2423
2424 (define-public python-unidecode
2425 (package
2426 (name "python-unidecode")
2427 (version "0.04.18")
2428 (source (origin
2429 (method url-fetch)
2430 (uri (pypi-uri "Unidecode" version))
2431 (sha256
2432 (base32
2433 "12hhblqy1ajvidm38im4171x4arg83pfmziyn53nizp29p3m14gi"))))
2434 (build-system python-build-system)
2435 (home-page "https://pypi.python.org/pypi/Unidecode")
2436 (synopsis "ASCII transliterations of Unicode text")
2437 (description
2438 "Unidecode provides ASCII transliterations of Unicode text. Unidecode is
2439 useful when integrating with legacy code that doesn't support Unicode, or for
2440 ease of entry of non-Roman names on a US keyboard, or when constructing ASCII
2441 machine identifiers from human-readable Unicode strings that should still be
2442 somewhat intelligeble.")
2443 (license license:gpl2+)))
2444
2445 (define-public python2-unidecode
2446 (package-with-python2 python-unidecode))
2447
2448 (define-public python-pyjwt
2449 (package
2450 (name "python-pyjwt")
2451 (version "1.4.0")
2452 (source
2453 (origin
2454 (method url-fetch)
2455 (uri (pypi-uri "PyJWT" version))
2456 (sha256
2457 (base32
2458 "1556v2jppd8mjkkj66pxb5rcazm35jq81r233mdl8hfmz9n3icp1"))))
2459 (build-system python-build-system)
2460 (native-inputs
2461 `(("python-pytest-runner" ,python-pytest-runner)))
2462 (arguments
2463 '(#:tests? #f)) ; test suite doesn't work
2464 (home-page "http://github.com/progrium/pyjwt")
2465 (synopsis "JSON Web Token implementation in Python")
2466 (description
2467 "PyJWT is a JSON Web Token implementation written in Python.")
2468 (license license:expat)))
2469
2470 (define-public python2-pyjwt
2471 (package-with-python2 python-pyjwt))
2472
2473 (define-public python-oauthlib
2474 (package
2475 (name "python-oauthlib")
2476 (version "1.0.3")
2477 (source (origin
2478 (method url-fetch)
2479 (uri (pypi-uri "oauthlib" version))
2480 (sha256
2481 (base32
2482 "1bfrj70vdjxjw74khbyh6f0dksv7p5rh2346jnlrffyacd3gwjzg"))))
2483 (build-system python-build-system)
2484 (native-inputs
2485 `(("python-coverage" ,python-coverage)
2486 ("python-nose" ,python-nose)
2487 ("python-mock" ,python-mock)))
2488 (propagated-inputs
2489 `(("python-blinker" ,python-blinker)
2490 ("python-cryptography" ,python-cryptography)
2491 ("python-pyjwt" ,python-pyjwt)))
2492 (home-page "https://github.com/idan/oauthlib")
2493 (synopsis "OAuth implementation for Python")
2494 (description
2495 "Oauthlib is a generic, spec-compliant, thorough implementation of the
2496 OAuth request-signing logic.")
2497 (license license:bsd-3)
2498 (properties `((python2-variant . ,(delay python2-oauthlib))))))
2499
2500 (define-public python2-oauthlib
2501 (let ((base (package-with-python2 (strip-python2-variant python-oauthlib))))
2502 (package
2503 (inherit base)
2504 (native-inputs `(("python2-unittest2" ,python2-unittest2)
2505 ,@(package-native-inputs base))))))
2506
2507 (define-public python-itsdangerous
2508 (package
2509 (name "python-itsdangerous")
2510 (version "0.24")
2511 (source
2512 (origin
2513 (method url-fetch)
2514 (uri (string-append
2515 "https://pypi.python.org/packages/source/i/itsdangerous/itsdangerous-"
2516 version ".tar.gz"))
2517 (sha256
2518 (base32
2519 "06856q6x675ly542ig0plbqcyab6ksfzijlyf1hzhgg3sgwgrcyb"))))
2520 (build-system python-build-system)
2521 (home-page "http://github.com/mitsuhiko/itsdangerous")
2522 (synopsis "Python library for passing data to/from untrusted environments")
2523 (description
2524 "Itsdangerous provides various helpers to pass trusted data to untrusted
2525 environments and back.")
2526 (license license:bsd-3)))
2527
2528 (define-public python2-itsdangerous
2529 (package-with-python2 python-itsdangerous))
2530
2531 (define-public python-pyyaml
2532 (package
2533 (name "python-pyyaml")
2534 (version "3.11")
2535 (source
2536 (origin
2537 (method url-fetch)
2538 (uri (string-append
2539 "https://pypi.python.org/packages/source/P/PyYAML/PyYAML-"
2540 version ".tar.gz"))
2541 (sha256
2542 (base32
2543 "1s26125vfnskng58ym37xhwv8v0mm95b2cwbjfag8prfhy596v63"))))
2544 (build-system python-build-system)
2545 (inputs
2546 `(("libyaml" ,libyaml)))
2547 (home-page "http://pyyaml.org/wiki/PyYAML")
2548 (synopsis "YAML parser and emitter for Python")
2549 (description
2550 "PyYAML is a YAML parser and emitter for Python. PyYAML features a
2551 complete YAML 1.1 parser, Unicode support, pickle support, capable extension
2552 API, and sensible error messages. PyYAML supports standard YAML tags and
2553 provides Python-specific tags that allow to represent an arbitrary Python
2554 object.")
2555 (license license:expat)))
2556
2557 (define-public python2-pyyaml
2558 (package-with-python2 python-pyyaml))
2559
2560 (define-public python-virtualenv
2561 (package
2562 (name "python-virtualenv")
2563 (version "15.0.3")
2564 (source
2565 (origin
2566 (method url-fetch)
2567 (uri (pypi-uri "virtualenv" version))
2568 (sha256
2569 (base32
2570 "07cbajzk8l05k5zhlw0b9wbf2is65bl9v6zrn2a0iyn57w6pd73d"))))
2571 (build-system python-build-system)
2572 (arguments
2573 `(#:phases
2574 (modify-phases %standard-phases
2575 (replace 'check
2576 (lambda _
2577 ;; Disable failing test. See upstream bug report
2578 ;; https://github.com/pypa/virtualenv/issues/957
2579 (substitute* "tests/test_virtualenv.py"
2580 (("skipif.*") "skipif(True, reason=\"Guix\")\n"))
2581 (zero? (system* "py.test")))))))
2582 (inputs
2583 `(("python-mock" ,python-mock)
2584 ("python-pytest" ,python-pytest)))
2585 (home-page "https://virtualenv.pypa.io/")
2586 (synopsis "Virtual Python environment builder")
2587 (description
2588 "Virtualenv is a tool to create isolated Python environments.")
2589 (license license:expat)))
2590
2591 (define-public python2-virtualenv
2592 (package-with-python2 python-virtualenv))
2593
2594 (define-public python-markupsafe
2595 (package
2596 (name "python-markupsafe")
2597 (version "0.23")
2598 (source
2599 (origin
2600 (method url-fetch)
2601 (uri (string-append
2602 "https://pypi.python.org/packages/source/M/MarkupSafe/MarkupSafe-"
2603 version ".tar.gz"))
2604 (sha256
2605 (base32
2606 "1hvip33wva3fnmvfp9x5klqri7hpl1hkgqmjbss18nmrb7zimv54"))))
2607 (build-system python-build-system)
2608 (home-page "http://github.com/mitsuhiko/markupsafe")
2609 (synopsis "XML/HTML/XHTML markup safe string implementation for Python")
2610 (description
2611 "Markupsafe provides an XML/HTML/XHTML markup safe string implementation
2612 for Python.")
2613 (license license:bsd-3)))
2614
2615 (define-public python2-markupsafe
2616 (package-with-python2 python-markupsafe))
2617
2618 (define-public python-jinja2
2619 (package
2620 (name "python-jinja2")
2621 (version "2.8")
2622 (source
2623 (origin
2624 (method url-fetch)
2625 (uri (pypi-uri "Jinja2" version))
2626 (sha256
2627 (base32
2628 "1x0v41lp5m1pjix3l46zx02b7lqp2hflgpnxwkywxynvi3zz47xw"))))
2629 (build-system python-build-system)
2630 (propagated-inputs
2631 `(("python-markupsafe" ,python-markupsafe)))
2632 (home-page "http://jinja.pocoo.org/")
2633 (synopsis "Python template engine")
2634 (description
2635 "Jinja2 is a small but fast and easy to use stand-alone template engine
2636 written in pure Python.")
2637 (license license:bsd-3)))
2638
2639 (define-public python2-jinja2
2640 (package-with-python2 python-jinja2))
2641
2642 (define-public python-pystache
2643 (package
2644 (name "python-pystache")
2645 (version "0.5.4")
2646 (source (origin
2647 (method url-fetch)
2648 (uri (pypi-uri "pystache" version))
2649 (sha256
2650 (base32
2651 "0nmqsfmiw4arjxqkmf9z66ml950pcdjk6aq4gin4sywmzdjw5fzp"))))
2652 (build-system python-build-system)
2653 (home-page "http://defunkt.io/pystache/")
2654 (synopsis "Python logic-less template engine")
2655 (description
2656 "Pystache is a Python implementation of the framework agnostic,
2657 logic-free templating system Mustache.")
2658 (license license:expat)))
2659
2660 (define-public python2-pystache
2661 (package-with-python2 python-pystache))
2662
2663 (define-public python-joblib
2664 (package
2665 (name "python-joblib")
2666 (version "0.10.3")
2667 (source (origin
2668 (method url-fetch)
2669 (uri (pypi-uri "joblib" version))
2670 (sha256
2671 (base32
2672 "0787k919zlfmgymprz5bzv0v1df5bbirlf3awrghmjgvkrd9dci9"))))
2673 (build-system python-build-system)
2674 (arguments
2675 `(#:phases
2676 (modify-phases %standard-phases
2677 (add-before 'check 'disable-failing-tests
2678 (lambda _
2679 ;; This numpydoc tests fails for unknown reasons
2680 (delete-file "doc/sphinxext/numpydoc/tests/test_docscrape.py")
2681 ;; This numpydoc test depends on matplotlib, which is not a
2682 ;; required input.
2683 (delete-file "doc/sphinxext/numpydoc/tests/test_plot_directive.py")
2684 ;; These tests fail to execute sys.executable
2685 (substitute* "joblib/test/test_parallel.py"
2686 (("import nose" line)
2687 (string-append "from nose.plugins.skip import SkipTest\n" line))
2688 (("def test_nested_parallel_warnings" line)
2689 (string-append "@SkipTest\n" line))
2690 (("def test_parallel_with_interactively_defined_functions" line)
2691 (string-append "@SkipTest\n" line)))
2692 #t)))))
2693 (native-inputs
2694 `(("python-nose" ,python-nose)
2695 ("python-sphinx" ,python-sphinx)
2696 ("python-docutils" ,python-docutils)
2697 ("python-numpydoc" ,python-numpydoc)))
2698 (home-page "http://pythonhosted.org/joblib/")
2699 (synopsis "Using Python functions as pipeline jobs")
2700 (description
2701 "Joblib is a set of tools to provide lightweight pipelining in Python.
2702 In particular, joblib offers: transparent disk-caching of the output values
2703 and lazy re-evaluation (memoize pattern), easy simple parallel computing
2704 logging and tracing of the execution.")
2705 (license license:bsd-3)))
2706
2707 (define-public python2-joblib
2708 (package-with-python2 python-joblib))
2709
2710 (define-public python-docutils
2711 (package
2712 (name "python-docutils")
2713 (version "0.12")
2714 (source
2715 (origin
2716 (method url-fetch)
2717 (uri (string-append
2718 "https://pypi.python.org/packages/source/d/docutils/docutils-"
2719 version ".tar.gz"))
2720 (sha256
2721 (base32
2722 "1ylnjnw1x4b2y7blr6x35ncdzn69k253kw4cdkv6asdb21w73ny7"))))
2723 (build-system python-build-system)
2724 (arguments
2725 '(#:tests? #f)) ; no setup.py test command
2726 (home-page "http://docutils.sourceforge.net/")
2727 (synopsis "Python Documentation Utilities")
2728 (description
2729 "Docutils is a modular system for processing documentation into useful
2730 formats, such as HTML, XML, and LaTeX. For input Docutils supports
2731 reStructuredText.")
2732 ;; Most of the source code is public domain, but some source files are
2733 ;; licensed under the PFSL, BSD 2-clause, and GPLv3+ licenses.
2734 (license (list license:public-domain license:psfl license:bsd-2 license:gpl3+))))
2735
2736 (define-public python2-docutils
2737 (package-with-python2 python-docutils))
2738
2739 (define-public python-pygments
2740 (package
2741 (name "python-pygments")
2742 (version "2.0.2")
2743 (source
2744 (origin
2745 (method url-fetch)
2746 (uri (pypi-uri "Pygments" version))
2747 (sha256
2748 (base32
2749 "0lagrwifsgn0s8bzqahpr87p7gd38xja8f06akscinp6hj89283k"))))
2750 (build-system python-build-system)
2751 (home-page "http://pygments.org/")
2752 (synopsis "Syntax highlighting")
2753 (description
2754 "Pygments is a syntax highlighting package written in Python.")
2755 (license license:bsd-2)))
2756
2757 (define-public python2-pygments
2758 (package-with-python2 python-pygments))
2759
2760 (define-public python-sphinx
2761 (package
2762 (name "python-sphinx")
2763 (version "1.2.3")
2764 (source
2765 (origin
2766 (method url-fetch)
2767 (uri (string-append
2768 "https://pypi.python.org/packages/source/S/Sphinx/Sphinx-"
2769 version ".tar.gz"))
2770 (sha256
2771 (base32
2772 "011xizm3jnmf4cvs5i6kgf6c5nn046h79i8j0vd0f27yw9j3p4wl"))))
2773 (build-system python-build-system)
2774 (propagated-inputs
2775 `(("python-jinja2" ,python-jinja2)
2776 ("python-docutils" ,python-docutils)
2777 ("python-pygments" ,python-pygments)))
2778 (home-page "http://sphinx-doc.org/")
2779 (synopsis "Python documentation generator")
2780 (description "Sphinx is a tool that makes it easy to create documentation
2781 for Python projects or other documents consisting of multiple reStructuredText
2782 sources.")
2783 (license license:bsd-3)))
2784
2785 (define-public python2-sphinx
2786 (package-with-python2 python-sphinx))
2787
2788 (define-public python-sphinx-rtd-theme
2789 (package
2790 (name "python-sphinx-rtd-theme")
2791 (version "0.1.6")
2792 (source
2793 (origin
2794 (method url-fetch)
2795 (uri (string-append "https://pypi.python.org/packages/source/s/"
2796 "sphinx_rtd_theme/sphinx_rtd_theme-"
2797 version ".tar.gz"))
2798 (sha256
2799 (base32
2800 "19nw3rn7awplcdrz63kg1njqwkbymfg9lwn7l2grhdyhyr2gaa8g"))))
2801 (build-system python-build-system)
2802 (inputs
2803 `(("python-docutils" ,python-docutils)
2804 ("python-sphinx" ,python-sphinx)))
2805 (home-page "https://github.com/snide/sphinx_rtd_theme/")
2806 (synopsis "ReadTheDocs.org theme for Sphinx")
2807 (description "A theme for Sphinx used by ReadTheDocs.org.")
2808 (license license:expat)))
2809
2810 (define-public python2-sphinx-rtd-theme
2811 (package-with-python2 python-sphinx-rtd-theme))
2812
2813 (define-public python-feedgenerator
2814 (package
2815 (name "python-feedgenerator")
2816 (version "1.8")
2817 (source
2818 (origin
2819 (method url-fetch)
2820 (uri (pypi-uri "feedgenerator" version))
2821 (sha256
2822 (base32
2823 "0mkimp1fpdan4p3882vzcws4l594k71ich4g0wq97jbra7p602n0"))))
2824 (build-system python-build-system)
2825 (native-inputs
2826 `(("python-pytz" ,python-pytz)
2827 ("python-six" ,python-six)))
2828 (home-page "https://github.com/getpelican/feedgenerator")
2829 (synopsis
2830 "Standalone version of Django's Atom/RSS feed generator")
2831 (description
2832 "Feedgenerator-py3k is a standalone version of Django's feedgenerator,
2833 which can produce feeds in RSS 2.0, RSS 0.91, and Atom formats.")
2834 (license license:bsd-3)))
2835
2836 (define-public python2-feedgenerator
2837 (package-with-python2 python-feedgenerator))
2838
2839 (define-public python-blinker
2840 (package
2841 (name "python-blinker")
2842 (version "1.4")
2843 (source
2844 (origin
2845 (method url-fetch)
2846 (uri (pypi-uri "blinker" version))
2847 (sha256
2848 (base32
2849 "1dpq0vb01p36jjwbhhd08ylvrnyvcc82yxx3mwjx6awrycjyw6j7"))))
2850 (build-system python-build-system)
2851 ;; No "test" command supplied to setuptools, so unless there's another way
2852 ;; to run tests, we're skipping them!
2853 (arguments '(#:tests? #f))
2854 (home-page "http://pythonhosted.org/blinker/")
2855 (synopsis "Fast, simple object-to-object and broadcast signaling")
2856 (description
2857 "Blinker provides a fast dispatching system that allows any number of
2858 interested parties to subscribe to events, or \"signals\".")
2859 (license license:expat)))
2860
2861 (define-public python2-blinker
2862 (package-with-python2 python-blinker))
2863
2864 (define-public pelican
2865 (package
2866 (name "pelican")
2867 (version "3.6.3")
2868 (source
2869 (origin
2870 (method url-fetch)
2871 (uri (pypi-uri "pelican" version))
2872 (sha256
2873 (base32
2874 "1hn94rb4q3zmcq16in055xikal4dba5hfx3zznq7warllcgc9f8k"))))
2875 (build-system python-build-system)
2876 (propagated-inputs
2877 `(("python-feedgenerator" ,python-feedgenerator)
2878 ("python-jinja2" ,python-jinja2)
2879 ("python-pygments" ,python-pygments)
2880 ("python-docutils" ,python-docutils)
2881 ("python-pytz" ,python-pytz)
2882 ("python-blinker" ,python-blinker)
2883 ("python-unidecode" ,python-unidecode)
2884 ("python-six" ,python-six)
2885 ("python-dateutil-2" ,python-dateutil-2)))
2886 (home-page "http://getpelican.com/")
2887 (arguments
2888 `(;; XXX Requires a lot more packages to do unit tests :P
2889 #:tests? #f
2890 #:phases (modify-phases %standard-phases
2891 (add-before
2892 'install 'adjust-requires
2893 ;; Since feedgenerator is installed from git, it doesn't
2894 ;; conform to the version requirements.
2895 ;;
2896 ;; We *do have* "feedgenerator >= 1.6", but strip off the
2897 ;; version requirement so setuptools doesn't get confused.
2898 (lambda _
2899 (substitute* "setup.py"
2900 (("['\"]feedgenerator.*?['\"]")
2901 "'feedgenerator'")))))))
2902 (synopsis "Python-based static site publishing system")
2903 (description
2904 "Pelican is a tool to generate a static blog from reStructuredText,
2905 Markdown input files, and more. Pelican uses Jinja2 for templating
2906 and is very extensible.")
2907 (license license:agpl3+)))
2908
2909 (define-public python-scikit-learn
2910 (package
2911 (name "python-scikit-learn")
2912 (version "0.16.1")
2913 (source
2914 (origin
2915 (method url-fetch)
2916 (uri (string-append
2917 "https://github.com/scikit-learn/scikit-learn/archive/"
2918 version ".tar.gz"))
2919 (file-name (string-append name "-" version ".tar.gz"))
2920 (sha256
2921 (base32
2922 "140skabifgc7lvvj873pnzlwx0ni6q8qkrsyad2ccjb3h8rxzkih"))))
2923 (build-system python-build-system)
2924 (arguments
2925 `(#:phases
2926 (alist-cons-before
2927 'check 'set-HOME
2928 ;; some tests require access to "$HOME"
2929 (lambda _ (setenv "HOME" "/tmp"))
2930 ;; Tests can only be run after the library has been installed and not
2931 ;; within the source directory.
2932 (alist-cons-after
2933 'install 'check
2934 (lambda _
2935 (with-directory-excursion "/tmp"
2936 ;; With Python 3 one test of 3334 fails
2937 ;; (sklearn.tests.test_common.test_transformers); see
2938 ;; https://github.com/scikit-learn/scikit-learn/issues/3693
2939 (system* "nosetests" "-v" "sklearn")))
2940 (alist-delete 'check %standard-phases)))))
2941 (inputs
2942 `(("openblas" ,openblas)
2943 ("python-nose" ,python-nose)))
2944 (propagated-inputs
2945 `(("python-numpy" ,python-numpy)
2946 ("python-scipy" ,python-scipy)))
2947 (home-page "http://scikit-learn.org/")
2948 (synopsis "Machine Learning in Python")
2949 (description
2950 "Scikit-learn provides simple and efficient tools for data
2951 mining and data analysis.")
2952 (license license:bsd-3)
2953 (properties `((python2-variant . ,(delay python2-scikit-learn))))))
2954
2955 (define-public python2-scikit-learn
2956 (package-with-python2 (strip-python2-variant python-scikit-learn)))
2957
2958 (define-public python-scikit-image
2959 (package
2960 (name "python-scikit-image")
2961 (version "0.11.3")
2962 (source
2963 (origin
2964 (method url-fetch)
2965 (uri (string-append
2966 "https://pypi.python.org/packages/source/s/scikit-image/scikit-image-"
2967 version ".tar.gz"))
2968 (sha256
2969 (base32 "0jz416fqvpahqyffw8plmszzfj669w8wvf3y9clnr5lr6a7md3kn"))))
2970 (build-system python-build-system)
2971 (propagated-inputs
2972 `(("python-matplotlib" ,python-matplotlib)
2973 ("python-networkx" ,python-networkx)
2974 ("python-numpy" ,python-numpy)
2975 ("python-scipy" ,python-scipy)
2976 ("python-six" ,python-six)
2977 ("python-pillow" ,python-pillow)))
2978 (native-inputs
2979 `(("python-cython" ,python-cython)))
2980 (home-page "http://scikit-image.org/")
2981 (synopsis "Image processing in Python")
2982 (description
2983 "Scikit-image is a collection of algorithms for image processing.")
2984 (license license:bsd-3)
2985 (properties `((python2-variant . ,(delay python2-scikit-image))))))
2986
2987 (define-public python2-scikit-image
2988 (let ((scikit-image (package-with-python2
2989 (strip-python2-variant python-scikit-image))))
2990 (package (inherit scikit-image)
2991 (native-inputs
2992 `(("python2-mock" ,python2-mock)
2993 ,@(package-native-inputs scikit-image)))
2994 (propagated-inputs
2995 `(("python2-pytz" ,python2-pytz)
2996 ,@(package-propagated-inputs scikit-image))))))
2997
2998 (define-public python-redis
2999 (package
3000 (name "python-redis")
3001 (version "2.10.3")
3002 (source
3003 (origin
3004 (method url-fetch)
3005 (uri (string-append
3006 "https://pypi.python.org/packages/source/r/redis/redis-"
3007 version ".tar.gz"))
3008 (sha256
3009 (base32 "1701qjwn4n05q90fdg4bsg96s27xf5s4hsb4gxhv3xk052q3gyx4"))))
3010 (build-system python-build-system)
3011 ;; Tests require a running Redis server
3012 (arguments '(#:tests? #f))
3013 (native-inputs
3014 `(("python-pytest" ,python-pytest)))
3015 (home-page "https://github.com/andymccurdy/redis-py")
3016 (synopsis "Redis Python client")
3017 (description
3018 "This package provides a Python interface to the Redis key-value store.")
3019 (license license:expat)))
3020
3021 (define-public python2-redis
3022 (package-with-python2 python-redis))
3023
3024 (define-public python-rq
3025 (package
3026 (name "python-rq")
3027 (version "0.5.2")
3028 (source
3029 (origin
3030 (method url-fetch)
3031 (uri (string-append
3032 "https://pypi.python.org/packages/source/r/rq/rq-"
3033 version ".tar.gz"))
3034 (sha256
3035 (base32 "0b0z5hn8wkfg300hx7816csgv3bcfamlr29fi3yzgqmpqxwj3fix"))))
3036 (build-system python-build-system)
3037 (propagated-inputs
3038 `(("python-click" ,python-click)
3039 ("python-redis" ,python-redis)))
3040 (home-page "http://python-rq.org/")
3041 (synopsis "Simple job queues for Python")
3042 (description
3043 "RQ (Redis Queue) is a simple Python library for queueing jobs and
3044 processing them in the background with workers. It is backed by Redis and it
3045 is designed to have a low barrier to entry.")
3046 (license license:bsd-2)))
3047
3048 (define-public python2-rq
3049 (package-with-python2 python-rq))
3050
3051 (define-public python-cython
3052 (package
3053 (name "python-cython")
3054 (version "0.24.1")
3055 (source
3056 (origin
3057 (method url-fetch)
3058 (uri (pypi-uri "Cython" version))
3059 (sha256
3060 (base32
3061 "1fg7fmpvfcq9md4ncyqnnylyjy4z3ksdrshzis95g1sh03d8z044"))))
3062 (build-system python-build-system)
3063 ;; we need the full python package and not just the python-wrapper
3064 ;; because we need libpython3.3m.so
3065 (inputs
3066 `(("python" ,python)))
3067 (arguments
3068 `(#:phases
3069 (modify-phases %standard-phases
3070 (add-before 'check 'set-HOME
3071 ;; some tests require access to "$HOME/.cython"
3072 (lambda _ (setenv "HOME" "/tmp")))
3073 (replace 'check
3074 (lambda _ (zero? (system* "python" "runtests.py" "-vv")))))))
3075 (home-page "http://cython.org/")
3076 (synopsis "C extensions for Python")
3077 (description "Cython is an optimising static compiler for both the Python
3078 programming language and the extended Cython programming language. It makes
3079 writing C extensions for Python as easy as Python itself.")
3080 (license license:asl2.0)
3081 (properties `((python2-variant . ,(delay python2-cython))))))
3082
3083 (define-public python2-cython
3084 (package (inherit (package-with-python2
3085 (strip-python2-variant python-cython)))
3086 (name "python2-cython")
3087 (inputs
3088 `(("python-2" ,python-2))))) ; this is not automatically changed
3089
3090 ;; The RPython toolchain currently does not support Python 3.
3091 (define-public python2-rpython
3092 (package
3093 (name "python2-rpython")
3094 (version "0.1.4")
3095 (source
3096 (origin
3097 (method url-fetch)
3098 (uri (pypi-uri "rpython" version))
3099 (sha256
3100 (base32
3101 "07pps06fq4c4wmi5ii0sgh9zgwniz5y7frqhm28g3a154l163fxc"))))
3102 (build-system python-build-system)
3103 (arguments `(#:python ,python-2))
3104 (native-inputs
3105 `(("python2-pytest" ,python2-pytest))) ; needed for running tests
3106 (home-page "https://rpython.readthedocs.org")
3107 (synopsis "Framework for implementing interpreters and virtual machines")
3108 (description "RPython is a translation and support framework for
3109 producing implementations of dynamic languages, emphasizing a clean separation
3110 between language specification and implementation aspects.")
3111 (license license:expat)))
3112
3113 ;; This version of numpy is missing the documentation and is only used to
3114 ;; build matplotlib which is required to build numpy's documentation.
3115 (define python-numpy-bootstrap
3116 (package
3117 (name "python-numpy-bootstrap")
3118 (version "1.10.4")
3119 (source
3120 (origin
3121 (method url-fetch)
3122 (uri (string-append "mirror://sourceforge/numpy/NumPy/" version
3123 "/numpy-" version ".tar.gz"))
3124 (sha256
3125 (base32
3126 "1bjjhvncraka5s6i4lg644jrxij6bvycxy7an20gcz3a0m11iygp"))))
3127 (build-system python-build-system)
3128 (inputs
3129 `(("python-nose" ,python-nose)
3130 ("openblas" ,openblas)
3131 ("lapack" ,lapack)))
3132 (native-inputs
3133 `(("gfortran" ,gfortran)))
3134 (arguments
3135 `(#:phases
3136 (alist-cons-before
3137 'build 'set-environment-variables
3138 (lambda* (#:key inputs #:allow-other-keys)
3139 (call-with-output-file "site.cfg"
3140 (lambda (port)
3141 (format port
3142 "[openblas]
3143 libraries = openblas
3144 library_dirs = ~a/lib
3145 include_dirs = ~a/include
3146
3147 [lapack]
3148 lapack_libs = lapack
3149 library_dirs = ~a/lib
3150 include_dirs = ~a/include
3151 "
3152 (assoc-ref inputs "openblas")
3153 (assoc-ref inputs "openblas")
3154 (assoc-ref inputs "lapack")
3155 (assoc-ref inputs "lapack"))))
3156 ;; Use "gcc" executable, not "cc".
3157 (substitute* "numpy/distutils/system_info.py"
3158 (("c = distutils\\.ccompiler\\.new_compiler\\(\\)")
3159 "c = distutils.ccompiler.new_compiler(); c.set_executables(compiler='gcc',compiler_so='gcc',linker_exe='gcc',linker_so='gcc -shared')"))
3160 #t)
3161 ;; Tests can only be run after the library has been installed and not
3162 ;; within the source directory.
3163 (alist-cons-after
3164 'install 'check
3165 (lambda _
3166 (with-directory-excursion "/tmp"
3167 (zero? (system* "python" "-c"
3168 "import numpy; numpy.test(verbose=2)"))))
3169 (alist-delete
3170 'check
3171 %standard-phases)))))
3172 (home-page "http://www.numpy.org/")
3173 (synopsis "Fundamental package for scientific computing with Python")
3174 (description "NumPy is the fundamental package for scientific computing
3175 with Python. It contains among other things: a powerful N-dimensional array
3176 object, sophisticated (broadcasting) functions, tools for integrating C/C++
3177 and Fortran code, useful linear algebra, Fourier transform, and random number
3178 capabilities.")
3179 (license license:bsd-3)))
3180
3181 (define python2-numpy-bootstrap
3182 (package-with-python2 python-numpy-bootstrap))
3183
3184 (define-public python2-fastlmm
3185 (package
3186 (name "python2-fastlmm")
3187 (version "0.2.21")
3188 (source
3189 (origin
3190 (method url-fetch)
3191 (uri (pypi-uri "fastlmm" version ".zip"))
3192 (sha256
3193 (base32
3194 "1q8c34rpmwkfy3r4d5172pzdkpfryj561897z9r3x22gq7813x1m"))))
3195 (build-system python-build-system)
3196 (arguments
3197 `(#:python ,python-2)) ; only Python 2.7 is supported
3198 (propagated-inputs
3199 `(("python2-numpy" ,python2-numpy)
3200 ("python2-scipy" ,python2-scipy)
3201 ("python2-matplotlib" ,python2-matplotlib)
3202 ("python2-pandas" ,python2-pandas)
3203 ("python2-scikit-learn" ,python2-scikit-learn)
3204 ("python2-cython" ,python2-cython)
3205 ("python2-pysnptools" ,python2-pysnptools)))
3206 (native-inputs
3207 `(("unzip" ,unzip)
3208 ("python2-mock" ,python2-mock)))
3209 (home-page "http://research.microsoft.com/en-us/um/redmond/projects/mscompbio/fastlmm/")
3210 (synopsis "Perform genome-wide association studies on large data sets")
3211 (description
3212 "FaST-LMM, which stands for Factored Spectrally Transformed Linear Mixed
3213 Models, is a program for performing both single-SNP and SNP-set genome-wide
3214 association studies (GWAS) on extremely large data sets.")
3215 (license license:asl2.0)))
3216
3217 (define-public python-numpy
3218 (package (inherit python-numpy-bootstrap)
3219 (name "python-numpy")
3220 (outputs '("out" "doc"))
3221 (inputs
3222 `(("which" ,which)
3223 ("python-matplotlib" ,python-matplotlib)
3224 ("python-sphinx" ,python-sphinx)
3225 ("python-pyparsing" ,python-pyparsing)
3226 ("python-numpydoc" ,python-numpydoc)
3227 ,@(package-inputs python-numpy-bootstrap)))
3228 (native-inputs
3229 `(("pkg-config" ,pkg-config)
3230 ("texlive" ,texlive)
3231 ("texinfo" ,texinfo)
3232 ("perl" ,perl)
3233 ,@(package-native-inputs python-numpy-bootstrap)))
3234 (arguments
3235 `(,@(substitute-keyword-arguments
3236 (package-arguments python-numpy-bootstrap)
3237 ((#:phases phases)
3238 `(alist-cons-after
3239 'install 'install-doc
3240 (lambda* (#:key outputs #:allow-other-keys)
3241 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
3242 (doc (string-append
3243 data "/doc/" ,name "-"
3244 ,(package-version python-numpy-bootstrap)))
3245 (info (string-append data "/info"))
3246 (html (string-append doc "/html"))
3247 (pyver ,(string-append "PYVER=")))
3248 (with-directory-excursion "doc"
3249 (mkdir-p html)
3250 (system* "make" "html" pyver)
3251 (system* "make" "latex" "PAPER=a4" pyver)
3252 (system* "make" "-C" "build/latex"
3253 "all-pdf" "PAPER=a4" pyver)
3254 ;; FIXME: Generation of the info file fails.
3255 ;; (system* "make" "info" pyver)
3256 ;; (mkdir-p info)
3257 ;; (copy-file "build/texinfo/numpy.info"
3258 ;; (string-append info "/numpy.info"))
3259 (for-each (lambda (file)
3260 (copy-file (string-append "build/latex" file)
3261 (string-append doc file)))
3262 '("/numpy-ref.pdf" "/numpy-user.pdf"))
3263 (with-directory-excursion "build/html"
3264 (for-each (lambda (file)
3265 (let* ((dir (dirname file))
3266 (tgt-dir (string-append html "/" dir)))
3267 (unless (equal? "." dir)
3268 (mkdir-p tgt-dir))
3269 (install-file file html)))
3270 (find-files "." ".*"))))))
3271 ,phases)))))))
3272
3273 (define-public python2-numpy
3274 (package-with-python2 python-numpy))
3275
3276 (define-public python-pyparsing
3277 (package
3278 (name "python-pyparsing")
3279 (version "2.0.3")
3280 (source
3281 (origin
3282 (method url-fetch)
3283 (uri (string-append "mirror://sourceforge/pyparsing/pyparsing"
3284 "/pyparsing-" version
3285 "/pyparsing-" version ".tar.gz"))
3286 (sha256
3287 (base32
3288 "0kw4py7gn45j93q8r7bzajfrjdc3xlsn2yzln41lf9zmrghjkrq6"))))
3289 (build-system python-build-system)
3290 (outputs '("out" "doc"))
3291 (arguments
3292 `(#:tests? #f ; no test target
3293 #:modules ((guix build python-build-system)
3294 (guix build utils))
3295 #:phases
3296 (alist-cons-after
3297 'install 'install-doc
3298 (lambda* (#:key outputs #:allow-other-keys)
3299 (let* ((doc (string-append (assoc-ref outputs "doc")
3300 "/share/doc/" ,name "-" ,version))
3301 (html-doc (string-append doc "/html"))
3302 (examples (string-append doc "/examples")))
3303 (mkdir-p html-doc)
3304 (mkdir-p examples)
3305 (for-each
3306 (lambda (dir tgt)
3307 (map (lambda (file)
3308 (install-file file tgt))
3309 (find-files dir ".*")))
3310 (list "docs" "htmldoc" "examples")
3311 (list doc html-doc examples))))
3312 %standard-phases)))
3313 (home-page "http://pyparsing.wikispaces.com")
3314 (synopsis "Python parsing class library")
3315 (description
3316 "The pyparsing module is an alternative approach to creating and
3317 executing simple grammars, vs. the traditional lex/yacc approach, or the use
3318 of regular expressions. The pyparsing module provides a library of classes
3319 that client code uses to construct the grammar directly in Python code.")
3320 (license license:expat)))
3321
3322 (define-public python2-pyparsing
3323 (package-with-python2 python-pyparsing))
3324
3325 (define-public python-numpydoc
3326 (package
3327 (name "python-numpydoc")
3328 (version "0.5")
3329 (source
3330 (origin
3331 (method url-fetch)
3332 (uri (string-append
3333 "https://pypi.python.org/packages/source/n/numpydoc/numpydoc-"
3334 version ".tar.gz"))
3335 (sha256
3336 (base32
3337 "0d4dnifaxkll50jx6czj05y8cb4ny60njd2wz299sj2jxfy51w4k"))
3338 (modules '((guix build utils)))
3339 (snippet
3340 '(begin
3341 ;; Drop a test requiring matplotlib, which we cannot add as an
3342 ;; input since it would create a circular dependency: Extend the
3343 ;; test for Python 3, where it is already dropped, to Python 2.
3344 (substitute* "numpydoc/tests/test_plot_directive.py"
3345 (("3") "2"))))))
3346 (build-system python-build-system)
3347 (inputs
3348 `(("python-docutils" ,python-docutils)
3349 ("python-sphinx" ,python-sphinx)
3350 ("python-nose" ,python-nose)))
3351 (home-page "https://pypi.python.org/pypi/numpydoc")
3352 (synopsis
3353 "Numpy's Sphinx extensions")
3354 (description
3355 "Sphinx extension to support docstrings in Numpy format.")
3356 (license license:bsd-2)))
3357
3358 (define-public python2-numpydoc
3359 (package-with-python2 python-numpydoc))
3360
3361 (define-public python-numexpr
3362 (package
3363 (name "python-numexpr")
3364 (version "2.6.0")
3365 (source
3366 (origin
3367 (method url-fetch)
3368 (uri (pypi-uri "numexpr" version))
3369 (sha256
3370 (base32
3371 "0i6iagl2hhbr8q4qzbbjd859v5806vqylq87fq7pi914ps6d6cag"))))
3372 (build-system python-build-system)
3373 (arguments `(#:tests? #f)) ; no tests included
3374 (propagated-inputs
3375 `(("python-numpy" ,python-numpy)))
3376 (home-page "https://github.com/pydata/numexpr")
3377 (synopsis "Fast numerical expression evaluator for NumPy")
3378 (description
3379 "Numexpr is a fast numerical expression evaluator for NumPy. With it,
3380 expressions that operate on arrays are accelerated and use less memory than
3381 doing the same calculation in Python. In addition, its multi-threaded
3382 capabilities can make use of all your cores, which may accelerate
3383 computations, most specially if they are not memory-bounded (e.g. those using
3384 transcendental functions).")
3385 (license license:expat)))
3386
3387 (define-public python2-numexpr
3388 (package-with-python2 python-numexpr))
3389
3390 (define-public python-matplotlib
3391 (package
3392 (name "python-matplotlib")
3393 (version "1.4.3")
3394 (source
3395 (origin
3396 (method url-fetch)
3397 (uri (string-append "mirror://sourceforge/matplotlib/matplotlib"
3398 "/matplotlib-" version
3399 "/matplotlib-" version ".tar.gz"))
3400 (sha256
3401 (base32
3402 "1dn05cvd0g984lzhh72wa0z93psgwshbbg93fkab6slx5m3l95av"))
3403 (patches (search-patches "matplotlib-setupext-tk.patch"))))
3404 (build-system python-build-system)
3405 (outputs '("out" "doc"))
3406 (propagated-inputs ; the following packages are all needed at run time
3407 `(("python-pyparsing" ,python-pyparsing)
3408 ("python-pygobject" ,python-pygobject)
3409 ("gobject-introspection" ,gobject-introspection)
3410 ("python-tkinter" ,python "tk")
3411 ;; The 'gtk+' package (and 'gdk-pixbuf', 'atk' and 'pango' propagated
3412 ;; from 'gtk+') provides the required 'typelib' files used by
3413 ;; 'gobject-introspection'. The location of these files is set with the
3414 ;; help of the environment variable GI_TYPELIB_PATH. At build time this
3415 ;; is done automatically by a 'native-search-path' procedure. However,
3416 ;; at run-time the user must set this variable as follows:
3417 ;;
3418 ;; export GI_TYPELIB_PATH=~/.guix-profile/lib/girepository-1.0
3419 ("gtk+" ,gtk+)
3420 ;; From version 1.4.0 'matplotlib' makes use of 'cairocffi' instead of
3421 ;; 'pycairo'. However, 'pygobject' makes use of a 'pycairo' 'context'
3422 ;; object. For this reason we need to import both libraries.
3423 ;; https://pythonhosted.org/cairocffi/cffi_api.html#converting-pycairo
3424 ("python-pycairo" ,python-pycairo)
3425 ("python-cairocffi" ,python-cairocffi)))
3426 (inputs
3427 `(("python-dateutil" ,python-dateutil-2)
3428 ("python-six" ,python-six)
3429 ("python-pytz" ,python-pytz)
3430 ("python-numpy" ,python-numpy-bootstrap)
3431 ("python-sphinx" ,python-sphinx)
3432 ("python-numpydoc" ,python-numpydoc)
3433 ("python-nose" ,python-nose)
3434 ("python-mock" ,python-mock)
3435 ("libpng" ,libpng)
3436 ("imagemagick" ,imagemagick)
3437 ("freetype" ,freetype)
3438 ("cairo" ,cairo)
3439 ("glib" ,glib)
3440 ("python-pillow" ,python-pillow)
3441 ;; FIXME: Add backends when available.
3442 ;("python-wxpython" ,python-wxpython)
3443 ;("python-pyqt" ,python-pyqt)
3444 ("tcl" ,tcl)
3445 ("tk" ,tk)))
3446 (native-inputs
3447 `(("pkg-config" ,pkg-config)
3448 ("texlive" ,texlive)
3449 ("texinfo" ,texinfo)))
3450 (arguments
3451 `(#:phases
3452 (alist-cons-before
3453 'build 'configure-environment
3454 (lambda* (#:key outputs inputs #:allow-other-keys)
3455 (let ((cairo (assoc-ref inputs "cairo"))
3456 (gtk+ (assoc-ref inputs "gtk+")))
3457 ;; Setting these directories in the 'basedirlist' of 'setup.cfg'
3458 ;; has not effect.
3459 (setenv "LD_LIBRARY_PATH"
3460 (string-append cairo "/lib:" gtk+ "/lib"))
3461 (setenv "HOME" (getcwd))
3462 (call-with-output-file "setup.cfg"
3463 (lambda (port)
3464 (format port "[directories]~%
3465 basedirlist = ~a,~a~%
3466 [rc_options]~%
3467 backend = TkAgg~%"
3468 (assoc-ref inputs "tcl")
3469 (assoc-ref inputs "tk"))))))
3470 (alist-cons-after
3471 'install 'install-doc
3472 (lambda* (#:key outputs #:allow-other-keys)
3473 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
3474 (doc (string-append data "/doc/" ,name "-" ,version))
3475 (info (string-append data "/info"))
3476 (html (string-append doc "/html")))
3477 (with-directory-excursion "doc"
3478 ;; Produce pdf in 'A4' format.
3479 (substitute* (find-files "." "conf\\.py")
3480 (("latex_paper_size = 'letter'")
3481 "latex_paper_size = 'a4'"))
3482 (mkdir-p html)
3483 (mkdir-p info)
3484 ;; The doc recommends to run the 'html' target twice.
3485 (system* "python" "make.py" "html")
3486 (system* "python" "make.py" "html")
3487 (copy-recursively "build/html" html)
3488 (system* "python" "make.py" "latex")
3489 (system* "python" "make.py" "texinfo")
3490 (symlink (string-append html "/_images")
3491 (string-append info "/matplotlib-figures"))
3492 (with-directory-excursion "build/texinfo"
3493 (substitute* "matplotlib.texi"
3494 (("@image\\{([^,]*)" all file)
3495 (string-append "@image{matplotlib-figures/" file)))
3496 (symlink (string-append html "/_images")
3497 "./matplotlib-figures")
3498 (system* "makeinfo" "--no-split"
3499 "-o" "matplotlib.info" "matplotlib.texi"))
3500 (copy-file "build/texinfo/matplotlib.info"
3501 (string-append info "/matplotlib.info"))
3502 (copy-file "build/latex/Matplotlib.pdf"
3503 (string-append doc "/Matplotlib.pdf")))))
3504 %standard-phases))))
3505 (home-page "http://matplotlib.org")
3506 (synopsis "2D plotting library for Python")
3507 (description
3508 "Matplotlib is a Python 2D plotting library which produces publication
3509 quality figures in a variety of hardcopy formats and interactive environments
3510 across platforms. Matplotlib can be used in Python scripts, the python and
3511 ipython shell, web application servers, and six graphical user interface
3512 toolkits.")
3513 (license license:psfl)
3514 (properties `((python2-variant . ,(delay python2-matplotlib))))))
3515
3516 (define-public python2-matplotlib
3517 (let ((matplotlib (package-with-python2
3518 (strip-python2-variant python-matplotlib))))
3519 (package (inherit matplotlib)
3520 ;; Make sure to use special packages for Python 2 instead
3521 ;; of those automatically rewritten by package-with-python2.
3522 (propagated-inputs
3523 `(("python2-pycairo" ,python2-pycairo)
3524 ("python2-pygobject-2" ,python2-pygobject-2)
3525 ("python2-tkinter" ,python-2 "tk")
3526 ,@(fold alist-delete (package-propagated-inputs matplotlib)
3527 '("python-pycairo" "python-pygobject" "python-tkinter")))))))
3528
3529 (define-public python2-pysnptools
3530 (package
3531 (name "python2-pysnptools")
3532 (version "0.3.9")
3533 (source
3534 (origin
3535 (method url-fetch)
3536 (uri (pypi-uri "pysnptools" version ".zip"))
3537 (sha256
3538 (base32
3539 "1wybggjzz8zw7aav4pjsg2h22xp17a1lghrprza1pxwlm7wf96y2"))))
3540 (build-system python-build-system)
3541 (arguments
3542 `(#:python ,python-2)) ; only Python 2.7 is supported
3543 (propagated-inputs
3544 `(("python2-numpy" ,python2-numpy)
3545 ("python2-scipy" ,python2-scipy)
3546 ("python2-pytz" ,python2-pytz)
3547 ("python2-cython" ,python2-cython)))
3548 (inputs
3549 `(("python2-dateutil-2" ,python2-dateutil-2)
3550 ("python2-pandas" ,python2-pandas)
3551 ("python2-six" ,python2-six)))
3552 (native-inputs
3553 `(("unzip" ,unzip)))
3554 (home-page "http://research.microsoft.com/en-us/um/redmond/projects/mscompbio/")
3555 (synopsis "Library for reading and manipulating genetic data")
3556 (description
3557 "PySnpTools is a library for reading and manipulating genetic data. It
3558 can, for example, efficiently read whole PLINK *.bed/bim/fam files or parts of
3559 those files. It can also efficiently manipulate ranges of integers using set
3560 operators such as union, intersection, and difference.")
3561 (license license:asl2.0)))
3562
3563 (define-public python-rpy2
3564 (package
3565 (name "python-rpy2")
3566 (version "2.7.6")
3567 (source
3568 (origin
3569 (method url-fetch)
3570 (uri (pypi-uri "rpy2" version))
3571 (sha256
3572 (base32
3573 "0nhan2qvrw7b7gg5zddwa22kybdv3x1g26vkd7q8lvnkgzrs4dga"))))
3574 (build-system python-build-system)
3575 (inputs
3576 `(("python-six" ,python-six)
3577 ("readline" ,readline)
3578 ("icu4c" ,icu4c)
3579 ("pcre" ,pcre)
3580 ("r" ,r)))
3581 (native-inputs
3582 `(("zlib" ,zlib)))
3583 (home-page "http://rpy.sourceforge.net/")
3584 (synopsis "Python interface to the R language")
3585 (description "rpy2 is a redesign and rewrite of rpy. It is providing a
3586 low-level interface to R from Python, a proposed high-level interface,
3587 including wrappers to graphical libraries, as well as R-like structures and
3588 functions.")
3589 (license license:gpl3+)))
3590
3591 (define-public python2-rpy2
3592 (let ((rpy2 (package-with-python2 python-rpy2)))
3593 (package (inherit rpy2)
3594 (native-inputs
3595 `(("python2-singledispatch" ,python2-singledispatch)
3596 ,@(package-native-inputs rpy2))))))
3597
3598 (define-public python-scipy
3599 (package
3600 (name "python-scipy")
3601 (version "0.16.0")
3602 (source
3603 (origin
3604 (method url-fetch)
3605 ; http://downloads.sourceforge.net/project/scipy/scipy/0.16.1/scipy-0.16.1.tar.gz
3606 (uri (string-append "mirror://sourceforge/scipy/scipy/" version
3607 "/scipy-" version ".tar.xz"))
3608 (sha256
3609 (base32
3610 "0wa0a4skpda3gx7lb12yn19nhbairlyxrvda2lz2bcawk3x5qzz2"))))
3611 (build-system python-build-system)
3612 (propagated-inputs
3613 `(("python-numpy" ,python-numpy)
3614 ("python-matplotlib" ,python-matplotlib)
3615 ("python-pyparsing" ,python-pyparsing)))
3616 (inputs
3617 `(("lapack" ,lapack)
3618 ("openblas" ,openblas)))
3619 (native-inputs
3620 `(("python-nose" ,python-nose)
3621 ("python-sphinx" ,python-sphinx)
3622 ("python-numpydoc" ,python-numpydoc)
3623 ("gfortran" ,gfortran)
3624 ("texlive" ,texlive)
3625 ("perl" ,perl)))
3626 (outputs '("out" "doc"))
3627 (arguments
3628 `(#:phases
3629 (alist-cons-before
3630 'build 'configure-openblas
3631 (lambda* (#:key inputs #:allow-other-keys)
3632 (call-with-output-file "site.cfg"
3633 (lambda (port)
3634 (format port
3635 "[blas]
3636 libraries = openblas
3637 library_dirs = ~a/lib
3638 include_dirs = ~a/include
3639 [atlas]
3640 library_dirs = ~a/lib
3641 atlas_libs = openblas
3642 "
3643 (assoc-ref inputs "openblas")
3644 (assoc-ref inputs "openblas")
3645 (assoc-ref inputs "openblas"))))
3646 #t)
3647 (alist-cons-after
3648 'install 'install-doc
3649 (lambda* (#:key outputs #:allow-other-keys)
3650 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
3651 (doc (string-append data "/doc/" ,name "-" ,version))
3652 (html (string-append doc "/html"))
3653 (pyver ,(string-append "PYVER=")))
3654 (with-directory-excursion "doc"
3655 ;; Fix generation of images for mathematical expressions.
3656 (substitute* (find-files "source" "conf\\.py")
3657 (("pngmath_use_preview = True")
3658 "pngmath_use_preview = False"))
3659 (mkdir-p html)
3660 (system* "make" "html" pyver)
3661 (system* "make" "latex" "PAPER=a4" pyver)
3662 (system* "make" "-C" "build/latex" "all-pdf" "PAPER=a4" pyver)
3663 (copy-file "build/latex/scipy-ref.pdf"
3664 (string-append doc "/scipy-ref.pdf"))
3665 (with-directory-excursion "build/html"
3666 (for-each (lambda (file)
3667 (let* ((dir (dirname file))
3668 (tgt-dir (string-append html "/" dir)))
3669 (install-file file html)))
3670 (find-files "." ".*"))))))
3671 ;; Tests can only be run after the library has been installed and not
3672 ;; within the source directory.
3673 (alist-cons-after
3674 'install 'check
3675 (lambda _
3676 (with-directory-excursion "/tmp"
3677 (zero? (system* "python" "-c" "import scipy; scipy.test()"))))
3678 (alist-delete
3679 'check
3680 (alist-cons-after
3681 'unpack 'fix-tests
3682 (lambda _
3683 (substitute* "scipy/integrate/tests/test_quadpack.py"
3684 (("libm.so") "libm.so.6"))
3685 #t)
3686 %standard-phases)))))))
3687 (home-page "http://www.scipy.org/")
3688 (synopsis "The Scipy library provides efficient numerical routines")
3689 (description "The SciPy library is one of the core packages that make up
3690 the SciPy stack. It provides many user-friendly and efficient numerical
3691 routines such as routines for numerical integration and optimization.")
3692 (license license:bsd-3)))
3693
3694 (define-public python2-scipy
3695 (package-with-python2 python-scipy))
3696
3697 (define-public python-socksipy-branch
3698 (package
3699 (name "python-socksipy-branch")
3700 (version "1.01")
3701 (source
3702 (origin
3703 (method url-fetch)
3704 (uri (pypi-uri "SocksiPy-branch" version))
3705 (sha256
3706 (base32
3707 "01l41v4g7fy9fzvinmjxy6zcbhgqaif8dhdqm4w90fwcw9h51a8p"))))
3708 (build-system python-build-system)
3709 (arguments
3710 `(#:tests? #f)) ; There are no tests
3711 (home-page "https://code.google.com/archive/p/socksipy-branch/")
3712 (synopsis "Python SOCKS module")
3713 (description
3714 "SocksiPy - A Python SOCKS client module. It provides a
3715 socket-like interface that supports connections to any TCP
3716 service through the use of a SOCKS4, SOCKS5 or HTTP proxy.
3717 The original version was developed by Dan Haim, this is a
3718 branch created by Mario Vilas to address some open issues,
3719 as the original project seems to have been abandoned circa 2007.")
3720 (license license:bsd-3)))
3721
3722 (define-public python2-socksipy-branch
3723 (package-with-python2 python-socksipy-branch))
3724
3725 (define-public python-sqlalchemy
3726 (package
3727 (name "python-sqlalchemy")
3728 (version "1.0.12")
3729 (source
3730 (origin
3731 (method url-fetch)
3732 (uri (string-append "https://pypi.python.org/packages/source/S/"
3733 "SQLAlchemy/SQLAlchemy-" version ".tar.gz"))
3734 (sha256
3735 (base32
3736 "1l8qclhd0s90w3pvwhi5mjxdwr5j7gw7cjka2fx6f2vqmq7f4yb6"))))
3737 (build-system python-build-system)
3738 (native-inputs
3739 `(("python-cython" ,python-cython) ;for c extensions
3740 ("python-pytest" ,python-pytest)
3741 ("python-mock" ,python-mock))) ;for tests
3742 (arguments
3743 `(#:phases (alist-replace
3744 'check
3745 (lambda _ (zero? (system* "py.test")))
3746 %standard-phases)))
3747 (home-page "http://www.sqlalchemy.org")
3748 (synopsis "Database abstraction library")
3749 (description
3750 "SQLAlchemy is the Python SQL toolkit and Object Relational Mapper that
3751 gives application developers the full power and flexibility of SQL. It
3752 provides a full suite of well known enterprise-level persistence patterns,
3753 designed for efficient and high-performing database access, adapted into a
3754 simple and Pythonic domain language.")
3755 (license license:x11)))
3756
3757 (define-public python2-sqlalchemy
3758 (package-with-python2 python-sqlalchemy))
3759
3760 (define-public python-pycodestyle
3761 (package
3762 (name "python-pycodestyle")
3763 (version "2.0.0")
3764 (source
3765 (origin
3766 (method url-fetch)
3767 (uri (pypi-uri "pycodestyle" version))
3768 (sha256
3769 (base32
3770 "1rz2v8506mdjdyxcnv9ygiw6v0d4dqx8z5sjyjm0w2v32h5l5w1p"))))
3771 (build-system python-build-system)
3772 (home-page "https://pycodestyle.readthedocs.io/")
3773 (synopsis "Python style guide checker")
3774 (description "@code{pycodestyle} (formerly pep8) is a tool to check
3775 Python code against some of the style conventions in
3776 @url{http://www.python.org/dev/peps/pep-0008/,PEP 8}.")
3777 (license license:expat)))
3778
3779 (define-public python2-pycodestyle
3780 (package-with-python2 python-pycodestyle))
3781
3782 (define-public python-orderedmultidict
3783 (package
3784 (name "python-orderedmultidict")
3785 (version "0.7.10")
3786 (source
3787 (origin
3788 (method url-fetch)
3789 (uri (pypi-uri "orderedmultidict" version))
3790 (sha256
3791 (base32
3792 "1gvqk0jd432wsn88kq4svad68xz3r012jfpnhh9in7bqrkyxidky"))))
3793 (build-system python-build-system)
3794 (arguments
3795 `(#:phases
3796 (modify-phases %standard-phases
3797 (add-after 'unpack 'fix-tests
3798 (lambda _
3799 ;; The package uses nosetest for running the tests.
3800 ;; Adding this initfile allows to run the test suite
3801 ;; without requiring nosetest.
3802 (zero? (system* "touch" "tests/__init__.py")))))))
3803 (propagated-inputs
3804 `(("python-six" ,python-six)))
3805 (native-inputs
3806 `(("python-pycodestyle" ,python-pycodestyle)))
3807 (home-page "https://github.com/gruns/orderedmultidict")
3808 (synopsis "Python Ordered Multivalue Dictionary - omdict")
3809 (description "This package contains a library for ordered multivalue
3810 dictionaries. A multivalue dictionary is a dictionary that can store
3811 multiple values for the same key. An ordered multivalue dictionary is a
3812 multivalue dictionary that retains the order of insertions and deletions.")
3813 (license license:unlicense)))
3814
3815 (define-public python2-orderedmultidict
3816 (package-with-python2 python-orderedmultidict))
3817
3818 (define-public python-furl
3819 (package
3820 (name "python-furl")
3821 (version "0.5.6")
3822 (source
3823 (origin
3824 (method url-fetch)
3825 (uri (pypi-uri "furl" version))
3826 (sha256
3827 (base32
3828 "0lzpfpm686hvz3sr1mcrnd1b3lgmnw8v59gb43wfi98r3b671pqc"))))
3829 (build-system python-build-system)
3830 (propagated-inputs
3831 `(("python-six" ,python-six)
3832 ("python-orderedmultidict" ,python-orderedmultidict)))
3833 (native-inputs
3834 `(("python-pycodestyle" ,python-pycodestyle)))
3835 (home-page "https://github.com/gruns/furl")
3836 (synopsis "URL manipulation in Python")
3837 (description "Furl provides an easy-to-use alternative to the
3838 @code{urllib} and @code{urlparse} modules for manipulating URLs.")
3839 (license license:unlicense)))
3840
3841 (define-public python2-furl
3842 (package-with-python2 python-furl))
3843
3844 (define-public python-flask-babel
3845 (package
3846 (name "python-flask-babel")
3847 (version "0.11.1")
3848 (source
3849 (origin
3850 (method url-fetch)
3851 (uri (pypi-uri "Flask-Babel" version))
3852 (sha256
3853 (base32
3854 "16b80cipdba9xj3jlaiaq6wgrgpjb70w3j01jjy9hbp4k71kd6yj"))))
3855 (build-system python-build-system)
3856 (propagated-inputs
3857 `(("python-flask" ,python-flask)
3858 ("python-babel" ,python-babel)
3859 ("python-jinja2" ,python-jinja2)
3860 ("python-pytz" ,python-pytz)))
3861 (home-page "https://github.com/python-babel/flask-babel")
3862 (synopsis "Add i18n/l10n support to Flask applications")
3863 (description "This package implements internationalization and localization
3864 support for Flask. This is based on the Python babel module as well as pytz -
3865 both of which are installed automatically if you install this library.")
3866 (license license:bsd-3)))
3867
3868 (define-public python2-flask-babel
3869 (package-with-python2 python-flask-babel))
3870
3871 (define-public python-sqlalchemy-utils
3872 (package
3873 (name "python-sqlalchemy-utils")
3874 (version "0.32.9")
3875 (source
3876 (origin
3877 (method url-fetch)
3878 (uri (pypi-uri "SQLAlchemy-Utils" version))
3879 (sha256
3880 (base32
3881 "1zbmmh7n8m01ikizn2mj1mfwch26nsr1awv9mvskqry7av0mpy98"))))
3882 (build-system python-build-system)
3883 (propagated-inputs
3884 `(("python-six" ,python-six)
3885 ("python-sqlalchemy" ,python-sqlalchemy)))
3886 (native-inputs
3887 `(("python-pytest" ,python-pytest)))
3888 (home-page "https://github.com/kvesteri/sqlalchemy-utils")
3889 (synopsis "Various utility functions for SQLAlchemy")
3890 (description
3891 "SQLAlchemy-utils provides various utility functions and custom data types
3892 for SQLAlchemy. SQLAlchemy is an SQL database abstraction library for Python.
3893
3894 You might also want to install the following optional dependencies:
3895 @enumerate
3896 @item @code{python-passlib}
3897 @item @code{python-babel}
3898 @item @code{python-cryptography}
3899 @item @code{python-pytz}
3900 @item @code{python-psycopg2}
3901 @item @code{python-furl}
3902 @item @code{python-flask-babel}
3903 @end enumerate
3904 ")
3905 (license license:bsd-3)))
3906
3907 (define-public python2-sqlalchemy-utils
3908 (package-with-python2 python-sqlalchemy-utils))
3909
3910 (define-public python-alembic
3911 (package
3912 (name "python-alembic")
3913 (version "0.8.7")
3914 (source
3915 (origin
3916 (method url-fetch)
3917 (uri (pypi-uri "alembic" version))
3918 (sha256
3919 (base32
3920 "0ias6fdzwr2s220fnjspkdgm9510bd0cnap0hx5y4zy4srba9f3z"))))
3921 (build-system python-build-system)
3922 (native-inputs
3923 `(("python-mock" ,python-mock)
3924 ("python-pytest-cov" ,python-pytest-cov)))
3925 (propagated-inputs
3926 `(("python-sqlalchemy" ,python-sqlalchemy)
3927 ("python-mako" ,python-mako)
3928 ("python-editor" ,python-editor)))
3929 (home-page "http://bitbucket.org/zzzeek/alembic")
3930 (synopsis
3931 "Database migration tool for SQLAlchemy")
3932 (description
3933 "Alembic is a lightweight database migration tool for usage with the
3934 SQLAlchemy Database Toolkit for Python.")
3935 (license license:expat)))
3936
3937 (define-public python2-alembic
3938 (package-with-python2 python-alembic))
3939
3940 (define-public python-distutils-extra
3941 (package
3942 (name "python-distutils-extra")
3943 (version "2.38")
3944 (source
3945 (origin
3946 (method url-fetch)
3947 (uri (string-append "https://launchpad.net/python-distutils-extra/trunk/"
3948 version "/+download/python-distutils-extra-"
3949 version ".tar.gz"))
3950 (sha256
3951 (base32
3952 "0lx15kcbby9zisx33p2h5hgakgwh2bvh0ibag8z0px4j6ifhs41x"))))
3953 (build-system python-build-system)
3954 (home-page "https://launchpad.net/python-distutils-extra/")
3955 (synopsis "Enhancements to Python's distutils")
3956 (description
3957 "The python-distutils-extra module enables you to easily integrate
3958 gettext support, themed icons, and scrollkeeper-based documentation into
3959 Python's distutils.")
3960 (license license:gpl2)))
3961
3962 (define-public python2-distutils-extra
3963 (package-with-python2 python-distutils-extra))
3964
3965 (define-public python2-elib.intl
3966 (package
3967 (name "python2-elib.intl")
3968 (version "0.0.3")
3969 (source
3970 (origin
3971 ;; This project doesn't tag releases or publish tarballs, so we take
3972 ;; source from a (semi-arbitrary, i.e. latest as of now) git commit.
3973 (method git-fetch)
3974 (uri (git-reference
3975 (url "https://github.com/dieterv/elib.intl.git")
3976 (commit "d09997cfef")))
3977 (sha256
3978 (base32
3979 "0y7vzff9xgbnaay7m0va1arl6g68ncwrvbgwl7jqlclsahzzb09d"))))
3980 (build-system python-build-system)
3981 (arguments
3982 ;; incompatible with Python 3 (exception syntax)
3983 `(#:python ,python-2
3984 #:tests? #f))
3985 (home-page "https://github.com/dieterv/elib.intl")
3986 (synopsis "Enhanced internationalization for Python")
3987 (description
3988 "The elib.intl module provides enhanced internationalization (I18N)
3989 services for your Python modules and applications.")
3990 (license license:lgpl3+)))
3991
3992 (define-public python-pillow
3993 (package
3994 (name "python-pillow")
3995 (version "3.3.3")
3996 (source
3997 (origin
3998 (method url-fetch)
3999 (uri (pypi-uri "Pillow" version))
4000 (sha256
4001 (base32
4002 "0xkv0p1d73gz0a1qaasf0ai4262g8f334j07vd60bjrxs2wr3nmj"))))
4003 (build-system python-build-system)
4004 (native-inputs
4005 `(("python-nose" ,python-nose)))
4006 (inputs
4007 `(("freetype" ,freetype)
4008 ("lcms" ,lcms)
4009 ("zlib" ,zlib)
4010 ("libjpeg" ,libjpeg)
4011 ("openjpeg" ,openjpeg)
4012 ("libtiff" ,libtiff)
4013 ("libwebp" ,libwebp)))
4014 ;; Note: setuptools used at runtime for pkg_resources
4015 (arguments
4016 `(#:phases (modify-phases %standard-phases
4017 (add-after
4018 'install 'check-installed
4019 (lambda _
4020 (begin
4021 (setenv "HOME" (getcwd))
4022 (and (zero? (system* "python" "selftest.py"
4023 "--installed"))
4024 (zero? (system* "python" "test-installed.py"))))))
4025 (delete 'check))))
4026 (home-page "https://pypi.python.org/pypi/Pillow")
4027 (synopsis "Fork of the Python Imaging Library")
4028 (description
4029 "The Python Imaging Library adds image processing capabilities to your
4030 Python interpreter. This library provides extensive file format support, an
4031 efficient internal representation, and fairly powerful image processing
4032 capabilities. The core image library is designed for fast access to data
4033 stored in a few basic pixel formats. It should provide a solid foundation for
4034 a general image processing tool.")
4035 (license (license:x11-style
4036 "http://www.pythonware.com/products/pil/license.htm"
4037 "The PIL Software License"))))
4038
4039 (define-public python2-pillow
4040 (package-with-python2 python-pillow))
4041
4042 (define-public python-pycparser
4043 (package
4044 (name "python-pycparser")
4045 (version "2.14")
4046 (source
4047 (origin
4048 (method url-fetch)
4049 (uri (pypi-uri "pycparser" version))
4050 (sha256
4051 (base32
4052 "0wvzyb6rxsfj3xcnpa4ynbh9qc7rrbk2277d5wqpphmx9akv8nbr"))))
4053 (outputs '("out" "doc"))
4054 (build-system python-build-system)
4055 (native-inputs
4056 `(("pkg-config" ,pkg-config)))
4057 (arguments
4058 `(#:phases
4059 (alist-replace
4060 'check
4061 (lambda _
4062 (with-directory-excursion "tests"
4063 (zero? (system* "python" "all_tests.py"))))
4064 (alist-cons-after
4065 'install 'install-doc
4066 (lambda* (#:key outputs #:allow-other-keys)
4067 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4068 (doc (string-append data "/doc/" ,name "-" ,version))
4069 (examples (string-append doc "/examples")))
4070 (mkdir-p examples)
4071 (for-each (lambda (file)
4072 (copy-file (string-append "." file)
4073 (string-append doc file)))
4074 '("/README.rst" "/CHANGES" "/LICENSE"))
4075 (copy-recursively "examples" examples)))
4076 %standard-phases))))
4077 (home-page "https://github.com/eliben/pycparser")
4078 (synopsis "C parser in Python")
4079 (description
4080 "Pycparser is a complete parser of the C language, written in pure Python
4081 using the PLY parsing library. It parses C code into an AST and can serve as
4082 a front-end for C compilers or analysis tools.")
4083 (license license:bsd-3)))
4084
4085 (define-public python2-pycparser
4086 (package-with-python2 python-pycparser))
4087
4088 (define-public python-cffi
4089 (package
4090 (name "python-cffi")
4091 (version "1.4.2")
4092 (source
4093 (origin
4094 (method url-fetch)
4095 (uri (pypi-uri "cffi" version))
4096 (sha256
4097 (base32 "161rj52rzi3880lij17d6i9kvgkiwjilrqjs8405k8sf6ryif7cg"))))
4098 (build-system python-build-system)
4099 (outputs '("out" "doc"))
4100 (inputs
4101 `(("libffi" ,libffi)))
4102 (propagated-inputs ; required at run-time
4103 `(("python-pycparser" ,python-pycparser)))
4104 (native-inputs
4105 `(("pkg-config" ,pkg-config)
4106 ("python-sphinx" ,python-sphinx)
4107 ("python-pytest" ,python-pytest)))
4108 (arguments
4109 `(#:phases
4110 (alist-cons-after
4111 'install 'install-doc
4112 (lambda* (#:key outputs #:allow-other-keys)
4113 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4114 (doc (string-append data "/doc/" ,name "-" ,version))
4115 (html (string-append doc "/html")))
4116 (with-directory-excursion "doc"
4117 (system* "make" "html")
4118 (mkdir-p html)
4119 (copy-recursively "build/html" html))
4120 (copy-file "LICENSE" (string-append doc "/LICENSE"))))
4121 %standard-phases)))
4122 (home-page "http://cffi.readthedocs.org")
4123 (synopsis "Foreign function interface for Python")
4124 (description
4125 "Foreign Function Interface for Python calling C code.")
4126 (license license:expat)))
4127
4128 (define-public python2-cffi
4129 (package-with-python2 python-cffi))
4130
4131 (define-public python-xcffib
4132 (package
4133 (name "python-xcffib")
4134 (version "0.1.9")
4135 (source
4136 (origin
4137 (method url-fetch)
4138 (uri (string-append "https://pypi.python.org/packages/source/x/"
4139 "xcffib/xcffib-" version ".tar.gz"))
4140 (sha256
4141 (base32
4142 "0655hzxv57h1a9ja9kwp0ichbkhf3djw32k33d66xp0q37dq2y81"))))
4143 (build-system python-build-system)
4144 (inputs
4145 `(("libxcb" ,libxcb)
4146 ("python-six" ,python-six)))
4147 (propagated-inputs
4148 `(("python-cffi" ,python-cffi))) ; used at run time
4149 (arguments
4150 `(#:phases
4151 (alist-cons-after
4152 'install 'install-doc
4153 (lambda* (#:key outputs #:allow-other-keys)
4154 (let ((doc (string-append (assoc-ref outputs "out") "/share"
4155 "/doc/" ,name "-" ,version)))
4156 (mkdir-p doc)
4157 (copy-file "README.md"
4158 (string-append doc "/README.md"))))
4159 %standard-phases)))
4160 (home-page "https://github.com/tych0/xcffib")
4161 (synopsis "XCB Python bindings")
4162 (description
4163 "Xcffib is a replacement for xpyb, an XCB Python bindings. It adds
4164 support for Python 3 and PyPy. It is based on cffi.")
4165 (license license:expat)))
4166
4167 (define-public python2-xcffib
4168 (package-with-python2 python-xcffib))
4169
4170 (define-public python-cairocffi
4171 (package
4172 (name "python-cairocffi")
4173 (version "0.6")
4174 (source
4175 (origin
4176 (method url-fetch)
4177 ;; The archive on pypi is missing the 'utils' directory!
4178 (uri (string-append "https://github.com/SimonSapin/cairocffi/archive/v"
4179 version ".tar.gz"))
4180 (file-name (string-append name "-" version ".tar.gz"))
4181 (sha256
4182 (base32
4183 "03w5p62sp3nqiccx864sbq0jvh7946277jqx3rcc3dch5xwfvv51"))))
4184 (build-system python-build-system)
4185 (outputs '("out" "doc"))
4186 (inputs
4187 `(("gdk-pixbuf" ,gdk-pixbuf)
4188 ("cairo" ,cairo)))
4189 (native-inputs
4190 `(("pkg-config" ,pkg-config)
4191 ("python-sphinx" ,python-sphinx)
4192 ("python-docutils" ,python-docutils)))
4193 (propagated-inputs
4194 `(("python-xcffib" ,python-xcffib))) ; used at run time
4195 (arguments
4196 `(#:phases
4197 (alist-cons-after
4198 'install 'install-doc
4199 (lambda* (#:key inputs outputs #:allow-other-keys)
4200 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4201 (doc (string-append data "/doc/" ,name "-" ,version))
4202 (html (string-append doc "/html")))
4203 (setenv "LD_LIBRARY_PATH"
4204 (string-append (assoc-ref inputs "cairo") "/lib" ":"
4205 (assoc-ref inputs "gdk-pixbuf") "/lib"))
4206 (setenv "LANG" "en_US.UTF-8")
4207 (mkdir-p html)
4208 (for-each (lambda (file)
4209 (copy-file (string-append "." file)
4210 (string-append doc file)))
4211 '("/README.rst" "/CHANGES" "/LICENSE"))
4212 (system* "python" "setup.py" "build_sphinx")
4213 (copy-recursively "docs/_build/html" html)))
4214 %standard-phases)))
4215 (home-page "https://github.com/SimonSapin/cairocffi")
4216 (synopsis "Python bindings and object-oriented API for Cairo")
4217 (description
4218 "Cairocffi is a CFFI-based drop-in replacement for Pycairo, a set of
4219 Python bindings and object-oriented API for cairo. Cairo is a 2D vector
4220 graphics library with support for multiple backends including image buffers,
4221 PNG, PostScript, PDF, and SVG file output.")
4222 (license license:bsd-3)))
4223
4224 (define-public python2-cairocffi
4225 (package-with-python2 python-cairocffi))
4226
4227 (define-public python-decorator
4228 (package
4229 (name "python-decorator")
4230 (version "4.0.9")
4231 (source
4232 (origin
4233 (method url-fetch)
4234 (uri (pypi-uri "decorator" version))
4235 (sha256
4236 (base32 "1a5vwhflfd9sh3rfb40xlyipldgdzfff6brman57hqv3661jw0lh"))))
4237 (build-system python-build-system)
4238 (arguments '(#:tests? #f)) ; no test target
4239 (home-page "https://pypi.python.org/pypi/decorator/")
4240 (synopsis "Python module to simplify usage of decorators")
4241 (description
4242 "The aim of the decorator module is to simplify the usage of decorators
4243 for the average programmer, and to popularize decorators usage giving examples
4244 of useful decorators, such as memoize, tracing, redirecting_stdout, locked,
4245 etc. The core of this module is a decorator factory.")
4246 (license license:expat)))
4247
4248 (define-public python2-decorator
4249 (package-with-python2 python-decorator))
4250
4251 (define-public python-drmaa
4252 (package
4253 (name "python-drmaa")
4254 (version "0.7.6")
4255 (source
4256 (origin
4257 (method url-fetch)
4258 (uri (string-append
4259 "https://pypi.python.org/packages/source/d/drmaa/drmaa-"
4260 version ".tar.gz"))
4261 (sha256
4262 (base32 "0bzl9f9g34dlhwf09i3fdv7dqqzf2iq0w7d6c2bafx1nlap8qfbh"))))
4263 (build-system python-build-system)
4264 ;; The test suite requires libdrmaa which is provided by the cluster
4265 ;; environment. At runtime the environment variable DRMAA_LIBRARY_PATH
4266 ;; should be set to the path of the libdrmaa library.
4267 (arguments '(#:tests? #f))
4268 (native-inputs
4269 `(("python-nose" ,python-nose)))
4270 (home-page "https://pypi.python.org/pypi/drmaa")
4271 (synopsis "Python bindings for the DRMAA library")
4272 (description
4273 "A Python package for Distributed Resource Management (DRM) job
4274 submission and control. This package is an implementation of the DRMAA 1.0
4275 Python language binding specification.")
4276 (license license:bsd-3)))
4277
4278 (define-public python2-drmaa
4279 (package-with-python2 python-drmaa))
4280
4281 (define-public python-gridmap
4282 (package
4283 (name "python-gridmap")
4284 (version "0.13.0")
4285 (source
4286 (origin
4287 (method url-fetch)
4288 (uri (string-append
4289 "https://github.com/pygridtools/gridmap/archive/v"
4290 version ".tar.gz"))
4291 (file-name (string-append name "-" version ".tar.gz"))
4292 (sha256
4293 (base32 "1gzjg2k6f14i1msm2b0ax8d9ds1hvk6qd5nlaivg8m4cxqp4cp1x"))))
4294 (build-system python-build-system)
4295 (propagated-inputs
4296 `(("python-psutil" ,python-psutil)
4297 ("python-drmaa" ,python-drmaa)
4298 ("python-pyzmq" ,python-pyzmq)))
4299 (home-page "https://github.com/pygridtools/gridmap")
4300 (synopsis "Create jobs on a cluster directly from Python")
4301 (description
4302 "Gridmap is a Python package to allow you to easily create jobs on the
4303 cluster directly from Python. You can directly map Python functions onto the
4304 cluster without needing to write any wrapper code yourself.")
4305 (license license:gpl3+)))
4306
4307 (define-public python2-gridmap
4308 (package-with-python2 python-gridmap))
4309
4310 (define-public python-pexpect
4311 (package
4312 (name "python-pexpect")
4313 (version "3.3")
4314 (source
4315 (origin
4316 (method url-fetch)
4317 (uri (string-append "https://pypi.python.org/packages/source/p/"
4318 "pexpect/pexpect-" version ".tar.gz"))
4319 (sha256
4320 (base32 "1fp5gm976z7ghm8jw57463rj19cv06c8zw842prgyg788f6n3snz"))))
4321 (build-system python-build-system)
4322 (arguments
4323 `(#:phases
4324 (modify-phases %standard-phases
4325 (replace 'check (lambda _ (zero? (system* "nosetests")))))))
4326 (native-inputs
4327 `(("python-nose" ,python-nose)))
4328 (home-page "http://pexpect.readthedocs.org/")
4329 (synopsis "Controlling interactive console applications")
4330 (description
4331 "Pexpect is a pure Python module for spawning child applications;
4332 controlling them; and responding to expected patterns in their output.
4333 Pexpect works like Don Libes’ Expect. Pexpect allows your script to spawn a
4334 child application and control it as if a human were typing commands.")
4335 (license license:isc)))
4336
4337 (define-public python2-pexpect
4338 (package-with-python2 python-pexpect))
4339
4340 (define-public python-setuptools-scm
4341 (package
4342 (name "python-setuptools-scm")
4343 (version "1.11.1")
4344 (source (origin
4345 (method url-fetch)
4346 (uri (pypi-uri "setuptools_scm" version))
4347 (sha256
4348 (base32
4349 "1gqr73i150yzj3mz32854vj93x07yr52kn8fdckwa41ll8wgficc"))))
4350 (build-system python-build-system)
4351 (home-page "https://github.com/pypa/setuptools_scm/")
4352 (synopsis "Manage Python package versions in SCM metadata")
4353 (description
4354 "Setuptools_scm handles managing your Python package versions in
4355 @dfn{software configuration management} (SCM) metadata instead of declaring
4356 them as the version argument or in a SCM managed file.")
4357 (license license:expat)))
4358
4359 (define-public python2-setuptools-scm
4360 (package-with-python2 python-setuptools-scm))
4361
4362 (define-public python-pathpy
4363 (package
4364 (name "python-pathpy")
4365 (version "8.1.1")
4366 (source
4367 (origin
4368 (method url-fetch)
4369 (uri (string-append "https://pypi.python.org/packages/source/p/"
4370 "path.py/path.py-" version ".tar.gz"))
4371 (sha256
4372 (base32 "1p8s1l2vfkqhqxdhqlj0g1jjw4f1as2frr35sjcpjjpd5a89y41f"))))
4373 (build-system python-build-system)
4374 (propagated-inputs
4375 `(("python-appdirs" ,python-appdirs)))
4376 (native-inputs
4377 `(("python-setuptools-scm" ,python-setuptools-scm)
4378 ("python-pytest" ,python-pytest)
4379 ("python-pytest-runner" ,python-pytest-runner)))
4380 (home-page "http://github.com/jaraco/path.py")
4381 (synopsis "Python module wrapper for built-in os.path")
4382 (description
4383 "@code{path.py} implements path objects as first-class entities, allowing
4384 common operations on files to be invoked on those path objects directly.")
4385 (license license:expat)))
4386
4387 (define-public python2-pathpy
4388 (package-with-python2 python-pathpy))
4389
4390 (define-public python-pickleshare
4391 (package
4392 (name "python-pickleshare")
4393 (version "0.5")
4394 (source
4395 (origin
4396 (method url-fetch)
4397 (uri (string-append "https://pypi.python.org/packages/source/p/"
4398 "pickleshare/pickleshare-" version ".tar.gz"))
4399 (sha256
4400 (base32 "11ljr90j3p6qswdrbl7p4cjb2i93f6vn0vx9anzpshsx0d2mggn0"))))
4401 (build-system python-build-system)
4402 (propagated-inputs
4403 `(("python-pathpy" ,python-pathpy)))
4404 (home-page "https://github.com/vivainio/pickleshare")
4405 (synopsis "Tiny key value database with concurrency support")
4406 (description
4407 "PickleShare is a small ‘shelve’-like datastore with concurrency support.
4408 Like shelve, a PickleShareDB object acts like a normal dictionary. Unlike
4409 shelve, many processes can access the database simultaneously. Changing a
4410 value in database is immediately visible to other processes accessing the same
4411 database. Concurrency is possible because the values are stored in separate
4412 files. Hence the “database” is a directory where all files are governed by
4413 PickleShare.")
4414 (license license:expat)))
4415
4416 (define-public python2-pickleshare
4417 (package-with-python2 python-pickleshare))
4418
4419 (define-public python-simplegeneric
4420 (package
4421 (name "python-simplegeneric")
4422 (version "0.8.1")
4423 (source
4424 (origin
4425 (method url-fetch)
4426 (uri (string-append "https://pypi.python.org/packages/source/s/"
4427 "simplegeneric/simplegeneric-" version ".zip"))
4428 (sha256
4429 (base32 "0wwi1c6md4vkbcsfsf8dklf3vr4mcdj4mpxkanwgb6jb1432x5yw"))))
4430 (build-system python-build-system)
4431 (native-inputs
4432 `(("unzip" ,unzip)))
4433 (home-page "http://cheeseshop.python.org/pypi/simplegeneric")
4434 (synopsis "Python module for simple generic functions")
4435 (description
4436 "The simplegeneric module lets you define simple single-dispatch generic
4437 functions, akin to Python’s built-in generic functions like @code{len()},
4438 @code{iter()} and so on. However, instead of using specially-named methods,
4439 these generic functions use simple lookup tables, akin to those used by
4440 e.g. @code{pickle.dump()} and other generic functions found in the Python
4441 standard library.")
4442 (license license:zpl2.1)))
4443
4444 (define-public python2-simplegeneric
4445 (package-with-python2 python-simplegeneric))
4446
4447 (define-public python-ipython-genutils
4448 (package
4449 (name "python-ipython-genutils")
4450 (version "0.1.0")
4451 (source
4452 (origin
4453 (method url-fetch)
4454 (uri (string-append "https://pypi.python.org/packages/source/i/"
4455 "ipython_genutils/ipython_genutils-"
4456 version ".tar.gz"))
4457 (sha256
4458 (base32 "19l2pp1c64ansr89l3cqh19jdi2ixhssdzx0vz4n6r52a6i281is"))))
4459 (build-system python-build-system)
4460 (arguments `(#:tests? #f)) ; no tests
4461 (home-page "http://ipython.org")
4462 (synopsis "Vestigial utilities from IPython")
4463 (description
4464 "This package provides retired utilities from IPython.")
4465 (license license:bsd-3)))
4466
4467 (define-public python2-ipython-genutils
4468 (package-with-python2 python-ipython-genutils))
4469
4470 (define-public python-traitlets
4471 (package
4472 (name "python-traitlets")
4473 (version "4.2.0")
4474 (source
4475 (origin
4476 (method url-fetch)
4477 (uri (pypi-uri "traitlets" version))
4478 (sha256
4479 (base32
4480 "1afy08sa5n9gnkvh3da49c16zkyv598vchv0p1hp7zzjy8895hz4"))))
4481 (build-system python-build-system)
4482 (arguments
4483 `(#:phases
4484 (modify-phases %standard-phases
4485 (replace 'check (lambda _ (zero? (system* "nosetests")))))))
4486 (propagated-inputs
4487 `(("python-ipython-genutils" ,python-ipython-genutils)
4488 ("python-decorator" ,python-decorator)))
4489 (native-inputs
4490 `(("python-mock" ,python-mock)
4491 ("python-nose" ,python-nose)))
4492 (home-page "http://ipython.org")
4493 (synopsis "Configuration system for Python applications")
4494 (description
4495 "Traitlets is a framework that lets Python classes have attributes with
4496 type checking, dynamically calculated default values, and ‘on change’
4497 callbacks. The package also includes a mechanism to use traitlets for
4498 configuration, loading values from files or from command line arguments. This
4499 is a distinct layer on top of traitlets, so you can use traitlets in your code
4500 without using the configuration machinery.")
4501 (license license:bsd-3)))
4502
4503 (define-public python2-traitlets
4504 (package-with-python2 python-traitlets))
4505
4506 (define-public python-jupyter-core
4507 (package
4508 (name "python-jupyter-core")
4509 (version "4.2.0")
4510 (source
4511 (origin
4512 (method url-fetch)
4513 (uri (string-append (pypi-uri "jupyter_core" version)))
4514 (sha256
4515 (base32
4516 "177d9csqldzhsh6xs1p4nf6lzvhzyg6gklqjf69lxgxyadx87v24"))))
4517 (build-system python-build-system)
4518 ;; FIXME: not sure how to run the tests
4519 (arguments `(#:tests? #f))
4520 (propagated-inputs
4521 `(("python-traitlets" ,python-traitlets)))
4522 (home-page "http://jupyter.org/")
4523 (synopsis "Jupyter base package")
4524 (description
4525 "Jupyter core is the base package on which Jupyter projects rely.")
4526 (license license:bsd-3)))
4527
4528 (define-public python2-jupyter-core
4529 (package-with-python2 python-jupyter-core))
4530
4531 (define-public python-jupyter-client
4532 (package
4533 (name "python-jupyter-client")
4534 (version "4.4.0")
4535 (source
4536 (origin
4537 (method url-fetch)
4538 (uri (pypi-uri "jupyter_client" version))
4539 (sha256
4540 (base32
4541 "1vjjrpjw7k5sh982pbjnslv7byfbfazjw9g92jvs7dz5qbx556n9"))))
4542 (build-system python-build-system)
4543 ;; Tests fail because of missing native python kernel which I assume is
4544 ;; provided by the ipython package, which we cannot use because it would
4545 ;; cause a dependency cycle.
4546 (arguments `(#:tests? #f))
4547 (propagated-inputs
4548 `(("python-pyzmq" ,python-pyzmq)
4549 ("python-traitlets" ,python-traitlets)
4550 ("python-jupyter-core" ,python-jupyter-core)))
4551 (home-page "http://jupyter.org/")
4552 (synopsis "Jupyter protocol implementation and client libraries")
4553 (description
4554 "The @code{jupyter_client} package contains the reference implementation
4555 of the Jupyter protocol. It also provides client and kernel management APIs
4556 for working with kernels, and the @code{jupyter kernelspec} entrypoint for
4557 installing @code{kernelspec}s for use with Jupyter frontends.")
4558 (license license:bsd-3)))
4559
4560 (define-public python2-jupyter-client
4561 (package-with-python2 python-jupyter-client))
4562
4563 (define-public python-ipykernel
4564 (package
4565 (name "python-ipykernel")
4566 (version "4.5.0")
4567 (source
4568 (origin
4569 (method url-fetch)
4570 (uri (pypi-uri "ipykernel" version))
4571 (sha256
4572 (base32 "15c2bp1x3i6s4xb7vz7742h3kmvdfdfn9n2haywm3mwgvf77jni4"))))
4573 (build-system python-build-system)
4574 ;; The tests load a submodule of IPython. However, IPython itself depends
4575 ;; on ipykernel.
4576 (arguments `(#:tests? #f))
4577 (propagated-inputs
4578 ;; imported at runtime during connect
4579 `(("python-jupyter-client" ,python-jupyter-client)))
4580 (home-page "http://ipython.org")
4581 (synopsis "IPython Kernel for Jupyter")
4582 (description
4583 "This package provides the IPython kernel for Jupyter.")
4584 (license license:bsd-3)))
4585
4586 (define-public python2-ipykernel
4587 (package-with-python2 python-ipykernel))
4588
4589 (define-public python-testpath
4590 (package
4591 (name "python-testpath")
4592 (version "0.2")
4593 (source
4594 (origin
4595 (method url-fetch)
4596 (uri (string-append "https://github.com/jupyter/testpath/archive/"
4597 version ".tar.gz"))
4598 (file-name (string-append name "-" version ".tar.gz"))
4599 (sha256
4600 (base32
4601 "04kh3fgvmqz6cfcw79q70qwjz7ib7lxm27cc548iy2rpr33qqf55"))))
4602 (build-system python-build-system)
4603 (arguments
4604 `(#:tests? #f ; this package does not even have a setup.py
4605 #:phases
4606 (modify-phases %standard-phases
4607 (delete 'install)
4608 (replace 'build
4609 (lambda* (#:key inputs outputs #:allow-other-keys)
4610 (let ((dir (string-append
4611 (assoc-ref outputs "out")
4612 "/lib/python"
4613 (string-take (string-take-right
4614 (assoc-ref inputs "python") 5) 3)
4615 "/site-packages/testpath")))
4616 (mkdir-p dir)
4617 (copy-recursively "testpath" dir))
4618 #t)))))
4619 (home-page "https://github.com/takluyver/testpath")
4620 (synopsis "Test utilities for code working with files and commands")
4621 (description
4622 "Testpath is a collection of utilities for Python code working with files
4623 and commands. It contains functions to check things on the filesystem, and
4624 tools for mocking system commands and recording calls to those.")
4625 (license license:expat)))
4626
4627 (define-public python2-testpath
4628 (package-with-python2 python-testpath))
4629
4630 (define-public python-ipython
4631 (package
4632 (name "python-ipython")
4633 (version "4.0.0")
4634 (source
4635 (origin
4636 (method url-fetch)
4637 (uri (pypi-uri "ipython" version ".tar.gz"))
4638 (sha256
4639 (base32 "1npl8g6bfsff9j938ypx0q5fyzy2l8lp0jl8skjjj2zv0z27dlig"))))
4640 (build-system python-build-system)
4641 (outputs '("out" "doc"))
4642 (propagated-inputs
4643 `(("python-pyzmq" ,python-pyzmq)
4644 ("python-terminado" ,python-terminado)
4645 ("python-matplotlib" ,python-matplotlib)
4646 ("python-numpy" ,python-numpy)
4647 ("python-numpydoc" ,python-numpydoc)
4648 ("python-jinja2" ,python-jinja2)
4649 ("python-mistune" ,python-mistune)
4650 ("python-pexpect" ,python-pexpect)
4651 ("python-pickleshare" ,python-pickleshare)
4652 ("python-simplegeneric" ,python-simplegeneric)
4653 ("python-jsonschema" ,python-jsonschema)
4654 ("python-traitlets" ,python-traitlets)
4655 ("python-ipykernel" ,python-ipykernel)
4656 ("python-pygments" ,python-pygments)))
4657 (inputs
4658 `(("readline" ,readline)
4659 ("which" ,which)))
4660 (native-inputs
4661 `(("pkg-config" ,pkg-config)
4662 ("python-requests" ,python-requests) ;; for tests
4663 ("python-testpath" ,python-testpath)
4664 ("python-nose" ,python-nose)
4665 ("python-sphinx" ,python-sphinx)
4666 ("texlive" ,texlive)
4667 ("texinfo" ,texinfo)))
4668 (arguments
4669 `(#:phases
4670 (modify-phases %standard-phases
4671 (add-after
4672 'install 'install-doc
4673 (lambda* (#:key inputs outputs #:allow-other-keys)
4674 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4675 (doc (string-append data "/doc/" ,name "-" ,version))
4676 (html (string-append doc "/html"))
4677 (man1 (string-append data "/man/man1"))
4678 (info (string-append data "/info"))
4679 (examples (string-append doc "/examples")))
4680 (setenv "LANG" "en_US.utf8")
4681 (with-directory-excursion "docs"
4682 ;; FIXME: pdf fails to build
4683 ;;(system* "make" "pdf" "PAPER=a4")
4684 (system* "make" "html")
4685 (system* "make" "info"))
4686 (copy-recursively "docs/man" man1)
4687 (copy-recursively "examples" examples)
4688 (copy-recursively "docs/build/html" html)
4689 ;; (copy-file "docs/build/latex/ipython.pdf"
4690 ;; (string-append doc "/ipython.pdf"))
4691 (mkdir-p info)
4692 (copy-file "docs/build/texinfo/ipython.info"
4693 (string-append info "/ipython.info"))
4694 (copy-file "COPYING.rst" (string-append doc "/COPYING.rst")))))
4695 ;; Tests can only be run after the library has been installed and not
4696 ;; within the source directory.
4697 (delete 'check)
4698 (add-after
4699 'install 'check
4700 (lambda* (#:key outputs tests? #:allow-other-keys)
4701 (if tests?
4702 (with-directory-excursion "/tmp"
4703 (setenv "HOME" "/tmp/") ;; required by a test
4704 (zero? (system* (string-append (assoc-ref outputs "out")
4705 "/bin/iptest"))))
4706 #t)))
4707 (add-before
4708 'install 'fix-tests
4709 (lambda* (#:key inputs #:allow-other-keys)
4710 (substitute* "./IPython/utils/_process_posix.py"
4711 (("/usr/bin/env', 'which") (which "which")))
4712 (substitute* "./IPython/core/tests/test_inputtransformer.py"
4713 (("#!/usr/bin/env python")
4714 (string-append "#!" (which "python"))))
4715 ;; Disable 1 failing test
4716 (substitute* "./IPython/core/tests/test_magic.py"
4717 (("def test_dirops\\(\\):" all)
4718 (string-append "@dec.skipif(True)\n" all))))))))
4719 (home-page "http://ipython.org")
4720 (synopsis "IPython is a tool for interactive computing in Python")
4721 (description
4722 "IPython provides a rich architecture for interactive computing with:
4723 Powerful interactive shells, a browser-based notebook, support for interactive
4724 data visualization, embeddable interpreters and tools for parallel
4725 computing.")
4726 (license license:bsd-3)
4727 (properties `((python2-variant . ,(delay python2-ipython))))))
4728
4729 (define-public python2-ipython
4730 (let ((ipython (package-with-python2 (strip-python2-variant python-ipython))))
4731 (package
4732 (inherit ipython)
4733 ;; FIXME: some tests are failing
4734 (arguments
4735 `(#:tests? #f ,@(package-arguments ipython)))
4736 ;; FIXME: add pyreadline once available.
4737 (inputs
4738 `(("python2-mock" ,python2-mock)
4739 ,@(package-inputs ipython))))))
4740
4741 (define-public python-isodate
4742 (package
4743 (name "python-isodate")
4744 (version "0.5.4")
4745 (source
4746 (origin
4747 (method url-fetch)
4748 (uri (pypi-uri "isodate" version))
4749 (sha256
4750 (base32
4751 "0cafaiwixgpxwh9dsd28qb0dbzsj6xpxjdkyk30ns91ps10mq422"))))
4752 (build-system python-build-system)
4753 (home-page
4754 "http://cheeseshop.python.org/pypi/isodate")
4755 (synopsis
4756 "Python date parser and formatter")
4757 (description
4758 "Python-isodate is a python module for parsing and formatting
4759 ISO 8601 dates, time and duration.")
4760 (license license:bsd-3)))
4761
4762 (define-public python2-isodate
4763 (package-with-python2 python-isodate))
4764
4765 (define-public python-html5lib
4766 (package
4767 (name "python-html5lib")
4768 (version "1.0b8")
4769 (source
4770 (origin
4771 (method url-fetch)
4772 (uri (pypi-uri "html5lib" version))
4773 (sha256
4774 (base32
4775 "1lknq5j3nh11xrl268ks76zaj0gyzh34v94n5vbf6dk8llzxdx0q"))))
4776 (build-system python-build-system)
4777 (propagated-inputs
4778 `(("python-six" ,python-six))) ; required to "import html5lib"
4779 (arguments
4780 `(#:test-target "check"))
4781 (home-page
4782 "https://github.com/html5lib/html5lib-python")
4783 (synopsis
4784 "Python HTML parser based on the WHATWG HTML specifcation")
4785 (description
4786 "Html5lib is an HTML parser based on the WHATWG HTML specifcation
4787 and written in Python.")
4788 (license license:expat)))
4789
4790 (define-public python2-html5lib
4791 (package-with-python2 python-html5lib))
4792
4793 ;; Needed for python-bleach, a dependency of python-notebook
4794 (define-public python-html5lib-0.9
4795 (package
4796 (inherit python-html5lib)
4797 (version "0.999")
4798 (source
4799 (origin
4800 (method url-fetch)
4801 (uri (pypi-uri "html5lib" version))
4802 (sha256
4803 (base32
4804 "17n4zfsj6ynmbwdwviywmj8r6nzr3xvfx2zs0xhndmvm51z7z263"))))))
4805
4806 (define-public python2-html5lib-0.9
4807 (package-with-python2 python-html5lib-0.9))
4808
4809 (define-public python-urwid
4810 (package
4811 (name "python-urwid")
4812 (version "1.3.1")
4813 (source
4814 (origin
4815 (method url-fetch)
4816 (uri (pypi-uri "urwid" version))
4817 (sha256
4818 (base32
4819 "18cnd1wdjcas08x5qwa5ayw6jsfcn33w4d9f7q3s29fy6qzc1kng"))))
4820 (build-system python-build-system)
4821 (arguments
4822 `(#:phases
4823 (modify-phases %standard-phases
4824 ;; Disable failing test. Bug filed upstream:
4825 ;; https://github.com/wardi/urwid/issues/164
4826 ;; TODO: check again for python-urwid > 1.3.1 or python > 3.4.3.
4827 (add-after 'unpack 'disable-failing-test
4828 (lambda _
4829 (substitute* "urwid/tests/test_event_loops.py"
4830 (("test_remove_watch_file")
4831 "disable_remove_watch_file")))))))
4832 (home-page "http://urwid.org")
4833 (synopsis "Console user interface library for Python")
4834 (description
4835 "Urwid is a curses-based UI/widget library for Python. It includes many
4836 features useful for text console applications.")
4837 (license license:lgpl2.1+)))
4838
4839 (define-public python2-urwid
4840 (package-with-python2 python-urwid))
4841
4842 (define-public python-urwidtrees
4843 (package
4844 (name "python-urwidtrees")
4845 (version "1.0.2")
4846 (source
4847 (origin
4848 (method url-fetch)
4849 ;; package author intends on distributing via github rather than pypi:
4850 ;; https://github.com/pazz/alot/issues/877#issuecomment-230173331
4851 (uri (string-append "https://github.com/pazz/urwidtrees/archive/"
4852 version ".tar.gz"))
4853 (file-name (string-append name "-" version ".tar.gz"))
4854 (sha256
4855 (base32
4856 "0d30lyd3s2a97rhqfax5w9ssqds2z6aydqx3c6j2c2lk3cb4ngvh"))))
4857 (build-system python-build-system)
4858 (arguments
4859 '(#:tests? #f)) ; no tests
4860 (propagated-inputs `(("python-urwid" ,python-urwid)))
4861 (home-page "https://github.com/pazz/urwidtrees")
4862 (synopsis "Tree widgets for urwid")
4863 (description "Urwidtrees is a Widget Container API for the @code{urwid}
4864 toolkit. Use it to build trees of widgets.")
4865 (license license:gpl3+)))
4866
4867 (define-public python2-urwidtrees
4868 (package-with-python2 python-urwidtrees))
4869
4870 (define-public python-dbus
4871 (package
4872 (name "python-dbus")
4873 (version "1.2.0")
4874 (source
4875 (origin
4876 (method url-fetch)
4877 (uri (string-append
4878 "https://dbus.freedesktop.org/releases/dbus-python/dbus-python-"
4879 version ".tar.gz"))
4880 (sha256
4881 (base32 "1py62qir966lvdkngg0v8k1khsqxwk5m4s8nflpk1agk5f5nqb71"))))
4882 (build-system gnu-build-system)
4883 (arguments
4884 '(#:phases
4885 (modify-phases %standard-phases
4886 (add-before
4887 'check 'pre-check
4888 (lambda _
4889 ;; XXX: For the missing '/etc/machine-id'.
4890 (substitute* "test/run-test.sh"
4891 (("DBUS_FATAL_WARNINGS=1")
4892 "DBUS_FATAL_WARNINGS=0"))
4893 #t)))))
4894 (native-inputs
4895 `(("pkg-config" ,pkg-config)))
4896 (inputs
4897 `(("python" ,python)
4898 ("dbus-glib" ,dbus-glib)))
4899 (synopsis "Python bindings for D-bus")
4900 (description "python-dbus provides bindings for libdbus, the reference
4901 implementation of D-Bus.")
4902 (home-page "http://www.freedesktop.org/wiki/Software/DBusBindings/")
4903 (license license:expat)))
4904
4905 (define-public python2-dbus
4906 (package (inherit python-dbus)
4907 (name "python2-dbus")
4908 (inputs `(("python" ,python-2)
4909 ,@(alist-delete "python"
4910 (package-inputs python-dbus)
4911 equal?)))
4912 ;; FIXME: on Python 2, the test_utf8 fails with:
4913 ;; "ValueError: unichr() arg not in range(0x10000) (narrow Python build)"
4914 (arguments `(#:tests? #f))))
4915
4916 (define-public python-apsw
4917 (package
4918 (name "python-apsw")
4919 (version "3.9.2-r1")
4920 (source
4921 (origin
4922 (method url-fetch)
4923 (uri (pypi-uri "apsw" version))
4924 (sha256
4925 (base32
4926 "0w4jb0wpx785qw42r3h4fh7gl5w2968q48i7gygybsfxck8nzffs"))))
4927 (build-system python-build-system)
4928 (inputs
4929 `(("sqlite" ,sqlite)))
4930 (arguments
4931 `(#:phases
4932 ;; swap check and install phases
4933 (alist-cons-after
4934 'install 'check
4935 (assoc-ref %standard-phases 'check)
4936 (alist-delete
4937 'check
4938 %standard-phases))))
4939 (home-page "https://github.com/rogerbinns/apsw/")
4940 (synopsis "Another Python SQLite Wrapper")
4941 (description "APSW is a Python wrapper for the SQLite
4942 embedded relational database engine. In contrast to other wrappers such as
4943 pysqlite it focuses on being a minimal layer over SQLite attempting just to
4944 translate the complete SQLite API into Python.")
4945 (license license:zlib)))
4946
4947 (define-public python2-apsw
4948 (package-with-python2 python-apsw))
4949
4950 (define-public python-lxml
4951 (package
4952 (name "python-lxml")
4953 (version "3.6.0")
4954 (source
4955 (origin
4956 (method url-fetch)
4957 (uri (pypi-uri "lxml" version))
4958 (sha256
4959 (base32
4960 "1pvbmiy2m7jwv493kilbghhj2pkh8wy1na3ji350vhzhlwlclx4w"))))
4961 (build-system python-build-system)
4962 (inputs
4963 `(("libxml2" ,libxml2)
4964 ("libxslt" ,libxslt)))
4965 (home-page "http://lxml.de/")
4966 (synopsis
4967 "Python XML processing library")
4968 (description
4969 "The lxml XML toolkit is a Pythonic binding for the C libraries
4970 libxml2 and libxslt.")
4971 (license license:bsd-3))) ; and a few more, see LICENSES.txt
4972
4973 (define-public python2-lxml
4974 (package-with-python2 python-lxml))
4975
4976 ;; beautifulsoup4 has a totally different namespace than 3.x,
4977 ;; and pypi seems to put it under its own name, so I guess we should too
4978 (define-public python-beautifulsoup4
4979 (package
4980 (name "python-beautifulsoup4")
4981 (version "4.5.1")
4982 (source
4983 (origin
4984 (method url-fetch)
4985 (uri (pypi-uri "beautifulsoup4" version))
4986 (sha256
4987 (base32
4988 "1qgmhw65ncsgccjhslgkkszif47q6gvxwqv4mim17agxd81p951w"))))
4989 (build-system python-build-system)
4990 (arguments
4991 `(#:phases
4992 (modify-phases %standard-phases
4993 ;; The Python 2 source is the definitive source of beautifulsoup4. We
4994 ;; must use this conversion script when building with Python 3. The
4995 ;; conversion script also runs the tests.
4996 ;; For more information, see the file 'convert-py3k' in the source
4997 ;; distribution.
4998 (replace 'check
4999 (lambda _ (zero? (system* "./convert-py3k")))))))
5000 (home-page
5001 "http://www.crummy.com/software/BeautifulSoup/bs4/")
5002 (synopsis
5003 "Python screen-scraping library")
5004 (description
5005 "Beautiful Soup is a Python library designed for rapidly setting up
5006 screen-scraping projects. It offers Pythonic idioms for navigating,
5007 searching, and modifying a parse tree, providing a toolkit for
5008 dissecting a document and extracting what you need. It automatically
5009 converts incoming documents to Unicode and outgoing documents to UTF-8.")
5010 (license license:expat)))
5011
5012 (define-public python2-beautifulsoup4
5013 (package
5014 (inherit (package-with-python2
5015 (strip-python2-variant python-beautifulsoup4)))
5016 (arguments `(#:python ,python-2))))
5017
5018 (define-public python2-cssutils
5019 (package
5020 (name "python2-cssutils")
5021 (version "1.0.1")
5022 (source
5023 (origin
5024 (method url-fetch)
5025 (uri (pypi-uri "cssutils" version))
5026 (sha256
5027 (base32
5028 "0qwha9x1wml2qmipbcz03gndnlwhzrjdvw9i09si247a90l8p8fq"))))
5029 (build-system python-build-system)
5030 (native-inputs
5031 `(("python2-mock" ,python2-mock) ; for the tests
5032 ("unzip" ,unzip))) ; for unpacking the source
5033 (arguments
5034 `(#:python ,python-2 ; Otherwise tests fail with a syntax error.
5035 #:tests? #f ; The tests apparently download an external URL.
5036 ))
5037 (home-page "http://cthedot.de/cssutils/")
5038 (synopsis
5039 "CSS Cascading Style Sheets library for Python")
5040 (description
5041 "Cssutils is a Python package for parsing and building CSS
5042 Cascading Style Sheets. Currently it provides a DOM only and no rendering
5043 options.")
5044 (license license:lgpl3+)))
5045
5046 (define-public python-cssselect
5047 (package
5048 (name "python-cssselect")
5049 (version "0.9.2")
5050 (source
5051 (origin
5052 (method url-fetch)
5053 (uri (pypi-uri "cssselect" version))
5054 (sha256
5055 (base32
5056 "1xg6gbva1yswghiycmgincv6ab4bn7hpm720ndbj40h8xycmnfvi"))))
5057 (build-system python-build-system)
5058 (arguments
5059 ;; tests fail with message
5060 ;; AttributeError: 'module' object has no attribute 'tests'
5061 `(#:tests? #f))
5062 (home-page
5063 "https://pythonhosted.org/cssselect/")
5064 (synopsis
5065 "CSS3 selector parser and translator to XPath 1.0")
5066 (description
5067 "Cssselect ia a Python module that parses CSS3 Selectors and translates
5068 them to XPath 1.0 expressions. Such expressions can be used in lxml or
5069 another XPath engine to find the matching elements in an XML or HTML document.")
5070 (license license:bsd-3)))
5071
5072 (define-public python2-cssselect
5073 (package-with-python2 python-cssselect))
5074
5075 (define-public python-netifaces
5076 (package
5077 (name "python-netifaces")
5078 (version "0.10.4")
5079 (source
5080 (origin
5081 (method url-fetch)
5082 (uri (string-append
5083 "https://pypi.python.org/packages/source/n/netifaces/netifaces-"
5084 version
5085 ".tar.gz"))
5086 (sha256
5087 (base32
5088 "1plw237a4zib4z8s62g0mrs8gm3kjfrp5sxh6bbk9nl3rdls2mln"))))
5089 (build-system python-build-system)
5090 (home-page
5091 "https://bitbucket.org/al45tair/netifaces")
5092 (synopsis
5093 "Python module for portable network interface information")
5094 (description
5095 "Netifaces is a Python module providing information on network
5096 interfaces in an easy and portable manner.")
5097 (license license:expat)))
5098
5099 (define-public python2-netifaces
5100 (package-with-python2 python-netifaces))
5101
5102 (define-public python-networkx
5103 (package
5104 (name "python-networkx")
5105 (version "1.11")
5106 (source
5107 (origin
5108 (method url-fetch)
5109 (uri (pypi-uri "networkx" version))
5110 (sha256
5111 (base32 "1f74s56xb4ggixiq0vxyfxsfk8p20c7a099lpcf60izv1php03hd"))))
5112 (build-system python-build-system)
5113 ;; python-decorator is needed at runtime
5114 (propagated-inputs
5115 `(("python-decorator" ,python-decorator)))
5116 (native-inputs
5117 `(("python-nose" ,python-nose)))
5118 (home-page "http://networkx.github.io/")
5119 (synopsis "Python module for creating and manipulating graphs and networks")
5120 (description
5121 "NetworkX is a Python package for the creation, manipulation, and study
5122 of the structure, dynamics, and functions of complex networks.")
5123 (license license:bsd-3)))
5124
5125 (define-public python2-networkx
5126 (package-with-python2 python-networkx))
5127
5128 (define-public snakemake
5129 (package
5130 (name "snakemake")
5131 (version "3.2.1")
5132 (source
5133 (origin
5134 (method url-fetch)
5135 (uri (string-append
5136 "https://pypi.python.org/packages/source/s/snakemake/snakemake-"
5137 version ".tar.gz"))
5138 (sha256
5139 (base32 "0fi4b63sj60hvi7rfydvmz2icl4wj74djw5sn2gl8hxd02qw4b91"))))
5140 (build-system python-build-system)
5141 (home-page "https://bitbucket.org/johanneskoester/snakemake")
5142 (synopsis "Python-based execution environment for make-like workflows")
5143 (description
5144 "Snakemake aims to reduce the complexity of creating workflows by
5145 providing a clean and modern domain specific specification language (DSL) in
5146 Python style, together with a fast and comfortable execution environment.")
5147 (license license:expat)))
5148
5149 (define-public python-seaborn
5150 (package
5151 (name "python-seaborn")
5152 (version "0.7.0")
5153 (source
5154 (origin
5155 (method url-fetch)
5156 (uri (pypi-uri "seaborn" version))
5157 (sha256
5158 (base32 "0ibi3xsfm2kysph61mnfy0pf8d5rkgxgrdb0z9nbizgcgdsb5a0m"))))
5159 (build-system python-build-system)
5160 (propagated-inputs
5161 `(("python-pandas" ,python-pandas)
5162 ("python-matplotlib" ,python-matplotlib)
5163 ("python-scipy" ,python-scipy)))
5164 (home-page "http://stanford.edu/~mwaskom/software/seaborn/")
5165 (synopsis "Statistical data visualization")
5166 (description
5167 "Seaborn is a library for making attractive and informative statistical
5168 graphics in Python. It is built on top of matplotlib and tightly integrated
5169 with the PyData stack, including support for numpy and pandas data structures
5170 and statistical routines from scipy and statsmodels.")
5171 (license license:bsd-3)
5172 (properties `((python2-variant . ,(delay python2-seaborn))))))
5173
5174 (define-public python2-seaborn
5175 (let ((base (package-with-python2 (strip-python2-variant python-seaborn))))
5176 (package
5177 (inherit base)
5178 (propagated-inputs `(("python2-pytz" ,python2-pytz)
5179 ,@(package-propagated-inputs base))))))
5180
5181 (define-public python-sympy
5182 (package
5183 (name "python-sympy")
5184 (version "0.7.6")
5185 (source
5186 (origin
5187 (method url-fetch)
5188 (uri (string-append
5189 "https://github.com/sympy/sympy/releases/download/sympy-"
5190 version "/sympy-" version ".tar.gz"))
5191 (sha256
5192 (base32 "19yp0gy4i7p4g6l3b8vaqkj9qj7yqb5kqy0qgbdagpzgkdz958yz"))))
5193 (build-system python-build-system)
5194 (home-page "http://www.sympy.org/")
5195 (synopsis "Python library for symbolic mathematics")
5196 (description
5197 "SymPy is a Python library for symbolic mathematics. It aims to become a
5198 full-featured computer algebra system (CAS) while keeping the code as simple
5199 as possible in order to be comprehensible and easily extensible.")
5200 (license license:bsd-3)))
5201
5202 (define-public python2-sympy
5203 (package-with-python2 python-sympy))
5204
5205 (define-public python-q
5206 (package
5207 (name "python-q")
5208 (version "2.6")
5209 (source
5210 (origin
5211 (method url-fetch)
5212 (uri (pypi-uri "q" version))
5213 (sha256
5214 (base32
5215 "1mgfazh8fkizh6walra2zv885f3lcgr3nb02v1frfm4p8ddcy3yy"))))
5216 (build-system python-build-system)
5217 (home-page "https://github.com/zestyping/q")
5218 (synopsis "Quick-and-dirty debugging output for tired programmers")
5219 (description
5220 "q is a Python module for \"print\" style of debugging Python code. It
5221 provides convenient short API for print out of values, tracebacks, and
5222 falling into the Python interpreter.")
5223 (license license:asl2.0)))
5224
5225 (define-public python2-q
5226 (package-with-python2 python-q))
5227
5228 (define-public python-testlib
5229 (package
5230 (name "python-testlib")
5231 (version "0.6.5")
5232 (source
5233 (origin
5234 (method url-fetch)
5235 (uri (string-append
5236 "https://pypi.python.org/packages/source/t/testlib/testlib-"
5237 version ".zip"))
5238 (sha256
5239 (base32 "1mz26cxn4x8bbgv0rn0mvj2z05y31rkc8009nvdlb3lam5b4mj3y"))))
5240 (build-system python-build-system)
5241 (native-inputs
5242 `(("unzip" ,unzip)))
5243 (arguments
5244 `(#:phases
5245 (alist-replace
5246 'unpack
5247 (lambda* (#:key inputs outputs #:allow-other-keys)
5248 (let ((unzip (string-append (assoc-ref inputs "unzip")
5249 "/bin/unzip"))
5250 (source (assoc-ref inputs "source")))
5251 (and (zero? (system* unzip source))
5252 (chdir (string-append "testlib-" ,version)))))
5253 %standard-phases)))
5254 (synopsis "Python micro test suite harness")
5255 (description "A micro unittest suite harness for Python.")
5256 (home-page "https://github.com/trentm/testlib")
5257 (license license:expat)))
5258
5259 (define-public python2-testlib
5260 (package-with-python2 python-testlib))
5261
5262 (define-public python2-xlib
5263 (package
5264 (name "python2-xlib")
5265 (version "0.14")
5266 (source (origin
5267 (method url-fetch)
5268 (uri (string-append "mirror://sourceforge/python-xlib/python-xlib"
5269 "/" version "/"
5270 "python-xlib-" version ".tar.gz"))
5271 (sha256
5272 (base32
5273 "1sv0447j0rx8cgs3jhjl695p5pv13ihglcjlrrz1kq05lsvb0wa7"))))
5274 (build-system python-build-system)
5275 (arguments
5276 `(#:python ,python-2 ;Python 2 only
5277 #:tests? #f)) ;no tests
5278 (home-page "http://python-xlib.sourceforge.net/")
5279 (synopsis "Python X11 client library")
5280 (description
5281 "The Python X Library is intended to be a fully functional X client
5282 library for Python programs. It is useful to implement low-level X clients.
5283 It is written entirely in Python.")
5284 (license license:gpl2+)))
5285
5286 (define-public python-singledispatch
5287 (package
5288 (name "python-singledispatch")
5289 (version "3.4.0.3")
5290 (source
5291 (origin
5292 (method url-fetch)
5293 (uri (pypi-uri "singledispatch" version))
5294 (sha256
5295 (base32
5296 "171b7ip0hsq5qm83np40h3phlr36ym18w0lay0a8v08kvy3sy1jv"))))
5297 (build-system python-build-system)
5298 (inputs
5299 `(("python-six" ,python-six)))
5300 (home-page
5301 "http://docs.python.org/3/library/functools.html#functools.singledispatch")
5302 (synopsis "Backport of singledispatch feature from Python 3.4")
5303 (description
5304 "This library brings functools.singledispatch from Python 3.4 to Python
5305 2.6-3.3.")
5306 (license license:expat)))
5307
5308 (define-public python2-singledispatch
5309 (package-with-python2 python-singledispatch))
5310
5311 (define-public python-tornado
5312 (package
5313 (name "python-tornado")
5314 (version "4.3")
5315 (source
5316 (origin
5317 (method url-fetch)
5318 (uri (pypi-uri "tornado" version))
5319 (sha256
5320 (base32 "1gzgwayl6hmc9jfcl88bni4jcsk2jcca9dn1rvrfsvnijcjx7hn9"))))
5321 (build-system python-build-system)
5322 (native-inputs
5323 `(("python-certifi" ,python-certifi)))
5324 (propagated-inputs
5325 `(("python-backports-abc" ,python-backports-abc)))
5326 (home-page "http://www.tornadoweb.org/")
5327 (synopsis "Python web framework and asynchronous networking library")
5328 (description
5329 "Tornado is a Python web framework and asynchronous networking library,
5330 originally developed at FriendFeed. By using non-blocking network I/O,
5331 Tornado can scale to tens of thousands of open connections, making it ideal
5332 for long polling, WebSockets, and other applications that require a long-lived
5333 connection to each user.")
5334 (license license:asl2.0)
5335 (properties `((python2-variant . ,(delay python2-tornado))))))
5336
5337 (define-public python2-tornado
5338 (let ((tornado (package-with-python2 (strip-python2-variant python-tornado))))
5339 (package (inherit tornado)
5340 (propagated-inputs
5341 `(("python2-backport-ssl-match-hostname"
5342 ,python2-backport-ssl-match-hostname)
5343 ("python2-singledispatch" ,python2-singledispatch)
5344 ,@(package-propagated-inputs tornado))))))
5345
5346 ;; the python- version can be removed with python-3.5
5347 (define-public python-backports-abc
5348 (package
5349 (name "python-backports-abc")
5350 (version "0.4")
5351 (source
5352 (origin
5353 (method url-fetch)
5354 (uri (pypi-uri "backports_abc" version))
5355 (sha256
5356 (base32
5357 "19fh75lni9pb673n2fn505m1rckm0af0szcv5xx1qm1xpa940glb"))))
5358 (build-system python-build-system)
5359 (home-page "https://github.com/cython/backports_abc")
5360 (synopsis "Backport of additions to the 'collections.abc' module")
5361 (description
5362 "Python-backports-abc provides a backport of additions to the
5363 'collections.abc' module in Python-3.5.")
5364 (license license:psfl)))
5365
5366 (define-public python2-backports-abc
5367 (package-with-python2 python-backports-abc))
5368
5369 (define-public python-waf
5370 (package
5371 (name "python-waf")
5372 (version "1.9.5")
5373 (source (origin
5374 (method url-fetch)
5375 (uri (string-append "https://waf.io/"
5376 "waf-" version ".tar.bz2"))
5377 (sha256
5378 (base32
5379 "1sl3ipi2czds57rlzjnpdzqa0skx8asfvmh3qmibpvdwf15rpppg"))))
5380 (build-system python-build-system)
5381 (arguments
5382 '(#:phases
5383 (modify-phases %standard-phases
5384 (replace 'build
5385 (lambda _
5386 (zero? (system* "python" "waf-light" "configure" "build"))))
5387 (replace 'check
5388 (lambda _
5389 (zero? (system* "python" "waf" "--version"))))
5390 (replace 'install
5391 (lambda _
5392 (copy-file "waf" %output))))))
5393 (home-page "http://waf.io/")
5394 (synopsis "Python-based build system")
5395 (description
5396 "Waf is a Python-based framework for configuring, compiling and installing
5397 applications.")
5398 (license license:bsd-3)))
5399
5400 (define-public python2-waf
5401 (package-with-python2 python-waf))
5402
5403 (define-public python-pyzmq
5404 (package
5405 (name "python-pyzmq")
5406 (version "15.1.0")
5407 (source
5408 (origin
5409 (method url-fetch)
5410 (uri (pypi-uri "pyzmq" version))
5411 (sha256
5412 (base32 "13fhwnlvsvxv72kfhqbpn6qi7msh8mc8377mpabv32skk2cjfnxx"))))
5413 (build-system python-build-system)
5414 (arguments
5415 `(#:configure-flags
5416 (list (string-append "--zmq=" (assoc-ref %build-inputs "zeromq")))
5417 ;; FIXME: You must build pyzmq with 'python setup.py build_ext
5418 ;; --inplace' for 'python setup.py test' to work.
5419 #:tests? #f))
5420 (inputs
5421 `(("zeromq" ,zeromq)))
5422 (native-inputs
5423 `(("pkg-config" ,pkg-config)
5424 ("python-nose" ,python-nose)))
5425 (home-page "http://github.com/zeromq/pyzmq")
5426 (synopsis "Python bindings for 0MQ")
5427 (description
5428 "PyZMQ is the official Python binding for the ZeroMQ messaging library.")
5429 (license license:bsd-4)))
5430
5431 (define-public python2-pyzmq
5432 (package-with-python2 python-pyzmq))
5433
5434 (define-public python-pep8
5435 (package
5436 (name "python-pep8")
5437 (version "1.7.0")
5438 (source
5439 (origin
5440 (method url-fetch)
5441 (uri (pypi-uri "pep8" version))
5442 (sha256
5443 (base32
5444 "002rkl4lsn6x2mxmf8ar00l0m8i3mzrc6pnzz77blyksmpsxa4x1"))))
5445 (build-system python-build-system)
5446 (home-page "http://pep8.readthedocs.org/")
5447 (synopsis "Python style guide checker")
5448 (description
5449 "This tools checks Python code against some of the style conventions in
5450 PEP 8.")
5451 (license license:expat)))
5452
5453 (define-public python2-pep8
5454 (package-with-python2 python-pep8))
5455
5456 (define-public python-pyflakes
5457 (package
5458 (name "python-pyflakes")
5459 (version "1.0.0")
5460 (source
5461 (origin
5462 (method url-fetch)
5463 (uri (pypi-uri "pyflakes" version))
5464 (sha256
5465 (base32
5466 "0qs2sgqszq7wcplis8509wk2ygqcrwzbs1ghfj3svvivq2j377pk"))))
5467 (build-system python-build-system)
5468 (home-page
5469 "https://github.com/pyflakes/pyflakes")
5470 (synopsis "Passive checker of Python programs")
5471 (description
5472 "Pyflakes statically checks Python source code for common errors.")
5473 (license license:expat)))
5474
5475 (define-public python2-pyflakes
5476 (package-with-python2 python-pyflakes))
5477
5478 (define-public python-mccabe
5479 (package
5480 (name "python-mccabe")
5481 (version "0.4.0")
5482 (source
5483 (origin
5484 (method url-fetch)
5485 (uri (pypi-uri "mccabe" version))
5486 (sha256
5487 (base32
5488 "0yr08a36h8lqlif10l4xcikbbig7q8f41gqywir7rrvnv3mi4aws"))))
5489 (build-system python-build-system)
5490 (inputs
5491 `(("python-pytest" ,python-pytest)
5492 ("python-pytest-runner" ,python-pytest-runner)))
5493 (home-page "https://github.com/flintwork/mccabe")
5494 (synopsis "McCabe checker, plugin for flake8")
5495 (description
5496 "This package provides a Flake8 plug-in to compute the McCabe cyclomatic
5497 complexity of Python source code.")
5498 (license license:expat)))
5499
5500 (define-public python2-mccabe
5501 (package-with-python2 python-mccabe))
5502
5503 (define-public python-mccabe-0.2.1
5504 (package (inherit python-mccabe)
5505 (version "0.2.1")
5506 (source
5507 (origin
5508 (method url-fetch)
5509 (uri (pypi-uri "mccabe" version))
5510 (sha256
5511 (base32
5512 "0fi4a81kr5bcv5p4xgibqr595hyj5dafkqgsmfk96mfy8w71fajs"))))))
5513
5514 (define-public python2-mccabe-0.2.1
5515 (package-with-python2 python-mccabe-0.2.1))
5516
5517 ;; Flake8 2.4.1 requires an older version of pep8.
5518 ;; This should be removed ASAP.
5519 (define-public python-pep8-1.5.7
5520 (package (inherit python-pep8)
5521 (version "1.5.7")
5522 (source
5523 (origin
5524 (method url-fetch)
5525 (uri (string-append
5526 "https://pypi.python.org/packages/source/p/pep8/pep8-"
5527 version
5528 ".tar.gz"))
5529 (sha256
5530 (base32
5531 "12b9bbdbwnspxgak14xg58c130x2n0blxzlms5jn2dszn8qj3d0m"))))))
5532
5533 (define-public python2-pep8-1.5.7
5534 (package-with-python2 python-pep8-1.5.7))
5535
5536 ;; Flake8 2.4.1 requires an older version of pyflakes.
5537 ;; This should be removed ASAP.
5538 (define-public python-pyflakes-0.8.1
5539 (package (inherit python-pyflakes)
5540 (version "0.8.1")
5541 (source
5542 (origin
5543 (method url-fetch)
5544 (uri (string-append
5545 "https://pypi.python.org/packages/source/p/pyflakes/pyflakes-"
5546 version
5547 ".tar.gz"))
5548 (sha256
5549 (base32
5550 "0sbpq6pqm1i9wqi41mlfrsc5rk92jv4mskvlyxmnhlbdnc80ma1z"))))))
5551
5552 (define-public python2-pyflakes-0.8.1
5553 (package-with-python2 python-pyflakes-0.8.1))
5554
5555 (define-public python-flake8
5556 (package
5557 (name "python-flake8")
5558 (version "2.5.4")
5559 (source
5560 (origin
5561 (method url-fetch)
5562 (uri (pypi-uri "flake8" version))
5563 (sha256
5564 (base32
5565 "0bs9cz4fr99r2rwig1b8jwaadl1nan7kgpdzqwj0bwbckwbmh7nc"))))
5566 (build-system python-build-system)
5567 (inputs
5568 `(("python-pep8" ,python-pep8)
5569 ("python-pyflakes" ,python-pyflakes)
5570 ("python-mccabe" ,python-mccabe)
5571 ("python-mock" ,python-mock)
5572 ("python-nose" ,python-nose)))
5573 (home-page "https://gitlab.com/pycqa/flake8")
5574 (synopsis
5575 "The modular source code checker: pep8, pyflakes and co")
5576 (description
5577 "Flake8 is a wrapper around PyFlakes, pep8 and python-mccabe.")
5578 (license license:expat)))
5579
5580 (define-public python2-flake8
5581 (package-with-python2 python-flake8))
5582
5583 ;; This will only be needed by the python-hacking package and will not be
5584 ;; necessary once python-hacking > 0.10.2 is released.
5585 (define-public python-flake8-2.2.4
5586 (package (inherit python-flake8)
5587 (inputs
5588 `(("python-pep8" ,python-pep8-1.5.7)
5589 ("python-pyflakes" ,python-pyflakes-0.8.1)
5590 ("python-mccabe" ,python-mccabe-0.2.1)
5591 ("python-mock" ,python-mock)
5592 ("python-nose" ,python-nose)))
5593 (version "2.2.4")
5594 (source
5595 (origin
5596 (method url-fetch)
5597 (uri (pypi-uri "flake8" version))
5598 (sha256
5599 (base32
5600 "1r9wsry4va45h1rck5hxd3vzsg2q3y6lnl6pym1bxvz8ry19jwx8"))))))
5601
5602 (define-public python2-flake8-2.2.4
5603 (package-with-python2 python-flake8-2.2.4))
5604
5605 (define-public python-mistune
5606 (package
5607 (name "python-mistune")
5608 (version "0.7")
5609 (source
5610 (origin
5611 (method url-fetch)
5612 (uri (string-append
5613 "https://pypi.python.org/packages/source/m/mistune/mistune-"
5614 version
5615 ".tar.gz"))
5616 (sha256
5617 (base32
5618 "17zqjp9m4d1w3jf2rbbq5xshcw24q1vlcv24gkgfqqyyymajxahx"))))
5619 (build-system python-build-system)
5620 (inputs
5621 `(("python-nose" ,python-nose)
5622 ("python-cython" ,python-cython)))
5623 (home-page "https://github.com/lepture/mistune")
5624 (synopsis "Markdown parser in pure Python")
5625 (description "This package provides a fast markdown parser in pure
5626 Python.")
5627 (license license:bsd-3)))
5628
5629 (define-public python2-mistune
5630 (package-with-python2 python-mistune))
5631
5632 (define-public python-markdown
5633 (package
5634 (name "python-markdown")
5635 (version "2.6.5")
5636 (source
5637 (origin
5638 (method url-fetch)
5639 (uri (pypi-uri "Markdown" version))
5640 (sha256
5641 (base32
5642 "0q758a3fiiawr20b3hhjfs677cwj6xi284yb7xspcvv0fdicz54d"))))
5643 (build-system python-build-system)
5644 (arguments
5645 `(#:phases
5646 (modify-phases %standard-phases
5647 (replace 'check
5648 (lambda _
5649 (zero? (system* "python" "run-tests.py")))))))
5650 (native-inputs
5651 `(("python-nose" ,python-nose)
5652 ("python-pyyaml" ,python-pyyaml)))
5653 (home-page "https://pythonhosted.org/Markdown/")
5654 (synopsis "Python implementation of Markdown")
5655 (description
5656 "This package provides a Python implementation of John Gruber's
5657 Markdown. The library features international input, various Markdown
5658 extensions, and several HTML output formats. A command line wrapper
5659 markdown_py is also provided to convert Markdown files to HTML.")
5660 (license license:bsd-3)))
5661
5662 (define-public python2-markdown
5663 (package-with-python2 python-markdown))
5664
5665 (define-public python-ptyprocess
5666 (package
5667 (name "python-ptyprocess")
5668 (version "0.5")
5669 (source
5670 (origin
5671 (method url-fetch)
5672 (uri (string-append
5673 "https://pypi.python.org/packages/source/p/ptyprocess/ptyprocess-"
5674 version ".tar.gz"))
5675 (sha256
5676 (base32
5677 "0nggns5kikn32yyda2zrj1xdmh49pi3v0drggcdwljbv36r8zdyw"))))
5678 (build-system python-build-system)
5679 (inputs
5680 `(("python-nose" ,python-nose)))
5681 (arguments
5682 `(#:phases
5683 (modify-phases %standard-phases
5684 (replace 'check
5685 (lambda _
5686 (zero? (system* "nosetests")))))))
5687 (home-page "https://github.com/pexpect/ptyprocess")
5688 (synopsis "Run a subprocess in a pseudo terminal")
5689 (description
5690 "This package provides a Python library used to launch a subprocess in a
5691 pseudo terminal (pty), and interact with both the process and its pty.")
5692 (license license:isc)))
5693
5694 (define-public python2-ptyprocess
5695 (package-with-python2 python-ptyprocess))
5696
5697 (define-public python-terminado
5698 (package
5699 (name "python-terminado")
5700 (version "0.6")
5701 (source
5702 (origin
5703 (method url-fetch)
5704 (uri (pypi-uri "terminado" version))
5705 (sha256
5706 (base32
5707 "09h1kwi86g5mrk14s4pgbhshd602zry29lnpxamcqz864kva22rc"))))
5708 (build-system python-build-system)
5709 (propagated-inputs
5710 `(("python-tornado" ,python-tornado)
5711 ("python-ptyprocess" ,python-ptyprocess)))
5712 (native-inputs
5713 `(("python-nose" ,python-nose)))
5714 (arguments
5715 `(#:phases
5716 (modify-phases %standard-phases
5717 (replace 'check
5718 (lambda _
5719 (zero? (system* "nosetests")))))))
5720 (home-page "https://github.com/takluyver/terminado")
5721 (synopsis "Terminals served to term.js using Tornado websockets")
5722 (description "This package provides a Tornado websocket backend for the
5723 term.js Javascript terminal emulator library.")
5724 (license license:bsd-2)
5725 (properties `((python2-variant . ,(delay python2-terminado))))))
5726
5727 (define-public python2-terminado
5728 (let ((terminado (package-with-python2 (strip-python2-variant python-terminado))))
5729 (package (inherit terminado)
5730 (propagated-inputs
5731 `(("python2-backport-ssl-match-hostname"
5732 ,python2-backport-ssl-match-hostname)
5733 ,@(package-propagated-inputs terminado))))))
5734
5735 (define-public python-fonttools
5736 (package
5737 (name "python-fonttools")
5738 (version "2.5")
5739 (source (origin
5740 (method url-fetch)
5741 (uri (string-append
5742 "https://pypi.python.org/packages/source/F/FontTools/"
5743 "fonttools-" version ".tar.gz"))
5744 (sha256
5745 (base32
5746 "08ay3x4ijarwhl60gqx2i9jzq6pxs20p4snc2d1q5jagh4rn39lb"))))
5747 (build-system python-build-system)
5748 (arguments '(#:test-target "check"))
5749 (home-page "http://github.com/behdad/fonttools")
5750 (synopsis "Tools to manipulate font files")
5751 (description
5752 "FontTools/TTX is a library to manipulate font files from Python. It
5753 supports reading and writinfg of TrueType/OpenType fonts, reading and writing
5754 of AFM files, reading (and partially writing) of PS Type 1 fonts. The package
5755 also contains a tool called “TTX” which converts TrueType/OpenType fonts to and
5756 from an XML-based format.")
5757 (license (license:non-copyleft
5758 "file://LICENSE.txt"
5759 "See LICENSE.txt in the distribution."))))
5760
5761 (define-public python2-fonttools
5762 (package-with-python2 python-fonttools))
5763
5764 (define-public python-ly
5765 (package
5766 (name "python-ly")
5767 (version "0.9.4")
5768 (source
5769 (origin
5770 (method url-fetch)
5771 (uri (string-append "https://pypi.python.org/packages/57/4f/"
5772 "889579244947368f28eda66b782331b1e75f83fd72e63f9ece93cd7a18f9"
5773 "/python-ly-" version ".tar.gz"))
5774 (sha256
5775 (base32
5776 "0g6n288l83sfwavxh1aryi0aqvsr3sp7v6f903mckwqa4scpky62"))))
5777 (build-system python-build-system)
5778 (synopsis "Tool and library for manipulating LilyPond files")
5779 (description "This package provides a Python library to parse, manipulate
5780 or create documents in LilyPond format. A command line program ly is also
5781 provided that can be used to do various manipulations with LilyPond files.")
5782 (home-page "https://pypi.python.org/pypi/python-ly")
5783 (license license:gpl2+)))
5784
5785 (define-public python-appdirs
5786 (package
5787 (name "python-appdirs")
5788 (version "1.4.0")
5789 (source
5790 (origin
5791 (method url-fetch)
5792 (uri (string-append
5793 "https://pypi.python.org/packages/source/a/appdirs/appdirs-"
5794 version
5795 ".tar.gz"))
5796 (sha256
5797 (base32
5798 "1iddva7v3fq0aqzsahkazxr7vpw28mqcrsy818z4wyiqnkplbhlg"))))
5799 (build-system python-build-system)
5800 (home-page "http://github.com/ActiveState/appdirs")
5801 (synopsis
5802 "Determine platform-specific dirs, e.g. a \"user data dir\"")
5803 (description
5804 "This module provides a portable way of finding out where user data
5805 should be stored on various operating systems.")
5806 (license license:expat)))
5807
5808 (define-public python2-appdirs
5809 (package-with-python2 python-appdirs))
5810
5811 (define-public python-llfuse
5812 (package
5813 (name "python-llfuse")
5814 (version "1.1.1")
5815 (source (origin
5816 (method url-fetch)
5817 (uri (string-append
5818 "https://bitbucket.org/nikratio/python-llfuse/downloads/"
5819 "llfuse-" version ".tar.bz2"))
5820 (sha256
5821 (base32
5822 "0v6vj9mb286njgd1szg9hz2qdh5f3vkhsvajripfcqg458av310v"))))
5823 (build-system python-build-system)
5824 (inputs
5825 `(("fuse" ,fuse)
5826 ("attr" ,attr)))
5827 (native-inputs
5828 `(("pkg-config" ,pkg-config)))
5829 (synopsis "Python bindings for FUSE")
5830 (description
5831 "Python-LLFUSE is a set of Python bindings for the low level FUSE API.")
5832 (home-page "https://bitbucket.org/nikratio/python-llfuse/")
5833 (license license:lgpl2.0+)
5834 (properties `((python2-variant . ,(delay python2-llfuse))))))
5835
5836 (define-public python2-llfuse
5837 (package (inherit (package-with-python2
5838 (strip-python2-variant python-llfuse)))
5839 (propagated-inputs `(("python2-contextlib2" ,python2-contextlib2)))))
5840
5841 ;; For attic-0.16
5842 (define-public python-llfuse-0.41
5843 (package (inherit python-llfuse)
5844 (version "0.41.1")
5845 (source (origin
5846 (method url-fetch)
5847 (uri (string-append
5848 "https://bitbucket.org/nikratio/python-llfuse/downloads/"
5849 "llfuse-" version ".tar.bz2"))
5850 (sha256
5851 (base32
5852 "1imlqw9b73086y97izr036f58pgc5akv4ihc2rrf8j5h75jbrlaa"))))
5853 ;; Python-LLFUSE < 0.42 includes underscore.js, which is MIT (expat)
5854 ;; licensed. The rest of the package is licensed under LGPL2.0 or later.
5855 (license (list license:expat license:lgpl2.0+))))
5856
5857 (define-public python-msgpack
5858 (package
5859 (name "python-msgpack")
5860 (version "0.4.8")
5861 (source (origin
5862 (method url-fetch)
5863 (uri (pypi-uri "msgpack-python" version))
5864 (sha256
5865 (base32
5866 "11pqk5braa6wndpnr1dhg64js82vjgxnm0lzy73rwl831zgijaqs"))))
5867 (build-system python-build-system)
5868 (synopsis "MessagePack (de)serializer")
5869 (description "MessagePack is a fast, compact binary serialization format,
5870 suitable for similar data to JSON. This package provides CPython bindings for
5871 reading and writing MessagePack data.")
5872 (home-page "https://pypi.python.org/pypi/msgpack-python/")
5873 (license license:asl2.0)))
5874
5875 (define-public python2-msgpack
5876 (package-with-python2 python-msgpack))
5877
5878 (define-public python-netaddr
5879 (package
5880 (name "python-netaddr")
5881 (version "0.7.18")
5882 (source
5883 (origin
5884 (method url-fetch)
5885 (uri (string-append
5886 "https://pypi.python.org/packages/source/n/netaddr/netaddr-"
5887 version
5888 ".tar.gz"))
5889 (sha256
5890 (base32
5891 "06dxjlbcicq7q3vqy8agq11ra01kvvd47j4mk6dmghjsyzyckxd1"))))
5892 (build-system python-build-system)
5893 (arguments `(#:tests? #f)) ;; No tests.
5894 (home-page "https://github.com/drkjam/netaddr/")
5895 (synopsis "Pythonic manipulation of network addresses")
5896 (description
5897 "A Python library for representing and manipulating IPv4, IPv6, CIDR, EUI
5898 and MAC network addresses.")
5899 (license license:bsd-3)))
5900
5901 (define-public python2-netaddr
5902 (package-with-python2 python-netaddr))
5903
5904 (define-public python-wrapt
5905 (package
5906 (name "python-wrapt")
5907 (version "1.10.5")
5908 (source
5909 (origin
5910 (method url-fetch)
5911 (uri (string-append
5912 "https://pypi.python.org/packages/source/w/wrapt/wrapt-"
5913 version
5914 ".tar.gz"))
5915 (sha256
5916 (base32
5917 "0cq8rlpzkxzk48b50yrfhzn1d1hrq4gjcdqlrgq4v5palgiv9jwr"))))
5918 (build-system python-build-system)
5919 (arguments
5920 ;; Tests are not included in the tarball, they are only available in the
5921 ;; git repository.
5922 `(#:tests? #f))
5923 (home-page "https://github.com/GrahamDumpleton/wrapt")
5924 (synopsis "Module for decorators, wrappers and monkey patching")
5925 (description
5926 "The aim of the wrapt module is to provide a transparent object proxy for
5927 Python, which can be used as the basis for the construction of function
5928 wrappers and decorator functions.")
5929 (license license:bsd-2)))
5930
5931 (define-public python2-wrapt
5932 (package-with-python2 python-wrapt))
5933
5934 (define-public python-iso8601
5935 (package
5936 (name "python-iso8601")
5937 (version "0.1.11")
5938 (source
5939 (origin
5940 (method url-fetch)
5941 (uri (pypi-uri "iso8601" version))
5942 (sha256
5943 (base32
5944 "0c7gh3lsdjds262h0v1sqc66l7hqgfwbakn96qrhdbl0i3vm5yz8"))))
5945 (build-system python-build-system)
5946 (home-page "https://bitbucket.org/micktwomey/pyiso8601")
5947 (synopsis "Module to parse ISO 8601 dates")
5948 (description
5949 "This module parses the most common forms of ISO 8601 date strings (e.g.
5950 @code{2007-01-14T20:34:22+00:00}) into @code{datetime} objects.")
5951 (license license:expat)))
5952
5953 (define-public python2-iso8601
5954 (package-with-python2 python-iso8601))
5955
5956 (define-public python-monotonic
5957 (package
5958 (name "python-monotonic")
5959 (version "0.3")
5960 (source
5961 (origin
5962 (method url-fetch)
5963 (uri (string-append
5964 "https://pypi.python.org/packages/source/m/monotonic/monotonic-"
5965 version
5966 ".tar.gz"))
5967 (sha256
5968 (base32
5969 "0yz0bcbwx8r2c01czzfpbrxddynxyk9k95jj8h6sgcb7xmfvl998"))))
5970 (build-system python-build-system)
5971 (home-page "https://github.com/atdt/monotonic")
5972 (synopsis "Implementation of time.monotonic() for Python 2 & < 3.3")
5973 (description
5974 "This module provides a monotonic() function which returns the value (in
5975 fractional seconds) of a clock which never goes backwards.")
5976 (license license:asl2.0)))
5977
5978 (define-public python2-monotonic
5979 (package-with-python2 python-monotonic))
5980
5981 (define-public python-webob
5982 (package
5983 (name "python-webob")
5984 (version "1.5.1")
5985 (source
5986 (origin
5987 (method url-fetch)
5988 (uri (pypi-uri "WebOb" version))
5989 (sha256
5990 (base32
5991 "02bhhzijfhv8hmi1i54d4b0v43liwhnywhflvxsv4x3zax9s3afq"))))
5992 (build-system python-build-system)
5993 (inputs
5994 `(("python-nose" ,python-nose)))
5995 (home-page "http://webob.org/")
5996 (synopsis "WSGI request and response object")
5997 (description
5998 "WebOb provides wrappers around the WSGI request environment, and an
5999 object to help create WSGI responses.")
6000 (license license:expat)))
6001
6002 (define-public python2-webob
6003 (package-with-python2 python-webob))
6004
6005 (define-public python-xlrd
6006 (package
6007 (name "python-xlrd")
6008 (version "1.0.0")
6009 (source (origin
6010 (method url-fetch)
6011 (uri (pypi-uri "xlrd" version))
6012 (sha256
6013 (base32
6014 "0s8hjiz01vbhy85xalrz0qlsmd9ypf36zjqrf97hh984spapvy0g"))))
6015 (build-system python-build-system)
6016 (arguments
6017 `(#:phases
6018 (modify-phases %standard-phases
6019 ;; Current test in setup.py does not work as of 1.0.0, so use nose to
6020 ;; run tests instead for now.
6021 (replace 'check (lambda _ (zero? (system* "nosetests")))))))
6022 (native-inputs `(("python-nose" ,python-nose)))
6023 (home-page "http://www.python-excel.org/")
6024 (synopsis "Library for extracting data from Excel files")
6025 (description "This packages provides a library to extract data from
6026 spreadsheets using Microsoft Excel proprietary file formats @samp{.xls} and
6027 @samp{.xlsx} (versions 2.0 onwards). It has support for Excel dates and is
6028 Unicode-aware. It is not intended as an end-user tool.")
6029 (license license:bsd-3)))
6030
6031 (define-public python2-xlrd
6032 (package-with-python2 python-xlrd))
6033
6034 (define-public python-prettytable
6035 (package
6036 (name "python-prettytable")
6037 (version "0.7.2")
6038 (source
6039 (origin
6040 (method url-fetch)
6041 (uri (string-append
6042 "https://pypi.python.org/packages/source/P/PrettyTable/"
6043 "prettytable-" version ".tar.bz2"))
6044 (sha256
6045 (base32
6046 "0diwsicwmiq2cpzpxri7cyl5fmsvicafw6nfqf6p6p322dji2g45"))))
6047 (build-system python-build-system)
6048 (home-page "http://code.google.com/p/prettytable/")
6049 (synopsis "Display tabular data in an ASCII table format")
6050 (description
6051 "A library designed to represent tabular data in visually appealing ASCII
6052 tables. PrettyTable allows for selection of which columns are to be printed,
6053 independent alignment of columns (left or right justified or centred) and
6054 printing of sub-tables by specifying a row range.")
6055 (license license:bsd-3)))
6056
6057 (define-public python2-prettytable
6058 (package-with-python2 python-prettytable))
6059
6060 (define-public python-tables
6061 (package
6062 (name "python-tables")
6063 (version "3.2.2")
6064 (source
6065 (origin
6066 (method url-fetch)
6067 (uri (pypi-uri "tables" version))
6068 (sha256
6069 (base32
6070 "117s6w7s3yxafpmf3zz3svana7xfrsviw01va1xp7h8ylx8v6r1m"))))
6071 (build-system python-build-system)
6072 (arguments
6073 `(;; FIXME: python-build-system does not pass configure-flags to "build"
6074 ;; or "check", so we must override the build and check phases.
6075 #:phases
6076 (modify-phases %standard-phases
6077 (add-after 'unpack 'use-gcc
6078 (lambda _
6079 (substitute* "setup.py"
6080 (("compiler = new_compiler\\(\\)" line)
6081 (string-append line
6082 "\ncompiler.set_executables(compiler='gcc',"
6083 "compiler_so='gcc',"
6084 "linker_exe='gcc',"
6085 "linker_so='gcc -shared')")))
6086 #t))
6087 (replace 'build
6088 (lambda* (#:key inputs #:allow-other-keys)
6089 (zero? (system* "python" "setup.py" "build"
6090 (string-append "--hdf5="
6091 (assoc-ref inputs "hdf5"))))))
6092 (replace 'check
6093 (lambda* (#:key inputs #:allow-other-keys)
6094 (zero? (system* "python" "setup.py" "check"
6095 (string-append "--hdf5="
6096 (assoc-ref inputs "hdf5")))))))))
6097 (propagated-inputs
6098 `(("python-numexpr" ,python-numexpr)
6099 ("python-numpy" ,python-numpy)))
6100 (native-inputs
6101 `(("python-cython" ,python-cython)
6102 ("pkg-config" ,pkg-config)))
6103 (inputs
6104 `(("hdf5" ,hdf5)
6105 ("bzip2" ,bzip2)
6106 ("zlib" ,zlib)))
6107 (home-page "http://www.pytables.org/")
6108 (synopsis "Hierarchical datasets for Python")
6109 (description "PyTables is a package for managing hierarchical datasets and
6110 designed to efficently cope with extremely large amounts of data.")
6111 (license license:bsd-3)))
6112
6113 (define-public python2-tables
6114 (package-with-python2 python-tables))
6115
6116 (define-public python-pyasn1
6117 (package
6118 (name "python-pyasn1")
6119 (version "0.1.9")
6120 (source
6121 (origin
6122 (method url-fetch)
6123 (uri (pypi-uri "pyasn1" version))
6124 (sha256
6125 (base32
6126 "0zraxni14bqi20kr4bi6nwsh32aibz0fq0xaczfisw0zdpcsqg45"))))
6127 (build-system python-build-system)
6128 (home-page "http://pyasn1.sourceforge.net/")
6129 (synopsis "ASN.1 types and codecs")
6130 (description
6131 "This is an implementation of ASN.1 types and codecs in Python. It is
6132 suitable for a wide range of protocols based on the ASN.1 specification.")
6133 (license license:bsd-2)))
6134
6135 (define-public python2-pyasn1
6136 (package-with-python2 python-pyasn1))
6137
6138 (define-public python-pyasn1-modules
6139 (package
6140 (name "python-pyasn1-modules")
6141 (version "0.0.8")
6142 (source
6143 (origin
6144 (method url-fetch)
6145 (uri (pypi-uri "pyasn1-modules" version))
6146 (sha256
6147 (base32
6148 "0drqgw81xd3fxdlg89kgd79zzrabvfncvkbybi2wr6w2y4s1jmhh"))))
6149 (build-system python-build-system)
6150 (propagated-inputs
6151 `(("python-pyasn1" ,python-pyasn1)))
6152 (home-page "http://sourceforge.net/projects/pyasn1/")
6153 (synopsis "ASN.1 codec implementations")
6154 (description
6155 "Pyasn1-modules is a collection of Python modules providing ASN.1 types and
6156 implementations of ASN.1-based codecs and protocols.")
6157 (license license:bsd-3)))
6158
6159 (define-public python2-pyasn1-modules
6160 (package-with-python2 python-pyasn1-modules))
6161
6162 (define-public python-ipaddress
6163 (package
6164 (name "python-ipaddress")
6165 (version "1.0.16")
6166 (source (origin
6167 (method url-fetch)
6168 (uri (pypi-uri "ipaddress" version))
6169 (sha256
6170 (base32
6171 "1c3imabdrw8nfksgjjflzg7h4ynjckqacb188rf541m74arq4cas"))))
6172 (build-system python-build-system)
6173 (home-page "https://github.com/phihag/ipaddress")
6174 (synopsis "IP address manipulation library")
6175 (description
6176 "This package provides a fast, lightweight IPv4/IPv6 manipulation library
6177 in Python. This library is used to create, poke at, and manipulate IPv4 and
6178 IPv6 addresses and networks. This is a port of the Python 3.3 ipaddress
6179 module to older versions of Python.")
6180 (license license:psfl)))
6181
6182 (define-public python2-ipaddress
6183 (package-with-python2 python-ipaddress))
6184
6185 (define-public python2-ipaddr
6186 (package
6187 (name "python2-ipaddr")
6188 (version "2.1.11")
6189 (source
6190 (origin
6191 (method url-fetch)
6192 (uri (pypi-uri "ipaddr" version))
6193 (sha256
6194 (base32 "1dwq3ngsapjc93fw61rp17fvzggmab5x1drjzvd4y4q0i255nm8v"))))
6195 (build-system python-build-system)
6196 (arguments
6197 `(#:python ,python-2 ;version 2 only
6198 #:phases
6199 (modify-phases %standard-phases
6200 (replace 'check
6201 (lambda* _
6202 (zero? (system* "python" "ipaddr_test.py")))))))
6203 (home-page "https://github.com/google/ipaddr-py")
6204 (synopsis "IP address manipulation library")
6205 (description
6206 "Ipaddr is a Python@tie{}2 library for creating and manupilating IPv4 and
6207 IPv6 addresses and networks.
6208
6209 For new implementations you may prefer to use the standard module
6210 @code{ipaddress}, which was introduced in Python 3.3 and backported to older
6211 versions of Python.")
6212 (license license:asl2.0)))
6213
6214 (define-public python-idna
6215 (package
6216 (name "python-idna")
6217 (version "2.0")
6218 (source
6219 (origin
6220 (method url-fetch)
6221 (uri (string-append "https://pypi.python.org/packages/source/i/"
6222 "idna/idna-" version ".tar.gz"))
6223 (sha256
6224 (base32
6225 "0frxgmgi234lr9hylg62j69j4ik5zhg0wz05w5dhyacbjfnrl68n"))))
6226 (build-system python-build-system)
6227 (home-page "https://github.com/kjd/idna")
6228 (synopsis "Internationalized domain names in applications")
6229 (description
6230 "This is a library to support the Internationalised Domain Names in
6231 Applications (IDNA) protocol as specified in RFC 5891. This version of the
6232 protocol is often referred to as “IDNA2008” and can produce different results
6233 from the earlier standard from 2003. The library is also intended to act as a
6234 suitable drop-in replacement for the “encodings.idna” module that comes with
6235 the Python standard library but currently only supports the older 2003
6236 specification.")
6237 (license license:bsd-4)))
6238
6239 (define-public python2-idna
6240 (package-with-python2 python-idna))
6241
6242 (define-public python-pretend
6243 (package
6244 (name "python-pretend")
6245 (version "1.0.8")
6246 (source
6247 (origin
6248 (method url-fetch)
6249 (uri (string-append "https://pypi.python.org/packages/source/p/"
6250 "pretend/pretend-" version ".tar.gz"))
6251 (sha256
6252 (base32
6253 "0r5r7ygz9m6d2bklflbl84cqhjkc2q12xgis8268ygjh30g2q3wk"))))
6254 (build-system python-build-system)
6255 (home-page "https://github.com/alex/pretend")
6256 (synopsis "Library for stubbing in Python")
6257 (description
6258 "Pretend is a library to make stubbing with Python easier. Stubbing is a
6259 technique for writing tests. You may hear the term mixed up with mocks,
6260 fakes, or doubles. Basically, a stub is an object that returns pre-canned
6261 responses, rather than doing any computation.")
6262 (license license:bsd-3)))
6263
6264 (define-public python2-pretend
6265 (package-with-python2 python-pretend))
6266
6267 (define-public python-cryptography-vectors
6268 (package
6269 (name "python-cryptography-vectors")
6270 (version "1.5.3")
6271 (source
6272 (origin
6273 (method url-fetch)
6274 (uri (pypi-uri "cryptography_vectors" version))
6275 (sha256
6276 (base32
6277 "1bnd1bricyhxa27rhr0ljk0kacxzvysd3ar2j2hlv13a2k6zw4z5"))))
6278 (build-system python-build-system)
6279 (home-page "https://github.com/pyca/cryptography")
6280 (synopsis "Test vectors for the cryptography package")
6281 (description
6282 "This package contains test vectors for the cryptography package.")
6283 ;; Distributed under either BSD-3 or ASL2.0
6284 (license (list license:bsd-3 license:asl2.0))))
6285
6286 (define-public python2-cryptography-vectors
6287 (package-with-python2 python-cryptography-vectors))
6288
6289 (define-public python-cryptography
6290 (package
6291 (name "python-cryptography")
6292 (version "1.5.3")
6293 (source
6294 (origin
6295 (method url-fetch)
6296 (uri (pypi-uri "cryptography" version))
6297 (sha256
6298 (base32
6299 "1raanvkdfw5ai56ymlij6ghc4k126fs7jx948ig7yn4vj6ndv0ng"))))
6300 (build-system python-build-system)
6301 (arguments
6302 `(#:phases
6303 (modify-phases %standard-phases
6304 (add-before 'check 'disable-failing-test
6305 (lambda _
6306 ;; This test is known to fail with OpenSSL >= 1.0.2i and older
6307 ;; versions of python-cryptography:
6308 ;; https://github.com/pyca/cryptography/issues/3196
6309 ;; TODO: Try re-enabling the test when upgrading
6310 ;; python-cryptography.
6311 (substitute* "tests/hazmat/backends/test_openssl.py"
6312 (("def test_numeric_string_x509_name_entry")
6313 "@pytest.mark.xfail\n def test_numeric_string_x509_name_entry"))
6314 #t)))))
6315 (inputs
6316 `(("openssl" ,openssl)))
6317 (propagated-inputs
6318 `(("python-cffi" ,python-cffi)
6319 ("python-six" ,python-six)
6320 ("python-pyasn1" ,python-pyasn1)
6321 ("python-idna" ,python-idna)
6322 ("python-iso8601" ,python-iso8601)))
6323 (native-inputs
6324 `(("python-cryptography-vectors" ,python-cryptography-vectors)
6325 ("python-hypothesis" ,python-hypothesis)
6326 ("python-pretend" ,python-pretend)
6327 ("python-pyasn1" ,python-pyasn1)
6328 ("python-pyasn1-modules" ,python-pyasn1-modules)
6329 ("python-pytz" ,python-pytz)
6330 ("python-pytest" ,python-pytest-2.9.2)))
6331 (home-page "https://github.com/pyca/cryptography")
6332 (synopsis "Cryptographic recipes and primitives for Python")
6333 (description
6334 "cryptography is a package which provides cryptographic recipes and
6335 primitives to Python developers. It aims to be the “cryptographic standard
6336 library” for Python. The package includes both high level recipes, and low
6337 level interfaces to common cryptographic algorithms such as symmetric ciphers,
6338 message digests and key derivation functions.")
6339 ;; Distributed under either BSD-3 or ASL2.0
6340 (license (list license:bsd-3 license:asl2.0))
6341 (properties `((python2-variant . ,(delay python2-cryptography))))))
6342
6343 (define-public python2-cryptography
6344 (let ((crypto (package-with-python2
6345 (strip-python2-variant python-cryptography))))
6346 (package (inherit crypto)
6347 (propagated-inputs
6348 `(("python2-ipaddress" ,python2-ipaddress)
6349 ("python2-backport-ssl-match-hostname"
6350 ,python2-backport-ssl-match-hostname)
6351 ("python2-enum34" ,python2-enum34)
6352 ,@(package-propagated-inputs crypto))))))
6353
6354 (define-public python-pyopenssl
6355 (package
6356 (name "python-pyopenssl")
6357 (version "16.1.0")
6358 (source
6359 (origin
6360 (method url-fetch)
6361 (uri (pypi-uri "pyOpenSSL" version))
6362 (sha256
6363 (base32
6364 "0prm06zz7hl6bk5s2lqzw25lq6smayfv2fgiliw2rbqxlyiavxw8"))))
6365 (build-system python-build-system)
6366 (propagated-inputs
6367 `(("python-cryptography" ,python-cryptography)
6368 ("python-six" ,python-six)))
6369 (inputs
6370 `(("openssl" ,openssl)))
6371 (home-page "https://github.com/pyca/pyopenssl")
6372 (synopsis "Python wrapper module around the OpenSSL library")
6373 (description
6374 "PyOpenSSL is a high-level wrapper around a subset of the OpenSSL
6375 library.")
6376 (license license:asl2.0)))
6377
6378 (define-public python2-pyopenssl
6379 (package-with-python2 python-pyopenssl))
6380
6381 (define-public python-pip
6382 (package
6383 (name "python-pip")
6384 (version "8.0.2")
6385 (source
6386 (origin
6387 (method url-fetch)
6388 (uri (pypi-uri "pip" version))
6389 (sha256
6390 (base32
6391 "08cm8d4228fj0qnrysy3qv1a6022zr3dcs25amd14lgxil6vvx26"))))
6392 (build-system python-build-system)
6393 (inputs
6394 `(("python-virtualenv" ,python-virtualenv)
6395 ;; Tests
6396 ("python-mock" ,python-mock)
6397 ("python-pytest" ,python-pytest)
6398 ("python-scripttest" ,python-scripttest)))
6399 (home-page "https://pip.pypa.io/")
6400 (synopsis
6401 "Package manager for Python software")
6402 (description
6403 "Pip is a package manager for Python software, that finds packages on the
6404 Python Package Index (PyPI).")
6405 (license license:expat)))
6406
6407 (define-public python2-pip
6408 (package-with-python2 python-pip))
6409
6410 (define-public python-tlsh
6411 (package
6412 (name "python-tlsh")
6413 (version "3.4.4")
6414 (home-page "https://github.com/trendmicro/tlsh")
6415 (source (origin
6416 (method url-fetch)
6417 (uri (string-append "https://github.com/trendmicro/tlsh/archive/v"
6418 version ".tar.gz"))
6419 (sha256
6420 (base32
6421 "00bhzjqrlh7v538kbkbn8lgx976j1138al3sdhklaizqjvpwyk4r"))
6422 (file-name (string-append name "-" version ".tar.gz"))))
6423 (build-system cmake-build-system)
6424 (arguments
6425 '(#:out-of-source? #f
6426 #:phases (modify-phases %standard-phases
6427 (replace
6428 'install
6429 (lambda* (#:key outputs #:allow-other-keys)
6430 ;; Build and install the Python bindings. The underlying
6431 ;; C++ library is apparently not meant to be installed.
6432 (let ((out (assoc-ref outputs "out")))
6433 (with-directory-excursion "py_ext"
6434 (and (system* "python" "setup.py" "build")
6435 (system* "python" "setup.py" "install"
6436 (string-append "--prefix=" out))))))))))
6437 (inputs `(("python" ,python-wrapper))) ;for the bindings
6438 (synopsis "Fuzzy matching library for Python")
6439 (description
6440 "Trend Micro Locality Sensitive Hash (TLSH) is a fuzzy matching library.
6441 Given a byte stream with a minimum length of 256 bytes, TLSH generates a hash
6442 value which can be used for similarity comparisons. Similar objects have
6443 similar hash values, which allows for the detection of similar objects by
6444 comparing their hash values. The byte stream should have a sufficient amount
6445 of complexity; for example, a byte stream of identical bytes will not generate
6446 a hash value.")
6447 (license license:asl2.0)))
6448
6449 (define-public python2-tlsh
6450 (package
6451 (inherit python-tlsh)
6452 (name "python2-tlsh")
6453 (inputs `(("python" ,python-2)))))
6454
6455 (define-public python-termcolor
6456 (package
6457 (name "python-termcolor")
6458 (version "1.1.0")
6459 (source
6460 (origin
6461 (method url-fetch)
6462 (uri (pypi-uri "python-termcolor" version))
6463 (sha256
6464 (base32
6465 "0fv1vq14rpqwgazxg4981904lfyp84mnammw7y046491cv76jv8x"))))
6466 (build-system python-build-system)
6467 (arguments
6468 ;; There are no tests.
6469 `(#:tests? #f))
6470 (home-page "http://pypi.python.org/pypi/termcolor")
6471 (synopsis "ANSII Color formatting for terminal output")
6472 (description
6473 "This package provides ANSII Color formatting for output in terminals.")
6474 (license license:expat)))
6475
6476 (define-public python2-termcolor
6477 (package-with-python2 python-termcolor))
6478
6479 (define-public python-libarchive-c
6480 (package
6481 (name "python-libarchive-c")
6482 (version "2.2")
6483 (source (origin
6484 (method url-fetch)
6485 (uri (pypi-uri "libarchive-c" version))
6486 (sha256
6487 (base32
6488 "0z4r7v3dhd6b3120mav05ff08srih176r2rg5k8kn7mjd9pslm2x"))))
6489 (build-system python-build-system)
6490 (arguments
6491 '(#:phases (modify-phases %standard-phases
6492 (add-before
6493 'build 'reference-libarchive
6494 (lambda* (#:key inputs #:allow-other-keys)
6495 ;; Retain the absolute file name of libarchive.so.
6496 (let ((libarchive (assoc-ref inputs "libarchive")))
6497 (substitute* "libarchive/ffi.py"
6498 (("find_library\\('archive'\\)")
6499 (string-append "'" libarchive
6500 "/lib/libarchive.so'")))))))))
6501 (inputs
6502 `(("libarchive" ,libarchive)))
6503 (home-page "https://github.com/Changaco/python-libarchive-c")
6504 (synopsis "Python interface to libarchive")
6505 (description
6506 "This package provides Python bindings to libarchive, a C library to
6507 access possibly compressed archives in many different formats. It uses
6508 Python's @code{ctypes} foreign function interface (FFI).")
6509 (license license:lgpl2.0+)))
6510
6511 (define-public python2-libarchive-c
6512 (package-with-python2 python-libarchive-c))
6513
6514 (define-public python-file
6515 (package
6516 (inherit file)
6517 (name "python-file")
6518 (source (origin
6519 (inherit (package-source file))
6520 ;; This patch should not be applied to python2-file.
6521 (patches (search-patches "python-file-double-encoding-bug.patch"))))
6522 (build-system python-build-system)
6523 (arguments
6524 '(#:tests? #f ;no tests
6525 #:configure-flags '("--single-version-externally-managed" "--root=/")
6526 #:phases (modify-phases %standard-phases
6527 (add-before 'build 'change-directory
6528 (lambda _
6529 (chdir "python")
6530 #t))
6531 (add-before 'build 'set-library-file-name
6532 (lambda* (#:key inputs #:allow-other-keys)
6533 (let ((file (assoc-ref inputs "file")))
6534 (substitute* "magic.py"
6535 (("find_library\\('magic'\\)")
6536 (string-append "'" file "/lib/libmagic.so'")))
6537 #t))))))
6538 (inputs `(("file" ,file)))
6539 (self-native-input? #f)
6540 (synopsis "Python bindings to the libmagic file type guesser. Note that
6541 this module and the python-magic module both provide a \"magic.py\" file;
6542 these two modules, which are different and were developed separately, both
6543 serve the same purpose: provide Python bindings for libmagic.")))
6544
6545 (define-public python2-file
6546 (package-with-python2 python-file))
6547
6548 (define-public python-debian
6549 (package
6550 (name "python-debian")
6551 (version "0.1.23")
6552 (source
6553 (origin
6554 (method url-fetch)
6555 (uri (string-append
6556 "https://pypi.python.org/packages/source/p/python-debian/python-debian-"
6557 version ".tar.gz"))
6558 (sha256
6559 (base32
6560 "193faznwnjc3n5991wyzim6h9gyq1zxifmfrnpm3avgkh7ahyynh"))))
6561 (build-system python-build-system)
6562 (propagated-inputs
6563 `(("python-six" ,python-six)))
6564 (home-page "http://packages.debian.org/sid/python-debian")
6565 (synopsis "Debian package related modules")
6566 (description
6567 ;; XXX: Use @enumerate instead of @itemize to work around
6568 ;; <http://bugs.gnu.org/21772>.
6569 "This package provides Python modules that abstract many formats of
6570 Debian-related files, such as:
6571
6572 @enumerate
6573 @item Debtags information;
6574 @item @file{debian/changelog} files;
6575 @item packages files, pdiffs;
6576 @item control files of single or multiple RFC822-style paragraphs---e.g.
6577 @file{debian/control}, @file{.changes}, @file{.dsc};
6578 @item Raw @file{.deb} and @file{.ar} files, with (read-only) access to
6579 contained files and meta-information.
6580 @end enumerate\n")
6581
6582 ;; Modules are either GPLv2+ or GPLv3+.
6583 (license license:gpl3+)))
6584
6585 (define-public python2-debian
6586 (package-with-python2 python-debian))
6587
6588 (define-public python-nbformat
6589 (package
6590 (name "python-nbformat")
6591 (version "4.1.0")
6592 (source
6593 (origin
6594 (method url-fetch)
6595 (uri (pypi-uri "nbformat" version))
6596 (sha256
6597 (base32
6598 "0mq8iki3d4mnx7wy05phss7x98mds4fqydin8lcagidp1knw1xnv"))))
6599 (build-system python-build-system)
6600 (arguments `(#:tests? #f)) ; no test target
6601 (propagated-inputs
6602 `(("python-ipython-genutils" ,python-ipython-genutils)
6603 ("python-jsonschema" ,python-jsonschema)
6604 ("python-jupyter-core" ,python-jupyter-core)
6605 ("python-traitlets" ,python-traitlets)))
6606 (home-page "http://jupyter.org")
6607 (synopsis "Jupyter Notebook format")
6608 (description "This package provides the reference implementation of the
6609 Jupyter Notebook format and Python APIs for working with notebooks.")
6610 (license license:bsd-3)))
6611
6612 (define-public python2-nbformat
6613 (package-with-python2 python-nbformat))
6614
6615 (define-public python-bleach
6616 (package
6617 (name "python-bleach")
6618 (version "1.4.3")
6619 (source
6620 (origin
6621 (method url-fetch)
6622 (uri (pypi-uri "bleach" version))
6623 (sha256
6624 (base32
6625 "0jvg3jxrvnx7xmm9gj262v60ib452xlnwlb0navyp7jsvcd0d4qj"))))
6626 (build-system python-build-system)
6627 (propagated-inputs
6628 `(("python-html5lib" ,python-html5lib-0.9)
6629 ("python-six" ,python-six)))
6630 (native-inputs
6631 `(("python-nose" ,python-nose)))
6632 (home-page "http://github.com/jsocol/bleach")
6633 (synopsis "Whitelist-based HTML-sanitizing tool")
6634 (description "Bleach is an easy whitelist-based HTML-sanitizing tool.")
6635 (license license:asl2.0)))
6636
6637 (define-public python2-bleach
6638 (package-with-python2 python-bleach))
6639
6640 (define-public python-entrypoints
6641 (package
6642 (name "python-entrypoints")
6643 (version "0.2.2")
6644 (source
6645 (origin
6646 (method url-fetch)
6647 (uri (string-append "https://github.com/takluyver/entrypoints/archive/"
6648 version ".tar.gz"))
6649 (file-name (string-append name "-" version ".tar.gz"))
6650 (sha256
6651 (base32
6652 "0azqlkh3j0za080lsf5crnhaxx3c93k9dpv5ihkhf5cppgw5sjz5"))))
6653 (build-system python-build-system)
6654 ;; The package does not come with a setup.py file, so we have to generate
6655 ;; one ourselves.
6656 (arguments
6657 `(#:tests? #f
6658 #:phases
6659 (modify-phases %standard-phases
6660 (add-after 'unpack 'create-setup.py
6661 (lambda _
6662 (call-with-output-file "setup.py"
6663 (lambda (port)
6664 (format port "\
6665 from setuptools import setup
6666 setup(name='entrypoints', version='~a', py_modules=['entrypoints'])
6667 " ,version))))))))
6668 (home-page "https://github.com/takluyver/entrypoints")
6669 (synopsis "Discover and load entry points from installed Python packages")
6670 (description "Entry points are a way for Python packages to advertise
6671 objects with some common interface. The most common examples are
6672 @code{console_scripts} entry points, which define shell commands by
6673 identifying a Python function to run. The @code{entrypoints} module contains
6674 functions to find and load entry points.")
6675 (license license:expat)))
6676
6677 (define-public python2-entrypoints
6678 (package-with-python2 python-entrypoints))
6679
6680 (define-public python-nbconvert
6681 (package
6682 (name "python-nbconvert")
6683 (version "5.0.0b1")
6684 (source
6685 (origin
6686 (method url-fetch)
6687 (uri (pypi-uri "nbconvert" version))
6688 (sha256
6689 (base32
6690 "0brclbb18l4nmd5qy3dl9wn05rjdh1fz4rmzdlfqacj12rcdvdgp"))))
6691 (build-system python-build-system)
6692 ;; The "bdist_egg" target is disabled by default, causing the installation
6693 ;; to fail.
6694 (arguments `(#:configure-flags (list "bdist_egg")))
6695 (propagated-inputs
6696 `(("python-bleach" ,python-bleach)
6697 ("python-entrypoints" ,python-entrypoints)
6698 ("python-jinja2" ,python-jinja2)
6699 ("python-jupyter-core" ,python-jupyter-core)
6700 ("python-mistune" ,python-mistune)
6701 ("python-nbformat" ,python-nbformat)
6702 ("python-pygments" ,python-pygments)
6703 ("python-traitlets" ,python-traitlets)))
6704 (home-page "http://jupyter.org")
6705 (synopsis "Converting Jupyter Notebooks")
6706 (description "The @code{nbconvert} tool, @{jupyter nbconvert}, converts
6707 notebooks to various other formats via Jinja templates. It allows you to
6708 convert an @code{.ipynb} notebook file into various static formats including:
6709
6710 @enumerate
6711 @item HTML
6712 @item LaTeX
6713 @item PDF
6714 @item Reveal JS
6715 @item Markdown (md)
6716 @item ReStructured Text (rst)
6717 @item executable script
6718 @end enumerate\n")
6719 (license license:bsd-3)))
6720
6721 (define-public python2-nbconvert
6722 (package-with-python2 python-nbconvert))
6723
6724 (define-public python-notebook
6725 (package
6726 (name "python-notebook")
6727 (version "4.2.3")
6728 (source (origin
6729 (method url-fetch)
6730 (uri (pypi-uri "notebook" version))
6731 (sha256
6732 (base32
6733 "0laq5c2f21frq6xcdckgq7raqhznbjb0qs0357g612z87wyn1a9r"))))
6734 (build-system python-build-system)
6735 (arguments
6736 `(#:phases
6737 (modify-phases %standard-phases
6738 (replace 'check
6739 (lambda _
6740 ;; HOME must be set for tests
6741 (setenv "HOME" "/tmp")
6742 (zero? (system* "nosetests")))))))
6743 (propagated-inputs
6744 `(("python-jupyter-core" ,python-jupyter-core)
6745 ("python-nbformat" ,python-nbformat)
6746 ("python-nbconvert" ,python-nbconvert)
6747 ("python-ipython" ,python-ipython)))
6748 (native-inputs
6749 `(("python-nose" ,python-nose)
6750 ("python-sphinx" ,python-sphinx)
6751 ("python-requests" ,python-requests)))
6752 (home-page "http://jupyter.org/")
6753 (synopsis "Web-based notebook environment for interactive computing")
6754 (description
6755 "The Jupyter HTML notebook is a web-based notebook environment for
6756 interactive computing.")
6757 (license license:bsd-3)))
6758
6759 (define-public python2-notebook
6760 (package-with-python2 python-notebook))
6761
6762 (define-public python-widgetsnbextension
6763 (package
6764 (name "python-widgetsnbextension")
6765 (version "1.2.6")
6766 (source
6767 (origin
6768 (method url-fetch)
6769 (uri (pypi-uri "widgetsnbextension" version))
6770 (sha256
6771 (base32
6772 "0lff2mrwrgsa1mxmwx3phl9xvy0jqfpg6khbmxy53jbq56rwy666"))))
6773 (build-system python-build-system)
6774 (propagated-inputs
6775 `(("python-notebook" ,python-notebook)))
6776 (native-inputs
6777 `(("python-nose" ,python-nose)))
6778 (home-page "http://ipython.org")
6779 (synopsis "IPython HTML widgets for Jupyter")
6780 (description "This package provides interactive HTML widgets for Jupyter
6781 notebooks.")
6782 (license license:bsd-3)))
6783
6784 (define-public python2-widgetsnbextension
6785 (package-with-python2 python-widgetsnbextension))
6786
6787 (define-public python-ipywidgets
6788 (package
6789 (name "python-ipywidgets")
6790 (version "5.2.2")
6791 (source
6792 (origin
6793 (method url-fetch)
6794 (uri (pypi-uri "ipywidgets" version))
6795 (sha256
6796 (base32
6797 "1lk0qrr5l9a0z7qkkn30hv5832whxwxymf1l576fmmad0n7hkxms"))))
6798 (build-system python-build-system)
6799 ;; FIXME: it's not clear how to run the tests.
6800 (arguments `(#:tests? #f))
6801 (propagated-inputs
6802 `(("python-ipykernel" ,python-ipykernel)
6803 ("python-ipython" ,python-ipython)
6804 ("python-traitlets" ,python-traitlets)
6805 ("python-widgetsnbextension" ,python-widgetsnbextension)))
6806 (home-page "http://ipython.org")
6807 (synopsis "IPython HTML widgets for Jupyter")
6808 (description "Ipywidgets are interactive HTML widgets for Jupyter
6809 notebooks and the IPython kernel. Notebooks come alive when interactive
6810 widgets are used. Users gain control of their data and can visualize changes
6811 in the data.")
6812 (license license:bsd-3)))
6813
6814 (define-public python2-ipywidgets
6815 (package-with-python2 python-ipywidgets))
6816
6817 (define-public python-jupyter-console
6818 (package
6819 (name "python-jupyter-console")
6820 (version "5.0.0")
6821 (source
6822 (origin
6823 (method url-fetch)
6824 (uri (pypi-uri "jupyter_console" version))
6825 (sha256
6826 (base32
6827 "04acmkwsi99rcg3vb54c6n492zv35s92h2ahabc0w6wj976cipvx"))))
6828 (build-system python-build-system)
6829 ;; FIXME: it's not clear how to run the tests.
6830 (arguments `(#:tests? #f))
6831 (propagated-inputs
6832 `(("python-ipykernel" ,python-ipykernel)
6833 ("python-ipython" ,python-ipython)
6834 ("python-jupyter-client" ,python-jupyter-client)
6835 ("python-prompt-toolkit" ,python-prompt-toolkit)
6836 ("python-pygments" ,python-pygments)))
6837 (home-page "https://jupyter.org")
6838 (synopsis "Jupyter terminal console")
6839 (description "This package provides a terminal-based console frontend for
6840 Jupyter kernels. It also allows for console-based interaction with non-Python
6841 Jupyter kernels such as IJulia and IRKernel.")
6842 (license license:bsd-3)))
6843
6844 (define-public python2-jupyter-console
6845 (package-with-python2 python-jupyter-console))
6846
6847 (define-public jupyter
6848 (package
6849 (name "jupyter")
6850 (version "1.0.0")
6851 (source
6852 (origin
6853 (method url-fetch)
6854 (uri (pypi-uri "jupyter" version))
6855 (sha256
6856 (base32
6857 "0pwf3pminkzyzgx5kcplvvbvwrrzd3baa7lmh96f647k30rlpp6r"))))
6858 (build-system python-build-system)
6859 ;; FIXME: it's not clear how to run the tests.
6860 (arguments `(#:tests? #f))
6861 (propagated-inputs
6862 `(("python-ipykernel" ,python-ipykernel)
6863 ("python-ipywidgets" ,python-ipywidgets)
6864 ("python-jupyter-console" ,python-jupyter-console)
6865 ("python-nbconvert" ,python-nbconvert)
6866 ("python-notebook" ,python-notebook)))
6867 (home-page "http://jupyter.org")
6868 (synopsis "Web application for interactive documents")
6869 (description
6870 "The Jupyter Notebook is a web application that allows you to create and
6871 share documents that contain live code, equations, visualizations and
6872 explanatory text. Uses include: data cleaning and transformation, numerical
6873 simulation, statistical modeling, machine learning and much more.")
6874 (license license:bsd-3)))
6875
6876 (define-public python-chardet
6877 (package
6878 (name "python-chardet")
6879 (version "2.3.0")
6880 (source
6881 (origin
6882 (method url-fetch)
6883 (uri (string-append
6884 "https://pypi.python.org/packages/source/c/chardet/chardet-"
6885 version
6886 ".tar.gz"))
6887 (sha256
6888 (base32
6889 "1ak87ikcw34fivcgiz2xvi938dmclh078az65l9x3rmgljrkhgp5"))))
6890 (build-system python-build-system)
6891 (home-page "https://github.com/chardet/chardet")
6892 (synopsis "Universal encoding detector for Python 2 and 3")
6893 (description
6894 "This package provides @code{chardet}, a Python module that can
6895 automatically detect a wide range of file encodings.")
6896 (license license:lgpl2.1+)))
6897
6898 (define-public python2-chardet
6899 (package-with-python2 python-chardet))
6900
6901 (define-public python-docopt
6902 (package
6903 (name "python-docopt")
6904 (version "0.6.2")
6905 (source
6906 (origin
6907 (method url-fetch)
6908 ;; The release on PyPI does not include tests.
6909 (uri (string-append
6910 "https://github.com/docopt/docopt/archive/"
6911 version ".tar.gz"))
6912 (file-name (string-append name "-" version ".tar.gz"))
6913 (sha256
6914 (base32
6915 "16bf890xbdz3m30rsv2qacklh2rdn1zrfspfnwzx9g7vwz8yw4r1"))))
6916 (build-system python-build-system)
6917 (native-inputs
6918 `(("python-pytest" ,python-pytest)))
6919 (arguments
6920 `(#:phases (alist-replace
6921 'check
6922 (lambda _ (zero? (system* "py.test")))
6923 %standard-phases)))
6924 (home-page "http://docopt.org")
6925 (synopsis "Command-line interface description language for Python")
6926 (description "This library allows the user to define a command-line
6927 interface from a program's help message rather than specifying it
6928 programatically with command-line parsers like @code{getopt} and
6929 @code{argparse}.")
6930 (license license:expat)))
6931
6932 (define-public python2-docopt
6933 (package-with-python2 python-docopt))
6934
6935 (define-public python-zope-event
6936 (package
6937 (name "python-zope-event")
6938 (version "4.1.0")
6939 (source
6940 (origin
6941 (method url-fetch)
6942 (uri (string-append "https://pypi.python.org/packages/source/z"
6943 "/zope.event/zope.event-" version ".tar.gz"))
6944 (sha256
6945 (base32
6946 "11p75zpfz3ffhz21nzx9wb23xs993ck5s6hkjcvhswwizni5jynw"))))
6947 (build-system python-build-system)
6948 (home-page "http://pypi.python.org/pypi/zope.event")
6949 (synopsis "Event publishing system for Python")
6950 (description "Zope.event provides an event publishing API, intended for
6951 use by applications which are unaware of any subscribers to their events. It
6952 is a simple event-dispatching system on which more sophisticated event
6953 dispatching systems can be built.")
6954 (license license:zpl2.1)))
6955
6956 (define-public python2-zope-event
6957 (package-with-python2 python-zope-event))
6958
6959 (define-public python-zope-interface
6960 (package
6961 (name "python-zope-interface")
6962 (version "4.1.3")
6963 (source
6964 (origin
6965 (method url-fetch)
6966 (uri (string-append "https://pypi.python.org/packages/source/z"
6967 "/zope.interface/zope.interface-" version ".tar.gz"))
6968 (sha256
6969 (base32
6970 "0ks8h73b2g4bkad821qbv0wzjppdrwys33i7ka45ik3wxjg1l8if"))))
6971 (build-system python-build-system)
6972 (propagated-inputs
6973 `(("python-zope-event" ,python-zope-event)))
6974 (home-page "https://github.com/zopefoundation/zope.interface")
6975 (synopsis "Python implementation of the \"design by contract\"
6976 methodology")
6977 (description "Zope.interface provides an implementation of \"object
6978 interfaces\" for Python. Interfaces are a mechanism for labeling objects as
6979 conforming to a given API or contract.")
6980 (license license:zpl2.1)))
6981
6982 (define-public python2-zope-interface
6983 (package-with-python2 python-zope-interface))
6984
6985 (define-public python-zope-exceptions
6986 (package
6987 (name "python-zope-exceptions")
6988 (version "4.0.8")
6989 (source
6990 (origin
6991 (method url-fetch)
6992 (uri (string-append "https://pypi.python.org/packages/source/z"
6993 "/zope.exceptions/zope.exceptions-"
6994 version ".tar.gz"))
6995 (sha256
6996 (base32
6997 "0zwxaaa66sqxg5k7zcrvs0fbg9ym1njnxnr28dfmchzhwjvwnfzl"))))
6998 (build-system python-build-system)
6999 (arguments
7000 '(#:tests? #f)) ; circular dependency with zope.testrunner
7001 (propagated-inputs
7002 `(("python-zope-interface" ,python-zope-interface)))
7003 (home-page "http://cheeseshop.python.org/pypi/zope.exceptions")
7004 (synopsis "Zope exceptions")
7005 (description "Zope.exceptions provides general-purpose exception types
7006 that have uses outside of the Zope framework.")
7007 (license license:zpl2.1)))
7008
7009 (define-public python2-zope-exceptions
7010 (package-with-python2 python-zope-exceptions))
7011
7012 (define-public python-zope-testing
7013 (package
7014 (name "python-zope-testing")
7015 (version "4.5.0")
7016 (source
7017 (origin
7018 (method url-fetch)
7019 (uri (string-append "https://pypi.python.org/packages/source/z"
7020 "/zope.testing/zope.testing-" version ".tar.gz"))
7021 (sha256
7022 (base32
7023 "1yvglxhzvhl45mndvn9gskx2ph30zz1bz7rrlyfs62fv2pvih90s"))
7024 (modules '((guix build utils)))
7025 (snippet
7026 '(begin
7027 ;; Remove pre-compiled .pyc files backup files from source.
7028 (for-each delete-file (find-files "." "(\\.pyc|~)$"))
7029 #t))))
7030 (build-system python-build-system)
7031 (native-inputs
7032 `(("python-zope-exceptions" ,python-zope-exceptions)))
7033 (propagated-inputs
7034 `(("python-zope-interface" ,python-zope-interface)))
7035 (home-page "http://pypi.python.org/pypi/zope.testing")
7036 (synopsis "Zope testing helpers")
7037 (description "Zope.testing provides a number of testing utilities for HTML
7038 forms, HTTP servers, regular expressions, and more.")
7039 (license license:zpl2.1)))
7040
7041 (define-public python2-zope-testing
7042 (package-with-python2 python-zope-testing))
7043
7044 (define-public python-zope-testrunner
7045 (package
7046 (name "python-zope-testrunner")
7047 (version "4.4.9")
7048 (source
7049 (origin
7050 (method url-fetch)
7051 (uri (string-append "https://pypi.python.org/packages/source/z"
7052 "/zope.testrunner/zope.testrunner-"
7053 version ".zip"))
7054 (sha256
7055 (base32
7056 "1r7iqknhh55y45f64mz5hghgvzx34h1i11k350s0avx6q8gznja1"))))
7057 (build-system python-build-system)
7058 (native-inputs
7059 `(("python-six" ,python-six)
7060 ("python-zope-exceptions" ,python-zope-exceptions)
7061 ("python-zope-testing" ,python-zope-testing)
7062 ("unzip" ,unzip)))
7063 (propagated-inputs
7064 `(("python-zope-interface" ,python-zope-interface)))
7065 (home-page "http://pypi.python.org/pypi/zope.testrunner")
7066 (synopsis "Zope testrunner script")
7067 (description "Zope.testrunner provides a script for running Python
7068 tests.")
7069 (license license:zpl2.1)))
7070
7071 (define-public python2-zope-testrunner
7072 (let ((base (package-with-python2 python-zope-testrunner)))
7073 (package
7074 (inherit base)
7075 (native-inputs
7076 (append (package-native-inputs base)
7077 `(("python2-subunit" ,python2-subunit)
7078 ("python2-mimeparse" ,python2-mimeparse)))))))
7079
7080 (define-public python-zope-i18nmessageid
7081 (package
7082 (name "python-zope-i18nmessageid")
7083 (version "4.0.3")
7084 (source
7085 (origin
7086 (method url-fetch)
7087 (uri (string-append
7088 "https://pypi.python.org/packages/source/z"
7089 "/zope.i18nmessageid/zope.i18nmessageid-"
7090 version ".tar.gz"))
7091 (sha256
7092 (base32
7093 "1rslyph0klk58dmjjy4j0jxy21k03azksixc3x2xhqbkv97cmzml"))))
7094 (build-system python-build-system)
7095 (home-page "http://pypi.python.org/pypi/zope.i18nmessageid")
7096 (synopsis "Message identifiers for internationalization")
7097 (description "Zope.i18nmessageid provides facilities for declaring
7098 internationalized messages within program source text.")
7099 (license license:zpl2.1)))
7100
7101 (define-public python2-zope-i18nmessageid
7102 (package-with-python2 python-zope-i18nmessageid))
7103
7104 (define-public python-zope-schema
7105 (package
7106 (name "python-zope-schema")
7107 (version "4.4.2")
7108 (source
7109 (origin
7110 (method url-fetch)
7111 (uri (string-append "https://pypi.python.org/packages/source/z"
7112 "/zope.schema/zope.schema-" version ".tar.gz"))
7113 (sha256
7114 (base32
7115 "1p943jdxb587dh7php4vx04qvn7b2877hr4qs5zyckvp5afhhank"))))
7116 (build-system python-build-system)
7117 (propagated-inputs
7118 `(("python-zope-event" ,python-zope-event)
7119 ("python-zope-interface" ,python-zope-interface)))
7120 (native-inputs
7121 `(("python-zope-testing" ,python-zope-testing)))
7122 (home-page "http://pypi.python.org/pypi/zope.schema")
7123 (synopsis "Zope data schemas")
7124 (description "Zope.scheme provides extensions to zope.interface for
7125 defining data schemas.")
7126 (license license:zpl2.1)))
7127
7128 (define-public python2-zope-schema
7129 (package-with-python2 python-zope-schema))
7130
7131 (define-public python-zope-configuration
7132 (package
7133 (name "python-zope-configuration")
7134 (version "4.0.3")
7135 (source (origin
7136 (method url-fetch)
7137 (uri (string-append "https://pypi.python.org/packages/source/z"
7138 "/zope.configuration/zope.configuration-"
7139 version ".tar.gz"))
7140 (sha256
7141 (base32
7142 "1x9dfqypgympnlm25p9m43xh4qv3p7d75vksv9pzqibrb4cggw5n"))))
7143 (build-system python-build-system)
7144 (propagated-inputs
7145 `(("python-zope-i18nmessageid" ,python-zope-i18nmessageid)
7146 ("python-zope-schema" ,python-zope-schema)))
7147 (home-page "http://pypi.python.org/pypi/zope.configuration")
7148 (synopsis "Zope Configuration Markup Language")
7149 (description "Zope.configuration implements ZCML, the Zope Configuration
7150 Markup Language.")
7151 (license license:zpl2.1)))
7152
7153 (define-public python2-zope-configuration
7154 (package-with-python2 python-zope-configuration))
7155
7156 (define-public python-zope-proxy
7157 (package
7158 (name "python-zope-proxy")
7159 (version "4.1.6")
7160 (source
7161 (origin
7162 (method url-fetch)
7163 (uri (string-append "https://pypi.python.org/packages/source/z"
7164 "/zope.proxy/zope.proxy-" version ".tar.gz"))
7165 (sha256
7166 (base32
7167 "0pqwwmvm1prhwv1ziv9lp8iirz7xkwb6n2kyj36p2h0ppyyhjnm4"))))
7168 (build-system python-build-system)
7169 (propagated-inputs
7170 `(("python-zope-interface" ,python-zope-interface)))
7171 (home-page "http://pypi.python.org/pypi/zope.proxy")
7172 (synopsis "Generic, transparent proxies")
7173 (description "Zope.proxy provides generic, transparent proxies for Python.
7174 Proxies are special objects which serve as mostly-transparent wrappers around
7175 another object, intervening in the apparent behavior of the wrapped object
7176 only when necessary to apply the policy (e.g., access checking, location
7177 brokering, etc.) for which the proxy is responsible.")
7178 (license license:zpl2.1)))
7179
7180 (define-public python2-zope-proxy
7181 (package-with-python2 python-zope-proxy))
7182
7183 (define-public python-zope-location
7184 (package
7185 (name "python-zope-location")
7186 (version "4.0.3")
7187 (source
7188 (origin
7189 (method url-fetch)
7190 (uri (string-append "https://pypi.python.org/packages/source/z"
7191 "/zope.location/zope.location-" version ".tar.gz"))
7192 (sha256
7193 (base32
7194 "1nj9da4ksiyv3h8n2vpzwd0pb03mdsh7zy87hfpx72b6p2zcwg74"))))
7195 (build-system python-build-system)
7196 (native-inputs
7197 `(("python-zope-proxy" ,python-zope-proxy)
7198 ("python-zope-schema" ,python-zope-schema)))
7199 (home-page "http://pypi.python.org/pypi/zope.location/")
7200 (synopsis "Zope location library")
7201 (description "Zope.location implements the concept of \"locations\" in
7202 Zope3, which are are special objects that have a structural location.")
7203 (license license:zpl2.1)))
7204
7205 (define-public python2-zope-location
7206 (package-with-python2 python-zope-location))
7207
7208 (define-public python-zope-security
7209 (package
7210 (name "python-zope-security")
7211 (version "4.0.3")
7212 (source
7213 (origin
7214 (method url-fetch)
7215 (uri (string-append "https://pypi.python.org/packages/source/z"
7216 "/zope.security/zope.security-" version ".tar.gz"))
7217 (sha256
7218 (base32
7219 "14zmf684amc0x32kq05yxnhfqd1cmyhafkw05gn81rn90zjv6ssy"))))
7220 (build-system python-build-system)
7221 (propagated-inputs
7222 `(("python-zope-i18nmessageid" ,python-zope-i18nmessageid)
7223 ("python-zope-component" ,python-zope-component)
7224 ("python-zope-location" ,python-zope-location)
7225 ("python-zope-proxy" ,python-zope-proxy)
7226 ("python-zope-schema" ,python-zope-schema)
7227 ("python-zope-testrunner" ,python-zope-testrunner)
7228 ("python-zope-testing" ,python-zope-testing)))
7229 (home-page "http://pypi.python.org/pypi/zope.security")
7230 (synopsis "Zope security framework")
7231 (description "Zope.security provides a generic mechanism to implement
7232 security policies on Python objects.")
7233 (license license:zpl2.1)))
7234
7235 (define-public python2-zope-security
7236 (let ((zope-security (package-with-python2 python-zope-security)))
7237 (package (inherit zope-security)
7238 (propagated-inputs
7239 `(("python2-zope-testrunner" ,python2-zope-testrunner)
7240 ,@(alist-delete
7241 "python-zope-testrunner"
7242 (package-propagated-inputs zope-security)))))))
7243
7244 (define-public python-zope-component
7245 (package
7246 (name "python-zope-component")
7247 (version "4.2.2")
7248 (source
7249 (origin
7250 (method url-fetch)
7251 (uri (string-append "https://pypi.python.org/packages/source/z"
7252 "/zope.component/zope.component-" version ".tar.gz"))
7253 (sha256
7254 (base32
7255 "06pqr8m5jv12xjyy5b59hh9anl61cxkzhw9mka33r3nxalmi2b18"))))
7256 (build-system python-build-system)
7257 (arguments
7258 ;; Skip tests due to circular dependency with python-zope-security.
7259 '(#:tests? #f))
7260 (native-inputs
7261 `(("python-zope-testing" ,python-zope-testing)))
7262 (propagated-inputs
7263 `(("python-zope-event" ,python-zope-event)
7264 ("python-zope-interface" ,python-zope-interface)
7265 ("python-zope-i18nmessageid" ,python-zope-i18nmessageid)
7266 ("python-zope-configuration" ,python-zope-configuration)))
7267 (home-page "https://github.com/zopefoundation/zope.component")
7268 (synopsis "Zope Component Architecture")
7269 (description "Zope.component represents the core of the Zope Component
7270 Architecture. Together with the zope.interface package, it provides
7271 facilities for defining, registering and looking up components.")
7272 (license license:zpl2.1)))
7273
7274 (define-public python2-zope-component
7275 (package-with-python2 python-zope-component))
7276
7277 (define-public python-pythondialog
7278 (package
7279 (name "python-pythondialog")
7280 (version "3.4.0")
7281 (source
7282 (origin
7283 (method url-fetch)
7284 (uri (pypi-uri "pythondialog" version))
7285 (sha256
7286 (base32
7287 "1728ghsran47jczn9bhlnkvk5bvqmmbihabgif5h705b84r1272c"))))
7288 (build-system python-build-system)
7289 (arguments
7290 `(#:phases
7291 (modify-phases %standard-phases
7292 (add-after 'unpack 'patch-path
7293 (lambda* (#:key inputs #:allow-other-keys)
7294 (let* ((dialog (assoc-ref inputs "dialog")))
7295 ;; Since this library really wants to grovel the search path, we
7296 ;; must hardcode dialog's store path into it.
7297 (substitute* "dialog.py"
7298 (("os.getenv\\(\"PATH\", \":/bin:/usr/bin\"\\)")
7299 (string-append "os.getenv(\"PATH\") + \":" dialog "/bin\"")))
7300 #t))))
7301 #:tests? #f)) ; no test suite
7302 (propagated-inputs
7303 `(("dialog" ,dialog)))
7304 (home-page "http://pythondialog.sourceforge.net/")
7305 (synopsis "Python interface to the UNIX dialog utility")
7306 (description "A Python wrapper for the dialog utility. Its purpose is to
7307 provide an easy to use, pythonic and comprehensive Python interface to dialog.
7308 This allows one to make simple text-mode user interfaces on Unix-like systems")
7309 (license license:lgpl2.1)
7310 (properties `((python2-variant . ,(delay python2-pythondialog))))))
7311
7312 (define-public python2-pythondialog
7313 (let ((base (package-with-python2 (strip-python2-variant python-pythondialog))))
7314 (package
7315 (inherit base)
7316 (version (package-version python-pythondialog))
7317 (source (origin
7318 (method url-fetch)
7319 (uri (pypi-uri "python2-pythondialog" version))
7320 (sha256
7321 (base32
7322 "0d8k7lxk50imdyx85lv8j98i4c93a71iwpapnl1506rpkbm9qvd9")))))))
7323
7324 (define-public python-pyrfc3339
7325 (package
7326 (name "python-pyrfc3339")
7327 (version "1.0")
7328 (source
7329 (origin
7330 (method url-fetch)
7331 (uri (pypi-uri "pyRFC3339" version))
7332 (sha256
7333 (base32
7334 "0dgm4l9y8jiax5cp6yxjd2i27cq8h33sh81n1wfbmnmqb32cdywd"))))
7335 (build-system python-build-system)
7336 (propagated-inputs
7337 `(("python-pytz" ,python-pytz)))
7338 (native-inputs
7339 `(("python-nose" ,python-nose)))
7340 (home-page "https://github.com/kurtraschke/pyRFC3339")
7341 (synopsis "Python timestamp library")
7342 (description "Python library for generating and parsing RFC 3339-compliant
7343 timestamps.")
7344 (license license:expat)))
7345
7346 (define-public python2-pyrfc3339
7347 (package-with-python2 python-pyrfc3339))
7348
7349 (define-public python-werkzeug
7350 (package
7351 (name "python-werkzeug")
7352 (version "0.11.11")
7353 (source
7354 (origin
7355 (method url-fetch)
7356 (uri (pypi-uri "Werkzeug" version))
7357 (sha256
7358 (base32
7359 "1rgpq8a2qv26d75v9j3b074inirlyy6y4b5x4rxblp202jy4cb77"))))
7360 (build-system python-build-system)
7361 (native-inputs
7362 `(("python-pytest" ,python-pytest)))
7363 (home-page "http://werkzeug.pocoo.org/")
7364 (synopsis "Utilities for WSGI applications")
7365 (description "One of the most advanced WSGI utility modules. It includes a
7366 powerful debugger, full-featured request and response objects, HTTP utilities to
7367 handle entity tags, cache control headers, HTTP dates, cookie handling, file
7368 uploads, a powerful URL routing system and a bunch of community-contributed
7369 addon modules.")
7370 (license license:x11)))
7371
7372 (define-public python2-werkzeug
7373 (package-with-python2 python-werkzeug))
7374
7375 (define-public python-configobj
7376 (package
7377 (name "python-configobj")
7378 (version "5.0.6")
7379 (source (origin
7380 (method url-fetch)
7381 (uri (string-append
7382 "https://pypi.python.org/packages/source/c/configobj/"
7383 "configobj-" version ".tar.gz"))
7384 (sha256
7385 (base32
7386 "00h9rcmws03xvdlfni11yb60bz3kxfvsj6dg6nrpzj71f03nbxd2"))
7387 ;; Patch setup.py so it looks for python-setuptools, which is
7388 ;; required to parse the keyword 'install_requires' in setup.py.
7389 (patches (search-patches "python-configobj-setuptools.patch"))))
7390 (build-system python-build-system)
7391 (native-inputs
7392 `(("python-six" ,python-six)))
7393 (synopsis "Config file reading, writing and validation")
7394 (description "ConfigObj is a simple but powerful config file reader and
7395 writer: an ini file round tripper. Its main feature is that it is very easy to
7396 use, with a straightforward programmer’s interface and a simple syntax for
7397 config files.")
7398 (home-page "https://github.com/DiffSK/configobj")
7399 (license license:bsd-3)))
7400
7401 (define-public python2-configobj
7402 (package-with-python2 python-configobj))
7403
7404 (define-public python-configargparse
7405 (package
7406 (name "python-configargparse")
7407 (version "0.10.0")
7408 (source (origin
7409 (method url-fetch)
7410 (uri (string-append
7411 "https://pypi.python.org/packages/source/C/ConfigArgParse/"
7412 "ConfigArgParse-" version ".tar.gz"))
7413 (sha256
7414 (base32
7415 "19wh919gbdbzxzpagg52q3lm62yicm95ddlcx77dyjc1slyshl1v"))))
7416 (build-system python-build-system)
7417 (arguments
7418 ;; FIXME: Bug in test suite filed upstream:
7419 ;; https://github.com/bw2/ConfigArgParse/issues/32
7420 '(#:tests? #f))
7421 (synopsis "Replacement for argparse")
7422 (description "A drop-in replacement for argparse that allows options to also
7423 be set via config files and/or environment variables.")
7424 (home-page "https://github.com/bw2/ConfigArgParse")
7425 (license license:expat)))
7426
7427 (define-public python2-configargparse
7428 (package-with-python2 python-configargparse))
7429
7430 (define-public python-ndg-httpsclient
7431 (package
7432 (name "python-ndg-httpsclient")
7433 (version "0.4.0")
7434 (source (origin
7435 (method url-fetch)
7436 (uri (string-append
7437 "https://pypi.python.org/packages/source/n/ndg-httpsclient/"
7438 "ndg_httpsclient-" version ".tar.gz"))
7439 (sha256
7440 (base32
7441 "0x32ibixm3vv5m9xfk83xsqm8xcqw4dd0khbh6qbri6rxgymbhg8"))))
7442 (build-system python-build-system)
7443 (arguments
7444 '(;; The tests appear to require networking.
7445 #:tests? #f))
7446 (propagated-inputs
7447 `(("python-pyopenssl" ,python-pyopenssl)))
7448 (synopsis "HTTPS support for Python's httplib and urllib2")
7449 (description "This is a HTTPS client implementation for httplib and urllib2
7450 based on PyOpenSSL. PyOpenSSL provides a more fully featured SSL implementation
7451 over the default provided with Python and importantly enables full verification
7452 of the SSL peer.")
7453 (home-page "https://github.com/cedadev/ndg_httpsclient/")
7454 (license license:bsd-3)))
7455
7456 ;; python2-openssl requires special care, so package-with-python2 is
7457 ;; insufficient.
7458 (define-public python2-ndg-httpsclient
7459 (package (inherit python-ndg-httpsclient)
7460 (name "python2-ndg-httpsclient")
7461 (arguments `(#:python ,python-2))
7462 (propagated-inputs
7463 `(("python2-pyopenssl" ,python2-pyopenssl)))))
7464
7465 (define-public python-contextlib2
7466 (package
7467 (name "python-contextlib2")
7468 (version "0.4.0")
7469 (source
7470 (origin
7471 (method url-fetch)
7472 (uri (pypi-uri "contextlib2" version))
7473 (sha256
7474 (base32
7475 "0cmp131dlh0d0zvw0aza1zd13glvngzk8lb4avks0hm7yxwdr9am"))))
7476 (build-system python-build-system)
7477 (arguments
7478 `(#:phases
7479 (modify-phases %standard-phases
7480 (replace 'check
7481 (lambda _ (zero?
7482 (system*
7483 "python" "test_contextlib2.py" "-v")))))))
7484 (home-page "http://contextlib2.readthedocs.org/")
7485 (synopsis "Tools for decorators and context managers")
7486 (description "This module is primarily a backport of the Python
7487 3.2 contextlib to earlier Python versions. Like contextlib, it
7488 provides utilities for common tasks involving decorators and context
7489 managers. It also contains additional features that are not part of
7490 the standard library.")
7491 (license license:psfl)))
7492
7493 (define-public python2-contextlib2
7494 (package-with-python2 python-contextlib2))
7495
7496 (define-public python-texttable
7497 (package
7498 (name "python-texttable")
7499 (version "0.8.4")
7500 (source
7501 (origin
7502 (method url-fetch)
7503 (uri (pypi-uri "texttable" version))
7504 (sha256
7505 (base32
7506 "0bkhs4dx9s6g7fpb969hygq56hyz4ncfamlynw72s0n6nqfbd1w5"))))
7507 (build-system python-build-system)
7508 (arguments '(#:tests? #f)) ; no tests
7509 (home-page "https://github.com/foutaise/texttable/")
7510 (synopsis "Python module for creating simple ASCII tables")
7511 (description "Texttable is a Python module for creating simple ASCII
7512 tables.")
7513 (license license:lgpl2.1+)))
7514
7515 (define-public python2-texttable
7516 (package-with-python2 python-texttable))
7517
7518 (define-public python-websocket-client
7519 (package
7520 (name "python-websocket-client")
7521 (version "0.37.0")
7522 (source
7523 (origin
7524 (method url-fetch)
7525 (uri (pypi-uri "websocket_client" version))
7526 (sha256
7527 (base32
7528 "0h9glp1jll3z76ly3kg08aqgxqk0a68p4zi9yn50353bh5nj92v7"))))
7529 (build-system python-build-system)
7530 (native-inputs
7531 `(("python-six" ,python-six))) ; for tests
7532 (home-page "https://github.com/liris/websocket-client")
7533 (synopsis "WebSocket client for Python")
7534 (description "The Websocket-client module provides the low level APIs for
7535 WebSocket usage in Python programs.")
7536 (license license:lgpl2.1+)))
7537
7538 (define-public python2-websocket-client
7539 (package-with-python2 python-websocket-client))
7540
7541 (define-public python-atomicwrites
7542 (package
7543 (name "python-atomicwrites")
7544 (version "1.1.0")
7545 (source (origin
7546 (method url-fetch)
7547 (uri (pypi-uri "atomicwrites" version))
7548 (sha256
7549 (base32
7550 "1s01dci8arsl9d9vr5nz1fk9znldp1z3l4yl43f0c27z12b8yxl0"))))
7551 (build-system python-build-system)
7552 (synopsis "Atomic file writes in Python")
7553 (description "Library for atomic file writes using platform dependent tools
7554 for atomic file system operations.")
7555 (home-page "https://github.com/untitaker/python-atomicwrites")
7556 (license license:expat)))
7557
7558 (define-public python2-atomicwrites
7559 (package-with-python2 python-atomicwrites))
7560
7561 (define-public python-requests-toolbelt
7562 (package
7563 (name "python-requests-toolbelt")
7564 (version "0.6.2")
7565 (source (origin
7566 (method url-fetch)
7567 (uri (string-append
7568 "https://pypi.python.org/packages/"
7569 "e1/a4/a94c037bc72ad70441aff1403d3243510d2542ddca7759faaeffeb11aefe/"
7570 "requests-toolbelt-" version ".tar.gz"))
7571 (sha256
7572 (base32
7573 "15q9nrgp85nqlr4kdz1zvj8z2npafi2sr12y7fqgxbkq28j1aci6"))))
7574 (build-system python-build-system)
7575 (native-inputs
7576 `(("python-betamax" ,python-betamax)
7577 ("python-mock" ,python-mock)
7578 ("python-pytest" ,python-pytest)))
7579 (propagated-inputs
7580 `(("python-requests" ,python-requests)))
7581 (synopsis "Extensions to python-requests")
7582 (description "This is a toolbelt of useful classes and functions to be used
7583 with python-requests.")
7584 (home-page "https://github.com/sigmavirus24/requests-toolbelt")
7585 (license license:asl2.0)))
7586
7587 (define-public python-click-threading
7588 (package
7589 (name "python-click-threading")
7590 (version "0.2.0")
7591 (source (origin
7592 (method url-fetch)
7593 (uri (string-append
7594 "https://pypi.python.org/packages/"
7595 "fe/b7/e7f609d18a2a351cb71616adcf54df1acd82f83cb9b5936935a4d20e2c23/"
7596 "click-threading-" version ".tar.gz"))
7597 (sha256
7598 (base32
7599 "18bcqikxwb3drb8rf60cclxkxw52521b38ax3byah6j8cn8y9p4j"))))
7600 (build-system python-build-system)
7601 (propagated-inputs
7602 `(("python-click" ,python-click)))
7603 (synopsis "Utilities for multithreading in Click")
7604 (description "This package provides utilities for multithreading in Click
7605 applications.")
7606 (home-page "https://github.com/click-contrib/click-threading")
7607 (license license:expat)))
7608
7609 (define-public python-click-log
7610 (package
7611 (name "python-click-log")
7612 (version "0.1.3")
7613 (source (origin
7614 (method url-fetch)
7615 (uri (pypi-uri "click-log" version))
7616 (sha256
7617 (base32
7618 "0kdd1vminxpcfczxl2kkf285n0dr1gxh2cdbx1p6vkj7b7bci3gx"))))
7619 (build-system python-build-system)
7620 (propagated-inputs
7621 `(("python-click" ,python-click)))
7622 (synopsis "Logging for click applications")
7623 (description "This package provides a Python library for logging Click
7624 applications.")
7625 (home-page "https://github.com/click-contrib/click-log")
7626 (license license:expat)))
7627
7628 (define-public python-apipkg
7629 (package
7630 (name "python-apipkg")
7631 (version "1.4")
7632 (source (origin
7633 (method url-fetch)
7634 (uri (pypi-uri "apipkg" version))
7635 (sha256
7636 (base32
7637 "1iks5701qnp3dlr3q1d9qm68y2plp2m029irhpz92a44psfkjf1f"))))
7638 (build-system python-build-system)
7639 (inputs
7640 `(("python-pytest" ,python-pytest)))
7641 (synopsis "Namespace control and lazy-import mechanism")
7642 (description "With apipkg you can control the exported namespace of a Python
7643 package and greatly reduce the number of imports for your users. It is a small
7644 pure Python module that works on virtually all Python versions.")
7645 (home-page "https://bitbucket.org/hpk42/apipkg")
7646 (license license:expat)))
7647
7648 (define-public python2-apipkg
7649 (package-with-python2 python-apipkg))
7650
7651 (define-public python-execnet
7652 (package
7653 (name "python-execnet")
7654 (version "1.4.1")
7655 (source (origin
7656 (method url-fetch)
7657 (uri (pypi-uri "execnet" version))
7658 (sha256
7659 (base32
7660 "1rpk1vyclhg911p3hql0m0nrpq7q7mysxnaaw6vs29cpa6kx8vgn"))))
7661 (build-system python-build-system)
7662 (arguments
7663 `(;; 2 failed, 275 passed, 670 skipped, 4 xfailed
7664 ;; The two test failures are caused by the lack of an `ssh` executable.
7665 ;; The test suite can be run with pytest after the 'install' phase.
7666 #:tests? #f))
7667 (native-inputs
7668 `(("python-pytest" ,python-pytest)
7669 ("python-setuptools-scm" ,python-setuptools-scm)))
7670 (propagated-inputs
7671 `(("python-apipkg" ,python-apipkg)))
7672 (synopsis "Rapid multi-Python deployment")
7673 (description "Execnet provides a share-nothing model with
7674 channel-send/receive communication for distributing execution across many
7675 Python interpreters across version, platform and network barriers. It has a
7676 minimal and fast API targetting the following uses:
7677 @enumerate
7678 @item distribute tasks to (many) local or remote CPUs
7679 @item write and deploy hybrid multi-process applications
7680 @item write scripts to administer multiple environments
7681 @end enumerate")
7682 (home-page "http://codespeak.net/execnet/")
7683 (license license:expat)))
7684
7685 (define-public python2-execnet
7686 (package-with-python2 python-execnet))
7687
7688 ;;; The software provided by this package was integrated into pytest 2.8.
7689 (define-public python-pytest-cache
7690 (package
7691 (name "python-pytest-cache")
7692 (version "1.0")
7693 (source (origin
7694 (method url-fetch)
7695 (uri (pypi-uri "pytest-cache" version))
7696 (sha256
7697 (base32
7698 "1a873fihw4rhshc722j4h6j7g3nj7xpgsna9hhg3zn6ksknnhx5y"))))
7699 (build-system python-build-system)
7700 (propagated-inputs
7701 `(("python-apipkg" ,python-apipkg)
7702 ("python-execnet" ,python-execnet)
7703 ("python-py" ,python-py)
7704 ("python-pytest" ,python-pytest)))
7705 (synopsis "Py.test plugin with mechanisms for caching across test runs")
7706 (description "The pytest-cache plugin provides tools to rerun failures from
7707 the last py.test invocation.")
7708 (home-page "https://bitbucket.org/hpk42/pytest-cache/")
7709 (license license:expat)))
7710
7711 (define-public python2-pytest-cache
7712 (package-with-python2 python-pytest-cache))
7713
7714 (define-public python-pytest-localserver
7715 (package
7716 (name "python-pytest-localserver")
7717 (version "0.3.5")
7718 (source (origin
7719 (method url-fetch)
7720 (uri (pypi-uri "pytest-localserver" version))
7721 (sha256
7722 (base32
7723 "0dvqspjr6va55zwmnnc2mmpqc7mm65kxig9ya44x1z8aadzxpa4p"))))
7724 (build-system python-build-system)
7725 (arguments
7726 `(#:phases (modify-phases %standard-phases
7727 (replace 'check
7728 (lambda _
7729 (zero? (system* "py.test" "--genscript=runtests.py"))
7730 (zero? (system* "py.test")))))))
7731 (native-inputs
7732 `(("python-pytest" ,python-pytest)
7733 ("python-requests" ,python-requests)
7734 ("python-six" ,python-six)))
7735 (propagated-inputs
7736 `(("python-werkzeug" ,python-werkzeug)))
7737 (synopsis "Py.test plugin to test server connections locally")
7738 (description "Pytest-localserver is a plugin for the pytest testing
7739 framework which enables you to test server connections locally.")
7740 (home-page "https://pypi.python.org/pypi/pytest-localserver")
7741 (license license:expat)))
7742
7743 (define-public python-wsgi-intercept
7744 (package
7745 (name "python-wsgi-intercept")
7746 (version "1.2.2")
7747 (source (origin
7748 (method url-fetch)
7749 (uri (string-append
7750 "https://pypi.python.org/packages/"
7751 "38/76/ebcbc24d0cb77db34520a3ca6ed1bd43ace17d182bbd8dd7d976f1c176fb/"
7752 "wsgi_intercept-" version ".tar.gz"))
7753 (sha256
7754 (base32
7755 "0kjj2v2dvmnpdd5h5gk9rzz0f54rhjb0yiz3zg65bmp65slfw65d"))))
7756 (build-system python-build-system)
7757 (native-inputs
7758 `(("python-pytest" ,python-pytest)
7759 ("python-six" ,python-six)
7760 ("python-urllib3" ,python-urllib3)))
7761 (propagated-inputs
7762 `(("python-httplib2" ,python-httplib2)
7763 ("python-requests" ,python-requests)))
7764 (synopsis "Puts a WSGI application in place of a real URI for testing")
7765 (description "Wsgi_intercept installs a WSGI application in place of a real
7766 URI for testing. Testing a WSGI application normally involves starting a
7767 server at a local host and port, then pointing your test code to that address.
7768 Instead, this library lets you intercept calls to any specific host/port
7769 combination and redirect them into a WSGI application importable by your test
7770 program. Thus, you can avoid spawning multiple processes or threads to test
7771 your Web app.")
7772 (home-page "https://github.com/cdent/wsgi-intercept")
7773 (license license:expat)))
7774
7775 (define-public python-pytest-xprocess
7776 (package
7777 (name "python-pytest-xprocess")
7778 (version "0.9.1")
7779 (source (origin
7780 (method url-fetch)
7781 (uri (pypi-uri "pytest-xprocess" version))
7782 (sha256
7783 (base32
7784 "17zlql1xqw3ywcgwwbqmw633aly99lab12hm02asr8awvg5603pp"))))
7785 (build-system python-build-system)
7786 (propagated-inputs
7787 `(("python-pytest" ,python-pytest)
7788 ("python-pytest-cache" ,python-pytest-cache)
7789 ("python-psutil" ,python-psutil)))
7790 (synopsis "Pytest plugin to manage external processes across test runs")
7791 (description "Pytest-xprocess is an experimental py.test plugin for managing
7792 processes across test runs.")
7793 (home-page "https://bitbucket.org/pytest-dev/pytest-xprocess")
7794 (license license:expat)))
7795
7796 (define-public python-icalendar
7797 (package
7798 (name "python-icalendar")
7799 (version "3.10")
7800 (source (origin
7801 (method url-fetch)
7802 (uri (pypi-uri "icalendar" version))
7803 (sha256
7804 (base32
7805 "01amnk3621s7fagfla86npd25knbqirchg7h1jpqxqp103d02bs7"))))
7806 (build-system python-build-system)
7807 (propagated-inputs
7808 `(("python-dateutil-2" ,python-dateutil-2)
7809 ("python-pytz" ,python-pytz)))
7810 (synopsis "Python library for parsing iCalendar files")
7811 (description "The icalendar package is a parser/generator of iCalendar
7812 files for use with Python.")
7813 (home-page "https://github.com/collective/icalendar")
7814 (license license:bsd-2)))
7815
7816 (define-public python-sphinxcontrib-newsfeed
7817 (package
7818 (name "python-sphinxcontrib-newsfeed")
7819 (version "0.1.4")
7820 (source (origin
7821 (method url-fetch)
7822 (uri (pypi-uri "sphinxcontrib-newsfeed" version))
7823 (sha256
7824 (base32
7825 "1d7gam3mn8v4in4p16yn3v10vps7nnaz6ilw99j4klij39dqd37p"))))
7826 (build-system python-build-system)
7827 (propagated-inputs
7828 `(("python-docutils" ,python-docutils)
7829 ("python-sphinx" ,python-sphinx)))
7830 (synopsis "News Feed extension for Sphinx")
7831 (description "Sphinxcontrib-newsfeed is an extension for adding a simple
7832 Blog, News or Announcements section to a Sphinx website.")
7833 (home-page "https://bitbucket.org/prometheus/sphinxcontrib-newsfeed")
7834 (license license:bsd-2)))
7835
7836 (define-public python-args
7837 (package
7838 (name "python-args")
7839 (version "0.1.0")
7840 (source (origin
7841 (method url-fetch)
7842 (uri (pypi-uri "args" version))
7843 (sha256
7844 (base32
7845 "057qzi46h5dmxdqknsbrssn78lmqjlnm624iqdhrnpk26zcbi1d7"))))
7846 (build-system python-build-system)
7847 (home-page "https://github.com/kennethreitz/args")
7848 (synopsis "Command-line argument parser")
7849 (description
7850 "This library provides a Python module to parse command-line arguments.")
7851 (license license:bsd-3)))
7852
7853 (define-public python2-args
7854 (package-with-python2 python-args))
7855
7856 (define-public python-clint
7857 (package
7858 (name "python-clint")
7859 (version "0.5.1")
7860 (source (origin
7861 (method url-fetch)
7862 (uri (pypi-uri "clint" version))
7863 (sha256
7864 (base32
7865 "1an5lkkqk1zha47198p42ji3m94xmzx1a03dn7866m87n4r4q8h5"))))
7866 (build-system python-build-system)
7867 (propagated-inputs
7868 `(("python-args" ,python-args)))
7869 (home-page "https://github.com/kennethreitz/clint")
7870 (synopsis "Command-line interface tools")
7871 (description
7872 "Clint is a Python module filled with a set of tools for developing
7873 command-line applications, including tools for colored and indented
7874 output, progress bar display, and pipes.")
7875 (license license:isc)))
7876
7877 (define-public python2-clint
7878 (package-with-python2 python-clint))
7879
7880 (define-public python-astor
7881 (package
7882 (name "python-astor")
7883 (version "0.5")
7884 (source (origin
7885 (method url-fetch)
7886 (uri (pypi-uri "astor" version))
7887 (sha256
7888 (base32
7889 "1fdafq5hkis1fxqlmhw0sn44zp2ar46nxhbc22cvwg7hsd8z5gsa"))))
7890 (build-system python-build-system)
7891 (home-page "https://github.com/berkerpeksag/astor")
7892 (synopsis "Read and write Python ASTs")
7893 (description
7894 "Astor is designed to allow easy manipulation of Python source via the
7895 Abstract Syntax Tree.")
7896 (license license:bsd-3)))
7897
7898 (define-public python2-astor
7899 (package-with-python2 python-astor))
7900
7901 (define-public python-rply
7902 (package
7903 (name "python-rply")
7904 (version "0.7.4")
7905 (source (origin
7906 (method url-fetch)
7907 (uri (pypi-uri "rply" version))
7908 (sha256
7909 (base32
7910 "12rp1d9ba7nvd5rhaxi6xzx1rm67r1k1ylsrkzhpwnphqpb06cvj"))))
7911 (build-system python-build-system)
7912 (propagated-inputs
7913 `(("python-appdirs" ,python-appdirs)))
7914 (home-page "https://github.com/alex/rply")
7915 (synopsis "Parser generator for Python")
7916 (description
7917 "This package provides a pure Python based parser generator, that also
7918 works with RPython. It is a more-or-less direct port of David Bazzley's PLY,
7919 with a new public API, and RPython support.")
7920 (license license:bsd-3)))
7921
7922 (define-public python2-rply
7923 (package-with-python2 python-rply))
7924
7925 (define-public python-hy
7926 (package
7927 (name "python-hy")
7928 (version "0.11.1")
7929 (source (origin
7930 (method url-fetch)
7931 (uri (pypi-uri "hy" version))
7932 (sha256
7933 (base32
7934 "1msqv747iz12r73mz4qvsmlwkddwjvrahlrk7ysrcz07h7dsscxs"))))
7935 (build-system python-build-system)
7936 (propagated-inputs
7937 `(("python-astor" ,python-astor)
7938 ("python-clint" ,python-clint)
7939 ("python-rply" ,python-rply)))
7940 (home-page "http://hylang.org/")
7941 (synopsis "Lisp frontend to Python")
7942 (description
7943 "Hy is a dialect of Lisp that's embedded in Python. Since Hy transforms
7944 its Lisp code into the Python Abstract Syntax Tree, you have the whole world of
7945 Python at your fingertips, in Lisp form.")
7946 (license license:expat)))
7947
7948 (define-public python2-hy
7949 (package-with-python2 python-hy))
7950
7951 (define-public python-rauth
7952 (package
7953 (name "python-rauth")
7954 (version "0.7.2")
7955 (source
7956 (origin
7957 (method url-fetch)
7958 (uri (pypi-uri "rauth" version))
7959 (sha256
7960 (base32
7961 "00pq7zw429hhza9c0qzxiqp77m653jv09z92nralnmzwdf6pzicf"))))
7962 (build-system python-build-system)
7963 (arguments
7964 `(#:test-target "check"))
7965 (propagated-inputs
7966 `(("python-requests" ,python-requests)))
7967 (home-page "https://github.com/litl/rauth")
7968 (synopsis "Python library for OAuth 1.0/a, 2.0, and Ofly")
7969 (description
7970 "Rauth is a Python library for OAuth 1.0/a, 2.0, and Ofly. It also
7971 provides service wrappers for convenient connection initialization and
7972 authenticated session objects providing things like keep-alive.")
7973 (license license:expat)
7974 (properties `((python2-variant . ,(delay python2-rauth))))))
7975
7976 (define-public python2-rauth
7977 (let ((base (package-with-python2 (strip-python2-variant python-rauth))))
7978 (package
7979 (inherit base)
7980 (native-inputs `(("python2-unittest2" ,python2-unittest2)
7981 ,@(package-native-inputs base))))))
7982
7983 (define-public python2-functools32
7984 (package
7985 (name "python2-functools32")
7986 (version "3.2.3-2")
7987 (source
7988 (origin
7989 (method url-fetch)
7990 (uri (pypi-uri "functools32" version))
7991 (sha256
7992 (base32
7993 "0v8ya0b58x47wp216n1zamimv4iw57cxz3xxhzix52jkw3xks9gn"))))
7994 (build-system python-build-system)
7995 (arguments
7996 `(#:python ,python-2
7997 #:tests? #f)) ; no test target
7998 (home-page "https://github.com/MiCHiLU/python-functools32")
7999 (synopsis
8000 "Backport of the functools module from Python 3.2.3")
8001 (description
8002 "This package is a backport of the @code{functools} module from Python
8003 3.2.3 for use with older versions of Python and PyPy.")
8004 (license license:expat)))
8005
8006 (define-public python2-futures
8007 (package
8008 (name "python2-futures")
8009 (version "3.0.3")
8010 (source
8011 (origin
8012 (method url-fetch)
8013 (uri (pypi-uri "futures" version))
8014 (sha256
8015 (base32
8016 "1vcb34dqhzkhbq1957vdjszhhm5y3j9ba88dgwhqx2zynhmk9qig"))))
8017 (build-system python-build-system)
8018 (arguments `(#:python ,python-2))
8019 (home-page "https://github.com/agronholm/pythonfutures")
8020 (synopsis
8021 "Backport of the concurrent.futures package from Python 3.2")
8022 (description
8023 "The concurrent.futures module provides a high-level interface for
8024 asynchronously executing callables. This package backports the
8025 concurrent.futures package from Python 3.2")
8026 (license license:bsd-3)))
8027
8028 (define-public python-promise
8029 (package
8030 (name "python-promise")
8031 (version "0.4.2")
8032 (source
8033 (origin
8034 (method url-fetch)
8035 (uri (pypi-uri "promise" version))
8036 (sha256
8037 (base32
8038 "1k19ms8l3d5jzjh557rgkxb5sg4mqgfc315rn4hx1z3n8qq6lr3h"))))
8039 (build-system python-build-system)
8040 ;; Tests wants python-futures, which is a python2 only program, and
8041 ;; can't be found by python-promise at test time.
8042 (arguments `(#:tests? #f))
8043 (home-page "https://github.com/syrusakbary/promise")
8044 (synopsis "Promises/A+ implementation for Python")
8045 (description
8046 "Promises/A+ implementation for Python")
8047 (properties `((python2-variant . ,(delay python2-promise))))
8048 (license license:expat)))
8049
8050 (define-public python2-promise
8051 (let ((promise (package-with-python2
8052 (strip-python2-variant python-promise))))
8053 (package (inherit promise)
8054 (arguments (substitute-keyword-arguments (package-arguments promise)
8055 ((#:tests? _) #t)))
8056 (native-inputs
8057 `(("python2-futures" ,python2-futures)
8058 ("python2-pytest" ,python2-pytest)
8059 ,@(package-native-inputs promise))))))
8060
8061 (define-public python-urllib3
8062 (package
8063 (name "python-urllib3")
8064 (version "1.18.1")
8065 (source
8066 (origin
8067 (method url-fetch)
8068 (uri (pypi-uri "urllib3" version))
8069 (sha256
8070 (base32
8071 "1wb8aqnq53vzh2amrv8kc66f3h6fx217y0q62y6n30a64p2yqmam"))))
8072 (build-system python-build-system)
8073 (arguments `(#:tests? #f))
8074 (native-inputs
8075 `(;; some packages for tests
8076 ("python-nose" ,python-nose)
8077 ("python-mock" ,python-mock)
8078 ("python-tornado" ,python-tornado)))
8079 (propagated-inputs
8080 `(;; packages for https security
8081 ("python-certifi" ,python-certifi)
8082 ("python-ndg-httpsclient" ,python-ndg-httpsclient)
8083 ("python-pyasn1" ,python-pyasn1)
8084 ("python-pyopenssl" ,python-pyopenssl)))
8085 (home-page "https://urllib3.readthedocs.org/")
8086 (synopsis "HTTP library with thread-safe connection pooling")
8087 (description
8088 "Urllib3 supports features left out of urllib and urllib2 libraries. It
8089 can reuse the same socket connection for multiple requests, it can POST files,
8090 supports url redirection and retries, and also gzip and deflate decoding.")
8091 (license license:expat)))
8092
8093 (define-public python2-urllib3
8094 (package-with-python2 python-urllib3))
8095
8096 (define-public python-colorama
8097 (package
8098 (name "python-colorama")
8099 (version "0.3.3")
8100 (source
8101 (origin
8102 (method url-fetch)
8103 (uri (pypi-uri "colorama" version))
8104 (sha256
8105 (base32
8106 "1716z9pq1r5ys3nkg7wdrb3h2f9rmd0zdxpxzmx3bgwgf6xg48gb"))))
8107 (build-system python-build-system)
8108 (synopsis "colored terminal text rendering for Python")
8109 (description "Colorama is a Python library for rendering colored terminal
8110 text.")
8111 (home-page "https://pypi.python.org/pypi/colorama")
8112 (license license:bsd-3)))
8113
8114 (define-public python2-colorama
8115 (package-with-python2 python-colorama))
8116
8117 (define-public python-rsa
8118 (package
8119 (name "python-rsa")
8120 (version "3.4.2")
8121 (source
8122 (origin
8123 (method url-fetch)
8124 (uri (pypi-uri "rsa" version))
8125 (sha256
8126 (base32
8127 "1dcxvszbikgzh99ybdc7jq0zb9wspy2ds8z9mjsqiyv3q884xpr5"))))
8128 (build-system python-build-system)
8129 (propagated-inputs
8130 `(("python-pyasn1" ,python-pyasn1)))
8131 (synopsis "Pure-Python RSA implementation")
8132 (description "Python-RSA is a pure-Python RSA implementation. It supports
8133 encryption and decryption, signing and verifying signatures, and key
8134 generation according to PKCS#1 version 1.5. It can be used as a Python
8135 library as well as on the command line.")
8136 (home-page "http://stuvel.eu/rsa")
8137 (license license:asl2.0)))
8138
8139 (define-public python2-rsa
8140 (package-with-python2 python-rsa))
8141
8142 (define-public python-pluggy
8143 (package
8144 (name "python-pluggy")
8145 (version "0.3.1")
8146 (source
8147 (origin
8148 (method url-fetch)
8149 (uri (pypi-uri "pluggy" version))
8150 (sha256
8151 (base32
8152 "18qfzfm40bgx672lkg8q9x5hdh76n7vax99aank7vh2nw21wg70m"))))
8153 (build-system python-build-system)
8154 (synopsis "Plugin and hook calling mechanism for Python")
8155 (description "Pluggy is an extraction of the plugin manager as used by
8156 Pytest but stripped of Pytest specific details.")
8157 (home-page "https://pypi.python.org/pypi/pluggy")
8158 (license license:expat)))
8159
8160 (define-public python2-pluggy
8161 (package-with-python2 python-pluggy))
8162
8163 (define-public python-tox
8164 (package
8165 (name "python-tox")
8166 (version "2.3.1")
8167 (source
8168 (origin
8169 (method url-fetch)
8170 (uri (pypi-uri "tox" version))
8171 (sha256
8172 (base32
8173 "1vj73ar4rimq3fwy5r2z3jv4g9qbh8rmpmncsc00g0k310acqzxz"))))
8174 (build-system python-build-system)
8175 (arguments
8176 ;; FIXME: Tests require a newer version of pytest, but upgrading our
8177 ;; pytest breaks other packages.
8178 '(#:tests? #f))
8179 (inputs
8180 `(("python-pluggy" ,python-pluggy)
8181 ("python-py" ,python-py)
8182 ("python-virtualenv" ,python-virtualenv)
8183 ("python-pytest" ,python-pytest)))
8184 (home-page "http://tox.testrun.org/")
8185 (synopsis "Virtualenv-based automation of test activities")
8186 (description "Tox is a generic virtualenv management and test command line
8187 tool. It can be used to check that a package installs correctly with
8188 different Python versions and interpreters, or run tests in each type of
8189 supported environment, or act as a frontend to continuous integration
8190 servers.")
8191 (license license:expat)))
8192
8193 (define-public python2-tox
8194 (package-with-python2 python-tox))
8195
8196 (define-public python-jmespath
8197 (package
8198 (name "python-jmespath")
8199 (version "0.9.0")
8200 (source
8201 (origin
8202 (method url-fetch)
8203 (uri (pypi-uri "jmespath" version))
8204 (sha256
8205 (base32
8206 "0g9xvl69y7nr3w7ag4fsp6sm4fqf6vrqjw7504x2hzrrsh3ampq8"))))
8207 (build-system python-build-system)
8208 (synopsis "JSON Matching Expressions")
8209 (description "JMESPath (pronounced “james path”) is a Python library that
8210 allows one to declaratively specify how to extract elements from a JSON
8211 document.")
8212 (home-page "https://github.com/jmespath/jmespath.py")
8213 (license license:expat)))
8214
8215 (define-public python2-jmespath
8216 (package-with-python2 python-jmespath))
8217
8218 (define-public python-botocore
8219 (package
8220 (name "python-botocore")
8221 (version "1.4.62")
8222 (source
8223 (origin
8224 (method url-fetch)
8225 (uri (pypi-uri "botocore" version))
8226 (sha256
8227 (base32
8228 "1zxczlwqy9bl27d9bc5x99mb5mcsxm350240lp5nx7014xb311lj"))))
8229 (build-system python-build-system)
8230 (inputs
8231 `(("python-dateutil" ,python-dateutil-2)
8232 ("python-docutils" ,python-docutils)
8233 ("python-mock" ,python-mock)
8234 ("python-nose" ,python-nose)
8235 ("python-tox" ,python-tox)
8236 ("python-wheel" ,python-wheel)
8237 ("python-jmespath" ,python-jmespath)))
8238 (home-page "https://github.com/boto/botocore")
8239 (synopsis "Low-level interface to AWS")
8240 (description "Botocore is a Python library that provides a low-level
8241 interface to the Amazon Web Services (AWS) API.")
8242 (license license:asl2.0)))
8243
8244 (define-public python2-botocore
8245 (package-with-python2 python-botocore))
8246
8247 (define-public awscli
8248 (package
8249 (name "awscli")
8250 (version "1.11.5")
8251 (source
8252 (origin
8253 (method url-fetch)
8254 (uri (pypi-uri name version))
8255 (sha256
8256 (base32
8257 "0lclasm0wnayd3b8zl9l91i32nbgrhh0ncf9lksss4cv0myfwmfg"))))
8258 (build-system python-build-system)
8259 (inputs
8260 `(("python-colorama" ,python-colorama)
8261 ("python-docutils" ,python-docutils)
8262 ("python-mock" ,python-mock)
8263 ("python-nose" ,python-nose)
8264 ("python-rsa" ,python-rsa)
8265 ("python-sphinx" ,python-sphinx)
8266 ("python-tox" ,python-tox)
8267 ("python-wheel" ,python-wheel)
8268 ("python-botocore" ,python-botocore)
8269 ("python-s3transfer" ,python-s3transfer)))
8270 (home-page "http://aws.amazon.com/cli/")
8271 (synopsis "Command line client for AWS")
8272 (description "AWS CLI provides a unified command line interface to the
8273 Amazon Web Services (AWS) API.")
8274 (license license:asl2.0)))
8275
8276 (define-public python-hypothesis
8277 (package
8278 (name "python-hypothesis")
8279 (version "3.1.0")
8280 (source (origin
8281 (method url-fetch)
8282 (uri (pypi-uri "hypothesis" version))
8283 (sha256
8284 (base32
8285 "0qyqq9akm4vshhn8cngjc1qykcvsn7cz6dlm6njfsgpbraqrmbbw"))))
8286 (build-system python-build-system)
8287 (propagated-inputs
8288 `(("python-flake8" ,python-flake8)
8289 ("python-pytest" ,python-pytest)))
8290 (synopsis "Library for property based testing")
8291 (description "Hypothesis is a library for testing your Python code against a
8292 much larger range of examples than you would ever want to write by hand. It’s
8293 based on the Haskell library, Quickcheck, and is designed to integrate
8294 seamlessly into your existing Python unit testing work flow.")
8295 (home-page "https://github.com/DRMacIver/hypothesis")
8296 (license license:mpl2.0)
8297 (properties `((python2-variant . ,(delay python2-hypothesis))))))
8298
8299 (define-public python2-hypothesis
8300 (let ((hypothesis (package-with-python2
8301 (strip-python2-variant python-hypothesis))))
8302 (package (inherit hypothesis)
8303 (native-inputs
8304 `(("python2-enum34" ,python2-enum34))))))
8305
8306 (define-public python-pytest-subtesthack
8307 (package
8308 (name "python-pytest-subtesthack")
8309 (version "0.1.1")
8310 (source (origin
8311 (method url-fetch)
8312 (uri (pypi-uri "pytest-subtesthack" version))
8313 (sha256
8314 (base32
8315 "15kzcr5pchf3id4ikdvlv752rc0j4d912n589l4rifp8qsj19l1x"))))
8316 (build-system python-build-system)
8317 (propagated-inputs
8318 `(("python-pytest" ,python-pytest)))
8319 (synopsis "Set-up and tear-down fixtures for unit tests")
8320 (description "This plugin allows you to set up and tear down fixtures within
8321 unit test functions that use @code{py.test}. This is useful for using
8322 @command{hypothesis} inside py.test, as @command{hypothesis} will call the test
8323 function multiple times, without setting up or tearing down fixture state as is
8324 normally the case.")
8325 (home-page "https://github.com/untitaker/pytest-subtesthack/")
8326 (license license:unlicense)))
8327
8328 (define-public python2-pytest-subtesthack
8329 (package-with-python2 python-pytest-subtesthack))
8330
8331 (define-public python2-xdo
8332 (package
8333 (name "python2-xdo")
8334 (version "0.2")
8335 (source (origin
8336 (method url-fetch)
8337 (uri (string-append
8338 "http://http.debian.net/debian/pool/main/p/python-xdo/"
8339 "python-xdo_" version ".orig.tar.gz"))
8340 (sha256
8341 (base32
8342 "1kl5c1p0dyxf62plnk6fl77ycfb4whwjms16r14dxx8kn90hlqz4"))))
8343 (build-system python-build-system)
8344 (arguments
8345 `(#:python ,python-2
8346 #:tests? #f)) ; no tests provided
8347 (inputs
8348 `(("xdotool" ,xdotool)
8349 ("libX11" ,libx11)))
8350 (home-page "https://tracker.debian.org/pkg/python-xdo")
8351 (synopsis "Python library for simulating X11 keyboard/mouse input")
8352 (description "Provides bindings to libxdo for manipulating X11 via simulated
8353 input. (Note that this is mostly a legacy library; you may wish to look at
8354 python-xdo for newer bindings.)")
8355 (license license:bsd-3)))
8356
8357 (define-public python-wtforms
8358 (package
8359 (name "python-wtforms")
8360 (version "2.1")
8361 (source
8362 (origin
8363 (method url-fetch)
8364 (uri (pypi-uri "WTForms" version ".zip"))
8365 (sha256
8366 (base32
8367 "0vyl26y9cg409cfyj8rhqxazsdnd0jipgjw06civhrd53yyi1pzz"))))
8368 (build-system python-build-system)
8369 (arguments
8370 '(#:phases
8371 (modify-phases %standard-phases
8372 (add-after 'unpack 'remove-django-test
8373 ;; Don't fail the tests when the inputs for the optional tests cannot be found.
8374 (lambda _
8375 (substitute*
8376 "tests/runtests.py"
8377 (("'ext_django.tests', 'ext_sqlalchemy', 'ext_dateutil', 'locale_babel'") "")
8378 (("sys.stderr.write(\"### Disabled test '%s', dependency not found\n\" % name)") ""))
8379 #t)))))
8380 (native-inputs
8381 `(("unzip" ,unzip)))
8382 (home-page "http://wtforms.simplecodes.com/")
8383 (synopsis
8384 "Form validation and rendering library for Python web development")
8385 (description
8386 "WTForms is a flexible forms validation and rendering library
8387 for Python web development. It is very similar to the web form API
8388 available in Django, but is a standalone package.")
8389 (license license:bsd-3)))
8390
8391 (define-public python2-wtforms
8392 (package-with-python2 python-wtforms))
8393
8394 (define-public python-mako
8395 (package
8396 (name "python-mako")
8397 (version "1.0.3")
8398 (source
8399 (origin
8400 (method url-fetch)
8401 (uri (pypi-uri "Mako" version))
8402 (sha256
8403 (base32
8404 "136kcjbs0s98qkx8a418b05dfblqp0kiiqyx8vhx4rarwc7bqi3n"))))
8405 (build-system python-build-system)
8406 (native-inputs
8407 `(("python-markupsafe" ,python-markupsafe)
8408 ("python-mock" ,python-mock)
8409 ("python-nose" ,python-nose)))
8410 (home-page "http://www.makotemplates.org/")
8411 (synopsis "Templating language for Python")
8412 (description "Mako is a templating language for Python that compiles
8413 templates into Python modules.")
8414 (license license:expat)))
8415
8416 (define-public python2-mako
8417 (package-with-python2 python-mako))
8418
8419 (define-public python-waitress
8420 (package
8421 (name "python-waitress")
8422 (version "0.8.10")
8423 (source
8424 (origin
8425 (method url-fetch)
8426 (uri (pypi-uri "waitress" version))
8427 (sha256
8428 (base32
8429 "017n9ra6vvmq9d5sfhdzyzr1mg15x2hj2dhm4pdlw98c1ypw2h3w"))))
8430 (build-system python-build-system)
8431 (home-page "https://github.com/Pylons/waitress")
8432 (synopsis "Waitress WSGI server")
8433 (description "Waitress is meant to be a production-quality pure-Python WSGI
8434 server with very acceptable performance.")
8435 (license license:zpl2.1)))
8436
8437 (define-public python2-waitress
8438 (package-with-python2 python-waitress))
8439
8440 (define-public python-wsgiproxy2
8441 (package
8442 (name "python-wsgiproxy2")
8443 (version "0.4.2")
8444 (source
8445 (origin
8446 (method url-fetch)
8447 (uri (pypi-uri "WSGIProxy2" version ".zip"))
8448 (sha256
8449 (base32
8450 "13kf9bdxrc95y9vriaz0viry3ah11nz4rlrykcfvb8nlqpx3dcm4"))))
8451 (build-system python-build-system)
8452 (arguments
8453 '(;; Wsgiproxy2's test suite requires Restkit, which does not yet fully
8454 ;; support Python 3:
8455 ;; https://github.com/benoitc/restkit/issues/140
8456 #:tests? #f))
8457 (native-inputs
8458 `(("unzip" ,unzip)
8459 ("python-nose" ,python-nose)
8460 ("python-coverage" ,python-coverage)))
8461 (propagated-inputs
8462 `(("python-six" ,python-six)
8463 ("python-webob" ,python-webob)))
8464 (home-page
8465 "https://github.com/gawel/WSGIProxy2/")
8466 (synopsis "WSGI Proxy with various http client backends")
8467 (description "WSGI turns HTTP requests into WSGI function calls.
8468 WSGIProxy turns WSGI function calls into HTTP requests.
8469 It also includes code to sign requests and pass private data,
8470 and to spawn subprocesses to handle requests.")
8471 (license license:expat)))
8472
8473 (define-public python2-wsgiproxy2
8474 (package-with-python2 python-wsgiproxy2))
8475
8476 (define-public python-pastedeploy
8477 (package
8478 (name "python-pastedeploy")
8479 (version "1.5.2")
8480 (source
8481 (origin
8482 (method url-fetch)
8483 (uri (pypi-uri "PasteDeploy" version))
8484 (sha256
8485 (base32
8486 "1jz3m4hq8v6hyhfjz9425nd3nvn52cvbfipdcd72krjmla4qz1fm"))))
8487 (build-system python-build-system)
8488 (native-inputs
8489 `(("python-nose" ,python-nose)))
8490 ;; Note: setuptools used at runtime for pkg_resources
8491 (home-page "http://pythonpaste.org/deploy/")
8492 (synopsis
8493 "Load, configure, and compose WSGI applications and servers")
8494 (description
8495 "This tool provides code to load WSGI applications and servers from URIs;
8496 these URIs can refer to Python Eggs for INI-style configuration files. Paste
8497 Script provides commands to serve applications based on this configuration
8498 file.")
8499 (license license:expat)))
8500
8501 (define-public python2-pastedeploy
8502 (package-with-python2 python-pastedeploy))
8503
8504 (define-public python-paste
8505 (package
8506 (name "python-paste")
8507 (version "2.0.2")
8508 (source
8509 (origin
8510 (method url-fetch)
8511 (uri (pypi-uri "Paste" version))
8512 (sha256
8513 (base32
8514 "16dsv9qi0r4qsrsb6dilpq2rx0fnglvh36flzywcdnm2jg43mb5d"))
8515 (patches (search-patches "python-paste-remove-website-test.patch"
8516 "python-paste-remove-timing-test.patch"))))
8517 (build-system python-build-system)
8518 (native-inputs
8519 `(("python-nose" ,python-nose)))
8520 ;; Note: setuptools used at runtime for pkg_resources
8521 (propagated-inputs
8522 `(("python-six" ,python-six)))
8523 (arguments
8524 '(;; Tests don't pass on Python 3, but work fine on Python 2.
8525 ;; (As of 2.0.2, Python 3 support in Paste is presently a bit broken,
8526 ;; but is usable enough for the minimal amount it's used in MediaGoblin
8527 ;; still... things should be better by the next Paste release.)
8528 #:tests? #f))
8529 (home-page "http://pythonpaste.org")
8530 (synopsis
8531 "Python web development tools, focusing on WSGI")
8532 (description
8533 "Paste provides a variety of web development tools and middleware which
8534 can be nested together to build web applications. Paste's design closely
8535 follows ideas flowing from WSGI (Web Standard Gateway Interface).")
8536 (license license:expat)
8537 (properties `((python2-variant . ,(delay python2-paste))))))
8538
8539 (define-public python2-paste
8540 (let ((paste (package-with-python2
8541 (strip-python2-variant python-paste))))
8542 (package
8543 (inherit paste)
8544 (arguments
8545 ;; Tests are back for Python 2!
8546 `(#:tests? #t
8547 ,@(package-arguments paste))))))
8548
8549 (define-public python-pastescript
8550 (package
8551 (name "python-pastescript")
8552 (version "2.0.2")
8553 (source
8554 (origin
8555 (method url-fetch)
8556 (uri (pypi-uri "PasteScript" version))
8557 (sha256
8558 (base32
8559 "1h3nnhn45kf4pbcv669ik4faw04j58k8vbj1hwrc532k0nc28gy0"))))
8560 (build-system python-build-system)
8561 (native-inputs
8562 `(("python-nose" ,python-nose)))
8563 ;; Note: setuptools used at runtime for pkg_resources
8564 (propagated-inputs
8565 `(("python-paste" ,python-paste)
8566 ("python-pastedeploy" ,python-pastedeploy)))
8567 (home-page "http://pythonpaste.org/script/")
8568 (arguments
8569 '(;; Unfortunately, this requires the latest unittest2,
8570 ;; but that requires traceback2 which requires linecache2 which requires
8571 ;; unittest2. So we're skipping tests for now.
8572 ;; (Note: Apparently linetest2 only needs unittest2 for its tests,
8573 ;; so in theory we could get around this situation somehow.)
8574 #:tests? #f))
8575 (synopsis
8576 "Pluggable command line tool for serving web applications and more")
8577 (description
8578 "PasteScript is a plugin-friendly command line tool which provides a
8579 variety of features, from launching web applications to bootstrapping project
8580 layouts.")
8581 (license license:expat)))
8582
8583 (define-public python2-pastescript
8584 (package-with-python2 python-pastescript))
8585
8586 (define-public python-pyquery
8587 (package
8588 (name "python-pyquery")
8589 (version "1.2.13")
8590 (source
8591 (origin
8592 (method url-fetch)
8593 (uri (pypi-uri "pyquery" version))
8594 (sha256
8595 (base32
8596 "0j9fsisip21qv4xljsg5dmni1pgpvwrjyyhhql0glydc4bs5rjgv"))))
8597 (build-system python-build-system)
8598 (native-inputs
8599 `(("python-webob" ,python-webob)
8600 ("python-webtest" ,python-webtest)))
8601 (propagated-inputs
8602 `(("python-lxml" ,python-lxml)
8603 ("python-cssselect" ,python-cssselect)))
8604 (home-page "https://github.com/gawel/pyquery")
8605 (synopsis "Make jQuery-like queries on xml documents")
8606 (description "pyquery allows you to make jQuery queries on xml documents.
8607 The API is as much as possible the similar to jQuery. pyquery uses lxml for
8608 fast xml and html manipulation.")
8609 (license license:bsd-3)))
8610
8611 (define-public python2-pyquery
8612 (package-with-python2 python-pyquery))
8613
8614 (define-public python-webtest
8615 (package
8616 (name "python-webtest")
8617 (version "2.0.20")
8618 (source
8619 (origin
8620 (method url-fetch)
8621 (uri (pypi-uri "WebTest" version))
8622 (sha256
8623 (base32
8624 "0bv0qhdjakdsdgj4sk21gnpp8xp8bga4x03p6gjb83ihrsb7n4xv"))))
8625 (build-system python-build-system)
8626 (arguments
8627 `(;; Unfortunately we have to disable tests!
8628 ;; This release of WebTest is pinned to python-nose < 1.3,
8629 ;; but older versions of python-nose are plagued with the following
8630 ;; bug(s), which rears its ugly head during test execution:
8631 ;; https://github.com/nose-devs/nose/issues/759
8632 ;; https://github.com/nose-devs/nose/pull/811
8633 #:tests? #f))
8634 ;; Commented out code is no good, but in this case, once tests
8635 ;; are ready to be enabled again, we should put the following
8636 ;; in place:
8637 ;; (native-inputs
8638 ;; `(("python-nose" ,python-nose) ; technially < 1.3,
8639 ;; ; but see above comment
8640 ;; ("python-coverage" ,python-coverage)
8641 ;; ("python-mock" ,python-mock)
8642 ;; ("python-pastedeploy" ,python-pastedeploy)
8643 ;; ("python-wsgiproxy2" ,python-wsgiproxy2)
8644 ;; ("python-pyquery" ,python-pyquery)))
8645 (propagated-inputs
8646 `(("python-waitress" ,python-waitress)
8647 ("python-webob" ,python-webob)
8648 ("python-six" ,python-six)
8649 ("python-beautifulsoup4" ,python-beautifulsoup4)))
8650 (home-page "http://webtest.pythonpaste.org/")
8651 (synopsis "Helper to test WSGI applications")
8652 (description "Webtest allows you to test your Python web applications
8653 without starting an HTTP server. It supports anything that supports the
8654 minimum of WSGI.")
8655 (license license:expat)))
8656
8657 (define-public python2-webtest
8658 (package-with-python2 python-webtest))
8659
8660 (define-public python-anyjson
8661 (package
8662 (name "python-anyjson")
8663 (version "0.3.3")
8664 (source
8665 (origin
8666 (method url-fetch)
8667 (uri (pypi-uri "anyjson" version))
8668 (sha256
8669 (base32
8670 "1fjph4alvcscsl5d4b6qpv1yh31jy05jxi1l0xff7lws7j32v09p"))))
8671 (build-system python-build-system)
8672 (arguments
8673 `(;; We could possibly get tests working, but on Python 3 it's not so easy.
8674 ;; Very strangely, 2to3 is run *during setup.py install* (or bdist, or
8675 ;; whatever) so this transformation needs to be done before the tests
8676 ;; can be run. Maybe we could add a build step to transform beforehand
8677 ;; but it could be annoying/difficult.
8678 ;; We can enable tests for the Python 2 version, though, and do below.
8679 #:tests? #f))
8680 (home-page "http://bitbucket.org/runeh/anyjson/")
8681 (synopsis
8682 "Wraps best available JSON implementation in a common interface")
8683 (description
8684 "Anyjson loads whichever is the fastest JSON module installed
8685 and provides a uniform API regardless of which JSON implementation is used.")
8686 (license license:bsd-3)
8687 (properties `((python2-variant . ,(delay python2-anyjson))))))
8688
8689 (define-public python2-anyjson
8690 (let ((anyjson (package-with-python2
8691 (strip-python2-variant python-anyjson))))
8692 (package
8693 (inherit anyjson)
8694 (arguments `(;; Unlike the python 3 variant, we do run tests. See above!
8695 #:tests? #t
8696 ,@(package-arguments anyjson)))
8697 (native-inputs `(("python2-nose" ,python2-nose))))))
8698
8699 (define-public python-amqp
8700 (package
8701 (name "python-amqp")
8702 (version "1.4.9")
8703 (source
8704 (origin
8705 (method url-fetch)
8706 (uri (pypi-uri "amqp" version))
8707 (sha256
8708 (base32
8709 "06n6q0kxhjnbfz3vn8x9yz09lwmn1xi9d6wxp31h5jbks0b4vsid"))))
8710 (build-system python-build-system)
8711 (native-inputs
8712 `(("python-nose" ,python-nose)
8713 ("python-mock" ,python-mock)))
8714 (home-page "http://github.com/celery/py-amqp")
8715 (synopsis
8716 "Low-level AMQP client for Python (fork of amqplib)")
8717 (description
8718 "This is a fork of amqplib which was originally written by Barry Pederson.
8719 It is maintained by the Celery project, and used by kombu as a pure python
8720 alternative when librabbitmq is not available.")
8721 (license license:lgpl2.1+)
8722 (properties `((python2-variant . ,(delay python2-amqp))))))
8723
8724 (define-public python2-amqp
8725 (let ((amqp (package-with-python2
8726 (strip-python2-variant python-amqp))))
8727 (package
8728 (inherit amqp)
8729 (arguments `(;; Tries to run coverage tests with nose-cover3, which seems
8730 ;; unmaintained. Weirdly, does not do this on the python 3
8731 ;; version?
8732 #:tests? #f
8733 ,@(package-arguments amqp))))))
8734
8735 (define-public python-kombu
8736 (package
8737 (name "python-kombu")
8738 (version "3.0.37")
8739 (source
8740 (origin
8741 (method url-fetch)
8742 (uri (pypi-uri "kombu" version))
8743 (sha256
8744 (base32
8745 "0l16chb314gpq2v7fh94a22c30lcv6w3ylmhsa60bldlcq6a0r70"))))
8746 (build-system python-build-system)
8747 (native-inputs
8748 `(("python-mock" ,python-mock)
8749 ("python-nose" ,python-nose)))
8750 (propagated-inputs
8751 `(("python-anyjson" ,python-anyjson)
8752 ("python-amqp" ,python-amqp)
8753 ("python-redis" ,python-redis)))
8754 (home-page "http://kombu.readthedocs.org")
8755 (synopsis "Message passing library for Python")
8756 (description "The aim of Kombu is to make messaging in Python as easy as
8757 possible by providing an idiomatic high-level interface for the AMQ protocol,
8758 and also provide proven and tested solutions to common messaging problems.
8759 AMQP is the Advanced Message Queuing Protocol, an open standard protocol for
8760 message orientation, queuing, routing, reliability and security, for which the
8761 RabbitMQ messaging server is the most popular implementation.")
8762 (license license:bsd-3)
8763 (properties `((python2-variant . ,(delay python2-kombu))))))
8764
8765 (define-public python2-kombu
8766 (let ((kombu (package-with-python2
8767 (strip-python2-variant python-kombu))))
8768 (package
8769 (inherit kombu)
8770 (inputs `(("python2-unittest2" ,python2-unittest2)
8771 ,@(package-inputs kombu))))))
8772
8773 (define-public python-billiard
8774 (package
8775 (name "python-billiard")
8776 (version "3.3.0.23")
8777 (source
8778 (origin
8779 (method url-fetch)
8780 (uri (pypi-uri "billiard" version))
8781 (sha256
8782 (base32
8783 "02wxsc6bhqvzh8j6w758kvgqbnj14l796mvmrcms8fgfamd2lak9"))))
8784 (build-system python-build-system)
8785 (native-inputs
8786 `(("python-nose" ,python-nose)))
8787 (home-page "http://github.com/celery/billiard")
8788 (synopsis
8789 "Python multiprocessing fork with improvements and bugfixes")
8790 (description
8791 "Billiard is a fork of the Python 2.7 multiprocessing package. The
8792 multiprocessing package itself is a renamed and updated version of R Oudkerk's
8793 pyprocessing package. This standalone variant is intended to be compatible with
8794 Python 2.4 and 2.5, and will draw its fixes/improvements from python-trunk.")
8795 (license license:bsd-3)
8796 (properties `((python2-variant . ,(delay python2-billiard))))))
8797
8798 (define-public python2-billiard
8799 (let ((billiard (package-with-python2
8800 (strip-python2-variant python-billiard))))
8801 (package
8802 (inherit billiard)
8803 (native-inputs `(("python2-unittest2" ,python2-unittest2)
8804 ("python2-mock" ,python2-mock)
8805 ,@(package-native-inputs billiard))))))
8806
8807 (define-public python-celery
8808 (package
8809 (name "python-celery")
8810 (version "3.1.24")
8811 (source
8812 (origin
8813 (method url-fetch)
8814 (uri (pypi-uri "celery" version))
8815 (sha256
8816 (base32
8817 "0yh2prhdnx2dgkb67a5drj12hh2zvzx5f611p7mqqg01ydghif4r"))))
8818 (build-system python-build-system)
8819 (arguments
8820 `(#:phases
8821 (modify-phases %standard-phases
8822 ;; These tests break with Python 3.5:
8823 ;; https://github.com/celery/celery/issues/2897#issuecomment-253066295
8824 (replace 'check
8825 (lambda _
8826 (zero?
8827 (system* "nosetests" "--exclude=^test_safe_to_remove.*")))))))
8828 (native-inputs
8829 `(("python-nose" ,python-nose)))
8830 (propagated-inputs
8831 `(("python-pytz" ,python-pytz)
8832 ("python-amqp" ,python-amqp)
8833 ("python-anyjson" ,python-anyjson)
8834 ("python-billiard" ,python-billiard)
8835 ("python-kombu" ,python-kombu)))
8836 (home-page "http://celeryproject.org")
8837 (synopsis "Distributed Task Queue")
8838 (description "Celery is an asynchronous task queue/job queue based on
8839 distributed message passing. It is focused on real-time operation, but
8840 supports scheduling as well. The execution units, called tasks, are executed
8841 concurrently on a single or more worker servers using multiprocessing,
8842 Eventlet, or gevent. Tasks can execute asynchronously (in the background) or
8843 synchronously (wait until ready).")
8844 (license license:bsd-3)
8845 (properties `((python2-variant . ,(delay python2-celery))))))
8846
8847 (define-public python2-celery
8848 (let ((celery (package-with-python2
8849 (strip-python2-variant python-celery))))
8850 (package
8851 (inherit celery)
8852 (native-inputs `(("python2-unittest2" ,python2-unittest2)
8853 ("python2-mock" ,python2-mock)
8854 ,@(package-native-inputs celery))))))
8855
8856 (define-public python-translitcodec
8857 (package
8858 (name "python-translitcodec")
8859 (version "0.4.0")
8860 (source
8861 (origin
8862 (method url-fetch)
8863 (uri (pypi-uri "translitcodec" version))
8864 (sha256
8865 (base32
8866 "10x6pvblkzky1zhjs8nmx64nb9jdzxad4bxhq4iwv0j4z2aqjnki"))))
8867 (build-system python-build-system)
8868 (arguments
8869 `(#:tests? #f)) ; no tests provided
8870 (home-page
8871 "https://github.com/claudep/translitcodec")
8872 (synopsis
8873 "Unicode to 8-bit charset transliteration codec")
8874 (description
8875 "This package contains codecs for transliterating ISO 10646 texts into
8876 best-effort representations using smaller coded character sets (ASCII,
8877 ISO 8859, etc.).")
8878 (license license:expat)))
8879
8880 (define-public python2-translitcodec
8881 (package-with-python2 python-translitcodec))
8882
8883 (define-public python-editor
8884 (package
8885 (name "python-editor")
8886 (version "0.5")
8887 (source
8888 (origin
8889 (method url-fetch)
8890 (uri (pypi-uri "python-editor" version))
8891 (sha256
8892 (base32
8893 "1ypnpgvzpkbwsg4rdvy4sy51j28b5xq9v8pnkwxncn07vqz06p7n"))))
8894 (build-system python-build-system)
8895 (home-page
8896 "https://github.com/fmoo/python-editor")
8897 (synopsis
8898 "Programmatically open an editor, capture the result")
8899 (description
8900 "python-editor is a library that provides the editor module for
8901 programmatically interfacing with your system's $EDITOR.")
8902 (license license:asl2.0)))
8903
8904 (define-public python2-editor
8905 (package-with-python2 python-editor))
8906
8907 (define-public python-sphinxcontrib-programoutput
8908 (package
8909 (name "python-sphinxcontrib-programoutput")
8910 (version "0.8")
8911 (source (origin
8912 (method url-fetch)
8913 (uri (pypi-uri "sphinxcontrib-programoutput" version))
8914 (sha256
8915 (base32
8916 "098as6z1s0gb4dh5xcr1fd2vpm91zj93jzvgawspxf5s4hqs0xhp"))))
8917 (build-system python-build-system)
8918 (propagated-inputs
8919 `(("python-docutils" ,python-docutils)
8920 ("python-sphinx" ,python-sphinx)))
8921 (synopsis "Sphinx extension to include program output")
8922 (description "A Sphinx extension to literally insert the output of arbitrary
8923 commands into documents, helping you to keep your command examples up to date.")
8924 (home-page "https://github.com/lunaryorn/sphinxcontrib-programoutput")
8925 (license license:bsd-2)))
8926
8927 (define-public python2-sphinxcontrib-programoutput
8928 (package-with-python2 python-sphinxcontrib-programoutput))
8929
8930 (define-public python-sphinx-repoze-autointerface
8931 (package
8932 (name "python-sphinx-repoze-autointerface")
8933 (version "0.8")
8934 (source (origin
8935 (method url-fetch)
8936 (uri (pypi-uri "repoze.sphinx.autointerface" version))
8937 (sha256
8938 (base32
8939 "08ycivzf7bh4a1zcyp31hbyqs1b2c9r26raa3vxjwwmbfqr3iw4f"))))
8940 (build-system python-build-system)
8941 (propagated-inputs
8942 `(("python-docutils" ,python-docutils)
8943 ("python-sphinx" ,python-sphinx)
8944 ("python-zope-interface" ,python-zope-interface)))
8945 (synopsis "Auto-generate Sphinx API docs from Zope interfaces")
8946 (description "This package defines an extension for the Sphinx documentation
8947 system. The extension allows generation of API documentation by
8948 introspection of @code{zope.interface} instances in code.")
8949 (home-page "https://github.com/repoze/repoze.sphinx.autointerface")
8950 (license license:repoze)))
8951
8952 (define-public python2-sphinx-repoze-autointerface
8953 (package-with-python2 python-sphinx-repoze-autointerface))
8954
8955 (define-public python-psycopg2
8956 (package
8957 (name "python-psycopg2")
8958 (version "2.6.1")
8959 (source
8960 (origin
8961 (method url-fetch)
8962 (uri (pypi-uri "psycopg2" version))
8963 (sha256
8964 (base32
8965 "0k4hshvrwsh8yagydyxgmd0pjm29lwdxkngcq9fzfzkmpsxrmkva"))))
8966 (build-system python-build-system)
8967 (arguments
8968 ;; Tests would require a postgresql database "psycopg2_test"
8969 ;; and a running postgresql database management service.
8970 `(#:tests? #f)) ; TODO re-enable after providing a test-db.
8971 (inputs
8972 `(("postgresql" ,postgresql))) ; libpq
8973 (home-page "http://initd.org/psycopg/")
8974 (synopsis "Python PostgreSQL adapter")
8975 (description
8976 "psycopg2 is a thread-safe PostgreSQL adapter that implements DB-API 2.0. ")
8977 (license license:lgpl3+)))
8978
8979 (define-public python2-psycopg2
8980 (package-with-python2 python-psycopg2))
8981
8982 (define-public python-vobject
8983 (package
8984 (name "python-vobject")
8985 (version "0.9.2")
8986 (source (origin
8987 (method url-fetch)
8988 (uri (pypi-uri "vobject" version))
8989 (sha256
8990 (base32
8991 "1qfnwlx8qwkgr6nf5wvl6ff1r3kll53dh3z6nyp173nmlhhhqccb"))))
8992 (build-system python-build-system)
8993 (arguments
8994 '(;; The test suite relies on some non-portable Windows interfaces.
8995 #:tests? #f))
8996 (propagated-inputs
8997 `(("python-dateutil-2" ,python-dateutil-2)
8998 ("python-pyicu" ,python-pyicu)))
8999 (synopsis "Parse and generate vCard and vCalendar files")
9000 (description "Vobject is intended to be a full featured Python package for
9001 parsing and generating vCard and vCalendar files. Currently, iCalendar files
9002 are supported and well tested. vCard 3.0 files are supported, and all data
9003 should be imported, but only a few components are understood in a sophisticated
9004 way.")
9005 (home-page "http://eventable.github.io/vobject/")
9006 (license license:asl2.0)))
9007
9008 (define-public python2-vobject
9009 (package-with-python2 python-vobject))
9010
9011 (define-public python-munkres
9012 (package
9013 (name "python-munkres")
9014 (version "1.0.7")
9015 (source (origin
9016 (method url-fetch)
9017 (uri (pypi-uri "munkres" version))
9018 (sha256
9019 (base32
9020 "1i6nf45i0kkzdx6k70giybsqxz4dxsjbrkrfqgjd7znfkf25sjik"))))
9021 (build-system python-build-system)
9022 (arguments
9023 '(#:tests? #f)) ; no test suite
9024 (home-page "http://software.clapper.org/munkres/")
9025 (synopsis "Implementation of the Munkres algorithm")
9026 (description "The Munkres module provides an implementation of the Munkres
9027 algorithm (also called the Hungarian algorithm or the Kuhn-Munkres algorithm),
9028 useful for solving the Assignment Problem.")
9029 (license license:bsd-3)))
9030
9031 (define-public python2-munkres
9032 (package-with-python2 python-munkres))
9033
9034 (define-public python-flask
9035 (package
9036 (name "python-flask")
9037 (version "0.10.1")
9038 (source (origin
9039 (method url-fetch)
9040 (uri (pypi-uri "Flask" version))
9041 (sha256
9042 (base32
9043 "0wrkavjdjndknhp8ya8j850jq7a1cli4g5a93mg8nh1xz2gq50sc"))))
9044 (build-system python-build-system)
9045 (propagated-inputs
9046 `(("python-itsdangerous" ,python-itsdangerous)
9047 ("python-jinja2" ,python-jinja2)
9048 ("python-werkzeug" ,python-werkzeug)))
9049 (home-page "https://github.com/mitsuhiko/flask/")
9050 (synopsis "Microframework based on Werkzeug, Jinja2 and good intentions")
9051 (description "Flask is a micro web framework based on the Werkzeug toolkit
9052 and Jinja2 template engine. It is called a micro framework because it does not
9053 presume or force a developer to use a particular tool or library.")
9054 (license license:bsd-3)))
9055
9056 (define-public python2-flask
9057 (package-with-python2 python-flask))
9058
9059 (define-public python-cookies
9060 (package
9061 (name "python-cookies")
9062 (version "2.2.1")
9063 (source (origin
9064 (method url-fetch)
9065 (uri (pypi-uri "cookies" version))
9066 (sha256
9067 (base32
9068 "13pfndz8vbk4p2a44cfbjsypjarkrall71pgc97glk5fiiw9idnn"))))
9069 (build-system python-build-system)
9070 (arguments
9071 `(;; test are broken: https://gitlab.com/sashahart/cookies/issues/3
9072 #:tests? #f))
9073 (native-inputs
9074 `(("python-pytest" ,python2-pytest)))
9075 (synopsis "HTTP cookie parser and renderer")
9076 (description "A RFC 6265-compliant HTTP cookie parser and renderer in
9077 Python.")
9078 (home-page "https://gitlab.com/sashahart/cookies")
9079 (license license:expat)))
9080
9081 (define-public python2-cookies
9082 (package-with-python2 python-cookies))
9083
9084 (define-public python-responses
9085 (package
9086 (name "python-responses")
9087 (version "0.5.1")
9088 (source (origin
9089 (method url-fetch)
9090 (uri (pypi-uri "responses" version))
9091 (sha256
9092 (base32
9093 "1spcfxixyk9k7pk82jm6zqkwk031s95lh8q0mz7539jrb7269bcc"))))
9094 (build-system python-build-system)
9095 (arguments
9096 `(;; Test suite is not distributed:
9097 ;; https://github.com/getsentry/responses/issues/38
9098 #:tests? #f))
9099 (native-inputs
9100 `(("python-cookies" ,python-cookies)
9101 ("python-mock" ,python-mock)))
9102 (propagated-inputs
9103 `(("python-requests" ,python-requests)
9104 ("python-six" ,python-six)))
9105 (home-page "https://github.com/getsentry/responses")
9106 (synopsis "Utility for mocking out the `requests` Python library")
9107 (description "A utility library for mocking out the `requests` Python
9108 library.")
9109 (license license:asl2.0)))
9110
9111 (define-public python2-responses
9112 (package-with-python2 python-responses))
9113
9114 (define-public python-whoosh
9115 (package
9116 (name "python-whoosh")
9117 (version "2.7.4")
9118 (source
9119 (origin
9120 (method url-fetch)
9121 (uri (pypi-uri "Whoosh" version))
9122 (sha256
9123 (base32
9124 "10qsqdjpbc85fykc1vgcs8xwbgn4l2l52c8d83xf1q59pwyn79bw"))))
9125 (build-system python-build-system)
9126 (native-inputs
9127 `(("python-pytest" ,python-pytest)))
9128 (home-page "http://bitbucket.org/mchaput/whoosh")
9129 (synopsis "Full text indexing, search, and spell checking library")
9130 (description
9131 "Whoosh is a fast, pure-Python full text indexing, search, and spell
9132 checking library.")
9133 (license license:bsd-2)))
9134
9135 (define-public python2-whoosh
9136 (let ((whoosh (package-with-python2 (strip-python2-variant python-whoosh))))
9137 (package (inherit whoosh)
9138 (propagated-inputs
9139 `(("python2-backport-ssl-match-hostname"
9140 ,python2-backport-ssl-match-hostname)
9141 ,@(package-propagated-inputs whoosh))))))
9142
9143 (define-public python-pathlib
9144 (package
9145 (name "python-pathlib")
9146 (version "1.0.1")
9147 (source (origin
9148 (method url-fetch)
9149 (uri (pypi-uri "pathlib" version))
9150 (sha256
9151 (base32
9152 "17zajiw4mjbkkv6ahp3xf025qglkj0805m9s41c45zryzj6p2h39"))))
9153 (build-system python-build-system)
9154 ;; The tests depend on the internal "test" module, which does not provide
9155 ;; a stable interface.
9156 (arguments `(#:tests? #f))
9157 (home-page "https://pathlib.readthedocs.org/")
9158 (synopsis "Object-oriented file system paths")
9159 (description "Pathlib offers a set of classes to handle file system paths.
9160 It offers the following advantages over using string objects:
9161
9162 @enumerate
9163 @item No more cumbersome use of os and os.path functions. Everything can
9164 be done easily through operators, attribute accesses, and method calls.
9165 @item Embodies the semantics of different path types. For example,
9166 comparing Windows paths ignores casing.
9167 @item Well-defined semantics, eliminating any inconsistencies or
9168 ambiguities (forward vs. backward slashes, etc.).
9169 @end enumerate
9170
9171 Note: In Python 3.4, pathlib is now part of the standard library. For other
9172 Python versions please consider python-pathlib2 instead, which tracks the
9173 standard library module. This module (python-pathlib) isn't maintained
9174 anymore.")
9175 (license license:expat)))
9176
9177 (define-public python2-pathlib
9178 (package-with-python2 python-pathlib))
9179
9180 (define-public python2-pathlib2
9181 (package
9182 (name "python2-pathlib2")
9183 (version "2.1.0")
9184 (source (origin
9185 (method url-fetch)
9186 (uri (pypi-uri "pathlib2" version))
9187 (sha256
9188 (base32
9189 "0p050msg5c8d0kadv702jnfshaxrb0il765cpkgnhn6mq5hakcyy"))))
9190 (build-system python-build-system)
9191 ;; We only need the the Python 2 variant, since for Python 3 our minimum
9192 ;; version is 3.4 which already includes this package as part of the
9193 ;; standard library.
9194 (arguments
9195 `(#:python ,python-2))
9196 (native-inputs
9197 `(("python2-six" ,python2-six)))
9198 (home-page "http://pypi.python.org/pypi/pathlib2/")
9199 (synopsis "Object-oriented file system paths - backport of standard
9200 pathlib module")
9201 (description "The goal of pathlib2 is to provide a backport of standard
9202 pathlib module which tracks the standard library module, so all the newest
9203 features of the standard pathlib can be used also on older Python versions.
9204
9205 Pathlib offers a set of classes to handle file system paths. It offers the
9206 following advantages over using string objects:
9207
9208 @enumerate
9209 @item No more cumbersome use of os and os.path functions. Everything can
9210 be done easily through operators, attribute accesses, and method calls.
9211 @item Embodies the semantics of different path types. For example,
9212 comparing Windows paths ignores casing.
9213 @item Well-defined semantics, eliminating any inconsistencies or
9214 ambiguities (forward vs. backward slashes, etc.).
9215 @end enumerate")
9216 (license license:expat)))
9217
9218 (define-public python-jellyfish
9219 (package
9220 (name "python-jellyfish")
9221 (version "0.5.3")
9222 (source (origin
9223 (method url-fetch)
9224 (uri (pypi-uri "jellyfish" version))
9225 (sha256
9226 (base32
9227 "12bxh8cy9xmvyrjz7aw159nd5pyvb645rkvw4r6bvm4xbvs8gd07"))))
9228 (build-system python-build-system)
9229 (native-inputs
9230 `(("python-pytest" ,python-pytest)))
9231 (home-page "https://github.com/jamesturk/jellyfish")
9232 (synopsis "Approximate and phonetic matching of strings")
9233 (description "Jellyfish uses a variety of string comparison and phonetic
9234 encoding algorithms to do fuzzy string matching.")
9235 (license license:bsd-2)
9236 (properties `((python2-variant . ,(delay python2-jellyfish))))))
9237
9238 (define-public python2-jellyfish
9239 (let ((jellyfish (package-with-python2
9240 (strip-python2-variant python-jellyfish))))
9241 (package (inherit jellyfish)
9242 (native-inputs `(("python2-unicodecsv" ,python2-unicodecsv)
9243 ,@(package-native-inputs jellyfish))))))
9244
9245 (define-public python2-unicodecsv
9246 (package
9247 (name "python2-unicodecsv")
9248 (version "0.14.1")
9249 (source (origin
9250 (method url-fetch)
9251 ;; The test suite is not included in the PyPi release.
9252 ;; https://github.com/jdunck/python-unicodecsv/issues/19
9253 (uri (string-append "https://github.com/jdunck/python-unicodecsv/"
9254 "archive/" version ".tar.gz"))
9255 (file-name (string-append name "-" version ".tar.gz"))
9256 (sha256
9257 (base32
9258 "087nqanfcyp6mlfbbr5lva5f3w6iz1bybls9xlrb8icmc474wh4w"))))
9259 (build-system python-build-system)
9260 (arguments
9261 `(;; It supports Python 3, but Python 3 can already do Unicode CSV.
9262 #:python ,python-2))
9263 (native-inputs
9264 `(("python2-unittest2" ,python2-unittest2)))
9265 (home-page "https://github.com/jdunck/python-unicodecsv")
9266 (synopsis "Unicode CSV module for Python 2")
9267 (description "Unicodecsv is a drop-in replacement for Python 2.7's CSV
9268 module, adding support for Unicode strings.")
9269 (license license:bsd-2)))
9270
9271 (define-public python-rarfile
9272 (package
9273 (name "python-rarfile")
9274 (version "2.7")
9275 (source (origin
9276 (method url-fetch)
9277 (uri (pypi-uri "rarfile" version))
9278 (sha256
9279 (base32
9280 "0d8n1dlpiz7av8dmbp0vclrwl9cnxizr4f2c9xvj1h5nvn480527"))
9281 ;; https://github.com/markokr/rarfile/pull/17/
9282 (patches (search-patches "python-rarfile-fix-tests.patch"))))
9283 (build-system python-build-system)
9284 (arguments
9285 '(#:phases
9286 (modify-phases %standard-phases
9287 (replace 'check
9288 ;; Many tests fail, but the installation proceeds.
9289 (lambda _ (zero? (system* "make" "-C" "test" "test")))))))
9290 (native-inputs
9291 `(("which" ,which))) ; required for tests
9292 (propagated-inputs
9293 `(("libarchive" ,libarchive)))
9294 (home-page "https://github.com/markokr/rarfile")
9295 (synopsis "RAR archive reader for Python")
9296 (description "This is Python module for RAR archive reading. The interface
9297 is made as zipfile like as possible.")
9298 (license license:isc)))
9299
9300 (define-public python2-rarfile
9301 (package-with-python2 python-rarfile))
9302
9303 (define-public python-magic
9304 (package
9305 (name "python-magic")
9306 (version "0.4.3")
9307 (source
9308 (origin
9309 (method url-fetch)
9310 (uri (string-append "https://github.com/ahupp/python-magic/archive/"
9311 version ".tar.gz"))
9312 (sha256
9313 (base32
9314 "17bgy92i7sb021f2s4mw1dcvpm6p1mi9jihridwy1pyn8mzvpjgk"))
9315 (file-name (string-append name "-" version "-checkout"))))
9316 (build-system python-build-system)
9317 (arguments
9318 ;; The tests are unreliable, so don't run them. The tests fail
9319 ;; under Python3 because they were written for Python2 and
9320 ;; contain import statements that do not work in Python3. One of
9321 ;; the tests fails under Python2 because its assertions are
9322 ;; overly stringent; it relies on comparing output strings which
9323 ;; are brittle and can change depending on the version of
9324 ;; libmagic being used and the system on which the test is
9325 ;; running. In my case, under GuixSD 0.10.0, only one test
9326 ;; failed, and it seems to have failed only because the version
9327 ;; of libmagic that is packaged in Guix outputs a slightly
9328 ;; different (but not wrong) string than the one that the test
9329 ;; expected.
9330 '(#:tests? #f
9331 #:phases (modify-phases %standard-phases
9332 ;; Replace a specific method call with a hard-coded
9333 ;; path to the necessary libmagic.so file in the
9334 ;; store. If we don't do this, then the method call
9335 ;; will fail to find the libmagic.so file, which in
9336 ;; turn will cause any application using
9337 ;; python-magic to fail.
9338 (add-before 'build 'hard-code-path-to-libmagic
9339 (lambda* (#:key inputs #:allow-other-keys)
9340 (let ((file (assoc-ref inputs "file")))
9341 (substitute* "magic.py"
9342 (("ctypes.util.find_library\\('magic'\\)")
9343 (string-append "'" file "/lib/libmagic.so'")))
9344 #t)))
9345 (add-before 'install 'disable-egg-compression
9346 (lambda _
9347 (let ((port (open-file "setup.cfg" "a")))
9348 (display "\n[easy_install]\nzip_ok = 0\n"
9349 port)
9350 (close-port port)
9351 #t))))))
9352 (inputs
9353 ;; python-magic needs to be able to find libmagic.so.
9354 `(("file" ,file)))
9355 (home-page "https://github.com/ahupp/python-magic")
9356 (synopsis "File type identification using libmagic")
9357 (description
9358 "This module uses ctypes to access the libmagic file type
9359 identification library. It makes use of the local magic database and
9360 supports both textual and MIME-type output. Note that this module and
9361 the python-file module both provide a \"magic.py\" file; these two
9362 modules, which are different and were developed separately, both serve
9363 the same purpose: to provide Python bindings for libmagic.")
9364 (license license:expat)))
9365
9366 (define-public python2-magic
9367 (package-with-python2 python-magic))
9368
9369 (define-public python2-s3cmd
9370 (package
9371 (name "python2-s3cmd")
9372 (version "1.6.1")
9373 (source
9374 (origin
9375 (method url-fetch)
9376 (uri (string-append "mirror://sourceforge/s3tools/s3cmd/" version "/"
9377 "s3cmd-" version ".tar.gz"))
9378 (sha256
9379 (base32
9380 "0ki1rzhm5icvi9ry5jswi4b22yqwyj0d2wsqsgilwx6qhi7pjxa6"))))
9381 (build-system python-build-system)
9382 (arguments
9383 ;; s3cmd is written for python2 only and contains no tests.
9384 `(#:python ,python-2
9385 #:tests? #f))
9386 (propagated-inputs
9387 `(("python2-dateutil" ,python2-dateutil)
9388 ;; The python-file package also provides a magic.py module.
9389 ;; This is an unfortunate state of affairs; however, s3cmd
9390 ;; fails to install if it cannot find specifically the
9391 ;; python-magic package. Thus we include it, instead of using
9392 ;; python-file. Ironically, s3cmd sometimes works better
9393 ;; without libmagic bindings at all:
9394 ;; https://github.com/s3tools/s3cmd/issues/198
9395 ("python2-magic" ,python2-magic)))
9396 (home-page "http://s3tools.org/s3cmd")
9397 (synopsis "Command line tool for S3-compatible storage services")
9398 (description
9399 "S3cmd is a command line tool for uploading, retrieving and managing data
9400 in storage services that are compatible with the Amazon Simple Storage
9401 Service (S3) protocol, including S3 itself. It supports rsync-like backup,
9402 GnuPG encryption, and more. It also supports management of Amazon's
9403 CloudFront content delivery network.")
9404 (license license:gpl2+)))
9405
9406 (define-public python-pkgconfig
9407 (package
9408 (name "python-pkgconfig")
9409 (version "1.1.0")
9410 (source
9411 (origin
9412 (method url-fetch)
9413 (uri (pypi-uri "pkgconfig" version))
9414 (sha256
9415 (base32
9416 "1pw0kmvc57sjmaxi6c54fqsnihqj6hvhc9y1vaz36axafzqam7bh"))))
9417 (build-system python-build-system)
9418 (native-inputs
9419 `(("python-nose" ,python-nose)))
9420 (inputs
9421 `(("pkg-config" ,pkg-config)))
9422 (arguments
9423 `(;; Tests fail with "ValueError: _type_ 'v' not supported" on Python 3,
9424 ;; and on Python 2 they need the dl module deprecated since Python 2.6.
9425 #:tests? #f
9426 ;; Hard-code the path to pkg-config.
9427 #:phases
9428 (modify-phases %standard-phases
9429 (add-before
9430 'build 'patch
9431 (lambda _
9432 (substitute* "pkgconfig/pkgconfig.py"
9433 (("cmd = 'pkg-config")
9434 (string-append "cmd = '" (which "pkg-config"))))
9435 #t)))))
9436 (home-page "http://github.com/matze/pkgconfig")
9437 (synopsis "Python interface for pkg-config")
9438 (description "This module provides a Python interface to pkg-config. It
9439 can be used to find all pkg-config packages, check if a package exists,
9440 check if a package meets certain version requirements, query CFLAGS and
9441 LDFLAGS and parse the output to build extensions with setup.py.")
9442 (license license:expat)))
9443
9444 (define-public python2-pkgconfig
9445 (package-with-python2 python-pkgconfig))
9446
9447 (define-public python-bz2file
9448 (package
9449 (name "python-bz2file")
9450 (version "0.98")
9451 (source
9452 (origin
9453 (method url-fetch)
9454 (uri (pypi-uri "bz2file" version))
9455 (sha256
9456 (base32
9457 "126s53fkpx04f33a829yqqk8fj4png3qwg4m66cvlmhmwc8zihb4"))))
9458 (build-system python-build-system)
9459 (arguments
9460 `(#:tests? #f)) ; Tests use deprecated python modules.
9461 (home-page "https://github.com/nvawda/bz2file")
9462 (synopsis "Read and write bzip2-compressed files")
9463 (description
9464 "Bz2file is a Python library for reading and writing bzip2-compressed
9465 files. It contains a drop-in replacement for the I/O interface in the
9466 standard library's @code{bz2} module, including features from the latest
9467 development version of CPython that are not available in older releases.")
9468 (license license:asl2.0)
9469 (properties `((python2-variant . ,(delay python2-bz2file))))))
9470
9471 (define-public python2-bz2file
9472 (let ((base (package-with-python2
9473 (strip-python2-variant python-bz2file))))
9474 (package
9475 (inherit base)
9476 (arguments
9477 `(#:python ,python-2
9478 #:phases
9479 (modify-phases %standard-phases
9480 ;; 'python setup.py test' does not work as of 0.98.
9481 ;; There is only the one test file, so we run it directly.
9482 (replace 'check
9483 (lambda _ (zero? (system* "python"
9484 "test_bz2file.py"))))))))))
9485
9486 (define-public python-future
9487 (package
9488 (name "python-future")
9489 (version "0.15.2")
9490 (source
9491 (origin
9492 (method url-fetch)
9493 (uri (pypi-uri "future" version))
9494 (sha256
9495 (base32
9496 "15wvcfzssc68xqnqi1dq4fhd0848hwi9jn42hxyvlqna40zijfrx"))))
9497 (build-system python-build-system)
9498 ;; Many tests connect to the network or are otherwise flawed.
9499 ;; https://github.com/PythonCharmers/python-future/issues/210
9500 (arguments
9501 `(#:tests? #f))
9502 (home-page "http://python-future.org")
9503 (synopsis "Single-source support for Python 3 and 2")
9504 (description
9505 "@code{python-future} is the missing compatibility layer between Python 2 and
9506 Python 3. It allows you to use a single, clean Python 3.x-compatible codebase
9507 to support both Python 2 and Python 3 with minimal overhead.")
9508 (license license:expat)))
9509
9510 (define-public python2-future
9511 (package-with-python2 python-future))
9512
9513 (define-public python-cysignals
9514 (package
9515 (name "python-cysignals")
9516 (version "1.1.0")
9517 (source
9518 (origin
9519 (method url-fetch)
9520 (uri (pypi-uri "cysignals" version ".tar.bz2"))
9521 (sha256
9522 (base32
9523 "14cbyd9znlz6cxy1s3g6v6dv5jj45hn27pywkidd9b1zanaysqc6"))))
9524 (build-system python-build-system)
9525 (native-inputs
9526 `(("python-cython" ,python-cython)
9527 ("python-sphinx" ,python-sphinx)))
9528 (inputs
9529 `(("pari-gp" ,pari-gp)))
9530 (arguments
9531 `(#:modules ((guix build python-build-system)
9532 ((guix build gnu-build-system) #:prefix gnu:)
9533 (guix build utils))
9534 ;; FIXME: Tests are executed after installation and currently fail
9535 ;; when not installing into standard locations; the author is working
9536 ;; on a fix.
9537 #:tests? #f
9538 #:phases
9539 (modify-phases %standard-phases
9540 (add-before
9541 'build 'configure
9542 (assoc-ref gnu:%standard-phases 'configure)))))
9543 (home-page
9544 "https://github.com/sagemath/cysignals")
9545 (synopsis
9546 "Handling of interrupts and signals for Cython")
9547 (description
9548 "The cysignals package provides mechanisms to handle interrupts (and
9549 other signals and errors) in Cython code, using two related approaches,
9550 for mixed Cython/Python code or external C libraries and pure Cython code,
9551 respectively.")
9552 (license license:lgpl3+)))
9553
9554 (define-public python2-cysignals
9555 (package-with-python2 python-cysignals))
9556
9557 (define-public python2-shedskin
9558 (package
9559 (name "python2-shedskin")
9560 (version "0.9.4")
9561 (source
9562 (origin
9563 (method url-fetch)
9564 (uri (string-append "https://github.com/shedskin/shedskin/"
9565 "releases/download/v" version
9566 "/shedskin-" version ".tgz"))
9567 (sha256
9568 (base32
9569 "0nzwrzgw1ga8rw6f0ryq7zr9kkiavd1cqz5hzxkcbicl1dk7kz41"))))
9570 (build-system python-build-system)
9571 (arguments
9572 `(#:python ,python-2
9573 #:phases (modify-phases %standard-phases
9574 (add-after 'unpack 'fix-resulting-include-libs
9575 (lambda* (#:key inputs #:allow-other-keys)
9576 (let ((libgc (assoc-ref inputs "libgc"))
9577 (pcre (assoc-ref inputs "pcre")))
9578 (substitute* "shedskin/makefile.py"
9579 (("variable == 'CCFLAGS':[ ]*")
9580 (string-append "variable == 'CCFLAGS':\n"
9581 " line += ' -I " pcre "/include"
9582 " -I " libgc "/include'"))
9583 (("variable == 'LFLAGS':[ ]*")
9584 (string-append "variable == 'LFLAGS':\n"
9585 " line += ' -L" pcre "/lib"
9586 " -L " libgc "/lib'")))
9587 #t))))))
9588 (inputs `(("pcre" ,pcre)
9589 ("libgc" ,libgc)))
9590 (home-page "https://shedskin.github.io/")
9591 (synopsis "Experimental Python-2 to C++ Compiler")
9592 (description (string-append "This is an experimental compiler for a subset of
9593 Python. It generates C++ code and a Makefile."))
9594 (license (list license:gpl3 license:bsd-3 license:expat))))
9595
9596 (define-public python2-rope
9597 (package
9598 (name "python2-rope")
9599 (version "0.10.3")
9600 (source
9601 (origin
9602 (method url-fetch)
9603 (uri (pypi-uri "rope" version))
9604 (sha256
9605 (base32
9606 "18k5znhpwvrfck3yp0jmhd5j8r0f0s8bk1zh5yhs2cfgmfhbwigb"))))
9607 (arguments
9608 ;; Rope is currently python-2 only.
9609 ;; https://github.com/python-rope/rope/issues/57
9610 `(#:python ,python-2))
9611 (build-system python-build-system)
9612 (native-inputs
9613 `(("python2-unittest2" ,python2-unittest2)))
9614 (home-page "https://github.com/python-rope/rope")
9615 (synopsis "Refactoring library for Python")
9616 (description "Rope is a refactoring library for Python. It facilitates
9617 the renaming, moving and extracting of attributes, functions, modules, fields
9618 and parameters in Python 2 source code. These refactorings can also be applied
9619 to occurences in strings and comments.")
9620 (license license:gpl2)))
9621
9622 (define-public python-py3status
9623 (package
9624 (name "python-py3status")
9625 (version "3.1")
9626 (source
9627 (origin
9628 (method url-fetch)
9629 (uri (pypi-uri "py3status" version))
9630 (sha256
9631 (base32
9632 "0i283z1pivmir61z8kbiycigc94l61v33ygzkhczf1ifq7cppyds"))))
9633 (build-system python-build-system)
9634 (home-page "https://github.com/ultrabug/py3status")
9635 (synopsis "Extensible i3status wrapper written in Python")
9636 (description "py3status is an i3status wrapper which extends i3status
9637 functionality in a modular way, allowing you to extend your panel with your
9638 own code, responding to click events and updating clock every second.")
9639 (license license:bsd-3)))
9640
9641 (define-public python-tblib
9642 (package
9643 (name "python-tblib")
9644 (version "1.3.0")
9645 (source (origin
9646 (method url-fetch)
9647 (uri (pypi-uri "tblib" version))
9648 (sha256 (base32
9649 "02iahfkfa927hb4jq2bak36ldihwapzacfiq5lyxg8llwn98a1yi"))))
9650 (build-system python-build-system)
9651 (arguments
9652 `(#:phases
9653 (modify-phases %standard-phases
9654 (replace 'check
9655 (lambda _
9656 ;; Upstream runs tests after installation and the package itself
9657 ;; resides in a subdirectory. Extend PYTHONPATH so it will be
9658 ;; found.
9659 (setenv "PYTHONPATH"
9660 (string-append (getcwd) "/build/lib:"
9661 (getenv "PYTHONPATH")))
9662 (zero? (system* "py.test" "-vv" "tests" "README.rst")))))))
9663 (native-inputs
9664 `(("python-pytest" ,python-pytest)
9665 ("python-six" ,python-six)))
9666 (home-page "https://github.com/ionelmc/python-tblib")
9667 (synopsis "Traceback serialization library")
9668 (description
9669 "Traceback serialization allows you to:
9670
9671 @enumerate
9672 @item Pickle tracebacks and raise exceptions with pickled tracebacks in
9673 different processes. This allows better error handling when running code over
9674 multiple processes (imagine multiprocessing, billiard, futures, celery etc).
9675
9676 @item Parse traceback strings and raise with the parsed tracebacks.
9677 @end itemize")
9678 (license license:bsd-3)))
9679
9680 (define-public python2-tblib
9681 (package-with-python2 python-tblib))
9682
9683 (define-public python-sqlparse
9684 (package
9685 (name "python-sqlparse")
9686 (version "0.1.19")
9687 (source (origin
9688 (method url-fetch)
9689 (uri (pypi-uri "sqlparse" version))
9690 (sha256
9691 (base32
9692 "1s2fvaxgh9kqzrd6iwy5h7i61ckn05plx9np13zby93z3hdbx5nq"))))
9693 (build-system python-build-system)
9694 (arguments
9695 `(#:phases
9696 (modify-phases %standard-phases
9697 (replace 'check
9698 (lambda* _
9699 ;; setup.py-integrated 2to3 only affects the build files, but
9700 ;; py.test is using the source files. So we need to convert them
9701 ;; manually.
9702 (when (zero? (system* "python3"))
9703 (system* "2to3" "--no-diff" "-wn" "sqlparse" "tests"))
9704 (zero? (system* "py.test")))))))
9705 (native-inputs
9706 `(("python-pytest" ,python-pytest)))
9707 (home-page "https://github.com/andialbrecht/sqlparse")
9708 (synopsis "Non-validating SQL parser")
9709 (description "Sqlparse is a non-validating SQL parser for Python. It
9710 provides support for parsing, splitting and formatting SQL statements.")
9711 (license license:bsd-3)))
9712
9713 (define-public python2-sqlparse
9714 (package-with-python2 python-sqlparse))
9715
9716 (define-public python-greenlet
9717 (package
9718 (name "python-greenlet")
9719 (version "0.4.9")
9720 (source (origin
9721 (method url-fetch)
9722 (uri (pypi-uri "greenlet" version))
9723 (sha256
9724 (base32
9725 "04h0m54dyqg49vyarq26mry6kbivnpl47rnmmrk9qn8wpfxviybr"))))
9726 (build-system python-build-system)
9727 (home-page "https://greenlet.readthedocs.io/")
9728 (synopsis "Lightweight in-process concurrent programming")
9729 (description
9730 "Greenlet package is a spin-off of Stackless, a version of CPython
9731 that supports micro-threads called \"tasklets\". Tasklets run
9732 pseudo-concurrently (typically in a single or a few OS-level threads) and
9733 are synchronized with data exchanges on \"channels\".")
9734 (license (list license:psfl license:expat))))
9735
9736 (define-public python2-greenlet
9737 (package-with-python2 python-greenlet))
9738
9739 (define-public python-gevent
9740 (package
9741 (name "python-gevent")
9742 (version "1.1.1")
9743 (source (origin
9744 (method url-fetch)
9745 (uri (pypi-uri "gevent" version))
9746 (sha256
9747 (base32
9748 "1smf3kvidpdiyi2c81alal74p2zm0clrm6xbyy6y1k9a3f2vkrbf"))
9749 (modules '((guix build utils)))
9750 (snippet
9751 '(begin
9752 ;; unbunding libev and c-ares
9753 (for-each delete-file-recursively '("libev" "c-ares"))
9754 ;; fixing testsuite
9755 (call-with-output-file "greentest/__init__.py" noop)
9756 (substitute* "greentest/testrunner.py"
9757 (("import util") "from . import util")
9758 (("from util import log") "from .util import log"))))))
9759 (build-system python-build-system)
9760 (propagated-inputs
9761 `(("python-greenlet" ,python-greenlet)))
9762 (native-inputs
9763 `(("python-six" ,python-six)))
9764 (inputs
9765 `(("c-ares" ,c-ares)
9766 ("libev" ,libev)))
9767 (home-page "http://www.gevent.org/")
9768 (synopsis "Coroutine-based network library")
9769 (description
9770 "gevent is a coroutine-based Python networking library that uses greenlet
9771 to provide a high-level synchronous API on top of the libev event loop.")
9772 (license license:expat)))
9773
9774 (define-public python2-gevent
9775 (package-with-python2 python-gevent))
9776
9777 (define-public python-twisted
9778 (package
9779 (name "python-twisted")
9780 (version "16.2.0")
9781 (source (origin
9782 (method url-fetch)
9783 (uri (pypi-uri "Twisted" version ".tar.bz2"))
9784 (sha256
9785 (base32
9786 "0ydxrp9myw1mvsz3qfzx5579y5llmqa82pxvqchgp5syczffi450"))))
9787 (build-system python-build-system)
9788 (propagated-inputs
9789 `(("python-zope-interface" ,python-zope-interface)))
9790 (home-page "https://twistedmatrix.com/")
9791 (synopsis "Asynchronous networking framework written in Python")
9792 (description
9793 "Twisted is an extensible framework for Python programming, with special
9794 focus on event-based network programming and multiprotocol integration.")
9795 (license license:expat)))
9796
9797 (define-public python2-twisted
9798 (package-with-python2 python-twisted))
9799
9800 (define-public python-pika
9801 (package
9802 (name "python-pika")
9803 (version "0.10.0")
9804 (source
9805 (origin
9806 (method url-fetch)
9807 (uri (pypi-uri "pika" version))
9808 (sha256
9809 (base32
9810 "0nb4h08di432lv7dy2v9kpwgk0w92f24sqc2hw2s9vwr5b8v8xvj"))))
9811 (build-system python-build-system)
9812 (native-inputs
9813 `(("python-pyev" ,python-pyev)
9814 ("python-tornado" ,python-tornado)
9815 ("python-twisted" ,python-twisted)))
9816 (home-page "https://pika.readthedocs.org")
9817 (synopsis "Pure Python AMQP Client Library")
9818 (description
9819 "Pika is a pure-Python implementation of the AMQP (Advanced Message Queuing
9820 Protocol) 0-9-1 protocol that tries to stay fairly independent of the underlying
9821 network support library.")
9822 (license license:bsd-3)))
9823
9824 (define-public python2-pika
9825 (package-with-python2 python-pika))
9826
9827 (define-public python-ply
9828 (package
9829 (name "python-ply")
9830 (version "3.8")
9831 (source
9832 (origin
9833 (method url-fetch)
9834 (uri (string-append
9835 "https://pypi.python.org/packages/"
9836 "96/e0/430fcdb6b3ef1ae534d231397bee7e9304be14a47a267e82ebcb3323d0b5"
9837 "/ply-" version ".tar.gz"))
9838 (sha256
9839 (base32
9840 "1f70ipynmiy09k6px2j7v4w5cdrc21za3xs2k6f1bsvb0bzvvlg7"))))
9841 (build-system python-build-system)
9842 (home-page "http://www.dabeaz.com/ply/")
9843 (synopsis "Python Lex & Yacc")
9844 (description "PLY is a @code{lex}/@code{yacc} implemented purely in Python.
9845 It uses LR parsing and does extensive error checking.")
9846 (license license:bsd-3)))
9847
9848 (define-public python2-ply
9849 (package-with-python2 python-ply))
9850
9851 (define-public python-tabulate
9852 (package
9853 (name "python-tabulate")
9854 (version "0.7.5")
9855 (source (origin
9856 (method url-fetch)
9857 (uri (pypi-uri "tabulate" version))
9858 (sha256
9859 (base32
9860 "03l1r7ddd1a0j2snv1yd0hlnghjad3fg1an1jr8936ksv75slwch"))
9861 ;; Fix tests
9862 (modules '((guix build utils)))
9863 (snippet '(substitute* '("test/test_cli.py"
9864 "test/test_input.py"
9865 "test/test_output.py"
9866 "test/test_regression.py")
9867 (("from common") "from nose.tools")))))
9868 (build-system python-build-system)
9869 (native-inputs
9870 `(;; For testing
9871 ("python-nose" ,python-nose)))
9872 (home-page "https://bitbucket.org/astanin/python-tabulate")
9873 (synopsis "Pretty-print tabular data")
9874 (description
9875 "Tabulate is a library and command-line utility to pretty-print tabular
9876 data in Python.")
9877 (license license:expat)))
9878
9879 (define-public python2-tabulate
9880 (package-with-python2 python-tabulate))
9881
9882 (define-public python-kazoo
9883 (package
9884 (name "python-kazoo")
9885 (version "2.2.1")
9886 (source
9887 (origin
9888 (method url-fetch)
9889 (uri (pypi-uri "kazoo" version))
9890 (sha256
9891 (base32
9892 "10pb864if9qi2pq9lfb9m8f7z7ss6rml80gf1d9h64lap5crjnjj"))))
9893 (build-system python-build-system)
9894 (arguments '(#:tests? #f)) ; XXX: needs zookeeper
9895 (propagated-inputs
9896 `(("python-six" ,python-six)))
9897 (home-page "https://kazoo.readthedocs.org")
9898 (synopsis "High-level Zookeeper client library")
9899 (description
9900 "Kazoo is a Python client library for the Apache Zookeeper distributed
9901 application service. It is designed to be easy to use and to avoid common
9902 programming errors.")
9903 (license license:asl2.0)))
9904
9905 (define-public python2-kazoo
9906 (package-with-python2 python-kazoo))
9907
9908 (define-public python-pykafka
9909 (package
9910 (name "python-pykafka")
9911 (version "2.4.0")
9912 (source (origin
9913 (method url-fetch)
9914 (uri (string-append
9915 "https://pypi.python.org/packages/8b/3e/"
9916 "384eeff406b06315738b62483fd2126c6e4f544167116b17cc04ea7d2a59/"
9917 "pykafka-" version ".tar.gz"))
9918 (sha256
9919 (base32
9920 "1id6sr159p6aa13bxcqyr9gln8sqg1l0ddzns5iws8kk5q1p5cfv"))))
9921 (build-system python-build-system)
9922 (arguments '(#:tests? #f)) ; XXX: needs zookeeper, kafka, etc.
9923 (propagated-inputs
9924 `(("python-gevent" ,python-gevent)
9925 ("python-kazoo" ,python-kazoo)
9926 ("python-tabulate" ,python-tabulate)))
9927 (inputs
9928 `(("librdkafka" ,librdkafka)))
9929 (home-page "https://pykafka.readthedocs.io/")
9930 (synopsis "Apache Kafka client for Python")
9931 (description
9932 "PyKafka is a client for the Apache Kafka distributed messaging system.
9933 It includes Python implementations of Kafka producers and consumers, which
9934 are optionally backed by a C extension built on librdkafka.")
9935 (license license:asl2.0)))
9936
9937 (define-public python2-pykafka
9938 (package-with-python2 python-pykafka))
9939
9940 (define-public python-wcwidth
9941 (package
9942 (name "python-wcwidth")
9943 (version "0.1.6")
9944 (source
9945 (origin
9946 (method url-fetch)
9947 (uri (string-append
9948 "https://pypi.python.org/packages/"
9949 "c2/d1/7689293086a8d5320025080cde0e3155b94ae0a7496fb89a3fbaa92c354a/"
9950 "wcwidth-" version ".tar.gz"))
9951 (sha256
9952 (base32
9953 "02wjrpf001gjdjsaxxbzcwfg19crlk2dbddayrfc2v06f53yrcyw"))))
9954 (build-system python-build-system)
9955 (home-page "https://github.com/jquast/wcwidth")
9956 (synopsis "Measure number of terminal column cells of wide-character codes")
9957 (description "Wcwidth measures the number of terminal column cells of
9958 wide-character codes. It is useful for those implementing a terminal emulator,
9959 or programs that carefully produce output to be interpreted by one. It is a
9960 Python implementation of the @code{wcwidth} and @code{wcswidth} C functions
9961 specified in POSIX.1-2001 and POSIX.1-2008.")
9962 (license license:expat)))
9963
9964 (define-public python2-wcwidth
9965 (package-with-python2 python-wcwidth))
9966
9967 (define-public python2-jsonrpclib
9968 (package
9969 (name "python2-jsonrpclib")
9970 (version "0.1.7")
9971 (source (origin
9972 (method url-fetch)
9973 (uri (string-append
9974 "https://pypi.python.org/packages/source/j/jsonrpclib/"
9975 "jsonrpclib-" version ".tar.gz"))
9976 (sha256
9977 (base32
9978 "02vgirw2bcgvpcxhv5hf3yvvb4h5wzd1lpjx8na5psdmaffj6l3z"))))
9979 (build-system python-build-system)
9980 (arguments
9981 `(#:tests? #f
9982 #:python ,python-2))
9983 (home-page "https://github.com/joshmarshall/jsonrpclib/")
9984 (synopsis "Implementation of JSON-RPC specification for Python")
9985 (description
9986 "This library is an implementation of the JSON-RPC specification.
9987 It supports both the original 1.0 specification, as well as the
9988 new (proposed) 2.0 spec, which includes batch submission, keyword arguments,
9989 etc.")
9990 (license license:asl2.0)))
9991
9992 (define-public python-chai
9993 (package
9994 (name "python-chai")
9995 (version "1.1.1")
9996 (source (origin
9997 (method url-fetch)
9998 (uri (pypi-uri "chai" version))
9999 (sha256
10000 (base32
10001 "016kf3irrclpkpvcm7q0gmkfibq7jgy30a9v73pp42bq9h9a32bl"))))
10002 (build-system python-build-system)
10003 (home-page "https://github.com/agoragames/chai")
10004 (synopsis "Mocking framework for Python")
10005 (description
10006 "Chai provides an api for mocking, stubbing and spying your python
10007 objects, patterned after the Mocha library for Ruby.")
10008 (license license:bsd-3)))
10009
10010 (define-public python2-chai
10011 (package-with-python2 python-chai))
10012
10013 (define-public python-arrow
10014 (package
10015 (name "python-arrow")
10016 (version "0.8.0")
10017 (source (origin
10018 (method url-fetch)
10019 (uri (pypi-uri "arrow" version))
10020 (sha256
10021 (base32
10022 "1bz7hkdgpqcjs866y58z8jywpy7al0f4rxdr00bh2l5qddyw245j"))))
10023 (build-system python-build-system)
10024 (native-inputs
10025 `(;; For testing
10026 ("python-chai" ,python-chai)
10027 ("python-simplejson" ,python-simplejson)))
10028 (propagated-inputs
10029 `(("python-dateutil" ,python-dateutil-2)))
10030 (home-page "https://github.com/crsmithdev/arrow/")
10031 (synopsis "Dates and times for Python")
10032 (description
10033 "Arrow is a Python library to creating, manipulating, formatting and
10034 converting dates, times, and timestamps. It implements and updates the
10035 datetime type.")
10036 (license license:asl2.0)))
10037
10038 (define-public python2-arrow
10039 (package-with-python2 python-arrow))
10040
10041 (define-public python-inflection
10042 (package
10043 (name "python-inflection")
10044 (version "0.3.1")
10045 (source
10046 (origin (method url-fetch)
10047 (uri (pypi-uri "inflection" version))
10048 (sha256
10049 (base32
10050 "1jhnxgnw8y3mbzjssixh6qkc7a3afc4fygajhqrqalnilyvpzshq"))))
10051 (build-system python-build-system)
10052 (home-page "http://github.com/jpvanhal/inflection")
10053 (synopsis "Python string transformation library")
10054 (description
10055 "Inflection is a string transformation library. It singularizes
10056 and pluralizes English words, and transforms strings from CamelCase to
10057 underscored string.")
10058 (license license:expat)))
10059
10060 (define-public python2-inflection
10061 (package-with-python2 python-inflection))
10062
10063 (define-public python-pylev
10064 (package
10065 (name "python-pylev")
10066 (version "1.3.0")
10067 (source (origin
10068 (method url-fetch)
10069 (uri (pypi-uri "pylev" version))
10070 (sha256
10071 (base32
10072 "1hz1x9blsbxya1y9nnhnwwdnqmakxi9mc0jkwj0rn6b1h44i0f86"))))
10073 (build-system python-build-system)
10074 (home-page "http://github.com/toastdriven/pylev")
10075 (synopsis "Levenshtein distance implementation in Python")
10076 (description "Pure Python Levenshtein implementation, based off the
10077 Wikipedia code samples at
10078 @url{http://en.wikipedia.org/wiki/Levenshtein_distance}.")
10079 (license license:bsd-3)))
10080
10081 (define-public python2-pylev
10082 (package-with-python2 python-pylev))
10083
10084 (define-public python-cleo
10085 (package
10086 (name "python-cleo")
10087 (version "0.4.1")
10088 (source (origin
10089 (method url-fetch)
10090 (uri (pypi-uri "cleo" version))
10091 (sha256
10092 (base32
10093 "1k2dcl6mqpn5bljyl6w42rqyd9mb3y9kh2mg7m2x3kfjwvg0rpva"))))
10094 (build-system python-build-system)
10095 (native-inputs
10096 `(;; For testing
10097 ("python-mock" ,python-mock)
10098 ("python-pytest" ,python-pytest)))
10099 (propagated-inputs
10100 `(("python-psutil" ,python-psutil)
10101 ("python-pylev" ,python-pylev)))
10102 (home-page "https://github.com/sdispater/cleo")
10103 (synopsis "Command-line arguments library for Python")
10104 (description
10105 "Cleo allows you to create command-line commands with signature in
10106 docstring and colored output.")
10107 (license license:expat)))
10108
10109 (define-public python2-cleo
10110 (package-with-python2 python-cleo))
10111
10112 (define-public python-lazy-object-proxy
10113 (package
10114 (name "python-lazy-object-proxy")
10115 (version "1.2.2")
10116 (source (origin
10117 (method url-fetch)
10118 (uri (pypi-uri "lazy-object-proxy" version))
10119 (sha256
10120 (base32
10121 "0s22aqqkdscyh8sjspyyax7qa1aiz8p4midrnyf39717fhfczm6x"))))
10122 (build-system python-build-system)
10123 (home-page "https://github.com/ionelmc/python-lazy-object-proxy")
10124 (synopsis "Lazy object proxy for python")
10125 (description
10126 "Lazy object proxy is an object that wraps a callable but defers the call
10127 until the object is actually required, and caches the result of said call.")
10128 (license license:bsd-2)))
10129
10130 (define-public python2-lazy-object-proxy
10131 (package-with-python2 python-lazy-object-proxy))
10132
10133 (define-public python-dnspython
10134 (package
10135 (name "python-dnspython")
10136 (version "1.15.0")
10137 (source (origin
10138 (method url-fetch)
10139 (uri (string-append "http://www.dnspython.org/kits/"
10140 version "/dnspython-" version ".tar.gz"))
10141 (sha256
10142 (base32
10143 "0jr4v2pd90i6l1xxbss2m05psbjaxvyvvvpq44wycijpfgjqln8i"))))
10144 (build-system python-build-system)
10145 (arguments '(#:tests? #f)) ; XXX: requires internet access
10146 (home-page "http://www.dnspython.org")
10147 (synopsis "DNS toolkit for Python")
10148 (description
10149 "dnspython is a DNS toolkit for Python. It supports almost all record
10150 types. It can be used for queries, zone transfers, and dynamic updates.
10151 It supports TSIG authenticated messages and EDNS0.")
10152 (license license:expat)))
10153
10154 (define-public python2-dnspython
10155 (package-with-python2 python-dnspython))
10156
10157 (define-public python-email-validator
10158 (package
10159 (name "python-email-validator")
10160 (version "1.0.1")
10161 (source
10162 (origin (method url-fetch)
10163 (uri (pypi-uri "email_validator" version))
10164 (sha256
10165 (base32
10166 "0mn8jg5h8ifl8w6a6m0hq8kbk0mzw9vm054qfamkn89b3npz52qw"))))
10167 (build-system python-build-system)
10168 (arguments
10169 '(#:phases
10170 (modify-phases %standard-phases
10171 (add-before 'build 'use-dnspython
10172 (lambda _
10173 (substitute* "setup.py"
10174 (("dnspython3") "dnspython"))
10175 #t)))))
10176 (propagated-inputs
10177 `(("python-dnspython" ,python-dnspython)
10178 ("python-idna" ,python-idna)))
10179 (home-page "https://github.com/JoshData/python-email-validator")
10180 (synopsis "Email address validation library for Python")
10181 (description
10182 "This library validates email address syntax and deliverability.")
10183 (license license:cc0)))
10184
10185 (define-public python2-email-validator
10186 (package-with-python2 python-email-validator))
10187
10188 (define-public python-ukpostcodeparser
10189 (package
10190 (name "python-ukpostcodeparser")
10191 (version "1.0.3")
10192 (source (origin
10193 (method url-fetch)
10194 (uri (pypi-uri "UkPostcodeParser" version))
10195 (sha256
10196 (base32
10197 "1jwg9z4rz51mcka1821rwgycsd0mcicyp1kiwjfa2kvg8bm9p2qd"))))
10198 (build-system python-build-system)
10199 (home-page "https://github.com/hamstah/ukpostcodeparser")
10200 (synopsis "UK Postcode parser for Python")
10201 (description
10202 "This library provides the @code{parse_uk_postcode} function for
10203 parsing UK postcodes.")
10204 (license license:expat)))
10205
10206 (define-public python2-ukpostcodeparser
10207 (package-with-python2 python-ukpostcodeparser))
10208
10209 (define-public python-fake-factory
10210 (package
10211 (name "python-fake-factory")
10212 (version "0.7.2")
10213 (source (origin
10214 (method url-fetch)
10215 (uri (pypi-uri "fake-factory" version))
10216 (sha256
10217 (base32
10218 "0vs0dkmg0dlaxf8w6q2i3k0i03gmp56ablldv7ci9x3nbadkn71g"))))
10219 (build-system python-build-system)
10220 (native-inputs
10221 `(;; For testing
10222 ("python-email-validator" ,python-email-validator)
10223 ("python-mock" ,python-mock)
10224 ("python-ukpostcodeparser" ,python-ukpostcodeparser)))
10225 (propagated-inputs
10226 `(("python-dateutil" ,python-dateutil-2)
10227 ("python-six" ,python-six)))
10228 (home-page "https://github.com/joke2k/faker")
10229 (synopsis "Python package that generates fake data")
10230 (description
10231 "Faker is a Python package that generates fake data such as names,
10232 addresses, and phone numbers.")
10233 (license license:expat)
10234 (properties `((python2-variant . ,(delay python2-fake-factory))))))
10235
10236 (define-public python2-fake-factory
10237 (let ((base (package-with-python2 (strip-python2-variant
10238 python-fake-factory))))
10239 (package
10240 (inherit base)
10241 (propagated-inputs
10242 `(("python2-ipaddress" ,python2-ipaddress)
10243 ,@(package-propagated-inputs base))))))
10244
10245 (define-public python-pyaml
10246 (package
10247 (name "python-pyaml")
10248 (version "15.8.2")
10249 (source (origin
10250 (method url-fetch)
10251 (uri (pypi-uri "pyaml" version))
10252 (sha256
10253 (base32
10254 "1f5m28vkh4ksq3d80d8mmd2z8wxvc3mgy2pmrv2751dm2xgznm4w"))))
10255 (build-system python-build-system)
10256 (propagated-inputs
10257 `(("python-pyyaml" ,python-pyyaml)))
10258 (home-page "https://github.com/mk-fg/pretty-yaml")
10259 (synopsis "YAML pretty-print library for Python")
10260 (description
10261 "pyaml is a PyYAML based python module to produce pretty and readable
10262 YAML-serialized data.")
10263 (license (license:non-copyleft "http://www.wtfpl.net/txt/copying/"))))
10264
10265 (define-public python2-pyaml
10266 (package-with-python2 python-pyaml))
10267
10268 (define-public python-flexmock
10269 (package
10270 (name "python-flexmock")
10271 (version "0.10.2")
10272 (source (origin
10273 (method url-fetch)
10274 (uri (pypi-uri "flexmock" version))
10275 (sha256
10276 (base32
10277 "0arc6njvs6i9v9hgvzk5m50296g7zy5m9d7pyb43vdsdgxrci5gy"))))
10278 (build-system python-build-system)
10279 (home-page "https://flexmock.readthedocs.org")
10280 (synopsis "Testing library for Python")
10281 (description
10282 "flexmock is a testing library for Python that makes it easy to create
10283 mocks, stubs and fakes.")
10284 (license license:bsd-3)))
10285
10286 (define-public python2-flexmock
10287 (package-with-python2 python-flexmock))
10288
10289 (define-public python-orator
10290 (package
10291 (name "python-orator")
10292 (version "0.8.2")
10293 (source (origin
10294 (method url-fetch)
10295 (uri (pypi-uri "orator" version))
10296 (sha256
10297 (base32
10298 "1li49irsqha17nrda4nsb48biyy0rarp9pphf0jpqwm5zr8hv569"))))
10299 (build-system python-build-system)
10300 (arguments '(#:tests? #f)) ; no tests
10301 (propagated-inputs
10302 `(("python-arrow" ,python-arrow)
10303 ("python-blinker" ,python-blinker)
10304 ("python-cleo" ,python-cleo)
10305 ("python-fake-factory" ,python-fake-factory)
10306 ("python-inflection" ,python-inflection)
10307 ("python-lazy-object-proxy" ,python-lazy-object-proxy)
10308 ("python-pyaml" ,python-pyaml)
10309 ("python-simplejson" ,python-simplejson)
10310 ("python-wrapt" ,python-wrapt)))
10311 (home-page "https://orator-orm.com/")
10312 (synopsis "ActiveRecord ORM for Python")
10313 (description
10314 "Orator provides a simple ActiveRecord-like Object Relational Mapping
10315 implementation for Python.")
10316 (license license:expat)
10317 (properties `((python2-variant . ,(delay python2-orator))))))
10318
10319 (define-public python2-orator
10320 (let ((base (package-with-python2 (strip-python2-variant python-orator))))
10321 (package
10322 (inherit base)
10323 (propagated-inputs
10324 `(("python2-ipaddress" ,python2-ipaddress)
10325 ,@(package-propagated-inputs base))))))
10326
10327 (define-public python-prompt-toolkit
10328 (package
10329 (name "python-prompt-toolkit")
10330 (version "1.0.7")
10331 (source
10332 (origin
10333 (method url-fetch)
10334 (uri (pypi-uri "prompt_toolkit" version ".tar.gz"))
10335 (sha256
10336 (base32
10337 "1vyjd0b7wciv55i19l44zy0adx8q7ss79lhy2r9d1rwz2y4822zg"))))
10338 (build-system python-build-system)
10339 (arguments
10340 '(#:tests? #f)) ; The test suite uses some Windows-specific data types.
10341 (propagated-inputs
10342 `(("python-wcwidth" ,python-wcwidth)
10343 ("python-pygments" ,python-pygments)))
10344 (native-inputs `(("python-six" ,python-six)))
10345 (home-page "https://github.com/jonathanslenders/python-prompt-toolkit")
10346 (synopsis "Library for building command line interfaces in Python")
10347 (description
10348 "Prompt-Toolkit is a library for building interactive command line
10349 interfaces in Python. It's like GNU Readline but it also features syntax
10350 highlighting while typing, out-of-the-box multi-line input editing, advanced
10351 code completion, incremental search, support for Chinese double-width
10352 characters, mouse support, and auto suggestions.")
10353 (license license:bsd-3)))
10354
10355 (define-public python2-prompt-toolkit
10356 (package-with-python2 python-prompt-toolkit))
10357
10358 (define-public python-jedi
10359 (package
10360 (name "python-jedi")
10361 (version "0.9.0")
10362 (source
10363 (origin
10364 (method url-fetch)
10365 (uri (pypi-uri "jedi" version))
10366 (sha256
10367 (base32
10368 "0c8x962ynpx001fdvp07m2q5jk4igkxbj3rmnydavphvlgxijk1v"))))
10369 (build-system python-build-system)
10370 (home-page "https://github.com/davidhalter/jedi")
10371 (synopsis
10372 "Autocompletion for Python that can be used for text editors")
10373 (description
10374 "Jedi is an autocompletion tool for Python that can be used for text editors.")
10375 (license license:expat)))
10376
10377 (define-public python2-jedi
10378 (package-with-python2 python-jedi))
10379
10380 (define-public ptpython
10381 (package
10382 (name "ptpython")
10383 (version "0.34")
10384 (source (origin
10385 (method url-fetch)
10386 (uri (pypi-uri "ptpython" version))
10387 (sha256
10388 (base32
10389 "1mmbiyzf0n8hm7z2a562x7w5cbl6jc0zsk6vp40q1z4cyblv1k13"))))
10390 (build-system python-build-system)
10391 (propagated-inputs
10392 `(("python-docopt" ,python-docopt)
10393 ("python-jedi" ,python-jedi)
10394 ("python-prompt-toolkit" ,python-prompt-toolkit)
10395 ("python-pygments" ,python-pygments)))
10396 (home-page "https://github.com/jonathanslenders/ptpython")
10397 (synopsis "Python Read-Eval-Print-Loop with nice IDE-like features")
10398 (description
10399 "ptpython is a Python read-eval-print loop with IDE-like features.
10400 It supports syntax highlighting, multiline editing, autocompletion, mouse,
10401 color schemes, bracketed paste, Vi and Emacs keybindings, Chinese characters
10402 etc.")
10403 (license license:bsd-3)
10404 (properties `((python2-variant . ,(delay ptpython-2))))))
10405
10406 (define-public ptpython-2
10407 (let ((base (package-with-python2 (strip-python2-variant ptpython))))
10408 (package
10409 (inherit base)
10410 (name "ptpython2"))))
10411
10412 (define-public python-requests-oauthlib
10413 (package
10414 (name "python-requests-oauthlib")
10415 (version "0.6.2")
10416 (source
10417 (origin
10418 (method url-fetch)
10419 (uri (pypi-uri "requests-oauthlib" version))
10420 (sha256
10421 (base32
10422 "0ykff67sjcl227c23g0rxzfx34rr5bf21kwv0z3zmgk0lfmch7hn"))))
10423 (build-system python-build-system)
10424 (arguments
10425 `(#:phases
10426 (modify-phases %standard-phases
10427 ;; removes tests that require network access
10428 (add-before 'check 'pre-check
10429 (lambda _
10430 (delete-file "tests/test_core.py")
10431 #t)))))
10432 (native-inputs
10433 `(("python-requests-mock" ,python-requests-mock)
10434 ("python-mock" ,python-mock)))
10435 (propagated-inputs
10436 `(("python-oauthlib" ,python-oauthlib)
10437 ("python-requests" ,python-requests)))
10438 (home-page
10439 "https://github.com/requests/requests-oauthlib")
10440 (synopsis
10441 "OAuthlib authentication support for Requests")
10442 (description
10443 "Requests-OAuthlib uses the Python Requests and OAuthlib libraries to
10444 provide an easy-to-use Python interface for building OAuth1 and OAuth2 clients.")
10445 (license license:isc)))
10446
10447 (define-public python2-requests-oauthlib
10448 (package-with-python2 python-requests-oauthlib))
10449
10450 (define-public python-stem
10451 (package
10452 (name "python-stem")
10453 (version "1.4.1b")
10454 (source
10455 (origin
10456 (method url-fetch)
10457 (uri (pypi-uri "stem" version ".tar.bz2"))
10458 (sha256
10459 (base32
10460 "09a3amp1y351nwz088ckiibbp666qi2lxwkyknavswfm400s0ns7"))))
10461 (build-system python-build-system)
10462 (arguments
10463 `(#:phases
10464 (modify-phases %standard-phases
10465 (replace 'check
10466 (lambda _
10467 (zero? (system* "./run_tests.py" "--unit")))))))
10468 (native-inputs
10469 `(("python-mock" ,python-mock)
10470 ("python-pep8" ,python-pep8)
10471 ("python-pyflakes" ,python-pyflakes)))
10472 (propagated-inputs
10473 `(("python-pycrypto" ,python-pycrypto)))
10474 (home-page "https://stem.torproject.org/")
10475 (synopsis
10476 "Python controller library that allows applications to interact with Tor")
10477 (description
10478 "Stem is a Python controller library for Tor. With it you can use Tor's
10479 control protocol to script against the Tor process and read descriptor data
10480 relays publish about themselves.")
10481 (license license:lgpl3)))
10482
10483 (define-public python2-stem
10484 (package-with-python2 python-stem))
10485
10486 (define-public python-pyserial
10487 (package
10488 (name "python-pyserial")
10489 (version "3.1.1")
10490 (source
10491 (origin
10492 (method url-fetch)
10493 (uri (pypi-uri "pyserial" version))
10494 (sha256
10495 (base32
10496 "0k1nfdrxxkdlv4zgaqsdv8li0pj3gbh2pyxw8q2bsg6f9490amyn"))))
10497 (build-system python-build-system)
10498 (home-page
10499 "https://github.com/pyserial/pyserial")
10500 (synopsis "Python Serial Port Bindings")
10501 (description "@code{pyserial} provide serial port bindings for Python. It
10502 supports different byte sizes, stop bits, parity and flow control with RTS/CTS
10503 and/or Xon/Xoff. The port is accessed in RAW mode.")
10504 (license license:bsd-3)))
10505
10506 (define-public python2-pyserial
10507 (package-with-python2 python-pyserial))
10508
10509 (define-public python-kivy
10510 (package
10511 (name "python-kivy")
10512 (version "1.9.1")
10513 (source
10514 (origin
10515 (method url-fetch)
10516 (uri (pypi-uri "kivy" version))
10517 (file-name (string-append name "-" version ".tar.gz"))
10518 (sha256
10519 (base32
10520 "0zk3g1j1z0lzcm9d0k1lprrs95zr8n8k5pdg3p5qlsn26jz4bg19"))))
10521 (build-system python-build-system)
10522 (arguments
10523 `(#:tests? #f ; Tests require many optional packages
10524 #:phases
10525 (modify-phases %standard-phases
10526 (replace 'build (lambda _ (zero? (system* "make" "force"))))
10527 (add-after 'patch-generated-file-shebangs 'set-sdl-paths
10528 (lambda* (#:key inputs #:allow-other-keys)
10529 (setenv "KIVY_SDL2_PATH"
10530 (string-append (assoc-ref inputs "sdl-union")
10531 "/include/SDL2"))
10532 #t)))))
10533 (native-inputs
10534 `(("pkg-config" ,pkg-config)))
10535 (inputs
10536 `(("python-cython" ,python-cython)
10537 ("gstreamer" ,gstreamer)
10538 ("mesa" ,mesa)
10539 ("sdl-union"
10540 ,(sdl-union (list sdl2 sdl2-image sdl2-mixer sdl2-ttf)))))
10541 (home-page "http://kivy.org")
10542 (synopsis
10543 "Multitouch application framework")
10544 (description
10545 "A software library for rapid development of
10546 hardware-accelerated multitouch applications.")
10547 (license license:expat)))
10548
10549 (define-public python2-kivy
10550 (package-with-python2 python-kivy))
10551
10552 (define-public python-kivy-next
10553 (let ((commit "a988c5e7a47da56263ff39514264a3de516ef2fe")
10554 (revision "1"))
10555 (package (inherit python-kivy)
10556 (name "python-kivy-next")
10557 (version (string-append "1.9.1-" revision "."
10558 (string-take commit 7)))
10559 (source
10560 (origin
10561 (method git-fetch)
10562 (uri (git-reference
10563 (url "https://github.com/kivy/kivy")
10564 (commit commit)))
10565 (file-name (string-append name "-" version "-checkout"))
10566 (sha256
10567 (base32
10568 "0jk92b4a8l7blkvkgkjihk171s0dfnq582cckff5srwc8kal5m0p")))))))
10569
10570 (define-public python2-kivy-next
10571 (package-with-python2 python-kivy-next))
10572
10573 (define-public python-binaryornot
10574 (package
10575 (name "python-binaryornot")
10576 (version "0.4.0")
10577 (source (origin
10578 (method url-fetch)
10579 (uri (pypi-uri "binaryornot" version))
10580 (sha256
10581 (base32
10582 "1j4f51dxic39mdwf6alj7gd769wy6mhk916v031wjali51xkh3xb"))))
10583 (build-system python-build-system)
10584 (propagated-inputs
10585 `(("python-chardet" ,python-chardet)
10586 ("python-hypothesis" ,python-hypothesis)))
10587 (home-page "https://github.com/audreyr/binaryornot")
10588 (synopsis "Package to check if a file is binary or text")
10589 (description "Ultra-lightweight pure Python package to check if a file is
10590 binary or text.")
10591 (license license:bsd-3)
10592 (properties `((python2-variant . ,(delay python2-binaryornot))))))
10593
10594 (define-public python2-binaryornot
10595 (let ((base (package-with-python2 (strip-python2-variant python-binaryornot))))
10596 (package (inherit base)
10597 (propagated-inputs
10598 `(("python2-enum34" ,python2-enum34)
10599 ,@(package-propagated-inputs base))))))
10600
10601 (define-public python-nltk
10602 (package
10603 (name "python-nltk")
10604 (version "3.2.1")
10605 (source (origin
10606 (method url-fetch)
10607 (uri (pypi-uri "nltk" version))
10608 (sha256
10609 (base32
10610 "0skxbhnymwlspjkzga0f7x1hg3y50fwpfghs8g8k7fh6f4nknlym"))))
10611 (build-system python-build-system)
10612 (arguments
10613 '(;; The tests require some extra resources to be downloaded.
10614 ;; TODO Try packaging these resources.
10615 #:tests? #f))
10616 (home-page "http://nltk.org/")
10617 (synopsis "Natural Language Toolkit")
10618 (description "It provides interfaces to over 50 corpora and lexical
10619 resources such as WordNet, along with a suite of text processing libraries
10620 for classification, tokenization, stemming, tagging, parsing, and semantic
10621 reasoning, wrappers for natural language processing libraries.")
10622 (license license:asl2.0)))
10623
10624 (define-public python2-nltk
10625 (package-with-python2 python-nltk))
10626
10627 (define-public python-pymongo
10628 (package
10629 (name "python-pymongo")
10630 (version "3.3.0")
10631 (source (origin
10632 (method url-fetch)
10633 (uri (pypi-uri "pymongo" version))
10634 (sha256
10635 (base32
10636 "07mra6w86wjqy4lx5fvimidjhhfzd562gfjn8grsnbv2q8pk0i9x"))))
10637 (build-system python-build-system)
10638 (propagated-inputs
10639 `(("python-certifi" ,python-certifi)))
10640 (home-page "http://github.com/mongodb/mongo-python-driver")
10641 (synopsis "Python driver for MongoDB")
10642 (description "Python driver for MongoDB.")
10643 (license license:asl2.0)))
10644
10645 (define-public python2-pymongo
10646 (package-with-python2 python-pymongo))
10647
10648 (define-public python-sh
10649 (package
10650 (name "python-sh")
10651 (version "1.11")
10652 (source (origin
10653 (method url-fetch)
10654 (uri (pypi-uri "sh" version))
10655 (sha256
10656 (base32
10657 "192r0mpv6dmkysjzhc43ddffiwb5g7c76bgr1mb1z2xz9awbj3sr"))))
10658 (build-system python-build-system)
10659 (arguments
10660 `(#:tests? #f)) ; no tests
10661 (home-page "https://github.com/amoffat/sh")
10662 (synopsis "Python subprocess interface")
10663 (description "Abstracts process invocation by providing a function
10664 interface for programs.")
10665 (license license:expat)))
10666
10667 (define-public python2-sh
10668 (package-with-python2 python-sh))
10669
10670 (define-public python-consul
10671 (package
10672 (name "python-consul")
10673 (version "0.6.1")
10674 (source
10675 (origin
10676 (method url-fetch)
10677 (uri (pypi-uri "python-consul" version))
10678 (sha256
10679 (base32
10680 "0rfyxcy4cr3x848vhx876ifalxd5ghq6l5x813m49h4vq2d4jiq8"))))
10681 (build-system python-build-system)
10682 (native-inputs
10683 `(("python-pytest" ,python-pytest)
10684 ("python-requests" ,python-requests)
10685 ("python-six" ,python-six)))
10686 (home-page "https://github.com/cablehead/python-consul")
10687 (synopsis "Python client for Consul")
10688 (description
10689 "Python client for @url{http://www.consul.io/,Consul}, a tool for service
10690 discovery, monitoring and configuration.")
10691 (license license:expat)))
10692
10693 (define-public python2-consul
10694 (package-with-python2 python-consul))
10695
10696 (define-public python-schematics
10697 (package
10698 (name "python-schematics")
10699 (version "1.1.1")
10700 (source
10701 (origin
10702 (method url-fetch)
10703 (uri (string-append
10704 "https://github.com/schematics/schematics/archive/v" version ".tar.gz"))
10705 (file-name (string-append name "-" version ".tar.gz"))
10706 (sha256
10707 (base32
10708 "19v1i69bf3bzarfxmbv0v6ivpcn758x3shvbiy9l2hy0lvqwnp6l"))))
10709 (build-system python-build-system)
10710 (propagated-inputs
10711 `(("python-six" ,python-six)))
10712 (arguments
10713 `(#:tests? #f)) ; requires a bunch of not very nice packages with fixed
10714 ; version requirements (eg python-coveralls)
10715 (home-page "https://github.com/schematics/schematics")
10716 (synopsis "Python Data Structures for Humans")
10717 (description "Python Data Structures for Humans.")
10718 (license license:bsd-3)))
10719
10720 (define-public python2-schematics
10721 (package-with-python2 python-schematics))
10722
10723 (define-public python-publicsuffix
10724 (package
10725 (name "python-publicsuffix")
10726 (version "1.1.0")
10727 (source (origin
10728 (method url-fetch)
10729 (uri (pypi-uri "publicsuffix" version))
10730 (sha256
10731 (base32
10732 "1adx520249z2cy7ykwjr1k190mn2888wqn9jf8qm27ly4qymjxxf"))))
10733 (build-system python-build-system)
10734 (arguments
10735 `(#:tests? #f)) ; tests use the internet
10736 (home-page "https://www.tablix.org/~avian/git/publicsuffix.git")
10737 (synopsis "Get suffix for a domain name")
10738 (description "Get a public suffix for a domain name using the Public Suffix
10739 List.")
10740 (license license:expat)))
10741
10742 (define-public python2-publicsuffix
10743 (package-with-python2 python-publicsuffix))
10744
10745 (define-public python-publicsuffix2
10746 (package
10747 (name "python-publicsuffix2")
10748 (version "2.20160621")
10749 (source
10750 (origin
10751 (method url-fetch)
10752 (uri (pypi-uri "publicsuffix2" version ".tar.bz2"))
10753 (sha256
10754 (base32
10755 "06lx603gdwad5hc3hmn763ngq0rq9bzz1ni3ga72nzk5n872arkd"))))
10756 (build-system python-build-system)
10757 (arguments
10758 '(#:tests? #f)) ; The test suite requires network access.
10759 (home-page "https://github.com/pombredanne/python-publicsuffix2")
10760 (synopsis "Get a public suffix for a domain name using the Public Suffix List")
10761 (description "Get a public suffix for a domain name using the Public Suffix
10762 List. Forked from and using the same API as the publicsuffix package.")
10763 (license (list license:expat license:mpl2.0))))
10764
10765 (define-public python2-publicsuffix2
10766 (package-with-python2 python-publicsuffix2))
10767
10768 (define-public python-url
10769 (package
10770 (name "python-url")
10771 (version "0.2.0")
10772 (source (origin
10773 (method url-fetch)
10774 (uri (pypi-uri "url" version))
10775 (sha256
10776 (base32
10777 "0v879yadcz9qxfl41ak6wkga1kimp9cflla9ddz03hjjvgkqy5ki"))))
10778 (build-system python-build-system)
10779 (propagated-inputs
10780 `(("python-publicsuffix" ,python-publicsuffix)))
10781 (native-inputs
10782 `(("python-coverage" ,python-coverage)
10783 ("python-nose" ,python-nose)))
10784 (arguments
10785 `(#:tests? #f)) ; FIXME: tests fail with "ImportError: No module named 'tests'"
10786 (home-page "http://github.com/seomoz/url-py")
10787 (synopsis "URL Parsing")
10788 (description "Library for parsing urls.")
10789 (license license:expat)
10790 (properties `((python2-variant . ,(delay python2-url))))))
10791
10792 (define-public python2-url
10793 (let ((base (package-with-python2 (strip-python2-variant python-url))))
10794 (package (inherit base)
10795 (propagated-inputs
10796 `(("python2-publicsuffix" ,python2-publicsuffix))))))
10797
10798 (define-public python-freezegun
10799 (package
10800 (name "python-freezegun")
10801 (version "0.3.7")
10802 (source
10803 (origin
10804 (method url-fetch)
10805 (uri (pypi-uri "freezegun" version))
10806 (sha256
10807 (base32
10808 "14l19x06v5jkq4rdwbmfyw4x9lrjb2300afrk21r1ash7y1y9a0w"))))
10809 (build-system python-build-system)
10810 (native-inputs
10811 `(("python-mock" ,python-mock)
10812 ("python-nose" ,python-nose)
10813 ("python-coverage" ,python-coverage)
10814 ("python-dateutil-2" ,python-dateutil-2)))
10815 (propagated-inputs
10816 `(("python-six" ,python-six)))
10817 (arguments
10818 `(#:phases (modify-phases %standard-phases
10819 ;; The tests are normally executed via `make test`, but the PyPi
10820 ;; package does not include the Makefile.
10821 (replace 'check
10822 (lambda _
10823 (zero? (system* "nosetests" "./tests/")))))))
10824 (home-page "https://github.com/spulec/freezegun")
10825 (synopsis "Test utility for mocking the datetime module")
10826 (description
10827 "FreezeGun is a library that allows your python tests to travel through
10828 time by mocking the datetime module.")
10829 (license license:asl2.0)))
10830
10831 (define-public python2-freezegun
10832 (package-with-python2 python-freezegun))
10833
10834
10835 (define-public python-odfpy
10836 (package
10837 (name "python-odfpy")
10838 (version "1.3.3")
10839 (source (origin
10840 (method url-fetch)
10841 (uri (pypi-uri "odfpy" version))
10842 (sha256
10843 (base32
10844 "1a6ms0w9zfhhkqhvrnynwwbxrivw6hgjc0s5k7j06npc7rq0blxw"))))
10845 (arguments
10846 `(#:modules ((srfi srfi-1)
10847 (guix build python-build-system)
10848 (guix build utils))
10849 #:phases
10850 (modify-phases %standard-phases
10851 (replace 'check
10852 ;; The test runner invokes python2 and python3 for test*.py.
10853 ;; To avoid having both in inputs, we replicate it here.
10854 (lambda _
10855 (every (lambda (test-file)
10856 (zero? (system* "python" test-file)))
10857 (find-files "tests" "^test.*\\.py$")))))))
10858 (build-system python-build-system)
10859 (home-page "https://github.com/eea/odfpy")
10860 (synopsis "Python API and tools to manipulate OpenDocument files")
10861 (description "Collection of libraries and utility programs written in
10862 Python to manipulate OpenDocument 1.2 files.")
10863 (license
10864 ;; The software is mainly dual GPL2+ and ASL2.0, but includes a
10865 ;; number of files with other licenses.
10866 (list license:gpl2+ license:asl2.0 license:lgpl2.1+ license:cc-by-sa3.0))))
10867
10868 (define-public python2-odfpy
10869 (package-with-python2 python-odfpy))
10870
10871 (define-public python-cachecontrol
10872 (package
10873 (name "python-cachecontrol")
10874 (version "0.11.6")
10875 (source
10876 (origin
10877 (method url-fetch)
10878 ;; Pypi does not have tests.
10879 (uri (string-append
10880 "https://github.com/ionrock/cachecontrol/archive/v"
10881 version ".tar.gz"))
10882 (file-name (string-append name "-" version ".tar.gz"))
10883 (sha256
10884 (base32
10885 "0yj60d0f69a2l8p7y86k4zhzzm6rnxpq74sfl240pry9l0lfw2vw"))))
10886 (build-system python-build-system)
10887 (arguments
10888 `(#:phases
10889 (modify-phases %standard-phases
10890 (replace 'check
10891 (lambda _
10892 ;; Drop test that requires internet access.
10893 (delete-file "tests/test_regressions.py")
10894 (setenv "PYTHONPATH"
10895 (string-append (getcwd) "/build/lib:"
10896 (getenv "PYTHONPATH")))
10897 (zero? (system* "py.test" "-vv")))))))
10898 (native-inputs
10899 `(("python-pytest" ,python-pytest)
10900 ("python-redis" ,python-redis)
10901 ("python-webtest" ,python-webtest)
10902 ("python-mock" ,python-mock)))
10903 (propagated-inputs
10904 `(("python-requests" ,python-requests)
10905 ("python-lockfile" ,python-lockfile)))
10906 (home-page "https://github.com/ionrock/cachecontrol")
10907 (synopsis "The httplib2 caching algorithms for use with requests")
10908 (description "CacheControl is a port of the caching algorithms in
10909 @code{httplib2} for use with @code{requests} session objects.")
10910 (license license:asl2.0)))
10911
10912 (define-public python2-cachecontrol
10913 (package-with-python2 python-cachecontrol))
10914
10915 (define-public python-lit
10916 (package
10917 (name "python-lit")
10918 (version "0.5.0")
10919 (source
10920 (origin
10921 (method url-fetch)
10922 (uri (pypi-uri "lit" version))
10923 (sha256
10924 (base32
10925 "135m2b9cwih85g66rjggavck328z7lj37srgpq3jxszbg0g2b91y"))))
10926 (build-system python-build-system)
10927 (home-page "http://llvm.org/")
10928 (synopsis "LLVM Software Testing Tool")
10929 (description "@code{lit} is a portable tool for executing LLVM and Clang
10930 style test suites, summarizing their results, and providing indication of
10931 failures.")
10932 (license license:ncsa)))
10933
10934 (define-public python2-lit
10935 (package-with-python2 python-lit))
10936
10937 (define-public python-pytest-pep8
10938 (package
10939 (name "python-pytest-pep8")
10940 (version "1.0.6")
10941 (source (origin
10942 (method url-fetch)
10943 (uri (pypi-uri "pytest-pep8" version))
10944 (sha256
10945 (base32
10946 "06032agzhw1i9d9qlhfblnl3dw5hcyxhagn7b120zhrszbjzfbh3"))))
10947 (build-system python-build-system)
10948 (arguments
10949 `(#:tests? #f)) ; Fails with recent pytest and pep8. See upstream issues #8 and #12.
10950 (native-inputs
10951 `(("python-pytest" ,python-pytest)))
10952 (propagated-inputs
10953 `(("python-pep8" ,python-pep8)))
10954 (home-page "https://bitbucket.org/pytest-dev/pytest-pep8")
10955 (synopsis "Py.test plugin to check PEP8 requirements")
10956 (description "Pytest plugin for checking PEP8 compliance.")
10957 (license license:expat)))
10958
10959 (define-public python2-pytest-pep8
10960 (package-with-python2 python-pytest-pep8))
10961
10962 (define-public python-pytest-flakes
10963 (package
10964 (name "python-pytest-flakes")
10965 (version "1.0.1")
10966 (source (origin
10967 (method url-fetch)
10968 (uri (pypi-uri "pytest-flakes" version))
10969 (sha256
10970 (base32
10971 "0flag3n33kbhyjrhzmq990rvg4yb8hhhl0i48q9hw0ll89jp28lw"))))
10972 (build-system python-build-system)
10973 (arguments
10974 `(#:phases
10975 (modify-phases %standard-phases
10976 (delete 'check)
10977 (add-after 'install 'check
10978 (lambda _ ; It's easier to run tests after install.
10979 (zero? (system* "py.test" "-vv")))))))
10980 (native-inputs
10981 `(("python-coverage" ,python-coverage)
10982 ("python-pytest" ,python-pytest)
10983 ("python-pytest-cache" ,python-pytest-cache)
10984 ("python-pytest-pep8" ,python-pytest-pep8)))
10985 (propagated-inputs
10986 `(("python-pyflakes" ,python-pyflakes)))
10987 (home-page "https://github.com/fschulze/pytest-flakes")
10988 (synopsis "Py.test plugin to check source code with pyflakes")
10989 (description "Pytest plugin for checking Python source code with pyflakes.")
10990 (license license:expat)))
10991
10992 (define-public python2-pytest-flakes
10993 (package-with-python2 python-pytest-flakes))
10994
10995 (define-public python-natsort
10996 (package
10997 (name "python-natsort")
10998 (version "5.0.1")
10999 (source (origin
11000 (method url-fetch)
11001 (uri (pypi-uri "natsort" version))
11002 (sha256
11003 (base32
11004 "1abld5p4a6n5zjnyw5mi2pv37gqalcybv2brjr2y6l9l2p8v9mja"))))
11005 (build-system python-build-system)
11006 (arguments
11007 `(#:phases
11008 (modify-phases %standard-phases
11009 (add-before 'check 'set-cachedir
11010 ;; Tests require write access to $HOME by default
11011 (lambda _ (setenv "PYTHON_EGG_CACHE" "/tmp") #t)))))
11012 (native-inputs
11013 `(("python-hypothesis" ,python-hypothesis)
11014 ("python-pytest-cache" ,python-pytest-cache)
11015 ("python-pytest-cov" ,python-pytest-cov)
11016 ("python-pytest-flakes" ,python-pytest-flakes)
11017 ("python-pytest-pep8" ,python-pytest-pep8)))
11018 (propagated-inputs ; TODO: Add python-fastnumbers.
11019 `(("python-pyicu" ,python-pyicu)))
11020 (home-page "https://github.com/SethMMorton/natsort")
11021 (synopsis "Natural sorting for python and shell")
11022 (description
11023 "Natsort lets you apply natural sorting on lists instead of
11024 lexicographical. If you use the built-in @code{sorted} method in python
11025 on a list such as @code{['a20', 'a9', 'a1', 'a4', 'a10']}, it would be
11026 returned as @code{['a1', 'a10', 'a20', 'a4', 'a9']}. Natsort provides a
11027 function @code{natsorted} that identifies numbers and sorts them separately
11028 from strings. It can also sort version numbers, real numbers, mixed types
11029 and more, and comes with a shell command @command{natsort} that exposes this
11030 functionality in the command line.")
11031 (license license:expat)
11032 (properties `((python2-variant . ,(delay python2-natsort))))))
11033
11034 (define-public python2-natsort
11035 (let ((base (package-with-python2 (strip-python2-variant python-natsort))))
11036 (package (inherit base)
11037 (native-inputs
11038 `(("python2-pathlib" ,python2-pathlib)
11039 ("python2-mock" ,python2-mock)
11040 ("python2-enum34" ,python2-enum34)
11041 ,@(package-native-inputs base))))))
11042
11043 (define-public python-glances
11044 (package
11045 (name "python-glances")
11046 (version "2.7.1")
11047 (source
11048 (origin
11049 (method url-fetch)
11050 (uri (pypi-uri "Glances" version))
11051 (sha256
11052 (base32
11053 "11jbq40g8alsbirnd4kiagznqg270247i0m8qhi48ldf2i5xppxg"))))
11054 (build-system python-build-system)
11055 (propagated-inputs
11056 `(("python-psutil" ,python-psutil)))
11057 (home-page
11058 "https://github.com/nicolargo/glances")
11059 (synopsis
11060 "A cross-platform curses-based monitoring tool")
11061 (description
11062 "Glances is a curses-based monitoring tool for a wide variety of platforms.
11063 Glances uses the PsUtil library to get information from your system. It monitors
11064 CPU, load, memory, network bandwidth, disk I/O, disk use, and more.")
11065 (license license:lgpl3+)))
11066
11067 (define-public python2-glances
11068 (package-with-python2 python-glances))
11069
11070 (define-public python-graphql-core
11071 (package
11072 (name "python-graphql-core")
11073 (version "0.5.3")
11074 (source
11075 (origin
11076 (method url-fetch)
11077 (uri (pypi-uri "graphql-core" version))
11078 (sha256
11079 (base32
11080 "0rsaarx2sj4xnw9966rhh4haiqaapm4lm2mfqm48ywd51j5vh1a0"))))
11081 (build-system python-build-system)
11082 (arguments
11083 `(#:tests? #f ; Tests require the unpackaged pytest-benchmark.
11084 #:phases
11085 (modify-phases %standard-phases
11086 (add-after 'unpack 'patch-hardcoded-version
11087 (lambda _ (substitute*
11088 "setup.py"
11089 (("'gevent==1.1rc1'") "'gevent'"))
11090 #t)))))
11091 (native-inputs
11092 `(("python-gevent" ,python-gevent)
11093 ("python-mock" ,python-mock)
11094 ("python-pytest-mock" ,python-pytest-mock)))
11095 (propagated-inputs
11096 `(("python-promise" ,python-promise)
11097 ("python-six" ,python-six)))
11098 (home-page "https://github.com/graphql-python/graphql-core")
11099 (synopsis "GraphQL implementation for Python")
11100 (description
11101 "GraphQL implementation for Python. GraphQL is a data query language and
11102 runtime designed and used to request and deliver data to mobile and web apps.
11103 This library is a port of @url{https://github.com/graphql/graphql-js,graphql-js}
11104 to Python.")
11105 (license license:expat)))
11106
11107 (define-public python2-graphql-core
11108 (package-with-python2 python-graphql-core))
11109
11110 (define-public python-graphql-relay
11111 (package
11112 (name "python-graphql-relay")
11113 (version "0.4.4")
11114 (source
11115 (origin
11116 (method url-fetch)
11117 (uri (pypi-uri "graphql-relay" version))
11118 (sha256
11119 (base32
11120 "04wr9ayshxjjdcg2v21c7ffbz36kif1wjl3604fqd3qignb3fbxi"))))
11121 (build-system python-build-system)
11122 (native-inputs
11123 `(("python-pytest" ,python-pytest)))
11124 (propagated-inputs
11125 `(("python-graphql-core" ,python-graphql-core)
11126 ("python-promise" ,python-promise)
11127 ("python-six" ,python-six)))
11128 (home-page "https://github.com/graphql-python/graphql-relay-py")
11129 (synopsis "Relay implementation for Python")
11130 (description
11131 "This is a library to allow the easy creation of Relay-compliant servers
11132 using the GraphQL Python reference implementation of a GraphQL server. It
11133 should be noted that the code is a exact port of the original
11134 @url{https://github.com/graphql/graphql-relay-js,graphql-relay js implementation}
11135 from Facebook.")
11136 (license license:expat)))
11137
11138 (define-public python2-graphql-relay
11139 (package-with-python2 python-graphql-relay))
11140
11141 (define-public python-graphene
11142 (package
11143 (name "python-graphene")
11144 (version "0.10.2")
11145 (source
11146 (origin
11147 (method url-fetch)
11148 (uri (pypi-uri "graphene" version))
11149 (sha256
11150 (base32
11151 "09zhac7igh9ixdz0ay6csy35b40l1jwbf2wrbxmgxwfhy51iy06q"))))
11152 (build-system python-build-system)
11153 (native-inputs
11154 `(("python-django-filter" ,python-django-filter)
11155 ("python-mock" ,python-mock)
11156 ("python-psycopg2" ,python-psycopg2)
11157 ("python-pytest-django" ,python-pytest-django)
11158 ("python-sqlalchemy-utils" ,python-sqlalchemy-utils)))
11159 (propagated-inputs
11160 `(("python-graphql-core" ,python-graphql-core)
11161 ("python-graphql-relay" ,python-graphql-relay)
11162 ("python-iso8601" ,python-iso8601)
11163 ("python-promise" ,python-promise)
11164 ("python-six" ,python-six)))
11165 (home-page "http://graphene-python.org/")
11166 (synopsis "GraphQL Framework for Python")
11167 (description
11168 "Graphene is a Python library for building GraphQL schemas/types.
11169 A GraphQL schema describes your data model, and provides a GraphQL server
11170 with an associated set of resolve methods that know how to fetch data.")
11171 (properties `((python2-variant . ,(delay python2-graphene))))
11172 (license license:expat)))
11173
11174 (define-public python2-graphene
11175 (let ((base (package-with-python2
11176 (strip-python2-variant python-graphene))))
11177 (package (inherit base)
11178 (native-inputs
11179 `(("python2-sqlalchemy" ,python2-sqlalchemy)
11180 ,@(package-native-inputs base))))))
11181
11182 (define-public python-nautilus
11183 (package
11184 (name "python-nautilus")
11185 (version "0.4.9")
11186 (source
11187 (origin
11188 (method url-fetch)
11189 (uri (pypi-uri "nautilus" version))
11190 (sha256
11191 (base32
11192 "01hwzjc1zshk4vvxrcghm398fpy4jls66dyz06g07mrwqif8878p"))))
11193 (build-system python-build-system)
11194 (arguments `(#:tests? #f)) ; fails to import test modules
11195 (propagated-inputs
11196 `(("python-bcrypt" ,python-bcrypt)
11197 ("python-click" ,python-click)
11198 ("python-consul" ,python-consul)
11199 ("python-graphql-core" ,python-graphql-core)
11200 ("python-graphql-relay" ,python-graphql-relay)
11201 ("python-graphene" ,python-graphene)
11202 ("python-jinja2" ,python-jinja2)
11203 ("python-nose2" ,python-nose2)
11204 ("python-peewee" ,python-peewee)
11205 ("python-pika" ,python-pika)
11206 ("python-pycparser" ,python-pycparser)
11207 ("python-requests" ,python-requests)
11208 ("python-tornado" ,python-tornado)
11209 ("python-wtforms" ,python-wtforms)))
11210 (home-page "https://github.com/AlecAivazis/nautilus")
11211 (synopsis "Library for creating microservice applications")
11212 (description
11213 "Nautilus is a framework for flux based microservices that looks to
11214 provide extendible implementations of common aspects of a cloud so that you can
11215 focus on building massively scalable web applications.")
11216 (license license:expat)))
11217
11218 (define-public python-betamax
11219 (package
11220 (name "python-betamax")
11221 (version "0.8.0")
11222 (source
11223 (origin
11224 (method url-fetch)
11225 (uri (pypi-uri "betamax" version))
11226 (sha256
11227 (base32
11228 "18f8v5gng3j773jlbbzx4rg1i4y2zw3m2l1zpmbvp8bh5a2q1i42"))))
11229 (build-system python-build-system)
11230 (arguments
11231 '(;; Many tests fail because they require networking.
11232 #:tests? #f))
11233 (inputs
11234 `(("python-requests" ,python-requests)))
11235 (home-page "https://github.com/sigmavirus24/betamax")
11236 (synopsis "Record HTTP interactions with python-requests")
11237 (description "Betamax will record your test suite's HTTP interactions and
11238 replay them during future tests. It is designed to work with python-requests.")
11239 (license license:expat)))
11240
11241 (define-public python2-betamax
11242 (package-with-python2 python-betamax))
11243
11244 (define-public python-s3transfer
11245 (package
11246 (name "python-s3transfer")
11247 (version "0.1.8")
11248 (source (origin
11249 (method url-fetch)
11250 (uri (pypi-uri "s3transfer" version))
11251 (sha256
11252 (base32
11253 "1jivjkp3xqif9gzr5fiq28jsskmh50vzzd7ldsb4rbyiw1iyv3hy"))))
11254 (build-system python-build-system)
11255 (arguments
11256 `(#:phases
11257 (modify-phases %standard-phases
11258 (replace 'check
11259 (lambda _
11260 ;; 7 of the 'integration' tests require network access or login
11261 ;; credentials.
11262 (zero? (system* "nosetests" "--exclude=integration")))))))
11263 (native-inputs
11264 `(("python-docutils" ,python-docutils)
11265 ("python-mock" ,python-mock)
11266 ("python-nose" ,python-nose)))
11267 (propagated-inputs
11268 `(("python-botocore" ,python-botocore)))
11269 (synopsis "Amazon S3 Transfer Manager")
11270 (description "S3transfer is a Python library for managing Amazon S3
11271 transfers.")
11272 (home-page "https://github.com/boto/s3transfer")
11273 (license license:asl2.0)
11274 (properties `((python2-variant . ,(delay python2-s3transfer))))))
11275
11276 (define-public python2-s3transfer
11277 (let ((base (package-with-python2 (strip-python2-variant python-s3transfer))))
11278 (package
11279 (inherit base)
11280 (native-inputs
11281 `(("python2-futures" ,python2-futures)
11282 ,@(package-native-inputs base))))))
11283
11284 (define-public python-setproctitle
11285 (package
11286 (name "python-setproctitle")
11287 (version "1.1.10")
11288 (source
11289 (origin
11290 (method url-fetch)
11291 (uri (pypi-uri "setproctitle" version))
11292 (sha256
11293 (base32
11294 "163kplw9dcrw0lffq1bvli5yws3rngpnvrxrzdw89pbphjjvg0v2"))))
11295 (build-system python-build-system)
11296 (arguments
11297 '(#:phases
11298 (modify-phases %standard-phases
11299 (add-before 'check 'patch-Makefile
11300 ;; Stricly this is only required for the python2 variant.
11301 ;; But adding a phase in an inherited package seems to be
11302 ;; cumbersum. So we patch even for python3.
11303 (lambda _
11304 (let ((nose (assoc-ref %build-inputs "python2-nose")))
11305 (when nose
11306 (substitute* "Makefile"
11307 (("\\$\\(PYTHON\\) [^ ]which nosetests[^ ] ")
11308 (string-append nose "/bin/nosetests "))))
11309 #t)))
11310 (replace 'check
11311 (lambda _
11312 (setenv "PYTHON" (or (which "python3") (which "python")))
11313 (setenv "PYCONFIG" (or (which "python3-config")
11314 (which "python-config")))
11315 (setenv "CC" "gcc")
11316 ;; No need to extend PYTHONPATH to find the built package, since
11317 ;; the Makefile will build anyway
11318 (zero? (system* "make" "check")))))))
11319 (native-inputs
11320 `(("procps" ,procps))) ; required for tests
11321 (home-page
11322 "https://github.com/dvarrazzo/py-setproctitle")
11323 (synopsis
11324 "Setproctitle implementation for Python to customize the process title")
11325 (description "The library allows a process to change its title (as displayed
11326 by system tools such as ps and top).
11327
11328 Changing the title is mostly useful in multi-process systems, for
11329 example when a master process is forked: changing the children's title
11330 allows to identify the task each process is busy with. The technique
11331 is used by PostgreSQL and the OpenSSH Server for example.")
11332 (license license:bsd-3)
11333 (properties `((python2-variant . ,(delay python2-setproctitle))))))
11334
11335 (define-public python2-setproctitle
11336 (let ((base (package-with-python2
11337 (strip-python2-variant python-setproctitle))))
11338 (package
11339 (inherit base)
11340 (native-inputs `(("python2-nose" ,python2-nose)
11341 ,@(package-native-inputs base))))))
11342
11343 (define-public python-validictory
11344 (package
11345 (name "python-validictory")
11346 (version "1.0.1")
11347 (source
11348 (origin
11349 (method url-fetch)
11350 (uri (pypi-uri "validictory" version))
11351 (sha256
11352 (base32
11353 "1zf1g9sw47xzp5f80bd94pb42j9yqv82lcrgcvdwr6nkaphfi37q"))))
11354 (build-system python-build-system)
11355 (arguments
11356 '(#:phases
11357 (modify-phases %standard-phases
11358 (add-after 'unpack 'bootstrap
11359 ;; Move the tests out of the package directory to avoid
11360 ;; packaging them.
11361 (lambda* _
11362 (rename-file "validictory/tests" "tests")
11363 (delete-file "tests/__init__.py")))
11364 (replace 'check
11365 (lambda _
11366 ;; Extend PYTHONPATH so the built package will be found.
11367 (setenv "PYTHONPATH"
11368 (string-append (getcwd) "/build/lib:"
11369 (getenv "PYTHONPATH")))
11370 (zero? (system* "py.test" "-vv" )))))))
11371 (native-inputs
11372 `(("python-pytest" ,python-pytest)))
11373 (home-page
11374 "https://github.com/jamesturk/validictory")
11375 (synopsis "General purpose Python data validator")
11376 (description "It allows validation of arbitrary Python data structures.
11377
11378 The schema format is based on the JSON Schema
11379 proposal (http://json-schema.org), so combined with json the library is also
11380 useful as a validator for JSON data.")
11381 (license license:expat)))
11382
11383 (define-public python2-validictory
11384 (package-with-python2 python-validictory))
11385
11386 (define-public python-aniso8601
11387 (package
11388 (name "python-aniso8601")
11389 (version "1.1.0")
11390 (source
11391 (origin
11392 (method url-fetch)
11393 (uri (pypi-uri "aniso8601" version))
11394 (sha256
11395 (base32
11396 "1k5mjg9iqbjfslb5prrsfz7dhlvi6s35p1jxq8dm87w1b7dn5i2g"))))
11397 (build-system python-build-system)
11398 (propagated-inputs
11399 `(("python-dateutil-2" ,python-dateutil-2)))
11400 (home-page
11401 "https://bitbucket.org/nielsenb/aniso8601")
11402 (synopsis
11403 "Python library for parsing ISO 8601 strings")
11404 (description
11405 "This package contains a library for parsing ISO 8601 datetime strings.")
11406 (license license:bsd-3)))
11407
11408 (define-public python-flask-restful
11409 (package
11410 (name "python-flask-restful")
11411 (version "0.3.5")
11412 (source
11413 (origin
11414 (method url-fetch)
11415 (uri (pypi-uri "Flask-RESTful" version))
11416 (sha256
11417 (base32
11418 "0hjcmdb56b7z4bkw848lxfkyrpnkwzmqn2dgnlv12mwvjpzsxr6c"))))
11419 (build-system python-build-system)
11420 (propagated-inputs
11421 `(("python-aniso8601" ,python-aniso8601)
11422 ("python-flask" ,python-flask)
11423 ("python-pycrypto" ,python-pycrypto)
11424 ("python-pytz" ,python-pytz)))
11425 (native-inputs
11426 `(;; Optional dependency of Flask. Tests need it.
11427 ("python-blinker" ,python-blinker)
11428 ("python-mock" ,python-mock) ; For tests
11429 ("python-nose" ,python-nose) ; For tests
11430 ("python-sphinx" ,python-sphinx)))
11431 (home-page
11432 "https://www.github.com/flask-restful/flask-restful/")
11433 (synopsis
11434 "Flask module for creating REST APIs")
11435 (description
11436 "This package contains a Flask module for creating REST APIs.")
11437 (license license:bsd-3)))
11438
11439 (define-public python-flask-basicauth
11440 (package
11441 (name "python-flask-basicauth")
11442 (version "0.2.0")
11443 (source
11444 (origin
11445 (method url-fetch)
11446 (uri (pypi-uri "Flask-BasicAuth" version))
11447 (sha256
11448 (base32
11449 "1zq1spkjr4sjdnalpp8wl242kdqyk6fhbnhr8hi4r4f0km4bspnz"))))
11450 (build-system python-build-system)
11451 (propagated-inputs
11452 `(("python-flask" ,python-flask)))
11453 (home-page
11454 "https://github.com/jpvanhal/flask-basicauth")
11455 (synopsis
11456 "HTTP basic access authentication for Flask")
11457 (description
11458 "This package provides HTTP basic access authentication for Flask.")
11459 (license license:bsd-3)))
11460
11461 (define-public python-flask-sqlalchemy
11462 (package
11463 (name "python-flask-sqlalchemy")
11464 (version "2.1")
11465 (source
11466 (origin
11467 (method url-fetch)
11468 (uri (pypi-uri "Flask-SQLAlchemy" version))
11469 (sha256
11470 (base32
11471 "1i9ps5d5snih9xlqhrvmi3qfiygkmqzxh92n25kj4pf89kj4s965"))))
11472 (build-system python-build-system)
11473 (propagated-inputs
11474 `(("python-flask" ,python-flask)
11475 ("python-sqlalchemy" ,python-sqlalchemy)))
11476 (home-page
11477 "http://github.com/mitsuhiko/flask-sqlalchemy")
11478 (synopsis
11479 "Module adding SQLAlchemy support to your Flask application")
11480 (description
11481 "This package adds SQLAlchemy support to your Flask application.")
11482 (license license:bsd-3)))
11483
11484 (define-public python-pyev
11485 (package
11486 (name "python-pyev")
11487 (version "0.9.0")
11488 (source
11489 (origin
11490 (method url-fetch)
11491 (uri (pypi-uri "pyev" version))
11492 (sha256
11493 (base32
11494 "0rf603lc0s6zpa1nb25vhd8g4y337wg2wyz56i0agsdh7jchl0sx"))))
11495 (build-system python-build-system)
11496 (arguments
11497 `(#:tests? #f ; no test suite
11498 #:phases
11499 (modify-phases %standard-phases
11500 (add-after 'unpack 'patch
11501 (lambda* (#:key inputs #:allow-other-keys)
11502 (let ((libev (string-append (assoc-ref inputs "libev")
11503 "/lib/libev.so.4")))
11504 (substitute* "setup.py"
11505 (("libev_dll_name = find_library\\(\\\"ev\\\"\\)")
11506 (string-append "libev_dll_name = \"" libev "\"")))))))))
11507 (inputs
11508 `(("libev" ,libev)))
11509 (home-page "http://pythonhosted.org/pyev/")
11510 (synopsis "Python libev interface")
11511 (description "Pyev provides a Python interface to libev.")
11512 (license license:gpl3)))
11513
11514 (define-public python2-pyev
11515 (package-with-python2 python-pyev))
11516
11517 (define-public python-imagesize
11518 (package
11519 (name "python-imagesize")
11520 (version "0.7.1")
11521 (source
11522 (origin
11523 (method url-fetch)
11524 (uri (pypi-uri "imagesize" version))
11525 (sha256
11526 (base32
11527 "0qk07k0z4241lkzzjji7z4da04pcvg7bfc4xz1934zlqhwmwdcha"))))
11528 (build-system python-build-system)
11529 (arguments
11530 '(;; Test files are not distributed on PyPi:
11531 ;; https://github.com/shibukawa/imagesize_py/issues/7
11532 #:tests? #f))
11533 (home-page "https://github.com/shibukawa/imagesize_py")
11534 (synopsis "Gets image size of files in variaous formats in Python")
11535 (description
11536 "This package allows determination of image size from
11537 PNG, JPEG, JPEG2000 and GIF files in pure Python.")
11538 (license license:expat)))
11539
11540 (define-public python2-imagesize
11541 (package-with-python2 python-imagesize))
11542
11543 (define-public python-axolotl-curve25519
11544 (package
11545 (name "python-axolotl-curve25519")
11546 (version "0.1")
11547 (source
11548 (origin
11549 (method git-fetch)
11550 (uri (git-reference
11551 (url "git://github.com/tgalal/python-axolotl-curve25519")
11552 (commit "e4a9c4de0eae27223200579c58d1f8f6d20637e2")))
11553 (file-name (string-append name "-" version "-checkout"))
11554 (sha256
11555 (base32
11556 "0agap5q0hmvf6cwzjqc05kw53pjgf6942pcivpazksmg1vk400ra"))))
11557 (build-system python-build-system)
11558 (arguments
11559 `(;; Prevent creation of the egg. This works around
11560 ;; https://debbugs.gnu.org/cgi/bugreport.cgi?bug=20765
11561 #:configure-flags '("--root=/")))
11562 (home-page "https://github.com/tgalal/python-axolotl-curve25519")
11563 (synopsis "Python wrapper for curve25519 library")
11564 (description "This is a python wrapper for the curve25519 library
11565 with ed25519 signatures. The C code was pulled from
11566 libaxolotl-android. At the moment this wrapper is meant for use by
11567 python-axolotl.")
11568 (license (list license:gpl3 ; Most files
11569 license:bsd-3)))) ; curve/curve25519-donna.c
11570
11571 (define-public python2-axolotl-curve25519
11572 (package-with-python2 python-axolotl-curve25519))
11573
11574 (define-public python-axolotl
11575 (package
11576 (name "python-axolotl")
11577 (version "0.1.35")
11578 (source
11579 (origin
11580 (method url-fetch)
11581 (uri (string-append
11582 "https://github.com/tgalal/python-axolotl/archive/"
11583 version ".tar.gz"))
11584 (file-name (string-append name "-" version ".tar.gz"))
11585 (sha256
11586 (base32 "1z8d89p7v40p4bwywjm9h4z28fdvra79ddw06azlkrfjbl7dxmz8"))))
11587 (build-system python-build-system)
11588 (arguments
11589 `(#:phases
11590 (modify-phases %standard-phases
11591 ;; Don't install tests
11592 (add-before 'install 'remove-tests
11593 (lambda _
11594 (for-each delete-file-recursively
11595 '("axolotl/tests" "build/lib/axolotl/tests"))
11596 #t)))
11597 ;; Prevent creation of the egg. This works around
11598 ;; https://debbugs.gnu.org/cgi/bugreport.cgi?bug=20765
11599 #:configure-flags '("--root=/")))
11600 (propagated-inputs
11601 `(("python-axolotl-curve25519" ,python-axolotl-curve25519)
11602 ("python-dateutil" ,python-dateutil)
11603 ("python-protobuf" ,python-protobuf)
11604 ("python-pycrypto" ,python-pycrypto)))
11605 (home-page "https://github.com/tgalal/python-axolotl")
11606 (synopsis "Python port of libaxolotl-android")
11607 (description "This is a python port of libaxolotl-android. This
11608 is a ratcheting forward secrecy protocol that works in synchronous and
11609 asynchronous messaging environments.")
11610 (license license:gpl3)))
11611
11612 (define-public python2-axolotl
11613 (package-with-python2 python-axolotl))
11614
11615 (define-public python-termstyle
11616 (package
11617 (name "python-termstyle")
11618 (version "0.1.11")
11619 (source
11620 (origin
11621 (method url-fetch)
11622 (uri (pypi-uri "termstyle" version))
11623 (sha256
11624 (base32
11625 "17wzkkcqy5zc0g68xlad3kcv66iw14d2pwqc0h9420gak0vbhx7g"))))
11626 (build-system python-build-system)
11627 (home-page "http://github.com/gfxmonk/termstyle")
11628 (synopsis "Console text coloring for Python")
11629 (description "This package provides console text coloring for Python.")
11630 (license license:bsd-3)))
11631
11632 (define-public python-rednose
11633 (package
11634 (name "python-rednose")
11635 (version "1.2.1")
11636 (source
11637 (origin
11638 (method url-fetch)
11639 (uri (pypi-uri "rednose" version))
11640 (sha256
11641 (base32
11642 "0b0bsna217lr1nykyhl5fgjly15zhdvqd4prg4wy1zrgfv7al6m0"))))
11643 (build-system python-build-system)
11644 (arguments
11645 `(#:phases
11646 (modify-phases %standard-phases
11647 (add-after 'unpack 'fix-deps
11648 (lambda _
11649 ;; See <https://github.com/JBKahn/rednose/issues/12>
11650 (substitute* "setup.py"
11651 (("python-termstyle") "termstyle"))
11652 #t)))))
11653 (propagated-inputs
11654 `(("python-colorama" ,python-colorama)
11655 ("python-termstyle" ,python-termstyle)))
11656 (native-inputs
11657 `(("python-six" ,python-six)
11658 ("python-nose" ,python-nose)))
11659 (home-page "https://github.com/JBKahn/rednose")
11660 (synopsis "Colored output for Python nosetests")
11661 (description "This package provides colored output for the
11662 @command{nosetests} command of the Python Nose unit test framework.")
11663 (license license:bsd-3)))
11664
11665 (define-public python-flask-restplus
11666 (package
11667 (name "python-flask-restplus")
11668 (version "0.9.2")
11669 (source
11670 (origin
11671 (method url-fetch)
11672 (uri (pypi-uri "flask-restplus" version))
11673 (sha256
11674 (base32
11675 "11his6ii5brpkhld0d5bwzjjw4q3vmplpd6fmgzjrvvklsbk0cf4"))))
11676 (build-system python-build-system)
11677 (propagated-inputs
11678 `(("python-aniso8601" ,python-aniso8601)
11679 ("python-flask" ,python-flask)
11680 ("python-jsonschema" ,python-jsonschema)
11681 ("python-pytz" ,python-pytz)
11682 ("python-six" ,python-six)))
11683 (native-inputs
11684 `(("python-tzlocal" ,python-tzlocal)
11685 ("python-blinker" ,python-blinker)
11686 ("python-nose" ,python-nose)
11687 ("python-rednose" ,python-rednose)))
11688 (home-page "https://github.com/noirbizarre/flask-restplus")
11689 (synopsis "Framework for documented API development with Flask")
11690 (description "This package provides a framework for API development with
11691 the Flask web framework in Python. It is similar to package
11692 @code{python-flask-restful} but supports the @code{python-swagger}
11693 documentation builder.")
11694 (license license:expat)))