gnu: Add python-swagger-spec-validator.
[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 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 ;;;
44 ;;; This file is part of GNU Guix.
45 ;;;
46 ;;; GNU Guix is free software; you can redistribute it and/or modify it
47 ;;; under the terms of the GNU General Public License as published by
48 ;;; the Free Software Foundation; either version 3 of the License, or (at
49 ;;; your option) any later version.
50 ;;;
51 ;;; GNU Guix is distributed in the hope that it will be useful, but
52 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
53 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
54 ;;; GNU General Public License for more details.
55 ;;;
56 ;;; You should have received a copy of the GNU General Public License
57 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
58
59 (define-module (gnu packages python)
60 #:use-module ((guix licenses) #:prefix license:)
61 #:use-module (gnu packages)
62 #:use-module (gnu packages algebra)
63 #:use-module (gnu packages adns)
64 #:use-module (gnu packages attr)
65 #:use-module (gnu packages backup)
66 #:use-module (gnu packages bash)
67 #:use-module (gnu packages compression)
68 #:use-module (gnu packages crypto)
69 #:use-module (gnu packages databases)
70 #:use-module (gnu packages django)
71 #:use-module (gnu packages file)
72 #:use-module (gnu packages fontutils)
73 #:use-module (gnu packages gcc)
74 #:use-module (gnu packages ghostscript)
75 #:use-module (gnu packages gl)
76 #:use-module (gnu packages glib)
77 #:use-module (gnu packages graphviz)
78 #:use-module (gnu packages gstreamer)
79 #:use-module (gnu packages gtk)
80 #:use-module (gnu packages icu4c)
81 #:use-module (gnu packages image)
82 #:use-module (gnu packages imagemagick)
83 #:use-module (gnu packages libevent)
84 #:use-module (gnu packages libffi)
85 #:use-module (gnu packages linux)
86 #:use-module (gnu packages man)
87 #:use-module (gnu packages maths)
88 #:use-module (gnu packages multiprecision)
89 #:use-module (gnu packages networking)
90 #:use-module (gnu packages ncurses)
91 #:use-module (gnu packages openstack)
92 #:use-module (gnu packages password-utils)
93 #:use-module (gnu packages pcre)
94 #:use-module (gnu packages perl)
95 #:use-module (gnu packages pkg-config)
96 #:use-module (gnu packages protobuf)
97 #:use-module (gnu packages qt)
98 #:use-module (gnu packages readline)
99 #:use-module (gnu packages sdl)
100 #:use-module (gnu packages shells)
101 #:use-module (gnu packages statistics)
102 #:use-module (gnu packages tex)
103 #:use-module (gnu packages texinfo)
104 #:use-module (gnu packages tls)
105 #:use-module (gnu packages version-control)
106 #:use-module (gnu packages video)
107 #:use-module (gnu packages web)
108 #:use-module (gnu packages base)
109 #:use-module (gnu packages xml)
110 #:use-module (gnu packages xorg)
111 #:use-module (gnu packages xdisorg)
112 #:use-module (gnu packages zip)
113 #:use-module (gnu packages tcl)
114 #:use-module (gnu packages bdw-gc)
115 #:use-module (guix packages)
116 #:use-module (guix download)
117 #:use-module (guix git-download)
118 #:use-module (guix utils)
119 #:use-module (guix build-system gnu)
120 #:use-module (guix build-system cmake)
121 #:use-module (guix build-system python)
122 #:use-module (guix build-system trivial)
123 #:use-module (srfi srfi-1))
124
125 (define-public python-2.7
126 (package
127 (name "python")
128 (version "2.7.13")
129 (source
130 (origin
131 (method url-fetch)
132 (uri (string-append "https://www.python.org/ftp/python/"
133 version "/Python-" version ".tar.xz"))
134 (sha256
135 (base32
136 "0cgpk3zk0fgpji59pb4zy9nzljr70qzgv1vpz5hq5xw2d2c47m9m"))
137 (patches (search-patches "python-2.7-search-paths.patch"
138 "python-2-deterministic-build-info.patch"
139 "python-2.7-site-prefixes.patch"
140 "python-2.7-source-date-epoch.patch"
141 "python-2.7-getentropy-on-old-kernels.patch"))
142 (modules '((guix build utils)))
143 ;; suboptimal to delete failing tests here, but if we delete them in the
144 ;; arguments then we need to make sure to strip out that phase when it
145 ;; gets inherited by python and python-minimal.
146 (snippet
147 '(begin
148 (for-each delete-file
149 '("Lib/test/test_compileall.py"
150 "Lib/test/test_ctypes.py" ; fails on mips64el
151 "Lib/test/test_distutils.py"
152 "Lib/test/test_import.py"
153 "Lib/test/test_shutil.py"
154 "Lib/test/test_socket.py"
155 "Lib/test/test_subprocess.py"))
156 #t))))
157 (outputs '("out"
158 "tk")) ;tkinter; adds 50 MiB to the closure
159 (build-system gnu-build-system)
160 (arguments
161 `(;; 356 tests OK.
162 ;; 6 tests failed:
163 ;; test_compileall test_distutils test_import test_shutil test_socket
164 ;; test_subprocess
165 ;; 39 tests skipped:
166 ;; test_aepack test_al test_applesingle test_bsddb test_bsddb185
167 ;; test_bsddb3 test_cd test_cl test_codecmaps_cn test_codecmaps_hk
168 ;; test_codecmaps_jp test_codecmaps_kr test_codecmaps_tw test_curses
169 ;; test_dl test_gdb test_gl test_imageop test_imgfile test_ioctl
170 ;; test_kqueue test_linuxaudiodev test_macos test_macostools
171 ;; test_msilib test_ossaudiodev test_scriptpackages test_smtpnet
172 ;; test_socketserver test_startfile test_sunaudiodev test_timeout
173 ;; test_tk test_ttk_guionly test_urllib2net test_urllibnet
174 ;; test_winreg test_winsound test_zipfile64
175 ;; 4 skips unexpected on linux2:
176 ;; test_bsddb test_bsddb3 test_gdb test_ioctl
177 #:test-target "test"
178 #:configure-flags
179 (list "--enable-shared" ;allow embedding
180 "--with-system-ffi" ;build ctypes
181 "--with-ensurepip=install" ;install pip and setuptools
182 "--enable-unicode=ucs4"
183 (string-append "LDFLAGS=-Wl,-rpath="
184 (assoc-ref %outputs "out") "/lib"))
185
186 #:modules ((ice-9 ftw) (ice-9 match)
187 (guix build utils) (guix build gnu-build-system))
188 #:phases
189 (modify-phases %standard-phases
190 (add-before
191 'configure 'patch-lib-shells
192 (lambda _
193 ;; Filter for existing files, since some may not exist in all
194 ;; versions of python that are built with this recipe.
195 (substitute* (filter file-exists?
196 '("Lib/subprocess.py"
197 "Lib/popen2.py"
198 "Lib/distutils/tests/test_spawn.py"
199 "Lib/test/test_subprocess.py"))
200 (("/bin/sh") (which "sh")))
201
202 ;; Use zero as the timestamp in .pyc files so that builds are
203 ;; deterministic. TODO: Remove it when this variable is set in
204 ;; gnu-build-system.scm.
205 (setenv "SOURCE_DATE_EPOCH" "1")
206 #t))
207 (add-before 'configure 'do-not-record-configure-flags
208 (lambda* (#:key configure-flags #:allow-other-keys)
209 ;; Remove configure flags from the installed '_sysconfigdata.py'
210 ;; and 'Makefile' so we don't end up keeping references to the
211 ;; build tools.
212 ;;
213 ;; Preserve at least '--with-system-ffi' since otherwise the
214 ;; thing tries to build libffi, fails, and we end up with a
215 ;; Python that lacks ctypes.
216 (substitute* "configure"
217 (("^CONFIG_ARGS=.*$")
218 (format #f "CONFIG_ARGS='~a'\n"
219 (if (member "--with-system-ffi" configure-flags)
220 "--with-system-ffi"
221 ""))))
222 #t))
223 (add-before
224 'check 'pre-check
225 (lambda _
226 ;; 'Lib/test/test_site.py' needs a valid $HOME
227 (setenv "HOME" (getcwd))
228 #t))
229 (add-after
230 'unpack 'set-source-file-times-to-1980
231 ;; XXX One of the tests uses a ZIP library to pack up some of the
232 ;; source tree, and fails with "ZIP does not support timestamps
233 ;; before 1980". Work around this by setting the file times in the
234 ;; source tree to sometime in early 1980.
235 (lambda _
236 (let ((circa-1980 (* 10 366 24 60 60)))
237 (ftw "." (lambda (file stat flag)
238 (utime file circa-1980 circa-1980)
239 #t))
240 #t)))
241 (add-after 'install 'remove-tests
242 ;; Remove 25 MiB of unneeded unit tests. Keep test_support.*
243 ;; because these files are used by some libraries out there.
244 (lambda* (#:key outputs #:allow-other-keys)
245 (let ((out (assoc-ref outputs "out")))
246 (match (scandir (string-append out "/lib")
247 (lambda (name)
248 (string-prefix? "python" name)))
249 ((pythonX.Y)
250 (let ((testdir (string-append out "/lib/" pythonX.Y
251 "/test")))
252 (with-directory-excursion testdir
253 (for-each delete-file-recursively
254 (scandir testdir
255 (match-lambda
256 ((or "." "..") #f)
257 (file
258 (not
259 (string-prefix? "test_support."
260 file))))))
261 (call-with-output-file "__init__.py" (const #t))
262 #t)))))))
263 (add-before 'strip 'make-libraries-writable
264 (lambda* (#:key outputs #:allow-other-keys)
265 ;; Make .so files writable so they can be stripped.
266 (let ((out (assoc-ref outputs "out")))
267 (for-each (lambda (file)
268 (chmod file #o755))
269 (find-files (string-append out "/lib")
270 "\\.so"))
271 #t)))
272 (add-after 'install 'move-tk-inter
273 (lambda* (#:key outputs #:allow-other-keys)
274 ;; When Tkinter support is built move it to a separate output so
275 ;; that the main output doesn't contain a reference to Tcl/Tk.
276 (let ((out (assoc-ref outputs "out"))
277 (tk (assoc-ref outputs "tk")))
278 (when tk
279 (match (find-files out "tkinter.*\\.so")
280 ((tkinter.so)
281 ;; The .so is in OUT/lib/pythonX.Y/lib-dynload, but we
282 ;; want it under TK/lib/pythonX.Y/site-packages.
283 (let* ((len (string-length out))
284 (target (string-append
285 tk "/"
286 (string-drop
287 (dirname (dirname tkinter.so))
288 len)
289 "/site-packages")))
290 (install-file tkinter.so target)
291 (delete-file tkinter.so)))))
292 #t))))))
293 (inputs
294 `(("bzip2" ,bzip2)
295 ("gdbm" ,gdbm)
296 ("libffi" ,libffi) ; for ctypes
297 ("sqlite" ,sqlite) ; for sqlite extension
298 ("openssl" ,openssl)
299 ("readline" ,readline)
300 ("zlib" ,zlib)
301 ("tcl" ,tcl)
302 ("tk" ,tk))) ; for tkinter
303 (native-inputs
304 `(("pkg-config" ,pkg-config)))
305 (native-search-paths
306 (list (search-path-specification
307 (variable "PYTHONPATH")
308 (files '("lib/python2.7/site-packages")))))
309 (home-page "https://www.python.org")
310 (synopsis "High-level, dynamically-typed programming language")
311 (description
312 "Python is a remarkably powerful dynamic programming language that
313 is used in a wide variety of application domains. Some of its key
314 distinguishing features include: clear, readable syntax; strong
315 introspection capabilities; intuitive object orientation; natural
316 expression of procedural code; full modularity, supporting hierarchical
317 packages; exception-based error handling; and very high level dynamic
318 data types.")
319 (license license:psfl)))
320
321 ;; Current 2.x version.
322 (define-public python-2 python-2.7)
323
324 (define-public python-3.5
325 (package (inherit python-2)
326 (version "3.5.3")
327 (source (origin
328 (method url-fetch)
329 (uri (string-append "https://www.python.org/ftp/python/"
330 version "/Python-" version ".tar.xz"))
331 (patches (search-patches
332 "python-fix-tests.patch"
333 "python-3.5-fix-tests.patch"
334 "python-3.5-getentropy-on-old-kernels.patch"
335 "python-3-deterministic-build-info.patch"
336 "python-3-search-paths.patch"))
337 (patch-flags '("-p0"))
338 (sha256
339 (base32
340 "1c6v1n9nz4mlx9mw1125fxpmbrgniqdbbx9hnqx44maqazb2mzpf"))
341 (snippet
342 '(delete-file
343 "Lib/ctypes/test/test_win32.py")))) ; fails on aarch64
344 (arguments (substitute-keyword-arguments (package-arguments python-2)
345 ((#:tests? _) #t)))
346 (native-search-paths
347 (list (search-path-specification
348 (variable "PYTHONPATH")
349 (files (list (string-append "lib/python"
350 (version-major+minor version)
351 "/site-packages"))))))))
352
353 ;; Current 3.x version.
354 (define-public python-3 python-3.5)
355
356 ;; Current major version.
357 (define-public python python-3)
358
359 ;; Minimal variants of Python, mostly used to break the cycle between Tk and
360 ;; Python (Tk -> libxcb -> Python.)
361
362 (define-public python2-minimal
363 (package (inherit python-2)
364 (name "python-minimal")
365 (outputs '("out"))
366
367 ;; Keep zlib, which is used by 'pip' (via the 'zipimport' module), which
368 ;; is invoked upon 'make install'. 'pip' also expects 'ctypes' and thus
369 ;; libffi.
370 (inputs `(("libffi" ,libffi)
371 ("zlib" ,zlib)))))
372
373 (define-public python-minimal
374 (package (inherit python)
375 (name "python-minimal")
376 (outputs '("out"))
377
378 ;; Build fails due to missing ctypes without libffi.
379 ;; OpenSSL is a mandatory dependency of Python 3.x, for urllib;
380 ;; zlib is required by 'zipimport', used by pip.
381 (inputs `(("libffi" ,libffi)
382 ("openssl" ,openssl)
383 ("zlib" ,zlib)))))
384
385 (define* (wrap-python3 python
386 #:optional
387 (name (string-append (package-name python) "-wrapper")))
388 (package (inherit python)
389 (name name)
390 (source #f)
391 (build-system trivial-build-system)
392 (outputs '("out"))
393 (inputs `(("bash" ,bash)))
394 (propagated-inputs `(("python" ,python)))
395 (arguments
396 `(#:modules ((guix build utils))
397 #:builder
398 (begin
399 (use-modules (guix build utils))
400 (let ((bin (string-append (assoc-ref %outputs "out") "/bin"))
401 (python (string-append (assoc-ref %build-inputs "python") "/bin/")))
402 (mkdir-p bin)
403 (for-each
404 (lambda (old new)
405 (symlink (string-append python old)
406 (string-append bin "/" new)))
407 `("python3" ,"pydoc3" ,"idle3" ,"pip3")
408 `("python" ,"pydoc" ,"idle" ,"pip"))
409 ;; python-config outputs search paths based upon its location,
410 ;; use a bash wrapper to avoid changing its outputs.
411 (let ((bash (string-append (assoc-ref %build-inputs "bash")
412 "/bin/bash"))
413 (old (string-append python "python3-config"))
414 (new (string-append bin "/python-config")))
415 (with-output-to-file new
416 (lambda ()
417 (format #t "#!~a~%" bash)
418 (format #t "exec \"~a\" \"$@\"~%" old)
419 (chmod new #o755)
420 #t)))))))
421 (synopsis "Wrapper for the Python 3 commands")
422 (description
423 "This package provides wrappers for the commands of Python@tie{}3.x such
424 that they can be invoked under their usual name---e.g., @command{python}
425 instead of @command{python3}.")))
426
427 (define-public python-wrapper (wrap-python3 python))
428 (define-public python-minimal-wrapper (wrap-python3 python-minimal))
429
430 (define-public python-psutil
431 (package
432 (name "python-psutil")
433 (version "4.3.0")
434 (source
435 (origin
436 (method url-fetch)
437 (uri (pypi-uri "psutil" version))
438 (sha256
439 (base32
440 "1w4r09fvn6kd80m5mx4ws1wz100brkaq6hzzpwrns8cgjzjpl6c6"))))
441 (build-system python-build-system)
442 (arguments
443 ;; FIXME: some tests does not return and times out.
444 '(#:tests? #f))
445 (home-page "https://www.github.com/giampaolo/psutil")
446 (synopsis "Library for retrieving information on running processes")
447 (description
448 "psutil (Python system and process utilities) is a library for retrieving
449 information on running processes and system utilization (CPU, memory, disks,
450 network) in Python. It is useful mainly for system monitoring, profiling and
451 limiting process resources and management of running processes. It implements
452 many functionalities offered by command line tools such as: ps, top, lsof,
453 netstat, ifconfig, who, df, kill, free, nice, ionice, iostat, iotop, uptime,
454 pidof, tty, taskset, pmap.")
455 (license license:bsd-3)))
456
457 (define-public python2-psutil
458 (package-with-python2 python-psutil))
459
460 (define-public python-passlib
461 (package
462 (name "python-passlib")
463 (version "1.7.1")
464 (source
465 (origin
466 (method url-fetch)
467 (uri (pypi-uri "passlib" version))
468 (sha256
469 (base32
470 "1q2khqpj9rlcgdmkypjdq1kswvhjf72bq0zk2cv669cc2dj8z51x"))))
471 (build-system python-build-system)
472 (native-inputs
473 `(("python-nose" ,python-nose)))
474 (propagated-inputs
475 `(("python-py-bcrypt" ,python-py-bcrypt)))
476 (arguments
477 `(#:phases
478 (alist-cons-before
479 'check 'set-PYTHON_EGG_CACHE
480 ;; some tests require access to "$HOME/.cython"
481 (lambda* _ (setenv "PYTHON_EGG_CACHE" "/tmp"))
482 %standard-phases)))
483 (home-page "https://bitbucket.org/ecollins/passlib")
484 (synopsis
485 "Comprehensive password hashing framework")
486 (description
487 "Passlib is a password hashing library for Python 2 & 3, which provides
488 cross-platform implementations of over 30 password hashing algorithms, as well
489 as a framework for managing existing password hashes. It's designed to be
490 useful for a wide range of tasks, from verifying a hash found in /etc/shadow,
491 to providing full-strength password hashing for multi-user application.")
492 (license license:bsd-3)))
493
494 (define-public python2-passlib
495 (package-with-python2 python-passlib))
496
497 (define-public python-py-bcrypt
498 (package
499 (name "python-py-bcrypt")
500 (version "0.4")
501 (source
502 (origin
503 (method url-fetch)
504 (uri (string-append
505 "https://pypi.python.org/packages/source/p/py-bcrypt/py-bcrypt-"
506 version
507 ".tar.gz"))
508 (sha256
509 (base32
510 "0y6smdggwi5s72v6p1nn53dg6w05hna3d264cq6kas0lap73p8az"))))
511 (build-system python-build-system)
512 (home-page "https://code.google.com/p/py-bcrypt")
513 (synopsis
514 "Bcrypt password hashing and key derivation")
515 (description
516 "A python wrapper of OpenBSD's Blowfish password hashing code. This
517 system hashes passwords using a version of Bruce Schneier's Blowfish block
518 cipher with modifications designed to raise the cost of off-line password
519 cracking and frustrate fast hardware implementation. The computation cost of
520 the algorithm is parametised, so it can be increased as computers get faster.
521 The intent is to make a compromise of a password database less likely to
522 result in an attacker gaining knowledge of the plaintext passwords (e.g. using
523 John the Ripper).")
524 ;; "sha2.c" is under BSD-3;
525 ;; "blowfish.c" and "bcrypt.c" are under BSD-4;
526 ;; the rest is under ISC.
527 (license (list license:isc license:bsd-3 license:bsd-4))))
528
529 (define-public python2-py-bcrypt
530 (package-with-python2 python-py-bcrypt))
531
532
533 (define-public python-paramiko
534 (package
535 (name "python-paramiko")
536 (version "2.1.2")
537 (source
538 (origin
539 (method url-fetch)
540 (uri (pypi-uri "paramiko" version))
541 (sha256
542 (base32
543 "04734n0wy3hxk6rij4fr29in5jmr70nxpc7pqi2ksbjysfz4kbjz"))))
544 (build-system python-build-system)
545 (arguments
546 '(#:phases
547 (modify-phases %standard-phases
548 (replace 'check
549 (lambda _
550 (zero? (system* "python" "test.py")))))))
551 (propagated-inputs
552 `(("python-pyasn1" ,python-pyasn1)
553 ("python-cryptography" ,python-cryptography)))
554 (home-page "http://www.paramiko.org/")
555 (synopsis "SSHv2 protocol library")
556 (description "Paramiko is a python implementation of the SSHv2 protocol,
557 providing both client and server functionality. While it leverages a Python C
558 extension for low level cryptography (PyCrypto), Paramiko itself is a pure
559 Python interface around SSH networking concepts.")
560 (license license:lgpl2.1+)))
561
562 (define-public python2-paramiko
563 (package-with-python2 python-paramiko))
564
565
566 (define-public python-httplib2
567 (package
568 (name "python-httplib2")
569 (version "0.9.2")
570 (source
571 (origin
572 (method url-fetch)
573 (uri (pypi-uri "httplib2" version))
574 (sha256
575 (base32
576 "126rsryvw9vhbf3qmsfw9lf4l4xm2srmgs439lgma4cpag4s3ay3"))))
577 (build-system python-build-system)
578 (home-page "https://github.com/jcgregorio/httplib2")
579 (synopsis "Comprehensive HTTP client library")
580 (description
581 "A comprehensive HTTP client library supporting many features left out of
582 other HTTP libraries.")
583 (license license:expat)))
584
585 (define-public python2-httplib2
586 (package-with-python2 python-httplib2))
587
588 (define-public python-ecdsa
589 (package
590 (name "python-ecdsa")
591 (version "0.13")
592 (source
593 (origin
594 (method url-fetch)
595 (uri (string-append
596 "https://pypi.python.org/packages/source/e/ecdsa/ecdsa-"
597 version
598 ".tar.gz"))
599 (sha256
600 (base32
601 "1yj31j0asmrx4an9xvsaj2icdmzy6pw0glfpqrrkrphwdpi1xkv4"))))
602 (build-system python-build-system)
603 (inputs
604 `(("openssl" ,openssl)))
605 (home-page
606 "https://github.com/warner/python-ecdsa")
607 (synopsis
608 "ECDSA cryptographic signature library (pure python)")
609 (description
610 "This is an easy-to-use implementation of ECDSA cryptography (Elliptic
611 Curve Digital Signature Algorithm), implemented purely in Python. With this
612 library, you can quickly create keypairs (signing key and verifying key), sign
613 messages, and verify the signatures. The keys and signatures are very short,
614 making them easy to handle and incorporate into other protocols.")
615 (license license:expat)))
616
617 (define-public python2-ecdsa
618 (package-with-python2 python-ecdsa))
619
620 (define-public python-ccm
621 (package
622 (name "python-ccm")
623 (version "2.1.6")
624 (source
625 (origin
626 (method url-fetch)
627 (uri (pypi-uri "ccm" version))
628 (sha256
629 (base32
630 "177dfxsmk3k4cih6fh6v8d91bh4nqx7ns6pc07w7m7i3cvdx3c8n"))))
631 (build-system python-build-system)
632 (propagated-inputs
633 `(("python-pyyaml" ,python-pyyaml)
634 ;; Not listed in setup.py, but used in ccmlib/node.py for full
635 ;; functionality
636 ("python-psutil" ,python-psutil)
637 ("python-six" ,python-six)))
638 (home-page "https://github.com/pcmanus/ccm")
639 (synopsis "Cassandra Cluster Manager for Apache Cassandra clusters on
640 localhost")
641 (description "Cassandra Cluster Manager is a development tool for testing
642 local Cassandra clusters. It creates, launches and removes Cassandra clusters
643 on localhost.")
644 (license license:asl2.0)))
645
646 (define-public python2-ccm
647 (package-with-python2 python-ccm))
648
649 (define-public python-pytz
650 (package
651 (name "python-pytz")
652 (version "2016.10")
653 (source
654 (origin
655 (method url-fetch)
656 (uri (pypi-uri "pytz" version ".tar.bz2"))
657 (sha256
658 (base32
659 "0az099cyp6p5xbsvfcdacj4hvxncbwm2ayn3h55mcp07zb2b45kh"))))
660 (build-system python-build-system)
661 (arguments `(#:tests? #f)) ; no test target
662 (home-page "http://pythonhosted.org/pytz")
663 (synopsis "Python timezone library")
664 (description
665 "This library allows accurate and cross platform timezone calculations
666 using Python 2.4 or higher and provides access to the Olson timezone database.")
667 (license license:expat)))
668
669 (define-public python2-pytz
670 (package-with-python2 python-pytz))
671
672
673 (define-public python-babel
674 (package
675 (name "python-babel")
676 (version "2.3.4")
677 (source
678 (origin
679 (method url-fetch)
680 (uri (pypi-uri "Babel" version))
681 (sha256
682 (base32
683 "0x98qqqw35xllpcama013a9788ly84z8dm1w2wwfpxh2710c8df5"))))
684 (build-system python-build-system)
685 (propagated-inputs
686 `(("python-pytz" ,python-pytz)))
687 (arguments `(#:tests? #f)) ; no test target
688 (home-page "http://babel.pocoo.org/")
689 (synopsis
690 "Tools for internationalizing Python applications")
691 (description
692 "Babel is composed of two major parts:
693 - tools to build and work with gettext message catalogs
694 - a Python interface to the CLDR (Common Locale Data Repository), providing
695 access to various locale display names, localized number and date formatting,
696 etc. ")
697 (license license:bsd-3)))
698
699 (define-public python2-babel
700 (package-with-python2 python-babel))
701
702 (define-public python2-backport-ssl-match-hostname
703 (package
704 (name "python2-backport-ssl-match-hostname")
705 (version "3.5.0.1")
706 (source
707 (origin
708 (method url-fetch)
709 (uri (string-append
710 "https://pypi.python.org/packages/source/b/"
711 "backports.ssl_match_hostname/backports.ssl_match_hostname-"
712 version ".tar.gz"))
713 (sha256
714 (base32
715 "1wndipik52cyqy0677zdgp90i435pmvwd89cz98lm7ri0y3xjajh"))))
716 (build-system python-build-system)
717 (arguments
718 `(#:python ,python-2
719 #:tests? #f)) ; no test target
720 (home-page "https://bitbucket.org/brandon/backports.ssl_match_hostname")
721 (synopsis "Backport of ssl.match_hostname() function from Python 3.5")
722 (description
723 "This backport brings the ssl.match_hostname() function to users of
724 earlier versions of Python. The function checks the hostname in the
725 certificate returned by the server to which a connection has been established,
726 and verifies that it matches the intended target hostname.")
727 (license license:psfl)))
728
729 (define-public python-hdf4
730 (package
731 (name "python-hdf4")
732 (version "0.9")
733 (source
734 (origin
735 (method url-fetch)
736 (uri (pypi-uri name version))
737 (sha256
738 (base32
739 "1hjiyrxvxk9817qyqky3nar4y3fs4z8wxz0n884zzb5wi6skrjks"))))
740 (build-system python-build-system)
741 (native-inputs `(("nose" ,python-nose)))
742 (propagated-inputs `(("numpy" ,python-numpy)))
743 (inputs
744 `(("hdf4" ,hdf4)
745 ("libjpeg" ,libjpeg)
746 ("zlib" ,zlib)))
747 (arguments
748 `(#:phases
749 (modify-phases %standard-phases
750 (replace 'check
751 (lambda _
752 ;; The 'runexamples' script sets PYTHONPATH to CWD, then goes
753 ;; on to import numpy. Somehow this works on their CI system.
754 ;; Let's just manage PYTHONPATH here instead.
755 (substitute* "runexamples.sh"
756 (("export PYTHONPATH=.*") ""))
757 (setenv "PYTHONPATH"
758 (string-append (getcwd) ":"
759 (getenv "PYTHONPATH")))
760 (and (zero? (system* "./runexamples.sh"))
761 (zero? (system* "nosetests" "-v"))))))))
762 (home-page "https://github.com/fhs/python-hdf4")
763 (synopsis "Python interface to the NCSA HDF4 library")
764 (description
765 "Python-HDF4 is a python wrapper around the NCSA HDF version 4 library,
766 which implements the SD (Scientific Dataset), VS (Vdata) and V (Vgroup) API’s.
767 NetCDF files can also be read and modified. Python-HDF4 is a fork of
768 @url{http://hdfeos.org/software/pyhdf.php,pyhdf}.")
769 (license license:expat)))
770
771 (define-public python2-hdf4
772 (package-with-python2 python-hdf4))
773
774 (define-public python-h5py
775 (package
776 (name "python-h5py")
777 (version "2.6.0")
778 (source
779 (origin
780 (method url-fetch)
781 (uri (pypi-uri "h5py" version))
782 (sha256
783 (base32
784 "0df46dg7i7xfking9lp221bfm8dbl974yvlrbi1w7r6m61ac7bxj"))))
785 (build-system python-build-system)
786 (arguments
787 `(#:tests? #f ; no test target
788 #:phases
789 (modify-phases %standard-phases
790 (add-after 'unpack 'fix-hdf5-paths
791 (lambda* (#:key inputs #:allow-other-keys)
792 (let ((prefix (assoc-ref inputs "hdf5")))
793 (substitute* "setup_build.py"
794 (("\\['/opt/local/lib', '/usr/local/lib'\\]")
795 (string-append "['" prefix "/lib" "']"))
796 (("'/opt/local/include', '/usr/local/include'")
797 (string-append "'" prefix "/include" "'")))
798 (substitute* "setup_configure.py"
799 (("\\['/usr/local/lib', '/opt/local/lib'\\]")
800 (string-append "['" prefix "/lib" "']")))
801 #t))))))
802 (propagated-inputs
803 `(("python-six" ,python-six)
804 ("python-numpy" ,python-numpy)))
805 (inputs
806 `(("hdf5" ,hdf5)))
807 (native-inputs
808 `(("python-cython" ,python-cython)
809 ("python-pkgconfig" ,python-pkgconfig)))
810 (home-page "http://www.h5py.org/")
811 (synopsis "Read and write HDF5 files from Python")
812 (description
813 "The h5py package provides both a high- and low-level interface to the
814 HDF5 library from Python. The low-level interface is intended to be a
815 complete wrapping of the HDF5 API, while the high-level component supports
816 access to HDF5 files, datasets and groups using established Python and NumPy
817 concepts.")
818 (license license:bsd-3)))
819
820 (define-public python2-h5py
821 (package-with-python2 python-h5py))
822
823 (define-public python-netcdf4
824 (package
825 (name "python-netcdf4")
826 (version "1.2.7")
827 (source
828 (origin
829 (method url-fetch)
830 (uri (pypi-uri "netCDF4" version))
831 (sha256
832 (base32
833 "1fllizmnpw0zkzzm4j9pgamarlzfn3kmv9zrm0w65q1y31h9ni0c"))))
834 (build-system python-build-system)
835 (native-inputs
836 `(("python-cython" ,python-cython)))
837 (propagated-inputs
838 `(("python-numpy" ,python-numpy)))
839 (inputs
840 `(("netcdf" ,netcdf)
841 ("hdf4" ,hdf4)
842 ("hdf5" ,hdf5)))
843 (arguments
844 '(#:phases
845 (modify-phases %standard-phases
846 (replace 'check
847 (lambda _
848 (setenv "NO_NET" "1") ; disable opendap tests
849 (with-directory-excursion "test"
850 (setenv "PYTHONPATH" ; find and add the library we just built
851 (string-append
852 (car (find-files "../build" "lib.*"
853 #:directories? #:t
854 #:fail-on-error? #:t))
855 ":" (getenv "PYTHONPATH")))
856 (zero? (system* "python" "run_all.py"))))))))
857 (home-page
858 "https://github.com/Unidata/netcdf4-python")
859 (synopsis "Python/numpy interface to the netCDF library")
860 (description "Netcdf4-python is a Python interface to the netCDF C
861 library. netCDF version 4 has many features not found in earlier
862 versions of the library and is implemented on top of HDF5. This module
863 can read and write files in both the new netCDF 4 and the old netCDF 3
864 format, and can create files that are readable by HDF5 clients. The
865 API is modelled after @code{Scientific.IO.NetCDF}, and should be familiar
866 to users of that module.")
867 ;; The software is mainly ISC, but includes some files covered
868 ;; by the Expat license.
869 (license (list license:isc license:expat))))
870
871 (define-public python2-netcdf4
872 (package-with-python2 python-netcdf4))
873
874 (define-public python-lockfile
875 (package
876 (name "python-lockfile")
877 (version "0.12.2")
878 (source
879 (origin
880 (method url-fetch)
881 (uri (string-append "https://pypi.python.org/packages/source/l/lockfile/"
882 "lockfile-" version ".tar.gz"))
883 (sha256
884 (base32
885 "16gpx5hm73ah5n1079ng0vy381hl802v606npkx4x8nb0gg05vba"))))
886 (build-system python-build-system)
887 (arguments '(#:test-target "check"))
888 (native-inputs
889 `(("python-pbr" ,python-pbr)))
890 (home-page "https://launchpad.net/pylockfile")
891 (synopsis "Platform-independent file locking module")
892 (description
893 "The lockfile package exports a LockFile class which provides a simple
894 API for locking files.")
895 (license license:expat)))
896
897 (define-public python2-lockfile
898 (package-with-python2 python-lockfile))
899
900 (define-public python-mock
901 (package
902 (name "python-mock")
903 (version "1.0.1")
904 (source
905 (origin
906 (method url-fetch)
907 (uri (pypi-uri "mock" version))
908 (sha256
909 (base32
910 "0kzlsbki6q0awf89rc287f3aj8x431lrajf160a70z0ikhnxsfdq"))))
911 (build-system python-build-system)
912 (arguments '(#:test-target "check"))
913 (home-page "https://github.com/testing-cabal/mock")
914 (synopsis "Python mocking and patching library for testing")
915 (description
916 "Mock is a library for testing in Python. It allows you to replace parts
917 of your system under test with mock objects and make assertions about how they
918 have been used.")
919 (license license:expat)))
920
921 (define-public python2-mock
922 (package-with-python2 python-mock))
923
924
925 (define-public python-setuptools
926 (package
927 (name "python-setuptools")
928 (version "31.0.0")
929 (source
930 (origin
931 (method url-fetch)
932 (uri (pypi-uri "setuptools" version))
933 (sha256
934 (base32
935 "0ypybh4hx3bv4vhg2dc74xpj1g56ggnaffm87k4abhwjwq6wq608"))
936 (modules '((guix build utils)))
937 (snippet
938 '(begin
939 ;; Remove included binaries which are used to build self-extracting
940 ;; installers for Windows.
941 ;; TODO: Find some way to build them ourself so we can include them.
942 (for-each delete-file (find-files "setuptools" "^(cli|gui).*\\.exe$"))
943 #t))))
944 (build-system python-build-system)
945 ;; FIXME: Tests require pytest, which itself relies on setuptools.
946 ;; One could bootstrap with an internal untested setuptools.
947 (arguments
948 `(#:tests? #f))
949 (home-page "https://pypi.python.org/pypi/setuptools")
950 (synopsis
951 "Library designed to facilitate packaging Python projects")
952 (description
953 "Setuptools is a fully-featured, stable library designed to facilitate
954 packaging Python projects, where packaging includes:
955 Python package and module definitions,
956 distribution package metadata,
957 test hooks,
958 project installation,
959 platform-specific details,
960 Python 3 support.")
961 ;; TODO: setuptools now bundles the following libraries:
962 ;; packaging, pyparsing, six and appdirs. How to unbundle?
963 (license (list license:psfl ; setuptools itself
964 license:expat ; six, appdirs, pyparsing
965 license:asl2.0 ; packaging is dual ASL2/BSD-2
966 license:bsd-2))))
967
968 (define-public python2-setuptools
969 (package-with-python2 python-setuptools))
970
971 ;;; Pycrypto is abandoned upstream:
972 ;;;
973 ;;; https://github.com/dlitz/pycrypto/issues/173
974 ;;;
975 ;;; TODO Remove this package from GNU Guix.
976 (define-public python-pycrypto
977 (package
978 (name "python-pycrypto")
979 (version "2.6.1")
980 (source
981 (origin
982 (method url-fetch)
983 (uri (pypi-uri "pycrypto" version))
984 (patches (search-patches "python-pycrypto-CVE-2013-7459.patch"))
985 (sha256
986 (base32
987 "0g0ayql5b9mkjam8hym6zyg6bv77lbh66rv1fyvgqb17kfc1xkpj"))))
988 (build-system python-build-system)
989 (inputs
990 `(("python" ,python)
991 ("gmp" ,gmp)))
992 (arguments
993 `(#:phases
994 (alist-cons-before
995 'build 'set-build-env
996 ;; pycrypto runs an autoconf configure script behind the scenes
997 (lambda _
998 (setenv "CONFIG_SHELL" (which "bash")))
999 %standard-phases)))
1000 (home-page "http://www.pycrypto.org/")
1001 (synopsis "Cryptographic modules for Python")
1002 (description
1003 "Pycrypto is a collection of both secure hash functions (such as SHA256
1004 and RIPEMD160), and various encryption algorithms (AES, DES, RSA, ElGamal,
1005 etc.). The package is structured to make adding new modules easy.")
1006 (license license:public-domain)))
1007
1008 (define-public python2-pycrypto
1009 (let ((pycrypto (package-with-python2 python-pycrypto)))
1010 (package (inherit pycrypto)
1011 (inputs
1012 `(("python" ,python-2)
1013 ,@(alist-delete
1014 "python"
1015 (package-inputs pycrypto)))))))
1016
1017 (define-public python-eventlet
1018 (package
1019 (name "python-eventlet")
1020 (version "0.20.1")
1021 (source
1022 (origin
1023 (method url-fetch)
1024 (uri (pypi-uri "eventlet" version))
1025 (sha256
1026 (base32
1027 "0f3q55mq4n021wb7qa53pz3ix6i2py64sap66vsaqm2scjw83m9s"))))
1028 (build-system python-build-system)
1029 (propagated-inputs
1030 `(("python-greenlet" ,python-greenlet)))
1031 (home-page "http://eventlet.net")
1032 (synopsis "Concurrent networking library for Python")
1033 (description
1034 "Eventlet is a concurrent networking library for Python that
1035 allows you to change how you run your code, not how you write it.
1036 It uses @code{epoll} or @code{libevent} for highly scalable non-blocking I/O.
1037 Coroutines ensure that the developer uses a blocking style of programming
1038 that is similar to threading, but provide the benefits of non-blocking I/O.
1039 The event dispatch is implicit, which means you can easily use @code{Eventlet}
1040 from the Python interpreter, or as a small part of a larger application.")
1041 (license license:expat)))
1042
1043 (define-public python2-eventlet
1044 (let ((base (package-with-python2
1045 (strip-python2-variant python-eventlet))))
1046 (package (inherit base)
1047 (propagated-inputs
1048 `(("python2-enum34" ,python2-enum34)
1049 ,@(package-propagated-inputs base))))))
1050
1051 (define-public python-keyring
1052 (package
1053 (name "python-keyring")
1054 (version "8.7")
1055 (source
1056 (origin
1057 (method url-fetch)
1058 (uri (pypi-uri "keyring" version))
1059 (sha256
1060 (base32
1061 "0482rmi2x6p78wl2kz8qzyq21xz1sbbfwnv5x7dggar4vkwxhzfx"))))
1062 (build-system python-build-system)
1063 (native-inputs
1064 `(("python-setuptools-scm" ,python-setuptools-scm)))
1065 (propagated-inputs
1066 `(("python-pycrypto" ,python-pycrypto)))
1067 (arguments
1068 `(#:tests? #f)) ;TODO: tests require pytest
1069 (home-page "https://github.com/jaraco/keyring")
1070 (synopsis "Store and access your passwords safely")
1071 (description
1072 "The Python keyring lib provides a easy way to access the system keyring
1073 service from python. It can be used in any application that needs safe
1074 password storage.")
1075 ;; "MIT" and PSF dual license
1076 (license license:x11)))
1077
1078 (define-public python2-keyring
1079 (package-with-python2 python-keyring))
1080
1081 (define-public python-six
1082 (package
1083 (name "python-six")
1084 (version "1.10.0")
1085 (source
1086 (origin
1087 (method url-fetch)
1088 (uri (pypi-uri "six" version))
1089 (sha256
1090 (base32
1091 "0snmb8xffb3vsma0z67i0h0w2g2dy0p3gsgh9gi4i0kgc5l8spqh"))))
1092 (build-system python-build-system)
1093 (native-inputs
1094 `(("python-py" ,python-py)
1095 ("python-pytest" ,python-pytest)))
1096 (home-page "http://pypi.python.org/pypi/six/")
1097 (synopsis "Python 2 and 3 compatibility utilities")
1098 (description
1099 "Six is a Python 2 and 3 compatibility library. It provides utility
1100 functions for smoothing over the differences between the Python versions with
1101 the goal of writing Python code that is compatible on both Python versions.
1102 Six supports every Python version since 2.5. It is contained in only one
1103 Python file, so it can be easily copied into your project.")
1104 (license license:x11)))
1105
1106 (define-public python2-six
1107 (package-with-python2 python-six))
1108
1109 (define-public python-dateutil
1110 (package
1111 (name "python-dateutil")
1112 (version "2.6.0")
1113 (source
1114 (origin
1115 (method url-fetch)
1116 (uri (pypi-uri "python-dateutil" version))
1117 (sha256
1118 (base32
1119 "1lhq0hxjc3cfha101q02ld5ijlpfyjn2w1yh7wvpiy367pgzi8k2"))))
1120 (build-system python-build-system)
1121 (propagated-inputs
1122 `(("python-six" ,python-six)))
1123 (home-page "https://dateutil.readthedocs.io/en/stable/")
1124 (synopsis "Extensions to the standard datetime module")
1125 (description
1126 "The dateutil module provides powerful extensions to the standard
1127 datetime module, available in Python 2.3+.")
1128 (license license:bsd-3)))
1129
1130 (define-public python2-dateutil
1131 (package-with-python2 python-dateutil))
1132
1133 (define-public python-parsedatetime
1134 (package
1135 (name "python-parsedatetime")
1136 (version "2.3")
1137 (source
1138 (origin
1139 (method url-fetch)
1140 (uri (pypi-uri "parsedatetime" version))
1141 (sha256
1142 (base32
1143 "1vkrmd398s11h1zn3zaqqsiqhj9lwy1ikcg6irx2lrgjzjg3rjll"))))
1144 (build-system python-build-system)
1145 (native-inputs
1146 `(("python-nose" ,python-nose)
1147 ("python-pyicu" ,python-pyicu)
1148 ("python-pytest" ,python-pytest)
1149 ("python-pytest-runner" ,python-pytest-runner)))
1150 (propagated-inputs
1151 `(("python-future" ,python-future)))
1152 (home-page "https://github.com/bear/parsedatetime/")
1153 (synopsis
1154 "Parse human-readable date/time text")
1155 (description
1156 "Parse human-readable date/time text.")
1157 (license license:asl2.0)))
1158
1159 (define-public python2-parsedatetime
1160 (package-with-python2 python-parsedatetime))
1161
1162 (define-public python-pandas
1163 (package
1164 (name "python-pandas")
1165 (version "0.19.2")
1166 (source
1167 (origin
1168 (method url-fetch)
1169 (uri (pypi-uri "pandas" version))
1170 (sha256
1171 (base32 "0540cnbwy2hc4hv2sxfs8i47xi91qzvzxfn80dl785ibiicly3vg"))
1172 (patches
1173 (search-patches "python-pandas-skip-failing-tests.patch"))))
1174 (build-system python-build-system)
1175 (propagated-inputs
1176 `(("python-numpy" ,python-numpy)
1177 ("python-pytz" ,python-pytz)
1178 ("python-dateutil" ,python-dateutil)))
1179 (native-inputs
1180 `(("python-nose" ,python-nose)
1181 ("python-cython" ,python-cython)))
1182 (home-page "http://pandas.pydata.org")
1183 (synopsis "Data structures for data analysis, time series, and statistics")
1184 (description
1185 "Pandas is a Python package providing fast, flexible, and expressive data
1186 structures designed to make working with structured (tabular,
1187 multidimensional, potentially heterogeneous) and time series data both easy
1188 and intuitive. It aims to be the fundamental high-level building block for
1189 doing practical, real world data analysis in Python.")
1190 (license license:bsd-3)))
1191
1192 (define-public python2-pandas
1193 (package-with-python2 python-pandas))
1194
1195 (define-public python-tzlocal
1196 (package
1197 (name "python-tzlocal")
1198 (version "1.2.2")
1199 (source
1200 (origin
1201 (method url-fetch)
1202 (uri (pypi-uri "tzlocal" version))
1203 (sha256
1204 (base32
1205 "0paj7vlsb0np8b5sp4bv64wxv7qk2piyp7xg29pkhdjwsbls9fnb"))))
1206 (build-system python-build-system)
1207 (propagated-inputs
1208 `(("python-pytz" ,python-pytz)))
1209 (home-page "https://github.com/regebro/tzlocal")
1210 (synopsis
1211 "Local timezone information for Python")
1212 (description
1213 "Tzlocal returns a tzinfo object with the local timezone information.
1214 This module attempts to fix a glaring hole in pytz, that there is no way to
1215 get the local timezone information, unless you know the zoneinfo name, and
1216 under several distributions that's hard or impossible to figure out.")
1217 (license license:cc0)))
1218
1219 (define-public python2-pysqlite
1220 (package
1221 (name "python2-pysqlite")
1222 (version "2.8.3")
1223 (source
1224 (origin
1225 (method url-fetch)
1226 (uri (pypi-uri "pysqlite" version))
1227 (sha256
1228 (base32
1229 "1424gwq9sil2ffmnizk60q36vydkv8rxs6m7xs987kz8cdc37lqp"))))
1230 (build-system python-build-system)
1231 (inputs
1232 `(("sqlite" ,sqlite)))
1233 (arguments
1234 `(#:python ,python-2 ; incompatible with Python 3
1235 #:tests? #f)) ; no test target
1236 (home-page "https://github.com/ghaering/pysqlite")
1237 (synopsis "SQLite bindings for Python")
1238 (description
1239 "Pysqlite provides SQLite bindings for Python that comply to the
1240 Database API 2.0T.")
1241 (license license:zlib)))
1242
1243
1244 (define-public python2-mechanize
1245 (package
1246 (name "python2-mechanize")
1247 (version "0.2.5")
1248 (source
1249 (origin
1250 (method url-fetch)
1251 (uri (string-append "https://pypi.python.org/packages/source/m/mechanize/mechanize-"
1252 version ".tar.gz"))
1253 (sha256
1254 (base32
1255 "0rj7r166i1dyrq0ihm5rijfmvhs8a04im28lv05c0c3v206v4rrf"))))
1256 (build-system python-build-system)
1257 (arguments
1258 `(#:python ,python-2 ; apparently incompatible with Python 3
1259 #:tests? #f))
1260 ;; test fails with message
1261 ;; AttributeError: 'module' object has no attribute 'test_pullparser'
1262 ;; (python-3.3.2) or
1263 ;; AttributeError: 'module' object has no attribute 'test_urllib2_localnet'
1264 ;; (python-2.7.5).
1265 ;; The source code is from March 2011 and probably not up-to-date
1266 ;; with respect to python unit tests.
1267 (home-page "http://wwwsearch.sourceforge.net/mechanize/")
1268 (synopsis
1269 "Stateful programmatic web browsing in Python")
1270 (description
1271 "Mechanize implements stateful programmatic web browsing in Python,
1272 after Andy Lester’s Perl module WWW::Mechanize.")
1273 (license (license:non-copyleft
1274 "file://COPYING"
1275 "See COPYING in the distribution."))))
1276
1277
1278 (define-public python-simplejson
1279 (package
1280 (name "python-simplejson")
1281 (version "3.10.0")
1282 (source
1283 (origin
1284 (method url-fetch)
1285 (uri (pypi-uri "simplejson" version))
1286 (sha256
1287 (base32
1288 "1qhwsykjlb85igb4cfl6v6gkprzbbg8gyqdd7zscc8w3x0ifcfwm"))))
1289 (build-system python-build-system)
1290 (home-page "http://simplejson.readthedocs.org/en/latest/")
1291 (synopsis
1292 "Json library for Python")
1293 (description
1294 "JSON (JavaScript Object Notation) is a subset of JavaScript
1295 syntax (ECMA-262 3rd edition) used as a lightweight data interchange
1296 format.
1297
1298 Simplejson exposes an API familiar to users of the standard library marshal
1299 and pickle modules. It is the externally maintained version of the json
1300 library contained in Python 2.6, but maintains compatibility with Python 2.5
1301 and (currently) has significant performance advantages, even without using
1302 the optional C extension for speedups. Simplejson is also supported on
1303 Python 3.3+.")
1304 (license license:x11)))
1305
1306 (define-public python2-simplejson
1307 (package-with-python2 python-simplejson))
1308
1309
1310 (define-public python-pyicu
1311 (package
1312 (name "python-pyicu")
1313 (version "1.9.5")
1314 (source
1315 (origin
1316 (method url-fetch)
1317 (uri (pypi-uri "PyICU" version))
1318 (sha256
1319 (base32
1320 "16rmxy9y0qhqqna2v49i7nzwm09as699rbyvh4raw7w602w55c3k"))))
1321 (build-system python-build-system)
1322 (arguments
1323 '(#:phases
1324 (modify-phases %standard-phases
1325 (add-before 'check 'delete-failing-test
1326 (lambda _
1327 ;; XXX: These tests require locales that are unavailable
1328 ;; in the build environment.
1329 (delete-file "test/test_DateTimeParserGenerator.py")
1330 #t)))))
1331 (inputs
1332 `(("icu4c" ,icu4c)))
1333 (home-page "http://pyicu.osafoundation.org/")
1334 (synopsis "Python extension wrapping the ICU C++ API")
1335 (description
1336 "PyICU is a python extension wrapping the ICU C++ API.")
1337 (license license:x11)))
1338
1339 (define-public python2-pyicu
1340 (package-with-python2 python-pyicu))
1341
1342 (define-public python2-dogtail
1343 ;; Python 2 only, as it leads to "TabError: inconsistent use of tabs and
1344 ;; spaces in indentation" with Python 3.
1345 (package
1346 (name "python2-dogtail")
1347 (version "0.9.9")
1348 (source (origin
1349 (method url-fetch)
1350 (uri (pypi-uri "dogtail" version))
1351 (sha256
1352 (base32
1353 "0p5wfssvzr9w0bvhllzbbd8fnp4cca2qxcpcsc33dchrmh5n552x"))))
1354 (build-system python-build-system)
1355 (arguments `(#:python ,python-2
1356 #:tests? #f)) ; invalid command "test"
1357 ;; Currently no offical homepage.
1358 (home-page "https://pypi.python.org/pypi/dogtail/")
1359 (synopsis "GUI test tool and automation framework written in Python")
1360 (description
1361 "Dogtail is a GUI test tool and automation framework written in Python.
1362 It uses Accessibility (a11y) technologies to communicate with desktop
1363 applications. dogtail scripts are written in Python and executed like any
1364 other Python program.")
1365 (license license:gpl2+)))
1366
1367 (define-public python2-empy
1368 (package
1369 (name "python2-empy")
1370 (version "3.3")
1371 (source (origin
1372 (method url-fetch)
1373 (uri (string-append "http://www.alcyone.com/software/empy/empy-"
1374 version ".tar.gz"))
1375 (sha256
1376 (base32
1377 "01g8mmkfnvjdmlhsihwyx56lrg7r5m5d2fg6mnxsvy6g0dnl69f6"))))
1378 (build-system python-build-system)
1379 (arguments
1380 `(#:python ,python-2
1381 #:phases (alist-replace
1382 'check
1383 (lambda _
1384 (zero? (system* "./test.sh")))
1385 %standard-phases)))
1386 (home-page "http://www.alcyone.com/software/empy/")
1387 (synopsis "Templating system for Python")
1388 (description
1389 "EmPy is a system for embedding Python expressions and statements in
1390 template text; it takes an EmPy source file, processes it, and produces
1391 output. This is accomplished via expansions, which are special signals to the
1392 EmPy system and are set off by a special prefix (by default the at sign, @@).
1393 EmPy can expand arbitrary Python expressions and statements in this way, as
1394 well as a variety of special forms. Textual data not explicitly delimited in
1395 this way is sent unaffected to the output, allowing Python to be used in
1396 effect as a markup language. Also supported are callbacks via hooks,
1397 recording and playback via diversions, and dynamic, chainable filters. The
1398 system is highly configurable via command line options and embedded
1399 commands.")
1400 (license license:lgpl2.1+)))
1401
1402 (define-public python2-element-tree
1403 (package
1404 (name "python2-element-tree")
1405 (version "1.2.6")
1406 (source (origin
1407 (method url-fetch)
1408 (uri (string-append
1409 "http://effbot.org/media/downloads/elementtree-"
1410 version "-20050316.tar.gz"))
1411 (sha256
1412 (base32
1413 "016bphqnlg0l4vslahhw4r0aanw95bpypy65r1i1acyb2wj5z7dj"))))
1414 (build-system python-build-system)
1415 (arguments
1416 `(#:python ,python-2 ; seems to be part of Python 3
1417 #:tests? #f)) ; no 'test' sub-command
1418 (synopsis "Toolkit for XML processing in Python")
1419 (description
1420 "ElementTree is a Python library supporting lightweight XML processing.")
1421 (home-page "http://effbot.org/zone/element-index.htm")
1422 (license (license:x11-style
1423 "http://docs.python.org/2/license.html"
1424 "Like \"CWI LICENSE AGREEMENT FOR PYTHON 0.9.0 THROUGH 1.2\"."))))
1425
1426 (define-public python2-pybugz
1427 (package
1428 (name "python2-pybugz")
1429 (version "0.6.11")
1430 (source (origin
1431 (method url-fetch)
1432 (uri (string-append
1433 "http://bits.liquidx.net/projects/pybugz/pybugz-"
1434 version ".tar.gz"))
1435 (sha256
1436 (base32
1437 "17ni00p08gp5lkxlrrcnvi3x09fmajnlbz4da03qcgl9q21ym4jd"))
1438 (patches (search-patches "pybugz-stty.patch"
1439 "pybugz-encode-error.patch"))))
1440 (build-system python-build-system)
1441 (arguments
1442 `(#:python ,python-2 ; SyntaxError with Python 3
1443 #:tests? #f)) ; no 'test' sub-command
1444 (propagated-inputs
1445 `(("element-tree" ,python2-element-tree)))
1446 (synopsis "Python and command-line interface to Bugzilla")
1447 (description
1448 "PyBugz is a Python library and command-line tool to query the Bugzilla
1449 bug tracking system. It is meant as an aid to speed up interaction with the
1450 bug tracker.")
1451 (home-page "http://www.liquidx.net/pybugz/")
1452 (license license:gpl2)))
1453
1454 (define-public python-enum34
1455 (package
1456 (name "python-enum34")
1457 (version "1.1.6")
1458 (source
1459 (origin
1460 (method url-fetch)
1461 (uri (pypi-uri "enum34" version))
1462 (sha256
1463 (base32
1464 "1cgm5ng2gcfrkrm3hc22brl6chdmv67b9zvva9sfs7gn7dwc9n4a"))))
1465 (build-system python-build-system)
1466 (home-page "https://pypi.python.org/pypi/enum34")
1467 (synopsis "Backported Python 3.4 Enum")
1468 (description
1469 "Enum34 is the new Python stdlib enum module available in Python 3.4
1470 backported for previous versions of Python from 2.4 to 3.3.")
1471 (license license:bsd-3)))
1472
1473 (define-public python2-enum34
1474 (package-with-python2 python-enum34))
1475
1476 (define-public python-parse-type
1477 (package
1478 (name "python-parse-type")
1479 (version "0.3.4")
1480 (source
1481 (origin
1482 (method url-fetch)
1483 (uri (string-append "https://pypi.python.org/packages/source/p/"
1484 "parse_type/parse_type-" version ".tar.gz"))
1485 (sha256
1486 (base32
1487 "0iv1c34npr4iynwpgv1vkjx9rjd18a85ir8c01gc5f7wp8iv7l1x"))))
1488 (build-system python-build-system)
1489 (arguments
1490 `(#:phases
1491 (modify-phases %standard-phases
1492 (add-after 'unpack 'patch-tests
1493 (lambda _
1494 (substitute* "tests/test_parse_type_parse.py"
1495 ;; Newer Python versions don't have the problem this test tests.
1496 (("self[.]assertRaises[(]parse.TooManyFields, p.parse, ''[)]")
1497 ""))
1498 #t)))))
1499 (propagated-inputs
1500 `(("python-six" ,python-six)
1501 ("python-parse" ,python-parse)))
1502 (native-inputs
1503 `(("python-pytest" ,python-pytest)
1504 ("python-pytest-runner" ,python-pytest-runner)))
1505 (home-page "https://github.com/jenisys/parse_type")
1506 (synopsis "Extended parse module")
1507 (description
1508 "Parse_type extends the python parse module.")
1509 (properties
1510 `((python2-variant . ,(delay python2-parse-type))))
1511 (license license:bsd-3)))
1512
1513 (define-public python2-parse-type
1514 (let ((base (package-with-python2
1515 (strip-python2-variant python-parse-type))))
1516 (package (inherit base)
1517 (propagated-inputs
1518 `(("python2-enum34" ,python2-enum34)
1519 ,@(package-propagated-inputs base))))))
1520
1521 (define-public python-parse
1522 (package
1523 (name "python-parse")
1524 (version "1.6.6")
1525 (source
1526 (origin
1527 (method url-fetch)
1528 (uri (pypi-uri "parse" version))
1529 (sha256
1530 (base32
1531 "0y31i3mwgv35qn0kzzjn9q8jqfdqmbi6sr6yfvn8rq4lqjm5lhvi"))
1532 (patches (search-patches "python-parse-too-many-fields.patch"))))
1533 (build-system python-build-system)
1534 (arguments
1535 `(#:phases
1536 (modify-phases %standard-phases
1537 (replace 'check
1538 (lambda _ (zero? (system* "python" "test_parse.py")))))))
1539 (home-page "https://github.com/r1chardj0n3s/parse")
1540 (synopsis "Parse strings")
1541 (description
1542 "Parse strings using a specification based on the Python format()
1543 syntax.")
1544 (license license:x11)))
1545
1546 (define-public python-polib
1547 (package
1548 (name "python-polib")
1549 (version "1.0.8")
1550 (source (origin
1551 (method url-fetch)
1552 (uri (pypi-uri "polib" version))
1553 (sha256
1554 (base32
1555 "1pq2hbm3m2q0cjdszk8mc4qa1vl3wcblh5nfyirlfnzb2pcy7zss"))))
1556 (build-system python-build-system)
1557 (home-page "https://bitbucket.org/izi/polib/wiki/Home")
1558 (synopsis "Manipulate, create and modify gettext files")
1559 (description "Polib can manipulate any gettext format (po, pot and mo)
1560 files. It can be used to create po files from scratch or to modify
1561 existing ones.")
1562 (license license:expat)))
1563
1564 (define-public python2-polib
1565 (let ((base (package-with-python2 (strip-python2-variant python-polib))))
1566 (package
1567 (inherit base)
1568 (arguments `(,@(package-arguments base)
1569 ;; Tests don't work with python2.
1570 #:tests? #f)))))
1571
1572 (define-public scons
1573 (package
1574 (name "scons")
1575 (version "2.5.1")
1576 (source (origin
1577 (method url-fetch)
1578 (uri (string-append "mirror://sourceforge/scons/scons/" version
1579 "/scons-" version ".tar.gz"))
1580 (sha256
1581 (base32
1582 "1wji1z9jdkhnmm99apx6fhld9cs52rr56aigniyrcsmlwy52298b"))))
1583 (build-system python-build-system)
1584 (arguments
1585 ;; With Python 3.x, fails to build with a syntax error.
1586 `(#:python ,python-2
1587 #:use-setuptools? #f ; still relies on distutils
1588 #:tests? #f)) ; no 'python setup.py test' command
1589 (home-page "http://scons.org/")
1590 (synopsis "Software construction tool written in Python")
1591 (description
1592 "SCons is a software construction tool. Think of SCons as an improved,
1593 cross-platform substitute for the classic Make utility with integrated
1594 functionality similar to autoconf/automake and compiler caches such as ccache.
1595 In short, SCons is an easier, more reliable and faster way to build
1596 software.")
1597 (license license:x11)))
1598
1599 (define-public python-extras
1600 (package
1601 (name "python-extras")
1602 (version "0.0.3")
1603 (source
1604 (origin
1605 (method url-fetch)
1606 (uri (string-append
1607 "https://pypi.python.org/packages/source/e/extras/extras-"
1608 version ".tar.gz"))
1609 (sha256
1610 (base32
1611 "1h7zx4dfyclalg0fqnfjijpn0f793a9mx8sy3b27gd31nr6dhq3s"))))
1612 (build-system python-build-system)
1613 (arguments
1614 ;; error in setup.cfg: command 'test' has no such option 'buffer'
1615 '(#:tests? #f))
1616 (home-page "https://github.com/testing-cabal/extras")
1617 (synopsis "Useful extensions to the Python standard library")
1618 (description
1619 "Extras is a set of extensions to the Python standard library.")
1620 (license license:expat)))
1621
1622 (define-public python2-extras
1623 (package-with-python2 python-extras))
1624
1625 (define-public python-mimeparse
1626 (package
1627 (name "python-mimeparse")
1628 (version "0.1.4")
1629 (source
1630 (origin
1631 (method url-fetch)
1632 (uri (string-append
1633 "https://pypi.python.org/packages/source/p/python-mimeparse/python-mimeparse-"
1634 version ".tar.gz"))
1635 (sha256
1636 (base32
1637 "1hyxg09kaj02ri0rmwjqi86wk4nd1akvv7n0dx77azz76wga4s9w"))))
1638 (build-system python-build-system)
1639 (arguments
1640 '(#:tests? #f)) ; no setup.py test command
1641 (home-page
1642 "https://github.com/dbtsai/python-mimeparse")
1643 (synopsis "Python library for parsing MIME types")
1644 (description
1645 "Mimeparse provides basic functions for parsing MIME type names and
1646 matching them against a list of media-ranges.")
1647 (license license:expat)))
1648
1649 (define-public python2-mimeparse
1650 (package-with-python2 python-mimeparse))
1651
1652 (define-public python-nose
1653 (package
1654 (name "python-nose")
1655 (version "1.3.7")
1656 (source
1657 (origin
1658 (method url-fetch)
1659 (uri (pypi-uri "nose" version))
1660 (sha256
1661 (base32
1662 "164a43k7k2wsqqk1s6vavcdamvss4mz0vd6pwzv2h9n8rgwzxgzi"))))
1663 (build-system python-build-system)
1664 (arguments
1665 '(#:tests? #f)) ; FIXME: test suite fails
1666 (home-page "http://readthedocs.org/docs/nose/")
1667 (synopsis "Python testing library")
1668 (description
1669 "Nose extends the unittest library to make testing easier.")
1670 (license license:lgpl2.0+)))
1671
1672 (define-public python2-nose
1673 (package-with-python2 python-nose))
1674
1675 (define-public python-nose2
1676 (package
1677 (name "python-nose2")
1678 (version "0.6.5")
1679 (source
1680 (origin
1681 (method url-fetch)
1682 (uri (pypi-uri "nose2" version))
1683 (sha256
1684 (base32
1685 "1x4zjq1zlyrh8b9ba0cmafd3w94pxhid408kibyjd3s6h1lap6s7"))))
1686 (build-system python-build-system)
1687 (arguments `(#:tests? #f)) ; 'module' object has no attribute 'collector'
1688 (propagated-inputs
1689 `(("python-cov-core" ,python-cov-core)
1690 ("python-pytest-cov" ,python-pytest-cov)
1691 ("python-six" ,python-six)))
1692 (home-page "https://github.com/nose-devs/nose2")
1693 (synopsis "Next generation of nicer testing for Python")
1694 (description
1695 "Nose2 is the next generation of nicer testing for Python, based on the
1696 plugins branch of unittest2. Nose2 aims to improve on nose by providing a
1697 better plugin api, being easier for users to configure, and simplifying internal
1698 interfaces and processes.")
1699 (license license:bsd-2)))
1700
1701 (define-public python2-nose2
1702 (package-with-python2 python-nose2))
1703
1704 (define-public python-unittest2
1705 (package
1706 (name "python-unittest2")
1707 (version "0.5.1")
1708 (source
1709 (origin
1710 (method url-fetch)
1711 (uri (string-append
1712 "https://pypi.python.org/packages/source/u/unittest2py3k/unittest2py3k-"
1713 version ".tar.gz"))
1714 (sha256
1715 (base32
1716 "00yl6lskygcrddx5zspkhr0ibgvpknl4678kkm6s626539grq93q"))))
1717 (build-system python-build-system)
1718 (home-page "http://pypi.python.org/pypi/unittest2")
1719 (synopsis "Python unit testing library")
1720 (description
1721 "Unittest2 is a replacement for the unittest module in the Python
1722 standard library.")
1723 (license license:psfl)))
1724
1725 (define-public python2-unittest2
1726 (package (inherit python-unittest2)
1727 (name "python2-unittest2")
1728 (version "0.5.1")
1729 (source
1730 (origin
1731 (method url-fetch)
1732 (uri (string-append
1733 "https://pypi.python.org/packages/source/u/unittest2/unittest2-"
1734 version ".tar.gz"))
1735 (sha256
1736 (base32
1737 "0wbs4i4x3x7klr3v35ss6p9mcqz883i1xgcpkhvl7n2lyv6yhpda"))))
1738 (arguments
1739 `(#:python ,python-2
1740 #:tests? #f)))) ; no setup.py test command
1741
1742 (define-public python-pafy
1743 (package
1744 (name "python-pafy")
1745 (version "0.5.3.1")
1746 (source
1747 (origin
1748 (method url-fetch)
1749 (uri (pypi-uri "pafy" version))
1750 (sha256
1751 (base32
1752 "1a7dxi95m1043rxx1r5x3ngb66nwlq6aqcasyqqjzmmmjps4zrim"))))
1753 (build-system python-build-system)
1754 (arguments
1755 `(#:tests? #f)) ; Currently pafy can not find itself in the tests
1756 (propagated-inputs
1757 ;; Youtube-dl is a python package which is imported in the file
1758 ;; "backend_youtube_dl.py", therefore it needs to be propagated.
1759 `(("youtube-dl" ,youtube-dl)))
1760 (home-page "https://np1.github.io/pafy/")
1761 (synopsis "Retrieve YouTube content and metadata")
1762 (description
1763 "@code{pafy} is a python library to retrieve YouTube content and metadata.")
1764 (license license:lgpl3+)))
1765
1766 (define-public python-py
1767 (package
1768 (name "python-py")
1769 (version "1.4.32")
1770 (source
1771 (origin
1772 (method url-fetch)
1773 (uri (pypi-uri "py" version))
1774 (sha256
1775 (base32
1776 "19s1pql9pq85h1qzsdwgyb8a3k1qgkvh33b02m8kfqhizz8rzf64"))))
1777 (build-system python-build-system)
1778 (arguments
1779 ;; FIXME: "ImportError: 'test' module incorrectly imported from
1780 ;; '/gnu/store/...-python-pytest-mimimal-3.0.5/lib/python3.5/site-packages'.
1781 ;; Expected '/tmp/guix-build-python-py-1.4.31.drv-0/py-1.4.31/py'.
1782 ;; Is this module globally installed?"
1783 '(#:tests? #f))
1784 (home-page "http://pylib.readthedocs.org/")
1785 (synopsis "Python library for parsing, I/O, instrospection, and logging")
1786 (description
1787 "Py is a Python library for file name parsing, .ini file parsing, I/O,
1788 code introspection, and logging.")
1789 (license license:expat)))
1790
1791 (define-public python2-py
1792 (package-with-python2 python-py))
1793
1794 (define-public python-pytest
1795 (package
1796 (name "python-pytest")
1797 (version "2.7.3")
1798 (source
1799 (origin
1800 (method url-fetch)
1801 (uri (string-append
1802 "https://pypi.python.org/packages/source/p/pytest/pytest-"
1803 version ".tar.gz"))
1804 (sha256
1805 (base32
1806 "1z4yi986f9n0p8qmzmn21m21m8j1x78hk3505f89baqm6pdw7afm"))
1807 (modules '((guix build utils)))
1808 (snippet
1809 ;; One of the tests involves the /usr directory, so it fails.
1810 '(substitute* "testing/test_argcomplete.py"
1811 (("def test_remove_dir_prefix\\(self\\):")
1812 "@pytest.mark.xfail\n def test_remove_dir_prefix(self):")))))
1813 (build-system python-build-system)
1814 (propagated-inputs
1815 `(("python-py" ,python-py)))
1816 (native-inputs
1817 `(("python-nose" ,python-nose)
1818 ("python-mock" ,python-mock)))
1819 (home-page "http://pytest.org")
1820 (synopsis "Python testing library")
1821 (description
1822 "Pytest is a testing tool that provides auto-discovery of test modules
1823 and functions, detailed info on failing assert statements, modular fixtures,
1824 and many external plugins.")
1825 (license license:expat)))
1826
1827 (define-public python2-pytest
1828 (package-with-python2 python-pytest))
1829
1830 ;; Some packages require a newer pytest.
1831 (define-public python-pytest-3.0
1832 (package
1833 (inherit python-pytest)
1834 (name "python-pytest")
1835 (version "3.0.7")
1836 (source (origin
1837 (method url-fetch)
1838 (uri (pypi-uri "pytest" version))
1839 (sha256
1840 (base32
1841 "1asc4b2nd2a4f0g3r12y97rslq5wliji7b73wwkvdrm5s7mrc1mp"))))
1842 (arguments
1843 `(#:phases
1844 (modify-phases %standard-phases
1845 (add-before 'check 'disable-invalid-test
1846 (lambda _
1847 (substitute* "testing/test_argcomplete.py"
1848 (("def test_remove_dir_prefix" line)
1849 (string-append "@pytest.mark.skip"
1850 "(reason=\"Assumes that /usr exists.\")\n "
1851 line)))
1852 #t)))))
1853 (native-inputs
1854 `(("python-nose" ,python-nose)
1855 ("python-mock" ,python-mock)
1856 ("python-hypothesis" ,python-hypothesis)))
1857 (properties `((python2-variant . ,(delay python2-pytest-3.0))))))
1858
1859 (define-public python2-pytest-3.0
1860 (let ((base (package-with-python2
1861 (strip-python2-variant python-pytest-3.0))))
1862 (package (inherit base)
1863 (native-inputs
1864 `(("python2-enum34" ,python2-enum34)
1865 ,@(package-native-inputs base))))))
1866
1867 (define-public python-pytest-cov
1868 (package
1869 (name "python-pytest-cov")
1870 (version "2.4.0")
1871 (source
1872 (origin
1873 (method url-fetch)
1874 (uri (pypi-uri "pytest-cov" version))
1875 (sha256
1876 (base32
1877 "03c2qc42r4bczyw93gd7n0qi1h1jfhw7fnbhi33c3vp1hs81gm2k"))))
1878 (build-system python-build-system)
1879 (arguments
1880 `(#:phases
1881 (modify-phases %standard-phases
1882 (replace 'check
1883 (lambda _
1884 ;; options taken from tox.ini
1885 ;; TODO: make "--restructuredtext" tests pass. They currently fail
1886 ;; with "Duplicate implicit target name"
1887 (zero? (system* "python" "./setup.py" "check"
1888 "--strict" "--metadata")))))))
1889 (propagated-inputs
1890 `(("python-coverage" ,python-coverage)
1891 ("python-pytest" ,python-pytest)))
1892 (home-page "https://github.com/pytest-dev/pytest-cov")
1893 (synopsis "Pytest plugin for measuring coverage")
1894 (description
1895 "Pytest-cov produces coverage reports. It supports centralised testing and
1896 distributed testing in both @code{load} and @code{each} modes. It also
1897 supports coverage of subprocesses.")
1898 (license license:expat)))
1899
1900 (define-public python2-pytest-cov
1901 (package-with-python2 python-pytest-cov))
1902
1903 (define-public python-pytest-runner
1904 (package
1905 (name "python-pytest-runner")
1906 (version "2.11.1")
1907 (source
1908 (origin
1909 (method url-fetch)
1910 (uri (pypi-uri "pytest-runner" version))
1911 (sha256
1912 (base32
1913 "1cw978kqqcq916b9gfns1qjqvg33c5ail5jhw9054dsynkm32flq"))))
1914 (build-system python-build-system)
1915 (arguments
1916 `(#:phases
1917 (modify-phases %standard-phases
1918 ;; The fancy way of setting the version with setuptools_scm does not
1919 ;; seem to work here.
1920 (add-after 'unpack 'set-version
1921 (lambda _
1922 (substitute* "docs/conf.py"
1923 (("version = setuptools_scm\\.get_version\\(root='\\.\\.')")
1924 (string-append "version = \"" ,version "\"")))
1925 #t)))))
1926 (native-inputs
1927 `(("python-pytest" ,python-pytest)
1928 ("python-setuptools-scm" ,python-setuptools-scm)))
1929 (home-page "https://github.com/pytest-dev/pytest-runner")
1930 (synopsis "Invoke py.test as a distutils command")
1931 (description
1932 "This package provides a @command{pytest-runner} command that
1933 @file{setup.py} files can use to run tests.")
1934 (license license:expat)))
1935
1936 (define-public python2-pytest-runner
1937 (package-with-python2 python-pytest-runner))
1938
1939 (define-public python-pytest-mock
1940 (package
1941 (name "python-pytest-mock")
1942 (version "1.2")
1943 (source
1944 (origin
1945 (method url-fetch)
1946 (uri (pypi-uri "pytest-mock" version ".zip"))
1947 (sha256
1948 (base32
1949 "03zxar5drzm7ksqyrwypjaza3cri6wqvpr6iam92djvg6znp32gp"))))
1950 (build-system python-build-system)
1951 (native-inputs
1952 `(("unzip" ,unzip)))
1953 (propagated-inputs
1954 `(("python-pytest" ,python-pytest)))
1955 (home-page "https://github.com/pytest-dev/pytest-mock/")
1956 (synopsis "Thin-wrapper around the mock package for easier use with py.test")
1957 (description
1958 "This plugin installs a @code{mocker} fixture which is a thin-wrapper
1959 around the patching API provided by the @code{mock} package, but with the
1960 benefit of not having to worry about undoing patches at the end of a test.
1961 The mocker fixture has the same API as @code{mock.patch}, supporting the
1962 same arguments.")
1963 (properties `((python2-variant . ,(delay python2-pytest-mock))))
1964 (license license:expat)))
1965
1966 (define-public python2-pytest-mock
1967 (let ((base (package-with-python2
1968 (strip-python2-variant python-pytest-mock))))
1969 (package (inherit base)
1970 (propagated-inputs
1971 `(("python2-mock" ,python2-mock)
1972 ,@(package-propagated-inputs base))))))
1973
1974 (define-public python-pytest-xdist
1975 (package
1976 (name "python-pytest-xdist")
1977 (version "1.14")
1978 (source
1979 (origin
1980 (method url-fetch)
1981 (uri (pypi-uri "pytest-xdist" version ".zip"))
1982 (sha256
1983 (base32
1984 "08rn2l39ds60xshs4js787l84pfckksqklfq2wq9x8ig2aci2pja"))
1985 (modules '((guix build utils)))
1986 (snippet
1987 '(begin
1988 ;; Remove pre-compiled .pyc files from source.
1989 (for-each delete-file-recursively
1990 (find-files "." "__pycache__" #:directories? #t))
1991 (for-each delete-file (find-files "." "\\.pyc$"))
1992 #t))))
1993 (build-system python-build-system)
1994 (arguments
1995 '(#:tests? #f)) ;FIXME: Some tests are failing.
1996 ;; #:phases
1997 ;; (modify-phases %standard-phases
1998 ;; (delete 'check)
1999 ;; (add-after 'install 'check
2000 ;; (lambda* (#:key inputs outputs #:allow-other-keys)
2001 ;; (add-installed-pythonpath inputs outputs)
2002 ;; (zero? (system* "py.test" "-v")))))
2003 (native-inputs
2004 `(("unzip" ,unzip)
2005 ("python-setuptools-scm" ,python-setuptools-scm)))
2006 (propagated-inputs
2007 `(("python-execnet" ,python-execnet)
2008 ("python-pytest" ,python-pytest)
2009 ("python-py" ,python-py)))
2010 (home-page
2011 "https://github.com/pytest-dev/pytest-xdist")
2012 (synopsis
2013 "Plugin for py.test with distributed testing and loop-on-failing modes")
2014 (description
2015 "The pytest-xdist plugin extends py.test with some unique test execution
2016 modes: parallelization, running tests in boxed subprocesses, the ability
2017 to run tests repeatedly when failed, and the ability to run tests on multiple
2018 Python interpreters or platforms. It uses rsync to copy the existing
2019 program code to a remote location, executes there, and then syncs the
2020 result back.")
2021 (license license:expat)))
2022
2023 (define-public python2-pytest-xdist
2024 (package-with-python2 python-pytest-xdist))
2025
2026 (define-public python-scripttest
2027 (package
2028 (name "python-scripttest")
2029 (version "1.3")
2030 (source
2031 (origin
2032 (method url-fetch)
2033 (uri (string-append
2034 "https://pypi.python.org/packages/source/s/scripttest/scripttest-"
2035 version ".tar.gz"))
2036 (sha256
2037 (base32
2038 "0f4w84k8ck82syys7yg9maz93mqzc8p5ymis941x034v44jzq74m"))))
2039 (build-system python-build-system)
2040 (native-inputs
2041 `(("python-pytest" ,python-pytest)))
2042 (home-page "http://pythonpaste.org/scripttest/")
2043 (synopsis "Python library to test command-line scripts")
2044 (description "Scripttest is a Python helper library for testing
2045 interactive command-line applications. With it you can run a script in a
2046 subprocess and see the output as well as any file modifications.")
2047 (license license:expat)))
2048
2049 (define-public python2-scripttest
2050 (package-with-python2 python-scripttest))
2051
2052 (define-public python-testtools
2053 (package
2054 (name "python-testtools")
2055 (version "1.4.0")
2056 (source
2057 (origin
2058 (method url-fetch)
2059 (uri (pypi-uri "testtools" version))
2060 (sha256
2061 (base32
2062 "1vw8yljnd75d396hhw6s2hrf4cclzy845ifd5am0lxsl235z3i8c"))))
2063 (build-system python-build-system)
2064 (arguments
2065 `(#:phases
2066 (modify-phases %standard-phases
2067 (add-after 'unpack 'fix-module-imports
2068 (lambda _
2069 (substitute* "setup.py"
2070 (("'unittest2>=0.8.0',") ""))
2071 (substitute* '("testtools/testcase.py"
2072 "testtools/testsuite.py"
2073 "testtools/run.py"
2074 "testtools/tests/test_run.py"
2075 "testtools/tests/test_testsuite.py"
2076 "testtools/tests/test_deferredruntest.py")
2077 ;; unittest2 is a backport of Python2.7 features to Python 2.4.
2078 (("import unittest2 as unittest") "import unittest")
2079 (("import unittest2") "import unittest as unittest2")
2080 (("from unittest2 import") "from unittest import"))
2081 (substitute* "testtools/tests/test_testresult.py"
2082 ;; NUL in source code is not allowed (raises ValueError).
2083 (("\\x00\\x04") "\\x04"))
2084 #t)))))
2085 (propagated-inputs
2086 `(("python-mimeparse" ,python-mimeparse)
2087 ("python-extras" ,python-extras)))
2088 (home-page "https://github.com/testing-cabal/testtools")
2089 (synopsis
2090 "Extensions to the Python standard library unit testing framework")
2091 (description
2092 "Testtools extends the Python standard library unit testing framework to
2093 provide matchers, more debugging information, and cross-Python
2094 compatibility.")
2095 (license license:psfl)))
2096
2097 (define-public python2-testtools
2098 (package-with-python2 python-testtools))
2099
2100 (define-public python-testscenarios
2101 (package
2102 (name "python-testscenarios")
2103 (version "0.4")
2104 (source
2105 (origin
2106 (method url-fetch)
2107 (uri (string-append
2108 "https://pypi.python.org/packages/source/t/testscenarios/testscenarios-"
2109 version ".tar.gz"))
2110 (sha256
2111 (base32
2112 "1671jvrvqlmbnc42j7pc5y6vc37q44aiwrq0zic652pxyy2fxvjg"))))
2113 (build-system python-build-system)
2114 (propagated-inputs
2115 `(("python-testtools" ,python-testtools)))
2116 (home-page "https://launchpad.net/testscenarios")
2117 (synopsis "Pyunit extension for dependency injection")
2118 (description
2119 "Testscenarios provides clean dependency injection for Python unittest
2120 style tests.")
2121 (license (list license:bsd-3 license:asl2.0)))) ; at the user's option
2122
2123 (define-public python2-testscenarios
2124 (package-with-python2 python-testscenarios))
2125
2126 (define-public python-testresources
2127 (package
2128 (name "python-testresources")
2129 (version "0.2.7")
2130 (source
2131 (origin
2132 (method url-fetch)
2133 (uri (string-append
2134 "https://pypi.python.org/packages/source/t/testresources/testresources-"
2135 version ".tar.gz"))
2136 (sha256
2137 (base32
2138 "0cbj3plbllyz42c4b5xxgwaa7mml54lakslrn4kkhinxhdri22md"))))
2139 (build-system python-build-system)
2140 (home-page "https://launchpad.net/testresources")
2141 (synopsis
2142 "Pyunit extension for managing test resources")
2143 (description
2144 "Testresources is an extension to Python's unittest to allow declarative
2145 use of resources by test cases.")
2146 (license (list license:bsd-3 license:asl2.0)))) ; at the user's option
2147
2148 (define-public python2-testresources
2149 (package-with-python2 python-testresources))
2150
2151 (define-public python-subunit
2152 (package
2153 (name "python-subunit")
2154 (version "0.0.21")
2155 (source
2156 (origin
2157 (method url-fetch)
2158 (uri (string-append
2159 "https://pypi.python.org/packages/source/p/python-subunit/python-subunit-"
2160 version ".tar.gz"))
2161 (sha256
2162 (base32
2163 "1nkw9wfbvizmpajbj3in8ns07g7lwkiv8hip14jjlwk3cacls6jv"))))
2164 (build-system python-build-system)
2165 (propagated-inputs
2166 `(("python-extras" ,python-extras)
2167 ("python-mimeparse" ,python-mimeparse)))
2168 (native-inputs
2169 `(("python-testscenarios" ,python-testscenarios)))
2170 (home-page "http://launchpad.net/subunit")
2171 (synopsis "Python implementation of the subunit protocol")
2172 (description
2173 "Python-subunit is a Python implementation of the subunit test streaming
2174 protocol.")
2175 (license (list license:bsd-3 license:asl2.0)))) ; at the user's option
2176
2177 (define-public python2-subunit
2178 (package-with-python2 python-subunit))
2179
2180 ;; Recent versions of python-fixtures and python-testrepository need
2181 ;; python-pbr for packaging, which itself needs these two packages for
2182 ;; testing.
2183 ;; To fix this circular dependency, we use a build of python-pbr, based on the
2184 ;; same source, just without any test dependencies and with tests disabled.
2185 ;; python-pbr-minmal is then used to package python-fixtures and
2186 ;; python-testrepository.
2187 ;; Strictly speaking we currently could remove the test-requirements from the
2188 ;; normal python-pbr package (and save this package) since test are disabled
2189 ;; there anyway. But this may change in future.
2190 (define python-pbr-minimal
2191 (package
2192 (name "python-pbr-minimal")
2193 (version "1.10.0")
2194 (source
2195 (origin
2196 (method url-fetch)
2197 (uri (pypi-uri "pbr" version))
2198 (sha256
2199 (base32
2200 "177kd9kbv1hvf2ban7l3x9ymzbi1md4hkaymwbgnz7ihf312hr0q"))
2201 (patches (search-patches "python-pbr-fix-man-page-support.patch"))))
2202 (build-system python-build-system)
2203 (arguments
2204 `(#:tests? #f))
2205 (home-page "http://docs.openstack.org/developer/pbr/")
2206 (synopsis "Minimal build of python-pbr used for bootstrapping")
2207 (description
2208 "Used only for bootstrapping python2-pbr, you should not need this.")
2209 (license license:asl2.0)))
2210
2211 (define python2-pbr-minimal
2212 (package-with-python2 python-pbr-minimal))
2213
2214 (define-public python-pbr
2215 (package
2216 (inherit python-pbr-minimal)
2217 (name "python-pbr")
2218 (arguments
2219 `(#:tests? #f)) ;; Most tests seem to use the Internet.
2220 (propagated-inputs
2221 `(("git" ,git))) ;; pbr actually uses the "git" binary.
2222 (native-inputs
2223 `(("python-fixtures" ,python-fixtures)
2224 ;; discover, coverage, hacking, subunit
2225 ("python-mock" ,python-mock)
2226 ("python-six" ,python-six)
2227 ("python-sphinx" ,python-sphinx)
2228 ("python-testrepository" ,python-testrepository)
2229 ("python-testresources" ,python-testresources)
2230 ("python-testscenarios" ,python-testscenarios)
2231 ("python-testtools" ,python-testtools)
2232 ("python-virtualenv" ,python-virtualenv)))
2233 (synopsis "Enhance the default behavior of Python’s setuptools")
2234 (description
2235 "Python Build Reasonableness (PBR) is a library that injects some useful
2236 and sensible default behaviors into your setuptools run. It will set
2237 versions, process requirements files and generate AUTHORS and ChangeLog file
2238 from git information.
2239 ")))
2240
2241 (define-public python2-pbr
2242 (package-with-python2 python-pbr))
2243
2244 (define-public python-fixtures
2245 (package
2246 (name "python-fixtures")
2247 (version "1.4.0")
2248 (source
2249 (origin
2250 (method url-fetch)
2251 (uri (pypi-uri "fixtures" version))
2252 (sha256
2253 (base32
2254 "0djxvdwm8s60dbfn7bhf40x6g818p3b3mlwijm1c3bqg7msn271y"))))
2255 (build-system python-build-system)
2256 (arguments
2257 '(#:phases
2258 (modify-phases %standard-phases
2259 (replace 'check
2260 (lambda _
2261 (zero? (system* "python" "-m" "testtools.run"
2262 "fixtures.test_suite")))))))
2263 (propagated-inputs
2264 `(("python-six" ,python-six)))
2265 (native-inputs
2266 `(("python-mock" ,python-mock)
2267 ("python-pbr-minimal" ,python-pbr-minimal)
2268 ("python-testtools" ,python-testtools)))
2269 (home-page "https://launchpad.net/python-fixtures")
2270 (synopsis "Python test fixture library")
2271 (description
2272 "Fixtures provides a way to create reusable state, useful when writing
2273 Python tests.")
2274 (license (list license:bsd-3 license:asl2.0)))) ; at user's option
2275
2276 (define-public python2-fixtures
2277 (package-with-python2 python-fixtures))
2278
2279 (define-public python-testrepository
2280 (package
2281 (name "python-testrepository")
2282 (version "0.0.20")
2283 (source
2284 (origin
2285 (method url-fetch)
2286 (uri (string-append
2287 "https://pypi.python.org/packages/source/t/testrepository/testrepository-"
2288 version ".tar.gz"))
2289 (sha256
2290 (base32
2291 "1ssqb07c277010i6gzzkbdd46gd9mrj0bi0i8vn560n2k2y4j93m"))))
2292 (build-system python-build-system)
2293 (arguments
2294 ;; FIXME: Many tests are failing.
2295 '(#:tests? #f))
2296 (propagated-inputs
2297 `(("python-fixtures" ,python-fixtures)
2298 ("python-subunit" ,python-subunit)
2299 ("python-testtools" ,python-testtools)))
2300 (native-inputs
2301 `(("python-pbr-minimal" ,python-pbr-minimal) ;; same as for building fixture
2302 ("python-mimeparse" ,python-mimeparse)))
2303 (home-page "https://launchpad.net/testrepository")
2304 (synopsis "Database for Python test results")
2305 (description "Testrepository provides a database of test results which can
2306 be used as part of a developer's workflow to check things such as what tests
2307 have failed since the last commit or what tests are currently failing.")
2308 (license (list license:bsd-3 license:asl2.0)))) ; at user's option
2309
2310 (define-public python2-testrepository
2311 (package-with-python2 python-testrepository))
2312
2313 (define-public python-coverage
2314 (package
2315 (name "python-coverage")
2316 (version "4.1")
2317 (source
2318 (origin
2319 (method url-fetch)
2320 (uri (pypi-uri "coverage" version))
2321 (sha256
2322 (base32
2323 "01rbr4br4lsk0lwn8fb96zwd2xr4f0mg1w7iq3j11i8f5ig2nqs1"))))
2324 (build-system python-build-system)
2325 (arguments
2326 ;; FIXME: 95 tests failed, 539 passed, 6 skipped, 2 errors.
2327 '(#:tests? #f))
2328 (home-page "http://nedbatchelder.com/code/coverage")
2329 (synopsis "Code coverage measurement for Python")
2330 (description
2331 "Coverage measures code coverage, typically during test execution. It
2332 uses the code analysis tools and tracing hooks provided in the Python standard
2333 library to determine which lines are executable, and which have been
2334 executed.")
2335 (license license:bsd-3)))
2336
2337 (define-public python2-coverage
2338 (package-with-python2 python-coverage))
2339
2340 (define-public python-cov-core
2341 (package
2342 (name "python-cov-core")
2343 (version "1.15.0")
2344 (source
2345 (origin
2346 (method url-fetch)
2347 (uri (pypi-uri "cov-core" version))
2348 (sha256
2349 (base32
2350 "0k3np9ymh06yv1ib96sb6wfsxjkqhmik8qfsn119vnhga9ywc52a"))))
2351 (build-system python-build-system)
2352 (propagated-inputs
2353 `(("python-coverage" ,python-coverage)))
2354 (home-page "https://github.com/schlamar/cov-core")
2355 (synopsis "Coverage plugin core for pytest-cov, nose-cov and nose2-cov")
2356 (description
2357 "This is a library package for use by @code{pytest-cov}, @code{nose-cov}
2358 and @code{nose2-cov}. It is useful for developing coverage plugins for these
2359 testing frameworks.")
2360 (license license:expat)))
2361
2362 (define-public python2-cov-core
2363 (package-with-python2 python-cov-core))
2364
2365 (define-public python-discover
2366 (package
2367 (name "python-discover")
2368 (version "0.4.0")
2369 (source
2370 (origin
2371 (method url-fetch)
2372 (uri (string-append
2373 "https://pypi.python.org/packages/source/d/discover/discover-"
2374 version ".tar.gz"))
2375 (sha256
2376 (base32
2377 "0y8d0zwiqar51kxj8lzmkvwc3b8kazb04gk5zcb4nzg5k68zmhq5"))))
2378 (build-system python-build-system)
2379 (home-page "http://pypi.python.org/pypi/discover/")
2380 (synopsis
2381 "Python test discovery for unittest")
2382 (description
2383 "Discover provides test discovery for unittest, a feature that has been
2384 backported from Python 2.7 for Python 2.4+.")
2385 (license license:bsd-3)))
2386
2387 (define-public python2-discover
2388 (package-with-python2 python-discover))
2389
2390 (define-public behave
2391 (package
2392 (name "behave")
2393 (version "1.2.5")
2394 (source (origin
2395 (method url-fetch)
2396 (uri (pypi-uri "behave" version ".tar.bz2"))
2397 (sha256
2398 (base32
2399 "1iypp6z46r19n4xmgx6m1lwmlpfjh8vapq8izigrqlaarvp2y64c"))))
2400 (build-system python-build-system)
2401 (propagated-inputs
2402 `(("python-six" ,python-six)
2403 ("python-parse" ,python-parse)
2404 ("python-parse-type" ,python-parse-type)))
2405 (arguments `(#:tests? #f)) ;TODO: tests require nose>=1.3 and
2406 ;PyHamcrest>=1.8
2407 (home-page "https://github.com/behave/behave")
2408 (synopsis "Python behavior-driven development")
2409 (description
2410 "Behave is a tool for behavior-driven development in python.
2411 Behavior-driven development (or BDD) is an agile software development
2412 technique that encourages collaboration between developers, QA and
2413 non-technical or business participants in a software project. Behave uses
2414 tests written in a natural language style, backed up by Python code.")
2415 (license license:x11)))
2416
2417 (define-public python-exif-read
2418 (package
2419 (name "python-exif-read")
2420 (version "2.1.2")
2421 (source (origin
2422 (method url-fetch)
2423 (uri (pypi-uri "ExifRead" version))
2424 (sha256
2425 (base32
2426 "1b90jf6m9vxh9nanhpyvqdq7hmfx5iggw1l8kq10jrs6xgr49qkr"))))
2427 (build-system python-build-system)
2428 (arguments `(#:tests? #f)) ; no tests
2429 (home-page "https://github.com/ianare/exif-py")
2430 (synopsis "Python library to extract EXIF data from image files")
2431 (description
2432 "ExifRead is a Python library to extract EXIF data from tiff and jpeg
2433 files.")
2434 (license license:bsd-3)))
2435
2436 (define-public python2-exif-read
2437 (package-with-python2 python-exif-read))
2438
2439 (define-public python-pyld
2440 (package
2441 (name "python-pyld")
2442 (version "0.7.1")
2443 (source (origin
2444 (method url-fetch)
2445 (uri (pypi-uri "PyLD" version))
2446 (sha256
2447 (base32
2448 "1m0fs6897vxfkf7awah5i66i7b7smm5fnywf1w50fpzyfbfhr156"))))
2449 (build-system python-build-system)
2450 (arguments `(#:tests? #f)) ; no tests
2451 (home-page "https://github.com/digitalbazaar/pyld")
2452 (synopsis "Python implementation of the JSON-LD specification")
2453 (description
2454 "PyLD is an implementation of the JSON-LD specification.")
2455 (license license:bsd-3)))
2456
2457 (define-public python2-pyld
2458 (package-with-python2 python-pyld))
2459
2460 (define-public python-certifi
2461 (package
2462 (name "python-certifi")
2463 (version "2017.1.23")
2464 (source (origin
2465 (method url-fetch)
2466 (uri (pypi-uri "certifi" version))
2467 (sha256
2468 (base32
2469 "1klrzl3hgvcf2mjk00g0k3kk1p2z27vzwnxivwar4vhjmjvpz1w1"))))
2470 (build-system python-build-system)
2471 (home-page "https://certifi.io/")
2472 (synopsis "Python CA certificate bundle")
2473 (description
2474 "Certifi is a Python library that contains a CA certificate bundle, which
2475 is used by the Requests library to verify HTTPS requests.")
2476 (license license:asl2.0)))
2477
2478 (define-public python2-certifi
2479 (package-with-python2 python-certifi))
2480
2481 (define-public python-click
2482 (package
2483 (name "python-click")
2484 (version "6.7")
2485 (source
2486 (origin
2487 (method url-fetch)
2488 (uri (pypi-uri "click" version))
2489 (sha256
2490 (base32
2491 "02qkfpykbq35id8glfgwc38yc430427yd05z1wc5cnld8zgicmgi"))))
2492 (build-system python-build-system)
2493 (arguments
2494 `(#:phases
2495 (modify-phases %standard-phases
2496 (add-after 'unpack 'fix-paths
2497 (lambda* (#:key inputs #:allow-other-keys)
2498 (let ((glibc (assoc-ref inputs ,(if (%current-target-system)
2499 "cross-libc" "libc"))))
2500 (substitute* "click/_unicodefun.py"
2501 (("'locale'")
2502 (string-append "'" glibc "/bin/locale'"))))
2503 #t))
2504 (replace 'check
2505 (lambda _
2506 (zero? (system* "make" "test")))))))
2507 (native-inputs
2508 `(("python-pytest" ,python-pytest)))
2509 (home-page "http://click.pocoo.org")
2510 (synopsis "Command line library for Python")
2511 (description
2512 "Click is a Python package for creating command line interfaces in a
2513 composable way with as little code as necessary. Its name stands for
2514 \"Command Line Interface Creation Kit\". It's highly configurable but comes
2515 with sensible defaults out of the box.")
2516 (license license:bsd-3)))
2517
2518 (define-public python2-click
2519 (package-with-python2 python-click))
2520
2521 (define-public python-wheel
2522 (package
2523 (name "python-wheel")
2524 (version "0.30.0a0")
2525 (source
2526 (origin
2527 (method url-fetch)
2528 (uri (pypi-uri "wheel" version))
2529 (sha256
2530 (base32
2531 "1nm6mn8isny0hr86rhbfrpfj867c0phf001xgsd69xfp9ady1wwq"))))
2532 (build-system python-build-system)
2533 (native-inputs
2534 `(("python-jsonschema" ,python-jsonschema)
2535 ("python-pytest-cov" ,python-pytest-cov)))
2536 (home-page "https://bitbucket.org/pypa/wheel/")
2537 (synopsis "Format for built Python packages")
2538 (description
2539 "A wheel is a ZIP-format archive with a specially formatted filename and
2540 the @code{.whl} extension. It is designed to contain all the files for a PEP
2541 376 compatible install in a way that is very close to the on-disk format. Many
2542 packages will be properly installed with only the @code{Unpack} step and the
2543 unpacked archive preserves enough information to @code{Spread} (copy data and
2544 scripts to their final locations) at any later time. Wheel files can be
2545 installed with a newer @code{pip} or with wheel's own command line utility.")
2546 (license license:expat)
2547 (properties `((python2-variant . ,(delay python2-wheel))))))
2548
2549 (define-public python2-wheel
2550 (let ((wheel (package-with-python2
2551 (strip-python2-variant python-wheel))))
2552 (package (inherit wheel)
2553 (native-inputs `(("python2-functools32" ,python2-functools32)
2554 ,@(package-native-inputs wheel))))))
2555
2556
2557 (define-public python-requests
2558 (package
2559 (name "python-requests")
2560 (version "2.13.0")
2561 (source (origin
2562 (method url-fetch)
2563 (uri (pypi-uri "requests" version))
2564 (sha256
2565 (base32
2566 "1s0wg4any4dsv5l3hqjxqk2zgb7pdbqhy9rhc8kh3aigfq4ws8jp"))))
2567 ;; TODO: unbundle urllib3 and chardet.
2568 (build-system python-build-system)
2569 (arguments
2570 ;; FIXME: Some tests require network access.
2571 '(#:tests? #f))
2572 (home-page "http://python-requests.org/")
2573 (synopsis "Python HTTP library")
2574 (description
2575 "Requests is a Python HTTP client library. It aims to be easier to use
2576 than Python’s urllib2 library.")
2577 (license license:asl2.0)))
2578
2579 ;; Some software requires an older version of Requests, notably Docker
2580 ;; Compose.
2581 (define-public python-requests-2.7
2582 (package (inherit python-requests)
2583 (version "2.7.0")
2584 (source (origin
2585 (method url-fetch)
2586 (uri (pypi-uri "requests" version))
2587 (sha256
2588 (base32
2589 "0gdr9dxm24amxpbyqpbh3lbwxc2i42hnqv50sigx568qssv3v2ir"))))))
2590
2591 (define-public python2-requests
2592 (package-with-python2 python-requests))
2593
2594 (define-public python-vcversioner
2595 (package
2596 (name "python-vcversioner")
2597 (version "2.16.0.0")
2598 (source
2599 (origin
2600 (method url-fetch)
2601 (uri (pypi-uri "vcversioner" version))
2602 (sha256
2603 (base32
2604 "16z10sm78jd7ca3jbkgc3q5i8a8q7y1h21q1li21yy3rlhbhrrns"))))
2605 (build-system python-build-system)
2606 (synopsis "Python library for version number discovery")
2607 (description "Vcversioner is a Python library that inspects tagging
2608 information in a variety of version control systems in order to discover
2609 version numbers.")
2610 (home-page "https://github.com/habnabit/vcversioner")
2611 (license license:isc)))
2612
2613 (define-public python2-vcversioner
2614 (package-with-python2 python-vcversioner))
2615
2616 (define-public python-jsonschema
2617 (package
2618 (name "python-jsonschema")
2619 (version "2.5.1")
2620 (source (origin
2621 (method url-fetch)
2622 (uri
2623 (string-append
2624 "https://pypi.python.org/packages/source/j/jsonschema/jsonschema-"
2625 version ".tar.gz"))
2626 (sha256
2627 (base32
2628 "0hddbqjm4jq63y8jf44nswina1crjs16l9snb6m3vvgyg31klrrn"))))
2629 (build-system python-build-system)
2630 (arguments
2631 '(#:phases
2632 (modify-phases %standard-phases
2633 (replace 'check (lambda _ (zero? (system* "nosetests")))))))
2634 (native-inputs
2635 `(("python-nose" ,python-nose)
2636 ("python-vcversioner" ,python-vcversioner)))
2637 (home-page "https://github.com/Julian/jsonschema")
2638 (synopsis "Implementation of JSON Schema for Python")
2639 (description
2640 "Jsonschema is an implementation of JSON Schema for Python.")
2641 (license license:expat)
2642 (properties `((python2-variant . ,(delay python2-jsonschema))))))
2643
2644 (define-public python2-jsonschema
2645 (let ((jsonschema (package-with-python2
2646 (strip-python2-variant python-jsonschema))))
2647 (package (inherit jsonschema)
2648 (native-inputs
2649 `(("python2-mock" ,python2-mock)
2650 ,@(package-native-inputs jsonschema)))
2651 (propagated-inputs
2652 `(("python2-functools32" ,python2-functools32))))))
2653
2654 (define-public python-kitchen
2655 (package
2656 (name "python-kitchen")
2657 (version "1.2.4")
2658 (source
2659 (origin
2660 (method url-fetch)
2661 (uri (pypi-uri "kitchen" version))
2662 (sha256
2663 (base32
2664 "0ggv3p4x8jvmmzhp0xm00h6pvh1g0gmycw71rjwagnrj8n23vxrq"))))
2665 (build-system python-build-system)
2666 (propagated-inputs
2667 `(("python-chardet" ,python-chardet)))
2668 (home-page "https://github.com/fedora-infra/kitchen")
2669 (synopsis "Python API for snippets")
2670 (description "@code{kitchen} module provides a python API for all sorts of
2671 little useful snippets of code that everybody ends up writing for their projects
2672 but never seem big enough to build an independent release. Use kitchen and stop
2673 cutting and pasting that code over and over.")
2674 (license (list license:lgpl2.1+
2675 ;; subprocess.py, test_subprocess.py,
2676 ;; kitchen/pycompat25/defaultdict.py:
2677 license:psfl))))
2678
2679 (define-public python2-kitchen
2680 (package-with-python2 python-kitchen))
2681
2682 (define-public python-unidecode
2683 (package
2684 (name "python-unidecode")
2685 (version "0.04.20")
2686 (source (origin
2687 (method url-fetch)
2688 (uri (pypi-uri "Unidecode" version))
2689 (sha256
2690 (base32
2691 "1q00i8gpsq3d9r0q8wk4b290fxl0kqlsdk7iadvli45in6s1hi7d"))))
2692 (build-system python-build-system)
2693 (home-page "https://pypi.python.org/pypi/Unidecode")
2694 (synopsis "ASCII transliterations of Unicode text")
2695 (description
2696 "Unidecode provides ASCII transliterations of Unicode text. Unidecode is
2697 useful when integrating with legacy code that doesn't support Unicode, or for
2698 ease of entry of non-Roman names on a US keyboard, or when constructing ASCII
2699 machine identifiers from human-readable Unicode strings that should still be
2700 somewhat intelligeble.")
2701 (license license:gpl2+)))
2702
2703 (define-public python2-unidecode
2704 (package-with-python2 python-unidecode))
2705
2706 (define-public python-pyjwt
2707 (package
2708 (name "python-pyjwt")
2709 (version "1.4.0")
2710 (source
2711 (origin
2712 (method url-fetch)
2713 (uri (pypi-uri "PyJWT" version))
2714 (sha256
2715 (base32
2716 "1556v2jppd8mjkkj66pxb5rcazm35jq81r233mdl8hfmz9n3icp1"))))
2717 (build-system python-build-system)
2718 (native-inputs
2719 `(("python-pytest" ,python-pytest)
2720 ("python-pytest-cov" ,python-pytest-cov)
2721 ("python-pytest-runner" ,python-pytest-runner)))
2722 (home-page "https://github.com/progrium/pyjwt")
2723 (synopsis "JSON Web Token implementation in Python")
2724 (description
2725 "PyJWT is a JSON Web Token implementation written in Python.")
2726 (license license:expat)))
2727
2728 (define-public python2-pyjwt
2729 (package-with-python2 python-pyjwt))
2730
2731 (define-public python-pykka
2732 (package
2733 (name "python-pykka")
2734 (version "1.2.1")
2735 (source
2736 (origin
2737 (method url-fetch)
2738 (uri (pypi-uri "Pykka" version))
2739 (sha256
2740 (base32
2741 "049w3r0mdnnw7xv19jiq7rvls9k7xs73x05b4qs5d6z4vvmgyiz8"))))
2742 (build-system python-build-system)
2743 (native-inputs
2744 `(("python-mock" ,python-mock)
2745 ("python-nose" ,python-nose)
2746 ("python-gevent" ,python-gevent)
2747 ("python-eventlet" ,python-eventlet)))
2748 (home-page "https://www.pykka.org/")
2749 (synopsis "Pykka is a Python implementation of the actor model")
2750 (description
2751 "Pykka is a Python implementation of the actor model.
2752 The actor model introduces some simple rules to control the sharing
2753 of state and cooperation between execution units, which makes it
2754 easier to build concurrent applications.")
2755 (license license:asl2.0)))
2756
2757 (define-public python2-pykka
2758 (package-with-python2 python-pykka))
2759
2760 (define-public python-oauthlib
2761 (package
2762 (name "python-oauthlib")
2763 (version "1.0.3")
2764 (source (origin
2765 (method url-fetch)
2766 (uri (pypi-uri "oauthlib" version))
2767 (sha256
2768 (base32
2769 "1bfrj70vdjxjw74khbyh6f0dksv7p5rh2346jnlrffyacd3gwjzg"))))
2770 (build-system python-build-system)
2771 (native-inputs
2772 `(("python-nose" ,python-nose)
2773 ("python-mock" ,python-mock)
2774 ("python-cryptography" ,python-cryptography)
2775 ("python-pyjwt" ,python-pyjwt)
2776 ("python-blinker" ,python-blinker)))
2777 (home-page "https://github.com/idan/oauthlib")
2778 (synopsis "OAuth implementation for Python")
2779 (description
2780 "Oauthlib is a generic, spec-compliant, thorough implementation of the
2781 OAuth request-signing logic.")
2782 (license license:bsd-3)
2783 (properties `((python2-variant . ,(delay python2-oauthlib))))))
2784
2785 (define-public python2-oauthlib
2786 (let ((base (package-with-python2 (strip-python2-variant python-oauthlib))))
2787 (package
2788 (inherit base)
2789 (native-inputs `(("python2-unittest2" ,python2-unittest2)
2790 ,@(package-native-inputs base))))))
2791
2792 (define-public python-itsdangerous
2793 (package
2794 (name "python-itsdangerous")
2795 (version "0.24")
2796 (source
2797 (origin
2798 (method url-fetch)
2799 (uri (string-append
2800 "https://pypi.python.org/packages/source/i/itsdangerous/itsdangerous-"
2801 version ".tar.gz"))
2802 (sha256
2803 (base32
2804 "06856q6x675ly542ig0plbqcyab6ksfzijlyf1hzhgg3sgwgrcyb"))))
2805 (build-system python-build-system)
2806 (home-page "https://github.com/mitsuhiko/itsdangerous")
2807 (synopsis "Python library for passing data to/from untrusted environments")
2808 (description
2809 "Itsdangerous provides various helpers to pass trusted data to untrusted
2810 environments and back.")
2811 (license license:bsd-3)))
2812
2813 (define-public python2-itsdangerous
2814 (package-with-python2 python-itsdangerous))
2815
2816 (define-public python-pyyaml
2817 (package
2818 (name "python-pyyaml")
2819 (version "3.12")
2820 (source
2821 (origin
2822 (method url-fetch)
2823 (uri (pypi-uri "PyYAML" version))
2824 (sha256
2825 (base32
2826 "1aqjl8dk9amd4zr99n8v2qxzgmr2hdvqfma4zh7a41rj6336c9sr"))))
2827 (build-system python-build-system)
2828 (inputs
2829 `(("libyaml" ,libyaml)))
2830 (home-page "http://pyyaml.org/wiki/PyYAML")
2831 (synopsis "YAML parser and emitter for Python")
2832 (description
2833 "PyYAML is a YAML parser and emitter for Python. PyYAML features a
2834 complete YAML 1.1 parser, Unicode support, pickle support, capable extension
2835 API, and sensible error messages. PyYAML supports standard YAML tags and
2836 provides Python-specific tags that allow to represent an arbitrary Python
2837 object.")
2838 (license license:expat)))
2839
2840 (define-public python2-pyyaml
2841 (package-with-python2 python-pyyaml))
2842
2843 (define-public python-virtualenv
2844 (package
2845 (name "python-virtualenv")
2846 (version "15.0.3")
2847 (source
2848 (origin
2849 (method url-fetch)
2850 (uri (pypi-uri "virtualenv" version))
2851 (sha256
2852 (base32
2853 "07cbajzk8l05k5zhlw0b9wbf2is65bl9v6zrn2a0iyn57w6pd73d"))))
2854 (build-system python-build-system)
2855 (arguments
2856 `(#:phases
2857 (modify-phases %standard-phases
2858 (replace 'check
2859 (lambda _
2860 ;; Disable failing test. See upstream bug report
2861 ;; https://github.com/pypa/virtualenv/issues/957
2862 (substitute* "tests/test_virtualenv.py"
2863 (("skipif.*") "skipif(True, reason=\"Guix\")\n"))
2864 (zero? (system* "py.test")))))))
2865 (native-inputs
2866 `(("python-mock" ,python-mock)
2867 ("python-pytest" ,python-pytest)))
2868 (home-page "https://virtualenv.pypa.io/")
2869 (synopsis "Virtual Python environment builder")
2870 (description
2871 "Virtualenv is a tool to create isolated Python environments.")
2872 (license license:expat)))
2873
2874 (define-public python2-virtualenv
2875 (package-with-python2 python-virtualenv))
2876
2877 (define-public python-markupsafe
2878 (package
2879 (name "python-markupsafe")
2880 (version "0.23")
2881 (source
2882 (origin
2883 (method url-fetch)
2884 (uri (string-append
2885 "https://pypi.python.org/packages/source/M/MarkupSafe/MarkupSafe-"
2886 version ".tar.gz"))
2887 (sha256
2888 (base32
2889 "1hvip33wva3fnmvfp9x5klqri7hpl1hkgqmjbss18nmrb7zimv54"))))
2890 (build-system python-build-system)
2891 (home-page "https://github.com/mitsuhiko/markupsafe")
2892 (synopsis "XML/HTML/XHTML markup safe string implementation for Python")
2893 (description
2894 "Markupsafe provides an XML/HTML/XHTML markup safe string implementation
2895 for Python.")
2896 (license license:bsd-3)))
2897
2898 (define-public python2-markupsafe
2899 (package-with-python2 python-markupsafe))
2900
2901 (define-public python-jinja2
2902 (package
2903 (name "python-jinja2")
2904 (version "2.8")
2905 (source
2906 (origin
2907 (method url-fetch)
2908 (uri (pypi-uri "Jinja2" version))
2909 (sha256
2910 (base32
2911 "1x0v41lp5m1pjix3l46zx02b7lqp2hflgpnxwkywxynvi3zz47xw"))))
2912 (build-system python-build-system)
2913 (propagated-inputs
2914 `(("python-markupsafe" ,python-markupsafe)))
2915 (home-page "http://jinja.pocoo.org/")
2916 (synopsis "Python template engine")
2917 (description
2918 "Jinja2 is a small but fast and easy to use stand-alone template engine
2919 written in pure Python.")
2920 (license license:bsd-3)))
2921
2922 (define-public python2-jinja2
2923 (package-with-python2 python-jinja2))
2924
2925 (define-public python-pystache
2926 (package
2927 (name "python-pystache")
2928 (version "0.5.4")
2929 (source (origin
2930 (method url-fetch)
2931 (uri (pypi-uri "pystache" version))
2932 (sha256
2933 (base32
2934 "0nmqsfmiw4arjxqkmf9z66ml950pcdjk6aq4gin4sywmzdjw5fzp"))))
2935 (build-system python-build-system)
2936 (arguments
2937 '(#:tests? #f)) ; FIXME: Python 3 tests are failing.
2938 (home-page "http://defunkt.io/pystache/")
2939 (synopsis "Python logic-less template engine")
2940 (description
2941 "Pystache is a Python implementation of the framework agnostic,
2942 logic-free templating system Mustache.")
2943 (license license:expat)
2944 (properties `((python2-variant . ,(delay python2-pystache))))))
2945
2946 (define-public python2-pystache
2947 (package (inherit (package-with-python2
2948 (strip-python2-variant python-pystache)))
2949 (arguments
2950 `(#:python ,python-2
2951 #:phases
2952 (modify-phases %standard-phases
2953 (replace 'check
2954 (lambda _
2955 (zero? (system* "python" "test_pystache.py")))))))))
2956
2957 (define-public python-joblib
2958 (package
2959 (name "python-joblib")
2960 (version "0.10.3")
2961 (source (origin
2962 (method url-fetch)
2963 (uri (pypi-uri "joblib" version))
2964 (sha256
2965 (base32
2966 "0787k919zlfmgymprz5bzv0v1df5bbirlf3awrghmjgvkrd9dci9"))
2967 (modules '((guix build utils)))
2968 (snippet
2969 '(begin
2970 ;; Remove pre-compiled .pyc files from source.
2971 (for-each delete-file-recursively
2972 (find-files "." "__pycache__" #:directories? #t))
2973 (for-each delete-file (find-files "." "\\.pyc$"))
2974 #t))))
2975 (build-system python-build-system)
2976 (arguments
2977 `(#:phases
2978 (modify-phases %standard-phases
2979 (add-before 'check 'disable-failing-tests
2980 (lambda _
2981 ;; This numpydoc tests fails for unknown reasons
2982 (delete-file "doc/sphinxext/numpydoc/tests/test_docscrape.py")
2983 ;; This numpydoc test depends on matplotlib, which is not a
2984 ;; required input.
2985 (delete-file "doc/sphinxext/numpydoc/tests/test_plot_directive.py")
2986 ;; These tests fail to execute sys.executable
2987 (substitute* "joblib/test/test_parallel.py"
2988 (("import nose" line)
2989 (string-append "from nose.plugins.skip import SkipTest\n" line))
2990 (("def test_nested_parallel_warnings" line)
2991 (string-append "@SkipTest\n" line))
2992 (("def test_parallel_with_interactively_defined_functions" line)
2993 (string-append "@SkipTest\n" line)))
2994 #t)))))
2995 ;; Provide nose to enable tests command
2996 (native-inputs
2997 `(("python-nose" ,python-nose)
2998 ("python-sphinx" ,python-sphinx)
2999 ("python-docutils" ,python-docutils)
3000 ("python-numpydoc" ,python-numpydoc)))
3001 (home-page "http://pythonhosted.org/joblib/")
3002 (synopsis "Using Python functions as pipeline jobs")
3003 (description
3004 "Joblib is a set of tools to provide lightweight pipelining in Python.
3005 In particular, joblib offers: transparent disk-caching of the output values
3006 and lazy re-evaluation (memoize pattern), easy simple parallel computing
3007 logging and tracing of the execution.")
3008 (license license:bsd-3)))
3009
3010 (define-public python2-joblib
3011 (package-with-python2 python-joblib))
3012
3013 (define-public python-docutils
3014 (package
3015 (name "python-docutils")
3016 (version "0.13.1")
3017 (source
3018 (origin
3019 (method url-fetch)
3020 (uri (pypi-uri "docutils" version))
3021 (sha256
3022 (base32
3023 "1gkma47i609jfs7dssxn4y9vsz06qi0l5q41nws0zgkpnrghz33i"))))
3024 (build-system python-build-system)
3025 (arguments
3026 '(#:tests? #f)) ; no setup.py test command
3027 (home-page "http://docutils.sourceforge.net/")
3028 (synopsis "Python Documentation Utilities")
3029 (description
3030 "Docutils is a modular system for processing documentation into useful
3031 formats, such as HTML, XML, and LaTeX. For input Docutils supports
3032 reStructuredText.")
3033 ;; Most of the source code is public domain, but some source files are
3034 ;; licensed under the PFSL, BSD 2-clause, and GPLv3+ licenses.
3035 (license (list license:public-domain license:psfl license:bsd-2 license:gpl3+))))
3036
3037 (define-public python2-docutils
3038 (package-with-python2 python-docutils))
3039
3040 (define-public python-pygments
3041 (package
3042 (name "python-pygments")
3043 (version "2.1.3")
3044 (source
3045 (origin
3046 (method url-fetch)
3047 (uri (pypi-uri "Pygments" version))
3048 (sha256
3049 (base32
3050 "10axnp2wpjnq9g8wg53fx0c70dfxqrz498jyz8mrdx9a3flwir48"))))
3051 (build-system python-build-system)
3052 (arguments
3053 ;; FIXME: Tests require sphinx, which depends on this.
3054 '(#:tests? #f))
3055 (home-page "http://pygments.org/")
3056 (synopsis "Syntax highlighting")
3057 (description
3058 "Pygments is a syntax highlighting package written in Python.")
3059 (license license:bsd-2)))
3060
3061 (define-public python2-pygments
3062 (package-with-python2 python-pygments))
3063
3064 (define-public python-sphinx
3065 (package
3066 (name "python-sphinx")
3067 (version "1.5.1")
3068 (source
3069 (origin
3070 (method url-fetch)
3071 (uri (pypi-uri "Sphinx" version))
3072 (sha256
3073 (base32
3074 "1i8p9idnli4gr0y4x67yakbdk5w6a0xjzhrg6bg51y9d1fi7fslf"))))
3075 (build-system python-build-system)
3076 (arguments
3077 `(#:phases
3078 (modify-phases %standard-phases
3079 (replace 'check
3080 (lambda _
3081 ;; Requires Internet access.
3082 (delete-file "tests/test_build_linkcheck.py")
3083 (zero? (system* "make" "test")))))))
3084 (propagated-inputs
3085 `(("python-imagesize" ,python-imagesize)
3086 ("python-sphinx-alabaster-theme"
3087 ,python-sphinx-alabaster-theme)
3088 ("python-babel" ,python-babel)
3089 ("python-snowballstemmer" ,python-snowballstemmer)
3090 ("python-docutils" ,python-docutils)
3091 ("python-jinja2" ,python-jinja2)
3092 ("python-pygments" ,python-pygments)
3093 ("python-requests" ,python-requests)
3094 ("python-six" ,python-six)))
3095 (native-inputs
3096 `(("graphviz" ,graphviz)
3097 ("python-html5lib" ,python-html5lib)
3098 ("python-mock" ,python-mock)
3099 ("python-nose" ,python-nose)))
3100 (home-page "http://sphinx-doc.org/")
3101 (synopsis "Python documentation generator")
3102 (description "Sphinx is a tool that makes it easy to create documentation
3103 for Python projects or other documents consisting of multiple reStructuredText
3104 sources.")
3105 (license license:bsd-3)
3106 (properties `((python2-variant . ,(delay python2-sphinx))))))
3107
3108 (define-public python-sphinx-1.5.3
3109 (package
3110 (inherit python-sphinx)
3111 (name "python-sphinx")
3112 (version "1.5.3")
3113 (source
3114 (origin
3115 (method url-fetch)
3116 (uri (pypi-uri "Sphinx" version))
3117 (sha256
3118 (base32
3119 "0kw1axswbvaavr8ggyf4qr6hnisnrzlbkkcdada69vk1x9xjassg"))))
3120 (native-inputs
3121 `(("python-pytest" ,python-pytest-3.0)
3122 ,@(package-native-inputs python-sphinx)))))
3123
3124 (define-public python2-sphinx
3125 (let ((base (package-with-python2 (strip-python2-variant python-sphinx))))
3126 (package
3127 (inherit base)
3128 (native-inputs `(("python2-mock" ,python2-mock)
3129 ("python2-enum34" ,python2-enum34)
3130 ,@(package-native-inputs base)))
3131 (propagated-inputs `(("python2-pytz" ,python2-pytz)
3132 ,@(package-propagated-inputs base))))))
3133
3134 (define-public python-sphinx-rtd-theme
3135 (package
3136 (name "python-sphinx-rtd-theme")
3137 (version "0.1.6")
3138 (source
3139 (origin
3140 (method url-fetch)
3141 (uri (string-append "https://pypi.python.org/packages/source/s/"
3142 "sphinx_rtd_theme/sphinx_rtd_theme-"
3143 version ".tar.gz"))
3144 (sha256
3145 (base32
3146 "19nw3rn7awplcdrz63kg1njqwkbymfg9lwn7l2grhdyhyr2gaa8g"))))
3147 (build-system python-build-system)
3148 (arguments '(#:tests? #f)) ; No tests.
3149 (propagated-inputs
3150 `(("python-sphinx" ,python-sphinx)))
3151 (home-page "https://github.com/snide/sphinx_rtd_theme/")
3152 (synopsis "ReadTheDocs.org theme for Sphinx")
3153 (description "A theme for Sphinx used by ReadTheDocs.org.")
3154 (license license:expat)))
3155
3156 (define-public python2-sphinx-rtd-theme
3157 (package-with-python2 python-sphinx-rtd-theme))
3158
3159 (define-public python-rst.linker
3160 (package
3161 (name "python-rst.linker")
3162 (version "1.7")
3163 (source
3164 (origin
3165 (method url-fetch)
3166 (uri (pypi-uri "rst.linker" version))
3167 (sha256
3168 (base32
3169 "0bh4lnj2p1nh0wf5pgxgfbrp27xhb1rinahkb5j7s3qprq6qn0sr"))))
3170 (build-system python-build-system)
3171 (propagated-inputs
3172 `(("python-dateutil" ,python-dateutil)
3173 ("python-six" ,python-six)))
3174 (native-inputs
3175 `(("python-setuptools-scm" ,python-setuptools-scm)))
3176 ;; Test would require path.py, which would introduce a cyclic dependence.
3177 (arguments `(#:tests? #f))
3178 ;; Note: As of version 1.7 the documentation is not worth building.
3179 (home-page "https://github.com/jaraco/rst.linker")
3180 (synopsis "Sphinx plugin to add links and timestamps")
3181 (description "rst.linker allows to automatically replace text by a
3182 reStructuredText external reference or timestamps. It's primary purpose is to
3183 augment the changelog, but it can be used for other documents, too.")
3184 (license license:expat)))
3185
3186 (define-public python2-rst.linker
3187 (package-with-python2 python-rst.linker))
3188
3189 (define-public python-feedgenerator
3190 (package
3191 (name "python-feedgenerator")
3192 (version "1.9")
3193 (source
3194 (origin
3195 (method url-fetch)
3196 (uri (pypi-uri "feedgenerator" version))
3197 (sha256
3198 (base32
3199 "01mirwkm7xfx539hmvj7g9da1j51gw5lsx74dr0glizskjm5vq2s"))
3200 (modules '((guix build utils)))
3201 (snippet
3202 '(begin
3203 ;; Remove pre-compiled .pyc files from source.
3204 (for-each delete-file-recursively
3205 (find-files "." "__pycache__" #:directories? #t))
3206 (for-each delete-file (find-files "." "\\.pyc$"))
3207 #t))))
3208 (build-system python-build-system)
3209 (propagated-inputs
3210 `(("python-pytz" ,python-pytz)
3211 ("python-six" ,python-six)))
3212 (home-page "https://github.com/getpelican/feedgenerator")
3213 (synopsis
3214 "Standalone version of Django's Atom/RSS feed generator")
3215 (description
3216 "Feedgenerator-py3k is a standalone version of Django's feedgenerator,
3217 which can produce feeds in RSS 2.0, RSS 0.91, and Atom formats.")
3218 (license license:bsd-3)))
3219
3220 (define-public python2-feedgenerator
3221 (package-with-python2 python-feedgenerator))
3222
3223 (define-public python-blinker
3224 (package
3225 (name "python-blinker")
3226 (version "1.4")
3227 (source
3228 (origin
3229 (method url-fetch)
3230 (uri (pypi-uri "blinker" version))
3231 (sha256
3232 (base32
3233 "1dpq0vb01p36jjwbhhd08ylvrnyvcc82yxx3mwjx6awrycjyw6j7"))))
3234 (build-system python-build-system)
3235 (home-page "http://pythonhosted.org/blinker/")
3236 (synopsis "Fast, simple object-to-object and broadcast signaling")
3237 (description
3238 "Blinker provides a fast dispatching system that allows any number of
3239 interested parties to subscribe to events, or \"signals\".")
3240 (license license:expat)))
3241
3242 (define-public python2-blinker
3243 (package-with-python2 python-blinker))
3244
3245 (define-public pelican
3246 (package
3247 (name "pelican")
3248 (version "3.6.3")
3249 (source
3250 (origin
3251 (method url-fetch)
3252 (uri (pypi-uri "pelican" version))
3253 (sha256
3254 (base32
3255 "1hn94rb4q3zmcq16in055xikal4dba5hfx3zznq7warllcgc9f8k"))))
3256 (build-system python-build-system)
3257 (propagated-inputs
3258 `(("python-feedgenerator" ,python-feedgenerator)
3259 ("python-jinja2" ,python-jinja2)
3260 ("python-pygments" ,python-pygments)
3261 ("python-docutils" ,python-docutils)
3262 ("python-pytz" ,python-pytz)
3263 ("python-blinker" ,python-blinker)
3264 ("python-unidecode" ,python-unidecode)
3265 ("python-six" ,python-six)
3266 ("python-dateutil" ,python-dateutil)))
3267 (home-page "http://getpelican.com/")
3268 (arguments
3269 `(;; XXX Requires a lot more packages to do unit tests :P
3270 #:tests? #f
3271 #:phases (modify-phases %standard-phases
3272 (add-before
3273 'install 'adjust-requires
3274 ;; Since feedgenerator is installed from git, it doesn't
3275 ;; conform to the version requirements.
3276 ;;
3277 ;; We *do have* "feedgenerator >= 1.6", but strip off the
3278 ;; version requirement so setuptools doesn't get confused.
3279 (lambda _
3280 (substitute* "setup.py"
3281 (("['\"]feedgenerator.*?['\"]")
3282 "'feedgenerator'")))))))
3283 (synopsis "Python-based static site publishing system")
3284 (description
3285 "Pelican is a tool to generate a static blog from reStructuredText,
3286 Markdown input files, and more. Pelican uses Jinja2 for templating
3287 and is very extensible.")
3288 (license license:agpl3+)))
3289
3290 (define-public python-scikit-learn
3291 (package
3292 (name "python-scikit-learn")
3293 (version "0.18.1")
3294 (source
3295 (origin
3296 (method url-fetch)
3297 (uri (string-append
3298 "https://github.com/scikit-learn/scikit-learn/archive/"
3299 version ".tar.gz"))
3300 (file-name (string-append name "-" version ".tar.gz"))
3301 (sha256
3302 (base32
3303 "1hwswckdmd27f7k1jvwdc0m4mqrgxl2s245yq1scq34v124bjqgq"))))
3304 (build-system python-build-system)
3305 (arguments
3306 `(#:phases
3307 (modify-phases %standard-phases
3308 (delete 'check)
3309 (add-after 'install 'check
3310 ;; Running tests from the source directory requires
3311 ;; an "inplace" build with paths relative to CWD.
3312 ;; http://scikit-learn.org/stable/developers/advanced_installation.html#testing
3313 ;; Use the installed version instead.
3314 (lambda* (#:key inputs outputs #:allow-other-keys)
3315 (add-installed-pythonpath inputs outputs)
3316 ;; some tests require access to "$HOME"
3317 (setenv "HOME" "/tmp")
3318 ;; Step out of the source directory just to be sure.
3319 (chdir "..")
3320 (zero? (system* "nosetests" "-v" "sklearn")))))))
3321 (inputs
3322 `(("openblas" ,openblas)))
3323 (native-inputs
3324 `(("python-nose" ,python-nose)
3325 ("python-cython" ,python-cython)))
3326 (propagated-inputs
3327 `(("python-numpy" ,python-numpy)
3328 ("python-scipy" ,python-scipy)))
3329 (home-page "http://scikit-learn.org/")
3330 (synopsis "Machine Learning in Python")
3331 (description
3332 "Scikit-learn provides simple and efficient tools for data
3333 mining and data analysis.")
3334 (license license:bsd-3)))
3335
3336 (define-public python2-scikit-learn
3337 (package-with-python2 python-scikit-learn))
3338
3339 (define-public python-scikit-image
3340 (package
3341 (name "python-scikit-image")
3342 (version "0.11.3")
3343 (source
3344 (origin
3345 (method url-fetch)
3346 (uri (string-append
3347 "https://pypi.python.org/packages/source/s/scikit-image/scikit-image-"
3348 version ".tar.gz"))
3349 (sha256
3350 (base32 "0jz416fqvpahqyffw8plmszzfj669w8wvf3y9clnr5lr6a7md3kn"))))
3351 (build-system python-build-system)
3352 (arguments
3353 ;; TODO: Some tests require running X11 server. Disable them?
3354 '(#:tests? #f))
3355 ;; See DEPENDS.txt for the list of build and run time requiremnts
3356 (propagated-inputs
3357 `(("python-matplotlib" ,python-matplotlib)
3358 ("python-networkx" ,python-networkx)
3359 ("python-scipy" ,python-scipy)
3360 ("python-pillow" ,python-pillow)))
3361 (native-inputs
3362 `(("python-numpy" ,python-numpy)
3363 ("python-cython" ,python-cython)
3364 ("python-six" ,python-six)))
3365 (home-page "http://scikit-image.org/")
3366 (synopsis "Image processing in Python")
3367 (description
3368 "Scikit-image is a collection of algorithms for image processing.")
3369 (license license:bsd-3)))
3370
3371 (define-public python2-scikit-image
3372 (package-with-python2 python-scikit-image))
3373
3374 (define-public python-redis
3375 (package
3376 (name "python-redis")
3377 (version "2.10.5")
3378 (source
3379 (origin
3380 (method url-fetch)
3381 (uri (pypi-uri "redis" version))
3382 (sha256
3383 (base32 "0csmrkxb29x7xs9b51zplwkkq2hwnbh9jns1g85dykn5rxmaxysx"))))
3384 (build-system python-build-system)
3385 ;; Tests require a running Redis server
3386 (arguments '(#:tests? #f))
3387 ;; As long as we are not running test, we do not need this input :-)
3388 ;;(native-inputs
3389 ;; `(("python-pytest" ,python-pytest)))
3390 (home-page "https://github.com/andymccurdy/redis-py")
3391 (synopsis "Redis Python client")
3392 (description
3393 "This package provides a Python interface to the Redis key-value store.")
3394 (license license:expat)))
3395
3396 (define-public python2-redis
3397 (package-with-python2 python-redis))
3398
3399 (define-public python-rq
3400 (package
3401 (name "python-rq")
3402 (version "0.7.1")
3403 (source
3404 (origin
3405 (method url-fetch)
3406 (uri (pypi-uri "rq" version))
3407 (sha256
3408 (base32 "0gaq5pnh0zy46r8jvygi0ifbvz3pq6i7xla78ijcgjw0x77qzsdh"))))
3409 (build-system python-build-system)
3410 (propagated-inputs
3411 `(("python-click" ,python-click)
3412 ("python-redis" ,python-redis)))
3413 (home-page "http://python-rq.org/")
3414 (synopsis "Simple job queues for Python")
3415 (description
3416 "RQ (Redis Queue) is a simple Python library for queueing jobs and
3417 processing them in the background with workers. It is backed by Redis and it
3418 is designed to have a low barrier to entry.")
3419 (license license:bsd-2)))
3420
3421 (define-public python2-rq
3422 (package-with-python2 python-rq))
3423
3424 (define-public python-cython
3425 (package
3426 (name "python-cython")
3427 (version "0.25.2")
3428 (source
3429 (origin
3430 (method url-fetch)
3431 (uri (pypi-uri "Cython" version))
3432 (patches (search-patches "python-cython-fix-tests-32bit.patch"))
3433 (sha256
3434 (base32
3435 "01h3lrf6d98j07iakifi81qjszh6faa37ibx7ylva1vsqbwx2hgi"))))
3436 (build-system python-build-system)
3437 ;; we need the full python package and not just the python-wrapper
3438 ;; because we need libpython3.3m.so
3439 (inputs
3440 `(("python" ,python)))
3441 (arguments
3442 `(#:phases
3443 (modify-phases %standard-phases
3444 (add-before 'check 'set-HOME
3445 ;; some tests require access to "$HOME/.cython"
3446 (lambda _ (setenv "HOME" "/tmp")))
3447 (replace 'check
3448 (lambda _ (zero? (system* "python" "runtests.py" "-vv")))))))
3449 (home-page "http://cython.org/")
3450 (synopsis "C extensions for Python")
3451 (description "Cython is an optimising static compiler for both the Python
3452 programming language and the extended Cython programming language. It makes
3453 writing C extensions for Python as easy as Python itself.")
3454 (license license:asl2.0)
3455 (properties `((python2-variant . ,(delay python2-cython))))))
3456
3457 (define-public python2-cython
3458 (package (inherit (package-with-python2
3459 (strip-python2-variant python-cython)))
3460 (name "python2-cython")
3461 (inputs
3462 `(("python-2" ,python-2))))) ; this is not automatically changed
3463
3464 ;; The RPython toolchain currently does not support Python 3.
3465 (define-public python2-rpython
3466 (package
3467 (name "python2-rpython")
3468 (version "0.1.4")
3469 (source
3470 (origin
3471 (method url-fetch)
3472 (uri (pypi-uri "rpython" version))
3473 (sha256
3474 (base32
3475 "07pps06fq4c4wmi5ii0sgh9zgwniz5y7frqhm28g3a154l163fxc"))))
3476 (build-system python-build-system)
3477 (arguments `(#:python ,python-2))
3478 (native-inputs
3479 `(("python2-pytest" ,python2-pytest))) ; needed for running tests
3480 (home-page "https://rpython.readthedocs.org")
3481 (synopsis "Framework for implementing interpreters and virtual machines")
3482 (description "RPython is a translation and support framework for
3483 producing implementations of dynamic languages, emphasizing a clean separation
3484 between language specification and implementation aspects.")
3485 (license license:expat)))
3486
3487 (define-public python-numpy
3488 (package
3489 (name "python-numpy")
3490 (version "1.12.0")
3491 (source
3492 (origin
3493 (method url-fetch)
3494 (uri (string-append
3495 "https://github.com/numpy/numpy/archive/v" version ".tar.gz"))
3496 (file-name (string-append name "-" version ".tar.gz"))
3497 (sha256
3498 (base32
3499 "025d4j4aakcp8w5i5diqh812cbbjgac7jszx1j56ivrbi1i8vv7d"))))
3500 (build-system python-build-system)
3501 (inputs
3502 `(("openblas" ,openblas)
3503 ("lapack" ,lapack)))
3504 (native-inputs
3505 `(("python-cython" ,python-cython)
3506 ("python-nose" ,python-nose)
3507 ("gfortran" ,gfortran)))
3508 (arguments
3509 `(#:phases
3510 (modify-phases %standard-phases
3511 (add-before 'build 'set-environment-variables
3512 (lambda* (#:key inputs #:allow-other-keys)
3513 (call-with-output-file "site.cfg"
3514 (lambda (port)
3515 (format port
3516 "[openblas]
3517 libraries = openblas
3518 library_dirs = ~a/lib
3519 include_dirs = ~a/include
3520
3521 # backslash-n to make emacs happy
3522 \n[lapack]
3523 lapack_libs = lapack
3524 library_dirs = ~a/lib
3525 include_dirs = ~a/include
3526 "
3527 (assoc-ref inputs "openblas")
3528 (assoc-ref inputs "openblas")
3529 (assoc-ref inputs "lapack")
3530 (assoc-ref inputs "lapack"))))
3531 ;; Use "gcc" executable, not "cc".
3532 (substitute* "numpy/distutils/system_info.py"
3533 (("c = distutils\\.ccompiler\\.new_compiler\\(\\)")
3534 "c = distutils.ccompiler.new_compiler(); c.set_executables(compiler='gcc',compiler_so='gcc',linker_exe='gcc',linker_so='gcc -shared')"))
3535 #t))
3536 ;; Tests can only be run after the library has been installed and not
3537 ;; within the source directory.
3538 (delete 'check)
3539 (add-after 'install 'check
3540 (lambda* (#:key outputs inputs #:allow-other-keys)
3541 ;; Make installed package available for running the tests
3542 (add-installed-pythonpath inputs outputs)
3543 (with-directory-excursion "/tmp"
3544 (zero? (system* "python" "-c"
3545 "import numpy; numpy.test(verbose=2)"))))))))
3546 (home-page "http://www.numpy.org/")
3547 (synopsis "Fundamental package for scientific computing with Python")
3548 (description "NumPy is the fundamental package for scientific computing
3549 with Python. It contains among other things: a powerful N-dimensional array
3550 object, sophisticated (broadcasting) functions, tools for integrating C/C++
3551 and Fortran code, useful linear algebra, Fourier transform, and random number
3552 capabilities.")
3553 (license license:bsd-3)))
3554
3555 (define-public python2-numpy
3556 (package-with-python2 python-numpy))
3557
3558 (define-public python-munch
3559 (package
3560 (name "python-munch")
3561 (version "2.0.4")
3562 (source
3563 (origin
3564 (method url-fetch)
3565 (uri (pypi-uri "munch" version))
3566 (sha256
3567 (base32
3568 "1cmqg91xnqx8gvnh4pmp0bfl1dfcm65d5p9mg73zz8pkjhx6h80l"))))
3569 (build-system python-build-system)
3570 (home-page "https://github.com/Infinidat/munch")
3571 (synopsis "Dot-accessible dictionary")
3572 (description "Munch is a dot-accessible dictionary similar to JavaScript
3573 objects.")
3574 (license license:expat)))
3575
3576 (define-public python2-munch
3577 (package-with-python2 python-munch))
3578
3579 (define-public python2-fastlmm
3580 (package
3581 (name "python2-fastlmm")
3582 (version "0.2.21")
3583 (source
3584 (origin
3585 (method url-fetch)
3586 (uri (pypi-uri "fastlmm" version ".zip"))
3587 (sha256
3588 (base32
3589 "1q8c34rpmwkfy3r4d5172pzdkpfryj561897z9r3x22gq7813x1m"))))
3590 (build-system python-build-system)
3591 (arguments
3592 `(#:python ,python-2)) ; only Python 2.7 is supported
3593 (propagated-inputs
3594 `(("python2-numpy" ,python2-numpy)
3595 ("python2-scipy" ,python2-scipy)
3596 ("python2-matplotlib" ,python2-matplotlib)
3597 ("python2-pandas" ,python2-pandas)
3598 ("python2-scikit-learn" ,python2-scikit-learn)
3599 ("python2-pysnptools" ,python2-pysnptools)))
3600 (native-inputs
3601 `(("unzip" ,unzip)
3602 ("python2-cython" ,python2-cython)
3603 ("python2-mock" ,python2-mock)
3604 ("python2-nose" ,python2-nose)))
3605 (home-page "http://research.microsoft.com/en-us/um/redmond/projects/mscompbio/fastlmm/")
3606 (synopsis "Perform genome-wide association studies on large data sets")
3607 (description
3608 "FaST-LMM, which stands for Factored Spectrally Transformed Linear Mixed
3609 Models, is a program for performing both single-SNP and SNP-set genome-wide
3610 association studies (GWAS) on extremely large data sets.")
3611 (license license:asl2.0)))
3612
3613 (define-public python-numpy-documentation
3614 (package
3615 (name "python-numpy-documentation")
3616 (version (package-version python-numpy))
3617 (source (package-source python-numpy))
3618 (build-system python-build-system)
3619 (native-inputs
3620 `(("python-matplotlib" ,python-matplotlib)
3621 ("python-numpy" ,python-numpy)
3622 ("pkg-config" ,pkg-config)
3623 ("python-sphinx" ,python-sphinx)
3624 ("python-numpydoc" ,python-numpydoc)
3625 ("texlive" ,texlive)
3626 ("texinfo" ,texinfo)
3627 ("perl" ,perl)
3628 ("scipy-sphinx-theme"
3629 ,(origin ; The build script expects scipy-sphinx-theme as a git submodule
3630 (method git-fetch)
3631 (uri (git-reference
3632 (url "https://github.com/scipy/scipy-sphinx-theme.git")
3633 (commit "c466764e2231ba132c09826b5b138fffa1cfcec3")))
3634 (sha256
3635 (base32
3636 "0q2y87clwlsgc7wvlsn9pzyssybcq10plwhq2w1ydykfsyyqbmkl"))))
3637 ,@(package-native-inputs python-numpy)))
3638 (arguments
3639 `(#:tests? #f ; we're only generating the documentation
3640 #:phases
3641 (modify-phases %standard-phases
3642 (delete 'build)
3643 (replace 'install
3644 (lambda* (#:key inputs outputs #:allow-other-keys)
3645 (let* ((data (string-append (assoc-ref outputs "out") "/share"))
3646 (doc (string-append
3647 data "/doc/" ,name "-"
3648 ,(package-version python-numpy)))
3649 (info-reader (string-append data "/info"))
3650 (html (string-append doc "/html"))
3651 (scipy-sphinx-theme "scipy-sphinx-theme")
3652 (sphinx-theme-checkout (assoc-ref inputs scipy-sphinx-theme))
3653 (pyver ,(string-append "PYVER=")))
3654 (with-directory-excursion "doc"
3655 (copy-recursively sphinx-theme-checkout scipy-sphinx-theme)
3656 (mkdir-p html)
3657 (system* "make" "html" pyver)
3658 (system* "make" "latex" "PAPER=a4" pyver)
3659 (system* "make" "-C" "build/latex"
3660 "all-pdf" "PAPER=a4" pyver)
3661 ;; FIXME: Generation of the info file fails.
3662 ;; (system* "make" "info" pyver)
3663 ;; (mkdir-p info)
3664 ;; (copy-file "build/texinfo/numpy.info"
3665 ;; (string-append info "/numpy.info"))
3666 (for-each (lambda (file)
3667 (copy-file (string-append "build/latex" file)
3668 (string-append doc file)))
3669 '("/numpy-ref.pdf" "/numpy-user.pdf"))
3670 (with-directory-excursion "build/html"
3671 (for-each (lambda (file)
3672 (let* ((dir (dirname file))
3673 (tgt-dir (string-append html "/" dir)))
3674 (unless (equal? "." dir)
3675 (mkdir-p tgt-dir))
3676 (install-file file html)))
3677 (find-files "." ".*")))))
3678 #t)))))
3679 (home-page (package-home-page python-numpy))
3680 (synopsis "Documentation for the python-numpy package")
3681 (description (package-description python-numpy))
3682 (license (package-license python-numpy))))
3683
3684 (define-public python2-numpy-documentation
3685 (let ((numpy-documentation (package-with-python2 python-numpy-documentation)))
3686 (package
3687 (inherit numpy-documentation)
3688 (native-inputs `(("python2-functools32" ,python2-functools32)
3689 ,@(package-native-inputs numpy-documentation))))))
3690
3691 (define-public python-pygit2
3692 (package
3693 (name "python-pygit2")
3694 (version "0.25.0")
3695 (source
3696 (origin
3697 (method url-fetch)
3698 (uri (pypi-uri "pygit2" version))
3699 (sha256
3700 (base32
3701 "0wf5rp0fvrw7j3j18dvwjq6xqlbm611wd55aphrfpps0v1gxh3ny"))
3702 (patches
3703 (search-patches "python-pygit2-disable-network-tests.patch"))))
3704 (build-system python-build-system)
3705 (propagated-inputs
3706 `(("python-six" ,python-six)
3707 ("python-cffi" ,python-cffi)
3708 ("libgit2" ,libgit2)
3709 ("python-tox" ,python-tox)))
3710 (home-page "https://github.com/libgit2/pygit2")
3711 (synopsis "Python bindings for libgit2")
3712 (description "Pygit2 is a set of Python bindings to the libgit2 shared
3713 library, libgit2 implements Git plumbing.")
3714 ;; GPL2.0 only, with linking exception.
3715 (license license:gpl2)))
3716
3717 (define-public python2-pygit2
3718 (package-with-python2 python-pygit2))
3719
3720 (define-public python-pyparsing
3721 (package
3722 (name "python-pyparsing")
3723 (version "2.0.3")
3724 (source
3725 (origin
3726 (method url-fetch)
3727 (uri (string-append "mirror://sourceforge/pyparsing/pyparsing"
3728 "/pyparsing-" version
3729 "/pyparsing-" version ".tar.gz"))
3730 (sha256
3731 (base32
3732 "0kw4py7gn45j93q8r7bzajfrjdc3xlsn2yzln41lf9zmrghjkrq6"))))
3733 (build-system python-build-system)
3734 (outputs '("out" "doc"))
3735 (arguments
3736 `(#:tests? #f ; no test target
3737 #:modules ((guix build python-build-system)
3738 (guix build utils))
3739 #:phases
3740 (alist-cons-after
3741 'install 'install-doc
3742 (lambda* (#:key outputs #:allow-other-keys)
3743 (let* ((doc (string-append (assoc-ref outputs "doc")
3744 "/share/doc/" ,name "-" ,version))
3745 (html-doc (string-append doc "/html"))
3746 (examples (string-append doc "/examples")))
3747 (mkdir-p html-doc)
3748 (mkdir-p examples)
3749 (for-each
3750 (lambda (dir tgt)
3751 (map (lambda (file)
3752 (install-file file tgt))
3753 (find-files dir ".*")))
3754 (list "docs" "htmldoc" "examples")
3755 (list doc html-doc examples))))
3756 %standard-phases)))
3757 (home-page "http://pyparsing.wikispaces.com")
3758 (synopsis "Python parsing class library")
3759 (description
3760 "The pyparsing module is an alternative approach to creating and
3761 executing simple grammars, vs. the traditional lex/yacc approach, or the use
3762 of regular expressions. The pyparsing module provides a library of classes
3763 that client code uses to construct the grammar directly in Python code.")
3764 (license license:expat)))
3765
3766 (define-public python2-pyparsing
3767 (package-with-python2 python-pyparsing))
3768
3769 (define-public python-numpydoc
3770 (package
3771 (name "python-numpydoc")
3772 (version "0.5")
3773 (source
3774 (origin
3775 (method url-fetch)
3776 (uri (string-append
3777 "https://pypi.python.org/packages/source/n/numpydoc/numpydoc-"
3778 version ".tar.gz"))
3779 (sha256
3780 (base32
3781 "0d4dnifaxkll50jx6czj05y8cb4ny60njd2wz299sj2jxfy51w4k"))
3782 (modules '((guix build utils)))
3783 (snippet
3784 '(begin
3785 ;; Drop a test requiring matplotlib, which we cannot add as an
3786 ;; input since it would create a circular dependency: Extend the
3787 ;; test for Python 3, where it is already dropped, to Python 2.
3788 (substitute* "numpydoc/tests/test_plot_directive.py"
3789 (("3") "2"))))))
3790 (build-system python-build-system)
3791 (propagated-inputs
3792 `(("python-sphinx" ,python-sphinx)))
3793 (native-inputs
3794 `(("python-nose" ,python-nose)))
3795 (home-page "https://pypi.python.org/pypi/numpydoc")
3796 (synopsis
3797 "Numpy's Sphinx extensions")
3798 (description
3799 "Sphinx extension to support docstrings in Numpy format.")
3800 (license license:bsd-2)))
3801
3802 (define-public python2-numpydoc
3803 (package-with-python2 python-numpydoc))
3804
3805 (define-public python-numexpr
3806 (package
3807 (name "python-numexpr")
3808 (version "2.6.1")
3809 (source
3810 (origin
3811 (method url-fetch)
3812 (uri (pypi-uri "numexpr" version))
3813 (sha256
3814 (base32
3815 "01lsja72m32z0i5p8rwxbfyzk4mplh72k2a140nwh8vv4wpyfbnv"))))
3816 (build-system python-build-system)
3817 (arguments `(#:tests? #f)) ; no tests included
3818 (propagated-inputs
3819 `(("python-numpy" ,python-numpy)))
3820 (home-page "https://github.com/pydata/numexpr")
3821 (synopsis "Fast numerical expression evaluator for NumPy")
3822 (description
3823 "Numexpr is a fast numerical expression evaluator for NumPy. With it,
3824 expressions that operate on arrays are accelerated and use less memory than
3825 doing the same calculation in Python. In addition, its multi-threaded
3826 capabilities can make use of all your cores, which may accelerate
3827 computations, most specially if they are not memory-bounded (e.g. those using
3828 transcendental functions).")
3829 (license license:expat)))
3830
3831 (define-public python2-numexpr
3832 (package-with-python2 python-numexpr))
3833
3834 (define-public python-cycler
3835 (package
3836 (name "python-cycler")
3837 (version "0.10.0")
3838 (source (origin
3839 (method url-fetch)
3840 (uri (pypi-uri "cycler" version))
3841 (sha256
3842 (base32
3843 "1n69n23fak1gjxlrbhqisi2b9pv3ckrfj98llx3p53953082syyd"))))
3844 (build-system python-build-system)
3845 (arguments
3846 ;; XXX: The current version requires 'coveralls' which we don't have.
3847 ;; Enable this for the next release which uses 'python-pytest'.
3848 '(#:tests? #f))
3849 (propagated-inputs
3850 `(("python-six" ,python-six)))
3851 (home-page "http://matplotlib.org/cycler/")
3852 (synopsis "Composable keyword argument iterator")
3853 (description
3854 "When using @code{matplotlib} and plotting more than one line, it is
3855 common to want to be able to want to be able to cycle over one or more artist
3856 styles; but the plotting logic can quickly become involved.
3857 To address this and enable easy cycling over arbitrary @code{kwargs}, the
3858 @code{Cycler} class was developed.")
3859 (license license:bsd-3)))
3860
3861 (define-public python2-cycler
3862 (package-with-python2 python-cycler))
3863
3864 (define-public python-colorspacious
3865 (package
3866 (name "python-colorspacious")
3867 (version "1.1.0")
3868 (source
3869 (origin
3870 (method url-fetch)
3871 (uri (string-append "https://github.com/njsmith/colorspacious/archive/v"
3872 version ".tar.gz"))
3873 (file-name (string-append name "-" version))
3874 (sha256
3875 (base32 "1vflh5jm32qb0skza2i8pjacv09w6gq84fqpp2nj77s0rbmzgr4k"))))
3876 (build-system python-build-system)
3877 (propagated-inputs
3878 `(("python-numpy" ,python-numpy)))
3879 (native-inputs
3880 `(("python-nose" ,python-nose)))
3881 (arguments
3882 `(#:phases
3883 (modify-phases %standard-phases
3884 (replace 'check
3885 (lambda _
3886 (zero? (system* "nosetests" "--all-modules" "-v" "colorspacious")))))))
3887 (home-page "https://github.com/njsmith/colorspacious")
3888 (synopsis "Python library for colorspace conversions")
3889 (description "@code{colorspacious} is a Python library that lets you
3890 convert between colorspaces like sRGB, XYZ, CIEL*a*b*, CIECAM02, CAM02-UCS, etc.")
3891 (license license:expat)))
3892
3893 (define-public python2-colorspacious
3894 (package-with-python2 python-colorspacious))
3895
3896 (define-public python-matplotlib
3897 (package
3898 (name "python-matplotlib")
3899 (version "2.0.0")
3900 (source
3901 (origin
3902 (method url-fetch)
3903 (uri (string-append
3904 "https://github.com/matplotlib/matplotlib/archive/v" version ".tar.gz"))
3905 (file-name (string-append name "-" version ".tar.gz"))
3906 (sha256
3907 (base32
3908 "0w3k5m5qb3wsd7yhvmg042xddvligklvcq2visk2c5wnph3hhsln"))))
3909 (build-system python-build-system)
3910 (propagated-inputs ; the following packages are all needed at run time
3911 `(("python-cycler" ,python-cycler)
3912 ("python-pyparsing" ,python-pyparsing)
3913 ("python-pygobject" ,python-pygobject)
3914 ("gobject-introspection" ,gobject-introspection)
3915 ("python-tkinter" ,python "tk")
3916 ("python-dateutil" ,python-dateutil)
3917 ("python-numpy" ,python-numpy)
3918 ("python-pillow" ,python-pillow)
3919 ("python-pytz" ,python-pytz)
3920 ("python-six" ,python-six)
3921 ;; The 'gtk+' package (and 'gdk-pixbuf', 'atk' and 'pango' propagated
3922 ;; from 'gtk+') provides the required 'typelib' files used by
3923 ;; 'gobject-introspection'. The location of these files is set with the
3924 ;; help of the environment variable GI_TYPELIB_PATH. At build time this
3925 ;; is done automatically by a 'native-search-path' procedure. However,
3926 ;; at run-time the user must set this variable as follows:
3927 ;;
3928 ;; export GI_TYPELIB_PATH=~/.guix-profile/lib/girepository-1.0
3929 ("gtk+" ,gtk+)
3930 ;; From version 1.4.0 'matplotlib' makes use of 'cairocffi' instead of
3931 ;; 'pycairo'. However, 'pygobject' makes use of a 'pycairo' 'context'
3932 ;; object. For this reason we need to import both libraries.
3933 ;; https://pythonhosted.org/cairocffi/cffi_api.html#converting-pycairo
3934 ("python-pycairo" ,python-pycairo)
3935 ("python-cairocffi" ,python-cairocffi)))
3936 (inputs
3937 `(("libpng" ,libpng)
3938 ("imagemagick" ,imagemagick)
3939 ("freetype" ,freetype)
3940 ("cairo" ,cairo)
3941 ("glib" ,glib)
3942 ;; FIXME: Add backends when available.
3943 ;("python-wxpython" ,python-wxpython)
3944 ("python-pyqt" ,python-pyqt)
3945 ("tcl" ,tcl)
3946 ("tk" ,tk)))
3947 (native-inputs
3948 `(("pkg-config" ,pkg-config)
3949 ("python-nose" ,python-nose)
3950 ("python-mock" ,python-mock)))
3951 (arguments
3952 `(#:phases
3953 (modify-phases %standard-phases
3954 (add-before 'build 'configure-environment
3955 (lambda* (#:key outputs inputs #:allow-other-keys)
3956 (let ((cairo (assoc-ref inputs "cairo"))
3957 (gtk+ (assoc-ref inputs "gtk+")))
3958 ;; Setting these directories in the 'basedirlist' of 'setup.cfg'
3959 ;; has not effect.
3960 (setenv "LD_LIBRARY_PATH"
3961 (string-append cairo "/lib:" gtk+ "/lib"))
3962 (setenv "HOME" (getcwd))
3963 (call-with-output-file "setup.cfg"
3964 (lambda (port)
3965 (format port "[directories]~%
3966 basedirlist = ~a,~a~%
3967 [rc_options]~%
3968 backend = TkAgg~%"
3969 (assoc-ref inputs "tcl")
3970 (assoc-ref inputs "tk")))))
3971 #t)))))
3972 (home-page "http://matplotlib.org")
3973 (synopsis "2D plotting library for Python")
3974 (description
3975 "Matplotlib is a Python 2D plotting library which produces publication
3976 quality figures in a variety of hardcopy formats and interactive environments
3977 across platforms. Matplotlib can be used in Python scripts, the python and
3978 ipython shell, web application servers, and six graphical user interface
3979 toolkits.")
3980 (license license:psfl)
3981 (properties `((python2-variant . ,(delay python2-matplotlib))))))
3982
3983 (define-public python2-matplotlib
3984 (let ((matplotlib (package-with-python2
3985 (strip-python2-variant python-matplotlib))))
3986 (package (inherit matplotlib)
3987 ;; Make sure to use special packages for Python 2 instead
3988 ;; of those automatically rewritten by package-with-python2.
3989 (propagated-inputs
3990 `(("python2-pycairo" ,python2-pycairo)
3991 ("python2-functools32" ,python2-functools32)
3992 ("python2-pygobject-2" ,python2-pygobject-2)
3993 ("python2-subprocess32" ,python2-subprocess32)
3994 ("python2-tkinter" ,python-2 "tk")
3995 ,@(fold alist-delete (package-propagated-inputs matplotlib)
3996 '("python-pycairo" "python-pygobject" "python-tkinter")))))))
3997
3998 (define-public python-matplotlib-documentation
3999 (package
4000 (name "python-matplotlib-documentation")
4001 (version (package-version python-matplotlib))
4002 (source (package-source python-matplotlib))
4003 (build-system python-build-system)
4004 (native-inputs
4005 `(("python-matplotlib" ,python-matplotlib)
4006 ("python-colorspacious" ,python-colorspacious)
4007 ("python-sphinx" ,python-sphinx)
4008 ("python-numpydoc" ,python-numpydoc)
4009 ("python-ipython" ,python-ipython)
4010 ("python-mock" ,python-mock)
4011 ("graphviz" ,graphviz)
4012 ("texlive" ,texlive)
4013 ("texinfo" ,texinfo)
4014 ,@(package-native-inputs python-matplotlib)))
4015 (arguments
4016 `(#:tests? #f ; we're only generating documentation
4017 #:phases
4018 (modify-phases %standard-phases
4019 (replace 'build
4020 (lambda _
4021 (chdir "doc")
4022 ;; Produce pdf in 'A4' format.
4023 (substitute* "conf.py"
4024 (("latex_paper_size = 'letter'") "")
4025 ;; latex_paper_size is deprecated -> set paper size using
4026 ;; latex_elements
4027 (("latex_elements\\['pointsize'\\] = '11pt'" match)
4028 ;; insert at a point where latex_elements{} is defined:
4029 (string-append match "\nlatex_elements['papersize'] = 'a4paper'")))
4030 (zero? (system* "python" "make.py" "html" "latex" "texinfo"))))
4031 (replace 'install
4032 (lambda* (#:key inputs outputs #:allow-other-keys)
4033 (let* ((data (string-append (assoc-ref outputs "out") "/share"))
4034 (doc (string-append data "/doc/python-matplotlib-" ,version))
4035 (info (string-append data "/info"))
4036 (html (string-append doc "/html")))
4037 (mkdir-p html)
4038 (mkdir-p info)
4039 (copy-recursively "build/html" html)
4040 (symlink (string-append html "/_images")
4041 (string-append info "/matplotlib-figures"))
4042 (with-directory-excursion "build/texinfo"
4043 (substitute* "matplotlib.texi"
4044 (("@image\\{([^,]*)" all file)
4045 (string-append "@image{matplotlib-figures/" file)))
4046 (symlink (string-append html "/_images")
4047 "./matplotlib-figures")
4048 (system* "makeinfo" "--no-split"
4049 "-o" "matplotlib.info" "matplotlib.texi"))
4050 (copy-file "build/texinfo/matplotlib.info"
4051 (string-append info "/matplotlib.info"))
4052 (copy-file "build/latex/Matplotlib.pdf"
4053 (string-append doc "/Matplotlib.pdf")))
4054 #t)))))
4055 (home-page (package-home-page python-matplotlib))
4056 (synopsis "Documentation for the python-matplotlib package")
4057 (description (package-description python-matplotlib))
4058 (license (package-license python-matplotlib))))
4059
4060 (define-public python2-matplotlib-documentation
4061 (package-with-python2 python-matplotlib-documentation))
4062
4063 (define-public python2-pysnptools
4064 (package
4065 (name "python2-pysnptools")
4066 (version "0.3.9")
4067 (source
4068 (origin
4069 (method url-fetch)
4070 (uri (pypi-uri "pysnptools" version ".zip"))
4071 (sha256
4072 (base32
4073 "1wybggjzz8zw7aav4pjsg2h22xp17a1lghrprza1pxwlm7wf96y2"))))
4074 (build-system python-build-system)
4075 (arguments
4076 `(#:python ,python-2)) ; only Python 2.7 is supported
4077 (propagated-inputs
4078 `(("python2-numpy" ,python2-numpy)
4079 ("python2-scipy" ,python2-scipy)
4080 ("python2-pandas" ,python2-pandas)))
4081 (native-inputs
4082 `(("python2-cython" ,python2-cython)))
4083 (native-inputs
4084 `(("unzip" ,unzip)))
4085 (home-page "http://research.microsoft.com/en-us/um/redmond/projects/mscompbio/")
4086 (synopsis "Library for reading and manipulating genetic data")
4087 (description
4088 "PySnpTools is a library for reading and manipulating genetic data. It
4089 can, for example, efficiently read whole PLINK *.bed/bim/fam files or parts of
4090 those files. It can also efficiently manipulate ranges of integers using set
4091 operators such as union, intersection, and difference.")
4092 (license license:asl2.0)))
4093
4094 (define-public python-rpy2
4095 (package
4096 (name "python-rpy2")
4097 (version "2.7.6")
4098 (source
4099 (origin
4100 (method url-fetch)
4101 (uri (pypi-uri "rpy2" version))
4102 (sha256
4103 (base32
4104 "0nhan2qvrw7b7gg5zddwa22kybdv3x1g26vkd7q8lvnkgzrs4dga"))))
4105 (build-system python-build-system)
4106 (arguments
4107 '(#:phases
4108 (modify-phases %standard-phases
4109 (delete 'check)
4110 (add-after 'install 'check
4111 (lambda* (#:key outputs inputs #:allow-other-keys)
4112 ;; It's easier to run tests after install.
4113 ;; Make installed package available for running the tests
4114 (add-installed-pythonpath inputs outputs)
4115 (zero? (system* "python" "-m" "rpy2.tests" "-v")))))))
4116 (propagated-inputs
4117 `(("python-six" ,python-six)))
4118 (inputs
4119 `(("readline" ,readline)
4120 ("icu4c" ,icu4c)
4121 ("pcre" ,pcre)
4122 ("r-minimal" ,r-minimal)
4123 ("r-survival" ,r-survival)))
4124 (native-inputs
4125 `(("zlib" ,zlib)))
4126 (home-page "http://rpy.sourceforge.net/")
4127 (synopsis "Python interface to the R language")
4128 (description "rpy2 is a redesign and rewrite of rpy. It is providing a
4129 low-level interface to R from Python, a proposed high-level interface,
4130 including wrappers to graphical libraries, as well as R-like structures and
4131 functions.")
4132 (license license:gpl3+)))
4133
4134 (define-public python2-rpy2
4135 (let ((rpy2 (package-with-python2 python-rpy2)))
4136 (package (inherit rpy2)
4137 (propagated-inputs
4138 `(("python2-singledispatch" ,python2-singledispatch)
4139 ,@(package-propagated-inputs rpy2))))))
4140
4141 (define-public python-scipy
4142 (package
4143 (name "python-scipy")
4144 (version "0.18.1")
4145 (source
4146 (origin
4147 (method url-fetch)
4148 (uri (string-append "https://github.com/scipy/scipy/archive/v"
4149 version ".tar.gz"))
4150 (file-name (string-append name "-" version ".tar.gz"))
4151 (sha256
4152 (base32
4153 "17slsrfawjp7if6qrlx03zhgp05350ginxx8ddpw9zqx43x905sn"))))
4154 (build-system python-build-system)
4155 (propagated-inputs
4156 `(("python-numpy" ,python-numpy)
4157 ("python-matplotlib" ,python-matplotlib)
4158 ("python-pyparsing" ,python-pyparsing)))
4159 (inputs
4160 `(("lapack" ,lapack)
4161 ("openblas" ,openblas)))
4162 (native-inputs
4163 `(("python-cython" ,python-cython)
4164 ("python-nose" ,python-nose)
4165 ("python-sphinx" ,python-sphinx)
4166 ("python-numpydoc" ,python-numpydoc)
4167 ("gfortran" ,gfortran)
4168 ("perl" ,perl)))
4169 (outputs '("out" "doc"))
4170 (arguments
4171 `(#:phases
4172 (modify-phases %standard-phases
4173 (add-before 'build 'configure-openblas
4174 (lambda* (#:key inputs #:allow-other-keys)
4175 (call-with-output-file "site.cfg"
4176 (lambda (port)
4177 (format port
4178 "[blas]
4179 libraries = openblas
4180 library_dirs = ~a/lib
4181 include_dirs = ~a/include
4182
4183 # backslash-n to make emacs happy
4184 \n[atlas]
4185 library_dirs = ~a/lib
4186 atlas_libs = openblas
4187 "
4188 (assoc-ref inputs "openblas")
4189 (assoc-ref inputs "openblas")
4190 (assoc-ref inputs "openblas"))))
4191 #t))
4192 (add-after 'install 'install-doc
4193 (lambda* (#:key inputs outputs #:allow-other-keys)
4194 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4195 (doc (string-append data "/doc/" ,name "-" ,version))
4196 (html (string-append doc "/html"))
4197 (pyver ,(string-append "PYVER=")))
4198 ;; Make installed package available for building the
4199 ;; documentation
4200 (add-installed-pythonpath inputs outputs)
4201 (with-directory-excursion "doc"
4202 ;; Fix generation of images for mathematical expressions.
4203 (substitute* (find-files "source" "conf\\.py")
4204 (("pngmath_use_preview = True")
4205 "pngmath_use_preview = False"))
4206 (mkdir-p html)
4207 (system* "make" "html" pyver)
4208 (with-directory-excursion "build/html"
4209 (for-each (lambda (file)
4210 (let* ((dir (dirname file))
4211 (tgt-dir (string-append html "/" dir)))
4212 (install-file file html)))
4213 (find-files "." ".*")))))
4214 #t))
4215 (add-after 'unpack 'fix-tests
4216 (lambda _
4217 (substitute* "scipy/integrate/tests/test_quadpack.py"
4218 (("libm.so") "libm.so.6"))
4219 #t))
4220 ;; Tests can only be run after the library has been installed and not
4221 ;; within the source directory.
4222 (delete 'check)
4223 (add-after 'install 'check
4224 (lambda* (#:key inputs outputs #:allow-other-keys)
4225 (add-installed-pythonpath inputs outputs)
4226 (with-directory-excursion "/tmp"
4227 (zero? (system* "python" "-c"
4228 "import scipy; scipy.test('full')")))
4229 #t)))))
4230 (home-page "http://www.scipy.org/")
4231 (synopsis "The Scipy library provides efficient numerical routines")
4232 (description "The SciPy library is one of the core packages that make up
4233 the SciPy stack. It provides many user-friendly and efficient numerical
4234 routines such as routines for numerical integration and optimization.")
4235 (properties `((python2-variant . ,(delay python2-scipy))))
4236 (license license:bsd-3)))
4237
4238 (define-public python2-scipy
4239 (package-with-python2
4240 (strip-python2-variant python-scipy)))
4241
4242 (define-public python-sockjs-tornado
4243 (package
4244 (name "python-sockjs-tornado")
4245 (version "1.0.3")
4246 (source
4247 (origin
4248 (method url-fetch)
4249 (uri (pypi-uri "sockjs-tornado" version))
4250 (sha256
4251 (base32
4252 "16cff40nniqsyvda1pb2j3b4zwmrw7y2g1vqq78lp20xpmhnwwkd"))))
4253 (build-system python-build-system)
4254 (arguments
4255 `(;; There are no tests, and running the test phase requires missing
4256 ;; dependencies
4257 #:tests? #f))
4258 (propagated-inputs
4259 `(("python-tornado" ,python-tornado)))
4260 (home-page "http://github.com/mrjoes/sockjs-tornado/")
4261 (synopsis
4262 "SockJS python server implementation on top of Tornado framework")
4263 (description
4264 "SockJS-tornado provides the server side counterpart to a SockJS client
4265 library, through the Tornado framework.
4266
4267 SockJS provides a low latency, full duplex, cross-domain communication channel
4268 between a web browser and web server.")
4269 (license license:expat)))
4270
4271 (define-public python2-sockjs-tornado
4272 (package-with-python2 python-sockjs-tornado))
4273
4274 (define-public python-socksipy-branch
4275 (package
4276 (name "python-socksipy-branch")
4277 (version "1.01")
4278 (source
4279 (origin
4280 (method url-fetch)
4281 (uri (pypi-uri "SocksiPy-branch" version))
4282 (sha256
4283 (base32
4284 "01l41v4g7fy9fzvinmjxy6zcbhgqaif8dhdqm4w90fwcw9h51a8p"))))
4285 (build-system python-build-system)
4286 (arguments
4287 `(#:tests? #f)) ; There are no tests
4288 (home-page "https://code.google.com/archive/p/socksipy-branch/")
4289 (synopsis "Python SOCKS module")
4290 (description
4291 "SocksiPy - A Python SOCKS client module. It provides a
4292 socket-like interface that supports connections to any TCP
4293 service through the use of a SOCKS4, SOCKS5 or HTTP proxy.
4294 The original version was developed by Dan Haim, this is a
4295 branch created by Mario Vilas to address some open issues,
4296 as the original project seems to have been abandoned circa 2007.")
4297 (license license:bsd-3)))
4298
4299 (define-public python2-socksipy-branch
4300 (package-with-python2 python-socksipy-branch))
4301
4302 (define-public python-sqlalchemy
4303 (package
4304 (name "python-sqlalchemy")
4305 (version "1.0.12")
4306 (source
4307 (origin
4308 (method url-fetch)
4309 (uri (string-append "https://pypi.python.org/packages/source/S/"
4310 "SQLAlchemy/SQLAlchemy-" version ".tar.gz"))
4311 (sha256
4312 (base32
4313 "1l8qclhd0s90w3pvwhi5mjxdwr5j7gw7cjka2fx6f2vqmq7f4yb6"))))
4314 (build-system python-build-system)
4315 (native-inputs
4316 `(("python-cython" ,python-cython) ;for c extensions
4317 ("python-pytest" ,python-pytest)
4318 ("python-mock" ,python-mock))) ;for tests
4319 (arguments
4320 `(#:phases (alist-replace
4321 'check
4322 (lambda _ (zero? (system* "py.test")))
4323 %standard-phases)))
4324 (home-page "http://www.sqlalchemy.org")
4325 (synopsis "Database abstraction library")
4326 (description
4327 "SQLAlchemy is the Python SQL toolkit and Object Relational Mapper that
4328 gives application developers the full power and flexibility of SQL. It
4329 provides a full suite of well known enterprise-level persistence patterns,
4330 designed for efficient and high-performing database access, adapted into a
4331 simple and Pythonic domain language.")
4332 (license license:x11)))
4333
4334 (define-public python2-sqlalchemy
4335 (package-with-python2 python-sqlalchemy))
4336
4337 (define-public python-pycodestyle
4338 (package
4339 (name "python-pycodestyle")
4340 (version "2.0.0")
4341 (source
4342 (origin
4343 (method url-fetch)
4344 (uri (pypi-uri "pycodestyle" version))
4345 (sha256
4346 (base32
4347 "1rz2v8506mdjdyxcnv9ygiw6v0d4dqx8z5sjyjm0w2v32h5l5w1p"))))
4348 (build-system python-build-system)
4349 (home-page "https://pycodestyle.readthedocs.io/")
4350 (synopsis "Python style guide checker")
4351 (description "@code{pycodestyle} (formerly pep8) is a tool to check
4352 Python code against some of the style conventions in
4353 @url{http://www.python.org/dev/peps/pep-0008/,PEP 8}.")
4354 (license license:expat)))
4355
4356 (define-public python2-pycodestyle
4357 (package-with-python2 python-pycodestyle))
4358
4359 (define-public python-orderedmultidict
4360 (package
4361 (name "python-orderedmultidict")
4362 (version "0.7.11")
4363 (source
4364 (origin
4365 (method url-fetch)
4366 (uri (pypi-uri "orderedmultidict" version))
4367 (sha256
4368 (base32
4369 "0dls862ibm7qbq4fnvwx0xn1v9hwyzywbff8xjjdr42dd75208yw"))))
4370 (build-system python-build-system)
4371 (arguments
4372 `(#:phases
4373 (modify-phases %standard-phases
4374 (add-after 'unpack 'fix-tests
4375 (lambda _
4376 ;; The package uses nosetest for running the tests.
4377 ;; Adding this initfile allows to run the test suite
4378 ;; without requiring nosetest.
4379 (zero? (system* "touch" "tests/__init__.py")))))))
4380 (propagated-inputs
4381 `(("python-six" ,python-six)))
4382 (native-inputs
4383 `(("python-pycodestyle" ,python-pycodestyle)))
4384 (home-page "https://github.com/gruns/orderedmultidict")
4385 (synopsis "Python Ordered Multivalue Dictionary - omdict")
4386 (description "This package contains a library for ordered multivalue
4387 dictionaries. A multivalue dictionary is a dictionary that can store
4388 multiple values for the same key. An ordered multivalue dictionary is a
4389 multivalue dictionary that retains the order of insertions and deletions.")
4390 (license license:unlicense)))
4391
4392 (define-public python2-orderedmultidict
4393 (package-with-python2 python-orderedmultidict))
4394
4395 (define-public python-furl
4396 (package
4397 (name "python-furl")
4398 (version "0.5.6")
4399 (source
4400 (origin
4401 (method url-fetch)
4402 (uri (pypi-uri "furl" version))
4403 (sha256
4404 (base32
4405 "0lzpfpm686hvz3sr1mcrnd1b3lgmnw8v59gb43wfi98r3b671pqc"))))
4406 (build-system python-build-system)
4407 (propagated-inputs
4408 `(("python-six" ,python-six)
4409 ("python-orderedmultidict" ,python-orderedmultidict)))
4410 (native-inputs
4411 `(("python-pycodestyle" ,python-pycodestyle)))
4412 (home-page "https://github.com/gruns/furl")
4413 (synopsis "URL manipulation in Python")
4414 (description "Furl provides an easy-to-use alternative to the
4415 @code{urllib} and @code{urlparse} modules for manipulating URLs.")
4416 (license license:unlicense)))
4417
4418 (define-public python2-furl
4419 (package-with-python2 python-furl))
4420
4421 (define-public python-flask-babel
4422 (package
4423 (name "python-flask-babel")
4424 (version "0.11.1")
4425 (source
4426 (origin
4427 (method url-fetch)
4428 (uri (pypi-uri "Flask-Babel" version))
4429 (sha256
4430 (base32
4431 "16b80cipdba9xj3jlaiaq6wgrgpjb70w3j01jjy9hbp4k71kd6yj"))))
4432 (build-system python-build-system)
4433 (propagated-inputs
4434 `(("python-flask" ,python-flask)
4435 ("python-babel" ,python-babel)
4436 ("python-jinja2" ,python-jinja2)
4437 ("python-pytz" ,python-pytz)))
4438 (home-page "https://github.com/python-babel/flask-babel")
4439 (synopsis "Add i18n/l10n support to Flask applications")
4440 (description "This package implements internationalization and localization
4441 support for Flask. This is based on the Python babel module as well as pytz -
4442 both of which are installed automatically if you install this library.")
4443 (license license:bsd-3)))
4444
4445 (define-public python2-flask-babel
4446 (package-with-python2 python-flask-babel))
4447
4448 (define-public python-sqlalchemy-utils
4449 (package
4450 (name "python-sqlalchemy-utils")
4451 (version "0.32.13")
4452 (source
4453 (origin
4454 (method url-fetch)
4455 (uri (pypi-uri "SQLAlchemy-Utils" version))
4456 (sha256
4457 (base32
4458 "0vsib7gidjamzsz6w4s5pdhxzxsrkghjnm4sqwk94igjrl3i5ixj"))))
4459 (build-system python-build-system)
4460 (arguments
4461 '(#:tests? #f)) ; FIXME: Many tests require a running database server.
4462 ;; #:phases
4463 ;; (modify-phases %standard-phases
4464 ;; (replace 'check
4465 ;; (lambda _
4466 ;; (zero? (system* "py.test" "sqlalchemy_utils" "tests")))))
4467 (propagated-inputs
4468 `(("python-six" ,python-six)
4469 ("python-sqlalchemy" ,python-sqlalchemy)))
4470 (native-inputs
4471 `(("python-dateutil" ,python-dateutil)
4472 ("python-flexmock" ,python-flexmock)
4473 ("python-psycopg2" ,python-psycopg2)
4474 ("python-pytest" ,python-pytest)
4475 ("python-pytz" ,python-pytz)))
4476 (home-page "https://github.com/kvesteri/sqlalchemy-utils")
4477 (synopsis "Various utility functions for SQLAlchemy")
4478 (description
4479 "SQLAlchemy-utils provides various utility functions and custom data types
4480 for SQLAlchemy. SQLAlchemy is an SQL database abstraction library for Python.
4481
4482 You might also want to install the following optional dependencies:
4483 @enumerate
4484 @item @code{python-passlib}
4485 @item @code{python-babel}
4486 @item @code{python-cryptography}
4487 @item @code{python-pytz}
4488 @item @code{python-psycopg2}
4489 @item @code{python-furl}
4490 @item @code{python-flask-babel}
4491 @end enumerate
4492 ")
4493 (license license:bsd-3)))
4494
4495 (define-public python2-sqlalchemy-utils
4496 (package-with-python2 python-sqlalchemy-utils))
4497
4498 (define-public python-alembic
4499 (package
4500 (name "python-alembic")
4501 (version "0.8.10")
4502 (source
4503 (origin
4504 (method url-fetch)
4505 (uri (pypi-uri "alembic" version))
4506 (sha256
4507 (base32
4508 "06br9sfqypnjlal6fsbnky3zb0askwcn3diz8k3kwa0qcblm0fqf"))))
4509 (build-system python-build-system)
4510 (native-inputs
4511 `(("python-mock" ,python-mock)
4512 ("python-pytest-cov" ,python-pytest-cov)))
4513 (propagated-inputs
4514 `(("python-sqlalchemy" ,python-sqlalchemy)
4515 ("python-mako" ,python-mako)
4516 ("python-editor" ,python-editor)))
4517 (home-page "http://bitbucket.org/zzzeek/alembic")
4518 (synopsis
4519 "Database migration tool for SQLAlchemy")
4520 (description
4521 "Alembic is a lightweight database migration tool for usage with the
4522 SQLAlchemy Database Toolkit for Python.")
4523 (license license:expat)))
4524
4525 (define-public python2-alembic
4526 (package-with-python2 python-alembic))
4527
4528 (define-public python-autopep8
4529 (package
4530 (name "python-autopep8")
4531 (version "1.2.4")
4532 (source
4533 (origin
4534 (method url-fetch)
4535 (uri (pypi-uri "autopep8" version))
4536 (sha256
4537 (base32
4538 "18parm383lfn42a00wklv3qf20p4v277f1x3cn58x019dqk1xqrq"))))
4539 (build-system python-build-system)
4540 (propagated-inputs
4541 `(("python-pep8" ,python-pep8)))
4542 (home-page "https://github.com/hhatto/autopep8")
4543 (synopsis "Format Python code according to the PEP 8 style guide")
4544 (description
4545 "@code{autopep8} automatically formats Python code to conform to
4546 the PEP 8 style guide. It uses the pycodestyle utility to determine
4547 what parts of the code needs to be formatted. @code{autopep8} is
4548 capable of fixing most of the formatting issues that can be reported
4549 by pycodestyle.")
4550 (license (license:non-copyleft
4551 "https://github.com/hhatto/autopep8/blob/master/LICENSE"))))
4552
4553 (define-public python2-autopep8
4554 (package-with-python2 python-autopep8))
4555
4556 (define-public python-distutils-extra
4557 (package
4558 (name "python-distutils-extra")
4559 (version "2.38")
4560 (source
4561 (origin
4562 (method url-fetch)
4563 (uri (string-append "https://launchpad.net/python-distutils-extra/trunk/"
4564 version "/+download/python-distutils-extra-"
4565 version ".tar.gz"))
4566 (sha256
4567 (base32
4568 "0lx15kcbby9zisx33p2h5hgakgwh2bvh0ibag8z0px4j6ifhs41x"))))
4569 (build-system python-build-system)
4570 (home-page "https://launchpad.net/python-distutils-extra/")
4571 (synopsis "Enhancements to Python's distutils")
4572 (description
4573 "The python-distutils-extra module enables you to easily integrate
4574 gettext support, themed icons, and scrollkeeper-based documentation into
4575 Python's distutils.")
4576 (license license:gpl2)))
4577
4578 (define-public python2-distutils-extra
4579 (package-with-python2 python-distutils-extra))
4580
4581 (define-public python2-elib.intl
4582 (package
4583 (name "python2-elib.intl")
4584 (version "0.0.3")
4585 (source
4586 (origin
4587 ;; This project doesn't tag releases or publish tarballs, so we take
4588 ;; source from a (semi-arbitrary, i.e. latest as of now) git commit.
4589 (method git-fetch)
4590 (uri (git-reference
4591 (url "https://github.com/dieterv/elib.intl.git")
4592 (commit "d09997cfef")))
4593 (sha256
4594 (base32
4595 "0y7vzff9xgbnaay7m0va1arl6g68ncwrvbgwl7jqlclsahzzb09d"))))
4596 (build-system python-build-system)
4597 (arguments
4598 ;; incompatible with Python 3 (exception syntax)
4599 `(#:python ,python-2
4600 #:tests? #f))
4601 (home-page "https://github.com/dieterv/elib.intl")
4602 (synopsis "Enhanced internationalization for Python")
4603 (description
4604 "The elib.intl module provides enhanced internationalization (I18N)
4605 services for your Python modules and applications.")
4606 (license license:lgpl3+)))
4607
4608 (define-public python-pillow
4609 (package
4610 (name "python-pillow")
4611 (version "3.3.3")
4612 (source
4613 (origin
4614 (method url-fetch)
4615 (uri (pypi-uri "Pillow" version))
4616 (patches (search-patches "python-pillow-freetype-2.7-test-failure.patch"))
4617 (sha256
4618 (base32
4619 "0xkv0p1d73gz0a1qaasf0ai4262g8f334j07vd60bjrxs2wr3nmj"))))
4620 (build-system python-build-system)
4621 (native-inputs
4622 `(("python-nose" ,python-nose)))
4623 (inputs
4624 `(("freetype" ,freetype)
4625 ("lcms" ,lcms)
4626 ("zlib" ,zlib)
4627 ("libjpeg" ,libjpeg)
4628 ("openjpeg" ,openjpeg)
4629 ("libtiff" ,libtiff)
4630 ("libwebp" ,libwebp)))
4631 (arguments
4632 `(#:phases (modify-phases %standard-phases
4633 (add-after
4634 'install 'check-installed
4635 (lambda* (#:key outputs inputs #:allow-other-keys)
4636 (begin
4637 (setenv "HOME" (getcwd))
4638 ;; Make installed package available for running the
4639 ;; tests
4640 (add-installed-pythonpath inputs outputs)
4641 (and (zero? (system* "python" "selftest.py"
4642 "--installed"))
4643 (zero? (system* "python" "test-installed.py"))))))
4644 (delete 'check))))
4645 (home-page "https://pypi.python.org/pypi/Pillow")
4646 (synopsis "Fork of the Python Imaging Library")
4647 (description
4648 "The Python Imaging Library adds image processing capabilities to your
4649 Python interpreter. This library provides extensive file format support, an
4650 efficient internal representation, and fairly powerful image processing
4651 capabilities. The core image library is designed for fast access to data
4652 stored in a few basic pixel formats. It should provide a solid foundation for
4653 a general image processing tool.")
4654 (license (license:x11-style
4655 "http://www.pythonware.com/products/pil/license.htm"
4656 "The PIL Software License"))))
4657
4658 (define-public python2-pillow
4659 (package-with-python2 python-pillow))
4660
4661 (define-public python-pycparser
4662 (package
4663 (name "python-pycparser")
4664 (version "2.17")
4665 (source
4666 (origin
4667 (method url-fetch)
4668 (uri (pypi-uri "pycparser" version))
4669 (sha256
4670 (base32
4671 "1dkkjri0miidqb1zcqhqljfa34fcy9k5akasgwsv6k622zlk3b0a"))))
4672 (outputs '("out" "doc"))
4673 (build-system python-build-system)
4674 (native-inputs
4675 `(("pkg-config" ,pkg-config)))
4676 (arguments
4677 `(#:phases
4678 (modify-phases %standard-phases
4679 (replace 'check
4680 (lambda _
4681 (with-directory-excursion "tests"
4682 (zero? (system* "python" "all_tests.py")))))
4683 (add-after 'install 'install-doc
4684 (lambda* (#:key outputs #:allow-other-keys)
4685 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4686 (doc (string-append data "/doc/" ,name "-" ,version))
4687 (examples (string-append doc "/examples")))
4688 (mkdir-p examples)
4689 (for-each (lambda (file)
4690 (copy-file (string-append "." file)
4691 (string-append doc file)))
4692 '("/README.rst" "/CHANGES" "/LICENSE"))
4693 (copy-recursively "examples" examples)))))))
4694 (home-page "https://github.com/eliben/pycparser")
4695 (synopsis "C parser in Python")
4696 (description
4697 "Pycparser is a complete parser of the C language, written in pure Python
4698 using the PLY parsing library. It parses C code into an AST and can serve as
4699 a front-end for C compilers or analysis tools.")
4700 (license license:bsd-3)))
4701
4702 (define-public python2-pycparser
4703 (package-with-python2 python-pycparser))
4704
4705 (define-public python-cffi
4706 (package
4707 (name "python-cffi")
4708 (version "1.4.2")
4709 (source
4710 (origin
4711 (method url-fetch)
4712 (uri (pypi-uri "cffi" version))
4713 (sha256
4714 (base32 "161rj52rzi3880lij17d6i9kvgkiwjilrqjs8405k8sf6ryif7cg"))))
4715 (build-system python-build-system)
4716 (outputs '("out" "doc"))
4717 (inputs
4718 `(("libffi" ,libffi)))
4719 (propagated-inputs ; required at run-time
4720 `(("python-pycparser" ,python-pycparser)))
4721 (native-inputs
4722 `(("pkg-config" ,pkg-config)
4723 ("python-sphinx" ,python-sphinx)
4724 ("python-pytest" ,python-pytest)))
4725 (arguments
4726 `(#:phases
4727 (alist-cons-after
4728 'install 'install-doc
4729 (lambda* (#:key outputs #:allow-other-keys)
4730 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4731 (doc (string-append data "/doc/" ,name "-" ,version))
4732 (html (string-append doc "/html")))
4733 (with-directory-excursion "doc"
4734 (system* "make" "html")
4735 (mkdir-p html)
4736 (copy-recursively "build/html" html))
4737 (copy-file "LICENSE" (string-append doc "/LICENSE"))))
4738 %standard-phases)))
4739 (home-page "http://cffi.readthedocs.org")
4740 (synopsis "Foreign function interface for Python")
4741 (description
4742 "Foreign Function Interface for Python calling C code.")
4743 (license license:expat)))
4744
4745 (define-public python2-cffi
4746 (package-with-python2 python-cffi))
4747
4748 (define-public python-xcffib
4749 (package
4750 (name "python-xcffib")
4751 (version "0.5.1")
4752 (source
4753 (origin
4754 (method url-fetch)
4755 (uri (pypi-uri "xcffib" version))
4756 (sha256
4757 (base32
4758 "09gbnmr5vn58mm8xi3fmd7fz6743cks6c46dphnxzwax6zsxmy60"))))
4759 (build-system python-build-system)
4760 (inputs
4761 `(("libxcb" ,libxcb)))
4762 (propagated-inputs
4763 `(("python-cffi" ,python-cffi) ; used at run time
4764 ("python-six" ,python-six)))
4765 (arguments
4766 `(;; FIXME: Tests need more work. See ".travis.yml" in the repository.
4767 #:tests? #f
4768 #:phases
4769 (modify-phases %standard-phases
4770 (add-after 'unpack 'fix-libxcb-path
4771 (lambda* (#:key inputs #:allow-other-keys)
4772 (let ((libxcb (assoc-ref inputs "libxcb")))
4773 (substitute* '("xcffib/__init__.py")
4774 (("^soname = \"") (string-append "soname = \"" libxcb "/lib/")))
4775 #t)))
4776 (add-after 'install 'install-doc
4777 (lambda* (#:key outputs #:allow-other-keys)
4778 (let ((doc (string-append (assoc-ref outputs "out") "/share"
4779 "/doc/" ,name "-" ,version)))
4780 (mkdir-p doc)
4781 (copy-file "README.md"
4782 (string-append doc "/README.md"))
4783 #t))))))
4784 (home-page "https://github.com/tych0/xcffib")
4785 (synopsis "XCB Python bindings")
4786 (description
4787 "Xcffib is a replacement for xpyb, an XCB Python bindings. It adds
4788 support for Python 3 and PyPy. It is based on cffi.")
4789 (license license:expat)))
4790
4791 (define-public python2-xcffib
4792 (package-with-python2 python-xcffib))
4793
4794 (define-public python-cairocffi
4795 (package
4796 (name "python-cairocffi")
4797 (version "0.8.0")
4798 (source
4799 (origin
4800 (method url-fetch)
4801 ;; The archive on pypi is missing the 'utils' directory!
4802 (uri (string-append "https://github.com/Kozea/cairocffi/archive/v"
4803 version ".tar.gz"))
4804 (file-name (string-append name "-" version ".tar.gz"))
4805 (sha256
4806 (base32
4807 "1rk2dvy3fxrga6bvvxc2fi5lbaynm5h4a0w0aaxyn3bc77rszjg9"))))
4808 (build-system python-build-system)
4809 (outputs '("out" "doc"))
4810 (inputs
4811 `(("gdk-pixbuf" ,gdk-pixbuf)
4812 ("cairo" ,cairo)))
4813 (native-inputs
4814 `(("pkg-config" ,pkg-config)
4815 ("python-sphinx" ,python-sphinx)
4816 ("python-docutils" ,python-docutils)))
4817 (propagated-inputs
4818 `(("python-xcffib" ,python-xcffib))) ; used at run time
4819 (arguments
4820 `(;; FIXME: Tests cannot find 'libcairo.so.2'.
4821 #:tests? #f
4822 #:phases
4823 (modify-phases %standard-phases
4824 (add-after 'install 'install-doc
4825 (lambda* (#:key inputs outputs #:allow-other-keys)
4826 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4827 (doc (string-append data "/doc/" ,name "-" ,version))
4828 (html (string-append doc "/html")))
4829 (setenv "LD_LIBRARY_PATH"
4830 (string-append (assoc-ref inputs "cairo") "/lib" ":"
4831 (assoc-ref inputs "gdk-pixbuf") "/lib"))
4832 (setenv "LANG" "en_US.UTF-8")
4833 (mkdir-p html)
4834 (for-each (lambda (file)
4835 (copy-file (string-append "." file)
4836 (string-append doc file)))
4837 '("/README.rst" "/CHANGES" "/LICENSE"))
4838 (system* "python" "setup.py" "build_sphinx")
4839 (copy-recursively "docs/_build/html" html)
4840 #t))))))
4841 (home-page "https://github.com/Kozea/cairocffi")
4842 (synopsis "Python bindings and object-oriented API for Cairo")
4843 (description
4844 "Cairocffi is a CFFI-based drop-in replacement for Pycairo, a set of
4845 Python bindings and object-oriented API for cairo. Cairo is a 2D vector
4846 graphics library with support for multiple backends including image buffers,
4847 PNG, PostScript, PDF, and SVG file output.")
4848 (license license:bsd-3)))
4849
4850 (define-public python2-cairocffi
4851 (package-with-python2 python-cairocffi))
4852
4853 (define-public python-decorator
4854 (package
4855 (name "python-decorator")
4856 (version "4.0.10")
4857 (source
4858 (origin
4859 (method url-fetch)
4860 (uri (pypi-uri "decorator" version))
4861 (sha256
4862 (base32 "0w7hg59hlpq74jpyja4yfryap0ccjvchgpkfp20rhj9krgnrhvlw"))))
4863 (build-system python-build-system)
4864 (arguments '(#:tests? #f)) ; no test target
4865 (home-page "https://pypi.python.org/pypi/decorator/")
4866 (synopsis "Python module to simplify usage of decorators")
4867 (description
4868 "The aim of the decorator module is to simplify the usage of decorators
4869 for the average programmer, and to popularize decorators usage giving examples
4870 of useful decorators, such as memoize, tracing, redirecting_stdout, locked,
4871 etc. The core of this module is a decorator factory.")
4872 (license license:expat)))
4873
4874 (define-public python2-decorator
4875 (package-with-python2 python-decorator))
4876
4877 (define-public python-drmaa
4878 (package
4879 (name "python-drmaa")
4880 (version "0.7.7")
4881 (source
4882 (origin
4883 (method url-fetch)
4884 (uri (string-append
4885 "https://pypi.python.org/packages/source/d/drmaa/drmaa-"
4886 version ".tar.gz"))
4887 (sha256
4888 (base32 "0xzqriqyvk5b8hszbavsyxd29wm3sxirm8zvvdm73rs2iq7w4hkx"))))
4889 (build-system python-build-system)
4890 ;; The test suite requires libdrmaa which is provided by the cluster
4891 ;; environment. At runtime the environment variable DRMAA_LIBRARY_PATH
4892 ;; should be set to the path of the libdrmaa library.
4893 (arguments '(#:tests? #f))
4894 (native-inputs
4895 `(("python-nose" ,python-nose)))
4896 (home-page "https://pypi.python.org/pypi/drmaa")
4897 (synopsis "Python bindings for the DRMAA library")
4898 (description
4899 "A Python package for Distributed Resource Management (DRM) job
4900 submission and control. This package is an implementation of the DRMAA 1.0
4901 Python language binding specification.")
4902 (license license:bsd-3)))
4903
4904 (define-public python2-drmaa
4905 (package-with-python2 python-drmaa))
4906
4907 (define-public python-gridmap
4908 (package
4909 (name "python-gridmap")
4910 (version "0.13.0")
4911 (source
4912 (origin
4913 (method url-fetch)
4914 (uri (string-append
4915 "https://github.com/pygridtools/gridmap/archive/v"
4916 version ".tar.gz"))
4917 (file-name (string-append name "-" version ".tar.gz"))
4918 (sha256
4919 (base32 "1gzjg2k6f14i1msm2b0ax8d9ds1hvk6qd5nlaivg8m4cxqp4cp1x"))))
4920 (build-system python-build-system)
4921 (arguments
4922 '(#:tests? #f)) ; FIXME: Requires python-cherrypy.
4923 (propagated-inputs
4924 `(("python-psutil" ,python-psutil)
4925 ("python-drmaa" ,python-drmaa)
4926 ("python-pyzmq" ,python-pyzmq)))
4927 (home-page "https://github.com/pygridtools/gridmap")
4928 (synopsis "Create jobs on a cluster directly from Python")
4929 (description
4930 "Gridmap is a Python package to allow you to easily create jobs on the
4931 cluster directly from Python. You can directly map Python functions onto the
4932 cluster without needing to write any wrapper code yourself.")
4933 (license license:gpl3+)))
4934
4935 (define-public python2-gridmap
4936 (package-with-python2 python-gridmap))
4937
4938 (define-public python-pexpect
4939 (package
4940 (name "python-pexpect")
4941 (version "4.2.1")
4942 (source
4943 (origin
4944 (method url-fetch)
4945 (uri (pypi-uri "pexpect" version))
4946 (sha256
4947 (base32 "14ls7k99pwvl21zqv65kzrhccv50j89m5ij1hf0slmsvlxjj84rx"))))
4948 (build-system python-build-system)
4949 (arguments
4950 `(#:phases
4951 (modify-phases %standard-phases
4952 (add-before 'check 'prepare-tests
4953 (lambda _
4954 (substitute* (find-files "tests")
4955 (("/bin/ls") (which "ls"))
4956 (("/bin/echo") (which "echo"))
4957 (("/bin/which") (which "which"))
4958 ;; Many tests try to use the /bin directory which
4959 ;; is not present in the build environment.
4960 ;; Use one that's non-empty and unlikely to change.
4961 (("/bin'") "/dev'"))
4962 ;; XXX: Socket connection test gets "Connection reset by peer".
4963 ;; Why does it not work? Delete for now.
4964 (delete-file "tests/test_socket.py")
4965 #t))
4966 (replace 'check (lambda _ (zero? (system* "nosetests" "-v")))))))
4967 (native-inputs
4968 `(("python-nose" ,python-nose)
4969 ("python-pytest" ,python-pytest-3.0)
4970 ("man-db" ,man-db)
4971 ("which" ,which)))
4972 (propagated-inputs
4973 `(("python-ptyprocess" ,python-ptyprocess)))
4974 (home-page "http://pexpect.readthedocs.org/")
4975 (synopsis "Controlling interactive console applications")
4976 (description
4977 "Pexpect is a pure Python module for spawning child applications;
4978 controlling them; and responding to expected patterns in their output.
4979 Pexpect works like Don Libes’ Expect. Pexpect allows your script to spawn a
4980 child application and control it as if a human were typing commands.")
4981 (license license:isc)))
4982
4983 (define-public python2-pexpect
4984 (package-with-python2 python-pexpect))
4985
4986 (define-public python-setuptools-scm
4987 (package
4988 (name "python-setuptools-scm")
4989 (version "1.15.0")
4990 (source (origin
4991 (method url-fetch)
4992 (uri (pypi-uri "setuptools_scm" version))
4993 (sha256
4994 (base32
4995 "0bwyc5markib0i7i2qlyhdzxhiywzxbkfiapldma8m91m82jvwfs"))))
4996 (build-system python-build-system)
4997 (home-page "https://github.com/pypa/setuptools_scm/")
4998 (synopsis "Manage Python package versions in SCM metadata")
4999 (description
5000 "Setuptools_scm handles managing your Python package versions in
5001 @dfn{software configuration management} (SCM) metadata instead of declaring
5002 them as the version argument or in a SCM managed file.")
5003 (license license:expat)))
5004
5005 (define-public python2-setuptools-scm
5006 (package-with-python2 python-setuptools-scm))
5007
5008 (define-public python-pathpy
5009 (package
5010 (name "python-pathpy")
5011 (version "8.1.1")
5012 (source
5013 (origin
5014 (method url-fetch)
5015 (uri (string-append "https://pypi.python.org/packages/source/p/"
5016 "path.py/path.py-" version ".tar.gz"))
5017 (sha256
5018 (base32 "1p8s1l2vfkqhqxdhqlj0g1jjw4f1as2frr35sjcpjjpd5a89y41f"))))
5019 (outputs '("out" "doc"))
5020 (build-system python-build-system)
5021 (propagated-inputs
5022 `(("python-appdirs" ,python-appdirs)))
5023 (native-inputs
5024 `(("python-setuptools-scm" ,python-setuptools-scm)
5025 ("python-sphinx" ,python-sphinx)
5026 ("python-rst.linker" ,python-rst.linker)
5027 ("python-pytest" ,python-pytest)
5028 ("python-pytest-runner" ,python-pytest-runner)))
5029 (arguments
5030 `(#:phases
5031 (modify-phases %standard-phases
5032 (add-after 'build 'build-doc
5033 (lambda _
5034 (setenv "LANG" "en_US.UTF-8")
5035 (zero? (system* "python" "setup.py" "build_sphinx"))))
5036 (add-after 'install 'install-doc
5037 (lambda* (#:key outputs #:allow-other-keys)
5038 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
5039 (doc (string-append data "/doc/" ,name "-" ,version))
5040 (html (string-append doc "/html")))
5041 (mkdir-p html)
5042 (for-each (lambda (file)
5043 (copy-file file (string-append doc "/" file)))
5044 '("README.rst" "CHANGES.rst"))
5045 (copy-recursively "build/sphinx/html" html)))))))
5046 (home-page "https://github.com/jaraco/path.py")
5047 (synopsis "Python module wrapper for built-in os.path")
5048 (description
5049 "@code{path.py} implements path objects as first-class entities, allowing
5050 common operations on files to be invoked on those path objects directly.")
5051 (license license:expat)))
5052
5053 (define-public python2-pathpy
5054 (package-with-python2 python-pathpy))
5055
5056 (define-public python-pickleshare
5057 (package
5058 (name "python-pickleshare")
5059 (version "0.5")
5060 (source
5061 (origin
5062 (method url-fetch)
5063 (uri (string-append "https://pypi.python.org/packages/source/p/"
5064 "pickleshare/pickleshare-" version ".tar.gz"))
5065 (sha256
5066 (base32 "11ljr90j3p6qswdrbl7p4cjb2i93f6vn0vx9anzpshsx0d2mggn0"))))
5067 (build-system python-build-system)
5068 (propagated-inputs
5069 `(("python-pathpy" ,python-pathpy)))
5070 (home-page "https://github.com/vivainio/pickleshare")
5071 (synopsis "Tiny key value database with concurrency support")
5072 (description
5073 "PickleShare is a small ‘shelve’-like datastore with concurrency support.
5074 Like shelve, a PickleShareDB object acts like a normal dictionary. Unlike
5075 shelve, many processes can access the database simultaneously. Changing a
5076 value in database is immediately visible to other processes accessing the same
5077 database. Concurrency is possible because the values are stored in separate
5078 files. Hence the “database” is a directory where all files are governed by
5079 PickleShare.")
5080 (license license:expat)))
5081
5082 (define-public python2-pickleshare
5083 (package-with-python2 python-pickleshare))
5084
5085 (define-public python-simplegeneric
5086 (package
5087 (name "python-simplegeneric")
5088 (version "0.8.1")
5089 (source
5090 (origin
5091 (method url-fetch)
5092 (uri (string-append "https://pypi.python.org/packages/source/s/"
5093 "simplegeneric/simplegeneric-" version ".zip"))
5094 (sha256
5095 (base32 "0wwi1c6md4vkbcsfsf8dklf3vr4mcdj4mpxkanwgb6jb1432x5yw"))))
5096 (build-system python-build-system)
5097 (native-inputs
5098 `(("unzip" ,unzip)))
5099 (home-page "http://cheeseshop.python.org/pypi/simplegeneric")
5100 (synopsis "Python module for simple generic functions")
5101 (description
5102 "The simplegeneric module lets you define simple single-dispatch generic
5103 functions, akin to Python’s built-in generic functions like @code{len()},
5104 @code{iter()} and so on. However, instead of using specially-named methods,
5105 these generic functions use simple lookup tables, akin to those used by
5106 e.g. @code{pickle.dump()} and other generic functions found in the Python
5107 standard library.")
5108 (license license:zpl2.1)))
5109
5110 (define-public python2-simplegeneric
5111 (package-with-python2 python-simplegeneric))
5112
5113 (define-public python-ipython-genutils
5114 ;; TODO: This package is retired, check if can be removed, see description.
5115 (package
5116 (name "python-ipython-genutils")
5117 (version "0.1.0")
5118 (source
5119 (origin
5120 (method url-fetch)
5121 (uri (string-append "https://pypi.python.org/packages/source/i/"
5122 "ipython_genutils/ipython_genutils-"
5123 version ".tar.gz"))
5124 (sha256
5125 (base32 "19l2pp1c64ansr89l3cqh19jdi2ixhssdzx0vz4n6r52a6i281is"))))
5126 (build-system python-build-system)
5127 (arguments `(#:tests? #f)) ; no tests
5128 (home-page "http://ipython.org")
5129 (synopsis "Vestigial utilities from IPython")
5130 (description
5131 "This package provides retired utilities from IPython. No packages
5132 outside IPython/Jupyter should depend on it.
5133
5134 This package shouldn't exist. It contains some common utilities shared by
5135 Jupyter and IPython projects during The Big Split. As soon as possible, those
5136 packages will remove their dependency on this, and this package will go
5137 away.")
5138 (license license:bsd-3)))
5139
5140 (define-public python2-ipython-genutils
5141 (package-with-python2 python-ipython-genutils))
5142
5143 (define-public python-traitlets
5144 (package
5145 (name "python-traitlets")
5146 (version "4.2.0")
5147 (source
5148 (origin
5149 (method url-fetch)
5150 (uri (pypi-uri "traitlets" version))
5151 (sha256
5152 (base32
5153 "1afy08sa5n9gnkvh3da49c16zkyv598vchv0p1hp7zzjy8895hz4"))))
5154 (build-system python-build-system)
5155 (arguments
5156 `(#:phases
5157 (modify-phases %standard-phases
5158 (replace 'check (lambda _ (zero? (system* "nosetests")))))))
5159 (propagated-inputs
5160 `(("python-ipython-genutils" ,python-ipython-genutils)
5161 ("python-decorator" ,python-decorator)))
5162 (native-inputs
5163 `(("python-mock" ,python-mock)
5164 ("python-nose" ,python-nose)))
5165 (home-page "http://ipython.org")
5166 (synopsis "Configuration system for Python applications")
5167 (description
5168 "Traitlets is a framework that lets Python classes have attributes with
5169 type checking, dynamically calculated default values, and ‘on change’
5170 callbacks. The package also includes a mechanism to use traitlets for
5171 configuration, loading values from files or from command line arguments. This
5172 is a distinct layer on top of traitlets, so you can use traitlets in your code
5173 without using the configuration machinery.")
5174 (license license:bsd-3)))
5175
5176 (define-public python2-traitlets
5177 (package-with-python2 python-traitlets))
5178
5179 (define-public python-jupyter-core
5180 (package
5181 (name "python-jupyter-core")
5182 (version "4.2.1")
5183 (source
5184 (origin
5185 (method url-fetch)
5186 (uri (string-append (pypi-uri "jupyter_core" version)))
5187 (sha256
5188 (base32
5189 "1cy7inv218dgh4m1fbzbsiqpz733ylgjrj62jxqpfzs3r2cm7ic9"))))
5190 (build-system python-build-system)
5191 ;; FIXME: not sure how to run the tests
5192 (arguments `(#:tests? #f))
5193 (propagated-inputs
5194 `(("python-traitlets" ,python-traitlets)))
5195 (home-page "http://jupyter.org/")
5196 (synopsis "Jupyter base package")
5197 (description
5198 "Jupyter core is the base package on which Jupyter projects rely.")
5199 (license license:bsd-3)))
5200
5201 (define-public python2-jupyter-core
5202 (package-with-python2 python-jupyter-core))
5203
5204 (define-public python-jupyter-client
5205 (package
5206 (name "python-jupyter-client")
5207 (version "4.4.0")
5208 (source
5209 (origin
5210 (method url-fetch)
5211 (uri (pypi-uri "jupyter_client" version))
5212 (sha256
5213 (base32
5214 "1vjjrpjw7k5sh982pbjnslv7byfbfazjw9g92jvs7dz5qbx556n9"))))
5215 (build-system python-build-system)
5216 ;; Tests fail because of missing native python kernel which I assume is
5217 ;; provided by the ipython package, which we cannot use because it would
5218 ;; cause a dependency cycle.
5219 (arguments `(#:tests? #f))
5220 (propagated-inputs
5221 `(("python-pyzmq" ,python-pyzmq)
5222 ("python-traitlets" ,python-traitlets)
5223 ("python-jupyter-core" ,python-jupyter-core)))
5224 (home-page "http://jupyter.org/")
5225 (synopsis "Jupyter protocol implementation and client libraries")
5226 (description
5227 "The @code{jupyter_client} package contains the reference implementation
5228 of the Jupyter protocol. It also provides client and kernel management APIs
5229 for working with kernels, and the @code{jupyter kernelspec} entrypoint for
5230 installing @code{kernelspec}s for use with Jupyter frontends.")
5231 (license license:bsd-3)))
5232
5233 (define-public python2-jupyter-client
5234 (package-with-python2 python-jupyter-client))
5235
5236 (define-public python-ipykernel
5237 (package
5238 (name "python-ipykernel")
5239 (version "4.5.2")
5240 (source
5241 (origin
5242 (method url-fetch)
5243 (uri (pypi-uri "ipykernel" version))
5244 (sha256
5245 (base32 "0qllv0k6zzv1r1cj1x2ygxmlrrqhbslzj8rc6r6fg3kc1rgz4m2s"))))
5246 (build-system python-build-system)
5247 ;; The tests load a submodule of IPython. However, IPython itself depends
5248 ;; on ipykernel.
5249 (arguments `(#:tests? #f))
5250 (propagated-inputs
5251 ;; imported at runtime during connect
5252 `(("python-jupyter-client" ,python-jupyter-client)))
5253 (home-page "http://ipython.org")
5254 (synopsis "IPython Kernel for Jupyter")
5255 (description
5256 "This package provides the IPython kernel for Jupyter.")
5257 (license license:bsd-3)))
5258
5259 (define-public python2-ipykernel
5260 (package-with-python2 python-ipykernel))
5261
5262 (define-public python-testpath
5263 (package
5264 (name "python-testpath")
5265 (version "0.2")
5266 (source
5267 (origin
5268 (method url-fetch)
5269 (uri (string-append "https://github.com/jupyter/testpath/archive/"
5270 version ".tar.gz"))
5271 (file-name (string-append name "-" version ".tar.gz"))
5272 (sha256
5273 (base32
5274 "04kh3fgvmqz6cfcw79q70qwjz7ib7lxm27cc548iy2rpr33qqf55"))))
5275 (build-system python-build-system)
5276 (arguments
5277 `(#:tests? #f ; this package does not even have a setup.py
5278 #:modules ((guix build python-build-system)
5279 (guix build utils)
5280 (srfi srfi-1))
5281 #:imported-modules (,@%python-build-system-modules
5282 (srfi srfi-1))
5283 #:phases
5284 (modify-phases %standard-phases
5285 (delete 'install)
5286 (replace 'build
5287 (lambda* (#:key inputs outputs #:allow-other-keys)
5288 (let* ((version (last
5289 (string-split (assoc-ref inputs "python") #\-)))
5290 (x.y (string-join (take (string-split version #\.) 2)
5291 "."))
5292 (dir (string-append
5293 (assoc-ref outputs "out")
5294 "/lib/python" x.y "/site-packages/testpath")))
5295 (mkdir-p dir)
5296 (copy-recursively "testpath" dir))
5297 #t)))))
5298 (home-page "https://github.com/takluyver/testpath")
5299 (synopsis "Test utilities for code working with files and commands")
5300 (description
5301 "Testpath is a collection of utilities for Python code working with files
5302 and commands. It contains functions to check things on the filesystem, and
5303 tools for mocking system commands and recording calls to those.")
5304 (license license:expat)))
5305
5306 (define-public python2-testpath
5307 (package-with-python2 python-testpath))
5308
5309 (define-public python-ipython
5310 (package
5311 (name "python-ipython")
5312 (version "5.2.2")
5313 (source
5314 (origin
5315 (method url-fetch)
5316 (uri (pypi-uri "ipython" version ".tar.gz"))
5317 (sha256
5318 (base32 "1qhjwa9cyz1np7rhv3p4ip13lkgbqsad62l24xkwiq1ic2gwiqbf"))))
5319 (build-system python-build-system)
5320 (outputs '("out" "doc"))
5321 (propagated-inputs
5322 `(("python-pyzmq" ,python-pyzmq)
5323 ("python-prompt-toolkit" ,python-prompt-toolkit)
5324 ("python-terminado" ,python-terminado)
5325 ("python-matplotlib" ,python-matplotlib)
5326 ("python-numpy" ,python-numpy)
5327 ("python-numpydoc" ,python-numpydoc)
5328 ("python-jinja2" ,python-jinja2)
5329 ("python-mistune" ,python-mistune)
5330 ("python-pexpect" ,python-pexpect)
5331 ("python-pickleshare" ,python-pickleshare)
5332 ("python-simplegeneric" ,python-simplegeneric)
5333 ("python-jsonschema" ,python-jsonschema)
5334 ("python-traitlets" ,python-traitlets)
5335 ("python-ipykernel" ,python-ipykernel)
5336 ("python-nbformat" ,python-nbformat)
5337 ("python-pygments" ,python-pygments)))
5338 (inputs
5339 `(("readline" ,readline)
5340 ("which" ,which)))
5341 (native-inputs
5342 `(("graphviz" ,graphviz)
5343 ("pkg-config" ,pkg-config)
5344 ("python-requests" ,python-requests) ;; for tests
5345 ("python-testpath" ,python-testpath)
5346 ("python-nose" ,python-nose)
5347 ("python-sphinx" ,python-sphinx)
5348 ("python-shpinx-rtd-theme" ,python-sphinx-rtd-theme)
5349 ("texlive" ,texlive)
5350 ("texinfo" ,texinfo)))
5351 (arguments
5352 `(#:phases
5353 (modify-phases %standard-phases
5354 (add-after
5355 'install 'install-doc
5356 (lambda* (#:key inputs outputs #:allow-other-keys)
5357 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
5358 (doc (string-append data "/doc/" ,name "-" ,version))
5359 (html (string-append doc "/html"))
5360 (man1 (string-append data "/man/man1"))
5361 (info (string-append data "/info"))
5362 (examples (string-append doc "/examples"))
5363 (python-arg (string-append "PYTHON=" (which "python"))))
5364 (setenv "LANG" "en_US.utf8")
5365 ;; Make installed package available for running the tests
5366 (add-installed-pythonpath inputs outputs)
5367 (with-directory-excursion "docs"
5368 ;; FIXME: pdf fails to build
5369 ;;(system* "make" "pdf" "PAPER=a4")
5370 (system* "make" python-arg "html")
5371 (system* "make" python-arg "info"))
5372 (copy-recursively "docs/man" man1)
5373 (copy-recursively "examples" examples)
5374 (copy-recursively "docs/build/html" html)
5375 ;; (copy-file "docs/build/latex/ipython.pdf"
5376 ;; (string-append doc "/ipython.pdf"))
5377 (mkdir-p info)
5378 (copy-file "docs/build/texinfo/ipython.info"
5379 (string-append info "/ipython.info"))
5380 (copy-file "COPYING.rst" (string-append doc "/COPYING.rst")))))
5381 ;; Tests can only be run after the library has been installed and not
5382 ;; within the source directory.
5383 (delete 'check)
5384 (add-after
5385 'install 'check
5386 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
5387 (if tests?
5388 (with-directory-excursion "/tmp"
5389 ;; Make installed package available for running the tests
5390 (add-installed-pythonpath inputs outputs)
5391 (setenv "HOME" "/tmp/") ;; required by a test
5392 (zero? (system* (string-append (assoc-ref outputs "out")
5393 "/bin/iptest"))))
5394 #t)))
5395 (add-before
5396 'install 'fix-tests
5397 (lambda* (#:key inputs #:allow-other-keys)
5398 (substitute* "./IPython/utils/_process_posix.py"
5399 (("/usr/bin/env', 'which") (which "which")))
5400 (substitute* "./IPython/core/tests/test_inputtransformer.py"
5401 (("#!/usr/bin/env python")
5402 (string-append "#!" (which "python"))))
5403 ;; Disable 1 failing test
5404 (substitute* "./IPython/core/tests/test_magic.py"
5405 (("def test_dirops\\(\\):" all)
5406 (string-append "@dec.skipif(True)\n" all))))))))
5407 (home-page "http://ipython.org")
5408 (synopsis "IPython is a tool for interactive computing in Python")
5409 (description
5410 "IPython provides a rich architecture for interactive computing with:
5411 Powerful interactive shells, a browser-based notebook, support for interactive
5412 data visualization, embeddable interpreters and tools for parallel
5413 computing.")
5414 (license license:bsd-3)
5415 (properties `((python2-variant . ,(delay python2-ipython))))))
5416
5417 (define-public python2-ipython
5418 (let ((ipython (package-with-python2 (strip-python2-variant python-ipython))))
5419 (package
5420 (inherit ipython)
5421 ;; FIXME: add pyreadline once available.
5422 (propagated-inputs
5423 `(("python2-backports-shutil-get-terminal-size"
5424 ,python2-backports-shutil-get-terminal-size)
5425 ("python2-pathlib2" ,python2-pathlib2)
5426 ,@(package-propagated-inputs ipython)))
5427 (native-inputs
5428 `(("python2-mock" ,python2-mock)
5429 ,@(package-native-inputs ipython))))))
5430
5431 (define-public python-isodate
5432 (package
5433 (name "python-isodate")
5434 (version "0.5.4")
5435 (source
5436 (origin
5437 (method url-fetch)
5438 (uri (pypi-uri "isodate" version))
5439 (sha256
5440 (base32
5441 "0cafaiwixgpxwh9dsd28qb0dbzsj6xpxjdkyk30ns91ps10mq422"))))
5442 (build-system python-build-system)
5443 (home-page
5444 "http://cheeseshop.python.org/pypi/isodate")
5445 (synopsis
5446 "Python date parser and formatter")
5447 (description
5448 "Python-isodate is a python module for parsing and formatting
5449 ISO 8601 dates, time and duration.")
5450 (license license:bsd-3)))
5451
5452 (define-public python2-isodate
5453 (package-with-python2 python-isodate))
5454
5455 (define-public python-html5lib
5456 (package
5457 (name "python-html5lib")
5458 (version "1.0b10")
5459 (source
5460 (origin
5461 (method url-fetch)
5462 (uri (pypi-uri "html5lib" version))
5463 (sha256
5464 (base32
5465 "1yd068a5c00wd0ajq0hqimv7fd82lhrw0w3s01vbhy9bbd6xapqd"))))
5466 (build-system python-build-system)
5467 (propagated-inputs
5468 `(("python-six" ,python-six)
5469 ("python-webencodings" ,python-webencodings)))
5470 (arguments
5471 `(#:test-target "check"))
5472 (home-page
5473 "https://github.com/html5lib/html5lib-python")
5474 (synopsis
5475 "Python HTML parser based on the WHATWG HTML specifcation")
5476 (description
5477 "Html5lib is an HTML parser based on the WHATWG HTML specifcation
5478 and written in Python.")
5479 (license license:expat)))
5480
5481 (define-public python2-html5lib
5482 (package-with-python2 python-html5lib))
5483
5484 ;; Needed for python-bleach, a dependency of python-notebook
5485 (define-public python-html5lib-0.9
5486 (package
5487 (inherit python-html5lib)
5488 (version "0.999")
5489 (source
5490 (origin
5491 (method url-fetch)
5492 (uri (pypi-uri "html5lib" version))
5493 (sha256
5494 (base32
5495 "17n4zfsj6ynmbwdwviywmj8r6nzr3xvfx2zs0xhndmvm51z7z263"))))))
5496
5497 (define-public python2-html5lib-0.9
5498 (package-with-python2 python-html5lib-0.9))
5499
5500 (define-public python-webencodings
5501 (package
5502 (name "python-webencodings")
5503 (version "0.5")
5504 (source (origin
5505 (method url-fetch)
5506 (uri (pypi-uri "webencodings" version))
5507 (sha256
5508 (base32
5509 "015rw7662lkpb9aqiqah2hbizk6w531badqwjpz41rr47glmxid5"))))
5510 (build-system python-build-system)
5511 (arguments
5512 '(#:phases
5513 (modify-phases %standard-phases
5514 (replace 'check
5515 (lambda _
5516 (zero? (system* "py.test" "-v" "webencodings/tests.py")))))))
5517 (native-inputs
5518 `(("python-pytest" ,python-pytest)))
5519 (home-page "https://github.com/SimonSapin/python-webencodings")
5520 (synopsis "Character encoding aliases for legacy web content")
5521 (description
5522 "In order to be compatible with legacy web content when interpreting
5523 something like @code{Content-Type: text/html; charset=latin1}, tools need
5524 to use a particular set of aliases for encoding labels as well as some
5525 overriding rules. For example, @code{US-ASCII} and @code{iso-8859-1} on
5526 the web are actually aliases for @code{windows-1252}, and an @code{UTF-8}
5527 or @code{UTF-16} BOM takes precedence over any other encoding declaration.
5528 The WHATWG @url{https://encoding.spec.whatwg.org/,Encoding} standard
5529 defines all such details so that implementations do not have to
5530 reverse-engineer each other.
5531
5532 This module implements the Encoding standard and has encoding labels and
5533 BOM detection, but the actual implementation for encoders and decoders
5534 is Python’s.")
5535 (license license:bsd-3)))
5536
5537 (define-public python2-webencodings
5538 (package-with-python2 python-webencodings))
5539
5540 (define-public python-urwid
5541 (package
5542 (name "python-urwid")
5543 (version "1.3.1")
5544 (source
5545 (origin
5546 (method url-fetch)
5547 (uri (pypi-uri "urwid" version))
5548 (sha256
5549 (base32
5550 "18cnd1wdjcas08x5qwa5ayw6jsfcn33w4d9f7q3s29fy6qzc1kng"))))
5551 (build-system python-build-system)
5552 (arguments
5553 `(#:phases
5554 (modify-phases %standard-phases
5555 ;; Disable failing test. Bug filed upstream:
5556 ;; https://github.com/wardi/urwid/issues/164
5557 ;; TODO: check again for python-urwid > 1.3.1 or python > 3.4.3.
5558 (add-after 'unpack 'disable-failing-test
5559 (lambda _
5560 (substitute* "urwid/tests/test_event_loops.py"
5561 (("test_remove_watch_file")
5562 "disable_remove_watch_file")))))))
5563 (home-page "http://urwid.org")
5564 (synopsis "Console user interface library for Python")
5565 (description
5566 "Urwid is a curses-based UI/widget library for Python. It includes many
5567 features useful for text console applications.")
5568 (license license:lgpl2.1+)))
5569
5570 (define-public python2-urwid
5571 (let ((python2-urwid (package-with-python2 python-urwid)))
5572 (package
5573 (inherit python2-urwid)
5574 (arguments
5575 (append
5576 '(#:phases
5577 (modify-phases %standard-phases
5578 ;; Disable the vterm tests because of non-deterministic failures
5579 ;; with Python 2. See https://github.com/urwid/urwid/issues/230.
5580 (add-after 'unpack 'delete-test_vterm.py
5581 (delete-file "urwid/tests/test_vterm.py"))))
5582 (package-arguments python-urwid))))))
5583
5584 (define-public python-openid
5585 (package
5586 (name "python-openid")
5587 (version "3.0.10")
5588 (source
5589 (origin
5590 (method url-fetch)
5591 (uri (pypi-uri "python3-openid" version))
5592 (sha256
5593 (base32
5594 "1x3nh3fycqfn43jp5j5pb4q4y2jxp4mdka4absaa3bc0078qd758"))))
5595 (build-system python-build-system)
5596 (arguments
5597 `(#:phases
5598 (modify-phases %standard-phases
5599 (replace 'check
5600 (lambda _
5601 (zero? (system* "./admin/runtests")))))))
5602 (properties `((python2-variant . ,(delay python2-openid))))
5603 (propagated-inputs
5604 `(("python-defusedxml" ,python-defusedxml)))
5605 (native-inputs
5606 `(("python-psycopg2" ,python-psycopg2)
5607 ("python-django" ,python-django)))
5608 (home-page "https://github.com/necaris/python3-openid")
5609 (synopsis "OpenID support for servers and consumers")
5610 (description "This library provides OpenID authentication for Python, both
5611 for clients and servers.")
5612 (license license:asl2.0)))
5613
5614 (define-public python2-openid
5615 (package
5616 (name "python2-openid")
5617 (version "2.2.5")
5618 (source
5619 (origin
5620 (method url-fetch)
5621 (uri (pypi-uri "python-openid" version))
5622 (sha256
5623 (base32
5624 "1vvhxlghjan01snfdc4k7ykd80vkyjgizwgg9bncnin8rqz1ricj"))))
5625 (build-system python-build-system)
5626 (arguments
5627 ;; Python 3 support is in `python3-openid`, a separate package.
5628 `(#:python ,python-2))
5629 (home-page "https://github.com/openid/python-openid")
5630 (synopsis "OpenID support for servers and consumers")
5631 (description "This library provides OpenID authentication for Python, both
5632 for clients and servers.")
5633 (license license:asl2.0)))
5634
5635 (define-public python-urwidtrees
5636 (package
5637 (name "python-urwidtrees")
5638 (version "1.0.2")
5639 (source
5640 (origin
5641 (method url-fetch)
5642 ;; package author intends on distributing via github rather than pypi:
5643 ;; https://github.com/pazz/alot/issues/877#issuecomment-230173331
5644 (uri (string-append "https://github.com/pazz/urwidtrees/archive/"
5645 version ".tar.gz"))
5646 (file-name (string-append name "-" version ".tar.gz"))
5647 (sha256
5648 (base32
5649 "0d30lyd3s2a97rhqfax5w9ssqds2z6aydqx3c6j2c2lk3cb4ngvh"))))
5650 (build-system python-build-system)
5651 (arguments
5652 '(#:tests? #f)) ; no tests
5653 (propagated-inputs `(("python-urwid" ,python-urwid)))
5654 (home-page "https://github.com/pazz/urwidtrees")
5655 (synopsis "Tree widgets for urwid")
5656 (description "Urwidtrees is a Widget Container API for the @code{urwid}
5657 toolkit. Use it to build trees of widgets.")
5658 (license license:gpl3+)))
5659
5660 (define-public python2-urwidtrees
5661 (package-with-python2 python-urwidtrees))
5662
5663 (define-public python-dbus
5664 (package
5665 (name "python-dbus")
5666 (version "1.2.0")
5667 (source
5668 (origin
5669 (method url-fetch)
5670 (uri (string-append
5671 "https://dbus.freedesktop.org/releases/dbus-python/dbus-python-"
5672 version ".tar.gz"))
5673 (sha256
5674 (base32 "1py62qir966lvdkngg0v8k1khsqxwk5m4s8nflpk1agk5f5nqb71"))))
5675 (build-system gnu-build-system)
5676 (arguments
5677 '(#:phases
5678 (modify-phases %standard-phases
5679 (add-before
5680 'check 'pre-check
5681 (lambda _
5682 ;; XXX: For the missing '/etc/machine-id'.
5683 (substitute* "test/run-test.sh"
5684 (("DBUS_FATAL_WARNINGS=1")
5685 "DBUS_FATAL_WARNINGS=0"))
5686 #t)))))
5687 (native-inputs
5688 `(("pkg-config" ,pkg-config)))
5689 (inputs
5690 `(("python" ,python)
5691 ("dbus-glib" ,dbus-glib)))
5692 (synopsis "Python bindings for D-bus")
5693 (description "python-dbus provides bindings for libdbus, the reference
5694 implementation of D-Bus.")
5695 (home-page "http://www.freedesktop.org/wiki/Software/DBusBindings/")
5696 (license license:expat)))
5697
5698 (define-public python2-dbus
5699 (package (inherit python-dbus)
5700 (name "python2-dbus")
5701 (inputs `(("python" ,python-2)
5702 ,@(alist-delete "python"
5703 (package-inputs python-dbus)
5704 equal?)))
5705 ;; FIXME: on Python 2, the test_utf8 fails with:
5706 ;; "ValueError: unichr() arg not in range(0x10000) (narrow Python build)"
5707 (arguments `(#:tests? #f))))
5708
5709 (define-public python-apsw
5710 (package
5711 (name "python-apsw")
5712 (version "3.9.2-r1")
5713 (source
5714 (origin
5715 (method url-fetch)
5716 (uri (pypi-uri "apsw" version))
5717 (sha256
5718 (base32
5719 "0w4jb0wpx785qw42r3h4fh7gl5w2968q48i7gygybsfxck8nzffs"))))
5720 (build-system python-build-system)
5721 (inputs
5722 `(("sqlite" ,sqlite)))
5723 (arguments
5724 `(#:phases
5725 (modify-phases %standard-phases
5726 (delete 'check)
5727 (add-after 'install 'check
5728 (lambda* (#:key inputs outputs #:allow-other-keys)
5729 (add-installed-pythonpath inputs outputs)
5730 (zero? (system* "python" "setup.py" "test")))))))
5731 (home-page "https://github.com/rogerbinns/apsw/")
5732 (synopsis "Another Python SQLite Wrapper")
5733 (description "APSW is a Python wrapper for the SQLite
5734 embedded relational database engine. In contrast to other wrappers such as
5735 pysqlite it focuses on being a minimal layer over SQLite attempting just to
5736 translate the complete SQLite API into Python.")
5737 (license license:zlib)))
5738
5739 (define-public python2-apsw
5740 (package-with-python2 python-apsw))
5741
5742 (define-public python-lxml
5743 (package
5744 (name "python-lxml")
5745 (version "3.6.0")
5746 (source
5747 (origin
5748 (method url-fetch)
5749 (uri (pypi-uri "lxml" version))
5750 (sha256
5751 (base32
5752 "1pvbmiy2m7jwv493kilbghhj2pkh8wy1na3ji350vhzhlwlclx4w"))))
5753 (build-system python-build-system)
5754 (inputs
5755 `(("libxml2" ,libxml2)
5756 ("libxslt" ,libxslt)))
5757 (home-page "http://lxml.de/")
5758 (synopsis
5759 "Python XML processing library")
5760 (description
5761 "The lxml XML toolkit is a Pythonic binding for the C libraries
5762 libxml2 and libxslt.")
5763 (license license:bsd-3))) ; and a few more, see LICENSES.txt
5764
5765 (define-public python2-lxml
5766 (package-with-python2 python-lxml))
5767
5768 ;; beautifulsoup4 has a totally different namespace than 3.x,
5769 ;; and pypi seems to put it under its own name, so I guess we should too
5770 (define-public python-beautifulsoup4
5771 (package
5772 (name "python-beautifulsoup4")
5773 (version "4.5.3")
5774 (source
5775 (origin
5776 (method url-fetch)
5777 (uri (pypi-uri "beautifulsoup4" version))
5778 (sha256
5779 (base32
5780 "0glaw1vyxnbp03fni7h5496n6iib0n5iim4gax1n0ngscs9s075j"))))
5781 (build-system python-build-system)
5782 (arguments
5783 `(#:phases
5784 (modify-phases %standard-phases
5785 ;; The Python 2 source is the definitive source of beautifulsoup4. We
5786 ;; must use this conversion script when building with Python 3. The
5787 ;; conversion script also runs the tests.
5788 ;; For more information, see the file 'convert-py3k' in the source
5789 ;; distribution.
5790 (replace 'check
5791 (lambda _ (zero? (system* "./convert-py3k")))))))
5792 (home-page
5793 "http://www.crummy.com/software/BeautifulSoup/bs4/")
5794 (synopsis
5795 "Python screen-scraping library")
5796 (description
5797 "Beautiful Soup is a Python library designed for rapidly setting up
5798 screen-scraping projects. It offers Pythonic idioms for navigating,
5799 searching, and modifying a parse tree, providing a toolkit for
5800 dissecting a document and extracting what you need. It automatically
5801 converts incoming documents to Unicode and outgoing documents to UTF-8.")
5802 (license license:expat)
5803 (properties `((python2-variant . ,(delay python2-beautifulsoup4))))))
5804
5805 (define-public python2-beautifulsoup4
5806 (package
5807 (inherit (package-with-python2
5808 (strip-python2-variant python-beautifulsoup4)))
5809 (arguments `(#:python ,python-2))))
5810
5811 (define-public python-cssutils
5812 (package
5813 (name "python-cssutils")
5814 (version "1.0.1")
5815 (source
5816 (origin
5817 (method url-fetch)
5818 (uri (pypi-uri "cssutils" version))
5819 (sha256
5820 (base32
5821 "0qwha9x1wml2qmipbcz03gndnlwhzrjdvw9i09si247a90l8p8fq"))))
5822 (build-system python-build-system)
5823 (native-inputs
5824 `(("unzip" ,unzip))) ; for unpacking the source
5825 (arguments
5826 `(#:tests? #f)) ;tests require python-pbr < 1.7.0
5827 (home-page "http://cthedot.de/cssutils/")
5828 (synopsis
5829 "CSS Cascading Style Sheets library for Python")
5830 (description
5831 "Cssutils is a Python package for parsing and building CSS
5832 Cascading Style Sheets. Currently it provides a DOM only and no rendering
5833 options.")
5834 (license license:lgpl3+)))
5835
5836 (define-public python2-cssutils
5837 (package-with-python2 python-cssutils))
5838
5839 (define-public python-cssselect
5840 (package
5841 (name "python-cssselect")
5842 (version "0.9.2")
5843 (source
5844 (origin
5845 (method url-fetch)
5846 (uri (pypi-uri "cssselect" version))
5847 (sha256
5848 (base32
5849 "1xg6gbva1yswghiycmgincv6ab4bn7hpm720ndbj40h8xycmnfvi"))))
5850 (build-system python-build-system)
5851 (arguments
5852 ;; tests fail with message
5853 ;; AttributeError: 'module' object has no attribute 'tests'
5854 `(#:tests? #f))
5855 (home-page
5856 "https://pythonhosted.org/cssselect/")
5857 (synopsis
5858 "CSS3 selector parser and translator to XPath 1.0")
5859 (description
5860 "Cssselect ia a Python module that parses CSS3 Selectors and translates
5861 them to XPath 1.0 expressions. Such expressions can be used in lxml or
5862 another XPath engine to find the matching elements in an XML or HTML document.")
5863 (license license:bsd-3)))
5864
5865 (define-public python2-cssselect
5866 (package-with-python2 python-cssselect))
5867
5868 (define-public python-openid-cla
5869 (package
5870 (name "python-openid-cla")
5871 (version "1.2")
5872 (source
5873 (origin
5874 (method url-fetch)
5875 (uri (pypi-uri "python-openid-cla" version))
5876 (sha256
5877 (base32
5878 "102hy2qisvjxp5s0v9lvwqi4f2dk0dhns40vjgn008yxc7k0h3cr"))))
5879 (build-system python-build-system)
5880 (arguments '(#:tests? #f)) ; No tests.
5881 (home-page "https://github.com/puiterwijk/python-openid-cla/")
5882 (synopsis "Implementation of the OpenID CLA extension for python-openid")
5883 (description "@code{openid-cla} is an implementation of the OpenID
5884 contributor license agreement extension for python-openid.")
5885 (license license:bsd-3)))
5886
5887 (define-public python2-openid-cla
5888 (package-with-python2 python-openid-cla))
5889
5890 (define-public python-openid-teams
5891 (package
5892 (name "python-openid-teams")
5893 (version "1.1")
5894 (source
5895 (origin
5896 (method url-fetch)
5897 (uri (pypi-uri "python-openid-teams" version))
5898 (sha256
5899 (base32
5900 "05zrh78alav24rxkbqlpbad6d3x2nljk6z6j7kflxf3vdqa7w969"))))
5901 (build-system python-build-system)
5902 (arguments '(#:tests? #f)) ; No tests.
5903 (home-page "https://github.com/puiterwijk/python-openid-teams/")
5904 (synopsis "Implementation of the OpenID teams extension for python-openid")
5905 (description
5906 "@code{openid-teams} is an implementation of the OpenID
5907 teams extension for python-openid.")
5908 (license license:bsd-3)))
5909
5910 (define-public python2-openid-teams
5911 (package-with-python2 python-openid-teams))
5912
5913 (define-public python-netifaces
5914 (package
5915 (name "python-netifaces")
5916 (version "0.10.4")
5917 (source
5918 (origin
5919 (method url-fetch)
5920 (uri (string-append
5921 "https://pypi.python.org/packages/source/n/netifaces/netifaces-"
5922 version
5923 ".tar.gz"))
5924 (sha256
5925 (base32
5926 "1plw237a4zib4z8s62g0mrs8gm3kjfrp5sxh6bbk9nl3rdls2mln"))))
5927 (build-system python-build-system)
5928 (home-page
5929 "https://bitbucket.org/al45tair/netifaces")
5930 (synopsis
5931 "Python module for portable network interface information")
5932 (description
5933 "Netifaces is a Python module providing information on network
5934 interfaces in an easy and portable manner.")
5935 (license license:expat)))
5936
5937 (define-public python2-netifaces
5938 (package-with-python2 python-netifaces))
5939
5940 (define-public python-networkx
5941 (package
5942 (name "python-networkx")
5943 (version "1.11")
5944 (source
5945 (origin
5946 (method url-fetch)
5947 (uri (pypi-uri "networkx" version))
5948 (sha256
5949 (base32 "1f74s56xb4ggixiq0vxyfxsfk8p20c7a099lpcf60izv1php03hd"))))
5950 (build-system python-build-system)
5951 ;; python-decorator is needed at runtime
5952 (propagated-inputs
5953 `(("python-decorator" ,python-decorator)))
5954 (native-inputs
5955 `(("python-nose" ,python-nose)))
5956 (home-page "http://networkx.github.io/")
5957 (synopsis "Python module for creating and manipulating graphs and networks")
5958 (description
5959 "NetworkX is a Python package for the creation, manipulation, and study
5960 of the structure, dynamics, and functions of complex networks.")
5961 (license license:bsd-3)))
5962
5963 (define-public python2-networkx
5964 (package-with-python2 python-networkx))
5965
5966 (define-public snakemake
5967 (package
5968 (name "snakemake")
5969 (version "3.11.2")
5970 (source
5971 (origin
5972 (method url-fetch)
5973 (uri (pypi-uri "snakemake" version))
5974 (sha256
5975 (base32 "0qcp7y9csvanyzh08jppryhd5di8r1z7p0d4wkfg5591pj3bb8zp"))))
5976 (build-system python-build-system)
5977 (arguments
5978 ;; TODO: Package missing test dependencies.
5979 '(#:tests? #f))
5980 (propagated-inputs
5981 `(("python-wrapt" ,python-wrapt)
5982 ("python-requests" ,python-requests)))
5983 (home-page "https://bitbucket.org/snakemake/snakemake/wiki/Home")
5984 (synopsis "Python-based execution environment for make-like workflows")
5985 (description
5986 "Snakemake aims to reduce the complexity of creating workflows by
5987 providing a clean and modern domain specific specification language (DSL) in
5988 Python style, together with a fast and comfortable execution environment.")
5989 (license license:expat)))
5990
5991 (define-public python-seaborn
5992 (package
5993 (name "python-seaborn")
5994 (version "0.7.1")
5995 (source
5996 (origin
5997 (method url-fetch)
5998 (uri (pypi-uri "seaborn" version))
5999 (sha256
6000 (base32 "0pawrqc3mxpwd5g9pvi9gba02637bh5c8ldpp8izfwpfn52469zs"))))
6001 (build-system python-build-system)
6002 (arguments
6003 '(#:tests? #f)) ; Tests requires a running X11 server.
6004 (propagated-inputs
6005 `(("python-pandas" ,python-pandas)
6006 ("python-matplotlib" ,python-matplotlib)
6007 ("python-scipy" ,python-scipy)))
6008 (home-page "http://stanford.edu/~mwaskom/software/seaborn/")
6009 (synopsis "Statistical data visualization")
6010 (description
6011 "Seaborn is a library for making attractive and informative statistical
6012 graphics in Python. It is built on top of matplotlib and tightly integrated
6013 with the PyData stack, including support for numpy and pandas data structures
6014 and statistical routines from scipy and statsmodels.")
6015 (license license:bsd-3)
6016 (properties `((python2-variant . ,(delay python2-seaborn))))))
6017
6018 (define-public python2-seaborn
6019 (let ((base (package-with-python2 (strip-python2-variant python-seaborn))))
6020 (package
6021 (inherit base)
6022 (propagated-inputs `(("python2-pytz" ,python2-pytz)
6023 ,@(package-propagated-inputs base))))))
6024
6025 (define-public python-mpmath
6026 (package
6027 (name "python-mpmath")
6028 (version "0.19")
6029 (source (origin
6030 (method url-fetch)
6031 (uri (string-append "http://mpmath.org/files/mpmath-"
6032 version ".tar.gz"))
6033 (sha256
6034 (base32
6035 "08ijsr4ifrqv3cjc26mkw0dbvyygsa99in376hr4b96ddm1gdpb8"))))
6036 (build-system python-build-system)
6037 (arguments
6038 '(#:phases
6039 (modify-phases %standard-phases
6040 (replace 'check
6041 (lambda _
6042 (zero?
6043 (system* "python" "mpmath/tests/runtests.py" "-local")))))))
6044 (home-page "http://mpmath.org")
6045 (synopsis "Arbitrary-precision floating-point arithmetic in python")
6046 (description
6047 "@code{mpmath} can be used as an arbitrary-precision substitute for
6048 Python's float/complex types and math/cmath modules, but also does much
6049 more advanced mathematics.")
6050 (license license:bsd-3)))
6051
6052 (define-public python2-mpmath
6053 (package-with-python2 python-mpmath))
6054
6055 (define-public python-sympy
6056 (package
6057 (name "python-sympy")
6058 (version "1.0")
6059 (source
6060 (origin
6061 (method url-fetch)
6062 (uri (string-append
6063 "https://github.com/sympy/sympy/releases/download/sympy-"
6064 version "/sympy-" version ".tar.gz"))
6065 (sha256
6066 (base32 "1bpzjwr9hrr7w88v4vgnj9lr6vxcldc94si13n8xpr1rv08d5b1y"))))
6067 (build-system python-build-system)
6068 (propagated-inputs
6069 `(("python-mpmath" ,python-mpmath)))
6070 (home-page "http://www.sympy.org/")
6071 (synopsis "Python library for symbolic mathematics")
6072 (description
6073 "SymPy is a Python library for symbolic mathematics. It aims to become a
6074 full-featured computer algebra system (CAS) while keeping the code as simple
6075 as possible in order to be comprehensible and easily extensible.")
6076 (license license:bsd-3)))
6077
6078 (define-public python2-sympy
6079 (package-with-python2 python-sympy))
6080
6081 (define-public python-q
6082 (package
6083 (name "python-q")
6084 (version "2.6")
6085 (source
6086 (origin
6087 (method url-fetch)
6088 (uri (pypi-uri "q" version))
6089 (sha256
6090 (base32
6091 "1mgfazh8fkizh6walra2zv885f3lcgr3nb02v1frfm4p8ddcy3yy"))))
6092 (build-system python-build-system)
6093 (home-page "https://github.com/zestyping/q")
6094 (synopsis "Quick-and-dirty debugging output for tired programmers")
6095 (description
6096 "q is a Python module for \"print\" style of debugging Python code. It
6097 provides convenient short API for print out of values, tracebacks, and
6098 falling into the Python interpreter.")
6099 (license license:asl2.0)))
6100
6101 (define-public python2-q
6102 (package-with-python2 python-q))
6103
6104 (define-public python-testlib
6105 (package
6106 (name "python-testlib")
6107 (version "0.6.5")
6108 (source
6109 (origin
6110 (method url-fetch)
6111 (uri (string-append
6112 "https://pypi.python.org/packages/source/t/testlib/testlib-"
6113 version ".zip"))
6114 (sha256
6115 (base32 "1mz26cxn4x8bbgv0rn0mvj2z05y31rkc8009nvdlb3lam5b4mj3y"))))
6116 (build-system python-build-system)
6117 (native-inputs
6118 `(("unzip" ,unzip))) ; for unpacking the source
6119 (synopsis "Python micro test suite harness")
6120 (description "A micro unittest suite harness for Python.")
6121 (home-page "https://github.com/trentm/testlib")
6122 (license license:expat)))
6123
6124 (define-public python2-testlib
6125 (package-with-python2 python-testlib))
6126
6127 (define-public python2-xlib
6128 (package
6129 (name "python2-xlib")
6130 (version "0.14")
6131 (source (origin
6132 (method url-fetch)
6133 (uri (string-append "mirror://sourceforge/python-xlib/python-xlib"
6134 "/" version "/"
6135 "python-xlib-" version ".tar.gz"))
6136 (sha256
6137 (base32
6138 "1sv0447j0rx8cgs3jhjl695p5pv13ihglcjlrrz1kq05lsvb0wa7"))))
6139 (build-system python-build-system)
6140 (arguments
6141 `(#:python ,python-2 ;Python 2 only
6142 #:tests? #f)) ;no tests
6143 (home-page "http://python-xlib.sourceforge.net/")
6144 (synopsis "Python X11 client library")
6145 (description
6146 "The Python X Library is intended to be a fully functional X client
6147 library for Python programs. It is useful to implement low-level X clients.
6148 It is written entirely in Python.")
6149 (license license:gpl2+)))
6150
6151 (define-public python-singledispatch
6152 (package
6153 (name "python-singledispatch")
6154 (version "3.4.0.3")
6155 (source
6156 (origin
6157 (method url-fetch)
6158 (uri (pypi-uri "singledispatch" version))
6159 (sha256
6160 (base32
6161 "171b7ip0hsq5qm83np40h3phlr36ym18w0lay0a8v08kvy3sy1jv"))))
6162 (build-system python-build-system)
6163 (native-inputs
6164 `(("python-six" ,python-six))) ; required for conversion, not at run-time
6165 (home-page
6166 "http://docs.python.org/3/library/functools.html#functools.singledispatch")
6167 (synopsis "Backport of singledispatch feature from Python 3.4")
6168 (description
6169 "This library brings functools.singledispatch from Python 3.4 to Python
6170 2.6-3.3.")
6171 (license license:expat)))
6172
6173 (define-public python2-singledispatch
6174 (package-with-python2 python-singledispatch))
6175
6176 (define-public python-tornado
6177 (package
6178 (name "python-tornado")
6179 (version "4.5.1")
6180 (source
6181 (origin
6182 (method url-fetch)
6183 (uri (pypi-uri "tornado" version))
6184 (sha256
6185 (base32 "1zbkgcdfq81k298awrm8p0xwbwwn2p3nbizdglzfbkskhai082fv"))))
6186 (build-system python-build-system)
6187 (arguments
6188 '(;; FIXME: Two tests error out with:
6189 ;; AssertionError: b'Error in atexit._run_exitfuncs:\nFileNotF[44 chars]ry\n' != b''
6190 ;; #:phases
6191 ;; (modify-phases %standard-phases
6192 ;; (replace 'check
6193 ;; (lambda _
6194 ;; ;; 'setup.py test' hits an AssertionError on BSD-specific
6195 ;; ;; "tornado/platform/kqueue.py". This is the supported method:
6196 ;; (zero? (system* "python" "-m" "tornado.test")))))
6197 #:tests? #f))
6198 (native-inputs
6199 `(("python-certifi" ,python-certifi)))
6200 (propagated-inputs
6201 `(("python-backports-abc" ,python-backports-abc)))
6202 (home-page "http://www.tornadoweb.org/")
6203 (synopsis "Python web framework and asynchronous networking library")
6204 (description
6205 "Tornado is a Python web framework and asynchronous networking library,
6206 originally developed at FriendFeed. By using non-blocking network I/O,
6207 Tornado can scale to tens of thousands of open connections, making it ideal
6208 for long polling, WebSockets, and other applications that require a long-lived
6209 connection to each user.")
6210 (license license:asl2.0)
6211 (properties `((python2-variant . ,(delay python2-tornado))))))
6212
6213 (define-public python2-tornado
6214 (let ((tornado (package-with-python2 (strip-python2-variant python-tornado))))
6215 (package (inherit tornado)
6216 (propagated-inputs
6217 `(("python2-backport-ssl-match-hostname"
6218 ,python2-backport-ssl-match-hostname)
6219 ("python2-singledispatch" ,python2-singledispatch)
6220 ,@(package-propagated-inputs tornado))))))
6221
6222 ;; the python- version can be removed with python-3.5
6223 (define-public python-backports-abc
6224 (package
6225 (name "python-backports-abc")
6226 (version "0.5")
6227 (source
6228 (origin
6229 (method url-fetch)
6230 (uri (pypi-uri "backports_abc" version))
6231 (sha256
6232 (base32
6233 "1pkv8d1zxj5f9i227dxbjczncbv7ks7ywnjwyxfjagm02i2yafq3"))))
6234 (build-system python-build-system)
6235 (home-page "https://github.com/cython/backports_abc")
6236 (synopsis "Backport of additions to the 'collections.abc' module")
6237 (description
6238 "Python-backports-abc provides a backport of additions to the
6239 'collections.abc' module in Python-3.5.")
6240 (license license:psfl)))
6241
6242 (define-public python2-backports-abc
6243 (package-with-python2 python-backports-abc))
6244
6245 (define-public python2-backports-shutil-get-terminal-size
6246 (package
6247 (name "python2-backports-shutil-get-terminal-size")
6248 (version "1.0.0")
6249 (source
6250 (origin
6251 (method url-fetch)
6252 (uri (pypi-uri "backports.shutil_get_terminal_size" version))
6253 (sha256
6254 (base32
6255 "107cmn7g3jnbkp826zlj8rrj19fam301qvaqf0f3905f5217lgki"))))
6256 (build-system python-build-system)
6257 (arguments
6258 `(#:python ,python-2
6259 #:phases
6260 (modify-phases %standard-phases
6261 (replace 'check
6262 (lambda _
6263 (zero? (system* "py.test" "-v")))))))
6264 (native-inputs
6265 `(("python2-pytest" ,python2-pytest)))
6266 (home-page "https://github.com/chrippa/backports.shutil_get_terminal_size")
6267 (synopsis "Backport of Python 3.3's @code{shutil.get_terminal_size}")
6268 (description
6269 "This package provides a backport of the @code{get_terminal_size
6270 function} from Python 3.3's @code{shutil}.
6271 Unlike the original version it is written in pure Python rather than C,
6272 so it might be a tiny bit slower.")
6273 (license license:expat)))
6274
6275 (define-public python-waf
6276 (package
6277 (name "python-waf")
6278 (version "1.9.8")
6279 (source (origin
6280 (method url-fetch)
6281 (uri (string-append "https://waf.io/"
6282 "waf-" version ".tar.bz2"))
6283 (sha256
6284 (base32
6285 "0wl4cnmp06lfxqjxaan58bqxn27smhydz0sg5prrfbl3bsw4gv6q"))))
6286 (build-system python-build-system)
6287 (arguments
6288 '(#:phases
6289 (modify-phases %standard-phases
6290 (replace 'build
6291 (lambda _
6292 (zero? (system* "python" "waf-light" "configure" "build"))))
6293 (replace 'check
6294 (lambda _
6295 (zero? (system* "python" "waf" "--version"))))
6296 (replace 'install
6297 (lambda _
6298 (copy-file "waf" %output))))))
6299 (home-page "https://waf.io/")
6300 (synopsis "Python-based build system")
6301 (description
6302 "Waf is a Python-based framework for configuring, compiling and installing
6303 applications.")
6304 (license license:bsd-3)))
6305
6306 (define-public python2-waf
6307 (package-with-python2 python-waf))
6308
6309 (define-public python-pyzmq
6310 (package
6311 (name "python-pyzmq")
6312 (version "15.1.0")
6313 (source
6314 (origin
6315 (method url-fetch)
6316 (uri (pypi-uri "pyzmq" version))
6317 (sha256
6318 (base32 "13fhwnlvsvxv72kfhqbpn6qi7msh8mc8377mpabv32skk2cjfnxx"))))
6319 (build-system python-build-system)
6320 (arguments
6321 `(#:configure-flags
6322 (list (string-append "--zmq=" (assoc-ref %build-inputs "zeromq")))
6323 ;; FIXME: You must build pyzmq with 'python setup.py build_ext
6324 ;; --inplace' for 'python setup.py test' to work.
6325 #:tests? #f))
6326 (inputs
6327 `(("zeromq" ,zeromq)))
6328 (native-inputs
6329 `(("pkg-config" ,pkg-config)
6330 ("python-nose" ,python-nose)))
6331 (home-page "https://github.com/zeromq/pyzmq")
6332 (synopsis "Python bindings for 0MQ")
6333 (description
6334 "PyZMQ is the official Python binding for the ZeroMQ messaging library.")
6335 (license license:bsd-4)))
6336
6337 (define-public python2-pyzmq
6338 (package-with-python2 python-pyzmq))
6339
6340 (define-public python-pep8
6341 (package
6342 (name "python-pep8")
6343 (version "1.7.0")
6344 (source
6345 (origin
6346 (method url-fetch)
6347 (uri (pypi-uri "pep8" version))
6348 (sha256
6349 (base32
6350 "002rkl4lsn6x2mxmf8ar00l0m8i3mzrc6pnzz77blyksmpsxa4x1"))))
6351 (build-system python-build-system)
6352 (home-page "http://pep8.readthedocs.org/")
6353 (synopsis "Python style guide checker")
6354 (description
6355 "This tools checks Python code against some of the style conventions in
6356 PEP 8.")
6357 (license license:expat)))
6358
6359 (define-public python2-pep8
6360 (package-with-python2 python-pep8))
6361
6362 (define-public python-pyflakes
6363 (package
6364 (name "python-pyflakes")
6365 (version "1.0.0")
6366 (source
6367 (origin
6368 (method url-fetch)
6369 (uri (pypi-uri "pyflakes" version))
6370 (sha256
6371 (base32
6372 "0qs2sgqszq7wcplis8509wk2ygqcrwzbs1ghfj3svvivq2j377pk"))))
6373 (build-system python-build-system)
6374 (home-page
6375 "https://github.com/pyflakes/pyflakes")
6376 (synopsis "Passive checker of Python programs")
6377 (description
6378 "Pyflakes statically checks Python source code for common errors.")
6379 (license license:expat)))
6380
6381 (define-public python2-pyflakes
6382 (package-with-python2 python-pyflakes))
6383
6384 (define-public python-mccabe
6385 (package
6386 (name "python-mccabe")
6387 (version "0.4.0")
6388 (source
6389 (origin
6390 (method url-fetch)
6391 (uri (pypi-uri "mccabe" version))
6392 (sha256
6393 (base32
6394 "0yr08a36h8lqlif10l4xcikbbig7q8f41gqywir7rrvnv3mi4aws"))))
6395 (build-system python-build-system)
6396 (native-inputs
6397 `(("python-pytest" ,python-pytest)
6398 ("python-pytest-runner" ,python-pytest-runner)))
6399 (home-page "https://github.com/flintwork/mccabe")
6400 (synopsis "McCabe checker, plugin for flake8")
6401 (description
6402 "This package provides a Flake8 plug-in to compute the McCabe cyclomatic
6403 complexity of Python source code.")
6404 (license license:expat)))
6405
6406 (define-public python2-mccabe
6407 (package-with-python2 python-mccabe))
6408
6409 (define-public python-mccabe-0.2.1
6410 (package (inherit python-mccabe)
6411 (version "0.2.1")
6412 (source
6413 (origin
6414 (method url-fetch)
6415 (uri (pypi-uri "mccabe" version))
6416 (sha256
6417 (base32
6418 "0fi4a81kr5bcv5p4xgibqr595hyj5dafkqgsmfk96mfy8w71fajs"))))))
6419
6420 (define-public python2-mccabe-0.2.1
6421 (package-with-python2 python-mccabe-0.2.1))
6422
6423 ;; Flake8 2.4.1 requires an older version of pep8.
6424 ;; This should be removed ASAP.
6425 (define-public python-pep8-1.5.7
6426 (package (inherit python-pep8)
6427 (version "1.5.7")
6428 (source
6429 (origin
6430 (method url-fetch)
6431 (uri (string-append
6432 "https://pypi.python.org/packages/source/p/pep8/pep8-"
6433 version
6434 ".tar.gz"))
6435 (sha256
6436 (base32
6437 "12b9bbdbwnspxgak14xg58c130x2n0blxzlms5jn2dszn8qj3d0m"))))
6438 (arguments
6439 ;; XXX Tests not compatible with Python 3.5.
6440 '(#:tests? #f))))
6441
6442 (define-public python2-pep8-1.5.7
6443 (package-with-python2 python-pep8-1.5.7))
6444
6445 ;; Flake8 2.4.1 requires an older version of pyflakes.
6446 ;; This should be removed ASAP.
6447 (define-public python-pyflakes-0.8.1
6448 (package (inherit python-pyflakes)
6449 (version "0.8.1")
6450 (source
6451 (origin
6452 (method url-fetch)
6453 (uri (string-append
6454 "https://pypi.python.org/packages/source/p/pyflakes/pyflakes-"
6455 version
6456 ".tar.gz"))
6457 (sha256
6458 (base32
6459 "0sbpq6pqm1i9wqi41mlfrsc5rk92jv4mskvlyxmnhlbdnc80ma1z"))))
6460 (arguments
6461 ;; XXX Tests not compatible with Python 3.5.
6462 '(#:tests? #f))))
6463
6464 (define-public python2-pyflakes-0.8.1
6465 (package-with-python2 python-pyflakes-0.8.1))
6466
6467 (define-public python-flake8
6468 (package
6469 (name "python-flake8")
6470 (version "2.5.4")
6471 (source
6472 (origin
6473 (method url-fetch)
6474 (uri (pypi-uri "flake8" version))
6475 (sha256
6476 (base32
6477 "0bs9cz4fr99r2rwig1b8jwaadl1nan7kgpdzqwj0bwbckwbmh7nc"))
6478 (modules '((guix build utils)))
6479 (snippet
6480 '(begin
6481 ;; Remove pre-compiled .pyc files from source.
6482 (for-each delete-file-recursively
6483 (find-files "." "__pycache__" #:directories? #t))
6484 (for-each delete-file (find-files "." "\\.pyc$"))
6485 #t))))
6486 (build-system python-build-system)
6487 (propagated-inputs
6488 `(("python-pep8" ,python-pep8)
6489 ("python-pyflakes" ,python-pyflakes)
6490 ("python-mccabe" ,python-mccabe)))
6491 (native-inputs
6492 `(("python-mock" ,python-mock) ; TODO: only required for < 3.3
6493 ("python-nose" ,python-nose)))
6494 (home-page "https://gitlab.com/pycqa/flake8")
6495 (synopsis
6496 "The modular source code checker: pep8, pyflakes and co")
6497 (description
6498 "Flake8 is a wrapper around PyFlakes, pep8 and python-mccabe.")
6499 (license license:expat)))
6500
6501 (define-public python2-flake8
6502 (package-with-python2 python-flake8))
6503
6504 ;; This will only be needed by the python-hacking package and will not be
6505 ;; necessary once python-hacking > 0.10.2 is released.
6506 (define-public python-flake8-2.2.4
6507 (package (inherit python-flake8)
6508 (propagated-inputs
6509 `(("python-pep8" ,python-pep8-1.5.7)
6510 ("python-pyflakes" ,python-pyflakes-0.8.1)
6511 ("python-mccabe" ,python-mccabe-0.2.1)))
6512 (native-inputs
6513 `(("python-mock" ,python-mock)
6514 ("python-nose" ,python-nose)))
6515 (version "2.2.4")
6516 (source
6517 (origin
6518 (method url-fetch)
6519 (uri (pypi-uri "flake8" version))
6520 (sha256
6521 (base32
6522 "1r9wsry4va45h1rck5hxd3vzsg2q3y6lnl6pym1bxvz8ry19jwx8"))
6523 (modules '((guix build utils)))
6524 (snippet
6525 '(begin
6526 ;; Remove pre-compiled .pyc files from source.
6527 (for-each delete-file-recursively
6528 (find-files "." "__pycache__" #:directories? #t))
6529 (for-each delete-file (find-files "." "\\.pyc$"))
6530 #t))))
6531 (arguments
6532 ;; XXX Fails with Python 3.5.
6533 '(#:tests? #f))))
6534
6535 (define-public python2-flake8-2.2.4
6536 (package-with-python2 python-flake8-2.2.4))
6537
6538 (define-public python-flake8-polyfill
6539 (package
6540 (name "python-flake8-polyfill")
6541 (version "1.0.1")
6542 (source
6543 (origin
6544 (method url-fetch)
6545 (uri (pypi-uri "flake8-polyfill" version))
6546 (sha256
6547 (base32
6548 "02gn2wxvh9vnf7m7dld7ca4l60mg5c370hv3swwppkngwaqmcw67"))))
6549 (build-system python-build-system)
6550 (arguments
6551 '(#:phases
6552 (modify-phases %standard-phases
6553 (replace 'check
6554 (lambda _
6555 (setenv "PYTHONPATH"
6556 (string-append (getcwd) "/build/lib:"
6557 (getenv "PYTHONPATH")))
6558 (zero? (system* "py.test" "-v")))))))
6559 (native-inputs
6560 `(("python-flake8" ,python-flake8)
6561 ("python-mock" ,python-mock)
6562 ("python-pycodestyle" ,python-pycodestyle)
6563 ("python-pytest" ,python-pytest)))
6564 (home-page "https://gitlab.com/pycqa/flake8-polyfill")
6565 (synopsis "Polyfill package for Flake8 plugins")
6566 (description
6567 "This package that provides some compatibility helpers for Flake8
6568 plugins that intend to support Flake8 2.x and 3.x simultaneously.")
6569 (license license:expat)))
6570
6571 (define-public python2-flake8-polyfill
6572 (package-with-python2 python-flake8-polyfill))
6573
6574 (define-public python-mistune
6575 (package
6576 (name "python-mistune")
6577 (version "0.7.3")
6578 (source
6579 (origin
6580 (method url-fetch)
6581 (uri (pypi-uri "mistune" version))
6582 (sha256
6583 (base32
6584 "04xpk1zvslhq3xpnf01g3ag0dy9wfv4z28p093r8k49vvxlyil11"))))
6585 (build-system python-build-system)
6586 (native-inputs
6587 `(("python-nose" ,python-nose)
6588 ("python-cython" ,python-cython)))
6589 (home-page "https://github.com/lepture/mistune")
6590 (synopsis "Markdown parser in pure Python")
6591 (description "This package provides a fast markdown parser in pure
6592 Python.")
6593 (license license:bsd-3)))
6594
6595 (define-public python2-mistune
6596 (package-with-python2 python-mistune))
6597
6598 (define-public python-markdown
6599 (package
6600 (name "python-markdown")
6601 (version "2.6.8")
6602 (source
6603 (origin
6604 (method url-fetch)
6605 (uri (pypi-uri "Markdown" version))
6606 (sha256
6607 (base32
6608 "0cqfhr1km2s5d8jm6hbwgkrrj9hvkjf2gab3s2axlrw1clgaij0a"))))
6609 (build-system python-build-system)
6610 (arguments
6611 `(#:phases
6612 (modify-phases %standard-phases
6613 (replace 'check
6614 (lambda _
6615 (zero? (system* "python" "run-tests.py")))))))
6616 (native-inputs
6617 `(("python-nose" ,python-nose)
6618 ("python-pyyaml" ,python-pyyaml)))
6619 (home-page "https://pythonhosted.org/Markdown/")
6620 (synopsis "Python implementation of Markdown")
6621 (description
6622 "This package provides a Python implementation of John Gruber's
6623 Markdown. The library features international input, various Markdown
6624 extensions, and several HTML output formats. A command line wrapper
6625 markdown_py is also provided to convert Markdown files to HTML.")
6626 (license license:bsd-3)))
6627
6628 (define-public python2-markdown
6629 (package-with-python2 python-markdown))
6630
6631 (define-public python-ptyprocess
6632 (package
6633 (name "python-ptyprocess")
6634 (version "0.5.1")
6635 (source
6636 (origin
6637 (method url-fetch)
6638 (uri (string-append
6639 "https://pypi.python.org/packages/source/p/ptyprocess/ptyprocess-"
6640 version ".tar.gz"))
6641 (sha256
6642 (base32
6643 "19l1xrjn4l9gjz01s3vg92gn2dd9d8mw1v86ppkzlnr9m5iwwc05"))))
6644 (build-system python-build-system)
6645 (native-inputs
6646 `(("python-nose" ,python-nose)))
6647 (arguments
6648 `(#:phases
6649 (modify-phases %standard-phases
6650 (replace 'check
6651 (lambda _
6652 (zero? (system* "nosetests")))))))
6653 (home-page "https://github.com/pexpect/ptyprocess")
6654 (synopsis "Run a subprocess in a pseudo terminal")
6655 (description
6656 "This package provides a Python library used to launch a subprocess in a
6657 pseudo terminal (pty), and interact with both the process and its pty.")
6658 (license license:isc)))
6659
6660 (define-public python2-ptyprocess
6661 (package-with-python2 python-ptyprocess))
6662
6663 (define-public python-cram
6664 (package
6665 (name "python-cram")
6666 (version "0.7")
6667 (home-page "https://bitheap.org/cram/")
6668 (source (origin
6669 (method url-fetch)
6670 (uri (list (string-append home-page "cram-"
6671 version ".tar.gz")
6672 (pypi-uri "cram" version)))
6673 (sha256
6674 (base32
6675 "0bvz6fwdi55rkrz3f50zsy35gvvwhlppki2yml5bj5ffy9d499vx"))))
6676 (arguments
6677 '(#:phases
6678 (modify-phases %standard-phases
6679 (add-after 'unpack 'patch-source
6680 (lambda _
6681 (substitute* (find-files "cram" ".*\\.py$")
6682 ;; Replace default shell path.
6683 (("/bin/sh") (which "sh")))
6684 (substitute* (find-files "tests" ".*\\.t$")
6685 (("md5") "md5sum")
6686 (("/bin/bash") (which "bash"))
6687 (("/bin/sh") (which "sh")))
6688 (substitute* "cram/_test.py"
6689 ;; This hack works around a bug triggered by substituting
6690 ;; the /bin/sh paths. "tests/usage.t" compares the output of
6691 ;; "cram -h", which breaks the output at 80 characters. This
6692 ;; causes the line showing the default shell to break into two
6693 ;; lines, but the test expects a single line...
6694 (("env\\['COLUMNS'\\] = '80'")
6695 "env['COLUMNS'] = '160'"))
6696 #t))
6697 (delete 'check)
6698 (add-after 'install 'check
6699 ;; The test phase uses the built library and executable.
6700 ;; It's easier to run it after install since the build
6701 ;; directory contains version-specific PATH.
6702 (lambda* (#:key inputs outputs #:allow-other-keys)
6703 (add-installed-pythonpath inputs outputs)
6704 (setenv "PATH" (string-append (getenv "PATH") ":"
6705 (assoc-ref outputs "out") "/bin"))
6706 (zero? (system* "make" "test")))))))
6707 (build-system python-build-system)
6708 (native-inputs
6709 `(("python-coverage" ,python-coverage)
6710 ("which" ,which)))
6711 (synopsis "Simple testing framework for command line applications")
6712 (description
6713 "Cram is a functional testing framework for command line applications.
6714 Cram tests look like snippets of interactive shell sessions. Cram runs each
6715 command and compares the command output in the test with the command’s actual
6716 output.")
6717 (license license:gpl2+)))
6718
6719 (define-public python2-cram
6720 (package-with-python2 python-cram))
6721
6722 (define-public python-terminado
6723 (package
6724 (name "python-terminado")
6725 (version "0.6")
6726 (source
6727 (origin
6728 (method url-fetch)
6729 (uri (pypi-uri "terminado" version))
6730 (sha256
6731 (base32
6732 "09h1kwi86g5mrk14s4pgbhshd602zry29lnpxamcqz864kva22rc"))))
6733 (build-system python-build-system)
6734 (propagated-inputs
6735 `(("python-tornado" ,python-tornado)
6736 ("python-ptyprocess" ,python-ptyprocess)))
6737 (native-inputs
6738 `(("python-nose" ,python-nose)))
6739 (arguments
6740 `(#:phases
6741 (modify-phases %standard-phases
6742 (replace 'check
6743 (lambda _
6744 (zero? (system* "nosetests")))))))
6745 (home-page "https://github.com/takluyver/terminado")
6746 (synopsis "Terminals served to term.js using Tornado websockets")
6747 (description "This package provides a Tornado websocket backend for the
6748 term.js Javascript terminal emulator library.")
6749 (license license:bsd-2)
6750 (properties `((python2-variant . ,(delay python2-terminado))))))
6751
6752 (define-public python2-terminado
6753 (let ((terminado (package-with-python2 (strip-python2-variant python-terminado))))
6754 (package (inherit terminado)
6755 (propagated-inputs
6756 `(("python2-backport-ssl-match-hostname"
6757 ,python2-backport-ssl-match-hostname)
6758 ,@(package-propagated-inputs terminado))))))
6759
6760 (define-public python-straight-plugin
6761 (package
6762 (name "python-straight-plugin")
6763 (version "1.4.1")
6764 (source
6765 (origin
6766 (method url-fetch)
6767 (uri (pypi-uri "straight.plugin" version))
6768 (sha256
6769 (base32
6770 "069pjll4383p4kkgvcc40hgyvf79j2wdbpgwz77yigzxksh1gj62"))))
6771 (build-system python-build-system)
6772 (home-page "https://github.com/ironfroggy/straight.plugin")
6773 (synopsis "Simple namespaced plugin facility")
6774 (description "Straight Plugin provides a type of plugin you can create from
6775 almost any existing Python modules, and an easy way for outside developers to
6776 add functionality and customization to your projects with their own plugins.")
6777 (license license:expat)))
6778
6779 (define-public python2-straight-plugin
6780 (package-with-python2 python-straight-plugin))
6781
6782 (define-public python-fonttools
6783 (package
6784 (name "python-fonttools")
6785 (version "2.5")
6786 (source (origin
6787 (method url-fetch)
6788 (uri (string-append
6789 "https://pypi.python.org/packages/source/F/FontTools/"
6790 "fonttools-" version ".tar.gz"))
6791 (sha256
6792 (base32
6793 "08ay3x4ijarwhl60gqx2i9jzq6pxs20p4snc2d1q5jagh4rn39lb"))))
6794 (build-system python-build-system)
6795 (arguments
6796 '(#:test-target "check"
6797 #:phases
6798 (modify-phases %standard-phases
6799 (add-after 'unpack 'patch-setuppy
6800 ;; Remove the undocumented "extra_path" argument, which adds an
6801 ;; intervening directories between site-packages and the package
6802 ;; directory.
6803 (lambda _
6804 (substitute* "setup.py"
6805 (("^[ \t]*extra_path *= *'FontTools',") ""))
6806 #t)))))
6807 (home-page "https://github.com/behdad/fonttools")
6808 (synopsis "Tools to manipulate font files")
6809 (description
6810 "FontTools/TTX is a library to manipulate font files from Python. It
6811 supports reading and writing of TrueType/OpenType fonts, reading and writing
6812 of AFM files, reading (and partially writing) of PS Type 1 fonts. The package
6813 also contains a tool called “TTX” which converts TrueType/OpenType fonts to and
6814 from an XML-based format.")
6815 (license (license:non-copyleft
6816 "file://LICENSE.txt"
6817 "See LICENSE.txt in the distribution."))))
6818
6819 (define-public python2-fonttools
6820 (package-with-python2 python-fonttools))
6821
6822 (define-public python-ly
6823 (package
6824 (name "python-ly")
6825 (version "0.9.4")
6826 (source
6827 (origin
6828 (method url-fetch)
6829 (uri (string-append "https://pypi.python.org/packages/57/4f/"
6830 "889579244947368f28eda66b782331b1e75f83fd72e63f9ece93cd7a18f9"
6831 "/python-ly-" version ".tar.gz"))
6832 (sha256
6833 (base32
6834 "0g6n288l83sfwavxh1aryi0aqvsr3sp7v6f903mckwqa4scpky62"))))
6835 (build-system python-build-system)
6836 (arguments
6837 ;; FIXME: Some tests need network access.
6838 '(#:tests? #f))
6839 (synopsis "Tool and library for manipulating LilyPond files")
6840 (description "This package provides a Python library to parse, manipulate
6841 or create documents in LilyPond format. A command line program ly is also
6842 provided that can be used to do various manipulations with LilyPond files.")
6843 (home-page "https://pypi.python.org/pypi/python-ly")
6844 (license license:gpl2+)))
6845
6846 (define-public python-appdirs
6847 (package
6848 (name "python-appdirs")
6849 (version "1.4.3")
6850 (source
6851 (origin
6852 (method url-fetch)
6853 (uri (pypi-uri "appdirs" version))
6854 (sha256
6855 (base32
6856 "14id6wxi12lgyw0mg3bcfnf888ad07jz9yj46gfzhn186z8rcn4y"))))
6857 (build-system python-build-system)
6858 (home-page "https://github.com/ActiveState/appdirs")
6859 (synopsis
6860 "Determine platform-specific dirs, e.g. a \"user data dir\"")
6861 (description
6862 "This module provides a portable way of finding out where user data
6863 should be stored on various operating systems.")
6864 (license license:expat)))
6865
6866 (define-public python2-appdirs
6867 (package-with-python2 python-appdirs))
6868
6869 (define-public python-llfuse
6870 (package
6871 (name "python-llfuse")
6872 (version "1.2")
6873 (source (origin
6874 (method url-fetch)
6875 (uri (string-append
6876 "https://bitbucket.org/nikratio/python-llfuse/downloads/"
6877 "llfuse-" version ".tar.bz2"))
6878 (sha256
6879 (base32
6880 "11hms1x68bf1bqbqy7w3wpffqsd3jkgricmzrc1hrnwkswfzzlr4"))))
6881 (build-system python-build-system)
6882 (inputs
6883 `(("fuse" ,fuse)
6884 ("attr" ,attr)))
6885 (native-inputs
6886 `(("pkg-config" ,pkg-config)))
6887 (synopsis "Python bindings for FUSE")
6888 (description
6889 "Python-LLFUSE is a set of Python bindings for the low level FUSE API.")
6890 (home-page "https://bitbucket.org/nikratio/python-llfuse/")
6891 (license license:lgpl2.0+)
6892 (properties `((python2-variant . ,(delay python2-llfuse))))))
6893
6894 (define-public python2-llfuse
6895 (package (inherit (package-with-python2
6896 (strip-python2-variant python-llfuse)))
6897 (propagated-inputs `(("python2-contextlib2" ,python2-contextlib2)))))
6898
6899 ;; For attic-0.16
6900 (define-public python-llfuse-0.41
6901 (package (inherit python-llfuse)
6902 (version "0.41.1")
6903 (source (origin
6904 (method url-fetch)
6905 (uri (string-append
6906 "https://bitbucket.org/nikratio/python-llfuse/downloads/"
6907 "llfuse-" version ".tar.bz2"))
6908 (sha256
6909 (base32
6910 "1imlqw9b73086y97izr036f58pgc5akv4ihc2rrf8j5h75jbrlaa"))))
6911 ;; Python-LLFUSE < 0.42 includes underscore.js, which is MIT (expat)
6912 ;; licensed. The rest of the package is licensed under LGPL2.0 or later.
6913 (license (list license:expat license:lgpl2.0+))))
6914
6915 (define-public python-msgpack
6916 (package
6917 (name "python-msgpack")
6918 (version "0.4.8")
6919 (source (origin
6920 (method url-fetch)
6921 (uri (pypi-uri "msgpack-python" version))
6922 (sha256
6923 (base32
6924 "11pqk5braa6wndpnr1dhg64js82vjgxnm0lzy73rwl831zgijaqs"))))
6925 (build-system python-build-system)
6926 (synopsis "MessagePack (de)serializer")
6927 (description "MessagePack is a fast, compact binary serialization format,
6928 suitable for similar data to JSON. This package provides CPython bindings for
6929 reading and writing MessagePack data.")
6930 (home-page "https://pypi.python.org/pypi/msgpack-python/")
6931 (license license:asl2.0)))
6932
6933 (define-public python2-msgpack
6934 (package-with-python2 python-msgpack))
6935
6936 (define-public python-netaddr
6937 (package
6938 (name "python-netaddr")
6939 (version "0.7.18")
6940 (source
6941 (origin
6942 (method url-fetch)
6943 (uri (string-append
6944 "https://pypi.python.org/packages/source/n/netaddr/netaddr-"
6945 version
6946 ".tar.gz"))
6947 (sha256
6948 (base32
6949 "06dxjlbcicq7q3vqy8agq11ra01kvvd47j4mk6dmghjsyzyckxd1"))))
6950 (build-system python-build-system)
6951 (arguments `(#:tests? #f)) ;; No tests.
6952 (home-page "https://github.com/drkjam/netaddr/")
6953 (synopsis "Pythonic manipulation of network addresses")
6954 (description
6955 "A Python library for representing and manipulating IPv4, IPv6, CIDR, EUI
6956 and MAC network addresses.")
6957 (license license:bsd-3)))
6958
6959 (define-public python2-netaddr
6960 (package-with-python2 python-netaddr))
6961
6962 (define-public python-wrapt
6963 (package
6964 (name "python-wrapt")
6965 (version "1.10.8")
6966 (source
6967 (origin
6968 (method url-fetch)
6969 (uri (pypi-uri "wrapt" version))
6970 (sha256
6971 (base32
6972 "0wrcm1mydvfivbkzz0h81ygzdchnscshi6xvy5n3r21r9s0px8af"))))
6973 (build-system python-build-system)
6974 (arguments
6975 ;; Tests are not included in the tarball, they are only available in the
6976 ;; git repository.
6977 `(#:tests? #f))
6978 (home-page "https://github.com/GrahamDumpleton/wrapt")
6979 (synopsis "Module for decorators, wrappers and monkey patching")
6980 (description
6981 "The aim of the wrapt module is to provide a transparent object proxy for
6982 Python, which can be used as the basis for the construction of function
6983 wrappers and decorator functions.")
6984 (license license:bsd-2)))
6985
6986 (define-public python2-wrapt
6987 (package-with-python2 python-wrapt))
6988
6989 (define-public python-iso8601
6990 (package
6991 (name "python-iso8601")
6992 (version "0.1.11")
6993 (source
6994 (origin
6995 (method url-fetch)
6996 (uri (pypi-uri "iso8601" version))
6997 (sha256
6998 (base32
6999 "0c7gh3lsdjds262h0v1sqc66l7hqgfwbakn96qrhdbl0i3vm5yz8"))))
7000 (build-system python-build-system)
7001 (native-inputs
7002 `(("python-pytest" ,python-pytest)))
7003 (home-page "https://bitbucket.org/micktwomey/pyiso8601")
7004 (synopsis "Module to parse ISO 8601 dates")
7005 (description
7006 "This module parses the most common forms of ISO 8601 date strings (e.g.
7007 @code{2007-01-14T20:34:22+00:00}) into @code{datetime} objects.")
7008 (license license:expat)))
7009
7010 (define-public python2-iso8601
7011 (package-with-python2 python-iso8601))
7012
7013 (define-public python-monotonic
7014 (package
7015 (name "python-monotonic")
7016 (version "0.3")
7017 (source
7018 (origin
7019 (method url-fetch)
7020 (uri (string-append
7021 "https://pypi.python.org/packages/source/m/monotonic/monotonic-"
7022 version
7023 ".tar.gz"))
7024 (sha256
7025 (base32
7026 "0yz0bcbwx8r2c01czzfpbrxddynxyk9k95jj8h6sgcb7xmfvl998"))))
7027 (build-system python-build-system)
7028 (home-page "https://github.com/atdt/monotonic")
7029 (synopsis "Implementation of time.monotonic() for Python 2 & < 3.3")
7030 (description
7031 "This module provides a monotonic() function which returns the value (in
7032 fractional seconds) of a clock which never goes backwards.")
7033 (license license:asl2.0)))
7034
7035 (define-public python2-monotonic
7036 (package-with-python2 python-monotonic))
7037
7038 (define-public python-webob
7039 (package
7040 (name "python-webob")
7041 (version "1.5.1")
7042 (source
7043 (origin
7044 (method url-fetch)
7045 (uri (pypi-uri "WebOb" version))
7046 (sha256
7047 (base32
7048 "02bhhzijfhv8hmi1i54d4b0v43liwhnywhflvxsv4x3zax9s3afq"))))
7049 (build-system python-build-system)
7050 (native-inputs
7051 `(("python-nose" ,python-nose)))
7052 (home-page "http://webob.org/")
7053 (synopsis "WSGI request and response object")
7054 (description
7055 "WebOb provides wrappers around the WSGI request environment, and an
7056 object to help create WSGI responses.")
7057 (license license:expat)))
7058
7059 (define-public python2-webob
7060 (package-with-python2 python-webob))
7061
7062 (define-public python-xlrd
7063 (package
7064 (name "python-xlrd")
7065 (version "1.0.0")
7066 (source (origin
7067 (method url-fetch)
7068 (uri (pypi-uri "xlrd" version))
7069 (sha256
7070 (base32
7071 "0s8hjiz01vbhy85xalrz0qlsmd9ypf36zjqrf97hh984spapvy0g"))))
7072 (build-system python-build-system)
7073 (arguments
7074 `(#:phases
7075 (modify-phases %standard-phases
7076 ;; Current test in setup.py does not work as of 1.0.0, so use nose to
7077 ;; run tests instead for now.
7078 (replace 'check (lambda _ (zero? (system* "nosetests")))))))
7079 (native-inputs `(("python-nose" ,python-nose)))
7080 (home-page "http://www.python-excel.org/")
7081 (synopsis "Library for extracting data from Excel files")
7082 (description "This packages provides a library to extract data from
7083 spreadsheets using Microsoft Excel proprietary file formats @samp{.xls} and
7084 @samp{.xlsx} (versions 2.0 onwards). It has support for Excel dates and is
7085 Unicode-aware. It is not intended as an end-user tool.")
7086 (license license:bsd-3)))
7087
7088 (define-public python2-xlrd
7089 (package-with-python2 python-xlrd))
7090
7091 (define-public python-prettytable
7092 (package
7093 (name "python-prettytable")
7094 (version "0.7.2")
7095 (source
7096 (origin
7097 (method url-fetch)
7098 (uri (string-append
7099 "https://pypi.python.org/packages/source/P/PrettyTable/"
7100 "prettytable-" version ".tar.bz2"))
7101 (sha256
7102 (base32
7103 "0diwsicwmiq2cpzpxri7cyl5fmsvicafw6nfqf6p6p322dji2g45"))))
7104 (build-system python-build-system)
7105 (home-page "http://code.google.com/p/prettytable/")
7106 (synopsis "Display tabular data in an ASCII table format")
7107 (description
7108 "A library designed to represent tabular data in visually appealing ASCII
7109 tables. PrettyTable allows for selection of which columns are to be printed,
7110 independent alignment of columns (left or right justified or centred) and
7111 printing of sub-tables by specifying a row range.")
7112 (license license:bsd-3)))
7113
7114 (define-public python2-prettytable
7115 (package-with-python2 python-prettytable))
7116
7117 (define-public python-tables
7118 (package
7119 (name "python-tables")
7120 (version "3.2.2")
7121 (source
7122 (origin
7123 (method url-fetch)
7124 (uri (pypi-uri "tables" version))
7125 (sha256
7126 (base32
7127 "117s6w7s3yxafpmf3zz3svana7xfrsviw01va1xp7h8ylx8v6r1m"))
7128 (modules '((guix build utils)))
7129 (snippet
7130 '(begin
7131 ;; Remove pre-compiled .pyc files from source.
7132 (for-each delete-file-recursively
7133 (find-files "." "__pycache__" #:directories? #t))
7134 (for-each delete-file (find-files "." "\\.pyc$"))
7135 #t))))
7136 (build-system python-build-system)
7137 (arguments
7138 `(;; FIXME: python-build-system does not pass configure-flags to "build"
7139 ;; or "check", so we must override the build and check phases.
7140 #:phases
7141 (modify-phases %standard-phases
7142 (add-after 'unpack 'use-gcc
7143 (lambda _
7144 (substitute* "setup.py"
7145 (("compiler = new_compiler\\(\\)" line)
7146 (string-append line
7147 "\ncompiler.set_executables(compiler='gcc',"
7148 "compiler_so='gcc',"
7149 "linker_exe='gcc',"
7150 "linker_so='gcc -shared')")))
7151 #t))
7152 (replace 'build
7153 (lambda* (#:key inputs #:allow-other-keys)
7154 (zero? (system* "python" "setup.py" "build"
7155 (string-append "--hdf5="
7156 (assoc-ref inputs "hdf5"))))))
7157 (replace 'check
7158 (lambda* (#:key inputs #:allow-other-keys)
7159 (zero? (system* "python" "setup.py" "check"
7160 (string-append "--hdf5="
7161 (assoc-ref inputs "hdf5")))))))))
7162 (propagated-inputs
7163 `(("python-numexpr" ,python-numexpr)
7164 ("python-numpy" ,python-numpy)))
7165 (native-inputs
7166 `(("python-cython" ,python-cython)
7167 ("pkg-config" ,pkg-config)))
7168 (inputs
7169 `(("hdf5" ,hdf5)
7170 ("bzip2" ,bzip2)
7171 ("zlib" ,zlib)))
7172 (home-page "http://www.pytables.org/")
7173 (synopsis "Hierarchical datasets for Python")
7174 (description "PyTables is a package for managing hierarchical datasets and
7175 designed to efficiently cope with extremely large amounts of data.")
7176 (license license:bsd-3)))
7177
7178 (define-public python2-tables
7179 (package-with-python2 python-tables))
7180
7181 (define-public python-pyasn1
7182 (package
7183 (name "python-pyasn1")
7184 (version "0.2.3")
7185 (source
7186 (origin
7187 (method url-fetch)
7188 (uri (pypi-uri "pyasn1" version))
7189 (sha256
7190 (base32
7191 "1b86yx23c1x74clai05a5ma8c8nfmhlx3j1mxq0ff657i2ylx33k"))))
7192 (build-system python-build-system)
7193 (home-page "http://pyasn1.sourceforge.net/")
7194 (synopsis "ASN.1 types and codecs")
7195 (description
7196 "This is an implementation of ASN.1 types and codecs in Python. It is
7197 suitable for a wide range of protocols based on the ASN.1 specification.")
7198 (license license:bsd-2)))
7199
7200 (define-public python2-pyasn1
7201 (package-with-python2 python-pyasn1))
7202
7203 (define-public python-pyasn1-modules
7204 (package
7205 (name "python-pyasn1-modules")
7206 (version "0.0.8")
7207 (source
7208 (origin
7209 (method url-fetch)
7210 (uri (pypi-uri "pyasn1-modules" version))
7211 (sha256
7212 (base32
7213 "0drqgw81xd3fxdlg89kgd79zzrabvfncvkbybi2wr6w2y4s1jmhh"))))
7214 (build-system python-build-system)
7215 (propagated-inputs
7216 `(("python-pyasn1" ,python-pyasn1)))
7217 (home-page "https://sourceforge.net/projects/pyasn1/")
7218 (synopsis "ASN.1 codec implementations")
7219 (description
7220 "Pyasn1-modules is a collection of Python modules providing ASN.1 types and
7221 implementations of ASN.1-based codecs and protocols.")
7222 (license license:bsd-3)))
7223
7224 (define-public python2-pyasn1-modules
7225 (package-with-python2 python-pyasn1-modules))
7226
7227 (define-public python-ipaddress
7228 (package
7229 (name "python-ipaddress")
7230 (version "1.0.18")
7231 (source (origin
7232 (method url-fetch)
7233 (uri (pypi-uri "ipaddress" version))
7234 (sha256
7235 (base32
7236 "1q8klj9d84cmxgz66073x1j35cplr3r77vx1znhxiwl5w74391ax"))))
7237 (build-system python-build-system)
7238 (home-page "https://github.com/phihag/ipaddress")
7239 (synopsis "IP address manipulation library")
7240 (description
7241 "This package provides a fast, lightweight IPv4/IPv6 manipulation library
7242 in Python. This library is used to create, poke at, and manipulate IPv4 and
7243 IPv6 addresses and networks. This is a port of the Python 3.3 ipaddress
7244 module to older versions of Python.")
7245 (license license:psfl)))
7246
7247 (define-public python2-ipaddress
7248 (package-with-python2 python-ipaddress))
7249
7250 (define-public python2-ipaddr
7251 (package
7252 (name "python2-ipaddr")
7253 (version "2.1.11")
7254 (source
7255 (origin
7256 (method url-fetch)
7257 (uri (pypi-uri "ipaddr" version))
7258 (sha256
7259 (base32 "1dwq3ngsapjc93fw61rp17fvzggmab5x1drjzvd4y4q0i255nm8v"))))
7260 (build-system python-build-system)
7261 (arguments
7262 `(#:python ,python-2 ;version 2 only
7263 #:phases
7264 (modify-phases %standard-phases
7265 (replace 'check
7266 (lambda* _
7267 (zero? (system* "python" "ipaddr_test.py")))))))
7268 (home-page "https://github.com/google/ipaddr-py")
7269 (synopsis "IP address manipulation library")
7270 (description
7271 "Ipaddr is a Python@tie{}2 library for creating and manupilating IPv4 and
7272 IPv6 addresses and networks.
7273
7274 For new implementations you may prefer to use the standard module
7275 @code{ipaddress}, which was introduced in Python 3.3 and backported to older
7276 versions of Python.")
7277 (license license:asl2.0)))
7278
7279 (define-public python-idna
7280 (package
7281 (name "python-idna")
7282 (version "2.5")
7283 (source
7284 (origin
7285 (method url-fetch)
7286 (uri (pypi-uri "idna" version))
7287 (sha256
7288 (base32
7289 "1ara12a7k2zc69msa0arrvw00gn61a6i6by01xb3lkkc0h4cxd9w"))))
7290 (build-system python-build-system)
7291 (home-page "https://github.com/kjd/idna")
7292 (synopsis "Internationalized domain names in applications")
7293 (description
7294 "This is a library to support the Internationalised Domain Names in
7295 Applications (IDNA) protocol as specified in RFC 5891. This version of the
7296 protocol is often referred to as “IDNA2008” and can produce different results
7297 from the earlier standard from 2003. The library is also intended to act as a
7298 suitable drop-in replacement for the “encodings.idna” module that comes with
7299 the Python standard library but currently only supports the older 2003
7300 specification.")
7301 (license license:bsd-4)))
7302
7303 (define-public python2-idna
7304 (package-with-python2 python-idna))
7305
7306 (define-public python-pretend
7307 (package
7308 (name "python-pretend")
7309 (version "1.0.8")
7310 (source
7311 (origin
7312 (method url-fetch)
7313 (uri (string-append "https://pypi.python.org/packages/source/p/"
7314 "pretend/pretend-" version ".tar.gz"))
7315 (sha256
7316 (base32
7317 "0r5r7ygz9m6d2bklflbl84cqhjkc2q12xgis8268ygjh30g2q3wk"))))
7318 (build-system python-build-system)
7319 (home-page "https://github.com/alex/pretend")
7320 (synopsis "Library for stubbing in Python")
7321 (description
7322 "Pretend is a library to make stubbing with Python easier. Stubbing is a
7323 technique for writing tests. You may hear the term mixed up with mocks,
7324 fakes, or doubles. Basically, a stub is an object that returns pre-canned
7325 responses, rather than doing any computation.")
7326 (license license:bsd-3)))
7327
7328 (define-public python2-pretend
7329 (package-with-python2 python-pretend))
7330
7331 (define-public python-cryptography-vectors
7332 (package
7333 (name "python-cryptography-vectors")
7334 (version "1.8.2")
7335 (source
7336 (origin
7337 (method url-fetch)
7338 (uri (pypi-uri "cryptography_vectors" version))
7339 (sha256
7340 (base32
7341 "0hzvq0bfy21bc35p8z7zdxpv3hbvi7adg4axc1b5yd3hk16a1nh0"))))
7342 (build-system python-build-system)
7343 (home-page "https://github.com/pyca/cryptography")
7344 (synopsis "Test vectors for the cryptography package")
7345 (description
7346 "This package contains test vectors for the cryptography package.")
7347 ;; Distributed under either BSD-3 or ASL2.0
7348 (license (list license:bsd-3 license:asl2.0))))
7349
7350 (define-public python2-cryptography-vectors
7351 (package-with-python2 python-cryptography-vectors))
7352
7353 (define-public python-cryptography
7354 (package
7355 (name "python-cryptography")
7356 (version "1.8.2")
7357 (source
7358 (origin
7359 (method url-fetch)
7360 (uri (pypi-uri "cryptography" version))
7361 (sha256
7362 (base32
7363 "1nmy4fw3zy7rlvarkhn33g9905rwpy9z7k5kv8j80f0s6ynfp24f"))))
7364 (build-system python-build-system)
7365 (inputs
7366 `(("openssl" ,openssl)))
7367 (propagated-inputs
7368 `(("python-asn1crypto" ,python-asn1crypto)
7369 ("python-cffi" ,python-cffi)
7370 ("python-six" ,python-six)
7371 ("python-idna" ,python-idna)
7372 ;; Packaging is used to check the version of python-cffi in
7373 ;; 'src/cryptography/hazmat/primitives/ciphers/base.py'. We should be
7374 ;; able to remove this dependency in the next release of cryptography:
7375 ;; python-cryptography:
7376 ;; https://github.com/pyca/cryptography/commit/0417d00d9ff1e19bc3ab67d39bdd18e1674768c1
7377 ("python-packaging" ,python-packaging)
7378 ("python-iso8601" ,python-iso8601)))
7379 (native-inputs
7380 `(("python-cryptography-vectors" ,python-cryptography-vectors)
7381 ("python-hypothesis" ,python-hypothesis)
7382 ("python-pretend" ,python-pretend)
7383 ("python-pytz" ,python-pytz)
7384 ("python-pytest" ,python-pytest-3.0)))
7385 (home-page "https://github.com/pyca/cryptography")
7386 (synopsis "Cryptographic recipes and primitives for Python")
7387 (description
7388 "cryptography is a package which provides cryptographic recipes and
7389 primitives to Python developers. It aims to be the “cryptographic standard
7390 library” for Python. The package includes both high level recipes, and low
7391 level interfaces to common cryptographic algorithms such as symmetric ciphers,
7392 message digests and key derivation functions.")
7393 ;; Distributed under either BSD-3 or ASL2.0
7394 (license (list license:bsd-3 license:asl2.0))
7395 (properties `((python2-variant . ,(delay python2-cryptography))))))
7396
7397 (define-public python2-cryptography
7398 (let ((crypto (package-with-python2
7399 (strip-python2-variant python-cryptography))))
7400 (package (inherit crypto)
7401 (propagated-inputs
7402 `(("python2-ipaddress" ,python2-ipaddress)
7403 ("python2-backport-ssl-match-hostname"
7404 ,python2-backport-ssl-match-hostname)
7405 ("python2-enum34" ,python2-enum34)
7406 ,@(package-propagated-inputs crypto))))))
7407
7408 (define-public python-pyopenssl
7409 (package
7410 (name "python-pyopenssl")
7411 (version "17.0.0")
7412 (source
7413 (origin
7414 (method url-fetch)
7415 (uri (pypi-uri "pyOpenSSL" version))
7416 (sha256
7417 (base32
7418 "1pdg1gpmkzj8yasg6cmkhcivxcdp4c12nif88y4qvsxq5ffzxas8"))
7419 (patches
7420 (search-patches "python-pyopenssl-skip-network-test.patch"))))
7421 (build-system python-build-system)
7422 (arguments
7423 '(#:phases
7424 (modify-phases %standard-phases
7425 (delete 'check)
7426 (add-after 'install 'check
7427 (lambda* (#:key inputs outputs #:allow-other-keys)
7428 (add-installed-pythonpath inputs outputs)
7429 (zero? (system* "py.test" "-v")))))))
7430 (propagated-inputs
7431 `(("python-cryptography" ,python-cryptography)
7432 ("python-six" ,python-six)))
7433 (inputs
7434 `(("openssl" ,openssl)))
7435 (native-inputs
7436 `(("python-pytest" ,python-pytest-3.0)))
7437 (home-page "https://github.com/pyca/pyopenssl")
7438 (synopsis "Python wrapper module around the OpenSSL library")
7439 (description
7440 "PyOpenSSL is a high-level wrapper around a subset of the OpenSSL
7441 library.")
7442 (license license:asl2.0)))
7443
7444 (define-public python2-pyopenssl
7445 (package-with-python2 python-pyopenssl))
7446
7447 (define-public python-pip
7448 (package
7449 (name "python-pip")
7450 (version "9.0.1")
7451 (source
7452 (origin
7453 (method url-fetch)
7454 (uri (pypi-uri "pip" version))
7455 (sha256
7456 (base32
7457 "03clr9c1dih5n9c00c592zzvf6r1ffimywkaq9agcqdllzhl7wh9"))))
7458 (build-system python-build-system)
7459 (arguments
7460 '(#:tests? #f)) ; there are no tests in the pypi archive.
7461 (home-page "https://pip.pypa.io/")
7462 (synopsis "Package manager for Python software")
7463 (description
7464 "Pip is a package manager for Python software, that finds packages on the
7465 Python Package Index (PyPI).")
7466 (license license:expat)))
7467
7468 (define-public python2-pip
7469 (package-with-python2 python-pip))
7470
7471 (define-public python-tlsh
7472 (package
7473 (name "python-tlsh")
7474 (version "3.4.4")
7475 (home-page "https://github.com/trendmicro/tlsh")
7476 (source (origin
7477 (method url-fetch)
7478 (uri (string-append "https://github.com/trendmicro/tlsh/archive/v"
7479 version ".tar.gz"))
7480 (sha256
7481 (base32
7482 "00bhzjqrlh7v538kbkbn8lgx976j1138al3sdhklaizqjvpwyk4r"))
7483 (file-name (string-append name "-" version ".tar.gz"))))
7484 (build-system cmake-build-system)
7485 (arguments
7486 '(#:out-of-source? #f
7487 #:phases (modify-phases %standard-phases
7488 (replace
7489 'install
7490 (lambda* (#:key outputs #:allow-other-keys)
7491 ;; Build and install the Python bindings. The underlying
7492 ;; C++ library is apparently not meant to be installed.
7493 (let ((out (assoc-ref outputs "out")))
7494 (with-directory-excursion "py_ext"
7495 (and (system* "python" "setup.py" "build")
7496 (system* "python" "setup.py" "install"
7497 (string-append "--prefix=" out))))))))))
7498 (inputs `(("python" ,python-wrapper))) ;for the bindings
7499 (synopsis "Fuzzy matching library for Python")
7500 (description
7501 "Trend Micro Locality Sensitive Hash (TLSH) is a fuzzy matching library.
7502 Given a byte stream with a minimum length of 256 bytes, TLSH generates a hash
7503 value which can be used for similarity comparisons. Similar objects have
7504 similar hash values, which allows for the detection of similar objects by
7505 comparing their hash values. The byte stream should have a sufficient amount
7506 of complexity; for example, a byte stream of identical bytes will not generate
7507 a hash value.")
7508 (license license:asl2.0)))
7509
7510 (define-public python2-tlsh
7511 (package
7512 (inherit python-tlsh)
7513 (name "python2-tlsh")
7514 (inputs `(("python" ,python-2)))))
7515
7516 (define-public python-termcolor
7517 (package
7518 (name "python-termcolor")
7519 (version "1.1.0")
7520 (source
7521 (origin
7522 (method url-fetch)
7523 (uri (pypi-uri "termcolor" version))
7524 (sha256
7525 (base32
7526 "0fv1vq14rpqwgazxg4981904lfyp84mnammw7y046491cv76jv8x"))))
7527 (build-system python-build-system)
7528 (arguments
7529 ;; There are no tests.
7530 `(#:tests? #f))
7531 (home-page "http://pypi.python.org/pypi/termcolor")
7532 (synopsis "ANSII Color formatting for terminal output")
7533 (description
7534 "This package provides ANSII Color formatting for output in terminals.")
7535 (license license:expat)))
7536
7537 (define-public python2-termcolor
7538 (package-with-python2 python-termcolor))
7539
7540 (define-public python-libarchive-c
7541 (package
7542 (name "python-libarchive-c")
7543 (version "2.2")
7544 (source (origin
7545 (method url-fetch)
7546 (uri (pypi-uri "libarchive-c" version))
7547 (sha256
7548 (base32
7549 "0z4r7v3dhd6b3120mav05ff08srih176r2rg5k8kn7mjd9pslm2x"))))
7550 (build-system python-build-system)
7551 (arguments
7552 '(#:phases (modify-phases %standard-phases
7553 (add-before
7554 'build 'reference-libarchive
7555 (lambda* (#:key inputs #:allow-other-keys)
7556 ;; Retain the absolute file name of libarchive.so.
7557 (let ((libarchive (assoc-ref inputs "libarchive")))
7558 (substitute* "libarchive/ffi.py"
7559 (("find_library\\('archive'\\)")
7560 (string-append "'" libarchive
7561 "/lib/libarchive.so'")))))))))
7562 (inputs
7563 `(("libarchive" ,libarchive)))
7564 (home-page "https://github.com/Changaco/python-libarchive-c")
7565 (synopsis "Python interface to libarchive")
7566 (description
7567 "This package provides Python bindings to libarchive, a C library to
7568 access possibly compressed archives in many different formats. It uses
7569 Python's @code{ctypes} foreign function interface (FFI).")
7570 (license license:lgpl2.0+)))
7571
7572 (define-public python2-libarchive-c
7573 (package-with-python2 python-libarchive-c))
7574
7575 (define-public python-file
7576 (package
7577 (inherit file)
7578 (name "python-file")
7579 (source (origin
7580 (inherit (package-source file))
7581 ;; This patch should not be applied to python2-file.
7582 (patches (search-patches "python-file-double-encoding-bug.patch"))))
7583 (build-system python-build-system)
7584 (arguments
7585 '(#:tests? #f ;no tests
7586 #:configure-flags '("--single-version-externally-managed" "--root=/")
7587 #:phases (modify-phases %standard-phases
7588 (add-before 'build 'change-directory
7589 (lambda _
7590 (chdir "python")
7591 #t))
7592 (add-before 'build 'set-library-file-name
7593 (lambda* (#:key inputs #:allow-other-keys)
7594 (let ((file (assoc-ref inputs "file")))
7595 (substitute* "magic.py"
7596 (("find_library\\('magic'\\)")
7597 (string-append "'" file "/lib/libmagic.so'")))
7598 #t))))))
7599 (inputs `(("file" ,file)))
7600 (self-native-input? #f)
7601 (synopsis "Python bindings to the libmagic file type guesser. Note that
7602 this module and the python-magic module both provide a \"magic.py\" file;
7603 these two modules, which are different and were developed separately, both
7604 serve the same purpose: provide Python bindings for libmagic.")))
7605
7606 (define-public python2-file
7607 (package-with-python2 python-file))
7608
7609 (define-public python-debian
7610 (package
7611 (name "python-debian")
7612 (version "0.1.28")
7613 (source
7614 (origin
7615 (method url-fetch)
7616 (uri (pypi-uri name version))
7617 (sha256
7618 (base32
7619 "0i15f0xzx679sd0ldq2sls9pnnps9fv6vhqvnv9dzf4qhma42i0y"))))
7620 (build-system python-build-system)
7621 (propagated-inputs
7622 `(("python-six" ,python-six)))
7623 (home-page "http://packages.debian.org/sid/python-debian")
7624 (synopsis "Debian package related modules")
7625 (description
7626 ;; XXX: Use @enumerate instead of @itemize to work around
7627 ;; <http://bugs.gnu.org/21772>.
7628 "This package provides Python modules that abstract many formats of
7629 Debian-related files, such as:
7630
7631 @enumerate
7632 @item Debtags information;
7633 @item @file{debian/changelog} files;
7634 @item packages files, pdiffs;
7635 @item control files of single or multiple RFC822-style paragraphs---e.g.
7636 @file{debian/control}, @file{.changes}, @file{.dsc};
7637 @item Raw @file{.deb} and @file{.ar} files, with (read-only) access to
7638 contained files and meta-information.
7639 @end enumerate\n")
7640
7641 ;; Modules are either GPLv2+ or GPLv3+.
7642 (license license:gpl3+)))
7643
7644 (define-public python2-debian
7645 (package-with-python2 python-debian))
7646
7647 (define-public python-nbformat
7648 (package
7649 (name "python-nbformat")
7650 (version "4.1.0")
7651 (source
7652 (origin
7653 (method url-fetch)
7654 (uri (pypi-uri "nbformat" version))
7655 (sha256
7656 (base32
7657 "0mq8iki3d4mnx7wy05phss7x98mds4fqydin8lcagidp1knw1xnv"))))
7658 (build-system python-build-system)
7659 (arguments `(#:tests? #f)) ; no test target
7660 (propagated-inputs
7661 `(("python-ipython-genutils" ,python-ipython-genutils)
7662 ("python-jsonschema" ,python-jsonschema)
7663 ("python-jupyter-core" ,python-jupyter-core)
7664 ("python-traitlets" ,python-traitlets)))
7665 (home-page "http://jupyter.org")
7666 (synopsis "Jupyter Notebook format")
7667 (description "This package provides the reference implementation of the
7668 Jupyter Notebook format and Python APIs for working with notebooks.")
7669 (license license:bsd-3)))
7670
7671 (define-public python2-nbformat
7672 (package-with-python2 python-nbformat))
7673
7674 (define-public python-bleach
7675 (package
7676 (name "python-bleach")
7677 (version "1.4.3")
7678 (source
7679 (origin
7680 (method url-fetch)
7681 (uri (pypi-uri "bleach" version))
7682 (sha256
7683 (base32
7684 "0jvg3jxrvnx7xmm9gj262v60ib452xlnwlb0navyp7jsvcd0d4qj"))))
7685 (build-system python-build-system)
7686 (propagated-inputs
7687 `(("python-html5lib" ,python-html5lib-0.9)
7688 ("python-six" ,python-six)))
7689 (native-inputs
7690 `(("python-nose" ,python-nose)))
7691 (home-page "https://github.com/jsocol/bleach")
7692 (synopsis "Whitelist-based HTML-sanitizing tool")
7693 (description "Bleach is an easy whitelist-based HTML-sanitizing tool.")
7694 (license license:asl2.0)))
7695
7696 (define-public python2-bleach
7697 (package-with-python2 python-bleach))
7698
7699 (define-public python-entrypoints
7700 (package
7701 (name "python-entrypoints")
7702 (version "0.2.2")
7703 (source
7704 (origin
7705 (method url-fetch)
7706 (uri (string-append "https://github.com/takluyver/entrypoints/archive/"
7707 version ".tar.gz"))
7708 (file-name (string-append name "-" version ".tar.gz"))
7709 (sha256
7710 (base32
7711 "0azqlkh3j0za080lsf5crnhaxx3c93k9dpv5ihkhf5cppgw5sjz5"))))
7712 (build-system python-build-system)
7713 ;; The package does not come with a setup.py file, so we have to generate
7714 ;; one ourselves.
7715 (arguments
7716 `(#:tests? #f
7717 #:phases
7718 (modify-phases %standard-phases
7719 (add-after 'unpack 'create-setup.py
7720 (lambda _
7721 (call-with-output-file "setup.py"
7722 (lambda (port)
7723 (format port "\
7724 from setuptools import setup
7725 setup(name='entrypoints', version='~a', py_modules=['entrypoints'])
7726 " ,version))))))))
7727 (home-page "https://github.com/takluyver/entrypoints")
7728 (synopsis "Discover and load entry points from installed Python packages")
7729 (description "Entry points are a way for Python packages to advertise
7730 objects with some common interface. The most common examples are
7731 @code{console_scripts} entry points, which define shell commands by
7732 identifying a Python function to run. The @code{entrypoints} module contains
7733 functions to find and load entry points.")
7734 (license license:expat)))
7735
7736 (define-public python2-entrypoints
7737 (package-with-python2 python-entrypoints))
7738
7739 (define-public python-nbconvert
7740 (package
7741 (name "python-nbconvert")
7742 (version "5.0.0b1")
7743 (source
7744 (origin
7745 (method url-fetch)
7746 (uri (pypi-uri "nbconvert" version))
7747 (sha256
7748 (base32
7749 "0brclbb18l4nmd5qy3dl9wn05rjdh1fz4rmzdlfqacj12rcdvdgp"))))
7750 (build-system python-build-system)
7751 (arguments
7752 `(;; The "bdist_egg" target is disabled by default, causing the installation
7753 ;; to fail.
7754 #:configure-flags (list "bdist_egg")
7755 ;; FIXME: 5 failures, 40 errors.
7756 #:tests? #f))
7757 ;; #:phases
7758 ;; (modify-phases %standard-phases
7759 ;; (replace 'check
7760 ;; (lambda _
7761 ;; (zero? (system* "py.test" "-v")))))
7762 (native-inputs
7763 `(("python-pytest" ,python-pytest)))
7764 (propagated-inputs
7765 `(("python-bleach" ,python-bleach)
7766 ("python-entrypoints" ,python-entrypoints)
7767 ("python-jinja2" ,python-jinja2)
7768 ("python-jupyter-core" ,python-jupyter-core)
7769 ("python-mistune" ,python-mistune)
7770 ("python-nbformat" ,python-nbformat)
7771 ("python-pygments" ,python-pygments)
7772 ("python-traitlets" ,python-traitlets)))
7773 (home-page "http://jupyter.org")
7774 (synopsis "Converting Jupyter Notebooks")
7775 (description "The @code{nbconvert} tool, @{jupyter nbconvert}, converts
7776 notebooks to various other formats via Jinja templates. It allows you to
7777 convert an @code{.ipynb} notebook file into various static formats including:
7778
7779 @enumerate
7780 @item HTML
7781 @item LaTeX
7782 @item PDF
7783 @item Reveal JS
7784 @item Markdown (md)
7785 @item ReStructured Text (rst)
7786 @item executable script
7787 @end enumerate\n")
7788 (license license:bsd-3)))
7789
7790 (define-public python2-nbconvert
7791 (package-with-python2 python-nbconvert))
7792
7793 (define-public python-notebook
7794 (package
7795 (name "python-notebook")
7796 (version "4.2.3")
7797 (source (origin
7798 (method url-fetch)
7799 (uri (pypi-uri "notebook" version))
7800 (sha256
7801 (base32
7802 "0laq5c2f21frq6xcdckgq7raqhznbjb0qs0357g612z87wyn1a9r"))))
7803 (build-system python-build-system)
7804 (arguments
7805 `(#:phases
7806 (modify-phases %standard-phases
7807 (replace 'check
7808 (lambda _
7809 ;; HOME must be set for tests
7810 (setenv "HOME" "/tmp")
7811 (zero? (system* "nosetests")))))))
7812 (propagated-inputs
7813 `(("python-jupyter-core" ,python-jupyter-core)
7814 ("python-nbformat" ,python-nbformat)
7815 ("python-nbconvert" ,python-nbconvert)
7816 ("python-ipython" ,python-ipython)))
7817 (native-inputs
7818 `(("python-nose" ,python-nose)
7819 ("python-sphinx" ,python-sphinx)
7820 ("python-requests" ,python-requests)))
7821 (home-page "http://jupyter.org/")
7822 (synopsis "Web-based notebook environment for interactive computing")
7823 (description
7824 "The Jupyter HTML notebook is a web-based notebook environment for
7825 interactive computing.")
7826 (properties `((python2-variant . ,(delay python2-notebook))))
7827 (license license:bsd-3)))
7828
7829 (define-public python2-notebook
7830 (let ((base (package-with-python2
7831 (strip-python2-variant python-notebook))))
7832 (package (inherit base)
7833 (native-inputs
7834 `(("python2-mock" ,python2-mock)
7835 ,@(package-native-inputs base)))
7836 (arguments
7837 (substitute-keyword-arguments (package-arguments base)
7838 ((#:phases phases)
7839 `(modify-phases ,phases
7840 (add-before 'check 'disable-test-case
7841 ;; The test requires network access to localhost. Curiously it
7842 ;; fails with Python 2 only. Simply make the test-case return
7843 ;; immediately.
7844 (lambda _
7845 (substitute*
7846 "notebook/services/nbconvert/tests/test_nbconvert_api.py"
7847 (("formats = self.nbconvert_api") "return #")))))))))))
7848
7849 (define-public python-widgetsnbextension
7850 (package
7851 (name "python-widgetsnbextension")
7852 (version "1.2.6")
7853 (source
7854 (origin
7855 (method url-fetch)
7856 (uri (pypi-uri "widgetsnbextension" version))
7857 (sha256
7858 (base32
7859 "0lff2mrwrgsa1mxmwx3phl9xvy0jqfpg6khbmxy53jbq56rwy666"))))
7860 (build-system python-build-system)
7861 (propagated-inputs
7862 `(("python-notebook" ,python-notebook)))
7863 (native-inputs
7864 `(("python-certifi" ,python-certifi)
7865 ("python-nose" ,python-nose)))
7866 (home-page "http://ipython.org")
7867 (synopsis "IPython HTML widgets for Jupyter")
7868 (description "This package provides interactive HTML widgets for Jupyter
7869 notebooks.")
7870 (license license:bsd-3)))
7871
7872 (define-public python2-widgetsnbextension
7873 (package-with-python2 python-widgetsnbextension))
7874
7875 (define-public python-ipywidgets
7876 (package
7877 (name "python-ipywidgets")
7878 (version "5.2.2")
7879 (source
7880 (origin
7881 (method url-fetch)
7882 (uri (pypi-uri "ipywidgets" version))
7883 (sha256
7884 (base32
7885 "1lk0qrr5l9a0z7qkkn30hv5832whxwxymf1l576fmmad0n7hkxms"))))
7886 (build-system python-build-system)
7887 ;; FIXME: it's not clear how to run the tests.
7888 (arguments `(#:tests? #f))
7889 (propagated-inputs
7890 `(("python-ipykernel" ,python-ipykernel)
7891 ("python-ipython" ,python-ipython)
7892 ("python-traitlets" ,python-traitlets)
7893 ("python-widgetsnbextension" ,python-widgetsnbextension)))
7894 (home-page "http://ipython.org")
7895 (synopsis "IPython HTML widgets for Jupyter")
7896 (description "Ipywidgets are interactive HTML widgets for Jupyter
7897 notebooks and the IPython kernel. Notebooks come alive when interactive
7898 widgets are used. Users gain control of their data and can visualize changes
7899 in the data.")
7900 (license license:bsd-3)))
7901
7902 (define-public python2-ipywidgets
7903 (package-with-python2 python-ipywidgets))
7904
7905 (define-public python-jupyter-console
7906 (package
7907 (name "python-jupyter-console")
7908 (version "5.0.0")
7909 (source
7910 (origin
7911 (method url-fetch)
7912 (uri (pypi-uri "jupyter_console" version))
7913 (sha256
7914 (base32
7915 "04acmkwsi99rcg3vb54c6n492zv35s92h2ahabc0w6wj976cipvx"))))
7916 (build-system python-build-system)
7917 ;; FIXME: it's not clear how to run the tests.
7918 (arguments `(#:tests? #f))
7919 (propagated-inputs
7920 `(("python-ipykernel" ,python-ipykernel)
7921 ("python-ipython" ,python-ipython)
7922 ("python-jupyter-client" ,python-jupyter-client)
7923 ("python-prompt-toolkit" ,python-prompt-toolkit)
7924 ("python-pygments" ,python-pygments)))
7925 (home-page "https://jupyter.org")
7926 (synopsis "Jupyter terminal console")
7927 (description "This package provides a terminal-based console frontend for
7928 Jupyter kernels. It also allows for console-based interaction with non-Python
7929 Jupyter kernels such as IJulia and IRKernel.")
7930 (license license:bsd-3)))
7931
7932 (define-public python2-jupyter-console
7933 (package-with-python2 python-jupyter-console))
7934
7935 (define-public jupyter
7936 (package
7937 (name "jupyter")
7938 (version "1.0.0")
7939 (source
7940 (origin
7941 (method url-fetch)
7942 (uri (pypi-uri "jupyter" version))
7943 (sha256
7944 (base32
7945 "0pwf3pminkzyzgx5kcplvvbvwrrzd3baa7lmh96f647k30rlpp6r"))))
7946 (build-system python-build-system)
7947 ;; FIXME: it's not clear how to run the tests.
7948 (arguments `(#:tests? #f))
7949 (propagated-inputs
7950 `(("python-ipykernel" ,python-ipykernel)
7951 ("python-ipywidgets" ,python-ipywidgets)
7952 ("python-jupyter-console" ,python-jupyter-console)
7953 ("python-nbconvert" ,python-nbconvert)
7954 ("python-notebook" ,python-notebook)))
7955 (home-page "http://jupyter.org")
7956 (synopsis "Web application for interactive documents")
7957 (description
7958 "The Jupyter Notebook is a web application that allows you to create and
7959 share documents that contain live code, equations, visualizations and
7960 explanatory text. Uses include: data cleaning and transformation, numerical
7961 simulation, statistical modeling, machine learning and much more.")
7962 (license license:bsd-3)))
7963
7964 (define-public python-chardet
7965 (package
7966 (name "python-chardet")
7967 (version "2.3.0")
7968 (source
7969 (origin
7970 (method url-fetch)
7971 (uri (string-append
7972 "https://pypi.python.org/packages/source/c/chardet/chardet-"
7973 version
7974 ".tar.gz"))
7975 (sha256
7976 (base32
7977 "1ak87ikcw34fivcgiz2xvi938dmclh078az65l9x3rmgljrkhgp5"))))
7978 (build-system python-build-system)
7979 (home-page "https://github.com/chardet/chardet")
7980 (synopsis "Universal encoding detector for Python 2 and 3")
7981 (description
7982 "This package provides @code{chardet}, a Python module that can
7983 automatically detect a wide range of file encodings.")
7984 (license license:lgpl2.1+)))
7985
7986 (define-public python2-chardet
7987 (package-with-python2 python-chardet))
7988
7989 (define-public python-docopt
7990 (package
7991 (name "python-docopt")
7992 (version "0.6.2")
7993 (source
7994 (origin
7995 (method url-fetch)
7996 ;; The release on PyPI does not include tests.
7997 (uri (string-append
7998 "https://github.com/docopt/docopt/archive/"
7999 version ".tar.gz"))
8000 (file-name (string-append name "-" version ".tar.gz"))
8001 (sha256
8002 (base32
8003 "16bf890xbdz3m30rsv2qacklh2rdn1zrfspfnwzx9g7vwz8yw4r1"))))
8004 (build-system python-build-system)
8005 (native-inputs
8006 `(("python-pytest" ,python-pytest)))
8007 (arguments
8008 `(#:phases (alist-replace
8009 'check
8010 (lambda _ (zero? (system* "py.test")))
8011 %standard-phases)))
8012 (home-page "http://docopt.org")
8013 (synopsis "Command-line interface description language for Python")
8014 (description "This library allows the user to define a command-line
8015 interface from a program's help message rather than specifying it
8016 programatically with command-line parsers like @code{getopt} and
8017 @code{argparse}.")
8018 (license license:expat)))
8019
8020 (define-public python2-docopt
8021 (package-with-python2 python-docopt))
8022
8023 (define-public python-zope-event
8024 (package
8025 (name "python-zope-event")
8026 (version "4.1.0")
8027 (source
8028 (origin
8029 (method url-fetch)
8030 (uri (string-append "https://pypi.python.org/packages/source/z"
8031 "/zope.event/zope.event-" version ".tar.gz"))
8032 (sha256
8033 (base32
8034 "11p75zpfz3ffhz21nzx9wb23xs993ck5s6hkjcvhswwizni5jynw"))))
8035 (build-system python-build-system)
8036 (home-page "http://pypi.python.org/pypi/zope.event")
8037 (synopsis "Event publishing system for Python")
8038 (description "Zope.event provides an event publishing API, intended for
8039 use by applications which are unaware of any subscribers to their events. It
8040 is a simple event-dispatching system on which more sophisticated event
8041 dispatching systems can be built.")
8042 (license license:zpl2.1)))
8043
8044 (define-public python2-zope-event
8045 (package-with-python2 python-zope-event))
8046
8047 (define-public python-zope-interface
8048 (package
8049 (name "python-zope-interface")
8050 (version "4.1.3")
8051 (source
8052 (origin
8053 (method url-fetch)
8054 (uri (string-append "https://pypi.python.org/packages/source/z"
8055 "/zope.interface/zope.interface-" version ".tar.gz"))
8056 (sha256
8057 (base32
8058 "0ks8h73b2g4bkad821qbv0wzjppdrwys33i7ka45ik3wxjg1l8if"))))
8059 (build-system python-build-system)
8060 (native-inputs
8061 `(("python-zope-event" ,python-zope-event)))
8062 (home-page "https://github.com/zopefoundation/zope.interface")
8063 (synopsis "Python implementation of the \"design by contract\"
8064 methodology")
8065 (description "Zope.interface provides an implementation of \"object
8066 interfaces\" for Python. Interfaces are a mechanism for labeling objects as
8067 conforming to a given API or contract.")
8068 (license license:zpl2.1)))
8069
8070 (define-public python2-zope-interface
8071 (package-with-python2 python-zope-interface))
8072
8073 (define-public python-zope-exceptions
8074 (package
8075 (name "python-zope-exceptions")
8076 (version "4.0.8")
8077 (source
8078 (origin
8079 (method url-fetch)
8080 (uri (string-append "https://pypi.python.org/packages/source/z"
8081 "/zope.exceptions/zope.exceptions-"
8082 version ".tar.gz"))
8083 (sha256
8084 (base32
8085 "0zwxaaa66sqxg5k7zcrvs0fbg9ym1njnxnr28dfmchzhwjvwnfzl"))))
8086 (build-system python-build-system)
8087 (arguments
8088 '(#:tests? #f)) ; circular dependency with zope.testrunner
8089 (propagated-inputs
8090 `(("python-zope-interface" ,python-zope-interface)))
8091 (home-page "http://cheeseshop.python.org/pypi/zope.exceptions")
8092 (synopsis "Zope exceptions")
8093 (description "Zope.exceptions provides general-purpose exception types
8094 that have uses outside of the Zope framework.")
8095 (license license:zpl2.1)))
8096
8097 (define-public python2-zope-exceptions
8098 (package-with-python2 python-zope-exceptions))
8099
8100 (define-public python-zope-testing
8101 (package
8102 (name "python-zope-testing")
8103 (version "4.5.0")
8104 (source
8105 (origin
8106 (method url-fetch)
8107 (uri (string-append "https://pypi.python.org/packages/source/z"
8108 "/zope.testing/zope.testing-" version ".tar.gz"))
8109 (sha256
8110 (base32
8111 "1yvglxhzvhl45mndvn9gskx2ph30zz1bz7rrlyfs62fv2pvih90s"))
8112 (modules '((guix build utils)))
8113 (snippet
8114 '(begin
8115 ;; Remove pre-compiled .pyc files backup files from source.
8116 (for-each delete-file (find-files "." "(\\.pyc|~)$"))
8117 #t))))
8118 (build-system python-build-system)
8119 (native-inputs
8120 `(("python-zope-exceptions" ,python-zope-exceptions)))
8121 (propagated-inputs
8122 `(("python-zope-interface" ,python-zope-interface)))
8123 (home-page "http://pypi.python.org/pypi/zope.testing")
8124 (synopsis "Zope testing helpers")
8125 (description "Zope.testing provides a number of testing utilities for HTML
8126 forms, HTTP servers, regular expressions, and more.")
8127 (license license:zpl2.1)))
8128
8129 (define-public python2-zope-testing
8130 (package-with-python2 python-zope-testing))
8131
8132 (define-public python-zope-testrunner
8133 (package
8134 (name "python-zope-testrunner")
8135 (version "4.4.9")
8136 (source
8137 (origin
8138 (method url-fetch)
8139 (uri (string-append "https://pypi.python.org/packages/source/z"
8140 "/zope.testrunner/zope.testrunner-"
8141 version ".zip"))
8142 (sha256
8143 (base32
8144 "1r7iqknhh55y45f64mz5hghgvzx34h1i11k350s0avx6q8gznja1"))))
8145 (build-system python-build-system)
8146 (arguments
8147 '(#:tests? #f)) ; FIXME: Tests can't find zope.interface.
8148 (native-inputs
8149 `(("python-six" ,python-six)
8150 ;("python-zope-interface" ,python-zope-interface)
8151 ("python-zope-exceptions" ,python-zope-exceptions)
8152 ("python-zope-testing" ,python-zope-testing)
8153 ("unzip" ,unzip)))
8154 (propagated-inputs
8155 `(("python-zope-interface" ,python-zope-interface)))
8156 (home-page "http://pypi.python.org/pypi/zope.testrunner")
8157 (synopsis "Zope testrunner script")
8158 (description "Zope.testrunner provides a script for running Python
8159 tests.")
8160 (license license:zpl2.1)))
8161
8162 (define-public python2-zope-testrunner
8163 (let ((base (package-with-python2 python-zope-testrunner)))
8164 (package
8165 (inherit base)
8166 (native-inputs
8167 (append (package-native-inputs base)
8168 `(("python2-subunit" ,python2-subunit)
8169 ("python2-mimeparse" ,python2-mimeparse)))))))
8170
8171 (define-public python-zope-i18nmessageid
8172 (package
8173 (name "python-zope-i18nmessageid")
8174 (version "4.0.3")
8175 (source
8176 (origin
8177 (method url-fetch)
8178 (uri (string-append
8179 "https://pypi.python.org/packages/source/z"
8180 "/zope.i18nmessageid/zope.i18nmessageid-"
8181 version ".tar.gz"))
8182 (sha256
8183 (base32
8184 "1rslyph0klk58dmjjy4j0jxy21k03azksixc3x2xhqbkv97cmzml"))))
8185 (build-system python-build-system)
8186 (home-page "http://pypi.python.org/pypi/zope.i18nmessageid")
8187 (synopsis "Message identifiers for internationalization")
8188 (description "Zope.i18nmessageid provides facilities for declaring
8189 internationalized messages within program source text.")
8190 (license license:zpl2.1)))
8191
8192 (define-public python2-zope-i18nmessageid
8193 (package-with-python2 python-zope-i18nmessageid))
8194
8195 (define-public python-zope-schema
8196 (package
8197 (name "python-zope-schema")
8198 (version "4.4.2")
8199 (source
8200 (origin
8201 (method url-fetch)
8202 (uri (string-append "https://pypi.python.org/packages/source/z"
8203 "/zope.schema/zope.schema-" version ".tar.gz"))
8204 (sha256
8205 (base32
8206 "1p943jdxb587dh7php4vx04qvn7b2877hr4qs5zyckvp5afhhank"))))
8207 (build-system python-build-system)
8208 (arguments
8209 '(#:tests? #f)) ; FIXME: Tests can't find zope.event.
8210 (propagated-inputs
8211 `(("python-zope-event" ,python-zope-event)
8212 ("python-zope-exceptions", python-zope-exceptions)
8213 ("python-zope-interface" ,python-zope-interface)))
8214 (native-inputs
8215 `(("python-zope-testing" ,python-zope-testing)
8216 ("python-coverage" ,python-coverage)
8217 ("python-nose" ,python-nose)))
8218 (home-page "http://pypi.python.org/pypi/zope.schema")
8219 (synopsis "Zope data schemas")
8220 (description "Zope.scheme provides extensions to zope.interface for
8221 defining data schemas.")
8222 (license license:zpl2.1)))
8223
8224 (define-public python2-zope-schema
8225 (package-with-python2 python-zope-schema))
8226
8227 (define-public python-zope-configuration
8228 (package
8229 (name "python-zope-configuration")
8230 (version "4.0.3")
8231 (source (origin
8232 (method url-fetch)
8233 (uri (string-append "https://pypi.python.org/packages/source/z"
8234 "/zope.configuration/zope.configuration-"
8235 version ".tar.gz"))
8236 (sha256
8237 (base32
8238 "1x9dfqypgympnlm25p9m43xh4qv3p7d75vksv9pzqibrb4cggw5n"))))
8239 (build-system python-build-system)
8240 (arguments
8241 '(#:tests? #f)) ; FIXME: Tests can't find zope.interface.
8242 (propagated-inputs
8243 `(("python-zope-i18nmessageid" ,python-zope-i18nmessageid)
8244 ("python-zope-schema" ,python-zope-schema)))
8245 (home-page "http://pypi.python.org/pypi/zope.configuration")
8246 (synopsis "Zope Configuration Markup Language")
8247 (description "Zope.configuration implements ZCML, the Zope Configuration
8248 Markup Language.")
8249 (license license:zpl2.1)))
8250
8251 (define-public python2-zope-configuration
8252 (package-with-python2 python-zope-configuration))
8253
8254 (define-public python-zope-proxy
8255 (package
8256 (name "python-zope-proxy")
8257 (version "4.1.6")
8258 (source
8259 (origin
8260 (method url-fetch)
8261 (uri (string-append "https://pypi.python.org/packages/source/z"
8262 "/zope.proxy/zope.proxy-" version ".tar.gz"))
8263 (sha256
8264 (base32
8265 "0pqwwmvm1prhwv1ziv9lp8iirz7xkwb6n2kyj36p2h0ppyyhjnm4"))))
8266 (build-system python-build-system)
8267 (arguments
8268 '(#:tests? #f)) ; FIXME: Tests can't find zope.interface.
8269 (propagated-inputs
8270 `(("python-zope-interface" ,python-zope-interface)))
8271 (home-page "http://pypi.python.org/pypi/zope.proxy")
8272 (synopsis "Generic, transparent proxies")
8273 (description "Zope.proxy provides generic, transparent proxies for Python.
8274 Proxies are special objects which serve as mostly-transparent wrappers around
8275 another object, intervening in the apparent behavior of the wrapped object
8276 only when necessary to apply the policy (e.g., access checking, location
8277 brokering, etc.) for which the proxy is responsible.")
8278 (license license:zpl2.1)))
8279
8280 (define-public python2-zope-proxy
8281 (package-with-python2 python-zope-proxy))
8282
8283 (define-public python-zope-location
8284 (package
8285 (name "python-zope-location")
8286 (version "4.0.3")
8287 (source
8288 (origin
8289 (method url-fetch)
8290 (uri (string-append "https://pypi.python.org/packages/source/z"
8291 "/zope.location/zope.location-" version ".tar.gz"))
8292 (sha256
8293 (base32
8294 "1nj9da4ksiyv3h8n2vpzwd0pb03mdsh7zy87hfpx72b6p2zcwg74"))))
8295 (build-system python-build-system)
8296 (arguments
8297 '(#:tests? #f)) ; FIXME: Tests can't find zope.interface.
8298 (propagated-inputs
8299 `(("python-zope-proxy" ,python-zope-proxy)
8300 ("python-zope-schema" ,python-zope-schema)))
8301 (home-page "http://pypi.python.org/pypi/zope.location/")
8302 (synopsis "Zope location library")
8303 (description "Zope.location implements the concept of \"locations\" in
8304 Zope3, which are are special objects that have a structural location.")
8305 (license license:zpl2.1)))
8306
8307 (define-public python2-zope-location
8308 (package-with-python2 python-zope-location))
8309
8310 (define-public python-zope-security
8311 (package
8312 (name "python-zope-security")
8313 (version "4.0.3")
8314 (source
8315 (origin
8316 (method url-fetch)
8317 (uri (string-append "https://pypi.python.org/packages/source/z"
8318 "/zope.security/zope.security-" version ".tar.gz"))
8319 (sha256
8320 (base32
8321 "14zmf684amc0x32kq05yxnhfqd1cmyhafkw05gn81rn90zjv6ssy"))))
8322 (build-system python-build-system)
8323 (arguments
8324 '(#:tests? #f)) ; FIXME: Tests can't find zope.testrunner.
8325 (propagated-inputs
8326 `(("python-zope-i18nmessageid" ,python-zope-i18nmessageid)
8327 ("python-zope-proxy" ,python-zope-proxy)
8328 ("python-zope-schema" ,python-zope-schema)))
8329 (native-inputs
8330 `(("python-six" ,python-six)
8331 ("python-zope-component" ,python-zope-component)
8332 ("python-zope-configuration" ,python-zope-configuration)
8333 ("python-zope-location" ,python-zope-location)
8334 ("python-zope-testrunner" ,python-zope-testrunner)
8335 ("python-zope-testing" ,python-zope-testing)))
8336 (home-page "http://pypi.python.org/pypi/zope.security")
8337 (synopsis "Zope security framework")
8338 (description "Zope.security provides a generic mechanism to implement
8339 security policies on Python objects.")
8340 (license license:zpl2.1)))
8341
8342 (define-public python2-zope-security
8343 (let ((zope-security (package-with-python2 python-zope-security)))
8344 (package (inherit zope-security)
8345 (propagated-inputs
8346 `(("python2-zope-testrunner" ,python2-zope-testrunner)
8347 ,@(alist-delete
8348 "python-zope-testrunner"
8349 (package-propagated-inputs zope-security)))))))
8350
8351 (define-public python-zope-component
8352 (package
8353 (name "python-zope-component")
8354 (version "4.3.0")
8355 (source
8356 (origin
8357 (method url-fetch)
8358 (uri (pypi-uri "zope.component" version))
8359 (sha256
8360 (base32
8361 "1hlvzwj1kcfz1qms1dzhwsshpsf38z9clmyksb1gh41n8k3kchdv"))))
8362 (build-system python-build-system)
8363 (arguments
8364 ;; Skip tests due to circular dependency with python-zope-security.
8365 '(#:tests? #f))
8366 (native-inputs
8367 `(("python-zope-testing" ,python-zope-testing)))
8368 (propagated-inputs
8369 `(("python-zope-event" ,python-zope-event)
8370 ("python-zope-interface" ,python-zope-interface)
8371 ("python-zope-i18nmessageid" ,python-zope-i18nmessageid)
8372 ("python-zope-configuration" ,python-zope-configuration)))
8373 (home-page "https://github.com/zopefoundation/zope.component")
8374 (synopsis "Zope Component Architecture")
8375 (description "Zope.component represents the core of the Zope Component
8376 Architecture. Together with the zope.interface package, it provides
8377 facilities for defining, registering and looking up components.")
8378 (license license:zpl2.1)))
8379
8380 (define-public python2-zope-component
8381 (package-with-python2 python-zope-component))
8382
8383 (define-public python-pythondialog
8384 (package
8385 (name "python-pythondialog")
8386 (version "3.4.0")
8387 (source
8388 (origin
8389 (method url-fetch)
8390 (uri (pypi-uri "pythondialog" version))
8391 (sha256
8392 (base32
8393 "1728ghsran47jczn9bhlnkvk5bvqmmbihabgif5h705b84r1272c"))))
8394 (build-system python-build-system)
8395 (arguments
8396 `(#:phases
8397 (modify-phases %standard-phases
8398 (add-after 'unpack 'patch-path
8399 (lambda* (#:key inputs #:allow-other-keys)
8400 (let* ((dialog (assoc-ref inputs "dialog")))
8401 ;; Since this library really wants to grovel the search path, we
8402 ;; must hardcode dialog's store path into it.
8403 (substitute* "dialog.py"
8404 (("os.getenv\\(\"PATH\", \":/bin:/usr/bin\"\\)")
8405 (string-append "os.getenv(\"PATH\") + \":" dialog "/bin\"")))
8406 #t))))
8407 #:tests? #f)) ; no test suite
8408 (propagated-inputs
8409 `(("dialog" ,dialog)))
8410 (home-page "http://pythondialog.sourceforge.net/")
8411 (synopsis "Python interface to the UNIX dialog utility")
8412 (description "A Python wrapper for the dialog utility. Its purpose is to
8413 provide an easy to use, pythonic and comprehensive Python interface to dialog.
8414 This allows one to make simple text-mode user interfaces on Unix-like systems")
8415 (license license:lgpl2.1)
8416 (properties `((python2-variant . ,(delay python2-pythondialog))))))
8417
8418 (define-public python2-pythondialog
8419 (let ((base (package-with-python2 (strip-python2-variant python-pythondialog))))
8420 (package
8421 (inherit base)
8422 (version (package-version python-pythondialog))
8423 (source (origin
8424 (method url-fetch)
8425 (uri (pypi-uri "python2-pythondialog" version))
8426 (sha256
8427 (base32
8428 "0d8k7lxk50imdyx85lv8j98i4c93a71iwpapnl1506rpkbm9qvd9")))))))
8429
8430 (define-public python-pyrfc3339
8431 (package
8432 (name "python-pyrfc3339")
8433 (version "1.0")
8434 (source
8435 (origin
8436 (method url-fetch)
8437 (uri (pypi-uri "pyRFC3339" version))
8438 (sha256
8439 (base32
8440 "0dgm4l9y8jiax5cp6yxjd2i27cq8h33sh81n1wfbmnmqb32cdywd"))))
8441 (build-system python-build-system)
8442 (propagated-inputs
8443 `(("python-pytz" ,python-pytz)))
8444 (native-inputs
8445 `(("python-nose" ,python-nose)))
8446 (home-page "https://github.com/kurtraschke/pyRFC3339")
8447 (synopsis "Python timestamp library")
8448 (description "Python library for generating and parsing RFC 3339-compliant
8449 timestamps.")
8450 (license license:expat)))
8451
8452 (define-public python2-pyrfc3339
8453 (package-with-python2 python-pyrfc3339))
8454
8455 (define-public python-werkzeug
8456 (package
8457 (name "python-werkzeug")
8458 (version "0.11.15")
8459 (source
8460 (origin
8461 (method url-fetch)
8462 (uri (pypi-uri "Werkzeug" version))
8463 (sha256
8464 (base32
8465 "1h5wycw8yj7q0grqsjnsqflmrlsdagvl2j4dsgdncci6mjc7fpa5"))))
8466 (build-system python-build-system)
8467 (native-inputs
8468 `(("python-pytest" ,python-pytest)))
8469 (home-page "http://werkzeug.pocoo.org/")
8470 (synopsis "Utilities for WSGI applications")
8471 (description "One of the most advanced WSGI utility modules. It includes a
8472 powerful debugger, full-featured request and response objects, HTTP utilities to
8473 handle entity tags, cache control headers, HTTP dates, cookie handling, file
8474 uploads, a powerful URL routing system and a bunch of community-contributed
8475 addon modules.")
8476 (license license:x11)))
8477
8478 (define-public python2-werkzeug
8479 (package-with-python2 python-werkzeug))
8480
8481 (define-public python-configobj
8482 (package
8483 (name "python-configobj")
8484 (version "5.0.6")
8485 (source (origin
8486 (method url-fetch)
8487 (uri (string-append
8488 "https://pypi.python.org/packages/source/c/configobj/"
8489 "configobj-" version ".tar.gz"))
8490 (sha256
8491 (base32
8492 "00h9rcmws03xvdlfni11yb60bz3kxfvsj6dg6nrpzj71f03nbxd2"))
8493 ;; Patch setup.py so it looks for python-setuptools, which is
8494 ;; required to parse the keyword 'install_requires' in setup.py.
8495 (patches (search-patches "python-configobj-setuptools.patch"))))
8496 (build-system python-build-system)
8497 (propagated-inputs
8498 `(("python-six" ,python-six)))
8499 (synopsis "Config file reading, writing and validation")
8500 (description "ConfigObj is a simple but powerful config file reader and
8501 writer: an ini file round tripper. Its main feature is that it is very easy to
8502 use, with a straightforward programmer’s interface and a simple syntax for
8503 config files.")
8504 (home-page "https://github.com/DiffSK/configobj")
8505 (license license:bsd-3)))
8506
8507 (define-public python2-configobj
8508 (package-with-python2 python-configobj))
8509
8510 (define-public python-configargparse
8511 (package
8512 (name "python-configargparse")
8513 (version "0.10.0")
8514 (source (origin
8515 (method url-fetch)
8516 (uri (string-append
8517 "https://pypi.python.org/packages/source/C/ConfigArgParse/"
8518 "ConfigArgParse-" version ".tar.gz"))
8519 (sha256
8520 (base32
8521 "19wh919gbdbzxzpagg52q3lm62yicm95ddlcx77dyjc1slyshl1v"))))
8522 (build-system python-build-system)
8523 (arguments
8524 ;; FIXME: Bug in test suite filed upstream:
8525 ;; https://github.com/bw2/ConfigArgParse/issues/32
8526 '(#:tests? #f))
8527 (synopsis "Replacement for argparse")
8528 (description "A drop-in replacement for argparse that allows options to also
8529 be set via config files and/or environment variables.")
8530 (home-page "https://github.com/bw2/ConfigArgParse")
8531 (license license:expat)))
8532
8533 (define-public python2-configargparse
8534 (package-with-python2 python-configargparse))
8535
8536 (define-public python-ndg-httpsclient
8537 (package
8538 (name "python-ndg-httpsclient")
8539 (version "0.4.2")
8540 (source (origin
8541 (method url-fetch)
8542 (uri (pypi-uri "ndg_httpsclient" version))
8543 (sha256
8544 (base32
8545 "1b5qirv46v4dpnmfqviwq42mdwfcby4dxmz0i41wad2337pqf2aq"))))
8546 (build-system python-build-system)
8547 (arguments
8548 '(;; The tests appear to require networking.
8549 #:tests? #f))
8550 (propagated-inputs
8551 `(("python-pyopenssl" ,python-pyopenssl)))
8552 (synopsis "HTTPS support for Python's httplib and urllib2")
8553 (description "This is a HTTPS client implementation for httplib and urllib2
8554 based on PyOpenSSL. PyOpenSSL provides a more fully featured SSL implementation
8555 over the default provided with Python and importantly enables full verification
8556 of the SSL peer.")
8557 (home-page "https://github.com/cedadev/ndg_httpsclient/")
8558 (license license:bsd-3)))
8559
8560 ;; python2-openssl requires special care, so package-with-python2 is
8561 ;; insufficient.
8562 (define-public python2-ndg-httpsclient
8563 (package (inherit python-ndg-httpsclient)
8564 (name "python2-ndg-httpsclient")
8565 (arguments `(#:python ,python-2))
8566 (propagated-inputs
8567 `(("python2-pyopenssl" ,python2-pyopenssl)))))
8568
8569 (define-public python-contextlib2
8570 (package
8571 (name "python-contextlib2")
8572 (version "0.4.0")
8573 (source
8574 (origin
8575 (method url-fetch)
8576 (uri (pypi-uri "contextlib2" version))
8577 (sha256
8578 (base32
8579 "0cmp131dlh0d0zvw0aza1zd13glvngzk8lb4avks0hm7yxwdr9am"))))
8580 (build-system python-build-system)
8581 (arguments
8582 `(#:phases
8583 (modify-phases %standard-phases
8584 (replace 'check
8585 (lambda _ (zero?
8586 (system*
8587 "python" "test_contextlib2.py" "-v")))))))
8588 (home-page "http://contextlib2.readthedocs.org/")
8589 (synopsis "Tools for decorators and context managers")
8590 (description "This module is primarily a backport of the Python
8591 3.2 contextlib to earlier Python versions. Like contextlib, it
8592 provides utilities for common tasks involving decorators and context
8593 managers. It also contains additional features that are not part of
8594 the standard library.")
8595 (license license:psfl)))
8596
8597 (define-public python2-contextlib2
8598 (package-with-python2 python-contextlib2))
8599
8600 (define-public python-texttable
8601 (package
8602 (name "python-texttable")
8603 (version "0.8.7")
8604 (source
8605 (origin
8606 (method url-fetch)
8607 (uri (pypi-uri "texttable" version))
8608 (sha256
8609 (base32
8610 "1liiiydgkg37i46a418aw19fyf6z3ds51wdwwpyjbs12x0phhf4a"))))
8611 (build-system python-build-system)
8612 (arguments '(#:tests? #f)) ; no tests
8613 (home-page "https://github.com/foutaise/texttable/")
8614 (synopsis "Python module for creating simple ASCII tables")
8615 (description "Texttable is a Python module for creating simple ASCII
8616 tables.")
8617 (license license:lgpl2.1+)))
8618
8619 (define-public python2-texttable
8620 (package-with-python2 python-texttable))
8621
8622 (define-public python-websocket-client
8623 (package
8624 (name "python-websocket-client")
8625 (version "0.37.0")
8626 (source
8627 (origin
8628 (method url-fetch)
8629 (uri (pypi-uri "websocket_client" version))
8630 (sha256
8631 (base32
8632 "0h9glp1jll3z76ly3kg08aqgxqk0a68p4zi9yn50353bh5nj92v7"))))
8633 (build-system python-build-system)
8634 (propagated-inputs
8635 `(("python-six" ,python-six)))
8636 (home-page "https://github.com/liris/websocket-client")
8637 (synopsis "WebSocket client for Python")
8638 (description "The Websocket-client module provides the low level APIs for
8639 WebSocket usage in Python programs.")
8640 (license license:lgpl2.1+)))
8641
8642 (define-public python2-websocket-client
8643 (package-with-python2 python-websocket-client))
8644
8645 (define-public python-atomicwrites
8646 (package
8647 (name "python-atomicwrites")
8648 (version "1.1.5")
8649 (source (origin
8650 (method url-fetch)
8651 (uri (pypi-uri "atomicwrites" version))
8652 (sha256
8653 (base32
8654 "11bm90fwm2avvf4f3ib8g925w7jr4m11vcsinn1bi6ns4bm32214"))))
8655 (build-system python-build-system)
8656 (synopsis "Atomic file writes in Python")
8657 (description "Library for atomic file writes using platform dependent tools
8658 for atomic file system operations.")
8659 (home-page "https://github.com/untitaker/python-atomicwrites")
8660 (license license:expat)))
8661
8662 (define-public python2-atomicwrites
8663 (package-with-python2 python-atomicwrites))
8664
8665 (define-public python-requests-toolbelt
8666 (package
8667 (name "python-requests-toolbelt")
8668 (version "0.6.2")
8669 (source (origin
8670 (method url-fetch)
8671 (uri (string-append
8672 "https://pypi.python.org/packages/"
8673 "e1/a4/a94c037bc72ad70441aff1403d3243510d2542ddca7759faaeffeb11aefe/"
8674 "requests-toolbelt-" version ".tar.gz"))
8675 (sha256
8676 (base32
8677 "15q9nrgp85nqlr4kdz1zvj8z2npafi2sr12y7fqgxbkq28j1aci6"))))
8678 (build-system python-build-system)
8679 (native-inputs
8680 `(("python-betamax" ,python-betamax)
8681 ("python-mock" ,python-mock)
8682 ("python-pytest" ,python-pytest)))
8683 (propagated-inputs
8684 `(("python-requests" ,python-requests)))
8685 (synopsis "Extensions to python-requests")
8686 (description "This is a toolbelt of useful classes and functions to be used
8687 with python-requests.")
8688 (home-page "https://github.com/sigmavirus24/requests-toolbelt")
8689 (license license:asl2.0)))
8690
8691 (define-public python-click-threading
8692 (package
8693 (name "python-click-threading")
8694 (version "0.2.0")
8695 (source (origin
8696 (method url-fetch)
8697 (uri (string-append
8698 "https://pypi.python.org/packages/"
8699 "fe/b7/e7f609d18a2a351cb71616adcf54df1acd82f83cb9b5936935a4d20e2c23/"
8700 "click-threading-" version ".tar.gz"))
8701 (sha256
8702 (base32
8703 "18bcqikxwb3drb8rf60cclxkxw52521b38ax3byah6j8cn8y9p4j"))))
8704 (build-system python-build-system)
8705 (propagated-inputs
8706 `(("python-click" ,python-click)))
8707 (synopsis "Utilities for multithreading in Click")
8708 (description "This package provides utilities for multithreading in Click
8709 applications.")
8710 (home-page "https://github.com/click-contrib/click-threading")
8711 (license license:expat)))
8712
8713 (define-public python-click-log
8714 (package
8715 (name "python-click-log")
8716 (version "0.1.8")
8717 (source (origin
8718 (method url-fetch)
8719 (uri (pypi-uri "click-log" version))
8720 (sha256
8721 (base32
8722 "14ikfjfgnzf21mjniq9lfk2igzykgzfvwwrk85nw2b9fq44109sp"))))
8723 (build-system python-build-system)
8724 (propagated-inputs
8725 `(("python-click" ,python-click)))
8726 (synopsis "Logging for click applications")
8727 (description "This package provides a Python library for logging Click
8728 applications.")
8729 (home-page "https://github.com/click-contrib/click-log")
8730 (license license:expat)))
8731
8732 (define-public python-apipkg
8733 (package
8734 (name "python-apipkg")
8735 (version "1.4")
8736 (source (origin
8737 (method url-fetch)
8738 (uri (pypi-uri "apipkg" version))
8739 (sha256
8740 (base32
8741 "1iks5701qnp3dlr3q1d9qm68y2plp2m029irhpz92a44psfkjf1f"))))
8742 (build-system python-build-system)
8743 (native-inputs
8744 `(("python-pytest" ,python-pytest)))
8745 (synopsis "Namespace control and lazy-import mechanism")
8746 (description "With apipkg you can control the exported namespace of a Python
8747 package and greatly reduce the number of imports for your users. It is a small
8748 pure Python module that works on virtually all Python versions.")
8749 (home-page "https://bitbucket.org/hpk42/apipkg")
8750 (license license:expat)))
8751
8752 (define-public python2-apipkg
8753 (package-with-python2 python-apipkg))
8754
8755 (define-public python-execnet
8756 (package
8757 (name "python-execnet")
8758 (version "1.4.1")
8759 (source (origin
8760 (method url-fetch)
8761 (uri (pypi-uri "execnet" version))
8762 (sha256
8763 (base32
8764 "1rpk1vyclhg911p3hql0m0nrpq7q7mysxnaaw6vs29cpa6kx8vgn"))))
8765 (build-system python-build-system)
8766 (arguments
8767 `(;; 2 failed, 275 passed, 670 skipped, 4 xfailed
8768 ;; The two test failures are caused by the lack of an `ssh` executable.
8769 ;; The test suite can be run with pytest after the 'install' phase.
8770 #:tests? #f))
8771 (native-inputs
8772 `(("python-pytest" ,python-pytest)
8773 ("python-setuptools-scm" ,python-setuptools-scm)))
8774 (propagated-inputs
8775 `(("python-apipkg" ,python-apipkg)))
8776 (synopsis "Rapid multi-Python deployment")
8777 (description "Execnet provides a share-nothing model with
8778 channel-send/receive communication for distributing execution across many
8779 Python interpreters across version, platform and network barriers. It has a
8780 minimal and fast API targeting the following uses:
8781 @enumerate
8782 @item distribute tasks to (many) local or remote CPUs
8783 @item write and deploy hybrid multi-process applications
8784 @item write scripts to administer multiple environments
8785 @end enumerate")
8786 (home-page "http://codespeak.net/execnet/")
8787 (license license:expat)))
8788
8789 (define-public python2-execnet
8790 (package-with-python2 python-execnet))
8791
8792 (define-public python-trollius-redis
8793 (package
8794 (name "python-trollius-redis")
8795 (version "0.1.4")
8796 (source
8797 (origin
8798 (method url-fetch)
8799 (uri (pypi-uri "trollius_redis" version))
8800 (sha256
8801 (base32
8802 "0k3vypszmgmaipgw9xscvgm79h2zd6p6ci8gdp5sxl6g5kbqr9fy"))))
8803 (build-system python-build-system)
8804 ;; TODO: Tests require packaging 'hiredis'.
8805 (arguments '(#:tests? #f))
8806 (home-page "https://github.com/benjolitz/trollius-redis")
8807 (synopsis "Port of asyncio-redis to trollius")
8808 (description "@code{trollius-redis} is a Redis client for Python
8809 trollius. It is an asynchronious IO (PEP 3156) implementation of the
8810 Redis protocol.")
8811 (license license:bsd-2)))
8812
8813 (define-public python2-trollius-redis
8814 (package-with-python2 python-trollius-redis))
8815
8816 ;;; The software provided by this package was integrated into pytest 2.8.
8817 (define-public python-pytest-cache
8818 (package
8819 (name "python-pytest-cache")
8820 (version "1.0")
8821 (source (origin
8822 (method url-fetch)
8823 (uri (pypi-uri "pytest-cache" version))
8824 (sha256
8825 (base32
8826 "1a873fihw4rhshc722j4h6j7g3nj7xpgsna9hhg3zn6ksknnhx5y"))))
8827 (build-system python-build-system)
8828 (propagated-inputs
8829 `(("python-apipkg" ,python-apipkg)
8830 ("python-execnet" ,python-execnet)
8831 ("python-py" ,python-py)
8832 ("python-pytest" ,python-pytest)))
8833 (synopsis "Py.test plugin with mechanisms for caching across test runs")
8834 (description "The pytest-cache plugin provides tools to rerun failures from
8835 the last py.test invocation.")
8836 (home-page "https://bitbucket.org/hpk42/pytest-cache/")
8837 (license license:expat)))
8838
8839 (define-public python2-pytest-cache
8840 (package-with-python2 python-pytest-cache))
8841
8842 (define-public python-pytest-localserver
8843 (package
8844 (name "python-pytest-localserver")
8845 (version "0.3.5")
8846 (source (origin
8847 (method url-fetch)
8848 (uri (pypi-uri "pytest-localserver" version))
8849 (sha256
8850 (base32
8851 "0dvqspjr6va55zwmnnc2mmpqc7mm65kxig9ya44x1z8aadzxpa4p"))))
8852 (build-system python-build-system)
8853 (arguments
8854 `(#:phases (modify-phases %standard-phases
8855 (replace 'check
8856 (lambda _
8857 (zero? (system* "py.test" "--genscript=runtests.py"))
8858 (zero? (system* "py.test")))))))
8859 (native-inputs
8860 `(("python-pytest" ,python-pytest)
8861 ("python-requests" ,python-requests)
8862 ("python-six" ,python-six)))
8863 (propagated-inputs
8864 `(("python-werkzeug" ,python-werkzeug)))
8865 (synopsis "Py.test plugin to test server connections locally")
8866 (description "Pytest-localserver is a plugin for the pytest testing
8867 framework which enables you to test server connections locally.")
8868 (home-page "https://pypi.python.org/pypi/pytest-localserver")
8869 (license license:expat)))
8870
8871 (define-public python-wsgi-intercept
8872 (package
8873 (name "python-wsgi-intercept")
8874 (version "1.2.2")
8875 (source (origin
8876 (method url-fetch)
8877 (uri (string-append
8878 "https://pypi.python.org/packages/"
8879 "38/76/ebcbc24d0cb77db34520a3ca6ed1bd43ace17d182bbd8dd7d976f1c176fb/"
8880 "wsgi_intercept-" version ".tar.gz"))
8881 (sha256
8882 (base32
8883 "0kjj2v2dvmnpdd5h5gk9rzz0f54rhjb0yiz3zg65bmp65slfw65d"))))
8884 (build-system python-build-system)
8885 (propagated-inputs
8886 `(("python-six" ,python-six)))
8887 (native-inputs
8888 `(("python-pytest" ,python-pytest)
8889 ("python-httplib2" ,python-httplib2)
8890 ("python-requests" ,python-requests)
8891 ("python-urllib3" ,python-urllib3)))
8892 (synopsis "Puts a WSGI application in place of a real URI for testing")
8893 (description "Wsgi_intercept installs a WSGI application in place of a real
8894 URI for testing. Testing a WSGI application normally involves starting a
8895 server at a local host and port, then pointing your test code to that address.
8896 Instead, this library lets you intercept calls to any specific host/port
8897 combination and redirect them into a WSGI application importable by your test
8898 program. Thus, you can avoid spawning multiple processes or threads to test
8899 your Web app.")
8900 (home-page "https://github.com/cdent/wsgi-intercept")
8901 (license license:expat)))
8902
8903 (define-public python-pytest-xprocess
8904 (package
8905 (name "python-pytest-xprocess")
8906 (version "0.9.1")
8907 (source (origin
8908 (method url-fetch)
8909 (uri (pypi-uri "pytest-xprocess" version))
8910 (sha256
8911 (base32
8912 "17zlql1xqw3ywcgwwbqmw633aly99lab12hm02asr8awvg5603pp"))))
8913 (build-system python-build-system)
8914 (propagated-inputs
8915 `(("python-pytest" ,python-pytest)
8916 ("python-pytest-cache" ,python-pytest-cache)
8917 ("python-psutil" ,python-psutil)))
8918 (synopsis "Pytest plugin to manage external processes across test runs")
8919 (description "Pytest-xprocess is an experimental py.test plugin for managing
8920 processes across test runs.")
8921 (home-page "https://bitbucket.org/pytest-dev/pytest-xprocess")
8922 (license license:expat)))
8923
8924 (define-public python-icalendar
8925 (package
8926 (name "python-icalendar")
8927 (version "3.11.4")
8928 (source (origin
8929 (method url-fetch)
8930 (uri (pypi-uri "icalendar" version))
8931 (sha256
8932 (base32
8933 "0ix3xxykz8hs8mx4f2063djawmd888y3vsl75fbvbfqvg67v35jn"))))
8934 (build-system python-build-system)
8935 (propagated-inputs
8936 `(("python-dateutil" ,python-dateutil)
8937 ("python-pytz" ,python-pytz)))
8938 (synopsis "Python library for parsing iCalendar files")
8939 (description "The icalendar package is a parser/generator of iCalendar
8940 files for use with Python.")
8941 (home-page "https://github.com/collective/icalendar")
8942 (license license:bsd-2)))
8943
8944 (define-public python-sphinxcontrib-newsfeed
8945 (package
8946 (name "python-sphinxcontrib-newsfeed")
8947 (version "0.1.4")
8948 (source (origin
8949 (method url-fetch)
8950 (uri (pypi-uri "sphinxcontrib-newsfeed" version))
8951 (sha256
8952 (base32
8953 "1d7gam3mn8v4in4p16yn3v10vps7nnaz6ilw99j4klij39dqd37p"))))
8954 (arguments '(#:tests? #f)) ; No tests.
8955 (build-system python-build-system)
8956 (propagated-inputs
8957 `(("python-sphinx" ,python-sphinx)))
8958 (synopsis "News Feed extension for Sphinx")
8959 (description "Sphinxcontrib-newsfeed is an extension for adding a simple
8960 Blog, News or Announcements section to a Sphinx website.")
8961 (home-page "https://bitbucket.org/prometheus/sphinxcontrib-newsfeed")
8962 (license license:bsd-2)))
8963
8964 (define-public python-args
8965 (package
8966 (name "python-args")
8967 (version "0.1.0")
8968 (source (origin
8969 (method url-fetch)
8970 (uri (pypi-uri "args" version))
8971 (sha256
8972 (base32
8973 "057qzi46h5dmxdqknsbrssn78lmqjlnm624iqdhrnpk26zcbi1d7"))))
8974 (build-system python-build-system)
8975 (home-page "https://github.com/kennethreitz/args")
8976 (synopsis "Command-line argument parser")
8977 (description
8978 "This library provides a Python module to parse command-line arguments.")
8979 (license license:bsd-3)))
8980
8981 (define-public python2-args
8982 (package-with-python2 python-args))
8983
8984 (define-public python-clint
8985 (package
8986 (name "python-clint")
8987 (version "0.5.1")
8988 (source (origin
8989 (method url-fetch)
8990 (uri (pypi-uri "clint" version))
8991 (sha256
8992 (base32
8993 "1an5lkkqk1zha47198p42ji3m94xmzx1a03dn7866m87n4r4q8h5"))))
8994 (build-system python-build-system)
8995 (arguments
8996 '(#:phases
8997 (modify-phases %standard-phases
8998 (replace 'check
8999 (lambda _
9000 (zero? (system* "py.test" "-v")))))))
9001 (native-inputs
9002 `(("python-pytest" ,python-pytest)))
9003 (propagated-inputs
9004 `(("python-args" ,python-args)))
9005 (home-page "https://github.com/kennethreitz/clint")
9006 (synopsis "Command-line interface tools")
9007 (description
9008 "Clint is a Python module filled with a set of tools for developing
9009 command-line applications, including tools for colored and indented
9010 output, progress bar display, and pipes.")
9011 (license license:isc)))
9012
9013 (define-public python2-clint
9014 (package-with-python2 python-clint))
9015
9016 (define-public python-astor
9017 (package
9018 (name "python-astor")
9019 (version "0.5")
9020 (source (origin
9021 (method url-fetch)
9022 (uri (pypi-uri "astor" version))
9023 (sha256
9024 (base32
9025 "1fdafq5hkis1fxqlmhw0sn44zp2ar46nxhbc22cvwg7hsd8z5gsa"))))
9026 (build-system python-build-system)
9027 (home-page "https://github.com/berkerpeksag/astor")
9028 (synopsis "Read and write Python ASTs")
9029 (description
9030 "Astor is designed to allow easy manipulation of Python source via the
9031 Abstract Syntax Tree.")
9032 (license license:bsd-3)))
9033
9034 (define-public python2-astor
9035 (package-with-python2 python-astor))
9036
9037 (define-public python-rply
9038 (package
9039 (name "python-rply")
9040 (version "0.7.4")
9041 (source (origin
9042 (method url-fetch)
9043 (uri (pypi-uri "rply" version))
9044 (sha256
9045 (base32
9046 "12rp1d9ba7nvd5rhaxi6xzx1rm67r1k1ylsrkzhpwnphqpb06cvj"))))
9047 (build-system python-build-system)
9048 (propagated-inputs
9049 `(("python-appdirs" ,python-appdirs)))
9050 (home-page "https://github.com/alex/rply")
9051 (synopsis "Parser generator for Python")
9052 (description
9053 "This package provides a pure Python based parser generator, that also
9054 works with RPython. It is a more-or-less direct port of David Bazzley's PLY,
9055 with a new public API, and RPython support.")
9056 (license license:bsd-3)))
9057
9058 (define-public python2-rply
9059 (package-with-python2 python-rply))
9060
9061 (define-public python-hy
9062 (package
9063 (name "python-hy")
9064 (version "0.11.1")
9065 (source (origin
9066 (method url-fetch)
9067 (uri (pypi-uri "hy" version))
9068 (sha256
9069 (base32
9070 "1msqv747iz12r73mz4qvsmlwkddwjvrahlrk7ysrcz07h7dsscxs"))))
9071 (build-system python-build-system)
9072 (arguments
9073 '(#:phases
9074 (modify-phases %standard-phases
9075 (replace 'check
9076 (lambda _
9077 ;; Tests require write access to HOME.
9078 (setenv "HOME" "/tmp")
9079 (zero? (system* "nosetests")))))))
9080 (native-inputs
9081 `(("python-coverage" ,python-coverage)
9082 ("python-nose" ,python-nose)))
9083 (propagated-inputs
9084 `(("python-astor" ,python-astor)
9085 ("python-clint" ,python-clint)
9086 ("python-rply" ,python-rply)))
9087 (home-page "http://hylang.org/")
9088 (synopsis "Lisp frontend to Python")
9089 (description
9090 "Hy is a dialect of Lisp that's embedded in Python. Since Hy transforms
9091 its Lisp code into the Python Abstract Syntax Tree, you have the whole world of
9092 Python at your fingertips, in Lisp form.")
9093 (license license:expat)))
9094
9095 (define-public python2-hy
9096 (package-with-python2 python-hy))
9097
9098 (define-public python-rauth
9099 (package
9100 (name "python-rauth")
9101 (version "0.7.3")
9102 (source
9103 (origin
9104 (method url-fetch)
9105 (uri (pypi-uri "rauth" version))
9106 (sha256
9107 (base32
9108 "02kv8w8l98ky223avyq7vw7x1f2ya9chrm59r77ylq45qb0xnk2j"))))
9109 (build-system python-build-system)
9110 (arguments
9111 `(#:test-target "check"))
9112 (propagated-inputs
9113 `(("python-requests" ,python-requests)))
9114 (home-page "https://github.com/litl/rauth")
9115 (synopsis "Python library for OAuth 1.0/a, 2.0, and Ofly")
9116 (description
9117 "Rauth is a Python library for OAuth 1.0/a, 2.0, and Ofly. It also
9118 provides service wrappers for convenient connection initialization and
9119 authenticated session objects providing things like keep-alive.")
9120 (license license:expat)
9121 (properties `((python2-variant . ,(delay python2-rauth))))))
9122
9123 (define-public python2-rauth
9124 (let ((base (package-with-python2 (strip-python2-variant python-rauth))))
9125 (package
9126 (inherit base)
9127 (native-inputs `(("python2-unittest2" ,python2-unittest2)
9128 ,@(package-native-inputs base))))))
9129
9130 (define-public python2-functools32
9131 (package
9132 (name "python2-functools32")
9133 (version "3.2.3-2")
9134 (source
9135 (origin
9136 (method url-fetch)
9137 (uri (pypi-uri "functools32" version))
9138 (sha256
9139 (base32
9140 "0v8ya0b58x47wp216n1zamimv4iw57cxz3xxhzix52jkw3xks9gn"))))
9141 (build-system python-build-system)
9142 (arguments
9143 `(#:python ,python-2
9144 #:tests? #f)) ; no test target
9145 (home-page "https://github.com/MiCHiLU/python-functools32")
9146 (synopsis
9147 "Backport of the functools module from Python 3.2.3")
9148 (description
9149 "This package is a backport of the @code{functools} module from Python
9150 3.2.3 for use with older versions of Python and PyPy.")
9151 (license license:expat)))
9152
9153 (define-public python2-subprocess32
9154 (package
9155 (name "python2-subprocess32")
9156 (version "3.2.7")
9157 (source (origin
9158 (method url-fetch)
9159 (uri (pypi-uri "subprocess32" version))
9160 (sha256
9161 (base32
9162 "14350dhhlhyz5gqzi3lihn9m6lvskx5mcb20srx1kgsk9i50li8y"))
9163 (patches
9164 (search-patches "python2-subprocess32-disable-input-test.patch"))))
9165 (build-system python-build-system)
9166 (arguments
9167 `(#:python ,python-2
9168 #:phases
9169 (modify-phases %standard-phases
9170 (add-after 'unpack 'patch-/bin/sh
9171 (lambda _
9172 (substitute* '("subprocess32.py"
9173 "test_subprocess32.py")
9174 (("/bin/sh") (which "sh")))
9175 #t))
9176 (delete 'check)
9177 (add-after 'install 'check
9178 (lambda* (#:key inputs outputs #:allow-other-keys)
9179 ;; For some reason this package fails to import
9180 ;; _posixsubprocess.so when PYTHONPATH is set to the build
9181 ;; directory. Running tests after install is easier.
9182 (add-installed-pythonpath inputs outputs)
9183 (zero? (system* "python" "test_subprocess32.py")))))))
9184 (home-page "https://github.com/google/python-subprocess32")
9185 (synopsis "Backport of the subprocess module from Python 3.2")
9186 (description
9187 "This is a backport of the @code{subprocess} standard library module
9188 from Python 3.2 and 3.3 for use on Python 2. It includes bugfixes and some
9189 new features. On POSIX systems it is guaranteed to be reliable when used
9190 in threaded applications. It includes timeout support from Python 3.3 but
9191 otherwise matches 3.2’s API.")
9192 (license license:psfl)))
9193
9194 (define-public python2-futures
9195 (package
9196 (name "python2-futures")
9197 (version "3.0.5")
9198 (source
9199 (origin
9200 (method url-fetch)
9201 (uri (pypi-uri "futures" version))
9202 (sha256
9203 (base32
9204 "1pw1z4329xvlabdpwqa6b7v2fxf7hl64m4cgr22ckbym8m8m4hh5"))))
9205 (build-system python-build-system)
9206 (arguments `(#:python ,python-2))
9207 (home-page "https://github.com/agronholm/pythonfutures")
9208 (synopsis
9209 "Backport of the concurrent.futures package from Python 3.2")
9210 (description
9211 "The concurrent.futures module provides a high-level interface for
9212 asynchronously executing callables. This package backports the
9213 concurrent.futures package from Python 3.2")
9214 (license license:bsd-3)))
9215
9216 (define-public python-promise
9217 (package
9218 (name "python-promise")
9219 (version "0.4.2")
9220 (source
9221 (origin
9222 (method url-fetch)
9223 (uri (pypi-uri "promise" version))
9224 (sha256
9225 (base32
9226 "1k19ms8l3d5jzjh557rgkxb5sg4mqgfc315rn4hx1z3n8qq6lr3h"))))
9227 (build-system python-build-system)
9228 ;; Tests wants python-futures, which is a python2 only program, and
9229 ;; can't be found by python-promise at test time.
9230 (arguments `(#:tests? #f))
9231 (home-page "https://github.com/syrusakbary/promise")
9232 (synopsis "Promises/A+ implementation for Python")
9233 (description
9234 "Promises/A+ implementation for Python")
9235 (properties `((python2-variant . ,(delay python2-promise))))
9236 (license license:expat)))
9237
9238 (define-public python2-promise
9239 (let ((promise (package-with-python2
9240 (strip-python2-variant python-promise))))
9241 (package (inherit promise)
9242 (arguments (substitute-keyword-arguments (package-arguments promise)
9243 ((#:tests? _) #t)))
9244 (native-inputs
9245 `(("python2-futures" ,python2-futures)
9246 ("python2-pytest" ,python2-pytest)
9247 ,@(package-native-inputs promise))))))
9248
9249 (define-public python-urllib3
9250 (package
9251 (name "python-urllib3")
9252 (version "1.18.1")
9253 (source
9254 (origin
9255 (method url-fetch)
9256 (uri (pypi-uri "urllib3" version))
9257 (sha256
9258 (base32
9259 "1wb8aqnq53vzh2amrv8kc66f3h6fx217y0q62y6n30a64p2yqmam"))))
9260 (build-system python-build-system)
9261 (arguments `(#:tests? #f))
9262 (native-inputs
9263 `(;; some packages for tests
9264 ("python-nose" ,python-nose)
9265 ("python-mock" ,python-mock)
9266 ("python-tornado" ,python-tornado)))
9267 (propagated-inputs
9268 `(;; extra packages for https security
9269 ("python-certifi" ,python-certifi)
9270 ("python-ndg-httpsclient" ,python-ndg-httpsclient)
9271 ("python-pyasn1" ,python-pyasn1)
9272 ("python-pyopenssl" ,python-pyopenssl)))
9273 (home-page "https://urllib3.readthedocs.org/")
9274 (synopsis "HTTP library with thread-safe connection pooling")
9275 (description
9276 "Urllib3 supports features left out of urllib and urllib2 libraries. It
9277 can reuse the same socket connection for multiple requests, it can POST files,
9278 supports url redirection and retries, and also gzip and deflate decoding.")
9279 (license license:expat)))
9280
9281 (define-public python2-urllib3
9282 (package-with-python2 python-urllib3))
9283
9284 (define-public python-colorama
9285 (package
9286 (name "python-colorama")
9287 (version "0.3.7")
9288 (source
9289 (origin
9290 (method url-fetch)
9291 (uri (pypi-uri "colorama" version))
9292 (sha256
9293 (base32
9294 "0avqkn6362v7k2kg3afb35g4sfdvixjgy890clip4q174p9whhz0"))))
9295 (build-system python-build-system)
9296 (synopsis "Colored terminal text rendering for Python")
9297 (description "Colorama is a Python library for rendering colored terminal
9298 text.")
9299 (home-page "https://pypi.python.org/pypi/colorama")
9300 (license license:bsd-3)))
9301
9302 (define-public python2-colorama
9303 (package-with-python2 python-colorama))
9304
9305 (define-public python-rsa
9306 (package
9307 (name "python-rsa")
9308 (version "3.4.2")
9309 (source
9310 (origin
9311 (method url-fetch)
9312 (uri (pypi-uri "rsa" version))
9313 (sha256
9314 (base32
9315 "1dcxvszbikgzh99ybdc7jq0zb9wspy2ds8z9mjsqiyv3q884xpr5"))))
9316 (build-system python-build-system)
9317 (propagated-inputs
9318 `(("python-pyasn1" ,python-pyasn1)))
9319 (synopsis "Pure-Python RSA implementation")
9320 (description "Python-RSA is a pure-Python RSA implementation. It supports
9321 encryption and decryption, signing and verifying signatures, and key
9322 generation according to PKCS#1 version 1.5. It can be used as a Python
9323 library as well as on the command line.")
9324 (home-page "http://stuvel.eu/rsa")
9325 (license license:asl2.0)))
9326
9327 (define-public python2-rsa
9328 (package-with-python2 python-rsa))
9329
9330 (define-public python-pluggy
9331 (package
9332 (name "python-pluggy")
9333 (version "0.3.1")
9334 (source
9335 (origin
9336 (method url-fetch)
9337 (uri (pypi-uri "pluggy" version))
9338 (sha256
9339 (base32
9340 "18qfzfm40bgx672lkg8q9x5hdh76n7vax99aank7vh2nw21wg70m"))))
9341 (build-system python-build-system)
9342 (synopsis "Plugin and hook calling mechanism for Python")
9343 (description "Pluggy is an extraction of the plugin manager as used by
9344 Pytest but stripped of Pytest specific details.")
9345 (home-page "https://pypi.python.org/pypi/pluggy")
9346 (license license:expat)))
9347
9348 (define-public python2-pluggy
9349 (package-with-python2 python-pluggy))
9350
9351 (define-public python-tox
9352 (package
9353 (name "python-tox")
9354 (version "2.3.1")
9355 (source
9356 (origin
9357 (method url-fetch)
9358 (uri (pypi-uri "tox" version))
9359 (sha256
9360 (base32
9361 "1vj73ar4rimq3fwy5r2z3jv4g9qbh8rmpmncsc00g0k310acqzxz"))))
9362 (build-system python-build-system)
9363 (arguments
9364 ;; FIXME: Tests require pytest-timeout, which itself requires
9365 ;; pytest>=2.8.0 for installation.
9366 '(#:tests? #f))
9367 (propagated-inputs
9368 `(("python-pluggy" ,python-pluggy) ; >=0.3.0,<0.4.0
9369 ("python-py" ,python-py)
9370 ("python-virtualenv" ,python-virtualenv)))
9371 (native-inputs
9372 `(; FIXME: Missing: ("python-pytest-timeout" ,python-pytest-timeout)
9373 ("python-pytest" ,python-pytest))) ; >= 2.3.5
9374 (home-page "http://tox.testrun.org/")
9375 (synopsis "Virtualenv-based automation of test activities")
9376 (description "Tox is a generic virtualenv management and test command line
9377 tool. It can be used to check that a package installs correctly with
9378 different Python versions and interpreters, or run tests in each type of
9379 supported environment, or act as a frontend to continuous integration
9380 servers.")
9381 (license license:expat)))
9382
9383 (define-public python2-tox
9384 (package-with-python2 python-tox))
9385
9386 (define-public python-jmespath
9387 (package
9388 (name "python-jmespath")
9389 (version "0.9.0")
9390 (source
9391 (origin
9392 (method url-fetch)
9393 (uri (pypi-uri "jmespath" version))
9394 (sha256
9395 (base32
9396 "0g9xvl69y7nr3w7ag4fsp6sm4fqf6vrqjw7504x2hzrrsh3ampq8"))))
9397 (build-system python-build-system)
9398 (native-inputs
9399 `(("python-nose" ,python-nose)))
9400 (synopsis "JSON Matching Expressions")
9401 (description "JMESPath (pronounced “james path”) is a Python library that
9402 allows one to declaratively specify how to extract elements from a JSON
9403 document.")
9404 (home-page "https://github.com/jmespath/jmespath.py")
9405 (license license:expat)))
9406
9407 (define-public python2-jmespath
9408 (package-with-python2 python-jmespath))
9409
9410 (define-public python-botocore
9411 (package
9412 (name "python-botocore")
9413 (version "1.5.26")
9414 (source
9415 (origin
9416 (method url-fetch)
9417 (uri (pypi-uri "botocore" version))
9418 (sha256
9419 (base32
9420 "1b7l48hr88galrrc5q6k21z3sdadzxc87ppzs7k9fz4p1w8bfnvb"))))
9421 (build-system python-build-system)
9422 (arguments
9423 ;; FIXME: Many tests are failing.
9424 '(#:tests? #f))
9425 (propagated-inputs
9426 `(("python-dateutil" ,python-dateutil)
9427 ("python-docutils" ,python-docutils)
9428 ("python-jmespath" ,python-jmespath)))
9429 (native-inputs
9430 `(("python-mock" ,python-mock)
9431 ("python-nose" ,python-nose)
9432 ("behave" ,behave)
9433 ("python-tox" ,python-tox)
9434 ("python-wheel" ,python-wheel)))
9435 (home-page "https://github.com/boto/botocore")
9436 (synopsis "Low-level interface to AWS")
9437 (description "Botocore is a Python library that provides a low-level
9438 interface to the Amazon Web Services (AWS) API.")
9439 (license license:asl2.0)))
9440
9441 (define-public python2-botocore
9442 (package-with-python2 python-botocore))
9443
9444 (define-public awscli
9445 (package
9446 (name "awscli")
9447 (version "1.11.63")
9448 (source
9449 (origin
9450 (method url-fetch)
9451 (uri (pypi-uri name version))
9452 (sha256
9453 (base32
9454 "1r8aqv8w27k76lcsfk83w6qw9lz8gk2ibzwacp5wjhpp2gik911m"))))
9455 (build-system python-build-system)
9456 (propagated-inputs
9457 `(("python-colorama" ,python-colorama)
9458 ("python-botocore" ,python-botocore)
9459 ("python-s3transfer" ,python-s3transfer)
9460 ("python-docutils" ,python-docutils)
9461 ("python-pyyaml" ,python-pyyaml)
9462 ("python-rsa" ,python-rsa)))
9463 (arguments
9464 ;; FIXME: The 'pypi' release does not contain tests.
9465 '(#:tests? #f))
9466 (home-page "https://aws.amazon.com/cli/")
9467 (synopsis "Command line client for AWS")
9468 (description "AWS CLI provides a unified command line interface to the
9469 Amazon Web Services (AWS) API.")
9470 (license license:asl2.0)))
9471
9472 (define-public python-hypothesis
9473 (package
9474 (name "python-hypothesis")
9475 (version "3.1.0")
9476 (source (origin
9477 (method url-fetch)
9478 (uri (pypi-uri "hypothesis" version))
9479 (sha256
9480 (base32
9481 "0qyqq9akm4vshhn8cngjc1qykcvsn7cz6dlm6njfsgpbraqrmbbw"))))
9482 (build-system python-build-system)
9483 (native-inputs
9484 `(("python-flake8" ,python-flake8)
9485 ("python-pytest" ,python-pytest)))
9486 (synopsis "Library for property based testing")
9487 (description "Hypothesis is a library for testing your Python code against a
9488 much larger range of examples than you would ever want to write by hand. It’s
9489 based on the Haskell library, Quickcheck, and is designed to integrate
9490 seamlessly into your existing Python unit testing work flow.")
9491 (home-page "https://github.com/DRMacIver/hypothesis")
9492 (license license:mpl2.0)
9493 (properties `((python2-variant . ,(delay python2-hypothesis))))))
9494
9495 (define-public python2-hypothesis
9496 (let ((hypothesis (package-with-python2
9497 (strip-python2-variant python-hypothesis))))
9498 (package (inherit hypothesis)
9499 (native-inputs
9500 `(("python2-enum34" ,python2-enum34)
9501 ,@(package-native-inputs hypothesis))))))
9502
9503 (define-public python-pytest-subtesthack
9504 (package
9505 (name "python-pytest-subtesthack")
9506 (version "0.1.1")
9507 (source (origin
9508 (method url-fetch)
9509 (uri (pypi-uri "pytest-subtesthack" version))
9510 (sha256
9511 (base32
9512 "15kzcr5pchf3id4ikdvlv752rc0j4d912n589l4rifp8qsj19l1x"))))
9513 (build-system python-build-system)
9514 (propagated-inputs
9515 `(("python-pytest" ,python-pytest)))
9516 (synopsis "Set-up and tear-down fixtures for unit tests")
9517 (description "This plugin allows you to set up and tear down fixtures within
9518 unit test functions that use @code{py.test}. This is useful for using
9519 @command{hypothesis} inside py.test, as @command{hypothesis} will call the test
9520 function multiple times, without setting up or tearing down fixture state as is
9521 normally the case.")
9522 (home-page "https://github.com/untitaker/pytest-subtesthack/")
9523 (license license:unlicense)))
9524
9525 (define-public python2-pytest-subtesthack
9526 (package-with-python2 python-pytest-subtesthack))
9527
9528 (define-public python-xdo
9529 (package
9530 (name "python-xdo")
9531 (version "0.3")
9532 (source (origin
9533 (method url-fetch)
9534 (uri (string-append
9535 "http://http.debian.net/debian/pool/main/p/python-xdo/"
9536 "python-xdo_" version ".orig.tar.gz"))
9537 (sha256
9538 (base32
9539 "1vqh1n5yy5dhnq312kwrl90fnck4v26is3lq3lxdvcn60vv19da0"))))
9540 (build-system python-build-system)
9541 (arguments
9542 '(#:phases
9543 (modify-phases %standard-phases
9544 (add-before 'install 'patch-libxdo-path
9545 ;; Hardcode the path of dynamically loaded libxdo library.
9546 (lambda* (#:key inputs #:allow-other-keys)
9547 (let ((libxdo (string-append
9548 (assoc-ref inputs "xdotool")
9549 "/lib/libxdo.so")))
9550 (substitute* "xdo/_xdo.py"
9551 (("find_library\\(\"xdo\"\\)")
9552 (simple-format #f "\"~a\"" libxdo)))
9553 #t))))
9554 #:tests? #f)) ; no tests provided
9555 (propagated-inputs
9556 `(("python-six" ,python-six)))
9557 (inputs
9558 `(("xdotool" ,xdotool)
9559 ("libX11" ,libx11)))
9560 (home-page "https://tracker.debian.org/pkg/python-xdo")
9561 (synopsis "Python library for simulating X11 keyboard/mouse input")
9562 (description "Provides bindings to libxdo for manipulating X11 via simulated
9563 input. (Note that this is mostly a legacy library; you may wish to look at
9564 python-xdo for newer bindings.)")
9565 (license license:bsd-3)))
9566
9567 (define-public python2-xdo
9568 (package-with-python2 python-xdo))
9569
9570 (define-public python-wtforms
9571 (package
9572 (name "python-wtforms")
9573 (version "2.1")
9574 (source
9575 (origin
9576 (method url-fetch)
9577 (uri (pypi-uri "WTForms" version ".zip"))
9578 (sha256
9579 (base32
9580 "0vyl26y9cg409cfyj8rhqxazsdnd0jipgjw06civhrd53yyi1pzz"))))
9581 (build-system python-build-system)
9582 (arguments
9583 '(#:phases
9584 (modify-phases %standard-phases
9585 (add-after 'unpack 'remove-django-test
9586 ;; Don't fail the tests when the inputs for the optional tests cannot be found.
9587 (lambda _
9588 (substitute*
9589 "tests/runtests.py"
9590 (("'ext_django.tests', 'ext_sqlalchemy', 'ext_dateutil', 'locale_babel'") "")
9591 (("sys.stderr.write(\"### Disabled test '%s', dependency not found\n\" % name)") ""))
9592 #t)))))
9593 (native-inputs
9594 `(("unzip" ,unzip)))
9595 (home-page "http://wtforms.simplecodes.com/")
9596 (synopsis
9597 "Form validation and rendering library for Python web development")
9598 (description
9599 "WTForms is a flexible forms validation and rendering library
9600 for Python web development. It is very similar to the web form API
9601 available in Django, but is a standalone package.")
9602 (license license:bsd-3)))
9603
9604 (define-public python2-wtforms
9605 (package-with-python2 python-wtforms))
9606
9607 (define-public python-mako
9608 (package
9609 (name "python-mako")
9610 (version "1.0.6")
9611 (source
9612 (origin
9613 (method url-fetch)
9614 (uri (pypi-uri "Mako" version))
9615 (sha256
9616 (base32
9617 "03dyxgjknp4ffsv7vwfd28l5bbpzi0ylp20543wpg3iahyyrwma8"))))
9618 (build-system python-build-system)
9619 (propagated-inputs
9620 `(("python-markupsafe" ,python-markupsafe)))
9621 (native-inputs
9622 `(("python-mock" ,python-mock)
9623 ("python-nose" ,python-nose)
9624 ("python-pytest" ,python-pytest)))
9625 (home-page "http://www.makotemplates.org/")
9626 (synopsis "Templating language for Python")
9627 (description "Mako is a templating language for Python that compiles
9628 templates into Python modules.")
9629 (license license:expat)))
9630
9631 (define-public python2-mako
9632 (package-with-python2 python-mako))
9633
9634 (define-public python-waitress
9635 (package
9636 (name "python-waitress")
9637 (version "0.8.10")
9638 (source
9639 (origin
9640 (method url-fetch)
9641 (uri (pypi-uri "waitress" version))
9642 (sha256
9643 (base32
9644 "017n9ra6vvmq9d5sfhdzyzr1mg15x2hj2dhm4pdlw98c1ypw2h3w"))))
9645 (build-system python-build-system)
9646 (home-page "https://github.com/Pylons/waitress")
9647 (synopsis "Waitress WSGI server")
9648 (description "Waitress is meant to be a production-quality pure-Python WSGI
9649 server with very acceptable performance.")
9650 (license license:zpl2.1)))
9651
9652 (define-public python2-waitress
9653 (package-with-python2 python-waitress))
9654
9655 (define-public python-wsgiproxy2
9656 (package
9657 (name "python-wsgiproxy2")
9658 (version "0.4.2")
9659 (source
9660 (origin
9661 (method url-fetch)
9662 (uri (pypi-uri "WSGIProxy2" version ".zip"))
9663 (sha256
9664 (base32
9665 "13kf9bdxrc95y9vriaz0viry3ah11nz4rlrykcfvb8nlqpx3dcm4"))))
9666 (build-system python-build-system)
9667 (arguments
9668 '(;; Wsgiproxy2's test suite requires Restkit, which does not yet fully
9669 ;; support Python 3:
9670 ;; https://github.com/benoitc/restkit/issues/140
9671 #:tests? #f))
9672 (native-inputs
9673 `(("unzip" ,unzip)
9674 ("python-nose" ,python-nose)
9675 ("python-coverage" ,python-coverage)))
9676 (propagated-inputs
9677 `(("python-six" ,python-six)
9678 ("python-webob" ,python-webob)))
9679 (home-page
9680 "https://github.com/gawel/WSGIProxy2/")
9681 (synopsis "WSGI Proxy with various http client backends")
9682 (description "WSGI turns HTTP requests into WSGI function calls.
9683 WSGIProxy turns WSGI function calls into HTTP requests.
9684 It also includes code to sign requests and pass private data,
9685 and to spawn subprocesses to handle requests.")
9686 (license license:expat)))
9687
9688 (define-public python2-wsgiproxy2
9689 (package-with-python2 python-wsgiproxy2))
9690
9691 (define-public python-pastedeploy
9692 (package
9693 (name "python-pastedeploy")
9694 (version "1.5.2")
9695 (source
9696 (origin
9697 (method url-fetch)
9698 (uri (pypi-uri "PasteDeploy" version))
9699 (sha256
9700 (base32
9701 "1jz3m4hq8v6hyhfjz9425nd3nvn52cvbfipdcd72krjmla4qz1fm"))))
9702 (build-system python-build-system)
9703 (native-inputs
9704 `(("python-nose" ,python-nose)))
9705 (home-page "http://pythonpaste.org/deploy/")
9706 (synopsis
9707 "Load, configure, and compose WSGI applications and servers")
9708 (description
9709 "This tool provides code to load WSGI applications and servers from URIs;
9710 these URIs can refer to Python Eggs for INI-style configuration files. Paste
9711 Script provides commands to serve applications based on this configuration
9712 file.")
9713 (license license:expat)))
9714
9715 (define-public python2-pastedeploy
9716 (package-with-python2 python-pastedeploy))
9717
9718 (define-public python-paste
9719 (package
9720 (name "python-paste")
9721 (version "2.0.3")
9722 (source
9723 (origin
9724 (method url-fetch)
9725 (uri (pypi-uri "Paste" version))
9726 (sha256
9727 (base32
9728 "062jk0nlxf6lb2wwj6zc20rlvrwsnikpkh90y0dn8cjch93s6ii3"))
9729 (patches (search-patches "python-paste-remove-website-test.patch"
9730 "python-paste-remove-timing-test.patch"))))
9731 (build-system python-build-system)
9732 (native-inputs
9733 `(("python-nose" ,python-nose)))
9734 (propagated-inputs
9735 `(("python-six" ,python-six)))
9736 (home-page "http://pythonpaste.org")
9737 (synopsis
9738 "Python web development tools, focusing on WSGI")
9739 (description
9740 "Paste provides a variety of web development tools and middleware which
9741 can be nested together to build web applications. Paste's design closely
9742 follows ideas flowing from WSGI (Web Standard Gateway Interface).")
9743 (license license:expat)))
9744
9745 (define-public python2-paste
9746 (package-with-python2 python-paste))
9747
9748 (define-public python-pastescript
9749 (package
9750 (name "python-pastescript")
9751 (version "2.0.2")
9752 (source
9753 (origin
9754 (method url-fetch)
9755 (uri (pypi-uri "PasteScript" version))
9756 (sha256
9757 (base32
9758 "1h3nnhn45kf4pbcv669ik4faw04j58k8vbj1hwrc532k0nc28gy0"))))
9759 (build-system python-build-system)
9760 (native-inputs
9761 `(("python-nose" ,python-nose)))
9762 (propagated-inputs
9763 `(("python-paste" ,python-paste)
9764 ("python-pastedeploy" ,python-pastedeploy)))
9765 (home-page "http://pythonpaste.org/script/")
9766 (arguments
9767 '(;; Unfortunately, this requires the latest unittest2,
9768 ;; but that requires traceback2 which requires linecache2 which requires
9769 ;; unittest2. So we're skipping tests for now.
9770 ;; (Note: Apparently linetest2 only needs unittest2 for its tests,
9771 ;; so in theory we could get around this situation somehow.)
9772 #:tests? #f))
9773 (synopsis
9774 "Pluggable command line tool for serving web applications and more")
9775 (description
9776 "PasteScript is a plugin-friendly command line tool which provides a
9777 variety of features, from launching web applications to bootstrapping project
9778 layouts.")
9779 (license license:expat)))
9780
9781 (define-public python2-pastescript
9782 (package-with-python2 python-pastescript))
9783
9784 (define-public python-pyquery
9785 (package
9786 (name "python-pyquery")
9787 (version "1.2.17")
9788 (source
9789 (origin
9790 (method url-fetch)
9791 (uri (pypi-uri "pyquery" version))
9792 (sha256
9793 (base32
9794 "1xia20wm0vx5dk85kcwgh13bylz8qh47ffjxssd2586r60xi783a"))))
9795 (build-system python-build-system)
9796 (native-inputs
9797 `(("python-webob" ,python-webob)
9798 ("python-webtest" ,python-webtest)))
9799 (propagated-inputs
9800 `(("python-lxml" ,python-lxml)
9801 ("python-cssselect" ,python-cssselect)))
9802 (home-page "https://github.com/gawel/pyquery")
9803 (synopsis "Make jQuery-like queries on xml documents")
9804 (description "pyquery allows you to make jQuery queries on xml documents.
9805 The API is as much as possible the similar to jQuery. pyquery uses lxml for
9806 fast xml and html manipulation.")
9807 (license license:bsd-3)))
9808
9809 (define-public python2-pyquery
9810 (package-with-python2 python-pyquery))
9811
9812 (define-public python-webtest
9813 (package
9814 (name "python-webtest")
9815 (version "2.0.20")
9816 (source
9817 (origin
9818 (method url-fetch)
9819 (uri (pypi-uri "WebTest" version))
9820 (sha256
9821 (base32
9822 "0bv0qhdjakdsdgj4sk21gnpp8xp8bga4x03p6gjb83ihrsb7n4xv"))))
9823 (build-system python-build-system)
9824 (arguments
9825 `(;; Unfortunately we have to disable tests!
9826 ;; This release of WebTest is pinned to python-nose < 1.3,
9827 ;; but older versions of python-nose are plagued with the following
9828 ;; bug(s), which rears its ugly head during test execution:
9829 ;; https://github.com/nose-devs/nose/issues/759
9830 ;; https://github.com/nose-devs/nose/pull/811
9831 #:tests? #f))
9832 ;; Commented out code is no good, but in this case, once tests
9833 ;; are ready to be enabled again, we should put the following
9834 ;; in place:
9835 ;; (native-inputs
9836 ;; `(("python-nose" ,python-nose) ; technially < 1.3,
9837 ;; ; but see above comment
9838 ;; ("python-coverage" ,python-coverage)
9839 ;; ("python-mock" ,python-mock)
9840 ;; ("python-pastedeploy" ,python-pastedeploy)
9841 ;; ("python-wsgiproxy2" ,python-wsgiproxy2)
9842 ;; ("python-pyquery" ,python-pyquery)))
9843 (propagated-inputs
9844 `(("python-waitress" ,python-waitress)
9845 ("python-webob" ,python-webob)
9846 ("python-six" ,python-six)
9847 ("python-beautifulsoup4" ,python-beautifulsoup4)))
9848 (home-page "http://webtest.pythonpaste.org/")
9849 (synopsis "Helper to test WSGI applications")
9850 (description "Webtest allows you to test your Python web applications
9851 without starting an HTTP server. It supports anything that supports the
9852 minimum of WSGI.")
9853 (license license:expat)))
9854
9855 (define-public python2-webtest
9856 (package-with-python2 python-webtest))
9857
9858 (define-public python-anyjson
9859 (package
9860 (name "python-anyjson")
9861 (version "0.3.3")
9862 (source
9863 (origin
9864 (method url-fetch)
9865 (uri (pypi-uri "anyjson" version))
9866 (sha256
9867 (base32
9868 "1fjph4alvcscsl5d4b6qpv1yh31jy05jxi1l0xff7lws7j32v09p"))))
9869 (build-system python-build-system)
9870 (arguments
9871 `(;; We could possibly get tests working, but on Python 3 it's not so easy.
9872 ;; Very strangely, 2to3 is run *during setup.py install* (or bdist, or
9873 ;; whatever) so this transformation needs to be done before the tests
9874 ;; can be run. Maybe we could add a build step to transform beforehand
9875 ;; but it could be annoying/difficult.
9876 ;; We can enable tests for the Python 2 version, though, and do below.
9877 #:tests? #f))
9878 (home-page "http://bitbucket.org/runeh/anyjson/")
9879 (synopsis
9880 "Wraps best available JSON implementation in a common interface")
9881 (description
9882 "Anyjson loads whichever is the fastest JSON module installed
9883 and provides a uniform API regardless of which JSON implementation is used.")
9884 (license license:bsd-3)
9885 (properties `((python2-variant . ,(delay python2-anyjson))))))
9886
9887 (define-public python2-anyjson
9888 (let ((anyjson (package-with-python2
9889 (strip-python2-variant python-anyjson))))
9890 (package
9891 (inherit anyjson)
9892 (arguments `(;; Unlike the python 3 variant, we do run tests. See above!
9893 #:tests? #t
9894 ,@(package-arguments anyjson)))
9895 (native-inputs `(("python2-nose" ,python2-nose))))))
9896
9897 (define-public python-amqp
9898 (package
9899 (name "python-amqp")
9900 (version "1.4.9")
9901 (source
9902 (origin
9903 (method url-fetch)
9904 (uri (pypi-uri "amqp" version))
9905 (sha256
9906 (base32
9907 "06n6q0kxhjnbfz3vn8x9yz09lwmn1xi9d6wxp31h5jbks0b4vsid"))))
9908 (build-system python-build-system)
9909 (native-inputs
9910 `(("python-nose" ,python-nose)
9911 ("python-mock" ,python-mock)))
9912 (home-page "https://github.com/celery/py-amqp")
9913 (synopsis
9914 "Low-level AMQP client for Python (fork of amqplib)")
9915 (description
9916 "This is a fork of amqplib which was originally written by Barry Pederson.
9917 It is maintained by the Celery project, and used by kombu as a pure python
9918 alternative when librabbitmq is not available.")
9919 (license license:lgpl2.1+)
9920 (properties `((python2-variant . ,(delay python2-amqp))))))
9921
9922 (define-public python2-amqp
9923 (let ((amqp (package-with-python2
9924 (strip-python2-variant python-amqp))))
9925 (package
9926 (inherit amqp)
9927 (arguments `(;; Tries to run coverage tests with nose-cover3, which seems
9928 ;; unmaintained. Weirdly, does not do this on the python 3
9929 ;; version?
9930 #:tests? #f
9931 ,@(package-arguments amqp))))))
9932
9933 (define-public python-kombu
9934 (package
9935 (name "python-kombu")
9936 (version "3.0.37")
9937 (source
9938 (origin
9939 (method url-fetch)
9940 (uri (pypi-uri "kombu" version))
9941 (sha256
9942 (base32
9943 "0l16chb314gpq2v7fh94a22c30lcv6w3ylmhsa60bldlcq6a0r70"))))
9944 (build-system python-build-system)
9945 (native-inputs
9946 `(("python-mock" ,python-mock)
9947 ("python-nose" ,python-nose)))
9948 (propagated-inputs
9949 `(("python-anyjson" ,python-anyjson)
9950 ("python-amqp" ,python-amqp)
9951 ("python-redis" ,python-redis)))
9952 (home-page "http://kombu.readthedocs.org")
9953 (synopsis "Message passing library for Python")
9954 (description "The aim of Kombu is to make messaging in Python as easy as
9955 possible by providing an idiomatic high-level interface for the AMQ protocol,
9956 and also provide proven and tested solutions to common messaging problems.
9957 AMQP is the Advanced Message Queuing Protocol, an open standard protocol for
9958 message orientation, queuing, routing, reliability and security, for which the
9959 RabbitMQ messaging server is the most popular implementation.")
9960 (license license:bsd-3)
9961 (properties `((python2-variant . ,(delay python2-kombu))))))
9962
9963 (define-public python2-kombu
9964 (let ((kombu (package-with-python2
9965 (strip-python2-variant python-kombu))))
9966 (package
9967 (inherit kombu)
9968 (arguments `(;; FIXME: 'TestTransport.test_del_sync' fails on python2.
9969 ;; It works fine on the python3 variant.
9970 #:tests? #f
9971 ,@(package-arguments kombu)))
9972 (native-inputs `(("python2-unittest2" ,python2-unittest2)
9973 ,@(package-native-inputs kombu))))))
9974
9975 (define-public python-billiard
9976 (package
9977 (name "python-billiard")
9978 (version "3.3.0.23")
9979 (source
9980 (origin
9981 (method url-fetch)
9982 (uri (pypi-uri "billiard" version))
9983 (sha256
9984 (base32
9985 "02wxsc6bhqvzh8j6w758kvgqbnj14l796mvmrcms8fgfamd2lak9"))))
9986 (build-system python-build-system)
9987 (native-inputs
9988 `(("python-nose" ,python-nose)))
9989 (home-page "https://github.com/celery/billiard")
9990 (synopsis
9991 "Python multiprocessing fork with improvements and bugfixes")
9992 (description
9993 "Billiard is a fork of the Python 2.7 multiprocessing package. The
9994 multiprocessing package itself is a renamed and updated version of R Oudkerk's
9995 pyprocessing package. This standalone variant is intended to be compatible with
9996 Python 2.4 and 2.5, and will draw its fixes/improvements from python-trunk.")
9997 (license license:bsd-3)
9998 (properties `((python2-variant . ,(delay python2-billiard))))))
9999
10000 (define-public python2-billiard
10001 (let ((billiard (package-with-python2
10002 (strip-python2-variant python-billiard))))
10003 (package
10004 (inherit billiard)
10005 (native-inputs `(("python2-unittest2" ,python2-unittest2)
10006 ("python2-mock" ,python2-mock)
10007 ,@(package-native-inputs billiard))))))
10008
10009 (define-public python-celery
10010 (package
10011 (name "python-celery")
10012 (version "3.1.24")
10013 (source
10014 (origin
10015 (method url-fetch)
10016 (uri (pypi-uri "celery" version))
10017 (sha256
10018 (base32
10019 "0yh2prhdnx2dgkb67a5drj12hh2zvzx5f611p7mqqg01ydghif4r"))))
10020 (build-system python-build-system)
10021 (arguments
10022 `(#:phases
10023 (modify-phases %standard-phases
10024 ;; These tests break with Python 3.5:
10025 ;; https://github.com/celery/celery/issues/2897#issuecomment-253066295
10026 (replace 'check
10027 (lambda _
10028 (zero?
10029 (system* "nosetests" "--exclude=^test_safe_to_remove.*")))))))
10030 (native-inputs
10031 `(("python-nose" ,python-nose)))
10032 (propagated-inputs
10033 `(("python-pytz" ,python-pytz)
10034 ("python-billiard" ,python-billiard)
10035 ("python-kombu" ,python-kombu)))
10036 (home-page "http://celeryproject.org")
10037 (synopsis "Distributed Task Queue")
10038 (description "Celery is an asynchronous task queue/job queue based on
10039 distributed message passing. It is focused on real-time operation, but
10040 supports scheduling as well. The execution units, called tasks, are executed
10041 concurrently on a single or more worker servers using multiprocessing,
10042 Eventlet, or gevent. Tasks can execute asynchronously (in the background) or
10043 synchronously (wait until ready).")
10044 (license license:bsd-3)
10045 (properties `((python2-variant . ,(delay python2-celery))))))
10046
10047 (define-public python2-celery
10048 (let ((celery (package-with-python2
10049 (strip-python2-variant python-celery))))
10050 (package
10051 (inherit celery)
10052 (native-inputs `(("python2-unittest2" ,python2-unittest2)
10053 ("python2-mock" ,python2-mock)
10054 ,@(package-native-inputs celery))))))
10055
10056 (define-public python-translitcodec
10057 (package
10058 (name "python-translitcodec")
10059 (version "0.4.0")
10060 (source
10061 (origin
10062 (method url-fetch)
10063 (uri (pypi-uri "translitcodec" version))
10064 (sha256
10065 (base32
10066 "10x6pvblkzky1zhjs8nmx64nb9jdzxad4bxhq4iwv0j4z2aqjnki"))))
10067 (build-system python-build-system)
10068 (arguments
10069 `(#:tests? #f)) ; no tests provided
10070 (home-page
10071 "https://github.com/claudep/translitcodec")
10072 (synopsis
10073 "Unicode to 8-bit charset transliteration codec")
10074 (description
10075 "This package contains codecs for transliterating ISO 10646 texts into
10076 best-effort representations using smaller coded character sets (ASCII,
10077 ISO 8859, etc.).")
10078 (license license:expat)))
10079
10080 (define-public python2-translitcodec
10081 (package-with-python2 python-translitcodec))
10082
10083 (define-public python-editor
10084 (package
10085 (name "python-editor")
10086 (version "0.5")
10087 (source
10088 (origin
10089 (method url-fetch)
10090 (uri (pypi-uri "python-editor" version))
10091 (sha256
10092 (base32
10093 "1ypnpgvzpkbwsg4rdvy4sy51j28b5xq9v8pnkwxncn07vqz06p7n"))))
10094 (build-system python-build-system)
10095 (home-page
10096 "https://github.com/fmoo/python-editor")
10097 (synopsis
10098 "Programmatically open an editor, capture the result")
10099 (description
10100 "python-editor is a library that provides the editor module for
10101 programmatically interfacing with your system's $EDITOR.")
10102 (license license:asl2.0)))
10103
10104 (define-public python2-editor
10105 (package-with-python2 python-editor))
10106
10107 (define-public python-sphinxcontrib-programoutput
10108 (package
10109 (name "python-sphinxcontrib-programoutput")
10110 (version "0.10")
10111 (source (origin
10112 (method url-fetch)
10113 (uri (pypi-uri "sphinxcontrib-programoutput" version))
10114 (sha256
10115 (base32
10116 "153hhnlbx4688zj9wd64819ps5znc2jlyp5crkgzvn5hxgy99vpx"))))
10117 (build-system python-build-system)
10118 (arguments
10119 ;; FIXME: Many tests are failing and the upstream is gone.
10120 '(#:tests? #f))
10121 (propagated-inputs
10122 `(("python-sphinx" ,python-sphinx)))
10123 (synopsis "Sphinx extension to include program output")
10124 (description "A Sphinx extension to literally insert the output of arbitrary
10125 commands into documents, helping you to keep your command examples up to date.")
10126 (home-page "https://github.com/lunaryorn/sphinxcontrib-programoutput")
10127 (license license:bsd-2)))
10128
10129 (define-public python2-sphinxcontrib-programoutput
10130 (package-with-python2 python-sphinxcontrib-programoutput))
10131
10132 (define-public python-sphinx-repoze-autointerface
10133 (package
10134 (name "python-sphinx-repoze-autointerface")
10135 (version "0.8")
10136 (source (origin
10137 (method url-fetch)
10138 (uri (pypi-uri "repoze.sphinx.autointerface" version))
10139 (sha256
10140 (base32
10141 "08ycivzf7bh4a1zcyp31hbyqs1b2c9r26raa3vxjwwmbfqr3iw4f"))))
10142 (build-system python-build-system)
10143 (arguments '(#:tests? #f)) ; No tests.
10144 (propagated-inputs
10145 `(("python-sphinx" ,python-sphinx)
10146 ("python-zope-interface" ,python-zope-interface)))
10147 (synopsis "Auto-generate Sphinx API docs from Zope interfaces")
10148 (description "This package defines an extension for the Sphinx documentation
10149 system. The extension allows generation of API documentation by
10150 introspection of @code{zope.interface} instances in code.")
10151 (home-page "https://github.com/repoze/repoze.sphinx.autointerface")
10152 (license license:repoze)))
10153
10154 (define-public python2-sphinx-repoze-autointerface
10155 (package-with-python2 python-sphinx-repoze-autointerface))
10156
10157 (define-public python-psycopg2
10158 (package
10159 (name "python-psycopg2")
10160 (version "2.6.2")
10161 (source
10162 (origin
10163 (method url-fetch)
10164 (uri (pypi-uri "psycopg2" version))
10165 (sha256
10166 (base32
10167 "0p60z2gwfcal30y2w8gprflchp1kcg9qblc5rn782p4wxl90wjbh"))))
10168 (build-system python-build-system)
10169 (arguments
10170 ;; Tests would require a postgresql database "psycopg2_test"
10171 ;; and a running postgresql database management service.
10172 `(#:tests? #f)) ; TODO re-enable after providing a test-db.
10173 (inputs
10174 `(("postgresql" ,postgresql))) ; libpq
10175 (home-page "http://initd.org/psycopg/")
10176 (synopsis "Python PostgreSQL adapter")
10177 (description
10178 "psycopg2 is a thread-safe PostgreSQL adapter that implements DB-API 2.0. ")
10179 (license license:lgpl3+)))
10180
10181 (define-public python2-psycopg2
10182 (package-with-python2 python-psycopg2))
10183
10184 (define-public python-vobject
10185 (package
10186 (name "python-vobject")
10187 (version "0.9.2")
10188 (source (origin
10189 (method url-fetch)
10190 (uri (pypi-uri "vobject" version))
10191 (sha256
10192 (base32
10193 "1qfnwlx8qwkgr6nf5wvl6ff1r3kll53dh3z6nyp173nmlhhhqccb"))))
10194 (build-system python-build-system)
10195 (arguments
10196 '(;; The test suite relies on some non-portable Windows interfaces.
10197 #:tests? #f))
10198 (propagated-inputs
10199 `(("python-dateutil" ,python-dateutil)
10200 ("python-pyicu" ,python-pyicu)))
10201 (synopsis "Parse and generate vCard and vCalendar files")
10202 (description "Vobject is intended to be a full featured Python package for
10203 parsing and generating vCard and vCalendar files. Currently, iCalendar files
10204 are supported and well tested. vCard 3.0 files are supported, and all data
10205 should be imported, but only a few components are understood in a sophisticated
10206 way.")
10207 (home-page "http://eventable.github.io/vobject/")
10208 (license license:asl2.0)))
10209
10210 (define-public python2-vobject
10211 (package-with-python2 python-vobject))
10212
10213 (define-public python-munkres
10214 (package
10215 (name "python-munkres")
10216 (version "1.0.8")
10217 (source (origin
10218 (method url-fetch)
10219 (uri (pypi-uri "munkres" version))
10220 (sha256
10221 (base32
10222 "0mbspx4zv8id4x6pim6ybsa1xh96qwpbqj7skbqz4c9c9nf1lpqq"))))
10223 (build-system python-build-system)
10224 (arguments
10225 '(#:tests? #f)) ; no test suite
10226 (home-page "http://software.clapper.org/munkres/")
10227 (synopsis "Implementation of the Munkres algorithm")
10228 (description "The Munkres module provides an implementation of the Munkres
10229 algorithm (also called the Hungarian algorithm or the Kuhn-Munkres algorithm),
10230 useful for solving the Assignment Problem.")
10231 (license license:bsd-3)))
10232
10233 (define-public python2-munkres
10234 (package-with-python2 python-munkres))
10235
10236 (define-public python-flask
10237 (package
10238 (name "python-flask")
10239 (version "0.11.1")
10240 (source (origin
10241 (method url-fetch)
10242 (uri (pypi-uri "Flask" version))
10243 (sha256
10244 (base32
10245 "03kbfll4sj3v5z7r31c7bhfpi11r1np076d4p1k2kg4yzcmkywdl"))))
10246 (build-system python-build-system)
10247 (propagated-inputs
10248 `(("python-itsdangerous" ,python-itsdangerous)
10249 ("python-jinja2" ,python-jinja2)
10250 ("python-click" ,python-click)
10251 ("python-werkzeug" ,python-werkzeug)))
10252 (home-page "https://github.com/mitsuhiko/flask/")
10253 (synopsis "Microframework based on Werkzeug, Jinja2 and good intentions")
10254 (description "Flask is a micro web framework based on the Werkzeug toolkit
10255 and Jinja2 template engine. It is called a micro framework because it does not
10256 presume or force a developer to use a particular tool or library.")
10257 (license license:bsd-3)))
10258
10259 (define-public python2-flask
10260 (package-with-python2 python-flask))
10261
10262 (define-public python-flask-wtf
10263 (package
10264 (name "python-flask-wtf")
10265 (version "0.13.1")
10266 (source
10267 (origin
10268 (method url-fetch)
10269 (uri (pypi-uri "Flask-WTF" version))
10270 (sha256
10271 (base32
10272 "04l5743j2dici46038sqlzvf0xzpg8rf7s9ld2x24xv7f4idg990"))))
10273 (build-system python-build-system)
10274 (arguments
10275 '(#:phases
10276 (modify-phases %standard-phases
10277 (add-before 'check 'drop-failing-test
10278 (lambda _
10279 ;; FIXME: This file tries resolving an external server, which
10280 ;; fails. Try to patch out the offending section instead of
10281 ;; deleting the whole thing.
10282 (delete-file "tests/test_recaptcha.py")
10283 #t)))))
10284 (propagated-inputs
10285 `(("python-flask-babel" ,python-flask-babel)
10286 ("python-babel" ,python-babel)
10287 ("python-wtforms" ,python-wtforms)))
10288 (native-inputs
10289 `(("python-nose" ,python-nose)))
10290 (home-page "https://github.com/lepture/flask-wtf")
10291 (synopsis "Simple integration of Flask and WTForms")
10292 (description "Flask-WTF integrates Flask and WTForms, including CSRF, file
10293 upload, and reCAPTCHA.")
10294 (license license:bsd-3)))
10295
10296 (define-public python2-flask-wtf
10297 (package-with-python2 python-flask-wtf))
10298
10299 (define-public python-flask-multistatic
10300 (package
10301 (name "python-flask-multistatic")
10302 (version "1.0")
10303 (source
10304 (origin
10305 (method url-fetch)
10306 (uri (pypi-uri "flask-multistatic" version))
10307 (sha256
10308 (base32
10309 "0p4v50rwv64wcd0zlq7rzl4waprwr4hj19s3cgf1isywa7jcisgm"))))
10310 (build-system python-build-system)
10311 (propagated-inputs
10312 `(("python-flask" ,python-flask)))
10313 (home-page "https://pagure.io/flask-multistatic")
10314 (synopsis "Flask plugin to allow overriding static files")
10315 (description "@code{flask-multistatic} is a flask plugin that adds support
10316 for overriding static files.")
10317 (license license:gpl3+)))
10318
10319 (define-public python2-flask-multistatic
10320 (package-with-python2 python-flask-multistatic))
10321
10322 (define-public python-cookies
10323 (package
10324 (name "python-cookies")
10325 (version "2.2.1")
10326 (source (origin
10327 (method url-fetch)
10328 (uri (pypi-uri "cookies" version))
10329 (sha256
10330 (base32
10331 "13pfndz8vbk4p2a44cfbjsypjarkrall71pgc97glk5fiiw9idnn"))))
10332 (build-system python-build-system)
10333 (arguments
10334 `(;; test are broken: https://gitlab.com/sashahart/cookies/issues/3
10335 #:tests? #f))
10336 (native-inputs
10337 `(("python-pytest" ,python2-pytest)))
10338 (synopsis "HTTP cookie parser and renderer")
10339 (description "A RFC 6265-compliant HTTP cookie parser and renderer in
10340 Python.")
10341 (home-page "https://gitlab.com/sashahart/cookies")
10342 (license license:expat)))
10343
10344 (define-public python2-cookies
10345 (package-with-python2 python-cookies))
10346
10347 (define-public python-responses
10348 (package
10349 (name "python-responses")
10350 (version "0.5.1")
10351 (source (origin
10352 (method url-fetch)
10353 (uri (pypi-uri "responses" version))
10354 (sha256
10355 (base32
10356 "1spcfxixyk9k7pk82jm6zqkwk031s95lh8q0mz7539jrb7269bcc"))))
10357 (build-system python-build-system)
10358 (arguments
10359 `(;; Test suite is not distributed:
10360 ;; https://github.com/getsentry/responses/issues/38
10361 #:tests? #f))
10362 (native-inputs
10363 `(("python-mock" ,python-mock)))
10364 (propagated-inputs
10365 `(("python-requests" ,python-requests)
10366 ("python-cookies" ,python-cookies)
10367 ("python-six" ,python-six)))
10368 (home-page "https://github.com/getsentry/responses")
10369 (synopsis "Utility for mocking out the `requests` Python library")
10370 (description "A utility library for mocking out the `requests` Python
10371 library.")
10372 (license license:asl2.0)))
10373
10374 (define-public python2-responses
10375 (package-with-python2 python-responses))
10376
10377 (define-public python-whoosh
10378 (package
10379 (name "python-whoosh")
10380 (version "2.7.4")
10381 (source
10382 (origin
10383 (method url-fetch)
10384 (uri (pypi-uri "Whoosh" version))
10385 (sha256
10386 (base32
10387 "10qsqdjpbc85fykc1vgcs8xwbgn4l2l52c8d83xf1q59pwyn79bw"))))
10388 (build-system python-build-system)
10389 (native-inputs
10390 `(("python-pytest" ,python-pytest)))
10391 (home-page "http://bitbucket.org/mchaput/whoosh")
10392 (synopsis "Full text indexing, search, and spell checking library")
10393 (description
10394 "Whoosh is a fast, pure-Python full text indexing, search, and spell
10395 checking library.")
10396 (license license:bsd-2)))
10397
10398 (define-public python2-whoosh
10399 (let ((whoosh (package-with-python2 (strip-python2-variant python-whoosh))))
10400 (package (inherit whoosh)
10401 (propagated-inputs
10402 `(("python2-backport-ssl-match-hostname"
10403 ,python2-backport-ssl-match-hostname)
10404 ,@(package-propagated-inputs whoosh))))))
10405
10406 (define-public python-pathlib
10407 (package
10408 (name "python-pathlib")
10409 (version "1.0.1")
10410 (source (origin
10411 (method url-fetch)
10412 (uri (pypi-uri "pathlib" version))
10413 (sha256
10414 (base32
10415 "17zajiw4mjbkkv6ahp3xf025qglkj0805m9s41c45zryzj6p2h39"))))
10416 (build-system python-build-system)
10417 ;; The tests depend on the internal "test" module, which does not provide
10418 ;; a stable interface.
10419 (arguments `(#:tests? #f))
10420 (home-page "https://pathlib.readthedocs.org/")
10421 (synopsis "Object-oriented file system paths")
10422 (description "Pathlib offers a set of classes to handle file system paths.
10423 It offers the following advantages over using string objects:
10424
10425 @enumerate
10426 @item No more cumbersome use of os and os.path functions. Everything can
10427 be done easily through operators, attribute accesses, and method calls.
10428 @item Embodies the semantics of different path types. For example,
10429 comparing Windows paths ignores casing.
10430 @item Well-defined semantics, eliminating any inconsistencies or
10431 ambiguities (forward vs. backward slashes, etc.).
10432 @end enumerate
10433
10434 Note: In Python 3.4, pathlib is now part of the standard library. For other
10435 Python versions please consider python-pathlib2 instead, which tracks the
10436 standard library module. This module (python-pathlib) isn't maintained
10437 anymore.")
10438 (license license:expat)))
10439
10440 (define-public python2-pathlib
10441 (package-with-python2 python-pathlib))
10442
10443 (define-public python2-pathlib2
10444 (package
10445 (name "python2-pathlib2")
10446 (version "2.1.0")
10447 (source (origin
10448 (method url-fetch)
10449 (uri (pypi-uri "pathlib2" version))
10450 (sha256
10451 (base32
10452 "0p050msg5c8d0kadv702jnfshaxrb0il765cpkgnhn6mq5hakcyy"))))
10453 (build-system python-build-system)
10454 ;; We only need the the Python 2 variant, since for Python 3 our minimum
10455 ;; version is 3.4 which already includes this package as part of the
10456 ;; standard library.
10457 (arguments
10458 `(#:python ,python-2))
10459 (native-inputs
10460 `(("python2-six" ,python2-six)))
10461 (home-page "http://pypi.python.org/pypi/pathlib2/")
10462 (synopsis "Object-oriented file system paths - backport of standard
10463 pathlib module")
10464 (description "The goal of pathlib2 is to provide a backport of standard
10465 pathlib module which tracks the standard library module, so all the newest
10466 features of the standard pathlib can be used also on older Python versions.
10467
10468 Pathlib offers a set of classes to handle file system paths. It offers the
10469 following advantages over using string objects:
10470
10471 @enumerate
10472 @item No more cumbersome use of os and os.path functions. Everything can
10473 be done easily through operators, attribute accesses, and method calls.
10474 @item Embodies the semantics of different path types. For example,
10475 comparing Windows paths ignores casing.
10476 @item Well-defined semantics, eliminating any inconsistencies or
10477 ambiguities (forward vs. backward slashes, etc.).
10478 @end enumerate")
10479 (license license:expat)))
10480
10481 (define-public python-jellyfish
10482 (package
10483 (name "python-jellyfish")
10484 (version "0.5.6")
10485 (source (origin
10486 (method url-fetch)
10487 (uri (pypi-uri "jellyfish" version))
10488 (sha256
10489 (base32
10490 "1j9rplb16ba2prjj6mip46z0w9pnhnqpwgiwi0x93vnas14rlyl8"))))
10491 (build-system python-build-system)
10492 (native-inputs
10493 `(("python-pytest" ,python-pytest)))
10494 (home-page "https://github.com/jamesturk/jellyfish")
10495 (synopsis "Approximate and phonetic matching of strings")
10496 (description "Jellyfish uses a variety of string comparison and phonetic
10497 encoding algorithms to do fuzzy string matching.")
10498 (license license:bsd-2)
10499 (properties `((python2-variant . ,(delay python2-jellyfish))))))
10500
10501 (define-public python2-jellyfish
10502 (let ((jellyfish (package-with-python2
10503 (strip-python2-variant python-jellyfish))))
10504 (package (inherit jellyfish)
10505 (native-inputs `(("python2-unicodecsv" ,python2-unicodecsv)
10506 ,@(package-native-inputs jellyfish))))))
10507
10508 (define-public python2-unicodecsv
10509 (package
10510 (name "python2-unicodecsv")
10511 (version "0.14.1")
10512 (source (origin
10513 (method url-fetch)
10514 ;; The test suite is not included in the PyPi release.
10515 ;; https://github.com/jdunck/python-unicodecsv/issues/19
10516 (uri (string-append "https://github.com/jdunck/python-unicodecsv/"
10517 "archive/" version ".tar.gz"))
10518 (file-name (string-append name "-" version ".tar.gz"))
10519 (sha256
10520 (base32
10521 "087nqanfcyp6mlfbbr5lva5f3w6iz1bybls9xlrb8icmc474wh4w"))))
10522 (build-system python-build-system)
10523 (arguments
10524 `(;; It supports Python 3, but Python 3 can already do Unicode CSV.
10525 #:python ,python-2))
10526 (native-inputs
10527 `(("python2-unittest2" ,python2-unittest2)))
10528 (home-page "https://github.com/jdunck/python-unicodecsv")
10529 (synopsis "Unicode CSV module for Python 2")
10530 (description "Unicodecsv is a drop-in replacement for Python 2.7's CSV
10531 module, adding support for Unicode strings.")
10532 (license license:bsd-2)))
10533
10534 (define-public python-rarfile
10535 (package
10536 (name "python-rarfile")
10537 (version "2.8")
10538 (source (origin
10539 (method url-fetch)
10540 (uri (pypi-uri "rarfile" version))
10541 (sha256
10542 (base32
10543 "0qfad483kcbga0bn4qmcz953xjk16r52fahiy46zzn56v80y89ra"))))
10544 (build-system python-build-system)
10545 (arguments
10546 '(#:phases
10547 (modify-phases %standard-phases
10548 (replace 'check
10549 ;; Many tests fail, but the installation proceeds.
10550 (lambda _ (zero? (system* "make" "-C" "test" "test")))))))
10551 (native-inputs
10552 `(("which" ,which))) ; required for tests
10553 (propagated-inputs
10554 `(("libarchive" ,libarchive)))
10555 (home-page "https://github.com/markokr/rarfile")
10556 (synopsis "RAR archive reader for Python")
10557 (description "This is Python module for RAR archive reading. The interface
10558 is made as zipfile like as possible.")
10559 (license license:isc)))
10560
10561 (define-public python2-rarfile
10562 (package-with-python2 python-rarfile))
10563
10564 (define-public python-magic
10565 (package
10566 (name "python-magic")
10567 (version "0.4.3")
10568 (source
10569 (origin
10570 (method url-fetch)
10571 (uri (string-append "https://github.com/ahupp/python-magic/archive/"
10572 version ".tar.gz"))
10573 (sha256
10574 (base32
10575 "17bgy92i7sb021f2s4mw1dcvpm6p1mi9jihridwy1pyn8mzvpjgk"))
10576 (file-name (string-append name "-" version "-checkout"))))
10577 (build-system python-build-system)
10578 (arguments
10579 ;; The tests are unreliable, so don't run them. The tests fail
10580 ;; under Python3 because they were written for Python2 and
10581 ;; contain import statements that do not work in Python3. One of
10582 ;; the tests fails under Python2 because its assertions are
10583 ;; overly stringent; it relies on comparing output strings which
10584 ;; are brittle and can change depending on the version of
10585 ;; libmagic being used and the system on which the test is
10586 ;; running. In my case, under GuixSD 0.10.0, only one test
10587 ;; failed, and it seems to have failed only because the version
10588 ;; of libmagic that is packaged in Guix outputs a slightly
10589 ;; different (but not wrong) string than the one that the test
10590 ;; expected.
10591 '(#:tests? #f
10592 #:phases (modify-phases %standard-phases
10593 ;; Replace a specific method call with a hard-coded
10594 ;; path to the necessary libmagic.so file in the
10595 ;; store. If we don't do this, then the method call
10596 ;; will fail to find the libmagic.so file, which in
10597 ;; turn will cause any application using
10598 ;; python-magic to fail.
10599 (add-before 'build 'hard-code-path-to-libmagic
10600 (lambda* (#:key inputs #:allow-other-keys)
10601 (let ((file (assoc-ref inputs "file")))
10602 (substitute* "magic.py"
10603 (("ctypes.util.find_library\\('magic'\\)")
10604 (string-append "'" file "/lib/libmagic.so'")))
10605 #t)))
10606 (add-before 'install 'disable-egg-compression
10607 (lambda _
10608 (let ((port (open-file "setup.cfg" "a")))
10609 (display "\n[easy_install]\nzip_ok = 0\n"
10610 port)
10611 (close-port port)
10612 #t))))))
10613 (inputs
10614 ;; python-magic needs to be able to find libmagic.so.
10615 `(("file" ,file)))
10616 (home-page "https://github.com/ahupp/python-magic")
10617 (synopsis "File type identification using libmagic")
10618 (description
10619 "This module uses ctypes to access the libmagic file type
10620 identification library. It makes use of the local magic database and
10621 supports both textual and MIME-type output. Note that this module and
10622 the python-file module both provide a \"magic.py\" file; these two
10623 modules, which are different and were developed separately, both serve
10624 the same purpose: to provide Python bindings for libmagic.")
10625 (license license:expat)))
10626
10627 (define-public python2-magic
10628 (package-with-python2 python-magic))
10629
10630 (define-public python2-s3cmd
10631 (package
10632 (name "python2-s3cmd")
10633 (version "1.6.1")
10634 (source
10635 (origin
10636 (method url-fetch)
10637 (uri (string-append "mirror://sourceforge/s3tools/s3cmd/" version "/"
10638 "s3cmd-" version ".tar.gz"))
10639 (sha256
10640 (base32
10641 "0ki1rzhm5icvi9ry5jswi4b22yqwyj0d2wsqsgilwx6qhi7pjxa6"))))
10642 (build-system python-build-system)
10643 (arguments
10644 ;; s3cmd is written for python2 only and contains no tests.
10645 `(#:python ,python-2
10646 #:tests? #f))
10647 (propagated-inputs
10648 `(("python2-dateutil" ,python2-dateutil)
10649 ;; The python-file package also provides a magic.py module.
10650 ;; This is an unfortunate state of affairs; however, s3cmd
10651 ;; fails to install if it cannot find specifically the
10652 ;; python-magic package. Thus we include it, instead of using
10653 ;; python-file. Ironically, s3cmd sometimes works better
10654 ;; without libmagic bindings at all:
10655 ;; https://github.com/s3tools/s3cmd/issues/198
10656 ("python2-magic" ,python2-magic)))
10657 (home-page "http://s3tools.org/s3cmd")
10658 (synopsis "Command line tool for S3-compatible storage services")
10659 (description
10660 "S3cmd is a command line tool for uploading, retrieving and managing data
10661 in storage services that are compatible with the Amazon Simple Storage
10662 Service (S3) protocol, including S3 itself. It supports rsync-like backup,
10663 GnuPG encryption, and more. It also supports management of Amazon's
10664 CloudFront content delivery network.")
10665 (license license:gpl2+)))
10666
10667 (define-public python-pkgconfig
10668 (package
10669 (name "python-pkgconfig")
10670 (version "1.1.0")
10671 (source
10672 (origin
10673 (method url-fetch)
10674 (uri (pypi-uri "pkgconfig" version))
10675 (sha256
10676 (base32
10677 "1pw0kmvc57sjmaxi6c54fqsnihqj6hvhc9y1vaz36axafzqam7bh"))))
10678 (build-system python-build-system)
10679 (native-inputs
10680 `(("python-nose" ,python-nose)))
10681 (inputs
10682 `(("pkg-config" ,pkg-config)))
10683 (arguments
10684 `(;; Tests fail with "ValueError: _type_ 'v' not supported" on Python 3,
10685 ;; and on Python 2 they need the dl module deprecated since Python 2.6.
10686 #:tests? #f
10687 ;; Hard-code the path to pkg-config.
10688 #:phases
10689 (modify-phases %standard-phases
10690 (add-before
10691 'build 'patch
10692 (lambda _
10693 (substitute* "pkgconfig/pkgconfig.py"
10694 (("cmd = 'pkg-config")
10695 (string-append "cmd = '" (which "pkg-config"))))
10696 #t)))))
10697 (home-page "https://github.com/matze/pkgconfig")
10698 (synopsis "Python interface for pkg-config")
10699 (description "This module provides a Python interface to pkg-config. It
10700 can be used to find all pkg-config packages, check if a package exists,
10701 check if a package meets certain version requirements, query CFLAGS and
10702 LDFLAGS and parse the output to build extensions with setup.py.")
10703 (license license:expat)))
10704
10705 (define-public python2-pkgconfig
10706 (package-with-python2 python-pkgconfig))
10707
10708 (define-public python-bz2file
10709 (package
10710 (name "python-bz2file")
10711 (version "0.98")
10712 (source
10713 (origin
10714 (method url-fetch)
10715 (uri (pypi-uri "bz2file" version))
10716 (sha256
10717 (base32
10718 "126s53fkpx04f33a829yqqk8fj4png3qwg4m66cvlmhmwc8zihb4"))))
10719 (build-system python-build-system)
10720 (arguments
10721 `(#:tests? #f)) ; Tests use deprecated python modules.
10722 (home-page "https://github.com/nvawda/bz2file")
10723 (synopsis "Read and write bzip2-compressed files")
10724 (description
10725 "Bz2file is a Python library for reading and writing bzip2-compressed
10726 files. It contains a drop-in replacement for the I/O interface in the
10727 standard library's @code{bz2} module, including features from the latest
10728 development version of CPython that are not available in older releases.")
10729 (license license:asl2.0)
10730 (properties `((python2-variant . ,(delay python2-bz2file))))))
10731
10732 (define-public python2-bz2file
10733 (let ((base (package-with-python2
10734 (strip-python2-variant python-bz2file))))
10735 (package
10736 (inherit base)
10737 (arguments
10738 `(#:python ,python-2
10739 #:phases
10740 (modify-phases %standard-phases
10741 ;; 'python setup.py test' does not work as of 0.98.
10742 ;; There is only the one test file, so we run it directly.
10743 (replace 'check
10744 (lambda _ (zero? (system* "python"
10745 "test_bz2file.py"))))))))))
10746
10747 (define-public python-future
10748 (package
10749 (name "python-future")
10750 (version "0.16.0")
10751 (source
10752 (origin
10753 (method url-fetch)
10754 (uri (pypi-uri "future" version))
10755 (sha256
10756 (base32
10757 "1nzy1k4m9966sikp0qka7lirh8sqrsyainyf8rk97db7nwdfv773"))))
10758 (build-system python-build-system)
10759 ;; Many tests connect to the network or are otherwise flawed.
10760 ;; https://github.com/PythonCharmers/python-future/issues/210
10761 (arguments
10762 `(#:tests? #f))
10763 (home-page "http://python-future.org")
10764 (synopsis "Single-source support for Python 3 and 2")
10765 (description
10766 "@code{python-future} is the missing compatibility layer between Python 2 and
10767 Python 3. It allows you to use a single, clean Python 3.x-compatible codebase
10768 to support both Python 2 and Python 3 with minimal overhead.")
10769 (license license:expat)))
10770
10771 (define-public python2-future
10772 (package-with-python2 python-future))
10773
10774 (define-public python-cysignals
10775 (package
10776 (name "python-cysignals")
10777 (version "1.1.0")
10778 (source
10779 (origin
10780 (method url-fetch)
10781 (uri (pypi-uri "cysignals" version ".tar.bz2"))
10782 (sha256
10783 (base32
10784 "14cbyd9znlz6cxy1s3g6v6dv5jj45hn27pywkidd9b1zanaysqc6"))))
10785 (build-system python-build-system)
10786 (native-inputs
10787 `(("python-cython" ,python-cython)
10788 ("python-sphinx" ,python-sphinx)))
10789 (inputs
10790 `(("pari-gp" ,pari-gp)))
10791 (arguments
10792 `(#:modules ((guix build python-build-system)
10793 ((guix build gnu-build-system) #:prefix gnu:)
10794 (guix build utils))
10795 ;; FIXME: Tests are executed after installation and currently fail
10796 ;; when not installing into standard locations; the author is working
10797 ;; on a fix.
10798 #:tests? #f
10799 #:phases
10800 (modify-phases %standard-phases
10801 (add-before
10802 'build 'configure
10803 (assoc-ref gnu:%standard-phases 'configure)))))
10804 (home-page
10805 "https://github.com/sagemath/cysignals")
10806 (synopsis
10807 "Handling of interrupts and signals for Cython")
10808 (description
10809 "The cysignals package provides mechanisms to handle interrupts (and
10810 other signals and errors) in Cython code, using two related approaches,
10811 for mixed Cython/Python code or external C libraries and pure Cython code,
10812 respectively.")
10813 (license license:lgpl3+)))
10814
10815 (define-public python2-cysignals
10816 (package-with-python2 python-cysignals))
10817
10818 (define-public python2-shedskin
10819 (package
10820 (name "python2-shedskin")
10821 (version "0.9.4")
10822 (source
10823 (origin
10824 (method url-fetch)
10825 (uri (string-append "https://github.com/shedskin/shedskin/"
10826 "releases/download/v" version
10827 "/shedskin-" version ".tgz"))
10828 (sha256
10829 (base32
10830 "0nzwrzgw1ga8rw6f0ryq7zr9kkiavd1cqz5hzxkcbicl1dk7kz41"))))
10831 (build-system python-build-system)
10832 (arguments
10833 `(#:python ,python-2
10834 #:phases (modify-phases %standard-phases
10835 (add-after 'unpack 'fix-resulting-include-libs
10836 (lambda* (#:key inputs #:allow-other-keys)
10837 (let ((libgc (assoc-ref inputs "libgc"))
10838 (pcre (assoc-ref inputs "pcre")))
10839 (substitute* "shedskin/makefile.py"
10840 (("variable == 'CCFLAGS':[ ]*")
10841 (string-append "variable == 'CCFLAGS':\n"
10842 " line += ' -I " pcre "/include"
10843 " -I " libgc "/include'"))
10844 (("variable == 'LFLAGS':[ ]*")
10845 (string-append "variable == 'LFLAGS':\n"
10846 " line += ' -L" pcre "/lib"
10847 " -L " libgc "/lib'")))
10848 #t))))))
10849 (inputs `(("pcre" ,pcre)
10850 ("libgc" ,libgc)))
10851 (home-page "https://shedskin.github.io/")
10852 (synopsis "Experimental Python-2 to C++ Compiler")
10853 (description (string-append "This is an experimental compiler for a subset of
10854 Python. It generates C++ code and a Makefile."))
10855 (license (list license:gpl3 license:bsd-3 license:expat))))
10856
10857 (define-public python2-rope
10858 (package
10859 (name "python2-rope")
10860 (version "0.10.3")
10861 (source
10862 (origin
10863 (method url-fetch)
10864 (uri (pypi-uri "rope" version))
10865 (sha256
10866 (base32
10867 "18k5znhpwvrfck3yp0jmhd5j8r0f0s8bk1zh5yhs2cfgmfhbwigb"))))
10868 (arguments
10869 ;; Rope is currently python-2 only.
10870 ;; https://github.com/python-rope/rope/issues/57
10871 `(#:python ,python-2))
10872 (build-system python-build-system)
10873 (native-inputs
10874 `(("python2-unittest2" ,python2-unittest2)))
10875 (home-page "https://github.com/python-rope/rope")
10876 (synopsis "Refactoring library for Python")
10877 (description "Rope is a refactoring library for Python. It facilitates
10878 the renaming, moving and extracting of attributes, functions, modules, fields
10879 and parameters in Python 2 source code. These refactorings can also be applied
10880 to occurrences in strings and comments.")
10881 (license license:gpl2)))
10882
10883 (define-public python-py3status
10884 (package
10885 (name "python-py3status")
10886 (version "3.1")
10887 (source
10888 (origin
10889 (method url-fetch)
10890 (uri (pypi-uri "py3status" version))
10891 (sha256
10892 (base32
10893 "0i283z1pivmir61z8kbiycigc94l61v33ygzkhczf1ifq7cppyds"))))
10894 (build-system python-build-system)
10895 (arguments
10896 '(#:tests? #f)) ; TODO: Requires many libraries not in Guix.
10897 (home-page "https://github.com/ultrabug/py3status")
10898 (synopsis "Extensible i3status wrapper written in Python")
10899 (description "py3status is an i3status wrapper which extends i3status
10900 functionality in a modular way, allowing you to extend your panel with your
10901 own code, responding to click events and updating clock every second.")
10902 (license license:bsd-3)))
10903
10904 (define-public python-tblib
10905 (package
10906 (name "python-tblib")
10907 (version "1.3.0")
10908 (source (origin
10909 (method url-fetch)
10910 (uri (pypi-uri "tblib" version))
10911 (sha256 (base32
10912 "02iahfkfa927hb4jq2bak36ldihwapzacfiq5lyxg8llwn98a1yi"))))
10913 (build-system python-build-system)
10914 (arguments
10915 `(#:phases
10916 (modify-phases %standard-phases
10917 (replace 'check
10918 (lambda _
10919 ;; Upstream runs tests after installation and the package itself
10920 ;; resides in a subdirectory. Extend PYTHONPATH so it will be
10921 ;; found.
10922 (setenv "PYTHONPATH"
10923 (string-append (getcwd) "/build/lib:"
10924 (getenv "PYTHONPATH")))
10925 (zero? (system* "py.test" "-vv" "tests" "README.rst")))))))
10926 (native-inputs
10927 `(("python-pytest" ,python-pytest)
10928 ("python-six" ,python-six)))
10929 (home-page "https://github.com/ionelmc/python-tblib")
10930 (synopsis "Traceback serialization library")
10931 (description
10932 "Traceback serialization allows you to:
10933
10934 @enumerate
10935 @item Pickle tracebacks and raise exceptions with pickled tracebacks in
10936 different processes. This allows better error handling when running code over
10937 multiple processes (imagine multiprocessing, billiard, futures, celery etc).
10938
10939 @item Parse traceback strings and raise with the parsed tracebacks.
10940 @end enumerate\n")
10941 (license license:bsd-3)))
10942
10943 (define-public python2-tblib
10944 (package-with-python2 python-tblib))
10945
10946 (define-public python-sqlparse
10947 (package
10948 (name "python-sqlparse")
10949 (version "0.1.19")
10950 (source (origin
10951 (method url-fetch)
10952 (uri (pypi-uri "sqlparse" version))
10953 (sha256
10954 (base32
10955 "1s2fvaxgh9kqzrd6iwy5h7i61ckn05plx9np13zby93z3hdbx5nq"))))
10956 (build-system python-build-system)
10957 (arguments
10958 `(#:phases
10959 (modify-phases %standard-phases
10960 (replace 'check
10961 (lambda* _
10962 ;; setup.py-integrated 2to3 only affects the build files, but
10963 ;; py.test is using the source files. So we need to convert them
10964 ;; manually.
10965 (when (zero? (system* "python3"))
10966 (system* "2to3" "--no-diff" "-wn" "sqlparse" "tests"))
10967 (zero? (system* "py.test")))))))
10968 (native-inputs
10969 `(("python-pytest" ,python-pytest)))
10970 (home-page "https://github.com/andialbrecht/sqlparse")
10971 (synopsis "Non-validating SQL parser")
10972 (description "Sqlparse is a non-validating SQL parser for Python. It
10973 provides support for parsing, splitting and formatting SQL statements.")
10974 (license license:bsd-3)))
10975
10976 (define-public python2-sqlparse
10977 (package-with-python2 python-sqlparse))
10978
10979 (define-public python-greenlet
10980 (package
10981 (name "python-greenlet")
10982 (version "0.4.11")
10983 (source (origin
10984 (method url-fetch)
10985 (uri (pypi-uri "greenlet" version))
10986 (sha256
10987 (base32
10988 "1xhik26j4f3kc4qw9xmj0c567rb5h1zryb4ijwqnqwwjvfhbv59h"))))
10989 (build-system python-build-system)
10990 (home-page "https://greenlet.readthedocs.io/")
10991 (synopsis "Lightweight in-process concurrent programming")
10992 (description
10993 "Greenlet package is a spin-off of Stackless, a version of CPython
10994 that supports micro-threads called \"tasklets\". Tasklets run
10995 pseudo-concurrently (typically in a single or a few OS-level threads) and
10996 are synchronized with data exchanges on \"channels\".")
10997 (license (list license:psfl license:expat))))
10998
10999 (define-public python2-greenlet
11000 (package-with-python2 python-greenlet))
11001
11002 (define-public python-gevent
11003 (package
11004 (name "python-gevent")
11005 (version "1.1.1")
11006 (source (origin
11007 (method url-fetch)
11008 (uri (pypi-uri "gevent" version))
11009 (sha256
11010 (base32
11011 "1smf3kvidpdiyi2c81alal74p2zm0clrm6xbyy6y1k9a3f2vkrbf"))
11012 (modules '((guix build utils)))
11013 (snippet
11014 '(begin
11015 ;; unbunding libev and c-ares
11016 (for-each delete-file-recursively '("libev" "c-ares"))
11017 ;; fixing testsuite
11018 (call-with-output-file "greentest/__init__.py" noop)
11019 (substitute* "greentest/testrunner.py"
11020 (("import util") "from . import util")
11021 (("from util import log") "from .util import log"))))))
11022 (build-system python-build-system)
11023 (propagated-inputs
11024 `(("python-greenlet" ,python-greenlet)))
11025 (native-inputs
11026 `(("python-six" ,python-six)))
11027 (inputs
11028 `(("c-ares" ,c-ares)
11029 ("libev" ,libev)))
11030 (home-page "http://www.gevent.org/")
11031 (synopsis "Coroutine-based network library")
11032 (description
11033 "gevent is a coroutine-based Python networking library that uses greenlet
11034 to provide a high-level synchronous API on top of the libev event loop.")
11035 (license license:expat)))
11036
11037 (define-public python2-gevent
11038 (package-with-python2 python-gevent))
11039
11040 (define-public python-geventhttpclient
11041 (package
11042 (name "python-geventhttpclient")
11043 (version "1.3.1")
11044 (source (origin
11045 (method url-fetch)
11046 (uri (pypi-uri "geventhttpclient" version))
11047 (sha256
11048 (base32
11049 "07d0q3wzmml75227r6y6mrl5a0zpf4v9gj0ni5rhbyzmaj4az1xx"))
11050 (modules '((guix build utils)))
11051 (snippet
11052 '(begin
11053 ;; Delete pre-compiled files.
11054 (for-each delete-file (find-files "src/geventhttpclient"
11055 ".*\\.pyc"))
11056 #t))))
11057 (build-system python-build-system)
11058 (arguments
11059 '(#:phases
11060 (modify-phases %standard-phases
11061 (add-after 'unpack 'delete-network-tests
11062 (lambda _
11063 (delete-file "src/geventhttpclient/tests/test_client.py")
11064 #t))
11065 (delete 'check)
11066 (add-after 'install 'check
11067 (lambda* (#:key inputs outputs #:allow-other-keys)
11068 (add-installed-pythonpath inputs outputs)
11069 (zero? (system* "py.test" "src/geventhttpclient/tests" "-v")))))))
11070 (native-inputs
11071 `(("python-pytest" ,python-pytest)))
11072 (propagated-inputs
11073 `(("python-certifi" ,python-certifi)
11074 ("python-gevent" ,python-gevent)
11075 ("python-six" ,python-six)))
11076 (home-page "https://github.com/gwik/geventhttpclient")
11077 (synopsis "HTTP client library for gevent")
11078 (description "@code{python-geventhttpclient} is a high performance,
11079 concurrent HTTP client library for python using @code{gevent}.")
11080 (license license:expat)))
11081
11082 (define-public python2-geventhttpclient
11083 (package-with-python2 python-geventhttpclient))
11084
11085 (define-public python-fastimport
11086 (package
11087 (name "python-fastimport")
11088 (version "0.9.6")
11089 (source
11090 (origin
11091 (method url-fetch)
11092 (uri (pypi-uri "fastimport" version))
11093 (sha256
11094 (base32 "1aqjsin4rmqm7ln4j0p73fzxifws6c6ikgyhav7r137m2ixsxl43"))))
11095 (build-system python-build-system)
11096 (home-page "https://github.com/jelmer/python-fastimport")
11097 (synopsis "VCS fastimport parser and generator in Python")
11098 (description "This package provides a parser for and generator of the Git
11099 @url{https://www.kernel.org/pub/software/scm/git/docs/git-fast-import.html,fastimport}
11100 format.")
11101 (license license:gpl2+)))
11102
11103 (define-public python2-fastimport
11104 (package-with-python2 python-fastimport))
11105
11106 (define-public python-twisted
11107 (package
11108 (name "python-twisted")
11109 (version "16.2.0")
11110 (source (origin
11111 (method url-fetch)
11112 (uri (pypi-uri "Twisted" version ".tar.bz2"))
11113 (sha256
11114 (base32
11115 "0ydxrp9myw1mvsz3qfzx5579y5llmqa82pxvqchgp5syczffi450"))))
11116 (build-system python-build-system)
11117 (arguments
11118 '(#:tests? #f)) ; FIXME: Some tests are failing.
11119 ;; #:phases
11120 ;; (modify-phases %standard-phases
11121 ;; (replace 'check
11122 ;; (lambda _
11123 ;; (zero? (system* "./bin/trial" "twisted")))))
11124 (propagated-inputs
11125 `(("python-zope-interface" ,python-zope-interface)))
11126 (home-page "https://twistedmatrix.com/")
11127 (synopsis "Asynchronous networking framework written in Python")
11128 (description
11129 "Twisted is an extensible framework for Python programming, with special
11130 focus on event-based network programming and multiprotocol integration.")
11131 (license license:expat)))
11132
11133 (define-public python2-twisted
11134 (package-with-python2 python-twisted))
11135
11136 (define-public python-pika
11137 (package
11138 (name "python-pika")
11139 (version "0.10.0")
11140 (source
11141 (origin
11142 (method url-fetch)
11143 (uri (pypi-uri "pika" version))
11144 (sha256
11145 (base32
11146 "0nb4h08di432lv7dy2v9kpwgk0w92f24sqc2hw2s9vwr5b8v8xvj"))))
11147 (build-system python-build-system)
11148 (native-inputs
11149 `(("python-pyev" ,python-pyev)
11150 ("python-tornado" ,python-tornado)
11151 ("python-twisted" ,python-twisted)))
11152 (home-page "https://pika.readthedocs.org")
11153 (synopsis "Pure Python AMQP Client Library")
11154 (description
11155 "Pika is a pure-Python implementation of the AMQP (Advanced Message Queuing
11156 Protocol) 0-9-1 protocol that tries to stay fairly independent of the underlying
11157 network support library.")
11158 (license license:bsd-3)))
11159
11160 (define-public python2-pika
11161 (package-with-python2 python-pika))
11162
11163 (define-public python-ply
11164 (package
11165 (name "python-ply")
11166 (version "3.9")
11167 (source
11168 (origin
11169 (method url-fetch)
11170 (uri (pypi-uri "ply" version))
11171 (sha256
11172 (base32
11173 "0gpl0yli3w03ipyqfrp3w5nf0iawhsq65anf5wwm2wf5p502jzhd"))))
11174 (build-system python-build-system)
11175 (home-page "http://www.dabeaz.com/ply/")
11176 (synopsis "Python Lex & Yacc")
11177 (description "PLY is a @code{lex}/@code{yacc} implemented purely in Python.
11178 It uses LR parsing and does extensive error checking.")
11179 (license license:bsd-3)))
11180
11181 (define-public python2-ply
11182 (package-with-python2 python-ply))
11183
11184 (define-public python-tabulate
11185 (package
11186 (name "python-tabulate")
11187 (version "0.7.7")
11188 (source (origin
11189 (method url-fetch)
11190 (uri (pypi-uri "tabulate" version))
11191 (sha256
11192 (base32
11193 "1inqhspd4frxnp08c32yndr0lc4px1xfkqah184i5w09gkhvi843"))))
11194 (build-system python-build-system)
11195 (arguments
11196 ;; FIXME: The pypi release tarball is missing a 'test/common.py'
11197 ;; and the latest release is not tagged in the upstream repository.
11198 '(#:tests? #f))
11199 (home-page "https://bitbucket.org/astanin/python-tabulate")
11200 (synopsis "Pretty-print tabular data")
11201 (description
11202 "Tabulate is a library and command-line utility to pretty-print tabular
11203 data in Python.")
11204 (license license:expat)))
11205
11206 (define-public python2-tabulate
11207 (package-with-python2 python-tabulate))
11208
11209 (define-public python-kazoo
11210 (package
11211 (name "python-kazoo")
11212 (version "2.2.1")
11213 (source
11214 (origin
11215 (method url-fetch)
11216 (uri (pypi-uri "kazoo" version))
11217 (sha256
11218 (base32
11219 "10pb864if9qi2pq9lfb9m8f7z7ss6rml80gf1d9h64lap5crjnjj"))))
11220 (build-system python-build-system)
11221 (arguments '(#:tests? #f)) ; XXX: needs zookeeper
11222 (propagated-inputs
11223 `(("python-six" ,python-six)))
11224 (home-page "https://kazoo.readthedocs.org")
11225 (synopsis "High-level Zookeeper client library")
11226 (description
11227 "Kazoo is a Python client library for the Apache Zookeeper distributed
11228 application service. It is designed to be easy to use and to avoid common
11229 programming errors.")
11230 (license license:asl2.0)))
11231
11232 (define-public python2-kazoo
11233 (package-with-python2 python-kazoo))
11234
11235 (define-public python-pykafka
11236 (package
11237 (name "python-pykafka")
11238 (version "2.4.0")
11239 (source (origin
11240 (method url-fetch)
11241 (uri (string-append
11242 "https://pypi.python.org/packages/8b/3e/"
11243 "384eeff406b06315738b62483fd2126c6e4f544167116b17cc04ea7d2a59/"
11244 "pykafka-" version ".tar.gz"))
11245 (sha256
11246 (base32
11247 "1id6sr159p6aa13bxcqyr9gln8sqg1l0ddzns5iws8kk5q1p5cfv"))))
11248 (build-system python-build-system)
11249 (arguments '(#:tests? #f)) ; XXX: needs zookeeper, kafka, etc.
11250 (propagated-inputs
11251 `(("python-gevent" ,python-gevent)
11252 ("python-kazoo" ,python-kazoo)
11253 ("python-tabulate" ,python-tabulate)))
11254 (inputs
11255 `(("librdkafka" ,librdkafka)))
11256 (home-page "https://pykafka.readthedocs.io/")
11257 (synopsis "Apache Kafka client for Python")
11258 (description
11259 "PyKafka is a client for the Apache Kafka distributed messaging system.
11260 It includes Python implementations of Kafka producers and consumers, which
11261 are optionally backed by a C extension built on librdkafka.")
11262 (license license:asl2.0)))
11263
11264 (define-public python2-pykafka
11265 (package-with-python2 python-pykafka))
11266
11267 (define-public python-wcwidth
11268 (package
11269 (name "python-wcwidth")
11270 (version "0.1.7")
11271 (source
11272 (origin
11273 (method url-fetch)
11274 (uri (pypi-uri "wcwidth" version))
11275 (sha256
11276 (base32
11277 "0pn6dflzm609m4r3i8ik5ni9ijjbb5fa3vg1n7hn6vkd49r77wrx"))))
11278 (build-system python-build-system)
11279 (home-page "https://github.com/jquast/wcwidth")
11280 (synopsis "Measure number of terminal column cells of wide-character codes")
11281 (description "Wcwidth measures the number of terminal column cells of
11282 wide-character codes. It is useful for those implementing a terminal emulator,
11283 or programs that carefully produce output to be interpreted by one. It is a
11284 Python implementation of the @code{wcwidth} and @code{wcswidth} C functions
11285 specified in POSIX.1-2001 and POSIX.1-2008.")
11286 (license license:expat)))
11287
11288 (define-public python2-wcwidth
11289 (package-with-python2 python-wcwidth))
11290
11291 (define-public python2-jsonrpclib
11292 (package
11293 (name "python2-jsonrpclib")
11294 (version "0.1.7")
11295 (source (origin
11296 (method url-fetch)
11297 (uri (string-append
11298 "https://pypi.python.org/packages/source/j/jsonrpclib/"
11299 "jsonrpclib-" version ".tar.gz"))
11300 (sha256
11301 (base32
11302 "02vgirw2bcgvpcxhv5hf3yvvb4h5wzd1lpjx8na5psdmaffj6l3z"))))
11303 (build-system python-build-system)
11304 (arguments
11305 `(#:tests? #f
11306 #:python ,python-2))
11307 (home-page "https://github.com/joshmarshall/jsonrpclib/")
11308 (synopsis "Implementation of JSON-RPC specification for Python")
11309 (description
11310 "This library is an implementation of the JSON-RPC specification.
11311 It supports both the original 1.0 specification, as well as the
11312 new (proposed) 2.0 spec, which includes batch submission, keyword arguments,
11313 etc.")
11314 (license license:asl2.0)))
11315
11316 (define-public python-chai
11317 (package
11318 (name "python-chai")
11319 (version "1.1.1")
11320 (source (origin
11321 (method url-fetch)
11322 (uri (pypi-uri "chai" version))
11323 (sha256
11324 (base32
11325 "016kf3irrclpkpvcm7q0gmkfibq7jgy30a9v73pp42bq9h9a32bl"))))
11326 (build-system python-build-system)
11327 (home-page "https://github.com/agoragames/chai")
11328 (synopsis "Mocking framework for Python")
11329 (description
11330 "Chai provides an api for mocking, stubbing and spying your python
11331 objects, patterned after the Mocha library for Ruby.")
11332 (license license:bsd-3)))
11333
11334 (define-public python2-chai
11335 (package-with-python2 python-chai))
11336
11337 (define-public python-arrow
11338 (package
11339 (name "python-arrow")
11340 (version "0.8.0")
11341 (source (origin
11342 (method url-fetch)
11343 (uri (pypi-uri "arrow" version))
11344 (sha256
11345 (base32
11346 "1bz7hkdgpqcjs866y58z8jywpy7al0f4rxdr00bh2l5qddyw245j"))))
11347 (build-system python-build-system)
11348 (native-inputs
11349 `(;; For testing
11350 ("python-chai" ,python-chai)
11351 ("python-simplejson" ,python-simplejson)))
11352 (propagated-inputs
11353 `(("python-dateutil" ,python-dateutil)))
11354 (home-page "https://github.com/crsmithdev/arrow/")
11355 (synopsis "Dates and times for Python")
11356 (description
11357 "Arrow is a Python library to creating, manipulating, formatting and
11358 converting dates, times, and timestamps. It implements and updates the
11359 datetime type.")
11360 (license license:asl2.0)))
11361
11362 (define-public python2-arrow
11363 (package-with-python2 python-arrow))
11364
11365 (define-public python-inflection
11366 (package
11367 (name "python-inflection")
11368 (version "0.3.1")
11369 (source
11370 (origin (method url-fetch)
11371 (uri (pypi-uri "inflection" version))
11372 (sha256
11373 (base32
11374 "1jhnxgnw8y3mbzjssixh6qkc7a3afc4fygajhqrqalnilyvpzshq"))))
11375 (build-system python-build-system)
11376 (native-inputs
11377 `(("python-pytest" ,python-pytest)))
11378 (home-page "https://github.com/jpvanhal/inflection")
11379 (synopsis "Python string transformation library")
11380 (description
11381 "Inflection is a string transformation library. It singularizes
11382 and pluralizes English words, and transforms strings from CamelCase to
11383 underscored string.")
11384 (license license:expat)))
11385
11386 (define-public python2-inflection
11387 (package-with-python2 python-inflection))
11388
11389 (define-public python-pylev
11390 (package
11391 (name "python-pylev")
11392 (version "1.3.0")
11393 (source (origin
11394 (method url-fetch)
11395 (uri (pypi-uri "pylev" version))
11396 (sha256
11397 (base32
11398 "1hz1x9blsbxya1y9nnhnwwdnqmakxi9mc0jkwj0rn6b1h44i0f86"))))
11399 (build-system python-build-system)
11400 (home-page "https://github.com/toastdriven/pylev")
11401 (synopsis "Levenshtein distance implementation in Python")
11402 (description "Pure Python Levenshtein implementation, based off the
11403 Wikipedia code samples at
11404 @url{http://en.wikipedia.org/wiki/Levenshtein_distance}.")
11405 (license license:bsd-3)))
11406
11407 (define-public python2-pylev
11408 (package-with-python2 python-pylev))
11409
11410 (define-public python-cleo
11411 (package
11412 (name "python-cleo")
11413 (version "0.4.1")
11414 (source (origin
11415 (method url-fetch)
11416 (uri (pypi-uri "cleo" version))
11417 (sha256
11418 (base32
11419 "1k2dcl6mqpn5bljyl6w42rqyd9mb3y9kh2mg7m2x3kfjwvg0rpva"))))
11420 (build-system python-build-system)
11421 (native-inputs
11422 `(;; For testing
11423 ("python-mock" ,python-mock)
11424 ("python-pytest" ,python-pytest)))
11425 (propagated-inputs
11426 `(("python-psutil" ,python-psutil)
11427 ("python-pylev" ,python-pylev)))
11428 (home-page "https://github.com/sdispater/cleo")
11429 (synopsis "Command-line arguments library for Python")
11430 (description
11431 "Cleo allows you to create command-line commands with signature in
11432 docstring and colored output.")
11433 (license license:expat)))
11434
11435 (define-public python2-cleo
11436 (package-with-python2 python-cleo))
11437
11438 (define-public python-lazy-object-proxy
11439 (package
11440 (name "python-lazy-object-proxy")
11441 (version "1.2.2")
11442 (source (origin
11443 (method url-fetch)
11444 (uri (pypi-uri "lazy-object-proxy" version))
11445 (sha256
11446 (base32
11447 "0s22aqqkdscyh8sjspyyax7qa1aiz8p4midrnyf39717fhfczm6x"))))
11448 (build-system python-build-system)
11449 (home-page "https://github.com/ionelmc/python-lazy-object-proxy")
11450 (synopsis "Lazy object proxy for python")
11451 (description
11452 "Lazy object proxy is an object that wraps a callable but defers the call
11453 until the object is actually required, and caches the result of said call.")
11454 (license license:bsd-2)))
11455
11456 (define-public python2-lazy-object-proxy
11457 (package-with-python2 python-lazy-object-proxy))
11458
11459 (define-public python-dnspython
11460 (package
11461 (name "python-dnspython")
11462 (version "1.15.0")
11463 (source (origin
11464 (method url-fetch)
11465 (uri (string-append "http://www.dnspython.org/kits/"
11466 version "/dnspython-" version ".tar.gz"))
11467 (sha256
11468 (base32
11469 "0jr4v2pd90i6l1xxbss2m05psbjaxvyvvvpq44wycijpfgjqln8i"))))
11470 (build-system python-build-system)
11471 (arguments '(#:tests? #f)) ; XXX: requires internet access
11472 (home-page "http://www.dnspython.org")
11473 (synopsis "DNS toolkit for Python")
11474 (description
11475 "dnspython is a DNS toolkit for Python. It supports almost all record
11476 types. It can be used for queries, zone transfers, and dynamic updates.
11477 It supports TSIG authenticated messages and EDNS0.")
11478 (license license:expat)))
11479
11480 (define-public python2-dnspython
11481 (package-with-python2 python-dnspython))
11482
11483 (define-public python-email-validator
11484 (package
11485 (name "python-email-validator")
11486 (version "1.0.2")
11487 (source
11488 (origin (method url-fetch)
11489 (uri (pypi-uri "email_validator" version))
11490 (sha256
11491 (base32
11492 "1ja9149l9ck5n45a72h3is7v476hjny5ybxbcamx1nw6iplsm7k6"))))
11493 (build-system python-build-system)
11494 (arguments
11495 '(#:phases
11496 (modify-phases %standard-phases
11497 (add-before 'build 'use-dnspython
11498 (lambda _
11499 (substitute* "setup.py"
11500 (("dnspython3") "dnspython"))
11501 #t)))))
11502 (propagated-inputs
11503 `(("python-dnspython" ,python-dnspython)
11504 ("python-idna" ,python-idna)))
11505 (home-page "https://github.com/JoshData/python-email-validator")
11506 (synopsis "Email address validation library for Python")
11507 (description
11508 "This library validates email address syntax and deliverability.")
11509 (license license:cc0)))
11510
11511 (define-public python2-email-validator
11512 (package-with-python2 python-email-validator))
11513
11514 (define-public python-ukpostcodeparser
11515 (package
11516 (name "python-ukpostcodeparser")
11517 (version "1.0.3")
11518 (source (origin
11519 (method url-fetch)
11520 (uri (pypi-uri "UkPostcodeParser" version))
11521 (sha256
11522 (base32
11523 "1jwg9z4rz51mcka1821rwgycsd0mcicyp1kiwjfa2kvg8bm9p2qd"))))
11524 (build-system python-build-system)
11525 (home-page "https://github.com/hamstah/ukpostcodeparser")
11526 (synopsis "UK Postcode parser for Python")
11527 (description
11528 "This library provides the @code{parse_uk_postcode} function for
11529 parsing UK postcodes.")
11530 (license license:expat)))
11531
11532 (define-public python2-ukpostcodeparser
11533 (package-with-python2 python-ukpostcodeparser))
11534
11535 (define-public python-faker
11536 (package
11537 (name "python-faker")
11538 (version "0.7.9")
11539 (source (origin
11540 (method url-fetch)
11541 (uri (pypi-uri "Faker" version))
11542 (sha256
11543 (base32
11544 "1fh2p2yz0fsdr4fqwxgddwbvfb6qn6vp8yx0qwqzra27yq5d1wsm"))
11545 (patches
11546 (search-patches "python-faker-fix-build-32bit.patch"))
11547 (modules '((guix build utils)))
11548 (snippet
11549 '(begin
11550 (for-each delete-file (find-files "." "\\.pyc$"))
11551 #t))))
11552 (build-system python-build-system)
11553 (arguments
11554 '(#:phases
11555 (modify-phases %standard-phases
11556 (replace 'check
11557 (lambda _
11558 (zero? (system* "python" "-m" "unittest" "-v" "tests")))))))
11559 (native-inputs
11560 `(;; For testing
11561 ("python-email-validator" ,python-email-validator)
11562 ("python-mock" ,python-mock)
11563 ("python-ukpostcodeparser" ,python-ukpostcodeparser)))
11564 (propagated-inputs
11565 `(("python-dateutil" ,python-dateutil)
11566 ("python-six" ,python-six)))
11567 (home-page "https://github.com/joke2k/faker")
11568 (synopsis "Python package that generates fake data")
11569 (description
11570 "Faker is a Python package that generates fake data such as names,
11571 addresses, and phone numbers.")
11572 (license license:expat)
11573 (properties `((python2-variant . ,(delay python2-faker))))))
11574
11575 (define-public python2-faker
11576 (let ((base (package-with-python2 (strip-python2-variant
11577 python-faker))))
11578 (package
11579 (inherit base)
11580 (propagated-inputs
11581 `(("python2-ipaddress" ,python2-ipaddress)
11582 ,@(package-propagated-inputs base))))))
11583
11584 (define-public python-fake-factory
11585 (package
11586 (name "python-fake-factory")
11587 (version "0.7.2")
11588 (source (origin
11589 (method url-fetch)
11590 (uri (pypi-uri "fake-factory" version))
11591 (sha256
11592 (base32
11593 "0vs0dkmg0dlaxf8w6q2i3k0i03gmp56ablldv7ci9x3nbadkn71g"))
11594 (patches
11595 (search-patches
11596 "python-fake-factory-fix-build-32bit.patch"))))
11597 (build-system python-build-system)
11598 (arguments
11599 '(#:phases
11600 (modify-phases %standard-phases
11601 (replace 'check
11602 (lambda _
11603 (zero? (system* "python" "-m" "unittest" "-v" "faker.tests")))))))
11604 (native-inputs
11605 `(;; For testing
11606 ("python-email-validator" ,python-email-validator)
11607 ("python-mock" ,python-mock)
11608 ("python-ukpostcodeparser" ,python-ukpostcodeparser)))
11609 (propagated-inputs
11610 `(("python-dateutil" ,python-dateutil)
11611 ("python-six" ,python-six)))
11612 (home-page "https://github.com/joke2k/faker")
11613 (synopsis "Python package that generates fake data")
11614 (description
11615 "Faker is a Python package that generates fake data such as names,
11616 addresses, and phone numbers.")
11617 (license license:expat)
11618 (properties `((python2-variant . ,(delay python2-fake-factory))
11619 (superseded . ,python-faker)))))
11620
11621 (define-public python2-fake-factory
11622 (let ((base (package-with-python2 (strip-python2-variant
11623 python-fake-factory))))
11624 (package
11625 (inherit base)
11626 (properties `((superseded . ,python2-faker)))
11627 (propagated-inputs
11628 `(("python2-ipaddress" ,python2-ipaddress)
11629 ,@(package-propagated-inputs base))))))
11630
11631 (define-public python-pyaml
11632 (package
11633 (name "python-pyaml")
11634 (version "15.8.2")
11635 (source (origin
11636 (method url-fetch)
11637 (uri (pypi-uri "pyaml" version))
11638 (sha256
11639 (base32
11640 "1f5m28vkh4ksq3d80d8mmd2z8wxvc3mgy2pmrv2751dm2xgznm4w"))))
11641 (build-system python-build-system)
11642 (native-inputs
11643 `(("python-unidecode" ,python-unidecode)))
11644 (propagated-inputs
11645 `(("python-pyyaml" ,python-pyyaml)))
11646 (home-page "https://github.com/mk-fg/pretty-yaml")
11647 (synopsis "YAML pretty-print library for Python")
11648 (description
11649 "pyaml is a PyYAML based python module to produce pretty and readable
11650 YAML-serialized data.")
11651 (license (license:non-copyleft "http://www.wtfpl.net/txt/copying/"))))
11652
11653 (define-public python2-pyaml
11654 (package-with-python2 python-pyaml))
11655
11656 (define-public python-flexmock
11657 (package
11658 (name "python-flexmock")
11659 (version "0.10.2")
11660 (source (origin
11661 (method url-fetch)
11662 (uri (pypi-uri "flexmock" version))
11663 (sha256
11664 (base32
11665 "0arc6njvs6i9v9hgvzk5m50296g7zy5m9d7pyb43vdsdgxrci5gy"))))
11666 (build-system python-build-system)
11667 (home-page "https://flexmock.readthedocs.org")
11668 (synopsis "Testing library for Python")
11669 (description
11670 "flexmock is a testing library for Python that makes it easy to create
11671 mocks, stubs and fakes.")
11672 (license license:bsd-3)))
11673
11674 (define-public python2-flexmock
11675 (package-with-python2 python-flexmock))
11676
11677 (define-public python-orator
11678 (package
11679 (name "python-orator")
11680 (version "0.8.2")
11681 (source (origin
11682 (method url-fetch)
11683 (uri (pypi-uri "orator" version))
11684 (sha256
11685 (base32
11686 "1li49irsqha17nrda4nsb48biyy0rarp9pphf0jpqwm5zr8hv569"))))
11687 (build-system python-build-system)
11688 (arguments '(#:tests? #f)) ; no tests
11689 (propagated-inputs
11690 `(("python-arrow" ,python-arrow)
11691 ("python-blinker" ,python-blinker)
11692 ("python-cleo" ,python-cleo)
11693 ("python-faker" ,python-faker)
11694 ("python-inflection" ,python-inflection)
11695 ("python-lazy-object-proxy" ,python-lazy-object-proxy)
11696 ("python-pyaml" ,python-pyaml)
11697 ("python-simplejson" ,python-simplejson)
11698 ("python-wrapt" ,python-wrapt)))
11699 (home-page "https://orator-orm.com/")
11700 (synopsis "ActiveRecord ORM for Python")
11701 (description
11702 "Orator provides a simple ActiveRecord-like Object Relational Mapping
11703 implementation for Python.")
11704 (license license:expat)
11705 (properties `((python2-variant . ,(delay python2-orator))))))
11706
11707 (define-public python2-orator
11708 (let ((base (package-with-python2 (strip-python2-variant python-orator))))
11709 (package
11710 (inherit base)
11711 (propagated-inputs
11712 `(("python2-ipaddress" ,python2-ipaddress)
11713 ,@(package-propagated-inputs base))))))
11714
11715 (define-public python-prompt-toolkit
11716 (package
11717 (name "python-prompt-toolkit")
11718 (version "1.0.9")
11719 (source
11720 (origin
11721 (method url-fetch)
11722 (uri (pypi-uri "prompt_toolkit" version ".tar.gz"))
11723 (sha256
11724 (base32
11725 "172r15k9kwdw2lnajvpz1632dd16nqz1kcal1p0lq5ywdarj6rfd"))))
11726 (build-system python-build-system)
11727 (arguments
11728 '(#:tests? #f)) ; The test suite uses some Windows-specific data types.
11729 (propagated-inputs
11730 `(("python-wcwidth" ,python-wcwidth)
11731 ("python-six" ,python-six)
11732 ("python-pygments" ,python-pygments)))
11733 (home-page "https://github.com/jonathanslenders/python-prompt-toolkit")
11734 (synopsis "Library for building command line interfaces in Python")
11735 (description
11736 "Prompt-Toolkit is a library for building interactive command line
11737 interfaces in Python. It's like GNU Readline but it also features syntax
11738 highlighting while typing, out-of-the-box multi-line input editing, advanced
11739 code completion, incremental search, support for Chinese double-width
11740 characters, mouse support, and auto suggestions.")
11741 (license license:bsd-3)))
11742
11743 (define-public python2-prompt-toolkit
11744 (package-with-python2 python-prompt-toolkit))
11745
11746 (define-public python-jedi
11747 (package
11748 (name "python-jedi")
11749 (version "0.9.0")
11750 (source
11751 (origin
11752 (method url-fetch)
11753 (uri (pypi-uri "jedi" version))
11754 (sha256
11755 (base32
11756 "0c8x962ynpx001fdvp07m2q5jk4igkxbj3rmnydavphvlgxijk1v"))))
11757 (build-system python-build-system)
11758 (arguments
11759 ;; FIXME: One test fails (use "py.test" instead of 'setup.py test').
11760 '(#:tests? #f))
11761 (native-inputs
11762 `(("python-pytest" ,python-pytest)))
11763 (home-page "https://github.com/davidhalter/jedi")
11764 (synopsis
11765 "Autocompletion for Python that can be used for text editors")
11766 (description
11767 "Jedi is an autocompletion tool for Python that can be used for text editors.")
11768 (license license:expat)))
11769
11770 (define-public python2-jedi
11771 (package-with-python2 python-jedi))
11772
11773 (define-public ptpython
11774 (package
11775 (name "ptpython")
11776 (version "0.34")
11777 (source (origin
11778 (method url-fetch)
11779 (uri (pypi-uri "ptpython" version))
11780 (sha256
11781 (base32
11782 "1mmbiyzf0n8hm7z2a562x7w5cbl6jc0zsk6vp40q1z4cyblv1k13"))))
11783 (build-system python-build-system)
11784 (arguments
11785 '(#:tests? #f)) ; FIXME: No tests in pypi tarball.
11786 (propagated-inputs
11787 `(("python-docopt" ,python-docopt)
11788 ("python-jedi" ,python-jedi)
11789 ("python-prompt-toolkit" ,python-prompt-toolkit)
11790 ("python-pygments" ,python-pygments)))
11791 (home-page "https://github.com/jonathanslenders/ptpython")
11792 (synopsis "Python Read-Eval-Print-Loop with nice IDE-like features")
11793 (description
11794 "ptpython is a Python read-eval-print loop with IDE-like features.
11795 It supports syntax highlighting, multiline editing, autocompletion, mouse,
11796 color schemes, bracketed paste, Vi and Emacs keybindings, Chinese characters
11797 etc.")
11798 (license license:bsd-3)
11799 (properties `((python2-variant . ,(delay ptpython-2))))))
11800
11801 (define-public ptpython-2
11802 (let ((base (package-with-python2 (strip-python2-variant ptpython))))
11803 (package
11804 (inherit base)
11805 (name "ptpython2"))))
11806
11807 (define-public python-requests-oauthlib
11808 (package
11809 (name "python-requests-oauthlib")
11810 (version "0.6.2")
11811 (source
11812 (origin
11813 (method url-fetch)
11814 (uri (pypi-uri "requests-oauthlib" version))
11815 (sha256
11816 (base32
11817 "0ykff67sjcl227c23g0rxzfx34rr5bf21kwv0z3zmgk0lfmch7hn"))))
11818 (build-system python-build-system)
11819 (arguments
11820 `(#:phases
11821 (modify-phases %standard-phases
11822 ;; removes tests that require network access
11823 (add-before 'check 'pre-check
11824 (lambda _
11825 (delete-file "tests/test_core.py")
11826 #t)))))
11827 (native-inputs
11828 `(("python-requests-mock" ,python-requests-mock)
11829 ("python-mock" ,python-mock)))
11830 (propagated-inputs
11831 `(("python-oauthlib" ,python-oauthlib)
11832 ("python-requests" ,python-requests)))
11833 (home-page
11834 "https://github.com/requests/requests-oauthlib")
11835 (synopsis
11836 "OAuthlib authentication support for Requests")
11837 (description
11838 "Requests-OAuthlib uses the Python Requests and OAuthlib libraries to
11839 provide an easy-to-use Python interface for building OAuth1 and OAuth2 clients.")
11840 (license license:isc)))
11841
11842 (define-public python2-requests-oauthlib
11843 (package-with-python2 python-requests-oauthlib))
11844
11845 (define-public python-stem
11846 (package
11847 (name "python-stem")
11848 (version "1.5.4")
11849 (source
11850 (origin
11851 (method url-fetch)
11852 (uri (pypi-uri "stem" version))
11853 (sha256
11854 (base32
11855 "1j7pnblrn0yr6jmxvsq6y0ihmxmj5x50jl2n2606w67f6wq16j9n"))))
11856 (build-system python-build-system)
11857 (arguments
11858 `(#:phases
11859 (modify-phases %standard-phases
11860 (replace 'check
11861 (lambda _
11862 (zero? (system* "./run_tests.py" "--unit")))))))
11863 (native-inputs
11864 `(("python-mock" ,python-mock)
11865 ("python-pep8" ,python-pep8)
11866 ("python-pyflakes" ,python-pyflakes)))
11867 (home-page "https://stem.torproject.org/")
11868 (synopsis
11869 "Python controller library that allows applications to interact with Tor")
11870 (description
11871 "Stem is a Python controller library for Tor. With it you can use Tor's
11872 control protocol to script against the Tor process and read descriptor data
11873 relays publish about themselves.")
11874 (license license:lgpl3)))
11875
11876 (define-public python2-stem
11877 (package-with-python2 python-stem))
11878
11879 (define-public python-pyserial
11880 (package
11881 (name "python-pyserial")
11882 (version "3.1.1")
11883 (source
11884 (origin
11885 (method url-fetch)
11886 (uri (pypi-uri "pyserial" version))
11887 (sha256
11888 (base32
11889 "0k1nfdrxxkdlv4zgaqsdv8li0pj3gbh2pyxw8q2bsg6f9490amyn"))))
11890 (build-system python-build-system)
11891 (arguments
11892 '(#:tests? #f)) ; FIXME: 3/49 tests are failing.
11893 ;; #:phases
11894 ;; (modify-phases %standard-phases
11895 ;; (replace 'check
11896 ;; (lambda _
11897 ;; (zero? (system* "python" "test/run_all_tests.py" "loop://")))))))
11898 (home-page
11899 "https://github.com/pyserial/pyserial")
11900 (synopsis "Python Serial Port Bindings")
11901 (description "@code{pyserial} provide serial port bindings for Python. It
11902 supports different byte sizes, stop bits, parity and flow control with RTS/CTS
11903 and/or Xon/Xoff. The port is accessed in RAW mode.")
11904 (license license:bsd-3)))
11905
11906 (define-public python2-pyserial
11907 (package-with-python2 python-pyserial))
11908
11909 (define-public python-kivy
11910 (package
11911 (name "python-kivy")
11912 (version "1.9.1")
11913 (source
11914 (origin
11915 (method url-fetch)
11916 (uri (pypi-uri "kivy" version))
11917 (file-name (string-append name "-" version ".tar.gz"))
11918 (sha256
11919 (base32
11920 "0zk3g1j1z0lzcm9d0k1lprrs95zr8n8k5pdg3p5qlsn26jz4bg19"))))
11921 (build-system python-build-system)
11922 (arguments
11923 `(#:tests? #f ; Tests require many optional packages
11924 #:phases
11925 (modify-phases %standard-phases
11926 (replace 'build (lambda _ (zero? (system* "make" "force"))))
11927 (add-after 'patch-generated-file-shebangs 'set-sdl-paths
11928 (lambda* (#:key inputs #:allow-other-keys)
11929 (setenv "KIVY_SDL2_PATH"
11930 (string-append (assoc-ref inputs "sdl-union")
11931 "/include/SDL2"))
11932 #t)))))
11933 (native-inputs
11934 `(("pkg-config" ,pkg-config)
11935 ("python-cython" ,python-cython)))
11936 (inputs
11937 `(("gstreamer" ,gstreamer)
11938 ("mesa" ,mesa)
11939 ("sdl-union"
11940 ,(sdl-union (list sdl2 sdl2-image sdl2-mixer sdl2-ttf)))))
11941 (home-page "http://kivy.org")
11942 (synopsis
11943 "Multitouch application framework")
11944 (description
11945 "A software library for rapid development of
11946 hardware-accelerated multitouch applications.")
11947 (license license:expat)))
11948
11949 (define-public python2-kivy
11950 (package-with-python2 python-kivy))
11951
11952 (define-public python-kivy-next
11953 (let ((commit "a988c5e7a47da56263ff39514264a3de516ef2fe")
11954 (revision "1"))
11955 (package (inherit python-kivy)
11956 (name "python-kivy-next")
11957 (version (string-append "1.9.1-" revision "."
11958 (string-take commit 7)))
11959 (source
11960 (origin
11961 (method git-fetch)
11962 (uri (git-reference
11963 (url "https://github.com/kivy/kivy")
11964 (commit commit)))
11965 (file-name (string-append name "-" version "-checkout"))
11966 (sha256
11967 (base32
11968 "0jk92b4a8l7blkvkgkjihk171s0dfnq582cckff5srwc8kal5m0p")))))))
11969
11970 (define-public python2-kivy-next
11971 (package-with-python2 python-kivy-next))
11972
11973 (define-public python-binaryornot
11974 (package
11975 (name "python-binaryornot")
11976 (version "0.4.0")
11977 (source (origin
11978 (method url-fetch)
11979 (uri (pypi-uri "binaryornot" version))
11980 (sha256
11981 (base32
11982 "1j4f51dxic39mdwf6alj7gd769wy6mhk916v031wjali51xkh3xb"))))
11983 (build-system python-build-system)
11984 (propagated-inputs
11985 `(("python-chardet" ,python-chardet)
11986 ("python-hypothesis" ,python-hypothesis)))
11987 (home-page "https://github.com/audreyr/binaryornot")
11988 (synopsis "Package to check if a file is binary or text")
11989 (description "Ultra-lightweight pure Python package to check if a file is
11990 binary or text.")
11991 (license license:bsd-3)
11992 (properties `((python2-variant . ,(delay python2-binaryornot))))))
11993
11994 (define-public python2-binaryornot
11995 (let ((base (package-with-python2 (strip-python2-variant python-binaryornot))))
11996 (package (inherit base)
11997 (propagated-inputs
11998 `(("python2-enum34" ,python2-enum34)
11999 ,@(package-propagated-inputs base))))))
12000
12001 (define-public python-nltk
12002 (package
12003 (name "python-nltk")
12004 (version "3.2.1")
12005 (source (origin
12006 (method url-fetch)
12007 (uri (pypi-uri "nltk" version))
12008 (sha256
12009 (base32
12010 "0skxbhnymwlspjkzga0f7x1hg3y50fwpfghs8g8k7fh6f4nknlym"))))
12011 (build-system python-build-system)
12012 (arguments
12013 '(;; The tests require some extra resources to be downloaded.
12014 ;; TODO Try packaging these resources.
12015 #:tests? #f))
12016 (home-page "http://nltk.org/")
12017 (synopsis "Natural Language Toolkit")
12018 (description "It provides interfaces to over 50 corpora and lexical
12019 resources such as WordNet, along with a suite of text processing libraries
12020 for classification, tokenization, stemming, tagging, parsing, and semantic
12021 reasoning, wrappers for natural language processing libraries.")
12022 (license license:asl2.0)))
12023
12024 (define-public python2-nltk
12025 (package-with-python2 python-nltk))
12026
12027 (define-public python-pymongo
12028 (package
12029 (name "python-pymongo")
12030 (version "3.3.0")
12031 (source (origin
12032 (method url-fetch)
12033 (uri (pypi-uri "pymongo" version))
12034 (sha256
12035 (base32
12036 "07mra6w86wjqy4lx5fvimidjhhfzd562gfjn8grsnbv2q8pk0i9x"))))
12037 (build-system python-build-system)
12038 (propagated-inputs
12039 `(("python-certifi" ,python-certifi)))
12040 (home-page "https://github.com/mongodb/mongo-python-driver")
12041 (synopsis "Python driver for MongoDB")
12042 (description "Python driver for MongoDB.")
12043 (license license:asl2.0)))
12044
12045 (define-public python2-pymongo
12046 (package-with-python2 python-pymongo))
12047
12048 (define-public python-sh
12049 (package
12050 (name "python-sh")
12051 (version "1.11")
12052 (source (origin
12053 (method url-fetch)
12054 (uri (pypi-uri "sh" version))
12055 (sha256
12056 (base32
12057 "192r0mpv6dmkysjzhc43ddffiwb5g7c76bgr1mb1z2xz9awbj3sr"))))
12058 (build-system python-build-system)
12059 (arguments
12060 `(#:tests? #f)) ; no tests
12061 (home-page "https://github.com/amoffat/sh")
12062 (synopsis "Python subprocess interface")
12063 (description "Abstracts process invocation by providing a function
12064 interface for programs.")
12065 (license license:expat)))
12066
12067 (define-public python2-sh
12068 (package-with-python2 python-sh))
12069
12070 (define-public python-consul
12071 (package
12072 (name "python-consul")
12073 (version "0.6.1")
12074 (source
12075 (origin
12076 (method url-fetch)
12077 (uri (pypi-uri "python-consul" version))
12078 (sha256
12079 (base32
12080 "0rfyxcy4cr3x848vhx876ifalxd5ghq6l5x813m49h4vq2d4jiq8"))))
12081 (build-system python-build-system)
12082 (native-inputs
12083 `(("python-pytest" ,python-pytest)))
12084 (propagated-inputs
12085 `(("python-requests" ,python-requests)
12086 ("python-six" ,python-six)))
12087 (home-page "https://github.com/cablehead/python-consul")
12088 (synopsis "Python client for Consul")
12089 (description
12090 "Python client for @url{http://www.consul.io/,Consul}, a tool for service
12091 discovery, monitoring and configuration.")
12092 (license license:expat)))
12093
12094 (define-public python2-consul
12095 (package-with-python2 python-consul))
12096
12097 (define-public python-schematics
12098 (package
12099 (name "python-schematics")
12100 (version "1.1.1")
12101 (source
12102 (origin
12103 (method url-fetch)
12104 (uri (string-append
12105 "https://github.com/schematics/schematics/archive/v" version ".tar.gz"))
12106 (file-name (string-append name "-" version ".tar.gz"))
12107 (sha256
12108 (base32
12109 "19v1i69bf3bzarfxmbv0v6ivpcn758x3shvbiy9l2hy0lvqwnp6l"))))
12110 (build-system python-build-system)
12111 (propagated-inputs
12112 `(("python-six" ,python-six)))
12113 (arguments
12114 `(#:tests? #f)) ; requires a bunch of not very nice packages with fixed
12115 ; version requirements (eg python-coveralls)
12116 (home-page "https://github.com/schematics/schematics")
12117 (synopsis "Python Data Structures for Humans")
12118 (description "Python Data Structures for Humans.")
12119 (license license:bsd-3)))
12120
12121 (define-public python2-schematics
12122 (package-with-python2 python-schematics))
12123
12124 (define-public python-publicsuffix
12125 (package
12126 (name "python-publicsuffix")
12127 (version "1.1.0")
12128 (source (origin
12129 (method url-fetch)
12130 (uri (pypi-uri "publicsuffix" version))
12131 (sha256
12132 (base32
12133 "1adx520249z2cy7ykwjr1k190mn2888wqn9jf8qm27ly4qymjxxf"))))
12134 (build-system python-build-system)
12135 (arguments
12136 `(#:tests? #f)) ; tests use the internet
12137 (home-page "https://www.tablix.org/~avian/git/publicsuffix.git")
12138 (synopsis "Get suffix for a domain name")
12139 (description "Get a public suffix for a domain name using the Public Suffix
12140 List.")
12141 (license license:expat)))
12142
12143 (define-public python2-publicsuffix
12144 (package-with-python2 python-publicsuffix))
12145
12146 (define-public python-publicsuffix2
12147 (package
12148 (name "python-publicsuffix2")
12149 (version "2.20160818")
12150 (source
12151 (origin
12152 (method url-fetch)
12153 (uri (pypi-uri "publicsuffix2" version ".tar.bz2"))
12154 (sha256
12155 (base32
12156 "1bb55yka9vkn7i6y1kjzxa516kh6v4gsrxa90w5wdz5p5n968r68"))))
12157 (build-system python-build-system)
12158 (arguments
12159 '(#:tests? #f)) ; The test suite requires network access.
12160 (home-page "https://github.com/pombredanne/python-publicsuffix2")
12161 (synopsis "Get a public suffix for a domain name using the Public Suffix List")
12162 (description "Get a public suffix for a domain name using the Public Suffix
12163 List. Forked from and using the same API as the publicsuffix package.")
12164 (license (list license:expat license:mpl2.0))))
12165
12166 (define-public python2-publicsuffix2
12167 (package-with-python2 python-publicsuffix2))
12168
12169 (define-public python-url
12170 (package
12171 (name "python-url")
12172 (version "0.2.0")
12173 (source (origin
12174 (method url-fetch)
12175 (uri (pypi-uri "url" version))
12176 (sha256
12177 (base32
12178 "0v879yadcz9qxfl41ak6wkga1kimp9cflla9ddz03hjjvgkqy5ki"))))
12179 (build-system python-build-system)
12180 (propagated-inputs
12181 `(("python-publicsuffix" ,python-publicsuffix)))
12182 (native-inputs
12183 `(("python-coverage" ,python-coverage)
12184 ("python-nose" ,python-nose)))
12185 (arguments
12186 `(#:tests? #f)) ; FIXME: tests fail with "ImportError: No module named 'tests'"
12187 (home-page "https://github.com/seomoz/url-py")
12188 (synopsis "URL Parsing")
12189 (description "Library for parsing urls.")
12190 (license license:expat)
12191 (properties `((python2-variant . ,(delay python2-url))))))
12192
12193 (define-public python2-url
12194 (let ((base (package-with-python2 (strip-python2-variant python-url))))
12195 (package (inherit base)
12196 (propagated-inputs
12197 `(("python2-publicsuffix" ,python2-publicsuffix))))))
12198
12199 (define-public python-freezegun
12200 (package
12201 (name "python-freezegun")
12202 (version "0.3.8")
12203 (source
12204 (origin
12205 (method url-fetch)
12206 (uri (pypi-uri "freezegun" version))
12207 (sha256
12208 (base32
12209 "1sf38d3ibv1jhhvr52x7dhrsiyqk1hm165dfv8w8wh0fhmgxg151"))))
12210 (build-system python-build-system)
12211 (native-inputs
12212 `(("python-mock" ,python-mock)
12213 ("python-nose" ,python-nose)
12214 ("python-coverage" ,python-coverage)))
12215 (propagated-inputs
12216 `(("python-six" ,python-six)
12217 ("python-dateutil" ,python-dateutil)))
12218 (arguments
12219 `(#:phases (modify-phases %standard-phases
12220 ;; The tests are normally executed via `make test`, but the PyPi
12221 ;; package does not include the Makefile.
12222 (replace 'check
12223 (lambda _
12224 (zero? (system* "nosetests" "./tests/")))))))
12225 (home-page "https://github.com/spulec/freezegun")
12226 (synopsis "Test utility for mocking the datetime module")
12227 (description
12228 "FreezeGun is a library that allows your python tests to travel through
12229 time by mocking the datetime module.")
12230 (license license:asl2.0)))
12231
12232 (define-public python2-freezegun
12233 (package-with-python2 python-freezegun))
12234
12235
12236 (define-public python-odfpy
12237 (package
12238 (name "python-odfpy")
12239 (version "1.3.3")
12240 (source (origin
12241 (method url-fetch)
12242 (uri (pypi-uri "odfpy" version))
12243 (sha256
12244 (base32
12245 "1a6ms0w9zfhhkqhvrnynwwbxrivw6hgjc0s5k7j06npc7rq0blxw"))))
12246 (arguments
12247 `(#:modules ((srfi srfi-1)
12248 (guix build python-build-system)
12249 (guix build utils))
12250 #:phases
12251 (modify-phases %standard-phases
12252 (replace 'check
12253 ;; The test runner invokes python2 and python3 for test*.py.
12254 ;; To avoid having both in inputs, we replicate it here.
12255 (lambda _
12256 (every (lambda (test-file)
12257 (zero? (system* "python" test-file)))
12258 (find-files "tests" "^test.*\\.py$")))))))
12259 (build-system python-build-system)
12260 (home-page "https://github.com/eea/odfpy")
12261 (synopsis "Python API and tools to manipulate OpenDocument files")
12262 (description "Collection of libraries and utility programs written in
12263 Python to manipulate OpenDocument 1.2 files.")
12264 (license
12265 ;; The software is mainly dual GPL2+ and ASL2.0, but includes a
12266 ;; number of files with other licenses.
12267 (list license:gpl2+ license:asl2.0 license:lgpl2.1+ license:cc-by-sa3.0))))
12268
12269 (define-public python2-odfpy
12270 (package-with-python2 python-odfpy))
12271
12272 (define-public python-cachecontrol
12273 (package
12274 (name "python-cachecontrol")
12275 (version "0.11.6")
12276 (source
12277 (origin
12278 (method url-fetch)
12279 ;; Pypi does not have tests.
12280 (uri (string-append
12281 "https://github.com/ionrock/cachecontrol/archive/v"
12282 version ".tar.gz"))
12283 (file-name (string-append name "-" version ".tar.gz"))
12284 (sha256
12285 (base32
12286 "0yj60d0f69a2l8p7y86k4zhzzm6rnxpq74sfl240pry9l0lfw2vw"))))
12287 (build-system python-build-system)
12288 (arguments
12289 `(#:phases
12290 (modify-phases %standard-phases
12291 (replace 'check
12292 (lambda _
12293 ;; Drop test that requires internet access.
12294 (delete-file "tests/test_regressions.py")
12295 (setenv "PYTHONPATH"
12296 (string-append (getcwd) "/build/lib:"
12297 (getenv "PYTHONPATH")))
12298 (zero? (system* "py.test" "-vv")))))))
12299 (native-inputs
12300 `(("python-pytest" ,python-pytest)
12301 ("python-redis" ,python-redis)
12302 ("python-webtest" ,python-webtest)
12303 ("python-mock" ,python-mock)))
12304 (propagated-inputs
12305 `(("python-requests" ,python-requests)
12306 ("python-lockfile" ,python-lockfile)))
12307 (home-page "https://github.com/ionrock/cachecontrol")
12308 (synopsis "The httplib2 caching algorithms for use with requests")
12309 (description "CacheControl is a port of the caching algorithms in
12310 @code{httplib2} for use with @code{requests} session objects.")
12311 (license license:asl2.0)))
12312
12313 (define-public python2-cachecontrol
12314 (package-with-python2 python-cachecontrol))
12315
12316 (define-public python-lit
12317 (package
12318 (name "python-lit")
12319 (version "0.5.0")
12320 (source
12321 (origin
12322 (method url-fetch)
12323 (uri (pypi-uri "lit" version))
12324 (sha256
12325 (base32
12326 "135m2b9cwih85g66rjggavck328z7lj37srgpq3jxszbg0g2b91y"))))
12327 (build-system python-build-system)
12328 (home-page "http://llvm.org/")
12329 (synopsis "LLVM Software Testing Tool")
12330 (description "@code{lit} is a portable tool for executing LLVM and Clang
12331 style test suites, summarizing their results, and providing indication of
12332 failures.")
12333 (license license:ncsa)))
12334
12335 (define-public python2-lit
12336 (package-with-python2 python-lit))
12337
12338 (define-public python-pytest-pep8
12339 (package
12340 (name "python-pytest-pep8")
12341 (version "1.0.6")
12342 (source (origin
12343 (method url-fetch)
12344 (uri (pypi-uri "pytest-pep8" version))
12345 (sha256
12346 (base32
12347 "06032agzhw1i9d9qlhfblnl3dw5hcyxhagn7b120zhrszbjzfbh3"))))
12348 (build-system python-build-system)
12349 (arguments
12350 `(#:tests? #f)) ; Fails with recent pytest and pep8. See upstream issues #8 and #12.
12351 (native-inputs
12352 `(("python-pytest" ,python-pytest)))
12353 (propagated-inputs
12354 `(("python-pep8" ,python-pep8)))
12355 (home-page "https://bitbucket.org/pytest-dev/pytest-pep8")
12356 (synopsis "Py.test plugin to check PEP8 requirements")
12357 (description "Pytest plugin for checking PEP8 compliance.")
12358 (license license:expat)))
12359
12360 (define-public python2-pytest-pep8
12361 (package-with-python2 python-pytest-pep8))
12362
12363 (define-public python-pytest-flakes
12364 (package
12365 (name "python-pytest-flakes")
12366 (version "1.0.1")
12367 (source (origin
12368 (method url-fetch)
12369 (uri (pypi-uri "pytest-flakes" version))
12370 (sha256
12371 (base32
12372 "0flag3n33kbhyjrhzmq990rvg4yb8hhhl0i48q9hw0ll89jp28lw"))))
12373 (build-system python-build-system)
12374 (arguments
12375 `(#:phases
12376 (modify-phases %standard-phases
12377 (delete 'check)
12378 (add-after 'install 'check
12379 (lambda* (#:key outputs inputs #:allow-other-keys)
12380 ;; It's easier to run tests after install.
12381 ;; Make installed package available for running the tests
12382 (add-installed-pythonpath inputs outputs)
12383 (zero? (system* "py.test" "-vv")))))))
12384 (native-inputs
12385 `(("python-coverage" ,python-coverage)
12386 ("python-pytest" ,python-pytest)
12387 ("python-pytest-cache" ,python-pytest-cache)
12388 ("python-pytest-pep8" ,python-pytest-pep8)))
12389 (propagated-inputs
12390 `(("python-pyflakes" ,python-pyflakes)))
12391 (home-page "https://github.com/fschulze/pytest-flakes")
12392 (synopsis "Py.test plugin to check source code with pyflakes")
12393 (description "Pytest plugin for checking Python source code with pyflakes.")
12394 (license license:expat)))
12395
12396 (define-public python2-pytest-flakes
12397 (package-with-python2 python-pytest-flakes))
12398
12399 (define-public python-natsort
12400 (package
12401 (name "python-natsort")
12402 (version "5.0.2")
12403 (source (origin
12404 (method url-fetch)
12405 (uri (pypi-uri "natsort" version))
12406 (sha256
12407 (base32
12408 "0bh6j0l8iapjnsgg3bs6q075cnzjl6zw1vlgqyv3qrygm2cxypkn"))))
12409 (build-system python-build-system)
12410 (arguments
12411 `(#:phases
12412 (modify-phases %standard-phases
12413 (add-before 'check 'set-cachedir
12414 ;; Tests require write access to $HOME by default
12415 (lambda _ (setenv "PYTHON_EGG_CACHE" "/tmp") #t)))))
12416 (native-inputs
12417 `(("python-hypothesis" ,python-hypothesis)
12418 ("python-pytest-cache" ,python-pytest-cache)
12419 ("python-pytest-cov" ,python-pytest-cov)
12420 ("python-pytest-flakes" ,python-pytest-flakes)
12421 ("python-pytest-pep8" ,python-pytest-pep8)))
12422 (propagated-inputs ; TODO: Add python-fastnumbers.
12423 `(("python-pyicu" ,python-pyicu)))
12424 (home-page "https://github.com/SethMMorton/natsort")
12425 (synopsis "Natural sorting for python and shell")
12426 (description
12427 "Natsort lets you apply natural sorting on lists instead of
12428 lexicographical. If you use the built-in @code{sorted} method in python
12429 on a list such as @code{['a20', 'a9', 'a1', 'a4', 'a10']}, it would be
12430 returned as @code{['a1', 'a10', 'a20', 'a4', 'a9']}. Natsort provides a
12431 function @code{natsorted} that identifies numbers and sorts them separately
12432 from strings. It can also sort version numbers, real numbers, mixed types
12433 and more, and comes with a shell command @command{natsort} that exposes this
12434 functionality in the command line.")
12435 (license license:expat)
12436 (properties `((python2-variant . ,(delay python2-natsort))))))
12437
12438 (define-public python2-natsort
12439 (let ((base (package-with-python2 (strip-python2-variant python-natsort))))
12440 (package (inherit base)
12441 (native-inputs
12442 `(("python2-pathlib" ,python2-pathlib)
12443 ("python2-mock" ,python2-mock)
12444 ("python2-enum34" ,python2-enum34)
12445 ,@(package-native-inputs base))))))
12446
12447 (define-public python-glances
12448 (package
12449 (name "python-glances")
12450 (version "2.7.1")
12451 (source
12452 (origin
12453 (method url-fetch)
12454 (uri (pypi-uri "Glances" version))
12455 (sha256
12456 (base32
12457 "11jbq40g8alsbirnd4kiagznqg270247i0m8qhi48ldf2i5xppxg"))))
12458 (build-system python-build-system)
12459 (propagated-inputs
12460 `(("python-psutil" ,python-psutil)))
12461 (home-page
12462 "https://github.com/nicolargo/glances")
12463 (synopsis
12464 "A cross-platform curses-based monitoring tool")
12465 (description
12466 "Glances is a curses-based monitoring tool for a wide variety of platforms.
12467 Glances uses the PsUtil library to get information from your system. It monitors
12468 CPU, load, memory, network bandwidth, disk I/O, disk use, and more.")
12469 (license license:lgpl3+)))
12470
12471 (define-public python2-glances
12472 (package-with-python2 python-glances))
12473
12474 (define-public python-graphql-core
12475 (package
12476 (name "python-graphql-core")
12477 (version "0.5.3")
12478 (source
12479 (origin
12480 (method url-fetch)
12481 (uri (pypi-uri "graphql-core" version))
12482 (sha256
12483 (base32
12484 "0rsaarx2sj4xnw9966rhh4haiqaapm4lm2mfqm48ywd51j5vh1a0"))))
12485 (build-system python-build-system)
12486 (arguments
12487 `(#:tests? #f ; Tests require the unpackaged pytest-benchmark.
12488 #:phases
12489 (modify-phases %standard-phases
12490 (add-after 'unpack 'patch-hardcoded-version
12491 (lambda _ (substitute*
12492 "setup.py"
12493 (("'gevent==1.1rc1'") "'gevent'"))
12494 #t)))))
12495 (native-inputs
12496 `(("python-gevent" ,python-gevent)
12497 ("python-mock" ,python-mock)
12498 ("python-pytest-mock" ,python-pytest-mock)))
12499 (propagated-inputs
12500 `(("python-promise" ,python-promise)
12501 ("python-six" ,python-six)))
12502 (home-page "https://github.com/graphql-python/graphql-core")
12503 (synopsis "GraphQL implementation for Python")
12504 (description
12505 "GraphQL implementation for Python. GraphQL is a data query language and
12506 runtime designed and used to request and deliver data to mobile and web apps.
12507 This library is a port of @url{https://github.com/graphql/graphql-js,graphql-js}
12508 to Python.")
12509 (license license:expat)))
12510
12511 (define-public python2-graphql-core
12512 (package-with-python2 python-graphql-core))
12513
12514 (define-public python-graphql-relay
12515 (package
12516 (name "python-graphql-relay")
12517 (version "0.4.5")
12518 (source
12519 (origin
12520 (method url-fetch)
12521 (uri (pypi-uri "graphql-relay" version))
12522 (sha256
12523 (base32
12524 "1nv5dxcj59zv31qvl8bd142njmxcmymny2dz3br1l2cpbljbf5i7"))))
12525 (build-system python-build-system)
12526 (native-inputs
12527 `(("python-pytest" ,python-pytest)))
12528 (propagated-inputs
12529 `(("python-graphql-core" ,python-graphql-core)
12530 ("python-promise" ,python-promise)
12531 ("python-six" ,python-six)))
12532 (home-page "https://github.com/graphql-python/graphql-relay-py")
12533 (synopsis "Relay implementation for Python")
12534 (description
12535 "This is a library to allow the easy creation of Relay-compliant servers
12536 using the GraphQL Python reference implementation of a GraphQL server. It
12537 should be noted that the code is a exact port of the original
12538 @url{https://github.com/graphql/graphql-relay-js,graphql-relay js implementation}
12539 from Facebook.")
12540 (license license:expat)))
12541
12542 (define-public python2-graphql-relay
12543 (package-with-python2 python-graphql-relay))
12544
12545 (define-public python-graphene
12546 (package
12547 (name "python-graphene")
12548 (version "0.10.2")
12549 (source
12550 (origin
12551 (method url-fetch)
12552 (uri (pypi-uri "graphene" version))
12553 (sha256
12554 (base32
12555 "09zhac7igh9ixdz0ay6csy35b40l1jwbf2wrbxmgxwfhy51iy06q"))))
12556 (build-system python-build-system)
12557 (native-inputs
12558 `(("python-django-filter" ,python-django-filter)
12559 ("python-mock" ,python-mock)
12560 ("python-psycopg2" ,python-psycopg2)
12561 ("python-pytest-django" ,python-pytest-django)
12562 ("python-sqlalchemy-utils" ,python-sqlalchemy-utils)))
12563 (propagated-inputs
12564 `(("python-graphql-core" ,python-graphql-core)
12565 ("python-graphql-relay" ,python-graphql-relay)
12566 ("python-iso8601" ,python-iso8601)
12567 ("python-promise" ,python-promise)
12568 ("python-six" ,python-six)))
12569 (home-page "http://graphene-python.org/")
12570 (synopsis "GraphQL Framework for Python")
12571 (description
12572 "Graphene is a Python library for building GraphQL schemas/types.
12573 A GraphQL schema describes your data model, and provides a GraphQL server
12574 with an associated set of resolve methods that know how to fetch data.")
12575 (properties `((python2-variant . ,(delay python2-graphene))))
12576 (license license:expat)))
12577
12578 (define-public python2-graphene
12579 (let ((base (package-with-python2
12580 (strip-python2-variant python-graphene))))
12581 (package (inherit base)
12582 (native-inputs
12583 `(("python2-sqlalchemy" ,python2-sqlalchemy)
12584 ,@(package-native-inputs base))))))
12585
12586 (define-public python-nautilus
12587 (package
12588 (name "python-nautilus")
12589 (version "0.4.9")
12590 (source
12591 (origin
12592 (method url-fetch)
12593 (uri (pypi-uri "nautilus" version))
12594 (sha256
12595 (base32
12596 "01hwzjc1zshk4vvxrcghm398fpy4jls66dyz06g07mrwqif8878p"))))
12597 (build-system python-build-system)
12598 (arguments `(#:tests? #f)) ; fails to import test modules
12599 (propagated-inputs
12600 `(("python-bcrypt" ,python-bcrypt)
12601 ("python-click" ,python-click)
12602 ("python-consul" ,python-consul)
12603 ("python-graphene" ,python-graphene)
12604 ("python-jinja2" ,python-jinja2)
12605 ("python-peewee" ,python-peewee)
12606 ("python-pika" ,python-pika)
12607 ("python-tornado" ,python-tornado)
12608 ("python-wtforms" ,python-wtforms)))
12609 (native-inputs
12610 `(("python-nose2" ,python-nose2)))
12611 (home-page "https://github.com/AlecAivazis/nautilus")
12612 (synopsis "Library for creating microservice applications")
12613 (description
12614 "Nautilus is a framework for flux based microservices that looks to
12615 provide extendible implementations of common aspects of a cloud so that you can
12616 focus on building massively scalable web applications.")
12617 (license license:expat)))
12618
12619 (define-public python-snowballstemmer
12620 (package
12621 (name "python-snowballstemmer")
12622 (version "1.2.1")
12623 (source (origin
12624 (method url-fetch)
12625 (uri (pypi-uri "snowballstemmer" version))
12626 (sha256
12627 (base32
12628 "0a0idq4y5frv7qsg2x62jd7rd272749xk4x99misf5rcifk2d7wi"))))
12629 (build-system python-build-system)
12630 (arguments
12631 `(;; No tests exist
12632 #:tests? #f))
12633 (home-page "https://github.com/shibukawa/snowball_py")
12634 (synopsis "Snowball stemming library collection for Python")
12635 (description "This package provides 16 word stemmer algorithms generated
12636 from Snowball algorithms. It includes the 15 original ones plus the Poerter
12637 English stemmer.")
12638 (license license:bsd-3)))
12639
12640 (define-public python2-snowballstemmer
12641 (package-with-python2 python-snowballstemmer))
12642
12643 (define-public python-sphinx-cloud-sptheme
12644 (package
12645 (name "python-sphinx-cloud-sptheme")
12646 (version "1.8.0")
12647 (source (origin
12648 (method url-fetch)
12649 (uri (pypi-uri "cloud_sptheme" version))
12650 (sha256
12651 (base32
12652 "1dniqb6a39yh786f86c4jn666rwnyi1jvzn4616zhcchb7sfdshd"))))
12653 (build-system python-build-system)
12654 ;; FIXME: The 'pypi' release archive does not contain tests.
12655 (arguments '(#:tests? #f))
12656 (native-inputs
12657 `(("python-sphinx" ,python-sphinx)))
12658 (home-page "https://bitbucket.org/ecollins/cloud_sptheme")
12659 (synopsis "'Cloud' theme for Sphinx documenter")
12660 (description "This package contains the \"Cloud\" theme for Sphinx and some
12661 related extensions.")
12662 (license license:bsd-3)))
12663
12664 (define-public python2-sphinx-cloud-sptheme
12665 (package-with-python2 python-sphinx-cloud-sptheme))
12666
12667 (define-public python-sphinx-alabaster-theme
12668 (package
12669 (name "python-sphinx-alabaster-theme")
12670 (version "0.7.9")
12671 (source (origin
12672 (method url-fetch)
12673 (uri (pypi-uri "alabaster" version))
12674 (sha256
12675 (base32
12676 "027anxzcb951gjlcc43y3rbn9qrw36d16vj9wd2smv5410xx9bs7"))))
12677 (build-system python-build-system)
12678 (propagated-inputs
12679 `(("python-pygments" ,python-pygments)))
12680 (home-page "https://alabaster.readthedocs.io/")
12681 (synopsis "Configurable sidebar-enabled Sphinx theme")
12682 (description "Alabaster is a visually (c)lean, responsive, configurable
12683 theme for the Sphinx documentation system. It's the default theme of Sphinx.")
12684 (license license:bsd-3)))
12685
12686 (define-public python2-sphinx-alabaster-theme
12687 (package-with-python2 python-sphinx-alabaster-theme))
12688
12689 (define-public python-betamax
12690 (package
12691 (name "python-betamax")
12692 (version "0.8.0")
12693 (source
12694 (origin
12695 (method url-fetch)
12696 (uri (pypi-uri "betamax" version))
12697 (sha256
12698 (base32
12699 "18f8v5gng3j773jlbbzx4rg1i4y2zw3m2l1zpmbvp8bh5a2q1i42"))))
12700 (build-system python-build-system)
12701 (arguments
12702 '(;; Many tests fail because they require networking.
12703 #:tests? #f))
12704 (propagated-inputs
12705 `(("python-requests" ,python-requests)))
12706 (home-page "https://github.com/sigmavirus24/betamax")
12707 (synopsis "Record HTTP interactions with python-requests")
12708 (description "Betamax will record your test suite's HTTP interactions and
12709 replay them during future tests. It is designed to work with python-requests.")
12710 (license license:expat)))
12711
12712 (define-public python2-betamax
12713 (package-with-python2 python-betamax))
12714
12715 (define-public python-s3transfer
12716 (package
12717 (name "python-s3transfer")
12718 (version "0.1.10")
12719 (source (origin
12720 (method url-fetch)
12721 (uri (pypi-uri "s3transfer" version))
12722 (sha256
12723 (base32
12724 "1h8g9bknvxflxkpbnxyfxmk8pvgykbbk9ljdvhqh6z4vjc2926ms"))))
12725 (build-system python-build-system)
12726 (arguments
12727 `(#:phases
12728 (modify-phases %standard-phases
12729 (replace 'check
12730 (lambda _
12731 ;; 7 of the 'integration' tests require network access or login
12732 ;; credentials.
12733 (zero? (system* "nosetests" "--exclude=integration")))))))
12734 (native-inputs
12735 `(("python-docutils" ,python-docutils)
12736 ("python-mock" ,python-mock)
12737 ("python-nose" ,python-nose)))
12738 (propagated-inputs
12739 `(("python-botocore" ,python-botocore)))
12740 (synopsis "Amazon S3 Transfer Manager")
12741 (description "S3transfer is a Python library for managing Amazon S3
12742 transfers.")
12743 (home-page "https://github.com/boto/s3transfer")
12744 (license license:asl2.0)
12745 (properties `((python2-variant . ,(delay python2-s3transfer))))))
12746
12747 (define-public python2-s3transfer
12748 (let ((base (package-with-python2 (strip-python2-variant python-s3transfer))))
12749 (package
12750 (inherit base)
12751 (native-inputs
12752 `(("python2-futures" ,python2-futures)
12753 ,@(package-native-inputs base))))))
12754
12755 (define-public python-setproctitle
12756 (package
12757 (name "python-setproctitle")
12758 (version "1.1.10")
12759 (source
12760 (origin
12761 (method url-fetch)
12762 (uri (pypi-uri "setproctitle" version))
12763 (sha256
12764 (base32
12765 "163kplw9dcrw0lffq1bvli5yws3rngpnvrxrzdw89pbphjjvg0v2"))))
12766 (build-system python-build-system)
12767 (arguments
12768 '(#:phases
12769 (modify-phases %standard-phases
12770 (add-before 'check 'patch-Makefile
12771 ;; Stricly this is only required for the python2 variant.
12772 ;; But adding a phase in an inherited package seems to be
12773 ;; cumbersum. So we patch even for python3.
12774 (lambda _
12775 (let ((nose (assoc-ref %build-inputs "python2-nose")))
12776 (when nose
12777 (substitute* "Makefile"
12778 (("\\$\\(PYTHON\\) [^ ]which nosetests[^ ] ")
12779 (string-append nose "/bin/nosetests "))))
12780 #t)))
12781 (replace 'check
12782 (lambda _
12783 (setenv "PYTHON" (or (which "python3") (which "python")))
12784 (setenv "PYCONFIG" (or (which "python3-config")
12785 (which "python-config")))
12786 (setenv "CC" "gcc")
12787 ;; No need to extend PYTHONPATH to find the built package, since
12788 ;; the Makefile will build anyway
12789 (zero? (system* "make" "check")))))))
12790 (native-inputs
12791 `(("procps" ,procps))) ; required for tests
12792 (home-page
12793 "https://github.com/dvarrazzo/py-setproctitle")
12794 (synopsis
12795 "Setproctitle implementation for Python to customize the process title")
12796 (description "The library allows a process to change its title (as displayed
12797 by system tools such as ps and top).
12798
12799 Changing the title is mostly useful in multi-process systems, for
12800 example when a master process is forked: changing the children's title
12801 allows to identify the task each process is busy with. The technique
12802 is used by PostgreSQL and the OpenSSH Server for example.")
12803 (license license:bsd-3)
12804 (properties `((python2-variant . ,(delay python2-setproctitle))))))
12805
12806 (define-public python2-setproctitle
12807 (let ((base (package-with-python2
12808 (strip-python2-variant python-setproctitle))))
12809 (package
12810 (inherit base)
12811 (native-inputs `(("python2-nose" ,python2-nose)
12812 ,@(package-native-inputs base))))))
12813
12814 (define-public python-validictory
12815 (package
12816 (name "python-validictory")
12817 (version "1.0.1")
12818 (source
12819 (origin
12820 (method url-fetch)
12821 (uri (pypi-uri "validictory" version))
12822 (sha256
12823 (base32
12824 "1zf1g9sw47xzp5f80bd94pb42j9yqv82lcrgcvdwr6nkaphfi37q"))))
12825 (build-system python-build-system)
12826 (arguments
12827 '(#:phases
12828 (modify-phases %standard-phases
12829 (add-after 'unpack 'bootstrap
12830 ;; Move the tests out of the package directory to avoid
12831 ;; packaging them.
12832 (lambda* _
12833 (rename-file "validictory/tests" "tests")
12834 (delete-file "tests/__init__.py")))
12835 (replace 'check
12836 (lambda _
12837 ;; Extend PYTHONPATH so the built package will be found.
12838 (setenv "PYTHONPATH"
12839 (string-append (getcwd) "/build/lib:"
12840 (getenv "PYTHONPATH")))
12841 (zero? (system* "py.test" "-vv" )))))))
12842 (native-inputs
12843 `(("python-pytest" ,python-pytest)))
12844 (home-page
12845 "https://github.com/jamesturk/validictory")
12846 (synopsis "General purpose Python data validator")
12847 (description "It allows validation of arbitrary Python data structures.
12848
12849 The schema format is based on the JSON Schema
12850 proposal (http://json-schema.org), so combined with json the library is also
12851 useful as a validator for JSON data.")
12852 (license license:expat)))
12853
12854 (define-public python2-validictory
12855 (package-with-python2 python-validictory))
12856
12857 (define-public python-aniso8601
12858 (package
12859 (name "python-aniso8601")
12860 (version "1.1.0")
12861 (source
12862 (origin
12863 (method url-fetch)
12864 (uri (pypi-uri "aniso8601" version))
12865 (sha256
12866 (base32
12867 "1k5mjg9iqbjfslb5prrsfz7dhlvi6s35p1jxq8dm87w1b7dn5i2g"))))
12868 (build-system python-build-system)
12869 (propagated-inputs
12870 `(("python-dateutil" ,python-dateutil)))
12871 (home-page
12872 "https://bitbucket.org/nielsenb/aniso8601")
12873 (synopsis
12874 "Python library for parsing ISO 8601 strings")
12875 (description
12876 "This package contains a library for parsing ISO 8601 datetime strings.")
12877 (license license:bsd-3)))
12878
12879 (define-public python-flask-restful
12880 (package
12881 (name "python-flask-restful")
12882 (version "0.3.5")
12883 (source
12884 (origin
12885 (method url-fetch)
12886 (uri (pypi-uri "Flask-RESTful" version))
12887 (sha256
12888 (base32
12889 "0hjcmdb56b7z4bkw848lxfkyrpnkwzmqn2dgnlv12mwvjpzsxr6c"))))
12890 (build-system python-build-system)
12891 (propagated-inputs
12892 `(("python-aniso8601" ,python-aniso8601)
12893 ("python-flask" ,python-flask)
12894 ("python-pycrypto" ,python-pycrypto)
12895 ("python-pytz" ,python-pytz)))
12896 (native-inputs
12897 `(;; Optional dependency of Flask. Tests need it.
12898 ("python-blinker" ,python-blinker)
12899 ("python-mock" ,python-mock) ; For tests
12900 ("python-nose" ,python-nose) ; For tests
12901 ("python-sphinx" ,python-sphinx)))
12902 (home-page
12903 "https://www.github.com/flask-restful/flask-restful/")
12904 (synopsis
12905 "Flask module for creating REST APIs")
12906 (description
12907 "This package contains a Flask module for creating REST APIs.")
12908 (license license:bsd-3)))
12909
12910 (define-public python-flask-basicauth
12911 (package
12912 (name "python-flask-basicauth")
12913 (version "0.2.0")
12914 (source
12915 (origin
12916 (method url-fetch)
12917 (uri (pypi-uri "Flask-BasicAuth" version))
12918 (sha256
12919 (base32
12920 "1zq1spkjr4sjdnalpp8wl242kdqyk6fhbnhr8hi4r4f0km4bspnz"))))
12921 (build-system python-build-system)
12922 (propagated-inputs
12923 `(("python-flask" ,python-flask)))
12924 (home-page
12925 "https://github.com/jpvanhal/flask-basicauth")
12926 (synopsis
12927 "HTTP basic access authentication for Flask")
12928 (description
12929 "This package provides HTTP basic access authentication for Flask.")
12930 (license license:bsd-3)))
12931
12932 (define-public python-flask-sqlalchemy
12933 (package
12934 (name "python-flask-sqlalchemy")
12935 (version "2.1")
12936 (source
12937 (origin
12938 (method url-fetch)
12939 (uri (pypi-uri "Flask-SQLAlchemy" version))
12940 (sha256
12941 (base32
12942 "1i9ps5d5snih9xlqhrvmi3qfiygkmqzxh92n25kj4pf89kj4s965"))))
12943 (build-system python-build-system)
12944 (propagated-inputs
12945 `(("python-flask" ,python-flask)
12946 ("python-sqlalchemy" ,python-sqlalchemy)))
12947 (home-page
12948 "https://github.com/mitsuhiko/flask-sqlalchemy")
12949 (synopsis
12950 "Module adding SQLAlchemy support to your Flask application")
12951 (description
12952 "This package adds SQLAlchemy support to your Flask application.")
12953 (license license:bsd-3)))
12954
12955 (define-public python-pyev
12956 (package
12957 (name "python-pyev")
12958 (version "0.9.0")
12959 (source
12960 (origin
12961 (method url-fetch)
12962 (uri (pypi-uri "pyev" version))
12963 (sha256
12964 (base32
12965 "0rf603lc0s6zpa1nb25vhd8g4y337wg2wyz56i0agsdh7jchl0sx"))))
12966 (build-system python-build-system)
12967 (arguments
12968 `(#:tests? #f ; no test suite
12969 #:phases
12970 (modify-phases %standard-phases
12971 (add-after 'unpack 'patch
12972 (lambda* (#:key inputs #:allow-other-keys)
12973 (let ((libev (string-append (assoc-ref inputs "libev")
12974 "/lib/libev.so.4")))
12975 (substitute* "setup.py"
12976 (("libev_dll_name = find_library\\(\\\"ev\\\"\\)")
12977 (string-append "libev_dll_name = \"" libev "\"")))))))))
12978 (inputs
12979 `(("libev" ,libev)))
12980 (home-page "http://pythonhosted.org/pyev/")
12981 (synopsis "Python libev interface")
12982 (description "Pyev provides a Python interface to libev.")
12983 (license license:gpl3)))
12984
12985 (define-public python2-pyev
12986 (package-with-python2 python-pyev))
12987
12988 (define-public python-imagesize
12989 (package
12990 (name "python-imagesize")
12991 (version "0.7.1")
12992 (source
12993 (origin
12994 (method url-fetch)
12995 (uri (pypi-uri "imagesize" version))
12996 (sha256
12997 (base32
12998 "0qk07k0z4241lkzzjji7z4da04pcvg7bfc4xz1934zlqhwmwdcha"))))
12999 (build-system python-build-system)
13000 (arguments
13001 '(;; Test files are not distributed on PyPi:
13002 ;; https://github.com/shibukawa/imagesize_py/issues/7
13003 #:tests? #f))
13004 (home-page "https://github.com/shibukawa/imagesize_py")
13005 (synopsis "Gets image size of files in variaous formats in Python")
13006 (description
13007 "This package allows determination of image size from
13008 PNG, JPEG, JPEG2000 and GIF files in pure Python.")
13009 (license license:expat)))
13010
13011 (define-public python2-imagesize
13012 (package-with-python2 python-imagesize))
13013
13014 (define-public python-axolotl-curve25519
13015 (package
13016 (name "python-axolotl-curve25519")
13017 (version "0.1")
13018 (source
13019 (origin
13020 (method git-fetch)
13021 (uri (git-reference
13022 (url "git://github.com/tgalal/python-axolotl-curve25519")
13023 (commit "e4a9c4de0eae27223200579c58d1f8f6d20637e2")))
13024 (file-name (string-append name "-" version "-checkout"))
13025 (sha256
13026 (base32
13027 "0agap5q0hmvf6cwzjqc05kw53pjgf6942pcivpazksmg1vk400ra"))))
13028 (build-system python-build-system)
13029 (arguments
13030 `(;; Prevent creation of the egg. This works around
13031 ;; https://debbugs.gnu.org/cgi/bugreport.cgi?bug=20765
13032 #:configure-flags '("--root=/")))
13033 (home-page "https://github.com/tgalal/python-axolotl-curve25519")
13034 (synopsis "Python wrapper for curve25519 library")
13035 (description "This is a python wrapper for the curve25519 library
13036 with ed25519 signatures. The C code was pulled from
13037 libaxolotl-android. At the moment this wrapper is meant for use by
13038 python-axolotl.")
13039 (license (list license:gpl3 ; Most files
13040 license:bsd-3)))) ; curve/curve25519-donna.c
13041
13042 (define-public python2-axolotl-curve25519
13043 (package-with-python2 python-axolotl-curve25519))
13044
13045 (define-public python-axolotl
13046 (package
13047 (name "python-axolotl")
13048 (version "0.1.35")
13049 (source
13050 (origin
13051 (method url-fetch)
13052 (uri (string-append
13053 "https://github.com/tgalal/python-axolotl/archive/"
13054 version ".tar.gz"))
13055 (file-name (string-append name "-" version ".tar.gz"))
13056 (sha256
13057 (base32 "1z8d89p7v40p4bwywjm9h4z28fdvra79ddw06azlkrfjbl7dxmz8"))))
13058 (build-system python-build-system)
13059 (arguments
13060 `(#:phases
13061 (modify-phases %standard-phases
13062 ;; Don't install tests
13063 (add-before 'install 'remove-tests
13064 (lambda _
13065 (for-each delete-file-recursively
13066 '("axolotl/tests" "build/lib/axolotl/tests"))
13067 #t)))))
13068 (propagated-inputs
13069 `(("python-axolotl-curve25519" ,python-axolotl-curve25519)
13070 ("python-dateutil" ,python-dateutil)
13071 ("python-protobuf" ,python-protobuf)
13072 ("python-pycrypto" ,python-pycrypto)))
13073 (home-page "https://github.com/tgalal/python-axolotl")
13074 (synopsis "Python port of libaxolotl-android")
13075 (description "This is a python port of libaxolotl-android. This
13076 is a ratcheting forward secrecy protocol that works in synchronous and
13077 asynchronous messaging environments.")
13078 (license license:gpl3)))
13079
13080 (define-public python2-axolotl
13081 (package-with-python2 python-axolotl))
13082
13083 (define-public python-termstyle
13084 (package
13085 (name "python-termstyle")
13086 (version "0.1.11")
13087 (source
13088 (origin
13089 (method url-fetch)
13090 (uri (pypi-uri "termstyle" version))
13091 (sha256
13092 (base32
13093 "17wzkkcqy5zc0g68xlad3kcv66iw14d2pwqc0h9420gak0vbhx7g"))))
13094 (build-system python-build-system)
13095 (arguments
13096 '(#:phases
13097 (modify-phases %standard-phases
13098 (replace 'check
13099 (lambda _
13100 (zero? (system* "python" "test3.py")))))))
13101 (home-page "https://github.com/gfxmonk/termstyle")
13102 (synopsis "Console text coloring for Python")
13103 (description "This package provides console text coloring for Python.")
13104 (license license:bsd-3)))
13105
13106 (define-public python-rednose
13107 (package
13108 (name "python-rednose")
13109 (version "1.2.1")
13110 (source
13111 (origin
13112 (method url-fetch)
13113 (uri (pypi-uri "rednose" version))
13114 (sha256
13115 (base32
13116 "0b0bsna217lr1nykyhl5fgjly15zhdvqd4prg4wy1zrgfv7al6m0"))))
13117 (build-system python-build-system)
13118 (arguments
13119 `(#:phases
13120 (modify-phases %standard-phases
13121 (add-after 'unpack 'fix-deps
13122 (lambda _
13123 ;; See <https://github.com/JBKahn/rednose/issues/12>
13124 (substitute* "setup.py"
13125 (("python-termstyle") "termstyle"))
13126 #t)))))
13127 (propagated-inputs
13128 `(("python-colorama" ,python-colorama)
13129 ("python-termstyle" ,python-termstyle)))
13130 (native-inputs
13131 `(("python-six" ,python-six)
13132 ("python-nose" ,python-nose)))
13133 (home-page "https://github.com/JBKahn/rednose")
13134 (synopsis "Colored output for Python nosetests")
13135 (description "This package provides colored output for the
13136 @command{nosetests} command of the Python Nose unit test framework.")
13137 (license license:bsd-3)))
13138
13139 (define-public python-flask-restplus
13140 (package
13141 (name "python-flask-restplus")
13142 (version "0.9.2")
13143 (source
13144 (origin
13145 (method url-fetch)
13146 (uri (pypi-uri "flask-restplus" version))
13147 (sha256
13148 (base32
13149 "11his6ii5brpkhld0d5bwzjjw4q3vmplpd6fmgzjrvvklsbk0cf4"))))
13150 (build-system python-build-system)
13151 (arguments
13152 '(#:tests? #f)) ; FIXME: 35/882 tests failing.
13153 ;; #:phases
13154 ;; (modify-phases %standard-phases
13155 ;; (replace 'check
13156 ;; (lambda _
13157 ;; (zero? (system* "nosetests")))))))
13158 (propagated-inputs
13159 `(("python-aniso8601" ,python-aniso8601)
13160 ("python-flask" ,python-flask)
13161 ("python-jsonschema" ,python-jsonschema)
13162 ("python-pytz" ,python-pytz)
13163 ("python-six" ,python-six)))
13164 (native-inputs
13165 `(("python-tzlocal" ,python-tzlocal)
13166 ("python-blinker" ,python-blinker)
13167 ("python-nose" ,python-nose)
13168 ("python-rednose" ,python-rednose)))
13169 (home-page "https://github.com/noirbizarre/flask-restplus")
13170 (synopsis "Framework for documented API development with Flask")
13171 (description "This package provides a framework for API development with
13172 the Flask web framework in Python. It is similar to package
13173 @code{python-flask-restful} but supports the @code{python-swagger}
13174 documentation builder.")
13175 (license license:expat)))
13176
13177 (define-public python-sadisplay
13178 (package
13179 (name "python-sadisplay")
13180 (version "0.4.6")
13181 (source
13182 (origin
13183 (method url-fetch)
13184 (uri (pypi-uri "sadisplay" version))
13185 (sha256
13186 (base32
13187 "0zqad2fl7q26p090qmqgmxbm6iwgf9zij1w8da1g3wdgjj72ql05"))))
13188 (build-system python-build-system)
13189 (propagated-inputs
13190 `(("python-sqlalchemy" ,python-sqlalchemy)))
13191 (native-inputs
13192 `(("python-nose" ,python-nose)))
13193 (home-page "https://bitbucket.org/estin/sadisplay")
13194 (synopsis "SQLAlchemy schema displayer")
13195 (description "This package provides a program to build Entity
13196 Relationship diagrams from a SQLAlchemy model (or directly from the
13197 database).")
13198 (license license:bsd-3)))
13199
13200 (define-public python2-sadisplay
13201 (package-with-python2 python-sadisplay))
13202
13203 (define-public python-flask-restful-swagger
13204 (package
13205 (name "python-flask-restful-swagger")
13206 (version "0.19")
13207 (source
13208 (origin
13209 (method url-fetch)
13210 (uri (pypi-uri "flask-restful-swagger" version))
13211 (sha256
13212 (base32
13213 "16msl8hd5xjmj833bpy264v98cpl5hkw5bgl5gf5vgndxbv3rm6v"))))
13214 (build-system python-build-system)
13215 (propagated-inputs
13216 `(("python-flask-restful" ,python-flask-restful)))
13217 (home-page "https://github.com/rantav/flask-restful-swagger")
13218 (synopsis "Extract Swagger specs from Flask-Restful projects")
13219 (description "This package lets you extract Swagger API documentation
13220 specs from your Flask-Restful projects.")
13221 (license license:expat)))
13222
13223 (define-public python2-flask-restful-swagger
13224 (package-with-python2 python-flask-restful-swagger))
13225
13226 (define-public python-argcomplete
13227 (package
13228 (name "python-argcomplete")
13229 (version "1.7.0")
13230 (source
13231 (origin
13232 (method url-fetch)
13233 (uri (pypi-uri "argcomplete" version))
13234 (sha256
13235 (base32
13236 "11bwiw6j0nilgz81xnw6f1npyga3prp8asjqrm87cdr3ria5l03x"))))
13237 (build-system python-build-system)
13238 (native-inputs
13239 `(("python-pexpect" ,python-pexpect)
13240 ("tcsh" ,tcsh)))
13241 (home-page "https://github.com/kislyuk/argcomplete")
13242 (synopsis "Shell tab completion for Python argparse")
13243 (description "argcomplete provides extensible command line tab completion
13244 of arguments and options for Python scripts using @code{argparse}. It's
13245 particularly useful for programs with many options or sub-parsers that can
13246 dynamically suggest completions; for example, when browsing resources over the
13247 network.")
13248 (license license:asl2.0)))
13249
13250 (define-public python2-argcomplete
13251 (package-with-python2 python-argcomplete))
13252
13253 (define-public python-xopen
13254 (package
13255 (name "python-xopen")
13256 (version "0.1.1")
13257 (source
13258 (origin
13259 (method url-fetch)
13260 (uri (pypi-uri "xopen" version))
13261 (sha256
13262 (base32
13263 "1wx6mylzcsyhjl19ycb83qq6iqpmr927lz62njfsar6ldsj0qcni"))
13264 (file-name (string-append name "-" version ".tar.gz"))))
13265 (build-system python-build-system)
13266 (home-page "https://github.com/marcelm/xopen/")
13267 (synopsis "Open compressed files transparently")
13268 (description "This module provides an @code{xopen} function that works like
13269 Python's built-in @code{open} function, but can also deal with compressed files.
13270 Supported compression formats are gzip, bzip2 and, xz, and are automatically
13271 recognized by their file extensions. The focus is on being as efficient as
13272 possible on all supported Python versions.")
13273 (license license:expat)))
13274
13275 (define-public python2-xopen
13276 (package-with-python2 python-xopen))
13277
13278 (define-public python2-cheetah
13279 (package
13280 (name "python2-cheetah")
13281 (version "2.4.4")
13282 (source
13283 (origin
13284 (method url-fetch)
13285 (uri (pypi-uri "Cheetah" version))
13286 (sha256
13287 (base32
13288 "0l5mm4lnysjkzpjr95q5ydm9xc8bv43fxmr79ypybrf1y0lq4c5y"))))
13289 (build-system python-build-system)
13290 (arguments
13291 `(#:python ,python-2))
13292 (propagated-inputs
13293 `(("python2-markdown" ,python2-markdown)))
13294 (home-page "https://pythonhosted.org/Cheetah/")
13295 (synopsis "Template engine")
13296 (description "Cheetah is a text-based template engine and Python code
13297 generator.
13298
13299 Cheetah can be used as a standalone templating utility or referenced as
13300 a library from other Python applications. It has many potential uses,
13301 but web developers looking for a viable alternative to ASP, JSP, PHP and
13302 PSP are expected to be its principle user group.
13303
13304 Features:
13305 @enumerate
13306 @item Generates HTML, SGML, XML, SQL, Postscript, form email, LaTeX, or any other
13307 text-based format.
13308 @item Cleanly separates content, graphic design, and program code.
13309 @item Blends the power and flexibility of Python with a simple template language
13310 that non-programmers can understand.
13311 @item Gives template writers full access to any Python data structure, module,
13312 function, object, or method in their templates.
13313 @item Makes code reuse easy by providing an object-orientated interface to
13314 templates that is accessible from Python code or other Cheetah templates.
13315 One template can subclass another and selectively reimplement sections of it.
13316 @item Provides a simple, yet powerful, caching mechanism that can dramatically
13317 improve the performance of a dynamic website.
13318 @item Compiles templates into optimized, yet readable, Python code.
13319 @end enumerate")
13320 (license (license:x11-style "file://LICENSE"))))
13321
13322 (define-public python-dulwich
13323 (package
13324 (name "python-dulwich")
13325 (version "0.16.3")
13326 (source
13327 (origin
13328 (method url-fetch)
13329 (uri (list (string-append "https://www.dulwich.io/releases/"
13330 "dulwich-" version ".tar.gz")
13331 (pypi-uri "dulwich" version)))
13332 (sha256
13333 (base32 "0fl47vzfgc3w3rmhn8naii905cjqcp0vc68iyvymxp7567hh6als"))))
13334 (build-system python-build-system)
13335 (arguments
13336 `(#:phases
13337 (modify-phases %standard-phases
13338 (add-before 'check 'fix-tests
13339 (lambda* (#:key inputs #:allow-other-keys)
13340 ;; The tests use Popen with a custom environment which doesn't
13341 ;; include PATH.
13342 (substitute* "dulwich/tests/compat/utils.py"
13343 (("'git'") (string-append "'"
13344 (which "git")
13345 "'")))
13346 (substitute* '("dulwich/tests/test_repository.py"
13347 "dulwich/tests/test_hooks.py")
13348 (("#!/bin/sh") (string-append "#!" (which "sh"))))
13349 (setenv "TEST_RUNNER" "unittest")
13350 (setenv "PYTHONHASHSEED" "random")
13351 #t)))))
13352 (propagated-inputs
13353 `(("python-fastimport" ,python-fastimport)))
13354 (native-inputs
13355 `(("python-mock" ,python-mock)
13356 ("python-geventhttpclient" ,python-geventhttpclient)
13357 ("git" ,git)))
13358 (home-page "https://www.dulwich.io/")
13359 (synopsis "Git implementation in Python")
13360 (description "Dulwich is an implementation of the Git file formats and
13361 protocols written in pure Python.")
13362 ;; Can be used with either license.
13363 (license (list license:asl2.0 license:gpl2+))))
13364
13365 (define-public python2-dulwich
13366 (package-with-python2 python-dulwich))
13367
13368 (define-public python-pbkdf2
13369 (package
13370 (name "python-pbkdf2")
13371 (version "1.3")
13372 (source
13373 (origin
13374 (method url-fetch)
13375 (uri (pypi-uri "pbkdf2" version))
13376 (sha256
13377 (base32
13378 "0yb99rl2mbsaamj571s1mf6vgniqh23v98k4632150hjkwv9fqxc"))))
13379 (build-system python-build-system)
13380 (arguments
13381 '(#:phases
13382 (modify-phases %standard-phases
13383 (replace 'check
13384 (lambda _
13385 (setenv "PYTHONPATH"
13386 (string-append (getcwd) "/build/lib:"
13387 (getenv "PYTHONPATH")))
13388 (zero? (system* "python" "test/test_pbkdf2.py")))))))
13389 (propagated-inputs
13390 `(("python-pycrypto" ,python-pycrypto))) ; optional
13391 (home-page "http://www.dlitz.net/software/python-pbkdf2/")
13392 (synopsis "Password-based key derivation")
13393 (description "This module implements the password-based key derivation
13394 function, PBKDF2, specified in RSA PKCS#5 v2.0.
13395
13396 PKCS#5 v2.0 Password-Based Key Derivation is a key derivation function which
13397 is part of the RSA Public Key Cryptography Standards series. The provided
13398 implementation takes a password or a passphrase and a salt value (and
13399 optionally a iteration count, a digest module, and a MAC module) and provides
13400 a file-like object from which an arbitrarly-sized key can be read.")
13401 (license license:expat)))
13402
13403 (define-public python2-pbkdf2
13404 (package-with-python2 python-pbkdf2))
13405
13406 (define-public python-qrcode
13407 (package
13408 (name "python-qrcode")
13409 (version "5.3")
13410 (source
13411 (origin
13412 (method url-fetch)
13413 (uri (pypi-uri "qrcode" version))
13414 (sha256
13415 (base32
13416 "0kljfrfq0c2rmxf8am57333ia41kd0snbm2rnqbdy816hgpcq5a1"))))
13417 (build-system python-build-system)
13418 (arguments
13419 ;; FIXME: Tests require packaging 'pymaging'.
13420 '(#:tests? #f))
13421 (propagated-inputs
13422 `(("python-lxml" ,python-lxml) ; for SVG output
13423 ("python-pillow" ,python-pillow) ; for PNG output
13424 ("python-six" ,python-six)))
13425 (home-page "https://github.com/lincolnloop/python-qrcode")
13426 (synopsis "QR Code image generator")
13427 (description "This package provides a pure Python QR Code generator
13428 module. It uses the Python Imaging Library (PIL) to allow for the generation
13429 of QR Codes.
13430
13431 In addition this package provides a command line tool to generate QR codes and
13432 either write these QR codes to a file or do the output as ascii art at the
13433 console.")
13434 (license license:bsd-3)))
13435
13436 (define-public python2-qrcode
13437 (package-with-python2 python-qrcode))
13438
13439 ;; SlowAES isn't compatible with Python 3.
13440 (define-public python2-slowaes
13441 (package
13442 (name "python2-slowaes")
13443 (version "0.1a1")
13444 (source
13445 (origin
13446 (method url-fetch)
13447 (uri (pypi-uri "slowaes" version))
13448 (sha256
13449 (base32
13450 "02dzajm83a7lqgxf6r3hgj64wfmcxz8gs4nvgxpvj5n19kjqlrc3"))))
13451 (build-system python-build-system)
13452 (arguments `(#:python ,python-2))
13453 (home-page "http://code.google.com/p/slowaes/")
13454 (synopsis "Implementation of AES in Python")
13455 (description "This package contains an implementation of AES in Python.
13456 This implementation is slow (hence the project name) but still useful when
13457 faster ones are not available.")
13458 (license license:asl2.0)))
13459
13460 (define-public python-rst2ansi
13461 (package
13462 (name "python-rst2ansi")
13463 (version "0.1.5")
13464 (source
13465 (origin
13466 (method url-fetch)
13467 (uri (pypi-uri "rst2ansi" version))
13468 (sha256
13469 (base32
13470 "0vzy6gd60l79ff750scl0sz48r1laalkl6md6dwzah4dcadgn5qv"))))
13471 (build-system python-build-system)
13472 (propagated-inputs
13473 `(("python-docutils" ,python-docutils)))
13474 (home-page "https://github.com/Snaipe/python-rst-to-ansi")
13475 (synopsis "Convert RST to ANSI-decorated console output")
13476 (description
13477 "Python module dedicated to rendering RST (reStructuredText) documents
13478 to ansi-escaped strings suitable for display in a terminal.")
13479 (license license:expat)))
13480
13481 (define-public python-ansi2html
13482 (package
13483 (name "python-ansi2html")
13484 (version "1.2.0")
13485 (source
13486 (origin
13487 (method url-fetch)
13488 (uri (pypi-uri "ansi2html" version))
13489 (sha256
13490 (base32
13491 "1wa00zffprb78w1mqq90dk47czz1knanys2a40zbw2vyapd5lp9y"))))
13492 (build-system python-build-system)
13493 (native-inputs
13494 `(("python-mock" ,python-mock)
13495 ("python-nose" ,python-nose)))
13496 (propagated-inputs
13497 `(("python-six" ,python-six)))
13498 (home-page "http://github.com/ralphbean/ansi2html")
13499 (synopsis "Convert ANSI-decorated console output to HTML")
13500 (description
13501 "@command{ansi2html} is a Python library and command line utility for
13502 convering text with ANSI color codes to HTML or LaTeX.")
13503 (license license:gpl3+)))
13504
13505 (define-public python2-ansi2html
13506 (package-with-python2 python-ansi2html))
13507
13508 (define-public python-ddt
13509 (package
13510 (name "python-ddt")
13511 (version "1.1.1")
13512 (source
13513 (origin
13514 (method url-fetch)
13515 (uri (pypi-uri "ddt" version))
13516 (sha256
13517 (base32
13518 "1c00ikkxr7lha97c81k938bzhgd4pbwamkjn0h4nkhr3xk00zp6n"))))
13519 (build-system python-build-system)
13520 (native-inputs
13521 `(("python-mock" ,python-mock)
13522 ("python-nose" ,python-nose)))
13523 (propagated-inputs
13524 `(("python-six" ,python-six)
13525 ("python-pyyaml" ,python-pyyaml)))
13526 (home-page "https://github.com/txels/ddt")
13527 (synopsis "Data-Driven Tests")
13528 (description
13529 "DDT (Data-Driven Tests) allows you to multiply one test case by running
13530 it with different test data, and make it appear as multiple test cases.")
13531 (license license:expat)))
13532
13533 (define-public python2-ddt
13534 (package-with-python2 python-ddt))
13535
13536 (define-public python-pycosat
13537 (package
13538 (name "python-pycosat")
13539 (version "0.6.1")
13540 (source
13541 (origin
13542 (method url-fetch)
13543 (uri (pypi-uri "pycosat" version))
13544 (sha256
13545 (base32
13546 "1kl3wh1f47rc712n4bmwplbx3fqz3x9i1b587jrbpmvdva4c8f6l"))))
13547 ;; TODO: Unundle picosat. http://fmv.jku.at/picosat/
13548 (build-system python-build-system)
13549 (home-page "https://github.com/ContinuumIO/pycosat")
13550 (synopsis "Bindings to picosat (a SAT solver)")
13551 (description
13552 "This package provides efficient Python bindings to @code{picosat} on
13553 the C level. When importing pycosat, the @code{picosat} solver becomes part
13554 of the Python process itself. @code{picosat} is a @dfn{Boolean Satisfiability
13555 Problem} (SAT) solver.")
13556 (license license:expat)))
13557
13558 (define-public python2-pycosat
13559 (package-with-python2 python-pycosat))
13560
13561 (define-public python2-ruamel.ordereddict
13562 (package
13563 (name "python2-ruamel.ordereddict")
13564 (version "0.4.9")
13565 (source
13566 (origin
13567 (method url-fetch)
13568 (uri (pypi-uri "ruamel.ordereddict" version))
13569 (sha256
13570 (base32
13571 "1xmkl8v9l9inm2pyxgc1fm5005yxm7fkd5gv74q7lj1iy5qc8n3h"))))
13572 (build-system python-build-system)
13573 (arguments
13574 `(#:python ,python-2
13575 #:phases
13576 (modify-phases %standard-phases
13577 (delete 'check)
13578 (add-after 'install 'check
13579 (lambda* (#:key inputs outputs #:allow-other-keys)
13580 (add-installed-pythonpath inputs outputs)
13581 (zero? (system* "python" "test/testordereddict.py")))))))
13582 (home-page "https://bitbucket.org/ruamel/ordereddict")
13583 (synopsis "Version of dict that keeps keys in insertion order")
13584 (description
13585 "This is an implementation of an ordered dictionary with @dfn{Key
13586 Insertion Order} (KIO: updates of values do not affect the position of the
13587 key), @dfn{Key Value Insertion Order} (KVIO, an existing key's position is
13588 removed and put at the back). The standard library module @code{OrderedDict},
13589 implemented later, implements a subset of @code{ordereddict} functionality.
13590 Sorted dictionaries are also provided. Currently only with @dfn{Key Sorted
13591 Order} (KSO, no sorting function can be specified, but a transform can be
13592 specified to apply on the key before comparison (e.g. @code{string.lower})).")
13593 (license license:expat)))
13594
13595 (define-public python-pypeg2
13596 (package
13597 (name "python-pypeg2")
13598 (version "2.15.2")
13599 (source
13600 (origin
13601 (method url-fetch)
13602 (uri (pypi-uri "pyPEG2" version))
13603 (sha256
13604 (base32
13605 "0v8ziaam2r637v94ra4dbjw6jzxz99gs5x4i585kgag1v204yb9b"))))
13606 (build-system python-build-system)
13607 (propagated-inputs `(("python-lxml" ,python-lxml)))
13608 (arguments
13609 ;;https://bitbucket.org/fdik/pypeg/issues/36/test-failures-on-py35
13610 '(#:tests? #f))
13611 (home-page "https://fdik.org/pyPEG/")
13612 (synopsis "Parsering Expression Grammars in Python")
13613 (description "PyPEG is an intrinsic parser interpreter framework for
13614 Python. It is based on Parsing Expression Grammars, PEG. With pyPEG you can
13615 parse many formal languages.")
13616 (license license:gpl2)))
13617
13618 (define-public python2-cliapp
13619 (package
13620 (name "python2-cliapp")
13621 (version "1.20160724")
13622 (source
13623 (origin
13624 (method url-fetch)
13625 (uri (string-append
13626 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/cliapp/snapshot/cliapp-"
13627 version ".tar.gz"))
13628 (sha256
13629 (base32
13630 "025cyi75vxyghbm4hav8dz4fzwksshddavy9g9fwr440awcvw74f"))))
13631 (build-system python-build-system)
13632 (arguments
13633 `(#:python ,python-2))
13634 (propagated-inputs
13635 `(("python2-pyaml" ,python2-pyaml)))
13636 (home-page "https://liw.fi/cliapp/")
13637 (synopsis "Python framework for command line programs")
13638 (description "@code{python2-cliapp} is a python framework for
13639 command line programs. It contains the typical stuff such programs
13640 need to do, such as parsing the command line for options, and
13641 iterating over input files.")
13642 (license license:gpl2+)))
13643
13644 (define-public python2-ttystatus
13645 (package
13646 (name "python2-ttystatus")
13647 (version "0.32")
13648 (source
13649 (origin
13650 (method url-fetch)
13651 (uri (string-append
13652 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/ttystatus/snapshot/ttystatus-"
13653 version ".tar.gz"))
13654 (sha256
13655 (base32
13656 "0b5g889jj23r2w1hi300cdldx6jvspanp0ybf5n1qvdvl150aamf"))))
13657 (build-system python-build-system)
13658 (arguments
13659 `(#:python ,python-2))
13660 (home-page "https://liw.fi/ttystatus/")
13661 (synopsis "Python library for showing progress reporting and
13662 status updates on terminals")
13663 (description "@code{python2-ttystatus} is a python library for
13664 showing progress reporting and status updates on terminals, for
13665 command line programs. Output is automatically adapted to the width
13666 of the terminal: truncated if it does not fit, and resized if the
13667 terminal size changes.")
13668 (license license:gpl3+)))
13669
13670 (define-public python2-tracing
13671 (package
13672 (name "python2-tracing")
13673 (version "0.10")
13674 (source
13675 (origin
13676 (method url-fetch)
13677 (uri (string-append
13678 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/python-tracing/snapshot/tracing-"
13679 version ".tar.gz"))
13680 (sha256
13681 (base32
13682 "06cw4zg42fsvqy372vi2whj26w56vzg5axhzwdjc2bgwf03garbw"))))
13683 (build-system python-build-system)
13684 (arguments
13685 `(#:python ,python-2))
13686 (home-page "https://liw.fi/tracing/")
13687 (synopsis "Python debug logging helper")
13688 (description "@code{python2-tracing} is a python library for
13689 logging debug messages. It provides a way to turn debugging messages
13690 on and off, based on the filename they occur in. It is much faster
13691 than using @code{logging.Filter} to accomplish the same thing, which
13692 matters when code is run in production mode. The actual logging still
13693 happens using the @code{logging} library.")
13694 (license license:gpl3+)))
13695
13696 (define-public python2-larch
13697 (package
13698 (name "python2-larch")
13699 (version "1.20151025")
13700 (source
13701 (origin
13702 (method url-fetch)
13703 (uri (string-append
13704 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/larch/snapshot/larch-"
13705 version ".tar.gz"))
13706 (sha256
13707 (base32
13708 "1p4knkkavlqymgciz2wbcnfrdgdbafhg14maplnk4vbw0q8xs663"))))
13709 (build-system python-build-system)
13710 (arguments
13711 `(#:python ,python-2))
13712 (propagated-inputs
13713 `(("python2-tracing" ,python2-tracing)))
13714 (home-page "https://liw.fi/larch/")
13715 (synopsis "Python copy-on-write B-tree library")
13716 (description "@code{python2-larch} is an implementation of
13717 particular kind of B-tree, based on research by Ohad Rodeh. See
13718 @url{http://liw.fi/larch/ohad-btrees-shadowing-clones.pdf} for details
13719 on the data structure.
13720
13721 The distinctive feature of this B-tree is that a node is never
13722 (conceptually) modified. Instead, all updates are done by
13723 copy-on-write. This makes it easy to clone a tree, and modify only the
13724 clone, while other processes access the original tree.")
13725 (license license:gpl3+)))
13726
13727 (define-public python-htmlmin
13728 (package
13729 (name "python-htmlmin")
13730 (version "0.1.10")
13731 (source
13732 (origin
13733 (method url-fetch)
13734 (uri (pypi-uri "htmlmin" version))
13735 (sha256
13736 (base32
13737 "0qxa93j3p1ak32qh8d9kshqv8v3z0hkc13dwbhp5cn7sn3xmsp6a"))))
13738 (arguments
13739 `(#:tests? #f)) ;htmlmin has no tests
13740 (build-system python-build-system)
13741 (home-page "https://htmlmin.readthedocs.org/en/latest/")
13742 (synopsis "HTML minifier")
13743 (description "@code{htmlmin} is an HTML minifier that just works.
13744 It comes with safe defaults and easily configurable options.")
13745 (license license:bsd-3)))
13746
13747 (define-public python2-htmlmin
13748 (package-with-python2 python-htmlmin))
13749
13750 (define-public python-flask-htmlmin
13751 (package
13752 (name "python-flask-htmlmin")
13753 (version "1.2")
13754 (source
13755 (origin
13756 (method url-fetch)
13757 (uri (pypi-uri "Flask-HTMLmin" version))
13758 (sha256
13759 (base32
13760 "1n6zlq72kakkw0z2jpq6nh74lfsmxybm4g053pwhc14fbr809348"))))
13761 (propagated-inputs
13762 `(("python-flask" ,python-flask)
13763 ("python-htmlmin" ,python-htmlmin)))
13764 (build-system python-build-system)
13765 (home-page "https://github.com/hamidfzm/Flask-HTMLmin")
13766 (synopsis "HTML response minifier for Flask")
13767 (description
13768 "Minify @code{text/html} MIME type responses when using @code{Flask}.")
13769 (license license:bsd-3)))
13770
13771 (define-public python2-flask-htmlmin
13772 (package-with-python2 python-flask-htmlmin))
13773
13774 (define-public python-flask-login
13775 (package
13776 (name "python-flask-login")
13777 (version "0.4.0")
13778 (source
13779 (origin
13780 (method url-fetch)
13781 (uri (string-append "https://github.com/maxcountryman/flask-login/archive/"
13782 version ".tar.gz"))
13783 (file-name (string-append name "-" version ".tar.gz"))
13784 (sha256
13785 (base32
13786 "1pdqp7a2gyb7k06xda004x0fi2w66s6kn2i0ndkqndmg12d83f9w"))))
13787 (arguments
13788 ;; Tests fail PEP8 compliance. See:
13789 ;; https://github.com/maxcountryman/flask-login/issues/340
13790 `(#:tests? #f))
13791 (build-system python-build-system)
13792 (home-page "https://github.com/maxcountryman/flask-login")
13793 (synopsis "User session management for Flask")
13794 (description
13795 "@code{Flask-Login} provides user session management for Flask. It
13796 handles the common tasks of logging in, logging out, and remembering your
13797 users' sessions over extended periods of time.")
13798 (license license:expat)))
13799
13800 (define-public python2-flask-login
13801 (package-with-python2 python-flask-login))
13802
13803 (define-public python-astroid
13804 (package
13805 (name "python-astroid")
13806 (version "1.4.9")
13807 (source
13808 (origin
13809 (method url-fetch)
13810 (uri (string-append
13811 "https://github.com/PyCQA/astroid/archive/astroid-"
13812 version ".tar.gz"))
13813 (sha256
13814 (base32
13815 "0j0wgy54d13a470vm4b9rdjk99n1hmdxpf34x9k3pbmi9w9b566z"))))
13816 (build-system python-build-system)
13817 (propagated-inputs
13818 `(("python-lazy-object-proxy" ,python-lazy-object-proxy)
13819 ("python-six" ,python-six)
13820 ("python-wrapt" ,python-wrapt)))
13821 (arguments
13822 `(#:phases
13823 (modify-phases %standard-phases
13824 (replace 'check
13825 (lambda _
13826 (zero? (system* "python" "-m" "unittest" "discover"
13827 "-p" "unittest*.py")))))))
13828 (home-page "https://github.com/PyCQA/astroid")
13829 (synopsis "Common base representation of python source code for pylint and
13830 other projects")
13831 (description "@code{python-astroid} provides a common base representation
13832 of python source code for projects such as pychecker, pyreverse, pylint, etc.
13833
13834 It provides a compatible representation which comes from the _ast module. It
13835 rebuilds the tree generated by the builtin _ast module by recursively walking
13836 down the AST and building an extended ast. The new node classes have
13837 additional methods and attributes for different usages. They include some
13838 support for static inference and local name scopes. Furthermore, astroid
13839 builds partial trees by inspecting living objects.")
13840 (license license:lgpl2.1+)))
13841
13842 (define-public python2-astroid
13843 (package-with-python2 python-astroid))
13844
13845 (define-public python-isort
13846 (package
13847 (name "python-isort")
13848 (version "4.2.5")
13849 (source
13850 (origin
13851 (method url-fetch)
13852 (uri (string-append
13853 "https://github.com/timothycrosley/isort/archive/"
13854 version ".tar.gz"))
13855 (file-name (string-append name "-" version ".tar.gz"))
13856 (sha256
13857 (base32
13858 "0zsrgkb0krn5476yncy5dd56k7dk34zqb4bnlvwy44ixgilyjmfh"))))
13859 (build-system python-build-system)
13860 (native-inputs
13861 `(("python-mock" ,python-mock)
13862 ("python-pytest" ,python-pytest)))
13863 (home-page "https://github.com/timothycrosley/isort")
13864 (synopsis "Python utility/library to sort python imports")
13865 (description "@code{python-isort} is a python utility/library to sort
13866 imports alphabetically, and automatically separated into sections. It
13867 provides a command line utility, a python library and plugins for various
13868 editors.")
13869 (license license:expat)))
13870
13871 (define-public python2-isort
13872 (package-with-python2 python-isort))
13873
13874 (define-public python2-backports-functools-lru-cache
13875 (package
13876 (name "python2-backports-functools-lru-cache")
13877 (version "1.3")
13878 (source
13879 (origin
13880 (method url-fetch)
13881 ;; only the pypi tarballs contain the necessary metadata
13882 (uri (pypi-uri "backports.functools_lru_cache" version))
13883 (sha256
13884 (base32
13885 "158ysf2hb0q4p4695abfiym9x1ywg0dgh8a3apd7gqaaxjy22jj4"))))
13886 (build-system python-build-system)
13887 (native-inputs
13888 `(("python2-setuptools-scm" ,python2-setuptools-scm)))
13889 (arguments
13890 `(#:python ,python-2))
13891 (home-page "https://github.com/jaraco/backports.functools_lru_cache")
13892 (synopsis "Backport of functools.lru_cache from Python 3.3")
13893 (description "@code{python2-backports-functools-lru-cache} is a backport
13894 of @code{functools.lru_cache} from python 3.3.")
13895 (license license:expat)))
13896
13897 (define-public python-configparser
13898 (package
13899 (name "python-configparser")
13900 (version "3.5.0")
13901 (source
13902 (origin
13903 (method url-fetch)
13904 (uri (string-append
13905 "https://bitbucket.org/ambv/configparser/get/"
13906 version ".tar.bz2"))
13907 (file-name (string-append name "-" version ".tar.gz"))
13908 (sha256
13909 (base32
13910 "0waq40as14abwzbb321hfz4vr1fi363nscy32ga14qvfygrg96wa"))))
13911 (build-system python-build-system)
13912 (home-page "http://docs.python.org/py3k/library/configparser.html")
13913 (synopsis "Backport of configparser from python 3.5")
13914 (description "@code{python-configparser} is a backport of
13915 @code{configparser} from Python 3.5 so that it can be used directly
13916 in other versions.")
13917 (license license:expat)))
13918
13919 (define-public python2-configparser
13920 (package-with-python2 python-configparser))
13921
13922 (define-public python2-coverage-test-runner
13923 (package
13924 (name "python2-coverage-test-runner")
13925 (version "1.11")
13926 (source
13927 (origin
13928 (method url-fetch)
13929 (uri (string-append
13930 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/"
13931 "coverage-test-runner/snapshot/coverage-test-runner-"
13932 version ".tar.gz"))
13933 (sha256
13934 (base32
13935 "0y1m7z3dl63kmhcmydl1mwg0hacnf6ghrx9dah17j9iasssfa3g7"))))
13936 (build-system python-build-system)
13937 (arguments
13938 `(#:python ,python-2
13939 #:phases
13940 (modify-phases %standard-phases
13941 (replace 'check
13942 (lambda _
13943 (zero? (system* "./testrun")))))))
13944 (propagated-inputs
13945 `(("python2-coverage" ,python2-coverage)))
13946 (home-page "https://liw.fi/coverage-test-runner/")
13947 (synopsis "Python module for running unit tests")
13948 (description "@code{CoverageTestRunner} is a python module for running
13949 unit tests and failing them if the unit test module does not exercise all
13950 statements in the module it tests.")
13951 (license license:gpl3+)))
13952
13953 (define-public python-pylint
13954 (package
13955 (name "python-pylint")
13956 (version "1.6.5")
13957 (source
13958 (origin
13959 (method url-fetch)
13960 (uri (string-append
13961 "https://github.com/PyCQA/pylint/archive/pylint-"
13962 version ".tar.gz"))
13963 (sha256
13964 (base32
13965 "08pmgflmq2zrzrn9nkfadzwa5vybz46wvwxhrsd2mjlcgsh4rzbm"))))
13966 (build-system python-build-system)
13967 (native-inputs
13968 `(("python-tox" ,python-tox)))
13969 (propagated-inputs
13970 `(("python-astroid" ,python-astroid)
13971 ("python-isort" ,python-isort)
13972 ("python-mccabe" ,python-mccabe)
13973 ("python-six" ,python-six)))
13974 (arguments
13975 `(#:phases
13976 (modify-phases %standard-phases
13977 (replace 'check
13978 (lambda _
13979 ;; Somehow, tests for python2-pylint
13980 ;; fail if run from the build directory
13981 (let ((work "/tmp/work"))
13982 (mkdir-p work)
13983 (setenv "PYTHONPATH"
13984 (string-append (getenv "PYTHONPATH") ":" work))
13985 (copy-recursively "." work)
13986 (with-directory-excursion "/tmp"
13987 (zero? (system* "python" "-m" "unittest" "discover"
13988 "-s" (string-append work "/pylint/test")
13989 "-p" "*test_*.py")))))))))
13990 (home-page "https://github.com/PyCQA/pylint")
13991 (synopsis "Python source code analyzer which looks for coding standard
13992 errors")
13993 (description "Pylint is a Python source code analyzer which looks
13994 for programming errors, helps enforcing a coding standard and sniffs
13995 for some code smells (as defined in Martin Fowler's Refactoring book).
13996
13997 Pylint has many rules enabled by default, way too much to silence them
13998 all on a minimally sized program. It's highly configurable and handle
13999 pragmas to control it from within your code. Additionally, it is
14000 possible to write plugins to add your own checks.")
14001 (license license:gpl2+)))
14002
14003 (define-public python2-pylint
14004 (let ((pylint (package-with-python2 python-pylint)))
14005 (package (inherit pylint)
14006 (propagated-inputs
14007 `(("python2-backports-functools-lru-cache"
14008 ,python2-backports-functools-lru-cache)
14009 ("python2-configparser" ,python2-configparser)
14010 ,@(package-propagated-inputs pylint))))))
14011
14012 (define-public python-paramunittest
14013 (package
14014 (name "python-paramunittest")
14015 (version "0.2")
14016 (source
14017 (origin
14018 (method url-fetch)
14019 (uri (pypi-uri "ParamUnittest" version))
14020 (sha256
14021 (base32
14022 "0kp793hws5xv1wvycxq7jw2pwy36f35k39jg8hx5qikij5a0jid1"))))
14023 (build-system python-build-system)
14024 (home-page
14025 "https://github.com/rik0/ParamUnittest")
14026 (synopsis
14027 "Simple extension to have parametrized unit tests")
14028 (description
14029 "This package allows to create parametrized unit-tests that work with the standard
14030 unittest package. A parametrized test case is automatically converted to multiple test
14031 cases. Since they are TestCase subclasses, they work with other test suites that
14032 recognize TestCases.")
14033 (license license:bsd-2)))
14034
14035 (define-public python2-python-paramunittest
14036 (package-with-python2 python-paramunittest))
14037
14038 (define-public python-mando
14039 (package
14040 (name "python-mando")
14041 (version "0.5")
14042 (source
14043 (origin
14044 (method url-fetch)
14045 (uri (pypi-uri "mando" version))
14046 (sha256
14047 (base32
14048 "0q05h66439gqdmlk4jqm6xrwrzfdgs4mwk70barxhr2y83qbbdc0"))))
14049 (build-system python-build-system)
14050 (propagated-inputs
14051 `(("python-rst2ansi" ,python-rst2ansi)))
14052 (native-inputs
14053 `(("python-sphinx" ,python-sphinx-1.5.3)
14054 ("python-paramunittest" ,python-paramunittest)))
14055 (home-page "https://mando.readthedocs.org/")
14056 (synopsis
14057 "Wrapper around argparse, allowing creation of complete CLI applications")
14058 (description
14059 "This package is a wrapper around argparse, allowing you to write complete CLI
14060 applications in seconds while maintaining all the flexibility.")
14061 (license license:expat)))
14062
14063 (define-public python2-mando
14064 (package-with-python2 python-mando))
14065
14066 (define-public python-mando-0.3.1
14067 ;; python-radon (version 1.5.0) has a requirement
14068 ;; for mando<0.4,>=0.3
14069 (package
14070 (inherit python-mando)
14071 (name "python-mando")
14072 (version "0.3.1")
14073 (source
14074 (origin
14075 (method url-fetch)
14076 (uri (string-append "https://github.com/rubik/mando/archive/v"
14077 version
14078 ".tar.gz"))
14079 (sha256
14080 (base32
14081 "17jlkdpqw22z1nyml5ybslilqkzmnk0dxxjml8bfghav1l5hbwd2"))))))
14082
14083 (define-public python-fudge
14084 (package
14085 (name "python-fudge")
14086 ;; 0.9.6 is the latest version suitable for testing the "fabric" Python 2
14087 ;; package, which is currently the only use of this package.
14088 (version "0.9.6")
14089 (source
14090 (origin
14091 (method url-fetch)
14092 (uri (pypi-uri "fudge" version))
14093 (sha256
14094 (base32
14095 "185ia3vr3qk4f2s1a9hdxb8ci4qc0x0xidrad96pywg8j930qs9l"))))
14096 (build-system python-build-system)
14097 (arguments
14098 `(#:tests? #f)) ;XXX: Tests require the NoseJS Python package.
14099 (home-page "https://github.com/fudge-py/fudge")
14100 (synopsis "Replace real objects with fakes/mocks/stubs while testing")
14101 (description
14102 "Fudge is a Python module for using fake objects (mocks and stubs) to
14103 test real ones.
14104
14105 In readable Python code, you declare the methods available on your fake object
14106 and how they should be called. Then you inject that into your application and
14107 start testing. This declarative approach means you don’t have to record and
14108 playback actions and you don’t have to inspect your fakes after running code.
14109 If the fake object was used incorrectly then you’ll see an informative
14110 exception message with a traceback that points to the culprit.")
14111 (license license:expat)))
14112
14113 (define-public python2-fudge
14114 (package-with-python2 python-fudge))
14115
14116 (define-public python-oauth2client
14117 (package
14118 (name "python-oauth2client")
14119 (version "4.0.0")
14120 (source
14121 (origin
14122 (method url-fetch)
14123 (uri (pypi-uri "oauth2client" version))
14124 (sha256
14125 (base32
14126 "1irqqap2zibysf8dba8sklfqikia579srd0phm5n754ni0h59gl0"))))
14127 (build-system python-build-system)
14128 (arguments
14129 `(#:tests? #f))
14130 (propagated-inputs
14131 `(("python-httplib2" ,python-httplib2)
14132 ("python-pyasn1" ,python-pyasn1)
14133 ("python-pyasn1-modules" ,python-pyasn1-modules)
14134 ("python-rsa" ,python-rsa)
14135 ("python-six" ,python-six)))
14136 (home-page "http://github.com/google/oauth2client/")
14137 (synopsis "OAuth 2.0 client library")
14138 (description "@code{python-oauth2client} provides an OAuth 2.0 client
14139 library for Python")
14140 (license license:asl2.0)))
14141
14142 (define-public python-flask-oidc
14143 (package
14144 (name "python-flask-oidc")
14145 (version "1.1.1")
14146 (source
14147 (origin
14148 (method url-fetch)
14149 (uri (pypi-uri "flask-oidc" version))
14150 (sha256
14151 (base32
14152 "1ay5j0mf174bix7i67hclr95gv16z81fpx0dijvi0gydvdj3ddy2"))))
14153 (build-system python-build-system)
14154 (propagated-inputs
14155 `(("python-flask" ,python-flask)
14156 ("python-itsdangerous" ,python-itsdangerous)
14157 ("python-oauth2client" ,python-oauth2client)
14158 ("python-six" ,python-six)))
14159 (native-inputs
14160 `(("python-nose" ,python-nose)
14161 ("python-mock" ,python-mock)))
14162 (home-page "https://github.com/puiterwijk/flask-oidc")
14163 (synopsis "OpenID Connect extension for Flask")
14164 (description "@code{python-flask-oidc} provides an OpenID Connect extension
14165 for Flask.")
14166 (license license:bsd-2)))
14167
14168 (define-public python-mwclient
14169 (package
14170 (name "python-mwclient")
14171 (version "0.8.4")
14172 (source
14173 (origin
14174 (method url-fetch)
14175 ;; The PyPI version wouldn't contain tests.
14176 (uri (string-append "https://github.com/mwclient/mwclient/archive/"
14177 "v" version ".tar.gz"))
14178 (sha256
14179 (base32
14180 "1jj0yhilkjir00719fc7w133x7hdyhkxhk6xblla4asig45klsfv"))))
14181 (build-system python-build-system)
14182 (propagated-inputs
14183 `(("python-requests" ,python-requests)
14184 ("python-requests-oauthlib"
14185 ,python-requests-oauthlib)
14186 ("python-six" ,python-six)))
14187 (native-inputs
14188 `(("python-mock" ,python-mock)
14189 ("python-pytest" ,python-pytest)
14190 ("python-pytest-pep8" ,python-pytest-pep8)
14191 ("python-pytest-cache" ,python-pytest-cache)
14192 ("python-pytest-cov" ,python-pytest-cov)
14193 ("python-responses" ,python-responses)))
14194 (home-page "https://github.com/btongminh/mwclient")
14195 (synopsis "MediaWiki API client")
14196 (description "This package provides a MediaWiki API client.")
14197 (license license:expat)))
14198
14199 (define-public python2-mwclient
14200 (package-with-python2 python-mwclient))
14201
14202 (define-public python-pytest-warnings
14203 (package
14204 (name "python-pytest-warnings")
14205 (version "0.2.0")
14206 (source
14207 (origin
14208 (method url-fetch)
14209 (uri (pypi-uri "pytest-warnings" version))
14210 (sha256
14211 (base32
14212 "0gf2dpahpl5igb7jh1sr9acj3z3gp7zahqdqb69nk6wx01c8kc1g"))))
14213 (build-system python-build-system)
14214 (propagated-inputs
14215 `(("pytest" ,python-pytest-3.0)))
14216 (home-page "https://github.com/fschulze/pytest-warnings")
14217 (synopsis "Pytest plugin to list Python warnings in pytest report")
14218 (description
14219 "Python-pytest-warnings is a pytest plugin to list Python warnings in
14220 pytest report.")
14221 (license license:expat)))
14222
14223 (define-public python2-pytest-warnings
14224 (package-with-python2 python-pytest-warnings))
14225
14226 (define-public python-pytest-catchlog
14227 (package
14228 (name "python-pytest-catchlog")
14229 (version "1.2.2")
14230 (source
14231 (origin
14232 (method url-fetch)
14233 (uri (pypi-uri "pytest-catchlog" version ".zip"))
14234 (sha256
14235 (base32
14236 "1w7wxh27sbqwm4jgwrjr9c2gy384aca5jzw9c0wzhl0pmk2mvqab"))))
14237 (build-system python-build-system)
14238 (native-inputs
14239 `(("unzip" ,unzip)))
14240 (propagated-inputs
14241 `(("pytest" ,python-pytest-3.0)))
14242 (home-page "https://github.com/eisensheng/pytest-catchlog")
14243 (synopsis "Pytest plugin to catch log messages")
14244 (description
14245 "Python-pytest-catchlog is a pytest plugin to catch log messages. This is
14246 a fork of pytest-capturelog.")
14247 (license license:expat)))
14248
14249 (define-public python2-pytest-catchlog
14250 (package-with-python2 python-pytest-catchlog))
14251
14252 (define-public python-utils
14253 (package
14254 (name "python-utils")
14255 (version "2.1.0")
14256 (source (origin
14257 (method url-fetch)
14258 (uri (pypi-uri "python-utils" version))
14259 (sha256
14260 (base32
14261 "1mcsy6q5am4ya72rgkpb6kax6vv7c93cfkkas89xnpa4sj9zf28p"))))
14262 (build-system python-build-system)
14263 (native-inputs
14264 `(("pytest-runner" ,python-pytest-runner)
14265 ("pytest" ,python-pytest)
14266 ("six" ,python-six)))
14267 (home-page "https://github.com/WoLpH/python-utils")
14268 (synopsis "Convenient utilities not included with the standard Python install")
14269 (description
14270 "Python Utils is a collection of small Python functions and classes which
14271 make common patterns shorter and easier.")
14272 (license license:bsd-2)))
14273
14274 (define-public python2-utils
14275 (package-with-python2 python-utils))
14276
14277 (define-public python-webassets
14278 (package
14279 (name "python-webassets")
14280 (version "0.12.1")
14281 (source
14282 (origin
14283 (method url-fetch)
14284 (uri (pypi-uri "webassets" version))
14285 (sha256
14286 (base32
14287 "1nrqkpb7z46h2b77xafxihqv3322cwqv6293ngaky4j3ff4cing7"))))
14288 (build-system python-build-system)
14289 (native-inputs
14290 `(("python-jinja2" ,python-jinja2)
14291 ("python-mock" ,python-mock)
14292 ("python-nose" ,python-nose)
14293 ("python-pytest" ,python-pytest)))
14294 (home-page "https://github.com/miracle2k/webassets")
14295 (synopsis "Media asset management")
14296 (description "Merges, minifies and compresses Javascript and CSS files,
14297 supporting a variety of different filters, including YUI, jsmin, jspacker or
14298 CSS tidy. Also supports URL rewriting in CSS files.")
14299 (license license:bsd-2)))
14300
14301 (define-public python-sphinx-me
14302 (package
14303 (name "python-sphinx-me")
14304 (version "0.3")
14305 (source
14306 (origin
14307 (method url-fetch)
14308 (uri (pypi-uri "sphinx-me" version))
14309 (sha256
14310 (base32
14311 "06jzgp213zihnvpcy2y5jy3ykid3apc2ncp2pg6a2g05lhiziglq"))))
14312 (build-system python-build-system)
14313 (home-page "https://github.com/stephenmcd/sphinx-me")
14314 (synopsis "Create a Sphinx documentation shell")
14315 (description
14316 "Create a Sphinx documentation shell for your project and include the
14317 README file as the documentation index. It handles extracting the required
14318 meta data such as the project name, author and version from your project for
14319 use in your Sphinx docs.")
14320 (license license:bsd-2)))
14321
14322 (define-public python2-sphinx-me
14323 (package-with-python2 python-sphinx-me))
14324
14325 (define-public python-cssmin
14326 (package
14327 (name "python-cssmin")
14328 (version "0.2.0")
14329 (source
14330 (origin
14331 (method url-fetch)
14332 (uri (pypi-uri "cssmin" version))
14333 (sha256
14334 (base32
14335 "1dk723nfm2yf8cp4pj785giqlwv42l0kj8rk40kczvq1hk6g04p0"))))
14336 (build-system python-build-system)
14337 (home-page "https://github.com/zacharyvoase/cssmin")
14338 (synopsis "Python port of the YUI CSS Compressor")
14339 (description "Python port of the YUI CSS Compressor.")
14340 (license (list license:expat license:bsd-3))))
14341
14342 (define-public python2-cssmin
14343 (package-with-python2 python-cssmin))
14344
14345 (define-public python-diff-match-patch
14346 (package
14347 (name "python-diff-match-patch")
14348 (version "20121119")
14349 (source
14350 (origin
14351 (method url-fetch)
14352 (uri (pypi-uri "diff-match-patch" version))
14353 (sha256
14354 (base32
14355 "0k1f3v8nbidcmmrk65m7h8v41jqi37653za9fcs96y7jzc8mdflx"))))
14356 (build-system python-build-system)
14357 (home-page "https://code.google.com/p/google-diff-match-patch")
14358 (synopsis "Synchronize plain text")
14359 (description "Diff Match and Patch libraries offer robust algorithms to
14360 perform the operations required for synchronizing plain text.")
14361 (license license:asl2.0)))
14362
14363 (define-public python2-diff-match-patch
14364 (package-with-python2 python-diff-match-patch))
14365
14366 (define-public python-dirsync
14367 (package
14368 (name "python-dirsync")
14369 (version "2.2.2")
14370 (source
14371 (origin
14372 (method url-fetch)
14373 (uri (pypi-uri "dirsync" version ".zip"))
14374 (sha256
14375 (base32
14376 "1hcdvmkwd5512zbxpin0k7bx5bkgzy3swjx7d0kj1y45af6r75v2"))))
14377 (build-system python-build-system)
14378 (native-inputs
14379 `(("unzip" ,unzip)))
14380 (propagated-inputs
14381 `(("six" ,python-six)))
14382 (home-page "https://bitbucket.org/tkhyn/dirsync")
14383 (synopsis "Advanced directory tree synchronisation tool")
14384 (description "Advanced directory tree synchronisation tool.")
14385 (license license:expat)))
14386
14387 (define-public python2-dirsync
14388 (package-with-python2 python-dirsync))
14389
14390 (define-public python-nosexcover
14391 (package
14392 (name "python-nosexcover")
14393 (version "1.0.11")
14394 (source (origin
14395 (method url-fetch)
14396 (uri (pypi-uri "nosexcover" version))
14397 (sha256
14398 (base32
14399 "10xqr12qv62k2flxwqhh8cr00cjhn7sfjrm6p35gd1x5bmjkr319"))))
14400 (build-system python-build-system)
14401 (propagated-inputs
14402 `(("python-coverage" ,python-coverage)
14403 ("python-nose" ,python-nose)))
14404 (home-page "http://github.com/cmheisel/nose-xcover")
14405 (synopsis "Extends nose.plugins.cover to add Cobertura-style XML reports")
14406 (description "Nose-xcover is a companion to the built-in
14407 @code{nose.plugins.cover}. This plugin will write out an XML coverage report
14408 to a file named coverage.xml.
14409
14410 It will honor all the options you pass to the Nose coverage plugin,
14411 especially -cover-package.")
14412 (license license:expat)))
14413
14414 (define-public python2-nosexcover
14415 (package-with-python2 python-nosexcover))
14416
14417 (define-public python-elasticsearch
14418 (package
14419 (name "python-elasticsearch")
14420 (version "1.0.0")
14421 (source
14422 (origin
14423 (method url-fetch)
14424 (uri (pypi-uri "elasticsearch" version))
14425 (sha256
14426 (base32
14427 "1sdw1r05cw7ihnmng8ra9v968fj7bq6sji8i1dikymsnkcpgc69g"))))
14428 (build-system python-build-system)
14429 (native-inputs
14430 `(("python-mock" ,python-mock)
14431 ("python-nosexcover" ,python-nosexcover)
14432 ("python-pyaml" ,python-pyaml)
14433 ("python-requests" ,python-requests)))
14434 (propagated-inputs
14435 `(("urllib3" ,python-urllib3)))
14436 (arguments
14437 ;; tests require the test_elasticsearch module but it is not distributed.
14438 `(#:tests? #f))
14439 (home-page "https://github.com/elastic/elasticsearch-py")
14440 (synopsis "Low-level client for Elasticsearch")
14441 (description "Official low-level client for Elasticsearch. Its goal is to
14442 provide common ground for all Elasticsearch-related code in Python; because of
14443 this it tries to be opinion-free and very extendable.")
14444 (license license:expat)))
14445
14446 (define-public python2-elasticsearch
14447 (package-with-python2 python-elasticsearch))
14448
14449 (define-public python-levenshtein
14450 (package
14451 (name "python-levenshtein")
14452 (version "0.12.0")
14453 (source
14454 (origin
14455 (method url-fetch)
14456 (uri (pypi-uri "python-Levenshtein" version))
14457 (sha256
14458 (base32
14459 "1c9ybqcja31nghfcc8xxbbz9h60s9qi12b9hr4jyl69xbvg12fh3"))))
14460 (build-system python-build-system)
14461 (home-page "https://github.com/ztane/python-Levenshtein")
14462 (synopsis "Fast computation of Levenshtein distance and string similarity")
14463 (description
14464 "The Levenshtein Python C extension module contains functions for fast computation of
14465 @enumerate
14466 @item Levenshtein (edit) distance, and edit operations
14467 @item string similarity
14468 @item approximate median strings, and generally string averaging
14469 @item string sequence and set similarity
14470 @end enumerate
14471 It supports both normal and Unicode strings.")
14472 (license license:gpl2+)))
14473
14474 (define-public python2-levenshtein
14475 (package-with-python2 python-levenshtein))
14476
14477 (define-public python-scandir
14478 (package
14479 (name "python-scandir")
14480 (version "1.4")
14481 (source
14482 (origin
14483 (method url-fetch)
14484 (uri (pypi-uri "scandir" version))
14485 (sha256
14486 (base32 "0yjrgp0mxp3d8bjkq2m1ac2ys8n76wykksvgyjrnil9gr3fx7a5d"))))
14487 (build-system python-build-system)
14488 (home-page "https://github.com/benhoyt/scandir")
14489 (synopsis "Directory iteration function")
14490 (description
14491 "Directory iteration function like os.listdir(), except that instead of
14492 returning a list of bare filenames, it yields DirEntry objects that include
14493 file type and stat information along with the name. Using scandir() increases
14494 the speed of os.walk() by 2-20 times (depending on the platform and file
14495 system) by avoiding unnecessary calls to os.stat() in most cases.")
14496 (license license:bsd-3)))
14497
14498 (define-public python2-scandir
14499 (package-with-python2 python-scandir))
14500
14501 (define-public python2-stemming
14502 (package
14503 (name "python2-stemming")
14504 (version "1.0.1")
14505 (source
14506 (origin
14507 (method url-fetch)
14508 (uri (pypi-uri "stemming" version))
14509 (sha256
14510 (base32 "0ldwa24gnnxhniv0fhygkpc2mwgd93q10ag8rvzayv6hw418frsr"))))
14511 (build-system python-build-system)
14512 (arguments
14513 `(#:python ,python-2))
14514 (home-page "https://bitbucket.org/mchaput/stemming/overview")
14515 (synopsis "Python implementations of various stemming algorithms")
14516 (description
14517 "Python implementations of the Porter, Porter2, Paice-Husk, and Lovins
14518 stemming algorithms for English. These implementations are straightforward and
14519 efficient, unlike some Python versions of the same algorithms available on the
14520 Web. This package is an extraction of the stemming code included in the Whoosh
14521 search engine.")
14522 (license license:public-domain)))
14523
14524 (define-public python-factory-boy
14525 (package
14526 (name "python-factory-boy")
14527 (version "2.8.1")
14528 (source
14529 (origin
14530 (method url-fetch)
14531 (uri (pypi-uri "factory_boy" version))
14532 (sha256
14533 (base32 "1fvin6san5xsjh2c4y18caj2lnmwxlylyqm8mh1yc6rp38wlwr56"))))
14534 (build-system python-build-system)
14535 (arguments
14536 ;; Tests are not included in the tarball.
14537 `(#:tests? #f))
14538 (propagated-inputs
14539 `(("faker" ,python-faker)))
14540 (home-page "https://github.com/benhoyt/scandir")
14541 (synopsis "Versatile test fixtures replacement")
14542 (description
14543 "Factory_boy is a fixtures replacement based on thoughtbot’s factory_girl.
14544
14545 As a fixtures replacement tool, it aims to replace static, hard to maintain
14546 fixtures with easy-to-use factories for complex object.
14547
14548 Instead of building an exhaustive test setup with every possible combination
14549 of corner cases, factory_boy allows you to use objects customized for the
14550 current test, while only declaring the test-specific fields")
14551 (license license:expat)))
14552
14553 (define-public python2-factory-boy
14554 (package-with-python2 python-factory-boy))
14555
14556 (define-public python-translate-toolkit
14557 (package
14558 (name "python-translate-toolkit")
14559 (version "2.1.0")
14560 (source
14561 (origin
14562 (method url-fetch)
14563 (uri (pypi-uri "translate-toolkit" version ".tar.bz2"))
14564 (sha256
14565 (base32 "1vlkwrg83vb17jc36pmwh2b7jphwf390lz0jw8hakcg16qhwypvq"))))
14566 (build-system python-build-system)
14567 (native-inputs
14568 `(("python-pytest" ,python-pytest)
14569 ("python-sphinx" ,python-sphinx)))
14570 (propagated-inputs
14571 `(("python-babel" ,python-babel)
14572 ("python-beautifulsoup4" ,python-beautifulsoup4)
14573 ("python-chardet" ,python-chardet)
14574 ("python-diff-match-patch" ,python-diff-match-patch)
14575 ("python-levenshtein" ,python-levenshtein)
14576 ("python-lxml" ,python-lxml)
14577 ("python-six" ,python-six)
14578 ("python-vobject" ,python-vobject)
14579 ("python-pyyaml" ,python-pyyaml)))
14580 (arguments
14581 ;; TODO: tests are not run, because they end with
14582 ;; TypeError: parse() missing 2 required positional arguments: 'tree' and
14583 ;; 'parse_funcs'
14584 ;; during test setup.
14585 `(#:tests? #f))
14586 (home-page "http://toolkit.translatehouse.org")
14587 (synopsis "Tools and API for translation and localization engineering")
14588 (description
14589 "Tools and API for translation and localization engineering. It contains
14590 several utilities, as well as an API for building localization tools.")
14591 (license license:gpl2+)))
14592
14593 (define-public python2-translate-toolkit
14594 (package-with-python2 python-translate-toolkit))
14595
14596 (define-public python-mysqlclient
14597 (package
14598 (name "python-mysqlclient")
14599 (version "1.3.10")
14600 (source
14601 (origin
14602 (method url-fetch)
14603 (uri (pypi-uri "mysqlclient" version))
14604 (sha256
14605 (base32
14606 "0qkj570x4rbsblji6frvsvp2v1ap32dqzj1lq62zp9515ffsyaj5"))))
14607 (build-system python-build-system)
14608 (native-inputs
14609 `(("mariadb" ,mariadb)
14610 ("nose" ,python-nose)
14611 ("mock" ,python-mock)
14612 ("py.test" ,python-pytest)))
14613 (inputs
14614 `(("mysql" ,mysql)
14615 ("libz" ,zlib)
14616 ("openssl" ,openssl)))
14617 (home-page "https://github.com/PyMySQL/mysqlclient-python")
14618 (synopsis "MySQLdb is an interface to the popular MySQL database server for Python")
14619 (description "MySQLdb is an interface to the popular MySQL database server
14620 for Python. The design goals are:
14621 @enumerate
14622 @item Compliance with Python database API version 2.0 [PEP-0249],
14623 @item Thread-safety,
14624 @item Thread-friendliness (threads will not block each other).
14625 @end enumerate")
14626 (license license:gpl2)))
14627
14628 (define-public python2-mysqlclient
14629 (package-with-python2 python-mysqlclient))
14630
14631 (define-public python-hiredis
14632 (package
14633 (name "python-hiredis")
14634 (version "0.2.0")
14635 (source
14636 (origin
14637 (method url-fetch)
14638 (uri (pypi-uri "hiredis" version))
14639 (sha256
14640 (base32
14641 "1dfm2k9l9zar9nw9fwmm74zrgraxdxs04vx9li56fjcf289qx5fa"))))
14642 (build-system python-build-system)
14643 (arguments
14644 ;; no tests
14645 `(#:tests? #f))
14646 (home-page "https://github.com/redis/hiredis-py")
14647 (synopsis "Python extension that wraps protocol parsing code in hiredis")
14648 (description "Python-hiredis is a python extension that wraps protocol
14649 parsing code in hiredis. It primarily speeds up parsing of multi bulk replies.")
14650 (license license:bsd-3)))
14651
14652 (define-public python2-hiredis
14653 (package-with-python2 python-hiredis))
14654
14655 (define-public python-fakeredis
14656 (package
14657 (name "python-fakeredis")
14658 (version "0.8.2")
14659 (source
14660 (origin
14661 (method url-fetch)
14662 (uri (pypi-uri "fakeredis" version))
14663 (sha256
14664 (base32
14665 "0zncahj3byyasyfx9i7k991ph0n0lq8v3a21pqri5qxn9564bk9r"))))
14666 (build-system python-build-system)
14667 (arguments
14668 ;; no tests
14669 `(#:tests? #f))
14670 (home-page "https://github.com/jamesls/fakeredis")
14671 (synopsis "Fake implementation of redis API for testing purposes")
14672 (description "Fakeredis is a pure python implementation of the redis-py
14673 python client that simulates talking to a redis server. This was created for a
14674 single purpose: to write unittests. Setting up redis is not hard, but many time
14675 you want to write unittests that do not talk to an external server (such as
14676 redis). This module now allows tests to simply use this module as a reasonable
14677 substitute for redis.")
14678 (license license:bsd-3)))
14679
14680 (define-public python2-fakeredis
14681 (package-with-python2 python-fakeredis))
14682
14683 (define-public python-behave-web-api
14684 (package
14685 (name "python-behave-web-api")
14686 (version "1.0.6")
14687 (source
14688 (origin
14689 (method url-fetch)
14690 (uri (pypi-uri "behave-web-api" version))
14691 (sha256
14692 (base32
14693 "03kpq2xsy1gab3jy0dccbxlsg7vwfy4lagss0qldwmx3xz6b3i19"))))
14694 (build-system python-build-system)
14695 (arguments
14696 `(#:phases
14697 (modify-phases %standard-phases
14698 (add-after 'unpack 'fix-dependencies
14699 (lambda _
14700 (substitute* "setup.py"
14701 (("'wheel'") "") ; We don't use it.
14702 (("'ordereddict==1.1'") ""))))))) ; Python >= 2.7 has it built-in.
14703 (propagated-inputs
14704 `(("behave" ,behave)
14705 ("python-requests" ,python-requests)))
14706 (home-page "https://github.com/jefersondaniel/behave-web-api")
14707 (synopsis "Provides testing for JSON APIs with Behave for Python")
14708 (description "This package provides testing utility modules for testing
14709 JSON APIs with Behave.")
14710 (license license:expat)))
14711
14712 (define-public python2-behave-web-api
14713 (package-with-python2 python-behave-web-api))
14714
14715 (define-public python-flask-script
14716 (package
14717 (name "python-flask-script")
14718 (version "2.0.5")
14719 (source
14720 (origin
14721 (method url-fetch)
14722 (uri (pypi-uri "Flask-Script" version))
14723 (sha256
14724 (base32
14725 "0zqh2yq8zk7m9b4xw1ryqmrljkdigfb3hk5155a3b5hkfnn6xxyf"))))
14726 (build-system python-build-system)
14727 (propagated-inputs
14728 `(("python-flask" ,python-flask)
14729 ("python-argcomplete" ,python-argcomplete)
14730 ("python-werkzeug" ,python-werkzeug)))
14731 (native-inputs
14732 `(("python-pytest" ,python-pytest)))
14733 (home-page
14734 "http://github.com/smurfix/flask-script")
14735 (synopsis "Scripting support for Flask")
14736 (description "The Flask-Script extension provides support for writing
14737 external scripts in Flask. This includes running a development server,
14738 a customised Python shell, scripts to set up your database, cronjobs,
14739 and other command-line tasks that belong outside the web application
14740 itself.")
14741 (license license:bsd-3)))
14742
14743 (define-public python2-flask-script
14744 (package-with-python2 python-flask-script))
14745
14746 (define-public python-flask-migrate
14747 (package
14748 (name "python-flask-migrate")
14749 (version "2.0.3")
14750 (source
14751 (origin
14752 (method url-fetch)
14753 (uri (pypi-uri "Flask-Migrate" version))
14754 (sha256
14755 (base32
14756 "107x78lkqsnbg92dld3dkagg07jvchp3ib3y0sivc4ipz6n1y7rk"))))
14757 (build-system python-build-system)
14758 (propagated-inputs
14759 `(("python-flask" ,python-flask)
14760 ("python-alembic" ,python-alembic)
14761 ("python-sqlalchemy" ,python-sqlalchemy)
14762 ("python-flask-script" ,python-flask-script)
14763 ("python-flask-sqlalchemy" ,python-flask-sqlalchemy)))
14764 (home-page "http://github.com/miguelgrinberg/flask-migrate/")
14765 (synopsis "SQLAlchemy database migrations for Flask programs using
14766 Alembic")
14767 (description "This package contains SQLAlchemy database migration tools
14768 for Flask programs that are using @code{python-alembic}.")
14769 (license license:expat)))
14770
14771 (define-public python2-flask-migrate
14772 (package-with-python2 python-flask-migrate))
14773
14774 (define-public python-packaging
14775 (package
14776 (name "python-packaging")
14777 (version "16.8")
14778 (source
14779 (origin
14780 (method url-fetch)
14781 (uri (pypi-uri "packaging" version))
14782 (sha256
14783 (base32
14784 "17k1xbjshackwvbsnxqixbph8rbqhz4bf4g3al5xyzhavxgq6l2x"))))
14785 (build-system python-build-system)
14786 (native-inputs
14787 `(("python-pretend" ,python-pretend)
14788 ("python-pytest" ,python-pytest)))
14789 (propagated-inputs
14790 `(("python-pyparsing" ,python-pyparsing)
14791 ("python-six" ,python-six)))
14792 (home-page "https://github.com/pypa/packaging")
14793 (synopsis "Core utilities for Python packages")
14794 (description "Packaging is a Python module for dealing with Python packages.
14795 It offers an interface for working with package versions, names, and dependency
14796 information.")
14797 ;; From 'LICENSE': This software is made available under the terms of
14798 ;; *either* of the licenses found in LICENSE.APACHE or LICENSE.BSD.
14799 ;; Contributions to this software is made under the terms of *both* these
14800 ;; licenses.
14801 (license (list license:asl2.0 license:bsd-2))))
14802
14803 (define-public python2-packaging
14804 (package-with-python2 python-packaging))
14805
14806 (define-public python-sql
14807 (package
14808 (name "python-sql")
14809 (version "0.9")
14810 (source
14811 (origin
14812 (method url-fetch)
14813 (uri (pypi-uri "python-sql" version))
14814 (sha256
14815 (base32
14816 "0p6kaqj02vz0habmdx37zjk6hjxdfm8aw737zs059vvpr70ird87"))))
14817 (build-system python-build-system)
14818 (home-page "https://python-sql.tryton.org/")
14819 (synopsis "Library to write SQL queries in a pythonic way")
14820 (description "@code{python-sql} is a library to write SQL queries, that
14821 transforms idiomatic python function calls to well-formed SQL queries.")
14822 (license license:bsd-3)))
14823
14824 (define-public python2-sql
14825 (package-with-python2 python-sql))
14826
14827 (define-public python-genshi
14828 (package
14829 (name "python-genshi")
14830 (version "0.7")
14831 (source
14832 (origin
14833 (method url-fetch)
14834 (uri (string-append
14835 "https://ftp.edgewall.org/pub/genshi/Genshi-"
14836 version ".tar.gz"))
14837 (patches
14838 (search-patches
14839 ;; The first 4 patches are in the master branch upstream.
14840 ;; See this as a reference https://genshi.edgewall.org/ticket/582
14841 ;; The last 2 are NOT in any branch.
14842 ;; They were sent as attachments to a ticket opened at
14843 ;; https://genshi.edgewall.org/ticket/602#no1
14844 "python-genshi-stripping-of-unsafe-script-tags.patch"
14845 "python-genshi-disable-speedups-on-python-3.3.patch"
14846 "python-genshi-isstring-helper.patch"
14847 "python-genshi-add-support-for-python-3.4-AST.patch"
14848 "python-genshi-fix-tests-on-python-3.5.patch"
14849 "python-genshi-buildable-on-python-2.7.patch"))
14850 (sha256
14851 (base32
14852 "0lkkbp6fbwzv0zda5iqc21rr7rdldkwh3hfabfjl9i4bwq14858x"))))
14853 (build-system python-build-system)
14854 (home-page "https://genshi.edgewall.org/")
14855 (synopsis "Toolkit for generation of output for the web")
14856 (description "Genshi is a Python library that provides an integrated set
14857 of components for parsing, generating, and processing HTML, XML or other
14858 textual content for output generation on the web.")
14859 (license license:bsd-3)))
14860
14861 ;; The linter here claims that patch file names should start with the package
14862 ;; name. But, in this case the patches are inherited from python-genshi with
14863 ;; the "python-genshi-" prefix instead of "python2-genshi-".
14864 (define-public python2-genshi
14865 (package-with-python2 python-genshi))
14866
14867 (define-public python-relatorio
14868 (package
14869 (name "python-relatorio")
14870 (version "0.6.4")
14871 (source
14872 (origin
14873 (method url-fetch)
14874 (uri (pypi-uri "relatorio" version))
14875 (sha256
14876 (base32
14877 "0lincq79mzgazwd9gh41dybjh9c3n87r83pl8nk3j79aihyfk84z"))))
14878 (build-system python-build-system)
14879 (propagated-inputs
14880 `(("python-lxml" ,python-lxml)
14881 ("python-genshi" ,python-genshi)))
14882 (home-page "https://relatorio.tryton.org/")
14883 (synopsis "Templating library able to output ODT and PDF files")
14884 (description "Relatorio is a templating library which provides a way to
14885 easily output ODT, ODS, PNG, SVG and several other kinds of files. Support
14886 for more filetypes can be easily added by creating plugins for them.")
14887 (license license:gpl3+)))
14888
14889 (define-public python2-relatorio
14890 (package-with-python2 python-relatorio))
14891
14892 (define-public python-radon
14893 (package
14894 (name "python-radon")
14895 (version "1.5.0")
14896 (source
14897 (origin
14898 (method url-fetch)
14899 (uri (pypi-uri "radon" version))
14900 (sha256
14901 (base32
14902 "1h6jv36am0i827182a04ki6291lyx4kp957xfr5njgprj4nd0qsl"))))
14903 (build-system python-build-system)
14904 (propagated-inputs
14905 `(("python-colorama" ,python-colorama)
14906 ("python-flake8-polyfill" ,python-flake8-polyfill)
14907 ("python-mando" ,python-mando-0.3.1)))
14908 (native-inputs
14909 `(("python-flake8" ,python-flake8)
14910 ("python-tox" ,python-tox)
14911 ("python-pytest" ,python-pytest)
14912 ("python-paramunittest" ,python-paramunittest)))
14913 (home-page "https://radon.readthedocs.org/")
14914 (synopsis "Code Metrics in Python")
14915 (description "Radon is a Python tool which computes various code metrics.
14916 Supported metrics are:
14917 @itemize @bullet
14918 @item raw metrics: SLOC, comment lines, blank lines, &c.
14919 @item Cyclomatic Complexity (i.e. McCabe’s Complexity)
14920 @item Halstead metrics (all of them)
14921 @item the Maintainability Index (a Visual Studio metric)
14922 @end itemize")
14923 (license license:expat)))
14924
14925 (define-public python2-radon
14926 (package-with-python2 python-radon))
14927
14928 (define-public python-sure
14929 (package
14930 (name "python-sure")
14931 (version "1.4.6")
14932 (source
14933 (origin
14934 (method url-fetch)
14935 (uri (pypi-uri "sure" version))
14936 (sha256
14937 (base32
14938 "1iyqsy2d6radi88g1qf0lziy5b39h5cpb3g5jiqyb4xi46ig3x1z"))))
14939 (build-system python-build-system)
14940 (propagated-inputs
14941 `(("python-mock" ,python-mock)
14942 ("python-six" ,python-six)))
14943 (native-inputs
14944 `(("python-nose" ,python-nose)))
14945 (home-page "https://github.com/gabrielfalcao/sure")
14946 (synopsis "Automated testing library in python for python")
14947 (description
14948 "Sure is a python library that leverages a DSL for writing assertions.
14949 Sure is heavily inspired by @code{RSpec Expectations} and @code{should.js}.")
14950 (license license:gpl3+)))
14951
14952 (define-public python2-sure
14953 (package-with-python2 python-sure))
14954
14955 (define-public python2-couleur
14956 ;; This package does not seem to support python3 at all, hence,
14957 ;; only the python2 variant definition is provided.
14958 (package
14959 (name "python2-couleur")
14960 (version "0.6.2")
14961 (source
14962 (origin
14963 (method url-fetch)
14964 (uri (pypi-uri "couleur" version))
14965 (sha256
14966 (base32
14967 "1qqaxyqz74wvid0cr119dhcwz0h0if5b5by44zl49pd5z65v58k1"))))
14968 (build-system python-build-system)
14969 (arguments
14970 `(#:python ,python-2))
14971 (home-page "https://github.com/gabrielfalcao/couleur")
14972 (synopsis
14973 "ANSI terminal tool for python, colored shell and other handy fancy features")
14974 (description
14975 "@code{Couleur} provides python programs a way to use the ANSI features in a unix
14976 terminal such as coloured output in the shell, overwriting output, indentation, etc.")
14977 ;; README.md says ASL2.0, but all source code headers are LGPL3+.
14978 ;; https://github.com/gabrielfalcao/couleur/issues/11
14979 (license license:lgpl3+)))
14980
14981 (define-public python-misaka
14982 (package
14983 (name "python-misaka")
14984 (version "2.1.0")
14985 (source
14986 (origin
14987 (method url-fetch)
14988 (uri (pypi-uri "misaka" version))
14989 (sha256
14990 (base32
14991 "1yqrq3a5rracirmvk52n28nn6ckdaz897gnigv89a9gmyn87sqw7"))))
14992 (build-system python-build-system)
14993 (arguments
14994 `(;; Line 37 of setup.py calls self.run_command('develop')
14995 ;; in the 'check' phase. This command seems to be trying
14996 ;; to write to
14997 ;; /gnu/store/...-python-<version>/lib/python<version>/site-packages/
14998 ;; for which it does not have the permission to write.
14999 #:tests? #f))
15000 (propagated-inputs
15001 `(("python-cffi" ,python-cffi)))
15002 (home-page "https://github.com/FSX/misaka")
15003 (synopsis "Python binding for Hoedown")
15004 (description
15005 "@code{Misaka} is a CFFI-based binding for @code{Hoedown}, a fast markdown processing
15006 library written in C. It features a fast HTML renderer and functionality to make custom
15007 renderers (e.g. man pages or LaTeX).")
15008 (license license:expat)))
15009
15010 (define-public python2-misaka
15011 (package-with-python2 python-misaka))
15012
15013 (define-public python2-steadymark
15014 ;; This is forced into being a python2 only variant
15015 ;; due to its dependence on couleur that has no support
15016 ;; for python3
15017 (package
15018 (name "python2-steadymark")
15019 (version "0.7.3")
15020 (source
15021 (origin
15022 (method url-fetch)
15023 (uri (pypi-uri "steadymark" version))
15024 (sha256
15025 (base32
15026 "1640i9g8dycql3cc8j0bky0jkzj0q39blfbp4lsgpkprkfgcdk8v"))))
15027 (build-system python-build-system)
15028 (native-inputs
15029 `(("python-couleur" ,python2-couleur)
15030 ("python-sure" ,python2-sure)
15031 ("python-misaka" ,python2-misaka)))
15032 (arguments
15033 `(#:python ,python-2
15034 #:phases
15035 (modify-phases %standard-phases
15036 (add-before 'build 'patch-setup-py
15037 (lambda _
15038 ;; Update requirements from dependency==version
15039 ;; to dependency>=version
15040 (substitute* "setup.py"
15041 (("==") ">="))
15042 #t)))))
15043 (home-page "https://github.com/gabrielfalcao/steadymark")
15044 (synopsis "Markdown-based test runner for python")
15045 (description
15046 "@code{Steadymark} allows documentation to be written in github-flavoured
15047 markdown. The documentation may contain snippets of code surrounded by python
15048 code blocks and @code{Steadymark} will find these snippets and run them, making
15049 sure that there are no old malfunctional examples in the documentation examples.")
15050 (license license:expat)))
15051
15052 (define-public python-nose-randomly
15053 (package
15054 (name "python-nose-randomly")
15055 (version "1.2.5")
15056 (source
15057 (origin
15058 (method url-fetch)
15059 (uri (pypi-uri "nose-randomly" version))
15060 (sha256
15061 (base32
15062 "1cw9dlr1zh3w4i438kin7z0rm8092ki52hayisyc43h9pcplq7rn"))))
15063 (build-system python-build-system)
15064 (native-inputs
15065 `(("python-nose" ,python-nose)
15066 ("python-numpy" ,python-numpy)))
15067 (home-page "https://github.com/adamchainz/nose-randomly")
15068 (synopsis
15069 "Nose plugin to randomly order tests and control random.seed")
15070 (description
15071 "This is a @code{Nose} plugin to randomly order tests which can be quite
15072 powerful in discovering hidden flaws in the tests themselves, while helping to
15073 reduce inter-test dependencies. It also helps in controlling @code{random.seed},
15074 by resetting it to a repeatable number for each test, enabling the tests to
15075 create data based on random numbers and yet remain repeatable.")
15076 (license license:bsd-3)))
15077
15078 (define-public python2-nose-randomly
15079 (package-with-python2 python-nose-randomly))
15080
15081 (define-public python-jsonpointer
15082 (package
15083 (name "python-jsonpointer")
15084 (version "1.10")
15085 (source
15086 (origin
15087 (method url-fetch)
15088 (uri (pypi-uri "jsonpointer" version))
15089 (sha256
15090 (base32
15091 "1cg0gvgqjysydv6p45v4jywg1jb3v48c7m3cbpi57zgf6nndr9cz"))))
15092 (build-system python-build-system)
15093 (home-page "https://github.com/stefankoegl/python-json-pointer")
15094 (synopsis "Identify specific nodes in a JSON document")
15095 (description "@code{jsonpointer} allows you to access specific nodes
15096 by path in a JSON document (see RFC 6901).")
15097 (license license:bsd-3)))
15098
15099 (define-public python2-jsonpointer
15100 (package-with-python2 python-jsonpointer))
15101
15102 (define-public python-rfc3987
15103 (package
15104 (name "python-rfc3987")
15105 (version "1.3.7")
15106 (source
15107 (origin
15108 (method url-fetch)
15109 (uri (pypi-uri "rfc3987" version))
15110 (sha256
15111 (base32
15112 "192pclzs2y0yaywqkrlvd0x73740q310kvqvm6jldhi619mq59wi"))))
15113 (build-system python-build-system)
15114 (home-page "http://pypi.python.org/pypi/rfc3987")
15115 (synopsis "Parsing and validation of URIs (RFC 3986) and IRIs (RFC 3987)")
15116 (description "@code{rfc3987} provides routines for parsing and
15117 validation of URIs (see RFC 3986) and IRIs (see RFC 3987).")
15118 (license license:gpl3+)))
15119
15120 (define-public python2-rfc3987
15121 (package-with-python2 python-rfc3987))
15122
15123 (define-public python-validate-email
15124 (package
15125 (name "python-validate-email")
15126 (version "1.3")
15127 (source
15128 (origin
15129 (method url-fetch)
15130 (uri (pypi-uri "validate_email" version))
15131 (sha256
15132 (base32
15133 "1bxffaf5yz2cph8ki55vdvdypbwkvn2xr1firlcy62vqbzf1jivq"))))
15134 (build-system python-build-system)
15135 (home-page "http://github.com/syrusakbary/validate_email")
15136 (synopsis "Verifies if an email address is valid and really exists")
15137 (description "@code{validate_email} can be used to verify if an email
15138 address is valid and really exists.")
15139 (license license:lgpl3+)))
15140
15141 (define-public python2-validate-email
15142 (package-with-python2 python-validate-email))
15143
15144 (define-public python-flex
15145 (package
15146 (name "python-flex")
15147 (version "6.10.0")
15148 (source
15149 (origin
15150 (method url-fetch)
15151 (uri (pypi-uri "flex" version))
15152 (sha256
15153 (base32
15154 "00pamnwla3khk8nyla7y28dq9jnh69swd7f4jfsl7sn1izs8n8zk"))))
15155 (build-system python-build-system)
15156 (propagated-inputs
15157 `(("python-click" ,python-click)
15158 ("python-iso8601" ,python-iso8601)
15159 ("python-jsonpointer" ,python-jsonpointer)
15160 ("python-pyyaml" ,python-pyyaml)
15161 ("python-requests" ,python-requests)
15162 ("python-rfc3987" ,python-rfc3987)
15163 ("python-six" ,python-six)
15164 ("python-validate-email" ,python-validate-email)))
15165 (home-page "https://github.com/pipermerriam/flex")
15166 (synopsis "Validates Swagger schemata")
15167 (description "@code{flex} can be used to validate Swagger schemata.")
15168 (license license:bsd-3)))
15169
15170 (define-public python2-flex
15171 (package-with-python2 python-flex))
15172
15173 (define-public python-marshmallow
15174 (package
15175 (name "python-marshmallow")
15176 (version "3.0.0b2")
15177 (source
15178 (origin
15179 (method url-fetch)
15180 (uri (pypi-uri "marshmallow" version))
15181 (sha256
15182 (base32
15183 "11bnpvfdbczr74177p295zbkdrax2cahvbj5bqhhlprgz2xxi5d9"))))
15184 (build-system python-build-system)
15185 (propagated-inputs
15186 `(("python-dateutil" ,python-dateutil)
15187 ("python-simplejson" ,python-simplejson)))
15188 (native-inputs
15189 `(("python-pytest-3.0" ,python-pytest-3.0)
15190 ("python-pytz" ,python-pytz)))
15191 (home-page "https://github.com/marshmallow-code/marshmallow")
15192 (synopsis "Convert complex datatypes to and from native
15193 Python datatypes.")
15194 (description "@code{marshmallow} provides a library for converting
15195 complex datatypes to and from native Python datatypes.")
15196 (license license:expat)))
15197
15198 (define-public python2-marshmallow
15199 (package-with-python2 python-marshmallow))
15200
15201 (define-public python-bottle
15202 (package
15203 (name "python-bottle")
15204 (version "0.12.13")
15205 (source
15206 (origin
15207 (method url-fetch)
15208 (uri (pypi-uri "bottle" version))
15209 (sha256
15210 (base32
15211 "0m9k2a7yxvggc4kw8fsvj381vgsvfcdshg5nzy6vwrxiw2p53drr"))))
15212 (build-system python-build-system)
15213 (home-page "http://bottlepy.org/")
15214 (synopsis "WSGI framework for small web-applications.")
15215 (description "@code{python-bottle} is a WSGI framework for small web-applications.")
15216 (license license:expat)))
15217
15218 (define-public python2-bottle
15219 (package-with-python2 python-bottle))
15220
15221 (define-public python-apispec
15222 (package
15223 (name "python-apispec")
15224 (version "0.22.0")
15225 (source
15226 (origin
15227 (method url-fetch)
15228 (uri (pypi-uri "apispec" version))
15229 (sha256
15230 (base32
15231 "0y3jxmgp2d24am3hxl40f5rw9abb0r8037sagax3dv64h4n1azwq"))))
15232 (build-system python-build-system)
15233 (propagated-inputs
15234 `(("python-pyyaml" ,python-pyyaml)))
15235 (native-inputs
15236 `(("python-pytest-3.0" ,python-pytest-3.0)
15237 ("python-flask" ,python-flask)
15238 ("python-marshmallow" ,python-marshmallow)
15239 ("python-tornado" ,python-tornado)
15240 ("python-bottle" ,python-bottle)
15241 ("python-mock" ,python-mock)))
15242 (home-page "https://github.com/marshmallow-code/apispec")
15243 (synopsis "Swagger 2.0 API specification generator")
15244 (description "@code{python-apispec} is a pluggable API specification
15245 generator. Currently supports the OpenAPI specification (f.k.a.
15246 Swagger 2.0).")
15247 (license license:expat)))
15248
15249 (define-public python2-apispec
15250 (package-with-python2 python-apispec))
15251
15252 (define-public python-flasgger
15253 (package
15254 (name "python-flasgger")
15255 (version "0.6.3")
15256 (source
15257 (origin
15258 (method url-fetch)
15259 (uri (string-append "https://github.com/rochacbruno/flasgger/archive/"
15260 version ".tar.gz"))
15261 (file-name (string-append name "-" version ".tar.gz"))
15262 (sha256
15263 (base32
15264 "1gqzlm0rb55fdpsy5ipkganlx9cnpi454fqyycr03jm22zql14ay"))))
15265 (build-system python-build-system)
15266 (arguments
15267 `(#:phases
15268 (modify-phases %standard-phases
15269 (replace 'check
15270 (lambda* (#:key inputs outputs #:allow-other-keys)
15271 (substitute* "Makefile"
15272 (("flake8 flasgger --ignore=F403")
15273 "flake8 flasgger --ignore=E731,F403"))
15274 (setenv "PYTHONPATH" (string-append (getcwd)
15275 ":"
15276 (getenv "PYTHONPATH")))
15277 (zero? (system* "py.test")))))))
15278 (propagated-inputs
15279 `(("python-flask" ,python-flask)
15280 ("python-pyyaml" ,python-pyyaml)
15281 ("python-jsonschema" ,python-jsonschema)
15282 ("python-mistune" ,python-mistune)
15283 ("python-six" ,python-six)))
15284 (native-inputs
15285 `(("python-decorator" ,python-decorator)
15286 ("python-flake8" ,python-flake8)
15287 ("python-flask-restful" ,python-flask-restful)
15288 ("python-flex" ,python-flex)
15289 ("python-pytest-3.0" ,python-pytest-3.0)
15290 ("python-pytest-cov" ,python-pytest-cov)
15291 ("python-marshmallow" ,python-marshmallow)
15292 ("python-apispec" ,python-apispec)))
15293 (home-page "https://github.com/rochacbruno/flasgger/")
15294 (synopsis "Extract Swagger specs from your Flask project")
15295 (description "@code{python-flasgger} allows extracting Swagger specs
15296 from your Flask project. It is a fork of Flask-Swagger.")
15297 (license license:expat)))
15298
15299 (define-public python2-flasgger
15300 (package-with-python2 python-flasgger))
15301
15302 (define-public python-swagger-spec-validator
15303 (package
15304 (name "python-swagger-spec-validator")
15305 (version "2.1.0")
15306 (source
15307 (origin
15308 (method url-fetch)
15309 (uri (pypi-uri "swagger-spec-validator" version))
15310 (sha256
15311 (base32
15312 "13hkpn2lycwr0468yqhjb3kwszqf7hjwlq61w7vdxq1caz31k4nw"))))
15313 (build-system python-build-system)
15314 (propagated-inputs
15315 `(("python-jsonschema" ,python-jsonschema)
15316 ("python-six" ,python-six)))
15317 (home-page
15318 "http://github.com/Yelp/swagger_spec_validator")
15319 (synopsis "Validation of Swagger specifications")
15320 (description "@code{swagger_spec_validator} provides a library for
15321 validating Swagger API specifications.")
15322 (license license:asl2.0)))
15323
15324 (define-public python2-swagger-spec-validator
15325 (package-with-python2 python-swagger-spec-validator))