Merge branch 'master' into core-updates
[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, 2017 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, 2017 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, 2017 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, 2017 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, 2017 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, 2017 ng0 <contact.ng0@cryptolab.net>
27 ;;; Copyright © 2016 Dylan Jeffers <sapientech@sapientech@openmailbox.org>
28 ;;; Copyright © 2016 David Craven <david@craven.ch>
29 ;;; Copyright © 2016, 2017 Marius Bakke <mbakke@fastmail.com>
30 ;;; Copyright © 2016, 2017 Stefan Reichör <stefan@xsteve.at>
31 ;;; Copyright © 2016 Dylan Jeffers <sapientech@sapientech@openmailbox.org>
32 ;;; Copyright © 2016 Alex Vong <alexvong1995@gmail.com>
33 ;;; Copyright © 2016, 2017 Arun Isaac <arunisaac@systemreboot.net>
34 ;;; Copyright © 2016, 2017 Julien Lepiller <julien@lepiller.eu>
35 ;;; Copyright © 2016, 2017 Tobias Geerinckx-Rice <me@tobias.gr>
36 ;;; Copyright © 2016, 2017 Thomas Danckaert <post@thomasdanckaert.be>
37 ;;; Copyright © 2017 Carlo Zancanaro <carlo@zancanaro.id.au>
38 ;;; Copyright © 2017 Frederick M. Muriithi <fredmanglis@gmail.com>
39 ;;; Copyright © 2017 Adriano Peluso <catonano@gmail.com>
40 ;;; Copyright © 2017 Ben Sturmfels <ben@sturm.com.au>
41 ;;; Copyright © 2017 Mathieu Othacehe <m.othacehe@gmail.com>
42 ;;; Copyright © 2017 José Miguel Sánchez García <jmi2k@openmailbox.org>
43 ;;; Copyright © 2017 Roel Janssen <roel@gnu.org>
44 ;;; Copyright © 2017 Kei Kebreau <kei@openmailbox.org>
45 ;;; Copyright © 2017 Rutger Helling <rhelling@mykolab.com>
46 ;;;
47 ;;; This file is part of GNU Guix.
48 ;;;
49 ;;; GNU Guix is free software; you can redistribute it and/or modify it
50 ;;; under the terms of the GNU General Public License as published by
51 ;;; the Free Software Foundation; either version 3 of the License, or (at
52 ;;; your option) any later version.
53 ;;;
54 ;;; GNU Guix is distributed in the hope that it will be useful, but
55 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
56 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
57 ;;; GNU General Public License for more details.
58 ;;;
59 ;;; You should have received a copy of the GNU General Public License
60 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
61
62 (define-module (gnu packages python)
63 #:use-module ((guix licenses) #:prefix license:)
64 #:use-module (gnu packages)
65 #:use-module (gnu packages algebra)
66 #:use-module (gnu packages adns)
67 #:use-module (gnu packages attr)
68 #:use-module (gnu packages backup)
69 #:use-module (gnu packages bash)
70 #:use-module (gnu packages compression)
71 #:use-module (gnu packages crypto)
72 #:use-module (gnu packages databases)
73 #:use-module (gnu packages django)
74 #:use-module (gnu packages file)
75 #:use-module (gnu packages fontutils)
76 #:use-module (gnu packages gcc)
77 #:use-module (gnu packages ghostscript)
78 #:use-module (gnu packages gl)
79 #:use-module (gnu packages glib)
80 #:use-module (gnu packages graphviz)
81 #:use-module (gnu packages gstreamer)
82 #:use-module (gnu packages gtk)
83 #:use-module (gnu packages icu4c)
84 #:use-module (gnu packages image)
85 #:use-module (gnu packages imagemagick)
86 #:use-module (gnu packages libevent)
87 #:use-module (gnu packages libffi)
88 #:use-module (gnu packages linux)
89 #:use-module (gnu packages man)
90 #:use-module (gnu packages maths)
91 #:use-module (gnu packages multiprecision)
92 #:use-module (gnu packages networking)
93 #:use-module (gnu packages ncurses)
94 #:use-module (gnu packages openstack)
95 #:use-module (gnu packages password-utils)
96 #:use-module (gnu packages pcre)
97 #:use-module (gnu packages perl)
98 #:use-module (gnu packages pkg-config)
99 #:use-module (gnu packages protobuf)
100 #:use-module (gnu packages qt)
101 #:use-module (gnu packages readline)
102 #:use-module (gnu packages sdl)
103 #:use-module (gnu packages shells)
104 #:use-module (gnu packages ssh)
105 #:use-module (gnu packages statistics)
106 #:use-module (gnu packages tex)
107 #:use-module (gnu packages texinfo)
108 #:use-module (gnu packages tls)
109 #:use-module (gnu packages version-control)
110 #:use-module (gnu packages video)
111 #:use-module (gnu packages web)
112 #:use-module (gnu packages base)
113 #:use-module (gnu packages xml)
114 #:use-module (gnu packages xorg)
115 #:use-module (gnu packages xdisorg)
116 #:use-module (gnu packages tcl)
117 #:use-module (gnu packages bdw-gc)
118 #:use-module (guix packages)
119 #:use-module (guix download)
120 #:use-module (guix git-download)
121 #:use-module (guix utils)
122 #:use-module (guix build-system gnu)
123 #:use-module (guix build-system cmake)
124 #:use-module (guix build-system python)
125 #:use-module (guix build-system trivial)
126 #:use-module (srfi srfi-1))
127
128 (define-public python-2.7
129 (package
130 (name "python")
131 (version "2.7.13")
132 (source
133 (origin
134 (method url-fetch)
135 (uri (string-append "https://www.python.org/ftp/python/"
136 version "/Python-" version ".tar.xz"))
137 (sha256
138 (base32
139 "0cgpk3zk0fgpji59pb4zy9nzljr70qzgv1vpz5hq5xw2d2c47m9m"))
140 (patches (search-patches "python-2.7-search-paths.patch"
141 "python-2-deterministic-build-info.patch"
142 "python-2.7-site-prefixes.patch"
143 "python-2.7-source-date-epoch.patch"
144 "python-2.7-getentropy-on-old-kernels.patch"))
145 (modules '((guix build utils)))
146 ;; suboptimal to delete failing tests here, but if we delete them in the
147 ;; arguments then we need to make sure to strip out that phase when it
148 ;; gets inherited by python and python-minimal.
149 (snippet
150 '(begin
151 (for-each delete-file
152 '("Lib/test/test_compileall.py"
153 "Lib/test/test_ctypes.py" ; fails on mips64el
154 "Lib/test/test_distutils.py"
155 "Lib/test/test_import.py"
156 "Lib/test/test_shutil.py"
157 "Lib/test/test_socket.py"
158 "Lib/test/test_subprocess.py"))
159 #t))))
160 (outputs '("out"
161 "tk")) ;tkinter; adds 50 MiB to the closure
162 (build-system gnu-build-system)
163 (arguments
164 `(;; 356 tests OK.
165 ;; 6 tests failed:
166 ;; test_compileall test_distutils test_import test_shutil test_socket
167 ;; test_subprocess
168 ;; 39 tests skipped:
169 ;; test_aepack test_al test_applesingle test_bsddb test_bsddb185
170 ;; test_bsddb3 test_cd test_cl test_codecmaps_cn test_codecmaps_hk
171 ;; test_codecmaps_jp test_codecmaps_kr test_codecmaps_tw test_curses
172 ;; test_dl test_gdb test_gl test_imageop test_imgfile test_ioctl
173 ;; test_kqueue test_linuxaudiodev test_macos test_macostools
174 ;; test_msilib test_ossaudiodev test_scriptpackages test_smtpnet
175 ;; test_socketserver test_startfile test_sunaudiodev test_timeout
176 ;; test_tk test_ttk_guionly test_urllib2net test_urllibnet
177 ;; test_winreg test_winsound test_zipfile64
178 ;; 4 skips unexpected on linux2:
179 ;; test_bsddb test_bsddb3 test_gdb test_ioctl
180 #:test-target "test"
181 #:configure-flags
182 (list "--enable-shared" ;allow embedding
183 "--with-system-ffi" ;build ctypes
184 "--with-ensurepip=install" ;install pip and setuptools
185 "--enable-unicode=ucs4"
186 (string-append "LDFLAGS=-Wl,-rpath="
187 (assoc-ref %outputs "out") "/lib"))
188
189 #:modules ((ice-9 ftw) (ice-9 match)
190 (guix build utils) (guix build gnu-build-system))
191 #:phases
192 (modify-phases %standard-phases
193 (add-before
194 'configure 'patch-lib-shells
195 (lambda _
196 ;; Filter for existing files, since some may not exist in all
197 ;; versions of python that are built with this recipe.
198 (substitute* (filter file-exists?
199 '("Lib/subprocess.py"
200 "Lib/popen2.py"
201 "Lib/distutils/tests/test_spawn.py"
202 "Lib/test/test_subprocess.py"))
203 (("/bin/sh") (which "sh")))
204
205 ;; Use zero as the timestamp in .pyc files so that builds are
206 ;; deterministic. TODO: Remove it when this variable is set in
207 ;; gnu-build-system.scm.
208 (setenv "SOURCE_DATE_EPOCH" "1")
209 #t))
210 (add-before 'configure 'do-not-record-configure-flags
211 (lambda* (#:key configure-flags #:allow-other-keys)
212 ;; Remove configure flags from the installed '_sysconfigdata.py'
213 ;; and 'Makefile' so we don't end up keeping references to the
214 ;; build tools.
215 ;;
216 ;; Preserve at least '--with-system-ffi' since otherwise the
217 ;; thing tries to build libffi, fails, and we end up with a
218 ;; Python that lacks ctypes.
219 (substitute* "configure"
220 (("^CONFIG_ARGS=.*$")
221 (format #f "CONFIG_ARGS='~a'\n"
222 (if (member "--with-system-ffi" configure-flags)
223 "--with-system-ffi"
224 ""))))
225 #t))
226 (add-before
227 'check 'pre-check
228 (lambda _
229 ;; 'Lib/test/test_site.py' needs a valid $HOME
230 (setenv "HOME" (getcwd))
231 #t))
232 (add-after
233 'unpack 'set-source-file-times-to-1980
234 ;; XXX One of the tests uses a ZIP library to pack up some of the
235 ;; source tree, and fails with "ZIP does not support timestamps
236 ;; before 1980". Work around this by setting the file times in the
237 ;; source tree to sometime in early 1980.
238 (lambda _
239 (let ((circa-1980 (* 10 366 24 60 60)))
240 (ftw "." (lambda (file stat flag)
241 (utime file circa-1980 circa-1980)
242 #t))
243 #t)))
244 (add-after 'install 'remove-tests
245 ;; Remove 25 MiB of unneeded unit tests. Keep test_support.*
246 ;; because these files are used by some libraries out there.
247 (lambda* (#:key outputs #:allow-other-keys)
248 (let ((out (assoc-ref outputs "out")))
249 (match (scandir (string-append out "/lib")
250 (lambda (name)
251 (string-prefix? "python" name)))
252 ((pythonX.Y)
253 (let ((testdir (string-append out "/lib/" pythonX.Y
254 "/test")))
255 (with-directory-excursion testdir
256 (for-each delete-file-recursively
257 (scandir testdir
258 (match-lambda
259 ((or "." "..") #f)
260 (file
261 (not
262 (string-prefix? "test_support."
263 file))))))
264 (call-with-output-file "__init__.py" (const #t))
265 #t)))))))
266 (add-before 'strip 'make-libraries-writable
267 (lambda* (#:key outputs #:allow-other-keys)
268 ;; Make .so files writable so they can be stripped.
269 (let ((out (assoc-ref outputs "out")))
270 (for-each (lambda (file)
271 (chmod file #o755))
272 (find-files (string-append out "/lib")
273 "\\.so"))
274 #t)))
275 (add-after 'install 'move-tk-inter
276 (lambda* (#:key outputs #:allow-other-keys)
277 ;; When Tkinter support is built move it to a separate output so
278 ;; that the main output doesn't contain a reference to Tcl/Tk.
279 (let ((out (assoc-ref outputs "out"))
280 (tk (assoc-ref outputs "tk")))
281 (when tk
282 (match (find-files out "tkinter.*\\.so")
283 ((tkinter.so)
284 ;; The .so is in OUT/lib/pythonX.Y/lib-dynload, but we
285 ;; want it under TK/lib/pythonX.Y/site-packages.
286 (let* ((len (string-length out))
287 (target (string-append
288 tk "/"
289 (string-drop
290 (dirname (dirname tkinter.so))
291 len)
292 "/site-packages")))
293 (install-file tkinter.so target)
294 (delete-file tkinter.so)))))
295 #t))))))
296 (inputs
297 `(("bzip2" ,bzip2)
298 ("gdbm" ,gdbm)
299 ("libffi" ,libffi) ; for ctypes
300 ("sqlite" ,sqlite) ; for sqlite extension
301 ("openssl" ,openssl)
302 ("readline" ,readline)
303 ("zlib" ,zlib)
304 ("tcl" ,tcl)
305 ("tk" ,tk))) ; for tkinter
306 (native-inputs
307 `(("pkg-config" ,pkg-config)))
308 (native-search-paths
309 (list (search-path-specification
310 (variable "PYTHONPATH")
311 (files '("lib/python2.7/site-packages")))))
312 (home-page "https://www.python.org")
313 (synopsis "High-level, dynamically-typed programming language")
314 (description
315 "Python is a remarkably powerful dynamic programming language that
316 is used in a wide variety of application domains. Some of its key
317 distinguishing features include: clear, readable syntax; strong
318 introspection capabilities; intuitive object orientation; natural
319 expression of procedural code; full modularity, supporting hierarchical
320 packages; exception-based error handling; and very high level dynamic
321 data types.")
322 (license license:psfl)))
323
324 ;; Current 2.x version.
325 (define-public python-2 python-2.7)
326
327 (define-public python-3.5
328 (package (inherit python-2)
329 (version "3.5.3")
330 (source (origin
331 (method url-fetch)
332 (uri (string-append "https://www.python.org/ftp/python/"
333 version "/Python-" version ".tar.xz"))
334 (patches (search-patches
335 "python-fix-tests.patch"
336 "python-3.5-fix-tests.patch"
337 "python-3.5-getentropy-on-old-kernels.patch"
338 "python-3-deterministic-build-info.patch"
339 "python-3-search-paths.patch"))
340 (patch-flags '("-p0"))
341 (sha256
342 (base32
343 "1c6v1n9nz4mlx9mw1125fxpmbrgniqdbbx9hnqx44maqazb2mzpf"))
344 (snippet
345 '(begin
346 (for-each delete-file
347 '("Lib/ctypes/test/test_win32.py" ; fails on aarch64
348 "Lib/test/test_fcntl.py"))
349 #t))))
350 (arguments (substitute-keyword-arguments (package-arguments python-2)
351 ((#:tests? _) #t)))
352 (native-search-paths
353 (list (search-path-specification
354 (variable "PYTHONPATH")
355 (files (list (string-append "lib/python"
356 (version-major+minor version)
357 "/site-packages"))))))))
358
359 ;; Current 3.x version.
360 (define-public python-3 python-3.5)
361
362 ;; Current major version.
363 (define-public python python-3)
364
365 ;; Minimal variants of Python, mostly used to break the cycle between Tk and
366 ;; Python (Tk -> libxcb -> Python.)
367
368 (define-public python2-minimal
369 (package (inherit python-2)
370 (name "python-minimal")
371 (outputs '("out"))
372
373 ;; Keep zlib, which is used by 'pip' (via the 'zipimport' module), which
374 ;; is invoked upon 'make install'. 'pip' also expects 'ctypes' and thus
375 ;; libffi.
376 (inputs `(("libffi" ,libffi)
377 ("zlib" ,zlib)))))
378
379 (define-public python-minimal
380 (package (inherit python)
381 (name "python-minimal")
382 (outputs '("out"))
383
384 ;; Build fails due to missing ctypes without libffi.
385 ;; OpenSSL is a mandatory dependency of Python 3.x, for urllib;
386 ;; zlib is required by 'zipimport', used by pip.
387 (inputs `(("libffi" ,libffi)
388 ("openssl" ,openssl)
389 ("zlib" ,zlib)))))
390
391 (define* (wrap-python3 python
392 #:optional
393 (name (string-append (package-name python) "-wrapper")))
394 (package (inherit python)
395 (name name)
396 (source #f)
397 (build-system trivial-build-system)
398 (outputs '("out"))
399 (inputs `(("bash" ,bash)))
400 (propagated-inputs `(("python" ,python)))
401 (arguments
402 `(#:modules ((guix build utils))
403 #:builder
404 (begin
405 (use-modules (guix build utils))
406 (let ((bin (string-append (assoc-ref %outputs "out") "/bin"))
407 (python (string-append (assoc-ref %build-inputs "python") "/bin/")))
408 (mkdir-p bin)
409 (for-each
410 (lambda (old new)
411 (symlink (string-append python old)
412 (string-append bin "/" new)))
413 `("python3" ,"pydoc3" ,"idle3" ,"pip3")
414 `("python" ,"pydoc" ,"idle" ,"pip"))
415 ;; python-config outputs search paths based upon its location,
416 ;; use a bash wrapper to avoid changing its outputs.
417 (let ((bash (string-append (assoc-ref %build-inputs "bash")
418 "/bin/bash"))
419 (old (string-append python "python3-config"))
420 (new (string-append bin "/python-config")))
421 (with-output-to-file new
422 (lambda ()
423 (format #t "#!~a~%" bash)
424 (format #t "exec \"~a\" \"$@\"~%" old)
425 (chmod new #o755)
426 #t)))))))
427 (synopsis "Wrapper for the Python 3 commands")
428 (description
429 "This package provides wrappers for the commands of Python@tie{}3.x such
430 that they can be invoked under their usual name---e.g., @command{python}
431 instead of @command{python3}.")))
432
433 (define-public python-wrapper (wrap-python3 python))
434 (define-public python-minimal-wrapper (wrap-python3 python-minimal))
435
436 (define-public python-psutil
437 (package
438 (name "python-psutil")
439 (version "4.3.0")
440 (source
441 (origin
442 (method url-fetch)
443 (uri (pypi-uri "psutil" version))
444 (sha256
445 (base32
446 "1w4r09fvn6kd80m5mx4ws1wz100brkaq6hzzpwrns8cgjzjpl6c6"))))
447 (build-system python-build-system)
448 (arguments
449 ;; FIXME: some tests does not return and times out.
450 '(#:tests? #f))
451 (home-page "https://www.github.com/giampaolo/psutil")
452 (synopsis "Library for retrieving information on running processes")
453 (description
454 "psutil (Python system and process utilities) is a library for retrieving
455 information on running processes and system utilization (CPU, memory, disks,
456 network) in Python. It is useful mainly for system monitoring, profiling and
457 limiting process resources and management of running processes. It implements
458 many functionalities offered by command line tools such as: ps, top, lsof,
459 netstat, ifconfig, who, df, kill, free, nice, ionice, iostat, iotop, uptime,
460 pidof, tty, taskset, pmap.")
461 (license license:bsd-3)))
462
463 (define-public python2-psutil
464 (package-with-python2 python-psutil))
465
466 (define-public python-passlib
467 (package
468 (name "python-passlib")
469 (version "1.7.1")
470 (source
471 (origin
472 (method url-fetch)
473 (uri (pypi-uri "passlib" version))
474 (sha256
475 (base32
476 "1q2khqpj9rlcgdmkypjdq1kswvhjf72bq0zk2cv669cc2dj8z51x"))))
477 (build-system python-build-system)
478 (native-inputs
479 `(("python-nose" ,python-nose)))
480 (propagated-inputs
481 `(("python-py-bcrypt" ,python-py-bcrypt)))
482 (arguments
483 `(#:phases
484 (alist-cons-before
485 'check 'set-PYTHON_EGG_CACHE
486 ;; some tests require access to "$HOME/.cython"
487 (lambda* _ (setenv "PYTHON_EGG_CACHE" "/tmp"))
488 %standard-phases)))
489 (home-page "https://bitbucket.org/ecollins/passlib")
490 (synopsis
491 "Comprehensive password hashing framework")
492 (description
493 "Passlib is a password hashing library for Python 2 & 3, which provides
494 cross-platform implementations of over 30 password hashing algorithms, as well
495 as a framework for managing existing password hashes. It's designed to be
496 useful for a wide range of tasks, from verifying a hash found in /etc/shadow,
497 to providing full-strength password hashing for multi-user application.")
498 (license license:bsd-3)))
499
500 (define-public python2-passlib
501 (package-with-python2 python-passlib))
502
503 (define-public python-py-bcrypt
504 (package
505 (name "python-py-bcrypt")
506 (version "0.4")
507 (source
508 (origin
509 (method url-fetch)
510 (uri (string-append
511 "https://pypi.python.org/packages/source/p/py-bcrypt/py-bcrypt-"
512 version
513 ".tar.gz"))
514 (sha256
515 (base32
516 "0y6smdggwi5s72v6p1nn53dg6w05hna3d264cq6kas0lap73p8az"))))
517 (build-system python-build-system)
518 (home-page "https://code.google.com/p/py-bcrypt")
519 (synopsis
520 "Bcrypt password hashing and key derivation")
521 (description
522 "A python wrapper of OpenBSD's Blowfish password hashing code. This
523 system hashes passwords using a version of Bruce Schneier's Blowfish block
524 cipher with modifications designed to raise the cost of off-line password
525 cracking and frustrate fast hardware implementation. The computation cost of
526 the algorithm is parametised, so it can be increased as computers get faster.
527 The intent is to make a compromise of a password database less likely to
528 result in an attacker gaining knowledge of the plaintext passwords (e.g. using
529 John the Ripper).")
530 ;; "sha2.c" is under BSD-3;
531 ;; "blowfish.c" and "bcrypt.c" are under BSD-4;
532 ;; the rest is under ISC.
533 (license (list license:isc license:bsd-3 license:bsd-4))))
534
535 (define-public python2-py-bcrypt
536 (package-with-python2 python-py-bcrypt))
537
538
539 (define-public python-paramiko
540 (package
541 (name "python-paramiko")
542 (version "2.1.2")
543 (source
544 (origin
545 (method url-fetch)
546 (uri (pypi-uri "paramiko" version))
547 (sha256
548 (base32
549 "04734n0wy3hxk6rij4fr29in5jmr70nxpc7pqi2ksbjysfz4kbjz"))))
550 (build-system python-build-system)
551 (arguments
552 '(#:phases
553 (modify-phases %standard-phases
554 (replace 'check
555 (lambda _
556 (zero? (system* "python" "test.py")))))))
557 (propagated-inputs
558 `(("python-pyasn1" ,python-pyasn1)
559 ("python-cryptography" ,python-cryptography)))
560 (home-page "http://www.paramiko.org/")
561 (synopsis "SSHv2 protocol library")
562 (description "Paramiko is a python implementation of the SSHv2 protocol,
563 providing both client and server functionality. While it leverages a Python C
564 extension for low level cryptography (PyCrypto), Paramiko itself is a pure
565 Python interface around SSH networking concepts.")
566 (license license:lgpl2.1+)))
567
568 (define-public python2-paramiko
569 (package-with-python2 python-paramiko))
570
571
572 (define-public python-httplib2
573 (package
574 (name "python-httplib2")
575 (version "0.9.2")
576 (source
577 (origin
578 (method url-fetch)
579 (uri (pypi-uri "httplib2" version))
580 (sha256
581 (base32
582 "126rsryvw9vhbf3qmsfw9lf4l4xm2srmgs439lgma4cpag4s3ay3"))))
583 (build-system python-build-system)
584 (home-page "https://github.com/jcgregorio/httplib2")
585 (synopsis "Comprehensive HTTP client library")
586 (description
587 "A comprehensive HTTP client library supporting many features left out of
588 other HTTP libraries.")
589 (license license:expat)))
590
591 (define-public python2-httplib2
592 (package-with-python2 python-httplib2))
593
594 (define-public python-ecdsa
595 (package
596 (name "python-ecdsa")
597 (version "0.13")
598 (source
599 (origin
600 (method url-fetch)
601 (uri (string-append
602 "https://pypi.python.org/packages/source/e/ecdsa/ecdsa-"
603 version
604 ".tar.gz"))
605 (sha256
606 (base32
607 "1yj31j0asmrx4an9xvsaj2icdmzy6pw0glfpqrrkrphwdpi1xkv4"))))
608 (build-system python-build-system)
609 (inputs
610 `(("openssl" ,openssl)))
611 (home-page
612 "https://github.com/warner/python-ecdsa")
613 (synopsis
614 "ECDSA cryptographic signature library (pure python)")
615 (description
616 "This is an easy-to-use implementation of ECDSA cryptography (Elliptic
617 Curve Digital Signature Algorithm), implemented purely in Python. With this
618 library, you can quickly create keypairs (signing key and verifying key), sign
619 messages, and verify the signatures. The keys and signatures are very short,
620 making them easy to handle and incorporate into other protocols.")
621 (license license:expat)))
622
623 (define-public python2-ecdsa
624 (package-with-python2 python-ecdsa))
625
626 (define-public python-ccm
627 (package
628 (name "python-ccm")
629 (version "2.1.6")
630 (source
631 (origin
632 (method url-fetch)
633 (uri (pypi-uri "ccm" version))
634 (sha256
635 (base32
636 "177dfxsmk3k4cih6fh6v8d91bh4nqx7ns6pc07w7m7i3cvdx3c8n"))))
637 (build-system python-build-system)
638 (propagated-inputs
639 `(("python-pyyaml" ,python-pyyaml)
640 ;; Not listed in setup.py, but used in ccmlib/node.py for full
641 ;; functionality
642 ("python-psutil" ,python-psutil)
643 ("python-six" ,python-six)))
644 (home-page "https://github.com/pcmanus/ccm")
645 (synopsis "Cassandra Cluster Manager for Apache Cassandra clusters on
646 localhost")
647 (description "Cassandra Cluster Manager is a development tool for testing
648 local Cassandra clusters. It creates, launches and removes Cassandra clusters
649 on localhost.")
650 (license license:asl2.0)))
651
652 (define-public python2-ccm
653 (package-with-python2 python-ccm))
654
655 (define-public python-pytz
656 (package
657 (name "python-pytz")
658 (version "2016.10")
659 (source
660 (origin
661 (method url-fetch)
662 (uri (pypi-uri "pytz" version ".tar.bz2"))
663 (sha256
664 (base32
665 "0az099cyp6p5xbsvfcdacj4hvxncbwm2ayn3h55mcp07zb2b45kh"))))
666 (build-system python-build-system)
667 (arguments `(#:tests? #f)) ; no test target
668 (home-page "http://pythonhosted.org/pytz")
669 (synopsis "Python timezone library")
670 (description
671 "This library allows accurate and cross platform timezone calculations
672 using Python 2.4 or higher and provides access to the Olson timezone database.")
673 (license license:expat)))
674
675 (define-public python2-pytz
676 (package-with-python2 python-pytz))
677
678
679 (define-public python-babel
680 (package
681 (name "python-babel")
682 (version "2.3.4")
683 (source
684 (origin
685 (method url-fetch)
686 (uri (pypi-uri "Babel" version))
687 (sha256
688 (base32
689 "0x98qqqw35xllpcama013a9788ly84z8dm1w2wwfpxh2710c8df5"))))
690 (build-system python-build-system)
691 (propagated-inputs
692 `(("python-pytz" ,python-pytz)))
693 (arguments `(#:tests? #f)) ; no test target
694 (home-page "http://babel.pocoo.org/")
695 (synopsis
696 "Tools for internationalizing Python applications")
697 (description
698 "Babel is composed of two major parts:
699 - tools to build and work with gettext message catalogs
700 - a Python interface to the CLDR (Common Locale Data Repository), providing
701 access to various locale display names, localized number and date formatting,
702 etc. ")
703 (license license:bsd-3)))
704
705 (define-public python2-babel
706 (package-with-python2 python-babel))
707
708 (define-public python2-backport-ssl-match-hostname
709 (package
710 (name "python2-backport-ssl-match-hostname")
711 (version "3.5.0.1")
712 (source
713 (origin
714 (method url-fetch)
715 (uri (string-append
716 "https://pypi.python.org/packages/source/b/"
717 "backports.ssl_match_hostname/backports.ssl_match_hostname-"
718 version ".tar.gz"))
719 (sha256
720 (base32
721 "1wndipik52cyqy0677zdgp90i435pmvwd89cz98lm7ri0y3xjajh"))))
722 (build-system python-build-system)
723 (arguments
724 `(#:python ,python-2
725 #:tests? #f)) ; no test target
726 (home-page "https://bitbucket.org/brandon/backports.ssl_match_hostname")
727 (synopsis "Backport of ssl.match_hostname() function from Python 3.5")
728 (description
729 "This backport brings the ssl.match_hostname() function to users of
730 earlier versions of Python. The function checks the hostname in the
731 certificate returned by the server to which a connection has been established,
732 and verifies that it matches the intended target hostname.")
733 (license license:psfl)))
734
735 (define-public python-hdf4
736 (package
737 (name "python-hdf4")
738 (version "0.9")
739 (source
740 (origin
741 (method url-fetch)
742 (uri (pypi-uri name version))
743 (sha256
744 (base32
745 "1hjiyrxvxk9817qyqky3nar4y3fs4z8wxz0n884zzb5wi6skrjks"))))
746 (build-system python-build-system)
747 (native-inputs `(("nose" ,python-nose)))
748 (propagated-inputs `(("numpy" ,python-numpy)))
749 (inputs
750 `(("hdf4" ,hdf4)
751 ("libjpeg" ,libjpeg)
752 ("zlib" ,zlib)))
753 (arguments
754 `(#:phases
755 (modify-phases %standard-phases
756 (replace 'check
757 (lambda _
758 ;; The 'runexamples' script sets PYTHONPATH to CWD, then goes
759 ;; on to import numpy. Somehow this works on their CI system.
760 ;; Let's just manage PYTHONPATH here instead.
761 (substitute* "runexamples.sh"
762 (("export PYTHONPATH=.*") ""))
763 (setenv "PYTHONPATH"
764 (string-append (getcwd) ":"
765 (getenv "PYTHONPATH")))
766 (and (zero? (system* "./runexamples.sh"))
767 (zero? (system* "nosetests" "-v"))))))))
768 (home-page "https://github.com/fhs/python-hdf4")
769 (synopsis "Python interface to the NCSA HDF4 library")
770 (description
771 "Python-HDF4 is a python wrapper around the NCSA HDF version 4 library,
772 which implements the SD (Scientific Dataset), VS (Vdata) and V (Vgroup) API’s.
773 NetCDF files can also be read and modified. Python-HDF4 is a fork of
774 @url{http://hdfeos.org/software/pyhdf.php,pyhdf}.")
775 (license license:expat)))
776
777 (define-public python2-hdf4
778 (package-with-python2 python-hdf4))
779
780 (define-public python-h5py
781 (package
782 (name "python-h5py")
783 (version "2.6.0")
784 (source
785 (origin
786 (method url-fetch)
787 (uri (pypi-uri "h5py" version))
788 (sha256
789 (base32
790 "0df46dg7i7xfking9lp221bfm8dbl974yvlrbi1w7r6m61ac7bxj"))))
791 (build-system python-build-system)
792 (arguments
793 `(#:tests? #f ; no test target
794 #:phases
795 (modify-phases %standard-phases
796 (add-after 'unpack 'fix-hdf5-paths
797 (lambda* (#:key inputs #:allow-other-keys)
798 (let ((prefix (assoc-ref inputs "hdf5")))
799 (substitute* "setup_build.py"
800 (("\\['/opt/local/lib', '/usr/local/lib'\\]")
801 (string-append "['" prefix "/lib" "']"))
802 (("'/opt/local/include', '/usr/local/include'")
803 (string-append "'" prefix "/include" "'")))
804 (substitute* "setup_configure.py"
805 (("\\['/usr/local/lib', '/opt/local/lib'\\]")
806 (string-append "['" prefix "/lib" "']")))
807 #t))))))
808 (propagated-inputs
809 `(("python-six" ,python-six)
810 ("python-numpy" ,python-numpy)))
811 (inputs
812 `(("hdf5" ,hdf5)))
813 (native-inputs
814 `(("python-cython" ,python-cython)
815 ("python-pkgconfig" ,python-pkgconfig)))
816 (home-page "http://www.h5py.org/")
817 (synopsis "Read and write HDF5 files from Python")
818 (description
819 "The h5py package provides both a high- and low-level interface to the
820 HDF5 library from Python. The low-level interface is intended to be a
821 complete wrapping of the HDF5 API, while the high-level component supports
822 access to HDF5 files, datasets and groups using established Python and NumPy
823 concepts.")
824 (license license:bsd-3)))
825
826 (define-public python2-h5py
827 (package-with-python2 python-h5py))
828
829 (define-public python-netcdf4
830 (package
831 (name "python-netcdf4")
832 (version "1.2.7")
833 (source
834 (origin
835 (method url-fetch)
836 (uri (pypi-uri "netCDF4" version))
837 (sha256
838 (base32
839 "1fllizmnpw0zkzzm4j9pgamarlzfn3kmv9zrm0w65q1y31h9ni0c"))))
840 (build-system python-build-system)
841 (native-inputs
842 `(("python-cython" ,python-cython)))
843 (propagated-inputs
844 `(("python-numpy" ,python-numpy)))
845 (inputs
846 `(("netcdf" ,netcdf)
847 ("hdf4" ,hdf4)
848 ("hdf5" ,hdf5)))
849 (arguments
850 '(#:phases
851 (modify-phases %standard-phases
852 (replace 'check
853 (lambda _
854 (setenv "NO_NET" "1") ; disable opendap tests
855 (with-directory-excursion "test"
856 (setenv "PYTHONPATH" ; find and add the library we just built
857 (string-append
858 (car (find-files "../build" "lib.*"
859 #:directories? #:t
860 #:fail-on-error? #:t))
861 ":" (getenv "PYTHONPATH")))
862 (zero? (system* "python" "run_all.py"))))))))
863 (home-page
864 "https://github.com/Unidata/netcdf4-python")
865 (synopsis "Python/numpy interface to the netCDF library")
866 (description "Netcdf4-python is a Python interface to the netCDF C
867 library. netCDF version 4 has many features not found in earlier
868 versions of the library and is implemented on top of HDF5. This module
869 can read and write files in both the new netCDF 4 and the old netCDF 3
870 format, and can create files that are readable by HDF5 clients. The
871 API is modelled after @code{Scientific.IO.NetCDF}, and should be familiar
872 to users of that module.")
873 ;; The software is mainly ISC, but includes some files covered
874 ;; by the Expat license.
875 (license (list license:isc license:expat))))
876
877 (define-public python2-netcdf4
878 (package-with-python2 python-netcdf4))
879
880 (define-public python-lockfile
881 (package
882 (name "python-lockfile")
883 (version "0.12.2")
884 (source
885 (origin
886 (method url-fetch)
887 (uri (string-append "https://pypi.python.org/packages/source/l/lockfile/"
888 "lockfile-" version ".tar.gz"))
889 (sha256
890 (base32
891 "16gpx5hm73ah5n1079ng0vy381hl802v606npkx4x8nb0gg05vba"))))
892 (build-system python-build-system)
893 (arguments '(#:test-target "check"))
894 (native-inputs
895 `(("python-pbr" ,python-pbr)))
896 (home-page "https://launchpad.net/pylockfile")
897 (synopsis "Platform-independent file locking module")
898 (description
899 "The lockfile package exports a LockFile class which provides a simple
900 API for locking files.")
901 (license license:expat)))
902
903 (define-public python2-lockfile
904 (package-with-python2 python-lockfile))
905
906 (define-public python-mock
907 (package
908 (name "python-mock")
909 (version "1.0.1")
910 (source
911 (origin
912 (method url-fetch)
913 (uri (pypi-uri "mock" version))
914 (sha256
915 (base32
916 "0kzlsbki6q0awf89rc287f3aj8x431lrajf160a70z0ikhnxsfdq"))))
917 (build-system python-build-system)
918 (arguments '(#:test-target "check"))
919 (home-page "https://github.com/testing-cabal/mock")
920 (synopsis "Python mocking and patching library for testing")
921 (description
922 "Mock is a library for testing in Python. It allows you to replace parts
923 of your system under test with mock objects and make assertions about how they
924 have been used.")
925 (license license:expat)))
926
927 (define-public python2-mock
928 (package-with-python2 python-mock))
929
930 ;;; Some packages (notably, certbot and python-acme) rely on this newer version
931 ;;; of python-mock. However, a large number of packages fail to build with
932 ;;; mock@2, so we add a new variable for now. Also, there may be a dependency
933 ;;; cycle between mock and six, so we avoid creating python2-mock@2 for now.
934 (define-public python-mock-2
935 (package
936 (inherit python-mock)
937 (version "2.0.0")
938 (source
939 (origin
940 (method url-fetch)
941 (uri (pypi-uri "mock" version))
942 (sha256
943 (base32
944 "1flbpksir5sqrvq2z0dp8sl4bzbadg21sj4d42w3klpdfvgvcn5i"))))
945 (propagated-inputs
946 `(("python-pbr" ,python-pbr-minimal)
947 ,@(package-propagated-inputs python-mock)))))
948
949 (define-public python-setuptools
950 (package
951 (name "python-setuptools")
952 (version "31.0.0")
953 (source
954 (origin
955 (method url-fetch)
956 (uri (pypi-uri "setuptools" version))
957 (sha256
958 (base32
959 "0ypybh4hx3bv4vhg2dc74xpj1g56ggnaffm87k4abhwjwq6wq608"))
960 (modules '((guix build utils)))
961 (snippet
962 '(begin
963 ;; Remove included binaries which are used to build self-extracting
964 ;; installers for Windows.
965 ;; TODO: Find some way to build them ourself so we can include them.
966 (for-each delete-file (find-files "setuptools" "^(cli|gui).*\\.exe$"))
967 #t))))
968 (build-system python-build-system)
969 ;; FIXME: Tests require pytest, which itself relies on setuptools.
970 ;; One could bootstrap with an internal untested setuptools.
971 (arguments
972 `(#:tests? #f))
973 (home-page "https://pypi.python.org/pypi/setuptools")
974 (synopsis
975 "Library designed to facilitate packaging Python projects")
976 (description
977 "Setuptools is a fully-featured, stable library designed to facilitate
978 packaging Python projects, where packaging includes:
979 Python package and module definitions,
980 distribution package metadata,
981 test hooks,
982 project installation,
983 platform-specific details,
984 Python 3 support.")
985 ;; TODO: setuptools now bundles the following libraries:
986 ;; packaging, pyparsing, six and appdirs. How to unbundle?
987 (license (list license:psfl ; setuptools itself
988 license:expat ; six, appdirs, pyparsing
989 license:asl2.0 ; packaging is dual ASL2/BSD-2
990 license:bsd-2))))
991
992 (define-public python2-setuptools
993 (package-with-python2 python-setuptools))
994
995 (define-public python-uniseg
996 (package
997 (name "python-uniseg")
998 (version "0.7.1")
999 (source
1000 (origin
1001 (method url-fetch)
1002 (uri (string-append "https://bitbucket.org/emptypage/uniseg-python/"
1003 "get/rel-" version ".tar.gz"))
1004 (file-name (string-append name "-" version ".tar.gz"))
1005 (sha256
1006 (base32
1007 "1df4gddnj2a0v8z35wb2ra5vvh1f1qyxs8fgd25c8g64031mna6x"))))
1008 (build-system python-build-system)
1009 (arguments
1010 '(#:tests? #f)) ; The test suite requires network access.
1011 (home-page
1012 "https://bitbucket.org/emptypage/uniseg-python")
1013 (synopsis
1014 "Python library to determine Unicode text segmentations")
1015 (description
1016 "Uniseg is a Python package used to determine Unicode text segmentations.
1017 Supported segmentations include:
1018 @enumerate
1019 @item @dfn{Code point} (any value in the Unicode codespace)
1020 @item @dfn{Grapheme cluster} (user-perceived character made of a single or
1021 multiple Unicode code points, e.g. \"G\" + acute-accent)
1022 @item Word break
1023 @item Sentence break
1024 @item Line break
1025 @end enumerate")
1026 (license license:expat)))
1027
1028 (define-public python2-uniseg
1029 (package-with-python2 python-uniseg))
1030
1031 ;;; Pycrypto is abandoned upstream:
1032 ;;;
1033 ;;; https://github.com/dlitz/pycrypto/issues/173
1034 ;;;
1035 ;;; TODO Remove this package from GNU Guix.
1036 (define-public python-pycrypto
1037 (package
1038 (name "python-pycrypto")
1039 (version "2.6.1")
1040 (source
1041 (origin
1042 (method url-fetch)
1043 (uri (pypi-uri "pycrypto" version))
1044 (patches (search-patches "python-pycrypto-CVE-2013-7459.patch"))
1045 (sha256
1046 (base32
1047 "0g0ayql5b9mkjam8hym6zyg6bv77lbh66rv1fyvgqb17kfc1xkpj"))))
1048 (build-system python-build-system)
1049 (inputs
1050 `(("python" ,python)
1051 ("gmp" ,gmp)))
1052 (arguments
1053 `(#:phases
1054 (alist-cons-before
1055 'build 'set-build-env
1056 ;; pycrypto runs an autoconf configure script behind the scenes
1057 (lambda _
1058 (setenv "CONFIG_SHELL" (which "bash")))
1059 %standard-phases)))
1060 (home-page "http://www.pycrypto.org/")
1061 (synopsis "Cryptographic modules for Python")
1062 (description
1063 "Pycrypto is a collection of both secure hash functions (such as SHA256
1064 and RIPEMD160), and various encryption algorithms (AES, DES, RSA, ElGamal,
1065 etc.). The package is structured to make adding new modules easy.")
1066 (license license:public-domain)))
1067
1068 (define-public python2-pycrypto
1069 (let ((pycrypto (package-with-python2 python-pycrypto)))
1070 (package (inherit pycrypto)
1071 (inputs
1072 `(("python" ,python-2)
1073 ,@(alist-delete
1074 "python"
1075 (package-inputs pycrypto)))))))
1076
1077 (define-public python-eventlet
1078 (package
1079 (name "python-eventlet")
1080 (version "0.20.1")
1081 (source
1082 (origin
1083 (method url-fetch)
1084 (uri (pypi-uri "eventlet" version))
1085 (sha256
1086 (base32
1087 "0f3q55mq4n021wb7qa53pz3ix6i2py64sap66vsaqm2scjw83m9s"))))
1088 (build-system python-build-system)
1089 (propagated-inputs
1090 `(("python-greenlet" ,python-greenlet)))
1091 (arguments
1092 ;; TODO: Requires unpackaged 'enum-compat'.
1093 '(#:tests? #f))
1094 (home-page "http://eventlet.net")
1095 (synopsis "Concurrent networking library for Python")
1096 (description
1097 "Eventlet is a concurrent networking library for Python that
1098 allows you to change how you run your code, not how you write it.
1099 It uses @code{epoll} or @code{libevent} for highly scalable non-blocking I/O.
1100 Coroutines ensure that the developer uses a blocking style of programming
1101 that is similar to threading, but provide the benefits of non-blocking I/O.
1102 The event dispatch is implicit, which means you can easily use @code{Eventlet}
1103 from the Python interpreter, or as a small part of a larger application.")
1104 (license license:expat)))
1105
1106 (define-public python2-eventlet
1107 (let ((base (package-with-python2
1108 (strip-python2-variant python-eventlet))))
1109 (package (inherit base)
1110 (propagated-inputs
1111 `(("python2-enum34" ,python2-enum34)
1112 ,@(package-propagated-inputs base))))))
1113
1114 (define-public python-keyring
1115 (package
1116 (name "python-keyring")
1117 (version "8.7")
1118 (source
1119 (origin
1120 (method url-fetch)
1121 (uri (pypi-uri "keyring" version))
1122 (sha256
1123 (base32
1124 "0482rmi2x6p78wl2kz8qzyq21xz1sbbfwnv5x7dggar4vkwxhzfx"))))
1125 (build-system python-build-system)
1126 (native-inputs
1127 `(("python-setuptools-scm" ,python-setuptools-scm)))
1128 (propagated-inputs
1129 `(("python-pycrypto" ,python-pycrypto)))
1130 (arguments
1131 `(#:tests? #f)) ;TODO: tests require pytest
1132 (home-page "https://github.com/jaraco/keyring")
1133 (synopsis "Store and access your passwords safely")
1134 (description
1135 "The Python keyring lib provides a easy way to access the system keyring
1136 service from python. It can be used in any application that needs safe
1137 password storage.")
1138 ;; "MIT" and PSF dual license
1139 (license license:x11)))
1140
1141 (define-public python2-keyring
1142 (package-with-python2 python-keyring))
1143
1144 (define-public python-six
1145 (package
1146 (name "python-six")
1147 (version "1.10.0")
1148 (source
1149 (origin
1150 (method url-fetch)
1151 (uri (pypi-uri "six" version))
1152 (sha256
1153 (base32
1154 "0snmb8xffb3vsma0z67i0h0w2g2dy0p3gsgh9gi4i0kgc5l8spqh"))))
1155 (build-system python-build-system)
1156 (native-inputs
1157 `(("python-py" ,python-py)
1158 ("python-pytest" ,python-pytest)))
1159 (home-page "http://pypi.python.org/pypi/six/")
1160 (synopsis "Python 2 and 3 compatibility utilities")
1161 (description
1162 "Six is a Python 2 and 3 compatibility library. It provides utility
1163 functions for smoothing over the differences between the Python versions with
1164 the goal of writing Python code that is compatible on both Python versions.
1165 Six supports every Python version since 2.5. It is contained in only one
1166 Python file, so it can be easily copied into your project.")
1167 (license license:x11)))
1168
1169 (define-public python2-six
1170 (package-with-python2 python-six))
1171
1172 (define-public python-dateutil
1173 (package
1174 (name "python-dateutil")
1175 (version "2.6.0")
1176 (source
1177 (origin
1178 (method url-fetch)
1179 (uri (pypi-uri "python-dateutil" version))
1180 (sha256
1181 (base32
1182 "1lhq0hxjc3cfha101q02ld5ijlpfyjn2w1yh7wvpiy367pgzi8k2"))))
1183 (build-system python-build-system)
1184 (propagated-inputs
1185 `(("python-six" ,python-six)))
1186 (home-page "https://dateutil.readthedocs.io/en/stable/")
1187 (synopsis "Extensions to the standard datetime module")
1188 (description
1189 "The dateutil module provides powerful extensions to the standard
1190 datetime module, available in Python 2.3+.")
1191 (license license:bsd-3)))
1192
1193 (define-public python2-dateutil
1194 (package-with-python2 python-dateutil))
1195
1196 (define-public python-parsedatetime
1197 (package
1198 (name "python-parsedatetime")
1199 (version "2.3")
1200 (source
1201 (origin
1202 (method url-fetch)
1203 (uri (pypi-uri "parsedatetime" version))
1204 (sha256
1205 (base32
1206 "1vkrmd398s11h1zn3zaqqsiqhj9lwy1ikcg6irx2lrgjzjg3rjll"))))
1207 (build-system python-build-system)
1208 (native-inputs
1209 `(("python-nose" ,python-nose)
1210 ("python-pyicu" ,python-pyicu)
1211 ("python-pytest" ,python-pytest)
1212 ("python-pytest-runner" ,python-pytest-runner)))
1213 (propagated-inputs
1214 `(("python-future" ,python-future)))
1215 (home-page "https://github.com/bear/parsedatetime/")
1216 (synopsis
1217 "Parse human-readable date/time text")
1218 (description
1219 "Parse human-readable date/time text.")
1220 (license license:asl2.0)))
1221
1222 (define-public python2-parsedatetime
1223 (package-with-python2 python-parsedatetime))
1224
1225 (define-public python-pandas
1226 (package
1227 (name "python-pandas")
1228 (version "0.19.2")
1229 (source
1230 (origin
1231 (method url-fetch)
1232 (uri (pypi-uri "pandas" version))
1233 (sha256
1234 (base32 "0540cnbwy2hc4hv2sxfs8i47xi91qzvzxfn80dl785ibiicly3vg"))
1235 (patches
1236 (search-patches "python-pandas-skip-failing-tests.patch"))))
1237 (build-system python-build-system)
1238 (propagated-inputs
1239 `(("python-numpy" ,python-numpy)
1240 ("python-pytz" ,python-pytz)
1241 ("python-dateutil" ,python-dateutil)))
1242 (native-inputs
1243 `(("python-nose" ,python-nose)
1244 ("python-cython" ,python-cython)))
1245 (home-page "http://pandas.pydata.org")
1246 (synopsis "Data structures for data analysis, time series, and statistics")
1247 (description
1248 "Pandas is a Python package providing fast, flexible, and expressive data
1249 structures designed to make working with structured (tabular,
1250 multidimensional, potentially heterogeneous) and time series data both easy
1251 and intuitive. It aims to be the fundamental high-level building block for
1252 doing practical, real world data analysis in Python.")
1253 (license license:bsd-3)))
1254
1255 (define-public python2-pandas
1256 (package-with-python2 python-pandas))
1257
1258 (define-public python-tzlocal
1259 (package
1260 (name "python-tzlocal")
1261 (version "1.2.2")
1262 (source
1263 (origin
1264 (method url-fetch)
1265 (uri (pypi-uri "tzlocal" version))
1266 (sha256
1267 (base32
1268 "0paj7vlsb0np8b5sp4bv64wxv7qk2piyp7xg29pkhdjwsbls9fnb"))))
1269 (build-system python-build-system)
1270 (propagated-inputs
1271 `(("python-pytz" ,python-pytz)))
1272 (home-page "https://github.com/regebro/tzlocal")
1273 (synopsis
1274 "Local timezone information for Python")
1275 (description
1276 "Tzlocal returns a tzinfo object with the local timezone information.
1277 This module attempts to fix a glaring hole in pytz, that there is no way to
1278 get the local timezone information, unless you know the zoneinfo name, and
1279 under several distributions that's hard or impossible to figure out.")
1280 (license license:cc0)))
1281
1282 (define-public python2-pysqlite
1283 (package
1284 (name "python2-pysqlite")
1285 (version "2.8.3")
1286 (source
1287 (origin
1288 (method url-fetch)
1289 (uri (pypi-uri "pysqlite" version))
1290 (sha256
1291 (base32
1292 "1424gwq9sil2ffmnizk60q36vydkv8rxs6m7xs987kz8cdc37lqp"))))
1293 (build-system python-build-system)
1294 (inputs
1295 `(("sqlite" ,sqlite)))
1296 (arguments
1297 `(#:python ,python-2 ; incompatible with Python 3
1298 #:tests? #f)) ; no test target
1299 (home-page "https://github.com/ghaering/pysqlite")
1300 (synopsis "SQLite bindings for Python")
1301 (description
1302 "Pysqlite provides SQLite bindings for Python that comply to the
1303 Database API 2.0T.")
1304 (license license:zlib)))
1305
1306
1307 (define-public python2-mechanize
1308 (package
1309 (name "python2-mechanize")
1310 (version "0.2.5")
1311 (source
1312 (origin
1313 (method url-fetch)
1314 (uri (string-append "https://pypi.python.org/packages/source/m/mechanize/mechanize-"
1315 version ".tar.gz"))
1316 (sha256
1317 (base32
1318 "0rj7r166i1dyrq0ihm5rijfmvhs8a04im28lv05c0c3v206v4rrf"))))
1319 (build-system python-build-system)
1320 (arguments
1321 `(#:python ,python-2 ; apparently incompatible with Python 3
1322 #:tests? #f))
1323 ;; test fails with message
1324 ;; AttributeError: 'module' object has no attribute 'test_pullparser'
1325 ;; (python-3.3.2) or
1326 ;; AttributeError: 'module' object has no attribute 'test_urllib2_localnet'
1327 ;; (python-2.7.5).
1328 ;; The source code is from March 2011 and probably not up-to-date
1329 ;; with respect to python unit tests.
1330 (home-page "http://wwwsearch.sourceforge.net/mechanize/")
1331 (synopsis
1332 "Stateful programmatic web browsing in Python")
1333 (description
1334 "Mechanize implements stateful programmatic web browsing in Python,
1335 after Andy Lester’s Perl module WWW::Mechanize.")
1336 (license (license:non-copyleft
1337 "file://COPYING"
1338 "See COPYING in the distribution."))))
1339
1340
1341 (define-public python-simplejson
1342 (package
1343 (name "python-simplejson")
1344 (version "3.10.0")
1345 (source
1346 (origin
1347 (method url-fetch)
1348 (uri (pypi-uri "simplejson" version))
1349 (sha256
1350 (base32
1351 "1qhwsykjlb85igb4cfl6v6gkprzbbg8gyqdd7zscc8w3x0ifcfwm"))))
1352 (build-system python-build-system)
1353 (home-page "http://simplejson.readthedocs.org/en/latest/")
1354 (synopsis
1355 "Json library for Python")
1356 (description
1357 "JSON (JavaScript Object Notation) is a subset of JavaScript
1358 syntax (ECMA-262 3rd edition) used as a lightweight data interchange
1359 format.
1360
1361 Simplejson exposes an API familiar to users of the standard library marshal
1362 and pickle modules. It is the externally maintained version of the json
1363 library contained in Python 2.6, but maintains compatibility with Python 2.5
1364 and (currently) has significant performance advantages, even without using
1365 the optional C extension for speedups. Simplejson is also supported on
1366 Python 3.3+.")
1367 (license license:x11)))
1368
1369 (define-public python2-simplejson
1370 (package-with-python2 python-simplejson))
1371
1372
1373 (define-public python-pyicu
1374 (package
1375 (name "python-pyicu")
1376 (version "1.9.5")
1377 (source
1378 (origin
1379 (method url-fetch)
1380 (uri (pypi-uri "PyICU" version))
1381 (sha256
1382 (base32
1383 "16rmxy9y0qhqqna2v49i7nzwm09as699rbyvh4raw7w602w55c3k"))))
1384 (build-system python-build-system)
1385 (arguments
1386 '(#:phases
1387 (modify-phases %standard-phases
1388 (add-before 'check 'delete-failing-test
1389 (lambda _
1390 ;; XXX: These tests require locales that are unavailable
1391 ;; in the build environment.
1392 (delete-file "test/test_DateTimeParserGenerator.py")
1393 #t)))))
1394 (inputs
1395 `(("icu4c" ,icu4c)))
1396 (home-page "http://pyicu.osafoundation.org/")
1397 (synopsis "Python extension wrapping the ICU C++ API")
1398 (description
1399 "PyICU is a python extension wrapping the ICU C++ API.")
1400 (license license:x11)))
1401
1402 (define-public python2-pyicu
1403 (package-with-python2 python-pyicu))
1404
1405 (define-public python2-dogtail
1406 ;; Python 2 only, as it leads to "TabError: inconsistent use of tabs and
1407 ;; spaces in indentation" with Python 3.
1408 (package
1409 (name "python2-dogtail")
1410 (version "0.9.9")
1411 (source (origin
1412 (method url-fetch)
1413 (uri (pypi-uri "dogtail" version))
1414 (sha256
1415 (base32
1416 "0p5wfssvzr9w0bvhllzbbd8fnp4cca2qxcpcsc33dchrmh5n552x"))))
1417 (build-system python-build-system)
1418 (arguments `(#:python ,python-2
1419 #:tests? #f)) ; invalid command "test"
1420 ;; Currently no offical homepage.
1421 (home-page "https://pypi.python.org/pypi/dogtail/")
1422 (synopsis "GUI test tool and automation framework written in Python")
1423 (description
1424 "Dogtail is a GUI test tool and automation framework written in Python.
1425 It uses Accessibility (a11y) technologies to communicate with desktop
1426 applications. dogtail scripts are written in Python and executed like any
1427 other Python program.")
1428 (license license:gpl2+)))
1429
1430 (define-public python2-empy
1431 (package
1432 (name "python2-empy")
1433 (version "3.3")
1434 (source (origin
1435 (method url-fetch)
1436 (uri (string-append "http://www.alcyone.com/software/empy/empy-"
1437 version ".tar.gz"))
1438 (sha256
1439 (base32
1440 "01g8mmkfnvjdmlhsihwyx56lrg7r5m5d2fg6mnxsvy6g0dnl69f6"))))
1441 (build-system python-build-system)
1442 (arguments
1443 `(#:python ,python-2
1444 #:phases (alist-replace
1445 'check
1446 (lambda _
1447 (zero? (system* "./test.sh")))
1448 %standard-phases)))
1449 (home-page "http://www.alcyone.com/software/empy/")
1450 (synopsis "Templating system for Python")
1451 (description
1452 "EmPy is a system for embedding Python expressions and statements in
1453 template text; it takes an EmPy source file, processes it, and produces
1454 output. This is accomplished via expansions, which are special signals to the
1455 EmPy system and are set off by a special prefix (by default the at sign, @@).
1456 EmPy can expand arbitrary Python expressions and statements in this way, as
1457 well as a variety of special forms. Textual data not explicitly delimited in
1458 this way is sent unaffected to the output, allowing Python to be used in
1459 effect as a markup language. Also supported are callbacks via hooks,
1460 recording and playback via diversions, and dynamic, chainable filters. The
1461 system is highly configurable via command line options and embedded
1462 commands.")
1463 (license license:lgpl2.1+)))
1464
1465 (define-public python2-element-tree
1466 (package
1467 (name "python2-element-tree")
1468 (version "1.2.6")
1469 (source (origin
1470 (method url-fetch)
1471 (uri (string-append
1472 "http://effbot.org/media/downloads/elementtree-"
1473 version "-20050316.tar.gz"))
1474 (sha256
1475 (base32
1476 "016bphqnlg0l4vslahhw4r0aanw95bpypy65r1i1acyb2wj5z7dj"))))
1477 (build-system python-build-system)
1478 (arguments
1479 `(#:python ,python-2 ; seems to be part of Python 3
1480 #:tests? #f)) ; no 'test' sub-command
1481 (synopsis "Toolkit for XML processing in Python")
1482 (description
1483 "ElementTree is a Python library supporting lightweight XML processing.")
1484 (home-page "http://effbot.org/zone/element-index.htm")
1485 (license (license:x11-style
1486 "http://docs.python.org/2/license.html"
1487 "Like \"CWI LICENSE AGREEMENT FOR PYTHON 0.9.0 THROUGH 1.2\"."))))
1488
1489 (define-public python2-pybugz
1490 (package
1491 (name "python2-pybugz")
1492 (version "0.6.11")
1493 (source (origin
1494 (method url-fetch)
1495 (uri (string-append
1496 "http://bits.liquidx.net/projects/pybugz/pybugz-"
1497 version ".tar.gz"))
1498 (sha256
1499 (base32
1500 "17ni00p08gp5lkxlrrcnvi3x09fmajnlbz4da03qcgl9q21ym4jd"))
1501 (patches (search-patches "pybugz-stty.patch"
1502 "pybugz-encode-error.patch"))))
1503 (build-system python-build-system)
1504 (arguments
1505 `(#:python ,python-2 ; SyntaxError with Python 3
1506 #:tests? #f)) ; no 'test' sub-command
1507 (propagated-inputs
1508 `(("element-tree" ,python2-element-tree)))
1509 (synopsis "Python and command-line interface to Bugzilla")
1510 (description
1511 "PyBugz is a Python library and command-line tool to query the Bugzilla
1512 bug tracking system. It is meant as an aid to speed up interaction with the
1513 bug tracker.")
1514 (home-page "http://www.liquidx.net/pybugz/")
1515 (license license:gpl2)))
1516
1517 (define-public python-enum34
1518 (package
1519 (name "python-enum34")
1520 (version "1.1.6")
1521 (source
1522 (origin
1523 (method url-fetch)
1524 (uri (pypi-uri "enum34" version))
1525 (sha256
1526 (base32
1527 "1cgm5ng2gcfrkrm3hc22brl6chdmv67b9zvva9sfs7gn7dwc9n4a"))))
1528 (build-system python-build-system)
1529 (home-page "https://pypi.python.org/pypi/enum34")
1530 (synopsis "Backported Python 3.4 Enum")
1531 (description
1532 "Enum34 is the new Python stdlib enum module available in Python 3.4
1533 backported for previous versions of Python from 2.4 to 3.3.")
1534 (license license:bsd-3)))
1535
1536 (define-public python2-enum34
1537 (package-with-python2 python-enum34))
1538
1539 (define-public python-parse-type
1540 (package
1541 (name "python-parse-type")
1542 (version "0.3.4")
1543 (source
1544 (origin
1545 (method url-fetch)
1546 (uri (string-append "https://pypi.python.org/packages/source/p/"
1547 "parse_type/parse_type-" version ".tar.gz"))
1548 (sha256
1549 (base32
1550 "0iv1c34npr4iynwpgv1vkjx9rjd18a85ir8c01gc5f7wp8iv7l1x"))))
1551 (build-system python-build-system)
1552 (arguments
1553 `(#:phases
1554 (modify-phases %standard-phases
1555 (add-after 'unpack 'patch-tests
1556 (lambda _
1557 (substitute* "tests/test_parse_type_parse.py"
1558 ;; Newer Python versions don't have the problem this test tests.
1559 (("self[.]assertRaises[(]parse.TooManyFields, p.parse, ''[)]")
1560 ""))
1561 #t)))))
1562 (propagated-inputs
1563 `(("python-six" ,python-six)
1564 ("python-parse" ,python-parse)))
1565 (native-inputs
1566 `(("python-pytest" ,python-pytest)
1567 ("python-pytest-runner" ,python-pytest-runner)))
1568 (home-page "https://github.com/jenisys/parse_type")
1569 (synopsis "Extended parse module")
1570 (description
1571 "Parse_type extends the python parse module.")
1572 (properties
1573 `((python2-variant . ,(delay python2-parse-type))))
1574 (license license:bsd-3)))
1575
1576 (define-public python2-parse-type
1577 (let ((base (package-with-python2
1578 (strip-python2-variant python-parse-type))))
1579 (package (inherit base)
1580 (propagated-inputs
1581 `(("python2-enum34" ,python2-enum34)
1582 ,@(package-propagated-inputs base))))))
1583
1584 (define-public python-parse
1585 (package
1586 (name "python-parse")
1587 (version "1.6.6")
1588 (source
1589 (origin
1590 (method url-fetch)
1591 (uri (pypi-uri "parse" version))
1592 (sha256
1593 (base32
1594 "0y31i3mwgv35qn0kzzjn9q8jqfdqmbi6sr6yfvn8rq4lqjm5lhvi"))
1595 (patches (search-patches "python-parse-too-many-fields.patch"))))
1596 (build-system python-build-system)
1597 (arguments
1598 `(#:phases
1599 (modify-phases %standard-phases
1600 (replace 'check
1601 (lambda _ (zero? (system* "python" "test_parse.py")))))))
1602 (home-page "https://github.com/r1chardj0n3s/parse")
1603 (synopsis "Parse strings")
1604 (description
1605 "Parse strings using a specification based on the Python format()
1606 syntax.")
1607 (license license:x11)))
1608
1609 (define-public python-polib
1610 (package
1611 (name "python-polib")
1612 (version "1.0.8")
1613 (source (origin
1614 (method url-fetch)
1615 (uri (pypi-uri "polib" version))
1616 (sha256
1617 (base32
1618 "1pq2hbm3m2q0cjdszk8mc4qa1vl3wcblh5nfyirlfnzb2pcy7zss"))))
1619 (build-system python-build-system)
1620 (home-page "https://bitbucket.org/izi/polib/wiki/Home")
1621 (synopsis "Manipulate, create and modify gettext files")
1622 (description "Polib can manipulate any gettext format (po, pot and mo)
1623 files. It can be used to create po files from scratch or to modify
1624 existing ones.")
1625 (license license:expat)))
1626
1627 (define-public python2-polib
1628 (let ((base (package-with-python2 (strip-python2-variant python-polib))))
1629 (package
1630 (inherit base)
1631 (arguments `(,@(package-arguments base)
1632 ;; Tests don't work with python2.
1633 #:tests? #f)))))
1634
1635 (define-public scons
1636 (package
1637 (name "scons")
1638 (version "2.5.1")
1639 (source (origin
1640 (method url-fetch)
1641 (uri (string-append "mirror://sourceforge/scons/scons/" version
1642 "/scons-" version ".tar.gz"))
1643 (sha256
1644 (base32
1645 "1wji1z9jdkhnmm99apx6fhld9cs52rr56aigniyrcsmlwy52298b"))))
1646 (build-system python-build-system)
1647 (arguments
1648 ;; With Python 3.x, fails to build with a syntax error.
1649 `(#:python ,python-2
1650 #:use-setuptools? #f ; still relies on distutils
1651 #:tests? #f)) ; no 'python setup.py test' command
1652 (home-page "http://scons.org/")
1653 (synopsis "Software construction tool written in Python")
1654 (description
1655 "SCons is a software construction tool. Think of SCons as an improved,
1656 cross-platform substitute for the classic Make utility with integrated
1657 functionality similar to autoconf/automake and compiler caches such as ccache.
1658 In short, SCons is an easier, more reliable and faster way to build
1659 software.")
1660 (license license:x11)))
1661
1662 (define-public python-extras
1663 (package
1664 (name "python-extras")
1665 (version "0.0.3")
1666 (source
1667 (origin
1668 (method url-fetch)
1669 (uri (string-append
1670 "https://pypi.python.org/packages/source/e/extras/extras-"
1671 version ".tar.gz"))
1672 (sha256
1673 (base32
1674 "1h7zx4dfyclalg0fqnfjijpn0f793a9mx8sy3b27gd31nr6dhq3s"))))
1675 (build-system python-build-system)
1676 (arguments
1677 ;; error in setup.cfg: command 'test' has no such option 'buffer'
1678 '(#:tests? #f))
1679 (home-page "https://github.com/testing-cabal/extras")
1680 (synopsis "Useful extensions to the Python standard library")
1681 (description
1682 "Extras is a set of extensions to the Python standard library.")
1683 (license license:expat)))
1684
1685 (define-public python2-extras
1686 (package-with-python2 python-extras))
1687
1688 (define-public python-mimeparse
1689 (package
1690 (name "python-mimeparse")
1691 (version "0.1.4")
1692 (source
1693 (origin
1694 (method url-fetch)
1695 (uri (string-append
1696 "https://pypi.python.org/packages/source/p/python-mimeparse/python-mimeparse-"
1697 version ".tar.gz"))
1698 (sha256
1699 (base32
1700 "1hyxg09kaj02ri0rmwjqi86wk4nd1akvv7n0dx77azz76wga4s9w"))))
1701 (build-system python-build-system)
1702 (arguments
1703 '(#:tests? #f)) ; no setup.py test command
1704 (home-page
1705 "https://github.com/dbtsai/python-mimeparse")
1706 (synopsis "Python library for parsing MIME types")
1707 (description
1708 "Mimeparse provides basic functions for parsing MIME type names and
1709 matching them against a list of media-ranges.")
1710 (license license:expat)))
1711
1712 (define-public python2-mimeparse
1713 (package-with-python2 python-mimeparse))
1714
1715 (define-public python-nose
1716 (package
1717 (name "python-nose")
1718 (version "1.3.7")
1719 (source
1720 (origin
1721 (method url-fetch)
1722 (uri (pypi-uri "nose" version))
1723 (sha256
1724 (base32
1725 "164a43k7k2wsqqk1s6vavcdamvss4mz0vd6pwzv2h9n8rgwzxgzi"))))
1726 (build-system python-build-system)
1727 (arguments
1728 '(#:tests? #f)) ; FIXME: test suite fails
1729 (home-page "http://readthedocs.org/docs/nose/")
1730 (synopsis "Python testing library")
1731 (description
1732 "Nose extends the unittest library to make testing easier.")
1733 (license license:lgpl2.0+)))
1734
1735 (define-public python2-nose
1736 (package-with-python2 python-nose))
1737
1738 (define-public python-nose2
1739 (package
1740 (name "python-nose2")
1741 (version "0.6.5")
1742 (source
1743 (origin
1744 (method url-fetch)
1745 (uri (pypi-uri "nose2" version))
1746 (sha256
1747 (base32
1748 "1x4zjq1zlyrh8b9ba0cmafd3w94pxhid408kibyjd3s6h1lap6s7"))))
1749 (build-system python-build-system)
1750 (arguments `(#:tests? #f)) ; 'module' object has no attribute 'collector'
1751 (propagated-inputs
1752 `(("python-cov-core" ,python-cov-core)
1753 ("python-pytest-cov" ,python-pytest-cov)
1754 ("python-six" ,python-six)))
1755 (home-page "https://github.com/nose-devs/nose2")
1756 (synopsis "Next generation of nicer testing for Python")
1757 (description
1758 "Nose2 is the next generation of nicer testing for Python, based on the
1759 plugins branch of unittest2. Nose2 aims to improve on nose by providing a
1760 better plugin api, being easier for users to configure, and simplifying internal
1761 interfaces and processes.")
1762 (license license:bsd-2)))
1763
1764 (define-public python2-nose2
1765 (package-with-python2 python-nose2))
1766
1767 (define-public python-unittest2
1768 (package
1769 (name "python-unittest2")
1770 (version "0.5.1")
1771 (source
1772 (origin
1773 (method url-fetch)
1774 (uri (string-append
1775 "https://pypi.python.org/packages/source/u/unittest2py3k/unittest2py3k-"
1776 version ".tar.gz"))
1777 (sha256
1778 (base32
1779 "00yl6lskygcrddx5zspkhr0ibgvpknl4678kkm6s626539grq93q"))))
1780 (build-system python-build-system)
1781 (home-page "http://pypi.python.org/pypi/unittest2")
1782 (synopsis "Python unit testing library")
1783 (description
1784 "Unittest2 is a replacement for the unittest module in the Python
1785 standard library.")
1786 (license license:psfl)))
1787
1788 (define-public python2-unittest2
1789 (package (inherit python-unittest2)
1790 (name "python2-unittest2")
1791 (version "0.5.1")
1792 (source
1793 (origin
1794 (method url-fetch)
1795 (uri (string-append
1796 "https://pypi.python.org/packages/source/u/unittest2/unittest2-"
1797 version ".tar.gz"))
1798 (sha256
1799 (base32
1800 "0wbs4i4x3x7klr3v35ss6p9mcqz883i1xgcpkhvl7n2lyv6yhpda"))))
1801 (arguments
1802 `(#:python ,python-2
1803 #:tests? #f)))) ; no setup.py test command
1804
1805 (define-public python-pafy
1806 (package
1807 (name "python-pafy")
1808 (version "0.5.3.1")
1809 (source
1810 (origin
1811 (method url-fetch)
1812 (uri (pypi-uri "pafy" version))
1813 (sha256
1814 (base32
1815 "1a7dxi95m1043rxx1r5x3ngb66nwlq6aqcasyqqjzmmmjps4zrim"))))
1816 (build-system python-build-system)
1817 (arguments
1818 `(#:tests? #f)) ; Currently pafy can not find itself in the tests
1819 (propagated-inputs
1820 ;; Youtube-dl is a python package which is imported in the file
1821 ;; "backend_youtube_dl.py", therefore it needs to be propagated.
1822 `(("youtube-dl" ,youtube-dl)))
1823 (home-page "https://np1.github.io/pafy/")
1824 (synopsis "Retrieve YouTube content and metadata")
1825 (description
1826 "@code{pafy} is a python library to retrieve YouTube content and metadata.")
1827 (license license:lgpl3+)))
1828
1829 (define-public python-py
1830 (package
1831 (name "python-py")
1832 (version "1.4.32")
1833 (source
1834 (origin
1835 (method url-fetch)
1836 (uri (pypi-uri "py" version))
1837 (sha256
1838 (base32
1839 "19s1pql9pq85h1qzsdwgyb8a3k1qgkvh33b02m8kfqhizz8rzf64"))))
1840 (build-system python-build-system)
1841 (arguments
1842 ;; FIXME: "ImportError: 'test' module incorrectly imported from
1843 ;; '/gnu/store/...-python-pytest-mimimal-3.0.5/lib/python3.5/site-packages'.
1844 ;; Expected '/tmp/guix-build-python-py-1.4.31.drv-0/py-1.4.31/py'.
1845 ;; Is this module globally installed?"
1846 '(#:tests? #f))
1847 (home-page "http://pylib.readthedocs.org/")
1848 (synopsis "Python library for parsing, I/O, instrospection, and logging")
1849 (description
1850 "Py is a Python library for file name parsing, .ini file parsing, I/O,
1851 code introspection, and logging.")
1852 (license license:expat)))
1853
1854 (define-public python2-py
1855 (package-with-python2 python-py))
1856
1857 (define-public python-pytest
1858 (package
1859 (name "python-pytest")
1860 (version "2.7.3")
1861 (source
1862 (origin
1863 (method url-fetch)
1864 (uri (string-append
1865 "https://pypi.python.org/packages/source/p/pytest/pytest-"
1866 version ".tar.gz"))
1867 (sha256
1868 (base32
1869 "1z4yi986f9n0p8qmzmn21m21m8j1x78hk3505f89baqm6pdw7afm"))
1870 (modules '((guix build utils)))
1871 (snippet
1872 ;; One of the tests involves the /usr directory, so it fails.
1873 '(substitute* "testing/test_argcomplete.py"
1874 (("def test_remove_dir_prefix\\(self\\):")
1875 "@pytest.mark.xfail\n def test_remove_dir_prefix(self):")))))
1876 (build-system python-build-system)
1877 (propagated-inputs
1878 `(("python-py" ,python-py)))
1879 (native-inputs
1880 `(;; Tests need the "regular" bash since 'bash-final' lacks `compgen`.
1881 ("bash" ,bash)
1882 ("python-nose" ,python-nose)
1883 ("python-mock" ,python-mock)))
1884 (home-page "http://pytest.org")
1885 (synopsis "Python testing library")
1886 (description
1887 "Pytest is a testing tool that provides auto-discovery of test modules
1888 and functions, detailed info on failing assert statements, modular fixtures,
1889 and many external plugins.")
1890 (license license:expat)))
1891
1892 (define-public python2-pytest
1893 (package-with-python2 python-pytest))
1894
1895 ;; Some packages require a newer pytest.
1896 (define-public python-pytest-3.0
1897 (package
1898 (inherit python-pytest)
1899 (name "python-pytest")
1900 (version "3.0.7")
1901 (source (origin
1902 (method url-fetch)
1903 (uri (pypi-uri "pytest" version))
1904 (sha256
1905 (base32
1906 "1asc4b2nd2a4f0g3r12y97rslq5wliji7b73wwkvdrm5s7mrc1mp"))))
1907 (arguments
1908 `(#:phases
1909 (modify-phases %standard-phases
1910 (add-before 'check 'disable-invalid-test
1911 (lambda _
1912 (substitute* "testing/test_argcomplete.py"
1913 (("def test_remove_dir_prefix" line)
1914 (string-append "@pytest.mark.skip"
1915 "(reason=\"Assumes that /usr exists.\")\n "
1916 line)))
1917 #t)))))
1918 (native-inputs
1919 `(("python-hypothesis" ,python-hypothesis)
1920 ,@(package-native-inputs python-pytest)))
1921 (properties `((python2-variant . ,(delay python2-pytest-3.0))))))
1922
1923 (define-public python2-pytest-3.0
1924 (let ((base (package-with-python2
1925 (strip-python2-variant python-pytest-3.0))))
1926 (package (inherit base)
1927 (native-inputs
1928 `(("python2-enum34" ,python2-enum34)
1929 ,@(package-native-inputs base))))))
1930
1931 (define-public python-pytest-cov
1932 (package
1933 (name "python-pytest-cov")
1934 (version "2.4.0")
1935 (source
1936 (origin
1937 (method url-fetch)
1938 (uri (pypi-uri "pytest-cov" version))
1939 (sha256
1940 (base32
1941 "03c2qc42r4bczyw93gd7n0qi1h1jfhw7fnbhi33c3vp1hs81gm2k"))))
1942 (build-system python-build-system)
1943 (arguments
1944 `(#:phases
1945 (modify-phases %standard-phases
1946 (replace 'check
1947 (lambda _
1948 ;; options taken from tox.ini
1949 ;; TODO: make "--restructuredtext" tests pass. They currently fail
1950 ;; with "Duplicate implicit target name"
1951 (zero? (system* "python" "./setup.py" "check"
1952 "--strict" "--metadata")))))))
1953 (propagated-inputs
1954 `(("python-coverage" ,python-coverage)
1955 ("python-pytest" ,python-pytest)))
1956 (home-page "https://github.com/pytest-dev/pytest-cov")
1957 (synopsis "Pytest plugin for measuring coverage")
1958 (description
1959 "Pytest-cov produces coverage reports. It supports centralised testing and
1960 distributed testing in both @code{load} and @code{each} modes. It also
1961 supports coverage of subprocesses.")
1962 (license license:expat)))
1963
1964 (define-public python2-pytest-cov
1965 (package-with-python2 python-pytest-cov))
1966
1967 (define-public python-pytest-runner
1968 (package
1969 (name "python-pytest-runner")
1970 (version "2.11.1")
1971 (source
1972 (origin
1973 (method url-fetch)
1974 (uri (pypi-uri "pytest-runner" version))
1975 (sha256
1976 (base32
1977 "1cw978kqqcq916b9gfns1qjqvg33c5ail5jhw9054dsynkm32flq"))))
1978 (build-system python-build-system)
1979 (arguments
1980 `(#:phases
1981 (modify-phases %standard-phases
1982 ;; The fancy way of setting the version with setuptools_scm does not
1983 ;; seem to work here.
1984 (add-after 'unpack 'set-version
1985 (lambda _
1986 (substitute* "docs/conf.py"
1987 (("version = setuptools_scm\\.get_version\\(root='\\.\\.')")
1988 (string-append "version = \"" ,version "\"")))
1989 #t)))))
1990 (native-inputs
1991 `(("python-pytest" ,python-pytest)
1992 ("python-setuptools-scm" ,python-setuptools-scm)))
1993 (home-page "https://github.com/pytest-dev/pytest-runner")
1994 (synopsis "Invoke py.test as a distutils command")
1995 (description
1996 "This package provides a @command{pytest-runner} command that
1997 @file{setup.py} files can use to run tests.")
1998 (license license:expat)))
1999
2000 (define-public python2-pytest-runner
2001 (package-with-python2 python-pytest-runner))
2002
2003 (define-public python-pytest-mock
2004 (package
2005 (name "python-pytest-mock")
2006 (version "1.2")
2007 (source
2008 (origin
2009 (method url-fetch)
2010 (uri (pypi-uri "pytest-mock" version ".zip"))
2011 (sha256
2012 (base32
2013 "03zxar5drzm7ksqyrwypjaza3cri6wqvpr6iam92djvg6znp32gp"))))
2014 (build-system python-build-system)
2015 (native-inputs
2016 `(("unzip" ,unzip)))
2017 (propagated-inputs
2018 `(("python-pytest" ,python-pytest)))
2019 (home-page "https://github.com/pytest-dev/pytest-mock/")
2020 (synopsis "Thin-wrapper around the mock package for easier use with py.test")
2021 (description
2022 "This plugin installs a @code{mocker} fixture which is a thin-wrapper
2023 around the patching API provided by the @code{mock} package, but with the
2024 benefit of not having to worry about undoing patches at the end of a test.
2025 The mocker fixture has the same API as @code{mock.patch}, supporting the
2026 same arguments.")
2027 (properties `((python2-variant . ,(delay python2-pytest-mock))))
2028 (license license:expat)))
2029
2030 (define-public python2-pytest-mock
2031 (let ((base (package-with-python2
2032 (strip-python2-variant python-pytest-mock))))
2033 (package (inherit base)
2034 (propagated-inputs
2035 `(("python2-mock" ,python2-mock)
2036 ,@(package-propagated-inputs base))))))
2037
2038 (define-public python-pytest-xdist
2039 (package
2040 (name "python-pytest-xdist")
2041 (version "1.14")
2042 (source
2043 (origin
2044 (method url-fetch)
2045 (uri (pypi-uri "pytest-xdist" version ".zip"))
2046 (sha256
2047 (base32
2048 "08rn2l39ds60xshs4js787l84pfckksqklfq2wq9x8ig2aci2pja"))
2049 (modules '((guix build utils)))
2050 (snippet
2051 '(begin
2052 ;; Remove pre-compiled .pyc files from source.
2053 (for-each delete-file-recursively
2054 (find-files "." "__pycache__" #:directories? #t))
2055 (for-each delete-file (find-files "." "\\.pyc$"))
2056 #t))))
2057 (build-system python-build-system)
2058 (arguments
2059 '(#:tests? #f)) ;FIXME: Some tests are failing.
2060 ;; #:phases
2061 ;; (modify-phases %standard-phases
2062 ;; (delete 'check)
2063 ;; (add-after 'install 'check
2064 ;; (lambda* (#:key inputs outputs #:allow-other-keys)
2065 ;; (add-installed-pythonpath inputs outputs)
2066 ;; (zero? (system* "py.test" "-v")))))
2067 (native-inputs
2068 `(("unzip" ,unzip)
2069 ("python-setuptools-scm" ,python-setuptools-scm)))
2070 (propagated-inputs
2071 `(("python-execnet" ,python-execnet)
2072 ("python-pytest" ,python-pytest)
2073 ("python-py" ,python-py)))
2074 (home-page
2075 "https://github.com/pytest-dev/pytest-xdist")
2076 (synopsis
2077 "Plugin for py.test with distributed testing and loop-on-failing modes")
2078 (description
2079 "The pytest-xdist plugin extends py.test with some unique test execution
2080 modes: parallelization, running tests in boxed subprocesses, the ability
2081 to run tests repeatedly when failed, and the ability to run tests on multiple
2082 Python interpreters or platforms. It uses rsync to copy the existing
2083 program code to a remote location, executes there, and then syncs the
2084 result back.")
2085 (license license:expat)))
2086
2087 (define-public python2-pytest-xdist
2088 (package-with-python2 python-pytest-xdist))
2089
2090 (define-public python-scripttest
2091 (package
2092 (name "python-scripttest")
2093 (version "1.3")
2094 (source
2095 (origin
2096 (method url-fetch)
2097 (uri (string-append
2098 "https://pypi.python.org/packages/source/s/scripttest/scripttest-"
2099 version ".tar.gz"))
2100 (sha256
2101 (base32
2102 "0f4w84k8ck82syys7yg9maz93mqzc8p5ymis941x034v44jzq74m"))))
2103 (build-system python-build-system)
2104 (native-inputs
2105 `(("python-pytest" ,python-pytest)))
2106 (home-page "http://pythonpaste.org/scripttest/")
2107 (synopsis "Python library to test command-line scripts")
2108 (description "Scripttest is a Python helper library for testing
2109 interactive command-line applications. With it you can run a script in a
2110 subprocess and see the output as well as any file modifications.")
2111 (license license:expat)))
2112
2113 (define-public python2-scripttest
2114 (package-with-python2 python-scripttest))
2115
2116 (define-public python-testtools
2117 (package
2118 (name "python-testtools")
2119 (version "1.4.0")
2120 (source
2121 (origin
2122 (method url-fetch)
2123 (uri (pypi-uri "testtools" version))
2124 (sha256
2125 (base32
2126 "1vw8yljnd75d396hhw6s2hrf4cclzy845ifd5am0lxsl235z3i8c"))))
2127 (build-system python-build-system)
2128 (arguments
2129 `(#:phases
2130 (modify-phases %standard-phases
2131 (add-after 'unpack 'fix-module-imports
2132 (lambda _
2133 (substitute* "setup.py"
2134 (("'unittest2>=0.8.0',") ""))
2135 (substitute* '("testtools/testcase.py"
2136 "testtools/testsuite.py"
2137 "testtools/run.py"
2138 "testtools/tests/test_run.py"
2139 "testtools/tests/test_testsuite.py"
2140 "testtools/tests/test_deferredruntest.py")
2141 ;; unittest2 is a backport of Python2.7 features to Python 2.4.
2142 (("import unittest2 as unittest") "import unittest")
2143 (("import unittest2") "import unittest as unittest2")
2144 (("from unittest2 import") "from unittest import"))
2145 (substitute* "testtools/tests/test_testresult.py"
2146 ;; NUL in source code is not allowed (raises ValueError).
2147 (("\\x00\\x04") "\\x04"))
2148 #t)))))
2149 (propagated-inputs
2150 `(("python-mimeparse" ,python-mimeparse)
2151 ("python-extras" ,python-extras)))
2152 (home-page "https://github.com/testing-cabal/testtools")
2153 (synopsis
2154 "Extensions to the Python standard library unit testing framework")
2155 (description
2156 "Testtools extends the Python standard library unit testing framework to
2157 provide matchers, more debugging information, and cross-Python
2158 compatibility.")
2159 (license license:psfl)))
2160
2161 (define-public python2-testtools
2162 (package-with-python2 python-testtools))
2163
2164 (define-public python-testscenarios
2165 (package
2166 (name "python-testscenarios")
2167 (version "0.4")
2168 (source
2169 (origin
2170 (method url-fetch)
2171 (uri (string-append
2172 "https://pypi.python.org/packages/source/t/testscenarios/testscenarios-"
2173 version ".tar.gz"))
2174 (sha256
2175 (base32
2176 "1671jvrvqlmbnc42j7pc5y6vc37q44aiwrq0zic652pxyy2fxvjg"))))
2177 (build-system python-build-system)
2178 (propagated-inputs
2179 `(("python-testtools" ,python-testtools)))
2180 (home-page "https://launchpad.net/testscenarios")
2181 (synopsis "Pyunit extension for dependency injection")
2182 (description
2183 "Testscenarios provides clean dependency injection for Python unittest
2184 style tests.")
2185 (license (list license:bsd-3 license:asl2.0)))) ; at the user's option
2186
2187 (define-public python2-testscenarios
2188 (package-with-python2 python-testscenarios))
2189
2190 (define-public python-testresources
2191 (package
2192 (name "python-testresources")
2193 (version "0.2.7")
2194 (source
2195 (origin
2196 (method url-fetch)
2197 (uri (string-append
2198 "https://pypi.python.org/packages/source/t/testresources/testresources-"
2199 version ".tar.gz"))
2200 (sha256
2201 (base32
2202 "0cbj3plbllyz42c4b5xxgwaa7mml54lakslrn4kkhinxhdri22md"))))
2203 (build-system python-build-system)
2204 (home-page "https://launchpad.net/testresources")
2205 (synopsis
2206 "Pyunit extension for managing test resources")
2207 (description
2208 "Testresources is an extension to Python's unittest to allow declarative
2209 use of resources by test cases.")
2210 (license (list license:bsd-3 license:asl2.0)))) ; at the user's option
2211
2212 (define-public python2-testresources
2213 (package-with-python2 python-testresources))
2214
2215 (define-public python-subunit
2216 (package
2217 (name "python-subunit")
2218 (version "0.0.21")
2219 (source
2220 (origin
2221 (method url-fetch)
2222 (uri (string-append
2223 "https://pypi.python.org/packages/source/p/python-subunit/python-subunit-"
2224 version ".tar.gz"))
2225 (sha256
2226 (base32
2227 "1nkw9wfbvizmpajbj3in8ns07g7lwkiv8hip14jjlwk3cacls6jv"))))
2228 (build-system python-build-system)
2229 (propagated-inputs
2230 `(("python-extras" ,python-extras)
2231 ("python-mimeparse" ,python-mimeparse)))
2232 (native-inputs
2233 `(("python-testscenarios" ,python-testscenarios)))
2234 (home-page "http://launchpad.net/subunit")
2235 (synopsis "Python implementation of the subunit protocol")
2236 (description
2237 "Python-subunit is a Python implementation of the subunit test streaming
2238 protocol.")
2239 (license (list license:bsd-3 license:asl2.0)))) ; at the user's option
2240
2241 (define-public python2-subunit
2242 (package-with-python2 python-subunit))
2243
2244 ;; Recent versions of python-fixtures and python-testrepository need
2245 ;; python-pbr for packaging, which itself needs these two packages for
2246 ;; testing.
2247 ;; To fix this circular dependency, we use a build of python-pbr, based on the
2248 ;; same source, just without any test dependencies and with tests disabled.
2249 ;; python-pbr-minmal is then used to package python-fixtures and
2250 ;; python-testrepository.
2251 ;; Strictly speaking we currently could remove the test-requirements from the
2252 ;; normal python-pbr package (and save this package) since test are disabled
2253 ;; there anyway. But this may change in future.
2254 (define python-pbr-minimal
2255 (package
2256 (name "python-pbr-minimal")
2257 (version "1.10.0")
2258 (source
2259 (origin
2260 (method url-fetch)
2261 (uri (pypi-uri "pbr" version))
2262 (sha256
2263 (base32
2264 "177kd9kbv1hvf2ban7l3x9ymzbi1md4hkaymwbgnz7ihf312hr0q"))
2265 (patches (search-patches "python-pbr-fix-man-page-support.patch"))))
2266 (build-system python-build-system)
2267 (arguments
2268 `(#:tests? #f))
2269 (home-page "http://docs.openstack.org/developer/pbr/")
2270 (synopsis "Minimal build of python-pbr used for bootstrapping")
2271 (description
2272 "Used only for bootstrapping python2-pbr, you should not need this.")
2273 (license license:asl2.0)))
2274
2275 (define python2-pbr-minimal
2276 (package-with-python2 python-pbr-minimal))
2277
2278 (define-public python-pbr
2279 (package
2280 (inherit python-pbr-minimal)
2281 (name "python-pbr")
2282 (arguments
2283 `(#:tests? #f)) ;; Most tests seem to use the Internet.
2284 (propagated-inputs
2285 `(("git" ,git))) ;; pbr actually uses the "git" binary.
2286 (native-inputs
2287 `(("python-fixtures" ,python-fixtures)
2288 ;; discover, coverage, hacking, subunit
2289 ("python-mock" ,python-mock)
2290 ("python-six" ,python-six)
2291 ("python-sphinx" ,python-sphinx)
2292 ("python-testrepository" ,python-testrepository)
2293 ("python-testresources" ,python-testresources)
2294 ("python-testscenarios" ,python-testscenarios)
2295 ("python-testtools" ,python-testtools)
2296 ("python-virtualenv" ,python-virtualenv)))
2297 (synopsis "Enhance the default behavior of Python’s setuptools")
2298 (description
2299 "Python Build Reasonableness (PBR) is a library that injects some useful
2300 and sensible default behaviors into your setuptools run. It will set
2301 versions, process requirements files and generate AUTHORS and ChangeLog file
2302 from git information.
2303 ")))
2304
2305 (define-public python2-pbr
2306 (package-with-python2 python-pbr))
2307
2308 (define-public python-fixtures
2309 (package
2310 (name "python-fixtures")
2311 (version "1.4.0")
2312 (source
2313 (origin
2314 (method url-fetch)
2315 (uri (pypi-uri "fixtures" version))
2316 (sha256
2317 (base32
2318 "0djxvdwm8s60dbfn7bhf40x6g818p3b3mlwijm1c3bqg7msn271y"))))
2319 (build-system python-build-system)
2320 (arguments
2321 '(#:phases
2322 (modify-phases %standard-phases
2323 (replace 'check
2324 (lambda _
2325 (zero? (system* "python" "-m" "testtools.run"
2326 "fixtures.test_suite")))))))
2327 (propagated-inputs
2328 `(("python-six" ,python-six)))
2329 (native-inputs
2330 `(("python-mock" ,python-mock)
2331 ("python-pbr-minimal" ,python-pbr-minimal)
2332 ("python-testtools" ,python-testtools)))
2333 (home-page "https://launchpad.net/python-fixtures")
2334 (synopsis "Python test fixture library")
2335 (description
2336 "Fixtures provides a way to create reusable state, useful when writing
2337 Python tests.")
2338 (license (list license:bsd-3 license:asl2.0)))) ; at user's option
2339
2340 (define-public python2-fixtures
2341 (package-with-python2 python-fixtures))
2342
2343 (define-public python-testrepository
2344 (package
2345 (name "python-testrepository")
2346 (version "0.0.20")
2347 (source
2348 (origin
2349 (method url-fetch)
2350 (uri (string-append
2351 "https://pypi.python.org/packages/source/t/testrepository/testrepository-"
2352 version ".tar.gz"))
2353 (sha256
2354 (base32
2355 "1ssqb07c277010i6gzzkbdd46gd9mrj0bi0i8vn560n2k2y4j93m"))))
2356 (build-system python-build-system)
2357 (arguments
2358 ;; FIXME: Many tests are failing.
2359 '(#:tests? #f))
2360 (propagated-inputs
2361 `(("python-fixtures" ,python-fixtures)
2362 ("python-subunit" ,python-subunit)
2363 ("python-testtools" ,python-testtools)))
2364 (native-inputs
2365 `(("python-pbr-minimal" ,python-pbr-minimal) ;; same as for building fixture
2366 ("python-mimeparse" ,python-mimeparse)))
2367 (home-page "https://launchpad.net/testrepository")
2368 (synopsis "Database for Python test results")
2369 (description "Testrepository provides a database of test results which can
2370 be used as part of a developer's workflow to check things such as what tests
2371 have failed since the last commit or what tests are currently failing.")
2372 (license (list license:bsd-3 license:asl2.0)))) ; at user's option
2373
2374 (define-public python2-testrepository
2375 (package-with-python2 python-testrepository))
2376
2377 (define-public python-coverage
2378 (package
2379 (name "python-coverage")
2380 (version "4.1")
2381 (source
2382 (origin
2383 (method url-fetch)
2384 (uri (pypi-uri "coverage" version))
2385 (sha256
2386 (base32
2387 "01rbr4br4lsk0lwn8fb96zwd2xr4f0mg1w7iq3j11i8f5ig2nqs1"))))
2388 (build-system python-build-system)
2389 (arguments
2390 ;; FIXME: 95 tests failed, 539 passed, 6 skipped, 2 errors.
2391 '(#:tests? #f))
2392 (home-page "http://nedbatchelder.com/code/coverage")
2393 (synopsis "Code coverage measurement for Python")
2394 (description
2395 "Coverage measures code coverage, typically during test execution. It
2396 uses the code analysis tools and tracing hooks provided in the Python standard
2397 library to determine which lines are executable, and which have been
2398 executed.")
2399 (license license:bsd-3)))
2400
2401 (define-public python2-coverage
2402 (package-with-python2 python-coverage))
2403
2404 (define-public python-cov-core
2405 (package
2406 (name "python-cov-core")
2407 (version "1.15.0")
2408 (source
2409 (origin
2410 (method url-fetch)
2411 (uri (pypi-uri "cov-core" version))
2412 (sha256
2413 (base32
2414 "0k3np9ymh06yv1ib96sb6wfsxjkqhmik8qfsn119vnhga9ywc52a"))))
2415 (build-system python-build-system)
2416 (propagated-inputs
2417 `(("python-coverage" ,python-coverage)))
2418 (home-page "https://github.com/schlamar/cov-core")
2419 (synopsis "Coverage plugin core for pytest-cov, nose-cov and nose2-cov")
2420 (description
2421 "This is a library package for use by @code{pytest-cov}, @code{nose-cov}
2422 and @code{nose2-cov}. It is useful for developing coverage plugins for these
2423 testing frameworks.")
2424 (license license:expat)))
2425
2426 (define-public python2-cov-core
2427 (package-with-python2 python-cov-core))
2428
2429 (define-public python-discover
2430 (package
2431 (name "python-discover")
2432 (version "0.4.0")
2433 (source
2434 (origin
2435 (method url-fetch)
2436 (uri (string-append
2437 "https://pypi.python.org/packages/source/d/discover/discover-"
2438 version ".tar.gz"))
2439 (sha256
2440 (base32
2441 "0y8d0zwiqar51kxj8lzmkvwc3b8kazb04gk5zcb4nzg5k68zmhq5"))))
2442 (build-system python-build-system)
2443 (home-page "http://pypi.python.org/pypi/discover/")
2444 (synopsis
2445 "Python test discovery for unittest")
2446 (description
2447 "Discover provides test discovery for unittest, a feature that has been
2448 backported from Python 2.7 for Python 2.4+.")
2449 (license license:bsd-3)))
2450
2451 (define-public python2-discover
2452 (package-with-python2 python-discover))
2453
2454 (define-public behave
2455 (package
2456 (name "behave")
2457 (version "1.2.5")
2458 (source (origin
2459 (method url-fetch)
2460 (uri (pypi-uri "behave" version ".tar.bz2"))
2461 (sha256
2462 (base32
2463 "1iypp6z46r19n4xmgx6m1lwmlpfjh8vapq8izigrqlaarvp2y64c"))))
2464 (build-system python-build-system)
2465 (propagated-inputs
2466 `(("python-six" ,python-six)
2467 ("python-parse" ,python-parse)
2468 ("python-parse-type" ,python-parse-type)))
2469 (arguments `(#:tests? #f)) ;TODO: tests require nose>=1.3 and
2470 ;PyHamcrest>=1.8
2471 (home-page "https://github.com/behave/behave")
2472 (synopsis "Python behavior-driven development")
2473 (description
2474 "Behave is a tool for behavior-driven development in python.
2475 Behavior-driven development (or BDD) is an agile software development
2476 technique that encourages collaboration between developers, QA and
2477 non-technical or business participants in a software project. Behave uses
2478 tests written in a natural language style, backed up by Python code.")
2479 (license license:x11)))
2480
2481 (define-public python-exif-read
2482 (package
2483 (name "python-exif-read")
2484 (version "2.1.2")
2485 (source (origin
2486 (method url-fetch)
2487 (uri (pypi-uri "ExifRead" version))
2488 (sha256
2489 (base32
2490 "1b90jf6m9vxh9nanhpyvqdq7hmfx5iggw1l8kq10jrs6xgr49qkr"))))
2491 (build-system python-build-system)
2492 (arguments `(#:tests? #f)) ; no tests
2493 (home-page "https://github.com/ianare/exif-py")
2494 (synopsis "Python library to extract EXIF data from image files")
2495 (description
2496 "ExifRead is a Python library to extract EXIF data from tiff and jpeg
2497 files.")
2498 (license license:bsd-3)))
2499
2500 (define-public python2-exif-read
2501 (package-with-python2 python-exif-read))
2502
2503 (define-public python-pyld
2504 (package
2505 (name "python-pyld")
2506 (version "0.7.1")
2507 (source (origin
2508 (method url-fetch)
2509 (uri (pypi-uri "PyLD" version))
2510 (sha256
2511 (base32
2512 "1m0fs6897vxfkf7awah5i66i7b7smm5fnywf1w50fpzyfbfhr156"))))
2513 (build-system python-build-system)
2514 (arguments `(#:tests? #f)) ; no tests
2515 (home-page "https://github.com/digitalbazaar/pyld")
2516 (synopsis "Python implementation of the JSON-LD specification")
2517 (description
2518 "PyLD is an implementation of the JSON-LD specification.")
2519 (license license:bsd-3)))
2520
2521 (define-public python2-pyld
2522 (package-with-python2 python-pyld))
2523
2524 (define-public python-certifi
2525 (package
2526 (name "python-certifi")
2527 (version "2017.1.23")
2528 (source (origin
2529 (method url-fetch)
2530 (uri (pypi-uri "certifi" version))
2531 (sha256
2532 (base32
2533 "1klrzl3hgvcf2mjk00g0k3kk1p2z27vzwnxivwar4vhjmjvpz1w1"))))
2534 (build-system python-build-system)
2535 (home-page "https://certifi.io/")
2536 (synopsis "Python CA certificate bundle")
2537 (description
2538 "Certifi is a Python library that contains a CA certificate bundle, which
2539 is used by the Requests library to verify HTTPS requests.")
2540 (license license:asl2.0)))
2541
2542 (define-public python2-certifi
2543 (package-with-python2 python-certifi))
2544
2545 (define-public python-click
2546 (package
2547 (name "python-click")
2548 (version "6.7")
2549 (source
2550 (origin
2551 (method url-fetch)
2552 (uri (pypi-uri "click" version))
2553 (sha256
2554 (base32
2555 "02qkfpykbq35id8glfgwc38yc430427yd05z1wc5cnld8zgicmgi"))))
2556 (build-system python-build-system)
2557 (arguments
2558 `(#:phases
2559 (modify-phases %standard-phases
2560 (add-after 'unpack 'fix-paths
2561 (lambda* (#:key inputs #:allow-other-keys)
2562 (let ((glibc (assoc-ref inputs ,(if (%current-target-system)
2563 "cross-libc" "libc"))))
2564 (substitute* "click/_unicodefun.py"
2565 (("'locale'")
2566 (string-append "'" glibc "/bin/locale'"))))
2567 #t))
2568 (replace 'check
2569 (lambda _
2570 (zero? (system* "make" "test")))))))
2571 (native-inputs
2572 `(("python-pytest" ,python-pytest)))
2573 (home-page "http://click.pocoo.org")
2574 (synopsis "Command line library for Python")
2575 (description
2576 "Click is a Python package for creating command line interfaces in a
2577 composable way with as little code as necessary. Its name stands for
2578 \"Command Line Interface Creation Kit\". It's highly configurable but comes
2579 with sensible defaults out of the box.")
2580 (license license:bsd-3)))
2581
2582 (define-public python2-click
2583 (package-with-python2 python-click))
2584
2585 (define-public python-wheel
2586 (package
2587 (name "python-wheel")
2588 (version "0.30.0a0")
2589 (source
2590 (origin
2591 (method url-fetch)
2592 (uri (pypi-uri "wheel" version))
2593 (sha256
2594 (base32
2595 "1nm6mn8isny0hr86rhbfrpfj867c0phf001xgsd69xfp9ady1wwq"))))
2596 (build-system python-build-system)
2597 (native-inputs
2598 `(("python-jsonschema" ,python-jsonschema)
2599 ("python-pytest-cov" ,python-pytest-cov)))
2600 (home-page "https://bitbucket.org/pypa/wheel/")
2601 (synopsis "Format for built Python packages")
2602 (description
2603 "A wheel is a ZIP-format archive with a specially formatted filename and
2604 the @code{.whl} extension. It is designed to contain all the files for a PEP
2605 376 compatible install in a way that is very close to the on-disk format. Many
2606 packages will be properly installed with only the @code{Unpack} step and the
2607 unpacked archive preserves enough information to @code{Spread} (copy data and
2608 scripts to their final locations) at any later time. Wheel files can be
2609 installed with a newer @code{pip} or with wheel's own command line utility.")
2610 (license license:expat)
2611 (properties `((python2-variant . ,(delay python2-wheel))))))
2612
2613 (define-public python2-wheel
2614 (let ((wheel (package-with-python2
2615 (strip-python2-variant python-wheel))))
2616 (package (inherit wheel)
2617 (native-inputs `(("python2-functools32" ,python2-functools32)
2618 ,@(package-native-inputs wheel))))))
2619
2620
2621 (define-public python-requests
2622 (package
2623 (name "python-requests")
2624 (version "2.13.0")
2625 (source (origin
2626 (method url-fetch)
2627 (uri (pypi-uri "requests" version))
2628 (sha256
2629 (base32
2630 "1s0wg4any4dsv5l3hqjxqk2zgb7pdbqhy9rhc8kh3aigfq4ws8jp"))))
2631 ;; TODO: unbundle urllib3 and chardet.
2632 (build-system python-build-system)
2633 (arguments
2634 ;; FIXME: Some tests require network access.
2635 '(#:tests? #f))
2636 (home-page "http://python-requests.org/")
2637 (synopsis "Python HTTP library")
2638 (description
2639 "Requests is a Python HTTP client library. It aims to be easier to use
2640 than Python’s urllib2 library.")
2641 (license license:asl2.0)))
2642
2643 ;; Some software requires an older version of Requests, notably Docker
2644 ;; Compose.
2645 (define-public python-requests-2.7
2646 (package (inherit python-requests)
2647 (version "2.7.0")
2648 (source (origin
2649 (method url-fetch)
2650 (uri (pypi-uri "requests" version))
2651 (sha256
2652 (base32
2653 "0gdr9dxm24amxpbyqpbh3lbwxc2i42hnqv50sigx568qssv3v2ir"))))))
2654
2655 (define-public python2-requests
2656 (package-with-python2 python-requests))
2657
2658 (define-public python-vcversioner
2659 (package
2660 (name "python-vcversioner")
2661 (version "2.16.0.0")
2662 (source
2663 (origin
2664 (method url-fetch)
2665 (uri (pypi-uri "vcversioner" version))
2666 (sha256
2667 (base32
2668 "16z10sm78jd7ca3jbkgc3q5i8a8q7y1h21q1li21yy3rlhbhrrns"))))
2669 (build-system python-build-system)
2670 (synopsis "Python library for version number discovery")
2671 (description "Vcversioner is a Python library that inspects tagging
2672 information in a variety of version control systems in order to discover
2673 version numbers.")
2674 (home-page "https://github.com/habnabit/vcversioner")
2675 (license license:isc)))
2676
2677 (define-public python2-vcversioner
2678 (package-with-python2 python-vcversioner))
2679
2680 (define-public python-jsonschema
2681 (package
2682 (name "python-jsonschema")
2683 (version "2.5.1")
2684 (source (origin
2685 (method url-fetch)
2686 (uri
2687 (string-append
2688 "https://pypi.python.org/packages/source/j/jsonschema/jsonschema-"
2689 version ".tar.gz"))
2690 (sha256
2691 (base32
2692 "0hddbqjm4jq63y8jf44nswina1crjs16l9snb6m3vvgyg31klrrn"))))
2693 (build-system python-build-system)
2694 (arguments
2695 '(#:phases
2696 (modify-phases %standard-phases
2697 (replace 'check (lambda _ (zero? (system* "nosetests")))))))
2698 (native-inputs
2699 `(("python-nose" ,python-nose)
2700 ("python-vcversioner" ,python-vcversioner)))
2701 (home-page "https://github.com/Julian/jsonschema")
2702 (synopsis "Implementation of JSON Schema for Python")
2703 (description
2704 "Jsonschema is an implementation of JSON Schema for Python.")
2705 (license license:expat)
2706 (properties `((python2-variant . ,(delay python2-jsonschema))))))
2707
2708 (define-public python2-jsonschema
2709 (let ((jsonschema (package-with-python2
2710 (strip-python2-variant python-jsonschema))))
2711 (package (inherit jsonschema)
2712 (native-inputs
2713 `(("python2-mock" ,python2-mock)
2714 ,@(package-native-inputs jsonschema)))
2715 (propagated-inputs
2716 `(("python2-functools32" ,python2-functools32))))))
2717
2718 (define-public python-kitchen
2719 (package
2720 (name "python-kitchen")
2721 (version "1.2.4")
2722 (source
2723 (origin
2724 (method url-fetch)
2725 (uri (pypi-uri "kitchen" version))
2726 (sha256
2727 (base32
2728 "0ggv3p4x8jvmmzhp0xm00h6pvh1g0gmycw71rjwagnrj8n23vxrq"))))
2729 (build-system python-build-system)
2730 (propagated-inputs
2731 `(("python-chardet" ,python-chardet)))
2732 (home-page "https://github.com/fedora-infra/kitchen")
2733 (synopsis "Python API for snippets")
2734 (description "@code{kitchen} module provides a python API for all sorts of
2735 little useful snippets of code that everybody ends up writing for their projects
2736 but never seem big enough to build an independent release. Use kitchen and stop
2737 cutting and pasting that code over and over.")
2738 (license (list license:lgpl2.1+
2739 ;; subprocess.py, test_subprocess.py,
2740 ;; kitchen/pycompat25/defaultdict.py:
2741 license:psfl))))
2742
2743 (define-public python2-kitchen
2744 (package-with-python2 python-kitchen))
2745
2746 (define-public python-unidecode
2747 (package
2748 (name "python-unidecode")
2749 (version "0.04.20")
2750 (source (origin
2751 (method url-fetch)
2752 (uri (pypi-uri "Unidecode" version))
2753 (sha256
2754 (base32
2755 "1q00i8gpsq3d9r0q8wk4b290fxl0kqlsdk7iadvli45in6s1hi7d"))))
2756 (build-system python-build-system)
2757 (home-page "https://pypi.python.org/pypi/Unidecode")
2758 (synopsis "ASCII transliterations of Unicode text")
2759 (description
2760 "Unidecode provides ASCII transliterations of Unicode text. Unidecode is
2761 useful when integrating with legacy code that doesn't support Unicode, or for
2762 ease of entry of non-Roman names on a US keyboard, or when constructing ASCII
2763 machine identifiers from human-readable Unicode strings that should still be
2764 somewhat intelligeble.")
2765 (license license:gpl2+)))
2766
2767 (define-public python2-unidecode
2768 (package-with-python2 python-unidecode))
2769
2770 (define-public python-pyjwt
2771 (package
2772 (name "python-pyjwt")
2773 (version "1.4.0")
2774 (source
2775 (origin
2776 (method url-fetch)
2777 (uri (pypi-uri "PyJWT" version))
2778 (sha256
2779 (base32
2780 "1556v2jppd8mjkkj66pxb5rcazm35jq81r233mdl8hfmz9n3icp1"))))
2781 (build-system python-build-system)
2782 (native-inputs
2783 `(("python-pytest" ,python-pytest)
2784 ("python-pytest-cov" ,python-pytest-cov)
2785 ("python-pytest-runner" ,python-pytest-runner)))
2786 (home-page "https://github.com/progrium/pyjwt")
2787 (synopsis "JSON Web Token implementation in Python")
2788 (description
2789 "PyJWT is a JSON Web Token implementation written in Python.")
2790 (license license:expat)))
2791
2792 (define-public python2-pyjwt
2793 (package-with-python2 python-pyjwt))
2794
2795 (define-public python-pykka
2796 (package
2797 (name "python-pykka")
2798 (version "1.2.1")
2799 (source
2800 (origin
2801 (method url-fetch)
2802 (uri (pypi-uri "Pykka" version))
2803 (sha256
2804 (base32
2805 "049w3r0mdnnw7xv19jiq7rvls9k7xs73x05b4qs5d6z4vvmgyiz8"))))
2806 (build-system python-build-system)
2807 (native-inputs
2808 `(("python-mock" ,python-mock)
2809 ("python-nose" ,python-nose)
2810 ("python-gevent" ,python-gevent)
2811 ("python-eventlet" ,python-eventlet)))
2812 (home-page "https://www.pykka.org/")
2813 (synopsis "Pykka is a Python implementation of the actor model")
2814 (description
2815 "Pykka is a Python implementation of the actor model.
2816 The actor model introduces some simple rules to control the sharing
2817 of state and cooperation between execution units, which makes it
2818 easier to build concurrent applications.")
2819 (license license:asl2.0)))
2820
2821 (define-public python2-pykka
2822 (package-with-python2 python-pykka))
2823
2824 (define-public python-oauthlib
2825 (package
2826 (name "python-oauthlib")
2827 (version "1.0.3")
2828 (source (origin
2829 (method url-fetch)
2830 (uri (pypi-uri "oauthlib" version))
2831 (sha256
2832 (base32
2833 "1bfrj70vdjxjw74khbyh6f0dksv7p5rh2346jnlrffyacd3gwjzg"))))
2834 (build-system python-build-system)
2835 (native-inputs
2836 `(("python-nose" ,python-nose)
2837 ("python-mock" ,python-mock)
2838 ("python-cryptography" ,python-cryptography)
2839 ("python-pyjwt" ,python-pyjwt)
2840 ("python-blinker" ,python-blinker)))
2841 (home-page "https://github.com/idan/oauthlib")
2842 (synopsis "OAuth implementation for Python")
2843 (description
2844 "Oauthlib is a generic, spec-compliant, thorough implementation of the
2845 OAuth request-signing logic.")
2846 (license license:bsd-3)
2847 (properties `((python2-variant . ,(delay python2-oauthlib))))))
2848
2849 (define-public python2-oauthlib
2850 (let ((base (package-with-python2 (strip-python2-variant python-oauthlib))))
2851 (package
2852 (inherit base)
2853 (native-inputs `(("python2-unittest2" ,python2-unittest2)
2854 ,@(package-native-inputs base))))))
2855
2856 (define-public python-itsdangerous
2857 (package
2858 (name "python-itsdangerous")
2859 (version "0.24")
2860 (source
2861 (origin
2862 (method url-fetch)
2863 (uri (string-append
2864 "https://pypi.python.org/packages/source/i/itsdangerous/itsdangerous-"
2865 version ".tar.gz"))
2866 (sha256
2867 (base32
2868 "06856q6x675ly542ig0plbqcyab6ksfzijlyf1hzhgg3sgwgrcyb"))))
2869 (build-system python-build-system)
2870 (home-page "https://github.com/mitsuhiko/itsdangerous")
2871 (synopsis "Python library for passing data to/from untrusted environments")
2872 (description
2873 "Itsdangerous provides various helpers to pass trusted data to untrusted
2874 environments and back.")
2875 (license license:bsd-3)))
2876
2877 (define-public python2-itsdangerous
2878 (package-with-python2 python-itsdangerous))
2879
2880 (define-public python-pyyaml
2881 (package
2882 (name "python-pyyaml")
2883 (version "3.12")
2884 (source
2885 (origin
2886 (method url-fetch)
2887 (uri (pypi-uri "PyYAML" version))
2888 (sha256
2889 (base32
2890 "1aqjl8dk9amd4zr99n8v2qxzgmr2hdvqfma4zh7a41rj6336c9sr"))))
2891 (build-system python-build-system)
2892 (inputs
2893 `(("libyaml" ,libyaml)))
2894 (home-page "http://pyyaml.org/wiki/PyYAML")
2895 (synopsis "YAML parser and emitter for Python")
2896 (description
2897 "PyYAML is a YAML parser and emitter for Python. PyYAML features a
2898 complete YAML 1.1 parser, Unicode support, pickle support, capable extension
2899 API, and sensible error messages. PyYAML supports standard YAML tags and
2900 provides Python-specific tags that allow to represent an arbitrary Python
2901 object.")
2902 (license license:expat)))
2903
2904 (define-public python2-pyyaml
2905 (package-with-python2 python-pyyaml))
2906
2907 (define-public python-virtualenv
2908 (package
2909 (name "python-virtualenv")
2910 (version "15.0.3")
2911 (source
2912 (origin
2913 (method url-fetch)
2914 (uri (pypi-uri "virtualenv" version))
2915 (sha256
2916 (base32
2917 "07cbajzk8l05k5zhlw0b9wbf2is65bl9v6zrn2a0iyn57w6pd73d"))))
2918 (build-system python-build-system)
2919 (arguments
2920 `(#:phases
2921 (modify-phases %standard-phases
2922 (replace 'check
2923 (lambda _
2924 ;; Disable failing test. See upstream bug report
2925 ;; https://github.com/pypa/virtualenv/issues/957
2926 (substitute* "tests/test_virtualenv.py"
2927 (("skipif.*") "skipif(True, reason=\"Guix\")\n"))
2928 (zero? (system* "py.test")))))))
2929 (native-inputs
2930 `(("python-mock" ,python-mock)
2931 ("python-pytest" ,python-pytest)))
2932 (home-page "https://virtualenv.pypa.io/")
2933 (synopsis "Virtual Python environment builder")
2934 (description
2935 "Virtualenv is a tool to create isolated Python environments.")
2936 (license license:expat)))
2937
2938 (define-public python2-virtualenv
2939 (package-with-python2 python-virtualenv))
2940
2941 (define-public python-markupsafe
2942 (package
2943 (name "python-markupsafe")
2944 (version "0.23")
2945 (source
2946 (origin
2947 (method url-fetch)
2948 (uri (string-append
2949 "https://pypi.python.org/packages/source/M/MarkupSafe/MarkupSafe-"
2950 version ".tar.gz"))
2951 (sha256
2952 (base32
2953 "1hvip33wva3fnmvfp9x5klqri7hpl1hkgqmjbss18nmrb7zimv54"))))
2954 (build-system python-build-system)
2955 (home-page "https://github.com/mitsuhiko/markupsafe")
2956 (synopsis "XML/HTML/XHTML markup safe string implementation for Python")
2957 (description
2958 "Markupsafe provides an XML/HTML/XHTML markup safe string implementation
2959 for Python.")
2960 (license license:bsd-3)))
2961
2962 (define-public python2-markupsafe
2963 (package-with-python2 python-markupsafe))
2964
2965 (define-public python-jinja2
2966 (package
2967 (name "python-jinja2")
2968 (version "2.8")
2969 (source
2970 (origin
2971 (method url-fetch)
2972 (uri (pypi-uri "Jinja2" version))
2973 (sha256
2974 (base32
2975 "1x0v41lp5m1pjix3l46zx02b7lqp2hflgpnxwkywxynvi3zz47xw"))))
2976 (build-system python-build-system)
2977 (propagated-inputs
2978 `(("python-markupsafe" ,python-markupsafe)))
2979 (home-page "http://jinja.pocoo.org/")
2980 (synopsis "Python template engine")
2981 (description
2982 "Jinja2 is a small but fast and easy to use stand-alone template engine
2983 written in pure Python.")
2984 (license license:bsd-3)))
2985
2986 (define-public python2-jinja2
2987 (package-with-python2 python-jinja2))
2988
2989 (define-public python-pystache
2990 (package
2991 (name "python-pystache")
2992 (version "0.5.4")
2993 (source (origin
2994 (method url-fetch)
2995 (uri (pypi-uri "pystache" version))
2996 (sha256
2997 (base32
2998 "0nmqsfmiw4arjxqkmf9z66ml950pcdjk6aq4gin4sywmzdjw5fzp"))))
2999 (build-system python-build-system)
3000 (arguments
3001 '(#:tests? #f)) ; FIXME: Python 3 tests are failing.
3002 (home-page "http://defunkt.io/pystache/")
3003 (synopsis "Python logic-less template engine")
3004 (description
3005 "Pystache is a Python implementation of the framework agnostic,
3006 logic-free templating system Mustache.")
3007 (license license:expat)
3008 (properties `((python2-variant . ,(delay python2-pystache))))))
3009
3010 (define-public python2-pystache
3011 (package (inherit (package-with-python2
3012 (strip-python2-variant python-pystache)))
3013 (arguments
3014 `(#:python ,python-2
3015 #:phases
3016 (modify-phases %standard-phases
3017 (replace 'check
3018 (lambda _
3019 (zero? (system* "python" "test_pystache.py")))))))))
3020
3021 (define-public python-joblib
3022 (package
3023 (name "python-joblib")
3024 (version "0.10.3")
3025 (source (origin
3026 (method url-fetch)
3027 (uri (pypi-uri "joblib" version))
3028 (sha256
3029 (base32
3030 "0787k919zlfmgymprz5bzv0v1df5bbirlf3awrghmjgvkrd9dci9"))
3031 (modules '((guix build utils)))
3032 (snippet
3033 '(begin
3034 ;; Remove pre-compiled .pyc files from source.
3035 (for-each delete-file-recursively
3036 (find-files "." "__pycache__" #:directories? #t))
3037 (for-each delete-file (find-files "." "\\.pyc$"))
3038 #t))))
3039 (build-system python-build-system)
3040 (arguments
3041 `(#:phases
3042 (modify-phases %standard-phases
3043 (add-before 'check 'disable-failing-tests
3044 (lambda _
3045 ;; This numpydoc tests fails for unknown reasons
3046 (delete-file "doc/sphinxext/numpydoc/tests/test_docscrape.py")
3047 ;; This numpydoc test depends on matplotlib, which is not a
3048 ;; required input.
3049 (delete-file "doc/sphinxext/numpydoc/tests/test_plot_directive.py")
3050 ;; These tests fail to execute sys.executable
3051 (substitute* "joblib/test/test_parallel.py"
3052 (("import nose" line)
3053 (string-append "from nose.plugins.skip import SkipTest\n" line))
3054 (("def test_nested_parallel_warnings" line)
3055 (string-append "@SkipTest\n" line))
3056 (("def test_parallel_with_interactively_defined_functions" line)
3057 (string-append "@SkipTest\n" line)))
3058 #t)))))
3059 ;; Provide nose to enable tests command
3060 (native-inputs
3061 `(("python-nose" ,python-nose)
3062 ("python-sphinx" ,python-sphinx)
3063 ("python-docutils" ,python-docutils)
3064 ("python-numpydoc" ,python-numpydoc)))
3065 (home-page "http://pythonhosted.org/joblib/")
3066 (synopsis "Using Python functions as pipeline jobs")
3067 (description
3068 "Joblib is a set of tools to provide lightweight pipelining in Python.
3069 In particular, joblib offers: transparent disk-caching of the output values
3070 and lazy re-evaluation (memoize pattern), easy simple parallel computing
3071 logging and tracing of the execution.")
3072 (license license:bsd-3)))
3073
3074 (define-public python2-joblib
3075 (package-with-python2 python-joblib))
3076
3077 (define-public python-docutils
3078 (package
3079 (name "python-docutils")
3080 (version "0.13.1")
3081 (source
3082 (origin
3083 (method url-fetch)
3084 (uri (pypi-uri "docutils" version))
3085 (sha256
3086 (base32
3087 "1gkma47i609jfs7dssxn4y9vsz06qi0l5q41nws0zgkpnrghz33i"))))
3088 (build-system python-build-system)
3089 (arguments
3090 '(#:tests? #f)) ; no setup.py test command
3091 (home-page "http://docutils.sourceforge.net/")
3092 (synopsis "Python Documentation Utilities")
3093 (description
3094 "Docutils is a modular system for processing documentation into useful
3095 formats, such as HTML, XML, and LaTeX. For input Docutils supports
3096 reStructuredText.")
3097 ;; Most of the source code is public domain, but some source files are
3098 ;; licensed under the PFSL, BSD 2-clause, and GPLv3+ licenses.
3099 (license (list license:public-domain license:psfl license:bsd-2 license:gpl3+))))
3100
3101 (define-public python2-docutils
3102 (package-with-python2 python-docutils))
3103
3104 (define-public python-pygments
3105 (package
3106 (name "python-pygments")
3107 (version "2.1.3")
3108 (source
3109 (origin
3110 (method url-fetch)
3111 (uri (pypi-uri "Pygments" version))
3112 (sha256
3113 (base32
3114 "10axnp2wpjnq9g8wg53fx0c70dfxqrz498jyz8mrdx9a3flwir48"))))
3115 (build-system python-build-system)
3116 (arguments
3117 ;; FIXME: Tests require sphinx, which depends on this.
3118 '(#:tests? #f))
3119 (home-page "http://pygments.org/")
3120 (synopsis "Syntax highlighting")
3121 (description
3122 "Pygments is a syntax highlighting package written in Python.")
3123 (license license:bsd-2)))
3124
3125 (define-public python2-pygments
3126 (package-with-python2 python-pygments))
3127
3128 (define-public python-sphinx
3129 (package
3130 (name "python-sphinx")
3131 (version "1.5.1")
3132 (source
3133 (origin
3134 (method url-fetch)
3135 (uri (pypi-uri "Sphinx" version))
3136 (sha256
3137 (base32
3138 "1i8p9idnli4gr0y4x67yakbdk5w6a0xjzhrg6bg51y9d1fi7fslf"))))
3139 (build-system python-build-system)
3140 (arguments
3141 `(#:phases
3142 (modify-phases %standard-phases
3143 (replace 'check
3144 (lambda _
3145 ;; Requires Internet access.
3146 (delete-file "tests/test_build_linkcheck.py")
3147 (zero? (system* "make" "test")))))))
3148 (propagated-inputs
3149 `(("python-imagesize" ,python-imagesize)
3150 ("python-sphinx-alabaster-theme"
3151 ,python-sphinx-alabaster-theme)
3152 ("python-babel" ,python-babel)
3153 ("python-snowballstemmer" ,python-snowballstemmer)
3154 ("python-docutils" ,python-docutils)
3155 ("python-jinja2" ,python-jinja2)
3156 ("python-pygments" ,python-pygments)
3157 ("python-requests" ,python-requests)
3158 ("python-six" ,python-six)))
3159 (native-inputs
3160 `(("graphviz" ,graphviz)
3161 ("python-html5lib" ,python-html5lib)
3162 ("python-mock" ,python-mock)
3163 ("python-nose" ,python-nose)))
3164 (home-page "http://sphinx-doc.org/")
3165 (synopsis "Python documentation generator")
3166 (description "Sphinx is a tool that makes it easy to create documentation
3167 for Python projects or other documents consisting of multiple reStructuredText
3168 sources.")
3169 (license license:bsd-3)
3170 (properties `((python2-variant . ,(delay python2-sphinx))))))
3171
3172 (define-public python-sphinx-1.5.3
3173 (package
3174 (inherit python-sphinx)
3175 (name "python-sphinx")
3176 (version "1.5.3")
3177 (source
3178 (origin
3179 (method url-fetch)
3180 (uri (pypi-uri "Sphinx" version))
3181 (sha256
3182 (base32
3183 "0kw1axswbvaavr8ggyf4qr6hnisnrzlbkkcdada69vk1x9xjassg"))))
3184 (native-inputs
3185 `(("python-pytest" ,python-pytest-3.0)
3186 ,@(package-native-inputs python-sphinx)))))
3187
3188 (define-public python2-sphinx
3189 (let ((base (package-with-python2 (strip-python2-variant python-sphinx))))
3190 (package
3191 (inherit base)
3192 (native-inputs `(("python2-mock" ,python2-mock)
3193 ("python2-enum34" ,python2-enum34)
3194 ,@(package-native-inputs base)))
3195 (propagated-inputs `(("python2-pytz" ,python2-pytz)
3196 ,@(package-propagated-inputs base))))))
3197
3198 (define-public python-sphinx-rtd-theme
3199 (package
3200 (name "python-sphinx-rtd-theme")
3201 (version "0.2.4")
3202 (source
3203 (origin
3204 (method url-fetch)
3205 (uri (pypi-uri "sphinx_rtd_theme" version))
3206 (sha256
3207 (base32
3208 "05rlhjzdyapr2w74jjs7mrm8hi69qskcr5vya9f9drpsys7lpxrd"))))
3209 (build-system python-build-system)
3210 (arguments '(#:tests? #f)) ; No tests.
3211 (propagated-inputs
3212 `(("python-sphinx" ,python-sphinx)))
3213 (home-page "https://github.com/snide/sphinx_rtd_theme/")
3214 (synopsis "ReadTheDocs.org theme for Sphinx")
3215 (description "A theme for Sphinx used by ReadTheDocs.org.")
3216 (license license:expat)))
3217
3218 (define-public python2-sphinx-rtd-theme
3219 (package-with-python2 python-sphinx-rtd-theme))
3220
3221 (define-public python-rst.linker
3222 (package
3223 (name "python-rst.linker")
3224 (version "1.7")
3225 (source
3226 (origin
3227 (method url-fetch)
3228 (uri (pypi-uri "rst.linker" version))
3229 (sha256
3230 (base32
3231 "0bh4lnj2p1nh0wf5pgxgfbrp27xhb1rinahkb5j7s3qprq6qn0sr"))))
3232 (build-system python-build-system)
3233 (propagated-inputs
3234 `(("python-dateutil" ,python-dateutil)
3235 ("python-six" ,python-six)))
3236 (native-inputs
3237 `(("python-setuptools-scm" ,python-setuptools-scm)))
3238 ;; Test would require path.py, which would introduce a cyclic dependence.
3239 (arguments `(#:tests? #f))
3240 ;; Note: As of version 1.7 the documentation is not worth building.
3241 (home-page "https://github.com/jaraco/rst.linker")
3242 (synopsis "Sphinx plugin to add links and timestamps")
3243 (description "rst.linker allows to automatically replace text by a
3244 reStructuredText external reference or timestamps. It's primary purpose is to
3245 augment the changelog, but it can be used for other documents, too.")
3246 (license license:expat)))
3247
3248 (define-public python2-rst.linker
3249 (package-with-python2 python-rst.linker))
3250
3251 (define-public python-feedgenerator
3252 (package
3253 (name "python-feedgenerator")
3254 (version "1.9")
3255 (source
3256 (origin
3257 (method url-fetch)
3258 (uri (pypi-uri "feedgenerator" version))
3259 (sha256
3260 (base32
3261 "01mirwkm7xfx539hmvj7g9da1j51gw5lsx74dr0glizskjm5vq2s"))
3262 (modules '((guix build utils)))
3263 (snippet
3264 '(begin
3265 ;; Remove pre-compiled .pyc files from source.
3266 (for-each delete-file-recursively
3267 (find-files "." "__pycache__" #:directories? #t))
3268 (for-each delete-file (find-files "." "\\.pyc$"))
3269 #t))))
3270 (build-system python-build-system)
3271 (propagated-inputs
3272 `(("python-pytz" ,python-pytz)
3273 ("python-six" ,python-six)))
3274 (home-page "https://github.com/getpelican/feedgenerator")
3275 (synopsis
3276 "Standalone version of Django's Atom/RSS feed generator")
3277 (description
3278 "Feedgenerator-py3k is a standalone version of Django's feedgenerator,
3279 which can produce feeds in RSS 2.0, RSS 0.91, and Atom formats.")
3280 (license license:bsd-3)))
3281
3282 (define-public python2-feedgenerator
3283 (package-with-python2 python-feedgenerator))
3284
3285 (define-public python-blinker
3286 (package
3287 (name "python-blinker")
3288 (version "1.4")
3289 (source
3290 (origin
3291 (method url-fetch)
3292 (uri (pypi-uri "blinker" version))
3293 (sha256
3294 (base32
3295 "1dpq0vb01p36jjwbhhd08ylvrnyvcc82yxx3mwjx6awrycjyw6j7"))))
3296 (build-system python-build-system)
3297 (home-page "http://pythonhosted.org/blinker/")
3298 (synopsis "Fast, simple object-to-object and broadcast signaling")
3299 (description
3300 "Blinker provides a fast dispatching system that allows any number of
3301 interested parties to subscribe to events, or \"signals\".")
3302 (license license:expat)))
3303
3304 (define-public python2-blinker
3305 (package-with-python2 python-blinker))
3306
3307 (define-public pelican
3308 (package
3309 (name "pelican")
3310 (version "3.6.3")
3311 (source
3312 (origin
3313 (method url-fetch)
3314 (uri (pypi-uri "pelican" version))
3315 (sha256
3316 (base32
3317 "1hn94rb4q3zmcq16in055xikal4dba5hfx3zznq7warllcgc9f8k"))))
3318 (build-system python-build-system)
3319 (propagated-inputs
3320 `(("python-feedgenerator" ,python-feedgenerator)
3321 ("python-jinja2" ,python-jinja2)
3322 ("python-pygments" ,python-pygments)
3323 ("python-docutils" ,python-docutils)
3324 ("python-pytz" ,python-pytz)
3325 ("python-blinker" ,python-blinker)
3326 ("python-unidecode" ,python-unidecode)
3327 ("python-six" ,python-six)
3328 ("python-dateutil" ,python-dateutil)))
3329 (home-page "http://getpelican.com/")
3330 (arguments
3331 `(;; XXX Requires a lot more packages to do unit tests :P
3332 #:tests? #f
3333 #:phases (modify-phases %standard-phases
3334 (add-before
3335 'install 'adjust-requires
3336 ;; Since feedgenerator is installed from git, it doesn't
3337 ;; conform to the version requirements.
3338 ;;
3339 ;; We *do have* "feedgenerator >= 1.6", but strip off the
3340 ;; version requirement so setuptools doesn't get confused.
3341 (lambda _
3342 (substitute* "setup.py"
3343 (("['\"]feedgenerator.*?['\"]")
3344 "'feedgenerator'")))))))
3345 (synopsis "Python-based static site publishing system")
3346 (description
3347 "Pelican is a tool to generate a static blog from reStructuredText,
3348 Markdown input files, and more. Pelican uses Jinja2 for templating
3349 and is very extensible.")
3350 (license license:agpl3+)))
3351
3352 (define-public python-scikit-learn
3353 (package
3354 (name "python-scikit-learn")
3355 (version "0.18.1")
3356 (source
3357 (origin
3358 (method url-fetch)
3359 (uri (string-append
3360 "https://github.com/scikit-learn/scikit-learn/archive/"
3361 version ".tar.gz"))
3362 (file-name (string-append name "-" version ".tar.gz"))
3363 (sha256
3364 (base32
3365 "1hwswckdmd27f7k1jvwdc0m4mqrgxl2s245yq1scq34v124bjqgq"))))
3366 (build-system python-build-system)
3367 (arguments
3368 `(#:phases
3369 (modify-phases %standard-phases
3370 (delete 'check)
3371 (add-after 'install 'check
3372 ;; Running tests from the source directory requires
3373 ;; an "inplace" build with paths relative to CWD.
3374 ;; http://scikit-learn.org/stable/developers/advanced_installation.html#testing
3375 ;; Use the installed version instead.
3376 (lambda* (#:key inputs outputs #:allow-other-keys)
3377 (add-installed-pythonpath inputs outputs)
3378 ;; some tests require access to "$HOME"
3379 (setenv "HOME" "/tmp")
3380 ;; Step out of the source directory just to be sure.
3381 (chdir "..")
3382 (zero? (system* "nosetests" "-v" "sklearn")))))))
3383 (inputs
3384 `(("openblas" ,openblas)))
3385 (native-inputs
3386 `(("python-nose" ,python-nose)
3387 ("python-cython" ,python-cython)))
3388 (propagated-inputs
3389 `(("python-numpy" ,python-numpy)
3390 ("python-scipy" ,python-scipy)))
3391 (home-page "http://scikit-learn.org/")
3392 (synopsis "Machine Learning in Python")
3393 (description
3394 "Scikit-learn provides simple and efficient tools for data
3395 mining and data analysis.")
3396 (license license:bsd-3)))
3397
3398 (define-public python2-scikit-learn
3399 (package-with-python2 python-scikit-learn))
3400
3401 (define-public python-scikit-image
3402 (package
3403 (name "python-scikit-image")
3404 (version "0.11.3")
3405 (source
3406 (origin
3407 (method url-fetch)
3408 (uri (string-append
3409 "https://pypi.python.org/packages/source/s/scikit-image/scikit-image-"
3410 version ".tar.gz"))
3411 (sha256
3412 (base32 "0jz416fqvpahqyffw8plmszzfj669w8wvf3y9clnr5lr6a7md3kn"))))
3413 (build-system python-build-system)
3414 (arguments
3415 ;; TODO: Some tests require running X11 server. Disable them?
3416 '(#:tests? #f))
3417 ;; See DEPENDS.txt for the list of build and run time requiremnts
3418 (propagated-inputs
3419 `(("python-matplotlib" ,python-matplotlib)
3420 ("python-networkx" ,python-networkx)
3421 ("python-scipy" ,python-scipy)
3422 ("python-pillow" ,python-pillow)))
3423 (native-inputs
3424 `(("python-numpy" ,python-numpy)
3425 ("python-cython" ,python-cython)
3426 ("python-six" ,python-six)))
3427 (home-page "http://scikit-image.org/")
3428 (synopsis "Image processing in Python")
3429 (description
3430 "Scikit-image is a collection of algorithms for image processing.")
3431 (license license:bsd-3)))
3432
3433 (define-public python2-scikit-image
3434 (package-with-python2 python-scikit-image))
3435
3436 (define-public python-redis
3437 (package
3438 (name "python-redis")
3439 (version "2.10.5")
3440 (source
3441 (origin
3442 (method url-fetch)
3443 (uri (pypi-uri "redis" version))
3444 (sha256
3445 (base32 "0csmrkxb29x7xs9b51zplwkkq2hwnbh9jns1g85dykn5rxmaxysx"))))
3446 (build-system python-build-system)
3447 ;; Tests require a running Redis server
3448 (arguments '(#:tests? #f))
3449 ;; As long as we are not running test, we do not need this input :-)
3450 ;;(native-inputs
3451 ;; `(("python-pytest" ,python-pytest)))
3452 (home-page "https://github.com/andymccurdy/redis-py")
3453 (synopsis "Redis Python client")
3454 (description
3455 "This package provides a Python interface to the Redis key-value store.")
3456 (license license:expat)))
3457
3458 (define-public python2-redis
3459 (package-with-python2 python-redis))
3460
3461 (define-public python-rq
3462 (package
3463 (name "python-rq")
3464 (version "0.7.1")
3465 (source
3466 (origin
3467 (method url-fetch)
3468 (uri (pypi-uri "rq" version))
3469 (sha256
3470 (base32 "0gaq5pnh0zy46r8jvygi0ifbvz3pq6i7xla78ijcgjw0x77qzsdh"))))
3471 (build-system python-build-system)
3472 (propagated-inputs
3473 `(("python-click" ,python-click)
3474 ("python-redis" ,python-redis)))
3475 (home-page "http://python-rq.org/")
3476 (synopsis "Simple job queues for Python")
3477 (description
3478 "RQ (Redis Queue) is a simple Python library for queueing jobs and
3479 processing them in the background with workers. It is backed by Redis and it
3480 is designed to have a low barrier to entry.")
3481 (license license:bsd-2)))
3482
3483 (define-public python2-rq
3484 (package-with-python2 python-rq))
3485
3486 (define-public python-cython
3487 (package
3488 (name "python-cython")
3489 (version "0.25.2")
3490 (source
3491 (origin
3492 (method url-fetch)
3493 (uri (pypi-uri "Cython" version))
3494 (patches (search-patches "python-cython-fix-tests-32bit.patch"))
3495 (sha256
3496 (base32
3497 "01h3lrf6d98j07iakifi81qjszh6faa37ibx7ylva1vsqbwx2hgi"))))
3498 (build-system python-build-system)
3499 ;; we need the full python package and not just the python-wrapper
3500 ;; because we need libpython3.3m.so
3501 (inputs
3502 `(("python" ,python)))
3503 (arguments
3504 `(#:phases
3505 (modify-phases %standard-phases
3506 (add-before 'check 'set-HOME
3507 ;; some tests require access to "$HOME/.cython"
3508 (lambda _ (setenv "HOME" "/tmp")))
3509 (replace 'check
3510 (lambda _ (zero? (system* "python" "runtests.py" "-vv")))))))
3511 (home-page "http://cython.org/")
3512 (synopsis "C extensions for Python")
3513 (description "Cython is an optimising static compiler for both the Python
3514 programming language and the extended Cython programming language. It makes
3515 writing C extensions for Python as easy as Python itself.")
3516 (license license:asl2.0)
3517 (properties `((python2-variant . ,(delay python2-cython))))))
3518
3519 (define-public python2-cython
3520 (package (inherit (package-with-python2
3521 (strip-python2-variant python-cython)))
3522 (name "python2-cython")
3523 (inputs
3524 `(("python-2" ,python-2))))) ; this is not automatically changed
3525
3526 ;; The RPython toolchain currently does not support Python 3.
3527 (define-public python2-rpython
3528 (package
3529 (name "python2-rpython")
3530 (version "0.1.4")
3531 (source
3532 (origin
3533 (method url-fetch)
3534 (uri (pypi-uri "rpython" version))
3535 (sha256
3536 (base32
3537 "07pps06fq4c4wmi5ii0sgh9zgwniz5y7frqhm28g3a154l163fxc"))))
3538 (build-system python-build-system)
3539 (arguments `(#:python ,python-2))
3540 (native-inputs
3541 `(("python2-pytest" ,python2-pytest))) ; needed for running tests
3542 (home-page "https://rpython.readthedocs.org")
3543 (synopsis "Framework for implementing interpreters and virtual machines")
3544 (description "RPython is a translation and support framework for
3545 producing implementations of dynamic languages, emphasizing a clean separation
3546 between language specification and implementation aspects.")
3547 (license license:expat)))
3548
3549 (define-public python-numpy
3550 (package
3551 (name "python-numpy")
3552 (version "1.12.0")
3553 (source
3554 (origin
3555 (method url-fetch)
3556 (uri (string-append
3557 "https://github.com/numpy/numpy/archive/v" version ".tar.gz"))
3558 (file-name (string-append name "-" version ".tar.gz"))
3559 (sha256
3560 (base32
3561 "025d4j4aakcp8w5i5diqh812cbbjgac7jszx1j56ivrbi1i8vv7d"))))
3562 (build-system python-build-system)
3563 (inputs
3564 `(("openblas" ,openblas)
3565 ("lapack" ,lapack)))
3566 (native-inputs
3567 `(("python-cython" ,python-cython)
3568 ("python-nose" ,python-nose)
3569 ("gfortran" ,gfortran)))
3570 (arguments
3571 `(#:phases
3572 (modify-phases %standard-phases
3573 (add-before 'build 'set-environment-variables
3574 (lambda* (#:key inputs #:allow-other-keys)
3575 (call-with-output-file "site.cfg"
3576 (lambda (port)
3577 (format port
3578 "[openblas]
3579 libraries = openblas
3580 library_dirs = ~a/lib
3581 include_dirs = ~a/include
3582
3583 # backslash-n to make emacs happy
3584 \n[lapack]
3585 lapack_libs = lapack
3586 library_dirs = ~a/lib
3587 include_dirs = ~a/include
3588 "
3589 (assoc-ref inputs "openblas")
3590 (assoc-ref inputs "openblas")
3591 (assoc-ref inputs "lapack")
3592 (assoc-ref inputs "lapack"))))
3593 ;; Use "gcc" executable, not "cc".
3594 (substitute* "numpy/distutils/system_info.py"
3595 (("c = distutils\\.ccompiler\\.new_compiler\\(\\)")
3596 "c = distutils.ccompiler.new_compiler(); c.set_executables(compiler='gcc',compiler_so='gcc',linker_exe='gcc',linker_so='gcc -shared')"))
3597 #t))
3598 ;; Tests can only be run after the library has been installed and not
3599 ;; within the source directory.
3600 (delete 'check)
3601 (add-after 'install 'check
3602 (lambda* (#:key outputs inputs #:allow-other-keys)
3603 ;; Make installed package available for running the tests
3604 (add-installed-pythonpath inputs outputs)
3605 (with-directory-excursion "/tmp"
3606 (zero? (system* "python" "-c"
3607 "import numpy; numpy.test(verbose=2)"))))))))
3608 (home-page "http://www.numpy.org/")
3609 (synopsis "Fundamental package for scientific computing with Python")
3610 (description "NumPy is the fundamental package for scientific computing
3611 with Python. It contains among other things: a powerful N-dimensional array
3612 object, sophisticated (broadcasting) functions, tools for integrating C/C++
3613 and Fortran code, useful linear algebra, Fourier transform, and random number
3614 capabilities.")
3615 (license license:bsd-3)))
3616
3617 (define-public python2-numpy
3618 (package-with-python2 python-numpy))
3619
3620 (define-public python-munch
3621 (package
3622 (name "python-munch")
3623 (version "2.0.4")
3624 (source
3625 (origin
3626 (method url-fetch)
3627 (uri (pypi-uri "munch" version))
3628 (sha256
3629 (base32
3630 "1cmqg91xnqx8gvnh4pmp0bfl1dfcm65d5p9mg73zz8pkjhx6h80l"))))
3631 (build-system python-build-system)
3632 (home-page "https://github.com/Infinidat/munch")
3633 (synopsis "Dot-accessible dictionary")
3634 (description "Munch is a dot-accessible dictionary similar to JavaScript
3635 objects.")
3636 (license license:expat)))
3637
3638 (define-public python2-munch
3639 (package-with-python2 python-munch))
3640
3641 (define-public python2-fastlmm
3642 (package
3643 (name "python2-fastlmm")
3644 (version "0.2.21")
3645 (source
3646 (origin
3647 (method url-fetch)
3648 (uri (pypi-uri "fastlmm" version ".zip"))
3649 (sha256
3650 (base32
3651 "1q8c34rpmwkfy3r4d5172pzdkpfryj561897z9r3x22gq7813x1m"))))
3652 (build-system python-build-system)
3653 (arguments
3654 `(#:python ,python-2)) ; only Python 2.7 is supported
3655 (propagated-inputs
3656 `(("python2-numpy" ,python2-numpy)
3657 ("python2-scipy" ,python2-scipy)
3658 ("python2-matplotlib" ,python2-matplotlib)
3659 ("python2-pandas" ,python2-pandas)
3660 ("python2-scikit-learn" ,python2-scikit-learn)
3661 ("python2-pysnptools" ,python2-pysnptools)))
3662 (native-inputs
3663 `(("unzip" ,unzip)
3664 ("python2-cython" ,python2-cython)
3665 ("python2-mock" ,python2-mock)
3666 ("python2-nose" ,python2-nose)))
3667 (home-page "http://research.microsoft.com/en-us/um/redmond/projects/mscompbio/fastlmm/")
3668 (synopsis "Perform genome-wide association studies on large data sets")
3669 (description
3670 "FaST-LMM, which stands for Factored Spectrally Transformed Linear Mixed
3671 Models, is a program for performing both single-SNP and SNP-set genome-wide
3672 association studies (GWAS) on extremely large data sets.")
3673 (license license:asl2.0)))
3674
3675 (define-public python-numpy-documentation
3676 (package
3677 (name "python-numpy-documentation")
3678 (version (package-version python-numpy))
3679 (source (package-source python-numpy))
3680 (build-system python-build-system)
3681 (native-inputs
3682 `(("python-matplotlib" ,python-matplotlib)
3683 ("python-numpy" ,python-numpy)
3684 ("pkg-config" ,pkg-config)
3685 ("python-sphinx" ,python-sphinx)
3686 ("python-numpydoc" ,python-numpydoc)
3687 ("texlive" ,texlive)
3688 ("texinfo" ,texinfo)
3689 ("perl" ,perl)
3690 ("scipy-sphinx-theme"
3691 ,(origin ; The build script expects scipy-sphinx-theme as a git submodule
3692 (method git-fetch)
3693 (uri (git-reference
3694 (url "https://github.com/scipy/scipy-sphinx-theme.git")
3695 (commit "c466764e2231ba132c09826b5b138fffa1cfcec3")))
3696 (sha256
3697 (base32
3698 "0q2y87clwlsgc7wvlsn9pzyssybcq10plwhq2w1ydykfsyyqbmkl"))))
3699 ,@(package-native-inputs python-numpy)))
3700 (arguments
3701 `(#:tests? #f ; we're only generating the documentation
3702 #:phases
3703 (modify-phases %standard-phases
3704 (delete 'build)
3705 (replace 'install
3706 (lambda* (#:key inputs outputs #:allow-other-keys)
3707 (let* ((data (string-append (assoc-ref outputs "out") "/share"))
3708 (doc (string-append
3709 data "/doc/" ,name "-"
3710 ,(package-version python-numpy)))
3711 (info-reader (string-append data "/info"))
3712 (html (string-append doc "/html"))
3713 (scipy-sphinx-theme "scipy-sphinx-theme")
3714 (sphinx-theme-checkout (assoc-ref inputs scipy-sphinx-theme))
3715 (pyver ,(string-append "PYVER=")))
3716 (with-directory-excursion "doc"
3717 (copy-recursively sphinx-theme-checkout scipy-sphinx-theme)
3718 (mkdir-p html)
3719 (system* "make" "html" pyver)
3720 (system* "make" "latex" "PAPER=a4" pyver)
3721 (system* "make" "-C" "build/latex"
3722 "all-pdf" "PAPER=a4" pyver)
3723 ;; FIXME: Generation of the info file fails.
3724 ;; (system* "make" "info" pyver)
3725 ;; (mkdir-p info)
3726 ;; (copy-file "build/texinfo/numpy.info"
3727 ;; (string-append info "/numpy.info"))
3728 (for-each (lambda (file)
3729 (copy-file (string-append "build/latex" file)
3730 (string-append doc file)))
3731 '("/numpy-ref.pdf" "/numpy-user.pdf"))
3732 (with-directory-excursion "build/html"
3733 (for-each (lambda (file)
3734 (let* ((dir (dirname file))
3735 (tgt-dir (string-append html "/" dir)))
3736 (unless (equal? "." dir)
3737 (mkdir-p tgt-dir))
3738 (install-file file html)))
3739 (find-files "." ".*")))))
3740 #t)))))
3741 (home-page (package-home-page python-numpy))
3742 (synopsis "Documentation for the python-numpy package")
3743 (description (package-description python-numpy))
3744 (license (package-license python-numpy))))
3745
3746 (define-public python2-numpy-documentation
3747 (let ((numpy-documentation (package-with-python2 python-numpy-documentation)))
3748 (package
3749 (inherit numpy-documentation)
3750 (native-inputs `(("python2-functools32" ,python2-functools32)
3751 ,@(package-native-inputs numpy-documentation))))))
3752
3753 (define-public python-pygit2
3754 (package
3755 (name "python-pygit2")
3756 (version "0.25.0")
3757 (source
3758 (origin
3759 (method url-fetch)
3760 (uri (pypi-uri "pygit2" version))
3761 (sha256
3762 (base32
3763 "0wf5rp0fvrw7j3j18dvwjq6xqlbm611wd55aphrfpps0v1gxh3ny"))
3764 (patches
3765 (search-patches "python-pygit2-disable-network-tests.patch"))))
3766 (build-system python-build-system)
3767 (propagated-inputs
3768 `(("python-six" ,python-six)
3769 ("python-cffi" ,python-cffi)
3770 ("libgit2" ,libgit2)
3771 ("python-tox" ,python-tox)))
3772 (home-page "https://github.com/libgit2/pygit2")
3773 (synopsis "Python bindings for libgit2")
3774 (description "Pygit2 is a set of Python bindings to the libgit2 shared
3775 library, libgit2 implements Git plumbing.")
3776 ;; GPL2.0 only, with linking exception.
3777 (license license:gpl2)))
3778
3779 (define-public python2-pygit2
3780 (package-with-python2 python-pygit2))
3781
3782 (define-public python-pyparsing
3783 (package
3784 (name "python-pyparsing")
3785 (version "2.0.3")
3786 (source
3787 (origin
3788 (method url-fetch)
3789 (uri (string-append "mirror://sourceforge/pyparsing/pyparsing"
3790 "/pyparsing-" version
3791 "/pyparsing-" version ".tar.gz"))
3792 (sha256
3793 (base32
3794 "0kw4py7gn45j93q8r7bzajfrjdc3xlsn2yzln41lf9zmrghjkrq6"))))
3795 (build-system python-build-system)
3796 (outputs '("out" "doc"))
3797 (arguments
3798 `(#:tests? #f ; no test target
3799 #:modules ((guix build python-build-system)
3800 (guix build utils))
3801 #:phases
3802 (alist-cons-after
3803 'install 'install-doc
3804 (lambda* (#:key outputs #:allow-other-keys)
3805 (let* ((doc (string-append (assoc-ref outputs "doc")
3806 "/share/doc/" ,name "-" ,version))
3807 (html-doc (string-append doc "/html"))
3808 (examples (string-append doc "/examples")))
3809 (mkdir-p html-doc)
3810 (mkdir-p examples)
3811 (for-each
3812 (lambda (dir tgt)
3813 (map (lambda (file)
3814 (install-file file tgt))
3815 (find-files dir ".*")))
3816 (list "docs" "htmldoc" "examples")
3817 (list doc html-doc examples))))
3818 %standard-phases)))
3819 (home-page "http://pyparsing.wikispaces.com")
3820 (synopsis "Python parsing class library")
3821 (description
3822 "The pyparsing module is an alternative approach to creating and
3823 executing simple grammars, vs. the traditional lex/yacc approach, or the use
3824 of regular expressions. The pyparsing module provides a library of classes
3825 that client code uses to construct the grammar directly in Python code.")
3826 (license license:expat)))
3827
3828 (define-public python2-pyparsing
3829 (package-with-python2 python-pyparsing))
3830
3831 (define-public python-numpydoc
3832 (package
3833 (name "python-numpydoc")
3834 (version "0.5")
3835 (source
3836 (origin
3837 (method url-fetch)
3838 (uri (string-append
3839 "https://pypi.python.org/packages/source/n/numpydoc/numpydoc-"
3840 version ".tar.gz"))
3841 (sha256
3842 (base32
3843 "0d4dnifaxkll50jx6czj05y8cb4ny60njd2wz299sj2jxfy51w4k"))
3844 (modules '((guix build utils)))
3845 (snippet
3846 '(begin
3847 ;; Drop a test requiring matplotlib, which we cannot add as an
3848 ;; input since it would create a circular dependency: Extend the
3849 ;; test for Python 3, where it is already dropped, to Python 2.
3850 (substitute* "numpydoc/tests/test_plot_directive.py"
3851 (("3") "2"))))))
3852 (build-system python-build-system)
3853 (propagated-inputs
3854 `(("python-sphinx" ,python-sphinx)))
3855 (native-inputs
3856 `(("python-nose" ,python-nose)))
3857 (home-page "https://pypi.python.org/pypi/numpydoc")
3858 (synopsis
3859 "Numpy's Sphinx extensions")
3860 (description
3861 "Sphinx extension to support docstrings in Numpy format.")
3862 (license license:bsd-2)))
3863
3864 (define-public python2-numpydoc
3865 (package-with-python2 python-numpydoc))
3866
3867 (define-public python-numexpr
3868 (package
3869 (name "python-numexpr")
3870 (version "2.6.1")
3871 (source
3872 (origin
3873 (method url-fetch)
3874 (uri (pypi-uri "numexpr" version))
3875 (sha256
3876 (base32
3877 "01lsja72m32z0i5p8rwxbfyzk4mplh72k2a140nwh8vv4wpyfbnv"))))
3878 (build-system python-build-system)
3879 (arguments `(#:tests? #f)) ; no tests included
3880 (propagated-inputs
3881 `(("python-numpy" ,python-numpy)))
3882 (home-page "https://github.com/pydata/numexpr")
3883 (synopsis "Fast numerical expression evaluator for NumPy")
3884 (description
3885 "Numexpr is a fast numerical expression evaluator for NumPy. With it,
3886 expressions that operate on arrays are accelerated and use less memory than
3887 doing the same calculation in Python. In addition, its multi-threaded
3888 capabilities can make use of all your cores, which may accelerate
3889 computations, most specially if they are not memory-bounded (e.g. those using
3890 transcendental functions).")
3891 (license license:expat)))
3892
3893 (define-public python2-numexpr
3894 (package-with-python2 python-numexpr))
3895
3896 (define-public python-cycler
3897 (package
3898 (name "python-cycler")
3899 (version "0.10.0")
3900 (source (origin
3901 (method url-fetch)
3902 (uri (pypi-uri "cycler" version))
3903 (sha256
3904 (base32
3905 "1n69n23fak1gjxlrbhqisi2b9pv3ckrfj98llx3p53953082syyd"))))
3906 (build-system python-build-system)
3907 (arguments
3908 ;; XXX: The current version requires 'coveralls' which we don't have.
3909 ;; Enable this for the next release which uses 'python-pytest'.
3910 '(#:tests? #f))
3911 (propagated-inputs
3912 `(("python-six" ,python-six)))
3913 (home-page "http://matplotlib.org/cycler/")
3914 (synopsis "Composable keyword argument iterator")
3915 (description
3916 "When using @code{matplotlib} and plotting more than one line, it is
3917 common to want to be able to want to be able to cycle over one or more artist
3918 styles; but the plotting logic can quickly become involved.
3919 To address this and enable easy cycling over arbitrary @code{kwargs}, the
3920 @code{Cycler} class was developed.")
3921 (license license:bsd-3)))
3922
3923 (define-public python2-cycler
3924 (package-with-python2 python-cycler))
3925
3926 (define-public python-colorspacious
3927 (package
3928 (name "python-colorspacious")
3929 (version "1.1.0")
3930 (source
3931 (origin
3932 (method url-fetch)
3933 (uri (string-append "https://github.com/njsmith/colorspacious/archive/v"
3934 version ".tar.gz"))
3935 (file-name (string-append name "-" version))
3936 (sha256
3937 (base32 "1vflh5jm32qb0skza2i8pjacv09w6gq84fqpp2nj77s0rbmzgr4k"))))
3938 (build-system python-build-system)
3939 (propagated-inputs
3940 `(("python-numpy" ,python-numpy)))
3941 (native-inputs
3942 `(("python-nose" ,python-nose)))
3943 (arguments
3944 `(#:phases
3945 (modify-phases %standard-phases
3946 (replace 'check
3947 (lambda _
3948 (zero? (system* "nosetests" "--all-modules" "-v" "colorspacious")))))))
3949 (home-page "https://github.com/njsmith/colorspacious")
3950 (synopsis "Python library for colorspace conversions")
3951 (description "@code{colorspacious} is a Python library that lets you
3952 convert between colorspaces like sRGB, XYZ, CIEL*a*b*, CIECAM02, CAM02-UCS, etc.")
3953 (license license:expat)))
3954
3955 (define-public python2-colorspacious
3956 (package-with-python2 python-colorspacious))
3957
3958 (define-public python-matplotlib
3959 (package
3960 (name "python-matplotlib")
3961 (version "2.0.0")
3962 (source
3963 (origin
3964 (method url-fetch)
3965 (uri (string-append
3966 "https://github.com/matplotlib/matplotlib/archive/v" version ".tar.gz"))
3967 (file-name (string-append name "-" version ".tar.gz"))
3968 (sha256
3969 (base32
3970 "0w3k5m5qb3wsd7yhvmg042xddvligklvcq2visk2c5wnph3hhsln"))))
3971 (build-system python-build-system)
3972 (propagated-inputs ; the following packages are all needed at run time
3973 `(("python-cycler" ,python-cycler)
3974 ("python-pyparsing" ,python-pyparsing)
3975 ("python-pygobject" ,python-pygobject)
3976 ("gobject-introspection" ,gobject-introspection)
3977 ("python-tkinter" ,python "tk")
3978 ("python-dateutil" ,python-dateutil)
3979 ("python-numpy" ,python-numpy)
3980 ("python-pillow" ,python-pillow)
3981 ("python-pytz" ,python-pytz)
3982 ("python-six" ,python-six)
3983 ;; The 'gtk+' package (and 'gdk-pixbuf', 'atk' and 'pango' propagated
3984 ;; from 'gtk+') provides the required 'typelib' files used by
3985 ;; 'gobject-introspection'. The location of these files is set with the
3986 ;; help of the environment variable GI_TYPELIB_PATH. At build time this
3987 ;; is done automatically by a 'native-search-path' procedure. However,
3988 ;; at run-time the user must set this variable as follows:
3989 ;;
3990 ;; export GI_TYPELIB_PATH=~/.guix-profile/lib/girepository-1.0
3991 ("gtk+" ,gtk+)
3992 ;; From version 1.4.0 'matplotlib' makes use of 'cairocffi' instead of
3993 ;; 'pycairo'. However, 'pygobject' makes use of a 'pycairo' 'context'
3994 ;; object. For this reason we need to import both libraries.
3995 ;; https://pythonhosted.org/cairocffi/cffi_api.html#converting-pycairo
3996 ("python-pycairo" ,python-pycairo)
3997 ("python-cairocffi" ,python-cairocffi)))
3998 (inputs
3999 `(("libpng" ,libpng)
4000 ("imagemagick" ,imagemagick)
4001 ("freetype" ,freetype)
4002 ("cairo" ,cairo)
4003 ("glib" ,glib)
4004 ;; FIXME: Add backends when available.
4005 ;("python-wxpython" ,python-wxpython)
4006 ("python-pyqt" ,python-pyqt)
4007 ("tcl" ,tcl)
4008 ("tk" ,tk)))
4009 (native-inputs
4010 `(("pkg-config" ,pkg-config)
4011 ("python-nose" ,python-nose)
4012 ("python-mock" ,python-mock)))
4013 (arguments
4014 `(#:phases
4015 (modify-phases %standard-phases
4016 (add-before 'build 'configure-environment
4017 (lambda* (#:key outputs inputs #:allow-other-keys)
4018 (let ((cairo (assoc-ref inputs "cairo"))
4019 (gtk+ (assoc-ref inputs "gtk+")))
4020 ;; Setting these directories in the 'basedirlist' of 'setup.cfg'
4021 ;; has not effect.
4022 (setenv "LD_LIBRARY_PATH"
4023 (string-append cairo "/lib:" gtk+ "/lib"))
4024 (setenv "HOME" (getcwd))
4025 (call-with-output-file "setup.cfg"
4026 (lambda (port)
4027 (format port "[directories]~%
4028 basedirlist = ~a,~a~%
4029 [rc_options]~%
4030 backend = TkAgg~%"
4031 (assoc-ref inputs "tcl")
4032 (assoc-ref inputs "tk")))))
4033 #t)))))
4034 (home-page "http://matplotlib.org")
4035 (synopsis "2D plotting library for Python")
4036 (description
4037 "Matplotlib is a Python 2D plotting library which produces publication
4038 quality figures in a variety of hardcopy formats and interactive environments
4039 across platforms. Matplotlib can be used in Python scripts, the python and
4040 ipython shell, web application servers, and six graphical user interface
4041 toolkits.")
4042 (license license:psfl)
4043 (properties `((python2-variant . ,(delay python2-matplotlib))))))
4044
4045 (define-public python2-matplotlib
4046 (let ((matplotlib (package-with-python2
4047 (strip-python2-variant python-matplotlib))))
4048 (package (inherit matplotlib)
4049 ;; Make sure to use special packages for Python 2 instead
4050 ;; of those automatically rewritten by package-with-python2.
4051 (propagated-inputs
4052 `(("python2-pycairo" ,python2-pycairo)
4053 ("python2-functools32" ,python2-functools32)
4054 ("python2-pygobject-2" ,python2-pygobject-2)
4055 ("python2-subprocess32" ,python2-subprocess32)
4056 ("python2-tkinter" ,python-2 "tk")
4057 ,@(fold alist-delete (package-propagated-inputs matplotlib)
4058 '("python-pycairo" "python-pygobject" "python-tkinter")))))))
4059
4060 (define-public python-matplotlib-documentation
4061 (package
4062 (name "python-matplotlib-documentation")
4063 (version (package-version python-matplotlib))
4064 (source (package-source python-matplotlib))
4065 (build-system python-build-system)
4066 (native-inputs
4067 `(("python-matplotlib" ,python-matplotlib)
4068 ("python-colorspacious" ,python-colorspacious)
4069 ("python-sphinx" ,python-sphinx)
4070 ("python-numpydoc" ,python-numpydoc)
4071 ("python-ipython" ,python-ipython)
4072 ("python-mock" ,python-mock)
4073 ("graphviz" ,graphviz)
4074 ("texlive" ,texlive)
4075 ("texinfo" ,texinfo)
4076 ,@(package-native-inputs python-matplotlib)))
4077 (arguments
4078 `(#:tests? #f ; we're only generating documentation
4079 #:phases
4080 (modify-phases %standard-phases
4081 (replace 'build
4082 (lambda _
4083 (chdir "doc")
4084 ;; Produce pdf in 'A4' format.
4085 (substitute* "conf.py"
4086 (("latex_paper_size = 'letter'") "")
4087 ;; latex_paper_size is deprecated -> set paper size using
4088 ;; latex_elements
4089 (("latex_elements\\['pointsize'\\] = '11pt'" match)
4090 ;; insert at a point where latex_elements{} is defined:
4091 (string-append match "\nlatex_elements['papersize'] = 'a4paper'")))
4092 (zero? (system* "python" "make.py" "html" "latex" "texinfo"))))
4093 (replace 'install
4094 (lambda* (#:key inputs outputs #:allow-other-keys)
4095 (let* ((data (string-append (assoc-ref outputs "out") "/share"))
4096 (doc (string-append data "/doc/python-matplotlib-" ,version))
4097 (info (string-append data "/info"))
4098 (html (string-append doc "/html")))
4099 (mkdir-p html)
4100 (mkdir-p info)
4101 (copy-recursively "build/html" html)
4102 (symlink (string-append html "/_images")
4103 (string-append info "/matplotlib-figures"))
4104 (with-directory-excursion "build/texinfo"
4105 (substitute* "matplotlib.texi"
4106 (("@image\\{([^,]*)" all file)
4107 (string-append "@image{matplotlib-figures/" file)))
4108 (symlink (string-append html "/_images")
4109 "./matplotlib-figures")
4110 (system* "makeinfo" "--no-split"
4111 "-o" "matplotlib.info" "matplotlib.texi"))
4112 (copy-file "build/texinfo/matplotlib.info"
4113 (string-append info "/matplotlib.info"))
4114 (copy-file "build/latex/Matplotlib.pdf"
4115 (string-append doc "/Matplotlib.pdf")))
4116 #t)))))
4117 (home-page (package-home-page python-matplotlib))
4118 (synopsis "Documentation for the python-matplotlib package")
4119 (description (package-description python-matplotlib))
4120 (license (package-license python-matplotlib))))
4121
4122 (define-public python2-matplotlib-documentation
4123 (package-with-python2 python-matplotlib-documentation))
4124
4125 (define-public python2-pysnptools
4126 (package
4127 (name "python2-pysnptools")
4128 (version "0.3.9")
4129 (source
4130 (origin
4131 (method url-fetch)
4132 (uri (pypi-uri "pysnptools" version ".zip"))
4133 (sha256
4134 (base32
4135 "1wybggjzz8zw7aav4pjsg2h22xp17a1lghrprza1pxwlm7wf96y2"))))
4136 (build-system python-build-system)
4137 (arguments
4138 `(#:python ,python-2)) ; only Python 2.7 is supported
4139 (propagated-inputs
4140 `(("python2-numpy" ,python2-numpy)
4141 ("python2-scipy" ,python2-scipy)
4142 ("python2-pandas" ,python2-pandas)))
4143 (native-inputs
4144 `(("python2-cython" ,python2-cython)))
4145 (native-inputs
4146 `(("unzip" ,unzip)))
4147 (home-page "http://research.microsoft.com/en-us/um/redmond/projects/mscompbio/")
4148 (synopsis "Library for reading and manipulating genetic data")
4149 (description
4150 "PySnpTools is a library for reading and manipulating genetic data. It
4151 can, for example, efficiently read whole PLINK *.bed/bim/fam files or parts of
4152 those files. It can also efficiently manipulate ranges of integers using set
4153 operators such as union, intersection, and difference.")
4154 (license license:asl2.0)))
4155
4156 (define-public python-rpy2
4157 (package
4158 (name "python-rpy2")
4159 (version "2.7.6")
4160 (source
4161 (origin
4162 (method url-fetch)
4163 (uri (pypi-uri "rpy2" version))
4164 (sha256
4165 (base32
4166 "0nhan2qvrw7b7gg5zddwa22kybdv3x1g26vkd7q8lvnkgzrs4dga"))))
4167 (build-system python-build-system)
4168 (arguments
4169 '(#:phases
4170 (modify-phases %standard-phases
4171 (delete 'check)
4172 (add-after 'install 'check
4173 (lambda* (#:key outputs inputs #:allow-other-keys)
4174 ;; It's easier to run tests after install.
4175 ;; Make installed package available for running the tests
4176 (add-installed-pythonpath inputs outputs)
4177 (zero? (system* "python" "-m" "rpy2.tests" "-v")))))))
4178 (propagated-inputs
4179 `(("python-six" ,python-six)))
4180 (inputs
4181 `(("readline" ,readline)
4182 ("icu4c" ,icu4c)
4183 ("pcre" ,pcre)
4184 ("r-minimal" ,r-minimal)
4185 ("r-survival" ,r-survival)))
4186 (native-inputs
4187 `(("zlib" ,zlib)))
4188 (home-page "http://rpy.sourceforge.net/")
4189 (synopsis "Python interface to the R language")
4190 (description "rpy2 is a redesign and rewrite of rpy. It is providing a
4191 low-level interface to R from Python, a proposed high-level interface,
4192 including wrappers to graphical libraries, as well as R-like structures and
4193 functions.")
4194 (license license:gpl3+)))
4195
4196 (define-public python2-rpy2
4197 (let ((rpy2 (package-with-python2 python-rpy2)))
4198 (package (inherit rpy2)
4199 (propagated-inputs
4200 `(("python2-singledispatch" ,python2-singledispatch)
4201 ,@(package-propagated-inputs rpy2))))))
4202
4203 (define-public python-scipy
4204 (package
4205 (name "python-scipy")
4206 (version "0.18.1")
4207 (source
4208 (origin
4209 (method url-fetch)
4210 (uri (string-append "https://github.com/scipy/scipy/archive/v"
4211 version ".tar.gz"))
4212 (file-name (string-append name "-" version ".tar.gz"))
4213 (sha256
4214 (base32
4215 "17slsrfawjp7if6qrlx03zhgp05350ginxx8ddpw9zqx43x905sn"))))
4216 (build-system python-build-system)
4217 (propagated-inputs
4218 `(("python-numpy" ,python-numpy)
4219 ("python-matplotlib" ,python-matplotlib)
4220 ("python-pyparsing" ,python-pyparsing)))
4221 (inputs
4222 `(("lapack" ,lapack)
4223 ("openblas" ,openblas)))
4224 (native-inputs
4225 `(("python-cython" ,python-cython)
4226 ("python-nose" ,python-nose)
4227 ("python-sphinx" ,python-sphinx)
4228 ("python-numpydoc" ,python-numpydoc)
4229 ("gfortran" ,gfortran)
4230 ("perl" ,perl)))
4231 (outputs '("out" "doc"))
4232 (arguments
4233 `(#:phases
4234 (modify-phases %standard-phases
4235 (add-before 'build 'configure-openblas
4236 (lambda* (#:key inputs #:allow-other-keys)
4237 (call-with-output-file "site.cfg"
4238 (lambda (port)
4239 (format port
4240 "[blas]
4241 libraries = openblas
4242 library_dirs = ~a/lib
4243 include_dirs = ~a/include
4244
4245 # backslash-n to make emacs happy
4246 \n[atlas]
4247 library_dirs = ~a/lib
4248 atlas_libs = openblas
4249 "
4250 (assoc-ref inputs "openblas")
4251 (assoc-ref inputs "openblas")
4252 (assoc-ref inputs "openblas"))))
4253 #t))
4254 (add-after 'install 'install-doc
4255 (lambda* (#:key inputs outputs #:allow-other-keys)
4256 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4257 (doc (string-append data "/doc/" ,name "-" ,version))
4258 (html (string-append doc "/html"))
4259 (pyver ,(string-append "PYVER=")))
4260 ;; Make installed package available for building the
4261 ;; documentation
4262 (add-installed-pythonpath inputs outputs)
4263 (with-directory-excursion "doc"
4264 ;; Fix generation of images for mathematical expressions.
4265 (substitute* (find-files "source" "conf\\.py")
4266 (("pngmath_use_preview = True")
4267 "pngmath_use_preview = False"))
4268 (mkdir-p html)
4269 (system* "make" "html" pyver)
4270 (with-directory-excursion "build/html"
4271 (for-each (lambda (file)
4272 (let* ((dir (dirname file))
4273 (tgt-dir (string-append html "/" dir)))
4274 (install-file file html)))
4275 (find-files "." ".*")))))
4276 #t))
4277 (add-after 'unpack 'fix-tests
4278 (lambda _
4279 (substitute* "scipy/integrate/tests/test_quadpack.py"
4280 (("libm.so") "libm.so.6"))
4281 #t))
4282 ;; Tests can only be run after the library has been installed and not
4283 ;; within the source directory.
4284 (delete 'check)
4285 (add-after 'install 'check
4286 (lambda* (#:key inputs outputs #:allow-other-keys)
4287 (add-installed-pythonpath inputs outputs)
4288 (with-directory-excursion "/tmp"
4289 (zero? (system* "python" "-c"
4290 "import scipy; scipy.test('full')")))
4291 #t)))))
4292 (home-page "http://www.scipy.org/")
4293 (synopsis "The Scipy library provides efficient numerical routines")
4294 (description "The SciPy library is one of the core packages that make up
4295 the SciPy stack. It provides many user-friendly and efficient numerical
4296 routines such as routines for numerical integration and optimization.")
4297 (properties `((python2-variant . ,(delay python2-scipy))))
4298 (license license:bsd-3)))
4299
4300 (define-public python2-scipy
4301 (package-with-python2
4302 (strip-python2-variant python-scipy)))
4303
4304 (define-public python-sockjs-tornado
4305 (package
4306 (name "python-sockjs-tornado")
4307 (version "1.0.3")
4308 (source
4309 (origin
4310 (method url-fetch)
4311 (uri (pypi-uri "sockjs-tornado" version))
4312 (sha256
4313 (base32
4314 "16cff40nniqsyvda1pb2j3b4zwmrw7y2g1vqq78lp20xpmhnwwkd"))))
4315 (build-system python-build-system)
4316 (arguments
4317 `(;; There are no tests, and running the test phase requires missing
4318 ;; dependencies
4319 #:tests? #f))
4320 (propagated-inputs
4321 `(("python-tornado" ,python-tornado)))
4322 (home-page "http://github.com/mrjoes/sockjs-tornado/")
4323 (synopsis
4324 "SockJS python server implementation on top of Tornado framework")
4325 (description
4326 "SockJS-tornado provides the server side counterpart to a SockJS client
4327 library, through the Tornado framework.
4328
4329 SockJS provides a low latency, full duplex, cross-domain communication channel
4330 between a web browser and web server.")
4331 (license license:expat)))
4332
4333 (define-public python2-sockjs-tornado
4334 (package-with-python2 python-sockjs-tornado))
4335
4336 (define-public python-socksipy-branch
4337 (package
4338 (name "python-socksipy-branch")
4339 (version "1.01")
4340 (source
4341 (origin
4342 (method url-fetch)
4343 (uri (pypi-uri "SocksiPy-branch" version))
4344 (sha256
4345 (base32
4346 "01l41v4g7fy9fzvinmjxy6zcbhgqaif8dhdqm4w90fwcw9h51a8p"))))
4347 (build-system python-build-system)
4348 (arguments
4349 `(#:tests? #f)) ; There are no tests
4350 (home-page "https://code.google.com/archive/p/socksipy-branch/")
4351 (synopsis "Python SOCKS module")
4352 (description
4353 "SocksiPy - A Python SOCKS client module. It provides a
4354 socket-like interface that supports connections to any TCP
4355 service through the use of a SOCKS4, SOCKS5 or HTTP proxy.
4356 The original version was developed by Dan Haim, this is a
4357 branch created by Mario Vilas to address some open issues,
4358 as the original project seems to have been abandoned circa 2007.")
4359 (license license:bsd-3)))
4360
4361 (define-public python2-socksipy-branch
4362 (package-with-python2 python-socksipy-branch))
4363
4364 (define-public python-sqlalchemy
4365 (package
4366 (name "python-sqlalchemy")
4367 (version "1.0.12")
4368 (source
4369 (origin
4370 (method url-fetch)
4371 (uri (string-append "https://pypi.python.org/packages/source/S/"
4372 "SQLAlchemy/SQLAlchemy-" version ".tar.gz"))
4373 (sha256
4374 (base32
4375 "1l8qclhd0s90w3pvwhi5mjxdwr5j7gw7cjka2fx6f2vqmq7f4yb6"))))
4376 (build-system python-build-system)
4377 (native-inputs
4378 `(("python-cython" ,python-cython) ;for c extensions
4379 ("python-pytest" ,python-pytest)
4380 ("python-mock" ,python-mock))) ;for tests
4381 (arguments
4382 `(#:phases (alist-replace
4383 'check
4384 (lambda _ (zero? (system* "py.test")))
4385 %standard-phases)))
4386 (home-page "http://www.sqlalchemy.org")
4387 (synopsis "Database abstraction library")
4388 (description
4389 "SQLAlchemy is the Python SQL toolkit and Object Relational Mapper that
4390 gives application developers the full power and flexibility of SQL. It
4391 provides a full suite of well known enterprise-level persistence patterns,
4392 designed for efficient and high-performing database access, adapted into a
4393 simple and Pythonic domain language.")
4394 (license license:x11)))
4395
4396 (define-public python2-sqlalchemy
4397 (package-with-python2 python-sqlalchemy))
4398
4399 (define-public python-pycodestyle
4400 (package
4401 (name "python-pycodestyle")
4402 (version "2.3.1")
4403 (source
4404 (origin
4405 (method url-fetch)
4406 (uri (pypi-uri "pycodestyle" version))
4407 (sha256
4408 (base32
4409 "0rk78b66p57ala26mdldl9lafr48blv5s659sah9q50qnfjmc8k8"))))
4410 (build-system python-build-system)
4411 (home-page "https://pycodestyle.readthedocs.io/")
4412 (synopsis "Python style guide checker")
4413 (description "@code{pycodestyle} (formerly pep8) is a tool to check
4414 Python code against some of the style conventions in
4415 @url{http://www.python.org/dev/peps/pep-0008/,PEP 8}.")
4416 (license license:expat)))
4417
4418 (define-public python2-pycodestyle
4419 (package-with-python2 python-pycodestyle))
4420
4421 (define-public python-orderedmultidict
4422 (package
4423 (name "python-orderedmultidict")
4424 (version "0.7.11")
4425 (source
4426 (origin
4427 (method url-fetch)
4428 (uri (pypi-uri "orderedmultidict" version))
4429 (sha256
4430 (base32
4431 "0dls862ibm7qbq4fnvwx0xn1v9hwyzywbff8xjjdr42dd75208yw"))))
4432 (build-system python-build-system)
4433 (arguments
4434 `(#:phases
4435 (modify-phases %standard-phases
4436 (add-after 'unpack 'fix-tests
4437 (lambda _
4438 ;; The package uses nosetest for running the tests.
4439 ;; Adding this initfile allows to run the test suite
4440 ;; without requiring nosetest.
4441 (zero? (system* "touch" "tests/__init__.py")))))))
4442 (propagated-inputs
4443 `(("python-six" ,python-six)))
4444 (native-inputs
4445 `(("python-pycodestyle" ,python-pycodestyle)))
4446 (home-page "https://github.com/gruns/orderedmultidict")
4447 (synopsis "Python Ordered Multivalue Dictionary - omdict")
4448 (description "This package contains a library for ordered multivalue
4449 dictionaries. A multivalue dictionary is a dictionary that can store
4450 multiple values for the same key. An ordered multivalue dictionary is a
4451 multivalue dictionary that retains the order of insertions and deletions.")
4452 (license license:unlicense)))
4453
4454 (define-public python2-orderedmultidict
4455 (package-with-python2 python-orderedmultidict))
4456
4457 (define-public python-furl
4458 (package
4459 (name "python-furl")
4460 (version "0.5.6")
4461 (source
4462 (origin
4463 (method url-fetch)
4464 (uri (pypi-uri "furl" version))
4465 (sha256
4466 (base32
4467 "0lzpfpm686hvz3sr1mcrnd1b3lgmnw8v59gb43wfi98r3b671pqc"))))
4468 (build-system python-build-system)
4469 (propagated-inputs
4470 `(("python-six" ,python-six)
4471 ("python-orderedmultidict" ,python-orderedmultidict)))
4472 (native-inputs
4473 `(("python-pycodestyle" ,python-pycodestyle)))
4474 (home-page "https://github.com/gruns/furl")
4475 (synopsis "URL manipulation in Python")
4476 (description "Furl provides an easy-to-use alternative to the
4477 @code{urllib} and @code{urlparse} modules for manipulating URLs.")
4478 (license license:unlicense)))
4479
4480 (define-public python2-furl
4481 (package-with-python2 python-furl))
4482
4483 (define-public python-flask-babel
4484 (package
4485 (name "python-flask-babel")
4486 (version "0.11.1")
4487 (source
4488 (origin
4489 (method url-fetch)
4490 (uri (pypi-uri "Flask-Babel" version))
4491 (sha256
4492 (base32
4493 "16b80cipdba9xj3jlaiaq6wgrgpjb70w3j01jjy9hbp4k71kd6yj"))))
4494 (build-system python-build-system)
4495 (propagated-inputs
4496 `(("python-flask" ,python-flask)
4497 ("python-babel" ,python-babel)
4498 ("python-jinja2" ,python-jinja2)
4499 ("python-pytz" ,python-pytz)))
4500 (home-page "https://github.com/python-babel/flask-babel")
4501 (synopsis "Add i18n/l10n support to Flask applications")
4502 (description "This package implements internationalization and localization
4503 support for Flask. This is based on the Python babel module as well as pytz -
4504 both of which are installed automatically if you install this library.")
4505 (license license:bsd-3)))
4506
4507 (define-public python2-flask-babel
4508 (package-with-python2 python-flask-babel))
4509
4510 (define-public python-sqlalchemy-utils
4511 (package
4512 (name "python-sqlalchemy-utils")
4513 (version "0.32.13")
4514 (source
4515 (origin
4516 (method url-fetch)
4517 (uri (pypi-uri "SQLAlchemy-Utils" version))
4518 (sha256
4519 (base32
4520 "0vsib7gidjamzsz6w4s5pdhxzxsrkghjnm4sqwk94igjrl3i5ixj"))))
4521 (build-system python-build-system)
4522 (arguments
4523 '(#:tests? #f)) ; FIXME: Many tests require a running database server.
4524 ;; #:phases
4525 ;; (modify-phases %standard-phases
4526 ;; (replace 'check
4527 ;; (lambda _
4528 ;; (zero? (system* "py.test" "sqlalchemy_utils" "tests")))))
4529 (propagated-inputs
4530 `(("python-six" ,python-six)
4531 ("python-sqlalchemy" ,python-sqlalchemy)))
4532 (native-inputs
4533 `(("python-dateutil" ,python-dateutil)
4534 ("python-flexmock" ,python-flexmock)
4535 ("python-psycopg2" ,python-psycopg2)
4536 ("python-pytest" ,python-pytest)
4537 ("python-pytz" ,python-pytz)))
4538 (home-page "https://github.com/kvesteri/sqlalchemy-utils")
4539 (synopsis "Various utility functions for SQLAlchemy")
4540 (description
4541 "SQLAlchemy-utils provides various utility functions and custom data types
4542 for SQLAlchemy. SQLAlchemy is an SQL database abstraction library for Python.
4543
4544 You might also want to install the following optional dependencies:
4545 @enumerate
4546 @item @code{python-passlib}
4547 @item @code{python-babel}
4548 @item @code{python-cryptography}
4549 @item @code{python-pytz}
4550 @item @code{python-psycopg2}
4551 @item @code{python-furl}
4552 @item @code{python-flask-babel}
4553 @end enumerate
4554 ")
4555 (license license:bsd-3)))
4556
4557 (define-public python2-sqlalchemy-utils
4558 (package-with-python2 python-sqlalchemy-utils))
4559
4560 (define-public python-alembic
4561 (package
4562 (name "python-alembic")
4563 (version "0.8.10")
4564 (source
4565 (origin
4566 (method url-fetch)
4567 (uri (pypi-uri "alembic" version))
4568 (sha256
4569 (base32
4570 "06br9sfqypnjlal6fsbnky3zb0askwcn3diz8k3kwa0qcblm0fqf"))))
4571 (build-system python-build-system)
4572 (native-inputs
4573 `(("python-mock" ,python-mock)
4574 ("python-pytest-cov" ,python-pytest-cov)))
4575 (propagated-inputs
4576 `(("python-sqlalchemy" ,python-sqlalchemy)
4577 ("python-mako" ,python-mako)
4578 ("python-editor" ,python-editor)))
4579 (home-page "http://bitbucket.org/zzzeek/alembic")
4580 (synopsis
4581 "Database migration tool for SQLAlchemy")
4582 (description
4583 "Alembic is a lightweight database migration tool for usage with the
4584 SQLAlchemy Database Toolkit for Python.")
4585 (license license:expat)))
4586
4587 (define-public python2-alembic
4588 (package-with-python2 python-alembic))
4589
4590 (define-public python-autopep8
4591 (package
4592 (name "python-autopep8")
4593 (version "1.2.4")
4594 (source
4595 (origin
4596 (method url-fetch)
4597 (uri (pypi-uri "autopep8" version))
4598 (sha256
4599 (base32
4600 "18parm383lfn42a00wklv3qf20p4v277f1x3cn58x019dqk1xqrq"))))
4601 (build-system python-build-system)
4602 (propagated-inputs
4603 `(("python-pep8" ,python-pep8)))
4604 (home-page "https://github.com/hhatto/autopep8")
4605 (synopsis "Format Python code according to the PEP 8 style guide")
4606 (description
4607 "@code{autopep8} automatically formats Python code to conform to
4608 the PEP 8 style guide. It uses the pycodestyle utility to determine
4609 what parts of the code needs to be formatted. @code{autopep8} is
4610 capable of fixing most of the formatting issues that can be reported
4611 by pycodestyle.")
4612 (license (license:non-copyleft
4613 "https://github.com/hhatto/autopep8/blob/master/LICENSE"))))
4614
4615 (define-public python2-autopep8
4616 (package-with-python2 python-autopep8))
4617
4618 (define-public python-distutils-extra
4619 (package
4620 (name "python-distutils-extra")
4621 (version "2.38")
4622 (source
4623 (origin
4624 (method url-fetch)
4625 (uri (string-append "https://launchpad.net/python-distutils-extra/trunk/"
4626 version "/+download/python-distutils-extra-"
4627 version ".tar.gz"))
4628 (sha256
4629 (base32
4630 "0lx15kcbby9zisx33p2h5hgakgwh2bvh0ibag8z0px4j6ifhs41x"))))
4631 (build-system python-build-system)
4632 (home-page "https://launchpad.net/python-distutils-extra/")
4633 (synopsis "Enhancements to Python's distutils")
4634 (description
4635 "The python-distutils-extra module enables you to easily integrate
4636 gettext support, themed icons, and scrollkeeper-based documentation into
4637 Python's distutils.")
4638 (license license:gpl2)))
4639
4640 (define-public python2-distutils-extra
4641 (package-with-python2 python-distutils-extra))
4642
4643 (define-public python2-elib.intl
4644 (package
4645 (name "python2-elib.intl")
4646 (version "0.0.3")
4647 (source
4648 (origin
4649 ;; This project doesn't tag releases or publish tarballs, so we take
4650 ;; source from a (semi-arbitrary, i.e. latest as of now) git commit.
4651 (method git-fetch)
4652 (uri (git-reference
4653 (url "https://github.com/dieterv/elib.intl.git")
4654 (commit "d09997cfef")))
4655 (sha256
4656 (base32
4657 "0y7vzff9xgbnaay7m0va1arl6g68ncwrvbgwl7jqlclsahzzb09d"))))
4658 (build-system python-build-system)
4659 (arguments
4660 ;; incompatible with Python 3 (exception syntax)
4661 `(#:python ,python-2
4662 #:tests? #f))
4663 (home-page "https://github.com/dieterv/elib.intl")
4664 (synopsis "Enhanced internationalization for Python")
4665 (description
4666 "The elib.intl module provides enhanced internationalization (I18N)
4667 services for your Python modules and applications.")
4668 (license license:lgpl3+)))
4669
4670 (define-public python-pillow
4671 (package
4672 (name "python-pillow")
4673 (version "3.3.3")
4674 (source
4675 (origin
4676 (method url-fetch)
4677 (uri (pypi-uri "Pillow" version))
4678 (patches (search-patches "python-pillow-freetype-2.7-test-failure.patch"))
4679 (sha256
4680 (base32
4681 "0xkv0p1d73gz0a1qaasf0ai4262g8f334j07vd60bjrxs2wr3nmj"))))
4682 (build-system python-build-system)
4683 (native-inputs
4684 `(("python-nose" ,python-nose)))
4685 (inputs
4686 `(("freetype" ,freetype)
4687 ("lcms" ,lcms)
4688 ("zlib" ,zlib)
4689 ("libjpeg" ,libjpeg)
4690 ("openjpeg" ,openjpeg)
4691 ("libtiff" ,libtiff)
4692 ("libwebp" ,libwebp)))
4693 (arguments
4694 `(#:phases (modify-phases %standard-phases
4695 (add-after
4696 'install 'check-installed
4697 (lambda* (#:key outputs inputs #:allow-other-keys)
4698 (begin
4699 (setenv "HOME" (getcwd))
4700 ;; Make installed package available for running the
4701 ;; tests
4702 (add-installed-pythonpath inputs outputs)
4703 (and (zero? (system* "python" "selftest.py"
4704 "--installed"))
4705 (zero? (system* "python" "test-installed.py"))))))
4706 (delete 'check))))
4707 (home-page "https://pypi.python.org/pypi/Pillow")
4708 (synopsis "Fork of the Python Imaging Library")
4709 (description
4710 "The Python Imaging Library adds image processing capabilities to your
4711 Python interpreter. This library provides extensive file format support, an
4712 efficient internal representation, and fairly powerful image processing
4713 capabilities. The core image library is designed for fast access to data
4714 stored in a few basic pixel formats. It should provide a solid foundation for
4715 a general image processing tool.")
4716 (license (license:x11-style
4717 "http://www.pythonware.com/products/pil/license.htm"
4718 "The PIL Software License"))))
4719
4720 (define-public python2-pillow
4721 (package-with-python2 python-pillow))
4722
4723 (define-public python-pycparser
4724 (package
4725 (name "python-pycparser")
4726 (version "2.17")
4727 (source
4728 (origin
4729 (method url-fetch)
4730 (uri (pypi-uri "pycparser" version))
4731 (sha256
4732 (base32
4733 "1dkkjri0miidqb1zcqhqljfa34fcy9k5akasgwsv6k622zlk3b0a"))))
4734 (outputs '("out" "doc"))
4735 (build-system python-build-system)
4736 (native-inputs
4737 `(("pkg-config" ,pkg-config)))
4738 (arguments
4739 `(#:phases
4740 (modify-phases %standard-phases
4741 (replace 'check
4742 (lambda _
4743 (with-directory-excursion "tests"
4744 (zero? (system* "python" "all_tests.py")))))
4745 (add-after 'install 'install-doc
4746 (lambda* (#:key outputs #:allow-other-keys)
4747 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4748 (doc (string-append data "/doc/" ,name "-" ,version))
4749 (examples (string-append doc "/examples")))
4750 (mkdir-p examples)
4751 (for-each (lambda (file)
4752 (copy-file (string-append "." file)
4753 (string-append doc file)))
4754 '("/README.rst" "/CHANGES" "/LICENSE"))
4755 (copy-recursively "examples" examples)))))))
4756 (home-page "https://github.com/eliben/pycparser")
4757 (synopsis "C parser in Python")
4758 (description
4759 "Pycparser is a complete parser of the C language, written in pure Python
4760 using the PLY parsing library. It parses C code into an AST and can serve as
4761 a front-end for C compilers or analysis tools.")
4762 (license license:bsd-3)))
4763
4764 (define-public python2-pycparser
4765 (package-with-python2 python-pycparser))
4766
4767 (define-public python-cffi
4768 (package
4769 (name "python-cffi")
4770 (version "1.4.2")
4771 (source
4772 (origin
4773 (method url-fetch)
4774 (uri (pypi-uri "cffi" version))
4775 (sha256
4776 (base32 "161rj52rzi3880lij17d6i9kvgkiwjilrqjs8405k8sf6ryif7cg"))))
4777 (build-system python-build-system)
4778 (outputs '("out" "doc"))
4779 (inputs
4780 `(("libffi" ,libffi)))
4781 (propagated-inputs ; required at run-time
4782 `(("python-pycparser" ,python-pycparser)))
4783 (native-inputs
4784 `(("pkg-config" ,pkg-config)
4785 ("python-sphinx" ,python-sphinx)
4786 ("python-pytest" ,python-pytest)))
4787 (arguments
4788 `(#:phases
4789 (alist-cons-after
4790 'install 'install-doc
4791 (lambda* (#:key outputs #:allow-other-keys)
4792 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4793 (doc (string-append data "/doc/" ,name "-" ,version))
4794 (html (string-append doc "/html")))
4795 (with-directory-excursion "doc"
4796 (system* "make" "html")
4797 (mkdir-p html)
4798 (copy-recursively "build/html" html))
4799 (copy-file "LICENSE" (string-append doc "/LICENSE"))))
4800 %standard-phases)))
4801 (home-page "http://cffi.readthedocs.org")
4802 (synopsis "Foreign function interface for Python")
4803 (description
4804 "Foreign Function Interface for Python calling C code.")
4805 (license license:expat)))
4806
4807 (define-public python2-cffi
4808 (package-with-python2 python-cffi))
4809
4810 (define-public python-xcffib
4811 (package
4812 (name "python-xcffib")
4813 (version "0.5.1")
4814 (source
4815 (origin
4816 (method url-fetch)
4817 (uri (pypi-uri "xcffib" version))
4818 (sha256
4819 (base32
4820 "09gbnmr5vn58mm8xi3fmd7fz6743cks6c46dphnxzwax6zsxmy60"))))
4821 (build-system python-build-system)
4822 (inputs
4823 `(("libxcb" ,libxcb)))
4824 (propagated-inputs
4825 `(("python-cffi" ,python-cffi) ; used at run time
4826 ("python-six" ,python-six)))
4827 (arguments
4828 `(;; FIXME: Tests need more work. See ".travis.yml" in the repository.
4829 #:tests? #f
4830 #:phases
4831 (modify-phases %standard-phases
4832 (add-after 'unpack 'fix-libxcb-path
4833 (lambda* (#:key inputs #:allow-other-keys)
4834 (let ((libxcb (assoc-ref inputs "libxcb")))
4835 (substitute* '("xcffib/__init__.py")
4836 (("^soname = \"") (string-append "soname = \"" libxcb "/lib/")))
4837 #t)))
4838 (add-after 'install 'install-doc
4839 (lambda* (#:key outputs #:allow-other-keys)
4840 (let ((doc (string-append (assoc-ref outputs "out") "/share"
4841 "/doc/" ,name "-" ,version)))
4842 (mkdir-p doc)
4843 (copy-file "README.md"
4844 (string-append doc "/README.md"))
4845 #t))))))
4846 (home-page "https://github.com/tych0/xcffib")
4847 (synopsis "XCB Python bindings")
4848 (description
4849 "Xcffib is a replacement for xpyb, an XCB Python bindings. It adds
4850 support for Python 3 and PyPy. It is based on cffi.")
4851 (license license:expat)))
4852
4853 (define-public python2-xcffib
4854 (package-with-python2 python-xcffib))
4855
4856 (define-public python-cairocffi
4857 (package
4858 (name "python-cairocffi")
4859 (version "0.8.0")
4860 (source
4861 (origin
4862 (method url-fetch)
4863 ;; The archive on pypi is missing the 'utils' directory!
4864 (uri (string-append "https://github.com/Kozea/cairocffi/archive/v"
4865 version ".tar.gz"))
4866 (file-name (string-append name "-" version ".tar.gz"))
4867 (sha256
4868 (base32
4869 "1rk2dvy3fxrga6bvvxc2fi5lbaynm5h4a0w0aaxyn3bc77rszjg9"))))
4870 (build-system python-build-system)
4871 (outputs '("out" "doc"))
4872 (inputs
4873 `(("gdk-pixbuf" ,gdk-pixbuf)
4874 ("cairo" ,cairo)))
4875 (native-inputs
4876 `(("pkg-config" ,pkg-config)
4877 ("python-sphinx" ,python-sphinx)
4878 ("python-docutils" ,python-docutils)))
4879 (propagated-inputs
4880 `(("python-xcffib" ,python-xcffib))) ; used at run time
4881 (arguments
4882 `(;; FIXME: Tests cannot find 'libcairo.so.2'.
4883 #:tests? #f
4884 #:phases
4885 (modify-phases %standard-phases
4886 (add-after 'install 'install-doc
4887 (lambda* (#:key inputs outputs #:allow-other-keys)
4888 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4889 (doc (string-append data "/doc/" ,name "-" ,version))
4890 (html (string-append doc "/html")))
4891 (setenv "LD_LIBRARY_PATH"
4892 (string-append (assoc-ref inputs "cairo") "/lib" ":"
4893 (assoc-ref inputs "gdk-pixbuf") "/lib"))
4894 (setenv "LANG" "en_US.UTF-8")
4895 (mkdir-p html)
4896 (for-each (lambda (file)
4897 (copy-file (string-append "." file)
4898 (string-append doc file)))
4899 '("/README.rst" "/CHANGES" "/LICENSE"))
4900 (system* "python" "setup.py" "build_sphinx")
4901 (copy-recursively "docs/_build/html" html)
4902 #t))))))
4903 (home-page "https://github.com/Kozea/cairocffi")
4904 (synopsis "Python bindings and object-oriented API for Cairo")
4905 (description
4906 "Cairocffi is a CFFI-based drop-in replacement for Pycairo, a set of
4907 Python bindings and object-oriented API for cairo. Cairo is a 2D vector
4908 graphics library with support for multiple backends including image buffers,
4909 PNG, PostScript, PDF, and SVG file output.")
4910 (license license:bsd-3)))
4911
4912 (define-public python2-cairocffi
4913 (package-with-python2 python-cairocffi))
4914
4915 (define-public python-decorator
4916 (package
4917 (name "python-decorator")
4918 (version "4.0.10")
4919 (source
4920 (origin
4921 (method url-fetch)
4922 (uri (pypi-uri "decorator" version))
4923 (sha256
4924 (base32 "0w7hg59hlpq74jpyja4yfryap0ccjvchgpkfp20rhj9krgnrhvlw"))))
4925 (build-system python-build-system)
4926 (arguments '(#:tests? #f)) ; no test target
4927 (home-page "https://pypi.python.org/pypi/decorator/")
4928 (synopsis "Python module to simplify usage of decorators")
4929 (description
4930 "The aim of the decorator module is to simplify the usage of decorators
4931 for the average programmer, and to popularize decorators usage giving examples
4932 of useful decorators, such as memoize, tracing, redirecting_stdout, locked,
4933 etc. The core of this module is a decorator factory.")
4934 (license license:expat)))
4935
4936 (define-public python2-decorator
4937 (package-with-python2 python-decorator))
4938
4939 (define-public python-drmaa
4940 (package
4941 (name "python-drmaa")
4942 (version "0.7.7")
4943 (source
4944 (origin
4945 (method url-fetch)
4946 (uri (pypi-uri "drmaa" version))
4947 (sha256
4948 (base32 "0xzqriqyvk5b8hszbavsyxd29wm3sxirm8zvvdm73rs2iq7w4hkx"))))
4949 (build-system python-build-system)
4950 ;; The test suite requires libdrmaa which is provided by the cluster
4951 ;; environment. At runtime the environment variable DRMAA_LIBRARY_PATH
4952 ;; should be set to the path of the libdrmaa library.
4953 (arguments '(#:tests? #f))
4954 (native-inputs
4955 `(("python-nose" ,python-nose)))
4956 (home-page "https://pypi.python.org/pypi/drmaa")
4957 (synopsis "Python bindings for the DRMAA library")
4958 (description
4959 "A Python package for Distributed Resource Management (DRM) job
4960 submission and control. This package is an implementation of the DRMAA 1.0
4961 Python language binding specification.")
4962 (license license:bsd-3)))
4963
4964 (define-public python2-drmaa
4965 (package-with-python2 python-drmaa))
4966
4967 (define-public python-gridmap
4968 (package
4969 (name "python-gridmap")
4970 (version "0.13.0")
4971 (source
4972 (origin
4973 (method url-fetch)
4974 (uri (string-append
4975 "https://github.com/pygridtools/gridmap/archive/v"
4976 version ".tar.gz"))
4977 (file-name (string-append name "-" version ".tar.gz"))
4978 (sha256
4979 (base32 "1gzjg2k6f14i1msm2b0ax8d9ds1hvk6qd5nlaivg8m4cxqp4cp1x"))))
4980 (build-system python-build-system)
4981 (arguments
4982 '(#:tests? #f)) ; FIXME: Requires python-cherrypy.
4983 (propagated-inputs
4984 `(("python-psutil" ,python-psutil)
4985 ("python-drmaa" ,python-drmaa)
4986 ("python-pyzmq" ,python-pyzmq)))
4987 (home-page "https://github.com/pygridtools/gridmap")
4988 (synopsis "Create jobs on a cluster directly from Python")
4989 (description
4990 "Gridmap is a Python package to allow you to easily create jobs on the
4991 cluster directly from Python. You can directly map Python functions onto the
4992 cluster without needing to write any wrapper code yourself.")
4993 (license license:gpl3+)))
4994
4995 (define-public python2-gridmap
4996 (package-with-python2 python-gridmap))
4997
4998 (define-public python-pexpect
4999 (package
5000 (name "python-pexpect")
5001 (version "4.2.1")
5002 (source
5003 (origin
5004 (method url-fetch)
5005 (uri (pypi-uri "pexpect" version))
5006 (sha256
5007 (base32 "14ls7k99pwvl21zqv65kzrhccv50j89m5ij1hf0slmsvlxjj84rx"))))
5008 (build-system python-build-system)
5009 (arguments
5010 `(#:phases
5011 (modify-phases %standard-phases
5012 (add-before 'check 'prepare-tests
5013 (lambda _
5014 (substitute* (find-files "tests")
5015 (("/bin/ls") (which "ls"))
5016 (("/bin/echo") (which "echo"))
5017 (("/bin/which") (which "which"))
5018 ;; Many tests try to use the /bin directory which
5019 ;; is not present in the build environment.
5020 ;; Use one that's non-empty and unlikely to change.
5021 (("/bin'") "/dev'"))
5022 ;; XXX: Socket connection test gets "Connection reset by peer".
5023 ;; Why does it not work? Delete for now.
5024 (delete-file "tests/test_socket.py")
5025 #t))
5026 (replace 'check (lambda _ (zero? (system* "nosetests" "-v")))))))
5027 (native-inputs
5028 `(("python-nose" ,python-nose)
5029 ("python-pytest" ,python-pytest-3.0)
5030 ("man-db" ,man-db)
5031 ("which" ,which)))
5032 (propagated-inputs
5033 `(("python-ptyprocess" ,python-ptyprocess)))
5034 (home-page "http://pexpect.readthedocs.org/")
5035 (synopsis "Controlling interactive console applications")
5036 (description
5037 "Pexpect is a pure Python module for spawning child applications;
5038 controlling them; and responding to expected patterns in their output.
5039 Pexpect works like Don Libes’ Expect. Pexpect allows your script to spawn a
5040 child application and control it as if a human were typing commands.")
5041 (license license:isc)))
5042
5043 (define-public python2-pexpect
5044 (package-with-python2 python-pexpect))
5045
5046 (define-public python-setuptools-scm
5047 (package
5048 (name "python-setuptools-scm")
5049 (version "1.15.0")
5050 (source (origin
5051 (method url-fetch)
5052 (uri (pypi-uri "setuptools_scm" version))
5053 (sha256
5054 (base32
5055 "0bwyc5markib0i7i2qlyhdzxhiywzxbkfiapldma8m91m82jvwfs"))))
5056 (build-system python-build-system)
5057 (home-page "https://github.com/pypa/setuptools_scm/")
5058 (synopsis "Manage Python package versions in SCM metadata")
5059 (description
5060 "Setuptools_scm handles managing your Python package versions in
5061 @dfn{software configuration management} (SCM) metadata instead of declaring
5062 them as the version argument or in a SCM managed file.")
5063 (license license:expat)))
5064
5065 (define-public python2-setuptools-scm
5066 (package-with-python2 python-setuptools-scm))
5067
5068 (define-public python-pathpy
5069 (package
5070 (name "python-pathpy")
5071 (version "8.1.1")
5072 (source
5073 (origin
5074 (method url-fetch)
5075 (uri (string-append "https://pypi.python.org/packages/source/p/"
5076 "path.py/path.py-" version ".tar.gz"))
5077 (sha256
5078 (base32 "1p8s1l2vfkqhqxdhqlj0g1jjw4f1as2frr35sjcpjjpd5a89y41f"))))
5079 (outputs '("out" "doc"))
5080 (build-system python-build-system)
5081 (propagated-inputs
5082 `(("python-appdirs" ,python-appdirs)))
5083 (native-inputs
5084 `(("python-setuptools-scm" ,python-setuptools-scm)
5085 ("python-sphinx" ,python-sphinx)
5086 ("python-rst.linker" ,python-rst.linker)
5087 ("python-pytest" ,python-pytest)
5088 ("python-pytest-runner" ,python-pytest-runner)))
5089 (arguments
5090 `(#:phases
5091 (modify-phases %standard-phases
5092 (add-after 'build 'build-doc
5093 (lambda _
5094 (setenv "LANG" "en_US.UTF-8")
5095 (zero? (system* "python" "setup.py" "build_sphinx"))))
5096 (add-after 'install 'install-doc
5097 (lambda* (#:key outputs #:allow-other-keys)
5098 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
5099 (doc (string-append data "/doc/" ,name "-" ,version))
5100 (html (string-append doc "/html")))
5101 (mkdir-p html)
5102 (for-each (lambda (file)
5103 (copy-file file (string-append doc "/" file)))
5104 '("README.rst" "CHANGES.rst"))
5105 (copy-recursively "build/sphinx/html" html)))))))
5106 (home-page "https://github.com/jaraco/path.py")
5107 (synopsis "Python module wrapper for built-in os.path")
5108 (description
5109 "@code{path.py} implements path objects as first-class entities, allowing
5110 common operations on files to be invoked on those path objects directly.")
5111 (license license:expat)))
5112
5113 (define-public python2-pathpy
5114 (package-with-python2 python-pathpy))
5115
5116 (define-public python-pickleshare
5117 (package
5118 (name "python-pickleshare")
5119 (version "0.5")
5120 (source
5121 (origin
5122 (method url-fetch)
5123 (uri (string-append "https://pypi.python.org/packages/source/p/"
5124 "pickleshare/pickleshare-" version ".tar.gz"))
5125 (sha256
5126 (base32 "11ljr90j3p6qswdrbl7p4cjb2i93f6vn0vx9anzpshsx0d2mggn0"))))
5127 (build-system python-build-system)
5128 (propagated-inputs
5129 `(("python-pathpy" ,python-pathpy)))
5130 (home-page "https://github.com/vivainio/pickleshare")
5131 (synopsis "Tiny key value database with concurrency support")
5132 (description
5133 "PickleShare is a small ‘shelve’-like datastore with concurrency support.
5134 Like shelve, a PickleShareDB object acts like a normal dictionary. Unlike
5135 shelve, many processes can access the database simultaneously. Changing a
5136 value in database is immediately visible to other processes accessing the same
5137 database. Concurrency is possible because the values are stored in separate
5138 files. Hence the “database” is a directory where all files are governed by
5139 PickleShare.")
5140 (license license:expat)))
5141
5142 (define-public python2-pickleshare
5143 (package-with-python2 python-pickleshare))
5144
5145 (define-public python-simplegeneric
5146 (package
5147 (name "python-simplegeneric")
5148 (version "0.8.1")
5149 (source
5150 (origin
5151 (method url-fetch)
5152 (uri (string-append "https://pypi.python.org/packages/source/s/"
5153 "simplegeneric/simplegeneric-" version ".zip"))
5154 (sha256
5155 (base32 "0wwi1c6md4vkbcsfsf8dklf3vr4mcdj4mpxkanwgb6jb1432x5yw"))))
5156 (build-system python-build-system)
5157 (native-inputs
5158 `(("unzip" ,unzip)))
5159 (home-page "http://cheeseshop.python.org/pypi/simplegeneric")
5160 (synopsis "Python module for simple generic functions")
5161 (description
5162 "The simplegeneric module lets you define simple single-dispatch generic
5163 functions, akin to Python’s built-in generic functions like @code{len()},
5164 @code{iter()} and so on. However, instead of using specially-named methods,
5165 these generic functions use simple lookup tables, akin to those used by
5166 e.g. @code{pickle.dump()} and other generic functions found in the Python
5167 standard library.")
5168 (license license:zpl2.1)))
5169
5170 (define-public python2-simplegeneric
5171 (package-with-python2 python-simplegeneric))
5172
5173 (define-public python-ipython-genutils
5174 ;; TODO: This package is retired, check if can be removed, see description.
5175 (package
5176 (name "python-ipython-genutils")
5177 (version "0.1.0")
5178 (source
5179 (origin
5180 (method url-fetch)
5181 (uri (string-append "https://pypi.python.org/packages/source/i/"
5182 "ipython_genutils/ipython_genutils-"
5183 version ".tar.gz"))
5184 (sha256
5185 (base32 "19l2pp1c64ansr89l3cqh19jdi2ixhssdzx0vz4n6r52a6i281is"))))
5186 (build-system python-build-system)
5187 (arguments `(#:tests? #f)) ; no tests
5188 (home-page "http://ipython.org")
5189 (synopsis "Vestigial utilities from IPython")
5190 (description
5191 "This package provides retired utilities from IPython. No packages
5192 outside IPython/Jupyter should depend on it.
5193
5194 This package shouldn't exist. It contains some common utilities shared by
5195 Jupyter and IPython projects during The Big Split. As soon as possible, those
5196 packages will remove their dependency on this, and this package will go
5197 away.")
5198 (license license:bsd-3)))
5199
5200 (define-public python2-ipython-genutils
5201 (package-with-python2 python-ipython-genutils))
5202
5203 (define-public python-traitlets
5204 (package
5205 (name "python-traitlets")
5206 (version "4.2.0")
5207 (source
5208 (origin
5209 (method url-fetch)
5210 (uri (pypi-uri "traitlets" version))
5211 (sha256
5212 (base32
5213 "1afy08sa5n9gnkvh3da49c16zkyv598vchv0p1hp7zzjy8895hz4"))))
5214 (build-system python-build-system)
5215 (arguments
5216 `(#:phases
5217 (modify-phases %standard-phases
5218 (replace 'check (lambda _ (zero? (system* "nosetests")))))))
5219 (propagated-inputs
5220 `(("python-ipython-genutils" ,python-ipython-genutils)
5221 ("python-decorator" ,python-decorator)))
5222 (native-inputs
5223 `(("python-mock" ,python-mock)
5224 ("python-nose" ,python-nose)))
5225 (home-page "http://ipython.org")
5226 (synopsis "Configuration system for Python applications")
5227 (description
5228 "Traitlets is a framework that lets Python classes have attributes with
5229 type checking, dynamically calculated default values, and ‘on change’
5230 callbacks. The package also includes a mechanism to use traitlets for
5231 configuration, loading values from files or from command line arguments. This
5232 is a distinct layer on top of traitlets, so you can use traitlets in your code
5233 without using the configuration machinery.")
5234 (license license:bsd-3)))
5235
5236 (define-public python2-traitlets
5237 (package-with-python2 python-traitlets))
5238
5239 (define-public python-jupyter-core
5240 (package
5241 (name "python-jupyter-core")
5242 (version "4.2.1")
5243 (source
5244 (origin
5245 (method url-fetch)
5246 (uri (string-append (pypi-uri "jupyter_core" version)))
5247 (sha256
5248 (base32
5249 "1cy7inv218dgh4m1fbzbsiqpz733ylgjrj62jxqpfzs3r2cm7ic9"))))
5250 (build-system python-build-system)
5251 ;; FIXME: not sure how to run the tests
5252 (arguments `(#:tests? #f))
5253 (propagated-inputs
5254 `(("python-traitlets" ,python-traitlets)))
5255 (home-page "http://jupyter.org/")
5256 (synopsis "Jupyter base package")
5257 (description
5258 "Jupyter core is the base package on which Jupyter projects rely.")
5259 (license license:bsd-3)))
5260
5261 (define-public python2-jupyter-core
5262 (package-with-python2 python-jupyter-core))
5263
5264 (define-public python-jupyter-client
5265 (package
5266 (name "python-jupyter-client")
5267 (version "4.4.0")
5268 (source
5269 (origin
5270 (method url-fetch)
5271 (uri (pypi-uri "jupyter_client" version))
5272 (sha256
5273 (base32
5274 "1vjjrpjw7k5sh982pbjnslv7byfbfazjw9g92jvs7dz5qbx556n9"))))
5275 (build-system python-build-system)
5276 ;; Tests fail because of missing native python kernel which I assume is
5277 ;; provided by the ipython package, which we cannot use because it would
5278 ;; cause a dependency cycle.
5279 (arguments `(#:tests? #f))
5280 (propagated-inputs
5281 `(("python-pyzmq" ,python-pyzmq)
5282 ("python-traitlets" ,python-traitlets)
5283 ("python-jupyter-core" ,python-jupyter-core)))
5284 (home-page "http://jupyter.org/")
5285 (synopsis "Jupyter protocol implementation and client libraries")
5286 (description
5287 "The @code{jupyter_client} package contains the reference implementation
5288 of the Jupyter protocol. It also provides client and kernel management APIs
5289 for working with kernels, and the @code{jupyter kernelspec} entrypoint for
5290 installing @code{kernelspec}s for use with Jupyter frontends.")
5291 (license license:bsd-3)))
5292
5293 (define-public python2-jupyter-client
5294 (package-with-python2 python-jupyter-client))
5295
5296 (define-public python-ipykernel
5297 (package
5298 (name "python-ipykernel")
5299 (version "4.5.2")
5300 (source
5301 (origin
5302 (method url-fetch)
5303 (uri (pypi-uri "ipykernel" version))
5304 (sha256
5305 (base32 "0qllv0k6zzv1r1cj1x2ygxmlrrqhbslzj8rc6r6fg3kc1rgz4m2s"))))
5306 (build-system python-build-system)
5307 ;; The tests load a submodule of IPython. However, IPython itself depends
5308 ;; on ipykernel.
5309 (arguments `(#:tests? #f))
5310 (propagated-inputs
5311 ;; imported at runtime during connect
5312 `(("python-jupyter-client" ,python-jupyter-client)))
5313 (home-page "http://ipython.org")
5314 (synopsis "IPython Kernel for Jupyter")
5315 (description
5316 "This package provides the IPython kernel for Jupyter.")
5317 (license license:bsd-3)))
5318
5319 (define-public python2-ipykernel
5320 (package-with-python2 python-ipykernel))
5321
5322 (define-public python-testpath
5323 (package
5324 (name "python-testpath")
5325 (version "0.2")
5326 (source
5327 (origin
5328 (method url-fetch)
5329 (uri (string-append "https://github.com/jupyter/testpath/archive/"
5330 version ".tar.gz"))
5331 (file-name (string-append name "-" version ".tar.gz"))
5332 (sha256
5333 (base32
5334 "04kh3fgvmqz6cfcw79q70qwjz7ib7lxm27cc548iy2rpr33qqf55"))))
5335 (build-system python-build-system)
5336 (arguments
5337 `(#:tests? #f ; this package does not even have a setup.py
5338 #:modules ((guix build python-build-system)
5339 (guix build utils)
5340 (srfi srfi-1))
5341 #:imported-modules (,@%python-build-system-modules
5342 (srfi srfi-1))
5343 #:phases
5344 (modify-phases %standard-phases
5345 (delete 'install)
5346 (replace 'build
5347 (lambda* (#:key inputs outputs #:allow-other-keys)
5348 (let* ((version (last
5349 (string-split (assoc-ref inputs "python") #\-)))
5350 (x.y (string-join (take (string-split version #\.) 2)
5351 "."))
5352 (dir (string-append
5353 (assoc-ref outputs "out")
5354 "/lib/python" x.y "/site-packages/testpath")))
5355 (mkdir-p dir)
5356 (copy-recursively "testpath" dir))
5357 #t)))))
5358 (home-page "https://github.com/takluyver/testpath")
5359 (synopsis "Test utilities for code working with files and commands")
5360 (description
5361 "Testpath is a collection of utilities for Python code working with files
5362 and commands. It contains functions to check things on the filesystem, and
5363 tools for mocking system commands and recording calls to those.")
5364 (license license:expat)))
5365
5366 (define-public python2-testpath
5367 (package-with-python2 python-testpath))
5368
5369 (define-public python-ipython
5370 (package
5371 (name "python-ipython")
5372 (version "5.2.2")
5373 (source
5374 (origin
5375 (method url-fetch)
5376 (uri (pypi-uri "ipython" version ".tar.gz"))
5377 (sha256
5378 (base32 "1qhjwa9cyz1np7rhv3p4ip13lkgbqsad62l24xkwiq1ic2gwiqbf"))))
5379 (build-system python-build-system)
5380 (outputs '("out" "doc"))
5381 (propagated-inputs
5382 `(("python-pyzmq" ,python-pyzmq)
5383 ("python-prompt-toolkit" ,python-prompt-toolkit)
5384 ("python-terminado" ,python-terminado)
5385 ("python-matplotlib" ,python-matplotlib)
5386 ("python-numpy" ,python-numpy)
5387 ("python-numpydoc" ,python-numpydoc)
5388 ("python-jinja2" ,python-jinja2)
5389 ("python-mistune" ,python-mistune)
5390 ("python-pexpect" ,python-pexpect)
5391 ("python-pickleshare" ,python-pickleshare)
5392 ("python-simplegeneric" ,python-simplegeneric)
5393 ("python-jsonschema" ,python-jsonschema)
5394 ("python-traitlets" ,python-traitlets)
5395 ("python-ipykernel" ,python-ipykernel)
5396 ("python-nbformat" ,python-nbformat)
5397 ("python-pygments" ,python-pygments)))
5398 (inputs
5399 `(("readline" ,readline)
5400 ("which" ,which)))
5401 (native-inputs
5402 `(("graphviz" ,graphviz)
5403 ("pkg-config" ,pkg-config)
5404 ("python-requests" ,python-requests) ;; for tests
5405 ("python-testpath" ,python-testpath)
5406 ("python-nose" ,python-nose)
5407 ("python-sphinx" ,python-sphinx)
5408 ("python-shpinx-rtd-theme" ,python-sphinx-rtd-theme)
5409 ("texlive" ,texlive)
5410 ("texinfo" ,texinfo)))
5411 (arguments
5412 `(#:phases
5413 (modify-phases %standard-phases
5414 (add-after
5415 'install 'install-doc
5416 (lambda* (#:key inputs outputs #:allow-other-keys)
5417 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
5418 (doc (string-append data "/doc/" ,name "-" ,version))
5419 (html (string-append doc "/html"))
5420 (man1 (string-append data "/man/man1"))
5421 (info (string-append data "/info"))
5422 (examples (string-append doc "/examples"))
5423 (python-arg (string-append "PYTHON=" (which "python"))))
5424 (setenv "LANG" "en_US.utf8")
5425 ;; Make installed package available for running the tests
5426 (add-installed-pythonpath inputs outputs)
5427 (with-directory-excursion "docs"
5428 ;; FIXME: pdf fails to build
5429 ;;(system* "make" "pdf" "PAPER=a4")
5430 (system* "make" python-arg "html")
5431 (system* "make" python-arg "info"))
5432 (copy-recursively "docs/man" man1)
5433 (copy-recursively "examples" examples)
5434 (copy-recursively "docs/build/html" html)
5435 ;; (copy-file "docs/build/latex/ipython.pdf"
5436 ;; (string-append doc "/ipython.pdf"))
5437 (mkdir-p info)
5438 (copy-file "docs/build/texinfo/ipython.info"
5439 (string-append info "/ipython.info"))
5440 (copy-file "COPYING.rst" (string-append doc "/COPYING.rst")))))
5441 ;; Tests can only be run after the library has been installed and not
5442 ;; within the source directory.
5443 (delete 'check)
5444 (add-after
5445 'install 'check
5446 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
5447 (if tests?
5448 (with-directory-excursion "/tmp"
5449 ;; Make installed package available for running the tests
5450 (add-installed-pythonpath inputs outputs)
5451 (setenv "HOME" "/tmp/") ;; required by a test
5452 (zero? (system* (string-append (assoc-ref outputs "out")
5453 "/bin/iptest"))))
5454 #t)))
5455 (add-before
5456 'install 'fix-tests
5457 (lambda* (#:key inputs #:allow-other-keys)
5458 (substitute* "./IPython/utils/_process_posix.py"
5459 (("/usr/bin/env', 'which") (which "which")))
5460 (substitute* "./IPython/core/tests/test_inputtransformer.py"
5461 (("#!/usr/bin/env python")
5462 (string-append "#!" (which "python"))))
5463 ;; Disable 1 failing test
5464 (substitute* "./IPython/core/tests/test_magic.py"
5465 (("def test_dirops\\(\\):" all)
5466 (string-append "@dec.skipif(True)\n" all))))))))
5467 (home-page "http://ipython.org")
5468 (synopsis "IPython is a tool for interactive computing in Python")
5469 (description
5470 "IPython provides a rich architecture for interactive computing with:
5471 Powerful interactive shells, a browser-based notebook, support for interactive
5472 data visualization, embeddable interpreters and tools for parallel
5473 computing.")
5474 (license license:bsd-3)
5475 (properties `((python2-variant . ,(delay python2-ipython))))))
5476
5477 (define-public python2-ipython
5478 (let ((ipython (package-with-python2 (strip-python2-variant python-ipython))))
5479 (package
5480 (inherit ipython)
5481 ;; FIXME: add pyreadline once available.
5482 (propagated-inputs
5483 `(("python2-backports-shutil-get-terminal-size"
5484 ,python2-backports-shutil-get-terminal-size)
5485 ("python2-pathlib2" ,python2-pathlib2)
5486 ,@(package-propagated-inputs ipython)))
5487 (native-inputs
5488 `(("python2-mock" ,python2-mock)
5489 ,@(package-native-inputs ipython))))))
5490
5491 (define-public python-isodate
5492 (package
5493 (name "python-isodate")
5494 (version "0.5.4")
5495 (source
5496 (origin
5497 (method url-fetch)
5498 (uri (pypi-uri "isodate" version))
5499 (sha256
5500 (base32
5501 "0cafaiwixgpxwh9dsd28qb0dbzsj6xpxjdkyk30ns91ps10mq422"))))
5502 (build-system python-build-system)
5503 (home-page
5504 "http://cheeseshop.python.org/pypi/isodate")
5505 (synopsis
5506 "Python date parser and formatter")
5507 (description
5508 "Python-isodate is a python module for parsing and formatting
5509 ISO 8601 dates, time and duration.")
5510 (license license:bsd-3)))
5511
5512 (define-public python2-isodate
5513 (package-with-python2 python-isodate))
5514
5515 (define-public python-html5lib
5516 (package
5517 (name "python-html5lib")
5518 (version "1.0b10")
5519 (source
5520 (origin
5521 (method url-fetch)
5522 (uri (pypi-uri "html5lib" version))
5523 (sha256
5524 (base32
5525 "1yd068a5c00wd0ajq0hqimv7fd82lhrw0w3s01vbhy9bbd6xapqd"))))
5526 (build-system python-build-system)
5527 (propagated-inputs
5528 `(("python-six" ,python-six)
5529 ("python-webencodings" ,python-webencodings)))
5530 (arguments
5531 `(#:test-target "check"))
5532 (home-page
5533 "https://github.com/html5lib/html5lib-python")
5534 (synopsis
5535 "Python HTML parser based on the WHATWG HTML specifcation")
5536 (description
5537 "Html5lib is an HTML parser based on the WHATWG HTML specifcation
5538 and written in Python.")
5539 (license license:expat)))
5540
5541 (define-public python2-html5lib
5542 (package-with-python2 python-html5lib))
5543
5544 ;; Needed for python-bleach, a dependency of python-notebook
5545 (define-public python-html5lib-0.9
5546 (package
5547 (inherit python-html5lib)
5548 (version "0.999")
5549 (source
5550 (origin
5551 (method url-fetch)
5552 (uri (pypi-uri "html5lib" version))
5553 (sha256
5554 (base32
5555 "17n4zfsj6ynmbwdwviywmj8r6nzr3xvfx2zs0xhndmvm51z7z263"))))))
5556
5557 (define-public python2-html5lib-0.9
5558 (package-with-python2 python-html5lib-0.9))
5559
5560 (define-public python-webencodings
5561 (package
5562 (name "python-webencodings")
5563 (version "0.5")
5564 (source (origin
5565 (method url-fetch)
5566 (uri (pypi-uri "webencodings" version))
5567 (sha256
5568 (base32
5569 "015rw7662lkpb9aqiqah2hbizk6w531badqwjpz41rr47glmxid5"))))
5570 (build-system python-build-system)
5571 (arguments
5572 '(#:phases
5573 (modify-phases %standard-phases
5574 (replace 'check
5575 (lambda _
5576 (zero? (system* "py.test" "-v" "webencodings/tests.py")))))))
5577 (native-inputs
5578 `(("python-pytest" ,python-pytest)))
5579 (home-page "https://github.com/SimonSapin/python-webencodings")
5580 (synopsis "Character encoding aliases for legacy web content")
5581 (description
5582 "In order to be compatible with legacy web content when interpreting
5583 something like @code{Content-Type: text/html; charset=latin1}, tools need
5584 to use a particular set of aliases for encoding labels as well as some
5585 overriding rules. For example, @code{US-ASCII} and @code{iso-8859-1} on
5586 the web are actually aliases for @code{windows-1252}, and an @code{UTF-8}
5587 or @code{UTF-16} BOM takes precedence over any other encoding declaration.
5588 The WHATWG @url{https://encoding.spec.whatwg.org/,Encoding} standard
5589 defines all such details so that implementations do not have to
5590 reverse-engineer each other.
5591
5592 This module implements the Encoding standard and has encoding labels and
5593 BOM detection, but the actual implementation for encoders and decoders
5594 is Python’s.")
5595 (license license:bsd-3)))
5596
5597 (define-public python2-webencodings
5598 (package-with-python2 python-webencodings))
5599
5600 (define-public python-urwid
5601 (package
5602 (name "python-urwid")
5603 (version "1.3.1")
5604 (source
5605 (origin
5606 (method url-fetch)
5607 (uri (pypi-uri "urwid" version))
5608 (sha256
5609 (base32
5610 "18cnd1wdjcas08x5qwa5ayw6jsfcn33w4d9f7q3s29fy6qzc1kng"))))
5611 (build-system python-build-system)
5612 (arguments
5613 `(#:phases
5614 (modify-phases %standard-phases
5615 ;; Disable failing test. Bug filed upstream:
5616 ;; https://github.com/wardi/urwid/issues/164
5617 ;; TODO: check again for python-urwid > 1.3.1 or python > 3.4.3.
5618 (add-after 'unpack 'disable-failing-test
5619 (lambda _
5620 (substitute* "urwid/tests/test_event_loops.py"
5621 (("test_remove_watch_file")
5622 "disable_remove_watch_file")))))))
5623 (home-page "http://urwid.org")
5624 (synopsis "Console user interface library for Python")
5625 (description
5626 "Urwid is a curses-based UI/widget library for Python. It includes many
5627 features useful for text console applications.")
5628 (license license:lgpl2.1+)))
5629
5630 (define-public python2-urwid
5631 (let ((python2-urwid (package-with-python2 python-urwid)))
5632 (package
5633 (inherit python2-urwid)
5634 (arguments
5635 (append
5636 '(#:phases
5637 (modify-phases %standard-phases
5638 ;; Disable the vterm tests because of non-deterministic failures
5639 ;; with Python 2. See https://github.com/urwid/urwid/issues/230.
5640 (add-after 'unpack 'delete-test_vterm.py
5641 (delete-file "urwid/tests/test_vterm.py"))))
5642 (package-arguments python-urwid))))))
5643
5644 (define-public python-openid
5645 (package
5646 (name "python-openid")
5647 (version "3.0.10")
5648 (source
5649 (origin
5650 (method url-fetch)
5651 (uri (pypi-uri "python3-openid" version))
5652 (sha256
5653 (base32
5654 "1x3nh3fycqfn43jp5j5pb4q4y2jxp4mdka4absaa3bc0078qd758"))))
5655 (build-system python-build-system)
5656 (arguments
5657 `(#:phases
5658 (modify-phases %standard-phases
5659 (replace 'check
5660 (lambda _
5661 (zero? (system* "./admin/runtests")))))))
5662 (properties `((python2-variant . ,(delay python2-openid))))
5663 (propagated-inputs
5664 `(("python-defusedxml" ,python-defusedxml)))
5665 (native-inputs
5666 `(("python-psycopg2" ,python-psycopg2)
5667 ("python-django" ,python-django)))
5668 (home-page "https://github.com/necaris/python3-openid")
5669 (synopsis "OpenID support for servers and consumers")
5670 (description "This library provides OpenID authentication for Python, both
5671 for clients and servers.")
5672 (license license:asl2.0)))
5673
5674 (define-public python2-openid
5675 (package
5676 (name "python2-openid")
5677 (version "2.2.5")
5678 (source
5679 (origin
5680 (method url-fetch)
5681 (uri (pypi-uri "python-openid" version))
5682 (sha256
5683 (base32
5684 "1vvhxlghjan01snfdc4k7ykd80vkyjgizwgg9bncnin8rqz1ricj"))))
5685 (build-system python-build-system)
5686 (arguments
5687 ;; Python 3 support is in `python3-openid`, a separate package.
5688 `(#:python ,python-2))
5689 (home-page "https://github.com/openid/python-openid")
5690 (synopsis "OpenID support for servers and consumers")
5691 (description "This library provides OpenID authentication for Python, both
5692 for clients and servers.")
5693 (license license:asl2.0)))
5694
5695 (define-public python-urwidtrees
5696 (package
5697 (name "python-urwidtrees")
5698 (version "1.0.2")
5699 (source
5700 (origin
5701 (method url-fetch)
5702 ;; package author intends on distributing via github rather than pypi:
5703 ;; https://github.com/pazz/alot/issues/877#issuecomment-230173331
5704 (uri (string-append "https://github.com/pazz/urwidtrees/archive/"
5705 version ".tar.gz"))
5706 (file-name (string-append name "-" version ".tar.gz"))
5707 (sha256
5708 (base32
5709 "0d30lyd3s2a97rhqfax5w9ssqds2z6aydqx3c6j2c2lk3cb4ngvh"))))
5710 (build-system python-build-system)
5711 (arguments
5712 '(#:tests? #f)) ; no tests
5713 (propagated-inputs `(("python-urwid" ,python-urwid)))
5714 (home-page "https://github.com/pazz/urwidtrees")
5715 (synopsis "Tree widgets for urwid")
5716 (description "Urwidtrees is a Widget Container API for the @code{urwid}
5717 toolkit. Use it to build trees of widgets.")
5718 (license license:gpl3+)))
5719
5720 (define-public python2-urwidtrees
5721 (package-with-python2 python-urwidtrees))
5722
5723 (define-public python-dbus
5724 (package
5725 (name "python-dbus")
5726 (version "1.2.0")
5727 (source
5728 (origin
5729 (method url-fetch)
5730 (uri (string-append
5731 "https://dbus.freedesktop.org/releases/dbus-python/dbus-python-"
5732 version ".tar.gz"))
5733 (sha256
5734 (base32 "1py62qir966lvdkngg0v8k1khsqxwk5m4s8nflpk1agk5f5nqb71"))))
5735 (build-system gnu-build-system)
5736 (arguments
5737 '(#:phases
5738 (modify-phases %standard-phases
5739 (add-before
5740 'check 'pre-check
5741 (lambda _
5742 ;; XXX: For the missing '/etc/machine-id'.
5743 (substitute* "test/run-test.sh"
5744 (("DBUS_FATAL_WARNINGS=1")
5745 "DBUS_FATAL_WARNINGS=0"))
5746 #t)))))
5747 (native-inputs
5748 `(("pkg-config" ,pkg-config)))
5749 (inputs
5750 `(("python" ,python)
5751 ("dbus-glib" ,dbus-glib)))
5752 (synopsis "Python bindings for D-bus")
5753 (description "python-dbus provides bindings for libdbus, the reference
5754 implementation of D-Bus.")
5755 (home-page "http://www.freedesktop.org/wiki/Software/DBusBindings/")
5756 (license license:expat)))
5757
5758 (define-public python2-dbus
5759 (package (inherit python-dbus)
5760 (name "python2-dbus")
5761 (inputs `(("python" ,python-2)
5762 ,@(alist-delete "python"
5763 (package-inputs python-dbus)
5764 equal?)))
5765 ;; FIXME: on Python 2, the test_utf8 fails with:
5766 ;; "ValueError: unichr() arg not in range(0x10000) (narrow Python build)"
5767 (arguments `(#:tests? #f))))
5768
5769 (define-public python-apsw
5770 (package
5771 (name "python-apsw")
5772 (version "3.9.2-r1")
5773 (source
5774 (origin
5775 (method url-fetch)
5776 (uri (pypi-uri "apsw" version))
5777 (sha256
5778 (base32
5779 "0w4jb0wpx785qw42r3h4fh7gl5w2968q48i7gygybsfxck8nzffs"))))
5780 (build-system python-build-system)
5781 (inputs
5782 `(("sqlite" ,sqlite)))
5783 (arguments
5784 `(#:phases
5785 (modify-phases %standard-phases
5786 (delete 'check)
5787 (add-after 'install 'check
5788 (lambda* (#:key inputs outputs #:allow-other-keys)
5789 (add-installed-pythonpath inputs outputs)
5790 (zero? (system* "python" "setup.py" "test")))))))
5791 (home-page "https://github.com/rogerbinns/apsw/")
5792 (synopsis "Another Python SQLite Wrapper")
5793 (description "APSW is a Python wrapper for the SQLite
5794 embedded relational database engine. In contrast to other wrappers such as
5795 pysqlite it focuses on being a minimal layer over SQLite attempting just to
5796 translate the complete SQLite API into Python.")
5797 (license license:zlib)))
5798
5799 (define-public python2-apsw
5800 (package-with-python2 python-apsw))
5801
5802 (define-public python-lxml
5803 (package
5804 (name "python-lxml")
5805 (version "3.6.0")
5806 (source
5807 (origin
5808 (method url-fetch)
5809 (uri (pypi-uri "lxml" version))
5810 (sha256
5811 (base32
5812 "1pvbmiy2m7jwv493kilbghhj2pkh8wy1na3ji350vhzhlwlclx4w"))))
5813 (build-system python-build-system)
5814 (inputs
5815 `(("libxml2" ,libxml2)
5816 ("libxslt" ,libxslt)))
5817 (home-page "http://lxml.de/")
5818 (synopsis
5819 "Python XML processing library")
5820 (description
5821 "The lxml XML toolkit is a Pythonic binding for the C libraries
5822 libxml2 and libxslt.")
5823 (license license:bsd-3))) ; and a few more, see LICENSES.txt
5824
5825 (define-public python2-lxml
5826 (package-with-python2 python-lxml))
5827
5828 ;; beautifulsoup4 has a totally different namespace than 3.x,
5829 ;; and pypi seems to put it under its own name, so I guess we should too
5830 (define-public python-beautifulsoup4
5831 (package
5832 (name "python-beautifulsoup4")
5833 (version "4.5.3")
5834 (source
5835 (origin
5836 (method url-fetch)
5837 (uri (pypi-uri "beautifulsoup4" version))
5838 (sha256
5839 (base32
5840 "0glaw1vyxnbp03fni7h5496n6iib0n5iim4gax1n0ngscs9s075j"))))
5841 (build-system python-build-system)
5842 (arguments
5843 `(#:phases
5844 (modify-phases %standard-phases
5845 ;; The Python 2 source is the definitive source of beautifulsoup4. We
5846 ;; must use this conversion script when building with Python 3. The
5847 ;; conversion script also runs the tests.
5848 ;; For more information, see the file 'convert-py3k' in the source
5849 ;; distribution.
5850 (replace 'check
5851 (lambda _ (zero? (system* "./convert-py3k")))))))
5852 (home-page
5853 "http://www.crummy.com/software/BeautifulSoup/bs4/")
5854 (synopsis
5855 "Python screen-scraping library")
5856 (description
5857 "Beautiful Soup is a Python library designed for rapidly setting up
5858 screen-scraping projects. It offers Pythonic idioms for navigating,
5859 searching, and modifying a parse tree, providing a toolkit for
5860 dissecting a document and extracting what you need. It automatically
5861 converts incoming documents to Unicode and outgoing documents to UTF-8.")
5862 (license license:expat)
5863 (properties `((python2-variant . ,(delay python2-beautifulsoup4))))))
5864
5865 (define-public python2-beautifulsoup4
5866 (package
5867 (inherit (package-with-python2
5868 (strip-python2-variant python-beautifulsoup4)))
5869 (arguments `(#:python ,python-2))))
5870
5871 (define-public python-cssutils
5872 (package
5873 (name "python-cssutils")
5874 (version "1.0.1")
5875 (source
5876 (origin
5877 (method url-fetch)
5878 (uri (pypi-uri "cssutils" version))
5879 (sha256
5880 (base32
5881 "0qwha9x1wml2qmipbcz03gndnlwhzrjdvw9i09si247a90l8p8fq"))))
5882 (build-system python-build-system)
5883 (native-inputs
5884 `(("unzip" ,unzip))) ; for unpacking the source
5885 (arguments
5886 `(#:tests? #f)) ;tests require python-pbr < 1.7.0
5887 (home-page "http://cthedot.de/cssutils/")
5888 (synopsis
5889 "CSS Cascading Style Sheets library for Python")
5890 (description
5891 "Cssutils is a Python package for parsing and building CSS
5892 Cascading Style Sheets. Currently it provides a DOM only and no rendering
5893 options.")
5894 (license license:lgpl3+)))
5895
5896 (define-public python2-cssutils
5897 (package-with-python2 python-cssutils))
5898
5899 (define-public python-cssselect
5900 (package
5901 (name "python-cssselect")
5902 (version "0.9.2")
5903 (source
5904 (origin
5905 (method url-fetch)
5906 (uri (pypi-uri "cssselect" version))
5907 (sha256
5908 (base32
5909 "1xg6gbva1yswghiycmgincv6ab4bn7hpm720ndbj40h8xycmnfvi"))))
5910 (build-system python-build-system)
5911 (arguments
5912 ;; tests fail with message
5913 ;; AttributeError: 'module' object has no attribute 'tests'
5914 `(#:tests? #f))
5915 (home-page
5916 "https://pythonhosted.org/cssselect/")
5917 (synopsis
5918 "CSS3 selector parser and translator to XPath 1.0")
5919 (description
5920 "Cssselect ia a Python module that parses CSS3 Selectors and translates
5921 them to XPath 1.0 expressions. Such expressions can be used in lxml or
5922 another XPath engine to find the matching elements in an XML or HTML document.")
5923 (license license:bsd-3)))
5924
5925 (define-public python2-cssselect
5926 (package-with-python2 python-cssselect))
5927
5928 (define-public python-openid-cla
5929 (package
5930 (name "python-openid-cla")
5931 (version "1.2")
5932 (source
5933 (origin
5934 (method url-fetch)
5935 (uri (pypi-uri "python-openid-cla" version))
5936 (sha256
5937 (base32
5938 "102hy2qisvjxp5s0v9lvwqi4f2dk0dhns40vjgn008yxc7k0h3cr"))))
5939 (build-system python-build-system)
5940 (arguments '(#:tests? #f)) ; No tests.
5941 (home-page "https://github.com/puiterwijk/python-openid-cla/")
5942 (synopsis "Implementation of the OpenID CLA extension for python-openid")
5943 (description "@code{openid-cla} is an implementation of the OpenID
5944 contributor license agreement extension for python-openid.")
5945 (license license:bsd-3)))
5946
5947 (define-public python2-openid-cla
5948 (package-with-python2 python-openid-cla))
5949
5950 (define-public python-openid-teams
5951 (package
5952 (name "python-openid-teams")
5953 (version "1.1")
5954 (source
5955 (origin
5956 (method url-fetch)
5957 (uri (pypi-uri "python-openid-teams" version))
5958 (sha256
5959 (base32
5960 "05zrh78alav24rxkbqlpbad6d3x2nljk6z6j7kflxf3vdqa7w969"))))
5961 (build-system python-build-system)
5962 (arguments '(#:tests? #f)) ; No tests.
5963 (home-page "https://github.com/puiterwijk/python-openid-teams/")
5964 (synopsis "Implementation of the OpenID teams extension for python-openid")
5965 (description
5966 "@code{openid-teams} is an implementation of the OpenID
5967 teams extension for python-openid.")
5968 (license license:bsd-3)))
5969
5970 (define-public python2-openid-teams
5971 (package-with-python2 python-openid-teams))
5972
5973 (define-public python-netifaces
5974 (package
5975 (name "python-netifaces")
5976 (version "0.10.4")
5977 (source
5978 (origin
5979 (method url-fetch)
5980 (uri (string-append
5981 "https://pypi.python.org/packages/source/n/netifaces/netifaces-"
5982 version
5983 ".tar.gz"))
5984 (sha256
5985 (base32
5986 "1plw237a4zib4z8s62g0mrs8gm3kjfrp5sxh6bbk9nl3rdls2mln"))))
5987 (build-system python-build-system)
5988 (home-page
5989 "https://bitbucket.org/al45tair/netifaces")
5990 (synopsis
5991 "Python module for portable network interface information")
5992 (description
5993 "Netifaces is a Python module providing information on network
5994 interfaces in an easy and portable manner.")
5995 (license license:expat)))
5996
5997 (define-public python2-netifaces
5998 (package-with-python2 python-netifaces))
5999
6000 (define-public python-networkx
6001 (package
6002 (name "python-networkx")
6003 (version "1.11")
6004 (source
6005 (origin
6006 (method url-fetch)
6007 (uri (pypi-uri "networkx" version))
6008 (sha256
6009 (base32 "1f74s56xb4ggixiq0vxyfxsfk8p20c7a099lpcf60izv1php03hd"))))
6010 (build-system python-build-system)
6011 ;; python-decorator is needed at runtime
6012 (propagated-inputs
6013 `(("python-decorator" ,python-decorator)))
6014 (native-inputs
6015 `(("python-nose" ,python-nose)))
6016 (home-page "http://networkx.github.io/")
6017 (synopsis "Python module for creating and manipulating graphs and networks")
6018 (description
6019 "NetworkX is a Python package for the creation, manipulation, and study
6020 of the structure, dynamics, and functions of complex networks.")
6021 (license license:bsd-3)))
6022
6023 (define-public python2-networkx
6024 (package-with-python2 python-networkx))
6025
6026 (define-public snakemake
6027 (package
6028 (name "snakemake")
6029 (version "3.11.2")
6030 (source
6031 (origin
6032 (method url-fetch)
6033 (uri (pypi-uri "snakemake" version))
6034 (sha256
6035 (base32 "0qcp7y9csvanyzh08jppryhd5di8r1z7p0d4wkfg5591pj3bb8zp"))))
6036 (build-system python-build-system)
6037 (arguments
6038 ;; TODO: Package missing test dependencies.
6039 '(#:tests? #f
6040 #:phases
6041 (modify-phases %standard-phases
6042 ;; For cluster execution Snakemake will call Python. Since there is
6043 ;; no suitable PYTHONPATH set, cluster execution will fail. We fix
6044 ;; this by calling the snakemake wrapper instead.
6045 (add-after 'unpack 'call-wrapper-not-wrapped-snakemake
6046 (lambda* (#:key outputs #:allow-other-keys)
6047 (substitute* "snakemake/executors.py"
6048 (("\\{sys.executable\\} -m snakemake")
6049 (string-append (assoc-ref outputs "out")
6050 "/bin/snakemake")))
6051 #t)))))
6052 (propagated-inputs
6053 `(("python-wrapt" ,python-wrapt)
6054 ("python-requests" ,python-requests)))
6055 (home-page "https://bitbucket.org/snakemake/snakemake/wiki/Home")
6056 (synopsis "Python-based execution environment for make-like workflows")
6057 (description
6058 "Snakemake aims to reduce the complexity of creating workflows by
6059 providing a clean and modern domain specific specification language (DSL) in
6060 Python style, together with a fast and comfortable execution environment.")
6061 (license license:expat)))
6062
6063 (define-public python-seaborn
6064 (package
6065 (name "python-seaborn")
6066 (version "0.7.1")
6067 (source
6068 (origin
6069 (method url-fetch)
6070 (uri (pypi-uri "seaborn" version))
6071 (sha256
6072 (base32 "0pawrqc3mxpwd5g9pvi9gba02637bh5c8ldpp8izfwpfn52469zs"))))
6073 (build-system python-build-system)
6074 (arguments
6075 '(#:tests? #f)) ; Tests requires a running X11 server.
6076 (propagated-inputs
6077 `(("python-pandas" ,python-pandas)
6078 ("python-matplotlib" ,python-matplotlib)
6079 ("python-scipy" ,python-scipy)))
6080 (home-page "http://stanford.edu/~mwaskom/software/seaborn/")
6081 (synopsis "Statistical data visualization")
6082 (description
6083 "Seaborn is a library for making attractive and informative statistical
6084 graphics in Python. It is built on top of matplotlib and tightly integrated
6085 with the PyData stack, including support for numpy and pandas data structures
6086 and statistical routines from scipy and statsmodels.")
6087 (license license:bsd-3)
6088 (properties `((python2-variant . ,(delay python2-seaborn))))))
6089
6090 (define-public python2-seaborn
6091 (let ((base (package-with-python2 (strip-python2-variant python-seaborn))))
6092 (package
6093 (inherit base)
6094 (propagated-inputs `(("python2-pytz" ,python2-pytz)
6095 ,@(package-propagated-inputs base))))))
6096
6097 (define-public python-mpmath
6098 (package
6099 (name "python-mpmath")
6100 (version "0.19")
6101 (source (origin
6102 (method url-fetch)
6103 (uri (string-append "http://mpmath.org/files/mpmath-"
6104 version ".tar.gz"))
6105 (sha256
6106 (base32
6107 "08ijsr4ifrqv3cjc26mkw0dbvyygsa99in376hr4b96ddm1gdpb8"))))
6108 (build-system python-build-system)
6109 (arguments
6110 '(#:phases
6111 (modify-phases %standard-phases
6112 (replace 'check
6113 (lambda _
6114 (zero?
6115 (system* "python" "mpmath/tests/runtests.py" "-local")))))))
6116 (home-page "http://mpmath.org")
6117 (synopsis "Arbitrary-precision floating-point arithmetic in python")
6118 (description
6119 "@code{mpmath} can be used as an arbitrary-precision substitute for
6120 Python's float/complex types and math/cmath modules, but also does much
6121 more advanced mathematics.")
6122 (license license:bsd-3)))
6123
6124 (define-public python2-mpmath
6125 (package-with-python2 python-mpmath))
6126
6127 (define-public python-sympy
6128 (package
6129 (name "python-sympy")
6130 (version "1.0")
6131 (source
6132 (origin
6133 (method url-fetch)
6134 (uri (string-append
6135 "https://github.com/sympy/sympy/releases/download/sympy-"
6136 version "/sympy-" version ".tar.gz"))
6137 (sha256
6138 (base32 "1bpzjwr9hrr7w88v4vgnj9lr6vxcldc94si13n8xpr1rv08d5b1y"))))
6139 (build-system python-build-system)
6140 (propagated-inputs
6141 `(("python-mpmath" ,python-mpmath)))
6142 (home-page "http://www.sympy.org/")
6143 (synopsis "Python library for symbolic mathematics")
6144 (description
6145 "SymPy is a Python library for symbolic mathematics. It aims to become a
6146 full-featured computer algebra system (CAS) while keeping the code as simple
6147 as possible in order to be comprehensible and easily extensible.")
6148 (license license:bsd-3)))
6149
6150 (define-public python2-sympy
6151 (package-with-python2 python-sympy))
6152
6153 (define-public python-q
6154 (package
6155 (name "python-q")
6156 (version "2.6")
6157 (source
6158 (origin
6159 (method url-fetch)
6160 (uri (pypi-uri "q" version))
6161 (sha256
6162 (base32
6163 "1mgfazh8fkizh6walra2zv885f3lcgr3nb02v1frfm4p8ddcy3yy"))))
6164 (build-system python-build-system)
6165 (home-page "https://github.com/zestyping/q")
6166 (synopsis "Quick-and-dirty debugging output for tired programmers")
6167 (description
6168 "q is a Python module for \"print\" style of debugging Python code. It
6169 provides convenient short API for print out of values, tracebacks, and
6170 falling into the Python interpreter.")
6171 (license license:asl2.0)))
6172
6173 (define-public python2-q
6174 (package-with-python2 python-q))
6175
6176 (define-public python-testlib
6177 (package
6178 (name "python-testlib")
6179 (version "0.6.5")
6180 (source
6181 (origin
6182 (method url-fetch)
6183 (uri (string-append
6184 "https://pypi.python.org/packages/source/t/testlib/testlib-"
6185 version ".zip"))
6186 (sha256
6187 (base32 "1mz26cxn4x8bbgv0rn0mvj2z05y31rkc8009nvdlb3lam5b4mj3y"))))
6188 (build-system python-build-system)
6189 (native-inputs
6190 `(("unzip" ,unzip))) ; for unpacking the source
6191 (synopsis "Python micro test suite harness")
6192 (description "A micro unittest suite harness for Python.")
6193 (home-page "https://github.com/trentm/testlib")
6194 (license license:expat)))
6195
6196 (define-public python2-testlib
6197 (package-with-python2 python-testlib))
6198
6199 (define-public python2-xlib
6200 (package
6201 (name "python2-xlib")
6202 (version "0.14")
6203 (source (origin
6204 (method url-fetch)
6205 (uri (string-append "mirror://sourceforge/python-xlib/python-xlib"
6206 "/" version "/"
6207 "python-xlib-" version ".tar.gz"))
6208 (sha256
6209 (base32
6210 "1sv0447j0rx8cgs3jhjl695p5pv13ihglcjlrrz1kq05lsvb0wa7"))))
6211 (build-system python-build-system)
6212 (arguments
6213 `(#:python ,python-2 ;Python 2 only
6214 #:tests? #f)) ;no tests
6215 (home-page "http://python-xlib.sourceforge.net/")
6216 (synopsis "Python X11 client library")
6217 (description
6218 "The Python X Library is intended to be a fully functional X client
6219 library for Python programs. It is useful to implement low-level X clients.
6220 It is written entirely in Python.")
6221 (license license:gpl2+)))
6222
6223 (define-public python-singledispatch
6224 (package
6225 (name "python-singledispatch")
6226 (version "3.4.0.3")
6227 (source
6228 (origin
6229 (method url-fetch)
6230 (uri (pypi-uri "singledispatch" version))
6231 (sha256
6232 (base32
6233 "171b7ip0hsq5qm83np40h3phlr36ym18w0lay0a8v08kvy3sy1jv"))))
6234 (build-system python-build-system)
6235 (native-inputs
6236 `(("python-six" ,python-six))) ; required for conversion, not at run-time
6237 (home-page
6238 "http://docs.python.org/3/library/functools.html#functools.singledispatch")
6239 (synopsis "Backport of singledispatch feature from Python 3.4")
6240 (description
6241 "This library brings functools.singledispatch from Python 3.4 to Python
6242 2.6-3.3.")
6243 (license license:expat)))
6244
6245 (define-public python2-singledispatch
6246 (package-with-python2 python-singledispatch))
6247
6248 (define-public python-tornado
6249 (package
6250 (name "python-tornado")
6251 (version "4.5.1")
6252 (source
6253 (origin
6254 (method url-fetch)
6255 (uri (pypi-uri "tornado" version))
6256 (sha256
6257 (base32 "1zbkgcdfq81k298awrm8p0xwbwwn2p3nbizdglzfbkskhai082fv"))))
6258 (build-system python-build-system)
6259 (arguments
6260 '(;; FIXME: Two tests error out with:
6261 ;; AssertionError: b'Error in atexit._run_exitfuncs:\nFileNotF[44 chars]ry\n' != b''
6262 ;; #:phases
6263 ;; (modify-phases %standard-phases
6264 ;; (replace 'check
6265 ;; (lambda _
6266 ;; ;; 'setup.py test' hits an AssertionError on BSD-specific
6267 ;; ;; "tornado/platform/kqueue.py". This is the supported method:
6268 ;; (zero? (system* "python" "-m" "tornado.test")))))
6269 #:tests? #f))
6270 (native-inputs
6271 `(("python-certifi" ,python-certifi)))
6272 (propagated-inputs
6273 `(("python-backports-abc" ,python-backports-abc)))
6274 (home-page "http://www.tornadoweb.org/")
6275 (synopsis "Python web framework and asynchronous networking library")
6276 (description
6277 "Tornado is a Python web framework and asynchronous networking library,
6278 originally developed at FriendFeed. By using non-blocking network I/O,
6279 Tornado can scale to tens of thousands of open connections, making it ideal
6280 for long polling, WebSockets, and other applications that require a long-lived
6281 connection to each user.")
6282 (license license:asl2.0)
6283 (properties `((python2-variant . ,(delay python2-tornado))))))
6284
6285 (define-public python2-tornado
6286 (let ((tornado (package-with-python2 (strip-python2-variant python-tornado))))
6287 (package (inherit tornado)
6288 (propagated-inputs
6289 `(("python2-backport-ssl-match-hostname"
6290 ,python2-backport-ssl-match-hostname)
6291 ("python2-singledispatch" ,python2-singledispatch)
6292 ,@(package-propagated-inputs tornado))))))
6293
6294 ;; the python- version can be removed with python-3.5
6295 (define-public python-backports-abc
6296 (package
6297 (name "python-backports-abc")
6298 (version "0.5")
6299 (source
6300 (origin
6301 (method url-fetch)
6302 (uri (pypi-uri "backports_abc" version))
6303 (sha256
6304 (base32
6305 "1pkv8d1zxj5f9i227dxbjczncbv7ks7ywnjwyxfjagm02i2yafq3"))))
6306 (build-system python-build-system)
6307 (home-page "https://github.com/cython/backports_abc")
6308 (synopsis "Backport of additions to the 'collections.abc' module")
6309 (description
6310 "Python-backports-abc provides a backport of additions to the
6311 'collections.abc' module in Python-3.5.")
6312 (license license:psfl)))
6313
6314 (define-public python2-backports-abc
6315 (package-with-python2 python-backports-abc))
6316
6317 (define-public python2-backports-shutil-get-terminal-size
6318 (package
6319 (name "python2-backports-shutil-get-terminal-size")
6320 (version "1.0.0")
6321 (source
6322 (origin
6323 (method url-fetch)
6324 (uri (pypi-uri "backports.shutil_get_terminal_size" version))
6325 (sha256
6326 (base32
6327 "107cmn7g3jnbkp826zlj8rrj19fam301qvaqf0f3905f5217lgki"))))
6328 (build-system python-build-system)
6329 (arguments
6330 `(#:python ,python-2
6331 #:phases
6332 (modify-phases %standard-phases
6333 (replace 'check
6334 (lambda _
6335 (zero? (system* "py.test" "-v")))))))
6336 (native-inputs
6337 `(("python2-pytest" ,python2-pytest)))
6338 (home-page "https://github.com/chrippa/backports.shutil_get_terminal_size")
6339 (synopsis "Backport of Python 3.3's @code{shutil.get_terminal_size}")
6340 (description
6341 "This package provides a backport of the @code{get_terminal_size
6342 function} from Python 3.3's @code{shutil}.
6343 Unlike the original version it is written in pure Python rather than C,
6344 so it might be a tiny bit slower.")
6345 (license license:expat)))
6346
6347 (define-public python-waf
6348 (package
6349 (name "python-waf")
6350 (version "1.9.8")
6351 (source (origin
6352 (method url-fetch)
6353 (uri (string-append "https://waf.io/"
6354 "waf-" version ".tar.bz2"))
6355 (sha256
6356 (base32
6357 "0wl4cnmp06lfxqjxaan58bqxn27smhydz0sg5prrfbl3bsw4gv6q"))))
6358 (build-system python-build-system)
6359 (arguments
6360 '(#:phases
6361 (modify-phases %standard-phases
6362 (replace 'build
6363 (lambda _
6364 (zero? (system* "python" "waf-light" "configure" "build"))))
6365 (replace 'check
6366 (lambda _
6367 (zero? (system* "python" "waf" "--version"))))
6368 (replace 'install
6369 (lambda _
6370 (copy-file "waf" %output))))))
6371 (home-page "https://waf.io/")
6372 (synopsis "Python-based build system")
6373 (description
6374 "Waf is a Python-based framework for configuring, compiling and installing
6375 applications.")
6376 (license license:bsd-3)))
6377
6378 (define-public python2-waf
6379 (package-with-python2 python-waf))
6380
6381 (define-public python-pyzmq
6382 (package
6383 (name "python-pyzmq")
6384 (version "15.1.0")
6385 (source
6386 (origin
6387 (method url-fetch)
6388 (uri (pypi-uri "pyzmq" version))
6389 (sha256
6390 (base32 "13fhwnlvsvxv72kfhqbpn6qi7msh8mc8377mpabv32skk2cjfnxx"))))
6391 (build-system python-build-system)
6392 (arguments
6393 `(#:configure-flags
6394 (list (string-append "--zmq=" (assoc-ref %build-inputs "zeromq")))
6395 ;; FIXME: You must build pyzmq with 'python setup.py build_ext
6396 ;; --inplace' for 'python setup.py test' to work.
6397 #:tests? #f))
6398 (inputs
6399 `(("zeromq" ,zeromq)))
6400 (native-inputs
6401 `(("pkg-config" ,pkg-config)
6402 ("python-nose" ,python-nose)))
6403 (home-page "https://github.com/zeromq/pyzmq")
6404 (synopsis "Python bindings for 0MQ")
6405 (description
6406 "PyZMQ is the official Python binding for the ZeroMQ messaging library.")
6407 (license license:bsd-4)))
6408
6409 (define-public python2-pyzmq
6410 (package-with-python2 python-pyzmq))
6411
6412 (define-public python-pep8
6413 (package
6414 (name "python-pep8")
6415 (version "1.7.0")
6416 (source
6417 (origin
6418 (method url-fetch)
6419 (uri (pypi-uri "pep8" version))
6420 (sha256
6421 (base32
6422 "002rkl4lsn6x2mxmf8ar00l0m8i3mzrc6pnzz77blyksmpsxa4x1"))))
6423 (build-system python-build-system)
6424 (home-page "http://pep8.readthedocs.org/")
6425 (synopsis "Python style guide checker")
6426 (description
6427 "This tools checks Python code against some of the style conventions in
6428 PEP 8.")
6429 (license license:expat)))
6430
6431 (define-public python2-pep8
6432 (package-with-python2 python-pep8))
6433
6434 (define-public python-pyflakes
6435 (package
6436 (name "python-pyflakes")
6437 (version "1.0.0")
6438 (source
6439 (origin
6440 (method url-fetch)
6441 (uri (pypi-uri "pyflakes" version))
6442 (sha256
6443 (base32
6444 "0qs2sgqszq7wcplis8509wk2ygqcrwzbs1ghfj3svvivq2j377pk"))))
6445 (build-system python-build-system)
6446 (home-page
6447 "https://github.com/pyflakes/pyflakes")
6448 (synopsis "Passive checker of Python programs")
6449 (description
6450 "Pyflakes statically checks Python source code for common errors.")
6451 (license license:expat)))
6452
6453 (define-public python2-pyflakes
6454 (package-with-python2 python-pyflakes))
6455
6456 (define-public python-mccabe
6457 (package
6458 (name "python-mccabe")
6459 (version "0.4.0")
6460 (source
6461 (origin
6462 (method url-fetch)
6463 (uri (pypi-uri "mccabe" version))
6464 (sha256
6465 (base32
6466 "0yr08a36h8lqlif10l4xcikbbig7q8f41gqywir7rrvnv3mi4aws"))))
6467 (build-system python-build-system)
6468 (native-inputs
6469 `(("python-pytest" ,python-pytest)
6470 ("python-pytest-runner" ,python-pytest-runner)))
6471 (home-page "https://github.com/flintwork/mccabe")
6472 (synopsis "McCabe checker, plugin for flake8")
6473 (description
6474 "This package provides a Flake8 plug-in to compute the McCabe cyclomatic
6475 complexity of Python source code.")
6476 (license license:expat)))
6477
6478 (define-public python2-mccabe
6479 (package-with-python2 python-mccabe))
6480
6481 (define-public python-mccabe-0.2.1
6482 (package (inherit python-mccabe)
6483 (version "0.2.1")
6484 (source
6485 (origin
6486 (method url-fetch)
6487 (uri (pypi-uri "mccabe" version))
6488 (sha256
6489 (base32
6490 "0fi4a81kr5bcv5p4xgibqr595hyj5dafkqgsmfk96mfy8w71fajs"))))))
6491
6492 (define-public python2-mccabe-0.2.1
6493 (package-with-python2 python-mccabe-0.2.1))
6494
6495 ;; Flake8 2.4.1 requires an older version of pep8.
6496 ;; This should be removed ASAP.
6497 (define-public python-pep8-1.5.7
6498 (package (inherit python-pep8)
6499 (version "1.5.7")
6500 (source
6501 (origin
6502 (method url-fetch)
6503 (uri (string-append
6504 "https://pypi.python.org/packages/source/p/pep8/pep8-"
6505 version
6506 ".tar.gz"))
6507 (sha256
6508 (base32
6509 "12b9bbdbwnspxgak14xg58c130x2n0blxzlms5jn2dszn8qj3d0m"))))
6510 (arguments
6511 ;; XXX Tests not compatible with Python 3.5.
6512 '(#:tests? #f))))
6513
6514 (define-public python2-pep8-1.5.7
6515 (package-with-python2 python-pep8-1.5.7))
6516
6517 ;; Flake8 2.4.1 requires an older version of pyflakes.
6518 ;; This should be removed ASAP.
6519 (define-public python-pyflakes-0.8.1
6520 (package (inherit python-pyflakes)
6521 (version "0.8.1")
6522 (source
6523 (origin
6524 (method url-fetch)
6525 (uri (string-append
6526 "https://pypi.python.org/packages/source/p/pyflakes/pyflakes-"
6527 version
6528 ".tar.gz"))
6529 (sha256
6530 (base32
6531 "0sbpq6pqm1i9wqi41mlfrsc5rk92jv4mskvlyxmnhlbdnc80ma1z"))))
6532 (arguments
6533 ;; XXX Tests not compatible with Python 3.5.
6534 '(#:tests? #f))))
6535
6536 (define-public python2-pyflakes-0.8.1
6537 (package-with-python2 python-pyflakes-0.8.1))
6538
6539 (define-public python-flake8
6540 (package
6541 (name "python-flake8")
6542 (version "2.5.4")
6543 (source
6544 (origin
6545 (method url-fetch)
6546 (uri (pypi-uri "flake8" version))
6547 (sha256
6548 (base32
6549 "0bs9cz4fr99r2rwig1b8jwaadl1nan7kgpdzqwj0bwbckwbmh7nc"))
6550 (modules '((guix build utils)))
6551 (snippet
6552 '(begin
6553 ;; Remove pre-compiled .pyc files from source.
6554 (for-each delete-file-recursively
6555 (find-files "." "__pycache__" #:directories? #t))
6556 (for-each delete-file (find-files "." "\\.pyc$"))
6557 #t))))
6558 (build-system python-build-system)
6559 (propagated-inputs
6560 `(("python-pep8" ,python-pep8)
6561 ("python-pyflakes" ,python-pyflakes)
6562 ("python-mccabe" ,python-mccabe)))
6563 (native-inputs
6564 `(("python-mock" ,python-mock) ; TODO: only required for < 3.3
6565 ("python-nose" ,python-nose)))
6566 (home-page "https://gitlab.com/pycqa/flake8")
6567 (synopsis
6568 "The modular source code checker: pep8, pyflakes and co")
6569 (description
6570 "Flake8 is a wrapper around PyFlakes, pep8 and python-mccabe.")
6571 (license license:expat)))
6572
6573 (define-public python2-flake8
6574 (package-with-python2 python-flake8))
6575
6576 (define-public python-flake8-polyfill
6577 (package
6578 (name "python-flake8-polyfill")
6579 (version "1.0.1")
6580 (source
6581 (origin
6582 (method url-fetch)
6583 (uri (pypi-uri "flake8-polyfill" version))
6584 (sha256
6585 (base32
6586 "02gn2wxvh9vnf7m7dld7ca4l60mg5c370hv3swwppkngwaqmcw67"))))
6587 (build-system python-build-system)
6588 (arguments
6589 '(#:phases
6590 (modify-phases %standard-phases
6591 (replace 'check
6592 (lambda _
6593 (setenv "PYTHONPATH"
6594 (string-append (getcwd) "/build/lib:"
6595 (getenv "PYTHONPATH")))
6596 (zero? (system* "py.test" "-v")))))))
6597 (native-inputs
6598 `(("python-flake8" ,python-flake8)
6599 ("python-mock" ,python-mock)
6600 ("python-pycodestyle" ,python-pycodestyle)
6601 ("python-pytest" ,python-pytest)))
6602 (home-page "https://gitlab.com/pycqa/flake8-polyfill")
6603 (synopsis "Polyfill package for Flake8 plugins")
6604 (description
6605 "This package that provides some compatibility helpers for Flake8
6606 plugins that intend to support Flake8 2.x and 3.x simultaneously.")
6607 (license license:expat)))
6608
6609 (define-public python2-flake8-polyfill
6610 (package-with-python2 python-flake8-polyfill))
6611
6612 (define-public python-mistune
6613 (package
6614 (name "python-mistune")
6615 (version "0.7.3")
6616 (source
6617 (origin
6618 (method url-fetch)
6619 (uri (pypi-uri "mistune" version))
6620 (sha256
6621 (base32
6622 "04xpk1zvslhq3xpnf01g3ag0dy9wfv4z28p093r8k49vvxlyil11"))))
6623 (build-system python-build-system)
6624 (native-inputs
6625 `(("python-nose" ,python-nose)
6626 ("python-cython" ,python-cython)))
6627 (home-page "https://github.com/lepture/mistune")
6628 (synopsis "Markdown parser in pure Python")
6629 (description "This package provides a fast markdown parser in pure
6630 Python.")
6631 (license license:bsd-3)))
6632
6633 (define-public python2-mistune
6634 (package-with-python2 python-mistune))
6635
6636 (define-public python-markdown
6637 (package
6638 (name "python-markdown")
6639 (version "2.6.8")
6640 (source
6641 (origin
6642 (method url-fetch)
6643 (uri (pypi-uri "Markdown" version))
6644 (sha256
6645 (base32
6646 "0cqfhr1km2s5d8jm6hbwgkrrj9hvkjf2gab3s2axlrw1clgaij0a"))))
6647 (build-system python-build-system)
6648 (arguments
6649 `(#:phases
6650 (modify-phases %standard-phases
6651 (replace 'check
6652 (lambda _
6653 (zero? (system* "python" "run-tests.py")))))))
6654 (native-inputs
6655 `(("python-nose" ,python-nose)
6656 ("python-pyyaml" ,python-pyyaml)))
6657 (home-page "https://pythonhosted.org/Markdown/")
6658 (synopsis "Python implementation of Markdown")
6659 (description
6660 "This package provides a Python implementation of John Gruber's
6661 Markdown. The library features international input, various Markdown
6662 extensions, and several HTML output formats. A command line wrapper
6663 markdown_py is also provided to convert Markdown files to HTML.")
6664 (license license:bsd-3)))
6665
6666 (define-public python2-markdown
6667 (package-with-python2 python-markdown))
6668
6669 (define-public python-ptyprocess
6670 (package
6671 (name "python-ptyprocess")
6672 (version "0.5.1")
6673 (source
6674 (origin
6675 (method url-fetch)
6676 (uri (string-append
6677 "https://pypi.python.org/packages/source/p/ptyprocess/ptyprocess-"
6678 version ".tar.gz"))
6679 (sha256
6680 (base32
6681 "19l1xrjn4l9gjz01s3vg92gn2dd9d8mw1v86ppkzlnr9m5iwwc05"))))
6682 (build-system python-build-system)
6683 (native-inputs
6684 `(("python-nose" ,python-nose)))
6685 (arguments
6686 `(#:phases
6687 (modify-phases %standard-phases
6688 (replace 'check
6689 (lambda _
6690 (zero? (system* "nosetests")))))))
6691 (home-page "https://github.com/pexpect/ptyprocess")
6692 (synopsis "Run a subprocess in a pseudo terminal")
6693 (description
6694 "This package provides a Python library used to launch a subprocess in a
6695 pseudo terminal (pty), and interact with both the process and its pty.")
6696 (license license:isc)))
6697
6698 (define-public python2-ptyprocess
6699 (package-with-python2 python-ptyprocess))
6700
6701 (define-public python-cram
6702 (package
6703 (name "python-cram")
6704 (version "0.7")
6705 (home-page "https://bitheap.org/cram/")
6706 (source (origin
6707 (method url-fetch)
6708 (uri (list (string-append home-page "cram-"
6709 version ".tar.gz")
6710 (pypi-uri "cram" version)))
6711 (sha256
6712 (base32
6713 "0bvz6fwdi55rkrz3f50zsy35gvvwhlppki2yml5bj5ffy9d499vx"))))
6714 (arguments
6715 '(#:phases
6716 (modify-phases %standard-phases
6717 (add-after 'unpack 'patch-source
6718 (lambda _
6719 (substitute* (find-files "cram" ".*\\.py$")
6720 ;; Replace default shell path.
6721 (("/bin/sh") (which "sh")))
6722 (substitute* (find-files "tests" ".*\\.t$")
6723 (("md5") "md5sum")
6724 (("/bin/bash") (which "bash"))
6725 (("/bin/sh") (which "sh")))
6726 (substitute* "cram/_test.py"
6727 ;; This hack works around a bug triggered by substituting
6728 ;; the /bin/sh paths. "tests/usage.t" compares the output of
6729 ;; "cram -h", which breaks the output at 80 characters. This
6730 ;; causes the line showing the default shell to break into two
6731 ;; lines, but the test expects a single line...
6732 (("env\\['COLUMNS'\\] = '80'")
6733 "env['COLUMNS'] = '160'"))
6734 #t))
6735 (delete 'check)
6736 (add-after 'install 'check
6737 ;; The test phase uses the built library and executable.
6738 ;; It's easier to run it after install since the build
6739 ;; directory contains version-specific PATH.
6740 (lambda* (#:key inputs outputs #:allow-other-keys)
6741 (add-installed-pythonpath inputs outputs)
6742 (setenv "PATH" (string-append (getenv "PATH") ":"
6743 (assoc-ref outputs "out") "/bin"))
6744 (zero? (system* "make" "test")))))))
6745 (build-system python-build-system)
6746 (native-inputs
6747 `(("python-coverage" ,python-coverage)
6748 ("which" ,which)))
6749 (synopsis "Simple testing framework for command line applications")
6750 (description
6751 "Cram is a functional testing framework for command line applications.
6752 Cram tests look like snippets of interactive shell sessions. Cram runs each
6753 command and compares the command output in the test with the command’s actual
6754 output.")
6755 (license license:gpl2+)))
6756
6757 (define-public python2-cram
6758 (package-with-python2 python-cram))
6759
6760 (define-public python-terminado
6761 (package
6762 (name "python-terminado")
6763 (version "0.6")
6764 (source
6765 (origin
6766 (method url-fetch)
6767 (uri (pypi-uri "terminado" version))
6768 (sha256
6769 (base32
6770 "09h1kwi86g5mrk14s4pgbhshd602zry29lnpxamcqz864kva22rc"))))
6771 (build-system python-build-system)
6772 (propagated-inputs
6773 `(("python-tornado" ,python-tornado)
6774 ("python-ptyprocess" ,python-ptyprocess)))
6775 (native-inputs
6776 `(("python-nose" ,python-nose)))
6777 (arguments
6778 `(#:phases
6779 (modify-phases %standard-phases
6780 (replace 'check
6781 (lambda _
6782 (zero? (system* "nosetests")))))))
6783 (home-page "https://github.com/takluyver/terminado")
6784 (synopsis "Terminals served to term.js using Tornado websockets")
6785 (description "This package provides a Tornado websocket backend for the
6786 term.js Javascript terminal emulator library.")
6787 (license license:bsd-2)
6788 (properties `((python2-variant . ,(delay python2-terminado))))))
6789
6790 (define-public python2-terminado
6791 (let ((terminado (package-with-python2 (strip-python2-variant python-terminado))))
6792 (package (inherit terminado)
6793 (propagated-inputs
6794 `(("python2-backport-ssl-match-hostname"
6795 ,python2-backport-ssl-match-hostname)
6796 ,@(package-propagated-inputs terminado))))))
6797
6798 (define-public python-straight-plugin
6799 (package
6800 (name "python-straight-plugin")
6801 (version "1.4.1")
6802 (source
6803 (origin
6804 (method url-fetch)
6805 (uri (pypi-uri "straight.plugin" version))
6806 (sha256
6807 (base32
6808 "069pjll4383p4kkgvcc40hgyvf79j2wdbpgwz77yigzxksh1gj62"))))
6809 (build-system python-build-system)
6810 (home-page "https://github.com/ironfroggy/straight.plugin")
6811 (synopsis "Simple namespaced plugin facility")
6812 (description "Straight Plugin provides a type of plugin you can create from
6813 almost any existing Python modules, and an easy way for outside developers to
6814 add functionality and customization to your projects with their own plugins.")
6815 (license license:expat)))
6816
6817 (define-public python2-straight-plugin
6818 (package-with-python2 python-straight-plugin))
6819
6820 (define-public python-fonttools
6821 (package
6822 (name "python-fonttools")
6823 (version "2.5")
6824 (source (origin
6825 (method url-fetch)
6826 (uri (string-append
6827 "https://pypi.python.org/packages/source/F/FontTools/"
6828 "fonttools-" version ".tar.gz"))
6829 (sha256
6830 (base32
6831 "08ay3x4ijarwhl60gqx2i9jzq6pxs20p4snc2d1q5jagh4rn39lb"))))
6832 (build-system python-build-system)
6833 (arguments
6834 '(#:test-target "check"
6835 #:phases
6836 (modify-phases %standard-phases
6837 (add-after 'unpack 'patch-setuppy
6838 ;; Remove the undocumented "extra_path" argument, which adds an
6839 ;; intervening directories between site-packages and the package
6840 ;; directory.
6841 (lambda _
6842 (substitute* "setup.py"
6843 (("^[ \t]*extra_path *= *'FontTools',") ""))
6844 #t)))))
6845 (home-page "https://github.com/behdad/fonttools")
6846 (synopsis "Tools to manipulate font files")
6847 (description
6848 "FontTools/TTX is a library to manipulate font files from Python. It
6849 supports reading and writing of TrueType/OpenType fonts, reading and writing
6850 of AFM files, reading (and partially writing) of PS Type 1 fonts. The package
6851 also contains a tool called “TTX” which converts TrueType/OpenType fonts to and
6852 from an XML-based format.")
6853 (license (license:non-copyleft
6854 "file://LICENSE.txt"
6855 "See LICENSE.txt in the distribution."))))
6856
6857 (define-public python2-fonttools
6858 (package-with-python2 python-fonttools))
6859
6860 (define-public python-ly
6861 (package
6862 (name "python-ly")
6863 (version "0.9.4")
6864 (source
6865 (origin
6866 (method url-fetch)
6867 (uri (string-append "https://pypi.python.org/packages/57/4f/"
6868 "889579244947368f28eda66b782331b1e75f83fd72e63f9ece93cd7a18f9"
6869 "/python-ly-" version ".tar.gz"))
6870 (sha256
6871 (base32
6872 "0g6n288l83sfwavxh1aryi0aqvsr3sp7v6f903mckwqa4scpky62"))))
6873 (build-system python-build-system)
6874 (arguments
6875 ;; FIXME: Some tests need network access.
6876 '(#:tests? #f))
6877 (synopsis "Tool and library for manipulating LilyPond files")
6878 (description "This package provides a Python library to parse, manipulate
6879 or create documents in LilyPond format. A command line program ly is also
6880 provided that can be used to do various manipulations with LilyPond files.")
6881 (home-page "https://pypi.python.org/pypi/python-ly")
6882 (license license:gpl2+)))
6883
6884 (define-public python-appdirs
6885 (package
6886 (name "python-appdirs")
6887 (version "1.4.3")
6888 (source
6889 (origin
6890 (method url-fetch)
6891 (uri (pypi-uri "appdirs" version))
6892 (sha256
6893 (base32
6894 "14id6wxi12lgyw0mg3bcfnf888ad07jz9yj46gfzhn186z8rcn4y"))))
6895 (build-system python-build-system)
6896 (home-page "https://github.com/ActiveState/appdirs")
6897 (synopsis
6898 "Determine platform-specific dirs, e.g. a \"user data dir\"")
6899 (description
6900 "This module provides a portable way of finding out where user data
6901 should be stored on various operating systems.")
6902 (license license:expat)))
6903
6904 (define-public python2-appdirs
6905 (package-with-python2 python-appdirs))
6906
6907 (define-public python-llfuse
6908 (package
6909 (name "python-llfuse")
6910 (version "1.2")
6911 (source (origin
6912 (method url-fetch)
6913 (uri (string-append
6914 "https://bitbucket.org/nikratio/python-llfuse/downloads/"
6915 "llfuse-" version ".tar.bz2"))
6916 (sha256
6917 (base32
6918 "11hms1x68bf1bqbqy7w3wpffqsd3jkgricmzrc1hrnwkswfzzlr4"))))
6919 (build-system python-build-system)
6920 (inputs
6921 `(("fuse" ,fuse)
6922 ("attr" ,attr)))
6923 (native-inputs
6924 `(("pkg-config" ,pkg-config)))
6925 (synopsis "Python bindings for FUSE")
6926 (description
6927 "Python-LLFUSE is a set of Python bindings for the low level FUSE API.")
6928 (home-page "https://bitbucket.org/nikratio/python-llfuse/")
6929 (license license:lgpl2.0+)
6930 (properties `((python2-variant . ,(delay python2-llfuse))))))
6931
6932 (define-public python2-llfuse
6933 (package (inherit (package-with-python2
6934 (strip-python2-variant python-llfuse)))
6935 (propagated-inputs `(("python2-contextlib2" ,python2-contextlib2)))))
6936
6937 ;; For attic-0.16
6938 (define-public python-llfuse-0.41
6939 (package (inherit python-llfuse)
6940 (version "0.41.1")
6941 (source (origin
6942 (method url-fetch)
6943 (uri (string-append
6944 "https://bitbucket.org/nikratio/python-llfuse/downloads/"
6945 "llfuse-" version ".tar.bz2"))
6946 (sha256
6947 (base32
6948 "1imlqw9b73086y97izr036f58pgc5akv4ihc2rrf8j5h75jbrlaa"))))
6949 ;; Python-LLFUSE < 0.42 includes underscore.js, which is MIT (expat)
6950 ;; licensed. The rest of the package is licensed under LGPL2.0 or later.
6951 (license (list license:expat license:lgpl2.0+))))
6952
6953 (define-public python-msgpack
6954 (package
6955 (name "python-msgpack")
6956 (version "0.4.8")
6957 (source (origin
6958 (method url-fetch)
6959 (uri (pypi-uri "msgpack-python" version))
6960 (sha256
6961 (base32
6962 "11pqk5braa6wndpnr1dhg64js82vjgxnm0lzy73rwl831zgijaqs"))))
6963 (build-system python-build-system)
6964 (synopsis "MessagePack (de)serializer")
6965 (description "MessagePack is a fast, compact binary serialization format,
6966 suitable for similar data to JSON. This package provides CPython bindings for
6967 reading and writing MessagePack data.")
6968 (home-page "https://pypi.python.org/pypi/msgpack-python/")
6969 (license license:asl2.0)))
6970
6971 (define-public python2-msgpack
6972 (package-with-python2 python-msgpack))
6973
6974 (define-public python-netaddr
6975 (package
6976 (name "python-netaddr")
6977 (version "0.7.18")
6978 (source
6979 (origin
6980 (method url-fetch)
6981 (uri (string-append
6982 "https://pypi.python.org/packages/source/n/netaddr/netaddr-"
6983 version
6984 ".tar.gz"))
6985 (sha256
6986 (base32
6987 "06dxjlbcicq7q3vqy8agq11ra01kvvd47j4mk6dmghjsyzyckxd1"))))
6988 (build-system python-build-system)
6989 (arguments `(#:tests? #f)) ;; No tests.
6990 (home-page "https://github.com/drkjam/netaddr/")
6991 (synopsis "Pythonic manipulation of network addresses")
6992 (description
6993 "A Python library for representing and manipulating IPv4, IPv6, CIDR, EUI
6994 and MAC network addresses.")
6995 (license license:bsd-3)))
6996
6997 (define-public python2-netaddr
6998 (package-with-python2 python-netaddr))
6999
7000 (define-public python-wrapt
7001 (package
7002 (name "python-wrapt")
7003 (version "1.10.8")
7004 (source
7005 (origin
7006 (method url-fetch)
7007 (uri (pypi-uri "wrapt" version))
7008 (sha256
7009 (base32
7010 "0wrcm1mydvfivbkzz0h81ygzdchnscshi6xvy5n3r21r9s0px8af"))))
7011 (build-system python-build-system)
7012 (arguments
7013 ;; Tests are not included in the tarball, they are only available in the
7014 ;; git repository.
7015 `(#:tests? #f))
7016 (home-page "https://github.com/GrahamDumpleton/wrapt")
7017 (synopsis "Module for decorators, wrappers and monkey patching")
7018 (description
7019 "The aim of the wrapt module is to provide a transparent object proxy for
7020 Python, which can be used as the basis for the construction of function
7021 wrappers and decorator functions.")
7022 (license license:bsd-2)))
7023
7024 (define-public python2-wrapt
7025 (package-with-python2 python-wrapt))
7026
7027 (define-public python-iso8601
7028 (package
7029 (name "python-iso8601")
7030 (version "0.1.11")
7031 (source
7032 (origin
7033 (method url-fetch)
7034 (uri (pypi-uri "iso8601" version))
7035 (sha256
7036 (base32
7037 "0c7gh3lsdjds262h0v1sqc66l7hqgfwbakn96qrhdbl0i3vm5yz8"))))
7038 (build-system python-build-system)
7039 (native-inputs
7040 `(("python-pytest" ,python-pytest)))
7041 (home-page "https://bitbucket.org/micktwomey/pyiso8601")
7042 (synopsis "Module to parse ISO 8601 dates")
7043 (description
7044 "This module parses the most common forms of ISO 8601 date strings (e.g.
7045 @code{2007-01-14T20:34:22+00:00}) into @code{datetime} objects.")
7046 (license license:expat)))
7047
7048 (define-public python2-iso8601
7049 (package-with-python2 python-iso8601))
7050
7051 (define-public python-monotonic
7052 (package
7053 (name "python-monotonic")
7054 (version "0.3")
7055 (source
7056 (origin
7057 (method url-fetch)
7058 (uri (string-append
7059 "https://pypi.python.org/packages/source/m/monotonic/monotonic-"
7060 version
7061 ".tar.gz"))
7062 (sha256
7063 (base32
7064 "0yz0bcbwx8r2c01czzfpbrxddynxyk9k95jj8h6sgcb7xmfvl998"))))
7065 (build-system python-build-system)
7066 (home-page "https://github.com/atdt/monotonic")
7067 (synopsis "Implementation of time.monotonic() for Python 2 & < 3.3")
7068 (description
7069 "This module provides a monotonic() function which returns the value (in
7070 fractional seconds) of a clock which never goes backwards.")
7071 (license license:asl2.0)))
7072
7073 (define-public python2-monotonic
7074 (package-with-python2 python-monotonic))
7075
7076 (define-public python-webob
7077 (package
7078 (name "python-webob")
7079 (version "1.5.1")
7080 (source
7081 (origin
7082 (method url-fetch)
7083 (uri (pypi-uri "WebOb" version))
7084 (sha256
7085 (base32
7086 "02bhhzijfhv8hmi1i54d4b0v43liwhnywhflvxsv4x3zax9s3afq"))))
7087 (build-system python-build-system)
7088 (native-inputs
7089 `(("python-nose" ,python-nose)))
7090 (home-page "http://webob.org/")
7091 (synopsis "WSGI request and response object")
7092 (description
7093 "WebOb provides wrappers around the WSGI request environment, and an
7094 object to help create WSGI responses.")
7095 (license license:expat)))
7096
7097 (define-public python2-webob
7098 (package-with-python2 python-webob))
7099
7100 (define-public python-xlrd
7101 (package
7102 (name "python-xlrd")
7103 (version "1.0.0")
7104 (source (origin
7105 (method url-fetch)
7106 (uri (pypi-uri "xlrd" version))
7107 (sha256
7108 (base32
7109 "0s8hjiz01vbhy85xalrz0qlsmd9ypf36zjqrf97hh984spapvy0g"))))
7110 (build-system python-build-system)
7111 (arguments
7112 `(#:phases
7113 (modify-phases %standard-phases
7114 ;; Current test in setup.py does not work as of 1.0.0, so use nose to
7115 ;; run tests instead for now.
7116 (replace 'check (lambda _ (zero? (system* "nosetests")))))))
7117 (native-inputs `(("python-nose" ,python-nose)))
7118 (home-page "http://www.python-excel.org/")
7119 (synopsis "Library for extracting data from Excel files")
7120 (description "This packages provides a library to extract data from
7121 spreadsheets using Microsoft Excel proprietary file formats @samp{.xls} and
7122 @samp{.xlsx} (versions 2.0 onwards). It has support for Excel dates and is
7123 Unicode-aware. It is not intended as an end-user tool.")
7124 (license license:bsd-3)))
7125
7126 (define-public python2-xlrd
7127 (package-with-python2 python-xlrd))
7128
7129 (define-public python-prettytable
7130 (package
7131 (name "python-prettytable")
7132 (version "0.7.2")
7133 (source
7134 (origin
7135 (method url-fetch)
7136 (uri (string-append
7137 "https://pypi.python.org/packages/source/P/PrettyTable/"
7138 "prettytable-" version ".tar.bz2"))
7139 (sha256
7140 (base32
7141 "0diwsicwmiq2cpzpxri7cyl5fmsvicafw6nfqf6p6p322dji2g45"))))
7142 (build-system python-build-system)
7143 (home-page "http://code.google.com/p/prettytable/")
7144 (synopsis "Display tabular data in an ASCII table format")
7145 (description
7146 "A library designed to represent tabular data in visually appealing ASCII
7147 tables. PrettyTable allows for selection of which columns are to be printed,
7148 independent alignment of columns (left or right justified or centred) and
7149 printing of sub-tables by specifying a row range.")
7150 (license license:bsd-3)))
7151
7152 (define-public python2-prettytable
7153 (package-with-python2 python-prettytable))
7154
7155 (define-public python-tables
7156 (package
7157 (name "python-tables")
7158 (version "3.2.2")
7159 (source
7160 (origin
7161 (method url-fetch)
7162 (uri (pypi-uri "tables" version))
7163 (sha256
7164 (base32
7165 "117s6w7s3yxafpmf3zz3svana7xfrsviw01va1xp7h8ylx8v6r1m"))
7166 (modules '((guix build utils)))
7167 (snippet
7168 '(begin
7169 ;; Remove pre-compiled .pyc files from source.
7170 (for-each delete-file-recursively
7171 (find-files "." "__pycache__" #:directories? #t))
7172 (for-each delete-file (find-files "." "\\.pyc$"))
7173 #t))))
7174 (build-system python-build-system)
7175 (arguments
7176 `(;; FIXME: python-build-system does not pass configure-flags to "build"
7177 ;; or "check", so we must override the build and check phases.
7178 #:phases
7179 (modify-phases %standard-phases
7180 (add-after 'unpack 'use-gcc
7181 (lambda _
7182 (substitute* "setup.py"
7183 (("compiler = new_compiler\\(\\)" line)
7184 (string-append line
7185 "\ncompiler.set_executables(compiler='gcc',"
7186 "compiler_so='gcc',"
7187 "linker_exe='gcc',"
7188 "linker_so='gcc -shared')")))
7189 #t))
7190 (replace 'build
7191 (lambda* (#:key inputs #:allow-other-keys)
7192 (zero? (system* "python" "setup.py" "build"
7193 (string-append "--hdf5="
7194 (assoc-ref inputs "hdf5"))))))
7195 (replace 'check
7196 (lambda* (#:key inputs #:allow-other-keys)
7197 (zero? (system* "python" "setup.py" "check"
7198 (string-append "--hdf5="
7199 (assoc-ref inputs "hdf5")))))))))
7200 (propagated-inputs
7201 `(("python-numexpr" ,python-numexpr)
7202 ("python-numpy" ,python-numpy)))
7203 (native-inputs
7204 `(("python-cython" ,python-cython)
7205 ("pkg-config" ,pkg-config)))
7206 (inputs
7207 `(("hdf5" ,hdf5)
7208 ("bzip2" ,bzip2)
7209 ("zlib" ,zlib)))
7210 (home-page "http://www.pytables.org/")
7211 (synopsis "Hierarchical datasets for Python")
7212 (description "PyTables is a package for managing hierarchical datasets and
7213 designed to efficiently cope with extremely large amounts of data.")
7214 (license license:bsd-3)))
7215
7216 (define-public python2-tables
7217 (package-with-python2 python-tables))
7218
7219 (define-public python-pyasn1
7220 (package
7221 (name "python-pyasn1")
7222 (version "0.2.3")
7223 (source
7224 (origin
7225 (method url-fetch)
7226 (uri (pypi-uri "pyasn1" version))
7227 (sha256
7228 (base32
7229 "1b86yx23c1x74clai05a5ma8c8nfmhlx3j1mxq0ff657i2ylx33k"))))
7230 (build-system python-build-system)
7231 (home-page "http://pyasn1.sourceforge.net/")
7232 (synopsis "ASN.1 types and codecs")
7233 (description
7234 "This is an implementation of ASN.1 types and codecs in Python. It is
7235 suitable for a wide range of protocols based on the ASN.1 specification.")
7236 (license license:bsd-2)))
7237
7238 (define-public python2-pyasn1
7239 (package-with-python2 python-pyasn1))
7240
7241 (define-public python-pyasn1-modules
7242 (package
7243 (name "python-pyasn1-modules")
7244 (version "0.0.8")
7245 (source
7246 (origin
7247 (method url-fetch)
7248 (uri (pypi-uri "pyasn1-modules" version))
7249 (sha256
7250 (base32
7251 "0drqgw81xd3fxdlg89kgd79zzrabvfncvkbybi2wr6w2y4s1jmhh"))))
7252 (build-system python-build-system)
7253 (propagated-inputs
7254 `(("python-pyasn1" ,python-pyasn1)))
7255 (home-page "https://sourceforge.net/projects/pyasn1/")
7256 (synopsis "ASN.1 codec implementations")
7257 (description
7258 "Pyasn1-modules is a collection of Python modules providing ASN.1 types and
7259 implementations of ASN.1-based codecs and protocols.")
7260 (license license:bsd-3)))
7261
7262 (define-public python2-pyasn1-modules
7263 (package-with-python2 python-pyasn1-modules))
7264
7265 (define-public python-ipaddress
7266 (package
7267 (name "python-ipaddress")
7268 (version "1.0.18")
7269 (source (origin
7270 (method url-fetch)
7271 (uri (pypi-uri "ipaddress" version))
7272 (sha256
7273 (base32
7274 "1q8klj9d84cmxgz66073x1j35cplr3r77vx1znhxiwl5w74391ax"))))
7275 (build-system python-build-system)
7276 (home-page "https://github.com/phihag/ipaddress")
7277 (synopsis "IP address manipulation library")
7278 (description
7279 "This package provides a fast, lightweight IPv4/IPv6 manipulation library
7280 in Python. This library is used to create, poke at, and manipulate IPv4 and
7281 IPv6 addresses and networks. This is a port of the Python 3.3 ipaddress
7282 module to older versions of Python.")
7283 (license license:psfl)))
7284
7285 (define-public python2-ipaddress
7286 (package-with-python2 python-ipaddress))
7287
7288 (define-public python2-ipaddr
7289 (package
7290 (name "python2-ipaddr")
7291 (version "2.1.11")
7292 (source
7293 (origin
7294 (method url-fetch)
7295 (uri (pypi-uri "ipaddr" version))
7296 (sha256
7297 (base32 "1dwq3ngsapjc93fw61rp17fvzggmab5x1drjzvd4y4q0i255nm8v"))))
7298 (build-system python-build-system)
7299 (arguments
7300 `(#:python ,python-2 ;version 2 only
7301 #:phases
7302 (modify-phases %standard-phases
7303 (replace 'check
7304 (lambda* _
7305 (zero? (system* "python" "ipaddr_test.py")))))))
7306 (home-page "https://github.com/google/ipaddr-py")
7307 (synopsis "IP address manipulation library")
7308 (description
7309 "Ipaddr is a Python@tie{}2 library for creating and manupilating IPv4 and
7310 IPv6 addresses and networks.
7311
7312 For new implementations you may prefer to use the standard module
7313 @code{ipaddress}, which was introduced in Python 3.3 and backported to older
7314 versions of Python.")
7315 (license license:asl2.0)))
7316
7317 (define-public python-idna
7318 (package
7319 (name "python-idna")
7320 (version "2.5")
7321 (source
7322 (origin
7323 (method url-fetch)
7324 (uri (pypi-uri "idna" version))
7325 (sha256
7326 (base32
7327 "1ara12a7k2zc69msa0arrvw00gn61a6i6by01xb3lkkc0h4cxd9w"))))
7328 (build-system python-build-system)
7329 (home-page "https://github.com/kjd/idna")
7330 (synopsis "Internationalized domain names in applications")
7331 (description
7332 "This is a library to support the Internationalised Domain Names in
7333 Applications (IDNA) protocol as specified in RFC 5891. This version of the
7334 protocol is often referred to as “IDNA2008” and can produce different results
7335 from the earlier standard from 2003. The library is also intended to act as a
7336 suitable drop-in replacement for the “encodings.idna” module that comes with
7337 the Python standard library but currently only supports the older 2003
7338 specification.")
7339 (license license:bsd-4)))
7340
7341 (define-public python2-idna
7342 (package-with-python2 python-idna))
7343
7344 (define-public python-pretend
7345 (package
7346 (name "python-pretend")
7347 (version "1.0.8")
7348 (source
7349 (origin
7350 (method url-fetch)
7351 (uri (string-append "https://pypi.python.org/packages/source/p/"
7352 "pretend/pretend-" version ".tar.gz"))
7353 (sha256
7354 (base32
7355 "0r5r7ygz9m6d2bklflbl84cqhjkc2q12xgis8268ygjh30g2q3wk"))))
7356 (build-system python-build-system)
7357 (home-page "https://github.com/alex/pretend")
7358 (synopsis "Library for stubbing in Python")
7359 (description
7360 "Pretend is a library to make stubbing with Python easier. Stubbing is a
7361 technique for writing tests. You may hear the term mixed up with mocks,
7362 fakes, or doubles. Basically, a stub is an object that returns pre-canned
7363 responses, rather than doing any computation.")
7364 (license license:bsd-3)))
7365
7366 (define-public python2-pretend
7367 (package-with-python2 python-pretend))
7368
7369 (define-public python-cryptography-vectors
7370 (package
7371 (name "python-cryptography-vectors")
7372 (version "1.8.2")
7373 (source
7374 (origin
7375 (method url-fetch)
7376 (uri (pypi-uri "cryptography_vectors" version))
7377 (sha256
7378 (base32
7379 "0hzvq0bfy21bc35p8z7zdxpv3hbvi7adg4axc1b5yd3hk16a1nh0"))))
7380 (build-system python-build-system)
7381 (home-page "https://github.com/pyca/cryptography")
7382 (synopsis "Test vectors for the cryptography package")
7383 (description
7384 "This package contains test vectors for the cryptography package.")
7385 ;; Distributed under either BSD-3 or ASL2.0
7386 (license (list license:bsd-3 license:asl2.0))))
7387
7388 (define-public python2-cryptography-vectors
7389 (package-with-python2 python-cryptography-vectors))
7390
7391 (define-public python-cryptography
7392 (package
7393 (name "python-cryptography")
7394 (version "1.8.2")
7395 (source
7396 (origin
7397 (method url-fetch)
7398 (uri (pypi-uri "cryptography" version))
7399 (sha256
7400 (base32
7401 "1nmy4fw3zy7rlvarkhn33g9905rwpy9z7k5kv8j80f0s6ynfp24f"))))
7402 (build-system python-build-system)
7403 (inputs
7404 `(("openssl" ,openssl)))
7405 (propagated-inputs
7406 `(("python-asn1crypto" ,python-asn1crypto)
7407 ("python-cffi" ,python-cffi)
7408 ("python-six" ,python-six)
7409 ("python-idna" ,python-idna)
7410 ;; Packaging is used to check the version of python-cffi in
7411 ;; 'src/cryptography/hazmat/primitives/ciphers/base.py'. We should be
7412 ;; able to remove this dependency in the next release of cryptography:
7413 ;; python-cryptography:
7414 ;; https://github.com/pyca/cryptography/commit/0417d00d9ff1e19bc3ab67d39bdd18e1674768c1
7415 ("python-packaging" ,python-packaging)
7416 ("python-iso8601" ,python-iso8601)))
7417 (native-inputs
7418 `(("python-cryptography-vectors" ,python-cryptography-vectors)
7419 ("python-hypothesis" ,python-hypothesis)
7420 ("python-pretend" ,python-pretend)
7421 ("python-pytz" ,python-pytz)
7422 ("python-pytest" ,python-pytest-3.0)))
7423 (home-page "https://github.com/pyca/cryptography")
7424 (synopsis "Cryptographic recipes and primitives for Python")
7425 (description
7426 "cryptography is a package which provides cryptographic recipes and
7427 primitives to Python developers. It aims to be the “cryptographic standard
7428 library” for Python. The package includes both high level recipes, and low
7429 level interfaces to common cryptographic algorithms such as symmetric ciphers,
7430 message digests and key derivation functions.")
7431 ;; Distributed under either BSD-3 or ASL2.0
7432 (license (list license:bsd-3 license:asl2.0))
7433 (properties `((python2-variant . ,(delay python2-cryptography))))))
7434
7435 (define-public python2-cryptography
7436 (let ((crypto (package-with-python2
7437 (strip-python2-variant python-cryptography))))
7438 (package (inherit crypto)
7439 (propagated-inputs
7440 `(("python2-ipaddress" ,python2-ipaddress)
7441 ("python2-backport-ssl-match-hostname"
7442 ,python2-backport-ssl-match-hostname)
7443 ("python2-enum34" ,python2-enum34)
7444 ,@(package-propagated-inputs crypto))))))
7445
7446 (define-public python-pyopenssl
7447 (package
7448 (name "python-pyopenssl")
7449 (version "17.0.0")
7450 (source
7451 (origin
7452 (method url-fetch)
7453 (uri (pypi-uri "pyOpenSSL" version))
7454 (sha256
7455 (base32
7456 "1pdg1gpmkzj8yasg6cmkhcivxcdp4c12nif88y4qvsxq5ffzxas8"))
7457 (patches
7458 (search-patches "python-pyopenssl-skip-network-test.patch"))))
7459 (build-system python-build-system)
7460 (arguments
7461 '(#:phases
7462 (modify-phases %standard-phases
7463 (delete 'check)
7464 (add-after 'install 'check
7465 (lambda* (#:key inputs outputs #:allow-other-keys)
7466 (add-installed-pythonpath inputs outputs)
7467 (zero? (system* "py.test" "-v")))))))
7468 (propagated-inputs
7469 `(("python-cryptography" ,python-cryptography)
7470 ("python-six" ,python-six)))
7471 (inputs
7472 `(("openssl" ,openssl)))
7473 (native-inputs
7474 `(("python-pytest" ,python-pytest-3.0)))
7475 (home-page "https://github.com/pyca/pyopenssl")
7476 (synopsis "Python wrapper module around the OpenSSL library")
7477 (description
7478 "PyOpenSSL is a high-level wrapper around a subset of the OpenSSL
7479 library.")
7480 (license license:asl2.0)))
7481
7482 (define-public python2-pyopenssl
7483 (package-with-python2 python-pyopenssl))
7484
7485 (define-public python-pip
7486 (package
7487 (name "python-pip")
7488 (version "9.0.1")
7489 (source
7490 (origin
7491 (method url-fetch)
7492 (uri (pypi-uri "pip" version))
7493 (sha256
7494 (base32
7495 "03clr9c1dih5n9c00c592zzvf6r1ffimywkaq9agcqdllzhl7wh9"))))
7496 (build-system python-build-system)
7497 (arguments
7498 '(#:tests? #f)) ; there are no tests in the pypi archive.
7499 (home-page "https://pip.pypa.io/")
7500 (synopsis "Package manager for Python software")
7501 (description
7502 "Pip is a package manager for Python software, that finds packages on the
7503 Python Package Index (PyPI).")
7504 (license license:expat)))
7505
7506 (define-public python2-pip
7507 (package-with-python2 python-pip))
7508
7509 (define-public python-tlsh
7510 (package
7511 (name "python-tlsh")
7512 (version "3.4.4")
7513 (home-page "https://github.com/trendmicro/tlsh")
7514 (source (origin
7515 (method url-fetch)
7516 (uri (string-append "https://github.com/trendmicro/tlsh/archive/v"
7517 version ".tar.gz"))
7518 (sha256
7519 (base32
7520 "00bhzjqrlh7v538kbkbn8lgx976j1138al3sdhklaizqjvpwyk4r"))
7521 (file-name (string-append name "-" version ".tar.gz"))))
7522 (build-system cmake-build-system)
7523 (arguments
7524 '(#:out-of-source? #f
7525 #:phases (modify-phases %standard-phases
7526 (replace
7527 'install
7528 (lambda* (#:key outputs #:allow-other-keys)
7529 ;; Build and install the Python bindings. The underlying
7530 ;; C++ library is apparently not meant to be installed.
7531 (let ((out (assoc-ref outputs "out")))
7532 (with-directory-excursion "py_ext"
7533 (and (system* "python" "setup.py" "build")
7534 (system* "python" "setup.py" "install"
7535 (string-append "--prefix=" out))))))))))
7536 (inputs `(("python" ,python-wrapper))) ;for the bindings
7537 (synopsis "Fuzzy matching library for Python")
7538 (description
7539 "Trend Micro Locality Sensitive Hash (TLSH) is a fuzzy matching library.
7540 Given a byte stream with a minimum length of 256 bytes, TLSH generates a hash
7541 value which can be used for similarity comparisons. Similar objects have
7542 similar hash values, which allows for the detection of similar objects by
7543 comparing their hash values. The byte stream should have a sufficient amount
7544 of complexity; for example, a byte stream of identical bytes will not generate
7545 a hash value.")
7546 (license license:asl2.0)))
7547
7548 (define-public python2-tlsh
7549 (package
7550 (inherit python-tlsh)
7551 (name "python2-tlsh")
7552 (inputs `(("python" ,python-2)))))
7553
7554 (define-public python-termcolor
7555 (package
7556 (name "python-termcolor")
7557 (version "1.1.0")
7558 (source
7559 (origin
7560 (method url-fetch)
7561 (uri (pypi-uri "termcolor" version))
7562 (sha256
7563 (base32
7564 "0fv1vq14rpqwgazxg4981904lfyp84mnammw7y046491cv76jv8x"))))
7565 (build-system python-build-system)
7566 (arguments
7567 ;; There are no tests.
7568 `(#:tests? #f))
7569 (home-page "http://pypi.python.org/pypi/termcolor")
7570 (synopsis "ANSII Color formatting for terminal output")
7571 (description
7572 "This package provides ANSII Color formatting for output in terminals.")
7573 (license license:expat)))
7574
7575 (define-public python2-termcolor
7576 (package-with-python2 python-termcolor))
7577
7578 (define-public python-libarchive-c
7579 (package
7580 (name "python-libarchive-c")
7581 (version "2.2")
7582 (source (origin
7583 (method url-fetch)
7584 (uri (pypi-uri "libarchive-c" version))
7585 (sha256
7586 (base32
7587 "0z4r7v3dhd6b3120mav05ff08srih176r2rg5k8kn7mjd9pslm2x"))))
7588 (build-system python-build-system)
7589 (arguments
7590 '(#:phases (modify-phases %standard-phases
7591 (add-before
7592 'build 'reference-libarchive
7593 (lambda* (#:key inputs #:allow-other-keys)
7594 ;; Retain the absolute file name of libarchive.so.
7595 (let ((libarchive (assoc-ref inputs "libarchive")))
7596 (substitute* "libarchive/ffi.py"
7597 (("find_library\\('archive'\\)")
7598 (string-append "'" libarchive
7599 "/lib/libarchive.so'")))))))))
7600 (inputs
7601 `(("libarchive" ,libarchive)))
7602 (home-page "https://github.com/Changaco/python-libarchive-c")
7603 (synopsis "Python interface to libarchive")
7604 (description
7605 "This package provides Python bindings to libarchive, a C library to
7606 access possibly compressed archives in many different formats. It uses
7607 Python's @code{ctypes} foreign function interface (FFI).")
7608 (license license:lgpl2.0+)))
7609
7610 (define-public python2-libarchive-c
7611 (package-with-python2 python-libarchive-c))
7612
7613 (define-public python-file
7614 (package
7615 (inherit file)
7616 (name "python-file")
7617 (build-system python-build-system)
7618 (arguments
7619 '(#:tests? #f ;no tests
7620 #:configure-flags '("--single-version-externally-managed" "--root=/")
7621 #:phases (modify-phases %standard-phases
7622 (add-before 'build 'change-directory
7623 (lambda _
7624 (chdir "python")
7625 #t))
7626 (add-before 'build 'set-library-file-name
7627 (lambda* (#:key inputs #:allow-other-keys)
7628 (let ((file (assoc-ref inputs "file")))
7629 (substitute* "magic.py"
7630 (("find_library\\('magic'\\)")
7631 (string-append "'" file "/lib/libmagic.so'")))
7632 #t))))))
7633 (inputs `(("file" ,file)))
7634 (self-native-input? #f)
7635 (synopsis "Python bindings to the libmagic file type guesser. Note that
7636 this module and the python-magic module both provide a \"magic.py\" file;
7637 these two modules, which are different and were developed separately, both
7638 serve the same purpose: provide Python bindings for libmagic.")))
7639
7640 (define-public python2-file
7641 (package-with-python2 python-file))
7642
7643 (define-public python-debian
7644 (package
7645 (name "python-debian")
7646 (version "0.1.28")
7647 (source
7648 (origin
7649 (method url-fetch)
7650 (uri (pypi-uri name version))
7651 (sha256
7652 (base32
7653 "0i15f0xzx679sd0ldq2sls9pnnps9fv6vhqvnv9dzf4qhma42i0y"))))
7654 (build-system python-build-system)
7655 (propagated-inputs
7656 `(("python-six" ,python-six)))
7657 (home-page "http://packages.debian.org/sid/python-debian")
7658 (synopsis "Debian package related modules")
7659 (description
7660 ;; XXX: Use @enumerate instead of @itemize to work around
7661 ;; <http://bugs.gnu.org/21772>.
7662 "This package provides Python modules that abstract many formats of
7663 Debian-related files, such as:
7664
7665 @enumerate
7666 @item Debtags information;
7667 @item @file{debian/changelog} files;
7668 @item packages files, pdiffs;
7669 @item control files of single or multiple RFC822-style paragraphs---e.g.
7670 @file{debian/control}, @file{.changes}, @file{.dsc};
7671 @item Raw @file{.deb} and @file{.ar} files, with (read-only) access to
7672 contained files and meta-information.
7673 @end enumerate\n")
7674
7675 ;; Modules are either GPLv2+ or GPLv3+.
7676 (license license:gpl3+)))
7677
7678 (define-public python2-debian
7679 (package-with-python2 python-debian))
7680
7681 (define-public python-nbformat
7682 (package
7683 (name "python-nbformat")
7684 (version "4.1.0")
7685 (source
7686 (origin
7687 (method url-fetch)
7688 (uri (pypi-uri "nbformat" version))
7689 (sha256
7690 (base32
7691 "0mq8iki3d4mnx7wy05phss7x98mds4fqydin8lcagidp1knw1xnv"))))
7692 (build-system python-build-system)
7693 (arguments `(#:tests? #f)) ; no test target
7694 (propagated-inputs
7695 `(("python-ipython-genutils" ,python-ipython-genutils)
7696 ("python-jsonschema" ,python-jsonschema)
7697 ("python-jupyter-core" ,python-jupyter-core)
7698 ("python-traitlets" ,python-traitlets)))
7699 (home-page "http://jupyter.org")
7700 (synopsis "Jupyter Notebook format")
7701 (description "This package provides the reference implementation of the
7702 Jupyter Notebook format and Python APIs for working with notebooks.")
7703 (license license:bsd-3)))
7704
7705 (define-public python2-nbformat
7706 (package-with-python2 python-nbformat))
7707
7708 (define-public python-bleach
7709 (package
7710 (name "python-bleach")
7711 (version "1.4.3")
7712 (source
7713 (origin
7714 (method url-fetch)
7715 (uri (pypi-uri "bleach" version))
7716 (sha256
7717 (base32
7718 "0jvg3jxrvnx7xmm9gj262v60ib452xlnwlb0navyp7jsvcd0d4qj"))))
7719 (build-system python-build-system)
7720 (propagated-inputs
7721 `(("python-html5lib" ,python-html5lib-0.9)
7722 ("python-six" ,python-six)))
7723 (native-inputs
7724 `(("python-nose" ,python-nose)))
7725 (home-page "https://github.com/jsocol/bleach")
7726 (synopsis "Whitelist-based HTML-sanitizing tool")
7727 (description "Bleach is an easy whitelist-based HTML-sanitizing tool.")
7728 (license license:asl2.0)))
7729
7730 (define-public python2-bleach
7731 (package-with-python2 python-bleach))
7732
7733 (define-public python-entrypoints
7734 (package
7735 (name "python-entrypoints")
7736 (version "0.2.2")
7737 (source
7738 (origin
7739 (method url-fetch)
7740 (uri (string-append "https://github.com/takluyver/entrypoints/archive/"
7741 version ".tar.gz"))
7742 (file-name (string-append name "-" version ".tar.gz"))
7743 (sha256
7744 (base32
7745 "0azqlkh3j0za080lsf5crnhaxx3c93k9dpv5ihkhf5cppgw5sjz5"))))
7746 (build-system python-build-system)
7747 ;; The package does not come with a setup.py file, so we have to generate
7748 ;; one ourselves.
7749 (arguments
7750 `(#:tests? #f
7751 #:phases
7752 (modify-phases %standard-phases
7753 (add-after 'unpack 'create-setup.py
7754 (lambda _
7755 (call-with-output-file "setup.py"
7756 (lambda (port)
7757 (format port "\
7758 from setuptools import setup
7759 setup(name='entrypoints', version='~a', py_modules=['entrypoints'])
7760 " ,version))))))))
7761 (home-page "https://github.com/takluyver/entrypoints")
7762 (synopsis "Discover and load entry points from installed Python packages")
7763 (description "Entry points are a way for Python packages to advertise
7764 objects with some common interface. The most common examples are
7765 @code{console_scripts} entry points, which define shell commands by
7766 identifying a Python function to run. The @code{entrypoints} module contains
7767 functions to find and load entry points.")
7768 (license license:expat)))
7769
7770 (define-public python2-entrypoints
7771 (package-with-python2 python-entrypoints))
7772
7773 (define-public python-nbconvert
7774 (package
7775 (name "python-nbconvert")
7776 (version "5.0.0b1")
7777 (source
7778 (origin
7779 (method url-fetch)
7780 (uri (pypi-uri "nbconvert" version))
7781 (sha256
7782 (base32
7783 "0brclbb18l4nmd5qy3dl9wn05rjdh1fz4rmzdlfqacj12rcdvdgp"))))
7784 (build-system python-build-system)
7785 (arguments
7786 `(;; The "bdist_egg" target is disabled by default, causing the installation
7787 ;; to fail.
7788 #:configure-flags (list "bdist_egg")
7789 ;; FIXME: 5 failures, 40 errors.
7790 #:tests? #f))
7791 ;; #:phases
7792 ;; (modify-phases %standard-phases
7793 ;; (replace 'check
7794 ;; (lambda _
7795 ;; (zero? (system* "py.test" "-v")))))
7796 (native-inputs
7797 `(("python-pytest" ,python-pytest)))
7798 (propagated-inputs
7799 `(("python-bleach" ,python-bleach)
7800 ("python-entrypoints" ,python-entrypoints)
7801 ("python-jinja2" ,python-jinja2)
7802 ("python-jupyter-core" ,python-jupyter-core)
7803 ("python-mistune" ,python-mistune)
7804 ("python-nbformat" ,python-nbformat)
7805 ("python-pygments" ,python-pygments)
7806 ("python-traitlets" ,python-traitlets)))
7807 (home-page "http://jupyter.org")
7808 (synopsis "Converting Jupyter Notebooks")
7809 (description "The @code{nbconvert} tool, @{jupyter nbconvert}, converts
7810 notebooks to various other formats via Jinja templates. It allows you to
7811 convert an @code{.ipynb} notebook file into various static formats including:
7812
7813 @enumerate
7814 @item HTML
7815 @item LaTeX
7816 @item PDF
7817 @item Reveal JS
7818 @item Markdown (md)
7819 @item ReStructured Text (rst)
7820 @item executable script
7821 @end enumerate\n")
7822 (license license:bsd-3)))
7823
7824 (define-public python2-nbconvert
7825 (package-with-python2 python-nbconvert))
7826
7827 (define-public python-notebook
7828 (package
7829 (name "python-notebook")
7830 (version "4.2.3")
7831 (source (origin
7832 (method url-fetch)
7833 (uri (pypi-uri "notebook" version))
7834 (sha256
7835 (base32
7836 "0laq5c2f21frq6xcdckgq7raqhznbjb0qs0357g612z87wyn1a9r"))))
7837 (build-system python-build-system)
7838 (arguments
7839 `(#:phases
7840 (modify-phases %standard-phases
7841 (replace 'check
7842 (lambda _
7843 ;; HOME must be set for tests
7844 (setenv "HOME" "/tmp")
7845 (zero? (system* "nosetests")))))))
7846 (propagated-inputs
7847 `(("python-jupyter-core" ,python-jupyter-core)
7848 ("python-nbformat" ,python-nbformat)
7849 ("python-nbconvert" ,python-nbconvert)
7850 ("python-ipython" ,python-ipython)))
7851 (native-inputs
7852 `(("python-nose" ,python-nose)
7853 ("python-sphinx" ,python-sphinx)
7854 ("python-requests" ,python-requests)))
7855 (home-page "http://jupyter.org/")
7856 (synopsis "Web-based notebook environment for interactive computing")
7857 (description
7858 "The Jupyter HTML notebook is a web-based notebook environment for
7859 interactive computing.")
7860 (properties `((python2-variant . ,(delay python2-notebook))))
7861 (license license:bsd-3)))
7862
7863 (define-public python2-notebook
7864 (let ((base (package-with-python2
7865 (strip-python2-variant python-notebook))))
7866 (package (inherit base)
7867 (native-inputs
7868 `(("python2-mock" ,python2-mock)
7869 ,@(package-native-inputs base)))
7870 (arguments
7871 (substitute-keyword-arguments (package-arguments base)
7872 ((#:phases phases)
7873 `(modify-phases ,phases
7874 (add-before 'check 'disable-test-case
7875 ;; The test requires network access to localhost. Curiously it
7876 ;; fails with Python 2 only. Simply make the test-case return
7877 ;; immediately.
7878 (lambda _
7879 (substitute*
7880 "notebook/services/nbconvert/tests/test_nbconvert_api.py"
7881 (("formats = self.nbconvert_api") "return #")))))))))))
7882
7883 (define-public python-widgetsnbextension
7884 (package
7885 (name "python-widgetsnbextension")
7886 (version "1.2.6")
7887 (source
7888 (origin
7889 (method url-fetch)
7890 (uri (pypi-uri "widgetsnbextension" version))
7891 (sha256
7892 (base32
7893 "0lff2mrwrgsa1mxmwx3phl9xvy0jqfpg6khbmxy53jbq56rwy666"))))
7894 (build-system python-build-system)
7895 (propagated-inputs
7896 `(("python-notebook" ,python-notebook)))
7897 (native-inputs
7898 `(("python-certifi" ,python-certifi)
7899 ("python-nose" ,python-nose)))
7900 (home-page "http://ipython.org")
7901 (synopsis "IPython HTML widgets for Jupyter")
7902 (description "This package provides interactive HTML widgets for Jupyter
7903 notebooks.")
7904 (license license:bsd-3)))
7905
7906 (define-public python2-widgetsnbextension
7907 (package-with-python2 python-widgetsnbextension))
7908
7909 (define-public python-ipywidgets
7910 (package
7911 (name "python-ipywidgets")
7912 (version "5.2.2")
7913 (source
7914 (origin
7915 (method url-fetch)
7916 (uri (pypi-uri "ipywidgets" version))
7917 (sha256
7918 (base32
7919 "1lk0qrr5l9a0z7qkkn30hv5832whxwxymf1l576fmmad0n7hkxms"))))
7920 (build-system python-build-system)
7921 ;; FIXME: it's not clear how to run the tests.
7922 (arguments `(#:tests? #f))
7923 (propagated-inputs
7924 `(("python-ipykernel" ,python-ipykernel)
7925 ("python-ipython" ,python-ipython)
7926 ("python-traitlets" ,python-traitlets)
7927 ("python-widgetsnbextension" ,python-widgetsnbextension)))
7928 (home-page "http://ipython.org")
7929 (synopsis "IPython HTML widgets for Jupyter")
7930 (description "Ipywidgets are interactive HTML widgets for Jupyter
7931 notebooks and the IPython kernel. Notebooks come alive when interactive
7932 widgets are used. Users gain control of their data and can visualize changes
7933 in the data.")
7934 (license license:bsd-3)))
7935
7936 (define-public python2-ipywidgets
7937 (package-with-python2 python-ipywidgets))
7938
7939 (define-public python-jupyter-console
7940 (package
7941 (name "python-jupyter-console")
7942 (version "5.0.0")
7943 (source
7944 (origin
7945 (method url-fetch)
7946 (uri (pypi-uri "jupyter_console" version))
7947 (sha256
7948 (base32
7949 "04acmkwsi99rcg3vb54c6n492zv35s92h2ahabc0w6wj976cipvx"))))
7950 (build-system python-build-system)
7951 ;; FIXME: it's not clear how to run the tests.
7952 (arguments `(#:tests? #f))
7953 (propagated-inputs
7954 `(("python-ipykernel" ,python-ipykernel)
7955 ("python-ipython" ,python-ipython)
7956 ("python-jupyter-client" ,python-jupyter-client)
7957 ("python-prompt-toolkit" ,python-prompt-toolkit)
7958 ("python-pygments" ,python-pygments)))
7959 (home-page "https://jupyter.org")
7960 (synopsis "Jupyter terminal console")
7961 (description "This package provides a terminal-based console frontend for
7962 Jupyter kernels. It also allows for console-based interaction with non-Python
7963 Jupyter kernels such as IJulia and IRKernel.")
7964 (license license:bsd-3)))
7965
7966 (define-public python2-jupyter-console
7967 (package-with-python2 python-jupyter-console))
7968
7969 (define-public jupyter
7970 (package
7971 (name "jupyter")
7972 (version "1.0.0")
7973 (source
7974 (origin
7975 (method url-fetch)
7976 (uri (pypi-uri "jupyter" version))
7977 (sha256
7978 (base32
7979 "0pwf3pminkzyzgx5kcplvvbvwrrzd3baa7lmh96f647k30rlpp6r"))))
7980 (build-system python-build-system)
7981 ;; FIXME: it's not clear how to run the tests.
7982 (arguments `(#:tests? #f))
7983 (propagated-inputs
7984 `(("python-ipykernel" ,python-ipykernel)
7985 ("python-ipywidgets" ,python-ipywidgets)
7986 ("python-jupyter-console" ,python-jupyter-console)
7987 ("python-nbconvert" ,python-nbconvert)
7988 ("python-notebook" ,python-notebook)))
7989 (home-page "http://jupyter.org")
7990 (synopsis "Web application for interactive documents")
7991 (description
7992 "The Jupyter Notebook is a web application that allows you to create and
7993 share documents that contain live code, equations, visualizations and
7994 explanatory text. Uses include: data cleaning and transformation, numerical
7995 simulation, statistical modeling, machine learning and much more.")
7996 (license license:bsd-3)))
7997
7998 (define-public python-chardet
7999 (package
8000 (name "python-chardet")
8001 (version "2.3.0")
8002 (source
8003 (origin
8004 (method url-fetch)
8005 (uri (string-append
8006 "https://pypi.python.org/packages/source/c/chardet/chardet-"
8007 version
8008 ".tar.gz"))
8009 (sha256
8010 (base32
8011 "1ak87ikcw34fivcgiz2xvi938dmclh078az65l9x3rmgljrkhgp5"))))
8012 (build-system python-build-system)
8013 (home-page "https://github.com/chardet/chardet")
8014 (synopsis "Universal encoding detector for Python 2 and 3")
8015 (description
8016 "This package provides @code{chardet}, a Python module that can
8017 automatically detect a wide range of file encodings.")
8018 (license license:lgpl2.1+)))
8019
8020 (define-public python2-chardet
8021 (package-with-python2 python-chardet))
8022
8023 (define-public python-docopt
8024 (package
8025 (name "python-docopt")
8026 (version "0.6.2")
8027 (source
8028 (origin
8029 (method url-fetch)
8030 ;; The release on PyPI does not include tests.
8031 (uri (string-append
8032 "https://github.com/docopt/docopt/archive/"
8033 version ".tar.gz"))
8034 (file-name (string-append name "-" version ".tar.gz"))
8035 (sha256
8036 (base32
8037 "16bf890xbdz3m30rsv2qacklh2rdn1zrfspfnwzx9g7vwz8yw4r1"))))
8038 (build-system python-build-system)
8039 (native-inputs
8040 `(("python-pytest" ,python-pytest)))
8041 (arguments
8042 `(#:phases (alist-replace
8043 'check
8044 (lambda _ (zero? (system* "py.test")))
8045 %standard-phases)))
8046 (home-page "http://docopt.org")
8047 (synopsis "Command-line interface description language for Python")
8048 (description "This library allows the user to define a command-line
8049 interface from a program's help message rather than specifying it
8050 programatically with command-line parsers like @code{getopt} and
8051 @code{argparse}.")
8052 (license license:expat)))
8053
8054 (define-public python2-docopt
8055 (package-with-python2 python-docopt))
8056
8057 (define-public python-zope-event
8058 (package
8059 (name "python-zope-event")
8060 (version "4.1.0")
8061 (source
8062 (origin
8063 (method url-fetch)
8064 (uri (string-append "https://pypi.python.org/packages/source/z"
8065 "/zope.event/zope.event-" version ".tar.gz"))
8066 (sha256
8067 (base32
8068 "11p75zpfz3ffhz21nzx9wb23xs993ck5s6hkjcvhswwizni5jynw"))))
8069 (build-system python-build-system)
8070 (home-page "http://pypi.python.org/pypi/zope.event")
8071 (synopsis "Event publishing system for Python")
8072 (description "Zope.event provides an event publishing API, intended for
8073 use by applications which are unaware of any subscribers to their events. It
8074 is a simple event-dispatching system on which more sophisticated event
8075 dispatching systems can be built.")
8076 (license license:zpl2.1)))
8077
8078 (define-public python2-zope-event
8079 (package-with-python2 python-zope-event))
8080
8081 (define-public python-zope-interface
8082 (package
8083 (name "python-zope-interface")
8084 (version "4.1.3")
8085 (source
8086 (origin
8087 (method url-fetch)
8088 (uri (string-append "https://pypi.python.org/packages/source/z"
8089 "/zope.interface/zope.interface-" version ".tar.gz"))
8090 (sha256
8091 (base32
8092 "0ks8h73b2g4bkad821qbv0wzjppdrwys33i7ka45ik3wxjg1l8if"))))
8093 (build-system python-build-system)
8094 (native-inputs
8095 `(("python-zope-event" ,python-zope-event)))
8096 (home-page "https://github.com/zopefoundation/zope.interface")
8097 (synopsis "Python implementation of the \"design by contract\"
8098 methodology")
8099 (description "Zope.interface provides an implementation of \"object
8100 interfaces\" for Python. Interfaces are a mechanism for labeling objects as
8101 conforming to a given API or contract.")
8102 (license license:zpl2.1)))
8103
8104 (define-public python2-zope-interface
8105 (package-with-python2 python-zope-interface))
8106
8107 (define-public python-zope-exceptions
8108 (package
8109 (name "python-zope-exceptions")
8110 (version "4.0.8")
8111 (source
8112 (origin
8113 (method url-fetch)
8114 (uri (string-append "https://pypi.python.org/packages/source/z"
8115 "/zope.exceptions/zope.exceptions-"
8116 version ".tar.gz"))
8117 (sha256
8118 (base32
8119 "0zwxaaa66sqxg5k7zcrvs0fbg9ym1njnxnr28dfmchzhwjvwnfzl"))))
8120 (build-system python-build-system)
8121 (arguments
8122 '(#:tests? #f)) ; circular dependency with zope.testrunner
8123 (propagated-inputs
8124 `(("python-zope-interface" ,python-zope-interface)))
8125 (home-page "http://cheeseshop.python.org/pypi/zope.exceptions")
8126 (synopsis "Zope exceptions")
8127 (description "Zope.exceptions provides general-purpose exception types
8128 that have uses outside of the Zope framework.")
8129 (license license:zpl2.1)))
8130
8131 (define-public python2-zope-exceptions
8132 (package-with-python2 python-zope-exceptions))
8133
8134 (define-public python-zope-testing
8135 (package
8136 (name "python-zope-testing")
8137 (version "4.5.0")
8138 (source
8139 (origin
8140 (method url-fetch)
8141 (uri (string-append "https://pypi.python.org/packages/source/z"
8142 "/zope.testing/zope.testing-" version ".tar.gz"))
8143 (sha256
8144 (base32
8145 "1yvglxhzvhl45mndvn9gskx2ph30zz1bz7rrlyfs62fv2pvih90s"))
8146 (modules '((guix build utils)))
8147 (snippet
8148 '(begin
8149 ;; Remove pre-compiled .pyc files backup files from source.
8150 (for-each delete-file (find-files "." "(\\.pyc|~)$"))
8151 #t))))
8152 (build-system python-build-system)
8153 (native-inputs
8154 `(("python-zope-exceptions" ,python-zope-exceptions)))
8155 (propagated-inputs
8156 `(("python-zope-interface" ,python-zope-interface)))
8157 (home-page "http://pypi.python.org/pypi/zope.testing")
8158 (synopsis "Zope testing helpers")
8159 (description "Zope.testing provides a number of testing utilities for HTML
8160 forms, HTTP servers, regular expressions, and more.")
8161 (license license:zpl2.1)))
8162
8163 (define-public python2-zope-testing
8164 (package-with-python2 python-zope-testing))
8165
8166 (define-public python-zope-testrunner
8167 (package
8168 (name "python-zope-testrunner")
8169 (version "4.4.9")
8170 (source
8171 (origin
8172 (method url-fetch)
8173 (uri (string-append "https://pypi.python.org/packages/source/z"
8174 "/zope.testrunner/zope.testrunner-"
8175 version ".zip"))
8176 (sha256
8177 (base32
8178 "1r7iqknhh55y45f64mz5hghgvzx34h1i11k350s0avx6q8gznja1"))))
8179 (build-system python-build-system)
8180 (arguments
8181 '(#:tests? #f)) ; FIXME: Tests can't find zope.interface.
8182 (native-inputs
8183 `(("python-six" ,python-six)
8184 ;("python-zope-interface" ,python-zope-interface)
8185 ("python-zope-exceptions" ,python-zope-exceptions)
8186 ("python-zope-testing" ,python-zope-testing)
8187 ("unzip" ,unzip)))
8188 (propagated-inputs
8189 `(("python-zope-interface" ,python-zope-interface)))
8190 (home-page "http://pypi.python.org/pypi/zope.testrunner")
8191 (synopsis "Zope testrunner script")
8192 (description "Zope.testrunner provides a script for running Python
8193 tests.")
8194 (license license:zpl2.1)))
8195
8196 (define-public python2-zope-testrunner
8197 (let ((base (package-with-python2 python-zope-testrunner)))
8198 (package
8199 (inherit base)
8200 (native-inputs
8201 (append (package-native-inputs base)
8202 `(("python2-subunit" ,python2-subunit)
8203 ("python2-mimeparse" ,python2-mimeparse)))))))
8204
8205 (define-public python-zope-i18nmessageid
8206 (package
8207 (name "python-zope-i18nmessageid")
8208 (version "4.0.3")
8209 (source
8210 (origin
8211 (method url-fetch)
8212 (uri (string-append
8213 "https://pypi.python.org/packages/source/z"
8214 "/zope.i18nmessageid/zope.i18nmessageid-"
8215 version ".tar.gz"))
8216 (sha256
8217 (base32
8218 "1rslyph0klk58dmjjy4j0jxy21k03azksixc3x2xhqbkv97cmzml"))))
8219 (build-system python-build-system)
8220 (home-page "http://pypi.python.org/pypi/zope.i18nmessageid")
8221 (synopsis "Message identifiers for internationalization")
8222 (description "Zope.i18nmessageid provides facilities for declaring
8223 internationalized messages within program source text.")
8224 (license license:zpl2.1)))
8225
8226 (define-public python2-zope-i18nmessageid
8227 (package-with-python2 python-zope-i18nmessageid))
8228
8229 (define-public python-zope-schema
8230 (package
8231 (name "python-zope-schema")
8232 (version "4.4.2")
8233 (source
8234 (origin
8235 (method url-fetch)
8236 (uri (string-append "https://pypi.python.org/packages/source/z"
8237 "/zope.schema/zope.schema-" version ".tar.gz"))
8238 (sha256
8239 (base32
8240 "1p943jdxb587dh7php4vx04qvn7b2877hr4qs5zyckvp5afhhank"))))
8241 (build-system python-build-system)
8242 (arguments
8243 '(#:tests? #f)) ; FIXME: Tests can't find zope.event.
8244 (propagated-inputs
8245 `(("python-zope-event" ,python-zope-event)
8246 ("python-zope-exceptions", python-zope-exceptions)
8247 ("python-zope-interface" ,python-zope-interface)))
8248 (native-inputs
8249 `(("python-zope-testing" ,python-zope-testing)
8250 ("python-coverage" ,python-coverage)
8251 ("python-nose" ,python-nose)))
8252 (home-page "http://pypi.python.org/pypi/zope.schema")
8253 (synopsis "Zope data schemas")
8254 (description "Zope.scheme provides extensions to zope.interface for
8255 defining data schemas.")
8256 (license license:zpl2.1)))
8257
8258 (define-public python2-zope-schema
8259 (package-with-python2 python-zope-schema))
8260
8261 (define-public python-zope-configuration
8262 (package
8263 (name "python-zope-configuration")
8264 (version "4.0.3")
8265 (source (origin
8266 (method url-fetch)
8267 (uri (string-append "https://pypi.python.org/packages/source/z"
8268 "/zope.configuration/zope.configuration-"
8269 version ".tar.gz"))
8270 (sha256
8271 (base32
8272 "1x9dfqypgympnlm25p9m43xh4qv3p7d75vksv9pzqibrb4cggw5n"))))
8273 (build-system python-build-system)
8274 (arguments
8275 '(#:tests? #f)) ; FIXME: Tests can't find zope.interface.
8276 (propagated-inputs
8277 `(("python-zope-i18nmessageid" ,python-zope-i18nmessageid)
8278 ("python-zope-schema" ,python-zope-schema)))
8279 (home-page "http://pypi.python.org/pypi/zope.configuration")
8280 (synopsis "Zope Configuration Markup Language")
8281 (description "Zope.configuration implements ZCML, the Zope Configuration
8282 Markup Language.")
8283 (license license:zpl2.1)))
8284
8285 (define-public python2-zope-configuration
8286 (package-with-python2 python-zope-configuration))
8287
8288 (define-public python-zope-proxy
8289 (package
8290 (name "python-zope-proxy")
8291 (version "4.1.6")
8292 (source
8293 (origin
8294 (method url-fetch)
8295 (uri (string-append "https://pypi.python.org/packages/source/z"
8296 "/zope.proxy/zope.proxy-" version ".tar.gz"))
8297 (sha256
8298 (base32
8299 "0pqwwmvm1prhwv1ziv9lp8iirz7xkwb6n2kyj36p2h0ppyyhjnm4"))))
8300 (build-system python-build-system)
8301 (arguments
8302 '(#:tests? #f)) ; FIXME: Tests can't find zope.interface.
8303 (propagated-inputs
8304 `(("python-zope-interface" ,python-zope-interface)))
8305 (home-page "http://pypi.python.org/pypi/zope.proxy")
8306 (synopsis "Generic, transparent proxies")
8307 (description "Zope.proxy provides generic, transparent proxies for Python.
8308 Proxies are special objects which serve as mostly-transparent wrappers around
8309 another object, intervening in the apparent behavior of the wrapped object
8310 only when necessary to apply the policy (e.g., access checking, location
8311 brokering, etc.) for which the proxy is responsible.")
8312 (license license:zpl2.1)))
8313
8314 (define-public python2-zope-proxy
8315 (package-with-python2 python-zope-proxy))
8316
8317 (define-public python-zope-location
8318 (package
8319 (name "python-zope-location")
8320 (version "4.0.3")
8321 (source
8322 (origin
8323 (method url-fetch)
8324 (uri (string-append "https://pypi.python.org/packages/source/z"
8325 "/zope.location/zope.location-" version ".tar.gz"))
8326 (sha256
8327 (base32
8328 "1nj9da4ksiyv3h8n2vpzwd0pb03mdsh7zy87hfpx72b6p2zcwg74"))))
8329 (build-system python-build-system)
8330 (arguments
8331 '(#:tests? #f)) ; FIXME: Tests can't find zope.interface.
8332 (propagated-inputs
8333 `(("python-zope-proxy" ,python-zope-proxy)
8334 ("python-zope-schema" ,python-zope-schema)))
8335 (home-page "http://pypi.python.org/pypi/zope.location/")
8336 (synopsis "Zope location library")
8337 (description "Zope.location implements the concept of \"locations\" in
8338 Zope3, which are are special objects that have a structural location.")
8339 (license license:zpl2.1)))
8340
8341 (define-public python2-zope-location
8342 (package-with-python2 python-zope-location))
8343
8344 (define-public python-zope-security
8345 (package
8346 (name "python-zope-security")
8347 (version "4.0.3")
8348 (source
8349 (origin
8350 (method url-fetch)
8351 (uri (string-append "https://pypi.python.org/packages/source/z"
8352 "/zope.security/zope.security-" version ".tar.gz"))
8353 (sha256
8354 (base32
8355 "14zmf684amc0x32kq05yxnhfqd1cmyhafkw05gn81rn90zjv6ssy"))))
8356 (build-system python-build-system)
8357 (arguments
8358 '(#:tests? #f)) ; FIXME: Tests can't find zope.testrunner.
8359 (propagated-inputs
8360 `(("python-zope-i18nmessageid" ,python-zope-i18nmessageid)
8361 ("python-zope-proxy" ,python-zope-proxy)
8362 ("python-zope-schema" ,python-zope-schema)))
8363 (native-inputs
8364 `(("python-six" ,python-six)
8365 ("python-zope-component" ,python-zope-component)
8366 ("python-zope-configuration" ,python-zope-configuration)
8367 ("python-zope-location" ,python-zope-location)
8368 ("python-zope-testrunner" ,python-zope-testrunner)
8369 ("python-zope-testing" ,python-zope-testing)))
8370 (home-page "http://pypi.python.org/pypi/zope.security")
8371 (synopsis "Zope security framework")
8372 (description "Zope.security provides a generic mechanism to implement
8373 security policies on Python objects.")
8374 (license license:zpl2.1)))
8375
8376 (define-public python2-zope-security
8377 (let ((zope-security (package-with-python2 python-zope-security)))
8378 (package (inherit zope-security)
8379 (propagated-inputs
8380 `(("python2-zope-testrunner" ,python2-zope-testrunner)
8381 ,@(alist-delete
8382 "python-zope-testrunner"
8383 (package-propagated-inputs zope-security)))))))
8384
8385 (define-public python-zope-component
8386 (package
8387 (name "python-zope-component")
8388 (version "4.3.0")
8389 (source
8390 (origin
8391 (method url-fetch)
8392 (uri (pypi-uri "zope.component" version))
8393 (sha256
8394 (base32
8395 "1hlvzwj1kcfz1qms1dzhwsshpsf38z9clmyksb1gh41n8k3kchdv"))))
8396 (build-system python-build-system)
8397 (arguments
8398 ;; Skip tests due to circular dependency with python-zope-security.
8399 '(#:tests? #f))
8400 (native-inputs
8401 `(("python-zope-testing" ,python-zope-testing)))
8402 (propagated-inputs
8403 `(("python-zope-event" ,python-zope-event)
8404 ("python-zope-interface" ,python-zope-interface)
8405 ("python-zope-i18nmessageid" ,python-zope-i18nmessageid)
8406 ("python-zope-configuration" ,python-zope-configuration)))
8407 (home-page "https://github.com/zopefoundation/zope.component")
8408 (synopsis "Zope Component Architecture")
8409 (description "Zope.component represents the core of the Zope Component
8410 Architecture. Together with the zope.interface package, it provides
8411 facilities for defining, registering and looking up components.")
8412 (license license:zpl2.1)))
8413
8414 (define-public python2-zope-component
8415 (package-with-python2 python-zope-component))
8416
8417 (define-public python-pythondialog
8418 (package
8419 (name "python-pythondialog")
8420 (version "3.4.0")
8421 (source
8422 (origin
8423 (method url-fetch)
8424 (uri (pypi-uri "pythondialog" version))
8425 (sha256
8426 (base32
8427 "1728ghsran47jczn9bhlnkvk5bvqmmbihabgif5h705b84r1272c"))))
8428 (build-system python-build-system)
8429 (arguments
8430 `(#:phases
8431 (modify-phases %standard-phases
8432 (add-after 'unpack 'patch-path
8433 (lambda* (#:key inputs #:allow-other-keys)
8434 (let* ((dialog (assoc-ref inputs "dialog")))
8435 ;; Since this library really wants to grovel the search path, we
8436 ;; must hardcode dialog's store path into it.
8437 (substitute* "dialog.py"
8438 (("os.getenv\\(\"PATH\", \":/bin:/usr/bin\"\\)")
8439 (string-append "os.getenv(\"PATH\") + \":" dialog "/bin\"")))
8440 #t))))
8441 #:tests? #f)) ; no test suite
8442 (propagated-inputs
8443 `(("dialog" ,dialog)))
8444 (home-page "http://pythondialog.sourceforge.net/")
8445 (synopsis "Python interface to the UNIX dialog utility")
8446 (description "A Python wrapper for the dialog utility. Its purpose is to
8447 provide an easy to use, pythonic and comprehensive Python interface to dialog.
8448 This allows one to make simple text-mode user interfaces on Unix-like systems")
8449 (license license:lgpl2.1)
8450 (properties `((python2-variant . ,(delay python2-pythondialog))))))
8451
8452 (define-public python2-pythondialog
8453 (let ((base (package-with-python2 (strip-python2-variant python-pythondialog))))
8454 (package
8455 (inherit base)
8456 (version (package-version python-pythondialog))
8457 (source (origin
8458 (method url-fetch)
8459 (uri (pypi-uri "python2-pythondialog" version))
8460 (sha256
8461 (base32
8462 "0d8k7lxk50imdyx85lv8j98i4c93a71iwpapnl1506rpkbm9qvd9")))))))
8463
8464 (define-public python-pyrfc3339
8465 (package
8466 (name "python-pyrfc3339")
8467 (version "1.0")
8468 (source
8469 (origin
8470 (method url-fetch)
8471 (uri (pypi-uri "pyRFC3339" version))
8472 (sha256
8473 (base32
8474 "0dgm4l9y8jiax5cp6yxjd2i27cq8h33sh81n1wfbmnmqb32cdywd"))))
8475 (build-system python-build-system)
8476 (propagated-inputs
8477 `(("python-pytz" ,python-pytz)))
8478 (native-inputs
8479 `(("python-nose" ,python-nose)))
8480 (home-page "https://github.com/kurtraschke/pyRFC3339")
8481 (synopsis "Python timestamp library")
8482 (description "Python library for generating and parsing RFC 3339-compliant
8483 timestamps.")
8484 (license license:expat)))
8485
8486 (define-public python2-pyrfc3339
8487 (package-with-python2 python-pyrfc3339))
8488
8489 (define-public python-werkzeug
8490 (package
8491 (name "python-werkzeug")
8492 (version "0.11.15")
8493 (source
8494 (origin
8495 (method url-fetch)
8496 (uri (pypi-uri "Werkzeug" version))
8497 (sha256
8498 (base32
8499 "1h5wycw8yj7q0grqsjnsqflmrlsdagvl2j4dsgdncci6mjc7fpa5"))))
8500 (build-system python-build-system)
8501 (native-inputs
8502 `(("python-pytest" ,python-pytest)))
8503 (home-page "http://werkzeug.pocoo.org/")
8504 (synopsis "Utilities for WSGI applications")
8505 (description "One of the most advanced WSGI utility modules. It includes a
8506 powerful debugger, full-featured request and response objects, HTTP utilities to
8507 handle entity tags, cache control headers, HTTP dates, cookie handling, file
8508 uploads, a powerful URL routing system and a bunch of community-contributed
8509 addon modules.")
8510 (license license:x11)))
8511
8512 (define-public python2-werkzeug
8513 (package-with-python2 python-werkzeug))
8514
8515 (define-public python-configobj
8516 (package
8517 (name "python-configobj")
8518 (version "5.0.6")
8519 (source (origin
8520 (method url-fetch)
8521 (uri (string-append
8522 "https://pypi.python.org/packages/source/c/configobj/"
8523 "configobj-" version ".tar.gz"))
8524 (sha256
8525 (base32
8526 "00h9rcmws03xvdlfni11yb60bz3kxfvsj6dg6nrpzj71f03nbxd2"))
8527 ;; Patch setup.py so it looks for python-setuptools, which is
8528 ;; required to parse the keyword 'install_requires' in setup.py.
8529 (patches (search-patches "python-configobj-setuptools.patch"))))
8530 (build-system python-build-system)
8531 (propagated-inputs
8532 `(("python-six" ,python-six)))
8533 (synopsis "Config file reading, writing and validation")
8534 (description "ConfigObj is a simple but powerful config file reader and
8535 writer: an ini file round tripper. Its main feature is that it is very easy to
8536 use, with a straightforward programmer’s interface and a simple syntax for
8537 config files.")
8538 (home-page "https://github.com/DiffSK/configobj")
8539 (license license:bsd-3)))
8540
8541 (define-public python2-configobj
8542 (package-with-python2 python-configobj))
8543
8544 (define-public python-configargparse
8545 (package
8546 (name "python-configargparse")
8547 (version "0.10.0")
8548 (source (origin
8549 (method url-fetch)
8550 (uri (string-append
8551 "https://pypi.python.org/packages/source/C/ConfigArgParse/"
8552 "ConfigArgParse-" version ".tar.gz"))
8553 (sha256
8554 (base32
8555 "19wh919gbdbzxzpagg52q3lm62yicm95ddlcx77dyjc1slyshl1v"))))
8556 (build-system python-build-system)
8557 (arguments
8558 ;; FIXME: Bug in test suite filed upstream:
8559 ;; https://github.com/bw2/ConfigArgParse/issues/32
8560 '(#:tests? #f))
8561 (synopsis "Replacement for argparse")
8562 (description "A drop-in replacement for argparse that allows options to also
8563 be set via config files and/or environment variables.")
8564 (home-page "https://github.com/bw2/ConfigArgParse")
8565 (license license:expat)))
8566
8567 (define-public python2-configargparse
8568 (package-with-python2 python-configargparse))
8569
8570 (define-public python-ndg-httpsclient
8571 (package
8572 (name "python-ndg-httpsclient")
8573 (version "0.4.2")
8574 (source (origin
8575 (method url-fetch)
8576 (uri (pypi-uri "ndg_httpsclient" version))
8577 (sha256
8578 (base32
8579 "1b5qirv46v4dpnmfqviwq42mdwfcby4dxmz0i41wad2337pqf2aq"))))
8580 (build-system python-build-system)
8581 (arguments
8582 '(;; The tests appear to require networking.
8583 #:tests? #f))
8584 (propagated-inputs
8585 `(("python-pyopenssl" ,python-pyopenssl)))
8586 (synopsis "HTTPS support for Python's httplib and urllib2")
8587 (description "This is a HTTPS client implementation for httplib and urllib2
8588 based on PyOpenSSL. PyOpenSSL provides a more fully featured SSL implementation
8589 over the default provided with Python and importantly enables full verification
8590 of the SSL peer.")
8591 (home-page "https://github.com/cedadev/ndg_httpsclient/")
8592 (license license:bsd-3)))
8593
8594 ;; python2-openssl requires special care, so package-with-python2 is
8595 ;; insufficient.
8596 (define-public python2-ndg-httpsclient
8597 (package (inherit python-ndg-httpsclient)
8598 (name "python2-ndg-httpsclient")
8599 (arguments `(#:python ,python-2))
8600 (propagated-inputs
8601 `(("python2-pyopenssl" ,python2-pyopenssl)))))
8602
8603 (define-public python-contextlib2
8604 (package
8605 (name "python-contextlib2")
8606 (version "0.4.0")
8607 (source
8608 (origin
8609 (method url-fetch)
8610 (uri (pypi-uri "contextlib2" version))
8611 (sha256
8612 (base32
8613 "0cmp131dlh0d0zvw0aza1zd13glvngzk8lb4avks0hm7yxwdr9am"))))
8614 (build-system python-build-system)
8615 (arguments
8616 `(#:phases
8617 (modify-phases %standard-phases
8618 (replace 'check
8619 (lambda _ (zero?
8620 (system*
8621 "python" "test_contextlib2.py" "-v")))))))
8622 (home-page "http://contextlib2.readthedocs.org/")
8623 (synopsis "Tools for decorators and context managers")
8624 (description "This module is primarily a backport of the Python
8625 3.2 contextlib to earlier Python versions. Like contextlib, it
8626 provides utilities for common tasks involving decorators and context
8627 managers. It also contains additional features that are not part of
8628 the standard library.")
8629 (license license:psfl)))
8630
8631 (define-public python2-contextlib2
8632 (package-with-python2 python-contextlib2))
8633
8634 (define-public python-texttable
8635 (package
8636 (name "python-texttable")
8637 (version "0.8.7")
8638 (source
8639 (origin
8640 (method url-fetch)
8641 (uri (pypi-uri "texttable" version))
8642 (sha256
8643 (base32
8644 "1liiiydgkg37i46a418aw19fyf6z3ds51wdwwpyjbs12x0phhf4a"))))
8645 (build-system python-build-system)
8646 (arguments '(#:tests? #f)) ; no tests
8647 (home-page "https://github.com/foutaise/texttable/")
8648 (synopsis "Python module for creating simple ASCII tables")
8649 (description "Texttable is a Python module for creating simple ASCII
8650 tables.")
8651 (license license:lgpl2.1+)))
8652
8653 (define-public python2-texttable
8654 (package-with-python2 python-texttable))
8655
8656 (define-public python-websocket-client
8657 (package
8658 (name "python-websocket-client")
8659 (version "0.37.0")
8660 (source
8661 (origin
8662 (method url-fetch)
8663 (uri (pypi-uri "websocket_client" version))
8664 (sha256
8665 (base32
8666 "0h9glp1jll3z76ly3kg08aqgxqk0a68p4zi9yn50353bh5nj92v7"))))
8667 (build-system python-build-system)
8668 (propagated-inputs
8669 `(("python-six" ,python-six)))
8670 (home-page "https://github.com/liris/websocket-client")
8671 (synopsis "WebSocket client for Python")
8672 (description "The Websocket-client module provides the low level APIs for
8673 WebSocket usage in Python programs.")
8674 (license license:lgpl2.1+)))
8675
8676 (define-public python2-websocket-client
8677 (package-with-python2 python-websocket-client))
8678
8679 (define-public python-atomicwrites
8680 (package
8681 (name "python-atomicwrites")
8682 (version "1.1.5")
8683 (source (origin
8684 (method url-fetch)
8685 (uri (pypi-uri "atomicwrites" version))
8686 (sha256
8687 (base32
8688 "11bm90fwm2avvf4f3ib8g925w7jr4m11vcsinn1bi6ns4bm32214"))))
8689 (build-system python-build-system)
8690 (synopsis "Atomic file writes in Python")
8691 (description "Library for atomic file writes using platform dependent tools
8692 for atomic file system operations.")
8693 (home-page "https://github.com/untitaker/python-atomicwrites")
8694 (license license:expat)))
8695
8696 (define-public python2-atomicwrites
8697 (package-with-python2 python-atomicwrites))
8698
8699 (define-public python-requests-toolbelt
8700 (package
8701 (name "python-requests-toolbelt")
8702 (version "0.6.2")
8703 (source (origin
8704 (method url-fetch)
8705 (uri (string-append
8706 "https://pypi.python.org/packages/"
8707 "e1/a4/a94c037bc72ad70441aff1403d3243510d2542ddca7759faaeffeb11aefe/"
8708 "requests-toolbelt-" version ".tar.gz"))
8709 (sha256
8710 (base32
8711 "15q9nrgp85nqlr4kdz1zvj8z2npafi2sr12y7fqgxbkq28j1aci6"))))
8712 (build-system python-build-system)
8713 (native-inputs
8714 `(("python-betamax" ,python-betamax)
8715 ("python-mock" ,python-mock)
8716 ("python-pytest" ,python-pytest)))
8717 (propagated-inputs
8718 `(("python-requests" ,python-requests)))
8719 (synopsis "Extensions to python-requests")
8720 (description "This is a toolbelt of useful classes and functions to be used
8721 with python-requests.")
8722 (home-page "https://github.com/sigmavirus24/requests-toolbelt")
8723 (license license:asl2.0)))
8724
8725 (define-public python-click-threading
8726 (package
8727 (name "python-click-threading")
8728 (version "0.2.0")
8729 (source (origin
8730 (method url-fetch)
8731 (uri (string-append
8732 "https://pypi.python.org/packages/"
8733 "fe/b7/e7f609d18a2a351cb71616adcf54df1acd82f83cb9b5936935a4d20e2c23/"
8734 "click-threading-" version ".tar.gz"))
8735 (sha256
8736 (base32
8737 "18bcqikxwb3drb8rf60cclxkxw52521b38ax3byah6j8cn8y9p4j"))))
8738 (build-system python-build-system)
8739 (propagated-inputs
8740 `(("python-click" ,python-click)))
8741 (synopsis "Utilities for multithreading in Click")
8742 (description "This package provides utilities for multithreading in Click
8743 applications.")
8744 (home-page "https://github.com/click-contrib/click-threading")
8745 (license license:expat)))
8746
8747 (define-public python-click-log
8748 (package
8749 (name "python-click-log")
8750 (version "0.1.8")
8751 (source (origin
8752 (method url-fetch)
8753 (uri (pypi-uri "click-log" version))
8754 (sha256
8755 (base32
8756 "14ikfjfgnzf21mjniq9lfk2igzykgzfvwwrk85nw2b9fq44109sp"))))
8757 (build-system python-build-system)
8758 (propagated-inputs
8759 `(("python-click" ,python-click)))
8760 (synopsis "Logging for click applications")
8761 (description "This package provides a Python library for logging Click
8762 applications.")
8763 (home-page "https://github.com/click-contrib/click-log")
8764 (license license:expat)))
8765
8766 (define-public python-apipkg
8767 (package
8768 (name "python-apipkg")
8769 (version "1.4")
8770 (source (origin
8771 (method url-fetch)
8772 (uri (pypi-uri "apipkg" version))
8773 (sha256
8774 (base32
8775 "1iks5701qnp3dlr3q1d9qm68y2plp2m029irhpz92a44psfkjf1f"))))
8776 (build-system python-build-system)
8777 (native-inputs
8778 `(("python-pytest" ,python-pytest)))
8779 (synopsis "Namespace control and lazy-import mechanism")
8780 (description "With apipkg you can control the exported namespace of a Python
8781 package and greatly reduce the number of imports for your users. It is a small
8782 pure Python module that works on virtually all Python versions.")
8783 (home-page "https://bitbucket.org/hpk42/apipkg")
8784 (license license:expat)))
8785
8786 (define-public python2-apipkg
8787 (package-with-python2 python-apipkg))
8788
8789 (define-public python-execnet
8790 (package
8791 (name "python-execnet")
8792 (version "1.4.1")
8793 (source (origin
8794 (method url-fetch)
8795 (uri (pypi-uri "execnet" version))
8796 (sha256
8797 (base32
8798 "1rpk1vyclhg911p3hql0m0nrpq7q7mysxnaaw6vs29cpa6kx8vgn"))))
8799 (build-system python-build-system)
8800 (arguments
8801 `(;; 2 failed, 275 passed, 670 skipped, 4 xfailed
8802 ;; The two test failures are caused by the lack of an `ssh` executable.
8803 ;; The test suite can be run with pytest after the 'install' phase.
8804 #:tests? #f))
8805 (native-inputs
8806 `(("python-pytest" ,python-pytest)
8807 ("python-setuptools-scm" ,python-setuptools-scm)))
8808 (propagated-inputs
8809 `(("python-apipkg" ,python-apipkg)))
8810 (synopsis "Rapid multi-Python deployment")
8811 (description "Execnet provides a share-nothing model with
8812 channel-send/receive communication for distributing execution across many
8813 Python interpreters across version, platform and network barriers. It has a
8814 minimal and fast API targeting the following uses:
8815 @enumerate
8816 @item distribute tasks to (many) local or remote CPUs
8817 @item write and deploy hybrid multi-process applications
8818 @item write scripts to administer multiple environments
8819 @end enumerate")
8820 (home-page "http://codespeak.net/execnet/")
8821 (license license:expat)))
8822
8823 (define-public python2-execnet
8824 (package-with-python2 python-execnet))
8825
8826 (define-public python-trollius-redis
8827 (package
8828 (name "python-trollius-redis")
8829 (version "0.1.4")
8830 (source
8831 (origin
8832 (method url-fetch)
8833 (uri (pypi-uri "trollius_redis" version))
8834 (sha256
8835 (base32
8836 "0k3vypszmgmaipgw9xscvgm79h2zd6p6ci8gdp5sxl6g5kbqr9fy"))))
8837 (build-system python-build-system)
8838 ;; TODO: Tests require packaging 'hiredis'.
8839 (arguments '(#:tests? #f))
8840 (home-page "https://github.com/benjolitz/trollius-redis")
8841 (synopsis "Port of asyncio-redis to trollius")
8842 (description "@code{trollius-redis} is a Redis client for Python
8843 trollius. It is an asynchronious IO (PEP 3156) implementation of the
8844 Redis protocol.")
8845 (license license:bsd-2)))
8846
8847 (define-public python2-trollius-redis
8848 (package-with-python2 python-trollius-redis))
8849
8850 ;;; The software provided by this package was integrated into pytest 2.8.
8851 (define-public python-pytest-cache
8852 (package
8853 (name "python-pytest-cache")
8854 (version "1.0")
8855 (source (origin
8856 (method url-fetch)
8857 (uri (pypi-uri "pytest-cache" version))
8858 (sha256
8859 (base32
8860 "1a873fihw4rhshc722j4h6j7g3nj7xpgsna9hhg3zn6ksknnhx5y"))))
8861 (build-system python-build-system)
8862 (propagated-inputs
8863 `(("python-apipkg" ,python-apipkg)
8864 ("python-execnet" ,python-execnet)
8865 ("python-py" ,python-py)
8866 ("python-pytest" ,python-pytest)))
8867 (synopsis "Py.test plugin with mechanisms for caching across test runs")
8868 (description "The pytest-cache plugin provides tools to rerun failures from
8869 the last py.test invocation.")
8870 (home-page "https://bitbucket.org/hpk42/pytest-cache/")
8871 (license license:expat)))
8872
8873 (define-public python2-pytest-cache
8874 (package-with-python2 python-pytest-cache))
8875
8876 (define-public python-pytest-localserver
8877 (package
8878 (name "python-pytest-localserver")
8879 (version "0.3.5")
8880 (source (origin
8881 (method url-fetch)
8882 (uri (pypi-uri "pytest-localserver" version))
8883 (sha256
8884 (base32
8885 "0dvqspjr6va55zwmnnc2mmpqc7mm65kxig9ya44x1z8aadzxpa4p"))))
8886 (build-system python-build-system)
8887 (arguments
8888 `(#:phases (modify-phases %standard-phases
8889 (replace 'check
8890 (lambda _
8891 (zero? (system* "py.test" "--genscript=runtests.py"))
8892 (zero? (system* "py.test")))))))
8893 (native-inputs
8894 `(("python-pytest" ,python-pytest)
8895 ("python-requests" ,python-requests)
8896 ("python-six" ,python-six)))
8897 (propagated-inputs
8898 `(("python-werkzeug" ,python-werkzeug)))
8899 (synopsis "Py.test plugin to test server connections locally")
8900 (description "Pytest-localserver is a plugin for the pytest testing
8901 framework which enables you to test server connections locally.")
8902 (home-page "https://pypi.python.org/pypi/pytest-localserver")
8903 (license license:expat)))
8904
8905 (define-public python-wsgi-intercept
8906 (package
8907 (name "python-wsgi-intercept")
8908 (version "1.2.2")
8909 (source (origin
8910 (method url-fetch)
8911 (uri (string-append
8912 "https://pypi.python.org/packages/"
8913 "38/76/ebcbc24d0cb77db34520a3ca6ed1bd43ace17d182bbd8dd7d976f1c176fb/"
8914 "wsgi_intercept-" version ".tar.gz"))
8915 (sha256
8916 (base32
8917 "0kjj2v2dvmnpdd5h5gk9rzz0f54rhjb0yiz3zg65bmp65slfw65d"))))
8918 (build-system python-build-system)
8919 (propagated-inputs
8920 `(("python-six" ,python-six)))
8921 (native-inputs
8922 `(("python-pytest" ,python-pytest)
8923 ("python-httplib2" ,python-httplib2)
8924 ("python-requests" ,python-requests)
8925 ("python-urllib3" ,python-urllib3)))
8926 (synopsis "Puts a WSGI application in place of a real URI for testing")
8927 (description "Wsgi_intercept installs a WSGI application in place of a real
8928 URI for testing. Testing a WSGI application normally involves starting a
8929 server at a local host and port, then pointing your test code to that address.
8930 Instead, this library lets you intercept calls to any specific host/port
8931 combination and redirect them into a WSGI application importable by your test
8932 program. Thus, you can avoid spawning multiple processes or threads to test
8933 your Web app.")
8934 (home-page "https://github.com/cdent/wsgi-intercept")
8935 (license license:expat)))
8936
8937 (define-public python-pytest-xprocess
8938 (package
8939 (name "python-pytest-xprocess")
8940 (version "0.9.1")
8941 (source (origin
8942 (method url-fetch)
8943 (uri (pypi-uri "pytest-xprocess" version))
8944 (sha256
8945 (base32
8946 "17zlql1xqw3ywcgwwbqmw633aly99lab12hm02asr8awvg5603pp"))))
8947 (build-system python-build-system)
8948 (propagated-inputs
8949 `(("python-pytest" ,python-pytest)
8950 ("python-pytest-cache" ,python-pytest-cache)
8951 ("python-psutil" ,python-psutil)))
8952 (synopsis "Pytest plugin to manage external processes across test runs")
8953 (description "Pytest-xprocess is an experimental py.test plugin for managing
8954 processes across test runs.")
8955 (home-page "https://bitbucket.org/pytest-dev/pytest-xprocess")
8956 (license license:expat)))
8957
8958 (define-public python-icalendar
8959 (package
8960 (name "python-icalendar")
8961 (version "3.11.4")
8962 (source (origin
8963 (method url-fetch)
8964 (uri (pypi-uri "icalendar" version))
8965 (sha256
8966 (base32
8967 "0ix3xxykz8hs8mx4f2063djawmd888y3vsl75fbvbfqvg67v35jn"))))
8968 (build-system python-build-system)
8969 (propagated-inputs
8970 `(("python-dateutil" ,python-dateutil)
8971 ("python-pytz" ,python-pytz)))
8972 (synopsis "Python library for parsing iCalendar files")
8973 (description "The icalendar package is a parser/generator of iCalendar
8974 files for use with Python.")
8975 (home-page "https://github.com/collective/icalendar")
8976 (license license:bsd-2)))
8977
8978 (define-public python-sphinxcontrib-newsfeed
8979 (package
8980 (name "python-sphinxcontrib-newsfeed")
8981 (version "0.1.4")
8982 (source (origin
8983 (method url-fetch)
8984 (uri (pypi-uri "sphinxcontrib-newsfeed" version))
8985 (sha256
8986 (base32
8987 "1d7gam3mn8v4in4p16yn3v10vps7nnaz6ilw99j4klij39dqd37p"))))
8988 (arguments '(#:tests? #f)) ; No tests.
8989 (build-system python-build-system)
8990 (propagated-inputs
8991 `(("python-sphinx" ,python-sphinx)))
8992 (synopsis "News Feed extension for Sphinx")
8993 (description "Sphinxcontrib-newsfeed is an extension for adding a simple
8994 Blog, News or Announcements section to a Sphinx website.")
8995 (home-page "https://bitbucket.org/prometheus/sphinxcontrib-newsfeed")
8996 (license license:bsd-2)))
8997
8998 (define-public python-args
8999 (package
9000 (name "python-args")
9001 (version "0.1.0")
9002 (source (origin
9003 (method url-fetch)
9004 (uri (pypi-uri "args" version))
9005 (sha256
9006 (base32
9007 "057qzi46h5dmxdqknsbrssn78lmqjlnm624iqdhrnpk26zcbi1d7"))))
9008 (build-system python-build-system)
9009 (home-page "https://github.com/kennethreitz/args")
9010 (synopsis "Command-line argument parser")
9011 (description
9012 "This library provides a Python module to parse command-line arguments.")
9013 (license license:bsd-3)))
9014
9015 (define-public python2-args
9016 (package-with-python2 python-args))
9017
9018 (define-public python-clint
9019 (package
9020 (name "python-clint")
9021 (version "0.5.1")
9022 (source (origin
9023 (method url-fetch)
9024 (uri (pypi-uri "clint" version))
9025 (sha256
9026 (base32
9027 "1an5lkkqk1zha47198p42ji3m94xmzx1a03dn7866m87n4r4q8h5"))))
9028 (build-system python-build-system)
9029 (arguments
9030 '(#:phases
9031 (modify-phases %standard-phases
9032 (replace 'check
9033 (lambda _
9034 (zero? (system* "py.test" "-v")))))))
9035 (native-inputs
9036 `(("python-pytest" ,python-pytest)))
9037 (propagated-inputs
9038 `(("python-args" ,python-args)))
9039 (home-page "https://github.com/kennethreitz/clint")
9040 (synopsis "Command-line interface tools")
9041 (description
9042 "Clint is a Python module filled with a set of tools for developing
9043 command-line applications, including tools for colored and indented
9044 output, progress bar display, and pipes.")
9045 (license license:isc)))
9046
9047 (define-public python2-clint
9048 (package-with-python2 python-clint))
9049
9050 (define-public python-astor
9051 (package
9052 (name "python-astor")
9053 (version "0.5")
9054 (source (origin
9055 (method url-fetch)
9056 (uri (pypi-uri "astor" version))
9057 (sha256
9058 (base32
9059 "1fdafq5hkis1fxqlmhw0sn44zp2ar46nxhbc22cvwg7hsd8z5gsa"))))
9060 (build-system python-build-system)
9061 (home-page "https://github.com/berkerpeksag/astor")
9062 (synopsis "Read and write Python ASTs")
9063 (description
9064 "Astor is designed to allow easy manipulation of Python source via the
9065 Abstract Syntax Tree.")
9066 (license license:bsd-3)))
9067
9068 (define-public python2-astor
9069 (package-with-python2 python-astor))
9070
9071 (define-public python-rply
9072 (package
9073 (name "python-rply")
9074 (version "0.7.4")
9075 (source (origin
9076 (method url-fetch)
9077 (uri (pypi-uri "rply" version))
9078 (sha256
9079 (base32
9080 "12rp1d9ba7nvd5rhaxi6xzx1rm67r1k1ylsrkzhpwnphqpb06cvj"))))
9081 (build-system python-build-system)
9082 (propagated-inputs
9083 `(("python-appdirs" ,python-appdirs)))
9084 (home-page "https://github.com/alex/rply")
9085 (synopsis "Parser generator for Python")
9086 (description
9087 "This package provides a pure Python based parser generator, that also
9088 works with RPython. It is a more-or-less direct port of David Bazzley's PLY,
9089 with a new public API, and RPython support.")
9090 (license license:bsd-3)))
9091
9092 (define-public python2-rply
9093 (package-with-python2 python-rply))
9094
9095 (define-public python-hy
9096 (package
9097 (name "python-hy")
9098 (version "0.11.1")
9099 (source (origin
9100 (method url-fetch)
9101 (uri (pypi-uri "hy" version))
9102 (sha256
9103 (base32
9104 "1msqv747iz12r73mz4qvsmlwkddwjvrahlrk7ysrcz07h7dsscxs"))))
9105 (build-system python-build-system)
9106 (arguments
9107 '(#:phases
9108 (modify-phases %standard-phases
9109 (replace 'check
9110 (lambda _
9111 ;; Tests require write access to HOME.
9112 (setenv "HOME" "/tmp")
9113 (zero? (system* "nosetests")))))))
9114 (native-inputs
9115 `(("python-coverage" ,python-coverage)
9116 ("python-nose" ,python-nose)))
9117 (propagated-inputs
9118 `(("python-astor" ,python-astor)
9119 ("python-clint" ,python-clint)
9120 ("python-rply" ,python-rply)))
9121 (home-page "http://hylang.org/")
9122 (synopsis "Lisp frontend to Python")
9123 (description
9124 "Hy is a dialect of Lisp that's embedded in Python. Since Hy transforms
9125 its Lisp code into the Python Abstract Syntax Tree, you have the whole world of
9126 Python at your fingertips, in Lisp form.")
9127 (license license:expat)))
9128
9129 (define-public python2-hy
9130 (package-with-python2 python-hy))
9131
9132 (define-public python-rauth
9133 (package
9134 (name "python-rauth")
9135 (version "0.7.3")
9136 (source
9137 (origin
9138 (method url-fetch)
9139 (uri (pypi-uri "rauth" version))
9140 (sha256
9141 (base32
9142 "02kv8w8l98ky223avyq7vw7x1f2ya9chrm59r77ylq45qb0xnk2j"))))
9143 (build-system python-build-system)
9144 (arguments
9145 `(#:test-target "check"))
9146 (propagated-inputs
9147 `(("python-requests" ,python-requests)))
9148 (home-page "https://github.com/litl/rauth")
9149 (synopsis "Python library for OAuth 1.0/a, 2.0, and Ofly")
9150 (description
9151 "Rauth is a Python library for OAuth 1.0/a, 2.0, and Ofly. It also
9152 provides service wrappers for convenient connection initialization and
9153 authenticated session objects providing things like keep-alive.")
9154 (license license:expat)
9155 (properties `((python2-variant . ,(delay python2-rauth))))))
9156
9157 (define-public python2-rauth
9158 (let ((base (package-with-python2 (strip-python2-variant python-rauth))))
9159 (package
9160 (inherit base)
9161 (native-inputs `(("python2-unittest2" ,python2-unittest2)
9162 ,@(package-native-inputs base))))))
9163
9164 (define-public python2-functools32
9165 (package
9166 (name "python2-functools32")
9167 (version "3.2.3-2")
9168 (source
9169 (origin
9170 (method url-fetch)
9171 (uri (pypi-uri "functools32" version))
9172 (sha256
9173 (base32
9174 "0v8ya0b58x47wp216n1zamimv4iw57cxz3xxhzix52jkw3xks9gn"))))
9175 (build-system python-build-system)
9176 (arguments
9177 `(#:python ,python-2
9178 #:tests? #f)) ; no test target
9179 (home-page "https://github.com/MiCHiLU/python-functools32")
9180 (synopsis
9181 "Backport of the functools module from Python 3.2.3")
9182 (description
9183 "This package is a backport of the @code{functools} module from Python
9184 3.2.3 for use with older versions of Python and PyPy.")
9185 (license license:expat)))
9186
9187 (define-public python2-subprocess32
9188 (package
9189 (name "python2-subprocess32")
9190 (version "3.2.7")
9191 (source (origin
9192 (method url-fetch)
9193 (uri (pypi-uri "subprocess32" version))
9194 (sha256
9195 (base32
9196 "14350dhhlhyz5gqzi3lihn9m6lvskx5mcb20srx1kgsk9i50li8y"))
9197 (patches
9198 (search-patches "python2-subprocess32-disable-input-test.patch"))))
9199 (build-system python-build-system)
9200 (arguments
9201 `(#:python ,python-2
9202 #:phases
9203 (modify-phases %standard-phases
9204 (add-after 'unpack 'patch-/bin/sh
9205 (lambda _
9206 (substitute* '("subprocess32.py"
9207 "test_subprocess32.py")
9208 (("/bin/sh") (which "sh")))
9209 #t))
9210 (delete 'check)
9211 (add-after 'install 'check
9212 (lambda* (#:key inputs outputs #:allow-other-keys)
9213 ;; For some reason this package fails to import
9214 ;; _posixsubprocess.so when PYTHONPATH is set to the build
9215 ;; directory. Running tests after install is easier.
9216 (add-installed-pythonpath inputs outputs)
9217 (zero? (system* "python" "test_subprocess32.py")))))))
9218 (home-page "https://github.com/google/python-subprocess32")
9219 (synopsis "Backport of the subprocess module from Python 3.2")
9220 (description
9221 "This is a backport of the @code{subprocess} standard library module
9222 from Python 3.2 and 3.3 for use on Python 2. It includes bugfixes and some
9223 new features. On POSIX systems it is guaranteed to be reliable when used
9224 in threaded applications. It includes timeout support from Python 3.3 but
9225 otherwise matches 3.2’s API.")
9226 (license license:psfl)))
9227
9228 (define-public python2-futures
9229 (package
9230 (name "python2-futures")
9231 (version "3.0.5")
9232 (source
9233 (origin
9234 (method url-fetch)
9235 (uri (pypi-uri "futures" version))
9236 (sha256
9237 (base32
9238 "1pw1z4329xvlabdpwqa6b7v2fxf7hl64m4cgr22ckbym8m8m4hh5"))))
9239 (build-system python-build-system)
9240 (arguments `(#:python ,python-2))
9241 (home-page "https://github.com/agronholm/pythonfutures")
9242 (synopsis
9243 "Backport of the concurrent.futures package from Python 3.2")
9244 (description
9245 "The concurrent.futures module provides a high-level interface for
9246 asynchronously executing callables. This package backports the
9247 concurrent.futures package from Python 3.2")
9248 (license license:bsd-3)))
9249
9250 (define-public python-promise
9251 (package
9252 (name "python-promise")
9253 (version "0.4.2")
9254 (source
9255 (origin
9256 (method url-fetch)
9257 (uri (pypi-uri "promise" version))
9258 (sha256
9259 (base32
9260 "1k19ms8l3d5jzjh557rgkxb5sg4mqgfc315rn4hx1z3n8qq6lr3h"))))
9261 (build-system python-build-system)
9262 ;; Tests wants python-futures, which is a python2 only program, and
9263 ;; can't be found by python-promise at test time.
9264 (arguments `(#:tests? #f))
9265 (home-page "https://github.com/syrusakbary/promise")
9266 (synopsis "Promises/A+ implementation for Python")
9267 (description
9268 "Promises/A+ implementation for Python")
9269 (properties `((python2-variant . ,(delay python2-promise))))
9270 (license license:expat)))
9271
9272 (define-public python2-promise
9273 (let ((promise (package-with-python2
9274 (strip-python2-variant python-promise))))
9275 (package (inherit promise)
9276 (arguments (substitute-keyword-arguments (package-arguments promise)
9277 ((#:tests? _) #t)))
9278 (native-inputs
9279 `(("python2-futures" ,python2-futures)
9280 ("python2-pytest" ,python2-pytest)
9281 ,@(package-native-inputs promise))))))
9282
9283 (define-public python-urllib3
9284 (package
9285 (name "python-urllib3")
9286 (version "1.18.1")
9287 (source
9288 (origin
9289 (method url-fetch)
9290 (uri (pypi-uri "urllib3" version))
9291 (sha256
9292 (base32
9293 "1wb8aqnq53vzh2amrv8kc66f3h6fx217y0q62y6n30a64p2yqmam"))))
9294 (build-system python-build-system)
9295 (arguments `(#:tests? #f))
9296 (native-inputs
9297 `(;; some packages for tests
9298 ("python-nose" ,python-nose)
9299 ("python-mock" ,python-mock)
9300 ("python-tornado" ,python-tornado)))
9301 (propagated-inputs
9302 `(;; extra packages for https security
9303 ("python-certifi" ,python-certifi)
9304 ("python-ndg-httpsclient" ,python-ndg-httpsclient)
9305 ("python-pyasn1" ,python-pyasn1)
9306 ("python-pyopenssl" ,python-pyopenssl)))
9307 (home-page "https://urllib3.readthedocs.org/")
9308 (synopsis "HTTP library with thread-safe connection pooling")
9309 (description
9310 "Urllib3 supports features left out of urllib and urllib2 libraries. It
9311 can reuse the same socket connection for multiple requests, it can POST files,
9312 supports url redirection and retries, and also gzip and deflate decoding.")
9313 (license license:expat)))
9314
9315 (define-public python2-urllib3
9316 (package-with-python2 python-urllib3))
9317
9318 (define-public python-colorama
9319 (package
9320 (name "python-colorama")
9321 (version "0.3.7")
9322 (source
9323 (origin
9324 (method url-fetch)
9325 (uri (pypi-uri "colorama" version))
9326 (sha256
9327 (base32
9328 "0avqkn6362v7k2kg3afb35g4sfdvixjgy890clip4q174p9whhz0"))))
9329 (build-system python-build-system)
9330 (synopsis "Colored terminal text rendering for Python")
9331 (description "Colorama is a Python library for rendering colored terminal
9332 text.")
9333 (home-page "https://pypi.python.org/pypi/colorama")
9334 (license license:bsd-3)))
9335
9336 (define-public python2-colorama
9337 (package-with-python2 python-colorama))
9338
9339 (define-public python-rsa
9340 (package
9341 (name "python-rsa")
9342 (version "3.4.2")
9343 (source
9344 (origin
9345 (method url-fetch)
9346 (uri (pypi-uri "rsa" version))
9347 (sha256
9348 (base32
9349 "1dcxvszbikgzh99ybdc7jq0zb9wspy2ds8z9mjsqiyv3q884xpr5"))))
9350 (build-system python-build-system)
9351 (propagated-inputs
9352 `(("python-pyasn1" ,python-pyasn1)))
9353 (synopsis "Pure-Python RSA implementation")
9354 (description "Python-RSA is a pure-Python RSA implementation. It supports
9355 encryption and decryption, signing and verifying signatures, and key
9356 generation according to PKCS#1 version 1.5. It can be used as a Python
9357 library as well as on the command line.")
9358 (home-page "http://stuvel.eu/rsa")
9359 (license license:asl2.0)))
9360
9361 (define-public python2-rsa
9362 (package-with-python2 python-rsa))
9363
9364 (define-public python-pluggy
9365 (package
9366 (name "python-pluggy")
9367 (version "0.3.1")
9368 (source
9369 (origin
9370 (method url-fetch)
9371 (uri (pypi-uri "pluggy" version))
9372 (sha256
9373 (base32
9374 "18qfzfm40bgx672lkg8q9x5hdh76n7vax99aank7vh2nw21wg70m"))))
9375 (build-system python-build-system)
9376 (synopsis "Plugin and hook calling mechanism for Python")
9377 (description "Pluggy is an extraction of the plugin manager as used by
9378 Pytest but stripped of Pytest specific details.")
9379 (home-page "https://pypi.python.org/pypi/pluggy")
9380 (license license:expat)))
9381
9382 (define-public python2-pluggy
9383 (package-with-python2 python-pluggy))
9384
9385 (define-public python-tox
9386 (package
9387 (name "python-tox")
9388 (version "2.3.1")
9389 (source
9390 (origin
9391 (method url-fetch)
9392 (uri (pypi-uri "tox" version))
9393 (sha256
9394 (base32
9395 "1vj73ar4rimq3fwy5r2z3jv4g9qbh8rmpmncsc00g0k310acqzxz"))))
9396 (build-system python-build-system)
9397 (arguments
9398 ;; FIXME: Tests require pytest-timeout, which itself requires
9399 ;; pytest>=2.8.0 for installation.
9400 '(#:tests? #f))
9401 (propagated-inputs
9402 `(("python-pluggy" ,python-pluggy) ; >=0.3.0,<0.4.0
9403 ("python-py" ,python-py)
9404 ("python-virtualenv" ,python-virtualenv)))
9405 (native-inputs
9406 `(; FIXME: Missing: ("python-pytest-timeout" ,python-pytest-timeout)
9407 ("python-pytest" ,python-pytest))) ; >= 2.3.5
9408 (home-page "http://tox.testrun.org/")
9409 (synopsis "Virtualenv-based automation of test activities")
9410 (description "Tox is a generic virtualenv management and test command line
9411 tool. It can be used to check that a package installs correctly with
9412 different Python versions and interpreters, or run tests in each type of
9413 supported environment, or act as a frontend to continuous integration
9414 servers.")
9415 (license license:expat)))
9416
9417 (define-public python2-tox
9418 (package-with-python2 python-tox))
9419
9420 (define-public python-jmespath
9421 (package
9422 (name "python-jmespath")
9423 (version "0.9.0")
9424 (source
9425 (origin
9426 (method url-fetch)
9427 (uri (pypi-uri "jmespath" version))
9428 (sha256
9429 (base32
9430 "0g9xvl69y7nr3w7ag4fsp6sm4fqf6vrqjw7504x2hzrrsh3ampq8"))))
9431 (build-system python-build-system)
9432 (native-inputs
9433 `(("python-nose" ,python-nose)))
9434 (synopsis "JSON Matching Expressions")
9435 (description "JMESPath (pronounced “james path”) is a Python library that
9436 allows one to declaratively specify how to extract elements from a JSON
9437 document.")
9438 (home-page "https://github.com/jmespath/jmespath.py")
9439 (license license:expat)))
9440
9441 (define-public python2-jmespath
9442 (package-with-python2 python-jmespath))
9443
9444 (define-public python-botocore
9445 (package
9446 (name "python-botocore")
9447 (version "1.5.26")
9448 (source
9449 (origin
9450 (method url-fetch)
9451 (uri (pypi-uri "botocore" version))
9452 (sha256
9453 (base32
9454 "1b7l48hr88galrrc5q6k21z3sdadzxc87ppzs7k9fz4p1w8bfnvb"))))
9455 (build-system python-build-system)
9456 (arguments
9457 ;; FIXME: Many tests are failing.
9458 '(#:tests? #f))
9459 (propagated-inputs
9460 `(("python-dateutil" ,python-dateutil)
9461 ("python-docutils" ,python-docutils)
9462 ("python-jmespath" ,python-jmespath)))
9463 (native-inputs
9464 `(("python-mock" ,python-mock)
9465 ("python-nose" ,python-nose)
9466 ("behave" ,behave)
9467 ("python-tox" ,python-tox)
9468 ("python-wheel" ,python-wheel)))
9469 (home-page "https://github.com/boto/botocore")
9470 (synopsis "Low-level interface to AWS")
9471 (description "Botocore is a Python library that provides a low-level
9472 interface to the Amazon Web Services (AWS) API.")
9473 (license license:asl2.0)))
9474
9475 (define-public python2-botocore
9476 (package-with-python2 python-botocore))
9477
9478 (define-public awscli
9479 (package
9480 (name "awscli")
9481 (version "1.11.63")
9482 (source
9483 (origin
9484 (method url-fetch)
9485 (uri (pypi-uri name version))
9486 (sha256
9487 (base32
9488 "1r8aqv8w27k76lcsfk83w6qw9lz8gk2ibzwacp5wjhpp2gik911m"))))
9489 (build-system python-build-system)
9490 (propagated-inputs
9491 `(("python-colorama" ,python-colorama)
9492 ("python-botocore" ,python-botocore)
9493 ("python-s3transfer" ,python-s3transfer)
9494 ("python-docutils" ,python-docutils)
9495 ("python-pyyaml" ,python-pyyaml)
9496 ("python-rsa" ,python-rsa)))
9497 (arguments
9498 ;; FIXME: The 'pypi' release does not contain tests.
9499 '(#:tests? #f))
9500 (home-page "https://aws.amazon.com/cli/")
9501 (synopsis "Command line client for AWS")
9502 (description "AWS CLI provides a unified command line interface to the
9503 Amazon Web Services (AWS) API.")
9504 (license license:asl2.0)))
9505
9506 (define-public python-hypothesis
9507 (package
9508 (name "python-hypothesis")
9509 (version "3.1.0")
9510 (source (origin
9511 (method url-fetch)
9512 (uri (pypi-uri "hypothesis" version))
9513 (sha256
9514 (base32
9515 "0qyqq9akm4vshhn8cngjc1qykcvsn7cz6dlm6njfsgpbraqrmbbw"))))
9516 (build-system python-build-system)
9517 (native-inputs
9518 `(("python-flake8" ,python-flake8)
9519 ("python-pytest" ,python-pytest)))
9520 (synopsis "Library for property based testing")
9521 (description "Hypothesis is a library for testing your Python code against a
9522 much larger range of examples than you would ever want to write by hand. It’s
9523 based on the Haskell library, Quickcheck, and is designed to integrate
9524 seamlessly into your existing Python unit testing work flow.")
9525 (home-page "https://github.com/DRMacIver/hypothesis")
9526 (license license:mpl2.0)
9527 (properties `((python2-variant . ,(delay python2-hypothesis))))))
9528
9529 (define-public python2-hypothesis
9530 (let ((hypothesis (package-with-python2
9531 (strip-python2-variant python-hypothesis))))
9532 (package (inherit hypothesis)
9533 (native-inputs
9534 `(("python2-enum34" ,python2-enum34)
9535 ,@(package-native-inputs hypothesis))))))
9536
9537 (define-public python-pytest-subtesthack
9538 (package
9539 (name "python-pytest-subtesthack")
9540 (version "0.1.1")
9541 (source (origin
9542 (method url-fetch)
9543 (uri (pypi-uri "pytest-subtesthack" version))
9544 (sha256
9545 (base32
9546 "15kzcr5pchf3id4ikdvlv752rc0j4d912n589l4rifp8qsj19l1x"))))
9547 (build-system python-build-system)
9548 (propagated-inputs
9549 `(("python-pytest" ,python-pytest)))
9550 (synopsis "Set-up and tear-down fixtures for unit tests")
9551 (description "This plugin allows you to set up and tear down fixtures within
9552 unit test functions that use @code{py.test}. This is useful for using
9553 @command{hypothesis} inside py.test, as @command{hypothesis} will call the test
9554 function multiple times, without setting up or tearing down fixture state as is
9555 normally the case.")
9556 (home-page "https://github.com/untitaker/pytest-subtesthack/")
9557 (license license:unlicense)))
9558
9559 (define-public python2-pytest-subtesthack
9560 (package-with-python2 python-pytest-subtesthack))
9561
9562 (define-public python-xdo
9563 (package
9564 (name "python-xdo")
9565 (version "0.3")
9566 (source (origin
9567 (method url-fetch)
9568 (uri (string-append
9569 "http://http.debian.net/debian/pool/main/p/python-xdo/"
9570 "python-xdo_" version ".orig.tar.gz"))
9571 (sha256
9572 (base32
9573 "1vqh1n5yy5dhnq312kwrl90fnck4v26is3lq3lxdvcn60vv19da0"))))
9574 (build-system python-build-system)
9575 (arguments
9576 '(#:phases
9577 (modify-phases %standard-phases
9578 (add-before 'install 'patch-libxdo-path
9579 ;; Hardcode the path of dynamically loaded libxdo library.
9580 (lambda* (#:key inputs #:allow-other-keys)
9581 (let ((libxdo (string-append
9582 (assoc-ref inputs "xdotool")
9583 "/lib/libxdo.so")))
9584 (substitute* "xdo/_xdo.py"
9585 (("find_library\\(\"xdo\"\\)")
9586 (simple-format #f "\"~a\"" libxdo)))
9587 #t))))
9588 #:tests? #f)) ; no tests provided
9589 (propagated-inputs
9590 `(("python-six" ,python-six)))
9591 (inputs
9592 `(("xdotool" ,xdotool)
9593 ("libX11" ,libx11)))
9594 (home-page "https://tracker.debian.org/pkg/python-xdo")
9595 (synopsis "Python library for simulating X11 keyboard/mouse input")
9596 (description "Provides bindings to libxdo for manipulating X11 via simulated
9597 input. (Note that this is mostly a legacy library; you may wish to look at
9598 python-xdo for newer bindings.)")
9599 (license license:bsd-3)))
9600
9601 (define-public python2-xdo
9602 (package-with-python2 python-xdo))
9603
9604 (define-public python-wtforms
9605 (package
9606 (name "python-wtforms")
9607 (version "2.1")
9608 (source
9609 (origin
9610 (method url-fetch)
9611 (uri (pypi-uri "WTForms" version ".zip"))
9612 (sha256
9613 (base32
9614 "0vyl26y9cg409cfyj8rhqxazsdnd0jipgjw06civhrd53yyi1pzz"))))
9615 (build-system python-build-system)
9616 (arguments
9617 '(#:phases
9618 (modify-phases %standard-phases
9619 (add-after 'unpack 'remove-django-test
9620 ;; Don't fail the tests when the inputs for the optional tests cannot be found.
9621 (lambda _
9622 (substitute*
9623 "tests/runtests.py"
9624 (("'ext_django.tests', 'ext_sqlalchemy', 'ext_dateutil', 'locale_babel'") "")
9625 (("sys.stderr.write(\"### Disabled test '%s', dependency not found\n\" % name)") ""))
9626 #t)))))
9627 (native-inputs
9628 `(("unzip" ,unzip)))
9629 (home-page "http://wtforms.simplecodes.com/")
9630 (synopsis
9631 "Form validation and rendering library for Python web development")
9632 (description
9633 "WTForms is a flexible forms validation and rendering library
9634 for Python web development. It is very similar to the web form API
9635 available in Django, but is a standalone package.")
9636 (license license:bsd-3)))
9637
9638 (define-public python2-wtforms
9639 (package-with-python2 python-wtforms))
9640
9641 (define-public python-mako
9642 (package
9643 (name "python-mako")
9644 (version "1.0.6")
9645 (source
9646 (origin
9647 (method url-fetch)
9648 (uri (pypi-uri "Mako" version))
9649 (sha256
9650 (base32
9651 "03dyxgjknp4ffsv7vwfd28l5bbpzi0ylp20543wpg3iahyyrwma8"))))
9652 (build-system python-build-system)
9653 (propagated-inputs
9654 `(("python-markupsafe" ,python-markupsafe)))
9655 (native-inputs
9656 `(("python-mock" ,python-mock)
9657 ("python-nose" ,python-nose)
9658 ("python-pytest" ,python-pytest)))
9659 (home-page "http://www.makotemplates.org/")
9660 (synopsis "Templating language for Python")
9661 (description "Mako is a templating language for Python that compiles
9662 templates into Python modules.")
9663 (license license:expat)))
9664
9665 (define-public python2-mako
9666 (package-with-python2 python-mako))
9667
9668 (define-public python-waitress
9669 (package
9670 (name "python-waitress")
9671 (version "0.8.10")
9672 (source
9673 (origin
9674 (method url-fetch)
9675 (uri (pypi-uri "waitress" version))
9676 (sha256
9677 (base32
9678 "017n9ra6vvmq9d5sfhdzyzr1mg15x2hj2dhm4pdlw98c1ypw2h3w"))))
9679 (build-system python-build-system)
9680 (home-page "https://github.com/Pylons/waitress")
9681 (synopsis "Waitress WSGI server")
9682 (description "Waitress is meant to be a production-quality pure-Python WSGI
9683 server with very acceptable performance.")
9684 (license license:zpl2.1)))
9685
9686 (define-public python2-waitress
9687 (package-with-python2 python-waitress))
9688
9689 (define-public python-wsgiproxy2
9690 (package
9691 (name "python-wsgiproxy2")
9692 (version "0.4.2")
9693 (source
9694 (origin
9695 (method url-fetch)
9696 (uri (pypi-uri "WSGIProxy2" version ".zip"))
9697 (sha256
9698 (base32
9699 "13kf9bdxrc95y9vriaz0viry3ah11nz4rlrykcfvb8nlqpx3dcm4"))))
9700 (build-system python-build-system)
9701 (arguments
9702 '(;; Wsgiproxy2's test suite requires Restkit, which does not yet fully
9703 ;; support Python 3:
9704 ;; https://github.com/benoitc/restkit/issues/140
9705 #:tests? #f))
9706 (native-inputs
9707 `(("unzip" ,unzip)
9708 ("python-nose" ,python-nose)
9709 ("python-coverage" ,python-coverage)))
9710 (propagated-inputs
9711 `(("python-six" ,python-six)
9712 ("python-webob" ,python-webob)))
9713 (home-page
9714 "https://github.com/gawel/WSGIProxy2/")
9715 (synopsis "WSGI Proxy with various http client backends")
9716 (description "WSGI turns HTTP requests into WSGI function calls.
9717 WSGIProxy turns WSGI function calls into HTTP requests.
9718 It also includes code to sign requests and pass private data,
9719 and to spawn subprocesses to handle requests.")
9720 (license license:expat)))
9721
9722 (define-public python2-wsgiproxy2
9723 (package-with-python2 python-wsgiproxy2))
9724
9725 (define-public python-pastedeploy
9726 (package
9727 (name "python-pastedeploy")
9728 (version "1.5.2")
9729 (source
9730 (origin
9731 (method url-fetch)
9732 (uri (pypi-uri "PasteDeploy" version))
9733 (sha256
9734 (base32
9735 "1jz3m4hq8v6hyhfjz9425nd3nvn52cvbfipdcd72krjmla4qz1fm"))))
9736 (build-system python-build-system)
9737 (native-inputs
9738 `(("python-nose" ,python-nose)))
9739 (home-page "http://pythonpaste.org/deploy/")
9740 (synopsis
9741 "Load, configure, and compose WSGI applications and servers")
9742 (description
9743 "This tool provides code to load WSGI applications and servers from URIs;
9744 these URIs can refer to Python Eggs for INI-style configuration files. Paste
9745 Script provides commands to serve applications based on this configuration
9746 file.")
9747 (license license:expat)))
9748
9749 (define-public python2-pastedeploy
9750 (package-with-python2 python-pastedeploy))
9751
9752 (define-public python-paste
9753 (package
9754 (name "python-paste")
9755 (version "2.0.3")
9756 (source
9757 (origin
9758 (method url-fetch)
9759 (uri (pypi-uri "Paste" version))
9760 (sha256
9761 (base32
9762 "062jk0nlxf6lb2wwj6zc20rlvrwsnikpkh90y0dn8cjch93s6ii3"))
9763 (patches (search-patches "python-paste-remove-website-test.patch"
9764 "python-paste-remove-timing-test.patch"))))
9765 (build-system python-build-system)
9766 (native-inputs
9767 `(("python-nose" ,python-nose)))
9768 (propagated-inputs
9769 `(("python-six" ,python-six)))
9770 (home-page "http://pythonpaste.org")
9771 (synopsis
9772 "Python web development tools, focusing on WSGI")
9773 (description
9774 "Paste provides a variety of web development tools and middleware which
9775 can be nested together to build web applications. Paste's design closely
9776 follows ideas flowing from WSGI (Web Standard Gateway Interface).")
9777 (license license:expat)))
9778
9779 (define-public python2-paste
9780 (package-with-python2 python-paste))
9781
9782 (define-public python-pastescript
9783 (package
9784 (name "python-pastescript")
9785 (version "2.0.2")
9786 (source
9787 (origin
9788 (method url-fetch)
9789 (uri (pypi-uri "PasteScript" version))
9790 (sha256
9791 (base32
9792 "1h3nnhn45kf4pbcv669ik4faw04j58k8vbj1hwrc532k0nc28gy0"))))
9793 (build-system python-build-system)
9794 (native-inputs
9795 `(("python-nose" ,python-nose)))
9796 (propagated-inputs
9797 `(("python-paste" ,python-paste)
9798 ("python-pastedeploy" ,python-pastedeploy)))
9799 (home-page "http://pythonpaste.org/script/")
9800 (arguments
9801 '(;; Unfortunately, this requires the latest unittest2,
9802 ;; but that requires traceback2 which requires linecache2 which requires
9803 ;; unittest2. So we're skipping tests for now.
9804 ;; (Note: Apparently linetest2 only needs unittest2 for its tests,
9805 ;; so in theory we could get around this situation somehow.)
9806 #:tests? #f))
9807 (synopsis
9808 "Pluggable command line tool for serving web applications and more")
9809 (description
9810 "PasteScript is a plugin-friendly command line tool which provides a
9811 variety of features, from launching web applications to bootstrapping project
9812 layouts.")
9813 (license license:expat)))
9814
9815 (define-public python2-pastescript
9816 (package-with-python2 python-pastescript))
9817
9818 (define-public python-pyquery
9819 (package
9820 (name "python-pyquery")
9821 (version "1.2.17")
9822 (source
9823 (origin
9824 (method url-fetch)
9825 (uri (pypi-uri "pyquery" version))
9826 (sha256
9827 (base32
9828 "1xia20wm0vx5dk85kcwgh13bylz8qh47ffjxssd2586r60xi783a"))))
9829 (build-system python-build-system)
9830 (native-inputs
9831 `(("python-webob" ,python-webob)
9832 ("python-webtest" ,python-webtest)))
9833 (propagated-inputs
9834 `(("python-lxml" ,python-lxml)
9835 ("python-cssselect" ,python-cssselect)))
9836 (home-page "https://github.com/gawel/pyquery")
9837 (synopsis "Make jQuery-like queries on xml documents")
9838 (description "pyquery allows you to make jQuery queries on xml documents.
9839 The API is as much as possible the similar to jQuery. pyquery uses lxml for
9840 fast xml and html manipulation.")
9841 (license license:bsd-3)))
9842
9843 (define-public python2-pyquery
9844 (package-with-python2 python-pyquery))
9845
9846 (define-public python-webtest
9847 (package
9848 (name "python-webtest")
9849 (version "2.0.20")
9850 (source
9851 (origin
9852 (method url-fetch)
9853 (uri (pypi-uri "WebTest" version))
9854 (sha256
9855 (base32
9856 "0bv0qhdjakdsdgj4sk21gnpp8xp8bga4x03p6gjb83ihrsb7n4xv"))))
9857 (build-system python-build-system)
9858 (arguments
9859 `(;; Unfortunately we have to disable tests!
9860 ;; This release of WebTest is pinned to python-nose < 1.3,
9861 ;; but older versions of python-nose are plagued with the following
9862 ;; bug(s), which rears its ugly head during test execution:
9863 ;; https://github.com/nose-devs/nose/issues/759
9864 ;; https://github.com/nose-devs/nose/pull/811
9865 #:tests? #f))
9866 ;; Commented out code is no good, but in this case, once tests
9867 ;; are ready to be enabled again, we should put the following
9868 ;; in place:
9869 ;; (native-inputs
9870 ;; `(("python-nose" ,python-nose) ; technially < 1.3,
9871 ;; ; but see above comment
9872 ;; ("python-coverage" ,python-coverage)
9873 ;; ("python-mock" ,python-mock)
9874 ;; ("python-pastedeploy" ,python-pastedeploy)
9875 ;; ("python-wsgiproxy2" ,python-wsgiproxy2)
9876 ;; ("python-pyquery" ,python-pyquery)))
9877 (propagated-inputs
9878 `(("python-waitress" ,python-waitress)
9879 ("python-webob" ,python-webob)
9880 ("python-six" ,python-six)
9881 ("python-beautifulsoup4" ,python-beautifulsoup4)))
9882 (home-page "http://webtest.pythonpaste.org/")
9883 (synopsis "Helper to test WSGI applications")
9884 (description "Webtest allows you to test your Python web applications
9885 without starting an HTTP server. It supports anything that supports the
9886 minimum of WSGI.")
9887 (license license:expat)))
9888
9889 (define-public python2-webtest
9890 (package-with-python2 python-webtest))
9891
9892 (define-public python-anyjson
9893 (package
9894 (name "python-anyjson")
9895 (version "0.3.3")
9896 (source
9897 (origin
9898 (method url-fetch)
9899 (uri (pypi-uri "anyjson" version))
9900 (sha256
9901 (base32
9902 "1fjph4alvcscsl5d4b6qpv1yh31jy05jxi1l0xff7lws7j32v09p"))))
9903 (build-system python-build-system)
9904 (arguments
9905 `(;; We could possibly get tests working, but on Python 3 it's not so easy.
9906 ;; Very strangely, 2to3 is run *during setup.py install* (or bdist, or
9907 ;; whatever) so this transformation needs to be done before the tests
9908 ;; can be run. Maybe we could add a build step to transform beforehand
9909 ;; but it could be annoying/difficult.
9910 ;; We can enable tests for the Python 2 version, though, and do below.
9911 #:tests? #f))
9912 (home-page "http://bitbucket.org/runeh/anyjson/")
9913 (synopsis
9914 "Wraps best available JSON implementation in a common interface")
9915 (description
9916 "Anyjson loads whichever is the fastest JSON module installed
9917 and provides a uniform API regardless of which JSON implementation is used.")
9918 (license license:bsd-3)
9919 (properties `((python2-variant . ,(delay python2-anyjson))))))
9920
9921 (define-public python2-anyjson
9922 (let ((anyjson (package-with-python2
9923 (strip-python2-variant python-anyjson))))
9924 (package
9925 (inherit anyjson)
9926 (arguments `(;; Unlike the python 3 variant, we do run tests. See above!
9927 #:tests? #t
9928 ,@(package-arguments anyjson)))
9929 (native-inputs `(("python2-nose" ,python2-nose))))))
9930
9931 (define-public python-amqp
9932 (package
9933 (name "python-amqp")
9934 (version "1.4.9")
9935 (source
9936 (origin
9937 (method url-fetch)
9938 (uri (pypi-uri "amqp" version))
9939 (sha256
9940 (base32
9941 "06n6q0kxhjnbfz3vn8x9yz09lwmn1xi9d6wxp31h5jbks0b4vsid"))))
9942 (build-system python-build-system)
9943 (native-inputs
9944 `(("python-nose" ,python-nose)
9945 ("python-mock" ,python-mock)))
9946 (home-page "https://github.com/celery/py-amqp")
9947 (synopsis
9948 "Low-level AMQP client for Python (fork of amqplib)")
9949 (description
9950 "This is a fork of amqplib which was originally written by Barry Pederson.
9951 It is maintained by the Celery project, and used by kombu as a pure python
9952 alternative when librabbitmq is not available.")
9953 (license license:lgpl2.1+)
9954 (properties `((python2-variant . ,(delay python2-amqp))))))
9955
9956 (define-public python2-amqp
9957 (let ((amqp (package-with-python2
9958 (strip-python2-variant python-amqp))))
9959 (package
9960 (inherit amqp)
9961 (arguments `(;; Tries to run coverage tests with nose-cover3, which seems
9962 ;; unmaintained. Weirdly, does not do this on the python 3
9963 ;; version?
9964 #:tests? #f
9965 ,@(package-arguments amqp))))))
9966
9967 (define-public python-kombu
9968 (package
9969 (name "python-kombu")
9970 (version "3.0.37")
9971 (source
9972 (origin
9973 (method url-fetch)
9974 (uri (pypi-uri "kombu" version))
9975 (sha256
9976 (base32
9977 "0l16chb314gpq2v7fh94a22c30lcv6w3ylmhsa60bldlcq6a0r70"))))
9978 (build-system python-build-system)
9979 (native-inputs
9980 `(("python-mock" ,python-mock)
9981 ("python-nose" ,python-nose)))
9982 (propagated-inputs
9983 `(("python-anyjson" ,python-anyjson)
9984 ("python-amqp" ,python-amqp)
9985 ("python-redis" ,python-redis)))
9986 (home-page "http://kombu.readthedocs.org")
9987 (synopsis "Message passing library for Python")
9988 (description "The aim of Kombu is to make messaging in Python as easy as
9989 possible by providing an idiomatic high-level interface for the AMQ protocol,
9990 and also provide proven and tested solutions to common messaging problems.
9991 AMQP is the Advanced Message Queuing Protocol, an open standard protocol for
9992 message orientation, queuing, routing, reliability and security, for which the
9993 RabbitMQ messaging server is the most popular implementation.")
9994 (license license:bsd-3)
9995 (properties `((python2-variant . ,(delay python2-kombu))))))
9996
9997 (define-public python2-kombu
9998 (let ((kombu (package-with-python2
9999 (strip-python2-variant python-kombu))))
10000 (package
10001 (inherit kombu)
10002 (arguments `(;; FIXME: 'TestTransport.test_del_sync' fails on python2.
10003 ;; It works fine on the python3 variant.
10004 #:tests? #f
10005 ,@(package-arguments kombu)))
10006 (native-inputs `(("python2-unittest2" ,python2-unittest2)
10007 ,@(package-native-inputs kombu))))))
10008
10009 (define-public python-billiard
10010 (package
10011 (name "python-billiard")
10012 (version "3.3.0.23")
10013 (source
10014 (origin
10015 (method url-fetch)
10016 (uri (pypi-uri "billiard" version))
10017 (sha256
10018 (base32
10019 "02wxsc6bhqvzh8j6w758kvgqbnj14l796mvmrcms8fgfamd2lak9"))))
10020 (build-system python-build-system)
10021 (native-inputs
10022 `(("python-nose" ,python-nose)))
10023 (home-page "https://github.com/celery/billiard")
10024 (synopsis
10025 "Python multiprocessing fork with improvements and bugfixes")
10026 (description
10027 "Billiard is a fork of the Python 2.7 multiprocessing package. The
10028 multiprocessing package itself is a renamed and updated version of R Oudkerk's
10029 pyprocessing package. This standalone variant is intended to be compatible with
10030 Python 2.4 and 2.5, and will draw its fixes/improvements from python-trunk.")
10031 (license license:bsd-3)
10032 (properties `((python2-variant . ,(delay python2-billiard))))))
10033
10034 (define-public python2-billiard
10035 (let ((billiard (package-with-python2
10036 (strip-python2-variant python-billiard))))
10037 (package
10038 (inherit billiard)
10039 (native-inputs `(("python2-unittest2" ,python2-unittest2)
10040 ("python2-mock" ,python2-mock)
10041 ,@(package-native-inputs billiard))))))
10042
10043 (define-public python-celery
10044 (package
10045 (name "python-celery")
10046 (version "3.1.24")
10047 (source
10048 (origin
10049 (method url-fetch)
10050 (uri (pypi-uri "celery" version))
10051 (sha256
10052 (base32
10053 "0yh2prhdnx2dgkb67a5drj12hh2zvzx5f611p7mqqg01ydghif4r"))))
10054 (build-system python-build-system)
10055 (arguments
10056 `(#:phases
10057 (modify-phases %standard-phases
10058 ;; These tests break with Python 3.5:
10059 ;; https://github.com/celery/celery/issues/2897#issuecomment-253066295
10060 (replace 'check
10061 (lambda _
10062 (zero?
10063 (system* "nosetests" "--exclude=^test_safe_to_remove.*")))))))
10064 (native-inputs
10065 `(("python-nose" ,python-nose)))
10066 (propagated-inputs
10067 `(("python-pytz" ,python-pytz)
10068 ("python-billiard" ,python-billiard)
10069 ("python-kombu" ,python-kombu)))
10070 (home-page "http://celeryproject.org")
10071 (synopsis "Distributed Task Queue")
10072 (description "Celery is an asynchronous task queue/job queue based on
10073 distributed message passing. It is focused on real-time operation, but
10074 supports scheduling as well. The execution units, called tasks, are executed
10075 concurrently on a single or more worker servers using multiprocessing,
10076 Eventlet, or gevent. Tasks can execute asynchronously (in the background) or
10077 synchronously (wait until ready).")
10078 (license license:bsd-3)
10079 (properties `((python2-variant . ,(delay python2-celery))))))
10080
10081 (define-public python2-celery
10082 (let ((celery (package-with-python2
10083 (strip-python2-variant python-celery))))
10084 (package
10085 (inherit celery)
10086 (native-inputs `(("python2-unittest2" ,python2-unittest2)
10087 ("python2-mock" ,python2-mock)
10088 ,@(package-native-inputs celery))))))
10089
10090 (define-public python-translitcodec
10091 (package
10092 (name "python-translitcodec")
10093 (version "0.4.0")
10094 (source
10095 (origin
10096 (method url-fetch)
10097 (uri (pypi-uri "translitcodec" version))
10098 (sha256
10099 (base32
10100 "10x6pvblkzky1zhjs8nmx64nb9jdzxad4bxhq4iwv0j4z2aqjnki"))))
10101 (build-system python-build-system)
10102 (arguments
10103 `(#:tests? #f)) ; no tests provided
10104 (home-page
10105 "https://github.com/claudep/translitcodec")
10106 (synopsis
10107 "Unicode to 8-bit charset transliteration codec")
10108 (description
10109 "This package contains codecs for transliterating ISO 10646 texts into
10110 best-effort representations using smaller coded character sets (ASCII,
10111 ISO 8859, etc.).")
10112 (license license:expat)))
10113
10114 (define-public python2-translitcodec
10115 (package-with-python2 python-translitcodec))
10116
10117 (define-public python-editor
10118 (package
10119 (name "python-editor")
10120 (version "0.5")
10121 (source
10122 (origin
10123 (method url-fetch)
10124 (uri (pypi-uri "python-editor" version))
10125 (sha256
10126 (base32
10127 "1ypnpgvzpkbwsg4rdvy4sy51j28b5xq9v8pnkwxncn07vqz06p7n"))))
10128 (build-system python-build-system)
10129 (home-page
10130 "https://github.com/fmoo/python-editor")
10131 (synopsis
10132 "Programmatically open an editor, capture the result")
10133 (description
10134 "python-editor is a library that provides the editor module for
10135 programmatically interfacing with your system's $EDITOR.")
10136 (license license:asl2.0)))
10137
10138 (define-public python2-editor
10139 (package-with-python2 python-editor))
10140
10141 (define-public python-sphinxcontrib-programoutput
10142 (package
10143 (name "python-sphinxcontrib-programoutput")
10144 (version "0.10")
10145 (source (origin
10146 (method url-fetch)
10147 (uri (pypi-uri "sphinxcontrib-programoutput" version))
10148 (sha256
10149 (base32
10150 "153hhnlbx4688zj9wd64819ps5znc2jlyp5crkgzvn5hxgy99vpx"))))
10151 (build-system python-build-system)
10152 (arguments
10153 ;; FIXME: Many tests are failing and the upstream is gone.
10154 '(#:tests? #f))
10155 (propagated-inputs
10156 `(("python-sphinx" ,python-sphinx)))
10157 (synopsis "Sphinx extension to include program output")
10158 (description "A Sphinx extension to literally insert the output of arbitrary
10159 commands into documents, helping you to keep your command examples up to date.")
10160 (home-page "https://github.com/lunaryorn/sphinxcontrib-programoutput")
10161 (license license:bsd-2)))
10162
10163 (define-public python2-sphinxcontrib-programoutput
10164 (package-with-python2 python-sphinxcontrib-programoutput))
10165
10166 (define-public python-sphinx-repoze-autointerface
10167 (package
10168 (name "python-sphinx-repoze-autointerface")
10169 (version "0.8")
10170 (source (origin
10171 (method url-fetch)
10172 (uri (pypi-uri "repoze.sphinx.autointerface" version))
10173 (sha256
10174 (base32
10175 "08ycivzf7bh4a1zcyp31hbyqs1b2c9r26raa3vxjwwmbfqr3iw4f"))))
10176 (build-system python-build-system)
10177 (arguments '(#:tests? #f)) ; No tests.
10178 (propagated-inputs
10179 `(("python-sphinx" ,python-sphinx)
10180 ("python-zope-interface" ,python-zope-interface)))
10181 (synopsis "Auto-generate Sphinx API docs from Zope interfaces")
10182 (description "This package defines an extension for the Sphinx documentation
10183 system. The extension allows generation of API documentation by
10184 introspection of @code{zope.interface} instances in code.")
10185 (home-page "https://github.com/repoze/repoze.sphinx.autointerface")
10186 (license license:repoze)))
10187
10188 (define-public python2-sphinx-repoze-autointerface
10189 (package-with-python2 python-sphinx-repoze-autointerface))
10190
10191 (define-public python-psycopg2
10192 (package
10193 (name "python-psycopg2")
10194 (version "2.6.2")
10195 (source
10196 (origin
10197 (method url-fetch)
10198 (uri (pypi-uri "psycopg2" version))
10199 (sha256
10200 (base32
10201 "0p60z2gwfcal30y2w8gprflchp1kcg9qblc5rn782p4wxl90wjbh"))))
10202 (build-system python-build-system)
10203 (arguments
10204 ;; Tests would require a postgresql database "psycopg2_test"
10205 ;; and a running postgresql database management service.
10206 `(#:tests? #f)) ; TODO re-enable after providing a test-db.
10207 (inputs
10208 `(("postgresql" ,postgresql))) ; libpq
10209 (home-page "http://initd.org/psycopg/")
10210 (synopsis "Python PostgreSQL adapter")
10211 (description
10212 "psycopg2 is a thread-safe PostgreSQL adapter that implements DB-API 2.0. ")
10213 (license license:lgpl3+)))
10214
10215 (define-public python2-psycopg2
10216 (package-with-python2 python-psycopg2))
10217
10218 (define-public python-vobject
10219 (package
10220 (name "python-vobject")
10221 (version "0.9.4.1")
10222 (source (origin
10223 (method url-fetch)
10224 (uri (pypi-uri "vobject" version))
10225 (sha256
10226 (base32
10227 "0741h2cf743sbk89dpfm1yca26l4s159nzvy6vv8xg72nd7pvsps"))))
10228 (build-system python-build-system)
10229 (arguments
10230 '(;; The test suite relies on some non-portable Windows interfaces.
10231 #:tests? #f))
10232 (propagated-inputs
10233 `(("python-dateutil" ,python-dateutil)
10234 ("python-pyicu" ,python-pyicu)))
10235 (synopsis "Parse and generate vCard and vCalendar files")
10236 (description "Vobject is intended to be a full featured Python package for
10237 parsing and generating vCard and vCalendar files. Currently, iCalendar files
10238 are supported and well tested. vCard 3.0 files are supported, and all data
10239 should be imported, but only a few components are understood in a sophisticated
10240 way.")
10241 (home-page "http://eventable.github.io/vobject/")
10242 (license license:asl2.0)))
10243
10244 (define-public python2-vobject
10245 (package-with-python2 python-vobject))
10246
10247 (define-public python-munkres
10248 (package
10249 (name "python-munkres")
10250 (version "1.0.8")
10251 (source (origin
10252 (method url-fetch)
10253 (uri (pypi-uri "munkres" version))
10254 (sha256
10255 (base32
10256 "0mbspx4zv8id4x6pim6ybsa1xh96qwpbqj7skbqz4c9c9nf1lpqq"))))
10257 (build-system python-build-system)
10258 (arguments
10259 '(#:tests? #f)) ; no test suite
10260 (home-page "http://software.clapper.org/munkres/")
10261 (synopsis "Implementation of the Munkres algorithm")
10262 (description "The Munkres module provides an implementation of the Munkres
10263 algorithm (also called the Hungarian algorithm or the Kuhn-Munkres algorithm),
10264 useful for solving the Assignment Problem.")
10265 (license license:bsd-3)))
10266
10267 (define-public python2-munkres
10268 (package-with-python2 python-munkres))
10269
10270 (define-public python-flask
10271 (package
10272 (name "python-flask")
10273 (version "0.11.1")
10274 (source (origin
10275 (method url-fetch)
10276 (uri (pypi-uri "Flask" version))
10277 (sha256
10278 (base32
10279 "03kbfll4sj3v5z7r31c7bhfpi11r1np076d4p1k2kg4yzcmkywdl"))))
10280 (build-system python-build-system)
10281 (propagated-inputs
10282 `(("python-itsdangerous" ,python-itsdangerous)
10283 ("python-jinja2" ,python-jinja2)
10284 ("python-click" ,python-click)
10285 ("python-werkzeug" ,python-werkzeug)))
10286 (home-page "https://github.com/mitsuhiko/flask/")
10287 (synopsis "Microframework based on Werkzeug, Jinja2 and good intentions")
10288 (description "Flask is a micro web framework based on the Werkzeug toolkit
10289 and Jinja2 template engine. It is called a micro framework because it does not
10290 presume or force a developer to use a particular tool or library.")
10291 (license license:bsd-3)))
10292
10293 (define-public python2-flask
10294 (package-with-python2 python-flask))
10295
10296 (define-public python-flask-wtf
10297 (package
10298 (name "python-flask-wtf")
10299 (version "0.13.1")
10300 (source
10301 (origin
10302 (method url-fetch)
10303 (uri (pypi-uri "Flask-WTF" version))
10304 (sha256
10305 (base32
10306 "04l5743j2dici46038sqlzvf0xzpg8rf7s9ld2x24xv7f4idg990"))))
10307 (build-system python-build-system)
10308 (arguments
10309 '(#:phases
10310 (modify-phases %standard-phases
10311 (add-before 'check 'drop-failing-test
10312 (lambda _
10313 ;; FIXME: This file tries resolving an external server, which
10314 ;; fails. Try to patch out the offending section instead of
10315 ;; deleting the whole thing.
10316 (delete-file "tests/test_recaptcha.py")
10317 #t)))))
10318 (propagated-inputs
10319 `(("python-flask-babel" ,python-flask-babel)
10320 ("python-babel" ,python-babel)
10321 ("python-wtforms" ,python-wtforms)))
10322 (native-inputs
10323 `(("python-nose" ,python-nose)))
10324 (home-page "https://github.com/lepture/flask-wtf")
10325 (synopsis "Simple integration of Flask and WTForms")
10326 (description "Flask-WTF integrates Flask and WTForms, including CSRF, file
10327 upload, and reCAPTCHA.")
10328 (license license:bsd-3)))
10329
10330 (define-public python2-flask-wtf
10331 (package-with-python2 python-flask-wtf))
10332
10333 (define-public python-flask-multistatic
10334 (package
10335 (name "python-flask-multistatic")
10336 (version "1.0")
10337 (source
10338 (origin
10339 (method url-fetch)
10340 (uri (pypi-uri "flask-multistatic" version))
10341 (sha256
10342 (base32
10343 "0p4v50rwv64wcd0zlq7rzl4waprwr4hj19s3cgf1isywa7jcisgm"))))
10344 (build-system python-build-system)
10345 (propagated-inputs
10346 `(("python-flask" ,python-flask)))
10347 (home-page "https://pagure.io/flask-multistatic")
10348 (synopsis "Flask plugin to allow overriding static files")
10349 (description "@code{flask-multistatic} is a flask plugin that adds support
10350 for overriding static files.")
10351 (license license:gpl3+)))
10352
10353 (define-public python2-flask-multistatic
10354 (package-with-python2 python-flask-multistatic))
10355
10356 (define-public python-cookies
10357 (package
10358 (name "python-cookies")
10359 (version "2.2.1")
10360 (source (origin
10361 (method url-fetch)
10362 (uri (pypi-uri "cookies" version))
10363 (sha256
10364 (base32
10365 "13pfndz8vbk4p2a44cfbjsypjarkrall71pgc97glk5fiiw9idnn"))))
10366 (build-system python-build-system)
10367 (arguments
10368 `(;; test are broken: https://gitlab.com/sashahart/cookies/issues/3
10369 #:tests? #f))
10370 (native-inputs
10371 `(("python-pytest" ,python2-pytest)))
10372 (synopsis "HTTP cookie parser and renderer")
10373 (description "A RFC 6265-compliant HTTP cookie parser and renderer in
10374 Python.")
10375 (home-page "https://gitlab.com/sashahart/cookies")
10376 (license license:expat)))
10377
10378 (define-public python2-cookies
10379 (package-with-python2 python-cookies))
10380
10381 (define-public python-responses
10382 (package
10383 (name "python-responses")
10384 (version "0.5.1")
10385 (source (origin
10386 (method url-fetch)
10387 (uri (pypi-uri "responses" version))
10388 (sha256
10389 (base32
10390 "1spcfxixyk9k7pk82jm6zqkwk031s95lh8q0mz7539jrb7269bcc"))))
10391 (build-system python-build-system)
10392 (arguments
10393 `(;; Test suite is not distributed:
10394 ;; https://github.com/getsentry/responses/issues/38
10395 #:tests? #f))
10396 (native-inputs
10397 `(("python-mock" ,python-mock)))
10398 (propagated-inputs
10399 `(("python-requests" ,python-requests)
10400 ("python-cookies" ,python-cookies)
10401 ("python-six" ,python-six)))
10402 (home-page "https://github.com/getsentry/responses")
10403 (synopsis "Utility for mocking out the `requests` Python library")
10404 (description "A utility library for mocking out the `requests` Python
10405 library.")
10406 (license license:asl2.0)))
10407
10408 (define-public python2-responses
10409 (package-with-python2 python-responses))
10410
10411 (define-public python-whoosh
10412 (package
10413 (name "python-whoosh")
10414 (version "2.7.4")
10415 (source
10416 (origin
10417 (method url-fetch)
10418 (uri (pypi-uri "Whoosh" version))
10419 (sha256
10420 (base32
10421 "10qsqdjpbc85fykc1vgcs8xwbgn4l2l52c8d83xf1q59pwyn79bw"))))
10422 (build-system python-build-system)
10423 (native-inputs
10424 `(("python-pytest" ,python-pytest)))
10425 (home-page "http://bitbucket.org/mchaput/whoosh")
10426 (synopsis "Full text indexing, search, and spell checking library")
10427 (description
10428 "Whoosh is a fast, pure-Python full text indexing, search, and spell
10429 checking library.")
10430 (license license:bsd-2)))
10431
10432 (define-public python2-whoosh
10433 (let ((whoosh (package-with-python2 (strip-python2-variant python-whoosh))))
10434 (package (inherit whoosh)
10435 (propagated-inputs
10436 `(("python2-backport-ssl-match-hostname"
10437 ,python2-backport-ssl-match-hostname)
10438 ,@(package-propagated-inputs whoosh))))))
10439
10440 (define-public python-pathlib
10441 (package
10442 (name "python-pathlib")
10443 (version "1.0.1")
10444 (source (origin
10445 (method url-fetch)
10446 (uri (pypi-uri "pathlib" version))
10447 (sha256
10448 (base32
10449 "17zajiw4mjbkkv6ahp3xf025qglkj0805m9s41c45zryzj6p2h39"))))
10450 (build-system python-build-system)
10451 ;; The tests depend on the internal "test" module, which does not provide
10452 ;; a stable interface.
10453 (arguments `(#:tests? #f))
10454 (home-page "https://pathlib.readthedocs.org/")
10455 (synopsis "Object-oriented file system paths")
10456 (description "Pathlib offers a set of classes to handle file system paths.
10457 It offers the following advantages over using string objects:
10458
10459 @enumerate
10460 @item No more cumbersome use of os and os.path functions. Everything can
10461 be done easily through operators, attribute accesses, and method calls.
10462 @item Embodies the semantics of different path types. For example,
10463 comparing Windows paths ignores casing.
10464 @item Well-defined semantics, eliminating any inconsistencies or
10465 ambiguities (forward vs. backward slashes, etc.).
10466 @end enumerate
10467
10468 Note: In Python 3.4, pathlib is now part of the standard library. For other
10469 Python versions please consider python-pathlib2 instead, which tracks the
10470 standard library module. This module (python-pathlib) isn't maintained
10471 anymore.")
10472 (license license:expat)))
10473
10474 (define-public python2-pathlib
10475 (package-with-python2 python-pathlib))
10476
10477 (define-public python2-pathlib2
10478 (package
10479 (name "python2-pathlib2")
10480 (version "2.1.0")
10481 (source (origin
10482 (method url-fetch)
10483 (uri (pypi-uri "pathlib2" version))
10484 (sha256
10485 (base32
10486 "0p050msg5c8d0kadv702jnfshaxrb0il765cpkgnhn6mq5hakcyy"))))
10487 (build-system python-build-system)
10488 ;; We only need the the Python 2 variant, since for Python 3 our minimum
10489 ;; version is 3.4 which already includes this package as part of the
10490 ;; standard library.
10491 (arguments
10492 `(#:python ,python-2))
10493 (native-inputs
10494 `(("python2-six" ,python2-six)))
10495 (home-page "http://pypi.python.org/pypi/pathlib2/")
10496 (synopsis "Object-oriented file system paths - backport of standard
10497 pathlib module")
10498 (description "The goal of pathlib2 is to provide a backport of standard
10499 pathlib module which tracks the standard library module, so all the newest
10500 features of the standard pathlib can be used also on older Python versions.
10501
10502 Pathlib offers a set of classes to handle file system paths. It offers the
10503 following advantages over using string objects:
10504
10505 @enumerate
10506 @item No more cumbersome use of os and os.path functions. Everything can
10507 be done easily through operators, attribute accesses, and method calls.
10508 @item Embodies the semantics of different path types. For example,
10509 comparing Windows paths ignores casing.
10510 @item Well-defined semantics, eliminating any inconsistencies or
10511 ambiguities (forward vs. backward slashes, etc.).
10512 @end enumerate")
10513 (license license:expat)))
10514
10515 (define-public python-jellyfish
10516 (package
10517 (name "python-jellyfish")
10518 (version "0.5.6")
10519 (source (origin
10520 (method url-fetch)
10521 (uri (pypi-uri "jellyfish" version))
10522 (sha256
10523 (base32
10524 "1j9rplb16ba2prjj6mip46z0w9pnhnqpwgiwi0x93vnas14rlyl8"))))
10525 (build-system python-build-system)
10526 (native-inputs
10527 `(("python-pytest" ,python-pytest)))
10528 (home-page "https://github.com/jamesturk/jellyfish")
10529 (synopsis "Approximate and phonetic matching of strings")
10530 (description "Jellyfish uses a variety of string comparison and phonetic
10531 encoding algorithms to do fuzzy string matching.")
10532 (license license:bsd-2)
10533 (properties `((python2-variant . ,(delay python2-jellyfish))))))
10534
10535 (define-public python2-jellyfish
10536 (let ((jellyfish (package-with-python2
10537 (strip-python2-variant python-jellyfish))))
10538 (package (inherit jellyfish)
10539 (native-inputs `(("python2-unicodecsv" ,python2-unicodecsv)
10540 ,@(package-native-inputs jellyfish))))))
10541
10542 (define-public python2-unicodecsv
10543 (package
10544 (name "python2-unicodecsv")
10545 (version "0.14.1")
10546 (source (origin
10547 (method url-fetch)
10548 ;; The test suite is not included in the PyPi release.
10549 ;; https://github.com/jdunck/python-unicodecsv/issues/19
10550 (uri (string-append "https://github.com/jdunck/python-unicodecsv/"
10551 "archive/" version ".tar.gz"))
10552 (file-name (string-append name "-" version ".tar.gz"))
10553 (sha256
10554 (base32
10555 "087nqanfcyp6mlfbbr5lva5f3w6iz1bybls9xlrb8icmc474wh4w"))))
10556 (build-system python-build-system)
10557 (arguments
10558 `(;; It supports Python 3, but Python 3 can already do Unicode CSV.
10559 #:python ,python-2))
10560 (native-inputs
10561 `(("python2-unittest2" ,python2-unittest2)))
10562 (home-page "https://github.com/jdunck/python-unicodecsv")
10563 (synopsis "Unicode CSV module for Python 2")
10564 (description "Unicodecsv is a drop-in replacement for Python 2.7's CSV
10565 module, adding support for Unicode strings.")
10566 (license license:bsd-2)))
10567
10568 (define-public python-rarfile
10569 (package
10570 (name "python-rarfile")
10571 (version "2.8")
10572 (source (origin
10573 (method url-fetch)
10574 (uri (pypi-uri "rarfile" version))
10575 (sha256
10576 (base32
10577 "0qfad483kcbga0bn4qmcz953xjk16r52fahiy46zzn56v80y89ra"))))
10578 (build-system python-build-system)
10579 (arguments
10580 '(#:phases
10581 (modify-phases %standard-phases
10582 (replace 'check
10583 ;; Many tests fail, but the installation proceeds.
10584 (lambda _ (zero? (system* "make" "-C" "test" "test")))))))
10585 (native-inputs
10586 `(("which" ,which))) ; required for tests
10587 (propagated-inputs
10588 `(("libarchive" ,libarchive)))
10589 (home-page "https://github.com/markokr/rarfile")
10590 (synopsis "RAR archive reader for Python")
10591 (description "This is Python module for RAR archive reading. The interface
10592 is made as zipfile like as possible.")
10593 (license license:isc)))
10594
10595 (define-public python2-rarfile
10596 (package-with-python2 python-rarfile))
10597
10598 (define-public python-magic
10599 (package
10600 (name "python-magic")
10601 (version "0.4.3")
10602 (source
10603 (origin
10604 (method url-fetch)
10605 (uri (string-append "https://github.com/ahupp/python-magic/archive/"
10606 version ".tar.gz"))
10607 (sha256
10608 (base32
10609 "17bgy92i7sb021f2s4mw1dcvpm6p1mi9jihridwy1pyn8mzvpjgk"))
10610 (file-name (string-append name "-" version "-checkout"))))
10611 (build-system python-build-system)
10612 (arguments
10613 ;; The tests are unreliable, so don't run them. The tests fail
10614 ;; under Python3 because they were written for Python2 and
10615 ;; contain import statements that do not work in Python3. One of
10616 ;; the tests fails under Python2 because its assertions are
10617 ;; overly stringent; it relies on comparing output strings which
10618 ;; are brittle and can change depending on the version of
10619 ;; libmagic being used and the system on which the test is
10620 ;; running. In my case, under GuixSD 0.10.0, only one test
10621 ;; failed, and it seems to have failed only because the version
10622 ;; of libmagic that is packaged in Guix outputs a slightly
10623 ;; different (but not wrong) string than the one that the test
10624 ;; expected.
10625 '(#:tests? #f
10626 #:phases (modify-phases %standard-phases
10627 ;; Replace a specific method call with a hard-coded
10628 ;; path to the necessary libmagic.so file in the
10629 ;; store. If we don't do this, then the method call
10630 ;; will fail to find the libmagic.so file, which in
10631 ;; turn will cause any application using
10632 ;; python-magic to fail.
10633 (add-before 'build 'hard-code-path-to-libmagic
10634 (lambda* (#:key inputs #:allow-other-keys)
10635 (let ((file (assoc-ref inputs "file")))
10636 (substitute* "magic.py"
10637 (("ctypes.util.find_library\\('magic'\\)")
10638 (string-append "'" file "/lib/libmagic.so'")))
10639 #t)))
10640 (add-before 'install 'disable-egg-compression
10641 (lambda _
10642 (let ((port (open-file "setup.cfg" "a")))
10643 (display "\n[easy_install]\nzip_ok = 0\n"
10644 port)
10645 (close-port port)
10646 #t))))))
10647 (inputs
10648 ;; python-magic needs to be able to find libmagic.so.
10649 `(("file" ,file)))
10650 (home-page "https://github.com/ahupp/python-magic")
10651 (synopsis "File type identification using libmagic")
10652 (description
10653 "This module uses ctypes to access the libmagic file type
10654 identification library. It makes use of the local magic database and
10655 supports both textual and MIME-type output. Note that this module and
10656 the python-file module both provide a \"magic.py\" file; these two
10657 modules, which are different and were developed separately, both serve
10658 the same purpose: to provide Python bindings for libmagic.")
10659 (license license:expat)))
10660
10661 (define-public python2-magic
10662 (package-with-python2 python-magic))
10663
10664 (define-public python2-s3cmd
10665 (package
10666 (name "python2-s3cmd")
10667 (version "1.6.1")
10668 (source
10669 (origin
10670 (method url-fetch)
10671 (uri (string-append "mirror://sourceforge/s3tools/s3cmd/" version "/"
10672 "s3cmd-" version ".tar.gz"))
10673 (sha256
10674 (base32
10675 "0ki1rzhm5icvi9ry5jswi4b22yqwyj0d2wsqsgilwx6qhi7pjxa6"))))
10676 (build-system python-build-system)
10677 (arguments
10678 ;; s3cmd is written for python2 only and contains no tests.
10679 `(#:python ,python-2
10680 #:tests? #f))
10681 (propagated-inputs
10682 `(("python2-dateutil" ,python2-dateutil)
10683 ;; The python-file package also provides a magic.py module.
10684 ;; This is an unfortunate state of affairs; however, s3cmd
10685 ;; fails to install if it cannot find specifically the
10686 ;; python-magic package. Thus we include it, instead of using
10687 ;; python-file. Ironically, s3cmd sometimes works better
10688 ;; without libmagic bindings at all:
10689 ;; https://github.com/s3tools/s3cmd/issues/198
10690 ("python2-magic" ,python2-magic)))
10691 (home-page "http://s3tools.org/s3cmd")
10692 (synopsis "Command line tool for S3-compatible storage services")
10693 (description
10694 "S3cmd is a command line tool for uploading, retrieving and managing data
10695 in storage services that are compatible with the Amazon Simple Storage
10696 Service (S3) protocol, including S3 itself. It supports rsync-like backup,
10697 GnuPG encryption, and more. It also supports management of Amazon's
10698 CloudFront content delivery network.")
10699 (license license:gpl2+)))
10700
10701 (define-public python-pkgconfig
10702 (package
10703 (name "python-pkgconfig")
10704 (version "1.1.0")
10705 (source
10706 (origin
10707 (method url-fetch)
10708 (uri (pypi-uri "pkgconfig" version))
10709 (sha256
10710 (base32
10711 "1pw0kmvc57sjmaxi6c54fqsnihqj6hvhc9y1vaz36axafzqam7bh"))))
10712 (build-system python-build-system)
10713 (native-inputs
10714 `(("python-nose" ,python-nose)))
10715 (inputs
10716 `(("pkg-config" ,pkg-config)))
10717 (arguments
10718 `(;; Tests fail with "ValueError: _type_ 'v' not supported" on Python 3,
10719 ;; and on Python 2 they need the dl module deprecated since Python 2.6.
10720 #:tests? #f
10721 ;; Hard-code the path to pkg-config.
10722 #:phases
10723 (modify-phases %standard-phases
10724 (add-before
10725 'build 'patch
10726 (lambda _
10727 (substitute* "pkgconfig/pkgconfig.py"
10728 (("cmd = 'pkg-config")
10729 (string-append "cmd = '" (which "pkg-config"))))
10730 #t)))))
10731 (home-page "https://github.com/matze/pkgconfig")
10732 (synopsis "Python interface for pkg-config")
10733 (description "This module provides a Python interface to pkg-config. It
10734 can be used to find all pkg-config packages, check if a package exists,
10735 check if a package meets certain version requirements, query CFLAGS and
10736 LDFLAGS and parse the output to build extensions with setup.py.")
10737 (license license:expat)))
10738
10739 (define-public python2-pkgconfig
10740 (package-with-python2 python-pkgconfig))
10741
10742 (define-public python-bz2file
10743 (package
10744 (name "python-bz2file")
10745 (version "0.98")
10746 (source
10747 (origin
10748 (method url-fetch)
10749 (uri (pypi-uri "bz2file" version))
10750 (sha256
10751 (base32
10752 "126s53fkpx04f33a829yqqk8fj4png3qwg4m66cvlmhmwc8zihb4"))))
10753 (build-system python-build-system)
10754 (arguments
10755 `(#:tests? #f)) ; Tests use deprecated python modules.
10756 (home-page "https://github.com/nvawda/bz2file")
10757 (synopsis "Read and write bzip2-compressed files")
10758 (description
10759 "Bz2file is a Python library for reading and writing bzip2-compressed
10760 files. It contains a drop-in replacement for the I/O interface in the
10761 standard library's @code{bz2} module, including features from the latest
10762 development version of CPython that are not available in older releases.")
10763 (license license:asl2.0)
10764 (properties `((python2-variant . ,(delay python2-bz2file))))))
10765
10766 (define-public python2-bz2file
10767 (let ((base (package-with-python2
10768 (strip-python2-variant python-bz2file))))
10769 (package
10770 (inherit base)
10771 (arguments
10772 `(#:python ,python-2
10773 #:phases
10774 (modify-phases %standard-phases
10775 ;; 'python setup.py test' does not work as of 0.98.
10776 ;; There is only the one test file, so we run it directly.
10777 (replace 'check
10778 (lambda _ (zero? (system* "python"
10779 "test_bz2file.py"))))))))))
10780
10781 (define-public python-future
10782 (package
10783 (name "python-future")
10784 (version "0.16.0")
10785 (source
10786 (origin
10787 (method url-fetch)
10788 (uri (pypi-uri "future" version))
10789 (sha256
10790 (base32
10791 "1nzy1k4m9966sikp0qka7lirh8sqrsyainyf8rk97db7nwdfv773"))))
10792 (build-system python-build-system)
10793 ;; Many tests connect to the network or are otherwise flawed.
10794 ;; https://github.com/PythonCharmers/python-future/issues/210
10795 (arguments
10796 `(#:tests? #f))
10797 (home-page "http://python-future.org")
10798 (synopsis "Single-source support for Python 3 and 2")
10799 (description
10800 "@code{python-future} is the missing compatibility layer between Python 2 and
10801 Python 3. It allows you to use a single, clean Python 3.x-compatible codebase
10802 to support both Python 2 and Python 3 with minimal overhead.")
10803 (license license:expat)))
10804
10805 (define-public python2-future
10806 (package-with-python2 python-future))
10807
10808 (define-public python-cysignals
10809 (package
10810 (name "python-cysignals")
10811 (version "1.1.0")
10812 (source
10813 (origin
10814 (method url-fetch)
10815 (uri (pypi-uri "cysignals" version ".tar.bz2"))
10816 (sha256
10817 (base32
10818 "14cbyd9znlz6cxy1s3g6v6dv5jj45hn27pywkidd9b1zanaysqc6"))))
10819 (build-system python-build-system)
10820 (native-inputs
10821 `(("python-cython" ,python-cython)
10822 ("python-sphinx" ,python-sphinx)))
10823 (inputs
10824 `(("pari-gp" ,pari-gp)))
10825 (arguments
10826 `(#:modules ((guix build python-build-system)
10827 ((guix build gnu-build-system) #:prefix gnu:)
10828 (guix build utils))
10829 ;; FIXME: Tests are executed after installation and currently fail
10830 ;; when not installing into standard locations; the author is working
10831 ;; on a fix.
10832 #:tests? #f
10833 #:phases
10834 (modify-phases %standard-phases
10835 (add-before
10836 'build 'configure
10837 (assoc-ref gnu:%standard-phases 'configure)))))
10838 (home-page
10839 "https://github.com/sagemath/cysignals")
10840 (synopsis
10841 "Handling of interrupts and signals for Cython")
10842 (description
10843 "The cysignals package provides mechanisms to handle interrupts (and
10844 other signals and errors) in Cython code, using two related approaches,
10845 for mixed Cython/Python code or external C libraries and pure Cython code,
10846 respectively.")
10847 (license license:lgpl3+)))
10848
10849 (define-public python2-cysignals
10850 (package-with-python2 python-cysignals))
10851
10852 (define-public python2-shedskin
10853 (package
10854 (name "python2-shedskin")
10855 (version "0.9.4")
10856 (source
10857 (origin
10858 (method url-fetch)
10859 (uri (string-append "https://github.com/shedskin/shedskin/"
10860 "releases/download/v" version
10861 "/shedskin-" version ".tgz"))
10862 (sha256
10863 (base32
10864 "0nzwrzgw1ga8rw6f0ryq7zr9kkiavd1cqz5hzxkcbicl1dk7kz41"))))
10865 (build-system python-build-system)
10866 (arguments
10867 `(#:python ,python-2
10868 #:phases (modify-phases %standard-phases
10869 (add-after 'unpack 'fix-resulting-include-libs
10870 (lambda* (#:key inputs #:allow-other-keys)
10871 (let ((libgc (assoc-ref inputs "libgc"))
10872 (pcre (assoc-ref inputs "pcre")))
10873 (substitute* "shedskin/makefile.py"
10874 (("variable == 'CCFLAGS':[ ]*")
10875 (string-append "variable == 'CCFLAGS':\n"
10876 " line += ' -I " pcre "/include"
10877 " -I " libgc "/include'"))
10878 (("variable == 'LFLAGS':[ ]*")
10879 (string-append "variable == 'LFLAGS':\n"
10880 " line += ' -L" pcre "/lib"
10881 " -L " libgc "/lib'")))
10882 #t))))))
10883 (inputs `(("pcre" ,pcre)
10884 ("libgc" ,libgc)))
10885 (home-page "https://shedskin.github.io/")
10886 (synopsis "Experimental Python-2 to C++ Compiler")
10887 (description (string-append "This is an experimental compiler for a subset of
10888 Python. It generates C++ code and a Makefile."))
10889 (license (list license:gpl3 license:bsd-3 license:expat))))
10890
10891 (define-public python2-rope
10892 (package
10893 (name "python2-rope")
10894 (version "0.10.3")
10895 (source
10896 (origin
10897 (method url-fetch)
10898 (uri (pypi-uri "rope" version))
10899 (sha256
10900 (base32
10901 "18k5znhpwvrfck3yp0jmhd5j8r0f0s8bk1zh5yhs2cfgmfhbwigb"))))
10902 (arguments
10903 ;; Rope is currently python-2 only.
10904 ;; https://github.com/python-rope/rope/issues/57
10905 `(#:python ,python-2))
10906 (build-system python-build-system)
10907 (native-inputs
10908 `(("python2-unittest2" ,python2-unittest2)))
10909 (home-page "https://github.com/python-rope/rope")
10910 (synopsis "Refactoring library for Python")
10911 (description "Rope is a refactoring library for Python. It facilitates
10912 the renaming, moving and extracting of attributes, functions, modules, fields
10913 and parameters in Python 2 source code. These refactorings can also be applied
10914 to occurrences in strings and comments.")
10915 (license license:gpl2)))
10916
10917 (define-public python-py3status
10918 (package
10919 (name "python-py3status")
10920 (version "3.1")
10921 (source
10922 (origin
10923 (method url-fetch)
10924 (uri (pypi-uri "py3status" version))
10925 (sha256
10926 (base32
10927 "0i283z1pivmir61z8kbiycigc94l61v33ygzkhczf1ifq7cppyds"))))
10928 (build-system python-build-system)
10929 (arguments
10930 '(#:tests? #f)) ; TODO: Requires many libraries not in Guix.
10931 (home-page "https://github.com/ultrabug/py3status")
10932 (synopsis "Extensible i3status wrapper written in Python")
10933 (description "py3status is an i3status wrapper which extends i3status
10934 functionality in a modular way, allowing you to extend your panel with your
10935 own code, responding to click events and updating clock every second.")
10936 (license license:bsd-3)))
10937
10938 (define-public python-tblib
10939 (package
10940 (name "python-tblib")
10941 (version "1.3.0")
10942 (source (origin
10943 (method url-fetch)
10944 (uri (pypi-uri "tblib" version))
10945 (sha256 (base32
10946 "02iahfkfa927hb4jq2bak36ldihwapzacfiq5lyxg8llwn98a1yi"))))
10947 (build-system python-build-system)
10948 (arguments
10949 `(#:phases
10950 (modify-phases %standard-phases
10951 (replace 'check
10952 (lambda _
10953 ;; Upstream runs tests after installation and the package itself
10954 ;; resides in a subdirectory. Extend PYTHONPATH so it will be
10955 ;; found.
10956 (setenv "PYTHONPATH"
10957 (string-append (getcwd) "/build/lib:"
10958 (getenv "PYTHONPATH")))
10959 (zero? (system* "py.test" "-vv" "tests" "README.rst")))))))
10960 (native-inputs
10961 `(("python-pytest" ,python-pytest)
10962 ("python-six" ,python-six)))
10963 (home-page "https://github.com/ionelmc/python-tblib")
10964 (synopsis "Traceback serialization library")
10965 (description
10966 "Traceback serialization allows you to:
10967
10968 @enumerate
10969 @item Pickle tracebacks and raise exceptions with pickled tracebacks in
10970 different processes. This allows better error handling when running code over
10971 multiple processes (imagine multiprocessing, billiard, futures, celery etc).
10972
10973 @item Parse traceback strings and raise with the parsed tracebacks.
10974 @end enumerate\n")
10975 (license license:bsd-3)))
10976
10977 (define-public python2-tblib
10978 (package-with-python2 python-tblib))
10979
10980 (define-public python-sqlparse
10981 (package
10982 (name "python-sqlparse")
10983 (version "0.1.19")
10984 (source (origin
10985 (method url-fetch)
10986 (uri (pypi-uri "sqlparse" version))
10987 (sha256
10988 (base32
10989 "1s2fvaxgh9kqzrd6iwy5h7i61ckn05plx9np13zby93z3hdbx5nq"))))
10990 (build-system python-build-system)
10991 (arguments
10992 `(#:phases
10993 (modify-phases %standard-phases
10994 (replace 'check
10995 (lambda* _
10996 ;; setup.py-integrated 2to3 only affects the build files, but
10997 ;; py.test is using the source files. So we need to convert them
10998 ;; manually.
10999 (when (zero? (system* "python3"))
11000 (system* "2to3" "--no-diff" "-wn" "sqlparse" "tests"))
11001 (zero? (system* "py.test")))))))
11002 (native-inputs
11003 `(("python-pytest" ,python-pytest)))
11004 (home-page "https://github.com/andialbrecht/sqlparse")
11005 (synopsis "Non-validating SQL parser")
11006 (description "Sqlparse is a non-validating SQL parser for Python. It
11007 provides support for parsing, splitting and formatting SQL statements.")
11008 (license license:bsd-3)))
11009
11010 (define-public python2-sqlparse
11011 (package-with-python2 python-sqlparse))
11012
11013 (define-public python-greenlet
11014 (package
11015 (name "python-greenlet")
11016 (version "0.4.11")
11017 (source (origin
11018 (method url-fetch)
11019 (uri (pypi-uri "greenlet" version))
11020 (sha256
11021 (base32
11022 "1xhik26j4f3kc4qw9xmj0c567rb5h1zryb4ijwqnqwwjvfhbv59h"))))
11023 (build-system python-build-system)
11024 (home-page "https://greenlet.readthedocs.io/")
11025 (synopsis "Lightweight in-process concurrent programming")
11026 (description
11027 "Greenlet package is a spin-off of Stackless, a version of CPython
11028 that supports micro-threads called \"tasklets\". Tasklets run
11029 pseudo-concurrently (typically in a single or a few OS-level threads) and
11030 are synchronized with data exchanges on \"channels\".")
11031 (license (list license:psfl license:expat))))
11032
11033 (define-public python2-greenlet
11034 (package-with-python2 python-greenlet))
11035
11036 (define-public python-gevent
11037 (package
11038 (name "python-gevent")
11039 (version "1.1.1")
11040 (source (origin
11041 (method url-fetch)
11042 (uri (pypi-uri "gevent" version))
11043 (sha256
11044 (base32
11045 "1smf3kvidpdiyi2c81alal74p2zm0clrm6xbyy6y1k9a3f2vkrbf"))
11046 (modules '((guix build utils)))
11047 (snippet
11048 '(begin
11049 ;; unbunding libev and c-ares
11050 (for-each delete-file-recursively '("libev" "c-ares"))
11051 ;; fixing testsuite
11052 (call-with-output-file "greentest/__init__.py" noop)
11053 (substitute* "greentest/testrunner.py"
11054 (("import util") "from . import util")
11055 (("from util import log") "from .util import log"))))))
11056 (build-system python-build-system)
11057 (propagated-inputs
11058 `(("python-greenlet" ,python-greenlet)))
11059 (native-inputs
11060 `(("python-six" ,python-six)))
11061 (inputs
11062 `(("c-ares" ,c-ares)
11063 ("libev" ,libev)))
11064 (home-page "http://www.gevent.org/")
11065 (synopsis "Coroutine-based network library")
11066 (description
11067 "gevent is a coroutine-based Python networking library that uses greenlet
11068 to provide a high-level synchronous API on top of the libev event loop.")
11069 (license license:expat)))
11070
11071 (define-public python2-gevent
11072 (package-with-python2 python-gevent))
11073
11074 (define-public python-geventhttpclient
11075 (package
11076 (name "python-geventhttpclient")
11077 (version "1.3.1")
11078 (source (origin
11079 (method url-fetch)
11080 (uri (pypi-uri "geventhttpclient" version))
11081 (sha256
11082 (base32
11083 "07d0q3wzmml75227r6y6mrl5a0zpf4v9gj0ni5rhbyzmaj4az1xx"))
11084 (modules '((guix build utils)))
11085 (snippet
11086 '(begin
11087 ;; Delete pre-compiled files.
11088 (for-each delete-file (find-files "src/geventhttpclient"
11089 ".*\\.pyc"))
11090 #t))))
11091 (build-system python-build-system)
11092 (arguments
11093 '(#:phases
11094 (modify-phases %standard-phases
11095 (add-after 'unpack 'delete-network-tests
11096 (lambda _
11097 (delete-file "src/geventhttpclient/tests/test_client.py")
11098 #t))
11099 (delete 'check)
11100 (add-after 'install 'check
11101 (lambda* (#:key inputs outputs #:allow-other-keys)
11102 (add-installed-pythonpath inputs outputs)
11103 (zero? (system* "py.test" "src/geventhttpclient/tests" "-v")))))))
11104 (native-inputs
11105 `(("python-pytest" ,python-pytest)))
11106 (propagated-inputs
11107 `(("python-certifi" ,python-certifi)
11108 ("python-gevent" ,python-gevent)
11109 ("python-six" ,python-six)))
11110 (home-page "https://github.com/gwik/geventhttpclient")
11111 (synopsis "HTTP client library for gevent")
11112 (description "@code{python-geventhttpclient} is a high performance,
11113 concurrent HTTP client library for python using @code{gevent}.")
11114 (license license:expat)))
11115
11116 (define-public python2-geventhttpclient
11117 (package-with-python2 python-geventhttpclient))
11118
11119 (define-public python-fastimport
11120 (package
11121 (name "python-fastimport")
11122 (version "0.9.6")
11123 (source
11124 (origin
11125 (method url-fetch)
11126 (uri (pypi-uri "fastimport" version))
11127 (sha256
11128 (base32 "1aqjsin4rmqm7ln4j0p73fzxifws6c6ikgyhav7r137m2ixsxl43"))))
11129 (build-system python-build-system)
11130 (home-page "https://github.com/jelmer/python-fastimport")
11131 (synopsis "VCS fastimport parser and generator in Python")
11132 (description "This package provides a parser for and generator of the Git
11133 @url{https://www.kernel.org/pub/software/scm/git/docs/git-fast-import.html,fastimport}
11134 format.")
11135 (license license:gpl2+)))
11136
11137 (define-public python2-fastimport
11138 (package-with-python2 python-fastimport))
11139
11140 (define-public python-twisted
11141 (package
11142 (name "python-twisted")
11143 (version "16.2.0")
11144 (source (origin
11145 (method url-fetch)
11146 (uri (pypi-uri "Twisted" version ".tar.bz2"))
11147 (sha256
11148 (base32
11149 "0ydxrp9myw1mvsz3qfzx5579y5llmqa82pxvqchgp5syczffi450"))))
11150 (build-system python-build-system)
11151 (arguments
11152 '(#:tests? #f)) ; FIXME: Some tests are failing.
11153 ;; #:phases
11154 ;; (modify-phases %standard-phases
11155 ;; (replace 'check
11156 ;; (lambda _
11157 ;; (zero? (system* "./bin/trial" "twisted")))))
11158 (propagated-inputs
11159 `(("python-zope-interface" ,python-zope-interface)))
11160 (home-page "https://twistedmatrix.com/")
11161 (synopsis "Asynchronous networking framework written in Python")
11162 (description
11163 "Twisted is an extensible framework for Python programming, with special
11164 focus on event-based network programming and multiprotocol integration.")
11165 (license license:expat)))
11166
11167 (define-public python2-twisted
11168 (package-with-python2 python-twisted))
11169
11170 (define-public python-pika
11171 (package
11172 (name "python-pika")
11173 (version "0.10.0")
11174 (source
11175 (origin
11176 (method url-fetch)
11177 (uri (pypi-uri "pika" version))
11178 (sha256
11179 (base32
11180 "0nb4h08di432lv7dy2v9kpwgk0w92f24sqc2hw2s9vwr5b8v8xvj"))))
11181 (build-system python-build-system)
11182 (native-inputs
11183 `(("python-pyev" ,python-pyev)
11184 ("python-tornado" ,python-tornado)
11185 ("python-twisted" ,python-twisted)))
11186 (home-page "https://pika.readthedocs.org")
11187 (synopsis "Pure Python AMQP Client Library")
11188 (description
11189 "Pika is a pure-Python implementation of the AMQP (Advanced Message Queuing
11190 Protocol) 0-9-1 protocol that tries to stay fairly independent of the underlying
11191 network support library.")
11192 (license license:bsd-3)))
11193
11194 (define-public python2-pika
11195 (package-with-python2 python-pika))
11196
11197 (define-public python-ply
11198 (package
11199 (name "python-ply")
11200 (version "3.9")
11201 (source
11202 (origin
11203 (method url-fetch)
11204 (uri (pypi-uri "ply" version))
11205 (sha256
11206 (base32
11207 "0gpl0yli3w03ipyqfrp3w5nf0iawhsq65anf5wwm2wf5p502jzhd"))))
11208 (build-system python-build-system)
11209 (home-page "http://www.dabeaz.com/ply/")
11210 (synopsis "Python Lex & Yacc")
11211 (description "PLY is a @code{lex}/@code{yacc} implemented purely in Python.
11212 It uses LR parsing and does extensive error checking.")
11213 (license license:bsd-3)))
11214
11215 (define-public python2-ply
11216 (package-with-python2 python-ply))
11217
11218 (define-public python-tabulate
11219 (package
11220 (name "python-tabulate")
11221 (version "0.7.7")
11222 (source (origin
11223 (method url-fetch)
11224 (uri (pypi-uri "tabulate" version))
11225 (sha256
11226 (base32
11227 "1inqhspd4frxnp08c32yndr0lc4px1xfkqah184i5w09gkhvi843"))))
11228 (build-system python-build-system)
11229 (arguments
11230 ;; FIXME: The pypi release tarball is missing a 'test/common.py'
11231 ;; and the latest release is not tagged in the upstream repository.
11232 '(#:tests? #f))
11233 (home-page "https://bitbucket.org/astanin/python-tabulate")
11234 (synopsis "Pretty-print tabular data")
11235 (description
11236 "Tabulate is a library and command-line utility to pretty-print tabular
11237 data in Python.")
11238 (license license:expat)))
11239
11240 (define-public python2-tabulate
11241 (package-with-python2 python-tabulate))
11242
11243 (define-public python-kazoo
11244 (package
11245 (name "python-kazoo")
11246 (version "2.2.1")
11247 (source
11248 (origin
11249 (method url-fetch)
11250 (uri (pypi-uri "kazoo" version))
11251 (sha256
11252 (base32
11253 "10pb864if9qi2pq9lfb9m8f7z7ss6rml80gf1d9h64lap5crjnjj"))))
11254 (build-system python-build-system)
11255 (arguments '(#:tests? #f)) ; XXX: needs zookeeper
11256 (propagated-inputs
11257 `(("python-six" ,python-six)))
11258 (home-page "https://kazoo.readthedocs.org")
11259 (synopsis "High-level Zookeeper client library")
11260 (description
11261 "Kazoo is a Python client library for the Apache Zookeeper distributed
11262 application service. It is designed to be easy to use and to avoid common
11263 programming errors.")
11264 (license license:asl2.0)))
11265
11266 (define-public python2-kazoo
11267 (package-with-python2 python-kazoo))
11268
11269 (define-public python-pykafka
11270 (package
11271 (name "python-pykafka")
11272 (version "2.4.0")
11273 (source (origin
11274 (method url-fetch)
11275 (uri (string-append
11276 "https://pypi.python.org/packages/8b/3e/"
11277 "384eeff406b06315738b62483fd2126c6e4f544167116b17cc04ea7d2a59/"
11278 "pykafka-" version ".tar.gz"))
11279 (sha256
11280 (base32
11281 "1id6sr159p6aa13bxcqyr9gln8sqg1l0ddzns5iws8kk5q1p5cfv"))))
11282 (build-system python-build-system)
11283 (arguments '(#:tests? #f)) ; XXX: needs zookeeper, kafka, etc.
11284 (propagated-inputs
11285 `(("python-gevent" ,python-gevent)
11286 ("python-kazoo" ,python-kazoo)
11287 ("python-tabulate" ,python-tabulate)))
11288 (inputs
11289 `(("librdkafka" ,librdkafka)))
11290 (home-page "https://pykafka.readthedocs.io/")
11291 (synopsis "Apache Kafka client for Python")
11292 (description
11293 "PyKafka is a client for the Apache Kafka distributed messaging system.
11294 It includes Python implementations of Kafka producers and consumers, which
11295 are optionally backed by a C extension built on librdkafka.")
11296 (license license:asl2.0)))
11297
11298 (define-public python2-pykafka
11299 (package-with-python2 python-pykafka))
11300
11301 (define-public python-wcwidth
11302 (package
11303 (name "python-wcwidth")
11304 (version "0.1.7")
11305 (source
11306 (origin
11307 (method url-fetch)
11308 (uri (pypi-uri "wcwidth" version))
11309 (sha256
11310 (base32
11311 "0pn6dflzm609m4r3i8ik5ni9ijjbb5fa3vg1n7hn6vkd49r77wrx"))))
11312 (build-system python-build-system)
11313 (home-page "https://github.com/jquast/wcwidth")
11314 (synopsis "Measure number of terminal column cells of wide-character codes")
11315 (description "Wcwidth measures the number of terminal column cells of
11316 wide-character codes. It is useful for those implementing a terminal emulator,
11317 or programs that carefully produce output to be interpreted by one. It is a
11318 Python implementation of the @code{wcwidth} and @code{wcswidth} C functions
11319 specified in POSIX.1-2001 and POSIX.1-2008.")
11320 (license license:expat)))
11321
11322 (define-public python2-wcwidth
11323 (package-with-python2 python-wcwidth))
11324
11325 (define-public python2-jsonrpclib
11326 (package
11327 (name "python2-jsonrpclib")
11328 (version "0.1.7")
11329 (source (origin
11330 (method url-fetch)
11331 (uri (string-append
11332 "https://pypi.python.org/packages/source/j/jsonrpclib/"
11333 "jsonrpclib-" version ".tar.gz"))
11334 (sha256
11335 (base32
11336 "02vgirw2bcgvpcxhv5hf3yvvb4h5wzd1lpjx8na5psdmaffj6l3z"))))
11337 (build-system python-build-system)
11338 (arguments
11339 `(#:tests? #f
11340 #:python ,python-2))
11341 (home-page "https://github.com/joshmarshall/jsonrpclib/")
11342 (synopsis "Implementation of JSON-RPC specification for Python")
11343 (description
11344 "This library is an implementation of the JSON-RPC specification.
11345 It supports both the original 1.0 specification, as well as the
11346 new (proposed) 2.0 spec, which includes batch submission, keyword arguments,
11347 etc.")
11348 (license license:asl2.0)))
11349
11350 (define-public python-chai
11351 (package
11352 (name "python-chai")
11353 (version "1.1.1")
11354 (source (origin
11355 (method url-fetch)
11356 (uri (pypi-uri "chai" version))
11357 (sha256
11358 (base32
11359 "016kf3irrclpkpvcm7q0gmkfibq7jgy30a9v73pp42bq9h9a32bl"))))
11360 (build-system python-build-system)
11361 (home-page "https://github.com/agoragames/chai")
11362 (synopsis "Mocking framework for Python")
11363 (description
11364 "Chai provides an api for mocking, stubbing and spying your python
11365 objects, patterned after the Mocha library for Ruby.")
11366 (license license:bsd-3)))
11367
11368 (define-public python2-chai
11369 (package-with-python2 python-chai))
11370
11371 (define-public python-arrow
11372 (package
11373 (name "python-arrow")
11374 (version "0.8.0")
11375 (source (origin
11376 (method url-fetch)
11377 (uri (pypi-uri "arrow" version))
11378 (sha256
11379 (base32
11380 "1bz7hkdgpqcjs866y58z8jywpy7al0f4rxdr00bh2l5qddyw245j"))))
11381 (build-system python-build-system)
11382 (native-inputs
11383 `(;; For testing
11384 ("python-chai" ,python-chai)
11385 ("python-simplejson" ,python-simplejson)))
11386 (propagated-inputs
11387 `(("python-dateutil" ,python-dateutil)))
11388 (home-page "https://github.com/crsmithdev/arrow/")
11389 (synopsis "Dates and times for Python")
11390 (description
11391 "Arrow is a Python library to creating, manipulating, formatting and
11392 converting dates, times, and timestamps. It implements and updates the
11393 datetime type.")
11394 (license license:asl2.0)))
11395
11396 (define-public python2-arrow
11397 (package-with-python2 python-arrow))
11398
11399 (define-public python-inflection
11400 (package
11401 (name "python-inflection")
11402 (version "0.3.1")
11403 (source
11404 (origin (method url-fetch)
11405 (uri (pypi-uri "inflection" version))
11406 (sha256
11407 (base32
11408 "1jhnxgnw8y3mbzjssixh6qkc7a3afc4fygajhqrqalnilyvpzshq"))))
11409 (build-system python-build-system)
11410 (native-inputs
11411 `(("python-pytest" ,python-pytest)))
11412 (home-page "https://github.com/jpvanhal/inflection")
11413 (synopsis "Python string transformation library")
11414 (description
11415 "Inflection is a string transformation library. It singularizes
11416 and pluralizes English words, and transforms strings from CamelCase to
11417 underscored string.")
11418 (license license:expat)))
11419
11420 (define-public python2-inflection
11421 (package-with-python2 python-inflection))
11422
11423 (define-public python-pylev
11424 (package
11425 (name "python-pylev")
11426 (version "1.3.0")
11427 (source (origin
11428 (method url-fetch)
11429 (uri (pypi-uri "pylev" version))
11430 (sha256
11431 (base32
11432 "1hz1x9blsbxya1y9nnhnwwdnqmakxi9mc0jkwj0rn6b1h44i0f86"))))
11433 (build-system python-build-system)
11434 (home-page "https://github.com/toastdriven/pylev")
11435 (synopsis "Levenshtein distance implementation in Python")
11436 (description "Pure Python Levenshtein implementation, based off the
11437 Wikipedia code samples at
11438 @url{http://en.wikipedia.org/wiki/Levenshtein_distance}.")
11439 (license license:bsd-3)))
11440
11441 (define-public python2-pylev
11442 (package-with-python2 python-pylev))
11443
11444 (define-public python-cleo
11445 (package
11446 (name "python-cleo")
11447 (version "0.4.1")
11448 (source (origin
11449 (method url-fetch)
11450 (uri (pypi-uri "cleo" version))
11451 (sha256
11452 (base32
11453 "1k2dcl6mqpn5bljyl6w42rqyd9mb3y9kh2mg7m2x3kfjwvg0rpva"))))
11454 (build-system python-build-system)
11455 (native-inputs
11456 `(;; For testing
11457 ("python-mock" ,python-mock)
11458 ("python-pytest" ,python-pytest)))
11459 (propagated-inputs
11460 `(("python-psutil" ,python-psutil)
11461 ("python-pylev" ,python-pylev)))
11462 (home-page "https://github.com/sdispater/cleo")
11463 (synopsis "Command-line arguments library for Python")
11464 (description
11465 "Cleo allows you to create command-line commands with signature in
11466 docstring and colored output.")
11467 (license license:expat)))
11468
11469 (define-public python2-cleo
11470 (package-with-python2 python-cleo))
11471
11472 (define-public python-lazy-object-proxy
11473 (package
11474 (name "python-lazy-object-proxy")
11475 (version "1.2.2")
11476 (source (origin
11477 (method url-fetch)
11478 (uri (pypi-uri "lazy-object-proxy" version))
11479 (sha256
11480 (base32
11481 "0s22aqqkdscyh8sjspyyax7qa1aiz8p4midrnyf39717fhfczm6x"))))
11482 (build-system python-build-system)
11483 (home-page "https://github.com/ionelmc/python-lazy-object-proxy")
11484 (synopsis "Lazy object proxy for python")
11485 (description
11486 "Lazy object proxy is an object that wraps a callable but defers the call
11487 until the object is actually required, and caches the result of said call.")
11488 (license license:bsd-2)))
11489
11490 (define-public python2-lazy-object-proxy
11491 (package-with-python2 python-lazy-object-proxy))
11492
11493 (define-public python-dnspython
11494 (package
11495 (name "python-dnspython")
11496 (version "1.15.0")
11497 (source (origin
11498 (method url-fetch)
11499 (uri (string-append "http://www.dnspython.org/kits/"
11500 version "/dnspython-" version ".tar.gz"))
11501 (sha256
11502 (base32
11503 "0jr4v2pd90i6l1xxbss2m05psbjaxvyvvvpq44wycijpfgjqln8i"))))
11504 (build-system python-build-system)
11505 (arguments '(#:tests? #f)) ; XXX: requires internet access
11506 (home-page "http://www.dnspython.org")
11507 (synopsis "DNS toolkit for Python")
11508 (description
11509 "dnspython is a DNS toolkit for Python. It supports almost all record
11510 types. It can be used for queries, zone transfers, and dynamic updates.
11511 It supports TSIG authenticated messages and EDNS0.")
11512 (license license:expat)))
11513
11514 (define-public python2-dnspython
11515 (package-with-python2 python-dnspython))
11516
11517 (define-public python-email-validator
11518 (package
11519 (name "python-email-validator")
11520 (version "1.0.2")
11521 (source
11522 (origin (method url-fetch)
11523 (uri (pypi-uri "email_validator" version))
11524 (sha256
11525 (base32
11526 "1ja9149l9ck5n45a72h3is7v476hjny5ybxbcamx1nw6iplsm7k6"))))
11527 (build-system python-build-system)
11528 (arguments
11529 '(#:phases
11530 (modify-phases %standard-phases
11531 (add-before 'build 'use-dnspython
11532 (lambda _
11533 (substitute* "setup.py"
11534 (("dnspython3") "dnspython"))
11535 #t)))))
11536 (propagated-inputs
11537 `(("python-dnspython" ,python-dnspython)
11538 ("python-idna" ,python-idna)))
11539 (home-page "https://github.com/JoshData/python-email-validator")
11540 (synopsis "Email address validation library for Python")
11541 (description
11542 "This library validates email address syntax and deliverability.")
11543 (license license:cc0)))
11544
11545 (define-public python2-email-validator
11546 (package-with-python2 python-email-validator))
11547
11548 (define-public python-ukpostcodeparser
11549 (package
11550 (name "python-ukpostcodeparser")
11551 (version "1.0.3")
11552 (source (origin
11553 (method url-fetch)
11554 (uri (pypi-uri "UkPostcodeParser" version))
11555 (sha256
11556 (base32
11557 "1jwg9z4rz51mcka1821rwgycsd0mcicyp1kiwjfa2kvg8bm9p2qd"))))
11558 (build-system python-build-system)
11559 (home-page "https://github.com/hamstah/ukpostcodeparser")
11560 (synopsis "UK Postcode parser for Python")
11561 (description
11562 "This library provides the @code{parse_uk_postcode} function for
11563 parsing UK postcodes.")
11564 (license license:expat)))
11565
11566 (define-public python2-ukpostcodeparser
11567 (package-with-python2 python-ukpostcodeparser))
11568
11569 (define-public python-faker
11570 (package
11571 (name "python-faker")
11572 (version "0.7.9")
11573 (source (origin
11574 (method url-fetch)
11575 (uri (pypi-uri "Faker" version))
11576 (sha256
11577 (base32
11578 "1fh2p2yz0fsdr4fqwxgddwbvfb6qn6vp8yx0qwqzra27yq5d1wsm"))
11579 (patches
11580 (search-patches "python-faker-fix-build-32bit.patch"))
11581 (modules '((guix build utils)))
11582 (snippet
11583 '(begin
11584 (for-each delete-file (find-files "." "\\.pyc$"))
11585 #t))))
11586 (build-system python-build-system)
11587 (arguments
11588 '(#:phases
11589 (modify-phases %standard-phases
11590 (replace 'check
11591 (lambda _
11592 (zero? (system* "python" "-m" "unittest" "-v" "tests")))))))
11593 (native-inputs
11594 `(;; For testing
11595 ("python-email-validator" ,python-email-validator)
11596 ("python-mock" ,python-mock)
11597 ("python-ukpostcodeparser" ,python-ukpostcodeparser)))
11598 (propagated-inputs
11599 `(("python-dateutil" ,python-dateutil)
11600 ("python-six" ,python-six)))
11601 (home-page "https://github.com/joke2k/faker")
11602 (synopsis "Python package that generates fake data")
11603 (description
11604 "Faker is a Python package that generates fake data such as names,
11605 addresses, and phone numbers.")
11606 (license license:expat)
11607 (properties `((python2-variant . ,(delay python2-faker))))))
11608
11609 (define-public python2-faker
11610 (let ((base (package-with-python2 (strip-python2-variant
11611 python-faker))))
11612 (package
11613 (inherit base)
11614 (propagated-inputs
11615 `(("python2-ipaddress" ,python2-ipaddress)
11616 ,@(package-propagated-inputs base))))))
11617
11618 (define-public python-fake-factory
11619 (package
11620 (name "python-fake-factory")
11621 (version "0.7.2")
11622 (source (origin
11623 (method url-fetch)
11624 (uri (pypi-uri "fake-factory" version))
11625 (sha256
11626 (base32
11627 "0vs0dkmg0dlaxf8w6q2i3k0i03gmp56ablldv7ci9x3nbadkn71g"))
11628 (patches
11629 (search-patches
11630 "python-fake-factory-fix-build-32bit.patch"))))
11631 (build-system python-build-system)
11632 (arguments
11633 '(#:phases
11634 (modify-phases %standard-phases
11635 (replace 'check
11636 (lambda _
11637 (zero? (system* "python" "-m" "unittest" "-v" "faker.tests")))))))
11638 (native-inputs
11639 `(;; For testing
11640 ("python-email-validator" ,python-email-validator)
11641 ("python-mock" ,python-mock)
11642 ("python-ukpostcodeparser" ,python-ukpostcodeparser)))
11643 (propagated-inputs
11644 `(("python-dateutil" ,python-dateutil)
11645 ("python-six" ,python-six)))
11646 (home-page "https://github.com/joke2k/faker")
11647 (synopsis "Python package that generates fake data")
11648 (description
11649 "Faker is a Python package that generates fake data such as names,
11650 addresses, and phone numbers.")
11651 (license license:expat)
11652 (properties `((python2-variant . ,(delay python2-fake-factory))
11653 (superseded . ,python-faker)))))
11654
11655 (define-public python2-fake-factory
11656 (let ((base (package-with-python2 (strip-python2-variant
11657 python-fake-factory))))
11658 (package
11659 (inherit base)
11660 (properties `((superseded . ,python2-faker)))
11661 (propagated-inputs
11662 `(("python2-ipaddress" ,python2-ipaddress)
11663 ,@(package-propagated-inputs base))))))
11664
11665 (define-public python-pyaml
11666 (package
11667 (name "python-pyaml")
11668 (version "15.8.2")
11669 (source (origin
11670 (method url-fetch)
11671 (uri (pypi-uri "pyaml" version))
11672 (sha256
11673 (base32
11674 "1f5m28vkh4ksq3d80d8mmd2z8wxvc3mgy2pmrv2751dm2xgznm4w"))))
11675 (build-system python-build-system)
11676 (native-inputs
11677 `(("python-unidecode" ,python-unidecode)))
11678 (propagated-inputs
11679 `(("python-pyyaml" ,python-pyyaml)))
11680 (home-page "https://github.com/mk-fg/pretty-yaml")
11681 (synopsis "YAML pretty-print library for Python")
11682 (description
11683 "pyaml is a PyYAML based python module to produce pretty and readable
11684 YAML-serialized data.")
11685 (license (license:non-copyleft "http://www.wtfpl.net/txt/copying/"))))
11686
11687 (define-public python2-pyaml
11688 (package-with-python2 python-pyaml))
11689
11690 (define-public python-flexmock
11691 (package
11692 (name "python-flexmock")
11693 (version "0.10.2")
11694 (source (origin
11695 (method url-fetch)
11696 (uri (pypi-uri "flexmock" version))
11697 (sha256
11698 (base32
11699 "0arc6njvs6i9v9hgvzk5m50296g7zy5m9d7pyb43vdsdgxrci5gy"))))
11700 (build-system python-build-system)
11701 (home-page "https://flexmock.readthedocs.org")
11702 (synopsis "Testing library for Python")
11703 (description
11704 "flexmock is a testing library for Python that makes it easy to create
11705 mocks, stubs and fakes.")
11706 (license license:bsd-3)))
11707
11708 (define-public python2-flexmock
11709 (package-with-python2 python-flexmock))
11710
11711 (define-public python-orator
11712 (package
11713 (name "python-orator")
11714 (version "0.8.2")
11715 (source (origin
11716 (method url-fetch)
11717 (uri (pypi-uri "orator" version))
11718 (sha256
11719 (base32
11720 "1li49irsqha17nrda4nsb48biyy0rarp9pphf0jpqwm5zr8hv569"))))
11721 (build-system python-build-system)
11722 (arguments '(#:tests? #f)) ; no tests
11723 (propagated-inputs
11724 `(("python-arrow" ,python-arrow)
11725 ("python-blinker" ,python-blinker)
11726 ("python-cleo" ,python-cleo)
11727 ("python-faker" ,python-faker)
11728 ("python-inflection" ,python-inflection)
11729 ("python-lazy-object-proxy" ,python-lazy-object-proxy)
11730 ("python-pyaml" ,python-pyaml)
11731 ("python-simplejson" ,python-simplejson)
11732 ("python-wrapt" ,python-wrapt)))
11733 (home-page "https://orator-orm.com/")
11734 (synopsis "ActiveRecord ORM for Python")
11735 (description
11736 "Orator provides a simple ActiveRecord-like Object Relational Mapping
11737 implementation for Python.")
11738 (license license:expat)
11739 (properties `((python2-variant . ,(delay python2-orator))))))
11740
11741 (define-public python2-orator
11742 (let ((base (package-with-python2 (strip-python2-variant python-orator))))
11743 (package
11744 (inherit base)
11745 (propagated-inputs
11746 `(("python2-ipaddress" ,python2-ipaddress)
11747 ,@(package-propagated-inputs base))))))
11748
11749 (define-public python-prompt-toolkit
11750 (package
11751 (name "python-prompt-toolkit")
11752 (version "1.0.9")
11753 (source
11754 (origin
11755 (method url-fetch)
11756 (uri (pypi-uri "prompt_toolkit" version ".tar.gz"))
11757 (sha256
11758 (base32
11759 "172r15k9kwdw2lnajvpz1632dd16nqz1kcal1p0lq5ywdarj6rfd"))))
11760 (build-system python-build-system)
11761 (arguments
11762 '(#:tests? #f)) ; The test suite uses some Windows-specific data types.
11763 (propagated-inputs
11764 `(("python-wcwidth" ,python-wcwidth)
11765 ("python-six" ,python-six)
11766 ("python-pygments" ,python-pygments)))
11767 (home-page "https://github.com/jonathanslenders/python-prompt-toolkit")
11768 (synopsis "Library for building command line interfaces in Python")
11769 (description
11770 "Prompt-Toolkit is a library for building interactive command line
11771 interfaces in Python. It's like GNU Readline but it also features syntax
11772 highlighting while typing, out-of-the-box multi-line input editing, advanced
11773 code completion, incremental search, support for Chinese double-width
11774 characters, mouse support, and auto suggestions.")
11775 (license license:bsd-3)))
11776
11777 (define-public python2-prompt-toolkit
11778 (package-with-python2 python-prompt-toolkit))
11779
11780 (define-public python-jedi
11781 (package
11782 (name "python-jedi")
11783 (version "0.9.0")
11784 (source
11785 (origin
11786 (method url-fetch)
11787 (uri (pypi-uri "jedi" version))
11788 (sha256
11789 (base32
11790 "0c8x962ynpx001fdvp07m2q5jk4igkxbj3rmnydavphvlgxijk1v"))))
11791 (build-system python-build-system)
11792 (arguments
11793 ;; FIXME: One test fails (use "py.test" instead of 'setup.py test').
11794 '(#:tests? #f))
11795 (native-inputs
11796 `(("python-pytest" ,python-pytest)))
11797 (home-page "https://github.com/davidhalter/jedi")
11798 (synopsis
11799 "Autocompletion for Python that can be used for text editors")
11800 (description
11801 "Jedi is an autocompletion tool for Python that can be used for text editors.")
11802 (license license:expat)))
11803
11804 (define-public python2-jedi
11805 (package-with-python2 python-jedi))
11806
11807 (define-public ptpython
11808 (package
11809 (name "ptpython")
11810 (version "0.34")
11811 (source (origin
11812 (method url-fetch)
11813 (uri (pypi-uri "ptpython" version))
11814 (sha256
11815 (base32
11816 "1mmbiyzf0n8hm7z2a562x7w5cbl6jc0zsk6vp40q1z4cyblv1k13"))))
11817 (build-system python-build-system)
11818 (arguments
11819 '(#:tests? #f)) ; FIXME: No tests in pypi tarball.
11820 (propagated-inputs
11821 `(("python-docopt" ,python-docopt)
11822 ("python-jedi" ,python-jedi)
11823 ("python-prompt-toolkit" ,python-prompt-toolkit)
11824 ("python-pygments" ,python-pygments)))
11825 (home-page "https://github.com/jonathanslenders/ptpython")
11826 (synopsis "Python Read-Eval-Print-Loop with nice IDE-like features")
11827 (description
11828 "ptpython is a Python read-eval-print loop with IDE-like features.
11829 It supports syntax highlighting, multiline editing, autocompletion, mouse,
11830 color schemes, bracketed paste, Vi and Emacs keybindings, Chinese characters
11831 etc.")
11832 (license license:bsd-3)
11833 (properties `((python2-variant . ,(delay ptpython-2))))))
11834
11835 (define-public ptpython-2
11836 (let ((base (package-with-python2 (strip-python2-variant ptpython))))
11837 (package
11838 (inherit base)
11839 (name "ptpython2"))))
11840
11841 (define-public python-requests-oauthlib
11842 (package
11843 (name "python-requests-oauthlib")
11844 (version "0.6.2")
11845 (source
11846 (origin
11847 (method url-fetch)
11848 (uri (pypi-uri "requests-oauthlib" version))
11849 (sha256
11850 (base32
11851 "0ykff67sjcl227c23g0rxzfx34rr5bf21kwv0z3zmgk0lfmch7hn"))))
11852 (build-system python-build-system)
11853 (arguments
11854 `(#:phases
11855 (modify-phases %standard-phases
11856 ;; removes tests that require network access
11857 (add-before 'check 'pre-check
11858 (lambda _
11859 (delete-file "tests/test_core.py")
11860 #t)))))
11861 (native-inputs
11862 `(("python-requests-mock" ,python-requests-mock)
11863 ("python-mock" ,python-mock)))
11864 (propagated-inputs
11865 `(("python-oauthlib" ,python-oauthlib)
11866 ("python-requests" ,python-requests)))
11867 (home-page
11868 "https://github.com/requests/requests-oauthlib")
11869 (synopsis
11870 "OAuthlib authentication support for Requests")
11871 (description
11872 "Requests-OAuthlib uses the Python Requests and OAuthlib libraries to
11873 provide an easy-to-use Python interface for building OAuth1 and OAuth2 clients.")
11874 (license license:isc)))
11875
11876 (define-public python2-requests-oauthlib
11877 (package-with-python2 python-requests-oauthlib))
11878
11879 (define-public python-stem
11880 (package
11881 (name "python-stem")
11882 (version "1.5.4")
11883 (source
11884 (origin
11885 (method url-fetch)
11886 (uri (pypi-uri "stem" version))
11887 (sha256
11888 (base32
11889 "1j7pnblrn0yr6jmxvsq6y0ihmxmj5x50jl2n2606w67f6wq16j9n"))))
11890 (build-system python-build-system)
11891 (arguments
11892 `(#:phases
11893 (modify-phases %standard-phases
11894 (replace 'check
11895 (lambda _
11896 (zero? (system* "./run_tests.py" "--unit")))))))
11897 (native-inputs
11898 `(("python-mock" ,python-mock)
11899 ("python-pep8" ,python-pep8)
11900 ("python-pyflakes" ,python-pyflakes)))
11901 (home-page "https://stem.torproject.org/")
11902 (synopsis
11903 "Python controller library that allows applications to interact with Tor")
11904 (description
11905 "Stem is a Python controller library for Tor. With it you can use Tor's
11906 control protocol to script against the Tor process and read descriptor data
11907 relays publish about themselves.")
11908 (license license:lgpl3)))
11909
11910 (define-public python2-stem
11911 (package-with-python2 python-stem))
11912
11913 (define-public python-pyserial
11914 (package
11915 (name "python-pyserial")
11916 (version "3.1.1")
11917 (source
11918 (origin
11919 (method url-fetch)
11920 (uri (pypi-uri "pyserial" version))
11921 (sha256
11922 (base32
11923 "0k1nfdrxxkdlv4zgaqsdv8li0pj3gbh2pyxw8q2bsg6f9490amyn"))))
11924 (build-system python-build-system)
11925 (arguments
11926 '(#:tests? #f)) ; FIXME: 3/49 tests are failing.
11927 ;; #:phases
11928 ;; (modify-phases %standard-phases
11929 ;; (replace 'check
11930 ;; (lambda _
11931 ;; (zero? (system* "python" "test/run_all_tests.py" "loop://")))))))
11932 (home-page
11933 "https://github.com/pyserial/pyserial")
11934 (synopsis "Python Serial Port Bindings")
11935 (description "@code{pyserial} provide serial port bindings for Python. It
11936 supports different byte sizes, stop bits, parity and flow control with RTS/CTS
11937 and/or Xon/Xoff. The port is accessed in RAW mode.")
11938 (license license:bsd-3)))
11939
11940 (define-public python2-pyserial
11941 (package-with-python2 python-pyserial))
11942
11943 (define-public python-kivy
11944 (package
11945 (name "python-kivy")
11946 (version "1.9.1")
11947 (source
11948 (origin
11949 (method url-fetch)
11950 (uri (pypi-uri "kivy" version))
11951 (file-name (string-append name "-" version ".tar.gz"))
11952 (sha256
11953 (base32
11954 "0zk3g1j1z0lzcm9d0k1lprrs95zr8n8k5pdg3p5qlsn26jz4bg19"))))
11955 (build-system python-build-system)
11956 (arguments
11957 `(#:tests? #f ; Tests require many optional packages
11958 #:phases
11959 (modify-phases %standard-phases
11960 (replace 'build (lambda _ (zero? (system* "make" "force"))))
11961 (add-after 'patch-generated-file-shebangs 'set-sdl-paths
11962 (lambda* (#:key inputs #:allow-other-keys)
11963 (setenv "KIVY_SDL2_PATH"
11964 (string-append (assoc-ref inputs "sdl-union")
11965 "/include/SDL2"))
11966 #t)))))
11967 (native-inputs
11968 `(("pkg-config" ,pkg-config)
11969 ("python-cython" ,python-cython)))
11970 (inputs
11971 `(("gstreamer" ,gstreamer)
11972 ("mesa" ,mesa)
11973 ("sdl-union"
11974 ,(sdl-union (list sdl2 sdl2-image sdl2-mixer sdl2-ttf)))))
11975 (home-page "http://kivy.org")
11976 (synopsis
11977 "Multitouch application framework")
11978 (description
11979 "A software library for rapid development of
11980 hardware-accelerated multitouch applications.")
11981 (license license:expat)))
11982
11983 (define-public python2-kivy
11984 (package-with-python2 python-kivy))
11985
11986 (define-public python-kivy-next
11987 (let ((commit "a988c5e7a47da56263ff39514264a3de516ef2fe")
11988 (revision "1"))
11989 (package (inherit python-kivy)
11990 (name "python-kivy-next")
11991 (version (string-append "1.9.1-" revision "."
11992 (string-take commit 7)))
11993 (source
11994 (origin
11995 (method git-fetch)
11996 (uri (git-reference
11997 (url "https://github.com/kivy/kivy")
11998 (commit commit)))
11999 (file-name (string-append name "-" version "-checkout"))
12000 (sha256
12001 (base32
12002 "0jk92b4a8l7blkvkgkjihk171s0dfnq582cckff5srwc8kal5m0p")))))))
12003
12004 (define-public python2-kivy-next
12005 (package-with-python2 python-kivy-next))
12006
12007 (define-public python-binaryornot
12008 (package
12009 (name "python-binaryornot")
12010 (version "0.4.0")
12011 (source (origin
12012 (method url-fetch)
12013 (uri (pypi-uri "binaryornot" version))
12014 (sha256
12015 (base32
12016 "1j4f51dxic39mdwf6alj7gd769wy6mhk916v031wjali51xkh3xb"))))
12017 (build-system python-build-system)
12018 (propagated-inputs
12019 `(("python-chardet" ,python-chardet)
12020 ("python-hypothesis" ,python-hypothesis)))
12021 (home-page "https://github.com/audreyr/binaryornot")
12022 (synopsis "Package to check if a file is binary or text")
12023 (description "Ultra-lightweight pure Python package to check if a file is
12024 binary or text.")
12025 (license license:bsd-3)
12026 (properties `((python2-variant . ,(delay python2-binaryornot))))))
12027
12028 (define-public python2-binaryornot
12029 (let ((base (package-with-python2 (strip-python2-variant python-binaryornot))))
12030 (package (inherit base)
12031 (propagated-inputs
12032 `(("python2-enum34" ,python2-enum34)
12033 ,@(package-propagated-inputs base))))))
12034
12035 (define-public python-nltk
12036 (package
12037 (name "python-nltk")
12038 (version "3.2.1")
12039 (source (origin
12040 (method url-fetch)
12041 (uri (pypi-uri "nltk" version))
12042 (sha256
12043 (base32
12044 "0skxbhnymwlspjkzga0f7x1hg3y50fwpfghs8g8k7fh6f4nknlym"))))
12045 (build-system python-build-system)
12046 (arguments
12047 '(;; The tests require some extra resources to be downloaded.
12048 ;; TODO Try packaging these resources.
12049 #:tests? #f))
12050 (home-page "http://nltk.org/")
12051 (synopsis "Natural Language Toolkit")
12052 (description "It provides interfaces to over 50 corpora and lexical
12053 resources such as WordNet, along with a suite of text processing libraries
12054 for classification, tokenization, stemming, tagging, parsing, and semantic
12055 reasoning, wrappers for natural language processing libraries.")
12056 (license license:asl2.0)))
12057
12058 (define-public python2-nltk
12059 (package-with-python2 python-nltk))
12060
12061 (define-public python-pymongo
12062 (package
12063 (name "python-pymongo")
12064 (version "3.3.0")
12065 (source (origin
12066 (method url-fetch)
12067 (uri (pypi-uri "pymongo" version))
12068 (sha256
12069 (base32
12070 "07mra6w86wjqy4lx5fvimidjhhfzd562gfjn8grsnbv2q8pk0i9x"))))
12071 (build-system python-build-system)
12072 (propagated-inputs
12073 `(("python-certifi" ,python-certifi)))
12074 (home-page "https://github.com/mongodb/mongo-python-driver")
12075 (synopsis "Python driver for MongoDB")
12076 (description "Python driver for MongoDB.")
12077 (license license:asl2.0)))
12078
12079 (define-public python2-pymongo
12080 (package-with-python2 python-pymongo))
12081
12082 (define-public python-sh
12083 (package
12084 (name "python-sh")
12085 (version "1.11")
12086 (source (origin
12087 (method url-fetch)
12088 (uri (pypi-uri "sh" version))
12089 (sha256
12090 (base32
12091 "192r0mpv6dmkysjzhc43ddffiwb5g7c76bgr1mb1z2xz9awbj3sr"))))
12092 (build-system python-build-system)
12093 (arguments
12094 `(#:tests? #f)) ; no tests
12095 (home-page "https://github.com/amoffat/sh")
12096 (synopsis "Python subprocess interface")
12097 (description "Abstracts process invocation by providing a function
12098 interface for programs.")
12099 (license license:expat)))
12100
12101 (define-public python2-sh
12102 (package-with-python2 python-sh))
12103
12104 (define-public python-consul
12105 (package
12106 (name "python-consul")
12107 (version "0.6.1")
12108 (source
12109 (origin
12110 (method url-fetch)
12111 (uri (pypi-uri "python-consul" version))
12112 (sha256
12113 (base32
12114 "0rfyxcy4cr3x848vhx876ifalxd5ghq6l5x813m49h4vq2d4jiq8"))))
12115 (build-system python-build-system)
12116 (native-inputs
12117 `(("python-pytest" ,python-pytest)))
12118 (propagated-inputs
12119 `(("python-requests" ,python-requests)
12120 ("python-six" ,python-six)))
12121 (home-page "https://github.com/cablehead/python-consul")
12122 (synopsis "Python client for Consul")
12123 (description
12124 "Python client for @url{http://www.consul.io/,Consul}, a tool for service
12125 discovery, monitoring and configuration.")
12126 (license license:expat)))
12127
12128 (define-public python2-consul
12129 (package-with-python2 python-consul))
12130
12131 (define-public python-schematics
12132 (package
12133 (name "python-schematics")
12134 (version "1.1.1")
12135 (source
12136 (origin
12137 (method url-fetch)
12138 (uri (string-append
12139 "https://github.com/schematics/schematics/archive/v" version ".tar.gz"))
12140 (file-name (string-append name "-" version ".tar.gz"))
12141 (sha256
12142 (base32
12143 "19v1i69bf3bzarfxmbv0v6ivpcn758x3shvbiy9l2hy0lvqwnp6l"))))
12144 (build-system python-build-system)
12145 (propagated-inputs
12146 `(("python-six" ,python-six)))
12147 (arguments
12148 `(#:tests? #f)) ; requires a bunch of not very nice packages with fixed
12149 ; version requirements (eg python-coveralls)
12150 (home-page "https://github.com/schematics/schematics")
12151 (synopsis "Python Data Structures for Humans")
12152 (description "Python Data Structures for Humans.")
12153 (license license:bsd-3)))
12154
12155 (define-public python2-schematics
12156 (package-with-python2 python-schematics))
12157
12158 (define-public python-publicsuffix
12159 (package
12160 (name "python-publicsuffix")
12161 (version "1.1.0")
12162 (source (origin
12163 (method url-fetch)
12164 (uri (pypi-uri "publicsuffix" version))
12165 (sha256
12166 (base32
12167 "1adx520249z2cy7ykwjr1k190mn2888wqn9jf8qm27ly4qymjxxf"))))
12168 (build-system python-build-system)
12169 (arguments
12170 `(#:tests? #f)) ; tests use the internet
12171 (home-page "https://www.tablix.org/~avian/git/publicsuffix.git")
12172 (synopsis "Get suffix for a domain name")
12173 (description "Get a public suffix for a domain name using the Public Suffix
12174 List.")
12175 (license license:expat)))
12176
12177 (define-public python2-publicsuffix
12178 (package-with-python2 python-publicsuffix))
12179
12180 (define-public python-publicsuffix2
12181 (package
12182 (name "python-publicsuffix2")
12183 (version "2.20160818")
12184 (source
12185 (origin
12186 (method url-fetch)
12187 (uri (pypi-uri "publicsuffix2" version ".tar.bz2"))
12188 (sha256
12189 (base32
12190 "1bb55yka9vkn7i6y1kjzxa516kh6v4gsrxa90w5wdz5p5n968r68"))))
12191 (build-system python-build-system)
12192 (arguments
12193 '(#:tests? #f)) ; The test suite requires network access.
12194 (home-page "https://github.com/pombredanne/python-publicsuffix2")
12195 (synopsis "Get a public suffix for a domain name using the Public Suffix List")
12196 (description "Get a public suffix for a domain name using the Public Suffix
12197 List. Forked from and using the same API as the publicsuffix package.")
12198 (license (list license:expat license:mpl2.0))))
12199
12200 (define-public python2-publicsuffix2
12201 (package-with-python2 python-publicsuffix2))
12202
12203 (define-public python-url
12204 (package
12205 (name "python-url")
12206 (version "0.2.0")
12207 (source (origin
12208 (method url-fetch)
12209 (uri (pypi-uri "url" version))
12210 (sha256
12211 (base32
12212 "0v879yadcz9qxfl41ak6wkga1kimp9cflla9ddz03hjjvgkqy5ki"))))
12213 (build-system python-build-system)
12214 (propagated-inputs
12215 `(("python-publicsuffix" ,python-publicsuffix)))
12216 (native-inputs
12217 `(("python-coverage" ,python-coverage)
12218 ("python-nose" ,python-nose)))
12219 (arguments
12220 `(#:tests? #f)) ; FIXME: tests fail with "ImportError: No module named 'tests'"
12221 (home-page "https://github.com/seomoz/url-py")
12222 (synopsis "URL Parsing")
12223 (description "Library for parsing urls.")
12224 (license license:expat)
12225 (properties `((python2-variant . ,(delay python2-url))))))
12226
12227 (define-public python2-url
12228 (let ((base (package-with-python2 (strip-python2-variant python-url))))
12229 (package (inherit base)
12230 (propagated-inputs
12231 `(("python2-publicsuffix" ,python2-publicsuffix))))))
12232
12233 (define-public python-freezegun
12234 (package
12235 (name "python-freezegun")
12236 (version "0.3.8")
12237 (source
12238 (origin
12239 (method url-fetch)
12240 (uri (pypi-uri "freezegun" version))
12241 (sha256
12242 (base32
12243 "1sf38d3ibv1jhhvr52x7dhrsiyqk1hm165dfv8w8wh0fhmgxg151"))))
12244 (build-system python-build-system)
12245 (native-inputs
12246 `(("python-mock" ,python-mock)
12247 ("python-nose" ,python-nose)
12248 ("python-coverage" ,python-coverage)))
12249 (propagated-inputs
12250 `(("python-six" ,python-six)
12251 ("python-dateutil" ,python-dateutil)))
12252 (arguments
12253 `(#:phases (modify-phases %standard-phases
12254 ;; The tests are normally executed via `make test`, but the PyPi
12255 ;; package does not include the Makefile.
12256 (replace 'check
12257 (lambda _
12258 (zero? (system* "nosetests" "./tests/")))))))
12259 (home-page "https://github.com/spulec/freezegun")
12260 (synopsis "Test utility for mocking the datetime module")
12261 (description
12262 "FreezeGun is a library that allows your python tests to travel through
12263 time by mocking the datetime module.")
12264 (license license:asl2.0)))
12265
12266 (define-public python2-freezegun
12267 (package-with-python2 python-freezegun))
12268
12269
12270 (define-public python-odfpy
12271 (package
12272 (name "python-odfpy")
12273 (version "1.3.3")
12274 (source (origin
12275 (method url-fetch)
12276 (uri (pypi-uri "odfpy" version))
12277 (sha256
12278 (base32
12279 "1a6ms0w9zfhhkqhvrnynwwbxrivw6hgjc0s5k7j06npc7rq0blxw"))))
12280 (arguments
12281 `(#:modules ((srfi srfi-1)
12282 (guix build python-build-system)
12283 (guix build utils))
12284 #:phases
12285 (modify-phases %standard-phases
12286 (replace 'check
12287 ;; The test runner invokes python2 and python3 for test*.py.
12288 ;; To avoid having both in inputs, we replicate it here.
12289 (lambda _
12290 (every (lambda (test-file)
12291 (zero? (system* "python" test-file)))
12292 (find-files "tests" "^test.*\\.py$")))))))
12293 (build-system python-build-system)
12294 (home-page "https://github.com/eea/odfpy")
12295 (synopsis "Python API and tools to manipulate OpenDocument files")
12296 (description "Collection of libraries and utility programs written in
12297 Python to manipulate OpenDocument 1.2 files.")
12298 (license
12299 ;; The software is mainly dual GPL2+ and ASL2.0, but includes a
12300 ;; number of files with other licenses.
12301 (list license:gpl2+ license:asl2.0 license:lgpl2.1+ license:cc-by-sa3.0))))
12302
12303 (define-public python2-odfpy
12304 (package-with-python2 python-odfpy))
12305
12306 (define-public python-cachecontrol
12307 (package
12308 (name "python-cachecontrol")
12309 (version "0.11.6")
12310 (source
12311 (origin
12312 (method url-fetch)
12313 ;; Pypi does not have tests.
12314 (uri (string-append
12315 "https://github.com/ionrock/cachecontrol/archive/v"
12316 version ".tar.gz"))
12317 (file-name (string-append name "-" version ".tar.gz"))
12318 (sha256
12319 (base32
12320 "0yj60d0f69a2l8p7y86k4zhzzm6rnxpq74sfl240pry9l0lfw2vw"))))
12321 (build-system python-build-system)
12322 (arguments
12323 `(#:phases
12324 (modify-phases %standard-phases
12325 (replace 'check
12326 (lambda _
12327 ;; Drop test that requires internet access.
12328 (delete-file "tests/test_regressions.py")
12329 (setenv "PYTHONPATH"
12330 (string-append (getcwd) "/build/lib:"
12331 (getenv "PYTHONPATH")))
12332 (zero? (system* "py.test" "-vv")))))))
12333 (native-inputs
12334 `(("python-pytest" ,python-pytest)
12335 ("python-redis" ,python-redis)
12336 ("python-webtest" ,python-webtest)
12337 ("python-mock" ,python-mock)))
12338 (propagated-inputs
12339 `(("python-requests" ,python-requests)
12340 ("python-lockfile" ,python-lockfile)))
12341 (home-page "https://github.com/ionrock/cachecontrol")
12342 (synopsis "The httplib2 caching algorithms for use with requests")
12343 (description "CacheControl is a port of the caching algorithms in
12344 @code{httplib2} for use with @code{requests} session objects.")
12345 (license license:asl2.0)))
12346
12347 (define-public python2-cachecontrol
12348 (package-with-python2 python-cachecontrol))
12349
12350 (define-public python-lit
12351 (package
12352 (name "python-lit")
12353 (version "0.5.0")
12354 (source
12355 (origin
12356 (method url-fetch)
12357 (uri (pypi-uri "lit" version))
12358 (sha256
12359 (base32
12360 "135m2b9cwih85g66rjggavck328z7lj37srgpq3jxszbg0g2b91y"))))
12361 (build-system python-build-system)
12362 (home-page "http://llvm.org/")
12363 (synopsis "LLVM Software Testing Tool")
12364 (description "@code{lit} is a portable tool for executing LLVM and Clang
12365 style test suites, summarizing their results, and providing indication of
12366 failures.")
12367 (license license:ncsa)))
12368
12369 (define-public python2-lit
12370 (package-with-python2 python-lit))
12371
12372 (define-public python-pytest-pep8
12373 (package
12374 (name "python-pytest-pep8")
12375 (version "1.0.6")
12376 (source (origin
12377 (method url-fetch)
12378 (uri (pypi-uri "pytest-pep8" version))
12379 (sha256
12380 (base32
12381 "06032agzhw1i9d9qlhfblnl3dw5hcyxhagn7b120zhrszbjzfbh3"))))
12382 (build-system python-build-system)
12383 (arguments
12384 `(#:tests? #f)) ; Fails with recent pytest and pep8. See upstream issues #8 and #12.
12385 (native-inputs
12386 `(("python-pytest" ,python-pytest)))
12387 (propagated-inputs
12388 `(("python-pep8" ,python-pep8)))
12389 (home-page "https://bitbucket.org/pytest-dev/pytest-pep8")
12390 (synopsis "Py.test plugin to check PEP8 requirements")
12391 (description "Pytest plugin for checking PEP8 compliance.")
12392 (license license:expat)))
12393
12394 (define-public python2-pytest-pep8
12395 (package-with-python2 python-pytest-pep8))
12396
12397 (define-public python-pytest-flakes
12398 (package
12399 (name "python-pytest-flakes")
12400 (version "1.0.1")
12401 (source (origin
12402 (method url-fetch)
12403 (uri (pypi-uri "pytest-flakes" version))
12404 (sha256
12405 (base32
12406 "0flag3n33kbhyjrhzmq990rvg4yb8hhhl0i48q9hw0ll89jp28lw"))))
12407 (build-system python-build-system)
12408 (arguments
12409 `(#:phases
12410 (modify-phases %standard-phases
12411 (delete 'check)
12412 (add-after 'install 'check
12413 (lambda* (#:key outputs inputs #:allow-other-keys)
12414 ;; It's easier to run tests after install.
12415 ;; Make installed package available for running the tests
12416 (add-installed-pythonpath inputs outputs)
12417 (zero? (system* "py.test" "-vv")))))))
12418 (native-inputs
12419 `(("python-coverage" ,python-coverage)
12420 ("python-pytest" ,python-pytest)
12421 ("python-pytest-cache" ,python-pytest-cache)
12422 ("python-pytest-pep8" ,python-pytest-pep8)))
12423 (propagated-inputs
12424 `(("python-pyflakes" ,python-pyflakes)))
12425 (home-page "https://github.com/fschulze/pytest-flakes")
12426 (synopsis "Py.test plugin to check source code with pyflakes")
12427 (description "Pytest plugin for checking Python source code with pyflakes.")
12428 (license license:expat)))
12429
12430 (define-public python2-pytest-flakes
12431 (package-with-python2 python-pytest-flakes))
12432
12433 (define-public python-natsort
12434 (package
12435 (name "python-natsort")
12436 (version "5.0.2")
12437 (source (origin
12438 (method url-fetch)
12439 (uri (pypi-uri "natsort" version))
12440 (sha256
12441 (base32
12442 "0bh6j0l8iapjnsgg3bs6q075cnzjl6zw1vlgqyv3qrygm2cxypkn"))))
12443 (build-system python-build-system)
12444 (arguments
12445 `(#:phases
12446 (modify-phases %standard-phases
12447 (add-before 'check 'set-cachedir
12448 ;; Tests require write access to $HOME by default
12449 (lambda _ (setenv "PYTHON_EGG_CACHE" "/tmp") #t)))))
12450 (native-inputs
12451 `(("python-hypothesis" ,python-hypothesis)
12452 ("python-pytest-cache" ,python-pytest-cache)
12453 ("python-pytest-cov" ,python-pytest-cov)
12454 ("python-pytest-flakes" ,python-pytest-flakes)
12455 ("python-pytest-pep8" ,python-pytest-pep8)))
12456 (propagated-inputs ; TODO: Add python-fastnumbers.
12457 `(("python-pyicu" ,python-pyicu)))
12458 (home-page "https://github.com/SethMMorton/natsort")
12459 (synopsis "Natural sorting for python and shell")
12460 (description
12461 "Natsort lets you apply natural sorting on lists instead of
12462 lexicographical. If you use the built-in @code{sorted} method in python
12463 on a list such as @code{['a20', 'a9', 'a1', 'a4', 'a10']}, it would be
12464 returned as @code{['a1', 'a10', 'a20', 'a4', 'a9']}. Natsort provides a
12465 function @code{natsorted} that identifies numbers and sorts them separately
12466 from strings. It can also sort version numbers, real numbers, mixed types
12467 and more, and comes with a shell command @command{natsort} that exposes this
12468 functionality in the command line.")
12469 (license license:expat)
12470 (properties `((python2-variant . ,(delay python2-natsort))))))
12471
12472 (define-public python2-natsort
12473 (let ((base (package-with-python2 (strip-python2-variant python-natsort))))
12474 (package (inherit base)
12475 (native-inputs
12476 `(("python2-pathlib" ,python2-pathlib)
12477 ("python2-mock" ,python2-mock)
12478 ("python2-enum34" ,python2-enum34)
12479 ,@(package-native-inputs base))))))
12480
12481 (define-public python-glances
12482 (package
12483 (name "python-glances")
12484 (version "2.7.1")
12485 (source
12486 (origin
12487 (method url-fetch)
12488 (uri (pypi-uri "Glances" version))
12489 (sha256
12490 (base32
12491 "11jbq40g8alsbirnd4kiagznqg270247i0m8qhi48ldf2i5xppxg"))))
12492 (build-system python-build-system)
12493 (propagated-inputs
12494 `(("python-psutil" ,python-psutil)))
12495 (home-page
12496 "https://github.com/nicolargo/glances")
12497 (synopsis
12498 "A cross-platform curses-based monitoring tool")
12499 (description
12500 "Glances is a curses-based monitoring tool for a wide variety of platforms.
12501 Glances uses the PsUtil library to get information from your system. It monitors
12502 CPU, load, memory, network bandwidth, disk I/O, disk use, and more.")
12503 (license license:lgpl3+)))
12504
12505 (define-public python2-glances
12506 (package-with-python2 python-glances))
12507
12508 (define-public python-graphql-core
12509 (package
12510 (name "python-graphql-core")
12511 (version "0.5.3")
12512 (source
12513 (origin
12514 (method url-fetch)
12515 (uri (pypi-uri "graphql-core" version))
12516 (sha256
12517 (base32
12518 "0rsaarx2sj4xnw9966rhh4haiqaapm4lm2mfqm48ywd51j5vh1a0"))))
12519 (build-system python-build-system)
12520 (arguments
12521 `(#:tests? #f ; Tests require the unpackaged pytest-benchmark.
12522 #:phases
12523 (modify-phases %standard-phases
12524 (add-after 'unpack 'patch-hardcoded-version
12525 (lambda _ (substitute*
12526 "setup.py"
12527 (("'gevent==1.1rc1'") "'gevent'"))
12528 #t)))))
12529 (native-inputs
12530 `(("python-gevent" ,python-gevent)
12531 ("python-mock" ,python-mock)
12532 ("python-pytest-mock" ,python-pytest-mock)))
12533 (propagated-inputs
12534 `(("python-promise" ,python-promise)
12535 ("python-six" ,python-six)))
12536 (home-page "https://github.com/graphql-python/graphql-core")
12537 (synopsis "GraphQL implementation for Python")
12538 (description
12539 "GraphQL implementation for Python. GraphQL is a data query language and
12540 runtime designed and used to request and deliver data to mobile and web apps.
12541 This library is a port of @url{https://github.com/graphql/graphql-js,graphql-js}
12542 to Python.")
12543 (license license:expat)))
12544
12545 (define-public python2-graphql-core
12546 (package-with-python2 python-graphql-core))
12547
12548 (define-public python-graphql-relay
12549 (package
12550 (name "python-graphql-relay")
12551 (version "0.4.5")
12552 (source
12553 (origin
12554 (method url-fetch)
12555 (uri (pypi-uri "graphql-relay" version))
12556 (sha256
12557 (base32
12558 "1nv5dxcj59zv31qvl8bd142njmxcmymny2dz3br1l2cpbljbf5i7"))))
12559 (build-system python-build-system)
12560 (native-inputs
12561 `(("python-pytest" ,python-pytest)))
12562 (propagated-inputs
12563 `(("python-graphql-core" ,python-graphql-core)
12564 ("python-promise" ,python-promise)
12565 ("python-six" ,python-six)))
12566 (home-page "https://github.com/graphql-python/graphql-relay-py")
12567 (synopsis "Relay implementation for Python")
12568 (description
12569 "This is a library to allow the easy creation of Relay-compliant servers
12570 using the GraphQL Python reference implementation of a GraphQL server. It
12571 should be noted that the code is a exact port of the original
12572 @url{https://github.com/graphql/graphql-relay-js,graphql-relay js implementation}
12573 from Facebook.")
12574 (license license:expat)))
12575
12576 (define-public python2-graphql-relay
12577 (package-with-python2 python-graphql-relay))
12578
12579 (define-public python-graphene
12580 (package
12581 (name "python-graphene")
12582 (version "0.10.2")
12583 (source
12584 (origin
12585 (method url-fetch)
12586 (uri (pypi-uri "graphene" version))
12587 (sha256
12588 (base32
12589 "09zhac7igh9ixdz0ay6csy35b40l1jwbf2wrbxmgxwfhy51iy06q"))))
12590 (build-system python-build-system)
12591 (native-inputs
12592 `(("python-django-filter" ,python-django-filter)
12593 ("python-mock" ,python-mock)
12594 ("python-psycopg2" ,python-psycopg2)
12595 ("python-pytest-django" ,python-pytest-django)
12596 ("python-sqlalchemy-utils" ,python-sqlalchemy-utils)))
12597 (propagated-inputs
12598 `(("python-graphql-core" ,python-graphql-core)
12599 ("python-graphql-relay" ,python-graphql-relay)
12600 ("python-iso8601" ,python-iso8601)
12601 ("python-promise" ,python-promise)
12602 ("python-six" ,python-six)))
12603 (home-page "http://graphene-python.org/")
12604 (synopsis "GraphQL Framework for Python")
12605 (description
12606 "Graphene is a Python library for building GraphQL schemas/types.
12607 A GraphQL schema describes your data model, and provides a GraphQL server
12608 with an associated set of resolve methods that know how to fetch data.")
12609 (properties `((python2-variant . ,(delay python2-graphene))))
12610 (license license:expat)))
12611
12612 (define-public python2-graphene
12613 (let ((base (package-with-python2
12614 (strip-python2-variant python-graphene))))
12615 (package (inherit base)
12616 (native-inputs
12617 `(("python2-sqlalchemy" ,python2-sqlalchemy)
12618 ,@(package-native-inputs base))))))
12619
12620 (define-public python-nautilus
12621 (package
12622 (name "python-nautilus")
12623 (version "0.4.9")
12624 (source
12625 (origin
12626 (method url-fetch)
12627 (uri (pypi-uri "nautilus" version))
12628 (sha256
12629 (base32
12630 "01hwzjc1zshk4vvxrcghm398fpy4jls66dyz06g07mrwqif8878p"))))
12631 (build-system python-build-system)
12632 (arguments `(#:tests? #f)) ; fails to import test modules
12633 (propagated-inputs
12634 `(("python-bcrypt" ,python-bcrypt)
12635 ("python-click" ,python-click)
12636 ("python-consul" ,python-consul)
12637 ("python-graphene" ,python-graphene)
12638 ("python-jinja2" ,python-jinja2)
12639 ("python-peewee" ,python-peewee)
12640 ("python-pika" ,python-pika)
12641 ("python-tornado" ,python-tornado)
12642 ("python-wtforms" ,python-wtforms)))
12643 (native-inputs
12644 `(("python-nose2" ,python-nose2)))
12645 (home-page "https://github.com/AlecAivazis/nautilus")
12646 (synopsis "Library for creating microservice applications")
12647 (description
12648 "Nautilus is a framework for flux based microservices that looks to
12649 provide extendible implementations of common aspects of a cloud so that you can
12650 focus on building massively scalable web applications.")
12651 (license license:expat)))
12652
12653 (define-public python-snowballstemmer
12654 (package
12655 (name "python-snowballstemmer")
12656 (version "1.2.1")
12657 (source (origin
12658 (method url-fetch)
12659 (uri (pypi-uri "snowballstemmer" version))
12660 (sha256
12661 (base32
12662 "0a0idq4y5frv7qsg2x62jd7rd272749xk4x99misf5rcifk2d7wi"))))
12663 (build-system python-build-system)
12664 (arguments
12665 `(;; No tests exist
12666 #:tests? #f))
12667 (home-page "https://github.com/shibukawa/snowball_py")
12668 (synopsis "Snowball stemming library collection for Python")
12669 (description "This package provides 16 word stemmer algorithms generated
12670 from Snowball algorithms. It includes the 15 original ones plus the Poerter
12671 English stemmer.")
12672 (license license:bsd-3)))
12673
12674 (define-public python2-snowballstemmer
12675 (package-with-python2 python-snowballstemmer))
12676
12677 (define-public python-sphinx-cloud-sptheme
12678 (package
12679 (name "python-sphinx-cloud-sptheme")
12680 (version "1.8.0")
12681 (source (origin
12682 (method url-fetch)
12683 (uri (pypi-uri "cloud_sptheme" version))
12684 (sha256
12685 (base32
12686 "1dniqb6a39yh786f86c4jn666rwnyi1jvzn4616zhcchb7sfdshd"))))
12687 (build-system python-build-system)
12688 ;; FIXME: The 'pypi' release archive does not contain tests.
12689 (arguments '(#:tests? #f))
12690 (native-inputs
12691 `(("python-sphinx" ,python-sphinx)))
12692 (home-page "https://bitbucket.org/ecollins/cloud_sptheme")
12693 (synopsis "'Cloud' theme for Sphinx documenter")
12694 (description "This package contains the \"Cloud\" theme for Sphinx and some
12695 related extensions.")
12696 (license license:bsd-3)))
12697
12698 (define-public python2-sphinx-cloud-sptheme
12699 (package-with-python2 python-sphinx-cloud-sptheme))
12700
12701 (define-public python-sphinx-alabaster-theme
12702 (package
12703 (name "python-sphinx-alabaster-theme")
12704 (version "0.7.9")
12705 (source (origin
12706 (method url-fetch)
12707 (uri (pypi-uri "alabaster" version))
12708 (sha256
12709 (base32
12710 "027anxzcb951gjlcc43y3rbn9qrw36d16vj9wd2smv5410xx9bs7"))))
12711 (build-system python-build-system)
12712 (propagated-inputs
12713 `(("python-pygments" ,python-pygments)))
12714 (home-page "https://alabaster.readthedocs.io/")
12715 (synopsis "Configurable sidebar-enabled Sphinx theme")
12716 (description "Alabaster is a visually (c)lean, responsive, configurable
12717 theme for the Sphinx documentation system. It's the default theme of Sphinx.")
12718 (license license:bsd-3)))
12719
12720 (define-public python2-sphinx-alabaster-theme
12721 (package-with-python2 python-sphinx-alabaster-theme))
12722
12723 (define-public python-betamax
12724 (package
12725 (name "python-betamax")
12726 (version "0.8.0")
12727 (source
12728 (origin
12729 (method url-fetch)
12730 (uri (pypi-uri "betamax" version))
12731 (sha256
12732 (base32
12733 "18f8v5gng3j773jlbbzx4rg1i4y2zw3m2l1zpmbvp8bh5a2q1i42"))))
12734 (build-system python-build-system)
12735 (arguments
12736 '(;; Many tests fail because they require networking.
12737 #:tests? #f))
12738 (propagated-inputs
12739 `(("python-requests" ,python-requests)))
12740 (home-page "https://github.com/sigmavirus24/betamax")
12741 (synopsis "Record HTTP interactions with python-requests")
12742 (description "Betamax will record your test suite's HTTP interactions and
12743 replay them during future tests. It is designed to work with python-requests.")
12744 (license license:expat)))
12745
12746 (define-public python2-betamax
12747 (package-with-python2 python-betamax))
12748
12749 (define-public python-s3transfer
12750 (package
12751 (name "python-s3transfer")
12752 (version "0.1.10")
12753 (source (origin
12754 (method url-fetch)
12755 (uri (pypi-uri "s3transfer" version))
12756 (sha256
12757 (base32
12758 "1h8g9bknvxflxkpbnxyfxmk8pvgykbbk9ljdvhqh6z4vjc2926ms"))))
12759 (build-system python-build-system)
12760 (arguments
12761 `(#:phases
12762 (modify-phases %standard-phases
12763 (replace 'check
12764 (lambda _
12765 ;; 7 of the 'integration' tests require network access or login
12766 ;; credentials.
12767 (zero? (system* "nosetests" "--exclude=integration")))))))
12768 (native-inputs
12769 `(("python-docutils" ,python-docutils)
12770 ("python-mock" ,python-mock)
12771 ("python-nose" ,python-nose)))
12772 (propagated-inputs
12773 `(("python-botocore" ,python-botocore)))
12774 (synopsis "Amazon S3 Transfer Manager")
12775 (description "S3transfer is a Python library for managing Amazon S3
12776 transfers.")
12777 (home-page "https://github.com/boto/s3transfer")
12778 (license license:asl2.0)
12779 (properties `((python2-variant . ,(delay python2-s3transfer))))))
12780
12781 (define-public python2-s3transfer
12782 (let ((base (package-with-python2 (strip-python2-variant python-s3transfer))))
12783 (package
12784 (inherit base)
12785 (native-inputs
12786 `(("python2-futures" ,python2-futures)
12787 ,@(package-native-inputs base))))))
12788
12789 (define-public python-setproctitle
12790 (package
12791 (name "python-setproctitle")
12792 (version "1.1.10")
12793 (source
12794 (origin
12795 (method url-fetch)
12796 (uri (pypi-uri "setproctitle" version))
12797 (sha256
12798 (base32
12799 "163kplw9dcrw0lffq1bvli5yws3rngpnvrxrzdw89pbphjjvg0v2"))))
12800 (build-system python-build-system)
12801 (arguments
12802 '(#:phases
12803 (modify-phases %standard-phases
12804 (add-before 'check 'patch-Makefile
12805 ;; Stricly this is only required for the python2 variant.
12806 ;; But adding a phase in an inherited package seems to be
12807 ;; cumbersum. So we patch even for python3.
12808 (lambda _
12809 (let ((nose (assoc-ref %build-inputs "python2-nose")))
12810 (when nose
12811 (substitute* "Makefile"
12812 (("\\$\\(PYTHON\\) [^ ]which nosetests[^ ] ")
12813 (string-append nose "/bin/nosetests "))))
12814 #t)))
12815 (replace 'check
12816 (lambda _
12817 (setenv "PYTHON" (or (which "python3") (which "python")))
12818 (setenv "PYCONFIG" (or (which "python3-config")
12819 (which "python-config")))
12820 (setenv "CC" "gcc")
12821 ;; No need to extend PYTHONPATH to find the built package, since
12822 ;; the Makefile will build anyway
12823 (zero? (system* "make" "check")))))))
12824 (native-inputs
12825 `(("procps" ,procps))) ; required for tests
12826 (home-page
12827 "https://github.com/dvarrazzo/py-setproctitle")
12828 (synopsis
12829 "Setproctitle implementation for Python to customize the process title")
12830 (description "The library allows a process to change its title (as displayed
12831 by system tools such as ps and top).
12832
12833 Changing the title is mostly useful in multi-process systems, for
12834 example when a master process is forked: changing the children's title
12835 allows to identify the task each process is busy with. The technique
12836 is used by PostgreSQL and the OpenSSH Server for example.")
12837 (license license:bsd-3)
12838 (properties `((python2-variant . ,(delay python2-setproctitle))))))
12839
12840 (define-public python2-setproctitle
12841 (let ((base (package-with-python2
12842 (strip-python2-variant python-setproctitle))))
12843 (package
12844 (inherit base)
12845 (native-inputs `(("python2-nose" ,python2-nose)
12846 ,@(package-native-inputs base))))))
12847
12848 (define-public python-validictory
12849 (package
12850 (name "python-validictory")
12851 (version "1.0.1")
12852 (source
12853 (origin
12854 (method url-fetch)
12855 (uri (pypi-uri "validictory" version))
12856 (sha256
12857 (base32
12858 "1zf1g9sw47xzp5f80bd94pb42j9yqv82lcrgcvdwr6nkaphfi37q"))))
12859 (build-system python-build-system)
12860 (arguments
12861 '(#:phases
12862 (modify-phases %standard-phases
12863 (add-after 'unpack 'bootstrap
12864 ;; Move the tests out of the package directory to avoid
12865 ;; packaging them.
12866 (lambda* _
12867 (rename-file "validictory/tests" "tests")
12868 (delete-file "tests/__init__.py")))
12869 (replace 'check
12870 (lambda _
12871 ;; Extend PYTHONPATH so the built package will be found.
12872 (setenv "PYTHONPATH"
12873 (string-append (getcwd) "/build/lib:"
12874 (getenv "PYTHONPATH")))
12875 (zero? (system* "py.test" "-vv" )))))))
12876 (native-inputs
12877 `(("python-pytest" ,python-pytest)))
12878 (home-page
12879 "https://github.com/jamesturk/validictory")
12880 (synopsis "General purpose Python data validator")
12881 (description "It allows validation of arbitrary Python data structures.
12882
12883 The schema format is based on the JSON Schema
12884 proposal (http://json-schema.org), so combined with json the library is also
12885 useful as a validator for JSON data.")
12886 (license license:expat)))
12887
12888 (define-public python2-validictory
12889 (package-with-python2 python-validictory))
12890
12891 (define-public python-aniso8601
12892 (package
12893 (name "python-aniso8601")
12894 (version "1.1.0")
12895 (source
12896 (origin
12897 (method url-fetch)
12898 (uri (pypi-uri "aniso8601" version))
12899 (sha256
12900 (base32
12901 "1k5mjg9iqbjfslb5prrsfz7dhlvi6s35p1jxq8dm87w1b7dn5i2g"))))
12902 (build-system python-build-system)
12903 (propagated-inputs
12904 `(("python-dateutil" ,python-dateutil)))
12905 (home-page
12906 "https://bitbucket.org/nielsenb/aniso8601")
12907 (synopsis
12908 "Python library for parsing ISO 8601 strings")
12909 (description
12910 "This package contains a library for parsing ISO 8601 datetime strings.")
12911 (license license:bsd-3)))
12912
12913 (define-public python-flask-restful
12914 (package
12915 (name "python-flask-restful")
12916 (version "0.3.5")
12917 (source
12918 (origin
12919 (method url-fetch)
12920 (uri (pypi-uri "Flask-RESTful" version))
12921 (sha256
12922 (base32
12923 "0hjcmdb56b7z4bkw848lxfkyrpnkwzmqn2dgnlv12mwvjpzsxr6c"))))
12924 (build-system python-build-system)
12925 (propagated-inputs
12926 `(("python-aniso8601" ,python-aniso8601)
12927 ("python-flask" ,python-flask)
12928 ("python-pycrypto" ,python-pycrypto)
12929 ("python-pytz" ,python-pytz)))
12930 (native-inputs
12931 `(;; Optional dependency of Flask. Tests need it.
12932 ("python-blinker" ,python-blinker)
12933 ("python-mock" ,python-mock) ; For tests
12934 ("python-nose" ,python-nose) ; For tests
12935 ("python-sphinx" ,python-sphinx)))
12936 (home-page
12937 "https://www.github.com/flask-restful/flask-restful/")
12938 (synopsis
12939 "Flask module for creating REST APIs")
12940 (description
12941 "This package contains a Flask module for creating REST APIs.")
12942 (license license:bsd-3)))
12943
12944 (define-public python-flask-basicauth
12945 (package
12946 (name "python-flask-basicauth")
12947 (version "0.2.0")
12948 (source
12949 (origin
12950 (method url-fetch)
12951 (uri (pypi-uri "Flask-BasicAuth" version))
12952 (sha256
12953 (base32
12954 "1zq1spkjr4sjdnalpp8wl242kdqyk6fhbnhr8hi4r4f0km4bspnz"))))
12955 (build-system python-build-system)
12956 (propagated-inputs
12957 `(("python-flask" ,python-flask)))
12958 (home-page
12959 "https://github.com/jpvanhal/flask-basicauth")
12960 (synopsis
12961 "HTTP basic access authentication for Flask")
12962 (description
12963 "This package provides HTTP basic access authentication for Flask.")
12964 (license license:bsd-3)))
12965
12966 (define-public python-flask-sqlalchemy
12967 (package
12968 (name "python-flask-sqlalchemy")
12969 (version "2.1")
12970 (source
12971 (origin
12972 (method url-fetch)
12973 (uri (pypi-uri "Flask-SQLAlchemy" version))
12974 (sha256
12975 (base32
12976 "1i9ps5d5snih9xlqhrvmi3qfiygkmqzxh92n25kj4pf89kj4s965"))))
12977 (build-system python-build-system)
12978 (propagated-inputs
12979 `(("python-flask" ,python-flask)
12980 ("python-sqlalchemy" ,python-sqlalchemy)))
12981 (home-page
12982 "https://github.com/mitsuhiko/flask-sqlalchemy")
12983 (synopsis
12984 "Module adding SQLAlchemy support to your Flask application")
12985 (description
12986 "This package adds SQLAlchemy support to your Flask application.")
12987 (license license:bsd-3)))
12988
12989 (define-public python-pyev
12990 (package
12991 (name "python-pyev")
12992 (version "0.9.0")
12993 (source
12994 (origin
12995 (method url-fetch)
12996 (uri (pypi-uri "pyev" version))
12997 (sha256
12998 (base32
12999 "0rf603lc0s6zpa1nb25vhd8g4y337wg2wyz56i0agsdh7jchl0sx"))))
13000 (build-system python-build-system)
13001 (arguments
13002 `(#:tests? #f ; no test suite
13003 #:phases
13004 (modify-phases %standard-phases
13005 (add-after 'unpack 'patch
13006 (lambda* (#:key inputs #:allow-other-keys)
13007 (let ((libev (string-append (assoc-ref inputs "libev")
13008 "/lib/libev.so.4")))
13009 (substitute* "setup.py"
13010 (("libev_dll_name = find_library\\(\\\"ev\\\"\\)")
13011 (string-append "libev_dll_name = \"" libev "\"")))))))))
13012 (inputs
13013 `(("libev" ,libev)))
13014 (home-page "http://pythonhosted.org/pyev/")
13015 (synopsis "Python libev interface")
13016 (description "Pyev provides a Python interface to libev.")
13017 (license license:gpl3)))
13018
13019 (define-public python2-pyev
13020 (package-with-python2 python-pyev))
13021
13022 (define-public python-imagesize
13023 (package
13024 (name "python-imagesize")
13025 (version "0.7.1")
13026 (source
13027 (origin
13028 (method url-fetch)
13029 (uri (pypi-uri "imagesize" version))
13030 (sha256
13031 (base32
13032 "0qk07k0z4241lkzzjji7z4da04pcvg7bfc4xz1934zlqhwmwdcha"))))
13033 (build-system python-build-system)
13034 (arguments
13035 '(;; Test files are not distributed on PyPi:
13036 ;; https://github.com/shibukawa/imagesize_py/issues/7
13037 #:tests? #f))
13038 (home-page "https://github.com/shibukawa/imagesize_py")
13039 (synopsis "Gets image size of files in variaous formats in Python")
13040 (description
13041 "This package allows determination of image size from
13042 PNG, JPEG, JPEG2000 and GIF files in pure Python.")
13043 (license license:expat)))
13044
13045 (define-public python2-imagesize
13046 (package-with-python2 python-imagesize))
13047
13048 (define-public python-axolotl-curve25519
13049 (package
13050 (name "python-axolotl-curve25519")
13051 (version "0.1")
13052 (source
13053 (origin
13054 (method git-fetch)
13055 (uri (git-reference
13056 (url "git://github.com/tgalal/python-axolotl-curve25519")
13057 (commit "e4a9c4de0eae27223200579c58d1f8f6d20637e2")))
13058 (file-name (string-append name "-" version "-checkout"))
13059 (sha256
13060 (base32
13061 "0agap5q0hmvf6cwzjqc05kw53pjgf6942pcivpazksmg1vk400ra"))))
13062 (build-system python-build-system)
13063 (arguments
13064 `(;; Prevent creation of the egg. This works around
13065 ;; https://debbugs.gnu.org/cgi/bugreport.cgi?bug=20765
13066 #:configure-flags '("--root=/")))
13067 (home-page "https://github.com/tgalal/python-axolotl-curve25519")
13068 (synopsis "Python wrapper for curve25519 library")
13069 (description "This is a python wrapper for the curve25519 library
13070 with ed25519 signatures. The C code was pulled from
13071 libaxolotl-android. At the moment this wrapper is meant for use by
13072 python-axolotl.")
13073 (license (list license:gpl3 ; Most files
13074 license:bsd-3)))) ; curve/curve25519-donna.c
13075
13076 (define-public python2-axolotl-curve25519
13077 (package-with-python2 python-axolotl-curve25519))
13078
13079 (define-public python-axolotl
13080 (package
13081 (name "python-axolotl")
13082 (version "0.1.35")
13083 (source
13084 (origin
13085 (method url-fetch)
13086 (uri (string-append
13087 "https://github.com/tgalal/python-axolotl/archive/"
13088 version ".tar.gz"))
13089 (file-name (string-append name "-" version ".tar.gz"))
13090 (sha256
13091 (base32 "1z8d89p7v40p4bwywjm9h4z28fdvra79ddw06azlkrfjbl7dxmz8"))))
13092 (build-system python-build-system)
13093 (arguments
13094 `(#:phases
13095 (modify-phases %standard-phases
13096 ;; Don't install tests
13097 (add-before 'install 'remove-tests
13098 (lambda _
13099 (for-each delete-file-recursively
13100 '("axolotl/tests" "build/lib/axolotl/tests"))
13101 #t)))))
13102 (propagated-inputs
13103 `(("python-axolotl-curve25519" ,python-axolotl-curve25519)
13104 ("python-dateutil" ,python-dateutil)
13105 ("python-protobuf" ,python-protobuf)
13106 ("python-pycrypto" ,python-pycrypto)))
13107 (home-page "https://github.com/tgalal/python-axolotl")
13108 (synopsis "Python port of libaxolotl-android")
13109 (description "This is a python port of libaxolotl-android. This
13110 is a ratcheting forward secrecy protocol that works in synchronous and
13111 asynchronous messaging environments.")
13112 (license license:gpl3)))
13113
13114 (define-public python2-axolotl
13115 (package-with-python2 python-axolotl))
13116
13117 (define-public python-termstyle
13118 (package
13119 (name "python-termstyle")
13120 (version "0.1.11")
13121 (source
13122 (origin
13123 (method url-fetch)
13124 (uri (pypi-uri "termstyle" version))
13125 (sha256
13126 (base32
13127 "17wzkkcqy5zc0g68xlad3kcv66iw14d2pwqc0h9420gak0vbhx7g"))))
13128 (build-system python-build-system)
13129 (arguments
13130 '(#:phases
13131 (modify-phases %standard-phases
13132 (replace 'check
13133 (lambda _
13134 (zero? (system* "python" "test3.py")))))))
13135 (home-page "https://github.com/gfxmonk/termstyle")
13136 (synopsis "Console text coloring for Python")
13137 (description "This package provides console text coloring for Python.")
13138 (license license:bsd-3)))
13139
13140 (define-public python-rednose
13141 (package
13142 (name "python-rednose")
13143 (version "1.2.1")
13144 (source
13145 (origin
13146 (method url-fetch)
13147 (uri (pypi-uri "rednose" version))
13148 (sha256
13149 (base32
13150 "0b0bsna217lr1nykyhl5fgjly15zhdvqd4prg4wy1zrgfv7al6m0"))))
13151 (build-system python-build-system)
13152 (arguments
13153 `(#:phases
13154 (modify-phases %standard-phases
13155 (add-after 'unpack 'fix-deps
13156 (lambda _
13157 ;; See <https://github.com/JBKahn/rednose/issues/12>
13158 (substitute* "setup.py"
13159 (("python-termstyle") "termstyle"))
13160 #t)))))
13161 (propagated-inputs
13162 `(("python-colorama" ,python-colorama)
13163 ("python-termstyle" ,python-termstyle)))
13164 (native-inputs
13165 `(("python-six" ,python-six)
13166 ("python-nose" ,python-nose)))
13167 (home-page "https://github.com/JBKahn/rednose")
13168 (synopsis "Colored output for Python nosetests")
13169 (description "This package provides colored output for the
13170 @command{nosetests} command of the Python Nose unit test framework.")
13171 (license license:bsd-3)))
13172
13173 (define-public python2-rednose
13174 (package-with-python2 python-rednose))
13175
13176 (define-public python-flask-restplus
13177 (package
13178 (name "python-flask-restplus")
13179 (version "0.9.2")
13180 (source
13181 (origin
13182 (method url-fetch)
13183 (uri (pypi-uri "flask-restplus" version))
13184 (sha256
13185 (base32
13186 "11his6ii5brpkhld0d5bwzjjw4q3vmplpd6fmgzjrvvklsbk0cf4"))))
13187 (build-system python-build-system)
13188 (arguments
13189 '(#:tests? #f)) ; FIXME: 35/882 tests failing.
13190 ;; #:phases
13191 ;; (modify-phases %standard-phases
13192 ;; (replace 'check
13193 ;; (lambda _
13194 ;; (zero? (system* "nosetests")))))))
13195 (propagated-inputs
13196 `(("python-aniso8601" ,python-aniso8601)
13197 ("python-flask" ,python-flask)
13198 ("python-jsonschema" ,python-jsonschema)
13199 ("python-pytz" ,python-pytz)
13200 ("python-six" ,python-six)))
13201 (native-inputs
13202 `(("python-tzlocal" ,python-tzlocal)
13203 ("python-blinker" ,python-blinker)
13204 ("python-nose" ,python-nose)
13205 ("python-rednose" ,python-rednose)))
13206 (home-page "https://github.com/noirbizarre/flask-restplus")
13207 (synopsis "Framework for documented API development with Flask")
13208 (description "This package provides a framework for API development with
13209 the Flask web framework in Python. It is similar to package
13210 @code{python-flask-restful} but supports the @code{python-swagger}
13211 documentation builder.")
13212 (license license:expat)))
13213
13214 (define-public python-sadisplay
13215 (package
13216 (name "python-sadisplay")
13217 (version "0.4.6")
13218 (source
13219 (origin
13220 (method url-fetch)
13221 (uri (pypi-uri "sadisplay" version))
13222 (sha256
13223 (base32
13224 "0zqad2fl7q26p090qmqgmxbm6iwgf9zij1w8da1g3wdgjj72ql05"))))
13225 (build-system python-build-system)
13226 (propagated-inputs
13227 `(("python-sqlalchemy" ,python-sqlalchemy)))
13228 (native-inputs
13229 `(("python-nose" ,python-nose)))
13230 (home-page "https://bitbucket.org/estin/sadisplay")
13231 (synopsis "SQLAlchemy schema displayer")
13232 (description "This package provides a program to build Entity
13233 Relationship diagrams from a SQLAlchemy model (or directly from the
13234 database).")
13235 (license license:bsd-3)))
13236
13237 (define-public python2-sadisplay
13238 (package-with-python2 python-sadisplay))
13239
13240 (define-public python-flask-restful-swagger
13241 (package
13242 (name "python-flask-restful-swagger")
13243 (version "0.19")
13244 (source
13245 (origin
13246 (method url-fetch)
13247 (uri (pypi-uri "flask-restful-swagger" version))
13248 (sha256
13249 (base32
13250 "16msl8hd5xjmj833bpy264v98cpl5hkw5bgl5gf5vgndxbv3rm6v"))))
13251 (build-system python-build-system)
13252 (propagated-inputs
13253 `(("python-flask-restful" ,python-flask-restful)))
13254 (home-page "https://github.com/rantav/flask-restful-swagger")
13255 (synopsis "Extract Swagger specs from Flask-Restful projects")
13256 (description "This package lets you extract Swagger API documentation
13257 specs from your Flask-Restful projects.")
13258 (license license:expat)))
13259
13260 (define-public python2-flask-restful-swagger
13261 (package-with-python2 python-flask-restful-swagger))
13262
13263 (define-public python-argcomplete
13264 (package
13265 (name "python-argcomplete")
13266 (version "1.7.0")
13267 (source
13268 (origin
13269 (method url-fetch)
13270 (uri (pypi-uri "argcomplete" version))
13271 (sha256
13272 (base32
13273 "11bwiw6j0nilgz81xnw6f1npyga3prp8asjqrm87cdr3ria5l03x"))))
13274 (build-system python-build-system)
13275 (native-inputs
13276 `(("python-pexpect" ,python-pexpect)
13277 ("tcsh" ,tcsh)))
13278 (home-page "https://github.com/kislyuk/argcomplete")
13279 (synopsis "Shell tab completion for Python argparse")
13280 (description "argcomplete provides extensible command line tab completion
13281 of arguments and options for Python scripts using @code{argparse}. It's
13282 particularly useful for programs with many options or sub-parsers that can
13283 dynamically suggest completions; for example, when browsing resources over the
13284 network.")
13285 (license license:asl2.0)))
13286
13287 (define-public python2-argcomplete
13288 (package-with-python2 python-argcomplete))
13289
13290 (define-public python-xopen
13291 (package
13292 (name "python-xopen")
13293 (version "0.1.1")
13294 (source
13295 (origin
13296 (method url-fetch)
13297 (uri (pypi-uri "xopen" version))
13298 (sha256
13299 (base32
13300 "1wx6mylzcsyhjl19ycb83qq6iqpmr927lz62njfsar6ldsj0qcni"))
13301 (file-name (string-append name "-" version ".tar.gz"))))
13302 (build-system python-build-system)
13303 (home-page "https://github.com/marcelm/xopen/")
13304 (synopsis "Open compressed files transparently")
13305 (description "This module provides an @code{xopen} function that works like
13306 Python's built-in @code{open} function, but can also deal with compressed files.
13307 Supported compression formats are gzip, bzip2 and, xz, and are automatically
13308 recognized by their file extensions. The focus is on being as efficient as
13309 possible on all supported Python versions.")
13310 (license license:expat)))
13311
13312 (define-public python2-xopen
13313 (package-with-python2 python-xopen))
13314
13315 (define-public python2-cheetah
13316 (package
13317 (name "python2-cheetah")
13318 (version "2.4.4")
13319 (source
13320 (origin
13321 (method url-fetch)
13322 (uri (pypi-uri "Cheetah" version))
13323 (sha256
13324 (base32
13325 "0l5mm4lnysjkzpjr95q5ydm9xc8bv43fxmr79ypybrf1y0lq4c5y"))))
13326 (build-system python-build-system)
13327 (arguments
13328 `(#:python ,python-2))
13329 (propagated-inputs
13330 `(("python2-markdown" ,python2-markdown)))
13331 (home-page "https://pythonhosted.org/Cheetah/")
13332 (synopsis "Template engine")
13333 (description "Cheetah is a text-based template engine and Python code
13334 generator.
13335
13336 Cheetah can be used as a standalone templating utility or referenced as
13337 a library from other Python applications. It has many potential uses,
13338 but web developers looking for a viable alternative to ASP, JSP, PHP and
13339 PSP are expected to be its principle user group.
13340
13341 Features:
13342 @enumerate
13343 @item Generates HTML, SGML, XML, SQL, Postscript, form email, LaTeX, or any other
13344 text-based format.
13345 @item Cleanly separates content, graphic design, and program code.
13346 @item Blends the power and flexibility of Python with a simple template language
13347 that non-programmers can understand.
13348 @item Gives template writers full access to any Python data structure, module,
13349 function, object, or method in their templates.
13350 @item Makes code reuse easy by providing an object-orientated interface to
13351 templates that is accessible from Python code or other Cheetah templates.
13352 One template can subclass another and selectively reimplement sections of it.
13353 @item Provides a simple, yet powerful, caching mechanism that can dramatically
13354 improve the performance of a dynamic website.
13355 @item Compiles templates into optimized, yet readable, Python code.
13356 @end enumerate")
13357 (license (license:x11-style "file://LICENSE"))))
13358
13359 (define-public python-dulwich
13360 (package
13361 (name "python-dulwich")
13362 (version "0.16.3")
13363 (source
13364 (origin
13365 (method url-fetch)
13366 (uri (list (string-append "https://www.dulwich.io/releases/"
13367 "dulwich-" version ".tar.gz")
13368 (pypi-uri "dulwich" version)))
13369 (sha256
13370 (base32 "0fl47vzfgc3w3rmhn8naii905cjqcp0vc68iyvymxp7567hh6als"))))
13371 (build-system python-build-system)
13372 (arguments
13373 `(#:phases
13374 (modify-phases %standard-phases
13375 (add-before 'check 'fix-tests
13376 (lambda* (#:key inputs #:allow-other-keys)
13377 ;; The tests use Popen with a custom environment which doesn't
13378 ;; include PATH.
13379 (substitute* "dulwich/tests/compat/utils.py"
13380 (("'git'") (string-append "'"
13381 (which "git")
13382 "'")))
13383 (substitute* '("dulwich/tests/test_repository.py"
13384 "dulwich/tests/test_hooks.py")
13385 (("#!/bin/sh") (string-append "#!" (which "sh"))))
13386 (setenv "TEST_RUNNER" "unittest")
13387 (setenv "PYTHONHASHSEED" "random")
13388 #t)))))
13389 (propagated-inputs
13390 `(("python-fastimport" ,python-fastimport)))
13391 (native-inputs
13392 `(("python-mock" ,python-mock)
13393 ("python-geventhttpclient" ,python-geventhttpclient)
13394 ("git" ,git)))
13395 (home-page "https://www.dulwich.io/")
13396 (synopsis "Git implementation in Python")
13397 (description "Dulwich is an implementation of the Git file formats and
13398 protocols written in pure Python.")
13399 ;; Can be used with either license.
13400 (license (list license:asl2.0 license:gpl2+))))
13401
13402 (define-public python2-dulwich
13403 (package-with-python2 python-dulwich))
13404
13405 (define-public python-pbkdf2
13406 (package
13407 (name "python-pbkdf2")
13408 (version "1.3")
13409 (source
13410 (origin
13411 (method url-fetch)
13412 (uri (pypi-uri "pbkdf2" version))
13413 (sha256
13414 (base32
13415 "0yb99rl2mbsaamj571s1mf6vgniqh23v98k4632150hjkwv9fqxc"))))
13416 (build-system python-build-system)
13417 (arguments
13418 '(#:phases
13419 (modify-phases %standard-phases
13420 (replace 'check
13421 (lambda _
13422 (setenv "PYTHONPATH"
13423 (string-append (getcwd) "/build/lib:"
13424 (getenv "PYTHONPATH")))
13425 (zero? (system* "python" "test/test_pbkdf2.py")))))))
13426 (propagated-inputs
13427 `(("python-pycrypto" ,python-pycrypto))) ; optional
13428 (home-page "http://www.dlitz.net/software/python-pbkdf2/")
13429 (synopsis "Password-based key derivation")
13430 (description "This module implements the password-based key derivation
13431 function, PBKDF2, specified in RSA PKCS#5 v2.0.
13432
13433 PKCS#5 v2.0 Password-Based Key Derivation is a key derivation function which
13434 is part of the RSA Public Key Cryptography Standards series. The provided
13435 implementation takes a password or a passphrase and a salt value (and
13436 optionally a iteration count, a digest module, and a MAC module) and provides
13437 a file-like object from which an arbitrarly-sized key can be read.")
13438 (license license:expat)))
13439
13440 (define-public python2-pbkdf2
13441 (package-with-python2 python-pbkdf2))
13442
13443 (define-public python-qrcode
13444 (package
13445 (name "python-qrcode")
13446 (version "5.3")
13447 (source
13448 (origin
13449 (method url-fetch)
13450 (uri (pypi-uri "qrcode" version))
13451 (sha256
13452 (base32
13453 "0kljfrfq0c2rmxf8am57333ia41kd0snbm2rnqbdy816hgpcq5a1"))))
13454 (build-system python-build-system)
13455 (arguments
13456 ;; FIXME: Tests require packaging 'pymaging'.
13457 '(#:tests? #f))
13458 (propagated-inputs
13459 `(("python-lxml" ,python-lxml) ; for SVG output
13460 ("python-pillow" ,python-pillow) ; for PNG output
13461 ("python-six" ,python-six)))
13462 (home-page "https://github.com/lincolnloop/python-qrcode")
13463 (synopsis "QR Code image generator")
13464 (description "This package provides a pure Python QR Code generator
13465 module. It uses the Python Imaging Library (PIL) to allow for the generation
13466 of QR Codes.
13467
13468 In addition this package provides a command line tool to generate QR codes and
13469 either write these QR codes to a file or do the output as ascii art at the
13470 console.")
13471 (license license:bsd-3)))
13472
13473 (define-public python2-qrcode
13474 (package-with-python2 python-qrcode))
13475
13476 ;; SlowAES isn't compatible with Python 3.
13477 (define-public python2-slowaes
13478 (package
13479 (name "python2-slowaes")
13480 (version "0.1a1")
13481 (source
13482 (origin
13483 (method url-fetch)
13484 (uri (pypi-uri "slowaes" version))
13485 (sha256
13486 (base32
13487 "02dzajm83a7lqgxf6r3hgj64wfmcxz8gs4nvgxpvj5n19kjqlrc3"))))
13488 (build-system python-build-system)
13489 (arguments `(#:python ,python-2))
13490 (home-page "http://code.google.com/p/slowaes/")
13491 (synopsis "Implementation of AES in Python")
13492 (description "This package contains an implementation of AES in Python.
13493 This implementation is slow (hence the project name) but still useful when
13494 faster ones are not available.")
13495 (license license:asl2.0)))
13496
13497 (define-public python-rst2ansi
13498 (package
13499 (name "python-rst2ansi")
13500 (version "0.1.5")
13501 (source
13502 (origin
13503 (method url-fetch)
13504 (uri (pypi-uri "rst2ansi" version))
13505 (sha256
13506 (base32
13507 "0vzy6gd60l79ff750scl0sz48r1laalkl6md6dwzah4dcadgn5qv"))))
13508 (build-system python-build-system)
13509 (propagated-inputs
13510 `(("python-docutils" ,python-docutils)))
13511 (home-page "https://github.com/Snaipe/python-rst-to-ansi")
13512 (synopsis "Convert RST to ANSI-decorated console output")
13513 (description
13514 "Python module dedicated to rendering RST (reStructuredText) documents
13515 to ansi-escaped strings suitable for display in a terminal.")
13516 (license license:expat)))
13517
13518 (define-public python-ansi2html
13519 (package
13520 (name "python-ansi2html")
13521 (version "1.2.0")
13522 (source
13523 (origin
13524 (method url-fetch)
13525 (uri (pypi-uri "ansi2html" version))
13526 (sha256
13527 (base32
13528 "1wa00zffprb78w1mqq90dk47czz1knanys2a40zbw2vyapd5lp9y"))))
13529 (build-system python-build-system)
13530 (native-inputs
13531 `(("python-mock" ,python-mock)
13532 ("python-nose" ,python-nose)))
13533 (propagated-inputs
13534 `(("python-six" ,python-six)))
13535 (home-page "http://github.com/ralphbean/ansi2html")
13536 (synopsis "Convert ANSI-decorated console output to HTML")
13537 (description
13538 "@command{ansi2html} is a Python library and command line utility for
13539 convering text with ANSI color codes to HTML or LaTeX.")
13540 (license license:gpl3+)))
13541
13542 (define-public python2-ansi2html
13543 (package-with-python2 python-ansi2html))
13544
13545 (define-public python-ddt
13546 (package
13547 (name "python-ddt")
13548 (version "1.1.1")
13549 (source
13550 (origin
13551 (method url-fetch)
13552 (uri (pypi-uri "ddt" version))
13553 (sha256
13554 (base32
13555 "1c00ikkxr7lha97c81k938bzhgd4pbwamkjn0h4nkhr3xk00zp6n"))))
13556 (build-system python-build-system)
13557 (native-inputs
13558 `(("python-mock" ,python-mock)
13559 ("python-nose" ,python-nose)))
13560 (propagated-inputs
13561 `(("python-six" ,python-six)
13562 ("python-pyyaml" ,python-pyyaml)))
13563 (home-page "https://github.com/txels/ddt")
13564 (synopsis "Data-Driven Tests")
13565 (description
13566 "DDT (Data-Driven Tests) allows you to multiply one test case by running
13567 it with different test data, and make it appear as multiple test cases.")
13568 (license license:expat)))
13569
13570 (define-public python2-ddt
13571 (package-with-python2 python-ddt))
13572
13573 (define-public python-pycosat
13574 (package
13575 (name "python-pycosat")
13576 (version "0.6.1")
13577 (source
13578 (origin
13579 (method url-fetch)
13580 (uri (pypi-uri "pycosat" version))
13581 (sha256
13582 (base32
13583 "1kl3wh1f47rc712n4bmwplbx3fqz3x9i1b587jrbpmvdva4c8f6l"))))
13584 ;; TODO: Unundle picosat. http://fmv.jku.at/picosat/
13585 (build-system python-build-system)
13586 (home-page "https://github.com/ContinuumIO/pycosat")
13587 (synopsis "Bindings to picosat (a SAT solver)")
13588 (description
13589 "This package provides efficient Python bindings to @code{picosat} on
13590 the C level. When importing pycosat, the @code{picosat} solver becomes part
13591 of the Python process itself. @code{picosat} is a @dfn{Boolean Satisfiability
13592 Problem} (SAT) solver.")
13593 (license license:expat)))
13594
13595 (define-public python2-pycosat
13596 (package-with-python2 python-pycosat))
13597
13598 (define-public python2-ruamel.ordereddict
13599 (package
13600 (name "python2-ruamel.ordereddict")
13601 (version "0.4.9")
13602 (source
13603 (origin
13604 (method url-fetch)
13605 (uri (pypi-uri "ruamel.ordereddict" version))
13606 (sha256
13607 (base32
13608 "1xmkl8v9l9inm2pyxgc1fm5005yxm7fkd5gv74q7lj1iy5qc8n3h"))))
13609 (build-system python-build-system)
13610 (arguments
13611 `(#:python ,python-2
13612 #:phases
13613 (modify-phases %standard-phases
13614 (delete 'check)
13615 (add-after 'install 'check
13616 (lambda* (#:key inputs outputs #:allow-other-keys)
13617 (add-installed-pythonpath inputs outputs)
13618 (zero? (system* "python" "test/testordereddict.py")))))))
13619 (home-page "https://bitbucket.org/ruamel/ordereddict")
13620 (synopsis "Version of dict that keeps keys in insertion order")
13621 (description
13622 "This is an implementation of an ordered dictionary with @dfn{Key
13623 Insertion Order} (KIO: updates of values do not affect the position of the
13624 key), @dfn{Key Value Insertion Order} (KVIO, an existing key's position is
13625 removed and put at the back). The standard library module @code{OrderedDict},
13626 implemented later, implements a subset of @code{ordereddict} functionality.
13627 Sorted dictionaries are also provided. Currently only with @dfn{Key Sorted
13628 Order} (KSO, no sorting function can be specified, but a transform can be
13629 specified to apply on the key before comparison (e.g. @code{string.lower})).")
13630 (license license:expat)))
13631
13632 (define-public python-pypeg2
13633 (package
13634 (name "python-pypeg2")
13635 (version "2.15.2")
13636 (source
13637 (origin
13638 (method url-fetch)
13639 (uri (pypi-uri "pyPEG2" version))
13640 (sha256
13641 (base32
13642 "0v8ziaam2r637v94ra4dbjw6jzxz99gs5x4i585kgag1v204yb9b"))))
13643 (build-system python-build-system)
13644 (propagated-inputs `(("python-lxml" ,python-lxml)))
13645 (arguments
13646 ;;https://bitbucket.org/fdik/pypeg/issues/36/test-failures-on-py35
13647 '(#:tests? #f))
13648 (home-page "https://fdik.org/pyPEG/")
13649 (synopsis "Parsering Expression Grammars in Python")
13650 (description "PyPEG is an intrinsic parser interpreter framework for
13651 Python. It is based on Parsing Expression Grammars, PEG. With pyPEG you can
13652 parse many formal languages.")
13653 (license license:gpl2)))
13654
13655 (define-public python2-cliapp
13656 (package
13657 (name "python2-cliapp")
13658 (version "1.20160724")
13659 (source
13660 (origin
13661 (method url-fetch)
13662 (uri (string-append
13663 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/cliapp/snapshot/cliapp-"
13664 version ".tar.gz"))
13665 (sha256
13666 (base32
13667 "025cyi75vxyghbm4hav8dz4fzwksshddavy9g9fwr440awcvw74f"))))
13668 (build-system python-build-system)
13669 (arguments
13670 `(#:python ,python-2))
13671 (propagated-inputs
13672 `(("python2-pyaml" ,python2-pyaml)))
13673 (home-page "https://liw.fi/cliapp/")
13674 (synopsis "Python framework for command line programs")
13675 (description "@code{python2-cliapp} is a python framework for
13676 command line programs. It contains the typical stuff such programs
13677 need to do, such as parsing the command line for options, and
13678 iterating over input files.")
13679 (license license:gpl2+)))
13680
13681 (define-public python2-ttystatus
13682 (package
13683 (name "python2-ttystatus")
13684 (version "0.32")
13685 (source
13686 (origin
13687 (method url-fetch)
13688 (uri (string-append
13689 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/ttystatus/snapshot/ttystatus-"
13690 version ".tar.gz"))
13691 (sha256
13692 (base32
13693 "0b5g889jj23r2w1hi300cdldx6jvspanp0ybf5n1qvdvl150aamf"))))
13694 (build-system python-build-system)
13695 (arguments
13696 `(#:python ,python-2))
13697 (home-page "https://liw.fi/ttystatus/")
13698 (synopsis "Python library for showing progress reporting and
13699 status updates on terminals")
13700 (description "@code{python2-ttystatus} is a python library for
13701 showing progress reporting and status updates on terminals, for
13702 command line programs. Output is automatically adapted to the width
13703 of the terminal: truncated if it does not fit, and resized if the
13704 terminal size changes.")
13705 (license license:gpl3+)))
13706
13707 (define-public python2-tracing
13708 (package
13709 (name "python2-tracing")
13710 (version "0.10")
13711 (source
13712 (origin
13713 (method url-fetch)
13714 (uri (string-append
13715 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/python-tracing/snapshot/tracing-"
13716 version ".tar.gz"))
13717 (sha256
13718 (base32
13719 "06cw4zg42fsvqy372vi2whj26w56vzg5axhzwdjc2bgwf03garbw"))))
13720 (build-system python-build-system)
13721 (arguments
13722 `(#:python ,python-2))
13723 (home-page "https://liw.fi/tracing/")
13724 (synopsis "Python debug logging helper")
13725 (description "@code{python2-tracing} is a python library for
13726 logging debug messages. It provides a way to turn debugging messages
13727 on and off, based on the filename they occur in. It is much faster
13728 than using @code{logging.Filter} to accomplish the same thing, which
13729 matters when code is run in production mode. The actual logging still
13730 happens using the @code{logging} library.")
13731 (license license:gpl3+)))
13732
13733 (define-public python2-larch
13734 (package
13735 (name "python2-larch")
13736 (version "1.20151025")
13737 (source
13738 (origin
13739 (method url-fetch)
13740 (uri (string-append
13741 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/larch/snapshot/larch-"
13742 version ".tar.gz"))
13743 (sha256
13744 (base32
13745 "1p4knkkavlqymgciz2wbcnfrdgdbafhg14maplnk4vbw0q8xs663"))))
13746 (build-system python-build-system)
13747 (arguments
13748 `(#:python ,python-2))
13749 (propagated-inputs
13750 `(("python2-tracing" ,python2-tracing)))
13751 (home-page "https://liw.fi/larch/")
13752 (synopsis "Python copy-on-write B-tree library")
13753 (description "@code{python2-larch} is an implementation of
13754 particular kind of B-tree, based on research by Ohad Rodeh. See
13755 @url{http://liw.fi/larch/ohad-btrees-shadowing-clones.pdf} for details
13756 on the data structure.
13757
13758 The distinctive feature of this B-tree is that a node is never
13759 (conceptually) modified. Instead, all updates are done by
13760 copy-on-write. This makes it easy to clone a tree, and modify only the
13761 clone, while other processes access the original tree.")
13762 (license license:gpl3+)))
13763
13764 (define-public python-htmlmin
13765 (package
13766 (name "python-htmlmin")
13767 (version "0.1.10")
13768 (source
13769 (origin
13770 (method url-fetch)
13771 (uri (pypi-uri "htmlmin" version))
13772 (sha256
13773 (base32
13774 "0qxa93j3p1ak32qh8d9kshqv8v3z0hkc13dwbhp5cn7sn3xmsp6a"))))
13775 (arguments
13776 `(#:tests? #f)) ;htmlmin has no tests
13777 (build-system python-build-system)
13778 (home-page "https://htmlmin.readthedocs.org/en/latest/")
13779 (synopsis "HTML minifier")
13780 (description "@code{htmlmin} is an HTML minifier that just works.
13781 It comes with safe defaults and easily configurable options.")
13782 (license license:bsd-3)))
13783
13784 (define-public python2-htmlmin
13785 (package-with-python2 python-htmlmin))
13786
13787 (define-public python-flask-htmlmin
13788 (package
13789 (name "python-flask-htmlmin")
13790 (version "1.2")
13791 (source
13792 (origin
13793 (method url-fetch)
13794 (uri (pypi-uri "Flask-HTMLmin" version))
13795 (sha256
13796 (base32
13797 "1n6zlq72kakkw0z2jpq6nh74lfsmxybm4g053pwhc14fbr809348"))))
13798 (propagated-inputs
13799 `(("python-flask" ,python-flask)
13800 ("python-htmlmin" ,python-htmlmin)))
13801 (build-system python-build-system)
13802 (home-page "https://github.com/hamidfzm/Flask-HTMLmin")
13803 (synopsis "HTML response minifier for Flask")
13804 (description
13805 "Minify @code{text/html} MIME type responses when using @code{Flask}.")
13806 (license license:bsd-3)))
13807
13808 (define-public python2-flask-htmlmin
13809 (package-with-python2 python-flask-htmlmin))
13810
13811 (define-public python-flask-login
13812 (package
13813 (name "python-flask-login")
13814 (version "0.4.0")
13815 (source
13816 (origin
13817 (method url-fetch)
13818 (uri (string-append "https://github.com/maxcountryman/flask-login/archive/"
13819 version ".tar.gz"))
13820 (file-name (string-append name "-" version ".tar.gz"))
13821 (sha256
13822 (base32
13823 "1pdqp7a2gyb7k06xda004x0fi2w66s6kn2i0ndkqndmg12d83f9w"))))
13824 (arguments
13825 ;; Tests fail PEP8 compliance. See:
13826 ;; https://github.com/maxcountryman/flask-login/issues/340
13827 `(#:tests? #f))
13828 (build-system python-build-system)
13829 (home-page "https://github.com/maxcountryman/flask-login")
13830 (synopsis "User session management for Flask")
13831 (description
13832 "@code{Flask-Login} provides user session management for Flask. It
13833 handles the common tasks of logging in, logging out, and remembering your
13834 users' sessions over extended periods of time.")
13835 (license license:expat)))
13836
13837 (define-public python2-flask-login
13838 (package-with-python2 python-flask-login))
13839
13840 (define-public python-astroid
13841 (package
13842 (name "python-astroid")
13843 (version "1.4.9")
13844 (source
13845 (origin
13846 (method url-fetch)
13847 (uri (string-append
13848 "https://github.com/PyCQA/astroid/archive/astroid-"
13849 version ".tar.gz"))
13850 (sha256
13851 (base32
13852 "0j0wgy54d13a470vm4b9rdjk99n1hmdxpf34x9k3pbmi9w9b566z"))))
13853 (build-system python-build-system)
13854 (propagated-inputs
13855 `(("python-lazy-object-proxy" ,python-lazy-object-proxy)
13856 ("python-six" ,python-six)
13857 ("python-wrapt" ,python-wrapt)))
13858 (arguments
13859 `(#:phases
13860 (modify-phases %standard-phases
13861 (replace 'check
13862 (lambda _
13863 (zero? (system* "python" "-m" "unittest" "discover"
13864 "-p" "unittest*.py")))))))
13865 (home-page "https://github.com/PyCQA/astroid")
13866 (synopsis "Common base representation of python source code for pylint and
13867 other projects")
13868 (description "@code{python-astroid} provides a common base representation
13869 of python source code for projects such as pychecker, pyreverse, pylint, etc.
13870
13871 It provides a compatible representation which comes from the _ast module. It
13872 rebuilds the tree generated by the builtin _ast module by recursively walking
13873 down the AST and building an extended ast. The new node classes have
13874 additional methods and attributes for different usages. They include some
13875 support for static inference and local name scopes. Furthermore, astroid
13876 builds partial trees by inspecting living objects.")
13877 (license license:lgpl2.1+)))
13878
13879 (define-public python2-astroid
13880 (package-with-python2 python-astroid))
13881
13882 (define-public python-isort
13883 (package
13884 (name "python-isort")
13885 (version "4.2.5")
13886 (source
13887 (origin
13888 (method url-fetch)
13889 (uri (string-append
13890 "https://github.com/timothycrosley/isort/archive/"
13891 version ".tar.gz"))
13892 (file-name (string-append name "-" version ".tar.gz"))
13893 (sha256
13894 (base32
13895 "0zsrgkb0krn5476yncy5dd56k7dk34zqb4bnlvwy44ixgilyjmfh"))))
13896 (build-system python-build-system)
13897 (native-inputs
13898 `(("python-mock" ,python-mock)
13899 ("python-pytest" ,python-pytest)))
13900 (home-page "https://github.com/timothycrosley/isort")
13901 (synopsis "Python utility/library to sort python imports")
13902 (description "@code{python-isort} is a python utility/library to sort
13903 imports alphabetically, and automatically separated into sections. It
13904 provides a command line utility, a python library and plugins for various
13905 editors.")
13906 (license license:expat)))
13907
13908 (define-public python2-isort
13909 (package-with-python2 python-isort))
13910
13911 (define-public python2-backports-functools-lru-cache
13912 (package
13913 (name "python2-backports-functools-lru-cache")
13914 (version "1.3")
13915 (source
13916 (origin
13917 (method url-fetch)
13918 ;; only the pypi tarballs contain the necessary metadata
13919 (uri (pypi-uri "backports.functools_lru_cache" version))
13920 (sha256
13921 (base32
13922 "158ysf2hb0q4p4695abfiym9x1ywg0dgh8a3apd7gqaaxjy22jj4"))))
13923 (build-system python-build-system)
13924 (native-inputs
13925 `(("python2-setuptools-scm" ,python2-setuptools-scm)))
13926 (arguments
13927 `(#:python ,python-2))
13928 (home-page "https://github.com/jaraco/backports.functools_lru_cache")
13929 (synopsis "Backport of functools.lru_cache from Python 3.3")
13930 (description "@code{python2-backports-functools-lru-cache} is a backport
13931 of @code{functools.lru_cache} from python 3.3.")
13932 (license license:expat)))
13933
13934 (define-public python-configparser
13935 (package
13936 (name "python-configparser")
13937 (version "3.5.0")
13938 (source
13939 (origin
13940 (method url-fetch)
13941 (uri (string-append
13942 "https://bitbucket.org/ambv/configparser/get/"
13943 version ".tar.bz2"))
13944 (file-name (string-append name "-" version ".tar.gz"))
13945 (sha256
13946 (base32
13947 "0waq40as14abwzbb321hfz4vr1fi363nscy32ga14qvfygrg96wa"))))
13948 (build-system python-build-system)
13949 (home-page "http://docs.python.org/py3k/library/configparser.html")
13950 (synopsis "Backport of configparser from python 3.5")
13951 (description "@code{python-configparser} is a backport of
13952 @code{configparser} from Python 3.5 so that it can be used directly
13953 in other versions.")
13954 (license license:expat)))
13955
13956 (define-public python2-configparser
13957 (package-with-python2 python-configparser))
13958
13959 (define-public python2-coverage-test-runner
13960 (package
13961 (name "python2-coverage-test-runner")
13962 (version "1.11")
13963 (source
13964 (origin
13965 (method url-fetch)
13966 (uri (string-append
13967 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/"
13968 "coverage-test-runner/snapshot/coverage-test-runner-"
13969 version ".tar.gz"))
13970 (sha256
13971 (base32
13972 "0y1m7z3dl63kmhcmydl1mwg0hacnf6ghrx9dah17j9iasssfa3g7"))))
13973 (build-system python-build-system)
13974 (arguments
13975 `(#:python ,python-2
13976 #:phases
13977 (modify-phases %standard-phases
13978 (replace 'check
13979 (lambda _
13980 (zero? (system* "./testrun")))))))
13981 (propagated-inputs
13982 `(("python2-coverage" ,python2-coverage)))
13983 (home-page "https://liw.fi/coverage-test-runner/")
13984 (synopsis "Python module for running unit tests")
13985 (description "@code{CoverageTestRunner} is a python module for running
13986 unit tests and failing them if the unit test module does not exercise all
13987 statements in the module it tests.")
13988 (license license:gpl3+)))
13989
13990 (define-public python-pylint
13991 (package
13992 (name "python-pylint")
13993 (version "1.6.5")
13994 (source
13995 (origin
13996 (method url-fetch)
13997 (uri (string-append
13998 "https://github.com/PyCQA/pylint/archive/pylint-"
13999 version ".tar.gz"))
14000 (sha256
14001 (base32
14002 "08pmgflmq2zrzrn9nkfadzwa5vybz46wvwxhrsd2mjlcgsh4rzbm"))))
14003 (build-system python-build-system)
14004 (native-inputs
14005 `(("python-tox" ,python-tox)))
14006 (propagated-inputs
14007 `(("python-astroid" ,python-astroid)
14008 ("python-isort" ,python-isort)
14009 ("python-mccabe" ,python-mccabe)
14010 ("python-six" ,python-six)))
14011 (arguments
14012 `(#:phases
14013 (modify-phases %standard-phases
14014 (replace 'check
14015 (lambda _
14016 ;; Somehow, tests for python2-pylint
14017 ;; fail if run from the build directory
14018 (let ((work "/tmp/work"))
14019 (mkdir-p work)
14020 (setenv "PYTHONPATH"
14021 (string-append (getenv "PYTHONPATH") ":" work))
14022 (copy-recursively "." work)
14023 (with-directory-excursion "/tmp"
14024 (zero? (system* "python" "-m" "unittest" "discover"
14025 "-s" (string-append work "/pylint/test")
14026 "-p" "*test_*.py")))))))))
14027 (home-page "https://github.com/PyCQA/pylint")
14028 (synopsis "Python source code analyzer which looks for coding standard
14029 errors")
14030 (description "Pylint is a Python source code analyzer which looks
14031 for programming errors, helps enforcing a coding standard and sniffs
14032 for some code smells (as defined in Martin Fowler's Refactoring book).
14033
14034 Pylint has many rules enabled by default, way too much to silence them
14035 all on a minimally sized program. It's highly configurable and handle
14036 pragmas to control it from within your code. Additionally, it is
14037 possible to write plugins to add your own checks.")
14038 (license license:gpl2+)))
14039
14040 (define-public python2-pylint
14041 (let ((pylint (package-with-python2 python-pylint)))
14042 (package (inherit pylint)
14043 (propagated-inputs
14044 `(("python2-backports-functools-lru-cache"
14045 ,python2-backports-functools-lru-cache)
14046 ("python2-configparser" ,python2-configparser)
14047 ,@(package-propagated-inputs pylint))))))
14048
14049 (define-public python-paramunittest
14050 (package
14051 (name "python-paramunittest")
14052 (version "0.2")
14053 (source
14054 (origin
14055 (method url-fetch)
14056 (uri (pypi-uri "ParamUnittest" version))
14057 (sha256
14058 (base32
14059 "0kp793hws5xv1wvycxq7jw2pwy36f35k39jg8hx5qikij5a0jid1"))))
14060 (build-system python-build-system)
14061 (home-page
14062 "https://github.com/rik0/ParamUnittest")
14063 (synopsis
14064 "Simple extension to have parametrized unit tests")
14065 (description
14066 "This package allows to create parametrized unit-tests that work with the standard
14067 unittest package. A parametrized test case is automatically converted to multiple test
14068 cases. Since they are TestCase subclasses, they work with other test suites that
14069 recognize TestCases.")
14070 (license license:bsd-2)))
14071
14072 (define-public python2-python-paramunittest
14073 (package-with-python2 python-paramunittest))
14074
14075 (define-public python-mando
14076 (package
14077 (name "python-mando")
14078 (version "0.5")
14079 (source
14080 (origin
14081 (method url-fetch)
14082 (uri (pypi-uri "mando" version))
14083 (sha256
14084 (base32
14085 "0q05h66439gqdmlk4jqm6xrwrzfdgs4mwk70barxhr2y83qbbdc0"))))
14086 (build-system python-build-system)
14087 (propagated-inputs
14088 `(("python-rst2ansi" ,python-rst2ansi)))
14089 (native-inputs
14090 `(("python-sphinx" ,python-sphinx-1.5.3)
14091 ("python-paramunittest" ,python-paramunittest)))
14092 (home-page "https://mando.readthedocs.org/")
14093 (synopsis
14094 "Wrapper around argparse, allowing creation of complete CLI applications")
14095 (description
14096 "This package is a wrapper around argparse, allowing you to write complete CLI
14097 applications in seconds while maintaining all the flexibility.")
14098 (license license:expat)))
14099
14100 (define-public python2-mando
14101 (package-with-python2 python-mando))
14102
14103 (define-public python-mando-0.3.1
14104 ;; python-radon (version 1.5.0) has a requirement
14105 ;; for mando<0.4,>=0.3
14106 (package
14107 (inherit python-mando)
14108 (name "python-mando")
14109 (version "0.3.1")
14110 (source
14111 (origin
14112 (method url-fetch)
14113 (uri (string-append "https://github.com/rubik/mando/archive/v"
14114 version
14115 ".tar.gz"))
14116 (sha256
14117 (base32
14118 "17jlkdpqw22z1nyml5ybslilqkzmnk0dxxjml8bfghav1l5hbwd2"))))))
14119
14120 (define-public python-fudge
14121 (package
14122 (name "python-fudge")
14123 ;; 0.9.6 is the latest version suitable for testing the "fabric" Python 2
14124 ;; package, which is currently the only use of this package.
14125 (version "0.9.6")
14126 (source
14127 (origin
14128 (method url-fetch)
14129 (uri (pypi-uri "fudge" version))
14130 (sha256
14131 (base32
14132 "185ia3vr3qk4f2s1a9hdxb8ci4qc0x0xidrad96pywg8j930qs9l"))))
14133 (build-system python-build-system)
14134 (arguments
14135 `(#:tests? #f)) ;XXX: Tests require the NoseJS Python package.
14136 (home-page "https://github.com/fudge-py/fudge")
14137 (synopsis "Replace real objects with fakes/mocks/stubs while testing")
14138 (description
14139 "Fudge is a Python module for using fake objects (mocks and stubs) to
14140 test real ones.
14141
14142 In readable Python code, you declare the methods available on your fake object
14143 and how they should be called. Then you inject that into your application and
14144 start testing. This declarative approach means you don’t have to record and
14145 playback actions and you don’t have to inspect your fakes after running code.
14146 If the fake object was used incorrectly then you’ll see an informative
14147 exception message with a traceback that points to the culprit.")
14148 (license license:expat)))
14149
14150 (define-public python2-fudge
14151 (package-with-python2 python-fudge))
14152
14153 (define-public python-oauth2client
14154 (package
14155 (name "python-oauth2client")
14156 (version "4.0.0")
14157 (source
14158 (origin
14159 (method url-fetch)
14160 (uri (pypi-uri "oauth2client" version))
14161 (sha256
14162 (base32
14163 "1irqqap2zibysf8dba8sklfqikia579srd0phm5n754ni0h59gl0"))))
14164 (build-system python-build-system)
14165 (arguments
14166 `(#:tests? #f))
14167 (propagated-inputs
14168 `(("python-httplib2" ,python-httplib2)
14169 ("python-pyasn1" ,python-pyasn1)
14170 ("python-pyasn1-modules" ,python-pyasn1-modules)
14171 ("python-rsa" ,python-rsa)
14172 ("python-six" ,python-six)))
14173 (home-page "http://github.com/google/oauth2client/")
14174 (synopsis "OAuth 2.0 client library")
14175 (description "@code{python-oauth2client} provides an OAuth 2.0 client
14176 library for Python")
14177 (license license:asl2.0)))
14178
14179 (define-public python-flask-oidc
14180 (package
14181 (name "python-flask-oidc")
14182 (version "1.1.1")
14183 (source
14184 (origin
14185 (method url-fetch)
14186 (uri (pypi-uri "flask-oidc" version))
14187 (sha256
14188 (base32
14189 "1ay5j0mf174bix7i67hclr95gv16z81fpx0dijvi0gydvdj3ddy2"))))
14190 (build-system python-build-system)
14191 (propagated-inputs
14192 `(("python-flask" ,python-flask)
14193 ("python-itsdangerous" ,python-itsdangerous)
14194 ("python-oauth2client" ,python-oauth2client)
14195 ("python-six" ,python-six)))
14196 (native-inputs
14197 `(("python-nose" ,python-nose)
14198 ("python-mock" ,python-mock)))
14199 (home-page "https://github.com/puiterwijk/flask-oidc")
14200 (synopsis "OpenID Connect extension for Flask")
14201 (description "@code{python-flask-oidc} provides an OpenID Connect extension
14202 for Flask.")
14203 (license license:bsd-2)))
14204
14205 (define-public python-mwclient
14206 (package
14207 (name "python-mwclient")
14208 (version "0.8.4")
14209 (source
14210 (origin
14211 (method url-fetch)
14212 ;; The PyPI version wouldn't contain tests.
14213 (uri (string-append "https://github.com/mwclient/mwclient/archive/"
14214 "v" version ".tar.gz"))
14215 (sha256
14216 (base32
14217 "1jj0yhilkjir00719fc7w133x7hdyhkxhk6xblla4asig45klsfv"))))
14218 (build-system python-build-system)
14219 (propagated-inputs
14220 `(("python-requests" ,python-requests)
14221 ("python-requests-oauthlib"
14222 ,python-requests-oauthlib)
14223 ("python-six" ,python-six)))
14224 (native-inputs
14225 `(("python-mock" ,python-mock)
14226 ("python-pytest" ,python-pytest)
14227 ("python-pytest-pep8" ,python-pytest-pep8)
14228 ("python-pytest-cache" ,python-pytest-cache)
14229 ("python-pytest-cov" ,python-pytest-cov)
14230 ("python-responses" ,python-responses)))
14231 (home-page "https://github.com/btongminh/mwclient")
14232 (synopsis "MediaWiki API client")
14233 (description "This package provides a MediaWiki API client.")
14234 (license license:expat)))
14235
14236 (define-public python2-mwclient
14237 (package-with-python2 python-mwclient))
14238
14239 (define-public python-pytest-warnings
14240 (package
14241 (name "python-pytest-warnings")
14242 (version "0.2.0")
14243 (source
14244 (origin
14245 (method url-fetch)
14246 (uri (pypi-uri "pytest-warnings" version))
14247 (sha256
14248 (base32
14249 "0gf2dpahpl5igb7jh1sr9acj3z3gp7zahqdqb69nk6wx01c8kc1g"))))
14250 (build-system python-build-system)
14251 (propagated-inputs
14252 `(("pytest" ,python-pytest-3.0)))
14253 (home-page "https://github.com/fschulze/pytest-warnings")
14254 (synopsis "Pytest plugin to list Python warnings in pytest report")
14255 (description
14256 "Python-pytest-warnings is a pytest plugin to list Python warnings in
14257 pytest report.")
14258 (license license:expat)))
14259
14260 (define-public python2-pytest-warnings
14261 (package-with-python2 python-pytest-warnings))
14262
14263 (define-public python-pytest-catchlog
14264 (package
14265 (name "python-pytest-catchlog")
14266 (version "1.2.2")
14267 (source
14268 (origin
14269 (method url-fetch)
14270 (uri (pypi-uri "pytest-catchlog" version ".zip"))
14271 (sha256
14272 (base32
14273 "1w7wxh27sbqwm4jgwrjr9c2gy384aca5jzw9c0wzhl0pmk2mvqab"))))
14274 (build-system python-build-system)
14275 (native-inputs
14276 `(("unzip" ,unzip)))
14277 (propagated-inputs
14278 `(("pytest" ,python-pytest-3.0)))
14279 (home-page "https://github.com/eisensheng/pytest-catchlog")
14280 (synopsis "Pytest plugin to catch log messages")
14281 (description
14282 "Python-pytest-catchlog is a pytest plugin to catch log messages. This is
14283 a fork of pytest-capturelog.")
14284 (license license:expat)))
14285
14286 (define-public python2-pytest-catchlog
14287 (package-with-python2 python-pytest-catchlog))
14288
14289 (define-public python-utils
14290 (package
14291 (name "python-utils")
14292 (version "2.1.0")
14293 (source (origin
14294 (method url-fetch)
14295 (uri (pypi-uri "python-utils" version))
14296 (sha256
14297 (base32
14298 "1mcsy6q5am4ya72rgkpb6kax6vv7c93cfkkas89xnpa4sj9zf28p"))))
14299 (build-system python-build-system)
14300 (native-inputs
14301 `(("pytest-runner" ,python-pytest-runner)
14302 ("pytest" ,python-pytest)
14303 ("six" ,python-six)))
14304 (home-page "https://github.com/WoLpH/python-utils")
14305 (synopsis "Convenient utilities not included with the standard Python install")
14306 (description
14307 "Python Utils is a collection of small Python functions and classes which
14308 make common patterns shorter and easier.")
14309 (license license:bsd-2)))
14310
14311 (define-public python2-utils
14312 (package-with-python2 python-utils))
14313
14314 (define-public python-webassets
14315 (package
14316 (name "python-webassets")
14317 (version "0.12.1")
14318 (source
14319 (origin
14320 (method url-fetch)
14321 (uri (pypi-uri "webassets" version))
14322 (sha256
14323 (base32
14324 "1nrqkpb7z46h2b77xafxihqv3322cwqv6293ngaky4j3ff4cing7"))))
14325 (build-system python-build-system)
14326 (native-inputs
14327 `(("python-jinja2" ,python-jinja2)
14328 ("python-mock" ,python-mock)
14329 ("python-nose" ,python-nose)
14330 ("python-pytest" ,python-pytest)))
14331 (home-page "https://github.com/miracle2k/webassets")
14332 (synopsis "Media asset management")
14333 (description "Merges, minifies and compresses Javascript and CSS files,
14334 supporting a variety of different filters, including YUI, jsmin, jspacker or
14335 CSS tidy. Also supports URL rewriting in CSS files.")
14336 (license license:bsd-2)))
14337
14338 (define-public python-sphinx-me
14339 (package
14340 (name "python-sphinx-me")
14341 (version "0.3")
14342 (source
14343 (origin
14344 (method url-fetch)
14345 (uri (pypi-uri "sphinx-me" version))
14346 (sha256
14347 (base32
14348 "06jzgp213zihnvpcy2y5jy3ykid3apc2ncp2pg6a2g05lhiziglq"))))
14349 (build-system python-build-system)
14350 (home-page "https://github.com/stephenmcd/sphinx-me")
14351 (synopsis "Create a Sphinx documentation shell")
14352 (description
14353 "Create a Sphinx documentation shell for your project and include the
14354 README file as the documentation index. It handles extracting the required
14355 meta data such as the project name, author and version from your project for
14356 use in your Sphinx docs.")
14357 (license license:bsd-2)))
14358
14359 (define-public python2-sphinx-me
14360 (package-with-python2 python-sphinx-me))
14361
14362 (define-public python-cssmin
14363 (package
14364 (name "python-cssmin")
14365 (version "0.2.0")
14366 (source
14367 (origin
14368 (method url-fetch)
14369 (uri (pypi-uri "cssmin" version))
14370 (sha256
14371 (base32
14372 "1dk723nfm2yf8cp4pj785giqlwv42l0kj8rk40kczvq1hk6g04p0"))))
14373 (build-system python-build-system)
14374 (home-page "https://github.com/zacharyvoase/cssmin")
14375 (synopsis "Python port of the YUI CSS Compressor")
14376 (description "Python port of the YUI CSS Compressor.")
14377 (license (list license:expat license:bsd-3))))
14378
14379 (define-public python2-cssmin
14380 (package-with-python2 python-cssmin))
14381
14382 (define-public python-diff-match-patch
14383 (package
14384 (name "python-diff-match-patch")
14385 (version "20121119")
14386 (source
14387 (origin
14388 (method url-fetch)
14389 (uri (pypi-uri "diff-match-patch" version))
14390 (sha256
14391 (base32
14392 "0k1f3v8nbidcmmrk65m7h8v41jqi37653za9fcs96y7jzc8mdflx"))))
14393 (build-system python-build-system)
14394 (home-page "https://code.google.com/p/google-diff-match-patch")
14395 (synopsis "Synchronize plain text")
14396 (description "Diff Match and Patch libraries offer robust algorithms to
14397 perform the operations required for synchronizing plain text.")
14398 (license license:asl2.0)))
14399
14400 (define-public python2-diff-match-patch
14401 (package-with-python2 python-diff-match-patch))
14402
14403 (define-public python-dirsync
14404 (package
14405 (name "python-dirsync")
14406 (version "2.2.2")
14407 (source
14408 (origin
14409 (method url-fetch)
14410 (uri (pypi-uri "dirsync" version ".zip"))
14411 (sha256
14412 (base32
14413 "1hcdvmkwd5512zbxpin0k7bx5bkgzy3swjx7d0kj1y45af6r75v2"))))
14414 (build-system python-build-system)
14415 (native-inputs
14416 `(("unzip" ,unzip)))
14417 (propagated-inputs
14418 `(("six" ,python-six)))
14419 (home-page "https://bitbucket.org/tkhyn/dirsync")
14420 (synopsis "Advanced directory tree synchronisation tool")
14421 (description "Advanced directory tree synchronisation tool.")
14422 (license license:expat)))
14423
14424 (define-public python2-dirsync
14425 (package-with-python2 python-dirsync))
14426
14427 (define-public python-nosexcover
14428 (package
14429 (name "python-nosexcover")
14430 (version "1.0.11")
14431 (source (origin
14432 (method url-fetch)
14433 (uri (pypi-uri "nosexcover" version))
14434 (sha256
14435 (base32
14436 "10xqr12qv62k2flxwqhh8cr00cjhn7sfjrm6p35gd1x5bmjkr319"))))
14437 (build-system python-build-system)
14438 (propagated-inputs
14439 `(("python-coverage" ,python-coverage)
14440 ("python-nose" ,python-nose)))
14441 (home-page "http://github.com/cmheisel/nose-xcover")
14442 (synopsis "Extends nose.plugins.cover to add Cobertura-style XML reports")
14443 (description "Nose-xcover is a companion to the built-in
14444 @code{nose.plugins.cover}. This plugin will write out an XML coverage report
14445 to a file named coverage.xml.
14446
14447 It will honor all the options you pass to the Nose coverage plugin,
14448 especially -cover-package.")
14449 (license license:expat)))
14450
14451 (define-public python2-nosexcover
14452 (package-with-python2 python-nosexcover))
14453
14454 (define-public python-elasticsearch
14455 (package
14456 (name "python-elasticsearch")
14457 (version "1.0.0")
14458 (source
14459 (origin
14460 (method url-fetch)
14461 (uri (pypi-uri "elasticsearch" version))
14462 (sha256
14463 (base32
14464 "1sdw1r05cw7ihnmng8ra9v968fj7bq6sji8i1dikymsnkcpgc69g"))))
14465 (build-system python-build-system)
14466 (native-inputs
14467 `(("python-mock" ,python-mock)
14468 ("python-nosexcover" ,python-nosexcover)
14469 ("python-pyaml" ,python-pyaml)
14470 ("python-requests" ,python-requests)))
14471 (propagated-inputs
14472 `(("urllib3" ,python-urllib3)))
14473 (arguments
14474 ;; tests require the test_elasticsearch module but it is not distributed.
14475 `(#:tests? #f))
14476 (home-page "https://github.com/elastic/elasticsearch-py")
14477 (synopsis "Low-level client for Elasticsearch")
14478 (description "Official low-level client for Elasticsearch. Its goal is to
14479 provide common ground for all Elasticsearch-related code in Python; because of
14480 this it tries to be opinion-free and very extendable.")
14481 (license license:expat)))
14482
14483 (define-public python2-elasticsearch
14484 (package-with-python2 python-elasticsearch))
14485
14486 (define-public python-levenshtein
14487 (package
14488 (name "python-levenshtein")
14489 (version "0.12.0")
14490 (source
14491 (origin
14492 (method url-fetch)
14493 (uri (pypi-uri "python-Levenshtein" version))
14494 (sha256
14495 (base32
14496 "1c9ybqcja31nghfcc8xxbbz9h60s9qi12b9hr4jyl69xbvg12fh3"))))
14497 (build-system python-build-system)
14498 (home-page "https://github.com/ztane/python-Levenshtein")
14499 (synopsis "Fast computation of Levenshtein distance and string similarity")
14500 (description
14501 "The Levenshtein Python C extension module contains functions for fast computation of
14502 @enumerate
14503 @item Levenshtein (edit) distance, and edit operations
14504 @item string similarity
14505 @item approximate median strings, and generally string averaging
14506 @item string sequence and set similarity
14507 @end enumerate
14508 It supports both normal and Unicode strings.")
14509 (license license:gpl2+)))
14510
14511 (define-public python2-levenshtein
14512 (package-with-python2 python-levenshtein))
14513
14514 (define-public python-scandir
14515 (package
14516 (name "python-scandir")
14517 (version "1.4")
14518 (source
14519 (origin
14520 (method url-fetch)
14521 (uri (pypi-uri "scandir" version))
14522 (sha256
14523 (base32 "0yjrgp0mxp3d8bjkq2m1ac2ys8n76wykksvgyjrnil9gr3fx7a5d"))))
14524 (build-system python-build-system)
14525 (home-page "https://github.com/benhoyt/scandir")
14526 (synopsis "Directory iteration function")
14527 (description
14528 "Directory iteration function like os.listdir(), except that instead of
14529 returning a list of bare filenames, it yields DirEntry objects that include
14530 file type and stat information along with the name. Using scandir() increases
14531 the speed of os.walk() by 2-20 times (depending on the platform and file
14532 system) by avoiding unnecessary calls to os.stat() in most cases.")
14533 (license license:bsd-3)))
14534
14535 (define-public python2-scandir
14536 (package-with-python2 python-scandir))
14537
14538 (define-public python2-stemming
14539 (package
14540 (name "python2-stemming")
14541 (version "1.0.1")
14542 (source
14543 (origin
14544 (method url-fetch)
14545 (uri (pypi-uri "stemming" version))
14546 (sha256
14547 (base32 "0ldwa24gnnxhniv0fhygkpc2mwgd93q10ag8rvzayv6hw418frsr"))))
14548 (build-system python-build-system)
14549 (arguments
14550 `(#:python ,python-2))
14551 (home-page "https://bitbucket.org/mchaput/stemming/overview")
14552 (synopsis "Python implementations of various stemming algorithms")
14553 (description
14554 "Python implementations of the Porter, Porter2, Paice-Husk, and Lovins
14555 stemming algorithms for English. These implementations are straightforward and
14556 efficient, unlike some Python versions of the same algorithms available on the
14557 Web. This package is an extraction of the stemming code included in the Whoosh
14558 search engine.")
14559 (license license:public-domain)))
14560
14561 (define-public python-factory-boy
14562 (package
14563 (name "python-factory-boy")
14564 (version "2.8.1")
14565 (source
14566 (origin
14567 (method url-fetch)
14568 (uri (pypi-uri "factory_boy" version))
14569 (sha256
14570 (base32 "1fvin6san5xsjh2c4y18caj2lnmwxlylyqm8mh1yc6rp38wlwr56"))))
14571 (build-system python-build-system)
14572 (arguments
14573 ;; Tests are not included in the tarball.
14574 `(#:tests? #f))
14575 (propagated-inputs
14576 `(("faker" ,python-faker)))
14577 (home-page "https://github.com/benhoyt/scandir")
14578 (synopsis "Versatile test fixtures replacement")
14579 (description
14580 "Factory_boy is a fixtures replacement based on thoughtbot’s factory_girl.
14581
14582 As a fixtures replacement tool, it aims to replace static, hard to maintain
14583 fixtures with easy-to-use factories for complex object.
14584
14585 Instead of building an exhaustive test setup with every possible combination
14586 of corner cases, factory_boy allows you to use objects customized for the
14587 current test, while only declaring the test-specific fields")
14588 (license license:expat)))
14589
14590 (define-public python2-factory-boy
14591 (package-with-python2 python-factory-boy))
14592
14593 (define-public python-translate-toolkit
14594 (package
14595 (name "python-translate-toolkit")
14596 (version "2.1.0")
14597 (source
14598 (origin
14599 (method url-fetch)
14600 (uri (pypi-uri "translate-toolkit" version ".tar.bz2"))
14601 (sha256
14602 (base32 "1vlkwrg83vb17jc36pmwh2b7jphwf390lz0jw8hakcg16qhwypvq"))))
14603 (build-system python-build-system)
14604 (native-inputs
14605 `(("python-pytest" ,python-pytest)
14606 ("python-sphinx" ,python-sphinx)))
14607 (propagated-inputs
14608 `(("python-babel" ,python-babel)
14609 ("python-beautifulsoup4" ,python-beautifulsoup4)
14610 ("python-chardet" ,python-chardet)
14611 ("python-diff-match-patch" ,python-diff-match-patch)
14612 ("python-levenshtein" ,python-levenshtein)
14613 ("python-lxml" ,python-lxml)
14614 ("python-six" ,python-six)
14615 ("python-vobject" ,python-vobject)
14616 ("python-pyyaml" ,python-pyyaml)))
14617 (arguments
14618 ;; TODO: tests are not run, because they end with
14619 ;; TypeError: parse() missing 2 required positional arguments: 'tree' and
14620 ;; 'parse_funcs'
14621 ;; during test setup.
14622 `(#:tests? #f))
14623 (home-page "http://toolkit.translatehouse.org")
14624 (synopsis "Tools and API for translation and localization engineering")
14625 (description
14626 "Tools and API for translation and localization engineering. It contains
14627 several utilities, as well as an API for building localization tools.")
14628 (license license:gpl2+)))
14629
14630 (define-public python2-translate-toolkit
14631 (package-with-python2 python-translate-toolkit))
14632
14633 (define-public python-mysqlclient
14634 (package
14635 (name "python-mysqlclient")
14636 (version "1.3.10")
14637 (source
14638 (origin
14639 (method url-fetch)
14640 (uri (pypi-uri "mysqlclient" version))
14641 (sha256
14642 (base32
14643 "0qkj570x4rbsblji6frvsvp2v1ap32dqzj1lq62zp9515ffsyaj5"))))
14644 (build-system python-build-system)
14645 (native-inputs
14646 `(("mariadb" ,mariadb)
14647 ("nose" ,python-nose)
14648 ("mock" ,python-mock)
14649 ("py.test" ,python-pytest)))
14650 (inputs
14651 `(("mysql" ,mysql)
14652 ("libz" ,zlib)
14653 ("openssl" ,openssl)))
14654 (home-page "https://github.com/PyMySQL/mysqlclient-python")
14655 (synopsis "MySQLdb is an interface to the popular MySQL database server for Python")
14656 (description "MySQLdb is an interface to the popular MySQL database server
14657 for Python. The design goals are:
14658 @enumerate
14659 @item Compliance with Python database API version 2.0 [PEP-0249],
14660 @item Thread-safety,
14661 @item Thread-friendliness (threads will not block each other).
14662 @end enumerate")
14663 (license license:gpl2)))
14664
14665 (define-public python2-mysqlclient
14666 (package-with-python2 python-mysqlclient))
14667
14668 (define-public python-hiredis
14669 (package
14670 (name "python-hiredis")
14671 (version "0.2.0")
14672 (source
14673 (origin
14674 (method url-fetch)
14675 (uri (pypi-uri "hiredis" version))
14676 (sha256
14677 (base32
14678 "1dfm2k9l9zar9nw9fwmm74zrgraxdxs04vx9li56fjcf289qx5fa"))))
14679 (build-system python-build-system)
14680 (arguments
14681 ;; no tests
14682 `(#:tests? #f))
14683 (home-page "https://github.com/redis/hiredis-py")
14684 (synopsis "Python extension that wraps protocol parsing code in hiredis")
14685 (description "Python-hiredis is a python extension that wraps protocol
14686 parsing code in hiredis. It primarily speeds up parsing of multi bulk replies.")
14687 (license license:bsd-3)))
14688
14689 (define-public python2-hiredis
14690 (package-with-python2 python-hiredis))
14691
14692 (define-public python-fakeredis
14693 (package
14694 (name "python-fakeredis")
14695 (version "0.8.2")
14696 (source
14697 (origin
14698 (method url-fetch)
14699 (uri (pypi-uri "fakeredis" version))
14700 (sha256
14701 (base32
14702 "0zncahj3byyasyfx9i7k991ph0n0lq8v3a21pqri5qxn9564bk9r"))))
14703 (build-system python-build-system)
14704 (arguments
14705 ;; no tests
14706 `(#:tests? #f))
14707 (home-page "https://github.com/jamesls/fakeredis")
14708 (synopsis "Fake implementation of redis API for testing purposes")
14709 (description "Fakeredis is a pure python implementation of the redis-py
14710 python client that simulates talking to a redis server. This was created for a
14711 single purpose: to write unittests. Setting up redis is not hard, but many time
14712 you want to write unittests that do not talk to an external server (such as
14713 redis). This module now allows tests to simply use this module as a reasonable
14714 substitute for redis.")
14715 (license license:bsd-3)))
14716
14717 (define-public python2-fakeredis
14718 (package-with-python2 python-fakeredis))
14719
14720 (define-public python-behave-web-api
14721 (package
14722 (name "python-behave-web-api")
14723 (version "1.0.6")
14724 (source
14725 (origin
14726 (method url-fetch)
14727 (uri (pypi-uri "behave-web-api" version))
14728 (sha256
14729 (base32
14730 "03kpq2xsy1gab3jy0dccbxlsg7vwfy4lagss0qldwmx3xz6b3i19"))))
14731 (build-system python-build-system)
14732 (arguments
14733 `(#:phases
14734 (modify-phases %standard-phases
14735 (add-after 'unpack 'fix-dependencies
14736 (lambda _
14737 (substitute* "setup.py"
14738 (("'wheel'") "") ; We don't use it.
14739 (("'ordereddict==1.1'") ""))))))) ; Python >= 2.7 has it built-in.
14740 (propagated-inputs
14741 `(("behave" ,behave)
14742 ("python-requests" ,python-requests)))
14743 (home-page "https://github.com/jefersondaniel/behave-web-api")
14744 (synopsis "Provides testing for JSON APIs with Behave for Python")
14745 (description "This package provides testing utility modules for testing
14746 JSON APIs with Behave.")
14747 (license license:expat)))
14748
14749 (define-public python2-behave-web-api
14750 (package-with-python2 python-behave-web-api))
14751
14752 (define-public python-flask-script
14753 (package
14754 (name "python-flask-script")
14755 (version "2.0.5")
14756 (source
14757 (origin
14758 (method url-fetch)
14759 (uri (pypi-uri "Flask-Script" version))
14760 (sha256
14761 (base32
14762 "0zqh2yq8zk7m9b4xw1ryqmrljkdigfb3hk5155a3b5hkfnn6xxyf"))))
14763 (build-system python-build-system)
14764 (propagated-inputs
14765 `(("python-flask" ,python-flask)
14766 ("python-argcomplete" ,python-argcomplete)
14767 ("python-werkzeug" ,python-werkzeug)))
14768 (native-inputs
14769 `(("python-pytest" ,python-pytest)))
14770 (home-page
14771 "http://github.com/smurfix/flask-script")
14772 (synopsis "Scripting support for Flask")
14773 (description "The Flask-Script extension provides support for writing
14774 external scripts in Flask. This includes running a development server,
14775 a customised Python shell, scripts to set up your database, cronjobs,
14776 and other command-line tasks that belong outside the web application
14777 itself.")
14778 (license license:bsd-3)))
14779
14780 (define-public python2-flask-script
14781 (package-with-python2 python-flask-script))
14782
14783 (define-public python-flask-migrate
14784 (package
14785 (name "python-flask-migrate")
14786 (version "2.0.3")
14787 (source
14788 (origin
14789 (method url-fetch)
14790 (uri (pypi-uri "Flask-Migrate" version))
14791 (sha256
14792 (base32
14793 "107x78lkqsnbg92dld3dkagg07jvchp3ib3y0sivc4ipz6n1y7rk"))))
14794 (build-system python-build-system)
14795 (propagated-inputs
14796 `(("python-flask" ,python-flask)
14797 ("python-alembic" ,python-alembic)
14798 ("python-sqlalchemy" ,python-sqlalchemy)
14799 ("python-flask-script" ,python-flask-script)
14800 ("python-flask-sqlalchemy" ,python-flask-sqlalchemy)))
14801 (home-page "http://github.com/miguelgrinberg/flask-migrate/")
14802 (synopsis "SQLAlchemy database migrations for Flask programs using
14803 Alembic")
14804 (description "This package contains SQLAlchemy database migration tools
14805 for Flask programs that are using @code{python-alembic}.")
14806 (license license:expat)))
14807
14808 (define-public python2-flask-migrate
14809 (package-with-python2 python-flask-migrate))
14810
14811 (define-public python-packaging
14812 (package
14813 (name "python-packaging")
14814 (version "16.8")
14815 (source
14816 (origin
14817 (method url-fetch)
14818 (uri (pypi-uri "packaging" version))
14819 (sha256
14820 (base32
14821 "17k1xbjshackwvbsnxqixbph8rbqhz4bf4g3al5xyzhavxgq6l2x"))))
14822 (build-system python-build-system)
14823 (native-inputs
14824 `(("python-pretend" ,python-pretend)
14825 ("python-pytest" ,python-pytest)))
14826 (propagated-inputs
14827 `(("python-pyparsing" ,python-pyparsing)
14828 ("python-six" ,python-six)))
14829 (home-page "https://github.com/pypa/packaging")
14830 (synopsis "Core utilities for Python packages")
14831 (description "Packaging is a Python module for dealing with Python packages.
14832 It offers an interface for working with package versions, names, and dependency
14833 information.")
14834 ;; From 'LICENSE': This software is made available under the terms of
14835 ;; *either* of the licenses found in LICENSE.APACHE or LICENSE.BSD.
14836 ;; Contributions to this software is made under the terms of *both* these
14837 ;; licenses.
14838 (license (list license:asl2.0 license:bsd-2))))
14839
14840 (define-public python2-packaging
14841 (package-with-python2 python-packaging))
14842
14843 (define-public python-sql
14844 (package
14845 (name "python-sql")
14846 (version "0.9")
14847 (source
14848 (origin
14849 (method url-fetch)
14850 (uri (pypi-uri "python-sql" version))
14851 (sha256
14852 (base32
14853 "0p6kaqj02vz0habmdx37zjk6hjxdfm8aw737zs059vvpr70ird87"))))
14854 (build-system python-build-system)
14855 (home-page "https://python-sql.tryton.org/")
14856 (synopsis "Library to write SQL queries in a pythonic way")
14857 (description "@code{python-sql} is a library to write SQL queries, that
14858 transforms idiomatic python function calls to well-formed SQL queries.")
14859 (license license:bsd-3)))
14860
14861 (define-public python2-sql
14862 (package-with-python2 python-sql))
14863
14864 (define-public python-genshi
14865 (package
14866 (name "python-genshi")
14867 (version "0.7")
14868 (source
14869 (origin
14870 (method url-fetch)
14871 (uri (string-append
14872 "https://ftp.edgewall.org/pub/genshi/Genshi-"
14873 version ".tar.gz"))
14874 (patches
14875 (search-patches
14876 ;; The first 4 patches are in the master branch upstream.
14877 ;; See this as a reference https://genshi.edgewall.org/ticket/582
14878 ;; The last 2 are NOT in any branch.
14879 ;; They were sent as attachments to a ticket opened at
14880 ;; https://genshi.edgewall.org/ticket/602#no1
14881 "python-genshi-stripping-of-unsafe-script-tags.patch"
14882 "python-genshi-disable-speedups-on-python-3.3.patch"
14883 "python-genshi-isstring-helper.patch"
14884 "python-genshi-add-support-for-python-3.4-AST.patch"
14885 "python-genshi-fix-tests-on-python-3.5.patch"
14886 "python-genshi-buildable-on-python-2.7.patch"))
14887 (sha256
14888 (base32
14889 "0lkkbp6fbwzv0zda5iqc21rr7rdldkwh3hfabfjl9i4bwq14858x"))))
14890 (build-system python-build-system)
14891 (home-page "https://genshi.edgewall.org/")
14892 (synopsis "Toolkit for generation of output for the web")
14893 (description "Genshi is a Python library that provides an integrated set
14894 of components for parsing, generating, and processing HTML, XML or other
14895 textual content for output generation on the web.")
14896 (license license:bsd-3)))
14897
14898 ;; The linter here claims that patch file names should start with the package
14899 ;; name. But, in this case the patches are inherited from python-genshi with
14900 ;; the "python-genshi-" prefix instead of "python2-genshi-".
14901 (define-public python2-genshi
14902 (package-with-python2 python-genshi))
14903
14904 (define-public python-relatorio
14905 (package
14906 (name "python-relatorio")
14907 (version "0.6.4")
14908 (source
14909 (origin
14910 (method url-fetch)
14911 (uri (pypi-uri "relatorio" version))
14912 (sha256
14913 (base32
14914 "0lincq79mzgazwd9gh41dybjh9c3n87r83pl8nk3j79aihyfk84z"))))
14915 (build-system python-build-system)
14916 (propagated-inputs
14917 `(("python-lxml" ,python-lxml)
14918 ("python-genshi" ,python-genshi)))
14919 (home-page "https://relatorio.tryton.org/")
14920 (synopsis "Templating library able to output ODT and PDF files")
14921 (description "Relatorio is a templating library which provides a way to
14922 easily output ODT, ODS, PNG, SVG and several other kinds of files. Support
14923 for more filetypes can be easily added by creating plugins for them.")
14924 (license license:gpl3+)))
14925
14926 (define-public python2-relatorio
14927 (package-with-python2 python-relatorio))
14928
14929 (define-public python-radon
14930 (package
14931 (name "python-radon")
14932 (version "1.5.0")
14933 (source
14934 (origin
14935 (method url-fetch)
14936 (uri (pypi-uri "radon" version))
14937 (sha256
14938 (base32
14939 "1h6jv36am0i827182a04ki6291lyx4kp957xfr5njgprj4nd0qsl"))))
14940 (build-system python-build-system)
14941 (propagated-inputs
14942 `(("python-colorama" ,python-colorama)
14943 ("python-flake8-polyfill" ,python-flake8-polyfill)
14944 ("python-mando" ,python-mando-0.3.1)))
14945 (native-inputs
14946 `(("python-flake8" ,python-flake8)
14947 ("python-tox" ,python-tox)
14948 ("python-pytest" ,python-pytest)
14949 ("python-paramunittest" ,python-paramunittest)))
14950 (home-page "https://radon.readthedocs.org/")
14951 (synopsis "Code Metrics in Python")
14952 (description "Radon is a Python tool which computes various code metrics.
14953 Supported metrics are:
14954 @itemize @bullet
14955 @item raw metrics: SLOC, comment lines, blank lines, &c.
14956 @item Cyclomatic Complexity (i.e. McCabe’s Complexity)
14957 @item Halstead metrics (all of them)
14958 @item the Maintainability Index (a Visual Studio metric)
14959 @end itemize")
14960 (license license:expat)))
14961
14962 (define-public python2-radon
14963 (package-with-python2 python-radon))
14964
14965 (define-public python-sure
14966 (package
14967 (name "python-sure")
14968 (version "1.4.6")
14969 (source
14970 (origin
14971 (method url-fetch)
14972 (uri (pypi-uri "sure" version))
14973 (sha256
14974 (base32
14975 "1iyqsy2d6radi88g1qf0lziy5b39h5cpb3g5jiqyb4xi46ig3x1z"))))
14976 (build-system python-build-system)
14977 (propagated-inputs
14978 `(("python-mock" ,python-mock)
14979 ("python-six" ,python-six)))
14980 (native-inputs
14981 `(("python-nose" ,python-nose)))
14982 (home-page "https://github.com/gabrielfalcao/sure")
14983 (synopsis "Automated testing library in python for python")
14984 (description
14985 "Sure is a python library that leverages a DSL for writing assertions.
14986 Sure is heavily inspired by @code{RSpec Expectations} and @code{should.js}.")
14987 (license license:gpl3+)))
14988
14989 (define-public python2-sure
14990 (package-with-python2 python-sure))
14991
14992 (define-public python2-couleur
14993 ;; This package does not seem to support python3 at all, hence,
14994 ;; only the python2 variant definition is provided.
14995 (package
14996 (name "python2-couleur")
14997 (version "0.6.2")
14998 (source
14999 (origin
15000 (method url-fetch)
15001 (uri (pypi-uri "couleur" version))
15002 (sha256
15003 (base32
15004 "1qqaxyqz74wvid0cr119dhcwz0h0if5b5by44zl49pd5z65v58k1"))))
15005 (build-system python-build-system)
15006 (arguments
15007 `(#:python ,python-2))
15008 (home-page "https://github.com/gabrielfalcao/couleur")
15009 (synopsis
15010 "ANSI terminal tool for python, colored shell and other handy fancy features")
15011 (description
15012 "@code{Couleur} provides python programs a way to use the ANSI features in a unix
15013 terminal such as coloured output in the shell, overwriting output, indentation, etc.")
15014 ;; README.md says ASL2.0, but all source code headers are LGPL3+.
15015 ;; https://github.com/gabrielfalcao/couleur/issues/11
15016 (license license:lgpl3+)))
15017
15018 (define-public python-misaka
15019 (package
15020 (name "python-misaka")
15021 (version "2.1.0")
15022 (source
15023 (origin
15024 (method url-fetch)
15025 (uri (pypi-uri "misaka" version))
15026 (sha256
15027 (base32
15028 "1yqrq3a5rracirmvk52n28nn6ckdaz897gnigv89a9gmyn87sqw7"))))
15029 (build-system python-build-system)
15030 (arguments
15031 `(;; Line 37 of setup.py calls self.run_command('develop')
15032 ;; in the 'check' phase. This command seems to be trying
15033 ;; to write to
15034 ;; /gnu/store/...-python-<version>/lib/python<version>/site-packages/
15035 ;; for which it does not have the permission to write.
15036 #:tests? #f))
15037 (propagated-inputs
15038 `(("python-cffi" ,python-cffi)))
15039 (home-page "https://github.com/FSX/misaka")
15040 (synopsis "Python binding for Hoedown")
15041 (description
15042 "@code{Misaka} is a CFFI-based binding for @code{Hoedown}, a fast markdown processing
15043 library written in C. It features a fast HTML renderer and functionality to make custom
15044 renderers (e.g. man pages or LaTeX).")
15045 (license license:expat)))
15046
15047 (define-public python2-misaka
15048 (package-with-python2 python-misaka))
15049
15050 (define-public python2-steadymark
15051 ;; This is forced into being a python2 only variant
15052 ;; due to its dependence on couleur that has no support
15053 ;; for python3
15054 (package
15055 (name "python2-steadymark")
15056 (version "0.7.3")
15057 (source
15058 (origin
15059 (method url-fetch)
15060 (uri (pypi-uri "steadymark" version))
15061 (sha256
15062 (base32
15063 "1640i9g8dycql3cc8j0bky0jkzj0q39blfbp4lsgpkprkfgcdk8v"))))
15064 (build-system python-build-system)
15065 (native-inputs
15066 `(("python-couleur" ,python2-couleur)
15067 ("python-sure" ,python2-sure)
15068 ("python-misaka" ,python2-misaka)))
15069 (arguments
15070 `(#:python ,python-2
15071 #:phases
15072 (modify-phases %standard-phases
15073 (add-before 'build 'patch-setup-py
15074 (lambda _
15075 ;; Update requirements from dependency==version
15076 ;; to dependency>=version
15077 (substitute* "setup.py"
15078 (("==") ">="))
15079 #t)))))
15080 (home-page "https://github.com/gabrielfalcao/steadymark")
15081 (synopsis "Markdown-based test runner for python")
15082 (description
15083 "@code{Steadymark} allows documentation to be written in github-flavoured
15084 markdown. The documentation may contain snippets of code surrounded by python
15085 code blocks and @code{Steadymark} will find these snippets and run them, making
15086 sure that there are no old malfunctional examples in the documentation examples.")
15087 (license license:expat)))
15088
15089 (define-public python-nose-randomly
15090 (package
15091 (name "python-nose-randomly")
15092 (version "1.2.5")
15093 (source
15094 (origin
15095 (method url-fetch)
15096 (uri (pypi-uri "nose-randomly" version))
15097 (sha256
15098 (base32
15099 "1cw9dlr1zh3w4i438kin7z0rm8092ki52hayisyc43h9pcplq7rn"))))
15100 (build-system python-build-system)
15101 (native-inputs
15102 `(("python-nose" ,python-nose)
15103 ("python-numpy" ,python-numpy)))
15104 (home-page "https://github.com/adamchainz/nose-randomly")
15105 (synopsis
15106 "Nose plugin to randomly order tests and control random.seed")
15107 (description
15108 "This is a @code{Nose} plugin to randomly order tests which can be quite
15109 powerful in discovering hidden flaws in the tests themselves, while helping to
15110 reduce inter-test dependencies. It also helps in controlling @code{random.seed},
15111 by resetting it to a repeatable number for each test, enabling the tests to
15112 create data based on random numbers and yet remain repeatable.")
15113 (license license:bsd-3)))
15114
15115 (define-public python2-nose-randomly
15116 (package-with-python2 python-nose-randomly))
15117
15118 (define-public python-jsonpointer
15119 (package
15120 (name "python-jsonpointer")
15121 (version "1.10")
15122 (source
15123 (origin
15124 (method url-fetch)
15125 (uri (pypi-uri "jsonpointer" version))
15126 (sha256
15127 (base32
15128 "1cg0gvgqjysydv6p45v4jywg1jb3v48c7m3cbpi57zgf6nndr9cz"))))
15129 (build-system python-build-system)
15130 (home-page "https://github.com/stefankoegl/python-json-pointer")
15131 (synopsis "Identify specific nodes in a JSON document")
15132 (description "@code{jsonpointer} allows you to access specific nodes
15133 by path in a JSON document (see RFC 6901).")
15134 (license license:bsd-3)))
15135
15136 (define-public python2-jsonpointer
15137 (package-with-python2 python-jsonpointer))
15138
15139 (define-public python-rfc3987
15140 (package
15141 (name "python-rfc3987")
15142 (version "1.3.7")
15143 (source
15144 (origin
15145 (method url-fetch)
15146 (uri (pypi-uri "rfc3987" version))
15147 (sha256
15148 (base32
15149 "192pclzs2y0yaywqkrlvd0x73740q310kvqvm6jldhi619mq59wi"))))
15150 (build-system python-build-system)
15151 (home-page "http://pypi.python.org/pypi/rfc3987")
15152 (synopsis "Parsing and validation of URIs (RFC 3986) and IRIs (RFC 3987)")
15153 (description "@code{rfc3987} provides routines for parsing and
15154 validation of URIs (see RFC 3986) and IRIs (see RFC 3987).")
15155 (license license:gpl3+)))
15156
15157 (define-public python2-rfc3987
15158 (package-with-python2 python-rfc3987))
15159
15160 (define-public python-validate-email
15161 (package
15162 (name "python-validate-email")
15163 (version "1.3")
15164 (source
15165 (origin
15166 (method url-fetch)
15167 (uri (pypi-uri "validate_email" version))
15168 (sha256
15169 (base32
15170 "1bxffaf5yz2cph8ki55vdvdypbwkvn2xr1firlcy62vqbzf1jivq"))))
15171 (build-system python-build-system)
15172 (home-page "http://github.com/syrusakbary/validate_email")
15173 (synopsis "Verifies if an email address is valid and really exists")
15174 (description "@code{validate_email} can be used to verify if an email
15175 address is valid and really exists.")
15176 (license license:lgpl3+)))
15177
15178 (define-public python2-validate-email
15179 (package-with-python2 python-validate-email))
15180
15181 (define-public python-flex
15182 (package
15183 (name "python-flex")
15184 (version "6.10.0")
15185 (source
15186 (origin
15187 (method url-fetch)
15188 (uri (pypi-uri "flex" version))
15189 (sha256
15190 (base32
15191 "00pamnwla3khk8nyla7y28dq9jnh69swd7f4jfsl7sn1izs8n8zk"))))
15192 (build-system python-build-system)
15193 (propagated-inputs
15194 `(("python-click" ,python-click)
15195 ("python-iso8601" ,python-iso8601)
15196 ("python-jsonpointer" ,python-jsonpointer)
15197 ("python-pyyaml" ,python-pyyaml)
15198 ("python-requests" ,python-requests)
15199 ("python-rfc3987" ,python-rfc3987)
15200 ("python-six" ,python-six)
15201 ("python-validate-email" ,python-validate-email)))
15202 (home-page "https://github.com/pipermerriam/flex")
15203 (synopsis "Validates Swagger schemata")
15204 (description "@code{flex} can be used to validate Swagger schemata.")
15205 (license license:bsd-3)))
15206
15207 (define-public python2-flex
15208 (package-with-python2 python-flex))
15209
15210 (define-public python-marshmallow
15211 (package
15212 (name "python-marshmallow")
15213 (version "3.0.0b2")
15214 (source
15215 (origin
15216 (method url-fetch)
15217 (uri (pypi-uri "marshmallow" version))
15218 (sha256
15219 (base32
15220 "11bnpvfdbczr74177p295zbkdrax2cahvbj5bqhhlprgz2xxi5d9"))))
15221 (build-system python-build-system)
15222 (propagated-inputs
15223 `(("python-dateutil" ,python-dateutil)
15224 ("python-simplejson" ,python-simplejson)))
15225 (native-inputs
15226 `(("python-pytest-3.0" ,python-pytest-3.0)
15227 ("python-pytz" ,python-pytz)))
15228 (home-page "https://github.com/marshmallow-code/marshmallow")
15229 (synopsis "Convert complex datatypes to and from native
15230 Python datatypes.")
15231 (description "@code{marshmallow} provides a library for converting
15232 complex datatypes to and from native Python datatypes.")
15233 (license license:expat)))
15234
15235 (define-public python2-marshmallow
15236 (package-with-python2 python-marshmallow))
15237
15238 (define-public python-bottle
15239 (package
15240 (name "python-bottle")
15241 (version "0.12.13")
15242 (source
15243 (origin
15244 (method url-fetch)
15245 (uri (pypi-uri "bottle" version))
15246 (sha256
15247 (base32
15248 "0m9k2a7yxvggc4kw8fsvj381vgsvfcdshg5nzy6vwrxiw2p53drr"))))
15249 (build-system python-build-system)
15250 (home-page "http://bottlepy.org/")
15251 (synopsis "WSGI framework for small web-applications.")
15252 (description "@code{python-bottle} is a WSGI framework for small web-applications.")
15253 (license license:expat)))
15254
15255 (define-public python2-bottle
15256 (package-with-python2 python-bottle))
15257
15258 (define-public python-apispec
15259 (package
15260 (name "python-apispec")
15261 (version "0.22.0")
15262 (source
15263 (origin
15264 (method url-fetch)
15265 (uri (pypi-uri "apispec" version))
15266 (sha256
15267 (base32
15268 "0y3jxmgp2d24am3hxl40f5rw9abb0r8037sagax3dv64h4n1azwq"))))
15269 (build-system python-build-system)
15270 (propagated-inputs
15271 `(("python-pyyaml" ,python-pyyaml)))
15272 (native-inputs
15273 `(("python-pytest-3.0" ,python-pytest-3.0)
15274 ("python-flask" ,python-flask)
15275 ("python-marshmallow" ,python-marshmallow)
15276 ("python-tornado" ,python-tornado)
15277 ("python-bottle" ,python-bottle)
15278 ("python-mock" ,python-mock)))
15279 (home-page "https://github.com/marshmallow-code/apispec")
15280 (synopsis "Swagger 2.0 API specification generator")
15281 (description "@code{python-apispec} is a pluggable API specification
15282 generator. Currently supports the OpenAPI specification (f.k.a.
15283 Swagger 2.0).")
15284 (license license:expat)))
15285
15286 (define-public python2-apispec
15287 (package-with-python2 python-apispec))
15288
15289 (define-public python-flasgger
15290 (package
15291 (name "python-flasgger")
15292 (version "0.6.3")
15293 (source
15294 (origin
15295 (method url-fetch)
15296 (uri (string-append "https://github.com/rochacbruno/flasgger/archive/"
15297 version ".tar.gz"))
15298 (file-name (string-append name "-" version ".tar.gz"))
15299 (sha256
15300 (base32
15301 "1gqzlm0rb55fdpsy5ipkganlx9cnpi454fqyycr03jm22zql14ay"))))
15302 (build-system python-build-system)
15303 (arguments
15304 `(#:phases
15305 (modify-phases %standard-phases
15306 (replace 'check
15307 (lambda* (#:key inputs outputs #:allow-other-keys)
15308 (substitute* "Makefile"
15309 (("flake8 flasgger --ignore=F403")
15310 "flake8 flasgger --ignore=E731,F403"))
15311 (setenv "PYTHONPATH" (string-append (getcwd)
15312 ":"
15313 (getenv "PYTHONPATH")))
15314 (zero? (system* "py.test")))))))
15315 (propagated-inputs
15316 `(("python-flask" ,python-flask)
15317 ("python-pyyaml" ,python-pyyaml)
15318 ("python-jsonschema" ,python-jsonschema)
15319 ("python-mistune" ,python-mistune)
15320 ("python-six" ,python-six)))
15321 (native-inputs
15322 `(("python-decorator" ,python-decorator)
15323 ("python-flake8" ,python-flake8)
15324 ("python-flask-restful" ,python-flask-restful)
15325 ("python-flex" ,python-flex)
15326 ("python-pytest-3.0" ,python-pytest-3.0)
15327 ("python-pytest-cov" ,python-pytest-cov)
15328 ("python-marshmallow" ,python-marshmallow)
15329 ("python-apispec" ,python-apispec)))
15330 (home-page "https://github.com/rochacbruno/flasgger/")
15331 (synopsis "Extract Swagger specs from your Flask project")
15332 (description "@code{python-flasgger} allows extracting Swagger specs
15333 from your Flask project. It is a fork of Flask-Swagger.")
15334 (license license:expat)))
15335
15336 (define-public python2-flasgger
15337 (package-with-python2 python-flasgger))
15338
15339 (define-public python-swagger-spec-validator
15340 (package
15341 (name "python-swagger-spec-validator")
15342 (version "2.1.0")
15343 (source
15344 (origin
15345 (method url-fetch)
15346 (uri (pypi-uri "swagger-spec-validator" version))
15347 (sha256
15348 (base32
15349 "13hkpn2lycwr0468yqhjb3kwszqf7hjwlq61w7vdxq1caz31k4nw"))))
15350 (build-system python-build-system)
15351 (propagated-inputs
15352 `(("python-jsonschema" ,python-jsonschema)
15353 ("python-six" ,python-six)))
15354 (home-page
15355 "http://github.com/Yelp/swagger_spec_validator")
15356 (synopsis "Validation of Swagger specifications")
15357 (description "@code{swagger_spec_validator} provides a library for
15358 validating Swagger API specifications.")
15359 (license license:asl2.0)))
15360
15361 (define-public python2-swagger-spec-validator
15362 (package-with-python2 python-swagger-spec-validator))
15363
15364 (define-public python-apache-libcloud
15365 (package
15366 (name "python-apache-libcloud")
15367 (version "2.0.0")
15368 (source
15369 (origin
15370 (method url-fetch)
15371 (uri (pypi-uri "apache-libcloud" version))
15372 (sha256
15373 (base32
15374 "1a71z02ckcxld72k4qgmdnkjan52c4wczncs3p2mp5yafh7dsan7"))))
15375 (build-system python-build-system)
15376 (arguments
15377 `(#:phases
15378 (modify-phases %standard-phases
15379 (add-after 'unpack 'patch-ssh
15380 (lambda* (#:key inputs #:allow-other-keys)
15381 (substitute* "libcloud/compute/ssh.py"
15382 (("'ssh'") (string-append "'" (assoc-ref inputs "openssh")
15383 "/bin/ssh" "'")))
15384 #t))
15385 (add-after 'unpack 'patch-tests
15386 (lambda _
15387 (substitute* "./libcloud/test/test_file_fixtures.py"
15388 ;; See <https://issues.apache.org/jira/browse/LIBCLOUD-923>.
15389 (("def _ascii") "def _raw_data(self, method, url, body, headers):
15390 return (httplib.OK,
15391 \"1234abcd\",
15392 {\"test\": \"value\"},
15393 httplib.responses[httplib.OK])
15394 def _ascii"))
15395 (substitute* "libcloud/test/compute/test_ssh_client.py"
15396 (("class ShellOutSSHClientTests")
15397 "@unittest.skip(\"Guix container doesn't have ssh service\")
15398 class ShellOutSSHClientTests")
15399 ;; See <https://issues.apache.org/jira/browse/LIBCLOUD-924>.
15400 (("'.xf0.x90.x8d.x88'") "b'\\xF0\\x90\\x8D\\x88'")
15401 (("'.xF0', '.x90', '.x8D', '.x88'")
15402 "b'\\xF0', b'\\x90', b'\\x8D', b'\\x88'"))
15403 #t)))))
15404 (inputs
15405 `(("openssh" ,openssh)))
15406 (propagated-inputs
15407 `(("python-paramiko" ,python-paramiko)
15408 ("python-requests" ,python-requests)))
15409 (native-inputs
15410 `(("python-lockfile" ,python-lockfile)
15411 ("python-mock" ,python-mock)
15412 ("python-requests-mock" ,python-requests-mock)))
15413 (home-page "https://libcloud.apache.org/")
15414 (synopsis "Unified Cloud API")
15415 (description "@code{libcloud} is a Python library for interacting with
15416 many of the popular cloud service providers using a unified API.")
15417 (license license:asl2.0)))
15418
15419 (define-public python2-apache-libcloud
15420 (package-with-python2 python-apache-libcloud))
15421
15422 (define-public python-smmap2
15423 (package
15424 (name "python-smmap2")
15425 (version "2.0.3")
15426 (source
15427 (origin
15428 (method url-fetch)
15429 (uri (pypi-uri "smmap2" version))
15430 (sha256
15431 (base32
15432 "1hvn28p3zvxa98sbi9lrqvv2ps4q284j4jq9a619zw0m7yv0sly7"))))
15433 (build-system python-build-system)
15434 (native-inputs
15435 `(("python-nosexcover" ,python-nosexcover)))
15436 (home-page "https://github.com/Byron/smmap")
15437 (synopsis "Python sliding window memory map manager")
15438 (description "@code{smmap2} is a pure Python implementation of a sliding
15439 window memory map manager.")
15440 (license license:bsd-3)))
15441
15442 (define-public python2-smmap2
15443 (package-with-python2 python-smmap2))
15444
15445 (define-public python-regex
15446 (package
15447 (name "python-regex")
15448 (version "2017.06.07")
15449 (source (origin
15450 (method url-fetch)
15451 (uri (pypi-uri "regex" version))
15452 (sha256
15453 (base32
15454 "06r6b7yigikbj3a72whl85r2b64pj1r0ypmw9yalmkm0wnxq8mz4"))))
15455 (build-system python-build-system)
15456 (home-page "https://bitbucket.org/mrabarnett/mrab-regex")
15457 (synopsis "Alternative regular expression module")
15458 (description "This regular expression implementation is backwards-
15459 compatible with the standard @code{re} module, but offers additional
15460 functionality like full case-folding for case-insensitive matches in Unicode.")
15461 (license license:psfl)))
15462
15463 (define-public python2-regex
15464 (package-with-python2 python-regex))
15465
15466 (define-public python2-pyopengl
15467 (package
15468 (name "python2-pyopengl")
15469 (version "3.1.0")
15470 (source
15471 (origin
15472 (method url-fetch)
15473 (uri (pypi-uri "PyOpenGL" version))
15474 (sha256
15475 (base32
15476 "1byxjj6a8rwzhxhjqlc588zdad2qwxdd7vlam2653ylll31waiwv"))))
15477 (arguments
15478 `(#:python ,python-2))
15479 (build-system python-build-system)
15480 (home-page "http://pyopengl.sourceforge.net")
15481 (synopsis "Standard OpenGL bindings for Python")
15482 (description
15483 "PyOpenGL is the most common cross platform Python binding to OpenGL and
15484 related APIs. The binding is created using the standard @code{ctypes}
15485 library.")
15486 (license license:bsd-3)))
15487
15488 (define-public python-rencode
15489 (package
15490 (name "python-rencode")
15491 (version "1.0.3")
15492 (source
15493 (origin
15494 (method url-fetch)
15495 (uri (pypi-uri "rencode" version))
15496 (sha256
15497 (base32
15498 "08if5yax1xn5yfp8p3765ccjmfcv9di7i4m5jckgnwvdsgznwkbj"))))
15499 (build-system python-build-system)
15500 (native-inputs `(("pkg-config" ,pkg-config)
15501 ("python-cython", python-cython)))
15502 (home-page "https://github.com/aresch/rencode")
15503 (synopsis "Serialization of heterogeneous data structures")
15504 (description
15505 "The @code{rencode} module is a data structure serialization library,
15506 similar to @code{bencode} from the BitTorrent project. For complex,
15507 heterogeneous data structures with many small elements, r-encoding stake up
15508 significantly less space than b-encodings. This version of rencode is a
15509 complete rewrite in Cython to attempt to increase the performance over the
15510 pure Python module.")
15511 (license license:bsd-3)))
15512
15513 (define-public python2-rencode
15514 (package-with-python2 python-rencode))