gnu: python-cryptography-vectors: Update to 2.0.3.
[jackhill/guix/guix.git] / gnu / packages / python.scm
1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2013 Nikita Karetnikov <nikita@karetnikov.org>
3 ;;; Copyright © 2013, 2014, 2015, 2016, 2017 Ludovic Courtès <ludo@gnu.org>
4 ;;; Copyright © 2013, 2014, 2015, 2016 Andreas Enge <andreas@enge.fr>
5 ;;; Copyright © 2014, 2015 Mark H Weaver <mhw@netris.org>
6 ;;; Copyright © 2014, 2017 Eric Bavier <bavier@member.fsf.org>
7 ;;; Copyright © 2014, 2015 Federico Beffa <beffa@fbengineering.ch>
8 ;;; Copyright © 2015 Omar Radwan <toxemicsquire4@gmail.com>
9 ;;; Copyright © 2015 Pierre-Antoine Rault <par@rigelk.eu>
10 ;;; Copyright © 2015, 2016, 2017 Ricardo Wurmus <rekado@elephly.net>
11 ;;; Copyright © 2015, 2016 Christopher Allan Webber <cwebber@dustycloud.org>
12 ;;; Copyright © 2015 Eric Dvorsak <eric@dvorsak.fr>
13 ;;; Copyright © 2015, 2016 David Thompson <davet@gnu.org>
14 ;;; Copyright © 2015, 2016, 2017 Leo Famulari <leo@famulari.name>
15 ;;; Copyright © 2015 Ben Woodcroft <donttrustben@gmail.com>
16 ;;; Copyright © 2015, 2016 Erik Edrosa <erik.edrosa@gmail.com>
17 ;;; Copyright © 2015, 2016, 2017 Efraim Flashner <efraim@flashner.co.il>
18 ;;; Copyright © 2015 Kyle Meyer <kyle@kyleam.com>
19 ;;; Copyright © 2015, 2016 Chris Marusich <cmmarusich@gmail.com>
20 ;;; Copyright © 2016 Danny Milosavljevic <dannym+a@scratchpost.org>
21 ;;; Copyright © 2016 Lukas Gradl <lgradl@openmailbox.org>
22 ;;; Copyright © 2016 Hartmut Goebel <h.goebel@crazy-compilers.com>
23 ;;; Copyright © 2016 Daniel Pimentel <d4n1@d4n1.org>
24 ;;; Copyright © 2016 Sou Bunnbu <iyzsong@gmail.com>
25 ;;; Copyright © 2016 Troy Sankey <sankeytms@gmail.com>
26 ;;; Copyright © 2016, 2017 ng0 <contact.ng0@cryptolab.net>
27 ;;; Copyright © 2016 Dylan Jeffers <sapientech@sapientech@openmailbox.org>
28 ;;; Copyright © 2016 David Craven <david@craven.ch>
29 ;;; Copyright © 2016, 2017 Marius Bakke <mbakke@fastmail.com>
30 ;;; Copyright © 2016, 2017 Stefan Reichör <stefan@xsteve.at>
31 ;;; Copyright © 2016 Dylan Jeffers <sapientech@sapientech@openmailbox.org>
32 ;;; Copyright © 2016 Alex Vong <alexvong1995@gmail.com>
33 ;;; Copyright © 2016, 2017 Arun Isaac <arunisaac@systemreboot.net>
34 ;;; Copyright © 2016, 2017 Julien Lepiller <julien@lepiller.eu>
35 ;;; Copyright © 2016, 2017 Tobias Geerinckx-Rice <me@tobias.gr>
36 ;;; Copyright © 2016, 2017 Thomas Danckaert <post@thomasdanckaert.be>
37 ;;; Copyright © 2017 Carlo Zancanaro <carlo@zancanaro.id.au>
38 ;;; Copyright © 2017 Frederick M. Muriithi <fredmanglis@gmail.com>
39 ;;; Copyright © 2017 Adriano Peluso <catonano@gmail.com>
40 ;;; Copyright © 2017 Ben Sturmfels <ben@sturm.com.au>
41 ;;; Copyright © 2017 Mathieu Othacehe <m.othacehe@gmail.com>
42 ;;; Copyright © 2017 José Miguel Sánchez García <jmi2k@openmailbox.org>
43 ;;; Copyright © 2017 Roel Janssen <roel@gnu.org>
44 ;;; Copyright © 2017 Kei Kebreau <kei@openmailbox.org>
45 ;;; Copyright © 2017 Rutger Helling <rhelling@mykolab.com>
46 ;;; Copyright © 2017 Muriithi Frederick Muriuki <fredmanglis@gmail.com>
47 ;;;
48 ;;; This file is part of GNU Guix.
49 ;;;
50 ;;; GNU Guix is free software; you can redistribute it and/or modify it
51 ;;; under the terms of the GNU General Public License as published by
52 ;;; the Free Software Foundation; either version 3 of the License, or (at
53 ;;; your option) any later version.
54 ;;;
55 ;;; GNU Guix is distributed in the hope that it will be useful, but
56 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
57 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
58 ;;; GNU General Public License for more details.
59 ;;;
60 ;;; You should have received a copy of the GNU General Public License
61 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
62
63 (define-module (gnu packages python)
64 #:use-module ((guix licenses) #:prefix license:)
65 #:use-module (gnu packages)
66 #:use-module (gnu packages algebra)
67 #:use-module (gnu packages adns)
68 #:use-module (gnu packages attr)
69 #:use-module (gnu packages backup)
70 #:use-module (gnu packages bash)
71 #:use-module (gnu packages compression)
72 #:use-module (gnu packages crypto)
73 #:use-module (gnu packages databases)
74 #:use-module (gnu packages django)
75 #:use-module (gnu packages file)
76 #:use-module (gnu packages fontutils)
77 #:use-module (gnu packages gcc)
78 #:use-module (gnu packages ghostscript)
79 #:use-module (gnu packages gl)
80 #:use-module (gnu packages glib)
81 #:use-module (gnu packages graphviz)
82 #:use-module (gnu packages gstreamer)
83 #:use-module (gnu packages gtk)
84 #:use-module (gnu packages icu4c)
85 #:use-module (gnu packages image)
86 #:use-module (gnu packages imagemagick)
87 #:use-module (gnu packages libevent)
88 #:use-module (gnu packages libffi)
89 #:use-module (gnu packages linux)
90 #:use-module (gnu packages man)
91 #:use-module (gnu packages maths)
92 #:use-module (gnu packages multiprecision)
93 #:use-module (gnu packages networking)
94 #:use-module (gnu packages ncurses)
95 #:use-module (gnu packages openstack)
96 #:use-module (gnu packages password-utils)
97 #:use-module (gnu packages pcre)
98 #:use-module (gnu packages perl)
99 #:use-module (gnu packages pkg-config)
100 #:use-module (gnu packages protobuf)
101 #:use-module (gnu packages qt)
102 #:use-module (gnu packages readline)
103 #:use-module (gnu packages sdl)
104 #:use-module (gnu packages search)
105 #:use-module (gnu packages shells)
106 #:use-module (gnu packages ssh)
107 #:use-module (gnu packages statistics)
108 #:use-module (gnu packages tex)
109 #:use-module (gnu packages texinfo)
110 #:use-module (gnu packages tls)
111 #:use-module (gnu packages version-control)
112 #:use-module (gnu packages video)
113 #:use-module (gnu packages web)
114 #:use-module (gnu packages base)
115 #:use-module (gnu packages xml)
116 #:use-module (gnu packages xorg)
117 #:use-module (gnu packages xdisorg)
118 #:use-module (gnu packages tcl)
119 #:use-module (gnu packages bdw-gc)
120 #:use-module (guix packages)
121 #:use-module (guix download)
122 #:use-module (guix git-download)
123 #:use-module (guix utils)
124 #:use-module (guix build-system gnu)
125 #:use-module (guix build-system cmake)
126 #:use-module (guix build-system python)
127 #:use-module (guix build-system trivial)
128 #:use-module (srfi srfi-1))
129
130 (define-public python-2.7
131 (package
132 (name "python")
133 (version "2.7.13")
134 (source
135 (origin
136 (method url-fetch)
137 (uri (string-append "https://www.python.org/ftp/python/"
138 version "/Python-" version ".tar.xz"))
139 (sha256
140 (base32
141 "0cgpk3zk0fgpji59pb4zy9nzljr70qzgv1vpz5hq5xw2d2c47m9m"))
142 (patches (search-patches "python-2.7-search-paths.patch"
143 "python-2-deterministic-build-info.patch"
144 "python-2.7-site-prefixes.patch"
145 "python-2.7-source-date-epoch.patch"
146 "python-2.7-getentropy-on-old-kernels.patch"))
147 (modules '((guix build utils)))
148 ;; suboptimal to delete failing tests here, but if we delete them in the
149 ;; arguments then we need to make sure to strip out that phase when it
150 ;; gets inherited by python and python-minimal.
151 (snippet
152 '(begin
153 (for-each delete-file
154 '("Lib/test/test_compileall.py"
155 "Lib/test/test_ctypes.py" ; fails on mips64el
156 "Lib/test/test_distutils.py"
157 "Lib/test/test_import.py"
158 "Lib/test/test_shutil.py"
159 "Lib/test/test_socket.py"
160 "Lib/test/test_subprocess.py"))
161 #t))))
162 (outputs '("out"
163 "tk")) ;tkinter; adds 50 MiB to the closure
164 (build-system gnu-build-system)
165 (arguments
166 `(;; 356 tests OK.
167 ;; 6 tests failed:
168 ;; test_compileall test_distutils test_import test_shutil test_socket
169 ;; test_subprocess
170 ;; 39 tests skipped:
171 ;; test_aepack test_al test_applesingle test_bsddb test_bsddb185
172 ;; test_bsddb3 test_cd test_cl test_codecmaps_cn test_codecmaps_hk
173 ;; test_codecmaps_jp test_codecmaps_kr test_codecmaps_tw test_curses
174 ;; test_dl test_gdb test_gl test_imageop test_imgfile test_ioctl
175 ;; test_kqueue test_linuxaudiodev test_macos test_macostools
176 ;; test_msilib test_ossaudiodev test_scriptpackages test_smtpnet
177 ;; test_socketserver test_startfile test_sunaudiodev test_timeout
178 ;; test_tk test_ttk_guionly test_urllib2net test_urllibnet
179 ;; test_winreg test_winsound test_zipfile64
180 ;; 4 skips unexpected on linux2:
181 ;; test_bsddb test_bsddb3 test_gdb test_ioctl
182 #:test-target "test"
183 #:configure-flags
184 (list "--enable-shared" ;allow embedding
185 "--with-system-ffi" ;build ctypes
186 "--with-ensurepip=install" ;install pip and setuptools
187 "--enable-unicode=ucs4"
188 (string-append "LDFLAGS=-Wl,-rpath="
189 (assoc-ref %outputs "out") "/lib"))
190
191 #:modules ((ice-9 ftw) (ice-9 match)
192 (guix build utils) (guix build gnu-build-system))
193 #:phases
194 (modify-phases %standard-phases
195 (add-before
196 'configure 'patch-lib-shells
197 (lambda _
198 ;; Filter for existing files, since some may not exist in all
199 ;; versions of python that are built with this recipe.
200 (substitute* (filter file-exists?
201 '("Lib/subprocess.py"
202 "Lib/popen2.py"
203 "Lib/distutils/tests/test_spawn.py"
204 "Lib/test/test_subprocess.py"))
205 (("/bin/sh") (which "sh")))
206
207 ;; Use zero as the timestamp in .pyc files so that builds are
208 ;; deterministic. TODO: Remove it when this variable is set in
209 ;; gnu-build-system.scm.
210 (setenv "SOURCE_DATE_EPOCH" "1")
211 #t))
212 (add-before 'configure 'do-not-record-configure-flags
213 (lambda* (#:key configure-flags #:allow-other-keys)
214 ;; Remove configure flags from the installed '_sysconfigdata.py'
215 ;; and 'Makefile' so we don't end up keeping references to the
216 ;; build tools.
217 ;;
218 ;; Preserve at least '--with-system-ffi' since otherwise the
219 ;; thing tries to build libffi, fails, and we end up with a
220 ;; Python that lacks ctypes.
221 (substitute* "configure"
222 (("^CONFIG_ARGS=.*$")
223 (format #f "CONFIG_ARGS='~a'\n"
224 (if (member "--with-system-ffi" configure-flags)
225 "--with-system-ffi"
226 ""))))
227 #t))
228 (add-before
229 'check 'pre-check
230 (lambda _
231 ;; 'Lib/test/test_site.py' needs a valid $HOME
232 (setenv "HOME" (getcwd))
233 #t))
234 (add-after
235 'unpack 'set-source-file-times-to-1980
236 ;; XXX One of the tests uses a ZIP library to pack up some of the
237 ;; source tree, and fails with "ZIP does not support timestamps
238 ;; before 1980". Work around this by setting the file times in the
239 ;; source tree to sometime in early 1980.
240 (lambda _
241 (let ((circa-1980 (* 10 366 24 60 60)))
242 (ftw "." (lambda (file stat flag)
243 (utime file circa-1980 circa-1980)
244 #t))
245 #t)))
246 (add-after 'install 'remove-tests
247 ;; Remove 25 MiB of unneeded unit tests. Keep test_support.*
248 ;; because these files are used by some libraries out there.
249 (lambda* (#:key outputs #:allow-other-keys)
250 (let ((out (assoc-ref outputs "out")))
251 (match (scandir (string-append out "/lib")
252 (lambda (name)
253 (string-prefix? "python" name)))
254 ((pythonX.Y)
255 (let ((testdir (string-append out "/lib/" pythonX.Y
256 "/test")))
257 (with-directory-excursion testdir
258 (for-each delete-file-recursively
259 (scandir testdir
260 (match-lambda
261 ((or "." "..") #f)
262 (file
263 (not
264 (string-prefix? "test_support."
265 file))))))
266 (call-with-output-file "__init__.py" (const #t))
267 #t)))))))
268 (add-before 'strip 'make-libraries-writable
269 (lambda* (#:key outputs #:allow-other-keys)
270 ;; Make .so files writable so they can be stripped.
271 (let ((out (assoc-ref outputs "out")))
272 (for-each (lambda (file)
273 (chmod file #o755))
274 (find-files (string-append out "/lib")
275 "\\.so"))
276 #t)))
277 (add-after 'install 'move-tk-inter
278 (lambda* (#:key outputs #:allow-other-keys)
279 ;; When Tkinter support is built move it to a separate output so
280 ;; that the main output doesn't contain a reference to Tcl/Tk.
281 (let ((out (assoc-ref outputs "out"))
282 (tk (assoc-ref outputs "tk")))
283 (when tk
284 (match (find-files out "tkinter.*\\.so")
285 ((tkinter.so)
286 ;; The .so is in OUT/lib/pythonX.Y/lib-dynload, but we
287 ;; want it under TK/lib/pythonX.Y/site-packages.
288 (let* ((len (string-length out))
289 (target (string-append
290 tk "/"
291 (string-drop
292 (dirname (dirname tkinter.so))
293 len)
294 "/site-packages")))
295 (install-file tkinter.so target)
296 (delete-file tkinter.so)))))
297 #t))))))
298 (inputs
299 `(("bzip2" ,bzip2)
300 ("gdbm" ,gdbm)
301 ("libffi" ,libffi) ; for ctypes
302 ("sqlite" ,sqlite) ; for sqlite extension
303 ("openssl" ,openssl)
304 ("readline" ,readline)
305 ("zlib" ,zlib)
306 ("tcl" ,tcl)
307 ("tk" ,tk))) ; for tkinter
308 (native-inputs
309 `(("pkg-config" ,pkg-config)))
310 (native-search-paths
311 (list (search-path-specification
312 (variable "PYTHONPATH")
313 (files '("lib/python2.7/site-packages")))))
314 (home-page "https://www.python.org")
315 (synopsis "High-level, dynamically-typed programming language")
316 (description
317 "Python is a remarkably powerful dynamic programming language that
318 is used in a wide variety of application domains. Some of its key
319 distinguishing features include: clear, readable syntax; strong
320 introspection capabilities; intuitive object orientation; natural
321 expression of procedural code; full modularity, supporting hierarchical
322 packages; exception-based error handling; and very high level dynamic
323 data types.")
324 (license license:psfl)))
325
326 ;; Current 2.x version.
327 (define-public python-2 python-2.7)
328
329 (define-public python-3.5
330 (package (inherit python-2)
331 (version "3.5.3")
332 (source (origin
333 (method url-fetch)
334 (uri (string-append "https://www.python.org/ftp/python/"
335 version "/Python-" version ".tar.xz"))
336 (patches (search-patches
337 "python-fix-tests.patch"
338 "python-3.5-fix-tests.patch"
339 "python-3.5-getentropy-on-old-kernels.patch"
340 "python-3-deterministic-build-info.patch"
341 "python-3-search-paths.patch"))
342 (patch-flags '("-p0"))
343 (sha256
344 (base32
345 "1c6v1n9nz4mlx9mw1125fxpmbrgniqdbbx9hnqx44maqazb2mzpf"))
346 (snippet
347 '(delete-file
348 "Lib/ctypes/test/test_win32.py")))) ; fails on aarch64
349 (arguments (substitute-keyword-arguments (package-arguments python-2)
350 ((#:tests? _) #t)))
351 (native-search-paths
352 (list (search-path-specification
353 (variable "PYTHONPATH")
354 (files (list (string-append "lib/python"
355 (version-major+minor version)
356 "/site-packages"))))))))
357
358 ;; Current 3.x version.
359 (define-public python-3 python-3.5)
360
361 ;; Current major version.
362 (define-public python python-3)
363
364 ;; Minimal variants of Python, mostly used to break the cycle between Tk and
365 ;; Python (Tk -> libxcb -> Python.)
366
367 (define-public python2-minimal
368 (package (inherit python-2)
369 (name "python-minimal")
370 (outputs '("out"))
371
372 ;; Keep zlib, which is used by 'pip' (via the 'zipimport' module), which
373 ;; is invoked upon 'make install'. 'pip' also expects 'ctypes' and thus
374 ;; libffi.
375 (inputs `(("libffi" ,libffi)
376 ("zlib" ,zlib)))))
377
378 (define-public python-minimal
379 (package (inherit python)
380 (name "python-minimal")
381 (outputs '("out"))
382
383 ;; Build fails due to missing ctypes without libffi.
384 ;; OpenSSL is a mandatory dependency of Python 3.x, for urllib;
385 ;; zlib is required by 'zipimport', used by pip.
386 (inputs `(("libffi" ,libffi)
387 ("openssl" ,openssl)
388 ("zlib" ,zlib)))))
389
390 (define* (wrap-python3 python
391 #:optional
392 (name (string-append (package-name python) "-wrapper")))
393 (package (inherit python)
394 (name name)
395 (source #f)
396 (build-system trivial-build-system)
397 (outputs '("out"))
398 (inputs `(("bash" ,bash)))
399 (propagated-inputs `(("python" ,python)))
400 (arguments
401 `(#:modules ((guix build utils))
402 #:builder
403 (begin
404 (use-modules (guix build utils))
405 (let ((bin (string-append (assoc-ref %outputs "out") "/bin"))
406 (python (string-append (assoc-ref %build-inputs "python") "/bin/")))
407 (mkdir-p bin)
408 (for-each
409 (lambda (old new)
410 (symlink (string-append python old)
411 (string-append bin "/" new)))
412 `("python3" ,"pydoc3" ,"idle3" ,"pip3")
413 `("python" ,"pydoc" ,"idle" ,"pip"))
414 ;; python-config outputs search paths based upon its location,
415 ;; use a bash wrapper to avoid changing its outputs.
416 (let ((bash (string-append (assoc-ref %build-inputs "bash")
417 "/bin/bash"))
418 (old (string-append python "python3-config"))
419 (new (string-append bin "/python-config")))
420 (with-output-to-file new
421 (lambda ()
422 (format #t "#!~a~%" bash)
423 (format #t "exec \"~a\" \"$@\"~%" old)
424 (chmod new #o755)
425 #t)))))))
426 (synopsis "Wrapper for the Python 3 commands")
427 (description
428 "This package provides wrappers for the commands of Python@tie{}3.x such
429 that they can be invoked under their usual name---e.g., @command{python}
430 instead of @command{python3}.")))
431
432 (define-public python-wrapper (wrap-python3 python))
433 (define-public python-minimal-wrapper (wrap-python3 python-minimal))
434
435 (define-public python-psutil
436 (package
437 (name "python-psutil")
438 (version "4.3.0")
439 (source
440 (origin
441 (method url-fetch)
442 (uri (pypi-uri "psutil" version))
443 (sha256
444 (base32
445 "1w4r09fvn6kd80m5mx4ws1wz100brkaq6hzzpwrns8cgjzjpl6c6"))))
446 (build-system python-build-system)
447 (arguments
448 ;; FIXME: some tests does not return and times out.
449 '(#:tests? #f))
450 (home-page "https://www.github.com/giampaolo/psutil")
451 (synopsis "Library for retrieving information on running processes")
452 (description
453 "psutil (Python system and process utilities) is a library for retrieving
454 information on running processes and system utilization (CPU, memory, disks,
455 network) in Python. It is useful mainly for system monitoring, profiling and
456 limiting process resources and management of running processes. It implements
457 many functionalities offered by command line tools such as: ps, top, lsof,
458 netstat, ifconfig, who, df, kill, free, nice, ionice, iostat, iotop, uptime,
459 pidof, tty, taskset, pmap.")
460 (license license:bsd-3)))
461
462 (define-public python2-psutil
463 (package-with-python2 python-psutil))
464
465 (define-public python-passlib
466 (package
467 (name "python-passlib")
468 (version "1.7.1")
469 (source
470 (origin
471 (method url-fetch)
472 (uri (pypi-uri "passlib" version))
473 (sha256
474 (base32
475 "1q2khqpj9rlcgdmkypjdq1kswvhjf72bq0zk2cv669cc2dj8z51x"))))
476 (build-system python-build-system)
477 (native-inputs
478 `(("python-nose" ,python-nose)))
479 (propagated-inputs
480 `(("python-py-bcrypt" ,python-py-bcrypt)))
481 (arguments
482 `(#:phases
483 (alist-cons-before
484 'check 'set-PYTHON_EGG_CACHE
485 ;; some tests require access to "$HOME/.cython"
486 (lambda* _ (setenv "PYTHON_EGG_CACHE" "/tmp"))
487 %standard-phases)))
488 (home-page "https://bitbucket.org/ecollins/passlib")
489 (synopsis
490 "Comprehensive password hashing framework")
491 (description
492 "Passlib is a password hashing library for Python 2 & 3, which provides
493 cross-platform implementations of over 30 password hashing algorithms, as well
494 as a framework for managing existing password hashes. It's designed to be
495 useful for a wide range of tasks, from verifying a hash found in /etc/shadow,
496 to providing full-strength password hashing for multi-user application.")
497 (license license:bsd-3)))
498
499 (define-public python2-passlib
500 (package-with-python2 python-passlib))
501
502 (define-public python-py-bcrypt
503 (package
504 (name "python-py-bcrypt")
505 (version "0.4")
506 (source
507 (origin
508 (method url-fetch)
509 (uri (string-append
510 "https://pypi.python.org/packages/source/p/py-bcrypt/py-bcrypt-"
511 version
512 ".tar.gz"))
513 (sha256
514 (base32
515 "0y6smdggwi5s72v6p1nn53dg6w05hna3d264cq6kas0lap73p8az"))))
516 (build-system python-build-system)
517 (home-page "https://code.google.com/p/py-bcrypt")
518 (synopsis
519 "Bcrypt password hashing and key derivation")
520 (description
521 "A python wrapper of OpenBSD's Blowfish password hashing code. This
522 system hashes passwords using a version of Bruce Schneier's Blowfish block
523 cipher with modifications designed to raise the cost of off-line password
524 cracking and frustrate fast hardware implementation. The computation cost of
525 the algorithm is parametised, so it can be increased as computers get faster.
526 The intent is to make a compromise of a password database less likely to
527 result in an attacker gaining knowledge of the plaintext passwords (e.g. using
528 John the Ripper).")
529 ;; "sha2.c" is under BSD-3;
530 ;; "blowfish.c" and "bcrypt.c" are under BSD-4;
531 ;; the rest is under ISC.
532 (license (list license:isc license:bsd-3 license:bsd-4))))
533
534 (define-public python2-py-bcrypt
535 (package-with-python2 python-py-bcrypt))
536
537
538 (define-public python-paramiko
539 (package
540 (name "python-paramiko")
541 (version "2.1.2")
542 (source
543 (origin
544 (method url-fetch)
545 (uri (pypi-uri "paramiko" version))
546 (sha256
547 (base32
548 "04734n0wy3hxk6rij4fr29in5jmr70nxpc7pqi2ksbjysfz4kbjz"))))
549 (build-system python-build-system)
550 (arguments
551 '(#:phases
552 (modify-phases %standard-phases
553 (replace 'check
554 (lambda _
555 (zero? (system* "python" "test.py")))))))
556 (propagated-inputs
557 `(("python-pyasn1" ,python-pyasn1)
558 ("python-cryptography" ,python-cryptography)))
559 (home-page "http://www.paramiko.org/")
560 (synopsis "SSHv2 protocol library")
561 (description "Paramiko is a python implementation of the SSHv2 protocol,
562 providing both client and server functionality. While it leverages a Python C
563 extension for low level cryptography (PyCrypto), Paramiko itself is a pure
564 Python interface around SSH networking concepts.")
565 (license license:lgpl2.1+)))
566
567 (define-public python2-paramiko
568 (package-with-python2 python-paramiko))
569
570
571 (define-public python-httplib2
572 (package
573 (name "python-httplib2")
574 (version "0.9.2")
575 (source
576 (origin
577 (method url-fetch)
578 (uri (pypi-uri "httplib2" version))
579 (sha256
580 (base32
581 "126rsryvw9vhbf3qmsfw9lf4l4xm2srmgs439lgma4cpag4s3ay3"))))
582 (build-system python-build-system)
583 (home-page "https://github.com/jcgregorio/httplib2")
584 (synopsis "Comprehensive HTTP client library")
585 (description
586 "A comprehensive HTTP client library supporting many features left out of
587 other HTTP libraries.")
588 (license license:expat)))
589
590 (define-public python2-httplib2
591 (package-with-python2 python-httplib2))
592
593 (define-public python-ecdsa
594 (package
595 (name "python-ecdsa")
596 (version "0.13")
597 (source
598 (origin
599 (method url-fetch)
600 (uri (string-append
601 "https://pypi.python.org/packages/source/e/ecdsa/ecdsa-"
602 version
603 ".tar.gz"))
604 (sha256
605 (base32
606 "1yj31j0asmrx4an9xvsaj2icdmzy6pw0glfpqrrkrphwdpi1xkv4"))))
607 (build-system python-build-system)
608 (inputs
609 `(("openssl" ,openssl)))
610 (home-page
611 "https://github.com/warner/python-ecdsa")
612 (synopsis
613 "ECDSA cryptographic signature library (pure python)")
614 (description
615 "This is an easy-to-use implementation of ECDSA cryptography (Elliptic
616 Curve Digital Signature Algorithm), implemented purely in Python. With this
617 library, you can quickly create keypairs (signing key and verifying key), sign
618 messages, and verify the signatures. The keys and signatures are very short,
619 making them easy to handle and incorporate into other protocols.")
620 (license license:expat)))
621
622 (define-public python2-ecdsa
623 (package-with-python2 python-ecdsa))
624
625 (define-public python-ccm
626 (package
627 (name "python-ccm")
628 (version "2.1.6")
629 (source
630 (origin
631 (method url-fetch)
632 (uri (pypi-uri "ccm" version))
633 (sha256
634 (base32
635 "177dfxsmk3k4cih6fh6v8d91bh4nqx7ns6pc07w7m7i3cvdx3c8n"))))
636 (build-system python-build-system)
637 (propagated-inputs
638 `(("python-pyyaml" ,python-pyyaml)
639 ;; Not listed in setup.py, but used in ccmlib/node.py for full
640 ;; functionality
641 ("python-psutil" ,python-psutil)
642 ("python-six" ,python-six)))
643 (home-page "https://github.com/pcmanus/ccm")
644 (synopsis "Cassandra Cluster Manager for Apache Cassandra clusters on
645 localhost")
646 (description "Cassandra Cluster Manager is a development tool for testing
647 local Cassandra clusters. It creates, launches and removes Cassandra clusters
648 on localhost.")
649 (license license:asl2.0)))
650
651 (define-public python2-ccm
652 (package-with-python2 python-ccm))
653
654 (define-public python-pytz
655 (package
656 (name "python-pytz")
657 (version "2017.2")
658 (source
659 (origin
660 (method url-fetch)
661 (uri (pypi-uri "pytz" version ".zip"))
662 (sha256
663 (base32
664 "12cmd3j46d2gcw08bspvp6s9icfcvx88zjz52n1bli9dyvl5dh7m"))))
665 (build-system python-build-system)
666 (native-inputs
667 `(("unzip" ,unzip)))
668 (home-page "http://pythonhosted.org/pytz")
669 (synopsis "Python timezone library")
670 (description "This library brings the Olson tz database into Python. It
671 allows accurate and cross platform timezone calculations using Python 2.4 or
672 higher. It also solves the issue of ambiguous times at the end of daylight
673 saving time. Almost all of the Olson timezones are supported.")
674 (license license:expat)))
675
676 (define-public python2-pytz
677 (package-with-python2 python-pytz))
678
679 (define-public python-clyent
680 (package
681 (name "python-clyent")
682 (version "1.2.1")
683 (source
684 (origin
685 (method url-fetch)
686 (uri (pypi-uri "clyent" version))
687 (sha256
688 (base32
689 "1r9987qmy1pz3hq54160bapqsywpq14waw4w9x3ly8hmq7kpgfbj"))))
690 (build-system python-build-system)
691 (native-inputs
692 `(("python-mock" ,python-mock)))
693 (home-page "https://github.com/binstar/clyent")
694 (synopsis "Command line client library")
695 (description "Clyent is a Python command line utiliy library. It is used
696 by @code{binstar}, @code{binstar-build} and @code{chalmers}.")
697 (license license:bsd-3)))
698
699 (define-public python2-clyent
700 (package-with-python2 python-clyent))
701
702 (define-public python-babel
703 (package
704 (name "python-babel")
705 (version "2.3.4")
706 (source
707 (origin
708 (method url-fetch)
709 (uri (pypi-uri "Babel" version))
710 (sha256
711 (base32
712 "0x98qqqw35xllpcama013a9788ly84z8dm1w2wwfpxh2710c8df5"))))
713 (build-system python-build-system)
714 (propagated-inputs
715 `(("python-pytz" ,python-pytz)))
716 (arguments `(#:tests? #f)) ; no test target
717 (home-page "http://babel.pocoo.org/")
718 (synopsis
719 "Tools for internationalizing Python applications")
720 (description
721 "Babel is composed of two major parts:
722 - tools to build and work with gettext message catalogs
723 - a Python interface to the CLDR (Common Locale Data Repository), providing
724 access to various locale display names, localized number and date formatting,
725 etc. ")
726 (license license:bsd-3)))
727
728 (define-public python2-babel
729 (package-with-python2 python-babel))
730
731 (define-public python2-backport-ssl-match-hostname
732 (package
733 (name "python2-backport-ssl-match-hostname")
734 (version "3.5.0.1")
735 (source
736 (origin
737 (method url-fetch)
738 (uri (string-append
739 "https://pypi.python.org/packages/source/b/"
740 "backports.ssl_match_hostname/backports.ssl_match_hostname-"
741 version ".tar.gz"))
742 (sha256
743 (base32
744 "1wndipik52cyqy0677zdgp90i435pmvwd89cz98lm7ri0y3xjajh"))))
745 (build-system python-build-system)
746 (arguments
747 `(#:python ,python-2
748 #:tests? #f)) ; no test target
749 (home-page "https://bitbucket.org/brandon/backports.ssl_match_hostname")
750 (synopsis "Backport of ssl.match_hostname() function from Python 3.5")
751 (description
752 "This backport brings the ssl.match_hostname() function to users of
753 earlier versions of Python. The function checks the hostname in the
754 certificate returned by the server to which a connection has been established,
755 and verifies that it matches the intended target hostname.")
756 (license license:psfl)))
757
758 (define-public python-hdf4
759 (package
760 (name "python-hdf4")
761 (version "0.9")
762 (source
763 (origin
764 (method url-fetch)
765 (uri (pypi-uri name version))
766 (sha256
767 (base32
768 "1hjiyrxvxk9817qyqky3nar4y3fs4z8wxz0n884zzb5wi6skrjks"))))
769 (build-system python-build-system)
770 (native-inputs `(("nose" ,python-nose)))
771 (propagated-inputs `(("numpy" ,python-numpy)))
772 (inputs
773 `(("hdf4" ,hdf4)
774 ("libjpeg" ,libjpeg)
775 ("zlib" ,zlib)))
776 (arguments
777 `(#:phases
778 (modify-phases %standard-phases
779 (replace 'check
780 (lambda _
781 ;; The 'runexamples' script sets PYTHONPATH to CWD, then goes
782 ;; on to import numpy. Somehow this works on their CI system.
783 ;; Let's just manage PYTHONPATH here instead.
784 (substitute* "runexamples.sh"
785 (("export PYTHONPATH=.*") ""))
786 (setenv "PYTHONPATH"
787 (string-append (getcwd) ":"
788 (getenv "PYTHONPATH")))
789 (and (zero? (system* "./runexamples.sh"))
790 (zero? (system* "nosetests" "-v"))))))))
791 (home-page "https://github.com/fhs/python-hdf4")
792 (synopsis "Python interface to the NCSA HDF4 library")
793 (description
794 "Python-HDF4 is a python wrapper around the NCSA HDF version 4 library,
795 which implements the SD (Scientific Dataset), VS (Vdata) and V (Vgroup) API’s.
796 NetCDF files can also be read and modified. Python-HDF4 is a fork of
797 @url{http://hdfeos.org/software/pyhdf.php,pyhdf}.")
798 (license license:expat)))
799
800 (define-public python2-hdf4
801 (package-with-python2 python-hdf4))
802
803 (define-public python-h5py
804 (package
805 (name "python-h5py")
806 (version "2.6.0")
807 (source
808 (origin
809 (method url-fetch)
810 (uri (pypi-uri "h5py" version))
811 (sha256
812 (base32
813 "0df46dg7i7xfking9lp221bfm8dbl974yvlrbi1w7r6m61ac7bxj"))))
814 (build-system python-build-system)
815 (arguments
816 `(#:tests? #f ; no test target
817 #:phases
818 (modify-phases %standard-phases
819 (add-after 'unpack 'fix-hdf5-paths
820 (lambda* (#:key inputs #:allow-other-keys)
821 (let ((prefix (assoc-ref inputs "hdf5")))
822 (substitute* "setup_build.py"
823 (("\\['/opt/local/lib', '/usr/local/lib'\\]")
824 (string-append "['" prefix "/lib" "']"))
825 (("'/opt/local/include', '/usr/local/include'")
826 (string-append "'" prefix "/include" "'")))
827 (substitute* "setup_configure.py"
828 (("\\['/usr/local/lib', '/opt/local/lib'\\]")
829 (string-append "['" prefix "/lib" "']")))
830 #t))))))
831 (propagated-inputs
832 `(("python-six" ,python-six)
833 ("python-numpy" ,python-numpy)))
834 (inputs
835 `(("hdf5" ,hdf5)))
836 (native-inputs
837 `(("python-cython" ,python-cython)
838 ("python-pkgconfig" ,python-pkgconfig)))
839 (home-page "http://www.h5py.org/")
840 (synopsis "Read and write HDF5 files from Python")
841 (description
842 "The h5py package provides both a high- and low-level interface to the
843 HDF5 library from Python. The low-level interface is intended to be a
844 complete wrapping of the HDF5 API, while the high-level component supports
845 access to HDF5 files, datasets and groups using established Python and NumPy
846 concepts.")
847 (license license:bsd-3)))
848
849 (define-public python2-h5py
850 (package-with-python2 python-h5py))
851
852 (define-public python-netcdf4
853 (package
854 (name "python-netcdf4")
855 (version "1.2.7")
856 (source
857 (origin
858 (method url-fetch)
859 (uri (pypi-uri "netCDF4" version))
860 (sha256
861 (base32
862 "1fllizmnpw0zkzzm4j9pgamarlzfn3kmv9zrm0w65q1y31h9ni0c"))))
863 (build-system python-build-system)
864 (native-inputs
865 `(("python-cython" ,python-cython)))
866 (propagated-inputs
867 `(("python-numpy" ,python-numpy)))
868 (inputs
869 `(("netcdf" ,netcdf)
870 ("hdf4" ,hdf4)
871 ("hdf5" ,hdf5)))
872 (arguments
873 '(#:phases
874 (modify-phases %standard-phases
875 (replace 'check
876 (lambda _
877 (setenv "NO_NET" "1") ; disable opendap tests
878 (with-directory-excursion "test"
879 (setenv "PYTHONPATH" ; find and add the library we just built
880 (string-append
881 (car (find-files "../build" "lib.*"
882 #:directories? #:t
883 #:fail-on-error? #:t))
884 ":" (getenv "PYTHONPATH")))
885 (zero? (system* "python" "run_all.py"))))))))
886 (home-page
887 "https://github.com/Unidata/netcdf4-python")
888 (synopsis "Python/numpy interface to the netCDF library")
889 (description "Netcdf4-python is a Python interface to the netCDF C
890 library. netCDF version 4 has many features not found in earlier
891 versions of the library and is implemented on top of HDF5. This module
892 can read and write files in both the new netCDF 4 and the old netCDF 3
893 format, and can create files that are readable by HDF5 clients. The
894 API is modelled after @code{Scientific.IO.NetCDF}, and should be familiar
895 to users of that module.")
896 ;; The software is mainly ISC, but includes some files covered
897 ;; by the Expat license.
898 (license (list license:isc license:expat))))
899
900 (define-public python2-netcdf4
901 (package-with-python2 python-netcdf4))
902
903 (define-public python-lockfile
904 (package
905 (name "python-lockfile")
906 (version "0.12.2")
907 (source
908 (origin
909 (method url-fetch)
910 (uri (string-append "https://pypi.python.org/packages/source/l/lockfile/"
911 "lockfile-" version ".tar.gz"))
912 (sha256
913 (base32
914 "16gpx5hm73ah5n1079ng0vy381hl802v606npkx4x8nb0gg05vba"))))
915 (build-system python-build-system)
916 (arguments '(#:test-target "check"))
917 (native-inputs
918 `(("python-pbr" ,python-pbr)))
919 (home-page "https://launchpad.net/pylockfile")
920 (synopsis "Platform-independent file locking module")
921 (description
922 "The lockfile package exports a LockFile class which provides a simple
923 API for locking files.")
924 (license license:expat)))
925
926 (define-public python2-lockfile
927 (package-with-python2 python-lockfile))
928
929 (define-public python-mock
930 (package
931 (name "python-mock")
932 (version "1.0.1")
933 (source
934 (origin
935 (method url-fetch)
936 (uri (pypi-uri "mock" version))
937 (sha256
938 (base32
939 "0kzlsbki6q0awf89rc287f3aj8x431lrajf160a70z0ikhnxsfdq"))))
940 (build-system python-build-system)
941 (arguments '(#:test-target "check"))
942 (home-page "https://github.com/testing-cabal/mock")
943 (synopsis "Python mocking and patching library for testing")
944 (description
945 "Mock is a library for testing in Python. It allows you to replace parts
946 of your system under test with mock objects and make assertions about how they
947 have been used.")
948 (license license:expat)))
949
950 (define-public python2-mock
951 (package-with-python2 python-mock))
952
953 ;;; Some packages (notably, certbot and python-acme) rely on this newer version
954 ;;; of python-mock. However, a large number of packages fail to build with
955 ;;; mock@2, so we add a new variable for now. Also, there may be a dependency
956 ;;; cycle between mock and six, so we avoid creating python2-mock@2 for now.
957 (define-public python-mock-2
958 (package
959 (inherit python-mock)
960 (version "2.0.0")
961 (source
962 (origin
963 (method url-fetch)
964 (uri (pypi-uri "mock" version))
965 (sha256
966 (base32
967 "1flbpksir5sqrvq2z0dp8sl4bzbadg21sj4d42w3klpdfvgvcn5i"))))
968 (propagated-inputs
969 `(("python-pbr" ,python-pbr-minimal)
970 ,@(package-propagated-inputs python-mock)))))
971
972 (define-public python-setuptools
973 (package
974 (name "python-setuptools")
975 (version "31.0.0")
976 (source
977 (origin
978 (method url-fetch)
979 (uri (pypi-uri "setuptools" version))
980 (sha256
981 (base32
982 "0ypybh4hx3bv4vhg2dc74xpj1g56ggnaffm87k4abhwjwq6wq608"))
983 (modules '((guix build utils)))
984 (snippet
985 '(begin
986 ;; Remove included binaries which are used to build self-extracting
987 ;; installers for Windows.
988 ;; TODO: Find some way to build them ourself so we can include them.
989 (for-each delete-file (find-files "setuptools" "^(cli|gui).*\\.exe$"))
990 #t))))
991 (build-system python-build-system)
992 ;; FIXME: Tests require pytest, which itself relies on setuptools.
993 ;; One could bootstrap with an internal untested setuptools.
994 (arguments
995 `(#:tests? #f))
996 (home-page "https://pypi.python.org/pypi/setuptools")
997 (synopsis
998 "Library designed to facilitate packaging Python projects")
999 (description
1000 "Setuptools is a fully-featured, stable library designed to facilitate
1001 packaging Python projects, where packaging includes:
1002 Python package and module definitions,
1003 distribution package metadata,
1004 test hooks,
1005 project installation,
1006 platform-specific details,
1007 Python 3 support.")
1008 ;; TODO: setuptools now bundles the following libraries:
1009 ;; packaging, pyparsing, six and appdirs. How to unbundle?
1010 (license (list license:psfl ; setuptools itself
1011 license:expat ; six, appdirs, pyparsing
1012 license:asl2.0 ; packaging is dual ASL2/BSD-2
1013 license:bsd-2))))
1014
1015 (define-public python2-setuptools
1016 (package-with-python2 python-setuptools))
1017
1018 (define-public python-uniseg
1019 (package
1020 (name "python-uniseg")
1021 (version "0.7.1")
1022 (source
1023 (origin
1024 (method url-fetch)
1025 (uri (string-append "https://bitbucket.org/emptypage/uniseg-python/"
1026 "get/rel-" version ".tar.gz"))
1027 (file-name (string-append name "-" version ".tar.gz"))
1028 (sha256
1029 (base32
1030 "1df4gddnj2a0v8z35wb2ra5vvh1f1qyxs8fgd25c8g64031mna6x"))))
1031 (build-system python-build-system)
1032 (arguments
1033 '(#:tests? #f)) ; The test suite requires network access.
1034 (home-page
1035 "https://bitbucket.org/emptypage/uniseg-python")
1036 (synopsis
1037 "Python library to determine Unicode text segmentations")
1038 (description
1039 "Uniseg is a Python package used to determine Unicode text segmentations.
1040 Supported segmentations include:
1041 @enumerate
1042 @item @dfn{Code point} (any value in the Unicode codespace)
1043 @item @dfn{Grapheme cluster} (user-perceived character made of a single or
1044 multiple Unicode code points, e.g. \"G\" + acute-accent)
1045 @item Word break
1046 @item Sentence break
1047 @item Line break
1048 @end enumerate")
1049 (license license:expat)))
1050
1051 (define-public python2-uniseg
1052 (package-with-python2 python-uniseg))
1053
1054 ;;; Pycrypto is abandoned upstream:
1055 ;;;
1056 ;;; https://github.com/dlitz/pycrypto/issues/173
1057 ;;;
1058 ;;; TODO Remove this package from GNU Guix.
1059 (define-public python-pycrypto
1060 (package
1061 (name "python-pycrypto")
1062 (version "2.6.1")
1063 (source
1064 (origin
1065 (method url-fetch)
1066 (uri (pypi-uri "pycrypto" version))
1067 (patches (search-patches "python-pycrypto-CVE-2013-7459.patch"))
1068 (sha256
1069 (base32
1070 "0g0ayql5b9mkjam8hym6zyg6bv77lbh66rv1fyvgqb17kfc1xkpj"))))
1071 (build-system python-build-system)
1072 (inputs
1073 `(("python" ,python)
1074 ("gmp" ,gmp)))
1075 (arguments
1076 `(#:phases
1077 (alist-cons-before
1078 'build 'set-build-env
1079 ;; pycrypto runs an autoconf configure script behind the scenes
1080 (lambda _
1081 (setenv "CONFIG_SHELL" (which "bash")))
1082 %standard-phases)))
1083 (home-page "http://www.pycrypto.org/")
1084 (synopsis "Cryptographic modules for Python")
1085 (description
1086 "Pycrypto is a collection of both secure hash functions (such as SHA256
1087 and RIPEMD160), and various encryption algorithms (AES, DES, RSA, ElGamal,
1088 etc.). The package is structured to make adding new modules easy.")
1089 (license license:public-domain)))
1090
1091 (define-public python2-pycrypto
1092 (let ((pycrypto (package-with-python2 python-pycrypto)))
1093 (package (inherit pycrypto)
1094 (inputs
1095 `(("python" ,python-2)
1096 ,@(alist-delete
1097 "python"
1098 (package-inputs pycrypto)))))))
1099
1100 (define-public python-eventlet
1101 (package
1102 (name "python-eventlet")
1103 (version "0.20.1")
1104 (source
1105 (origin
1106 (method url-fetch)
1107 (uri (pypi-uri "eventlet" version))
1108 (sha256
1109 (base32
1110 "0f3q55mq4n021wb7qa53pz3ix6i2py64sap66vsaqm2scjw83m9s"))))
1111 (build-system python-build-system)
1112 (propagated-inputs
1113 `(("python-greenlet" ,python-greenlet)))
1114 (arguments
1115 ;; TODO: Requires unpackaged 'enum-compat'.
1116 '(#:tests? #f))
1117 (home-page "http://eventlet.net")
1118 (synopsis "Concurrent networking library for Python")
1119 (description
1120 "Eventlet is a concurrent networking library for Python that
1121 allows you to change how you run your code, not how you write it.
1122 It uses @code{epoll} or @code{libevent} for highly scalable non-blocking I/O.
1123 Coroutines ensure that the developer uses a blocking style of programming
1124 that is similar to threading, but provide the benefits of non-blocking I/O.
1125 The event dispatch is implicit, which means you can easily use @code{Eventlet}
1126 from the Python interpreter, or as a small part of a larger application.")
1127 (license license:expat)))
1128
1129 (define-public python2-eventlet
1130 (let ((base (package-with-python2
1131 (strip-python2-variant python-eventlet))))
1132 (package (inherit base)
1133 (propagated-inputs
1134 `(("python2-enum34" ,python2-enum34)
1135 ,@(package-propagated-inputs base))))))
1136
1137 (define-public python-keyring
1138 (package
1139 (name "python-keyring")
1140 (version "8.7")
1141 (source
1142 (origin
1143 (method url-fetch)
1144 (uri (pypi-uri "keyring" version))
1145 (sha256
1146 (base32
1147 "0482rmi2x6p78wl2kz8qzyq21xz1sbbfwnv5x7dggar4vkwxhzfx"))))
1148 (build-system python-build-system)
1149 (native-inputs
1150 `(("python-setuptools-scm" ,python-setuptools-scm)))
1151 (propagated-inputs
1152 `(("python-pycrypto" ,python-pycrypto)))
1153 (arguments
1154 `(#:tests? #f)) ;TODO: tests require pytest
1155 (home-page "https://github.com/jaraco/keyring")
1156 (synopsis "Store and access your passwords safely")
1157 (description
1158 "The Python keyring lib provides a easy way to access the system keyring
1159 service from python. It can be used in any application that needs safe
1160 password storage.")
1161 ;; "MIT" and PSF dual license
1162 (license license:x11)))
1163
1164 (define-public python2-keyring
1165 (package-with-python2 python-keyring))
1166
1167 (define-public python-six
1168 (package
1169 (name "python-six")
1170 (version "1.10.0")
1171 (source
1172 (origin
1173 (method url-fetch)
1174 (uri (pypi-uri "six" version))
1175 (sha256
1176 (base32
1177 "0snmb8xffb3vsma0z67i0h0w2g2dy0p3gsgh9gi4i0kgc5l8spqh"))))
1178 (build-system python-build-system)
1179 (native-inputs
1180 `(("python-py" ,python-py)
1181 ("python-pytest" ,python-pytest)))
1182 (home-page "http://pypi.python.org/pypi/six/")
1183 (synopsis "Python 2 and 3 compatibility utilities")
1184 (description
1185 "Six is a Python 2 and 3 compatibility library. It provides utility
1186 functions for smoothing over the differences between the Python versions with
1187 the goal of writing Python code that is compatible on both Python versions.
1188 Six supports every Python version since 2.5. It is contained in only one
1189 Python file, so it can be easily copied into your project.")
1190 (license license:x11)))
1191
1192 (define-public python2-six
1193 (package-with-python2 python-six))
1194
1195 (define-public python-dateutil
1196 (package
1197 (name "python-dateutil")
1198 (version "2.6.0")
1199 (source
1200 (origin
1201 (method url-fetch)
1202 (uri (pypi-uri "python-dateutil" version))
1203 (sha256
1204 (base32
1205 "1lhq0hxjc3cfha101q02ld5ijlpfyjn2w1yh7wvpiy367pgzi8k2"))))
1206 (build-system python-build-system)
1207 (propagated-inputs
1208 `(("python-six" ,python-six)))
1209 (home-page "https://dateutil.readthedocs.io/en/stable/")
1210 (synopsis "Extensions to the standard datetime module")
1211 (description
1212 "The dateutil module provides powerful extensions to the standard
1213 datetime module, available in Python 2.3+.")
1214 (license license:bsd-3)))
1215
1216 (define-public python2-dateutil
1217 (package-with-python2 python-dateutil))
1218
1219 (define-public python-parsedatetime
1220 (package
1221 (name "python-parsedatetime")
1222 (version "2.4")
1223 (source
1224 (origin
1225 (method url-fetch)
1226 (uri (pypi-uri "parsedatetime" version))
1227 (sha256
1228 (base32
1229 "0jxqkjks7z9dn222cqgvskp4wr6d92aglinxq7pd2w4mzdc7r09x"))))
1230 (build-system python-build-system)
1231 (native-inputs
1232 `(("python-nose" ,python-nose)
1233 ("python-pyicu" ,python-pyicu)
1234 ("python-pytest" ,python-pytest)
1235 ("python-pytest-runner" ,python-pytest-runner)))
1236 (propagated-inputs
1237 `(("python-future" ,python-future)))
1238 (home-page "https://github.com/bear/parsedatetime/")
1239 (synopsis
1240 "Parse human-readable date/time text")
1241 (description
1242 "Parse human-readable date/time text.")
1243 (license license:asl2.0)))
1244
1245 (define-public python2-parsedatetime
1246 (package-with-python2 python-parsedatetime))
1247
1248 (define-public python-pandas
1249 (package
1250 (name "python-pandas")
1251 (version "0.19.2")
1252 (source
1253 (origin
1254 (method url-fetch)
1255 (uri (pypi-uri "pandas" version))
1256 (sha256
1257 (base32 "0540cnbwy2hc4hv2sxfs8i47xi91qzvzxfn80dl785ibiicly3vg"))
1258 (patches
1259 (search-patches "python-pandas-skip-failing-tests.patch"))))
1260 (build-system python-build-system)
1261 (propagated-inputs
1262 `(("python-numpy" ,python-numpy)
1263 ("python-pytz" ,python-pytz)
1264 ("python-dateutil" ,python-dateutil)))
1265 (native-inputs
1266 `(("python-nose" ,python-nose)
1267 ("python-cython" ,python-cython)))
1268 (home-page "http://pandas.pydata.org")
1269 (synopsis "Data structures for data analysis, time series, and statistics")
1270 (description
1271 "Pandas is a Python package providing fast, flexible, and expressive data
1272 structures designed to make working with structured (tabular,
1273 multidimensional, potentially heterogeneous) and time series data both easy
1274 and intuitive. It aims to be the fundamental high-level building block for
1275 doing practical, real world data analysis in Python.")
1276 (license license:bsd-3)))
1277
1278 (define-public python2-pandas
1279 (package-with-python2 python-pandas))
1280
1281 (define-public python-tzlocal
1282 (package
1283 (name "python-tzlocal")
1284 (version "1.2.2")
1285 (source
1286 (origin
1287 (method url-fetch)
1288 (uri (pypi-uri "tzlocal" version))
1289 (sha256
1290 (base32
1291 "0paj7vlsb0np8b5sp4bv64wxv7qk2piyp7xg29pkhdjwsbls9fnb"))))
1292 (build-system python-build-system)
1293 (propagated-inputs
1294 `(("python-pytz" ,python-pytz)))
1295 (home-page "https://github.com/regebro/tzlocal")
1296 (synopsis
1297 "Local timezone information for Python")
1298 (description
1299 "Tzlocal returns a tzinfo object with the local timezone information.
1300 This module attempts to fix a glaring hole in pytz, that there is no way to
1301 get the local timezone information, unless you know the zoneinfo name, and
1302 under several distributions that's hard or impossible to figure out.")
1303 (license license:cc0)))
1304
1305 (define-public python2-pysqlite
1306 (package
1307 (name "python2-pysqlite")
1308 (version "2.8.3")
1309 (source
1310 (origin
1311 (method url-fetch)
1312 (uri (pypi-uri "pysqlite" version))
1313 (sha256
1314 (base32
1315 "1424gwq9sil2ffmnizk60q36vydkv8rxs6m7xs987kz8cdc37lqp"))))
1316 (build-system python-build-system)
1317 (inputs
1318 `(("sqlite" ,sqlite)))
1319 (arguments
1320 `(#:python ,python-2 ; incompatible with Python 3
1321 #:tests? #f)) ; no test target
1322 (home-page "https://github.com/ghaering/pysqlite")
1323 (synopsis "SQLite bindings for Python")
1324 (description
1325 "Pysqlite provides SQLite bindings for Python that comply to the
1326 Database API 2.0T.")
1327 (license license:zlib)))
1328
1329
1330 (define-public python2-mechanize
1331 (package
1332 (name "python2-mechanize")
1333 (version "0.2.5")
1334 (source
1335 (origin
1336 (method url-fetch)
1337 (uri (string-append "https://pypi.python.org/packages/source/m/mechanize/mechanize-"
1338 version ".tar.gz"))
1339 (sha256
1340 (base32
1341 "0rj7r166i1dyrq0ihm5rijfmvhs8a04im28lv05c0c3v206v4rrf"))))
1342 (build-system python-build-system)
1343 (arguments
1344 `(#:python ,python-2 ; apparently incompatible with Python 3
1345 #:tests? #f))
1346 ;; test fails with message
1347 ;; AttributeError: 'module' object has no attribute 'test_pullparser'
1348 ;; (python-3.3.2) or
1349 ;; AttributeError: 'module' object has no attribute 'test_urllib2_localnet'
1350 ;; (python-2.7.5).
1351 ;; The source code is from March 2011 and probably not up-to-date
1352 ;; with respect to python unit tests.
1353 (home-page "http://wwwsearch.sourceforge.net/mechanize/")
1354 (synopsis
1355 "Stateful programmatic web browsing in Python")
1356 (description
1357 "Mechanize implements stateful programmatic web browsing in Python,
1358 after Andy Lester’s Perl module WWW::Mechanize.")
1359 (license (license:non-copyleft
1360 "file://COPYING"
1361 "See COPYING in the distribution."))))
1362
1363
1364 (define-public python-simplejson
1365 (package
1366 (name "python-simplejson")
1367 (version "3.10.0")
1368 (source
1369 (origin
1370 (method url-fetch)
1371 (uri (pypi-uri "simplejson" version))
1372 (sha256
1373 (base32
1374 "1qhwsykjlb85igb4cfl6v6gkprzbbg8gyqdd7zscc8w3x0ifcfwm"))))
1375 (build-system python-build-system)
1376 (home-page "http://simplejson.readthedocs.org/en/latest/")
1377 (synopsis
1378 "Json library for Python")
1379 (description
1380 "JSON (JavaScript Object Notation) is a subset of JavaScript
1381 syntax (ECMA-262 3rd edition) used as a lightweight data interchange
1382 format.
1383
1384 Simplejson exposes an API familiar to users of the standard library marshal
1385 and pickle modules. It is the externally maintained version of the json
1386 library contained in Python 2.6, but maintains compatibility with Python 2.5
1387 and (currently) has significant performance advantages, even without using
1388 the optional C extension for speedups. Simplejson is also supported on
1389 Python 3.3+.")
1390 (license license:x11)))
1391
1392 (define-public python2-simplejson
1393 (package-with-python2 python-simplejson))
1394
1395
1396 (define-public python-pyicu
1397 (package
1398 (name "python-pyicu")
1399 (version "1.9.5")
1400 (source
1401 (origin
1402 (method url-fetch)
1403 (uri (pypi-uri "PyICU" version))
1404 (sha256
1405 (base32
1406 "16rmxy9y0qhqqna2v49i7nzwm09as699rbyvh4raw7w602w55c3k"))))
1407 (build-system python-build-system)
1408 (arguments
1409 '(#:phases
1410 (modify-phases %standard-phases
1411 (add-before 'check 'delete-failing-test
1412 (lambda _
1413 ;; XXX: These tests require locales that are unavailable
1414 ;; in the build environment.
1415 (delete-file "test/test_DateTimeParserGenerator.py")
1416 #t)))))
1417 (inputs
1418 `(("icu4c" ,icu4c)))
1419 (home-page "http://pyicu.osafoundation.org/")
1420 (synopsis "Python extension wrapping the ICU C++ API")
1421 (description
1422 "PyICU is a python extension wrapping the ICU C++ API.")
1423 (license license:x11)))
1424
1425 (define-public python2-pyicu
1426 (package-with-python2 python-pyicu))
1427
1428 (define-public python2-dogtail
1429 ;; Python 2 only, as it leads to "TabError: inconsistent use of tabs and
1430 ;; spaces in indentation" with Python 3.
1431 (package
1432 (name "python2-dogtail")
1433 (version "0.9.9")
1434 (source (origin
1435 (method url-fetch)
1436 (uri (pypi-uri "dogtail" version))
1437 (sha256
1438 (base32
1439 "0p5wfssvzr9w0bvhllzbbd8fnp4cca2qxcpcsc33dchrmh5n552x"))))
1440 (build-system python-build-system)
1441 (arguments `(#:python ,python-2
1442 #:tests? #f)) ; invalid command "test"
1443 ;; Currently no offical homepage.
1444 (home-page "https://pypi.python.org/pypi/dogtail/")
1445 (synopsis "GUI test tool and automation framework written in Python")
1446 (description
1447 "Dogtail is a GUI test tool and automation framework written in Python.
1448 It uses Accessibility (a11y) technologies to communicate with desktop
1449 applications. dogtail scripts are written in Python and executed like any
1450 other Python program.")
1451 (license license:gpl2+)))
1452
1453 (define-public python2-empy
1454 (package
1455 (name "python2-empy")
1456 (version "3.3")
1457 (source (origin
1458 (method url-fetch)
1459 (uri (string-append "http://www.alcyone.com/software/empy/empy-"
1460 version ".tar.gz"))
1461 (sha256
1462 (base32
1463 "01g8mmkfnvjdmlhsihwyx56lrg7r5m5d2fg6mnxsvy6g0dnl69f6"))))
1464 (build-system python-build-system)
1465 (arguments
1466 `(#:python ,python-2
1467 #:phases (alist-replace
1468 'check
1469 (lambda _
1470 (zero? (system* "./test.sh")))
1471 %standard-phases)))
1472 (home-page "http://www.alcyone.com/software/empy/")
1473 (synopsis "Templating system for Python")
1474 (description
1475 "EmPy is a system for embedding Python expressions and statements in
1476 template text; it takes an EmPy source file, processes it, and produces
1477 output. This is accomplished via expansions, which are special signals to the
1478 EmPy system and are set off by a special prefix (by default the at sign, @@).
1479 EmPy can expand arbitrary Python expressions and statements in this way, as
1480 well as a variety of special forms. Textual data not explicitly delimited in
1481 this way is sent unaffected to the output, allowing Python to be used in
1482 effect as a markup language. Also supported are callbacks via hooks,
1483 recording and playback via diversions, and dynamic, chainable filters. The
1484 system is highly configurable via command line options and embedded
1485 commands.")
1486 (license license:lgpl2.1+)))
1487
1488 (define-public python2-element-tree
1489 (package
1490 (name "python2-element-tree")
1491 (version "1.2.6")
1492 (source (origin
1493 (method url-fetch)
1494 (uri (string-append
1495 "http://effbot.org/media/downloads/elementtree-"
1496 version "-20050316.tar.gz"))
1497 (sha256
1498 (base32
1499 "016bphqnlg0l4vslahhw4r0aanw95bpypy65r1i1acyb2wj5z7dj"))))
1500 (build-system python-build-system)
1501 (arguments
1502 `(#:python ,python-2 ; seems to be part of Python 3
1503 #:tests? #f)) ; no 'test' sub-command
1504 (synopsis "Toolkit for XML processing in Python")
1505 (description
1506 "ElementTree is a Python library supporting lightweight XML processing.")
1507 (home-page "http://effbot.org/zone/element-index.htm")
1508 (license (license:x11-style
1509 "http://docs.python.org/2/license.html"
1510 "Like \"CWI LICENSE AGREEMENT FOR PYTHON 0.9.0 THROUGH 1.2\"."))))
1511
1512 (define-public python2-pybugz
1513 (package
1514 (name "python2-pybugz")
1515 (version "0.6.11")
1516 (source (origin
1517 (method url-fetch)
1518 (uri (string-append
1519 "http://bits.liquidx.net/projects/pybugz/pybugz-"
1520 version ".tar.gz"))
1521 (sha256
1522 (base32
1523 "17ni00p08gp5lkxlrrcnvi3x09fmajnlbz4da03qcgl9q21ym4jd"))
1524 (patches (search-patches "pybugz-stty.patch"
1525 "pybugz-encode-error.patch"))))
1526 (build-system python-build-system)
1527 (arguments
1528 `(#:python ,python-2 ; SyntaxError with Python 3
1529 #:tests? #f)) ; no 'test' sub-command
1530 (propagated-inputs
1531 `(("element-tree" ,python2-element-tree)))
1532 (synopsis "Python and command-line interface to Bugzilla")
1533 (description
1534 "PyBugz is a Python library and command-line tool to query the Bugzilla
1535 bug tracking system. It is meant as an aid to speed up interaction with the
1536 bug tracker.")
1537 (home-page "http://www.liquidx.net/pybugz/")
1538 (license license:gpl2)))
1539
1540 (define-public python-enum34
1541 (package
1542 (name "python-enum34")
1543 (version "1.1.6")
1544 (source
1545 (origin
1546 (method url-fetch)
1547 (uri (pypi-uri "enum34" version))
1548 (sha256
1549 (base32
1550 "1cgm5ng2gcfrkrm3hc22brl6chdmv67b9zvva9sfs7gn7dwc9n4a"))))
1551 (build-system python-build-system)
1552 (home-page "https://pypi.python.org/pypi/enum34")
1553 (synopsis "Backported Python 3.4 Enum")
1554 (description
1555 "Enum34 is the new Python stdlib enum module available in Python 3.4
1556 backported for previous versions of Python from 2.4 to 3.3.")
1557 (license license:bsd-3)))
1558
1559 (define-public python2-enum34
1560 (package-with-python2 python-enum34))
1561
1562 (define-public python-parse-type
1563 (package
1564 (name "python-parse-type")
1565 (version "0.3.4")
1566 (source
1567 (origin
1568 (method url-fetch)
1569 (uri (string-append "https://pypi.python.org/packages/source/p/"
1570 "parse_type/parse_type-" version ".tar.gz"))
1571 (sha256
1572 (base32
1573 "0iv1c34npr4iynwpgv1vkjx9rjd18a85ir8c01gc5f7wp8iv7l1x"))))
1574 (build-system python-build-system)
1575 (arguments
1576 `(#:phases
1577 (modify-phases %standard-phases
1578 (add-after 'unpack 'patch-tests
1579 (lambda _
1580 (substitute* "tests/test_parse_type_parse.py"
1581 ;; Newer Python versions don't have the problem this test tests.
1582 (("self[.]assertRaises[(]parse.TooManyFields, p.parse, ''[)]")
1583 ""))
1584 #t)))))
1585 (propagated-inputs
1586 `(("python-six" ,python-six)
1587 ("python-parse" ,python-parse)))
1588 (native-inputs
1589 `(("python-pytest" ,python-pytest)
1590 ("python-pytest-runner" ,python-pytest-runner)))
1591 (home-page "https://github.com/jenisys/parse_type")
1592 (synopsis "Extended parse module")
1593 (description
1594 "Parse_type extends the python parse module.")
1595 (properties
1596 `((python2-variant . ,(delay python2-parse-type))))
1597 (license license:bsd-3)))
1598
1599 (define-public python2-parse-type
1600 (let ((base (package-with-python2
1601 (strip-python2-variant python-parse-type))))
1602 (package (inherit base)
1603 (propagated-inputs
1604 `(("python2-enum34" ,python2-enum34)
1605 ,@(package-propagated-inputs base))))))
1606
1607 (define-public python-parse
1608 (package
1609 (name "python-parse")
1610 (version "1.6.6")
1611 (source
1612 (origin
1613 (method url-fetch)
1614 (uri (pypi-uri "parse" version))
1615 (sha256
1616 (base32
1617 "0y31i3mwgv35qn0kzzjn9q8jqfdqmbi6sr6yfvn8rq4lqjm5lhvi"))
1618 (patches (search-patches "python-parse-too-many-fields.patch"))))
1619 (build-system python-build-system)
1620 (arguments
1621 `(#:phases
1622 (modify-phases %standard-phases
1623 (replace 'check
1624 (lambda _ (zero? (system* "python" "test_parse.py")))))))
1625 (home-page "https://github.com/r1chardj0n3s/parse")
1626 (synopsis "Parse strings")
1627 (description
1628 "Parse strings using a specification based on the Python format()
1629 syntax.")
1630 (license license:x11)))
1631
1632 (define-public python-polib
1633 (package
1634 (name "python-polib")
1635 (version "1.0.8")
1636 (source (origin
1637 (method url-fetch)
1638 (uri (pypi-uri "polib" version))
1639 (sha256
1640 (base32
1641 "1pq2hbm3m2q0cjdszk8mc4qa1vl3wcblh5nfyirlfnzb2pcy7zss"))))
1642 (build-system python-build-system)
1643 (home-page "https://bitbucket.org/izi/polib/wiki/Home")
1644 (synopsis "Manipulate, create and modify gettext files")
1645 (description "Polib can manipulate any gettext format (po, pot and mo)
1646 files. It can be used to create po files from scratch or to modify
1647 existing ones.")
1648 (license license:expat)))
1649
1650 (define-public python2-polib
1651 (let ((base (package-with-python2 (strip-python2-variant python-polib))))
1652 (package
1653 (inherit base)
1654 (arguments `(,@(package-arguments base)
1655 ;; Tests don't work with python2.
1656 #:tests? #f)))))
1657
1658 (define-public scons
1659 (package
1660 (name "scons")
1661 (version "2.5.1")
1662 (source (origin
1663 (method url-fetch)
1664 (uri (string-append "mirror://sourceforge/scons/scons/" version
1665 "/scons-" version ".tar.gz"))
1666 (sha256
1667 (base32
1668 "1wji1z9jdkhnmm99apx6fhld9cs52rr56aigniyrcsmlwy52298b"))))
1669 (build-system python-build-system)
1670 (arguments
1671 ;; With Python 3.x, fails to build with a syntax error.
1672 `(#:python ,python-2
1673 #:use-setuptools? #f ; still relies on distutils
1674 #:tests? #f)) ; no 'python setup.py test' command
1675 (home-page "http://scons.org/")
1676 (synopsis "Software construction tool written in Python")
1677 (description
1678 "SCons is a software construction tool. Think of SCons as an improved,
1679 cross-platform substitute for the classic Make utility with integrated
1680 functionality similar to autoconf/automake and compiler caches such as ccache.
1681 In short, SCons is an easier, more reliable and faster way to build
1682 software.")
1683 (license license:x11)))
1684
1685 (define-public python-extras
1686 (package
1687 (name "python-extras")
1688 (version "0.0.3")
1689 (source
1690 (origin
1691 (method url-fetch)
1692 (uri (string-append
1693 "https://pypi.python.org/packages/source/e/extras/extras-"
1694 version ".tar.gz"))
1695 (sha256
1696 (base32
1697 "1h7zx4dfyclalg0fqnfjijpn0f793a9mx8sy3b27gd31nr6dhq3s"))))
1698 (build-system python-build-system)
1699 (arguments
1700 ;; error in setup.cfg: command 'test' has no such option 'buffer'
1701 '(#:tests? #f))
1702 (home-page "https://github.com/testing-cabal/extras")
1703 (synopsis "Useful extensions to the Python standard library")
1704 (description
1705 "Extras is a set of extensions to the Python standard library.")
1706 (license license:expat)))
1707
1708 (define-public python2-extras
1709 (package-with-python2 python-extras))
1710
1711 (define-public python-mimeparse
1712 (package
1713 (name "python-mimeparse")
1714 (version "0.1.4")
1715 (source
1716 (origin
1717 (method url-fetch)
1718 (uri (string-append
1719 "https://pypi.python.org/packages/source/p/python-mimeparse/python-mimeparse-"
1720 version ".tar.gz"))
1721 (sha256
1722 (base32
1723 "1hyxg09kaj02ri0rmwjqi86wk4nd1akvv7n0dx77azz76wga4s9w"))))
1724 (build-system python-build-system)
1725 (arguments
1726 '(#:tests? #f)) ; no setup.py test command
1727 (home-page
1728 "https://github.com/dbtsai/python-mimeparse")
1729 (synopsis "Python library for parsing MIME types")
1730 (description
1731 "Mimeparse provides basic functions for parsing MIME type names and
1732 matching them against a list of media-ranges.")
1733 (license license:expat)))
1734
1735 (define-public python2-mimeparse
1736 (package-with-python2 python-mimeparse))
1737
1738 (define-public python-nose
1739 (package
1740 (name "python-nose")
1741 (version "1.3.7")
1742 (source
1743 (origin
1744 (method url-fetch)
1745 (uri (pypi-uri "nose" version))
1746 (sha256
1747 (base32
1748 "164a43k7k2wsqqk1s6vavcdamvss4mz0vd6pwzv2h9n8rgwzxgzi"))))
1749 (build-system python-build-system)
1750 (arguments
1751 '(#:tests? #f)) ; FIXME: test suite fails
1752 (home-page "http://readthedocs.org/docs/nose/")
1753 (synopsis "Python testing library")
1754 (description
1755 "Nose extends the unittest library to make testing easier.")
1756 (license license:lgpl2.0+)))
1757
1758 (define-public python2-nose
1759 (package-with-python2 python-nose))
1760
1761 (define-public python-nose2
1762 (package
1763 (name "python-nose2")
1764 (version "0.6.5")
1765 (source
1766 (origin
1767 (method url-fetch)
1768 (uri (pypi-uri "nose2" version))
1769 (sha256
1770 (base32
1771 "1x4zjq1zlyrh8b9ba0cmafd3w94pxhid408kibyjd3s6h1lap6s7"))))
1772 (build-system python-build-system)
1773 (arguments `(#:tests? #f)) ; 'module' object has no attribute 'collector'
1774 (propagated-inputs
1775 `(("python-cov-core" ,python-cov-core)
1776 ("python-pytest-cov" ,python-pytest-cov)
1777 ("python-six" ,python-six)))
1778 (home-page "https://github.com/nose-devs/nose2")
1779 (synopsis "Next generation of nicer testing for Python")
1780 (description
1781 "Nose2 is the next generation of nicer testing for Python, based on the
1782 plugins branch of unittest2. Nose2 aims to improve on nose by providing a
1783 better plugin api, being easier for users to configure, and simplifying internal
1784 interfaces and processes.")
1785 (license license:bsd-2)))
1786
1787 (define-public python2-nose2
1788 (package-with-python2 python-nose2))
1789
1790 (define-public python-unittest2
1791 (package
1792 (name "python-unittest2")
1793 (version "0.5.1")
1794 (source
1795 (origin
1796 (method url-fetch)
1797 (uri (string-append
1798 "https://pypi.python.org/packages/source/u/unittest2py3k/unittest2py3k-"
1799 version ".tar.gz"))
1800 (sha256
1801 (base32
1802 "00yl6lskygcrddx5zspkhr0ibgvpknl4678kkm6s626539grq93q"))))
1803 (build-system python-build-system)
1804 (home-page "http://pypi.python.org/pypi/unittest2")
1805 (synopsis "Python unit testing library")
1806 (description
1807 "Unittest2 is a replacement for the unittest module in the Python
1808 standard library.")
1809 (license license:psfl)))
1810
1811 (define-public python2-unittest2
1812 (package (inherit python-unittest2)
1813 (name "python2-unittest2")
1814 (version "0.5.1")
1815 (source
1816 (origin
1817 (method url-fetch)
1818 (uri (string-append
1819 "https://pypi.python.org/packages/source/u/unittest2/unittest2-"
1820 version ".tar.gz"))
1821 (sha256
1822 (base32
1823 "0wbs4i4x3x7klr3v35ss6p9mcqz883i1xgcpkhvl7n2lyv6yhpda"))))
1824 (arguments
1825 `(#:python ,python-2
1826 #:tests? #f)))) ; no setup.py test command
1827
1828 (define-public python-pafy
1829 (package
1830 (name "python-pafy")
1831 (version "0.5.3.1")
1832 (source
1833 (origin
1834 (method url-fetch)
1835 (uri (pypi-uri "pafy" version))
1836 (sha256
1837 (base32
1838 "1a7dxi95m1043rxx1r5x3ngb66nwlq6aqcasyqqjzmmmjps4zrim"))))
1839 (build-system python-build-system)
1840 (arguments
1841 `(#:tests? #f)) ; Currently pafy can not find itself in the tests
1842 (propagated-inputs
1843 ;; Youtube-dl is a python package which is imported in the file
1844 ;; "backend_youtube_dl.py", therefore it needs to be propagated.
1845 `(("youtube-dl" ,youtube-dl)))
1846 (home-page "https://np1.github.io/pafy/")
1847 (synopsis "Retrieve YouTube content and metadata")
1848 (description
1849 "@code{pafy} is a python library to retrieve YouTube content and metadata.")
1850 (license license:lgpl3+)))
1851
1852 (define-public python-py
1853 (package
1854 (name "python-py")
1855 (version "1.4.32")
1856 (source
1857 (origin
1858 (method url-fetch)
1859 (uri (pypi-uri "py" version))
1860 (sha256
1861 (base32
1862 "19s1pql9pq85h1qzsdwgyb8a3k1qgkvh33b02m8kfqhizz8rzf64"))))
1863 (build-system python-build-system)
1864 (arguments
1865 ;; FIXME: "ImportError: 'test' module incorrectly imported from
1866 ;; '/gnu/store/...-python-pytest-mimimal-3.0.5/lib/python3.5/site-packages'.
1867 ;; Expected '/tmp/guix-build-python-py-1.4.31.drv-0/py-1.4.31/py'.
1868 ;; Is this module globally installed?"
1869 '(#:tests? #f))
1870 (home-page "http://pylib.readthedocs.org/")
1871 (synopsis "Python library for parsing, I/O, instrospection, and logging")
1872 (description
1873 "Py is a Python library for file name parsing, .ini file parsing, I/O,
1874 code introspection, and logging.")
1875 (license license:expat)))
1876
1877 (define-public python2-py
1878 (package-with-python2 python-py))
1879
1880 (define-public python-pytest
1881 (package
1882 (name "python-pytest")
1883 (version "2.7.3")
1884 (source
1885 (origin
1886 (method url-fetch)
1887 (uri (string-append
1888 "https://pypi.python.org/packages/source/p/pytest/pytest-"
1889 version ".tar.gz"))
1890 (sha256
1891 (base32
1892 "1z4yi986f9n0p8qmzmn21m21m8j1x78hk3505f89baqm6pdw7afm"))
1893 (modules '((guix build utils)))
1894 (snippet
1895 ;; One of the tests involves the /usr directory, so it fails.
1896 '(substitute* "testing/test_argcomplete.py"
1897 (("def test_remove_dir_prefix\\(self\\):")
1898 "@pytest.mark.xfail\n def test_remove_dir_prefix(self):")))))
1899 (build-system python-build-system)
1900 (propagated-inputs
1901 `(("python-py" ,python-py)))
1902 (native-inputs
1903 `(("python-nose" ,python-nose)
1904 ("python-mock" ,python-mock)))
1905 (home-page "http://pytest.org")
1906 (synopsis "Python testing library")
1907 (description
1908 "Pytest is a testing tool that provides auto-discovery of test modules
1909 and functions, detailed info on failing assert statements, modular fixtures,
1910 and many external plugins.")
1911 (license license:expat)))
1912
1913 (define-public python2-pytest
1914 (package-with-python2 python-pytest))
1915
1916 ;; Some packages require a newer pytest.
1917 (define-public python-pytest-3.0
1918 (package
1919 (inherit python-pytest)
1920 (name "python-pytest")
1921 (version "3.0.7")
1922 (source (origin
1923 (method url-fetch)
1924 (uri (pypi-uri "pytest" version))
1925 (sha256
1926 (base32
1927 "1asc4b2nd2a4f0g3r12y97rslq5wliji7b73wwkvdrm5s7mrc1mp"))))
1928 (arguments
1929 `(#:phases
1930 (modify-phases %standard-phases
1931 (add-before 'check 'disable-invalid-test
1932 (lambda _
1933 (substitute* "testing/test_argcomplete.py"
1934 (("def test_remove_dir_prefix" line)
1935 (string-append "@pytest.mark.skip"
1936 "(reason=\"Assumes that /usr exists.\")\n "
1937 line)))
1938 #t)))))
1939 (native-inputs
1940 `(("python-nose" ,python-nose)
1941 ("python-mock" ,python-mock)
1942 ("python-hypothesis" ,python-hypothesis)))
1943 (properties `((python2-variant . ,(delay python2-pytest-3.0))))))
1944
1945 (define-public python2-pytest-3.0
1946 (let ((base (package-with-python2
1947 (strip-python2-variant python-pytest-3.0))))
1948 (package (inherit base)
1949 (native-inputs
1950 `(("python2-enum34" ,python2-enum34)
1951 ,@(package-native-inputs base))))))
1952
1953 (define-public python-pytest-cov
1954 (package
1955 (name "python-pytest-cov")
1956 (version "2.4.0")
1957 (source
1958 (origin
1959 (method url-fetch)
1960 (uri (pypi-uri "pytest-cov" version))
1961 (sha256
1962 (base32
1963 "03c2qc42r4bczyw93gd7n0qi1h1jfhw7fnbhi33c3vp1hs81gm2k"))))
1964 (build-system python-build-system)
1965 (arguments
1966 `(#:phases
1967 (modify-phases %standard-phases
1968 (replace 'check
1969 (lambda _
1970 ;; options taken from tox.ini
1971 ;; TODO: make "--restructuredtext" tests pass. They currently fail
1972 ;; with "Duplicate implicit target name"
1973 (zero? (system* "python" "./setup.py" "check"
1974 "--strict" "--metadata")))))))
1975 (propagated-inputs
1976 `(("python-coverage" ,python-coverage)
1977 ("python-pytest" ,python-pytest)))
1978 (home-page "https://github.com/pytest-dev/pytest-cov")
1979 (synopsis "Pytest plugin for measuring coverage")
1980 (description
1981 "Pytest-cov produces coverage reports. It supports centralised testing and
1982 distributed testing in both @code{load} and @code{each} modes. It also
1983 supports coverage of subprocesses.")
1984 (license license:expat)))
1985
1986 (define-public python2-pytest-cov
1987 (package-with-python2 python-pytest-cov))
1988
1989 (define-public python-pytest-runner
1990 (package
1991 (name "python-pytest-runner")
1992 (version "2.11.1")
1993 (source
1994 (origin
1995 (method url-fetch)
1996 (uri (pypi-uri "pytest-runner" version))
1997 (sha256
1998 (base32
1999 "1cw978kqqcq916b9gfns1qjqvg33c5ail5jhw9054dsynkm32flq"))))
2000 (build-system python-build-system)
2001 (arguments
2002 `(#:phases
2003 (modify-phases %standard-phases
2004 ;; The fancy way of setting the version with setuptools_scm does not
2005 ;; seem to work here.
2006 (add-after 'unpack 'set-version
2007 (lambda _
2008 (substitute* "docs/conf.py"
2009 (("version = setuptools_scm\\.get_version\\(root='\\.\\.')")
2010 (string-append "version = \"" ,version "\"")))
2011 #t)))))
2012 (native-inputs
2013 `(("python-pytest" ,python-pytest)
2014 ("python-setuptools-scm" ,python-setuptools-scm)))
2015 (home-page "https://github.com/pytest-dev/pytest-runner")
2016 (synopsis "Invoke py.test as a distutils command")
2017 (description
2018 "This package provides a @command{pytest-runner} command that
2019 @file{setup.py} files can use to run tests.")
2020 (license license:expat)))
2021
2022 (define-public python2-pytest-runner
2023 (package-with-python2 python-pytest-runner))
2024
2025 (define-public python-pytest-mock
2026 (package
2027 (name "python-pytest-mock")
2028 (version "1.2")
2029 (source
2030 (origin
2031 (method url-fetch)
2032 (uri (pypi-uri "pytest-mock" version ".zip"))
2033 (sha256
2034 (base32
2035 "03zxar5drzm7ksqyrwypjaza3cri6wqvpr6iam92djvg6znp32gp"))))
2036 (build-system python-build-system)
2037 (native-inputs
2038 `(("unzip" ,unzip)))
2039 (propagated-inputs
2040 `(("python-pytest" ,python-pytest)))
2041 (home-page "https://github.com/pytest-dev/pytest-mock/")
2042 (synopsis "Thin-wrapper around the mock package for easier use with py.test")
2043 (description
2044 "This plugin installs a @code{mocker} fixture which is a thin-wrapper
2045 around the patching API provided by the @code{mock} package, but with the
2046 benefit of not having to worry about undoing patches at the end of a test.
2047 The mocker fixture has the same API as @code{mock.patch}, supporting the
2048 same arguments.")
2049 (properties `((python2-variant . ,(delay python2-pytest-mock))))
2050 (license license:expat)))
2051
2052 (define-public python2-pytest-mock
2053 (let ((base (package-with-python2
2054 (strip-python2-variant python-pytest-mock))))
2055 (package (inherit base)
2056 (propagated-inputs
2057 `(("python2-mock" ,python2-mock)
2058 ,@(package-propagated-inputs base))))))
2059
2060 (define-public python-pytest-xdist
2061 (package
2062 (name "python-pytest-xdist")
2063 (version "1.14")
2064 (source
2065 (origin
2066 (method url-fetch)
2067 (uri (pypi-uri "pytest-xdist" version ".zip"))
2068 (sha256
2069 (base32
2070 "08rn2l39ds60xshs4js787l84pfckksqklfq2wq9x8ig2aci2pja"))
2071 (modules '((guix build utils)))
2072 (snippet
2073 '(begin
2074 ;; Remove pre-compiled .pyc files from source.
2075 (for-each delete-file-recursively
2076 (find-files "." "__pycache__" #:directories? #t))
2077 (for-each delete-file (find-files "." "\\.pyc$"))
2078 #t))))
2079 (build-system python-build-system)
2080 (arguments
2081 '(#:tests? #f)) ;FIXME: Some tests are failing.
2082 ;; #:phases
2083 ;; (modify-phases %standard-phases
2084 ;; (delete 'check)
2085 ;; (add-after 'install 'check
2086 ;; (lambda* (#:key inputs outputs #:allow-other-keys)
2087 ;; (add-installed-pythonpath inputs outputs)
2088 ;; (zero? (system* "py.test" "-v")))))
2089 (native-inputs
2090 `(("unzip" ,unzip)
2091 ("python-setuptools-scm" ,python-setuptools-scm)))
2092 (propagated-inputs
2093 `(("python-execnet" ,python-execnet)
2094 ("python-pytest" ,python-pytest)
2095 ("python-py" ,python-py)))
2096 (home-page
2097 "https://github.com/pytest-dev/pytest-xdist")
2098 (synopsis
2099 "Plugin for py.test with distributed testing and loop-on-failing modes")
2100 (description
2101 "The pytest-xdist plugin extends py.test with some unique test execution
2102 modes: parallelization, running tests in boxed subprocesses, the ability
2103 to run tests repeatedly when failed, and the ability to run tests on multiple
2104 Python interpreters or platforms. It uses rsync to copy the existing
2105 program code to a remote location, executes there, and then syncs the
2106 result back.")
2107 (license license:expat)))
2108
2109 (define-public python2-pytest-xdist
2110 (package-with-python2 python-pytest-xdist))
2111
2112 (define-public python-scripttest
2113 (package
2114 (name "python-scripttest")
2115 (version "1.3")
2116 (source
2117 (origin
2118 (method url-fetch)
2119 (uri (string-append
2120 "https://pypi.python.org/packages/source/s/scripttest/scripttest-"
2121 version ".tar.gz"))
2122 (sha256
2123 (base32
2124 "0f4w84k8ck82syys7yg9maz93mqzc8p5ymis941x034v44jzq74m"))))
2125 (build-system python-build-system)
2126 (native-inputs
2127 `(("python-pytest" ,python-pytest)))
2128 (home-page "http://pythonpaste.org/scripttest/")
2129 (synopsis "Python library to test command-line scripts")
2130 (description "Scripttest is a Python helper library for testing
2131 interactive command-line applications. With it you can run a script in a
2132 subprocess and see the output as well as any file modifications.")
2133 (license license:expat)))
2134
2135 (define-public python2-scripttest
2136 (package-with-python2 python-scripttest))
2137
2138 (define-public python-testtools
2139 (package
2140 (name "python-testtools")
2141 (version "1.4.0")
2142 (source
2143 (origin
2144 (method url-fetch)
2145 (uri (pypi-uri "testtools" version))
2146 (sha256
2147 (base32
2148 "1vw8yljnd75d396hhw6s2hrf4cclzy845ifd5am0lxsl235z3i8c"))))
2149 (build-system python-build-system)
2150 (arguments
2151 `(#:phases
2152 (modify-phases %standard-phases
2153 (add-after 'unpack 'fix-module-imports
2154 (lambda _
2155 (substitute* "setup.py"
2156 (("'unittest2>=0.8.0',") ""))
2157 (substitute* '("testtools/testcase.py"
2158 "testtools/testsuite.py"
2159 "testtools/run.py"
2160 "testtools/tests/test_run.py"
2161 "testtools/tests/test_testsuite.py"
2162 "testtools/tests/test_deferredruntest.py")
2163 ;; unittest2 is a backport of Python2.7 features to Python 2.4.
2164 (("import unittest2 as unittest") "import unittest")
2165 (("import unittest2") "import unittest as unittest2")
2166 (("from unittest2 import") "from unittest import"))
2167 (substitute* "testtools/tests/test_testresult.py"
2168 ;; NUL in source code is not allowed (raises ValueError).
2169 (("\\x00\\x04") "\\x04"))
2170 #t)))))
2171 (propagated-inputs
2172 `(("python-mimeparse" ,python-mimeparse)
2173 ("python-extras" ,python-extras)))
2174 (home-page "https://github.com/testing-cabal/testtools")
2175 (synopsis
2176 "Extensions to the Python standard library unit testing framework")
2177 (description
2178 "Testtools extends the Python standard library unit testing framework to
2179 provide matchers, more debugging information, and cross-Python
2180 compatibility.")
2181 (license license:psfl)))
2182
2183 (define-public python2-testtools
2184 (package-with-python2 python-testtools))
2185
2186 (define-public python-testscenarios
2187 (package
2188 (name "python-testscenarios")
2189 (version "0.4")
2190 (source
2191 (origin
2192 (method url-fetch)
2193 (uri (string-append
2194 "https://pypi.python.org/packages/source/t/testscenarios/testscenarios-"
2195 version ".tar.gz"))
2196 (sha256
2197 (base32
2198 "1671jvrvqlmbnc42j7pc5y6vc37q44aiwrq0zic652pxyy2fxvjg"))))
2199 (build-system python-build-system)
2200 (propagated-inputs
2201 `(("python-testtools" ,python-testtools)))
2202 (home-page "https://launchpad.net/testscenarios")
2203 (synopsis "Pyunit extension for dependency injection")
2204 (description
2205 "Testscenarios provides clean dependency injection for Python unittest
2206 style tests.")
2207 (license (list license:bsd-3 license:asl2.0)))) ; at the user's option
2208
2209 (define-public python2-testscenarios
2210 (package-with-python2 python-testscenarios))
2211
2212 (define-public python-testresources
2213 (package
2214 (name "python-testresources")
2215 (version "0.2.7")
2216 (source
2217 (origin
2218 (method url-fetch)
2219 (uri (string-append
2220 "https://pypi.python.org/packages/source/t/testresources/testresources-"
2221 version ".tar.gz"))
2222 (sha256
2223 (base32
2224 "0cbj3plbllyz42c4b5xxgwaa7mml54lakslrn4kkhinxhdri22md"))))
2225 (build-system python-build-system)
2226 (home-page "https://launchpad.net/testresources")
2227 (synopsis
2228 "Pyunit extension for managing test resources")
2229 (description
2230 "Testresources is an extension to Python's unittest to allow declarative
2231 use of resources by test cases.")
2232 (license (list license:bsd-3 license:asl2.0)))) ; at the user's option
2233
2234 (define-public python2-testresources
2235 (package-with-python2 python-testresources))
2236
2237 (define-public python-subunit
2238 (package
2239 (name "python-subunit")
2240 (version "0.0.21")
2241 (source
2242 (origin
2243 (method url-fetch)
2244 (uri (string-append
2245 "https://pypi.python.org/packages/source/p/python-subunit/python-subunit-"
2246 version ".tar.gz"))
2247 (sha256
2248 (base32
2249 "1nkw9wfbvizmpajbj3in8ns07g7lwkiv8hip14jjlwk3cacls6jv"))))
2250 (build-system python-build-system)
2251 (propagated-inputs
2252 `(("python-extras" ,python-extras)
2253 ("python-mimeparse" ,python-mimeparse)))
2254 (native-inputs
2255 `(("python-testscenarios" ,python-testscenarios)))
2256 (home-page "http://launchpad.net/subunit")
2257 (synopsis "Python implementation of the subunit protocol")
2258 (description
2259 "Python-subunit is a Python implementation of the subunit test streaming
2260 protocol.")
2261 (license (list license:bsd-3 license:asl2.0)))) ; at the user's option
2262
2263 (define-public python2-subunit
2264 (package-with-python2 python-subunit))
2265
2266 ;; Recent versions of python-fixtures and python-testrepository need
2267 ;; python-pbr for packaging, which itself needs these two packages for
2268 ;; testing.
2269 ;; To fix this circular dependency, we use a build of python-pbr, based on the
2270 ;; same source, just without any test dependencies and with tests disabled.
2271 ;; python-pbr-minmal is then used to package python-fixtures and
2272 ;; python-testrepository.
2273 ;; Strictly speaking we currently could remove the test-requirements from the
2274 ;; normal python-pbr package (and save this package) since test are disabled
2275 ;; there anyway. But this may change in future.
2276 (define python-pbr-minimal
2277 (package
2278 (name "python-pbr-minimal")
2279 (version "3.0.1")
2280 (source
2281 (origin
2282 (method url-fetch)
2283 (uri (pypi-uri "pbr" version))
2284 (sha256
2285 (base32
2286 "14fs5acnalnb3h62s7q7av239j541fk0n0z0lawh4h09b1s93s6p"))))
2287 (build-system python-build-system)
2288 (arguments
2289 `(#:tests? #f))
2290 (home-page "http://docs.openstack.org/developer/pbr/")
2291 (synopsis "Minimal build of python-pbr used for bootstrapping")
2292 (description
2293 "Used only for bootstrapping python2-pbr, you should not need this.")
2294 (license license:asl2.0)))
2295
2296 (define python2-pbr-minimal
2297 (package-with-python2 python-pbr-minimal))
2298
2299 (define-public python-pbr
2300 (package
2301 (inherit python-pbr-minimal)
2302 (name "python-pbr")
2303 (arguments
2304 `(#:tests? #f)) ;; Most tests seem to use the Internet.
2305 (propagated-inputs
2306 `(("git" ,git))) ;; pbr actually uses the "git" binary.
2307 (native-inputs
2308 `(("python-fixtures" ,python-fixtures)
2309 ;; discover, coverage, hacking, subunit
2310 ("python-mock" ,python-mock)
2311 ("python-six" ,python-six)
2312 ("python-sphinx" ,python-sphinx)
2313 ("python-testrepository" ,python-testrepository)
2314 ("python-testresources" ,python-testresources)
2315 ("python-testscenarios" ,python-testscenarios)
2316 ("python-testtools" ,python-testtools)
2317 ("python-virtualenv" ,python-virtualenv)))
2318 (synopsis "Enhance the default behavior of Python’s setuptools")
2319 (description
2320 "Python Build Reasonableness (PBR) is a library that injects some useful
2321 and sensible default behaviors into your setuptools run. It will set
2322 versions, process requirements files and generate AUTHORS and ChangeLog file
2323 from git information.
2324 ")))
2325
2326 (define-public python2-pbr
2327 (package-with-python2 python-pbr))
2328
2329 (define-public python-fixtures
2330 (package
2331 (name "python-fixtures")
2332 (version "1.4.0")
2333 (source
2334 (origin
2335 (method url-fetch)
2336 (uri (pypi-uri "fixtures" version))
2337 (sha256
2338 (base32
2339 "0djxvdwm8s60dbfn7bhf40x6g818p3b3mlwijm1c3bqg7msn271y"))))
2340 (build-system python-build-system)
2341 (arguments
2342 '(#:phases
2343 (modify-phases %standard-phases
2344 (replace 'check
2345 (lambda _
2346 (zero? (system* "python" "-m" "testtools.run"
2347 "fixtures.test_suite")))))))
2348 (propagated-inputs
2349 `(("python-six" ,python-six)))
2350 (native-inputs
2351 `(("python-mock" ,python-mock)
2352 ("python-pbr-minimal" ,python-pbr-minimal)
2353 ("python-testtools" ,python-testtools)))
2354 (home-page "https://launchpad.net/python-fixtures")
2355 (synopsis "Python test fixture library")
2356 (description
2357 "Fixtures provides a way to create reusable state, useful when writing
2358 Python tests.")
2359 (license (list license:bsd-3 license:asl2.0)))) ; at user's option
2360
2361 (define-public python2-fixtures
2362 (package-with-python2 python-fixtures))
2363
2364 (define-public python-testrepository
2365 (package
2366 (name "python-testrepository")
2367 (version "0.0.20")
2368 (source
2369 (origin
2370 (method url-fetch)
2371 (uri (string-append
2372 "https://pypi.python.org/packages/source/t/testrepository/testrepository-"
2373 version ".tar.gz"))
2374 (sha256
2375 (base32
2376 "1ssqb07c277010i6gzzkbdd46gd9mrj0bi0i8vn560n2k2y4j93m"))))
2377 (build-system python-build-system)
2378 (arguments
2379 ;; FIXME: Many tests are failing.
2380 '(#:tests? #f))
2381 (propagated-inputs
2382 `(("python-fixtures" ,python-fixtures)
2383 ("python-subunit" ,python-subunit)
2384 ("python-testtools" ,python-testtools)))
2385 (native-inputs
2386 `(("python-pbr-minimal" ,python-pbr-minimal) ;; same as for building fixture
2387 ("python-mimeparse" ,python-mimeparse)))
2388 (home-page "https://launchpad.net/testrepository")
2389 (synopsis "Database for Python test results")
2390 (description "Testrepository provides a database of test results which can
2391 be used as part of a developer's workflow to check things such as what tests
2392 have failed since the last commit or what tests are currently failing.")
2393 (license (list license:bsd-3 license:asl2.0)))) ; at user's option
2394
2395 (define-public python2-testrepository
2396 (package-with-python2 python-testrepository))
2397
2398 (define-public python-coverage
2399 (package
2400 (name "python-coverage")
2401 (version "4.1")
2402 (source
2403 (origin
2404 (method url-fetch)
2405 (uri (pypi-uri "coverage" version))
2406 (sha256
2407 (base32
2408 "01rbr4br4lsk0lwn8fb96zwd2xr4f0mg1w7iq3j11i8f5ig2nqs1"))))
2409 (build-system python-build-system)
2410 (arguments
2411 ;; FIXME: 95 tests failed, 539 passed, 6 skipped, 2 errors.
2412 '(#:tests? #f))
2413 (home-page "http://nedbatchelder.com/code/coverage")
2414 (synopsis "Code coverage measurement for Python")
2415 (description
2416 "Coverage measures code coverage, typically during test execution. It
2417 uses the code analysis tools and tracing hooks provided in the Python standard
2418 library to determine which lines are executable, and which have been
2419 executed.")
2420 (license license:bsd-3)))
2421
2422 (define-public python2-coverage
2423 (package-with-python2 python-coverage))
2424
2425 (define-public python-cov-core
2426 (package
2427 (name "python-cov-core")
2428 (version "1.15.0")
2429 (source
2430 (origin
2431 (method url-fetch)
2432 (uri (pypi-uri "cov-core" version))
2433 (sha256
2434 (base32
2435 "0k3np9ymh06yv1ib96sb6wfsxjkqhmik8qfsn119vnhga9ywc52a"))))
2436 (build-system python-build-system)
2437 (propagated-inputs
2438 `(("python-coverage" ,python-coverage)))
2439 (home-page "https://github.com/schlamar/cov-core")
2440 (synopsis "Coverage plugin core for pytest-cov, nose-cov and nose2-cov")
2441 (description
2442 "This is a library package for use by @code{pytest-cov}, @code{nose-cov}
2443 and @code{nose2-cov}. It is useful for developing coverage plugins for these
2444 testing frameworks.")
2445 (license license:expat)))
2446
2447 (define-public python2-cov-core
2448 (package-with-python2 python-cov-core))
2449
2450 (define-public python-discover
2451 (package
2452 (name "python-discover")
2453 (version "0.4.0")
2454 (source
2455 (origin
2456 (method url-fetch)
2457 (uri (string-append
2458 "https://pypi.python.org/packages/source/d/discover/discover-"
2459 version ".tar.gz"))
2460 (sha256
2461 (base32
2462 "0y8d0zwiqar51kxj8lzmkvwc3b8kazb04gk5zcb4nzg5k68zmhq5"))))
2463 (build-system python-build-system)
2464 (home-page "http://pypi.python.org/pypi/discover/")
2465 (synopsis
2466 "Python test discovery for unittest")
2467 (description
2468 "Discover provides test discovery for unittest, a feature that has been
2469 backported from Python 2.7 for Python 2.4+.")
2470 (license license:bsd-3)))
2471
2472 (define-public python2-discover
2473 (package-with-python2 python-discover))
2474
2475 (define-public behave
2476 (package
2477 (name "behave")
2478 (version "1.2.5")
2479 (source (origin
2480 (method url-fetch)
2481 (uri (pypi-uri "behave" version ".tar.bz2"))
2482 (sha256
2483 (base32
2484 "1iypp6z46r19n4xmgx6m1lwmlpfjh8vapq8izigrqlaarvp2y64c"))))
2485 (build-system python-build-system)
2486 (propagated-inputs
2487 `(("python-six" ,python-six)
2488 ("python-parse" ,python-parse)
2489 ("python-parse-type" ,python-parse-type)))
2490 (arguments `(#:tests? #f)) ;TODO: tests require nose>=1.3 and
2491 ;PyHamcrest>=1.8
2492 (home-page "https://github.com/behave/behave")
2493 (synopsis "Python behavior-driven development")
2494 (description
2495 "Behave is a tool for behavior-driven development in python.
2496 Behavior-driven development (or BDD) is an agile software development
2497 technique that encourages collaboration between developers, QA and
2498 non-technical or business participants in a software project. Behave uses
2499 tests written in a natural language style, backed up by Python code.")
2500 (license license:x11)))
2501
2502 (define-public python-exif-read
2503 (package
2504 (name "python-exif-read")
2505 (version "2.1.2")
2506 (source (origin
2507 (method url-fetch)
2508 (uri (pypi-uri "ExifRead" version))
2509 (sha256
2510 (base32
2511 "1b90jf6m9vxh9nanhpyvqdq7hmfx5iggw1l8kq10jrs6xgr49qkr"))))
2512 (build-system python-build-system)
2513 (arguments `(#:tests? #f)) ; no tests
2514 (home-page "https://github.com/ianare/exif-py")
2515 (synopsis "Python library to extract EXIF data from image files")
2516 (description
2517 "ExifRead is a Python library to extract EXIF data from tiff and jpeg
2518 files.")
2519 (license license:bsd-3)))
2520
2521 (define-public python2-exif-read
2522 (package-with-python2 python-exif-read))
2523
2524 (define-public python-pyld
2525 (package
2526 (name "python-pyld")
2527 (version "0.7.1")
2528 (source (origin
2529 (method url-fetch)
2530 (uri (pypi-uri "PyLD" version))
2531 (sha256
2532 (base32
2533 "1m0fs6897vxfkf7awah5i66i7b7smm5fnywf1w50fpzyfbfhr156"))))
2534 (build-system python-build-system)
2535 (arguments `(#:tests? #f)) ; no tests
2536 (home-page "https://github.com/digitalbazaar/pyld")
2537 (synopsis "Python implementation of the JSON-LD specification")
2538 (description
2539 "PyLD is an implementation of the JSON-LD specification.")
2540 (license license:bsd-3)))
2541
2542 (define-public python2-pyld
2543 (package-with-python2 python-pyld))
2544
2545 (define-public python-certifi
2546 (package
2547 (name "python-certifi")
2548 (version "2017.1.23")
2549 (source (origin
2550 (method url-fetch)
2551 (uri (pypi-uri "certifi" version))
2552 (sha256
2553 (base32
2554 "1klrzl3hgvcf2mjk00g0k3kk1p2z27vzwnxivwar4vhjmjvpz1w1"))))
2555 (build-system python-build-system)
2556 (home-page "https://certifi.io/")
2557 (synopsis "Python CA certificate bundle")
2558 (description
2559 "Certifi is a Python library that contains a CA certificate bundle, which
2560 is used by the Requests library to verify HTTPS requests.")
2561 (license license:asl2.0)))
2562
2563 (define-public python2-certifi
2564 (package-with-python2 python-certifi))
2565
2566 (define-public python-click
2567 (package
2568 (name "python-click")
2569 (version "6.7")
2570 (source
2571 (origin
2572 (method url-fetch)
2573 (uri (pypi-uri "click" version))
2574 (sha256
2575 (base32
2576 "02qkfpykbq35id8glfgwc38yc430427yd05z1wc5cnld8zgicmgi"))))
2577 (build-system python-build-system)
2578 (arguments
2579 `(#:phases
2580 (modify-phases %standard-phases
2581 (add-after 'unpack 'fix-paths
2582 (lambda* (#:key inputs #:allow-other-keys)
2583 (let ((glibc (assoc-ref inputs ,(if (%current-target-system)
2584 "cross-libc" "libc"))))
2585 (substitute* "click/_unicodefun.py"
2586 (("'locale'")
2587 (string-append "'" glibc "/bin/locale'"))))
2588 #t))
2589 (replace 'check
2590 (lambda _
2591 (zero? (system* "make" "test")))))))
2592 (native-inputs
2593 `(("python-pytest" ,python-pytest)))
2594 (home-page "http://click.pocoo.org")
2595 (synopsis "Command line library for Python")
2596 (description
2597 "Click is a Python package for creating command line interfaces in a
2598 composable way with as little code as necessary. Its name stands for
2599 \"Command Line Interface Creation Kit\". It's highly configurable but comes
2600 with sensible defaults out of the box.")
2601 (license license:bsd-3)))
2602
2603 (define-public python2-click
2604 (package-with-python2 python-click))
2605
2606 (define-public python-wheel
2607 (package
2608 (name "python-wheel")
2609 (version "0.30.0a0")
2610 (source
2611 (origin
2612 (method url-fetch)
2613 (uri (pypi-uri "wheel" version))
2614 (sha256
2615 (base32
2616 "1nm6mn8isny0hr86rhbfrpfj867c0phf001xgsd69xfp9ady1wwq"))))
2617 (build-system python-build-system)
2618 (native-inputs
2619 `(("python-jsonschema" ,python-jsonschema)
2620 ("python-pytest-cov" ,python-pytest-cov)))
2621 (home-page "https://bitbucket.org/pypa/wheel/")
2622 (synopsis "Format for built Python packages")
2623 (description
2624 "A wheel is a ZIP-format archive with a specially formatted filename and
2625 the @code{.whl} extension. It is designed to contain all the files for a PEP
2626 376 compatible install in a way that is very close to the on-disk format. Many
2627 packages will be properly installed with only the @code{Unpack} step and the
2628 unpacked archive preserves enough information to @code{Spread} (copy data and
2629 scripts to their final locations) at any later time. Wheel files can be
2630 installed with a newer @code{pip} or with wheel's own command line utility.")
2631 (license license:expat)
2632 (properties `((python2-variant . ,(delay python2-wheel))))))
2633
2634 (define-public python2-wheel
2635 (let ((wheel (package-with-python2
2636 (strip-python2-variant python-wheel))))
2637 (package (inherit wheel)
2638 (native-inputs `(("python2-functools32" ,python2-functools32)
2639 ,@(package-native-inputs wheel))))))
2640
2641
2642 (define-public python-requests
2643 (package
2644 (name "python-requests")
2645 (version "2.13.0")
2646 (source (origin
2647 (method url-fetch)
2648 (uri (pypi-uri "requests" version))
2649 (sha256
2650 (base32
2651 "1s0wg4any4dsv5l3hqjxqk2zgb7pdbqhy9rhc8kh3aigfq4ws8jp"))))
2652 ;; TODO: unbundle urllib3 and chardet.
2653 (build-system python-build-system)
2654 (arguments
2655 ;; FIXME: Some tests require network access.
2656 '(#:tests? #f))
2657 (home-page "http://python-requests.org/")
2658 (synopsis "Python HTTP library")
2659 (description
2660 "Requests is a Python HTTP client library. It aims to be easier to use
2661 than Python’s urllib2 library.")
2662 (license license:asl2.0)))
2663
2664 ;; Some software requires an older version of Requests, notably Docker
2665 ;; Compose.
2666 (define-public python-requests-2.7
2667 (package (inherit python-requests)
2668 (version "2.7.0")
2669 (source (origin
2670 (method url-fetch)
2671 (uri (pypi-uri "requests" version))
2672 (sha256
2673 (base32
2674 "0gdr9dxm24amxpbyqpbh3lbwxc2i42hnqv50sigx568qssv3v2ir"))))))
2675
2676 (define-public python2-requests
2677 (package-with-python2 python-requests))
2678
2679 (define-public python-vcversioner
2680 (package
2681 (name "python-vcversioner")
2682 (version "2.16.0.0")
2683 (source
2684 (origin
2685 (method url-fetch)
2686 (uri (pypi-uri "vcversioner" version))
2687 (sha256
2688 (base32
2689 "16z10sm78jd7ca3jbkgc3q5i8a8q7y1h21q1li21yy3rlhbhrrns"))))
2690 (build-system python-build-system)
2691 (synopsis "Python library for version number discovery")
2692 (description "Vcversioner is a Python library that inspects tagging
2693 information in a variety of version control systems in order to discover
2694 version numbers.")
2695 (home-page "https://github.com/habnabit/vcversioner")
2696 (license license:isc)))
2697
2698 (define-public python2-vcversioner
2699 (package-with-python2 python-vcversioner))
2700
2701 (define-public python-jsonschema
2702 (package
2703 (name "python-jsonschema")
2704 (version "2.5.1")
2705 (source (origin
2706 (method url-fetch)
2707 (uri
2708 (string-append
2709 "https://pypi.python.org/packages/source/j/jsonschema/jsonschema-"
2710 version ".tar.gz"))
2711 (sha256
2712 (base32
2713 "0hddbqjm4jq63y8jf44nswina1crjs16l9snb6m3vvgyg31klrrn"))))
2714 (build-system python-build-system)
2715 (arguments
2716 '(#:phases
2717 (modify-phases %standard-phases
2718 (replace 'check (lambda _ (zero? (system* "nosetests")))))))
2719 (native-inputs
2720 `(("python-nose" ,python-nose)
2721 ("python-vcversioner" ,python-vcversioner)))
2722 (home-page "https://github.com/Julian/jsonschema")
2723 (synopsis "Implementation of JSON Schema for Python")
2724 (description
2725 "Jsonschema is an implementation of JSON Schema for Python.")
2726 (license license:expat)
2727 (properties `((python2-variant . ,(delay python2-jsonschema))))))
2728
2729 (define-public python2-jsonschema
2730 (let ((jsonschema (package-with-python2
2731 (strip-python2-variant python-jsonschema))))
2732 (package (inherit jsonschema)
2733 (native-inputs
2734 `(("python2-mock" ,python2-mock)
2735 ,@(package-native-inputs jsonschema)))
2736 (propagated-inputs
2737 `(("python2-functools32" ,python2-functools32))))))
2738
2739 (define-public python-schema
2740 (package
2741 (name "python-schema")
2742 (version "0.6.6")
2743 (source
2744 (origin
2745 (method url-fetch)
2746 (uri (pypi-uri "schema" version))
2747 (sha256
2748 (base32
2749 "1lw28j9w9vxyigg7vkfkvi6ic9lgjkdnfvnxdr7pklslqvzmk2vm"))))
2750 (build-system python-build-system)
2751 (native-inputs
2752 `(("python-pytest" ,python-pytest)))
2753 (home-page "https://github.com/keleshev/schema")
2754 (synopsis "Simple data validation library")
2755 (description
2756 "@code{python-schema} is a library for validating Python data
2757 structures, such as those obtained from config-files, forms, external
2758 services or command-line parsing, converted from JSON/YAML (or
2759 something else) to Python data-types.")
2760 (license license:psfl)))
2761
2762 (define-public python2-schema
2763 (package-with-python2 python-schema))
2764
2765 (define-public python-schema-0.5
2766 (package (inherit python-schema)
2767 (version "0.5.0")
2768 (source
2769 (origin
2770 (method url-fetch)
2771 (uri (pypi-uri "schema" version))
2772 (sha256
2773 (base32
2774 "10zqvpaky51kgb8nd42bk7jwl8cn2zvayxjpdc1wwmpybj92x67s"))))))
2775
2776 (define-public python2-schema-0.5
2777 (package-with-python2 python-schema-0.5))
2778
2779 (define-public python-kitchen
2780 (package
2781 (name "python-kitchen")
2782 (version "1.2.4")
2783 (source
2784 (origin
2785 (method url-fetch)
2786 (uri (pypi-uri "kitchen" version))
2787 (sha256
2788 (base32
2789 "0ggv3p4x8jvmmzhp0xm00h6pvh1g0gmycw71rjwagnrj8n23vxrq"))))
2790 (build-system python-build-system)
2791 (propagated-inputs
2792 `(("python-chardet" ,python-chardet)))
2793 (home-page "https://github.com/fedora-infra/kitchen")
2794 (synopsis "Python API for snippets")
2795 (description "@code{kitchen} module provides a python API for all sorts of
2796 little useful snippets of code that everybody ends up writing for their projects
2797 but never seem big enough to build an independent release. Use kitchen and stop
2798 cutting and pasting that code over and over.")
2799 (license (list license:lgpl2.1+
2800 ;; subprocess.py, test_subprocess.py,
2801 ;; kitchen/pycompat25/defaultdict.py:
2802 license:psfl))))
2803
2804 (define-public python2-kitchen
2805 (package-with-python2 python-kitchen))
2806
2807 (define-public python-unidecode
2808 (package
2809 (name "python-unidecode")
2810 (version "0.04.20")
2811 (source (origin
2812 (method url-fetch)
2813 (uri (pypi-uri "Unidecode" version))
2814 (sha256
2815 (base32
2816 "1q00i8gpsq3d9r0q8wk4b290fxl0kqlsdk7iadvli45in6s1hi7d"))))
2817 (build-system python-build-system)
2818 (home-page "https://pypi.python.org/pypi/Unidecode")
2819 (synopsis "ASCII transliterations of Unicode text")
2820 (description
2821 "Unidecode provides ASCII transliterations of Unicode text. Unidecode is
2822 useful when integrating with legacy code that doesn't support Unicode, or for
2823 ease of entry of non-Roman names on a US keyboard, or when constructing ASCII
2824 machine identifiers from human-readable Unicode strings that should still be
2825 somewhat intelligeble.")
2826 (license license:gpl2+)))
2827
2828 (define-public python2-unidecode
2829 (package-with-python2 python-unidecode))
2830
2831 (define-public python-pyjwt
2832 (package
2833 (name "python-pyjwt")
2834 (version "1.4.0")
2835 (source
2836 (origin
2837 (method url-fetch)
2838 (uri (pypi-uri "PyJWT" version))
2839 (sha256
2840 (base32
2841 "1556v2jppd8mjkkj66pxb5rcazm35jq81r233mdl8hfmz9n3icp1"))))
2842 (build-system python-build-system)
2843 (native-inputs
2844 `(("python-pytest" ,python-pytest)
2845 ("python-pytest-cov" ,python-pytest-cov)
2846 ("python-pytest-runner" ,python-pytest-runner)))
2847 (home-page "https://github.com/progrium/pyjwt")
2848 (synopsis "JSON Web Token implementation in Python")
2849 (description
2850 "PyJWT is a JSON Web Token implementation written in Python.")
2851 (license license:expat)))
2852
2853 (define-public python2-pyjwt
2854 (package-with-python2 python-pyjwt))
2855
2856 (define-public python-pykka
2857 (package
2858 (name "python-pykka")
2859 (version "1.2.1")
2860 (source
2861 (origin
2862 (method url-fetch)
2863 (uri (pypi-uri "Pykka" version))
2864 (sha256
2865 (base32
2866 "049w3r0mdnnw7xv19jiq7rvls9k7xs73x05b4qs5d6z4vvmgyiz8"))))
2867 (build-system python-build-system)
2868 (native-inputs
2869 `(("python-mock" ,python-mock)
2870 ("python-nose" ,python-nose)
2871 ("python-gevent" ,python-gevent)
2872 ("python-eventlet" ,python-eventlet)))
2873 (home-page "https://www.pykka.org/")
2874 (synopsis "Pykka is a Python implementation of the actor model")
2875 (description
2876 "Pykka is a Python implementation of the actor model.
2877 The actor model introduces some simple rules to control the sharing
2878 of state and cooperation between execution units, which makes it
2879 easier to build concurrent applications.")
2880 (license license:asl2.0)))
2881
2882 (define-public python2-pykka
2883 (package-with-python2 python-pykka))
2884
2885 (define-public python-oauthlib
2886 (package
2887 (name "python-oauthlib")
2888 (version "1.0.3")
2889 (source (origin
2890 (method url-fetch)
2891 (uri (pypi-uri "oauthlib" version))
2892 (sha256
2893 (base32
2894 "1bfrj70vdjxjw74khbyh6f0dksv7p5rh2346jnlrffyacd3gwjzg"))))
2895 (build-system python-build-system)
2896 (native-inputs
2897 `(("python-nose" ,python-nose)
2898 ("python-mock" ,python-mock)
2899 ("python-cryptography" ,python-cryptography)
2900 ("python-pyjwt" ,python-pyjwt)
2901 ("python-blinker" ,python-blinker)))
2902 (home-page "https://github.com/idan/oauthlib")
2903 (synopsis "OAuth implementation for Python")
2904 (description
2905 "Oauthlib is a generic, spec-compliant, thorough implementation of the
2906 OAuth request-signing logic.")
2907 (license license:bsd-3)
2908 (properties `((python2-variant . ,(delay python2-oauthlib))))))
2909
2910 (define-public python2-oauthlib
2911 (let ((base (package-with-python2 (strip-python2-variant python-oauthlib))))
2912 (package
2913 (inherit base)
2914 (native-inputs `(("python2-unittest2" ,python2-unittest2)
2915 ,@(package-native-inputs base))))))
2916
2917 (define-public python-itsdangerous
2918 (package
2919 (name "python-itsdangerous")
2920 (version "0.24")
2921 (source
2922 (origin
2923 (method url-fetch)
2924 (uri (string-append
2925 "https://pypi.python.org/packages/source/i/itsdangerous/itsdangerous-"
2926 version ".tar.gz"))
2927 (sha256
2928 (base32
2929 "06856q6x675ly542ig0plbqcyab6ksfzijlyf1hzhgg3sgwgrcyb"))))
2930 (build-system python-build-system)
2931 (home-page "https://github.com/mitsuhiko/itsdangerous")
2932 (synopsis "Python library for passing data to/from untrusted environments")
2933 (description
2934 "Itsdangerous provides various helpers to pass trusted data to untrusted
2935 environments and back.")
2936 (license license:bsd-3)))
2937
2938 (define-public python2-itsdangerous
2939 (package-with-python2 python-itsdangerous))
2940
2941 (define-public python-pyyaml
2942 (package
2943 (name "python-pyyaml")
2944 (version "3.12")
2945 (source
2946 (origin
2947 (method url-fetch)
2948 (uri (pypi-uri "PyYAML" version))
2949 (sha256
2950 (base32
2951 "1aqjl8dk9amd4zr99n8v2qxzgmr2hdvqfma4zh7a41rj6336c9sr"))))
2952 (build-system python-build-system)
2953 (inputs
2954 `(("libyaml" ,libyaml)))
2955 (home-page "http://pyyaml.org/wiki/PyYAML")
2956 (synopsis "YAML parser and emitter for Python")
2957 (description
2958 "PyYAML is a YAML parser and emitter for Python. PyYAML features a
2959 complete YAML 1.1 parser, Unicode support, pickle support, capable extension
2960 API, and sensible error messages. PyYAML supports standard YAML tags and
2961 provides Python-specific tags that allow to represent an arbitrary Python
2962 object.")
2963 (license license:expat)))
2964
2965 (define-public python2-pyyaml
2966 (package-with-python2 python-pyyaml))
2967
2968 (define-public python-virtualenv
2969 (package
2970 (name "python-virtualenv")
2971 (version "15.0.3")
2972 (source
2973 (origin
2974 (method url-fetch)
2975 (uri (pypi-uri "virtualenv" version))
2976 (sha256
2977 (base32
2978 "07cbajzk8l05k5zhlw0b9wbf2is65bl9v6zrn2a0iyn57w6pd73d"))))
2979 (build-system python-build-system)
2980 (arguments
2981 `(#:phases
2982 (modify-phases %standard-phases
2983 (replace 'check
2984 (lambda _
2985 ;; Disable failing test. See upstream bug report
2986 ;; https://github.com/pypa/virtualenv/issues/957
2987 (substitute* "tests/test_virtualenv.py"
2988 (("skipif.*") "skipif(True, reason=\"Guix\")\n"))
2989 (zero? (system* "py.test")))))))
2990 (native-inputs
2991 `(("python-mock" ,python-mock)
2992 ("python-pytest" ,python-pytest)))
2993 (home-page "https://virtualenv.pypa.io/")
2994 (synopsis "Virtual Python environment builder")
2995 (description
2996 "Virtualenv is a tool to create isolated Python environments.")
2997 (license license:expat)))
2998
2999 (define-public python2-virtualenv
3000 (package-with-python2 python-virtualenv))
3001
3002 (define-public python-markupsafe
3003 (package
3004 (name "python-markupsafe")
3005 (version "0.23")
3006 (source
3007 (origin
3008 (method url-fetch)
3009 (uri (string-append
3010 "https://pypi.python.org/packages/source/M/MarkupSafe/MarkupSafe-"
3011 version ".tar.gz"))
3012 (sha256
3013 (base32
3014 "1hvip33wva3fnmvfp9x5klqri7hpl1hkgqmjbss18nmrb7zimv54"))))
3015 (build-system python-build-system)
3016 (home-page "https://github.com/mitsuhiko/markupsafe")
3017 (synopsis "XML/HTML/XHTML markup safe string implementation for Python")
3018 (description
3019 "Markupsafe provides an XML/HTML/XHTML markup safe string implementation
3020 for Python.")
3021 (license license:bsd-3)))
3022
3023 (define-public python2-markupsafe
3024 (package-with-python2 python-markupsafe))
3025
3026 (define-public python-jinja2
3027 (package
3028 (name "python-jinja2")
3029 (version "2.8")
3030 (source
3031 (origin
3032 (method url-fetch)
3033 (uri (pypi-uri "Jinja2" version))
3034 (sha256
3035 (base32
3036 "1x0v41lp5m1pjix3l46zx02b7lqp2hflgpnxwkywxynvi3zz47xw"))))
3037 (build-system python-build-system)
3038 (propagated-inputs
3039 `(("python-markupsafe" ,python-markupsafe)))
3040 (home-page "http://jinja.pocoo.org/")
3041 (synopsis "Python template engine")
3042 (description
3043 "Jinja2 is a small but fast and easy to use stand-alone template engine
3044 written in pure Python.")
3045 (license license:bsd-3)))
3046
3047 (define-public python2-jinja2
3048 (package-with-python2 python-jinja2))
3049
3050 (define-public python-pystache
3051 (package
3052 (name "python-pystache")
3053 (version "0.5.4")
3054 (source (origin
3055 (method url-fetch)
3056 (uri (pypi-uri "pystache" version))
3057 (sha256
3058 (base32
3059 "0nmqsfmiw4arjxqkmf9z66ml950pcdjk6aq4gin4sywmzdjw5fzp"))))
3060 (build-system python-build-system)
3061 (arguments
3062 '(#:tests? #f)) ; FIXME: Python 3 tests are failing.
3063 (home-page "http://defunkt.io/pystache/")
3064 (synopsis "Python logic-less template engine")
3065 (description
3066 "Pystache is a Python implementation of the framework agnostic,
3067 logic-free templating system Mustache.")
3068 (license license:expat)
3069 (properties `((python2-variant . ,(delay python2-pystache))))))
3070
3071 (define-public python2-pystache
3072 (package (inherit (package-with-python2
3073 (strip-python2-variant python-pystache)))
3074 (arguments
3075 `(#:python ,python-2
3076 #:phases
3077 (modify-phases %standard-phases
3078 (replace 'check
3079 (lambda _
3080 (zero? (system* "python" "test_pystache.py")))))))))
3081
3082 (define-public python-joblib
3083 (package
3084 (name "python-joblib")
3085 (version "0.10.3")
3086 (source (origin
3087 (method url-fetch)
3088 (uri (pypi-uri "joblib" version))
3089 (sha256
3090 (base32
3091 "0787k919zlfmgymprz5bzv0v1df5bbirlf3awrghmjgvkrd9dci9"))
3092 (modules '((guix build utils)))
3093 (snippet
3094 '(begin
3095 ;; Remove pre-compiled .pyc files from source.
3096 (for-each delete-file-recursively
3097 (find-files "." "__pycache__" #:directories? #t))
3098 (for-each delete-file (find-files "." "\\.pyc$"))
3099 #t))))
3100 (build-system python-build-system)
3101 (arguments
3102 `(#:phases
3103 (modify-phases %standard-phases
3104 (add-before 'check 'disable-failing-tests
3105 (lambda _
3106 ;; This numpydoc tests fails for unknown reasons
3107 (delete-file "doc/sphinxext/numpydoc/tests/test_docscrape.py")
3108 ;; This numpydoc test depends on matplotlib, which is not a
3109 ;; required input.
3110 (delete-file "doc/sphinxext/numpydoc/tests/test_plot_directive.py")
3111 ;; These tests fail to execute sys.executable
3112 (substitute* "joblib/test/test_parallel.py"
3113 (("import nose" line)
3114 (string-append "from nose.plugins.skip import SkipTest\n" line))
3115 (("def test_nested_parallel_warnings" line)
3116 (string-append "@SkipTest\n" line))
3117 (("def test_parallel_with_interactively_defined_functions" line)
3118 (string-append "@SkipTest\n" line)))
3119 #t)))))
3120 ;; Provide nose to enable tests command
3121 (native-inputs
3122 `(("python-nose" ,python-nose)
3123 ("python-sphinx" ,python-sphinx)
3124 ("python-docutils" ,python-docutils)
3125 ("python-numpydoc" ,python-numpydoc)))
3126 (home-page "http://pythonhosted.org/joblib/")
3127 (synopsis "Using Python functions as pipeline jobs")
3128 (description
3129 "Joblib is a set of tools to provide lightweight pipelining in Python.
3130 In particular, joblib offers: transparent disk-caching of the output values
3131 and lazy re-evaluation (memoize pattern), easy simple parallel computing
3132 logging and tracing of the execution.")
3133 (license license:bsd-3)))
3134
3135 (define-public python2-joblib
3136 (package-with-python2 python-joblib))
3137
3138 (define-public python-docutils
3139 (package
3140 (name "python-docutils")
3141 (version "0.13.1")
3142 (source
3143 (origin
3144 (method url-fetch)
3145 (uri (pypi-uri "docutils" version))
3146 (sha256
3147 (base32
3148 "1gkma47i609jfs7dssxn4y9vsz06qi0l5q41nws0zgkpnrghz33i"))))
3149 (build-system python-build-system)
3150 (arguments
3151 '(#:tests? #f)) ; no setup.py test command
3152 (home-page "http://docutils.sourceforge.net/")
3153 (synopsis "Python Documentation Utilities")
3154 (description
3155 "Docutils is a modular system for processing documentation into useful
3156 formats, such as HTML, XML, and LaTeX. For input Docutils supports
3157 reStructuredText.")
3158 ;; Most of the source code is public domain, but some source files are
3159 ;; licensed under the PFSL, BSD 2-clause, and GPLv3+ licenses.
3160 (license (list license:public-domain license:psfl license:bsd-2 license:gpl3+))))
3161
3162 (define-public python2-docutils
3163 (package-with-python2 python-docutils))
3164
3165 (define-public python-pygments
3166 (package
3167 (name "python-pygments")
3168 (version "2.1.3")
3169 (source
3170 (origin
3171 (method url-fetch)
3172 (uri (pypi-uri "Pygments" version))
3173 (sha256
3174 (base32
3175 "10axnp2wpjnq9g8wg53fx0c70dfxqrz498jyz8mrdx9a3flwir48"))))
3176 (build-system python-build-system)
3177 (arguments
3178 ;; FIXME: Tests require sphinx, which depends on this.
3179 '(#:tests? #f))
3180 (home-page "http://pygments.org/")
3181 (synopsis "Syntax highlighting")
3182 (description
3183 "Pygments is a syntax highlighting package written in Python.")
3184 (license license:bsd-2)))
3185
3186 (define-public python2-pygments
3187 (package-with-python2 python-pygments))
3188
3189 (define-public python-sphinxcontrib-websupport
3190 (package
3191 (name "python-sphinxcontrib-websupport")
3192 (version "1.0.1")
3193 (source (origin
3194 (method url-fetch)
3195 (uri (pypi-uri "sphinxcontrib-websupport" version))
3196 (sha256
3197 (base32
3198 "1f9f0wjpi9nhikbyaz6d19s7qvzdf1nq2g5dsh640fma4q9rd1bs"))))
3199 (build-system python-build-system)
3200 (propagated-inputs
3201 `(("python-mock" ,python-mock)
3202 ("python-pytest" ,python-pytest)
3203 ("python-xapian-bindings" ,python-xapian-bindings)))
3204 ;; Needed for running the test suite
3205 (native-inputs
3206 `(("python-six" ,python-six)
3207 ("python-jinja2" ,python-jinja2)
3208 ("python-docutils" ,python-docutils)
3209 ("python-sphinx" ,python-sphinx)
3210 ("python-sqlalchemy" ,python-sqlalchemy)
3211 ("python-whoosh" ,python-whoosh)))
3212 (home-page "http://sphinx-doc.org/")
3213 (synopsis "Sphinx API for web applications")
3214 (description "This package provides a Python API to easily integrate
3215 Sphinx documentation into your web application. It provides tools to
3216 integrate Sphinx documents in web templates and to handle searches.")
3217 (license license:bsd-3)))
3218
3219 (define-public python-sphinx
3220 (package
3221 (name "python-sphinx")
3222 (version "1.5.1")
3223 (source
3224 (origin
3225 (method url-fetch)
3226 (uri (pypi-uri "Sphinx" version))
3227 (sha256
3228 (base32
3229 "1i8p9idnli4gr0y4x67yakbdk5w6a0xjzhrg6bg51y9d1fi7fslf"))))
3230 (build-system python-build-system)
3231 (arguments
3232 `(#:phases
3233 (modify-phases %standard-phases
3234 (replace 'check
3235 (lambda _
3236 ;; Requires Internet access.
3237 (delete-file "tests/test_build_linkcheck.py")
3238 (zero? (system* "make" "test")))))))
3239 (propagated-inputs
3240 `(("python-imagesize" ,python-imagesize)
3241 ("python-sphinx-alabaster-theme"
3242 ,python-sphinx-alabaster-theme)
3243 ("python-babel" ,python-babel)
3244 ("python-snowballstemmer" ,python-snowballstemmer)
3245 ("python-docutils" ,python-docutils)
3246 ("python-jinja2" ,python-jinja2)
3247 ("python-pygments" ,python-pygments)
3248 ("python-requests" ,python-requests)
3249 ("python-six" ,python-six)))
3250 (native-inputs
3251 `(("graphviz" ,graphviz)
3252 ("python-html5lib" ,python-html5lib)
3253 ("python-mock" ,python-mock)
3254 ("python-nose" ,python-nose)))
3255 (home-page "http://sphinx-doc.org/")
3256 (synopsis "Python documentation generator")
3257 (description "Sphinx is a tool that makes it easy to create documentation
3258 for Python projects or other documents consisting of multiple reStructuredText
3259 sources.")
3260 (license license:bsd-3)
3261 (properties `((python2-variant . ,(delay python2-sphinx))))))
3262
3263 (define-public python-sphinx-1.6
3264 (package (inherit python-sphinx)
3265 (name "python-sphinx")
3266 (version "1.6.3")
3267 (source (origin
3268 (method url-fetch)
3269 (uri (pypi-uri "Sphinx" version))
3270 (sha256
3271 (base32
3272 "1rj6f3i8hmrx2qlkshi5kp5xcy98dlynwlyl05yvflj5f66dp2xg"))))
3273 (arguments
3274 `(#:phases
3275 (modify-phases %standard-phases
3276 (replace 'check
3277 (lambda _
3278 ;; Requires Internet access.
3279 (delete-file "tests/test_build_linkcheck.py")
3280 (substitute* "tests/test_build_latex.py"
3281 (("@pytest.mark.sphinx\\('latex', testroot='images'\\)")
3282 "@pytest.mark.skip()"))
3283 (zero? (system* "make" "test")))))))
3284 (propagated-inputs
3285 `(("python-sphinxcontrib-websupport" ,python-sphinxcontrib-websupport)
3286 ,@(package-propagated-inputs python-sphinx)))
3287 (native-inputs
3288 `(("python-pytest" ,python-pytest-3.0)
3289 ("imagemagick" ,imagemagick) ; for "convert"
3290 ,@(package-native-inputs python-sphinx)))
3291 (properties '())))
3292
3293 (define-public python-sphinx-1.5.3
3294 (package
3295 (inherit python-sphinx)
3296 (name "python-sphinx")
3297 (version "1.5.3")
3298 (source
3299 (origin
3300 (method url-fetch)
3301 (uri (pypi-uri "Sphinx" version))
3302 (sha256
3303 (base32
3304 "0kw1axswbvaavr8ggyf4qr6hnisnrzlbkkcdada69vk1x9xjassg"))))
3305 (native-inputs
3306 `(("python-pytest" ,python-pytest-3.0)
3307 ,@(package-native-inputs python-sphinx)))))
3308
3309 (define-public python2-sphinx
3310 (let ((base (package-with-python2 (strip-python2-variant python-sphinx))))
3311 (package
3312 (inherit base)
3313 (native-inputs `(("python2-mock" ,python2-mock)
3314 ("python2-enum34" ,python2-enum34)
3315 ,@(package-native-inputs base)))
3316 (propagated-inputs `(("python2-pytz" ,python2-pytz)
3317 ,@(package-propagated-inputs base))))))
3318
3319 (define-public python-sphinx-rtd-theme
3320 (package
3321 (name "python-sphinx-rtd-theme")
3322 (version "0.2.4")
3323 (source
3324 (origin
3325 (method url-fetch)
3326 (uri (pypi-uri "sphinx_rtd_theme" version))
3327 (sha256
3328 (base32
3329 "05rlhjzdyapr2w74jjs7mrm8hi69qskcr5vya9f9drpsys7lpxrd"))))
3330 (build-system python-build-system)
3331 (arguments '(#:tests? #f)) ; No tests.
3332 (propagated-inputs
3333 `(("python-sphinx" ,python-sphinx)))
3334 (home-page "https://github.com/snide/sphinx_rtd_theme/")
3335 (synopsis "ReadTheDocs.org theme for Sphinx")
3336 (description "A theme for Sphinx used by ReadTheDocs.org.")
3337 (license license:expat)))
3338
3339 (define-public python2-sphinx-rtd-theme
3340 (package-with-python2 python-sphinx-rtd-theme))
3341
3342 (define-public python-rst.linker
3343 (package
3344 (name "python-rst.linker")
3345 (version "1.7")
3346 (source
3347 (origin
3348 (method url-fetch)
3349 (uri (pypi-uri "rst.linker" version))
3350 (sha256
3351 (base32
3352 "0bh4lnj2p1nh0wf5pgxgfbrp27xhb1rinahkb5j7s3qprq6qn0sr"))))
3353 (build-system python-build-system)
3354 (propagated-inputs
3355 `(("python-dateutil" ,python-dateutil)
3356 ("python-six" ,python-six)))
3357 (native-inputs
3358 `(("python-setuptools-scm" ,python-setuptools-scm)))
3359 ;; Test would require path.py, which would introduce a cyclic dependence.
3360 (arguments `(#:tests? #f))
3361 ;; Note: As of version 1.7 the documentation is not worth building.
3362 (home-page "https://github.com/jaraco/rst.linker")
3363 (synopsis "Sphinx plugin to add links and timestamps")
3364 (description "rst.linker allows to automatically replace text by a
3365 reStructuredText external reference or timestamps. It's primary purpose is to
3366 augment the changelog, but it can be used for other documents, too.")
3367 (license license:expat)))
3368
3369 (define-public python2-rst.linker
3370 (package-with-python2 python-rst.linker))
3371
3372 (define-public python-feedgenerator
3373 (package
3374 (name "python-feedgenerator")
3375 (version "1.9")
3376 (source
3377 (origin
3378 (method url-fetch)
3379 (uri (pypi-uri "feedgenerator" version))
3380 (sha256
3381 (base32
3382 "01mirwkm7xfx539hmvj7g9da1j51gw5lsx74dr0glizskjm5vq2s"))
3383 (modules '((guix build utils)))
3384 (snippet
3385 '(begin
3386 ;; Remove pre-compiled .pyc files from source.
3387 (for-each delete-file-recursively
3388 (find-files "." "__pycache__" #:directories? #t))
3389 (for-each delete-file (find-files "." "\\.pyc$"))
3390 #t))))
3391 (build-system python-build-system)
3392 (propagated-inputs
3393 `(("python-pytz" ,python-pytz)
3394 ("python-six" ,python-six)))
3395 (home-page "https://github.com/getpelican/feedgenerator")
3396 (synopsis
3397 "Standalone version of Django's Atom/RSS feed generator")
3398 (description
3399 "Feedgenerator-py3k is a standalone version of Django's feedgenerator,
3400 which can produce feeds in RSS 2.0, RSS 0.91, and Atom formats.")
3401 (license license:bsd-3)))
3402
3403 (define-public python2-feedgenerator
3404 (package-with-python2 python-feedgenerator))
3405
3406 (define-public python-blinker
3407 (package
3408 (name "python-blinker")
3409 (version "1.4")
3410 (source
3411 (origin
3412 (method url-fetch)
3413 (uri (pypi-uri "blinker" version))
3414 (sha256
3415 (base32
3416 "1dpq0vb01p36jjwbhhd08ylvrnyvcc82yxx3mwjx6awrycjyw6j7"))))
3417 (build-system python-build-system)
3418 (home-page "http://pythonhosted.org/blinker/")
3419 (synopsis "Fast, simple object-to-object and broadcast signaling")
3420 (description
3421 "Blinker provides a fast dispatching system that allows any number of
3422 interested parties to subscribe to events, or \"signals\".")
3423 (license license:expat)))
3424
3425 (define-public python2-blinker
3426 (package-with-python2 python-blinker))
3427
3428 (define-public pelican
3429 (package
3430 (name "pelican")
3431 (version "3.6.3")
3432 (source
3433 (origin
3434 (method url-fetch)
3435 (uri (pypi-uri "pelican" version))
3436 (sha256
3437 (base32
3438 "1hn94rb4q3zmcq16in055xikal4dba5hfx3zznq7warllcgc9f8k"))))
3439 (build-system python-build-system)
3440 (propagated-inputs
3441 `(("python-feedgenerator" ,python-feedgenerator)
3442 ("python-jinja2" ,python-jinja2)
3443 ("python-pygments" ,python-pygments)
3444 ("python-docutils" ,python-docutils)
3445 ("python-pytz" ,python-pytz)
3446 ("python-blinker" ,python-blinker)
3447 ("python-unidecode" ,python-unidecode)
3448 ("python-six" ,python-six)
3449 ("python-dateutil" ,python-dateutil)))
3450 (home-page "http://getpelican.com/")
3451 (arguments
3452 `(;; XXX Requires a lot more packages to do unit tests :P
3453 #:tests? #f
3454 #:phases (modify-phases %standard-phases
3455 (add-before
3456 'install 'adjust-requires
3457 ;; Since feedgenerator is installed from git, it doesn't
3458 ;; conform to the version requirements.
3459 ;;
3460 ;; We *do have* "feedgenerator >= 1.6", but strip off the
3461 ;; version requirement so setuptools doesn't get confused.
3462 (lambda _
3463 (substitute* "setup.py"
3464 (("['\"]feedgenerator.*?['\"]")
3465 "'feedgenerator'")))))))
3466 (synopsis "Python-based static site publishing system")
3467 (description
3468 "Pelican is a tool to generate a static blog from reStructuredText,
3469 Markdown input files, and more. Pelican uses Jinja2 for templating
3470 and is very extensible.")
3471 (license license:agpl3+)))
3472
3473 (define-public python-scikit-learn
3474 (package
3475 (name "python-scikit-learn")
3476 (version "0.18.1")
3477 (source
3478 (origin
3479 (method url-fetch)
3480 (uri (string-append
3481 "https://github.com/scikit-learn/scikit-learn/archive/"
3482 version ".tar.gz"))
3483 (file-name (string-append name "-" version ".tar.gz"))
3484 (sha256
3485 (base32
3486 "1hwswckdmd27f7k1jvwdc0m4mqrgxl2s245yq1scq34v124bjqgq"))))
3487 (build-system python-build-system)
3488 (arguments
3489 `(#:phases
3490 (modify-phases %standard-phases
3491 (delete 'check)
3492 (add-after 'install 'check
3493 ;; Running tests from the source directory requires
3494 ;; an "inplace" build with paths relative to CWD.
3495 ;; http://scikit-learn.org/stable/developers/advanced_installation.html#testing
3496 ;; Use the installed version instead.
3497 (lambda* (#:key inputs outputs #:allow-other-keys)
3498 (add-installed-pythonpath inputs outputs)
3499 ;; some tests require access to "$HOME"
3500 (setenv "HOME" "/tmp")
3501 ;; Step out of the source directory just to be sure.
3502 (chdir "..")
3503 (zero? (system* "nosetests" "-v" "sklearn")))))))
3504 (inputs
3505 `(("openblas" ,openblas)))
3506 (native-inputs
3507 `(("python-nose" ,python-nose)
3508 ("python-cython" ,python-cython)))
3509 (propagated-inputs
3510 `(("python-numpy" ,python-numpy)
3511 ("python-scipy" ,python-scipy)))
3512 (home-page "http://scikit-learn.org/")
3513 (synopsis "Machine Learning in Python")
3514 (description
3515 "Scikit-learn provides simple and efficient tools for data
3516 mining and data analysis.")
3517 (license license:bsd-3)))
3518
3519 (define-public python2-scikit-learn
3520 (package-with-python2 python-scikit-learn))
3521
3522 (define-public python-scikit-image
3523 (package
3524 (name "python-scikit-image")
3525 (version "0.11.3")
3526 (source
3527 (origin
3528 (method url-fetch)
3529 (uri (string-append
3530 "https://pypi.python.org/packages/source/s/scikit-image/scikit-image-"
3531 version ".tar.gz"))
3532 (sha256
3533 (base32 "0jz416fqvpahqyffw8plmszzfj669w8wvf3y9clnr5lr6a7md3kn"))))
3534 (build-system python-build-system)
3535 (arguments
3536 ;; TODO: Some tests require running X11 server. Disable them?
3537 '(#:tests? #f))
3538 ;; See DEPENDS.txt for the list of build and run time requiremnts
3539 (propagated-inputs
3540 `(("python-matplotlib" ,python-matplotlib)
3541 ("python-networkx" ,python-networkx)
3542 ("python-scipy" ,python-scipy)
3543 ("python-pillow" ,python-pillow)))
3544 (native-inputs
3545 `(("python-numpy" ,python-numpy)
3546 ("python-cython" ,python-cython)
3547 ("python-six" ,python-six)))
3548 (home-page "http://scikit-image.org/")
3549 (synopsis "Image processing in Python")
3550 (description
3551 "Scikit-image is a collection of algorithms for image processing.")
3552 (license license:bsd-3)))
3553
3554 (define-public python2-scikit-image
3555 (package-with-python2 python-scikit-image))
3556
3557 (define-public python-redis
3558 (package
3559 (name "python-redis")
3560 (version "2.10.5")
3561 (source
3562 (origin
3563 (method url-fetch)
3564 (uri (pypi-uri "redis" version))
3565 (sha256
3566 (base32 "0csmrkxb29x7xs9b51zplwkkq2hwnbh9jns1g85dykn5rxmaxysx"))))
3567 (build-system python-build-system)
3568 ;; Tests require a running Redis server
3569 (arguments '(#:tests? #f))
3570 ;; As long as we are not running test, we do not need this input :-)
3571 ;;(native-inputs
3572 ;; `(("python-pytest" ,python-pytest)))
3573 (home-page "https://github.com/andymccurdy/redis-py")
3574 (synopsis "Redis Python client")
3575 (description
3576 "This package provides a Python interface to the Redis key-value store.")
3577 (license license:expat)))
3578
3579 (define-public python2-redis
3580 (package-with-python2 python-redis))
3581
3582 (define-public python-rq
3583 (package
3584 (name "python-rq")
3585 (version "0.7.1")
3586 (source
3587 (origin
3588 (method url-fetch)
3589 (uri (pypi-uri "rq" version))
3590 (sha256
3591 (base32 "0gaq5pnh0zy46r8jvygi0ifbvz3pq6i7xla78ijcgjw0x77qzsdh"))))
3592 (build-system python-build-system)
3593 (propagated-inputs
3594 `(("python-click" ,python-click)
3595 ("python-redis" ,python-redis)))
3596 (home-page "http://python-rq.org/")
3597 (synopsis "Simple job queues for Python")
3598 (description
3599 "RQ (Redis Queue) is a simple Python library for queueing jobs and
3600 processing them in the background with workers. It is backed by Redis and it
3601 is designed to have a low barrier to entry.")
3602 (license license:bsd-2)))
3603
3604 (define-public python2-rq
3605 (package-with-python2 python-rq))
3606
3607 (define-public python-cython
3608 (package
3609 (name "python-cython")
3610 (version "0.25.2")
3611 (source
3612 (origin
3613 (method url-fetch)
3614 (uri (pypi-uri "Cython" version))
3615 (patches (search-patches "python-cython-fix-tests-32bit.patch"))
3616 (sha256
3617 (base32
3618 "01h3lrf6d98j07iakifi81qjszh6faa37ibx7ylva1vsqbwx2hgi"))))
3619 (build-system python-build-system)
3620 ;; we need the full python package and not just the python-wrapper
3621 ;; because we need libpython3.3m.so
3622 (inputs
3623 `(("python" ,python)))
3624 (arguments
3625 `(#:phases
3626 (modify-phases %standard-phases
3627 (add-before 'check 'set-HOME
3628 ;; some tests require access to "$HOME/.cython"
3629 (lambda _ (setenv "HOME" "/tmp")))
3630 (replace 'check
3631 (lambda _ (zero? (system* "python" "runtests.py" "-vv")))))))
3632 (home-page "http://cython.org/")
3633 (synopsis "C extensions for Python")
3634 (description "Cython is an optimising static compiler for both the Python
3635 programming language and the extended Cython programming language. It makes
3636 writing C extensions for Python as easy as Python itself.")
3637 (license license:asl2.0)
3638 (properties `((python2-variant . ,(delay python2-cython))))))
3639
3640 (define-public python2-cython
3641 (package (inherit (package-with-python2
3642 (strip-python2-variant python-cython)))
3643 (name "python2-cython")
3644 (inputs
3645 `(("python-2" ,python-2))))) ; this is not automatically changed
3646
3647 ;; The RPython toolchain currently does not support Python 3.
3648 (define-public python2-rpython
3649 (package
3650 (name "python2-rpython")
3651 (version "0.1.4")
3652 (source
3653 (origin
3654 (method url-fetch)
3655 (uri (pypi-uri "rpython" version))
3656 (sha256
3657 (base32
3658 "07pps06fq4c4wmi5ii0sgh9zgwniz5y7frqhm28g3a154l163fxc"))))
3659 (build-system python-build-system)
3660 (arguments `(#:python ,python-2))
3661 (native-inputs
3662 `(("python2-pytest" ,python2-pytest))) ; needed for running tests
3663 (home-page "https://rpython.readthedocs.org")
3664 (synopsis "Framework for implementing interpreters and virtual machines")
3665 (description "RPython is a translation and support framework for
3666 producing implementations of dynamic languages, emphasizing a clean separation
3667 between language specification and implementation aspects.")
3668 (license license:expat)))
3669
3670 (define-public python-numpy
3671 (package
3672 (name "python-numpy")
3673 (version "1.12.0")
3674 (source
3675 (origin
3676 (method url-fetch)
3677 (uri (string-append
3678 "https://github.com/numpy/numpy/archive/v" version ".tar.gz"))
3679 (file-name (string-append name "-" version ".tar.gz"))
3680 (sha256
3681 (base32
3682 "025d4j4aakcp8w5i5diqh812cbbjgac7jszx1j56ivrbi1i8vv7d"))))
3683 (build-system python-build-system)
3684 (inputs
3685 `(("openblas" ,openblas)
3686 ("lapack" ,lapack)))
3687 (native-inputs
3688 `(("python-cython" ,python-cython)
3689 ("python-nose" ,python-nose)
3690 ("gfortran" ,gfortran)))
3691 (arguments
3692 `(#:phases
3693 (modify-phases %standard-phases
3694 (add-before 'build 'set-environment-variables
3695 (lambda* (#:key inputs #:allow-other-keys)
3696 (call-with-output-file "site.cfg"
3697 (lambda (port)
3698 (format port
3699 "[openblas]
3700 libraries = openblas
3701 library_dirs = ~a/lib
3702 include_dirs = ~a/include
3703
3704 # backslash-n to make emacs happy
3705 \n[lapack]
3706 lapack_libs = lapack
3707 library_dirs = ~a/lib
3708 include_dirs = ~a/include
3709 "
3710 (assoc-ref inputs "openblas")
3711 (assoc-ref inputs "openblas")
3712 (assoc-ref inputs "lapack")
3713 (assoc-ref inputs "lapack"))))
3714 ;; Use "gcc" executable, not "cc".
3715 (substitute* "numpy/distutils/system_info.py"
3716 (("c = distutils\\.ccompiler\\.new_compiler\\(\\)")
3717 "c = distutils.ccompiler.new_compiler(); c.set_executables(compiler='gcc',compiler_so='gcc',linker_exe='gcc',linker_so='gcc -shared')"))
3718 #t))
3719 ;; Tests can only be run after the library has been installed and not
3720 ;; within the source directory.
3721 (delete 'check)
3722 (add-after 'install 'check
3723 (lambda* (#:key outputs inputs #:allow-other-keys)
3724 ;; Make installed package available for running the tests
3725 (add-installed-pythonpath inputs outputs)
3726 (with-directory-excursion "/tmp"
3727 (zero? (system* "python" "-c"
3728 "import numpy; numpy.test(verbose=2)"))))))))
3729 (home-page "http://www.numpy.org/")
3730 (synopsis "Fundamental package for scientific computing with Python")
3731 (description "NumPy is the fundamental package for scientific computing
3732 with Python. It contains among other things: a powerful N-dimensional array
3733 object, sophisticated (broadcasting) functions, tools for integrating C/C++
3734 and Fortran code, useful linear algebra, Fourier transform, and random number
3735 capabilities.")
3736 (license license:bsd-3)))
3737
3738 (define-public python2-numpy
3739 (package-with-python2 python-numpy))
3740
3741 (define-public python-munch
3742 (package
3743 (name "python-munch")
3744 (version "2.0.4")
3745 (source
3746 (origin
3747 (method url-fetch)
3748 (uri (pypi-uri "munch" version))
3749 (sha256
3750 (base32
3751 "1cmqg91xnqx8gvnh4pmp0bfl1dfcm65d5p9mg73zz8pkjhx6h80l"))))
3752 (build-system python-build-system)
3753 (home-page "https://github.com/Infinidat/munch")
3754 (synopsis "Dot-accessible dictionary")
3755 (description "Munch is a dot-accessible dictionary similar to JavaScript
3756 objects.")
3757 (license license:expat)))
3758
3759 (define-public python2-munch
3760 (package-with-python2 python-munch))
3761
3762 (define-public python2-fastlmm
3763 (package
3764 (name "python2-fastlmm")
3765 (version "0.2.21")
3766 (source
3767 (origin
3768 (method url-fetch)
3769 (uri (pypi-uri "fastlmm" version ".zip"))
3770 (sha256
3771 (base32
3772 "1q8c34rpmwkfy3r4d5172pzdkpfryj561897z9r3x22gq7813x1m"))))
3773 (build-system python-build-system)
3774 (arguments
3775 `(#:python ,python-2)) ; only Python 2.7 is supported
3776 (propagated-inputs
3777 `(("python2-numpy" ,python2-numpy)
3778 ("python2-scipy" ,python2-scipy)
3779 ("python2-matplotlib" ,python2-matplotlib)
3780 ("python2-pandas" ,python2-pandas)
3781 ("python2-scikit-learn" ,python2-scikit-learn)
3782 ("python2-pysnptools" ,python2-pysnptools)))
3783 (native-inputs
3784 `(("unzip" ,unzip)
3785 ("python2-cython" ,python2-cython)
3786 ("python2-mock" ,python2-mock)
3787 ("python2-nose" ,python2-nose)))
3788 (home-page "http://research.microsoft.com/en-us/um/redmond/projects/mscompbio/fastlmm/")
3789 (synopsis "Perform genome-wide association studies on large data sets")
3790 (description
3791 "FaST-LMM, which stands for Factored Spectrally Transformed Linear Mixed
3792 Models, is a program for performing both single-SNP and SNP-set genome-wide
3793 association studies (GWAS) on extremely large data sets.")
3794 (license license:asl2.0)))
3795
3796 (define-public python-numpy-documentation
3797 (package
3798 (name "python-numpy-documentation")
3799 (version (package-version python-numpy))
3800 (source (package-source python-numpy))
3801 (build-system python-build-system)
3802 (native-inputs
3803 `(("python-matplotlib" ,python-matplotlib)
3804 ("python-numpy" ,python-numpy)
3805 ("pkg-config" ,pkg-config)
3806 ("python-sphinx" ,python-sphinx)
3807 ("python-numpydoc" ,python-numpydoc)
3808 ("texlive" ,(texlive-union (list texlive-fonts-amsfonts
3809 texlive-fonts-ec
3810 texlive-generic-ifxetex
3811 texlive-generic-pdftex
3812 texlive-latex-amsfonts
3813 texlive-latex-capt-of
3814 texlive-latex-cmap
3815 texlive-latex-environ
3816 texlive-latex-eqparbox
3817 texlive-latex-etoolbox
3818 texlive-latex-expdlist
3819 texlive-latex-fancyhdr
3820 texlive-latex-fancyvrb
3821 texlive-latex-fncychap
3822 texlive-latex-float
3823 texlive-latex-framed
3824 texlive-latex-geometry
3825 texlive-latex-graphics
3826 texlive-latex-hyperref
3827 texlive-latex-mdwtools
3828 texlive-latex-multirow
3829 texlive-latex-oberdiek
3830 texlive-latex-parskip
3831 texlive-latex-preview
3832 texlive-latex-tabulary
3833 texlive-latex-threeparttable
3834 texlive-latex-titlesec
3835 texlive-latex-trimspaces
3836 texlive-latex-ucs
3837 texlive-latex-upquote
3838 texlive-latex-url
3839 texlive-latex-varwidth
3840 texlive-latex-wrapfig)))
3841 ("texinfo" ,texinfo)
3842 ("perl" ,perl)
3843 ("scipy-sphinx-theme"
3844 ,(origin ; The build script expects scipy-sphinx-theme as a git submodule
3845 (method git-fetch)
3846 (uri (git-reference
3847 (url "https://github.com/scipy/scipy-sphinx-theme.git")
3848 (commit "c466764e2231ba132c09826b5b138fffa1cfcec3")))
3849 (sha256
3850 (base32
3851 "0q2y87clwlsgc7wvlsn9pzyssybcq10plwhq2w1ydykfsyyqbmkl"))))
3852 ,@(package-native-inputs python-numpy)))
3853 (arguments
3854 `(#:tests? #f ; we're only generating the documentation
3855 #:phases
3856 (modify-phases %standard-phases
3857 (delete 'build)
3858 (replace 'install
3859 (lambda* (#:key inputs outputs #:allow-other-keys)
3860 (let* ((data (string-append (assoc-ref outputs "out") "/share"))
3861 (doc (string-append
3862 data "/doc/" ,name "-"
3863 ,(package-version python-numpy)))
3864 (info-reader (string-append data "/info"))
3865 (html (string-append doc "/html"))
3866 (scipy-sphinx-theme "scipy-sphinx-theme")
3867 (sphinx-theme-checkout (assoc-ref inputs scipy-sphinx-theme))
3868 (pyver ,(string-append "PYVER=")))
3869
3870 ;; FIXME: this is needed to for texlive-union to generate
3871 ;; fonts, which are not found.
3872 (setenv "HOME" "/tmp")
3873
3874 (with-directory-excursion "doc"
3875 (copy-recursively sphinx-theme-checkout scipy-sphinx-theme)
3876 (mkdir-p html)
3877 (system* "make" "html" pyver)
3878 (system* "make" "latex" "PAPER=a4" pyver)
3879 (system* "make" "-C" "build/latex"
3880 "all-pdf" "PAPER=a4" pyver)
3881 ;; FIXME: Generation of the info file fails.
3882 ;; (system* "make" "info" pyver)
3883 ;; (mkdir-p info)
3884 ;; (copy-file "build/texinfo/numpy.info"
3885 ;; (string-append info "/numpy.info"))
3886 (for-each (lambda (file)
3887 (copy-file (string-append "build/latex" file)
3888 (string-append doc file)))
3889 '("/numpy-ref.pdf" "/numpy-user.pdf"))
3890 (with-directory-excursion "build/html"
3891 (for-each (lambda (file)
3892 (let* ((dir (dirname file))
3893 (tgt-dir (string-append html "/" dir)))
3894 (unless (equal? "." dir)
3895 (mkdir-p tgt-dir))
3896 (install-file file html)))
3897 (find-files "." ".*")))))
3898 #t)))))
3899 (home-page (package-home-page python-numpy))
3900 (synopsis "Documentation for the python-numpy package")
3901 (description (package-description python-numpy))
3902 (license (package-license python-numpy))))
3903
3904 (define-public python2-numpy-documentation
3905 (let ((numpy-documentation (package-with-python2 python-numpy-documentation)))
3906 (package
3907 (inherit numpy-documentation)
3908 (native-inputs `(("python2-functools32" ,python2-functools32)
3909 ,@(package-native-inputs numpy-documentation))))))
3910
3911 (define-public python-pygit2
3912 (package
3913 (name "python-pygit2")
3914 (version "0.25.0")
3915 (source
3916 (origin
3917 (method url-fetch)
3918 (uri (pypi-uri "pygit2" version))
3919 (sha256
3920 (base32
3921 "0wf5rp0fvrw7j3j18dvwjq6xqlbm611wd55aphrfpps0v1gxh3ny"))
3922 (patches
3923 (search-patches "python-pygit2-disable-network-tests.patch"))))
3924 (build-system python-build-system)
3925 (propagated-inputs
3926 `(("python-six" ,python-six)
3927 ("python-cffi" ,python-cffi)
3928 ("libgit2" ,libgit2)
3929 ("python-tox" ,python-tox)))
3930 (home-page "https://github.com/libgit2/pygit2")
3931 (synopsis "Python bindings for libgit2")
3932 (description "Pygit2 is a set of Python bindings to the libgit2 shared
3933 library, libgit2 implements Git plumbing.")
3934 ;; GPL2.0 only, with linking exception.
3935 (license license:gpl2)))
3936
3937 (define-public python2-pygit2
3938 (package-with-python2 python-pygit2))
3939
3940 (define-public python-pyparsing
3941 (package
3942 (name "python-pyparsing")
3943 (version "2.2.0")
3944 (source
3945 (origin
3946 (method url-fetch)
3947 (uri (string-append "mirror://sourceforge/pyparsing/pyparsing"
3948 "/pyparsing-" version
3949 "/pyparsing-" version ".tar.gz"))
3950 (sha256
3951 (base32
3952 "016b9gh606aa44sq92jslm89bg874ia0yyiyb643fa6dgbsbqch8"))))
3953 (build-system python-build-system)
3954 (outputs '("out" "doc"))
3955 (arguments
3956 `(#:tests? #f ; no test target
3957 #:phases
3958 (modify-phases %standard-phases
3959 (add-after 'install 'install-doc
3960 (lambda* (#:key outputs #:allow-other-keys)
3961 (let* ((doc (string-append (assoc-ref outputs "doc")
3962 "/share/doc/" ,name "-" ,version))
3963 (html-doc (string-append doc "/html"))
3964 (examples (string-append doc "/examples")))
3965 (mkdir-p html-doc)
3966 (mkdir-p examples)
3967 (for-each
3968 (lambda (dir tgt)
3969 (map (lambda (file)
3970 (install-file file tgt))
3971 (find-files dir ".*")))
3972 (list "docs" "htmldoc" "examples")
3973 (list doc html-doc examples))
3974 #t))))))
3975 (home-page "http://pyparsing.wikispaces.com")
3976 (synopsis "Python parsing class library")
3977 (description
3978 "The pyparsing module is an alternative approach to creating and
3979 executing simple grammars, vs. the traditional lex/yacc approach, or the use
3980 of regular expressions. The pyparsing module provides a library of classes
3981 that client code uses to construct the grammar directly in Python code.")
3982 (license license:expat)))
3983
3984 (define-public python2-pyparsing
3985 (package-with-python2 python-pyparsing))
3986
3987 (define-public python-numpydoc
3988 (package
3989 (name "python-numpydoc")
3990 (version "0.5")
3991 (source
3992 (origin
3993 (method url-fetch)
3994 (uri (string-append
3995 "https://pypi.python.org/packages/source/n/numpydoc/numpydoc-"
3996 version ".tar.gz"))
3997 (sha256
3998 (base32
3999 "0d4dnifaxkll50jx6czj05y8cb4ny60njd2wz299sj2jxfy51w4k"))
4000 (modules '((guix build utils)))
4001 (snippet
4002 '(begin
4003 ;; Drop a test requiring matplotlib, which we cannot add as an
4004 ;; input since it would create a circular dependency: Extend the
4005 ;; test for Python 3, where it is already dropped, to Python 2.
4006 (substitute* "numpydoc/tests/test_plot_directive.py"
4007 (("3") "2"))))))
4008 (build-system python-build-system)
4009 (propagated-inputs
4010 `(("python-sphinx" ,python-sphinx)))
4011 (native-inputs
4012 `(("python-nose" ,python-nose)))
4013 (home-page "https://pypi.python.org/pypi/numpydoc")
4014 (synopsis
4015 "Numpy's Sphinx extensions")
4016 (description
4017 "Sphinx extension to support docstrings in Numpy format.")
4018 (license license:bsd-2)))
4019
4020 (define-public python2-numpydoc
4021 (package-with-python2 python-numpydoc))
4022
4023 (define-public python-numexpr
4024 (package
4025 (name "python-numexpr")
4026 (version "2.6.1")
4027 (source
4028 (origin
4029 (method url-fetch)
4030 (uri (pypi-uri "numexpr" version))
4031 (sha256
4032 (base32
4033 "01lsja72m32z0i5p8rwxbfyzk4mplh72k2a140nwh8vv4wpyfbnv"))))
4034 (build-system python-build-system)
4035 (arguments `(#:tests? #f)) ; no tests included
4036 (propagated-inputs
4037 `(("python-numpy" ,python-numpy)))
4038 (home-page "https://github.com/pydata/numexpr")
4039 (synopsis "Fast numerical expression evaluator for NumPy")
4040 (description
4041 "Numexpr is a fast numerical expression evaluator for NumPy. With it,
4042 expressions that operate on arrays are accelerated and use less memory than
4043 doing the same calculation in Python. In addition, its multi-threaded
4044 capabilities can make use of all your cores, which may accelerate
4045 computations, most specially if they are not memory-bounded (e.g. those using
4046 transcendental functions).")
4047 (license license:expat)))
4048
4049 (define-public python2-numexpr
4050 (package-with-python2 python-numexpr))
4051
4052 (define-public python-cycler
4053 (package
4054 (name "python-cycler")
4055 (version "0.10.0")
4056 (source (origin
4057 (method url-fetch)
4058 (uri (pypi-uri "cycler" version))
4059 (sha256
4060 (base32
4061 "1n69n23fak1gjxlrbhqisi2b9pv3ckrfj98llx3p53953082syyd"))))
4062 (build-system python-build-system)
4063 (arguments
4064 ;; XXX: The current version requires 'coveralls' which we don't have.
4065 ;; Enable this for the next release which uses 'python-pytest'.
4066 '(#:tests? #f))
4067 (propagated-inputs
4068 `(("python-six" ,python-six)))
4069 (home-page "http://matplotlib.org/cycler/")
4070 (synopsis "Composable keyword argument iterator")
4071 (description
4072 "When using @code{matplotlib} and plotting more than one line, it is
4073 common to want to be able to want to be able to cycle over one or more artist
4074 styles; but the plotting logic can quickly become involved.
4075 To address this and enable easy cycling over arbitrary @code{kwargs}, the
4076 @code{Cycler} class was developed.")
4077 (license license:bsd-3)))
4078
4079 (define-public python2-cycler
4080 (package-with-python2 python-cycler))
4081
4082 (define-public python-colorspacious
4083 (package
4084 (name "python-colorspacious")
4085 (version "1.1.0")
4086 (source
4087 (origin
4088 (method url-fetch)
4089 (uri (string-append "https://github.com/njsmith/colorspacious/archive/v"
4090 version ".tar.gz"))
4091 (file-name (string-append name "-" version))
4092 (sha256
4093 (base32 "1vflh5jm32qb0skza2i8pjacv09w6gq84fqpp2nj77s0rbmzgr4k"))))
4094 (build-system python-build-system)
4095 (propagated-inputs
4096 `(("python-numpy" ,python-numpy)))
4097 (native-inputs
4098 `(("python-nose" ,python-nose)))
4099 (arguments
4100 `(#:phases
4101 (modify-phases %standard-phases
4102 (replace 'check
4103 (lambda _
4104 (zero? (system* "nosetests" "--all-modules" "-v" "colorspacious")))))))
4105 (home-page "https://github.com/njsmith/colorspacious")
4106 (synopsis "Python library for colorspace conversions")
4107 (description "@code{colorspacious} is a Python library that lets you
4108 convert between colorspaces like sRGB, XYZ, CIEL*a*b*, CIECAM02, CAM02-UCS, etc.")
4109 (license license:expat)))
4110
4111 (define-public python2-colorspacious
4112 (package-with-python2 python-colorspacious))
4113
4114 (define-public python-matplotlib
4115 (package
4116 (name "python-matplotlib")
4117 (version "2.0.2")
4118 (source
4119 (origin
4120 (method url-fetch)
4121 (uri (pypi-uri "matplotlib" version))
4122 (sha256
4123 (base32
4124 "1w8z2a1l7s72p1byfz7g03wqhygqxi8w82619dqb3a1lm97w9yqg"))))
4125 (build-system python-build-system)
4126 (propagated-inputs ; the following packages are all needed at run time
4127 `(("python-cycler" ,python-cycler)
4128 ("python-pyparsing" ,python-pyparsing)
4129 ("python-pygobject" ,python-pygobject)
4130 ("gobject-introspection" ,gobject-introspection)
4131 ("python-tkinter" ,python "tk")
4132 ("python-dateutil" ,python-dateutil)
4133 ("python-numpy" ,python-numpy)
4134 ("python-pillow" ,python-pillow)
4135 ("python-pytz" ,python-pytz)
4136 ("python-six" ,python-six)
4137 ;; The 'gtk+' package (and 'gdk-pixbuf', 'atk' and 'pango' propagated
4138 ;; from 'gtk+') provides the required 'typelib' files used by
4139 ;; 'gobject-introspection'. The location of these files is set with the
4140 ;; help of the environment variable GI_TYPELIB_PATH. At build time this
4141 ;; is done automatically by a 'native-search-path' procedure. However,
4142 ;; at run-time the user must set this variable as follows:
4143 ;;
4144 ;; export GI_TYPELIB_PATH=~/.guix-profile/lib/girepository-1.0
4145 ("gtk+" ,gtk+)
4146 ;; From version 1.4.0 'matplotlib' makes use of 'cairocffi' instead of
4147 ;; 'pycairo'. However, 'pygobject' makes use of a 'pycairo' 'context'
4148 ;; object. For this reason we need to import both libraries.
4149 ;; https://pythonhosted.org/cairocffi/cffi_api.html#converting-pycairo
4150 ("python-pycairo" ,python-pycairo)
4151 ("python-cairocffi" ,python-cairocffi)))
4152 (inputs
4153 `(("libpng" ,libpng)
4154 ("imagemagick" ,imagemagick)
4155 ("freetype" ,freetype)
4156 ("cairo" ,cairo)
4157 ("glib" ,glib)
4158 ;; FIXME: Add backends when available.
4159 ;("python-wxpython" ,python-wxpython)
4160 ("python-pyqt" ,python-pyqt)
4161 ("tcl" ,tcl)
4162 ("tk" ,tk)))
4163 (native-inputs
4164 `(("pkg-config" ,pkg-config)
4165 ("python-nose" ,python-nose)
4166 ("python-mock" ,python-mock)))
4167 (arguments
4168 `(#:phases
4169 (modify-phases %standard-phases
4170 (add-before 'build 'configure-environment
4171 (lambda* (#:key outputs inputs #:allow-other-keys)
4172 (let ((cairo (assoc-ref inputs "cairo"))
4173 (gtk+ (assoc-ref inputs "gtk+")))
4174 ;; Setting these directories in the 'basedirlist' of 'setup.cfg'
4175 ;; has not effect.
4176 (setenv "LD_LIBRARY_PATH"
4177 (string-append cairo "/lib:" gtk+ "/lib"))
4178 (setenv "HOME" (getcwd))
4179 (call-with-output-file "setup.cfg"
4180 (lambda (port)
4181 (format port "[directories]~%
4182 basedirlist = ~a,~a~%
4183 [rc_options]~%
4184 backend = TkAgg~%"
4185 (assoc-ref inputs "tcl")
4186 (assoc-ref inputs "tk")))))
4187 #t)))))
4188 (home-page "http://matplotlib.org")
4189 (synopsis "2D plotting library for Python")
4190 (description
4191 "Matplotlib is a Python 2D plotting library which produces publication
4192 quality figures in a variety of hardcopy formats and interactive environments
4193 across platforms. Matplotlib can be used in Python scripts, the python and
4194 ipython shell, web application servers, and six graphical user interface
4195 toolkits.")
4196 (license license:psfl)
4197 (properties `((python2-variant . ,(delay python2-matplotlib))))))
4198
4199 (define-public python2-matplotlib
4200 (let ((matplotlib (package-with-python2
4201 (strip-python2-variant python-matplotlib))))
4202 (package (inherit matplotlib)
4203 ;; Make sure to use special packages for Python 2 instead
4204 ;; of those automatically rewritten by package-with-python2.
4205 (propagated-inputs
4206 `(("python2-pycairo" ,python2-pycairo)
4207 ("python2-functools32" ,python2-functools32)
4208 ("python2-pygobject-2" ,python2-pygobject-2)
4209 ("python2-subprocess32" ,python2-subprocess32)
4210 ("python2-tkinter" ,python-2 "tk")
4211 ,@(fold alist-delete (package-propagated-inputs matplotlib)
4212 '("python-pycairo" "python-pygobject" "python-tkinter")))))))
4213
4214 (define-public python-matplotlib-documentation
4215 (package
4216 (name "python-matplotlib-documentation")
4217 (version (package-version python-matplotlib))
4218 (source (package-source python-matplotlib))
4219 (build-system python-build-system)
4220 (native-inputs
4221 `(("python-matplotlib" ,python-matplotlib)
4222 ("python-colorspacious" ,python-colorspacious)
4223 ("python-sphinx" ,python-sphinx)
4224 ("python-numpydoc" ,python-numpydoc)
4225 ("python-ipython" ,python-ipython)
4226 ("python-mock" ,python-mock)
4227 ("graphviz" ,graphviz)
4228 ("texlive" ,texlive)
4229 ("texinfo" ,texinfo)
4230 ,@(package-native-inputs python-matplotlib)))
4231 (arguments
4232 `(#:tests? #f ; we're only generating documentation
4233 #:phases
4234 (modify-phases %standard-phases
4235 (replace 'build
4236 (lambda _
4237 (chdir "doc")
4238 ;; Produce pdf in 'A4' format.
4239 (substitute* "conf.py"
4240 (("latex_paper_size = 'letter'") "")
4241 ;; latex_paper_size is deprecated -> set paper size using
4242 ;; latex_elements
4243 (("latex_elements\\['pointsize'\\] = '11pt'" match)
4244 ;; insert at a point where latex_elements{} is defined:
4245 (string-append match "\nlatex_elements['papersize'] = 'a4paper'")))
4246 (zero? (system* "python" "make.py" "html" "latex" "texinfo"))))
4247 (replace 'install
4248 (lambda* (#:key inputs outputs #:allow-other-keys)
4249 (let* ((data (string-append (assoc-ref outputs "out") "/share"))
4250 (doc (string-append data "/doc/python-matplotlib-" ,version))
4251 (info (string-append data "/info"))
4252 (html (string-append doc "/html")))
4253 (mkdir-p html)
4254 (mkdir-p info)
4255 (copy-recursively "build/html" html)
4256 (symlink (string-append html "/_images")
4257 (string-append info "/matplotlib-figures"))
4258 (with-directory-excursion "build/texinfo"
4259 (substitute* "matplotlib.texi"
4260 (("@image\\{([^,]*)" all file)
4261 (string-append "@image{matplotlib-figures/" file)))
4262 (symlink (string-append html "/_images")
4263 "./matplotlib-figures")
4264 (system* "makeinfo" "--no-split"
4265 "-o" "matplotlib.info" "matplotlib.texi"))
4266 (copy-file "build/texinfo/matplotlib.info"
4267 (string-append info "/matplotlib.info"))
4268 (copy-file "build/latex/Matplotlib.pdf"
4269 (string-append doc "/Matplotlib.pdf")))
4270 #t)))))
4271 (home-page (package-home-page python-matplotlib))
4272 (synopsis "Documentation for the python-matplotlib package")
4273 (description (package-description python-matplotlib))
4274 (license (package-license python-matplotlib))))
4275
4276 (define-public python2-matplotlib-documentation
4277 (package-with-python2 python-matplotlib-documentation))
4278
4279 (define-public python2-pysnptools
4280 (package
4281 (name "python2-pysnptools")
4282 (version "0.3.9")
4283 (source
4284 (origin
4285 (method url-fetch)
4286 (uri (pypi-uri "pysnptools" version ".zip"))
4287 (sha256
4288 (base32
4289 "1wybggjzz8zw7aav4pjsg2h22xp17a1lghrprza1pxwlm7wf96y2"))))
4290 (build-system python-build-system)
4291 (arguments
4292 `(#:python ,python-2)) ; only Python 2.7 is supported
4293 (propagated-inputs
4294 `(("python2-numpy" ,python2-numpy)
4295 ("python2-scipy" ,python2-scipy)
4296 ("python2-pandas" ,python2-pandas)))
4297 (native-inputs
4298 `(("python2-cython" ,python2-cython)))
4299 (native-inputs
4300 `(("unzip" ,unzip)))
4301 (home-page "http://research.microsoft.com/en-us/um/redmond/projects/mscompbio/")
4302 (synopsis "Library for reading and manipulating genetic data")
4303 (description
4304 "PySnpTools is a library for reading and manipulating genetic data. It
4305 can, for example, efficiently read whole PLINK *.bed/bim/fam files or parts of
4306 those files. It can also efficiently manipulate ranges of integers using set
4307 operators such as union, intersection, and difference.")
4308 (license license:asl2.0)))
4309
4310 (define-public python-rpy2
4311 (package
4312 (name "python-rpy2")
4313 (version "2.7.6")
4314 (source
4315 (origin
4316 (method url-fetch)
4317 (uri (pypi-uri "rpy2" version))
4318 (sha256
4319 (base32
4320 "0nhan2qvrw7b7gg5zddwa22kybdv3x1g26vkd7q8lvnkgzrs4dga"))))
4321 (build-system python-build-system)
4322 (arguments
4323 '(#:phases
4324 (modify-phases %standard-phases
4325 (delete 'check)
4326 (add-after 'install 'check
4327 (lambda* (#:key outputs inputs #:allow-other-keys)
4328 ;; It's easier to run tests after install.
4329 ;; Make installed package available for running the tests
4330 (add-installed-pythonpath inputs outputs)
4331 (zero? (system* "python" "-m" "rpy2.tests" "-v")))))))
4332 (propagated-inputs
4333 `(("python-six" ,python-six)))
4334 (inputs
4335 `(("readline" ,readline)
4336 ("icu4c" ,icu4c)
4337 ("pcre" ,pcre)
4338 ("r-minimal" ,r-minimal)
4339 ("r-survival" ,r-survival)))
4340 (native-inputs
4341 `(("zlib" ,zlib)))
4342 (home-page "http://rpy.sourceforge.net/")
4343 (synopsis "Python interface to the R language")
4344 (description "rpy2 is a redesign and rewrite of rpy. It is providing a
4345 low-level interface to R from Python, a proposed high-level interface,
4346 including wrappers to graphical libraries, as well as R-like structures and
4347 functions.")
4348 (license license:gpl3+)))
4349
4350 (define-public python2-rpy2
4351 (let ((rpy2 (package-with-python2 python-rpy2)))
4352 (package (inherit rpy2)
4353 (propagated-inputs
4354 `(("python2-singledispatch" ,python2-singledispatch)
4355 ,@(package-propagated-inputs rpy2))))))
4356
4357 (define-public python-scipy
4358 (package
4359 (name "python-scipy")
4360 (version "0.19.1")
4361 (source
4362 (origin
4363 (method url-fetch)
4364 (uri (pypi-uri "scipy" version))
4365 (sha256
4366 (base32
4367 "1rl411bvla6q7qfdb47fpdnyjhfgzl6smpha33n9ar1klykjr6m1"))))
4368 (build-system python-build-system)
4369 (propagated-inputs
4370 `(("python-numpy" ,python-numpy)
4371 ("python-matplotlib" ,python-matplotlib)
4372 ("python-pyparsing" ,python-pyparsing)))
4373 (inputs
4374 `(("lapack" ,lapack)
4375 ("openblas" ,openblas)))
4376 (native-inputs
4377 `(("python-cython" ,python-cython)
4378 ("python-nose" ,python-nose)
4379 ("python-sphinx" ,python-sphinx)
4380 ("python-numpydoc" ,python-numpydoc)
4381 ("gfortran" ,gfortran)
4382 ("perl" ,perl)))
4383 (outputs '("out" "doc"))
4384 (arguments
4385 `(#:phases
4386 (modify-phases %standard-phases
4387 (add-before 'build 'configure-openblas
4388 (lambda* (#:key inputs #:allow-other-keys)
4389 (call-with-output-file "site.cfg"
4390 (lambda (port)
4391 (format port
4392 "[blas]
4393 libraries = openblas
4394 library_dirs = ~a/lib
4395 include_dirs = ~a/include
4396
4397 # backslash-n to make emacs happy
4398 \n[atlas]
4399 library_dirs = ~a/lib
4400 atlas_libs = openblas
4401 "
4402 (assoc-ref inputs "openblas")
4403 (assoc-ref inputs "openblas")
4404 (assoc-ref inputs "openblas"))))
4405 #t))
4406 (add-after 'install 'install-doc
4407 (lambda* (#:key inputs outputs #:allow-other-keys)
4408 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4409 (doc (string-append data "/doc/" ,name "-" ,version))
4410 (html (string-append doc "/html"))
4411 (pyver ,(string-append "PYVER=")))
4412 ;; Make installed package available for building the
4413 ;; documentation
4414 (add-installed-pythonpath inputs outputs)
4415 (with-directory-excursion "doc"
4416 ;; Fix generation of images for mathematical expressions.
4417 (substitute* (find-files "source" "conf\\.py")
4418 (("pngmath_use_preview = True")
4419 "pngmath_use_preview = False"))
4420 (mkdir-p html)
4421 (system* "make" "html" pyver)
4422 (with-directory-excursion "build/html"
4423 (for-each (lambda (file)
4424 (let* ((dir (dirname file))
4425 (tgt-dir (string-append html "/" dir)))
4426 (install-file file html)))
4427 (find-files "." ".*")))))
4428 #t))
4429 (add-after 'unpack 'fix-tests
4430 (lambda _
4431 (substitute* "scipy/integrate/tests/test_quadpack.py"
4432 (("libm.so") "libm.so.6"))
4433 #t))
4434 ;; Tests can only be run after the library has been installed and not
4435 ;; within the source directory.
4436 (delete 'check)
4437 (add-after 'install 'check
4438 (lambda* (#:key inputs outputs #:allow-other-keys)
4439 (add-installed-pythonpath inputs outputs)
4440 (with-directory-excursion "/tmp"
4441 (zero? (system* "python" "-c"
4442 "import scipy; scipy.test('full')")))
4443 #t)))))
4444 (home-page "http://www.scipy.org/")
4445 (synopsis "The Scipy library provides efficient numerical routines")
4446 (description "The SciPy library is one of the core packages that make up
4447 the SciPy stack. It provides many user-friendly and efficient numerical
4448 routines such as routines for numerical integration and optimization.")
4449 (properties `((python2-variant . ,(delay python2-scipy))))
4450 (license license:bsd-3)))
4451
4452 (define-public python2-scipy
4453 (package-with-python2
4454 (strip-python2-variant python-scipy)))
4455
4456 (define-public python-sockjs-tornado
4457 (package
4458 (name "python-sockjs-tornado")
4459 (version "1.0.3")
4460 (source
4461 (origin
4462 (method url-fetch)
4463 (uri (pypi-uri "sockjs-tornado" version))
4464 (sha256
4465 (base32
4466 "16cff40nniqsyvda1pb2j3b4zwmrw7y2g1vqq78lp20xpmhnwwkd"))))
4467 (build-system python-build-system)
4468 (arguments
4469 `(;; There are no tests, and running the test phase requires missing
4470 ;; dependencies
4471 #:tests? #f))
4472 (propagated-inputs
4473 `(("python-tornado" ,python-tornado)))
4474 (home-page "http://github.com/mrjoes/sockjs-tornado/")
4475 (synopsis
4476 "SockJS python server implementation on top of Tornado framework")
4477 (description
4478 "SockJS-tornado provides the server side counterpart to a SockJS client
4479 library, through the Tornado framework.
4480
4481 SockJS provides a low latency, full duplex, cross-domain communication channel
4482 between a web browser and web server.")
4483 (license license:expat)))
4484
4485 (define-public python2-sockjs-tornado
4486 (package-with-python2 python-sockjs-tornado))
4487
4488 (define-public python-socksipy-branch
4489 (package
4490 (name "python-socksipy-branch")
4491 (version "1.01")
4492 (source
4493 (origin
4494 (method url-fetch)
4495 (uri (pypi-uri "SocksiPy-branch" version))
4496 (sha256
4497 (base32
4498 "01l41v4g7fy9fzvinmjxy6zcbhgqaif8dhdqm4w90fwcw9h51a8p"))))
4499 (build-system python-build-system)
4500 (arguments
4501 `(#:tests? #f)) ; There are no tests
4502 (home-page "https://code.google.com/archive/p/socksipy-branch/")
4503 (synopsis "Python SOCKS module")
4504 (description
4505 "SocksiPy - A Python SOCKS client module. It provides a
4506 socket-like interface that supports connections to any TCP
4507 service through the use of a SOCKS4, SOCKS5 or HTTP proxy.
4508 The original version was developed by Dan Haim, this is a
4509 branch created by Mario Vilas to address some open issues,
4510 as the original project seems to have been abandoned circa 2007.")
4511 (license license:bsd-3)))
4512
4513 (define-public python2-socksipy-branch
4514 (package-with-python2 python-socksipy-branch))
4515
4516 (define-public python-sqlalchemy
4517 (package
4518 (name "python-sqlalchemy")
4519 (version "1.0.12")
4520 (source
4521 (origin
4522 (method url-fetch)
4523 (uri (string-append "https://pypi.python.org/packages/source/S/"
4524 "SQLAlchemy/SQLAlchemy-" version ".tar.gz"))
4525 (sha256
4526 (base32
4527 "1l8qclhd0s90w3pvwhi5mjxdwr5j7gw7cjka2fx6f2vqmq7f4yb6"))))
4528 (build-system python-build-system)
4529 (native-inputs
4530 `(("python-cython" ,python-cython) ;for c extensions
4531 ("python-pytest" ,python-pytest)
4532 ("python-mock" ,python-mock))) ;for tests
4533 (arguments
4534 `(#:phases (alist-replace
4535 'check
4536 (lambda _ (zero? (system* "py.test")))
4537 %standard-phases)))
4538 (home-page "http://www.sqlalchemy.org")
4539 (synopsis "Database abstraction library")
4540 (description
4541 "SQLAlchemy is the Python SQL toolkit and Object Relational Mapper that
4542 gives application developers the full power and flexibility of SQL. It
4543 provides a full suite of well known enterprise-level persistence patterns,
4544 designed for efficient and high-performing database access, adapted into a
4545 simple and Pythonic domain language.")
4546 (license license:x11)))
4547
4548 (define-public python2-sqlalchemy
4549 (package-with-python2 python-sqlalchemy))
4550
4551 (define-public python-pycodestyle
4552 (package
4553 (name "python-pycodestyle")
4554 (version "2.3.1")
4555 (source
4556 (origin
4557 (method url-fetch)
4558 (uri (pypi-uri "pycodestyle" version))
4559 (sha256
4560 (base32
4561 "0rk78b66p57ala26mdldl9lafr48blv5s659sah9q50qnfjmc8k8"))))
4562 (build-system python-build-system)
4563 (home-page "https://pycodestyle.readthedocs.io/")
4564 (synopsis "Python style guide checker")
4565 (description "@code{pycodestyle} (formerly pep8) is a tool to check
4566 Python code against some of the style conventions in
4567 @url{http://www.python.org/dev/peps/pep-0008/,PEP 8}.")
4568 (license license:expat)))
4569
4570 (define-public python2-pycodestyle
4571 (package-with-python2 python-pycodestyle))
4572
4573 (define-public python-orderedmultidict
4574 (package
4575 (name "python-orderedmultidict")
4576 (version "0.7.11")
4577 (source
4578 (origin
4579 (method url-fetch)
4580 (uri (pypi-uri "orderedmultidict" version))
4581 (sha256
4582 (base32
4583 "0dls862ibm7qbq4fnvwx0xn1v9hwyzywbff8xjjdr42dd75208yw"))))
4584 (build-system python-build-system)
4585 (arguments
4586 `(#:phases
4587 (modify-phases %standard-phases
4588 (add-after 'unpack 'fix-tests
4589 (lambda _
4590 ;; The package uses nosetest for running the tests.
4591 ;; Adding this initfile allows to run the test suite
4592 ;; without requiring nosetest.
4593 (zero? (system* "touch" "tests/__init__.py")))))))
4594 (propagated-inputs
4595 `(("python-six" ,python-six)))
4596 (native-inputs
4597 `(("python-pycodestyle" ,python-pycodestyle)))
4598 (home-page "https://github.com/gruns/orderedmultidict")
4599 (synopsis "Python Ordered Multivalue Dictionary - omdict")
4600 (description "This package contains a library for ordered multivalue
4601 dictionaries. A multivalue dictionary is a dictionary that can store
4602 multiple values for the same key. An ordered multivalue dictionary is a
4603 multivalue dictionary that retains the order of insertions and deletions.")
4604 (license license:unlicense)))
4605
4606 (define-public python2-orderedmultidict
4607 (package-with-python2 python-orderedmultidict))
4608
4609 (define-public python-furl
4610 (package
4611 (name "python-furl")
4612 (version "0.5.6")
4613 (source
4614 (origin
4615 (method url-fetch)
4616 (uri (pypi-uri "furl" version))
4617 (sha256
4618 (base32
4619 "0lzpfpm686hvz3sr1mcrnd1b3lgmnw8v59gb43wfi98r3b671pqc"))))
4620 (build-system python-build-system)
4621 (propagated-inputs
4622 `(("python-six" ,python-six)
4623 ("python-orderedmultidict" ,python-orderedmultidict)))
4624 (native-inputs
4625 `(("python-pycodestyle" ,python-pycodestyle)))
4626 (home-page "https://github.com/gruns/furl")
4627 (synopsis "URL manipulation in Python")
4628 (description "Furl provides an easy-to-use alternative to the
4629 @code{urllib} and @code{urlparse} modules for manipulating URLs.")
4630 (license license:unlicense)))
4631
4632 (define-public python2-furl
4633 (package-with-python2 python-furl))
4634
4635 (define-public python-flaky
4636 (package
4637 (name "python-flaky")
4638 (version "3.4.0")
4639 (source (origin
4640 (method url-fetch)
4641 (uri (pypi-uri "flaky" version))
4642 (sha256
4643 (base32
4644 "18pkmf79rfkfpy1d2rrx3v55nxj762ilyk9rvd6s6dccxw58imsa"))))
4645 (build-system python-build-system)
4646 (arguments
4647 ;; TODO: Tests require 'coveralls' and 'genty' which are not in Guix yet.
4648 '(#:tests? #f))
4649 (home-page "https://github.com/box/flaky")
4650 (synopsis "Automatically rerun flaky tests")
4651 (description
4652 "Flaky is a plugin for @code{nose} or @code{py.test} that automatically
4653 reruns flaky tests.
4654
4655 Ideally, tests reliably pass or fail, but sometimes test fixtures must rely
4656 on components that aren't 100% reliable. With flaky, instead of removing
4657 those tests or marking them to @code{@@skip}, they can be automatically
4658 retried.")
4659 (license license:asl2.0)))
4660
4661 (define-public python2-flaky
4662 (package-with-python2 python-flaky))
4663
4664 (define-public python-flask-babel
4665 (package
4666 (name "python-flask-babel")
4667 (version "0.11.1")
4668 (source
4669 (origin
4670 (method url-fetch)
4671 (uri (pypi-uri "Flask-Babel" version))
4672 (sha256
4673 (base32
4674 "16b80cipdba9xj3jlaiaq6wgrgpjb70w3j01jjy9hbp4k71kd6yj"))))
4675 (build-system python-build-system)
4676 (propagated-inputs
4677 `(("python-flask" ,python-flask)
4678 ("python-babel" ,python-babel)
4679 ("python-jinja2" ,python-jinja2)
4680 ("python-pytz" ,python-pytz)))
4681 (home-page "https://github.com/python-babel/flask-babel")
4682 (synopsis "Add i18n/l10n support to Flask applications")
4683 (description "This package implements internationalization and localization
4684 support for Flask. This is based on the Python babel module as well as pytz -
4685 both of which are installed automatically if you install this library.")
4686 (license license:bsd-3)))
4687
4688 (define-public python2-flask-babel
4689 (package-with-python2 python-flask-babel))
4690
4691 (define-public python-sqlalchemy-utils
4692 (package
4693 (name "python-sqlalchemy-utils")
4694 (version "0.32.13")
4695 (source
4696 (origin
4697 (method url-fetch)
4698 (uri (pypi-uri "SQLAlchemy-Utils" version))
4699 (sha256
4700 (base32
4701 "0vsib7gidjamzsz6w4s5pdhxzxsrkghjnm4sqwk94igjrl3i5ixj"))))
4702 (build-system python-build-system)
4703 (arguments
4704 '(#:tests? #f)) ; FIXME: Many tests require a running database server.
4705 ;; #:phases
4706 ;; (modify-phases %standard-phases
4707 ;; (replace 'check
4708 ;; (lambda _
4709 ;; (zero? (system* "py.test" "sqlalchemy_utils" "tests")))))
4710 (propagated-inputs
4711 `(("python-six" ,python-six)
4712 ("python-sqlalchemy" ,python-sqlalchemy)))
4713 (native-inputs
4714 `(("python-dateutil" ,python-dateutil)
4715 ("python-flexmock" ,python-flexmock)
4716 ("python-psycopg2" ,python-psycopg2)
4717 ("python-pytest" ,python-pytest)
4718 ("python-pytz" ,python-pytz)))
4719 (home-page "https://github.com/kvesteri/sqlalchemy-utils")
4720 (synopsis "Various utility functions for SQLAlchemy")
4721 (description
4722 "SQLAlchemy-utils provides various utility functions and custom data types
4723 for SQLAlchemy. SQLAlchemy is an SQL database abstraction library for Python.
4724
4725 You might also want to install the following optional dependencies:
4726 @enumerate
4727 @item @code{python-passlib}
4728 @item @code{python-babel}
4729 @item @code{python-cryptography}
4730 @item @code{python-pytz}
4731 @item @code{python-psycopg2}
4732 @item @code{python-furl}
4733 @item @code{python-flask-babel}
4734 @end enumerate
4735 ")
4736 (license license:bsd-3)))
4737
4738 (define-public python2-sqlalchemy-utils
4739 (package-with-python2 python-sqlalchemy-utils))
4740
4741 (define-public python-alembic
4742 (package
4743 (name "python-alembic")
4744 (version "0.8.10")
4745 (source
4746 (origin
4747 (method url-fetch)
4748 (uri (pypi-uri "alembic" version))
4749 (sha256
4750 (base32
4751 "06br9sfqypnjlal6fsbnky3zb0askwcn3diz8k3kwa0qcblm0fqf"))))
4752 (build-system python-build-system)
4753 (native-inputs
4754 `(("python-mock" ,python-mock)
4755 ("python-pytest-cov" ,python-pytest-cov)))
4756 (propagated-inputs
4757 `(("python-sqlalchemy" ,python-sqlalchemy)
4758 ("python-mako" ,python-mako)
4759 ("python-editor" ,python-editor)))
4760 (home-page "http://bitbucket.org/zzzeek/alembic")
4761 (synopsis
4762 "Database migration tool for SQLAlchemy")
4763 (description
4764 "Alembic is a lightweight database migration tool for usage with the
4765 SQLAlchemy Database Toolkit for Python.")
4766 (license license:expat)))
4767
4768 (define-public python2-alembic
4769 (package-with-python2 python-alembic))
4770
4771 (define-public python-autopep8
4772 (package
4773 (name "python-autopep8")
4774 (version "1.2.4")
4775 (source
4776 (origin
4777 (method url-fetch)
4778 (uri (pypi-uri "autopep8" version))
4779 (sha256
4780 (base32
4781 "18parm383lfn42a00wklv3qf20p4v277f1x3cn58x019dqk1xqrq"))))
4782 (build-system python-build-system)
4783 (propagated-inputs
4784 `(("python-pep8" ,python-pep8)))
4785 (home-page "https://github.com/hhatto/autopep8")
4786 (synopsis "Format Python code according to the PEP 8 style guide")
4787 (description
4788 "@code{autopep8} automatically formats Python code to conform to
4789 the PEP 8 style guide. It uses the pycodestyle utility to determine
4790 what parts of the code needs to be formatted. @code{autopep8} is
4791 capable of fixing most of the formatting issues that can be reported
4792 by pycodestyle.")
4793 (license (license:non-copyleft
4794 "https://github.com/hhatto/autopep8/blob/master/LICENSE"))))
4795
4796 (define-public python2-autopep8
4797 (package-with-python2 python-autopep8))
4798
4799 (define-public python-distutils-extra
4800 (package
4801 (name "python-distutils-extra")
4802 (version "2.38")
4803 (source
4804 (origin
4805 (method url-fetch)
4806 (uri (string-append "https://launchpad.net/python-distutils-extra/trunk/"
4807 version "/+download/python-distutils-extra-"
4808 version ".tar.gz"))
4809 (sha256
4810 (base32
4811 "0lx15kcbby9zisx33p2h5hgakgwh2bvh0ibag8z0px4j6ifhs41x"))))
4812 (build-system python-build-system)
4813 (home-page "https://launchpad.net/python-distutils-extra/")
4814 (synopsis "Enhancements to Python's distutils")
4815 (description
4816 "The python-distutils-extra module enables you to easily integrate
4817 gettext support, themed icons, and scrollkeeper-based documentation into
4818 Python's distutils.")
4819 (license license:gpl2)))
4820
4821 (define-public python2-distutils-extra
4822 (package-with-python2 python-distutils-extra))
4823
4824 (define-public python2-elib.intl
4825 (package
4826 (name "python2-elib.intl")
4827 (version "0.0.3")
4828 (source
4829 (origin
4830 ;; This project doesn't tag releases or publish tarballs, so we take
4831 ;; source from a (semi-arbitrary, i.e. latest as of now) git commit.
4832 (method git-fetch)
4833 (uri (git-reference
4834 (url "https://github.com/dieterv/elib.intl.git")
4835 (commit "d09997cfef")))
4836 (sha256
4837 (base32
4838 "0y7vzff9xgbnaay7m0va1arl6g68ncwrvbgwl7jqlclsahzzb09d"))))
4839 (build-system python-build-system)
4840 (arguments
4841 ;; incompatible with Python 3 (exception syntax)
4842 `(#:python ,python-2
4843 #:tests? #f))
4844 (home-page "https://github.com/dieterv/elib.intl")
4845 (synopsis "Enhanced internationalization for Python")
4846 (description
4847 "The elib.intl module provides enhanced internationalization (I18N)
4848 services for your Python modules and applications.")
4849 (license license:lgpl3+)))
4850
4851 (define-public python-pillow
4852 (package
4853 (name "python-pillow")
4854 (version "3.3.3")
4855 (source
4856 (origin
4857 (method url-fetch)
4858 (uri (pypi-uri "Pillow" version))
4859 (patches (search-patches "python-pillow-freetype-2.7-test-failure.patch"))
4860 (sha256
4861 (base32
4862 "0xkv0p1d73gz0a1qaasf0ai4262g8f334j07vd60bjrxs2wr3nmj"))))
4863 (build-system python-build-system)
4864 (native-inputs
4865 `(("python-nose" ,python-nose)))
4866 (inputs
4867 `(("freetype" ,freetype)
4868 ("lcms" ,lcms)
4869 ("zlib" ,zlib)
4870 ("libjpeg" ,libjpeg)
4871 ("openjpeg" ,openjpeg)
4872 ("libtiff" ,libtiff)
4873 ("libwebp" ,libwebp)))
4874 (arguments
4875 `(#:phases (modify-phases %standard-phases
4876 (add-after
4877 'install 'check-installed
4878 (lambda* (#:key outputs inputs #:allow-other-keys)
4879 (begin
4880 (setenv "HOME" (getcwd))
4881 ;; Make installed package available for running the
4882 ;; tests
4883 (add-installed-pythonpath inputs outputs)
4884 (and (zero? (system* "python" "selftest.py"
4885 "--installed"))
4886 (zero? (system* "python" "test-installed.py"))))))
4887 (delete 'check))))
4888 (home-page "https://pypi.python.org/pypi/Pillow")
4889 (synopsis "Fork of the Python Imaging Library")
4890 (description
4891 "The Python Imaging Library adds image processing capabilities to your
4892 Python interpreter. This library provides extensive file format support, an
4893 efficient internal representation, and fairly powerful image processing
4894 capabilities. The core image library is designed for fast access to data
4895 stored in a few basic pixel formats. It should provide a solid foundation for
4896 a general image processing tool.")
4897 (license (license:x11-style
4898 "http://www.pythonware.com/products/pil/license.htm"
4899 "The PIL Software License"))))
4900
4901 (define-public python2-pillow
4902 (package-with-python2 python-pillow))
4903
4904 (define-public python-pycparser
4905 (package
4906 (name "python-pycparser")
4907 (version "2.17")
4908 (source
4909 (origin
4910 (method url-fetch)
4911 (uri (pypi-uri "pycparser" version))
4912 (sha256
4913 (base32
4914 "1dkkjri0miidqb1zcqhqljfa34fcy9k5akasgwsv6k622zlk3b0a"))))
4915 (outputs '("out" "doc"))
4916 (build-system python-build-system)
4917 (native-inputs
4918 `(("pkg-config" ,pkg-config)))
4919 (arguments
4920 `(#:phases
4921 (modify-phases %standard-phases
4922 (replace 'check
4923 (lambda _
4924 (with-directory-excursion "tests"
4925 (zero? (system* "python" "all_tests.py")))))
4926 (add-after 'install 'install-doc
4927 (lambda* (#:key outputs #:allow-other-keys)
4928 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4929 (doc (string-append data "/doc/" ,name "-" ,version))
4930 (examples (string-append doc "/examples")))
4931 (mkdir-p examples)
4932 (for-each (lambda (file)
4933 (copy-file (string-append "." file)
4934 (string-append doc file)))
4935 '("/README.rst" "/CHANGES" "/LICENSE"))
4936 (copy-recursively "examples" examples)))))))
4937 (home-page "https://github.com/eliben/pycparser")
4938 (synopsis "C parser in Python")
4939 (description
4940 "Pycparser is a complete parser of the C language, written in pure Python
4941 using the PLY parsing library. It parses C code into an AST and can serve as
4942 a front-end for C compilers or analysis tools.")
4943 (license license:bsd-3)))
4944
4945 (define-public python2-pycparser
4946 (package-with-python2 python-pycparser))
4947
4948 (define-public python-cffi
4949 (package
4950 (name "python-cffi")
4951 (version "1.10.0")
4952 (source
4953 (origin
4954 (method url-fetch)
4955 (uri (pypi-uri "cffi" version))
4956 (sha256
4957 (base32 "1mffyilq4qycm8gs4wkgb18rnqil8a9blqq77chdlshzxc8jkc5k"))))
4958 (build-system python-build-system)
4959 (outputs '("out" "doc"))
4960 (inputs
4961 `(("libffi" ,libffi)))
4962 (propagated-inputs ; required at run-time
4963 `(("python-pycparser" ,python-pycparser)))
4964 (native-inputs
4965 `(("pkg-config" ,pkg-config)
4966 ("python-sphinx" ,python-sphinx)
4967 ("python-pytest" ,python-pytest)))
4968 (arguments
4969 `(#:modules ((ice-9 ftw)
4970 (srfi srfi-26)
4971 (guix build utils)
4972 (guix build python-build-system))
4973 #:phases
4974 (modify-phases %standard-phases
4975 (replace 'check
4976 (lambda _
4977 (setenv "PYTHONPATH"
4978 (string-append
4979 (getenv "PYTHONPATH")
4980 ":" (getcwd) "/build/"
4981 (car (scandir "build" (cut string-prefix? "lib." <>)))))
4982
4983 ;; XXX The "normal" approach of setting CC and friends does
4984 ;; not work here. Is this the correct way of doing things?
4985 (substitute* "testing/embedding/test_basic.py"
4986 (("c = distutils\\.ccompiler\\.new_compiler\\(\\)")
4987 (string-append "c = distutils.ccompiler.new_compiler();"
4988 "c.set_executables(compiler='gcc',"
4989 "compiler_so='gcc',linker_exe='gcc',"
4990 "linker_so='gcc -shared')")))
4991 (substitute* "testing/cffi0/test_ownlib.py"
4992 (("'cc testownlib") "'gcc testownlib"))
4993 (zero? (system* "py.test" "-v" "c/" "testing/"))))
4994 (add-after 'install 'install-doc
4995 (lambda* (#:key outputs #:allow-other-keys)
4996 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4997 (doc (string-append data "/doc/" ,name "-" ,version))
4998 (html (string-append doc "/html")))
4999 (with-directory-excursion "doc"
5000 (system* "make" "html")
5001 (mkdir-p html)
5002 (copy-recursively "build/html" html))
5003 (copy-file "LICENSE" (string-append doc "/LICENSE"))
5004 #t))))))
5005 (home-page "http://cffi.readthedocs.org")
5006 (synopsis "Foreign function interface for Python")
5007 (description
5008 "Foreign Function Interface for Python calling C code.")
5009 (license license:expat)))
5010
5011 (define-public python2-cffi
5012 (package-with-python2 python-cffi))
5013
5014 (define-public python-xcffib
5015 (package
5016 (name "python-xcffib")
5017 (version "0.5.1")
5018 (source
5019 (origin
5020 (method url-fetch)
5021 (uri (pypi-uri "xcffib" version))
5022 (sha256
5023 (base32
5024 "09gbnmr5vn58mm8xi3fmd7fz6743cks6c46dphnxzwax6zsxmy60"))))
5025 (build-system python-build-system)
5026 (inputs
5027 `(("libxcb" ,libxcb)))
5028 (propagated-inputs
5029 `(("python-cffi" ,python-cffi) ; used at run time
5030 ("python-six" ,python-six)))
5031 (arguments
5032 `(;; FIXME: Tests need more work. See ".travis.yml" in the repository.
5033 #:tests? #f
5034 #:phases
5035 (modify-phases %standard-phases
5036 (add-after 'unpack 'fix-libxcb-path
5037 (lambda* (#:key inputs #:allow-other-keys)
5038 (let ((libxcb (assoc-ref inputs "libxcb")))
5039 (substitute* '("xcffib/__init__.py")
5040 (("^soname = \"") (string-append "soname = \"" libxcb "/lib/")))
5041 #t)))
5042 (add-after 'install 'install-doc
5043 (lambda* (#:key outputs #:allow-other-keys)
5044 (let ((doc (string-append (assoc-ref outputs "out") "/share"
5045 "/doc/" ,name "-" ,version)))
5046 (mkdir-p doc)
5047 (copy-file "README.md"
5048 (string-append doc "/README.md"))
5049 #t))))))
5050 (home-page "https://github.com/tych0/xcffib")
5051 (synopsis "XCB Python bindings")
5052 (description
5053 "Xcffib is a replacement for xpyb, an XCB Python bindings. It adds
5054 support for Python 3 and PyPy. It is based on cffi.")
5055 (license license:expat)))
5056
5057 (define-public python2-xcffib
5058 (package-with-python2 python-xcffib))
5059
5060 (define-public python-cairocffi
5061 (package
5062 (name "python-cairocffi")
5063 (version "0.8.0")
5064 (source
5065 (origin
5066 (method url-fetch)
5067 ;; The archive on pypi is missing the 'utils' directory!
5068 (uri (string-append "https://github.com/Kozea/cairocffi/archive/v"
5069 version ".tar.gz"))
5070 (file-name (string-append name "-" version ".tar.gz"))
5071 (sha256
5072 (base32
5073 "1rk2dvy3fxrga6bvvxc2fi5lbaynm5h4a0w0aaxyn3bc77rszjg9"))))
5074 (build-system python-build-system)
5075 (outputs '("out" "doc"))
5076 (inputs
5077 `(("gdk-pixbuf" ,gdk-pixbuf)
5078 ("cairo" ,cairo)))
5079 (native-inputs
5080 `(("pkg-config" ,pkg-config)
5081 ("python-sphinx" ,python-sphinx)
5082 ("python-docutils" ,python-docutils)))
5083 (propagated-inputs
5084 `(("python-xcffib" ,python-xcffib))) ; used at run time
5085 (arguments
5086 `(;; FIXME: Tests cannot find 'libcairo.so.2'.
5087 #:tests? #f
5088 #:phases
5089 (modify-phases %standard-phases
5090 (add-after 'install 'install-doc
5091 (lambda* (#:key inputs outputs #:allow-other-keys)
5092 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
5093 (doc (string-append data "/doc/" ,name "-" ,version))
5094 (html (string-append doc "/html")))
5095 (setenv "LD_LIBRARY_PATH"
5096 (string-append (assoc-ref inputs "cairo") "/lib" ":"
5097 (assoc-ref inputs "gdk-pixbuf") "/lib"))
5098 (setenv "LANG" "en_US.UTF-8")
5099 (mkdir-p html)
5100 (for-each (lambda (file)
5101 (copy-file (string-append "." file)
5102 (string-append doc file)))
5103 '("/README.rst" "/CHANGES" "/LICENSE"))
5104 (system* "python" "setup.py" "build_sphinx")
5105 (copy-recursively "docs/_build/html" html)
5106 #t))))))
5107 (home-page "https://github.com/Kozea/cairocffi")
5108 (synopsis "Python bindings and object-oriented API for Cairo")
5109 (description
5110 "Cairocffi is a CFFI-based drop-in replacement for Pycairo, a set of
5111 Python bindings and object-oriented API for cairo. Cairo is a 2D vector
5112 graphics library with support for multiple backends including image buffers,
5113 PNG, PostScript, PDF, and SVG file output.")
5114 (license license:bsd-3)))
5115
5116 (define-public python2-cairocffi
5117 (package-with-python2 python-cairocffi))
5118
5119 (define-public python-decorator
5120 (package
5121 (name "python-decorator")
5122 (version "4.0.10")
5123 (source
5124 (origin
5125 (method url-fetch)
5126 (uri (pypi-uri "decorator" version))
5127 (sha256
5128 (base32 "0w7hg59hlpq74jpyja4yfryap0ccjvchgpkfp20rhj9krgnrhvlw"))))
5129 (build-system python-build-system)
5130 (arguments '(#:tests? #f)) ; no test target
5131 (home-page "https://pypi.python.org/pypi/decorator/")
5132 (synopsis "Python module to simplify usage of decorators")
5133 (description
5134 "The aim of the decorator module is to simplify the usage of decorators
5135 for the average programmer, and to popularize decorators usage giving examples
5136 of useful decorators, such as memoize, tracing, redirecting_stdout, locked,
5137 etc. The core of this module is a decorator factory.")
5138 (license license:expat)))
5139
5140 (define-public python2-decorator
5141 (package-with-python2 python-decorator))
5142
5143 (define-public python-drmaa
5144 (package
5145 (name "python-drmaa")
5146 (version "0.7.7")
5147 (source
5148 (origin
5149 (method url-fetch)
5150 (uri (pypi-uri "drmaa" version))
5151 (sha256
5152 (base32 "0xzqriqyvk5b8hszbavsyxd29wm3sxirm8zvvdm73rs2iq7w4hkx"))))
5153 (build-system python-build-system)
5154 ;; The test suite requires libdrmaa which is provided by the cluster
5155 ;; environment. At runtime the environment variable DRMAA_LIBRARY_PATH
5156 ;; should be set to the path of the libdrmaa library.
5157 (arguments '(#:tests? #f))
5158 (native-inputs
5159 `(("python-nose" ,python-nose)))
5160 (home-page "https://pypi.python.org/pypi/drmaa")
5161 (synopsis "Python bindings for the DRMAA library")
5162 (description
5163 "A Python package for Distributed Resource Management (DRM) job
5164 submission and control. This package is an implementation of the DRMAA 1.0
5165 Python language binding specification.")
5166 (license license:bsd-3)))
5167
5168 (define-public python2-drmaa
5169 (package-with-python2 python-drmaa))
5170
5171 (define-public python-grako
5172 (package
5173 (name "python-grako")
5174 (version "3.99.9")
5175 (source
5176 (origin
5177 (method url-fetch)
5178 (uri
5179 (pypi-uri "grako" version ".zip"))
5180 (sha256
5181 (base32
5182 "0r63i68wcnv63rfjkasq1ah81frz61a6mzbcnaxhrkdpx84p7hzw"))))
5183 (build-system python-build-system)
5184 (arguments '(#:tests? #f)) ; Test file 'grako.ebnf' is missing from archive.
5185 (native-inputs
5186 `(("unzip" ,unzip)
5187 ("python-pytest" ,python-pytest-3.0)
5188 ("python-pytest-runner" ,python-pytest-runner)))
5189 (home-page "https://bitbucket.org/neogeny/grako")
5190 (synopsis "EBNF parser generator")
5191 (description
5192 "Grako takes a grammar in a variation of EBNF as input, and outputs a
5193 memoizing PEG/Packrat parser in Python.")
5194 (license license:bsd-3)))
5195
5196 (define-public python2-grako
5197 (package-with-python2 python-grako))
5198
5199 (define-public python-gridmap
5200 (package
5201 (name "python-gridmap")
5202 (version "0.13.0")
5203 (source
5204 (origin
5205 (method url-fetch)
5206 (uri (string-append
5207 "https://github.com/pygridtools/gridmap/archive/v"
5208 version ".tar.gz"))
5209 (file-name (string-append name "-" version ".tar.gz"))
5210 (sha256
5211 (base32 "1gzjg2k6f14i1msm2b0ax8d9ds1hvk6qd5nlaivg8m4cxqp4cp1x"))))
5212 (build-system python-build-system)
5213 (arguments
5214 '(#:tests? #f)) ; FIXME: Requires python-cherrypy.
5215 (propagated-inputs
5216 `(("python-psutil" ,python-psutil)
5217 ("python-drmaa" ,python-drmaa)
5218 ("python-pyzmq" ,python-pyzmq)))
5219 (home-page "https://github.com/pygridtools/gridmap")
5220 (synopsis "Create jobs on a cluster directly from Python")
5221 (description
5222 "Gridmap is a Python package to allow you to easily create jobs on the
5223 cluster directly from Python. You can directly map Python functions onto the
5224 cluster without needing to write any wrapper code yourself.")
5225 (license license:gpl3+)))
5226
5227 (define-public python2-gridmap
5228 (package-with-python2 python-gridmap))
5229
5230 (define-public python-pexpect
5231 (package
5232 (name "python-pexpect")
5233 (version "4.2.1")
5234 (source
5235 (origin
5236 (method url-fetch)
5237 (uri (pypi-uri "pexpect" version))
5238 (sha256
5239 (base32 "14ls7k99pwvl21zqv65kzrhccv50j89m5ij1hf0slmsvlxjj84rx"))))
5240 (build-system python-build-system)
5241 (arguments
5242 `(#:phases
5243 (modify-phases %standard-phases
5244 (add-before 'check 'prepare-tests
5245 (lambda _
5246 (substitute* (find-files "tests")
5247 (("/bin/ls") (which "ls"))
5248 (("/bin/echo") (which "echo"))
5249 (("/bin/which") (which "which"))
5250 ;; Many tests try to use the /bin directory which
5251 ;; is not present in the build environment.
5252 ;; Use one that's non-empty and unlikely to change.
5253 (("/bin'") "/dev'"))
5254 ;; XXX: Socket connection test gets "Connection reset by peer".
5255 ;; Why does it not work? Delete for now.
5256 (delete-file "tests/test_socket.py")
5257 #t))
5258 (replace 'check (lambda _ (zero? (system* "nosetests" "-v")))))))
5259 (native-inputs
5260 `(("python-nose" ,python-nose)
5261 ("python-pytest" ,python-pytest-3.0)
5262 ("man-db" ,man-db)
5263 ("which" ,which)))
5264 (propagated-inputs
5265 `(("python-ptyprocess" ,python-ptyprocess)))
5266 (home-page "http://pexpect.readthedocs.org/")
5267 (synopsis "Controlling interactive console applications")
5268 (description
5269 "Pexpect is a pure Python module for spawning child applications;
5270 controlling them; and responding to expected patterns in their output.
5271 Pexpect works like Don Libes’ Expect. Pexpect allows your script to spawn a
5272 child application and control it as if a human were typing commands.")
5273 (license license:isc)))
5274
5275 (define-public python2-pexpect
5276 (package-with-python2 python-pexpect))
5277
5278 (define-public python-setuptools-scm
5279 (package
5280 (name "python-setuptools-scm")
5281 (version "1.15.0")
5282 (source (origin
5283 (method url-fetch)
5284 (uri (pypi-uri "setuptools_scm" version))
5285 (sha256
5286 (base32
5287 "0bwyc5markib0i7i2qlyhdzxhiywzxbkfiapldma8m91m82jvwfs"))))
5288 (build-system python-build-system)
5289 (home-page "https://github.com/pypa/setuptools_scm/")
5290 (synopsis "Manage Python package versions in SCM metadata")
5291 (description
5292 "Setuptools_scm handles managing your Python package versions in
5293 @dfn{software configuration management} (SCM) metadata instead of declaring
5294 them as the version argument or in a SCM managed file.")
5295 (license license:expat)))
5296
5297 (define-public python2-setuptools-scm
5298 (package-with-python2 python-setuptools-scm))
5299
5300 (define-public python-pathpy
5301 (package
5302 (name "python-pathpy")
5303 (version "8.1.1")
5304 (source
5305 (origin
5306 (method url-fetch)
5307 (uri (string-append "https://pypi.python.org/packages/source/p/"
5308 "path.py/path.py-" version ".tar.gz"))
5309 (sha256
5310 (base32 "1p8s1l2vfkqhqxdhqlj0g1jjw4f1as2frr35sjcpjjpd5a89y41f"))))
5311 (outputs '("out" "doc"))
5312 (build-system python-build-system)
5313 (propagated-inputs
5314 `(("python-appdirs" ,python-appdirs)))
5315 (native-inputs
5316 `(("python-setuptools-scm" ,python-setuptools-scm)
5317 ("python-sphinx" ,python-sphinx)
5318 ("python-rst.linker" ,python-rst.linker)
5319 ("python-pytest" ,python-pytest)
5320 ("python-pytest-runner" ,python-pytest-runner)))
5321 (arguments
5322 `(#:phases
5323 (modify-phases %standard-phases
5324 (add-after 'build 'build-doc
5325 (lambda _
5326 (setenv "LANG" "en_US.UTF-8")
5327 (zero? (system* "python" "setup.py" "build_sphinx"))))
5328 (add-after 'install 'install-doc
5329 (lambda* (#:key outputs #:allow-other-keys)
5330 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
5331 (doc (string-append data "/doc/" ,name "-" ,version))
5332 (html (string-append doc "/html")))
5333 (mkdir-p html)
5334 (for-each (lambda (file)
5335 (copy-file file (string-append doc "/" file)))
5336 '("README.rst" "CHANGES.rst"))
5337 (copy-recursively "build/sphinx/html" html)))))))
5338 (home-page "https://github.com/jaraco/path.py")
5339 (synopsis "Python module wrapper for built-in os.path")
5340 (description
5341 "@code{path.py} implements path objects as first-class entities, allowing
5342 common operations on files to be invoked on those path objects directly.")
5343 (license license:expat)))
5344
5345 (define-public python2-pathpy
5346 (package-with-python2 python-pathpy))
5347
5348 (define-public python-pickleshare
5349 (package
5350 (name "python-pickleshare")
5351 (version "0.5")
5352 (source
5353 (origin
5354 (method url-fetch)
5355 (uri (string-append "https://pypi.python.org/packages/source/p/"
5356 "pickleshare/pickleshare-" version ".tar.gz"))
5357 (sha256
5358 (base32 "11ljr90j3p6qswdrbl7p4cjb2i93f6vn0vx9anzpshsx0d2mggn0"))))
5359 (build-system python-build-system)
5360 (propagated-inputs
5361 `(("python-pathpy" ,python-pathpy)))
5362 (home-page "https://github.com/vivainio/pickleshare")
5363 (synopsis "Tiny key value database with concurrency support")
5364 (description
5365 "PickleShare is a small ‘shelve’-like datastore with concurrency support.
5366 Like shelve, a PickleShareDB object acts like a normal dictionary. Unlike
5367 shelve, many processes can access the database simultaneously. Changing a
5368 value in database is immediately visible to other processes accessing the same
5369 database. Concurrency is possible because the values are stored in separate
5370 files. Hence the “database” is a directory where all files are governed by
5371 PickleShare.")
5372 (license license:expat)))
5373
5374 (define-public python2-pickleshare
5375 (package-with-python2 python-pickleshare))
5376
5377 (define-public python-simplegeneric
5378 (package
5379 (name "python-simplegeneric")
5380 (version "0.8.1")
5381 (source
5382 (origin
5383 (method url-fetch)
5384 (uri (string-append "https://pypi.python.org/packages/source/s/"
5385 "simplegeneric/simplegeneric-" version ".zip"))
5386 (sha256
5387 (base32 "0wwi1c6md4vkbcsfsf8dklf3vr4mcdj4mpxkanwgb6jb1432x5yw"))))
5388 (build-system python-build-system)
5389 (native-inputs
5390 `(("unzip" ,unzip)))
5391 (home-page "http://cheeseshop.python.org/pypi/simplegeneric")
5392 (synopsis "Python module for simple generic functions")
5393 (description
5394 "The simplegeneric module lets you define simple single-dispatch generic
5395 functions, akin to Python’s built-in generic functions like @code{len()},
5396 @code{iter()} and so on. However, instead of using specially-named methods,
5397 these generic functions use simple lookup tables, akin to those used by
5398 e.g. @code{pickle.dump()} and other generic functions found in the Python
5399 standard library.")
5400 (license license:zpl2.1)))
5401
5402 (define-public python2-simplegeneric
5403 (package-with-python2 python-simplegeneric))
5404
5405 (define-public python-ipython-genutils
5406 ;; TODO: This package is retired, check if can be removed, see description.
5407 (package
5408 (name "python-ipython-genutils")
5409 (version "0.1.0")
5410 (source
5411 (origin
5412 (method url-fetch)
5413 (uri (string-append "https://pypi.python.org/packages/source/i/"
5414 "ipython_genutils/ipython_genutils-"
5415 version ".tar.gz"))
5416 (sha256
5417 (base32 "19l2pp1c64ansr89l3cqh19jdi2ixhssdzx0vz4n6r52a6i281is"))))
5418 (build-system python-build-system)
5419 (arguments `(#:tests? #f)) ; no tests
5420 (home-page "http://ipython.org")
5421 (synopsis "Vestigial utilities from IPython")
5422 (description
5423 "This package provides retired utilities from IPython. No packages
5424 outside IPython/Jupyter should depend on it.
5425
5426 This package shouldn't exist. It contains some common utilities shared by
5427 Jupyter and IPython projects during The Big Split. As soon as possible, those
5428 packages will remove their dependency on this, and this package will go
5429 away.")
5430 (license license:bsd-3)))
5431
5432 (define-public python2-ipython-genutils
5433 (package-with-python2 python-ipython-genutils))
5434
5435 (define-public python-traitlets
5436 (package
5437 (name "python-traitlets")
5438 (version "4.2.0")
5439 (source
5440 (origin
5441 (method url-fetch)
5442 (uri (pypi-uri "traitlets" version))
5443 (sha256
5444 (base32
5445 "1afy08sa5n9gnkvh3da49c16zkyv598vchv0p1hp7zzjy8895hz4"))))
5446 (build-system python-build-system)
5447 (arguments
5448 `(#:phases
5449 (modify-phases %standard-phases
5450 (replace 'check (lambda _ (zero? (system* "nosetests")))))))
5451 (propagated-inputs
5452 `(("python-ipython-genutils" ,python-ipython-genutils)
5453 ("python-decorator" ,python-decorator)))
5454 (native-inputs
5455 `(("python-mock" ,python-mock)
5456 ("python-nose" ,python-nose)))
5457 (home-page "http://ipython.org")
5458 (synopsis "Configuration system for Python applications")
5459 (description
5460 "Traitlets is a framework that lets Python classes have attributes with
5461 type checking, dynamically calculated default values, and ‘on change’
5462 callbacks. The package also includes a mechanism to use traitlets for
5463 configuration, loading values from files or from command line arguments. This
5464 is a distinct layer on top of traitlets, so you can use traitlets in your code
5465 without using the configuration machinery.")
5466 (license license:bsd-3)))
5467
5468 (define-public python2-traitlets
5469 (package-with-python2 python-traitlets))
5470
5471 (define-public python-jupyter-core
5472 (package
5473 (name "python-jupyter-core")
5474 (version "4.2.1")
5475 (source
5476 (origin
5477 (method url-fetch)
5478 (uri (string-append (pypi-uri "jupyter_core" version)))
5479 (sha256
5480 (base32
5481 "1cy7inv218dgh4m1fbzbsiqpz733ylgjrj62jxqpfzs3r2cm7ic9"))))
5482 (build-system python-build-system)
5483 ;; FIXME: not sure how to run the tests
5484 (arguments `(#:tests? #f))
5485 (propagated-inputs
5486 `(("python-traitlets" ,python-traitlets)))
5487 (home-page "http://jupyter.org/")
5488 (synopsis "Jupyter base package")
5489 (description
5490 "Jupyter core is the base package on which Jupyter projects rely.")
5491 (license license:bsd-3)))
5492
5493 (define-public python2-jupyter-core
5494 (package-with-python2 python-jupyter-core))
5495
5496 (define-public python-jupyter-client
5497 (package
5498 (name "python-jupyter-client")
5499 (version "4.4.0")
5500 (source
5501 (origin
5502 (method url-fetch)
5503 (uri (pypi-uri "jupyter_client" version))
5504 (sha256
5505 (base32
5506 "1vjjrpjw7k5sh982pbjnslv7byfbfazjw9g92jvs7dz5qbx556n9"))))
5507 (build-system python-build-system)
5508 ;; Tests fail because of missing native python kernel which I assume is
5509 ;; provided by the ipython package, which we cannot use because it would
5510 ;; cause a dependency cycle.
5511 (arguments `(#:tests? #f))
5512 (propagated-inputs
5513 `(("python-pyzmq" ,python-pyzmq)
5514 ("python-traitlets" ,python-traitlets)
5515 ("python-jupyter-core" ,python-jupyter-core)))
5516 (home-page "http://jupyter.org/")
5517 (synopsis "Jupyter protocol implementation and client libraries")
5518 (description
5519 "The @code{jupyter_client} package contains the reference implementation
5520 of the Jupyter protocol. It also provides client and kernel management APIs
5521 for working with kernels, and the @code{jupyter kernelspec} entrypoint for
5522 installing @code{kernelspec}s for use with Jupyter frontends.")
5523 (license license:bsd-3)))
5524
5525 (define-public python2-jupyter-client
5526 (package-with-python2 python-jupyter-client))
5527
5528 (define-public python-ipykernel
5529 (package
5530 (name "python-ipykernel")
5531 (version "4.5.2")
5532 (source
5533 (origin
5534 (method url-fetch)
5535 (uri (pypi-uri "ipykernel" version))
5536 (sha256
5537 (base32 "0qllv0k6zzv1r1cj1x2ygxmlrrqhbslzj8rc6r6fg3kc1rgz4m2s"))))
5538 (build-system python-build-system)
5539 ;; The tests load a submodule of IPython. However, IPython itself depends
5540 ;; on ipykernel.
5541 (arguments `(#:tests? #f))
5542 (propagated-inputs
5543 ;; imported at runtime during connect
5544 `(("python-jupyter-client" ,python-jupyter-client)))
5545 (home-page "http://ipython.org")
5546 (synopsis "IPython Kernel for Jupyter")
5547 (description
5548 "This package provides the IPython kernel for Jupyter.")
5549 (license license:bsd-3)))
5550
5551 (define-public python2-ipykernel
5552 (package-with-python2 python-ipykernel))
5553
5554 (define-public python-testpath
5555 (package
5556 (name "python-testpath")
5557 (version "0.2")
5558 (source
5559 (origin
5560 (method url-fetch)
5561 (uri (string-append "https://github.com/jupyter/testpath/archive/"
5562 version ".tar.gz"))
5563 (file-name (string-append name "-" version ".tar.gz"))
5564 (sha256
5565 (base32
5566 "04kh3fgvmqz6cfcw79q70qwjz7ib7lxm27cc548iy2rpr33qqf55"))))
5567 (build-system python-build-system)
5568 (arguments
5569 `(#:tests? #f ; this package does not even have a setup.py
5570 #:modules ((guix build python-build-system)
5571 (guix build utils)
5572 (srfi srfi-1))
5573 #:imported-modules (,@%python-build-system-modules
5574 (srfi srfi-1))
5575 #:phases
5576 (modify-phases %standard-phases
5577 (delete 'install)
5578 (replace 'build
5579 (lambda* (#:key inputs outputs #:allow-other-keys)
5580 (let* ((version (last
5581 (string-split (assoc-ref inputs "python") #\-)))
5582 (x.y (string-join (take (string-split version #\.) 2)
5583 "."))
5584 (dir (string-append
5585 (assoc-ref outputs "out")
5586 "/lib/python" x.y "/site-packages/testpath")))
5587 (mkdir-p dir)
5588 (copy-recursively "testpath" dir))
5589 #t)))))
5590 (home-page "https://github.com/takluyver/testpath")
5591 (synopsis "Test utilities for code working with files and commands")
5592 (description
5593 "Testpath is a collection of utilities for Python code working with files
5594 and commands. It contains functions to check things on the filesystem, and
5595 tools for mocking system commands and recording calls to those.")
5596 (license license:expat)))
5597
5598 (define-public python2-testpath
5599 (package-with-python2 python-testpath))
5600
5601 (define-public python-ipython
5602 (package
5603 (name "python-ipython")
5604 (version "5.2.2")
5605 (source
5606 (origin
5607 (method url-fetch)
5608 (uri (pypi-uri "ipython" version ".tar.gz"))
5609 (sha256
5610 (base32 "1qhjwa9cyz1np7rhv3p4ip13lkgbqsad62l24xkwiq1ic2gwiqbf"))))
5611 (build-system python-build-system)
5612 (outputs '("out" "doc"))
5613 (propagated-inputs
5614 `(("python-pyzmq" ,python-pyzmq)
5615 ("python-prompt-toolkit" ,python-prompt-toolkit)
5616 ("python-terminado" ,python-terminado)
5617 ("python-matplotlib" ,python-matplotlib)
5618 ("python-numpy" ,python-numpy)
5619 ("python-numpydoc" ,python-numpydoc)
5620 ("python-jinja2" ,python-jinja2)
5621 ("python-mistune" ,python-mistune)
5622 ("python-pexpect" ,python-pexpect)
5623 ("python-pickleshare" ,python-pickleshare)
5624 ("python-simplegeneric" ,python-simplegeneric)
5625 ("python-jsonschema" ,python-jsonschema)
5626 ("python-traitlets" ,python-traitlets)
5627 ("python-ipykernel" ,python-ipykernel)
5628 ("python-nbformat" ,python-nbformat)
5629 ("python-pygments" ,python-pygments)))
5630 (inputs
5631 `(("readline" ,readline)
5632 ("which" ,which)))
5633 (native-inputs
5634 `(("graphviz" ,graphviz)
5635 ("pkg-config" ,pkg-config)
5636 ("python-requests" ,python-requests) ;; for tests
5637 ("python-testpath" ,python-testpath)
5638 ("python-nose" ,python-nose)
5639 ("python-sphinx" ,python-sphinx)
5640 ("python-shpinx-rtd-theme" ,python-sphinx-rtd-theme)
5641 ;; FIXME: It's possible that a smaller union would work just as well.
5642 ("texlive" ,(texlive-union (list texlive-fonts-amsfonts
5643 texlive-fonts-ec
5644 texlive-generic-ifxetex
5645 texlive-generic-pdftex
5646 texlive-latex-amsfonts
5647 texlive-latex-capt-of
5648 texlive-latex-cmap
5649 texlive-latex-environ
5650 texlive-latex-eqparbox
5651 texlive-latex-etoolbox
5652 texlive-latex-expdlist
5653 texlive-latex-fancyhdr
5654 texlive-latex-fancyvrb
5655 texlive-latex-fncychap
5656 texlive-latex-float
5657 texlive-latex-framed
5658 texlive-latex-geometry
5659 texlive-latex-graphics
5660 texlive-latex-hyperref
5661 texlive-latex-mdwtools
5662 texlive-latex-multirow
5663 texlive-latex-oberdiek
5664 texlive-latex-parskip
5665 texlive-latex-preview
5666 texlive-latex-tabulary
5667 texlive-latex-threeparttable
5668 texlive-latex-titlesec
5669 texlive-latex-trimspaces
5670 texlive-latex-ucs
5671 texlive-latex-upquote
5672 texlive-latex-url
5673 texlive-latex-varwidth
5674 texlive-latex-wrapfig)))
5675 ("texinfo" ,texinfo)))
5676 (arguments
5677 `(#:phases
5678 (modify-phases %standard-phases
5679 (add-after
5680 'install 'install-doc
5681 (lambda* (#:key inputs outputs #:allow-other-keys)
5682 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
5683 (doc (string-append data "/doc/" ,name "-" ,version))
5684 (html (string-append doc "/html"))
5685 (man1 (string-append data "/man/man1"))
5686 (info (string-append data "/info"))
5687 (examples (string-append doc "/examples"))
5688 (python-arg (string-append "PYTHON=" (which "python"))))
5689 (setenv "LANG" "en_US.utf8")
5690 ;; Make installed package available for running the tests
5691 (add-installed-pythonpath inputs outputs)
5692 (with-directory-excursion "docs"
5693 ;; FIXME: pdf fails to build
5694 ;;(system* "make" "pdf" "PAPER=a4")
5695 (system* "make" python-arg "html")
5696 (system* "make" python-arg "info"))
5697 (copy-recursively "docs/man" man1)
5698 (copy-recursively "examples" examples)
5699 (copy-recursively "docs/build/html" html)
5700 ;; (copy-file "docs/build/latex/ipython.pdf"
5701 ;; (string-append doc "/ipython.pdf"))
5702 (mkdir-p info)
5703 (copy-file "docs/build/texinfo/ipython.info"
5704 (string-append info "/ipython.info"))
5705 (copy-file "COPYING.rst" (string-append doc "/COPYING.rst")))))
5706 ;; Tests can only be run after the library has been installed and not
5707 ;; within the source directory.
5708 (delete 'check)
5709 (add-after
5710 'install 'check
5711 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
5712 (if tests?
5713 (with-directory-excursion "/tmp"
5714 ;; Make installed package available for running the tests
5715 (add-installed-pythonpath inputs outputs)
5716 (setenv "HOME" "/tmp/") ;; required by a test
5717 (zero? (system* (string-append (assoc-ref outputs "out")
5718 "/bin/iptest"))))
5719 #t)))
5720 (add-before
5721 'install 'fix-tests
5722 (lambda* (#:key inputs #:allow-other-keys)
5723 (substitute* "./IPython/utils/_process_posix.py"
5724 (("/usr/bin/env', 'which") (which "which")))
5725 (substitute* "./IPython/core/tests/test_inputtransformer.py"
5726 (("#!/usr/bin/env python")
5727 (string-append "#!" (which "python"))))
5728 ;; Disable 1 failing test
5729 (substitute* "./IPython/core/tests/test_magic.py"
5730 (("def test_dirops\\(\\):" all)
5731 (string-append "@dec.skipif(True)\n" all))))))))
5732 (home-page "http://ipython.org")
5733 (synopsis "IPython is a tool for interactive computing in Python")
5734 (description
5735 "IPython provides a rich architecture for interactive computing with:
5736 Powerful interactive shells, a browser-based notebook, support for interactive
5737 data visualization, embeddable interpreters and tools for parallel
5738 computing.")
5739 (license license:bsd-3)
5740 (properties `((python2-variant . ,(delay python2-ipython))))))
5741
5742 (define-public python2-ipython
5743 (let ((ipython (package-with-python2 (strip-python2-variant python-ipython))))
5744 (package
5745 (inherit ipython)
5746 ;; FIXME: add pyreadline once available.
5747 (propagated-inputs
5748 `(("python2-backports-shutil-get-terminal-size"
5749 ,python2-backports-shutil-get-terminal-size)
5750 ("python2-pathlib2" ,python2-pathlib2)
5751 ,@(package-propagated-inputs ipython)))
5752 (native-inputs
5753 `(("python2-mock" ,python2-mock)
5754 ,@(package-native-inputs ipython))))))
5755
5756 (define-public python-isodate
5757 (package
5758 (name "python-isodate")
5759 (version "0.5.4")
5760 (source
5761 (origin
5762 (method url-fetch)
5763 (uri (pypi-uri "isodate" version))
5764 (sha256
5765 (base32
5766 "0cafaiwixgpxwh9dsd28qb0dbzsj6xpxjdkyk30ns91ps10mq422"))))
5767 (build-system python-build-system)
5768 (home-page
5769 "http://cheeseshop.python.org/pypi/isodate")
5770 (synopsis
5771 "Python date parser and formatter")
5772 (description
5773 "Python-isodate is a python module for parsing and formatting
5774 ISO 8601 dates, time and duration.")
5775 (license license:bsd-3)))
5776
5777 (define-public python2-isodate
5778 (package-with-python2 python-isodate))
5779
5780 (define-public python-html5lib
5781 (package
5782 (name "python-html5lib")
5783 (version "1.0b10")
5784 (source
5785 (origin
5786 (method url-fetch)
5787 (uri (pypi-uri "html5lib" version))
5788 (sha256
5789 (base32
5790 "1yd068a5c00wd0ajq0hqimv7fd82lhrw0w3s01vbhy9bbd6xapqd"))))
5791 (build-system python-build-system)
5792 (propagated-inputs
5793 `(("python-six" ,python-six)
5794 ("python-webencodings" ,python-webencodings)))
5795 (arguments
5796 `(#:test-target "check"))
5797 (home-page
5798 "https://github.com/html5lib/html5lib-python")
5799 (synopsis
5800 "Python HTML parser based on the WHATWG HTML specifcation")
5801 (description
5802 "Html5lib is an HTML parser based on the WHATWG HTML specifcation
5803 and written in Python.")
5804 (license license:expat)))
5805
5806 (define-public python2-html5lib
5807 (package-with-python2 python-html5lib))
5808
5809 ;; Needed for python-bleach, a dependency of python-notebook
5810 (define-public python-html5lib-0.9
5811 (package
5812 (inherit python-html5lib)
5813 (version "0.999")
5814 (source
5815 (origin
5816 (method url-fetch)
5817 (uri (pypi-uri "html5lib" version))
5818 (sha256
5819 (base32
5820 "17n4zfsj6ynmbwdwviywmj8r6nzr3xvfx2zs0xhndmvm51z7z263"))))))
5821
5822 (define-public python2-html5lib-0.9
5823 (package-with-python2 python-html5lib-0.9))
5824
5825 (define-public python-webencodings
5826 (package
5827 (name "python-webencodings")
5828 (version "0.5")
5829 (source (origin
5830 (method url-fetch)
5831 (uri (pypi-uri "webencodings" version))
5832 (sha256
5833 (base32
5834 "015rw7662lkpb9aqiqah2hbizk6w531badqwjpz41rr47glmxid5"))))
5835 (build-system python-build-system)
5836 (arguments
5837 '(#:phases
5838 (modify-phases %standard-phases
5839 (replace 'check
5840 (lambda _
5841 (zero? (system* "py.test" "-v" "webencodings/tests.py")))))))
5842 (native-inputs
5843 `(("python-pytest" ,python-pytest)))
5844 (home-page "https://github.com/SimonSapin/python-webencodings")
5845 (synopsis "Character encoding aliases for legacy web content")
5846 (description
5847 "In order to be compatible with legacy web content when interpreting
5848 something like @code{Content-Type: text/html; charset=latin1}, tools need
5849 to use a particular set of aliases for encoding labels as well as some
5850 overriding rules. For example, @code{US-ASCII} and @code{iso-8859-1} on
5851 the web are actually aliases for @code{windows-1252}, and an @code{UTF-8}
5852 or @code{UTF-16} BOM takes precedence over any other encoding declaration.
5853 The WHATWG @url{https://encoding.spec.whatwg.org/,Encoding} standard
5854 defines all such details so that implementations do not have to
5855 reverse-engineer each other.
5856
5857 This module implements the Encoding standard and has encoding labels and
5858 BOM detection, but the actual implementation for encoders and decoders
5859 is Python’s.")
5860 (license license:bsd-3)))
5861
5862 (define-public python2-webencodings
5863 (package-with-python2 python-webencodings))
5864
5865 (define-public python-urwid
5866 (package
5867 (name "python-urwid")
5868 (version "1.3.1")
5869 (source
5870 (origin
5871 (method url-fetch)
5872 (uri (pypi-uri "urwid" version))
5873 (sha256
5874 (base32
5875 "18cnd1wdjcas08x5qwa5ayw6jsfcn33w4d9f7q3s29fy6qzc1kng"))))
5876 (build-system python-build-system)
5877 (arguments
5878 `(#:phases
5879 (modify-phases %standard-phases
5880 ;; Disable failing test. Bug filed upstream:
5881 ;; https://github.com/wardi/urwid/issues/164
5882 ;; TODO: check again for python-urwid > 1.3.1 or python > 3.4.3.
5883 (add-after 'unpack 'disable-failing-test
5884 (lambda _
5885 (substitute* "urwid/tests/test_event_loops.py"
5886 (("test_remove_watch_file")
5887 "disable_remove_watch_file")))))))
5888 (home-page "http://urwid.org")
5889 (synopsis "Console user interface library for Python")
5890 (description
5891 "Urwid is a curses-based UI/widget library for Python. It includes many
5892 features useful for text console applications.")
5893 (license license:lgpl2.1+)))
5894
5895 (define-public python2-urwid
5896 (let ((python2-urwid (package-with-python2 python-urwid)))
5897 (package
5898 (inherit python2-urwid)
5899 (arguments
5900 (append
5901 `(;; Explicitly using Python 2 is necessary due the argument list being
5902 ;; built from only the 'delete-test_vterm.py' phase and python-urwid's
5903 ;; package arguments, which by default assumes the use of Python 3.
5904 #:python ,python-2
5905 #:phases
5906 (modify-phases %standard-phases
5907 ;; Disable the vterm tests because of non-deterministic failures
5908 ;; with Python 2. See https://github.com/urwid/urwid/issues/230.
5909 (add-after 'unpack 'delete-test_vterm.py
5910 (delete-file "urwid/tests/test_vterm.py"))))
5911 (package-arguments python-urwid))))))
5912
5913 (define-public python-openid
5914 (package
5915 (name "python-openid")
5916 (version "3.0.10")
5917 (source
5918 (origin
5919 (method url-fetch)
5920 (uri (pypi-uri "python3-openid" version))
5921 (sha256
5922 (base32
5923 "1x3nh3fycqfn43jp5j5pb4q4y2jxp4mdka4absaa3bc0078qd758"))))
5924 (build-system python-build-system)
5925 (arguments
5926 `(#:phases
5927 (modify-phases %standard-phases
5928 (replace 'check
5929 (lambda _
5930 (zero? (system* "./admin/runtests")))))))
5931 (properties `((python2-variant . ,(delay python2-openid))))
5932 (propagated-inputs
5933 `(("python-defusedxml" ,python-defusedxml)))
5934 (native-inputs
5935 `(("python-psycopg2" ,python-psycopg2)
5936 ("python-django" ,python-django)))
5937 (home-page "https://github.com/necaris/python3-openid")
5938 (synopsis "OpenID support for servers and consumers")
5939 (description "This library provides OpenID authentication for Python, both
5940 for clients and servers.")
5941 (license license:asl2.0)))
5942
5943 (define-public python2-openid
5944 (package
5945 (name "python2-openid")
5946 (version "2.2.5")
5947 (source
5948 (origin
5949 (method url-fetch)
5950 (uri (pypi-uri "python-openid" version))
5951 (sha256
5952 (base32
5953 "1vvhxlghjan01snfdc4k7ykd80vkyjgizwgg9bncnin8rqz1ricj"))))
5954 (build-system python-build-system)
5955 (arguments
5956 ;; Python 3 support is in `python3-openid`, a separate package.
5957 `(#:python ,python-2))
5958 (home-page "https://github.com/openid/python-openid")
5959 (synopsis "OpenID support for servers and consumers")
5960 (description "This library provides OpenID authentication for Python, both
5961 for clients and servers.")
5962 (license license:asl2.0)))
5963
5964 (define-public python-urwidtrees
5965 (package
5966 (name "python-urwidtrees")
5967 (version "1.0.2")
5968 (source
5969 (origin
5970 (method url-fetch)
5971 ;; package author intends on distributing via github rather than pypi:
5972 ;; https://github.com/pazz/alot/issues/877#issuecomment-230173331
5973 (uri (string-append "https://github.com/pazz/urwidtrees/archive/"
5974 version ".tar.gz"))
5975 (file-name (string-append name "-" version ".tar.gz"))
5976 (sha256
5977 (base32
5978 "0d30lyd3s2a97rhqfax5w9ssqds2z6aydqx3c6j2c2lk3cb4ngvh"))))
5979 (build-system python-build-system)
5980 (arguments
5981 '(#:tests? #f)) ; no tests
5982 (propagated-inputs `(("python-urwid" ,python-urwid)))
5983 (home-page "https://github.com/pazz/urwidtrees")
5984 (synopsis "Tree widgets for urwid")
5985 (description "Urwidtrees is a Widget Container API for the @code{urwid}
5986 toolkit. Use it to build trees of widgets.")
5987 (license license:gpl3+)))
5988
5989 (define-public python2-urwidtrees
5990 (package-with-python2 python-urwidtrees))
5991
5992 (define-public python-dbus
5993 (package
5994 (name "python-dbus")
5995 (version "1.2.0")
5996 (source
5997 (origin
5998 (method url-fetch)
5999 (uri (string-append
6000 "https://dbus.freedesktop.org/releases/dbus-python/dbus-python-"
6001 version ".tar.gz"))
6002 (sha256
6003 (base32 "1py62qir966lvdkngg0v8k1khsqxwk5m4s8nflpk1agk5f5nqb71"))))
6004 (build-system gnu-build-system)
6005 (arguments
6006 '(#:phases
6007 (modify-phases %standard-phases
6008 (add-before
6009 'check 'pre-check
6010 (lambda _
6011 ;; XXX: For the missing '/etc/machine-id'.
6012 (substitute* "test/run-test.sh"
6013 (("DBUS_FATAL_WARNINGS=1")
6014 "DBUS_FATAL_WARNINGS=0"))
6015 #t)))))
6016 (native-inputs
6017 `(("pkg-config" ,pkg-config)))
6018 (inputs
6019 `(("python" ,python)
6020 ("dbus-glib" ,dbus-glib)))
6021 (synopsis "Python bindings for D-bus")
6022 (description "python-dbus provides bindings for libdbus, the reference
6023 implementation of D-Bus.")
6024 (home-page "http://www.freedesktop.org/wiki/Software/DBusBindings/")
6025 (license license:expat)))
6026
6027 (define-public python2-dbus
6028 (package (inherit python-dbus)
6029 (name "python2-dbus")
6030 (inputs `(("python" ,python-2)
6031 ,@(alist-delete "python"
6032 (package-inputs python-dbus)
6033 equal?)))
6034 ;; FIXME: on Python 2, the test_utf8 fails with:
6035 ;; "ValueError: unichr() arg not in range(0x10000) (narrow Python build)"
6036 (arguments `(#:tests? #f))))
6037
6038 (define-public python-apsw
6039 (package
6040 (name "python-apsw")
6041 (version "3.9.2-r1")
6042 (source
6043 (origin
6044 (method url-fetch)
6045 (uri (pypi-uri "apsw" version))
6046 (sha256
6047 (base32
6048 "0w4jb0wpx785qw42r3h4fh7gl5w2968q48i7gygybsfxck8nzffs"))))
6049 (build-system python-build-system)
6050 (inputs
6051 `(("sqlite" ,sqlite)))
6052 (arguments
6053 `(#:phases
6054 (modify-phases %standard-phases
6055 (delete 'check)
6056 (add-after 'install 'check
6057 (lambda* (#:key inputs outputs #:allow-other-keys)
6058 (add-installed-pythonpath inputs outputs)
6059 (zero? (system* "python" "setup.py" "test")))))))
6060 (home-page "https://github.com/rogerbinns/apsw/")
6061 (synopsis "Another Python SQLite Wrapper")
6062 (description "APSW is a Python wrapper for the SQLite
6063 embedded relational database engine. In contrast to other wrappers such as
6064 pysqlite it focuses on being a minimal layer over SQLite attempting just to
6065 translate the complete SQLite API into Python.")
6066 (license license:zlib)))
6067
6068 (define-public python2-apsw
6069 (package-with-python2 python-apsw))
6070
6071 (define-public python-lxml
6072 (package
6073 (name "python-lxml")
6074 (version "3.6.0")
6075 (source
6076 (origin
6077 (method url-fetch)
6078 (uri (pypi-uri "lxml" version))
6079 (sha256
6080 (base32
6081 "1pvbmiy2m7jwv493kilbghhj2pkh8wy1na3ji350vhzhlwlclx4w"))))
6082 (build-system python-build-system)
6083 (inputs
6084 `(("libxml2" ,libxml2)
6085 ("libxslt" ,libxslt)))
6086 (home-page "http://lxml.de/")
6087 (synopsis
6088 "Python XML processing library")
6089 (description
6090 "The lxml XML toolkit is a Pythonic binding for the C libraries
6091 libxml2 and libxslt.")
6092 (license license:bsd-3))) ; and a few more, see LICENSES.txt
6093
6094 (define-public python2-lxml
6095 (package-with-python2 python-lxml))
6096
6097 ;; beautifulsoup4 has a totally different namespace than 3.x,
6098 ;; and pypi seems to put it under its own name, so I guess we should too
6099 (define-public python-beautifulsoup4
6100 (package
6101 (name "python-beautifulsoup4")
6102 (version "4.5.3")
6103 (source
6104 (origin
6105 (method url-fetch)
6106 (uri (pypi-uri "beautifulsoup4" version))
6107 (sha256
6108 (base32
6109 "0glaw1vyxnbp03fni7h5496n6iib0n5iim4gax1n0ngscs9s075j"))))
6110 (build-system python-build-system)
6111 (arguments
6112 `(#:phases
6113 (modify-phases %standard-phases
6114 ;; The Python 2 source is the definitive source of beautifulsoup4. We
6115 ;; must use this conversion script when building with Python 3. The
6116 ;; conversion script also runs the tests.
6117 ;; For more information, see the file 'convert-py3k' in the source
6118 ;; distribution.
6119 (replace 'check
6120 (lambda _ (zero? (system* "./convert-py3k")))))))
6121 (home-page
6122 "http://www.crummy.com/software/BeautifulSoup/bs4/")
6123 (synopsis
6124 "Python screen-scraping library")
6125 (description
6126 "Beautiful Soup is a Python library designed for rapidly setting up
6127 screen-scraping projects. It offers Pythonic idioms for navigating,
6128 searching, and modifying a parse tree, providing a toolkit for
6129 dissecting a document and extracting what you need. It automatically
6130 converts incoming documents to Unicode and outgoing documents to UTF-8.")
6131 (license license:expat)
6132 (properties `((python2-variant . ,(delay python2-beautifulsoup4))))))
6133
6134 (define-public python2-beautifulsoup4
6135 (package
6136 (inherit (package-with-python2
6137 (strip-python2-variant python-beautifulsoup4)))
6138 (arguments `(#:python ,python-2))))
6139
6140 (define-public python-cssutils
6141 (package
6142 (name "python-cssutils")
6143 (version "1.0.1")
6144 (source
6145 (origin
6146 (method url-fetch)
6147 (uri (pypi-uri "cssutils" version))
6148 (sha256
6149 (base32
6150 "0qwha9x1wml2qmipbcz03gndnlwhzrjdvw9i09si247a90l8p8fq"))))
6151 (build-system python-build-system)
6152 (native-inputs
6153 `(("unzip" ,unzip))) ; for unpacking the source
6154 (arguments
6155 `(#:tests? #f)) ;tests require python-pbr < 1.7.0
6156 (home-page "http://cthedot.de/cssutils/")
6157 (synopsis
6158 "CSS Cascading Style Sheets library for Python")
6159 (description
6160 "Cssutils is a Python package for parsing and building CSS
6161 Cascading Style Sheets. Currently it provides a DOM only and no rendering
6162 options.")
6163 (license license:lgpl3+)))
6164
6165 (define-public python2-cssutils
6166 (package-with-python2 python-cssutils))
6167
6168 (define-public python-cssselect
6169 (package
6170 (name "python-cssselect")
6171 (version "0.9.2")
6172 (source
6173 (origin
6174 (method url-fetch)
6175 (uri (pypi-uri "cssselect" version))
6176 (sha256
6177 (base32
6178 "1xg6gbva1yswghiycmgincv6ab4bn7hpm720ndbj40h8xycmnfvi"))))
6179 (build-system python-build-system)
6180 (arguments
6181 ;; tests fail with message
6182 ;; AttributeError: 'module' object has no attribute 'tests'
6183 `(#:tests? #f))
6184 (home-page
6185 "https://pythonhosted.org/cssselect/")
6186 (synopsis
6187 "CSS3 selector parser and translator to XPath 1.0")
6188 (description
6189 "Cssselect ia a Python module that parses CSS3 Selectors and translates
6190 them to XPath 1.0 expressions. Such expressions can be used in lxml or
6191 another XPath engine to find the matching elements in an XML or HTML document.")
6192 (license license:bsd-3)))
6193
6194 (define-public python2-cssselect
6195 (package-with-python2 python-cssselect))
6196
6197 (define-public python-openid-cla
6198 (package
6199 (name "python-openid-cla")
6200 (version "1.2")
6201 (source
6202 (origin
6203 (method url-fetch)
6204 (uri (pypi-uri "python-openid-cla" version))
6205 (sha256
6206 (base32
6207 "102hy2qisvjxp5s0v9lvwqi4f2dk0dhns40vjgn008yxc7k0h3cr"))))
6208 (build-system python-build-system)
6209 (arguments '(#:tests? #f)) ; No tests.
6210 (home-page "https://github.com/puiterwijk/python-openid-cla/")
6211 (synopsis "Implementation of the OpenID CLA extension for python-openid")
6212 (description "@code{openid-cla} is an implementation of the OpenID
6213 contributor license agreement extension for python-openid.")
6214 (license license:bsd-3)))
6215
6216 (define-public python2-openid-cla
6217 (package-with-python2 python-openid-cla))
6218
6219 (define-public python-openid-teams
6220 (package
6221 (name "python-openid-teams")
6222 (version "1.1")
6223 (source
6224 (origin
6225 (method url-fetch)
6226 (uri (pypi-uri "python-openid-teams" version))
6227 (sha256
6228 (base32
6229 "05zrh78alav24rxkbqlpbad6d3x2nljk6z6j7kflxf3vdqa7w969"))))
6230 (build-system python-build-system)
6231 (arguments '(#:tests? #f)) ; No tests.
6232 (home-page "https://github.com/puiterwijk/python-openid-teams/")
6233 (synopsis "Implementation of the OpenID teams extension for python-openid")
6234 (description
6235 "@code{openid-teams} is an implementation of the OpenID
6236 teams extension for python-openid.")
6237 (license license:bsd-3)))
6238
6239 (define-public python2-openid-teams
6240 (package-with-python2 python-openid-teams))
6241
6242 (define-public python-netifaces
6243 (package
6244 (name "python-netifaces")
6245 (version "0.10.4")
6246 (source
6247 (origin
6248 (method url-fetch)
6249 (uri (string-append
6250 "https://pypi.python.org/packages/source/n/netifaces/netifaces-"
6251 version
6252 ".tar.gz"))
6253 (sha256
6254 (base32
6255 "1plw237a4zib4z8s62g0mrs8gm3kjfrp5sxh6bbk9nl3rdls2mln"))))
6256 (build-system python-build-system)
6257 (home-page
6258 "https://bitbucket.org/al45tair/netifaces")
6259 (synopsis
6260 "Python module for portable network interface information")
6261 (description
6262 "Netifaces is a Python module providing information on network
6263 interfaces in an easy and portable manner.")
6264 (license license:expat)))
6265
6266 (define-public python2-netifaces
6267 (package-with-python2 python-netifaces))
6268
6269 (define-public python-networkx
6270 (package
6271 (name "python-networkx")
6272 (version "1.11")
6273 (source
6274 (origin
6275 (method url-fetch)
6276 (uri (pypi-uri "networkx" version))
6277 (sha256
6278 (base32 "1f74s56xb4ggixiq0vxyfxsfk8p20c7a099lpcf60izv1php03hd"))))
6279 (build-system python-build-system)
6280 ;; python-decorator is needed at runtime
6281 (propagated-inputs
6282 `(("python-decorator" ,python-decorator)))
6283 (native-inputs
6284 `(("python-nose" ,python-nose)))
6285 (home-page "http://networkx.github.io/")
6286 (synopsis "Python module for creating and manipulating graphs and networks")
6287 (description
6288 "NetworkX is a Python package for the creation, manipulation, and study
6289 of the structure, dynamics, and functions of complex networks.")
6290 (license license:bsd-3)))
6291
6292 (define-public python2-networkx
6293 (package-with-python2 python-networkx))
6294
6295 (define-public snakemake
6296 (package
6297 (name "snakemake")
6298 (version "3.13.3")
6299 (source
6300 (origin
6301 (method url-fetch)
6302 (uri (pypi-uri "snakemake" version))
6303 (sha256
6304 (base32 "1nixb944r4hlskwkzc4wjs34b40xpxpw9gmhhm5p09gvmm22ap5d"))))
6305 (build-system python-build-system)
6306 (arguments
6307 ;; TODO: Package missing test dependencies.
6308 '(#:tests? #f
6309 #:phases
6310 (modify-phases %standard-phases
6311 ;; For cluster execution Snakemake will call Python. Since there is
6312 ;; no suitable PYTHONPATH set, cluster execution will fail. We fix
6313 ;; this by calling the snakemake wrapper instead.
6314 (add-after 'unpack 'call-wrapper-not-wrapped-snakemake
6315 (lambda* (#:key outputs #:allow-other-keys)
6316 (substitute* "snakemake/executors.py"
6317 (("\\{sys.executable\\} -m snakemake")
6318 (string-append (assoc-ref outputs "out")
6319 "/bin/snakemake")))
6320 #t)))))
6321 (propagated-inputs
6322 `(("python-wrapt" ,python-wrapt)
6323 ("python-requests" ,python-requests)))
6324 (home-page "https://bitbucket.org/snakemake/snakemake/wiki/Home")
6325 (synopsis "Python-based execution environment for make-like workflows")
6326 (description
6327 "Snakemake aims to reduce the complexity of creating workflows by
6328 providing a clean and modern domain specific specification language (DSL) in
6329 Python style, together with a fast and comfortable execution environment.")
6330 (license license:expat)))
6331
6332 (define-public python-seaborn
6333 (package
6334 (name "python-seaborn")
6335 (version "0.7.1")
6336 (source
6337 (origin
6338 (method url-fetch)
6339 (uri (pypi-uri "seaborn" version))
6340 (sha256
6341 (base32 "0pawrqc3mxpwd5g9pvi9gba02637bh5c8ldpp8izfwpfn52469zs"))))
6342 (build-system python-build-system)
6343 (arguments
6344 '(#:tests? #f)) ; Tests requires a running X11 server.
6345 (propagated-inputs
6346 `(("python-pandas" ,python-pandas)
6347 ("python-matplotlib" ,python-matplotlib)
6348 ("python-scipy" ,python-scipy)))
6349 (home-page "http://stanford.edu/~mwaskom/software/seaborn/")
6350 (synopsis "Statistical data visualization")
6351 (description
6352 "Seaborn is a library for making attractive and informative statistical
6353 graphics in Python. It is built on top of matplotlib and tightly integrated
6354 with the PyData stack, including support for numpy and pandas data structures
6355 and statistical routines from scipy and statsmodels.")
6356 (license license:bsd-3)
6357 (properties `((python2-variant . ,(delay python2-seaborn))))))
6358
6359 (define-public python2-seaborn
6360 (let ((base (package-with-python2 (strip-python2-variant python-seaborn))))
6361 (package
6362 (inherit base)
6363 (propagated-inputs `(("python2-pytz" ,python2-pytz)
6364 ,@(package-propagated-inputs base))))))
6365
6366 (define-public python-mpmath
6367 (package
6368 (name "python-mpmath")
6369 (version "0.19")
6370 (source (origin
6371 (method url-fetch)
6372 (uri (string-append "http://mpmath.org/files/mpmath-"
6373 version ".tar.gz"))
6374 (sha256
6375 (base32
6376 "08ijsr4ifrqv3cjc26mkw0dbvyygsa99in376hr4b96ddm1gdpb8"))))
6377 (build-system python-build-system)
6378 (arguments
6379 '(#:phases
6380 (modify-phases %standard-phases
6381 (replace 'check
6382 (lambda _
6383 (zero?
6384 (system* "python" "mpmath/tests/runtests.py" "-local")))))))
6385 (home-page "http://mpmath.org")
6386 (synopsis "Arbitrary-precision floating-point arithmetic in python")
6387 (description
6388 "@code{mpmath} can be used as an arbitrary-precision substitute for
6389 Python's float/complex types and math/cmath modules, but also does much
6390 more advanced mathematics.")
6391 (license license:bsd-3)))
6392
6393 (define-public python2-mpmath
6394 (package-with-python2 python-mpmath))
6395
6396 (define-public python-sympy
6397 (package
6398 (name "python-sympy")
6399 (version "1.0")
6400 (source
6401 (origin
6402 (method url-fetch)
6403 (uri (string-append
6404 "https://github.com/sympy/sympy/releases/download/sympy-"
6405 version "/sympy-" version ".tar.gz"))
6406 (sha256
6407 (base32 "1bpzjwr9hrr7w88v4vgnj9lr6vxcldc94si13n8xpr1rv08d5b1y"))))
6408 (build-system python-build-system)
6409 (propagated-inputs
6410 `(("python-mpmath" ,python-mpmath)))
6411 (home-page "http://www.sympy.org/")
6412 (synopsis "Python library for symbolic mathematics")
6413 (description
6414 "SymPy is a Python library for symbolic mathematics. It aims to become a
6415 full-featured computer algebra system (CAS) while keeping the code as simple
6416 as possible in order to be comprehensible and easily extensible.")
6417 (license license:bsd-3)))
6418
6419 (define-public python2-sympy
6420 (package-with-python2 python-sympy))
6421
6422 (define-public python-q
6423 (package
6424 (name "python-q")
6425 (version "2.6")
6426 (source
6427 (origin
6428 (method url-fetch)
6429 (uri (pypi-uri "q" version))
6430 (sha256
6431 (base32
6432 "1mgfazh8fkizh6walra2zv885f3lcgr3nb02v1frfm4p8ddcy3yy"))))
6433 (build-system python-build-system)
6434 (home-page "https://github.com/zestyping/q")
6435 (synopsis "Quick-and-dirty debugging output for tired programmers")
6436 (description
6437 "q is a Python module for \"print\" style of debugging Python code. It
6438 provides convenient short API for print out of values, tracebacks, and
6439 falling into the Python interpreter.")
6440 (license license:asl2.0)))
6441
6442 (define-public python2-q
6443 (package-with-python2 python-q))
6444
6445 (define-public python-testlib
6446 (package
6447 (name "python-testlib")
6448 (version "0.6.5")
6449 (source
6450 (origin
6451 (method url-fetch)
6452 (uri (string-append
6453 "https://pypi.python.org/packages/source/t/testlib/testlib-"
6454 version ".zip"))
6455 (sha256
6456 (base32 "1mz26cxn4x8bbgv0rn0mvj2z05y31rkc8009nvdlb3lam5b4mj3y"))))
6457 (build-system python-build-system)
6458 (native-inputs
6459 `(("unzip" ,unzip))) ; for unpacking the source
6460 (synopsis "Python micro test suite harness")
6461 (description "A micro unittest suite harness for Python.")
6462 (home-page "https://github.com/trentm/testlib")
6463 (license license:expat)))
6464
6465 (define-public python2-testlib
6466 (package-with-python2 python-testlib))
6467
6468 (define-public python2-xlib
6469 (package
6470 (name "python2-xlib")
6471 (version "0.14")
6472 (source (origin
6473 (method url-fetch)
6474 (uri (string-append "mirror://sourceforge/python-xlib/python-xlib"
6475 "/" version "/"
6476 "python-xlib-" version ".tar.gz"))
6477 (sha256
6478 (base32
6479 "1sv0447j0rx8cgs3jhjl695p5pv13ihglcjlrrz1kq05lsvb0wa7"))))
6480 (build-system python-build-system)
6481 (arguments
6482 `(#:python ,python-2 ;Python 2 only
6483 #:tests? #f)) ;no tests
6484 (home-page "http://python-xlib.sourceforge.net/")
6485 (synopsis "Python X11 client library")
6486 (description
6487 "The Python X Library is intended to be a fully functional X client
6488 library for Python programs. It is useful to implement low-level X clients.
6489 It is written entirely in Python.")
6490 (license license:gpl2+)))
6491
6492 (define-public python-singledispatch
6493 (package
6494 (name "python-singledispatch")
6495 (version "3.4.0.3")
6496 (source
6497 (origin
6498 (method url-fetch)
6499 (uri (pypi-uri "singledispatch" version))
6500 (sha256
6501 (base32
6502 "171b7ip0hsq5qm83np40h3phlr36ym18w0lay0a8v08kvy3sy1jv"))))
6503 (build-system python-build-system)
6504 (native-inputs
6505 `(("python-six" ,python-six))) ; required for conversion, not at run-time
6506 (home-page
6507 "http://docs.python.org/3/library/functools.html#functools.singledispatch")
6508 (synopsis "Backport of singledispatch feature from Python 3.4")
6509 (description
6510 "This library brings functools.singledispatch from Python 3.4 to Python
6511 2.6-3.3.")
6512 (license license:expat)))
6513
6514 (define-public python2-singledispatch
6515 (package-with-python2 python-singledispatch))
6516
6517 (define-public python-tornado
6518 (package
6519 (name "python-tornado")
6520 (version "4.5.1")
6521 (source
6522 (origin
6523 (method url-fetch)
6524 (uri (pypi-uri "tornado" version))
6525 (sha256
6526 (base32 "1zbkgcdfq81k298awrm8p0xwbwwn2p3nbizdglzfbkskhai082fv"))))
6527 (build-system python-build-system)
6528 (arguments
6529 '(;; FIXME: Two tests error out with:
6530 ;; AssertionError: b'Error in atexit._run_exitfuncs:\nFileNotF[44 chars]ry\n' != b''
6531 ;; #:phases
6532 ;; (modify-phases %standard-phases
6533 ;; (replace 'check
6534 ;; (lambda _
6535 ;; ;; 'setup.py test' hits an AssertionError on BSD-specific
6536 ;; ;; "tornado/platform/kqueue.py". This is the supported method:
6537 ;; (zero? (system* "python" "-m" "tornado.test")))))
6538 #:tests? #f))
6539 (native-inputs
6540 `(("python-certifi" ,python-certifi)))
6541 (propagated-inputs
6542 `(("python-backports-abc" ,python-backports-abc)))
6543 (home-page "http://www.tornadoweb.org/")
6544 (synopsis "Python web framework and asynchronous networking library")
6545 (description
6546 "Tornado is a Python web framework and asynchronous networking library,
6547 originally developed at FriendFeed. By using non-blocking network I/O,
6548 Tornado can scale to tens of thousands of open connections, making it ideal
6549 for long polling, WebSockets, and other applications that require a long-lived
6550 connection to each user.")
6551 (license license:asl2.0)
6552 (properties `((python2-variant . ,(delay python2-tornado))))))
6553
6554 (define-public python2-tornado
6555 (let ((tornado (package-with-python2 (strip-python2-variant python-tornado))))
6556 (package (inherit tornado)
6557 (propagated-inputs
6558 `(("python2-backport-ssl-match-hostname"
6559 ,python2-backport-ssl-match-hostname)
6560 ("python2-singledispatch" ,python2-singledispatch)
6561 ,@(package-propagated-inputs tornado))))))
6562
6563 (define-public python-tornado-http-auth
6564 (package
6565 (name "python-tornado-http-auth")
6566 (version "1.1.0")
6567 (source
6568 (origin
6569 (method url-fetch)
6570 (uri (pypi-uri "tornado-http-auth" version))
6571 (sha256
6572 (base32
6573 "0znrgqd7k2s4ia474xizi6h3061zj4sn5n6cq76bkwl3wwshifn5"))))
6574 (build-system python-build-system)
6575 (propagated-inputs
6576 `(("python-tornado" ,python-tornado)))
6577 (home-page
6578 "https://github.com/gvalkov/tornado-http-auth")
6579 (synopsis
6580 "Digest and basic authentication module for Tornado")
6581 (description
6582 "Provides support for adding authentication to services using the Tornado
6583 web framework, either via the basic or digest authentication schemes.")
6584 (license license:asl2.0)))
6585
6586 ;; the python- version can be removed with python-3.5
6587 (define-public python-backports-abc
6588 (package
6589 (name "python-backports-abc")
6590 (version "0.5")
6591 (source
6592 (origin
6593 (method url-fetch)
6594 (uri (pypi-uri "backports_abc" version))
6595 (sha256
6596 (base32
6597 "1pkv8d1zxj5f9i227dxbjczncbv7ks7ywnjwyxfjagm02i2yafq3"))))
6598 (build-system python-build-system)
6599 (home-page "https://github.com/cython/backports_abc")
6600 (synopsis "Backport of additions to the 'collections.abc' module")
6601 (description
6602 "Python-backports-abc provides a backport of additions to the
6603 'collections.abc' module in Python-3.5.")
6604 (license license:psfl)))
6605
6606 (define-public python2-backports-abc
6607 (package-with-python2 python-backports-abc))
6608
6609 (define-public python-backports-csv
6610 (package
6611 (name "python-backports-csv")
6612 (version "1.0.5")
6613 (source
6614 (origin
6615 (method url-fetch)
6616 (uri (pypi-uri "backports.csv" version))
6617 (sha256
6618 (base32
6619 "1imzbrradkfn8s2m1qcimyn74dn1mz2p3j381jljn166rf2i6hlc"))))
6620 (build-system python-build-system)
6621 (home-page "https://github.com/ryanhiebert/backports.csv")
6622 (synopsis "Backport of Python 3's csv module for Python 2")
6623 (description
6624 "Provides a backport of Python 3's @code{csv} module for parsing
6625 comma separated values. The API of the @code{csv} module in Python 2
6626 is drastically different from the @code{csv} module in Python 3.
6627 This is due, for the most part, to the difference between str in
6628 Python 2 and Python 3.")
6629 (license license:psfl)))
6630
6631 (define-public python2-backports-csv
6632 (package-with-python2 python-backports-csv))
6633
6634 (define-public python2-backports-shutil-get-terminal-size
6635 (package
6636 (name "python2-backports-shutil-get-terminal-size")
6637 (version "1.0.0")
6638 (source
6639 (origin
6640 (method url-fetch)
6641 (uri (pypi-uri "backports.shutil_get_terminal_size" version))
6642 (sha256
6643 (base32
6644 "107cmn7g3jnbkp826zlj8rrj19fam301qvaqf0f3905f5217lgki"))))
6645 (build-system python-build-system)
6646 (arguments
6647 `(#:python ,python-2
6648 #:phases
6649 (modify-phases %standard-phases
6650 (replace 'check
6651 (lambda _
6652 (zero? (system* "py.test" "-v")))))))
6653 (native-inputs
6654 `(("python2-pytest" ,python2-pytest)))
6655 (home-page "https://github.com/chrippa/backports.shutil_get_terminal_size")
6656 (synopsis "Backport of Python 3.3's @code{shutil.get_terminal_size}")
6657 (description
6658 "This package provides a backport of the @code{get_terminal_size
6659 function} from Python 3.3's @code{shutil}.
6660 Unlike the original version it is written in pure Python rather than C,
6661 so it might be a tiny bit slower.")
6662 (license license:expat)))
6663
6664 (define-public python-waf
6665 (package
6666 (name "python-waf")
6667 (version "1.9.8")
6668 (source (origin
6669 (method url-fetch)
6670 (uri (string-append "https://waf.io/"
6671 "waf-" version ".tar.bz2"))
6672 (sha256
6673 (base32
6674 "0wl4cnmp06lfxqjxaan58bqxn27smhydz0sg5prrfbl3bsw4gv6q"))))
6675 (build-system python-build-system)
6676 (arguments
6677 '(#:phases
6678 (modify-phases %standard-phases
6679 (replace 'build
6680 (lambda _
6681 (zero? (system* "python" "waf-light" "configure" "build"))))
6682 (replace 'check
6683 (lambda _
6684 (zero? (system* "python" "waf" "--version"))))
6685 (replace 'install
6686 (lambda _
6687 (copy-file "waf" %output))))))
6688 (home-page "https://waf.io/")
6689 (synopsis "Python-based build system")
6690 (description
6691 "Waf is a Python-based framework for configuring, compiling and installing
6692 applications.")
6693 (license license:bsd-3)))
6694
6695 (define-public python2-waf
6696 (package-with-python2 python-waf))
6697
6698 (define-public python-pyzmq
6699 (package
6700 (name "python-pyzmq")
6701 (version "15.1.0")
6702 (source
6703 (origin
6704 (method url-fetch)
6705 (uri (pypi-uri "pyzmq" version))
6706 (sha256
6707 (base32 "13fhwnlvsvxv72kfhqbpn6qi7msh8mc8377mpabv32skk2cjfnxx"))))
6708 (build-system python-build-system)
6709 (arguments
6710 `(#:configure-flags
6711 (list (string-append "--zmq=" (assoc-ref %build-inputs "zeromq")))
6712 ;; FIXME: You must build pyzmq with 'python setup.py build_ext
6713 ;; --inplace' for 'python setup.py test' to work.
6714 #:tests? #f))
6715 (inputs
6716 `(("zeromq" ,zeromq)))
6717 (native-inputs
6718 `(("pkg-config" ,pkg-config)
6719 ("python-nose" ,python-nose)))
6720 (home-page "https://github.com/zeromq/pyzmq")
6721 (synopsis "Python bindings for 0MQ")
6722 (description
6723 "PyZMQ is the official Python binding for the ZeroMQ messaging library.")
6724 (license license:bsd-4)))
6725
6726 (define-public python2-pyzmq
6727 (package-with-python2 python-pyzmq))
6728
6729 (define-public python-pep8
6730 (package
6731 (name "python-pep8")
6732 (version "1.7.0")
6733 (source
6734 (origin
6735 (method url-fetch)
6736 (uri (pypi-uri "pep8" version))
6737 (sha256
6738 (base32
6739 "002rkl4lsn6x2mxmf8ar00l0m8i3mzrc6pnzz77blyksmpsxa4x1"))))
6740 (build-system python-build-system)
6741 (home-page "http://pep8.readthedocs.org/")
6742 (synopsis "Python style guide checker")
6743 (description
6744 "This tools checks Python code against some of the style conventions in
6745 PEP 8.")
6746 (license license:expat)))
6747
6748 (define-public python2-pep8
6749 (package-with-python2 python-pep8))
6750
6751 (define-public python-pyflakes
6752 (package
6753 (name "python-pyflakes")
6754 (version "1.0.0")
6755 (source
6756 (origin
6757 (method url-fetch)
6758 (uri (pypi-uri "pyflakes" version))
6759 (sha256
6760 (base32
6761 "0qs2sgqszq7wcplis8509wk2ygqcrwzbs1ghfj3svvivq2j377pk"))))
6762 (build-system python-build-system)
6763 (home-page
6764 "https://github.com/pyflakes/pyflakes")
6765 (synopsis "Passive checker of Python programs")
6766 (description
6767 "Pyflakes statically checks Python source code for common errors.")
6768 (license license:expat)))
6769
6770 (define-public python2-pyflakes
6771 (package-with-python2 python-pyflakes))
6772
6773 (define-public python-mccabe
6774 (package
6775 (name "python-mccabe")
6776 (version "0.4.0")
6777 (source
6778 (origin
6779 (method url-fetch)
6780 (uri (pypi-uri "mccabe" version))
6781 (sha256
6782 (base32
6783 "0yr08a36h8lqlif10l4xcikbbig7q8f41gqywir7rrvnv3mi4aws"))))
6784 (build-system python-build-system)
6785 (native-inputs
6786 `(("python-pytest" ,python-pytest)
6787 ("python-pytest-runner" ,python-pytest-runner)))
6788 (home-page "https://github.com/flintwork/mccabe")
6789 (synopsis "McCabe checker, plugin for flake8")
6790 (description
6791 "This package provides a Flake8 plug-in to compute the McCabe cyclomatic
6792 complexity of Python source code.")
6793 (license license:expat)))
6794
6795 (define-public python2-mccabe
6796 (package-with-python2 python-mccabe))
6797
6798 (define-public python-mccabe-0.2.1
6799 (package (inherit python-mccabe)
6800 (version "0.2.1")
6801 (source
6802 (origin
6803 (method url-fetch)
6804 (uri (pypi-uri "mccabe" version))
6805 (sha256
6806 (base32
6807 "0fi4a81kr5bcv5p4xgibqr595hyj5dafkqgsmfk96mfy8w71fajs"))))))
6808
6809 (define-public python2-mccabe-0.2.1
6810 (package-with-python2 python-mccabe-0.2.1))
6811
6812 ;; Flake8 2.4.1 requires an older version of pep8.
6813 ;; This should be removed ASAP.
6814 (define-public python-pep8-1.5.7
6815 (package (inherit python-pep8)
6816 (version "1.5.7")
6817 (source
6818 (origin
6819 (method url-fetch)
6820 (uri (string-append
6821 "https://pypi.python.org/packages/source/p/pep8/pep8-"
6822 version
6823 ".tar.gz"))
6824 (sha256
6825 (base32
6826 "12b9bbdbwnspxgak14xg58c130x2n0blxzlms5jn2dszn8qj3d0m"))))
6827 (arguments
6828 ;; XXX Tests not compatible with Python 3.5.
6829 '(#:tests? #f))))
6830
6831 (define-public python2-pep8-1.5.7
6832 (package-with-python2 python-pep8-1.5.7))
6833
6834 ;; Flake8 2.4.1 requires an older version of pyflakes.
6835 ;; This should be removed ASAP.
6836 (define-public python-pyflakes-0.8.1
6837 (package (inherit python-pyflakes)
6838 (version "0.8.1")
6839 (source
6840 (origin
6841 (method url-fetch)
6842 (uri (string-append
6843 "https://pypi.python.org/packages/source/p/pyflakes/pyflakes-"
6844 version
6845 ".tar.gz"))
6846 (sha256
6847 (base32
6848 "0sbpq6pqm1i9wqi41mlfrsc5rk92jv4mskvlyxmnhlbdnc80ma1z"))))
6849 (arguments
6850 ;; XXX Tests not compatible with Python 3.5.
6851 '(#:tests? #f))))
6852
6853 (define-public python2-pyflakes-0.8.1
6854 (package-with-python2 python-pyflakes-0.8.1))
6855
6856 (define-public python-flake8
6857 (package
6858 (name "python-flake8")
6859 (version "2.5.4")
6860 (source
6861 (origin
6862 (method url-fetch)
6863 (uri (pypi-uri "flake8" version))
6864 (sha256
6865 (base32
6866 "0bs9cz4fr99r2rwig1b8jwaadl1nan7kgpdzqwj0bwbckwbmh7nc"))
6867 (modules '((guix build utils)))
6868 (snippet
6869 '(begin
6870 ;; Remove pre-compiled .pyc files from source.
6871 (for-each delete-file-recursively
6872 (find-files "." "__pycache__" #:directories? #t))
6873 (for-each delete-file (find-files "." "\\.pyc$"))
6874 #t))))
6875 (build-system python-build-system)
6876 (propagated-inputs
6877 `(("python-pep8" ,python-pep8)
6878 ("python-pyflakes" ,python-pyflakes)
6879 ("python-mccabe" ,python-mccabe)))
6880 (native-inputs
6881 `(("python-mock" ,python-mock) ; TODO: only required for < 3.3
6882 ("python-nose" ,python-nose)))
6883 (home-page "https://gitlab.com/pycqa/flake8")
6884 (synopsis
6885 "The modular source code checker: pep8, pyflakes and co")
6886 (description
6887 "Flake8 is a wrapper around PyFlakes, pep8 and python-mccabe.")
6888 (license license:expat)))
6889
6890 (define-public python2-flake8
6891 (package-with-python2 python-flake8))
6892
6893 (define-public python-flake8-polyfill
6894 (package
6895 (name "python-flake8-polyfill")
6896 (version "1.0.1")
6897 (source
6898 (origin
6899 (method url-fetch)
6900 (uri (pypi-uri "flake8-polyfill" version))
6901 (sha256
6902 (base32
6903 "02gn2wxvh9vnf7m7dld7ca4l60mg5c370hv3swwppkngwaqmcw67"))))
6904 (build-system python-build-system)
6905 (arguments
6906 '(#:phases
6907 (modify-phases %standard-phases
6908 (replace 'check
6909 (lambda _
6910 (setenv "PYTHONPATH"
6911 (string-append (getcwd) "/build/lib:"
6912 (getenv "PYTHONPATH")))
6913 (zero? (system* "py.test" "-v")))))))
6914 (native-inputs
6915 `(("python-flake8" ,python-flake8)
6916 ("python-mock" ,python-mock)
6917 ("python-pycodestyle" ,python-pycodestyle)
6918 ("python-pytest" ,python-pytest)))
6919 (home-page "https://gitlab.com/pycqa/flake8-polyfill")
6920 (synopsis "Polyfill package for Flake8 plugins")
6921 (description
6922 "This package that provides some compatibility helpers for Flake8
6923 plugins that intend to support Flake8 2.x and 3.x simultaneously.")
6924 (license license:expat)))
6925
6926 (define-public python2-flake8-polyfill
6927 (package-with-python2 python-flake8-polyfill))
6928
6929 (define-public python-mistune
6930 (package
6931 (name "python-mistune")
6932 (version "0.7.3")
6933 (source
6934 (origin
6935 (method url-fetch)
6936 (uri (pypi-uri "mistune" version))
6937 (sha256
6938 (base32
6939 "04xpk1zvslhq3xpnf01g3ag0dy9wfv4z28p093r8k49vvxlyil11"))))
6940 (build-system python-build-system)
6941 (native-inputs
6942 `(("python-nose" ,python-nose)
6943 ("python-cython" ,python-cython)))
6944 (home-page "https://github.com/lepture/mistune")
6945 (synopsis "Markdown parser in pure Python")
6946 (description "This package provides a fast markdown parser in pure
6947 Python.")
6948 (license license:bsd-3)))
6949
6950 (define-public python2-mistune
6951 (package-with-python2 python-mistune))
6952
6953 (define-public python-markdown
6954 (package
6955 (name "python-markdown")
6956 (version "2.6.8")
6957 (source
6958 (origin
6959 (method url-fetch)
6960 (uri (pypi-uri "Markdown" version))
6961 (sha256
6962 (base32
6963 "0cqfhr1km2s5d8jm6hbwgkrrj9hvkjf2gab3s2axlrw1clgaij0a"))))
6964 (build-system python-build-system)
6965 (arguments
6966 `(#:phases
6967 (modify-phases %standard-phases
6968 (replace 'check
6969 (lambda _
6970 (zero? (system* "python" "run-tests.py")))))))
6971 (native-inputs
6972 `(("python-nose" ,python-nose)
6973 ("python-pyyaml" ,python-pyyaml)))
6974 (home-page "https://pythonhosted.org/Markdown/")
6975 (synopsis "Python implementation of Markdown")
6976 (description
6977 "This package provides a Python implementation of John Gruber's
6978 Markdown. The library features international input, various Markdown
6979 extensions, and several HTML output formats. A command line wrapper
6980 markdown_py is also provided to convert Markdown files to HTML.")
6981 (license license:bsd-3)))
6982
6983 (define-public python2-markdown
6984 (package-with-python2 python-markdown))
6985
6986 (define-public python-ptyprocess
6987 (package
6988 (name "python-ptyprocess")
6989 (version "0.5.1")
6990 (source
6991 (origin
6992 (method url-fetch)
6993 (uri (string-append
6994 "https://pypi.python.org/packages/source/p/ptyprocess/ptyprocess-"
6995 version ".tar.gz"))
6996 (sha256
6997 (base32
6998 "19l1xrjn4l9gjz01s3vg92gn2dd9d8mw1v86ppkzlnr9m5iwwc05"))))
6999 (build-system python-build-system)
7000 (native-inputs
7001 `(("python-nose" ,python-nose)))
7002 (arguments
7003 `(#:phases
7004 (modify-phases %standard-phases
7005 (replace 'check
7006 (lambda _
7007 (zero? (system* "nosetests")))))))
7008 (home-page "https://github.com/pexpect/ptyprocess")
7009 (synopsis "Run a subprocess in a pseudo terminal")
7010 (description
7011 "This package provides a Python library used to launch a subprocess in a
7012 pseudo terminal (pty), and interact with both the process and its pty.")
7013 (license license:isc)))
7014
7015 (define-public python2-ptyprocess
7016 (package-with-python2 python-ptyprocess))
7017
7018 (define-public python-cram
7019 (package
7020 (name "python-cram")
7021 (version "0.7")
7022 (home-page "https://bitheap.org/cram/")
7023 (source (origin
7024 (method url-fetch)
7025 (uri (list (string-append home-page "cram-"
7026 version ".tar.gz")
7027 (pypi-uri "cram" version)))
7028 (sha256
7029 (base32
7030 "0bvz6fwdi55rkrz3f50zsy35gvvwhlppki2yml5bj5ffy9d499vx"))))
7031 (arguments
7032 '(#:phases
7033 (modify-phases %standard-phases
7034 (add-after 'unpack 'patch-source
7035 (lambda _
7036 (substitute* (find-files "cram" ".*\\.py$")
7037 ;; Replace default shell path.
7038 (("/bin/sh") (which "sh")))
7039 (substitute* (find-files "tests" ".*\\.t$")
7040 (("md5") "md5sum")
7041 (("/bin/bash") (which "bash"))
7042 (("/bin/sh") (which "sh")))
7043 (substitute* "cram/_test.py"
7044 ;; This hack works around a bug triggered by substituting
7045 ;; the /bin/sh paths. "tests/usage.t" compares the output of
7046 ;; "cram -h", which breaks the output at 80 characters. This
7047 ;; causes the line showing the default shell to break into two
7048 ;; lines, but the test expects a single line...
7049 (("env\\['COLUMNS'\\] = '80'")
7050 "env['COLUMNS'] = '160'"))
7051 #t))
7052 (delete 'check)
7053 (add-after 'install 'check
7054 ;; The test phase uses the built library and executable.
7055 ;; It's easier to run it after install since the build
7056 ;; directory contains version-specific PATH.
7057 (lambda* (#:key inputs outputs #:allow-other-keys)
7058 (add-installed-pythonpath inputs outputs)
7059 (setenv "PATH" (string-append (getenv "PATH") ":"
7060 (assoc-ref outputs "out") "/bin"))
7061 (zero? (system* "make" "test")))))))
7062 (build-system python-build-system)
7063 (native-inputs
7064 `(("python-coverage" ,python-coverage)
7065 ("which" ,which)))
7066 (synopsis "Simple testing framework for command line applications")
7067 (description
7068 "Cram is a functional testing framework for command line applications.
7069 Cram tests look like snippets of interactive shell sessions. Cram runs each
7070 command and compares the command output in the test with the command’s actual
7071 output.")
7072 (license license:gpl2+)))
7073
7074 (define-public python2-cram
7075 (package-with-python2 python-cram))
7076
7077 (define-public python-terminado
7078 (package
7079 (name "python-terminado")
7080 (version "0.6")
7081 (source
7082 (origin
7083 (method url-fetch)
7084 (uri (pypi-uri "terminado" version))
7085 (sha256
7086 (base32
7087 "09h1kwi86g5mrk14s4pgbhshd602zry29lnpxamcqz864kva22rc"))))
7088 (build-system python-build-system)
7089 (propagated-inputs
7090 `(("python-tornado" ,python-tornado)
7091 ("python-ptyprocess" ,python-ptyprocess)))
7092 (native-inputs
7093 `(("python-nose" ,python-nose)))
7094 (arguments
7095 `(#:phases
7096 (modify-phases %standard-phases
7097 (replace 'check
7098 (lambda _
7099 (zero? (system* "nosetests")))))))
7100 (home-page "https://github.com/takluyver/terminado")
7101 (synopsis "Terminals served to term.js using Tornado websockets")
7102 (description "This package provides a Tornado websocket backend for the
7103 term.js Javascript terminal emulator library.")
7104 (license license:bsd-2)
7105 (properties `((python2-variant . ,(delay python2-terminado))))))
7106
7107 (define-public python2-terminado
7108 (let ((terminado (package-with-python2 (strip-python2-variant python-terminado))))
7109 (package (inherit terminado)
7110 (propagated-inputs
7111 `(("python2-backport-ssl-match-hostname"
7112 ,python2-backport-ssl-match-hostname)
7113 ,@(package-propagated-inputs terminado))))))
7114
7115 (define-public python-straight-plugin
7116 (package
7117 (name "python-straight-plugin")
7118 (version "1.4.1")
7119 (source
7120 (origin
7121 (method url-fetch)
7122 (uri (pypi-uri "straight.plugin" version))
7123 (sha256
7124 (base32
7125 "069pjll4383p4kkgvcc40hgyvf79j2wdbpgwz77yigzxksh1gj62"))))
7126 (build-system python-build-system)
7127 (home-page "https://github.com/ironfroggy/straight.plugin")
7128 (synopsis "Simple namespaced plugin facility")
7129 (description "Straight Plugin provides a type of plugin you can create from
7130 almost any existing Python modules, and an easy way for outside developers to
7131 add functionality and customization to your projects with their own plugins.")
7132 (license license:expat)))
7133
7134 (define-public python2-straight-plugin
7135 (package-with-python2 python-straight-plugin))
7136
7137 (define-public python-fonttools
7138 (package
7139 (name "python-fonttools")
7140 (version "2.5")
7141 (source (origin
7142 (method url-fetch)
7143 (uri (string-append
7144 "https://pypi.python.org/packages/source/F/FontTools/"
7145 "fonttools-" version ".tar.gz"))
7146 (sha256
7147 (base32
7148 "08ay3x4ijarwhl60gqx2i9jzq6pxs20p4snc2d1q5jagh4rn39lb"))))
7149 (build-system python-build-system)
7150 (arguments
7151 '(#:test-target "check"
7152 #:phases
7153 (modify-phases %standard-phases
7154 (add-after 'unpack 'patch-setuppy
7155 ;; Remove the undocumented "extra_path" argument, which adds an
7156 ;; intervening directories between site-packages and the package
7157 ;; directory.
7158 (lambda _
7159 (substitute* "setup.py"
7160 (("^[ \t]*extra_path *= *'FontTools',") ""))
7161 #t)))))
7162 (home-page "https://github.com/behdad/fonttools")
7163 (synopsis "Tools to manipulate font files")
7164 (description
7165 "FontTools/TTX is a library to manipulate font files from Python. It
7166 supports reading and writing of TrueType/OpenType fonts, reading and writing
7167 of AFM files, reading (and partially writing) of PS Type 1 fonts. The package
7168 also contains a tool called “TTX” which converts TrueType/OpenType fonts to and
7169 from an XML-based format.")
7170 (license (license:non-copyleft
7171 "file://LICENSE.txt"
7172 "See LICENSE.txt in the distribution."))))
7173
7174 (define-public python2-fonttools
7175 (package-with-python2 python-fonttools))
7176
7177 (define-public python-ly
7178 (package
7179 (name "python-ly")
7180 (version "0.9.4")
7181 (source
7182 (origin
7183 (method url-fetch)
7184 (uri (string-append "https://pypi.python.org/packages/57/4f/"
7185 "889579244947368f28eda66b782331b1e75f83fd72e63f9ece93cd7a18f9"
7186 "/python-ly-" version ".tar.gz"))
7187 (sha256
7188 (base32
7189 "0g6n288l83sfwavxh1aryi0aqvsr3sp7v6f903mckwqa4scpky62"))))
7190 (build-system python-build-system)
7191 (arguments
7192 ;; FIXME: Some tests need network access.
7193 '(#:tests? #f))
7194 (synopsis "Tool and library for manipulating LilyPond files")
7195 (description "This package provides a Python library to parse, manipulate
7196 or create documents in LilyPond format. A command line program ly is also
7197 provided that can be used to do various manipulations with LilyPond files.")
7198 (home-page "https://pypi.python.org/pypi/python-ly")
7199 (license license:gpl2+)))
7200
7201 (define-public python-appdirs
7202 (package
7203 (name "python-appdirs")
7204 (version "1.4.3")
7205 (source
7206 (origin
7207 (method url-fetch)
7208 (uri (pypi-uri "appdirs" version))
7209 (sha256
7210 (base32
7211 "14id6wxi12lgyw0mg3bcfnf888ad07jz9yj46gfzhn186z8rcn4y"))))
7212 (build-system python-build-system)
7213 (home-page "https://github.com/ActiveState/appdirs")
7214 (synopsis
7215 "Determine platform-specific dirs, e.g. a \"user data dir\"")
7216 (description
7217 "This module provides a portable way of finding out where user data
7218 should be stored on various operating systems.")
7219 (license license:expat)))
7220
7221 (define-public python2-appdirs
7222 (package-with-python2 python-appdirs))
7223
7224 (define-public python-llfuse
7225 (package
7226 (name "python-llfuse")
7227 (version "1.2")
7228 (source (origin
7229 (method url-fetch)
7230 (uri (string-append
7231 "https://bitbucket.org/nikratio/python-llfuse/downloads/"
7232 "llfuse-" version ".tar.bz2"))
7233 (sha256
7234 (base32
7235 "11hms1x68bf1bqbqy7w3wpffqsd3jkgricmzrc1hrnwkswfzzlr4"))))
7236 (build-system python-build-system)
7237 (inputs
7238 `(("fuse" ,fuse)
7239 ("attr" ,attr)))
7240 (native-inputs
7241 `(("pkg-config" ,pkg-config)))
7242 (synopsis "Python bindings for FUSE")
7243 (description
7244 "Python-LLFUSE is a set of Python bindings for the low level FUSE API.")
7245 (home-page "https://bitbucket.org/nikratio/python-llfuse/")
7246 (license license:lgpl2.0+)
7247 (properties `((python2-variant . ,(delay python2-llfuse))))))
7248
7249 (define-public python2-llfuse
7250 (package (inherit (package-with-python2
7251 (strip-python2-variant python-llfuse)))
7252 (propagated-inputs `(("python2-contextlib2" ,python2-contextlib2)))))
7253
7254 ;; For attic-0.16
7255 (define-public python-llfuse-0.41
7256 (package (inherit python-llfuse)
7257 (version "0.41.1")
7258 (source (origin
7259 (method url-fetch)
7260 (uri (string-append
7261 "https://bitbucket.org/nikratio/python-llfuse/downloads/"
7262 "llfuse-" version ".tar.bz2"))
7263 (sha256
7264 (base32
7265 "1imlqw9b73086y97izr036f58pgc5akv4ihc2rrf8j5h75jbrlaa"))))
7266 ;; Python-LLFUSE < 0.42 includes underscore.js, which is MIT (expat)
7267 ;; licensed. The rest of the package is licensed under LGPL2.0 or later.
7268 (license (list license:expat license:lgpl2.0+))))
7269
7270 (define-public python-msgpack
7271 (package
7272 (name "python-msgpack")
7273 (version "0.4.8")
7274 (source (origin
7275 (method url-fetch)
7276 (uri (pypi-uri "msgpack-python" version))
7277 (sha256
7278 (base32
7279 "11pqk5braa6wndpnr1dhg64js82vjgxnm0lzy73rwl831zgijaqs"))))
7280 (build-system python-build-system)
7281 (synopsis "MessagePack (de)serializer")
7282 (description "MessagePack is a fast, compact binary serialization format,
7283 suitable for similar data to JSON. This package provides CPython bindings for
7284 reading and writing MessagePack data.")
7285 (home-page "https://pypi.python.org/pypi/msgpack-python/")
7286 (license license:asl2.0)))
7287
7288 (define-public python2-msgpack
7289 (package-with-python2 python-msgpack))
7290
7291 (define-public python-netaddr
7292 (package
7293 (name "python-netaddr")
7294 (version "0.7.18")
7295 (source
7296 (origin
7297 (method url-fetch)
7298 (uri (string-append
7299 "https://pypi.python.org/packages/source/n/netaddr/netaddr-"
7300 version
7301 ".tar.gz"))
7302 (sha256
7303 (base32
7304 "06dxjlbcicq7q3vqy8agq11ra01kvvd47j4mk6dmghjsyzyckxd1"))))
7305 (build-system python-build-system)
7306 (arguments `(#:tests? #f)) ;; No tests.
7307 (home-page "https://github.com/drkjam/netaddr/")
7308 (synopsis "Pythonic manipulation of network addresses")
7309 (description
7310 "A Python library for representing and manipulating IPv4, IPv6, CIDR, EUI
7311 and MAC network addresses.")
7312 (license license:bsd-3)))
7313
7314 (define-public python2-netaddr
7315 (package-with-python2 python-netaddr))
7316
7317 (define-public python-wrapt
7318 (package
7319 (name "python-wrapt")
7320 (version "1.10.8")
7321 (source
7322 (origin
7323 (method url-fetch)
7324 (uri (pypi-uri "wrapt" version))
7325 (sha256
7326 (base32
7327 "0wrcm1mydvfivbkzz0h81ygzdchnscshi6xvy5n3r21r9s0px8af"))))
7328 (build-system python-build-system)
7329 (arguments
7330 ;; Tests are not included in the tarball, they are only available in the
7331 ;; git repository.
7332 `(#:tests? #f))
7333 (home-page "https://github.com/GrahamDumpleton/wrapt")
7334 (synopsis "Module for decorators, wrappers and monkey patching")
7335 (description
7336 "The aim of the wrapt module is to provide a transparent object proxy for
7337 Python, which can be used as the basis for the construction of function
7338 wrappers and decorator functions.")
7339 (license license:bsd-2)))
7340
7341 (define-public python2-wrapt
7342 (package-with-python2 python-wrapt))
7343
7344 (define-public python-iso8601
7345 (package
7346 (name "python-iso8601")
7347 (version "0.1.11")
7348 (source
7349 (origin
7350 (method url-fetch)
7351 (uri (pypi-uri "iso8601" version))
7352 (sha256
7353 (base32
7354 "0c7gh3lsdjds262h0v1sqc66l7hqgfwbakn96qrhdbl0i3vm5yz8"))))
7355 (build-system python-build-system)
7356 (native-inputs
7357 `(("python-pytest" ,python-pytest)))
7358 (home-page "https://bitbucket.org/micktwomey/pyiso8601")
7359 (synopsis "Module to parse ISO 8601 dates")
7360 (description
7361 "This module parses the most common forms of ISO 8601 date strings (e.g.
7362 @code{2007-01-14T20:34:22+00:00}) into @code{datetime} objects.")
7363 (license license:expat)))
7364
7365 (define-public python2-iso8601
7366 (package-with-python2 python-iso8601))
7367
7368 (define-public python-monotonic
7369 (package
7370 (name "python-monotonic")
7371 (version "0.3")
7372 (source
7373 (origin
7374 (method url-fetch)
7375 (uri (string-append
7376 "https://pypi.python.org/packages/source/m/monotonic/monotonic-"
7377 version
7378 ".tar.gz"))
7379 (sha256
7380 (base32
7381 "0yz0bcbwx8r2c01czzfpbrxddynxyk9k95jj8h6sgcb7xmfvl998"))))
7382 (build-system python-build-system)
7383 (home-page "https://github.com/atdt/monotonic")
7384 (synopsis "Implementation of time.monotonic() for Python 2 & < 3.3")
7385 (description
7386 "This module provides a monotonic() function which returns the value (in
7387 fractional seconds) of a clock which never goes backwards.")
7388 (license license:asl2.0)))
7389
7390 (define-public python2-monotonic
7391 (package-with-python2 python-monotonic))
7392
7393 (define-public python-webob
7394 (package
7395 (name "python-webob")
7396 (version "1.5.1")
7397 (source
7398 (origin
7399 (method url-fetch)
7400 (uri (pypi-uri "WebOb" version))
7401 (sha256
7402 (base32
7403 "02bhhzijfhv8hmi1i54d4b0v43liwhnywhflvxsv4x3zax9s3afq"))))
7404 (build-system python-build-system)
7405 (native-inputs
7406 `(("python-nose" ,python-nose)))
7407 (home-page "http://webob.org/")
7408 (synopsis "WSGI request and response object")
7409 (description
7410 "WebOb provides wrappers around the WSGI request environment, and an
7411 object to help create WSGI responses.")
7412 (license license:expat)))
7413
7414 (define-public python2-webob
7415 (package-with-python2 python-webob))
7416
7417 (define-public python-xlrd
7418 (package
7419 (name "python-xlrd")
7420 (version "1.0.0")
7421 (source (origin
7422 (method url-fetch)
7423 (uri (pypi-uri "xlrd" version))
7424 (sha256
7425 (base32
7426 "0s8hjiz01vbhy85xalrz0qlsmd9ypf36zjqrf97hh984spapvy0g"))))
7427 (build-system python-build-system)
7428 (arguments
7429 `(#:phases
7430 (modify-phases %standard-phases
7431 ;; Current test in setup.py does not work as of 1.0.0, so use nose to
7432 ;; run tests instead for now.
7433 (replace 'check (lambda _ (zero? (system* "nosetests")))))))
7434 (native-inputs `(("python-nose" ,python-nose)))
7435 (home-page "http://www.python-excel.org/")
7436 (synopsis "Library for extracting data from Excel files")
7437 (description "This packages provides a library to extract data from
7438 spreadsheets using Microsoft Excel proprietary file formats @samp{.xls} and
7439 @samp{.xlsx} (versions 2.0 onwards). It has support for Excel dates and is
7440 Unicode-aware. It is not intended as an end-user tool.")
7441 (license license:bsd-3)))
7442
7443 (define-public python2-xlrd
7444 (package-with-python2 python-xlrd))
7445
7446 (define-public python-prettytable
7447 (package
7448 (name "python-prettytable")
7449 (version "0.7.2")
7450 (source
7451 (origin
7452 (method url-fetch)
7453 (uri (string-append
7454 "https://pypi.python.org/packages/source/P/PrettyTable/"
7455 "prettytable-" version ".tar.bz2"))
7456 (sha256
7457 (base32
7458 "0diwsicwmiq2cpzpxri7cyl5fmsvicafw6nfqf6p6p322dji2g45"))))
7459 (build-system python-build-system)
7460 (home-page "http://code.google.com/p/prettytable/")
7461 (synopsis "Display tabular data in an ASCII table format")
7462 (description
7463 "A library designed to represent tabular data in visually appealing ASCII
7464 tables. PrettyTable allows for selection of which columns are to be printed,
7465 independent alignment of columns (left or right justified or centred) and
7466 printing of sub-tables by specifying a row range.")
7467 (license license:bsd-3)))
7468
7469 (define-public python2-prettytable
7470 (package-with-python2 python-prettytable))
7471
7472 (define-public python-tables
7473 (package
7474 (name "python-tables")
7475 (version "3.2.2")
7476 (source
7477 (origin
7478 (method url-fetch)
7479 (uri (pypi-uri "tables" version))
7480 (sha256
7481 (base32
7482 "117s6w7s3yxafpmf3zz3svana7xfrsviw01va1xp7h8ylx8v6r1m"))
7483 (modules '((guix build utils)))
7484 (snippet
7485 '(begin
7486 ;; Remove pre-compiled .pyc files from source.
7487 (for-each delete-file-recursively
7488 (find-files "." "__pycache__" #:directories? #t))
7489 (for-each delete-file (find-files "." "\\.pyc$"))
7490 #t))))
7491 (build-system python-build-system)
7492 (arguments
7493 `(;; FIXME: python-build-system does not pass configure-flags to "build"
7494 ;; or "check", so we must override the build and check phases.
7495 #:phases
7496 (modify-phases %standard-phases
7497 (add-after 'unpack 'use-gcc
7498 (lambda _
7499 (substitute* "setup.py"
7500 (("compiler = new_compiler\\(\\)" line)
7501 (string-append line
7502 "\ncompiler.set_executables(compiler='gcc',"
7503 "compiler_so='gcc',"
7504 "linker_exe='gcc',"
7505 "linker_so='gcc -shared')")))
7506 #t))
7507 (replace 'build
7508 (lambda* (#:key inputs #:allow-other-keys)
7509 (zero? (system* "python" "setup.py" "build"
7510 (string-append "--hdf5="
7511 (assoc-ref inputs "hdf5"))))))
7512 (replace 'check
7513 (lambda* (#:key inputs #:allow-other-keys)
7514 (zero? (system* "python" "setup.py" "check"
7515 (string-append "--hdf5="
7516 (assoc-ref inputs "hdf5")))))))))
7517 (propagated-inputs
7518 `(("python-numexpr" ,python-numexpr)
7519 ("python-numpy" ,python-numpy)))
7520 (native-inputs
7521 `(("python-cython" ,python-cython)
7522 ("pkg-config" ,pkg-config)))
7523 (inputs
7524 `(("hdf5" ,hdf5)
7525 ("bzip2" ,bzip2)
7526 ("zlib" ,zlib)))
7527 (home-page "http://www.pytables.org/")
7528 (synopsis "Hierarchical datasets for Python")
7529 (description "PyTables is a package for managing hierarchical datasets and
7530 designed to efficiently cope with extremely large amounts of data.")
7531 (license license:bsd-3)))
7532
7533 (define-public python2-tables
7534 (package-with-python2 python-tables))
7535
7536 (define-public python-pyasn1
7537 (package
7538 (name "python-pyasn1")
7539 (version "0.2.3")
7540 (source
7541 (origin
7542 (method url-fetch)
7543 (uri (pypi-uri "pyasn1" version))
7544 (sha256
7545 (base32
7546 "1b86yx23c1x74clai05a5ma8c8nfmhlx3j1mxq0ff657i2ylx33k"))))
7547 (build-system python-build-system)
7548 (home-page "http://pyasn1.sourceforge.net/")
7549 (synopsis "ASN.1 types and codecs")
7550 (description
7551 "This is an implementation of ASN.1 types and codecs in Python. It is
7552 suitable for a wide range of protocols based on the ASN.1 specification.")
7553 (license license:bsd-2)))
7554
7555 (define-public python2-pyasn1
7556 (package-with-python2 python-pyasn1))
7557
7558 (define-public python-pyasn1-modules
7559 (package
7560 (name "python-pyasn1-modules")
7561 (version "0.0.8")
7562 (source
7563 (origin
7564 (method url-fetch)
7565 (uri (pypi-uri "pyasn1-modules" version))
7566 (sha256
7567 (base32
7568 "0drqgw81xd3fxdlg89kgd79zzrabvfncvkbybi2wr6w2y4s1jmhh"))))
7569 (build-system python-build-system)
7570 (propagated-inputs
7571 `(("python-pyasn1" ,python-pyasn1)))
7572 (home-page "https://sourceforge.net/projects/pyasn1/")
7573 (synopsis "ASN.1 codec implementations")
7574 (description
7575 "Pyasn1-modules is a collection of Python modules providing ASN.1 types and
7576 implementations of ASN.1-based codecs and protocols.")
7577 (license license:bsd-3)))
7578
7579 (define-public python2-pyasn1-modules
7580 (package-with-python2 python-pyasn1-modules))
7581
7582 (define-public python-ipaddress
7583 (package
7584 (name "python-ipaddress")
7585 (version "1.0.18")
7586 (source (origin
7587 (method url-fetch)
7588 (uri (pypi-uri "ipaddress" version))
7589 (sha256
7590 (base32
7591 "1q8klj9d84cmxgz66073x1j35cplr3r77vx1znhxiwl5w74391ax"))))
7592 (build-system python-build-system)
7593 (home-page "https://github.com/phihag/ipaddress")
7594 (synopsis "IP address manipulation library")
7595 (description
7596 "This package provides a fast, lightweight IPv4/IPv6 manipulation library
7597 in Python. This library is used to create, poke at, and manipulate IPv4 and
7598 IPv6 addresses and networks. This is a port of the Python 3.3 ipaddress
7599 module to older versions of Python.")
7600 (license license:psfl)))
7601
7602 (define-public python2-ipaddress
7603 (package-with-python2 python-ipaddress))
7604
7605 (define-public python2-ipaddr
7606 (package
7607 (name "python2-ipaddr")
7608 (version "2.1.11")
7609 (source
7610 (origin
7611 (method url-fetch)
7612 (uri (pypi-uri "ipaddr" version))
7613 (sha256
7614 (base32 "1dwq3ngsapjc93fw61rp17fvzggmab5x1drjzvd4y4q0i255nm8v"))))
7615 (build-system python-build-system)
7616 (arguments
7617 `(#:python ,python-2 ;version 2 only
7618 #:phases
7619 (modify-phases %standard-phases
7620 (replace 'check
7621 (lambda* _
7622 (zero? (system* "python" "ipaddr_test.py")))))))
7623 (home-page "https://github.com/google/ipaddr-py")
7624 (synopsis "IP address manipulation library")
7625 (description
7626 "Ipaddr is a Python@tie{}2 library for creating and manupilating IPv4 and
7627 IPv6 addresses and networks.
7628
7629 For new implementations you may prefer to use the standard module
7630 @code{ipaddress}, which was introduced in Python 3.3 and backported to older
7631 versions of Python.")
7632 (license license:asl2.0)))
7633
7634 (define-public python-idna
7635 (package
7636 (name "python-idna")
7637 (version "2.5")
7638 (source
7639 (origin
7640 (method url-fetch)
7641 (uri (pypi-uri "idna" version))
7642 (sha256
7643 (base32
7644 "1ara12a7k2zc69msa0arrvw00gn61a6i6by01xb3lkkc0h4cxd9w"))))
7645 (build-system python-build-system)
7646 (home-page "https://github.com/kjd/idna")
7647 (synopsis "Internationalized domain names in applications")
7648 (description
7649 "This is a library to support the Internationalised Domain Names in
7650 Applications (IDNA) protocol as specified in RFC 5891. This version of the
7651 protocol is often referred to as “IDNA2008” and can produce different results
7652 from the earlier standard from 2003. The library is also intended to act as a
7653 suitable drop-in replacement for the “encodings.idna” module that comes with
7654 the Python standard library but currently only supports the older 2003
7655 specification.")
7656 (license license:bsd-4)))
7657
7658 (define-public python2-idna
7659 (package-with-python2 python-idna))
7660
7661 (define-public python-pretend
7662 (package
7663 (name "python-pretend")
7664 (version "1.0.8")
7665 (source
7666 (origin
7667 (method url-fetch)
7668 (uri (string-append "https://pypi.python.org/packages/source/p/"
7669 "pretend/pretend-" version ".tar.gz"))
7670 (sha256
7671 (base32
7672 "0r5r7ygz9m6d2bklflbl84cqhjkc2q12xgis8268ygjh30g2q3wk"))))
7673 (build-system python-build-system)
7674 (home-page "https://github.com/alex/pretend")
7675 (synopsis "Library for stubbing in Python")
7676 (description
7677 "Pretend is a library to make stubbing with Python easier. Stubbing is a
7678 technique for writing tests. You may hear the term mixed up with mocks,
7679 fakes, or doubles. Basically, a stub is an object that returns pre-canned
7680 responses, rather than doing any computation.")
7681 (license license:bsd-3)))
7682
7683 (define-public python2-pretend
7684 (package-with-python2 python-pretend))
7685
7686 (define-public python-cryptography-vectors
7687 (package
7688 (name "python-cryptography-vectors")
7689 (version "2.0.3")
7690 (source
7691 (origin
7692 (method url-fetch)
7693 (uri (pypi-uri "cryptography_vectors" version))
7694 (sha256
7695 (base32
7696 "1qa117fs1yd50zn2cfxh7d9l999ds0z4h83m9m7j4fk6ffm33f5y"))))
7697 (build-system python-build-system)
7698 (home-page "https://github.com/pyca/cryptography")
7699 (synopsis "Test vectors for the cryptography package")
7700 (description
7701 "This package contains test vectors for the cryptography package.")
7702 ;; Distributed under either BSD-3 or ASL2.0
7703 (license (list license:bsd-3 license:asl2.0))))
7704
7705 (define-public python2-cryptography-vectors
7706 (package-with-python2 python-cryptography-vectors))
7707
7708 (define-public python-cryptography
7709 (package
7710 (name "python-cryptography")
7711 (version "2.0.3")
7712 (source
7713 (origin
7714 (method url-fetch)
7715 (uri (pypi-uri "cryptography" version))
7716 (sha256
7717 (base32
7718 "0fnck37zyvbzmccbp7w3jy27jgmij1992j5wyy3gxhw6a11b4jyh"))))
7719 (build-system python-build-system)
7720 (inputs
7721 `(("openssl" ,openssl)))
7722 (propagated-inputs
7723 `(("python-asn1crypto" ,python-asn1crypto)
7724 ("python-cffi" ,python-cffi)
7725 ("python-six" ,python-six)
7726 ("python-idna" ,python-idna)
7727 ("python-iso8601" ,python-iso8601)))
7728 (native-inputs
7729 `(("python-cryptography-vectors" ,python-cryptography-vectors)
7730 ("python-hypothesis" ,python-hypothesis)
7731 ("python-pretend" ,python-pretend)
7732 ("python-pytz" ,python-pytz)
7733 ("python-pytest" ,python-pytest-3.0)))
7734 (home-page "https://github.com/pyca/cryptography")
7735 (synopsis "Cryptographic recipes and primitives for Python")
7736 (description
7737 "cryptography is a package which provides cryptographic recipes and
7738 primitives to Python developers. It aims to be the “cryptographic standard
7739 library” for Python. The package includes both high level recipes, and low
7740 level interfaces to common cryptographic algorithms such as symmetric ciphers,
7741 message digests and key derivation functions.")
7742 ;; Distributed under either BSD-3 or ASL2.0
7743 (license (list license:bsd-3 license:asl2.0))
7744 (properties `((python2-variant . ,(delay python2-cryptography))))))
7745
7746 (define-public python2-cryptography
7747 (let ((crypto (package-with-python2
7748 (strip-python2-variant python-cryptography))))
7749 (package (inherit crypto)
7750 (propagated-inputs
7751 `(("python2-ipaddress" ,python2-ipaddress)
7752 ("python2-backport-ssl-match-hostname"
7753 ,python2-backport-ssl-match-hostname)
7754 ("python2-enum34" ,python2-enum34)
7755 ,@(package-propagated-inputs crypto))))))
7756
7757 (define-public python-pyopenssl
7758 (package
7759 (name "python-pyopenssl")
7760 (version "17.2.0")
7761 (source
7762 (origin
7763 (method url-fetch)
7764 (uri (pypi-uri "pyOpenSSL" version))
7765 (sha256
7766 (base32
7767 "0d283g4zi0hr9papd24mjl70mi15gyzq6fx618rizi87dgipqqax"))))
7768 (build-system python-build-system)
7769 (arguments
7770 '(#:phases
7771 (modify-phases %standard-phases
7772 (delete 'check)
7773 (add-after 'install 'check
7774 (lambda* (#:key inputs outputs #:allow-other-keys)
7775 (add-installed-pythonpath inputs outputs)
7776 (zero? (system* "py.test" "-v" "-k"
7777 (string-append
7778 ;; This test tries to look up certificates from
7779 ;; the compiled-in default path in OpenSSL, which
7780 ;; does not exist in the build environment.
7781 "not test_fallback_default_verify_paths "
7782 ;; This test attempts to make a connection to
7783 ;; an external web service.
7784 "and not test_set_default_verify_paths"))))))))
7785 (propagated-inputs
7786 `(("python-cryptography" ,python-cryptography)
7787 ("python-six" ,python-six)))
7788 (inputs
7789 `(("openssl" ,openssl)))
7790 (native-inputs
7791 `(("python-flaky" ,python-flaky)
7792 ("python-pretend" ,python-pretend)
7793 ("python-pytest" ,python-pytest-3.0)))
7794 (home-page "https://github.com/pyca/pyopenssl")
7795 (synopsis "Python wrapper module around the OpenSSL library")
7796 (description
7797 "PyOpenSSL is a high-level wrapper around a subset of the OpenSSL
7798 library.")
7799 (license license:asl2.0)))
7800
7801 (define-public python2-pyopenssl
7802 (package-with-python2 python-pyopenssl))
7803
7804 (define-public python-pip
7805 (package
7806 (name "python-pip")
7807 (version "9.0.1")
7808 (source
7809 (origin
7810 (method url-fetch)
7811 (uri (pypi-uri "pip" version))
7812 (sha256
7813 (base32
7814 "03clr9c1dih5n9c00c592zzvf6r1ffimywkaq9agcqdllzhl7wh9"))))
7815 (build-system python-build-system)
7816 (arguments
7817 '(#:tests? #f)) ; there are no tests in the pypi archive.
7818 (home-page "https://pip.pypa.io/")
7819 (synopsis "Package manager for Python software")
7820 (description
7821 "Pip is a package manager for Python software, that finds packages on the
7822 Python Package Index (PyPI).")
7823 (license license:expat)))
7824
7825 (define-public python2-pip
7826 (package-with-python2 python-pip))
7827
7828 (define-public python-tlsh
7829 (package
7830 (name "python-tlsh")
7831 (version "3.4.4")
7832 (home-page "https://github.com/trendmicro/tlsh")
7833 (source (origin
7834 (method url-fetch)
7835 (uri (string-append "https://github.com/trendmicro/tlsh/archive/v"
7836 version ".tar.gz"))
7837 (sha256
7838 (base32
7839 "00bhzjqrlh7v538kbkbn8lgx976j1138al3sdhklaizqjvpwyk4r"))
7840 (file-name (string-append name "-" version ".tar.gz"))))
7841 (build-system cmake-build-system)
7842 (arguments
7843 '(#:out-of-source? #f
7844 #:phases (modify-phases %standard-phases
7845 (replace
7846 'install
7847 (lambda* (#:key outputs #:allow-other-keys)
7848 ;; Build and install the Python bindings. The underlying
7849 ;; C++ library is apparently not meant to be installed.
7850 (let ((out (assoc-ref outputs "out")))
7851 (with-directory-excursion "py_ext"
7852 (and (system* "python" "setup.py" "build")
7853 (system* "python" "setup.py" "install"
7854 (string-append "--prefix=" out))))))))))
7855 (inputs `(("python" ,python-wrapper))) ;for the bindings
7856 (synopsis "Fuzzy matching library for Python")
7857 (description
7858 "Trend Micro Locality Sensitive Hash (TLSH) is a fuzzy matching library.
7859 Given a byte stream with a minimum length of 256 bytes, TLSH generates a hash
7860 value which can be used for similarity comparisons. Similar objects have
7861 similar hash values, which allows for the detection of similar objects by
7862 comparing their hash values. The byte stream should have a sufficient amount
7863 of complexity; for example, a byte stream of identical bytes will not generate
7864 a hash value.")
7865 (license license:asl2.0)))
7866
7867 (define-public python2-tlsh
7868 (package
7869 (inherit python-tlsh)
7870 (name "python2-tlsh")
7871 (inputs `(("python" ,python-2)))))
7872
7873 (define-public python-termcolor
7874 (package
7875 (name "python-termcolor")
7876 (version "1.1.0")
7877 (source
7878 (origin
7879 (method url-fetch)
7880 (uri (pypi-uri "termcolor" version))
7881 (sha256
7882 (base32
7883 "0fv1vq14rpqwgazxg4981904lfyp84mnammw7y046491cv76jv8x"))))
7884 (build-system python-build-system)
7885 (arguments
7886 ;; There are no tests.
7887 `(#:tests? #f))
7888 (home-page "http://pypi.python.org/pypi/termcolor")
7889 (synopsis "ANSII Color formatting for terminal output")
7890 (description
7891 "This package provides ANSII Color formatting for output in terminals.")
7892 (license license:expat)))
7893
7894 (define-public python2-termcolor
7895 (package-with-python2 python-termcolor))
7896
7897 (define-public python-libarchive-c
7898 (package
7899 (name "python-libarchive-c")
7900 (version "2.2")
7901 (source (origin
7902 (method url-fetch)
7903 (uri (pypi-uri "libarchive-c" version))
7904 (sha256
7905 (base32
7906 "0z4r7v3dhd6b3120mav05ff08srih176r2rg5k8kn7mjd9pslm2x"))))
7907 (build-system python-build-system)
7908 (arguments
7909 '(#:phases (modify-phases %standard-phases
7910 (add-before
7911 'build 'reference-libarchive
7912 (lambda* (#:key inputs #:allow-other-keys)
7913 ;; Retain the absolute file name of libarchive.so.
7914 (let ((libarchive (assoc-ref inputs "libarchive")))
7915 (substitute* "libarchive/ffi.py"
7916 (("find_library\\('archive'\\)")
7917 (string-append "'" libarchive
7918 "/lib/libarchive.so'")))))))))
7919 (inputs
7920 `(("libarchive" ,libarchive)))
7921 (home-page "https://github.com/Changaco/python-libarchive-c")
7922 (synopsis "Python interface to libarchive")
7923 (description
7924 "This package provides Python bindings to libarchive, a C library to
7925 access possibly compressed archives in many different formats. It uses
7926 Python's @code{ctypes} foreign function interface (FFI).")
7927 (license license:lgpl2.0+)))
7928
7929 (define-public python2-libarchive-c
7930 (package-with-python2 python-libarchive-c))
7931
7932 (define-public python-file
7933 (package
7934 (inherit file)
7935 (name "python-file")
7936 (source (origin
7937 (inherit (package-source file))
7938 ;; This patch should not be applied to python2-file.
7939 (patches (search-patches "python-file-double-encoding-bug.patch"))))
7940 (build-system python-build-system)
7941 (arguments
7942 '(#:tests? #f ;no tests
7943 #:configure-flags '("--single-version-externally-managed" "--root=/")
7944 #:phases (modify-phases %standard-phases
7945 (add-before 'build 'change-directory
7946 (lambda _
7947 (chdir "python")
7948 #t))
7949 (add-before 'build 'set-library-file-name
7950 (lambda* (#:key inputs #:allow-other-keys)
7951 (let ((file (assoc-ref inputs "file")))
7952 (substitute* "magic.py"
7953 (("find_library\\('magic'\\)")
7954 (string-append "'" file "/lib/libmagic.so'")))
7955 #t))))))
7956 (inputs `(("file" ,file)))
7957 (self-native-input? #f)
7958 (synopsis "Python bindings to the libmagic file type guesser. Note that
7959 this module and the python-magic module both provide a \"magic.py\" file;
7960 these two modules, which are different and were developed separately, both
7961 serve the same purpose: provide Python bindings for libmagic.")))
7962
7963 (define-public python2-file
7964 (package-with-python2 python-file))
7965
7966 (define-public python-debian
7967 (package
7968 (name "python-debian")
7969 (version "0.1.28")
7970 (source
7971 (origin
7972 (method url-fetch)
7973 (uri (pypi-uri name version))
7974 (sha256
7975 (base32
7976 "0i15f0xzx679sd0ldq2sls9pnnps9fv6vhqvnv9dzf4qhma42i0y"))))
7977 (build-system python-build-system)
7978 (propagated-inputs
7979 `(("python-six" ,python-six)))
7980 (home-page "http://packages.debian.org/sid/python-debian")
7981 (synopsis "Debian package related modules")
7982 (description
7983 ;; XXX: Use @enumerate instead of @itemize to work around
7984 ;; <http://bugs.gnu.org/21772>.
7985 "This package provides Python modules that abstract many formats of
7986 Debian-related files, such as:
7987
7988 @enumerate
7989 @item Debtags information;
7990 @item @file{debian/changelog} files;
7991 @item packages files, pdiffs;
7992 @item control files of single or multiple RFC822-style paragraphs---e.g.
7993 @file{debian/control}, @file{.changes}, @file{.dsc};
7994 @item Raw @file{.deb} and @file{.ar} files, with (read-only) access to
7995 contained files and meta-information.
7996 @end enumerate\n")
7997
7998 ;; Modules are either GPLv2+ or GPLv3+.
7999 (license license:gpl3+)))
8000
8001 (define-public python2-debian
8002 (package-with-python2 python-debian))
8003
8004 (define-public python-nbformat
8005 (package
8006 (name "python-nbformat")
8007 (version "4.3.0")
8008 (source
8009 (origin
8010 (method url-fetch)
8011 (uri (pypi-uri "nbformat" version))
8012 (sha256
8013 (base32
8014 "12s7j4qja8b5bs1kyw5dzmrqbjxxj8wk52cyasbiqbv7fblcrssz"))))
8015 (build-system python-build-system)
8016 (arguments `(#:tests? #f)) ; no test target
8017 (propagated-inputs
8018 `(("python-ipython-genutils" ,python-ipython-genutils)
8019 ("python-jsonschema" ,python-jsonschema)
8020 ("python-jupyter-core" ,python-jupyter-core)
8021 ("python-traitlets" ,python-traitlets)))
8022 (home-page "http://jupyter.org")
8023 (synopsis "Jupyter Notebook format")
8024 (description "This package provides the reference implementation of the
8025 Jupyter Notebook format and Python APIs for working with notebooks.")
8026 (license license:bsd-3)))
8027
8028 (define-public python2-nbformat
8029 (package-with-python2 python-nbformat))
8030
8031 (define-public python-bleach
8032 (package
8033 (name "python-bleach")
8034 (version "1.4.3")
8035 (source
8036 (origin
8037 (method url-fetch)
8038 (uri (pypi-uri "bleach" version))
8039 (sha256
8040 (base32
8041 "0jvg3jxrvnx7xmm9gj262v60ib452xlnwlb0navyp7jsvcd0d4qj"))))
8042 (build-system python-build-system)
8043 (propagated-inputs
8044 `(("python-html5lib" ,python-html5lib-0.9)
8045 ("python-six" ,python-six)))
8046 (native-inputs
8047 `(("python-nose" ,python-nose)))
8048 (home-page "https://github.com/jsocol/bleach")
8049 (synopsis "Whitelist-based HTML-sanitizing tool")
8050 (description "Bleach is an easy whitelist-based HTML-sanitizing tool.")
8051 (license license:asl2.0)))
8052
8053 (define-public python2-bleach
8054 (package-with-python2 python-bleach))
8055
8056 (define-public python-entrypoints
8057 (package
8058 (name "python-entrypoints")
8059 (version "0.2.2")
8060 (source
8061 (origin
8062 (method url-fetch)
8063 (uri (string-append "https://github.com/takluyver/entrypoints/archive/"
8064 version ".tar.gz"))
8065 (file-name (string-append name "-" version ".tar.gz"))
8066 (sha256
8067 (base32
8068 "0azqlkh3j0za080lsf5crnhaxx3c93k9dpv5ihkhf5cppgw5sjz5"))))
8069 (build-system python-build-system)
8070 ;; The package does not come with a setup.py file, so we have to generate
8071 ;; one ourselves.
8072 (arguments
8073 `(#:tests? #f
8074 #:phases
8075 (modify-phases %standard-phases
8076 (add-after 'unpack 'create-setup.py
8077 (lambda _
8078 (call-with-output-file "setup.py"
8079 (lambda (port)
8080 (format port "\
8081 from setuptools import setup
8082 setup(name='entrypoints', version='~a', py_modules=['entrypoints'])
8083 " ,version))))))))
8084 (home-page "https://github.com/takluyver/entrypoints")
8085 (synopsis "Discover and load entry points from installed Python packages")
8086 (description "Entry points are a way for Python packages to advertise
8087 objects with some common interface. The most common examples are
8088 @code{console_scripts} entry points, which define shell commands by
8089 identifying a Python function to run. The @code{entrypoints} module contains
8090 functions to find and load entry points.")
8091 (license license:expat)))
8092
8093 (define-public python2-entrypoints
8094 (package-with-python2 python-entrypoints))
8095
8096 (define-public python-nbconvert
8097 (package
8098 (name "python-nbconvert")
8099 (version "5.0.0b1")
8100 (source
8101 (origin
8102 (method url-fetch)
8103 (uri (pypi-uri "nbconvert" version))
8104 (sha256
8105 (base32
8106 "0brclbb18l4nmd5qy3dl9wn05rjdh1fz4rmzdlfqacj12rcdvdgp"))))
8107 (build-system python-build-system)
8108 (arguments
8109 `(;; The "bdist_egg" target is disabled by default, causing the installation
8110 ;; to fail.
8111 #:configure-flags (list "bdist_egg")
8112 ;; FIXME: 5 failures, 40 errors.
8113 #:tests? #f))
8114 ;; #:phases
8115 ;; (modify-phases %standard-phases
8116 ;; (replace 'check
8117 ;; (lambda _
8118 ;; (zero? (system* "py.test" "-v")))))
8119 (native-inputs
8120 `(("python-pytest" ,python-pytest)))
8121 (propagated-inputs
8122 `(("python-bleach" ,python-bleach)
8123 ("python-entrypoints" ,python-entrypoints)
8124 ("python-jinja2" ,python-jinja2)
8125 ("python-jupyter-core" ,python-jupyter-core)
8126 ("python-mistune" ,python-mistune)
8127 ("python-nbformat" ,python-nbformat)
8128 ("python-pygments" ,python-pygments)
8129 ("python-traitlets" ,python-traitlets)))
8130 (home-page "http://jupyter.org")
8131 (synopsis "Converting Jupyter Notebooks")
8132 (description "The @code{nbconvert} tool, @{jupyter nbconvert}, converts
8133 notebooks to various other formats via Jinja templates. It allows you to
8134 convert an @code{.ipynb} notebook file into various static formats including:
8135
8136 @enumerate
8137 @item HTML
8138 @item LaTeX
8139 @item PDF
8140 @item Reveal JS
8141 @item Markdown (md)
8142 @item ReStructured Text (rst)
8143 @item executable script
8144 @end enumerate\n")
8145 (license license:bsd-3)))
8146
8147 (define-public python2-nbconvert
8148 (package-with-python2 python-nbconvert))
8149
8150 (define-public python-notebook
8151 (package
8152 (name "python-notebook")
8153 (version "4.2.3")
8154 (source (origin
8155 (method url-fetch)
8156 (uri (pypi-uri "notebook" version))
8157 (sha256
8158 (base32
8159 "0laq5c2f21frq6xcdckgq7raqhznbjb0qs0357g612z87wyn1a9r"))))
8160 (build-system python-build-system)
8161 (arguments
8162 `(#:phases
8163 (modify-phases %standard-phases
8164 (replace 'check
8165 (lambda _
8166 ;; HOME must be set for tests
8167 (setenv "HOME" "/tmp")
8168 (zero? (system* "nosetests")))))))
8169 (propagated-inputs
8170 `(("python-jupyter-core" ,python-jupyter-core)
8171 ("python-nbformat" ,python-nbformat)
8172 ("python-nbconvert" ,python-nbconvert)
8173 ("python-ipython" ,python-ipython)))
8174 (native-inputs
8175 `(("python-nose" ,python-nose)
8176 ("python-sphinx" ,python-sphinx)
8177 ("python-requests" ,python-requests)))
8178 (home-page "http://jupyter.org/")
8179 (synopsis "Web-based notebook environment for interactive computing")
8180 (description
8181 "The Jupyter HTML notebook is a web-based notebook environment for
8182 interactive computing.")
8183 (properties `((python2-variant . ,(delay python2-notebook))))
8184 (license license:bsd-3)))
8185
8186 (define-public python2-notebook
8187 (let ((base (package-with-python2
8188 (strip-python2-variant python-notebook))))
8189 (package (inherit base)
8190 (native-inputs
8191 `(("python2-mock" ,python2-mock)
8192 ,@(package-native-inputs base)))
8193 (arguments
8194 (substitute-keyword-arguments (package-arguments base)
8195 ((#:phases phases)
8196 `(modify-phases ,phases
8197 (add-before 'check 'disable-test-case
8198 ;; The test requires network access to localhost. Curiously it
8199 ;; fails with Python 2 only. Simply make the test-case return
8200 ;; immediately.
8201 (lambda _
8202 (substitute*
8203 "notebook/services/nbconvert/tests/test_nbconvert_api.py"
8204 (("formats = self.nbconvert_api") "return #")))))))))))
8205
8206 (define-public python-widgetsnbextension
8207 (package
8208 (name "python-widgetsnbextension")
8209 (version "1.2.6")
8210 (source
8211 (origin
8212 (method url-fetch)
8213 (uri (pypi-uri "widgetsnbextension" version))
8214 (sha256
8215 (base32
8216 "0lff2mrwrgsa1mxmwx3phl9xvy0jqfpg6khbmxy53jbq56rwy666"))))
8217 (build-system python-build-system)
8218 (propagated-inputs
8219 `(("python-notebook" ,python-notebook)))
8220 (native-inputs
8221 `(("python-certifi" ,python-certifi)
8222 ("python-nose" ,python-nose)))
8223 (home-page "http://ipython.org")
8224 (synopsis "IPython HTML widgets for Jupyter")
8225 (description "This package provides interactive HTML widgets for Jupyter
8226 notebooks.")
8227 (license license:bsd-3)))
8228
8229 (define-public python2-widgetsnbextension
8230 (package-with-python2 python-widgetsnbextension))
8231
8232 (define-public python-ipywidgets
8233 (package
8234 (name "python-ipywidgets")
8235 (version "5.2.2")
8236 (source
8237 (origin
8238 (method url-fetch)
8239 (uri (pypi-uri "ipywidgets" version))
8240 (sha256
8241 (base32
8242 "1lk0qrr5l9a0z7qkkn30hv5832whxwxymf1l576fmmad0n7hkxms"))))
8243 (build-system python-build-system)
8244 ;; FIXME: it's not clear how to run the tests.
8245 (arguments `(#:tests? #f))
8246 (propagated-inputs
8247 `(("python-ipykernel" ,python-ipykernel)
8248 ("python-ipython" ,python-ipython)
8249 ("python-traitlets" ,python-traitlets)
8250 ("python-widgetsnbextension" ,python-widgetsnbextension)))
8251 (home-page "http://ipython.org")
8252 (synopsis "IPython HTML widgets for Jupyter")
8253 (description "Ipywidgets are interactive HTML widgets for Jupyter
8254 notebooks and the IPython kernel. Notebooks come alive when interactive
8255 widgets are used. Users gain control of their data and can visualize changes
8256 in the data.")
8257 (license license:bsd-3)))
8258
8259 (define-public python2-ipywidgets
8260 (package-with-python2 python-ipywidgets))
8261
8262 (define-public python-jupyter-console
8263 (package
8264 (name "python-jupyter-console")
8265 (version "5.0.0")
8266 (source
8267 (origin
8268 (method url-fetch)
8269 (uri (pypi-uri "jupyter_console" version))
8270 (sha256
8271 (base32
8272 "04acmkwsi99rcg3vb54c6n492zv35s92h2ahabc0w6wj976cipvx"))))
8273 (build-system python-build-system)
8274 ;; FIXME: it's not clear how to run the tests.
8275 (arguments `(#:tests? #f))
8276 (propagated-inputs
8277 `(("python-ipykernel" ,python-ipykernel)
8278 ("python-ipython" ,python-ipython)
8279 ("python-jupyter-client" ,python-jupyter-client)
8280 ("python-prompt-toolkit" ,python-prompt-toolkit)
8281 ("python-pygments" ,python-pygments)))
8282 (home-page "https://jupyter.org")
8283 (synopsis "Jupyter terminal console")
8284 (description "This package provides a terminal-based console frontend for
8285 Jupyter kernels. It also allows for console-based interaction with non-Python
8286 Jupyter kernels such as IJulia and IRKernel.")
8287 (license license:bsd-3)))
8288
8289 (define-public python2-jupyter-console
8290 (package-with-python2 python-jupyter-console))
8291
8292 (define-public jupyter
8293 (package
8294 (name "jupyter")
8295 (version "1.0.0")
8296 (source
8297 (origin
8298 (method url-fetch)
8299 (uri (pypi-uri "jupyter" version))
8300 (sha256
8301 (base32
8302 "0pwf3pminkzyzgx5kcplvvbvwrrzd3baa7lmh96f647k30rlpp6r"))))
8303 (build-system python-build-system)
8304 ;; FIXME: it's not clear how to run the tests.
8305 (arguments `(#:tests? #f))
8306 (propagated-inputs
8307 `(("python-ipykernel" ,python-ipykernel)
8308 ("python-ipywidgets" ,python-ipywidgets)
8309 ("python-jupyter-console" ,python-jupyter-console)
8310 ("python-nbconvert" ,python-nbconvert)
8311 ("python-notebook" ,python-notebook)))
8312 (home-page "http://jupyter.org")
8313 (synopsis "Web application for interactive documents")
8314 (description
8315 "The Jupyter Notebook is a web application that allows you to create and
8316 share documents that contain live code, equations, visualizations and
8317 explanatory text. Uses include: data cleaning and transformation, numerical
8318 simulation, statistical modeling, machine learning and much more.")
8319 (license license:bsd-3)))
8320
8321 (define-public python-chardet
8322 (package
8323 (name "python-chardet")
8324 (version "2.3.0")
8325 (source
8326 (origin
8327 (method url-fetch)
8328 (uri (string-append
8329 "https://pypi.python.org/packages/source/c/chardet/chardet-"
8330 version
8331 ".tar.gz"))
8332 (sha256
8333 (base32
8334 "1ak87ikcw34fivcgiz2xvi938dmclh078az65l9x3rmgljrkhgp5"))))
8335 (build-system python-build-system)
8336 (home-page "https://github.com/chardet/chardet")
8337 (synopsis "Universal encoding detector for Python 2 and 3")
8338 (description
8339 "This package provides @code{chardet}, a Python module that can
8340 automatically detect a wide range of file encodings.")
8341 (license license:lgpl2.1+)))
8342
8343 (define-public python2-chardet
8344 (package-with-python2 python-chardet))
8345
8346 (define-public python-docopt
8347 (package
8348 (name "python-docopt")
8349 (version "0.6.2")
8350 (source
8351 (origin
8352 (method url-fetch)
8353 ;; The release on PyPI does not include tests.
8354 (uri (string-append
8355 "https://github.com/docopt/docopt/archive/"
8356 version ".tar.gz"))
8357 (file-name (string-append name "-" version ".tar.gz"))
8358 (sha256
8359 (base32
8360 "16bf890xbdz3m30rsv2qacklh2rdn1zrfspfnwzx9g7vwz8yw4r1"))))
8361 (build-system python-build-system)
8362 (native-inputs
8363 `(("python-pytest" ,python-pytest)))
8364 (arguments
8365 `(#:phases (alist-replace
8366 'check
8367 (lambda _ (zero? (system* "py.test")))
8368 %standard-phases)))
8369 (home-page "http://docopt.org")
8370 (synopsis "Command-line interface description language for Python")
8371 (description "This library allows the user to define a command-line
8372 interface from a program's help message rather than specifying it
8373 programatically with command-line parsers like @code{getopt} and
8374 @code{argparse}.")
8375 (license license:expat)))
8376
8377 (define-public python2-docopt
8378 (package-with-python2 python-docopt))
8379
8380 (define-public python-zope-event
8381 (package
8382 (name "python-zope-event")
8383 (version "4.1.0")
8384 (source
8385 (origin
8386 (method url-fetch)
8387 (uri (string-append "https://pypi.python.org/packages/source/z"
8388 "/zope.event/zope.event-" version ".tar.gz"))
8389 (sha256
8390 (base32
8391 "11p75zpfz3ffhz21nzx9wb23xs993ck5s6hkjcvhswwizni5jynw"))))
8392 (build-system python-build-system)
8393 (home-page "http://pypi.python.org/pypi/zope.event")
8394 (synopsis "Event publishing system for Python")
8395 (description "Zope.event provides an event publishing API, intended for
8396 use by applications which are unaware of any subscribers to their events. It
8397 is a simple event-dispatching system on which more sophisticated event
8398 dispatching systems can be built.")
8399 (license license:zpl2.1)))
8400
8401 (define-public python2-zope-event
8402 (package-with-python2 python-zope-event))
8403
8404 (define-public python-zope-interface
8405 (package
8406 (name "python-zope-interface")
8407 (version "4.1.3")
8408 (source
8409 (origin
8410 (method url-fetch)
8411 (uri (string-append "https://pypi.python.org/packages/source/z"
8412 "/zope.interface/zope.interface-" version ".tar.gz"))
8413 (sha256
8414 (base32
8415 "0ks8h73b2g4bkad821qbv0wzjppdrwys33i7ka45ik3wxjg1l8if"))))
8416 (build-system python-build-system)
8417 (native-inputs
8418 `(("python-zope-event" ,python-zope-event)))
8419 (home-page "https://github.com/zopefoundation/zope.interface")
8420 (synopsis "Python implementation of the \"design by contract\"
8421 methodology")
8422 (description "Zope.interface provides an implementation of \"object
8423 interfaces\" for Python. Interfaces are a mechanism for labeling objects as
8424 conforming to a given API or contract.")
8425 (license license:zpl2.1)))
8426
8427 (define-public python2-zope-interface
8428 (package-with-python2 python-zope-interface))
8429
8430 (define-public python-zope-exceptions
8431 (package
8432 (name "python-zope-exceptions")
8433 (version "4.0.8")
8434 (source
8435 (origin
8436 (method url-fetch)
8437 (uri (string-append "https://pypi.python.org/packages/source/z"
8438 "/zope.exceptions/zope.exceptions-"
8439 version ".tar.gz"))
8440 (sha256
8441 (base32
8442 "0zwxaaa66sqxg5k7zcrvs0fbg9ym1njnxnr28dfmchzhwjvwnfzl"))))
8443 (build-system python-build-system)
8444 (arguments
8445 '(#:tests? #f)) ; circular dependency with zope.testrunner
8446 (propagated-inputs
8447 `(("python-zope-interface" ,python-zope-interface)))
8448 (home-page "http://cheeseshop.python.org/pypi/zope.exceptions")
8449 (synopsis "Zope exceptions")
8450 (description "Zope.exceptions provides general-purpose exception types
8451 that have uses outside of the Zope framework.")
8452 (license license:zpl2.1)))
8453
8454 (define-public python2-zope-exceptions
8455 (package-with-python2 python-zope-exceptions))
8456
8457 (define-public python-zope-testing
8458 (package
8459 (name "python-zope-testing")
8460 (version "4.5.0")
8461 (source
8462 (origin
8463 (method url-fetch)
8464 (uri (string-append "https://pypi.python.org/packages/source/z"
8465 "/zope.testing/zope.testing-" version ".tar.gz"))
8466 (sha256
8467 (base32
8468 "1yvglxhzvhl45mndvn9gskx2ph30zz1bz7rrlyfs62fv2pvih90s"))
8469 (modules '((guix build utils)))
8470 (snippet
8471 '(begin
8472 ;; Remove pre-compiled .pyc files backup files from source.
8473 (for-each delete-file (find-files "." "(\\.pyc|~)$"))
8474 #t))))
8475 (build-system python-build-system)
8476 (native-inputs
8477 `(("python-zope-exceptions" ,python-zope-exceptions)))
8478 (propagated-inputs
8479 `(("python-zope-interface" ,python-zope-interface)))
8480 (home-page "http://pypi.python.org/pypi/zope.testing")
8481 (synopsis "Zope testing helpers")
8482 (description "Zope.testing provides a number of testing utilities for HTML
8483 forms, HTTP servers, regular expressions, and more.")
8484 (license license:zpl2.1)))
8485
8486 (define-public python2-zope-testing
8487 (package-with-python2 python-zope-testing))
8488
8489 (define-public python-zope-testrunner
8490 (package
8491 (name "python-zope-testrunner")
8492 (version "4.4.9")
8493 (source
8494 (origin
8495 (method url-fetch)
8496 (uri (string-append "https://pypi.python.org/packages/source/z"
8497 "/zope.testrunner/zope.testrunner-"
8498 version ".zip"))
8499 (sha256
8500 (base32
8501 "1r7iqknhh55y45f64mz5hghgvzx34h1i11k350s0avx6q8gznja1"))))
8502 (build-system python-build-system)
8503 (arguments
8504 '(#:tests? #f)) ; FIXME: Tests can't find zope.interface.
8505 (native-inputs
8506 `(("python-six" ,python-six)
8507 ;("python-zope-interface" ,python-zope-interface)
8508 ("python-zope-exceptions" ,python-zope-exceptions)
8509 ("python-zope-testing" ,python-zope-testing)
8510 ("unzip" ,unzip)))
8511 (propagated-inputs
8512 `(("python-zope-interface" ,python-zope-interface)))
8513 (home-page "http://pypi.python.org/pypi/zope.testrunner")
8514 (synopsis "Zope testrunner script")
8515 (description "Zope.testrunner provides a script for running Python
8516 tests.")
8517 (license license:zpl2.1)))
8518
8519 (define-public python2-zope-testrunner
8520 (let ((base (package-with-python2 python-zope-testrunner)))
8521 (package
8522 (inherit base)
8523 (native-inputs
8524 (append (package-native-inputs base)
8525 `(("python2-subunit" ,python2-subunit)
8526 ("python2-mimeparse" ,python2-mimeparse)))))))
8527
8528 (define-public python-zope-i18nmessageid
8529 (package
8530 (name "python-zope-i18nmessageid")
8531 (version "4.0.3")
8532 (source
8533 (origin
8534 (method url-fetch)
8535 (uri (string-append
8536 "https://pypi.python.org/packages/source/z"
8537 "/zope.i18nmessageid/zope.i18nmessageid-"
8538 version ".tar.gz"))
8539 (sha256
8540 (base32
8541 "1rslyph0klk58dmjjy4j0jxy21k03azksixc3x2xhqbkv97cmzml"))))
8542 (build-system python-build-system)
8543 (home-page "http://pypi.python.org/pypi/zope.i18nmessageid")
8544 (synopsis "Message identifiers for internationalization")
8545 (description "Zope.i18nmessageid provides facilities for declaring
8546 internationalized messages within program source text.")
8547 (license license:zpl2.1)))
8548
8549 (define-public python2-zope-i18nmessageid
8550 (package-with-python2 python-zope-i18nmessageid))
8551
8552 (define-public python-zope-schema
8553 (package
8554 (name "python-zope-schema")
8555 (version "4.4.2")
8556 (source
8557 (origin
8558 (method url-fetch)
8559 (uri (string-append "https://pypi.python.org/packages/source/z"
8560 "/zope.schema/zope.schema-" version ".tar.gz"))
8561 (sha256
8562 (base32
8563 "1p943jdxb587dh7php4vx04qvn7b2877hr4qs5zyckvp5afhhank"))))
8564 (build-system python-build-system)
8565 (arguments
8566 '(#:tests? #f)) ; FIXME: Tests can't find zope.event.
8567 (propagated-inputs
8568 `(("python-zope-event" ,python-zope-event)
8569 ("python-zope-exceptions", python-zope-exceptions)
8570 ("python-zope-interface" ,python-zope-interface)))
8571 (native-inputs
8572 `(("python-zope-testing" ,python-zope-testing)
8573 ("python-coverage" ,python-coverage)
8574 ("python-nose" ,python-nose)))
8575 (home-page "http://pypi.python.org/pypi/zope.schema")
8576 (synopsis "Zope data schemas")
8577 (description "Zope.scheme provides extensions to zope.interface for
8578 defining data schemas.")
8579 (license license:zpl2.1)))
8580
8581 (define-public python2-zope-schema
8582 (package-with-python2 python-zope-schema))
8583
8584 (define-public python-zope-configuration
8585 (package
8586 (name "python-zope-configuration")
8587 (version "4.0.3")
8588 (source (origin
8589 (method url-fetch)
8590 (uri (string-append "https://pypi.python.org/packages/source/z"
8591 "/zope.configuration/zope.configuration-"
8592 version ".tar.gz"))
8593 (sha256
8594 (base32
8595 "1x9dfqypgympnlm25p9m43xh4qv3p7d75vksv9pzqibrb4cggw5n"))))
8596 (build-system python-build-system)
8597 (arguments
8598 '(#:tests? #f)) ; FIXME: Tests can't find zope.interface.
8599 (propagated-inputs
8600 `(("python-zope-i18nmessageid" ,python-zope-i18nmessageid)
8601 ("python-zope-schema" ,python-zope-schema)))
8602 (home-page "http://pypi.python.org/pypi/zope.configuration")
8603 (synopsis "Zope Configuration Markup Language")
8604 (description "Zope.configuration implements ZCML, the Zope Configuration
8605 Markup Language.")
8606 (license license:zpl2.1)))
8607
8608 (define-public python2-zope-configuration
8609 (package-with-python2 python-zope-configuration))
8610
8611 (define-public python-zope-proxy
8612 (package
8613 (name "python-zope-proxy")
8614 (version "4.1.6")
8615 (source
8616 (origin
8617 (method url-fetch)
8618 (uri (string-append "https://pypi.python.org/packages/source/z"
8619 "/zope.proxy/zope.proxy-" version ".tar.gz"))
8620 (sha256
8621 (base32
8622 "0pqwwmvm1prhwv1ziv9lp8iirz7xkwb6n2kyj36p2h0ppyyhjnm4"))))
8623 (build-system python-build-system)
8624 (arguments
8625 '(#:tests? #f)) ; FIXME: Tests can't find zope.interface.
8626 (propagated-inputs
8627 `(("python-zope-interface" ,python-zope-interface)))
8628 (home-page "http://pypi.python.org/pypi/zope.proxy")
8629 (synopsis "Generic, transparent proxies")
8630 (description "Zope.proxy provides generic, transparent proxies for Python.
8631 Proxies are special objects which serve as mostly-transparent wrappers around
8632 another object, intervening in the apparent behavior of the wrapped object
8633 only when necessary to apply the policy (e.g., access checking, location
8634 brokering, etc.) for which the proxy is responsible.")
8635 (license license:zpl2.1)))
8636
8637 (define-public python2-zope-proxy
8638 (package-with-python2 python-zope-proxy))
8639
8640 (define-public python-zope-location
8641 (package
8642 (name "python-zope-location")
8643 (version "4.0.3")
8644 (source
8645 (origin
8646 (method url-fetch)
8647 (uri (string-append "https://pypi.python.org/packages/source/z"
8648 "/zope.location/zope.location-" version ".tar.gz"))
8649 (sha256
8650 (base32
8651 "1nj9da4ksiyv3h8n2vpzwd0pb03mdsh7zy87hfpx72b6p2zcwg74"))))
8652 (build-system python-build-system)
8653 (arguments
8654 '(#:tests? #f)) ; FIXME: Tests can't find zope.interface.
8655 (propagated-inputs
8656 `(("python-zope-proxy" ,python-zope-proxy)
8657 ("python-zope-schema" ,python-zope-schema)))
8658 (home-page "http://pypi.python.org/pypi/zope.location/")
8659 (synopsis "Zope location library")
8660 (description "Zope.location implements the concept of \"locations\" in
8661 Zope3, which are are special objects that have a structural location.")
8662 (license license:zpl2.1)))
8663
8664 (define-public python2-zope-location
8665 (package-with-python2 python-zope-location))
8666
8667 (define-public python-zope-security
8668 (package
8669 (name "python-zope-security")
8670 (version "4.0.3")
8671 (source
8672 (origin
8673 (method url-fetch)
8674 (uri (string-append "https://pypi.python.org/packages/source/z"
8675 "/zope.security/zope.security-" version ".tar.gz"))
8676 (sha256
8677 (base32
8678 "14zmf684amc0x32kq05yxnhfqd1cmyhafkw05gn81rn90zjv6ssy"))))
8679 (build-system python-build-system)
8680 (arguments
8681 '(#:tests? #f)) ; FIXME: Tests can't find zope.testrunner.
8682 (propagated-inputs
8683 `(("python-zope-i18nmessageid" ,python-zope-i18nmessageid)
8684 ("python-zope-proxy" ,python-zope-proxy)
8685 ("python-zope-schema" ,python-zope-schema)))
8686 (native-inputs
8687 `(("python-six" ,python-six)
8688 ("python-zope-component" ,python-zope-component)
8689 ("python-zope-configuration" ,python-zope-configuration)
8690 ("python-zope-location" ,python-zope-location)
8691 ("python-zope-testrunner" ,python-zope-testrunner)
8692 ("python-zope-testing" ,python-zope-testing)))
8693 (home-page "http://pypi.python.org/pypi/zope.security")
8694 (synopsis "Zope security framework")
8695 (description "Zope.security provides a generic mechanism to implement
8696 security policies on Python objects.")
8697 (license license:zpl2.1)))
8698
8699 (define-public python2-zope-security
8700 (let ((zope-security (package-with-python2 python-zope-security)))
8701 (package (inherit zope-security)
8702 (propagated-inputs
8703 `(("python2-zope-testrunner" ,python2-zope-testrunner)
8704 ,@(alist-delete
8705 "python-zope-testrunner"
8706 (package-propagated-inputs zope-security)))))))
8707
8708 (define-public python-zope-component
8709 (package
8710 (name "python-zope-component")
8711 (version "4.3.0")
8712 (source
8713 (origin
8714 (method url-fetch)
8715 (uri (pypi-uri "zope.component" version))
8716 (sha256
8717 (base32
8718 "1hlvzwj1kcfz1qms1dzhwsshpsf38z9clmyksb1gh41n8k3kchdv"))))
8719 (build-system python-build-system)
8720 (arguments
8721 ;; Skip tests due to circular dependency with python-zope-security.
8722 '(#:tests? #f))
8723 (native-inputs
8724 `(("python-zope-testing" ,python-zope-testing)))
8725 (propagated-inputs
8726 `(("python-zope-event" ,python-zope-event)
8727 ("python-zope-interface" ,python-zope-interface)
8728 ("python-zope-i18nmessageid" ,python-zope-i18nmessageid)
8729 ("python-zope-configuration" ,python-zope-configuration)))
8730 (home-page "https://github.com/zopefoundation/zope.component")
8731 (synopsis "Zope Component Architecture")
8732 (description "Zope.component represents the core of the Zope Component
8733 Architecture. Together with the zope.interface package, it provides
8734 facilities for defining, registering and looking up components.")
8735 (license license:zpl2.1)))
8736
8737 (define-public python2-zope-component
8738 (package-with-python2 python-zope-component))
8739
8740 (define-public python-pythondialog
8741 (package
8742 (name "python-pythondialog")
8743 (version "3.4.0")
8744 (source
8745 (origin
8746 (method url-fetch)
8747 (uri (pypi-uri "pythondialog" version))
8748 (sha256
8749 (base32
8750 "1728ghsran47jczn9bhlnkvk5bvqmmbihabgif5h705b84r1272c"))))
8751 (build-system python-build-system)
8752 (arguments
8753 `(#:phases
8754 (modify-phases %standard-phases
8755 (add-after 'unpack 'patch-path
8756 (lambda* (#:key inputs #:allow-other-keys)
8757 (let* ((dialog (assoc-ref inputs "dialog")))
8758 ;; Since this library really wants to grovel the search path, we
8759 ;; must hardcode dialog's store path into it.
8760 (substitute* "dialog.py"
8761 (("os.getenv\\(\"PATH\", \":/bin:/usr/bin\"\\)")
8762 (string-append "os.getenv(\"PATH\") + \":" dialog "/bin\"")))
8763 #t))))
8764 #:tests? #f)) ; no test suite
8765 (propagated-inputs
8766 `(("dialog" ,dialog)))
8767 (home-page "http://pythondialog.sourceforge.net/")
8768 (synopsis "Python interface to the UNIX dialog utility")
8769 (description "A Python wrapper for the dialog utility. Its purpose is to
8770 provide an easy to use, pythonic and comprehensive Python interface to dialog.
8771 This allows one to make simple text-mode user interfaces on Unix-like systems")
8772 (license license:lgpl2.1)
8773 (properties `((python2-variant . ,(delay python2-pythondialog))))))
8774
8775 (define-public python2-pythondialog
8776 (let ((base (package-with-python2 (strip-python2-variant python-pythondialog))))
8777 (package
8778 (inherit base)
8779 (version (package-version python-pythondialog))
8780 (source (origin
8781 (method url-fetch)
8782 (uri (pypi-uri "python2-pythondialog" version))
8783 (sha256
8784 (base32
8785 "0d8k7lxk50imdyx85lv8j98i4c93a71iwpapnl1506rpkbm9qvd9")))))))
8786
8787 (define-public python-pyrfc3339
8788 (package
8789 (name "python-pyrfc3339")
8790 (version "1.0")
8791 (source
8792 (origin
8793 (method url-fetch)
8794 (uri (pypi-uri "pyRFC3339" version))
8795 (sha256
8796 (base32
8797 "0dgm4l9y8jiax5cp6yxjd2i27cq8h33sh81n1wfbmnmqb32cdywd"))))
8798 (build-system python-build-system)
8799 (propagated-inputs
8800 `(("python-pytz" ,python-pytz)))
8801 (native-inputs
8802 `(("python-nose" ,python-nose)))
8803 (home-page "https://github.com/kurtraschke/pyRFC3339")
8804 (synopsis "Python timestamp library")
8805 (description "Python library for generating and parsing RFC 3339-compliant
8806 timestamps.")
8807 (license license:expat)))
8808
8809 (define-public python2-pyrfc3339
8810 (package-with-python2 python-pyrfc3339))
8811
8812 (define-public python-werkzeug
8813 (package
8814 (name "python-werkzeug")
8815 (version "0.11.15")
8816 (source
8817 (origin
8818 (method url-fetch)
8819 (uri (pypi-uri "Werkzeug" version))
8820 (sha256
8821 (base32
8822 "1h5wycw8yj7q0grqsjnsqflmrlsdagvl2j4dsgdncci6mjc7fpa5"))))
8823 (build-system python-build-system)
8824 (native-inputs
8825 `(("python-pytest" ,python-pytest)))
8826 (home-page "http://werkzeug.pocoo.org/")
8827 (synopsis "Utilities for WSGI applications")
8828 (description "One of the most advanced WSGI utility modules. It includes a
8829 powerful debugger, full-featured request and response objects, HTTP utilities to
8830 handle entity tags, cache control headers, HTTP dates, cookie handling, file
8831 uploads, a powerful URL routing system and a bunch of community-contributed
8832 addon modules.")
8833 (license license:x11)))
8834
8835 (define-public python2-werkzeug
8836 (package-with-python2 python-werkzeug))
8837
8838 (define-public python-configobj
8839 (package
8840 (name "python-configobj")
8841 (version "5.0.6")
8842 (source (origin
8843 (method url-fetch)
8844 (uri (string-append
8845 "https://pypi.python.org/packages/source/c/configobj/"
8846 "configobj-" version ".tar.gz"))
8847 (sha256
8848 (base32
8849 "00h9rcmws03xvdlfni11yb60bz3kxfvsj6dg6nrpzj71f03nbxd2"))
8850 ;; Patch setup.py so it looks for python-setuptools, which is
8851 ;; required to parse the keyword 'install_requires' in setup.py.
8852 (patches (search-patches "python-configobj-setuptools.patch"))))
8853 (build-system python-build-system)
8854 (propagated-inputs
8855 `(("python-six" ,python-six)))
8856 (synopsis "Config file reading, writing and validation")
8857 (description "ConfigObj is a simple but powerful config file reader and
8858 writer: an ini file round tripper. Its main feature is that it is very easy to
8859 use, with a straightforward programmer’s interface and a simple syntax for
8860 config files.")
8861 (home-page "https://github.com/DiffSK/configobj")
8862 (license license:bsd-3)))
8863
8864 (define-public python2-configobj
8865 (package-with-python2 python-configobj))
8866
8867 (define-public python-configargparse
8868 (package
8869 (name "python-configargparse")
8870 (version "0.10.0")
8871 (source (origin
8872 (method url-fetch)
8873 (uri (string-append
8874 "https://pypi.python.org/packages/source/C/ConfigArgParse/"
8875 "ConfigArgParse-" version ".tar.gz"))
8876 (sha256
8877 (base32
8878 "19wh919gbdbzxzpagg52q3lm62yicm95ddlcx77dyjc1slyshl1v"))))
8879 (build-system python-build-system)
8880 (arguments
8881 ;; FIXME: Bug in test suite filed upstream:
8882 ;; https://github.com/bw2/ConfigArgParse/issues/32
8883 '(#:tests? #f))
8884 (synopsis "Replacement for argparse")
8885 (description "A drop-in replacement for argparse that allows options to also
8886 be set via config files and/or environment variables.")
8887 (home-page "https://github.com/bw2/ConfigArgParse")
8888 (license license:expat)))
8889
8890 (define-public python2-configargparse
8891 (package-with-python2 python-configargparse))
8892
8893 (define-public python-ndg-httpsclient
8894 (package
8895 (name "python-ndg-httpsclient")
8896 (version "0.4.2")
8897 (source (origin
8898 (method url-fetch)
8899 (uri (pypi-uri "ndg_httpsclient" version))
8900 (sha256
8901 (base32
8902 "1b5qirv46v4dpnmfqviwq42mdwfcby4dxmz0i41wad2337pqf2aq"))))
8903 (build-system python-build-system)
8904 (arguments
8905 '(;; The tests appear to require networking.
8906 #:tests? #f))
8907 (propagated-inputs
8908 `(("python-pyopenssl" ,python-pyopenssl)))
8909 (synopsis "HTTPS support for Python's httplib and urllib2")
8910 (description "This is a HTTPS client implementation for httplib and urllib2
8911 based on PyOpenSSL. PyOpenSSL provides a more fully featured SSL implementation
8912 over the default provided with Python and importantly enables full verification
8913 of the SSL peer.")
8914 (home-page "https://github.com/cedadev/ndg_httpsclient/")
8915 (license license:bsd-3)))
8916
8917 ;; python2-openssl requires special care, so package-with-python2 is
8918 ;; insufficient.
8919 (define-public python2-ndg-httpsclient
8920 (package (inherit python-ndg-httpsclient)
8921 (name "python2-ndg-httpsclient")
8922 (arguments `(#:python ,python-2))
8923 (propagated-inputs
8924 `(("python2-pyopenssl" ,python2-pyopenssl)))))
8925
8926 (define-public python-contextlib2
8927 (package
8928 (name "python-contextlib2")
8929 (version "0.4.0")
8930 (source
8931 (origin
8932 (method url-fetch)
8933 (uri (pypi-uri "contextlib2" version))
8934 (sha256
8935 (base32
8936 "0cmp131dlh0d0zvw0aza1zd13glvngzk8lb4avks0hm7yxwdr9am"))))
8937 (build-system python-build-system)
8938 (arguments
8939 `(#:phases
8940 (modify-phases %standard-phases
8941 (replace 'check
8942 (lambda _ (zero?
8943 (system*
8944 "python" "test_contextlib2.py" "-v")))))))
8945 (home-page "http://contextlib2.readthedocs.org/")
8946 (synopsis "Tools for decorators and context managers")
8947 (description "This module is primarily a backport of the Python
8948 3.2 contextlib to earlier Python versions. Like contextlib, it
8949 provides utilities for common tasks involving decorators and context
8950 managers. It also contains additional features that are not part of
8951 the standard library.")
8952 (license license:psfl)))
8953
8954 (define-public python2-contextlib2
8955 (package-with-python2 python-contextlib2))
8956
8957 (define-public python-texttable
8958 (package
8959 (name "python-texttable")
8960 (version "0.8.7")
8961 (source
8962 (origin
8963 (method url-fetch)
8964 (uri (pypi-uri "texttable" version))
8965 (sha256
8966 (base32
8967 "1liiiydgkg37i46a418aw19fyf6z3ds51wdwwpyjbs12x0phhf4a"))))
8968 (build-system python-build-system)
8969 (arguments '(#:tests? #f)) ; no tests
8970 (home-page "https://github.com/foutaise/texttable/")
8971 (synopsis "Python module for creating simple ASCII tables")
8972 (description "Texttable is a Python module for creating simple ASCII
8973 tables.")
8974 (license license:lgpl2.1+)))
8975
8976 (define-public python2-texttable
8977 (package-with-python2 python-texttable))
8978
8979 (define-public python-websocket-client
8980 (package
8981 (name "python-websocket-client")
8982 (version "0.37.0")
8983 (source
8984 (origin
8985 (method url-fetch)
8986 (uri (pypi-uri "websocket_client" version))
8987 (sha256
8988 (base32
8989 "0h9glp1jll3z76ly3kg08aqgxqk0a68p4zi9yn50353bh5nj92v7"))))
8990 (build-system python-build-system)
8991 (propagated-inputs
8992 `(("python-six" ,python-six)))
8993 (home-page "https://github.com/liris/websocket-client")
8994 (synopsis "WebSocket client for Python")
8995 (description "The Websocket-client module provides the low level APIs for
8996 WebSocket usage in Python programs.")
8997 (license license:lgpl2.1+)))
8998
8999 (define-public python2-websocket-client
9000 (package-with-python2 python-websocket-client))
9001
9002 (define-public python-atomicwrites
9003 (package
9004 (name "python-atomicwrites")
9005 (version "1.1.5")
9006 (source (origin
9007 (method url-fetch)
9008 (uri (pypi-uri "atomicwrites" version))
9009 (sha256
9010 (base32
9011 "11bm90fwm2avvf4f3ib8g925w7jr4m11vcsinn1bi6ns4bm32214"))))
9012 (build-system python-build-system)
9013 (synopsis "Atomic file writes in Python")
9014 (description "Library for atomic file writes using platform dependent tools
9015 for atomic file system operations.")
9016 (home-page "https://github.com/untitaker/python-atomicwrites")
9017 (license license:expat)))
9018
9019 (define-public python2-atomicwrites
9020 (package-with-python2 python-atomicwrites))
9021
9022 (define-public python-requests-toolbelt
9023 (package
9024 (name "python-requests-toolbelt")
9025 (version "0.6.2")
9026 (source (origin
9027 (method url-fetch)
9028 (uri (string-append
9029 "https://pypi.python.org/packages/"
9030 "e1/a4/a94c037bc72ad70441aff1403d3243510d2542ddca7759faaeffeb11aefe/"
9031 "requests-toolbelt-" version ".tar.gz"))
9032 (sha256
9033 (base32
9034 "15q9nrgp85nqlr4kdz1zvj8z2npafi2sr12y7fqgxbkq28j1aci6"))))
9035 (build-system python-build-system)
9036 (native-inputs
9037 `(("python-betamax" ,python-betamax)
9038 ("python-mock" ,python-mock)
9039 ("python-pytest" ,python-pytest)))
9040 (propagated-inputs
9041 `(("python-requests" ,python-requests)))
9042 (synopsis "Extensions to python-requests")
9043 (description "This is a toolbelt of useful classes and functions to be used
9044 with python-requests.")
9045 (home-page "https://github.com/sigmavirus24/requests-toolbelt")
9046 (license license:asl2.0)))
9047
9048 (define-public python-click-threading
9049 (package
9050 (name "python-click-threading")
9051 (version "0.2.0")
9052 (source (origin
9053 (method url-fetch)
9054 (uri (string-append
9055 "https://pypi.python.org/packages/"
9056 "fe/b7/e7f609d18a2a351cb71616adcf54df1acd82f83cb9b5936935a4d20e2c23/"
9057 "click-threading-" version ".tar.gz"))
9058 (sha256
9059 (base32
9060 "18bcqikxwb3drb8rf60cclxkxw52521b38ax3byah6j8cn8y9p4j"))))
9061 (build-system python-build-system)
9062 (propagated-inputs
9063 `(("python-click" ,python-click)))
9064 (synopsis "Utilities for multithreading in Click")
9065 (description "This package provides utilities for multithreading in Click
9066 applications.")
9067 (home-page "https://github.com/click-contrib/click-threading")
9068 (license license:expat)))
9069
9070 (define-public python-click-log
9071 (package
9072 (name "python-click-log")
9073 (version "0.1.8")
9074 (source (origin
9075 (method url-fetch)
9076 (uri (pypi-uri "click-log" version))
9077 (sha256
9078 (base32
9079 "14ikfjfgnzf21mjniq9lfk2igzykgzfvwwrk85nw2b9fq44109sp"))))
9080 (build-system python-build-system)
9081 (propagated-inputs
9082 `(("python-click" ,python-click)))
9083 (synopsis "Logging for click applications")
9084 (description "This package provides a Python library for logging Click
9085 applications.")
9086 (home-page "https://github.com/click-contrib/click-log")
9087 (license license:expat)))
9088
9089 (define-public python-apipkg
9090 (package
9091 (name "python-apipkg")
9092 (version "1.4")
9093 (source (origin
9094 (method url-fetch)
9095 (uri (pypi-uri "apipkg" version))
9096 (sha256
9097 (base32
9098 "1iks5701qnp3dlr3q1d9qm68y2plp2m029irhpz92a44psfkjf1f"))))
9099 (build-system python-build-system)
9100 (native-inputs
9101 `(("python-pytest" ,python-pytest)))
9102 (synopsis "Namespace control and lazy-import mechanism")
9103 (description "With apipkg you can control the exported namespace of a Python
9104 package and greatly reduce the number of imports for your users. It is a small
9105 pure Python module that works on virtually all Python versions.")
9106 (home-page "https://bitbucket.org/hpk42/apipkg")
9107 (license license:expat)))
9108
9109 (define-public python2-apipkg
9110 (package-with-python2 python-apipkg))
9111
9112 (define-public python-execnet
9113 (package
9114 (name "python-execnet")
9115 (version "1.4.1")
9116 (source (origin
9117 (method url-fetch)
9118 (uri (pypi-uri "execnet" version))
9119 (sha256
9120 (base32
9121 "1rpk1vyclhg911p3hql0m0nrpq7q7mysxnaaw6vs29cpa6kx8vgn"))))
9122 (build-system python-build-system)
9123 (arguments
9124 `(;; 2 failed, 275 passed, 670 skipped, 4 xfailed
9125 ;; The two test failures are caused by the lack of an `ssh` executable.
9126 ;; The test suite can be run with pytest after the 'install' phase.
9127 #:tests? #f))
9128 (native-inputs
9129 `(("python-pytest" ,python-pytest)
9130 ("python-setuptools-scm" ,python-setuptools-scm)))
9131 (propagated-inputs
9132 `(("python-apipkg" ,python-apipkg)))
9133 (synopsis "Rapid multi-Python deployment")
9134 (description "Execnet provides a share-nothing model with
9135 channel-send/receive communication for distributing execution across many
9136 Python interpreters across version, platform and network barriers. It has a
9137 minimal and fast API targeting the following uses:
9138 @enumerate
9139 @item distribute tasks to (many) local or remote CPUs
9140 @item write and deploy hybrid multi-process applications
9141 @item write scripts to administer multiple environments
9142 @end enumerate")
9143 (home-page "http://codespeak.net/execnet/")
9144 (license license:expat)))
9145
9146 (define-public python2-execnet
9147 (package-with-python2 python-execnet))
9148
9149 (define-public python-trollius-redis
9150 (package
9151 (name "python-trollius-redis")
9152 (version "0.1.4")
9153 (source
9154 (origin
9155 (method url-fetch)
9156 (uri (pypi-uri "trollius_redis" version))
9157 (sha256
9158 (base32
9159 "0k3vypszmgmaipgw9xscvgm79h2zd6p6ci8gdp5sxl6g5kbqr9fy"))))
9160 (build-system python-build-system)
9161 ;; TODO: Tests require packaging 'hiredis'.
9162 (arguments '(#:tests? #f))
9163 (home-page "https://github.com/benjolitz/trollius-redis")
9164 (synopsis "Port of asyncio-redis to trollius")
9165 (description "@code{trollius-redis} is a Redis client for Python
9166 trollius. It is an asynchronious IO (PEP 3156) implementation of the
9167 Redis protocol.")
9168 (license license:bsd-2)))
9169
9170 (define-public python2-trollius-redis
9171 (package-with-python2 python-trollius-redis))
9172
9173 ;;; The software provided by this package was integrated into pytest 2.8.
9174 (define-public python-pytest-cache
9175 (package
9176 (name "python-pytest-cache")
9177 (version "1.0")
9178 (source (origin
9179 (method url-fetch)
9180 (uri (pypi-uri "pytest-cache" version))
9181 (sha256
9182 (base32
9183 "1a873fihw4rhshc722j4h6j7g3nj7xpgsna9hhg3zn6ksknnhx5y"))))
9184 (build-system python-build-system)
9185 (propagated-inputs
9186 `(("python-apipkg" ,python-apipkg)
9187 ("python-execnet" ,python-execnet)
9188 ("python-py" ,python-py)
9189 ("python-pytest" ,python-pytest)))
9190 (synopsis "Py.test plugin with mechanisms for caching across test runs")
9191 (description "The pytest-cache plugin provides tools to rerun failures from
9192 the last py.test invocation.")
9193 (home-page "https://bitbucket.org/hpk42/pytest-cache/")
9194 (license license:expat)))
9195
9196 (define-public python2-pytest-cache
9197 (package-with-python2 python-pytest-cache))
9198
9199 (define-public python-pytest-localserver
9200 (package
9201 (name "python-pytest-localserver")
9202 (version "0.3.5")
9203 (source (origin
9204 (method url-fetch)
9205 (uri (pypi-uri "pytest-localserver" version))
9206 (sha256
9207 (base32
9208 "0dvqspjr6va55zwmnnc2mmpqc7mm65kxig9ya44x1z8aadzxpa4p"))))
9209 (build-system python-build-system)
9210 (arguments
9211 `(#:phases (modify-phases %standard-phases
9212 (replace 'check
9213 (lambda _
9214 (zero? (system* "py.test" "--genscript=runtests.py"))
9215 (zero? (system* "py.test")))))))
9216 (native-inputs
9217 `(("python-pytest" ,python-pytest)
9218 ("python-requests" ,python-requests)
9219 ("python-six" ,python-six)))
9220 (propagated-inputs
9221 `(("python-werkzeug" ,python-werkzeug)))
9222 (synopsis "Py.test plugin to test server connections locally")
9223 (description "Pytest-localserver is a plugin for the pytest testing
9224 framework which enables you to test server connections locally.")
9225 (home-page "https://pypi.python.org/pypi/pytest-localserver")
9226 (license license:expat)))
9227
9228 (define-public python-wsgi-intercept
9229 (package
9230 (name "python-wsgi-intercept")
9231 (version "1.2.2")
9232 (source (origin
9233 (method url-fetch)
9234 (uri (string-append
9235 "https://pypi.python.org/packages/"
9236 "38/76/ebcbc24d0cb77db34520a3ca6ed1bd43ace17d182bbd8dd7d976f1c176fb/"
9237 "wsgi_intercept-" version ".tar.gz"))
9238 (sha256
9239 (base32
9240 "0kjj2v2dvmnpdd5h5gk9rzz0f54rhjb0yiz3zg65bmp65slfw65d"))))
9241 (build-system python-build-system)
9242 (propagated-inputs
9243 `(("python-six" ,python-six)))
9244 (native-inputs
9245 `(("python-pytest" ,python-pytest)
9246 ("python-httplib2" ,python-httplib2)
9247 ("python-requests" ,python-requests)
9248 ("python-urllib3" ,python-urllib3)))
9249 (synopsis "Puts a WSGI application in place of a real URI for testing")
9250 (description "Wsgi_intercept installs a WSGI application in place of a real
9251 URI for testing. Testing a WSGI application normally involves starting a
9252 server at a local host and port, then pointing your test code to that address.
9253 Instead, this library lets you intercept calls to any specific host/port
9254 combination and redirect them into a WSGI application importable by your test
9255 program. Thus, you can avoid spawning multiple processes or threads to test
9256 your Web app.")
9257 (home-page "https://github.com/cdent/wsgi-intercept")
9258 (license license:expat)))
9259
9260 (define-public python-pytest-xprocess
9261 (package
9262 (name "python-pytest-xprocess")
9263 (version "0.9.1")
9264 (source (origin
9265 (method url-fetch)
9266 (uri (pypi-uri "pytest-xprocess" version))
9267 (sha256
9268 (base32
9269 "17zlql1xqw3ywcgwwbqmw633aly99lab12hm02asr8awvg5603pp"))))
9270 (build-system python-build-system)
9271 (propagated-inputs
9272 `(("python-pytest" ,python-pytest)
9273 ("python-pytest-cache" ,python-pytest-cache)
9274 ("python-psutil" ,python-psutil)))
9275 (synopsis "Pytest plugin to manage external processes across test runs")
9276 (description "Pytest-xprocess is an experimental py.test plugin for managing
9277 processes across test runs.")
9278 (home-page "https://bitbucket.org/pytest-dev/pytest-xprocess")
9279 (license license:expat)))
9280
9281 (define-public python-icalendar
9282 (package
9283 (name "python-icalendar")
9284 (version "3.11.6")
9285 (source (origin
9286 (method url-fetch)
9287 (uri (pypi-uri "icalendar" version))
9288 (sha256
9289 (base32
9290 "1ny9mbm9zgghl612b8wc4ap52bz3kgl486d7f307gxjmlqgz3i64"))))
9291 (build-system python-build-system)
9292 (propagated-inputs
9293 `(("python-dateutil" ,python-dateutil)
9294 ("python-pytz" ,python-pytz)))
9295 (synopsis "Python library for parsing iCalendar files")
9296 (description "The icalendar package is a parser/generator of iCalendar
9297 files for use with Python.")
9298 (home-page "https://github.com/collective/icalendar")
9299 (license license:bsd-2)))
9300
9301 (define-public python-sphinxcontrib-newsfeed
9302 (package
9303 (name "python-sphinxcontrib-newsfeed")
9304 (version "0.1.4")
9305 (source (origin
9306 (method url-fetch)
9307 (uri (pypi-uri "sphinxcontrib-newsfeed" version))
9308 (sha256
9309 (base32
9310 "1d7gam3mn8v4in4p16yn3v10vps7nnaz6ilw99j4klij39dqd37p"))))
9311 (arguments '(#:tests? #f)) ; No tests.
9312 (build-system python-build-system)
9313 (propagated-inputs
9314 `(("python-sphinx" ,python-sphinx)))
9315 (synopsis "News Feed extension for Sphinx")
9316 (description "Sphinxcontrib-newsfeed is an extension for adding a simple
9317 Blog, News or Announcements section to a Sphinx website.")
9318 (home-page "https://bitbucket.org/prometheus/sphinxcontrib-newsfeed")
9319 (license license:bsd-2)))
9320
9321 (define-public python-args
9322 (package
9323 (name "python-args")
9324 (version "0.1.0")
9325 (source (origin
9326 (method url-fetch)
9327 (uri (pypi-uri "args" version))
9328 (sha256
9329 (base32
9330 "057qzi46h5dmxdqknsbrssn78lmqjlnm624iqdhrnpk26zcbi1d7"))))
9331 (build-system python-build-system)
9332 (home-page "https://github.com/kennethreitz/args")
9333 (synopsis "Command-line argument parser")
9334 (description
9335 "This library provides a Python module to parse command-line arguments.")
9336 (license license:bsd-3)))
9337
9338 (define-public python2-args
9339 (package-with-python2 python-args))
9340
9341 (define-public python-clint
9342 (package
9343 (name "python-clint")
9344 (version "0.5.1")
9345 (source (origin
9346 (method url-fetch)
9347 (uri (pypi-uri "clint" version))
9348 (sha256
9349 (base32
9350 "1an5lkkqk1zha47198p42ji3m94xmzx1a03dn7866m87n4r4q8h5"))))
9351 (build-system python-build-system)
9352 (arguments
9353 '(#:phases
9354 (modify-phases %standard-phases
9355 (replace 'check
9356 (lambda _
9357 (zero? (system* "py.test" "-v")))))))
9358 (native-inputs
9359 `(("python-pytest" ,python-pytest)))
9360 (propagated-inputs
9361 `(("python-args" ,python-args)))
9362 (home-page "https://github.com/kennethreitz/clint")
9363 (synopsis "Command-line interface tools")
9364 (description
9365 "Clint is a Python module filled with a set of tools for developing
9366 command-line applications, including tools for colored and indented
9367 output, progress bar display, and pipes.")
9368 (license license:isc)))
9369
9370 (define-public python2-clint
9371 (package-with-python2 python-clint))
9372
9373 (define-public python-astor
9374 (package
9375 (name "python-astor")
9376 (version "0.5")
9377 (source (origin
9378 (method url-fetch)
9379 (uri (pypi-uri "astor" version))
9380 (sha256
9381 (base32
9382 "1fdafq5hkis1fxqlmhw0sn44zp2ar46nxhbc22cvwg7hsd8z5gsa"))))
9383 (build-system python-build-system)
9384 (home-page "https://github.com/berkerpeksag/astor")
9385 (synopsis "Read and write Python ASTs")
9386 (description
9387 "Astor is designed to allow easy manipulation of Python source via the
9388 Abstract Syntax Tree.")
9389 (license license:bsd-3)))
9390
9391 (define-public python2-astor
9392 (package-with-python2 python-astor))
9393
9394 (define-public python-rply
9395 (package
9396 (name "python-rply")
9397 (version "0.7.4")
9398 (source (origin
9399 (method url-fetch)
9400 (uri (pypi-uri "rply" version))
9401 (sha256
9402 (base32
9403 "12rp1d9ba7nvd5rhaxi6xzx1rm67r1k1ylsrkzhpwnphqpb06cvj"))))
9404 (build-system python-build-system)
9405 (propagated-inputs
9406 `(("python-appdirs" ,python-appdirs)))
9407 (home-page "https://github.com/alex/rply")
9408 (synopsis "Parser generator for Python")
9409 (description
9410 "This package provides a pure Python based parser generator, that also
9411 works with RPython. It is a more-or-less direct port of David Bazzley's PLY,
9412 with a new public API, and RPython support.")
9413 (license license:bsd-3)))
9414
9415 (define-public python2-rply
9416 (package-with-python2 python-rply))
9417
9418 (define-public python-hy
9419 (package
9420 (name "python-hy")
9421 (version "0.11.1")
9422 (source (origin
9423 (method url-fetch)
9424 (uri (pypi-uri "hy" version))
9425 (sha256
9426 (base32
9427 "1msqv747iz12r73mz4qvsmlwkddwjvrahlrk7ysrcz07h7dsscxs"))))
9428 (build-system python-build-system)
9429 (arguments
9430 '(#:phases
9431 (modify-phases %standard-phases
9432 (replace 'check
9433 (lambda _
9434 ;; Tests require write access to HOME.
9435 (setenv "HOME" "/tmp")
9436 (zero? (system* "nosetests")))))))
9437 (native-inputs
9438 `(("python-coverage" ,python-coverage)
9439 ("python-nose" ,python-nose)))
9440 (propagated-inputs
9441 `(("python-astor" ,python-astor)
9442 ("python-clint" ,python-clint)
9443 ("python-rply" ,python-rply)))
9444 (home-page "http://hylang.org/")
9445 (synopsis "Lisp frontend to Python")
9446 (description
9447 "Hy is a dialect of Lisp that's embedded in Python. Since Hy transforms
9448 its Lisp code into the Python Abstract Syntax Tree, you have the whole world of
9449 Python at your fingertips, in Lisp form.")
9450 (license license:expat)))
9451
9452 (define-public python2-hy
9453 (package-with-python2 python-hy))
9454
9455 (define-public python-rauth
9456 (package
9457 (name "python-rauth")
9458 (version "0.7.3")
9459 (source
9460 (origin
9461 (method url-fetch)
9462 (uri (pypi-uri "rauth" version))
9463 (sha256
9464 (base32
9465 "02kv8w8l98ky223avyq7vw7x1f2ya9chrm59r77ylq45qb0xnk2j"))))
9466 (build-system python-build-system)
9467 (arguments
9468 `(#:test-target "check"))
9469 (propagated-inputs
9470 `(("python-requests" ,python-requests)))
9471 (home-page "https://github.com/litl/rauth")
9472 (synopsis "Python library for OAuth 1.0/a, 2.0, and Ofly")
9473 (description
9474 "Rauth is a Python library for OAuth 1.0/a, 2.0, and Ofly. It also
9475 provides service wrappers for convenient connection initialization and
9476 authenticated session objects providing things like keep-alive.")
9477 (license license:expat)
9478 (properties `((python2-variant . ,(delay python2-rauth))))))
9479
9480 (define-public python2-rauth
9481 (let ((base (package-with-python2 (strip-python2-variant python-rauth))))
9482 (package
9483 (inherit base)
9484 (native-inputs `(("python2-unittest2" ,python2-unittest2)
9485 ,@(package-native-inputs base))))))
9486
9487 (define-public python2-functools32
9488 (package
9489 (name "python2-functools32")
9490 (version "3.2.3-2")
9491 (source
9492 (origin
9493 (method url-fetch)
9494 (uri (pypi-uri "functools32" version))
9495 (sha256
9496 (base32
9497 "0v8ya0b58x47wp216n1zamimv4iw57cxz3xxhzix52jkw3xks9gn"))))
9498 (build-system python-build-system)
9499 (arguments
9500 `(#:python ,python-2
9501 #:tests? #f)) ; no test target
9502 (home-page "https://github.com/MiCHiLU/python-functools32")
9503 (synopsis
9504 "Backport of the functools module from Python 3.2.3")
9505 (description
9506 "This package is a backport of the @code{functools} module from Python
9507 3.2.3 for use with older versions of Python and PyPy.")
9508 (license license:expat)))
9509
9510 (define-public python2-subprocess32
9511 (package
9512 (name "python2-subprocess32")
9513 (version "3.2.7")
9514 (source (origin
9515 (method url-fetch)
9516 (uri (pypi-uri "subprocess32" version))
9517 (sha256
9518 (base32
9519 "14350dhhlhyz5gqzi3lihn9m6lvskx5mcb20srx1kgsk9i50li8y"))
9520 (patches
9521 (search-patches "python2-subprocess32-disable-input-test.patch"))))
9522 (build-system python-build-system)
9523 (arguments
9524 `(#:python ,python-2
9525 #:phases
9526 (modify-phases %standard-phases
9527 (add-after 'unpack 'patch-/bin/sh
9528 (lambda _
9529 (substitute* '("subprocess32.py"
9530 "test_subprocess32.py")
9531 (("/bin/sh") (which "sh")))
9532 #t))
9533 (delete 'check)
9534 (add-after 'install 'check
9535 (lambda* (#:key inputs outputs #:allow-other-keys)
9536 ;; For some reason this package fails to import
9537 ;; _posixsubprocess.so when PYTHONPATH is set to the build
9538 ;; directory. Running tests after install is easier.
9539 (add-installed-pythonpath inputs outputs)
9540 (zero? (system* "python" "test_subprocess32.py")))))))
9541 (home-page "https://github.com/google/python-subprocess32")
9542 (synopsis "Backport of the subprocess module from Python 3.2")
9543 (description
9544 "This is a backport of the @code{subprocess} standard library module
9545 from Python 3.2 and 3.3 for use on Python 2. It includes bugfixes and some
9546 new features. On POSIX systems it is guaranteed to be reliable when used
9547 in threaded applications. It includes timeout support from Python 3.3 but
9548 otherwise matches 3.2’s API.")
9549 (license license:psfl)))
9550
9551 (define-public python2-futures
9552 (package
9553 (name "python2-futures")
9554 (version "3.0.5")
9555 (source
9556 (origin
9557 (method url-fetch)
9558 (uri (pypi-uri "futures" version))
9559 (sha256
9560 (base32
9561 "1pw1z4329xvlabdpwqa6b7v2fxf7hl64m4cgr22ckbym8m8m4hh5"))))
9562 (build-system python-build-system)
9563 (arguments `(#:python ,python-2))
9564 (home-page "https://github.com/agronholm/pythonfutures")
9565 (synopsis
9566 "Backport of the concurrent.futures package from Python 3.2")
9567 (description
9568 "The concurrent.futures module provides a high-level interface for
9569 asynchronously executing callables. This package backports the
9570 concurrent.futures package from Python 3.2")
9571 (license license:bsd-3)))
9572
9573 (define-public python-promise
9574 (package
9575 (name "python-promise")
9576 (version "0.4.2")
9577 (source
9578 (origin
9579 (method url-fetch)
9580 (uri (pypi-uri "promise" version))
9581 (sha256
9582 (base32
9583 "1k19ms8l3d5jzjh557rgkxb5sg4mqgfc315rn4hx1z3n8qq6lr3h"))))
9584 (build-system python-build-system)
9585 ;; Tests wants python-futures, which is a python2 only program, and
9586 ;; can't be found by python-promise at test time.
9587 (arguments `(#:tests? #f))
9588 (home-page "https://github.com/syrusakbary/promise")
9589 (synopsis "Promises/A+ implementation for Python")
9590 (description
9591 "Promises/A+ implementation for Python")
9592 (properties `((python2-variant . ,(delay python2-promise))))
9593 (license license:expat)))
9594
9595 (define-public python2-promise
9596 (let ((promise (package-with-python2
9597 (strip-python2-variant python-promise))))
9598 (package (inherit promise)
9599 (arguments (substitute-keyword-arguments (package-arguments promise)
9600 ((#:tests? _) #t)))
9601 (native-inputs
9602 `(("python2-futures" ,python2-futures)
9603 ("python2-pytest" ,python2-pytest)
9604 ,@(package-native-inputs promise))))))
9605
9606 (define-public python-urllib3
9607 (package
9608 (name "python-urllib3")
9609 (version "1.18.1")
9610 (source
9611 (origin
9612 (method url-fetch)
9613 (uri (pypi-uri "urllib3" version))
9614 (sha256
9615 (base32
9616 "1wb8aqnq53vzh2amrv8kc66f3h6fx217y0q62y6n30a64p2yqmam"))))
9617 (build-system python-build-system)
9618 (arguments `(#:tests? #f))
9619 (native-inputs
9620 `(;; some packages for tests
9621 ("python-nose" ,python-nose)
9622 ("python-mock" ,python-mock)
9623 ("python-tornado" ,python-tornado)))
9624 (propagated-inputs
9625 `(;; extra packages for https security
9626 ("python-certifi" ,python-certifi)
9627 ("python-ndg-httpsclient" ,python-ndg-httpsclient)
9628 ("python-pyasn1" ,python-pyasn1)
9629 ("python-pyopenssl" ,python-pyopenssl)))
9630 (home-page "https://urllib3.readthedocs.org/")
9631 (synopsis "HTTP library with thread-safe connection pooling")
9632 (description
9633 "Urllib3 supports features left out of urllib and urllib2 libraries. It
9634 can reuse the same socket connection for multiple requests, it can POST files,
9635 supports url redirection and retries, and also gzip and deflate decoding.")
9636 (license license:expat)))
9637
9638 (define-public python2-urllib3
9639 (package-with-python2 python-urllib3))
9640
9641 (define-public python-colorama
9642 (package
9643 (name "python-colorama")
9644 (version "0.3.7")
9645 (source
9646 (origin
9647 (method url-fetch)
9648 (uri (pypi-uri "colorama" version))
9649 (sha256
9650 (base32
9651 "0avqkn6362v7k2kg3afb35g4sfdvixjgy890clip4q174p9whhz0"))))
9652 (build-system python-build-system)
9653 (synopsis "Colored terminal text rendering for Python")
9654 (description "Colorama is a Python library for rendering colored terminal
9655 text.")
9656 (home-page "https://pypi.python.org/pypi/colorama")
9657 (license license:bsd-3)))
9658
9659 (define-public python2-colorama
9660 (package-with-python2 python-colorama))
9661
9662 (define-public python-rsa
9663 (package
9664 (name "python-rsa")
9665 (version "3.4.2")
9666 (source
9667 (origin
9668 (method url-fetch)
9669 (uri (pypi-uri "rsa" version))
9670 (sha256
9671 (base32
9672 "1dcxvszbikgzh99ybdc7jq0zb9wspy2ds8z9mjsqiyv3q884xpr5"))))
9673 (build-system python-build-system)
9674 (propagated-inputs
9675 `(("python-pyasn1" ,python-pyasn1)))
9676 (synopsis "Pure-Python RSA implementation")
9677 (description "Python-RSA is a pure-Python RSA implementation. It supports
9678 encryption and decryption, signing and verifying signatures, and key
9679 generation according to PKCS#1 version 1.5. It can be used as a Python
9680 library as well as on the command line.")
9681 (home-page "http://stuvel.eu/rsa")
9682 (license license:asl2.0)))
9683
9684 (define-public python2-rsa
9685 (package-with-python2 python-rsa))
9686
9687 (define-public python-pluggy
9688 (package
9689 (name "python-pluggy")
9690 (version "0.3.1")
9691 (source
9692 (origin
9693 (method url-fetch)
9694 (uri (pypi-uri "pluggy" version))
9695 (sha256
9696 (base32
9697 "18qfzfm40bgx672lkg8q9x5hdh76n7vax99aank7vh2nw21wg70m"))))
9698 (build-system python-build-system)
9699 (synopsis "Plugin and hook calling mechanism for Python")
9700 (description "Pluggy is an extraction of the plugin manager as used by
9701 Pytest but stripped of Pytest specific details.")
9702 (home-page "https://pypi.python.org/pypi/pluggy")
9703 (license license:expat)))
9704
9705 (define-public python2-pluggy
9706 (package-with-python2 python-pluggy))
9707
9708 (define-public python-tox
9709 (package
9710 (name "python-tox")
9711 (version "2.3.1")
9712 (source
9713 (origin
9714 (method url-fetch)
9715 (uri (pypi-uri "tox" version))
9716 (sha256
9717 (base32
9718 "1vj73ar4rimq3fwy5r2z3jv4g9qbh8rmpmncsc00g0k310acqzxz"))))
9719 (build-system python-build-system)
9720 (arguments
9721 ;; FIXME: Tests require pytest-timeout, which itself requires
9722 ;; pytest>=2.8.0 for installation.
9723 '(#:tests? #f))
9724 (propagated-inputs
9725 `(("python-pluggy" ,python-pluggy) ; >=0.3.0,<0.4.0
9726 ("python-py" ,python-py)
9727 ("python-virtualenv" ,python-virtualenv)))
9728 (native-inputs
9729 `(; FIXME: Missing: ("python-pytest-timeout" ,python-pytest-timeout)
9730 ("python-pytest" ,python-pytest))) ; >= 2.3.5
9731 (home-page "http://tox.testrun.org/")
9732 (synopsis "Virtualenv-based automation of test activities")
9733 (description "Tox is a generic virtualenv management and test command line
9734 tool. It can be used to check that a package installs correctly with
9735 different Python versions and interpreters, or run tests in each type of
9736 supported environment, or act as a frontend to continuous integration
9737 servers.")
9738 (license license:expat)))
9739
9740 (define-public python2-tox
9741 (package-with-python2 python-tox))
9742
9743 (define-public python-jmespath
9744 (package
9745 (name "python-jmespath")
9746 (version "0.9.0")
9747 (source
9748 (origin
9749 (method url-fetch)
9750 (uri (pypi-uri "jmespath" version))
9751 (sha256
9752 (base32
9753 "0g9xvl69y7nr3w7ag4fsp6sm4fqf6vrqjw7504x2hzrrsh3ampq8"))))
9754 (build-system python-build-system)
9755 (native-inputs
9756 `(("python-nose" ,python-nose)))
9757 (synopsis "JSON Matching Expressions")
9758 (description "JMESPath (pronounced “james path”) is a Python library that
9759 allows one to declaratively specify how to extract elements from a JSON
9760 document.")
9761 (home-page "https://github.com/jmespath/jmespath.py")
9762 (license license:expat)))
9763
9764 (define-public python2-jmespath
9765 (package-with-python2 python-jmespath))
9766
9767 (define-public python-botocore
9768 (package
9769 (name "python-botocore")
9770 (version "1.5.26")
9771 (source
9772 (origin
9773 (method url-fetch)
9774 (uri (pypi-uri "botocore" version))
9775 (sha256
9776 (base32
9777 "1b7l48hr88galrrc5q6k21z3sdadzxc87ppzs7k9fz4p1w8bfnvb"))))
9778 (build-system python-build-system)
9779 (arguments
9780 ;; FIXME: Many tests are failing.
9781 '(#:tests? #f))
9782 (propagated-inputs
9783 `(("python-dateutil" ,python-dateutil)
9784 ("python-docutils" ,python-docutils)
9785 ("python-jmespath" ,python-jmespath)))
9786 (native-inputs
9787 `(("python-mock" ,python-mock)
9788 ("python-nose" ,python-nose)
9789 ("behave" ,behave)
9790 ("python-tox" ,python-tox)
9791 ("python-wheel" ,python-wheel)))
9792 (home-page "https://github.com/boto/botocore")
9793 (synopsis "Low-level interface to AWS")
9794 (description "Botocore is a Python library that provides a low-level
9795 interface to the Amazon Web Services (AWS) API.")
9796 (license license:asl2.0)))
9797
9798 (define-public python2-botocore
9799 (package-with-python2 python-botocore))
9800
9801 (define-public awscli
9802 (package
9803 (name "awscli")
9804 (version "1.11.63")
9805 (source
9806 (origin
9807 (method url-fetch)
9808 (uri (pypi-uri name version))
9809 (sha256
9810 (base32
9811 "1r8aqv8w27k76lcsfk83w6qw9lz8gk2ibzwacp5wjhpp2gik911m"))))
9812 (build-system python-build-system)
9813 (propagated-inputs
9814 `(("python-colorama" ,python-colorama)
9815 ("python-botocore" ,python-botocore)
9816 ("python-s3transfer" ,python-s3transfer)
9817 ("python-docutils" ,python-docutils)
9818 ("python-pyyaml" ,python-pyyaml)
9819 ("python-rsa" ,python-rsa)))
9820 (arguments
9821 ;; FIXME: The 'pypi' release does not contain tests.
9822 '(#:tests? #f))
9823 (home-page "https://aws.amazon.com/cli/")
9824 (synopsis "Command line client for AWS")
9825 (description "AWS CLI provides a unified command line interface to the
9826 Amazon Web Services (AWS) API.")
9827 (license license:asl2.0)))
9828
9829 (define-public python-hypothesis
9830 (package
9831 (name "python-hypothesis")
9832 (version "3.1.0")
9833 (source (origin
9834 (method url-fetch)
9835 (uri (pypi-uri "hypothesis" version))
9836 (sha256
9837 (base32
9838 "0qyqq9akm4vshhn8cngjc1qykcvsn7cz6dlm6njfsgpbraqrmbbw"))))
9839 (build-system python-build-system)
9840 (native-inputs
9841 `(("python-flake8" ,python-flake8)
9842 ("python-pytest" ,python-pytest)))
9843 (synopsis "Library for property based testing")
9844 (description "Hypothesis is a library for testing your Python code against a
9845 much larger range of examples than you would ever want to write by hand. It’s
9846 based on the Haskell library, Quickcheck, and is designed to integrate
9847 seamlessly into your existing Python unit testing work flow.")
9848 (home-page "https://github.com/DRMacIver/hypothesis")
9849 (license license:mpl2.0)
9850 (properties `((python2-variant . ,(delay python2-hypothesis))))))
9851
9852 (define-public python2-hypothesis
9853 (let ((hypothesis (package-with-python2
9854 (strip-python2-variant python-hypothesis))))
9855 (package (inherit hypothesis)
9856 (native-inputs
9857 `(("python2-enum34" ,python2-enum34)
9858 ,@(package-native-inputs hypothesis))))))
9859
9860 (define-public python-pytest-subtesthack
9861 (package
9862 (name "python-pytest-subtesthack")
9863 (version "0.1.1")
9864 (source (origin
9865 (method url-fetch)
9866 (uri (pypi-uri "pytest-subtesthack" version))
9867 (sha256
9868 (base32
9869 "15kzcr5pchf3id4ikdvlv752rc0j4d912n589l4rifp8qsj19l1x"))))
9870 (build-system python-build-system)
9871 (propagated-inputs
9872 `(("python-pytest" ,python-pytest)))
9873 (synopsis "Set-up and tear-down fixtures for unit tests")
9874 (description "This plugin allows you to set up and tear down fixtures within
9875 unit test functions that use @code{py.test}. This is useful for using
9876 @command{hypothesis} inside py.test, as @command{hypothesis} will call the test
9877 function multiple times, without setting up or tearing down fixture state as is
9878 normally the case.")
9879 (home-page "https://github.com/untitaker/pytest-subtesthack/")
9880 (license license:unlicense)))
9881
9882 (define-public python2-pytest-subtesthack
9883 (package-with-python2 python-pytest-subtesthack))
9884
9885 (define-public python-xdo
9886 (package
9887 (name "python-xdo")
9888 (version "0.3")
9889 (source (origin
9890 (method url-fetch)
9891 (uri (string-append
9892 "http://http.debian.net/debian/pool/main/p/python-xdo/"
9893 "python-xdo_" version ".orig.tar.gz"))
9894 (sha256
9895 (base32
9896 "1vqh1n5yy5dhnq312kwrl90fnck4v26is3lq3lxdvcn60vv19da0"))))
9897 (build-system python-build-system)
9898 (arguments
9899 '(#:phases
9900 (modify-phases %standard-phases
9901 (add-before 'install 'patch-libxdo-path
9902 ;; Hardcode the path of dynamically loaded libxdo library.
9903 (lambda* (#:key inputs #:allow-other-keys)
9904 (let ((libxdo (string-append
9905 (assoc-ref inputs "xdotool")
9906 "/lib/libxdo.so")))
9907 (substitute* "xdo/_xdo.py"
9908 (("find_library\\(\"xdo\"\\)")
9909 (simple-format #f "\"~a\"" libxdo)))
9910 #t))))
9911 #:tests? #f)) ; no tests provided
9912 (propagated-inputs
9913 `(("python-six" ,python-six)))
9914 (inputs
9915 `(("xdotool" ,xdotool)
9916 ("libX11" ,libx11)))
9917 (home-page "https://tracker.debian.org/pkg/python-xdo")
9918 (synopsis "Python library for simulating X11 keyboard/mouse input")
9919 (description "Provides bindings to libxdo for manipulating X11 via simulated
9920 input. (Note that this is mostly a legacy library; you may wish to look at
9921 python-xdo for newer bindings.)")
9922 (license license:bsd-3)))
9923
9924 (define-public python2-xdo
9925 (package-with-python2 python-xdo))
9926
9927 (define-public python-wtforms
9928 (package
9929 (name "python-wtforms")
9930 (version "2.1")
9931 (source
9932 (origin
9933 (method url-fetch)
9934 (uri (pypi-uri "WTForms" version ".zip"))
9935 (sha256
9936 (base32
9937 "0vyl26y9cg409cfyj8rhqxazsdnd0jipgjw06civhrd53yyi1pzz"))))
9938 (build-system python-build-system)
9939 (arguments
9940 '(#:phases
9941 (modify-phases %standard-phases
9942 (add-after 'unpack 'remove-django-test
9943 ;; Don't fail the tests when the inputs for the optional tests cannot be found.
9944 (lambda _
9945 (substitute*
9946 "tests/runtests.py"
9947 (("'ext_django.tests', 'ext_sqlalchemy', 'ext_dateutil', 'locale_babel'") "")
9948 (("sys.stderr.write(\"### Disabled test '%s', dependency not found\n\" % name)") ""))
9949 #t)))))
9950 (native-inputs
9951 `(("unzip" ,unzip)))
9952 (home-page "http://wtforms.simplecodes.com/")
9953 (synopsis
9954 "Form validation and rendering library for Python web development")
9955 (description
9956 "WTForms is a flexible forms validation and rendering library
9957 for Python web development. It is very similar to the web form API
9958 available in Django, but is a standalone package.")
9959 (license license:bsd-3)))
9960
9961 (define-public python2-wtforms
9962 (package-with-python2 python-wtforms))
9963
9964 (define-public python-mako
9965 (package
9966 (name "python-mako")
9967 (version "1.0.6")
9968 (source
9969 (origin
9970 (method url-fetch)
9971 (uri (pypi-uri "Mako" version))
9972 (sha256
9973 (base32
9974 "03dyxgjknp4ffsv7vwfd28l5bbpzi0ylp20543wpg3iahyyrwma8"))))
9975 (build-system python-build-system)
9976 (propagated-inputs
9977 `(("python-markupsafe" ,python-markupsafe)))
9978 (native-inputs
9979 `(("python-mock" ,python-mock)
9980 ("python-nose" ,python-nose)
9981 ("python-pytest" ,python-pytest)))
9982 (home-page "http://www.makotemplates.org/")
9983 (synopsis "Templating language for Python")
9984 (description "Mako is a templating language for Python that compiles
9985 templates into Python modules.")
9986 (license license:expat)))
9987
9988 (define-public python2-mako
9989 (package-with-python2 python-mako))
9990
9991 (define-public python-waitress
9992 (package
9993 (name "python-waitress")
9994 (version "0.8.10")
9995 (source
9996 (origin
9997 (method url-fetch)
9998 (uri (pypi-uri "waitress" version))
9999 (sha256
10000 (base32
10001 "017n9ra6vvmq9d5sfhdzyzr1mg15x2hj2dhm4pdlw98c1ypw2h3w"))))
10002 (build-system python-build-system)
10003 (home-page "https://github.com/Pylons/waitress")
10004 (synopsis "Waitress WSGI server")
10005 (description "Waitress is meant to be a production-quality pure-Python WSGI
10006 server with very acceptable performance.")
10007 (license license:zpl2.1)))
10008
10009 (define-public python2-waitress
10010 (package-with-python2 python-waitress))
10011
10012 (define-public python-wsgiproxy2
10013 (package
10014 (name "python-wsgiproxy2")
10015 (version "0.4.2")
10016 (source
10017 (origin
10018 (method url-fetch)
10019 (uri (pypi-uri "WSGIProxy2" version ".zip"))
10020 (sha256
10021 (base32
10022 "13kf9bdxrc95y9vriaz0viry3ah11nz4rlrykcfvb8nlqpx3dcm4"))))
10023 (build-system python-build-system)
10024 (arguments
10025 '(;; Wsgiproxy2's test suite requires Restkit, which does not yet fully
10026 ;; support Python 3:
10027 ;; https://github.com/benoitc/restkit/issues/140
10028 #:tests? #f))
10029 (native-inputs
10030 `(("unzip" ,unzip)
10031 ("python-nose" ,python-nose)
10032 ("python-coverage" ,python-coverage)))
10033 (propagated-inputs
10034 `(("python-six" ,python-six)
10035 ("python-webob" ,python-webob)))
10036 (home-page
10037 "https://github.com/gawel/WSGIProxy2/")
10038 (synopsis "WSGI Proxy with various http client backends")
10039 (description "WSGI turns HTTP requests into WSGI function calls.
10040 WSGIProxy turns WSGI function calls into HTTP requests.
10041 It also includes code to sign requests and pass private data,
10042 and to spawn subprocesses to handle requests.")
10043 (license license:expat)))
10044
10045 (define-public python2-wsgiproxy2
10046 (package-with-python2 python-wsgiproxy2))
10047
10048 (define-public python-pastedeploy
10049 (package
10050 (name "python-pastedeploy")
10051 (version "1.5.2")
10052 (source
10053 (origin
10054 (method url-fetch)
10055 (uri (pypi-uri "PasteDeploy" version))
10056 (sha256
10057 (base32
10058 "1jz3m4hq8v6hyhfjz9425nd3nvn52cvbfipdcd72krjmla4qz1fm"))))
10059 (build-system python-build-system)
10060 (native-inputs
10061 `(("python-nose" ,python-nose)))
10062 (home-page "http://pythonpaste.org/deploy/")
10063 (synopsis
10064 "Load, configure, and compose WSGI applications and servers")
10065 (description
10066 "This tool provides code to load WSGI applications and servers from URIs;
10067 these URIs can refer to Python Eggs for INI-style configuration files. Paste
10068 Script provides commands to serve applications based on this configuration
10069 file.")
10070 (license license:expat)))
10071
10072 (define-public python2-pastedeploy
10073 (package-with-python2 python-pastedeploy))
10074
10075 (define-public python-paste
10076 (package
10077 (name "python-paste")
10078 (version "2.0.3")
10079 (source
10080 (origin
10081 (method url-fetch)
10082 (uri (pypi-uri "Paste" version))
10083 (sha256
10084 (base32
10085 "062jk0nlxf6lb2wwj6zc20rlvrwsnikpkh90y0dn8cjch93s6ii3"))
10086 (patches (search-patches "python-paste-remove-website-test.patch"
10087 "python-paste-remove-timing-test.patch"))))
10088 (build-system python-build-system)
10089 (native-inputs
10090 `(("python-nose" ,python-nose)))
10091 (propagated-inputs
10092 `(("python-six" ,python-six)))
10093 (home-page "http://pythonpaste.org")
10094 (synopsis
10095 "Python web development tools, focusing on WSGI")
10096 (description
10097 "Paste provides a variety of web development tools and middleware which
10098 can be nested together to build web applications. Paste's design closely
10099 follows ideas flowing from WSGI (Web Standard Gateway Interface).")
10100 (license license:expat)))
10101
10102 (define-public python2-paste
10103 (package-with-python2 python-paste))
10104
10105 (define-public python-pastescript
10106 (package
10107 (name "python-pastescript")
10108 (version "2.0.2")
10109 (source
10110 (origin
10111 (method url-fetch)
10112 (uri (pypi-uri "PasteScript" version))
10113 (sha256
10114 (base32
10115 "1h3nnhn45kf4pbcv669ik4faw04j58k8vbj1hwrc532k0nc28gy0"))))
10116 (build-system python-build-system)
10117 (native-inputs
10118 `(("python-nose" ,python-nose)))
10119 (propagated-inputs
10120 `(("python-paste" ,python-paste)
10121 ("python-pastedeploy" ,python-pastedeploy)))
10122 (home-page "http://pythonpaste.org/script/")
10123 (arguments
10124 '(;; Unfortunately, this requires the latest unittest2,
10125 ;; but that requires traceback2 which requires linecache2 which requires
10126 ;; unittest2. So we're skipping tests for now.
10127 ;; (Note: Apparently linetest2 only needs unittest2 for its tests,
10128 ;; so in theory we could get around this situation somehow.)
10129 #:tests? #f))
10130 (synopsis
10131 "Pluggable command line tool for serving web applications and more")
10132 (description
10133 "PasteScript is a plugin-friendly command line tool which provides a
10134 variety of features, from launching web applications to bootstrapping project
10135 layouts.")
10136 (license license:expat)))
10137
10138 (define-public python2-pastescript
10139 (package-with-python2 python-pastescript))
10140
10141 (define-public python-pyquery
10142 (package
10143 (name "python-pyquery")
10144 (version "1.2.17")
10145 (source
10146 (origin
10147 (method url-fetch)
10148 (uri (pypi-uri "pyquery" version))
10149 (sha256
10150 (base32
10151 "1xia20wm0vx5dk85kcwgh13bylz8qh47ffjxssd2586r60xi783a"))))
10152 (build-system python-build-system)
10153 (native-inputs
10154 `(("python-webob" ,python-webob)
10155 ("python-webtest" ,python-webtest)))
10156 (propagated-inputs
10157 `(("python-lxml" ,python-lxml)
10158 ("python-cssselect" ,python-cssselect)))
10159 (home-page "https://github.com/gawel/pyquery")
10160 (synopsis "Make jQuery-like queries on xml documents")
10161 (description "pyquery allows you to make jQuery queries on xml documents.
10162 The API is as much as possible the similar to jQuery. pyquery uses lxml for
10163 fast xml and html manipulation.")
10164 (license license:bsd-3)))
10165
10166 (define-public python2-pyquery
10167 (package-with-python2 python-pyquery))
10168
10169 (define-public python-webtest
10170 (package
10171 (name "python-webtest")
10172 (version "2.0.20")
10173 (source
10174 (origin
10175 (method url-fetch)
10176 (uri (pypi-uri "WebTest" version))
10177 (sha256
10178 (base32
10179 "0bv0qhdjakdsdgj4sk21gnpp8xp8bga4x03p6gjb83ihrsb7n4xv"))))
10180 (build-system python-build-system)
10181 (arguments
10182 `(;; Unfortunately we have to disable tests!
10183 ;; This release of WebTest is pinned to python-nose < 1.3,
10184 ;; but older versions of python-nose are plagued with the following
10185 ;; bug(s), which rears its ugly head during test execution:
10186 ;; https://github.com/nose-devs/nose/issues/759
10187 ;; https://github.com/nose-devs/nose/pull/811
10188 #:tests? #f))
10189 ;; Commented out code is no good, but in this case, once tests
10190 ;; are ready to be enabled again, we should put the following
10191 ;; in place:
10192 ;; (native-inputs
10193 ;; `(("python-nose" ,python-nose) ; technially < 1.3,
10194 ;; ; but see above comment
10195 ;; ("python-coverage" ,python-coverage)
10196 ;; ("python-mock" ,python-mock)
10197 ;; ("python-pastedeploy" ,python-pastedeploy)
10198 ;; ("python-wsgiproxy2" ,python-wsgiproxy2)
10199 ;; ("python-pyquery" ,python-pyquery)))
10200 (propagated-inputs
10201 `(("python-waitress" ,python-waitress)
10202 ("python-webob" ,python-webob)
10203 ("python-six" ,python-six)
10204 ("python-beautifulsoup4" ,python-beautifulsoup4)))
10205 (home-page "http://webtest.pythonpaste.org/")
10206 (synopsis "Helper to test WSGI applications")
10207 (description "Webtest allows you to test your Python web applications
10208 without starting an HTTP server. It supports anything that supports the
10209 minimum of WSGI.")
10210 (license license:expat)))
10211
10212 (define-public python2-webtest
10213 (package-with-python2 python-webtest))
10214
10215 (define-public python-anyjson
10216 (package
10217 (name "python-anyjson")
10218 (version "0.3.3")
10219 (source
10220 (origin
10221 (method url-fetch)
10222 (uri (pypi-uri "anyjson" version))
10223 (sha256
10224 (base32
10225 "1fjph4alvcscsl5d4b6qpv1yh31jy05jxi1l0xff7lws7j32v09p"))))
10226 (build-system python-build-system)
10227 (arguments
10228 `(;; We could possibly get tests working, but on Python 3 it's not so easy.
10229 ;; Very strangely, 2to3 is run *during setup.py install* (or bdist, or
10230 ;; whatever) so this transformation needs to be done before the tests
10231 ;; can be run. Maybe we could add a build step to transform beforehand
10232 ;; but it could be annoying/difficult.
10233 ;; We can enable tests for the Python 2 version, though, and do below.
10234 #:tests? #f))
10235 (home-page "http://bitbucket.org/runeh/anyjson/")
10236 (synopsis
10237 "Wraps best available JSON implementation in a common interface")
10238 (description
10239 "Anyjson loads whichever is the fastest JSON module installed
10240 and provides a uniform API regardless of which JSON implementation is used.")
10241 (license license:bsd-3)
10242 (properties `((python2-variant . ,(delay python2-anyjson))))))
10243
10244 (define-public python2-anyjson
10245 (let ((anyjson (package-with-python2
10246 (strip-python2-variant python-anyjson))))
10247 (package
10248 (inherit anyjson)
10249 (arguments `(;; Unlike the python 3 variant, we do run tests. See above!
10250 #:tests? #t
10251 ,@(package-arguments anyjson)))
10252 (native-inputs `(("python2-nose" ,python2-nose))))))
10253
10254 (define-public python-amqp
10255 (package
10256 (name "python-amqp")
10257 (version "1.4.9")
10258 (source
10259 (origin
10260 (method url-fetch)
10261 (uri (pypi-uri "amqp" version))
10262 (sha256
10263 (base32
10264 "06n6q0kxhjnbfz3vn8x9yz09lwmn1xi9d6wxp31h5jbks0b4vsid"))))
10265 (build-system python-build-system)
10266 (native-inputs
10267 `(("python-nose" ,python-nose)
10268 ("python-mock" ,python-mock)))
10269 (home-page "https://github.com/celery/py-amqp")
10270 (synopsis
10271 "Low-level AMQP client for Python (fork of amqplib)")
10272 (description
10273 "This is a fork of amqplib which was originally written by Barry Pederson.
10274 It is maintained by the Celery project, and used by kombu as a pure python
10275 alternative when librabbitmq is not available.")
10276 (license license:lgpl2.1+)
10277 (properties `((python2-variant . ,(delay python2-amqp))))))
10278
10279 (define-public python2-amqp
10280 (let ((amqp (package-with-python2
10281 (strip-python2-variant python-amqp))))
10282 (package
10283 (inherit amqp)
10284 (arguments `(;; Tries to run coverage tests with nose-cover3, which seems
10285 ;; unmaintained. Weirdly, does not do this on the python 3
10286 ;; version?
10287 #:tests? #f
10288 ,@(package-arguments amqp))))))
10289
10290 (define-public python-kombu
10291 (package
10292 (name "python-kombu")
10293 (version "3.0.37")
10294 (source
10295 (origin
10296 (method url-fetch)
10297 (uri (pypi-uri "kombu" version))
10298 (sha256
10299 (base32
10300 "0l16chb314gpq2v7fh94a22c30lcv6w3ylmhsa60bldlcq6a0r70"))))
10301 (build-system python-build-system)
10302 (native-inputs
10303 `(("python-mock" ,python-mock)
10304 ("python-nose" ,python-nose)))
10305 (propagated-inputs
10306 `(("python-anyjson" ,python-anyjson)
10307 ("python-amqp" ,python-amqp)
10308 ("python-redis" ,python-redis)))
10309 (home-page "http://kombu.readthedocs.org")
10310 (synopsis "Message passing library for Python")
10311 (description "The aim of Kombu is to make messaging in Python as easy as
10312 possible by providing an idiomatic high-level interface for the AMQ protocol,
10313 and also provide proven and tested solutions to common messaging problems.
10314 AMQP is the Advanced Message Queuing Protocol, an open standard protocol for
10315 message orientation, queuing, routing, reliability and security, for which the
10316 RabbitMQ messaging server is the most popular implementation.")
10317 (license license:bsd-3)
10318 (properties `((python2-variant . ,(delay python2-kombu))))))
10319
10320 (define-public python2-kombu
10321 (let ((kombu (package-with-python2
10322 (strip-python2-variant python-kombu))))
10323 (package
10324 (inherit kombu)
10325 (arguments `(;; FIXME: 'TestTransport.test_del_sync' fails on python2.
10326 ;; It works fine on the python3 variant.
10327 #:tests? #f
10328 ,@(package-arguments kombu)))
10329 (native-inputs `(("python2-unittest2" ,python2-unittest2)
10330 ,@(package-native-inputs kombu))))))
10331
10332 (define-public python-billiard
10333 (package
10334 (name "python-billiard")
10335 (version "3.3.0.23")
10336 (source
10337 (origin
10338 (method url-fetch)
10339 (uri (pypi-uri "billiard" version))
10340 (sha256
10341 (base32
10342 "02wxsc6bhqvzh8j6w758kvgqbnj14l796mvmrcms8fgfamd2lak9"))))
10343 (build-system python-build-system)
10344 (native-inputs
10345 `(("python-nose" ,python-nose)))
10346 (home-page "https://github.com/celery/billiard")
10347 (synopsis
10348 "Python multiprocessing fork with improvements and bugfixes")
10349 (description
10350 "Billiard is a fork of the Python 2.7 multiprocessing package. The
10351 multiprocessing package itself is a renamed and updated version of R Oudkerk's
10352 pyprocessing package. This standalone variant is intended to be compatible with
10353 Python 2.4 and 2.5, and will draw its fixes/improvements from python-trunk.")
10354 (license license:bsd-3)
10355 (properties `((python2-variant . ,(delay python2-billiard))))))
10356
10357 (define-public python2-billiard
10358 (let ((billiard (package-with-python2
10359 (strip-python2-variant python-billiard))))
10360 (package
10361 (inherit billiard)
10362 (native-inputs `(("python2-unittest2" ,python2-unittest2)
10363 ("python2-mock" ,python2-mock)
10364 ,@(package-native-inputs billiard))))))
10365
10366 (define-public python-celery
10367 (package
10368 (name "python-celery")
10369 (version "3.1.24")
10370 (source
10371 (origin
10372 (method url-fetch)
10373 (uri (pypi-uri "celery" version))
10374 (sha256
10375 (base32
10376 "0yh2prhdnx2dgkb67a5drj12hh2zvzx5f611p7mqqg01ydghif4r"))))
10377 (build-system python-build-system)
10378 (arguments
10379 `(#:phases
10380 (modify-phases %standard-phases
10381 ;; These tests break with Python 3.5:
10382 ;; https://github.com/celery/celery/issues/2897#issuecomment-253066295
10383 (replace 'check
10384 (lambda _
10385 (zero?
10386 (system* "nosetests" "--exclude=^test_safe_to_remove.*")))))))
10387 (native-inputs
10388 `(("python-nose" ,python-nose)))
10389 (propagated-inputs
10390 `(("python-pytz" ,python-pytz)
10391 ("python-billiard" ,python-billiard)
10392 ("python-kombu" ,python-kombu)))
10393 (home-page "http://celeryproject.org")
10394 (synopsis "Distributed Task Queue")
10395 (description "Celery is an asynchronous task queue/job queue based on
10396 distributed message passing. It is focused on real-time operation, but
10397 supports scheduling as well. The execution units, called tasks, are executed
10398 concurrently on a single or more worker servers using multiprocessing,
10399 Eventlet, or gevent. Tasks can execute asynchronously (in the background) or
10400 synchronously (wait until ready).")
10401 (license license:bsd-3)
10402 (properties `((python2-variant . ,(delay python2-celery))))))
10403
10404 (define-public python2-celery
10405 (let ((celery (package-with-python2
10406 (strip-python2-variant python-celery))))
10407 (package
10408 (inherit celery)
10409 (native-inputs `(("python2-unittest2" ,python2-unittest2)
10410 ("python2-mock" ,python2-mock)
10411 ,@(package-native-inputs celery))))))
10412
10413 (define-public python-translitcodec
10414 (package
10415 (name "python-translitcodec")
10416 (version "0.4.0")
10417 (source
10418 (origin
10419 (method url-fetch)
10420 (uri (pypi-uri "translitcodec" version))
10421 (sha256
10422 (base32
10423 "10x6pvblkzky1zhjs8nmx64nb9jdzxad4bxhq4iwv0j4z2aqjnki"))))
10424 (build-system python-build-system)
10425 (arguments
10426 `(#:tests? #f)) ; no tests provided
10427 (home-page
10428 "https://github.com/claudep/translitcodec")
10429 (synopsis
10430 "Unicode to 8-bit charset transliteration codec")
10431 (description
10432 "This package contains codecs for transliterating ISO 10646 texts into
10433 best-effort representations using smaller coded character sets (ASCII,
10434 ISO 8859, etc.).")
10435 (license license:expat)))
10436
10437 (define-public python2-translitcodec
10438 (package-with-python2 python-translitcodec))
10439
10440 (define-public python-editor
10441 (package
10442 (name "python-editor")
10443 (version "0.5")
10444 (source
10445 (origin
10446 (method url-fetch)
10447 (uri (pypi-uri "python-editor" version))
10448 (sha256
10449 (base32
10450 "1ypnpgvzpkbwsg4rdvy4sy51j28b5xq9v8pnkwxncn07vqz06p7n"))))
10451 (build-system python-build-system)
10452 (home-page
10453 "https://github.com/fmoo/python-editor")
10454 (synopsis
10455 "Programmatically open an editor, capture the result")
10456 (description
10457 "python-editor is a library that provides the editor module for
10458 programmatically interfacing with your system's $EDITOR.")
10459 (license license:asl2.0)))
10460
10461 (define-public python2-editor
10462 (package-with-python2 python-editor))
10463
10464 (define-public python-sphinxcontrib-programoutput
10465 (package
10466 (name "python-sphinxcontrib-programoutput")
10467 (version "0.10")
10468 (source (origin
10469 (method url-fetch)
10470 (uri (pypi-uri "sphinxcontrib-programoutput" version))
10471 (sha256
10472 (base32
10473 "153hhnlbx4688zj9wd64819ps5znc2jlyp5crkgzvn5hxgy99vpx"))))
10474 (build-system python-build-system)
10475 (arguments
10476 ;; FIXME: Many tests are failing and the upstream is gone.
10477 '(#:tests? #f))
10478 (propagated-inputs
10479 `(("python-sphinx" ,python-sphinx)))
10480 (synopsis "Sphinx extension to include program output")
10481 (description "A Sphinx extension to literally insert the output of arbitrary
10482 commands into documents, helping you to keep your command examples up to date.")
10483 (home-page "https://github.com/lunaryorn/sphinxcontrib-programoutput")
10484 (license license:bsd-2)))
10485
10486 (define-public python2-sphinxcontrib-programoutput
10487 (package-with-python2 python-sphinxcontrib-programoutput))
10488
10489 (define-public python-sphinx-repoze-autointerface
10490 (package
10491 (name "python-sphinx-repoze-autointerface")
10492 (version "0.8")
10493 (source (origin
10494 (method url-fetch)
10495 (uri (pypi-uri "repoze.sphinx.autointerface" version))
10496 (sha256
10497 (base32
10498 "08ycivzf7bh4a1zcyp31hbyqs1b2c9r26raa3vxjwwmbfqr3iw4f"))))
10499 (build-system python-build-system)
10500 (arguments '(#:tests? #f)) ; No tests.
10501 (propagated-inputs
10502 `(("python-sphinx" ,python-sphinx)
10503 ("python-zope-interface" ,python-zope-interface)))
10504 (synopsis "Auto-generate Sphinx API docs from Zope interfaces")
10505 (description "This package defines an extension for the Sphinx documentation
10506 system. The extension allows generation of API documentation by
10507 introspection of @code{zope.interface} instances in code.")
10508 (home-page "https://github.com/repoze/repoze.sphinx.autointerface")
10509 (license license:repoze)))
10510
10511 (define-public python2-sphinx-repoze-autointerface
10512 (package-with-python2 python-sphinx-repoze-autointerface))
10513
10514 (define-public python-psycopg2
10515 (package
10516 (name "python-psycopg2")
10517 (version "2.6.2")
10518 (source
10519 (origin
10520 (method url-fetch)
10521 (uri (pypi-uri "psycopg2" version))
10522 (sha256
10523 (base32
10524 "0p60z2gwfcal30y2w8gprflchp1kcg9qblc5rn782p4wxl90wjbh"))))
10525 (build-system python-build-system)
10526 (arguments
10527 ;; Tests would require a postgresql database "psycopg2_test"
10528 ;; and a running postgresql database management service.
10529 `(#:tests? #f)) ; TODO re-enable after providing a test-db.
10530 (inputs
10531 `(("postgresql" ,postgresql))) ; libpq
10532 (home-page "http://initd.org/psycopg/")
10533 (synopsis "Python PostgreSQL adapter")
10534 (description
10535 "psycopg2 is a thread-safe PostgreSQL adapter that implements DB-API 2.0. ")
10536 (license license:lgpl3+)))
10537
10538 (define-public python2-psycopg2
10539 (package-with-python2 python-psycopg2))
10540
10541 (define-public python-vobject
10542 (package
10543 (name "python-vobject")
10544 (version "0.9.5")
10545 (source (origin
10546 (method url-fetch)
10547 (uri (pypi-uri "vobject" version))
10548 (sha256
10549 (base32
10550 "0hqjgf3ay1m5w1c0k00g5yfpdz1zni5qnr5rh9b8fg9hjvhwlmhg"))))
10551 (build-system python-build-system)
10552 (arguments
10553 '(;; The test suite relies on some non-portable Windows interfaces.
10554 #:tests? #f))
10555 (propagated-inputs
10556 `(("python-dateutil" ,python-dateutil)
10557 ("python-pyicu" ,python-pyicu)))
10558 (synopsis "Parse and generate vCard and vCalendar files")
10559 (description "Vobject is intended to be a full featured Python package for
10560 parsing and generating vCard and vCalendar files. Currently, iCalendar files
10561 are supported and well tested. vCard 3.0 files are supported, and all data
10562 should be imported, but only a few components are understood in a sophisticated
10563 way.")
10564 (home-page "http://eventable.github.io/vobject/")
10565 (license license:asl2.0)))
10566
10567 (define-public python2-vobject
10568 (package-with-python2 python-vobject))
10569
10570 (define-public python-munkres
10571 (package
10572 (name "python-munkres")
10573 (version "1.0.8")
10574 (source (origin
10575 (method url-fetch)
10576 (uri (pypi-uri "munkres" version))
10577 (sha256
10578 (base32
10579 "0mbspx4zv8id4x6pim6ybsa1xh96qwpbqj7skbqz4c9c9nf1lpqq"))))
10580 (build-system python-build-system)
10581 (arguments
10582 '(#:tests? #f)) ; no test suite
10583 (home-page "http://software.clapper.org/munkres/")
10584 (synopsis "Implementation of the Munkres algorithm")
10585 (description "The Munkres module provides an implementation of the Munkres
10586 algorithm (also called the Hungarian algorithm or the Kuhn-Munkres algorithm),
10587 useful for solving the Assignment Problem.")
10588 (license license:bsd-3)))
10589
10590 (define-public python2-munkres
10591 (package-with-python2 python-munkres))
10592
10593 (define-public python-flask
10594 (package
10595 (name "python-flask")
10596 (version "0.11.1")
10597 (source (origin
10598 (method url-fetch)
10599 (uri (pypi-uri "Flask" version))
10600 (sha256
10601 (base32
10602 "03kbfll4sj3v5z7r31c7bhfpi11r1np076d4p1k2kg4yzcmkywdl"))))
10603 (build-system python-build-system)
10604 (propagated-inputs
10605 `(("python-itsdangerous" ,python-itsdangerous)
10606 ("python-jinja2" ,python-jinja2)
10607 ("python-click" ,python-click)
10608 ("python-werkzeug" ,python-werkzeug)))
10609 (home-page "https://github.com/mitsuhiko/flask/")
10610 (synopsis "Microframework based on Werkzeug, Jinja2 and good intentions")
10611 (description "Flask is a micro web framework based on the Werkzeug toolkit
10612 and Jinja2 template engine. It is called a micro framework because it does not
10613 presume or force a developer to use a particular tool or library.")
10614 (license license:bsd-3)))
10615
10616 (define-public python2-flask
10617 (package-with-python2 python-flask))
10618
10619 (define-public python-flask-wtf
10620 (package
10621 (name "python-flask-wtf")
10622 (version "0.13.1")
10623 (source
10624 (origin
10625 (method url-fetch)
10626 (uri (pypi-uri "Flask-WTF" version))
10627 (sha256
10628 (base32
10629 "04l5743j2dici46038sqlzvf0xzpg8rf7s9ld2x24xv7f4idg990"))))
10630 (build-system python-build-system)
10631 (arguments
10632 '(#:phases
10633 (modify-phases %standard-phases
10634 (add-before 'check 'drop-failing-test
10635 (lambda _
10636 ;; FIXME: This file tries resolving an external server, which
10637 ;; fails. Try to patch out the offending section instead of
10638 ;; deleting the whole thing.
10639 (delete-file "tests/test_recaptcha.py")
10640 #t)))))
10641 (propagated-inputs
10642 `(("python-flask-babel" ,python-flask-babel)
10643 ("python-babel" ,python-babel)
10644 ("python-wtforms" ,python-wtforms)))
10645 (native-inputs
10646 `(("python-nose" ,python-nose)))
10647 (home-page "https://github.com/lepture/flask-wtf")
10648 (synopsis "Simple integration of Flask and WTForms")
10649 (description "Flask-WTF integrates Flask and WTForms, including CSRF, file
10650 upload, and reCAPTCHA.")
10651 (license license:bsd-3)))
10652
10653 (define-public python2-flask-wtf
10654 (package-with-python2 python-flask-wtf))
10655
10656 (define-public python-flask-multistatic
10657 (package
10658 (name "python-flask-multistatic")
10659 (version "1.0")
10660 (source
10661 (origin
10662 (method url-fetch)
10663 (uri (pypi-uri "flask-multistatic" version))
10664 (sha256
10665 (base32
10666 "0p4v50rwv64wcd0zlq7rzl4waprwr4hj19s3cgf1isywa7jcisgm"))))
10667 (build-system python-build-system)
10668 (propagated-inputs
10669 `(("python-flask" ,python-flask)))
10670 (home-page "https://pagure.io/flask-multistatic")
10671 (synopsis "Flask plugin to allow overriding static files")
10672 (description "@code{flask-multistatic} is a flask plugin that adds support
10673 for overriding static files.")
10674 (license license:gpl3+)))
10675
10676 (define-public python2-flask-multistatic
10677 (package-with-python2 python-flask-multistatic))
10678
10679 (define-public python-cookies
10680 (package
10681 (name "python-cookies")
10682 (version "2.2.1")
10683 (source (origin
10684 (method url-fetch)
10685 (uri (pypi-uri "cookies" version))
10686 (sha256
10687 (base32
10688 "13pfndz8vbk4p2a44cfbjsypjarkrall71pgc97glk5fiiw9idnn"))))
10689 (build-system python-build-system)
10690 (arguments
10691 `(;; test are broken: https://gitlab.com/sashahart/cookies/issues/3
10692 #:tests? #f))
10693 (native-inputs
10694 `(("python-pytest" ,python2-pytest)))
10695 (synopsis "HTTP cookie parser and renderer")
10696 (description "A RFC 6265-compliant HTTP cookie parser and renderer in
10697 Python.")
10698 (home-page "https://gitlab.com/sashahart/cookies")
10699 (license license:expat)))
10700
10701 (define-public python2-cookies
10702 (package-with-python2 python-cookies))
10703
10704 (define-public python-responses
10705 (package
10706 (name "python-responses")
10707 (version "0.5.1")
10708 (source (origin
10709 (method url-fetch)
10710 (uri (pypi-uri "responses" version))
10711 (sha256
10712 (base32
10713 "1spcfxixyk9k7pk82jm6zqkwk031s95lh8q0mz7539jrb7269bcc"))))
10714 (build-system python-build-system)
10715 (arguments
10716 `(;; Test suite is not distributed:
10717 ;; https://github.com/getsentry/responses/issues/38
10718 #:tests? #f))
10719 (native-inputs
10720 `(("python-mock" ,python-mock)))
10721 (propagated-inputs
10722 `(("python-requests" ,python-requests)
10723 ("python-cookies" ,python-cookies)
10724 ("python-six" ,python-six)))
10725 (home-page "https://github.com/getsentry/responses")
10726 (synopsis "Utility for mocking out the `requests` Python library")
10727 (description "A utility library for mocking out the `requests` Python
10728 library.")
10729 (license license:asl2.0)))
10730
10731 (define-public python2-responses
10732 (package-with-python2 python-responses))
10733
10734 (define-public python-whoosh
10735 (package
10736 (name "python-whoosh")
10737 (version "2.7.4")
10738 (source
10739 (origin
10740 (method url-fetch)
10741 (uri (pypi-uri "Whoosh" version))
10742 (sha256
10743 (base32
10744 "10qsqdjpbc85fykc1vgcs8xwbgn4l2l52c8d83xf1q59pwyn79bw"))))
10745 (build-system python-build-system)
10746 (native-inputs
10747 `(("python-pytest" ,python-pytest)))
10748 (home-page "http://bitbucket.org/mchaput/whoosh")
10749 (synopsis "Full text indexing, search, and spell checking library")
10750 (description
10751 "Whoosh is a fast, pure-Python full text indexing, search, and spell
10752 checking library.")
10753 (license license:bsd-2)))
10754
10755 (define-public python2-whoosh
10756 (let ((whoosh (package-with-python2 (strip-python2-variant python-whoosh))))
10757 (package (inherit whoosh)
10758 (propagated-inputs
10759 `(("python2-backport-ssl-match-hostname"
10760 ,python2-backport-ssl-match-hostname)
10761 ,@(package-propagated-inputs whoosh))))))
10762
10763 (define-public python-pathlib
10764 (package
10765 (name "python-pathlib")
10766 (version "1.0.1")
10767 (source (origin
10768 (method url-fetch)
10769 (uri (pypi-uri "pathlib" version))
10770 (sha256
10771 (base32
10772 "17zajiw4mjbkkv6ahp3xf025qglkj0805m9s41c45zryzj6p2h39"))))
10773 (build-system python-build-system)
10774 ;; The tests depend on the internal "test" module, which does not provide
10775 ;; a stable interface.
10776 (arguments `(#:tests? #f))
10777 (home-page "https://pathlib.readthedocs.org/")
10778 (synopsis "Object-oriented file system paths")
10779 (description "Pathlib offers a set of classes to handle file system paths.
10780 It offers the following advantages over using string objects:
10781
10782 @enumerate
10783 @item No more cumbersome use of os and os.path functions. Everything can
10784 be done easily through operators, attribute accesses, and method calls.
10785 @item Embodies the semantics of different path types. For example,
10786 comparing Windows paths ignores casing.
10787 @item Well-defined semantics, eliminating any inconsistencies or
10788 ambiguities (forward vs. backward slashes, etc.).
10789 @end enumerate
10790
10791 Note: In Python 3.4, pathlib is now part of the standard library. For other
10792 Python versions please consider python-pathlib2 instead, which tracks the
10793 standard library module. This module (python-pathlib) isn't maintained
10794 anymore.")
10795 (license license:expat)))
10796
10797 (define-public python2-pathlib
10798 (package-with-python2 python-pathlib))
10799
10800 (define-public python2-pathlib2
10801 (package
10802 (name "python2-pathlib2")
10803 (version "2.1.0")
10804 (source (origin
10805 (method url-fetch)
10806 (uri (pypi-uri "pathlib2" version))
10807 (sha256
10808 (base32
10809 "0p050msg5c8d0kadv702jnfshaxrb0il765cpkgnhn6mq5hakcyy"))))
10810 (build-system python-build-system)
10811 ;; We only need the the Python 2 variant, since for Python 3 our minimum
10812 ;; version is 3.4 which already includes this package as part of the
10813 ;; standard library.
10814 (arguments
10815 `(#:python ,python-2))
10816 (native-inputs
10817 `(("python2-six" ,python2-six)))
10818 (home-page "http://pypi.python.org/pypi/pathlib2/")
10819 (synopsis "Object-oriented file system paths - backport of standard
10820 pathlib module")
10821 (description "The goal of pathlib2 is to provide a backport of standard
10822 pathlib module which tracks the standard library module, so all the newest
10823 features of the standard pathlib can be used also on older Python versions.
10824
10825 Pathlib offers a set of classes to handle file system paths. It offers the
10826 following advantages over using string objects:
10827
10828 @enumerate
10829 @item No more cumbersome use of os and os.path functions. Everything can
10830 be done easily through operators, attribute accesses, and method calls.
10831 @item Embodies the semantics of different path types. For example,
10832 comparing Windows paths ignores casing.
10833 @item Well-defined semantics, eliminating any inconsistencies or
10834 ambiguities (forward vs. backward slashes, etc.).
10835 @end enumerate")
10836 (license license:expat)))
10837
10838 (define-public python-jellyfish
10839 (package
10840 (name "python-jellyfish")
10841 (version "0.5.6")
10842 (source (origin
10843 (method url-fetch)
10844 (uri (pypi-uri "jellyfish" version))
10845 (sha256
10846 (base32
10847 "1j9rplb16ba2prjj6mip46z0w9pnhnqpwgiwi0x93vnas14rlyl8"))))
10848 (build-system python-build-system)
10849 (native-inputs
10850 `(("python-pytest" ,python-pytest)))
10851 (home-page "https://github.com/jamesturk/jellyfish")
10852 (synopsis "Approximate and phonetic matching of strings")
10853 (description "Jellyfish uses a variety of string comparison and phonetic
10854 encoding algorithms to do fuzzy string matching.")
10855 (license license:bsd-2)
10856 (properties `((python2-variant . ,(delay python2-jellyfish))))))
10857
10858 (define-public python2-jellyfish
10859 (let ((jellyfish (package-with-python2
10860 (strip-python2-variant python-jellyfish))))
10861 (package (inherit jellyfish)
10862 (native-inputs `(("python2-unicodecsv" ,python2-unicodecsv)
10863 ,@(package-native-inputs jellyfish))))))
10864
10865 (define-public python2-unicodecsv
10866 (package
10867 (name "python2-unicodecsv")
10868 (version "0.14.1")
10869 (source (origin
10870 (method url-fetch)
10871 ;; The test suite is not included in the PyPi release.
10872 ;; https://github.com/jdunck/python-unicodecsv/issues/19
10873 (uri (string-append "https://github.com/jdunck/python-unicodecsv/"
10874 "archive/" version ".tar.gz"))
10875 (file-name (string-append name "-" version ".tar.gz"))
10876 (sha256
10877 (base32
10878 "087nqanfcyp6mlfbbr5lva5f3w6iz1bybls9xlrb8icmc474wh4w"))))
10879 (build-system python-build-system)
10880 (arguments
10881 `(;; It supports Python 3, but Python 3 can already do Unicode CSV.
10882 #:python ,python-2))
10883 (native-inputs
10884 `(("python2-unittest2" ,python2-unittest2)))
10885 (home-page "https://github.com/jdunck/python-unicodecsv")
10886 (synopsis "Unicode CSV module for Python 2")
10887 (description "Unicodecsv is a drop-in replacement for Python 2.7's CSV
10888 module, adding support for Unicode strings.")
10889 (license license:bsd-2)))
10890
10891 (define-public python-rarfile
10892 (package
10893 (name "python-rarfile")
10894 (version "2.8")
10895 (source (origin
10896 (method url-fetch)
10897 (uri (pypi-uri "rarfile" version))
10898 (sha256
10899 (base32
10900 "0qfad483kcbga0bn4qmcz953xjk16r52fahiy46zzn56v80y89ra"))))
10901 (build-system python-build-system)
10902 (arguments
10903 '(#:phases
10904 (modify-phases %standard-phases
10905 (replace 'check
10906 ;; Many tests fail, but the installation proceeds.
10907 (lambda _ (zero? (system* "make" "-C" "test" "test")))))))
10908 (native-inputs
10909 `(("which" ,which))) ; required for tests
10910 (propagated-inputs
10911 `(("libarchive" ,libarchive)))
10912 (home-page "https://github.com/markokr/rarfile")
10913 (synopsis "RAR archive reader for Python")
10914 (description "This is Python module for RAR archive reading. The interface
10915 is made as zipfile like as possible.")
10916 (license license:isc)))
10917
10918 (define-public python2-rarfile
10919 (package-with-python2 python-rarfile))
10920
10921 (define-public python-magic
10922 (package
10923 (name "python-magic")
10924 (version "0.4.3")
10925 (source
10926 (origin
10927 (method url-fetch)
10928 (uri (string-append "https://github.com/ahupp/python-magic/archive/"
10929 version ".tar.gz"))
10930 (sha256
10931 (base32
10932 "17bgy92i7sb021f2s4mw1dcvpm6p1mi9jihridwy1pyn8mzvpjgk"))
10933 (file-name (string-append name "-" version "-checkout"))))
10934 (build-system python-build-system)
10935 (arguments
10936 ;; The tests are unreliable, so don't run them. The tests fail
10937 ;; under Python3 because they were written for Python2 and
10938 ;; contain import statements that do not work in Python3. One of
10939 ;; the tests fails under Python2 because its assertions are
10940 ;; overly stringent; it relies on comparing output strings which
10941 ;; are brittle and can change depending on the version of
10942 ;; libmagic being used and the system on which the test is
10943 ;; running. In my case, under GuixSD 0.10.0, only one test
10944 ;; failed, and it seems to have failed only because the version
10945 ;; of libmagic that is packaged in Guix outputs a slightly
10946 ;; different (but not wrong) string than the one that the test
10947 ;; expected.
10948 '(#:tests? #f
10949 #:phases (modify-phases %standard-phases
10950 ;; Replace a specific method call with a hard-coded
10951 ;; path to the necessary libmagic.so file in the
10952 ;; store. If we don't do this, then the method call
10953 ;; will fail to find the libmagic.so file, which in
10954 ;; turn will cause any application using
10955 ;; python-magic to fail.
10956 (add-before 'build 'hard-code-path-to-libmagic
10957 (lambda* (#:key inputs #:allow-other-keys)
10958 (let ((file (assoc-ref inputs "file")))
10959 (substitute* "magic.py"
10960 (("ctypes.util.find_library\\('magic'\\)")
10961 (string-append "'" file "/lib/libmagic.so'")))
10962 #t)))
10963 (add-before 'install 'disable-egg-compression
10964 (lambda _
10965 (let ((port (open-file "setup.cfg" "a")))
10966 (display "\n[easy_install]\nzip_ok = 0\n"
10967 port)
10968 (close-port port)
10969 #t))))))
10970 (inputs
10971 ;; python-magic needs to be able to find libmagic.so.
10972 `(("file" ,file)))
10973 (home-page "https://github.com/ahupp/python-magic")
10974 (synopsis "File type identification using libmagic")
10975 (description
10976 "This module uses ctypes to access the libmagic file type
10977 identification library. It makes use of the local magic database and
10978 supports both textual and MIME-type output. Note that this module and
10979 the python-file module both provide a \"magic.py\" file; these two
10980 modules, which are different and were developed separately, both serve
10981 the same purpose: to provide Python bindings for libmagic.")
10982 (license license:expat)))
10983
10984 (define-public python2-magic
10985 (package-with-python2 python-magic))
10986
10987 (define-public python2-s3cmd
10988 (package
10989 (name "python2-s3cmd")
10990 (version "1.6.1")
10991 (source
10992 (origin
10993 (method url-fetch)
10994 (uri (string-append "mirror://sourceforge/s3tools/s3cmd/" version "/"
10995 "s3cmd-" version ".tar.gz"))
10996 (sha256
10997 (base32
10998 "0ki1rzhm5icvi9ry5jswi4b22yqwyj0d2wsqsgilwx6qhi7pjxa6"))))
10999 (build-system python-build-system)
11000 (arguments
11001 ;; s3cmd is written for python2 only and contains no tests.
11002 `(#:python ,python-2
11003 #:tests? #f))
11004 (propagated-inputs
11005 `(("python2-dateutil" ,python2-dateutil)
11006 ;; The python-file package also provides a magic.py module.
11007 ;; This is an unfortunate state of affairs; however, s3cmd
11008 ;; fails to install if it cannot find specifically the
11009 ;; python-magic package. Thus we include it, instead of using
11010 ;; python-file. Ironically, s3cmd sometimes works better
11011 ;; without libmagic bindings at all:
11012 ;; https://github.com/s3tools/s3cmd/issues/198
11013 ("python2-magic" ,python2-magic)))
11014 (home-page "http://s3tools.org/s3cmd")
11015 (synopsis "Command line tool for S3-compatible storage services")
11016 (description
11017 "S3cmd is a command line tool for uploading, retrieving and managing data
11018 in storage services that are compatible with the Amazon Simple Storage
11019 Service (S3) protocol, including S3 itself. It supports rsync-like backup,
11020 GnuPG encryption, and more. It also supports management of Amazon's
11021 CloudFront content delivery network.")
11022 (license license:gpl2+)))
11023
11024 (define-public python-pkgconfig
11025 (package
11026 (name "python-pkgconfig")
11027 (version "1.1.0")
11028 (source
11029 (origin
11030 (method url-fetch)
11031 (uri (pypi-uri "pkgconfig" version))
11032 (sha256
11033 (base32
11034 "1pw0kmvc57sjmaxi6c54fqsnihqj6hvhc9y1vaz36axafzqam7bh"))))
11035 (build-system python-build-system)
11036 (native-inputs
11037 `(("python-nose" ,python-nose)))
11038 (inputs
11039 `(("pkg-config" ,pkg-config)))
11040 (arguments
11041 `(;; Tests fail with "ValueError: _type_ 'v' not supported" on Python 3,
11042 ;; and on Python 2 they need the dl module deprecated since Python 2.6.
11043 #:tests? #f
11044 ;; Hard-code the path to pkg-config.
11045 #:phases
11046 (modify-phases %standard-phases
11047 (add-before
11048 'build 'patch
11049 (lambda _
11050 (substitute* "pkgconfig/pkgconfig.py"
11051 (("cmd = 'pkg-config")
11052 (string-append "cmd = '" (which "pkg-config"))))
11053 #t)))))
11054 (home-page "https://github.com/matze/pkgconfig")
11055 (synopsis "Python interface for pkg-config")
11056 (description "This module provides a Python interface to pkg-config. It
11057 can be used to find all pkg-config packages, check if a package exists,
11058 check if a package meets certain version requirements, query CFLAGS and
11059 LDFLAGS and parse the output to build extensions with setup.py.")
11060 (license license:expat)))
11061
11062 (define-public python2-pkgconfig
11063 (package-with-python2 python-pkgconfig))
11064
11065 (define-public python-bz2file
11066 (package
11067 (name "python-bz2file")
11068 (version "0.98")
11069 (source
11070 (origin
11071 (method url-fetch)
11072 (uri (pypi-uri "bz2file" version))
11073 (sha256
11074 (base32
11075 "126s53fkpx04f33a829yqqk8fj4png3qwg4m66cvlmhmwc8zihb4"))))
11076 (build-system python-build-system)
11077 (arguments
11078 `(#:tests? #f)) ; Tests use deprecated python modules.
11079 (home-page "https://github.com/nvawda/bz2file")
11080 (synopsis "Read and write bzip2-compressed files")
11081 (description
11082 "Bz2file is a Python library for reading and writing bzip2-compressed
11083 files. It contains a drop-in replacement for the I/O interface in the
11084 standard library's @code{bz2} module, including features from the latest
11085 development version of CPython that are not available in older releases.")
11086 (license license:asl2.0)
11087 (properties `((python2-variant . ,(delay python2-bz2file))))))
11088
11089 (define-public python2-bz2file
11090 (let ((base (package-with-python2
11091 (strip-python2-variant python-bz2file))))
11092 (package
11093 (inherit base)
11094 (arguments
11095 `(#:python ,python-2
11096 #:phases
11097 (modify-phases %standard-phases
11098 ;; 'python setup.py test' does not work as of 0.98.
11099 ;; There is only the one test file, so we run it directly.
11100 (replace 'check
11101 (lambda _ (zero? (system* "python"
11102 "test_bz2file.py"))))))))))
11103
11104 (define-public python-future
11105 (package
11106 (name "python-future")
11107 (version "0.16.0")
11108 (source
11109 (origin
11110 (method url-fetch)
11111 (uri (pypi-uri "future" version))
11112 (sha256
11113 (base32
11114 "1nzy1k4m9966sikp0qka7lirh8sqrsyainyf8rk97db7nwdfv773"))))
11115 (build-system python-build-system)
11116 ;; Many tests connect to the network or are otherwise flawed.
11117 ;; https://github.com/PythonCharmers/python-future/issues/210
11118 (arguments
11119 `(#:tests? #f))
11120 (home-page "http://python-future.org")
11121 (synopsis "Single-source support for Python 3 and 2")
11122 (description
11123 "@code{python-future} is the missing compatibility layer between Python 2 and
11124 Python 3. It allows you to use a single, clean Python 3.x-compatible codebase
11125 to support both Python 2 and Python 3 with minimal overhead.")
11126 (license license:expat)))
11127
11128 (define-public python2-future
11129 (package-with-python2 python-future))
11130
11131 (define-public python-cysignals
11132 (package
11133 (name "python-cysignals")
11134 (version "1.1.0")
11135 (source
11136 (origin
11137 (method url-fetch)
11138 (uri (pypi-uri "cysignals" version ".tar.bz2"))
11139 (sha256
11140 (base32
11141 "14cbyd9znlz6cxy1s3g6v6dv5jj45hn27pywkidd9b1zanaysqc6"))))
11142 (build-system python-build-system)
11143 (native-inputs
11144 `(("python-cython" ,python-cython)
11145 ("python-sphinx" ,python-sphinx)))
11146 (inputs
11147 `(("pari-gp" ,pari-gp)))
11148 (arguments
11149 `(#:modules ((guix build python-build-system)
11150 ((guix build gnu-build-system) #:prefix gnu:)
11151 (guix build utils))
11152 ;; FIXME: Tests are executed after installation and currently fail
11153 ;; when not installing into standard locations; the author is working
11154 ;; on a fix.
11155 #:tests? #f
11156 #:phases
11157 (modify-phases %standard-phases
11158 (add-before
11159 'build 'configure
11160 (assoc-ref gnu:%standard-phases 'configure)))))
11161 (home-page
11162 "https://github.com/sagemath/cysignals")
11163 (synopsis
11164 "Handling of interrupts and signals for Cython")
11165 (description
11166 "The cysignals package provides mechanisms to handle interrupts (and
11167 other signals and errors) in Cython code, using two related approaches,
11168 for mixed Cython/Python code or external C libraries and pure Cython code,
11169 respectively.")
11170 (license license:lgpl3+)))
11171
11172 (define-public python2-cysignals
11173 (package-with-python2 python-cysignals))
11174
11175 (define-public python2-shedskin
11176 (package
11177 (name "python2-shedskin")
11178 (version "0.9.4")
11179 (source
11180 (origin
11181 (method url-fetch)
11182 (uri (string-append "https://github.com/shedskin/shedskin/"
11183 "releases/download/v" version
11184 "/shedskin-" version ".tgz"))
11185 (sha256
11186 (base32
11187 "0nzwrzgw1ga8rw6f0ryq7zr9kkiavd1cqz5hzxkcbicl1dk7kz41"))))
11188 (build-system python-build-system)
11189 (arguments
11190 `(#:python ,python-2
11191 #:phases (modify-phases %standard-phases
11192 (add-after 'unpack 'fix-resulting-include-libs
11193 (lambda* (#:key inputs #:allow-other-keys)
11194 (let ((libgc (assoc-ref inputs "libgc"))
11195 (pcre (assoc-ref inputs "pcre")))
11196 (substitute* "shedskin/makefile.py"
11197 (("variable == 'CCFLAGS':[ ]*")
11198 (string-append "variable == 'CCFLAGS':\n"
11199 " line += ' -I " pcre "/include"
11200 " -I " libgc "/include'"))
11201 (("variable == 'LFLAGS':[ ]*")
11202 (string-append "variable == 'LFLAGS':\n"
11203 " line += ' -L" pcre "/lib"
11204 " -L " libgc "/lib'")))
11205 #t))))))
11206 (inputs `(("pcre" ,pcre)
11207 ("libgc" ,libgc)))
11208 (home-page "https://shedskin.github.io/")
11209 (synopsis "Experimental Python-2 to C++ Compiler")
11210 (description (string-append "This is an experimental compiler for a subset of
11211 Python. It generates C++ code and a Makefile."))
11212 (license (list license:gpl3 license:bsd-3 license:expat))))
11213
11214 (define-public python2-rope
11215 (package
11216 (name "python2-rope")
11217 (version "0.10.3")
11218 (source
11219 (origin
11220 (method url-fetch)
11221 (uri (pypi-uri "rope" version))
11222 (sha256
11223 (base32
11224 "18k5znhpwvrfck3yp0jmhd5j8r0f0s8bk1zh5yhs2cfgmfhbwigb"))))
11225 (arguments
11226 ;; Rope is currently python-2 only.
11227 ;; https://github.com/python-rope/rope/issues/57
11228 `(#:python ,python-2))
11229 (build-system python-build-system)
11230 (native-inputs
11231 `(("python2-unittest2" ,python2-unittest2)))
11232 (home-page "https://github.com/python-rope/rope")
11233 (synopsis "Refactoring library for Python")
11234 (description "Rope is a refactoring library for Python. It facilitates
11235 the renaming, moving and extracting of attributes, functions, modules, fields
11236 and parameters in Python 2 source code. These refactorings can also be applied
11237 to occurrences in strings and comments.")
11238 (license license:gpl2)))
11239
11240 (define-public python-py3status
11241 (package
11242 (name "python-py3status")
11243 (version "3.1")
11244 (source
11245 (origin
11246 (method url-fetch)
11247 (uri (pypi-uri "py3status" version))
11248 (sha256
11249 (base32
11250 "0i283z1pivmir61z8kbiycigc94l61v33ygzkhczf1ifq7cppyds"))))
11251 (build-system python-build-system)
11252 (arguments
11253 '(#:tests? #f)) ; TODO: Requires many libraries not in Guix.
11254 (home-page "https://github.com/ultrabug/py3status")
11255 (synopsis "Extensible i3status wrapper written in Python")
11256 (description "py3status is an i3status wrapper which extends i3status
11257 functionality in a modular way, allowing you to extend your panel with your
11258 own code, responding to click events and updating clock every second.")
11259 (license license:bsd-3)))
11260
11261 (define-public python-tblib
11262 (package
11263 (name "python-tblib")
11264 (version "1.3.0")
11265 (source (origin
11266 (method url-fetch)
11267 (uri (pypi-uri "tblib" version))
11268 (sha256 (base32
11269 "02iahfkfa927hb4jq2bak36ldihwapzacfiq5lyxg8llwn98a1yi"))))
11270 (build-system python-build-system)
11271 (arguments
11272 `(#:phases
11273 (modify-phases %standard-phases
11274 (replace 'check
11275 (lambda _
11276 ;; Upstream runs tests after installation and the package itself
11277 ;; resides in a subdirectory. Extend PYTHONPATH so it will be
11278 ;; found.
11279 (setenv "PYTHONPATH"
11280 (string-append (getcwd) "/build/lib:"
11281 (getenv "PYTHONPATH")))
11282 (zero? (system* "py.test" "-vv" "tests" "README.rst")))))))
11283 (native-inputs
11284 `(("python-pytest" ,python-pytest)
11285 ("python-six" ,python-six)))
11286 (home-page "https://github.com/ionelmc/python-tblib")
11287 (synopsis "Traceback serialization library")
11288 (description
11289 "Traceback serialization allows you to:
11290
11291 @enumerate
11292 @item Pickle tracebacks and raise exceptions with pickled tracebacks in
11293 different processes. This allows better error handling when running code over
11294 multiple processes (imagine multiprocessing, billiard, futures, celery etc).
11295
11296 @item Parse traceback strings and raise with the parsed tracebacks.
11297 @end enumerate\n")
11298 (license license:bsd-3)))
11299
11300 (define-public python2-tblib
11301 (package-with-python2 python-tblib))
11302
11303 (define-public python-sqlparse
11304 (package
11305 (name "python-sqlparse")
11306 (version "0.1.19")
11307 (source (origin
11308 (method url-fetch)
11309 (uri (pypi-uri "sqlparse" version))
11310 (sha256
11311 (base32
11312 "1s2fvaxgh9kqzrd6iwy5h7i61ckn05plx9np13zby93z3hdbx5nq"))))
11313 (build-system python-build-system)
11314 (arguments
11315 `(#:phases
11316 (modify-phases %standard-phases
11317 (replace 'check
11318 (lambda* _
11319 ;; setup.py-integrated 2to3 only affects the build files, but
11320 ;; py.test is using the source files. So we need to convert them
11321 ;; manually.
11322 (when (zero? (system* "python3"))
11323 (system* "2to3" "--no-diff" "-wn" "sqlparse" "tests"))
11324 (zero? (system* "py.test")))))))
11325 (native-inputs
11326 `(("python-pytest" ,python-pytest)))
11327 (home-page "https://github.com/andialbrecht/sqlparse")
11328 (synopsis "Non-validating SQL parser")
11329 (description "Sqlparse is a non-validating SQL parser for Python. It
11330 provides support for parsing, splitting and formatting SQL statements.")
11331 (license license:bsd-3)))
11332
11333 (define-public python2-sqlparse
11334 (package-with-python2 python-sqlparse))
11335
11336 (define-public python-greenlet
11337 (package
11338 (name "python-greenlet")
11339 (version "0.4.11")
11340 (source (origin
11341 (method url-fetch)
11342 (uri (pypi-uri "greenlet" version))
11343 (sha256
11344 (base32
11345 "1xhik26j4f3kc4qw9xmj0c567rb5h1zryb4ijwqnqwwjvfhbv59h"))))
11346 (build-system python-build-system)
11347 (home-page "https://greenlet.readthedocs.io/")
11348 (synopsis "Lightweight in-process concurrent programming")
11349 (description
11350 "Greenlet package is a spin-off of Stackless, a version of CPython
11351 that supports micro-threads called \"tasklets\". Tasklets run
11352 pseudo-concurrently (typically in a single or a few OS-level threads) and
11353 are synchronized with data exchanges on \"channels\".")
11354 (license (list license:psfl license:expat))))
11355
11356 (define-public python2-greenlet
11357 (package-with-python2 python-greenlet))
11358
11359 (define-public python-gevent
11360 (package
11361 (name "python-gevent")
11362 (version "1.1.1")
11363 (source (origin
11364 (method url-fetch)
11365 (uri (pypi-uri "gevent" version))
11366 (sha256
11367 (base32
11368 "1smf3kvidpdiyi2c81alal74p2zm0clrm6xbyy6y1k9a3f2vkrbf"))
11369 (modules '((guix build utils)))
11370 (snippet
11371 '(begin
11372 ;; unbunding libev and c-ares
11373 (for-each delete-file-recursively '("libev" "c-ares"))
11374 ;; fixing testsuite
11375 (call-with-output-file "greentest/__init__.py" noop)
11376 (substitute* "greentest/testrunner.py"
11377 (("import util") "from . import util")
11378 (("from util import log") "from .util import log"))))))
11379 (build-system python-build-system)
11380 (propagated-inputs
11381 `(("python-greenlet" ,python-greenlet)))
11382 (native-inputs
11383 `(("python-six" ,python-six)))
11384 (inputs
11385 `(("c-ares" ,c-ares)
11386 ("libev" ,libev)))
11387 (home-page "http://www.gevent.org/")
11388 (synopsis "Coroutine-based network library")
11389 (description
11390 "gevent is a coroutine-based Python networking library that uses greenlet
11391 to provide a high-level synchronous API on top of the libev event loop.")
11392 (license license:expat)))
11393
11394 (define-public python2-gevent
11395 (package-with-python2 python-gevent))
11396
11397 (define-public python-geventhttpclient
11398 (package
11399 (name "python-geventhttpclient")
11400 (version "1.3.1")
11401 (source (origin
11402 (method url-fetch)
11403 (uri (pypi-uri "geventhttpclient" version))
11404 (sha256
11405 (base32
11406 "07d0q3wzmml75227r6y6mrl5a0zpf4v9gj0ni5rhbyzmaj4az1xx"))
11407 (modules '((guix build utils)))
11408 (snippet
11409 '(begin
11410 ;; Delete pre-compiled files.
11411 (for-each delete-file (find-files "src/geventhttpclient"
11412 ".*\\.pyc"))
11413 #t))))
11414 (build-system python-build-system)
11415 (arguments
11416 '(#:phases
11417 (modify-phases %standard-phases
11418 (add-after 'unpack 'delete-network-tests
11419 (lambda _
11420 (delete-file "src/geventhttpclient/tests/test_client.py")
11421 #t))
11422 (delete 'check)
11423 (add-after 'install 'check
11424 (lambda* (#:key inputs outputs #:allow-other-keys)
11425 (add-installed-pythonpath inputs outputs)
11426 (zero? (system* "py.test" "src/geventhttpclient/tests" "-v")))))))
11427 (native-inputs
11428 `(("python-pytest" ,python-pytest)))
11429 (propagated-inputs
11430 `(("python-certifi" ,python-certifi)
11431 ("python-gevent" ,python-gevent)
11432 ("python-six" ,python-six)))
11433 (home-page "https://github.com/gwik/geventhttpclient")
11434 (synopsis "HTTP client library for gevent")
11435 (description "@code{python-geventhttpclient} is a high performance,
11436 concurrent HTTP client library for python using @code{gevent}.")
11437 (license license:expat)))
11438
11439 (define-public python2-geventhttpclient
11440 (package-with-python2 python-geventhttpclient))
11441
11442 (define-public python-fastimport
11443 (package
11444 (name "python-fastimport")
11445 (version "0.9.6")
11446 (source
11447 (origin
11448 (method url-fetch)
11449 (uri (pypi-uri "fastimport" version))
11450 (sha256
11451 (base32 "1aqjsin4rmqm7ln4j0p73fzxifws6c6ikgyhav7r137m2ixsxl43"))))
11452 (build-system python-build-system)
11453 (home-page "https://github.com/jelmer/python-fastimport")
11454 (synopsis "VCS fastimport parser and generator in Python")
11455 (description "This package provides a parser for and generator of the Git
11456 @url{https://www.kernel.org/pub/software/scm/git/docs/git-fast-import.html,fastimport}
11457 format.")
11458 (license license:gpl2+)))
11459
11460 (define-public python2-fastimport
11461 (package-with-python2 python-fastimport))
11462
11463 (define-public python-twisted
11464 (package
11465 (name "python-twisted")
11466 (version "16.2.0")
11467 (source (origin
11468 (method url-fetch)
11469 (uri (pypi-uri "Twisted" version ".tar.bz2"))
11470 (sha256
11471 (base32
11472 "0ydxrp9myw1mvsz3qfzx5579y5llmqa82pxvqchgp5syczffi450"))))
11473 (build-system python-build-system)
11474 (arguments
11475 '(#:tests? #f)) ; FIXME: Some tests are failing.
11476 ;; #:phases
11477 ;; (modify-phases %standard-phases
11478 ;; (replace 'check
11479 ;; (lambda _
11480 ;; (zero? (system* "./bin/trial" "twisted")))))
11481 (propagated-inputs
11482 `(("python-zope-interface" ,python-zope-interface)))
11483 (home-page "https://twistedmatrix.com/")
11484 (synopsis "Asynchronous networking framework written in Python")
11485 (description
11486 "Twisted is an extensible framework for Python programming, with special
11487 focus on event-based network programming and multiprotocol integration.")
11488 (license license:expat)))
11489
11490 (define-public python2-twisted
11491 (package-with-python2 python-twisted))
11492
11493 (define-public python-pika
11494 (package
11495 (name "python-pika")
11496 (version "0.10.0")
11497 (source
11498 (origin
11499 (method url-fetch)
11500 (uri (pypi-uri "pika" version))
11501 (sha256
11502 (base32
11503 "0nb4h08di432lv7dy2v9kpwgk0w92f24sqc2hw2s9vwr5b8v8xvj"))))
11504 (build-system python-build-system)
11505 (native-inputs
11506 `(("python-pyev" ,python-pyev)
11507 ("python-tornado" ,python-tornado)
11508 ("python-twisted" ,python-twisted)))
11509 (home-page "https://pika.readthedocs.org")
11510 (synopsis "Pure Python AMQP Client Library")
11511 (description
11512 "Pika is a pure-Python implementation of the AMQP (Advanced Message Queuing
11513 Protocol) 0-9-1 protocol that tries to stay fairly independent of the underlying
11514 network support library.")
11515 (license license:bsd-3)))
11516
11517 (define-public python2-pika
11518 (package-with-python2 python-pika))
11519
11520 (define-public python-ply
11521 (package
11522 (name "python-ply")
11523 (version "3.9")
11524 (source
11525 (origin
11526 (method url-fetch)
11527 (uri (pypi-uri "ply" version))
11528 (sha256
11529 (base32
11530 "0gpl0yli3w03ipyqfrp3w5nf0iawhsq65anf5wwm2wf5p502jzhd"))))
11531 (build-system python-build-system)
11532 (home-page "http://www.dabeaz.com/ply/")
11533 (synopsis "Python Lex & Yacc")
11534 (description "PLY is a @code{lex}/@code{yacc} implemented purely in Python.
11535 It uses LR parsing and does extensive error checking.")
11536 (license license:bsd-3)))
11537
11538 (define-public python2-ply
11539 (package-with-python2 python-ply))
11540
11541 (define-public python-tabulate
11542 (package
11543 (name "python-tabulate")
11544 (version "0.7.7")
11545 (source (origin
11546 (method url-fetch)
11547 (uri (pypi-uri "tabulate" version))
11548 (sha256
11549 (base32
11550 "1inqhspd4frxnp08c32yndr0lc4px1xfkqah184i5w09gkhvi843"))))
11551 (build-system python-build-system)
11552 (arguments
11553 ;; FIXME: The pypi release tarball is missing a 'test/common.py'
11554 ;; and the latest release is not tagged in the upstream repository.
11555 '(#:tests? #f))
11556 (home-page "https://bitbucket.org/astanin/python-tabulate")
11557 (synopsis "Pretty-print tabular data")
11558 (description
11559 "Tabulate is a library and command-line utility to pretty-print tabular
11560 data in Python.")
11561 (license license:expat)))
11562
11563 (define-public python2-tabulate
11564 (package-with-python2 python-tabulate))
11565
11566 (define-public python-kazoo
11567 (package
11568 (name "python-kazoo")
11569 (version "2.2.1")
11570 (source
11571 (origin
11572 (method url-fetch)
11573 (uri (pypi-uri "kazoo" version))
11574 (sha256
11575 (base32
11576 "10pb864if9qi2pq9lfb9m8f7z7ss6rml80gf1d9h64lap5crjnjj"))))
11577 (build-system python-build-system)
11578 (arguments '(#:tests? #f)) ; XXX: needs zookeeper
11579 (propagated-inputs
11580 `(("python-six" ,python-six)))
11581 (home-page "https://kazoo.readthedocs.org")
11582 (synopsis "High-level Zookeeper client library")
11583 (description
11584 "Kazoo is a Python client library for the Apache Zookeeper distributed
11585 application service. It is designed to be easy to use and to avoid common
11586 programming errors.")
11587 (license license:asl2.0)))
11588
11589 (define-public python2-kazoo
11590 (package-with-python2 python-kazoo))
11591
11592 (define-public python-pykafka
11593 (package
11594 (name "python-pykafka")
11595 (version "2.4.0")
11596 (source (origin
11597 (method url-fetch)
11598 (uri (string-append
11599 "https://pypi.python.org/packages/8b/3e/"
11600 "384eeff406b06315738b62483fd2126c6e4f544167116b17cc04ea7d2a59/"
11601 "pykafka-" version ".tar.gz"))
11602 (sha256
11603 (base32
11604 "1id6sr159p6aa13bxcqyr9gln8sqg1l0ddzns5iws8kk5q1p5cfv"))))
11605 (build-system python-build-system)
11606 (arguments '(#:tests? #f)) ; XXX: needs zookeeper, kafka, etc.
11607 (propagated-inputs
11608 `(("python-gevent" ,python-gevent)
11609 ("python-kazoo" ,python-kazoo)
11610 ("python-tabulate" ,python-tabulate)))
11611 (inputs
11612 `(("librdkafka" ,librdkafka)))
11613 (home-page "https://pykafka.readthedocs.io/")
11614 (synopsis "Apache Kafka client for Python")
11615 (description
11616 "PyKafka is a client for the Apache Kafka distributed messaging system.
11617 It includes Python implementations of Kafka producers and consumers, which
11618 are optionally backed by a C extension built on librdkafka.")
11619 (license license:asl2.0)))
11620
11621 (define-public python2-pykafka
11622 (package-with-python2 python-pykafka))
11623
11624 (define-public python-wcwidth
11625 (package
11626 (name "python-wcwidth")
11627 (version "0.1.7")
11628 (source
11629 (origin
11630 (method url-fetch)
11631 (uri (pypi-uri "wcwidth" version))
11632 (sha256
11633 (base32
11634 "0pn6dflzm609m4r3i8ik5ni9ijjbb5fa3vg1n7hn6vkd49r77wrx"))))
11635 (build-system python-build-system)
11636 (home-page "https://github.com/jquast/wcwidth")
11637 (synopsis "Measure number of terminal column cells of wide-character codes")
11638 (description "Wcwidth measures the number of terminal column cells of
11639 wide-character codes. It is useful for those implementing a terminal emulator,
11640 or programs that carefully produce output to be interpreted by one. It is a
11641 Python implementation of the @code{wcwidth} and @code{wcswidth} C functions
11642 specified in POSIX.1-2001 and POSIX.1-2008.")
11643 (license license:expat)))
11644
11645 (define-public python2-wcwidth
11646 (package-with-python2 python-wcwidth))
11647
11648 (define-public python2-jsonrpclib
11649 (package
11650 (name "python2-jsonrpclib")
11651 (version "0.1.7")
11652 (source (origin
11653 (method url-fetch)
11654 (uri (string-append
11655 "https://pypi.python.org/packages/source/j/jsonrpclib/"
11656 "jsonrpclib-" version ".tar.gz"))
11657 (sha256
11658 (base32
11659 "02vgirw2bcgvpcxhv5hf3yvvb4h5wzd1lpjx8na5psdmaffj6l3z"))))
11660 (build-system python-build-system)
11661 (arguments
11662 `(#:tests? #f
11663 #:python ,python-2))
11664 (home-page "https://github.com/joshmarshall/jsonrpclib/")
11665 (synopsis "Implementation of JSON-RPC specification for Python")
11666 (description
11667 "This library is an implementation of the JSON-RPC specification.
11668 It supports both the original 1.0 specification, as well as the
11669 new (proposed) 2.0 spec, which includes batch submission, keyword arguments,
11670 etc.")
11671 (license license:asl2.0)))
11672
11673 (define-public python-chai
11674 (package
11675 (name "python-chai")
11676 (version "1.1.1")
11677 (source (origin
11678 (method url-fetch)
11679 (uri (pypi-uri "chai" version))
11680 (sha256
11681 (base32
11682 "016kf3irrclpkpvcm7q0gmkfibq7jgy30a9v73pp42bq9h9a32bl"))))
11683 (build-system python-build-system)
11684 (home-page "https://github.com/agoragames/chai")
11685 (synopsis "Mocking framework for Python")
11686 (description
11687 "Chai provides an api for mocking, stubbing and spying your python
11688 objects, patterned after the Mocha library for Ruby.")
11689 (license license:bsd-3)))
11690
11691 (define-public python2-chai
11692 (package-with-python2 python-chai))
11693
11694 (define-public python-arrow
11695 (package
11696 (name "python-arrow")
11697 (version "0.8.0")
11698 (source (origin
11699 (method url-fetch)
11700 (uri (pypi-uri "arrow" version))
11701 (sha256
11702 (base32
11703 "1bz7hkdgpqcjs866y58z8jywpy7al0f4rxdr00bh2l5qddyw245j"))))
11704 (build-system python-build-system)
11705 (native-inputs
11706 `(;; For testing
11707 ("python-chai" ,python-chai)
11708 ("python-simplejson" ,python-simplejson)))
11709 (propagated-inputs
11710 `(("python-dateutil" ,python-dateutil)))
11711 (home-page "https://github.com/crsmithdev/arrow/")
11712 (synopsis "Dates and times for Python")
11713 (description
11714 "Arrow is a Python library to creating, manipulating, formatting and
11715 converting dates, times, and timestamps. It implements and updates the
11716 datetime type.")
11717 (license license:asl2.0)))
11718
11719 (define-public python2-arrow
11720 (package-with-python2 python-arrow))
11721
11722 (define-public python-inflection
11723 (package
11724 (name "python-inflection")
11725 (version "0.3.1")
11726 (source
11727 (origin (method url-fetch)
11728 (uri (pypi-uri "inflection" version))
11729 (sha256
11730 (base32
11731 "1jhnxgnw8y3mbzjssixh6qkc7a3afc4fygajhqrqalnilyvpzshq"))))
11732 (build-system python-build-system)
11733 (native-inputs
11734 `(("python-pytest" ,python-pytest)))
11735 (home-page "https://github.com/jpvanhal/inflection")
11736 (synopsis "Python string transformation library")
11737 (description
11738 "Inflection is a string transformation library. It singularizes
11739 and pluralizes English words, and transforms strings from CamelCase to
11740 underscored string.")
11741 (license license:expat)))
11742
11743 (define-public python2-inflection
11744 (package-with-python2 python-inflection))
11745
11746 (define-public python-pylev
11747 (package
11748 (name "python-pylev")
11749 (version "1.3.0")
11750 (source (origin
11751 (method url-fetch)
11752 (uri (pypi-uri "pylev" version))
11753 (sha256
11754 (base32
11755 "1hz1x9blsbxya1y9nnhnwwdnqmakxi9mc0jkwj0rn6b1h44i0f86"))))
11756 (build-system python-build-system)
11757 (home-page "https://github.com/toastdriven/pylev")
11758 (synopsis "Levenshtein distance implementation in Python")
11759 (description "Pure Python Levenshtein implementation, based off the
11760 Wikipedia code samples at
11761 @url{http://en.wikipedia.org/wiki/Levenshtein_distance}.")
11762 (license license:bsd-3)))
11763
11764 (define-public python2-pylev
11765 (package-with-python2 python-pylev))
11766
11767 (define-public python-cleo
11768 (package
11769 (name "python-cleo")
11770 (version "0.4.1")
11771 (source (origin
11772 (method url-fetch)
11773 (uri (pypi-uri "cleo" version))
11774 (sha256
11775 (base32
11776 "1k2dcl6mqpn5bljyl6w42rqyd9mb3y9kh2mg7m2x3kfjwvg0rpva"))))
11777 (build-system python-build-system)
11778 (native-inputs
11779 `(;; For testing
11780 ("python-mock" ,python-mock)
11781 ("python-pytest" ,python-pytest)))
11782 (propagated-inputs
11783 `(("python-psutil" ,python-psutil)
11784 ("python-pylev" ,python-pylev)))
11785 (home-page "https://github.com/sdispater/cleo")
11786 (synopsis "Command-line arguments library for Python")
11787 (description
11788 "Cleo allows you to create command-line commands with signature in
11789 docstring and colored output.")
11790 (license license:expat)))
11791
11792 (define-public python2-cleo
11793 (package-with-python2 python-cleo))
11794
11795 (define-public python-lazy-object-proxy
11796 (package
11797 (name "python-lazy-object-proxy")
11798 (version "1.2.2")
11799 (source (origin
11800 (method url-fetch)
11801 (uri (pypi-uri "lazy-object-proxy" version))
11802 (sha256
11803 (base32
11804 "0s22aqqkdscyh8sjspyyax7qa1aiz8p4midrnyf39717fhfczm6x"))))
11805 (build-system python-build-system)
11806 (home-page "https://github.com/ionelmc/python-lazy-object-proxy")
11807 (synopsis "Lazy object proxy for python")
11808 (description
11809 "Lazy object proxy is an object that wraps a callable but defers the call
11810 until the object is actually required, and caches the result of said call.")
11811 (license license:bsd-2)))
11812
11813 (define-public python2-lazy-object-proxy
11814 (package-with-python2 python-lazy-object-proxy))
11815
11816 (define-public python-dnspython
11817 (package
11818 (name "python-dnspython")
11819 (version "1.15.0")
11820 (source (origin
11821 (method url-fetch)
11822 (uri (string-append "http://www.dnspython.org/kits/"
11823 version "/dnspython-" version ".tar.gz"))
11824 (sha256
11825 (base32
11826 "0jr4v2pd90i6l1xxbss2m05psbjaxvyvvvpq44wycijpfgjqln8i"))))
11827 (build-system python-build-system)
11828 (arguments '(#:tests? #f)) ; XXX: requires internet access
11829 (home-page "http://www.dnspython.org")
11830 (synopsis "DNS toolkit for Python")
11831 (description
11832 "dnspython is a DNS toolkit for Python. It supports almost all record
11833 types. It can be used for queries, zone transfers, and dynamic updates.
11834 It supports TSIG authenticated messages and EDNS0.")
11835 (license license:expat)))
11836
11837 (define-public python2-dnspython
11838 (package-with-python2 python-dnspython))
11839
11840 (define-public python-email-validator
11841 (package
11842 (name "python-email-validator")
11843 (version "1.0.2")
11844 (source
11845 (origin (method url-fetch)
11846 (uri (pypi-uri "email_validator" version))
11847 (sha256
11848 (base32
11849 "1ja9149l9ck5n45a72h3is7v476hjny5ybxbcamx1nw6iplsm7k6"))))
11850 (build-system python-build-system)
11851 (arguments
11852 '(#:phases
11853 (modify-phases %standard-phases
11854 (add-before 'build 'use-dnspython
11855 (lambda _
11856 (substitute* "setup.py"
11857 (("dnspython3") "dnspython"))
11858 #t)))))
11859 (propagated-inputs
11860 `(("python-dnspython" ,python-dnspython)
11861 ("python-idna" ,python-idna)))
11862 (home-page "https://github.com/JoshData/python-email-validator")
11863 (synopsis "Email address validation library for Python")
11864 (description
11865 "This library validates email address syntax and deliverability.")
11866 (license license:cc0)))
11867
11868 (define-public python2-email-validator
11869 (package-with-python2 python-email-validator))
11870
11871 (define-public python-ukpostcodeparser
11872 (package
11873 (name "python-ukpostcodeparser")
11874 (version "1.0.3")
11875 (source (origin
11876 (method url-fetch)
11877 (uri (pypi-uri "UkPostcodeParser" version))
11878 (sha256
11879 (base32
11880 "1jwg9z4rz51mcka1821rwgycsd0mcicyp1kiwjfa2kvg8bm9p2qd"))))
11881 (build-system python-build-system)
11882 (home-page "https://github.com/hamstah/ukpostcodeparser")
11883 (synopsis "UK Postcode parser for Python")
11884 (description
11885 "This library provides the @code{parse_uk_postcode} function for
11886 parsing UK postcodes.")
11887 (license license:expat)))
11888
11889 (define-public python2-ukpostcodeparser
11890 (package-with-python2 python-ukpostcodeparser))
11891
11892 (define-public python-faker
11893 (package
11894 (name "python-faker")
11895 (version "0.7.9")
11896 (source (origin
11897 (method url-fetch)
11898 (uri (pypi-uri "Faker" version))
11899 (sha256
11900 (base32
11901 "1fh2p2yz0fsdr4fqwxgddwbvfb6qn6vp8yx0qwqzra27yq5d1wsm"))
11902 (patches
11903 (search-patches "python-faker-fix-build-32bit.patch"))
11904 (modules '((guix build utils)))
11905 (snippet
11906 '(begin
11907 (for-each delete-file (find-files "." "\\.pyc$"))
11908 #t))))
11909 (build-system python-build-system)
11910 (arguments
11911 '(#:phases
11912 (modify-phases %standard-phases
11913 (replace 'check
11914 (lambda _
11915 (zero? (system* "python" "-m" "unittest" "-v" "tests")))))))
11916 (native-inputs
11917 `(;; For testing
11918 ("python-email-validator" ,python-email-validator)
11919 ("python-mock" ,python-mock)
11920 ("python-ukpostcodeparser" ,python-ukpostcodeparser)))
11921 (propagated-inputs
11922 `(("python-dateutil" ,python-dateutil)
11923 ("python-six" ,python-six)))
11924 (home-page "https://github.com/joke2k/faker")
11925 (synopsis "Python package that generates fake data")
11926 (description
11927 "Faker is a Python package that generates fake data such as names,
11928 addresses, and phone numbers.")
11929 (license license:expat)
11930 (properties `((python2-variant . ,(delay python2-faker))))))
11931
11932 (define-public python2-faker
11933 (let ((base (package-with-python2 (strip-python2-variant
11934 python-faker))))
11935 (package
11936 (inherit base)
11937 (propagated-inputs
11938 `(("python2-ipaddress" ,python2-ipaddress)
11939 ,@(package-propagated-inputs base))))))
11940
11941 (define-public python-pyaml
11942 (package
11943 (name "python-pyaml")
11944 (version "15.8.2")
11945 (source (origin
11946 (method url-fetch)
11947 (uri (pypi-uri "pyaml" version))
11948 (sha256
11949 (base32
11950 "1f5m28vkh4ksq3d80d8mmd2z8wxvc3mgy2pmrv2751dm2xgznm4w"))))
11951 (build-system python-build-system)
11952 (native-inputs
11953 `(("python-unidecode" ,python-unidecode)))
11954 (propagated-inputs
11955 `(("python-pyyaml" ,python-pyyaml)))
11956 (home-page "https://github.com/mk-fg/pretty-yaml")
11957 (synopsis "YAML pretty-print library for Python")
11958 (description
11959 "pyaml is a PyYAML based python module to produce pretty and readable
11960 YAML-serialized data.")
11961 (license (license:non-copyleft "http://www.wtfpl.net/txt/copying/"))))
11962
11963 (define-public python2-pyaml
11964 (package-with-python2 python-pyaml))
11965
11966 (define-public python-flexmock
11967 (package
11968 (name "python-flexmock")
11969 (version "0.10.2")
11970 (source (origin
11971 (method url-fetch)
11972 (uri (pypi-uri "flexmock" version))
11973 (sha256
11974 (base32
11975 "0arc6njvs6i9v9hgvzk5m50296g7zy5m9d7pyb43vdsdgxrci5gy"))))
11976 (build-system python-build-system)
11977 (home-page "https://flexmock.readthedocs.org")
11978 (synopsis "Testing library for Python")
11979 (description
11980 "flexmock is a testing library for Python that makes it easy to create
11981 mocks, stubs and fakes.")
11982 (license license:bsd-3)))
11983
11984 (define-public python2-flexmock
11985 (package-with-python2 python-flexmock))
11986
11987 (define-public python-orator
11988 (package
11989 (name "python-orator")
11990 (version "0.8.2")
11991 (source (origin
11992 (method url-fetch)
11993 (uri (pypi-uri "orator" version))
11994 (sha256
11995 (base32
11996 "1li49irsqha17nrda4nsb48biyy0rarp9pphf0jpqwm5zr8hv569"))))
11997 (build-system python-build-system)
11998 (arguments '(#:tests? #f)) ; no tests
11999 (propagated-inputs
12000 `(("python-arrow" ,python-arrow)
12001 ("python-blinker" ,python-blinker)
12002 ("python-cleo" ,python-cleo)
12003 ("python-faker" ,python-faker)
12004 ("python-inflection" ,python-inflection)
12005 ("python-lazy-object-proxy" ,python-lazy-object-proxy)
12006 ("python-pyaml" ,python-pyaml)
12007 ("python-simplejson" ,python-simplejson)
12008 ("python-wrapt" ,python-wrapt)))
12009 (home-page "https://orator-orm.com/")
12010 (synopsis "ActiveRecord ORM for Python")
12011 (description
12012 "Orator provides a simple ActiveRecord-like Object Relational Mapping
12013 implementation for Python.")
12014 (license license:expat)
12015 (properties `((python2-variant . ,(delay python2-orator))))))
12016
12017 (define-public python2-orator
12018 (let ((base (package-with-python2 (strip-python2-variant python-orator))))
12019 (package
12020 (inherit base)
12021 (propagated-inputs
12022 `(("python2-ipaddress" ,python2-ipaddress)
12023 ,@(package-propagated-inputs base))))))
12024
12025 (define-public python-prompt-toolkit
12026 (package
12027 (name "python-prompt-toolkit")
12028 (version "1.0.9")
12029 (source
12030 (origin
12031 (method url-fetch)
12032 (uri (pypi-uri "prompt_toolkit" version ".tar.gz"))
12033 (sha256
12034 (base32
12035 "172r15k9kwdw2lnajvpz1632dd16nqz1kcal1p0lq5ywdarj6rfd"))))
12036 (build-system python-build-system)
12037 (arguments
12038 '(#:tests? #f)) ; The test suite uses some Windows-specific data types.
12039 (propagated-inputs
12040 `(("python-wcwidth" ,python-wcwidth)
12041 ("python-six" ,python-six)
12042 ("python-pygments" ,python-pygments)))
12043 (home-page "https://github.com/jonathanslenders/python-prompt-toolkit")
12044 (synopsis "Library for building command line interfaces in Python")
12045 (description
12046 "Prompt-Toolkit is a library for building interactive command line
12047 interfaces in Python. It's like GNU Readline but it also features syntax
12048 highlighting while typing, out-of-the-box multi-line input editing, advanced
12049 code completion, incremental search, support for Chinese double-width
12050 characters, mouse support, and auto suggestions.")
12051 (license license:bsd-3)))
12052
12053 (define-public python2-prompt-toolkit
12054 (package-with-python2 python-prompt-toolkit))
12055
12056 (define-public python-jedi
12057 (package
12058 (name "python-jedi")
12059 (version "0.9.0")
12060 (source
12061 (origin
12062 (method url-fetch)
12063 (uri (pypi-uri "jedi" version))
12064 (sha256
12065 (base32
12066 "0c8x962ynpx001fdvp07m2q5jk4igkxbj3rmnydavphvlgxijk1v"))))
12067 (build-system python-build-system)
12068 (arguments
12069 ;; FIXME: One test fails (use "py.test" instead of 'setup.py test').
12070 '(#:tests? #f))
12071 (native-inputs
12072 `(("python-pytest" ,python-pytest)))
12073 (home-page "https://github.com/davidhalter/jedi")
12074 (synopsis
12075 "Autocompletion for Python that can be used for text editors")
12076 (description
12077 "Jedi is an autocompletion tool for Python that can be used for text editors.")
12078 (license license:expat)))
12079
12080 (define-public python2-jedi
12081 (package-with-python2 python-jedi))
12082
12083 (define-public ptpython
12084 (package
12085 (name "ptpython")
12086 (version "0.34")
12087 (source (origin
12088 (method url-fetch)
12089 (uri (pypi-uri "ptpython" version))
12090 (sha256
12091 (base32
12092 "1mmbiyzf0n8hm7z2a562x7w5cbl6jc0zsk6vp40q1z4cyblv1k13"))))
12093 (build-system python-build-system)
12094 (arguments
12095 '(#:tests? #f)) ; FIXME: No tests in pypi tarball.
12096 (propagated-inputs
12097 `(("python-docopt" ,python-docopt)
12098 ("python-jedi" ,python-jedi)
12099 ("python-prompt-toolkit" ,python-prompt-toolkit)
12100 ("python-pygments" ,python-pygments)))
12101 (home-page "https://github.com/jonathanslenders/ptpython")
12102 (synopsis "Python Read-Eval-Print-Loop with nice IDE-like features")
12103 (description
12104 "ptpython is a Python read-eval-print loop with IDE-like features.
12105 It supports syntax highlighting, multiline editing, autocompletion, mouse,
12106 color schemes, bracketed paste, Vi and Emacs keybindings, Chinese characters
12107 etc.")
12108 (license license:bsd-3)
12109 (properties `((python2-variant . ,(delay ptpython-2))))))
12110
12111 (define-public ptpython-2
12112 (let ((base (package-with-python2 (strip-python2-variant ptpython))))
12113 (package
12114 (inherit base)
12115 (name "ptpython2"))))
12116
12117 (define-public python-requests-oauthlib
12118 (package
12119 (name "python-requests-oauthlib")
12120 (version "0.6.2")
12121 (source
12122 (origin
12123 (method url-fetch)
12124 (uri (pypi-uri "requests-oauthlib" version))
12125 (sha256
12126 (base32
12127 "0ykff67sjcl227c23g0rxzfx34rr5bf21kwv0z3zmgk0lfmch7hn"))))
12128 (build-system python-build-system)
12129 (arguments
12130 `(#:phases
12131 (modify-phases %standard-phases
12132 ;; removes tests that require network access
12133 (add-before 'check 'pre-check
12134 (lambda _
12135 (delete-file "tests/test_core.py")
12136 #t)))))
12137 (native-inputs
12138 `(("python-requests-mock" ,python-requests-mock)
12139 ("python-mock" ,python-mock)))
12140 (propagated-inputs
12141 `(("python-oauthlib" ,python-oauthlib)
12142 ("python-requests" ,python-requests)))
12143 (home-page
12144 "https://github.com/requests/requests-oauthlib")
12145 (synopsis
12146 "OAuthlib authentication support for Requests")
12147 (description
12148 "Requests-OAuthlib uses the Python Requests and OAuthlib libraries to
12149 provide an easy-to-use Python interface for building OAuth1 and OAuth2 clients.")
12150 (license license:isc)))
12151
12152 (define-public python2-requests-oauthlib
12153 (package-with-python2 python-requests-oauthlib))
12154
12155 (define-public python-stem
12156 (package
12157 (name "python-stem")
12158 (version "1.5.4")
12159 (source
12160 (origin
12161 (method url-fetch)
12162 (uri (pypi-uri "stem" version))
12163 (sha256
12164 (base32
12165 "1j7pnblrn0yr6jmxvsq6y0ihmxmj5x50jl2n2606w67f6wq16j9n"))))
12166 (build-system python-build-system)
12167 (arguments
12168 `(#:phases
12169 (modify-phases %standard-phases
12170 (replace 'check
12171 (lambda _
12172 (zero? (system* "./run_tests.py" "--unit")))))))
12173 (native-inputs
12174 `(("python-mock" ,python-mock)
12175 ("python-pep8" ,python-pep8)
12176 ("python-pyflakes" ,python-pyflakes)))
12177 (home-page "https://stem.torproject.org/")
12178 (synopsis
12179 "Python controller library that allows applications to interact with Tor")
12180 (description
12181 "Stem is a Python controller library for Tor. With it you can use Tor's
12182 control protocol to script against the Tor process and read descriptor data
12183 relays publish about themselves.")
12184 (license license:lgpl3)))
12185
12186 (define-public python2-stem
12187 (package-with-python2 python-stem))
12188
12189 (define-public python-pyserial
12190 (package
12191 (name "python-pyserial")
12192 (version "3.1.1")
12193 (source
12194 (origin
12195 (method url-fetch)
12196 (uri (pypi-uri "pyserial" version))
12197 (sha256
12198 (base32
12199 "0k1nfdrxxkdlv4zgaqsdv8li0pj3gbh2pyxw8q2bsg6f9490amyn"))))
12200 (build-system python-build-system)
12201 (arguments
12202 '(#:tests? #f)) ; FIXME: 3/49 tests are failing.
12203 ;; #:phases
12204 ;; (modify-phases %standard-phases
12205 ;; (replace 'check
12206 ;; (lambda _
12207 ;; (zero? (system* "python" "test/run_all_tests.py" "loop://")))))))
12208 (home-page
12209 "https://github.com/pyserial/pyserial")
12210 (synopsis "Python Serial Port Bindings")
12211 (description "@code{pyserial} provide serial port bindings for Python. It
12212 supports different byte sizes, stop bits, parity and flow control with RTS/CTS
12213 and/or Xon/Xoff. The port is accessed in RAW mode.")
12214 (license license:bsd-3)))
12215
12216 (define-public python2-pyserial
12217 (package-with-python2 python-pyserial))
12218
12219 (define-public python-kivy
12220 (package
12221 (name "python-kivy")
12222 (version "1.9.1")
12223 (source
12224 (origin
12225 (method url-fetch)
12226 (uri (pypi-uri "kivy" version))
12227 (file-name (string-append name "-" version ".tar.gz"))
12228 (sha256
12229 (base32
12230 "0zk3g1j1z0lzcm9d0k1lprrs95zr8n8k5pdg3p5qlsn26jz4bg19"))))
12231 (build-system python-build-system)
12232 (arguments
12233 `(#:tests? #f ; Tests require many optional packages
12234 #:phases
12235 (modify-phases %standard-phases
12236 (replace 'build (lambda _ (zero? (system* "make" "force"))))
12237 (add-after 'patch-generated-file-shebangs 'set-sdl-paths
12238 (lambda* (#:key inputs #:allow-other-keys)
12239 (setenv "KIVY_SDL2_PATH"
12240 (string-append (assoc-ref inputs "sdl-union")
12241 "/include/SDL2"))
12242 #t)))))
12243 (native-inputs
12244 `(("pkg-config" ,pkg-config)
12245 ("python-cython" ,python-cython)))
12246 (inputs
12247 `(("gstreamer" ,gstreamer)
12248 ("mesa" ,mesa)
12249 ("sdl-union"
12250 ,(sdl-union (list sdl2 sdl2-image sdl2-mixer sdl2-ttf)))))
12251 (home-page "http://kivy.org")
12252 (synopsis
12253 "Multitouch application framework")
12254 (description
12255 "A software library for rapid development of
12256 hardware-accelerated multitouch applications.")
12257 (license license:expat)))
12258
12259 (define-public python2-kivy
12260 (package-with-python2 python-kivy))
12261
12262 (define-public python-kivy-next
12263 (let ((commit "a988c5e7a47da56263ff39514264a3de516ef2fe")
12264 (revision "1"))
12265 (package (inherit python-kivy)
12266 (name "python-kivy-next")
12267 (version (string-append "1.9.1-" revision "."
12268 (string-take commit 7)))
12269 (source
12270 (origin
12271 (method git-fetch)
12272 (uri (git-reference
12273 (url "https://github.com/kivy/kivy")
12274 (commit commit)))
12275 (file-name (string-append name "-" version "-checkout"))
12276 (sha256
12277 (base32
12278 "0jk92b4a8l7blkvkgkjihk171s0dfnq582cckff5srwc8kal5m0p")))))))
12279
12280 (define-public python2-kivy-next
12281 (package-with-python2 python-kivy-next))
12282
12283 (define-public python-binaryornot
12284 (package
12285 (name "python-binaryornot")
12286 (version "0.4.0")
12287 (source (origin
12288 (method url-fetch)
12289 (uri (pypi-uri "binaryornot" version))
12290 (sha256
12291 (base32
12292 "1j4f51dxic39mdwf6alj7gd769wy6mhk916v031wjali51xkh3xb"))))
12293 (build-system python-build-system)
12294 (propagated-inputs
12295 `(("python-chardet" ,python-chardet)
12296 ("python-hypothesis" ,python-hypothesis)))
12297 (home-page "https://github.com/audreyr/binaryornot")
12298 (synopsis "Package to check if a file is binary or text")
12299 (description "Ultra-lightweight pure Python package to check if a file is
12300 binary or text.")
12301 (license license:bsd-3)
12302 (properties `((python2-variant . ,(delay python2-binaryornot))))))
12303
12304 (define-public python2-binaryornot
12305 (let ((base (package-with-python2 (strip-python2-variant python-binaryornot))))
12306 (package (inherit base)
12307 (propagated-inputs
12308 `(("python2-enum34" ,python2-enum34)
12309 ,@(package-propagated-inputs base))))))
12310
12311 (define-public python-nltk
12312 (package
12313 (name "python-nltk")
12314 (version "3.2.1")
12315 (source (origin
12316 (method url-fetch)
12317 (uri (pypi-uri "nltk" version))
12318 (sha256
12319 (base32
12320 "0skxbhnymwlspjkzga0f7x1hg3y50fwpfghs8g8k7fh6f4nknlym"))))
12321 (build-system python-build-system)
12322 (arguments
12323 '(;; The tests require some extra resources to be downloaded.
12324 ;; TODO Try packaging these resources.
12325 #:tests? #f))
12326 (home-page "http://nltk.org/")
12327 (synopsis "Natural Language Toolkit")
12328 (description "It provides interfaces to over 50 corpora and lexical
12329 resources such as WordNet, along with a suite of text processing libraries
12330 for classification, tokenization, stemming, tagging, parsing, and semantic
12331 reasoning, wrappers for natural language processing libraries.")
12332 (license license:asl2.0)))
12333
12334 (define-public python2-nltk
12335 (package-with-python2 python-nltk))
12336
12337 (define-public python-pymongo
12338 (package
12339 (name "python-pymongo")
12340 (version "3.3.0")
12341 (source (origin
12342 (method url-fetch)
12343 (uri (pypi-uri "pymongo" version))
12344 (sha256
12345 (base32
12346 "07mra6w86wjqy4lx5fvimidjhhfzd562gfjn8grsnbv2q8pk0i9x"))))
12347 (build-system python-build-system)
12348 (propagated-inputs
12349 `(("python-certifi" ,python-certifi)))
12350 (home-page "https://github.com/mongodb/mongo-python-driver")
12351 (synopsis "Python driver for MongoDB")
12352 (description "Python driver for MongoDB.")
12353 (license license:asl2.0)))
12354
12355 (define-public python2-pymongo
12356 (package-with-python2 python-pymongo))
12357
12358 (define-public python-sh
12359 (package
12360 (name "python-sh")
12361 (version "1.11")
12362 (source (origin
12363 (method url-fetch)
12364 (uri (pypi-uri "sh" version))
12365 (sha256
12366 (base32
12367 "192r0mpv6dmkysjzhc43ddffiwb5g7c76bgr1mb1z2xz9awbj3sr"))))
12368 (build-system python-build-system)
12369 (arguments
12370 `(#:tests? #f)) ; no tests
12371 (home-page "https://github.com/amoffat/sh")
12372 (synopsis "Python subprocess interface")
12373 (description "Abstracts process invocation by providing a function
12374 interface for programs.")
12375 (license license:expat)))
12376
12377 (define-public python2-sh
12378 (package-with-python2 python-sh))
12379
12380 (define-public python-consul
12381 (package
12382 (name "python-consul")
12383 (version "0.6.1")
12384 (source
12385 (origin
12386 (method url-fetch)
12387 (uri (pypi-uri "python-consul" version))
12388 (sha256
12389 (base32
12390 "0rfyxcy4cr3x848vhx876ifalxd5ghq6l5x813m49h4vq2d4jiq8"))))
12391 (build-system python-build-system)
12392 (native-inputs
12393 `(("python-pytest" ,python-pytest)))
12394 (propagated-inputs
12395 `(("python-requests" ,python-requests)
12396 ("python-six" ,python-six)))
12397 (home-page "https://github.com/cablehead/python-consul")
12398 (synopsis "Python client for Consul")
12399 (description
12400 "Python client for @url{http://www.consul.io/,Consul}, a tool for service
12401 discovery, monitoring and configuration.")
12402 (license license:expat)))
12403
12404 (define-public python2-consul
12405 (package-with-python2 python-consul))
12406
12407 (define-public python-schematics
12408 (package
12409 (name "python-schematics")
12410 (version "1.1.1")
12411 (source
12412 (origin
12413 (method url-fetch)
12414 (uri (string-append
12415 "https://github.com/schematics/schematics/archive/v" version ".tar.gz"))
12416 (file-name (string-append name "-" version ".tar.gz"))
12417 (sha256
12418 (base32
12419 "19v1i69bf3bzarfxmbv0v6ivpcn758x3shvbiy9l2hy0lvqwnp6l"))))
12420 (build-system python-build-system)
12421 (propagated-inputs
12422 `(("python-six" ,python-six)))
12423 (arguments
12424 `(#:tests? #f)) ; requires a bunch of not very nice packages with fixed
12425 ; version requirements (eg python-coveralls)
12426 (home-page "https://github.com/schematics/schematics")
12427 (synopsis "Python Data Structures for Humans")
12428 (description "Python Data Structures for Humans.")
12429 (license license:bsd-3)))
12430
12431 (define-public python2-schematics
12432 (package-with-python2 python-schematics))
12433
12434 (define-public python-publicsuffix
12435 (package
12436 (name "python-publicsuffix")
12437 (version "1.1.0")
12438 (source (origin
12439 (method url-fetch)
12440 (uri (pypi-uri "publicsuffix" version))
12441 (sha256
12442 (base32
12443 "1adx520249z2cy7ykwjr1k190mn2888wqn9jf8qm27ly4qymjxxf"))))
12444 (build-system python-build-system)
12445 (arguments
12446 `(#:tests? #f)) ; tests use the internet
12447 (home-page "https://www.tablix.org/~avian/git/publicsuffix.git")
12448 (synopsis "Get suffix for a domain name")
12449 (description "Get a public suffix for a domain name using the Public Suffix
12450 List.")
12451 (license license:expat)))
12452
12453 (define-public python2-publicsuffix
12454 (package-with-python2 python-publicsuffix))
12455
12456 (define-public python-publicsuffix2
12457 (package
12458 (name "python-publicsuffix2")
12459 (version "2.20160818")
12460 (source
12461 (origin
12462 (method url-fetch)
12463 (uri (pypi-uri "publicsuffix2" version ".tar.bz2"))
12464 (sha256
12465 (base32
12466 "1bb55yka9vkn7i6y1kjzxa516kh6v4gsrxa90w5wdz5p5n968r68"))))
12467 (build-system python-build-system)
12468 (arguments
12469 '(#:tests? #f)) ; The test suite requires network access.
12470 (home-page "https://github.com/pombredanne/python-publicsuffix2")
12471 (synopsis "Get a public suffix for a domain name using the Public Suffix List")
12472 (description "Get a public suffix for a domain name using the Public Suffix
12473 List. Forked from and using the same API as the publicsuffix package.")
12474 (license (list license:expat license:mpl2.0))))
12475
12476 (define-public python2-publicsuffix2
12477 (package-with-python2 python-publicsuffix2))
12478
12479 (define-public python-url
12480 (package
12481 (name "python-url")
12482 (version "0.2.0")
12483 (source (origin
12484 (method url-fetch)
12485 (uri (pypi-uri "url" version))
12486 (sha256
12487 (base32
12488 "0v879yadcz9qxfl41ak6wkga1kimp9cflla9ddz03hjjvgkqy5ki"))))
12489 (build-system python-build-system)
12490 (propagated-inputs
12491 `(("python-publicsuffix" ,python-publicsuffix)))
12492 (native-inputs
12493 `(("python-coverage" ,python-coverage)
12494 ("python-nose" ,python-nose)))
12495 (arguments
12496 `(#:tests? #f)) ; FIXME: tests fail with "ImportError: No module named 'tests'"
12497 (home-page "https://github.com/seomoz/url-py")
12498 (synopsis "URL Parsing")
12499 (description "Library for parsing urls.")
12500 (license license:expat)
12501 (properties `((python2-variant . ,(delay python2-url))))))
12502
12503 (define-public python2-url
12504 (let ((base (package-with-python2 (strip-python2-variant python-url))))
12505 (package (inherit base)
12506 (propagated-inputs
12507 `(("python2-publicsuffix" ,python2-publicsuffix))))))
12508
12509 (define-public python-freezegun
12510 (package
12511 (name "python-freezegun")
12512 (version "0.3.8")
12513 (source
12514 (origin
12515 (method url-fetch)
12516 (uri (pypi-uri "freezegun" version))
12517 (sha256
12518 (base32
12519 "1sf38d3ibv1jhhvr52x7dhrsiyqk1hm165dfv8w8wh0fhmgxg151"))))
12520 (build-system python-build-system)
12521 (native-inputs
12522 `(("python-mock" ,python-mock)
12523 ("python-nose" ,python-nose)
12524 ("python-coverage" ,python-coverage)))
12525 (propagated-inputs
12526 `(("python-six" ,python-six)
12527 ("python-dateutil" ,python-dateutil)))
12528 (arguments
12529 `(#:phases (modify-phases %standard-phases
12530 ;; The tests are normally executed via `make test`, but the PyPi
12531 ;; package does not include the Makefile.
12532 (replace 'check
12533 (lambda _
12534 (zero? (system* "nosetests" "./tests/")))))))
12535 (home-page "https://github.com/spulec/freezegun")
12536 (synopsis "Test utility for mocking the datetime module")
12537 (description
12538 "FreezeGun is a library that allows your python tests to travel through
12539 time by mocking the datetime module.")
12540 (license license:asl2.0)))
12541
12542 (define-public python2-freezegun
12543 (package-with-python2 python-freezegun))
12544
12545
12546 (define-public python-odfpy
12547 (package
12548 (name "python-odfpy")
12549 (version "1.3.3")
12550 (source (origin
12551 (method url-fetch)
12552 (uri (pypi-uri "odfpy" version))
12553 (sha256
12554 (base32
12555 "1a6ms0w9zfhhkqhvrnynwwbxrivw6hgjc0s5k7j06npc7rq0blxw"))))
12556 (arguments
12557 `(#:modules ((srfi srfi-1)
12558 (guix build python-build-system)
12559 (guix build utils))
12560 #:phases
12561 (modify-phases %standard-phases
12562 (replace 'check
12563 ;; The test runner invokes python2 and python3 for test*.py.
12564 ;; To avoid having both in inputs, we replicate it here.
12565 (lambda _
12566 (every (lambda (test-file)
12567 (zero? (system* "python" test-file)))
12568 (find-files "tests" "^test.*\\.py$")))))))
12569 (build-system python-build-system)
12570 (home-page "https://github.com/eea/odfpy")
12571 (synopsis "Python API and tools to manipulate OpenDocument files")
12572 (description "Collection of libraries and utility programs written in
12573 Python to manipulate OpenDocument 1.2 files.")
12574 (license
12575 ;; The software is mainly dual GPL2+ and ASL2.0, but includes a
12576 ;; number of files with other licenses.
12577 (list license:gpl2+ license:asl2.0 license:lgpl2.1+ license:cc-by-sa3.0))))
12578
12579 (define-public python2-odfpy
12580 (package-with-python2 python-odfpy))
12581
12582 (define-public python-cachecontrol
12583 (package
12584 (name "python-cachecontrol")
12585 (version "0.11.6")
12586 (source
12587 (origin
12588 (method url-fetch)
12589 ;; Pypi does not have tests.
12590 (uri (string-append
12591 "https://github.com/ionrock/cachecontrol/archive/v"
12592 version ".tar.gz"))
12593 (file-name (string-append name "-" version ".tar.gz"))
12594 (sha256
12595 (base32
12596 "0yj60d0f69a2l8p7y86k4zhzzm6rnxpq74sfl240pry9l0lfw2vw"))))
12597 (build-system python-build-system)
12598 (arguments
12599 `(#:phases
12600 (modify-phases %standard-phases
12601 (replace 'check
12602 (lambda _
12603 ;; Drop test that requires internet access.
12604 (delete-file "tests/test_regressions.py")
12605 (setenv "PYTHONPATH"
12606 (string-append (getcwd) "/build/lib:"
12607 (getenv "PYTHONPATH")))
12608 (zero? (system* "py.test" "-vv")))))))
12609 (native-inputs
12610 `(("python-pytest" ,python-pytest)
12611 ("python-redis" ,python-redis)
12612 ("python-webtest" ,python-webtest)
12613 ("python-mock" ,python-mock)))
12614 (propagated-inputs
12615 `(("python-requests" ,python-requests)
12616 ("python-lockfile" ,python-lockfile)))
12617 (home-page "https://github.com/ionrock/cachecontrol")
12618 (synopsis "The httplib2 caching algorithms for use with requests")
12619 (description "CacheControl is a port of the caching algorithms in
12620 @code{httplib2} for use with @code{requests} session objects.")
12621 (license license:asl2.0)))
12622
12623 (define-public python2-cachecontrol
12624 (package-with-python2 python-cachecontrol))
12625
12626 (define-public python-lit
12627 (package
12628 (name "python-lit")
12629 (version "0.5.0")
12630 (source
12631 (origin
12632 (method url-fetch)
12633 (uri (pypi-uri "lit" version))
12634 (sha256
12635 (base32
12636 "135m2b9cwih85g66rjggavck328z7lj37srgpq3jxszbg0g2b91y"))))
12637 (build-system python-build-system)
12638 (home-page "http://llvm.org/")
12639 (synopsis "LLVM Software Testing Tool")
12640 (description "@code{lit} is a portable tool for executing LLVM and Clang
12641 style test suites, summarizing their results, and providing indication of
12642 failures.")
12643 (license license:ncsa)))
12644
12645 (define-public python2-lit
12646 (package-with-python2 python-lit))
12647
12648 (define-public python-pytest-pep8
12649 (package
12650 (name "python-pytest-pep8")
12651 (version "1.0.6")
12652 (source (origin
12653 (method url-fetch)
12654 (uri (pypi-uri "pytest-pep8" version))
12655 (sha256
12656 (base32
12657 "06032agzhw1i9d9qlhfblnl3dw5hcyxhagn7b120zhrszbjzfbh3"))))
12658 (build-system python-build-system)
12659 (arguments
12660 `(#:tests? #f)) ; Fails with recent pytest and pep8. See upstream issues #8 and #12.
12661 (native-inputs
12662 `(("python-pytest" ,python-pytest)))
12663 (propagated-inputs
12664 `(("python-pep8" ,python-pep8)))
12665 (home-page "https://bitbucket.org/pytest-dev/pytest-pep8")
12666 (synopsis "Py.test plugin to check PEP8 requirements")
12667 (description "Pytest plugin for checking PEP8 compliance.")
12668 (license license:expat)))
12669
12670 (define-public python2-pytest-pep8
12671 (package-with-python2 python-pytest-pep8))
12672
12673 (define-public python-pytest-flakes
12674 (package
12675 (name "python-pytest-flakes")
12676 (version "1.0.1")
12677 (source (origin
12678 (method url-fetch)
12679 (uri (pypi-uri "pytest-flakes" version))
12680 (sha256
12681 (base32
12682 "0flag3n33kbhyjrhzmq990rvg4yb8hhhl0i48q9hw0ll89jp28lw"))))
12683 (build-system python-build-system)
12684 (arguments
12685 `(#:phases
12686 (modify-phases %standard-phases
12687 (delete 'check)
12688 (add-after 'install 'check
12689 (lambda* (#:key outputs inputs #:allow-other-keys)
12690 ;; It's easier to run tests after install.
12691 ;; Make installed package available for running the tests
12692 (add-installed-pythonpath inputs outputs)
12693 (zero? (system* "py.test" "-vv")))))))
12694 (native-inputs
12695 `(("python-coverage" ,python-coverage)
12696 ("python-pytest" ,python-pytest)
12697 ("python-pytest-cache" ,python-pytest-cache)
12698 ("python-pytest-pep8" ,python-pytest-pep8)))
12699 (propagated-inputs
12700 `(("python-pyflakes" ,python-pyflakes)))
12701 (home-page "https://github.com/fschulze/pytest-flakes")
12702 (synopsis "Py.test plugin to check source code with pyflakes")
12703 (description "Pytest plugin for checking Python source code with pyflakes.")
12704 (license license:expat)))
12705
12706 (define-public python2-pytest-flakes
12707 (package-with-python2 python-pytest-flakes))
12708
12709 (define-public python-natsort
12710 (package
12711 (name "python-natsort")
12712 (version "5.0.2")
12713 (source (origin
12714 (method url-fetch)
12715 (uri (pypi-uri "natsort" version))
12716 (sha256
12717 (base32
12718 "0bh6j0l8iapjnsgg3bs6q075cnzjl6zw1vlgqyv3qrygm2cxypkn"))))
12719 (build-system python-build-system)
12720 (arguments
12721 `(#:phases
12722 (modify-phases %standard-phases
12723 (add-before 'check 'set-cachedir
12724 ;; Tests require write access to $HOME by default
12725 (lambda _ (setenv "PYTHON_EGG_CACHE" "/tmp") #t)))))
12726 (native-inputs
12727 `(("python-hypothesis" ,python-hypothesis)
12728 ("python-pytest-cache" ,python-pytest-cache)
12729 ("python-pytest-cov" ,python-pytest-cov)
12730 ("python-pytest-flakes" ,python-pytest-flakes)
12731 ("python-pytest-pep8" ,python-pytest-pep8)))
12732 (propagated-inputs ; TODO: Add python-fastnumbers.
12733 `(("python-pyicu" ,python-pyicu)))
12734 (home-page "https://github.com/SethMMorton/natsort")
12735 (synopsis "Natural sorting for python and shell")
12736 (description
12737 "Natsort lets you apply natural sorting on lists instead of
12738 lexicographical. If you use the built-in @code{sorted} method in python
12739 on a list such as @code{['a20', 'a9', 'a1', 'a4', 'a10']}, it would be
12740 returned as @code{['a1', 'a10', 'a20', 'a4', 'a9']}. Natsort provides a
12741 function @code{natsorted} that identifies numbers and sorts them separately
12742 from strings. It can also sort version numbers, real numbers, mixed types
12743 and more, and comes with a shell command @command{natsort} that exposes this
12744 functionality in the command line.")
12745 (license license:expat)
12746 (properties `((python2-variant . ,(delay python2-natsort))))))
12747
12748 (define-public python2-natsort
12749 (let ((base (package-with-python2 (strip-python2-variant python-natsort))))
12750 (package (inherit base)
12751 (native-inputs
12752 `(("python2-pathlib" ,python2-pathlib)
12753 ("python2-mock" ,python2-mock)
12754 ("python2-enum34" ,python2-enum34)
12755 ,@(package-native-inputs base))))))
12756
12757 (define-public python-glances
12758 (package
12759 (name "python-glances")
12760 (version "2.7.1")
12761 (source
12762 (origin
12763 (method url-fetch)
12764 (uri (pypi-uri "Glances" version))
12765 (sha256
12766 (base32
12767 "11jbq40g8alsbirnd4kiagznqg270247i0m8qhi48ldf2i5xppxg"))))
12768 (build-system python-build-system)
12769 (propagated-inputs
12770 `(("python-psutil" ,python-psutil)))
12771 (home-page
12772 "https://github.com/nicolargo/glances")
12773 (synopsis
12774 "A cross-platform curses-based monitoring tool")
12775 (description
12776 "Glances is a curses-based monitoring tool for a wide variety of platforms.
12777 Glances uses the PsUtil library to get information from your system. It monitors
12778 CPU, load, memory, network bandwidth, disk I/O, disk use, and more.")
12779 (license license:lgpl3+)))
12780
12781 (define-public python2-glances
12782 (package-with-python2 python-glances))
12783
12784 (define-public python-graphql-core
12785 (package
12786 (name "python-graphql-core")
12787 (version "0.5.3")
12788 (source
12789 (origin
12790 (method url-fetch)
12791 (uri (pypi-uri "graphql-core" version))
12792 (sha256
12793 (base32
12794 "0rsaarx2sj4xnw9966rhh4haiqaapm4lm2mfqm48ywd51j5vh1a0"))))
12795 (build-system python-build-system)
12796 (arguments
12797 `(#:tests? #f ; Tests require the unpackaged pytest-benchmark.
12798 #:phases
12799 (modify-phases %standard-phases
12800 (add-after 'unpack 'patch-hardcoded-version
12801 (lambda _ (substitute*
12802 "setup.py"
12803 (("'gevent==1.1rc1'") "'gevent'"))
12804 #t)))))
12805 (native-inputs
12806 `(("python-gevent" ,python-gevent)
12807 ("python-mock" ,python-mock)
12808 ("python-pytest-mock" ,python-pytest-mock)))
12809 (propagated-inputs
12810 `(("python-promise" ,python-promise)
12811 ("python-six" ,python-six)))
12812 (home-page "https://github.com/graphql-python/graphql-core")
12813 (synopsis "GraphQL implementation for Python")
12814 (description
12815 "GraphQL implementation for Python. GraphQL is a data query language and
12816 runtime designed and used to request and deliver data to mobile and web apps.
12817 This library is a port of @url{https://github.com/graphql/graphql-js,graphql-js}
12818 to Python.")
12819 (license license:expat)))
12820
12821 (define-public python2-graphql-core
12822 (package-with-python2 python-graphql-core))
12823
12824 (define-public python-graphql-relay
12825 (package
12826 (name "python-graphql-relay")
12827 (version "0.4.5")
12828 (source
12829 (origin
12830 (method url-fetch)
12831 (uri (pypi-uri "graphql-relay" version))
12832 (sha256
12833 (base32
12834 "1nv5dxcj59zv31qvl8bd142njmxcmymny2dz3br1l2cpbljbf5i7"))))
12835 (build-system python-build-system)
12836 (native-inputs
12837 `(("python-pytest" ,python-pytest)))
12838 (propagated-inputs
12839 `(("python-graphql-core" ,python-graphql-core)
12840 ("python-promise" ,python-promise)
12841 ("python-six" ,python-six)))
12842 (home-page "https://github.com/graphql-python/graphql-relay-py")
12843 (synopsis "Relay implementation for Python")
12844 (description
12845 "This is a library to allow the easy creation of Relay-compliant servers
12846 using the GraphQL Python reference implementation of a GraphQL server. It
12847 should be noted that the code is a exact port of the original
12848 @url{https://github.com/graphql/graphql-relay-js,graphql-relay js implementation}
12849 from Facebook.")
12850 (license license:expat)))
12851
12852 (define-public python2-graphql-relay
12853 (package-with-python2 python-graphql-relay))
12854
12855 (define-public python-graphene
12856 (package
12857 (name "python-graphene")
12858 (version "0.10.2")
12859 (source
12860 (origin
12861 (method url-fetch)
12862 (uri (pypi-uri "graphene" version))
12863 (sha256
12864 (base32
12865 "09zhac7igh9ixdz0ay6csy35b40l1jwbf2wrbxmgxwfhy51iy06q"))))
12866 (build-system python-build-system)
12867 (native-inputs
12868 `(("python-django-filter" ,python-django-filter)
12869 ("python-mock" ,python-mock)
12870 ("python-psycopg2" ,python-psycopg2)
12871 ("python-pytest-django" ,python-pytest-django)
12872 ("python-sqlalchemy-utils" ,python-sqlalchemy-utils)))
12873 (propagated-inputs
12874 `(("python-graphql-core" ,python-graphql-core)
12875 ("python-graphql-relay" ,python-graphql-relay)
12876 ("python-iso8601" ,python-iso8601)
12877 ("python-promise" ,python-promise)
12878 ("python-six" ,python-six)))
12879 (home-page "http://graphene-python.org/")
12880 (synopsis "GraphQL Framework for Python")
12881 (description
12882 "Graphene is a Python library for building GraphQL schemas/types.
12883 A GraphQL schema describes your data model, and provides a GraphQL server
12884 with an associated set of resolve methods that know how to fetch data.")
12885 (properties `((python2-variant . ,(delay python2-graphene))))
12886 (license license:expat)))
12887
12888 (define-public python2-graphene
12889 (let ((base (package-with-python2
12890 (strip-python2-variant python-graphene))))
12891 (package (inherit base)
12892 (native-inputs
12893 `(("python2-sqlalchemy" ,python2-sqlalchemy)
12894 ,@(package-native-inputs base))))))
12895
12896 (define-public python-nautilus
12897 (package
12898 (name "python-nautilus")
12899 (version "0.4.9")
12900 (source
12901 (origin
12902 (method url-fetch)
12903 (uri (pypi-uri "nautilus" version))
12904 (sha256
12905 (base32
12906 "01hwzjc1zshk4vvxrcghm398fpy4jls66dyz06g07mrwqif8878p"))))
12907 (build-system python-build-system)
12908 (arguments `(#:tests? #f)) ; fails to import test modules
12909 (propagated-inputs
12910 `(("python-bcrypt" ,python-bcrypt)
12911 ("python-click" ,python-click)
12912 ("python-consul" ,python-consul)
12913 ("python-graphene" ,python-graphene)
12914 ("python-jinja2" ,python-jinja2)
12915 ("python-peewee" ,python-peewee)
12916 ("python-pika" ,python-pika)
12917 ("python-tornado" ,python-tornado)
12918 ("python-wtforms" ,python-wtforms)))
12919 (native-inputs
12920 `(("python-nose2" ,python-nose2)))
12921 (home-page "https://github.com/AlecAivazis/nautilus")
12922 (synopsis "Library for creating microservice applications")
12923 (description
12924 "Nautilus is a framework for flux based microservices that looks to
12925 provide extendible implementations of common aspects of a cloud so that you can
12926 focus on building massively scalable web applications.")
12927 (license license:expat)))
12928
12929 (define-public python-snowballstemmer
12930 (package
12931 (name "python-snowballstemmer")
12932 (version "1.2.1")
12933 (source (origin
12934 (method url-fetch)
12935 (uri (pypi-uri "snowballstemmer" version))
12936 (sha256
12937 (base32
12938 "0a0idq4y5frv7qsg2x62jd7rd272749xk4x99misf5rcifk2d7wi"))))
12939 (build-system python-build-system)
12940 (arguments
12941 `(;; No tests exist
12942 #:tests? #f))
12943 (home-page "https://github.com/shibukawa/snowball_py")
12944 (synopsis "Snowball stemming library collection for Python")
12945 (description "This package provides 16 word stemmer algorithms generated
12946 from Snowball algorithms. It includes the 15 original ones plus the Poerter
12947 English stemmer.")
12948 (license license:bsd-3)))
12949
12950 (define-public python2-snowballstemmer
12951 (package-with-python2 python-snowballstemmer))
12952
12953 (define-public python-sphinx-cloud-sptheme
12954 (package
12955 (name "python-sphinx-cloud-sptheme")
12956 (version "1.8.0")
12957 (source (origin
12958 (method url-fetch)
12959 (uri (pypi-uri "cloud_sptheme" version))
12960 (sha256
12961 (base32
12962 "1dniqb6a39yh786f86c4jn666rwnyi1jvzn4616zhcchb7sfdshd"))))
12963 (build-system python-build-system)
12964 ;; FIXME: The 'pypi' release archive does not contain tests.
12965 (arguments '(#:tests? #f))
12966 (native-inputs
12967 `(("python-sphinx" ,python-sphinx)))
12968 (home-page "https://bitbucket.org/ecollins/cloud_sptheme")
12969 (synopsis "'Cloud' theme for Sphinx documenter")
12970 (description "This package contains the \"Cloud\" theme for Sphinx and some
12971 related extensions.")
12972 (license license:bsd-3)))
12973
12974 (define-public python2-sphinx-cloud-sptheme
12975 (package-with-python2 python-sphinx-cloud-sptheme))
12976
12977 (define-public python-sphinx-alabaster-theme
12978 (package
12979 (name "python-sphinx-alabaster-theme")
12980 (version "0.7.9")
12981 (source (origin
12982 (method url-fetch)
12983 (uri (pypi-uri "alabaster" version))
12984 (sha256
12985 (base32
12986 "027anxzcb951gjlcc43y3rbn9qrw36d16vj9wd2smv5410xx9bs7"))))
12987 (build-system python-build-system)
12988 (propagated-inputs
12989 `(("python-pygments" ,python-pygments)))
12990 (home-page "https://alabaster.readthedocs.io/")
12991 (synopsis "Configurable sidebar-enabled Sphinx theme")
12992 (description "Alabaster is a visually (c)lean, responsive, configurable
12993 theme for the Sphinx documentation system. It's the default theme of Sphinx.")
12994 (license license:bsd-3)))
12995
12996 (define-public python2-sphinx-alabaster-theme
12997 (package-with-python2 python-sphinx-alabaster-theme))
12998
12999 (define-public python-betamax
13000 (package
13001 (name "python-betamax")
13002 (version "0.8.0")
13003 (source
13004 (origin
13005 (method url-fetch)
13006 (uri (pypi-uri "betamax" version))
13007 (sha256
13008 (base32
13009 "18f8v5gng3j773jlbbzx4rg1i4y2zw3m2l1zpmbvp8bh5a2q1i42"))))
13010 (build-system python-build-system)
13011 (arguments
13012 '(;; Many tests fail because they require networking.
13013 #:tests? #f))
13014 (propagated-inputs
13015 `(("python-requests" ,python-requests)))
13016 (home-page "https://github.com/sigmavirus24/betamax")
13017 (synopsis "Record HTTP interactions with python-requests")
13018 (description "Betamax will record your test suite's HTTP interactions and
13019 replay them during future tests. It is designed to work with python-requests.")
13020 (license license:expat)))
13021
13022 (define-public python2-betamax
13023 (package-with-python2 python-betamax))
13024
13025 (define-public python-s3transfer
13026 (package
13027 (name "python-s3transfer")
13028 (version "0.1.10")
13029 (source (origin
13030 (method url-fetch)
13031 (uri (pypi-uri "s3transfer" version))
13032 (sha256
13033 (base32
13034 "1h8g9bknvxflxkpbnxyfxmk8pvgykbbk9ljdvhqh6z4vjc2926ms"))))
13035 (build-system python-build-system)
13036 (arguments
13037 `(#:phases
13038 (modify-phases %standard-phases
13039 (replace 'check
13040 (lambda _
13041 ;; 7 of the 'integration' tests require network access or login
13042 ;; credentials.
13043 (zero? (system* "nosetests" "--exclude=integration")))))))
13044 (native-inputs
13045 `(("python-docutils" ,python-docutils)
13046 ("python-mock" ,python-mock)
13047 ("python-nose" ,python-nose)))
13048 (propagated-inputs
13049 `(("python-botocore" ,python-botocore)))
13050 (synopsis "Amazon S3 Transfer Manager")
13051 (description "S3transfer is a Python library for managing Amazon S3
13052 transfers.")
13053 (home-page "https://github.com/boto/s3transfer")
13054 (license license:asl2.0)
13055 (properties `((python2-variant . ,(delay python2-s3transfer))))))
13056
13057 (define-public python2-s3transfer
13058 (let ((base (package-with-python2 (strip-python2-variant python-s3transfer))))
13059 (package
13060 (inherit base)
13061 (native-inputs
13062 `(("python2-futures" ,python2-futures)
13063 ,@(package-native-inputs base))))))
13064
13065 (define-public python-setproctitle
13066 (package
13067 (name "python-setproctitle")
13068 (version "1.1.10")
13069 (source
13070 (origin
13071 (method url-fetch)
13072 (uri (pypi-uri "setproctitle" version))
13073 (sha256
13074 (base32
13075 "163kplw9dcrw0lffq1bvli5yws3rngpnvrxrzdw89pbphjjvg0v2"))))
13076 (build-system python-build-system)
13077 (arguments
13078 '(#:phases
13079 (modify-phases %standard-phases
13080 (add-before 'check 'patch-Makefile
13081 ;; Stricly this is only required for the python2 variant.
13082 ;; But adding a phase in an inherited package seems to be
13083 ;; cumbersum. So we patch even for python3.
13084 (lambda _
13085 (let ((nose (assoc-ref %build-inputs "python2-nose")))
13086 (when nose
13087 (substitute* "Makefile"
13088 (("\\$\\(PYTHON\\) [^ ]which nosetests[^ ] ")
13089 (string-append nose "/bin/nosetests "))))
13090 #t)))
13091 (replace 'check
13092 (lambda _
13093 (setenv "PYTHON" (or (which "python3") (which "python")))
13094 (setenv "PYCONFIG" (or (which "python3-config")
13095 (which "python-config")))
13096 (setenv "CC" "gcc")
13097 ;; No need to extend PYTHONPATH to find the built package, since
13098 ;; the Makefile will build anyway
13099 (zero? (system* "make" "check")))))))
13100 (native-inputs
13101 `(("procps" ,procps))) ; required for tests
13102 (home-page
13103 "https://github.com/dvarrazzo/py-setproctitle")
13104 (synopsis
13105 "Setproctitle implementation for Python to customize the process title")
13106 (description "The library allows a process to change its title (as displayed
13107 by system tools such as ps and top).
13108
13109 Changing the title is mostly useful in multi-process systems, for
13110 example when a master process is forked: changing the children's title
13111 allows to identify the task each process is busy with. The technique
13112 is used by PostgreSQL and the OpenSSH Server for example.")
13113 (license license:bsd-3)
13114 (properties `((python2-variant . ,(delay python2-setproctitle))))))
13115
13116 (define-public python2-setproctitle
13117 (let ((base (package-with-python2
13118 (strip-python2-variant python-setproctitle))))
13119 (package
13120 (inherit base)
13121 (native-inputs `(("python2-nose" ,python2-nose)
13122 ,@(package-native-inputs base))))))
13123
13124 (define-public python-validictory
13125 (package
13126 (name "python-validictory")
13127 (version "1.0.1")
13128 (source
13129 (origin
13130 (method url-fetch)
13131 (uri (pypi-uri "validictory" version))
13132 (sha256
13133 (base32
13134 "1zf1g9sw47xzp5f80bd94pb42j9yqv82lcrgcvdwr6nkaphfi37q"))))
13135 (build-system python-build-system)
13136 (arguments
13137 '(#:phases
13138 (modify-phases %standard-phases
13139 (add-after 'unpack 'bootstrap
13140 ;; Move the tests out of the package directory to avoid
13141 ;; packaging them.
13142 (lambda* _
13143 (rename-file "validictory/tests" "tests")
13144 (delete-file "tests/__init__.py")))
13145 (replace 'check
13146 (lambda _
13147 ;; Extend PYTHONPATH so the built package will be found.
13148 (setenv "PYTHONPATH"
13149 (string-append (getcwd) "/build/lib:"
13150 (getenv "PYTHONPATH")))
13151 (zero? (system* "py.test" "-vv" )))))))
13152 (native-inputs
13153 `(("python-pytest" ,python-pytest)))
13154 (home-page
13155 "https://github.com/jamesturk/validictory")
13156 (synopsis "General purpose Python data validator")
13157 (description "It allows validation of arbitrary Python data structures.
13158
13159 The schema format is based on the JSON Schema
13160 proposal (http://json-schema.org), so combined with json the library is also
13161 useful as a validator for JSON data.")
13162 (license license:expat)))
13163
13164 (define-public python2-validictory
13165 (package-with-python2 python-validictory))
13166
13167 (define-public python-aniso8601
13168 (package
13169 (name "python-aniso8601")
13170 (version "1.1.0")
13171 (source
13172 (origin
13173 (method url-fetch)
13174 (uri (pypi-uri "aniso8601" version))
13175 (sha256
13176 (base32
13177 "1k5mjg9iqbjfslb5prrsfz7dhlvi6s35p1jxq8dm87w1b7dn5i2g"))))
13178 (build-system python-build-system)
13179 (propagated-inputs
13180 `(("python-dateutil" ,python-dateutil)))
13181 (home-page
13182 "https://bitbucket.org/nielsenb/aniso8601")
13183 (synopsis
13184 "Python library for parsing ISO 8601 strings")
13185 (description
13186 "This package contains a library for parsing ISO 8601 datetime strings.")
13187 (license license:bsd-3)))
13188
13189 (define-public python-flask-restful
13190 (package
13191 (name "python-flask-restful")
13192 (version "0.3.5")
13193 (source
13194 (origin
13195 (method url-fetch)
13196 (uri (pypi-uri "Flask-RESTful" version))
13197 (sha256
13198 (base32
13199 "0hjcmdb56b7z4bkw848lxfkyrpnkwzmqn2dgnlv12mwvjpzsxr6c"))))
13200 (build-system python-build-system)
13201 (propagated-inputs
13202 `(("python-aniso8601" ,python-aniso8601)
13203 ("python-flask" ,python-flask)
13204 ("python-pycrypto" ,python-pycrypto)
13205 ("python-pytz" ,python-pytz)))
13206 (native-inputs
13207 `(;; Optional dependency of Flask. Tests need it.
13208 ("python-blinker" ,python-blinker)
13209 ("python-mock" ,python-mock) ; For tests
13210 ("python-nose" ,python-nose) ; For tests
13211 ("python-sphinx" ,python-sphinx)))
13212 (home-page
13213 "https://www.github.com/flask-restful/flask-restful/")
13214 (synopsis
13215 "Flask module for creating REST APIs")
13216 (description
13217 "This package contains a Flask module for creating REST APIs.")
13218 (license license:bsd-3)))
13219
13220 (define-public python-flask-basicauth
13221 (package
13222 (name "python-flask-basicauth")
13223 (version "0.2.0")
13224 (source
13225 (origin
13226 (method url-fetch)
13227 (uri (pypi-uri "Flask-BasicAuth" version))
13228 (sha256
13229 (base32
13230 "1zq1spkjr4sjdnalpp8wl242kdqyk6fhbnhr8hi4r4f0km4bspnz"))))
13231 (build-system python-build-system)
13232 (propagated-inputs
13233 `(("python-flask" ,python-flask)))
13234 (home-page
13235 "https://github.com/jpvanhal/flask-basicauth")
13236 (synopsis
13237 "HTTP basic access authentication for Flask")
13238 (description
13239 "This package provides HTTP basic access authentication for Flask.")
13240 (license license:bsd-3)))
13241
13242 (define-public python-flask-sqlalchemy
13243 (package
13244 (name "python-flask-sqlalchemy")
13245 (version "2.1")
13246 (source
13247 (origin
13248 (method url-fetch)
13249 (uri (pypi-uri "Flask-SQLAlchemy" version))
13250 (sha256
13251 (base32
13252 "1i9ps5d5snih9xlqhrvmi3qfiygkmqzxh92n25kj4pf89kj4s965"))))
13253 (build-system python-build-system)
13254 (propagated-inputs
13255 `(("python-flask" ,python-flask)
13256 ("python-sqlalchemy" ,python-sqlalchemy)))
13257 (home-page
13258 "https://github.com/mitsuhiko/flask-sqlalchemy")
13259 (synopsis
13260 "Module adding SQLAlchemy support to your Flask application")
13261 (description
13262 "This package adds SQLAlchemy support to your Flask application.")
13263 (license license:bsd-3)))
13264
13265 (define-public python-pyev
13266 (package
13267 (name "python-pyev")
13268 (version "0.9.0")
13269 (source
13270 (origin
13271 (method url-fetch)
13272 (uri (pypi-uri "pyev" version))
13273 (sha256
13274 (base32
13275 "0rf603lc0s6zpa1nb25vhd8g4y337wg2wyz56i0agsdh7jchl0sx"))))
13276 (build-system python-build-system)
13277 (arguments
13278 `(#:tests? #f ; no test suite
13279 #:phases
13280 (modify-phases %standard-phases
13281 (add-after 'unpack 'patch
13282 (lambda* (#:key inputs #:allow-other-keys)
13283 (let ((libev (string-append (assoc-ref inputs "libev")
13284 "/lib/libev.so.4")))
13285 (substitute* "setup.py"
13286 (("libev_dll_name = find_library\\(\\\"ev\\\"\\)")
13287 (string-append "libev_dll_name = \"" libev "\"")))))))))
13288 (inputs
13289 `(("libev" ,libev)))
13290 (home-page "http://pythonhosted.org/pyev/")
13291 (synopsis "Python libev interface")
13292 (description "Pyev provides a Python interface to libev.")
13293 (license license:gpl3)))
13294
13295 (define-public python2-pyev
13296 (package-with-python2 python-pyev))
13297
13298 (define-public python-imagesize
13299 (package
13300 (name "python-imagesize")
13301 (version "0.7.1")
13302 (source
13303 (origin
13304 (method url-fetch)
13305 (uri (pypi-uri "imagesize" version))
13306 (sha256
13307 (base32
13308 "0qk07k0z4241lkzzjji7z4da04pcvg7bfc4xz1934zlqhwmwdcha"))))
13309 (build-system python-build-system)
13310 (arguments
13311 '(;; Test files are not distributed on PyPi:
13312 ;; https://github.com/shibukawa/imagesize_py/issues/7
13313 #:tests? #f))
13314 (home-page "https://github.com/shibukawa/imagesize_py")
13315 (synopsis "Gets image size of files in variaous formats in Python")
13316 (description
13317 "This package allows determination of image size from
13318 PNG, JPEG, JPEG2000 and GIF files in pure Python.")
13319 (license license:expat)))
13320
13321 (define-public python2-imagesize
13322 (package-with-python2 python-imagesize))
13323
13324 (define-public python-axolotl-curve25519
13325 (package
13326 (name "python-axolotl-curve25519")
13327 (version "0.1")
13328 (source
13329 (origin
13330 (method git-fetch)
13331 (uri (git-reference
13332 (url "git://github.com/tgalal/python-axolotl-curve25519")
13333 (commit "e4a9c4de0eae27223200579c58d1f8f6d20637e2")))
13334 (file-name (string-append name "-" version "-checkout"))
13335 (sha256
13336 (base32
13337 "0agap5q0hmvf6cwzjqc05kw53pjgf6942pcivpazksmg1vk400ra"))))
13338 (build-system python-build-system)
13339 (arguments
13340 `(;; Prevent creation of the egg. This works around
13341 ;; https://debbugs.gnu.org/cgi/bugreport.cgi?bug=20765
13342 #:configure-flags '("--root=/")))
13343 (home-page "https://github.com/tgalal/python-axolotl-curve25519")
13344 (synopsis "Python wrapper for curve25519 library")
13345 (description "This is a python wrapper for the curve25519 library
13346 with ed25519 signatures. The C code was pulled from
13347 libaxolotl-android. At the moment this wrapper is meant for use by
13348 python-axolotl.")
13349 (license (list license:gpl3 ; Most files
13350 license:bsd-3)))) ; curve/curve25519-donna.c
13351
13352 (define-public python2-axolotl-curve25519
13353 (package-with-python2 python-axolotl-curve25519))
13354
13355 (define-public python-axolotl
13356 (package
13357 (name "python-axolotl")
13358 (version "0.1.35")
13359 (source
13360 (origin
13361 (method url-fetch)
13362 (uri (string-append
13363 "https://github.com/tgalal/python-axolotl/archive/"
13364 version ".tar.gz"))
13365 (file-name (string-append name "-" version ".tar.gz"))
13366 (sha256
13367 (base32 "1z8d89p7v40p4bwywjm9h4z28fdvra79ddw06azlkrfjbl7dxmz8"))))
13368 (build-system python-build-system)
13369 (arguments
13370 `(#:phases
13371 (modify-phases %standard-phases
13372 ;; Don't install tests
13373 (add-before 'install 'remove-tests
13374 (lambda _
13375 (for-each delete-file-recursively
13376 '("axolotl/tests" "build/lib/axolotl/tests"))
13377 #t)))))
13378 (propagated-inputs
13379 `(("python-axolotl-curve25519" ,python-axolotl-curve25519)
13380 ("python-dateutil" ,python-dateutil)
13381 ("python-protobuf" ,python-protobuf)
13382 ("python-pycrypto" ,python-pycrypto)))
13383 (home-page "https://github.com/tgalal/python-axolotl")
13384 (synopsis "Python port of libaxolotl-android")
13385 (description "This is a python port of libaxolotl-android. This
13386 is a ratcheting forward secrecy protocol that works in synchronous and
13387 asynchronous messaging environments.")
13388 (license license:gpl3)))
13389
13390 (define-public python2-axolotl
13391 (package-with-python2 python-axolotl))
13392
13393 (define-public python-termstyle
13394 (package
13395 (name "python-termstyle")
13396 (version "0.1.11")
13397 (source
13398 (origin
13399 (method url-fetch)
13400 (uri (pypi-uri "termstyle" version))
13401 (sha256
13402 (base32
13403 "17wzkkcqy5zc0g68xlad3kcv66iw14d2pwqc0h9420gak0vbhx7g"))))
13404 (build-system python-build-system)
13405 (arguments
13406 '(#:phases
13407 (modify-phases %standard-phases
13408 (replace 'check
13409 (lambda _
13410 (zero? (system* "python" "test3.py")))))))
13411 (home-page "https://github.com/gfxmonk/termstyle")
13412 (synopsis "Console text coloring for Python")
13413 (description "This package provides console text coloring for Python.")
13414 (license license:bsd-3)))
13415
13416 (define-public python-rednose
13417 (package
13418 (name "python-rednose")
13419 (version "1.2.1")
13420 (source
13421 (origin
13422 (method url-fetch)
13423 (uri (pypi-uri "rednose" version))
13424 (sha256
13425 (base32
13426 "0b0bsna217lr1nykyhl5fgjly15zhdvqd4prg4wy1zrgfv7al6m0"))))
13427 (build-system python-build-system)
13428 (arguments
13429 `(#:phases
13430 (modify-phases %standard-phases
13431 (add-after 'unpack 'fix-deps
13432 (lambda _
13433 ;; See <https://github.com/JBKahn/rednose/issues/12>
13434 (substitute* "setup.py"
13435 (("python-termstyle") "termstyle"))
13436 #t)))))
13437 (propagated-inputs
13438 `(("python-colorama" ,python-colorama)
13439 ("python-termstyle" ,python-termstyle)))
13440 (native-inputs
13441 `(("python-six" ,python-six)
13442 ("python-nose" ,python-nose)))
13443 (home-page "https://github.com/JBKahn/rednose")
13444 (synopsis "Colored output for Python nosetests")
13445 (description "This package provides colored output for the
13446 @command{nosetests} command of the Python Nose unit test framework.")
13447 (license license:bsd-3)))
13448
13449 (define-public python2-rednose
13450 (package-with-python2 python-rednose))
13451
13452 (define-public python-flask-restplus
13453 (package
13454 (name "python-flask-restplus")
13455 (version "0.9.2")
13456 (source
13457 (origin
13458 (method url-fetch)
13459 (uri (pypi-uri "flask-restplus" version))
13460 (sha256
13461 (base32
13462 "11his6ii5brpkhld0d5bwzjjw4q3vmplpd6fmgzjrvvklsbk0cf4"))))
13463 (build-system python-build-system)
13464 (arguments
13465 '(#:tests? #f)) ; FIXME: 35/882 tests failing.
13466 ;; #:phases
13467 ;; (modify-phases %standard-phases
13468 ;; (replace 'check
13469 ;; (lambda _
13470 ;; (zero? (system* "nosetests")))))))
13471 (propagated-inputs
13472 `(("python-aniso8601" ,python-aniso8601)
13473 ("python-flask" ,python-flask)
13474 ("python-jsonschema" ,python-jsonschema)
13475 ("python-pytz" ,python-pytz)
13476 ("python-six" ,python-six)))
13477 (native-inputs
13478 `(("python-tzlocal" ,python-tzlocal)
13479 ("python-blinker" ,python-blinker)
13480 ("python-nose" ,python-nose)
13481 ("python-rednose" ,python-rednose)))
13482 (home-page "https://github.com/noirbizarre/flask-restplus")
13483 (synopsis "Framework for documented API development with Flask")
13484 (description "This package provides a framework for API development with
13485 the Flask web framework in Python. It is similar to package
13486 @code{python-flask-restful} but supports the @code{python-swagger}
13487 documentation builder.")
13488 (license license:expat)))
13489
13490 (define-public python-sadisplay
13491 (package
13492 (name "python-sadisplay")
13493 (version "0.4.6")
13494 (source
13495 (origin
13496 (method url-fetch)
13497 (uri (pypi-uri "sadisplay" version))
13498 (sha256
13499 (base32
13500 "0zqad2fl7q26p090qmqgmxbm6iwgf9zij1w8da1g3wdgjj72ql05"))))
13501 (build-system python-build-system)
13502 (propagated-inputs
13503 `(("python-sqlalchemy" ,python-sqlalchemy)))
13504 (native-inputs
13505 `(("python-nose" ,python-nose)))
13506 (home-page "https://bitbucket.org/estin/sadisplay")
13507 (synopsis "SQLAlchemy schema displayer")
13508 (description "This package provides a program to build Entity
13509 Relationship diagrams from a SQLAlchemy model (or directly from the
13510 database).")
13511 (license license:bsd-3)))
13512
13513 (define-public python2-sadisplay
13514 (package-with-python2 python-sadisplay))
13515
13516 (define-public python-flask-restful-swagger
13517 (package
13518 (name "python-flask-restful-swagger")
13519 (version "0.19")
13520 (source
13521 (origin
13522 (method url-fetch)
13523 (uri (pypi-uri "flask-restful-swagger" version))
13524 (sha256
13525 (base32
13526 "16msl8hd5xjmj833bpy264v98cpl5hkw5bgl5gf5vgndxbv3rm6v"))))
13527 (build-system python-build-system)
13528 (propagated-inputs
13529 `(("python-flask-restful" ,python-flask-restful)))
13530 (home-page "https://github.com/rantav/flask-restful-swagger")
13531 (synopsis "Extract Swagger specs from Flask-Restful projects")
13532 (description "This package lets you extract Swagger API documentation
13533 specs from your Flask-Restful projects.")
13534 (license license:expat)))
13535
13536 (define-public python2-flask-restful-swagger
13537 (package-with-python2 python-flask-restful-swagger))
13538
13539 (define-public python-argcomplete
13540 (package
13541 (name "python-argcomplete")
13542 (version "1.7.0")
13543 (source
13544 (origin
13545 (method url-fetch)
13546 (uri (pypi-uri "argcomplete" version))
13547 (sha256
13548 (base32
13549 "11bwiw6j0nilgz81xnw6f1npyga3prp8asjqrm87cdr3ria5l03x"))))
13550 (build-system python-build-system)
13551 (native-inputs
13552 `(("python-pexpect" ,python-pexpect)
13553 ("tcsh" ,tcsh)))
13554 (home-page "https://github.com/kislyuk/argcomplete")
13555 (synopsis "Shell tab completion for Python argparse")
13556 (description "argcomplete provides extensible command line tab completion
13557 of arguments and options for Python scripts using @code{argparse}. It's
13558 particularly useful for programs with many options or sub-parsers that can
13559 dynamically suggest completions; for example, when browsing resources over the
13560 network.")
13561 (license license:asl2.0)))
13562
13563 (define-public python2-argcomplete
13564 (package-with-python2 python-argcomplete))
13565
13566 (define-public python-xopen
13567 (package
13568 (name "python-xopen")
13569 (version "0.1.1")
13570 (source
13571 (origin
13572 (method url-fetch)
13573 (uri (pypi-uri "xopen" version))
13574 (sha256
13575 (base32
13576 "1wx6mylzcsyhjl19ycb83qq6iqpmr927lz62njfsar6ldsj0qcni"))
13577 (file-name (string-append name "-" version ".tar.gz"))))
13578 (build-system python-build-system)
13579 (home-page "https://github.com/marcelm/xopen/")
13580 (synopsis "Open compressed files transparently")
13581 (description "This module provides an @code{xopen} function that works like
13582 Python's built-in @code{open} function, but can also deal with compressed files.
13583 Supported compression formats are gzip, bzip2 and, xz, and are automatically
13584 recognized by their file extensions. The focus is on being as efficient as
13585 possible on all supported Python versions.")
13586 (license license:expat)))
13587
13588 (define-public python2-xopen
13589 (package-with-python2 python-xopen))
13590
13591 (define-public python2-cheetah
13592 (package
13593 (name "python2-cheetah")
13594 (version "2.4.4")
13595 (source
13596 (origin
13597 (method url-fetch)
13598 (uri (pypi-uri "Cheetah" version))
13599 (sha256
13600 (base32
13601 "0l5mm4lnysjkzpjr95q5ydm9xc8bv43fxmr79ypybrf1y0lq4c5y"))))
13602 (build-system python-build-system)
13603 (arguments
13604 `(#:python ,python-2))
13605 (propagated-inputs
13606 `(("python2-markdown" ,python2-markdown)))
13607 (home-page "https://pythonhosted.org/Cheetah/")
13608 (synopsis "Template engine")
13609 (description "Cheetah is a text-based template engine and Python code
13610 generator.
13611
13612 Cheetah can be used as a standalone templating utility or referenced as
13613 a library from other Python applications. It has many potential uses,
13614 but web developers looking for a viable alternative to ASP, JSP, PHP and
13615 PSP are expected to be its principle user group.
13616
13617 Features:
13618 @enumerate
13619 @item Generates HTML, SGML, XML, SQL, Postscript, form email, LaTeX, or any other
13620 text-based format.
13621 @item Cleanly separates content, graphic design, and program code.
13622 @item Blends the power and flexibility of Python with a simple template language
13623 that non-programmers can understand.
13624 @item Gives template writers full access to any Python data structure, module,
13625 function, object, or method in their templates.
13626 @item Makes code reuse easy by providing an object-orientated interface to
13627 templates that is accessible from Python code or other Cheetah templates.
13628 One template can subclass another and selectively reimplement sections of it.
13629 @item Provides a simple, yet powerful, caching mechanism that can dramatically
13630 improve the performance of a dynamic website.
13631 @item Compiles templates into optimized, yet readable, Python code.
13632 @end enumerate")
13633 (license (license:x11-style "file://LICENSE"))))
13634
13635 (define-public python-dulwich
13636 (package
13637 (name "python-dulwich")
13638 (version "0.16.3")
13639 (source
13640 (origin
13641 (method url-fetch)
13642 (uri (list (string-append "https://www.dulwich.io/releases/"
13643 "dulwich-" version ".tar.gz")
13644 (pypi-uri "dulwich" version)))
13645 (sha256
13646 (base32 "0fl47vzfgc3w3rmhn8naii905cjqcp0vc68iyvymxp7567hh6als"))))
13647 (build-system python-build-system)
13648 (arguments
13649 `(#:phases
13650 (modify-phases %standard-phases
13651 (add-before 'check 'fix-tests
13652 (lambda* (#:key inputs #:allow-other-keys)
13653 ;; The tests use Popen with a custom environment which doesn't
13654 ;; include PATH.
13655 (substitute* "dulwich/tests/compat/utils.py"
13656 (("'git'") (string-append "'"
13657 (which "git")
13658 "'")))
13659 (substitute* '("dulwich/tests/test_repository.py"
13660 "dulwich/tests/test_hooks.py")
13661 (("#!/bin/sh") (string-append "#!" (which "sh"))))
13662 (setenv "TEST_RUNNER" "unittest")
13663 (setenv "PYTHONHASHSEED" "random")
13664 #t)))))
13665 (propagated-inputs
13666 `(("python-fastimport" ,python-fastimport)))
13667 (native-inputs
13668 `(("python-mock" ,python-mock)
13669 ("python-geventhttpclient" ,python-geventhttpclient)
13670 ("git" ,git)))
13671 (home-page "https://www.dulwich.io/")
13672 (synopsis "Git implementation in Python")
13673 (description "Dulwich is an implementation of the Git file formats and
13674 protocols written in pure Python.")
13675 ;; Can be used with either license.
13676 (license (list license:asl2.0 license:gpl2+))))
13677
13678 (define-public python2-dulwich
13679 (package-with-python2 python-dulwich))
13680
13681 (define-public python-pbkdf2
13682 (package
13683 (name "python-pbkdf2")
13684 (version "1.3")
13685 (source
13686 (origin
13687 (method url-fetch)
13688 (uri (pypi-uri "pbkdf2" version))
13689 (sha256
13690 (base32
13691 "0yb99rl2mbsaamj571s1mf6vgniqh23v98k4632150hjkwv9fqxc"))))
13692 (build-system python-build-system)
13693 (arguments
13694 '(#:phases
13695 (modify-phases %standard-phases
13696 (replace 'check
13697 (lambda _
13698 (setenv "PYTHONPATH"
13699 (string-append (getcwd) "/build/lib:"
13700 (getenv "PYTHONPATH")))
13701 (zero? (system* "python" "test/test_pbkdf2.py")))))))
13702 (propagated-inputs
13703 `(("python-pycrypto" ,python-pycrypto))) ; optional
13704 (home-page "http://www.dlitz.net/software/python-pbkdf2/")
13705 (synopsis "Password-based key derivation")
13706 (description "This module implements the password-based key derivation
13707 function, PBKDF2, specified in RSA PKCS#5 v2.0.
13708
13709 PKCS#5 v2.0 Password-Based Key Derivation is a key derivation function which
13710 is part of the RSA Public Key Cryptography Standards series. The provided
13711 implementation takes a password or a passphrase and a salt value (and
13712 optionally a iteration count, a digest module, and a MAC module) and provides
13713 a file-like object from which an arbitrarly-sized key can be read.")
13714 (license license:expat)))
13715
13716 (define-public python2-pbkdf2
13717 (package-with-python2 python-pbkdf2))
13718
13719 (define-public python-qrcode
13720 (package
13721 (name "python-qrcode")
13722 (version "5.3")
13723 (source
13724 (origin
13725 (method url-fetch)
13726 (uri (pypi-uri "qrcode" version))
13727 (sha256
13728 (base32
13729 "0kljfrfq0c2rmxf8am57333ia41kd0snbm2rnqbdy816hgpcq5a1"))))
13730 (build-system python-build-system)
13731 (arguments
13732 ;; FIXME: Tests require packaging 'pymaging'.
13733 '(#:tests? #f))
13734 (propagated-inputs
13735 `(("python-lxml" ,python-lxml) ; for SVG output
13736 ("python-pillow" ,python-pillow) ; for PNG output
13737 ("python-six" ,python-six)))
13738 (home-page "https://github.com/lincolnloop/python-qrcode")
13739 (synopsis "QR Code image generator")
13740 (description "This package provides a pure Python QR Code generator
13741 module. It uses the Python Imaging Library (PIL) to allow for the generation
13742 of QR Codes.
13743
13744 In addition this package provides a command line tool to generate QR codes and
13745 either write these QR codes to a file or do the output as ascii art at the
13746 console.")
13747 (license license:bsd-3)))
13748
13749 (define-public python2-qrcode
13750 (package-with-python2 python-qrcode))
13751
13752 ;; SlowAES isn't compatible with Python 3.
13753 (define-public python2-slowaes
13754 (package
13755 (name "python2-slowaes")
13756 (version "0.1a1")
13757 (source
13758 (origin
13759 (method url-fetch)
13760 (uri (pypi-uri "slowaes" version))
13761 (sha256
13762 (base32
13763 "02dzajm83a7lqgxf6r3hgj64wfmcxz8gs4nvgxpvj5n19kjqlrc3"))))
13764 (build-system python-build-system)
13765 (arguments `(#:python ,python-2))
13766 (home-page "http://code.google.com/p/slowaes/")
13767 (synopsis "Implementation of AES in Python")
13768 (description "This package contains an implementation of AES in Python.
13769 This implementation is slow (hence the project name) but still useful when
13770 faster ones are not available.")
13771 (license license:asl2.0)))
13772
13773 (define-public python-rst2ansi
13774 (package
13775 (name "python-rst2ansi")
13776 (version "0.1.5")
13777 (source
13778 (origin
13779 (method url-fetch)
13780 (uri (pypi-uri "rst2ansi" version))
13781 (sha256
13782 (base32
13783 "0vzy6gd60l79ff750scl0sz48r1laalkl6md6dwzah4dcadgn5qv"))))
13784 (build-system python-build-system)
13785 (propagated-inputs
13786 `(("python-docutils" ,python-docutils)))
13787 (home-page "https://github.com/Snaipe/python-rst-to-ansi")
13788 (synopsis "Convert RST to ANSI-decorated console output")
13789 (description
13790 "Python module dedicated to rendering RST (reStructuredText) documents
13791 to ansi-escaped strings suitable for display in a terminal.")
13792 (license license:expat)))
13793
13794 (define-public python-ansi2html
13795 (package
13796 (name "python-ansi2html")
13797 (version "1.2.0")
13798 (source
13799 (origin
13800 (method url-fetch)
13801 (uri (pypi-uri "ansi2html" version))
13802 (sha256
13803 (base32
13804 "1wa00zffprb78w1mqq90dk47czz1knanys2a40zbw2vyapd5lp9y"))))
13805 (build-system python-build-system)
13806 (native-inputs
13807 `(("python-mock" ,python-mock)
13808 ("python-nose" ,python-nose)))
13809 (propagated-inputs
13810 `(("python-six" ,python-six)))
13811 (home-page "http://github.com/ralphbean/ansi2html")
13812 (synopsis "Convert ANSI-decorated console output to HTML")
13813 (description
13814 "@command{ansi2html} is a Python library and command line utility for
13815 convering text with ANSI color codes to HTML or LaTeX.")
13816 (license license:gpl3+)))
13817
13818 (define-public python2-ansi2html
13819 (package-with-python2 python-ansi2html))
13820
13821 (define-public python-ddt
13822 (package
13823 (name "python-ddt")
13824 (version "1.1.1")
13825 (source
13826 (origin
13827 (method url-fetch)
13828 (uri (pypi-uri "ddt" version))
13829 (sha256
13830 (base32
13831 "1c00ikkxr7lha97c81k938bzhgd4pbwamkjn0h4nkhr3xk00zp6n"))))
13832 (build-system python-build-system)
13833 (native-inputs
13834 `(("python-mock" ,python-mock)
13835 ("python-nose" ,python-nose)))
13836 (propagated-inputs
13837 `(("python-six" ,python-six)
13838 ("python-pyyaml" ,python-pyyaml)))
13839 (home-page "https://github.com/txels/ddt")
13840 (synopsis "Data-Driven Tests")
13841 (description
13842 "DDT (Data-Driven Tests) allows you to multiply one test case by running
13843 it with different test data, and make it appear as multiple test cases.")
13844 (license license:expat)))
13845
13846 (define-public python2-ddt
13847 (package-with-python2 python-ddt))
13848
13849 (define-public python-pycosat
13850 (package
13851 (name "python-pycosat")
13852 (version "0.6.1")
13853 (source
13854 (origin
13855 (method url-fetch)
13856 (uri (pypi-uri "pycosat" version))
13857 (sha256
13858 (base32
13859 "1kl3wh1f47rc712n4bmwplbx3fqz3x9i1b587jrbpmvdva4c8f6l"))))
13860 ;; TODO: Unundle picosat. http://fmv.jku.at/picosat/
13861 (build-system python-build-system)
13862 (home-page "https://github.com/ContinuumIO/pycosat")
13863 (synopsis "Bindings to picosat (a SAT solver)")
13864 (description
13865 "This package provides efficient Python bindings to @code{picosat} on
13866 the C level. When importing pycosat, the @code{picosat} solver becomes part
13867 of the Python process itself. @code{picosat} is a @dfn{Boolean Satisfiability
13868 Problem} (SAT) solver.")
13869 (license license:expat)))
13870
13871 (define-public python2-pycosat
13872 (package-with-python2 python-pycosat))
13873
13874 (define-public python2-ruamel.ordereddict
13875 (package
13876 (name "python2-ruamel.ordereddict")
13877 (version "0.4.9")
13878 (source
13879 (origin
13880 (method url-fetch)
13881 (uri (pypi-uri "ruamel.ordereddict" version))
13882 (sha256
13883 (base32
13884 "1xmkl8v9l9inm2pyxgc1fm5005yxm7fkd5gv74q7lj1iy5qc8n3h"))))
13885 (build-system python-build-system)
13886 (arguments
13887 `(#:python ,python-2
13888 #:phases
13889 (modify-phases %standard-phases
13890 (delete 'check)
13891 (add-after 'install 'check
13892 (lambda* (#:key inputs outputs #:allow-other-keys)
13893 (add-installed-pythonpath inputs outputs)
13894 (zero? (system* "python" "test/testordereddict.py")))))))
13895 (home-page "https://bitbucket.org/ruamel/ordereddict")
13896 (synopsis "Version of dict that keeps keys in insertion order")
13897 (description
13898 "This is an implementation of an ordered dictionary with @dfn{Key
13899 Insertion Order} (KIO: updates of values do not affect the position of the
13900 key), @dfn{Key Value Insertion Order} (KVIO, an existing key's position is
13901 removed and put at the back). The standard library module @code{OrderedDict},
13902 implemented later, implements a subset of @code{ordereddict} functionality.
13903 Sorted dictionaries are also provided. Currently only with @dfn{Key Sorted
13904 Order} (KSO, no sorting function can be specified, but a transform can be
13905 specified to apply on the key before comparison (e.g. @code{string.lower})).")
13906 (license license:expat)))
13907
13908 (define-public python-pypeg2
13909 (package
13910 (name "python-pypeg2")
13911 (version "2.15.2")
13912 (source
13913 (origin
13914 (method url-fetch)
13915 (uri (pypi-uri "pyPEG2" version))
13916 (sha256
13917 (base32
13918 "0v8ziaam2r637v94ra4dbjw6jzxz99gs5x4i585kgag1v204yb9b"))))
13919 (build-system python-build-system)
13920 (propagated-inputs `(("python-lxml" ,python-lxml)))
13921 (arguments
13922 ;;https://bitbucket.org/fdik/pypeg/issues/36/test-failures-on-py35
13923 '(#:tests? #f))
13924 (home-page "https://fdik.org/pyPEG/")
13925 (synopsis "Parsering Expression Grammars in Python")
13926 (description "PyPEG is an intrinsic parser interpreter framework for
13927 Python. It is based on Parsing Expression Grammars, PEG. With pyPEG you can
13928 parse many formal languages.")
13929 (license license:gpl2)))
13930
13931 (define-public python2-cliapp
13932 (package
13933 (name "python2-cliapp")
13934 (version "1.20160724")
13935 (source
13936 (origin
13937 (method url-fetch)
13938 (uri (string-append
13939 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/cliapp/snapshot/cliapp-"
13940 version ".tar.gz"))
13941 (sha256
13942 (base32
13943 "025cyi75vxyghbm4hav8dz4fzwksshddavy9g9fwr440awcvw74f"))))
13944 (build-system python-build-system)
13945 (arguments
13946 `(#:python ,python-2))
13947 (propagated-inputs
13948 `(("python2-pyaml" ,python2-pyaml)))
13949 (home-page "https://liw.fi/cliapp/")
13950 (synopsis "Python framework for command line programs")
13951 (description "@code{python2-cliapp} is a python framework for
13952 command line programs. It contains the typical stuff such programs
13953 need to do, such as parsing the command line for options, and
13954 iterating over input files.")
13955 (license license:gpl2+)))
13956
13957 (define-public python2-ttystatus
13958 (package
13959 (name "python2-ttystatus")
13960 (version "0.32")
13961 (source
13962 (origin
13963 (method url-fetch)
13964 (uri (string-append
13965 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/ttystatus/snapshot/ttystatus-"
13966 version ".tar.gz"))
13967 (sha256
13968 (base32
13969 "0b5g889jj23r2w1hi300cdldx6jvspanp0ybf5n1qvdvl150aamf"))))
13970 (build-system python-build-system)
13971 (arguments
13972 `(#:python ,python-2))
13973 (home-page "https://liw.fi/ttystatus/")
13974 (synopsis "Python library for showing progress reporting and
13975 status updates on terminals")
13976 (description "@code{python2-ttystatus} is a python library for
13977 showing progress reporting and status updates on terminals, for
13978 command line programs. Output is automatically adapted to the width
13979 of the terminal: truncated if it does not fit, and resized if the
13980 terminal size changes.")
13981 (license license:gpl3+)))
13982
13983 (define-public python2-tracing
13984 (package
13985 (name "python2-tracing")
13986 (version "0.10")
13987 (source
13988 (origin
13989 (method url-fetch)
13990 (uri (string-append
13991 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/python-tracing/snapshot/tracing-"
13992 version ".tar.gz"))
13993 (sha256
13994 (base32
13995 "06cw4zg42fsvqy372vi2whj26w56vzg5axhzwdjc2bgwf03garbw"))))
13996 (build-system python-build-system)
13997 (arguments
13998 `(#:python ,python-2))
13999 (home-page "https://liw.fi/tracing/")
14000 (synopsis "Python debug logging helper")
14001 (description "@code{python2-tracing} is a python library for
14002 logging debug messages. It provides a way to turn debugging messages
14003 on and off, based on the filename they occur in. It is much faster
14004 than using @code{logging.Filter} to accomplish the same thing, which
14005 matters when code is run in production mode. The actual logging still
14006 happens using the @code{logging} library.")
14007 (license license:gpl3+)))
14008
14009 (define-public python2-larch
14010 (package
14011 (name "python2-larch")
14012 (version "1.20151025")
14013 (source
14014 (origin
14015 (method url-fetch)
14016 (uri (string-append
14017 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/larch/snapshot/larch-"
14018 version ".tar.gz"))
14019 (sha256
14020 (base32
14021 "1p4knkkavlqymgciz2wbcnfrdgdbafhg14maplnk4vbw0q8xs663"))))
14022 (build-system python-build-system)
14023 (arguments
14024 `(#:python ,python-2))
14025 (propagated-inputs
14026 `(("python2-tracing" ,python2-tracing)))
14027 (home-page "https://liw.fi/larch/")
14028 (synopsis "Python copy-on-write B-tree library")
14029 (description "@code{python2-larch} is an implementation of
14030 particular kind of B-tree, based on research by Ohad Rodeh. See
14031 @url{http://liw.fi/larch/ohad-btrees-shadowing-clones.pdf} for details
14032 on the data structure.
14033
14034 The distinctive feature of this B-tree is that a node is never
14035 (conceptually) modified. Instead, all updates are done by
14036 copy-on-write. This makes it easy to clone a tree, and modify only the
14037 clone, while other processes access the original tree.")
14038 (license license:gpl3+)))
14039
14040 (define-public python-htmlmin
14041 (package
14042 (name "python-htmlmin")
14043 (version "0.1.10")
14044 (source
14045 (origin
14046 (method url-fetch)
14047 (uri (pypi-uri "htmlmin" version))
14048 (sha256
14049 (base32
14050 "0qxa93j3p1ak32qh8d9kshqv8v3z0hkc13dwbhp5cn7sn3xmsp6a"))))
14051 (arguments
14052 `(#:tests? #f)) ;htmlmin has no tests
14053 (build-system python-build-system)
14054 (home-page "https://htmlmin.readthedocs.org/en/latest/")
14055 (synopsis "HTML minifier")
14056 (description "@code{htmlmin} is an HTML minifier that just works.
14057 It comes with safe defaults and easily configurable options.")
14058 (license license:bsd-3)))
14059
14060 (define-public python2-htmlmin
14061 (package-with-python2 python-htmlmin))
14062
14063 (define-public python-flask-htmlmin
14064 (package
14065 (name "python-flask-htmlmin")
14066 (version "1.2")
14067 (source
14068 (origin
14069 (method url-fetch)
14070 (uri (pypi-uri "Flask-HTMLmin" version))
14071 (sha256
14072 (base32
14073 "1n6zlq72kakkw0z2jpq6nh74lfsmxybm4g053pwhc14fbr809348"))))
14074 (propagated-inputs
14075 `(("python-flask" ,python-flask)
14076 ("python-htmlmin" ,python-htmlmin)))
14077 (build-system python-build-system)
14078 (home-page "https://github.com/hamidfzm/Flask-HTMLmin")
14079 (synopsis "HTML response minifier for Flask")
14080 (description
14081 "Minify @code{text/html} MIME type responses when using @code{Flask}.")
14082 (license license:bsd-3)))
14083
14084 (define-public python2-flask-htmlmin
14085 (package-with-python2 python-flask-htmlmin))
14086
14087 (define-public python-flask-login
14088 (package
14089 (name "python-flask-login")
14090 (version "0.4.0")
14091 (source
14092 (origin
14093 (method url-fetch)
14094 (uri (string-append "https://github.com/maxcountryman/flask-login/archive/"
14095 version ".tar.gz"))
14096 (file-name (string-append name "-" version ".tar.gz"))
14097 (sha256
14098 (base32
14099 "1pdqp7a2gyb7k06xda004x0fi2w66s6kn2i0ndkqndmg12d83f9w"))))
14100 (arguments
14101 ;; Tests fail PEP8 compliance. See:
14102 ;; https://github.com/maxcountryman/flask-login/issues/340
14103 `(#:tests? #f))
14104 (build-system python-build-system)
14105 (home-page "https://github.com/maxcountryman/flask-login")
14106 (synopsis "User session management for Flask")
14107 (description
14108 "@code{Flask-Login} provides user session management for Flask. It
14109 handles the common tasks of logging in, logging out, and remembering your
14110 users' sessions over extended periods of time.")
14111 (license license:expat)))
14112
14113 (define-public python2-flask-login
14114 (package-with-python2 python-flask-login))
14115
14116 (define-public python-astroid
14117 (package
14118 (name "python-astroid")
14119 (version "1.5.3")
14120 (source
14121 (origin
14122 (method url-fetch)
14123 (uri (string-append
14124 "https://github.com/PyCQA/astroid/archive/astroid-"
14125 version ".tar.gz"))
14126 (sha256
14127 (base32
14128 "0isn5p7f9n48hmksgbrj7dkm9dyglnayzn5jngk37qywg8a74ngn"))))
14129 (build-system python-build-system)
14130 (propagated-inputs
14131 `(("python-lazy-object-proxy" ,python-lazy-object-proxy)
14132 ("python-six" ,python-six)
14133 ("python-wrapt" ,python-wrapt)))
14134 (arguments
14135 `(#:phases
14136 (modify-phases %standard-phases
14137 (replace 'check
14138 (lambda _
14139 (zero? (system* "python" "-m" "unittest" "discover"
14140 "-p" "unittest*.py")))))))
14141 (home-page "https://github.com/PyCQA/astroid")
14142 (synopsis "Common base representation of python source code for pylint and
14143 other projects")
14144 (description "@code{python-astroid} provides a common base representation
14145 of python source code for projects such as pychecker, pyreverse, pylint, etc.
14146
14147 It provides a compatible representation which comes from the _ast module. It
14148 rebuilds the tree generated by the builtin _ast module by recursively walking
14149 down the AST and building an extended ast. The new node classes have
14150 additional methods and attributes for different usages. They include some
14151 support for static inference and local name scopes. Furthermore, astroid
14152 builds partial trees by inspecting living objects.")
14153 (license license:lgpl2.1+)
14154 (properties `((python2-variant . ,(delay python2-astroid))))))
14155
14156 (define-public python2-astroid
14157 (let ((base (package-with-python2
14158 (strip-python2-variant python-astroid))))
14159 (package (inherit base)
14160 (propagated-inputs
14161 `(("python2-backports-functools-lru-cache"
14162 ,python2-backports-functools-lru-cache)
14163 ("python2-enum34" ,python2-enum34)
14164 ("python2-singledispatch" ,python2-singledispatch)
14165 ,@(package-propagated-inputs base))))))
14166
14167 (define-public python-isort
14168 (package
14169 (name "python-isort")
14170 (version "4.2.5")
14171 (source
14172 (origin
14173 (method url-fetch)
14174 (uri (string-append
14175 "https://github.com/timothycrosley/isort/archive/"
14176 version ".tar.gz"))
14177 (file-name (string-append name "-" version ".tar.gz"))
14178 (sha256
14179 (base32
14180 "0zsrgkb0krn5476yncy5dd56k7dk34zqb4bnlvwy44ixgilyjmfh"))))
14181 (build-system python-build-system)
14182 (native-inputs
14183 `(("python-mock" ,python-mock)
14184 ("python-pytest" ,python-pytest)))
14185 (home-page "https://github.com/timothycrosley/isort")
14186 (synopsis "Python utility/library to sort python imports")
14187 (description "@code{python-isort} is a python utility/library to sort
14188 imports alphabetically, and automatically separated into sections. It
14189 provides a command line utility, a python library and plugins for various
14190 editors.")
14191 (license license:expat)))
14192
14193 (define-public python2-isort
14194 (package-with-python2 python-isort))
14195
14196 (define-public python2-backports-functools-lru-cache
14197 (package
14198 (name "python2-backports-functools-lru-cache")
14199 (version "1.3")
14200 (source
14201 (origin
14202 (method url-fetch)
14203 ;; only the pypi tarballs contain the necessary metadata
14204 (uri (pypi-uri "backports.functools_lru_cache" version))
14205 (sha256
14206 (base32
14207 "158ysf2hb0q4p4695abfiym9x1ywg0dgh8a3apd7gqaaxjy22jj4"))))
14208 (build-system python-build-system)
14209 (native-inputs
14210 `(("python2-setuptools-scm" ,python2-setuptools-scm)))
14211 (arguments
14212 `(#:python ,python-2))
14213 (home-page "https://github.com/jaraco/backports.functools_lru_cache")
14214 (synopsis "Backport of functools.lru_cache from Python 3.3")
14215 (description "@code{python2-backports-functools-lru-cache} is a backport
14216 of @code{functools.lru_cache} from python 3.3.")
14217 (license license:expat)))
14218
14219 (define-public python-configparser
14220 (package
14221 (name "python-configparser")
14222 (version "3.5.0")
14223 (source
14224 (origin
14225 (method url-fetch)
14226 (uri (string-append
14227 "https://bitbucket.org/ambv/configparser/get/"
14228 version ".tar.bz2"))
14229 (file-name (string-append name "-" version ".tar.gz"))
14230 (sha256
14231 (base32
14232 "0waq40as14abwzbb321hfz4vr1fi363nscy32ga14qvfygrg96wa"))))
14233 (build-system python-build-system)
14234 (home-page "http://docs.python.org/py3k/library/configparser.html")
14235 (synopsis "Backport of configparser from python 3.5")
14236 (description "@code{python-configparser} is a backport of
14237 @code{configparser} from Python 3.5 so that it can be used directly
14238 in other versions.")
14239 (license license:expat)))
14240
14241 (define-public python2-configparser
14242 (package-with-python2 python-configparser))
14243
14244 (define-public python2-coverage-test-runner
14245 (package
14246 (name "python2-coverage-test-runner")
14247 (version "1.11")
14248 (source
14249 (origin
14250 (method url-fetch)
14251 (uri (string-append
14252 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/"
14253 "coverage-test-runner/snapshot/coverage-test-runner-"
14254 version ".tar.gz"))
14255 (sha256
14256 (base32
14257 "0y1m7z3dl63kmhcmydl1mwg0hacnf6ghrx9dah17j9iasssfa3g7"))))
14258 (build-system python-build-system)
14259 (arguments
14260 `(#:python ,python-2
14261 #:phases
14262 (modify-phases %standard-phases
14263 (replace 'check
14264 (lambda _
14265 (zero? (system* "./testrun")))))))
14266 (propagated-inputs
14267 `(("python2-coverage" ,python2-coverage)))
14268 (home-page "https://liw.fi/coverage-test-runner/")
14269 (synopsis "Python module for running unit tests")
14270 (description "@code{CoverageTestRunner} is a python module for running
14271 unit tests and failing them if the unit test module does not exercise all
14272 statements in the module it tests.")
14273 (license license:gpl3+)))
14274
14275 (define-public python-pylint
14276 (package
14277 (name "python-pylint")
14278 (version "1.7.2")
14279 (source
14280 (origin
14281 (method url-fetch)
14282 (uri (string-append
14283 "https://github.com/PyCQA/pylint/archive/pylint-"
14284 version ".tar.gz"))
14285 (sha256
14286 (base32
14287 "0mzn1czhf1mgr2wiqfihb274sja02h899b85kywdpivppa9nwrmp"))))
14288 (build-system python-build-system)
14289 (native-inputs
14290 `(("python-pytest" ,python-pytest)
14291 ("python-pytest-runner" ,python-pytest-runner)
14292 ("python-tox" ,python-tox)))
14293 (propagated-inputs
14294 `(("python-astroid" ,python-astroid)
14295 ("python-isort" ,python-isort)
14296 ("python-mccabe" ,python-mccabe)
14297 ("python-six" ,python-six)))
14298 (arguments
14299 `(#:phases
14300 (modify-phases %standard-phases
14301 (replace 'check
14302 (lambda _
14303 ;; Somehow, tests for python2-pylint
14304 ;; fail if run from the build directory
14305 (let ((work "/tmp/work"))
14306 (mkdir-p work)
14307 (setenv "PYTHONPATH"
14308 (string-append (getenv "PYTHONPATH") ":" work))
14309 (copy-recursively "." work)
14310 (with-directory-excursion "/tmp"
14311 (zero? (system* "python" "-m" "unittest" "discover"
14312 "-s" (string-append work "/pylint/test")
14313 "-p" "*test_*.py")))))))))
14314 (home-page "https://github.com/PyCQA/pylint")
14315 (synopsis "Python source code analyzer which looks for coding standard
14316 errors")
14317 (description "Pylint is a Python source code analyzer which looks
14318 for programming errors, helps enforcing a coding standard and sniffs
14319 for some code smells (as defined in Martin Fowler's Refactoring book).
14320
14321 Pylint has many rules enabled by default, way too much to silence them
14322 all on a minimally sized program. It's highly configurable and handle
14323 pragmas to control it from within your code. Additionally, it is
14324 possible to write plugins to add your own checks.")
14325 (properties `((python2-variant . ,(delay python2-pylint))))
14326 (license license:gpl2+)))
14327
14328 (define-public python2-pylint
14329 (let ((pylint (package-with-python2
14330 (strip-python2-variant python-pylint))))
14331 (package (inherit pylint)
14332 (propagated-inputs
14333 `(("python2-backports-functools-lru-cache"
14334 ,python2-backports-functools-lru-cache)
14335 ("python2-configparser" ,python2-configparser)
14336 ,@(package-propagated-inputs pylint))))))
14337
14338 (define-public python-paramunittest
14339 (package
14340 (name "python-paramunittest")
14341 (version "0.2")
14342 (source
14343 (origin
14344 (method url-fetch)
14345 (uri (pypi-uri "ParamUnittest" version))
14346 (sha256
14347 (base32
14348 "0kp793hws5xv1wvycxq7jw2pwy36f35k39jg8hx5qikij5a0jid1"))))
14349 (build-system python-build-system)
14350 (home-page
14351 "https://github.com/rik0/ParamUnittest")
14352 (synopsis
14353 "Simple extension to have parametrized unit tests")
14354 (description
14355 "This package allows to create parametrized unit-tests that work with the standard
14356 unittest package. A parametrized test case is automatically converted to multiple test
14357 cases. Since they are TestCase subclasses, they work with other test suites that
14358 recognize TestCases.")
14359 (license license:bsd-2)))
14360
14361 (define-public python2-python-paramunittest
14362 (package-with-python2 python-paramunittest))
14363
14364 (define-public python-mando
14365 (package
14366 (name "python-mando")
14367 (version "0.5")
14368 (source
14369 (origin
14370 (method url-fetch)
14371 (uri (pypi-uri "mando" version))
14372 (sha256
14373 (base32
14374 "0q05h66439gqdmlk4jqm6xrwrzfdgs4mwk70barxhr2y83qbbdc0"))))
14375 (build-system python-build-system)
14376 (propagated-inputs
14377 `(("python-rst2ansi" ,python-rst2ansi)))
14378 (native-inputs
14379 `(("python-sphinx" ,python-sphinx-1.5.3)
14380 ("python-paramunittest" ,python-paramunittest)))
14381 (home-page "https://mando.readthedocs.org/")
14382 (synopsis
14383 "Wrapper around argparse, allowing creation of complete CLI applications")
14384 (description
14385 "This package is a wrapper around argparse, allowing you to write complete CLI
14386 applications in seconds while maintaining all the flexibility.")
14387 (license license:expat)))
14388
14389 (define-public python2-mando
14390 (package-with-python2 python-mando))
14391
14392 (define-public python-mando-0.3.1
14393 ;; python-radon (version 1.5.0) has a requirement
14394 ;; for mando<0.4,>=0.3
14395 (package
14396 (inherit python-mando)
14397 (name "python-mando")
14398 (version "0.3.1")
14399 (source
14400 (origin
14401 (method url-fetch)
14402 (uri (string-append "https://github.com/rubik/mando/archive/v"
14403 version
14404 ".tar.gz"))
14405 (sha256
14406 (base32
14407 "17jlkdpqw22z1nyml5ybslilqkzmnk0dxxjml8bfghav1l5hbwd2"))))))
14408
14409 (define-public python-fudge
14410 (package
14411 (name "python-fudge")
14412 ;; 0.9.6 is the latest version suitable for testing the "fabric" Python 2
14413 ;; package, which is currently the only use of this package.
14414 (version "0.9.6")
14415 (source
14416 (origin
14417 (method url-fetch)
14418 (uri (pypi-uri "fudge" version))
14419 (sha256
14420 (base32
14421 "185ia3vr3qk4f2s1a9hdxb8ci4qc0x0xidrad96pywg8j930qs9l"))))
14422 (build-system python-build-system)
14423 (arguments
14424 `(#:tests? #f)) ;XXX: Tests require the NoseJS Python package.
14425 (home-page "https://github.com/fudge-py/fudge")
14426 (synopsis "Replace real objects with fakes/mocks/stubs while testing")
14427 (description
14428 "Fudge is a Python module for using fake objects (mocks and stubs) to
14429 test real ones.
14430
14431 In readable Python code, you declare the methods available on your fake object
14432 and how they should be called. Then you inject that into your application and
14433 start testing. This declarative approach means you don’t have to record and
14434 playback actions and you don’t have to inspect your fakes after running code.
14435 If the fake object was used incorrectly then you’ll see an informative
14436 exception message with a traceback that points to the culprit.")
14437 (license license:expat)))
14438
14439 (define-public python2-fudge
14440 (package-with-python2 python-fudge))
14441
14442 (define-public python-oauth2client
14443 (package
14444 (name "python-oauth2client")
14445 (version "4.0.0")
14446 (source
14447 (origin
14448 (method url-fetch)
14449 (uri (pypi-uri "oauth2client" version))
14450 (sha256
14451 (base32
14452 "1irqqap2zibysf8dba8sklfqikia579srd0phm5n754ni0h59gl0"))))
14453 (build-system python-build-system)
14454 (arguments
14455 `(#:tests? #f))
14456 (propagated-inputs
14457 `(("python-httplib2" ,python-httplib2)
14458 ("python-pyasn1" ,python-pyasn1)
14459 ("python-pyasn1-modules" ,python-pyasn1-modules)
14460 ("python-rsa" ,python-rsa)
14461 ("python-six" ,python-six)))
14462 (home-page "http://github.com/google/oauth2client/")
14463 (synopsis "OAuth 2.0 client library")
14464 (description "@code{python-oauth2client} provides an OAuth 2.0 client
14465 library for Python")
14466 (license license:asl2.0)))
14467
14468 (define-public python-flask-oidc
14469 (package
14470 (name "python-flask-oidc")
14471 (version "1.1.1")
14472 (source
14473 (origin
14474 (method url-fetch)
14475 (uri (pypi-uri "flask-oidc" version))
14476 (sha256
14477 (base32
14478 "1ay5j0mf174bix7i67hclr95gv16z81fpx0dijvi0gydvdj3ddy2"))))
14479 (build-system python-build-system)
14480 (propagated-inputs
14481 `(("python-flask" ,python-flask)
14482 ("python-itsdangerous" ,python-itsdangerous)
14483 ("python-oauth2client" ,python-oauth2client)
14484 ("python-six" ,python-six)))
14485 (native-inputs
14486 `(("python-nose" ,python-nose)
14487 ("python-mock" ,python-mock)))
14488 (home-page "https://github.com/puiterwijk/flask-oidc")
14489 (synopsis "OpenID Connect extension for Flask")
14490 (description "@code{python-flask-oidc} provides an OpenID Connect extension
14491 for Flask.")
14492 (license license:bsd-2)))
14493
14494 (define-public python-mwclient
14495 (package
14496 (name "python-mwclient")
14497 (version "0.8.4")
14498 (source
14499 (origin
14500 (method url-fetch)
14501 ;; The PyPI version wouldn't contain tests.
14502 (uri (string-append "https://github.com/mwclient/mwclient/archive/"
14503 "v" version ".tar.gz"))
14504 (sha256
14505 (base32
14506 "1jj0yhilkjir00719fc7w133x7hdyhkxhk6xblla4asig45klsfv"))))
14507 (build-system python-build-system)
14508 (propagated-inputs
14509 `(("python-requests" ,python-requests)
14510 ("python-requests-oauthlib"
14511 ,python-requests-oauthlib)
14512 ("python-six" ,python-six)))
14513 (native-inputs
14514 `(("python-mock" ,python-mock)
14515 ("python-pytest" ,python-pytest)
14516 ("python-pytest-pep8" ,python-pytest-pep8)
14517 ("python-pytest-cache" ,python-pytest-cache)
14518 ("python-pytest-cov" ,python-pytest-cov)
14519 ("python-responses" ,python-responses)))
14520 (home-page "https://github.com/btongminh/mwclient")
14521 (synopsis "MediaWiki API client")
14522 (description "This package provides a MediaWiki API client.")
14523 (license license:expat)))
14524
14525 (define-public python2-mwclient
14526 (package-with-python2 python-mwclient))
14527
14528 (define-public python-pytest-warnings
14529 (package
14530 (name "python-pytest-warnings")
14531 (version "0.2.0")
14532 (source
14533 (origin
14534 (method url-fetch)
14535 (uri (pypi-uri "pytest-warnings" version))
14536 (sha256
14537 (base32
14538 "0gf2dpahpl5igb7jh1sr9acj3z3gp7zahqdqb69nk6wx01c8kc1g"))))
14539 (build-system python-build-system)
14540 (propagated-inputs
14541 `(("pytest" ,python-pytest-3.0)))
14542 (home-page "https://github.com/fschulze/pytest-warnings")
14543 (synopsis "Pytest plugin to list Python warnings in pytest report")
14544 (description
14545 "Python-pytest-warnings is a pytest plugin to list Python warnings in
14546 pytest report.")
14547 (license license:expat)))
14548
14549 (define-public python2-pytest-warnings
14550 (package-with-python2 python-pytest-warnings))
14551
14552 (define-public python-pytest-capturelog
14553 (package
14554 (name "python-pytest-capturelog")
14555 (version "0.7")
14556 (source
14557 (origin
14558 (method url-fetch)
14559 (uri (pypi-uri "pytest-capturelog" version ".tar.gz"))
14560 (sha256
14561 (base32
14562 "038049nyjl7di59ycnxvc9nydivc5m8np3hqq84j2iirkccdbs5n"))))
14563 (build-system python-build-system)
14564 (propagated-inputs
14565 `(("pytest" ,python-pytest-3.0)))
14566 (home-page "http://bitbucket.org/memedough/pytest-capturelog/overview")
14567 (synopsis "Pytest plugin to catch log messages")
14568 (description
14569 "Python-pytest-catchlog is a pytest plugin to catch log messages.")
14570 (license license:expat)))
14571
14572 (define-public python2-pytest-capturelog
14573 (package-with-python2 python-pytest-capturelog))
14574
14575 (define-public python-pytest-catchlog
14576 (package
14577 (name "python-pytest-catchlog")
14578 (version "1.2.2")
14579 (source
14580 (origin
14581 (method url-fetch)
14582 (uri (pypi-uri "pytest-catchlog" version ".zip"))
14583 (sha256
14584 (base32
14585 "1w7wxh27sbqwm4jgwrjr9c2gy384aca5jzw9c0wzhl0pmk2mvqab"))))
14586 (build-system python-build-system)
14587 (native-inputs
14588 `(("unzip" ,unzip)))
14589 (propagated-inputs
14590 `(("pytest" ,python-pytest-3.0)))
14591 (home-page "https://github.com/eisensheng/pytest-catchlog")
14592 (synopsis "Pytest plugin to catch log messages")
14593 (description
14594 "Python-pytest-catchlog is a pytest plugin to catch log messages. This is
14595 a fork of pytest-capturelog.")
14596 (license license:expat)))
14597
14598 (define-public python2-pytest-catchlog
14599 (package-with-python2 python-pytest-catchlog))
14600
14601 (define-public python-utils
14602 (package
14603 (name "python-utils")
14604 (version "2.1.0")
14605 (source (origin
14606 (method url-fetch)
14607 (uri (pypi-uri "python-utils" version))
14608 (sha256
14609 (base32
14610 "1mcsy6q5am4ya72rgkpb6kax6vv7c93cfkkas89xnpa4sj9zf28p"))))
14611 (build-system python-build-system)
14612 (native-inputs
14613 `(("pytest-runner" ,python-pytest-runner)
14614 ("pytest" ,python-pytest)
14615 ("six" ,python-six)))
14616 (home-page "https://github.com/WoLpH/python-utils")
14617 (synopsis "Convenient utilities not included with the standard Python install")
14618 (description
14619 "Python Utils is a collection of small Python functions and classes which
14620 make common patterns shorter and easier.")
14621 (license license:bsd-2)))
14622
14623 (define-public python2-utils
14624 (package-with-python2 python-utils))
14625
14626 (define-public python-webassets
14627 (package
14628 (name "python-webassets")
14629 (version "0.12.1")
14630 (source
14631 (origin
14632 (method url-fetch)
14633 (uri (pypi-uri "webassets" version))
14634 (sha256
14635 (base32
14636 "1nrqkpb7z46h2b77xafxihqv3322cwqv6293ngaky4j3ff4cing7"))))
14637 (build-system python-build-system)
14638 (native-inputs
14639 `(("python-jinja2" ,python-jinja2)
14640 ("python-mock" ,python-mock)
14641 ("python-nose" ,python-nose)
14642 ("python-pytest" ,python-pytest)))
14643 (home-page "https://github.com/miracle2k/webassets")
14644 (synopsis "Media asset management")
14645 (description "Merges, minifies and compresses Javascript and CSS files,
14646 supporting a variety of different filters, including YUI, jsmin, jspacker or
14647 CSS tidy. Also supports URL rewriting in CSS files.")
14648 (license license:bsd-2)))
14649
14650 (define-public python-sphinx-me
14651 (package
14652 (name "python-sphinx-me")
14653 (version "0.3")
14654 (source
14655 (origin
14656 (method url-fetch)
14657 (uri (pypi-uri "sphinx-me" version))
14658 (sha256
14659 (base32
14660 "06jzgp213zihnvpcy2y5jy3ykid3apc2ncp2pg6a2g05lhiziglq"))))
14661 (build-system python-build-system)
14662 (home-page "https://github.com/stephenmcd/sphinx-me")
14663 (synopsis "Create a Sphinx documentation shell")
14664 (description
14665 "Create a Sphinx documentation shell for your project and include the
14666 README file as the documentation index. It handles extracting the required
14667 meta data such as the project name, author and version from your project for
14668 use in your Sphinx docs.")
14669 (license license:bsd-2)))
14670
14671 (define-public python2-sphinx-me
14672 (package-with-python2 python-sphinx-me))
14673
14674 (define-public python-cssmin
14675 (package
14676 (name "python-cssmin")
14677 (version "0.2.0")
14678 (source
14679 (origin
14680 (method url-fetch)
14681 (uri (pypi-uri "cssmin" version))
14682 (sha256
14683 (base32
14684 "1dk723nfm2yf8cp4pj785giqlwv42l0kj8rk40kczvq1hk6g04p0"))))
14685 (build-system python-build-system)
14686 (home-page "https://github.com/zacharyvoase/cssmin")
14687 (synopsis "Python port of the YUI CSS Compressor")
14688 (description "Python port of the YUI CSS Compressor.")
14689 (license (list license:expat license:bsd-3))))
14690
14691 (define-public python2-cssmin
14692 (package-with-python2 python-cssmin))
14693
14694 (define-public python-diff-match-patch
14695 (package
14696 (name "python-diff-match-patch")
14697 (version "20121119")
14698 (source
14699 (origin
14700 (method url-fetch)
14701 (uri (pypi-uri "diff-match-patch" version))
14702 (sha256
14703 (base32
14704 "0k1f3v8nbidcmmrk65m7h8v41jqi37653za9fcs96y7jzc8mdflx"))))
14705 (build-system python-build-system)
14706 (home-page "https://code.google.com/p/google-diff-match-patch")
14707 (synopsis "Synchronize plain text")
14708 (description "Diff Match and Patch libraries offer robust algorithms to
14709 perform the operations required for synchronizing plain text.")
14710 (license license:asl2.0)))
14711
14712 (define-public python2-diff-match-patch
14713 (package-with-python2 python-diff-match-patch))
14714
14715 (define-public python-dirsync
14716 (package
14717 (name "python-dirsync")
14718 (version "2.2.2")
14719 (source
14720 (origin
14721 (method url-fetch)
14722 (uri (pypi-uri "dirsync" version ".zip"))
14723 (sha256
14724 (base32
14725 "1hcdvmkwd5512zbxpin0k7bx5bkgzy3swjx7d0kj1y45af6r75v2"))))
14726 (build-system python-build-system)
14727 (native-inputs
14728 `(("unzip" ,unzip)))
14729 (propagated-inputs
14730 `(("six" ,python-six)))
14731 (home-page "https://bitbucket.org/tkhyn/dirsync")
14732 (synopsis "Advanced directory tree synchronisation tool")
14733 (description "Advanced directory tree synchronisation tool.")
14734 (license license:expat)))
14735
14736 (define-public python2-dirsync
14737 (package-with-python2 python-dirsync))
14738
14739 (define-public python-nosexcover
14740 (package
14741 (name "python-nosexcover")
14742 (version "1.0.11")
14743 (source (origin
14744 (method url-fetch)
14745 (uri (pypi-uri "nosexcover" version))
14746 (sha256
14747 (base32
14748 "10xqr12qv62k2flxwqhh8cr00cjhn7sfjrm6p35gd1x5bmjkr319"))))
14749 (build-system python-build-system)
14750 (propagated-inputs
14751 `(("python-coverage" ,python-coverage)
14752 ("python-nose" ,python-nose)))
14753 (home-page "http://github.com/cmheisel/nose-xcover")
14754 (synopsis "Extends nose.plugins.cover to add Cobertura-style XML reports")
14755 (description "Nose-xcover is a companion to the built-in
14756 @code{nose.plugins.cover}. This plugin will write out an XML coverage report
14757 to a file named coverage.xml.
14758
14759 It will honor all the options you pass to the Nose coverage plugin,
14760 especially -cover-package.")
14761 (license license:expat)))
14762
14763 (define-public python2-nosexcover
14764 (package-with-python2 python-nosexcover))
14765
14766 (define-public python-elasticsearch
14767 (package
14768 (name "python-elasticsearch")
14769 (version "1.0.0")
14770 (source
14771 (origin
14772 (method url-fetch)
14773 (uri (pypi-uri "elasticsearch" version))
14774 (sha256
14775 (base32
14776 "1sdw1r05cw7ihnmng8ra9v968fj7bq6sji8i1dikymsnkcpgc69g"))))
14777 (build-system python-build-system)
14778 (native-inputs
14779 `(("python-mock" ,python-mock)
14780 ("python-nosexcover" ,python-nosexcover)
14781 ("python-pyaml" ,python-pyaml)
14782 ("python-requests" ,python-requests)))
14783 (propagated-inputs
14784 `(("urllib3" ,python-urllib3)))
14785 (arguments
14786 ;; tests require the test_elasticsearch module but it is not distributed.
14787 `(#:tests? #f))
14788 (home-page "https://github.com/elastic/elasticsearch-py")
14789 (synopsis "Low-level client for Elasticsearch")
14790 (description "Official low-level client for Elasticsearch. Its goal is to
14791 provide common ground for all Elasticsearch-related code in Python; because of
14792 this it tries to be opinion-free and very extendable.")
14793 (license license:expat)))
14794
14795 (define-public python2-elasticsearch
14796 (package-with-python2 python-elasticsearch))
14797
14798 (define-public python-levenshtein
14799 (package
14800 (name "python-levenshtein")
14801 (version "0.12.0")
14802 (source
14803 (origin
14804 (method url-fetch)
14805 (uri (pypi-uri "python-Levenshtein" version))
14806 (sha256
14807 (base32
14808 "1c9ybqcja31nghfcc8xxbbz9h60s9qi12b9hr4jyl69xbvg12fh3"))))
14809 (build-system python-build-system)
14810 (home-page "https://github.com/ztane/python-Levenshtein")
14811 (synopsis "Fast computation of Levenshtein distance and string similarity")
14812 (description
14813 "The Levenshtein Python C extension module contains functions for fast computation of
14814 @enumerate
14815 @item Levenshtein (edit) distance, and edit operations
14816 @item string similarity
14817 @item approximate median strings, and generally string averaging
14818 @item string sequence and set similarity
14819 @end enumerate
14820 It supports both normal and Unicode strings.")
14821 (license license:gpl2+)))
14822
14823 (define-public python2-levenshtein
14824 (package-with-python2 python-levenshtein))
14825
14826 (define-public python-scandir
14827 (package
14828 (name "python-scandir")
14829 (version "1.4")
14830 (source
14831 (origin
14832 (method url-fetch)
14833 (uri (pypi-uri "scandir" version))
14834 (sha256
14835 (base32 "0yjrgp0mxp3d8bjkq2m1ac2ys8n76wykksvgyjrnil9gr3fx7a5d"))))
14836 (build-system python-build-system)
14837 (home-page "https://github.com/benhoyt/scandir")
14838 (synopsis "Directory iteration function")
14839 (description
14840 "Directory iteration function like os.listdir(), except that instead of
14841 returning a list of bare filenames, it yields DirEntry objects that include
14842 file type and stat information along with the name. Using scandir() increases
14843 the speed of os.walk() by 2-20 times (depending on the platform and file
14844 system) by avoiding unnecessary calls to os.stat() in most cases.")
14845 (license license:bsd-3)))
14846
14847 (define-public python2-scandir
14848 (package-with-python2 python-scandir))
14849
14850 (define-public python2-stemming
14851 (package
14852 (name "python2-stemming")
14853 (version "1.0.1")
14854 (source
14855 (origin
14856 (method url-fetch)
14857 (uri (pypi-uri "stemming" version))
14858 (sha256
14859 (base32 "0ldwa24gnnxhniv0fhygkpc2mwgd93q10ag8rvzayv6hw418frsr"))))
14860 (build-system python-build-system)
14861 (arguments
14862 `(#:python ,python-2))
14863 (home-page "https://bitbucket.org/mchaput/stemming/overview")
14864 (synopsis "Python implementations of various stemming algorithms")
14865 (description
14866 "Python implementations of the Porter, Porter2, Paice-Husk, and Lovins
14867 stemming algorithms for English. These implementations are straightforward and
14868 efficient, unlike some Python versions of the same algorithms available on the
14869 Web. This package is an extraction of the stemming code included in the Whoosh
14870 search engine.")
14871 (license license:public-domain)))
14872
14873 (define-public python-factory-boy
14874 (package
14875 (name "python-factory-boy")
14876 (version "2.8.1")
14877 (source
14878 (origin
14879 (method url-fetch)
14880 (uri (pypi-uri "factory_boy" version))
14881 (sha256
14882 (base32 "1fvin6san5xsjh2c4y18caj2lnmwxlylyqm8mh1yc6rp38wlwr56"))))
14883 (build-system python-build-system)
14884 (arguments
14885 ;; Tests are not included in the tarball.
14886 `(#:tests? #f))
14887 (propagated-inputs
14888 `(("faker" ,python-faker)))
14889 (home-page "https://github.com/benhoyt/scandir")
14890 (synopsis "Versatile test fixtures replacement")
14891 (description
14892 "Factory_boy is a fixtures replacement based on thoughtbot’s factory_girl.
14893
14894 As a fixtures replacement tool, it aims to replace static, hard to maintain
14895 fixtures with easy-to-use factories for complex object.
14896
14897 Instead of building an exhaustive test setup with every possible combination
14898 of corner cases, factory_boy allows you to use objects customized for the
14899 current test, while only declaring the test-specific fields")
14900 (license license:expat)))
14901
14902 (define-public python2-factory-boy
14903 (package-with-python2 python-factory-boy))
14904
14905 (define-public python-translate-toolkit
14906 (package
14907 (name "python-translate-toolkit")
14908 (version "2.1.0")
14909 (source
14910 (origin
14911 (method url-fetch)
14912 (uri (pypi-uri "translate-toolkit" version ".tar.bz2"))
14913 (sha256
14914 (base32 "1vlkwrg83vb17jc36pmwh2b7jphwf390lz0jw8hakcg16qhwypvq"))))
14915 (build-system python-build-system)
14916 (native-inputs
14917 `(("python-pytest" ,python-pytest)
14918 ("python-sphinx" ,python-sphinx)))
14919 (propagated-inputs
14920 `(("python-babel" ,python-babel)
14921 ("python-beautifulsoup4" ,python-beautifulsoup4)
14922 ("python-chardet" ,python-chardet)
14923 ("python-diff-match-patch" ,python-diff-match-patch)
14924 ("python-levenshtein" ,python-levenshtein)
14925 ("python-lxml" ,python-lxml)
14926 ("python-six" ,python-six)
14927 ("python-vobject" ,python-vobject)
14928 ("python-pyyaml" ,python-pyyaml)))
14929 (arguments
14930 ;; TODO: tests are not run, because they end with
14931 ;; TypeError: parse() missing 2 required positional arguments: 'tree' and
14932 ;; 'parse_funcs'
14933 ;; during test setup.
14934 `(#:tests? #f))
14935 (home-page "http://toolkit.translatehouse.org")
14936 (synopsis "Tools and API for translation and localization engineering")
14937 (description
14938 "Tools and API for translation and localization engineering. It contains
14939 several utilities, as well as an API for building localization tools.")
14940 (license license:gpl2+)))
14941
14942 (define-public python2-translate-toolkit
14943 (package-with-python2 python-translate-toolkit))
14944
14945 (define-public python-mysqlclient
14946 (package
14947 (name "python-mysqlclient")
14948 (version "1.3.10")
14949 (source
14950 (origin
14951 (method url-fetch)
14952 (uri (pypi-uri "mysqlclient" version))
14953 (sha256
14954 (base32
14955 "0qkj570x4rbsblji6frvsvp2v1ap32dqzj1lq62zp9515ffsyaj5"))))
14956 (build-system python-build-system)
14957 (native-inputs
14958 `(("mariadb" ,mariadb)
14959 ("nose" ,python-nose)
14960 ("mock" ,python-mock)
14961 ("py.test" ,python-pytest)))
14962 (inputs
14963 `(("mysql" ,mysql)
14964 ("libz" ,zlib)
14965 ("openssl" ,openssl)))
14966 (home-page "https://github.com/PyMySQL/mysqlclient-python")
14967 (synopsis "MySQLdb is an interface to the popular MySQL database server for Python")
14968 (description "MySQLdb is an interface to the popular MySQL database server
14969 for Python. The design goals are:
14970 @enumerate
14971 @item Compliance with Python database API version 2.0 [PEP-0249],
14972 @item Thread-safety,
14973 @item Thread-friendliness (threads will not block each other).
14974 @end enumerate")
14975 (license license:gpl2)))
14976
14977 (define-public python2-mysqlclient
14978 (package-with-python2 python-mysqlclient))
14979
14980 (define-public python-hiredis
14981 (package
14982 (name "python-hiredis")
14983 (version "0.2.0")
14984 (source
14985 (origin
14986 (method url-fetch)
14987 (uri (pypi-uri "hiredis" version))
14988 (sha256
14989 (base32
14990 "1dfm2k9l9zar9nw9fwmm74zrgraxdxs04vx9li56fjcf289qx5fa"))))
14991 (build-system python-build-system)
14992 (arguments
14993 ;; no tests
14994 `(#:tests? #f))
14995 (home-page "https://github.com/redis/hiredis-py")
14996 (synopsis "Python extension that wraps protocol parsing code in hiredis")
14997 (description "Python-hiredis is a python extension that wraps protocol
14998 parsing code in hiredis. It primarily speeds up parsing of multi bulk replies.")
14999 (license license:bsd-3)))
15000
15001 (define-public python2-hiredis
15002 (package-with-python2 python-hiredis))
15003
15004 (define-public python-fakeredis
15005 (package
15006 (name "python-fakeredis")
15007 (version "0.8.2")
15008 (source
15009 (origin
15010 (method url-fetch)
15011 (uri (pypi-uri "fakeredis" version))
15012 (sha256
15013 (base32
15014 "0zncahj3byyasyfx9i7k991ph0n0lq8v3a21pqri5qxn9564bk9r"))))
15015 (build-system python-build-system)
15016 (arguments
15017 ;; no tests
15018 `(#:tests? #f))
15019 (home-page "https://github.com/jamesls/fakeredis")
15020 (synopsis "Fake implementation of redis API for testing purposes")
15021 (description "Fakeredis is a pure python implementation of the redis-py
15022 python client that simulates talking to a redis server. This was created for a
15023 single purpose: to write unittests. Setting up redis is not hard, but many time
15024 you want to write unittests that do not talk to an external server (such as
15025 redis). This module now allows tests to simply use this module as a reasonable
15026 substitute for redis.")
15027 (license license:bsd-3)))
15028
15029 (define-public python2-fakeredis
15030 (package-with-python2 python-fakeredis))
15031
15032 (define-public python-behave-web-api
15033 (package
15034 (name "python-behave-web-api")
15035 (version "1.0.6")
15036 (source
15037 (origin
15038 (method url-fetch)
15039 (uri (pypi-uri "behave-web-api" version))
15040 (sha256
15041 (base32
15042 "03kpq2xsy1gab3jy0dccbxlsg7vwfy4lagss0qldwmx3xz6b3i19"))))
15043 (build-system python-build-system)
15044 (arguments
15045 `(#:phases
15046 (modify-phases %standard-phases
15047 (add-after 'unpack 'fix-dependencies
15048 (lambda _
15049 (substitute* "setup.py"
15050 (("'wheel'") "") ; We don't use it.
15051 (("'ordereddict==1.1'") ""))))))) ; Python >= 2.7 has it built-in.
15052 (propagated-inputs
15053 `(("behave" ,behave)
15054 ("python-requests" ,python-requests)))
15055 (home-page "https://github.com/jefersondaniel/behave-web-api")
15056 (synopsis "Provides testing for JSON APIs with Behave for Python")
15057 (description "This package provides testing utility modules for testing
15058 JSON APIs with Behave.")
15059 (license license:expat)))
15060
15061 (define-public python2-behave-web-api
15062 (package-with-python2 python-behave-web-api))
15063
15064 (define-public python-flask-script
15065 (package
15066 (name "python-flask-script")
15067 (version "2.0.5")
15068 (source
15069 (origin
15070 (method url-fetch)
15071 (uri (pypi-uri "Flask-Script" version))
15072 (sha256
15073 (base32
15074 "0zqh2yq8zk7m9b4xw1ryqmrljkdigfb3hk5155a3b5hkfnn6xxyf"))))
15075 (build-system python-build-system)
15076 (propagated-inputs
15077 `(("python-flask" ,python-flask)
15078 ("python-argcomplete" ,python-argcomplete)
15079 ("python-werkzeug" ,python-werkzeug)))
15080 (native-inputs
15081 `(("python-pytest" ,python-pytest)))
15082 (home-page
15083 "http://github.com/smurfix/flask-script")
15084 (synopsis "Scripting support for Flask")
15085 (description "The Flask-Script extension provides support for writing
15086 external scripts in Flask. This includes running a development server,
15087 a customised Python shell, scripts to set up your database, cronjobs,
15088 and other command-line tasks that belong outside the web application
15089 itself.")
15090 (license license:bsd-3)))
15091
15092 (define-public python2-flask-script
15093 (package-with-python2 python-flask-script))
15094
15095 (define-public python-flask-migrate
15096 (package
15097 (name "python-flask-migrate")
15098 (version "2.0.3")
15099 (source
15100 (origin
15101 (method url-fetch)
15102 (uri (pypi-uri "Flask-Migrate" version))
15103 (sha256
15104 (base32
15105 "107x78lkqsnbg92dld3dkagg07jvchp3ib3y0sivc4ipz6n1y7rk"))))
15106 (build-system python-build-system)
15107 (propagated-inputs
15108 `(("python-flask" ,python-flask)
15109 ("python-alembic" ,python-alembic)
15110 ("python-sqlalchemy" ,python-sqlalchemy)
15111 ("python-flask-script" ,python-flask-script)
15112 ("python-flask-sqlalchemy" ,python-flask-sqlalchemy)))
15113 (home-page "http://github.com/miguelgrinberg/flask-migrate/")
15114 (synopsis "SQLAlchemy database migrations for Flask programs using
15115 Alembic")
15116 (description "This package contains SQLAlchemy database migration tools
15117 for Flask programs that are using @code{python-alembic}.")
15118 (license license:expat)))
15119
15120 (define-public python2-flask-migrate
15121 (package-with-python2 python-flask-migrate))
15122
15123 (define-public python-packaging
15124 (package
15125 (name "python-packaging")
15126 (version "16.8")
15127 (source
15128 (origin
15129 (method url-fetch)
15130 (uri (pypi-uri "packaging" version))
15131 (sha256
15132 (base32
15133 "17k1xbjshackwvbsnxqixbph8rbqhz4bf4g3al5xyzhavxgq6l2x"))))
15134 (build-system python-build-system)
15135 (native-inputs
15136 `(("python-pretend" ,python-pretend)
15137 ("python-pytest" ,python-pytest)))
15138 (propagated-inputs
15139 `(("python-pyparsing" ,python-pyparsing)
15140 ("python-six" ,python-six)))
15141 (home-page "https://github.com/pypa/packaging")
15142 (synopsis "Core utilities for Python packages")
15143 (description "Packaging is a Python module for dealing with Python packages.
15144 It offers an interface for working with package versions, names, and dependency
15145 information.")
15146 ;; From 'LICENSE': This software is made available under the terms of
15147 ;; *either* of the licenses found in LICENSE.APACHE or LICENSE.BSD.
15148 ;; Contributions to this software is made under the terms of *both* these
15149 ;; licenses.
15150 (license (list license:asl2.0 license:bsd-2))))
15151
15152 (define-public python2-packaging
15153 (package-with-python2 python-packaging))
15154
15155 (define-public python-sql
15156 (package
15157 (name "python-sql")
15158 (version "0.9")
15159 (source
15160 (origin
15161 (method url-fetch)
15162 (uri (pypi-uri "python-sql" version))
15163 (sha256
15164 (base32
15165 "0p6kaqj02vz0habmdx37zjk6hjxdfm8aw737zs059vvpr70ird87"))))
15166 (build-system python-build-system)
15167 (home-page "https://python-sql.tryton.org/")
15168 (synopsis "Library to write SQL queries in a pythonic way")
15169 (description "@code{python-sql} is a library to write SQL queries, that
15170 transforms idiomatic python function calls to well-formed SQL queries.")
15171 (license license:bsd-3)))
15172
15173 (define-public python2-sql
15174 (package-with-python2 python-sql))
15175
15176 (define-public python-genshi
15177 (package
15178 (name "python-genshi")
15179 (version "0.7")
15180 (source
15181 (origin
15182 (method url-fetch)
15183 (uri (string-append
15184 "https://ftp.edgewall.org/pub/genshi/Genshi-"
15185 version ".tar.gz"))
15186 (patches
15187 (search-patches
15188 ;; The first 4 patches are in the master branch upstream.
15189 ;; See this as a reference https://genshi.edgewall.org/ticket/582
15190 ;; The last 2 are NOT in any branch.
15191 ;; They were sent as attachments to a ticket opened at
15192 ;; https://genshi.edgewall.org/ticket/602#no1
15193 "python-genshi-stripping-of-unsafe-script-tags.patch"
15194 "python-genshi-disable-speedups-on-python-3.3.patch"
15195 "python-genshi-isstring-helper.patch"
15196 "python-genshi-add-support-for-python-3.4-AST.patch"
15197 "python-genshi-fix-tests-on-python-3.5.patch"
15198 "python-genshi-buildable-on-python-2.7.patch"))
15199 (sha256
15200 (base32
15201 "0lkkbp6fbwzv0zda5iqc21rr7rdldkwh3hfabfjl9i4bwq14858x"))))
15202 (build-system python-build-system)
15203 (home-page "https://genshi.edgewall.org/")
15204 (synopsis "Toolkit for generation of output for the web")
15205 (description "Genshi is a Python library that provides an integrated set
15206 of components for parsing, generating, and processing HTML, XML or other
15207 textual content for output generation on the web.")
15208 (license license:bsd-3)))
15209
15210 ;; The linter here claims that patch file names should start with the package
15211 ;; name. But, in this case the patches are inherited from python-genshi with
15212 ;; the "python-genshi-" prefix instead of "python2-genshi-".
15213 (define-public python2-genshi
15214 (package-with-python2 python-genshi))
15215
15216 (define-public python-relatorio
15217 (package
15218 (name "python-relatorio")
15219 (version "0.6.4")
15220 (source
15221 (origin
15222 (method url-fetch)
15223 (uri (pypi-uri "relatorio" version))
15224 (sha256
15225 (base32
15226 "0lincq79mzgazwd9gh41dybjh9c3n87r83pl8nk3j79aihyfk84z"))))
15227 (build-system python-build-system)
15228 (propagated-inputs
15229 `(("python-lxml" ,python-lxml)
15230 ("python-genshi" ,python-genshi)))
15231 (home-page "https://relatorio.tryton.org/")
15232 (synopsis "Templating library able to output ODT and PDF files")
15233 (description "Relatorio is a templating library which provides a way to
15234 easily output ODT, ODS, PNG, SVG and several other kinds of files. Support
15235 for more filetypes can be easily added by creating plugins for them.")
15236 (license license:gpl3+)))
15237
15238 (define-public python2-relatorio
15239 (package-with-python2 python-relatorio))
15240
15241 (define-public python-radon
15242 (package
15243 (name "python-radon")
15244 (version "1.5.0")
15245 (source
15246 (origin
15247 (method url-fetch)
15248 (uri (pypi-uri "radon" version))
15249 (sha256
15250 (base32
15251 "1h6jv36am0i827182a04ki6291lyx4kp957xfr5njgprj4nd0qsl"))))
15252 (build-system python-build-system)
15253 (propagated-inputs
15254 `(("python-colorama" ,python-colorama)
15255 ("python-flake8-polyfill" ,python-flake8-polyfill)
15256 ("python-mando" ,python-mando-0.3.1)))
15257 (native-inputs
15258 `(("python-flake8" ,python-flake8)
15259 ("python-tox" ,python-tox)
15260 ("python-pytest" ,python-pytest)
15261 ("python-paramunittest" ,python-paramunittest)))
15262 (home-page "https://radon.readthedocs.org/")
15263 (synopsis "Code Metrics in Python")
15264 (description "Radon is a Python tool which computes various code metrics.
15265 Supported metrics are:
15266 @itemize @bullet
15267 @item raw metrics: SLOC, comment lines, blank lines, &c.
15268 @item Cyclomatic Complexity (i.e. McCabe’s Complexity)
15269 @item Halstead metrics (all of them)
15270 @item the Maintainability Index (a Visual Studio metric)
15271 @end itemize")
15272 (license license:expat)))
15273
15274 (define-public python2-radon
15275 (package-with-python2 python-radon))
15276
15277 (define-public python-sure
15278 (package
15279 (name "python-sure")
15280 (version "1.4.6")
15281 (source
15282 (origin
15283 (method url-fetch)
15284 (uri (pypi-uri "sure" version))
15285 (sha256
15286 (base32
15287 "1iyqsy2d6radi88g1qf0lziy5b39h5cpb3g5jiqyb4xi46ig3x1z"))))
15288 (build-system python-build-system)
15289 (propagated-inputs
15290 `(("python-mock" ,python-mock)
15291 ("python-six" ,python-six)))
15292 (native-inputs
15293 `(("python-nose" ,python-nose)))
15294 (home-page "https://github.com/gabrielfalcao/sure")
15295 (synopsis "Automated testing library in python for python")
15296 (description
15297 "Sure is a python library that leverages a DSL for writing assertions.
15298 Sure is heavily inspired by @code{RSpec Expectations} and @code{should.js}.")
15299 (license license:gpl3+)))
15300
15301 (define-public python2-sure
15302 (package-with-python2 python-sure))
15303
15304 (define-public python2-couleur
15305 ;; This package does not seem to support python3 at all, hence,
15306 ;; only the python2 variant definition is provided.
15307 (package
15308 (name "python2-couleur")
15309 (version "0.6.2")
15310 (source
15311 (origin
15312 (method url-fetch)
15313 (uri (pypi-uri "couleur" version))
15314 (sha256
15315 (base32
15316 "1qqaxyqz74wvid0cr119dhcwz0h0if5b5by44zl49pd5z65v58k1"))))
15317 (build-system python-build-system)
15318 (arguments
15319 `(#:python ,python-2))
15320 (home-page "https://github.com/gabrielfalcao/couleur")
15321 (synopsis
15322 "ANSI terminal tool for python, colored shell and other handy fancy features")
15323 (description
15324 "@code{Couleur} provides python programs a way to use the ANSI features in a unix
15325 terminal such as coloured output in the shell, overwriting output, indentation, etc.")
15326 ;; README.md says ASL2.0, but all source code headers are LGPL3+.
15327 ;; https://github.com/gabrielfalcao/couleur/issues/11
15328 (license license:lgpl3+)))
15329
15330 (define-public python-misaka
15331 (package
15332 (name "python-misaka")
15333 (version "2.1.0")
15334 (source
15335 (origin
15336 (method url-fetch)
15337 (uri (pypi-uri "misaka" version))
15338 (sha256
15339 (base32
15340 "1yqrq3a5rracirmvk52n28nn6ckdaz897gnigv89a9gmyn87sqw7"))))
15341 (build-system python-build-system)
15342 (arguments
15343 `(;; Line 37 of setup.py calls self.run_command('develop')
15344 ;; in the 'check' phase. This command seems to be trying
15345 ;; to write to
15346 ;; /gnu/store/...-python-<version>/lib/python<version>/site-packages/
15347 ;; for which it does not have the permission to write.
15348 #:tests? #f))
15349 (propagated-inputs
15350 `(("python-cffi" ,python-cffi)))
15351 (home-page "https://github.com/FSX/misaka")
15352 (synopsis "Python binding for Hoedown")
15353 (description
15354 "@code{Misaka} is a CFFI-based binding for @code{Hoedown}, a fast markdown processing
15355 library written in C. It features a fast HTML renderer and functionality to make custom
15356 renderers (e.g. man pages or LaTeX).")
15357 (license license:expat)))
15358
15359 (define-public python2-misaka
15360 (package-with-python2 python-misaka))
15361
15362 (define-public python2-steadymark
15363 ;; This is forced into being a python2 only variant
15364 ;; due to its dependence on couleur that has no support
15365 ;; for python3
15366 (package
15367 (name "python2-steadymark")
15368 (version "0.7.3")
15369 (source
15370 (origin
15371 (method url-fetch)
15372 (uri (pypi-uri "steadymark" version))
15373 (sha256
15374 (base32
15375 "1640i9g8dycql3cc8j0bky0jkzj0q39blfbp4lsgpkprkfgcdk8v"))))
15376 (build-system python-build-system)
15377 (native-inputs
15378 `(("python-couleur" ,python2-couleur)
15379 ("python-sure" ,python2-sure)
15380 ("python-misaka" ,python2-misaka)))
15381 (arguments
15382 `(#:python ,python-2
15383 #:phases
15384 (modify-phases %standard-phases
15385 (add-before 'build 'patch-setup-py
15386 (lambda _
15387 ;; Update requirements from dependency==version
15388 ;; to dependency>=version
15389 (substitute* "setup.py"
15390 (("==") ">="))
15391 #t)))))
15392 (home-page "https://github.com/gabrielfalcao/steadymark")
15393 (synopsis "Markdown-based test runner for python")
15394 (description
15395 "@code{Steadymark} allows documentation to be written in github-flavoured
15396 markdown. The documentation may contain snippets of code surrounded by python
15397 code blocks and @code{Steadymark} will find these snippets and run them, making
15398 sure that there are no old malfunctional examples in the documentation examples.")
15399 (license license:expat)))
15400
15401 (define-public python-nose-randomly
15402 (package
15403 (name "python-nose-randomly")
15404 (version "1.2.5")
15405 (source
15406 (origin
15407 (method url-fetch)
15408 (uri (pypi-uri "nose-randomly" version))
15409 (sha256
15410 (base32
15411 "1cw9dlr1zh3w4i438kin7z0rm8092ki52hayisyc43h9pcplq7rn"))))
15412 (build-system python-build-system)
15413 (native-inputs
15414 `(("python-nose" ,python-nose)
15415 ("python-numpy" ,python-numpy)))
15416 (home-page "https://github.com/adamchainz/nose-randomly")
15417 (synopsis
15418 "Nose plugin to randomly order tests and control random.seed")
15419 (description
15420 "This is a @code{Nose} plugin to randomly order tests which can be quite
15421 powerful in discovering hidden flaws in the tests themselves, while helping to
15422 reduce inter-test dependencies. It also helps in controlling @code{random.seed},
15423 by resetting it to a repeatable number for each test, enabling the tests to
15424 create data based on random numbers and yet remain repeatable.")
15425 (license license:bsd-3)))
15426
15427 (define-public python2-nose-randomly
15428 (package-with-python2 python-nose-randomly))
15429
15430 (define-public python-jsonpointer
15431 (package
15432 (name "python-jsonpointer")
15433 (version "1.10")
15434 (source
15435 (origin
15436 (method url-fetch)
15437 (uri (pypi-uri "jsonpointer" version))
15438 (sha256
15439 (base32
15440 "1cg0gvgqjysydv6p45v4jywg1jb3v48c7m3cbpi57zgf6nndr9cz"))))
15441 (build-system python-build-system)
15442 (home-page "https://github.com/stefankoegl/python-json-pointer")
15443 (synopsis "Identify specific nodes in a JSON document")
15444 (description "@code{jsonpointer} allows you to access specific nodes
15445 by path in a JSON document (see RFC 6901).")
15446 (license license:bsd-3)))
15447
15448 (define-public python2-jsonpointer
15449 (package-with-python2 python-jsonpointer))
15450
15451 (define-public python-jsonpatch
15452 (package
15453 (name "python-jsonpatch")
15454 (version "1.16")
15455 (source
15456 (origin
15457 (method url-fetch)
15458 ;; pypi version lacks tests.js
15459 (uri (string-append "https://github.com/stefankoegl/python-json-patch/"
15460 "archive/v" version ".tar.gz"))
15461 (file-name (string-append name "-" version ".tar.gz"))
15462 (sha256
15463 (base32
15464 "085ykisl8v7mv9h7hvhdy3l2fjzs4214gx32r5k6nx4f76hbv6y5"))))
15465 (build-system python-build-system)
15466 (native-inputs
15467 `(("python-jsonpointer" ,python-jsonpointer)))
15468 (home-page "https://github.com/stefankoegl/python-json-patch")
15469 (synopsis "Applying JSON Patches in Python 2.6+ and 3.x")
15470 (description "@code{jsonpatch} is a library and program that allows
15471 applying JSON Patches according to RFC 6902.")
15472 (license license:bsd-3)))
15473
15474 (define-public python2-jsonpatch
15475 (package-with-python2 python-jsonpatch))
15476
15477 (define-public python-jsonpatch-0.4
15478 (package (inherit python-jsonpatch)
15479 (name "python-jsonpatch")
15480 (version "0.4")
15481 (source
15482 (origin
15483 (method url-fetch)
15484 (uri (string-append "https://github.com/stefankoegl/python-json-patch/"
15485 "archive/v" version ".tar.gz"))
15486 (file-name (string-append name "-" version ".tar.gz"))
15487 (sha256
15488 (base32
15489 "0j0cd9z9zyp8kppp464jxrfgrnbgkzl1yi10i5gsv8yz6d95929d"))))))
15490
15491 (define-public python2-jsonpatch-0.4
15492 (package-with-python2 python-jsonpatch-0.4))
15493
15494 (define-public python-rfc3987
15495 (package
15496 (name "python-rfc3987")
15497 (version "1.3.7")
15498 (source
15499 (origin
15500 (method url-fetch)
15501 (uri (pypi-uri "rfc3987" version))
15502 (sha256
15503 (base32
15504 "192pclzs2y0yaywqkrlvd0x73740q310kvqvm6jldhi619mq59wi"))))
15505 (build-system python-build-system)
15506 (home-page "http://pypi.python.org/pypi/rfc3987")
15507 (synopsis "Parsing and validation of URIs (RFC 3986) and IRIs (RFC 3987)")
15508 (description "@code{rfc3987} provides routines for parsing and
15509 validation of URIs (see RFC 3986) and IRIs (see RFC 3987).")
15510 (license license:gpl3+)))
15511
15512 (define-public python2-rfc3987
15513 (package-with-python2 python-rfc3987))
15514
15515 (define-public python-validate-email
15516 (package
15517 (name "python-validate-email")
15518 (version "1.3")
15519 (source
15520 (origin
15521 (method url-fetch)
15522 (uri (pypi-uri "validate_email" version))
15523 (sha256
15524 (base32
15525 "1bxffaf5yz2cph8ki55vdvdypbwkvn2xr1firlcy62vqbzf1jivq"))))
15526 (build-system python-build-system)
15527 (home-page "http://github.com/syrusakbary/validate_email")
15528 (synopsis "Verifies if an email address is valid and really exists")
15529 (description "@code{validate_email} can be used to verify if an email
15530 address is valid and really exists.")
15531 (license license:lgpl3+)))
15532
15533 (define-public python2-validate-email
15534 (package-with-python2 python-validate-email))
15535
15536 (define-public python-flex
15537 (package
15538 (name "python-flex")
15539 (version "6.10.0")
15540 (source
15541 (origin
15542 (method url-fetch)
15543 (uri (pypi-uri "flex" version))
15544 (sha256
15545 (base32
15546 "00pamnwla3khk8nyla7y28dq9jnh69swd7f4jfsl7sn1izs8n8zk"))))
15547 (build-system python-build-system)
15548 (propagated-inputs
15549 `(("python-click" ,python-click)
15550 ("python-iso8601" ,python-iso8601)
15551 ("python-jsonpointer" ,python-jsonpointer)
15552 ("python-pyyaml" ,python-pyyaml)
15553 ("python-requests" ,python-requests)
15554 ("python-rfc3987" ,python-rfc3987)
15555 ("python-six" ,python-six)
15556 ("python-validate-email" ,python-validate-email)))
15557 (home-page "https://github.com/pipermerriam/flex")
15558 (synopsis "Validates Swagger schemata")
15559 (description "@code{flex} can be used to validate Swagger schemata.")
15560 (license license:bsd-3)))
15561
15562 (define-public python2-flex
15563 (package-with-python2 python-flex))
15564
15565 (define-public python-marshmallow
15566 (package
15567 (name "python-marshmallow")
15568 (version "3.0.0b2")
15569 (source
15570 (origin
15571 (method url-fetch)
15572 (uri (pypi-uri "marshmallow" version))
15573 (sha256
15574 (base32
15575 "11bnpvfdbczr74177p295zbkdrax2cahvbj5bqhhlprgz2xxi5d9"))))
15576 (build-system python-build-system)
15577 (propagated-inputs
15578 `(("python-dateutil" ,python-dateutil)
15579 ("python-simplejson" ,python-simplejson)))
15580 (native-inputs
15581 `(("python-pytest-3.0" ,python-pytest-3.0)
15582 ("python-pytz" ,python-pytz)))
15583 (home-page "https://github.com/marshmallow-code/marshmallow")
15584 (synopsis "Convert complex datatypes to and from native
15585 Python datatypes.")
15586 (description "@code{marshmallow} provides a library for converting
15587 complex datatypes to and from native Python datatypes.")
15588 (license license:expat)))
15589
15590 (define-public python2-marshmallow
15591 (package-with-python2 python-marshmallow))
15592
15593 (define-public python-bottle
15594 (package
15595 (name "python-bottle")
15596 (version "0.12.13")
15597 (source
15598 (origin
15599 (method url-fetch)
15600 (uri (pypi-uri "bottle" version))
15601 (sha256
15602 (base32
15603 "0m9k2a7yxvggc4kw8fsvj381vgsvfcdshg5nzy6vwrxiw2p53drr"))))
15604 (build-system python-build-system)
15605 (home-page "http://bottlepy.org/")
15606 (synopsis "WSGI framework for small web-applications.")
15607 (description "@code{python-bottle} is a WSGI framework for small web-applications.")
15608 (license license:expat)))
15609
15610 (define-public python2-bottle
15611 (package-with-python2 python-bottle))
15612
15613 (define-public python-apispec
15614 (package
15615 (name "python-apispec")
15616 (version "0.22.0")
15617 (source
15618 (origin
15619 (method url-fetch)
15620 (uri (pypi-uri "apispec" version))
15621 (sha256
15622 (base32
15623 "0y3jxmgp2d24am3hxl40f5rw9abb0r8037sagax3dv64h4n1azwq"))))
15624 (build-system python-build-system)
15625 (propagated-inputs
15626 `(("python-pyyaml" ,python-pyyaml)))
15627 (native-inputs
15628 `(("python-pytest-3.0" ,python-pytest-3.0)
15629 ("python-flask" ,python-flask)
15630 ("python-marshmallow" ,python-marshmallow)
15631 ("python-tornado" ,python-tornado)
15632 ("python-bottle" ,python-bottle)
15633 ("python-mock" ,python-mock)))
15634 (home-page "https://github.com/marshmallow-code/apispec")
15635 (synopsis "Swagger 2.0 API specification generator")
15636 (description "@code{python-apispec} is a pluggable API specification
15637 generator. Currently supports the OpenAPI specification (f.k.a.
15638 Swagger 2.0).")
15639 (license license:expat)))
15640
15641 (define-public python2-apispec
15642 (package-with-python2 python-apispec))
15643
15644 (define-public python-flasgger
15645 (package
15646 (name "python-flasgger")
15647 (version "0.6.3")
15648 (source
15649 (origin
15650 (method url-fetch)
15651 (uri (string-append "https://github.com/rochacbruno/flasgger/archive/"
15652 version ".tar.gz"))
15653 (file-name (string-append name "-" version ".tar.gz"))
15654 (sha256
15655 (base32
15656 "1gqzlm0rb55fdpsy5ipkganlx9cnpi454fqyycr03jm22zql14ay"))))
15657 (build-system python-build-system)
15658 (arguments
15659 `(#:phases
15660 (modify-phases %standard-phases
15661 (replace 'check
15662 (lambda* (#:key inputs outputs #:allow-other-keys)
15663 (substitute* "Makefile"
15664 (("flake8 flasgger --ignore=F403")
15665 "flake8 flasgger --ignore=E731,F403"))
15666 (setenv "PYTHONPATH" (string-append (getcwd)
15667 ":"
15668 (getenv "PYTHONPATH")))
15669 (zero? (system* "py.test")))))))
15670 (propagated-inputs
15671 `(("python-flask" ,python-flask)
15672 ("python-pyyaml" ,python-pyyaml)
15673 ("python-jsonschema" ,python-jsonschema)
15674 ("python-mistune" ,python-mistune)
15675 ("python-six" ,python-six)))
15676 (native-inputs
15677 `(("python-decorator" ,python-decorator)
15678 ("python-flake8" ,python-flake8)
15679 ("python-flask-restful" ,python-flask-restful)
15680 ("python-flex" ,python-flex)
15681 ("python-pytest-3.0" ,python-pytest-3.0)
15682 ("python-pytest-cov" ,python-pytest-cov)
15683 ("python-marshmallow" ,python-marshmallow)
15684 ("python-apispec" ,python-apispec)))
15685 (home-page "https://github.com/rochacbruno/flasgger/")
15686 (synopsis "Extract Swagger specs from your Flask project")
15687 (description "@code{python-flasgger} allows extracting Swagger specs
15688 from your Flask project. It is a fork of Flask-Swagger.")
15689 (license license:expat)))
15690
15691 (define-public python2-flasgger
15692 (package-with-python2 python-flasgger))
15693
15694 (define-public python-swagger-spec-validator
15695 (package
15696 (name "python-swagger-spec-validator")
15697 (version "2.1.0")
15698 (source
15699 (origin
15700 (method url-fetch)
15701 (uri (pypi-uri "swagger-spec-validator" version))
15702 (sha256
15703 (base32
15704 "13hkpn2lycwr0468yqhjb3kwszqf7hjwlq61w7vdxq1caz31k4nw"))))
15705 (build-system python-build-system)
15706 (propagated-inputs
15707 `(("python-jsonschema" ,python-jsonschema)
15708 ("python-six" ,python-six)))
15709 (home-page
15710 "http://github.com/Yelp/swagger_spec_validator")
15711 (synopsis "Validation of Swagger specifications")
15712 (description "@code{swagger_spec_validator} provides a library for
15713 validating Swagger API specifications.")
15714 (license license:asl2.0)))
15715
15716 (define-public python2-swagger-spec-validator
15717 (package-with-python2 python-swagger-spec-validator))
15718
15719 (define-public python-apache-libcloud
15720 (package
15721 (name "python-apache-libcloud")
15722 (version "2.0.0")
15723 (source
15724 (origin
15725 (method url-fetch)
15726 (uri (pypi-uri "apache-libcloud" version))
15727 (sha256
15728 (base32
15729 "1a71z02ckcxld72k4qgmdnkjan52c4wczncs3p2mp5yafh7dsan7"))))
15730 (build-system python-build-system)
15731 (arguments
15732 `(#:phases
15733 (modify-phases %standard-phases
15734 (add-after 'unpack 'patch-ssh
15735 (lambda* (#:key inputs #:allow-other-keys)
15736 (substitute* "libcloud/compute/ssh.py"
15737 (("'ssh'") (string-append "'" (assoc-ref inputs "openssh")
15738 "/bin/ssh" "'")))
15739 #t))
15740 (add-after 'unpack 'patch-tests
15741 (lambda _
15742 (substitute* "./libcloud/test/test_file_fixtures.py"
15743 ;; See <https://issues.apache.org/jira/browse/LIBCLOUD-923>.
15744 (("def _ascii") "def _raw_data(self, method, url, body, headers):
15745 return (httplib.OK,
15746 \"1234abcd\",
15747 {\"test\": \"value\"},
15748 httplib.responses[httplib.OK])
15749 def _ascii"))
15750 (substitute* "libcloud/test/compute/test_ssh_client.py"
15751 (("class ShellOutSSHClientTests")
15752 "@unittest.skip(\"Guix container doesn't have ssh service\")
15753 class ShellOutSSHClientTests")
15754 ;; See <https://issues.apache.org/jira/browse/LIBCLOUD-924>.
15755 (("'.xf0.x90.x8d.x88'") "b'\\xF0\\x90\\x8D\\x88'")
15756 (("'.xF0', '.x90', '.x8D', '.x88'")
15757 "b'\\xF0', b'\\x90', b'\\x8D', b'\\x88'"))
15758 #t)))))
15759 (inputs
15760 `(("openssh" ,openssh)))
15761 (propagated-inputs
15762 `(("python-paramiko" ,python-paramiko)
15763 ("python-requests" ,python-requests)))
15764 (native-inputs
15765 `(("python-lockfile" ,python-lockfile)
15766 ("python-mock" ,python-mock)
15767 ("python-requests-mock" ,python-requests-mock)))
15768 (home-page "https://libcloud.apache.org/")
15769 (synopsis "Unified Cloud API")
15770 (description "@code{libcloud} is a Python library for interacting with
15771 many of the popular cloud service providers using a unified API.")
15772 (license license:asl2.0)))
15773
15774 (define-public python2-apache-libcloud
15775 (package-with-python2 python-apache-libcloud))
15776
15777 (define-public python-smmap2
15778 (package
15779 (name "python-smmap2")
15780 (version "2.0.3")
15781 (source
15782 (origin
15783 (method url-fetch)
15784 (uri (pypi-uri "smmap2" version))
15785 (sha256
15786 (base32
15787 "1hvn28p3zvxa98sbi9lrqvv2ps4q284j4jq9a619zw0m7yv0sly7"))))
15788 (build-system python-build-system)
15789 (native-inputs
15790 `(("python-nosexcover" ,python-nosexcover)))
15791 (home-page "https://github.com/Byron/smmap")
15792 (synopsis "Python sliding window memory map manager")
15793 (description "@code{smmap2} is a pure Python implementation of a sliding
15794 window memory map manager.")
15795 (license license:bsd-3)))
15796
15797 (define-public python2-smmap2
15798 (package-with-python2 python-smmap2))
15799
15800 (define-public python-regex
15801 (package
15802 (name "python-regex")
15803 (version "2017.06.07")
15804 (source (origin
15805 (method url-fetch)
15806 (uri (pypi-uri "regex" version))
15807 (sha256
15808 (base32
15809 "06r6b7yigikbj3a72whl85r2b64pj1r0ypmw9yalmkm0wnxq8mz4"))))
15810 (build-system python-build-system)
15811 (home-page "https://bitbucket.org/mrabarnett/mrab-regex")
15812 (synopsis "Alternative regular expression module")
15813 (description "This regular expression implementation is backwards-
15814 compatible with the standard @code{re} module, but offers additional
15815 functionality like full case-folding for case-insensitive matches in Unicode.")
15816 (license license:psfl)))
15817
15818 (define-public python2-regex
15819 (package-with-python2 python-regex))
15820
15821 (define-public python2-pyopengl
15822 (package
15823 (name "python2-pyopengl")
15824 (version "3.1.0")
15825 (source
15826 (origin
15827 (method url-fetch)
15828 (uri (pypi-uri "PyOpenGL" version))
15829 (sha256
15830 (base32
15831 "1byxjj6a8rwzhxhjqlc588zdad2qwxdd7vlam2653ylll31waiwv"))))
15832 (arguments
15833 `(#:python ,python-2))
15834 (build-system python-build-system)
15835 (home-page "http://pyopengl.sourceforge.net")
15836 (synopsis "Standard OpenGL bindings for Python")
15837 (description
15838 "PyOpenGL is the most common cross platform Python binding to OpenGL and
15839 related APIs. The binding is created using the standard @code{ctypes}
15840 library.")
15841 (license license:bsd-3)))
15842
15843 (define-public python-rencode
15844 (package
15845 (name "python-rencode")
15846 (version "1.0.3")
15847 (source
15848 (origin
15849 (method url-fetch)
15850 (uri (pypi-uri "rencode" version))
15851 (sha256
15852 (base32
15853 "08if5yax1xn5yfp8p3765ccjmfcv9di7i4m5jckgnwvdsgznwkbj"))))
15854 (build-system python-build-system)
15855 (native-inputs `(("pkg-config" ,pkg-config)
15856 ("python-cython", python-cython)))
15857 (home-page "https://github.com/aresch/rencode")
15858 (synopsis "Serialization of heterogeneous data structures")
15859 (description
15860 "The @code{rencode} module is a data structure serialization library,
15861 similar to @code{bencode} from the BitTorrent project. For complex,
15862 heterogeneous data structures with many small elements, r-encoding stake up
15863 significantly less space than b-encodings. This version of rencode is a
15864 complete rewrite in Cython to attempt to increase the performance over the
15865 pure Python module.")
15866 (license license:bsd-3)))
15867
15868 (define-public python2-rencode
15869 (package-with-python2 python-rencode))
15870
15871 (define-public python-flask-principal
15872 (package
15873 (name "python-flask-principal")
15874 (version "0.4.0")
15875 (source
15876 (origin
15877 (method url-fetch)
15878 (uri (pypi-uri "Flask-Principal" version))
15879 (sha256
15880 (base32
15881 "0lwlr5smz8vfm5h9a9i7da3q1c24xqc6vm9jdywdpgxfbi5i7mpm"))))
15882 (build-system python-build-system)
15883 (propagated-inputs
15884 `(("python-blinker" ,python-blinker)))
15885 (native-inputs
15886 `(("python-flask" ,python-flask)
15887 ("python-nose" ,python-nose)))
15888 (home-page "http://packages.python.org/Flask-Principal/")
15889 (synopsis "Identity management for Flask")
15890 (description "@code{flask_principal} is a identity management library for
15891 Flask. It supports managing both authentication and authorization data in a
15892 thread-local variable.")
15893 (license license:expat)))
15894
15895 (define-public python2-flask-principal
15896 (package-with-python2 python-flask-principal))
15897
15898 (define-public python-flask-httpauth
15899 (package
15900 (name "python-flask-httpauth")
15901 (version "3.2.3")
15902 (source
15903 (origin
15904 (method url-fetch)
15905 (uri (pypi-uri "Flask-HTTPAuth" version))
15906 (sha256
15907 (base32
15908 "13gff5w1mqpzm5nccyg02v3ifb9ifqh5k866cssjhghhg6msfjsz"))))
15909 (build-system python-build-system)
15910 (native-inputs
15911 `(("python-flask" ,python-flask)))
15912 (home-page "http://github.com/miguelgrinberg/flask-httpauth/")
15913 (synopsis "Basic and Digest HTTP authentication for Flask routes")
15914 (description "@code{flask_httpauth} provides Basic and Digest HTTP
15915 authentication for Flask routes.")
15916 (license license:expat)))
15917
15918 (define-public python2-flask-httpauth
15919 (package-with-python2 python-flask-httpauth))