gnu: Add python-apache-libcloud.
[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 ssh)
102 #:use-module (gnu packages statistics)
103 #:use-module (gnu packages tex)
104 #:use-module (gnu packages texinfo)
105 #:use-module (gnu packages tls)
106 #:use-module (gnu packages version-control)
107 #:use-module (gnu packages video)
108 #:use-module (gnu packages web)
109 #:use-module (gnu packages base)
110 #:use-module (gnu packages xml)
111 #:use-module (gnu packages xorg)
112 #:use-module (gnu packages xdisorg)
113 #:use-module (gnu packages zip)
114 #:use-module (gnu packages tcl)
115 #:use-module (gnu packages bdw-gc)
116 #:use-module (guix packages)
117 #:use-module (guix download)
118 #:use-module (guix git-download)
119 #:use-module (guix utils)
120 #:use-module (guix build-system gnu)
121 #:use-module (guix build-system cmake)
122 #:use-module (guix build-system python)
123 #:use-module (guix build-system trivial)
124 #:use-module (srfi srfi-1))
125
126 (define-public python-2.7
127 (package
128 (name "python")
129 (version "2.7.13")
130 (source
131 (origin
132 (method url-fetch)
133 (uri (string-append "https://www.python.org/ftp/python/"
134 version "/Python-" version ".tar.xz"))
135 (sha256
136 (base32
137 "0cgpk3zk0fgpji59pb4zy9nzljr70qzgv1vpz5hq5xw2d2c47m9m"))
138 (patches (search-patches "python-2.7-search-paths.patch"
139 "python-2-deterministic-build-info.patch"
140 "python-2.7-site-prefixes.patch"
141 "python-2.7-source-date-epoch.patch"
142 "python-2.7-getentropy-on-old-kernels.patch"))
143 (modules '((guix build utils)))
144 ;; suboptimal to delete failing tests here, but if we delete them in the
145 ;; arguments then we need to make sure to strip out that phase when it
146 ;; gets inherited by python and python-minimal.
147 (snippet
148 '(begin
149 (for-each delete-file
150 '("Lib/test/test_compileall.py"
151 "Lib/test/test_ctypes.py" ; fails on mips64el
152 "Lib/test/test_distutils.py"
153 "Lib/test/test_import.py"
154 "Lib/test/test_shutil.py"
155 "Lib/test/test_socket.py"
156 "Lib/test/test_subprocess.py"))
157 #t))))
158 (outputs '("out"
159 "tk")) ;tkinter; adds 50 MiB to the closure
160 (build-system gnu-build-system)
161 (arguments
162 `(;; 356 tests OK.
163 ;; 6 tests failed:
164 ;; test_compileall test_distutils test_import test_shutil test_socket
165 ;; test_subprocess
166 ;; 39 tests skipped:
167 ;; test_aepack test_al test_applesingle test_bsddb test_bsddb185
168 ;; test_bsddb3 test_cd test_cl test_codecmaps_cn test_codecmaps_hk
169 ;; test_codecmaps_jp test_codecmaps_kr test_codecmaps_tw test_curses
170 ;; test_dl test_gdb test_gl test_imageop test_imgfile test_ioctl
171 ;; test_kqueue test_linuxaudiodev test_macos test_macostools
172 ;; test_msilib test_ossaudiodev test_scriptpackages test_smtpnet
173 ;; test_socketserver test_startfile test_sunaudiodev test_timeout
174 ;; test_tk test_ttk_guionly test_urllib2net test_urllibnet
175 ;; test_winreg test_winsound test_zipfile64
176 ;; 4 skips unexpected on linux2:
177 ;; test_bsddb test_bsddb3 test_gdb test_ioctl
178 #:test-target "test"
179 #:configure-flags
180 (list "--enable-shared" ;allow embedding
181 "--with-system-ffi" ;build ctypes
182 "--with-ensurepip=install" ;install pip and setuptools
183 "--enable-unicode=ucs4"
184 (string-append "LDFLAGS=-Wl,-rpath="
185 (assoc-ref %outputs "out") "/lib"))
186
187 #:modules ((ice-9 ftw) (ice-9 match)
188 (guix build utils) (guix build gnu-build-system))
189 #:phases
190 (modify-phases %standard-phases
191 (add-before
192 'configure 'patch-lib-shells
193 (lambda _
194 ;; Filter for existing files, since some may not exist in all
195 ;; versions of python that are built with this recipe.
196 (substitute* (filter file-exists?
197 '("Lib/subprocess.py"
198 "Lib/popen2.py"
199 "Lib/distutils/tests/test_spawn.py"
200 "Lib/test/test_subprocess.py"))
201 (("/bin/sh") (which "sh")))
202
203 ;; Use zero as the timestamp in .pyc files so that builds are
204 ;; deterministic. TODO: Remove it when this variable is set in
205 ;; gnu-build-system.scm.
206 (setenv "SOURCE_DATE_EPOCH" "1")
207 #t))
208 (add-before 'configure 'do-not-record-configure-flags
209 (lambda* (#:key configure-flags #:allow-other-keys)
210 ;; Remove configure flags from the installed '_sysconfigdata.py'
211 ;; and 'Makefile' so we don't end up keeping references to the
212 ;; build tools.
213 ;;
214 ;; Preserve at least '--with-system-ffi' since otherwise the
215 ;; thing tries to build libffi, fails, and we end up with a
216 ;; Python that lacks ctypes.
217 (substitute* "configure"
218 (("^CONFIG_ARGS=.*$")
219 (format #f "CONFIG_ARGS='~a'\n"
220 (if (member "--with-system-ffi" configure-flags)
221 "--with-system-ffi"
222 ""))))
223 #t))
224 (add-before
225 'check 'pre-check
226 (lambda _
227 ;; 'Lib/test/test_site.py' needs a valid $HOME
228 (setenv "HOME" (getcwd))
229 #t))
230 (add-after
231 'unpack 'set-source-file-times-to-1980
232 ;; XXX One of the tests uses a ZIP library to pack up some of the
233 ;; source tree, and fails with "ZIP does not support timestamps
234 ;; before 1980". Work around this by setting the file times in the
235 ;; source tree to sometime in early 1980.
236 (lambda _
237 (let ((circa-1980 (* 10 366 24 60 60)))
238 (ftw "." (lambda (file stat flag)
239 (utime file circa-1980 circa-1980)
240 #t))
241 #t)))
242 (add-after 'install 'remove-tests
243 ;; Remove 25 MiB of unneeded unit tests. Keep test_support.*
244 ;; because these files are used by some libraries out there.
245 (lambda* (#:key outputs #:allow-other-keys)
246 (let ((out (assoc-ref outputs "out")))
247 (match (scandir (string-append out "/lib")
248 (lambda (name)
249 (string-prefix? "python" name)))
250 ((pythonX.Y)
251 (let ((testdir (string-append out "/lib/" pythonX.Y
252 "/test")))
253 (with-directory-excursion testdir
254 (for-each delete-file-recursively
255 (scandir testdir
256 (match-lambda
257 ((or "." "..") #f)
258 (file
259 (not
260 (string-prefix? "test_support."
261 file))))))
262 (call-with-output-file "__init__.py" (const #t))
263 #t)))))))
264 (add-before 'strip 'make-libraries-writable
265 (lambda* (#:key outputs #:allow-other-keys)
266 ;; Make .so files writable so they can be stripped.
267 (let ((out (assoc-ref outputs "out")))
268 (for-each (lambda (file)
269 (chmod file #o755))
270 (find-files (string-append out "/lib")
271 "\\.so"))
272 #t)))
273 (add-after 'install 'move-tk-inter
274 (lambda* (#:key outputs #:allow-other-keys)
275 ;; When Tkinter support is built move it to a separate output so
276 ;; that the main output doesn't contain a reference to Tcl/Tk.
277 (let ((out (assoc-ref outputs "out"))
278 (tk (assoc-ref outputs "tk")))
279 (when tk
280 (match (find-files out "tkinter.*\\.so")
281 ((tkinter.so)
282 ;; The .so is in OUT/lib/pythonX.Y/lib-dynload, but we
283 ;; want it under TK/lib/pythonX.Y/site-packages.
284 (let* ((len (string-length out))
285 (target (string-append
286 tk "/"
287 (string-drop
288 (dirname (dirname tkinter.so))
289 len)
290 "/site-packages")))
291 (install-file tkinter.so target)
292 (delete-file tkinter.so)))))
293 #t))))))
294 (inputs
295 `(("bzip2" ,bzip2)
296 ("gdbm" ,gdbm)
297 ("libffi" ,libffi) ; for ctypes
298 ("sqlite" ,sqlite) ; for sqlite extension
299 ("openssl" ,openssl)
300 ("readline" ,readline)
301 ("zlib" ,zlib)
302 ("tcl" ,tcl)
303 ("tk" ,tk))) ; for tkinter
304 (native-inputs
305 `(("pkg-config" ,pkg-config)))
306 (native-search-paths
307 (list (search-path-specification
308 (variable "PYTHONPATH")
309 (files '("lib/python2.7/site-packages")))))
310 (home-page "https://www.python.org")
311 (synopsis "High-level, dynamically-typed programming language")
312 (description
313 "Python is a remarkably powerful dynamic programming language that
314 is used in a wide variety of application domains. Some of its key
315 distinguishing features include: clear, readable syntax; strong
316 introspection capabilities; intuitive object orientation; natural
317 expression of procedural code; full modularity, supporting hierarchical
318 packages; exception-based error handling; and very high level dynamic
319 data types.")
320 (license license:psfl)))
321
322 ;; Current 2.x version.
323 (define-public python-2 python-2.7)
324
325 (define-public python-3.5
326 (package (inherit python-2)
327 (version "3.5.3")
328 (source (origin
329 (method url-fetch)
330 (uri (string-append "https://www.python.org/ftp/python/"
331 version "/Python-" version ".tar.xz"))
332 (patches (search-patches
333 "python-fix-tests.patch"
334 "python-3.5-fix-tests.patch"
335 "python-3.5-getentropy-on-old-kernels.patch"
336 "python-3-deterministic-build-info.patch"
337 "python-3-search-paths.patch"))
338 (patch-flags '("-p0"))
339 (sha256
340 (base32
341 "1c6v1n9nz4mlx9mw1125fxpmbrgniqdbbx9hnqx44maqazb2mzpf"))
342 (snippet
343 '(delete-file
344 "Lib/ctypes/test/test_win32.py")))) ; fails on aarch64
345 (arguments (substitute-keyword-arguments (package-arguments python-2)
346 ((#:tests? _) #t)))
347 (native-search-paths
348 (list (search-path-specification
349 (variable "PYTHONPATH")
350 (files (list (string-append "lib/python"
351 (version-major+minor version)
352 "/site-packages"))))))))
353
354 ;; Current 3.x version.
355 (define-public python-3 python-3.5)
356
357 ;; Current major version.
358 (define-public python python-3)
359
360 ;; Minimal variants of Python, mostly used to break the cycle between Tk and
361 ;; Python (Tk -> libxcb -> Python.)
362
363 (define-public python2-minimal
364 (package (inherit python-2)
365 (name "python-minimal")
366 (outputs '("out"))
367
368 ;; Keep zlib, which is used by 'pip' (via the 'zipimport' module), which
369 ;; is invoked upon 'make install'. 'pip' also expects 'ctypes' and thus
370 ;; libffi.
371 (inputs `(("libffi" ,libffi)
372 ("zlib" ,zlib)))))
373
374 (define-public python-minimal
375 (package (inherit python)
376 (name "python-minimal")
377 (outputs '("out"))
378
379 ;; Build fails due to missing ctypes without libffi.
380 ;; OpenSSL is a mandatory dependency of Python 3.x, for urllib;
381 ;; zlib is required by 'zipimport', used by pip.
382 (inputs `(("libffi" ,libffi)
383 ("openssl" ,openssl)
384 ("zlib" ,zlib)))))
385
386 (define* (wrap-python3 python
387 #:optional
388 (name (string-append (package-name python) "-wrapper")))
389 (package (inherit python)
390 (name name)
391 (source #f)
392 (build-system trivial-build-system)
393 (outputs '("out"))
394 (inputs `(("bash" ,bash)))
395 (propagated-inputs `(("python" ,python)))
396 (arguments
397 `(#:modules ((guix build utils))
398 #:builder
399 (begin
400 (use-modules (guix build utils))
401 (let ((bin (string-append (assoc-ref %outputs "out") "/bin"))
402 (python (string-append (assoc-ref %build-inputs "python") "/bin/")))
403 (mkdir-p bin)
404 (for-each
405 (lambda (old new)
406 (symlink (string-append python old)
407 (string-append bin "/" new)))
408 `("python3" ,"pydoc3" ,"idle3" ,"pip3")
409 `("python" ,"pydoc" ,"idle" ,"pip"))
410 ;; python-config outputs search paths based upon its location,
411 ;; use a bash wrapper to avoid changing its outputs.
412 (let ((bash (string-append (assoc-ref %build-inputs "bash")
413 "/bin/bash"))
414 (old (string-append python "python3-config"))
415 (new (string-append bin "/python-config")))
416 (with-output-to-file new
417 (lambda ()
418 (format #t "#!~a~%" bash)
419 (format #t "exec \"~a\" \"$@\"~%" old)
420 (chmod new #o755)
421 #t)))))))
422 (synopsis "Wrapper for the Python 3 commands")
423 (description
424 "This package provides wrappers for the commands of Python@tie{}3.x such
425 that they can be invoked under their usual name---e.g., @command{python}
426 instead of @command{python3}.")))
427
428 (define-public python-wrapper (wrap-python3 python))
429 (define-public python-minimal-wrapper (wrap-python3 python-minimal))
430
431 (define-public python-psutil
432 (package
433 (name "python-psutil")
434 (version "4.3.0")
435 (source
436 (origin
437 (method url-fetch)
438 (uri (pypi-uri "psutil" version))
439 (sha256
440 (base32
441 "1w4r09fvn6kd80m5mx4ws1wz100brkaq6hzzpwrns8cgjzjpl6c6"))))
442 (build-system python-build-system)
443 (arguments
444 ;; FIXME: some tests does not return and times out.
445 '(#:tests? #f))
446 (home-page "https://www.github.com/giampaolo/psutil")
447 (synopsis "Library for retrieving information on running processes")
448 (description
449 "psutil (Python system and process utilities) is a library for retrieving
450 information on running processes and system utilization (CPU, memory, disks,
451 network) in Python. It is useful mainly for system monitoring, profiling and
452 limiting process resources and management of running processes. It implements
453 many functionalities offered by command line tools such as: ps, top, lsof,
454 netstat, ifconfig, who, df, kill, free, nice, ionice, iostat, iotop, uptime,
455 pidof, tty, taskset, pmap.")
456 (license license:bsd-3)))
457
458 (define-public python2-psutil
459 (package-with-python2 python-psutil))
460
461 (define-public python-passlib
462 (package
463 (name "python-passlib")
464 (version "1.7.1")
465 (source
466 (origin
467 (method url-fetch)
468 (uri (pypi-uri "passlib" version))
469 (sha256
470 (base32
471 "1q2khqpj9rlcgdmkypjdq1kswvhjf72bq0zk2cv669cc2dj8z51x"))))
472 (build-system python-build-system)
473 (native-inputs
474 `(("python-nose" ,python-nose)))
475 (propagated-inputs
476 `(("python-py-bcrypt" ,python-py-bcrypt)))
477 (arguments
478 `(#:phases
479 (alist-cons-before
480 'check 'set-PYTHON_EGG_CACHE
481 ;; some tests require access to "$HOME/.cython"
482 (lambda* _ (setenv "PYTHON_EGG_CACHE" "/tmp"))
483 %standard-phases)))
484 (home-page "https://bitbucket.org/ecollins/passlib")
485 (synopsis
486 "Comprehensive password hashing framework")
487 (description
488 "Passlib is a password hashing library for Python 2 & 3, which provides
489 cross-platform implementations of over 30 password hashing algorithms, as well
490 as a framework for managing existing password hashes. It's designed to be
491 useful for a wide range of tasks, from verifying a hash found in /etc/shadow,
492 to providing full-strength password hashing for multi-user application.")
493 (license license:bsd-3)))
494
495 (define-public python2-passlib
496 (package-with-python2 python-passlib))
497
498 (define-public python-py-bcrypt
499 (package
500 (name "python-py-bcrypt")
501 (version "0.4")
502 (source
503 (origin
504 (method url-fetch)
505 (uri (string-append
506 "https://pypi.python.org/packages/source/p/py-bcrypt/py-bcrypt-"
507 version
508 ".tar.gz"))
509 (sha256
510 (base32
511 "0y6smdggwi5s72v6p1nn53dg6w05hna3d264cq6kas0lap73p8az"))))
512 (build-system python-build-system)
513 (home-page "https://code.google.com/p/py-bcrypt")
514 (synopsis
515 "Bcrypt password hashing and key derivation")
516 (description
517 "A python wrapper of OpenBSD's Blowfish password hashing code. This
518 system hashes passwords using a version of Bruce Schneier's Blowfish block
519 cipher with modifications designed to raise the cost of off-line password
520 cracking and frustrate fast hardware implementation. The computation cost of
521 the algorithm is parametised, so it can be increased as computers get faster.
522 The intent is to make a compromise of a password database less likely to
523 result in an attacker gaining knowledge of the plaintext passwords (e.g. using
524 John the Ripper).")
525 ;; "sha2.c" is under BSD-3;
526 ;; "blowfish.c" and "bcrypt.c" are under BSD-4;
527 ;; the rest is under ISC.
528 (license (list license:isc license:bsd-3 license:bsd-4))))
529
530 (define-public python2-py-bcrypt
531 (package-with-python2 python-py-bcrypt))
532
533
534 (define-public python-paramiko
535 (package
536 (name "python-paramiko")
537 (version "2.1.2")
538 (source
539 (origin
540 (method url-fetch)
541 (uri (pypi-uri "paramiko" version))
542 (sha256
543 (base32
544 "04734n0wy3hxk6rij4fr29in5jmr70nxpc7pqi2ksbjysfz4kbjz"))))
545 (build-system python-build-system)
546 (arguments
547 '(#:phases
548 (modify-phases %standard-phases
549 (replace 'check
550 (lambda _
551 (zero? (system* "python" "test.py")))))))
552 (propagated-inputs
553 `(("python-pyasn1" ,python-pyasn1)
554 ("python-cryptography" ,python-cryptography)))
555 (home-page "http://www.paramiko.org/")
556 (synopsis "SSHv2 protocol library")
557 (description "Paramiko is a python implementation of the SSHv2 protocol,
558 providing both client and server functionality. While it leverages a Python C
559 extension for low level cryptography (PyCrypto), Paramiko itself is a pure
560 Python interface around SSH networking concepts.")
561 (license license:lgpl2.1+)))
562
563 (define-public python2-paramiko
564 (package-with-python2 python-paramiko))
565
566
567 (define-public python-httplib2
568 (package
569 (name "python-httplib2")
570 (version "0.9.2")
571 (source
572 (origin
573 (method url-fetch)
574 (uri (pypi-uri "httplib2" version))
575 (sha256
576 (base32
577 "126rsryvw9vhbf3qmsfw9lf4l4xm2srmgs439lgma4cpag4s3ay3"))))
578 (build-system python-build-system)
579 (home-page "https://github.com/jcgregorio/httplib2")
580 (synopsis "Comprehensive HTTP client library")
581 (description
582 "A comprehensive HTTP client library supporting many features left out of
583 other HTTP libraries.")
584 (license license:expat)))
585
586 (define-public python2-httplib2
587 (package-with-python2 python-httplib2))
588
589 (define-public python-ecdsa
590 (package
591 (name "python-ecdsa")
592 (version "0.13")
593 (source
594 (origin
595 (method url-fetch)
596 (uri (string-append
597 "https://pypi.python.org/packages/source/e/ecdsa/ecdsa-"
598 version
599 ".tar.gz"))
600 (sha256
601 (base32
602 "1yj31j0asmrx4an9xvsaj2icdmzy6pw0glfpqrrkrphwdpi1xkv4"))))
603 (build-system python-build-system)
604 (inputs
605 `(("openssl" ,openssl)))
606 (home-page
607 "https://github.com/warner/python-ecdsa")
608 (synopsis
609 "ECDSA cryptographic signature library (pure python)")
610 (description
611 "This is an easy-to-use implementation of ECDSA cryptography (Elliptic
612 Curve Digital Signature Algorithm), implemented purely in Python. With this
613 library, you can quickly create keypairs (signing key and verifying key), sign
614 messages, and verify the signatures. The keys and signatures are very short,
615 making them easy to handle and incorporate into other protocols.")
616 (license license:expat)))
617
618 (define-public python2-ecdsa
619 (package-with-python2 python-ecdsa))
620
621 (define-public python-ccm
622 (package
623 (name "python-ccm")
624 (version "2.1.6")
625 (source
626 (origin
627 (method url-fetch)
628 (uri (pypi-uri "ccm" version))
629 (sha256
630 (base32
631 "177dfxsmk3k4cih6fh6v8d91bh4nqx7ns6pc07w7m7i3cvdx3c8n"))))
632 (build-system python-build-system)
633 (propagated-inputs
634 `(("python-pyyaml" ,python-pyyaml)
635 ;; Not listed in setup.py, but used in ccmlib/node.py for full
636 ;; functionality
637 ("python-psutil" ,python-psutil)
638 ("python-six" ,python-six)))
639 (home-page "https://github.com/pcmanus/ccm")
640 (synopsis "Cassandra Cluster Manager for Apache Cassandra clusters on
641 localhost")
642 (description "Cassandra Cluster Manager is a development tool for testing
643 local Cassandra clusters. It creates, launches and removes Cassandra clusters
644 on localhost.")
645 (license license:asl2.0)))
646
647 (define-public python2-ccm
648 (package-with-python2 python-ccm))
649
650 (define-public python-pytz
651 (package
652 (name "python-pytz")
653 (version "2016.10")
654 (source
655 (origin
656 (method url-fetch)
657 (uri (pypi-uri "pytz" version ".tar.bz2"))
658 (sha256
659 (base32
660 "0az099cyp6p5xbsvfcdacj4hvxncbwm2ayn3h55mcp07zb2b45kh"))))
661 (build-system python-build-system)
662 (arguments `(#:tests? #f)) ; no test target
663 (home-page "http://pythonhosted.org/pytz")
664 (synopsis "Python timezone library")
665 (description
666 "This library allows accurate and cross platform timezone calculations
667 using Python 2.4 or higher and provides access to the Olson timezone database.")
668 (license license:expat)))
669
670 (define-public python2-pytz
671 (package-with-python2 python-pytz))
672
673
674 (define-public python-babel
675 (package
676 (name "python-babel")
677 (version "2.3.4")
678 (source
679 (origin
680 (method url-fetch)
681 (uri (pypi-uri "Babel" version))
682 (sha256
683 (base32
684 "0x98qqqw35xllpcama013a9788ly84z8dm1w2wwfpxh2710c8df5"))))
685 (build-system python-build-system)
686 (propagated-inputs
687 `(("python-pytz" ,python-pytz)))
688 (arguments `(#:tests? #f)) ; no test target
689 (home-page "http://babel.pocoo.org/")
690 (synopsis
691 "Tools for internationalizing Python applications")
692 (description
693 "Babel is composed of two major parts:
694 - tools to build and work with gettext message catalogs
695 - a Python interface to the CLDR (Common Locale Data Repository), providing
696 access to various locale display names, localized number and date formatting,
697 etc. ")
698 (license license:bsd-3)))
699
700 (define-public python2-babel
701 (package-with-python2 python-babel))
702
703 (define-public python2-backport-ssl-match-hostname
704 (package
705 (name "python2-backport-ssl-match-hostname")
706 (version "3.5.0.1")
707 (source
708 (origin
709 (method url-fetch)
710 (uri (string-append
711 "https://pypi.python.org/packages/source/b/"
712 "backports.ssl_match_hostname/backports.ssl_match_hostname-"
713 version ".tar.gz"))
714 (sha256
715 (base32
716 "1wndipik52cyqy0677zdgp90i435pmvwd89cz98lm7ri0y3xjajh"))))
717 (build-system python-build-system)
718 (arguments
719 `(#:python ,python-2
720 #:tests? #f)) ; no test target
721 (home-page "https://bitbucket.org/brandon/backports.ssl_match_hostname")
722 (synopsis "Backport of ssl.match_hostname() function from Python 3.5")
723 (description
724 "This backport brings the ssl.match_hostname() function to users of
725 earlier versions of Python. The function checks the hostname in the
726 certificate returned by the server to which a connection has been established,
727 and verifies that it matches the intended target hostname.")
728 (license license:psfl)))
729
730 (define-public python-hdf4
731 (package
732 (name "python-hdf4")
733 (version "0.9")
734 (source
735 (origin
736 (method url-fetch)
737 (uri (pypi-uri name version))
738 (sha256
739 (base32
740 "1hjiyrxvxk9817qyqky3nar4y3fs4z8wxz0n884zzb5wi6skrjks"))))
741 (build-system python-build-system)
742 (native-inputs `(("nose" ,python-nose)))
743 (propagated-inputs `(("numpy" ,python-numpy)))
744 (inputs
745 `(("hdf4" ,hdf4)
746 ("libjpeg" ,libjpeg)
747 ("zlib" ,zlib)))
748 (arguments
749 `(#:phases
750 (modify-phases %standard-phases
751 (replace 'check
752 (lambda _
753 ;; The 'runexamples' script sets PYTHONPATH to CWD, then goes
754 ;; on to import numpy. Somehow this works on their CI system.
755 ;; Let's just manage PYTHONPATH here instead.
756 (substitute* "runexamples.sh"
757 (("export PYTHONPATH=.*") ""))
758 (setenv "PYTHONPATH"
759 (string-append (getcwd) ":"
760 (getenv "PYTHONPATH")))
761 (and (zero? (system* "./runexamples.sh"))
762 (zero? (system* "nosetests" "-v"))))))))
763 (home-page "https://github.com/fhs/python-hdf4")
764 (synopsis "Python interface to the NCSA HDF4 library")
765 (description
766 "Python-HDF4 is a python wrapper around the NCSA HDF version 4 library,
767 which implements the SD (Scientific Dataset), VS (Vdata) and V (Vgroup) API’s.
768 NetCDF files can also be read and modified. Python-HDF4 is a fork of
769 @url{http://hdfeos.org/software/pyhdf.php,pyhdf}.")
770 (license license:expat)))
771
772 (define-public python2-hdf4
773 (package-with-python2 python-hdf4))
774
775 (define-public python-h5py
776 (package
777 (name "python-h5py")
778 (version "2.6.0")
779 (source
780 (origin
781 (method url-fetch)
782 (uri (pypi-uri "h5py" version))
783 (sha256
784 (base32
785 "0df46dg7i7xfking9lp221bfm8dbl974yvlrbi1w7r6m61ac7bxj"))))
786 (build-system python-build-system)
787 (arguments
788 `(#:tests? #f ; no test target
789 #:phases
790 (modify-phases %standard-phases
791 (add-after 'unpack 'fix-hdf5-paths
792 (lambda* (#:key inputs #:allow-other-keys)
793 (let ((prefix (assoc-ref inputs "hdf5")))
794 (substitute* "setup_build.py"
795 (("\\['/opt/local/lib', '/usr/local/lib'\\]")
796 (string-append "['" prefix "/lib" "']"))
797 (("'/opt/local/include', '/usr/local/include'")
798 (string-append "'" prefix "/include" "'")))
799 (substitute* "setup_configure.py"
800 (("\\['/usr/local/lib', '/opt/local/lib'\\]")
801 (string-append "['" prefix "/lib" "']")))
802 #t))))))
803 (propagated-inputs
804 `(("python-six" ,python-six)
805 ("python-numpy" ,python-numpy)))
806 (inputs
807 `(("hdf5" ,hdf5)))
808 (native-inputs
809 `(("python-cython" ,python-cython)
810 ("python-pkgconfig" ,python-pkgconfig)))
811 (home-page "http://www.h5py.org/")
812 (synopsis "Read and write HDF5 files from Python")
813 (description
814 "The h5py package provides both a high- and low-level interface to the
815 HDF5 library from Python. The low-level interface is intended to be a
816 complete wrapping of the HDF5 API, while the high-level component supports
817 access to HDF5 files, datasets and groups using established Python and NumPy
818 concepts.")
819 (license license:bsd-3)))
820
821 (define-public python2-h5py
822 (package-with-python2 python-h5py))
823
824 (define-public python-netcdf4
825 (package
826 (name "python-netcdf4")
827 (version "1.2.7")
828 (source
829 (origin
830 (method url-fetch)
831 (uri (pypi-uri "netCDF4" version))
832 (sha256
833 (base32
834 "1fllizmnpw0zkzzm4j9pgamarlzfn3kmv9zrm0w65q1y31h9ni0c"))))
835 (build-system python-build-system)
836 (native-inputs
837 `(("python-cython" ,python-cython)))
838 (propagated-inputs
839 `(("python-numpy" ,python-numpy)))
840 (inputs
841 `(("netcdf" ,netcdf)
842 ("hdf4" ,hdf4)
843 ("hdf5" ,hdf5)))
844 (arguments
845 '(#:phases
846 (modify-phases %standard-phases
847 (replace 'check
848 (lambda _
849 (setenv "NO_NET" "1") ; disable opendap tests
850 (with-directory-excursion "test"
851 (setenv "PYTHONPATH" ; find and add the library we just built
852 (string-append
853 (car (find-files "../build" "lib.*"
854 #:directories? #:t
855 #:fail-on-error? #:t))
856 ":" (getenv "PYTHONPATH")))
857 (zero? (system* "python" "run_all.py"))))))))
858 (home-page
859 "https://github.com/Unidata/netcdf4-python")
860 (synopsis "Python/numpy interface to the netCDF library")
861 (description "Netcdf4-python is a Python interface to the netCDF C
862 library. netCDF version 4 has many features not found in earlier
863 versions of the library and is implemented on top of HDF5. This module
864 can read and write files in both the new netCDF 4 and the old netCDF 3
865 format, and can create files that are readable by HDF5 clients. The
866 API is modelled after @code{Scientific.IO.NetCDF}, and should be familiar
867 to users of that module.")
868 ;; The software is mainly ISC, but includes some files covered
869 ;; by the Expat license.
870 (license (list license:isc license:expat))))
871
872 (define-public python2-netcdf4
873 (package-with-python2 python-netcdf4))
874
875 (define-public python-lockfile
876 (package
877 (name "python-lockfile")
878 (version "0.12.2")
879 (source
880 (origin
881 (method url-fetch)
882 (uri (string-append "https://pypi.python.org/packages/source/l/lockfile/"
883 "lockfile-" version ".tar.gz"))
884 (sha256
885 (base32
886 "16gpx5hm73ah5n1079ng0vy381hl802v606npkx4x8nb0gg05vba"))))
887 (build-system python-build-system)
888 (arguments '(#:test-target "check"))
889 (native-inputs
890 `(("python-pbr" ,python-pbr)))
891 (home-page "https://launchpad.net/pylockfile")
892 (synopsis "Platform-independent file locking module")
893 (description
894 "The lockfile package exports a LockFile class which provides a simple
895 API for locking files.")
896 (license license:expat)))
897
898 (define-public python2-lockfile
899 (package-with-python2 python-lockfile))
900
901 (define-public python-mock
902 (package
903 (name "python-mock")
904 (version "1.0.1")
905 (source
906 (origin
907 (method url-fetch)
908 (uri (pypi-uri "mock" version))
909 (sha256
910 (base32
911 "0kzlsbki6q0awf89rc287f3aj8x431lrajf160a70z0ikhnxsfdq"))))
912 (build-system python-build-system)
913 (arguments '(#:test-target "check"))
914 (home-page "https://github.com/testing-cabal/mock")
915 (synopsis "Python mocking and patching library for testing")
916 (description
917 "Mock is a library for testing in Python. It allows you to replace parts
918 of your system under test with mock objects and make assertions about how they
919 have been used.")
920 (license license:expat)))
921
922 (define-public python2-mock
923 (package-with-python2 python-mock))
924
925
926 (define-public python-setuptools
927 (package
928 (name "python-setuptools")
929 (version "31.0.0")
930 (source
931 (origin
932 (method url-fetch)
933 (uri (pypi-uri "setuptools" version))
934 (sha256
935 (base32
936 "0ypybh4hx3bv4vhg2dc74xpj1g56ggnaffm87k4abhwjwq6wq608"))
937 (modules '((guix build utils)))
938 (snippet
939 '(begin
940 ;; Remove included binaries which are used to build self-extracting
941 ;; installers for Windows.
942 ;; TODO: Find some way to build them ourself so we can include them.
943 (for-each delete-file (find-files "setuptools" "^(cli|gui).*\\.exe$"))
944 #t))))
945 (build-system python-build-system)
946 ;; FIXME: Tests require pytest, which itself relies on setuptools.
947 ;; One could bootstrap with an internal untested setuptools.
948 (arguments
949 `(#:tests? #f))
950 (home-page "https://pypi.python.org/pypi/setuptools")
951 (synopsis
952 "Library designed to facilitate packaging Python projects")
953 (description
954 "Setuptools is a fully-featured, stable library designed to facilitate
955 packaging Python projects, where packaging includes:
956 Python package and module definitions,
957 distribution package metadata,
958 test hooks,
959 project installation,
960 platform-specific details,
961 Python 3 support.")
962 ;; TODO: setuptools now bundles the following libraries:
963 ;; packaging, pyparsing, six and appdirs. How to unbundle?
964 (license (list license:psfl ; setuptools itself
965 license:expat ; six, appdirs, pyparsing
966 license:asl2.0 ; packaging is dual ASL2/BSD-2
967 license:bsd-2))))
968
969 (define-public python2-setuptools
970 (package-with-python2 python-setuptools))
971
972 ;;; Pycrypto is abandoned upstream:
973 ;;;
974 ;;; https://github.com/dlitz/pycrypto/issues/173
975 ;;;
976 ;;; TODO Remove this package from GNU Guix.
977 (define-public python-pycrypto
978 (package
979 (name "python-pycrypto")
980 (version "2.6.1")
981 (source
982 (origin
983 (method url-fetch)
984 (uri (pypi-uri "pycrypto" version))
985 (patches (search-patches "python-pycrypto-CVE-2013-7459.patch"))
986 (sha256
987 (base32
988 "0g0ayql5b9mkjam8hym6zyg6bv77lbh66rv1fyvgqb17kfc1xkpj"))))
989 (build-system python-build-system)
990 (inputs
991 `(("python" ,python)
992 ("gmp" ,gmp)))
993 (arguments
994 `(#:phases
995 (alist-cons-before
996 'build 'set-build-env
997 ;; pycrypto runs an autoconf configure script behind the scenes
998 (lambda _
999 (setenv "CONFIG_SHELL" (which "bash")))
1000 %standard-phases)))
1001 (home-page "http://www.pycrypto.org/")
1002 (synopsis "Cryptographic modules for Python")
1003 (description
1004 "Pycrypto is a collection of both secure hash functions (such as SHA256
1005 and RIPEMD160), and various encryption algorithms (AES, DES, RSA, ElGamal,
1006 etc.). The package is structured to make adding new modules easy.")
1007 (license license:public-domain)))
1008
1009 (define-public python2-pycrypto
1010 (let ((pycrypto (package-with-python2 python-pycrypto)))
1011 (package (inherit pycrypto)
1012 (inputs
1013 `(("python" ,python-2)
1014 ,@(alist-delete
1015 "python"
1016 (package-inputs pycrypto)))))))
1017
1018 (define-public python-eventlet
1019 (package
1020 (name "python-eventlet")
1021 (version "0.20.1")
1022 (source
1023 (origin
1024 (method url-fetch)
1025 (uri (pypi-uri "eventlet" version))
1026 (sha256
1027 (base32
1028 "0f3q55mq4n021wb7qa53pz3ix6i2py64sap66vsaqm2scjw83m9s"))))
1029 (build-system python-build-system)
1030 (propagated-inputs
1031 `(("python-greenlet" ,python-greenlet)))
1032 (home-page "http://eventlet.net")
1033 (synopsis "Concurrent networking library for Python")
1034 (description
1035 "Eventlet is a concurrent networking library for Python that
1036 allows you to change how you run your code, not how you write it.
1037 It uses @code{epoll} or @code{libevent} for highly scalable non-blocking I/O.
1038 Coroutines ensure that the developer uses a blocking style of programming
1039 that is similar to threading, but provide the benefits of non-blocking I/O.
1040 The event dispatch is implicit, which means you can easily use @code{Eventlet}
1041 from the Python interpreter, or as a small part of a larger application.")
1042 (license license:expat)))
1043
1044 (define-public python2-eventlet
1045 (let ((base (package-with-python2
1046 (strip-python2-variant python-eventlet))))
1047 (package (inherit base)
1048 (propagated-inputs
1049 `(("python2-enum34" ,python2-enum34)
1050 ,@(package-propagated-inputs base))))))
1051
1052 (define-public python-keyring
1053 (package
1054 (name "python-keyring")
1055 (version "8.7")
1056 (source
1057 (origin
1058 (method url-fetch)
1059 (uri (pypi-uri "keyring" version))
1060 (sha256
1061 (base32
1062 "0482rmi2x6p78wl2kz8qzyq21xz1sbbfwnv5x7dggar4vkwxhzfx"))))
1063 (build-system python-build-system)
1064 (native-inputs
1065 `(("python-setuptools-scm" ,python-setuptools-scm)))
1066 (propagated-inputs
1067 `(("python-pycrypto" ,python-pycrypto)))
1068 (arguments
1069 `(#:tests? #f)) ;TODO: tests require pytest
1070 (home-page "https://github.com/jaraco/keyring")
1071 (synopsis "Store and access your passwords safely")
1072 (description
1073 "The Python keyring lib provides a easy way to access the system keyring
1074 service from python. It can be used in any application that needs safe
1075 password storage.")
1076 ;; "MIT" and PSF dual license
1077 (license license:x11)))
1078
1079 (define-public python2-keyring
1080 (package-with-python2 python-keyring))
1081
1082 (define-public python-six
1083 (package
1084 (name "python-six")
1085 (version "1.10.0")
1086 (source
1087 (origin
1088 (method url-fetch)
1089 (uri (pypi-uri "six" version))
1090 (sha256
1091 (base32
1092 "0snmb8xffb3vsma0z67i0h0w2g2dy0p3gsgh9gi4i0kgc5l8spqh"))))
1093 (build-system python-build-system)
1094 (native-inputs
1095 `(("python-py" ,python-py)
1096 ("python-pytest" ,python-pytest)))
1097 (home-page "http://pypi.python.org/pypi/six/")
1098 (synopsis "Python 2 and 3 compatibility utilities")
1099 (description
1100 "Six is a Python 2 and 3 compatibility library. It provides utility
1101 functions for smoothing over the differences between the Python versions with
1102 the goal of writing Python code that is compatible on both Python versions.
1103 Six supports every Python version since 2.5. It is contained in only one
1104 Python file, so it can be easily copied into your project.")
1105 (license license:x11)))
1106
1107 (define-public python2-six
1108 (package-with-python2 python-six))
1109
1110 (define-public python-dateutil
1111 (package
1112 (name "python-dateutil")
1113 (version "2.6.0")
1114 (source
1115 (origin
1116 (method url-fetch)
1117 (uri (pypi-uri "python-dateutil" version))
1118 (sha256
1119 (base32
1120 "1lhq0hxjc3cfha101q02ld5ijlpfyjn2w1yh7wvpiy367pgzi8k2"))))
1121 (build-system python-build-system)
1122 (propagated-inputs
1123 `(("python-six" ,python-six)))
1124 (home-page "https://dateutil.readthedocs.io/en/stable/")
1125 (synopsis "Extensions to the standard datetime module")
1126 (description
1127 "The dateutil module provides powerful extensions to the standard
1128 datetime module, available in Python 2.3+.")
1129 (license license:bsd-3)))
1130
1131 (define-public python2-dateutil
1132 (package-with-python2 python-dateutil))
1133
1134 (define-public python-parsedatetime
1135 (package
1136 (name "python-parsedatetime")
1137 (version "2.3")
1138 (source
1139 (origin
1140 (method url-fetch)
1141 (uri (pypi-uri "parsedatetime" version))
1142 (sha256
1143 (base32
1144 "1vkrmd398s11h1zn3zaqqsiqhj9lwy1ikcg6irx2lrgjzjg3rjll"))))
1145 (build-system python-build-system)
1146 (native-inputs
1147 `(("python-nose" ,python-nose)
1148 ("python-pyicu" ,python-pyicu)
1149 ("python-pytest" ,python-pytest)
1150 ("python-pytest-runner" ,python-pytest-runner)))
1151 (propagated-inputs
1152 `(("python-future" ,python-future)))
1153 (home-page "https://github.com/bear/parsedatetime/")
1154 (synopsis
1155 "Parse human-readable date/time text")
1156 (description
1157 "Parse human-readable date/time text.")
1158 (license license:asl2.0)))
1159
1160 (define-public python2-parsedatetime
1161 (package-with-python2 python-parsedatetime))
1162
1163 (define-public python-pandas
1164 (package
1165 (name "python-pandas")
1166 (version "0.19.2")
1167 (source
1168 (origin
1169 (method url-fetch)
1170 (uri (pypi-uri "pandas" version))
1171 (sha256
1172 (base32 "0540cnbwy2hc4hv2sxfs8i47xi91qzvzxfn80dl785ibiicly3vg"))
1173 (patches
1174 (search-patches "python-pandas-skip-failing-tests.patch"))))
1175 (build-system python-build-system)
1176 (propagated-inputs
1177 `(("python-numpy" ,python-numpy)
1178 ("python-pytz" ,python-pytz)
1179 ("python-dateutil" ,python-dateutil)))
1180 (native-inputs
1181 `(("python-nose" ,python-nose)
1182 ("python-cython" ,python-cython)))
1183 (home-page "http://pandas.pydata.org")
1184 (synopsis "Data structures for data analysis, time series, and statistics")
1185 (description
1186 "Pandas is a Python package providing fast, flexible, and expressive data
1187 structures designed to make working with structured (tabular,
1188 multidimensional, potentially heterogeneous) and time series data both easy
1189 and intuitive. It aims to be the fundamental high-level building block for
1190 doing practical, real world data analysis in Python.")
1191 (license license:bsd-3)))
1192
1193 (define-public python2-pandas
1194 (package-with-python2 python-pandas))
1195
1196 (define-public python-tzlocal
1197 (package
1198 (name "python-tzlocal")
1199 (version "1.2.2")
1200 (source
1201 (origin
1202 (method url-fetch)
1203 (uri (pypi-uri "tzlocal" version))
1204 (sha256
1205 (base32
1206 "0paj7vlsb0np8b5sp4bv64wxv7qk2piyp7xg29pkhdjwsbls9fnb"))))
1207 (build-system python-build-system)
1208 (propagated-inputs
1209 `(("python-pytz" ,python-pytz)))
1210 (home-page "https://github.com/regebro/tzlocal")
1211 (synopsis
1212 "Local timezone information for Python")
1213 (description
1214 "Tzlocal returns a tzinfo object with the local timezone information.
1215 This module attempts to fix a glaring hole in pytz, that there is no way to
1216 get the local timezone information, unless you know the zoneinfo name, and
1217 under several distributions that's hard or impossible to figure out.")
1218 (license license:cc0)))
1219
1220 (define-public python2-pysqlite
1221 (package
1222 (name "python2-pysqlite")
1223 (version "2.8.3")
1224 (source
1225 (origin
1226 (method url-fetch)
1227 (uri (pypi-uri "pysqlite" version))
1228 (sha256
1229 (base32
1230 "1424gwq9sil2ffmnizk60q36vydkv8rxs6m7xs987kz8cdc37lqp"))))
1231 (build-system python-build-system)
1232 (inputs
1233 `(("sqlite" ,sqlite)))
1234 (arguments
1235 `(#:python ,python-2 ; incompatible with Python 3
1236 #:tests? #f)) ; no test target
1237 (home-page "https://github.com/ghaering/pysqlite")
1238 (synopsis "SQLite bindings for Python")
1239 (description
1240 "Pysqlite provides SQLite bindings for Python that comply to the
1241 Database API 2.0T.")
1242 (license license:zlib)))
1243
1244
1245 (define-public python2-mechanize
1246 (package
1247 (name "python2-mechanize")
1248 (version "0.2.5")
1249 (source
1250 (origin
1251 (method url-fetch)
1252 (uri (string-append "https://pypi.python.org/packages/source/m/mechanize/mechanize-"
1253 version ".tar.gz"))
1254 (sha256
1255 (base32
1256 "0rj7r166i1dyrq0ihm5rijfmvhs8a04im28lv05c0c3v206v4rrf"))))
1257 (build-system python-build-system)
1258 (arguments
1259 `(#:python ,python-2 ; apparently incompatible with Python 3
1260 #:tests? #f))
1261 ;; test fails with message
1262 ;; AttributeError: 'module' object has no attribute 'test_pullparser'
1263 ;; (python-3.3.2) or
1264 ;; AttributeError: 'module' object has no attribute 'test_urllib2_localnet'
1265 ;; (python-2.7.5).
1266 ;; The source code is from March 2011 and probably not up-to-date
1267 ;; with respect to python unit tests.
1268 (home-page "http://wwwsearch.sourceforge.net/mechanize/")
1269 (synopsis
1270 "Stateful programmatic web browsing in Python")
1271 (description
1272 "Mechanize implements stateful programmatic web browsing in Python,
1273 after Andy Lester’s Perl module WWW::Mechanize.")
1274 (license (license:non-copyleft
1275 "file://COPYING"
1276 "See COPYING in the distribution."))))
1277
1278
1279 (define-public python-simplejson
1280 (package
1281 (name "python-simplejson")
1282 (version "3.10.0")
1283 (source
1284 (origin
1285 (method url-fetch)
1286 (uri (pypi-uri "simplejson" version))
1287 (sha256
1288 (base32
1289 "1qhwsykjlb85igb4cfl6v6gkprzbbg8gyqdd7zscc8w3x0ifcfwm"))))
1290 (build-system python-build-system)
1291 (home-page "http://simplejson.readthedocs.org/en/latest/")
1292 (synopsis
1293 "Json library for Python")
1294 (description
1295 "JSON (JavaScript Object Notation) is a subset of JavaScript
1296 syntax (ECMA-262 3rd edition) used as a lightweight data interchange
1297 format.
1298
1299 Simplejson exposes an API familiar to users of the standard library marshal
1300 and pickle modules. It is the externally maintained version of the json
1301 library contained in Python 2.6, but maintains compatibility with Python 2.5
1302 and (currently) has significant performance advantages, even without using
1303 the optional C extension for speedups. Simplejson is also supported on
1304 Python 3.3+.")
1305 (license license:x11)))
1306
1307 (define-public python2-simplejson
1308 (package-with-python2 python-simplejson))
1309
1310
1311 (define-public python-pyicu
1312 (package
1313 (name "python-pyicu")
1314 (version "1.9.5")
1315 (source
1316 (origin
1317 (method url-fetch)
1318 (uri (pypi-uri "PyICU" version))
1319 (sha256
1320 (base32
1321 "16rmxy9y0qhqqna2v49i7nzwm09as699rbyvh4raw7w602w55c3k"))))
1322 (build-system python-build-system)
1323 (arguments
1324 '(#:phases
1325 (modify-phases %standard-phases
1326 (add-before 'check 'delete-failing-test
1327 (lambda _
1328 ;; XXX: These tests require locales that are unavailable
1329 ;; in the build environment.
1330 (delete-file "test/test_DateTimeParserGenerator.py")
1331 #t)))))
1332 (inputs
1333 `(("icu4c" ,icu4c)))
1334 (home-page "http://pyicu.osafoundation.org/")
1335 (synopsis "Python extension wrapping the ICU C++ API")
1336 (description
1337 "PyICU is a python extension wrapping the ICU C++ API.")
1338 (license license:x11)))
1339
1340 (define-public python2-pyicu
1341 (package-with-python2 python-pyicu))
1342
1343 (define-public python2-dogtail
1344 ;; Python 2 only, as it leads to "TabError: inconsistent use of tabs and
1345 ;; spaces in indentation" with Python 3.
1346 (package
1347 (name "python2-dogtail")
1348 (version "0.9.9")
1349 (source (origin
1350 (method url-fetch)
1351 (uri (pypi-uri "dogtail" version))
1352 (sha256
1353 (base32
1354 "0p5wfssvzr9w0bvhllzbbd8fnp4cca2qxcpcsc33dchrmh5n552x"))))
1355 (build-system python-build-system)
1356 (arguments `(#:python ,python-2
1357 #:tests? #f)) ; invalid command "test"
1358 ;; Currently no offical homepage.
1359 (home-page "https://pypi.python.org/pypi/dogtail/")
1360 (synopsis "GUI test tool and automation framework written in Python")
1361 (description
1362 "Dogtail is a GUI test tool and automation framework written in Python.
1363 It uses Accessibility (a11y) technologies to communicate with desktop
1364 applications. dogtail scripts are written in Python and executed like any
1365 other Python program.")
1366 (license license:gpl2+)))
1367
1368 (define-public python2-empy
1369 (package
1370 (name "python2-empy")
1371 (version "3.3")
1372 (source (origin
1373 (method url-fetch)
1374 (uri (string-append "http://www.alcyone.com/software/empy/empy-"
1375 version ".tar.gz"))
1376 (sha256
1377 (base32
1378 "01g8mmkfnvjdmlhsihwyx56lrg7r5m5d2fg6mnxsvy6g0dnl69f6"))))
1379 (build-system python-build-system)
1380 (arguments
1381 `(#:python ,python-2
1382 #:phases (alist-replace
1383 'check
1384 (lambda _
1385 (zero? (system* "./test.sh")))
1386 %standard-phases)))
1387 (home-page "http://www.alcyone.com/software/empy/")
1388 (synopsis "Templating system for Python")
1389 (description
1390 "EmPy is a system for embedding Python expressions and statements in
1391 template text; it takes an EmPy source file, processes it, and produces
1392 output. This is accomplished via expansions, which are special signals to the
1393 EmPy system and are set off by a special prefix (by default the at sign, @@).
1394 EmPy can expand arbitrary Python expressions and statements in this way, as
1395 well as a variety of special forms. Textual data not explicitly delimited in
1396 this way is sent unaffected to the output, allowing Python to be used in
1397 effect as a markup language. Also supported are callbacks via hooks,
1398 recording and playback via diversions, and dynamic, chainable filters. The
1399 system is highly configurable via command line options and embedded
1400 commands.")
1401 (license license:lgpl2.1+)))
1402
1403 (define-public python2-element-tree
1404 (package
1405 (name "python2-element-tree")
1406 (version "1.2.6")
1407 (source (origin
1408 (method url-fetch)
1409 (uri (string-append
1410 "http://effbot.org/media/downloads/elementtree-"
1411 version "-20050316.tar.gz"))
1412 (sha256
1413 (base32
1414 "016bphqnlg0l4vslahhw4r0aanw95bpypy65r1i1acyb2wj5z7dj"))))
1415 (build-system python-build-system)
1416 (arguments
1417 `(#:python ,python-2 ; seems to be part of Python 3
1418 #:tests? #f)) ; no 'test' sub-command
1419 (synopsis "Toolkit for XML processing in Python")
1420 (description
1421 "ElementTree is a Python library supporting lightweight XML processing.")
1422 (home-page "http://effbot.org/zone/element-index.htm")
1423 (license (license:x11-style
1424 "http://docs.python.org/2/license.html"
1425 "Like \"CWI LICENSE AGREEMENT FOR PYTHON 0.9.0 THROUGH 1.2\"."))))
1426
1427 (define-public python2-pybugz
1428 (package
1429 (name "python2-pybugz")
1430 (version "0.6.11")
1431 (source (origin
1432 (method url-fetch)
1433 (uri (string-append
1434 "http://bits.liquidx.net/projects/pybugz/pybugz-"
1435 version ".tar.gz"))
1436 (sha256
1437 (base32
1438 "17ni00p08gp5lkxlrrcnvi3x09fmajnlbz4da03qcgl9q21ym4jd"))
1439 (patches (search-patches "pybugz-stty.patch"
1440 "pybugz-encode-error.patch"))))
1441 (build-system python-build-system)
1442 (arguments
1443 `(#:python ,python-2 ; SyntaxError with Python 3
1444 #:tests? #f)) ; no 'test' sub-command
1445 (propagated-inputs
1446 `(("element-tree" ,python2-element-tree)))
1447 (synopsis "Python and command-line interface to Bugzilla")
1448 (description
1449 "PyBugz is a Python library and command-line tool to query the Bugzilla
1450 bug tracking system. It is meant as an aid to speed up interaction with the
1451 bug tracker.")
1452 (home-page "http://www.liquidx.net/pybugz/")
1453 (license license:gpl2)))
1454
1455 (define-public python-enum34
1456 (package
1457 (name "python-enum34")
1458 (version "1.1.6")
1459 (source
1460 (origin
1461 (method url-fetch)
1462 (uri (pypi-uri "enum34" version))
1463 (sha256
1464 (base32
1465 "1cgm5ng2gcfrkrm3hc22brl6chdmv67b9zvva9sfs7gn7dwc9n4a"))))
1466 (build-system python-build-system)
1467 (home-page "https://pypi.python.org/pypi/enum34")
1468 (synopsis "Backported Python 3.4 Enum")
1469 (description
1470 "Enum34 is the new Python stdlib enum module available in Python 3.4
1471 backported for previous versions of Python from 2.4 to 3.3.")
1472 (license license:bsd-3)))
1473
1474 (define-public python2-enum34
1475 (package-with-python2 python-enum34))
1476
1477 (define-public python-parse-type
1478 (package
1479 (name "python-parse-type")
1480 (version "0.3.4")
1481 (source
1482 (origin
1483 (method url-fetch)
1484 (uri (string-append "https://pypi.python.org/packages/source/p/"
1485 "parse_type/parse_type-" version ".tar.gz"))
1486 (sha256
1487 (base32
1488 "0iv1c34npr4iynwpgv1vkjx9rjd18a85ir8c01gc5f7wp8iv7l1x"))))
1489 (build-system python-build-system)
1490 (arguments
1491 `(#:phases
1492 (modify-phases %standard-phases
1493 (add-after 'unpack 'patch-tests
1494 (lambda _
1495 (substitute* "tests/test_parse_type_parse.py"
1496 ;; Newer Python versions don't have the problem this test tests.
1497 (("self[.]assertRaises[(]parse.TooManyFields, p.parse, ''[)]")
1498 ""))
1499 #t)))))
1500 (propagated-inputs
1501 `(("python-six" ,python-six)
1502 ("python-parse" ,python-parse)))
1503 (native-inputs
1504 `(("python-pytest" ,python-pytest)
1505 ("python-pytest-runner" ,python-pytest-runner)))
1506 (home-page "https://github.com/jenisys/parse_type")
1507 (synopsis "Extended parse module")
1508 (description
1509 "Parse_type extends the python parse module.")
1510 (properties
1511 `((python2-variant . ,(delay python2-parse-type))))
1512 (license license:bsd-3)))
1513
1514 (define-public python2-parse-type
1515 (let ((base (package-with-python2
1516 (strip-python2-variant python-parse-type))))
1517 (package (inherit base)
1518 (propagated-inputs
1519 `(("python2-enum34" ,python2-enum34)
1520 ,@(package-propagated-inputs base))))))
1521
1522 (define-public python-parse
1523 (package
1524 (name "python-parse")
1525 (version "1.6.6")
1526 (source
1527 (origin
1528 (method url-fetch)
1529 (uri (pypi-uri "parse" version))
1530 (sha256
1531 (base32
1532 "0y31i3mwgv35qn0kzzjn9q8jqfdqmbi6sr6yfvn8rq4lqjm5lhvi"))
1533 (patches (search-patches "python-parse-too-many-fields.patch"))))
1534 (build-system python-build-system)
1535 (arguments
1536 `(#:phases
1537 (modify-phases %standard-phases
1538 (replace 'check
1539 (lambda _ (zero? (system* "python" "test_parse.py")))))))
1540 (home-page "https://github.com/r1chardj0n3s/parse")
1541 (synopsis "Parse strings")
1542 (description
1543 "Parse strings using a specification based on the Python format()
1544 syntax.")
1545 (license license:x11)))
1546
1547 (define-public python-polib
1548 (package
1549 (name "python-polib")
1550 (version "1.0.8")
1551 (source (origin
1552 (method url-fetch)
1553 (uri (pypi-uri "polib" version))
1554 (sha256
1555 (base32
1556 "1pq2hbm3m2q0cjdszk8mc4qa1vl3wcblh5nfyirlfnzb2pcy7zss"))))
1557 (build-system python-build-system)
1558 (home-page "https://bitbucket.org/izi/polib/wiki/Home")
1559 (synopsis "Manipulate, create and modify gettext files")
1560 (description "Polib can manipulate any gettext format (po, pot and mo)
1561 files. It can be used to create po files from scratch or to modify
1562 existing ones.")
1563 (license license:expat)))
1564
1565 (define-public python2-polib
1566 (let ((base (package-with-python2 (strip-python2-variant python-polib))))
1567 (package
1568 (inherit base)
1569 (arguments `(,@(package-arguments base)
1570 ;; Tests don't work with python2.
1571 #:tests? #f)))))
1572
1573 (define-public scons
1574 (package
1575 (name "scons")
1576 (version "2.5.1")
1577 (source (origin
1578 (method url-fetch)
1579 (uri (string-append "mirror://sourceforge/scons/scons/" version
1580 "/scons-" version ".tar.gz"))
1581 (sha256
1582 (base32
1583 "1wji1z9jdkhnmm99apx6fhld9cs52rr56aigniyrcsmlwy52298b"))))
1584 (build-system python-build-system)
1585 (arguments
1586 ;; With Python 3.x, fails to build with a syntax error.
1587 `(#:python ,python-2
1588 #:use-setuptools? #f ; still relies on distutils
1589 #:tests? #f)) ; no 'python setup.py test' command
1590 (home-page "http://scons.org/")
1591 (synopsis "Software construction tool written in Python")
1592 (description
1593 "SCons is a software construction tool. Think of SCons as an improved,
1594 cross-platform substitute for the classic Make utility with integrated
1595 functionality similar to autoconf/automake and compiler caches such as ccache.
1596 In short, SCons is an easier, more reliable and faster way to build
1597 software.")
1598 (license license:x11)))
1599
1600 (define-public python-extras
1601 (package
1602 (name "python-extras")
1603 (version "0.0.3")
1604 (source
1605 (origin
1606 (method url-fetch)
1607 (uri (string-append
1608 "https://pypi.python.org/packages/source/e/extras/extras-"
1609 version ".tar.gz"))
1610 (sha256
1611 (base32
1612 "1h7zx4dfyclalg0fqnfjijpn0f793a9mx8sy3b27gd31nr6dhq3s"))))
1613 (build-system python-build-system)
1614 (arguments
1615 ;; error in setup.cfg: command 'test' has no such option 'buffer'
1616 '(#:tests? #f))
1617 (home-page "https://github.com/testing-cabal/extras")
1618 (synopsis "Useful extensions to the Python standard library")
1619 (description
1620 "Extras is a set of extensions to the Python standard library.")
1621 (license license:expat)))
1622
1623 (define-public python2-extras
1624 (package-with-python2 python-extras))
1625
1626 (define-public python-mimeparse
1627 (package
1628 (name "python-mimeparse")
1629 (version "0.1.4")
1630 (source
1631 (origin
1632 (method url-fetch)
1633 (uri (string-append
1634 "https://pypi.python.org/packages/source/p/python-mimeparse/python-mimeparse-"
1635 version ".tar.gz"))
1636 (sha256
1637 (base32
1638 "1hyxg09kaj02ri0rmwjqi86wk4nd1akvv7n0dx77azz76wga4s9w"))))
1639 (build-system python-build-system)
1640 (arguments
1641 '(#:tests? #f)) ; no setup.py test command
1642 (home-page
1643 "https://github.com/dbtsai/python-mimeparse")
1644 (synopsis "Python library for parsing MIME types")
1645 (description
1646 "Mimeparse provides basic functions for parsing MIME type names and
1647 matching them against a list of media-ranges.")
1648 (license license:expat)))
1649
1650 (define-public python2-mimeparse
1651 (package-with-python2 python-mimeparse))
1652
1653 (define-public python-nose
1654 (package
1655 (name "python-nose")
1656 (version "1.3.7")
1657 (source
1658 (origin
1659 (method url-fetch)
1660 (uri (pypi-uri "nose" version))
1661 (sha256
1662 (base32
1663 "164a43k7k2wsqqk1s6vavcdamvss4mz0vd6pwzv2h9n8rgwzxgzi"))))
1664 (build-system python-build-system)
1665 (arguments
1666 '(#:tests? #f)) ; FIXME: test suite fails
1667 (home-page "http://readthedocs.org/docs/nose/")
1668 (synopsis "Python testing library")
1669 (description
1670 "Nose extends the unittest library to make testing easier.")
1671 (license license:lgpl2.0+)))
1672
1673 (define-public python2-nose
1674 (package-with-python2 python-nose))
1675
1676 (define-public python-nose2
1677 (package
1678 (name "python-nose2")
1679 (version "0.6.5")
1680 (source
1681 (origin
1682 (method url-fetch)
1683 (uri (pypi-uri "nose2" version))
1684 (sha256
1685 (base32
1686 "1x4zjq1zlyrh8b9ba0cmafd3w94pxhid408kibyjd3s6h1lap6s7"))))
1687 (build-system python-build-system)
1688 (arguments `(#:tests? #f)) ; 'module' object has no attribute 'collector'
1689 (propagated-inputs
1690 `(("python-cov-core" ,python-cov-core)
1691 ("python-pytest-cov" ,python-pytest-cov)
1692 ("python-six" ,python-six)))
1693 (home-page "https://github.com/nose-devs/nose2")
1694 (synopsis "Next generation of nicer testing for Python")
1695 (description
1696 "Nose2 is the next generation of nicer testing for Python, based on the
1697 plugins branch of unittest2. Nose2 aims to improve on nose by providing a
1698 better plugin api, being easier for users to configure, and simplifying internal
1699 interfaces and processes.")
1700 (license license:bsd-2)))
1701
1702 (define-public python2-nose2
1703 (package-with-python2 python-nose2))
1704
1705 (define-public python-unittest2
1706 (package
1707 (name "python-unittest2")
1708 (version "0.5.1")
1709 (source
1710 (origin
1711 (method url-fetch)
1712 (uri (string-append
1713 "https://pypi.python.org/packages/source/u/unittest2py3k/unittest2py3k-"
1714 version ".tar.gz"))
1715 (sha256
1716 (base32
1717 "00yl6lskygcrddx5zspkhr0ibgvpknl4678kkm6s626539grq93q"))))
1718 (build-system python-build-system)
1719 (home-page "http://pypi.python.org/pypi/unittest2")
1720 (synopsis "Python unit testing library")
1721 (description
1722 "Unittest2 is a replacement for the unittest module in the Python
1723 standard library.")
1724 (license license:psfl)))
1725
1726 (define-public python2-unittest2
1727 (package (inherit python-unittest2)
1728 (name "python2-unittest2")
1729 (version "0.5.1")
1730 (source
1731 (origin
1732 (method url-fetch)
1733 (uri (string-append
1734 "https://pypi.python.org/packages/source/u/unittest2/unittest2-"
1735 version ".tar.gz"))
1736 (sha256
1737 (base32
1738 "0wbs4i4x3x7klr3v35ss6p9mcqz883i1xgcpkhvl7n2lyv6yhpda"))))
1739 (arguments
1740 `(#:python ,python-2
1741 #:tests? #f)))) ; no setup.py test command
1742
1743 (define-public python-pafy
1744 (package
1745 (name "python-pafy")
1746 (version "0.5.3.1")
1747 (source
1748 (origin
1749 (method url-fetch)
1750 (uri (pypi-uri "pafy" version))
1751 (sha256
1752 (base32
1753 "1a7dxi95m1043rxx1r5x3ngb66nwlq6aqcasyqqjzmmmjps4zrim"))))
1754 (build-system python-build-system)
1755 (arguments
1756 `(#:tests? #f)) ; Currently pafy can not find itself in the tests
1757 (propagated-inputs
1758 ;; Youtube-dl is a python package which is imported in the file
1759 ;; "backend_youtube_dl.py", therefore it needs to be propagated.
1760 `(("youtube-dl" ,youtube-dl)))
1761 (home-page "https://np1.github.io/pafy/")
1762 (synopsis "Retrieve YouTube content and metadata")
1763 (description
1764 "@code{pafy} is a python library to retrieve YouTube content and metadata.")
1765 (license license:lgpl3+)))
1766
1767 (define-public python-py
1768 (package
1769 (name "python-py")
1770 (version "1.4.32")
1771 (source
1772 (origin
1773 (method url-fetch)
1774 (uri (pypi-uri "py" version))
1775 (sha256
1776 (base32
1777 "19s1pql9pq85h1qzsdwgyb8a3k1qgkvh33b02m8kfqhizz8rzf64"))))
1778 (build-system python-build-system)
1779 (arguments
1780 ;; FIXME: "ImportError: 'test' module incorrectly imported from
1781 ;; '/gnu/store/...-python-pytest-mimimal-3.0.5/lib/python3.5/site-packages'.
1782 ;; Expected '/tmp/guix-build-python-py-1.4.31.drv-0/py-1.4.31/py'.
1783 ;; Is this module globally installed?"
1784 '(#:tests? #f))
1785 (home-page "http://pylib.readthedocs.org/")
1786 (synopsis "Python library for parsing, I/O, instrospection, and logging")
1787 (description
1788 "Py is a Python library for file name parsing, .ini file parsing, I/O,
1789 code introspection, and logging.")
1790 (license license:expat)))
1791
1792 (define-public python2-py
1793 (package-with-python2 python-py))
1794
1795 (define-public python-pytest
1796 (package
1797 (name "python-pytest")
1798 (version "2.7.3")
1799 (source
1800 (origin
1801 (method url-fetch)
1802 (uri (string-append
1803 "https://pypi.python.org/packages/source/p/pytest/pytest-"
1804 version ".tar.gz"))
1805 (sha256
1806 (base32
1807 "1z4yi986f9n0p8qmzmn21m21m8j1x78hk3505f89baqm6pdw7afm"))
1808 (modules '((guix build utils)))
1809 (snippet
1810 ;; One of the tests involves the /usr directory, so it fails.
1811 '(substitute* "testing/test_argcomplete.py"
1812 (("def test_remove_dir_prefix\\(self\\):")
1813 "@pytest.mark.xfail\n def test_remove_dir_prefix(self):")))))
1814 (build-system python-build-system)
1815 (propagated-inputs
1816 `(("python-py" ,python-py)))
1817 (native-inputs
1818 `(("python-nose" ,python-nose)
1819 ("python-mock" ,python-mock)))
1820 (home-page "http://pytest.org")
1821 (synopsis "Python testing library")
1822 (description
1823 "Pytest is a testing tool that provides auto-discovery of test modules
1824 and functions, detailed info on failing assert statements, modular fixtures,
1825 and many external plugins.")
1826 (license license:expat)))
1827
1828 (define-public python2-pytest
1829 (package-with-python2 python-pytest))
1830
1831 ;; Some packages require a newer pytest.
1832 (define-public python-pytest-3.0
1833 (package
1834 (inherit python-pytest)
1835 (name "python-pytest")
1836 (version "3.0.7")
1837 (source (origin
1838 (method url-fetch)
1839 (uri (pypi-uri "pytest" version))
1840 (sha256
1841 (base32
1842 "1asc4b2nd2a4f0g3r12y97rslq5wliji7b73wwkvdrm5s7mrc1mp"))))
1843 (arguments
1844 `(#:phases
1845 (modify-phases %standard-phases
1846 (add-before 'check 'disable-invalid-test
1847 (lambda _
1848 (substitute* "testing/test_argcomplete.py"
1849 (("def test_remove_dir_prefix" line)
1850 (string-append "@pytest.mark.skip"
1851 "(reason=\"Assumes that /usr exists.\")\n "
1852 line)))
1853 #t)))))
1854 (native-inputs
1855 `(("python-nose" ,python-nose)
1856 ("python-mock" ,python-mock)
1857 ("python-hypothesis" ,python-hypothesis)))
1858 (properties `((python2-variant . ,(delay python2-pytest-3.0))))))
1859
1860 (define-public python2-pytest-3.0
1861 (let ((base (package-with-python2
1862 (strip-python2-variant python-pytest-3.0))))
1863 (package (inherit base)
1864 (native-inputs
1865 `(("python2-enum34" ,python2-enum34)
1866 ,@(package-native-inputs base))))))
1867
1868 (define-public python-pytest-cov
1869 (package
1870 (name "python-pytest-cov")
1871 (version "2.4.0")
1872 (source
1873 (origin
1874 (method url-fetch)
1875 (uri (pypi-uri "pytest-cov" version))
1876 (sha256
1877 (base32
1878 "03c2qc42r4bczyw93gd7n0qi1h1jfhw7fnbhi33c3vp1hs81gm2k"))))
1879 (build-system python-build-system)
1880 (arguments
1881 `(#:phases
1882 (modify-phases %standard-phases
1883 (replace 'check
1884 (lambda _
1885 ;; options taken from tox.ini
1886 ;; TODO: make "--restructuredtext" tests pass. They currently fail
1887 ;; with "Duplicate implicit target name"
1888 (zero? (system* "python" "./setup.py" "check"
1889 "--strict" "--metadata")))))))
1890 (propagated-inputs
1891 `(("python-coverage" ,python-coverage)
1892 ("python-pytest" ,python-pytest)))
1893 (home-page "https://github.com/pytest-dev/pytest-cov")
1894 (synopsis "Pytest plugin for measuring coverage")
1895 (description
1896 "Pytest-cov produces coverage reports. It supports centralised testing and
1897 distributed testing in both @code{load} and @code{each} modes. It also
1898 supports coverage of subprocesses.")
1899 (license license:expat)))
1900
1901 (define-public python2-pytest-cov
1902 (package-with-python2 python-pytest-cov))
1903
1904 (define-public python-pytest-runner
1905 (package
1906 (name "python-pytest-runner")
1907 (version "2.11.1")
1908 (source
1909 (origin
1910 (method url-fetch)
1911 (uri (pypi-uri "pytest-runner" version))
1912 (sha256
1913 (base32
1914 "1cw978kqqcq916b9gfns1qjqvg33c5ail5jhw9054dsynkm32flq"))))
1915 (build-system python-build-system)
1916 (arguments
1917 `(#:phases
1918 (modify-phases %standard-phases
1919 ;; The fancy way of setting the version with setuptools_scm does not
1920 ;; seem to work here.
1921 (add-after 'unpack 'set-version
1922 (lambda _
1923 (substitute* "docs/conf.py"
1924 (("version = setuptools_scm\\.get_version\\(root='\\.\\.')")
1925 (string-append "version = \"" ,version "\"")))
1926 #t)))))
1927 (native-inputs
1928 `(("python-pytest" ,python-pytest)
1929 ("python-setuptools-scm" ,python-setuptools-scm)))
1930 (home-page "https://github.com/pytest-dev/pytest-runner")
1931 (synopsis "Invoke py.test as a distutils command")
1932 (description
1933 "This package provides a @command{pytest-runner} command that
1934 @file{setup.py} files can use to run tests.")
1935 (license license:expat)))
1936
1937 (define-public python2-pytest-runner
1938 (package-with-python2 python-pytest-runner))
1939
1940 (define-public python-pytest-mock
1941 (package
1942 (name "python-pytest-mock")
1943 (version "1.2")
1944 (source
1945 (origin
1946 (method url-fetch)
1947 (uri (pypi-uri "pytest-mock" version ".zip"))
1948 (sha256
1949 (base32
1950 "03zxar5drzm7ksqyrwypjaza3cri6wqvpr6iam92djvg6znp32gp"))))
1951 (build-system python-build-system)
1952 (native-inputs
1953 `(("unzip" ,unzip)))
1954 (propagated-inputs
1955 `(("python-pytest" ,python-pytest)))
1956 (home-page "https://github.com/pytest-dev/pytest-mock/")
1957 (synopsis "Thin-wrapper around the mock package for easier use with py.test")
1958 (description
1959 "This plugin installs a @code{mocker} fixture which is a thin-wrapper
1960 around the patching API provided by the @code{mock} package, but with the
1961 benefit of not having to worry about undoing patches at the end of a test.
1962 The mocker fixture has the same API as @code{mock.patch}, supporting the
1963 same arguments.")
1964 (properties `((python2-variant . ,(delay python2-pytest-mock))))
1965 (license license:expat)))
1966
1967 (define-public python2-pytest-mock
1968 (let ((base (package-with-python2
1969 (strip-python2-variant python-pytest-mock))))
1970 (package (inherit base)
1971 (propagated-inputs
1972 `(("python2-mock" ,python2-mock)
1973 ,@(package-propagated-inputs base))))))
1974
1975 (define-public python-pytest-xdist
1976 (package
1977 (name "python-pytest-xdist")
1978 (version "1.14")
1979 (source
1980 (origin
1981 (method url-fetch)
1982 (uri (pypi-uri "pytest-xdist" version ".zip"))
1983 (sha256
1984 (base32
1985 "08rn2l39ds60xshs4js787l84pfckksqklfq2wq9x8ig2aci2pja"))
1986 (modules '((guix build utils)))
1987 (snippet
1988 '(begin
1989 ;; Remove pre-compiled .pyc files from source.
1990 (for-each delete-file-recursively
1991 (find-files "." "__pycache__" #:directories? #t))
1992 (for-each delete-file (find-files "." "\\.pyc$"))
1993 #t))))
1994 (build-system python-build-system)
1995 (arguments
1996 '(#:tests? #f)) ;FIXME: Some tests are failing.
1997 ;; #:phases
1998 ;; (modify-phases %standard-phases
1999 ;; (delete 'check)
2000 ;; (add-after 'install 'check
2001 ;; (lambda* (#:key inputs outputs #:allow-other-keys)
2002 ;; (add-installed-pythonpath inputs outputs)
2003 ;; (zero? (system* "py.test" "-v")))))
2004 (native-inputs
2005 `(("unzip" ,unzip)
2006 ("python-setuptools-scm" ,python-setuptools-scm)))
2007 (propagated-inputs
2008 `(("python-execnet" ,python-execnet)
2009 ("python-pytest" ,python-pytest)
2010 ("python-py" ,python-py)))
2011 (home-page
2012 "https://github.com/pytest-dev/pytest-xdist")
2013 (synopsis
2014 "Plugin for py.test with distributed testing and loop-on-failing modes")
2015 (description
2016 "The pytest-xdist plugin extends py.test with some unique test execution
2017 modes: parallelization, running tests in boxed subprocesses, the ability
2018 to run tests repeatedly when failed, and the ability to run tests on multiple
2019 Python interpreters or platforms. It uses rsync to copy the existing
2020 program code to a remote location, executes there, and then syncs the
2021 result back.")
2022 (license license:expat)))
2023
2024 (define-public python2-pytest-xdist
2025 (package-with-python2 python-pytest-xdist))
2026
2027 (define-public python-scripttest
2028 (package
2029 (name "python-scripttest")
2030 (version "1.3")
2031 (source
2032 (origin
2033 (method url-fetch)
2034 (uri (string-append
2035 "https://pypi.python.org/packages/source/s/scripttest/scripttest-"
2036 version ".tar.gz"))
2037 (sha256
2038 (base32
2039 "0f4w84k8ck82syys7yg9maz93mqzc8p5ymis941x034v44jzq74m"))))
2040 (build-system python-build-system)
2041 (native-inputs
2042 `(("python-pytest" ,python-pytest)))
2043 (home-page "http://pythonpaste.org/scripttest/")
2044 (synopsis "Python library to test command-line scripts")
2045 (description "Scripttest is a Python helper library for testing
2046 interactive command-line applications. With it you can run a script in a
2047 subprocess and see the output as well as any file modifications.")
2048 (license license:expat)))
2049
2050 (define-public python2-scripttest
2051 (package-with-python2 python-scripttest))
2052
2053 (define-public python-testtools
2054 (package
2055 (name "python-testtools")
2056 (version "1.4.0")
2057 (source
2058 (origin
2059 (method url-fetch)
2060 (uri (pypi-uri "testtools" version))
2061 (sha256
2062 (base32
2063 "1vw8yljnd75d396hhw6s2hrf4cclzy845ifd5am0lxsl235z3i8c"))))
2064 (build-system python-build-system)
2065 (arguments
2066 `(#:phases
2067 (modify-phases %standard-phases
2068 (add-after 'unpack 'fix-module-imports
2069 (lambda _
2070 (substitute* "setup.py"
2071 (("'unittest2>=0.8.0',") ""))
2072 (substitute* '("testtools/testcase.py"
2073 "testtools/testsuite.py"
2074 "testtools/run.py"
2075 "testtools/tests/test_run.py"
2076 "testtools/tests/test_testsuite.py"
2077 "testtools/tests/test_deferredruntest.py")
2078 ;; unittest2 is a backport of Python2.7 features to Python 2.4.
2079 (("import unittest2 as unittest") "import unittest")
2080 (("import unittest2") "import unittest as unittest2")
2081 (("from unittest2 import") "from unittest import"))
2082 (substitute* "testtools/tests/test_testresult.py"
2083 ;; NUL in source code is not allowed (raises ValueError).
2084 (("\\x00\\x04") "\\x04"))
2085 #t)))))
2086 (propagated-inputs
2087 `(("python-mimeparse" ,python-mimeparse)
2088 ("python-extras" ,python-extras)))
2089 (home-page "https://github.com/testing-cabal/testtools")
2090 (synopsis
2091 "Extensions to the Python standard library unit testing framework")
2092 (description
2093 "Testtools extends the Python standard library unit testing framework to
2094 provide matchers, more debugging information, and cross-Python
2095 compatibility.")
2096 (license license:psfl)))
2097
2098 (define-public python2-testtools
2099 (package-with-python2 python-testtools))
2100
2101 (define-public python-testscenarios
2102 (package
2103 (name "python-testscenarios")
2104 (version "0.4")
2105 (source
2106 (origin
2107 (method url-fetch)
2108 (uri (string-append
2109 "https://pypi.python.org/packages/source/t/testscenarios/testscenarios-"
2110 version ".tar.gz"))
2111 (sha256
2112 (base32
2113 "1671jvrvqlmbnc42j7pc5y6vc37q44aiwrq0zic652pxyy2fxvjg"))))
2114 (build-system python-build-system)
2115 (propagated-inputs
2116 `(("python-testtools" ,python-testtools)))
2117 (home-page "https://launchpad.net/testscenarios")
2118 (synopsis "Pyunit extension for dependency injection")
2119 (description
2120 "Testscenarios provides clean dependency injection for Python unittest
2121 style tests.")
2122 (license (list license:bsd-3 license:asl2.0)))) ; at the user's option
2123
2124 (define-public python2-testscenarios
2125 (package-with-python2 python-testscenarios))
2126
2127 (define-public python-testresources
2128 (package
2129 (name "python-testresources")
2130 (version "0.2.7")
2131 (source
2132 (origin
2133 (method url-fetch)
2134 (uri (string-append
2135 "https://pypi.python.org/packages/source/t/testresources/testresources-"
2136 version ".tar.gz"))
2137 (sha256
2138 (base32
2139 "0cbj3plbllyz42c4b5xxgwaa7mml54lakslrn4kkhinxhdri22md"))))
2140 (build-system python-build-system)
2141 (home-page "https://launchpad.net/testresources")
2142 (synopsis
2143 "Pyunit extension for managing test resources")
2144 (description
2145 "Testresources is an extension to Python's unittest to allow declarative
2146 use of resources by test cases.")
2147 (license (list license:bsd-3 license:asl2.0)))) ; at the user's option
2148
2149 (define-public python2-testresources
2150 (package-with-python2 python-testresources))
2151
2152 (define-public python-subunit
2153 (package
2154 (name "python-subunit")
2155 (version "0.0.21")
2156 (source
2157 (origin
2158 (method url-fetch)
2159 (uri (string-append
2160 "https://pypi.python.org/packages/source/p/python-subunit/python-subunit-"
2161 version ".tar.gz"))
2162 (sha256
2163 (base32
2164 "1nkw9wfbvizmpajbj3in8ns07g7lwkiv8hip14jjlwk3cacls6jv"))))
2165 (build-system python-build-system)
2166 (propagated-inputs
2167 `(("python-extras" ,python-extras)
2168 ("python-mimeparse" ,python-mimeparse)))
2169 (native-inputs
2170 `(("python-testscenarios" ,python-testscenarios)))
2171 (home-page "http://launchpad.net/subunit")
2172 (synopsis "Python implementation of the subunit protocol")
2173 (description
2174 "Python-subunit is a Python implementation of the subunit test streaming
2175 protocol.")
2176 (license (list license:bsd-3 license:asl2.0)))) ; at the user's option
2177
2178 (define-public python2-subunit
2179 (package-with-python2 python-subunit))
2180
2181 ;; Recent versions of python-fixtures and python-testrepository need
2182 ;; python-pbr for packaging, which itself needs these two packages for
2183 ;; testing.
2184 ;; To fix this circular dependency, we use a build of python-pbr, based on the
2185 ;; same source, just without any test dependencies and with tests disabled.
2186 ;; python-pbr-minmal is then used to package python-fixtures and
2187 ;; python-testrepository.
2188 ;; Strictly speaking we currently could remove the test-requirements from the
2189 ;; normal python-pbr package (and save this package) since test are disabled
2190 ;; there anyway. But this may change in future.
2191 (define python-pbr-minimal
2192 (package
2193 (name "python-pbr-minimal")
2194 (version "1.10.0")
2195 (source
2196 (origin
2197 (method url-fetch)
2198 (uri (pypi-uri "pbr" version))
2199 (sha256
2200 (base32
2201 "177kd9kbv1hvf2ban7l3x9ymzbi1md4hkaymwbgnz7ihf312hr0q"))
2202 (patches (search-patches "python-pbr-fix-man-page-support.patch"))))
2203 (build-system python-build-system)
2204 (arguments
2205 `(#:tests? #f))
2206 (home-page "http://docs.openstack.org/developer/pbr/")
2207 (synopsis "Minimal build of python-pbr used for bootstrapping")
2208 (description
2209 "Used only for bootstrapping python2-pbr, you should not need this.")
2210 (license license:asl2.0)))
2211
2212 (define python2-pbr-minimal
2213 (package-with-python2 python-pbr-minimal))
2214
2215 (define-public python-pbr
2216 (package
2217 (inherit python-pbr-minimal)
2218 (name "python-pbr")
2219 (arguments
2220 `(#:tests? #f)) ;; Most tests seem to use the Internet.
2221 (propagated-inputs
2222 `(("git" ,git))) ;; pbr actually uses the "git" binary.
2223 (native-inputs
2224 `(("python-fixtures" ,python-fixtures)
2225 ;; discover, coverage, hacking, subunit
2226 ("python-mock" ,python-mock)
2227 ("python-six" ,python-six)
2228 ("python-sphinx" ,python-sphinx)
2229 ("python-testrepository" ,python-testrepository)
2230 ("python-testresources" ,python-testresources)
2231 ("python-testscenarios" ,python-testscenarios)
2232 ("python-testtools" ,python-testtools)
2233 ("python-virtualenv" ,python-virtualenv)))
2234 (synopsis "Enhance the default behavior of Python’s setuptools")
2235 (description
2236 "Python Build Reasonableness (PBR) is a library that injects some useful
2237 and sensible default behaviors into your setuptools run. It will set
2238 versions, process requirements files and generate AUTHORS and ChangeLog file
2239 from git information.
2240 ")))
2241
2242 (define-public python2-pbr
2243 (package-with-python2 python-pbr))
2244
2245 (define-public python-fixtures
2246 (package
2247 (name "python-fixtures")
2248 (version "1.4.0")
2249 (source
2250 (origin
2251 (method url-fetch)
2252 (uri (pypi-uri "fixtures" version))
2253 (sha256
2254 (base32
2255 "0djxvdwm8s60dbfn7bhf40x6g818p3b3mlwijm1c3bqg7msn271y"))))
2256 (build-system python-build-system)
2257 (arguments
2258 '(#:phases
2259 (modify-phases %standard-phases
2260 (replace 'check
2261 (lambda _
2262 (zero? (system* "python" "-m" "testtools.run"
2263 "fixtures.test_suite")))))))
2264 (propagated-inputs
2265 `(("python-six" ,python-six)))
2266 (native-inputs
2267 `(("python-mock" ,python-mock)
2268 ("python-pbr-minimal" ,python-pbr-minimal)
2269 ("python-testtools" ,python-testtools)))
2270 (home-page "https://launchpad.net/python-fixtures")
2271 (synopsis "Python test fixture library")
2272 (description
2273 "Fixtures provides a way to create reusable state, useful when writing
2274 Python tests.")
2275 (license (list license:bsd-3 license:asl2.0)))) ; at user's option
2276
2277 (define-public python2-fixtures
2278 (package-with-python2 python-fixtures))
2279
2280 (define-public python-testrepository
2281 (package
2282 (name "python-testrepository")
2283 (version "0.0.20")
2284 (source
2285 (origin
2286 (method url-fetch)
2287 (uri (string-append
2288 "https://pypi.python.org/packages/source/t/testrepository/testrepository-"
2289 version ".tar.gz"))
2290 (sha256
2291 (base32
2292 "1ssqb07c277010i6gzzkbdd46gd9mrj0bi0i8vn560n2k2y4j93m"))))
2293 (build-system python-build-system)
2294 (arguments
2295 ;; FIXME: Many tests are failing.
2296 '(#:tests? #f))
2297 (propagated-inputs
2298 `(("python-fixtures" ,python-fixtures)
2299 ("python-subunit" ,python-subunit)
2300 ("python-testtools" ,python-testtools)))
2301 (native-inputs
2302 `(("python-pbr-minimal" ,python-pbr-minimal) ;; same as for building fixture
2303 ("python-mimeparse" ,python-mimeparse)))
2304 (home-page "https://launchpad.net/testrepository")
2305 (synopsis "Database for Python test results")
2306 (description "Testrepository provides a database of test results which can
2307 be used as part of a developer's workflow to check things such as what tests
2308 have failed since the last commit or what tests are currently failing.")
2309 (license (list license:bsd-3 license:asl2.0)))) ; at user's option
2310
2311 (define-public python2-testrepository
2312 (package-with-python2 python-testrepository))
2313
2314 (define-public python-coverage
2315 (package
2316 (name "python-coverage")
2317 (version "4.1")
2318 (source
2319 (origin
2320 (method url-fetch)
2321 (uri (pypi-uri "coverage" version))
2322 (sha256
2323 (base32
2324 "01rbr4br4lsk0lwn8fb96zwd2xr4f0mg1w7iq3j11i8f5ig2nqs1"))))
2325 (build-system python-build-system)
2326 (arguments
2327 ;; FIXME: 95 tests failed, 539 passed, 6 skipped, 2 errors.
2328 '(#:tests? #f))
2329 (home-page "http://nedbatchelder.com/code/coverage")
2330 (synopsis "Code coverage measurement for Python")
2331 (description
2332 "Coverage measures code coverage, typically during test execution. It
2333 uses the code analysis tools and tracing hooks provided in the Python standard
2334 library to determine which lines are executable, and which have been
2335 executed.")
2336 (license license:bsd-3)))
2337
2338 (define-public python2-coverage
2339 (package-with-python2 python-coverage))
2340
2341 (define-public python-cov-core
2342 (package
2343 (name "python-cov-core")
2344 (version "1.15.0")
2345 (source
2346 (origin
2347 (method url-fetch)
2348 (uri (pypi-uri "cov-core" version))
2349 (sha256
2350 (base32
2351 "0k3np9ymh06yv1ib96sb6wfsxjkqhmik8qfsn119vnhga9ywc52a"))))
2352 (build-system python-build-system)
2353 (propagated-inputs
2354 `(("python-coverage" ,python-coverage)))
2355 (home-page "https://github.com/schlamar/cov-core")
2356 (synopsis "Coverage plugin core for pytest-cov, nose-cov and nose2-cov")
2357 (description
2358 "This is a library package for use by @code{pytest-cov}, @code{nose-cov}
2359 and @code{nose2-cov}. It is useful for developing coverage plugins for these
2360 testing frameworks.")
2361 (license license:expat)))
2362
2363 (define-public python2-cov-core
2364 (package-with-python2 python-cov-core))
2365
2366 (define-public python-discover
2367 (package
2368 (name "python-discover")
2369 (version "0.4.0")
2370 (source
2371 (origin
2372 (method url-fetch)
2373 (uri (string-append
2374 "https://pypi.python.org/packages/source/d/discover/discover-"
2375 version ".tar.gz"))
2376 (sha256
2377 (base32
2378 "0y8d0zwiqar51kxj8lzmkvwc3b8kazb04gk5zcb4nzg5k68zmhq5"))))
2379 (build-system python-build-system)
2380 (home-page "http://pypi.python.org/pypi/discover/")
2381 (synopsis
2382 "Python test discovery for unittest")
2383 (description
2384 "Discover provides test discovery for unittest, a feature that has been
2385 backported from Python 2.7 for Python 2.4+.")
2386 (license license:bsd-3)))
2387
2388 (define-public python2-discover
2389 (package-with-python2 python-discover))
2390
2391 (define-public behave
2392 (package
2393 (name "behave")
2394 (version "1.2.5")
2395 (source (origin
2396 (method url-fetch)
2397 (uri (pypi-uri "behave" version ".tar.bz2"))
2398 (sha256
2399 (base32
2400 "1iypp6z46r19n4xmgx6m1lwmlpfjh8vapq8izigrqlaarvp2y64c"))))
2401 (build-system python-build-system)
2402 (propagated-inputs
2403 `(("python-six" ,python-six)
2404 ("python-parse" ,python-parse)
2405 ("python-parse-type" ,python-parse-type)))
2406 (arguments `(#:tests? #f)) ;TODO: tests require nose>=1.3 and
2407 ;PyHamcrest>=1.8
2408 (home-page "https://github.com/behave/behave")
2409 (synopsis "Python behavior-driven development")
2410 (description
2411 "Behave is a tool for behavior-driven development in python.
2412 Behavior-driven development (or BDD) is an agile software development
2413 technique that encourages collaboration between developers, QA and
2414 non-technical or business participants in a software project. Behave uses
2415 tests written in a natural language style, backed up by Python code.")
2416 (license license:x11)))
2417
2418 (define-public python-exif-read
2419 (package
2420 (name "python-exif-read")
2421 (version "2.1.2")
2422 (source (origin
2423 (method url-fetch)
2424 (uri (pypi-uri "ExifRead" version))
2425 (sha256
2426 (base32
2427 "1b90jf6m9vxh9nanhpyvqdq7hmfx5iggw1l8kq10jrs6xgr49qkr"))))
2428 (build-system python-build-system)
2429 (arguments `(#:tests? #f)) ; no tests
2430 (home-page "https://github.com/ianare/exif-py")
2431 (synopsis "Python library to extract EXIF data from image files")
2432 (description
2433 "ExifRead is a Python library to extract EXIF data from tiff and jpeg
2434 files.")
2435 (license license:bsd-3)))
2436
2437 (define-public python2-exif-read
2438 (package-with-python2 python-exif-read))
2439
2440 (define-public python-pyld
2441 (package
2442 (name "python-pyld")
2443 (version "0.7.1")
2444 (source (origin
2445 (method url-fetch)
2446 (uri (pypi-uri "PyLD" version))
2447 (sha256
2448 (base32
2449 "1m0fs6897vxfkf7awah5i66i7b7smm5fnywf1w50fpzyfbfhr156"))))
2450 (build-system python-build-system)
2451 (arguments `(#:tests? #f)) ; no tests
2452 (home-page "https://github.com/digitalbazaar/pyld")
2453 (synopsis "Python implementation of the JSON-LD specification")
2454 (description
2455 "PyLD is an implementation of the JSON-LD specification.")
2456 (license license:bsd-3)))
2457
2458 (define-public python2-pyld
2459 (package-with-python2 python-pyld))
2460
2461 (define-public python-certifi
2462 (package
2463 (name "python-certifi")
2464 (version "2017.1.23")
2465 (source (origin
2466 (method url-fetch)
2467 (uri (pypi-uri "certifi" version))
2468 (sha256
2469 (base32
2470 "1klrzl3hgvcf2mjk00g0k3kk1p2z27vzwnxivwar4vhjmjvpz1w1"))))
2471 (build-system python-build-system)
2472 (home-page "https://certifi.io/")
2473 (synopsis "Python CA certificate bundle")
2474 (description
2475 "Certifi is a Python library that contains a CA certificate bundle, which
2476 is used by the Requests library to verify HTTPS requests.")
2477 (license license:asl2.0)))
2478
2479 (define-public python2-certifi
2480 (package-with-python2 python-certifi))
2481
2482 (define-public python-click
2483 (package
2484 (name "python-click")
2485 (version "6.7")
2486 (source
2487 (origin
2488 (method url-fetch)
2489 (uri (pypi-uri "click" version))
2490 (sha256
2491 (base32
2492 "02qkfpykbq35id8glfgwc38yc430427yd05z1wc5cnld8zgicmgi"))))
2493 (build-system python-build-system)
2494 (arguments
2495 `(#:phases
2496 (modify-phases %standard-phases
2497 (add-after 'unpack 'fix-paths
2498 (lambda* (#:key inputs #:allow-other-keys)
2499 (let ((glibc (assoc-ref inputs ,(if (%current-target-system)
2500 "cross-libc" "libc"))))
2501 (substitute* "click/_unicodefun.py"
2502 (("'locale'")
2503 (string-append "'" glibc "/bin/locale'"))))
2504 #t))
2505 (replace 'check
2506 (lambda _
2507 (zero? (system* "make" "test")))))))
2508 (native-inputs
2509 `(("python-pytest" ,python-pytest)))
2510 (home-page "http://click.pocoo.org")
2511 (synopsis "Command line library for Python")
2512 (description
2513 "Click is a Python package for creating command line interfaces in a
2514 composable way with as little code as necessary. Its name stands for
2515 \"Command Line Interface Creation Kit\". It's highly configurable but comes
2516 with sensible defaults out of the box.")
2517 (license license:bsd-3)))
2518
2519 (define-public python2-click
2520 (package-with-python2 python-click))
2521
2522 (define-public python-wheel
2523 (package
2524 (name "python-wheel")
2525 (version "0.30.0a0")
2526 (source
2527 (origin
2528 (method url-fetch)
2529 (uri (pypi-uri "wheel" version))
2530 (sha256
2531 (base32
2532 "1nm6mn8isny0hr86rhbfrpfj867c0phf001xgsd69xfp9ady1wwq"))))
2533 (build-system python-build-system)
2534 (native-inputs
2535 `(("python-jsonschema" ,python-jsonschema)
2536 ("python-pytest-cov" ,python-pytest-cov)))
2537 (home-page "https://bitbucket.org/pypa/wheel/")
2538 (synopsis "Format for built Python packages")
2539 (description
2540 "A wheel is a ZIP-format archive with a specially formatted filename and
2541 the @code{.whl} extension. It is designed to contain all the files for a PEP
2542 376 compatible install in a way that is very close to the on-disk format. Many
2543 packages will be properly installed with only the @code{Unpack} step and the
2544 unpacked archive preserves enough information to @code{Spread} (copy data and
2545 scripts to their final locations) at any later time. Wheel files can be
2546 installed with a newer @code{pip} or with wheel's own command line utility.")
2547 (license license:expat)
2548 (properties `((python2-variant . ,(delay python2-wheel))))))
2549
2550 (define-public python2-wheel
2551 (let ((wheel (package-with-python2
2552 (strip-python2-variant python-wheel))))
2553 (package (inherit wheel)
2554 (native-inputs `(("python2-functools32" ,python2-functools32)
2555 ,@(package-native-inputs wheel))))))
2556
2557
2558 (define-public python-requests
2559 (package
2560 (name "python-requests")
2561 (version "2.13.0")
2562 (source (origin
2563 (method url-fetch)
2564 (uri (pypi-uri "requests" version))
2565 (sha256
2566 (base32
2567 "1s0wg4any4dsv5l3hqjxqk2zgb7pdbqhy9rhc8kh3aigfq4ws8jp"))))
2568 ;; TODO: unbundle urllib3 and chardet.
2569 (build-system python-build-system)
2570 (arguments
2571 ;; FIXME: Some tests require network access.
2572 '(#:tests? #f))
2573 (home-page "http://python-requests.org/")
2574 (synopsis "Python HTTP library")
2575 (description
2576 "Requests is a Python HTTP client library. It aims to be easier to use
2577 than Python’s urllib2 library.")
2578 (license license:asl2.0)))
2579
2580 ;; Some software requires an older version of Requests, notably Docker
2581 ;; Compose.
2582 (define-public python-requests-2.7
2583 (package (inherit python-requests)
2584 (version "2.7.0")
2585 (source (origin
2586 (method url-fetch)
2587 (uri (pypi-uri "requests" version))
2588 (sha256
2589 (base32
2590 "0gdr9dxm24amxpbyqpbh3lbwxc2i42hnqv50sigx568qssv3v2ir"))))))
2591
2592 (define-public python2-requests
2593 (package-with-python2 python-requests))
2594
2595 (define-public python-vcversioner
2596 (package
2597 (name "python-vcversioner")
2598 (version "2.16.0.0")
2599 (source
2600 (origin
2601 (method url-fetch)
2602 (uri (pypi-uri "vcversioner" version))
2603 (sha256
2604 (base32
2605 "16z10sm78jd7ca3jbkgc3q5i8a8q7y1h21q1li21yy3rlhbhrrns"))))
2606 (build-system python-build-system)
2607 (synopsis "Python library for version number discovery")
2608 (description "Vcversioner is a Python library that inspects tagging
2609 information in a variety of version control systems in order to discover
2610 version numbers.")
2611 (home-page "https://github.com/habnabit/vcversioner")
2612 (license license:isc)))
2613
2614 (define-public python2-vcversioner
2615 (package-with-python2 python-vcversioner))
2616
2617 (define-public python-jsonschema
2618 (package
2619 (name "python-jsonschema")
2620 (version "2.5.1")
2621 (source (origin
2622 (method url-fetch)
2623 (uri
2624 (string-append
2625 "https://pypi.python.org/packages/source/j/jsonschema/jsonschema-"
2626 version ".tar.gz"))
2627 (sha256
2628 (base32
2629 "0hddbqjm4jq63y8jf44nswina1crjs16l9snb6m3vvgyg31klrrn"))))
2630 (build-system python-build-system)
2631 (arguments
2632 '(#:phases
2633 (modify-phases %standard-phases
2634 (replace 'check (lambda _ (zero? (system* "nosetests")))))))
2635 (native-inputs
2636 `(("python-nose" ,python-nose)
2637 ("python-vcversioner" ,python-vcversioner)))
2638 (home-page "https://github.com/Julian/jsonschema")
2639 (synopsis "Implementation of JSON Schema for Python")
2640 (description
2641 "Jsonschema is an implementation of JSON Schema for Python.")
2642 (license license:expat)
2643 (properties `((python2-variant . ,(delay python2-jsonschema))))))
2644
2645 (define-public python2-jsonschema
2646 (let ((jsonschema (package-with-python2
2647 (strip-python2-variant python-jsonschema))))
2648 (package (inherit jsonschema)
2649 (native-inputs
2650 `(("python2-mock" ,python2-mock)
2651 ,@(package-native-inputs jsonschema)))
2652 (propagated-inputs
2653 `(("python2-functools32" ,python2-functools32))))))
2654
2655 (define-public python-kitchen
2656 (package
2657 (name "python-kitchen")
2658 (version "1.2.4")
2659 (source
2660 (origin
2661 (method url-fetch)
2662 (uri (pypi-uri "kitchen" version))
2663 (sha256
2664 (base32
2665 "0ggv3p4x8jvmmzhp0xm00h6pvh1g0gmycw71rjwagnrj8n23vxrq"))))
2666 (build-system python-build-system)
2667 (propagated-inputs
2668 `(("python-chardet" ,python-chardet)))
2669 (home-page "https://github.com/fedora-infra/kitchen")
2670 (synopsis "Python API for snippets")
2671 (description "@code{kitchen} module provides a python API for all sorts of
2672 little useful snippets of code that everybody ends up writing for their projects
2673 but never seem big enough to build an independent release. Use kitchen and stop
2674 cutting and pasting that code over and over.")
2675 (license (list license:lgpl2.1+
2676 ;; subprocess.py, test_subprocess.py,
2677 ;; kitchen/pycompat25/defaultdict.py:
2678 license:psfl))))
2679
2680 (define-public python2-kitchen
2681 (package-with-python2 python-kitchen))
2682
2683 (define-public python-unidecode
2684 (package
2685 (name "python-unidecode")
2686 (version "0.04.20")
2687 (source (origin
2688 (method url-fetch)
2689 (uri (pypi-uri "Unidecode" version))
2690 (sha256
2691 (base32
2692 "1q00i8gpsq3d9r0q8wk4b290fxl0kqlsdk7iadvli45in6s1hi7d"))))
2693 (build-system python-build-system)
2694 (home-page "https://pypi.python.org/pypi/Unidecode")
2695 (synopsis "ASCII transliterations of Unicode text")
2696 (description
2697 "Unidecode provides ASCII transliterations of Unicode text. Unidecode is
2698 useful when integrating with legacy code that doesn't support Unicode, or for
2699 ease of entry of non-Roman names on a US keyboard, or when constructing ASCII
2700 machine identifiers from human-readable Unicode strings that should still be
2701 somewhat intelligeble.")
2702 (license license:gpl2+)))
2703
2704 (define-public python2-unidecode
2705 (package-with-python2 python-unidecode))
2706
2707 (define-public python-pyjwt
2708 (package
2709 (name "python-pyjwt")
2710 (version "1.4.0")
2711 (source
2712 (origin
2713 (method url-fetch)
2714 (uri (pypi-uri "PyJWT" version))
2715 (sha256
2716 (base32
2717 "1556v2jppd8mjkkj66pxb5rcazm35jq81r233mdl8hfmz9n3icp1"))))
2718 (build-system python-build-system)
2719 (native-inputs
2720 `(("python-pytest" ,python-pytest)
2721 ("python-pytest-cov" ,python-pytest-cov)
2722 ("python-pytest-runner" ,python-pytest-runner)))
2723 (home-page "https://github.com/progrium/pyjwt")
2724 (synopsis "JSON Web Token implementation in Python")
2725 (description
2726 "PyJWT is a JSON Web Token implementation written in Python.")
2727 (license license:expat)))
2728
2729 (define-public python2-pyjwt
2730 (package-with-python2 python-pyjwt))
2731
2732 (define-public python-pykka
2733 (package
2734 (name "python-pykka")
2735 (version "1.2.1")
2736 (source
2737 (origin
2738 (method url-fetch)
2739 (uri (pypi-uri "Pykka" version))
2740 (sha256
2741 (base32
2742 "049w3r0mdnnw7xv19jiq7rvls9k7xs73x05b4qs5d6z4vvmgyiz8"))))
2743 (build-system python-build-system)
2744 (native-inputs
2745 `(("python-mock" ,python-mock)
2746 ("python-nose" ,python-nose)
2747 ("python-gevent" ,python-gevent)
2748 ("python-eventlet" ,python-eventlet)))
2749 (home-page "https://www.pykka.org/")
2750 (synopsis "Pykka is a Python implementation of the actor model")
2751 (description
2752 "Pykka is a Python implementation of the actor model.
2753 The actor model introduces some simple rules to control the sharing
2754 of state and cooperation between execution units, which makes it
2755 easier to build concurrent applications.")
2756 (license license:asl2.0)))
2757
2758 (define-public python2-pykka
2759 (package-with-python2 python-pykka))
2760
2761 (define-public python-oauthlib
2762 (package
2763 (name "python-oauthlib")
2764 (version "1.0.3")
2765 (source (origin
2766 (method url-fetch)
2767 (uri (pypi-uri "oauthlib" version))
2768 (sha256
2769 (base32
2770 "1bfrj70vdjxjw74khbyh6f0dksv7p5rh2346jnlrffyacd3gwjzg"))))
2771 (build-system python-build-system)
2772 (native-inputs
2773 `(("python-nose" ,python-nose)
2774 ("python-mock" ,python-mock)
2775 ("python-cryptography" ,python-cryptography)
2776 ("python-pyjwt" ,python-pyjwt)
2777 ("python-blinker" ,python-blinker)))
2778 (home-page "https://github.com/idan/oauthlib")
2779 (synopsis "OAuth implementation for Python")
2780 (description
2781 "Oauthlib is a generic, spec-compliant, thorough implementation of the
2782 OAuth request-signing logic.")
2783 (license license:bsd-3)
2784 (properties `((python2-variant . ,(delay python2-oauthlib))))))
2785
2786 (define-public python2-oauthlib
2787 (let ((base (package-with-python2 (strip-python2-variant python-oauthlib))))
2788 (package
2789 (inherit base)
2790 (native-inputs `(("python2-unittest2" ,python2-unittest2)
2791 ,@(package-native-inputs base))))))
2792
2793 (define-public python-itsdangerous
2794 (package
2795 (name "python-itsdangerous")
2796 (version "0.24")
2797 (source
2798 (origin
2799 (method url-fetch)
2800 (uri (string-append
2801 "https://pypi.python.org/packages/source/i/itsdangerous/itsdangerous-"
2802 version ".tar.gz"))
2803 (sha256
2804 (base32
2805 "06856q6x675ly542ig0plbqcyab6ksfzijlyf1hzhgg3sgwgrcyb"))))
2806 (build-system python-build-system)
2807 (home-page "https://github.com/mitsuhiko/itsdangerous")
2808 (synopsis "Python library for passing data to/from untrusted environments")
2809 (description
2810 "Itsdangerous provides various helpers to pass trusted data to untrusted
2811 environments and back.")
2812 (license license:bsd-3)))
2813
2814 (define-public python2-itsdangerous
2815 (package-with-python2 python-itsdangerous))
2816
2817 (define-public python-pyyaml
2818 (package
2819 (name "python-pyyaml")
2820 (version "3.12")
2821 (source
2822 (origin
2823 (method url-fetch)
2824 (uri (pypi-uri "PyYAML" version))
2825 (sha256
2826 (base32
2827 "1aqjl8dk9amd4zr99n8v2qxzgmr2hdvqfma4zh7a41rj6336c9sr"))))
2828 (build-system python-build-system)
2829 (inputs
2830 `(("libyaml" ,libyaml)))
2831 (home-page "http://pyyaml.org/wiki/PyYAML")
2832 (synopsis "YAML parser and emitter for Python")
2833 (description
2834 "PyYAML is a YAML parser and emitter for Python. PyYAML features a
2835 complete YAML 1.1 parser, Unicode support, pickle support, capable extension
2836 API, and sensible error messages. PyYAML supports standard YAML tags and
2837 provides Python-specific tags that allow to represent an arbitrary Python
2838 object.")
2839 (license license:expat)))
2840
2841 (define-public python2-pyyaml
2842 (package-with-python2 python-pyyaml))
2843
2844 (define-public python-virtualenv
2845 (package
2846 (name "python-virtualenv")
2847 (version "15.0.3")
2848 (source
2849 (origin
2850 (method url-fetch)
2851 (uri (pypi-uri "virtualenv" version))
2852 (sha256
2853 (base32
2854 "07cbajzk8l05k5zhlw0b9wbf2is65bl9v6zrn2a0iyn57w6pd73d"))))
2855 (build-system python-build-system)
2856 (arguments
2857 `(#:phases
2858 (modify-phases %standard-phases
2859 (replace 'check
2860 (lambda _
2861 ;; Disable failing test. See upstream bug report
2862 ;; https://github.com/pypa/virtualenv/issues/957
2863 (substitute* "tests/test_virtualenv.py"
2864 (("skipif.*") "skipif(True, reason=\"Guix\")\n"))
2865 (zero? (system* "py.test")))))))
2866 (native-inputs
2867 `(("python-mock" ,python-mock)
2868 ("python-pytest" ,python-pytest)))
2869 (home-page "https://virtualenv.pypa.io/")
2870 (synopsis "Virtual Python environment builder")
2871 (description
2872 "Virtualenv is a tool to create isolated Python environments.")
2873 (license license:expat)))
2874
2875 (define-public python2-virtualenv
2876 (package-with-python2 python-virtualenv))
2877
2878 (define-public python-markupsafe
2879 (package
2880 (name "python-markupsafe")
2881 (version "0.23")
2882 (source
2883 (origin
2884 (method url-fetch)
2885 (uri (string-append
2886 "https://pypi.python.org/packages/source/M/MarkupSafe/MarkupSafe-"
2887 version ".tar.gz"))
2888 (sha256
2889 (base32
2890 "1hvip33wva3fnmvfp9x5klqri7hpl1hkgqmjbss18nmrb7zimv54"))))
2891 (build-system python-build-system)
2892 (home-page "https://github.com/mitsuhiko/markupsafe")
2893 (synopsis "XML/HTML/XHTML markup safe string implementation for Python")
2894 (description
2895 "Markupsafe provides an XML/HTML/XHTML markup safe string implementation
2896 for Python.")
2897 (license license:bsd-3)))
2898
2899 (define-public python2-markupsafe
2900 (package-with-python2 python-markupsafe))
2901
2902 (define-public python-jinja2
2903 (package
2904 (name "python-jinja2")
2905 (version "2.8")
2906 (source
2907 (origin
2908 (method url-fetch)
2909 (uri (pypi-uri "Jinja2" version))
2910 (sha256
2911 (base32
2912 "1x0v41lp5m1pjix3l46zx02b7lqp2hflgpnxwkywxynvi3zz47xw"))))
2913 (build-system python-build-system)
2914 (propagated-inputs
2915 `(("python-markupsafe" ,python-markupsafe)))
2916 (home-page "http://jinja.pocoo.org/")
2917 (synopsis "Python template engine")
2918 (description
2919 "Jinja2 is a small but fast and easy to use stand-alone template engine
2920 written in pure Python.")
2921 (license license:bsd-3)))
2922
2923 (define-public python2-jinja2
2924 (package-with-python2 python-jinja2))
2925
2926 (define-public python-pystache
2927 (package
2928 (name "python-pystache")
2929 (version "0.5.4")
2930 (source (origin
2931 (method url-fetch)
2932 (uri (pypi-uri "pystache" version))
2933 (sha256
2934 (base32
2935 "0nmqsfmiw4arjxqkmf9z66ml950pcdjk6aq4gin4sywmzdjw5fzp"))))
2936 (build-system python-build-system)
2937 (arguments
2938 '(#:tests? #f)) ; FIXME: Python 3 tests are failing.
2939 (home-page "http://defunkt.io/pystache/")
2940 (synopsis "Python logic-less template engine")
2941 (description
2942 "Pystache is a Python implementation of the framework agnostic,
2943 logic-free templating system Mustache.")
2944 (license license:expat)
2945 (properties `((python2-variant . ,(delay python2-pystache))))))
2946
2947 (define-public python2-pystache
2948 (package (inherit (package-with-python2
2949 (strip-python2-variant python-pystache)))
2950 (arguments
2951 `(#:python ,python-2
2952 #:phases
2953 (modify-phases %standard-phases
2954 (replace 'check
2955 (lambda _
2956 (zero? (system* "python" "test_pystache.py")))))))))
2957
2958 (define-public python-joblib
2959 (package
2960 (name "python-joblib")
2961 (version "0.10.3")
2962 (source (origin
2963 (method url-fetch)
2964 (uri (pypi-uri "joblib" version))
2965 (sha256
2966 (base32
2967 "0787k919zlfmgymprz5bzv0v1df5bbirlf3awrghmjgvkrd9dci9"))
2968 (modules '((guix build utils)))
2969 (snippet
2970 '(begin
2971 ;; Remove pre-compiled .pyc files from source.
2972 (for-each delete-file-recursively
2973 (find-files "." "__pycache__" #:directories? #t))
2974 (for-each delete-file (find-files "." "\\.pyc$"))
2975 #t))))
2976 (build-system python-build-system)
2977 (arguments
2978 `(#:phases
2979 (modify-phases %standard-phases
2980 (add-before 'check 'disable-failing-tests
2981 (lambda _
2982 ;; This numpydoc tests fails for unknown reasons
2983 (delete-file "doc/sphinxext/numpydoc/tests/test_docscrape.py")
2984 ;; This numpydoc test depends on matplotlib, which is not a
2985 ;; required input.
2986 (delete-file "doc/sphinxext/numpydoc/tests/test_plot_directive.py")
2987 ;; These tests fail to execute sys.executable
2988 (substitute* "joblib/test/test_parallel.py"
2989 (("import nose" line)
2990 (string-append "from nose.plugins.skip import SkipTest\n" line))
2991 (("def test_nested_parallel_warnings" line)
2992 (string-append "@SkipTest\n" line))
2993 (("def test_parallel_with_interactively_defined_functions" line)
2994 (string-append "@SkipTest\n" line)))
2995 #t)))))
2996 ;; Provide nose to enable tests command
2997 (native-inputs
2998 `(("python-nose" ,python-nose)
2999 ("python-sphinx" ,python-sphinx)
3000 ("python-docutils" ,python-docutils)
3001 ("python-numpydoc" ,python-numpydoc)))
3002 (home-page "http://pythonhosted.org/joblib/")
3003 (synopsis "Using Python functions as pipeline jobs")
3004 (description
3005 "Joblib is a set of tools to provide lightweight pipelining in Python.
3006 In particular, joblib offers: transparent disk-caching of the output values
3007 and lazy re-evaluation (memoize pattern), easy simple parallel computing
3008 logging and tracing of the execution.")
3009 (license license:bsd-3)))
3010
3011 (define-public python2-joblib
3012 (package-with-python2 python-joblib))
3013
3014 (define-public python-docutils
3015 (package
3016 (name "python-docutils")
3017 (version "0.13.1")
3018 (source
3019 (origin
3020 (method url-fetch)
3021 (uri (pypi-uri "docutils" version))
3022 (sha256
3023 (base32
3024 "1gkma47i609jfs7dssxn4y9vsz06qi0l5q41nws0zgkpnrghz33i"))))
3025 (build-system python-build-system)
3026 (arguments
3027 '(#:tests? #f)) ; no setup.py test command
3028 (home-page "http://docutils.sourceforge.net/")
3029 (synopsis "Python Documentation Utilities")
3030 (description
3031 "Docutils is a modular system for processing documentation into useful
3032 formats, such as HTML, XML, and LaTeX. For input Docutils supports
3033 reStructuredText.")
3034 ;; Most of the source code is public domain, but some source files are
3035 ;; licensed under the PFSL, BSD 2-clause, and GPLv3+ licenses.
3036 (license (list license:public-domain license:psfl license:bsd-2 license:gpl3+))))
3037
3038 (define-public python2-docutils
3039 (package-with-python2 python-docutils))
3040
3041 (define-public python-pygments
3042 (package
3043 (name "python-pygments")
3044 (version "2.1.3")
3045 (source
3046 (origin
3047 (method url-fetch)
3048 (uri (pypi-uri "Pygments" version))
3049 (sha256
3050 (base32
3051 "10axnp2wpjnq9g8wg53fx0c70dfxqrz498jyz8mrdx9a3flwir48"))))
3052 (build-system python-build-system)
3053 (arguments
3054 ;; FIXME: Tests require sphinx, which depends on this.
3055 '(#:tests? #f))
3056 (home-page "http://pygments.org/")
3057 (synopsis "Syntax highlighting")
3058 (description
3059 "Pygments is a syntax highlighting package written in Python.")
3060 (license license:bsd-2)))
3061
3062 (define-public python2-pygments
3063 (package-with-python2 python-pygments))
3064
3065 (define-public python-sphinx
3066 (package
3067 (name "python-sphinx")
3068 (version "1.5.1")
3069 (source
3070 (origin
3071 (method url-fetch)
3072 (uri (pypi-uri "Sphinx" version))
3073 (sha256
3074 (base32
3075 "1i8p9idnli4gr0y4x67yakbdk5w6a0xjzhrg6bg51y9d1fi7fslf"))))
3076 (build-system python-build-system)
3077 (arguments
3078 `(#:phases
3079 (modify-phases %standard-phases
3080 (replace 'check
3081 (lambda _
3082 ;; Requires Internet access.
3083 (delete-file "tests/test_build_linkcheck.py")
3084 (zero? (system* "make" "test")))))))
3085 (propagated-inputs
3086 `(("python-imagesize" ,python-imagesize)
3087 ("python-sphinx-alabaster-theme"
3088 ,python-sphinx-alabaster-theme)
3089 ("python-babel" ,python-babel)
3090 ("python-snowballstemmer" ,python-snowballstemmer)
3091 ("python-docutils" ,python-docutils)
3092 ("python-jinja2" ,python-jinja2)
3093 ("python-pygments" ,python-pygments)
3094 ("python-requests" ,python-requests)
3095 ("python-six" ,python-six)))
3096 (native-inputs
3097 `(("graphviz" ,graphviz)
3098 ("python-html5lib" ,python-html5lib)
3099 ("python-mock" ,python-mock)
3100 ("python-nose" ,python-nose)))
3101 (home-page "http://sphinx-doc.org/")
3102 (synopsis "Python documentation generator")
3103 (description "Sphinx is a tool that makes it easy to create documentation
3104 for Python projects or other documents consisting of multiple reStructuredText
3105 sources.")
3106 (license license:bsd-3)
3107 (properties `((python2-variant . ,(delay python2-sphinx))))))
3108
3109 (define-public python-sphinx-1.5.3
3110 (package
3111 (inherit python-sphinx)
3112 (name "python-sphinx")
3113 (version "1.5.3")
3114 (source
3115 (origin
3116 (method url-fetch)
3117 (uri (pypi-uri "Sphinx" version))
3118 (sha256
3119 (base32
3120 "0kw1axswbvaavr8ggyf4qr6hnisnrzlbkkcdada69vk1x9xjassg"))))
3121 (native-inputs
3122 `(("python-pytest" ,python-pytest-3.0)
3123 ,@(package-native-inputs python-sphinx)))))
3124
3125 (define-public python2-sphinx
3126 (let ((base (package-with-python2 (strip-python2-variant python-sphinx))))
3127 (package
3128 (inherit base)
3129 (native-inputs `(("python2-mock" ,python2-mock)
3130 ("python2-enum34" ,python2-enum34)
3131 ,@(package-native-inputs base)))
3132 (propagated-inputs `(("python2-pytz" ,python2-pytz)
3133 ,@(package-propagated-inputs base))))))
3134
3135 (define-public python-sphinx-rtd-theme
3136 (package
3137 (name "python-sphinx-rtd-theme")
3138 (version "0.2.4")
3139 (source
3140 (origin
3141 (method url-fetch)
3142 (uri (pypi-uri "sphinx_rtd_theme" version))
3143 (sha256
3144 (base32
3145 "05rlhjzdyapr2w74jjs7mrm8hi69qskcr5vya9f9drpsys7lpxrd"))))
3146 (build-system python-build-system)
3147 (arguments '(#:tests? #f)) ; No tests.
3148 (propagated-inputs
3149 `(("python-sphinx" ,python-sphinx)))
3150 (home-page "https://github.com/snide/sphinx_rtd_theme/")
3151 (synopsis "ReadTheDocs.org theme for Sphinx")
3152 (description "A theme for Sphinx used by ReadTheDocs.org.")
3153 (license license:expat)))
3154
3155 (define-public python2-sphinx-rtd-theme
3156 (package-with-python2 python-sphinx-rtd-theme))
3157
3158 (define-public python-rst.linker
3159 (package
3160 (name "python-rst.linker")
3161 (version "1.7")
3162 (source
3163 (origin
3164 (method url-fetch)
3165 (uri (pypi-uri "rst.linker" version))
3166 (sha256
3167 (base32
3168 "0bh4lnj2p1nh0wf5pgxgfbrp27xhb1rinahkb5j7s3qprq6qn0sr"))))
3169 (build-system python-build-system)
3170 (propagated-inputs
3171 `(("python-dateutil" ,python-dateutil)
3172 ("python-six" ,python-six)))
3173 (native-inputs
3174 `(("python-setuptools-scm" ,python-setuptools-scm)))
3175 ;; Test would require path.py, which would introduce a cyclic dependence.
3176 (arguments `(#:tests? #f))
3177 ;; Note: As of version 1.7 the documentation is not worth building.
3178 (home-page "https://github.com/jaraco/rst.linker")
3179 (synopsis "Sphinx plugin to add links and timestamps")
3180 (description "rst.linker allows to automatically replace text by a
3181 reStructuredText external reference or timestamps. It's primary purpose is to
3182 augment the changelog, but it can be used for other documents, too.")
3183 (license license:expat)))
3184
3185 (define-public python2-rst.linker
3186 (package-with-python2 python-rst.linker))
3187
3188 (define-public python-feedgenerator
3189 (package
3190 (name "python-feedgenerator")
3191 (version "1.9")
3192 (source
3193 (origin
3194 (method url-fetch)
3195 (uri (pypi-uri "feedgenerator" version))
3196 (sha256
3197 (base32
3198 "01mirwkm7xfx539hmvj7g9da1j51gw5lsx74dr0glizskjm5vq2s"))
3199 (modules '((guix build utils)))
3200 (snippet
3201 '(begin
3202 ;; Remove pre-compiled .pyc files from source.
3203 (for-each delete-file-recursively
3204 (find-files "." "__pycache__" #:directories? #t))
3205 (for-each delete-file (find-files "." "\\.pyc$"))
3206 #t))))
3207 (build-system python-build-system)
3208 (propagated-inputs
3209 `(("python-pytz" ,python-pytz)
3210 ("python-six" ,python-six)))
3211 (home-page "https://github.com/getpelican/feedgenerator")
3212 (synopsis
3213 "Standalone version of Django's Atom/RSS feed generator")
3214 (description
3215 "Feedgenerator-py3k is a standalone version of Django's feedgenerator,
3216 which can produce feeds in RSS 2.0, RSS 0.91, and Atom formats.")
3217 (license license:bsd-3)))
3218
3219 (define-public python2-feedgenerator
3220 (package-with-python2 python-feedgenerator))
3221
3222 (define-public python-blinker
3223 (package
3224 (name "python-blinker")
3225 (version "1.4")
3226 (source
3227 (origin
3228 (method url-fetch)
3229 (uri (pypi-uri "blinker" version))
3230 (sha256
3231 (base32
3232 "1dpq0vb01p36jjwbhhd08ylvrnyvcc82yxx3mwjx6awrycjyw6j7"))))
3233 (build-system python-build-system)
3234 (home-page "http://pythonhosted.org/blinker/")
3235 (synopsis "Fast, simple object-to-object and broadcast signaling")
3236 (description
3237 "Blinker provides a fast dispatching system that allows any number of
3238 interested parties to subscribe to events, or \"signals\".")
3239 (license license:expat)))
3240
3241 (define-public python2-blinker
3242 (package-with-python2 python-blinker))
3243
3244 (define-public pelican
3245 (package
3246 (name "pelican")
3247 (version "3.6.3")
3248 (source
3249 (origin
3250 (method url-fetch)
3251 (uri (pypi-uri "pelican" version))
3252 (sha256
3253 (base32
3254 "1hn94rb4q3zmcq16in055xikal4dba5hfx3zznq7warllcgc9f8k"))))
3255 (build-system python-build-system)
3256 (propagated-inputs
3257 `(("python-feedgenerator" ,python-feedgenerator)
3258 ("python-jinja2" ,python-jinja2)
3259 ("python-pygments" ,python-pygments)
3260 ("python-docutils" ,python-docutils)
3261 ("python-pytz" ,python-pytz)
3262 ("python-blinker" ,python-blinker)
3263 ("python-unidecode" ,python-unidecode)
3264 ("python-six" ,python-six)
3265 ("python-dateutil" ,python-dateutil)))
3266 (home-page "http://getpelican.com/")
3267 (arguments
3268 `(;; XXX Requires a lot more packages to do unit tests :P
3269 #:tests? #f
3270 #:phases (modify-phases %standard-phases
3271 (add-before
3272 'install 'adjust-requires
3273 ;; Since feedgenerator is installed from git, it doesn't
3274 ;; conform to the version requirements.
3275 ;;
3276 ;; We *do have* "feedgenerator >= 1.6", but strip off the
3277 ;; version requirement so setuptools doesn't get confused.
3278 (lambda _
3279 (substitute* "setup.py"
3280 (("['\"]feedgenerator.*?['\"]")
3281 "'feedgenerator'")))))))
3282 (synopsis "Python-based static site publishing system")
3283 (description
3284 "Pelican is a tool to generate a static blog from reStructuredText,
3285 Markdown input files, and more. Pelican uses Jinja2 for templating
3286 and is very extensible.")
3287 (license license:agpl3+)))
3288
3289 (define-public python-scikit-learn
3290 (package
3291 (name "python-scikit-learn")
3292 (version "0.18.1")
3293 (source
3294 (origin
3295 (method url-fetch)
3296 (uri (string-append
3297 "https://github.com/scikit-learn/scikit-learn/archive/"
3298 version ".tar.gz"))
3299 (file-name (string-append name "-" version ".tar.gz"))
3300 (sha256
3301 (base32
3302 "1hwswckdmd27f7k1jvwdc0m4mqrgxl2s245yq1scq34v124bjqgq"))))
3303 (build-system python-build-system)
3304 (arguments
3305 `(#:phases
3306 (modify-phases %standard-phases
3307 (delete 'check)
3308 (add-after 'install 'check
3309 ;; Running tests from the source directory requires
3310 ;; an "inplace" build with paths relative to CWD.
3311 ;; http://scikit-learn.org/stable/developers/advanced_installation.html#testing
3312 ;; Use the installed version instead.
3313 (lambda* (#:key inputs outputs #:allow-other-keys)
3314 (add-installed-pythonpath inputs outputs)
3315 ;; some tests require access to "$HOME"
3316 (setenv "HOME" "/tmp")
3317 ;; Step out of the source directory just to be sure.
3318 (chdir "..")
3319 (zero? (system* "nosetests" "-v" "sklearn")))))))
3320 (inputs
3321 `(("openblas" ,openblas)))
3322 (native-inputs
3323 `(("python-nose" ,python-nose)
3324 ("python-cython" ,python-cython)))
3325 (propagated-inputs
3326 `(("python-numpy" ,python-numpy)
3327 ("python-scipy" ,python-scipy)))
3328 (home-page "http://scikit-learn.org/")
3329 (synopsis "Machine Learning in Python")
3330 (description
3331 "Scikit-learn provides simple and efficient tools for data
3332 mining and data analysis.")
3333 (license license:bsd-3)))
3334
3335 (define-public python2-scikit-learn
3336 (package-with-python2 python-scikit-learn))
3337
3338 (define-public python-scikit-image
3339 (package
3340 (name "python-scikit-image")
3341 (version "0.11.3")
3342 (source
3343 (origin
3344 (method url-fetch)
3345 (uri (string-append
3346 "https://pypi.python.org/packages/source/s/scikit-image/scikit-image-"
3347 version ".tar.gz"))
3348 (sha256
3349 (base32 "0jz416fqvpahqyffw8plmszzfj669w8wvf3y9clnr5lr6a7md3kn"))))
3350 (build-system python-build-system)
3351 (arguments
3352 ;; TODO: Some tests require running X11 server. Disable them?
3353 '(#:tests? #f))
3354 ;; See DEPENDS.txt for the list of build and run time requiremnts
3355 (propagated-inputs
3356 `(("python-matplotlib" ,python-matplotlib)
3357 ("python-networkx" ,python-networkx)
3358 ("python-scipy" ,python-scipy)
3359 ("python-pillow" ,python-pillow)))
3360 (native-inputs
3361 `(("python-numpy" ,python-numpy)
3362 ("python-cython" ,python-cython)
3363 ("python-six" ,python-six)))
3364 (home-page "http://scikit-image.org/")
3365 (synopsis "Image processing in Python")
3366 (description
3367 "Scikit-image is a collection of algorithms for image processing.")
3368 (license license:bsd-3)))
3369
3370 (define-public python2-scikit-image
3371 (package-with-python2 python-scikit-image))
3372
3373 (define-public python-redis
3374 (package
3375 (name "python-redis")
3376 (version "2.10.5")
3377 (source
3378 (origin
3379 (method url-fetch)
3380 (uri (pypi-uri "redis" version))
3381 (sha256
3382 (base32 "0csmrkxb29x7xs9b51zplwkkq2hwnbh9jns1g85dykn5rxmaxysx"))))
3383 (build-system python-build-system)
3384 ;; Tests require a running Redis server
3385 (arguments '(#:tests? #f))
3386 ;; As long as we are not running test, we do not need this input :-)
3387 ;;(native-inputs
3388 ;; `(("python-pytest" ,python-pytest)))
3389 (home-page "https://github.com/andymccurdy/redis-py")
3390 (synopsis "Redis Python client")
3391 (description
3392 "This package provides a Python interface to the Redis key-value store.")
3393 (license license:expat)))
3394
3395 (define-public python2-redis
3396 (package-with-python2 python-redis))
3397
3398 (define-public python-rq
3399 (package
3400 (name "python-rq")
3401 (version "0.7.1")
3402 (source
3403 (origin
3404 (method url-fetch)
3405 (uri (pypi-uri "rq" version))
3406 (sha256
3407 (base32 "0gaq5pnh0zy46r8jvygi0ifbvz3pq6i7xla78ijcgjw0x77qzsdh"))))
3408 (build-system python-build-system)
3409 (propagated-inputs
3410 `(("python-click" ,python-click)
3411 ("python-redis" ,python-redis)))
3412 (home-page "http://python-rq.org/")
3413 (synopsis "Simple job queues for Python")
3414 (description
3415 "RQ (Redis Queue) is a simple Python library for queueing jobs and
3416 processing them in the background with workers. It is backed by Redis and it
3417 is designed to have a low barrier to entry.")
3418 (license license:bsd-2)))
3419
3420 (define-public python2-rq
3421 (package-with-python2 python-rq))
3422
3423 (define-public python-cython
3424 (package
3425 (name "python-cython")
3426 (version "0.25.2")
3427 (source
3428 (origin
3429 (method url-fetch)
3430 (uri (pypi-uri "Cython" version))
3431 (patches (search-patches "python-cython-fix-tests-32bit.patch"))
3432 (sha256
3433 (base32
3434 "01h3lrf6d98j07iakifi81qjszh6faa37ibx7ylva1vsqbwx2hgi"))))
3435 (build-system python-build-system)
3436 ;; we need the full python package and not just the python-wrapper
3437 ;; because we need libpython3.3m.so
3438 (inputs
3439 `(("python" ,python)))
3440 (arguments
3441 `(#:phases
3442 (modify-phases %standard-phases
3443 (add-before 'check 'set-HOME
3444 ;; some tests require access to "$HOME/.cython"
3445 (lambda _ (setenv "HOME" "/tmp")))
3446 (replace 'check
3447 (lambda _ (zero? (system* "python" "runtests.py" "-vv")))))))
3448 (home-page "http://cython.org/")
3449 (synopsis "C extensions for Python")
3450 (description "Cython is an optimising static compiler for both the Python
3451 programming language and the extended Cython programming language. It makes
3452 writing C extensions for Python as easy as Python itself.")
3453 (license license:asl2.0)
3454 (properties `((python2-variant . ,(delay python2-cython))))))
3455
3456 (define-public python2-cython
3457 (package (inherit (package-with-python2
3458 (strip-python2-variant python-cython)))
3459 (name "python2-cython")
3460 (inputs
3461 `(("python-2" ,python-2))))) ; this is not automatically changed
3462
3463 ;; The RPython toolchain currently does not support Python 3.
3464 (define-public python2-rpython
3465 (package
3466 (name "python2-rpython")
3467 (version "0.1.4")
3468 (source
3469 (origin
3470 (method url-fetch)
3471 (uri (pypi-uri "rpython" version))
3472 (sha256
3473 (base32
3474 "07pps06fq4c4wmi5ii0sgh9zgwniz5y7frqhm28g3a154l163fxc"))))
3475 (build-system python-build-system)
3476 (arguments `(#:python ,python-2))
3477 (native-inputs
3478 `(("python2-pytest" ,python2-pytest))) ; needed for running tests
3479 (home-page "https://rpython.readthedocs.org")
3480 (synopsis "Framework for implementing interpreters and virtual machines")
3481 (description "RPython is a translation and support framework for
3482 producing implementations of dynamic languages, emphasizing a clean separation
3483 between language specification and implementation aspects.")
3484 (license license:expat)))
3485
3486 (define-public python-numpy
3487 (package
3488 (name "python-numpy")
3489 (version "1.12.0")
3490 (source
3491 (origin
3492 (method url-fetch)
3493 (uri (string-append
3494 "https://github.com/numpy/numpy/archive/v" version ".tar.gz"))
3495 (file-name (string-append name "-" version ".tar.gz"))
3496 (sha256
3497 (base32
3498 "025d4j4aakcp8w5i5diqh812cbbjgac7jszx1j56ivrbi1i8vv7d"))))
3499 (build-system python-build-system)
3500 (inputs
3501 `(("openblas" ,openblas)
3502 ("lapack" ,lapack)))
3503 (native-inputs
3504 `(("python-cython" ,python-cython)
3505 ("python-nose" ,python-nose)
3506 ("gfortran" ,gfortran)))
3507 (arguments
3508 `(#:phases
3509 (modify-phases %standard-phases
3510 (add-before 'build 'set-environment-variables
3511 (lambda* (#:key inputs #:allow-other-keys)
3512 (call-with-output-file "site.cfg"
3513 (lambda (port)
3514 (format port
3515 "[openblas]
3516 libraries = openblas
3517 library_dirs = ~a/lib
3518 include_dirs = ~a/include
3519
3520 # backslash-n to make emacs happy
3521 \n[lapack]
3522 lapack_libs = lapack
3523 library_dirs = ~a/lib
3524 include_dirs = ~a/include
3525 "
3526 (assoc-ref inputs "openblas")
3527 (assoc-ref inputs "openblas")
3528 (assoc-ref inputs "lapack")
3529 (assoc-ref inputs "lapack"))))
3530 ;; Use "gcc" executable, not "cc".
3531 (substitute* "numpy/distutils/system_info.py"
3532 (("c = distutils\\.ccompiler\\.new_compiler\\(\\)")
3533 "c = distutils.ccompiler.new_compiler(); c.set_executables(compiler='gcc',compiler_so='gcc',linker_exe='gcc',linker_so='gcc -shared')"))
3534 #t))
3535 ;; Tests can only be run after the library has been installed and not
3536 ;; within the source directory.
3537 (delete 'check)
3538 (add-after 'install 'check
3539 (lambda* (#:key outputs inputs #:allow-other-keys)
3540 ;; Make installed package available for running the tests
3541 (add-installed-pythonpath inputs outputs)
3542 (with-directory-excursion "/tmp"
3543 (zero? (system* "python" "-c"
3544 "import numpy; numpy.test(verbose=2)"))))))))
3545 (home-page "http://www.numpy.org/")
3546 (synopsis "Fundamental package for scientific computing with Python")
3547 (description "NumPy is the fundamental package for scientific computing
3548 with Python. It contains among other things: a powerful N-dimensional array
3549 object, sophisticated (broadcasting) functions, tools for integrating C/C++
3550 and Fortran code, useful linear algebra, Fourier transform, and random number
3551 capabilities.")
3552 (license license:bsd-3)))
3553
3554 (define-public python2-numpy
3555 (package-with-python2 python-numpy))
3556
3557 (define-public python-munch
3558 (package
3559 (name "python-munch")
3560 (version "2.0.4")
3561 (source
3562 (origin
3563 (method url-fetch)
3564 (uri (pypi-uri "munch" version))
3565 (sha256
3566 (base32
3567 "1cmqg91xnqx8gvnh4pmp0bfl1dfcm65d5p9mg73zz8pkjhx6h80l"))))
3568 (build-system python-build-system)
3569 (home-page "https://github.com/Infinidat/munch")
3570 (synopsis "Dot-accessible dictionary")
3571 (description "Munch is a dot-accessible dictionary similar to JavaScript
3572 objects.")
3573 (license license:expat)))
3574
3575 (define-public python2-munch
3576 (package-with-python2 python-munch))
3577
3578 (define-public python2-fastlmm
3579 (package
3580 (name "python2-fastlmm")
3581 (version "0.2.21")
3582 (source
3583 (origin
3584 (method url-fetch)
3585 (uri (pypi-uri "fastlmm" version ".zip"))
3586 (sha256
3587 (base32
3588 "1q8c34rpmwkfy3r4d5172pzdkpfryj561897z9r3x22gq7813x1m"))))
3589 (build-system python-build-system)
3590 (arguments
3591 `(#:python ,python-2)) ; only Python 2.7 is supported
3592 (propagated-inputs
3593 `(("python2-numpy" ,python2-numpy)
3594 ("python2-scipy" ,python2-scipy)
3595 ("python2-matplotlib" ,python2-matplotlib)
3596 ("python2-pandas" ,python2-pandas)
3597 ("python2-scikit-learn" ,python2-scikit-learn)
3598 ("python2-pysnptools" ,python2-pysnptools)))
3599 (native-inputs
3600 `(("unzip" ,unzip)
3601 ("python2-cython" ,python2-cython)
3602 ("python2-mock" ,python2-mock)
3603 ("python2-nose" ,python2-nose)))
3604 (home-page "http://research.microsoft.com/en-us/um/redmond/projects/mscompbio/fastlmm/")
3605 (synopsis "Perform genome-wide association studies on large data sets")
3606 (description
3607 "FaST-LMM, which stands for Factored Spectrally Transformed Linear Mixed
3608 Models, is a program for performing both single-SNP and SNP-set genome-wide
3609 association studies (GWAS) on extremely large data sets.")
3610 (license license:asl2.0)))
3611
3612 (define-public python-numpy-documentation
3613 (package
3614 (name "python-numpy-documentation")
3615 (version (package-version python-numpy))
3616 (source (package-source python-numpy))
3617 (build-system python-build-system)
3618 (native-inputs
3619 `(("python-matplotlib" ,python-matplotlib)
3620 ("python-numpy" ,python-numpy)
3621 ("pkg-config" ,pkg-config)
3622 ("python-sphinx" ,python-sphinx)
3623 ("python-numpydoc" ,python-numpydoc)
3624 ("texlive" ,texlive)
3625 ("texinfo" ,texinfo)
3626 ("perl" ,perl)
3627 ("scipy-sphinx-theme"
3628 ,(origin ; The build script expects scipy-sphinx-theme as a git submodule
3629 (method git-fetch)
3630 (uri (git-reference
3631 (url "https://github.com/scipy/scipy-sphinx-theme.git")
3632 (commit "c466764e2231ba132c09826b5b138fffa1cfcec3")))
3633 (sha256
3634 (base32
3635 "0q2y87clwlsgc7wvlsn9pzyssybcq10plwhq2w1ydykfsyyqbmkl"))))
3636 ,@(package-native-inputs python-numpy)))
3637 (arguments
3638 `(#:tests? #f ; we're only generating the documentation
3639 #:phases
3640 (modify-phases %standard-phases
3641 (delete 'build)
3642 (replace 'install
3643 (lambda* (#:key inputs outputs #:allow-other-keys)
3644 (let* ((data (string-append (assoc-ref outputs "out") "/share"))
3645 (doc (string-append
3646 data "/doc/" ,name "-"
3647 ,(package-version python-numpy)))
3648 (info-reader (string-append data "/info"))
3649 (html (string-append doc "/html"))
3650 (scipy-sphinx-theme "scipy-sphinx-theme")
3651 (sphinx-theme-checkout (assoc-ref inputs scipy-sphinx-theme))
3652 (pyver ,(string-append "PYVER=")))
3653 (with-directory-excursion "doc"
3654 (copy-recursively sphinx-theme-checkout scipy-sphinx-theme)
3655 (mkdir-p html)
3656 (system* "make" "html" pyver)
3657 (system* "make" "latex" "PAPER=a4" pyver)
3658 (system* "make" "-C" "build/latex"
3659 "all-pdf" "PAPER=a4" pyver)
3660 ;; FIXME: Generation of the info file fails.
3661 ;; (system* "make" "info" pyver)
3662 ;; (mkdir-p info)
3663 ;; (copy-file "build/texinfo/numpy.info"
3664 ;; (string-append info "/numpy.info"))
3665 (for-each (lambda (file)
3666 (copy-file (string-append "build/latex" file)
3667 (string-append doc file)))
3668 '("/numpy-ref.pdf" "/numpy-user.pdf"))
3669 (with-directory-excursion "build/html"
3670 (for-each (lambda (file)
3671 (let* ((dir (dirname file))
3672 (tgt-dir (string-append html "/" dir)))
3673 (unless (equal? "." dir)
3674 (mkdir-p tgt-dir))
3675 (install-file file html)))
3676 (find-files "." ".*")))))
3677 #t)))))
3678 (home-page (package-home-page python-numpy))
3679 (synopsis "Documentation for the python-numpy package")
3680 (description (package-description python-numpy))
3681 (license (package-license python-numpy))))
3682
3683 (define-public python2-numpy-documentation
3684 (let ((numpy-documentation (package-with-python2 python-numpy-documentation)))
3685 (package
3686 (inherit numpy-documentation)
3687 (native-inputs `(("python2-functools32" ,python2-functools32)
3688 ,@(package-native-inputs numpy-documentation))))))
3689
3690 (define-public python-pygit2
3691 (package
3692 (name "python-pygit2")
3693 (version "0.25.0")
3694 (source
3695 (origin
3696 (method url-fetch)
3697 (uri (pypi-uri "pygit2" version))
3698 (sha256
3699 (base32
3700 "0wf5rp0fvrw7j3j18dvwjq6xqlbm611wd55aphrfpps0v1gxh3ny"))
3701 (patches
3702 (search-patches "python-pygit2-disable-network-tests.patch"))))
3703 (build-system python-build-system)
3704 (propagated-inputs
3705 `(("python-six" ,python-six)
3706 ("python-cffi" ,python-cffi)
3707 ("libgit2" ,libgit2)
3708 ("python-tox" ,python-tox)))
3709 (home-page "https://github.com/libgit2/pygit2")
3710 (synopsis "Python bindings for libgit2")
3711 (description "Pygit2 is a set of Python bindings to the libgit2 shared
3712 library, libgit2 implements Git plumbing.")
3713 ;; GPL2.0 only, with linking exception.
3714 (license license:gpl2)))
3715
3716 (define-public python2-pygit2
3717 (package-with-python2 python-pygit2))
3718
3719 (define-public python-pyparsing
3720 (package
3721 (name "python-pyparsing")
3722 (version "2.0.3")
3723 (source
3724 (origin
3725 (method url-fetch)
3726 (uri (string-append "mirror://sourceforge/pyparsing/pyparsing"
3727 "/pyparsing-" version
3728 "/pyparsing-" version ".tar.gz"))
3729 (sha256
3730 (base32
3731 "0kw4py7gn45j93q8r7bzajfrjdc3xlsn2yzln41lf9zmrghjkrq6"))))
3732 (build-system python-build-system)
3733 (outputs '("out" "doc"))
3734 (arguments
3735 `(#:tests? #f ; no test target
3736 #:modules ((guix build python-build-system)
3737 (guix build utils))
3738 #:phases
3739 (alist-cons-after
3740 'install 'install-doc
3741 (lambda* (#:key outputs #:allow-other-keys)
3742 (let* ((doc (string-append (assoc-ref outputs "doc")
3743 "/share/doc/" ,name "-" ,version))
3744 (html-doc (string-append doc "/html"))
3745 (examples (string-append doc "/examples")))
3746 (mkdir-p html-doc)
3747 (mkdir-p examples)
3748 (for-each
3749 (lambda (dir tgt)
3750 (map (lambda (file)
3751 (install-file file tgt))
3752 (find-files dir ".*")))
3753 (list "docs" "htmldoc" "examples")
3754 (list doc html-doc examples))))
3755 %standard-phases)))
3756 (home-page "http://pyparsing.wikispaces.com")
3757 (synopsis "Python parsing class library")
3758 (description
3759 "The pyparsing module is an alternative approach to creating and
3760 executing simple grammars, vs. the traditional lex/yacc approach, or the use
3761 of regular expressions. The pyparsing module provides a library of classes
3762 that client code uses to construct the grammar directly in Python code.")
3763 (license license:expat)))
3764
3765 (define-public python2-pyparsing
3766 (package-with-python2 python-pyparsing))
3767
3768 (define-public python-numpydoc
3769 (package
3770 (name "python-numpydoc")
3771 (version "0.5")
3772 (source
3773 (origin
3774 (method url-fetch)
3775 (uri (string-append
3776 "https://pypi.python.org/packages/source/n/numpydoc/numpydoc-"
3777 version ".tar.gz"))
3778 (sha256
3779 (base32
3780 "0d4dnifaxkll50jx6czj05y8cb4ny60njd2wz299sj2jxfy51w4k"))
3781 (modules '((guix build utils)))
3782 (snippet
3783 '(begin
3784 ;; Drop a test requiring matplotlib, which we cannot add as an
3785 ;; input since it would create a circular dependency: Extend the
3786 ;; test for Python 3, where it is already dropped, to Python 2.
3787 (substitute* "numpydoc/tests/test_plot_directive.py"
3788 (("3") "2"))))))
3789 (build-system python-build-system)
3790 (propagated-inputs
3791 `(("python-sphinx" ,python-sphinx)))
3792 (native-inputs
3793 `(("python-nose" ,python-nose)))
3794 (home-page "https://pypi.python.org/pypi/numpydoc")
3795 (synopsis
3796 "Numpy's Sphinx extensions")
3797 (description
3798 "Sphinx extension to support docstrings in Numpy format.")
3799 (license license:bsd-2)))
3800
3801 (define-public python2-numpydoc
3802 (package-with-python2 python-numpydoc))
3803
3804 (define-public python-numexpr
3805 (package
3806 (name "python-numexpr")
3807 (version "2.6.1")
3808 (source
3809 (origin
3810 (method url-fetch)
3811 (uri (pypi-uri "numexpr" version))
3812 (sha256
3813 (base32
3814 "01lsja72m32z0i5p8rwxbfyzk4mplh72k2a140nwh8vv4wpyfbnv"))))
3815 (build-system python-build-system)
3816 (arguments `(#:tests? #f)) ; no tests included
3817 (propagated-inputs
3818 `(("python-numpy" ,python-numpy)))
3819 (home-page "https://github.com/pydata/numexpr")
3820 (synopsis "Fast numerical expression evaluator for NumPy")
3821 (description
3822 "Numexpr is a fast numerical expression evaluator for NumPy. With it,
3823 expressions that operate on arrays are accelerated and use less memory than
3824 doing the same calculation in Python. In addition, its multi-threaded
3825 capabilities can make use of all your cores, which may accelerate
3826 computations, most specially if they are not memory-bounded (e.g. those using
3827 transcendental functions).")
3828 (license license:expat)))
3829
3830 (define-public python2-numexpr
3831 (package-with-python2 python-numexpr))
3832
3833 (define-public python-cycler
3834 (package
3835 (name "python-cycler")
3836 (version "0.10.0")
3837 (source (origin
3838 (method url-fetch)
3839 (uri (pypi-uri "cycler" version))
3840 (sha256
3841 (base32
3842 "1n69n23fak1gjxlrbhqisi2b9pv3ckrfj98llx3p53953082syyd"))))
3843 (build-system python-build-system)
3844 (arguments
3845 ;; XXX: The current version requires 'coveralls' which we don't have.
3846 ;; Enable this for the next release which uses 'python-pytest'.
3847 '(#:tests? #f))
3848 (propagated-inputs
3849 `(("python-six" ,python-six)))
3850 (home-page "http://matplotlib.org/cycler/")
3851 (synopsis "Composable keyword argument iterator")
3852 (description
3853 "When using @code{matplotlib} and plotting more than one line, it is
3854 common to want to be able to want to be able to cycle over one or more artist
3855 styles; but the plotting logic can quickly become involved.
3856 To address this and enable easy cycling over arbitrary @code{kwargs}, the
3857 @code{Cycler} class was developed.")
3858 (license license:bsd-3)))
3859
3860 (define-public python2-cycler
3861 (package-with-python2 python-cycler))
3862
3863 (define-public python-colorspacious
3864 (package
3865 (name "python-colorspacious")
3866 (version "1.1.0")
3867 (source
3868 (origin
3869 (method url-fetch)
3870 (uri (string-append "https://github.com/njsmith/colorspacious/archive/v"
3871 version ".tar.gz"))
3872 (file-name (string-append name "-" version))
3873 (sha256
3874 (base32 "1vflh5jm32qb0skza2i8pjacv09w6gq84fqpp2nj77s0rbmzgr4k"))))
3875 (build-system python-build-system)
3876 (propagated-inputs
3877 `(("python-numpy" ,python-numpy)))
3878 (native-inputs
3879 `(("python-nose" ,python-nose)))
3880 (arguments
3881 `(#:phases
3882 (modify-phases %standard-phases
3883 (replace 'check
3884 (lambda _
3885 (zero? (system* "nosetests" "--all-modules" "-v" "colorspacious")))))))
3886 (home-page "https://github.com/njsmith/colorspacious")
3887 (synopsis "Python library for colorspace conversions")
3888 (description "@code{colorspacious} is a Python library that lets you
3889 convert between colorspaces like sRGB, XYZ, CIEL*a*b*, CIECAM02, CAM02-UCS, etc.")
3890 (license license:expat)))
3891
3892 (define-public python2-colorspacious
3893 (package-with-python2 python-colorspacious))
3894
3895 (define-public python-matplotlib
3896 (package
3897 (name "python-matplotlib")
3898 (version "2.0.0")
3899 (source
3900 (origin
3901 (method url-fetch)
3902 (uri (string-append
3903 "https://github.com/matplotlib/matplotlib/archive/v" version ".tar.gz"))
3904 (file-name (string-append name "-" version ".tar.gz"))
3905 (sha256
3906 (base32
3907 "0w3k5m5qb3wsd7yhvmg042xddvligklvcq2visk2c5wnph3hhsln"))))
3908 (build-system python-build-system)
3909 (propagated-inputs ; the following packages are all needed at run time
3910 `(("python-cycler" ,python-cycler)
3911 ("python-pyparsing" ,python-pyparsing)
3912 ("python-pygobject" ,python-pygobject)
3913 ("gobject-introspection" ,gobject-introspection)
3914 ("python-tkinter" ,python "tk")
3915 ("python-dateutil" ,python-dateutil)
3916 ("python-numpy" ,python-numpy)
3917 ("python-pillow" ,python-pillow)
3918 ("python-pytz" ,python-pytz)
3919 ("python-six" ,python-six)
3920 ;; The 'gtk+' package (and 'gdk-pixbuf', 'atk' and 'pango' propagated
3921 ;; from 'gtk+') provides the required 'typelib' files used by
3922 ;; 'gobject-introspection'. The location of these files is set with the
3923 ;; help of the environment variable GI_TYPELIB_PATH. At build time this
3924 ;; is done automatically by a 'native-search-path' procedure. However,
3925 ;; at run-time the user must set this variable as follows:
3926 ;;
3927 ;; export GI_TYPELIB_PATH=~/.guix-profile/lib/girepository-1.0
3928 ("gtk+" ,gtk+)
3929 ;; From version 1.4.0 'matplotlib' makes use of 'cairocffi' instead of
3930 ;; 'pycairo'. However, 'pygobject' makes use of a 'pycairo' 'context'
3931 ;; object. For this reason we need to import both libraries.
3932 ;; https://pythonhosted.org/cairocffi/cffi_api.html#converting-pycairo
3933 ("python-pycairo" ,python-pycairo)
3934 ("python-cairocffi" ,python-cairocffi)))
3935 (inputs
3936 `(("libpng" ,libpng)
3937 ("imagemagick" ,imagemagick)
3938 ("freetype" ,freetype)
3939 ("cairo" ,cairo)
3940 ("glib" ,glib)
3941 ;; FIXME: Add backends when available.
3942 ;("python-wxpython" ,python-wxpython)
3943 ("python-pyqt" ,python-pyqt)
3944 ("tcl" ,tcl)
3945 ("tk" ,tk)))
3946 (native-inputs
3947 `(("pkg-config" ,pkg-config)
3948 ("python-nose" ,python-nose)
3949 ("python-mock" ,python-mock)))
3950 (arguments
3951 `(#:phases
3952 (modify-phases %standard-phases
3953 (add-before 'build 'configure-environment
3954 (lambda* (#:key outputs inputs #:allow-other-keys)
3955 (let ((cairo (assoc-ref inputs "cairo"))
3956 (gtk+ (assoc-ref inputs "gtk+")))
3957 ;; Setting these directories in the 'basedirlist' of 'setup.cfg'
3958 ;; has not effect.
3959 (setenv "LD_LIBRARY_PATH"
3960 (string-append cairo "/lib:" gtk+ "/lib"))
3961 (setenv "HOME" (getcwd))
3962 (call-with-output-file "setup.cfg"
3963 (lambda (port)
3964 (format port "[directories]~%
3965 basedirlist = ~a,~a~%
3966 [rc_options]~%
3967 backend = TkAgg~%"
3968 (assoc-ref inputs "tcl")
3969 (assoc-ref inputs "tk")))))
3970 #t)))))
3971 (home-page "http://matplotlib.org")
3972 (synopsis "2D plotting library for Python")
3973 (description
3974 "Matplotlib is a Python 2D plotting library which produces publication
3975 quality figures in a variety of hardcopy formats and interactive environments
3976 across platforms. Matplotlib can be used in Python scripts, the python and
3977 ipython shell, web application servers, and six graphical user interface
3978 toolkits.")
3979 (license license:psfl)
3980 (properties `((python2-variant . ,(delay python2-matplotlib))))))
3981
3982 (define-public python2-matplotlib
3983 (let ((matplotlib (package-with-python2
3984 (strip-python2-variant python-matplotlib))))
3985 (package (inherit matplotlib)
3986 ;; Make sure to use special packages for Python 2 instead
3987 ;; of those automatically rewritten by package-with-python2.
3988 (propagated-inputs
3989 `(("python2-pycairo" ,python2-pycairo)
3990 ("python2-functools32" ,python2-functools32)
3991 ("python2-pygobject-2" ,python2-pygobject-2)
3992 ("python2-subprocess32" ,python2-subprocess32)
3993 ("python2-tkinter" ,python-2 "tk")
3994 ,@(fold alist-delete (package-propagated-inputs matplotlib)
3995 '("python-pycairo" "python-pygobject" "python-tkinter")))))))
3996
3997 (define-public python-matplotlib-documentation
3998 (package
3999 (name "python-matplotlib-documentation")
4000 (version (package-version python-matplotlib))
4001 (source (package-source python-matplotlib))
4002 (build-system python-build-system)
4003 (native-inputs
4004 `(("python-matplotlib" ,python-matplotlib)
4005 ("python-colorspacious" ,python-colorspacious)
4006 ("python-sphinx" ,python-sphinx)
4007 ("python-numpydoc" ,python-numpydoc)
4008 ("python-ipython" ,python-ipython)
4009 ("python-mock" ,python-mock)
4010 ("graphviz" ,graphviz)
4011 ("texlive" ,texlive)
4012 ("texinfo" ,texinfo)
4013 ,@(package-native-inputs python-matplotlib)))
4014 (arguments
4015 `(#:tests? #f ; we're only generating documentation
4016 #:phases
4017 (modify-phases %standard-phases
4018 (replace 'build
4019 (lambda _
4020 (chdir "doc")
4021 ;; Produce pdf in 'A4' format.
4022 (substitute* "conf.py"
4023 (("latex_paper_size = 'letter'") "")
4024 ;; latex_paper_size is deprecated -> set paper size using
4025 ;; latex_elements
4026 (("latex_elements\\['pointsize'\\] = '11pt'" match)
4027 ;; insert at a point where latex_elements{} is defined:
4028 (string-append match "\nlatex_elements['papersize'] = 'a4paper'")))
4029 (zero? (system* "python" "make.py" "html" "latex" "texinfo"))))
4030 (replace 'install
4031 (lambda* (#:key inputs outputs #:allow-other-keys)
4032 (let* ((data (string-append (assoc-ref outputs "out") "/share"))
4033 (doc (string-append data "/doc/python-matplotlib-" ,version))
4034 (info (string-append data "/info"))
4035 (html (string-append doc "/html")))
4036 (mkdir-p html)
4037 (mkdir-p info)
4038 (copy-recursively "build/html" html)
4039 (symlink (string-append html "/_images")
4040 (string-append info "/matplotlib-figures"))
4041 (with-directory-excursion "build/texinfo"
4042 (substitute* "matplotlib.texi"
4043 (("@image\\{([^,]*)" all file)
4044 (string-append "@image{matplotlib-figures/" file)))
4045 (symlink (string-append html "/_images")
4046 "./matplotlib-figures")
4047 (system* "makeinfo" "--no-split"
4048 "-o" "matplotlib.info" "matplotlib.texi"))
4049 (copy-file "build/texinfo/matplotlib.info"
4050 (string-append info "/matplotlib.info"))
4051 (copy-file "build/latex/Matplotlib.pdf"
4052 (string-append doc "/Matplotlib.pdf")))
4053 #t)))))
4054 (home-page (package-home-page python-matplotlib))
4055 (synopsis "Documentation for the python-matplotlib package")
4056 (description (package-description python-matplotlib))
4057 (license (package-license python-matplotlib))))
4058
4059 (define-public python2-matplotlib-documentation
4060 (package-with-python2 python-matplotlib-documentation))
4061
4062 (define-public python2-pysnptools
4063 (package
4064 (name "python2-pysnptools")
4065 (version "0.3.9")
4066 (source
4067 (origin
4068 (method url-fetch)
4069 (uri (pypi-uri "pysnptools" version ".zip"))
4070 (sha256
4071 (base32
4072 "1wybggjzz8zw7aav4pjsg2h22xp17a1lghrprza1pxwlm7wf96y2"))))
4073 (build-system python-build-system)
4074 (arguments
4075 `(#:python ,python-2)) ; only Python 2.7 is supported
4076 (propagated-inputs
4077 `(("python2-numpy" ,python2-numpy)
4078 ("python2-scipy" ,python2-scipy)
4079 ("python2-pandas" ,python2-pandas)))
4080 (native-inputs
4081 `(("python2-cython" ,python2-cython)))
4082 (native-inputs
4083 `(("unzip" ,unzip)))
4084 (home-page "http://research.microsoft.com/en-us/um/redmond/projects/mscompbio/")
4085 (synopsis "Library for reading and manipulating genetic data")
4086 (description
4087 "PySnpTools is a library for reading and manipulating genetic data. It
4088 can, for example, efficiently read whole PLINK *.bed/bim/fam files or parts of
4089 those files. It can also efficiently manipulate ranges of integers using set
4090 operators such as union, intersection, and difference.")
4091 (license license:asl2.0)))
4092
4093 (define-public python-rpy2
4094 (package
4095 (name "python-rpy2")
4096 (version "2.7.6")
4097 (source
4098 (origin
4099 (method url-fetch)
4100 (uri (pypi-uri "rpy2" version))
4101 (sha256
4102 (base32
4103 "0nhan2qvrw7b7gg5zddwa22kybdv3x1g26vkd7q8lvnkgzrs4dga"))))
4104 (build-system python-build-system)
4105 (arguments
4106 '(#:phases
4107 (modify-phases %standard-phases
4108 (delete 'check)
4109 (add-after 'install 'check
4110 (lambda* (#:key outputs inputs #:allow-other-keys)
4111 ;; It's easier to run tests after install.
4112 ;; Make installed package available for running the tests
4113 (add-installed-pythonpath inputs outputs)
4114 (zero? (system* "python" "-m" "rpy2.tests" "-v")))))))
4115 (propagated-inputs
4116 `(("python-six" ,python-six)))
4117 (inputs
4118 `(("readline" ,readline)
4119 ("icu4c" ,icu4c)
4120 ("pcre" ,pcre)
4121 ("r-minimal" ,r-minimal)
4122 ("r-survival" ,r-survival)))
4123 (native-inputs
4124 `(("zlib" ,zlib)))
4125 (home-page "http://rpy.sourceforge.net/")
4126 (synopsis "Python interface to the R language")
4127 (description "rpy2 is a redesign and rewrite of rpy. It is providing a
4128 low-level interface to R from Python, a proposed high-level interface,
4129 including wrappers to graphical libraries, as well as R-like structures and
4130 functions.")
4131 (license license:gpl3+)))
4132
4133 (define-public python2-rpy2
4134 (let ((rpy2 (package-with-python2 python-rpy2)))
4135 (package (inherit rpy2)
4136 (propagated-inputs
4137 `(("python2-singledispatch" ,python2-singledispatch)
4138 ,@(package-propagated-inputs rpy2))))))
4139
4140 (define-public python-scipy
4141 (package
4142 (name "python-scipy")
4143 (version "0.18.1")
4144 (source
4145 (origin
4146 (method url-fetch)
4147 (uri (string-append "https://github.com/scipy/scipy/archive/v"
4148 version ".tar.gz"))
4149 (file-name (string-append name "-" version ".tar.gz"))
4150 (sha256
4151 (base32
4152 "17slsrfawjp7if6qrlx03zhgp05350ginxx8ddpw9zqx43x905sn"))))
4153 (build-system python-build-system)
4154 (propagated-inputs
4155 `(("python-numpy" ,python-numpy)
4156 ("python-matplotlib" ,python-matplotlib)
4157 ("python-pyparsing" ,python-pyparsing)))
4158 (inputs
4159 `(("lapack" ,lapack)
4160 ("openblas" ,openblas)))
4161 (native-inputs
4162 `(("python-cython" ,python-cython)
4163 ("python-nose" ,python-nose)
4164 ("python-sphinx" ,python-sphinx)
4165 ("python-numpydoc" ,python-numpydoc)
4166 ("gfortran" ,gfortran)
4167 ("perl" ,perl)))
4168 (outputs '("out" "doc"))
4169 (arguments
4170 `(#:phases
4171 (modify-phases %standard-phases
4172 (add-before 'build 'configure-openblas
4173 (lambda* (#:key inputs #:allow-other-keys)
4174 (call-with-output-file "site.cfg"
4175 (lambda (port)
4176 (format port
4177 "[blas]
4178 libraries = openblas
4179 library_dirs = ~a/lib
4180 include_dirs = ~a/include
4181
4182 # backslash-n to make emacs happy
4183 \n[atlas]
4184 library_dirs = ~a/lib
4185 atlas_libs = openblas
4186 "
4187 (assoc-ref inputs "openblas")
4188 (assoc-ref inputs "openblas")
4189 (assoc-ref inputs "openblas"))))
4190 #t))
4191 (add-after 'install 'install-doc
4192 (lambda* (#:key inputs outputs #:allow-other-keys)
4193 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4194 (doc (string-append data "/doc/" ,name "-" ,version))
4195 (html (string-append doc "/html"))
4196 (pyver ,(string-append "PYVER=")))
4197 ;; Make installed package available for building the
4198 ;; documentation
4199 (add-installed-pythonpath inputs outputs)
4200 (with-directory-excursion "doc"
4201 ;; Fix generation of images for mathematical expressions.
4202 (substitute* (find-files "source" "conf\\.py")
4203 (("pngmath_use_preview = True")
4204 "pngmath_use_preview = False"))
4205 (mkdir-p html)
4206 (system* "make" "html" pyver)
4207 (with-directory-excursion "build/html"
4208 (for-each (lambda (file)
4209 (let* ((dir (dirname file))
4210 (tgt-dir (string-append html "/" dir)))
4211 (install-file file html)))
4212 (find-files "." ".*")))))
4213 #t))
4214 (add-after 'unpack 'fix-tests
4215 (lambda _
4216 (substitute* "scipy/integrate/tests/test_quadpack.py"
4217 (("libm.so") "libm.so.6"))
4218 #t))
4219 ;; Tests can only be run after the library has been installed and not
4220 ;; within the source directory.
4221 (delete 'check)
4222 (add-after 'install 'check
4223 (lambda* (#:key inputs outputs #:allow-other-keys)
4224 (add-installed-pythonpath inputs outputs)
4225 (with-directory-excursion "/tmp"
4226 (zero? (system* "python" "-c"
4227 "import scipy; scipy.test('full')")))
4228 #t)))))
4229 (home-page "http://www.scipy.org/")
4230 (synopsis "The Scipy library provides efficient numerical routines")
4231 (description "The SciPy library is one of the core packages that make up
4232 the SciPy stack. It provides many user-friendly and efficient numerical
4233 routines such as routines for numerical integration and optimization.")
4234 (properties `((python2-variant . ,(delay python2-scipy))))
4235 (license license:bsd-3)))
4236
4237 (define-public python2-scipy
4238 (package-with-python2
4239 (strip-python2-variant python-scipy)))
4240
4241 (define-public python-sockjs-tornado
4242 (package
4243 (name "python-sockjs-tornado")
4244 (version "1.0.3")
4245 (source
4246 (origin
4247 (method url-fetch)
4248 (uri (pypi-uri "sockjs-tornado" version))
4249 (sha256
4250 (base32
4251 "16cff40nniqsyvda1pb2j3b4zwmrw7y2g1vqq78lp20xpmhnwwkd"))))
4252 (build-system python-build-system)
4253 (arguments
4254 `(;; There are no tests, and running the test phase requires missing
4255 ;; dependencies
4256 #:tests? #f))
4257 (propagated-inputs
4258 `(("python-tornado" ,python-tornado)))
4259 (home-page "http://github.com/mrjoes/sockjs-tornado/")
4260 (synopsis
4261 "SockJS python server implementation on top of Tornado framework")
4262 (description
4263 "SockJS-tornado provides the server side counterpart to a SockJS client
4264 library, through the Tornado framework.
4265
4266 SockJS provides a low latency, full duplex, cross-domain communication channel
4267 between a web browser and web server.")
4268 (license license:expat)))
4269
4270 (define-public python2-sockjs-tornado
4271 (package-with-python2 python-sockjs-tornado))
4272
4273 (define-public python-socksipy-branch
4274 (package
4275 (name "python-socksipy-branch")
4276 (version "1.01")
4277 (source
4278 (origin
4279 (method url-fetch)
4280 (uri (pypi-uri "SocksiPy-branch" version))
4281 (sha256
4282 (base32
4283 "01l41v4g7fy9fzvinmjxy6zcbhgqaif8dhdqm4w90fwcw9h51a8p"))))
4284 (build-system python-build-system)
4285 (arguments
4286 `(#:tests? #f)) ; There are no tests
4287 (home-page "https://code.google.com/archive/p/socksipy-branch/")
4288 (synopsis "Python SOCKS module")
4289 (description
4290 "SocksiPy - A Python SOCKS client module. It provides a
4291 socket-like interface that supports connections to any TCP
4292 service through the use of a SOCKS4, SOCKS5 or HTTP proxy.
4293 The original version was developed by Dan Haim, this is a
4294 branch created by Mario Vilas to address some open issues,
4295 as the original project seems to have been abandoned circa 2007.")
4296 (license license:bsd-3)))
4297
4298 (define-public python2-socksipy-branch
4299 (package-with-python2 python-socksipy-branch))
4300
4301 (define-public python-sqlalchemy
4302 (package
4303 (name "python-sqlalchemy")
4304 (version "1.0.12")
4305 (source
4306 (origin
4307 (method url-fetch)
4308 (uri (string-append "https://pypi.python.org/packages/source/S/"
4309 "SQLAlchemy/SQLAlchemy-" version ".tar.gz"))
4310 (sha256
4311 (base32
4312 "1l8qclhd0s90w3pvwhi5mjxdwr5j7gw7cjka2fx6f2vqmq7f4yb6"))))
4313 (build-system python-build-system)
4314 (native-inputs
4315 `(("python-cython" ,python-cython) ;for c extensions
4316 ("python-pytest" ,python-pytest)
4317 ("python-mock" ,python-mock))) ;for tests
4318 (arguments
4319 `(#:phases (alist-replace
4320 'check
4321 (lambda _ (zero? (system* "py.test")))
4322 %standard-phases)))
4323 (home-page "http://www.sqlalchemy.org")
4324 (synopsis "Database abstraction library")
4325 (description
4326 "SQLAlchemy is the Python SQL toolkit and Object Relational Mapper that
4327 gives application developers the full power and flexibility of SQL. It
4328 provides a full suite of well known enterprise-level persistence patterns,
4329 designed for efficient and high-performing database access, adapted into a
4330 simple and Pythonic domain language.")
4331 (license license:x11)))
4332
4333 (define-public python2-sqlalchemy
4334 (package-with-python2 python-sqlalchemy))
4335
4336 (define-public python-pycodestyle
4337 (package
4338 (name "python-pycodestyle")
4339 (version "2.0.0")
4340 (source
4341 (origin
4342 (method url-fetch)
4343 (uri (pypi-uri "pycodestyle" version))
4344 (sha256
4345 (base32
4346 "1rz2v8506mdjdyxcnv9ygiw6v0d4dqx8z5sjyjm0w2v32h5l5w1p"))))
4347 (build-system python-build-system)
4348 (home-page "https://pycodestyle.readthedocs.io/")
4349 (synopsis "Python style guide checker")
4350 (description "@code{pycodestyle} (formerly pep8) is a tool to check
4351 Python code against some of the style conventions in
4352 @url{http://www.python.org/dev/peps/pep-0008/,PEP 8}.")
4353 (license license:expat)))
4354
4355 (define-public python2-pycodestyle
4356 (package-with-python2 python-pycodestyle))
4357
4358 (define-public python-orderedmultidict
4359 (package
4360 (name "python-orderedmultidict")
4361 (version "0.7.11")
4362 (source
4363 (origin
4364 (method url-fetch)
4365 (uri (pypi-uri "orderedmultidict" version))
4366 (sha256
4367 (base32
4368 "0dls862ibm7qbq4fnvwx0xn1v9hwyzywbff8xjjdr42dd75208yw"))))
4369 (build-system python-build-system)
4370 (arguments
4371 `(#:phases
4372 (modify-phases %standard-phases
4373 (add-after 'unpack 'fix-tests
4374 (lambda _
4375 ;; The package uses nosetest for running the tests.
4376 ;; Adding this initfile allows to run the test suite
4377 ;; without requiring nosetest.
4378 (zero? (system* "touch" "tests/__init__.py")))))))
4379 (propagated-inputs
4380 `(("python-six" ,python-six)))
4381 (native-inputs
4382 `(("python-pycodestyle" ,python-pycodestyle)))
4383 (home-page "https://github.com/gruns/orderedmultidict")
4384 (synopsis "Python Ordered Multivalue Dictionary - omdict")
4385 (description "This package contains a library for ordered multivalue
4386 dictionaries. A multivalue dictionary is a dictionary that can store
4387 multiple values for the same key. An ordered multivalue dictionary is a
4388 multivalue dictionary that retains the order of insertions and deletions.")
4389 (license license:unlicense)))
4390
4391 (define-public python2-orderedmultidict
4392 (package-with-python2 python-orderedmultidict))
4393
4394 (define-public python-furl
4395 (package
4396 (name "python-furl")
4397 (version "0.5.6")
4398 (source
4399 (origin
4400 (method url-fetch)
4401 (uri (pypi-uri "furl" version))
4402 (sha256
4403 (base32
4404 "0lzpfpm686hvz3sr1mcrnd1b3lgmnw8v59gb43wfi98r3b671pqc"))))
4405 (build-system python-build-system)
4406 (propagated-inputs
4407 `(("python-six" ,python-six)
4408 ("python-orderedmultidict" ,python-orderedmultidict)))
4409 (native-inputs
4410 `(("python-pycodestyle" ,python-pycodestyle)))
4411 (home-page "https://github.com/gruns/furl")
4412 (synopsis "URL manipulation in Python")
4413 (description "Furl provides an easy-to-use alternative to the
4414 @code{urllib} and @code{urlparse} modules for manipulating URLs.")
4415 (license license:unlicense)))
4416
4417 (define-public python2-furl
4418 (package-with-python2 python-furl))
4419
4420 (define-public python-flask-babel
4421 (package
4422 (name "python-flask-babel")
4423 (version "0.11.1")
4424 (source
4425 (origin
4426 (method url-fetch)
4427 (uri (pypi-uri "Flask-Babel" version))
4428 (sha256
4429 (base32
4430 "16b80cipdba9xj3jlaiaq6wgrgpjb70w3j01jjy9hbp4k71kd6yj"))))
4431 (build-system python-build-system)
4432 (propagated-inputs
4433 `(("python-flask" ,python-flask)
4434 ("python-babel" ,python-babel)
4435 ("python-jinja2" ,python-jinja2)
4436 ("python-pytz" ,python-pytz)))
4437 (home-page "https://github.com/python-babel/flask-babel")
4438 (synopsis "Add i18n/l10n support to Flask applications")
4439 (description "This package implements internationalization and localization
4440 support for Flask. This is based on the Python babel module as well as pytz -
4441 both of which are installed automatically if you install this library.")
4442 (license license:bsd-3)))
4443
4444 (define-public python2-flask-babel
4445 (package-with-python2 python-flask-babel))
4446
4447 (define-public python-sqlalchemy-utils
4448 (package
4449 (name "python-sqlalchemy-utils")
4450 (version "0.32.13")
4451 (source
4452 (origin
4453 (method url-fetch)
4454 (uri (pypi-uri "SQLAlchemy-Utils" version))
4455 (sha256
4456 (base32
4457 "0vsib7gidjamzsz6w4s5pdhxzxsrkghjnm4sqwk94igjrl3i5ixj"))))
4458 (build-system python-build-system)
4459 (arguments
4460 '(#:tests? #f)) ; FIXME: Many tests require a running database server.
4461 ;; #:phases
4462 ;; (modify-phases %standard-phases
4463 ;; (replace 'check
4464 ;; (lambda _
4465 ;; (zero? (system* "py.test" "sqlalchemy_utils" "tests")))))
4466 (propagated-inputs
4467 `(("python-six" ,python-six)
4468 ("python-sqlalchemy" ,python-sqlalchemy)))
4469 (native-inputs
4470 `(("python-dateutil" ,python-dateutil)
4471 ("python-flexmock" ,python-flexmock)
4472 ("python-psycopg2" ,python-psycopg2)
4473 ("python-pytest" ,python-pytest)
4474 ("python-pytz" ,python-pytz)))
4475 (home-page "https://github.com/kvesteri/sqlalchemy-utils")
4476 (synopsis "Various utility functions for SQLAlchemy")
4477 (description
4478 "SQLAlchemy-utils provides various utility functions and custom data types
4479 for SQLAlchemy. SQLAlchemy is an SQL database abstraction library for Python.
4480
4481 You might also want to install the following optional dependencies:
4482 @enumerate
4483 @item @code{python-passlib}
4484 @item @code{python-babel}
4485 @item @code{python-cryptography}
4486 @item @code{python-pytz}
4487 @item @code{python-psycopg2}
4488 @item @code{python-furl}
4489 @item @code{python-flask-babel}
4490 @end enumerate
4491 ")
4492 (license license:bsd-3)))
4493
4494 (define-public python2-sqlalchemy-utils
4495 (package-with-python2 python-sqlalchemy-utils))
4496
4497 (define-public python-alembic
4498 (package
4499 (name "python-alembic")
4500 (version "0.8.10")
4501 (source
4502 (origin
4503 (method url-fetch)
4504 (uri (pypi-uri "alembic" version))
4505 (sha256
4506 (base32
4507 "06br9sfqypnjlal6fsbnky3zb0askwcn3diz8k3kwa0qcblm0fqf"))))
4508 (build-system python-build-system)
4509 (native-inputs
4510 `(("python-mock" ,python-mock)
4511 ("python-pytest-cov" ,python-pytest-cov)))
4512 (propagated-inputs
4513 `(("python-sqlalchemy" ,python-sqlalchemy)
4514 ("python-mako" ,python-mako)
4515 ("python-editor" ,python-editor)))
4516 (home-page "http://bitbucket.org/zzzeek/alembic")
4517 (synopsis
4518 "Database migration tool for SQLAlchemy")
4519 (description
4520 "Alembic is a lightweight database migration tool for usage with the
4521 SQLAlchemy Database Toolkit for Python.")
4522 (license license:expat)))
4523
4524 (define-public python2-alembic
4525 (package-with-python2 python-alembic))
4526
4527 (define-public python-autopep8
4528 (package
4529 (name "python-autopep8")
4530 (version "1.2.4")
4531 (source
4532 (origin
4533 (method url-fetch)
4534 (uri (pypi-uri "autopep8" version))
4535 (sha256
4536 (base32
4537 "18parm383lfn42a00wklv3qf20p4v277f1x3cn58x019dqk1xqrq"))))
4538 (build-system python-build-system)
4539 (propagated-inputs
4540 `(("python-pep8" ,python-pep8)))
4541 (home-page "https://github.com/hhatto/autopep8")
4542 (synopsis "Format Python code according to the PEP 8 style guide")
4543 (description
4544 "@code{autopep8} automatically formats Python code to conform to
4545 the PEP 8 style guide. It uses the pycodestyle utility to determine
4546 what parts of the code needs to be formatted. @code{autopep8} is
4547 capable of fixing most of the formatting issues that can be reported
4548 by pycodestyle.")
4549 (license (license:non-copyleft
4550 "https://github.com/hhatto/autopep8/blob/master/LICENSE"))))
4551
4552 (define-public python2-autopep8
4553 (package-with-python2 python-autopep8))
4554
4555 (define-public python-distutils-extra
4556 (package
4557 (name "python-distutils-extra")
4558 (version "2.38")
4559 (source
4560 (origin
4561 (method url-fetch)
4562 (uri (string-append "https://launchpad.net/python-distutils-extra/trunk/"
4563 version "/+download/python-distutils-extra-"
4564 version ".tar.gz"))
4565 (sha256
4566 (base32
4567 "0lx15kcbby9zisx33p2h5hgakgwh2bvh0ibag8z0px4j6ifhs41x"))))
4568 (build-system python-build-system)
4569 (home-page "https://launchpad.net/python-distutils-extra/")
4570 (synopsis "Enhancements to Python's distutils")
4571 (description
4572 "The python-distutils-extra module enables you to easily integrate
4573 gettext support, themed icons, and scrollkeeper-based documentation into
4574 Python's distutils.")
4575 (license license:gpl2)))
4576
4577 (define-public python2-distutils-extra
4578 (package-with-python2 python-distutils-extra))
4579
4580 (define-public python2-elib.intl
4581 (package
4582 (name "python2-elib.intl")
4583 (version "0.0.3")
4584 (source
4585 (origin
4586 ;; This project doesn't tag releases or publish tarballs, so we take
4587 ;; source from a (semi-arbitrary, i.e. latest as of now) git commit.
4588 (method git-fetch)
4589 (uri (git-reference
4590 (url "https://github.com/dieterv/elib.intl.git")
4591 (commit "d09997cfef")))
4592 (sha256
4593 (base32
4594 "0y7vzff9xgbnaay7m0va1arl6g68ncwrvbgwl7jqlclsahzzb09d"))))
4595 (build-system python-build-system)
4596 (arguments
4597 ;; incompatible with Python 3 (exception syntax)
4598 `(#:python ,python-2
4599 #:tests? #f))
4600 (home-page "https://github.com/dieterv/elib.intl")
4601 (synopsis "Enhanced internationalization for Python")
4602 (description
4603 "The elib.intl module provides enhanced internationalization (I18N)
4604 services for your Python modules and applications.")
4605 (license license:lgpl3+)))
4606
4607 (define-public python-pillow
4608 (package
4609 (name "python-pillow")
4610 (version "3.3.3")
4611 (source
4612 (origin
4613 (method url-fetch)
4614 (uri (pypi-uri "Pillow" version))
4615 (patches (search-patches "python-pillow-freetype-2.7-test-failure.patch"))
4616 (sha256
4617 (base32
4618 "0xkv0p1d73gz0a1qaasf0ai4262g8f334j07vd60bjrxs2wr3nmj"))))
4619 (build-system python-build-system)
4620 (native-inputs
4621 `(("python-nose" ,python-nose)))
4622 (inputs
4623 `(("freetype" ,freetype)
4624 ("lcms" ,lcms)
4625 ("zlib" ,zlib)
4626 ("libjpeg" ,libjpeg)
4627 ("openjpeg" ,openjpeg)
4628 ("libtiff" ,libtiff)
4629 ("libwebp" ,libwebp)))
4630 (arguments
4631 `(#:phases (modify-phases %standard-phases
4632 (add-after
4633 'install 'check-installed
4634 (lambda* (#:key outputs inputs #:allow-other-keys)
4635 (begin
4636 (setenv "HOME" (getcwd))
4637 ;; Make installed package available for running the
4638 ;; tests
4639 (add-installed-pythonpath inputs outputs)
4640 (and (zero? (system* "python" "selftest.py"
4641 "--installed"))
4642 (zero? (system* "python" "test-installed.py"))))))
4643 (delete 'check))))
4644 (home-page "https://pypi.python.org/pypi/Pillow")
4645 (synopsis "Fork of the Python Imaging Library")
4646 (description
4647 "The Python Imaging Library adds image processing capabilities to your
4648 Python interpreter. This library provides extensive file format support, an
4649 efficient internal representation, and fairly powerful image processing
4650 capabilities. The core image library is designed for fast access to data
4651 stored in a few basic pixel formats. It should provide a solid foundation for
4652 a general image processing tool.")
4653 (license (license:x11-style
4654 "http://www.pythonware.com/products/pil/license.htm"
4655 "The PIL Software License"))))
4656
4657 (define-public python2-pillow
4658 (package-with-python2 python-pillow))
4659
4660 (define-public python-pycparser
4661 (package
4662 (name "python-pycparser")
4663 (version "2.17")
4664 (source
4665 (origin
4666 (method url-fetch)
4667 (uri (pypi-uri "pycparser" version))
4668 (sha256
4669 (base32
4670 "1dkkjri0miidqb1zcqhqljfa34fcy9k5akasgwsv6k622zlk3b0a"))))
4671 (outputs '("out" "doc"))
4672 (build-system python-build-system)
4673 (native-inputs
4674 `(("pkg-config" ,pkg-config)))
4675 (arguments
4676 `(#:phases
4677 (modify-phases %standard-phases
4678 (replace 'check
4679 (lambda _
4680 (with-directory-excursion "tests"
4681 (zero? (system* "python" "all_tests.py")))))
4682 (add-after 'install 'install-doc
4683 (lambda* (#:key outputs #:allow-other-keys)
4684 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4685 (doc (string-append data "/doc/" ,name "-" ,version))
4686 (examples (string-append doc "/examples")))
4687 (mkdir-p examples)
4688 (for-each (lambda (file)
4689 (copy-file (string-append "." file)
4690 (string-append doc file)))
4691 '("/README.rst" "/CHANGES" "/LICENSE"))
4692 (copy-recursively "examples" examples)))))))
4693 (home-page "https://github.com/eliben/pycparser")
4694 (synopsis "C parser in Python")
4695 (description
4696 "Pycparser is a complete parser of the C language, written in pure Python
4697 using the PLY parsing library. It parses C code into an AST and can serve as
4698 a front-end for C compilers or analysis tools.")
4699 (license license:bsd-3)))
4700
4701 (define-public python2-pycparser
4702 (package-with-python2 python-pycparser))
4703
4704 (define-public python-cffi
4705 (package
4706 (name "python-cffi")
4707 (version "1.4.2")
4708 (source
4709 (origin
4710 (method url-fetch)
4711 (uri (pypi-uri "cffi" version))
4712 (sha256
4713 (base32 "161rj52rzi3880lij17d6i9kvgkiwjilrqjs8405k8sf6ryif7cg"))))
4714 (build-system python-build-system)
4715 (outputs '("out" "doc"))
4716 (inputs
4717 `(("libffi" ,libffi)))
4718 (propagated-inputs ; required at run-time
4719 `(("python-pycparser" ,python-pycparser)))
4720 (native-inputs
4721 `(("pkg-config" ,pkg-config)
4722 ("python-sphinx" ,python-sphinx)
4723 ("python-pytest" ,python-pytest)))
4724 (arguments
4725 `(#:phases
4726 (alist-cons-after
4727 'install 'install-doc
4728 (lambda* (#:key outputs #:allow-other-keys)
4729 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4730 (doc (string-append data "/doc/" ,name "-" ,version))
4731 (html (string-append doc "/html")))
4732 (with-directory-excursion "doc"
4733 (system* "make" "html")
4734 (mkdir-p html)
4735 (copy-recursively "build/html" html))
4736 (copy-file "LICENSE" (string-append doc "/LICENSE"))))
4737 %standard-phases)))
4738 (home-page "http://cffi.readthedocs.org")
4739 (synopsis "Foreign function interface for Python")
4740 (description
4741 "Foreign Function Interface for Python calling C code.")
4742 (license license:expat)))
4743
4744 (define-public python2-cffi
4745 (package-with-python2 python-cffi))
4746
4747 (define-public python-xcffib
4748 (package
4749 (name "python-xcffib")
4750 (version "0.5.1")
4751 (source
4752 (origin
4753 (method url-fetch)
4754 (uri (pypi-uri "xcffib" version))
4755 (sha256
4756 (base32
4757 "09gbnmr5vn58mm8xi3fmd7fz6743cks6c46dphnxzwax6zsxmy60"))))
4758 (build-system python-build-system)
4759 (inputs
4760 `(("libxcb" ,libxcb)))
4761 (propagated-inputs
4762 `(("python-cffi" ,python-cffi) ; used at run time
4763 ("python-six" ,python-six)))
4764 (arguments
4765 `(;; FIXME: Tests need more work. See ".travis.yml" in the repository.
4766 #:tests? #f
4767 #:phases
4768 (modify-phases %standard-phases
4769 (add-after 'unpack 'fix-libxcb-path
4770 (lambda* (#:key inputs #:allow-other-keys)
4771 (let ((libxcb (assoc-ref inputs "libxcb")))
4772 (substitute* '("xcffib/__init__.py")
4773 (("^soname = \"") (string-append "soname = \"" libxcb "/lib/")))
4774 #t)))
4775 (add-after 'install 'install-doc
4776 (lambda* (#:key outputs #:allow-other-keys)
4777 (let ((doc (string-append (assoc-ref outputs "out") "/share"
4778 "/doc/" ,name "-" ,version)))
4779 (mkdir-p doc)
4780 (copy-file "README.md"
4781 (string-append doc "/README.md"))
4782 #t))))))
4783 (home-page "https://github.com/tych0/xcffib")
4784 (synopsis "XCB Python bindings")
4785 (description
4786 "Xcffib is a replacement for xpyb, an XCB Python bindings. It adds
4787 support for Python 3 and PyPy. It is based on cffi.")
4788 (license license:expat)))
4789
4790 (define-public python2-xcffib
4791 (package-with-python2 python-xcffib))
4792
4793 (define-public python-cairocffi
4794 (package
4795 (name "python-cairocffi")
4796 (version "0.8.0")
4797 (source
4798 (origin
4799 (method url-fetch)
4800 ;; The archive on pypi is missing the 'utils' directory!
4801 (uri (string-append "https://github.com/Kozea/cairocffi/archive/v"
4802 version ".tar.gz"))
4803 (file-name (string-append name "-" version ".tar.gz"))
4804 (sha256
4805 (base32
4806 "1rk2dvy3fxrga6bvvxc2fi5lbaynm5h4a0w0aaxyn3bc77rszjg9"))))
4807 (build-system python-build-system)
4808 (outputs '("out" "doc"))
4809 (inputs
4810 `(("gdk-pixbuf" ,gdk-pixbuf)
4811 ("cairo" ,cairo)))
4812 (native-inputs
4813 `(("pkg-config" ,pkg-config)
4814 ("python-sphinx" ,python-sphinx)
4815 ("python-docutils" ,python-docutils)))
4816 (propagated-inputs
4817 `(("python-xcffib" ,python-xcffib))) ; used at run time
4818 (arguments
4819 `(;; FIXME: Tests cannot find 'libcairo.so.2'.
4820 #:tests? #f
4821 #:phases
4822 (modify-phases %standard-phases
4823 (add-after 'install 'install-doc
4824 (lambda* (#:key inputs outputs #:allow-other-keys)
4825 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4826 (doc (string-append data "/doc/" ,name "-" ,version))
4827 (html (string-append doc "/html")))
4828 (setenv "LD_LIBRARY_PATH"
4829 (string-append (assoc-ref inputs "cairo") "/lib" ":"
4830 (assoc-ref inputs "gdk-pixbuf") "/lib"))
4831 (setenv "LANG" "en_US.UTF-8")
4832 (mkdir-p html)
4833 (for-each (lambda (file)
4834 (copy-file (string-append "." file)
4835 (string-append doc file)))
4836 '("/README.rst" "/CHANGES" "/LICENSE"))
4837 (system* "python" "setup.py" "build_sphinx")
4838 (copy-recursively "docs/_build/html" html)
4839 #t))))))
4840 (home-page "https://github.com/Kozea/cairocffi")
4841 (synopsis "Python bindings and object-oriented API for Cairo")
4842 (description
4843 "Cairocffi is a CFFI-based drop-in replacement for Pycairo, a set of
4844 Python bindings and object-oriented API for cairo. Cairo is a 2D vector
4845 graphics library with support for multiple backends including image buffers,
4846 PNG, PostScript, PDF, and SVG file output.")
4847 (license license:bsd-3)))
4848
4849 (define-public python2-cairocffi
4850 (package-with-python2 python-cairocffi))
4851
4852 (define-public python-decorator
4853 (package
4854 (name "python-decorator")
4855 (version "4.0.10")
4856 (source
4857 (origin
4858 (method url-fetch)
4859 (uri (pypi-uri "decorator" version))
4860 (sha256
4861 (base32 "0w7hg59hlpq74jpyja4yfryap0ccjvchgpkfp20rhj9krgnrhvlw"))))
4862 (build-system python-build-system)
4863 (arguments '(#:tests? #f)) ; no test target
4864 (home-page "https://pypi.python.org/pypi/decorator/")
4865 (synopsis "Python module to simplify usage of decorators")
4866 (description
4867 "The aim of the decorator module is to simplify the usage of decorators
4868 for the average programmer, and to popularize decorators usage giving examples
4869 of useful decorators, such as memoize, tracing, redirecting_stdout, locked,
4870 etc. The core of this module is a decorator factory.")
4871 (license license:expat)))
4872
4873 (define-public python2-decorator
4874 (package-with-python2 python-decorator))
4875
4876 (define-public python-drmaa
4877 (package
4878 (name "python-drmaa")
4879 (version "0.7.7")
4880 (source
4881 (origin
4882 (method url-fetch)
4883 (uri (string-append
4884 "https://pypi.python.org/packages/source/d/drmaa/drmaa-"
4885 version ".tar.gz"))
4886 (sha256
4887 (base32 "0xzqriqyvk5b8hszbavsyxd29wm3sxirm8zvvdm73rs2iq7w4hkx"))))
4888 (build-system python-build-system)
4889 ;; The test suite requires libdrmaa which is provided by the cluster
4890 ;; environment. At runtime the environment variable DRMAA_LIBRARY_PATH
4891 ;; should be set to the path of the libdrmaa library.
4892 (arguments '(#:tests? #f))
4893 (native-inputs
4894 `(("python-nose" ,python-nose)))
4895 (home-page "https://pypi.python.org/pypi/drmaa")
4896 (synopsis "Python bindings for the DRMAA library")
4897 (description
4898 "A Python package for Distributed Resource Management (DRM) job
4899 submission and control. This package is an implementation of the DRMAA 1.0
4900 Python language binding specification.")
4901 (license license:bsd-3)))
4902
4903 (define-public python2-drmaa
4904 (package-with-python2 python-drmaa))
4905
4906 (define-public python-gridmap
4907 (package
4908 (name "python-gridmap")
4909 (version "0.13.0")
4910 (source
4911 (origin
4912 (method url-fetch)
4913 (uri (string-append
4914 "https://github.com/pygridtools/gridmap/archive/v"
4915 version ".tar.gz"))
4916 (file-name (string-append name "-" version ".tar.gz"))
4917 (sha256
4918 (base32 "1gzjg2k6f14i1msm2b0ax8d9ds1hvk6qd5nlaivg8m4cxqp4cp1x"))))
4919 (build-system python-build-system)
4920 (arguments
4921 '(#:tests? #f)) ; FIXME: Requires python-cherrypy.
4922 (propagated-inputs
4923 `(("python-psutil" ,python-psutil)
4924 ("python-drmaa" ,python-drmaa)
4925 ("python-pyzmq" ,python-pyzmq)))
4926 (home-page "https://github.com/pygridtools/gridmap")
4927 (synopsis "Create jobs on a cluster directly from Python")
4928 (description
4929 "Gridmap is a Python package to allow you to easily create jobs on the
4930 cluster directly from Python. You can directly map Python functions onto the
4931 cluster without needing to write any wrapper code yourself.")
4932 (license license:gpl3+)))
4933
4934 (define-public python2-gridmap
4935 (package-with-python2 python-gridmap))
4936
4937 (define-public python-pexpect
4938 (package
4939 (name "python-pexpect")
4940 (version "4.2.1")
4941 (source
4942 (origin
4943 (method url-fetch)
4944 (uri (pypi-uri "pexpect" version))
4945 (sha256
4946 (base32 "14ls7k99pwvl21zqv65kzrhccv50j89m5ij1hf0slmsvlxjj84rx"))))
4947 (build-system python-build-system)
4948 (arguments
4949 `(#:phases
4950 (modify-phases %standard-phases
4951 (add-before 'check 'prepare-tests
4952 (lambda _
4953 (substitute* (find-files "tests")
4954 (("/bin/ls") (which "ls"))
4955 (("/bin/echo") (which "echo"))
4956 (("/bin/which") (which "which"))
4957 ;; Many tests try to use the /bin directory which
4958 ;; is not present in the build environment.
4959 ;; Use one that's non-empty and unlikely to change.
4960 (("/bin'") "/dev'"))
4961 ;; XXX: Socket connection test gets "Connection reset by peer".
4962 ;; Why does it not work? Delete for now.
4963 (delete-file "tests/test_socket.py")
4964 #t))
4965 (replace 'check (lambda _ (zero? (system* "nosetests" "-v")))))))
4966 (native-inputs
4967 `(("python-nose" ,python-nose)
4968 ("python-pytest" ,python-pytest-3.0)
4969 ("man-db" ,man-db)
4970 ("which" ,which)))
4971 (propagated-inputs
4972 `(("python-ptyprocess" ,python-ptyprocess)))
4973 (home-page "http://pexpect.readthedocs.org/")
4974 (synopsis "Controlling interactive console applications")
4975 (description
4976 "Pexpect is a pure Python module for spawning child applications;
4977 controlling them; and responding to expected patterns in their output.
4978 Pexpect works like Don Libes’ Expect. Pexpect allows your script to spawn a
4979 child application and control it as if a human were typing commands.")
4980 (license license:isc)))
4981
4982 (define-public python2-pexpect
4983 (package-with-python2 python-pexpect))
4984
4985 (define-public python-setuptools-scm
4986 (package
4987 (name "python-setuptools-scm")
4988 (version "1.15.0")
4989 (source (origin
4990 (method url-fetch)
4991 (uri (pypi-uri "setuptools_scm" version))
4992 (sha256
4993 (base32
4994 "0bwyc5markib0i7i2qlyhdzxhiywzxbkfiapldma8m91m82jvwfs"))))
4995 (build-system python-build-system)
4996 (home-page "https://github.com/pypa/setuptools_scm/")
4997 (synopsis "Manage Python package versions in SCM metadata")
4998 (description
4999 "Setuptools_scm handles managing your Python package versions in
5000 @dfn{software configuration management} (SCM) metadata instead of declaring
5001 them as the version argument or in a SCM managed file.")
5002 (license license:expat)))
5003
5004 (define-public python2-setuptools-scm
5005 (package-with-python2 python-setuptools-scm))
5006
5007 (define-public python-pathpy
5008 (package
5009 (name "python-pathpy")
5010 (version "8.1.1")
5011 (source
5012 (origin
5013 (method url-fetch)
5014 (uri (string-append "https://pypi.python.org/packages/source/p/"
5015 "path.py/path.py-" version ".tar.gz"))
5016 (sha256
5017 (base32 "1p8s1l2vfkqhqxdhqlj0g1jjw4f1as2frr35sjcpjjpd5a89y41f"))))
5018 (outputs '("out" "doc"))
5019 (build-system python-build-system)
5020 (propagated-inputs
5021 `(("python-appdirs" ,python-appdirs)))
5022 (native-inputs
5023 `(("python-setuptools-scm" ,python-setuptools-scm)
5024 ("python-sphinx" ,python-sphinx)
5025 ("python-rst.linker" ,python-rst.linker)
5026 ("python-pytest" ,python-pytest)
5027 ("python-pytest-runner" ,python-pytest-runner)))
5028 (arguments
5029 `(#:phases
5030 (modify-phases %standard-phases
5031 (add-after 'build 'build-doc
5032 (lambda _
5033 (setenv "LANG" "en_US.UTF-8")
5034 (zero? (system* "python" "setup.py" "build_sphinx"))))
5035 (add-after 'install 'install-doc
5036 (lambda* (#:key outputs #:allow-other-keys)
5037 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
5038 (doc (string-append data "/doc/" ,name "-" ,version))
5039 (html (string-append doc "/html")))
5040 (mkdir-p html)
5041 (for-each (lambda (file)
5042 (copy-file file (string-append doc "/" file)))
5043 '("README.rst" "CHANGES.rst"))
5044 (copy-recursively "build/sphinx/html" html)))))))
5045 (home-page "https://github.com/jaraco/path.py")
5046 (synopsis "Python module wrapper for built-in os.path")
5047 (description
5048 "@code{path.py} implements path objects as first-class entities, allowing
5049 common operations on files to be invoked on those path objects directly.")
5050 (license license:expat)))
5051
5052 (define-public python2-pathpy
5053 (package-with-python2 python-pathpy))
5054
5055 (define-public python-pickleshare
5056 (package
5057 (name "python-pickleshare")
5058 (version "0.5")
5059 (source
5060 (origin
5061 (method url-fetch)
5062 (uri (string-append "https://pypi.python.org/packages/source/p/"
5063 "pickleshare/pickleshare-" version ".tar.gz"))
5064 (sha256
5065 (base32 "11ljr90j3p6qswdrbl7p4cjb2i93f6vn0vx9anzpshsx0d2mggn0"))))
5066 (build-system python-build-system)
5067 (propagated-inputs
5068 `(("python-pathpy" ,python-pathpy)))
5069 (home-page "https://github.com/vivainio/pickleshare")
5070 (synopsis "Tiny key value database with concurrency support")
5071 (description
5072 "PickleShare is a small ‘shelve’-like datastore with concurrency support.
5073 Like shelve, a PickleShareDB object acts like a normal dictionary. Unlike
5074 shelve, many processes can access the database simultaneously. Changing a
5075 value in database is immediately visible to other processes accessing the same
5076 database. Concurrency is possible because the values are stored in separate
5077 files. Hence the “database” is a directory where all files are governed by
5078 PickleShare.")
5079 (license license:expat)))
5080
5081 (define-public python2-pickleshare
5082 (package-with-python2 python-pickleshare))
5083
5084 (define-public python-simplegeneric
5085 (package
5086 (name "python-simplegeneric")
5087 (version "0.8.1")
5088 (source
5089 (origin
5090 (method url-fetch)
5091 (uri (string-append "https://pypi.python.org/packages/source/s/"
5092 "simplegeneric/simplegeneric-" version ".zip"))
5093 (sha256
5094 (base32 "0wwi1c6md4vkbcsfsf8dklf3vr4mcdj4mpxkanwgb6jb1432x5yw"))))
5095 (build-system python-build-system)
5096 (native-inputs
5097 `(("unzip" ,unzip)))
5098 (home-page "http://cheeseshop.python.org/pypi/simplegeneric")
5099 (synopsis "Python module for simple generic functions")
5100 (description
5101 "The simplegeneric module lets you define simple single-dispatch generic
5102 functions, akin to Python’s built-in generic functions like @code{len()},
5103 @code{iter()} and so on. However, instead of using specially-named methods,
5104 these generic functions use simple lookup tables, akin to those used by
5105 e.g. @code{pickle.dump()} and other generic functions found in the Python
5106 standard library.")
5107 (license license:zpl2.1)))
5108
5109 (define-public python2-simplegeneric
5110 (package-with-python2 python-simplegeneric))
5111
5112 (define-public python-ipython-genutils
5113 ;; TODO: This package is retired, check if can be removed, see description.
5114 (package
5115 (name "python-ipython-genutils")
5116 (version "0.1.0")
5117 (source
5118 (origin
5119 (method url-fetch)
5120 (uri (string-append "https://pypi.python.org/packages/source/i/"
5121 "ipython_genutils/ipython_genutils-"
5122 version ".tar.gz"))
5123 (sha256
5124 (base32 "19l2pp1c64ansr89l3cqh19jdi2ixhssdzx0vz4n6r52a6i281is"))))
5125 (build-system python-build-system)
5126 (arguments `(#:tests? #f)) ; no tests
5127 (home-page "http://ipython.org")
5128 (synopsis "Vestigial utilities from IPython")
5129 (description
5130 "This package provides retired utilities from IPython. No packages
5131 outside IPython/Jupyter should depend on it.
5132
5133 This package shouldn't exist. It contains some common utilities shared by
5134 Jupyter and IPython projects during The Big Split. As soon as possible, those
5135 packages will remove their dependency on this, and this package will go
5136 away.")
5137 (license license:bsd-3)))
5138
5139 (define-public python2-ipython-genutils
5140 (package-with-python2 python-ipython-genutils))
5141
5142 (define-public python-traitlets
5143 (package
5144 (name "python-traitlets")
5145 (version "4.2.0")
5146 (source
5147 (origin
5148 (method url-fetch)
5149 (uri (pypi-uri "traitlets" version))
5150 (sha256
5151 (base32
5152 "1afy08sa5n9gnkvh3da49c16zkyv598vchv0p1hp7zzjy8895hz4"))))
5153 (build-system python-build-system)
5154 (arguments
5155 `(#:phases
5156 (modify-phases %standard-phases
5157 (replace 'check (lambda _ (zero? (system* "nosetests")))))))
5158 (propagated-inputs
5159 `(("python-ipython-genutils" ,python-ipython-genutils)
5160 ("python-decorator" ,python-decorator)))
5161 (native-inputs
5162 `(("python-mock" ,python-mock)
5163 ("python-nose" ,python-nose)))
5164 (home-page "http://ipython.org")
5165 (synopsis "Configuration system for Python applications")
5166 (description
5167 "Traitlets is a framework that lets Python classes have attributes with
5168 type checking, dynamically calculated default values, and ‘on change’
5169 callbacks. The package also includes a mechanism to use traitlets for
5170 configuration, loading values from files or from command line arguments. This
5171 is a distinct layer on top of traitlets, so you can use traitlets in your code
5172 without using the configuration machinery.")
5173 (license license:bsd-3)))
5174
5175 (define-public python2-traitlets
5176 (package-with-python2 python-traitlets))
5177
5178 (define-public python-jupyter-core
5179 (package
5180 (name "python-jupyter-core")
5181 (version "4.2.1")
5182 (source
5183 (origin
5184 (method url-fetch)
5185 (uri (string-append (pypi-uri "jupyter_core" version)))
5186 (sha256
5187 (base32
5188 "1cy7inv218dgh4m1fbzbsiqpz733ylgjrj62jxqpfzs3r2cm7ic9"))))
5189 (build-system python-build-system)
5190 ;; FIXME: not sure how to run the tests
5191 (arguments `(#:tests? #f))
5192 (propagated-inputs
5193 `(("python-traitlets" ,python-traitlets)))
5194 (home-page "http://jupyter.org/")
5195 (synopsis "Jupyter base package")
5196 (description
5197 "Jupyter core is the base package on which Jupyter projects rely.")
5198 (license license:bsd-3)))
5199
5200 (define-public python2-jupyter-core
5201 (package-with-python2 python-jupyter-core))
5202
5203 (define-public python-jupyter-client
5204 (package
5205 (name "python-jupyter-client")
5206 (version "4.4.0")
5207 (source
5208 (origin
5209 (method url-fetch)
5210 (uri (pypi-uri "jupyter_client" version))
5211 (sha256
5212 (base32
5213 "1vjjrpjw7k5sh982pbjnslv7byfbfazjw9g92jvs7dz5qbx556n9"))))
5214 (build-system python-build-system)
5215 ;; Tests fail because of missing native python kernel which I assume is
5216 ;; provided by the ipython package, which we cannot use because it would
5217 ;; cause a dependency cycle.
5218 (arguments `(#:tests? #f))
5219 (propagated-inputs
5220 `(("python-pyzmq" ,python-pyzmq)
5221 ("python-traitlets" ,python-traitlets)
5222 ("python-jupyter-core" ,python-jupyter-core)))
5223 (home-page "http://jupyter.org/")
5224 (synopsis "Jupyter protocol implementation and client libraries")
5225 (description
5226 "The @code{jupyter_client} package contains the reference implementation
5227 of the Jupyter protocol. It also provides client and kernel management APIs
5228 for working with kernels, and the @code{jupyter kernelspec} entrypoint for
5229 installing @code{kernelspec}s for use with Jupyter frontends.")
5230 (license license:bsd-3)))
5231
5232 (define-public python2-jupyter-client
5233 (package-with-python2 python-jupyter-client))
5234
5235 (define-public python-ipykernel
5236 (package
5237 (name "python-ipykernel")
5238 (version "4.5.2")
5239 (source
5240 (origin
5241 (method url-fetch)
5242 (uri (pypi-uri "ipykernel" version))
5243 (sha256
5244 (base32 "0qllv0k6zzv1r1cj1x2ygxmlrrqhbslzj8rc6r6fg3kc1rgz4m2s"))))
5245 (build-system python-build-system)
5246 ;; The tests load a submodule of IPython. However, IPython itself depends
5247 ;; on ipykernel.
5248 (arguments `(#:tests? #f))
5249 (propagated-inputs
5250 ;; imported at runtime during connect
5251 `(("python-jupyter-client" ,python-jupyter-client)))
5252 (home-page "http://ipython.org")
5253 (synopsis "IPython Kernel for Jupyter")
5254 (description
5255 "This package provides the IPython kernel for Jupyter.")
5256 (license license:bsd-3)))
5257
5258 (define-public python2-ipykernel
5259 (package-with-python2 python-ipykernel))
5260
5261 (define-public python-testpath
5262 (package
5263 (name "python-testpath")
5264 (version "0.2")
5265 (source
5266 (origin
5267 (method url-fetch)
5268 (uri (string-append "https://github.com/jupyter/testpath/archive/"
5269 version ".tar.gz"))
5270 (file-name (string-append name "-" version ".tar.gz"))
5271 (sha256
5272 (base32
5273 "04kh3fgvmqz6cfcw79q70qwjz7ib7lxm27cc548iy2rpr33qqf55"))))
5274 (build-system python-build-system)
5275 (arguments
5276 `(#:tests? #f ; this package does not even have a setup.py
5277 #:modules ((guix build python-build-system)
5278 (guix build utils)
5279 (srfi srfi-1))
5280 #:imported-modules (,@%python-build-system-modules
5281 (srfi srfi-1))
5282 #:phases
5283 (modify-phases %standard-phases
5284 (delete 'install)
5285 (replace 'build
5286 (lambda* (#:key inputs outputs #:allow-other-keys)
5287 (let* ((version (last
5288 (string-split (assoc-ref inputs "python") #\-)))
5289 (x.y (string-join (take (string-split version #\.) 2)
5290 "."))
5291 (dir (string-append
5292 (assoc-ref outputs "out")
5293 "/lib/python" x.y "/site-packages/testpath")))
5294 (mkdir-p dir)
5295 (copy-recursively "testpath" dir))
5296 #t)))))
5297 (home-page "https://github.com/takluyver/testpath")
5298 (synopsis "Test utilities for code working with files and commands")
5299 (description
5300 "Testpath is a collection of utilities for Python code working with files
5301 and commands. It contains functions to check things on the filesystem, and
5302 tools for mocking system commands and recording calls to those.")
5303 (license license:expat)))
5304
5305 (define-public python2-testpath
5306 (package-with-python2 python-testpath))
5307
5308 (define-public python-ipython
5309 (package
5310 (name "python-ipython")
5311 (version "5.2.2")
5312 (source
5313 (origin
5314 (method url-fetch)
5315 (uri (pypi-uri "ipython" version ".tar.gz"))
5316 (sha256
5317 (base32 "1qhjwa9cyz1np7rhv3p4ip13lkgbqsad62l24xkwiq1ic2gwiqbf"))))
5318 (build-system python-build-system)
5319 (outputs '("out" "doc"))
5320 (propagated-inputs
5321 `(("python-pyzmq" ,python-pyzmq)
5322 ("python-prompt-toolkit" ,python-prompt-toolkit)
5323 ("python-terminado" ,python-terminado)
5324 ("python-matplotlib" ,python-matplotlib)
5325 ("python-numpy" ,python-numpy)
5326 ("python-numpydoc" ,python-numpydoc)
5327 ("python-jinja2" ,python-jinja2)
5328 ("python-mistune" ,python-mistune)
5329 ("python-pexpect" ,python-pexpect)
5330 ("python-pickleshare" ,python-pickleshare)
5331 ("python-simplegeneric" ,python-simplegeneric)
5332 ("python-jsonschema" ,python-jsonschema)
5333 ("python-traitlets" ,python-traitlets)
5334 ("python-ipykernel" ,python-ipykernel)
5335 ("python-nbformat" ,python-nbformat)
5336 ("python-pygments" ,python-pygments)))
5337 (inputs
5338 `(("readline" ,readline)
5339 ("which" ,which)))
5340 (native-inputs
5341 `(("graphviz" ,graphviz)
5342 ("pkg-config" ,pkg-config)
5343 ("python-requests" ,python-requests) ;; for tests
5344 ("python-testpath" ,python-testpath)
5345 ("python-nose" ,python-nose)
5346 ("python-sphinx" ,python-sphinx)
5347 ("python-shpinx-rtd-theme" ,python-sphinx-rtd-theme)
5348 ("texlive" ,texlive)
5349 ("texinfo" ,texinfo)))
5350 (arguments
5351 `(#:phases
5352 (modify-phases %standard-phases
5353 (add-after
5354 'install 'install-doc
5355 (lambda* (#:key inputs outputs #:allow-other-keys)
5356 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
5357 (doc (string-append data "/doc/" ,name "-" ,version))
5358 (html (string-append doc "/html"))
5359 (man1 (string-append data "/man/man1"))
5360 (info (string-append data "/info"))
5361 (examples (string-append doc "/examples"))
5362 (python-arg (string-append "PYTHON=" (which "python"))))
5363 (setenv "LANG" "en_US.utf8")
5364 ;; Make installed package available for running the tests
5365 (add-installed-pythonpath inputs outputs)
5366 (with-directory-excursion "docs"
5367 ;; FIXME: pdf fails to build
5368 ;;(system* "make" "pdf" "PAPER=a4")
5369 (system* "make" python-arg "html")
5370 (system* "make" python-arg "info"))
5371 (copy-recursively "docs/man" man1)
5372 (copy-recursively "examples" examples)
5373 (copy-recursively "docs/build/html" html)
5374 ;; (copy-file "docs/build/latex/ipython.pdf"
5375 ;; (string-append doc "/ipython.pdf"))
5376 (mkdir-p info)
5377 (copy-file "docs/build/texinfo/ipython.info"
5378 (string-append info "/ipython.info"))
5379 (copy-file "COPYING.rst" (string-append doc "/COPYING.rst")))))
5380 ;; Tests can only be run after the library has been installed and not
5381 ;; within the source directory.
5382 (delete 'check)
5383 (add-after
5384 'install 'check
5385 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
5386 (if tests?
5387 (with-directory-excursion "/tmp"
5388 ;; Make installed package available for running the tests
5389 (add-installed-pythonpath inputs outputs)
5390 (setenv "HOME" "/tmp/") ;; required by a test
5391 (zero? (system* (string-append (assoc-ref outputs "out")
5392 "/bin/iptest"))))
5393 #t)))
5394 (add-before
5395 'install 'fix-tests
5396 (lambda* (#:key inputs #:allow-other-keys)
5397 (substitute* "./IPython/utils/_process_posix.py"
5398 (("/usr/bin/env', 'which") (which "which")))
5399 (substitute* "./IPython/core/tests/test_inputtransformer.py"
5400 (("#!/usr/bin/env python")
5401 (string-append "#!" (which "python"))))
5402 ;; Disable 1 failing test
5403 (substitute* "./IPython/core/tests/test_magic.py"
5404 (("def test_dirops\\(\\):" all)
5405 (string-append "@dec.skipif(True)\n" all))))))))
5406 (home-page "http://ipython.org")
5407 (synopsis "IPython is a tool for interactive computing in Python")
5408 (description
5409 "IPython provides a rich architecture for interactive computing with:
5410 Powerful interactive shells, a browser-based notebook, support for interactive
5411 data visualization, embeddable interpreters and tools for parallel
5412 computing.")
5413 (license license:bsd-3)
5414 (properties `((python2-variant . ,(delay python2-ipython))))))
5415
5416 (define-public python2-ipython
5417 (let ((ipython (package-with-python2 (strip-python2-variant python-ipython))))
5418 (package
5419 (inherit ipython)
5420 ;; FIXME: add pyreadline once available.
5421 (propagated-inputs
5422 `(("python2-backports-shutil-get-terminal-size"
5423 ,python2-backports-shutil-get-terminal-size)
5424 ("python2-pathlib2" ,python2-pathlib2)
5425 ,@(package-propagated-inputs ipython)))
5426 (native-inputs
5427 `(("python2-mock" ,python2-mock)
5428 ,@(package-native-inputs ipython))))))
5429
5430 (define-public python-isodate
5431 (package
5432 (name "python-isodate")
5433 (version "0.5.4")
5434 (source
5435 (origin
5436 (method url-fetch)
5437 (uri (pypi-uri "isodate" version))
5438 (sha256
5439 (base32
5440 "0cafaiwixgpxwh9dsd28qb0dbzsj6xpxjdkyk30ns91ps10mq422"))))
5441 (build-system python-build-system)
5442 (home-page
5443 "http://cheeseshop.python.org/pypi/isodate")
5444 (synopsis
5445 "Python date parser and formatter")
5446 (description
5447 "Python-isodate is a python module for parsing and formatting
5448 ISO 8601 dates, time and duration.")
5449 (license license:bsd-3)))
5450
5451 (define-public python2-isodate
5452 (package-with-python2 python-isodate))
5453
5454 (define-public python-html5lib
5455 (package
5456 (name "python-html5lib")
5457 (version "1.0b10")
5458 (source
5459 (origin
5460 (method url-fetch)
5461 (uri (pypi-uri "html5lib" version))
5462 (sha256
5463 (base32
5464 "1yd068a5c00wd0ajq0hqimv7fd82lhrw0w3s01vbhy9bbd6xapqd"))))
5465 (build-system python-build-system)
5466 (propagated-inputs
5467 `(("python-six" ,python-six)
5468 ("python-webencodings" ,python-webencodings)))
5469 (arguments
5470 `(#:test-target "check"))
5471 (home-page
5472 "https://github.com/html5lib/html5lib-python")
5473 (synopsis
5474 "Python HTML parser based on the WHATWG HTML specifcation")
5475 (description
5476 "Html5lib is an HTML parser based on the WHATWG HTML specifcation
5477 and written in Python.")
5478 (license license:expat)))
5479
5480 (define-public python2-html5lib
5481 (package-with-python2 python-html5lib))
5482
5483 ;; Needed for python-bleach, a dependency of python-notebook
5484 (define-public python-html5lib-0.9
5485 (package
5486 (inherit python-html5lib)
5487 (version "0.999")
5488 (source
5489 (origin
5490 (method url-fetch)
5491 (uri (pypi-uri "html5lib" version))
5492 (sha256
5493 (base32
5494 "17n4zfsj6ynmbwdwviywmj8r6nzr3xvfx2zs0xhndmvm51z7z263"))))))
5495
5496 (define-public python2-html5lib-0.9
5497 (package-with-python2 python-html5lib-0.9))
5498
5499 (define-public python-webencodings
5500 (package
5501 (name "python-webencodings")
5502 (version "0.5")
5503 (source (origin
5504 (method url-fetch)
5505 (uri (pypi-uri "webencodings" version))
5506 (sha256
5507 (base32
5508 "015rw7662lkpb9aqiqah2hbizk6w531badqwjpz41rr47glmxid5"))))
5509 (build-system python-build-system)
5510 (arguments
5511 '(#:phases
5512 (modify-phases %standard-phases
5513 (replace 'check
5514 (lambda _
5515 (zero? (system* "py.test" "-v" "webencodings/tests.py")))))))
5516 (native-inputs
5517 `(("python-pytest" ,python-pytest)))
5518 (home-page "https://github.com/SimonSapin/python-webencodings")
5519 (synopsis "Character encoding aliases for legacy web content")
5520 (description
5521 "In order to be compatible with legacy web content when interpreting
5522 something like @code{Content-Type: text/html; charset=latin1}, tools need
5523 to use a particular set of aliases for encoding labels as well as some
5524 overriding rules. For example, @code{US-ASCII} and @code{iso-8859-1} on
5525 the web are actually aliases for @code{windows-1252}, and an @code{UTF-8}
5526 or @code{UTF-16} BOM takes precedence over any other encoding declaration.
5527 The WHATWG @url{https://encoding.spec.whatwg.org/,Encoding} standard
5528 defines all such details so that implementations do not have to
5529 reverse-engineer each other.
5530
5531 This module implements the Encoding standard and has encoding labels and
5532 BOM detection, but the actual implementation for encoders and decoders
5533 is Python’s.")
5534 (license license:bsd-3)))
5535
5536 (define-public python2-webencodings
5537 (package-with-python2 python-webencodings))
5538
5539 (define-public python-urwid
5540 (package
5541 (name "python-urwid")
5542 (version "1.3.1")
5543 (source
5544 (origin
5545 (method url-fetch)
5546 (uri (pypi-uri "urwid" version))
5547 (sha256
5548 (base32
5549 "18cnd1wdjcas08x5qwa5ayw6jsfcn33w4d9f7q3s29fy6qzc1kng"))))
5550 (build-system python-build-system)
5551 (arguments
5552 `(#:phases
5553 (modify-phases %standard-phases
5554 ;; Disable failing test. Bug filed upstream:
5555 ;; https://github.com/wardi/urwid/issues/164
5556 ;; TODO: check again for python-urwid > 1.3.1 or python > 3.4.3.
5557 (add-after 'unpack 'disable-failing-test
5558 (lambda _
5559 (substitute* "urwid/tests/test_event_loops.py"
5560 (("test_remove_watch_file")
5561 "disable_remove_watch_file")))))))
5562 (home-page "http://urwid.org")
5563 (synopsis "Console user interface library for Python")
5564 (description
5565 "Urwid is a curses-based UI/widget library for Python. It includes many
5566 features useful for text console applications.")
5567 (license license:lgpl2.1+)))
5568
5569 (define-public python2-urwid
5570 (let ((python2-urwid (package-with-python2 python-urwid)))
5571 (package
5572 (inherit python2-urwid)
5573 (arguments
5574 (append
5575 '(#:phases
5576 (modify-phases %standard-phases
5577 ;; Disable the vterm tests because of non-deterministic failures
5578 ;; with Python 2. See https://github.com/urwid/urwid/issues/230.
5579 (add-after 'unpack 'delete-test_vterm.py
5580 (delete-file "urwid/tests/test_vterm.py"))))
5581 (package-arguments python-urwid))))))
5582
5583 (define-public python-openid
5584 (package
5585 (name "python-openid")
5586 (version "3.0.10")
5587 (source
5588 (origin
5589 (method url-fetch)
5590 (uri (pypi-uri "python3-openid" version))
5591 (sha256
5592 (base32
5593 "1x3nh3fycqfn43jp5j5pb4q4y2jxp4mdka4absaa3bc0078qd758"))))
5594 (build-system python-build-system)
5595 (arguments
5596 `(#:phases
5597 (modify-phases %standard-phases
5598 (replace 'check
5599 (lambda _
5600 (zero? (system* "./admin/runtests")))))))
5601 (properties `((python2-variant . ,(delay python2-openid))))
5602 (propagated-inputs
5603 `(("python-defusedxml" ,python-defusedxml)))
5604 (native-inputs
5605 `(("python-psycopg2" ,python-psycopg2)
5606 ("python-django" ,python-django)))
5607 (home-page "https://github.com/necaris/python3-openid")
5608 (synopsis "OpenID support for servers and consumers")
5609 (description "This library provides OpenID authentication for Python, both
5610 for clients and servers.")
5611 (license license:asl2.0)))
5612
5613 (define-public python2-openid
5614 (package
5615 (name "python2-openid")
5616 (version "2.2.5")
5617 (source
5618 (origin
5619 (method url-fetch)
5620 (uri (pypi-uri "python-openid" version))
5621 (sha256
5622 (base32
5623 "1vvhxlghjan01snfdc4k7ykd80vkyjgizwgg9bncnin8rqz1ricj"))))
5624 (build-system python-build-system)
5625 (arguments
5626 ;; Python 3 support is in `python3-openid`, a separate package.
5627 `(#:python ,python-2))
5628 (home-page "https://github.com/openid/python-openid")
5629 (synopsis "OpenID support for servers and consumers")
5630 (description "This library provides OpenID authentication for Python, both
5631 for clients and servers.")
5632 (license license:asl2.0)))
5633
5634 (define-public python-urwidtrees
5635 (package
5636 (name "python-urwidtrees")
5637 (version "1.0.2")
5638 (source
5639 (origin
5640 (method url-fetch)
5641 ;; package author intends on distributing via github rather than pypi:
5642 ;; https://github.com/pazz/alot/issues/877#issuecomment-230173331
5643 (uri (string-append "https://github.com/pazz/urwidtrees/archive/"
5644 version ".tar.gz"))
5645 (file-name (string-append name "-" version ".tar.gz"))
5646 (sha256
5647 (base32
5648 "0d30lyd3s2a97rhqfax5w9ssqds2z6aydqx3c6j2c2lk3cb4ngvh"))))
5649 (build-system python-build-system)
5650 (arguments
5651 '(#:tests? #f)) ; no tests
5652 (propagated-inputs `(("python-urwid" ,python-urwid)))
5653 (home-page "https://github.com/pazz/urwidtrees")
5654 (synopsis "Tree widgets for urwid")
5655 (description "Urwidtrees is a Widget Container API for the @code{urwid}
5656 toolkit. Use it to build trees of widgets.")
5657 (license license:gpl3+)))
5658
5659 (define-public python2-urwidtrees
5660 (package-with-python2 python-urwidtrees))
5661
5662 (define-public python-dbus
5663 (package
5664 (name "python-dbus")
5665 (version "1.2.0")
5666 (source
5667 (origin
5668 (method url-fetch)
5669 (uri (string-append
5670 "https://dbus.freedesktop.org/releases/dbus-python/dbus-python-"
5671 version ".tar.gz"))
5672 (sha256
5673 (base32 "1py62qir966lvdkngg0v8k1khsqxwk5m4s8nflpk1agk5f5nqb71"))))
5674 (build-system gnu-build-system)
5675 (arguments
5676 '(#:phases
5677 (modify-phases %standard-phases
5678 (add-before
5679 'check 'pre-check
5680 (lambda _
5681 ;; XXX: For the missing '/etc/machine-id'.
5682 (substitute* "test/run-test.sh"
5683 (("DBUS_FATAL_WARNINGS=1")
5684 "DBUS_FATAL_WARNINGS=0"))
5685 #t)))))
5686 (native-inputs
5687 `(("pkg-config" ,pkg-config)))
5688 (inputs
5689 `(("python" ,python)
5690 ("dbus-glib" ,dbus-glib)))
5691 (synopsis "Python bindings for D-bus")
5692 (description "python-dbus provides bindings for libdbus, the reference
5693 implementation of D-Bus.")
5694 (home-page "http://www.freedesktop.org/wiki/Software/DBusBindings/")
5695 (license license:expat)))
5696
5697 (define-public python2-dbus
5698 (package (inherit python-dbus)
5699 (name "python2-dbus")
5700 (inputs `(("python" ,python-2)
5701 ,@(alist-delete "python"
5702 (package-inputs python-dbus)
5703 equal?)))
5704 ;; FIXME: on Python 2, the test_utf8 fails with:
5705 ;; "ValueError: unichr() arg not in range(0x10000) (narrow Python build)"
5706 (arguments `(#:tests? #f))))
5707
5708 (define-public python-apsw
5709 (package
5710 (name "python-apsw")
5711 (version "3.9.2-r1")
5712 (source
5713 (origin
5714 (method url-fetch)
5715 (uri (pypi-uri "apsw" version))
5716 (sha256
5717 (base32
5718 "0w4jb0wpx785qw42r3h4fh7gl5w2968q48i7gygybsfxck8nzffs"))))
5719 (build-system python-build-system)
5720 (inputs
5721 `(("sqlite" ,sqlite)))
5722 (arguments
5723 `(#:phases
5724 (modify-phases %standard-phases
5725 (delete 'check)
5726 (add-after 'install 'check
5727 (lambda* (#:key inputs outputs #:allow-other-keys)
5728 (add-installed-pythonpath inputs outputs)
5729 (zero? (system* "python" "setup.py" "test")))))))
5730 (home-page "https://github.com/rogerbinns/apsw/")
5731 (synopsis "Another Python SQLite Wrapper")
5732 (description "APSW is a Python wrapper for the SQLite
5733 embedded relational database engine. In contrast to other wrappers such as
5734 pysqlite it focuses on being a minimal layer over SQLite attempting just to
5735 translate the complete SQLite API into Python.")
5736 (license license:zlib)))
5737
5738 (define-public python2-apsw
5739 (package-with-python2 python-apsw))
5740
5741 (define-public python-lxml
5742 (package
5743 (name "python-lxml")
5744 (version "3.6.0")
5745 (source
5746 (origin
5747 (method url-fetch)
5748 (uri (pypi-uri "lxml" version))
5749 (sha256
5750 (base32
5751 "1pvbmiy2m7jwv493kilbghhj2pkh8wy1na3ji350vhzhlwlclx4w"))))
5752 (build-system python-build-system)
5753 (inputs
5754 `(("libxml2" ,libxml2)
5755 ("libxslt" ,libxslt)))
5756 (home-page "http://lxml.de/")
5757 (synopsis
5758 "Python XML processing library")
5759 (description
5760 "The lxml XML toolkit is a Pythonic binding for the C libraries
5761 libxml2 and libxslt.")
5762 (license license:bsd-3))) ; and a few more, see LICENSES.txt
5763
5764 (define-public python2-lxml
5765 (package-with-python2 python-lxml))
5766
5767 ;; beautifulsoup4 has a totally different namespace than 3.x,
5768 ;; and pypi seems to put it under its own name, so I guess we should too
5769 (define-public python-beautifulsoup4
5770 (package
5771 (name "python-beautifulsoup4")
5772 (version "4.5.3")
5773 (source
5774 (origin
5775 (method url-fetch)
5776 (uri (pypi-uri "beautifulsoup4" version))
5777 (sha256
5778 (base32
5779 "0glaw1vyxnbp03fni7h5496n6iib0n5iim4gax1n0ngscs9s075j"))))
5780 (build-system python-build-system)
5781 (arguments
5782 `(#:phases
5783 (modify-phases %standard-phases
5784 ;; The Python 2 source is the definitive source of beautifulsoup4. We
5785 ;; must use this conversion script when building with Python 3. The
5786 ;; conversion script also runs the tests.
5787 ;; For more information, see the file 'convert-py3k' in the source
5788 ;; distribution.
5789 (replace 'check
5790 (lambda _ (zero? (system* "./convert-py3k")))))))
5791 (home-page
5792 "http://www.crummy.com/software/BeautifulSoup/bs4/")
5793 (synopsis
5794 "Python screen-scraping library")
5795 (description
5796 "Beautiful Soup is a Python library designed for rapidly setting up
5797 screen-scraping projects. It offers Pythonic idioms for navigating,
5798 searching, and modifying a parse tree, providing a toolkit for
5799 dissecting a document and extracting what you need. It automatically
5800 converts incoming documents to Unicode and outgoing documents to UTF-8.")
5801 (license license:expat)
5802 (properties `((python2-variant . ,(delay python2-beautifulsoup4))))))
5803
5804 (define-public python2-beautifulsoup4
5805 (package
5806 (inherit (package-with-python2
5807 (strip-python2-variant python-beautifulsoup4)))
5808 (arguments `(#:python ,python-2))))
5809
5810 (define-public python-cssutils
5811 (package
5812 (name "python-cssutils")
5813 (version "1.0.1")
5814 (source
5815 (origin
5816 (method url-fetch)
5817 (uri (pypi-uri "cssutils" version))
5818 (sha256
5819 (base32
5820 "0qwha9x1wml2qmipbcz03gndnlwhzrjdvw9i09si247a90l8p8fq"))))
5821 (build-system python-build-system)
5822 (native-inputs
5823 `(("unzip" ,unzip))) ; for unpacking the source
5824 (arguments
5825 `(#:tests? #f)) ;tests require python-pbr < 1.7.0
5826 (home-page "http://cthedot.de/cssutils/")
5827 (synopsis
5828 "CSS Cascading Style Sheets library for Python")
5829 (description
5830 "Cssutils is a Python package for parsing and building CSS
5831 Cascading Style Sheets. Currently it provides a DOM only and no rendering
5832 options.")
5833 (license license:lgpl3+)))
5834
5835 (define-public python2-cssutils
5836 (package-with-python2 python-cssutils))
5837
5838 (define-public python-cssselect
5839 (package
5840 (name "python-cssselect")
5841 (version "0.9.2")
5842 (source
5843 (origin
5844 (method url-fetch)
5845 (uri (pypi-uri "cssselect" version))
5846 (sha256
5847 (base32
5848 "1xg6gbva1yswghiycmgincv6ab4bn7hpm720ndbj40h8xycmnfvi"))))
5849 (build-system python-build-system)
5850 (arguments
5851 ;; tests fail with message
5852 ;; AttributeError: 'module' object has no attribute 'tests'
5853 `(#:tests? #f))
5854 (home-page
5855 "https://pythonhosted.org/cssselect/")
5856 (synopsis
5857 "CSS3 selector parser and translator to XPath 1.0")
5858 (description
5859 "Cssselect ia a Python module that parses CSS3 Selectors and translates
5860 them to XPath 1.0 expressions. Such expressions can be used in lxml or
5861 another XPath engine to find the matching elements in an XML or HTML document.")
5862 (license license:bsd-3)))
5863
5864 (define-public python2-cssselect
5865 (package-with-python2 python-cssselect))
5866
5867 (define-public python-openid-cla
5868 (package
5869 (name "python-openid-cla")
5870 (version "1.2")
5871 (source
5872 (origin
5873 (method url-fetch)
5874 (uri (pypi-uri "python-openid-cla" version))
5875 (sha256
5876 (base32
5877 "102hy2qisvjxp5s0v9lvwqi4f2dk0dhns40vjgn008yxc7k0h3cr"))))
5878 (build-system python-build-system)
5879 (arguments '(#:tests? #f)) ; No tests.
5880 (home-page "https://github.com/puiterwijk/python-openid-cla/")
5881 (synopsis "Implementation of the OpenID CLA extension for python-openid")
5882 (description "@code{openid-cla} is an implementation of the OpenID
5883 contributor license agreement extension for python-openid.")
5884 (license license:bsd-3)))
5885
5886 (define-public python2-openid-cla
5887 (package-with-python2 python-openid-cla))
5888
5889 (define-public python-openid-teams
5890 (package
5891 (name "python-openid-teams")
5892 (version "1.1")
5893 (source
5894 (origin
5895 (method url-fetch)
5896 (uri (pypi-uri "python-openid-teams" version))
5897 (sha256
5898 (base32
5899 "05zrh78alav24rxkbqlpbad6d3x2nljk6z6j7kflxf3vdqa7w969"))))
5900 (build-system python-build-system)
5901 (arguments '(#:tests? #f)) ; No tests.
5902 (home-page "https://github.com/puiterwijk/python-openid-teams/")
5903 (synopsis "Implementation of the OpenID teams extension for python-openid")
5904 (description
5905 "@code{openid-teams} is an implementation of the OpenID
5906 teams extension for python-openid.")
5907 (license license:bsd-3)))
5908
5909 (define-public python2-openid-teams
5910 (package-with-python2 python-openid-teams))
5911
5912 (define-public python-netifaces
5913 (package
5914 (name "python-netifaces")
5915 (version "0.10.4")
5916 (source
5917 (origin
5918 (method url-fetch)
5919 (uri (string-append
5920 "https://pypi.python.org/packages/source/n/netifaces/netifaces-"
5921 version
5922 ".tar.gz"))
5923 (sha256
5924 (base32
5925 "1plw237a4zib4z8s62g0mrs8gm3kjfrp5sxh6bbk9nl3rdls2mln"))))
5926 (build-system python-build-system)
5927 (home-page
5928 "https://bitbucket.org/al45tair/netifaces")
5929 (synopsis
5930 "Python module for portable network interface information")
5931 (description
5932 "Netifaces is a Python module providing information on network
5933 interfaces in an easy and portable manner.")
5934 (license license:expat)))
5935
5936 (define-public python2-netifaces
5937 (package-with-python2 python-netifaces))
5938
5939 (define-public python-networkx
5940 (package
5941 (name "python-networkx")
5942 (version "1.11")
5943 (source
5944 (origin
5945 (method url-fetch)
5946 (uri (pypi-uri "networkx" version))
5947 (sha256
5948 (base32 "1f74s56xb4ggixiq0vxyfxsfk8p20c7a099lpcf60izv1php03hd"))))
5949 (build-system python-build-system)
5950 ;; python-decorator is needed at runtime
5951 (propagated-inputs
5952 `(("python-decorator" ,python-decorator)))
5953 (native-inputs
5954 `(("python-nose" ,python-nose)))
5955 (home-page "http://networkx.github.io/")
5956 (synopsis "Python module for creating and manipulating graphs and networks")
5957 (description
5958 "NetworkX is a Python package for the creation, manipulation, and study
5959 of the structure, dynamics, and functions of complex networks.")
5960 (license license:bsd-3)))
5961
5962 (define-public python2-networkx
5963 (package-with-python2 python-networkx))
5964
5965 (define-public snakemake
5966 (package
5967 (name "snakemake")
5968 (version "3.11.2")
5969 (source
5970 (origin
5971 (method url-fetch)
5972 (uri (pypi-uri "snakemake" version))
5973 (sha256
5974 (base32 "0qcp7y9csvanyzh08jppryhd5di8r1z7p0d4wkfg5591pj3bb8zp"))))
5975 (build-system python-build-system)
5976 (arguments
5977 ;; TODO: Package missing test dependencies.
5978 '(#:tests? #f))
5979 (propagated-inputs
5980 `(("python-wrapt" ,python-wrapt)
5981 ("python-requests" ,python-requests)))
5982 (home-page "https://bitbucket.org/snakemake/snakemake/wiki/Home")
5983 (synopsis "Python-based execution environment for make-like workflows")
5984 (description
5985 "Snakemake aims to reduce the complexity of creating workflows by
5986 providing a clean and modern domain specific specification language (DSL) in
5987 Python style, together with a fast and comfortable execution environment.")
5988 (license license:expat)))
5989
5990 (define-public python-seaborn
5991 (package
5992 (name "python-seaborn")
5993 (version "0.7.1")
5994 (source
5995 (origin
5996 (method url-fetch)
5997 (uri (pypi-uri "seaborn" version))
5998 (sha256
5999 (base32 "0pawrqc3mxpwd5g9pvi9gba02637bh5c8ldpp8izfwpfn52469zs"))))
6000 (build-system python-build-system)
6001 (arguments
6002 '(#:tests? #f)) ; Tests requires a running X11 server.
6003 (propagated-inputs
6004 `(("python-pandas" ,python-pandas)
6005 ("python-matplotlib" ,python-matplotlib)
6006 ("python-scipy" ,python-scipy)))
6007 (home-page "http://stanford.edu/~mwaskom/software/seaborn/")
6008 (synopsis "Statistical data visualization")
6009 (description
6010 "Seaborn is a library for making attractive and informative statistical
6011 graphics in Python. It is built on top of matplotlib and tightly integrated
6012 with the PyData stack, including support for numpy and pandas data structures
6013 and statistical routines from scipy and statsmodels.")
6014 (license license:bsd-3)
6015 (properties `((python2-variant . ,(delay python2-seaborn))))))
6016
6017 (define-public python2-seaborn
6018 (let ((base (package-with-python2 (strip-python2-variant python-seaborn))))
6019 (package
6020 (inherit base)
6021 (propagated-inputs `(("python2-pytz" ,python2-pytz)
6022 ,@(package-propagated-inputs base))))))
6023
6024 (define-public python-mpmath
6025 (package
6026 (name "python-mpmath")
6027 (version "0.19")
6028 (source (origin
6029 (method url-fetch)
6030 (uri (string-append "http://mpmath.org/files/mpmath-"
6031 version ".tar.gz"))
6032 (sha256
6033 (base32
6034 "08ijsr4ifrqv3cjc26mkw0dbvyygsa99in376hr4b96ddm1gdpb8"))))
6035 (build-system python-build-system)
6036 (arguments
6037 '(#:phases
6038 (modify-phases %standard-phases
6039 (replace 'check
6040 (lambda _
6041 (zero?
6042 (system* "python" "mpmath/tests/runtests.py" "-local")))))))
6043 (home-page "http://mpmath.org")
6044 (synopsis "Arbitrary-precision floating-point arithmetic in python")
6045 (description
6046 "@code{mpmath} can be used as an arbitrary-precision substitute for
6047 Python's float/complex types and math/cmath modules, but also does much
6048 more advanced mathematics.")
6049 (license license:bsd-3)))
6050
6051 (define-public python2-mpmath
6052 (package-with-python2 python-mpmath))
6053
6054 (define-public python-sympy
6055 (package
6056 (name "python-sympy")
6057 (version "1.0")
6058 (source
6059 (origin
6060 (method url-fetch)
6061 (uri (string-append
6062 "https://github.com/sympy/sympy/releases/download/sympy-"
6063 version "/sympy-" version ".tar.gz"))
6064 (sha256
6065 (base32 "1bpzjwr9hrr7w88v4vgnj9lr6vxcldc94si13n8xpr1rv08d5b1y"))))
6066 (build-system python-build-system)
6067 (propagated-inputs
6068 `(("python-mpmath" ,python-mpmath)))
6069 (home-page "http://www.sympy.org/")
6070 (synopsis "Python library for symbolic mathematics")
6071 (description
6072 "SymPy is a Python library for symbolic mathematics. It aims to become a
6073 full-featured computer algebra system (CAS) while keeping the code as simple
6074 as possible in order to be comprehensible and easily extensible.")
6075 (license license:bsd-3)))
6076
6077 (define-public python2-sympy
6078 (package-with-python2 python-sympy))
6079
6080 (define-public python-q
6081 (package
6082 (name "python-q")
6083 (version "2.6")
6084 (source
6085 (origin
6086 (method url-fetch)
6087 (uri (pypi-uri "q" version))
6088 (sha256
6089 (base32
6090 "1mgfazh8fkizh6walra2zv885f3lcgr3nb02v1frfm4p8ddcy3yy"))))
6091 (build-system python-build-system)
6092 (home-page "https://github.com/zestyping/q")
6093 (synopsis "Quick-and-dirty debugging output for tired programmers")
6094 (description
6095 "q is a Python module for \"print\" style of debugging Python code. It
6096 provides convenient short API for print out of values, tracebacks, and
6097 falling into the Python interpreter.")
6098 (license license:asl2.0)))
6099
6100 (define-public python2-q
6101 (package-with-python2 python-q))
6102
6103 (define-public python-testlib
6104 (package
6105 (name "python-testlib")
6106 (version "0.6.5")
6107 (source
6108 (origin
6109 (method url-fetch)
6110 (uri (string-append
6111 "https://pypi.python.org/packages/source/t/testlib/testlib-"
6112 version ".zip"))
6113 (sha256
6114 (base32 "1mz26cxn4x8bbgv0rn0mvj2z05y31rkc8009nvdlb3lam5b4mj3y"))))
6115 (build-system python-build-system)
6116 (native-inputs
6117 `(("unzip" ,unzip))) ; for unpacking the source
6118 (synopsis "Python micro test suite harness")
6119 (description "A micro unittest suite harness for Python.")
6120 (home-page "https://github.com/trentm/testlib")
6121 (license license:expat)))
6122
6123 (define-public python2-testlib
6124 (package-with-python2 python-testlib))
6125
6126 (define-public python2-xlib
6127 (package
6128 (name "python2-xlib")
6129 (version "0.14")
6130 (source (origin
6131 (method url-fetch)
6132 (uri (string-append "mirror://sourceforge/python-xlib/python-xlib"
6133 "/" version "/"
6134 "python-xlib-" version ".tar.gz"))
6135 (sha256
6136 (base32
6137 "1sv0447j0rx8cgs3jhjl695p5pv13ihglcjlrrz1kq05lsvb0wa7"))))
6138 (build-system python-build-system)
6139 (arguments
6140 `(#:python ,python-2 ;Python 2 only
6141 #:tests? #f)) ;no tests
6142 (home-page "http://python-xlib.sourceforge.net/")
6143 (synopsis "Python X11 client library")
6144 (description
6145 "The Python X Library is intended to be a fully functional X client
6146 library for Python programs. It is useful to implement low-level X clients.
6147 It is written entirely in Python.")
6148 (license license:gpl2+)))
6149
6150 (define-public python-singledispatch
6151 (package
6152 (name "python-singledispatch")
6153 (version "3.4.0.3")
6154 (source
6155 (origin
6156 (method url-fetch)
6157 (uri (pypi-uri "singledispatch" version))
6158 (sha256
6159 (base32
6160 "171b7ip0hsq5qm83np40h3phlr36ym18w0lay0a8v08kvy3sy1jv"))))
6161 (build-system python-build-system)
6162 (native-inputs
6163 `(("python-six" ,python-six))) ; required for conversion, not at run-time
6164 (home-page
6165 "http://docs.python.org/3/library/functools.html#functools.singledispatch")
6166 (synopsis "Backport of singledispatch feature from Python 3.4")
6167 (description
6168 "This library brings functools.singledispatch from Python 3.4 to Python
6169 2.6-3.3.")
6170 (license license:expat)))
6171
6172 (define-public python2-singledispatch
6173 (package-with-python2 python-singledispatch))
6174
6175 (define-public python-tornado
6176 (package
6177 (name "python-tornado")
6178 (version "4.5.1")
6179 (source
6180 (origin
6181 (method url-fetch)
6182 (uri (pypi-uri "tornado" version))
6183 (sha256
6184 (base32 "1zbkgcdfq81k298awrm8p0xwbwwn2p3nbizdglzfbkskhai082fv"))))
6185 (build-system python-build-system)
6186 (arguments
6187 '(;; FIXME: Two tests error out with:
6188 ;; AssertionError: b'Error in atexit._run_exitfuncs:\nFileNotF[44 chars]ry\n' != b''
6189 ;; #:phases
6190 ;; (modify-phases %standard-phases
6191 ;; (replace 'check
6192 ;; (lambda _
6193 ;; ;; 'setup.py test' hits an AssertionError on BSD-specific
6194 ;; ;; "tornado/platform/kqueue.py". This is the supported method:
6195 ;; (zero? (system* "python" "-m" "tornado.test")))))
6196 #:tests? #f))
6197 (native-inputs
6198 `(("python-certifi" ,python-certifi)))
6199 (propagated-inputs
6200 `(("python-backports-abc" ,python-backports-abc)))
6201 (home-page "http://www.tornadoweb.org/")
6202 (synopsis "Python web framework and asynchronous networking library")
6203 (description
6204 "Tornado is a Python web framework and asynchronous networking library,
6205 originally developed at FriendFeed. By using non-blocking network I/O,
6206 Tornado can scale to tens of thousands of open connections, making it ideal
6207 for long polling, WebSockets, and other applications that require a long-lived
6208 connection to each user.")
6209 (license license:asl2.0)
6210 (properties `((python2-variant . ,(delay python2-tornado))))))
6211
6212 (define-public python2-tornado
6213 (let ((tornado (package-with-python2 (strip-python2-variant python-tornado))))
6214 (package (inherit tornado)
6215 (propagated-inputs
6216 `(("python2-backport-ssl-match-hostname"
6217 ,python2-backport-ssl-match-hostname)
6218 ("python2-singledispatch" ,python2-singledispatch)
6219 ,@(package-propagated-inputs tornado))))))
6220
6221 ;; the python- version can be removed with python-3.5
6222 (define-public python-backports-abc
6223 (package
6224 (name "python-backports-abc")
6225 (version "0.5")
6226 (source
6227 (origin
6228 (method url-fetch)
6229 (uri (pypi-uri "backports_abc" version))
6230 (sha256
6231 (base32
6232 "1pkv8d1zxj5f9i227dxbjczncbv7ks7ywnjwyxfjagm02i2yafq3"))))
6233 (build-system python-build-system)
6234 (home-page "https://github.com/cython/backports_abc")
6235 (synopsis "Backport of additions to the 'collections.abc' module")
6236 (description
6237 "Python-backports-abc provides a backport of additions to the
6238 'collections.abc' module in Python-3.5.")
6239 (license license:psfl)))
6240
6241 (define-public python2-backports-abc
6242 (package-with-python2 python-backports-abc))
6243
6244 (define-public python2-backports-shutil-get-terminal-size
6245 (package
6246 (name "python2-backports-shutil-get-terminal-size")
6247 (version "1.0.0")
6248 (source
6249 (origin
6250 (method url-fetch)
6251 (uri (pypi-uri "backports.shutil_get_terminal_size" version))
6252 (sha256
6253 (base32
6254 "107cmn7g3jnbkp826zlj8rrj19fam301qvaqf0f3905f5217lgki"))))
6255 (build-system python-build-system)
6256 (arguments
6257 `(#:python ,python-2
6258 #:phases
6259 (modify-phases %standard-phases
6260 (replace 'check
6261 (lambda _
6262 (zero? (system* "py.test" "-v")))))))
6263 (native-inputs
6264 `(("python2-pytest" ,python2-pytest)))
6265 (home-page "https://github.com/chrippa/backports.shutil_get_terminal_size")
6266 (synopsis "Backport of Python 3.3's @code{shutil.get_terminal_size}")
6267 (description
6268 "This package provides a backport of the @code{get_terminal_size
6269 function} from Python 3.3's @code{shutil}.
6270 Unlike the original version it is written in pure Python rather than C,
6271 so it might be a tiny bit slower.")
6272 (license license:expat)))
6273
6274 (define-public python-waf
6275 (package
6276 (name "python-waf")
6277 (version "1.9.8")
6278 (source (origin
6279 (method url-fetch)
6280 (uri (string-append "https://waf.io/"
6281 "waf-" version ".tar.bz2"))
6282 (sha256
6283 (base32
6284 "0wl4cnmp06lfxqjxaan58bqxn27smhydz0sg5prrfbl3bsw4gv6q"))))
6285 (build-system python-build-system)
6286 (arguments
6287 '(#:phases
6288 (modify-phases %standard-phases
6289 (replace 'build
6290 (lambda _
6291 (zero? (system* "python" "waf-light" "configure" "build"))))
6292 (replace 'check
6293 (lambda _
6294 (zero? (system* "python" "waf" "--version"))))
6295 (replace 'install
6296 (lambda _
6297 (copy-file "waf" %output))))))
6298 (home-page "https://waf.io/")
6299 (synopsis "Python-based build system")
6300 (description
6301 "Waf is a Python-based framework for configuring, compiling and installing
6302 applications.")
6303 (license license:bsd-3)))
6304
6305 (define-public python2-waf
6306 (package-with-python2 python-waf))
6307
6308 (define-public python-pyzmq
6309 (package
6310 (name "python-pyzmq")
6311 (version "15.1.0")
6312 (source
6313 (origin
6314 (method url-fetch)
6315 (uri (pypi-uri "pyzmq" version))
6316 (sha256
6317 (base32 "13fhwnlvsvxv72kfhqbpn6qi7msh8mc8377mpabv32skk2cjfnxx"))))
6318 (build-system python-build-system)
6319 (arguments
6320 `(#:configure-flags
6321 (list (string-append "--zmq=" (assoc-ref %build-inputs "zeromq")))
6322 ;; FIXME: You must build pyzmq with 'python setup.py build_ext
6323 ;; --inplace' for 'python setup.py test' to work.
6324 #:tests? #f))
6325 (inputs
6326 `(("zeromq" ,zeromq)))
6327 (native-inputs
6328 `(("pkg-config" ,pkg-config)
6329 ("python-nose" ,python-nose)))
6330 (home-page "https://github.com/zeromq/pyzmq")
6331 (synopsis "Python bindings for 0MQ")
6332 (description
6333 "PyZMQ is the official Python binding for the ZeroMQ messaging library.")
6334 (license license:bsd-4)))
6335
6336 (define-public python2-pyzmq
6337 (package-with-python2 python-pyzmq))
6338
6339 (define-public python-pep8
6340 (package
6341 (name "python-pep8")
6342 (version "1.7.0")
6343 (source
6344 (origin
6345 (method url-fetch)
6346 (uri (pypi-uri "pep8" version))
6347 (sha256
6348 (base32
6349 "002rkl4lsn6x2mxmf8ar00l0m8i3mzrc6pnzz77blyksmpsxa4x1"))))
6350 (build-system python-build-system)
6351 (home-page "http://pep8.readthedocs.org/")
6352 (synopsis "Python style guide checker")
6353 (description
6354 "This tools checks Python code against some of the style conventions in
6355 PEP 8.")
6356 (license license:expat)))
6357
6358 (define-public python2-pep8
6359 (package-with-python2 python-pep8))
6360
6361 (define-public python-pyflakes
6362 (package
6363 (name "python-pyflakes")
6364 (version "1.0.0")
6365 (source
6366 (origin
6367 (method url-fetch)
6368 (uri (pypi-uri "pyflakes" version))
6369 (sha256
6370 (base32
6371 "0qs2sgqszq7wcplis8509wk2ygqcrwzbs1ghfj3svvivq2j377pk"))))
6372 (build-system python-build-system)
6373 (home-page
6374 "https://github.com/pyflakes/pyflakes")
6375 (synopsis "Passive checker of Python programs")
6376 (description
6377 "Pyflakes statically checks Python source code for common errors.")
6378 (license license:expat)))
6379
6380 (define-public python2-pyflakes
6381 (package-with-python2 python-pyflakes))
6382
6383 (define-public python-mccabe
6384 (package
6385 (name "python-mccabe")
6386 (version "0.4.0")
6387 (source
6388 (origin
6389 (method url-fetch)
6390 (uri (pypi-uri "mccabe" version))
6391 (sha256
6392 (base32
6393 "0yr08a36h8lqlif10l4xcikbbig7q8f41gqywir7rrvnv3mi4aws"))))
6394 (build-system python-build-system)
6395 (native-inputs
6396 `(("python-pytest" ,python-pytest)
6397 ("python-pytest-runner" ,python-pytest-runner)))
6398 (home-page "https://github.com/flintwork/mccabe")
6399 (synopsis "McCabe checker, plugin for flake8")
6400 (description
6401 "This package provides a Flake8 plug-in to compute the McCabe cyclomatic
6402 complexity of Python source code.")
6403 (license license:expat)))
6404
6405 (define-public python2-mccabe
6406 (package-with-python2 python-mccabe))
6407
6408 (define-public python-mccabe-0.2.1
6409 (package (inherit python-mccabe)
6410 (version "0.2.1")
6411 (source
6412 (origin
6413 (method url-fetch)
6414 (uri (pypi-uri "mccabe" version))
6415 (sha256
6416 (base32
6417 "0fi4a81kr5bcv5p4xgibqr595hyj5dafkqgsmfk96mfy8w71fajs"))))))
6418
6419 (define-public python2-mccabe-0.2.1
6420 (package-with-python2 python-mccabe-0.2.1))
6421
6422 ;; Flake8 2.4.1 requires an older version of pep8.
6423 ;; This should be removed ASAP.
6424 (define-public python-pep8-1.5.7
6425 (package (inherit python-pep8)
6426 (version "1.5.7")
6427 (source
6428 (origin
6429 (method url-fetch)
6430 (uri (string-append
6431 "https://pypi.python.org/packages/source/p/pep8/pep8-"
6432 version
6433 ".tar.gz"))
6434 (sha256
6435 (base32
6436 "12b9bbdbwnspxgak14xg58c130x2n0blxzlms5jn2dszn8qj3d0m"))))
6437 (arguments
6438 ;; XXX Tests not compatible with Python 3.5.
6439 '(#:tests? #f))))
6440
6441 (define-public python2-pep8-1.5.7
6442 (package-with-python2 python-pep8-1.5.7))
6443
6444 ;; Flake8 2.4.1 requires an older version of pyflakes.
6445 ;; This should be removed ASAP.
6446 (define-public python-pyflakes-0.8.1
6447 (package (inherit python-pyflakes)
6448 (version "0.8.1")
6449 (source
6450 (origin
6451 (method url-fetch)
6452 (uri (string-append
6453 "https://pypi.python.org/packages/source/p/pyflakes/pyflakes-"
6454 version
6455 ".tar.gz"))
6456 (sha256
6457 (base32
6458 "0sbpq6pqm1i9wqi41mlfrsc5rk92jv4mskvlyxmnhlbdnc80ma1z"))))
6459 (arguments
6460 ;; XXX Tests not compatible with Python 3.5.
6461 '(#:tests? #f))))
6462
6463 (define-public python2-pyflakes-0.8.1
6464 (package-with-python2 python-pyflakes-0.8.1))
6465
6466 (define-public python-flake8
6467 (package
6468 (name "python-flake8")
6469 (version "2.5.4")
6470 (source
6471 (origin
6472 (method url-fetch)
6473 (uri (pypi-uri "flake8" version))
6474 (sha256
6475 (base32
6476 "0bs9cz4fr99r2rwig1b8jwaadl1nan7kgpdzqwj0bwbckwbmh7nc"))
6477 (modules '((guix build utils)))
6478 (snippet
6479 '(begin
6480 ;; Remove pre-compiled .pyc files from source.
6481 (for-each delete-file-recursively
6482 (find-files "." "__pycache__" #:directories? #t))
6483 (for-each delete-file (find-files "." "\\.pyc$"))
6484 #t))))
6485 (build-system python-build-system)
6486 (propagated-inputs
6487 `(("python-pep8" ,python-pep8)
6488 ("python-pyflakes" ,python-pyflakes)
6489 ("python-mccabe" ,python-mccabe)))
6490 (native-inputs
6491 `(("python-mock" ,python-mock) ; TODO: only required for < 3.3
6492 ("python-nose" ,python-nose)))
6493 (home-page "https://gitlab.com/pycqa/flake8")
6494 (synopsis
6495 "The modular source code checker: pep8, pyflakes and co")
6496 (description
6497 "Flake8 is a wrapper around PyFlakes, pep8 and python-mccabe.")
6498 (license license:expat)))
6499
6500 (define-public python2-flake8
6501 (package-with-python2 python-flake8))
6502
6503 ;; This will only be needed by the python-hacking package and will not be
6504 ;; necessary once python-hacking > 0.10.2 is released.
6505 (define-public python-flake8-2.2.4
6506 (package (inherit python-flake8)
6507 (propagated-inputs
6508 `(("python-pep8" ,python-pep8-1.5.7)
6509 ("python-pyflakes" ,python-pyflakes-0.8.1)
6510 ("python-mccabe" ,python-mccabe-0.2.1)))
6511 (native-inputs
6512 `(("python-mock" ,python-mock)
6513 ("python-nose" ,python-nose)))
6514 (version "2.2.4")
6515 (source
6516 (origin
6517 (method url-fetch)
6518 (uri (pypi-uri "flake8" version))
6519 (sha256
6520 (base32
6521 "1r9wsry4va45h1rck5hxd3vzsg2q3y6lnl6pym1bxvz8ry19jwx8"))
6522 (modules '((guix build utils)))
6523 (snippet
6524 '(begin
6525 ;; Remove pre-compiled .pyc files from source.
6526 (for-each delete-file-recursively
6527 (find-files "." "__pycache__" #:directories? #t))
6528 (for-each delete-file (find-files "." "\\.pyc$"))
6529 #t))))
6530 (arguments
6531 ;; XXX Fails with Python 3.5.
6532 '(#:tests? #f))))
6533
6534 (define-public python2-flake8-2.2.4
6535 (package-with-python2 python-flake8-2.2.4))
6536
6537 (define-public python-flake8-polyfill
6538 (package
6539 (name "python-flake8-polyfill")
6540 (version "1.0.1")
6541 (source
6542 (origin
6543 (method url-fetch)
6544 (uri (pypi-uri "flake8-polyfill" version))
6545 (sha256
6546 (base32
6547 "02gn2wxvh9vnf7m7dld7ca4l60mg5c370hv3swwppkngwaqmcw67"))))
6548 (build-system python-build-system)
6549 (arguments
6550 '(#:phases
6551 (modify-phases %standard-phases
6552 (replace 'check
6553 (lambda _
6554 (setenv "PYTHONPATH"
6555 (string-append (getcwd) "/build/lib:"
6556 (getenv "PYTHONPATH")))
6557 (zero? (system* "py.test" "-v")))))))
6558 (native-inputs
6559 `(("python-flake8" ,python-flake8)
6560 ("python-mock" ,python-mock)
6561 ("python-pycodestyle" ,python-pycodestyle)
6562 ("python-pytest" ,python-pytest)))
6563 (home-page "https://gitlab.com/pycqa/flake8-polyfill")
6564 (synopsis "Polyfill package for Flake8 plugins")
6565 (description
6566 "This package that provides some compatibility helpers for Flake8
6567 plugins that intend to support Flake8 2.x and 3.x simultaneously.")
6568 (license license:expat)))
6569
6570 (define-public python2-flake8-polyfill
6571 (package-with-python2 python-flake8-polyfill))
6572
6573 (define-public python-mistune
6574 (package
6575 (name "python-mistune")
6576 (version "0.7.3")
6577 (source
6578 (origin
6579 (method url-fetch)
6580 (uri (pypi-uri "mistune" version))
6581 (sha256
6582 (base32
6583 "04xpk1zvslhq3xpnf01g3ag0dy9wfv4z28p093r8k49vvxlyil11"))))
6584 (build-system python-build-system)
6585 (native-inputs
6586 `(("python-nose" ,python-nose)
6587 ("python-cython" ,python-cython)))
6588 (home-page "https://github.com/lepture/mistune")
6589 (synopsis "Markdown parser in pure Python")
6590 (description "This package provides a fast markdown parser in pure
6591 Python.")
6592 (license license:bsd-3)))
6593
6594 (define-public python2-mistune
6595 (package-with-python2 python-mistune))
6596
6597 (define-public python-markdown
6598 (package
6599 (name "python-markdown")
6600 (version "2.6.8")
6601 (source
6602 (origin
6603 (method url-fetch)
6604 (uri (pypi-uri "Markdown" version))
6605 (sha256
6606 (base32
6607 "0cqfhr1km2s5d8jm6hbwgkrrj9hvkjf2gab3s2axlrw1clgaij0a"))))
6608 (build-system python-build-system)
6609 (arguments
6610 `(#:phases
6611 (modify-phases %standard-phases
6612 (replace 'check
6613 (lambda _
6614 (zero? (system* "python" "run-tests.py")))))))
6615 (native-inputs
6616 `(("python-nose" ,python-nose)
6617 ("python-pyyaml" ,python-pyyaml)))
6618 (home-page "https://pythonhosted.org/Markdown/")
6619 (synopsis "Python implementation of Markdown")
6620 (description
6621 "This package provides a Python implementation of John Gruber's
6622 Markdown. The library features international input, various Markdown
6623 extensions, and several HTML output formats. A command line wrapper
6624 markdown_py is also provided to convert Markdown files to HTML.")
6625 (license license:bsd-3)))
6626
6627 (define-public python2-markdown
6628 (package-with-python2 python-markdown))
6629
6630 (define-public python-ptyprocess
6631 (package
6632 (name "python-ptyprocess")
6633 (version "0.5.1")
6634 (source
6635 (origin
6636 (method url-fetch)
6637 (uri (string-append
6638 "https://pypi.python.org/packages/source/p/ptyprocess/ptyprocess-"
6639 version ".tar.gz"))
6640 (sha256
6641 (base32
6642 "19l1xrjn4l9gjz01s3vg92gn2dd9d8mw1v86ppkzlnr9m5iwwc05"))))
6643 (build-system python-build-system)
6644 (native-inputs
6645 `(("python-nose" ,python-nose)))
6646 (arguments
6647 `(#:phases
6648 (modify-phases %standard-phases
6649 (replace 'check
6650 (lambda _
6651 (zero? (system* "nosetests")))))))
6652 (home-page "https://github.com/pexpect/ptyprocess")
6653 (synopsis "Run a subprocess in a pseudo terminal")
6654 (description
6655 "This package provides a Python library used to launch a subprocess in a
6656 pseudo terminal (pty), and interact with both the process and its pty.")
6657 (license license:isc)))
6658
6659 (define-public python2-ptyprocess
6660 (package-with-python2 python-ptyprocess))
6661
6662 (define-public python-cram
6663 (package
6664 (name "python-cram")
6665 (version "0.7")
6666 (home-page "https://bitheap.org/cram/")
6667 (source (origin
6668 (method url-fetch)
6669 (uri (list (string-append home-page "cram-"
6670 version ".tar.gz")
6671 (pypi-uri "cram" version)))
6672 (sha256
6673 (base32
6674 "0bvz6fwdi55rkrz3f50zsy35gvvwhlppki2yml5bj5ffy9d499vx"))))
6675 (arguments
6676 '(#:phases
6677 (modify-phases %standard-phases
6678 (add-after 'unpack 'patch-source
6679 (lambda _
6680 (substitute* (find-files "cram" ".*\\.py$")
6681 ;; Replace default shell path.
6682 (("/bin/sh") (which "sh")))
6683 (substitute* (find-files "tests" ".*\\.t$")
6684 (("md5") "md5sum")
6685 (("/bin/bash") (which "bash"))
6686 (("/bin/sh") (which "sh")))
6687 (substitute* "cram/_test.py"
6688 ;; This hack works around a bug triggered by substituting
6689 ;; the /bin/sh paths. "tests/usage.t" compares the output of
6690 ;; "cram -h", which breaks the output at 80 characters. This
6691 ;; causes the line showing the default shell to break into two
6692 ;; lines, but the test expects a single line...
6693 (("env\\['COLUMNS'\\] = '80'")
6694 "env['COLUMNS'] = '160'"))
6695 #t))
6696 (delete 'check)
6697 (add-after 'install 'check
6698 ;; The test phase uses the built library and executable.
6699 ;; It's easier to run it after install since the build
6700 ;; directory contains version-specific PATH.
6701 (lambda* (#:key inputs outputs #:allow-other-keys)
6702 (add-installed-pythonpath inputs outputs)
6703 (setenv "PATH" (string-append (getenv "PATH") ":"
6704 (assoc-ref outputs "out") "/bin"))
6705 (zero? (system* "make" "test")))))))
6706 (build-system python-build-system)
6707 (native-inputs
6708 `(("python-coverage" ,python-coverage)
6709 ("which" ,which)))
6710 (synopsis "Simple testing framework for command line applications")
6711 (description
6712 "Cram is a functional testing framework for command line applications.
6713 Cram tests look like snippets of interactive shell sessions. Cram runs each
6714 command and compares the command output in the test with the command’s actual
6715 output.")
6716 (license license:gpl2+)))
6717
6718 (define-public python2-cram
6719 (package-with-python2 python-cram))
6720
6721 (define-public python-terminado
6722 (package
6723 (name "python-terminado")
6724 (version "0.6")
6725 (source
6726 (origin
6727 (method url-fetch)
6728 (uri (pypi-uri "terminado" version))
6729 (sha256
6730 (base32
6731 "09h1kwi86g5mrk14s4pgbhshd602zry29lnpxamcqz864kva22rc"))))
6732 (build-system python-build-system)
6733 (propagated-inputs
6734 `(("python-tornado" ,python-tornado)
6735 ("python-ptyprocess" ,python-ptyprocess)))
6736 (native-inputs
6737 `(("python-nose" ,python-nose)))
6738 (arguments
6739 `(#:phases
6740 (modify-phases %standard-phases
6741 (replace 'check
6742 (lambda _
6743 (zero? (system* "nosetests")))))))
6744 (home-page "https://github.com/takluyver/terminado")
6745 (synopsis "Terminals served to term.js using Tornado websockets")
6746 (description "This package provides a Tornado websocket backend for the
6747 term.js Javascript terminal emulator library.")
6748 (license license:bsd-2)
6749 (properties `((python2-variant . ,(delay python2-terminado))))))
6750
6751 (define-public python2-terminado
6752 (let ((terminado (package-with-python2 (strip-python2-variant python-terminado))))
6753 (package (inherit terminado)
6754 (propagated-inputs
6755 `(("python2-backport-ssl-match-hostname"
6756 ,python2-backport-ssl-match-hostname)
6757 ,@(package-propagated-inputs terminado))))))
6758
6759 (define-public python-straight-plugin
6760 (package
6761 (name "python-straight-plugin")
6762 (version "1.4.1")
6763 (source
6764 (origin
6765 (method url-fetch)
6766 (uri (pypi-uri "straight.plugin" version))
6767 (sha256
6768 (base32
6769 "069pjll4383p4kkgvcc40hgyvf79j2wdbpgwz77yigzxksh1gj62"))))
6770 (build-system python-build-system)
6771 (home-page "https://github.com/ironfroggy/straight.plugin")
6772 (synopsis "Simple namespaced plugin facility")
6773 (description "Straight Plugin provides a type of plugin you can create from
6774 almost any existing Python modules, and an easy way for outside developers to
6775 add functionality and customization to your projects with their own plugins.")
6776 (license license:expat)))
6777
6778 (define-public python2-straight-plugin
6779 (package-with-python2 python-straight-plugin))
6780
6781 (define-public python-fonttools
6782 (package
6783 (name "python-fonttools")
6784 (version "2.5")
6785 (source (origin
6786 (method url-fetch)
6787 (uri (string-append
6788 "https://pypi.python.org/packages/source/F/FontTools/"
6789 "fonttools-" version ".tar.gz"))
6790 (sha256
6791 (base32
6792 "08ay3x4ijarwhl60gqx2i9jzq6pxs20p4snc2d1q5jagh4rn39lb"))))
6793 (build-system python-build-system)
6794 (arguments
6795 '(#:test-target "check"
6796 #:phases
6797 (modify-phases %standard-phases
6798 (add-after 'unpack 'patch-setuppy
6799 ;; Remove the undocumented "extra_path" argument, which adds an
6800 ;; intervening directories between site-packages and the package
6801 ;; directory.
6802 (lambda _
6803 (substitute* "setup.py"
6804 (("^[ \t]*extra_path *= *'FontTools',") ""))
6805 #t)))))
6806 (home-page "https://github.com/behdad/fonttools")
6807 (synopsis "Tools to manipulate font files")
6808 (description
6809 "FontTools/TTX is a library to manipulate font files from Python. It
6810 supports reading and writing of TrueType/OpenType fonts, reading and writing
6811 of AFM files, reading (and partially writing) of PS Type 1 fonts. The package
6812 also contains a tool called “TTX” which converts TrueType/OpenType fonts to and
6813 from an XML-based format.")
6814 (license (license:non-copyleft
6815 "file://LICENSE.txt"
6816 "See LICENSE.txt in the distribution."))))
6817
6818 (define-public python2-fonttools
6819 (package-with-python2 python-fonttools))
6820
6821 (define-public python-ly
6822 (package
6823 (name "python-ly")
6824 (version "0.9.4")
6825 (source
6826 (origin
6827 (method url-fetch)
6828 (uri (string-append "https://pypi.python.org/packages/57/4f/"
6829 "889579244947368f28eda66b782331b1e75f83fd72e63f9ece93cd7a18f9"
6830 "/python-ly-" version ".tar.gz"))
6831 (sha256
6832 (base32
6833 "0g6n288l83sfwavxh1aryi0aqvsr3sp7v6f903mckwqa4scpky62"))))
6834 (build-system python-build-system)
6835 (arguments
6836 ;; FIXME: Some tests need network access.
6837 '(#:tests? #f))
6838 (synopsis "Tool and library for manipulating LilyPond files")
6839 (description "This package provides a Python library to parse, manipulate
6840 or create documents in LilyPond format. A command line program ly is also
6841 provided that can be used to do various manipulations with LilyPond files.")
6842 (home-page "https://pypi.python.org/pypi/python-ly")
6843 (license license:gpl2+)))
6844
6845 (define-public python-appdirs
6846 (package
6847 (name "python-appdirs")
6848 (version "1.4.3")
6849 (source
6850 (origin
6851 (method url-fetch)
6852 (uri (pypi-uri "appdirs" version))
6853 (sha256
6854 (base32
6855 "14id6wxi12lgyw0mg3bcfnf888ad07jz9yj46gfzhn186z8rcn4y"))))
6856 (build-system python-build-system)
6857 (home-page "https://github.com/ActiveState/appdirs")
6858 (synopsis
6859 "Determine platform-specific dirs, e.g. a \"user data dir\"")
6860 (description
6861 "This module provides a portable way of finding out where user data
6862 should be stored on various operating systems.")
6863 (license license:expat)))
6864
6865 (define-public python2-appdirs
6866 (package-with-python2 python-appdirs))
6867
6868 (define-public python-llfuse
6869 (package
6870 (name "python-llfuse")
6871 (version "1.2")
6872 (source (origin
6873 (method url-fetch)
6874 (uri (string-append
6875 "https://bitbucket.org/nikratio/python-llfuse/downloads/"
6876 "llfuse-" version ".tar.bz2"))
6877 (sha256
6878 (base32
6879 "11hms1x68bf1bqbqy7w3wpffqsd3jkgricmzrc1hrnwkswfzzlr4"))))
6880 (build-system python-build-system)
6881 (inputs
6882 `(("fuse" ,fuse)
6883 ("attr" ,attr)))
6884 (native-inputs
6885 `(("pkg-config" ,pkg-config)))
6886 (synopsis "Python bindings for FUSE")
6887 (description
6888 "Python-LLFUSE is a set of Python bindings for the low level FUSE API.")
6889 (home-page "https://bitbucket.org/nikratio/python-llfuse/")
6890 (license license:lgpl2.0+)
6891 (properties `((python2-variant . ,(delay python2-llfuse))))))
6892
6893 (define-public python2-llfuse
6894 (package (inherit (package-with-python2
6895 (strip-python2-variant python-llfuse)))
6896 (propagated-inputs `(("python2-contextlib2" ,python2-contextlib2)))))
6897
6898 ;; For attic-0.16
6899 (define-public python-llfuse-0.41
6900 (package (inherit python-llfuse)
6901 (version "0.41.1")
6902 (source (origin
6903 (method url-fetch)
6904 (uri (string-append
6905 "https://bitbucket.org/nikratio/python-llfuse/downloads/"
6906 "llfuse-" version ".tar.bz2"))
6907 (sha256
6908 (base32
6909 "1imlqw9b73086y97izr036f58pgc5akv4ihc2rrf8j5h75jbrlaa"))))
6910 ;; Python-LLFUSE < 0.42 includes underscore.js, which is MIT (expat)
6911 ;; licensed. The rest of the package is licensed under LGPL2.0 or later.
6912 (license (list license:expat license:lgpl2.0+))))
6913
6914 (define-public python-msgpack
6915 (package
6916 (name "python-msgpack")
6917 (version "0.4.8")
6918 (source (origin
6919 (method url-fetch)
6920 (uri (pypi-uri "msgpack-python" version))
6921 (sha256
6922 (base32
6923 "11pqk5braa6wndpnr1dhg64js82vjgxnm0lzy73rwl831zgijaqs"))))
6924 (build-system python-build-system)
6925 (synopsis "MessagePack (de)serializer")
6926 (description "MessagePack is a fast, compact binary serialization format,
6927 suitable for similar data to JSON. This package provides CPython bindings for
6928 reading and writing MessagePack data.")
6929 (home-page "https://pypi.python.org/pypi/msgpack-python/")
6930 (license license:asl2.0)))
6931
6932 (define-public python2-msgpack
6933 (package-with-python2 python-msgpack))
6934
6935 (define-public python-netaddr
6936 (package
6937 (name "python-netaddr")
6938 (version "0.7.18")
6939 (source
6940 (origin
6941 (method url-fetch)
6942 (uri (string-append
6943 "https://pypi.python.org/packages/source/n/netaddr/netaddr-"
6944 version
6945 ".tar.gz"))
6946 (sha256
6947 (base32
6948 "06dxjlbcicq7q3vqy8agq11ra01kvvd47j4mk6dmghjsyzyckxd1"))))
6949 (build-system python-build-system)
6950 (arguments `(#:tests? #f)) ;; No tests.
6951 (home-page "https://github.com/drkjam/netaddr/")
6952 (synopsis "Pythonic manipulation of network addresses")
6953 (description
6954 "A Python library for representing and manipulating IPv4, IPv6, CIDR, EUI
6955 and MAC network addresses.")
6956 (license license:bsd-3)))
6957
6958 (define-public python2-netaddr
6959 (package-with-python2 python-netaddr))
6960
6961 (define-public python-wrapt
6962 (package
6963 (name "python-wrapt")
6964 (version "1.10.8")
6965 (source
6966 (origin
6967 (method url-fetch)
6968 (uri (pypi-uri "wrapt" version))
6969 (sha256
6970 (base32
6971 "0wrcm1mydvfivbkzz0h81ygzdchnscshi6xvy5n3r21r9s0px8af"))))
6972 (build-system python-build-system)
6973 (arguments
6974 ;; Tests are not included in the tarball, they are only available in the
6975 ;; git repository.
6976 `(#:tests? #f))
6977 (home-page "https://github.com/GrahamDumpleton/wrapt")
6978 (synopsis "Module for decorators, wrappers and monkey patching")
6979 (description
6980 "The aim of the wrapt module is to provide a transparent object proxy for
6981 Python, which can be used as the basis for the construction of function
6982 wrappers and decorator functions.")
6983 (license license:bsd-2)))
6984
6985 (define-public python2-wrapt
6986 (package-with-python2 python-wrapt))
6987
6988 (define-public python-iso8601
6989 (package
6990 (name "python-iso8601")
6991 (version "0.1.11")
6992 (source
6993 (origin
6994 (method url-fetch)
6995 (uri (pypi-uri "iso8601" version))
6996 (sha256
6997 (base32
6998 "0c7gh3lsdjds262h0v1sqc66l7hqgfwbakn96qrhdbl0i3vm5yz8"))))
6999 (build-system python-build-system)
7000 (native-inputs
7001 `(("python-pytest" ,python-pytest)))
7002 (home-page "https://bitbucket.org/micktwomey/pyiso8601")
7003 (synopsis "Module to parse ISO 8601 dates")
7004 (description
7005 "This module parses the most common forms of ISO 8601 date strings (e.g.
7006 @code{2007-01-14T20:34:22+00:00}) into @code{datetime} objects.")
7007 (license license:expat)))
7008
7009 (define-public python2-iso8601
7010 (package-with-python2 python-iso8601))
7011
7012 (define-public python-monotonic
7013 (package
7014 (name "python-monotonic")
7015 (version "0.3")
7016 (source
7017 (origin
7018 (method url-fetch)
7019 (uri (string-append
7020 "https://pypi.python.org/packages/source/m/monotonic/monotonic-"
7021 version
7022 ".tar.gz"))
7023 (sha256
7024 (base32
7025 "0yz0bcbwx8r2c01czzfpbrxddynxyk9k95jj8h6sgcb7xmfvl998"))))
7026 (build-system python-build-system)
7027 (home-page "https://github.com/atdt/monotonic")
7028 (synopsis "Implementation of time.monotonic() for Python 2 & < 3.3")
7029 (description
7030 "This module provides a monotonic() function which returns the value (in
7031 fractional seconds) of a clock which never goes backwards.")
7032 (license license:asl2.0)))
7033
7034 (define-public python2-monotonic
7035 (package-with-python2 python-monotonic))
7036
7037 (define-public python-webob
7038 (package
7039 (name "python-webob")
7040 (version "1.5.1")
7041 (source
7042 (origin
7043 (method url-fetch)
7044 (uri (pypi-uri "WebOb" version))
7045 (sha256
7046 (base32
7047 "02bhhzijfhv8hmi1i54d4b0v43liwhnywhflvxsv4x3zax9s3afq"))))
7048 (build-system python-build-system)
7049 (native-inputs
7050 `(("python-nose" ,python-nose)))
7051 (home-page "http://webob.org/")
7052 (synopsis "WSGI request and response object")
7053 (description
7054 "WebOb provides wrappers around the WSGI request environment, and an
7055 object to help create WSGI responses.")
7056 (license license:expat)))
7057
7058 (define-public python2-webob
7059 (package-with-python2 python-webob))
7060
7061 (define-public python-xlrd
7062 (package
7063 (name "python-xlrd")
7064 (version "1.0.0")
7065 (source (origin
7066 (method url-fetch)
7067 (uri (pypi-uri "xlrd" version))
7068 (sha256
7069 (base32
7070 "0s8hjiz01vbhy85xalrz0qlsmd9ypf36zjqrf97hh984spapvy0g"))))
7071 (build-system python-build-system)
7072 (arguments
7073 `(#:phases
7074 (modify-phases %standard-phases
7075 ;; Current test in setup.py does not work as of 1.0.0, so use nose to
7076 ;; run tests instead for now.
7077 (replace 'check (lambda _ (zero? (system* "nosetests")))))))
7078 (native-inputs `(("python-nose" ,python-nose)))
7079 (home-page "http://www.python-excel.org/")
7080 (synopsis "Library for extracting data from Excel files")
7081 (description "This packages provides a library to extract data from
7082 spreadsheets using Microsoft Excel proprietary file formats @samp{.xls} and
7083 @samp{.xlsx} (versions 2.0 onwards). It has support for Excel dates and is
7084 Unicode-aware. It is not intended as an end-user tool.")
7085 (license license:bsd-3)))
7086
7087 (define-public python2-xlrd
7088 (package-with-python2 python-xlrd))
7089
7090 (define-public python-prettytable
7091 (package
7092 (name "python-prettytable")
7093 (version "0.7.2")
7094 (source
7095 (origin
7096 (method url-fetch)
7097 (uri (string-append
7098 "https://pypi.python.org/packages/source/P/PrettyTable/"
7099 "prettytable-" version ".tar.bz2"))
7100 (sha256
7101 (base32
7102 "0diwsicwmiq2cpzpxri7cyl5fmsvicafw6nfqf6p6p322dji2g45"))))
7103 (build-system python-build-system)
7104 (home-page "http://code.google.com/p/prettytable/")
7105 (synopsis "Display tabular data in an ASCII table format")
7106 (description
7107 "A library designed to represent tabular data in visually appealing ASCII
7108 tables. PrettyTable allows for selection of which columns are to be printed,
7109 independent alignment of columns (left or right justified or centred) and
7110 printing of sub-tables by specifying a row range.")
7111 (license license:bsd-3)))
7112
7113 (define-public python2-prettytable
7114 (package-with-python2 python-prettytable))
7115
7116 (define-public python-tables
7117 (package
7118 (name "python-tables")
7119 (version "3.2.2")
7120 (source
7121 (origin
7122 (method url-fetch)
7123 (uri (pypi-uri "tables" version))
7124 (sha256
7125 (base32
7126 "117s6w7s3yxafpmf3zz3svana7xfrsviw01va1xp7h8ylx8v6r1m"))
7127 (modules '((guix build utils)))
7128 (snippet
7129 '(begin
7130 ;; Remove pre-compiled .pyc files from source.
7131 (for-each delete-file-recursively
7132 (find-files "." "__pycache__" #:directories? #t))
7133 (for-each delete-file (find-files "." "\\.pyc$"))
7134 #t))))
7135 (build-system python-build-system)
7136 (arguments
7137 `(;; FIXME: python-build-system does not pass configure-flags to "build"
7138 ;; or "check", so we must override the build and check phases.
7139 #:phases
7140 (modify-phases %standard-phases
7141 (add-after 'unpack 'use-gcc
7142 (lambda _
7143 (substitute* "setup.py"
7144 (("compiler = new_compiler\\(\\)" line)
7145 (string-append line
7146 "\ncompiler.set_executables(compiler='gcc',"
7147 "compiler_so='gcc',"
7148 "linker_exe='gcc',"
7149 "linker_so='gcc -shared')")))
7150 #t))
7151 (replace 'build
7152 (lambda* (#:key inputs #:allow-other-keys)
7153 (zero? (system* "python" "setup.py" "build"
7154 (string-append "--hdf5="
7155 (assoc-ref inputs "hdf5"))))))
7156 (replace 'check
7157 (lambda* (#:key inputs #:allow-other-keys)
7158 (zero? (system* "python" "setup.py" "check"
7159 (string-append "--hdf5="
7160 (assoc-ref inputs "hdf5")))))))))
7161 (propagated-inputs
7162 `(("python-numexpr" ,python-numexpr)
7163 ("python-numpy" ,python-numpy)))
7164 (native-inputs
7165 `(("python-cython" ,python-cython)
7166 ("pkg-config" ,pkg-config)))
7167 (inputs
7168 `(("hdf5" ,hdf5)
7169 ("bzip2" ,bzip2)
7170 ("zlib" ,zlib)))
7171 (home-page "http://www.pytables.org/")
7172 (synopsis "Hierarchical datasets for Python")
7173 (description "PyTables is a package for managing hierarchical datasets and
7174 designed to efficiently cope with extremely large amounts of data.")
7175 (license license:bsd-3)))
7176
7177 (define-public python2-tables
7178 (package-with-python2 python-tables))
7179
7180 (define-public python-pyasn1
7181 (package
7182 (name "python-pyasn1")
7183 (version "0.2.3")
7184 (source
7185 (origin
7186 (method url-fetch)
7187 (uri (pypi-uri "pyasn1" version))
7188 (sha256
7189 (base32
7190 "1b86yx23c1x74clai05a5ma8c8nfmhlx3j1mxq0ff657i2ylx33k"))))
7191 (build-system python-build-system)
7192 (home-page "http://pyasn1.sourceforge.net/")
7193 (synopsis "ASN.1 types and codecs")
7194 (description
7195 "This is an implementation of ASN.1 types and codecs in Python. It is
7196 suitable for a wide range of protocols based on the ASN.1 specification.")
7197 (license license:bsd-2)))
7198
7199 (define-public python2-pyasn1
7200 (package-with-python2 python-pyasn1))
7201
7202 (define-public python-pyasn1-modules
7203 (package
7204 (name "python-pyasn1-modules")
7205 (version "0.0.8")
7206 (source
7207 (origin
7208 (method url-fetch)
7209 (uri (pypi-uri "pyasn1-modules" version))
7210 (sha256
7211 (base32
7212 "0drqgw81xd3fxdlg89kgd79zzrabvfncvkbybi2wr6w2y4s1jmhh"))))
7213 (build-system python-build-system)
7214 (propagated-inputs
7215 `(("python-pyasn1" ,python-pyasn1)))
7216 (home-page "https://sourceforge.net/projects/pyasn1/")
7217 (synopsis "ASN.1 codec implementations")
7218 (description
7219 "Pyasn1-modules is a collection of Python modules providing ASN.1 types and
7220 implementations of ASN.1-based codecs and protocols.")
7221 (license license:bsd-3)))
7222
7223 (define-public python2-pyasn1-modules
7224 (package-with-python2 python-pyasn1-modules))
7225
7226 (define-public python-ipaddress
7227 (package
7228 (name "python-ipaddress")
7229 (version "1.0.18")
7230 (source (origin
7231 (method url-fetch)
7232 (uri (pypi-uri "ipaddress" version))
7233 (sha256
7234 (base32
7235 "1q8klj9d84cmxgz66073x1j35cplr3r77vx1znhxiwl5w74391ax"))))
7236 (build-system python-build-system)
7237 (home-page "https://github.com/phihag/ipaddress")
7238 (synopsis "IP address manipulation library")
7239 (description
7240 "This package provides a fast, lightweight IPv4/IPv6 manipulation library
7241 in Python. This library is used to create, poke at, and manipulate IPv4 and
7242 IPv6 addresses and networks. This is a port of the Python 3.3 ipaddress
7243 module to older versions of Python.")
7244 (license license:psfl)))
7245
7246 (define-public python2-ipaddress
7247 (package-with-python2 python-ipaddress))
7248
7249 (define-public python2-ipaddr
7250 (package
7251 (name "python2-ipaddr")
7252 (version "2.1.11")
7253 (source
7254 (origin
7255 (method url-fetch)
7256 (uri (pypi-uri "ipaddr" version))
7257 (sha256
7258 (base32 "1dwq3ngsapjc93fw61rp17fvzggmab5x1drjzvd4y4q0i255nm8v"))))
7259 (build-system python-build-system)
7260 (arguments
7261 `(#:python ,python-2 ;version 2 only
7262 #:phases
7263 (modify-phases %standard-phases
7264 (replace 'check
7265 (lambda* _
7266 (zero? (system* "python" "ipaddr_test.py")))))))
7267 (home-page "https://github.com/google/ipaddr-py")
7268 (synopsis "IP address manipulation library")
7269 (description
7270 "Ipaddr is a Python@tie{}2 library for creating and manupilating IPv4 and
7271 IPv6 addresses and networks.
7272
7273 For new implementations you may prefer to use the standard module
7274 @code{ipaddress}, which was introduced in Python 3.3 and backported to older
7275 versions of Python.")
7276 (license license:asl2.0)))
7277
7278 (define-public python-idna
7279 (package
7280 (name "python-idna")
7281 (version "2.5")
7282 (source
7283 (origin
7284 (method url-fetch)
7285 (uri (pypi-uri "idna" version))
7286 (sha256
7287 (base32
7288 "1ara12a7k2zc69msa0arrvw00gn61a6i6by01xb3lkkc0h4cxd9w"))))
7289 (build-system python-build-system)
7290 (home-page "https://github.com/kjd/idna")
7291 (synopsis "Internationalized domain names in applications")
7292 (description
7293 "This is a library to support the Internationalised Domain Names in
7294 Applications (IDNA) protocol as specified in RFC 5891. This version of the
7295 protocol is often referred to as “IDNA2008” and can produce different results
7296 from the earlier standard from 2003. The library is also intended to act as a
7297 suitable drop-in replacement for the “encodings.idna” module that comes with
7298 the Python standard library but currently only supports the older 2003
7299 specification.")
7300 (license license:bsd-4)))
7301
7302 (define-public python2-idna
7303 (package-with-python2 python-idna))
7304
7305 (define-public python-pretend
7306 (package
7307 (name "python-pretend")
7308 (version "1.0.8")
7309 (source
7310 (origin
7311 (method url-fetch)
7312 (uri (string-append "https://pypi.python.org/packages/source/p/"
7313 "pretend/pretend-" version ".tar.gz"))
7314 (sha256
7315 (base32
7316 "0r5r7ygz9m6d2bklflbl84cqhjkc2q12xgis8268ygjh30g2q3wk"))))
7317 (build-system python-build-system)
7318 (home-page "https://github.com/alex/pretend")
7319 (synopsis "Library for stubbing in Python")
7320 (description
7321 "Pretend is a library to make stubbing with Python easier. Stubbing is a
7322 technique for writing tests. You may hear the term mixed up with mocks,
7323 fakes, or doubles. Basically, a stub is an object that returns pre-canned
7324 responses, rather than doing any computation.")
7325 (license license:bsd-3)))
7326
7327 (define-public python2-pretend
7328 (package-with-python2 python-pretend))
7329
7330 (define-public python-cryptography-vectors
7331 (package
7332 (name "python-cryptography-vectors")
7333 (version "1.8.2")
7334 (source
7335 (origin
7336 (method url-fetch)
7337 (uri (pypi-uri "cryptography_vectors" version))
7338 (sha256
7339 (base32
7340 "0hzvq0bfy21bc35p8z7zdxpv3hbvi7adg4axc1b5yd3hk16a1nh0"))))
7341 (build-system python-build-system)
7342 (home-page "https://github.com/pyca/cryptography")
7343 (synopsis "Test vectors for the cryptography package")
7344 (description
7345 "This package contains test vectors for the cryptography package.")
7346 ;; Distributed under either BSD-3 or ASL2.0
7347 (license (list license:bsd-3 license:asl2.0))))
7348
7349 (define-public python2-cryptography-vectors
7350 (package-with-python2 python-cryptography-vectors))
7351
7352 (define-public python-cryptography
7353 (package
7354 (name "python-cryptography")
7355 (version "1.8.2")
7356 (source
7357 (origin
7358 (method url-fetch)
7359 (uri (pypi-uri "cryptography" version))
7360 (sha256
7361 (base32
7362 "1nmy4fw3zy7rlvarkhn33g9905rwpy9z7k5kv8j80f0s6ynfp24f"))))
7363 (build-system python-build-system)
7364 (inputs
7365 `(("openssl" ,openssl)))
7366 (propagated-inputs
7367 `(("python-asn1crypto" ,python-asn1crypto)
7368 ("python-cffi" ,python-cffi)
7369 ("python-six" ,python-six)
7370 ("python-idna" ,python-idna)
7371 ;; Packaging is used to check the version of python-cffi in
7372 ;; 'src/cryptography/hazmat/primitives/ciphers/base.py'. We should be
7373 ;; able to remove this dependency in the next release of cryptography:
7374 ;; python-cryptography:
7375 ;; https://github.com/pyca/cryptography/commit/0417d00d9ff1e19bc3ab67d39bdd18e1674768c1
7376 ("python-packaging" ,python-packaging)
7377 ("python-iso8601" ,python-iso8601)))
7378 (native-inputs
7379 `(("python-cryptography-vectors" ,python-cryptography-vectors)
7380 ("python-hypothesis" ,python-hypothesis)
7381 ("python-pretend" ,python-pretend)
7382 ("python-pytz" ,python-pytz)
7383 ("python-pytest" ,python-pytest-3.0)))
7384 (home-page "https://github.com/pyca/cryptography")
7385 (synopsis "Cryptographic recipes and primitives for Python")
7386 (description
7387 "cryptography is a package which provides cryptographic recipes and
7388 primitives to Python developers. It aims to be the “cryptographic standard
7389 library” for Python. The package includes both high level recipes, and low
7390 level interfaces to common cryptographic algorithms such as symmetric ciphers,
7391 message digests and key derivation functions.")
7392 ;; Distributed under either BSD-3 or ASL2.0
7393 (license (list license:bsd-3 license:asl2.0))
7394 (properties `((python2-variant . ,(delay python2-cryptography))))))
7395
7396 (define-public python2-cryptography
7397 (let ((crypto (package-with-python2
7398 (strip-python2-variant python-cryptography))))
7399 (package (inherit crypto)
7400 (propagated-inputs
7401 `(("python2-ipaddress" ,python2-ipaddress)
7402 ("python2-backport-ssl-match-hostname"
7403 ,python2-backport-ssl-match-hostname)
7404 ("python2-enum34" ,python2-enum34)
7405 ,@(package-propagated-inputs crypto))))))
7406
7407 (define-public python-pyopenssl
7408 (package
7409 (name "python-pyopenssl")
7410 (version "17.0.0")
7411 (source
7412 (origin
7413 (method url-fetch)
7414 (uri (pypi-uri "pyOpenSSL" version))
7415 (sha256
7416 (base32
7417 "1pdg1gpmkzj8yasg6cmkhcivxcdp4c12nif88y4qvsxq5ffzxas8"))
7418 (patches
7419 (search-patches "python-pyopenssl-skip-network-test.patch"))))
7420 (build-system python-build-system)
7421 (arguments
7422 '(#:phases
7423 (modify-phases %standard-phases
7424 (delete 'check)
7425 (add-after 'install 'check
7426 (lambda* (#:key inputs outputs #:allow-other-keys)
7427 (add-installed-pythonpath inputs outputs)
7428 (zero? (system* "py.test" "-v")))))))
7429 (propagated-inputs
7430 `(("python-cryptography" ,python-cryptography)
7431 ("python-six" ,python-six)))
7432 (inputs
7433 `(("openssl" ,openssl)))
7434 (native-inputs
7435 `(("python-pytest" ,python-pytest-3.0)))
7436 (home-page "https://github.com/pyca/pyopenssl")
7437 (synopsis "Python wrapper module around the OpenSSL library")
7438 (description
7439 "PyOpenSSL is a high-level wrapper around a subset of the OpenSSL
7440 library.")
7441 (license license:asl2.0)))
7442
7443 (define-public python2-pyopenssl
7444 (package-with-python2 python-pyopenssl))
7445
7446 (define-public python-pip
7447 (package
7448 (name "python-pip")
7449 (version "9.0.1")
7450 (source
7451 (origin
7452 (method url-fetch)
7453 (uri (pypi-uri "pip" version))
7454 (sha256
7455 (base32
7456 "03clr9c1dih5n9c00c592zzvf6r1ffimywkaq9agcqdllzhl7wh9"))))
7457 (build-system python-build-system)
7458 (arguments
7459 '(#:tests? #f)) ; there are no tests in the pypi archive.
7460 (home-page "https://pip.pypa.io/")
7461 (synopsis "Package manager for Python software")
7462 (description
7463 "Pip is a package manager for Python software, that finds packages on the
7464 Python Package Index (PyPI).")
7465 (license license:expat)))
7466
7467 (define-public python2-pip
7468 (package-with-python2 python-pip))
7469
7470 (define-public python-tlsh
7471 (package
7472 (name "python-tlsh")
7473 (version "3.4.4")
7474 (home-page "https://github.com/trendmicro/tlsh")
7475 (source (origin
7476 (method url-fetch)
7477 (uri (string-append "https://github.com/trendmicro/tlsh/archive/v"
7478 version ".tar.gz"))
7479 (sha256
7480 (base32
7481 "00bhzjqrlh7v538kbkbn8lgx976j1138al3sdhklaizqjvpwyk4r"))
7482 (file-name (string-append name "-" version ".tar.gz"))))
7483 (build-system cmake-build-system)
7484 (arguments
7485 '(#:out-of-source? #f
7486 #:phases (modify-phases %standard-phases
7487 (replace
7488 'install
7489 (lambda* (#:key outputs #:allow-other-keys)
7490 ;; Build and install the Python bindings. The underlying
7491 ;; C++ library is apparently not meant to be installed.
7492 (let ((out (assoc-ref outputs "out")))
7493 (with-directory-excursion "py_ext"
7494 (and (system* "python" "setup.py" "build")
7495 (system* "python" "setup.py" "install"
7496 (string-append "--prefix=" out))))))))))
7497 (inputs `(("python" ,python-wrapper))) ;for the bindings
7498 (synopsis "Fuzzy matching library for Python")
7499 (description
7500 "Trend Micro Locality Sensitive Hash (TLSH) is a fuzzy matching library.
7501 Given a byte stream with a minimum length of 256 bytes, TLSH generates a hash
7502 value which can be used for similarity comparisons. Similar objects have
7503 similar hash values, which allows for the detection of similar objects by
7504 comparing their hash values. The byte stream should have a sufficient amount
7505 of complexity; for example, a byte stream of identical bytes will not generate
7506 a hash value.")
7507 (license license:asl2.0)))
7508
7509 (define-public python2-tlsh
7510 (package
7511 (inherit python-tlsh)
7512 (name "python2-tlsh")
7513 (inputs `(("python" ,python-2)))))
7514
7515 (define-public python-termcolor
7516 (package
7517 (name "python-termcolor")
7518 (version "1.1.0")
7519 (source
7520 (origin
7521 (method url-fetch)
7522 (uri (pypi-uri "termcolor" version))
7523 (sha256
7524 (base32
7525 "0fv1vq14rpqwgazxg4981904lfyp84mnammw7y046491cv76jv8x"))))
7526 (build-system python-build-system)
7527 (arguments
7528 ;; There are no tests.
7529 `(#:tests? #f))
7530 (home-page "http://pypi.python.org/pypi/termcolor")
7531 (synopsis "ANSII Color formatting for terminal output")
7532 (description
7533 "This package provides ANSII Color formatting for output in terminals.")
7534 (license license:expat)))
7535
7536 (define-public python2-termcolor
7537 (package-with-python2 python-termcolor))
7538
7539 (define-public python-libarchive-c
7540 (package
7541 (name "python-libarchive-c")
7542 (version "2.2")
7543 (source (origin
7544 (method url-fetch)
7545 (uri (pypi-uri "libarchive-c" version))
7546 (sha256
7547 (base32
7548 "0z4r7v3dhd6b3120mav05ff08srih176r2rg5k8kn7mjd9pslm2x"))))
7549 (build-system python-build-system)
7550 (arguments
7551 '(#:phases (modify-phases %standard-phases
7552 (add-before
7553 'build 'reference-libarchive
7554 (lambda* (#:key inputs #:allow-other-keys)
7555 ;; Retain the absolute file name of libarchive.so.
7556 (let ((libarchive (assoc-ref inputs "libarchive")))
7557 (substitute* "libarchive/ffi.py"
7558 (("find_library\\('archive'\\)")
7559 (string-append "'" libarchive
7560 "/lib/libarchive.so'")))))))))
7561 (inputs
7562 `(("libarchive" ,libarchive)))
7563 (home-page "https://github.com/Changaco/python-libarchive-c")
7564 (synopsis "Python interface to libarchive")
7565 (description
7566 "This package provides Python bindings to libarchive, a C library to
7567 access possibly compressed archives in many different formats. It uses
7568 Python's @code{ctypes} foreign function interface (FFI).")
7569 (license license:lgpl2.0+)))
7570
7571 (define-public python2-libarchive-c
7572 (package-with-python2 python-libarchive-c))
7573
7574 (define-public python-file
7575 (package
7576 (inherit file)
7577 (name "python-file")
7578 (source (origin
7579 (inherit (package-source file))
7580 ;; This patch should not be applied to python2-file.
7581 (patches (search-patches "python-file-double-encoding-bug.patch"))))
7582 (build-system python-build-system)
7583 (arguments
7584 '(#:tests? #f ;no tests
7585 #:configure-flags '("--single-version-externally-managed" "--root=/")
7586 #:phases (modify-phases %standard-phases
7587 (add-before 'build 'change-directory
7588 (lambda _
7589 (chdir "python")
7590 #t))
7591 (add-before 'build 'set-library-file-name
7592 (lambda* (#:key inputs #:allow-other-keys)
7593 (let ((file (assoc-ref inputs "file")))
7594 (substitute* "magic.py"
7595 (("find_library\\('magic'\\)")
7596 (string-append "'" file "/lib/libmagic.so'")))
7597 #t))))))
7598 (inputs `(("file" ,file)))
7599 (self-native-input? #f)
7600 (synopsis "Python bindings to the libmagic file type guesser. Note that
7601 this module and the python-magic module both provide a \"magic.py\" file;
7602 these two modules, which are different and were developed separately, both
7603 serve the same purpose: provide Python bindings for libmagic.")))
7604
7605 (define-public python2-file
7606 (package-with-python2 python-file))
7607
7608 (define-public python-debian
7609 (package
7610 (name "python-debian")
7611 (version "0.1.28")
7612 (source
7613 (origin
7614 (method url-fetch)
7615 (uri (pypi-uri name version))
7616 (sha256
7617 (base32
7618 "0i15f0xzx679sd0ldq2sls9pnnps9fv6vhqvnv9dzf4qhma42i0y"))))
7619 (build-system python-build-system)
7620 (propagated-inputs
7621 `(("python-six" ,python-six)))
7622 (home-page "http://packages.debian.org/sid/python-debian")
7623 (synopsis "Debian package related modules")
7624 (description
7625 ;; XXX: Use @enumerate instead of @itemize to work around
7626 ;; <http://bugs.gnu.org/21772>.
7627 "This package provides Python modules that abstract many formats of
7628 Debian-related files, such as:
7629
7630 @enumerate
7631 @item Debtags information;
7632 @item @file{debian/changelog} files;
7633 @item packages files, pdiffs;
7634 @item control files of single or multiple RFC822-style paragraphs---e.g.
7635 @file{debian/control}, @file{.changes}, @file{.dsc};
7636 @item Raw @file{.deb} and @file{.ar} files, with (read-only) access to
7637 contained files and meta-information.
7638 @end enumerate\n")
7639
7640 ;; Modules are either GPLv2+ or GPLv3+.
7641 (license license:gpl3+)))
7642
7643 (define-public python2-debian
7644 (package-with-python2 python-debian))
7645
7646 (define-public python-nbformat
7647 (package
7648 (name "python-nbformat")
7649 (version "4.1.0")
7650 (source
7651 (origin
7652 (method url-fetch)
7653 (uri (pypi-uri "nbformat" version))
7654 (sha256
7655 (base32
7656 "0mq8iki3d4mnx7wy05phss7x98mds4fqydin8lcagidp1knw1xnv"))))
7657 (build-system python-build-system)
7658 (arguments `(#:tests? #f)) ; no test target
7659 (propagated-inputs
7660 `(("python-ipython-genutils" ,python-ipython-genutils)
7661 ("python-jsonschema" ,python-jsonschema)
7662 ("python-jupyter-core" ,python-jupyter-core)
7663 ("python-traitlets" ,python-traitlets)))
7664 (home-page "http://jupyter.org")
7665 (synopsis "Jupyter Notebook format")
7666 (description "This package provides the reference implementation of the
7667 Jupyter Notebook format and Python APIs for working with notebooks.")
7668 (license license:bsd-3)))
7669
7670 (define-public python2-nbformat
7671 (package-with-python2 python-nbformat))
7672
7673 (define-public python-bleach
7674 (package
7675 (name "python-bleach")
7676 (version "1.4.3")
7677 (source
7678 (origin
7679 (method url-fetch)
7680 (uri (pypi-uri "bleach" version))
7681 (sha256
7682 (base32
7683 "0jvg3jxrvnx7xmm9gj262v60ib452xlnwlb0navyp7jsvcd0d4qj"))))
7684 (build-system python-build-system)
7685 (propagated-inputs
7686 `(("python-html5lib" ,python-html5lib-0.9)
7687 ("python-six" ,python-six)))
7688 (native-inputs
7689 `(("python-nose" ,python-nose)))
7690 (home-page "https://github.com/jsocol/bleach")
7691 (synopsis "Whitelist-based HTML-sanitizing tool")
7692 (description "Bleach is an easy whitelist-based HTML-sanitizing tool.")
7693 (license license:asl2.0)))
7694
7695 (define-public python2-bleach
7696 (package-with-python2 python-bleach))
7697
7698 (define-public python-entrypoints
7699 (package
7700 (name "python-entrypoints")
7701 (version "0.2.2")
7702 (source
7703 (origin
7704 (method url-fetch)
7705 (uri (string-append "https://github.com/takluyver/entrypoints/archive/"
7706 version ".tar.gz"))
7707 (file-name (string-append name "-" version ".tar.gz"))
7708 (sha256
7709 (base32
7710 "0azqlkh3j0za080lsf5crnhaxx3c93k9dpv5ihkhf5cppgw5sjz5"))))
7711 (build-system python-build-system)
7712 ;; The package does not come with a setup.py file, so we have to generate
7713 ;; one ourselves.
7714 (arguments
7715 `(#:tests? #f
7716 #:phases
7717 (modify-phases %standard-phases
7718 (add-after 'unpack 'create-setup.py
7719 (lambda _
7720 (call-with-output-file "setup.py"
7721 (lambda (port)
7722 (format port "\
7723 from setuptools import setup
7724 setup(name='entrypoints', version='~a', py_modules=['entrypoints'])
7725 " ,version))))))))
7726 (home-page "https://github.com/takluyver/entrypoints")
7727 (synopsis "Discover and load entry points from installed Python packages")
7728 (description "Entry points are a way for Python packages to advertise
7729 objects with some common interface. The most common examples are
7730 @code{console_scripts} entry points, which define shell commands by
7731 identifying a Python function to run. The @code{entrypoints} module contains
7732 functions to find and load entry points.")
7733 (license license:expat)))
7734
7735 (define-public python2-entrypoints
7736 (package-with-python2 python-entrypoints))
7737
7738 (define-public python-nbconvert
7739 (package
7740 (name "python-nbconvert")
7741 (version "5.0.0b1")
7742 (source
7743 (origin
7744 (method url-fetch)
7745 (uri (pypi-uri "nbconvert" version))
7746 (sha256
7747 (base32
7748 "0brclbb18l4nmd5qy3dl9wn05rjdh1fz4rmzdlfqacj12rcdvdgp"))))
7749 (build-system python-build-system)
7750 (arguments
7751 `(;; The "bdist_egg" target is disabled by default, causing the installation
7752 ;; to fail.
7753 #:configure-flags (list "bdist_egg")
7754 ;; FIXME: 5 failures, 40 errors.
7755 #:tests? #f))
7756 ;; #:phases
7757 ;; (modify-phases %standard-phases
7758 ;; (replace 'check
7759 ;; (lambda _
7760 ;; (zero? (system* "py.test" "-v")))))
7761 (native-inputs
7762 `(("python-pytest" ,python-pytest)))
7763 (propagated-inputs
7764 `(("python-bleach" ,python-bleach)
7765 ("python-entrypoints" ,python-entrypoints)
7766 ("python-jinja2" ,python-jinja2)
7767 ("python-jupyter-core" ,python-jupyter-core)
7768 ("python-mistune" ,python-mistune)
7769 ("python-nbformat" ,python-nbformat)
7770 ("python-pygments" ,python-pygments)
7771 ("python-traitlets" ,python-traitlets)))
7772 (home-page "http://jupyter.org")
7773 (synopsis "Converting Jupyter Notebooks")
7774 (description "The @code{nbconvert} tool, @{jupyter nbconvert}, converts
7775 notebooks to various other formats via Jinja templates. It allows you to
7776 convert an @code{.ipynb} notebook file into various static formats including:
7777
7778 @enumerate
7779 @item HTML
7780 @item LaTeX
7781 @item PDF
7782 @item Reveal JS
7783 @item Markdown (md)
7784 @item ReStructured Text (rst)
7785 @item executable script
7786 @end enumerate\n")
7787 (license license:bsd-3)))
7788
7789 (define-public python2-nbconvert
7790 (package-with-python2 python-nbconvert))
7791
7792 (define-public python-notebook
7793 (package
7794 (name "python-notebook")
7795 (version "4.2.3")
7796 (source (origin
7797 (method url-fetch)
7798 (uri (pypi-uri "notebook" version))
7799 (sha256
7800 (base32
7801 "0laq5c2f21frq6xcdckgq7raqhznbjb0qs0357g612z87wyn1a9r"))))
7802 (build-system python-build-system)
7803 (arguments
7804 `(#:phases
7805 (modify-phases %standard-phases
7806 (replace 'check
7807 (lambda _
7808 ;; HOME must be set for tests
7809 (setenv "HOME" "/tmp")
7810 (zero? (system* "nosetests")))))))
7811 (propagated-inputs
7812 `(("python-jupyter-core" ,python-jupyter-core)
7813 ("python-nbformat" ,python-nbformat)
7814 ("python-nbconvert" ,python-nbconvert)
7815 ("python-ipython" ,python-ipython)))
7816 (native-inputs
7817 `(("python-nose" ,python-nose)
7818 ("python-sphinx" ,python-sphinx)
7819 ("python-requests" ,python-requests)))
7820 (home-page "http://jupyter.org/")
7821 (synopsis "Web-based notebook environment for interactive computing")
7822 (description
7823 "The Jupyter HTML notebook is a web-based notebook environment for
7824 interactive computing.")
7825 (properties `((python2-variant . ,(delay python2-notebook))))
7826 (license license:bsd-3)))
7827
7828 (define-public python2-notebook
7829 (let ((base (package-with-python2
7830 (strip-python2-variant python-notebook))))
7831 (package (inherit base)
7832 (native-inputs
7833 `(("python2-mock" ,python2-mock)
7834 ,@(package-native-inputs base)))
7835 (arguments
7836 (substitute-keyword-arguments (package-arguments base)
7837 ((#:phases phases)
7838 `(modify-phases ,phases
7839 (add-before 'check 'disable-test-case
7840 ;; The test requires network access to localhost. Curiously it
7841 ;; fails with Python 2 only. Simply make the test-case return
7842 ;; immediately.
7843 (lambda _
7844 (substitute*
7845 "notebook/services/nbconvert/tests/test_nbconvert_api.py"
7846 (("formats = self.nbconvert_api") "return #")))))))))))
7847
7848 (define-public python-widgetsnbextension
7849 (package
7850 (name "python-widgetsnbextension")
7851 (version "1.2.6")
7852 (source
7853 (origin
7854 (method url-fetch)
7855 (uri (pypi-uri "widgetsnbextension" version))
7856 (sha256
7857 (base32
7858 "0lff2mrwrgsa1mxmwx3phl9xvy0jqfpg6khbmxy53jbq56rwy666"))))
7859 (build-system python-build-system)
7860 (propagated-inputs
7861 `(("python-notebook" ,python-notebook)))
7862 (native-inputs
7863 `(("python-certifi" ,python-certifi)
7864 ("python-nose" ,python-nose)))
7865 (home-page "http://ipython.org")
7866 (synopsis "IPython HTML widgets for Jupyter")
7867 (description "This package provides interactive HTML widgets for Jupyter
7868 notebooks.")
7869 (license license:bsd-3)))
7870
7871 (define-public python2-widgetsnbextension
7872 (package-with-python2 python-widgetsnbextension))
7873
7874 (define-public python-ipywidgets
7875 (package
7876 (name "python-ipywidgets")
7877 (version "5.2.2")
7878 (source
7879 (origin
7880 (method url-fetch)
7881 (uri (pypi-uri "ipywidgets" version))
7882 (sha256
7883 (base32
7884 "1lk0qrr5l9a0z7qkkn30hv5832whxwxymf1l576fmmad0n7hkxms"))))
7885 (build-system python-build-system)
7886 ;; FIXME: it's not clear how to run the tests.
7887 (arguments `(#:tests? #f))
7888 (propagated-inputs
7889 `(("python-ipykernel" ,python-ipykernel)
7890 ("python-ipython" ,python-ipython)
7891 ("python-traitlets" ,python-traitlets)
7892 ("python-widgetsnbextension" ,python-widgetsnbextension)))
7893 (home-page "http://ipython.org")
7894 (synopsis "IPython HTML widgets for Jupyter")
7895 (description "Ipywidgets are interactive HTML widgets for Jupyter
7896 notebooks and the IPython kernel. Notebooks come alive when interactive
7897 widgets are used. Users gain control of their data and can visualize changes
7898 in the data.")
7899 (license license:bsd-3)))
7900
7901 (define-public python2-ipywidgets
7902 (package-with-python2 python-ipywidgets))
7903
7904 (define-public python-jupyter-console
7905 (package
7906 (name "python-jupyter-console")
7907 (version "5.0.0")
7908 (source
7909 (origin
7910 (method url-fetch)
7911 (uri (pypi-uri "jupyter_console" version))
7912 (sha256
7913 (base32
7914 "04acmkwsi99rcg3vb54c6n492zv35s92h2ahabc0w6wj976cipvx"))))
7915 (build-system python-build-system)
7916 ;; FIXME: it's not clear how to run the tests.
7917 (arguments `(#:tests? #f))
7918 (propagated-inputs
7919 `(("python-ipykernel" ,python-ipykernel)
7920 ("python-ipython" ,python-ipython)
7921 ("python-jupyter-client" ,python-jupyter-client)
7922 ("python-prompt-toolkit" ,python-prompt-toolkit)
7923 ("python-pygments" ,python-pygments)))
7924 (home-page "https://jupyter.org")
7925 (synopsis "Jupyter terminal console")
7926 (description "This package provides a terminal-based console frontend for
7927 Jupyter kernels. It also allows for console-based interaction with non-Python
7928 Jupyter kernels such as IJulia and IRKernel.")
7929 (license license:bsd-3)))
7930
7931 (define-public python2-jupyter-console
7932 (package-with-python2 python-jupyter-console))
7933
7934 (define-public jupyter
7935 (package
7936 (name "jupyter")
7937 (version "1.0.0")
7938 (source
7939 (origin
7940 (method url-fetch)
7941 (uri (pypi-uri "jupyter" version))
7942 (sha256
7943 (base32
7944 "0pwf3pminkzyzgx5kcplvvbvwrrzd3baa7lmh96f647k30rlpp6r"))))
7945 (build-system python-build-system)
7946 ;; FIXME: it's not clear how to run the tests.
7947 (arguments `(#:tests? #f))
7948 (propagated-inputs
7949 `(("python-ipykernel" ,python-ipykernel)
7950 ("python-ipywidgets" ,python-ipywidgets)
7951 ("python-jupyter-console" ,python-jupyter-console)
7952 ("python-nbconvert" ,python-nbconvert)
7953 ("python-notebook" ,python-notebook)))
7954 (home-page "http://jupyter.org")
7955 (synopsis "Web application for interactive documents")
7956 (description
7957 "The Jupyter Notebook is a web application that allows you to create and
7958 share documents that contain live code, equations, visualizations and
7959 explanatory text. Uses include: data cleaning and transformation, numerical
7960 simulation, statistical modeling, machine learning and much more.")
7961 (license license:bsd-3)))
7962
7963 (define-public python-chardet
7964 (package
7965 (name "python-chardet")
7966 (version "2.3.0")
7967 (source
7968 (origin
7969 (method url-fetch)
7970 (uri (string-append
7971 "https://pypi.python.org/packages/source/c/chardet/chardet-"
7972 version
7973 ".tar.gz"))
7974 (sha256
7975 (base32
7976 "1ak87ikcw34fivcgiz2xvi938dmclh078az65l9x3rmgljrkhgp5"))))
7977 (build-system python-build-system)
7978 (home-page "https://github.com/chardet/chardet")
7979 (synopsis "Universal encoding detector for Python 2 and 3")
7980 (description
7981 "This package provides @code{chardet}, a Python module that can
7982 automatically detect a wide range of file encodings.")
7983 (license license:lgpl2.1+)))
7984
7985 (define-public python2-chardet
7986 (package-with-python2 python-chardet))
7987
7988 (define-public python-docopt
7989 (package
7990 (name "python-docopt")
7991 (version "0.6.2")
7992 (source
7993 (origin
7994 (method url-fetch)
7995 ;; The release on PyPI does not include tests.
7996 (uri (string-append
7997 "https://github.com/docopt/docopt/archive/"
7998 version ".tar.gz"))
7999 (file-name (string-append name "-" version ".tar.gz"))
8000 (sha256
8001 (base32
8002 "16bf890xbdz3m30rsv2qacklh2rdn1zrfspfnwzx9g7vwz8yw4r1"))))
8003 (build-system python-build-system)
8004 (native-inputs
8005 `(("python-pytest" ,python-pytest)))
8006 (arguments
8007 `(#:phases (alist-replace
8008 'check
8009 (lambda _ (zero? (system* "py.test")))
8010 %standard-phases)))
8011 (home-page "http://docopt.org")
8012 (synopsis "Command-line interface description language for Python")
8013 (description "This library allows the user to define a command-line
8014 interface from a program's help message rather than specifying it
8015 programatically with command-line parsers like @code{getopt} and
8016 @code{argparse}.")
8017 (license license:expat)))
8018
8019 (define-public python2-docopt
8020 (package-with-python2 python-docopt))
8021
8022 (define-public python-zope-event
8023 (package
8024 (name "python-zope-event")
8025 (version "4.1.0")
8026 (source
8027 (origin
8028 (method url-fetch)
8029 (uri (string-append "https://pypi.python.org/packages/source/z"
8030 "/zope.event/zope.event-" version ".tar.gz"))
8031 (sha256
8032 (base32
8033 "11p75zpfz3ffhz21nzx9wb23xs993ck5s6hkjcvhswwizni5jynw"))))
8034 (build-system python-build-system)
8035 (home-page "http://pypi.python.org/pypi/zope.event")
8036 (synopsis "Event publishing system for Python")
8037 (description "Zope.event provides an event publishing API, intended for
8038 use by applications which are unaware of any subscribers to their events. It
8039 is a simple event-dispatching system on which more sophisticated event
8040 dispatching systems can be built.")
8041 (license license:zpl2.1)))
8042
8043 (define-public python2-zope-event
8044 (package-with-python2 python-zope-event))
8045
8046 (define-public python-zope-interface
8047 (package
8048 (name "python-zope-interface")
8049 (version "4.1.3")
8050 (source
8051 (origin
8052 (method url-fetch)
8053 (uri (string-append "https://pypi.python.org/packages/source/z"
8054 "/zope.interface/zope.interface-" version ".tar.gz"))
8055 (sha256
8056 (base32
8057 "0ks8h73b2g4bkad821qbv0wzjppdrwys33i7ka45ik3wxjg1l8if"))))
8058 (build-system python-build-system)
8059 (native-inputs
8060 `(("python-zope-event" ,python-zope-event)))
8061 (home-page "https://github.com/zopefoundation/zope.interface")
8062 (synopsis "Python implementation of the \"design by contract\"
8063 methodology")
8064 (description "Zope.interface provides an implementation of \"object
8065 interfaces\" for Python. Interfaces are a mechanism for labeling objects as
8066 conforming to a given API or contract.")
8067 (license license:zpl2.1)))
8068
8069 (define-public python2-zope-interface
8070 (package-with-python2 python-zope-interface))
8071
8072 (define-public python-zope-exceptions
8073 (package
8074 (name "python-zope-exceptions")
8075 (version "4.0.8")
8076 (source
8077 (origin
8078 (method url-fetch)
8079 (uri (string-append "https://pypi.python.org/packages/source/z"
8080 "/zope.exceptions/zope.exceptions-"
8081 version ".tar.gz"))
8082 (sha256
8083 (base32
8084 "0zwxaaa66sqxg5k7zcrvs0fbg9ym1njnxnr28dfmchzhwjvwnfzl"))))
8085 (build-system python-build-system)
8086 (arguments
8087 '(#:tests? #f)) ; circular dependency with zope.testrunner
8088 (propagated-inputs
8089 `(("python-zope-interface" ,python-zope-interface)))
8090 (home-page "http://cheeseshop.python.org/pypi/zope.exceptions")
8091 (synopsis "Zope exceptions")
8092 (description "Zope.exceptions provides general-purpose exception types
8093 that have uses outside of the Zope framework.")
8094 (license license:zpl2.1)))
8095
8096 (define-public python2-zope-exceptions
8097 (package-with-python2 python-zope-exceptions))
8098
8099 (define-public python-zope-testing
8100 (package
8101 (name "python-zope-testing")
8102 (version "4.5.0")
8103 (source
8104 (origin
8105 (method url-fetch)
8106 (uri (string-append "https://pypi.python.org/packages/source/z"
8107 "/zope.testing/zope.testing-" version ".tar.gz"))
8108 (sha256
8109 (base32
8110 "1yvglxhzvhl45mndvn9gskx2ph30zz1bz7rrlyfs62fv2pvih90s"))
8111 (modules '((guix build utils)))
8112 (snippet
8113 '(begin
8114 ;; Remove pre-compiled .pyc files backup files from source.
8115 (for-each delete-file (find-files "." "(\\.pyc|~)$"))
8116 #t))))
8117 (build-system python-build-system)
8118 (native-inputs
8119 `(("python-zope-exceptions" ,python-zope-exceptions)))
8120 (propagated-inputs
8121 `(("python-zope-interface" ,python-zope-interface)))
8122 (home-page "http://pypi.python.org/pypi/zope.testing")
8123 (synopsis "Zope testing helpers")
8124 (description "Zope.testing provides a number of testing utilities for HTML
8125 forms, HTTP servers, regular expressions, and more.")
8126 (license license:zpl2.1)))
8127
8128 (define-public python2-zope-testing
8129 (package-with-python2 python-zope-testing))
8130
8131 (define-public python-zope-testrunner
8132 (package
8133 (name "python-zope-testrunner")
8134 (version "4.4.9")
8135 (source
8136 (origin
8137 (method url-fetch)
8138 (uri (string-append "https://pypi.python.org/packages/source/z"
8139 "/zope.testrunner/zope.testrunner-"
8140 version ".zip"))
8141 (sha256
8142 (base32
8143 "1r7iqknhh55y45f64mz5hghgvzx34h1i11k350s0avx6q8gznja1"))))
8144 (build-system python-build-system)
8145 (arguments
8146 '(#:tests? #f)) ; FIXME: Tests can't find zope.interface.
8147 (native-inputs
8148 `(("python-six" ,python-six)
8149 ;("python-zope-interface" ,python-zope-interface)
8150 ("python-zope-exceptions" ,python-zope-exceptions)
8151 ("python-zope-testing" ,python-zope-testing)
8152 ("unzip" ,unzip)))
8153 (propagated-inputs
8154 `(("python-zope-interface" ,python-zope-interface)))
8155 (home-page "http://pypi.python.org/pypi/zope.testrunner")
8156 (synopsis "Zope testrunner script")
8157 (description "Zope.testrunner provides a script for running Python
8158 tests.")
8159 (license license:zpl2.1)))
8160
8161 (define-public python2-zope-testrunner
8162 (let ((base (package-with-python2 python-zope-testrunner)))
8163 (package
8164 (inherit base)
8165 (native-inputs
8166 (append (package-native-inputs base)
8167 `(("python2-subunit" ,python2-subunit)
8168 ("python2-mimeparse" ,python2-mimeparse)))))))
8169
8170 (define-public python-zope-i18nmessageid
8171 (package
8172 (name "python-zope-i18nmessageid")
8173 (version "4.0.3")
8174 (source
8175 (origin
8176 (method url-fetch)
8177 (uri (string-append
8178 "https://pypi.python.org/packages/source/z"
8179 "/zope.i18nmessageid/zope.i18nmessageid-"
8180 version ".tar.gz"))
8181 (sha256
8182 (base32
8183 "1rslyph0klk58dmjjy4j0jxy21k03azksixc3x2xhqbkv97cmzml"))))
8184 (build-system python-build-system)
8185 (home-page "http://pypi.python.org/pypi/zope.i18nmessageid")
8186 (synopsis "Message identifiers for internationalization")
8187 (description "Zope.i18nmessageid provides facilities for declaring
8188 internationalized messages within program source text.")
8189 (license license:zpl2.1)))
8190
8191 (define-public python2-zope-i18nmessageid
8192 (package-with-python2 python-zope-i18nmessageid))
8193
8194 (define-public python-zope-schema
8195 (package
8196 (name "python-zope-schema")
8197 (version "4.4.2")
8198 (source
8199 (origin
8200 (method url-fetch)
8201 (uri (string-append "https://pypi.python.org/packages/source/z"
8202 "/zope.schema/zope.schema-" version ".tar.gz"))
8203 (sha256
8204 (base32
8205 "1p943jdxb587dh7php4vx04qvn7b2877hr4qs5zyckvp5afhhank"))))
8206 (build-system python-build-system)
8207 (arguments
8208 '(#:tests? #f)) ; FIXME: Tests can't find zope.event.
8209 (propagated-inputs
8210 `(("python-zope-event" ,python-zope-event)
8211 ("python-zope-exceptions", python-zope-exceptions)
8212 ("python-zope-interface" ,python-zope-interface)))
8213 (native-inputs
8214 `(("python-zope-testing" ,python-zope-testing)
8215 ("python-coverage" ,python-coverage)
8216 ("python-nose" ,python-nose)))
8217 (home-page "http://pypi.python.org/pypi/zope.schema")
8218 (synopsis "Zope data schemas")
8219 (description "Zope.scheme provides extensions to zope.interface for
8220 defining data schemas.")
8221 (license license:zpl2.1)))
8222
8223 (define-public python2-zope-schema
8224 (package-with-python2 python-zope-schema))
8225
8226 (define-public python-zope-configuration
8227 (package
8228 (name "python-zope-configuration")
8229 (version "4.0.3")
8230 (source (origin
8231 (method url-fetch)
8232 (uri (string-append "https://pypi.python.org/packages/source/z"
8233 "/zope.configuration/zope.configuration-"
8234 version ".tar.gz"))
8235 (sha256
8236 (base32
8237 "1x9dfqypgympnlm25p9m43xh4qv3p7d75vksv9pzqibrb4cggw5n"))))
8238 (build-system python-build-system)
8239 (arguments
8240 '(#:tests? #f)) ; FIXME: Tests can't find zope.interface.
8241 (propagated-inputs
8242 `(("python-zope-i18nmessageid" ,python-zope-i18nmessageid)
8243 ("python-zope-schema" ,python-zope-schema)))
8244 (home-page "http://pypi.python.org/pypi/zope.configuration")
8245 (synopsis "Zope Configuration Markup Language")
8246 (description "Zope.configuration implements ZCML, the Zope Configuration
8247 Markup Language.")
8248 (license license:zpl2.1)))
8249
8250 (define-public python2-zope-configuration
8251 (package-with-python2 python-zope-configuration))
8252
8253 (define-public python-zope-proxy
8254 (package
8255 (name "python-zope-proxy")
8256 (version "4.1.6")
8257 (source
8258 (origin
8259 (method url-fetch)
8260 (uri (string-append "https://pypi.python.org/packages/source/z"
8261 "/zope.proxy/zope.proxy-" version ".tar.gz"))
8262 (sha256
8263 (base32
8264 "0pqwwmvm1prhwv1ziv9lp8iirz7xkwb6n2kyj36p2h0ppyyhjnm4"))))
8265 (build-system python-build-system)
8266 (arguments
8267 '(#:tests? #f)) ; FIXME: Tests can't find zope.interface.
8268 (propagated-inputs
8269 `(("python-zope-interface" ,python-zope-interface)))
8270 (home-page "http://pypi.python.org/pypi/zope.proxy")
8271 (synopsis "Generic, transparent proxies")
8272 (description "Zope.proxy provides generic, transparent proxies for Python.
8273 Proxies are special objects which serve as mostly-transparent wrappers around
8274 another object, intervening in the apparent behavior of the wrapped object
8275 only when necessary to apply the policy (e.g., access checking, location
8276 brokering, etc.) for which the proxy is responsible.")
8277 (license license:zpl2.1)))
8278
8279 (define-public python2-zope-proxy
8280 (package-with-python2 python-zope-proxy))
8281
8282 (define-public python-zope-location
8283 (package
8284 (name "python-zope-location")
8285 (version "4.0.3")
8286 (source
8287 (origin
8288 (method url-fetch)
8289 (uri (string-append "https://pypi.python.org/packages/source/z"
8290 "/zope.location/zope.location-" version ".tar.gz"))
8291 (sha256
8292 (base32
8293 "1nj9da4ksiyv3h8n2vpzwd0pb03mdsh7zy87hfpx72b6p2zcwg74"))))
8294 (build-system python-build-system)
8295 (arguments
8296 '(#:tests? #f)) ; FIXME: Tests can't find zope.interface.
8297 (propagated-inputs
8298 `(("python-zope-proxy" ,python-zope-proxy)
8299 ("python-zope-schema" ,python-zope-schema)))
8300 (home-page "http://pypi.python.org/pypi/zope.location/")
8301 (synopsis "Zope location library")
8302 (description "Zope.location implements the concept of \"locations\" in
8303 Zope3, which are are special objects that have a structural location.")
8304 (license license:zpl2.1)))
8305
8306 (define-public python2-zope-location
8307 (package-with-python2 python-zope-location))
8308
8309 (define-public python-zope-security
8310 (package
8311 (name "python-zope-security")
8312 (version "4.0.3")
8313 (source
8314 (origin
8315 (method url-fetch)
8316 (uri (string-append "https://pypi.python.org/packages/source/z"
8317 "/zope.security/zope.security-" version ".tar.gz"))
8318 (sha256
8319 (base32
8320 "14zmf684amc0x32kq05yxnhfqd1cmyhafkw05gn81rn90zjv6ssy"))))
8321 (build-system python-build-system)
8322 (arguments
8323 '(#:tests? #f)) ; FIXME: Tests can't find zope.testrunner.
8324 (propagated-inputs
8325 `(("python-zope-i18nmessageid" ,python-zope-i18nmessageid)
8326 ("python-zope-proxy" ,python-zope-proxy)
8327 ("python-zope-schema" ,python-zope-schema)))
8328 (native-inputs
8329 `(("python-six" ,python-six)
8330 ("python-zope-component" ,python-zope-component)
8331 ("python-zope-configuration" ,python-zope-configuration)
8332 ("python-zope-location" ,python-zope-location)
8333 ("python-zope-testrunner" ,python-zope-testrunner)
8334 ("python-zope-testing" ,python-zope-testing)))
8335 (home-page "http://pypi.python.org/pypi/zope.security")
8336 (synopsis "Zope security framework")
8337 (description "Zope.security provides a generic mechanism to implement
8338 security policies on Python objects.")
8339 (license license:zpl2.1)))
8340
8341 (define-public python2-zope-security
8342 (let ((zope-security (package-with-python2 python-zope-security)))
8343 (package (inherit zope-security)
8344 (propagated-inputs
8345 `(("python2-zope-testrunner" ,python2-zope-testrunner)
8346 ,@(alist-delete
8347 "python-zope-testrunner"
8348 (package-propagated-inputs zope-security)))))))
8349
8350 (define-public python-zope-component
8351 (package
8352 (name "python-zope-component")
8353 (version "4.3.0")
8354 (source
8355 (origin
8356 (method url-fetch)
8357 (uri (pypi-uri "zope.component" version))
8358 (sha256
8359 (base32
8360 "1hlvzwj1kcfz1qms1dzhwsshpsf38z9clmyksb1gh41n8k3kchdv"))))
8361 (build-system python-build-system)
8362 (arguments
8363 ;; Skip tests due to circular dependency with python-zope-security.
8364 '(#:tests? #f))
8365 (native-inputs
8366 `(("python-zope-testing" ,python-zope-testing)))
8367 (propagated-inputs
8368 `(("python-zope-event" ,python-zope-event)
8369 ("python-zope-interface" ,python-zope-interface)
8370 ("python-zope-i18nmessageid" ,python-zope-i18nmessageid)
8371 ("python-zope-configuration" ,python-zope-configuration)))
8372 (home-page "https://github.com/zopefoundation/zope.component")
8373 (synopsis "Zope Component Architecture")
8374 (description "Zope.component represents the core of the Zope Component
8375 Architecture. Together with the zope.interface package, it provides
8376 facilities for defining, registering and looking up components.")
8377 (license license:zpl2.1)))
8378
8379 (define-public python2-zope-component
8380 (package-with-python2 python-zope-component))
8381
8382 (define-public python-pythondialog
8383 (package
8384 (name "python-pythondialog")
8385 (version "3.4.0")
8386 (source
8387 (origin
8388 (method url-fetch)
8389 (uri (pypi-uri "pythondialog" version))
8390 (sha256
8391 (base32
8392 "1728ghsran47jczn9bhlnkvk5bvqmmbihabgif5h705b84r1272c"))))
8393 (build-system python-build-system)
8394 (arguments
8395 `(#:phases
8396 (modify-phases %standard-phases
8397 (add-after 'unpack 'patch-path
8398 (lambda* (#:key inputs #:allow-other-keys)
8399 (let* ((dialog (assoc-ref inputs "dialog")))
8400 ;; Since this library really wants to grovel the search path, we
8401 ;; must hardcode dialog's store path into it.
8402 (substitute* "dialog.py"
8403 (("os.getenv\\(\"PATH\", \":/bin:/usr/bin\"\\)")
8404 (string-append "os.getenv(\"PATH\") + \":" dialog "/bin\"")))
8405 #t))))
8406 #:tests? #f)) ; no test suite
8407 (propagated-inputs
8408 `(("dialog" ,dialog)))
8409 (home-page "http://pythondialog.sourceforge.net/")
8410 (synopsis "Python interface to the UNIX dialog utility")
8411 (description "A Python wrapper for the dialog utility. Its purpose is to
8412 provide an easy to use, pythonic and comprehensive Python interface to dialog.
8413 This allows one to make simple text-mode user interfaces on Unix-like systems")
8414 (license license:lgpl2.1)
8415 (properties `((python2-variant . ,(delay python2-pythondialog))))))
8416
8417 (define-public python2-pythondialog
8418 (let ((base (package-with-python2 (strip-python2-variant python-pythondialog))))
8419 (package
8420 (inherit base)
8421 (version (package-version python-pythondialog))
8422 (source (origin
8423 (method url-fetch)
8424 (uri (pypi-uri "python2-pythondialog" version))
8425 (sha256
8426 (base32
8427 "0d8k7lxk50imdyx85lv8j98i4c93a71iwpapnl1506rpkbm9qvd9")))))))
8428
8429 (define-public python-pyrfc3339
8430 (package
8431 (name "python-pyrfc3339")
8432 (version "1.0")
8433 (source
8434 (origin
8435 (method url-fetch)
8436 (uri (pypi-uri "pyRFC3339" version))
8437 (sha256
8438 (base32
8439 "0dgm4l9y8jiax5cp6yxjd2i27cq8h33sh81n1wfbmnmqb32cdywd"))))
8440 (build-system python-build-system)
8441 (propagated-inputs
8442 `(("python-pytz" ,python-pytz)))
8443 (native-inputs
8444 `(("python-nose" ,python-nose)))
8445 (home-page "https://github.com/kurtraschke/pyRFC3339")
8446 (synopsis "Python timestamp library")
8447 (description "Python library for generating and parsing RFC 3339-compliant
8448 timestamps.")
8449 (license license:expat)))
8450
8451 (define-public python2-pyrfc3339
8452 (package-with-python2 python-pyrfc3339))
8453
8454 (define-public python-werkzeug
8455 (package
8456 (name "python-werkzeug")
8457 (version "0.11.15")
8458 (source
8459 (origin
8460 (method url-fetch)
8461 (uri (pypi-uri "Werkzeug" version))
8462 (sha256
8463 (base32
8464 "1h5wycw8yj7q0grqsjnsqflmrlsdagvl2j4dsgdncci6mjc7fpa5"))))
8465 (build-system python-build-system)
8466 (native-inputs
8467 `(("python-pytest" ,python-pytest)))
8468 (home-page "http://werkzeug.pocoo.org/")
8469 (synopsis "Utilities for WSGI applications")
8470 (description "One of the most advanced WSGI utility modules. It includes a
8471 powerful debugger, full-featured request and response objects, HTTP utilities to
8472 handle entity tags, cache control headers, HTTP dates, cookie handling, file
8473 uploads, a powerful URL routing system and a bunch of community-contributed
8474 addon modules.")
8475 (license license:x11)))
8476
8477 (define-public python2-werkzeug
8478 (package-with-python2 python-werkzeug))
8479
8480 (define-public python-configobj
8481 (package
8482 (name "python-configobj")
8483 (version "5.0.6")
8484 (source (origin
8485 (method url-fetch)
8486 (uri (string-append
8487 "https://pypi.python.org/packages/source/c/configobj/"
8488 "configobj-" version ".tar.gz"))
8489 (sha256
8490 (base32
8491 "00h9rcmws03xvdlfni11yb60bz3kxfvsj6dg6nrpzj71f03nbxd2"))
8492 ;; Patch setup.py so it looks for python-setuptools, which is
8493 ;; required to parse the keyword 'install_requires' in setup.py.
8494 (patches (search-patches "python-configobj-setuptools.patch"))))
8495 (build-system python-build-system)
8496 (propagated-inputs
8497 `(("python-six" ,python-six)))
8498 (synopsis "Config file reading, writing and validation")
8499 (description "ConfigObj is a simple but powerful config file reader and
8500 writer: an ini file round tripper. Its main feature is that it is very easy to
8501 use, with a straightforward programmer’s interface and a simple syntax for
8502 config files.")
8503 (home-page "https://github.com/DiffSK/configobj")
8504 (license license:bsd-3)))
8505
8506 (define-public python2-configobj
8507 (package-with-python2 python-configobj))
8508
8509 (define-public python-configargparse
8510 (package
8511 (name "python-configargparse")
8512 (version "0.10.0")
8513 (source (origin
8514 (method url-fetch)
8515 (uri (string-append
8516 "https://pypi.python.org/packages/source/C/ConfigArgParse/"
8517 "ConfigArgParse-" version ".tar.gz"))
8518 (sha256
8519 (base32
8520 "19wh919gbdbzxzpagg52q3lm62yicm95ddlcx77dyjc1slyshl1v"))))
8521 (build-system python-build-system)
8522 (arguments
8523 ;; FIXME: Bug in test suite filed upstream:
8524 ;; https://github.com/bw2/ConfigArgParse/issues/32
8525 '(#:tests? #f))
8526 (synopsis "Replacement for argparse")
8527 (description "A drop-in replacement for argparse that allows options to also
8528 be set via config files and/or environment variables.")
8529 (home-page "https://github.com/bw2/ConfigArgParse")
8530 (license license:expat)))
8531
8532 (define-public python2-configargparse
8533 (package-with-python2 python-configargparse))
8534
8535 (define-public python-ndg-httpsclient
8536 (package
8537 (name "python-ndg-httpsclient")
8538 (version "0.4.2")
8539 (source (origin
8540 (method url-fetch)
8541 (uri (pypi-uri "ndg_httpsclient" version))
8542 (sha256
8543 (base32
8544 "1b5qirv46v4dpnmfqviwq42mdwfcby4dxmz0i41wad2337pqf2aq"))))
8545 (build-system python-build-system)
8546 (arguments
8547 '(;; The tests appear to require networking.
8548 #:tests? #f))
8549 (propagated-inputs
8550 `(("python-pyopenssl" ,python-pyopenssl)))
8551 (synopsis "HTTPS support for Python's httplib and urllib2")
8552 (description "This is a HTTPS client implementation for httplib and urllib2
8553 based on PyOpenSSL. PyOpenSSL provides a more fully featured SSL implementation
8554 over the default provided with Python and importantly enables full verification
8555 of the SSL peer.")
8556 (home-page "https://github.com/cedadev/ndg_httpsclient/")
8557 (license license:bsd-3)))
8558
8559 ;; python2-openssl requires special care, so package-with-python2 is
8560 ;; insufficient.
8561 (define-public python2-ndg-httpsclient
8562 (package (inherit python-ndg-httpsclient)
8563 (name "python2-ndg-httpsclient")
8564 (arguments `(#:python ,python-2))
8565 (propagated-inputs
8566 `(("python2-pyopenssl" ,python2-pyopenssl)))))
8567
8568 (define-public python-contextlib2
8569 (package
8570 (name "python-contextlib2")
8571 (version "0.4.0")
8572 (source
8573 (origin
8574 (method url-fetch)
8575 (uri (pypi-uri "contextlib2" version))
8576 (sha256
8577 (base32
8578 "0cmp131dlh0d0zvw0aza1zd13glvngzk8lb4avks0hm7yxwdr9am"))))
8579 (build-system python-build-system)
8580 (arguments
8581 `(#:phases
8582 (modify-phases %standard-phases
8583 (replace 'check
8584 (lambda _ (zero?
8585 (system*
8586 "python" "test_contextlib2.py" "-v")))))))
8587 (home-page "http://contextlib2.readthedocs.org/")
8588 (synopsis "Tools for decorators and context managers")
8589 (description "This module is primarily a backport of the Python
8590 3.2 contextlib to earlier Python versions. Like contextlib, it
8591 provides utilities for common tasks involving decorators and context
8592 managers. It also contains additional features that are not part of
8593 the standard library.")
8594 (license license:psfl)))
8595
8596 (define-public python2-contextlib2
8597 (package-with-python2 python-contextlib2))
8598
8599 (define-public python-texttable
8600 (package
8601 (name "python-texttable")
8602 (version "0.8.7")
8603 (source
8604 (origin
8605 (method url-fetch)
8606 (uri (pypi-uri "texttable" version))
8607 (sha256
8608 (base32
8609 "1liiiydgkg37i46a418aw19fyf6z3ds51wdwwpyjbs12x0phhf4a"))))
8610 (build-system python-build-system)
8611 (arguments '(#:tests? #f)) ; no tests
8612 (home-page "https://github.com/foutaise/texttable/")
8613 (synopsis "Python module for creating simple ASCII tables")
8614 (description "Texttable is a Python module for creating simple ASCII
8615 tables.")
8616 (license license:lgpl2.1+)))
8617
8618 (define-public python2-texttable
8619 (package-with-python2 python-texttable))
8620
8621 (define-public python-websocket-client
8622 (package
8623 (name "python-websocket-client")
8624 (version "0.37.0")
8625 (source
8626 (origin
8627 (method url-fetch)
8628 (uri (pypi-uri "websocket_client" version))
8629 (sha256
8630 (base32
8631 "0h9glp1jll3z76ly3kg08aqgxqk0a68p4zi9yn50353bh5nj92v7"))))
8632 (build-system python-build-system)
8633 (propagated-inputs
8634 `(("python-six" ,python-six)))
8635 (home-page "https://github.com/liris/websocket-client")
8636 (synopsis "WebSocket client for Python")
8637 (description "The Websocket-client module provides the low level APIs for
8638 WebSocket usage in Python programs.")
8639 (license license:lgpl2.1+)))
8640
8641 (define-public python2-websocket-client
8642 (package-with-python2 python-websocket-client))
8643
8644 (define-public python-atomicwrites
8645 (package
8646 (name "python-atomicwrites")
8647 (version "1.1.5")
8648 (source (origin
8649 (method url-fetch)
8650 (uri (pypi-uri "atomicwrites" version))
8651 (sha256
8652 (base32
8653 "11bm90fwm2avvf4f3ib8g925w7jr4m11vcsinn1bi6ns4bm32214"))))
8654 (build-system python-build-system)
8655 (synopsis "Atomic file writes in Python")
8656 (description "Library for atomic file writes using platform dependent tools
8657 for atomic file system operations.")
8658 (home-page "https://github.com/untitaker/python-atomicwrites")
8659 (license license:expat)))
8660
8661 (define-public python2-atomicwrites
8662 (package-with-python2 python-atomicwrites))
8663
8664 (define-public python-requests-toolbelt
8665 (package
8666 (name "python-requests-toolbelt")
8667 (version "0.6.2")
8668 (source (origin
8669 (method url-fetch)
8670 (uri (string-append
8671 "https://pypi.python.org/packages/"
8672 "e1/a4/a94c037bc72ad70441aff1403d3243510d2542ddca7759faaeffeb11aefe/"
8673 "requests-toolbelt-" version ".tar.gz"))
8674 (sha256
8675 (base32
8676 "15q9nrgp85nqlr4kdz1zvj8z2npafi2sr12y7fqgxbkq28j1aci6"))))
8677 (build-system python-build-system)
8678 (native-inputs
8679 `(("python-betamax" ,python-betamax)
8680 ("python-mock" ,python-mock)
8681 ("python-pytest" ,python-pytest)))
8682 (propagated-inputs
8683 `(("python-requests" ,python-requests)))
8684 (synopsis "Extensions to python-requests")
8685 (description "This is a toolbelt of useful classes and functions to be used
8686 with python-requests.")
8687 (home-page "https://github.com/sigmavirus24/requests-toolbelt")
8688 (license license:asl2.0)))
8689
8690 (define-public python-click-threading
8691 (package
8692 (name "python-click-threading")
8693 (version "0.2.0")
8694 (source (origin
8695 (method url-fetch)
8696 (uri (string-append
8697 "https://pypi.python.org/packages/"
8698 "fe/b7/e7f609d18a2a351cb71616adcf54df1acd82f83cb9b5936935a4d20e2c23/"
8699 "click-threading-" version ".tar.gz"))
8700 (sha256
8701 (base32
8702 "18bcqikxwb3drb8rf60cclxkxw52521b38ax3byah6j8cn8y9p4j"))))
8703 (build-system python-build-system)
8704 (propagated-inputs
8705 `(("python-click" ,python-click)))
8706 (synopsis "Utilities for multithreading in Click")
8707 (description "This package provides utilities for multithreading in Click
8708 applications.")
8709 (home-page "https://github.com/click-contrib/click-threading")
8710 (license license:expat)))
8711
8712 (define-public python-click-log
8713 (package
8714 (name "python-click-log")
8715 (version "0.1.8")
8716 (source (origin
8717 (method url-fetch)
8718 (uri (pypi-uri "click-log" version))
8719 (sha256
8720 (base32
8721 "14ikfjfgnzf21mjniq9lfk2igzykgzfvwwrk85nw2b9fq44109sp"))))
8722 (build-system python-build-system)
8723 (propagated-inputs
8724 `(("python-click" ,python-click)))
8725 (synopsis "Logging for click applications")
8726 (description "This package provides a Python library for logging Click
8727 applications.")
8728 (home-page "https://github.com/click-contrib/click-log")
8729 (license license:expat)))
8730
8731 (define-public python-apipkg
8732 (package
8733 (name "python-apipkg")
8734 (version "1.4")
8735 (source (origin
8736 (method url-fetch)
8737 (uri (pypi-uri "apipkg" version))
8738 (sha256
8739 (base32
8740 "1iks5701qnp3dlr3q1d9qm68y2plp2m029irhpz92a44psfkjf1f"))))
8741 (build-system python-build-system)
8742 (native-inputs
8743 `(("python-pytest" ,python-pytest)))
8744 (synopsis "Namespace control and lazy-import mechanism")
8745 (description "With apipkg you can control the exported namespace of a Python
8746 package and greatly reduce the number of imports for your users. It is a small
8747 pure Python module that works on virtually all Python versions.")
8748 (home-page "https://bitbucket.org/hpk42/apipkg")
8749 (license license:expat)))
8750
8751 (define-public python2-apipkg
8752 (package-with-python2 python-apipkg))
8753
8754 (define-public python-execnet
8755 (package
8756 (name "python-execnet")
8757 (version "1.4.1")
8758 (source (origin
8759 (method url-fetch)
8760 (uri (pypi-uri "execnet" version))
8761 (sha256
8762 (base32
8763 "1rpk1vyclhg911p3hql0m0nrpq7q7mysxnaaw6vs29cpa6kx8vgn"))))
8764 (build-system python-build-system)
8765 (arguments
8766 `(;; 2 failed, 275 passed, 670 skipped, 4 xfailed
8767 ;; The two test failures are caused by the lack of an `ssh` executable.
8768 ;; The test suite can be run with pytest after the 'install' phase.
8769 #:tests? #f))
8770 (native-inputs
8771 `(("python-pytest" ,python-pytest)
8772 ("python-setuptools-scm" ,python-setuptools-scm)))
8773 (propagated-inputs
8774 `(("python-apipkg" ,python-apipkg)))
8775 (synopsis "Rapid multi-Python deployment")
8776 (description "Execnet provides a share-nothing model with
8777 channel-send/receive communication for distributing execution across many
8778 Python interpreters across version, platform and network barriers. It has a
8779 minimal and fast API targeting the following uses:
8780 @enumerate
8781 @item distribute tasks to (many) local or remote CPUs
8782 @item write and deploy hybrid multi-process applications
8783 @item write scripts to administer multiple environments
8784 @end enumerate")
8785 (home-page "http://codespeak.net/execnet/")
8786 (license license:expat)))
8787
8788 (define-public python2-execnet
8789 (package-with-python2 python-execnet))
8790
8791 (define-public python-trollius-redis
8792 (package
8793 (name "python-trollius-redis")
8794 (version "0.1.4")
8795 (source
8796 (origin
8797 (method url-fetch)
8798 (uri (pypi-uri "trollius_redis" version))
8799 (sha256
8800 (base32
8801 "0k3vypszmgmaipgw9xscvgm79h2zd6p6ci8gdp5sxl6g5kbqr9fy"))))
8802 (build-system python-build-system)
8803 ;; TODO: Tests require packaging 'hiredis'.
8804 (arguments '(#:tests? #f))
8805 (home-page "https://github.com/benjolitz/trollius-redis")
8806 (synopsis "Port of asyncio-redis to trollius")
8807 (description "@code{trollius-redis} is a Redis client for Python
8808 trollius. It is an asynchronious IO (PEP 3156) implementation of the
8809 Redis protocol.")
8810 (license license:bsd-2)))
8811
8812 (define-public python2-trollius-redis
8813 (package-with-python2 python-trollius-redis))
8814
8815 ;;; The software provided by this package was integrated into pytest 2.8.
8816 (define-public python-pytest-cache
8817 (package
8818 (name "python-pytest-cache")
8819 (version "1.0")
8820 (source (origin
8821 (method url-fetch)
8822 (uri (pypi-uri "pytest-cache" version))
8823 (sha256
8824 (base32
8825 "1a873fihw4rhshc722j4h6j7g3nj7xpgsna9hhg3zn6ksknnhx5y"))))
8826 (build-system python-build-system)
8827 (propagated-inputs
8828 `(("python-apipkg" ,python-apipkg)
8829 ("python-execnet" ,python-execnet)
8830 ("python-py" ,python-py)
8831 ("python-pytest" ,python-pytest)))
8832 (synopsis "Py.test plugin with mechanisms for caching across test runs")
8833 (description "The pytest-cache plugin provides tools to rerun failures from
8834 the last py.test invocation.")
8835 (home-page "https://bitbucket.org/hpk42/pytest-cache/")
8836 (license license:expat)))
8837
8838 (define-public python2-pytest-cache
8839 (package-with-python2 python-pytest-cache))
8840
8841 (define-public python-pytest-localserver
8842 (package
8843 (name "python-pytest-localserver")
8844 (version "0.3.5")
8845 (source (origin
8846 (method url-fetch)
8847 (uri (pypi-uri "pytest-localserver" version))
8848 (sha256
8849 (base32
8850 "0dvqspjr6va55zwmnnc2mmpqc7mm65kxig9ya44x1z8aadzxpa4p"))))
8851 (build-system python-build-system)
8852 (arguments
8853 `(#:phases (modify-phases %standard-phases
8854 (replace 'check
8855 (lambda _
8856 (zero? (system* "py.test" "--genscript=runtests.py"))
8857 (zero? (system* "py.test")))))))
8858 (native-inputs
8859 `(("python-pytest" ,python-pytest)
8860 ("python-requests" ,python-requests)
8861 ("python-six" ,python-six)))
8862 (propagated-inputs
8863 `(("python-werkzeug" ,python-werkzeug)))
8864 (synopsis "Py.test plugin to test server connections locally")
8865 (description "Pytest-localserver is a plugin for the pytest testing
8866 framework which enables you to test server connections locally.")
8867 (home-page "https://pypi.python.org/pypi/pytest-localserver")
8868 (license license:expat)))
8869
8870 (define-public python-wsgi-intercept
8871 (package
8872 (name "python-wsgi-intercept")
8873 (version "1.2.2")
8874 (source (origin
8875 (method url-fetch)
8876 (uri (string-append
8877 "https://pypi.python.org/packages/"
8878 "38/76/ebcbc24d0cb77db34520a3ca6ed1bd43ace17d182bbd8dd7d976f1c176fb/"
8879 "wsgi_intercept-" version ".tar.gz"))
8880 (sha256
8881 (base32
8882 "0kjj2v2dvmnpdd5h5gk9rzz0f54rhjb0yiz3zg65bmp65slfw65d"))))
8883 (build-system python-build-system)
8884 (propagated-inputs
8885 `(("python-six" ,python-six)))
8886 (native-inputs
8887 `(("python-pytest" ,python-pytest)
8888 ("python-httplib2" ,python-httplib2)
8889 ("python-requests" ,python-requests)
8890 ("python-urllib3" ,python-urllib3)))
8891 (synopsis "Puts a WSGI application in place of a real URI for testing")
8892 (description "Wsgi_intercept installs a WSGI application in place of a real
8893 URI for testing. Testing a WSGI application normally involves starting a
8894 server at a local host and port, then pointing your test code to that address.
8895 Instead, this library lets you intercept calls to any specific host/port
8896 combination and redirect them into a WSGI application importable by your test
8897 program. Thus, you can avoid spawning multiple processes or threads to test
8898 your Web app.")
8899 (home-page "https://github.com/cdent/wsgi-intercept")
8900 (license license:expat)))
8901
8902 (define-public python-pytest-xprocess
8903 (package
8904 (name "python-pytest-xprocess")
8905 (version "0.9.1")
8906 (source (origin
8907 (method url-fetch)
8908 (uri (pypi-uri "pytest-xprocess" version))
8909 (sha256
8910 (base32
8911 "17zlql1xqw3ywcgwwbqmw633aly99lab12hm02asr8awvg5603pp"))))
8912 (build-system python-build-system)
8913 (propagated-inputs
8914 `(("python-pytest" ,python-pytest)
8915 ("python-pytest-cache" ,python-pytest-cache)
8916 ("python-psutil" ,python-psutil)))
8917 (synopsis "Pytest plugin to manage external processes across test runs")
8918 (description "Pytest-xprocess is an experimental py.test plugin for managing
8919 processes across test runs.")
8920 (home-page "https://bitbucket.org/pytest-dev/pytest-xprocess")
8921 (license license:expat)))
8922
8923 (define-public python-icalendar
8924 (package
8925 (name "python-icalendar")
8926 (version "3.11.4")
8927 (source (origin
8928 (method url-fetch)
8929 (uri (pypi-uri "icalendar" version))
8930 (sha256
8931 (base32
8932 "0ix3xxykz8hs8mx4f2063djawmd888y3vsl75fbvbfqvg67v35jn"))))
8933 (build-system python-build-system)
8934 (propagated-inputs
8935 `(("python-dateutil" ,python-dateutil)
8936 ("python-pytz" ,python-pytz)))
8937 (synopsis "Python library for parsing iCalendar files")
8938 (description "The icalendar package is a parser/generator of iCalendar
8939 files for use with Python.")
8940 (home-page "https://github.com/collective/icalendar")
8941 (license license:bsd-2)))
8942
8943 (define-public python-sphinxcontrib-newsfeed
8944 (package
8945 (name "python-sphinxcontrib-newsfeed")
8946 (version "0.1.4")
8947 (source (origin
8948 (method url-fetch)
8949 (uri (pypi-uri "sphinxcontrib-newsfeed" version))
8950 (sha256
8951 (base32
8952 "1d7gam3mn8v4in4p16yn3v10vps7nnaz6ilw99j4klij39dqd37p"))))
8953 (arguments '(#:tests? #f)) ; No tests.
8954 (build-system python-build-system)
8955 (propagated-inputs
8956 `(("python-sphinx" ,python-sphinx)))
8957 (synopsis "News Feed extension for Sphinx")
8958 (description "Sphinxcontrib-newsfeed is an extension for adding a simple
8959 Blog, News or Announcements section to a Sphinx website.")
8960 (home-page "https://bitbucket.org/prometheus/sphinxcontrib-newsfeed")
8961 (license license:bsd-2)))
8962
8963 (define-public python-args
8964 (package
8965 (name "python-args")
8966 (version "0.1.0")
8967 (source (origin
8968 (method url-fetch)
8969 (uri (pypi-uri "args" version))
8970 (sha256
8971 (base32
8972 "057qzi46h5dmxdqknsbrssn78lmqjlnm624iqdhrnpk26zcbi1d7"))))
8973 (build-system python-build-system)
8974 (home-page "https://github.com/kennethreitz/args")
8975 (synopsis "Command-line argument parser")
8976 (description
8977 "This library provides a Python module to parse command-line arguments.")
8978 (license license:bsd-3)))
8979
8980 (define-public python2-args
8981 (package-with-python2 python-args))
8982
8983 (define-public python-clint
8984 (package
8985 (name "python-clint")
8986 (version "0.5.1")
8987 (source (origin
8988 (method url-fetch)
8989 (uri (pypi-uri "clint" version))
8990 (sha256
8991 (base32
8992 "1an5lkkqk1zha47198p42ji3m94xmzx1a03dn7866m87n4r4q8h5"))))
8993 (build-system python-build-system)
8994 (arguments
8995 '(#:phases
8996 (modify-phases %standard-phases
8997 (replace 'check
8998 (lambda _
8999 (zero? (system* "py.test" "-v")))))))
9000 (native-inputs
9001 `(("python-pytest" ,python-pytest)))
9002 (propagated-inputs
9003 `(("python-args" ,python-args)))
9004 (home-page "https://github.com/kennethreitz/clint")
9005 (synopsis "Command-line interface tools")
9006 (description
9007 "Clint is a Python module filled with a set of tools for developing
9008 command-line applications, including tools for colored and indented
9009 output, progress bar display, and pipes.")
9010 (license license:isc)))
9011
9012 (define-public python2-clint
9013 (package-with-python2 python-clint))
9014
9015 (define-public python-astor
9016 (package
9017 (name "python-astor")
9018 (version "0.5")
9019 (source (origin
9020 (method url-fetch)
9021 (uri (pypi-uri "astor" version))
9022 (sha256
9023 (base32
9024 "1fdafq5hkis1fxqlmhw0sn44zp2ar46nxhbc22cvwg7hsd8z5gsa"))))
9025 (build-system python-build-system)
9026 (home-page "https://github.com/berkerpeksag/astor")
9027 (synopsis "Read and write Python ASTs")
9028 (description
9029 "Astor is designed to allow easy manipulation of Python source via the
9030 Abstract Syntax Tree.")
9031 (license license:bsd-3)))
9032
9033 (define-public python2-astor
9034 (package-with-python2 python-astor))
9035
9036 (define-public python-rply
9037 (package
9038 (name "python-rply")
9039 (version "0.7.4")
9040 (source (origin
9041 (method url-fetch)
9042 (uri (pypi-uri "rply" version))
9043 (sha256
9044 (base32
9045 "12rp1d9ba7nvd5rhaxi6xzx1rm67r1k1ylsrkzhpwnphqpb06cvj"))))
9046 (build-system python-build-system)
9047 (propagated-inputs
9048 `(("python-appdirs" ,python-appdirs)))
9049 (home-page "https://github.com/alex/rply")
9050 (synopsis "Parser generator for Python")
9051 (description
9052 "This package provides a pure Python based parser generator, that also
9053 works with RPython. It is a more-or-less direct port of David Bazzley's PLY,
9054 with a new public API, and RPython support.")
9055 (license license:bsd-3)))
9056
9057 (define-public python2-rply
9058 (package-with-python2 python-rply))
9059
9060 (define-public python-hy
9061 (package
9062 (name "python-hy")
9063 (version "0.11.1")
9064 (source (origin
9065 (method url-fetch)
9066 (uri (pypi-uri "hy" version))
9067 (sha256
9068 (base32
9069 "1msqv747iz12r73mz4qvsmlwkddwjvrahlrk7ysrcz07h7dsscxs"))))
9070 (build-system python-build-system)
9071 (arguments
9072 '(#:phases
9073 (modify-phases %standard-phases
9074 (replace 'check
9075 (lambda _
9076 ;; Tests require write access to HOME.
9077 (setenv "HOME" "/tmp")
9078 (zero? (system* "nosetests")))))))
9079 (native-inputs
9080 `(("python-coverage" ,python-coverage)
9081 ("python-nose" ,python-nose)))
9082 (propagated-inputs
9083 `(("python-astor" ,python-astor)
9084 ("python-clint" ,python-clint)
9085 ("python-rply" ,python-rply)))
9086 (home-page "http://hylang.org/")
9087 (synopsis "Lisp frontend to Python")
9088 (description
9089 "Hy is a dialect of Lisp that's embedded in Python. Since Hy transforms
9090 its Lisp code into the Python Abstract Syntax Tree, you have the whole world of
9091 Python at your fingertips, in Lisp form.")
9092 (license license:expat)))
9093
9094 (define-public python2-hy
9095 (package-with-python2 python-hy))
9096
9097 (define-public python-rauth
9098 (package
9099 (name "python-rauth")
9100 (version "0.7.3")
9101 (source
9102 (origin
9103 (method url-fetch)
9104 (uri (pypi-uri "rauth" version))
9105 (sha256
9106 (base32
9107 "02kv8w8l98ky223avyq7vw7x1f2ya9chrm59r77ylq45qb0xnk2j"))))
9108 (build-system python-build-system)
9109 (arguments
9110 `(#:test-target "check"))
9111 (propagated-inputs
9112 `(("python-requests" ,python-requests)))
9113 (home-page "https://github.com/litl/rauth")
9114 (synopsis "Python library for OAuth 1.0/a, 2.0, and Ofly")
9115 (description
9116 "Rauth is a Python library for OAuth 1.0/a, 2.0, and Ofly. It also
9117 provides service wrappers for convenient connection initialization and
9118 authenticated session objects providing things like keep-alive.")
9119 (license license:expat)
9120 (properties `((python2-variant . ,(delay python2-rauth))))))
9121
9122 (define-public python2-rauth
9123 (let ((base (package-with-python2 (strip-python2-variant python-rauth))))
9124 (package
9125 (inherit base)
9126 (native-inputs `(("python2-unittest2" ,python2-unittest2)
9127 ,@(package-native-inputs base))))))
9128
9129 (define-public python2-functools32
9130 (package
9131 (name "python2-functools32")
9132 (version "3.2.3-2")
9133 (source
9134 (origin
9135 (method url-fetch)
9136 (uri (pypi-uri "functools32" version))
9137 (sha256
9138 (base32
9139 "0v8ya0b58x47wp216n1zamimv4iw57cxz3xxhzix52jkw3xks9gn"))))
9140 (build-system python-build-system)
9141 (arguments
9142 `(#:python ,python-2
9143 #:tests? #f)) ; no test target
9144 (home-page "https://github.com/MiCHiLU/python-functools32")
9145 (synopsis
9146 "Backport of the functools module from Python 3.2.3")
9147 (description
9148 "This package is a backport of the @code{functools} module from Python
9149 3.2.3 for use with older versions of Python and PyPy.")
9150 (license license:expat)))
9151
9152 (define-public python2-subprocess32
9153 (package
9154 (name "python2-subprocess32")
9155 (version "3.2.7")
9156 (source (origin
9157 (method url-fetch)
9158 (uri (pypi-uri "subprocess32" version))
9159 (sha256
9160 (base32
9161 "14350dhhlhyz5gqzi3lihn9m6lvskx5mcb20srx1kgsk9i50li8y"))
9162 (patches
9163 (search-patches "python2-subprocess32-disable-input-test.patch"))))
9164 (build-system python-build-system)
9165 (arguments
9166 `(#:python ,python-2
9167 #:phases
9168 (modify-phases %standard-phases
9169 (add-after 'unpack 'patch-/bin/sh
9170 (lambda _
9171 (substitute* '("subprocess32.py"
9172 "test_subprocess32.py")
9173 (("/bin/sh") (which "sh")))
9174 #t))
9175 (delete 'check)
9176 (add-after 'install 'check
9177 (lambda* (#:key inputs outputs #:allow-other-keys)
9178 ;; For some reason this package fails to import
9179 ;; _posixsubprocess.so when PYTHONPATH is set to the build
9180 ;; directory. Running tests after install is easier.
9181 (add-installed-pythonpath inputs outputs)
9182 (zero? (system* "python" "test_subprocess32.py")))))))
9183 (home-page "https://github.com/google/python-subprocess32")
9184 (synopsis "Backport of the subprocess module from Python 3.2")
9185 (description
9186 "This is a backport of the @code{subprocess} standard library module
9187 from Python 3.2 and 3.3 for use on Python 2. It includes bugfixes and some
9188 new features. On POSIX systems it is guaranteed to be reliable when used
9189 in threaded applications. It includes timeout support from Python 3.3 but
9190 otherwise matches 3.2’s API.")
9191 (license license:psfl)))
9192
9193 (define-public python2-futures
9194 (package
9195 (name "python2-futures")
9196 (version "3.0.5")
9197 (source
9198 (origin
9199 (method url-fetch)
9200 (uri (pypi-uri "futures" version))
9201 (sha256
9202 (base32
9203 "1pw1z4329xvlabdpwqa6b7v2fxf7hl64m4cgr22ckbym8m8m4hh5"))))
9204 (build-system python-build-system)
9205 (arguments `(#:python ,python-2))
9206 (home-page "https://github.com/agronholm/pythonfutures")
9207 (synopsis
9208 "Backport of the concurrent.futures package from Python 3.2")
9209 (description
9210 "The concurrent.futures module provides a high-level interface for
9211 asynchronously executing callables. This package backports the
9212 concurrent.futures package from Python 3.2")
9213 (license license:bsd-3)))
9214
9215 (define-public python-promise
9216 (package
9217 (name "python-promise")
9218 (version "0.4.2")
9219 (source
9220 (origin
9221 (method url-fetch)
9222 (uri (pypi-uri "promise" version))
9223 (sha256
9224 (base32
9225 "1k19ms8l3d5jzjh557rgkxb5sg4mqgfc315rn4hx1z3n8qq6lr3h"))))
9226 (build-system python-build-system)
9227 ;; Tests wants python-futures, which is a python2 only program, and
9228 ;; can't be found by python-promise at test time.
9229 (arguments `(#:tests? #f))
9230 (home-page "https://github.com/syrusakbary/promise")
9231 (synopsis "Promises/A+ implementation for Python")
9232 (description
9233 "Promises/A+ implementation for Python")
9234 (properties `((python2-variant . ,(delay python2-promise))))
9235 (license license:expat)))
9236
9237 (define-public python2-promise
9238 (let ((promise (package-with-python2
9239 (strip-python2-variant python-promise))))
9240 (package (inherit promise)
9241 (arguments (substitute-keyword-arguments (package-arguments promise)
9242 ((#:tests? _) #t)))
9243 (native-inputs
9244 `(("python2-futures" ,python2-futures)
9245 ("python2-pytest" ,python2-pytest)
9246 ,@(package-native-inputs promise))))))
9247
9248 (define-public python-urllib3
9249 (package
9250 (name "python-urllib3")
9251 (version "1.18.1")
9252 (source
9253 (origin
9254 (method url-fetch)
9255 (uri (pypi-uri "urllib3" version))
9256 (sha256
9257 (base32
9258 "1wb8aqnq53vzh2amrv8kc66f3h6fx217y0q62y6n30a64p2yqmam"))))
9259 (build-system python-build-system)
9260 (arguments `(#:tests? #f))
9261 (native-inputs
9262 `(;; some packages for tests
9263 ("python-nose" ,python-nose)
9264 ("python-mock" ,python-mock)
9265 ("python-tornado" ,python-tornado)))
9266 (propagated-inputs
9267 `(;; extra packages for https security
9268 ("python-certifi" ,python-certifi)
9269 ("python-ndg-httpsclient" ,python-ndg-httpsclient)
9270 ("python-pyasn1" ,python-pyasn1)
9271 ("python-pyopenssl" ,python-pyopenssl)))
9272 (home-page "https://urllib3.readthedocs.org/")
9273 (synopsis "HTTP library with thread-safe connection pooling")
9274 (description
9275 "Urllib3 supports features left out of urllib and urllib2 libraries. It
9276 can reuse the same socket connection for multiple requests, it can POST files,
9277 supports url redirection and retries, and also gzip and deflate decoding.")
9278 (license license:expat)))
9279
9280 (define-public python2-urllib3
9281 (package-with-python2 python-urllib3))
9282
9283 (define-public python-colorama
9284 (package
9285 (name "python-colorama")
9286 (version "0.3.7")
9287 (source
9288 (origin
9289 (method url-fetch)
9290 (uri (pypi-uri "colorama" version))
9291 (sha256
9292 (base32
9293 "0avqkn6362v7k2kg3afb35g4sfdvixjgy890clip4q174p9whhz0"))))
9294 (build-system python-build-system)
9295 (synopsis "Colored terminal text rendering for Python")
9296 (description "Colorama is a Python library for rendering colored terminal
9297 text.")
9298 (home-page "https://pypi.python.org/pypi/colorama")
9299 (license license:bsd-3)))
9300
9301 (define-public python2-colorama
9302 (package-with-python2 python-colorama))
9303
9304 (define-public python-rsa
9305 (package
9306 (name "python-rsa")
9307 (version "3.4.2")
9308 (source
9309 (origin
9310 (method url-fetch)
9311 (uri (pypi-uri "rsa" version))
9312 (sha256
9313 (base32
9314 "1dcxvszbikgzh99ybdc7jq0zb9wspy2ds8z9mjsqiyv3q884xpr5"))))
9315 (build-system python-build-system)
9316 (propagated-inputs
9317 `(("python-pyasn1" ,python-pyasn1)))
9318 (synopsis "Pure-Python RSA implementation")
9319 (description "Python-RSA is a pure-Python RSA implementation. It supports
9320 encryption and decryption, signing and verifying signatures, and key
9321 generation according to PKCS#1 version 1.5. It can be used as a Python
9322 library as well as on the command line.")
9323 (home-page "http://stuvel.eu/rsa")
9324 (license license:asl2.0)))
9325
9326 (define-public python2-rsa
9327 (package-with-python2 python-rsa))
9328
9329 (define-public python-pluggy
9330 (package
9331 (name "python-pluggy")
9332 (version "0.3.1")
9333 (source
9334 (origin
9335 (method url-fetch)
9336 (uri (pypi-uri "pluggy" version))
9337 (sha256
9338 (base32
9339 "18qfzfm40bgx672lkg8q9x5hdh76n7vax99aank7vh2nw21wg70m"))))
9340 (build-system python-build-system)
9341 (synopsis "Plugin and hook calling mechanism for Python")
9342 (description "Pluggy is an extraction of the plugin manager as used by
9343 Pytest but stripped of Pytest specific details.")
9344 (home-page "https://pypi.python.org/pypi/pluggy")
9345 (license license:expat)))
9346
9347 (define-public python2-pluggy
9348 (package-with-python2 python-pluggy))
9349
9350 (define-public python-tox
9351 (package
9352 (name "python-tox")
9353 (version "2.3.1")
9354 (source
9355 (origin
9356 (method url-fetch)
9357 (uri (pypi-uri "tox" version))
9358 (sha256
9359 (base32
9360 "1vj73ar4rimq3fwy5r2z3jv4g9qbh8rmpmncsc00g0k310acqzxz"))))
9361 (build-system python-build-system)
9362 (arguments
9363 ;; FIXME: Tests require pytest-timeout, which itself requires
9364 ;; pytest>=2.8.0 for installation.
9365 '(#:tests? #f))
9366 (propagated-inputs
9367 `(("python-pluggy" ,python-pluggy) ; >=0.3.0,<0.4.0
9368 ("python-py" ,python-py)
9369 ("python-virtualenv" ,python-virtualenv)))
9370 (native-inputs
9371 `(; FIXME: Missing: ("python-pytest-timeout" ,python-pytest-timeout)
9372 ("python-pytest" ,python-pytest))) ; >= 2.3.5
9373 (home-page "http://tox.testrun.org/")
9374 (synopsis "Virtualenv-based automation of test activities")
9375 (description "Tox is a generic virtualenv management and test command line
9376 tool. It can be used to check that a package installs correctly with
9377 different Python versions and interpreters, or run tests in each type of
9378 supported environment, or act as a frontend to continuous integration
9379 servers.")
9380 (license license:expat)))
9381
9382 (define-public python2-tox
9383 (package-with-python2 python-tox))
9384
9385 (define-public python-jmespath
9386 (package
9387 (name "python-jmespath")
9388 (version "0.9.0")
9389 (source
9390 (origin
9391 (method url-fetch)
9392 (uri (pypi-uri "jmespath" version))
9393 (sha256
9394 (base32
9395 "0g9xvl69y7nr3w7ag4fsp6sm4fqf6vrqjw7504x2hzrrsh3ampq8"))))
9396 (build-system python-build-system)
9397 (native-inputs
9398 `(("python-nose" ,python-nose)))
9399 (synopsis "JSON Matching Expressions")
9400 (description "JMESPath (pronounced “james path”) is a Python library that
9401 allows one to declaratively specify how to extract elements from a JSON
9402 document.")
9403 (home-page "https://github.com/jmespath/jmespath.py")
9404 (license license:expat)))
9405
9406 (define-public python2-jmespath
9407 (package-with-python2 python-jmespath))
9408
9409 (define-public python-botocore
9410 (package
9411 (name "python-botocore")
9412 (version "1.5.26")
9413 (source
9414 (origin
9415 (method url-fetch)
9416 (uri (pypi-uri "botocore" version))
9417 (sha256
9418 (base32
9419 "1b7l48hr88galrrc5q6k21z3sdadzxc87ppzs7k9fz4p1w8bfnvb"))))
9420 (build-system python-build-system)
9421 (arguments
9422 ;; FIXME: Many tests are failing.
9423 '(#:tests? #f))
9424 (propagated-inputs
9425 `(("python-dateutil" ,python-dateutil)
9426 ("python-docutils" ,python-docutils)
9427 ("python-jmespath" ,python-jmespath)))
9428 (native-inputs
9429 `(("python-mock" ,python-mock)
9430 ("python-nose" ,python-nose)
9431 ("behave" ,behave)
9432 ("python-tox" ,python-tox)
9433 ("python-wheel" ,python-wheel)))
9434 (home-page "https://github.com/boto/botocore")
9435 (synopsis "Low-level interface to AWS")
9436 (description "Botocore is a Python library that provides a low-level
9437 interface to the Amazon Web Services (AWS) API.")
9438 (license license:asl2.0)))
9439
9440 (define-public python2-botocore
9441 (package-with-python2 python-botocore))
9442
9443 (define-public awscli
9444 (package
9445 (name "awscli")
9446 (version "1.11.63")
9447 (source
9448 (origin
9449 (method url-fetch)
9450 (uri (pypi-uri name version))
9451 (sha256
9452 (base32
9453 "1r8aqv8w27k76lcsfk83w6qw9lz8gk2ibzwacp5wjhpp2gik911m"))))
9454 (build-system python-build-system)
9455 (propagated-inputs
9456 `(("python-colorama" ,python-colorama)
9457 ("python-botocore" ,python-botocore)
9458 ("python-s3transfer" ,python-s3transfer)
9459 ("python-docutils" ,python-docutils)
9460 ("python-pyyaml" ,python-pyyaml)
9461 ("python-rsa" ,python-rsa)))
9462 (arguments
9463 ;; FIXME: The 'pypi' release does not contain tests.
9464 '(#:tests? #f))
9465 (home-page "https://aws.amazon.com/cli/")
9466 (synopsis "Command line client for AWS")
9467 (description "AWS CLI provides a unified command line interface to the
9468 Amazon Web Services (AWS) API.")
9469 (license license:asl2.0)))
9470
9471 (define-public python-hypothesis
9472 (package
9473 (name "python-hypothesis")
9474 (version "3.1.0")
9475 (source (origin
9476 (method url-fetch)
9477 (uri (pypi-uri "hypothesis" version))
9478 (sha256
9479 (base32
9480 "0qyqq9akm4vshhn8cngjc1qykcvsn7cz6dlm6njfsgpbraqrmbbw"))))
9481 (build-system python-build-system)
9482 (native-inputs
9483 `(("python-flake8" ,python-flake8)
9484 ("python-pytest" ,python-pytest)))
9485 (synopsis "Library for property based testing")
9486 (description "Hypothesis is a library for testing your Python code against a
9487 much larger range of examples than you would ever want to write by hand. It’s
9488 based on the Haskell library, Quickcheck, and is designed to integrate
9489 seamlessly into your existing Python unit testing work flow.")
9490 (home-page "https://github.com/DRMacIver/hypothesis")
9491 (license license:mpl2.0)
9492 (properties `((python2-variant . ,(delay python2-hypothesis))))))
9493
9494 (define-public python2-hypothesis
9495 (let ((hypothesis (package-with-python2
9496 (strip-python2-variant python-hypothesis))))
9497 (package (inherit hypothesis)
9498 (native-inputs
9499 `(("python2-enum34" ,python2-enum34)
9500 ,@(package-native-inputs hypothesis))))))
9501
9502 (define-public python-pytest-subtesthack
9503 (package
9504 (name "python-pytest-subtesthack")
9505 (version "0.1.1")
9506 (source (origin
9507 (method url-fetch)
9508 (uri (pypi-uri "pytest-subtesthack" version))
9509 (sha256
9510 (base32
9511 "15kzcr5pchf3id4ikdvlv752rc0j4d912n589l4rifp8qsj19l1x"))))
9512 (build-system python-build-system)
9513 (propagated-inputs
9514 `(("python-pytest" ,python-pytest)))
9515 (synopsis "Set-up and tear-down fixtures for unit tests")
9516 (description "This plugin allows you to set up and tear down fixtures within
9517 unit test functions that use @code{py.test}. This is useful for using
9518 @command{hypothesis} inside py.test, as @command{hypothesis} will call the test
9519 function multiple times, without setting up or tearing down fixture state as is
9520 normally the case.")
9521 (home-page "https://github.com/untitaker/pytest-subtesthack/")
9522 (license license:unlicense)))
9523
9524 (define-public python2-pytest-subtesthack
9525 (package-with-python2 python-pytest-subtesthack))
9526
9527 (define-public python-xdo
9528 (package
9529 (name "python-xdo")
9530 (version "0.3")
9531 (source (origin
9532 (method url-fetch)
9533 (uri (string-append
9534 "http://http.debian.net/debian/pool/main/p/python-xdo/"
9535 "python-xdo_" version ".orig.tar.gz"))
9536 (sha256
9537 (base32
9538 "1vqh1n5yy5dhnq312kwrl90fnck4v26is3lq3lxdvcn60vv19da0"))))
9539 (build-system python-build-system)
9540 (arguments
9541 '(#:phases
9542 (modify-phases %standard-phases
9543 (add-before 'install 'patch-libxdo-path
9544 ;; Hardcode the path of dynamically loaded libxdo library.
9545 (lambda* (#:key inputs #:allow-other-keys)
9546 (let ((libxdo (string-append
9547 (assoc-ref inputs "xdotool")
9548 "/lib/libxdo.so")))
9549 (substitute* "xdo/_xdo.py"
9550 (("find_library\\(\"xdo\"\\)")
9551 (simple-format #f "\"~a\"" libxdo)))
9552 #t))))
9553 #:tests? #f)) ; no tests provided
9554 (propagated-inputs
9555 `(("python-six" ,python-six)))
9556 (inputs
9557 `(("xdotool" ,xdotool)
9558 ("libX11" ,libx11)))
9559 (home-page "https://tracker.debian.org/pkg/python-xdo")
9560 (synopsis "Python library for simulating X11 keyboard/mouse input")
9561 (description "Provides bindings to libxdo for manipulating X11 via simulated
9562 input. (Note that this is mostly a legacy library; you may wish to look at
9563 python-xdo for newer bindings.)")
9564 (license license:bsd-3)))
9565
9566 (define-public python2-xdo
9567 (package-with-python2 python-xdo))
9568
9569 (define-public python-wtforms
9570 (package
9571 (name "python-wtforms")
9572 (version "2.1")
9573 (source
9574 (origin
9575 (method url-fetch)
9576 (uri (pypi-uri "WTForms" version ".zip"))
9577 (sha256
9578 (base32
9579 "0vyl26y9cg409cfyj8rhqxazsdnd0jipgjw06civhrd53yyi1pzz"))))
9580 (build-system python-build-system)
9581 (arguments
9582 '(#:phases
9583 (modify-phases %standard-phases
9584 (add-after 'unpack 'remove-django-test
9585 ;; Don't fail the tests when the inputs for the optional tests cannot be found.
9586 (lambda _
9587 (substitute*
9588 "tests/runtests.py"
9589 (("'ext_django.tests', 'ext_sqlalchemy', 'ext_dateutil', 'locale_babel'") "")
9590 (("sys.stderr.write(\"### Disabled test '%s', dependency not found\n\" % name)") ""))
9591 #t)))))
9592 (native-inputs
9593 `(("unzip" ,unzip)))
9594 (home-page "http://wtforms.simplecodes.com/")
9595 (synopsis
9596 "Form validation and rendering library for Python web development")
9597 (description
9598 "WTForms is a flexible forms validation and rendering library
9599 for Python web development. It is very similar to the web form API
9600 available in Django, but is a standalone package.")
9601 (license license:bsd-3)))
9602
9603 (define-public python2-wtforms
9604 (package-with-python2 python-wtforms))
9605
9606 (define-public python-mako
9607 (package
9608 (name "python-mako")
9609 (version "1.0.6")
9610 (source
9611 (origin
9612 (method url-fetch)
9613 (uri (pypi-uri "Mako" version))
9614 (sha256
9615 (base32
9616 "03dyxgjknp4ffsv7vwfd28l5bbpzi0ylp20543wpg3iahyyrwma8"))))
9617 (build-system python-build-system)
9618 (propagated-inputs
9619 `(("python-markupsafe" ,python-markupsafe)))
9620 (native-inputs
9621 `(("python-mock" ,python-mock)
9622 ("python-nose" ,python-nose)
9623 ("python-pytest" ,python-pytest)))
9624 (home-page "http://www.makotemplates.org/")
9625 (synopsis "Templating language for Python")
9626 (description "Mako is a templating language for Python that compiles
9627 templates into Python modules.")
9628 (license license:expat)))
9629
9630 (define-public python2-mako
9631 (package-with-python2 python-mako))
9632
9633 (define-public python-waitress
9634 (package
9635 (name "python-waitress")
9636 (version "0.8.10")
9637 (source
9638 (origin
9639 (method url-fetch)
9640 (uri (pypi-uri "waitress" version))
9641 (sha256
9642 (base32
9643 "017n9ra6vvmq9d5sfhdzyzr1mg15x2hj2dhm4pdlw98c1ypw2h3w"))))
9644 (build-system python-build-system)
9645 (home-page "https://github.com/Pylons/waitress")
9646 (synopsis "Waitress WSGI server")
9647 (description "Waitress is meant to be a production-quality pure-Python WSGI
9648 server with very acceptable performance.")
9649 (license license:zpl2.1)))
9650
9651 (define-public python2-waitress
9652 (package-with-python2 python-waitress))
9653
9654 (define-public python-wsgiproxy2
9655 (package
9656 (name "python-wsgiproxy2")
9657 (version "0.4.2")
9658 (source
9659 (origin
9660 (method url-fetch)
9661 (uri (pypi-uri "WSGIProxy2" version ".zip"))
9662 (sha256
9663 (base32
9664 "13kf9bdxrc95y9vriaz0viry3ah11nz4rlrykcfvb8nlqpx3dcm4"))))
9665 (build-system python-build-system)
9666 (arguments
9667 '(;; Wsgiproxy2's test suite requires Restkit, which does not yet fully
9668 ;; support Python 3:
9669 ;; https://github.com/benoitc/restkit/issues/140
9670 #:tests? #f))
9671 (native-inputs
9672 `(("unzip" ,unzip)
9673 ("python-nose" ,python-nose)
9674 ("python-coverage" ,python-coverage)))
9675 (propagated-inputs
9676 `(("python-six" ,python-six)
9677 ("python-webob" ,python-webob)))
9678 (home-page
9679 "https://github.com/gawel/WSGIProxy2/")
9680 (synopsis "WSGI Proxy with various http client backends")
9681 (description "WSGI turns HTTP requests into WSGI function calls.
9682 WSGIProxy turns WSGI function calls into HTTP requests.
9683 It also includes code to sign requests and pass private data,
9684 and to spawn subprocesses to handle requests.")
9685 (license license:expat)))
9686
9687 (define-public python2-wsgiproxy2
9688 (package-with-python2 python-wsgiproxy2))
9689
9690 (define-public python-pastedeploy
9691 (package
9692 (name "python-pastedeploy")
9693 (version "1.5.2")
9694 (source
9695 (origin
9696 (method url-fetch)
9697 (uri (pypi-uri "PasteDeploy" version))
9698 (sha256
9699 (base32
9700 "1jz3m4hq8v6hyhfjz9425nd3nvn52cvbfipdcd72krjmla4qz1fm"))))
9701 (build-system python-build-system)
9702 (native-inputs
9703 `(("python-nose" ,python-nose)))
9704 (home-page "http://pythonpaste.org/deploy/")
9705 (synopsis
9706 "Load, configure, and compose WSGI applications and servers")
9707 (description
9708 "This tool provides code to load WSGI applications and servers from URIs;
9709 these URIs can refer to Python Eggs for INI-style configuration files. Paste
9710 Script provides commands to serve applications based on this configuration
9711 file.")
9712 (license license:expat)))
9713
9714 (define-public python2-pastedeploy
9715 (package-with-python2 python-pastedeploy))
9716
9717 (define-public python-paste
9718 (package
9719 (name "python-paste")
9720 (version "2.0.3")
9721 (source
9722 (origin
9723 (method url-fetch)
9724 (uri (pypi-uri "Paste" version))
9725 (sha256
9726 (base32
9727 "062jk0nlxf6lb2wwj6zc20rlvrwsnikpkh90y0dn8cjch93s6ii3"))
9728 (patches (search-patches "python-paste-remove-website-test.patch"
9729 "python-paste-remove-timing-test.patch"))))
9730 (build-system python-build-system)
9731 (native-inputs
9732 `(("python-nose" ,python-nose)))
9733 (propagated-inputs
9734 `(("python-six" ,python-six)))
9735 (home-page "http://pythonpaste.org")
9736 (synopsis
9737 "Python web development tools, focusing on WSGI")
9738 (description
9739 "Paste provides a variety of web development tools and middleware which
9740 can be nested together to build web applications. Paste's design closely
9741 follows ideas flowing from WSGI (Web Standard Gateway Interface).")
9742 (license license:expat)))
9743
9744 (define-public python2-paste
9745 (package-with-python2 python-paste))
9746
9747 (define-public python-pastescript
9748 (package
9749 (name "python-pastescript")
9750 (version "2.0.2")
9751 (source
9752 (origin
9753 (method url-fetch)
9754 (uri (pypi-uri "PasteScript" version))
9755 (sha256
9756 (base32
9757 "1h3nnhn45kf4pbcv669ik4faw04j58k8vbj1hwrc532k0nc28gy0"))))
9758 (build-system python-build-system)
9759 (native-inputs
9760 `(("python-nose" ,python-nose)))
9761 (propagated-inputs
9762 `(("python-paste" ,python-paste)
9763 ("python-pastedeploy" ,python-pastedeploy)))
9764 (home-page "http://pythonpaste.org/script/")
9765 (arguments
9766 '(;; Unfortunately, this requires the latest unittest2,
9767 ;; but that requires traceback2 which requires linecache2 which requires
9768 ;; unittest2. So we're skipping tests for now.
9769 ;; (Note: Apparently linetest2 only needs unittest2 for its tests,
9770 ;; so in theory we could get around this situation somehow.)
9771 #:tests? #f))
9772 (synopsis
9773 "Pluggable command line tool for serving web applications and more")
9774 (description
9775 "PasteScript is a plugin-friendly command line tool which provides a
9776 variety of features, from launching web applications to bootstrapping project
9777 layouts.")
9778 (license license:expat)))
9779
9780 (define-public python2-pastescript
9781 (package-with-python2 python-pastescript))
9782
9783 (define-public python-pyquery
9784 (package
9785 (name "python-pyquery")
9786 (version "1.2.17")
9787 (source
9788 (origin
9789 (method url-fetch)
9790 (uri (pypi-uri "pyquery" version))
9791 (sha256
9792 (base32
9793 "1xia20wm0vx5dk85kcwgh13bylz8qh47ffjxssd2586r60xi783a"))))
9794 (build-system python-build-system)
9795 (native-inputs
9796 `(("python-webob" ,python-webob)
9797 ("python-webtest" ,python-webtest)))
9798 (propagated-inputs
9799 `(("python-lxml" ,python-lxml)
9800 ("python-cssselect" ,python-cssselect)))
9801 (home-page "https://github.com/gawel/pyquery")
9802 (synopsis "Make jQuery-like queries on xml documents")
9803 (description "pyquery allows you to make jQuery queries on xml documents.
9804 The API is as much as possible the similar to jQuery. pyquery uses lxml for
9805 fast xml and html manipulation.")
9806 (license license:bsd-3)))
9807
9808 (define-public python2-pyquery
9809 (package-with-python2 python-pyquery))
9810
9811 (define-public python-webtest
9812 (package
9813 (name "python-webtest")
9814 (version "2.0.20")
9815 (source
9816 (origin
9817 (method url-fetch)
9818 (uri (pypi-uri "WebTest" version))
9819 (sha256
9820 (base32
9821 "0bv0qhdjakdsdgj4sk21gnpp8xp8bga4x03p6gjb83ihrsb7n4xv"))))
9822 (build-system python-build-system)
9823 (arguments
9824 `(;; Unfortunately we have to disable tests!
9825 ;; This release of WebTest is pinned to python-nose < 1.3,
9826 ;; but older versions of python-nose are plagued with the following
9827 ;; bug(s), which rears its ugly head during test execution:
9828 ;; https://github.com/nose-devs/nose/issues/759
9829 ;; https://github.com/nose-devs/nose/pull/811
9830 #:tests? #f))
9831 ;; Commented out code is no good, but in this case, once tests
9832 ;; are ready to be enabled again, we should put the following
9833 ;; in place:
9834 ;; (native-inputs
9835 ;; `(("python-nose" ,python-nose) ; technially < 1.3,
9836 ;; ; but see above comment
9837 ;; ("python-coverage" ,python-coverage)
9838 ;; ("python-mock" ,python-mock)
9839 ;; ("python-pastedeploy" ,python-pastedeploy)
9840 ;; ("python-wsgiproxy2" ,python-wsgiproxy2)
9841 ;; ("python-pyquery" ,python-pyquery)))
9842 (propagated-inputs
9843 `(("python-waitress" ,python-waitress)
9844 ("python-webob" ,python-webob)
9845 ("python-six" ,python-six)
9846 ("python-beautifulsoup4" ,python-beautifulsoup4)))
9847 (home-page "http://webtest.pythonpaste.org/")
9848 (synopsis "Helper to test WSGI applications")
9849 (description "Webtest allows you to test your Python web applications
9850 without starting an HTTP server. It supports anything that supports the
9851 minimum of WSGI.")
9852 (license license:expat)))
9853
9854 (define-public python2-webtest
9855 (package-with-python2 python-webtest))
9856
9857 (define-public python-anyjson
9858 (package
9859 (name "python-anyjson")
9860 (version "0.3.3")
9861 (source
9862 (origin
9863 (method url-fetch)
9864 (uri (pypi-uri "anyjson" version))
9865 (sha256
9866 (base32
9867 "1fjph4alvcscsl5d4b6qpv1yh31jy05jxi1l0xff7lws7j32v09p"))))
9868 (build-system python-build-system)
9869 (arguments
9870 `(;; We could possibly get tests working, but on Python 3 it's not so easy.
9871 ;; Very strangely, 2to3 is run *during setup.py install* (or bdist, or
9872 ;; whatever) so this transformation needs to be done before the tests
9873 ;; can be run. Maybe we could add a build step to transform beforehand
9874 ;; but it could be annoying/difficult.
9875 ;; We can enable tests for the Python 2 version, though, and do below.
9876 #:tests? #f))
9877 (home-page "http://bitbucket.org/runeh/anyjson/")
9878 (synopsis
9879 "Wraps best available JSON implementation in a common interface")
9880 (description
9881 "Anyjson loads whichever is the fastest JSON module installed
9882 and provides a uniform API regardless of which JSON implementation is used.")
9883 (license license:bsd-3)
9884 (properties `((python2-variant . ,(delay python2-anyjson))))))
9885
9886 (define-public python2-anyjson
9887 (let ((anyjson (package-with-python2
9888 (strip-python2-variant python-anyjson))))
9889 (package
9890 (inherit anyjson)
9891 (arguments `(;; Unlike the python 3 variant, we do run tests. See above!
9892 #:tests? #t
9893 ,@(package-arguments anyjson)))
9894 (native-inputs `(("python2-nose" ,python2-nose))))))
9895
9896 (define-public python-amqp
9897 (package
9898 (name "python-amqp")
9899 (version "1.4.9")
9900 (source
9901 (origin
9902 (method url-fetch)
9903 (uri (pypi-uri "amqp" version))
9904 (sha256
9905 (base32
9906 "06n6q0kxhjnbfz3vn8x9yz09lwmn1xi9d6wxp31h5jbks0b4vsid"))))
9907 (build-system python-build-system)
9908 (native-inputs
9909 `(("python-nose" ,python-nose)
9910 ("python-mock" ,python-mock)))
9911 (home-page "https://github.com/celery/py-amqp")
9912 (synopsis
9913 "Low-level AMQP client for Python (fork of amqplib)")
9914 (description
9915 "This is a fork of amqplib which was originally written by Barry Pederson.
9916 It is maintained by the Celery project, and used by kombu as a pure python
9917 alternative when librabbitmq is not available.")
9918 (license license:lgpl2.1+)
9919 (properties `((python2-variant . ,(delay python2-amqp))))))
9920
9921 (define-public python2-amqp
9922 (let ((amqp (package-with-python2
9923 (strip-python2-variant python-amqp))))
9924 (package
9925 (inherit amqp)
9926 (arguments `(;; Tries to run coverage tests with nose-cover3, which seems
9927 ;; unmaintained. Weirdly, does not do this on the python 3
9928 ;; version?
9929 #:tests? #f
9930 ,@(package-arguments amqp))))))
9931
9932 (define-public python-kombu
9933 (package
9934 (name "python-kombu")
9935 (version "3.0.37")
9936 (source
9937 (origin
9938 (method url-fetch)
9939 (uri (pypi-uri "kombu" version))
9940 (sha256
9941 (base32
9942 "0l16chb314gpq2v7fh94a22c30lcv6w3ylmhsa60bldlcq6a0r70"))))
9943 (build-system python-build-system)
9944 (native-inputs
9945 `(("python-mock" ,python-mock)
9946 ("python-nose" ,python-nose)))
9947 (propagated-inputs
9948 `(("python-anyjson" ,python-anyjson)
9949 ("python-amqp" ,python-amqp)
9950 ("python-redis" ,python-redis)))
9951 (home-page "http://kombu.readthedocs.org")
9952 (synopsis "Message passing library for Python")
9953 (description "The aim of Kombu is to make messaging in Python as easy as
9954 possible by providing an idiomatic high-level interface for the AMQ protocol,
9955 and also provide proven and tested solutions to common messaging problems.
9956 AMQP is the Advanced Message Queuing Protocol, an open standard protocol for
9957 message orientation, queuing, routing, reliability and security, for which the
9958 RabbitMQ messaging server is the most popular implementation.")
9959 (license license:bsd-3)
9960 (properties `((python2-variant . ,(delay python2-kombu))))))
9961
9962 (define-public python2-kombu
9963 (let ((kombu (package-with-python2
9964 (strip-python2-variant python-kombu))))
9965 (package
9966 (inherit kombu)
9967 (arguments `(;; FIXME: 'TestTransport.test_del_sync' fails on python2.
9968 ;; It works fine on the python3 variant.
9969 #:tests? #f
9970 ,@(package-arguments kombu)))
9971 (native-inputs `(("python2-unittest2" ,python2-unittest2)
9972 ,@(package-native-inputs kombu))))))
9973
9974 (define-public python-billiard
9975 (package
9976 (name "python-billiard")
9977 (version "3.3.0.23")
9978 (source
9979 (origin
9980 (method url-fetch)
9981 (uri (pypi-uri "billiard" version))
9982 (sha256
9983 (base32
9984 "02wxsc6bhqvzh8j6w758kvgqbnj14l796mvmrcms8fgfamd2lak9"))))
9985 (build-system python-build-system)
9986 (native-inputs
9987 `(("python-nose" ,python-nose)))
9988 (home-page "https://github.com/celery/billiard")
9989 (synopsis
9990 "Python multiprocessing fork with improvements and bugfixes")
9991 (description
9992 "Billiard is a fork of the Python 2.7 multiprocessing package. The
9993 multiprocessing package itself is a renamed and updated version of R Oudkerk's
9994 pyprocessing package. This standalone variant is intended to be compatible with
9995 Python 2.4 and 2.5, and will draw its fixes/improvements from python-trunk.")
9996 (license license:bsd-3)
9997 (properties `((python2-variant . ,(delay python2-billiard))))))
9998
9999 (define-public python2-billiard
10000 (let ((billiard (package-with-python2
10001 (strip-python2-variant python-billiard))))
10002 (package
10003 (inherit billiard)
10004 (native-inputs `(("python2-unittest2" ,python2-unittest2)
10005 ("python2-mock" ,python2-mock)
10006 ,@(package-native-inputs billiard))))))
10007
10008 (define-public python-celery
10009 (package
10010 (name "python-celery")
10011 (version "3.1.24")
10012 (source
10013 (origin
10014 (method url-fetch)
10015 (uri (pypi-uri "celery" version))
10016 (sha256
10017 (base32
10018 "0yh2prhdnx2dgkb67a5drj12hh2zvzx5f611p7mqqg01ydghif4r"))))
10019 (build-system python-build-system)
10020 (arguments
10021 `(#:phases
10022 (modify-phases %standard-phases
10023 ;; These tests break with Python 3.5:
10024 ;; https://github.com/celery/celery/issues/2897#issuecomment-253066295
10025 (replace 'check
10026 (lambda _
10027 (zero?
10028 (system* "nosetests" "--exclude=^test_safe_to_remove.*")))))))
10029 (native-inputs
10030 `(("python-nose" ,python-nose)))
10031 (propagated-inputs
10032 `(("python-pytz" ,python-pytz)
10033 ("python-billiard" ,python-billiard)
10034 ("python-kombu" ,python-kombu)))
10035 (home-page "http://celeryproject.org")
10036 (synopsis "Distributed Task Queue")
10037 (description "Celery is an asynchronous task queue/job queue based on
10038 distributed message passing. It is focused on real-time operation, but
10039 supports scheduling as well. The execution units, called tasks, are executed
10040 concurrently on a single or more worker servers using multiprocessing,
10041 Eventlet, or gevent. Tasks can execute asynchronously (in the background) or
10042 synchronously (wait until ready).")
10043 (license license:bsd-3)
10044 (properties `((python2-variant . ,(delay python2-celery))))))
10045
10046 (define-public python2-celery
10047 (let ((celery (package-with-python2
10048 (strip-python2-variant python-celery))))
10049 (package
10050 (inherit celery)
10051 (native-inputs `(("python2-unittest2" ,python2-unittest2)
10052 ("python2-mock" ,python2-mock)
10053 ,@(package-native-inputs celery))))))
10054
10055 (define-public python-translitcodec
10056 (package
10057 (name "python-translitcodec")
10058 (version "0.4.0")
10059 (source
10060 (origin
10061 (method url-fetch)
10062 (uri (pypi-uri "translitcodec" version))
10063 (sha256
10064 (base32
10065 "10x6pvblkzky1zhjs8nmx64nb9jdzxad4bxhq4iwv0j4z2aqjnki"))))
10066 (build-system python-build-system)
10067 (arguments
10068 `(#:tests? #f)) ; no tests provided
10069 (home-page
10070 "https://github.com/claudep/translitcodec")
10071 (synopsis
10072 "Unicode to 8-bit charset transliteration codec")
10073 (description
10074 "This package contains codecs for transliterating ISO 10646 texts into
10075 best-effort representations using smaller coded character sets (ASCII,
10076 ISO 8859, etc.).")
10077 (license license:expat)))
10078
10079 (define-public python2-translitcodec
10080 (package-with-python2 python-translitcodec))
10081
10082 (define-public python-editor
10083 (package
10084 (name "python-editor")
10085 (version "0.5")
10086 (source
10087 (origin
10088 (method url-fetch)
10089 (uri (pypi-uri "python-editor" version))
10090 (sha256
10091 (base32
10092 "1ypnpgvzpkbwsg4rdvy4sy51j28b5xq9v8pnkwxncn07vqz06p7n"))))
10093 (build-system python-build-system)
10094 (home-page
10095 "https://github.com/fmoo/python-editor")
10096 (synopsis
10097 "Programmatically open an editor, capture the result")
10098 (description
10099 "python-editor is a library that provides the editor module for
10100 programmatically interfacing with your system's $EDITOR.")
10101 (license license:asl2.0)))
10102
10103 (define-public python2-editor
10104 (package-with-python2 python-editor))
10105
10106 (define-public python-sphinxcontrib-programoutput
10107 (package
10108 (name "python-sphinxcontrib-programoutput")
10109 (version "0.10")
10110 (source (origin
10111 (method url-fetch)
10112 (uri (pypi-uri "sphinxcontrib-programoutput" version))
10113 (sha256
10114 (base32
10115 "153hhnlbx4688zj9wd64819ps5znc2jlyp5crkgzvn5hxgy99vpx"))))
10116 (build-system python-build-system)
10117 (arguments
10118 ;; FIXME: Many tests are failing and the upstream is gone.
10119 '(#:tests? #f))
10120 (propagated-inputs
10121 `(("python-sphinx" ,python-sphinx)))
10122 (synopsis "Sphinx extension to include program output")
10123 (description "A Sphinx extension to literally insert the output of arbitrary
10124 commands into documents, helping you to keep your command examples up to date.")
10125 (home-page "https://github.com/lunaryorn/sphinxcontrib-programoutput")
10126 (license license:bsd-2)))
10127
10128 (define-public python2-sphinxcontrib-programoutput
10129 (package-with-python2 python-sphinxcontrib-programoutput))
10130
10131 (define-public python-sphinx-repoze-autointerface
10132 (package
10133 (name "python-sphinx-repoze-autointerface")
10134 (version "0.8")
10135 (source (origin
10136 (method url-fetch)
10137 (uri (pypi-uri "repoze.sphinx.autointerface" version))
10138 (sha256
10139 (base32
10140 "08ycivzf7bh4a1zcyp31hbyqs1b2c9r26raa3vxjwwmbfqr3iw4f"))))
10141 (build-system python-build-system)
10142 (arguments '(#:tests? #f)) ; No tests.
10143 (propagated-inputs
10144 `(("python-sphinx" ,python-sphinx)
10145 ("python-zope-interface" ,python-zope-interface)))
10146 (synopsis "Auto-generate Sphinx API docs from Zope interfaces")
10147 (description "This package defines an extension for the Sphinx documentation
10148 system. The extension allows generation of API documentation by
10149 introspection of @code{zope.interface} instances in code.")
10150 (home-page "https://github.com/repoze/repoze.sphinx.autointerface")
10151 (license license:repoze)))
10152
10153 (define-public python2-sphinx-repoze-autointerface
10154 (package-with-python2 python-sphinx-repoze-autointerface))
10155
10156 (define-public python-psycopg2
10157 (package
10158 (name "python-psycopg2")
10159 (version "2.6.2")
10160 (source
10161 (origin
10162 (method url-fetch)
10163 (uri (pypi-uri "psycopg2" version))
10164 (sha256
10165 (base32
10166 "0p60z2gwfcal30y2w8gprflchp1kcg9qblc5rn782p4wxl90wjbh"))))
10167 (build-system python-build-system)
10168 (arguments
10169 ;; Tests would require a postgresql database "psycopg2_test"
10170 ;; and a running postgresql database management service.
10171 `(#:tests? #f)) ; TODO re-enable after providing a test-db.
10172 (inputs
10173 `(("postgresql" ,postgresql))) ; libpq
10174 (home-page "http://initd.org/psycopg/")
10175 (synopsis "Python PostgreSQL adapter")
10176 (description
10177 "psycopg2 is a thread-safe PostgreSQL adapter that implements DB-API 2.0. ")
10178 (license license:lgpl3+)))
10179
10180 (define-public python2-psycopg2
10181 (package-with-python2 python-psycopg2))
10182
10183 (define-public python-vobject
10184 (package
10185 (name "python-vobject")
10186 (version "0.9.2")
10187 (source (origin
10188 (method url-fetch)
10189 (uri (pypi-uri "vobject" version))
10190 (sha256
10191 (base32
10192 "1qfnwlx8qwkgr6nf5wvl6ff1r3kll53dh3z6nyp173nmlhhhqccb"))))
10193 (build-system python-build-system)
10194 (arguments
10195 '(;; The test suite relies on some non-portable Windows interfaces.
10196 #:tests? #f))
10197 (propagated-inputs
10198 `(("python-dateutil" ,python-dateutil)
10199 ("python-pyicu" ,python-pyicu)))
10200 (synopsis "Parse and generate vCard and vCalendar files")
10201 (description "Vobject is intended to be a full featured Python package for
10202 parsing and generating vCard and vCalendar files. Currently, iCalendar files
10203 are supported and well tested. vCard 3.0 files are supported, and all data
10204 should be imported, but only a few components are understood in a sophisticated
10205 way.")
10206 (home-page "http://eventable.github.io/vobject/")
10207 (license license:asl2.0)))
10208
10209 (define-public python2-vobject
10210 (package-with-python2 python-vobject))
10211
10212 (define-public python-munkres
10213 (package
10214 (name "python-munkres")
10215 (version "1.0.8")
10216 (source (origin
10217 (method url-fetch)
10218 (uri (pypi-uri "munkres" version))
10219 (sha256
10220 (base32
10221 "0mbspx4zv8id4x6pim6ybsa1xh96qwpbqj7skbqz4c9c9nf1lpqq"))))
10222 (build-system python-build-system)
10223 (arguments
10224 '(#:tests? #f)) ; no test suite
10225 (home-page "http://software.clapper.org/munkres/")
10226 (synopsis "Implementation of the Munkres algorithm")
10227 (description "The Munkres module provides an implementation of the Munkres
10228 algorithm (also called the Hungarian algorithm or the Kuhn-Munkres algorithm),
10229 useful for solving the Assignment Problem.")
10230 (license license:bsd-3)))
10231
10232 (define-public python2-munkres
10233 (package-with-python2 python-munkres))
10234
10235 (define-public python-flask
10236 (package
10237 (name "python-flask")
10238 (version "0.11.1")
10239 (source (origin
10240 (method url-fetch)
10241 (uri (pypi-uri "Flask" version))
10242 (sha256
10243 (base32
10244 "03kbfll4sj3v5z7r31c7bhfpi11r1np076d4p1k2kg4yzcmkywdl"))))
10245 (build-system python-build-system)
10246 (propagated-inputs
10247 `(("python-itsdangerous" ,python-itsdangerous)
10248 ("python-jinja2" ,python-jinja2)
10249 ("python-click" ,python-click)
10250 ("python-werkzeug" ,python-werkzeug)))
10251 (home-page "https://github.com/mitsuhiko/flask/")
10252 (synopsis "Microframework based on Werkzeug, Jinja2 and good intentions")
10253 (description "Flask is a micro web framework based on the Werkzeug toolkit
10254 and Jinja2 template engine. It is called a micro framework because it does not
10255 presume or force a developer to use a particular tool or library.")
10256 (license license:bsd-3)))
10257
10258 (define-public python2-flask
10259 (package-with-python2 python-flask))
10260
10261 (define-public python-flask-wtf
10262 (package
10263 (name "python-flask-wtf")
10264 (version "0.13.1")
10265 (source
10266 (origin
10267 (method url-fetch)
10268 (uri (pypi-uri "Flask-WTF" version))
10269 (sha256
10270 (base32
10271 "04l5743j2dici46038sqlzvf0xzpg8rf7s9ld2x24xv7f4idg990"))))
10272 (build-system python-build-system)
10273 (arguments
10274 '(#:phases
10275 (modify-phases %standard-phases
10276 (add-before 'check 'drop-failing-test
10277 (lambda _
10278 ;; FIXME: This file tries resolving an external server, which
10279 ;; fails. Try to patch out the offending section instead of
10280 ;; deleting the whole thing.
10281 (delete-file "tests/test_recaptcha.py")
10282 #t)))))
10283 (propagated-inputs
10284 `(("python-flask-babel" ,python-flask-babel)
10285 ("python-babel" ,python-babel)
10286 ("python-wtforms" ,python-wtforms)))
10287 (native-inputs
10288 `(("python-nose" ,python-nose)))
10289 (home-page "https://github.com/lepture/flask-wtf")
10290 (synopsis "Simple integration of Flask and WTForms")
10291 (description "Flask-WTF integrates Flask and WTForms, including CSRF, file
10292 upload, and reCAPTCHA.")
10293 (license license:bsd-3)))
10294
10295 (define-public python2-flask-wtf
10296 (package-with-python2 python-flask-wtf))
10297
10298 (define-public python-flask-multistatic
10299 (package
10300 (name "python-flask-multistatic")
10301 (version "1.0")
10302 (source
10303 (origin
10304 (method url-fetch)
10305 (uri (pypi-uri "flask-multistatic" version))
10306 (sha256
10307 (base32
10308 "0p4v50rwv64wcd0zlq7rzl4waprwr4hj19s3cgf1isywa7jcisgm"))))
10309 (build-system python-build-system)
10310 (propagated-inputs
10311 `(("python-flask" ,python-flask)))
10312 (home-page "https://pagure.io/flask-multistatic")
10313 (synopsis "Flask plugin to allow overriding static files")
10314 (description "@code{flask-multistatic} is a flask plugin that adds support
10315 for overriding static files.")
10316 (license license:gpl3+)))
10317
10318 (define-public python2-flask-multistatic
10319 (package-with-python2 python-flask-multistatic))
10320
10321 (define-public python-cookies
10322 (package
10323 (name "python-cookies")
10324 (version "2.2.1")
10325 (source (origin
10326 (method url-fetch)
10327 (uri (pypi-uri "cookies" version))
10328 (sha256
10329 (base32
10330 "13pfndz8vbk4p2a44cfbjsypjarkrall71pgc97glk5fiiw9idnn"))))
10331 (build-system python-build-system)
10332 (arguments
10333 `(;; test are broken: https://gitlab.com/sashahart/cookies/issues/3
10334 #:tests? #f))
10335 (native-inputs
10336 `(("python-pytest" ,python2-pytest)))
10337 (synopsis "HTTP cookie parser and renderer")
10338 (description "A RFC 6265-compliant HTTP cookie parser and renderer in
10339 Python.")
10340 (home-page "https://gitlab.com/sashahart/cookies")
10341 (license license:expat)))
10342
10343 (define-public python2-cookies
10344 (package-with-python2 python-cookies))
10345
10346 (define-public python-responses
10347 (package
10348 (name "python-responses")
10349 (version "0.5.1")
10350 (source (origin
10351 (method url-fetch)
10352 (uri (pypi-uri "responses" version))
10353 (sha256
10354 (base32
10355 "1spcfxixyk9k7pk82jm6zqkwk031s95lh8q0mz7539jrb7269bcc"))))
10356 (build-system python-build-system)
10357 (arguments
10358 `(;; Test suite is not distributed:
10359 ;; https://github.com/getsentry/responses/issues/38
10360 #:tests? #f))
10361 (native-inputs
10362 `(("python-mock" ,python-mock)))
10363 (propagated-inputs
10364 `(("python-requests" ,python-requests)
10365 ("python-cookies" ,python-cookies)
10366 ("python-six" ,python-six)))
10367 (home-page "https://github.com/getsentry/responses")
10368 (synopsis "Utility for mocking out the `requests` Python library")
10369 (description "A utility library for mocking out the `requests` Python
10370 library.")
10371 (license license:asl2.0)))
10372
10373 (define-public python2-responses
10374 (package-with-python2 python-responses))
10375
10376 (define-public python-whoosh
10377 (package
10378 (name "python-whoosh")
10379 (version "2.7.4")
10380 (source
10381 (origin
10382 (method url-fetch)
10383 (uri (pypi-uri "Whoosh" version))
10384 (sha256
10385 (base32
10386 "10qsqdjpbc85fykc1vgcs8xwbgn4l2l52c8d83xf1q59pwyn79bw"))))
10387 (build-system python-build-system)
10388 (native-inputs
10389 `(("python-pytest" ,python-pytest)))
10390 (home-page "http://bitbucket.org/mchaput/whoosh")
10391 (synopsis "Full text indexing, search, and spell checking library")
10392 (description
10393 "Whoosh is a fast, pure-Python full text indexing, search, and spell
10394 checking library.")
10395 (license license:bsd-2)))
10396
10397 (define-public python2-whoosh
10398 (let ((whoosh (package-with-python2 (strip-python2-variant python-whoosh))))
10399 (package (inherit whoosh)
10400 (propagated-inputs
10401 `(("python2-backport-ssl-match-hostname"
10402 ,python2-backport-ssl-match-hostname)
10403 ,@(package-propagated-inputs whoosh))))))
10404
10405 (define-public python-pathlib
10406 (package
10407 (name "python-pathlib")
10408 (version "1.0.1")
10409 (source (origin
10410 (method url-fetch)
10411 (uri (pypi-uri "pathlib" version))
10412 (sha256
10413 (base32
10414 "17zajiw4mjbkkv6ahp3xf025qglkj0805m9s41c45zryzj6p2h39"))))
10415 (build-system python-build-system)
10416 ;; The tests depend on the internal "test" module, which does not provide
10417 ;; a stable interface.
10418 (arguments `(#:tests? #f))
10419 (home-page "https://pathlib.readthedocs.org/")
10420 (synopsis "Object-oriented file system paths")
10421 (description "Pathlib offers a set of classes to handle file system paths.
10422 It offers the following advantages over using string objects:
10423
10424 @enumerate
10425 @item No more cumbersome use of os and os.path functions. Everything can
10426 be done easily through operators, attribute accesses, and method calls.
10427 @item Embodies the semantics of different path types. For example,
10428 comparing Windows paths ignores casing.
10429 @item Well-defined semantics, eliminating any inconsistencies or
10430 ambiguities (forward vs. backward slashes, etc.).
10431 @end enumerate
10432
10433 Note: In Python 3.4, pathlib is now part of the standard library. For other
10434 Python versions please consider python-pathlib2 instead, which tracks the
10435 standard library module. This module (python-pathlib) isn't maintained
10436 anymore.")
10437 (license license:expat)))
10438
10439 (define-public python2-pathlib
10440 (package-with-python2 python-pathlib))
10441
10442 (define-public python2-pathlib2
10443 (package
10444 (name "python2-pathlib2")
10445 (version "2.1.0")
10446 (source (origin
10447 (method url-fetch)
10448 (uri (pypi-uri "pathlib2" version))
10449 (sha256
10450 (base32
10451 "0p050msg5c8d0kadv702jnfshaxrb0il765cpkgnhn6mq5hakcyy"))))
10452 (build-system python-build-system)
10453 ;; We only need the the Python 2 variant, since for Python 3 our minimum
10454 ;; version is 3.4 which already includes this package as part of the
10455 ;; standard library.
10456 (arguments
10457 `(#:python ,python-2))
10458 (native-inputs
10459 `(("python2-six" ,python2-six)))
10460 (home-page "http://pypi.python.org/pypi/pathlib2/")
10461 (synopsis "Object-oriented file system paths - backport of standard
10462 pathlib module")
10463 (description "The goal of pathlib2 is to provide a backport of standard
10464 pathlib module which tracks the standard library module, so all the newest
10465 features of the standard pathlib can be used also on older Python versions.
10466
10467 Pathlib offers a set of classes to handle file system paths. It offers the
10468 following advantages over using string objects:
10469
10470 @enumerate
10471 @item No more cumbersome use of os and os.path functions. Everything can
10472 be done easily through operators, attribute accesses, and method calls.
10473 @item Embodies the semantics of different path types. For example,
10474 comparing Windows paths ignores casing.
10475 @item Well-defined semantics, eliminating any inconsistencies or
10476 ambiguities (forward vs. backward slashes, etc.).
10477 @end enumerate")
10478 (license license:expat)))
10479
10480 (define-public python-jellyfish
10481 (package
10482 (name "python-jellyfish")
10483 (version "0.5.6")
10484 (source (origin
10485 (method url-fetch)
10486 (uri (pypi-uri "jellyfish" version))
10487 (sha256
10488 (base32
10489 "1j9rplb16ba2prjj6mip46z0w9pnhnqpwgiwi0x93vnas14rlyl8"))))
10490 (build-system python-build-system)
10491 (native-inputs
10492 `(("python-pytest" ,python-pytest)))
10493 (home-page "https://github.com/jamesturk/jellyfish")
10494 (synopsis "Approximate and phonetic matching of strings")
10495 (description "Jellyfish uses a variety of string comparison and phonetic
10496 encoding algorithms to do fuzzy string matching.")
10497 (license license:bsd-2)
10498 (properties `((python2-variant . ,(delay python2-jellyfish))))))
10499
10500 (define-public python2-jellyfish
10501 (let ((jellyfish (package-with-python2
10502 (strip-python2-variant python-jellyfish))))
10503 (package (inherit jellyfish)
10504 (native-inputs `(("python2-unicodecsv" ,python2-unicodecsv)
10505 ,@(package-native-inputs jellyfish))))))
10506
10507 (define-public python2-unicodecsv
10508 (package
10509 (name "python2-unicodecsv")
10510 (version "0.14.1")
10511 (source (origin
10512 (method url-fetch)
10513 ;; The test suite is not included in the PyPi release.
10514 ;; https://github.com/jdunck/python-unicodecsv/issues/19
10515 (uri (string-append "https://github.com/jdunck/python-unicodecsv/"
10516 "archive/" version ".tar.gz"))
10517 (file-name (string-append name "-" version ".tar.gz"))
10518 (sha256
10519 (base32
10520 "087nqanfcyp6mlfbbr5lva5f3w6iz1bybls9xlrb8icmc474wh4w"))))
10521 (build-system python-build-system)
10522 (arguments
10523 `(;; It supports Python 3, but Python 3 can already do Unicode CSV.
10524 #:python ,python-2))
10525 (native-inputs
10526 `(("python2-unittest2" ,python2-unittest2)))
10527 (home-page "https://github.com/jdunck/python-unicodecsv")
10528 (synopsis "Unicode CSV module for Python 2")
10529 (description "Unicodecsv is a drop-in replacement for Python 2.7's CSV
10530 module, adding support for Unicode strings.")
10531 (license license:bsd-2)))
10532
10533 (define-public python-rarfile
10534 (package
10535 (name "python-rarfile")
10536 (version "2.8")
10537 (source (origin
10538 (method url-fetch)
10539 (uri (pypi-uri "rarfile" version))
10540 (sha256
10541 (base32
10542 "0qfad483kcbga0bn4qmcz953xjk16r52fahiy46zzn56v80y89ra"))))
10543 (build-system python-build-system)
10544 (arguments
10545 '(#:phases
10546 (modify-phases %standard-phases
10547 (replace 'check
10548 ;; Many tests fail, but the installation proceeds.
10549 (lambda _ (zero? (system* "make" "-C" "test" "test")))))))
10550 (native-inputs
10551 `(("which" ,which))) ; required for tests
10552 (propagated-inputs
10553 `(("libarchive" ,libarchive)))
10554 (home-page "https://github.com/markokr/rarfile")
10555 (synopsis "RAR archive reader for Python")
10556 (description "This is Python module for RAR archive reading. The interface
10557 is made as zipfile like as possible.")
10558 (license license:isc)))
10559
10560 (define-public python2-rarfile
10561 (package-with-python2 python-rarfile))
10562
10563 (define-public python-magic
10564 (package
10565 (name "python-magic")
10566 (version "0.4.3")
10567 (source
10568 (origin
10569 (method url-fetch)
10570 (uri (string-append "https://github.com/ahupp/python-magic/archive/"
10571 version ".tar.gz"))
10572 (sha256
10573 (base32
10574 "17bgy92i7sb021f2s4mw1dcvpm6p1mi9jihridwy1pyn8mzvpjgk"))
10575 (file-name (string-append name "-" version "-checkout"))))
10576 (build-system python-build-system)
10577 (arguments
10578 ;; The tests are unreliable, so don't run them. The tests fail
10579 ;; under Python3 because they were written for Python2 and
10580 ;; contain import statements that do not work in Python3. One of
10581 ;; the tests fails under Python2 because its assertions are
10582 ;; overly stringent; it relies on comparing output strings which
10583 ;; are brittle and can change depending on the version of
10584 ;; libmagic being used and the system on which the test is
10585 ;; running. In my case, under GuixSD 0.10.0, only one test
10586 ;; failed, and it seems to have failed only because the version
10587 ;; of libmagic that is packaged in Guix outputs a slightly
10588 ;; different (but not wrong) string than the one that the test
10589 ;; expected.
10590 '(#:tests? #f
10591 #:phases (modify-phases %standard-phases
10592 ;; Replace a specific method call with a hard-coded
10593 ;; path to the necessary libmagic.so file in the
10594 ;; store. If we don't do this, then the method call
10595 ;; will fail to find the libmagic.so file, which in
10596 ;; turn will cause any application using
10597 ;; python-magic to fail.
10598 (add-before 'build 'hard-code-path-to-libmagic
10599 (lambda* (#:key inputs #:allow-other-keys)
10600 (let ((file (assoc-ref inputs "file")))
10601 (substitute* "magic.py"
10602 (("ctypes.util.find_library\\('magic'\\)")
10603 (string-append "'" file "/lib/libmagic.so'")))
10604 #t)))
10605 (add-before 'install 'disable-egg-compression
10606 (lambda _
10607 (let ((port (open-file "setup.cfg" "a")))
10608 (display "\n[easy_install]\nzip_ok = 0\n"
10609 port)
10610 (close-port port)
10611 #t))))))
10612 (inputs
10613 ;; python-magic needs to be able to find libmagic.so.
10614 `(("file" ,file)))
10615 (home-page "https://github.com/ahupp/python-magic")
10616 (synopsis "File type identification using libmagic")
10617 (description
10618 "This module uses ctypes to access the libmagic file type
10619 identification library. It makes use of the local magic database and
10620 supports both textual and MIME-type output. Note that this module and
10621 the python-file module both provide a \"magic.py\" file; these two
10622 modules, which are different and were developed separately, both serve
10623 the same purpose: to provide Python bindings for libmagic.")
10624 (license license:expat)))
10625
10626 (define-public python2-magic
10627 (package-with-python2 python-magic))
10628
10629 (define-public python2-s3cmd
10630 (package
10631 (name "python2-s3cmd")
10632 (version "1.6.1")
10633 (source
10634 (origin
10635 (method url-fetch)
10636 (uri (string-append "mirror://sourceforge/s3tools/s3cmd/" version "/"
10637 "s3cmd-" version ".tar.gz"))
10638 (sha256
10639 (base32
10640 "0ki1rzhm5icvi9ry5jswi4b22yqwyj0d2wsqsgilwx6qhi7pjxa6"))))
10641 (build-system python-build-system)
10642 (arguments
10643 ;; s3cmd is written for python2 only and contains no tests.
10644 `(#:python ,python-2
10645 #:tests? #f))
10646 (propagated-inputs
10647 `(("python2-dateutil" ,python2-dateutil)
10648 ;; The python-file package also provides a magic.py module.
10649 ;; This is an unfortunate state of affairs; however, s3cmd
10650 ;; fails to install if it cannot find specifically the
10651 ;; python-magic package. Thus we include it, instead of using
10652 ;; python-file. Ironically, s3cmd sometimes works better
10653 ;; without libmagic bindings at all:
10654 ;; https://github.com/s3tools/s3cmd/issues/198
10655 ("python2-magic" ,python2-magic)))
10656 (home-page "http://s3tools.org/s3cmd")
10657 (synopsis "Command line tool for S3-compatible storage services")
10658 (description
10659 "S3cmd is a command line tool for uploading, retrieving and managing data
10660 in storage services that are compatible with the Amazon Simple Storage
10661 Service (S3) protocol, including S3 itself. It supports rsync-like backup,
10662 GnuPG encryption, and more. It also supports management of Amazon's
10663 CloudFront content delivery network.")
10664 (license license:gpl2+)))
10665
10666 (define-public python-pkgconfig
10667 (package
10668 (name "python-pkgconfig")
10669 (version "1.1.0")
10670 (source
10671 (origin
10672 (method url-fetch)
10673 (uri (pypi-uri "pkgconfig" version))
10674 (sha256
10675 (base32
10676 "1pw0kmvc57sjmaxi6c54fqsnihqj6hvhc9y1vaz36axafzqam7bh"))))
10677 (build-system python-build-system)
10678 (native-inputs
10679 `(("python-nose" ,python-nose)))
10680 (inputs
10681 `(("pkg-config" ,pkg-config)))
10682 (arguments
10683 `(;; Tests fail with "ValueError: _type_ 'v' not supported" on Python 3,
10684 ;; and on Python 2 they need the dl module deprecated since Python 2.6.
10685 #:tests? #f
10686 ;; Hard-code the path to pkg-config.
10687 #:phases
10688 (modify-phases %standard-phases
10689 (add-before
10690 'build 'patch
10691 (lambda _
10692 (substitute* "pkgconfig/pkgconfig.py"
10693 (("cmd = 'pkg-config")
10694 (string-append "cmd = '" (which "pkg-config"))))
10695 #t)))))
10696 (home-page "https://github.com/matze/pkgconfig")
10697 (synopsis "Python interface for pkg-config")
10698 (description "This module provides a Python interface to pkg-config. It
10699 can be used to find all pkg-config packages, check if a package exists,
10700 check if a package meets certain version requirements, query CFLAGS and
10701 LDFLAGS and parse the output to build extensions with setup.py.")
10702 (license license:expat)))
10703
10704 (define-public python2-pkgconfig
10705 (package-with-python2 python-pkgconfig))
10706
10707 (define-public python-bz2file
10708 (package
10709 (name "python-bz2file")
10710 (version "0.98")
10711 (source
10712 (origin
10713 (method url-fetch)
10714 (uri (pypi-uri "bz2file" version))
10715 (sha256
10716 (base32
10717 "126s53fkpx04f33a829yqqk8fj4png3qwg4m66cvlmhmwc8zihb4"))))
10718 (build-system python-build-system)
10719 (arguments
10720 `(#:tests? #f)) ; Tests use deprecated python modules.
10721 (home-page "https://github.com/nvawda/bz2file")
10722 (synopsis "Read and write bzip2-compressed files")
10723 (description
10724 "Bz2file is a Python library for reading and writing bzip2-compressed
10725 files. It contains a drop-in replacement for the I/O interface in the
10726 standard library's @code{bz2} module, including features from the latest
10727 development version of CPython that are not available in older releases.")
10728 (license license:asl2.0)
10729 (properties `((python2-variant . ,(delay python2-bz2file))))))
10730
10731 (define-public python2-bz2file
10732 (let ((base (package-with-python2
10733 (strip-python2-variant python-bz2file))))
10734 (package
10735 (inherit base)
10736 (arguments
10737 `(#:python ,python-2
10738 #:phases
10739 (modify-phases %standard-phases
10740 ;; 'python setup.py test' does not work as of 0.98.
10741 ;; There is only the one test file, so we run it directly.
10742 (replace 'check
10743 (lambda _ (zero? (system* "python"
10744 "test_bz2file.py"))))))))))
10745
10746 (define-public python-future
10747 (package
10748 (name "python-future")
10749 (version "0.16.0")
10750 (source
10751 (origin
10752 (method url-fetch)
10753 (uri (pypi-uri "future" version))
10754 (sha256
10755 (base32
10756 "1nzy1k4m9966sikp0qka7lirh8sqrsyainyf8rk97db7nwdfv773"))))
10757 (build-system python-build-system)
10758 ;; Many tests connect to the network or are otherwise flawed.
10759 ;; https://github.com/PythonCharmers/python-future/issues/210
10760 (arguments
10761 `(#:tests? #f))
10762 (home-page "http://python-future.org")
10763 (synopsis "Single-source support for Python 3 and 2")
10764 (description
10765 "@code{python-future} is the missing compatibility layer between Python 2 and
10766 Python 3. It allows you to use a single, clean Python 3.x-compatible codebase
10767 to support both Python 2 and Python 3 with minimal overhead.")
10768 (license license:expat)))
10769
10770 (define-public python2-future
10771 (package-with-python2 python-future))
10772
10773 (define-public python-cysignals
10774 (package
10775 (name "python-cysignals")
10776 (version "1.1.0")
10777 (source
10778 (origin
10779 (method url-fetch)
10780 (uri (pypi-uri "cysignals" version ".tar.bz2"))
10781 (sha256
10782 (base32
10783 "14cbyd9znlz6cxy1s3g6v6dv5jj45hn27pywkidd9b1zanaysqc6"))))
10784 (build-system python-build-system)
10785 (native-inputs
10786 `(("python-cython" ,python-cython)
10787 ("python-sphinx" ,python-sphinx)))
10788 (inputs
10789 `(("pari-gp" ,pari-gp)))
10790 (arguments
10791 `(#:modules ((guix build python-build-system)
10792 ((guix build gnu-build-system) #:prefix gnu:)
10793 (guix build utils))
10794 ;; FIXME: Tests are executed after installation and currently fail
10795 ;; when not installing into standard locations; the author is working
10796 ;; on a fix.
10797 #:tests? #f
10798 #:phases
10799 (modify-phases %standard-phases
10800 (add-before
10801 'build 'configure
10802 (assoc-ref gnu:%standard-phases 'configure)))))
10803 (home-page
10804 "https://github.com/sagemath/cysignals")
10805 (synopsis
10806 "Handling of interrupts and signals for Cython")
10807 (description
10808 "The cysignals package provides mechanisms to handle interrupts (and
10809 other signals and errors) in Cython code, using two related approaches,
10810 for mixed Cython/Python code or external C libraries and pure Cython code,
10811 respectively.")
10812 (license license:lgpl3+)))
10813
10814 (define-public python2-cysignals
10815 (package-with-python2 python-cysignals))
10816
10817 (define-public python2-shedskin
10818 (package
10819 (name "python2-shedskin")
10820 (version "0.9.4")
10821 (source
10822 (origin
10823 (method url-fetch)
10824 (uri (string-append "https://github.com/shedskin/shedskin/"
10825 "releases/download/v" version
10826 "/shedskin-" version ".tgz"))
10827 (sha256
10828 (base32
10829 "0nzwrzgw1ga8rw6f0ryq7zr9kkiavd1cqz5hzxkcbicl1dk7kz41"))))
10830 (build-system python-build-system)
10831 (arguments
10832 `(#:python ,python-2
10833 #:phases (modify-phases %standard-phases
10834 (add-after 'unpack 'fix-resulting-include-libs
10835 (lambda* (#:key inputs #:allow-other-keys)
10836 (let ((libgc (assoc-ref inputs "libgc"))
10837 (pcre (assoc-ref inputs "pcre")))
10838 (substitute* "shedskin/makefile.py"
10839 (("variable == 'CCFLAGS':[ ]*")
10840 (string-append "variable == 'CCFLAGS':\n"
10841 " line += ' -I " pcre "/include"
10842 " -I " libgc "/include'"))
10843 (("variable == 'LFLAGS':[ ]*")
10844 (string-append "variable == 'LFLAGS':\n"
10845 " line += ' -L" pcre "/lib"
10846 " -L " libgc "/lib'")))
10847 #t))))))
10848 (inputs `(("pcre" ,pcre)
10849 ("libgc" ,libgc)))
10850 (home-page "https://shedskin.github.io/")
10851 (synopsis "Experimental Python-2 to C++ Compiler")
10852 (description (string-append "This is an experimental compiler for a subset of
10853 Python. It generates C++ code and a Makefile."))
10854 (license (list license:gpl3 license:bsd-3 license:expat))))
10855
10856 (define-public python2-rope
10857 (package
10858 (name "python2-rope")
10859 (version "0.10.3")
10860 (source
10861 (origin
10862 (method url-fetch)
10863 (uri (pypi-uri "rope" version))
10864 (sha256
10865 (base32
10866 "18k5znhpwvrfck3yp0jmhd5j8r0f0s8bk1zh5yhs2cfgmfhbwigb"))))
10867 (arguments
10868 ;; Rope is currently python-2 only.
10869 ;; https://github.com/python-rope/rope/issues/57
10870 `(#:python ,python-2))
10871 (build-system python-build-system)
10872 (native-inputs
10873 `(("python2-unittest2" ,python2-unittest2)))
10874 (home-page "https://github.com/python-rope/rope")
10875 (synopsis "Refactoring library for Python")
10876 (description "Rope is a refactoring library for Python. It facilitates
10877 the renaming, moving and extracting of attributes, functions, modules, fields
10878 and parameters in Python 2 source code. These refactorings can also be applied
10879 to occurrences in strings and comments.")
10880 (license license:gpl2)))
10881
10882 (define-public python-py3status
10883 (package
10884 (name "python-py3status")
10885 (version "3.1")
10886 (source
10887 (origin
10888 (method url-fetch)
10889 (uri (pypi-uri "py3status" version))
10890 (sha256
10891 (base32
10892 "0i283z1pivmir61z8kbiycigc94l61v33ygzkhczf1ifq7cppyds"))))
10893 (build-system python-build-system)
10894 (arguments
10895 '(#:tests? #f)) ; TODO: Requires many libraries not in Guix.
10896 (home-page "https://github.com/ultrabug/py3status")
10897 (synopsis "Extensible i3status wrapper written in Python")
10898 (description "py3status is an i3status wrapper which extends i3status
10899 functionality in a modular way, allowing you to extend your panel with your
10900 own code, responding to click events and updating clock every second.")
10901 (license license:bsd-3)))
10902
10903 (define-public python-tblib
10904 (package
10905 (name "python-tblib")
10906 (version "1.3.0")
10907 (source (origin
10908 (method url-fetch)
10909 (uri (pypi-uri "tblib" version))
10910 (sha256 (base32
10911 "02iahfkfa927hb4jq2bak36ldihwapzacfiq5lyxg8llwn98a1yi"))))
10912 (build-system python-build-system)
10913 (arguments
10914 `(#:phases
10915 (modify-phases %standard-phases
10916 (replace 'check
10917 (lambda _
10918 ;; Upstream runs tests after installation and the package itself
10919 ;; resides in a subdirectory. Extend PYTHONPATH so it will be
10920 ;; found.
10921 (setenv "PYTHONPATH"
10922 (string-append (getcwd) "/build/lib:"
10923 (getenv "PYTHONPATH")))
10924 (zero? (system* "py.test" "-vv" "tests" "README.rst")))))))
10925 (native-inputs
10926 `(("python-pytest" ,python-pytest)
10927 ("python-six" ,python-six)))
10928 (home-page "https://github.com/ionelmc/python-tblib")
10929 (synopsis "Traceback serialization library")
10930 (description
10931 "Traceback serialization allows you to:
10932
10933 @enumerate
10934 @item Pickle tracebacks and raise exceptions with pickled tracebacks in
10935 different processes. This allows better error handling when running code over
10936 multiple processes (imagine multiprocessing, billiard, futures, celery etc).
10937
10938 @item Parse traceback strings and raise with the parsed tracebacks.
10939 @end enumerate\n")
10940 (license license:bsd-3)))
10941
10942 (define-public python2-tblib
10943 (package-with-python2 python-tblib))
10944
10945 (define-public python-sqlparse
10946 (package
10947 (name "python-sqlparse")
10948 (version "0.1.19")
10949 (source (origin
10950 (method url-fetch)
10951 (uri (pypi-uri "sqlparse" version))
10952 (sha256
10953 (base32
10954 "1s2fvaxgh9kqzrd6iwy5h7i61ckn05plx9np13zby93z3hdbx5nq"))))
10955 (build-system python-build-system)
10956 (arguments
10957 `(#:phases
10958 (modify-phases %standard-phases
10959 (replace 'check
10960 (lambda* _
10961 ;; setup.py-integrated 2to3 only affects the build files, but
10962 ;; py.test is using the source files. So we need to convert them
10963 ;; manually.
10964 (when (zero? (system* "python3"))
10965 (system* "2to3" "--no-diff" "-wn" "sqlparse" "tests"))
10966 (zero? (system* "py.test")))))))
10967 (native-inputs
10968 `(("python-pytest" ,python-pytest)))
10969 (home-page "https://github.com/andialbrecht/sqlparse")
10970 (synopsis "Non-validating SQL parser")
10971 (description "Sqlparse is a non-validating SQL parser for Python. It
10972 provides support for parsing, splitting and formatting SQL statements.")
10973 (license license:bsd-3)))
10974
10975 (define-public python2-sqlparse
10976 (package-with-python2 python-sqlparse))
10977
10978 (define-public python-greenlet
10979 (package
10980 (name "python-greenlet")
10981 (version "0.4.11")
10982 (source (origin
10983 (method url-fetch)
10984 (uri (pypi-uri "greenlet" version))
10985 (sha256
10986 (base32
10987 "1xhik26j4f3kc4qw9xmj0c567rb5h1zryb4ijwqnqwwjvfhbv59h"))))
10988 (build-system python-build-system)
10989 (home-page "https://greenlet.readthedocs.io/")
10990 (synopsis "Lightweight in-process concurrent programming")
10991 (description
10992 "Greenlet package is a spin-off of Stackless, a version of CPython
10993 that supports micro-threads called \"tasklets\". Tasklets run
10994 pseudo-concurrently (typically in a single or a few OS-level threads) and
10995 are synchronized with data exchanges on \"channels\".")
10996 (license (list license:psfl license:expat))))
10997
10998 (define-public python2-greenlet
10999 (package-with-python2 python-greenlet))
11000
11001 (define-public python-gevent
11002 (package
11003 (name "python-gevent")
11004 (version "1.1.1")
11005 (source (origin
11006 (method url-fetch)
11007 (uri (pypi-uri "gevent" version))
11008 (sha256
11009 (base32
11010 "1smf3kvidpdiyi2c81alal74p2zm0clrm6xbyy6y1k9a3f2vkrbf"))
11011 (modules '((guix build utils)))
11012 (snippet
11013 '(begin
11014 ;; unbunding libev and c-ares
11015 (for-each delete-file-recursively '("libev" "c-ares"))
11016 ;; fixing testsuite
11017 (call-with-output-file "greentest/__init__.py" noop)
11018 (substitute* "greentest/testrunner.py"
11019 (("import util") "from . import util")
11020 (("from util import log") "from .util import log"))))))
11021 (build-system python-build-system)
11022 (propagated-inputs
11023 `(("python-greenlet" ,python-greenlet)))
11024 (native-inputs
11025 `(("python-six" ,python-six)))
11026 (inputs
11027 `(("c-ares" ,c-ares)
11028 ("libev" ,libev)))
11029 (home-page "http://www.gevent.org/")
11030 (synopsis "Coroutine-based network library")
11031 (description
11032 "gevent is a coroutine-based Python networking library that uses greenlet
11033 to provide a high-level synchronous API on top of the libev event loop.")
11034 (license license:expat)))
11035
11036 (define-public python2-gevent
11037 (package-with-python2 python-gevent))
11038
11039 (define-public python-geventhttpclient
11040 (package
11041 (name "python-geventhttpclient")
11042 (version "1.3.1")
11043 (source (origin
11044 (method url-fetch)
11045 (uri (pypi-uri "geventhttpclient" version))
11046 (sha256
11047 (base32
11048 "07d0q3wzmml75227r6y6mrl5a0zpf4v9gj0ni5rhbyzmaj4az1xx"))
11049 (modules '((guix build utils)))
11050 (snippet
11051 '(begin
11052 ;; Delete pre-compiled files.
11053 (for-each delete-file (find-files "src/geventhttpclient"
11054 ".*\\.pyc"))
11055 #t))))
11056 (build-system python-build-system)
11057 (arguments
11058 '(#:phases
11059 (modify-phases %standard-phases
11060 (add-after 'unpack 'delete-network-tests
11061 (lambda _
11062 (delete-file "src/geventhttpclient/tests/test_client.py")
11063 #t))
11064 (delete 'check)
11065 (add-after 'install 'check
11066 (lambda* (#:key inputs outputs #:allow-other-keys)
11067 (add-installed-pythonpath inputs outputs)
11068 (zero? (system* "py.test" "src/geventhttpclient/tests" "-v")))))))
11069 (native-inputs
11070 `(("python-pytest" ,python-pytest)))
11071 (propagated-inputs
11072 `(("python-certifi" ,python-certifi)
11073 ("python-gevent" ,python-gevent)
11074 ("python-six" ,python-six)))
11075 (home-page "https://github.com/gwik/geventhttpclient")
11076 (synopsis "HTTP client library for gevent")
11077 (description "@code{python-geventhttpclient} is a high performance,
11078 concurrent HTTP client library for python using @code{gevent}.")
11079 (license license:expat)))
11080
11081 (define-public python2-geventhttpclient
11082 (package-with-python2 python-geventhttpclient))
11083
11084 (define-public python-fastimport
11085 (package
11086 (name "python-fastimport")
11087 (version "0.9.6")
11088 (source
11089 (origin
11090 (method url-fetch)
11091 (uri (pypi-uri "fastimport" version))
11092 (sha256
11093 (base32 "1aqjsin4rmqm7ln4j0p73fzxifws6c6ikgyhav7r137m2ixsxl43"))))
11094 (build-system python-build-system)
11095 (home-page "https://github.com/jelmer/python-fastimport")
11096 (synopsis "VCS fastimport parser and generator in Python")
11097 (description "This package provides a parser for and generator of the Git
11098 @url{https://www.kernel.org/pub/software/scm/git/docs/git-fast-import.html,fastimport}
11099 format.")
11100 (license license:gpl2+)))
11101
11102 (define-public python2-fastimport
11103 (package-with-python2 python-fastimport))
11104
11105 (define-public python-twisted
11106 (package
11107 (name "python-twisted")
11108 (version "16.2.0")
11109 (source (origin
11110 (method url-fetch)
11111 (uri (pypi-uri "Twisted" version ".tar.bz2"))
11112 (sha256
11113 (base32
11114 "0ydxrp9myw1mvsz3qfzx5579y5llmqa82pxvqchgp5syczffi450"))))
11115 (build-system python-build-system)
11116 (arguments
11117 '(#:tests? #f)) ; FIXME: Some tests are failing.
11118 ;; #:phases
11119 ;; (modify-phases %standard-phases
11120 ;; (replace 'check
11121 ;; (lambda _
11122 ;; (zero? (system* "./bin/trial" "twisted")))))
11123 (propagated-inputs
11124 `(("python-zope-interface" ,python-zope-interface)))
11125 (home-page "https://twistedmatrix.com/")
11126 (synopsis "Asynchronous networking framework written in Python")
11127 (description
11128 "Twisted is an extensible framework for Python programming, with special
11129 focus on event-based network programming and multiprotocol integration.")
11130 (license license:expat)))
11131
11132 (define-public python2-twisted
11133 (package-with-python2 python-twisted))
11134
11135 (define-public python-pika
11136 (package
11137 (name "python-pika")
11138 (version "0.10.0")
11139 (source
11140 (origin
11141 (method url-fetch)
11142 (uri (pypi-uri "pika" version))
11143 (sha256
11144 (base32
11145 "0nb4h08di432lv7dy2v9kpwgk0w92f24sqc2hw2s9vwr5b8v8xvj"))))
11146 (build-system python-build-system)
11147 (native-inputs
11148 `(("python-pyev" ,python-pyev)
11149 ("python-tornado" ,python-tornado)
11150 ("python-twisted" ,python-twisted)))
11151 (home-page "https://pika.readthedocs.org")
11152 (synopsis "Pure Python AMQP Client Library")
11153 (description
11154 "Pika is a pure-Python implementation of the AMQP (Advanced Message Queuing
11155 Protocol) 0-9-1 protocol that tries to stay fairly independent of the underlying
11156 network support library.")
11157 (license license:bsd-3)))
11158
11159 (define-public python2-pika
11160 (package-with-python2 python-pika))
11161
11162 (define-public python-ply
11163 (package
11164 (name "python-ply")
11165 (version "3.9")
11166 (source
11167 (origin
11168 (method url-fetch)
11169 (uri (pypi-uri "ply" version))
11170 (sha256
11171 (base32
11172 "0gpl0yli3w03ipyqfrp3w5nf0iawhsq65anf5wwm2wf5p502jzhd"))))
11173 (build-system python-build-system)
11174 (home-page "http://www.dabeaz.com/ply/")
11175 (synopsis "Python Lex & Yacc")
11176 (description "PLY is a @code{lex}/@code{yacc} implemented purely in Python.
11177 It uses LR parsing and does extensive error checking.")
11178 (license license:bsd-3)))
11179
11180 (define-public python2-ply
11181 (package-with-python2 python-ply))
11182
11183 (define-public python-tabulate
11184 (package
11185 (name "python-tabulate")
11186 (version "0.7.7")
11187 (source (origin
11188 (method url-fetch)
11189 (uri (pypi-uri "tabulate" version))
11190 (sha256
11191 (base32
11192 "1inqhspd4frxnp08c32yndr0lc4px1xfkqah184i5w09gkhvi843"))))
11193 (build-system python-build-system)
11194 (arguments
11195 ;; FIXME: The pypi release tarball is missing a 'test/common.py'
11196 ;; and the latest release is not tagged in the upstream repository.
11197 '(#:tests? #f))
11198 (home-page "https://bitbucket.org/astanin/python-tabulate")
11199 (synopsis "Pretty-print tabular data")
11200 (description
11201 "Tabulate is a library and command-line utility to pretty-print tabular
11202 data in Python.")
11203 (license license:expat)))
11204
11205 (define-public python2-tabulate
11206 (package-with-python2 python-tabulate))
11207
11208 (define-public python-kazoo
11209 (package
11210 (name "python-kazoo")
11211 (version "2.2.1")
11212 (source
11213 (origin
11214 (method url-fetch)
11215 (uri (pypi-uri "kazoo" version))
11216 (sha256
11217 (base32
11218 "10pb864if9qi2pq9lfb9m8f7z7ss6rml80gf1d9h64lap5crjnjj"))))
11219 (build-system python-build-system)
11220 (arguments '(#:tests? #f)) ; XXX: needs zookeeper
11221 (propagated-inputs
11222 `(("python-six" ,python-six)))
11223 (home-page "https://kazoo.readthedocs.org")
11224 (synopsis "High-level Zookeeper client library")
11225 (description
11226 "Kazoo is a Python client library for the Apache Zookeeper distributed
11227 application service. It is designed to be easy to use and to avoid common
11228 programming errors.")
11229 (license license:asl2.0)))
11230
11231 (define-public python2-kazoo
11232 (package-with-python2 python-kazoo))
11233
11234 (define-public python-pykafka
11235 (package
11236 (name "python-pykafka")
11237 (version "2.4.0")
11238 (source (origin
11239 (method url-fetch)
11240 (uri (string-append
11241 "https://pypi.python.org/packages/8b/3e/"
11242 "384eeff406b06315738b62483fd2126c6e4f544167116b17cc04ea7d2a59/"
11243 "pykafka-" version ".tar.gz"))
11244 (sha256
11245 (base32
11246 "1id6sr159p6aa13bxcqyr9gln8sqg1l0ddzns5iws8kk5q1p5cfv"))))
11247 (build-system python-build-system)
11248 (arguments '(#:tests? #f)) ; XXX: needs zookeeper, kafka, etc.
11249 (propagated-inputs
11250 `(("python-gevent" ,python-gevent)
11251 ("python-kazoo" ,python-kazoo)
11252 ("python-tabulate" ,python-tabulate)))
11253 (inputs
11254 `(("librdkafka" ,librdkafka)))
11255 (home-page "https://pykafka.readthedocs.io/")
11256 (synopsis "Apache Kafka client for Python")
11257 (description
11258 "PyKafka is a client for the Apache Kafka distributed messaging system.
11259 It includes Python implementations of Kafka producers and consumers, which
11260 are optionally backed by a C extension built on librdkafka.")
11261 (license license:asl2.0)))
11262
11263 (define-public python2-pykafka
11264 (package-with-python2 python-pykafka))
11265
11266 (define-public python-wcwidth
11267 (package
11268 (name "python-wcwidth")
11269 (version "0.1.7")
11270 (source
11271 (origin
11272 (method url-fetch)
11273 (uri (pypi-uri "wcwidth" version))
11274 (sha256
11275 (base32
11276 "0pn6dflzm609m4r3i8ik5ni9ijjbb5fa3vg1n7hn6vkd49r77wrx"))))
11277 (build-system python-build-system)
11278 (home-page "https://github.com/jquast/wcwidth")
11279 (synopsis "Measure number of terminal column cells of wide-character codes")
11280 (description "Wcwidth measures the number of terminal column cells of
11281 wide-character codes. It is useful for those implementing a terminal emulator,
11282 or programs that carefully produce output to be interpreted by one. It is a
11283 Python implementation of the @code{wcwidth} and @code{wcswidth} C functions
11284 specified in POSIX.1-2001 and POSIX.1-2008.")
11285 (license license:expat)))
11286
11287 (define-public python2-wcwidth
11288 (package-with-python2 python-wcwidth))
11289
11290 (define-public python2-jsonrpclib
11291 (package
11292 (name "python2-jsonrpclib")
11293 (version "0.1.7")
11294 (source (origin
11295 (method url-fetch)
11296 (uri (string-append
11297 "https://pypi.python.org/packages/source/j/jsonrpclib/"
11298 "jsonrpclib-" version ".tar.gz"))
11299 (sha256
11300 (base32
11301 "02vgirw2bcgvpcxhv5hf3yvvb4h5wzd1lpjx8na5psdmaffj6l3z"))))
11302 (build-system python-build-system)
11303 (arguments
11304 `(#:tests? #f
11305 #:python ,python-2))
11306 (home-page "https://github.com/joshmarshall/jsonrpclib/")
11307 (synopsis "Implementation of JSON-RPC specification for Python")
11308 (description
11309 "This library is an implementation of the JSON-RPC specification.
11310 It supports both the original 1.0 specification, as well as the
11311 new (proposed) 2.0 spec, which includes batch submission, keyword arguments,
11312 etc.")
11313 (license license:asl2.0)))
11314
11315 (define-public python-chai
11316 (package
11317 (name "python-chai")
11318 (version "1.1.1")
11319 (source (origin
11320 (method url-fetch)
11321 (uri (pypi-uri "chai" version))
11322 (sha256
11323 (base32
11324 "016kf3irrclpkpvcm7q0gmkfibq7jgy30a9v73pp42bq9h9a32bl"))))
11325 (build-system python-build-system)
11326 (home-page "https://github.com/agoragames/chai")
11327 (synopsis "Mocking framework for Python")
11328 (description
11329 "Chai provides an api for mocking, stubbing and spying your python
11330 objects, patterned after the Mocha library for Ruby.")
11331 (license license:bsd-3)))
11332
11333 (define-public python2-chai
11334 (package-with-python2 python-chai))
11335
11336 (define-public python-arrow
11337 (package
11338 (name "python-arrow")
11339 (version "0.8.0")
11340 (source (origin
11341 (method url-fetch)
11342 (uri (pypi-uri "arrow" version))
11343 (sha256
11344 (base32
11345 "1bz7hkdgpqcjs866y58z8jywpy7al0f4rxdr00bh2l5qddyw245j"))))
11346 (build-system python-build-system)
11347 (native-inputs
11348 `(;; For testing
11349 ("python-chai" ,python-chai)
11350 ("python-simplejson" ,python-simplejson)))
11351 (propagated-inputs
11352 `(("python-dateutil" ,python-dateutil)))
11353 (home-page "https://github.com/crsmithdev/arrow/")
11354 (synopsis "Dates and times for Python")
11355 (description
11356 "Arrow is a Python library to creating, manipulating, formatting and
11357 converting dates, times, and timestamps. It implements and updates the
11358 datetime type.")
11359 (license license:asl2.0)))
11360
11361 (define-public python2-arrow
11362 (package-with-python2 python-arrow))
11363
11364 (define-public python-inflection
11365 (package
11366 (name "python-inflection")
11367 (version "0.3.1")
11368 (source
11369 (origin (method url-fetch)
11370 (uri (pypi-uri "inflection" version))
11371 (sha256
11372 (base32
11373 "1jhnxgnw8y3mbzjssixh6qkc7a3afc4fygajhqrqalnilyvpzshq"))))
11374 (build-system python-build-system)
11375 (native-inputs
11376 `(("python-pytest" ,python-pytest)))
11377 (home-page "https://github.com/jpvanhal/inflection")
11378 (synopsis "Python string transformation library")
11379 (description
11380 "Inflection is a string transformation library. It singularizes
11381 and pluralizes English words, and transforms strings from CamelCase to
11382 underscored string.")
11383 (license license:expat)))
11384
11385 (define-public python2-inflection
11386 (package-with-python2 python-inflection))
11387
11388 (define-public python-pylev
11389 (package
11390 (name "python-pylev")
11391 (version "1.3.0")
11392 (source (origin
11393 (method url-fetch)
11394 (uri (pypi-uri "pylev" version))
11395 (sha256
11396 (base32
11397 "1hz1x9blsbxya1y9nnhnwwdnqmakxi9mc0jkwj0rn6b1h44i0f86"))))
11398 (build-system python-build-system)
11399 (home-page "https://github.com/toastdriven/pylev")
11400 (synopsis "Levenshtein distance implementation in Python")
11401 (description "Pure Python Levenshtein implementation, based off the
11402 Wikipedia code samples at
11403 @url{http://en.wikipedia.org/wiki/Levenshtein_distance}.")
11404 (license license:bsd-3)))
11405
11406 (define-public python2-pylev
11407 (package-with-python2 python-pylev))
11408
11409 (define-public python-cleo
11410 (package
11411 (name "python-cleo")
11412 (version "0.4.1")
11413 (source (origin
11414 (method url-fetch)
11415 (uri (pypi-uri "cleo" version))
11416 (sha256
11417 (base32
11418 "1k2dcl6mqpn5bljyl6w42rqyd9mb3y9kh2mg7m2x3kfjwvg0rpva"))))
11419 (build-system python-build-system)
11420 (native-inputs
11421 `(;; For testing
11422 ("python-mock" ,python-mock)
11423 ("python-pytest" ,python-pytest)))
11424 (propagated-inputs
11425 `(("python-psutil" ,python-psutil)
11426 ("python-pylev" ,python-pylev)))
11427 (home-page "https://github.com/sdispater/cleo")
11428 (synopsis "Command-line arguments library for Python")
11429 (description
11430 "Cleo allows you to create command-line commands with signature in
11431 docstring and colored output.")
11432 (license license:expat)))
11433
11434 (define-public python2-cleo
11435 (package-with-python2 python-cleo))
11436
11437 (define-public python-lazy-object-proxy
11438 (package
11439 (name "python-lazy-object-proxy")
11440 (version "1.2.2")
11441 (source (origin
11442 (method url-fetch)
11443 (uri (pypi-uri "lazy-object-proxy" version))
11444 (sha256
11445 (base32
11446 "0s22aqqkdscyh8sjspyyax7qa1aiz8p4midrnyf39717fhfczm6x"))))
11447 (build-system python-build-system)
11448 (home-page "https://github.com/ionelmc/python-lazy-object-proxy")
11449 (synopsis "Lazy object proxy for python")
11450 (description
11451 "Lazy object proxy is an object that wraps a callable but defers the call
11452 until the object is actually required, and caches the result of said call.")
11453 (license license:bsd-2)))
11454
11455 (define-public python2-lazy-object-proxy
11456 (package-with-python2 python-lazy-object-proxy))
11457
11458 (define-public python-dnspython
11459 (package
11460 (name "python-dnspython")
11461 (version "1.15.0")
11462 (source (origin
11463 (method url-fetch)
11464 (uri (string-append "http://www.dnspython.org/kits/"
11465 version "/dnspython-" version ".tar.gz"))
11466 (sha256
11467 (base32
11468 "0jr4v2pd90i6l1xxbss2m05psbjaxvyvvvpq44wycijpfgjqln8i"))))
11469 (build-system python-build-system)
11470 (arguments '(#:tests? #f)) ; XXX: requires internet access
11471 (home-page "http://www.dnspython.org")
11472 (synopsis "DNS toolkit for Python")
11473 (description
11474 "dnspython is a DNS toolkit for Python. It supports almost all record
11475 types. It can be used for queries, zone transfers, and dynamic updates.
11476 It supports TSIG authenticated messages and EDNS0.")
11477 (license license:expat)))
11478
11479 (define-public python2-dnspython
11480 (package-with-python2 python-dnspython))
11481
11482 (define-public python-email-validator
11483 (package
11484 (name "python-email-validator")
11485 (version "1.0.2")
11486 (source
11487 (origin (method url-fetch)
11488 (uri (pypi-uri "email_validator" version))
11489 (sha256
11490 (base32
11491 "1ja9149l9ck5n45a72h3is7v476hjny5ybxbcamx1nw6iplsm7k6"))))
11492 (build-system python-build-system)
11493 (arguments
11494 '(#:phases
11495 (modify-phases %standard-phases
11496 (add-before 'build 'use-dnspython
11497 (lambda _
11498 (substitute* "setup.py"
11499 (("dnspython3") "dnspython"))
11500 #t)))))
11501 (propagated-inputs
11502 `(("python-dnspython" ,python-dnspython)
11503 ("python-idna" ,python-idna)))
11504 (home-page "https://github.com/JoshData/python-email-validator")
11505 (synopsis "Email address validation library for Python")
11506 (description
11507 "This library validates email address syntax and deliverability.")
11508 (license license:cc0)))
11509
11510 (define-public python2-email-validator
11511 (package-with-python2 python-email-validator))
11512
11513 (define-public python-ukpostcodeparser
11514 (package
11515 (name "python-ukpostcodeparser")
11516 (version "1.0.3")
11517 (source (origin
11518 (method url-fetch)
11519 (uri (pypi-uri "UkPostcodeParser" version))
11520 (sha256
11521 (base32
11522 "1jwg9z4rz51mcka1821rwgycsd0mcicyp1kiwjfa2kvg8bm9p2qd"))))
11523 (build-system python-build-system)
11524 (home-page "https://github.com/hamstah/ukpostcodeparser")
11525 (synopsis "UK Postcode parser for Python")
11526 (description
11527 "This library provides the @code{parse_uk_postcode} function for
11528 parsing UK postcodes.")
11529 (license license:expat)))
11530
11531 (define-public python2-ukpostcodeparser
11532 (package-with-python2 python-ukpostcodeparser))
11533
11534 (define-public python-faker
11535 (package
11536 (name "python-faker")
11537 (version "0.7.9")
11538 (source (origin
11539 (method url-fetch)
11540 (uri (pypi-uri "Faker" version))
11541 (sha256
11542 (base32
11543 "1fh2p2yz0fsdr4fqwxgddwbvfb6qn6vp8yx0qwqzra27yq5d1wsm"))
11544 (patches
11545 (search-patches "python-faker-fix-build-32bit.patch"))
11546 (modules '((guix build utils)))
11547 (snippet
11548 '(begin
11549 (for-each delete-file (find-files "." "\\.pyc$"))
11550 #t))))
11551 (build-system python-build-system)
11552 (arguments
11553 '(#:phases
11554 (modify-phases %standard-phases
11555 (replace 'check
11556 (lambda _
11557 (zero? (system* "python" "-m" "unittest" "-v" "tests")))))))
11558 (native-inputs
11559 `(;; For testing
11560 ("python-email-validator" ,python-email-validator)
11561 ("python-mock" ,python-mock)
11562 ("python-ukpostcodeparser" ,python-ukpostcodeparser)))
11563 (propagated-inputs
11564 `(("python-dateutil" ,python-dateutil)
11565 ("python-six" ,python-six)))
11566 (home-page "https://github.com/joke2k/faker")
11567 (synopsis "Python package that generates fake data")
11568 (description
11569 "Faker is a Python package that generates fake data such as names,
11570 addresses, and phone numbers.")
11571 (license license:expat)
11572 (properties `((python2-variant . ,(delay python2-faker))))))
11573
11574 (define-public python2-faker
11575 (let ((base (package-with-python2 (strip-python2-variant
11576 python-faker))))
11577 (package
11578 (inherit base)
11579 (propagated-inputs
11580 `(("python2-ipaddress" ,python2-ipaddress)
11581 ,@(package-propagated-inputs base))))))
11582
11583 (define-public python-fake-factory
11584 (package
11585 (name "python-fake-factory")
11586 (version "0.7.2")
11587 (source (origin
11588 (method url-fetch)
11589 (uri (pypi-uri "fake-factory" version))
11590 (sha256
11591 (base32
11592 "0vs0dkmg0dlaxf8w6q2i3k0i03gmp56ablldv7ci9x3nbadkn71g"))
11593 (patches
11594 (search-patches
11595 "python-fake-factory-fix-build-32bit.patch"))))
11596 (build-system python-build-system)
11597 (arguments
11598 '(#:phases
11599 (modify-phases %standard-phases
11600 (replace 'check
11601 (lambda _
11602 (zero? (system* "python" "-m" "unittest" "-v" "faker.tests")))))))
11603 (native-inputs
11604 `(;; For testing
11605 ("python-email-validator" ,python-email-validator)
11606 ("python-mock" ,python-mock)
11607 ("python-ukpostcodeparser" ,python-ukpostcodeparser)))
11608 (propagated-inputs
11609 `(("python-dateutil" ,python-dateutil)
11610 ("python-six" ,python-six)))
11611 (home-page "https://github.com/joke2k/faker")
11612 (synopsis "Python package that generates fake data")
11613 (description
11614 "Faker is a Python package that generates fake data such as names,
11615 addresses, and phone numbers.")
11616 (license license:expat)
11617 (properties `((python2-variant . ,(delay python2-fake-factory))
11618 (superseded . ,python-faker)))))
11619
11620 (define-public python2-fake-factory
11621 (let ((base (package-with-python2 (strip-python2-variant
11622 python-fake-factory))))
11623 (package
11624 (inherit base)
11625 (properties `((superseded . ,python2-faker)))
11626 (propagated-inputs
11627 `(("python2-ipaddress" ,python2-ipaddress)
11628 ,@(package-propagated-inputs base))))))
11629
11630 (define-public python-pyaml
11631 (package
11632 (name "python-pyaml")
11633 (version "15.8.2")
11634 (source (origin
11635 (method url-fetch)
11636 (uri (pypi-uri "pyaml" version))
11637 (sha256
11638 (base32
11639 "1f5m28vkh4ksq3d80d8mmd2z8wxvc3mgy2pmrv2751dm2xgznm4w"))))
11640 (build-system python-build-system)
11641 (native-inputs
11642 `(("python-unidecode" ,python-unidecode)))
11643 (propagated-inputs
11644 `(("python-pyyaml" ,python-pyyaml)))
11645 (home-page "https://github.com/mk-fg/pretty-yaml")
11646 (synopsis "YAML pretty-print library for Python")
11647 (description
11648 "pyaml is a PyYAML based python module to produce pretty and readable
11649 YAML-serialized data.")
11650 (license (license:non-copyleft "http://www.wtfpl.net/txt/copying/"))))
11651
11652 (define-public python2-pyaml
11653 (package-with-python2 python-pyaml))
11654
11655 (define-public python-flexmock
11656 (package
11657 (name "python-flexmock")
11658 (version "0.10.2")
11659 (source (origin
11660 (method url-fetch)
11661 (uri (pypi-uri "flexmock" version))
11662 (sha256
11663 (base32
11664 "0arc6njvs6i9v9hgvzk5m50296g7zy5m9d7pyb43vdsdgxrci5gy"))))
11665 (build-system python-build-system)
11666 (home-page "https://flexmock.readthedocs.org")
11667 (synopsis "Testing library for Python")
11668 (description
11669 "flexmock is a testing library for Python that makes it easy to create
11670 mocks, stubs and fakes.")
11671 (license license:bsd-3)))
11672
11673 (define-public python2-flexmock
11674 (package-with-python2 python-flexmock))
11675
11676 (define-public python-orator
11677 (package
11678 (name "python-orator")
11679 (version "0.8.2")
11680 (source (origin
11681 (method url-fetch)
11682 (uri (pypi-uri "orator" version))
11683 (sha256
11684 (base32
11685 "1li49irsqha17nrda4nsb48biyy0rarp9pphf0jpqwm5zr8hv569"))))
11686 (build-system python-build-system)
11687 (arguments '(#:tests? #f)) ; no tests
11688 (propagated-inputs
11689 `(("python-arrow" ,python-arrow)
11690 ("python-blinker" ,python-blinker)
11691 ("python-cleo" ,python-cleo)
11692 ("python-faker" ,python-faker)
11693 ("python-inflection" ,python-inflection)
11694 ("python-lazy-object-proxy" ,python-lazy-object-proxy)
11695 ("python-pyaml" ,python-pyaml)
11696 ("python-simplejson" ,python-simplejson)
11697 ("python-wrapt" ,python-wrapt)))
11698 (home-page "https://orator-orm.com/")
11699 (synopsis "ActiveRecord ORM for Python")
11700 (description
11701 "Orator provides a simple ActiveRecord-like Object Relational Mapping
11702 implementation for Python.")
11703 (license license:expat)
11704 (properties `((python2-variant . ,(delay python2-orator))))))
11705
11706 (define-public python2-orator
11707 (let ((base (package-with-python2 (strip-python2-variant python-orator))))
11708 (package
11709 (inherit base)
11710 (propagated-inputs
11711 `(("python2-ipaddress" ,python2-ipaddress)
11712 ,@(package-propagated-inputs base))))))
11713
11714 (define-public python-prompt-toolkit
11715 (package
11716 (name "python-prompt-toolkit")
11717 (version "1.0.9")
11718 (source
11719 (origin
11720 (method url-fetch)
11721 (uri (pypi-uri "prompt_toolkit" version ".tar.gz"))
11722 (sha256
11723 (base32
11724 "172r15k9kwdw2lnajvpz1632dd16nqz1kcal1p0lq5ywdarj6rfd"))))
11725 (build-system python-build-system)
11726 (arguments
11727 '(#:tests? #f)) ; The test suite uses some Windows-specific data types.
11728 (propagated-inputs
11729 `(("python-wcwidth" ,python-wcwidth)
11730 ("python-six" ,python-six)
11731 ("python-pygments" ,python-pygments)))
11732 (home-page "https://github.com/jonathanslenders/python-prompt-toolkit")
11733 (synopsis "Library for building command line interfaces in Python")
11734 (description
11735 "Prompt-Toolkit is a library for building interactive command line
11736 interfaces in Python. It's like GNU Readline but it also features syntax
11737 highlighting while typing, out-of-the-box multi-line input editing, advanced
11738 code completion, incremental search, support for Chinese double-width
11739 characters, mouse support, and auto suggestions.")
11740 (license license:bsd-3)))
11741
11742 (define-public python2-prompt-toolkit
11743 (package-with-python2 python-prompt-toolkit))
11744
11745 (define-public python-jedi
11746 (package
11747 (name "python-jedi")
11748 (version "0.9.0")
11749 (source
11750 (origin
11751 (method url-fetch)
11752 (uri (pypi-uri "jedi" version))
11753 (sha256
11754 (base32
11755 "0c8x962ynpx001fdvp07m2q5jk4igkxbj3rmnydavphvlgxijk1v"))))
11756 (build-system python-build-system)
11757 (arguments
11758 ;; FIXME: One test fails (use "py.test" instead of 'setup.py test').
11759 '(#:tests? #f))
11760 (native-inputs
11761 `(("python-pytest" ,python-pytest)))
11762 (home-page "https://github.com/davidhalter/jedi")
11763 (synopsis
11764 "Autocompletion for Python that can be used for text editors")
11765 (description
11766 "Jedi is an autocompletion tool for Python that can be used for text editors.")
11767 (license license:expat)))
11768
11769 (define-public python2-jedi
11770 (package-with-python2 python-jedi))
11771
11772 (define-public ptpython
11773 (package
11774 (name "ptpython")
11775 (version "0.34")
11776 (source (origin
11777 (method url-fetch)
11778 (uri (pypi-uri "ptpython" version))
11779 (sha256
11780 (base32
11781 "1mmbiyzf0n8hm7z2a562x7w5cbl6jc0zsk6vp40q1z4cyblv1k13"))))
11782 (build-system python-build-system)
11783 (arguments
11784 '(#:tests? #f)) ; FIXME: No tests in pypi tarball.
11785 (propagated-inputs
11786 `(("python-docopt" ,python-docopt)
11787 ("python-jedi" ,python-jedi)
11788 ("python-prompt-toolkit" ,python-prompt-toolkit)
11789 ("python-pygments" ,python-pygments)))
11790 (home-page "https://github.com/jonathanslenders/ptpython")
11791 (synopsis "Python Read-Eval-Print-Loop with nice IDE-like features")
11792 (description
11793 "ptpython is a Python read-eval-print loop with IDE-like features.
11794 It supports syntax highlighting, multiline editing, autocompletion, mouse,
11795 color schemes, bracketed paste, Vi and Emacs keybindings, Chinese characters
11796 etc.")
11797 (license license:bsd-3)
11798 (properties `((python2-variant . ,(delay ptpython-2))))))
11799
11800 (define-public ptpython-2
11801 (let ((base (package-with-python2 (strip-python2-variant ptpython))))
11802 (package
11803 (inherit base)
11804 (name "ptpython2"))))
11805
11806 (define-public python-requests-oauthlib
11807 (package
11808 (name "python-requests-oauthlib")
11809 (version "0.6.2")
11810 (source
11811 (origin
11812 (method url-fetch)
11813 (uri (pypi-uri "requests-oauthlib" version))
11814 (sha256
11815 (base32
11816 "0ykff67sjcl227c23g0rxzfx34rr5bf21kwv0z3zmgk0lfmch7hn"))))
11817 (build-system python-build-system)
11818 (arguments
11819 `(#:phases
11820 (modify-phases %standard-phases
11821 ;; removes tests that require network access
11822 (add-before 'check 'pre-check
11823 (lambda _
11824 (delete-file "tests/test_core.py")
11825 #t)))))
11826 (native-inputs
11827 `(("python-requests-mock" ,python-requests-mock)
11828 ("python-mock" ,python-mock)))
11829 (propagated-inputs
11830 `(("python-oauthlib" ,python-oauthlib)
11831 ("python-requests" ,python-requests)))
11832 (home-page
11833 "https://github.com/requests/requests-oauthlib")
11834 (synopsis
11835 "OAuthlib authentication support for Requests")
11836 (description
11837 "Requests-OAuthlib uses the Python Requests and OAuthlib libraries to
11838 provide an easy-to-use Python interface for building OAuth1 and OAuth2 clients.")
11839 (license license:isc)))
11840
11841 (define-public python2-requests-oauthlib
11842 (package-with-python2 python-requests-oauthlib))
11843
11844 (define-public python-stem
11845 (package
11846 (name "python-stem")
11847 (version "1.5.4")
11848 (source
11849 (origin
11850 (method url-fetch)
11851 (uri (pypi-uri "stem" version))
11852 (sha256
11853 (base32
11854 "1j7pnblrn0yr6jmxvsq6y0ihmxmj5x50jl2n2606w67f6wq16j9n"))))
11855 (build-system python-build-system)
11856 (arguments
11857 `(#:phases
11858 (modify-phases %standard-phases
11859 (replace 'check
11860 (lambda _
11861 (zero? (system* "./run_tests.py" "--unit")))))))
11862 (native-inputs
11863 `(("python-mock" ,python-mock)
11864 ("python-pep8" ,python-pep8)
11865 ("python-pyflakes" ,python-pyflakes)))
11866 (home-page "https://stem.torproject.org/")
11867 (synopsis
11868 "Python controller library that allows applications to interact with Tor")
11869 (description
11870 "Stem is a Python controller library for Tor. With it you can use Tor's
11871 control protocol to script against the Tor process and read descriptor data
11872 relays publish about themselves.")
11873 (license license:lgpl3)))
11874
11875 (define-public python2-stem
11876 (package-with-python2 python-stem))
11877
11878 (define-public python-pyserial
11879 (package
11880 (name "python-pyserial")
11881 (version "3.1.1")
11882 (source
11883 (origin
11884 (method url-fetch)
11885 (uri (pypi-uri "pyserial" version))
11886 (sha256
11887 (base32
11888 "0k1nfdrxxkdlv4zgaqsdv8li0pj3gbh2pyxw8q2bsg6f9490amyn"))))
11889 (build-system python-build-system)
11890 (arguments
11891 '(#:tests? #f)) ; FIXME: 3/49 tests are failing.
11892 ;; #:phases
11893 ;; (modify-phases %standard-phases
11894 ;; (replace 'check
11895 ;; (lambda _
11896 ;; (zero? (system* "python" "test/run_all_tests.py" "loop://")))))))
11897 (home-page
11898 "https://github.com/pyserial/pyserial")
11899 (synopsis "Python Serial Port Bindings")
11900 (description "@code{pyserial} provide serial port bindings for Python. It
11901 supports different byte sizes, stop bits, parity and flow control with RTS/CTS
11902 and/or Xon/Xoff. The port is accessed in RAW mode.")
11903 (license license:bsd-3)))
11904
11905 (define-public python2-pyserial
11906 (package-with-python2 python-pyserial))
11907
11908 (define-public python-kivy
11909 (package
11910 (name "python-kivy")
11911 (version "1.9.1")
11912 (source
11913 (origin
11914 (method url-fetch)
11915 (uri (pypi-uri "kivy" version))
11916 (file-name (string-append name "-" version ".tar.gz"))
11917 (sha256
11918 (base32
11919 "0zk3g1j1z0lzcm9d0k1lprrs95zr8n8k5pdg3p5qlsn26jz4bg19"))))
11920 (build-system python-build-system)
11921 (arguments
11922 `(#:tests? #f ; Tests require many optional packages
11923 #:phases
11924 (modify-phases %standard-phases
11925 (replace 'build (lambda _ (zero? (system* "make" "force"))))
11926 (add-after 'patch-generated-file-shebangs 'set-sdl-paths
11927 (lambda* (#:key inputs #:allow-other-keys)
11928 (setenv "KIVY_SDL2_PATH"
11929 (string-append (assoc-ref inputs "sdl-union")
11930 "/include/SDL2"))
11931 #t)))))
11932 (native-inputs
11933 `(("pkg-config" ,pkg-config)
11934 ("python-cython" ,python-cython)))
11935 (inputs
11936 `(("gstreamer" ,gstreamer)
11937 ("mesa" ,mesa)
11938 ("sdl-union"
11939 ,(sdl-union (list sdl2 sdl2-image sdl2-mixer sdl2-ttf)))))
11940 (home-page "http://kivy.org")
11941 (synopsis
11942 "Multitouch application framework")
11943 (description
11944 "A software library for rapid development of
11945 hardware-accelerated multitouch applications.")
11946 (license license:expat)))
11947
11948 (define-public python2-kivy
11949 (package-with-python2 python-kivy))
11950
11951 (define-public python-kivy-next
11952 (let ((commit "a988c5e7a47da56263ff39514264a3de516ef2fe")
11953 (revision "1"))
11954 (package (inherit python-kivy)
11955 (name "python-kivy-next")
11956 (version (string-append "1.9.1-" revision "."
11957 (string-take commit 7)))
11958 (source
11959 (origin
11960 (method git-fetch)
11961 (uri (git-reference
11962 (url "https://github.com/kivy/kivy")
11963 (commit commit)))
11964 (file-name (string-append name "-" version "-checkout"))
11965 (sha256
11966 (base32
11967 "0jk92b4a8l7blkvkgkjihk171s0dfnq582cckff5srwc8kal5m0p")))))))
11968
11969 (define-public python2-kivy-next
11970 (package-with-python2 python-kivy-next))
11971
11972 (define-public python-binaryornot
11973 (package
11974 (name "python-binaryornot")
11975 (version "0.4.0")
11976 (source (origin
11977 (method url-fetch)
11978 (uri (pypi-uri "binaryornot" version))
11979 (sha256
11980 (base32
11981 "1j4f51dxic39mdwf6alj7gd769wy6mhk916v031wjali51xkh3xb"))))
11982 (build-system python-build-system)
11983 (propagated-inputs
11984 `(("python-chardet" ,python-chardet)
11985 ("python-hypothesis" ,python-hypothesis)))
11986 (home-page "https://github.com/audreyr/binaryornot")
11987 (synopsis "Package to check if a file is binary or text")
11988 (description "Ultra-lightweight pure Python package to check if a file is
11989 binary or text.")
11990 (license license:bsd-3)
11991 (properties `((python2-variant . ,(delay python2-binaryornot))))))
11992
11993 (define-public python2-binaryornot
11994 (let ((base (package-with-python2 (strip-python2-variant python-binaryornot))))
11995 (package (inherit base)
11996 (propagated-inputs
11997 `(("python2-enum34" ,python2-enum34)
11998 ,@(package-propagated-inputs base))))))
11999
12000 (define-public python-nltk
12001 (package
12002 (name "python-nltk")
12003 (version "3.2.1")
12004 (source (origin
12005 (method url-fetch)
12006 (uri (pypi-uri "nltk" version))
12007 (sha256
12008 (base32
12009 "0skxbhnymwlspjkzga0f7x1hg3y50fwpfghs8g8k7fh6f4nknlym"))))
12010 (build-system python-build-system)
12011 (arguments
12012 '(;; The tests require some extra resources to be downloaded.
12013 ;; TODO Try packaging these resources.
12014 #:tests? #f))
12015 (home-page "http://nltk.org/")
12016 (synopsis "Natural Language Toolkit")
12017 (description "It provides interfaces to over 50 corpora and lexical
12018 resources such as WordNet, along with a suite of text processing libraries
12019 for classification, tokenization, stemming, tagging, parsing, and semantic
12020 reasoning, wrappers for natural language processing libraries.")
12021 (license license:asl2.0)))
12022
12023 (define-public python2-nltk
12024 (package-with-python2 python-nltk))
12025
12026 (define-public python-pymongo
12027 (package
12028 (name "python-pymongo")
12029 (version "3.3.0")
12030 (source (origin
12031 (method url-fetch)
12032 (uri (pypi-uri "pymongo" version))
12033 (sha256
12034 (base32
12035 "07mra6w86wjqy4lx5fvimidjhhfzd562gfjn8grsnbv2q8pk0i9x"))))
12036 (build-system python-build-system)
12037 (propagated-inputs
12038 `(("python-certifi" ,python-certifi)))
12039 (home-page "https://github.com/mongodb/mongo-python-driver")
12040 (synopsis "Python driver for MongoDB")
12041 (description "Python driver for MongoDB.")
12042 (license license:asl2.0)))
12043
12044 (define-public python2-pymongo
12045 (package-with-python2 python-pymongo))
12046
12047 (define-public python-sh
12048 (package
12049 (name "python-sh")
12050 (version "1.11")
12051 (source (origin
12052 (method url-fetch)
12053 (uri (pypi-uri "sh" version))
12054 (sha256
12055 (base32
12056 "192r0mpv6dmkysjzhc43ddffiwb5g7c76bgr1mb1z2xz9awbj3sr"))))
12057 (build-system python-build-system)
12058 (arguments
12059 `(#:tests? #f)) ; no tests
12060 (home-page "https://github.com/amoffat/sh")
12061 (synopsis "Python subprocess interface")
12062 (description "Abstracts process invocation by providing a function
12063 interface for programs.")
12064 (license license:expat)))
12065
12066 (define-public python2-sh
12067 (package-with-python2 python-sh))
12068
12069 (define-public python-consul
12070 (package
12071 (name "python-consul")
12072 (version "0.6.1")
12073 (source
12074 (origin
12075 (method url-fetch)
12076 (uri (pypi-uri "python-consul" version))
12077 (sha256
12078 (base32
12079 "0rfyxcy4cr3x848vhx876ifalxd5ghq6l5x813m49h4vq2d4jiq8"))))
12080 (build-system python-build-system)
12081 (native-inputs
12082 `(("python-pytest" ,python-pytest)))
12083 (propagated-inputs
12084 `(("python-requests" ,python-requests)
12085 ("python-six" ,python-six)))
12086 (home-page "https://github.com/cablehead/python-consul")
12087 (synopsis "Python client for Consul")
12088 (description
12089 "Python client for @url{http://www.consul.io/,Consul}, a tool for service
12090 discovery, monitoring and configuration.")
12091 (license license:expat)))
12092
12093 (define-public python2-consul
12094 (package-with-python2 python-consul))
12095
12096 (define-public python-schematics
12097 (package
12098 (name "python-schematics")
12099 (version "1.1.1")
12100 (source
12101 (origin
12102 (method url-fetch)
12103 (uri (string-append
12104 "https://github.com/schematics/schematics/archive/v" version ".tar.gz"))
12105 (file-name (string-append name "-" version ".tar.gz"))
12106 (sha256
12107 (base32
12108 "19v1i69bf3bzarfxmbv0v6ivpcn758x3shvbiy9l2hy0lvqwnp6l"))))
12109 (build-system python-build-system)
12110 (propagated-inputs
12111 `(("python-six" ,python-six)))
12112 (arguments
12113 `(#:tests? #f)) ; requires a bunch of not very nice packages with fixed
12114 ; version requirements (eg python-coveralls)
12115 (home-page "https://github.com/schematics/schematics")
12116 (synopsis "Python Data Structures for Humans")
12117 (description "Python Data Structures for Humans.")
12118 (license license:bsd-3)))
12119
12120 (define-public python2-schematics
12121 (package-with-python2 python-schematics))
12122
12123 (define-public python-publicsuffix
12124 (package
12125 (name "python-publicsuffix")
12126 (version "1.1.0")
12127 (source (origin
12128 (method url-fetch)
12129 (uri (pypi-uri "publicsuffix" version))
12130 (sha256
12131 (base32
12132 "1adx520249z2cy7ykwjr1k190mn2888wqn9jf8qm27ly4qymjxxf"))))
12133 (build-system python-build-system)
12134 (arguments
12135 `(#:tests? #f)) ; tests use the internet
12136 (home-page "https://www.tablix.org/~avian/git/publicsuffix.git")
12137 (synopsis "Get suffix for a domain name")
12138 (description "Get a public suffix for a domain name using the Public Suffix
12139 List.")
12140 (license license:expat)))
12141
12142 (define-public python2-publicsuffix
12143 (package-with-python2 python-publicsuffix))
12144
12145 (define-public python-publicsuffix2
12146 (package
12147 (name "python-publicsuffix2")
12148 (version "2.20160818")
12149 (source
12150 (origin
12151 (method url-fetch)
12152 (uri (pypi-uri "publicsuffix2" version ".tar.bz2"))
12153 (sha256
12154 (base32
12155 "1bb55yka9vkn7i6y1kjzxa516kh6v4gsrxa90w5wdz5p5n968r68"))))
12156 (build-system python-build-system)
12157 (arguments
12158 '(#:tests? #f)) ; The test suite requires network access.
12159 (home-page "https://github.com/pombredanne/python-publicsuffix2")
12160 (synopsis "Get a public suffix for a domain name using the Public Suffix List")
12161 (description "Get a public suffix for a domain name using the Public Suffix
12162 List. Forked from and using the same API as the publicsuffix package.")
12163 (license (list license:expat license:mpl2.0))))
12164
12165 (define-public python2-publicsuffix2
12166 (package-with-python2 python-publicsuffix2))
12167
12168 (define-public python-url
12169 (package
12170 (name "python-url")
12171 (version "0.2.0")
12172 (source (origin
12173 (method url-fetch)
12174 (uri (pypi-uri "url" version))
12175 (sha256
12176 (base32
12177 "0v879yadcz9qxfl41ak6wkga1kimp9cflla9ddz03hjjvgkqy5ki"))))
12178 (build-system python-build-system)
12179 (propagated-inputs
12180 `(("python-publicsuffix" ,python-publicsuffix)))
12181 (native-inputs
12182 `(("python-coverage" ,python-coverage)
12183 ("python-nose" ,python-nose)))
12184 (arguments
12185 `(#:tests? #f)) ; FIXME: tests fail with "ImportError: No module named 'tests'"
12186 (home-page "https://github.com/seomoz/url-py")
12187 (synopsis "URL Parsing")
12188 (description "Library for parsing urls.")
12189 (license license:expat)
12190 (properties `((python2-variant . ,(delay python2-url))))))
12191
12192 (define-public python2-url
12193 (let ((base (package-with-python2 (strip-python2-variant python-url))))
12194 (package (inherit base)
12195 (propagated-inputs
12196 `(("python2-publicsuffix" ,python2-publicsuffix))))))
12197
12198 (define-public python-freezegun
12199 (package
12200 (name "python-freezegun")
12201 (version "0.3.8")
12202 (source
12203 (origin
12204 (method url-fetch)
12205 (uri (pypi-uri "freezegun" version))
12206 (sha256
12207 (base32
12208 "1sf38d3ibv1jhhvr52x7dhrsiyqk1hm165dfv8w8wh0fhmgxg151"))))
12209 (build-system python-build-system)
12210 (native-inputs
12211 `(("python-mock" ,python-mock)
12212 ("python-nose" ,python-nose)
12213 ("python-coverage" ,python-coverage)))
12214 (propagated-inputs
12215 `(("python-six" ,python-six)
12216 ("python-dateutil" ,python-dateutil)))
12217 (arguments
12218 `(#:phases (modify-phases %standard-phases
12219 ;; The tests are normally executed via `make test`, but the PyPi
12220 ;; package does not include the Makefile.
12221 (replace 'check
12222 (lambda _
12223 (zero? (system* "nosetests" "./tests/")))))))
12224 (home-page "https://github.com/spulec/freezegun")
12225 (synopsis "Test utility for mocking the datetime module")
12226 (description
12227 "FreezeGun is a library that allows your python tests to travel through
12228 time by mocking the datetime module.")
12229 (license license:asl2.0)))
12230
12231 (define-public python2-freezegun
12232 (package-with-python2 python-freezegun))
12233
12234
12235 (define-public python-odfpy
12236 (package
12237 (name "python-odfpy")
12238 (version "1.3.3")
12239 (source (origin
12240 (method url-fetch)
12241 (uri (pypi-uri "odfpy" version))
12242 (sha256
12243 (base32
12244 "1a6ms0w9zfhhkqhvrnynwwbxrivw6hgjc0s5k7j06npc7rq0blxw"))))
12245 (arguments
12246 `(#:modules ((srfi srfi-1)
12247 (guix build python-build-system)
12248 (guix build utils))
12249 #:phases
12250 (modify-phases %standard-phases
12251 (replace 'check
12252 ;; The test runner invokes python2 and python3 for test*.py.
12253 ;; To avoid having both in inputs, we replicate it here.
12254 (lambda _
12255 (every (lambda (test-file)
12256 (zero? (system* "python" test-file)))
12257 (find-files "tests" "^test.*\\.py$")))))))
12258 (build-system python-build-system)
12259 (home-page "https://github.com/eea/odfpy")
12260 (synopsis "Python API and tools to manipulate OpenDocument files")
12261 (description "Collection of libraries and utility programs written in
12262 Python to manipulate OpenDocument 1.2 files.")
12263 (license
12264 ;; The software is mainly dual GPL2+ and ASL2.0, but includes a
12265 ;; number of files with other licenses.
12266 (list license:gpl2+ license:asl2.0 license:lgpl2.1+ license:cc-by-sa3.0))))
12267
12268 (define-public python2-odfpy
12269 (package-with-python2 python-odfpy))
12270
12271 (define-public python-cachecontrol
12272 (package
12273 (name "python-cachecontrol")
12274 (version "0.11.6")
12275 (source
12276 (origin
12277 (method url-fetch)
12278 ;; Pypi does not have tests.
12279 (uri (string-append
12280 "https://github.com/ionrock/cachecontrol/archive/v"
12281 version ".tar.gz"))
12282 (file-name (string-append name "-" version ".tar.gz"))
12283 (sha256
12284 (base32
12285 "0yj60d0f69a2l8p7y86k4zhzzm6rnxpq74sfl240pry9l0lfw2vw"))))
12286 (build-system python-build-system)
12287 (arguments
12288 `(#:phases
12289 (modify-phases %standard-phases
12290 (replace 'check
12291 (lambda _
12292 ;; Drop test that requires internet access.
12293 (delete-file "tests/test_regressions.py")
12294 (setenv "PYTHONPATH"
12295 (string-append (getcwd) "/build/lib:"
12296 (getenv "PYTHONPATH")))
12297 (zero? (system* "py.test" "-vv")))))))
12298 (native-inputs
12299 `(("python-pytest" ,python-pytest)
12300 ("python-redis" ,python-redis)
12301 ("python-webtest" ,python-webtest)
12302 ("python-mock" ,python-mock)))
12303 (propagated-inputs
12304 `(("python-requests" ,python-requests)
12305 ("python-lockfile" ,python-lockfile)))
12306 (home-page "https://github.com/ionrock/cachecontrol")
12307 (synopsis "The httplib2 caching algorithms for use with requests")
12308 (description "CacheControl is a port of the caching algorithms in
12309 @code{httplib2} for use with @code{requests} session objects.")
12310 (license license:asl2.0)))
12311
12312 (define-public python2-cachecontrol
12313 (package-with-python2 python-cachecontrol))
12314
12315 (define-public python-lit
12316 (package
12317 (name "python-lit")
12318 (version "0.5.0")
12319 (source
12320 (origin
12321 (method url-fetch)
12322 (uri (pypi-uri "lit" version))
12323 (sha256
12324 (base32
12325 "135m2b9cwih85g66rjggavck328z7lj37srgpq3jxszbg0g2b91y"))))
12326 (build-system python-build-system)
12327 (home-page "http://llvm.org/")
12328 (synopsis "LLVM Software Testing Tool")
12329 (description "@code{lit} is a portable tool for executing LLVM and Clang
12330 style test suites, summarizing their results, and providing indication of
12331 failures.")
12332 (license license:ncsa)))
12333
12334 (define-public python2-lit
12335 (package-with-python2 python-lit))
12336
12337 (define-public python-pytest-pep8
12338 (package
12339 (name "python-pytest-pep8")
12340 (version "1.0.6")
12341 (source (origin
12342 (method url-fetch)
12343 (uri (pypi-uri "pytest-pep8" version))
12344 (sha256
12345 (base32
12346 "06032agzhw1i9d9qlhfblnl3dw5hcyxhagn7b120zhrszbjzfbh3"))))
12347 (build-system python-build-system)
12348 (arguments
12349 `(#:tests? #f)) ; Fails with recent pytest and pep8. See upstream issues #8 and #12.
12350 (native-inputs
12351 `(("python-pytest" ,python-pytest)))
12352 (propagated-inputs
12353 `(("python-pep8" ,python-pep8)))
12354 (home-page "https://bitbucket.org/pytest-dev/pytest-pep8")
12355 (synopsis "Py.test plugin to check PEP8 requirements")
12356 (description "Pytest plugin for checking PEP8 compliance.")
12357 (license license:expat)))
12358
12359 (define-public python2-pytest-pep8
12360 (package-with-python2 python-pytest-pep8))
12361
12362 (define-public python-pytest-flakes
12363 (package
12364 (name "python-pytest-flakes")
12365 (version "1.0.1")
12366 (source (origin
12367 (method url-fetch)
12368 (uri (pypi-uri "pytest-flakes" version))
12369 (sha256
12370 (base32
12371 "0flag3n33kbhyjrhzmq990rvg4yb8hhhl0i48q9hw0ll89jp28lw"))))
12372 (build-system python-build-system)
12373 (arguments
12374 `(#:phases
12375 (modify-phases %standard-phases
12376 (delete 'check)
12377 (add-after 'install 'check
12378 (lambda* (#:key outputs inputs #:allow-other-keys)
12379 ;; It's easier to run tests after install.
12380 ;; Make installed package available for running the tests
12381 (add-installed-pythonpath inputs outputs)
12382 (zero? (system* "py.test" "-vv")))))))
12383 (native-inputs
12384 `(("python-coverage" ,python-coverage)
12385 ("python-pytest" ,python-pytest)
12386 ("python-pytest-cache" ,python-pytest-cache)
12387 ("python-pytest-pep8" ,python-pytest-pep8)))
12388 (propagated-inputs
12389 `(("python-pyflakes" ,python-pyflakes)))
12390 (home-page "https://github.com/fschulze/pytest-flakes")
12391 (synopsis "Py.test plugin to check source code with pyflakes")
12392 (description "Pytest plugin for checking Python source code with pyflakes.")
12393 (license license:expat)))
12394
12395 (define-public python2-pytest-flakes
12396 (package-with-python2 python-pytest-flakes))
12397
12398 (define-public python-natsort
12399 (package
12400 (name "python-natsort")
12401 (version "5.0.2")
12402 (source (origin
12403 (method url-fetch)
12404 (uri (pypi-uri "natsort" version))
12405 (sha256
12406 (base32
12407 "0bh6j0l8iapjnsgg3bs6q075cnzjl6zw1vlgqyv3qrygm2cxypkn"))))
12408 (build-system python-build-system)
12409 (arguments
12410 `(#:phases
12411 (modify-phases %standard-phases
12412 (add-before 'check 'set-cachedir
12413 ;; Tests require write access to $HOME by default
12414 (lambda _ (setenv "PYTHON_EGG_CACHE" "/tmp") #t)))))
12415 (native-inputs
12416 `(("python-hypothesis" ,python-hypothesis)
12417 ("python-pytest-cache" ,python-pytest-cache)
12418 ("python-pytest-cov" ,python-pytest-cov)
12419 ("python-pytest-flakes" ,python-pytest-flakes)
12420 ("python-pytest-pep8" ,python-pytest-pep8)))
12421 (propagated-inputs ; TODO: Add python-fastnumbers.
12422 `(("python-pyicu" ,python-pyicu)))
12423 (home-page "https://github.com/SethMMorton/natsort")
12424 (synopsis "Natural sorting for python and shell")
12425 (description
12426 "Natsort lets you apply natural sorting on lists instead of
12427 lexicographical. If you use the built-in @code{sorted} method in python
12428 on a list such as @code{['a20', 'a9', 'a1', 'a4', 'a10']}, it would be
12429 returned as @code{['a1', 'a10', 'a20', 'a4', 'a9']}. Natsort provides a
12430 function @code{natsorted} that identifies numbers and sorts them separately
12431 from strings. It can also sort version numbers, real numbers, mixed types
12432 and more, and comes with a shell command @command{natsort} that exposes this
12433 functionality in the command line.")
12434 (license license:expat)
12435 (properties `((python2-variant . ,(delay python2-natsort))))))
12436
12437 (define-public python2-natsort
12438 (let ((base (package-with-python2 (strip-python2-variant python-natsort))))
12439 (package (inherit base)
12440 (native-inputs
12441 `(("python2-pathlib" ,python2-pathlib)
12442 ("python2-mock" ,python2-mock)
12443 ("python2-enum34" ,python2-enum34)
12444 ,@(package-native-inputs base))))))
12445
12446 (define-public python-glances
12447 (package
12448 (name "python-glances")
12449 (version "2.7.1")
12450 (source
12451 (origin
12452 (method url-fetch)
12453 (uri (pypi-uri "Glances" version))
12454 (sha256
12455 (base32
12456 "11jbq40g8alsbirnd4kiagznqg270247i0m8qhi48ldf2i5xppxg"))))
12457 (build-system python-build-system)
12458 (propagated-inputs
12459 `(("python-psutil" ,python-psutil)))
12460 (home-page
12461 "https://github.com/nicolargo/glances")
12462 (synopsis
12463 "A cross-platform curses-based monitoring tool")
12464 (description
12465 "Glances is a curses-based monitoring tool for a wide variety of platforms.
12466 Glances uses the PsUtil library to get information from your system. It monitors
12467 CPU, load, memory, network bandwidth, disk I/O, disk use, and more.")
12468 (license license:lgpl3+)))
12469
12470 (define-public python2-glances
12471 (package-with-python2 python-glances))
12472
12473 (define-public python-graphql-core
12474 (package
12475 (name "python-graphql-core")
12476 (version "0.5.3")
12477 (source
12478 (origin
12479 (method url-fetch)
12480 (uri (pypi-uri "graphql-core" version))
12481 (sha256
12482 (base32
12483 "0rsaarx2sj4xnw9966rhh4haiqaapm4lm2mfqm48ywd51j5vh1a0"))))
12484 (build-system python-build-system)
12485 (arguments
12486 `(#:tests? #f ; Tests require the unpackaged pytest-benchmark.
12487 #:phases
12488 (modify-phases %standard-phases
12489 (add-after 'unpack 'patch-hardcoded-version
12490 (lambda _ (substitute*
12491 "setup.py"
12492 (("'gevent==1.1rc1'") "'gevent'"))
12493 #t)))))
12494 (native-inputs
12495 `(("python-gevent" ,python-gevent)
12496 ("python-mock" ,python-mock)
12497 ("python-pytest-mock" ,python-pytest-mock)))
12498 (propagated-inputs
12499 `(("python-promise" ,python-promise)
12500 ("python-six" ,python-six)))
12501 (home-page "https://github.com/graphql-python/graphql-core")
12502 (synopsis "GraphQL implementation for Python")
12503 (description
12504 "GraphQL implementation for Python. GraphQL is a data query language and
12505 runtime designed and used to request and deliver data to mobile and web apps.
12506 This library is a port of @url{https://github.com/graphql/graphql-js,graphql-js}
12507 to Python.")
12508 (license license:expat)))
12509
12510 (define-public python2-graphql-core
12511 (package-with-python2 python-graphql-core))
12512
12513 (define-public python-graphql-relay
12514 (package
12515 (name "python-graphql-relay")
12516 (version "0.4.5")
12517 (source
12518 (origin
12519 (method url-fetch)
12520 (uri (pypi-uri "graphql-relay" version))
12521 (sha256
12522 (base32
12523 "1nv5dxcj59zv31qvl8bd142njmxcmymny2dz3br1l2cpbljbf5i7"))))
12524 (build-system python-build-system)
12525 (native-inputs
12526 `(("python-pytest" ,python-pytest)))
12527 (propagated-inputs
12528 `(("python-graphql-core" ,python-graphql-core)
12529 ("python-promise" ,python-promise)
12530 ("python-six" ,python-six)))
12531 (home-page "https://github.com/graphql-python/graphql-relay-py")
12532 (synopsis "Relay implementation for Python")
12533 (description
12534 "This is a library to allow the easy creation of Relay-compliant servers
12535 using the GraphQL Python reference implementation of a GraphQL server. It
12536 should be noted that the code is a exact port of the original
12537 @url{https://github.com/graphql/graphql-relay-js,graphql-relay js implementation}
12538 from Facebook.")
12539 (license license:expat)))
12540
12541 (define-public python2-graphql-relay
12542 (package-with-python2 python-graphql-relay))
12543
12544 (define-public python-graphene
12545 (package
12546 (name "python-graphene")
12547 (version "0.10.2")
12548 (source
12549 (origin
12550 (method url-fetch)
12551 (uri (pypi-uri "graphene" version))
12552 (sha256
12553 (base32
12554 "09zhac7igh9ixdz0ay6csy35b40l1jwbf2wrbxmgxwfhy51iy06q"))))
12555 (build-system python-build-system)
12556 (native-inputs
12557 `(("python-django-filter" ,python-django-filter)
12558 ("python-mock" ,python-mock)
12559 ("python-psycopg2" ,python-psycopg2)
12560 ("python-pytest-django" ,python-pytest-django)
12561 ("python-sqlalchemy-utils" ,python-sqlalchemy-utils)))
12562 (propagated-inputs
12563 `(("python-graphql-core" ,python-graphql-core)
12564 ("python-graphql-relay" ,python-graphql-relay)
12565 ("python-iso8601" ,python-iso8601)
12566 ("python-promise" ,python-promise)
12567 ("python-six" ,python-six)))
12568 (home-page "http://graphene-python.org/")
12569 (synopsis "GraphQL Framework for Python")
12570 (description
12571 "Graphene is a Python library for building GraphQL schemas/types.
12572 A GraphQL schema describes your data model, and provides a GraphQL server
12573 with an associated set of resolve methods that know how to fetch data.")
12574 (properties `((python2-variant . ,(delay python2-graphene))))
12575 (license license:expat)))
12576
12577 (define-public python2-graphene
12578 (let ((base (package-with-python2
12579 (strip-python2-variant python-graphene))))
12580 (package (inherit base)
12581 (native-inputs
12582 `(("python2-sqlalchemy" ,python2-sqlalchemy)
12583 ,@(package-native-inputs base))))))
12584
12585 (define-public python-nautilus
12586 (package
12587 (name "python-nautilus")
12588 (version "0.4.9")
12589 (source
12590 (origin
12591 (method url-fetch)
12592 (uri (pypi-uri "nautilus" version))
12593 (sha256
12594 (base32
12595 "01hwzjc1zshk4vvxrcghm398fpy4jls66dyz06g07mrwqif8878p"))))
12596 (build-system python-build-system)
12597 (arguments `(#:tests? #f)) ; fails to import test modules
12598 (propagated-inputs
12599 `(("python-bcrypt" ,python-bcrypt)
12600 ("python-click" ,python-click)
12601 ("python-consul" ,python-consul)
12602 ("python-graphene" ,python-graphene)
12603 ("python-jinja2" ,python-jinja2)
12604 ("python-peewee" ,python-peewee)
12605 ("python-pika" ,python-pika)
12606 ("python-tornado" ,python-tornado)
12607 ("python-wtforms" ,python-wtforms)))
12608 (native-inputs
12609 `(("python-nose2" ,python-nose2)))
12610 (home-page "https://github.com/AlecAivazis/nautilus")
12611 (synopsis "Library for creating microservice applications")
12612 (description
12613 "Nautilus is a framework for flux based microservices that looks to
12614 provide extendible implementations of common aspects of a cloud so that you can
12615 focus on building massively scalable web applications.")
12616 (license license:expat)))
12617
12618 (define-public python-snowballstemmer
12619 (package
12620 (name "python-snowballstemmer")
12621 (version "1.2.1")
12622 (source (origin
12623 (method url-fetch)
12624 (uri (pypi-uri "snowballstemmer" version))
12625 (sha256
12626 (base32
12627 "0a0idq4y5frv7qsg2x62jd7rd272749xk4x99misf5rcifk2d7wi"))))
12628 (build-system python-build-system)
12629 (arguments
12630 `(;; No tests exist
12631 #:tests? #f))
12632 (home-page "https://github.com/shibukawa/snowball_py")
12633 (synopsis "Snowball stemming library collection for Python")
12634 (description "This package provides 16 word stemmer algorithms generated
12635 from Snowball algorithms. It includes the 15 original ones plus the Poerter
12636 English stemmer.")
12637 (license license:bsd-3)))
12638
12639 (define-public python2-snowballstemmer
12640 (package-with-python2 python-snowballstemmer))
12641
12642 (define-public python-sphinx-cloud-sptheme
12643 (package
12644 (name "python-sphinx-cloud-sptheme")
12645 (version "1.8.0")
12646 (source (origin
12647 (method url-fetch)
12648 (uri (pypi-uri "cloud_sptheme" version))
12649 (sha256
12650 (base32
12651 "1dniqb6a39yh786f86c4jn666rwnyi1jvzn4616zhcchb7sfdshd"))))
12652 (build-system python-build-system)
12653 ;; FIXME: The 'pypi' release archive does not contain tests.
12654 (arguments '(#:tests? #f))
12655 (native-inputs
12656 `(("python-sphinx" ,python-sphinx)))
12657 (home-page "https://bitbucket.org/ecollins/cloud_sptheme")
12658 (synopsis "'Cloud' theme for Sphinx documenter")
12659 (description "This package contains the \"Cloud\" theme for Sphinx and some
12660 related extensions.")
12661 (license license:bsd-3)))
12662
12663 (define-public python2-sphinx-cloud-sptheme
12664 (package-with-python2 python-sphinx-cloud-sptheme))
12665
12666 (define-public python-sphinx-alabaster-theme
12667 (package
12668 (name "python-sphinx-alabaster-theme")
12669 (version "0.7.9")
12670 (source (origin
12671 (method url-fetch)
12672 (uri (pypi-uri "alabaster" version))
12673 (sha256
12674 (base32
12675 "027anxzcb951gjlcc43y3rbn9qrw36d16vj9wd2smv5410xx9bs7"))))
12676 (build-system python-build-system)
12677 (propagated-inputs
12678 `(("python-pygments" ,python-pygments)))
12679 (home-page "https://alabaster.readthedocs.io/")
12680 (synopsis "Configurable sidebar-enabled Sphinx theme")
12681 (description "Alabaster is a visually (c)lean, responsive, configurable
12682 theme for the Sphinx documentation system. It's the default theme of Sphinx.")
12683 (license license:bsd-3)))
12684
12685 (define-public python2-sphinx-alabaster-theme
12686 (package-with-python2 python-sphinx-alabaster-theme))
12687
12688 (define-public python-betamax
12689 (package
12690 (name "python-betamax")
12691 (version "0.8.0")
12692 (source
12693 (origin
12694 (method url-fetch)
12695 (uri (pypi-uri "betamax" version))
12696 (sha256
12697 (base32
12698 "18f8v5gng3j773jlbbzx4rg1i4y2zw3m2l1zpmbvp8bh5a2q1i42"))))
12699 (build-system python-build-system)
12700 (arguments
12701 '(;; Many tests fail because they require networking.
12702 #:tests? #f))
12703 (propagated-inputs
12704 `(("python-requests" ,python-requests)))
12705 (home-page "https://github.com/sigmavirus24/betamax")
12706 (synopsis "Record HTTP interactions with python-requests")
12707 (description "Betamax will record your test suite's HTTP interactions and
12708 replay them during future tests. It is designed to work with python-requests.")
12709 (license license:expat)))
12710
12711 (define-public python2-betamax
12712 (package-with-python2 python-betamax))
12713
12714 (define-public python-s3transfer
12715 (package
12716 (name "python-s3transfer")
12717 (version "0.1.10")
12718 (source (origin
12719 (method url-fetch)
12720 (uri (pypi-uri "s3transfer" version))
12721 (sha256
12722 (base32
12723 "1h8g9bknvxflxkpbnxyfxmk8pvgykbbk9ljdvhqh6z4vjc2926ms"))))
12724 (build-system python-build-system)
12725 (arguments
12726 `(#:phases
12727 (modify-phases %standard-phases
12728 (replace 'check
12729 (lambda _
12730 ;; 7 of the 'integration' tests require network access or login
12731 ;; credentials.
12732 (zero? (system* "nosetests" "--exclude=integration")))))))
12733 (native-inputs
12734 `(("python-docutils" ,python-docutils)
12735 ("python-mock" ,python-mock)
12736 ("python-nose" ,python-nose)))
12737 (propagated-inputs
12738 `(("python-botocore" ,python-botocore)))
12739 (synopsis "Amazon S3 Transfer Manager")
12740 (description "S3transfer is a Python library for managing Amazon S3
12741 transfers.")
12742 (home-page "https://github.com/boto/s3transfer")
12743 (license license:asl2.0)
12744 (properties `((python2-variant . ,(delay python2-s3transfer))))))
12745
12746 (define-public python2-s3transfer
12747 (let ((base (package-with-python2 (strip-python2-variant python-s3transfer))))
12748 (package
12749 (inherit base)
12750 (native-inputs
12751 `(("python2-futures" ,python2-futures)
12752 ,@(package-native-inputs base))))))
12753
12754 (define-public python-setproctitle
12755 (package
12756 (name "python-setproctitle")
12757 (version "1.1.10")
12758 (source
12759 (origin
12760 (method url-fetch)
12761 (uri (pypi-uri "setproctitle" version))
12762 (sha256
12763 (base32
12764 "163kplw9dcrw0lffq1bvli5yws3rngpnvrxrzdw89pbphjjvg0v2"))))
12765 (build-system python-build-system)
12766 (arguments
12767 '(#:phases
12768 (modify-phases %standard-phases
12769 (add-before 'check 'patch-Makefile
12770 ;; Stricly this is only required for the python2 variant.
12771 ;; But adding a phase in an inherited package seems to be
12772 ;; cumbersum. So we patch even for python3.
12773 (lambda _
12774 (let ((nose (assoc-ref %build-inputs "python2-nose")))
12775 (when nose
12776 (substitute* "Makefile"
12777 (("\\$\\(PYTHON\\) [^ ]which nosetests[^ ] ")
12778 (string-append nose "/bin/nosetests "))))
12779 #t)))
12780 (replace 'check
12781 (lambda _
12782 (setenv "PYTHON" (or (which "python3") (which "python")))
12783 (setenv "PYCONFIG" (or (which "python3-config")
12784 (which "python-config")))
12785 (setenv "CC" "gcc")
12786 ;; No need to extend PYTHONPATH to find the built package, since
12787 ;; the Makefile will build anyway
12788 (zero? (system* "make" "check")))))))
12789 (native-inputs
12790 `(("procps" ,procps))) ; required for tests
12791 (home-page
12792 "https://github.com/dvarrazzo/py-setproctitle")
12793 (synopsis
12794 "Setproctitle implementation for Python to customize the process title")
12795 (description "The library allows a process to change its title (as displayed
12796 by system tools such as ps and top).
12797
12798 Changing the title is mostly useful in multi-process systems, for
12799 example when a master process is forked: changing the children's title
12800 allows to identify the task each process is busy with. The technique
12801 is used by PostgreSQL and the OpenSSH Server for example.")
12802 (license license:bsd-3)
12803 (properties `((python2-variant . ,(delay python2-setproctitle))))))
12804
12805 (define-public python2-setproctitle
12806 (let ((base (package-with-python2
12807 (strip-python2-variant python-setproctitle))))
12808 (package
12809 (inherit base)
12810 (native-inputs `(("python2-nose" ,python2-nose)
12811 ,@(package-native-inputs base))))))
12812
12813 (define-public python-validictory
12814 (package
12815 (name "python-validictory")
12816 (version "1.0.1")
12817 (source
12818 (origin
12819 (method url-fetch)
12820 (uri (pypi-uri "validictory" version))
12821 (sha256
12822 (base32
12823 "1zf1g9sw47xzp5f80bd94pb42j9yqv82lcrgcvdwr6nkaphfi37q"))))
12824 (build-system python-build-system)
12825 (arguments
12826 '(#:phases
12827 (modify-phases %standard-phases
12828 (add-after 'unpack 'bootstrap
12829 ;; Move the tests out of the package directory to avoid
12830 ;; packaging them.
12831 (lambda* _
12832 (rename-file "validictory/tests" "tests")
12833 (delete-file "tests/__init__.py")))
12834 (replace 'check
12835 (lambda _
12836 ;; Extend PYTHONPATH so the built package will be found.
12837 (setenv "PYTHONPATH"
12838 (string-append (getcwd) "/build/lib:"
12839 (getenv "PYTHONPATH")))
12840 (zero? (system* "py.test" "-vv" )))))))
12841 (native-inputs
12842 `(("python-pytest" ,python-pytest)))
12843 (home-page
12844 "https://github.com/jamesturk/validictory")
12845 (synopsis "General purpose Python data validator")
12846 (description "It allows validation of arbitrary Python data structures.
12847
12848 The schema format is based on the JSON Schema
12849 proposal (http://json-schema.org), so combined with json the library is also
12850 useful as a validator for JSON data.")
12851 (license license:expat)))
12852
12853 (define-public python2-validictory
12854 (package-with-python2 python-validictory))
12855
12856 (define-public python-aniso8601
12857 (package
12858 (name "python-aniso8601")
12859 (version "1.1.0")
12860 (source
12861 (origin
12862 (method url-fetch)
12863 (uri (pypi-uri "aniso8601" version))
12864 (sha256
12865 (base32
12866 "1k5mjg9iqbjfslb5prrsfz7dhlvi6s35p1jxq8dm87w1b7dn5i2g"))))
12867 (build-system python-build-system)
12868 (propagated-inputs
12869 `(("python-dateutil" ,python-dateutil)))
12870 (home-page
12871 "https://bitbucket.org/nielsenb/aniso8601")
12872 (synopsis
12873 "Python library for parsing ISO 8601 strings")
12874 (description
12875 "This package contains a library for parsing ISO 8601 datetime strings.")
12876 (license license:bsd-3)))
12877
12878 (define-public python-flask-restful
12879 (package
12880 (name "python-flask-restful")
12881 (version "0.3.5")
12882 (source
12883 (origin
12884 (method url-fetch)
12885 (uri (pypi-uri "Flask-RESTful" version))
12886 (sha256
12887 (base32
12888 "0hjcmdb56b7z4bkw848lxfkyrpnkwzmqn2dgnlv12mwvjpzsxr6c"))))
12889 (build-system python-build-system)
12890 (propagated-inputs
12891 `(("python-aniso8601" ,python-aniso8601)
12892 ("python-flask" ,python-flask)
12893 ("python-pycrypto" ,python-pycrypto)
12894 ("python-pytz" ,python-pytz)))
12895 (native-inputs
12896 `(;; Optional dependency of Flask. Tests need it.
12897 ("python-blinker" ,python-blinker)
12898 ("python-mock" ,python-mock) ; For tests
12899 ("python-nose" ,python-nose) ; For tests
12900 ("python-sphinx" ,python-sphinx)))
12901 (home-page
12902 "https://www.github.com/flask-restful/flask-restful/")
12903 (synopsis
12904 "Flask module for creating REST APIs")
12905 (description
12906 "This package contains a Flask module for creating REST APIs.")
12907 (license license:bsd-3)))
12908
12909 (define-public python-flask-basicauth
12910 (package
12911 (name "python-flask-basicauth")
12912 (version "0.2.0")
12913 (source
12914 (origin
12915 (method url-fetch)
12916 (uri (pypi-uri "Flask-BasicAuth" version))
12917 (sha256
12918 (base32
12919 "1zq1spkjr4sjdnalpp8wl242kdqyk6fhbnhr8hi4r4f0km4bspnz"))))
12920 (build-system python-build-system)
12921 (propagated-inputs
12922 `(("python-flask" ,python-flask)))
12923 (home-page
12924 "https://github.com/jpvanhal/flask-basicauth")
12925 (synopsis
12926 "HTTP basic access authentication for Flask")
12927 (description
12928 "This package provides HTTP basic access authentication for Flask.")
12929 (license license:bsd-3)))
12930
12931 (define-public python-flask-sqlalchemy
12932 (package
12933 (name "python-flask-sqlalchemy")
12934 (version "2.1")
12935 (source
12936 (origin
12937 (method url-fetch)
12938 (uri (pypi-uri "Flask-SQLAlchemy" version))
12939 (sha256
12940 (base32
12941 "1i9ps5d5snih9xlqhrvmi3qfiygkmqzxh92n25kj4pf89kj4s965"))))
12942 (build-system python-build-system)
12943 (propagated-inputs
12944 `(("python-flask" ,python-flask)
12945 ("python-sqlalchemy" ,python-sqlalchemy)))
12946 (home-page
12947 "https://github.com/mitsuhiko/flask-sqlalchemy")
12948 (synopsis
12949 "Module adding SQLAlchemy support to your Flask application")
12950 (description
12951 "This package adds SQLAlchemy support to your Flask application.")
12952 (license license:bsd-3)))
12953
12954 (define-public python-pyev
12955 (package
12956 (name "python-pyev")
12957 (version "0.9.0")
12958 (source
12959 (origin
12960 (method url-fetch)
12961 (uri (pypi-uri "pyev" version))
12962 (sha256
12963 (base32
12964 "0rf603lc0s6zpa1nb25vhd8g4y337wg2wyz56i0agsdh7jchl0sx"))))
12965 (build-system python-build-system)
12966 (arguments
12967 `(#:tests? #f ; no test suite
12968 #:phases
12969 (modify-phases %standard-phases
12970 (add-after 'unpack 'patch
12971 (lambda* (#:key inputs #:allow-other-keys)
12972 (let ((libev (string-append (assoc-ref inputs "libev")
12973 "/lib/libev.so.4")))
12974 (substitute* "setup.py"
12975 (("libev_dll_name = find_library\\(\\\"ev\\\"\\)")
12976 (string-append "libev_dll_name = \"" libev "\"")))))))))
12977 (inputs
12978 `(("libev" ,libev)))
12979 (home-page "http://pythonhosted.org/pyev/")
12980 (synopsis "Python libev interface")
12981 (description "Pyev provides a Python interface to libev.")
12982 (license license:gpl3)))
12983
12984 (define-public python2-pyev
12985 (package-with-python2 python-pyev))
12986
12987 (define-public python-imagesize
12988 (package
12989 (name "python-imagesize")
12990 (version "0.7.1")
12991 (source
12992 (origin
12993 (method url-fetch)
12994 (uri (pypi-uri "imagesize" version))
12995 (sha256
12996 (base32
12997 "0qk07k0z4241lkzzjji7z4da04pcvg7bfc4xz1934zlqhwmwdcha"))))
12998 (build-system python-build-system)
12999 (arguments
13000 '(;; Test files are not distributed on PyPi:
13001 ;; https://github.com/shibukawa/imagesize_py/issues/7
13002 #:tests? #f))
13003 (home-page "https://github.com/shibukawa/imagesize_py")
13004 (synopsis "Gets image size of files in variaous formats in Python")
13005 (description
13006 "This package allows determination of image size from
13007 PNG, JPEG, JPEG2000 and GIF files in pure Python.")
13008 (license license:expat)))
13009
13010 (define-public python2-imagesize
13011 (package-with-python2 python-imagesize))
13012
13013 (define-public python-axolotl-curve25519
13014 (package
13015 (name "python-axolotl-curve25519")
13016 (version "0.1")
13017 (source
13018 (origin
13019 (method git-fetch)
13020 (uri (git-reference
13021 (url "git://github.com/tgalal/python-axolotl-curve25519")
13022 (commit "e4a9c4de0eae27223200579c58d1f8f6d20637e2")))
13023 (file-name (string-append name "-" version "-checkout"))
13024 (sha256
13025 (base32
13026 "0agap5q0hmvf6cwzjqc05kw53pjgf6942pcivpazksmg1vk400ra"))))
13027 (build-system python-build-system)
13028 (arguments
13029 `(;; Prevent creation of the egg. This works around
13030 ;; https://debbugs.gnu.org/cgi/bugreport.cgi?bug=20765
13031 #:configure-flags '("--root=/")))
13032 (home-page "https://github.com/tgalal/python-axolotl-curve25519")
13033 (synopsis "Python wrapper for curve25519 library")
13034 (description "This is a python wrapper for the curve25519 library
13035 with ed25519 signatures. The C code was pulled from
13036 libaxolotl-android. At the moment this wrapper is meant for use by
13037 python-axolotl.")
13038 (license (list license:gpl3 ; Most files
13039 license:bsd-3)))) ; curve/curve25519-donna.c
13040
13041 (define-public python2-axolotl-curve25519
13042 (package-with-python2 python-axolotl-curve25519))
13043
13044 (define-public python-axolotl
13045 (package
13046 (name "python-axolotl")
13047 (version "0.1.35")
13048 (source
13049 (origin
13050 (method url-fetch)
13051 (uri (string-append
13052 "https://github.com/tgalal/python-axolotl/archive/"
13053 version ".tar.gz"))
13054 (file-name (string-append name "-" version ".tar.gz"))
13055 (sha256
13056 (base32 "1z8d89p7v40p4bwywjm9h4z28fdvra79ddw06azlkrfjbl7dxmz8"))))
13057 (build-system python-build-system)
13058 (arguments
13059 `(#:phases
13060 (modify-phases %standard-phases
13061 ;; Don't install tests
13062 (add-before 'install 'remove-tests
13063 (lambda _
13064 (for-each delete-file-recursively
13065 '("axolotl/tests" "build/lib/axolotl/tests"))
13066 #t)))))
13067 (propagated-inputs
13068 `(("python-axolotl-curve25519" ,python-axolotl-curve25519)
13069 ("python-dateutil" ,python-dateutil)
13070 ("python-protobuf" ,python-protobuf)
13071 ("python-pycrypto" ,python-pycrypto)))
13072 (home-page "https://github.com/tgalal/python-axolotl")
13073 (synopsis "Python port of libaxolotl-android")
13074 (description "This is a python port of libaxolotl-android. This
13075 is a ratcheting forward secrecy protocol that works in synchronous and
13076 asynchronous messaging environments.")
13077 (license license:gpl3)))
13078
13079 (define-public python2-axolotl
13080 (package-with-python2 python-axolotl))
13081
13082 (define-public python-termstyle
13083 (package
13084 (name "python-termstyle")
13085 (version "0.1.11")
13086 (source
13087 (origin
13088 (method url-fetch)
13089 (uri (pypi-uri "termstyle" version))
13090 (sha256
13091 (base32
13092 "17wzkkcqy5zc0g68xlad3kcv66iw14d2pwqc0h9420gak0vbhx7g"))))
13093 (build-system python-build-system)
13094 (arguments
13095 '(#:phases
13096 (modify-phases %standard-phases
13097 (replace 'check
13098 (lambda _
13099 (zero? (system* "python" "test3.py")))))))
13100 (home-page "https://github.com/gfxmonk/termstyle")
13101 (synopsis "Console text coloring for Python")
13102 (description "This package provides console text coloring for Python.")
13103 (license license:bsd-3)))
13104
13105 (define-public python-rednose
13106 (package
13107 (name "python-rednose")
13108 (version "1.2.1")
13109 (source
13110 (origin
13111 (method url-fetch)
13112 (uri (pypi-uri "rednose" version))
13113 (sha256
13114 (base32
13115 "0b0bsna217lr1nykyhl5fgjly15zhdvqd4prg4wy1zrgfv7al6m0"))))
13116 (build-system python-build-system)
13117 (arguments
13118 `(#:phases
13119 (modify-phases %standard-phases
13120 (add-after 'unpack 'fix-deps
13121 (lambda _
13122 ;; See <https://github.com/JBKahn/rednose/issues/12>
13123 (substitute* "setup.py"
13124 (("python-termstyle") "termstyle"))
13125 #t)))))
13126 (propagated-inputs
13127 `(("python-colorama" ,python-colorama)
13128 ("python-termstyle" ,python-termstyle)))
13129 (native-inputs
13130 `(("python-six" ,python-six)
13131 ("python-nose" ,python-nose)))
13132 (home-page "https://github.com/JBKahn/rednose")
13133 (synopsis "Colored output for Python nosetests")
13134 (description "This package provides colored output for the
13135 @command{nosetests} command of the Python Nose unit test framework.")
13136 (license license:bsd-3)))
13137
13138 (define-public python2-rednose
13139 (package-with-python2 python-rednose))
13140
13141 (define-public python-flask-restplus
13142 (package
13143 (name "python-flask-restplus")
13144 (version "0.9.2")
13145 (source
13146 (origin
13147 (method url-fetch)
13148 (uri (pypi-uri "flask-restplus" version))
13149 (sha256
13150 (base32
13151 "11his6ii5brpkhld0d5bwzjjw4q3vmplpd6fmgzjrvvklsbk0cf4"))))
13152 (build-system python-build-system)
13153 (arguments
13154 '(#:tests? #f)) ; FIXME: 35/882 tests failing.
13155 ;; #:phases
13156 ;; (modify-phases %standard-phases
13157 ;; (replace 'check
13158 ;; (lambda _
13159 ;; (zero? (system* "nosetests")))))))
13160 (propagated-inputs
13161 `(("python-aniso8601" ,python-aniso8601)
13162 ("python-flask" ,python-flask)
13163 ("python-jsonschema" ,python-jsonschema)
13164 ("python-pytz" ,python-pytz)
13165 ("python-six" ,python-six)))
13166 (native-inputs
13167 `(("python-tzlocal" ,python-tzlocal)
13168 ("python-blinker" ,python-blinker)
13169 ("python-nose" ,python-nose)
13170 ("python-rednose" ,python-rednose)))
13171 (home-page "https://github.com/noirbizarre/flask-restplus")
13172 (synopsis "Framework for documented API development with Flask")
13173 (description "This package provides a framework for API development with
13174 the Flask web framework in Python. It is similar to package
13175 @code{python-flask-restful} but supports the @code{python-swagger}
13176 documentation builder.")
13177 (license license:expat)))
13178
13179 (define-public python-sadisplay
13180 (package
13181 (name "python-sadisplay")
13182 (version "0.4.6")
13183 (source
13184 (origin
13185 (method url-fetch)
13186 (uri (pypi-uri "sadisplay" version))
13187 (sha256
13188 (base32
13189 "0zqad2fl7q26p090qmqgmxbm6iwgf9zij1w8da1g3wdgjj72ql05"))))
13190 (build-system python-build-system)
13191 (propagated-inputs
13192 `(("python-sqlalchemy" ,python-sqlalchemy)))
13193 (native-inputs
13194 `(("python-nose" ,python-nose)))
13195 (home-page "https://bitbucket.org/estin/sadisplay")
13196 (synopsis "SQLAlchemy schema displayer")
13197 (description "This package provides a program to build Entity
13198 Relationship diagrams from a SQLAlchemy model (or directly from the
13199 database).")
13200 (license license:bsd-3)))
13201
13202 (define-public python2-sadisplay
13203 (package-with-python2 python-sadisplay))
13204
13205 (define-public python-flask-restful-swagger
13206 (package
13207 (name "python-flask-restful-swagger")
13208 (version "0.19")
13209 (source
13210 (origin
13211 (method url-fetch)
13212 (uri (pypi-uri "flask-restful-swagger" version))
13213 (sha256
13214 (base32
13215 "16msl8hd5xjmj833bpy264v98cpl5hkw5bgl5gf5vgndxbv3rm6v"))))
13216 (build-system python-build-system)
13217 (propagated-inputs
13218 `(("python-flask-restful" ,python-flask-restful)))
13219 (home-page "https://github.com/rantav/flask-restful-swagger")
13220 (synopsis "Extract Swagger specs from Flask-Restful projects")
13221 (description "This package lets you extract Swagger API documentation
13222 specs from your Flask-Restful projects.")
13223 (license license:expat)))
13224
13225 (define-public python2-flask-restful-swagger
13226 (package-with-python2 python-flask-restful-swagger))
13227
13228 (define-public python-argcomplete
13229 (package
13230 (name "python-argcomplete")
13231 (version "1.7.0")
13232 (source
13233 (origin
13234 (method url-fetch)
13235 (uri (pypi-uri "argcomplete" version))
13236 (sha256
13237 (base32
13238 "11bwiw6j0nilgz81xnw6f1npyga3prp8asjqrm87cdr3ria5l03x"))))
13239 (build-system python-build-system)
13240 (native-inputs
13241 `(("python-pexpect" ,python-pexpect)
13242 ("tcsh" ,tcsh)))
13243 (home-page "https://github.com/kislyuk/argcomplete")
13244 (synopsis "Shell tab completion for Python argparse")
13245 (description "argcomplete provides extensible command line tab completion
13246 of arguments and options for Python scripts using @code{argparse}. It's
13247 particularly useful for programs with many options or sub-parsers that can
13248 dynamically suggest completions; for example, when browsing resources over the
13249 network.")
13250 (license license:asl2.0)))
13251
13252 (define-public python2-argcomplete
13253 (package-with-python2 python-argcomplete))
13254
13255 (define-public python-xopen
13256 (package
13257 (name "python-xopen")
13258 (version "0.1.1")
13259 (source
13260 (origin
13261 (method url-fetch)
13262 (uri (pypi-uri "xopen" version))
13263 (sha256
13264 (base32
13265 "1wx6mylzcsyhjl19ycb83qq6iqpmr927lz62njfsar6ldsj0qcni"))
13266 (file-name (string-append name "-" version ".tar.gz"))))
13267 (build-system python-build-system)
13268 (home-page "https://github.com/marcelm/xopen/")
13269 (synopsis "Open compressed files transparently")
13270 (description "This module provides an @code{xopen} function that works like
13271 Python's built-in @code{open} function, but can also deal with compressed files.
13272 Supported compression formats are gzip, bzip2 and, xz, and are automatically
13273 recognized by their file extensions. The focus is on being as efficient as
13274 possible on all supported Python versions.")
13275 (license license:expat)))
13276
13277 (define-public python2-xopen
13278 (package-with-python2 python-xopen))
13279
13280 (define-public python2-cheetah
13281 (package
13282 (name "python2-cheetah")
13283 (version "2.4.4")
13284 (source
13285 (origin
13286 (method url-fetch)
13287 (uri (pypi-uri "Cheetah" version))
13288 (sha256
13289 (base32
13290 "0l5mm4lnysjkzpjr95q5ydm9xc8bv43fxmr79ypybrf1y0lq4c5y"))))
13291 (build-system python-build-system)
13292 (arguments
13293 `(#:python ,python-2))
13294 (propagated-inputs
13295 `(("python2-markdown" ,python2-markdown)))
13296 (home-page "https://pythonhosted.org/Cheetah/")
13297 (synopsis "Template engine")
13298 (description "Cheetah is a text-based template engine and Python code
13299 generator.
13300
13301 Cheetah can be used as a standalone templating utility or referenced as
13302 a library from other Python applications. It has many potential uses,
13303 but web developers looking for a viable alternative to ASP, JSP, PHP and
13304 PSP are expected to be its principle user group.
13305
13306 Features:
13307 @enumerate
13308 @item Generates HTML, SGML, XML, SQL, Postscript, form email, LaTeX, or any other
13309 text-based format.
13310 @item Cleanly separates content, graphic design, and program code.
13311 @item Blends the power and flexibility of Python with a simple template language
13312 that non-programmers can understand.
13313 @item Gives template writers full access to any Python data structure, module,
13314 function, object, or method in their templates.
13315 @item Makes code reuse easy by providing an object-orientated interface to
13316 templates that is accessible from Python code or other Cheetah templates.
13317 One template can subclass another and selectively reimplement sections of it.
13318 @item Provides a simple, yet powerful, caching mechanism that can dramatically
13319 improve the performance of a dynamic website.
13320 @item Compiles templates into optimized, yet readable, Python code.
13321 @end enumerate")
13322 (license (license:x11-style "file://LICENSE"))))
13323
13324 (define-public python-dulwich
13325 (package
13326 (name "python-dulwich")
13327 (version "0.16.3")
13328 (source
13329 (origin
13330 (method url-fetch)
13331 (uri (list (string-append "https://www.dulwich.io/releases/"
13332 "dulwich-" version ".tar.gz")
13333 (pypi-uri "dulwich" version)))
13334 (sha256
13335 (base32 "0fl47vzfgc3w3rmhn8naii905cjqcp0vc68iyvymxp7567hh6als"))))
13336 (build-system python-build-system)
13337 (arguments
13338 `(#:phases
13339 (modify-phases %standard-phases
13340 (add-before 'check 'fix-tests
13341 (lambda* (#:key inputs #:allow-other-keys)
13342 ;; The tests use Popen with a custom environment which doesn't
13343 ;; include PATH.
13344 (substitute* "dulwich/tests/compat/utils.py"
13345 (("'git'") (string-append "'"
13346 (which "git")
13347 "'")))
13348 (substitute* '("dulwich/tests/test_repository.py"
13349 "dulwich/tests/test_hooks.py")
13350 (("#!/bin/sh") (string-append "#!" (which "sh"))))
13351 (setenv "TEST_RUNNER" "unittest")
13352 (setenv "PYTHONHASHSEED" "random")
13353 #t)))))
13354 (propagated-inputs
13355 `(("python-fastimport" ,python-fastimport)))
13356 (native-inputs
13357 `(("python-mock" ,python-mock)
13358 ("python-geventhttpclient" ,python-geventhttpclient)
13359 ("git" ,git)))
13360 (home-page "https://www.dulwich.io/")
13361 (synopsis "Git implementation in Python")
13362 (description "Dulwich is an implementation of the Git file formats and
13363 protocols written in pure Python.")
13364 ;; Can be used with either license.
13365 (license (list license:asl2.0 license:gpl2+))))
13366
13367 (define-public python2-dulwich
13368 (package-with-python2 python-dulwich))
13369
13370 (define-public python-pbkdf2
13371 (package
13372 (name "python-pbkdf2")
13373 (version "1.3")
13374 (source
13375 (origin
13376 (method url-fetch)
13377 (uri (pypi-uri "pbkdf2" version))
13378 (sha256
13379 (base32
13380 "0yb99rl2mbsaamj571s1mf6vgniqh23v98k4632150hjkwv9fqxc"))))
13381 (build-system python-build-system)
13382 (arguments
13383 '(#:phases
13384 (modify-phases %standard-phases
13385 (replace 'check
13386 (lambda _
13387 (setenv "PYTHONPATH"
13388 (string-append (getcwd) "/build/lib:"
13389 (getenv "PYTHONPATH")))
13390 (zero? (system* "python" "test/test_pbkdf2.py")))))))
13391 (propagated-inputs
13392 `(("python-pycrypto" ,python-pycrypto))) ; optional
13393 (home-page "http://www.dlitz.net/software/python-pbkdf2/")
13394 (synopsis "Password-based key derivation")
13395 (description "This module implements the password-based key derivation
13396 function, PBKDF2, specified in RSA PKCS#5 v2.0.
13397
13398 PKCS#5 v2.0 Password-Based Key Derivation is a key derivation function which
13399 is part of the RSA Public Key Cryptography Standards series. The provided
13400 implementation takes a password or a passphrase and a salt value (and
13401 optionally a iteration count, a digest module, and a MAC module) and provides
13402 a file-like object from which an arbitrarly-sized key can be read.")
13403 (license license:expat)))
13404
13405 (define-public python2-pbkdf2
13406 (package-with-python2 python-pbkdf2))
13407
13408 (define-public python-qrcode
13409 (package
13410 (name "python-qrcode")
13411 (version "5.3")
13412 (source
13413 (origin
13414 (method url-fetch)
13415 (uri (pypi-uri "qrcode" version))
13416 (sha256
13417 (base32
13418 "0kljfrfq0c2rmxf8am57333ia41kd0snbm2rnqbdy816hgpcq5a1"))))
13419 (build-system python-build-system)
13420 (arguments
13421 ;; FIXME: Tests require packaging 'pymaging'.
13422 '(#:tests? #f))
13423 (propagated-inputs
13424 `(("python-lxml" ,python-lxml) ; for SVG output
13425 ("python-pillow" ,python-pillow) ; for PNG output
13426 ("python-six" ,python-six)))
13427 (home-page "https://github.com/lincolnloop/python-qrcode")
13428 (synopsis "QR Code image generator")
13429 (description "This package provides a pure Python QR Code generator
13430 module. It uses the Python Imaging Library (PIL) to allow for the generation
13431 of QR Codes.
13432
13433 In addition this package provides a command line tool to generate QR codes and
13434 either write these QR codes to a file or do the output as ascii art at the
13435 console.")
13436 (license license:bsd-3)))
13437
13438 (define-public python2-qrcode
13439 (package-with-python2 python-qrcode))
13440
13441 ;; SlowAES isn't compatible with Python 3.
13442 (define-public python2-slowaes
13443 (package
13444 (name "python2-slowaes")
13445 (version "0.1a1")
13446 (source
13447 (origin
13448 (method url-fetch)
13449 (uri (pypi-uri "slowaes" version))
13450 (sha256
13451 (base32
13452 "02dzajm83a7lqgxf6r3hgj64wfmcxz8gs4nvgxpvj5n19kjqlrc3"))))
13453 (build-system python-build-system)
13454 (arguments `(#:python ,python-2))
13455 (home-page "http://code.google.com/p/slowaes/")
13456 (synopsis "Implementation of AES in Python")
13457 (description "This package contains an implementation of AES in Python.
13458 This implementation is slow (hence the project name) but still useful when
13459 faster ones are not available.")
13460 (license license:asl2.0)))
13461
13462 (define-public python-rst2ansi
13463 (package
13464 (name "python-rst2ansi")
13465 (version "0.1.5")
13466 (source
13467 (origin
13468 (method url-fetch)
13469 (uri (pypi-uri "rst2ansi" version))
13470 (sha256
13471 (base32
13472 "0vzy6gd60l79ff750scl0sz48r1laalkl6md6dwzah4dcadgn5qv"))))
13473 (build-system python-build-system)
13474 (propagated-inputs
13475 `(("python-docutils" ,python-docutils)))
13476 (home-page "https://github.com/Snaipe/python-rst-to-ansi")
13477 (synopsis "Convert RST to ANSI-decorated console output")
13478 (description
13479 "Python module dedicated to rendering RST (reStructuredText) documents
13480 to ansi-escaped strings suitable for display in a terminal.")
13481 (license license:expat)))
13482
13483 (define-public python-ansi2html
13484 (package
13485 (name "python-ansi2html")
13486 (version "1.2.0")
13487 (source
13488 (origin
13489 (method url-fetch)
13490 (uri (pypi-uri "ansi2html" version))
13491 (sha256
13492 (base32
13493 "1wa00zffprb78w1mqq90dk47czz1knanys2a40zbw2vyapd5lp9y"))))
13494 (build-system python-build-system)
13495 (native-inputs
13496 `(("python-mock" ,python-mock)
13497 ("python-nose" ,python-nose)))
13498 (propagated-inputs
13499 `(("python-six" ,python-six)))
13500 (home-page "http://github.com/ralphbean/ansi2html")
13501 (synopsis "Convert ANSI-decorated console output to HTML")
13502 (description
13503 "@command{ansi2html} is a Python library and command line utility for
13504 convering text with ANSI color codes to HTML or LaTeX.")
13505 (license license:gpl3+)))
13506
13507 (define-public python2-ansi2html
13508 (package-with-python2 python-ansi2html))
13509
13510 (define-public python-ddt
13511 (package
13512 (name "python-ddt")
13513 (version "1.1.1")
13514 (source
13515 (origin
13516 (method url-fetch)
13517 (uri (pypi-uri "ddt" version))
13518 (sha256
13519 (base32
13520 "1c00ikkxr7lha97c81k938bzhgd4pbwamkjn0h4nkhr3xk00zp6n"))))
13521 (build-system python-build-system)
13522 (native-inputs
13523 `(("python-mock" ,python-mock)
13524 ("python-nose" ,python-nose)))
13525 (propagated-inputs
13526 `(("python-six" ,python-six)
13527 ("python-pyyaml" ,python-pyyaml)))
13528 (home-page "https://github.com/txels/ddt")
13529 (synopsis "Data-Driven Tests")
13530 (description
13531 "DDT (Data-Driven Tests) allows you to multiply one test case by running
13532 it with different test data, and make it appear as multiple test cases.")
13533 (license license:expat)))
13534
13535 (define-public python2-ddt
13536 (package-with-python2 python-ddt))
13537
13538 (define-public python-pycosat
13539 (package
13540 (name "python-pycosat")
13541 (version "0.6.1")
13542 (source
13543 (origin
13544 (method url-fetch)
13545 (uri (pypi-uri "pycosat" version))
13546 (sha256
13547 (base32
13548 "1kl3wh1f47rc712n4bmwplbx3fqz3x9i1b587jrbpmvdva4c8f6l"))))
13549 ;; TODO: Unundle picosat. http://fmv.jku.at/picosat/
13550 (build-system python-build-system)
13551 (home-page "https://github.com/ContinuumIO/pycosat")
13552 (synopsis "Bindings to picosat (a SAT solver)")
13553 (description
13554 "This package provides efficient Python bindings to @code{picosat} on
13555 the C level. When importing pycosat, the @code{picosat} solver becomes part
13556 of the Python process itself. @code{picosat} is a @dfn{Boolean Satisfiability
13557 Problem} (SAT) solver.")
13558 (license license:expat)))
13559
13560 (define-public python2-pycosat
13561 (package-with-python2 python-pycosat))
13562
13563 (define-public python2-ruamel.ordereddict
13564 (package
13565 (name "python2-ruamel.ordereddict")
13566 (version "0.4.9")
13567 (source
13568 (origin
13569 (method url-fetch)
13570 (uri (pypi-uri "ruamel.ordereddict" version))
13571 (sha256
13572 (base32
13573 "1xmkl8v9l9inm2pyxgc1fm5005yxm7fkd5gv74q7lj1iy5qc8n3h"))))
13574 (build-system python-build-system)
13575 (arguments
13576 `(#:python ,python-2
13577 #:phases
13578 (modify-phases %standard-phases
13579 (delete 'check)
13580 (add-after 'install 'check
13581 (lambda* (#:key inputs outputs #:allow-other-keys)
13582 (add-installed-pythonpath inputs outputs)
13583 (zero? (system* "python" "test/testordereddict.py")))))))
13584 (home-page "https://bitbucket.org/ruamel/ordereddict")
13585 (synopsis "Version of dict that keeps keys in insertion order")
13586 (description
13587 "This is an implementation of an ordered dictionary with @dfn{Key
13588 Insertion Order} (KIO: updates of values do not affect the position of the
13589 key), @dfn{Key Value Insertion Order} (KVIO, an existing key's position is
13590 removed and put at the back). The standard library module @code{OrderedDict},
13591 implemented later, implements a subset of @code{ordereddict} functionality.
13592 Sorted dictionaries are also provided. Currently only with @dfn{Key Sorted
13593 Order} (KSO, no sorting function can be specified, but a transform can be
13594 specified to apply on the key before comparison (e.g. @code{string.lower})).")
13595 (license license:expat)))
13596
13597 (define-public python-pypeg2
13598 (package
13599 (name "python-pypeg2")
13600 (version "2.15.2")
13601 (source
13602 (origin
13603 (method url-fetch)
13604 (uri (pypi-uri "pyPEG2" version))
13605 (sha256
13606 (base32
13607 "0v8ziaam2r637v94ra4dbjw6jzxz99gs5x4i585kgag1v204yb9b"))))
13608 (build-system python-build-system)
13609 (propagated-inputs `(("python-lxml" ,python-lxml)))
13610 (arguments
13611 ;;https://bitbucket.org/fdik/pypeg/issues/36/test-failures-on-py35
13612 '(#:tests? #f))
13613 (home-page "https://fdik.org/pyPEG/")
13614 (synopsis "Parsering Expression Grammars in Python")
13615 (description "PyPEG is an intrinsic parser interpreter framework for
13616 Python. It is based on Parsing Expression Grammars, PEG. With pyPEG you can
13617 parse many formal languages.")
13618 (license license:gpl2)))
13619
13620 (define-public python2-cliapp
13621 (package
13622 (name "python2-cliapp")
13623 (version "1.20160724")
13624 (source
13625 (origin
13626 (method url-fetch)
13627 (uri (string-append
13628 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/cliapp/snapshot/cliapp-"
13629 version ".tar.gz"))
13630 (sha256
13631 (base32
13632 "025cyi75vxyghbm4hav8dz4fzwksshddavy9g9fwr440awcvw74f"))))
13633 (build-system python-build-system)
13634 (arguments
13635 `(#:python ,python-2))
13636 (propagated-inputs
13637 `(("python2-pyaml" ,python2-pyaml)))
13638 (home-page "https://liw.fi/cliapp/")
13639 (synopsis "Python framework for command line programs")
13640 (description "@code{python2-cliapp} is a python framework for
13641 command line programs. It contains the typical stuff such programs
13642 need to do, such as parsing the command line for options, and
13643 iterating over input files.")
13644 (license license:gpl2+)))
13645
13646 (define-public python2-ttystatus
13647 (package
13648 (name "python2-ttystatus")
13649 (version "0.32")
13650 (source
13651 (origin
13652 (method url-fetch)
13653 (uri (string-append
13654 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/ttystatus/snapshot/ttystatus-"
13655 version ".tar.gz"))
13656 (sha256
13657 (base32
13658 "0b5g889jj23r2w1hi300cdldx6jvspanp0ybf5n1qvdvl150aamf"))))
13659 (build-system python-build-system)
13660 (arguments
13661 `(#:python ,python-2))
13662 (home-page "https://liw.fi/ttystatus/")
13663 (synopsis "Python library for showing progress reporting and
13664 status updates on terminals")
13665 (description "@code{python2-ttystatus} is a python library for
13666 showing progress reporting and status updates on terminals, for
13667 command line programs. Output is automatically adapted to the width
13668 of the terminal: truncated if it does not fit, and resized if the
13669 terminal size changes.")
13670 (license license:gpl3+)))
13671
13672 (define-public python2-tracing
13673 (package
13674 (name "python2-tracing")
13675 (version "0.10")
13676 (source
13677 (origin
13678 (method url-fetch)
13679 (uri (string-append
13680 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/python-tracing/snapshot/tracing-"
13681 version ".tar.gz"))
13682 (sha256
13683 (base32
13684 "06cw4zg42fsvqy372vi2whj26w56vzg5axhzwdjc2bgwf03garbw"))))
13685 (build-system python-build-system)
13686 (arguments
13687 `(#:python ,python-2))
13688 (home-page "https://liw.fi/tracing/")
13689 (synopsis "Python debug logging helper")
13690 (description "@code{python2-tracing} is a python library for
13691 logging debug messages. It provides a way to turn debugging messages
13692 on and off, based on the filename they occur in. It is much faster
13693 than using @code{logging.Filter} to accomplish the same thing, which
13694 matters when code is run in production mode. The actual logging still
13695 happens using the @code{logging} library.")
13696 (license license:gpl3+)))
13697
13698 (define-public python2-larch
13699 (package
13700 (name "python2-larch")
13701 (version "1.20151025")
13702 (source
13703 (origin
13704 (method url-fetch)
13705 (uri (string-append
13706 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/larch/snapshot/larch-"
13707 version ".tar.gz"))
13708 (sha256
13709 (base32
13710 "1p4knkkavlqymgciz2wbcnfrdgdbafhg14maplnk4vbw0q8xs663"))))
13711 (build-system python-build-system)
13712 (arguments
13713 `(#:python ,python-2))
13714 (propagated-inputs
13715 `(("python2-tracing" ,python2-tracing)))
13716 (home-page "https://liw.fi/larch/")
13717 (synopsis "Python copy-on-write B-tree library")
13718 (description "@code{python2-larch} is an implementation of
13719 particular kind of B-tree, based on research by Ohad Rodeh. See
13720 @url{http://liw.fi/larch/ohad-btrees-shadowing-clones.pdf} for details
13721 on the data structure.
13722
13723 The distinctive feature of this B-tree is that a node is never
13724 (conceptually) modified. Instead, all updates are done by
13725 copy-on-write. This makes it easy to clone a tree, and modify only the
13726 clone, while other processes access the original tree.")
13727 (license license:gpl3+)))
13728
13729 (define-public python-htmlmin
13730 (package
13731 (name "python-htmlmin")
13732 (version "0.1.10")
13733 (source
13734 (origin
13735 (method url-fetch)
13736 (uri (pypi-uri "htmlmin" version))
13737 (sha256
13738 (base32
13739 "0qxa93j3p1ak32qh8d9kshqv8v3z0hkc13dwbhp5cn7sn3xmsp6a"))))
13740 (arguments
13741 `(#:tests? #f)) ;htmlmin has no tests
13742 (build-system python-build-system)
13743 (home-page "https://htmlmin.readthedocs.org/en/latest/")
13744 (synopsis "HTML minifier")
13745 (description "@code{htmlmin} is an HTML minifier that just works.
13746 It comes with safe defaults and easily configurable options.")
13747 (license license:bsd-3)))
13748
13749 (define-public python2-htmlmin
13750 (package-with-python2 python-htmlmin))
13751
13752 (define-public python-flask-htmlmin
13753 (package
13754 (name "python-flask-htmlmin")
13755 (version "1.2")
13756 (source
13757 (origin
13758 (method url-fetch)
13759 (uri (pypi-uri "Flask-HTMLmin" version))
13760 (sha256
13761 (base32
13762 "1n6zlq72kakkw0z2jpq6nh74lfsmxybm4g053pwhc14fbr809348"))))
13763 (propagated-inputs
13764 `(("python-flask" ,python-flask)
13765 ("python-htmlmin" ,python-htmlmin)))
13766 (build-system python-build-system)
13767 (home-page "https://github.com/hamidfzm/Flask-HTMLmin")
13768 (synopsis "HTML response minifier for Flask")
13769 (description
13770 "Minify @code{text/html} MIME type responses when using @code{Flask}.")
13771 (license license:bsd-3)))
13772
13773 (define-public python2-flask-htmlmin
13774 (package-with-python2 python-flask-htmlmin))
13775
13776 (define-public python-flask-login
13777 (package
13778 (name "python-flask-login")
13779 (version "0.4.0")
13780 (source
13781 (origin
13782 (method url-fetch)
13783 (uri (string-append "https://github.com/maxcountryman/flask-login/archive/"
13784 version ".tar.gz"))
13785 (file-name (string-append name "-" version ".tar.gz"))
13786 (sha256
13787 (base32
13788 "1pdqp7a2gyb7k06xda004x0fi2w66s6kn2i0ndkqndmg12d83f9w"))))
13789 (arguments
13790 ;; Tests fail PEP8 compliance. See:
13791 ;; https://github.com/maxcountryman/flask-login/issues/340
13792 `(#:tests? #f))
13793 (build-system python-build-system)
13794 (home-page "https://github.com/maxcountryman/flask-login")
13795 (synopsis "User session management for Flask")
13796 (description
13797 "@code{Flask-Login} provides user session management for Flask. It
13798 handles the common tasks of logging in, logging out, and remembering your
13799 users' sessions over extended periods of time.")
13800 (license license:expat)))
13801
13802 (define-public python2-flask-login
13803 (package-with-python2 python-flask-login))
13804
13805 (define-public python-astroid
13806 (package
13807 (name "python-astroid")
13808 (version "1.4.9")
13809 (source
13810 (origin
13811 (method url-fetch)
13812 (uri (string-append
13813 "https://github.com/PyCQA/astroid/archive/astroid-"
13814 version ".tar.gz"))
13815 (sha256
13816 (base32
13817 "0j0wgy54d13a470vm4b9rdjk99n1hmdxpf34x9k3pbmi9w9b566z"))))
13818 (build-system python-build-system)
13819 (propagated-inputs
13820 `(("python-lazy-object-proxy" ,python-lazy-object-proxy)
13821 ("python-six" ,python-six)
13822 ("python-wrapt" ,python-wrapt)))
13823 (arguments
13824 `(#:phases
13825 (modify-phases %standard-phases
13826 (replace 'check
13827 (lambda _
13828 (zero? (system* "python" "-m" "unittest" "discover"
13829 "-p" "unittest*.py")))))))
13830 (home-page "https://github.com/PyCQA/astroid")
13831 (synopsis "Common base representation of python source code for pylint and
13832 other projects")
13833 (description "@code{python-astroid} provides a common base representation
13834 of python source code for projects such as pychecker, pyreverse, pylint, etc.
13835
13836 It provides a compatible representation which comes from the _ast module. It
13837 rebuilds the tree generated by the builtin _ast module by recursively walking
13838 down the AST and building an extended ast. The new node classes have
13839 additional methods and attributes for different usages. They include some
13840 support for static inference and local name scopes. Furthermore, astroid
13841 builds partial trees by inspecting living objects.")
13842 (license license:lgpl2.1+)))
13843
13844 (define-public python2-astroid
13845 (package-with-python2 python-astroid))
13846
13847 (define-public python-isort
13848 (package
13849 (name "python-isort")
13850 (version "4.2.5")
13851 (source
13852 (origin
13853 (method url-fetch)
13854 (uri (string-append
13855 "https://github.com/timothycrosley/isort/archive/"
13856 version ".tar.gz"))
13857 (file-name (string-append name "-" version ".tar.gz"))
13858 (sha256
13859 (base32
13860 "0zsrgkb0krn5476yncy5dd56k7dk34zqb4bnlvwy44ixgilyjmfh"))))
13861 (build-system python-build-system)
13862 (native-inputs
13863 `(("python-mock" ,python-mock)
13864 ("python-pytest" ,python-pytest)))
13865 (home-page "https://github.com/timothycrosley/isort")
13866 (synopsis "Python utility/library to sort python imports")
13867 (description "@code{python-isort} is a python utility/library to sort
13868 imports alphabetically, and automatically separated into sections. It
13869 provides a command line utility, a python library and plugins for various
13870 editors.")
13871 (license license:expat)))
13872
13873 (define-public python2-isort
13874 (package-with-python2 python-isort))
13875
13876 (define-public python2-backports-functools-lru-cache
13877 (package
13878 (name "python2-backports-functools-lru-cache")
13879 (version "1.3")
13880 (source
13881 (origin
13882 (method url-fetch)
13883 ;; only the pypi tarballs contain the necessary metadata
13884 (uri (pypi-uri "backports.functools_lru_cache" version))
13885 (sha256
13886 (base32
13887 "158ysf2hb0q4p4695abfiym9x1ywg0dgh8a3apd7gqaaxjy22jj4"))))
13888 (build-system python-build-system)
13889 (native-inputs
13890 `(("python2-setuptools-scm" ,python2-setuptools-scm)))
13891 (arguments
13892 `(#:python ,python-2))
13893 (home-page "https://github.com/jaraco/backports.functools_lru_cache")
13894 (synopsis "Backport of functools.lru_cache from Python 3.3")
13895 (description "@code{python2-backports-functools-lru-cache} is a backport
13896 of @code{functools.lru_cache} from python 3.3.")
13897 (license license:expat)))
13898
13899 (define-public python-configparser
13900 (package
13901 (name "python-configparser")
13902 (version "3.5.0")
13903 (source
13904 (origin
13905 (method url-fetch)
13906 (uri (string-append
13907 "https://bitbucket.org/ambv/configparser/get/"
13908 version ".tar.bz2"))
13909 (file-name (string-append name "-" version ".tar.gz"))
13910 (sha256
13911 (base32
13912 "0waq40as14abwzbb321hfz4vr1fi363nscy32ga14qvfygrg96wa"))))
13913 (build-system python-build-system)
13914 (home-page "http://docs.python.org/py3k/library/configparser.html")
13915 (synopsis "Backport of configparser from python 3.5")
13916 (description "@code{python-configparser} is a backport of
13917 @code{configparser} from Python 3.5 so that it can be used directly
13918 in other versions.")
13919 (license license:expat)))
13920
13921 (define-public python2-configparser
13922 (package-with-python2 python-configparser))
13923
13924 (define-public python2-coverage-test-runner
13925 (package
13926 (name "python2-coverage-test-runner")
13927 (version "1.11")
13928 (source
13929 (origin
13930 (method url-fetch)
13931 (uri (string-append
13932 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/"
13933 "coverage-test-runner/snapshot/coverage-test-runner-"
13934 version ".tar.gz"))
13935 (sha256
13936 (base32
13937 "0y1m7z3dl63kmhcmydl1mwg0hacnf6ghrx9dah17j9iasssfa3g7"))))
13938 (build-system python-build-system)
13939 (arguments
13940 `(#:python ,python-2
13941 #:phases
13942 (modify-phases %standard-phases
13943 (replace 'check
13944 (lambda _
13945 (zero? (system* "./testrun")))))))
13946 (propagated-inputs
13947 `(("python2-coverage" ,python2-coverage)))
13948 (home-page "https://liw.fi/coverage-test-runner/")
13949 (synopsis "Python module for running unit tests")
13950 (description "@code{CoverageTestRunner} is a python module for running
13951 unit tests and failing them if the unit test module does not exercise all
13952 statements in the module it tests.")
13953 (license license:gpl3+)))
13954
13955 (define-public python-pylint
13956 (package
13957 (name "python-pylint")
13958 (version "1.6.5")
13959 (source
13960 (origin
13961 (method url-fetch)
13962 (uri (string-append
13963 "https://github.com/PyCQA/pylint/archive/pylint-"
13964 version ".tar.gz"))
13965 (sha256
13966 (base32
13967 "08pmgflmq2zrzrn9nkfadzwa5vybz46wvwxhrsd2mjlcgsh4rzbm"))))
13968 (build-system python-build-system)
13969 (native-inputs
13970 `(("python-tox" ,python-tox)))
13971 (propagated-inputs
13972 `(("python-astroid" ,python-astroid)
13973 ("python-isort" ,python-isort)
13974 ("python-mccabe" ,python-mccabe)
13975 ("python-six" ,python-six)))
13976 (arguments
13977 `(#:phases
13978 (modify-phases %standard-phases
13979 (replace 'check
13980 (lambda _
13981 ;; Somehow, tests for python2-pylint
13982 ;; fail if run from the build directory
13983 (let ((work "/tmp/work"))
13984 (mkdir-p work)
13985 (setenv "PYTHONPATH"
13986 (string-append (getenv "PYTHONPATH") ":" work))
13987 (copy-recursively "." work)
13988 (with-directory-excursion "/tmp"
13989 (zero? (system* "python" "-m" "unittest" "discover"
13990 "-s" (string-append work "/pylint/test")
13991 "-p" "*test_*.py")))))))))
13992 (home-page "https://github.com/PyCQA/pylint")
13993 (synopsis "Python source code analyzer which looks for coding standard
13994 errors")
13995 (description "Pylint is a Python source code analyzer which looks
13996 for programming errors, helps enforcing a coding standard and sniffs
13997 for some code smells (as defined in Martin Fowler's Refactoring book).
13998
13999 Pylint has many rules enabled by default, way too much to silence them
14000 all on a minimally sized program. It's highly configurable and handle
14001 pragmas to control it from within your code. Additionally, it is
14002 possible to write plugins to add your own checks.")
14003 (license license:gpl2+)))
14004
14005 (define-public python2-pylint
14006 (let ((pylint (package-with-python2 python-pylint)))
14007 (package (inherit pylint)
14008 (propagated-inputs
14009 `(("python2-backports-functools-lru-cache"
14010 ,python2-backports-functools-lru-cache)
14011 ("python2-configparser" ,python2-configparser)
14012 ,@(package-propagated-inputs pylint))))))
14013
14014 (define-public python-paramunittest
14015 (package
14016 (name "python-paramunittest")
14017 (version "0.2")
14018 (source
14019 (origin
14020 (method url-fetch)
14021 (uri (pypi-uri "ParamUnittest" version))
14022 (sha256
14023 (base32
14024 "0kp793hws5xv1wvycxq7jw2pwy36f35k39jg8hx5qikij5a0jid1"))))
14025 (build-system python-build-system)
14026 (home-page
14027 "https://github.com/rik0/ParamUnittest")
14028 (synopsis
14029 "Simple extension to have parametrized unit tests")
14030 (description
14031 "This package allows to create parametrized unit-tests that work with the standard
14032 unittest package. A parametrized test case is automatically converted to multiple test
14033 cases. Since they are TestCase subclasses, they work with other test suites that
14034 recognize TestCases.")
14035 (license license:bsd-2)))
14036
14037 (define-public python2-python-paramunittest
14038 (package-with-python2 python-paramunittest))
14039
14040 (define-public python-mando
14041 (package
14042 (name "python-mando")
14043 (version "0.5")
14044 (source
14045 (origin
14046 (method url-fetch)
14047 (uri (pypi-uri "mando" version))
14048 (sha256
14049 (base32
14050 "0q05h66439gqdmlk4jqm6xrwrzfdgs4mwk70barxhr2y83qbbdc0"))))
14051 (build-system python-build-system)
14052 (propagated-inputs
14053 `(("python-rst2ansi" ,python-rst2ansi)))
14054 (native-inputs
14055 `(("python-sphinx" ,python-sphinx-1.5.3)
14056 ("python-paramunittest" ,python-paramunittest)))
14057 (home-page "https://mando.readthedocs.org/")
14058 (synopsis
14059 "Wrapper around argparse, allowing creation of complete CLI applications")
14060 (description
14061 "This package is a wrapper around argparse, allowing you to write complete CLI
14062 applications in seconds while maintaining all the flexibility.")
14063 (license license:expat)))
14064
14065 (define-public python2-mando
14066 (package-with-python2 python-mando))
14067
14068 (define-public python-mando-0.3.1
14069 ;; python-radon (version 1.5.0) has a requirement
14070 ;; for mando<0.4,>=0.3
14071 (package
14072 (inherit python-mando)
14073 (name "python-mando")
14074 (version "0.3.1")
14075 (source
14076 (origin
14077 (method url-fetch)
14078 (uri (string-append "https://github.com/rubik/mando/archive/v"
14079 version
14080 ".tar.gz"))
14081 (sha256
14082 (base32
14083 "17jlkdpqw22z1nyml5ybslilqkzmnk0dxxjml8bfghav1l5hbwd2"))))))
14084
14085 (define-public python-fudge
14086 (package
14087 (name "python-fudge")
14088 ;; 0.9.6 is the latest version suitable for testing the "fabric" Python 2
14089 ;; package, which is currently the only use of this package.
14090 (version "0.9.6")
14091 (source
14092 (origin
14093 (method url-fetch)
14094 (uri (pypi-uri "fudge" version))
14095 (sha256
14096 (base32
14097 "185ia3vr3qk4f2s1a9hdxb8ci4qc0x0xidrad96pywg8j930qs9l"))))
14098 (build-system python-build-system)
14099 (arguments
14100 `(#:tests? #f)) ;XXX: Tests require the NoseJS Python package.
14101 (home-page "https://github.com/fudge-py/fudge")
14102 (synopsis "Replace real objects with fakes/mocks/stubs while testing")
14103 (description
14104 "Fudge is a Python module for using fake objects (mocks and stubs) to
14105 test real ones.
14106
14107 In readable Python code, you declare the methods available on your fake object
14108 and how they should be called. Then you inject that into your application and
14109 start testing. This declarative approach means you don’t have to record and
14110 playback actions and you don’t have to inspect your fakes after running code.
14111 If the fake object was used incorrectly then you’ll see an informative
14112 exception message with a traceback that points to the culprit.")
14113 (license license:expat)))
14114
14115 (define-public python2-fudge
14116 (package-with-python2 python-fudge))
14117
14118 (define-public python-oauth2client
14119 (package
14120 (name "python-oauth2client")
14121 (version "4.0.0")
14122 (source
14123 (origin
14124 (method url-fetch)
14125 (uri (pypi-uri "oauth2client" version))
14126 (sha256
14127 (base32
14128 "1irqqap2zibysf8dba8sklfqikia579srd0phm5n754ni0h59gl0"))))
14129 (build-system python-build-system)
14130 (arguments
14131 `(#:tests? #f))
14132 (propagated-inputs
14133 `(("python-httplib2" ,python-httplib2)
14134 ("python-pyasn1" ,python-pyasn1)
14135 ("python-pyasn1-modules" ,python-pyasn1-modules)
14136 ("python-rsa" ,python-rsa)
14137 ("python-six" ,python-six)))
14138 (home-page "http://github.com/google/oauth2client/")
14139 (synopsis "OAuth 2.0 client library")
14140 (description "@code{python-oauth2client} provides an OAuth 2.0 client
14141 library for Python")
14142 (license license:asl2.0)))
14143
14144 (define-public python-flask-oidc
14145 (package
14146 (name "python-flask-oidc")
14147 (version "1.1.1")
14148 (source
14149 (origin
14150 (method url-fetch)
14151 (uri (pypi-uri "flask-oidc" version))
14152 (sha256
14153 (base32
14154 "1ay5j0mf174bix7i67hclr95gv16z81fpx0dijvi0gydvdj3ddy2"))))
14155 (build-system python-build-system)
14156 (propagated-inputs
14157 `(("python-flask" ,python-flask)
14158 ("python-itsdangerous" ,python-itsdangerous)
14159 ("python-oauth2client" ,python-oauth2client)
14160 ("python-six" ,python-six)))
14161 (native-inputs
14162 `(("python-nose" ,python-nose)
14163 ("python-mock" ,python-mock)))
14164 (home-page "https://github.com/puiterwijk/flask-oidc")
14165 (synopsis "OpenID Connect extension for Flask")
14166 (description "@code{python-flask-oidc} provides an OpenID Connect extension
14167 for Flask.")
14168 (license license:bsd-2)))
14169
14170 (define-public python-mwclient
14171 (package
14172 (name "python-mwclient")
14173 (version "0.8.4")
14174 (source
14175 (origin
14176 (method url-fetch)
14177 ;; The PyPI version wouldn't contain tests.
14178 (uri (string-append "https://github.com/mwclient/mwclient/archive/"
14179 "v" version ".tar.gz"))
14180 (sha256
14181 (base32
14182 "1jj0yhilkjir00719fc7w133x7hdyhkxhk6xblla4asig45klsfv"))))
14183 (build-system python-build-system)
14184 (propagated-inputs
14185 `(("python-requests" ,python-requests)
14186 ("python-requests-oauthlib"
14187 ,python-requests-oauthlib)
14188 ("python-six" ,python-six)))
14189 (native-inputs
14190 `(("python-mock" ,python-mock)
14191 ("python-pytest" ,python-pytest)
14192 ("python-pytest-pep8" ,python-pytest-pep8)
14193 ("python-pytest-cache" ,python-pytest-cache)
14194 ("python-pytest-cov" ,python-pytest-cov)
14195 ("python-responses" ,python-responses)))
14196 (home-page "https://github.com/btongminh/mwclient")
14197 (synopsis "MediaWiki API client")
14198 (description "This package provides a MediaWiki API client.")
14199 (license license:expat)))
14200
14201 (define-public python2-mwclient
14202 (package-with-python2 python-mwclient))
14203
14204 (define-public python-pytest-warnings
14205 (package
14206 (name "python-pytest-warnings")
14207 (version "0.2.0")
14208 (source
14209 (origin
14210 (method url-fetch)
14211 (uri (pypi-uri "pytest-warnings" version))
14212 (sha256
14213 (base32
14214 "0gf2dpahpl5igb7jh1sr9acj3z3gp7zahqdqb69nk6wx01c8kc1g"))))
14215 (build-system python-build-system)
14216 (propagated-inputs
14217 `(("pytest" ,python-pytest-3.0)))
14218 (home-page "https://github.com/fschulze/pytest-warnings")
14219 (synopsis "Pytest plugin to list Python warnings in pytest report")
14220 (description
14221 "Python-pytest-warnings is a pytest plugin to list Python warnings in
14222 pytest report.")
14223 (license license:expat)))
14224
14225 (define-public python2-pytest-warnings
14226 (package-with-python2 python-pytest-warnings))
14227
14228 (define-public python-pytest-catchlog
14229 (package
14230 (name "python-pytest-catchlog")
14231 (version "1.2.2")
14232 (source
14233 (origin
14234 (method url-fetch)
14235 (uri (pypi-uri "pytest-catchlog" version ".zip"))
14236 (sha256
14237 (base32
14238 "1w7wxh27sbqwm4jgwrjr9c2gy384aca5jzw9c0wzhl0pmk2mvqab"))))
14239 (build-system python-build-system)
14240 (native-inputs
14241 `(("unzip" ,unzip)))
14242 (propagated-inputs
14243 `(("pytest" ,python-pytest-3.0)))
14244 (home-page "https://github.com/eisensheng/pytest-catchlog")
14245 (synopsis "Pytest plugin to catch log messages")
14246 (description
14247 "Python-pytest-catchlog is a pytest plugin to catch log messages. This is
14248 a fork of pytest-capturelog.")
14249 (license license:expat)))
14250
14251 (define-public python2-pytest-catchlog
14252 (package-with-python2 python-pytest-catchlog))
14253
14254 (define-public python-utils
14255 (package
14256 (name "python-utils")
14257 (version "2.1.0")
14258 (source (origin
14259 (method url-fetch)
14260 (uri (pypi-uri "python-utils" version))
14261 (sha256
14262 (base32
14263 "1mcsy6q5am4ya72rgkpb6kax6vv7c93cfkkas89xnpa4sj9zf28p"))))
14264 (build-system python-build-system)
14265 (native-inputs
14266 `(("pytest-runner" ,python-pytest-runner)
14267 ("pytest" ,python-pytest)
14268 ("six" ,python-six)))
14269 (home-page "https://github.com/WoLpH/python-utils")
14270 (synopsis "Convenient utilities not included with the standard Python install")
14271 (description
14272 "Python Utils is a collection of small Python functions and classes which
14273 make common patterns shorter and easier.")
14274 (license license:bsd-2)))
14275
14276 (define-public python2-utils
14277 (package-with-python2 python-utils))
14278
14279 (define-public python-webassets
14280 (package
14281 (name "python-webassets")
14282 (version "0.12.1")
14283 (source
14284 (origin
14285 (method url-fetch)
14286 (uri (pypi-uri "webassets" version))
14287 (sha256
14288 (base32
14289 "1nrqkpb7z46h2b77xafxihqv3322cwqv6293ngaky4j3ff4cing7"))))
14290 (build-system python-build-system)
14291 (native-inputs
14292 `(("python-jinja2" ,python-jinja2)
14293 ("python-mock" ,python-mock)
14294 ("python-nose" ,python-nose)
14295 ("python-pytest" ,python-pytest)))
14296 (home-page "https://github.com/miracle2k/webassets")
14297 (synopsis "Media asset management")
14298 (description "Merges, minifies and compresses Javascript and CSS files,
14299 supporting a variety of different filters, including YUI, jsmin, jspacker or
14300 CSS tidy. Also supports URL rewriting in CSS files.")
14301 (license license:bsd-2)))
14302
14303 (define-public python-sphinx-me
14304 (package
14305 (name "python-sphinx-me")
14306 (version "0.3")
14307 (source
14308 (origin
14309 (method url-fetch)
14310 (uri (pypi-uri "sphinx-me" version))
14311 (sha256
14312 (base32
14313 "06jzgp213zihnvpcy2y5jy3ykid3apc2ncp2pg6a2g05lhiziglq"))))
14314 (build-system python-build-system)
14315 (home-page "https://github.com/stephenmcd/sphinx-me")
14316 (synopsis "Create a Sphinx documentation shell")
14317 (description
14318 "Create a Sphinx documentation shell for your project and include the
14319 README file as the documentation index. It handles extracting the required
14320 meta data such as the project name, author and version from your project for
14321 use in your Sphinx docs.")
14322 (license license:bsd-2)))
14323
14324 (define-public python2-sphinx-me
14325 (package-with-python2 python-sphinx-me))
14326
14327 (define-public python-cssmin
14328 (package
14329 (name "python-cssmin")
14330 (version "0.2.0")
14331 (source
14332 (origin
14333 (method url-fetch)
14334 (uri (pypi-uri "cssmin" version))
14335 (sha256
14336 (base32
14337 "1dk723nfm2yf8cp4pj785giqlwv42l0kj8rk40kczvq1hk6g04p0"))))
14338 (build-system python-build-system)
14339 (home-page "https://github.com/zacharyvoase/cssmin")
14340 (synopsis "Python port of the YUI CSS Compressor")
14341 (description "Python port of the YUI CSS Compressor.")
14342 (license (list license:expat license:bsd-3))))
14343
14344 (define-public python2-cssmin
14345 (package-with-python2 python-cssmin))
14346
14347 (define-public python-diff-match-patch
14348 (package
14349 (name "python-diff-match-patch")
14350 (version "20121119")
14351 (source
14352 (origin
14353 (method url-fetch)
14354 (uri (pypi-uri "diff-match-patch" version))
14355 (sha256
14356 (base32
14357 "0k1f3v8nbidcmmrk65m7h8v41jqi37653za9fcs96y7jzc8mdflx"))))
14358 (build-system python-build-system)
14359 (home-page "https://code.google.com/p/google-diff-match-patch")
14360 (synopsis "Synchronize plain text")
14361 (description "Diff Match and Patch libraries offer robust algorithms to
14362 perform the operations required for synchronizing plain text.")
14363 (license license:asl2.0)))
14364
14365 (define-public python2-diff-match-patch
14366 (package-with-python2 python-diff-match-patch))
14367
14368 (define-public python-dirsync
14369 (package
14370 (name "python-dirsync")
14371 (version "2.2.2")
14372 (source
14373 (origin
14374 (method url-fetch)
14375 (uri (pypi-uri "dirsync" version ".zip"))
14376 (sha256
14377 (base32
14378 "1hcdvmkwd5512zbxpin0k7bx5bkgzy3swjx7d0kj1y45af6r75v2"))))
14379 (build-system python-build-system)
14380 (native-inputs
14381 `(("unzip" ,unzip)))
14382 (propagated-inputs
14383 `(("six" ,python-six)))
14384 (home-page "https://bitbucket.org/tkhyn/dirsync")
14385 (synopsis "Advanced directory tree synchronisation tool")
14386 (description "Advanced directory tree synchronisation tool.")
14387 (license license:expat)))
14388
14389 (define-public python2-dirsync
14390 (package-with-python2 python-dirsync))
14391
14392 (define-public python-nosexcover
14393 (package
14394 (name "python-nosexcover")
14395 (version "1.0.11")
14396 (source (origin
14397 (method url-fetch)
14398 (uri (pypi-uri "nosexcover" version))
14399 (sha256
14400 (base32
14401 "10xqr12qv62k2flxwqhh8cr00cjhn7sfjrm6p35gd1x5bmjkr319"))))
14402 (build-system python-build-system)
14403 (propagated-inputs
14404 `(("python-coverage" ,python-coverage)
14405 ("python-nose" ,python-nose)))
14406 (home-page "http://github.com/cmheisel/nose-xcover")
14407 (synopsis "Extends nose.plugins.cover to add Cobertura-style XML reports")
14408 (description "Nose-xcover is a companion to the built-in
14409 @code{nose.plugins.cover}. This plugin will write out an XML coverage report
14410 to a file named coverage.xml.
14411
14412 It will honor all the options you pass to the Nose coverage plugin,
14413 especially -cover-package.")
14414 (license license:expat)))
14415
14416 (define-public python2-nosexcover
14417 (package-with-python2 python-nosexcover))
14418
14419 (define-public python-elasticsearch
14420 (package
14421 (name "python-elasticsearch")
14422 (version "1.0.0")
14423 (source
14424 (origin
14425 (method url-fetch)
14426 (uri (pypi-uri "elasticsearch" version))
14427 (sha256
14428 (base32
14429 "1sdw1r05cw7ihnmng8ra9v968fj7bq6sji8i1dikymsnkcpgc69g"))))
14430 (build-system python-build-system)
14431 (native-inputs
14432 `(("python-mock" ,python-mock)
14433 ("python-nosexcover" ,python-nosexcover)
14434 ("python-pyaml" ,python-pyaml)
14435 ("python-requests" ,python-requests)))
14436 (propagated-inputs
14437 `(("urllib3" ,python-urllib3)))
14438 (arguments
14439 ;; tests require the test_elasticsearch module but it is not distributed.
14440 `(#:tests? #f))
14441 (home-page "https://github.com/elastic/elasticsearch-py")
14442 (synopsis "Low-level client for Elasticsearch")
14443 (description "Official low-level client for Elasticsearch. Its goal is to
14444 provide common ground for all Elasticsearch-related code in Python; because of
14445 this it tries to be opinion-free and very extendable.")
14446 (license license:expat)))
14447
14448 (define-public python2-elasticsearch
14449 (package-with-python2 python-elasticsearch))
14450
14451 (define-public python-levenshtein
14452 (package
14453 (name "python-levenshtein")
14454 (version "0.12.0")
14455 (source
14456 (origin
14457 (method url-fetch)
14458 (uri (pypi-uri "python-Levenshtein" version))
14459 (sha256
14460 (base32
14461 "1c9ybqcja31nghfcc8xxbbz9h60s9qi12b9hr4jyl69xbvg12fh3"))))
14462 (build-system python-build-system)
14463 (home-page "https://github.com/ztane/python-Levenshtein")
14464 (synopsis "Fast computation of Levenshtein distance and string similarity")
14465 (description
14466 "The Levenshtein Python C extension module contains functions for fast computation of
14467 @enumerate
14468 @item Levenshtein (edit) distance, and edit operations
14469 @item string similarity
14470 @item approximate median strings, and generally string averaging
14471 @item string sequence and set similarity
14472 @end enumerate
14473 It supports both normal and Unicode strings.")
14474 (license license:gpl2+)))
14475
14476 (define-public python2-levenshtein
14477 (package-with-python2 python-levenshtein))
14478
14479 (define-public python-scandir
14480 (package
14481 (name "python-scandir")
14482 (version "1.4")
14483 (source
14484 (origin
14485 (method url-fetch)
14486 (uri (pypi-uri "scandir" version))
14487 (sha256
14488 (base32 "0yjrgp0mxp3d8bjkq2m1ac2ys8n76wykksvgyjrnil9gr3fx7a5d"))))
14489 (build-system python-build-system)
14490 (home-page "https://github.com/benhoyt/scandir")
14491 (synopsis "Directory iteration function")
14492 (description
14493 "Directory iteration function like os.listdir(), except that instead of
14494 returning a list of bare filenames, it yields DirEntry objects that include
14495 file type and stat information along with the name. Using scandir() increases
14496 the speed of os.walk() by 2-20 times (depending on the platform and file
14497 system) by avoiding unnecessary calls to os.stat() in most cases.")
14498 (license license:bsd-3)))
14499
14500 (define-public python2-scandir
14501 (package-with-python2 python-scandir))
14502
14503 (define-public python2-stemming
14504 (package
14505 (name "python2-stemming")
14506 (version "1.0.1")
14507 (source
14508 (origin
14509 (method url-fetch)
14510 (uri (pypi-uri "stemming" version))
14511 (sha256
14512 (base32 "0ldwa24gnnxhniv0fhygkpc2mwgd93q10ag8rvzayv6hw418frsr"))))
14513 (build-system python-build-system)
14514 (arguments
14515 `(#:python ,python-2))
14516 (home-page "https://bitbucket.org/mchaput/stemming/overview")
14517 (synopsis "Python implementations of various stemming algorithms")
14518 (description
14519 "Python implementations of the Porter, Porter2, Paice-Husk, and Lovins
14520 stemming algorithms for English. These implementations are straightforward and
14521 efficient, unlike some Python versions of the same algorithms available on the
14522 Web. This package is an extraction of the stemming code included in the Whoosh
14523 search engine.")
14524 (license license:public-domain)))
14525
14526 (define-public python-factory-boy
14527 (package
14528 (name "python-factory-boy")
14529 (version "2.8.1")
14530 (source
14531 (origin
14532 (method url-fetch)
14533 (uri (pypi-uri "factory_boy" version))
14534 (sha256
14535 (base32 "1fvin6san5xsjh2c4y18caj2lnmwxlylyqm8mh1yc6rp38wlwr56"))))
14536 (build-system python-build-system)
14537 (arguments
14538 ;; Tests are not included in the tarball.
14539 `(#:tests? #f))
14540 (propagated-inputs
14541 `(("faker" ,python-faker)))
14542 (home-page "https://github.com/benhoyt/scandir")
14543 (synopsis "Versatile test fixtures replacement")
14544 (description
14545 "Factory_boy is a fixtures replacement based on thoughtbot’s factory_girl.
14546
14547 As a fixtures replacement tool, it aims to replace static, hard to maintain
14548 fixtures with easy-to-use factories for complex object.
14549
14550 Instead of building an exhaustive test setup with every possible combination
14551 of corner cases, factory_boy allows you to use objects customized for the
14552 current test, while only declaring the test-specific fields")
14553 (license license:expat)))
14554
14555 (define-public python2-factory-boy
14556 (package-with-python2 python-factory-boy))
14557
14558 (define-public python-translate-toolkit
14559 (package
14560 (name "python-translate-toolkit")
14561 (version "2.1.0")
14562 (source
14563 (origin
14564 (method url-fetch)
14565 (uri (pypi-uri "translate-toolkit" version ".tar.bz2"))
14566 (sha256
14567 (base32 "1vlkwrg83vb17jc36pmwh2b7jphwf390lz0jw8hakcg16qhwypvq"))))
14568 (build-system python-build-system)
14569 (native-inputs
14570 `(("python-pytest" ,python-pytest)
14571 ("python-sphinx" ,python-sphinx)))
14572 (propagated-inputs
14573 `(("python-babel" ,python-babel)
14574 ("python-beautifulsoup4" ,python-beautifulsoup4)
14575 ("python-chardet" ,python-chardet)
14576 ("python-diff-match-patch" ,python-diff-match-patch)
14577 ("python-levenshtein" ,python-levenshtein)
14578 ("python-lxml" ,python-lxml)
14579 ("python-six" ,python-six)
14580 ("python-vobject" ,python-vobject)
14581 ("python-pyyaml" ,python-pyyaml)))
14582 (arguments
14583 ;; TODO: tests are not run, because they end with
14584 ;; TypeError: parse() missing 2 required positional arguments: 'tree' and
14585 ;; 'parse_funcs'
14586 ;; during test setup.
14587 `(#:tests? #f))
14588 (home-page "http://toolkit.translatehouse.org")
14589 (synopsis "Tools and API for translation and localization engineering")
14590 (description
14591 "Tools and API for translation and localization engineering. It contains
14592 several utilities, as well as an API for building localization tools.")
14593 (license license:gpl2+)))
14594
14595 (define-public python2-translate-toolkit
14596 (package-with-python2 python-translate-toolkit))
14597
14598 (define-public python-mysqlclient
14599 (package
14600 (name "python-mysqlclient")
14601 (version "1.3.10")
14602 (source
14603 (origin
14604 (method url-fetch)
14605 (uri (pypi-uri "mysqlclient" version))
14606 (sha256
14607 (base32
14608 "0qkj570x4rbsblji6frvsvp2v1ap32dqzj1lq62zp9515ffsyaj5"))))
14609 (build-system python-build-system)
14610 (native-inputs
14611 `(("mariadb" ,mariadb)
14612 ("nose" ,python-nose)
14613 ("mock" ,python-mock)
14614 ("py.test" ,python-pytest)))
14615 (inputs
14616 `(("mysql" ,mysql)
14617 ("libz" ,zlib)
14618 ("openssl" ,openssl)))
14619 (home-page "https://github.com/PyMySQL/mysqlclient-python")
14620 (synopsis "MySQLdb is an interface to the popular MySQL database server for Python")
14621 (description "MySQLdb is an interface to the popular MySQL database server
14622 for Python. The design goals are:
14623 @enumerate
14624 @item Compliance with Python database API version 2.0 [PEP-0249],
14625 @item Thread-safety,
14626 @item Thread-friendliness (threads will not block each other).
14627 @end enumerate")
14628 (license license:gpl2)))
14629
14630 (define-public python2-mysqlclient
14631 (package-with-python2 python-mysqlclient))
14632
14633 (define-public python-hiredis
14634 (package
14635 (name "python-hiredis")
14636 (version "0.2.0")
14637 (source
14638 (origin
14639 (method url-fetch)
14640 (uri (pypi-uri "hiredis" version))
14641 (sha256
14642 (base32
14643 "1dfm2k9l9zar9nw9fwmm74zrgraxdxs04vx9li56fjcf289qx5fa"))))
14644 (build-system python-build-system)
14645 (arguments
14646 ;; no tests
14647 `(#:tests? #f))
14648 (home-page "https://github.com/redis/hiredis-py")
14649 (synopsis "Python extension that wraps protocol parsing code in hiredis")
14650 (description "Python-hiredis is a python extension that wraps protocol
14651 parsing code in hiredis. It primarily speeds up parsing of multi bulk replies.")
14652 (license license:bsd-3)))
14653
14654 (define-public python2-hiredis
14655 (package-with-python2 python-hiredis))
14656
14657 (define-public python-fakeredis
14658 (package
14659 (name "python-fakeredis")
14660 (version "0.8.2")
14661 (source
14662 (origin
14663 (method url-fetch)
14664 (uri (pypi-uri "fakeredis" version))
14665 (sha256
14666 (base32
14667 "0zncahj3byyasyfx9i7k991ph0n0lq8v3a21pqri5qxn9564bk9r"))))
14668 (build-system python-build-system)
14669 (arguments
14670 ;; no tests
14671 `(#:tests? #f))
14672 (home-page "https://github.com/jamesls/fakeredis")
14673 (synopsis "Fake implementation of redis API for testing purposes")
14674 (description "Fakeredis is a pure python implementation of the redis-py
14675 python client that simulates talking to a redis server. This was created for a
14676 single purpose: to write unittests. Setting up redis is not hard, but many time
14677 you want to write unittests that do not talk to an external server (such as
14678 redis). This module now allows tests to simply use this module as a reasonable
14679 substitute for redis.")
14680 (license license:bsd-3)))
14681
14682 (define-public python2-fakeredis
14683 (package-with-python2 python-fakeredis))
14684
14685 (define-public python-behave-web-api
14686 (package
14687 (name "python-behave-web-api")
14688 (version "1.0.6")
14689 (source
14690 (origin
14691 (method url-fetch)
14692 (uri (pypi-uri "behave-web-api" version))
14693 (sha256
14694 (base32
14695 "03kpq2xsy1gab3jy0dccbxlsg7vwfy4lagss0qldwmx3xz6b3i19"))))
14696 (build-system python-build-system)
14697 (arguments
14698 `(#:phases
14699 (modify-phases %standard-phases
14700 (add-after 'unpack 'fix-dependencies
14701 (lambda _
14702 (substitute* "setup.py"
14703 (("'wheel'") "") ; We don't use it.
14704 (("'ordereddict==1.1'") ""))))))) ; Python >= 2.7 has it built-in.
14705 (propagated-inputs
14706 `(("behave" ,behave)
14707 ("python-requests" ,python-requests)))
14708 (home-page "https://github.com/jefersondaniel/behave-web-api")
14709 (synopsis "Provides testing for JSON APIs with Behave for Python")
14710 (description "This package provides testing utility modules for testing
14711 JSON APIs with Behave.")
14712 (license license:expat)))
14713
14714 (define-public python2-behave-web-api
14715 (package-with-python2 python-behave-web-api))
14716
14717 (define-public python-flask-script
14718 (package
14719 (name "python-flask-script")
14720 (version "2.0.5")
14721 (source
14722 (origin
14723 (method url-fetch)
14724 (uri (pypi-uri "Flask-Script" version))
14725 (sha256
14726 (base32
14727 "0zqh2yq8zk7m9b4xw1ryqmrljkdigfb3hk5155a3b5hkfnn6xxyf"))))
14728 (build-system python-build-system)
14729 (propagated-inputs
14730 `(("python-flask" ,python-flask)
14731 ("python-argcomplete" ,python-argcomplete)
14732 ("python-werkzeug" ,python-werkzeug)))
14733 (native-inputs
14734 `(("python-pytest" ,python-pytest)))
14735 (home-page
14736 "http://github.com/smurfix/flask-script")
14737 (synopsis "Scripting support for Flask")
14738 (description "The Flask-Script extension provides support for writing
14739 external scripts in Flask. This includes running a development server,
14740 a customised Python shell, scripts to set up your database, cronjobs,
14741 and other command-line tasks that belong outside the web application
14742 itself.")
14743 (license license:bsd-3)))
14744
14745 (define-public python2-flask-script
14746 (package-with-python2 python-flask-script))
14747
14748 (define-public python-flask-migrate
14749 (package
14750 (name "python-flask-migrate")
14751 (version "2.0.3")
14752 (source
14753 (origin
14754 (method url-fetch)
14755 (uri (pypi-uri "Flask-Migrate" version))
14756 (sha256
14757 (base32
14758 "107x78lkqsnbg92dld3dkagg07jvchp3ib3y0sivc4ipz6n1y7rk"))))
14759 (build-system python-build-system)
14760 (propagated-inputs
14761 `(("python-flask" ,python-flask)
14762 ("python-alembic" ,python-alembic)
14763 ("python-sqlalchemy" ,python-sqlalchemy)
14764 ("python-flask-script" ,python-flask-script)
14765 ("python-flask-sqlalchemy" ,python-flask-sqlalchemy)))
14766 (home-page "http://github.com/miguelgrinberg/flask-migrate/")
14767 (synopsis "SQLAlchemy database migrations for Flask programs using
14768 Alembic")
14769 (description "This package contains SQLAlchemy database migration tools
14770 for Flask programs that are using @code{python-alembic}.")
14771 (license license:expat)))
14772
14773 (define-public python2-flask-migrate
14774 (package-with-python2 python-flask-migrate))
14775
14776 (define-public python-packaging
14777 (package
14778 (name "python-packaging")
14779 (version "16.8")
14780 (source
14781 (origin
14782 (method url-fetch)
14783 (uri (pypi-uri "packaging" version))
14784 (sha256
14785 (base32
14786 "17k1xbjshackwvbsnxqixbph8rbqhz4bf4g3al5xyzhavxgq6l2x"))))
14787 (build-system python-build-system)
14788 (native-inputs
14789 `(("python-pretend" ,python-pretend)
14790 ("python-pytest" ,python-pytest)))
14791 (propagated-inputs
14792 `(("python-pyparsing" ,python-pyparsing)
14793 ("python-six" ,python-six)))
14794 (home-page "https://github.com/pypa/packaging")
14795 (synopsis "Core utilities for Python packages")
14796 (description "Packaging is a Python module for dealing with Python packages.
14797 It offers an interface for working with package versions, names, and dependency
14798 information.")
14799 ;; From 'LICENSE': This software is made available under the terms of
14800 ;; *either* of the licenses found in LICENSE.APACHE or LICENSE.BSD.
14801 ;; Contributions to this software is made under the terms of *both* these
14802 ;; licenses.
14803 (license (list license:asl2.0 license:bsd-2))))
14804
14805 (define-public python2-packaging
14806 (package-with-python2 python-packaging))
14807
14808 (define-public python-sql
14809 (package
14810 (name "python-sql")
14811 (version "0.9")
14812 (source
14813 (origin
14814 (method url-fetch)
14815 (uri (pypi-uri "python-sql" version))
14816 (sha256
14817 (base32
14818 "0p6kaqj02vz0habmdx37zjk6hjxdfm8aw737zs059vvpr70ird87"))))
14819 (build-system python-build-system)
14820 (home-page "https://python-sql.tryton.org/")
14821 (synopsis "Library to write SQL queries in a pythonic way")
14822 (description "@code{python-sql} is a library to write SQL queries, that
14823 transforms idiomatic python function calls to well-formed SQL queries.")
14824 (license license:bsd-3)))
14825
14826 (define-public python2-sql
14827 (package-with-python2 python-sql))
14828
14829 (define-public python-genshi
14830 (package
14831 (name "python-genshi")
14832 (version "0.7")
14833 (source
14834 (origin
14835 (method url-fetch)
14836 (uri (string-append
14837 "https://ftp.edgewall.org/pub/genshi/Genshi-"
14838 version ".tar.gz"))
14839 (patches
14840 (search-patches
14841 ;; The first 4 patches are in the master branch upstream.
14842 ;; See this as a reference https://genshi.edgewall.org/ticket/582
14843 ;; The last 2 are NOT in any branch.
14844 ;; They were sent as attachments to a ticket opened at
14845 ;; https://genshi.edgewall.org/ticket/602#no1
14846 "python-genshi-stripping-of-unsafe-script-tags.patch"
14847 "python-genshi-disable-speedups-on-python-3.3.patch"
14848 "python-genshi-isstring-helper.patch"
14849 "python-genshi-add-support-for-python-3.4-AST.patch"
14850 "python-genshi-fix-tests-on-python-3.5.patch"
14851 "python-genshi-buildable-on-python-2.7.patch"))
14852 (sha256
14853 (base32
14854 "0lkkbp6fbwzv0zda5iqc21rr7rdldkwh3hfabfjl9i4bwq14858x"))))
14855 (build-system python-build-system)
14856 (home-page "https://genshi.edgewall.org/")
14857 (synopsis "Toolkit for generation of output for the web")
14858 (description "Genshi is a Python library that provides an integrated set
14859 of components for parsing, generating, and processing HTML, XML or other
14860 textual content for output generation on the web.")
14861 (license license:bsd-3)))
14862
14863 ;; The linter here claims that patch file names should start with the package
14864 ;; name. But, in this case the patches are inherited from python-genshi with
14865 ;; the "python-genshi-" prefix instead of "python2-genshi-".
14866 (define-public python2-genshi
14867 (package-with-python2 python-genshi))
14868
14869 (define-public python-relatorio
14870 (package
14871 (name "python-relatorio")
14872 (version "0.6.4")
14873 (source
14874 (origin
14875 (method url-fetch)
14876 (uri (pypi-uri "relatorio" version))
14877 (sha256
14878 (base32
14879 "0lincq79mzgazwd9gh41dybjh9c3n87r83pl8nk3j79aihyfk84z"))))
14880 (build-system python-build-system)
14881 (propagated-inputs
14882 `(("python-lxml" ,python-lxml)
14883 ("python-genshi" ,python-genshi)))
14884 (home-page "https://relatorio.tryton.org/")
14885 (synopsis "Templating library able to output ODT and PDF files")
14886 (description "Relatorio is a templating library which provides a way to
14887 easily output ODT, ODS, PNG, SVG and several other kinds of files. Support
14888 for more filetypes can be easily added by creating plugins for them.")
14889 (license license:gpl3+)))
14890
14891 (define-public python2-relatorio
14892 (package-with-python2 python-relatorio))
14893
14894 (define-public python-radon
14895 (package
14896 (name "python-radon")
14897 (version "1.5.0")
14898 (source
14899 (origin
14900 (method url-fetch)
14901 (uri (pypi-uri "radon" version))
14902 (sha256
14903 (base32
14904 "1h6jv36am0i827182a04ki6291lyx4kp957xfr5njgprj4nd0qsl"))))
14905 (build-system python-build-system)
14906 (propagated-inputs
14907 `(("python-colorama" ,python-colorama)
14908 ("python-flake8-polyfill" ,python-flake8-polyfill)
14909 ("python-mando" ,python-mando-0.3.1)))
14910 (native-inputs
14911 `(("python-flake8" ,python-flake8)
14912 ("python-tox" ,python-tox)
14913 ("python-pytest" ,python-pytest)
14914 ("python-paramunittest" ,python-paramunittest)))
14915 (home-page "https://radon.readthedocs.org/")
14916 (synopsis "Code Metrics in Python")
14917 (description "Radon is a Python tool which computes various code metrics.
14918 Supported metrics are:
14919 @itemize @bullet
14920 @item raw metrics: SLOC, comment lines, blank lines, &c.
14921 @item Cyclomatic Complexity (i.e. McCabe’s Complexity)
14922 @item Halstead metrics (all of them)
14923 @item the Maintainability Index (a Visual Studio metric)
14924 @end itemize")
14925 (license license:expat)))
14926
14927 (define-public python2-radon
14928 (package-with-python2 python-radon))
14929
14930 (define-public python-sure
14931 (package
14932 (name "python-sure")
14933 (version "1.4.6")
14934 (source
14935 (origin
14936 (method url-fetch)
14937 (uri (pypi-uri "sure" version))
14938 (sha256
14939 (base32
14940 "1iyqsy2d6radi88g1qf0lziy5b39h5cpb3g5jiqyb4xi46ig3x1z"))))
14941 (build-system python-build-system)
14942 (propagated-inputs
14943 `(("python-mock" ,python-mock)
14944 ("python-six" ,python-six)))
14945 (native-inputs
14946 `(("python-nose" ,python-nose)))
14947 (home-page "https://github.com/gabrielfalcao/sure")
14948 (synopsis "Automated testing library in python for python")
14949 (description
14950 "Sure is a python library that leverages a DSL for writing assertions.
14951 Sure is heavily inspired by @code{RSpec Expectations} and @code{should.js}.")
14952 (license license:gpl3+)))
14953
14954 (define-public python2-sure
14955 (package-with-python2 python-sure))
14956
14957 (define-public python2-couleur
14958 ;; This package does not seem to support python3 at all, hence,
14959 ;; only the python2 variant definition is provided.
14960 (package
14961 (name "python2-couleur")
14962 (version "0.6.2")
14963 (source
14964 (origin
14965 (method url-fetch)
14966 (uri (pypi-uri "couleur" version))
14967 (sha256
14968 (base32
14969 "1qqaxyqz74wvid0cr119dhcwz0h0if5b5by44zl49pd5z65v58k1"))))
14970 (build-system python-build-system)
14971 (arguments
14972 `(#:python ,python-2))
14973 (home-page "https://github.com/gabrielfalcao/couleur")
14974 (synopsis
14975 "ANSI terminal tool for python, colored shell and other handy fancy features")
14976 (description
14977 "@code{Couleur} provides python programs a way to use the ANSI features in a unix
14978 terminal such as coloured output in the shell, overwriting output, indentation, etc.")
14979 ;; README.md says ASL2.0, but all source code headers are LGPL3+.
14980 ;; https://github.com/gabrielfalcao/couleur/issues/11
14981 (license license:lgpl3+)))
14982
14983 (define-public python-misaka
14984 (package
14985 (name "python-misaka")
14986 (version "2.1.0")
14987 (source
14988 (origin
14989 (method url-fetch)
14990 (uri (pypi-uri "misaka" version))
14991 (sha256
14992 (base32
14993 "1yqrq3a5rracirmvk52n28nn6ckdaz897gnigv89a9gmyn87sqw7"))))
14994 (build-system python-build-system)
14995 (arguments
14996 `(;; Line 37 of setup.py calls self.run_command('develop')
14997 ;; in the 'check' phase. This command seems to be trying
14998 ;; to write to
14999 ;; /gnu/store/...-python-<version>/lib/python<version>/site-packages/
15000 ;; for which it does not have the permission to write.
15001 #:tests? #f))
15002 (propagated-inputs
15003 `(("python-cffi" ,python-cffi)))
15004 (home-page "https://github.com/FSX/misaka")
15005 (synopsis "Python binding for Hoedown")
15006 (description
15007 "@code{Misaka} is a CFFI-based binding for @code{Hoedown}, a fast markdown processing
15008 library written in C. It features a fast HTML renderer and functionality to make custom
15009 renderers (e.g. man pages or LaTeX).")
15010 (license license:expat)))
15011
15012 (define-public python2-misaka
15013 (package-with-python2 python-misaka))
15014
15015 (define-public python2-steadymark
15016 ;; This is forced into being a python2 only variant
15017 ;; due to its dependence on couleur that has no support
15018 ;; for python3
15019 (package
15020 (name "python2-steadymark")
15021 (version "0.7.3")
15022 (source
15023 (origin
15024 (method url-fetch)
15025 (uri (pypi-uri "steadymark" version))
15026 (sha256
15027 (base32
15028 "1640i9g8dycql3cc8j0bky0jkzj0q39blfbp4lsgpkprkfgcdk8v"))))
15029 (build-system python-build-system)
15030 (native-inputs
15031 `(("python-couleur" ,python2-couleur)
15032 ("python-sure" ,python2-sure)
15033 ("python-misaka" ,python2-misaka)))
15034 (arguments
15035 `(#:python ,python-2
15036 #:phases
15037 (modify-phases %standard-phases
15038 (add-before 'build 'patch-setup-py
15039 (lambda _
15040 ;; Update requirements from dependency==version
15041 ;; to dependency>=version
15042 (substitute* "setup.py"
15043 (("==") ">="))
15044 #t)))))
15045 (home-page "https://github.com/gabrielfalcao/steadymark")
15046 (synopsis "Markdown-based test runner for python")
15047 (description
15048 "@code{Steadymark} allows documentation to be written in github-flavoured
15049 markdown. The documentation may contain snippets of code surrounded by python
15050 code blocks and @code{Steadymark} will find these snippets and run them, making
15051 sure that there are no old malfunctional examples in the documentation examples.")
15052 (license license:expat)))
15053
15054 (define-public python-nose-randomly
15055 (package
15056 (name "python-nose-randomly")
15057 (version "1.2.5")
15058 (source
15059 (origin
15060 (method url-fetch)
15061 (uri (pypi-uri "nose-randomly" version))
15062 (sha256
15063 (base32
15064 "1cw9dlr1zh3w4i438kin7z0rm8092ki52hayisyc43h9pcplq7rn"))))
15065 (build-system python-build-system)
15066 (native-inputs
15067 `(("python-nose" ,python-nose)
15068 ("python-numpy" ,python-numpy)))
15069 (home-page "https://github.com/adamchainz/nose-randomly")
15070 (synopsis
15071 "Nose plugin to randomly order tests and control random.seed")
15072 (description
15073 "This is a @code{Nose} plugin to randomly order tests which can be quite
15074 powerful in discovering hidden flaws in the tests themselves, while helping to
15075 reduce inter-test dependencies. It also helps in controlling @code{random.seed},
15076 by resetting it to a repeatable number for each test, enabling the tests to
15077 create data based on random numbers and yet remain repeatable.")
15078 (license license:bsd-3)))
15079
15080 (define-public python2-nose-randomly
15081 (package-with-python2 python-nose-randomly))
15082
15083 (define-public python-jsonpointer
15084 (package
15085 (name "python-jsonpointer")
15086 (version "1.10")
15087 (source
15088 (origin
15089 (method url-fetch)
15090 (uri (pypi-uri "jsonpointer" version))
15091 (sha256
15092 (base32
15093 "1cg0gvgqjysydv6p45v4jywg1jb3v48c7m3cbpi57zgf6nndr9cz"))))
15094 (build-system python-build-system)
15095 (home-page "https://github.com/stefankoegl/python-json-pointer")
15096 (synopsis "Identify specific nodes in a JSON document")
15097 (description "@code{jsonpointer} allows you to access specific nodes
15098 by path in a JSON document (see RFC 6901).")
15099 (license license:bsd-3)))
15100
15101 (define-public python2-jsonpointer
15102 (package-with-python2 python-jsonpointer))
15103
15104 (define-public python-rfc3987
15105 (package
15106 (name "python-rfc3987")
15107 (version "1.3.7")
15108 (source
15109 (origin
15110 (method url-fetch)
15111 (uri (pypi-uri "rfc3987" version))
15112 (sha256
15113 (base32
15114 "192pclzs2y0yaywqkrlvd0x73740q310kvqvm6jldhi619mq59wi"))))
15115 (build-system python-build-system)
15116 (home-page "http://pypi.python.org/pypi/rfc3987")
15117 (synopsis "Parsing and validation of URIs (RFC 3986) and IRIs (RFC 3987)")
15118 (description "@code{rfc3987} provides routines for parsing and
15119 validation of URIs (see RFC 3986) and IRIs (see RFC 3987).")
15120 (license license:gpl3+)))
15121
15122 (define-public python2-rfc3987
15123 (package-with-python2 python-rfc3987))
15124
15125 (define-public python-validate-email
15126 (package
15127 (name "python-validate-email")
15128 (version "1.3")
15129 (source
15130 (origin
15131 (method url-fetch)
15132 (uri (pypi-uri "validate_email" version))
15133 (sha256
15134 (base32
15135 "1bxffaf5yz2cph8ki55vdvdypbwkvn2xr1firlcy62vqbzf1jivq"))))
15136 (build-system python-build-system)
15137 (home-page "http://github.com/syrusakbary/validate_email")
15138 (synopsis "Verifies if an email address is valid and really exists")
15139 (description "@code{validate_email} can be used to verify if an email
15140 address is valid and really exists.")
15141 (license license:lgpl3+)))
15142
15143 (define-public python2-validate-email
15144 (package-with-python2 python-validate-email))
15145
15146 (define-public python-flex
15147 (package
15148 (name "python-flex")
15149 (version "6.10.0")
15150 (source
15151 (origin
15152 (method url-fetch)
15153 (uri (pypi-uri "flex" version))
15154 (sha256
15155 (base32
15156 "00pamnwla3khk8nyla7y28dq9jnh69swd7f4jfsl7sn1izs8n8zk"))))
15157 (build-system python-build-system)
15158 (propagated-inputs
15159 `(("python-click" ,python-click)
15160 ("python-iso8601" ,python-iso8601)
15161 ("python-jsonpointer" ,python-jsonpointer)
15162 ("python-pyyaml" ,python-pyyaml)
15163 ("python-requests" ,python-requests)
15164 ("python-rfc3987" ,python-rfc3987)
15165 ("python-six" ,python-six)
15166 ("python-validate-email" ,python-validate-email)))
15167 (home-page "https://github.com/pipermerriam/flex")
15168 (synopsis "Validates Swagger schemata")
15169 (description "@code{flex} can be used to validate Swagger schemata.")
15170 (license license:bsd-3)))
15171
15172 (define-public python2-flex
15173 (package-with-python2 python-flex))
15174
15175 (define-public python-marshmallow
15176 (package
15177 (name "python-marshmallow")
15178 (version "3.0.0b2")
15179 (source
15180 (origin
15181 (method url-fetch)
15182 (uri (pypi-uri "marshmallow" version))
15183 (sha256
15184 (base32
15185 "11bnpvfdbczr74177p295zbkdrax2cahvbj5bqhhlprgz2xxi5d9"))))
15186 (build-system python-build-system)
15187 (propagated-inputs
15188 `(("python-dateutil" ,python-dateutil)
15189 ("python-simplejson" ,python-simplejson)))
15190 (native-inputs
15191 `(("python-pytest-3.0" ,python-pytest-3.0)
15192 ("python-pytz" ,python-pytz)))
15193 (home-page "https://github.com/marshmallow-code/marshmallow")
15194 (synopsis "Convert complex datatypes to and from native
15195 Python datatypes.")
15196 (description "@code{marshmallow} provides a library for converting
15197 complex datatypes to and from native Python datatypes.")
15198 (license license:expat)))
15199
15200 (define-public python2-marshmallow
15201 (package-with-python2 python-marshmallow))
15202
15203 (define-public python-bottle
15204 (package
15205 (name "python-bottle")
15206 (version "0.12.13")
15207 (source
15208 (origin
15209 (method url-fetch)
15210 (uri (pypi-uri "bottle" version))
15211 (sha256
15212 (base32
15213 "0m9k2a7yxvggc4kw8fsvj381vgsvfcdshg5nzy6vwrxiw2p53drr"))))
15214 (build-system python-build-system)
15215 (home-page "http://bottlepy.org/")
15216 (synopsis "WSGI framework for small web-applications.")
15217 (description "@code{python-bottle} is a WSGI framework for small web-applications.")
15218 (license license:expat)))
15219
15220 (define-public python2-bottle
15221 (package-with-python2 python-bottle))
15222
15223 (define-public python-apispec
15224 (package
15225 (name "python-apispec")
15226 (version "0.22.0")
15227 (source
15228 (origin
15229 (method url-fetch)
15230 (uri (pypi-uri "apispec" version))
15231 (sha256
15232 (base32
15233 "0y3jxmgp2d24am3hxl40f5rw9abb0r8037sagax3dv64h4n1azwq"))))
15234 (build-system python-build-system)
15235 (propagated-inputs
15236 `(("python-pyyaml" ,python-pyyaml)))
15237 (native-inputs
15238 `(("python-pytest-3.0" ,python-pytest-3.0)
15239 ("python-flask" ,python-flask)
15240 ("python-marshmallow" ,python-marshmallow)
15241 ("python-tornado" ,python-tornado)
15242 ("python-bottle" ,python-bottle)
15243 ("python-mock" ,python-mock)))
15244 (home-page "https://github.com/marshmallow-code/apispec")
15245 (synopsis "Swagger 2.0 API specification generator")
15246 (description "@code{python-apispec} is a pluggable API specification
15247 generator. Currently supports the OpenAPI specification (f.k.a.
15248 Swagger 2.0).")
15249 (license license:expat)))
15250
15251 (define-public python2-apispec
15252 (package-with-python2 python-apispec))
15253
15254 (define-public python-flasgger
15255 (package
15256 (name "python-flasgger")
15257 (version "0.6.3")
15258 (source
15259 (origin
15260 (method url-fetch)
15261 (uri (string-append "https://github.com/rochacbruno/flasgger/archive/"
15262 version ".tar.gz"))
15263 (file-name (string-append name "-" version ".tar.gz"))
15264 (sha256
15265 (base32
15266 "1gqzlm0rb55fdpsy5ipkganlx9cnpi454fqyycr03jm22zql14ay"))))
15267 (build-system python-build-system)
15268 (arguments
15269 `(#:phases
15270 (modify-phases %standard-phases
15271 (replace 'check
15272 (lambda* (#:key inputs outputs #:allow-other-keys)
15273 (substitute* "Makefile"
15274 (("flake8 flasgger --ignore=F403")
15275 "flake8 flasgger --ignore=E731,F403"))
15276 (setenv "PYTHONPATH" (string-append (getcwd)
15277 ":"
15278 (getenv "PYTHONPATH")))
15279 (zero? (system* "py.test")))))))
15280 (propagated-inputs
15281 `(("python-flask" ,python-flask)
15282 ("python-pyyaml" ,python-pyyaml)
15283 ("python-jsonschema" ,python-jsonschema)
15284 ("python-mistune" ,python-mistune)
15285 ("python-six" ,python-six)))
15286 (native-inputs
15287 `(("python-decorator" ,python-decorator)
15288 ("python-flake8" ,python-flake8)
15289 ("python-flask-restful" ,python-flask-restful)
15290 ("python-flex" ,python-flex)
15291 ("python-pytest-3.0" ,python-pytest-3.0)
15292 ("python-pytest-cov" ,python-pytest-cov)
15293 ("python-marshmallow" ,python-marshmallow)
15294 ("python-apispec" ,python-apispec)))
15295 (home-page "https://github.com/rochacbruno/flasgger/")
15296 (synopsis "Extract Swagger specs from your Flask project")
15297 (description "@code{python-flasgger} allows extracting Swagger specs
15298 from your Flask project. It is a fork of Flask-Swagger.")
15299 (license license:expat)))
15300
15301 (define-public python2-flasgger
15302 (package-with-python2 python-flasgger))
15303
15304 (define-public python-swagger-spec-validator
15305 (package
15306 (name "python-swagger-spec-validator")
15307 (version "2.1.0")
15308 (source
15309 (origin
15310 (method url-fetch)
15311 (uri (pypi-uri "swagger-spec-validator" version))
15312 (sha256
15313 (base32
15314 "13hkpn2lycwr0468yqhjb3kwszqf7hjwlq61w7vdxq1caz31k4nw"))))
15315 (build-system python-build-system)
15316 (propagated-inputs
15317 `(("python-jsonschema" ,python-jsonschema)
15318 ("python-six" ,python-six)))
15319 (home-page
15320 "http://github.com/Yelp/swagger_spec_validator")
15321 (synopsis "Validation of Swagger specifications")
15322 (description "@code{swagger_spec_validator} provides a library for
15323 validating Swagger API specifications.")
15324 (license license:asl2.0)))
15325
15326 (define-public python2-swagger-spec-validator
15327 (package-with-python2 python-swagger-spec-validator))
15328
15329 (define-public python-apache-libcloud
15330 (package
15331 (name "python-apache-libcloud")
15332 (version "2.0.0")
15333 (source
15334 (origin
15335 (method url-fetch)
15336 (uri (pypi-uri "apache-libcloud" version))
15337 (sha256
15338 (base32
15339 "1a71z02ckcxld72k4qgmdnkjan52c4wczncs3p2mp5yafh7dsan7"))))
15340 (build-system python-build-system)
15341 (arguments
15342 `(#:phases
15343 (modify-phases %standard-phases
15344 (add-after 'unpack 'patch-ssh
15345 (lambda* (#:key inputs #:allow-other-keys)
15346 (substitute* "libcloud/compute/ssh.py"
15347 (("'ssh'") (string-append "'" (assoc-ref inputs "openssh")
15348 "/bin/ssh" "'")))
15349 #t))
15350 (add-after 'unpack 'patch-tests
15351 (lambda _
15352 (substitute* "./libcloud/test/test_file_fixtures.py"
15353 ;; See <https://issues.apache.org/jira/browse/LIBCLOUD-923>.
15354 (("def _ascii") "def _raw_data(self, method, url, body, headers):
15355 return (httplib.OK,
15356 \"1234abcd\",
15357 {\"test\": \"value\"},
15358 httplib.responses[httplib.OK])
15359 def _ascii"))
15360 (substitute* "libcloud/test/compute/test_ssh_client.py"
15361 (("class ShellOutSSHClientTests")
15362 "@unittest.skip(\"Guix container doesn't have ssh service\")
15363 class ShellOutSSHClientTests")
15364 ;; See <https://issues.apache.org/jira/browse/LIBCLOUD-924>.
15365 (("'.xf0.x90.x8d.x88'") "b'\\xF0\\x90\\x8D\\x88'")
15366 (("'.xF0', '.x90', '.x8D', '.x88'")
15367 "b'\\xF0', b'\\x90', b'\\x8D', b'\\x88'"))
15368 #t)))))
15369 (inputs
15370 `(("openssh" ,openssh)))
15371 (propagated-inputs
15372 `(("python-paramiko" ,python-paramiko)
15373 ("python-requests" ,python-requests)))
15374 (native-inputs
15375 `(("python-lockfile" ,python-lockfile)
15376 ("python-mock" ,python-mock)
15377 ("python-requests-mock" ,python-requests-mock)))
15378 (home-page "https://libcloud.apache.org/")
15379 (synopsis "Unified Cloud API")
15380 (description "@code{libcloud} is a Python library for interacting with
15381 many of the popular cloud service providers using a unified API.")
15382 (license license:asl2.0)))
15383
15384 (define-public python2-apache-libcloud
15385 (package-with-python2 python-apache-libcloud))