gnu: python-cryptograpy: Update to 2.0.
[jackhill/guix/guix.git] / gnu / packages / python.scm
1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2013 Nikita Karetnikov <nikita@karetnikov.org>
3 ;;; Copyright © 2013, 2014, 2015, 2016, 2017 Ludovic Courtès <ludo@gnu.org>
4 ;;; Copyright © 2013, 2014, 2015, 2016 Andreas Enge <andreas@enge.fr>
5 ;;; Copyright © 2014, 2015 Mark H Weaver <mhw@netris.org>
6 ;;; Copyright © 2014, 2017 Eric Bavier <bavier@member.fsf.org>
7 ;;; Copyright © 2014, 2015 Federico Beffa <beffa@fbengineering.ch>
8 ;;; Copyright © 2015 Omar Radwan <toxemicsquire4@gmail.com>
9 ;;; Copyright © 2015 Pierre-Antoine Rault <par@rigelk.eu>
10 ;;; Copyright © 2015, 2016, 2017 Ricardo Wurmus <rekado@elephly.net>
11 ;;; Copyright © 2015, 2016 Christopher Allan Webber <cwebber@dustycloud.org>
12 ;;; Copyright © 2015 Eric Dvorsak <eric@dvorsak.fr>
13 ;;; Copyright © 2015, 2016 David Thompson <davet@gnu.org>
14 ;;; Copyright © 2015, 2016, 2017 Leo Famulari <leo@famulari.name>
15 ;;; Copyright © 2015 Ben Woodcroft <donttrustben@gmail.com>
16 ;;; Copyright © 2015, 2016 Erik Edrosa <erik.edrosa@gmail.com>
17 ;;; Copyright © 2015, 2016, 2017 Efraim Flashner <efraim@flashner.co.il>
18 ;;; Copyright © 2015 Kyle Meyer <kyle@kyleam.com>
19 ;;; Copyright © 2015, 2016 Chris Marusich <cmmarusich@gmail.com>
20 ;;; Copyright © 2016 Danny Milosavljevic <dannym+a@scratchpost.org>
21 ;;; Copyright © 2016 Lukas Gradl <lgradl@openmailbox.org>
22 ;;; Copyright © 2016 Hartmut Goebel <h.goebel@crazy-compilers.com>
23 ;;; Copyright © 2016 Daniel Pimentel <d4n1@d4n1.org>
24 ;;; Copyright © 2016 Sou Bunnbu <iyzsong@gmail.com>
25 ;;; Copyright © 2016 Troy Sankey <sankeytms@gmail.com>
26 ;;; Copyright © 2016, 2017 ng0 <contact.ng0@cryptolab.net>
27 ;;; Copyright © 2016 Dylan Jeffers <sapientech@sapientech@openmailbox.org>
28 ;;; Copyright © 2016 David Craven <david@craven.ch>
29 ;;; Copyright © 2016, 2017 Marius Bakke <mbakke@fastmail.com>
30 ;;; Copyright © 2016, 2017 Stefan Reichör <stefan@xsteve.at>
31 ;;; Copyright © 2016 Dylan Jeffers <sapientech@sapientech@openmailbox.org>
32 ;;; Copyright © 2016 Alex Vong <alexvong1995@gmail.com>
33 ;;; Copyright © 2016, 2017 Arun Isaac <arunisaac@systemreboot.net>
34 ;;; Copyright © 2016, 2017 Julien Lepiller <julien@lepiller.eu>
35 ;;; Copyright © 2016, 2017 Tobias Geerinckx-Rice <me@tobias.gr>
36 ;;; Copyright © 2016, 2017 Thomas Danckaert <post@thomasdanckaert.be>
37 ;;; Copyright © 2017 Carlo Zancanaro <carlo@zancanaro.id.au>
38 ;;; Copyright © 2017 Frederick M. Muriithi <fredmanglis@gmail.com>
39 ;;; Copyright © 2017 Adriano Peluso <catonano@gmail.com>
40 ;;; Copyright © 2017 Ben Sturmfels <ben@sturm.com.au>
41 ;;; Copyright © 2017 Mathieu Othacehe <m.othacehe@gmail.com>
42 ;;; Copyright © 2017 José Miguel Sánchez García <jmi2k@openmailbox.org>
43 ;;; Copyright © 2017 Roel Janssen <roel@gnu.org>
44 ;;; Copyright © 2017 Kei Kebreau <kei@openmailbox.org>
45 ;;; Copyright © 2017 Rutger Helling <rhelling@mykolab.com>
46 ;;;
47 ;;; This file is part of GNU Guix.
48 ;;;
49 ;;; GNU Guix is free software; you can redistribute it and/or modify it
50 ;;; under the terms of the GNU General Public License as published by
51 ;;; the Free Software Foundation; either version 3 of the License, or (at
52 ;;; your option) any later version.
53 ;;;
54 ;;; GNU Guix is distributed in the hope that it will be useful, but
55 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
56 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
57 ;;; GNU General Public License for more details.
58 ;;;
59 ;;; You should have received a copy of the GNU General Public License
60 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
61
62 (define-module (gnu packages python)
63 #:use-module ((guix licenses) #:prefix license:)
64 #:use-module (gnu packages)
65 #:use-module (gnu packages algebra)
66 #:use-module (gnu packages adns)
67 #:use-module (gnu packages attr)
68 #:use-module (gnu packages backup)
69 #:use-module (gnu packages bash)
70 #:use-module (gnu packages compression)
71 #:use-module (gnu packages crypto)
72 #:use-module (gnu packages databases)
73 #:use-module (gnu packages django)
74 #:use-module (gnu packages file)
75 #:use-module (gnu packages fontutils)
76 #:use-module (gnu packages gcc)
77 #:use-module (gnu packages ghostscript)
78 #:use-module (gnu packages gl)
79 #:use-module (gnu packages glib)
80 #:use-module (gnu packages graphviz)
81 #:use-module (gnu packages gstreamer)
82 #:use-module (gnu packages gtk)
83 #:use-module (gnu packages icu4c)
84 #:use-module (gnu packages image)
85 #:use-module (gnu packages imagemagick)
86 #:use-module (gnu packages libevent)
87 #:use-module (gnu packages libffi)
88 #:use-module (gnu packages linux)
89 #:use-module (gnu packages man)
90 #:use-module (gnu packages maths)
91 #:use-module (gnu packages multiprecision)
92 #:use-module (gnu packages networking)
93 #:use-module (gnu packages ncurses)
94 #:use-module (gnu packages openstack)
95 #:use-module (gnu packages password-utils)
96 #:use-module (gnu packages pcre)
97 #:use-module (gnu packages perl)
98 #:use-module (gnu packages pkg-config)
99 #:use-module (gnu packages protobuf)
100 #:use-module (gnu packages qt)
101 #:use-module (gnu packages readline)
102 #:use-module (gnu packages sdl)
103 #:use-module (gnu packages shells)
104 #:use-module (gnu packages ssh)
105 #:use-module (gnu packages statistics)
106 #:use-module (gnu packages tex)
107 #:use-module (gnu packages texinfo)
108 #:use-module (gnu packages tls)
109 #:use-module (gnu packages version-control)
110 #:use-module (gnu packages video)
111 #:use-module (gnu packages web)
112 #:use-module (gnu packages base)
113 #:use-module (gnu packages xml)
114 #:use-module (gnu packages xorg)
115 #:use-module (gnu packages xdisorg)
116 #:use-module (gnu packages tcl)
117 #:use-module (gnu packages bdw-gc)
118 #:use-module (guix packages)
119 #:use-module (guix download)
120 #:use-module (guix git-download)
121 #:use-module (guix utils)
122 #:use-module (guix build-system gnu)
123 #:use-module (guix build-system cmake)
124 #:use-module (guix build-system python)
125 #:use-module (guix build-system trivial)
126 #:use-module (srfi srfi-1))
127
128 (define-public python-2.7
129 (package
130 (name "python")
131 (version "2.7.13")
132 (source
133 (origin
134 (method url-fetch)
135 (uri (string-append "https://www.python.org/ftp/python/"
136 version "/Python-" version ".tar.xz"))
137 (sha256
138 (base32
139 "0cgpk3zk0fgpji59pb4zy9nzljr70qzgv1vpz5hq5xw2d2c47m9m"))
140 (patches (search-patches "python-2.7-search-paths.patch"
141 "python-2-deterministic-build-info.patch"
142 "python-2.7-site-prefixes.patch"
143 "python-2.7-source-date-epoch.patch"
144 "python-2.7-getentropy-on-old-kernels.patch"))
145 (modules '((guix build utils)))
146 ;; suboptimal to delete failing tests here, but if we delete them in the
147 ;; arguments then we need to make sure to strip out that phase when it
148 ;; gets inherited by python and python-minimal.
149 (snippet
150 '(begin
151 (for-each delete-file
152 '("Lib/test/test_compileall.py"
153 "Lib/test/test_ctypes.py" ; fails on mips64el
154 "Lib/test/test_distutils.py"
155 "Lib/test/test_import.py"
156 "Lib/test/test_shutil.py"
157 "Lib/test/test_socket.py"
158 "Lib/test/test_subprocess.py"))
159 #t))))
160 (outputs '("out"
161 "tk")) ;tkinter; adds 50 MiB to the closure
162 (build-system gnu-build-system)
163 (arguments
164 `(;; 356 tests OK.
165 ;; 6 tests failed:
166 ;; test_compileall test_distutils test_import test_shutil test_socket
167 ;; test_subprocess
168 ;; 39 tests skipped:
169 ;; test_aepack test_al test_applesingle test_bsddb test_bsddb185
170 ;; test_bsddb3 test_cd test_cl test_codecmaps_cn test_codecmaps_hk
171 ;; test_codecmaps_jp test_codecmaps_kr test_codecmaps_tw test_curses
172 ;; test_dl test_gdb test_gl test_imageop test_imgfile test_ioctl
173 ;; test_kqueue test_linuxaudiodev test_macos test_macostools
174 ;; test_msilib test_ossaudiodev test_scriptpackages test_smtpnet
175 ;; test_socketserver test_startfile test_sunaudiodev test_timeout
176 ;; test_tk test_ttk_guionly test_urllib2net test_urllibnet
177 ;; test_winreg test_winsound test_zipfile64
178 ;; 4 skips unexpected on linux2:
179 ;; test_bsddb test_bsddb3 test_gdb test_ioctl
180 #:test-target "test"
181 #:configure-flags
182 (list "--enable-shared" ;allow embedding
183 "--with-system-ffi" ;build ctypes
184 "--with-ensurepip=install" ;install pip and setuptools
185 "--enable-unicode=ucs4"
186 (string-append "LDFLAGS=-Wl,-rpath="
187 (assoc-ref %outputs "out") "/lib"))
188
189 #:modules ((ice-9 ftw) (ice-9 match)
190 (guix build utils) (guix build gnu-build-system))
191 #:phases
192 (modify-phases %standard-phases
193 (add-before
194 'configure 'patch-lib-shells
195 (lambda _
196 ;; Filter for existing files, since some may not exist in all
197 ;; versions of python that are built with this recipe.
198 (substitute* (filter file-exists?
199 '("Lib/subprocess.py"
200 "Lib/popen2.py"
201 "Lib/distutils/tests/test_spawn.py"
202 "Lib/test/test_subprocess.py"))
203 (("/bin/sh") (which "sh")))
204
205 ;; Use zero as the timestamp in .pyc files so that builds are
206 ;; deterministic. TODO: Remove it when this variable is set in
207 ;; gnu-build-system.scm.
208 (setenv "SOURCE_DATE_EPOCH" "1")
209 #t))
210 (add-before 'configure 'do-not-record-configure-flags
211 (lambda* (#:key configure-flags #:allow-other-keys)
212 ;; Remove configure flags from the installed '_sysconfigdata.py'
213 ;; and 'Makefile' so we don't end up keeping references to the
214 ;; build tools.
215 ;;
216 ;; Preserve at least '--with-system-ffi' since otherwise the
217 ;; thing tries to build libffi, fails, and we end up with a
218 ;; Python that lacks ctypes.
219 (substitute* "configure"
220 (("^CONFIG_ARGS=.*$")
221 (format #f "CONFIG_ARGS='~a'\n"
222 (if (member "--with-system-ffi" configure-flags)
223 "--with-system-ffi"
224 ""))))
225 #t))
226 (add-before
227 'check 'pre-check
228 (lambda _
229 ;; 'Lib/test/test_site.py' needs a valid $HOME
230 (setenv "HOME" (getcwd))
231 #t))
232 (add-after
233 'unpack 'set-source-file-times-to-1980
234 ;; XXX One of the tests uses a ZIP library to pack up some of the
235 ;; source tree, and fails with "ZIP does not support timestamps
236 ;; before 1980". Work around this by setting the file times in the
237 ;; source tree to sometime in early 1980.
238 (lambda _
239 (let ((circa-1980 (* 10 366 24 60 60)))
240 (ftw "." (lambda (file stat flag)
241 (utime file circa-1980 circa-1980)
242 #t))
243 #t)))
244 (add-after 'install 'remove-tests
245 ;; Remove 25 MiB of unneeded unit tests. Keep test_support.*
246 ;; because these files are used by some libraries out there.
247 (lambda* (#:key outputs #:allow-other-keys)
248 (let ((out (assoc-ref outputs "out")))
249 (match (scandir (string-append out "/lib")
250 (lambda (name)
251 (string-prefix? "python" name)))
252 ((pythonX.Y)
253 (let ((testdir (string-append out "/lib/" pythonX.Y
254 "/test")))
255 (with-directory-excursion testdir
256 (for-each delete-file-recursively
257 (scandir testdir
258 (match-lambda
259 ((or "." "..") #f)
260 (file
261 (not
262 (string-prefix? "test_support."
263 file))))))
264 (call-with-output-file "__init__.py" (const #t))
265 #t)))))))
266 (add-before 'strip 'make-libraries-writable
267 (lambda* (#:key outputs #:allow-other-keys)
268 ;; Make .so files writable so they can be stripped.
269 (let ((out (assoc-ref outputs "out")))
270 (for-each (lambda (file)
271 (chmod file #o755))
272 (find-files (string-append out "/lib")
273 "\\.so"))
274 #t)))
275 (add-after 'install 'move-tk-inter
276 (lambda* (#:key outputs #:allow-other-keys)
277 ;; When Tkinter support is built move it to a separate output so
278 ;; that the main output doesn't contain a reference to Tcl/Tk.
279 (let ((out (assoc-ref outputs "out"))
280 (tk (assoc-ref outputs "tk")))
281 (when tk
282 (match (find-files out "tkinter.*\\.so")
283 ((tkinter.so)
284 ;; The .so is in OUT/lib/pythonX.Y/lib-dynload, but we
285 ;; want it under TK/lib/pythonX.Y/site-packages.
286 (let* ((len (string-length out))
287 (target (string-append
288 tk "/"
289 (string-drop
290 (dirname (dirname tkinter.so))
291 len)
292 "/site-packages")))
293 (install-file tkinter.so target)
294 (delete-file tkinter.so)))))
295 #t))))))
296 (inputs
297 `(("bzip2" ,bzip2)
298 ("gdbm" ,gdbm)
299 ("libffi" ,libffi) ; for ctypes
300 ("sqlite" ,sqlite) ; for sqlite extension
301 ("openssl" ,openssl)
302 ("readline" ,readline)
303 ("zlib" ,zlib)
304 ("tcl" ,tcl)
305 ("tk" ,tk))) ; for tkinter
306 (native-inputs
307 `(("pkg-config" ,pkg-config)))
308 (native-search-paths
309 (list (search-path-specification
310 (variable "PYTHONPATH")
311 (files '("lib/python2.7/site-packages")))))
312 (home-page "https://www.python.org")
313 (synopsis "High-level, dynamically-typed programming language")
314 (description
315 "Python is a remarkably powerful dynamic programming language that
316 is used in a wide variety of application domains. Some of its key
317 distinguishing features include: clear, readable syntax; strong
318 introspection capabilities; intuitive object orientation; natural
319 expression of procedural code; full modularity, supporting hierarchical
320 packages; exception-based error handling; and very high level dynamic
321 data types.")
322 (license license:psfl)))
323
324 ;; Current 2.x version.
325 (define-public python-2 python-2.7)
326
327 (define-public python-3.5
328 (package (inherit python-2)
329 (version "3.5.3")
330 (source (origin
331 (method url-fetch)
332 (uri (string-append "https://www.python.org/ftp/python/"
333 version "/Python-" version ".tar.xz"))
334 (patches (search-patches
335 "python-fix-tests.patch"
336 "python-3.5-fix-tests.patch"
337 "python-3.5-getentropy-on-old-kernels.patch"
338 "python-3-deterministic-build-info.patch"
339 "python-3-search-paths.patch"))
340 (patch-flags '("-p0"))
341 (sha256
342 (base32
343 "1c6v1n9nz4mlx9mw1125fxpmbrgniqdbbx9hnqx44maqazb2mzpf"))
344 (snippet
345 '(delete-file
346 "Lib/ctypes/test/test_win32.py")))) ; fails on aarch64
347 (arguments (substitute-keyword-arguments (package-arguments python-2)
348 ((#:tests? _) #t)))
349 (native-search-paths
350 (list (search-path-specification
351 (variable "PYTHONPATH")
352 (files (list (string-append "lib/python"
353 (version-major+minor version)
354 "/site-packages"))))))))
355
356 ;; Current 3.x version.
357 (define-public python-3 python-3.5)
358
359 ;; Current major version.
360 (define-public python python-3)
361
362 ;; Minimal variants of Python, mostly used to break the cycle between Tk and
363 ;; Python (Tk -> libxcb -> Python.)
364
365 (define-public python2-minimal
366 (package (inherit python-2)
367 (name "python-minimal")
368 (outputs '("out"))
369
370 ;; Keep zlib, which is used by 'pip' (via the 'zipimport' module), which
371 ;; is invoked upon 'make install'. 'pip' also expects 'ctypes' and thus
372 ;; libffi.
373 (inputs `(("libffi" ,libffi)
374 ("zlib" ,zlib)))))
375
376 (define-public python-minimal
377 (package (inherit python)
378 (name "python-minimal")
379 (outputs '("out"))
380
381 ;; Build fails due to missing ctypes without libffi.
382 ;; OpenSSL is a mandatory dependency of Python 3.x, for urllib;
383 ;; zlib is required by 'zipimport', used by pip.
384 (inputs `(("libffi" ,libffi)
385 ("openssl" ,openssl)
386 ("zlib" ,zlib)))))
387
388 (define* (wrap-python3 python
389 #:optional
390 (name (string-append (package-name python) "-wrapper")))
391 (package (inherit python)
392 (name name)
393 (source #f)
394 (build-system trivial-build-system)
395 (outputs '("out"))
396 (inputs `(("bash" ,bash)))
397 (propagated-inputs `(("python" ,python)))
398 (arguments
399 `(#:modules ((guix build utils))
400 #:builder
401 (begin
402 (use-modules (guix build utils))
403 (let ((bin (string-append (assoc-ref %outputs "out") "/bin"))
404 (python (string-append (assoc-ref %build-inputs "python") "/bin/")))
405 (mkdir-p bin)
406 (for-each
407 (lambda (old new)
408 (symlink (string-append python old)
409 (string-append bin "/" new)))
410 `("python3" ,"pydoc3" ,"idle3" ,"pip3")
411 `("python" ,"pydoc" ,"idle" ,"pip"))
412 ;; python-config outputs search paths based upon its location,
413 ;; use a bash wrapper to avoid changing its outputs.
414 (let ((bash (string-append (assoc-ref %build-inputs "bash")
415 "/bin/bash"))
416 (old (string-append python "python3-config"))
417 (new (string-append bin "/python-config")))
418 (with-output-to-file new
419 (lambda ()
420 (format #t "#!~a~%" bash)
421 (format #t "exec \"~a\" \"$@\"~%" old)
422 (chmod new #o755)
423 #t)))))))
424 (synopsis "Wrapper for the Python 3 commands")
425 (description
426 "This package provides wrappers for the commands of Python@tie{}3.x such
427 that they can be invoked under their usual name---e.g., @command{python}
428 instead of @command{python3}.")))
429
430 (define-public python-wrapper (wrap-python3 python))
431 (define-public python-minimal-wrapper (wrap-python3 python-minimal))
432
433 (define-public python-psutil
434 (package
435 (name "python-psutil")
436 (version "4.3.0")
437 (source
438 (origin
439 (method url-fetch)
440 (uri (pypi-uri "psutil" version))
441 (sha256
442 (base32
443 "1w4r09fvn6kd80m5mx4ws1wz100brkaq6hzzpwrns8cgjzjpl6c6"))))
444 (build-system python-build-system)
445 (arguments
446 ;; FIXME: some tests does not return and times out.
447 '(#:tests? #f))
448 (home-page "https://www.github.com/giampaolo/psutil")
449 (synopsis "Library for retrieving information on running processes")
450 (description
451 "psutil (Python system and process utilities) is a library for retrieving
452 information on running processes and system utilization (CPU, memory, disks,
453 network) in Python. It is useful mainly for system monitoring, profiling and
454 limiting process resources and management of running processes. It implements
455 many functionalities offered by command line tools such as: ps, top, lsof,
456 netstat, ifconfig, who, df, kill, free, nice, ionice, iostat, iotop, uptime,
457 pidof, tty, taskset, pmap.")
458 (license license:bsd-3)))
459
460 (define-public python2-psutil
461 (package-with-python2 python-psutil))
462
463 (define-public python-passlib
464 (package
465 (name "python-passlib")
466 (version "1.7.1")
467 (source
468 (origin
469 (method url-fetch)
470 (uri (pypi-uri "passlib" version))
471 (sha256
472 (base32
473 "1q2khqpj9rlcgdmkypjdq1kswvhjf72bq0zk2cv669cc2dj8z51x"))))
474 (build-system python-build-system)
475 (native-inputs
476 `(("python-nose" ,python-nose)))
477 (propagated-inputs
478 `(("python-py-bcrypt" ,python-py-bcrypt)))
479 (arguments
480 `(#:phases
481 (alist-cons-before
482 'check 'set-PYTHON_EGG_CACHE
483 ;; some tests require access to "$HOME/.cython"
484 (lambda* _ (setenv "PYTHON_EGG_CACHE" "/tmp"))
485 %standard-phases)))
486 (home-page "https://bitbucket.org/ecollins/passlib")
487 (synopsis
488 "Comprehensive password hashing framework")
489 (description
490 "Passlib is a password hashing library for Python 2 & 3, which provides
491 cross-platform implementations of over 30 password hashing algorithms, as well
492 as a framework for managing existing password hashes. It's designed to be
493 useful for a wide range of tasks, from verifying a hash found in /etc/shadow,
494 to providing full-strength password hashing for multi-user application.")
495 (license license:bsd-3)))
496
497 (define-public python2-passlib
498 (package-with-python2 python-passlib))
499
500 (define-public python-py-bcrypt
501 (package
502 (name "python-py-bcrypt")
503 (version "0.4")
504 (source
505 (origin
506 (method url-fetch)
507 (uri (string-append
508 "https://pypi.python.org/packages/source/p/py-bcrypt/py-bcrypt-"
509 version
510 ".tar.gz"))
511 (sha256
512 (base32
513 "0y6smdggwi5s72v6p1nn53dg6w05hna3d264cq6kas0lap73p8az"))))
514 (build-system python-build-system)
515 (home-page "https://code.google.com/p/py-bcrypt")
516 (synopsis
517 "Bcrypt password hashing and key derivation")
518 (description
519 "A python wrapper of OpenBSD's Blowfish password hashing code. This
520 system hashes passwords using a version of Bruce Schneier's Blowfish block
521 cipher with modifications designed to raise the cost of off-line password
522 cracking and frustrate fast hardware implementation. The computation cost of
523 the algorithm is parametised, so it can be increased as computers get faster.
524 The intent is to make a compromise of a password database less likely to
525 result in an attacker gaining knowledge of the plaintext passwords (e.g. using
526 John the Ripper).")
527 ;; "sha2.c" is under BSD-3;
528 ;; "blowfish.c" and "bcrypt.c" are under BSD-4;
529 ;; the rest is under ISC.
530 (license (list license:isc license:bsd-3 license:bsd-4))))
531
532 (define-public python2-py-bcrypt
533 (package-with-python2 python-py-bcrypt))
534
535
536 (define-public python-paramiko
537 (package
538 (name "python-paramiko")
539 (version "2.1.2")
540 (source
541 (origin
542 (method url-fetch)
543 (uri (pypi-uri "paramiko" version))
544 (sha256
545 (base32
546 "04734n0wy3hxk6rij4fr29in5jmr70nxpc7pqi2ksbjysfz4kbjz"))))
547 (build-system python-build-system)
548 (arguments
549 '(#:phases
550 (modify-phases %standard-phases
551 (replace 'check
552 (lambda _
553 (zero? (system* "python" "test.py")))))))
554 (propagated-inputs
555 `(("python-pyasn1" ,python-pyasn1)
556 ("python-cryptography" ,python-cryptography)))
557 (home-page "http://www.paramiko.org/")
558 (synopsis "SSHv2 protocol library")
559 (description "Paramiko is a python implementation of the SSHv2 protocol,
560 providing both client and server functionality. While it leverages a Python C
561 extension for low level cryptography (PyCrypto), Paramiko itself is a pure
562 Python interface around SSH networking concepts.")
563 (license license:lgpl2.1+)))
564
565 (define-public python2-paramiko
566 (package-with-python2 python-paramiko))
567
568
569 (define-public python-httplib2
570 (package
571 (name "python-httplib2")
572 (version "0.9.2")
573 (source
574 (origin
575 (method url-fetch)
576 (uri (pypi-uri "httplib2" version))
577 (sha256
578 (base32
579 "126rsryvw9vhbf3qmsfw9lf4l4xm2srmgs439lgma4cpag4s3ay3"))))
580 (build-system python-build-system)
581 (home-page "https://github.com/jcgregorio/httplib2")
582 (synopsis "Comprehensive HTTP client library")
583 (description
584 "A comprehensive HTTP client library supporting many features left out of
585 other HTTP libraries.")
586 (license license:expat)))
587
588 (define-public python2-httplib2
589 (package-with-python2 python-httplib2))
590
591 (define-public python-ecdsa
592 (package
593 (name "python-ecdsa")
594 (version "0.13")
595 (source
596 (origin
597 (method url-fetch)
598 (uri (string-append
599 "https://pypi.python.org/packages/source/e/ecdsa/ecdsa-"
600 version
601 ".tar.gz"))
602 (sha256
603 (base32
604 "1yj31j0asmrx4an9xvsaj2icdmzy6pw0glfpqrrkrphwdpi1xkv4"))))
605 (build-system python-build-system)
606 (inputs
607 `(("openssl" ,openssl)))
608 (home-page
609 "https://github.com/warner/python-ecdsa")
610 (synopsis
611 "ECDSA cryptographic signature library (pure python)")
612 (description
613 "This is an easy-to-use implementation of ECDSA cryptography (Elliptic
614 Curve Digital Signature Algorithm), implemented purely in Python. With this
615 library, you can quickly create keypairs (signing key and verifying key), sign
616 messages, and verify the signatures. The keys and signatures are very short,
617 making them easy to handle and incorporate into other protocols.")
618 (license license:expat)))
619
620 (define-public python2-ecdsa
621 (package-with-python2 python-ecdsa))
622
623 (define-public python-ccm
624 (package
625 (name "python-ccm")
626 (version "2.1.6")
627 (source
628 (origin
629 (method url-fetch)
630 (uri (pypi-uri "ccm" version))
631 (sha256
632 (base32
633 "177dfxsmk3k4cih6fh6v8d91bh4nqx7ns6pc07w7m7i3cvdx3c8n"))))
634 (build-system python-build-system)
635 (propagated-inputs
636 `(("python-pyyaml" ,python-pyyaml)
637 ;; Not listed in setup.py, but used in ccmlib/node.py for full
638 ;; functionality
639 ("python-psutil" ,python-psutil)
640 ("python-six" ,python-six)))
641 (home-page "https://github.com/pcmanus/ccm")
642 (synopsis "Cassandra Cluster Manager for Apache Cassandra clusters on
643 localhost")
644 (description "Cassandra Cluster Manager is a development tool for testing
645 local Cassandra clusters. It creates, launches and removes Cassandra clusters
646 on localhost.")
647 (license license:asl2.0)))
648
649 (define-public python2-ccm
650 (package-with-python2 python-ccm))
651
652 (define-public python-pytz
653 (package
654 (name "python-pytz")
655 (version "2016.10")
656 (source
657 (origin
658 (method url-fetch)
659 (uri (pypi-uri "pytz" version ".tar.bz2"))
660 (sha256
661 (base32
662 "0az099cyp6p5xbsvfcdacj4hvxncbwm2ayn3h55mcp07zb2b45kh"))))
663 (build-system python-build-system)
664 (arguments `(#:tests? #f)) ; no test target
665 (home-page "http://pythonhosted.org/pytz")
666 (synopsis "Python timezone library")
667 (description
668 "This library allows accurate and cross platform timezone calculations
669 using Python 2.4 or higher and provides access to the Olson timezone database.")
670 (license license:expat)))
671
672 (define-public python2-pytz
673 (package-with-python2 python-pytz))
674
675
676 (define-public python-babel
677 (package
678 (name "python-babel")
679 (version "2.3.4")
680 (source
681 (origin
682 (method url-fetch)
683 (uri (pypi-uri "Babel" version))
684 (sha256
685 (base32
686 "0x98qqqw35xllpcama013a9788ly84z8dm1w2wwfpxh2710c8df5"))))
687 (build-system python-build-system)
688 (propagated-inputs
689 `(("python-pytz" ,python-pytz)))
690 (arguments `(#:tests? #f)) ; no test target
691 (home-page "http://babel.pocoo.org/")
692 (synopsis
693 "Tools for internationalizing Python applications")
694 (description
695 "Babel is composed of two major parts:
696 - tools to build and work with gettext message catalogs
697 - a Python interface to the CLDR (Common Locale Data Repository), providing
698 access to various locale display names, localized number and date formatting,
699 etc. ")
700 (license license:bsd-3)))
701
702 (define-public python2-babel
703 (package-with-python2 python-babel))
704
705 (define-public python2-backport-ssl-match-hostname
706 (package
707 (name "python2-backport-ssl-match-hostname")
708 (version "3.5.0.1")
709 (source
710 (origin
711 (method url-fetch)
712 (uri (string-append
713 "https://pypi.python.org/packages/source/b/"
714 "backports.ssl_match_hostname/backports.ssl_match_hostname-"
715 version ".tar.gz"))
716 (sha256
717 (base32
718 "1wndipik52cyqy0677zdgp90i435pmvwd89cz98lm7ri0y3xjajh"))))
719 (build-system python-build-system)
720 (arguments
721 `(#:python ,python-2
722 #:tests? #f)) ; no test target
723 (home-page "https://bitbucket.org/brandon/backports.ssl_match_hostname")
724 (synopsis "Backport of ssl.match_hostname() function from Python 3.5")
725 (description
726 "This backport brings the ssl.match_hostname() function to users of
727 earlier versions of Python. The function checks the hostname in the
728 certificate returned by the server to which a connection has been established,
729 and verifies that it matches the intended target hostname.")
730 (license license:psfl)))
731
732 (define-public python-hdf4
733 (package
734 (name "python-hdf4")
735 (version "0.9")
736 (source
737 (origin
738 (method url-fetch)
739 (uri (pypi-uri name version))
740 (sha256
741 (base32
742 "1hjiyrxvxk9817qyqky3nar4y3fs4z8wxz0n884zzb5wi6skrjks"))))
743 (build-system python-build-system)
744 (native-inputs `(("nose" ,python-nose)))
745 (propagated-inputs `(("numpy" ,python-numpy)))
746 (inputs
747 `(("hdf4" ,hdf4)
748 ("libjpeg" ,libjpeg)
749 ("zlib" ,zlib)))
750 (arguments
751 `(#:phases
752 (modify-phases %standard-phases
753 (replace 'check
754 (lambda _
755 ;; The 'runexamples' script sets PYTHONPATH to CWD, then goes
756 ;; on to import numpy. Somehow this works on their CI system.
757 ;; Let's just manage PYTHONPATH here instead.
758 (substitute* "runexamples.sh"
759 (("export PYTHONPATH=.*") ""))
760 (setenv "PYTHONPATH"
761 (string-append (getcwd) ":"
762 (getenv "PYTHONPATH")))
763 (and (zero? (system* "./runexamples.sh"))
764 (zero? (system* "nosetests" "-v"))))))))
765 (home-page "https://github.com/fhs/python-hdf4")
766 (synopsis "Python interface to the NCSA HDF4 library")
767 (description
768 "Python-HDF4 is a python wrapper around the NCSA HDF version 4 library,
769 which implements the SD (Scientific Dataset), VS (Vdata) and V (Vgroup) API’s.
770 NetCDF files can also be read and modified. Python-HDF4 is a fork of
771 @url{http://hdfeos.org/software/pyhdf.php,pyhdf}.")
772 (license license:expat)))
773
774 (define-public python2-hdf4
775 (package-with-python2 python-hdf4))
776
777 (define-public python-h5py
778 (package
779 (name "python-h5py")
780 (version "2.6.0")
781 (source
782 (origin
783 (method url-fetch)
784 (uri (pypi-uri "h5py" version))
785 (sha256
786 (base32
787 "0df46dg7i7xfking9lp221bfm8dbl974yvlrbi1w7r6m61ac7bxj"))))
788 (build-system python-build-system)
789 (arguments
790 `(#:tests? #f ; no test target
791 #:phases
792 (modify-phases %standard-phases
793 (add-after 'unpack 'fix-hdf5-paths
794 (lambda* (#:key inputs #:allow-other-keys)
795 (let ((prefix (assoc-ref inputs "hdf5")))
796 (substitute* "setup_build.py"
797 (("\\['/opt/local/lib', '/usr/local/lib'\\]")
798 (string-append "['" prefix "/lib" "']"))
799 (("'/opt/local/include', '/usr/local/include'")
800 (string-append "'" prefix "/include" "'")))
801 (substitute* "setup_configure.py"
802 (("\\['/usr/local/lib', '/opt/local/lib'\\]")
803 (string-append "['" prefix "/lib" "']")))
804 #t))))))
805 (propagated-inputs
806 `(("python-six" ,python-six)
807 ("python-numpy" ,python-numpy)))
808 (inputs
809 `(("hdf5" ,hdf5)))
810 (native-inputs
811 `(("python-cython" ,python-cython)
812 ("python-pkgconfig" ,python-pkgconfig)))
813 (home-page "http://www.h5py.org/")
814 (synopsis "Read and write HDF5 files from Python")
815 (description
816 "The h5py package provides both a high- and low-level interface to the
817 HDF5 library from Python. The low-level interface is intended to be a
818 complete wrapping of the HDF5 API, while the high-level component supports
819 access to HDF5 files, datasets and groups using established Python and NumPy
820 concepts.")
821 (license license:bsd-3)))
822
823 (define-public python2-h5py
824 (package-with-python2 python-h5py))
825
826 (define-public python-netcdf4
827 (package
828 (name "python-netcdf4")
829 (version "1.2.7")
830 (source
831 (origin
832 (method url-fetch)
833 (uri (pypi-uri "netCDF4" version))
834 (sha256
835 (base32
836 "1fllizmnpw0zkzzm4j9pgamarlzfn3kmv9zrm0w65q1y31h9ni0c"))))
837 (build-system python-build-system)
838 (native-inputs
839 `(("python-cython" ,python-cython)))
840 (propagated-inputs
841 `(("python-numpy" ,python-numpy)))
842 (inputs
843 `(("netcdf" ,netcdf)
844 ("hdf4" ,hdf4)
845 ("hdf5" ,hdf5)))
846 (arguments
847 '(#:phases
848 (modify-phases %standard-phases
849 (replace 'check
850 (lambda _
851 (setenv "NO_NET" "1") ; disable opendap tests
852 (with-directory-excursion "test"
853 (setenv "PYTHONPATH" ; find and add the library we just built
854 (string-append
855 (car (find-files "../build" "lib.*"
856 #:directories? #:t
857 #:fail-on-error? #:t))
858 ":" (getenv "PYTHONPATH")))
859 (zero? (system* "python" "run_all.py"))))))))
860 (home-page
861 "https://github.com/Unidata/netcdf4-python")
862 (synopsis "Python/numpy interface to the netCDF library")
863 (description "Netcdf4-python is a Python interface to the netCDF C
864 library. netCDF version 4 has many features not found in earlier
865 versions of the library and is implemented on top of HDF5. This module
866 can read and write files in both the new netCDF 4 and the old netCDF 3
867 format, and can create files that are readable by HDF5 clients. The
868 API is modelled after @code{Scientific.IO.NetCDF}, and should be familiar
869 to users of that module.")
870 ;; The software is mainly ISC, but includes some files covered
871 ;; by the Expat license.
872 (license (list license:isc license:expat))))
873
874 (define-public python2-netcdf4
875 (package-with-python2 python-netcdf4))
876
877 (define-public python-lockfile
878 (package
879 (name "python-lockfile")
880 (version "0.12.2")
881 (source
882 (origin
883 (method url-fetch)
884 (uri (string-append "https://pypi.python.org/packages/source/l/lockfile/"
885 "lockfile-" version ".tar.gz"))
886 (sha256
887 (base32
888 "16gpx5hm73ah5n1079ng0vy381hl802v606npkx4x8nb0gg05vba"))))
889 (build-system python-build-system)
890 (arguments '(#:test-target "check"))
891 (native-inputs
892 `(("python-pbr" ,python-pbr)))
893 (home-page "https://launchpad.net/pylockfile")
894 (synopsis "Platform-independent file locking module")
895 (description
896 "The lockfile package exports a LockFile class which provides a simple
897 API for locking files.")
898 (license license:expat)))
899
900 (define-public python2-lockfile
901 (package-with-python2 python-lockfile))
902
903 (define-public python-mock
904 (package
905 (name "python-mock")
906 (version "1.0.1")
907 (source
908 (origin
909 (method url-fetch)
910 (uri (pypi-uri "mock" version))
911 (sha256
912 (base32
913 "0kzlsbki6q0awf89rc287f3aj8x431lrajf160a70z0ikhnxsfdq"))))
914 (build-system python-build-system)
915 (arguments '(#:test-target "check"))
916 (home-page "https://github.com/testing-cabal/mock")
917 (synopsis "Python mocking and patching library for testing")
918 (description
919 "Mock is a library for testing in Python. It allows you to replace parts
920 of your system under test with mock objects and make assertions about how they
921 have been used.")
922 (license license:expat)))
923
924 (define-public python2-mock
925 (package-with-python2 python-mock))
926
927 ;;; Some packages (notably, certbot and python-acme) rely on this newer version
928 ;;; of python-mock. However, a large number of packages fail to build with
929 ;;; mock@2, so we add a new variable for now. Also, there may be a dependency
930 ;;; cycle between mock and six, so we avoid creating python2-mock@2 for now.
931 (define-public python-mock-2
932 (package
933 (inherit python-mock)
934 (version "2.0.0")
935 (source
936 (origin
937 (method url-fetch)
938 (uri (pypi-uri "mock" version))
939 (sha256
940 (base32
941 "1flbpksir5sqrvq2z0dp8sl4bzbadg21sj4d42w3klpdfvgvcn5i"))))
942 (propagated-inputs
943 `(("python-pbr" ,python-pbr-minimal)
944 ,@(package-propagated-inputs python-mock)))))
945
946 (define-public python-setuptools
947 (package
948 (name "python-setuptools")
949 (version "31.0.0")
950 (source
951 (origin
952 (method url-fetch)
953 (uri (pypi-uri "setuptools" version))
954 (sha256
955 (base32
956 "0ypybh4hx3bv4vhg2dc74xpj1g56ggnaffm87k4abhwjwq6wq608"))
957 (modules '((guix build utils)))
958 (snippet
959 '(begin
960 ;; Remove included binaries which are used to build self-extracting
961 ;; installers for Windows.
962 ;; TODO: Find some way to build them ourself so we can include them.
963 (for-each delete-file (find-files "setuptools" "^(cli|gui).*\\.exe$"))
964 #t))))
965 (build-system python-build-system)
966 ;; FIXME: Tests require pytest, which itself relies on setuptools.
967 ;; One could bootstrap with an internal untested setuptools.
968 (arguments
969 `(#:tests? #f))
970 (home-page "https://pypi.python.org/pypi/setuptools")
971 (synopsis
972 "Library designed to facilitate packaging Python projects")
973 (description
974 "Setuptools is a fully-featured, stable library designed to facilitate
975 packaging Python projects, where packaging includes:
976 Python package and module definitions,
977 distribution package metadata,
978 test hooks,
979 project installation,
980 platform-specific details,
981 Python 3 support.")
982 ;; TODO: setuptools now bundles the following libraries:
983 ;; packaging, pyparsing, six and appdirs. How to unbundle?
984 (license (list license:psfl ; setuptools itself
985 license:expat ; six, appdirs, pyparsing
986 license:asl2.0 ; packaging is dual ASL2/BSD-2
987 license:bsd-2))))
988
989 (define-public python2-setuptools
990 (package-with-python2 python-setuptools))
991
992 (define-public python-uniseg
993 (package
994 (name "python-uniseg")
995 (version "0.7.1")
996 (source
997 (origin
998 (method url-fetch)
999 (uri (string-append "https://bitbucket.org/emptypage/uniseg-python/"
1000 "get/rel-" version ".tar.gz"))
1001 (file-name (string-append name "-" version ".tar.gz"))
1002 (sha256
1003 (base32
1004 "1df4gddnj2a0v8z35wb2ra5vvh1f1qyxs8fgd25c8g64031mna6x"))))
1005 (build-system python-build-system)
1006 (arguments
1007 '(#:tests? #f)) ; The test suite requires network access.
1008 (home-page
1009 "https://bitbucket.org/emptypage/uniseg-python")
1010 (synopsis
1011 "Python library to determine Unicode text segmentations")
1012 (description
1013 "Uniseg is a Python package used to determine Unicode text segmentations.
1014 Supported segmentations include:
1015 @enumerate
1016 @item @dfn{Code point} (any value in the Unicode codespace)
1017 @item @dfn{Grapheme cluster} (user-perceived character made of a single or
1018 multiple Unicode code points, e.g. \"G\" + acute-accent)
1019 @item Word break
1020 @item Sentence break
1021 @item Line break
1022 @end enumerate")
1023 (license license:expat)))
1024
1025 (define-public python2-uniseg
1026 (package-with-python2 python-uniseg))
1027
1028 ;;; Pycrypto is abandoned upstream:
1029 ;;;
1030 ;;; https://github.com/dlitz/pycrypto/issues/173
1031 ;;;
1032 ;;; TODO Remove this package from GNU Guix.
1033 (define-public python-pycrypto
1034 (package
1035 (name "python-pycrypto")
1036 (version "2.6.1")
1037 (source
1038 (origin
1039 (method url-fetch)
1040 (uri (pypi-uri "pycrypto" version))
1041 (patches (search-patches "python-pycrypto-CVE-2013-7459.patch"))
1042 (sha256
1043 (base32
1044 "0g0ayql5b9mkjam8hym6zyg6bv77lbh66rv1fyvgqb17kfc1xkpj"))))
1045 (build-system python-build-system)
1046 (inputs
1047 `(("python" ,python)
1048 ("gmp" ,gmp)))
1049 (arguments
1050 `(#:phases
1051 (alist-cons-before
1052 'build 'set-build-env
1053 ;; pycrypto runs an autoconf configure script behind the scenes
1054 (lambda _
1055 (setenv "CONFIG_SHELL" (which "bash")))
1056 %standard-phases)))
1057 (home-page "http://www.pycrypto.org/")
1058 (synopsis "Cryptographic modules for Python")
1059 (description
1060 "Pycrypto is a collection of both secure hash functions (such as SHA256
1061 and RIPEMD160), and various encryption algorithms (AES, DES, RSA, ElGamal,
1062 etc.). The package is structured to make adding new modules easy.")
1063 (license license:public-domain)))
1064
1065 (define-public python2-pycrypto
1066 (let ((pycrypto (package-with-python2 python-pycrypto)))
1067 (package (inherit pycrypto)
1068 (inputs
1069 `(("python" ,python-2)
1070 ,@(alist-delete
1071 "python"
1072 (package-inputs pycrypto)))))))
1073
1074 (define-public python-eventlet
1075 (package
1076 (name "python-eventlet")
1077 (version "0.20.1")
1078 (source
1079 (origin
1080 (method url-fetch)
1081 (uri (pypi-uri "eventlet" version))
1082 (sha256
1083 (base32
1084 "0f3q55mq4n021wb7qa53pz3ix6i2py64sap66vsaqm2scjw83m9s"))))
1085 (build-system python-build-system)
1086 (propagated-inputs
1087 `(("python-greenlet" ,python-greenlet)))
1088 (arguments
1089 ;; TODO: Requires unpackaged 'enum-compat'.
1090 '(#:tests? #f))
1091 (home-page "http://eventlet.net")
1092 (synopsis "Concurrent networking library for Python")
1093 (description
1094 "Eventlet is a concurrent networking library for Python that
1095 allows you to change how you run your code, not how you write it.
1096 It uses @code{epoll} or @code{libevent} for highly scalable non-blocking I/O.
1097 Coroutines ensure that the developer uses a blocking style of programming
1098 that is similar to threading, but provide the benefits of non-blocking I/O.
1099 The event dispatch is implicit, which means you can easily use @code{Eventlet}
1100 from the Python interpreter, or as a small part of a larger application.")
1101 (license license:expat)))
1102
1103 (define-public python2-eventlet
1104 (let ((base (package-with-python2
1105 (strip-python2-variant python-eventlet))))
1106 (package (inherit base)
1107 (propagated-inputs
1108 `(("python2-enum34" ,python2-enum34)
1109 ,@(package-propagated-inputs base))))))
1110
1111 (define-public python-keyring
1112 (package
1113 (name "python-keyring")
1114 (version "8.7")
1115 (source
1116 (origin
1117 (method url-fetch)
1118 (uri (pypi-uri "keyring" version))
1119 (sha256
1120 (base32
1121 "0482rmi2x6p78wl2kz8qzyq21xz1sbbfwnv5x7dggar4vkwxhzfx"))))
1122 (build-system python-build-system)
1123 (native-inputs
1124 `(("python-setuptools-scm" ,python-setuptools-scm)))
1125 (propagated-inputs
1126 `(("python-pycrypto" ,python-pycrypto)))
1127 (arguments
1128 `(#:tests? #f)) ;TODO: tests require pytest
1129 (home-page "https://github.com/jaraco/keyring")
1130 (synopsis "Store and access your passwords safely")
1131 (description
1132 "The Python keyring lib provides a easy way to access the system keyring
1133 service from python. It can be used in any application that needs safe
1134 password storage.")
1135 ;; "MIT" and PSF dual license
1136 (license license:x11)))
1137
1138 (define-public python2-keyring
1139 (package-with-python2 python-keyring))
1140
1141 (define-public python-six
1142 (package
1143 (name "python-six")
1144 (version "1.10.0")
1145 (source
1146 (origin
1147 (method url-fetch)
1148 (uri (pypi-uri "six" version))
1149 (sha256
1150 (base32
1151 "0snmb8xffb3vsma0z67i0h0w2g2dy0p3gsgh9gi4i0kgc5l8spqh"))))
1152 (build-system python-build-system)
1153 (native-inputs
1154 `(("python-py" ,python-py)
1155 ("python-pytest" ,python-pytest)))
1156 (home-page "http://pypi.python.org/pypi/six/")
1157 (synopsis "Python 2 and 3 compatibility utilities")
1158 (description
1159 "Six is a Python 2 and 3 compatibility library. It provides utility
1160 functions for smoothing over the differences between the Python versions with
1161 the goal of writing Python code that is compatible on both Python versions.
1162 Six supports every Python version since 2.5. It is contained in only one
1163 Python file, so it can be easily copied into your project.")
1164 (license license:x11)))
1165
1166 (define-public python2-six
1167 (package-with-python2 python-six))
1168
1169 (define-public python-dateutil
1170 (package
1171 (name "python-dateutil")
1172 (version "2.6.0")
1173 (source
1174 (origin
1175 (method url-fetch)
1176 (uri (pypi-uri "python-dateutil" version))
1177 (sha256
1178 (base32
1179 "1lhq0hxjc3cfha101q02ld5ijlpfyjn2w1yh7wvpiy367pgzi8k2"))))
1180 (build-system python-build-system)
1181 (propagated-inputs
1182 `(("python-six" ,python-six)))
1183 (home-page "https://dateutil.readthedocs.io/en/stable/")
1184 (synopsis "Extensions to the standard datetime module")
1185 (description
1186 "The dateutil module provides powerful extensions to the standard
1187 datetime module, available in Python 2.3+.")
1188 (license license:bsd-3)))
1189
1190 (define-public python2-dateutil
1191 (package-with-python2 python-dateutil))
1192
1193 (define-public python-parsedatetime
1194 (package
1195 (name "python-parsedatetime")
1196 (version "2.4")
1197 (source
1198 (origin
1199 (method url-fetch)
1200 (uri (pypi-uri "parsedatetime" version))
1201 (sha256
1202 (base32
1203 "0jxqkjks7z9dn222cqgvskp4wr6d92aglinxq7pd2w4mzdc7r09x"))))
1204 (build-system python-build-system)
1205 (native-inputs
1206 `(("python-nose" ,python-nose)
1207 ("python-pyicu" ,python-pyicu)
1208 ("python-pytest" ,python-pytest)
1209 ("python-pytest-runner" ,python-pytest-runner)))
1210 (propagated-inputs
1211 `(("python-future" ,python-future)))
1212 (home-page "https://github.com/bear/parsedatetime/")
1213 (synopsis
1214 "Parse human-readable date/time text")
1215 (description
1216 "Parse human-readable date/time text.")
1217 (license license:asl2.0)))
1218
1219 (define-public python2-parsedatetime
1220 (package-with-python2 python-parsedatetime))
1221
1222 (define-public python-pandas
1223 (package
1224 (name "python-pandas")
1225 (version "0.19.2")
1226 (source
1227 (origin
1228 (method url-fetch)
1229 (uri (pypi-uri "pandas" version))
1230 (sha256
1231 (base32 "0540cnbwy2hc4hv2sxfs8i47xi91qzvzxfn80dl785ibiicly3vg"))
1232 (patches
1233 (search-patches "python-pandas-skip-failing-tests.patch"))))
1234 (build-system python-build-system)
1235 (propagated-inputs
1236 `(("python-numpy" ,python-numpy)
1237 ("python-pytz" ,python-pytz)
1238 ("python-dateutil" ,python-dateutil)))
1239 (native-inputs
1240 `(("python-nose" ,python-nose)
1241 ("python-cython" ,python-cython)))
1242 (home-page "http://pandas.pydata.org")
1243 (synopsis "Data structures for data analysis, time series, and statistics")
1244 (description
1245 "Pandas is a Python package providing fast, flexible, and expressive data
1246 structures designed to make working with structured (tabular,
1247 multidimensional, potentially heterogeneous) and time series data both easy
1248 and intuitive. It aims to be the fundamental high-level building block for
1249 doing practical, real world data analysis in Python.")
1250 (license license:bsd-3)))
1251
1252 (define-public python2-pandas
1253 (package-with-python2 python-pandas))
1254
1255 (define-public python-tzlocal
1256 (package
1257 (name "python-tzlocal")
1258 (version "1.2.2")
1259 (source
1260 (origin
1261 (method url-fetch)
1262 (uri (pypi-uri "tzlocal" version))
1263 (sha256
1264 (base32
1265 "0paj7vlsb0np8b5sp4bv64wxv7qk2piyp7xg29pkhdjwsbls9fnb"))))
1266 (build-system python-build-system)
1267 (propagated-inputs
1268 `(("python-pytz" ,python-pytz)))
1269 (home-page "https://github.com/regebro/tzlocal")
1270 (synopsis
1271 "Local timezone information for Python")
1272 (description
1273 "Tzlocal returns a tzinfo object with the local timezone information.
1274 This module attempts to fix a glaring hole in pytz, that there is no way to
1275 get the local timezone information, unless you know the zoneinfo name, and
1276 under several distributions that's hard or impossible to figure out.")
1277 (license license:cc0)))
1278
1279 (define-public python2-pysqlite
1280 (package
1281 (name "python2-pysqlite")
1282 (version "2.8.3")
1283 (source
1284 (origin
1285 (method url-fetch)
1286 (uri (pypi-uri "pysqlite" version))
1287 (sha256
1288 (base32
1289 "1424gwq9sil2ffmnizk60q36vydkv8rxs6m7xs987kz8cdc37lqp"))))
1290 (build-system python-build-system)
1291 (inputs
1292 `(("sqlite" ,sqlite)))
1293 (arguments
1294 `(#:python ,python-2 ; incompatible with Python 3
1295 #:tests? #f)) ; no test target
1296 (home-page "https://github.com/ghaering/pysqlite")
1297 (synopsis "SQLite bindings for Python")
1298 (description
1299 "Pysqlite provides SQLite bindings for Python that comply to the
1300 Database API 2.0T.")
1301 (license license:zlib)))
1302
1303
1304 (define-public python2-mechanize
1305 (package
1306 (name "python2-mechanize")
1307 (version "0.2.5")
1308 (source
1309 (origin
1310 (method url-fetch)
1311 (uri (string-append "https://pypi.python.org/packages/source/m/mechanize/mechanize-"
1312 version ".tar.gz"))
1313 (sha256
1314 (base32
1315 "0rj7r166i1dyrq0ihm5rijfmvhs8a04im28lv05c0c3v206v4rrf"))))
1316 (build-system python-build-system)
1317 (arguments
1318 `(#:python ,python-2 ; apparently incompatible with Python 3
1319 #:tests? #f))
1320 ;; test fails with message
1321 ;; AttributeError: 'module' object has no attribute 'test_pullparser'
1322 ;; (python-3.3.2) or
1323 ;; AttributeError: 'module' object has no attribute 'test_urllib2_localnet'
1324 ;; (python-2.7.5).
1325 ;; The source code is from March 2011 and probably not up-to-date
1326 ;; with respect to python unit tests.
1327 (home-page "http://wwwsearch.sourceforge.net/mechanize/")
1328 (synopsis
1329 "Stateful programmatic web browsing in Python")
1330 (description
1331 "Mechanize implements stateful programmatic web browsing in Python,
1332 after Andy Lester’s Perl module WWW::Mechanize.")
1333 (license (license:non-copyleft
1334 "file://COPYING"
1335 "See COPYING in the distribution."))))
1336
1337
1338 (define-public python-simplejson
1339 (package
1340 (name "python-simplejson")
1341 (version "3.10.0")
1342 (source
1343 (origin
1344 (method url-fetch)
1345 (uri (pypi-uri "simplejson" version))
1346 (sha256
1347 (base32
1348 "1qhwsykjlb85igb4cfl6v6gkprzbbg8gyqdd7zscc8w3x0ifcfwm"))))
1349 (build-system python-build-system)
1350 (home-page "http://simplejson.readthedocs.org/en/latest/")
1351 (synopsis
1352 "Json library for Python")
1353 (description
1354 "JSON (JavaScript Object Notation) is a subset of JavaScript
1355 syntax (ECMA-262 3rd edition) used as a lightweight data interchange
1356 format.
1357
1358 Simplejson exposes an API familiar to users of the standard library marshal
1359 and pickle modules. It is the externally maintained version of the json
1360 library contained in Python 2.6, but maintains compatibility with Python 2.5
1361 and (currently) has significant performance advantages, even without using
1362 the optional C extension for speedups. Simplejson is also supported on
1363 Python 3.3+.")
1364 (license license:x11)))
1365
1366 (define-public python2-simplejson
1367 (package-with-python2 python-simplejson))
1368
1369
1370 (define-public python-pyicu
1371 (package
1372 (name "python-pyicu")
1373 (version "1.9.5")
1374 (source
1375 (origin
1376 (method url-fetch)
1377 (uri (pypi-uri "PyICU" version))
1378 (sha256
1379 (base32
1380 "16rmxy9y0qhqqna2v49i7nzwm09as699rbyvh4raw7w602w55c3k"))))
1381 (build-system python-build-system)
1382 (arguments
1383 '(#:phases
1384 (modify-phases %standard-phases
1385 (add-before 'check 'delete-failing-test
1386 (lambda _
1387 ;; XXX: These tests require locales that are unavailable
1388 ;; in the build environment.
1389 (delete-file "test/test_DateTimeParserGenerator.py")
1390 #t)))))
1391 (inputs
1392 `(("icu4c" ,icu4c)))
1393 (home-page "http://pyicu.osafoundation.org/")
1394 (synopsis "Python extension wrapping the ICU C++ API")
1395 (description
1396 "PyICU is a python extension wrapping the ICU C++ API.")
1397 (license license:x11)))
1398
1399 (define-public python2-pyicu
1400 (package-with-python2 python-pyicu))
1401
1402 (define-public python2-dogtail
1403 ;; Python 2 only, as it leads to "TabError: inconsistent use of tabs and
1404 ;; spaces in indentation" with Python 3.
1405 (package
1406 (name "python2-dogtail")
1407 (version "0.9.9")
1408 (source (origin
1409 (method url-fetch)
1410 (uri (pypi-uri "dogtail" version))
1411 (sha256
1412 (base32
1413 "0p5wfssvzr9w0bvhllzbbd8fnp4cca2qxcpcsc33dchrmh5n552x"))))
1414 (build-system python-build-system)
1415 (arguments `(#:python ,python-2
1416 #:tests? #f)) ; invalid command "test"
1417 ;; Currently no offical homepage.
1418 (home-page "https://pypi.python.org/pypi/dogtail/")
1419 (synopsis "GUI test tool and automation framework written in Python")
1420 (description
1421 "Dogtail is a GUI test tool and automation framework written in Python.
1422 It uses Accessibility (a11y) technologies to communicate with desktop
1423 applications. dogtail scripts are written in Python and executed like any
1424 other Python program.")
1425 (license license:gpl2+)))
1426
1427 (define-public python2-empy
1428 (package
1429 (name "python2-empy")
1430 (version "3.3")
1431 (source (origin
1432 (method url-fetch)
1433 (uri (string-append "http://www.alcyone.com/software/empy/empy-"
1434 version ".tar.gz"))
1435 (sha256
1436 (base32
1437 "01g8mmkfnvjdmlhsihwyx56lrg7r5m5d2fg6mnxsvy6g0dnl69f6"))))
1438 (build-system python-build-system)
1439 (arguments
1440 `(#:python ,python-2
1441 #:phases (alist-replace
1442 'check
1443 (lambda _
1444 (zero? (system* "./test.sh")))
1445 %standard-phases)))
1446 (home-page "http://www.alcyone.com/software/empy/")
1447 (synopsis "Templating system for Python")
1448 (description
1449 "EmPy is a system for embedding Python expressions and statements in
1450 template text; it takes an EmPy source file, processes it, and produces
1451 output. This is accomplished via expansions, which are special signals to the
1452 EmPy system and are set off by a special prefix (by default the at sign, @@).
1453 EmPy can expand arbitrary Python expressions and statements in this way, as
1454 well as a variety of special forms. Textual data not explicitly delimited in
1455 this way is sent unaffected to the output, allowing Python to be used in
1456 effect as a markup language. Also supported are callbacks via hooks,
1457 recording and playback via diversions, and dynamic, chainable filters. The
1458 system is highly configurable via command line options and embedded
1459 commands.")
1460 (license license:lgpl2.1+)))
1461
1462 (define-public python2-element-tree
1463 (package
1464 (name "python2-element-tree")
1465 (version "1.2.6")
1466 (source (origin
1467 (method url-fetch)
1468 (uri (string-append
1469 "http://effbot.org/media/downloads/elementtree-"
1470 version "-20050316.tar.gz"))
1471 (sha256
1472 (base32
1473 "016bphqnlg0l4vslahhw4r0aanw95bpypy65r1i1acyb2wj5z7dj"))))
1474 (build-system python-build-system)
1475 (arguments
1476 `(#:python ,python-2 ; seems to be part of Python 3
1477 #:tests? #f)) ; no 'test' sub-command
1478 (synopsis "Toolkit for XML processing in Python")
1479 (description
1480 "ElementTree is a Python library supporting lightweight XML processing.")
1481 (home-page "http://effbot.org/zone/element-index.htm")
1482 (license (license:x11-style
1483 "http://docs.python.org/2/license.html"
1484 "Like \"CWI LICENSE AGREEMENT FOR PYTHON 0.9.0 THROUGH 1.2\"."))))
1485
1486 (define-public python2-pybugz
1487 (package
1488 (name "python2-pybugz")
1489 (version "0.6.11")
1490 (source (origin
1491 (method url-fetch)
1492 (uri (string-append
1493 "http://bits.liquidx.net/projects/pybugz/pybugz-"
1494 version ".tar.gz"))
1495 (sha256
1496 (base32
1497 "17ni00p08gp5lkxlrrcnvi3x09fmajnlbz4da03qcgl9q21ym4jd"))
1498 (patches (search-patches "pybugz-stty.patch"
1499 "pybugz-encode-error.patch"))))
1500 (build-system python-build-system)
1501 (arguments
1502 `(#:python ,python-2 ; SyntaxError with Python 3
1503 #:tests? #f)) ; no 'test' sub-command
1504 (propagated-inputs
1505 `(("element-tree" ,python2-element-tree)))
1506 (synopsis "Python and command-line interface to Bugzilla")
1507 (description
1508 "PyBugz is a Python library and command-line tool to query the Bugzilla
1509 bug tracking system. It is meant as an aid to speed up interaction with the
1510 bug tracker.")
1511 (home-page "http://www.liquidx.net/pybugz/")
1512 (license license:gpl2)))
1513
1514 (define-public python-enum34
1515 (package
1516 (name "python-enum34")
1517 (version "1.1.6")
1518 (source
1519 (origin
1520 (method url-fetch)
1521 (uri (pypi-uri "enum34" version))
1522 (sha256
1523 (base32
1524 "1cgm5ng2gcfrkrm3hc22brl6chdmv67b9zvva9sfs7gn7dwc9n4a"))))
1525 (build-system python-build-system)
1526 (home-page "https://pypi.python.org/pypi/enum34")
1527 (synopsis "Backported Python 3.4 Enum")
1528 (description
1529 "Enum34 is the new Python stdlib enum module available in Python 3.4
1530 backported for previous versions of Python from 2.4 to 3.3.")
1531 (license license:bsd-3)))
1532
1533 (define-public python2-enum34
1534 (package-with-python2 python-enum34))
1535
1536 (define-public python-parse-type
1537 (package
1538 (name "python-parse-type")
1539 (version "0.3.4")
1540 (source
1541 (origin
1542 (method url-fetch)
1543 (uri (string-append "https://pypi.python.org/packages/source/p/"
1544 "parse_type/parse_type-" version ".tar.gz"))
1545 (sha256
1546 (base32
1547 "0iv1c34npr4iynwpgv1vkjx9rjd18a85ir8c01gc5f7wp8iv7l1x"))))
1548 (build-system python-build-system)
1549 (arguments
1550 `(#:phases
1551 (modify-phases %standard-phases
1552 (add-after 'unpack 'patch-tests
1553 (lambda _
1554 (substitute* "tests/test_parse_type_parse.py"
1555 ;; Newer Python versions don't have the problem this test tests.
1556 (("self[.]assertRaises[(]parse.TooManyFields, p.parse, ''[)]")
1557 ""))
1558 #t)))))
1559 (propagated-inputs
1560 `(("python-six" ,python-six)
1561 ("python-parse" ,python-parse)))
1562 (native-inputs
1563 `(("python-pytest" ,python-pytest)
1564 ("python-pytest-runner" ,python-pytest-runner)))
1565 (home-page "https://github.com/jenisys/parse_type")
1566 (synopsis "Extended parse module")
1567 (description
1568 "Parse_type extends the python parse module.")
1569 (properties
1570 `((python2-variant . ,(delay python2-parse-type))))
1571 (license license:bsd-3)))
1572
1573 (define-public python2-parse-type
1574 (let ((base (package-with-python2
1575 (strip-python2-variant python-parse-type))))
1576 (package (inherit base)
1577 (propagated-inputs
1578 `(("python2-enum34" ,python2-enum34)
1579 ,@(package-propagated-inputs base))))))
1580
1581 (define-public python-parse
1582 (package
1583 (name "python-parse")
1584 (version "1.6.6")
1585 (source
1586 (origin
1587 (method url-fetch)
1588 (uri (pypi-uri "parse" version))
1589 (sha256
1590 (base32
1591 "0y31i3mwgv35qn0kzzjn9q8jqfdqmbi6sr6yfvn8rq4lqjm5lhvi"))
1592 (patches (search-patches "python-parse-too-many-fields.patch"))))
1593 (build-system python-build-system)
1594 (arguments
1595 `(#:phases
1596 (modify-phases %standard-phases
1597 (replace 'check
1598 (lambda _ (zero? (system* "python" "test_parse.py")))))))
1599 (home-page "https://github.com/r1chardj0n3s/parse")
1600 (synopsis "Parse strings")
1601 (description
1602 "Parse strings using a specification based on the Python format()
1603 syntax.")
1604 (license license:x11)))
1605
1606 (define-public python-polib
1607 (package
1608 (name "python-polib")
1609 (version "1.0.8")
1610 (source (origin
1611 (method url-fetch)
1612 (uri (pypi-uri "polib" version))
1613 (sha256
1614 (base32
1615 "1pq2hbm3m2q0cjdszk8mc4qa1vl3wcblh5nfyirlfnzb2pcy7zss"))))
1616 (build-system python-build-system)
1617 (home-page "https://bitbucket.org/izi/polib/wiki/Home")
1618 (synopsis "Manipulate, create and modify gettext files")
1619 (description "Polib can manipulate any gettext format (po, pot and mo)
1620 files. It can be used to create po files from scratch or to modify
1621 existing ones.")
1622 (license license:expat)))
1623
1624 (define-public python2-polib
1625 (let ((base (package-with-python2 (strip-python2-variant python-polib))))
1626 (package
1627 (inherit base)
1628 (arguments `(,@(package-arguments base)
1629 ;; Tests don't work with python2.
1630 #:tests? #f)))))
1631
1632 (define-public scons
1633 (package
1634 (name "scons")
1635 (version "2.5.1")
1636 (source (origin
1637 (method url-fetch)
1638 (uri (string-append "mirror://sourceforge/scons/scons/" version
1639 "/scons-" version ".tar.gz"))
1640 (sha256
1641 (base32
1642 "1wji1z9jdkhnmm99apx6fhld9cs52rr56aigniyrcsmlwy52298b"))))
1643 (build-system python-build-system)
1644 (arguments
1645 ;; With Python 3.x, fails to build with a syntax error.
1646 `(#:python ,python-2
1647 #:use-setuptools? #f ; still relies on distutils
1648 #:tests? #f)) ; no 'python setup.py test' command
1649 (home-page "http://scons.org/")
1650 (synopsis "Software construction tool written in Python")
1651 (description
1652 "SCons is a software construction tool. Think of SCons as an improved,
1653 cross-platform substitute for the classic Make utility with integrated
1654 functionality similar to autoconf/automake and compiler caches such as ccache.
1655 In short, SCons is an easier, more reliable and faster way to build
1656 software.")
1657 (license license:x11)))
1658
1659 (define-public python-extras
1660 (package
1661 (name "python-extras")
1662 (version "0.0.3")
1663 (source
1664 (origin
1665 (method url-fetch)
1666 (uri (string-append
1667 "https://pypi.python.org/packages/source/e/extras/extras-"
1668 version ".tar.gz"))
1669 (sha256
1670 (base32
1671 "1h7zx4dfyclalg0fqnfjijpn0f793a9mx8sy3b27gd31nr6dhq3s"))))
1672 (build-system python-build-system)
1673 (arguments
1674 ;; error in setup.cfg: command 'test' has no such option 'buffer'
1675 '(#:tests? #f))
1676 (home-page "https://github.com/testing-cabal/extras")
1677 (synopsis "Useful extensions to the Python standard library")
1678 (description
1679 "Extras is a set of extensions to the Python standard library.")
1680 (license license:expat)))
1681
1682 (define-public python2-extras
1683 (package-with-python2 python-extras))
1684
1685 (define-public python-mimeparse
1686 (package
1687 (name "python-mimeparse")
1688 (version "0.1.4")
1689 (source
1690 (origin
1691 (method url-fetch)
1692 (uri (string-append
1693 "https://pypi.python.org/packages/source/p/python-mimeparse/python-mimeparse-"
1694 version ".tar.gz"))
1695 (sha256
1696 (base32
1697 "1hyxg09kaj02ri0rmwjqi86wk4nd1akvv7n0dx77azz76wga4s9w"))))
1698 (build-system python-build-system)
1699 (arguments
1700 '(#:tests? #f)) ; no setup.py test command
1701 (home-page
1702 "https://github.com/dbtsai/python-mimeparse")
1703 (synopsis "Python library for parsing MIME types")
1704 (description
1705 "Mimeparse provides basic functions for parsing MIME type names and
1706 matching them against a list of media-ranges.")
1707 (license license:expat)))
1708
1709 (define-public python2-mimeparse
1710 (package-with-python2 python-mimeparse))
1711
1712 (define-public python-nose
1713 (package
1714 (name "python-nose")
1715 (version "1.3.7")
1716 (source
1717 (origin
1718 (method url-fetch)
1719 (uri (pypi-uri "nose" version))
1720 (sha256
1721 (base32
1722 "164a43k7k2wsqqk1s6vavcdamvss4mz0vd6pwzv2h9n8rgwzxgzi"))))
1723 (build-system python-build-system)
1724 (arguments
1725 '(#:tests? #f)) ; FIXME: test suite fails
1726 (home-page "http://readthedocs.org/docs/nose/")
1727 (synopsis "Python testing library")
1728 (description
1729 "Nose extends the unittest library to make testing easier.")
1730 (license license:lgpl2.0+)))
1731
1732 (define-public python2-nose
1733 (package-with-python2 python-nose))
1734
1735 (define-public python-nose2
1736 (package
1737 (name "python-nose2")
1738 (version "0.6.5")
1739 (source
1740 (origin
1741 (method url-fetch)
1742 (uri (pypi-uri "nose2" version))
1743 (sha256
1744 (base32
1745 "1x4zjq1zlyrh8b9ba0cmafd3w94pxhid408kibyjd3s6h1lap6s7"))))
1746 (build-system python-build-system)
1747 (arguments `(#:tests? #f)) ; 'module' object has no attribute 'collector'
1748 (propagated-inputs
1749 `(("python-cov-core" ,python-cov-core)
1750 ("python-pytest-cov" ,python-pytest-cov)
1751 ("python-six" ,python-six)))
1752 (home-page "https://github.com/nose-devs/nose2")
1753 (synopsis "Next generation of nicer testing for Python")
1754 (description
1755 "Nose2 is the next generation of nicer testing for Python, based on the
1756 plugins branch of unittest2. Nose2 aims to improve on nose by providing a
1757 better plugin api, being easier for users to configure, and simplifying internal
1758 interfaces and processes.")
1759 (license license:bsd-2)))
1760
1761 (define-public python2-nose2
1762 (package-with-python2 python-nose2))
1763
1764 (define-public python-unittest2
1765 (package
1766 (name "python-unittest2")
1767 (version "0.5.1")
1768 (source
1769 (origin
1770 (method url-fetch)
1771 (uri (string-append
1772 "https://pypi.python.org/packages/source/u/unittest2py3k/unittest2py3k-"
1773 version ".tar.gz"))
1774 (sha256
1775 (base32
1776 "00yl6lskygcrddx5zspkhr0ibgvpknl4678kkm6s626539grq93q"))))
1777 (build-system python-build-system)
1778 (home-page "http://pypi.python.org/pypi/unittest2")
1779 (synopsis "Python unit testing library")
1780 (description
1781 "Unittest2 is a replacement for the unittest module in the Python
1782 standard library.")
1783 (license license:psfl)))
1784
1785 (define-public python2-unittest2
1786 (package (inherit python-unittest2)
1787 (name "python2-unittest2")
1788 (version "0.5.1")
1789 (source
1790 (origin
1791 (method url-fetch)
1792 (uri (string-append
1793 "https://pypi.python.org/packages/source/u/unittest2/unittest2-"
1794 version ".tar.gz"))
1795 (sha256
1796 (base32
1797 "0wbs4i4x3x7klr3v35ss6p9mcqz883i1xgcpkhvl7n2lyv6yhpda"))))
1798 (arguments
1799 `(#:python ,python-2
1800 #:tests? #f)))) ; no setup.py test command
1801
1802 (define-public python-pafy
1803 (package
1804 (name "python-pafy")
1805 (version "0.5.3.1")
1806 (source
1807 (origin
1808 (method url-fetch)
1809 (uri (pypi-uri "pafy" version))
1810 (sha256
1811 (base32
1812 "1a7dxi95m1043rxx1r5x3ngb66nwlq6aqcasyqqjzmmmjps4zrim"))))
1813 (build-system python-build-system)
1814 (arguments
1815 `(#:tests? #f)) ; Currently pafy can not find itself in the tests
1816 (propagated-inputs
1817 ;; Youtube-dl is a python package which is imported in the file
1818 ;; "backend_youtube_dl.py", therefore it needs to be propagated.
1819 `(("youtube-dl" ,youtube-dl)))
1820 (home-page "https://np1.github.io/pafy/")
1821 (synopsis "Retrieve YouTube content and metadata")
1822 (description
1823 "@code{pafy} is a python library to retrieve YouTube content and metadata.")
1824 (license license:lgpl3+)))
1825
1826 (define-public python-py
1827 (package
1828 (name "python-py")
1829 (version "1.4.32")
1830 (source
1831 (origin
1832 (method url-fetch)
1833 (uri (pypi-uri "py" version))
1834 (sha256
1835 (base32
1836 "19s1pql9pq85h1qzsdwgyb8a3k1qgkvh33b02m8kfqhizz8rzf64"))))
1837 (build-system python-build-system)
1838 (arguments
1839 ;; FIXME: "ImportError: 'test' module incorrectly imported from
1840 ;; '/gnu/store/...-python-pytest-mimimal-3.0.5/lib/python3.5/site-packages'.
1841 ;; Expected '/tmp/guix-build-python-py-1.4.31.drv-0/py-1.4.31/py'.
1842 ;; Is this module globally installed?"
1843 '(#:tests? #f))
1844 (home-page "http://pylib.readthedocs.org/")
1845 (synopsis "Python library for parsing, I/O, instrospection, and logging")
1846 (description
1847 "Py is a Python library for file name parsing, .ini file parsing, I/O,
1848 code introspection, and logging.")
1849 (license license:expat)))
1850
1851 (define-public python2-py
1852 (package-with-python2 python-py))
1853
1854 (define-public python-pytest
1855 (package
1856 (name "python-pytest")
1857 (version "2.7.3")
1858 (source
1859 (origin
1860 (method url-fetch)
1861 (uri (string-append
1862 "https://pypi.python.org/packages/source/p/pytest/pytest-"
1863 version ".tar.gz"))
1864 (sha256
1865 (base32
1866 "1z4yi986f9n0p8qmzmn21m21m8j1x78hk3505f89baqm6pdw7afm"))
1867 (modules '((guix build utils)))
1868 (snippet
1869 ;; One of the tests involves the /usr directory, so it fails.
1870 '(substitute* "testing/test_argcomplete.py"
1871 (("def test_remove_dir_prefix\\(self\\):")
1872 "@pytest.mark.xfail\n def test_remove_dir_prefix(self):")))))
1873 (build-system python-build-system)
1874 (propagated-inputs
1875 `(("python-py" ,python-py)))
1876 (native-inputs
1877 `(("python-nose" ,python-nose)
1878 ("python-mock" ,python-mock)))
1879 (home-page "http://pytest.org")
1880 (synopsis "Python testing library")
1881 (description
1882 "Pytest is a testing tool that provides auto-discovery of test modules
1883 and functions, detailed info on failing assert statements, modular fixtures,
1884 and many external plugins.")
1885 (license license:expat)))
1886
1887 (define-public python2-pytest
1888 (package-with-python2 python-pytest))
1889
1890 ;; Some packages require a newer pytest.
1891 (define-public python-pytest-3.0
1892 (package
1893 (inherit python-pytest)
1894 (name "python-pytest")
1895 (version "3.0.7")
1896 (source (origin
1897 (method url-fetch)
1898 (uri (pypi-uri "pytest" version))
1899 (sha256
1900 (base32
1901 "1asc4b2nd2a4f0g3r12y97rslq5wliji7b73wwkvdrm5s7mrc1mp"))))
1902 (arguments
1903 `(#:phases
1904 (modify-phases %standard-phases
1905 (add-before 'check 'disable-invalid-test
1906 (lambda _
1907 (substitute* "testing/test_argcomplete.py"
1908 (("def test_remove_dir_prefix" line)
1909 (string-append "@pytest.mark.skip"
1910 "(reason=\"Assumes that /usr exists.\")\n "
1911 line)))
1912 #t)))))
1913 (native-inputs
1914 `(("python-nose" ,python-nose)
1915 ("python-mock" ,python-mock)
1916 ("python-hypothesis" ,python-hypothesis)))
1917 (properties `((python2-variant . ,(delay python2-pytest-3.0))))))
1918
1919 (define-public python2-pytest-3.0
1920 (let ((base (package-with-python2
1921 (strip-python2-variant python-pytest-3.0))))
1922 (package (inherit base)
1923 (native-inputs
1924 `(("python2-enum34" ,python2-enum34)
1925 ,@(package-native-inputs base))))))
1926
1927 (define-public python-pytest-cov
1928 (package
1929 (name "python-pytest-cov")
1930 (version "2.4.0")
1931 (source
1932 (origin
1933 (method url-fetch)
1934 (uri (pypi-uri "pytest-cov" version))
1935 (sha256
1936 (base32
1937 "03c2qc42r4bczyw93gd7n0qi1h1jfhw7fnbhi33c3vp1hs81gm2k"))))
1938 (build-system python-build-system)
1939 (arguments
1940 `(#:phases
1941 (modify-phases %standard-phases
1942 (replace 'check
1943 (lambda _
1944 ;; options taken from tox.ini
1945 ;; TODO: make "--restructuredtext" tests pass. They currently fail
1946 ;; with "Duplicate implicit target name"
1947 (zero? (system* "python" "./setup.py" "check"
1948 "--strict" "--metadata")))))))
1949 (propagated-inputs
1950 `(("python-coverage" ,python-coverage)
1951 ("python-pytest" ,python-pytest)))
1952 (home-page "https://github.com/pytest-dev/pytest-cov")
1953 (synopsis "Pytest plugin for measuring coverage")
1954 (description
1955 "Pytest-cov produces coverage reports. It supports centralised testing and
1956 distributed testing in both @code{load} and @code{each} modes. It also
1957 supports coverage of subprocesses.")
1958 (license license:expat)))
1959
1960 (define-public python2-pytest-cov
1961 (package-with-python2 python-pytest-cov))
1962
1963 (define-public python-pytest-runner
1964 (package
1965 (name "python-pytest-runner")
1966 (version "2.11.1")
1967 (source
1968 (origin
1969 (method url-fetch)
1970 (uri (pypi-uri "pytest-runner" version))
1971 (sha256
1972 (base32
1973 "1cw978kqqcq916b9gfns1qjqvg33c5ail5jhw9054dsynkm32flq"))))
1974 (build-system python-build-system)
1975 (arguments
1976 `(#:phases
1977 (modify-phases %standard-phases
1978 ;; The fancy way of setting the version with setuptools_scm does not
1979 ;; seem to work here.
1980 (add-after 'unpack 'set-version
1981 (lambda _
1982 (substitute* "docs/conf.py"
1983 (("version = setuptools_scm\\.get_version\\(root='\\.\\.')")
1984 (string-append "version = \"" ,version "\"")))
1985 #t)))))
1986 (native-inputs
1987 `(("python-pytest" ,python-pytest)
1988 ("python-setuptools-scm" ,python-setuptools-scm)))
1989 (home-page "https://github.com/pytest-dev/pytest-runner")
1990 (synopsis "Invoke py.test as a distutils command")
1991 (description
1992 "This package provides a @command{pytest-runner} command that
1993 @file{setup.py} files can use to run tests.")
1994 (license license:expat)))
1995
1996 (define-public python2-pytest-runner
1997 (package-with-python2 python-pytest-runner))
1998
1999 (define-public python-pytest-mock
2000 (package
2001 (name "python-pytest-mock")
2002 (version "1.2")
2003 (source
2004 (origin
2005 (method url-fetch)
2006 (uri (pypi-uri "pytest-mock" version ".zip"))
2007 (sha256
2008 (base32
2009 "03zxar5drzm7ksqyrwypjaza3cri6wqvpr6iam92djvg6znp32gp"))))
2010 (build-system python-build-system)
2011 (native-inputs
2012 `(("unzip" ,unzip)))
2013 (propagated-inputs
2014 `(("python-pytest" ,python-pytest)))
2015 (home-page "https://github.com/pytest-dev/pytest-mock/")
2016 (synopsis "Thin-wrapper around the mock package for easier use with py.test")
2017 (description
2018 "This plugin installs a @code{mocker} fixture which is a thin-wrapper
2019 around the patching API provided by the @code{mock} package, but with the
2020 benefit of not having to worry about undoing patches at the end of a test.
2021 The mocker fixture has the same API as @code{mock.patch}, supporting the
2022 same arguments.")
2023 (properties `((python2-variant . ,(delay python2-pytest-mock))))
2024 (license license:expat)))
2025
2026 (define-public python2-pytest-mock
2027 (let ((base (package-with-python2
2028 (strip-python2-variant python-pytest-mock))))
2029 (package (inherit base)
2030 (propagated-inputs
2031 `(("python2-mock" ,python2-mock)
2032 ,@(package-propagated-inputs base))))))
2033
2034 (define-public python-pytest-xdist
2035 (package
2036 (name "python-pytest-xdist")
2037 (version "1.14")
2038 (source
2039 (origin
2040 (method url-fetch)
2041 (uri (pypi-uri "pytest-xdist" version ".zip"))
2042 (sha256
2043 (base32
2044 "08rn2l39ds60xshs4js787l84pfckksqklfq2wq9x8ig2aci2pja"))
2045 (modules '((guix build utils)))
2046 (snippet
2047 '(begin
2048 ;; Remove pre-compiled .pyc files from source.
2049 (for-each delete-file-recursively
2050 (find-files "." "__pycache__" #:directories? #t))
2051 (for-each delete-file (find-files "." "\\.pyc$"))
2052 #t))))
2053 (build-system python-build-system)
2054 (arguments
2055 '(#:tests? #f)) ;FIXME: Some tests are failing.
2056 ;; #:phases
2057 ;; (modify-phases %standard-phases
2058 ;; (delete 'check)
2059 ;; (add-after 'install 'check
2060 ;; (lambda* (#:key inputs outputs #:allow-other-keys)
2061 ;; (add-installed-pythonpath inputs outputs)
2062 ;; (zero? (system* "py.test" "-v")))))
2063 (native-inputs
2064 `(("unzip" ,unzip)
2065 ("python-setuptools-scm" ,python-setuptools-scm)))
2066 (propagated-inputs
2067 `(("python-execnet" ,python-execnet)
2068 ("python-pytest" ,python-pytest)
2069 ("python-py" ,python-py)))
2070 (home-page
2071 "https://github.com/pytest-dev/pytest-xdist")
2072 (synopsis
2073 "Plugin for py.test with distributed testing and loop-on-failing modes")
2074 (description
2075 "The pytest-xdist plugin extends py.test with some unique test execution
2076 modes: parallelization, running tests in boxed subprocesses, the ability
2077 to run tests repeatedly when failed, and the ability to run tests on multiple
2078 Python interpreters or platforms. It uses rsync to copy the existing
2079 program code to a remote location, executes there, and then syncs the
2080 result back.")
2081 (license license:expat)))
2082
2083 (define-public python2-pytest-xdist
2084 (package-with-python2 python-pytest-xdist))
2085
2086 (define-public python-scripttest
2087 (package
2088 (name "python-scripttest")
2089 (version "1.3")
2090 (source
2091 (origin
2092 (method url-fetch)
2093 (uri (string-append
2094 "https://pypi.python.org/packages/source/s/scripttest/scripttest-"
2095 version ".tar.gz"))
2096 (sha256
2097 (base32
2098 "0f4w84k8ck82syys7yg9maz93mqzc8p5ymis941x034v44jzq74m"))))
2099 (build-system python-build-system)
2100 (native-inputs
2101 `(("python-pytest" ,python-pytest)))
2102 (home-page "http://pythonpaste.org/scripttest/")
2103 (synopsis "Python library to test command-line scripts")
2104 (description "Scripttest is a Python helper library for testing
2105 interactive command-line applications. With it you can run a script in a
2106 subprocess and see the output as well as any file modifications.")
2107 (license license:expat)))
2108
2109 (define-public python2-scripttest
2110 (package-with-python2 python-scripttest))
2111
2112 (define-public python-testtools
2113 (package
2114 (name "python-testtools")
2115 (version "1.4.0")
2116 (source
2117 (origin
2118 (method url-fetch)
2119 (uri (pypi-uri "testtools" version))
2120 (sha256
2121 (base32
2122 "1vw8yljnd75d396hhw6s2hrf4cclzy845ifd5am0lxsl235z3i8c"))))
2123 (build-system python-build-system)
2124 (arguments
2125 `(#:phases
2126 (modify-phases %standard-phases
2127 (add-after 'unpack 'fix-module-imports
2128 (lambda _
2129 (substitute* "setup.py"
2130 (("'unittest2>=0.8.0',") ""))
2131 (substitute* '("testtools/testcase.py"
2132 "testtools/testsuite.py"
2133 "testtools/run.py"
2134 "testtools/tests/test_run.py"
2135 "testtools/tests/test_testsuite.py"
2136 "testtools/tests/test_deferredruntest.py")
2137 ;; unittest2 is a backport of Python2.7 features to Python 2.4.
2138 (("import unittest2 as unittest") "import unittest")
2139 (("import unittest2") "import unittest as unittest2")
2140 (("from unittest2 import") "from unittest import"))
2141 (substitute* "testtools/tests/test_testresult.py"
2142 ;; NUL in source code is not allowed (raises ValueError).
2143 (("\\x00\\x04") "\\x04"))
2144 #t)))))
2145 (propagated-inputs
2146 `(("python-mimeparse" ,python-mimeparse)
2147 ("python-extras" ,python-extras)))
2148 (home-page "https://github.com/testing-cabal/testtools")
2149 (synopsis
2150 "Extensions to the Python standard library unit testing framework")
2151 (description
2152 "Testtools extends the Python standard library unit testing framework to
2153 provide matchers, more debugging information, and cross-Python
2154 compatibility.")
2155 (license license:psfl)))
2156
2157 (define-public python2-testtools
2158 (package-with-python2 python-testtools))
2159
2160 (define-public python-testscenarios
2161 (package
2162 (name "python-testscenarios")
2163 (version "0.4")
2164 (source
2165 (origin
2166 (method url-fetch)
2167 (uri (string-append
2168 "https://pypi.python.org/packages/source/t/testscenarios/testscenarios-"
2169 version ".tar.gz"))
2170 (sha256
2171 (base32
2172 "1671jvrvqlmbnc42j7pc5y6vc37q44aiwrq0zic652pxyy2fxvjg"))))
2173 (build-system python-build-system)
2174 (propagated-inputs
2175 `(("python-testtools" ,python-testtools)))
2176 (home-page "https://launchpad.net/testscenarios")
2177 (synopsis "Pyunit extension for dependency injection")
2178 (description
2179 "Testscenarios provides clean dependency injection for Python unittest
2180 style tests.")
2181 (license (list license:bsd-3 license:asl2.0)))) ; at the user's option
2182
2183 (define-public python2-testscenarios
2184 (package-with-python2 python-testscenarios))
2185
2186 (define-public python-testresources
2187 (package
2188 (name "python-testresources")
2189 (version "0.2.7")
2190 (source
2191 (origin
2192 (method url-fetch)
2193 (uri (string-append
2194 "https://pypi.python.org/packages/source/t/testresources/testresources-"
2195 version ".tar.gz"))
2196 (sha256
2197 (base32
2198 "0cbj3plbllyz42c4b5xxgwaa7mml54lakslrn4kkhinxhdri22md"))))
2199 (build-system python-build-system)
2200 (home-page "https://launchpad.net/testresources")
2201 (synopsis
2202 "Pyunit extension for managing test resources")
2203 (description
2204 "Testresources is an extension to Python's unittest to allow declarative
2205 use of resources by test cases.")
2206 (license (list license:bsd-3 license:asl2.0)))) ; at the user's option
2207
2208 (define-public python2-testresources
2209 (package-with-python2 python-testresources))
2210
2211 (define-public python-subunit
2212 (package
2213 (name "python-subunit")
2214 (version "0.0.21")
2215 (source
2216 (origin
2217 (method url-fetch)
2218 (uri (string-append
2219 "https://pypi.python.org/packages/source/p/python-subunit/python-subunit-"
2220 version ".tar.gz"))
2221 (sha256
2222 (base32
2223 "1nkw9wfbvizmpajbj3in8ns07g7lwkiv8hip14jjlwk3cacls6jv"))))
2224 (build-system python-build-system)
2225 (propagated-inputs
2226 `(("python-extras" ,python-extras)
2227 ("python-mimeparse" ,python-mimeparse)))
2228 (native-inputs
2229 `(("python-testscenarios" ,python-testscenarios)))
2230 (home-page "http://launchpad.net/subunit")
2231 (synopsis "Python implementation of the subunit protocol")
2232 (description
2233 "Python-subunit is a Python implementation of the subunit test streaming
2234 protocol.")
2235 (license (list license:bsd-3 license:asl2.0)))) ; at the user's option
2236
2237 (define-public python2-subunit
2238 (package-with-python2 python-subunit))
2239
2240 ;; Recent versions of python-fixtures and python-testrepository need
2241 ;; python-pbr for packaging, which itself needs these two packages for
2242 ;; testing.
2243 ;; To fix this circular dependency, we use a build of python-pbr, based on the
2244 ;; same source, just without any test dependencies and with tests disabled.
2245 ;; python-pbr-minmal is then used to package python-fixtures and
2246 ;; python-testrepository.
2247 ;; Strictly speaking we currently could remove the test-requirements from the
2248 ;; normal python-pbr package (and save this package) since test are disabled
2249 ;; there anyway. But this may change in future.
2250 (define python-pbr-minimal
2251 (package
2252 (name "python-pbr-minimal")
2253 (version "1.10.0")
2254 (source
2255 (origin
2256 (method url-fetch)
2257 (uri (pypi-uri "pbr" version))
2258 (sha256
2259 (base32
2260 "177kd9kbv1hvf2ban7l3x9ymzbi1md4hkaymwbgnz7ihf312hr0q"))
2261 (patches (search-patches "python-pbr-fix-man-page-support.patch"))))
2262 (build-system python-build-system)
2263 (arguments
2264 `(#:tests? #f))
2265 (home-page "http://docs.openstack.org/developer/pbr/")
2266 (synopsis "Minimal build of python-pbr used for bootstrapping")
2267 (description
2268 "Used only for bootstrapping python2-pbr, you should not need this.")
2269 (license license:asl2.0)))
2270
2271 (define python2-pbr-minimal
2272 (package-with-python2 python-pbr-minimal))
2273
2274 (define-public python-pbr
2275 (package
2276 (inherit python-pbr-minimal)
2277 (name "python-pbr")
2278 (arguments
2279 `(#:tests? #f)) ;; Most tests seem to use the Internet.
2280 (propagated-inputs
2281 `(("git" ,git))) ;; pbr actually uses the "git" binary.
2282 (native-inputs
2283 `(("python-fixtures" ,python-fixtures)
2284 ;; discover, coverage, hacking, subunit
2285 ("python-mock" ,python-mock)
2286 ("python-six" ,python-six)
2287 ("python-sphinx" ,python-sphinx)
2288 ("python-testrepository" ,python-testrepository)
2289 ("python-testresources" ,python-testresources)
2290 ("python-testscenarios" ,python-testscenarios)
2291 ("python-testtools" ,python-testtools)
2292 ("python-virtualenv" ,python-virtualenv)))
2293 (synopsis "Enhance the default behavior of Python’s setuptools")
2294 (description
2295 "Python Build Reasonableness (PBR) is a library that injects some useful
2296 and sensible default behaviors into your setuptools run. It will set
2297 versions, process requirements files and generate AUTHORS and ChangeLog file
2298 from git information.
2299 ")))
2300
2301 (define-public python2-pbr
2302 (package-with-python2 python-pbr))
2303
2304 (define-public python-fixtures
2305 (package
2306 (name "python-fixtures")
2307 (version "1.4.0")
2308 (source
2309 (origin
2310 (method url-fetch)
2311 (uri (pypi-uri "fixtures" version))
2312 (sha256
2313 (base32
2314 "0djxvdwm8s60dbfn7bhf40x6g818p3b3mlwijm1c3bqg7msn271y"))))
2315 (build-system python-build-system)
2316 (arguments
2317 '(#:phases
2318 (modify-phases %standard-phases
2319 (replace 'check
2320 (lambda _
2321 (zero? (system* "python" "-m" "testtools.run"
2322 "fixtures.test_suite")))))))
2323 (propagated-inputs
2324 `(("python-six" ,python-six)))
2325 (native-inputs
2326 `(("python-mock" ,python-mock)
2327 ("python-pbr-minimal" ,python-pbr-minimal)
2328 ("python-testtools" ,python-testtools)))
2329 (home-page "https://launchpad.net/python-fixtures")
2330 (synopsis "Python test fixture library")
2331 (description
2332 "Fixtures provides a way to create reusable state, useful when writing
2333 Python tests.")
2334 (license (list license:bsd-3 license:asl2.0)))) ; at user's option
2335
2336 (define-public python2-fixtures
2337 (package-with-python2 python-fixtures))
2338
2339 (define-public python-testrepository
2340 (package
2341 (name "python-testrepository")
2342 (version "0.0.20")
2343 (source
2344 (origin
2345 (method url-fetch)
2346 (uri (string-append
2347 "https://pypi.python.org/packages/source/t/testrepository/testrepository-"
2348 version ".tar.gz"))
2349 (sha256
2350 (base32
2351 "1ssqb07c277010i6gzzkbdd46gd9mrj0bi0i8vn560n2k2y4j93m"))))
2352 (build-system python-build-system)
2353 (arguments
2354 ;; FIXME: Many tests are failing.
2355 '(#:tests? #f))
2356 (propagated-inputs
2357 `(("python-fixtures" ,python-fixtures)
2358 ("python-subunit" ,python-subunit)
2359 ("python-testtools" ,python-testtools)))
2360 (native-inputs
2361 `(("python-pbr-minimal" ,python-pbr-minimal) ;; same as for building fixture
2362 ("python-mimeparse" ,python-mimeparse)))
2363 (home-page "https://launchpad.net/testrepository")
2364 (synopsis "Database for Python test results")
2365 (description "Testrepository provides a database of test results which can
2366 be used as part of a developer's workflow to check things such as what tests
2367 have failed since the last commit or what tests are currently failing.")
2368 (license (list license:bsd-3 license:asl2.0)))) ; at user's option
2369
2370 (define-public python2-testrepository
2371 (package-with-python2 python-testrepository))
2372
2373 (define-public python-coverage
2374 (package
2375 (name "python-coverage")
2376 (version "4.1")
2377 (source
2378 (origin
2379 (method url-fetch)
2380 (uri (pypi-uri "coverage" version))
2381 (sha256
2382 (base32
2383 "01rbr4br4lsk0lwn8fb96zwd2xr4f0mg1w7iq3j11i8f5ig2nqs1"))))
2384 (build-system python-build-system)
2385 (arguments
2386 ;; FIXME: 95 tests failed, 539 passed, 6 skipped, 2 errors.
2387 '(#:tests? #f))
2388 (home-page "http://nedbatchelder.com/code/coverage")
2389 (synopsis "Code coverage measurement for Python")
2390 (description
2391 "Coverage measures code coverage, typically during test execution. It
2392 uses the code analysis tools and tracing hooks provided in the Python standard
2393 library to determine which lines are executable, and which have been
2394 executed.")
2395 (license license:bsd-3)))
2396
2397 (define-public python2-coverage
2398 (package-with-python2 python-coverage))
2399
2400 (define-public python-cov-core
2401 (package
2402 (name "python-cov-core")
2403 (version "1.15.0")
2404 (source
2405 (origin
2406 (method url-fetch)
2407 (uri (pypi-uri "cov-core" version))
2408 (sha256
2409 (base32
2410 "0k3np9ymh06yv1ib96sb6wfsxjkqhmik8qfsn119vnhga9ywc52a"))))
2411 (build-system python-build-system)
2412 (propagated-inputs
2413 `(("python-coverage" ,python-coverage)))
2414 (home-page "https://github.com/schlamar/cov-core")
2415 (synopsis "Coverage plugin core for pytest-cov, nose-cov and nose2-cov")
2416 (description
2417 "This is a library package for use by @code{pytest-cov}, @code{nose-cov}
2418 and @code{nose2-cov}. It is useful for developing coverage plugins for these
2419 testing frameworks.")
2420 (license license:expat)))
2421
2422 (define-public python2-cov-core
2423 (package-with-python2 python-cov-core))
2424
2425 (define-public python-discover
2426 (package
2427 (name "python-discover")
2428 (version "0.4.0")
2429 (source
2430 (origin
2431 (method url-fetch)
2432 (uri (string-append
2433 "https://pypi.python.org/packages/source/d/discover/discover-"
2434 version ".tar.gz"))
2435 (sha256
2436 (base32
2437 "0y8d0zwiqar51kxj8lzmkvwc3b8kazb04gk5zcb4nzg5k68zmhq5"))))
2438 (build-system python-build-system)
2439 (home-page "http://pypi.python.org/pypi/discover/")
2440 (synopsis
2441 "Python test discovery for unittest")
2442 (description
2443 "Discover provides test discovery for unittest, a feature that has been
2444 backported from Python 2.7 for Python 2.4+.")
2445 (license license:bsd-3)))
2446
2447 (define-public python2-discover
2448 (package-with-python2 python-discover))
2449
2450 (define-public behave
2451 (package
2452 (name "behave")
2453 (version "1.2.5")
2454 (source (origin
2455 (method url-fetch)
2456 (uri (pypi-uri "behave" version ".tar.bz2"))
2457 (sha256
2458 (base32
2459 "1iypp6z46r19n4xmgx6m1lwmlpfjh8vapq8izigrqlaarvp2y64c"))))
2460 (build-system python-build-system)
2461 (propagated-inputs
2462 `(("python-six" ,python-six)
2463 ("python-parse" ,python-parse)
2464 ("python-parse-type" ,python-parse-type)))
2465 (arguments `(#:tests? #f)) ;TODO: tests require nose>=1.3 and
2466 ;PyHamcrest>=1.8
2467 (home-page "https://github.com/behave/behave")
2468 (synopsis "Python behavior-driven development")
2469 (description
2470 "Behave is a tool for behavior-driven development in python.
2471 Behavior-driven development (or BDD) is an agile software development
2472 technique that encourages collaboration between developers, QA and
2473 non-technical or business participants in a software project. Behave uses
2474 tests written in a natural language style, backed up by Python code.")
2475 (license license:x11)))
2476
2477 (define-public python-exif-read
2478 (package
2479 (name "python-exif-read")
2480 (version "2.1.2")
2481 (source (origin
2482 (method url-fetch)
2483 (uri (pypi-uri "ExifRead" version))
2484 (sha256
2485 (base32
2486 "1b90jf6m9vxh9nanhpyvqdq7hmfx5iggw1l8kq10jrs6xgr49qkr"))))
2487 (build-system python-build-system)
2488 (arguments `(#:tests? #f)) ; no tests
2489 (home-page "https://github.com/ianare/exif-py")
2490 (synopsis "Python library to extract EXIF data from image files")
2491 (description
2492 "ExifRead is a Python library to extract EXIF data from tiff and jpeg
2493 files.")
2494 (license license:bsd-3)))
2495
2496 (define-public python2-exif-read
2497 (package-with-python2 python-exif-read))
2498
2499 (define-public python-pyld
2500 (package
2501 (name "python-pyld")
2502 (version "0.7.1")
2503 (source (origin
2504 (method url-fetch)
2505 (uri (pypi-uri "PyLD" version))
2506 (sha256
2507 (base32
2508 "1m0fs6897vxfkf7awah5i66i7b7smm5fnywf1w50fpzyfbfhr156"))))
2509 (build-system python-build-system)
2510 (arguments `(#:tests? #f)) ; no tests
2511 (home-page "https://github.com/digitalbazaar/pyld")
2512 (synopsis "Python implementation of the JSON-LD specification")
2513 (description
2514 "PyLD is an implementation of the JSON-LD specification.")
2515 (license license:bsd-3)))
2516
2517 (define-public python2-pyld
2518 (package-with-python2 python-pyld))
2519
2520 (define-public python-certifi
2521 (package
2522 (name "python-certifi")
2523 (version "2017.1.23")
2524 (source (origin
2525 (method url-fetch)
2526 (uri (pypi-uri "certifi" version))
2527 (sha256
2528 (base32
2529 "1klrzl3hgvcf2mjk00g0k3kk1p2z27vzwnxivwar4vhjmjvpz1w1"))))
2530 (build-system python-build-system)
2531 (home-page "https://certifi.io/")
2532 (synopsis "Python CA certificate bundle")
2533 (description
2534 "Certifi is a Python library that contains a CA certificate bundle, which
2535 is used by the Requests library to verify HTTPS requests.")
2536 (license license:asl2.0)))
2537
2538 (define-public python2-certifi
2539 (package-with-python2 python-certifi))
2540
2541 (define-public python-click
2542 (package
2543 (name "python-click")
2544 (version "6.7")
2545 (source
2546 (origin
2547 (method url-fetch)
2548 (uri (pypi-uri "click" version))
2549 (sha256
2550 (base32
2551 "02qkfpykbq35id8glfgwc38yc430427yd05z1wc5cnld8zgicmgi"))))
2552 (build-system python-build-system)
2553 (arguments
2554 `(#:phases
2555 (modify-phases %standard-phases
2556 (add-after 'unpack 'fix-paths
2557 (lambda* (#:key inputs #:allow-other-keys)
2558 (let ((glibc (assoc-ref inputs ,(if (%current-target-system)
2559 "cross-libc" "libc"))))
2560 (substitute* "click/_unicodefun.py"
2561 (("'locale'")
2562 (string-append "'" glibc "/bin/locale'"))))
2563 #t))
2564 (replace 'check
2565 (lambda _
2566 (zero? (system* "make" "test")))))))
2567 (native-inputs
2568 `(("python-pytest" ,python-pytest)))
2569 (home-page "http://click.pocoo.org")
2570 (synopsis "Command line library for Python")
2571 (description
2572 "Click is a Python package for creating command line interfaces in a
2573 composable way with as little code as necessary. Its name stands for
2574 \"Command Line Interface Creation Kit\". It's highly configurable but comes
2575 with sensible defaults out of the box.")
2576 (license license:bsd-3)))
2577
2578 (define-public python2-click
2579 (package-with-python2 python-click))
2580
2581 (define-public python-wheel
2582 (package
2583 (name "python-wheel")
2584 (version "0.30.0a0")
2585 (source
2586 (origin
2587 (method url-fetch)
2588 (uri (pypi-uri "wheel" version))
2589 (sha256
2590 (base32
2591 "1nm6mn8isny0hr86rhbfrpfj867c0phf001xgsd69xfp9ady1wwq"))))
2592 (build-system python-build-system)
2593 (native-inputs
2594 `(("python-jsonschema" ,python-jsonschema)
2595 ("python-pytest-cov" ,python-pytest-cov)))
2596 (home-page "https://bitbucket.org/pypa/wheel/")
2597 (synopsis "Format for built Python packages")
2598 (description
2599 "A wheel is a ZIP-format archive with a specially formatted filename and
2600 the @code{.whl} extension. It is designed to contain all the files for a PEP
2601 376 compatible install in a way that is very close to the on-disk format. Many
2602 packages will be properly installed with only the @code{Unpack} step and the
2603 unpacked archive preserves enough information to @code{Spread} (copy data and
2604 scripts to their final locations) at any later time. Wheel files can be
2605 installed with a newer @code{pip} or with wheel's own command line utility.")
2606 (license license:expat)
2607 (properties `((python2-variant . ,(delay python2-wheel))))))
2608
2609 (define-public python2-wheel
2610 (let ((wheel (package-with-python2
2611 (strip-python2-variant python-wheel))))
2612 (package (inherit wheel)
2613 (native-inputs `(("python2-functools32" ,python2-functools32)
2614 ,@(package-native-inputs wheel))))))
2615
2616
2617 (define-public python-requests
2618 (package
2619 (name "python-requests")
2620 (version "2.13.0")
2621 (source (origin
2622 (method url-fetch)
2623 (uri (pypi-uri "requests" version))
2624 (sha256
2625 (base32
2626 "1s0wg4any4dsv5l3hqjxqk2zgb7pdbqhy9rhc8kh3aigfq4ws8jp"))))
2627 ;; TODO: unbundle urllib3 and chardet.
2628 (build-system python-build-system)
2629 (arguments
2630 ;; FIXME: Some tests require network access.
2631 '(#:tests? #f))
2632 (home-page "http://python-requests.org/")
2633 (synopsis "Python HTTP library")
2634 (description
2635 "Requests is a Python HTTP client library. It aims to be easier to use
2636 than Python’s urllib2 library.")
2637 (license license:asl2.0)))
2638
2639 ;; Some software requires an older version of Requests, notably Docker
2640 ;; Compose.
2641 (define-public python-requests-2.7
2642 (package (inherit python-requests)
2643 (version "2.7.0")
2644 (source (origin
2645 (method url-fetch)
2646 (uri (pypi-uri "requests" version))
2647 (sha256
2648 (base32
2649 "0gdr9dxm24amxpbyqpbh3lbwxc2i42hnqv50sigx568qssv3v2ir"))))))
2650
2651 (define-public python2-requests
2652 (package-with-python2 python-requests))
2653
2654 (define-public python-vcversioner
2655 (package
2656 (name "python-vcversioner")
2657 (version "2.16.0.0")
2658 (source
2659 (origin
2660 (method url-fetch)
2661 (uri (pypi-uri "vcversioner" version))
2662 (sha256
2663 (base32
2664 "16z10sm78jd7ca3jbkgc3q5i8a8q7y1h21q1li21yy3rlhbhrrns"))))
2665 (build-system python-build-system)
2666 (synopsis "Python library for version number discovery")
2667 (description "Vcversioner is a Python library that inspects tagging
2668 information in a variety of version control systems in order to discover
2669 version numbers.")
2670 (home-page "https://github.com/habnabit/vcversioner")
2671 (license license:isc)))
2672
2673 (define-public python2-vcversioner
2674 (package-with-python2 python-vcversioner))
2675
2676 (define-public python-jsonschema
2677 (package
2678 (name "python-jsonschema")
2679 (version "2.5.1")
2680 (source (origin
2681 (method url-fetch)
2682 (uri
2683 (string-append
2684 "https://pypi.python.org/packages/source/j/jsonschema/jsonschema-"
2685 version ".tar.gz"))
2686 (sha256
2687 (base32
2688 "0hddbqjm4jq63y8jf44nswina1crjs16l9snb6m3vvgyg31klrrn"))))
2689 (build-system python-build-system)
2690 (arguments
2691 '(#:phases
2692 (modify-phases %standard-phases
2693 (replace 'check (lambda _ (zero? (system* "nosetests")))))))
2694 (native-inputs
2695 `(("python-nose" ,python-nose)
2696 ("python-vcversioner" ,python-vcversioner)))
2697 (home-page "https://github.com/Julian/jsonschema")
2698 (synopsis "Implementation of JSON Schema for Python")
2699 (description
2700 "Jsonschema is an implementation of JSON Schema for Python.")
2701 (license license:expat)
2702 (properties `((python2-variant . ,(delay python2-jsonschema))))))
2703
2704 (define-public python2-jsonschema
2705 (let ((jsonschema (package-with-python2
2706 (strip-python2-variant python-jsonschema))))
2707 (package (inherit jsonschema)
2708 (native-inputs
2709 `(("python2-mock" ,python2-mock)
2710 ,@(package-native-inputs jsonschema)))
2711 (propagated-inputs
2712 `(("python2-functools32" ,python2-functools32))))))
2713
2714 (define-public python-schema
2715 (package
2716 (name "python-schema")
2717 (version "0.6.6")
2718 (source
2719 (origin
2720 (method url-fetch)
2721 (uri (pypi-uri "schema" version))
2722 (sha256
2723 (base32
2724 "1lw28j9w9vxyigg7vkfkvi6ic9lgjkdnfvnxdr7pklslqvzmk2vm"))))
2725 (build-system python-build-system)
2726 (native-inputs
2727 `(("python-pytest" ,python-pytest)))
2728 (home-page "https://github.com/keleshev/schema")
2729 (synopsis "Simple data validation library")
2730 (description
2731 "@code{python-schema} is a library for validating Python data
2732 structures, such as those obtained from config-files, forms, external
2733 services or command-line parsing, converted from JSON/YAML (or
2734 something else) to Python data-types.")
2735 (license license:psfl)))
2736
2737 (define-public python2-schema
2738 (package-with-python2 python-schema))
2739
2740 (define-public python-schema-0.5
2741 (package (inherit python-schema)
2742 (version "0.5.0")
2743 (source
2744 (origin
2745 (method url-fetch)
2746 (uri (pypi-uri "schema" version))
2747 (sha256
2748 (base32
2749 "10zqvpaky51kgb8nd42bk7jwl8cn2zvayxjpdc1wwmpybj92x67s"))))))
2750
2751 (define-public python2-schema-0.5
2752 (package-with-python2 python-schema-0.5))
2753
2754 (define-public python-kitchen
2755 (package
2756 (name "python-kitchen")
2757 (version "1.2.4")
2758 (source
2759 (origin
2760 (method url-fetch)
2761 (uri (pypi-uri "kitchen" version))
2762 (sha256
2763 (base32
2764 "0ggv3p4x8jvmmzhp0xm00h6pvh1g0gmycw71rjwagnrj8n23vxrq"))))
2765 (build-system python-build-system)
2766 (propagated-inputs
2767 `(("python-chardet" ,python-chardet)))
2768 (home-page "https://github.com/fedora-infra/kitchen")
2769 (synopsis "Python API for snippets")
2770 (description "@code{kitchen} module provides a python API for all sorts of
2771 little useful snippets of code that everybody ends up writing for their projects
2772 but never seem big enough to build an independent release. Use kitchen and stop
2773 cutting and pasting that code over and over.")
2774 (license (list license:lgpl2.1+
2775 ;; subprocess.py, test_subprocess.py,
2776 ;; kitchen/pycompat25/defaultdict.py:
2777 license:psfl))))
2778
2779 (define-public python2-kitchen
2780 (package-with-python2 python-kitchen))
2781
2782 (define-public python-unidecode
2783 (package
2784 (name "python-unidecode")
2785 (version "0.04.20")
2786 (source (origin
2787 (method url-fetch)
2788 (uri (pypi-uri "Unidecode" version))
2789 (sha256
2790 (base32
2791 "1q00i8gpsq3d9r0q8wk4b290fxl0kqlsdk7iadvli45in6s1hi7d"))))
2792 (build-system python-build-system)
2793 (home-page "https://pypi.python.org/pypi/Unidecode")
2794 (synopsis "ASCII transliterations of Unicode text")
2795 (description
2796 "Unidecode provides ASCII transliterations of Unicode text. Unidecode is
2797 useful when integrating with legacy code that doesn't support Unicode, or for
2798 ease of entry of non-Roman names on a US keyboard, or when constructing ASCII
2799 machine identifiers from human-readable Unicode strings that should still be
2800 somewhat intelligeble.")
2801 (license license:gpl2+)))
2802
2803 (define-public python2-unidecode
2804 (package-with-python2 python-unidecode))
2805
2806 (define-public python-pyjwt
2807 (package
2808 (name "python-pyjwt")
2809 (version "1.4.0")
2810 (source
2811 (origin
2812 (method url-fetch)
2813 (uri (pypi-uri "PyJWT" version))
2814 (sha256
2815 (base32
2816 "1556v2jppd8mjkkj66pxb5rcazm35jq81r233mdl8hfmz9n3icp1"))))
2817 (build-system python-build-system)
2818 (native-inputs
2819 `(("python-pytest" ,python-pytest)
2820 ("python-pytest-cov" ,python-pytest-cov)
2821 ("python-pytest-runner" ,python-pytest-runner)))
2822 (home-page "https://github.com/progrium/pyjwt")
2823 (synopsis "JSON Web Token implementation in Python")
2824 (description
2825 "PyJWT is a JSON Web Token implementation written in Python.")
2826 (license license:expat)))
2827
2828 (define-public python2-pyjwt
2829 (package-with-python2 python-pyjwt))
2830
2831 (define-public python-pykka
2832 (package
2833 (name "python-pykka")
2834 (version "1.2.1")
2835 (source
2836 (origin
2837 (method url-fetch)
2838 (uri (pypi-uri "Pykka" version))
2839 (sha256
2840 (base32
2841 "049w3r0mdnnw7xv19jiq7rvls9k7xs73x05b4qs5d6z4vvmgyiz8"))))
2842 (build-system python-build-system)
2843 (native-inputs
2844 `(("python-mock" ,python-mock)
2845 ("python-nose" ,python-nose)
2846 ("python-gevent" ,python-gevent)
2847 ("python-eventlet" ,python-eventlet)))
2848 (home-page "https://www.pykka.org/")
2849 (synopsis "Pykka is a Python implementation of the actor model")
2850 (description
2851 "Pykka is a Python implementation of the actor model.
2852 The actor model introduces some simple rules to control the sharing
2853 of state and cooperation between execution units, which makes it
2854 easier to build concurrent applications.")
2855 (license license:asl2.0)))
2856
2857 (define-public python2-pykka
2858 (package-with-python2 python-pykka))
2859
2860 (define-public python-oauthlib
2861 (package
2862 (name "python-oauthlib")
2863 (version "1.0.3")
2864 (source (origin
2865 (method url-fetch)
2866 (uri (pypi-uri "oauthlib" version))
2867 (sha256
2868 (base32
2869 "1bfrj70vdjxjw74khbyh6f0dksv7p5rh2346jnlrffyacd3gwjzg"))))
2870 (build-system python-build-system)
2871 (native-inputs
2872 `(("python-nose" ,python-nose)
2873 ("python-mock" ,python-mock)
2874 ("python-cryptography" ,python-cryptography)
2875 ("python-pyjwt" ,python-pyjwt)
2876 ("python-blinker" ,python-blinker)))
2877 (home-page "https://github.com/idan/oauthlib")
2878 (synopsis "OAuth implementation for Python")
2879 (description
2880 "Oauthlib is a generic, spec-compliant, thorough implementation of the
2881 OAuth request-signing logic.")
2882 (license license:bsd-3)
2883 (properties `((python2-variant . ,(delay python2-oauthlib))))))
2884
2885 (define-public python2-oauthlib
2886 (let ((base (package-with-python2 (strip-python2-variant python-oauthlib))))
2887 (package
2888 (inherit base)
2889 (native-inputs `(("python2-unittest2" ,python2-unittest2)
2890 ,@(package-native-inputs base))))))
2891
2892 (define-public python-itsdangerous
2893 (package
2894 (name "python-itsdangerous")
2895 (version "0.24")
2896 (source
2897 (origin
2898 (method url-fetch)
2899 (uri (string-append
2900 "https://pypi.python.org/packages/source/i/itsdangerous/itsdangerous-"
2901 version ".tar.gz"))
2902 (sha256
2903 (base32
2904 "06856q6x675ly542ig0plbqcyab6ksfzijlyf1hzhgg3sgwgrcyb"))))
2905 (build-system python-build-system)
2906 (home-page "https://github.com/mitsuhiko/itsdangerous")
2907 (synopsis "Python library for passing data to/from untrusted environments")
2908 (description
2909 "Itsdangerous provides various helpers to pass trusted data to untrusted
2910 environments and back.")
2911 (license license:bsd-3)))
2912
2913 (define-public python2-itsdangerous
2914 (package-with-python2 python-itsdangerous))
2915
2916 (define-public python-pyyaml
2917 (package
2918 (name "python-pyyaml")
2919 (version "3.12")
2920 (source
2921 (origin
2922 (method url-fetch)
2923 (uri (pypi-uri "PyYAML" version))
2924 (sha256
2925 (base32
2926 "1aqjl8dk9amd4zr99n8v2qxzgmr2hdvqfma4zh7a41rj6336c9sr"))))
2927 (build-system python-build-system)
2928 (inputs
2929 `(("libyaml" ,libyaml)))
2930 (home-page "http://pyyaml.org/wiki/PyYAML")
2931 (synopsis "YAML parser and emitter for Python")
2932 (description
2933 "PyYAML is a YAML parser and emitter for Python. PyYAML features a
2934 complete YAML 1.1 parser, Unicode support, pickle support, capable extension
2935 API, and sensible error messages. PyYAML supports standard YAML tags and
2936 provides Python-specific tags that allow to represent an arbitrary Python
2937 object.")
2938 (license license:expat)))
2939
2940 (define-public python2-pyyaml
2941 (package-with-python2 python-pyyaml))
2942
2943 (define-public python-virtualenv
2944 (package
2945 (name "python-virtualenv")
2946 (version "15.0.3")
2947 (source
2948 (origin
2949 (method url-fetch)
2950 (uri (pypi-uri "virtualenv" version))
2951 (sha256
2952 (base32
2953 "07cbajzk8l05k5zhlw0b9wbf2is65bl9v6zrn2a0iyn57w6pd73d"))))
2954 (build-system python-build-system)
2955 (arguments
2956 `(#:phases
2957 (modify-phases %standard-phases
2958 (replace 'check
2959 (lambda _
2960 ;; Disable failing test. See upstream bug report
2961 ;; https://github.com/pypa/virtualenv/issues/957
2962 (substitute* "tests/test_virtualenv.py"
2963 (("skipif.*") "skipif(True, reason=\"Guix\")\n"))
2964 (zero? (system* "py.test")))))))
2965 (native-inputs
2966 `(("python-mock" ,python-mock)
2967 ("python-pytest" ,python-pytest)))
2968 (home-page "https://virtualenv.pypa.io/")
2969 (synopsis "Virtual Python environment builder")
2970 (description
2971 "Virtualenv is a tool to create isolated Python environments.")
2972 (license license:expat)))
2973
2974 (define-public python2-virtualenv
2975 (package-with-python2 python-virtualenv))
2976
2977 (define-public python-markupsafe
2978 (package
2979 (name "python-markupsafe")
2980 (version "0.23")
2981 (source
2982 (origin
2983 (method url-fetch)
2984 (uri (string-append
2985 "https://pypi.python.org/packages/source/M/MarkupSafe/MarkupSafe-"
2986 version ".tar.gz"))
2987 (sha256
2988 (base32
2989 "1hvip33wva3fnmvfp9x5klqri7hpl1hkgqmjbss18nmrb7zimv54"))))
2990 (build-system python-build-system)
2991 (home-page "https://github.com/mitsuhiko/markupsafe")
2992 (synopsis "XML/HTML/XHTML markup safe string implementation for Python")
2993 (description
2994 "Markupsafe provides an XML/HTML/XHTML markup safe string implementation
2995 for Python.")
2996 (license license:bsd-3)))
2997
2998 (define-public python2-markupsafe
2999 (package-with-python2 python-markupsafe))
3000
3001 (define-public python-jinja2
3002 (package
3003 (name "python-jinja2")
3004 (version "2.8")
3005 (source
3006 (origin
3007 (method url-fetch)
3008 (uri (pypi-uri "Jinja2" version))
3009 (sha256
3010 (base32
3011 "1x0v41lp5m1pjix3l46zx02b7lqp2hflgpnxwkywxynvi3zz47xw"))))
3012 (build-system python-build-system)
3013 (propagated-inputs
3014 `(("python-markupsafe" ,python-markupsafe)))
3015 (home-page "http://jinja.pocoo.org/")
3016 (synopsis "Python template engine")
3017 (description
3018 "Jinja2 is a small but fast and easy to use stand-alone template engine
3019 written in pure Python.")
3020 (license license:bsd-3)))
3021
3022 (define-public python2-jinja2
3023 (package-with-python2 python-jinja2))
3024
3025 (define-public python-pystache
3026 (package
3027 (name "python-pystache")
3028 (version "0.5.4")
3029 (source (origin
3030 (method url-fetch)
3031 (uri (pypi-uri "pystache" version))
3032 (sha256
3033 (base32
3034 "0nmqsfmiw4arjxqkmf9z66ml950pcdjk6aq4gin4sywmzdjw5fzp"))))
3035 (build-system python-build-system)
3036 (arguments
3037 '(#:tests? #f)) ; FIXME: Python 3 tests are failing.
3038 (home-page "http://defunkt.io/pystache/")
3039 (synopsis "Python logic-less template engine")
3040 (description
3041 "Pystache is a Python implementation of the framework agnostic,
3042 logic-free templating system Mustache.")
3043 (license license:expat)
3044 (properties `((python2-variant . ,(delay python2-pystache))))))
3045
3046 (define-public python2-pystache
3047 (package (inherit (package-with-python2
3048 (strip-python2-variant python-pystache)))
3049 (arguments
3050 `(#:python ,python-2
3051 #:phases
3052 (modify-phases %standard-phases
3053 (replace 'check
3054 (lambda _
3055 (zero? (system* "python" "test_pystache.py")))))))))
3056
3057 (define-public python-joblib
3058 (package
3059 (name "python-joblib")
3060 (version "0.10.3")
3061 (source (origin
3062 (method url-fetch)
3063 (uri (pypi-uri "joblib" version))
3064 (sha256
3065 (base32
3066 "0787k919zlfmgymprz5bzv0v1df5bbirlf3awrghmjgvkrd9dci9"))
3067 (modules '((guix build utils)))
3068 (snippet
3069 '(begin
3070 ;; Remove pre-compiled .pyc files from source.
3071 (for-each delete-file-recursively
3072 (find-files "." "__pycache__" #:directories? #t))
3073 (for-each delete-file (find-files "." "\\.pyc$"))
3074 #t))))
3075 (build-system python-build-system)
3076 (arguments
3077 `(#:phases
3078 (modify-phases %standard-phases
3079 (add-before 'check 'disable-failing-tests
3080 (lambda _
3081 ;; This numpydoc tests fails for unknown reasons
3082 (delete-file "doc/sphinxext/numpydoc/tests/test_docscrape.py")
3083 ;; This numpydoc test depends on matplotlib, which is not a
3084 ;; required input.
3085 (delete-file "doc/sphinxext/numpydoc/tests/test_plot_directive.py")
3086 ;; These tests fail to execute sys.executable
3087 (substitute* "joblib/test/test_parallel.py"
3088 (("import nose" line)
3089 (string-append "from nose.plugins.skip import SkipTest\n" line))
3090 (("def test_nested_parallel_warnings" line)
3091 (string-append "@SkipTest\n" line))
3092 (("def test_parallel_with_interactively_defined_functions" line)
3093 (string-append "@SkipTest\n" line)))
3094 #t)))))
3095 ;; Provide nose to enable tests command
3096 (native-inputs
3097 `(("python-nose" ,python-nose)
3098 ("python-sphinx" ,python-sphinx)
3099 ("python-docutils" ,python-docutils)
3100 ("python-numpydoc" ,python-numpydoc)))
3101 (home-page "http://pythonhosted.org/joblib/")
3102 (synopsis "Using Python functions as pipeline jobs")
3103 (description
3104 "Joblib is a set of tools to provide lightweight pipelining in Python.
3105 In particular, joblib offers: transparent disk-caching of the output values
3106 and lazy re-evaluation (memoize pattern), easy simple parallel computing
3107 logging and tracing of the execution.")
3108 (license license:bsd-3)))
3109
3110 (define-public python2-joblib
3111 (package-with-python2 python-joblib))
3112
3113 (define-public python-docutils
3114 (package
3115 (name "python-docutils")
3116 (version "0.13.1")
3117 (source
3118 (origin
3119 (method url-fetch)
3120 (uri (pypi-uri "docutils" version))
3121 (sha256
3122 (base32
3123 "1gkma47i609jfs7dssxn4y9vsz06qi0l5q41nws0zgkpnrghz33i"))))
3124 (build-system python-build-system)
3125 (arguments
3126 '(#:tests? #f)) ; no setup.py test command
3127 (home-page "http://docutils.sourceforge.net/")
3128 (synopsis "Python Documentation Utilities")
3129 (description
3130 "Docutils is a modular system for processing documentation into useful
3131 formats, such as HTML, XML, and LaTeX. For input Docutils supports
3132 reStructuredText.")
3133 ;; Most of the source code is public domain, but some source files are
3134 ;; licensed under the PFSL, BSD 2-clause, and GPLv3+ licenses.
3135 (license (list license:public-domain license:psfl license:bsd-2 license:gpl3+))))
3136
3137 (define-public python2-docutils
3138 (package-with-python2 python-docutils))
3139
3140 (define-public python-pygments
3141 (package
3142 (name "python-pygments")
3143 (version "2.1.3")
3144 (source
3145 (origin
3146 (method url-fetch)
3147 (uri (pypi-uri "Pygments" version))
3148 (sha256
3149 (base32
3150 "10axnp2wpjnq9g8wg53fx0c70dfxqrz498jyz8mrdx9a3flwir48"))))
3151 (build-system python-build-system)
3152 (arguments
3153 ;; FIXME: Tests require sphinx, which depends on this.
3154 '(#:tests? #f))
3155 (home-page "http://pygments.org/")
3156 (synopsis "Syntax highlighting")
3157 (description
3158 "Pygments is a syntax highlighting package written in Python.")
3159 (license license:bsd-2)))
3160
3161 (define-public python2-pygments
3162 (package-with-python2 python-pygments))
3163
3164 (define-public python-sphinx
3165 (package
3166 (name "python-sphinx")
3167 (version "1.5.1")
3168 (source
3169 (origin
3170 (method url-fetch)
3171 (uri (pypi-uri "Sphinx" version))
3172 (sha256
3173 (base32
3174 "1i8p9idnli4gr0y4x67yakbdk5w6a0xjzhrg6bg51y9d1fi7fslf"))))
3175 (build-system python-build-system)
3176 (arguments
3177 `(#:phases
3178 (modify-phases %standard-phases
3179 (replace 'check
3180 (lambda _
3181 ;; Requires Internet access.
3182 (delete-file "tests/test_build_linkcheck.py")
3183 (zero? (system* "make" "test")))))))
3184 (propagated-inputs
3185 `(("python-imagesize" ,python-imagesize)
3186 ("python-sphinx-alabaster-theme"
3187 ,python-sphinx-alabaster-theme)
3188 ("python-babel" ,python-babel)
3189 ("python-snowballstemmer" ,python-snowballstemmer)
3190 ("python-docutils" ,python-docutils)
3191 ("python-jinja2" ,python-jinja2)
3192 ("python-pygments" ,python-pygments)
3193 ("python-requests" ,python-requests)
3194 ("python-six" ,python-six)))
3195 (native-inputs
3196 `(("graphviz" ,graphviz)
3197 ("python-html5lib" ,python-html5lib)
3198 ("python-mock" ,python-mock)
3199 ("python-nose" ,python-nose)))
3200 (home-page "http://sphinx-doc.org/")
3201 (synopsis "Python documentation generator")
3202 (description "Sphinx is a tool that makes it easy to create documentation
3203 for Python projects or other documents consisting of multiple reStructuredText
3204 sources.")
3205 (license license:bsd-3)
3206 (properties `((python2-variant . ,(delay python2-sphinx))))))
3207
3208 (define-public python-sphinx-1.5.3
3209 (package
3210 (inherit python-sphinx)
3211 (name "python-sphinx")
3212 (version "1.5.3")
3213 (source
3214 (origin
3215 (method url-fetch)
3216 (uri (pypi-uri "Sphinx" version))
3217 (sha256
3218 (base32
3219 "0kw1axswbvaavr8ggyf4qr6hnisnrzlbkkcdada69vk1x9xjassg"))))
3220 (native-inputs
3221 `(("python-pytest" ,python-pytest-3.0)
3222 ,@(package-native-inputs python-sphinx)))))
3223
3224 (define-public python2-sphinx
3225 (let ((base (package-with-python2 (strip-python2-variant python-sphinx))))
3226 (package
3227 (inherit base)
3228 (native-inputs `(("python2-mock" ,python2-mock)
3229 ("python2-enum34" ,python2-enum34)
3230 ,@(package-native-inputs base)))
3231 (propagated-inputs `(("python2-pytz" ,python2-pytz)
3232 ,@(package-propagated-inputs base))))))
3233
3234 (define-public python-sphinx-rtd-theme
3235 (package
3236 (name "python-sphinx-rtd-theme")
3237 (version "0.2.4")
3238 (source
3239 (origin
3240 (method url-fetch)
3241 (uri (pypi-uri "sphinx_rtd_theme" version))
3242 (sha256
3243 (base32
3244 "05rlhjzdyapr2w74jjs7mrm8hi69qskcr5vya9f9drpsys7lpxrd"))))
3245 (build-system python-build-system)
3246 (arguments '(#:tests? #f)) ; No tests.
3247 (propagated-inputs
3248 `(("python-sphinx" ,python-sphinx)))
3249 (home-page "https://github.com/snide/sphinx_rtd_theme/")
3250 (synopsis "ReadTheDocs.org theme for Sphinx")
3251 (description "A theme for Sphinx used by ReadTheDocs.org.")
3252 (license license:expat)))
3253
3254 (define-public python2-sphinx-rtd-theme
3255 (package-with-python2 python-sphinx-rtd-theme))
3256
3257 (define-public python-rst.linker
3258 (package
3259 (name "python-rst.linker")
3260 (version "1.7")
3261 (source
3262 (origin
3263 (method url-fetch)
3264 (uri (pypi-uri "rst.linker" version))
3265 (sha256
3266 (base32
3267 "0bh4lnj2p1nh0wf5pgxgfbrp27xhb1rinahkb5j7s3qprq6qn0sr"))))
3268 (build-system python-build-system)
3269 (propagated-inputs
3270 `(("python-dateutil" ,python-dateutil)
3271 ("python-six" ,python-six)))
3272 (native-inputs
3273 `(("python-setuptools-scm" ,python-setuptools-scm)))
3274 ;; Test would require path.py, which would introduce a cyclic dependence.
3275 (arguments `(#:tests? #f))
3276 ;; Note: As of version 1.7 the documentation is not worth building.
3277 (home-page "https://github.com/jaraco/rst.linker")
3278 (synopsis "Sphinx plugin to add links and timestamps")
3279 (description "rst.linker allows to automatically replace text by a
3280 reStructuredText external reference or timestamps. It's primary purpose is to
3281 augment the changelog, but it can be used for other documents, too.")
3282 (license license:expat)))
3283
3284 (define-public python2-rst.linker
3285 (package-with-python2 python-rst.linker))
3286
3287 (define-public python-feedgenerator
3288 (package
3289 (name "python-feedgenerator")
3290 (version "1.9")
3291 (source
3292 (origin
3293 (method url-fetch)
3294 (uri (pypi-uri "feedgenerator" version))
3295 (sha256
3296 (base32
3297 "01mirwkm7xfx539hmvj7g9da1j51gw5lsx74dr0glizskjm5vq2s"))
3298 (modules '((guix build utils)))
3299 (snippet
3300 '(begin
3301 ;; Remove pre-compiled .pyc files from source.
3302 (for-each delete-file-recursively
3303 (find-files "." "__pycache__" #:directories? #t))
3304 (for-each delete-file (find-files "." "\\.pyc$"))
3305 #t))))
3306 (build-system python-build-system)
3307 (propagated-inputs
3308 `(("python-pytz" ,python-pytz)
3309 ("python-six" ,python-six)))
3310 (home-page "https://github.com/getpelican/feedgenerator")
3311 (synopsis
3312 "Standalone version of Django's Atom/RSS feed generator")
3313 (description
3314 "Feedgenerator-py3k is a standalone version of Django's feedgenerator,
3315 which can produce feeds in RSS 2.0, RSS 0.91, and Atom formats.")
3316 (license license:bsd-3)))
3317
3318 (define-public python2-feedgenerator
3319 (package-with-python2 python-feedgenerator))
3320
3321 (define-public python-blinker
3322 (package
3323 (name "python-blinker")
3324 (version "1.4")
3325 (source
3326 (origin
3327 (method url-fetch)
3328 (uri (pypi-uri "blinker" version))
3329 (sha256
3330 (base32
3331 "1dpq0vb01p36jjwbhhd08ylvrnyvcc82yxx3mwjx6awrycjyw6j7"))))
3332 (build-system python-build-system)
3333 (home-page "http://pythonhosted.org/blinker/")
3334 (synopsis "Fast, simple object-to-object and broadcast signaling")
3335 (description
3336 "Blinker provides a fast dispatching system that allows any number of
3337 interested parties to subscribe to events, or \"signals\".")
3338 (license license:expat)))
3339
3340 (define-public python2-blinker
3341 (package-with-python2 python-blinker))
3342
3343 (define-public pelican
3344 (package
3345 (name "pelican")
3346 (version "3.6.3")
3347 (source
3348 (origin
3349 (method url-fetch)
3350 (uri (pypi-uri "pelican" version))
3351 (sha256
3352 (base32
3353 "1hn94rb4q3zmcq16in055xikal4dba5hfx3zznq7warllcgc9f8k"))))
3354 (build-system python-build-system)
3355 (propagated-inputs
3356 `(("python-feedgenerator" ,python-feedgenerator)
3357 ("python-jinja2" ,python-jinja2)
3358 ("python-pygments" ,python-pygments)
3359 ("python-docutils" ,python-docutils)
3360 ("python-pytz" ,python-pytz)
3361 ("python-blinker" ,python-blinker)
3362 ("python-unidecode" ,python-unidecode)
3363 ("python-six" ,python-six)
3364 ("python-dateutil" ,python-dateutil)))
3365 (home-page "http://getpelican.com/")
3366 (arguments
3367 `(;; XXX Requires a lot more packages to do unit tests :P
3368 #:tests? #f
3369 #:phases (modify-phases %standard-phases
3370 (add-before
3371 'install 'adjust-requires
3372 ;; Since feedgenerator is installed from git, it doesn't
3373 ;; conform to the version requirements.
3374 ;;
3375 ;; We *do have* "feedgenerator >= 1.6", but strip off the
3376 ;; version requirement so setuptools doesn't get confused.
3377 (lambda _
3378 (substitute* "setup.py"
3379 (("['\"]feedgenerator.*?['\"]")
3380 "'feedgenerator'")))))))
3381 (synopsis "Python-based static site publishing system")
3382 (description
3383 "Pelican is a tool to generate a static blog from reStructuredText,
3384 Markdown input files, and more. Pelican uses Jinja2 for templating
3385 and is very extensible.")
3386 (license license:agpl3+)))
3387
3388 (define-public python-scikit-learn
3389 (package
3390 (name "python-scikit-learn")
3391 (version "0.18.1")
3392 (source
3393 (origin
3394 (method url-fetch)
3395 (uri (string-append
3396 "https://github.com/scikit-learn/scikit-learn/archive/"
3397 version ".tar.gz"))
3398 (file-name (string-append name "-" version ".tar.gz"))
3399 (sha256
3400 (base32
3401 "1hwswckdmd27f7k1jvwdc0m4mqrgxl2s245yq1scq34v124bjqgq"))))
3402 (build-system python-build-system)
3403 (arguments
3404 `(#:phases
3405 (modify-phases %standard-phases
3406 (delete 'check)
3407 (add-after 'install 'check
3408 ;; Running tests from the source directory requires
3409 ;; an "inplace" build with paths relative to CWD.
3410 ;; http://scikit-learn.org/stable/developers/advanced_installation.html#testing
3411 ;; Use the installed version instead.
3412 (lambda* (#:key inputs outputs #:allow-other-keys)
3413 (add-installed-pythonpath inputs outputs)
3414 ;; some tests require access to "$HOME"
3415 (setenv "HOME" "/tmp")
3416 ;; Step out of the source directory just to be sure.
3417 (chdir "..")
3418 (zero? (system* "nosetests" "-v" "sklearn")))))))
3419 (inputs
3420 `(("openblas" ,openblas)))
3421 (native-inputs
3422 `(("python-nose" ,python-nose)
3423 ("python-cython" ,python-cython)))
3424 (propagated-inputs
3425 `(("python-numpy" ,python-numpy)
3426 ("python-scipy" ,python-scipy)))
3427 (home-page "http://scikit-learn.org/")
3428 (synopsis "Machine Learning in Python")
3429 (description
3430 "Scikit-learn provides simple and efficient tools for data
3431 mining and data analysis.")
3432 (license license:bsd-3)))
3433
3434 (define-public python2-scikit-learn
3435 (package-with-python2 python-scikit-learn))
3436
3437 (define-public python-scikit-image
3438 (package
3439 (name "python-scikit-image")
3440 (version "0.11.3")
3441 (source
3442 (origin
3443 (method url-fetch)
3444 (uri (string-append
3445 "https://pypi.python.org/packages/source/s/scikit-image/scikit-image-"
3446 version ".tar.gz"))
3447 (sha256
3448 (base32 "0jz416fqvpahqyffw8plmszzfj669w8wvf3y9clnr5lr6a7md3kn"))))
3449 (build-system python-build-system)
3450 (arguments
3451 ;; TODO: Some tests require running X11 server. Disable them?
3452 '(#:tests? #f))
3453 ;; See DEPENDS.txt for the list of build and run time requiremnts
3454 (propagated-inputs
3455 `(("python-matplotlib" ,python-matplotlib)
3456 ("python-networkx" ,python-networkx)
3457 ("python-scipy" ,python-scipy)
3458 ("python-pillow" ,python-pillow)))
3459 (native-inputs
3460 `(("python-numpy" ,python-numpy)
3461 ("python-cython" ,python-cython)
3462 ("python-six" ,python-six)))
3463 (home-page "http://scikit-image.org/")
3464 (synopsis "Image processing in Python")
3465 (description
3466 "Scikit-image is a collection of algorithms for image processing.")
3467 (license license:bsd-3)))
3468
3469 (define-public python2-scikit-image
3470 (package-with-python2 python-scikit-image))
3471
3472 (define-public python-redis
3473 (package
3474 (name "python-redis")
3475 (version "2.10.5")
3476 (source
3477 (origin
3478 (method url-fetch)
3479 (uri (pypi-uri "redis" version))
3480 (sha256
3481 (base32 "0csmrkxb29x7xs9b51zplwkkq2hwnbh9jns1g85dykn5rxmaxysx"))))
3482 (build-system python-build-system)
3483 ;; Tests require a running Redis server
3484 (arguments '(#:tests? #f))
3485 ;; As long as we are not running test, we do not need this input :-)
3486 ;;(native-inputs
3487 ;; `(("python-pytest" ,python-pytest)))
3488 (home-page "https://github.com/andymccurdy/redis-py")
3489 (synopsis "Redis Python client")
3490 (description
3491 "This package provides a Python interface to the Redis key-value store.")
3492 (license license:expat)))
3493
3494 (define-public python2-redis
3495 (package-with-python2 python-redis))
3496
3497 (define-public python-rq
3498 (package
3499 (name "python-rq")
3500 (version "0.7.1")
3501 (source
3502 (origin
3503 (method url-fetch)
3504 (uri (pypi-uri "rq" version))
3505 (sha256
3506 (base32 "0gaq5pnh0zy46r8jvygi0ifbvz3pq6i7xla78ijcgjw0x77qzsdh"))))
3507 (build-system python-build-system)
3508 (propagated-inputs
3509 `(("python-click" ,python-click)
3510 ("python-redis" ,python-redis)))
3511 (home-page "http://python-rq.org/")
3512 (synopsis "Simple job queues for Python")
3513 (description
3514 "RQ (Redis Queue) is a simple Python library for queueing jobs and
3515 processing them in the background with workers. It is backed by Redis and it
3516 is designed to have a low barrier to entry.")
3517 (license license:bsd-2)))
3518
3519 (define-public python2-rq
3520 (package-with-python2 python-rq))
3521
3522 (define-public python-cython
3523 (package
3524 (name "python-cython")
3525 (version "0.25.2")
3526 (source
3527 (origin
3528 (method url-fetch)
3529 (uri (pypi-uri "Cython" version))
3530 (patches (search-patches "python-cython-fix-tests-32bit.patch"))
3531 (sha256
3532 (base32
3533 "01h3lrf6d98j07iakifi81qjszh6faa37ibx7ylva1vsqbwx2hgi"))))
3534 (build-system python-build-system)
3535 ;; we need the full python package and not just the python-wrapper
3536 ;; because we need libpython3.3m.so
3537 (inputs
3538 `(("python" ,python)))
3539 (arguments
3540 `(#:phases
3541 (modify-phases %standard-phases
3542 (add-before 'check 'set-HOME
3543 ;; some tests require access to "$HOME/.cython"
3544 (lambda _ (setenv "HOME" "/tmp")))
3545 (replace 'check
3546 (lambda _ (zero? (system* "python" "runtests.py" "-vv")))))))
3547 (home-page "http://cython.org/")
3548 (synopsis "C extensions for Python")
3549 (description "Cython is an optimising static compiler for both the Python
3550 programming language and the extended Cython programming language. It makes
3551 writing C extensions for Python as easy as Python itself.")
3552 (license license:asl2.0)
3553 (properties `((python2-variant . ,(delay python2-cython))))))
3554
3555 (define-public python2-cython
3556 (package (inherit (package-with-python2
3557 (strip-python2-variant python-cython)))
3558 (name "python2-cython")
3559 (inputs
3560 `(("python-2" ,python-2))))) ; this is not automatically changed
3561
3562 ;; The RPython toolchain currently does not support Python 3.
3563 (define-public python2-rpython
3564 (package
3565 (name "python2-rpython")
3566 (version "0.1.4")
3567 (source
3568 (origin
3569 (method url-fetch)
3570 (uri (pypi-uri "rpython" version))
3571 (sha256
3572 (base32
3573 "07pps06fq4c4wmi5ii0sgh9zgwniz5y7frqhm28g3a154l163fxc"))))
3574 (build-system python-build-system)
3575 (arguments `(#:python ,python-2))
3576 (native-inputs
3577 `(("python2-pytest" ,python2-pytest))) ; needed for running tests
3578 (home-page "https://rpython.readthedocs.org")
3579 (synopsis "Framework for implementing interpreters and virtual machines")
3580 (description "RPython is a translation and support framework for
3581 producing implementations of dynamic languages, emphasizing a clean separation
3582 between language specification and implementation aspects.")
3583 (license license:expat)))
3584
3585 (define-public python-numpy
3586 (package
3587 (name "python-numpy")
3588 (version "1.12.0")
3589 (source
3590 (origin
3591 (method url-fetch)
3592 (uri (string-append
3593 "https://github.com/numpy/numpy/archive/v" version ".tar.gz"))
3594 (file-name (string-append name "-" version ".tar.gz"))
3595 (sha256
3596 (base32
3597 "025d4j4aakcp8w5i5diqh812cbbjgac7jszx1j56ivrbi1i8vv7d"))))
3598 (build-system python-build-system)
3599 (inputs
3600 `(("openblas" ,openblas)
3601 ("lapack" ,lapack)))
3602 (native-inputs
3603 `(("python-cython" ,python-cython)
3604 ("python-nose" ,python-nose)
3605 ("gfortran" ,gfortran)))
3606 (arguments
3607 `(#:phases
3608 (modify-phases %standard-phases
3609 (add-before 'build 'set-environment-variables
3610 (lambda* (#:key inputs #:allow-other-keys)
3611 (call-with-output-file "site.cfg"
3612 (lambda (port)
3613 (format port
3614 "[openblas]
3615 libraries = openblas
3616 library_dirs = ~a/lib
3617 include_dirs = ~a/include
3618
3619 # backslash-n to make emacs happy
3620 \n[lapack]
3621 lapack_libs = lapack
3622 library_dirs = ~a/lib
3623 include_dirs = ~a/include
3624 "
3625 (assoc-ref inputs "openblas")
3626 (assoc-ref inputs "openblas")
3627 (assoc-ref inputs "lapack")
3628 (assoc-ref inputs "lapack"))))
3629 ;; Use "gcc" executable, not "cc".
3630 (substitute* "numpy/distutils/system_info.py"
3631 (("c = distutils\\.ccompiler\\.new_compiler\\(\\)")
3632 "c = distutils.ccompiler.new_compiler(); c.set_executables(compiler='gcc',compiler_so='gcc',linker_exe='gcc',linker_so='gcc -shared')"))
3633 #t))
3634 ;; Tests can only be run after the library has been installed and not
3635 ;; within the source directory.
3636 (delete 'check)
3637 (add-after 'install 'check
3638 (lambda* (#:key outputs inputs #:allow-other-keys)
3639 ;; Make installed package available for running the tests
3640 (add-installed-pythonpath inputs outputs)
3641 (with-directory-excursion "/tmp"
3642 (zero? (system* "python" "-c"
3643 "import numpy; numpy.test(verbose=2)"))))))))
3644 (home-page "http://www.numpy.org/")
3645 (synopsis "Fundamental package for scientific computing with Python")
3646 (description "NumPy is the fundamental package for scientific computing
3647 with Python. It contains among other things: a powerful N-dimensional array
3648 object, sophisticated (broadcasting) functions, tools for integrating C/C++
3649 and Fortran code, useful linear algebra, Fourier transform, and random number
3650 capabilities.")
3651 (license license:bsd-3)))
3652
3653 (define-public python2-numpy
3654 (package-with-python2 python-numpy))
3655
3656 (define-public python-munch
3657 (package
3658 (name "python-munch")
3659 (version "2.0.4")
3660 (source
3661 (origin
3662 (method url-fetch)
3663 (uri (pypi-uri "munch" version))
3664 (sha256
3665 (base32
3666 "1cmqg91xnqx8gvnh4pmp0bfl1dfcm65d5p9mg73zz8pkjhx6h80l"))))
3667 (build-system python-build-system)
3668 (home-page "https://github.com/Infinidat/munch")
3669 (synopsis "Dot-accessible dictionary")
3670 (description "Munch is a dot-accessible dictionary similar to JavaScript
3671 objects.")
3672 (license license:expat)))
3673
3674 (define-public python2-munch
3675 (package-with-python2 python-munch))
3676
3677 (define-public python2-fastlmm
3678 (package
3679 (name "python2-fastlmm")
3680 (version "0.2.21")
3681 (source
3682 (origin
3683 (method url-fetch)
3684 (uri (pypi-uri "fastlmm" version ".zip"))
3685 (sha256
3686 (base32
3687 "1q8c34rpmwkfy3r4d5172pzdkpfryj561897z9r3x22gq7813x1m"))))
3688 (build-system python-build-system)
3689 (arguments
3690 `(#:python ,python-2)) ; only Python 2.7 is supported
3691 (propagated-inputs
3692 `(("python2-numpy" ,python2-numpy)
3693 ("python2-scipy" ,python2-scipy)
3694 ("python2-matplotlib" ,python2-matplotlib)
3695 ("python2-pandas" ,python2-pandas)
3696 ("python2-scikit-learn" ,python2-scikit-learn)
3697 ("python2-pysnptools" ,python2-pysnptools)))
3698 (native-inputs
3699 `(("unzip" ,unzip)
3700 ("python2-cython" ,python2-cython)
3701 ("python2-mock" ,python2-mock)
3702 ("python2-nose" ,python2-nose)))
3703 (home-page "http://research.microsoft.com/en-us/um/redmond/projects/mscompbio/fastlmm/")
3704 (synopsis "Perform genome-wide association studies on large data sets")
3705 (description
3706 "FaST-LMM, which stands for Factored Spectrally Transformed Linear Mixed
3707 Models, is a program for performing both single-SNP and SNP-set genome-wide
3708 association studies (GWAS) on extremely large data sets.")
3709 (license license:asl2.0)))
3710
3711 (define-public python-numpy-documentation
3712 (package
3713 (name "python-numpy-documentation")
3714 (version (package-version python-numpy))
3715 (source (package-source python-numpy))
3716 (build-system python-build-system)
3717 (native-inputs
3718 `(("python-matplotlib" ,python-matplotlib)
3719 ("python-numpy" ,python-numpy)
3720 ("pkg-config" ,pkg-config)
3721 ("python-sphinx" ,python-sphinx)
3722 ("python-numpydoc" ,python-numpydoc)
3723 ("texlive" ,texlive)
3724 ("texinfo" ,texinfo)
3725 ("perl" ,perl)
3726 ("scipy-sphinx-theme"
3727 ,(origin ; The build script expects scipy-sphinx-theme as a git submodule
3728 (method git-fetch)
3729 (uri (git-reference
3730 (url "https://github.com/scipy/scipy-sphinx-theme.git")
3731 (commit "c466764e2231ba132c09826b5b138fffa1cfcec3")))
3732 (sha256
3733 (base32
3734 "0q2y87clwlsgc7wvlsn9pzyssybcq10plwhq2w1ydykfsyyqbmkl"))))
3735 ,@(package-native-inputs python-numpy)))
3736 (arguments
3737 `(#:tests? #f ; we're only generating the documentation
3738 #:phases
3739 (modify-phases %standard-phases
3740 (delete 'build)
3741 (replace 'install
3742 (lambda* (#:key inputs outputs #:allow-other-keys)
3743 (let* ((data (string-append (assoc-ref outputs "out") "/share"))
3744 (doc (string-append
3745 data "/doc/" ,name "-"
3746 ,(package-version python-numpy)))
3747 (info-reader (string-append data "/info"))
3748 (html (string-append doc "/html"))
3749 (scipy-sphinx-theme "scipy-sphinx-theme")
3750 (sphinx-theme-checkout (assoc-ref inputs scipy-sphinx-theme))
3751 (pyver ,(string-append "PYVER=")))
3752 (with-directory-excursion "doc"
3753 (copy-recursively sphinx-theme-checkout scipy-sphinx-theme)
3754 (mkdir-p html)
3755 (system* "make" "html" pyver)
3756 (system* "make" "latex" "PAPER=a4" pyver)
3757 (system* "make" "-C" "build/latex"
3758 "all-pdf" "PAPER=a4" pyver)
3759 ;; FIXME: Generation of the info file fails.
3760 ;; (system* "make" "info" pyver)
3761 ;; (mkdir-p info)
3762 ;; (copy-file "build/texinfo/numpy.info"
3763 ;; (string-append info "/numpy.info"))
3764 (for-each (lambda (file)
3765 (copy-file (string-append "build/latex" file)
3766 (string-append doc file)))
3767 '("/numpy-ref.pdf" "/numpy-user.pdf"))
3768 (with-directory-excursion "build/html"
3769 (for-each (lambda (file)
3770 (let* ((dir (dirname file))
3771 (tgt-dir (string-append html "/" dir)))
3772 (unless (equal? "." dir)
3773 (mkdir-p tgt-dir))
3774 (install-file file html)))
3775 (find-files "." ".*")))))
3776 #t)))))
3777 (home-page (package-home-page python-numpy))
3778 (synopsis "Documentation for the python-numpy package")
3779 (description (package-description python-numpy))
3780 (license (package-license python-numpy))))
3781
3782 (define-public python2-numpy-documentation
3783 (let ((numpy-documentation (package-with-python2 python-numpy-documentation)))
3784 (package
3785 (inherit numpy-documentation)
3786 (native-inputs `(("python2-functools32" ,python2-functools32)
3787 ,@(package-native-inputs numpy-documentation))))))
3788
3789 (define-public python-pygit2
3790 (package
3791 (name "python-pygit2")
3792 (version "0.25.0")
3793 (source
3794 (origin
3795 (method url-fetch)
3796 (uri (pypi-uri "pygit2" version))
3797 (sha256
3798 (base32
3799 "0wf5rp0fvrw7j3j18dvwjq6xqlbm611wd55aphrfpps0v1gxh3ny"))
3800 (patches
3801 (search-patches "python-pygit2-disable-network-tests.patch"))))
3802 (build-system python-build-system)
3803 (propagated-inputs
3804 `(("python-six" ,python-six)
3805 ("python-cffi" ,python-cffi)
3806 ("libgit2" ,libgit2)
3807 ("python-tox" ,python-tox)))
3808 (home-page "https://github.com/libgit2/pygit2")
3809 (synopsis "Python bindings for libgit2")
3810 (description "Pygit2 is a set of Python bindings to the libgit2 shared
3811 library, libgit2 implements Git plumbing.")
3812 ;; GPL2.0 only, with linking exception.
3813 (license license:gpl2)))
3814
3815 (define-public python2-pygit2
3816 (package-with-python2 python-pygit2))
3817
3818 (define-public python-pyparsing
3819 (package
3820 (name "python-pyparsing")
3821 (version "2.0.3")
3822 (source
3823 (origin
3824 (method url-fetch)
3825 (uri (string-append "mirror://sourceforge/pyparsing/pyparsing"
3826 "/pyparsing-" version
3827 "/pyparsing-" version ".tar.gz"))
3828 (sha256
3829 (base32
3830 "0kw4py7gn45j93q8r7bzajfrjdc3xlsn2yzln41lf9zmrghjkrq6"))))
3831 (build-system python-build-system)
3832 (outputs '("out" "doc"))
3833 (arguments
3834 `(#:tests? #f ; no test target
3835 #:modules ((guix build python-build-system)
3836 (guix build utils))
3837 #:phases
3838 (alist-cons-after
3839 'install 'install-doc
3840 (lambda* (#:key outputs #:allow-other-keys)
3841 (let* ((doc (string-append (assoc-ref outputs "doc")
3842 "/share/doc/" ,name "-" ,version))
3843 (html-doc (string-append doc "/html"))
3844 (examples (string-append doc "/examples")))
3845 (mkdir-p html-doc)
3846 (mkdir-p examples)
3847 (for-each
3848 (lambda (dir tgt)
3849 (map (lambda (file)
3850 (install-file file tgt))
3851 (find-files dir ".*")))
3852 (list "docs" "htmldoc" "examples")
3853 (list doc html-doc examples))))
3854 %standard-phases)))
3855 (home-page "http://pyparsing.wikispaces.com")
3856 (synopsis "Python parsing class library")
3857 (description
3858 "The pyparsing module is an alternative approach to creating and
3859 executing simple grammars, vs. the traditional lex/yacc approach, or the use
3860 of regular expressions. The pyparsing module provides a library of classes
3861 that client code uses to construct the grammar directly in Python code.")
3862 (license license:expat)))
3863
3864 (define-public python2-pyparsing
3865 (package-with-python2 python-pyparsing))
3866
3867 (define-public python-numpydoc
3868 (package
3869 (name "python-numpydoc")
3870 (version "0.5")
3871 (source
3872 (origin
3873 (method url-fetch)
3874 (uri (string-append
3875 "https://pypi.python.org/packages/source/n/numpydoc/numpydoc-"
3876 version ".tar.gz"))
3877 (sha256
3878 (base32
3879 "0d4dnifaxkll50jx6czj05y8cb4ny60njd2wz299sj2jxfy51w4k"))
3880 (modules '((guix build utils)))
3881 (snippet
3882 '(begin
3883 ;; Drop a test requiring matplotlib, which we cannot add as an
3884 ;; input since it would create a circular dependency: Extend the
3885 ;; test for Python 3, where it is already dropped, to Python 2.
3886 (substitute* "numpydoc/tests/test_plot_directive.py"
3887 (("3") "2"))))))
3888 (build-system python-build-system)
3889 (propagated-inputs
3890 `(("python-sphinx" ,python-sphinx)))
3891 (native-inputs
3892 `(("python-nose" ,python-nose)))
3893 (home-page "https://pypi.python.org/pypi/numpydoc")
3894 (synopsis
3895 "Numpy's Sphinx extensions")
3896 (description
3897 "Sphinx extension to support docstrings in Numpy format.")
3898 (license license:bsd-2)))
3899
3900 (define-public python2-numpydoc
3901 (package-with-python2 python-numpydoc))
3902
3903 (define-public python-numexpr
3904 (package
3905 (name "python-numexpr")
3906 (version "2.6.1")
3907 (source
3908 (origin
3909 (method url-fetch)
3910 (uri (pypi-uri "numexpr" version))
3911 (sha256
3912 (base32
3913 "01lsja72m32z0i5p8rwxbfyzk4mplh72k2a140nwh8vv4wpyfbnv"))))
3914 (build-system python-build-system)
3915 (arguments `(#:tests? #f)) ; no tests included
3916 (propagated-inputs
3917 `(("python-numpy" ,python-numpy)))
3918 (home-page "https://github.com/pydata/numexpr")
3919 (synopsis "Fast numerical expression evaluator for NumPy")
3920 (description
3921 "Numexpr is a fast numerical expression evaluator for NumPy. With it,
3922 expressions that operate on arrays are accelerated and use less memory than
3923 doing the same calculation in Python. In addition, its multi-threaded
3924 capabilities can make use of all your cores, which may accelerate
3925 computations, most specially if they are not memory-bounded (e.g. those using
3926 transcendental functions).")
3927 (license license:expat)))
3928
3929 (define-public python2-numexpr
3930 (package-with-python2 python-numexpr))
3931
3932 (define-public python-cycler
3933 (package
3934 (name "python-cycler")
3935 (version "0.10.0")
3936 (source (origin
3937 (method url-fetch)
3938 (uri (pypi-uri "cycler" version))
3939 (sha256
3940 (base32
3941 "1n69n23fak1gjxlrbhqisi2b9pv3ckrfj98llx3p53953082syyd"))))
3942 (build-system python-build-system)
3943 (arguments
3944 ;; XXX: The current version requires 'coveralls' which we don't have.
3945 ;; Enable this for the next release which uses 'python-pytest'.
3946 '(#:tests? #f))
3947 (propagated-inputs
3948 `(("python-six" ,python-six)))
3949 (home-page "http://matplotlib.org/cycler/")
3950 (synopsis "Composable keyword argument iterator")
3951 (description
3952 "When using @code{matplotlib} and plotting more than one line, it is
3953 common to want to be able to want to be able to cycle over one or more artist
3954 styles; but the plotting logic can quickly become involved.
3955 To address this and enable easy cycling over arbitrary @code{kwargs}, the
3956 @code{Cycler} class was developed.")
3957 (license license:bsd-3)))
3958
3959 (define-public python2-cycler
3960 (package-with-python2 python-cycler))
3961
3962 (define-public python-colorspacious
3963 (package
3964 (name "python-colorspacious")
3965 (version "1.1.0")
3966 (source
3967 (origin
3968 (method url-fetch)
3969 (uri (string-append "https://github.com/njsmith/colorspacious/archive/v"
3970 version ".tar.gz"))
3971 (file-name (string-append name "-" version))
3972 (sha256
3973 (base32 "1vflh5jm32qb0skza2i8pjacv09w6gq84fqpp2nj77s0rbmzgr4k"))))
3974 (build-system python-build-system)
3975 (propagated-inputs
3976 `(("python-numpy" ,python-numpy)))
3977 (native-inputs
3978 `(("python-nose" ,python-nose)))
3979 (arguments
3980 `(#:phases
3981 (modify-phases %standard-phases
3982 (replace 'check
3983 (lambda _
3984 (zero? (system* "nosetests" "--all-modules" "-v" "colorspacious")))))))
3985 (home-page "https://github.com/njsmith/colorspacious")
3986 (synopsis "Python library for colorspace conversions")
3987 (description "@code{colorspacious} is a Python library that lets you
3988 convert between colorspaces like sRGB, XYZ, CIEL*a*b*, CIECAM02, CAM02-UCS, etc.")
3989 (license license:expat)))
3990
3991 (define-public python2-colorspacious
3992 (package-with-python2 python-colorspacious))
3993
3994 (define-public python-matplotlib
3995 (package
3996 (name "python-matplotlib")
3997 (version "2.0.0")
3998 (source
3999 (origin
4000 (method url-fetch)
4001 (uri (string-append
4002 "https://github.com/matplotlib/matplotlib/archive/v" version ".tar.gz"))
4003 (file-name (string-append name "-" version ".tar.gz"))
4004 (sha256
4005 (base32
4006 "0w3k5m5qb3wsd7yhvmg042xddvligklvcq2visk2c5wnph3hhsln"))))
4007 (build-system python-build-system)
4008 (propagated-inputs ; the following packages are all needed at run time
4009 `(("python-cycler" ,python-cycler)
4010 ("python-pyparsing" ,python-pyparsing)
4011 ("python-pygobject" ,python-pygobject)
4012 ("gobject-introspection" ,gobject-introspection)
4013 ("python-tkinter" ,python "tk")
4014 ("python-dateutil" ,python-dateutil)
4015 ("python-numpy" ,python-numpy)
4016 ("python-pillow" ,python-pillow)
4017 ("python-pytz" ,python-pytz)
4018 ("python-six" ,python-six)
4019 ;; The 'gtk+' package (and 'gdk-pixbuf', 'atk' and 'pango' propagated
4020 ;; from 'gtk+') provides the required 'typelib' files used by
4021 ;; 'gobject-introspection'. The location of these files is set with the
4022 ;; help of the environment variable GI_TYPELIB_PATH. At build time this
4023 ;; is done automatically by a 'native-search-path' procedure. However,
4024 ;; at run-time the user must set this variable as follows:
4025 ;;
4026 ;; export GI_TYPELIB_PATH=~/.guix-profile/lib/girepository-1.0
4027 ("gtk+" ,gtk+)
4028 ;; From version 1.4.0 'matplotlib' makes use of 'cairocffi' instead of
4029 ;; 'pycairo'. However, 'pygobject' makes use of a 'pycairo' 'context'
4030 ;; object. For this reason we need to import both libraries.
4031 ;; https://pythonhosted.org/cairocffi/cffi_api.html#converting-pycairo
4032 ("python-pycairo" ,python-pycairo)
4033 ("python-cairocffi" ,python-cairocffi)))
4034 (inputs
4035 `(("libpng" ,libpng)
4036 ("imagemagick" ,imagemagick)
4037 ("freetype" ,freetype)
4038 ("cairo" ,cairo)
4039 ("glib" ,glib)
4040 ;; FIXME: Add backends when available.
4041 ;("python-wxpython" ,python-wxpython)
4042 ("python-pyqt" ,python-pyqt)
4043 ("tcl" ,tcl)
4044 ("tk" ,tk)))
4045 (native-inputs
4046 `(("pkg-config" ,pkg-config)
4047 ("python-nose" ,python-nose)
4048 ("python-mock" ,python-mock)))
4049 (arguments
4050 `(#:phases
4051 (modify-phases %standard-phases
4052 (add-before 'build 'configure-environment
4053 (lambda* (#:key outputs inputs #:allow-other-keys)
4054 (let ((cairo (assoc-ref inputs "cairo"))
4055 (gtk+ (assoc-ref inputs "gtk+")))
4056 ;; Setting these directories in the 'basedirlist' of 'setup.cfg'
4057 ;; has not effect.
4058 (setenv "LD_LIBRARY_PATH"
4059 (string-append cairo "/lib:" gtk+ "/lib"))
4060 (setenv "HOME" (getcwd))
4061 (call-with-output-file "setup.cfg"
4062 (lambda (port)
4063 (format port "[directories]~%
4064 basedirlist = ~a,~a~%
4065 [rc_options]~%
4066 backend = TkAgg~%"
4067 (assoc-ref inputs "tcl")
4068 (assoc-ref inputs "tk")))))
4069 #t)))))
4070 (home-page "http://matplotlib.org")
4071 (synopsis "2D plotting library for Python")
4072 (description
4073 "Matplotlib is a Python 2D plotting library which produces publication
4074 quality figures in a variety of hardcopy formats and interactive environments
4075 across platforms. Matplotlib can be used in Python scripts, the python and
4076 ipython shell, web application servers, and six graphical user interface
4077 toolkits.")
4078 (license license:psfl)
4079 (properties `((python2-variant . ,(delay python2-matplotlib))))))
4080
4081 (define-public python2-matplotlib
4082 (let ((matplotlib (package-with-python2
4083 (strip-python2-variant python-matplotlib))))
4084 (package (inherit matplotlib)
4085 ;; Make sure to use special packages for Python 2 instead
4086 ;; of those automatically rewritten by package-with-python2.
4087 (propagated-inputs
4088 `(("python2-pycairo" ,python2-pycairo)
4089 ("python2-functools32" ,python2-functools32)
4090 ("python2-pygobject-2" ,python2-pygobject-2)
4091 ("python2-subprocess32" ,python2-subprocess32)
4092 ("python2-tkinter" ,python-2 "tk")
4093 ,@(fold alist-delete (package-propagated-inputs matplotlib)
4094 '("python-pycairo" "python-pygobject" "python-tkinter")))))))
4095
4096 (define-public python-matplotlib-documentation
4097 (package
4098 (name "python-matplotlib-documentation")
4099 (version (package-version python-matplotlib))
4100 (source (package-source python-matplotlib))
4101 (build-system python-build-system)
4102 (native-inputs
4103 `(("python-matplotlib" ,python-matplotlib)
4104 ("python-colorspacious" ,python-colorspacious)
4105 ("python-sphinx" ,python-sphinx)
4106 ("python-numpydoc" ,python-numpydoc)
4107 ("python-ipython" ,python-ipython)
4108 ("python-mock" ,python-mock)
4109 ("graphviz" ,graphviz)
4110 ("texlive" ,texlive)
4111 ("texinfo" ,texinfo)
4112 ,@(package-native-inputs python-matplotlib)))
4113 (arguments
4114 `(#:tests? #f ; we're only generating documentation
4115 #:phases
4116 (modify-phases %standard-phases
4117 (replace 'build
4118 (lambda _
4119 (chdir "doc")
4120 ;; Produce pdf in 'A4' format.
4121 (substitute* "conf.py"
4122 (("latex_paper_size = 'letter'") "")
4123 ;; latex_paper_size is deprecated -> set paper size using
4124 ;; latex_elements
4125 (("latex_elements\\['pointsize'\\] = '11pt'" match)
4126 ;; insert at a point where latex_elements{} is defined:
4127 (string-append match "\nlatex_elements['papersize'] = 'a4paper'")))
4128 (zero? (system* "python" "make.py" "html" "latex" "texinfo"))))
4129 (replace 'install
4130 (lambda* (#:key inputs outputs #:allow-other-keys)
4131 (let* ((data (string-append (assoc-ref outputs "out") "/share"))
4132 (doc (string-append data "/doc/python-matplotlib-" ,version))
4133 (info (string-append data "/info"))
4134 (html (string-append doc "/html")))
4135 (mkdir-p html)
4136 (mkdir-p info)
4137 (copy-recursively "build/html" html)
4138 (symlink (string-append html "/_images")
4139 (string-append info "/matplotlib-figures"))
4140 (with-directory-excursion "build/texinfo"
4141 (substitute* "matplotlib.texi"
4142 (("@image\\{([^,]*)" all file)
4143 (string-append "@image{matplotlib-figures/" file)))
4144 (symlink (string-append html "/_images")
4145 "./matplotlib-figures")
4146 (system* "makeinfo" "--no-split"
4147 "-o" "matplotlib.info" "matplotlib.texi"))
4148 (copy-file "build/texinfo/matplotlib.info"
4149 (string-append info "/matplotlib.info"))
4150 (copy-file "build/latex/Matplotlib.pdf"
4151 (string-append doc "/Matplotlib.pdf")))
4152 #t)))))
4153 (home-page (package-home-page python-matplotlib))
4154 (synopsis "Documentation for the python-matplotlib package")
4155 (description (package-description python-matplotlib))
4156 (license (package-license python-matplotlib))))
4157
4158 (define-public python2-matplotlib-documentation
4159 (package-with-python2 python-matplotlib-documentation))
4160
4161 (define-public python2-pysnptools
4162 (package
4163 (name "python2-pysnptools")
4164 (version "0.3.9")
4165 (source
4166 (origin
4167 (method url-fetch)
4168 (uri (pypi-uri "pysnptools" version ".zip"))
4169 (sha256
4170 (base32
4171 "1wybggjzz8zw7aav4pjsg2h22xp17a1lghrprza1pxwlm7wf96y2"))))
4172 (build-system python-build-system)
4173 (arguments
4174 `(#:python ,python-2)) ; only Python 2.7 is supported
4175 (propagated-inputs
4176 `(("python2-numpy" ,python2-numpy)
4177 ("python2-scipy" ,python2-scipy)
4178 ("python2-pandas" ,python2-pandas)))
4179 (native-inputs
4180 `(("python2-cython" ,python2-cython)))
4181 (native-inputs
4182 `(("unzip" ,unzip)))
4183 (home-page "http://research.microsoft.com/en-us/um/redmond/projects/mscompbio/")
4184 (synopsis "Library for reading and manipulating genetic data")
4185 (description
4186 "PySnpTools is a library for reading and manipulating genetic data. It
4187 can, for example, efficiently read whole PLINK *.bed/bim/fam files or parts of
4188 those files. It can also efficiently manipulate ranges of integers using set
4189 operators such as union, intersection, and difference.")
4190 (license license:asl2.0)))
4191
4192 (define-public python-rpy2
4193 (package
4194 (name "python-rpy2")
4195 (version "2.7.6")
4196 (source
4197 (origin
4198 (method url-fetch)
4199 (uri (pypi-uri "rpy2" version))
4200 (sha256
4201 (base32
4202 "0nhan2qvrw7b7gg5zddwa22kybdv3x1g26vkd7q8lvnkgzrs4dga"))))
4203 (build-system python-build-system)
4204 (arguments
4205 '(#:phases
4206 (modify-phases %standard-phases
4207 (delete 'check)
4208 (add-after 'install 'check
4209 (lambda* (#:key outputs inputs #:allow-other-keys)
4210 ;; It's easier to run tests after install.
4211 ;; Make installed package available for running the tests
4212 (add-installed-pythonpath inputs outputs)
4213 (zero? (system* "python" "-m" "rpy2.tests" "-v")))))))
4214 (propagated-inputs
4215 `(("python-six" ,python-six)))
4216 (inputs
4217 `(("readline" ,readline)
4218 ("icu4c" ,icu4c)
4219 ("pcre" ,pcre)
4220 ("r-minimal" ,r-minimal)
4221 ("r-survival" ,r-survival)))
4222 (native-inputs
4223 `(("zlib" ,zlib)))
4224 (home-page "http://rpy.sourceforge.net/")
4225 (synopsis "Python interface to the R language")
4226 (description "rpy2 is a redesign and rewrite of rpy. It is providing a
4227 low-level interface to R from Python, a proposed high-level interface,
4228 including wrappers to graphical libraries, as well as R-like structures and
4229 functions.")
4230 (license license:gpl3+)))
4231
4232 (define-public python2-rpy2
4233 (let ((rpy2 (package-with-python2 python-rpy2)))
4234 (package (inherit rpy2)
4235 (propagated-inputs
4236 `(("python2-singledispatch" ,python2-singledispatch)
4237 ,@(package-propagated-inputs rpy2))))))
4238
4239 (define-public python-scipy
4240 (package
4241 (name "python-scipy")
4242 (version "0.18.1")
4243 (source
4244 (origin
4245 (method url-fetch)
4246 (uri (string-append "https://github.com/scipy/scipy/archive/v"
4247 version ".tar.gz"))
4248 (file-name (string-append name "-" version ".tar.gz"))
4249 (sha256
4250 (base32
4251 "17slsrfawjp7if6qrlx03zhgp05350ginxx8ddpw9zqx43x905sn"))))
4252 (build-system python-build-system)
4253 (propagated-inputs
4254 `(("python-numpy" ,python-numpy)
4255 ("python-matplotlib" ,python-matplotlib)
4256 ("python-pyparsing" ,python-pyparsing)))
4257 (inputs
4258 `(("lapack" ,lapack)
4259 ("openblas" ,openblas)))
4260 (native-inputs
4261 `(("python-cython" ,python-cython)
4262 ("python-nose" ,python-nose)
4263 ("python-sphinx" ,python-sphinx)
4264 ("python-numpydoc" ,python-numpydoc)
4265 ("gfortran" ,gfortran)
4266 ("perl" ,perl)))
4267 (outputs '("out" "doc"))
4268 (arguments
4269 `(#:phases
4270 (modify-phases %standard-phases
4271 (add-before 'build 'configure-openblas
4272 (lambda* (#:key inputs #:allow-other-keys)
4273 (call-with-output-file "site.cfg"
4274 (lambda (port)
4275 (format port
4276 "[blas]
4277 libraries = openblas
4278 library_dirs = ~a/lib
4279 include_dirs = ~a/include
4280
4281 # backslash-n to make emacs happy
4282 \n[atlas]
4283 library_dirs = ~a/lib
4284 atlas_libs = openblas
4285 "
4286 (assoc-ref inputs "openblas")
4287 (assoc-ref inputs "openblas")
4288 (assoc-ref inputs "openblas"))))
4289 #t))
4290 (add-after 'install 'install-doc
4291 (lambda* (#:key inputs outputs #:allow-other-keys)
4292 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4293 (doc (string-append data "/doc/" ,name "-" ,version))
4294 (html (string-append doc "/html"))
4295 (pyver ,(string-append "PYVER=")))
4296 ;; Make installed package available for building the
4297 ;; documentation
4298 (add-installed-pythonpath inputs outputs)
4299 (with-directory-excursion "doc"
4300 ;; Fix generation of images for mathematical expressions.
4301 (substitute* (find-files "source" "conf\\.py")
4302 (("pngmath_use_preview = True")
4303 "pngmath_use_preview = False"))
4304 (mkdir-p html)
4305 (system* "make" "html" pyver)
4306 (with-directory-excursion "build/html"
4307 (for-each (lambda (file)
4308 (let* ((dir (dirname file))
4309 (tgt-dir (string-append html "/" dir)))
4310 (install-file file html)))
4311 (find-files "." ".*")))))
4312 #t))
4313 (add-after 'unpack 'fix-tests
4314 (lambda _
4315 (substitute* "scipy/integrate/tests/test_quadpack.py"
4316 (("libm.so") "libm.so.6"))
4317 #t))
4318 ;; Tests can only be run after the library has been installed and not
4319 ;; within the source directory.
4320 (delete 'check)
4321 (add-after 'install 'check
4322 (lambda* (#:key inputs outputs #:allow-other-keys)
4323 (add-installed-pythonpath inputs outputs)
4324 (with-directory-excursion "/tmp"
4325 (zero? (system* "python" "-c"
4326 "import scipy; scipy.test('full')")))
4327 #t)))))
4328 (home-page "http://www.scipy.org/")
4329 (synopsis "The Scipy library provides efficient numerical routines")
4330 (description "The SciPy library is one of the core packages that make up
4331 the SciPy stack. It provides many user-friendly and efficient numerical
4332 routines such as routines for numerical integration and optimization.")
4333 (properties `((python2-variant . ,(delay python2-scipy))))
4334 (license license:bsd-3)))
4335
4336 (define-public python2-scipy
4337 (package-with-python2
4338 (strip-python2-variant python-scipy)))
4339
4340 (define-public python-sockjs-tornado
4341 (package
4342 (name "python-sockjs-tornado")
4343 (version "1.0.3")
4344 (source
4345 (origin
4346 (method url-fetch)
4347 (uri (pypi-uri "sockjs-tornado" version))
4348 (sha256
4349 (base32
4350 "16cff40nniqsyvda1pb2j3b4zwmrw7y2g1vqq78lp20xpmhnwwkd"))))
4351 (build-system python-build-system)
4352 (arguments
4353 `(;; There are no tests, and running the test phase requires missing
4354 ;; dependencies
4355 #:tests? #f))
4356 (propagated-inputs
4357 `(("python-tornado" ,python-tornado)))
4358 (home-page "http://github.com/mrjoes/sockjs-tornado/")
4359 (synopsis
4360 "SockJS python server implementation on top of Tornado framework")
4361 (description
4362 "SockJS-tornado provides the server side counterpart to a SockJS client
4363 library, through the Tornado framework.
4364
4365 SockJS provides a low latency, full duplex, cross-domain communication channel
4366 between a web browser and web server.")
4367 (license license:expat)))
4368
4369 (define-public python2-sockjs-tornado
4370 (package-with-python2 python-sockjs-tornado))
4371
4372 (define-public python-socksipy-branch
4373 (package
4374 (name "python-socksipy-branch")
4375 (version "1.01")
4376 (source
4377 (origin
4378 (method url-fetch)
4379 (uri (pypi-uri "SocksiPy-branch" version))
4380 (sha256
4381 (base32
4382 "01l41v4g7fy9fzvinmjxy6zcbhgqaif8dhdqm4w90fwcw9h51a8p"))))
4383 (build-system python-build-system)
4384 (arguments
4385 `(#:tests? #f)) ; There are no tests
4386 (home-page "https://code.google.com/archive/p/socksipy-branch/")
4387 (synopsis "Python SOCKS module")
4388 (description
4389 "SocksiPy - A Python SOCKS client module. It provides a
4390 socket-like interface that supports connections to any TCP
4391 service through the use of a SOCKS4, SOCKS5 or HTTP proxy.
4392 The original version was developed by Dan Haim, this is a
4393 branch created by Mario Vilas to address some open issues,
4394 as the original project seems to have been abandoned circa 2007.")
4395 (license license:bsd-3)))
4396
4397 (define-public python2-socksipy-branch
4398 (package-with-python2 python-socksipy-branch))
4399
4400 (define-public python-sqlalchemy
4401 (package
4402 (name "python-sqlalchemy")
4403 (version "1.0.12")
4404 (source
4405 (origin
4406 (method url-fetch)
4407 (uri (string-append "https://pypi.python.org/packages/source/S/"
4408 "SQLAlchemy/SQLAlchemy-" version ".tar.gz"))
4409 (sha256
4410 (base32
4411 "1l8qclhd0s90w3pvwhi5mjxdwr5j7gw7cjka2fx6f2vqmq7f4yb6"))))
4412 (build-system python-build-system)
4413 (native-inputs
4414 `(("python-cython" ,python-cython) ;for c extensions
4415 ("python-pytest" ,python-pytest)
4416 ("python-mock" ,python-mock))) ;for tests
4417 (arguments
4418 `(#:phases (alist-replace
4419 'check
4420 (lambda _ (zero? (system* "py.test")))
4421 %standard-phases)))
4422 (home-page "http://www.sqlalchemy.org")
4423 (synopsis "Database abstraction library")
4424 (description
4425 "SQLAlchemy is the Python SQL toolkit and Object Relational Mapper that
4426 gives application developers the full power and flexibility of SQL. It
4427 provides a full suite of well known enterprise-level persistence patterns,
4428 designed for efficient and high-performing database access, adapted into a
4429 simple and Pythonic domain language.")
4430 (license license:x11)))
4431
4432 (define-public python2-sqlalchemy
4433 (package-with-python2 python-sqlalchemy))
4434
4435 (define-public python-pycodestyle
4436 (package
4437 (name "python-pycodestyle")
4438 (version "2.3.1")
4439 (source
4440 (origin
4441 (method url-fetch)
4442 (uri (pypi-uri "pycodestyle" version))
4443 (sha256
4444 (base32
4445 "0rk78b66p57ala26mdldl9lafr48blv5s659sah9q50qnfjmc8k8"))))
4446 (build-system python-build-system)
4447 (home-page "https://pycodestyle.readthedocs.io/")
4448 (synopsis "Python style guide checker")
4449 (description "@code{pycodestyle} (formerly pep8) is a tool to check
4450 Python code against some of the style conventions in
4451 @url{http://www.python.org/dev/peps/pep-0008/,PEP 8}.")
4452 (license license:expat)))
4453
4454 (define-public python2-pycodestyle
4455 (package-with-python2 python-pycodestyle))
4456
4457 (define-public python-orderedmultidict
4458 (package
4459 (name "python-orderedmultidict")
4460 (version "0.7.11")
4461 (source
4462 (origin
4463 (method url-fetch)
4464 (uri (pypi-uri "orderedmultidict" version))
4465 (sha256
4466 (base32
4467 "0dls862ibm7qbq4fnvwx0xn1v9hwyzywbff8xjjdr42dd75208yw"))))
4468 (build-system python-build-system)
4469 (arguments
4470 `(#:phases
4471 (modify-phases %standard-phases
4472 (add-after 'unpack 'fix-tests
4473 (lambda _
4474 ;; The package uses nosetest for running the tests.
4475 ;; Adding this initfile allows to run the test suite
4476 ;; without requiring nosetest.
4477 (zero? (system* "touch" "tests/__init__.py")))))))
4478 (propagated-inputs
4479 `(("python-six" ,python-six)))
4480 (native-inputs
4481 `(("python-pycodestyle" ,python-pycodestyle)))
4482 (home-page "https://github.com/gruns/orderedmultidict")
4483 (synopsis "Python Ordered Multivalue Dictionary - omdict")
4484 (description "This package contains a library for ordered multivalue
4485 dictionaries. A multivalue dictionary is a dictionary that can store
4486 multiple values for the same key. An ordered multivalue dictionary is a
4487 multivalue dictionary that retains the order of insertions and deletions.")
4488 (license license:unlicense)))
4489
4490 (define-public python2-orderedmultidict
4491 (package-with-python2 python-orderedmultidict))
4492
4493 (define-public python-furl
4494 (package
4495 (name "python-furl")
4496 (version "0.5.6")
4497 (source
4498 (origin
4499 (method url-fetch)
4500 (uri (pypi-uri "furl" version))
4501 (sha256
4502 (base32
4503 "0lzpfpm686hvz3sr1mcrnd1b3lgmnw8v59gb43wfi98r3b671pqc"))))
4504 (build-system python-build-system)
4505 (propagated-inputs
4506 `(("python-six" ,python-six)
4507 ("python-orderedmultidict" ,python-orderedmultidict)))
4508 (native-inputs
4509 `(("python-pycodestyle" ,python-pycodestyle)))
4510 (home-page "https://github.com/gruns/furl")
4511 (synopsis "URL manipulation in Python")
4512 (description "Furl provides an easy-to-use alternative to the
4513 @code{urllib} and @code{urlparse} modules for manipulating URLs.")
4514 (license license:unlicense)))
4515
4516 (define-public python2-furl
4517 (package-with-python2 python-furl))
4518
4519 (define-public python-flask-babel
4520 (package
4521 (name "python-flask-babel")
4522 (version "0.11.1")
4523 (source
4524 (origin
4525 (method url-fetch)
4526 (uri (pypi-uri "Flask-Babel" version))
4527 (sha256
4528 (base32
4529 "16b80cipdba9xj3jlaiaq6wgrgpjb70w3j01jjy9hbp4k71kd6yj"))))
4530 (build-system python-build-system)
4531 (propagated-inputs
4532 `(("python-flask" ,python-flask)
4533 ("python-babel" ,python-babel)
4534 ("python-jinja2" ,python-jinja2)
4535 ("python-pytz" ,python-pytz)))
4536 (home-page "https://github.com/python-babel/flask-babel")
4537 (synopsis "Add i18n/l10n support to Flask applications")
4538 (description "This package implements internationalization and localization
4539 support for Flask. This is based on the Python babel module as well as pytz -
4540 both of which are installed automatically if you install this library.")
4541 (license license:bsd-3)))
4542
4543 (define-public python2-flask-babel
4544 (package-with-python2 python-flask-babel))
4545
4546 (define-public python-sqlalchemy-utils
4547 (package
4548 (name "python-sqlalchemy-utils")
4549 (version "0.32.13")
4550 (source
4551 (origin
4552 (method url-fetch)
4553 (uri (pypi-uri "SQLAlchemy-Utils" version))
4554 (sha256
4555 (base32
4556 "0vsib7gidjamzsz6w4s5pdhxzxsrkghjnm4sqwk94igjrl3i5ixj"))))
4557 (build-system python-build-system)
4558 (arguments
4559 '(#:tests? #f)) ; FIXME: Many tests require a running database server.
4560 ;; #:phases
4561 ;; (modify-phases %standard-phases
4562 ;; (replace 'check
4563 ;; (lambda _
4564 ;; (zero? (system* "py.test" "sqlalchemy_utils" "tests")))))
4565 (propagated-inputs
4566 `(("python-six" ,python-six)
4567 ("python-sqlalchemy" ,python-sqlalchemy)))
4568 (native-inputs
4569 `(("python-dateutil" ,python-dateutil)
4570 ("python-flexmock" ,python-flexmock)
4571 ("python-psycopg2" ,python-psycopg2)
4572 ("python-pytest" ,python-pytest)
4573 ("python-pytz" ,python-pytz)))
4574 (home-page "https://github.com/kvesteri/sqlalchemy-utils")
4575 (synopsis "Various utility functions for SQLAlchemy")
4576 (description
4577 "SQLAlchemy-utils provides various utility functions and custom data types
4578 for SQLAlchemy. SQLAlchemy is an SQL database abstraction library for Python.
4579
4580 You might also want to install the following optional dependencies:
4581 @enumerate
4582 @item @code{python-passlib}
4583 @item @code{python-babel}
4584 @item @code{python-cryptography}
4585 @item @code{python-pytz}
4586 @item @code{python-psycopg2}
4587 @item @code{python-furl}
4588 @item @code{python-flask-babel}
4589 @end enumerate
4590 ")
4591 (license license:bsd-3)))
4592
4593 (define-public python2-sqlalchemy-utils
4594 (package-with-python2 python-sqlalchemy-utils))
4595
4596 (define-public python-alembic
4597 (package
4598 (name "python-alembic")
4599 (version "0.8.10")
4600 (source
4601 (origin
4602 (method url-fetch)
4603 (uri (pypi-uri "alembic" version))
4604 (sha256
4605 (base32
4606 "06br9sfqypnjlal6fsbnky3zb0askwcn3diz8k3kwa0qcblm0fqf"))))
4607 (build-system python-build-system)
4608 (native-inputs
4609 `(("python-mock" ,python-mock)
4610 ("python-pytest-cov" ,python-pytest-cov)))
4611 (propagated-inputs
4612 `(("python-sqlalchemy" ,python-sqlalchemy)
4613 ("python-mako" ,python-mako)
4614 ("python-editor" ,python-editor)))
4615 (home-page "http://bitbucket.org/zzzeek/alembic")
4616 (synopsis
4617 "Database migration tool for SQLAlchemy")
4618 (description
4619 "Alembic is a lightweight database migration tool for usage with the
4620 SQLAlchemy Database Toolkit for Python.")
4621 (license license:expat)))
4622
4623 (define-public python2-alembic
4624 (package-with-python2 python-alembic))
4625
4626 (define-public python-autopep8
4627 (package
4628 (name "python-autopep8")
4629 (version "1.2.4")
4630 (source
4631 (origin
4632 (method url-fetch)
4633 (uri (pypi-uri "autopep8" version))
4634 (sha256
4635 (base32
4636 "18parm383lfn42a00wklv3qf20p4v277f1x3cn58x019dqk1xqrq"))))
4637 (build-system python-build-system)
4638 (propagated-inputs
4639 `(("python-pep8" ,python-pep8)))
4640 (home-page "https://github.com/hhatto/autopep8")
4641 (synopsis "Format Python code according to the PEP 8 style guide")
4642 (description
4643 "@code{autopep8} automatically formats Python code to conform to
4644 the PEP 8 style guide. It uses the pycodestyle utility to determine
4645 what parts of the code needs to be formatted. @code{autopep8} is
4646 capable of fixing most of the formatting issues that can be reported
4647 by pycodestyle.")
4648 (license (license:non-copyleft
4649 "https://github.com/hhatto/autopep8/blob/master/LICENSE"))))
4650
4651 (define-public python2-autopep8
4652 (package-with-python2 python-autopep8))
4653
4654 (define-public python-distutils-extra
4655 (package
4656 (name "python-distutils-extra")
4657 (version "2.38")
4658 (source
4659 (origin
4660 (method url-fetch)
4661 (uri (string-append "https://launchpad.net/python-distutils-extra/trunk/"
4662 version "/+download/python-distutils-extra-"
4663 version ".tar.gz"))
4664 (sha256
4665 (base32
4666 "0lx15kcbby9zisx33p2h5hgakgwh2bvh0ibag8z0px4j6ifhs41x"))))
4667 (build-system python-build-system)
4668 (home-page "https://launchpad.net/python-distutils-extra/")
4669 (synopsis "Enhancements to Python's distutils")
4670 (description
4671 "The python-distutils-extra module enables you to easily integrate
4672 gettext support, themed icons, and scrollkeeper-based documentation into
4673 Python's distutils.")
4674 (license license:gpl2)))
4675
4676 (define-public python2-distutils-extra
4677 (package-with-python2 python-distutils-extra))
4678
4679 (define-public python2-elib.intl
4680 (package
4681 (name "python2-elib.intl")
4682 (version "0.0.3")
4683 (source
4684 (origin
4685 ;; This project doesn't tag releases or publish tarballs, so we take
4686 ;; source from a (semi-arbitrary, i.e. latest as of now) git commit.
4687 (method git-fetch)
4688 (uri (git-reference
4689 (url "https://github.com/dieterv/elib.intl.git")
4690 (commit "d09997cfef")))
4691 (sha256
4692 (base32
4693 "0y7vzff9xgbnaay7m0va1arl6g68ncwrvbgwl7jqlclsahzzb09d"))))
4694 (build-system python-build-system)
4695 (arguments
4696 ;; incompatible with Python 3 (exception syntax)
4697 `(#:python ,python-2
4698 #:tests? #f))
4699 (home-page "https://github.com/dieterv/elib.intl")
4700 (synopsis "Enhanced internationalization for Python")
4701 (description
4702 "The elib.intl module provides enhanced internationalization (I18N)
4703 services for your Python modules and applications.")
4704 (license license:lgpl3+)))
4705
4706 (define-public python-pillow
4707 (package
4708 (name "python-pillow")
4709 (version "3.3.3")
4710 (source
4711 (origin
4712 (method url-fetch)
4713 (uri (pypi-uri "Pillow" version))
4714 (patches (search-patches "python-pillow-freetype-2.7-test-failure.patch"))
4715 (sha256
4716 (base32
4717 "0xkv0p1d73gz0a1qaasf0ai4262g8f334j07vd60bjrxs2wr3nmj"))))
4718 (build-system python-build-system)
4719 (native-inputs
4720 `(("python-nose" ,python-nose)))
4721 (inputs
4722 `(("freetype" ,freetype)
4723 ("lcms" ,lcms)
4724 ("zlib" ,zlib)
4725 ("libjpeg" ,libjpeg)
4726 ("openjpeg" ,openjpeg)
4727 ("libtiff" ,libtiff)
4728 ("libwebp" ,libwebp)))
4729 (arguments
4730 `(#:phases (modify-phases %standard-phases
4731 (add-after
4732 'install 'check-installed
4733 (lambda* (#:key outputs inputs #:allow-other-keys)
4734 (begin
4735 (setenv "HOME" (getcwd))
4736 ;; Make installed package available for running the
4737 ;; tests
4738 (add-installed-pythonpath inputs outputs)
4739 (and (zero? (system* "python" "selftest.py"
4740 "--installed"))
4741 (zero? (system* "python" "test-installed.py"))))))
4742 (delete 'check))))
4743 (home-page "https://pypi.python.org/pypi/Pillow")
4744 (synopsis "Fork of the Python Imaging Library")
4745 (description
4746 "The Python Imaging Library adds image processing capabilities to your
4747 Python interpreter. This library provides extensive file format support, an
4748 efficient internal representation, and fairly powerful image processing
4749 capabilities. The core image library is designed for fast access to data
4750 stored in a few basic pixel formats. It should provide a solid foundation for
4751 a general image processing tool.")
4752 (license (license:x11-style
4753 "http://www.pythonware.com/products/pil/license.htm"
4754 "The PIL Software License"))))
4755
4756 (define-public python2-pillow
4757 (package-with-python2 python-pillow))
4758
4759 (define-public python-pycparser
4760 (package
4761 (name "python-pycparser")
4762 (version "2.17")
4763 (source
4764 (origin
4765 (method url-fetch)
4766 (uri (pypi-uri "pycparser" version))
4767 (sha256
4768 (base32
4769 "1dkkjri0miidqb1zcqhqljfa34fcy9k5akasgwsv6k622zlk3b0a"))))
4770 (outputs '("out" "doc"))
4771 (build-system python-build-system)
4772 (native-inputs
4773 `(("pkg-config" ,pkg-config)))
4774 (arguments
4775 `(#:phases
4776 (modify-phases %standard-phases
4777 (replace 'check
4778 (lambda _
4779 (with-directory-excursion "tests"
4780 (zero? (system* "python" "all_tests.py")))))
4781 (add-after 'install 'install-doc
4782 (lambda* (#:key outputs #:allow-other-keys)
4783 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4784 (doc (string-append data "/doc/" ,name "-" ,version))
4785 (examples (string-append doc "/examples")))
4786 (mkdir-p examples)
4787 (for-each (lambda (file)
4788 (copy-file (string-append "." file)
4789 (string-append doc file)))
4790 '("/README.rst" "/CHANGES" "/LICENSE"))
4791 (copy-recursively "examples" examples)))))))
4792 (home-page "https://github.com/eliben/pycparser")
4793 (synopsis "C parser in Python")
4794 (description
4795 "Pycparser is a complete parser of the C language, written in pure Python
4796 using the PLY parsing library. It parses C code into an AST and can serve as
4797 a front-end for C compilers or analysis tools.")
4798 (license license:bsd-3)))
4799
4800 (define-public python2-pycparser
4801 (package-with-python2 python-pycparser))
4802
4803 (define-public python-cffi
4804 (package
4805 (name "python-cffi")
4806 (version "1.10.0")
4807 (source
4808 (origin
4809 (method url-fetch)
4810 (uri (pypi-uri "cffi" version))
4811 (sha256
4812 (base32 "1mffyilq4qycm8gs4wkgb18rnqil8a9blqq77chdlshzxc8jkc5k"))))
4813 (build-system python-build-system)
4814 (outputs '("out" "doc"))
4815 (inputs
4816 `(("libffi" ,libffi)))
4817 (propagated-inputs ; required at run-time
4818 `(("python-pycparser" ,python-pycparser)))
4819 (native-inputs
4820 `(("pkg-config" ,pkg-config)
4821 ("python-sphinx" ,python-sphinx)
4822 ("python-pytest" ,python-pytest)))
4823 (arguments
4824 `(#:modules ((ice-9 ftw)
4825 (srfi srfi-26)
4826 (guix build utils)
4827 (guix build python-build-system))
4828 #:phases
4829 (modify-phases %standard-phases
4830 (replace 'check
4831 (lambda _
4832 (setenv "PYTHONPATH"
4833 (string-append
4834 (getenv "PYTHONPATH")
4835 ":" (getcwd) "/build/"
4836 (car (scandir "build" (cut string-prefix? "lib." <>)))))
4837
4838 ;; XXX The "normal" approach of setting CC and friends does
4839 ;; not work here. Is this the correct way of doing things?
4840 (substitute* "testing/embedding/test_basic.py"
4841 (("c = distutils\\.ccompiler\\.new_compiler\\(\\)")
4842 (string-append "c = distutils.ccompiler.new_compiler();"
4843 "c.set_executables(compiler='gcc',"
4844 "compiler_so='gcc',linker_exe='gcc',"
4845 "linker_so='gcc -shared')")))
4846 (substitute* "testing/cffi0/test_ownlib.py"
4847 (("'cc testownlib") "'gcc testownlib"))
4848 (zero? (system* "py.test" "-v" "c/" "testing/"))))
4849 (add-after 'install 'install-doc
4850 (lambda* (#:key outputs #:allow-other-keys)
4851 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4852 (doc (string-append data "/doc/" ,name "-" ,version))
4853 (html (string-append doc "/html")))
4854 (with-directory-excursion "doc"
4855 (system* "make" "html")
4856 (mkdir-p html)
4857 (copy-recursively "build/html" html))
4858 (copy-file "LICENSE" (string-append doc "/LICENSE"))
4859 #t))))))
4860 (home-page "http://cffi.readthedocs.org")
4861 (synopsis "Foreign function interface for Python")
4862 (description
4863 "Foreign Function Interface for Python calling C code.")
4864 (license license:expat)))
4865
4866 (define-public python2-cffi
4867 (package-with-python2 python-cffi))
4868
4869 (define-public python-xcffib
4870 (package
4871 (name "python-xcffib")
4872 (version "0.5.1")
4873 (source
4874 (origin
4875 (method url-fetch)
4876 (uri (pypi-uri "xcffib" version))
4877 (sha256
4878 (base32
4879 "09gbnmr5vn58mm8xi3fmd7fz6743cks6c46dphnxzwax6zsxmy60"))))
4880 (build-system python-build-system)
4881 (inputs
4882 `(("libxcb" ,libxcb)))
4883 (propagated-inputs
4884 `(("python-cffi" ,python-cffi) ; used at run time
4885 ("python-six" ,python-six)))
4886 (arguments
4887 `(;; FIXME: Tests need more work. See ".travis.yml" in the repository.
4888 #:tests? #f
4889 #:phases
4890 (modify-phases %standard-phases
4891 (add-after 'unpack 'fix-libxcb-path
4892 (lambda* (#:key inputs #:allow-other-keys)
4893 (let ((libxcb (assoc-ref inputs "libxcb")))
4894 (substitute* '("xcffib/__init__.py")
4895 (("^soname = \"") (string-append "soname = \"" libxcb "/lib/")))
4896 #t)))
4897 (add-after 'install 'install-doc
4898 (lambda* (#:key outputs #:allow-other-keys)
4899 (let ((doc (string-append (assoc-ref outputs "out") "/share"
4900 "/doc/" ,name "-" ,version)))
4901 (mkdir-p doc)
4902 (copy-file "README.md"
4903 (string-append doc "/README.md"))
4904 #t))))))
4905 (home-page "https://github.com/tych0/xcffib")
4906 (synopsis "XCB Python bindings")
4907 (description
4908 "Xcffib is a replacement for xpyb, an XCB Python bindings. It adds
4909 support for Python 3 and PyPy. It is based on cffi.")
4910 (license license:expat)))
4911
4912 (define-public python2-xcffib
4913 (package-with-python2 python-xcffib))
4914
4915 (define-public python-cairocffi
4916 (package
4917 (name "python-cairocffi")
4918 (version "0.8.0")
4919 (source
4920 (origin
4921 (method url-fetch)
4922 ;; The archive on pypi is missing the 'utils' directory!
4923 (uri (string-append "https://github.com/Kozea/cairocffi/archive/v"
4924 version ".tar.gz"))
4925 (file-name (string-append name "-" version ".tar.gz"))
4926 (sha256
4927 (base32
4928 "1rk2dvy3fxrga6bvvxc2fi5lbaynm5h4a0w0aaxyn3bc77rszjg9"))))
4929 (build-system python-build-system)
4930 (outputs '("out" "doc"))
4931 (inputs
4932 `(("gdk-pixbuf" ,gdk-pixbuf)
4933 ("cairo" ,cairo)))
4934 (native-inputs
4935 `(("pkg-config" ,pkg-config)
4936 ("python-sphinx" ,python-sphinx)
4937 ("python-docutils" ,python-docutils)))
4938 (propagated-inputs
4939 `(("python-xcffib" ,python-xcffib))) ; used at run time
4940 (arguments
4941 `(;; FIXME: Tests cannot find 'libcairo.so.2'.
4942 #:tests? #f
4943 #:phases
4944 (modify-phases %standard-phases
4945 (add-after 'install 'install-doc
4946 (lambda* (#:key inputs outputs #:allow-other-keys)
4947 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4948 (doc (string-append data "/doc/" ,name "-" ,version))
4949 (html (string-append doc "/html")))
4950 (setenv "LD_LIBRARY_PATH"
4951 (string-append (assoc-ref inputs "cairo") "/lib" ":"
4952 (assoc-ref inputs "gdk-pixbuf") "/lib"))
4953 (setenv "LANG" "en_US.UTF-8")
4954 (mkdir-p html)
4955 (for-each (lambda (file)
4956 (copy-file (string-append "." file)
4957 (string-append doc file)))
4958 '("/README.rst" "/CHANGES" "/LICENSE"))
4959 (system* "python" "setup.py" "build_sphinx")
4960 (copy-recursively "docs/_build/html" html)
4961 #t))))))
4962 (home-page "https://github.com/Kozea/cairocffi")
4963 (synopsis "Python bindings and object-oriented API for Cairo")
4964 (description
4965 "Cairocffi is a CFFI-based drop-in replacement for Pycairo, a set of
4966 Python bindings and object-oriented API for cairo. Cairo is a 2D vector
4967 graphics library with support for multiple backends including image buffers,
4968 PNG, PostScript, PDF, and SVG file output.")
4969 (license license:bsd-3)))
4970
4971 (define-public python2-cairocffi
4972 (package-with-python2 python-cairocffi))
4973
4974 (define-public python-decorator
4975 (package
4976 (name "python-decorator")
4977 (version "4.0.10")
4978 (source
4979 (origin
4980 (method url-fetch)
4981 (uri (pypi-uri "decorator" version))
4982 (sha256
4983 (base32 "0w7hg59hlpq74jpyja4yfryap0ccjvchgpkfp20rhj9krgnrhvlw"))))
4984 (build-system python-build-system)
4985 (arguments '(#:tests? #f)) ; no test target
4986 (home-page "https://pypi.python.org/pypi/decorator/")
4987 (synopsis "Python module to simplify usage of decorators")
4988 (description
4989 "The aim of the decorator module is to simplify the usage of decorators
4990 for the average programmer, and to popularize decorators usage giving examples
4991 of useful decorators, such as memoize, tracing, redirecting_stdout, locked,
4992 etc. The core of this module is a decorator factory.")
4993 (license license:expat)))
4994
4995 (define-public python2-decorator
4996 (package-with-python2 python-decorator))
4997
4998 (define-public python-drmaa
4999 (package
5000 (name "python-drmaa")
5001 (version "0.7.7")
5002 (source
5003 (origin
5004 (method url-fetch)
5005 (uri (pypi-uri "drmaa" version))
5006 (sha256
5007 (base32 "0xzqriqyvk5b8hszbavsyxd29wm3sxirm8zvvdm73rs2iq7w4hkx"))))
5008 (build-system python-build-system)
5009 ;; The test suite requires libdrmaa which is provided by the cluster
5010 ;; environment. At runtime the environment variable DRMAA_LIBRARY_PATH
5011 ;; should be set to the path of the libdrmaa library.
5012 (arguments '(#:tests? #f))
5013 (native-inputs
5014 `(("python-nose" ,python-nose)))
5015 (home-page "https://pypi.python.org/pypi/drmaa")
5016 (synopsis "Python bindings for the DRMAA library")
5017 (description
5018 "A Python package for Distributed Resource Management (DRM) job
5019 submission and control. This package is an implementation of the DRMAA 1.0
5020 Python language binding specification.")
5021 (license license:bsd-3)))
5022
5023 (define-public python2-drmaa
5024 (package-with-python2 python-drmaa))
5025
5026 (define-public python-gridmap
5027 (package
5028 (name "python-gridmap")
5029 (version "0.13.0")
5030 (source
5031 (origin
5032 (method url-fetch)
5033 (uri (string-append
5034 "https://github.com/pygridtools/gridmap/archive/v"
5035 version ".tar.gz"))
5036 (file-name (string-append name "-" version ".tar.gz"))
5037 (sha256
5038 (base32 "1gzjg2k6f14i1msm2b0ax8d9ds1hvk6qd5nlaivg8m4cxqp4cp1x"))))
5039 (build-system python-build-system)
5040 (arguments
5041 '(#:tests? #f)) ; FIXME: Requires python-cherrypy.
5042 (propagated-inputs
5043 `(("python-psutil" ,python-psutil)
5044 ("python-drmaa" ,python-drmaa)
5045 ("python-pyzmq" ,python-pyzmq)))
5046 (home-page "https://github.com/pygridtools/gridmap")
5047 (synopsis "Create jobs on a cluster directly from Python")
5048 (description
5049 "Gridmap is a Python package to allow you to easily create jobs on the
5050 cluster directly from Python. You can directly map Python functions onto the
5051 cluster without needing to write any wrapper code yourself.")
5052 (license license:gpl3+)))
5053
5054 (define-public python2-gridmap
5055 (package-with-python2 python-gridmap))
5056
5057 (define-public python-pexpect
5058 (package
5059 (name "python-pexpect")
5060 (version "4.2.1")
5061 (source
5062 (origin
5063 (method url-fetch)
5064 (uri (pypi-uri "pexpect" version))
5065 (sha256
5066 (base32 "14ls7k99pwvl21zqv65kzrhccv50j89m5ij1hf0slmsvlxjj84rx"))))
5067 (build-system python-build-system)
5068 (arguments
5069 `(#:phases
5070 (modify-phases %standard-phases
5071 (add-before 'check 'prepare-tests
5072 (lambda _
5073 (substitute* (find-files "tests")
5074 (("/bin/ls") (which "ls"))
5075 (("/bin/echo") (which "echo"))
5076 (("/bin/which") (which "which"))
5077 ;; Many tests try to use the /bin directory which
5078 ;; is not present in the build environment.
5079 ;; Use one that's non-empty and unlikely to change.
5080 (("/bin'") "/dev'"))
5081 ;; XXX: Socket connection test gets "Connection reset by peer".
5082 ;; Why does it not work? Delete for now.
5083 (delete-file "tests/test_socket.py")
5084 #t))
5085 (replace 'check (lambda _ (zero? (system* "nosetests" "-v")))))))
5086 (native-inputs
5087 `(("python-nose" ,python-nose)
5088 ("python-pytest" ,python-pytest-3.0)
5089 ("man-db" ,man-db)
5090 ("which" ,which)))
5091 (propagated-inputs
5092 `(("python-ptyprocess" ,python-ptyprocess)))
5093 (home-page "http://pexpect.readthedocs.org/")
5094 (synopsis "Controlling interactive console applications")
5095 (description
5096 "Pexpect is a pure Python module for spawning child applications;
5097 controlling them; and responding to expected patterns in their output.
5098 Pexpect works like Don Libes’ Expect. Pexpect allows your script to spawn a
5099 child application and control it as if a human were typing commands.")
5100 (license license:isc)))
5101
5102 (define-public python2-pexpect
5103 (package-with-python2 python-pexpect))
5104
5105 (define-public python-setuptools-scm
5106 (package
5107 (name "python-setuptools-scm")
5108 (version "1.15.0")
5109 (source (origin
5110 (method url-fetch)
5111 (uri (pypi-uri "setuptools_scm" version))
5112 (sha256
5113 (base32
5114 "0bwyc5markib0i7i2qlyhdzxhiywzxbkfiapldma8m91m82jvwfs"))))
5115 (build-system python-build-system)
5116 (home-page "https://github.com/pypa/setuptools_scm/")
5117 (synopsis "Manage Python package versions in SCM metadata")
5118 (description
5119 "Setuptools_scm handles managing your Python package versions in
5120 @dfn{software configuration management} (SCM) metadata instead of declaring
5121 them as the version argument or in a SCM managed file.")
5122 (license license:expat)))
5123
5124 (define-public python2-setuptools-scm
5125 (package-with-python2 python-setuptools-scm))
5126
5127 (define-public python-pathpy
5128 (package
5129 (name "python-pathpy")
5130 (version "8.1.1")
5131 (source
5132 (origin
5133 (method url-fetch)
5134 (uri (string-append "https://pypi.python.org/packages/source/p/"
5135 "path.py/path.py-" version ".tar.gz"))
5136 (sha256
5137 (base32 "1p8s1l2vfkqhqxdhqlj0g1jjw4f1as2frr35sjcpjjpd5a89y41f"))))
5138 (outputs '("out" "doc"))
5139 (build-system python-build-system)
5140 (propagated-inputs
5141 `(("python-appdirs" ,python-appdirs)))
5142 (native-inputs
5143 `(("python-setuptools-scm" ,python-setuptools-scm)
5144 ("python-sphinx" ,python-sphinx)
5145 ("python-rst.linker" ,python-rst.linker)
5146 ("python-pytest" ,python-pytest)
5147 ("python-pytest-runner" ,python-pytest-runner)))
5148 (arguments
5149 `(#:phases
5150 (modify-phases %standard-phases
5151 (add-after 'build 'build-doc
5152 (lambda _
5153 (setenv "LANG" "en_US.UTF-8")
5154 (zero? (system* "python" "setup.py" "build_sphinx"))))
5155 (add-after 'install 'install-doc
5156 (lambda* (#:key outputs #:allow-other-keys)
5157 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
5158 (doc (string-append data "/doc/" ,name "-" ,version))
5159 (html (string-append doc "/html")))
5160 (mkdir-p html)
5161 (for-each (lambda (file)
5162 (copy-file file (string-append doc "/" file)))
5163 '("README.rst" "CHANGES.rst"))
5164 (copy-recursively "build/sphinx/html" html)))))))
5165 (home-page "https://github.com/jaraco/path.py")
5166 (synopsis "Python module wrapper for built-in os.path")
5167 (description
5168 "@code{path.py} implements path objects as first-class entities, allowing
5169 common operations on files to be invoked on those path objects directly.")
5170 (license license:expat)))
5171
5172 (define-public python2-pathpy
5173 (package-with-python2 python-pathpy))
5174
5175 (define-public python-pickleshare
5176 (package
5177 (name "python-pickleshare")
5178 (version "0.5")
5179 (source
5180 (origin
5181 (method url-fetch)
5182 (uri (string-append "https://pypi.python.org/packages/source/p/"
5183 "pickleshare/pickleshare-" version ".tar.gz"))
5184 (sha256
5185 (base32 "11ljr90j3p6qswdrbl7p4cjb2i93f6vn0vx9anzpshsx0d2mggn0"))))
5186 (build-system python-build-system)
5187 (propagated-inputs
5188 `(("python-pathpy" ,python-pathpy)))
5189 (home-page "https://github.com/vivainio/pickleshare")
5190 (synopsis "Tiny key value database with concurrency support")
5191 (description
5192 "PickleShare is a small ‘shelve’-like datastore with concurrency support.
5193 Like shelve, a PickleShareDB object acts like a normal dictionary. Unlike
5194 shelve, many processes can access the database simultaneously. Changing a
5195 value in database is immediately visible to other processes accessing the same
5196 database. Concurrency is possible because the values are stored in separate
5197 files. Hence the “database” is a directory where all files are governed by
5198 PickleShare.")
5199 (license license:expat)))
5200
5201 (define-public python2-pickleshare
5202 (package-with-python2 python-pickleshare))
5203
5204 (define-public python-simplegeneric
5205 (package
5206 (name "python-simplegeneric")
5207 (version "0.8.1")
5208 (source
5209 (origin
5210 (method url-fetch)
5211 (uri (string-append "https://pypi.python.org/packages/source/s/"
5212 "simplegeneric/simplegeneric-" version ".zip"))
5213 (sha256
5214 (base32 "0wwi1c6md4vkbcsfsf8dklf3vr4mcdj4mpxkanwgb6jb1432x5yw"))))
5215 (build-system python-build-system)
5216 (native-inputs
5217 `(("unzip" ,unzip)))
5218 (home-page "http://cheeseshop.python.org/pypi/simplegeneric")
5219 (synopsis "Python module for simple generic functions")
5220 (description
5221 "The simplegeneric module lets you define simple single-dispatch generic
5222 functions, akin to Python’s built-in generic functions like @code{len()},
5223 @code{iter()} and so on. However, instead of using specially-named methods,
5224 these generic functions use simple lookup tables, akin to those used by
5225 e.g. @code{pickle.dump()} and other generic functions found in the Python
5226 standard library.")
5227 (license license:zpl2.1)))
5228
5229 (define-public python2-simplegeneric
5230 (package-with-python2 python-simplegeneric))
5231
5232 (define-public python-ipython-genutils
5233 ;; TODO: This package is retired, check if can be removed, see description.
5234 (package
5235 (name "python-ipython-genutils")
5236 (version "0.1.0")
5237 (source
5238 (origin
5239 (method url-fetch)
5240 (uri (string-append "https://pypi.python.org/packages/source/i/"
5241 "ipython_genutils/ipython_genutils-"
5242 version ".tar.gz"))
5243 (sha256
5244 (base32 "19l2pp1c64ansr89l3cqh19jdi2ixhssdzx0vz4n6r52a6i281is"))))
5245 (build-system python-build-system)
5246 (arguments `(#:tests? #f)) ; no tests
5247 (home-page "http://ipython.org")
5248 (synopsis "Vestigial utilities from IPython")
5249 (description
5250 "This package provides retired utilities from IPython. No packages
5251 outside IPython/Jupyter should depend on it.
5252
5253 This package shouldn't exist. It contains some common utilities shared by
5254 Jupyter and IPython projects during The Big Split. As soon as possible, those
5255 packages will remove their dependency on this, and this package will go
5256 away.")
5257 (license license:bsd-3)))
5258
5259 (define-public python2-ipython-genutils
5260 (package-with-python2 python-ipython-genutils))
5261
5262 (define-public python-traitlets
5263 (package
5264 (name "python-traitlets")
5265 (version "4.2.0")
5266 (source
5267 (origin
5268 (method url-fetch)
5269 (uri (pypi-uri "traitlets" version))
5270 (sha256
5271 (base32
5272 "1afy08sa5n9gnkvh3da49c16zkyv598vchv0p1hp7zzjy8895hz4"))))
5273 (build-system python-build-system)
5274 (arguments
5275 `(#:phases
5276 (modify-phases %standard-phases
5277 (replace 'check (lambda _ (zero? (system* "nosetests")))))))
5278 (propagated-inputs
5279 `(("python-ipython-genutils" ,python-ipython-genutils)
5280 ("python-decorator" ,python-decorator)))
5281 (native-inputs
5282 `(("python-mock" ,python-mock)
5283 ("python-nose" ,python-nose)))
5284 (home-page "http://ipython.org")
5285 (synopsis "Configuration system for Python applications")
5286 (description
5287 "Traitlets is a framework that lets Python classes have attributes with
5288 type checking, dynamically calculated default values, and ‘on change’
5289 callbacks. The package also includes a mechanism to use traitlets for
5290 configuration, loading values from files or from command line arguments. This
5291 is a distinct layer on top of traitlets, so you can use traitlets in your code
5292 without using the configuration machinery.")
5293 (license license:bsd-3)))
5294
5295 (define-public python2-traitlets
5296 (package-with-python2 python-traitlets))
5297
5298 (define-public python-jupyter-core
5299 (package
5300 (name "python-jupyter-core")
5301 (version "4.2.1")
5302 (source
5303 (origin
5304 (method url-fetch)
5305 (uri (string-append (pypi-uri "jupyter_core" version)))
5306 (sha256
5307 (base32
5308 "1cy7inv218dgh4m1fbzbsiqpz733ylgjrj62jxqpfzs3r2cm7ic9"))))
5309 (build-system python-build-system)
5310 ;; FIXME: not sure how to run the tests
5311 (arguments `(#:tests? #f))
5312 (propagated-inputs
5313 `(("python-traitlets" ,python-traitlets)))
5314 (home-page "http://jupyter.org/")
5315 (synopsis "Jupyter base package")
5316 (description
5317 "Jupyter core is the base package on which Jupyter projects rely.")
5318 (license license:bsd-3)))
5319
5320 (define-public python2-jupyter-core
5321 (package-with-python2 python-jupyter-core))
5322
5323 (define-public python-jupyter-client
5324 (package
5325 (name "python-jupyter-client")
5326 (version "4.4.0")
5327 (source
5328 (origin
5329 (method url-fetch)
5330 (uri (pypi-uri "jupyter_client" version))
5331 (sha256
5332 (base32
5333 "1vjjrpjw7k5sh982pbjnslv7byfbfazjw9g92jvs7dz5qbx556n9"))))
5334 (build-system python-build-system)
5335 ;; Tests fail because of missing native python kernel which I assume is
5336 ;; provided by the ipython package, which we cannot use because it would
5337 ;; cause a dependency cycle.
5338 (arguments `(#:tests? #f))
5339 (propagated-inputs
5340 `(("python-pyzmq" ,python-pyzmq)
5341 ("python-traitlets" ,python-traitlets)
5342 ("python-jupyter-core" ,python-jupyter-core)))
5343 (home-page "http://jupyter.org/")
5344 (synopsis "Jupyter protocol implementation and client libraries")
5345 (description
5346 "The @code{jupyter_client} package contains the reference implementation
5347 of the Jupyter protocol. It also provides client and kernel management APIs
5348 for working with kernels, and the @code{jupyter kernelspec} entrypoint for
5349 installing @code{kernelspec}s for use with Jupyter frontends.")
5350 (license license:bsd-3)))
5351
5352 (define-public python2-jupyter-client
5353 (package-with-python2 python-jupyter-client))
5354
5355 (define-public python-ipykernel
5356 (package
5357 (name "python-ipykernel")
5358 (version "4.5.2")
5359 (source
5360 (origin
5361 (method url-fetch)
5362 (uri (pypi-uri "ipykernel" version))
5363 (sha256
5364 (base32 "0qllv0k6zzv1r1cj1x2ygxmlrrqhbslzj8rc6r6fg3kc1rgz4m2s"))))
5365 (build-system python-build-system)
5366 ;; The tests load a submodule of IPython. However, IPython itself depends
5367 ;; on ipykernel.
5368 (arguments `(#:tests? #f))
5369 (propagated-inputs
5370 ;; imported at runtime during connect
5371 `(("python-jupyter-client" ,python-jupyter-client)))
5372 (home-page "http://ipython.org")
5373 (synopsis "IPython Kernel for Jupyter")
5374 (description
5375 "This package provides the IPython kernel for Jupyter.")
5376 (license license:bsd-3)))
5377
5378 (define-public python2-ipykernel
5379 (package-with-python2 python-ipykernel))
5380
5381 (define-public python-testpath
5382 (package
5383 (name "python-testpath")
5384 (version "0.2")
5385 (source
5386 (origin
5387 (method url-fetch)
5388 (uri (string-append "https://github.com/jupyter/testpath/archive/"
5389 version ".tar.gz"))
5390 (file-name (string-append name "-" version ".tar.gz"))
5391 (sha256
5392 (base32
5393 "04kh3fgvmqz6cfcw79q70qwjz7ib7lxm27cc548iy2rpr33qqf55"))))
5394 (build-system python-build-system)
5395 (arguments
5396 `(#:tests? #f ; this package does not even have a setup.py
5397 #:modules ((guix build python-build-system)
5398 (guix build utils)
5399 (srfi srfi-1))
5400 #:imported-modules (,@%python-build-system-modules
5401 (srfi srfi-1))
5402 #:phases
5403 (modify-phases %standard-phases
5404 (delete 'install)
5405 (replace 'build
5406 (lambda* (#:key inputs outputs #:allow-other-keys)
5407 (let* ((version (last
5408 (string-split (assoc-ref inputs "python") #\-)))
5409 (x.y (string-join (take (string-split version #\.) 2)
5410 "."))
5411 (dir (string-append
5412 (assoc-ref outputs "out")
5413 "/lib/python" x.y "/site-packages/testpath")))
5414 (mkdir-p dir)
5415 (copy-recursively "testpath" dir))
5416 #t)))))
5417 (home-page "https://github.com/takluyver/testpath")
5418 (synopsis "Test utilities for code working with files and commands")
5419 (description
5420 "Testpath is a collection of utilities for Python code working with files
5421 and commands. It contains functions to check things on the filesystem, and
5422 tools for mocking system commands and recording calls to those.")
5423 (license license:expat)))
5424
5425 (define-public python2-testpath
5426 (package-with-python2 python-testpath))
5427
5428 (define-public python-ipython
5429 (package
5430 (name "python-ipython")
5431 (version "5.2.2")
5432 (source
5433 (origin
5434 (method url-fetch)
5435 (uri (pypi-uri "ipython" version ".tar.gz"))
5436 (sha256
5437 (base32 "1qhjwa9cyz1np7rhv3p4ip13lkgbqsad62l24xkwiq1ic2gwiqbf"))))
5438 (build-system python-build-system)
5439 (outputs '("out" "doc"))
5440 (propagated-inputs
5441 `(("python-pyzmq" ,python-pyzmq)
5442 ("python-prompt-toolkit" ,python-prompt-toolkit)
5443 ("python-terminado" ,python-terminado)
5444 ("python-matplotlib" ,python-matplotlib)
5445 ("python-numpy" ,python-numpy)
5446 ("python-numpydoc" ,python-numpydoc)
5447 ("python-jinja2" ,python-jinja2)
5448 ("python-mistune" ,python-mistune)
5449 ("python-pexpect" ,python-pexpect)
5450 ("python-pickleshare" ,python-pickleshare)
5451 ("python-simplegeneric" ,python-simplegeneric)
5452 ("python-jsonschema" ,python-jsonschema)
5453 ("python-traitlets" ,python-traitlets)
5454 ("python-ipykernel" ,python-ipykernel)
5455 ("python-nbformat" ,python-nbformat)
5456 ("python-pygments" ,python-pygments)))
5457 (inputs
5458 `(("readline" ,readline)
5459 ("which" ,which)))
5460 (native-inputs
5461 `(("graphviz" ,graphviz)
5462 ("pkg-config" ,pkg-config)
5463 ("python-requests" ,python-requests) ;; for tests
5464 ("python-testpath" ,python-testpath)
5465 ("python-nose" ,python-nose)
5466 ("python-sphinx" ,python-sphinx)
5467 ("python-shpinx-rtd-theme" ,python-sphinx-rtd-theme)
5468 ;; FIXME: It's possible that a smaller union would work just as well.
5469 ("texlive" ,(texlive-union (list texlive-fonts-amsfonts
5470 texlive-fonts-ec
5471 texlive-generic-ifxetex
5472 texlive-generic-pdftex
5473 texlive-latex-amsfonts
5474 texlive-latex-capt-of
5475 texlive-latex-cmap
5476 texlive-latex-environ
5477 texlive-latex-eqparbox
5478 texlive-latex-etoolbox
5479 texlive-latex-expdlist
5480 texlive-latex-fancyhdr
5481 texlive-latex-fancyvrb
5482 texlive-latex-fncychap
5483 texlive-latex-float
5484 texlive-latex-framed
5485 texlive-latex-geometry
5486 texlive-latex-graphics
5487 texlive-latex-hyperref
5488 texlive-latex-mdwtools
5489 texlive-latex-multirow
5490 texlive-latex-oberdiek
5491 texlive-latex-parskip
5492 texlive-latex-preview
5493 texlive-latex-tabulary
5494 texlive-latex-threeparttable
5495 texlive-latex-titlesec
5496 texlive-latex-trimspaces
5497 texlive-latex-ucs
5498 texlive-latex-upquote
5499 texlive-latex-url
5500 texlive-latex-varwidth
5501 texlive-latex-wrapfig)))
5502 ("texinfo" ,texinfo)))
5503 (arguments
5504 `(#:phases
5505 (modify-phases %standard-phases
5506 (add-after
5507 'install 'install-doc
5508 (lambda* (#:key inputs outputs #:allow-other-keys)
5509 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
5510 (doc (string-append data "/doc/" ,name "-" ,version))
5511 (html (string-append doc "/html"))
5512 (man1 (string-append data "/man/man1"))
5513 (info (string-append data "/info"))
5514 (examples (string-append doc "/examples"))
5515 (python-arg (string-append "PYTHON=" (which "python"))))
5516 (setenv "LANG" "en_US.utf8")
5517 ;; Make installed package available for running the tests
5518 (add-installed-pythonpath inputs outputs)
5519 (with-directory-excursion "docs"
5520 ;; FIXME: pdf fails to build
5521 ;;(system* "make" "pdf" "PAPER=a4")
5522 (system* "make" python-arg "html")
5523 (system* "make" python-arg "info"))
5524 (copy-recursively "docs/man" man1)
5525 (copy-recursively "examples" examples)
5526 (copy-recursively "docs/build/html" html)
5527 ;; (copy-file "docs/build/latex/ipython.pdf"
5528 ;; (string-append doc "/ipython.pdf"))
5529 (mkdir-p info)
5530 (copy-file "docs/build/texinfo/ipython.info"
5531 (string-append info "/ipython.info"))
5532 (copy-file "COPYING.rst" (string-append doc "/COPYING.rst")))))
5533 ;; Tests can only be run after the library has been installed and not
5534 ;; within the source directory.
5535 (delete 'check)
5536 (add-after
5537 'install 'check
5538 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
5539 (if tests?
5540 (with-directory-excursion "/tmp"
5541 ;; Make installed package available for running the tests
5542 (add-installed-pythonpath inputs outputs)
5543 (setenv "HOME" "/tmp/") ;; required by a test
5544 (zero? (system* (string-append (assoc-ref outputs "out")
5545 "/bin/iptest"))))
5546 #t)))
5547 (add-before
5548 'install 'fix-tests
5549 (lambda* (#:key inputs #:allow-other-keys)
5550 (substitute* "./IPython/utils/_process_posix.py"
5551 (("/usr/bin/env', 'which") (which "which")))
5552 (substitute* "./IPython/core/tests/test_inputtransformer.py"
5553 (("#!/usr/bin/env python")
5554 (string-append "#!" (which "python"))))
5555 ;; Disable 1 failing test
5556 (substitute* "./IPython/core/tests/test_magic.py"
5557 (("def test_dirops\\(\\):" all)
5558 (string-append "@dec.skipif(True)\n" all))))))))
5559 (home-page "http://ipython.org")
5560 (synopsis "IPython is a tool for interactive computing in Python")
5561 (description
5562 "IPython provides a rich architecture for interactive computing with:
5563 Powerful interactive shells, a browser-based notebook, support for interactive
5564 data visualization, embeddable interpreters and tools for parallel
5565 computing.")
5566 (license license:bsd-3)
5567 (properties `((python2-variant . ,(delay python2-ipython))))))
5568
5569 (define-public python2-ipython
5570 (let ((ipython (package-with-python2 (strip-python2-variant python-ipython))))
5571 (package
5572 (inherit ipython)
5573 ;; FIXME: add pyreadline once available.
5574 (propagated-inputs
5575 `(("python2-backports-shutil-get-terminal-size"
5576 ,python2-backports-shutil-get-terminal-size)
5577 ("python2-pathlib2" ,python2-pathlib2)
5578 ,@(package-propagated-inputs ipython)))
5579 (native-inputs
5580 `(("python2-mock" ,python2-mock)
5581 ,@(package-native-inputs ipython))))))
5582
5583 (define-public python-isodate
5584 (package
5585 (name "python-isodate")
5586 (version "0.5.4")
5587 (source
5588 (origin
5589 (method url-fetch)
5590 (uri (pypi-uri "isodate" version))
5591 (sha256
5592 (base32
5593 "0cafaiwixgpxwh9dsd28qb0dbzsj6xpxjdkyk30ns91ps10mq422"))))
5594 (build-system python-build-system)
5595 (home-page
5596 "http://cheeseshop.python.org/pypi/isodate")
5597 (synopsis
5598 "Python date parser and formatter")
5599 (description
5600 "Python-isodate is a python module for parsing and formatting
5601 ISO 8601 dates, time and duration.")
5602 (license license:bsd-3)))
5603
5604 (define-public python2-isodate
5605 (package-with-python2 python-isodate))
5606
5607 (define-public python-html5lib
5608 (package
5609 (name "python-html5lib")
5610 (version "1.0b10")
5611 (source
5612 (origin
5613 (method url-fetch)
5614 (uri (pypi-uri "html5lib" version))
5615 (sha256
5616 (base32
5617 "1yd068a5c00wd0ajq0hqimv7fd82lhrw0w3s01vbhy9bbd6xapqd"))))
5618 (build-system python-build-system)
5619 (propagated-inputs
5620 `(("python-six" ,python-six)
5621 ("python-webencodings" ,python-webencodings)))
5622 (arguments
5623 `(#:test-target "check"))
5624 (home-page
5625 "https://github.com/html5lib/html5lib-python")
5626 (synopsis
5627 "Python HTML parser based on the WHATWG HTML specifcation")
5628 (description
5629 "Html5lib is an HTML parser based on the WHATWG HTML specifcation
5630 and written in Python.")
5631 (license license:expat)))
5632
5633 (define-public python2-html5lib
5634 (package-with-python2 python-html5lib))
5635
5636 ;; Needed for python-bleach, a dependency of python-notebook
5637 (define-public python-html5lib-0.9
5638 (package
5639 (inherit python-html5lib)
5640 (version "0.999")
5641 (source
5642 (origin
5643 (method url-fetch)
5644 (uri (pypi-uri "html5lib" version))
5645 (sha256
5646 (base32
5647 "17n4zfsj6ynmbwdwviywmj8r6nzr3xvfx2zs0xhndmvm51z7z263"))))))
5648
5649 (define-public python2-html5lib-0.9
5650 (package-with-python2 python-html5lib-0.9))
5651
5652 (define-public python-webencodings
5653 (package
5654 (name "python-webencodings")
5655 (version "0.5")
5656 (source (origin
5657 (method url-fetch)
5658 (uri (pypi-uri "webencodings" version))
5659 (sha256
5660 (base32
5661 "015rw7662lkpb9aqiqah2hbizk6w531badqwjpz41rr47glmxid5"))))
5662 (build-system python-build-system)
5663 (arguments
5664 '(#:phases
5665 (modify-phases %standard-phases
5666 (replace 'check
5667 (lambda _
5668 (zero? (system* "py.test" "-v" "webencodings/tests.py")))))))
5669 (native-inputs
5670 `(("python-pytest" ,python-pytest)))
5671 (home-page "https://github.com/SimonSapin/python-webencodings")
5672 (synopsis "Character encoding aliases for legacy web content")
5673 (description
5674 "In order to be compatible with legacy web content when interpreting
5675 something like @code{Content-Type: text/html; charset=latin1}, tools need
5676 to use a particular set of aliases for encoding labels as well as some
5677 overriding rules. For example, @code{US-ASCII} and @code{iso-8859-1} on
5678 the web are actually aliases for @code{windows-1252}, and an @code{UTF-8}
5679 or @code{UTF-16} BOM takes precedence over any other encoding declaration.
5680 The WHATWG @url{https://encoding.spec.whatwg.org/,Encoding} standard
5681 defines all such details so that implementations do not have to
5682 reverse-engineer each other.
5683
5684 This module implements the Encoding standard and has encoding labels and
5685 BOM detection, but the actual implementation for encoders and decoders
5686 is Python’s.")
5687 (license license:bsd-3)))
5688
5689 (define-public python2-webencodings
5690 (package-with-python2 python-webencodings))
5691
5692 (define-public python-urwid
5693 (package
5694 (name "python-urwid")
5695 (version "1.3.1")
5696 (source
5697 (origin
5698 (method url-fetch)
5699 (uri (pypi-uri "urwid" version))
5700 (sha256
5701 (base32
5702 "18cnd1wdjcas08x5qwa5ayw6jsfcn33w4d9f7q3s29fy6qzc1kng"))))
5703 (build-system python-build-system)
5704 (arguments
5705 `(#:phases
5706 (modify-phases %standard-phases
5707 ;; Disable failing test. Bug filed upstream:
5708 ;; https://github.com/wardi/urwid/issues/164
5709 ;; TODO: check again for python-urwid > 1.3.1 or python > 3.4.3.
5710 (add-after 'unpack 'disable-failing-test
5711 (lambda _
5712 (substitute* "urwid/tests/test_event_loops.py"
5713 (("test_remove_watch_file")
5714 "disable_remove_watch_file")))))))
5715 (home-page "http://urwid.org")
5716 (synopsis "Console user interface library for Python")
5717 (description
5718 "Urwid is a curses-based UI/widget library for Python. It includes many
5719 features useful for text console applications.")
5720 (license license:lgpl2.1+)))
5721
5722 (define-public python2-urwid
5723 (let ((python2-urwid (package-with-python2 python-urwid)))
5724 (package
5725 (inherit python2-urwid)
5726 (arguments
5727 (append
5728 '(#:phases
5729 (modify-phases %standard-phases
5730 ;; Disable the vterm tests because of non-deterministic failures
5731 ;; with Python 2. See https://github.com/urwid/urwid/issues/230.
5732 (add-after 'unpack 'delete-test_vterm.py
5733 (delete-file "urwid/tests/test_vterm.py"))))
5734 (package-arguments python-urwid))))))
5735
5736 (define-public python-openid
5737 (package
5738 (name "python-openid")
5739 (version "3.0.10")
5740 (source
5741 (origin
5742 (method url-fetch)
5743 (uri (pypi-uri "python3-openid" version))
5744 (sha256
5745 (base32
5746 "1x3nh3fycqfn43jp5j5pb4q4y2jxp4mdka4absaa3bc0078qd758"))))
5747 (build-system python-build-system)
5748 (arguments
5749 `(#:phases
5750 (modify-phases %standard-phases
5751 (replace 'check
5752 (lambda _
5753 (zero? (system* "./admin/runtests")))))))
5754 (properties `((python2-variant . ,(delay python2-openid))))
5755 (propagated-inputs
5756 `(("python-defusedxml" ,python-defusedxml)))
5757 (native-inputs
5758 `(("python-psycopg2" ,python-psycopg2)
5759 ("python-django" ,python-django)))
5760 (home-page "https://github.com/necaris/python3-openid")
5761 (synopsis "OpenID support for servers and consumers")
5762 (description "This library provides OpenID authentication for Python, both
5763 for clients and servers.")
5764 (license license:asl2.0)))
5765
5766 (define-public python2-openid
5767 (package
5768 (name "python2-openid")
5769 (version "2.2.5")
5770 (source
5771 (origin
5772 (method url-fetch)
5773 (uri (pypi-uri "python-openid" version))
5774 (sha256
5775 (base32
5776 "1vvhxlghjan01snfdc4k7ykd80vkyjgizwgg9bncnin8rqz1ricj"))))
5777 (build-system python-build-system)
5778 (arguments
5779 ;; Python 3 support is in `python3-openid`, a separate package.
5780 `(#:python ,python-2))
5781 (home-page "https://github.com/openid/python-openid")
5782 (synopsis "OpenID support for servers and consumers")
5783 (description "This library provides OpenID authentication for Python, both
5784 for clients and servers.")
5785 (license license:asl2.0)))
5786
5787 (define-public python-urwidtrees
5788 (package
5789 (name "python-urwidtrees")
5790 (version "1.0.2")
5791 (source
5792 (origin
5793 (method url-fetch)
5794 ;; package author intends on distributing via github rather than pypi:
5795 ;; https://github.com/pazz/alot/issues/877#issuecomment-230173331
5796 (uri (string-append "https://github.com/pazz/urwidtrees/archive/"
5797 version ".tar.gz"))
5798 (file-name (string-append name "-" version ".tar.gz"))
5799 (sha256
5800 (base32
5801 "0d30lyd3s2a97rhqfax5w9ssqds2z6aydqx3c6j2c2lk3cb4ngvh"))))
5802 (build-system python-build-system)
5803 (arguments
5804 '(#:tests? #f)) ; no tests
5805 (propagated-inputs `(("python-urwid" ,python-urwid)))
5806 (home-page "https://github.com/pazz/urwidtrees")
5807 (synopsis "Tree widgets for urwid")
5808 (description "Urwidtrees is a Widget Container API for the @code{urwid}
5809 toolkit. Use it to build trees of widgets.")
5810 (license license:gpl3+)))
5811
5812 (define-public python2-urwidtrees
5813 (package-with-python2 python-urwidtrees))
5814
5815 (define-public python-dbus
5816 (package
5817 (name "python-dbus")
5818 (version "1.2.0")
5819 (source
5820 (origin
5821 (method url-fetch)
5822 (uri (string-append
5823 "https://dbus.freedesktop.org/releases/dbus-python/dbus-python-"
5824 version ".tar.gz"))
5825 (sha256
5826 (base32 "1py62qir966lvdkngg0v8k1khsqxwk5m4s8nflpk1agk5f5nqb71"))))
5827 (build-system gnu-build-system)
5828 (arguments
5829 '(#:phases
5830 (modify-phases %standard-phases
5831 (add-before
5832 'check 'pre-check
5833 (lambda _
5834 ;; XXX: For the missing '/etc/machine-id'.
5835 (substitute* "test/run-test.sh"
5836 (("DBUS_FATAL_WARNINGS=1")
5837 "DBUS_FATAL_WARNINGS=0"))
5838 #t)))))
5839 (native-inputs
5840 `(("pkg-config" ,pkg-config)))
5841 (inputs
5842 `(("python" ,python)
5843 ("dbus-glib" ,dbus-glib)))
5844 (synopsis "Python bindings for D-bus")
5845 (description "python-dbus provides bindings for libdbus, the reference
5846 implementation of D-Bus.")
5847 (home-page "http://www.freedesktop.org/wiki/Software/DBusBindings/")
5848 (license license:expat)))
5849
5850 (define-public python2-dbus
5851 (package (inherit python-dbus)
5852 (name "python2-dbus")
5853 (inputs `(("python" ,python-2)
5854 ,@(alist-delete "python"
5855 (package-inputs python-dbus)
5856 equal?)))
5857 ;; FIXME: on Python 2, the test_utf8 fails with:
5858 ;; "ValueError: unichr() arg not in range(0x10000) (narrow Python build)"
5859 (arguments `(#:tests? #f))))
5860
5861 (define-public python-apsw
5862 (package
5863 (name "python-apsw")
5864 (version "3.9.2-r1")
5865 (source
5866 (origin
5867 (method url-fetch)
5868 (uri (pypi-uri "apsw" version))
5869 (sha256
5870 (base32
5871 "0w4jb0wpx785qw42r3h4fh7gl5w2968q48i7gygybsfxck8nzffs"))))
5872 (build-system python-build-system)
5873 (inputs
5874 `(("sqlite" ,sqlite)))
5875 (arguments
5876 `(#:phases
5877 (modify-phases %standard-phases
5878 (delete 'check)
5879 (add-after 'install 'check
5880 (lambda* (#:key inputs outputs #:allow-other-keys)
5881 (add-installed-pythonpath inputs outputs)
5882 (zero? (system* "python" "setup.py" "test")))))))
5883 (home-page "https://github.com/rogerbinns/apsw/")
5884 (synopsis "Another Python SQLite Wrapper")
5885 (description "APSW is a Python wrapper for the SQLite
5886 embedded relational database engine. In contrast to other wrappers such as
5887 pysqlite it focuses on being a minimal layer over SQLite attempting just to
5888 translate the complete SQLite API into Python.")
5889 (license license:zlib)))
5890
5891 (define-public python2-apsw
5892 (package-with-python2 python-apsw))
5893
5894 (define-public python-lxml
5895 (package
5896 (name "python-lxml")
5897 (version "3.6.0")
5898 (source
5899 (origin
5900 (method url-fetch)
5901 (uri (pypi-uri "lxml" version))
5902 (sha256
5903 (base32
5904 "1pvbmiy2m7jwv493kilbghhj2pkh8wy1na3ji350vhzhlwlclx4w"))))
5905 (build-system python-build-system)
5906 (inputs
5907 `(("libxml2" ,libxml2)
5908 ("libxslt" ,libxslt)))
5909 (home-page "http://lxml.de/")
5910 (synopsis
5911 "Python XML processing library")
5912 (description
5913 "The lxml XML toolkit is a Pythonic binding for the C libraries
5914 libxml2 and libxslt.")
5915 (license license:bsd-3))) ; and a few more, see LICENSES.txt
5916
5917 (define-public python2-lxml
5918 (package-with-python2 python-lxml))
5919
5920 ;; beautifulsoup4 has a totally different namespace than 3.x,
5921 ;; and pypi seems to put it under its own name, so I guess we should too
5922 (define-public python-beautifulsoup4
5923 (package
5924 (name "python-beautifulsoup4")
5925 (version "4.5.3")
5926 (source
5927 (origin
5928 (method url-fetch)
5929 (uri (pypi-uri "beautifulsoup4" version))
5930 (sha256
5931 (base32
5932 "0glaw1vyxnbp03fni7h5496n6iib0n5iim4gax1n0ngscs9s075j"))))
5933 (build-system python-build-system)
5934 (arguments
5935 `(#:phases
5936 (modify-phases %standard-phases
5937 ;; The Python 2 source is the definitive source of beautifulsoup4. We
5938 ;; must use this conversion script when building with Python 3. The
5939 ;; conversion script also runs the tests.
5940 ;; For more information, see the file 'convert-py3k' in the source
5941 ;; distribution.
5942 (replace 'check
5943 (lambda _ (zero? (system* "./convert-py3k")))))))
5944 (home-page
5945 "http://www.crummy.com/software/BeautifulSoup/bs4/")
5946 (synopsis
5947 "Python screen-scraping library")
5948 (description
5949 "Beautiful Soup is a Python library designed for rapidly setting up
5950 screen-scraping projects. It offers Pythonic idioms for navigating,
5951 searching, and modifying a parse tree, providing a toolkit for
5952 dissecting a document and extracting what you need. It automatically
5953 converts incoming documents to Unicode and outgoing documents to UTF-8.")
5954 (license license:expat)
5955 (properties `((python2-variant . ,(delay python2-beautifulsoup4))))))
5956
5957 (define-public python2-beautifulsoup4
5958 (package
5959 (inherit (package-with-python2
5960 (strip-python2-variant python-beautifulsoup4)))
5961 (arguments `(#:python ,python-2))))
5962
5963 (define-public python-cssutils
5964 (package
5965 (name "python-cssutils")
5966 (version "1.0.1")
5967 (source
5968 (origin
5969 (method url-fetch)
5970 (uri (pypi-uri "cssutils" version))
5971 (sha256
5972 (base32
5973 "0qwha9x1wml2qmipbcz03gndnlwhzrjdvw9i09si247a90l8p8fq"))))
5974 (build-system python-build-system)
5975 (native-inputs
5976 `(("unzip" ,unzip))) ; for unpacking the source
5977 (arguments
5978 `(#:tests? #f)) ;tests require python-pbr < 1.7.0
5979 (home-page "http://cthedot.de/cssutils/")
5980 (synopsis
5981 "CSS Cascading Style Sheets library for Python")
5982 (description
5983 "Cssutils is a Python package for parsing and building CSS
5984 Cascading Style Sheets. Currently it provides a DOM only and no rendering
5985 options.")
5986 (license license:lgpl3+)))
5987
5988 (define-public python2-cssutils
5989 (package-with-python2 python-cssutils))
5990
5991 (define-public python-cssselect
5992 (package
5993 (name "python-cssselect")
5994 (version "0.9.2")
5995 (source
5996 (origin
5997 (method url-fetch)
5998 (uri (pypi-uri "cssselect" version))
5999 (sha256
6000 (base32
6001 "1xg6gbva1yswghiycmgincv6ab4bn7hpm720ndbj40h8xycmnfvi"))))
6002 (build-system python-build-system)
6003 (arguments
6004 ;; tests fail with message
6005 ;; AttributeError: 'module' object has no attribute 'tests'
6006 `(#:tests? #f))
6007 (home-page
6008 "https://pythonhosted.org/cssselect/")
6009 (synopsis
6010 "CSS3 selector parser and translator to XPath 1.0")
6011 (description
6012 "Cssselect ia a Python module that parses CSS3 Selectors and translates
6013 them to XPath 1.0 expressions. Such expressions can be used in lxml or
6014 another XPath engine to find the matching elements in an XML or HTML document.")
6015 (license license:bsd-3)))
6016
6017 (define-public python2-cssselect
6018 (package-with-python2 python-cssselect))
6019
6020 (define-public python-openid-cla
6021 (package
6022 (name "python-openid-cla")
6023 (version "1.2")
6024 (source
6025 (origin
6026 (method url-fetch)
6027 (uri (pypi-uri "python-openid-cla" version))
6028 (sha256
6029 (base32
6030 "102hy2qisvjxp5s0v9lvwqi4f2dk0dhns40vjgn008yxc7k0h3cr"))))
6031 (build-system python-build-system)
6032 (arguments '(#:tests? #f)) ; No tests.
6033 (home-page "https://github.com/puiterwijk/python-openid-cla/")
6034 (synopsis "Implementation of the OpenID CLA extension for python-openid")
6035 (description "@code{openid-cla} is an implementation of the OpenID
6036 contributor license agreement extension for python-openid.")
6037 (license license:bsd-3)))
6038
6039 (define-public python2-openid-cla
6040 (package-with-python2 python-openid-cla))
6041
6042 (define-public python-openid-teams
6043 (package
6044 (name "python-openid-teams")
6045 (version "1.1")
6046 (source
6047 (origin
6048 (method url-fetch)
6049 (uri (pypi-uri "python-openid-teams" version))
6050 (sha256
6051 (base32
6052 "05zrh78alav24rxkbqlpbad6d3x2nljk6z6j7kflxf3vdqa7w969"))))
6053 (build-system python-build-system)
6054 (arguments '(#:tests? #f)) ; No tests.
6055 (home-page "https://github.com/puiterwijk/python-openid-teams/")
6056 (synopsis "Implementation of the OpenID teams extension for python-openid")
6057 (description
6058 "@code{openid-teams} is an implementation of the OpenID
6059 teams extension for python-openid.")
6060 (license license:bsd-3)))
6061
6062 (define-public python2-openid-teams
6063 (package-with-python2 python-openid-teams))
6064
6065 (define-public python-netifaces
6066 (package
6067 (name "python-netifaces")
6068 (version "0.10.4")
6069 (source
6070 (origin
6071 (method url-fetch)
6072 (uri (string-append
6073 "https://pypi.python.org/packages/source/n/netifaces/netifaces-"
6074 version
6075 ".tar.gz"))
6076 (sha256
6077 (base32
6078 "1plw237a4zib4z8s62g0mrs8gm3kjfrp5sxh6bbk9nl3rdls2mln"))))
6079 (build-system python-build-system)
6080 (home-page
6081 "https://bitbucket.org/al45tair/netifaces")
6082 (synopsis
6083 "Python module for portable network interface information")
6084 (description
6085 "Netifaces is a Python module providing information on network
6086 interfaces in an easy and portable manner.")
6087 (license license:expat)))
6088
6089 (define-public python2-netifaces
6090 (package-with-python2 python-netifaces))
6091
6092 (define-public python-networkx
6093 (package
6094 (name "python-networkx")
6095 (version "1.11")
6096 (source
6097 (origin
6098 (method url-fetch)
6099 (uri (pypi-uri "networkx" version))
6100 (sha256
6101 (base32 "1f74s56xb4ggixiq0vxyfxsfk8p20c7a099lpcf60izv1php03hd"))))
6102 (build-system python-build-system)
6103 ;; python-decorator is needed at runtime
6104 (propagated-inputs
6105 `(("python-decorator" ,python-decorator)))
6106 (native-inputs
6107 `(("python-nose" ,python-nose)))
6108 (home-page "http://networkx.github.io/")
6109 (synopsis "Python module for creating and manipulating graphs and networks")
6110 (description
6111 "NetworkX is a Python package for the creation, manipulation, and study
6112 of the structure, dynamics, and functions of complex networks.")
6113 (license license:bsd-3)))
6114
6115 (define-public python2-networkx
6116 (package-with-python2 python-networkx))
6117
6118 (define-public snakemake
6119 (package
6120 (name "snakemake")
6121 (version "3.11.2")
6122 (source
6123 (origin
6124 (method url-fetch)
6125 (uri (pypi-uri "snakemake" version))
6126 (sha256
6127 (base32 "0qcp7y9csvanyzh08jppryhd5di8r1z7p0d4wkfg5591pj3bb8zp"))))
6128 (build-system python-build-system)
6129 (arguments
6130 ;; TODO: Package missing test dependencies.
6131 '(#:tests? #f
6132 #:phases
6133 (modify-phases %standard-phases
6134 ;; For cluster execution Snakemake will call Python. Since there is
6135 ;; no suitable PYTHONPATH set, cluster execution will fail. We fix
6136 ;; this by calling the snakemake wrapper instead.
6137 (add-after 'unpack 'call-wrapper-not-wrapped-snakemake
6138 (lambda* (#:key outputs #:allow-other-keys)
6139 (substitute* "snakemake/executors.py"
6140 (("\\{sys.executable\\} -m snakemake")
6141 (string-append (assoc-ref outputs "out")
6142 "/bin/snakemake")))
6143 #t)))))
6144 (propagated-inputs
6145 `(("python-wrapt" ,python-wrapt)
6146 ("python-requests" ,python-requests)))
6147 (home-page "https://bitbucket.org/snakemake/snakemake/wiki/Home")
6148 (synopsis "Python-based execution environment for make-like workflows")
6149 (description
6150 "Snakemake aims to reduce the complexity of creating workflows by
6151 providing a clean and modern domain specific specification language (DSL) in
6152 Python style, together with a fast and comfortable execution environment.")
6153 (license license:expat)))
6154
6155 (define-public python-seaborn
6156 (package
6157 (name "python-seaborn")
6158 (version "0.7.1")
6159 (source
6160 (origin
6161 (method url-fetch)
6162 (uri (pypi-uri "seaborn" version))
6163 (sha256
6164 (base32 "0pawrqc3mxpwd5g9pvi9gba02637bh5c8ldpp8izfwpfn52469zs"))))
6165 (build-system python-build-system)
6166 (arguments
6167 '(#:tests? #f)) ; Tests requires a running X11 server.
6168 (propagated-inputs
6169 `(("python-pandas" ,python-pandas)
6170 ("python-matplotlib" ,python-matplotlib)
6171 ("python-scipy" ,python-scipy)))
6172 (home-page "http://stanford.edu/~mwaskom/software/seaborn/")
6173 (synopsis "Statistical data visualization")
6174 (description
6175 "Seaborn is a library for making attractive and informative statistical
6176 graphics in Python. It is built on top of matplotlib and tightly integrated
6177 with the PyData stack, including support for numpy and pandas data structures
6178 and statistical routines from scipy and statsmodels.")
6179 (license license:bsd-3)
6180 (properties `((python2-variant . ,(delay python2-seaborn))))))
6181
6182 (define-public python2-seaborn
6183 (let ((base (package-with-python2 (strip-python2-variant python-seaborn))))
6184 (package
6185 (inherit base)
6186 (propagated-inputs `(("python2-pytz" ,python2-pytz)
6187 ,@(package-propagated-inputs base))))))
6188
6189 (define-public python-mpmath
6190 (package
6191 (name "python-mpmath")
6192 (version "0.19")
6193 (source (origin
6194 (method url-fetch)
6195 (uri (string-append "http://mpmath.org/files/mpmath-"
6196 version ".tar.gz"))
6197 (sha256
6198 (base32
6199 "08ijsr4ifrqv3cjc26mkw0dbvyygsa99in376hr4b96ddm1gdpb8"))))
6200 (build-system python-build-system)
6201 (arguments
6202 '(#:phases
6203 (modify-phases %standard-phases
6204 (replace 'check
6205 (lambda _
6206 (zero?
6207 (system* "python" "mpmath/tests/runtests.py" "-local")))))))
6208 (home-page "http://mpmath.org")
6209 (synopsis "Arbitrary-precision floating-point arithmetic in python")
6210 (description
6211 "@code{mpmath} can be used as an arbitrary-precision substitute for
6212 Python's float/complex types and math/cmath modules, but also does much
6213 more advanced mathematics.")
6214 (license license:bsd-3)))
6215
6216 (define-public python2-mpmath
6217 (package-with-python2 python-mpmath))
6218
6219 (define-public python-sympy
6220 (package
6221 (name "python-sympy")
6222 (version "1.0")
6223 (source
6224 (origin
6225 (method url-fetch)
6226 (uri (string-append
6227 "https://github.com/sympy/sympy/releases/download/sympy-"
6228 version "/sympy-" version ".tar.gz"))
6229 (sha256
6230 (base32 "1bpzjwr9hrr7w88v4vgnj9lr6vxcldc94si13n8xpr1rv08d5b1y"))))
6231 (build-system python-build-system)
6232 (propagated-inputs
6233 `(("python-mpmath" ,python-mpmath)))
6234 (home-page "http://www.sympy.org/")
6235 (synopsis "Python library for symbolic mathematics")
6236 (description
6237 "SymPy is a Python library for symbolic mathematics. It aims to become a
6238 full-featured computer algebra system (CAS) while keeping the code as simple
6239 as possible in order to be comprehensible and easily extensible.")
6240 (license license:bsd-3)))
6241
6242 (define-public python2-sympy
6243 (package-with-python2 python-sympy))
6244
6245 (define-public python-q
6246 (package
6247 (name "python-q")
6248 (version "2.6")
6249 (source
6250 (origin
6251 (method url-fetch)
6252 (uri (pypi-uri "q" version))
6253 (sha256
6254 (base32
6255 "1mgfazh8fkizh6walra2zv885f3lcgr3nb02v1frfm4p8ddcy3yy"))))
6256 (build-system python-build-system)
6257 (home-page "https://github.com/zestyping/q")
6258 (synopsis "Quick-and-dirty debugging output for tired programmers")
6259 (description
6260 "q is a Python module for \"print\" style of debugging Python code. It
6261 provides convenient short API for print out of values, tracebacks, and
6262 falling into the Python interpreter.")
6263 (license license:asl2.0)))
6264
6265 (define-public python2-q
6266 (package-with-python2 python-q))
6267
6268 (define-public python-testlib
6269 (package
6270 (name "python-testlib")
6271 (version "0.6.5")
6272 (source
6273 (origin
6274 (method url-fetch)
6275 (uri (string-append
6276 "https://pypi.python.org/packages/source/t/testlib/testlib-"
6277 version ".zip"))
6278 (sha256
6279 (base32 "1mz26cxn4x8bbgv0rn0mvj2z05y31rkc8009nvdlb3lam5b4mj3y"))))
6280 (build-system python-build-system)
6281 (native-inputs
6282 `(("unzip" ,unzip))) ; for unpacking the source
6283 (synopsis "Python micro test suite harness")
6284 (description "A micro unittest suite harness for Python.")
6285 (home-page "https://github.com/trentm/testlib")
6286 (license license:expat)))
6287
6288 (define-public python2-testlib
6289 (package-with-python2 python-testlib))
6290
6291 (define-public python2-xlib
6292 (package
6293 (name "python2-xlib")
6294 (version "0.14")
6295 (source (origin
6296 (method url-fetch)
6297 (uri (string-append "mirror://sourceforge/python-xlib/python-xlib"
6298 "/" version "/"
6299 "python-xlib-" version ".tar.gz"))
6300 (sha256
6301 (base32
6302 "1sv0447j0rx8cgs3jhjl695p5pv13ihglcjlrrz1kq05lsvb0wa7"))))
6303 (build-system python-build-system)
6304 (arguments
6305 `(#:python ,python-2 ;Python 2 only
6306 #:tests? #f)) ;no tests
6307 (home-page "http://python-xlib.sourceforge.net/")
6308 (synopsis "Python X11 client library")
6309 (description
6310 "The Python X Library is intended to be a fully functional X client
6311 library for Python programs. It is useful to implement low-level X clients.
6312 It is written entirely in Python.")
6313 (license license:gpl2+)))
6314
6315 (define-public python-singledispatch
6316 (package
6317 (name "python-singledispatch")
6318 (version "3.4.0.3")
6319 (source
6320 (origin
6321 (method url-fetch)
6322 (uri (pypi-uri "singledispatch" version))
6323 (sha256
6324 (base32
6325 "171b7ip0hsq5qm83np40h3phlr36ym18w0lay0a8v08kvy3sy1jv"))))
6326 (build-system python-build-system)
6327 (native-inputs
6328 `(("python-six" ,python-six))) ; required for conversion, not at run-time
6329 (home-page
6330 "http://docs.python.org/3/library/functools.html#functools.singledispatch")
6331 (synopsis "Backport of singledispatch feature from Python 3.4")
6332 (description
6333 "This library brings functools.singledispatch from Python 3.4 to Python
6334 2.6-3.3.")
6335 (license license:expat)))
6336
6337 (define-public python2-singledispatch
6338 (package-with-python2 python-singledispatch))
6339
6340 (define-public python-tornado
6341 (package
6342 (name "python-tornado")
6343 (version "4.5.1")
6344 (source
6345 (origin
6346 (method url-fetch)
6347 (uri (pypi-uri "tornado" version))
6348 (sha256
6349 (base32 "1zbkgcdfq81k298awrm8p0xwbwwn2p3nbizdglzfbkskhai082fv"))))
6350 (build-system python-build-system)
6351 (arguments
6352 '(;; FIXME: Two tests error out with:
6353 ;; AssertionError: b'Error in atexit._run_exitfuncs:\nFileNotF[44 chars]ry\n' != b''
6354 ;; #:phases
6355 ;; (modify-phases %standard-phases
6356 ;; (replace 'check
6357 ;; (lambda _
6358 ;; ;; 'setup.py test' hits an AssertionError on BSD-specific
6359 ;; ;; "tornado/platform/kqueue.py". This is the supported method:
6360 ;; (zero? (system* "python" "-m" "tornado.test")))))
6361 #:tests? #f))
6362 (native-inputs
6363 `(("python-certifi" ,python-certifi)))
6364 (propagated-inputs
6365 `(("python-backports-abc" ,python-backports-abc)))
6366 (home-page "http://www.tornadoweb.org/")
6367 (synopsis "Python web framework and asynchronous networking library")
6368 (description
6369 "Tornado is a Python web framework and asynchronous networking library,
6370 originally developed at FriendFeed. By using non-blocking network I/O,
6371 Tornado can scale to tens of thousands of open connections, making it ideal
6372 for long polling, WebSockets, and other applications that require a long-lived
6373 connection to each user.")
6374 (license license:asl2.0)
6375 (properties `((python2-variant . ,(delay python2-tornado))))))
6376
6377 (define-public python2-tornado
6378 (let ((tornado (package-with-python2 (strip-python2-variant python-tornado))))
6379 (package (inherit tornado)
6380 (propagated-inputs
6381 `(("python2-backport-ssl-match-hostname"
6382 ,python2-backport-ssl-match-hostname)
6383 ("python2-singledispatch" ,python2-singledispatch)
6384 ,@(package-propagated-inputs tornado))))))
6385
6386 ;; the python- version can be removed with python-3.5
6387 (define-public python-backports-abc
6388 (package
6389 (name "python-backports-abc")
6390 (version "0.5")
6391 (source
6392 (origin
6393 (method url-fetch)
6394 (uri (pypi-uri "backports_abc" version))
6395 (sha256
6396 (base32
6397 "1pkv8d1zxj5f9i227dxbjczncbv7ks7ywnjwyxfjagm02i2yafq3"))))
6398 (build-system python-build-system)
6399 (home-page "https://github.com/cython/backports_abc")
6400 (synopsis "Backport of additions to the 'collections.abc' module")
6401 (description
6402 "Python-backports-abc provides a backport of additions to the
6403 'collections.abc' module in Python-3.5.")
6404 (license license:psfl)))
6405
6406 (define-public python2-backports-abc
6407 (package-with-python2 python-backports-abc))
6408
6409 (define-public python-backports-csv
6410 (package
6411 (name "python-backports-csv")
6412 (version "1.0.5")
6413 (source
6414 (origin
6415 (method url-fetch)
6416 (uri (pypi-uri "backports.csv" version))
6417 (sha256
6418 (base32
6419 "1imzbrradkfn8s2m1qcimyn74dn1mz2p3j381jljn166rf2i6hlc"))))
6420 (build-system python-build-system)
6421 (home-page "https://github.com/ryanhiebert/backports.csv")
6422 (synopsis "Backport of Python 3's csv module for Python 2")
6423 (description
6424 "Provides a backport of Python 3's @code{csv} module for parsing
6425 comma separated values. The API of the @code{csv} module in Python 2
6426 is drastically different from the @code{csv} module in Python 3.
6427 This is due, for the most part, to the difference between str in
6428 Python 2 and Python 3.")
6429 (license license:psfl)))
6430
6431 (define-public python2-backports-csv
6432 (package-with-python2 python-backports-csv))
6433
6434 (define-public python2-backports-shutil-get-terminal-size
6435 (package
6436 (name "python2-backports-shutil-get-terminal-size")
6437 (version "1.0.0")
6438 (source
6439 (origin
6440 (method url-fetch)
6441 (uri (pypi-uri "backports.shutil_get_terminal_size" version))
6442 (sha256
6443 (base32
6444 "107cmn7g3jnbkp826zlj8rrj19fam301qvaqf0f3905f5217lgki"))))
6445 (build-system python-build-system)
6446 (arguments
6447 `(#:python ,python-2
6448 #:phases
6449 (modify-phases %standard-phases
6450 (replace 'check
6451 (lambda _
6452 (zero? (system* "py.test" "-v")))))))
6453 (native-inputs
6454 `(("python2-pytest" ,python2-pytest)))
6455 (home-page "https://github.com/chrippa/backports.shutil_get_terminal_size")
6456 (synopsis "Backport of Python 3.3's @code{shutil.get_terminal_size}")
6457 (description
6458 "This package provides a backport of the @code{get_terminal_size
6459 function} from Python 3.3's @code{shutil}.
6460 Unlike the original version it is written in pure Python rather than C,
6461 so it might be a tiny bit slower.")
6462 (license license:expat)))
6463
6464 (define-public python-waf
6465 (package
6466 (name "python-waf")
6467 (version "1.9.8")
6468 (source (origin
6469 (method url-fetch)
6470 (uri (string-append "https://waf.io/"
6471 "waf-" version ".tar.bz2"))
6472 (sha256
6473 (base32
6474 "0wl4cnmp06lfxqjxaan58bqxn27smhydz0sg5prrfbl3bsw4gv6q"))))
6475 (build-system python-build-system)
6476 (arguments
6477 '(#:phases
6478 (modify-phases %standard-phases
6479 (replace 'build
6480 (lambda _
6481 (zero? (system* "python" "waf-light" "configure" "build"))))
6482 (replace 'check
6483 (lambda _
6484 (zero? (system* "python" "waf" "--version"))))
6485 (replace 'install
6486 (lambda _
6487 (copy-file "waf" %output))))))
6488 (home-page "https://waf.io/")
6489 (synopsis "Python-based build system")
6490 (description
6491 "Waf is a Python-based framework for configuring, compiling and installing
6492 applications.")
6493 (license license:bsd-3)))
6494
6495 (define-public python2-waf
6496 (package-with-python2 python-waf))
6497
6498 (define-public python-pyzmq
6499 (package
6500 (name "python-pyzmq")
6501 (version "15.1.0")
6502 (source
6503 (origin
6504 (method url-fetch)
6505 (uri (pypi-uri "pyzmq" version))
6506 (sha256
6507 (base32 "13fhwnlvsvxv72kfhqbpn6qi7msh8mc8377mpabv32skk2cjfnxx"))))
6508 (build-system python-build-system)
6509 (arguments
6510 `(#:configure-flags
6511 (list (string-append "--zmq=" (assoc-ref %build-inputs "zeromq")))
6512 ;; FIXME: You must build pyzmq with 'python setup.py build_ext
6513 ;; --inplace' for 'python setup.py test' to work.
6514 #:tests? #f))
6515 (inputs
6516 `(("zeromq" ,zeromq)))
6517 (native-inputs
6518 `(("pkg-config" ,pkg-config)
6519 ("python-nose" ,python-nose)))
6520 (home-page "https://github.com/zeromq/pyzmq")
6521 (synopsis "Python bindings for 0MQ")
6522 (description
6523 "PyZMQ is the official Python binding for the ZeroMQ messaging library.")
6524 (license license:bsd-4)))
6525
6526 (define-public python2-pyzmq
6527 (package-with-python2 python-pyzmq))
6528
6529 (define-public python-pep8
6530 (package
6531 (name "python-pep8")
6532 (version "1.7.0")
6533 (source
6534 (origin
6535 (method url-fetch)
6536 (uri (pypi-uri "pep8" version))
6537 (sha256
6538 (base32
6539 "002rkl4lsn6x2mxmf8ar00l0m8i3mzrc6pnzz77blyksmpsxa4x1"))))
6540 (build-system python-build-system)
6541 (home-page "http://pep8.readthedocs.org/")
6542 (synopsis "Python style guide checker")
6543 (description
6544 "This tools checks Python code against some of the style conventions in
6545 PEP 8.")
6546 (license license:expat)))
6547
6548 (define-public python2-pep8
6549 (package-with-python2 python-pep8))
6550
6551 (define-public python-pyflakes
6552 (package
6553 (name "python-pyflakes")
6554 (version "1.0.0")
6555 (source
6556 (origin
6557 (method url-fetch)
6558 (uri (pypi-uri "pyflakes" version))
6559 (sha256
6560 (base32
6561 "0qs2sgqszq7wcplis8509wk2ygqcrwzbs1ghfj3svvivq2j377pk"))))
6562 (build-system python-build-system)
6563 (home-page
6564 "https://github.com/pyflakes/pyflakes")
6565 (synopsis "Passive checker of Python programs")
6566 (description
6567 "Pyflakes statically checks Python source code for common errors.")
6568 (license license:expat)))
6569
6570 (define-public python2-pyflakes
6571 (package-with-python2 python-pyflakes))
6572
6573 (define-public python-mccabe
6574 (package
6575 (name "python-mccabe")
6576 (version "0.4.0")
6577 (source
6578 (origin
6579 (method url-fetch)
6580 (uri (pypi-uri "mccabe" version))
6581 (sha256
6582 (base32
6583 "0yr08a36h8lqlif10l4xcikbbig7q8f41gqywir7rrvnv3mi4aws"))))
6584 (build-system python-build-system)
6585 (native-inputs
6586 `(("python-pytest" ,python-pytest)
6587 ("python-pytest-runner" ,python-pytest-runner)))
6588 (home-page "https://github.com/flintwork/mccabe")
6589 (synopsis "McCabe checker, plugin for flake8")
6590 (description
6591 "This package provides a Flake8 plug-in to compute the McCabe cyclomatic
6592 complexity of Python source code.")
6593 (license license:expat)))
6594
6595 (define-public python2-mccabe
6596 (package-with-python2 python-mccabe))
6597
6598 (define-public python-mccabe-0.2.1
6599 (package (inherit python-mccabe)
6600 (version "0.2.1")
6601 (source
6602 (origin
6603 (method url-fetch)
6604 (uri (pypi-uri "mccabe" version))
6605 (sha256
6606 (base32
6607 "0fi4a81kr5bcv5p4xgibqr595hyj5dafkqgsmfk96mfy8w71fajs"))))))
6608
6609 (define-public python2-mccabe-0.2.1
6610 (package-with-python2 python-mccabe-0.2.1))
6611
6612 ;; Flake8 2.4.1 requires an older version of pep8.
6613 ;; This should be removed ASAP.
6614 (define-public python-pep8-1.5.7
6615 (package (inherit python-pep8)
6616 (version "1.5.7")
6617 (source
6618 (origin
6619 (method url-fetch)
6620 (uri (string-append
6621 "https://pypi.python.org/packages/source/p/pep8/pep8-"
6622 version
6623 ".tar.gz"))
6624 (sha256
6625 (base32
6626 "12b9bbdbwnspxgak14xg58c130x2n0blxzlms5jn2dszn8qj3d0m"))))
6627 (arguments
6628 ;; XXX Tests not compatible with Python 3.5.
6629 '(#:tests? #f))))
6630
6631 (define-public python2-pep8-1.5.7
6632 (package-with-python2 python-pep8-1.5.7))
6633
6634 ;; Flake8 2.4.1 requires an older version of pyflakes.
6635 ;; This should be removed ASAP.
6636 (define-public python-pyflakes-0.8.1
6637 (package (inherit python-pyflakes)
6638 (version "0.8.1")
6639 (source
6640 (origin
6641 (method url-fetch)
6642 (uri (string-append
6643 "https://pypi.python.org/packages/source/p/pyflakes/pyflakes-"
6644 version
6645 ".tar.gz"))
6646 (sha256
6647 (base32
6648 "0sbpq6pqm1i9wqi41mlfrsc5rk92jv4mskvlyxmnhlbdnc80ma1z"))))
6649 (arguments
6650 ;; XXX Tests not compatible with Python 3.5.
6651 '(#:tests? #f))))
6652
6653 (define-public python2-pyflakes-0.8.1
6654 (package-with-python2 python-pyflakes-0.8.1))
6655
6656 (define-public python-flake8
6657 (package
6658 (name "python-flake8")
6659 (version "2.5.4")
6660 (source
6661 (origin
6662 (method url-fetch)
6663 (uri (pypi-uri "flake8" version))
6664 (sha256
6665 (base32
6666 "0bs9cz4fr99r2rwig1b8jwaadl1nan7kgpdzqwj0bwbckwbmh7nc"))
6667 (modules '((guix build utils)))
6668 (snippet
6669 '(begin
6670 ;; Remove pre-compiled .pyc files from source.
6671 (for-each delete-file-recursively
6672 (find-files "." "__pycache__" #:directories? #t))
6673 (for-each delete-file (find-files "." "\\.pyc$"))
6674 #t))))
6675 (build-system python-build-system)
6676 (propagated-inputs
6677 `(("python-pep8" ,python-pep8)
6678 ("python-pyflakes" ,python-pyflakes)
6679 ("python-mccabe" ,python-mccabe)))
6680 (native-inputs
6681 `(("python-mock" ,python-mock) ; TODO: only required for < 3.3
6682 ("python-nose" ,python-nose)))
6683 (home-page "https://gitlab.com/pycqa/flake8")
6684 (synopsis
6685 "The modular source code checker: pep8, pyflakes and co")
6686 (description
6687 "Flake8 is a wrapper around PyFlakes, pep8 and python-mccabe.")
6688 (license license:expat)))
6689
6690 (define-public python2-flake8
6691 (package-with-python2 python-flake8))
6692
6693 (define-public python-flake8-polyfill
6694 (package
6695 (name "python-flake8-polyfill")
6696 (version "1.0.1")
6697 (source
6698 (origin
6699 (method url-fetch)
6700 (uri (pypi-uri "flake8-polyfill" version))
6701 (sha256
6702 (base32
6703 "02gn2wxvh9vnf7m7dld7ca4l60mg5c370hv3swwppkngwaqmcw67"))))
6704 (build-system python-build-system)
6705 (arguments
6706 '(#:phases
6707 (modify-phases %standard-phases
6708 (replace 'check
6709 (lambda _
6710 (setenv "PYTHONPATH"
6711 (string-append (getcwd) "/build/lib:"
6712 (getenv "PYTHONPATH")))
6713 (zero? (system* "py.test" "-v")))))))
6714 (native-inputs
6715 `(("python-flake8" ,python-flake8)
6716 ("python-mock" ,python-mock)
6717 ("python-pycodestyle" ,python-pycodestyle)
6718 ("python-pytest" ,python-pytest)))
6719 (home-page "https://gitlab.com/pycqa/flake8-polyfill")
6720 (synopsis "Polyfill package for Flake8 plugins")
6721 (description
6722 "This package that provides some compatibility helpers for Flake8
6723 plugins that intend to support Flake8 2.x and 3.x simultaneously.")
6724 (license license:expat)))
6725
6726 (define-public python2-flake8-polyfill
6727 (package-with-python2 python-flake8-polyfill))
6728
6729 (define-public python-mistune
6730 (package
6731 (name "python-mistune")
6732 (version "0.7.3")
6733 (source
6734 (origin
6735 (method url-fetch)
6736 (uri (pypi-uri "mistune" version))
6737 (sha256
6738 (base32
6739 "04xpk1zvslhq3xpnf01g3ag0dy9wfv4z28p093r8k49vvxlyil11"))))
6740 (build-system python-build-system)
6741 (native-inputs
6742 `(("python-nose" ,python-nose)
6743 ("python-cython" ,python-cython)))
6744 (home-page "https://github.com/lepture/mistune")
6745 (synopsis "Markdown parser in pure Python")
6746 (description "This package provides a fast markdown parser in pure
6747 Python.")
6748 (license license:bsd-3)))
6749
6750 (define-public python2-mistune
6751 (package-with-python2 python-mistune))
6752
6753 (define-public python-markdown
6754 (package
6755 (name "python-markdown")
6756 (version "2.6.8")
6757 (source
6758 (origin
6759 (method url-fetch)
6760 (uri (pypi-uri "Markdown" version))
6761 (sha256
6762 (base32
6763 "0cqfhr1km2s5d8jm6hbwgkrrj9hvkjf2gab3s2axlrw1clgaij0a"))))
6764 (build-system python-build-system)
6765 (arguments
6766 `(#:phases
6767 (modify-phases %standard-phases
6768 (replace 'check
6769 (lambda _
6770 (zero? (system* "python" "run-tests.py")))))))
6771 (native-inputs
6772 `(("python-nose" ,python-nose)
6773 ("python-pyyaml" ,python-pyyaml)))
6774 (home-page "https://pythonhosted.org/Markdown/")
6775 (synopsis "Python implementation of Markdown")
6776 (description
6777 "This package provides a Python implementation of John Gruber's
6778 Markdown. The library features international input, various Markdown
6779 extensions, and several HTML output formats. A command line wrapper
6780 markdown_py is also provided to convert Markdown files to HTML.")
6781 (license license:bsd-3)))
6782
6783 (define-public python2-markdown
6784 (package-with-python2 python-markdown))
6785
6786 (define-public python-ptyprocess
6787 (package
6788 (name "python-ptyprocess")
6789 (version "0.5.1")
6790 (source
6791 (origin
6792 (method url-fetch)
6793 (uri (string-append
6794 "https://pypi.python.org/packages/source/p/ptyprocess/ptyprocess-"
6795 version ".tar.gz"))
6796 (sha256
6797 (base32
6798 "19l1xrjn4l9gjz01s3vg92gn2dd9d8mw1v86ppkzlnr9m5iwwc05"))))
6799 (build-system python-build-system)
6800 (native-inputs
6801 `(("python-nose" ,python-nose)))
6802 (arguments
6803 `(#:phases
6804 (modify-phases %standard-phases
6805 (replace 'check
6806 (lambda _
6807 (zero? (system* "nosetests")))))))
6808 (home-page "https://github.com/pexpect/ptyprocess")
6809 (synopsis "Run a subprocess in a pseudo terminal")
6810 (description
6811 "This package provides a Python library used to launch a subprocess in a
6812 pseudo terminal (pty), and interact with both the process and its pty.")
6813 (license license:isc)))
6814
6815 (define-public python2-ptyprocess
6816 (package-with-python2 python-ptyprocess))
6817
6818 (define-public python-cram
6819 (package
6820 (name "python-cram")
6821 (version "0.7")
6822 (home-page "https://bitheap.org/cram/")
6823 (source (origin
6824 (method url-fetch)
6825 (uri (list (string-append home-page "cram-"
6826 version ".tar.gz")
6827 (pypi-uri "cram" version)))
6828 (sha256
6829 (base32
6830 "0bvz6fwdi55rkrz3f50zsy35gvvwhlppki2yml5bj5ffy9d499vx"))))
6831 (arguments
6832 '(#:phases
6833 (modify-phases %standard-phases
6834 (add-after 'unpack 'patch-source
6835 (lambda _
6836 (substitute* (find-files "cram" ".*\\.py$")
6837 ;; Replace default shell path.
6838 (("/bin/sh") (which "sh")))
6839 (substitute* (find-files "tests" ".*\\.t$")
6840 (("md5") "md5sum")
6841 (("/bin/bash") (which "bash"))
6842 (("/bin/sh") (which "sh")))
6843 (substitute* "cram/_test.py"
6844 ;; This hack works around a bug triggered by substituting
6845 ;; the /bin/sh paths. "tests/usage.t" compares the output of
6846 ;; "cram -h", which breaks the output at 80 characters. This
6847 ;; causes the line showing the default shell to break into two
6848 ;; lines, but the test expects a single line...
6849 (("env\\['COLUMNS'\\] = '80'")
6850 "env['COLUMNS'] = '160'"))
6851 #t))
6852 (delete 'check)
6853 (add-after 'install 'check
6854 ;; The test phase uses the built library and executable.
6855 ;; It's easier to run it after install since the build
6856 ;; directory contains version-specific PATH.
6857 (lambda* (#:key inputs outputs #:allow-other-keys)
6858 (add-installed-pythonpath inputs outputs)
6859 (setenv "PATH" (string-append (getenv "PATH") ":"
6860 (assoc-ref outputs "out") "/bin"))
6861 (zero? (system* "make" "test")))))))
6862 (build-system python-build-system)
6863 (native-inputs
6864 `(("python-coverage" ,python-coverage)
6865 ("which" ,which)))
6866 (synopsis "Simple testing framework for command line applications")
6867 (description
6868 "Cram is a functional testing framework for command line applications.
6869 Cram tests look like snippets of interactive shell sessions. Cram runs each
6870 command and compares the command output in the test with the command’s actual
6871 output.")
6872 (license license:gpl2+)))
6873
6874 (define-public python2-cram
6875 (package-with-python2 python-cram))
6876
6877 (define-public python-terminado
6878 (package
6879 (name "python-terminado")
6880 (version "0.6")
6881 (source
6882 (origin
6883 (method url-fetch)
6884 (uri (pypi-uri "terminado" version))
6885 (sha256
6886 (base32
6887 "09h1kwi86g5mrk14s4pgbhshd602zry29lnpxamcqz864kva22rc"))))
6888 (build-system python-build-system)
6889 (propagated-inputs
6890 `(("python-tornado" ,python-tornado)
6891 ("python-ptyprocess" ,python-ptyprocess)))
6892 (native-inputs
6893 `(("python-nose" ,python-nose)))
6894 (arguments
6895 `(#:phases
6896 (modify-phases %standard-phases
6897 (replace 'check
6898 (lambda _
6899 (zero? (system* "nosetests")))))))
6900 (home-page "https://github.com/takluyver/terminado")
6901 (synopsis "Terminals served to term.js using Tornado websockets")
6902 (description "This package provides a Tornado websocket backend for the
6903 term.js Javascript terminal emulator library.")
6904 (license license:bsd-2)
6905 (properties `((python2-variant . ,(delay python2-terminado))))))
6906
6907 (define-public python2-terminado
6908 (let ((terminado (package-with-python2 (strip-python2-variant python-terminado))))
6909 (package (inherit terminado)
6910 (propagated-inputs
6911 `(("python2-backport-ssl-match-hostname"
6912 ,python2-backport-ssl-match-hostname)
6913 ,@(package-propagated-inputs terminado))))))
6914
6915 (define-public python-straight-plugin
6916 (package
6917 (name "python-straight-plugin")
6918 (version "1.4.1")
6919 (source
6920 (origin
6921 (method url-fetch)
6922 (uri (pypi-uri "straight.plugin" version))
6923 (sha256
6924 (base32
6925 "069pjll4383p4kkgvcc40hgyvf79j2wdbpgwz77yigzxksh1gj62"))))
6926 (build-system python-build-system)
6927 (home-page "https://github.com/ironfroggy/straight.plugin")
6928 (synopsis "Simple namespaced plugin facility")
6929 (description "Straight Plugin provides a type of plugin you can create from
6930 almost any existing Python modules, and an easy way for outside developers to
6931 add functionality and customization to your projects with their own plugins.")
6932 (license license:expat)))
6933
6934 (define-public python2-straight-plugin
6935 (package-with-python2 python-straight-plugin))
6936
6937 (define-public python-fonttools
6938 (package
6939 (name "python-fonttools")
6940 (version "2.5")
6941 (source (origin
6942 (method url-fetch)
6943 (uri (string-append
6944 "https://pypi.python.org/packages/source/F/FontTools/"
6945 "fonttools-" version ".tar.gz"))
6946 (sha256
6947 (base32
6948 "08ay3x4ijarwhl60gqx2i9jzq6pxs20p4snc2d1q5jagh4rn39lb"))))
6949 (build-system python-build-system)
6950 (arguments
6951 '(#:test-target "check"
6952 #:phases
6953 (modify-phases %standard-phases
6954 (add-after 'unpack 'patch-setuppy
6955 ;; Remove the undocumented "extra_path" argument, which adds an
6956 ;; intervening directories between site-packages and the package
6957 ;; directory.
6958 (lambda _
6959 (substitute* "setup.py"
6960 (("^[ \t]*extra_path *= *'FontTools',") ""))
6961 #t)))))
6962 (home-page "https://github.com/behdad/fonttools")
6963 (synopsis "Tools to manipulate font files")
6964 (description
6965 "FontTools/TTX is a library to manipulate font files from Python. It
6966 supports reading and writing of TrueType/OpenType fonts, reading and writing
6967 of AFM files, reading (and partially writing) of PS Type 1 fonts. The package
6968 also contains a tool called “TTX” which converts TrueType/OpenType fonts to and
6969 from an XML-based format.")
6970 (license (license:non-copyleft
6971 "file://LICENSE.txt"
6972 "See LICENSE.txt in the distribution."))))
6973
6974 (define-public python2-fonttools
6975 (package-with-python2 python-fonttools))
6976
6977 (define-public python-ly
6978 (package
6979 (name "python-ly")
6980 (version "0.9.4")
6981 (source
6982 (origin
6983 (method url-fetch)
6984 (uri (string-append "https://pypi.python.org/packages/57/4f/"
6985 "889579244947368f28eda66b782331b1e75f83fd72e63f9ece93cd7a18f9"
6986 "/python-ly-" version ".tar.gz"))
6987 (sha256
6988 (base32
6989 "0g6n288l83sfwavxh1aryi0aqvsr3sp7v6f903mckwqa4scpky62"))))
6990 (build-system python-build-system)
6991 (arguments
6992 ;; FIXME: Some tests need network access.
6993 '(#:tests? #f))
6994 (synopsis "Tool and library for manipulating LilyPond files")
6995 (description "This package provides a Python library to parse, manipulate
6996 or create documents in LilyPond format. A command line program ly is also
6997 provided that can be used to do various manipulations with LilyPond files.")
6998 (home-page "https://pypi.python.org/pypi/python-ly")
6999 (license license:gpl2+)))
7000
7001 (define-public python-appdirs
7002 (package
7003 (name "python-appdirs")
7004 (version "1.4.3")
7005 (source
7006 (origin
7007 (method url-fetch)
7008 (uri (pypi-uri "appdirs" version))
7009 (sha256
7010 (base32
7011 "14id6wxi12lgyw0mg3bcfnf888ad07jz9yj46gfzhn186z8rcn4y"))))
7012 (build-system python-build-system)
7013 (home-page "https://github.com/ActiveState/appdirs")
7014 (synopsis
7015 "Determine platform-specific dirs, e.g. a \"user data dir\"")
7016 (description
7017 "This module provides a portable way of finding out where user data
7018 should be stored on various operating systems.")
7019 (license license:expat)))
7020
7021 (define-public python2-appdirs
7022 (package-with-python2 python-appdirs))
7023
7024 (define-public python-llfuse
7025 (package
7026 (name "python-llfuse")
7027 (version "1.2")
7028 (source (origin
7029 (method url-fetch)
7030 (uri (string-append
7031 "https://bitbucket.org/nikratio/python-llfuse/downloads/"
7032 "llfuse-" version ".tar.bz2"))
7033 (sha256
7034 (base32
7035 "11hms1x68bf1bqbqy7w3wpffqsd3jkgricmzrc1hrnwkswfzzlr4"))))
7036 (build-system python-build-system)
7037 (inputs
7038 `(("fuse" ,fuse)
7039 ("attr" ,attr)))
7040 (native-inputs
7041 `(("pkg-config" ,pkg-config)))
7042 (synopsis "Python bindings for FUSE")
7043 (description
7044 "Python-LLFUSE is a set of Python bindings for the low level FUSE API.")
7045 (home-page "https://bitbucket.org/nikratio/python-llfuse/")
7046 (license license:lgpl2.0+)
7047 (properties `((python2-variant . ,(delay python2-llfuse))))))
7048
7049 (define-public python2-llfuse
7050 (package (inherit (package-with-python2
7051 (strip-python2-variant python-llfuse)))
7052 (propagated-inputs `(("python2-contextlib2" ,python2-contextlib2)))))
7053
7054 ;; For attic-0.16
7055 (define-public python-llfuse-0.41
7056 (package (inherit python-llfuse)
7057 (version "0.41.1")
7058 (source (origin
7059 (method url-fetch)
7060 (uri (string-append
7061 "https://bitbucket.org/nikratio/python-llfuse/downloads/"
7062 "llfuse-" version ".tar.bz2"))
7063 (sha256
7064 (base32
7065 "1imlqw9b73086y97izr036f58pgc5akv4ihc2rrf8j5h75jbrlaa"))))
7066 ;; Python-LLFUSE < 0.42 includes underscore.js, which is MIT (expat)
7067 ;; licensed. The rest of the package is licensed under LGPL2.0 or later.
7068 (license (list license:expat license:lgpl2.0+))))
7069
7070 (define-public python-msgpack
7071 (package
7072 (name "python-msgpack")
7073 (version "0.4.8")
7074 (source (origin
7075 (method url-fetch)
7076 (uri (pypi-uri "msgpack-python" version))
7077 (sha256
7078 (base32
7079 "11pqk5braa6wndpnr1dhg64js82vjgxnm0lzy73rwl831zgijaqs"))))
7080 (build-system python-build-system)
7081 (synopsis "MessagePack (de)serializer")
7082 (description "MessagePack is a fast, compact binary serialization format,
7083 suitable for similar data to JSON. This package provides CPython bindings for
7084 reading and writing MessagePack data.")
7085 (home-page "https://pypi.python.org/pypi/msgpack-python/")
7086 (license license:asl2.0)))
7087
7088 (define-public python2-msgpack
7089 (package-with-python2 python-msgpack))
7090
7091 (define-public python-netaddr
7092 (package
7093 (name "python-netaddr")
7094 (version "0.7.18")
7095 (source
7096 (origin
7097 (method url-fetch)
7098 (uri (string-append
7099 "https://pypi.python.org/packages/source/n/netaddr/netaddr-"
7100 version
7101 ".tar.gz"))
7102 (sha256
7103 (base32
7104 "06dxjlbcicq7q3vqy8agq11ra01kvvd47j4mk6dmghjsyzyckxd1"))))
7105 (build-system python-build-system)
7106 (arguments `(#:tests? #f)) ;; No tests.
7107 (home-page "https://github.com/drkjam/netaddr/")
7108 (synopsis "Pythonic manipulation of network addresses")
7109 (description
7110 "A Python library for representing and manipulating IPv4, IPv6, CIDR, EUI
7111 and MAC network addresses.")
7112 (license license:bsd-3)))
7113
7114 (define-public python2-netaddr
7115 (package-with-python2 python-netaddr))
7116
7117 (define-public python-wrapt
7118 (package
7119 (name "python-wrapt")
7120 (version "1.10.8")
7121 (source
7122 (origin
7123 (method url-fetch)
7124 (uri (pypi-uri "wrapt" version))
7125 (sha256
7126 (base32
7127 "0wrcm1mydvfivbkzz0h81ygzdchnscshi6xvy5n3r21r9s0px8af"))))
7128 (build-system python-build-system)
7129 (arguments
7130 ;; Tests are not included in the tarball, they are only available in the
7131 ;; git repository.
7132 `(#:tests? #f))
7133 (home-page "https://github.com/GrahamDumpleton/wrapt")
7134 (synopsis "Module for decorators, wrappers and monkey patching")
7135 (description
7136 "The aim of the wrapt module is to provide a transparent object proxy for
7137 Python, which can be used as the basis for the construction of function
7138 wrappers and decorator functions.")
7139 (license license:bsd-2)))
7140
7141 (define-public python2-wrapt
7142 (package-with-python2 python-wrapt))
7143
7144 (define-public python-iso8601
7145 (package
7146 (name "python-iso8601")
7147 (version "0.1.11")
7148 (source
7149 (origin
7150 (method url-fetch)
7151 (uri (pypi-uri "iso8601" version))
7152 (sha256
7153 (base32
7154 "0c7gh3lsdjds262h0v1sqc66l7hqgfwbakn96qrhdbl0i3vm5yz8"))))
7155 (build-system python-build-system)
7156 (native-inputs
7157 `(("python-pytest" ,python-pytest)))
7158 (home-page "https://bitbucket.org/micktwomey/pyiso8601")
7159 (synopsis "Module to parse ISO 8601 dates")
7160 (description
7161 "This module parses the most common forms of ISO 8601 date strings (e.g.
7162 @code{2007-01-14T20:34:22+00:00}) into @code{datetime} objects.")
7163 (license license:expat)))
7164
7165 (define-public python2-iso8601
7166 (package-with-python2 python-iso8601))
7167
7168 (define-public python-monotonic
7169 (package
7170 (name "python-monotonic")
7171 (version "0.3")
7172 (source
7173 (origin
7174 (method url-fetch)
7175 (uri (string-append
7176 "https://pypi.python.org/packages/source/m/monotonic/monotonic-"
7177 version
7178 ".tar.gz"))
7179 (sha256
7180 (base32
7181 "0yz0bcbwx8r2c01czzfpbrxddynxyk9k95jj8h6sgcb7xmfvl998"))))
7182 (build-system python-build-system)
7183 (home-page "https://github.com/atdt/monotonic")
7184 (synopsis "Implementation of time.monotonic() for Python 2 & < 3.3")
7185 (description
7186 "This module provides a monotonic() function which returns the value (in
7187 fractional seconds) of a clock which never goes backwards.")
7188 (license license:asl2.0)))
7189
7190 (define-public python2-monotonic
7191 (package-with-python2 python-monotonic))
7192
7193 (define-public python-webob
7194 (package
7195 (name "python-webob")
7196 (version "1.5.1")
7197 (source
7198 (origin
7199 (method url-fetch)
7200 (uri (pypi-uri "WebOb" version))
7201 (sha256
7202 (base32
7203 "02bhhzijfhv8hmi1i54d4b0v43liwhnywhflvxsv4x3zax9s3afq"))))
7204 (build-system python-build-system)
7205 (native-inputs
7206 `(("python-nose" ,python-nose)))
7207 (home-page "http://webob.org/")
7208 (synopsis "WSGI request and response object")
7209 (description
7210 "WebOb provides wrappers around the WSGI request environment, and an
7211 object to help create WSGI responses.")
7212 (license license:expat)))
7213
7214 (define-public python2-webob
7215 (package-with-python2 python-webob))
7216
7217 (define-public python-xlrd
7218 (package
7219 (name "python-xlrd")
7220 (version "1.0.0")
7221 (source (origin
7222 (method url-fetch)
7223 (uri (pypi-uri "xlrd" version))
7224 (sha256
7225 (base32
7226 "0s8hjiz01vbhy85xalrz0qlsmd9ypf36zjqrf97hh984spapvy0g"))))
7227 (build-system python-build-system)
7228 (arguments
7229 `(#:phases
7230 (modify-phases %standard-phases
7231 ;; Current test in setup.py does not work as of 1.0.0, so use nose to
7232 ;; run tests instead for now.
7233 (replace 'check (lambda _ (zero? (system* "nosetests")))))))
7234 (native-inputs `(("python-nose" ,python-nose)))
7235 (home-page "http://www.python-excel.org/")
7236 (synopsis "Library for extracting data from Excel files")
7237 (description "This packages provides a library to extract data from
7238 spreadsheets using Microsoft Excel proprietary file formats @samp{.xls} and
7239 @samp{.xlsx} (versions 2.0 onwards). It has support for Excel dates and is
7240 Unicode-aware. It is not intended as an end-user tool.")
7241 (license license:bsd-3)))
7242
7243 (define-public python2-xlrd
7244 (package-with-python2 python-xlrd))
7245
7246 (define-public python-prettytable
7247 (package
7248 (name "python-prettytable")
7249 (version "0.7.2")
7250 (source
7251 (origin
7252 (method url-fetch)
7253 (uri (string-append
7254 "https://pypi.python.org/packages/source/P/PrettyTable/"
7255 "prettytable-" version ".tar.bz2"))
7256 (sha256
7257 (base32
7258 "0diwsicwmiq2cpzpxri7cyl5fmsvicafw6nfqf6p6p322dji2g45"))))
7259 (build-system python-build-system)
7260 (home-page "http://code.google.com/p/prettytable/")
7261 (synopsis "Display tabular data in an ASCII table format")
7262 (description
7263 "A library designed to represent tabular data in visually appealing ASCII
7264 tables. PrettyTable allows for selection of which columns are to be printed,
7265 independent alignment of columns (left or right justified or centred) and
7266 printing of sub-tables by specifying a row range.")
7267 (license license:bsd-3)))
7268
7269 (define-public python2-prettytable
7270 (package-with-python2 python-prettytable))
7271
7272 (define-public python-tables
7273 (package
7274 (name "python-tables")
7275 (version "3.2.2")
7276 (source
7277 (origin
7278 (method url-fetch)
7279 (uri (pypi-uri "tables" version))
7280 (sha256
7281 (base32
7282 "117s6w7s3yxafpmf3zz3svana7xfrsviw01va1xp7h8ylx8v6r1m"))
7283 (modules '((guix build utils)))
7284 (snippet
7285 '(begin
7286 ;; Remove pre-compiled .pyc files from source.
7287 (for-each delete-file-recursively
7288 (find-files "." "__pycache__" #:directories? #t))
7289 (for-each delete-file (find-files "." "\\.pyc$"))
7290 #t))))
7291 (build-system python-build-system)
7292 (arguments
7293 `(;; FIXME: python-build-system does not pass configure-flags to "build"
7294 ;; or "check", so we must override the build and check phases.
7295 #:phases
7296 (modify-phases %standard-phases
7297 (add-after 'unpack 'use-gcc
7298 (lambda _
7299 (substitute* "setup.py"
7300 (("compiler = new_compiler\\(\\)" line)
7301 (string-append line
7302 "\ncompiler.set_executables(compiler='gcc',"
7303 "compiler_so='gcc',"
7304 "linker_exe='gcc',"
7305 "linker_so='gcc -shared')")))
7306 #t))
7307 (replace 'build
7308 (lambda* (#:key inputs #:allow-other-keys)
7309 (zero? (system* "python" "setup.py" "build"
7310 (string-append "--hdf5="
7311 (assoc-ref inputs "hdf5"))))))
7312 (replace 'check
7313 (lambda* (#:key inputs #:allow-other-keys)
7314 (zero? (system* "python" "setup.py" "check"
7315 (string-append "--hdf5="
7316 (assoc-ref inputs "hdf5")))))))))
7317 (propagated-inputs
7318 `(("python-numexpr" ,python-numexpr)
7319 ("python-numpy" ,python-numpy)))
7320 (native-inputs
7321 `(("python-cython" ,python-cython)
7322 ("pkg-config" ,pkg-config)))
7323 (inputs
7324 `(("hdf5" ,hdf5)
7325 ("bzip2" ,bzip2)
7326 ("zlib" ,zlib)))
7327 (home-page "http://www.pytables.org/")
7328 (synopsis "Hierarchical datasets for Python")
7329 (description "PyTables is a package for managing hierarchical datasets and
7330 designed to efficiently cope with extremely large amounts of data.")
7331 (license license:bsd-3)))
7332
7333 (define-public python2-tables
7334 (package-with-python2 python-tables))
7335
7336 (define-public python-pyasn1
7337 (package
7338 (name "python-pyasn1")
7339 (version "0.2.3")
7340 (source
7341 (origin
7342 (method url-fetch)
7343 (uri (pypi-uri "pyasn1" version))
7344 (sha256
7345 (base32
7346 "1b86yx23c1x74clai05a5ma8c8nfmhlx3j1mxq0ff657i2ylx33k"))))
7347 (build-system python-build-system)
7348 (home-page "http://pyasn1.sourceforge.net/")
7349 (synopsis "ASN.1 types and codecs")
7350 (description
7351 "This is an implementation of ASN.1 types and codecs in Python. It is
7352 suitable for a wide range of protocols based on the ASN.1 specification.")
7353 (license license:bsd-2)))
7354
7355 (define-public python2-pyasn1
7356 (package-with-python2 python-pyasn1))
7357
7358 (define-public python-pyasn1-modules
7359 (package
7360 (name "python-pyasn1-modules")
7361 (version "0.0.8")
7362 (source
7363 (origin
7364 (method url-fetch)
7365 (uri (pypi-uri "pyasn1-modules" version))
7366 (sha256
7367 (base32
7368 "0drqgw81xd3fxdlg89kgd79zzrabvfncvkbybi2wr6w2y4s1jmhh"))))
7369 (build-system python-build-system)
7370 (propagated-inputs
7371 `(("python-pyasn1" ,python-pyasn1)))
7372 (home-page "https://sourceforge.net/projects/pyasn1/")
7373 (synopsis "ASN.1 codec implementations")
7374 (description
7375 "Pyasn1-modules is a collection of Python modules providing ASN.1 types and
7376 implementations of ASN.1-based codecs and protocols.")
7377 (license license:bsd-3)))
7378
7379 (define-public python2-pyasn1-modules
7380 (package-with-python2 python-pyasn1-modules))
7381
7382 (define-public python-ipaddress
7383 (package
7384 (name "python-ipaddress")
7385 (version "1.0.18")
7386 (source (origin
7387 (method url-fetch)
7388 (uri (pypi-uri "ipaddress" version))
7389 (sha256
7390 (base32
7391 "1q8klj9d84cmxgz66073x1j35cplr3r77vx1znhxiwl5w74391ax"))))
7392 (build-system python-build-system)
7393 (home-page "https://github.com/phihag/ipaddress")
7394 (synopsis "IP address manipulation library")
7395 (description
7396 "This package provides a fast, lightweight IPv4/IPv6 manipulation library
7397 in Python. This library is used to create, poke at, and manipulate IPv4 and
7398 IPv6 addresses and networks. This is a port of the Python 3.3 ipaddress
7399 module to older versions of Python.")
7400 (license license:psfl)))
7401
7402 (define-public python2-ipaddress
7403 (package-with-python2 python-ipaddress))
7404
7405 (define-public python2-ipaddr
7406 (package
7407 (name "python2-ipaddr")
7408 (version "2.1.11")
7409 (source
7410 (origin
7411 (method url-fetch)
7412 (uri (pypi-uri "ipaddr" version))
7413 (sha256
7414 (base32 "1dwq3ngsapjc93fw61rp17fvzggmab5x1drjzvd4y4q0i255nm8v"))))
7415 (build-system python-build-system)
7416 (arguments
7417 `(#:python ,python-2 ;version 2 only
7418 #:phases
7419 (modify-phases %standard-phases
7420 (replace 'check
7421 (lambda* _
7422 (zero? (system* "python" "ipaddr_test.py")))))))
7423 (home-page "https://github.com/google/ipaddr-py")
7424 (synopsis "IP address manipulation library")
7425 (description
7426 "Ipaddr is a Python@tie{}2 library for creating and manupilating IPv4 and
7427 IPv6 addresses and networks.
7428
7429 For new implementations you may prefer to use the standard module
7430 @code{ipaddress}, which was introduced in Python 3.3 and backported to older
7431 versions of Python.")
7432 (license license:asl2.0)))
7433
7434 (define-public python-idna
7435 (package
7436 (name "python-idna")
7437 (version "2.5")
7438 (source
7439 (origin
7440 (method url-fetch)
7441 (uri (pypi-uri "idna" version))
7442 (sha256
7443 (base32
7444 "1ara12a7k2zc69msa0arrvw00gn61a6i6by01xb3lkkc0h4cxd9w"))))
7445 (build-system python-build-system)
7446 (home-page "https://github.com/kjd/idna")
7447 (synopsis "Internationalized domain names in applications")
7448 (description
7449 "This is a library to support the Internationalised Domain Names in
7450 Applications (IDNA) protocol as specified in RFC 5891. This version of the
7451 protocol is often referred to as “IDNA2008” and can produce different results
7452 from the earlier standard from 2003. The library is also intended to act as a
7453 suitable drop-in replacement for the “encodings.idna” module that comes with
7454 the Python standard library but currently only supports the older 2003
7455 specification.")
7456 (license license:bsd-4)))
7457
7458 (define-public python2-idna
7459 (package-with-python2 python-idna))
7460
7461 (define-public python-pretend
7462 (package
7463 (name "python-pretend")
7464 (version "1.0.8")
7465 (source
7466 (origin
7467 (method url-fetch)
7468 (uri (string-append "https://pypi.python.org/packages/source/p/"
7469 "pretend/pretend-" version ".tar.gz"))
7470 (sha256
7471 (base32
7472 "0r5r7ygz9m6d2bklflbl84cqhjkc2q12xgis8268ygjh30g2q3wk"))))
7473 (build-system python-build-system)
7474 (home-page "https://github.com/alex/pretend")
7475 (synopsis "Library for stubbing in Python")
7476 (description
7477 "Pretend is a library to make stubbing with Python easier. Stubbing is a
7478 technique for writing tests. You may hear the term mixed up with mocks,
7479 fakes, or doubles. Basically, a stub is an object that returns pre-canned
7480 responses, rather than doing any computation.")
7481 (license license:bsd-3)))
7482
7483 (define-public python2-pretend
7484 (package-with-python2 python-pretend))
7485
7486 (define-public python-cryptography-vectors
7487 (package
7488 (name "python-cryptography-vectors")
7489 (version "2.0")
7490 (source
7491 (origin
7492 (method url-fetch)
7493 (uri (pypi-uri "cryptography_vectors" version))
7494 (sha256
7495 (base32
7496 "0qadys01517k5wy0rifxip02p08kzrqxm5j0lmmlp0kr07h9jc7h"))))
7497 (build-system python-build-system)
7498 (home-page "https://github.com/pyca/cryptography")
7499 (synopsis "Test vectors for the cryptography package")
7500 (description
7501 "This package contains test vectors for the cryptography package.")
7502 ;; Distributed under either BSD-3 or ASL2.0
7503 (license (list license:bsd-3 license:asl2.0))))
7504
7505 (define-public python2-cryptography-vectors
7506 (package-with-python2 python-cryptography-vectors))
7507
7508 (define-public python-cryptography
7509 (package
7510 (name "python-cryptography")
7511 (version "2.0")
7512 (source
7513 (origin
7514 (method url-fetch)
7515 (uri (pypi-uri "cryptography" version))
7516 (sha256
7517 (base32
7518 "1c40qlxyn1jgg99f3pqi7146d3561rn9zdqc7w8f7kwr9ysm696k"))))
7519 (build-system python-build-system)
7520 (inputs
7521 `(("openssl" ,openssl)))
7522 (propagated-inputs
7523 `(("python-asn1crypto" ,python-asn1crypto)
7524 ("python-cffi" ,python-cffi)
7525 ("python-six" ,python-six)
7526 ("python-idna" ,python-idna)
7527 ("python-iso8601" ,python-iso8601)))
7528 (native-inputs
7529 `(("python-cryptography-vectors" ,python-cryptography-vectors)
7530 ("python-hypothesis" ,python-hypothesis)
7531 ("python-pretend" ,python-pretend)
7532 ("python-pytz" ,python-pytz)
7533 ("python-pytest" ,python-pytest-3.0)))
7534 (home-page "https://github.com/pyca/cryptography")
7535 (synopsis "Cryptographic recipes and primitives for Python")
7536 (description
7537 "cryptography is a package which provides cryptographic recipes and
7538 primitives to Python developers. It aims to be the “cryptographic standard
7539 library” for Python. The package includes both high level recipes, and low
7540 level interfaces to common cryptographic algorithms such as symmetric ciphers,
7541 message digests and key derivation functions.")
7542 ;; Distributed under either BSD-3 or ASL2.0
7543 (license (list license:bsd-3 license:asl2.0))
7544 (properties `((python2-variant . ,(delay python2-cryptography))))))
7545
7546 (define-public python2-cryptography
7547 (let ((crypto (package-with-python2
7548 (strip-python2-variant python-cryptography))))
7549 (package (inherit crypto)
7550 (propagated-inputs
7551 `(("python2-ipaddress" ,python2-ipaddress)
7552 ("python2-backport-ssl-match-hostname"
7553 ,python2-backport-ssl-match-hostname)
7554 ("python2-enum34" ,python2-enum34)
7555 ,@(package-propagated-inputs crypto))))))
7556
7557 (define-public python-pyopenssl
7558 (package
7559 (name "python-pyopenssl")
7560 (version "17.1.0")
7561 (source
7562 (origin
7563 (method url-fetch)
7564 (uri (pypi-uri "pyOpenSSL" version))
7565 (patches
7566 (search-patches "python-pyopenssl-17.1.0-test-overflow.patch"))
7567 (sha256
7568 (base32
7569 "0qwmqhfsq84ydir9dz273ypmlcvs7v71m1jns0sd4k0h6lfsa82s"))))
7570 (build-system python-build-system)
7571 (arguments
7572 '(#:phases
7573 (modify-phases %standard-phases
7574 (delete 'check)
7575 (add-after 'install 'check
7576 (lambda* (#:key inputs outputs #:allow-other-keys)
7577 (add-installed-pythonpath inputs outputs)
7578 (zero? (system* "py.test" "-v" "-k"
7579 (string-append
7580 ;; This test tries to look up certificates from
7581 ;; the compiled-in default path in OpenSSL, which
7582 ;; does not exist in the build environment.
7583 "not test_fallback_default_verify_paths "
7584 ;; This test attempts to make a connection to
7585 ;; an external web service.
7586 "and not test_set_default_verify_paths"))))))))
7587 (propagated-inputs
7588 `(("python-cryptography" ,python-cryptography)
7589 ("python-six" ,python-six)))
7590 (inputs
7591 `(("openssl" ,openssl)))
7592 (native-inputs
7593 `(("python-pretend" ,python-pretend)
7594 ("python-pytest" ,python-pytest-3.0)))
7595 (home-page "https://github.com/pyca/pyopenssl")
7596 (synopsis "Python wrapper module around the OpenSSL library")
7597 (description
7598 "PyOpenSSL is a high-level wrapper around a subset of the OpenSSL
7599 library.")
7600 (license license:asl2.0)))
7601
7602 (define-public python2-pyopenssl
7603 (package-with-python2 python-pyopenssl))
7604
7605 (define-public python-pip
7606 (package
7607 (name "python-pip")
7608 (version "9.0.1")
7609 (source
7610 (origin
7611 (method url-fetch)
7612 (uri (pypi-uri "pip" version))
7613 (sha256
7614 (base32
7615 "03clr9c1dih5n9c00c592zzvf6r1ffimywkaq9agcqdllzhl7wh9"))))
7616 (build-system python-build-system)
7617 (arguments
7618 '(#:tests? #f)) ; there are no tests in the pypi archive.
7619 (home-page "https://pip.pypa.io/")
7620 (synopsis "Package manager for Python software")
7621 (description
7622 "Pip is a package manager for Python software, that finds packages on the
7623 Python Package Index (PyPI).")
7624 (license license:expat)))
7625
7626 (define-public python2-pip
7627 (package-with-python2 python-pip))
7628
7629 (define-public python-tlsh
7630 (package
7631 (name "python-tlsh")
7632 (version "3.4.4")
7633 (home-page "https://github.com/trendmicro/tlsh")
7634 (source (origin
7635 (method url-fetch)
7636 (uri (string-append "https://github.com/trendmicro/tlsh/archive/v"
7637 version ".tar.gz"))
7638 (sha256
7639 (base32
7640 "00bhzjqrlh7v538kbkbn8lgx976j1138al3sdhklaizqjvpwyk4r"))
7641 (file-name (string-append name "-" version ".tar.gz"))))
7642 (build-system cmake-build-system)
7643 (arguments
7644 '(#:out-of-source? #f
7645 #:phases (modify-phases %standard-phases
7646 (replace
7647 'install
7648 (lambda* (#:key outputs #:allow-other-keys)
7649 ;; Build and install the Python bindings. The underlying
7650 ;; C++ library is apparently not meant to be installed.
7651 (let ((out (assoc-ref outputs "out")))
7652 (with-directory-excursion "py_ext"
7653 (and (system* "python" "setup.py" "build")
7654 (system* "python" "setup.py" "install"
7655 (string-append "--prefix=" out))))))))))
7656 (inputs `(("python" ,python-wrapper))) ;for the bindings
7657 (synopsis "Fuzzy matching library for Python")
7658 (description
7659 "Trend Micro Locality Sensitive Hash (TLSH) is a fuzzy matching library.
7660 Given a byte stream with a minimum length of 256 bytes, TLSH generates a hash
7661 value which can be used for similarity comparisons. Similar objects have
7662 similar hash values, which allows for the detection of similar objects by
7663 comparing their hash values. The byte stream should have a sufficient amount
7664 of complexity; for example, a byte stream of identical bytes will not generate
7665 a hash value.")
7666 (license license:asl2.0)))
7667
7668 (define-public python2-tlsh
7669 (package
7670 (inherit python-tlsh)
7671 (name "python2-tlsh")
7672 (inputs `(("python" ,python-2)))))
7673
7674 (define-public python-termcolor
7675 (package
7676 (name "python-termcolor")
7677 (version "1.1.0")
7678 (source
7679 (origin
7680 (method url-fetch)
7681 (uri (pypi-uri "termcolor" version))
7682 (sha256
7683 (base32
7684 "0fv1vq14rpqwgazxg4981904lfyp84mnammw7y046491cv76jv8x"))))
7685 (build-system python-build-system)
7686 (arguments
7687 ;; There are no tests.
7688 `(#:tests? #f))
7689 (home-page "http://pypi.python.org/pypi/termcolor")
7690 (synopsis "ANSII Color formatting for terminal output")
7691 (description
7692 "This package provides ANSII Color formatting for output in terminals.")
7693 (license license:expat)))
7694
7695 (define-public python2-termcolor
7696 (package-with-python2 python-termcolor))
7697
7698 (define-public python-libarchive-c
7699 (package
7700 (name "python-libarchive-c")
7701 (version "2.2")
7702 (source (origin
7703 (method url-fetch)
7704 (uri (pypi-uri "libarchive-c" version))
7705 (sha256
7706 (base32
7707 "0z4r7v3dhd6b3120mav05ff08srih176r2rg5k8kn7mjd9pslm2x"))))
7708 (build-system python-build-system)
7709 (arguments
7710 '(#:phases (modify-phases %standard-phases
7711 (add-before
7712 'build 'reference-libarchive
7713 (lambda* (#:key inputs #:allow-other-keys)
7714 ;; Retain the absolute file name of libarchive.so.
7715 (let ((libarchive (assoc-ref inputs "libarchive")))
7716 (substitute* "libarchive/ffi.py"
7717 (("find_library\\('archive'\\)")
7718 (string-append "'" libarchive
7719 "/lib/libarchive.so'")))))))))
7720 (inputs
7721 `(("libarchive" ,libarchive)))
7722 (home-page "https://github.com/Changaco/python-libarchive-c")
7723 (synopsis "Python interface to libarchive")
7724 (description
7725 "This package provides Python bindings to libarchive, a C library to
7726 access possibly compressed archives in many different formats. It uses
7727 Python's @code{ctypes} foreign function interface (FFI).")
7728 (license license:lgpl2.0+)))
7729
7730 (define-public python2-libarchive-c
7731 (package-with-python2 python-libarchive-c))
7732
7733 (define-public python-file
7734 (package
7735 (inherit file)
7736 (name "python-file")
7737 (source (origin
7738 (inherit (package-source file))
7739 ;; This patch should not be applied to python2-file.
7740 (patches (search-patches "python-file-double-encoding-bug.patch"))))
7741 (build-system python-build-system)
7742 (arguments
7743 '(#:tests? #f ;no tests
7744 #:configure-flags '("--single-version-externally-managed" "--root=/")
7745 #:phases (modify-phases %standard-phases
7746 (add-before 'build 'change-directory
7747 (lambda _
7748 (chdir "python")
7749 #t))
7750 (add-before 'build 'set-library-file-name
7751 (lambda* (#:key inputs #:allow-other-keys)
7752 (let ((file (assoc-ref inputs "file")))
7753 (substitute* "magic.py"
7754 (("find_library\\('magic'\\)")
7755 (string-append "'" file "/lib/libmagic.so'")))
7756 #t))))))
7757 (inputs `(("file" ,file)))
7758 (self-native-input? #f)
7759 (synopsis "Python bindings to the libmagic file type guesser. Note that
7760 this module and the python-magic module both provide a \"magic.py\" file;
7761 these two modules, which are different and were developed separately, both
7762 serve the same purpose: provide Python bindings for libmagic.")))
7763
7764 (define-public python2-file
7765 (package-with-python2 python-file))
7766
7767 (define-public python-debian
7768 (package
7769 (name "python-debian")
7770 (version "0.1.28")
7771 (source
7772 (origin
7773 (method url-fetch)
7774 (uri (pypi-uri name version))
7775 (sha256
7776 (base32
7777 "0i15f0xzx679sd0ldq2sls9pnnps9fv6vhqvnv9dzf4qhma42i0y"))))
7778 (build-system python-build-system)
7779 (propagated-inputs
7780 `(("python-six" ,python-six)))
7781 (home-page "http://packages.debian.org/sid/python-debian")
7782 (synopsis "Debian package related modules")
7783 (description
7784 ;; XXX: Use @enumerate instead of @itemize to work around
7785 ;; <http://bugs.gnu.org/21772>.
7786 "This package provides Python modules that abstract many formats of
7787 Debian-related files, such as:
7788
7789 @enumerate
7790 @item Debtags information;
7791 @item @file{debian/changelog} files;
7792 @item packages files, pdiffs;
7793 @item control files of single or multiple RFC822-style paragraphs---e.g.
7794 @file{debian/control}, @file{.changes}, @file{.dsc};
7795 @item Raw @file{.deb} and @file{.ar} files, with (read-only) access to
7796 contained files and meta-information.
7797 @end enumerate\n")
7798
7799 ;; Modules are either GPLv2+ or GPLv3+.
7800 (license license:gpl3+)))
7801
7802 (define-public python2-debian
7803 (package-with-python2 python-debian))
7804
7805 (define-public python-nbformat
7806 (package
7807 (name "python-nbformat")
7808 (version "4.1.0")
7809 (source
7810 (origin
7811 (method url-fetch)
7812 (uri (pypi-uri "nbformat" version))
7813 (sha256
7814 (base32
7815 "0mq8iki3d4mnx7wy05phss7x98mds4fqydin8lcagidp1knw1xnv"))))
7816 (build-system python-build-system)
7817 (arguments `(#:tests? #f)) ; no test target
7818 (propagated-inputs
7819 `(("python-ipython-genutils" ,python-ipython-genutils)
7820 ("python-jsonschema" ,python-jsonschema)
7821 ("python-jupyter-core" ,python-jupyter-core)
7822 ("python-traitlets" ,python-traitlets)))
7823 (home-page "http://jupyter.org")
7824 (synopsis "Jupyter Notebook format")
7825 (description "This package provides the reference implementation of the
7826 Jupyter Notebook format and Python APIs for working with notebooks.")
7827 (license license:bsd-3)))
7828
7829 (define-public python2-nbformat
7830 (package-with-python2 python-nbformat))
7831
7832 (define-public python-bleach
7833 (package
7834 (name "python-bleach")
7835 (version "1.4.3")
7836 (source
7837 (origin
7838 (method url-fetch)
7839 (uri (pypi-uri "bleach" version))
7840 (sha256
7841 (base32
7842 "0jvg3jxrvnx7xmm9gj262v60ib452xlnwlb0navyp7jsvcd0d4qj"))))
7843 (build-system python-build-system)
7844 (propagated-inputs
7845 `(("python-html5lib" ,python-html5lib-0.9)
7846 ("python-six" ,python-six)))
7847 (native-inputs
7848 `(("python-nose" ,python-nose)))
7849 (home-page "https://github.com/jsocol/bleach")
7850 (synopsis "Whitelist-based HTML-sanitizing tool")
7851 (description "Bleach is an easy whitelist-based HTML-sanitizing tool.")
7852 (license license:asl2.0)))
7853
7854 (define-public python2-bleach
7855 (package-with-python2 python-bleach))
7856
7857 (define-public python-entrypoints
7858 (package
7859 (name "python-entrypoints")
7860 (version "0.2.2")
7861 (source
7862 (origin
7863 (method url-fetch)
7864 (uri (string-append "https://github.com/takluyver/entrypoints/archive/"
7865 version ".tar.gz"))
7866 (file-name (string-append name "-" version ".tar.gz"))
7867 (sha256
7868 (base32
7869 "0azqlkh3j0za080lsf5crnhaxx3c93k9dpv5ihkhf5cppgw5sjz5"))))
7870 (build-system python-build-system)
7871 ;; The package does not come with a setup.py file, so we have to generate
7872 ;; one ourselves.
7873 (arguments
7874 `(#:tests? #f
7875 #:phases
7876 (modify-phases %standard-phases
7877 (add-after 'unpack 'create-setup.py
7878 (lambda _
7879 (call-with-output-file "setup.py"
7880 (lambda (port)
7881 (format port "\
7882 from setuptools import setup
7883 setup(name='entrypoints', version='~a', py_modules=['entrypoints'])
7884 " ,version))))))))
7885 (home-page "https://github.com/takluyver/entrypoints")
7886 (synopsis "Discover and load entry points from installed Python packages")
7887 (description "Entry points are a way for Python packages to advertise
7888 objects with some common interface. The most common examples are
7889 @code{console_scripts} entry points, which define shell commands by
7890 identifying a Python function to run. The @code{entrypoints} module contains
7891 functions to find and load entry points.")
7892 (license license:expat)))
7893
7894 (define-public python2-entrypoints
7895 (package-with-python2 python-entrypoints))
7896
7897 (define-public python-nbconvert
7898 (package
7899 (name "python-nbconvert")
7900 (version "5.0.0b1")
7901 (source
7902 (origin
7903 (method url-fetch)
7904 (uri (pypi-uri "nbconvert" version))
7905 (sha256
7906 (base32
7907 "0brclbb18l4nmd5qy3dl9wn05rjdh1fz4rmzdlfqacj12rcdvdgp"))))
7908 (build-system python-build-system)
7909 (arguments
7910 `(;; The "bdist_egg" target is disabled by default, causing the installation
7911 ;; to fail.
7912 #:configure-flags (list "bdist_egg")
7913 ;; FIXME: 5 failures, 40 errors.
7914 #:tests? #f))
7915 ;; #:phases
7916 ;; (modify-phases %standard-phases
7917 ;; (replace 'check
7918 ;; (lambda _
7919 ;; (zero? (system* "py.test" "-v")))))
7920 (native-inputs
7921 `(("python-pytest" ,python-pytest)))
7922 (propagated-inputs
7923 `(("python-bleach" ,python-bleach)
7924 ("python-entrypoints" ,python-entrypoints)
7925 ("python-jinja2" ,python-jinja2)
7926 ("python-jupyter-core" ,python-jupyter-core)
7927 ("python-mistune" ,python-mistune)
7928 ("python-nbformat" ,python-nbformat)
7929 ("python-pygments" ,python-pygments)
7930 ("python-traitlets" ,python-traitlets)))
7931 (home-page "http://jupyter.org")
7932 (synopsis "Converting Jupyter Notebooks")
7933 (description "The @code{nbconvert} tool, @{jupyter nbconvert}, converts
7934 notebooks to various other formats via Jinja templates. It allows you to
7935 convert an @code{.ipynb} notebook file into various static formats including:
7936
7937 @enumerate
7938 @item HTML
7939 @item LaTeX
7940 @item PDF
7941 @item Reveal JS
7942 @item Markdown (md)
7943 @item ReStructured Text (rst)
7944 @item executable script
7945 @end enumerate\n")
7946 (license license:bsd-3)))
7947
7948 (define-public python2-nbconvert
7949 (package-with-python2 python-nbconvert))
7950
7951 (define-public python-notebook
7952 (package
7953 (name "python-notebook")
7954 (version "4.2.3")
7955 (source (origin
7956 (method url-fetch)
7957 (uri (pypi-uri "notebook" version))
7958 (sha256
7959 (base32
7960 "0laq5c2f21frq6xcdckgq7raqhznbjb0qs0357g612z87wyn1a9r"))))
7961 (build-system python-build-system)
7962 (arguments
7963 `(#:phases
7964 (modify-phases %standard-phases
7965 (replace 'check
7966 (lambda _
7967 ;; HOME must be set for tests
7968 (setenv "HOME" "/tmp")
7969 (zero? (system* "nosetests")))))))
7970 (propagated-inputs
7971 `(("python-jupyter-core" ,python-jupyter-core)
7972 ("python-nbformat" ,python-nbformat)
7973 ("python-nbconvert" ,python-nbconvert)
7974 ("python-ipython" ,python-ipython)))
7975 (native-inputs
7976 `(("python-nose" ,python-nose)
7977 ("python-sphinx" ,python-sphinx)
7978 ("python-requests" ,python-requests)))
7979 (home-page "http://jupyter.org/")
7980 (synopsis "Web-based notebook environment for interactive computing")
7981 (description
7982 "The Jupyter HTML notebook is a web-based notebook environment for
7983 interactive computing.")
7984 (properties `((python2-variant . ,(delay python2-notebook))))
7985 (license license:bsd-3)))
7986
7987 (define-public python2-notebook
7988 (let ((base (package-with-python2
7989 (strip-python2-variant python-notebook))))
7990 (package (inherit base)
7991 (native-inputs
7992 `(("python2-mock" ,python2-mock)
7993 ,@(package-native-inputs base)))
7994 (arguments
7995 (substitute-keyword-arguments (package-arguments base)
7996 ((#:phases phases)
7997 `(modify-phases ,phases
7998 (add-before 'check 'disable-test-case
7999 ;; The test requires network access to localhost. Curiously it
8000 ;; fails with Python 2 only. Simply make the test-case return
8001 ;; immediately.
8002 (lambda _
8003 (substitute*
8004 "notebook/services/nbconvert/tests/test_nbconvert_api.py"
8005 (("formats = self.nbconvert_api") "return #")))))))))))
8006
8007 (define-public python-widgetsnbextension
8008 (package
8009 (name "python-widgetsnbextension")
8010 (version "1.2.6")
8011 (source
8012 (origin
8013 (method url-fetch)
8014 (uri (pypi-uri "widgetsnbextension" version))
8015 (sha256
8016 (base32
8017 "0lff2mrwrgsa1mxmwx3phl9xvy0jqfpg6khbmxy53jbq56rwy666"))))
8018 (build-system python-build-system)
8019 (propagated-inputs
8020 `(("python-notebook" ,python-notebook)))
8021 (native-inputs
8022 `(("python-certifi" ,python-certifi)
8023 ("python-nose" ,python-nose)))
8024 (home-page "http://ipython.org")
8025 (synopsis "IPython HTML widgets for Jupyter")
8026 (description "This package provides interactive HTML widgets for Jupyter
8027 notebooks.")
8028 (license license:bsd-3)))
8029
8030 (define-public python2-widgetsnbextension
8031 (package-with-python2 python-widgetsnbextension))
8032
8033 (define-public python-ipywidgets
8034 (package
8035 (name "python-ipywidgets")
8036 (version "5.2.2")
8037 (source
8038 (origin
8039 (method url-fetch)
8040 (uri (pypi-uri "ipywidgets" version))
8041 (sha256
8042 (base32
8043 "1lk0qrr5l9a0z7qkkn30hv5832whxwxymf1l576fmmad0n7hkxms"))))
8044 (build-system python-build-system)
8045 ;; FIXME: it's not clear how to run the tests.
8046 (arguments `(#:tests? #f))
8047 (propagated-inputs
8048 `(("python-ipykernel" ,python-ipykernel)
8049 ("python-ipython" ,python-ipython)
8050 ("python-traitlets" ,python-traitlets)
8051 ("python-widgetsnbextension" ,python-widgetsnbextension)))
8052 (home-page "http://ipython.org")
8053 (synopsis "IPython HTML widgets for Jupyter")
8054 (description "Ipywidgets are interactive HTML widgets for Jupyter
8055 notebooks and the IPython kernel. Notebooks come alive when interactive
8056 widgets are used. Users gain control of their data and can visualize changes
8057 in the data.")
8058 (license license:bsd-3)))
8059
8060 (define-public python2-ipywidgets
8061 (package-with-python2 python-ipywidgets))
8062
8063 (define-public python-jupyter-console
8064 (package
8065 (name "python-jupyter-console")
8066 (version "5.0.0")
8067 (source
8068 (origin
8069 (method url-fetch)
8070 (uri (pypi-uri "jupyter_console" version))
8071 (sha256
8072 (base32
8073 "04acmkwsi99rcg3vb54c6n492zv35s92h2ahabc0w6wj976cipvx"))))
8074 (build-system python-build-system)
8075 ;; FIXME: it's not clear how to run the tests.
8076 (arguments `(#:tests? #f))
8077 (propagated-inputs
8078 `(("python-ipykernel" ,python-ipykernel)
8079 ("python-ipython" ,python-ipython)
8080 ("python-jupyter-client" ,python-jupyter-client)
8081 ("python-prompt-toolkit" ,python-prompt-toolkit)
8082 ("python-pygments" ,python-pygments)))
8083 (home-page "https://jupyter.org")
8084 (synopsis "Jupyter terminal console")
8085 (description "This package provides a terminal-based console frontend for
8086 Jupyter kernels. It also allows for console-based interaction with non-Python
8087 Jupyter kernels such as IJulia and IRKernel.")
8088 (license license:bsd-3)))
8089
8090 (define-public python2-jupyter-console
8091 (package-with-python2 python-jupyter-console))
8092
8093 (define-public jupyter
8094 (package
8095 (name "jupyter")
8096 (version "1.0.0")
8097 (source
8098 (origin
8099 (method url-fetch)
8100 (uri (pypi-uri "jupyter" version))
8101 (sha256
8102 (base32
8103 "0pwf3pminkzyzgx5kcplvvbvwrrzd3baa7lmh96f647k30rlpp6r"))))
8104 (build-system python-build-system)
8105 ;; FIXME: it's not clear how to run the tests.
8106 (arguments `(#:tests? #f))
8107 (propagated-inputs
8108 `(("python-ipykernel" ,python-ipykernel)
8109 ("python-ipywidgets" ,python-ipywidgets)
8110 ("python-jupyter-console" ,python-jupyter-console)
8111 ("python-nbconvert" ,python-nbconvert)
8112 ("python-notebook" ,python-notebook)))
8113 (home-page "http://jupyter.org")
8114 (synopsis "Web application for interactive documents")
8115 (description
8116 "The Jupyter Notebook is a web application that allows you to create and
8117 share documents that contain live code, equations, visualizations and
8118 explanatory text. Uses include: data cleaning and transformation, numerical
8119 simulation, statistical modeling, machine learning and much more.")
8120 (license license:bsd-3)))
8121
8122 (define-public python-chardet
8123 (package
8124 (name "python-chardet")
8125 (version "2.3.0")
8126 (source
8127 (origin
8128 (method url-fetch)
8129 (uri (string-append
8130 "https://pypi.python.org/packages/source/c/chardet/chardet-"
8131 version
8132 ".tar.gz"))
8133 (sha256
8134 (base32
8135 "1ak87ikcw34fivcgiz2xvi938dmclh078az65l9x3rmgljrkhgp5"))))
8136 (build-system python-build-system)
8137 (home-page "https://github.com/chardet/chardet")
8138 (synopsis "Universal encoding detector for Python 2 and 3")
8139 (description
8140 "This package provides @code{chardet}, a Python module that can
8141 automatically detect a wide range of file encodings.")
8142 (license license:lgpl2.1+)))
8143
8144 (define-public python2-chardet
8145 (package-with-python2 python-chardet))
8146
8147 (define-public python-docopt
8148 (package
8149 (name "python-docopt")
8150 (version "0.6.2")
8151 (source
8152 (origin
8153 (method url-fetch)
8154 ;; The release on PyPI does not include tests.
8155 (uri (string-append
8156 "https://github.com/docopt/docopt/archive/"
8157 version ".tar.gz"))
8158 (file-name (string-append name "-" version ".tar.gz"))
8159 (sha256
8160 (base32
8161 "16bf890xbdz3m30rsv2qacklh2rdn1zrfspfnwzx9g7vwz8yw4r1"))))
8162 (build-system python-build-system)
8163 (native-inputs
8164 `(("python-pytest" ,python-pytest)))
8165 (arguments
8166 `(#:phases (alist-replace
8167 'check
8168 (lambda _ (zero? (system* "py.test")))
8169 %standard-phases)))
8170 (home-page "http://docopt.org")
8171 (synopsis "Command-line interface description language for Python")
8172 (description "This library allows the user to define a command-line
8173 interface from a program's help message rather than specifying it
8174 programatically with command-line parsers like @code{getopt} and
8175 @code{argparse}.")
8176 (license license:expat)))
8177
8178 (define-public python2-docopt
8179 (package-with-python2 python-docopt))
8180
8181 (define-public python-zope-event
8182 (package
8183 (name "python-zope-event")
8184 (version "4.1.0")
8185 (source
8186 (origin
8187 (method url-fetch)
8188 (uri (string-append "https://pypi.python.org/packages/source/z"
8189 "/zope.event/zope.event-" version ".tar.gz"))
8190 (sha256
8191 (base32
8192 "11p75zpfz3ffhz21nzx9wb23xs993ck5s6hkjcvhswwizni5jynw"))))
8193 (build-system python-build-system)
8194 (home-page "http://pypi.python.org/pypi/zope.event")
8195 (synopsis "Event publishing system for Python")
8196 (description "Zope.event provides an event publishing API, intended for
8197 use by applications which are unaware of any subscribers to their events. It
8198 is a simple event-dispatching system on which more sophisticated event
8199 dispatching systems can be built.")
8200 (license license:zpl2.1)))
8201
8202 (define-public python2-zope-event
8203 (package-with-python2 python-zope-event))
8204
8205 (define-public python-zope-interface
8206 (package
8207 (name "python-zope-interface")
8208 (version "4.1.3")
8209 (source
8210 (origin
8211 (method url-fetch)
8212 (uri (string-append "https://pypi.python.org/packages/source/z"
8213 "/zope.interface/zope.interface-" version ".tar.gz"))
8214 (sha256
8215 (base32
8216 "0ks8h73b2g4bkad821qbv0wzjppdrwys33i7ka45ik3wxjg1l8if"))))
8217 (build-system python-build-system)
8218 (native-inputs
8219 `(("python-zope-event" ,python-zope-event)))
8220 (home-page "https://github.com/zopefoundation/zope.interface")
8221 (synopsis "Python implementation of the \"design by contract\"
8222 methodology")
8223 (description "Zope.interface provides an implementation of \"object
8224 interfaces\" for Python. Interfaces are a mechanism for labeling objects as
8225 conforming to a given API or contract.")
8226 (license license:zpl2.1)))
8227
8228 (define-public python2-zope-interface
8229 (package-with-python2 python-zope-interface))
8230
8231 (define-public python-zope-exceptions
8232 (package
8233 (name "python-zope-exceptions")
8234 (version "4.0.8")
8235 (source
8236 (origin
8237 (method url-fetch)
8238 (uri (string-append "https://pypi.python.org/packages/source/z"
8239 "/zope.exceptions/zope.exceptions-"
8240 version ".tar.gz"))
8241 (sha256
8242 (base32
8243 "0zwxaaa66sqxg5k7zcrvs0fbg9ym1njnxnr28dfmchzhwjvwnfzl"))))
8244 (build-system python-build-system)
8245 (arguments
8246 '(#:tests? #f)) ; circular dependency with zope.testrunner
8247 (propagated-inputs
8248 `(("python-zope-interface" ,python-zope-interface)))
8249 (home-page "http://cheeseshop.python.org/pypi/zope.exceptions")
8250 (synopsis "Zope exceptions")
8251 (description "Zope.exceptions provides general-purpose exception types
8252 that have uses outside of the Zope framework.")
8253 (license license:zpl2.1)))
8254
8255 (define-public python2-zope-exceptions
8256 (package-with-python2 python-zope-exceptions))
8257
8258 (define-public python-zope-testing
8259 (package
8260 (name "python-zope-testing")
8261 (version "4.5.0")
8262 (source
8263 (origin
8264 (method url-fetch)
8265 (uri (string-append "https://pypi.python.org/packages/source/z"
8266 "/zope.testing/zope.testing-" version ".tar.gz"))
8267 (sha256
8268 (base32
8269 "1yvglxhzvhl45mndvn9gskx2ph30zz1bz7rrlyfs62fv2pvih90s"))
8270 (modules '((guix build utils)))
8271 (snippet
8272 '(begin
8273 ;; Remove pre-compiled .pyc files backup files from source.
8274 (for-each delete-file (find-files "." "(\\.pyc|~)$"))
8275 #t))))
8276 (build-system python-build-system)
8277 (native-inputs
8278 `(("python-zope-exceptions" ,python-zope-exceptions)))
8279 (propagated-inputs
8280 `(("python-zope-interface" ,python-zope-interface)))
8281 (home-page "http://pypi.python.org/pypi/zope.testing")
8282 (synopsis "Zope testing helpers")
8283 (description "Zope.testing provides a number of testing utilities for HTML
8284 forms, HTTP servers, regular expressions, and more.")
8285 (license license:zpl2.1)))
8286
8287 (define-public python2-zope-testing
8288 (package-with-python2 python-zope-testing))
8289
8290 (define-public python-zope-testrunner
8291 (package
8292 (name "python-zope-testrunner")
8293 (version "4.4.9")
8294 (source
8295 (origin
8296 (method url-fetch)
8297 (uri (string-append "https://pypi.python.org/packages/source/z"
8298 "/zope.testrunner/zope.testrunner-"
8299 version ".zip"))
8300 (sha256
8301 (base32
8302 "1r7iqknhh55y45f64mz5hghgvzx34h1i11k350s0avx6q8gznja1"))))
8303 (build-system python-build-system)
8304 (arguments
8305 '(#:tests? #f)) ; FIXME: Tests can't find zope.interface.
8306 (native-inputs
8307 `(("python-six" ,python-six)
8308 ;("python-zope-interface" ,python-zope-interface)
8309 ("python-zope-exceptions" ,python-zope-exceptions)
8310 ("python-zope-testing" ,python-zope-testing)
8311 ("unzip" ,unzip)))
8312 (propagated-inputs
8313 `(("python-zope-interface" ,python-zope-interface)))
8314 (home-page "http://pypi.python.org/pypi/zope.testrunner")
8315 (synopsis "Zope testrunner script")
8316 (description "Zope.testrunner provides a script for running Python
8317 tests.")
8318 (license license:zpl2.1)))
8319
8320 (define-public python2-zope-testrunner
8321 (let ((base (package-with-python2 python-zope-testrunner)))
8322 (package
8323 (inherit base)
8324 (native-inputs
8325 (append (package-native-inputs base)
8326 `(("python2-subunit" ,python2-subunit)
8327 ("python2-mimeparse" ,python2-mimeparse)))))))
8328
8329 (define-public python-zope-i18nmessageid
8330 (package
8331 (name "python-zope-i18nmessageid")
8332 (version "4.0.3")
8333 (source
8334 (origin
8335 (method url-fetch)
8336 (uri (string-append
8337 "https://pypi.python.org/packages/source/z"
8338 "/zope.i18nmessageid/zope.i18nmessageid-"
8339 version ".tar.gz"))
8340 (sha256
8341 (base32
8342 "1rslyph0klk58dmjjy4j0jxy21k03azksixc3x2xhqbkv97cmzml"))))
8343 (build-system python-build-system)
8344 (home-page "http://pypi.python.org/pypi/zope.i18nmessageid")
8345 (synopsis "Message identifiers for internationalization")
8346 (description "Zope.i18nmessageid provides facilities for declaring
8347 internationalized messages within program source text.")
8348 (license license:zpl2.1)))
8349
8350 (define-public python2-zope-i18nmessageid
8351 (package-with-python2 python-zope-i18nmessageid))
8352
8353 (define-public python-zope-schema
8354 (package
8355 (name "python-zope-schema")
8356 (version "4.4.2")
8357 (source
8358 (origin
8359 (method url-fetch)
8360 (uri (string-append "https://pypi.python.org/packages/source/z"
8361 "/zope.schema/zope.schema-" version ".tar.gz"))
8362 (sha256
8363 (base32
8364 "1p943jdxb587dh7php4vx04qvn7b2877hr4qs5zyckvp5afhhank"))))
8365 (build-system python-build-system)
8366 (arguments
8367 '(#:tests? #f)) ; FIXME: Tests can't find zope.event.
8368 (propagated-inputs
8369 `(("python-zope-event" ,python-zope-event)
8370 ("python-zope-exceptions", python-zope-exceptions)
8371 ("python-zope-interface" ,python-zope-interface)))
8372 (native-inputs
8373 `(("python-zope-testing" ,python-zope-testing)
8374 ("python-coverage" ,python-coverage)
8375 ("python-nose" ,python-nose)))
8376 (home-page "http://pypi.python.org/pypi/zope.schema")
8377 (synopsis "Zope data schemas")
8378 (description "Zope.scheme provides extensions to zope.interface for
8379 defining data schemas.")
8380 (license license:zpl2.1)))
8381
8382 (define-public python2-zope-schema
8383 (package-with-python2 python-zope-schema))
8384
8385 (define-public python-zope-configuration
8386 (package
8387 (name "python-zope-configuration")
8388 (version "4.0.3")
8389 (source (origin
8390 (method url-fetch)
8391 (uri (string-append "https://pypi.python.org/packages/source/z"
8392 "/zope.configuration/zope.configuration-"
8393 version ".tar.gz"))
8394 (sha256
8395 (base32
8396 "1x9dfqypgympnlm25p9m43xh4qv3p7d75vksv9pzqibrb4cggw5n"))))
8397 (build-system python-build-system)
8398 (arguments
8399 '(#:tests? #f)) ; FIXME: Tests can't find zope.interface.
8400 (propagated-inputs
8401 `(("python-zope-i18nmessageid" ,python-zope-i18nmessageid)
8402 ("python-zope-schema" ,python-zope-schema)))
8403 (home-page "http://pypi.python.org/pypi/zope.configuration")
8404 (synopsis "Zope Configuration Markup Language")
8405 (description "Zope.configuration implements ZCML, the Zope Configuration
8406 Markup Language.")
8407 (license license:zpl2.1)))
8408
8409 (define-public python2-zope-configuration
8410 (package-with-python2 python-zope-configuration))
8411
8412 (define-public python-zope-proxy
8413 (package
8414 (name "python-zope-proxy")
8415 (version "4.1.6")
8416 (source
8417 (origin
8418 (method url-fetch)
8419 (uri (string-append "https://pypi.python.org/packages/source/z"
8420 "/zope.proxy/zope.proxy-" version ".tar.gz"))
8421 (sha256
8422 (base32
8423 "0pqwwmvm1prhwv1ziv9lp8iirz7xkwb6n2kyj36p2h0ppyyhjnm4"))))
8424 (build-system python-build-system)
8425 (arguments
8426 '(#:tests? #f)) ; FIXME: Tests can't find zope.interface.
8427 (propagated-inputs
8428 `(("python-zope-interface" ,python-zope-interface)))
8429 (home-page "http://pypi.python.org/pypi/zope.proxy")
8430 (synopsis "Generic, transparent proxies")
8431 (description "Zope.proxy provides generic, transparent proxies for Python.
8432 Proxies are special objects which serve as mostly-transparent wrappers around
8433 another object, intervening in the apparent behavior of the wrapped object
8434 only when necessary to apply the policy (e.g., access checking, location
8435 brokering, etc.) for which the proxy is responsible.")
8436 (license license:zpl2.1)))
8437
8438 (define-public python2-zope-proxy
8439 (package-with-python2 python-zope-proxy))
8440
8441 (define-public python-zope-location
8442 (package
8443 (name "python-zope-location")
8444 (version "4.0.3")
8445 (source
8446 (origin
8447 (method url-fetch)
8448 (uri (string-append "https://pypi.python.org/packages/source/z"
8449 "/zope.location/zope.location-" version ".tar.gz"))
8450 (sha256
8451 (base32
8452 "1nj9da4ksiyv3h8n2vpzwd0pb03mdsh7zy87hfpx72b6p2zcwg74"))))
8453 (build-system python-build-system)
8454 (arguments
8455 '(#:tests? #f)) ; FIXME: Tests can't find zope.interface.
8456 (propagated-inputs
8457 `(("python-zope-proxy" ,python-zope-proxy)
8458 ("python-zope-schema" ,python-zope-schema)))
8459 (home-page "http://pypi.python.org/pypi/zope.location/")
8460 (synopsis "Zope location library")
8461 (description "Zope.location implements the concept of \"locations\" in
8462 Zope3, which are are special objects that have a structural location.")
8463 (license license:zpl2.1)))
8464
8465 (define-public python2-zope-location
8466 (package-with-python2 python-zope-location))
8467
8468 (define-public python-zope-security
8469 (package
8470 (name "python-zope-security")
8471 (version "4.0.3")
8472 (source
8473 (origin
8474 (method url-fetch)
8475 (uri (string-append "https://pypi.python.org/packages/source/z"
8476 "/zope.security/zope.security-" version ".tar.gz"))
8477 (sha256
8478 (base32
8479 "14zmf684amc0x32kq05yxnhfqd1cmyhafkw05gn81rn90zjv6ssy"))))
8480 (build-system python-build-system)
8481 (arguments
8482 '(#:tests? #f)) ; FIXME: Tests can't find zope.testrunner.
8483 (propagated-inputs
8484 `(("python-zope-i18nmessageid" ,python-zope-i18nmessageid)
8485 ("python-zope-proxy" ,python-zope-proxy)
8486 ("python-zope-schema" ,python-zope-schema)))
8487 (native-inputs
8488 `(("python-six" ,python-six)
8489 ("python-zope-component" ,python-zope-component)
8490 ("python-zope-configuration" ,python-zope-configuration)
8491 ("python-zope-location" ,python-zope-location)
8492 ("python-zope-testrunner" ,python-zope-testrunner)
8493 ("python-zope-testing" ,python-zope-testing)))
8494 (home-page "http://pypi.python.org/pypi/zope.security")
8495 (synopsis "Zope security framework")
8496 (description "Zope.security provides a generic mechanism to implement
8497 security policies on Python objects.")
8498 (license license:zpl2.1)))
8499
8500 (define-public python2-zope-security
8501 (let ((zope-security (package-with-python2 python-zope-security)))
8502 (package (inherit zope-security)
8503 (propagated-inputs
8504 `(("python2-zope-testrunner" ,python2-zope-testrunner)
8505 ,@(alist-delete
8506 "python-zope-testrunner"
8507 (package-propagated-inputs zope-security)))))))
8508
8509 (define-public python-zope-component
8510 (package
8511 (name "python-zope-component")
8512 (version "4.3.0")
8513 (source
8514 (origin
8515 (method url-fetch)
8516 (uri (pypi-uri "zope.component" version))
8517 (sha256
8518 (base32
8519 "1hlvzwj1kcfz1qms1dzhwsshpsf38z9clmyksb1gh41n8k3kchdv"))))
8520 (build-system python-build-system)
8521 (arguments
8522 ;; Skip tests due to circular dependency with python-zope-security.
8523 '(#:tests? #f))
8524 (native-inputs
8525 `(("python-zope-testing" ,python-zope-testing)))
8526 (propagated-inputs
8527 `(("python-zope-event" ,python-zope-event)
8528 ("python-zope-interface" ,python-zope-interface)
8529 ("python-zope-i18nmessageid" ,python-zope-i18nmessageid)
8530 ("python-zope-configuration" ,python-zope-configuration)))
8531 (home-page "https://github.com/zopefoundation/zope.component")
8532 (synopsis "Zope Component Architecture")
8533 (description "Zope.component represents the core of the Zope Component
8534 Architecture. Together with the zope.interface package, it provides
8535 facilities for defining, registering and looking up components.")
8536 (license license:zpl2.1)))
8537
8538 (define-public python2-zope-component
8539 (package-with-python2 python-zope-component))
8540
8541 (define-public python-pythondialog
8542 (package
8543 (name "python-pythondialog")
8544 (version "3.4.0")
8545 (source
8546 (origin
8547 (method url-fetch)
8548 (uri (pypi-uri "pythondialog" version))
8549 (sha256
8550 (base32
8551 "1728ghsran47jczn9bhlnkvk5bvqmmbihabgif5h705b84r1272c"))))
8552 (build-system python-build-system)
8553 (arguments
8554 `(#:phases
8555 (modify-phases %standard-phases
8556 (add-after 'unpack 'patch-path
8557 (lambda* (#:key inputs #:allow-other-keys)
8558 (let* ((dialog (assoc-ref inputs "dialog")))
8559 ;; Since this library really wants to grovel the search path, we
8560 ;; must hardcode dialog's store path into it.
8561 (substitute* "dialog.py"
8562 (("os.getenv\\(\"PATH\", \":/bin:/usr/bin\"\\)")
8563 (string-append "os.getenv(\"PATH\") + \":" dialog "/bin\"")))
8564 #t))))
8565 #:tests? #f)) ; no test suite
8566 (propagated-inputs
8567 `(("dialog" ,dialog)))
8568 (home-page "http://pythondialog.sourceforge.net/")
8569 (synopsis "Python interface to the UNIX dialog utility")
8570 (description "A Python wrapper for the dialog utility. Its purpose is to
8571 provide an easy to use, pythonic and comprehensive Python interface to dialog.
8572 This allows one to make simple text-mode user interfaces on Unix-like systems")
8573 (license license:lgpl2.1)
8574 (properties `((python2-variant . ,(delay python2-pythondialog))))))
8575
8576 (define-public python2-pythondialog
8577 (let ((base (package-with-python2 (strip-python2-variant python-pythondialog))))
8578 (package
8579 (inherit base)
8580 (version (package-version python-pythondialog))
8581 (source (origin
8582 (method url-fetch)
8583 (uri (pypi-uri "python2-pythondialog" version))
8584 (sha256
8585 (base32
8586 "0d8k7lxk50imdyx85lv8j98i4c93a71iwpapnl1506rpkbm9qvd9")))))))
8587
8588 (define-public python-pyrfc3339
8589 (package
8590 (name "python-pyrfc3339")
8591 (version "1.0")
8592 (source
8593 (origin
8594 (method url-fetch)
8595 (uri (pypi-uri "pyRFC3339" version))
8596 (sha256
8597 (base32
8598 "0dgm4l9y8jiax5cp6yxjd2i27cq8h33sh81n1wfbmnmqb32cdywd"))))
8599 (build-system python-build-system)
8600 (propagated-inputs
8601 `(("python-pytz" ,python-pytz)))
8602 (native-inputs
8603 `(("python-nose" ,python-nose)))
8604 (home-page "https://github.com/kurtraschke/pyRFC3339")
8605 (synopsis "Python timestamp library")
8606 (description "Python library for generating and parsing RFC 3339-compliant
8607 timestamps.")
8608 (license license:expat)))
8609
8610 (define-public python2-pyrfc3339
8611 (package-with-python2 python-pyrfc3339))
8612
8613 (define-public python-werkzeug
8614 (package
8615 (name "python-werkzeug")
8616 (version "0.11.15")
8617 (source
8618 (origin
8619 (method url-fetch)
8620 (uri (pypi-uri "Werkzeug" version))
8621 (sha256
8622 (base32
8623 "1h5wycw8yj7q0grqsjnsqflmrlsdagvl2j4dsgdncci6mjc7fpa5"))))
8624 (build-system python-build-system)
8625 (native-inputs
8626 `(("python-pytest" ,python-pytest)))
8627 (home-page "http://werkzeug.pocoo.org/")
8628 (synopsis "Utilities for WSGI applications")
8629 (description "One of the most advanced WSGI utility modules. It includes a
8630 powerful debugger, full-featured request and response objects, HTTP utilities to
8631 handle entity tags, cache control headers, HTTP dates, cookie handling, file
8632 uploads, a powerful URL routing system and a bunch of community-contributed
8633 addon modules.")
8634 (license license:x11)))
8635
8636 (define-public python2-werkzeug
8637 (package-with-python2 python-werkzeug))
8638
8639 (define-public python-configobj
8640 (package
8641 (name "python-configobj")
8642 (version "5.0.6")
8643 (source (origin
8644 (method url-fetch)
8645 (uri (string-append
8646 "https://pypi.python.org/packages/source/c/configobj/"
8647 "configobj-" version ".tar.gz"))
8648 (sha256
8649 (base32
8650 "00h9rcmws03xvdlfni11yb60bz3kxfvsj6dg6nrpzj71f03nbxd2"))
8651 ;; Patch setup.py so it looks for python-setuptools, which is
8652 ;; required to parse the keyword 'install_requires' in setup.py.
8653 (patches (search-patches "python-configobj-setuptools.patch"))))
8654 (build-system python-build-system)
8655 (propagated-inputs
8656 `(("python-six" ,python-six)))
8657 (synopsis "Config file reading, writing and validation")
8658 (description "ConfigObj is a simple but powerful config file reader and
8659 writer: an ini file round tripper. Its main feature is that it is very easy to
8660 use, with a straightforward programmer’s interface and a simple syntax for
8661 config files.")
8662 (home-page "https://github.com/DiffSK/configobj")
8663 (license license:bsd-3)))
8664
8665 (define-public python2-configobj
8666 (package-with-python2 python-configobj))
8667
8668 (define-public python-configargparse
8669 (package
8670 (name "python-configargparse")
8671 (version "0.10.0")
8672 (source (origin
8673 (method url-fetch)
8674 (uri (string-append
8675 "https://pypi.python.org/packages/source/C/ConfigArgParse/"
8676 "ConfigArgParse-" version ".tar.gz"))
8677 (sha256
8678 (base32
8679 "19wh919gbdbzxzpagg52q3lm62yicm95ddlcx77dyjc1slyshl1v"))))
8680 (build-system python-build-system)
8681 (arguments
8682 ;; FIXME: Bug in test suite filed upstream:
8683 ;; https://github.com/bw2/ConfigArgParse/issues/32
8684 '(#:tests? #f))
8685 (synopsis "Replacement for argparse")
8686 (description "A drop-in replacement for argparse that allows options to also
8687 be set via config files and/or environment variables.")
8688 (home-page "https://github.com/bw2/ConfigArgParse")
8689 (license license:expat)))
8690
8691 (define-public python2-configargparse
8692 (package-with-python2 python-configargparse))
8693
8694 (define-public python-ndg-httpsclient
8695 (package
8696 (name "python-ndg-httpsclient")
8697 (version "0.4.2")
8698 (source (origin
8699 (method url-fetch)
8700 (uri (pypi-uri "ndg_httpsclient" version))
8701 (sha256
8702 (base32
8703 "1b5qirv46v4dpnmfqviwq42mdwfcby4dxmz0i41wad2337pqf2aq"))))
8704 (build-system python-build-system)
8705 (arguments
8706 '(;; The tests appear to require networking.
8707 #:tests? #f))
8708 (propagated-inputs
8709 `(("python-pyopenssl" ,python-pyopenssl)))
8710 (synopsis "HTTPS support for Python's httplib and urllib2")
8711 (description "This is a HTTPS client implementation for httplib and urllib2
8712 based on PyOpenSSL. PyOpenSSL provides a more fully featured SSL implementation
8713 over the default provided with Python and importantly enables full verification
8714 of the SSL peer.")
8715 (home-page "https://github.com/cedadev/ndg_httpsclient/")
8716 (license license:bsd-3)))
8717
8718 ;; python2-openssl requires special care, so package-with-python2 is
8719 ;; insufficient.
8720 (define-public python2-ndg-httpsclient
8721 (package (inherit python-ndg-httpsclient)
8722 (name "python2-ndg-httpsclient")
8723 (arguments `(#:python ,python-2))
8724 (propagated-inputs
8725 `(("python2-pyopenssl" ,python2-pyopenssl)))))
8726
8727 (define-public python-contextlib2
8728 (package
8729 (name "python-contextlib2")
8730 (version "0.4.0")
8731 (source
8732 (origin
8733 (method url-fetch)
8734 (uri (pypi-uri "contextlib2" version))
8735 (sha256
8736 (base32
8737 "0cmp131dlh0d0zvw0aza1zd13glvngzk8lb4avks0hm7yxwdr9am"))))
8738 (build-system python-build-system)
8739 (arguments
8740 `(#:phases
8741 (modify-phases %standard-phases
8742 (replace 'check
8743 (lambda _ (zero?
8744 (system*
8745 "python" "test_contextlib2.py" "-v")))))))
8746 (home-page "http://contextlib2.readthedocs.org/")
8747 (synopsis "Tools for decorators and context managers")
8748 (description "This module is primarily a backport of the Python
8749 3.2 contextlib to earlier Python versions. Like contextlib, it
8750 provides utilities for common tasks involving decorators and context
8751 managers. It also contains additional features that are not part of
8752 the standard library.")
8753 (license license:psfl)))
8754
8755 (define-public python2-contextlib2
8756 (package-with-python2 python-contextlib2))
8757
8758 (define-public python-texttable
8759 (package
8760 (name "python-texttable")
8761 (version "0.8.7")
8762 (source
8763 (origin
8764 (method url-fetch)
8765 (uri (pypi-uri "texttable" version))
8766 (sha256
8767 (base32
8768 "1liiiydgkg37i46a418aw19fyf6z3ds51wdwwpyjbs12x0phhf4a"))))
8769 (build-system python-build-system)
8770 (arguments '(#:tests? #f)) ; no tests
8771 (home-page "https://github.com/foutaise/texttable/")
8772 (synopsis "Python module for creating simple ASCII tables")
8773 (description "Texttable is a Python module for creating simple ASCII
8774 tables.")
8775 (license license:lgpl2.1+)))
8776
8777 (define-public python2-texttable
8778 (package-with-python2 python-texttable))
8779
8780 (define-public python-websocket-client
8781 (package
8782 (name "python-websocket-client")
8783 (version "0.37.0")
8784 (source
8785 (origin
8786 (method url-fetch)
8787 (uri (pypi-uri "websocket_client" version))
8788 (sha256
8789 (base32
8790 "0h9glp1jll3z76ly3kg08aqgxqk0a68p4zi9yn50353bh5nj92v7"))))
8791 (build-system python-build-system)
8792 (propagated-inputs
8793 `(("python-six" ,python-six)))
8794 (home-page "https://github.com/liris/websocket-client")
8795 (synopsis "WebSocket client for Python")
8796 (description "The Websocket-client module provides the low level APIs for
8797 WebSocket usage in Python programs.")
8798 (license license:lgpl2.1+)))
8799
8800 (define-public python2-websocket-client
8801 (package-with-python2 python-websocket-client))
8802
8803 (define-public python-atomicwrites
8804 (package
8805 (name "python-atomicwrites")
8806 (version "1.1.5")
8807 (source (origin
8808 (method url-fetch)
8809 (uri (pypi-uri "atomicwrites" version))
8810 (sha256
8811 (base32
8812 "11bm90fwm2avvf4f3ib8g925w7jr4m11vcsinn1bi6ns4bm32214"))))
8813 (build-system python-build-system)
8814 (synopsis "Atomic file writes in Python")
8815 (description "Library for atomic file writes using platform dependent tools
8816 for atomic file system operations.")
8817 (home-page "https://github.com/untitaker/python-atomicwrites")
8818 (license license:expat)))
8819
8820 (define-public python2-atomicwrites
8821 (package-with-python2 python-atomicwrites))
8822
8823 (define-public python-requests-toolbelt
8824 (package
8825 (name "python-requests-toolbelt")
8826 (version "0.6.2")
8827 (source (origin
8828 (method url-fetch)
8829 (uri (string-append
8830 "https://pypi.python.org/packages/"
8831 "e1/a4/a94c037bc72ad70441aff1403d3243510d2542ddca7759faaeffeb11aefe/"
8832 "requests-toolbelt-" version ".tar.gz"))
8833 (sha256
8834 (base32
8835 "15q9nrgp85nqlr4kdz1zvj8z2npafi2sr12y7fqgxbkq28j1aci6"))))
8836 (build-system python-build-system)
8837 (native-inputs
8838 `(("python-betamax" ,python-betamax)
8839 ("python-mock" ,python-mock)
8840 ("python-pytest" ,python-pytest)))
8841 (propagated-inputs
8842 `(("python-requests" ,python-requests)))
8843 (synopsis "Extensions to python-requests")
8844 (description "This is a toolbelt of useful classes and functions to be used
8845 with python-requests.")
8846 (home-page "https://github.com/sigmavirus24/requests-toolbelt")
8847 (license license:asl2.0)))
8848
8849 (define-public python-click-threading
8850 (package
8851 (name "python-click-threading")
8852 (version "0.2.0")
8853 (source (origin
8854 (method url-fetch)
8855 (uri (string-append
8856 "https://pypi.python.org/packages/"
8857 "fe/b7/e7f609d18a2a351cb71616adcf54df1acd82f83cb9b5936935a4d20e2c23/"
8858 "click-threading-" version ".tar.gz"))
8859 (sha256
8860 (base32
8861 "18bcqikxwb3drb8rf60cclxkxw52521b38ax3byah6j8cn8y9p4j"))))
8862 (build-system python-build-system)
8863 (propagated-inputs
8864 `(("python-click" ,python-click)))
8865 (synopsis "Utilities for multithreading in Click")
8866 (description "This package provides utilities for multithreading in Click
8867 applications.")
8868 (home-page "https://github.com/click-contrib/click-threading")
8869 (license license:expat)))
8870
8871 (define-public python-click-log
8872 (package
8873 (name "python-click-log")
8874 (version "0.1.8")
8875 (source (origin
8876 (method url-fetch)
8877 (uri (pypi-uri "click-log" version))
8878 (sha256
8879 (base32
8880 "14ikfjfgnzf21mjniq9lfk2igzykgzfvwwrk85nw2b9fq44109sp"))))
8881 (build-system python-build-system)
8882 (propagated-inputs
8883 `(("python-click" ,python-click)))
8884 (synopsis "Logging for click applications")
8885 (description "This package provides a Python library for logging Click
8886 applications.")
8887 (home-page "https://github.com/click-contrib/click-log")
8888 (license license:expat)))
8889
8890 (define-public python-apipkg
8891 (package
8892 (name "python-apipkg")
8893 (version "1.4")
8894 (source (origin
8895 (method url-fetch)
8896 (uri (pypi-uri "apipkg" version))
8897 (sha256
8898 (base32
8899 "1iks5701qnp3dlr3q1d9qm68y2plp2m029irhpz92a44psfkjf1f"))))
8900 (build-system python-build-system)
8901 (native-inputs
8902 `(("python-pytest" ,python-pytest)))
8903 (synopsis "Namespace control and lazy-import mechanism")
8904 (description "With apipkg you can control the exported namespace of a Python
8905 package and greatly reduce the number of imports for your users. It is a small
8906 pure Python module that works on virtually all Python versions.")
8907 (home-page "https://bitbucket.org/hpk42/apipkg")
8908 (license license:expat)))
8909
8910 (define-public python2-apipkg
8911 (package-with-python2 python-apipkg))
8912
8913 (define-public python-execnet
8914 (package
8915 (name "python-execnet")
8916 (version "1.4.1")
8917 (source (origin
8918 (method url-fetch)
8919 (uri (pypi-uri "execnet" version))
8920 (sha256
8921 (base32
8922 "1rpk1vyclhg911p3hql0m0nrpq7q7mysxnaaw6vs29cpa6kx8vgn"))))
8923 (build-system python-build-system)
8924 (arguments
8925 `(;; 2 failed, 275 passed, 670 skipped, 4 xfailed
8926 ;; The two test failures are caused by the lack of an `ssh` executable.
8927 ;; The test suite can be run with pytest after the 'install' phase.
8928 #:tests? #f))
8929 (native-inputs
8930 `(("python-pytest" ,python-pytest)
8931 ("python-setuptools-scm" ,python-setuptools-scm)))
8932 (propagated-inputs
8933 `(("python-apipkg" ,python-apipkg)))
8934 (synopsis "Rapid multi-Python deployment")
8935 (description "Execnet provides a share-nothing model with
8936 channel-send/receive communication for distributing execution across many
8937 Python interpreters across version, platform and network barriers. It has a
8938 minimal and fast API targeting the following uses:
8939 @enumerate
8940 @item distribute tasks to (many) local or remote CPUs
8941 @item write and deploy hybrid multi-process applications
8942 @item write scripts to administer multiple environments
8943 @end enumerate")
8944 (home-page "http://codespeak.net/execnet/")
8945 (license license:expat)))
8946
8947 (define-public python2-execnet
8948 (package-with-python2 python-execnet))
8949
8950 (define-public python-trollius-redis
8951 (package
8952 (name "python-trollius-redis")
8953 (version "0.1.4")
8954 (source
8955 (origin
8956 (method url-fetch)
8957 (uri (pypi-uri "trollius_redis" version))
8958 (sha256
8959 (base32
8960 "0k3vypszmgmaipgw9xscvgm79h2zd6p6ci8gdp5sxl6g5kbqr9fy"))))
8961 (build-system python-build-system)
8962 ;; TODO: Tests require packaging 'hiredis'.
8963 (arguments '(#:tests? #f))
8964 (home-page "https://github.com/benjolitz/trollius-redis")
8965 (synopsis "Port of asyncio-redis to trollius")
8966 (description "@code{trollius-redis} is a Redis client for Python
8967 trollius. It is an asynchronious IO (PEP 3156) implementation of the
8968 Redis protocol.")
8969 (license license:bsd-2)))
8970
8971 (define-public python2-trollius-redis
8972 (package-with-python2 python-trollius-redis))
8973
8974 ;;; The software provided by this package was integrated into pytest 2.8.
8975 (define-public python-pytest-cache
8976 (package
8977 (name "python-pytest-cache")
8978 (version "1.0")
8979 (source (origin
8980 (method url-fetch)
8981 (uri (pypi-uri "pytest-cache" version))
8982 (sha256
8983 (base32
8984 "1a873fihw4rhshc722j4h6j7g3nj7xpgsna9hhg3zn6ksknnhx5y"))))
8985 (build-system python-build-system)
8986 (propagated-inputs
8987 `(("python-apipkg" ,python-apipkg)
8988 ("python-execnet" ,python-execnet)
8989 ("python-py" ,python-py)
8990 ("python-pytest" ,python-pytest)))
8991 (synopsis "Py.test plugin with mechanisms for caching across test runs")
8992 (description "The pytest-cache plugin provides tools to rerun failures from
8993 the last py.test invocation.")
8994 (home-page "https://bitbucket.org/hpk42/pytest-cache/")
8995 (license license:expat)))
8996
8997 (define-public python2-pytest-cache
8998 (package-with-python2 python-pytest-cache))
8999
9000 (define-public python-pytest-localserver
9001 (package
9002 (name "python-pytest-localserver")
9003 (version "0.3.5")
9004 (source (origin
9005 (method url-fetch)
9006 (uri (pypi-uri "pytest-localserver" version))
9007 (sha256
9008 (base32
9009 "0dvqspjr6va55zwmnnc2mmpqc7mm65kxig9ya44x1z8aadzxpa4p"))))
9010 (build-system python-build-system)
9011 (arguments
9012 `(#:phases (modify-phases %standard-phases
9013 (replace 'check
9014 (lambda _
9015 (zero? (system* "py.test" "--genscript=runtests.py"))
9016 (zero? (system* "py.test")))))))
9017 (native-inputs
9018 `(("python-pytest" ,python-pytest)
9019 ("python-requests" ,python-requests)
9020 ("python-six" ,python-six)))
9021 (propagated-inputs
9022 `(("python-werkzeug" ,python-werkzeug)))
9023 (synopsis "Py.test plugin to test server connections locally")
9024 (description "Pytest-localserver is a plugin for the pytest testing
9025 framework which enables you to test server connections locally.")
9026 (home-page "https://pypi.python.org/pypi/pytest-localserver")
9027 (license license:expat)))
9028
9029 (define-public python-wsgi-intercept
9030 (package
9031 (name "python-wsgi-intercept")
9032 (version "1.2.2")
9033 (source (origin
9034 (method url-fetch)
9035 (uri (string-append
9036 "https://pypi.python.org/packages/"
9037 "38/76/ebcbc24d0cb77db34520a3ca6ed1bd43ace17d182bbd8dd7d976f1c176fb/"
9038 "wsgi_intercept-" version ".tar.gz"))
9039 (sha256
9040 (base32
9041 "0kjj2v2dvmnpdd5h5gk9rzz0f54rhjb0yiz3zg65bmp65slfw65d"))))
9042 (build-system python-build-system)
9043 (propagated-inputs
9044 `(("python-six" ,python-six)))
9045 (native-inputs
9046 `(("python-pytest" ,python-pytest)
9047 ("python-httplib2" ,python-httplib2)
9048 ("python-requests" ,python-requests)
9049 ("python-urllib3" ,python-urllib3)))
9050 (synopsis "Puts a WSGI application in place of a real URI for testing")
9051 (description "Wsgi_intercept installs a WSGI application in place of a real
9052 URI for testing. Testing a WSGI application normally involves starting a
9053 server at a local host and port, then pointing your test code to that address.
9054 Instead, this library lets you intercept calls to any specific host/port
9055 combination and redirect them into a WSGI application importable by your test
9056 program. Thus, you can avoid spawning multiple processes or threads to test
9057 your Web app.")
9058 (home-page "https://github.com/cdent/wsgi-intercept")
9059 (license license:expat)))
9060
9061 (define-public python-pytest-xprocess
9062 (package
9063 (name "python-pytest-xprocess")
9064 (version "0.9.1")
9065 (source (origin
9066 (method url-fetch)
9067 (uri (pypi-uri "pytest-xprocess" version))
9068 (sha256
9069 (base32
9070 "17zlql1xqw3ywcgwwbqmw633aly99lab12hm02asr8awvg5603pp"))))
9071 (build-system python-build-system)
9072 (propagated-inputs
9073 `(("python-pytest" ,python-pytest)
9074 ("python-pytest-cache" ,python-pytest-cache)
9075 ("python-psutil" ,python-psutil)))
9076 (synopsis "Pytest plugin to manage external processes across test runs")
9077 (description "Pytest-xprocess is an experimental py.test plugin for managing
9078 processes across test runs.")
9079 (home-page "https://bitbucket.org/pytest-dev/pytest-xprocess")
9080 (license license:expat)))
9081
9082 (define-public python-icalendar
9083 (package
9084 (name "python-icalendar")
9085 (version "3.11.5")
9086 (source (origin
9087 (method url-fetch)
9088 (uri (pypi-uri "icalendar" version))
9089 (sha256
9090 (base32
9091 "0y6f2js983ag0d138xx4pzyc71gf44hyqmjsdvw6pq2xrkpj8jzk"))))
9092 (build-system python-build-system)
9093 (propagated-inputs
9094 `(("python-dateutil" ,python-dateutil)
9095 ("python-pytz" ,python-pytz)))
9096 (synopsis "Python library for parsing iCalendar files")
9097 (description "The icalendar package is a parser/generator of iCalendar
9098 files for use with Python.")
9099 (home-page "https://github.com/collective/icalendar")
9100 (license license:bsd-2)))
9101
9102 (define-public python-sphinxcontrib-newsfeed
9103 (package
9104 (name "python-sphinxcontrib-newsfeed")
9105 (version "0.1.4")
9106 (source (origin
9107 (method url-fetch)
9108 (uri (pypi-uri "sphinxcontrib-newsfeed" version))
9109 (sha256
9110 (base32
9111 "1d7gam3mn8v4in4p16yn3v10vps7nnaz6ilw99j4klij39dqd37p"))))
9112 (arguments '(#:tests? #f)) ; No tests.
9113 (build-system python-build-system)
9114 (propagated-inputs
9115 `(("python-sphinx" ,python-sphinx)))
9116 (synopsis "News Feed extension for Sphinx")
9117 (description "Sphinxcontrib-newsfeed is an extension for adding a simple
9118 Blog, News or Announcements section to a Sphinx website.")
9119 (home-page "https://bitbucket.org/prometheus/sphinxcontrib-newsfeed")
9120 (license license:bsd-2)))
9121
9122 (define-public python-args
9123 (package
9124 (name "python-args")
9125 (version "0.1.0")
9126 (source (origin
9127 (method url-fetch)
9128 (uri (pypi-uri "args" version))
9129 (sha256
9130 (base32
9131 "057qzi46h5dmxdqknsbrssn78lmqjlnm624iqdhrnpk26zcbi1d7"))))
9132 (build-system python-build-system)
9133 (home-page "https://github.com/kennethreitz/args")
9134 (synopsis "Command-line argument parser")
9135 (description
9136 "This library provides a Python module to parse command-line arguments.")
9137 (license license:bsd-3)))
9138
9139 (define-public python2-args
9140 (package-with-python2 python-args))
9141
9142 (define-public python-clint
9143 (package
9144 (name "python-clint")
9145 (version "0.5.1")
9146 (source (origin
9147 (method url-fetch)
9148 (uri (pypi-uri "clint" version))
9149 (sha256
9150 (base32
9151 "1an5lkkqk1zha47198p42ji3m94xmzx1a03dn7866m87n4r4q8h5"))))
9152 (build-system python-build-system)
9153 (arguments
9154 '(#:phases
9155 (modify-phases %standard-phases
9156 (replace 'check
9157 (lambda _
9158 (zero? (system* "py.test" "-v")))))))
9159 (native-inputs
9160 `(("python-pytest" ,python-pytest)))
9161 (propagated-inputs
9162 `(("python-args" ,python-args)))
9163 (home-page "https://github.com/kennethreitz/clint")
9164 (synopsis "Command-line interface tools")
9165 (description
9166 "Clint is a Python module filled with a set of tools for developing
9167 command-line applications, including tools for colored and indented
9168 output, progress bar display, and pipes.")
9169 (license license:isc)))
9170
9171 (define-public python2-clint
9172 (package-with-python2 python-clint))
9173
9174 (define-public python-astor
9175 (package
9176 (name "python-astor")
9177 (version "0.5")
9178 (source (origin
9179 (method url-fetch)
9180 (uri (pypi-uri "astor" version))
9181 (sha256
9182 (base32
9183 "1fdafq5hkis1fxqlmhw0sn44zp2ar46nxhbc22cvwg7hsd8z5gsa"))))
9184 (build-system python-build-system)
9185 (home-page "https://github.com/berkerpeksag/astor")
9186 (synopsis "Read and write Python ASTs")
9187 (description
9188 "Astor is designed to allow easy manipulation of Python source via the
9189 Abstract Syntax Tree.")
9190 (license license:bsd-3)))
9191
9192 (define-public python2-astor
9193 (package-with-python2 python-astor))
9194
9195 (define-public python-rply
9196 (package
9197 (name "python-rply")
9198 (version "0.7.4")
9199 (source (origin
9200 (method url-fetch)
9201 (uri (pypi-uri "rply" version))
9202 (sha256
9203 (base32
9204 "12rp1d9ba7nvd5rhaxi6xzx1rm67r1k1ylsrkzhpwnphqpb06cvj"))))
9205 (build-system python-build-system)
9206 (propagated-inputs
9207 `(("python-appdirs" ,python-appdirs)))
9208 (home-page "https://github.com/alex/rply")
9209 (synopsis "Parser generator for Python")
9210 (description
9211 "This package provides a pure Python based parser generator, that also
9212 works with RPython. It is a more-or-less direct port of David Bazzley's PLY,
9213 with a new public API, and RPython support.")
9214 (license license:bsd-3)))
9215
9216 (define-public python2-rply
9217 (package-with-python2 python-rply))
9218
9219 (define-public python-hy
9220 (package
9221 (name "python-hy")
9222 (version "0.11.1")
9223 (source (origin
9224 (method url-fetch)
9225 (uri (pypi-uri "hy" version))
9226 (sha256
9227 (base32
9228 "1msqv747iz12r73mz4qvsmlwkddwjvrahlrk7ysrcz07h7dsscxs"))))
9229 (build-system python-build-system)
9230 (arguments
9231 '(#:phases
9232 (modify-phases %standard-phases
9233 (replace 'check
9234 (lambda _
9235 ;; Tests require write access to HOME.
9236 (setenv "HOME" "/tmp")
9237 (zero? (system* "nosetests")))))))
9238 (native-inputs
9239 `(("python-coverage" ,python-coverage)
9240 ("python-nose" ,python-nose)))
9241 (propagated-inputs
9242 `(("python-astor" ,python-astor)
9243 ("python-clint" ,python-clint)
9244 ("python-rply" ,python-rply)))
9245 (home-page "http://hylang.org/")
9246 (synopsis "Lisp frontend to Python")
9247 (description
9248 "Hy is a dialect of Lisp that's embedded in Python. Since Hy transforms
9249 its Lisp code into the Python Abstract Syntax Tree, you have the whole world of
9250 Python at your fingertips, in Lisp form.")
9251 (license license:expat)))
9252
9253 (define-public python2-hy
9254 (package-with-python2 python-hy))
9255
9256 (define-public python-rauth
9257 (package
9258 (name "python-rauth")
9259 (version "0.7.3")
9260 (source
9261 (origin
9262 (method url-fetch)
9263 (uri (pypi-uri "rauth" version))
9264 (sha256
9265 (base32
9266 "02kv8w8l98ky223avyq7vw7x1f2ya9chrm59r77ylq45qb0xnk2j"))))
9267 (build-system python-build-system)
9268 (arguments
9269 `(#:test-target "check"))
9270 (propagated-inputs
9271 `(("python-requests" ,python-requests)))
9272 (home-page "https://github.com/litl/rauth")
9273 (synopsis "Python library for OAuth 1.0/a, 2.0, and Ofly")
9274 (description
9275 "Rauth is a Python library for OAuth 1.0/a, 2.0, and Ofly. It also
9276 provides service wrappers for convenient connection initialization and
9277 authenticated session objects providing things like keep-alive.")
9278 (license license:expat)
9279 (properties `((python2-variant . ,(delay python2-rauth))))))
9280
9281 (define-public python2-rauth
9282 (let ((base (package-with-python2 (strip-python2-variant python-rauth))))
9283 (package
9284 (inherit base)
9285 (native-inputs `(("python2-unittest2" ,python2-unittest2)
9286 ,@(package-native-inputs base))))))
9287
9288 (define-public python2-functools32
9289 (package
9290 (name "python2-functools32")
9291 (version "3.2.3-2")
9292 (source
9293 (origin
9294 (method url-fetch)
9295 (uri (pypi-uri "functools32" version))
9296 (sha256
9297 (base32
9298 "0v8ya0b58x47wp216n1zamimv4iw57cxz3xxhzix52jkw3xks9gn"))))
9299 (build-system python-build-system)
9300 (arguments
9301 `(#:python ,python-2
9302 #:tests? #f)) ; no test target
9303 (home-page "https://github.com/MiCHiLU/python-functools32")
9304 (synopsis
9305 "Backport of the functools module from Python 3.2.3")
9306 (description
9307 "This package is a backport of the @code{functools} module from Python
9308 3.2.3 for use with older versions of Python and PyPy.")
9309 (license license:expat)))
9310
9311 (define-public python2-subprocess32
9312 (package
9313 (name "python2-subprocess32")
9314 (version "3.2.7")
9315 (source (origin
9316 (method url-fetch)
9317 (uri (pypi-uri "subprocess32" version))
9318 (sha256
9319 (base32
9320 "14350dhhlhyz5gqzi3lihn9m6lvskx5mcb20srx1kgsk9i50li8y"))
9321 (patches
9322 (search-patches "python2-subprocess32-disable-input-test.patch"))))
9323 (build-system python-build-system)
9324 (arguments
9325 `(#:python ,python-2
9326 #:phases
9327 (modify-phases %standard-phases
9328 (add-after 'unpack 'patch-/bin/sh
9329 (lambda _
9330 (substitute* '("subprocess32.py"
9331 "test_subprocess32.py")
9332 (("/bin/sh") (which "sh")))
9333 #t))
9334 (delete 'check)
9335 (add-after 'install 'check
9336 (lambda* (#:key inputs outputs #:allow-other-keys)
9337 ;; For some reason this package fails to import
9338 ;; _posixsubprocess.so when PYTHONPATH is set to the build
9339 ;; directory. Running tests after install is easier.
9340 (add-installed-pythonpath inputs outputs)
9341 (zero? (system* "python" "test_subprocess32.py")))))))
9342 (home-page "https://github.com/google/python-subprocess32")
9343 (synopsis "Backport of the subprocess module from Python 3.2")
9344 (description
9345 "This is a backport of the @code{subprocess} standard library module
9346 from Python 3.2 and 3.3 for use on Python 2. It includes bugfixes and some
9347 new features. On POSIX systems it is guaranteed to be reliable when used
9348 in threaded applications. It includes timeout support from Python 3.3 but
9349 otherwise matches 3.2’s API.")
9350 (license license:psfl)))
9351
9352 (define-public python2-futures
9353 (package
9354 (name "python2-futures")
9355 (version "3.0.5")
9356 (source
9357 (origin
9358 (method url-fetch)
9359 (uri (pypi-uri "futures" version))
9360 (sha256
9361 (base32
9362 "1pw1z4329xvlabdpwqa6b7v2fxf7hl64m4cgr22ckbym8m8m4hh5"))))
9363 (build-system python-build-system)
9364 (arguments `(#:python ,python-2))
9365 (home-page "https://github.com/agronholm/pythonfutures")
9366 (synopsis
9367 "Backport of the concurrent.futures package from Python 3.2")
9368 (description
9369 "The concurrent.futures module provides a high-level interface for
9370 asynchronously executing callables. This package backports the
9371 concurrent.futures package from Python 3.2")
9372 (license license:bsd-3)))
9373
9374 (define-public python-promise
9375 (package
9376 (name "python-promise")
9377 (version "0.4.2")
9378 (source
9379 (origin
9380 (method url-fetch)
9381 (uri (pypi-uri "promise" version))
9382 (sha256
9383 (base32
9384 "1k19ms8l3d5jzjh557rgkxb5sg4mqgfc315rn4hx1z3n8qq6lr3h"))))
9385 (build-system python-build-system)
9386 ;; Tests wants python-futures, which is a python2 only program, and
9387 ;; can't be found by python-promise at test time.
9388 (arguments `(#:tests? #f))
9389 (home-page "https://github.com/syrusakbary/promise")
9390 (synopsis "Promises/A+ implementation for Python")
9391 (description
9392 "Promises/A+ implementation for Python")
9393 (properties `((python2-variant . ,(delay python2-promise))))
9394 (license license:expat)))
9395
9396 (define-public python2-promise
9397 (let ((promise (package-with-python2
9398 (strip-python2-variant python-promise))))
9399 (package (inherit promise)
9400 (arguments (substitute-keyword-arguments (package-arguments promise)
9401 ((#:tests? _) #t)))
9402 (native-inputs
9403 `(("python2-futures" ,python2-futures)
9404 ("python2-pytest" ,python2-pytest)
9405 ,@(package-native-inputs promise))))))
9406
9407 (define-public python-urllib3
9408 (package
9409 (name "python-urllib3")
9410 (version "1.18.1")
9411 (source
9412 (origin
9413 (method url-fetch)
9414 (uri (pypi-uri "urllib3" version))
9415 (sha256
9416 (base32
9417 "1wb8aqnq53vzh2amrv8kc66f3h6fx217y0q62y6n30a64p2yqmam"))))
9418 (build-system python-build-system)
9419 (arguments `(#:tests? #f))
9420 (native-inputs
9421 `(;; some packages for tests
9422 ("python-nose" ,python-nose)
9423 ("python-mock" ,python-mock)
9424 ("python-tornado" ,python-tornado)))
9425 (propagated-inputs
9426 `(;; extra packages for https security
9427 ("python-certifi" ,python-certifi)
9428 ("python-ndg-httpsclient" ,python-ndg-httpsclient)
9429 ("python-pyasn1" ,python-pyasn1)
9430 ("python-pyopenssl" ,python-pyopenssl)))
9431 (home-page "https://urllib3.readthedocs.org/")
9432 (synopsis "HTTP library with thread-safe connection pooling")
9433 (description
9434 "Urllib3 supports features left out of urllib and urllib2 libraries. It
9435 can reuse the same socket connection for multiple requests, it can POST files,
9436 supports url redirection and retries, and also gzip and deflate decoding.")
9437 (license license:expat)))
9438
9439 (define-public python2-urllib3
9440 (package-with-python2 python-urllib3))
9441
9442 (define-public python-colorama
9443 (package
9444 (name "python-colorama")
9445 (version "0.3.7")
9446 (source
9447 (origin
9448 (method url-fetch)
9449 (uri (pypi-uri "colorama" version))
9450 (sha256
9451 (base32
9452 "0avqkn6362v7k2kg3afb35g4sfdvixjgy890clip4q174p9whhz0"))))
9453 (build-system python-build-system)
9454 (synopsis "Colored terminal text rendering for Python")
9455 (description "Colorama is a Python library for rendering colored terminal
9456 text.")
9457 (home-page "https://pypi.python.org/pypi/colorama")
9458 (license license:bsd-3)))
9459
9460 (define-public python2-colorama
9461 (package-with-python2 python-colorama))
9462
9463 (define-public python-rsa
9464 (package
9465 (name "python-rsa")
9466 (version "3.4.2")
9467 (source
9468 (origin
9469 (method url-fetch)
9470 (uri (pypi-uri "rsa" version))
9471 (sha256
9472 (base32
9473 "1dcxvszbikgzh99ybdc7jq0zb9wspy2ds8z9mjsqiyv3q884xpr5"))))
9474 (build-system python-build-system)
9475 (propagated-inputs
9476 `(("python-pyasn1" ,python-pyasn1)))
9477 (synopsis "Pure-Python RSA implementation")
9478 (description "Python-RSA is a pure-Python RSA implementation. It supports
9479 encryption and decryption, signing and verifying signatures, and key
9480 generation according to PKCS#1 version 1.5. It can be used as a Python
9481 library as well as on the command line.")
9482 (home-page "http://stuvel.eu/rsa")
9483 (license license:asl2.0)))
9484
9485 (define-public python2-rsa
9486 (package-with-python2 python-rsa))
9487
9488 (define-public python-pluggy
9489 (package
9490 (name "python-pluggy")
9491 (version "0.3.1")
9492 (source
9493 (origin
9494 (method url-fetch)
9495 (uri (pypi-uri "pluggy" version))
9496 (sha256
9497 (base32
9498 "18qfzfm40bgx672lkg8q9x5hdh76n7vax99aank7vh2nw21wg70m"))))
9499 (build-system python-build-system)
9500 (synopsis "Plugin and hook calling mechanism for Python")
9501 (description "Pluggy is an extraction of the plugin manager as used by
9502 Pytest but stripped of Pytest specific details.")
9503 (home-page "https://pypi.python.org/pypi/pluggy")
9504 (license license:expat)))
9505
9506 (define-public python2-pluggy
9507 (package-with-python2 python-pluggy))
9508
9509 (define-public python-tox
9510 (package
9511 (name "python-tox")
9512 (version "2.3.1")
9513 (source
9514 (origin
9515 (method url-fetch)
9516 (uri (pypi-uri "tox" version))
9517 (sha256
9518 (base32
9519 "1vj73ar4rimq3fwy5r2z3jv4g9qbh8rmpmncsc00g0k310acqzxz"))))
9520 (build-system python-build-system)
9521 (arguments
9522 ;; FIXME: Tests require pytest-timeout, which itself requires
9523 ;; pytest>=2.8.0 for installation.
9524 '(#:tests? #f))
9525 (propagated-inputs
9526 `(("python-pluggy" ,python-pluggy) ; >=0.3.0,<0.4.0
9527 ("python-py" ,python-py)
9528 ("python-virtualenv" ,python-virtualenv)))
9529 (native-inputs
9530 `(; FIXME: Missing: ("python-pytest-timeout" ,python-pytest-timeout)
9531 ("python-pytest" ,python-pytest))) ; >= 2.3.5
9532 (home-page "http://tox.testrun.org/")
9533 (synopsis "Virtualenv-based automation of test activities")
9534 (description "Tox is a generic virtualenv management and test command line
9535 tool. It can be used to check that a package installs correctly with
9536 different Python versions and interpreters, or run tests in each type of
9537 supported environment, or act as a frontend to continuous integration
9538 servers.")
9539 (license license:expat)))
9540
9541 (define-public python2-tox
9542 (package-with-python2 python-tox))
9543
9544 (define-public python-jmespath
9545 (package
9546 (name "python-jmespath")
9547 (version "0.9.0")
9548 (source
9549 (origin
9550 (method url-fetch)
9551 (uri (pypi-uri "jmespath" version))
9552 (sha256
9553 (base32
9554 "0g9xvl69y7nr3w7ag4fsp6sm4fqf6vrqjw7504x2hzrrsh3ampq8"))))
9555 (build-system python-build-system)
9556 (native-inputs
9557 `(("python-nose" ,python-nose)))
9558 (synopsis "JSON Matching Expressions")
9559 (description "JMESPath (pronounced “james path”) is a Python library that
9560 allows one to declaratively specify how to extract elements from a JSON
9561 document.")
9562 (home-page "https://github.com/jmespath/jmespath.py")
9563 (license license:expat)))
9564
9565 (define-public python2-jmespath
9566 (package-with-python2 python-jmespath))
9567
9568 (define-public python-botocore
9569 (package
9570 (name "python-botocore")
9571 (version "1.5.26")
9572 (source
9573 (origin
9574 (method url-fetch)
9575 (uri (pypi-uri "botocore" version))
9576 (sha256
9577 (base32
9578 "1b7l48hr88galrrc5q6k21z3sdadzxc87ppzs7k9fz4p1w8bfnvb"))))
9579 (build-system python-build-system)
9580 (arguments
9581 ;; FIXME: Many tests are failing.
9582 '(#:tests? #f))
9583 (propagated-inputs
9584 `(("python-dateutil" ,python-dateutil)
9585 ("python-docutils" ,python-docutils)
9586 ("python-jmespath" ,python-jmespath)))
9587 (native-inputs
9588 `(("python-mock" ,python-mock)
9589 ("python-nose" ,python-nose)
9590 ("behave" ,behave)
9591 ("python-tox" ,python-tox)
9592 ("python-wheel" ,python-wheel)))
9593 (home-page "https://github.com/boto/botocore")
9594 (synopsis "Low-level interface to AWS")
9595 (description "Botocore is a Python library that provides a low-level
9596 interface to the Amazon Web Services (AWS) API.")
9597 (license license:asl2.0)))
9598
9599 (define-public python2-botocore
9600 (package-with-python2 python-botocore))
9601
9602 (define-public awscli
9603 (package
9604 (name "awscli")
9605 (version "1.11.63")
9606 (source
9607 (origin
9608 (method url-fetch)
9609 (uri (pypi-uri name version))
9610 (sha256
9611 (base32
9612 "1r8aqv8w27k76lcsfk83w6qw9lz8gk2ibzwacp5wjhpp2gik911m"))))
9613 (build-system python-build-system)
9614 (propagated-inputs
9615 `(("python-colorama" ,python-colorama)
9616 ("python-botocore" ,python-botocore)
9617 ("python-s3transfer" ,python-s3transfer)
9618 ("python-docutils" ,python-docutils)
9619 ("python-pyyaml" ,python-pyyaml)
9620 ("python-rsa" ,python-rsa)))
9621 (arguments
9622 ;; FIXME: The 'pypi' release does not contain tests.
9623 '(#:tests? #f))
9624 (home-page "https://aws.amazon.com/cli/")
9625 (synopsis "Command line client for AWS")
9626 (description "AWS CLI provides a unified command line interface to the
9627 Amazon Web Services (AWS) API.")
9628 (license license:asl2.0)))
9629
9630 (define-public python-hypothesis
9631 (package
9632 (name "python-hypothesis")
9633 (version "3.1.0")
9634 (source (origin
9635 (method url-fetch)
9636 (uri (pypi-uri "hypothesis" version))
9637 (sha256
9638 (base32
9639 "0qyqq9akm4vshhn8cngjc1qykcvsn7cz6dlm6njfsgpbraqrmbbw"))))
9640 (build-system python-build-system)
9641 (native-inputs
9642 `(("python-flake8" ,python-flake8)
9643 ("python-pytest" ,python-pytest)))
9644 (synopsis "Library for property based testing")
9645 (description "Hypothesis is a library for testing your Python code against a
9646 much larger range of examples than you would ever want to write by hand. It’s
9647 based on the Haskell library, Quickcheck, and is designed to integrate
9648 seamlessly into your existing Python unit testing work flow.")
9649 (home-page "https://github.com/DRMacIver/hypothesis")
9650 (license license:mpl2.0)
9651 (properties `((python2-variant . ,(delay python2-hypothesis))))))
9652
9653 (define-public python2-hypothesis
9654 (let ((hypothesis (package-with-python2
9655 (strip-python2-variant python-hypothesis))))
9656 (package (inherit hypothesis)
9657 (native-inputs
9658 `(("python2-enum34" ,python2-enum34)
9659 ,@(package-native-inputs hypothesis))))))
9660
9661 (define-public python-pytest-subtesthack
9662 (package
9663 (name "python-pytest-subtesthack")
9664 (version "0.1.1")
9665 (source (origin
9666 (method url-fetch)
9667 (uri (pypi-uri "pytest-subtesthack" version))
9668 (sha256
9669 (base32
9670 "15kzcr5pchf3id4ikdvlv752rc0j4d912n589l4rifp8qsj19l1x"))))
9671 (build-system python-build-system)
9672 (propagated-inputs
9673 `(("python-pytest" ,python-pytest)))
9674 (synopsis "Set-up and tear-down fixtures for unit tests")
9675 (description "This plugin allows you to set up and tear down fixtures within
9676 unit test functions that use @code{py.test}. This is useful for using
9677 @command{hypothesis} inside py.test, as @command{hypothesis} will call the test
9678 function multiple times, without setting up or tearing down fixture state as is
9679 normally the case.")
9680 (home-page "https://github.com/untitaker/pytest-subtesthack/")
9681 (license license:unlicense)))
9682
9683 (define-public python2-pytest-subtesthack
9684 (package-with-python2 python-pytest-subtesthack))
9685
9686 (define-public python-xdo
9687 (package
9688 (name "python-xdo")
9689 (version "0.3")
9690 (source (origin
9691 (method url-fetch)
9692 (uri (string-append
9693 "http://http.debian.net/debian/pool/main/p/python-xdo/"
9694 "python-xdo_" version ".orig.tar.gz"))
9695 (sha256
9696 (base32
9697 "1vqh1n5yy5dhnq312kwrl90fnck4v26is3lq3lxdvcn60vv19da0"))))
9698 (build-system python-build-system)
9699 (arguments
9700 '(#:phases
9701 (modify-phases %standard-phases
9702 (add-before 'install 'patch-libxdo-path
9703 ;; Hardcode the path of dynamically loaded libxdo library.
9704 (lambda* (#:key inputs #:allow-other-keys)
9705 (let ((libxdo (string-append
9706 (assoc-ref inputs "xdotool")
9707 "/lib/libxdo.so")))
9708 (substitute* "xdo/_xdo.py"
9709 (("find_library\\(\"xdo\"\\)")
9710 (simple-format #f "\"~a\"" libxdo)))
9711 #t))))
9712 #:tests? #f)) ; no tests provided
9713 (propagated-inputs
9714 `(("python-six" ,python-six)))
9715 (inputs
9716 `(("xdotool" ,xdotool)
9717 ("libX11" ,libx11)))
9718 (home-page "https://tracker.debian.org/pkg/python-xdo")
9719 (synopsis "Python library for simulating X11 keyboard/mouse input")
9720 (description "Provides bindings to libxdo for manipulating X11 via simulated
9721 input. (Note that this is mostly a legacy library; you may wish to look at
9722 python-xdo for newer bindings.)")
9723 (license license:bsd-3)))
9724
9725 (define-public python2-xdo
9726 (package-with-python2 python-xdo))
9727
9728 (define-public python-wtforms
9729 (package
9730 (name "python-wtforms")
9731 (version "2.1")
9732 (source
9733 (origin
9734 (method url-fetch)
9735 (uri (pypi-uri "WTForms" version ".zip"))
9736 (sha256
9737 (base32
9738 "0vyl26y9cg409cfyj8rhqxazsdnd0jipgjw06civhrd53yyi1pzz"))))
9739 (build-system python-build-system)
9740 (arguments
9741 '(#:phases
9742 (modify-phases %standard-phases
9743 (add-after 'unpack 'remove-django-test
9744 ;; Don't fail the tests when the inputs for the optional tests cannot be found.
9745 (lambda _
9746 (substitute*
9747 "tests/runtests.py"
9748 (("'ext_django.tests', 'ext_sqlalchemy', 'ext_dateutil', 'locale_babel'") "")
9749 (("sys.stderr.write(\"### Disabled test '%s', dependency not found\n\" % name)") ""))
9750 #t)))))
9751 (native-inputs
9752 `(("unzip" ,unzip)))
9753 (home-page "http://wtforms.simplecodes.com/")
9754 (synopsis
9755 "Form validation and rendering library for Python web development")
9756 (description
9757 "WTForms is a flexible forms validation and rendering library
9758 for Python web development. It is very similar to the web form API
9759 available in Django, but is a standalone package.")
9760 (license license:bsd-3)))
9761
9762 (define-public python2-wtforms
9763 (package-with-python2 python-wtforms))
9764
9765 (define-public python-mako
9766 (package
9767 (name "python-mako")
9768 (version "1.0.6")
9769 (source
9770 (origin
9771 (method url-fetch)
9772 (uri (pypi-uri "Mako" version))
9773 (sha256
9774 (base32
9775 "03dyxgjknp4ffsv7vwfd28l5bbpzi0ylp20543wpg3iahyyrwma8"))))
9776 (build-system python-build-system)
9777 (propagated-inputs
9778 `(("python-markupsafe" ,python-markupsafe)))
9779 (native-inputs
9780 `(("python-mock" ,python-mock)
9781 ("python-nose" ,python-nose)
9782 ("python-pytest" ,python-pytest)))
9783 (home-page "http://www.makotemplates.org/")
9784 (synopsis "Templating language for Python")
9785 (description "Mako is a templating language for Python that compiles
9786 templates into Python modules.")
9787 (license license:expat)))
9788
9789 (define-public python2-mako
9790 (package-with-python2 python-mako))
9791
9792 (define-public python-waitress
9793 (package
9794 (name "python-waitress")
9795 (version "0.8.10")
9796 (source
9797 (origin
9798 (method url-fetch)
9799 (uri (pypi-uri "waitress" version))
9800 (sha256
9801 (base32
9802 "017n9ra6vvmq9d5sfhdzyzr1mg15x2hj2dhm4pdlw98c1ypw2h3w"))))
9803 (build-system python-build-system)
9804 (home-page "https://github.com/Pylons/waitress")
9805 (synopsis "Waitress WSGI server")
9806 (description "Waitress is meant to be a production-quality pure-Python WSGI
9807 server with very acceptable performance.")
9808 (license license:zpl2.1)))
9809
9810 (define-public python2-waitress
9811 (package-with-python2 python-waitress))
9812
9813 (define-public python-wsgiproxy2
9814 (package
9815 (name "python-wsgiproxy2")
9816 (version "0.4.2")
9817 (source
9818 (origin
9819 (method url-fetch)
9820 (uri (pypi-uri "WSGIProxy2" version ".zip"))
9821 (sha256
9822 (base32
9823 "13kf9bdxrc95y9vriaz0viry3ah11nz4rlrykcfvb8nlqpx3dcm4"))))
9824 (build-system python-build-system)
9825 (arguments
9826 '(;; Wsgiproxy2's test suite requires Restkit, which does not yet fully
9827 ;; support Python 3:
9828 ;; https://github.com/benoitc/restkit/issues/140
9829 #:tests? #f))
9830 (native-inputs
9831 `(("unzip" ,unzip)
9832 ("python-nose" ,python-nose)
9833 ("python-coverage" ,python-coverage)))
9834 (propagated-inputs
9835 `(("python-six" ,python-six)
9836 ("python-webob" ,python-webob)))
9837 (home-page
9838 "https://github.com/gawel/WSGIProxy2/")
9839 (synopsis "WSGI Proxy with various http client backends")
9840 (description "WSGI turns HTTP requests into WSGI function calls.
9841 WSGIProxy turns WSGI function calls into HTTP requests.
9842 It also includes code to sign requests and pass private data,
9843 and to spawn subprocesses to handle requests.")
9844 (license license:expat)))
9845
9846 (define-public python2-wsgiproxy2
9847 (package-with-python2 python-wsgiproxy2))
9848
9849 (define-public python-pastedeploy
9850 (package
9851 (name "python-pastedeploy")
9852 (version "1.5.2")
9853 (source
9854 (origin
9855 (method url-fetch)
9856 (uri (pypi-uri "PasteDeploy" version))
9857 (sha256
9858 (base32
9859 "1jz3m4hq8v6hyhfjz9425nd3nvn52cvbfipdcd72krjmla4qz1fm"))))
9860 (build-system python-build-system)
9861 (native-inputs
9862 `(("python-nose" ,python-nose)))
9863 (home-page "http://pythonpaste.org/deploy/")
9864 (synopsis
9865 "Load, configure, and compose WSGI applications and servers")
9866 (description
9867 "This tool provides code to load WSGI applications and servers from URIs;
9868 these URIs can refer to Python Eggs for INI-style configuration files. Paste
9869 Script provides commands to serve applications based on this configuration
9870 file.")
9871 (license license:expat)))
9872
9873 (define-public python2-pastedeploy
9874 (package-with-python2 python-pastedeploy))
9875
9876 (define-public python-paste
9877 (package
9878 (name "python-paste")
9879 (version "2.0.3")
9880 (source
9881 (origin
9882 (method url-fetch)
9883 (uri (pypi-uri "Paste" version))
9884 (sha256
9885 (base32
9886 "062jk0nlxf6lb2wwj6zc20rlvrwsnikpkh90y0dn8cjch93s6ii3"))
9887 (patches (search-patches "python-paste-remove-website-test.patch"
9888 "python-paste-remove-timing-test.patch"))))
9889 (build-system python-build-system)
9890 (native-inputs
9891 `(("python-nose" ,python-nose)))
9892 (propagated-inputs
9893 `(("python-six" ,python-six)))
9894 (home-page "http://pythonpaste.org")
9895 (synopsis
9896 "Python web development tools, focusing on WSGI")
9897 (description
9898 "Paste provides a variety of web development tools and middleware which
9899 can be nested together to build web applications. Paste's design closely
9900 follows ideas flowing from WSGI (Web Standard Gateway Interface).")
9901 (license license:expat)))
9902
9903 (define-public python2-paste
9904 (package-with-python2 python-paste))
9905
9906 (define-public python-pastescript
9907 (package
9908 (name "python-pastescript")
9909 (version "2.0.2")
9910 (source
9911 (origin
9912 (method url-fetch)
9913 (uri (pypi-uri "PasteScript" version))
9914 (sha256
9915 (base32
9916 "1h3nnhn45kf4pbcv669ik4faw04j58k8vbj1hwrc532k0nc28gy0"))))
9917 (build-system python-build-system)
9918 (native-inputs
9919 `(("python-nose" ,python-nose)))
9920 (propagated-inputs
9921 `(("python-paste" ,python-paste)
9922 ("python-pastedeploy" ,python-pastedeploy)))
9923 (home-page "http://pythonpaste.org/script/")
9924 (arguments
9925 '(;; Unfortunately, this requires the latest unittest2,
9926 ;; but that requires traceback2 which requires linecache2 which requires
9927 ;; unittest2. So we're skipping tests for now.
9928 ;; (Note: Apparently linetest2 only needs unittest2 for its tests,
9929 ;; so in theory we could get around this situation somehow.)
9930 #:tests? #f))
9931 (synopsis
9932 "Pluggable command line tool for serving web applications and more")
9933 (description
9934 "PasteScript is a plugin-friendly command line tool which provides a
9935 variety of features, from launching web applications to bootstrapping project
9936 layouts.")
9937 (license license:expat)))
9938
9939 (define-public python2-pastescript
9940 (package-with-python2 python-pastescript))
9941
9942 (define-public python-pyquery
9943 (package
9944 (name "python-pyquery")
9945 (version "1.2.17")
9946 (source
9947 (origin
9948 (method url-fetch)
9949 (uri (pypi-uri "pyquery" version))
9950 (sha256
9951 (base32
9952 "1xia20wm0vx5dk85kcwgh13bylz8qh47ffjxssd2586r60xi783a"))))
9953 (build-system python-build-system)
9954 (native-inputs
9955 `(("python-webob" ,python-webob)
9956 ("python-webtest" ,python-webtest)))
9957 (propagated-inputs
9958 `(("python-lxml" ,python-lxml)
9959 ("python-cssselect" ,python-cssselect)))
9960 (home-page "https://github.com/gawel/pyquery")
9961 (synopsis "Make jQuery-like queries on xml documents")
9962 (description "pyquery allows you to make jQuery queries on xml documents.
9963 The API is as much as possible the similar to jQuery. pyquery uses lxml for
9964 fast xml and html manipulation.")
9965 (license license:bsd-3)))
9966
9967 (define-public python2-pyquery
9968 (package-with-python2 python-pyquery))
9969
9970 (define-public python-webtest
9971 (package
9972 (name "python-webtest")
9973 (version "2.0.20")
9974 (source
9975 (origin
9976 (method url-fetch)
9977 (uri (pypi-uri "WebTest" version))
9978 (sha256
9979 (base32
9980 "0bv0qhdjakdsdgj4sk21gnpp8xp8bga4x03p6gjb83ihrsb7n4xv"))))
9981 (build-system python-build-system)
9982 (arguments
9983 `(;; Unfortunately we have to disable tests!
9984 ;; This release of WebTest is pinned to python-nose < 1.3,
9985 ;; but older versions of python-nose are plagued with the following
9986 ;; bug(s), which rears its ugly head during test execution:
9987 ;; https://github.com/nose-devs/nose/issues/759
9988 ;; https://github.com/nose-devs/nose/pull/811
9989 #:tests? #f))
9990 ;; Commented out code is no good, but in this case, once tests
9991 ;; are ready to be enabled again, we should put the following
9992 ;; in place:
9993 ;; (native-inputs
9994 ;; `(("python-nose" ,python-nose) ; technially < 1.3,
9995 ;; ; but see above comment
9996 ;; ("python-coverage" ,python-coverage)
9997 ;; ("python-mock" ,python-mock)
9998 ;; ("python-pastedeploy" ,python-pastedeploy)
9999 ;; ("python-wsgiproxy2" ,python-wsgiproxy2)
10000 ;; ("python-pyquery" ,python-pyquery)))
10001 (propagated-inputs
10002 `(("python-waitress" ,python-waitress)
10003 ("python-webob" ,python-webob)
10004 ("python-six" ,python-six)
10005 ("python-beautifulsoup4" ,python-beautifulsoup4)))
10006 (home-page "http://webtest.pythonpaste.org/")
10007 (synopsis "Helper to test WSGI applications")
10008 (description "Webtest allows you to test your Python web applications
10009 without starting an HTTP server. It supports anything that supports the
10010 minimum of WSGI.")
10011 (license license:expat)))
10012
10013 (define-public python2-webtest
10014 (package-with-python2 python-webtest))
10015
10016 (define-public python-anyjson
10017 (package
10018 (name "python-anyjson")
10019 (version "0.3.3")
10020 (source
10021 (origin
10022 (method url-fetch)
10023 (uri (pypi-uri "anyjson" version))
10024 (sha256
10025 (base32
10026 "1fjph4alvcscsl5d4b6qpv1yh31jy05jxi1l0xff7lws7j32v09p"))))
10027 (build-system python-build-system)
10028 (arguments
10029 `(;; We could possibly get tests working, but on Python 3 it's not so easy.
10030 ;; Very strangely, 2to3 is run *during setup.py install* (or bdist, or
10031 ;; whatever) so this transformation needs to be done before the tests
10032 ;; can be run. Maybe we could add a build step to transform beforehand
10033 ;; but it could be annoying/difficult.
10034 ;; We can enable tests for the Python 2 version, though, and do below.
10035 #:tests? #f))
10036 (home-page "http://bitbucket.org/runeh/anyjson/")
10037 (synopsis
10038 "Wraps best available JSON implementation in a common interface")
10039 (description
10040 "Anyjson loads whichever is the fastest JSON module installed
10041 and provides a uniform API regardless of which JSON implementation is used.")
10042 (license license:bsd-3)
10043 (properties `((python2-variant . ,(delay python2-anyjson))))))
10044
10045 (define-public python2-anyjson
10046 (let ((anyjson (package-with-python2
10047 (strip-python2-variant python-anyjson))))
10048 (package
10049 (inherit anyjson)
10050 (arguments `(;; Unlike the python 3 variant, we do run tests. See above!
10051 #:tests? #t
10052 ,@(package-arguments anyjson)))
10053 (native-inputs `(("python2-nose" ,python2-nose))))))
10054
10055 (define-public python-amqp
10056 (package
10057 (name "python-amqp")
10058 (version "1.4.9")
10059 (source
10060 (origin
10061 (method url-fetch)
10062 (uri (pypi-uri "amqp" version))
10063 (sha256
10064 (base32
10065 "06n6q0kxhjnbfz3vn8x9yz09lwmn1xi9d6wxp31h5jbks0b4vsid"))))
10066 (build-system python-build-system)
10067 (native-inputs
10068 `(("python-nose" ,python-nose)
10069 ("python-mock" ,python-mock)))
10070 (home-page "https://github.com/celery/py-amqp")
10071 (synopsis
10072 "Low-level AMQP client for Python (fork of amqplib)")
10073 (description
10074 "This is a fork of amqplib which was originally written by Barry Pederson.
10075 It is maintained by the Celery project, and used by kombu as a pure python
10076 alternative when librabbitmq is not available.")
10077 (license license:lgpl2.1+)
10078 (properties `((python2-variant . ,(delay python2-amqp))))))
10079
10080 (define-public python2-amqp
10081 (let ((amqp (package-with-python2
10082 (strip-python2-variant python-amqp))))
10083 (package
10084 (inherit amqp)
10085 (arguments `(;; Tries to run coverage tests with nose-cover3, which seems
10086 ;; unmaintained. Weirdly, does not do this on the python 3
10087 ;; version?
10088 #:tests? #f
10089 ,@(package-arguments amqp))))))
10090
10091 (define-public python-kombu
10092 (package
10093 (name "python-kombu")
10094 (version "3.0.37")
10095 (source
10096 (origin
10097 (method url-fetch)
10098 (uri (pypi-uri "kombu" version))
10099 (sha256
10100 (base32
10101 "0l16chb314gpq2v7fh94a22c30lcv6w3ylmhsa60bldlcq6a0r70"))))
10102 (build-system python-build-system)
10103 (native-inputs
10104 `(("python-mock" ,python-mock)
10105 ("python-nose" ,python-nose)))
10106 (propagated-inputs
10107 `(("python-anyjson" ,python-anyjson)
10108 ("python-amqp" ,python-amqp)
10109 ("python-redis" ,python-redis)))
10110 (home-page "http://kombu.readthedocs.org")
10111 (synopsis "Message passing library for Python")
10112 (description "The aim of Kombu is to make messaging in Python as easy as
10113 possible by providing an idiomatic high-level interface for the AMQ protocol,
10114 and also provide proven and tested solutions to common messaging problems.
10115 AMQP is the Advanced Message Queuing Protocol, an open standard protocol for
10116 message orientation, queuing, routing, reliability and security, for which the
10117 RabbitMQ messaging server is the most popular implementation.")
10118 (license license:bsd-3)
10119 (properties `((python2-variant . ,(delay python2-kombu))))))
10120
10121 (define-public python2-kombu
10122 (let ((kombu (package-with-python2
10123 (strip-python2-variant python-kombu))))
10124 (package
10125 (inherit kombu)
10126 (arguments `(;; FIXME: 'TestTransport.test_del_sync' fails on python2.
10127 ;; It works fine on the python3 variant.
10128 #:tests? #f
10129 ,@(package-arguments kombu)))
10130 (native-inputs `(("python2-unittest2" ,python2-unittest2)
10131 ,@(package-native-inputs kombu))))))
10132
10133 (define-public python-billiard
10134 (package
10135 (name "python-billiard")
10136 (version "3.3.0.23")
10137 (source
10138 (origin
10139 (method url-fetch)
10140 (uri (pypi-uri "billiard" version))
10141 (sha256
10142 (base32
10143 "02wxsc6bhqvzh8j6w758kvgqbnj14l796mvmrcms8fgfamd2lak9"))))
10144 (build-system python-build-system)
10145 (native-inputs
10146 `(("python-nose" ,python-nose)))
10147 (home-page "https://github.com/celery/billiard")
10148 (synopsis
10149 "Python multiprocessing fork with improvements and bugfixes")
10150 (description
10151 "Billiard is a fork of the Python 2.7 multiprocessing package. The
10152 multiprocessing package itself is a renamed and updated version of R Oudkerk's
10153 pyprocessing package. This standalone variant is intended to be compatible with
10154 Python 2.4 and 2.5, and will draw its fixes/improvements from python-trunk.")
10155 (license license:bsd-3)
10156 (properties `((python2-variant . ,(delay python2-billiard))))))
10157
10158 (define-public python2-billiard
10159 (let ((billiard (package-with-python2
10160 (strip-python2-variant python-billiard))))
10161 (package
10162 (inherit billiard)
10163 (native-inputs `(("python2-unittest2" ,python2-unittest2)
10164 ("python2-mock" ,python2-mock)
10165 ,@(package-native-inputs billiard))))))
10166
10167 (define-public python-celery
10168 (package
10169 (name "python-celery")
10170 (version "3.1.24")
10171 (source
10172 (origin
10173 (method url-fetch)
10174 (uri (pypi-uri "celery" version))
10175 (sha256
10176 (base32
10177 "0yh2prhdnx2dgkb67a5drj12hh2zvzx5f611p7mqqg01ydghif4r"))))
10178 (build-system python-build-system)
10179 (arguments
10180 `(#:phases
10181 (modify-phases %standard-phases
10182 ;; These tests break with Python 3.5:
10183 ;; https://github.com/celery/celery/issues/2897#issuecomment-253066295
10184 (replace 'check
10185 (lambda _
10186 (zero?
10187 (system* "nosetests" "--exclude=^test_safe_to_remove.*")))))))
10188 (native-inputs
10189 `(("python-nose" ,python-nose)))
10190 (propagated-inputs
10191 `(("python-pytz" ,python-pytz)
10192 ("python-billiard" ,python-billiard)
10193 ("python-kombu" ,python-kombu)))
10194 (home-page "http://celeryproject.org")
10195 (synopsis "Distributed Task Queue")
10196 (description "Celery is an asynchronous task queue/job queue based on
10197 distributed message passing. It is focused on real-time operation, but
10198 supports scheduling as well. The execution units, called tasks, are executed
10199 concurrently on a single or more worker servers using multiprocessing,
10200 Eventlet, or gevent. Tasks can execute asynchronously (in the background) or
10201 synchronously (wait until ready).")
10202 (license license:bsd-3)
10203 (properties `((python2-variant . ,(delay python2-celery))))))
10204
10205 (define-public python2-celery
10206 (let ((celery (package-with-python2
10207 (strip-python2-variant python-celery))))
10208 (package
10209 (inherit celery)
10210 (native-inputs `(("python2-unittest2" ,python2-unittest2)
10211 ("python2-mock" ,python2-mock)
10212 ,@(package-native-inputs celery))))))
10213
10214 (define-public python-translitcodec
10215 (package
10216 (name "python-translitcodec")
10217 (version "0.4.0")
10218 (source
10219 (origin
10220 (method url-fetch)
10221 (uri (pypi-uri "translitcodec" version))
10222 (sha256
10223 (base32
10224 "10x6pvblkzky1zhjs8nmx64nb9jdzxad4bxhq4iwv0j4z2aqjnki"))))
10225 (build-system python-build-system)
10226 (arguments
10227 `(#:tests? #f)) ; no tests provided
10228 (home-page
10229 "https://github.com/claudep/translitcodec")
10230 (synopsis
10231 "Unicode to 8-bit charset transliteration codec")
10232 (description
10233 "This package contains codecs for transliterating ISO 10646 texts into
10234 best-effort representations using smaller coded character sets (ASCII,
10235 ISO 8859, etc.).")
10236 (license license:expat)))
10237
10238 (define-public python2-translitcodec
10239 (package-with-python2 python-translitcodec))
10240
10241 (define-public python-editor
10242 (package
10243 (name "python-editor")
10244 (version "0.5")
10245 (source
10246 (origin
10247 (method url-fetch)
10248 (uri (pypi-uri "python-editor" version))
10249 (sha256
10250 (base32
10251 "1ypnpgvzpkbwsg4rdvy4sy51j28b5xq9v8pnkwxncn07vqz06p7n"))))
10252 (build-system python-build-system)
10253 (home-page
10254 "https://github.com/fmoo/python-editor")
10255 (synopsis
10256 "Programmatically open an editor, capture the result")
10257 (description
10258 "python-editor is a library that provides the editor module for
10259 programmatically interfacing with your system's $EDITOR.")
10260 (license license:asl2.0)))
10261
10262 (define-public python2-editor
10263 (package-with-python2 python-editor))
10264
10265 (define-public python-sphinxcontrib-programoutput
10266 (package
10267 (name "python-sphinxcontrib-programoutput")
10268 (version "0.10")
10269 (source (origin
10270 (method url-fetch)
10271 (uri (pypi-uri "sphinxcontrib-programoutput" version))
10272 (sha256
10273 (base32
10274 "153hhnlbx4688zj9wd64819ps5znc2jlyp5crkgzvn5hxgy99vpx"))))
10275 (build-system python-build-system)
10276 (arguments
10277 ;; FIXME: Many tests are failing and the upstream is gone.
10278 '(#:tests? #f))
10279 (propagated-inputs
10280 `(("python-sphinx" ,python-sphinx)))
10281 (synopsis "Sphinx extension to include program output")
10282 (description "A Sphinx extension to literally insert the output of arbitrary
10283 commands into documents, helping you to keep your command examples up to date.")
10284 (home-page "https://github.com/lunaryorn/sphinxcontrib-programoutput")
10285 (license license:bsd-2)))
10286
10287 (define-public python2-sphinxcontrib-programoutput
10288 (package-with-python2 python-sphinxcontrib-programoutput))
10289
10290 (define-public python-sphinx-repoze-autointerface
10291 (package
10292 (name "python-sphinx-repoze-autointerface")
10293 (version "0.8")
10294 (source (origin
10295 (method url-fetch)
10296 (uri (pypi-uri "repoze.sphinx.autointerface" version))
10297 (sha256
10298 (base32
10299 "08ycivzf7bh4a1zcyp31hbyqs1b2c9r26raa3vxjwwmbfqr3iw4f"))))
10300 (build-system python-build-system)
10301 (arguments '(#:tests? #f)) ; No tests.
10302 (propagated-inputs
10303 `(("python-sphinx" ,python-sphinx)
10304 ("python-zope-interface" ,python-zope-interface)))
10305 (synopsis "Auto-generate Sphinx API docs from Zope interfaces")
10306 (description "This package defines an extension for the Sphinx documentation
10307 system. The extension allows generation of API documentation by
10308 introspection of @code{zope.interface} instances in code.")
10309 (home-page "https://github.com/repoze/repoze.sphinx.autointerface")
10310 (license license:repoze)))
10311
10312 (define-public python2-sphinx-repoze-autointerface
10313 (package-with-python2 python-sphinx-repoze-autointerface))
10314
10315 (define-public python-psycopg2
10316 (package
10317 (name "python-psycopg2")
10318 (version "2.6.2")
10319 (source
10320 (origin
10321 (method url-fetch)
10322 (uri (pypi-uri "psycopg2" version))
10323 (sha256
10324 (base32
10325 "0p60z2gwfcal30y2w8gprflchp1kcg9qblc5rn782p4wxl90wjbh"))))
10326 (build-system python-build-system)
10327 (arguments
10328 ;; Tests would require a postgresql database "psycopg2_test"
10329 ;; and a running postgresql database management service.
10330 `(#:tests? #f)) ; TODO re-enable after providing a test-db.
10331 (inputs
10332 `(("postgresql" ,postgresql))) ; libpq
10333 (home-page "http://initd.org/psycopg/")
10334 (synopsis "Python PostgreSQL adapter")
10335 (description
10336 "psycopg2 is a thread-safe PostgreSQL adapter that implements DB-API 2.0. ")
10337 (license license:lgpl3+)))
10338
10339 (define-public python2-psycopg2
10340 (package-with-python2 python-psycopg2))
10341
10342 (define-public python-vobject
10343 (package
10344 (name "python-vobject")
10345 (version "0.9.5")
10346 (source (origin
10347 (method url-fetch)
10348 (uri (pypi-uri "vobject" version))
10349 (sha256
10350 (base32
10351 "0hqjgf3ay1m5w1c0k00g5yfpdz1zni5qnr5rh9b8fg9hjvhwlmhg"))))
10352 (build-system python-build-system)
10353 (arguments
10354 '(;; The test suite relies on some non-portable Windows interfaces.
10355 #:tests? #f))
10356 (propagated-inputs
10357 `(("python-dateutil" ,python-dateutil)
10358 ("python-pyicu" ,python-pyicu)))
10359 (synopsis "Parse and generate vCard and vCalendar files")
10360 (description "Vobject is intended to be a full featured Python package for
10361 parsing and generating vCard and vCalendar files. Currently, iCalendar files
10362 are supported and well tested. vCard 3.0 files are supported, and all data
10363 should be imported, but only a few components are understood in a sophisticated
10364 way.")
10365 (home-page "http://eventable.github.io/vobject/")
10366 (license license:asl2.0)))
10367
10368 (define-public python2-vobject
10369 (package-with-python2 python-vobject))
10370
10371 (define-public python-munkres
10372 (package
10373 (name "python-munkres")
10374 (version "1.0.8")
10375 (source (origin
10376 (method url-fetch)
10377 (uri (pypi-uri "munkres" version))
10378 (sha256
10379 (base32
10380 "0mbspx4zv8id4x6pim6ybsa1xh96qwpbqj7skbqz4c9c9nf1lpqq"))))
10381 (build-system python-build-system)
10382 (arguments
10383 '(#:tests? #f)) ; no test suite
10384 (home-page "http://software.clapper.org/munkres/")
10385 (synopsis "Implementation of the Munkres algorithm")
10386 (description "The Munkres module provides an implementation of the Munkres
10387 algorithm (also called the Hungarian algorithm or the Kuhn-Munkres algorithm),
10388 useful for solving the Assignment Problem.")
10389 (license license:bsd-3)))
10390
10391 (define-public python2-munkres
10392 (package-with-python2 python-munkres))
10393
10394 (define-public python-flask
10395 (package
10396 (name "python-flask")
10397 (version "0.11.1")
10398 (source (origin
10399 (method url-fetch)
10400 (uri (pypi-uri "Flask" version))
10401 (sha256
10402 (base32
10403 "03kbfll4sj3v5z7r31c7bhfpi11r1np076d4p1k2kg4yzcmkywdl"))))
10404 (build-system python-build-system)
10405 (propagated-inputs
10406 `(("python-itsdangerous" ,python-itsdangerous)
10407 ("python-jinja2" ,python-jinja2)
10408 ("python-click" ,python-click)
10409 ("python-werkzeug" ,python-werkzeug)))
10410 (home-page "https://github.com/mitsuhiko/flask/")
10411 (synopsis "Microframework based on Werkzeug, Jinja2 and good intentions")
10412 (description "Flask is a micro web framework based on the Werkzeug toolkit
10413 and Jinja2 template engine. It is called a micro framework because it does not
10414 presume or force a developer to use a particular tool or library.")
10415 (license license:bsd-3)))
10416
10417 (define-public python2-flask
10418 (package-with-python2 python-flask))
10419
10420 (define-public python-flask-wtf
10421 (package
10422 (name "python-flask-wtf")
10423 (version "0.13.1")
10424 (source
10425 (origin
10426 (method url-fetch)
10427 (uri (pypi-uri "Flask-WTF" version))
10428 (sha256
10429 (base32
10430 "04l5743j2dici46038sqlzvf0xzpg8rf7s9ld2x24xv7f4idg990"))))
10431 (build-system python-build-system)
10432 (arguments
10433 '(#:phases
10434 (modify-phases %standard-phases
10435 (add-before 'check 'drop-failing-test
10436 (lambda _
10437 ;; FIXME: This file tries resolving an external server, which
10438 ;; fails. Try to patch out the offending section instead of
10439 ;; deleting the whole thing.
10440 (delete-file "tests/test_recaptcha.py")
10441 #t)))))
10442 (propagated-inputs
10443 `(("python-flask-babel" ,python-flask-babel)
10444 ("python-babel" ,python-babel)
10445 ("python-wtforms" ,python-wtforms)))
10446 (native-inputs
10447 `(("python-nose" ,python-nose)))
10448 (home-page "https://github.com/lepture/flask-wtf")
10449 (synopsis "Simple integration of Flask and WTForms")
10450 (description "Flask-WTF integrates Flask and WTForms, including CSRF, file
10451 upload, and reCAPTCHA.")
10452 (license license:bsd-3)))
10453
10454 (define-public python2-flask-wtf
10455 (package-with-python2 python-flask-wtf))
10456
10457 (define-public python-flask-multistatic
10458 (package
10459 (name "python-flask-multistatic")
10460 (version "1.0")
10461 (source
10462 (origin
10463 (method url-fetch)
10464 (uri (pypi-uri "flask-multistatic" version))
10465 (sha256
10466 (base32
10467 "0p4v50rwv64wcd0zlq7rzl4waprwr4hj19s3cgf1isywa7jcisgm"))))
10468 (build-system python-build-system)
10469 (propagated-inputs
10470 `(("python-flask" ,python-flask)))
10471 (home-page "https://pagure.io/flask-multistatic")
10472 (synopsis "Flask plugin to allow overriding static files")
10473 (description "@code{flask-multistatic} is a flask plugin that adds support
10474 for overriding static files.")
10475 (license license:gpl3+)))
10476
10477 (define-public python2-flask-multistatic
10478 (package-with-python2 python-flask-multistatic))
10479
10480 (define-public python-cookies
10481 (package
10482 (name "python-cookies")
10483 (version "2.2.1")
10484 (source (origin
10485 (method url-fetch)
10486 (uri (pypi-uri "cookies" version))
10487 (sha256
10488 (base32
10489 "13pfndz8vbk4p2a44cfbjsypjarkrall71pgc97glk5fiiw9idnn"))))
10490 (build-system python-build-system)
10491 (arguments
10492 `(;; test are broken: https://gitlab.com/sashahart/cookies/issues/3
10493 #:tests? #f))
10494 (native-inputs
10495 `(("python-pytest" ,python2-pytest)))
10496 (synopsis "HTTP cookie parser and renderer")
10497 (description "A RFC 6265-compliant HTTP cookie parser and renderer in
10498 Python.")
10499 (home-page "https://gitlab.com/sashahart/cookies")
10500 (license license:expat)))
10501
10502 (define-public python2-cookies
10503 (package-with-python2 python-cookies))
10504
10505 (define-public python-responses
10506 (package
10507 (name "python-responses")
10508 (version "0.5.1")
10509 (source (origin
10510 (method url-fetch)
10511 (uri (pypi-uri "responses" version))
10512 (sha256
10513 (base32
10514 "1spcfxixyk9k7pk82jm6zqkwk031s95lh8q0mz7539jrb7269bcc"))))
10515 (build-system python-build-system)
10516 (arguments
10517 `(;; Test suite is not distributed:
10518 ;; https://github.com/getsentry/responses/issues/38
10519 #:tests? #f))
10520 (native-inputs
10521 `(("python-mock" ,python-mock)))
10522 (propagated-inputs
10523 `(("python-requests" ,python-requests)
10524 ("python-cookies" ,python-cookies)
10525 ("python-six" ,python-six)))
10526 (home-page "https://github.com/getsentry/responses")
10527 (synopsis "Utility for mocking out the `requests` Python library")
10528 (description "A utility library for mocking out the `requests` Python
10529 library.")
10530 (license license:asl2.0)))
10531
10532 (define-public python2-responses
10533 (package-with-python2 python-responses))
10534
10535 (define-public python-whoosh
10536 (package
10537 (name "python-whoosh")
10538 (version "2.7.4")
10539 (source
10540 (origin
10541 (method url-fetch)
10542 (uri (pypi-uri "Whoosh" version))
10543 (sha256
10544 (base32
10545 "10qsqdjpbc85fykc1vgcs8xwbgn4l2l52c8d83xf1q59pwyn79bw"))))
10546 (build-system python-build-system)
10547 (native-inputs
10548 `(("python-pytest" ,python-pytest)))
10549 (home-page "http://bitbucket.org/mchaput/whoosh")
10550 (synopsis "Full text indexing, search, and spell checking library")
10551 (description
10552 "Whoosh is a fast, pure-Python full text indexing, search, and spell
10553 checking library.")
10554 (license license:bsd-2)))
10555
10556 (define-public python2-whoosh
10557 (let ((whoosh (package-with-python2 (strip-python2-variant python-whoosh))))
10558 (package (inherit whoosh)
10559 (propagated-inputs
10560 `(("python2-backport-ssl-match-hostname"
10561 ,python2-backport-ssl-match-hostname)
10562 ,@(package-propagated-inputs whoosh))))))
10563
10564 (define-public python-pathlib
10565 (package
10566 (name "python-pathlib")
10567 (version "1.0.1")
10568 (source (origin
10569 (method url-fetch)
10570 (uri (pypi-uri "pathlib" version))
10571 (sha256
10572 (base32
10573 "17zajiw4mjbkkv6ahp3xf025qglkj0805m9s41c45zryzj6p2h39"))))
10574 (build-system python-build-system)
10575 ;; The tests depend on the internal "test" module, which does not provide
10576 ;; a stable interface.
10577 (arguments `(#:tests? #f))
10578 (home-page "https://pathlib.readthedocs.org/")
10579 (synopsis "Object-oriented file system paths")
10580 (description "Pathlib offers a set of classes to handle file system paths.
10581 It offers the following advantages over using string objects:
10582
10583 @enumerate
10584 @item No more cumbersome use of os and os.path functions. Everything can
10585 be done easily through operators, attribute accesses, and method calls.
10586 @item Embodies the semantics of different path types. For example,
10587 comparing Windows paths ignores casing.
10588 @item Well-defined semantics, eliminating any inconsistencies or
10589 ambiguities (forward vs. backward slashes, etc.).
10590 @end enumerate
10591
10592 Note: In Python 3.4, pathlib is now part of the standard library. For other
10593 Python versions please consider python-pathlib2 instead, which tracks the
10594 standard library module. This module (python-pathlib) isn't maintained
10595 anymore.")
10596 (license license:expat)))
10597
10598 (define-public python2-pathlib
10599 (package-with-python2 python-pathlib))
10600
10601 (define-public python2-pathlib2
10602 (package
10603 (name "python2-pathlib2")
10604 (version "2.1.0")
10605 (source (origin
10606 (method url-fetch)
10607 (uri (pypi-uri "pathlib2" version))
10608 (sha256
10609 (base32
10610 "0p050msg5c8d0kadv702jnfshaxrb0il765cpkgnhn6mq5hakcyy"))))
10611 (build-system python-build-system)
10612 ;; We only need the the Python 2 variant, since for Python 3 our minimum
10613 ;; version is 3.4 which already includes this package as part of the
10614 ;; standard library.
10615 (arguments
10616 `(#:python ,python-2))
10617 (native-inputs
10618 `(("python2-six" ,python2-six)))
10619 (home-page "http://pypi.python.org/pypi/pathlib2/")
10620 (synopsis "Object-oriented file system paths - backport of standard
10621 pathlib module")
10622 (description "The goal of pathlib2 is to provide a backport of standard
10623 pathlib module which tracks the standard library module, so all the newest
10624 features of the standard pathlib can be used also on older Python versions.
10625
10626 Pathlib offers a set of classes to handle file system paths. It offers the
10627 following advantages over using string objects:
10628
10629 @enumerate
10630 @item No more cumbersome use of os and os.path functions. Everything can
10631 be done easily through operators, attribute accesses, and method calls.
10632 @item Embodies the semantics of different path types. For example,
10633 comparing Windows paths ignores casing.
10634 @item Well-defined semantics, eliminating any inconsistencies or
10635 ambiguities (forward vs. backward slashes, etc.).
10636 @end enumerate")
10637 (license license:expat)))
10638
10639 (define-public python-jellyfish
10640 (package
10641 (name "python-jellyfish")
10642 (version "0.5.6")
10643 (source (origin
10644 (method url-fetch)
10645 (uri (pypi-uri "jellyfish" version))
10646 (sha256
10647 (base32
10648 "1j9rplb16ba2prjj6mip46z0w9pnhnqpwgiwi0x93vnas14rlyl8"))))
10649 (build-system python-build-system)
10650 (native-inputs
10651 `(("python-pytest" ,python-pytest)))
10652 (home-page "https://github.com/jamesturk/jellyfish")
10653 (synopsis "Approximate and phonetic matching of strings")
10654 (description "Jellyfish uses a variety of string comparison and phonetic
10655 encoding algorithms to do fuzzy string matching.")
10656 (license license:bsd-2)
10657 (properties `((python2-variant . ,(delay python2-jellyfish))))))
10658
10659 (define-public python2-jellyfish
10660 (let ((jellyfish (package-with-python2
10661 (strip-python2-variant python-jellyfish))))
10662 (package (inherit jellyfish)
10663 (native-inputs `(("python2-unicodecsv" ,python2-unicodecsv)
10664 ,@(package-native-inputs jellyfish))))))
10665
10666 (define-public python2-unicodecsv
10667 (package
10668 (name "python2-unicodecsv")
10669 (version "0.14.1")
10670 (source (origin
10671 (method url-fetch)
10672 ;; The test suite is not included in the PyPi release.
10673 ;; https://github.com/jdunck/python-unicodecsv/issues/19
10674 (uri (string-append "https://github.com/jdunck/python-unicodecsv/"
10675 "archive/" version ".tar.gz"))
10676 (file-name (string-append name "-" version ".tar.gz"))
10677 (sha256
10678 (base32
10679 "087nqanfcyp6mlfbbr5lva5f3w6iz1bybls9xlrb8icmc474wh4w"))))
10680 (build-system python-build-system)
10681 (arguments
10682 `(;; It supports Python 3, but Python 3 can already do Unicode CSV.
10683 #:python ,python-2))
10684 (native-inputs
10685 `(("python2-unittest2" ,python2-unittest2)))
10686 (home-page "https://github.com/jdunck/python-unicodecsv")
10687 (synopsis "Unicode CSV module for Python 2")
10688 (description "Unicodecsv is a drop-in replacement for Python 2.7's CSV
10689 module, adding support for Unicode strings.")
10690 (license license:bsd-2)))
10691
10692 (define-public python-rarfile
10693 (package
10694 (name "python-rarfile")
10695 (version "2.8")
10696 (source (origin
10697 (method url-fetch)
10698 (uri (pypi-uri "rarfile" version))
10699 (sha256
10700 (base32
10701 "0qfad483kcbga0bn4qmcz953xjk16r52fahiy46zzn56v80y89ra"))))
10702 (build-system python-build-system)
10703 (arguments
10704 '(#:phases
10705 (modify-phases %standard-phases
10706 (replace 'check
10707 ;; Many tests fail, but the installation proceeds.
10708 (lambda _ (zero? (system* "make" "-C" "test" "test")))))))
10709 (native-inputs
10710 `(("which" ,which))) ; required for tests
10711 (propagated-inputs
10712 `(("libarchive" ,libarchive)))
10713 (home-page "https://github.com/markokr/rarfile")
10714 (synopsis "RAR archive reader for Python")
10715 (description "This is Python module for RAR archive reading. The interface
10716 is made as zipfile like as possible.")
10717 (license license:isc)))
10718
10719 (define-public python2-rarfile
10720 (package-with-python2 python-rarfile))
10721
10722 (define-public python-magic
10723 (package
10724 (name "python-magic")
10725 (version "0.4.3")
10726 (source
10727 (origin
10728 (method url-fetch)
10729 (uri (string-append "https://github.com/ahupp/python-magic/archive/"
10730 version ".tar.gz"))
10731 (sha256
10732 (base32
10733 "17bgy92i7sb021f2s4mw1dcvpm6p1mi9jihridwy1pyn8mzvpjgk"))
10734 (file-name (string-append name "-" version "-checkout"))))
10735 (build-system python-build-system)
10736 (arguments
10737 ;; The tests are unreliable, so don't run them. The tests fail
10738 ;; under Python3 because they were written for Python2 and
10739 ;; contain import statements that do not work in Python3. One of
10740 ;; the tests fails under Python2 because its assertions are
10741 ;; overly stringent; it relies on comparing output strings which
10742 ;; are brittle and can change depending on the version of
10743 ;; libmagic being used and the system on which the test is
10744 ;; running. In my case, under GuixSD 0.10.0, only one test
10745 ;; failed, and it seems to have failed only because the version
10746 ;; of libmagic that is packaged in Guix outputs a slightly
10747 ;; different (but not wrong) string than the one that the test
10748 ;; expected.
10749 '(#:tests? #f
10750 #:phases (modify-phases %standard-phases
10751 ;; Replace a specific method call with a hard-coded
10752 ;; path to the necessary libmagic.so file in the
10753 ;; store. If we don't do this, then the method call
10754 ;; will fail to find the libmagic.so file, which in
10755 ;; turn will cause any application using
10756 ;; python-magic to fail.
10757 (add-before 'build 'hard-code-path-to-libmagic
10758 (lambda* (#:key inputs #:allow-other-keys)
10759 (let ((file (assoc-ref inputs "file")))
10760 (substitute* "magic.py"
10761 (("ctypes.util.find_library\\('magic'\\)")
10762 (string-append "'" file "/lib/libmagic.so'")))
10763 #t)))
10764 (add-before 'install 'disable-egg-compression
10765 (lambda _
10766 (let ((port (open-file "setup.cfg" "a")))
10767 (display "\n[easy_install]\nzip_ok = 0\n"
10768 port)
10769 (close-port port)
10770 #t))))))
10771 (inputs
10772 ;; python-magic needs to be able to find libmagic.so.
10773 `(("file" ,file)))
10774 (home-page "https://github.com/ahupp/python-magic")
10775 (synopsis "File type identification using libmagic")
10776 (description
10777 "This module uses ctypes to access the libmagic file type
10778 identification library. It makes use of the local magic database and
10779 supports both textual and MIME-type output. Note that this module and
10780 the python-file module both provide a \"magic.py\" file; these two
10781 modules, which are different and were developed separately, both serve
10782 the same purpose: to provide Python bindings for libmagic.")
10783 (license license:expat)))
10784
10785 (define-public python2-magic
10786 (package-with-python2 python-magic))
10787
10788 (define-public python2-s3cmd
10789 (package
10790 (name "python2-s3cmd")
10791 (version "1.6.1")
10792 (source
10793 (origin
10794 (method url-fetch)
10795 (uri (string-append "mirror://sourceforge/s3tools/s3cmd/" version "/"
10796 "s3cmd-" version ".tar.gz"))
10797 (sha256
10798 (base32
10799 "0ki1rzhm5icvi9ry5jswi4b22yqwyj0d2wsqsgilwx6qhi7pjxa6"))))
10800 (build-system python-build-system)
10801 (arguments
10802 ;; s3cmd is written for python2 only and contains no tests.
10803 `(#:python ,python-2
10804 #:tests? #f))
10805 (propagated-inputs
10806 `(("python2-dateutil" ,python2-dateutil)
10807 ;; The python-file package also provides a magic.py module.
10808 ;; This is an unfortunate state of affairs; however, s3cmd
10809 ;; fails to install if it cannot find specifically the
10810 ;; python-magic package. Thus we include it, instead of using
10811 ;; python-file. Ironically, s3cmd sometimes works better
10812 ;; without libmagic bindings at all:
10813 ;; https://github.com/s3tools/s3cmd/issues/198
10814 ("python2-magic" ,python2-magic)))
10815 (home-page "http://s3tools.org/s3cmd")
10816 (synopsis "Command line tool for S3-compatible storage services")
10817 (description
10818 "S3cmd is a command line tool for uploading, retrieving and managing data
10819 in storage services that are compatible with the Amazon Simple Storage
10820 Service (S3) protocol, including S3 itself. It supports rsync-like backup,
10821 GnuPG encryption, and more. It also supports management of Amazon's
10822 CloudFront content delivery network.")
10823 (license license:gpl2+)))
10824
10825 (define-public python-pkgconfig
10826 (package
10827 (name "python-pkgconfig")
10828 (version "1.1.0")
10829 (source
10830 (origin
10831 (method url-fetch)
10832 (uri (pypi-uri "pkgconfig" version))
10833 (sha256
10834 (base32
10835 "1pw0kmvc57sjmaxi6c54fqsnihqj6hvhc9y1vaz36axafzqam7bh"))))
10836 (build-system python-build-system)
10837 (native-inputs
10838 `(("python-nose" ,python-nose)))
10839 (inputs
10840 `(("pkg-config" ,pkg-config)))
10841 (arguments
10842 `(;; Tests fail with "ValueError: _type_ 'v' not supported" on Python 3,
10843 ;; and on Python 2 they need the dl module deprecated since Python 2.6.
10844 #:tests? #f
10845 ;; Hard-code the path to pkg-config.
10846 #:phases
10847 (modify-phases %standard-phases
10848 (add-before
10849 'build 'patch
10850 (lambda _
10851 (substitute* "pkgconfig/pkgconfig.py"
10852 (("cmd = 'pkg-config")
10853 (string-append "cmd = '" (which "pkg-config"))))
10854 #t)))))
10855 (home-page "https://github.com/matze/pkgconfig")
10856 (synopsis "Python interface for pkg-config")
10857 (description "This module provides a Python interface to pkg-config. It
10858 can be used to find all pkg-config packages, check if a package exists,
10859 check if a package meets certain version requirements, query CFLAGS and
10860 LDFLAGS and parse the output to build extensions with setup.py.")
10861 (license license:expat)))
10862
10863 (define-public python2-pkgconfig
10864 (package-with-python2 python-pkgconfig))
10865
10866 (define-public python-bz2file
10867 (package
10868 (name "python-bz2file")
10869 (version "0.98")
10870 (source
10871 (origin
10872 (method url-fetch)
10873 (uri (pypi-uri "bz2file" version))
10874 (sha256
10875 (base32
10876 "126s53fkpx04f33a829yqqk8fj4png3qwg4m66cvlmhmwc8zihb4"))))
10877 (build-system python-build-system)
10878 (arguments
10879 `(#:tests? #f)) ; Tests use deprecated python modules.
10880 (home-page "https://github.com/nvawda/bz2file")
10881 (synopsis "Read and write bzip2-compressed files")
10882 (description
10883 "Bz2file is a Python library for reading and writing bzip2-compressed
10884 files. It contains a drop-in replacement for the I/O interface in the
10885 standard library's @code{bz2} module, including features from the latest
10886 development version of CPython that are not available in older releases.")
10887 (license license:asl2.0)
10888 (properties `((python2-variant . ,(delay python2-bz2file))))))
10889
10890 (define-public python2-bz2file
10891 (let ((base (package-with-python2
10892 (strip-python2-variant python-bz2file))))
10893 (package
10894 (inherit base)
10895 (arguments
10896 `(#:python ,python-2
10897 #:phases
10898 (modify-phases %standard-phases
10899 ;; 'python setup.py test' does not work as of 0.98.
10900 ;; There is only the one test file, so we run it directly.
10901 (replace 'check
10902 (lambda _ (zero? (system* "python"
10903 "test_bz2file.py"))))))))))
10904
10905 (define-public python-future
10906 (package
10907 (name "python-future")
10908 (version "0.16.0")
10909 (source
10910 (origin
10911 (method url-fetch)
10912 (uri (pypi-uri "future" version))
10913 (sha256
10914 (base32
10915 "1nzy1k4m9966sikp0qka7lirh8sqrsyainyf8rk97db7nwdfv773"))))
10916 (build-system python-build-system)
10917 ;; Many tests connect to the network or are otherwise flawed.
10918 ;; https://github.com/PythonCharmers/python-future/issues/210
10919 (arguments
10920 `(#:tests? #f))
10921 (home-page "http://python-future.org")
10922 (synopsis "Single-source support for Python 3 and 2")
10923 (description
10924 "@code{python-future} is the missing compatibility layer between Python 2 and
10925 Python 3. It allows you to use a single, clean Python 3.x-compatible codebase
10926 to support both Python 2 and Python 3 with minimal overhead.")
10927 (license license:expat)))
10928
10929 (define-public python2-future
10930 (package-with-python2 python-future))
10931
10932 (define-public python-cysignals
10933 (package
10934 (name "python-cysignals")
10935 (version "1.1.0")
10936 (source
10937 (origin
10938 (method url-fetch)
10939 (uri (pypi-uri "cysignals" version ".tar.bz2"))
10940 (sha256
10941 (base32
10942 "14cbyd9znlz6cxy1s3g6v6dv5jj45hn27pywkidd9b1zanaysqc6"))))
10943 (build-system python-build-system)
10944 (native-inputs
10945 `(("python-cython" ,python-cython)
10946 ("python-sphinx" ,python-sphinx)))
10947 (inputs
10948 `(("pari-gp" ,pari-gp)))
10949 (arguments
10950 `(#:modules ((guix build python-build-system)
10951 ((guix build gnu-build-system) #:prefix gnu:)
10952 (guix build utils))
10953 ;; FIXME: Tests are executed after installation and currently fail
10954 ;; when not installing into standard locations; the author is working
10955 ;; on a fix.
10956 #:tests? #f
10957 #:phases
10958 (modify-phases %standard-phases
10959 (add-before
10960 'build 'configure
10961 (assoc-ref gnu:%standard-phases 'configure)))))
10962 (home-page
10963 "https://github.com/sagemath/cysignals")
10964 (synopsis
10965 "Handling of interrupts and signals for Cython")
10966 (description
10967 "The cysignals package provides mechanisms to handle interrupts (and
10968 other signals and errors) in Cython code, using two related approaches,
10969 for mixed Cython/Python code or external C libraries and pure Cython code,
10970 respectively.")
10971 (license license:lgpl3+)))
10972
10973 (define-public python2-cysignals
10974 (package-with-python2 python-cysignals))
10975
10976 (define-public python2-shedskin
10977 (package
10978 (name "python2-shedskin")
10979 (version "0.9.4")
10980 (source
10981 (origin
10982 (method url-fetch)
10983 (uri (string-append "https://github.com/shedskin/shedskin/"
10984 "releases/download/v" version
10985 "/shedskin-" version ".tgz"))
10986 (sha256
10987 (base32
10988 "0nzwrzgw1ga8rw6f0ryq7zr9kkiavd1cqz5hzxkcbicl1dk7kz41"))))
10989 (build-system python-build-system)
10990 (arguments
10991 `(#:python ,python-2
10992 #:phases (modify-phases %standard-phases
10993 (add-after 'unpack 'fix-resulting-include-libs
10994 (lambda* (#:key inputs #:allow-other-keys)
10995 (let ((libgc (assoc-ref inputs "libgc"))
10996 (pcre (assoc-ref inputs "pcre")))
10997 (substitute* "shedskin/makefile.py"
10998 (("variable == 'CCFLAGS':[ ]*")
10999 (string-append "variable == 'CCFLAGS':\n"
11000 " line += ' -I " pcre "/include"
11001 " -I " libgc "/include'"))
11002 (("variable == 'LFLAGS':[ ]*")
11003 (string-append "variable == 'LFLAGS':\n"
11004 " line += ' -L" pcre "/lib"
11005 " -L " libgc "/lib'")))
11006 #t))))))
11007 (inputs `(("pcre" ,pcre)
11008 ("libgc" ,libgc)))
11009 (home-page "https://shedskin.github.io/")
11010 (synopsis "Experimental Python-2 to C++ Compiler")
11011 (description (string-append "This is an experimental compiler for a subset of
11012 Python. It generates C++ code and a Makefile."))
11013 (license (list license:gpl3 license:bsd-3 license:expat))))
11014
11015 (define-public python2-rope
11016 (package
11017 (name "python2-rope")
11018 (version "0.10.3")
11019 (source
11020 (origin
11021 (method url-fetch)
11022 (uri (pypi-uri "rope" version))
11023 (sha256
11024 (base32
11025 "18k5znhpwvrfck3yp0jmhd5j8r0f0s8bk1zh5yhs2cfgmfhbwigb"))))
11026 (arguments
11027 ;; Rope is currently python-2 only.
11028 ;; https://github.com/python-rope/rope/issues/57
11029 `(#:python ,python-2))
11030 (build-system python-build-system)
11031 (native-inputs
11032 `(("python2-unittest2" ,python2-unittest2)))
11033 (home-page "https://github.com/python-rope/rope")
11034 (synopsis "Refactoring library for Python")
11035 (description "Rope is a refactoring library for Python. It facilitates
11036 the renaming, moving and extracting of attributes, functions, modules, fields
11037 and parameters in Python 2 source code. These refactorings can also be applied
11038 to occurrences in strings and comments.")
11039 (license license:gpl2)))
11040
11041 (define-public python-py3status
11042 (package
11043 (name "python-py3status")
11044 (version "3.1")
11045 (source
11046 (origin
11047 (method url-fetch)
11048 (uri (pypi-uri "py3status" version))
11049 (sha256
11050 (base32
11051 "0i283z1pivmir61z8kbiycigc94l61v33ygzkhczf1ifq7cppyds"))))
11052 (build-system python-build-system)
11053 (arguments
11054 '(#:tests? #f)) ; TODO: Requires many libraries not in Guix.
11055 (home-page "https://github.com/ultrabug/py3status")
11056 (synopsis "Extensible i3status wrapper written in Python")
11057 (description "py3status is an i3status wrapper which extends i3status
11058 functionality in a modular way, allowing you to extend your panel with your
11059 own code, responding to click events and updating clock every second.")
11060 (license license:bsd-3)))
11061
11062 (define-public python-tblib
11063 (package
11064 (name "python-tblib")
11065 (version "1.3.0")
11066 (source (origin
11067 (method url-fetch)
11068 (uri (pypi-uri "tblib" version))
11069 (sha256 (base32
11070 "02iahfkfa927hb4jq2bak36ldihwapzacfiq5lyxg8llwn98a1yi"))))
11071 (build-system python-build-system)
11072 (arguments
11073 `(#:phases
11074 (modify-phases %standard-phases
11075 (replace 'check
11076 (lambda _
11077 ;; Upstream runs tests after installation and the package itself
11078 ;; resides in a subdirectory. Extend PYTHONPATH so it will be
11079 ;; found.
11080 (setenv "PYTHONPATH"
11081 (string-append (getcwd) "/build/lib:"
11082 (getenv "PYTHONPATH")))
11083 (zero? (system* "py.test" "-vv" "tests" "README.rst")))))))
11084 (native-inputs
11085 `(("python-pytest" ,python-pytest)
11086 ("python-six" ,python-six)))
11087 (home-page "https://github.com/ionelmc/python-tblib")
11088 (synopsis "Traceback serialization library")
11089 (description
11090 "Traceback serialization allows you to:
11091
11092 @enumerate
11093 @item Pickle tracebacks and raise exceptions with pickled tracebacks in
11094 different processes. This allows better error handling when running code over
11095 multiple processes (imagine multiprocessing, billiard, futures, celery etc).
11096
11097 @item Parse traceback strings and raise with the parsed tracebacks.
11098 @end enumerate\n")
11099 (license license:bsd-3)))
11100
11101 (define-public python2-tblib
11102 (package-with-python2 python-tblib))
11103
11104 (define-public python-sqlparse
11105 (package
11106 (name "python-sqlparse")
11107 (version "0.1.19")
11108 (source (origin
11109 (method url-fetch)
11110 (uri (pypi-uri "sqlparse" version))
11111 (sha256
11112 (base32
11113 "1s2fvaxgh9kqzrd6iwy5h7i61ckn05plx9np13zby93z3hdbx5nq"))))
11114 (build-system python-build-system)
11115 (arguments
11116 `(#:phases
11117 (modify-phases %standard-phases
11118 (replace 'check
11119 (lambda* _
11120 ;; setup.py-integrated 2to3 only affects the build files, but
11121 ;; py.test is using the source files. So we need to convert them
11122 ;; manually.
11123 (when (zero? (system* "python3"))
11124 (system* "2to3" "--no-diff" "-wn" "sqlparse" "tests"))
11125 (zero? (system* "py.test")))))))
11126 (native-inputs
11127 `(("python-pytest" ,python-pytest)))
11128 (home-page "https://github.com/andialbrecht/sqlparse")
11129 (synopsis "Non-validating SQL parser")
11130 (description "Sqlparse is a non-validating SQL parser for Python. It
11131 provides support for parsing, splitting and formatting SQL statements.")
11132 (license license:bsd-3)))
11133
11134 (define-public python2-sqlparse
11135 (package-with-python2 python-sqlparse))
11136
11137 (define-public python-greenlet
11138 (package
11139 (name "python-greenlet")
11140 (version "0.4.11")
11141 (source (origin
11142 (method url-fetch)
11143 (uri (pypi-uri "greenlet" version))
11144 (sha256
11145 (base32
11146 "1xhik26j4f3kc4qw9xmj0c567rb5h1zryb4ijwqnqwwjvfhbv59h"))))
11147 (build-system python-build-system)
11148 (home-page "https://greenlet.readthedocs.io/")
11149 (synopsis "Lightweight in-process concurrent programming")
11150 (description
11151 "Greenlet package is a spin-off of Stackless, a version of CPython
11152 that supports micro-threads called \"tasklets\". Tasklets run
11153 pseudo-concurrently (typically in a single or a few OS-level threads) and
11154 are synchronized with data exchanges on \"channels\".")
11155 (license (list license:psfl license:expat))))
11156
11157 (define-public python2-greenlet
11158 (package-with-python2 python-greenlet))
11159
11160 (define-public python-gevent
11161 (package
11162 (name "python-gevent")
11163 (version "1.1.1")
11164 (source (origin
11165 (method url-fetch)
11166 (uri (pypi-uri "gevent" version))
11167 (sha256
11168 (base32
11169 "1smf3kvidpdiyi2c81alal74p2zm0clrm6xbyy6y1k9a3f2vkrbf"))
11170 (modules '((guix build utils)))
11171 (snippet
11172 '(begin
11173 ;; unbunding libev and c-ares
11174 (for-each delete-file-recursively '("libev" "c-ares"))
11175 ;; fixing testsuite
11176 (call-with-output-file "greentest/__init__.py" noop)
11177 (substitute* "greentest/testrunner.py"
11178 (("import util") "from . import util")
11179 (("from util import log") "from .util import log"))))))
11180 (build-system python-build-system)
11181 (propagated-inputs
11182 `(("python-greenlet" ,python-greenlet)))
11183 (native-inputs
11184 `(("python-six" ,python-six)))
11185 (inputs
11186 `(("c-ares" ,c-ares)
11187 ("libev" ,libev)))
11188 (home-page "http://www.gevent.org/")
11189 (synopsis "Coroutine-based network library")
11190 (description
11191 "gevent is a coroutine-based Python networking library that uses greenlet
11192 to provide a high-level synchronous API on top of the libev event loop.")
11193 (license license:expat)))
11194
11195 (define-public python2-gevent
11196 (package-with-python2 python-gevent))
11197
11198 (define-public python-geventhttpclient
11199 (package
11200 (name "python-geventhttpclient")
11201 (version "1.3.1")
11202 (source (origin
11203 (method url-fetch)
11204 (uri (pypi-uri "geventhttpclient" version))
11205 (sha256
11206 (base32
11207 "07d0q3wzmml75227r6y6mrl5a0zpf4v9gj0ni5rhbyzmaj4az1xx"))
11208 (modules '((guix build utils)))
11209 (snippet
11210 '(begin
11211 ;; Delete pre-compiled files.
11212 (for-each delete-file (find-files "src/geventhttpclient"
11213 ".*\\.pyc"))
11214 #t))))
11215 (build-system python-build-system)
11216 (arguments
11217 '(#:phases
11218 (modify-phases %standard-phases
11219 (add-after 'unpack 'delete-network-tests
11220 (lambda _
11221 (delete-file "src/geventhttpclient/tests/test_client.py")
11222 #t))
11223 (delete 'check)
11224 (add-after 'install 'check
11225 (lambda* (#:key inputs outputs #:allow-other-keys)
11226 (add-installed-pythonpath inputs outputs)
11227 (zero? (system* "py.test" "src/geventhttpclient/tests" "-v")))))))
11228 (native-inputs
11229 `(("python-pytest" ,python-pytest)))
11230 (propagated-inputs
11231 `(("python-certifi" ,python-certifi)
11232 ("python-gevent" ,python-gevent)
11233 ("python-six" ,python-six)))
11234 (home-page "https://github.com/gwik/geventhttpclient")
11235 (synopsis "HTTP client library for gevent")
11236 (description "@code{python-geventhttpclient} is a high performance,
11237 concurrent HTTP client library for python using @code{gevent}.")
11238 (license license:expat)))
11239
11240 (define-public python2-geventhttpclient
11241 (package-with-python2 python-geventhttpclient))
11242
11243 (define-public python-fastimport
11244 (package
11245 (name "python-fastimport")
11246 (version "0.9.6")
11247 (source
11248 (origin
11249 (method url-fetch)
11250 (uri (pypi-uri "fastimport" version))
11251 (sha256
11252 (base32 "1aqjsin4rmqm7ln4j0p73fzxifws6c6ikgyhav7r137m2ixsxl43"))))
11253 (build-system python-build-system)
11254 (home-page "https://github.com/jelmer/python-fastimport")
11255 (synopsis "VCS fastimport parser and generator in Python")
11256 (description "This package provides a parser for and generator of the Git
11257 @url{https://www.kernel.org/pub/software/scm/git/docs/git-fast-import.html,fastimport}
11258 format.")
11259 (license license:gpl2+)))
11260
11261 (define-public python2-fastimport
11262 (package-with-python2 python-fastimport))
11263
11264 (define-public python-twisted
11265 (package
11266 (name "python-twisted")
11267 (version "16.2.0")
11268 (source (origin
11269 (method url-fetch)
11270 (uri (pypi-uri "Twisted" version ".tar.bz2"))
11271 (sha256
11272 (base32
11273 "0ydxrp9myw1mvsz3qfzx5579y5llmqa82pxvqchgp5syczffi450"))))
11274 (build-system python-build-system)
11275 (arguments
11276 '(#:tests? #f)) ; FIXME: Some tests are failing.
11277 ;; #:phases
11278 ;; (modify-phases %standard-phases
11279 ;; (replace 'check
11280 ;; (lambda _
11281 ;; (zero? (system* "./bin/trial" "twisted")))))
11282 (propagated-inputs
11283 `(("python-zope-interface" ,python-zope-interface)))
11284 (home-page "https://twistedmatrix.com/")
11285 (synopsis "Asynchronous networking framework written in Python")
11286 (description
11287 "Twisted is an extensible framework for Python programming, with special
11288 focus on event-based network programming and multiprotocol integration.")
11289 (license license:expat)))
11290
11291 (define-public python2-twisted
11292 (package-with-python2 python-twisted))
11293
11294 (define-public python-pika
11295 (package
11296 (name "python-pika")
11297 (version "0.10.0")
11298 (source
11299 (origin
11300 (method url-fetch)
11301 (uri (pypi-uri "pika" version))
11302 (sha256
11303 (base32
11304 "0nb4h08di432lv7dy2v9kpwgk0w92f24sqc2hw2s9vwr5b8v8xvj"))))
11305 (build-system python-build-system)
11306 (native-inputs
11307 `(("python-pyev" ,python-pyev)
11308 ("python-tornado" ,python-tornado)
11309 ("python-twisted" ,python-twisted)))
11310 (home-page "https://pika.readthedocs.org")
11311 (synopsis "Pure Python AMQP Client Library")
11312 (description
11313 "Pika is a pure-Python implementation of the AMQP (Advanced Message Queuing
11314 Protocol) 0-9-1 protocol that tries to stay fairly independent of the underlying
11315 network support library.")
11316 (license license:bsd-3)))
11317
11318 (define-public python2-pika
11319 (package-with-python2 python-pika))
11320
11321 (define-public python-ply
11322 (package
11323 (name "python-ply")
11324 (version "3.9")
11325 (source
11326 (origin
11327 (method url-fetch)
11328 (uri (pypi-uri "ply" version))
11329 (sha256
11330 (base32
11331 "0gpl0yli3w03ipyqfrp3w5nf0iawhsq65anf5wwm2wf5p502jzhd"))))
11332 (build-system python-build-system)
11333 (home-page "http://www.dabeaz.com/ply/")
11334 (synopsis "Python Lex & Yacc")
11335 (description "PLY is a @code{lex}/@code{yacc} implemented purely in Python.
11336 It uses LR parsing and does extensive error checking.")
11337 (license license:bsd-3)))
11338
11339 (define-public python2-ply
11340 (package-with-python2 python-ply))
11341
11342 (define-public python-tabulate
11343 (package
11344 (name "python-tabulate")
11345 (version "0.7.7")
11346 (source (origin
11347 (method url-fetch)
11348 (uri (pypi-uri "tabulate" version))
11349 (sha256
11350 (base32
11351 "1inqhspd4frxnp08c32yndr0lc4px1xfkqah184i5w09gkhvi843"))))
11352 (build-system python-build-system)
11353 (arguments
11354 ;; FIXME: The pypi release tarball is missing a 'test/common.py'
11355 ;; and the latest release is not tagged in the upstream repository.
11356 '(#:tests? #f))
11357 (home-page "https://bitbucket.org/astanin/python-tabulate")
11358 (synopsis "Pretty-print tabular data")
11359 (description
11360 "Tabulate is a library and command-line utility to pretty-print tabular
11361 data in Python.")
11362 (license license:expat)))
11363
11364 (define-public python2-tabulate
11365 (package-with-python2 python-tabulate))
11366
11367 (define-public python-kazoo
11368 (package
11369 (name "python-kazoo")
11370 (version "2.2.1")
11371 (source
11372 (origin
11373 (method url-fetch)
11374 (uri (pypi-uri "kazoo" version))
11375 (sha256
11376 (base32
11377 "10pb864if9qi2pq9lfb9m8f7z7ss6rml80gf1d9h64lap5crjnjj"))))
11378 (build-system python-build-system)
11379 (arguments '(#:tests? #f)) ; XXX: needs zookeeper
11380 (propagated-inputs
11381 `(("python-six" ,python-six)))
11382 (home-page "https://kazoo.readthedocs.org")
11383 (synopsis "High-level Zookeeper client library")
11384 (description
11385 "Kazoo is a Python client library for the Apache Zookeeper distributed
11386 application service. It is designed to be easy to use and to avoid common
11387 programming errors.")
11388 (license license:asl2.0)))
11389
11390 (define-public python2-kazoo
11391 (package-with-python2 python-kazoo))
11392
11393 (define-public python-pykafka
11394 (package
11395 (name "python-pykafka")
11396 (version "2.4.0")
11397 (source (origin
11398 (method url-fetch)
11399 (uri (string-append
11400 "https://pypi.python.org/packages/8b/3e/"
11401 "384eeff406b06315738b62483fd2126c6e4f544167116b17cc04ea7d2a59/"
11402 "pykafka-" version ".tar.gz"))
11403 (sha256
11404 (base32
11405 "1id6sr159p6aa13bxcqyr9gln8sqg1l0ddzns5iws8kk5q1p5cfv"))))
11406 (build-system python-build-system)
11407 (arguments '(#:tests? #f)) ; XXX: needs zookeeper, kafka, etc.
11408 (propagated-inputs
11409 `(("python-gevent" ,python-gevent)
11410 ("python-kazoo" ,python-kazoo)
11411 ("python-tabulate" ,python-tabulate)))
11412 (inputs
11413 `(("librdkafka" ,librdkafka)))
11414 (home-page "https://pykafka.readthedocs.io/")
11415 (synopsis "Apache Kafka client for Python")
11416 (description
11417 "PyKafka is a client for the Apache Kafka distributed messaging system.
11418 It includes Python implementations of Kafka producers and consumers, which
11419 are optionally backed by a C extension built on librdkafka.")
11420 (license license:asl2.0)))
11421
11422 (define-public python2-pykafka
11423 (package-with-python2 python-pykafka))
11424
11425 (define-public python-wcwidth
11426 (package
11427 (name "python-wcwidth")
11428 (version "0.1.7")
11429 (source
11430 (origin
11431 (method url-fetch)
11432 (uri (pypi-uri "wcwidth" version))
11433 (sha256
11434 (base32
11435 "0pn6dflzm609m4r3i8ik5ni9ijjbb5fa3vg1n7hn6vkd49r77wrx"))))
11436 (build-system python-build-system)
11437 (home-page "https://github.com/jquast/wcwidth")
11438 (synopsis "Measure number of terminal column cells of wide-character codes")
11439 (description "Wcwidth measures the number of terminal column cells of
11440 wide-character codes. It is useful for those implementing a terminal emulator,
11441 or programs that carefully produce output to be interpreted by one. It is a
11442 Python implementation of the @code{wcwidth} and @code{wcswidth} C functions
11443 specified in POSIX.1-2001 and POSIX.1-2008.")
11444 (license license:expat)))
11445
11446 (define-public python2-wcwidth
11447 (package-with-python2 python-wcwidth))
11448
11449 (define-public python2-jsonrpclib
11450 (package
11451 (name "python2-jsonrpclib")
11452 (version "0.1.7")
11453 (source (origin
11454 (method url-fetch)
11455 (uri (string-append
11456 "https://pypi.python.org/packages/source/j/jsonrpclib/"
11457 "jsonrpclib-" version ".tar.gz"))
11458 (sha256
11459 (base32
11460 "02vgirw2bcgvpcxhv5hf3yvvb4h5wzd1lpjx8na5psdmaffj6l3z"))))
11461 (build-system python-build-system)
11462 (arguments
11463 `(#:tests? #f
11464 #:python ,python-2))
11465 (home-page "https://github.com/joshmarshall/jsonrpclib/")
11466 (synopsis "Implementation of JSON-RPC specification for Python")
11467 (description
11468 "This library is an implementation of the JSON-RPC specification.
11469 It supports both the original 1.0 specification, as well as the
11470 new (proposed) 2.0 spec, which includes batch submission, keyword arguments,
11471 etc.")
11472 (license license:asl2.0)))
11473
11474 (define-public python-chai
11475 (package
11476 (name "python-chai")
11477 (version "1.1.1")
11478 (source (origin
11479 (method url-fetch)
11480 (uri (pypi-uri "chai" version))
11481 (sha256
11482 (base32
11483 "016kf3irrclpkpvcm7q0gmkfibq7jgy30a9v73pp42bq9h9a32bl"))))
11484 (build-system python-build-system)
11485 (home-page "https://github.com/agoragames/chai")
11486 (synopsis "Mocking framework for Python")
11487 (description
11488 "Chai provides an api for mocking, stubbing and spying your python
11489 objects, patterned after the Mocha library for Ruby.")
11490 (license license:bsd-3)))
11491
11492 (define-public python2-chai
11493 (package-with-python2 python-chai))
11494
11495 (define-public python-arrow
11496 (package
11497 (name "python-arrow")
11498 (version "0.8.0")
11499 (source (origin
11500 (method url-fetch)
11501 (uri (pypi-uri "arrow" version))
11502 (sha256
11503 (base32
11504 "1bz7hkdgpqcjs866y58z8jywpy7al0f4rxdr00bh2l5qddyw245j"))))
11505 (build-system python-build-system)
11506 (native-inputs
11507 `(;; For testing
11508 ("python-chai" ,python-chai)
11509 ("python-simplejson" ,python-simplejson)))
11510 (propagated-inputs
11511 `(("python-dateutil" ,python-dateutil)))
11512 (home-page "https://github.com/crsmithdev/arrow/")
11513 (synopsis "Dates and times for Python")
11514 (description
11515 "Arrow is a Python library to creating, manipulating, formatting and
11516 converting dates, times, and timestamps. It implements and updates the
11517 datetime type.")
11518 (license license:asl2.0)))
11519
11520 (define-public python2-arrow
11521 (package-with-python2 python-arrow))
11522
11523 (define-public python-inflection
11524 (package
11525 (name "python-inflection")
11526 (version "0.3.1")
11527 (source
11528 (origin (method url-fetch)
11529 (uri (pypi-uri "inflection" version))
11530 (sha256
11531 (base32
11532 "1jhnxgnw8y3mbzjssixh6qkc7a3afc4fygajhqrqalnilyvpzshq"))))
11533 (build-system python-build-system)
11534 (native-inputs
11535 `(("python-pytest" ,python-pytest)))
11536 (home-page "https://github.com/jpvanhal/inflection")
11537 (synopsis "Python string transformation library")
11538 (description
11539 "Inflection is a string transformation library. It singularizes
11540 and pluralizes English words, and transforms strings from CamelCase to
11541 underscored string.")
11542 (license license:expat)))
11543
11544 (define-public python2-inflection
11545 (package-with-python2 python-inflection))
11546
11547 (define-public python-pylev
11548 (package
11549 (name "python-pylev")
11550 (version "1.3.0")
11551 (source (origin
11552 (method url-fetch)
11553 (uri (pypi-uri "pylev" version))
11554 (sha256
11555 (base32
11556 "1hz1x9blsbxya1y9nnhnwwdnqmakxi9mc0jkwj0rn6b1h44i0f86"))))
11557 (build-system python-build-system)
11558 (home-page "https://github.com/toastdriven/pylev")
11559 (synopsis "Levenshtein distance implementation in Python")
11560 (description "Pure Python Levenshtein implementation, based off the
11561 Wikipedia code samples at
11562 @url{http://en.wikipedia.org/wiki/Levenshtein_distance}.")
11563 (license license:bsd-3)))
11564
11565 (define-public python2-pylev
11566 (package-with-python2 python-pylev))
11567
11568 (define-public python-cleo
11569 (package
11570 (name "python-cleo")
11571 (version "0.4.1")
11572 (source (origin
11573 (method url-fetch)
11574 (uri (pypi-uri "cleo" version))
11575 (sha256
11576 (base32
11577 "1k2dcl6mqpn5bljyl6w42rqyd9mb3y9kh2mg7m2x3kfjwvg0rpva"))))
11578 (build-system python-build-system)
11579 (native-inputs
11580 `(;; For testing
11581 ("python-mock" ,python-mock)
11582 ("python-pytest" ,python-pytest)))
11583 (propagated-inputs
11584 `(("python-psutil" ,python-psutil)
11585 ("python-pylev" ,python-pylev)))
11586 (home-page "https://github.com/sdispater/cleo")
11587 (synopsis "Command-line arguments library for Python")
11588 (description
11589 "Cleo allows you to create command-line commands with signature in
11590 docstring and colored output.")
11591 (license license:expat)))
11592
11593 (define-public python2-cleo
11594 (package-with-python2 python-cleo))
11595
11596 (define-public python-lazy-object-proxy
11597 (package
11598 (name "python-lazy-object-proxy")
11599 (version "1.2.2")
11600 (source (origin
11601 (method url-fetch)
11602 (uri (pypi-uri "lazy-object-proxy" version))
11603 (sha256
11604 (base32
11605 "0s22aqqkdscyh8sjspyyax7qa1aiz8p4midrnyf39717fhfczm6x"))))
11606 (build-system python-build-system)
11607 (home-page "https://github.com/ionelmc/python-lazy-object-proxy")
11608 (synopsis "Lazy object proxy for python")
11609 (description
11610 "Lazy object proxy is an object that wraps a callable but defers the call
11611 until the object is actually required, and caches the result of said call.")
11612 (license license:bsd-2)))
11613
11614 (define-public python2-lazy-object-proxy
11615 (package-with-python2 python-lazy-object-proxy))
11616
11617 (define-public python-dnspython
11618 (package
11619 (name "python-dnspython")
11620 (version "1.15.0")
11621 (source (origin
11622 (method url-fetch)
11623 (uri (string-append "http://www.dnspython.org/kits/"
11624 version "/dnspython-" version ".tar.gz"))
11625 (sha256
11626 (base32
11627 "0jr4v2pd90i6l1xxbss2m05psbjaxvyvvvpq44wycijpfgjqln8i"))))
11628 (build-system python-build-system)
11629 (arguments '(#:tests? #f)) ; XXX: requires internet access
11630 (home-page "http://www.dnspython.org")
11631 (synopsis "DNS toolkit for Python")
11632 (description
11633 "dnspython is a DNS toolkit for Python. It supports almost all record
11634 types. It can be used for queries, zone transfers, and dynamic updates.
11635 It supports TSIG authenticated messages and EDNS0.")
11636 (license license:expat)))
11637
11638 (define-public python2-dnspython
11639 (package-with-python2 python-dnspython))
11640
11641 (define-public python-email-validator
11642 (package
11643 (name "python-email-validator")
11644 (version "1.0.2")
11645 (source
11646 (origin (method url-fetch)
11647 (uri (pypi-uri "email_validator" version))
11648 (sha256
11649 (base32
11650 "1ja9149l9ck5n45a72h3is7v476hjny5ybxbcamx1nw6iplsm7k6"))))
11651 (build-system python-build-system)
11652 (arguments
11653 '(#:phases
11654 (modify-phases %standard-phases
11655 (add-before 'build 'use-dnspython
11656 (lambda _
11657 (substitute* "setup.py"
11658 (("dnspython3") "dnspython"))
11659 #t)))))
11660 (propagated-inputs
11661 `(("python-dnspython" ,python-dnspython)
11662 ("python-idna" ,python-idna)))
11663 (home-page "https://github.com/JoshData/python-email-validator")
11664 (synopsis "Email address validation library for Python")
11665 (description
11666 "This library validates email address syntax and deliverability.")
11667 (license license:cc0)))
11668
11669 (define-public python2-email-validator
11670 (package-with-python2 python-email-validator))
11671
11672 (define-public python-ukpostcodeparser
11673 (package
11674 (name "python-ukpostcodeparser")
11675 (version "1.0.3")
11676 (source (origin
11677 (method url-fetch)
11678 (uri (pypi-uri "UkPostcodeParser" version))
11679 (sha256
11680 (base32
11681 "1jwg9z4rz51mcka1821rwgycsd0mcicyp1kiwjfa2kvg8bm9p2qd"))))
11682 (build-system python-build-system)
11683 (home-page "https://github.com/hamstah/ukpostcodeparser")
11684 (synopsis "UK Postcode parser for Python")
11685 (description
11686 "This library provides the @code{parse_uk_postcode} function for
11687 parsing UK postcodes.")
11688 (license license:expat)))
11689
11690 (define-public python2-ukpostcodeparser
11691 (package-with-python2 python-ukpostcodeparser))
11692
11693 (define-public python-faker
11694 (package
11695 (name "python-faker")
11696 (version "0.7.9")
11697 (source (origin
11698 (method url-fetch)
11699 (uri (pypi-uri "Faker" version))
11700 (sha256
11701 (base32
11702 "1fh2p2yz0fsdr4fqwxgddwbvfb6qn6vp8yx0qwqzra27yq5d1wsm"))
11703 (patches
11704 (search-patches "python-faker-fix-build-32bit.patch"))
11705 (modules '((guix build utils)))
11706 (snippet
11707 '(begin
11708 (for-each delete-file (find-files "." "\\.pyc$"))
11709 #t))))
11710 (build-system python-build-system)
11711 (arguments
11712 '(#:phases
11713 (modify-phases %standard-phases
11714 (replace 'check
11715 (lambda _
11716 (zero? (system* "python" "-m" "unittest" "-v" "tests")))))))
11717 (native-inputs
11718 `(;; For testing
11719 ("python-email-validator" ,python-email-validator)
11720 ("python-mock" ,python-mock)
11721 ("python-ukpostcodeparser" ,python-ukpostcodeparser)))
11722 (propagated-inputs
11723 `(("python-dateutil" ,python-dateutil)
11724 ("python-six" ,python-six)))
11725 (home-page "https://github.com/joke2k/faker")
11726 (synopsis "Python package that generates fake data")
11727 (description
11728 "Faker is a Python package that generates fake data such as names,
11729 addresses, and phone numbers.")
11730 (license license:expat)
11731 (properties `((python2-variant . ,(delay python2-faker))))))
11732
11733 (define-public python2-faker
11734 (let ((base (package-with-python2 (strip-python2-variant
11735 python-faker))))
11736 (package
11737 (inherit base)
11738 (propagated-inputs
11739 `(("python2-ipaddress" ,python2-ipaddress)
11740 ,@(package-propagated-inputs base))))))
11741
11742 (define-public python-fake-factory
11743 (package
11744 (name "python-fake-factory")
11745 (version "0.7.2")
11746 (source (origin
11747 (method url-fetch)
11748 (uri (pypi-uri "fake-factory" version))
11749 (sha256
11750 (base32
11751 "0vs0dkmg0dlaxf8w6q2i3k0i03gmp56ablldv7ci9x3nbadkn71g"))
11752 (patches
11753 (search-patches
11754 "python-fake-factory-fix-build-32bit.patch"))))
11755 (build-system python-build-system)
11756 (arguments
11757 '(#:phases
11758 (modify-phases %standard-phases
11759 (replace 'check
11760 (lambda _
11761 (zero? (system* "python" "-m" "unittest" "-v" "faker.tests")))))))
11762 (native-inputs
11763 `(;; For testing
11764 ("python-email-validator" ,python-email-validator)
11765 ("python-mock" ,python-mock)
11766 ("python-ukpostcodeparser" ,python-ukpostcodeparser)))
11767 (propagated-inputs
11768 `(("python-dateutil" ,python-dateutil)
11769 ("python-six" ,python-six)))
11770 (home-page "https://github.com/joke2k/faker")
11771 (synopsis "Python package that generates fake data")
11772 (description
11773 "Faker is a Python package that generates fake data such as names,
11774 addresses, and phone numbers.")
11775 (license license:expat)
11776 (properties `((python2-variant . ,(delay python2-fake-factory))
11777 (superseded . ,python-faker)))))
11778
11779 (define-public python2-fake-factory
11780 (let ((base (package-with-python2 (strip-python2-variant
11781 python-fake-factory))))
11782 (package
11783 (inherit base)
11784 (properties `((superseded . ,python2-faker)))
11785 (propagated-inputs
11786 `(("python2-ipaddress" ,python2-ipaddress)
11787 ,@(package-propagated-inputs base))))))
11788
11789 (define-public python-pyaml
11790 (package
11791 (name "python-pyaml")
11792 (version "15.8.2")
11793 (source (origin
11794 (method url-fetch)
11795 (uri (pypi-uri "pyaml" version))
11796 (sha256
11797 (base32
11798 "1f5m28vkh4ksq3d80d8mmd2z8wxvc3mgy2pmrv2751dm2xgznm4w"))))
11799 (build-system python-build-system)
11800 (native-inputs
11801 `(("python-unidecode" ,python-unidecode)))
11802 (propagated-inputs
11803 `(("python-pyyaml" ,python-pyyaml)))
11804 (home-page "https://github.com/mk-fg/pretty-yaml")
11805 (synopsis "YAML pretty-print library for Python")
11806 (description
11807 "pyaml is a PyYAML based python module to produce pretty and readable
11808 YAML-serialized data.")
11809 (license (license:non-copyleft "http://www.wtfpl.net/txt/copying/"))))
11810
11811 (define-public python2-pyaml
11812 (package-with-python2 python-pyaml))
11813
11814 (define-public python-flexmock
11815 (package
11816 (name "python-flexmock")
11817 (version "0.10.2")
11818 (source (origin
11819 (method url-fetch)
11820 (uri (pypi-uri "flexmock" version))
11821 (sha256
11822 (base32
11823 "0arc6njvs6i9v9hgvzk5m50296g7zy5m9d7pyb43vdsdgxrci5gy"))))
11824 (build-system python-build-system)
11825 (home-page "https://flexmock.readthedocs.org")
11826 (synopsis "Testing library for Python")
11827 (description
11828 "flexmock is a testing library for Python that makes it easy to create
11829 mocks, stubs and fakes.")
11830 (license license:bsd-3)))
11831
11832 (define-public python2-flexmock
11833 (package-with-python2 python-flexmock))
11834
11835 (define-public python-orator
11836 (package
11837 (name "python-orator")
11838 (version "0.8.2")
11839 (source (origin
11840 (method url-fetch)
11841 (uri (pypi-uri "orator" version))
11842 (sha256
11843 (base32
11844 "1li49irsqha17nrda4nsb48biyy0rarp9pphf0jpqwm5zr8hv569"))))
11845 (build-system python-build-system)
11846 (arguments '(#:tests? #f)) ; no tests
11847 (propagated-inputs
11848 `(("python-arrow" ,python-arrow)
11849 ("python-blinker" ,python-blinker)
11850 ("python-cleo" ,python-cleo)
11851 ("python-faker" ,python-faker)
11852 ("python-inflection" ,python-inflection)
11853 ("python-lazy-object-proxy" ,python-lazy-object-proxy)
11854 ("python-pyaml" ,python-pyaml)
11855 ("python-simplejson" ,python-simplejson)
11856 ("python-wrapt" ,python-wrapt)))
11857 (home-page "https://orator-orm.com/")
11858 (synopsis "ActiveRecord ORM for Python")
11859 (description
11860 "Orator provides a simple ActiveRecord-like Object Relational Mapping
11861 implementation for Python.")
11862 (license license:expat)
11863 (properties `((python2-variant . ,(delay python2-orator))))))
11864
11865 (define-public python2-orator
11866 (let ((base (package-with-python2 (strip-python2-variant python-orator))))
11867 (package
11868 (inherit base)
11869 (propagated-inputs
11870 `(("python2-ipaddress" ,python2-ipaddress)
11871 ,@(package-propagated-inputs base))))))
11872
11873 (define-public python-prompt-toolkit
11874 (package
11875 (name "python-prompt-toolkit")
11876 (version "1.0.9")
11877 (source
11878 (origin
11879 (method url-fetch)
11880 (uri (pypi-uri "prompt_toolkit" version ".tar.gz"))
11881 (sha256
11882 (base32
11883 "172r15k9kwdw2lnajvpz1632dd16nqz1kcal1p0lq5ywdarj6rfd"))))
11884 (build-system python-build-system)
11885 (arguments
11886 '(#:tests? #f)) ; The test suite uses some Windows-specific data types.
11887 (propagated-inputs
11888 `(("python-wcwidth" ,python-wcwidth)
11889 ("python-six" ,python-six)
11890 ("python-pygments" ,python-pygments)))
11891 (home-page "https://github.com/jonathanslenders/python-prompt-toolkit")
11892 (synopsis "Library for building command line interfaces in Python")
11893 (description
11894 "Prompt-Toolkit is a library for building interactive command line
11895 interfaces in Python. It's like GNU Readline but it also features syntax
11896 highlighting while typing, out-of-the-box multi-line input editing, advanced
11897 code completion, incremental search, support for Chinese double-width
11898 characters, mouse support, and auto suggestions.")
11899 (license license:bsd-3)))
11900
11901 (define-public python2-prompt-toolkit
11902 (package-with-python2 python-prompt-toolkit))
11903
11904 (define-public python-jedi
11905 (package
11906 (name "python-jedi")
11907 (version "0.9.0")
11908 (source
11909 (origin
11910 (method url-fetch)
11911 (uri (pypi-uri "jedi" version))
11912 (sha256
11913 (base32
11914 "0c8x962ynpx001fdvp07m2q5jk4igkxbj3rmnydavphvlgxijk1v"))))
11915 (build-system python-build-system)
11916 (arguments
11917 ;; FIXME: One test fails (use "py.test" instead of 'setup.py test').
11918 '(#:tests? #f))
11919 (native-inputs
11920 `(("python-pytest" ,python-pytest)))
11921 (home-page "https://github.com/davidhalter/jedi")
11922 (synopsis
11923 "Autocompletion for Python that can be used for text editors")
11924 (description
11925 "Jedi is an autocompletion tool for Python that can be used for text editors.")
11926 (license license:expat)))
11927
11928 (define-public python2-jedi
11929 (package-with-python2 python-jedi))
11930
11931 (define-public ptpython
11932 (package
11933 (name "ptpython")
11934 (version "0.34")
11935 (source (origin
11936 (method url-fetch)
11937 (uri (pypi-uri "ptpython" version))
11938 (sha256
11939 (base32
11940 "1mmbiyzf0n8hm7z2a562x7w5cbl6jc0zsk6vp40q1z4cyblv1k13"))))
11941 (build-system python-build-system)
11942 (arguments
11943 '(#:tests? #f)) ; FIXME: No tests in pypi tarball.
11944 (propagated-inputs
11945 `(("python-docopt" ,python-docopt)
11946 ("python-jedi" ,python-jedi)
11947 ("python-prompt-toolkit" ,python-prompt-toolkit)
11948 ("python-pygments" ,python-pygments)))
11949 (home-page "https://github.com/jonathanslenders/ptpython")
11950 (synopsis "Python Read-Eval-Print-Loop with nice IDE-like features")
11951 (description
11952 "ptpython is a Python read-eval-print loop with IDE-like features.
11953 It supports syntax highlighting, multiline editing, autocompletion, mouse,
11954 color schemes, bracketed paste, Vi and Emacs keybindings, Chinese characters
11955 etc.")
11956 (license license:bsd-3)
11957 (properties `((python2-variant . ,(delay ptpython-2))))))
11958
11959 (define-public ptpython-2
11960 (let ((base (package-with-python2 (strip-python2-variant ptpython))))
11961 (package
11962 (inherit base)
11963 (name "ptpython2"))))
11964
11965 (define-public python-requests-oauthlib
11966 (package
11967 (name "python-requests-oauthlib")
11968 (version "0.6.2")
11969 (source
11970 (origin
11971 (method url-fetch)
11972 (uri (pypi-uri "requests-oauthlib" version))
11973 (sha256
11974 (base32
11975 "0ykff67sjcl227c23g0rxzfx34rr5bf21kwv0z3zmgk0lfmch7hn"))))
11976 (build-system python-build-system)
11977 (arguments
11978 `(#:phases
11979 (modify-phases %standard-phases
11980 ;; removes tests that require network access
11981 (add-before 'check 'pre-check
11982 (lambda _
11983 (delete-file "tests/test_core.py")
11984 #t)))))
11985 (native-inputs
11986 `(("python-requests-mock" ,python-requests-mock)
11987 ("python-mock" ,python-mock)))
11988 (propagated-inputs
11989 `(("python-oauthlib" ,python-oauthlib)
11990 ("python-requests" ,python-requests)))
11991 (home-page
11992 "https://github.com/requests/requests-oauthlib")
11993 (synopsis
11994 "OAuthlib authentication support for Requests")
11995 (description
11996 "Requests-OAuthlib uses the Python Requests and OAuthlib libraries to
11997 provide an easy-to-use Python interface for building OAuth1 and OAuth2 clients.")
11998 (license license:isc)))
11999
12000 (define-public python2-requests-oauthlib
12001 (package-with-python2 python-requests-oauthlib))
12002
12003 (define-public python-stem
12004 (package
12005 (name "python-stem")
12006 (version "1.5.4")
12007 (source
12008 (origin
12009 (method url-fetch)
12010 (uri (pypi-uri "stem" version))
12011 (sha256
12012 (base32
12013 "1j7pnblrn0yr6jmxvsq6y0ihmxmj5x50jl2n2606w67f6wq16j9n"))))
12014 (build-system python-build-system)
12015 (arguments
12016 `(#:phases
12017 (modify-phases %standard-phases
12018 (replace 'check
12019 (lambda _
12020 (zero? (system* "./run_tests.py" "--unit")))))))
12021 (native-inputs
12022 `(("python-mock" ,python-mock)
12023 ("python-pep8" ,python-pep8)
12024 ("python-pyflakes" ,python-pyflakes)))
12025 (home-page "https://stem.torproject.org/")
12026 (synopsis
12027 "Python controller library that allows applications to interact with Tor")
12028 (description
12029 "Stem is a Python controller library for Tor. With it you can use Tor's
12030 control protocol to script against the Tor process and read descriptor data
12031 relays publish about themselves.")
12032 (license license:lgpl3)))
12033
12034 (define-public python2-stem
12035 (package-with-python2 python-stem))
12036
12037 (define-public python-pyserial
12038 (package
12039 (name "python-pyserial")
12040 (version "3.1.1")
12041 (source
12042 (origin
12043 (method url-fetch)
12044 (uri (pypi-uri "pyserial" version))
12045 (sha256
12046 (base32
12047 "0k1nfdrxxkdlv4zgaqsdv8li0pj3gbh2pyxw8q2bsg6f9490amyn"))))
12048 (build-system python-build-system)
12049 (arguments
12050 '(#:tests? #f)) ; FIXME: 3/49 tests are failing.
12051 ;; #:phases
12052 ;; (modify-phases %standard-phases
12053 ;; (replace 'check
12054 ;; (lambda _
12055 ;; (zero? (system* "python" "test/run_all_tests.py" "loop://")))))))
12056 (home-page
12057 "https://github.com/pyserial/pyserial")
12058 (synopsis "Python Serial Port Bindings")
12059 (description "@code{pyserial} provide serial port bindings for Python. It
12060 supports different byte sizes, stop bits, parity and flow control with RTS/CTS
12061 and/or Xon/Xoff. The port is accessed in RAW mode.")
12062 (license license:bsd-3)))
12063
12064 (define-public python2-pyserial
12065 (package-with-python2 python-pyserial))
12066
12067 (define-public python-kivy
12068 (package
12069 (name "python-kivy")
12070 (version "1.9.1")
12071 (source
12072 (origin
12073 (method url-fetch)
12074 (uri (pypi-uri "kivy" version))
12075 (file-name (string-append name "-" version ".tar.gz"))
12076 (sha256
12077 (base32
12078 "0zk3g1j1z0lzcm9d0k1lprrs95zr8n8k5pdg3p5qlsn26jz4bg19"))))
12079 (build-system python-build-system)
12080 (arguments
12081 `(#:tests? #f ; Tests require many optional packages
12082 #:phases
12083 (modify-phases %standard-phases
12084 (replace 'build (lambda _ (zero? (system* "make" "force"))))
12085 (add-after 'patch-generated-file-shebangs 'set-sdl-paths
12086 (lambda* (#:key inputs #:allow-other-keys)
12087 (setenv "KIVY_SDL2_PATH"
12088 (string-append (assoc-ref inputs "sdl-union")
12089 "/include/SDL2"))
12090 #t)))))
12091 (native-inputs
12092 `(("pkg-config" ,pkg-config)
12093 ("python-cython" ,python-cython)))
12094 (inputs
12095 `(("gstreamer" ,gstreamer)
12096 ("mesa" ,mesa)
12097 ("sdl-union"
12098 ,(sdl-union (list sdl2 sdl2-image sdl2-mixer sdl2-ttf)))))
12099 (home-page "http://kivy.org")
12100 (synopsis
12101 "Multitouch application framework")
12102 (description
12103 "A software library for rapid development of
12104 hardware-accelerated multitouch applications.")
12105 (license license:expat)))
12106
12107 (define-public python2-kivy
12108 (package-with-python2 python-kivy))
12109
12110 (define-public python-kivy-next
12111 (let ((commit "a988c5e7a47da56263ff39514264a3de516ef2fe")
12112 (revision "1"))
12113 (package (inherit python-kivy)
12114 (name "python-kivy-next")
12115 (version (string-append "1.9.1-" revision "."
12116 (string-take commit 7)))
12117 (source
12118 (origin
12119 (method git-fetch)
12120 (uri (git-reference
12121 (url "https://github.com/kivy/kivy")
12122 (commit commit)))
12123 (file-name (string-append name "-" version "-checkout"))
12124 (sha256
12125 (base32
12126 "0jk92b4a8l7blkvkgkjihk171s0dfnq582cckff5srwc8kal5m0p")))))))
12127
12128 (define-public python2-kivy-next
12129 (package-with-python2 python-kivy-next))
12130
12131 (define-public python-binaryornot
12132 (package
12133 (name "python-binaryornot")
12134 (version "0.4.0")
12135 (source (origin
12136 (method url-fetch)
12137 (uri (pypi-uri "binaryornot" version))
12138 (sha256
12139 (base32
12140 "1j4f51dxic39mdwf6alj7gd769wy6mhk916v031wjali51xkh3xb"))))
12141 (build-system python-build-system)
12142 (propagated-inputs
12143 `(("python-chardet" ,python-chardet)
12144 ("python-hypothesis" ,python-hypothesis)))
12145 (home-page "https://github.com/audreyr/binaryornot")
12146 (synopsis "Package to check if a file is binary or text")
12147 (description "Ultra-lightweight pure Python package to check if a file is
12148 binary or text.")
12149 (license license:bsd-3)
12150 (properties `((python2-variant . ,(delay python2-binaryornot))))))
12151
12152 (define-public python2-binaryornot
12153 (let ((base (package-with-python2 (strip-python2-variant python-binaryornot))))
12154 (package (inherit base)
12155 (propagated-inputs
12156 `(("python2-enum34" ,python2-enum34)
12157 ,@(package-propagated-inputs base))))))
12158
12159 (define-public python-nltk
12160 (package
12161 (name "python-nltk")
12162 (version "3.2.1")
12163 (source (origin
12164 (method url-fetch)
12165 (uri (pypi-uri "nltk" version))
12166 (sha256
12167 (base32
12168 "0skxbhnymwlspjkzga0f7x1hg3y50fwpfghs8g8k7fh6f4nknlym"))))
12169 (build-system python-build-system)
12170 (arguments
12171 '(;; The tests require some extra resources to be downloaded.
12172 ;; TODO Try packaging these resources.
12173 #:tests? #f))
12174 (home-page "http://nltk.org/")
12175 (synopsis "Natural Language Toolkit")
12176 (description "It provides interfaces to over 50 corpora and lexical
12177 resources such as WordNet, along with a suite of text processing libraries
12178 for classification, tokenization, stemming, tagging, parsing, and semantic
12179 reasoning, wrappers for natural language processing libraries.")
12180 (license license:asl2.0)))
12181
12182 (define-public python2-nltk
12183 (package-with-python2 python-nltk))
12184
12185 (define-public python-pymongo
12186 (package
12187 (name "python-pymongo")
12188 (version "3.3.0")
12189 (source (origin
12190 (method url-fetch)
12191 (uri (pypi-uri "pymongo" version))
12192 (sha256
12193 (base32
12194 "07mra6w86wjqy4lx5fvimidjhhfzd562gfjn8grsnbv2q8pk0i9x"))))
12195 (build-system python-build-system)
12196 (propagated-inputs
12197 `(("python-certifi" ,python-certifi)))
12198 (home-page "https://github.com/mongodb/mongo-python-driver")
12199 (synopsis "Python driver for MongoDB")
12200 (description "Python driver for MongoDB.")
12201 (license license:asl2.0)))
12202
12203 (define-public python2-pymongo
12204 (package-with-python2 python-pymongo))
12205
12206 (define-public python-sh
12207 (package
12208 (name "python-sh")
12209 (version "1.11")
12210 (source (origin
12211 (method url-fetch)
12212 (uri (pypi-uri "sh" version))
12213 (sha256
12214 (base32
12215 "192r0mpv6dmkysjzhc43ddffiwb5g7c76bgr1mb1z2xz9awbj3sr"))))
12216 (build-system python-build-system)
12217 (arguments
12218 `(#:tests? #f)) ; no tests
12219 (home-page "https://github.com/amoffat/sh")
12220 (synopsis "Python subprocess interface")
12221 (description "Abstracts process invocation by providing a function
12222 interface for programs.")
12223 (license license:expat)))
12224
12225 (define-public python2-sh
12226 (package-with-python2 python-sh))
12227
12228 (define-public python-consul
12229 (package
12230 (name "python-consul")
12231 (version "0.6.1")
12232 (source
12233 (origin
12234 (method url-fetch)
12235 (uri (pypi-uri "python-consul" version))
12236 (sha256
12237 (base32
12238 "0rfyxcy4cr3x848vhx876ifalxd5ghq6l5x813m49h4vq2d4jiq8"))))
12239 (build-system python-build-system)
12240 (native-inputs
12241 `(("python-pytest" ,python-pytest)))
12242 (propagated-inputs
12243 `(("python-requests" ,python-requests)
12244 ("python-six" ,python-six)))
12245 (home-page "https://github.com/cablehead/python-consul")
12246 (synopsis "Python client for Consul")
12247 (description
12248 "Python client for @url{http://www.consul.io/,Consul}, a tool for service
12249 discovery, monitoring and configuration.")
12250 (license license:expat)))
12251
12252 (define-public python2-consul
12253 (package-with-python2 python-consul))
12254
12255 (define-public python-schematics
12256 (package
12257 (name "python-schematics")
12258 (version "1.1.1")
12259 (source
12260 (origin
12261 (method url-fetch)
12262 (uri (string-append
12263 "https://github.com/schematics/schematics/archive/v" version ".tar.gz"))
12264 (file-name (string-append name "-" version ".tar.gz"))
12265 (sha256
12266 (base32
12267 "19v1i69bf3bzarfxmbv0v6ivpcn758x3shvbiy9l2hy0lvqwnp6l"))))
12268 (build-system python-build-system)
12269 (propagated-inputs
12270 `(("python-six" ,python-six)))
12271 (arguments
12272 `(#:tests? #f)) ; requires a bunch of not very nice packages with fixed
12273 ; version requirements (eg python-coveralls)
12274 (home-page "https://github.com/schematics/schematics")
12275 (synopsis "Python Data Structures for Humans")
12276 (description "Python Data Structures for Humans.")
12277 (license license:bsd-3)))
12278
12279 (define-public python2-schematics
12280 (package-with-python2 python-schematics))
12281
12282 (define-public python-publicsuffix
12283 (package
12284 (name "python-publicsuffix")
12285 (version "1.1.0")
12286 (source (origin
12287 (method url-fetch)
12288 (uri (pypi-uri "publicsuffix" version))
12289 (sha256
12290 (base32
12291 "1adx520249z2cy7ykwjr1k190mn2888wqn9jf8qm27ly4qymjxxf"))))
12292 (build-system python-build-system)
12293 (arguments
12294 `(#:tests? #f)) ; tests use the internet
12295 (home-page "https://www.tablix.org/~avian/git/publicsuffix.git")
12296 (synopsis "Get suffix for a domain name")
12297 (description "Get a public suffix for a domain name using the Public Suffix
12298 List.")
12299 (license license:expat)))
12300
12301 (define-public python2-publicsuffix
12302 (package-with-python2 python-publicsuffix))
12303
12304 (define-public python-publicsuffix2
12305 (package
12306 (name "python-publicsuffix2")
12307 (version "2.20160818")
12308 (source
12309 (origin
12310 (method url-fetch)
12311 (uri (pypi-uri "publicsuffix2" version ".tar.bz2"))
12312 (sha256
12313 (base32
12314 "1bb55yka9vkn7i6y1kjzxa516kh6v4gsrxa90w5wdz5p5n968r68"))))
12315 (build-system python-build-system)
12316 (arguments
12317 '(#:tests? #f)) ; The test suite requires network access.
12318 (home-page "https://github.com/pombredanne/python-publicsuffix2")
12319 (synopsis "Get a public suffix for a domain name using the Public Suffix List")
12320 (description "Get a public suffix for a domain name using the Public Suffix
12321 List. Forked from and using the same API as the publicsuffix package.")
12322 (license (list license:expat license:mpl2.0))))
12323
12324 (define-public python2-publicsuffix2
12325 (package-with-python2 python-publicsuffix2))
12326
12327 (define-public python-url
12328 (package
12329 (name "python-url")
12330 (version "0.2.0")
12331 (source (origin
12332 (method url-fetch)
12333 (uri (pypi-uri "url" version))
12334 (sha256
12335 (base32
12336 "0v879yadcz9qxfl41ak6wkga1kimp9cflla9ddz03hjjvgkqy5ki"))))
12337 (build-system python-build-system)
12338 (propagated-inputs
12339 `(("python-publicsuffix" ,python-publicsuffix)))
12340 (native-inputs
12341 `(("python-coverage" ,python-coverage)
12342 ("python-nose" ,python-nose)))
12343 (arguments
12344 `(#:tests? #f)) ; FIXME: tests fail with "ImportError: No module named 'tests'"
12345 (home-page "https://github.com/seomoz/url-py")
12346 (synopsis "URL Parsing")
12347 (description "Library for parsing urls.")
12348 (license license:expat)
12349 (properties `((python2-variant . ,(delay python2-url))))))
12350
12351 (define-public python2-url
12352 (let ((base (package-with-python2 (strip-python2-variant python-url))))
12353 (package (inherit base)
12354 (propagated-inputs
12355 `(("python2-publicsuffix" ,python2-publicsuffix))))))
12356
12357 (define-public python-freezegun
12358 (package
12359 (name "python-freezegun")
12360 (version "0.3.8")
12361 (source
12362 (origin
12363 (method url-fetch)
12364 (uri (pypi-uri "freezegun" version))
12365 (sha256
12366 (base32
12367 "1sf38d3ibv1jhhvr52x7dhrsiyqk1hm165dfv8w8wh0fhmgxg151"))))
12368 (build-system python-build-system)
12369 (native-inputs
12370 `(("python-mock" ,python-mock)
12371 ("python-nose" ,python-nose)
12372 ("python-coverage" ,python-coverage)))
12373 (propagated-inputs
12374 `(("python-six" ,python-six)
12375 ("python-dateutil" ,python-dateutil)))
12376 (arguments
12377 `(#:phases (modify-phases %standard-phases
12378 ;; The tests are normally executed via `make test`, but the PyPi
12379 ;; package does not include the Makefile.
12380 (replace 'check
12381 (lambda _
12382 (zero? (system* "nosetests" "./tests/")))))))
12383 (home-page "https://github.com/spulec/freezegun")
12384 (synopsis "Test utility for mocking the datetime module")
12385 (description
12386 "FreezeGun is a library that allows your python tests to travel through
12387 time by mocking the datetime module.")
12388 (license license:asl2.0)))
12389
12390 (define-public python2-freezegun
12391 (package-with-python2 python-freezegun))
12392
12393
12394 (define-public python-odfpy
12395 (package
12396 (name "python-odfpy")
12397 (version "1.3.3")
12398 (source (origin
12399 (method url-fetch)
12400 (uri (pypi-uri "odfpy" version))
12401 (sha256
12402 (base32
12403 "1a6ms0w9zfhhkqhvrnynwwbxrivw6hgjc0s5k7j06npc7rq0blxw"))))
12404 (arguments
12405 `(#:modules ((srfi srfi-1)
12406 (guix build python-build-system)
12407 (guix build utils))
12408 #:phases
12409 (modify-phases %standard-phases
12410 (replace 'check
12411 ;; The test runner invokes python2 and python3 for test*.py.
12412 ;; To avoid having both in inputs, we replicate it here.
12413 (lambda _
12414 (every (lambda (test-file)
12415 (zero? (system* "python" test-file)))
12416 (find-files "tests" "^test.*\\.py$")))))))
12417 (build-system python-build-system)
12418 (home-page "https://github.com/eea/odfpy")
12419 (synopsis "Python API and tools to manipulate OpenDocument files")
12420 (description "Collection of libraries and utility programs written in
12421 Python to manipulate OpenDocument 1.2 files.")
12422 (license
12423 ;; The software is mainly dual GPL2+ and ASL2.0, but includes a
12424 ;; number of files with other licenses.
12425 (list license:gpl2+ license:asl2.0 license:lgpl2.1+ license:cc-by-sa3.0))))
12426
12427 (define-public python2-odfpy
12428 (package-with-python2 python-odfpy))
12429
12430 (define-public python-cachecontrol
12431 (package
12432 (name "python-cachecontrol")
12433 (version "0.11.6")
12434 (source
12435 (origin
12436 (method url-fetch)
12437 ;; Pypi does not have tests.
12438 (uri (string-append
12439 "https://github.com/ionrock/cachecontrol/archive/v"
12440 version ".tar.gz"))
12441 (file-name (string-append name "-" version ".tar.gz"))
12442 (sha256
12443 (base32
12444 "0yj60d0f69a2l8p7y86k4zhzzm6rnxpq74sfl240pry9l0lfw2vw"))))
12445 (build-system python-build-system)
12446 (arguments
12447 `(#:phases
12448 (modify-phases %standard-phases
12449 (replace 'check
12450 (lambda _
12451 ;; Drop test that requires internet access.
12452 (delete-file "tests/test_regressions.py")
12453 (setenv "PYTHONPATH"
12454 (string-append (getcwd) "/build/lib:"
12455 (getenv "PYTHONPATH")))
12456 (zero? (system* "py.test" "-vv")))))))
12457 (native-inputs
12458 `(("python-pytest" ,python-pytest)
12459 ("python-redis" ,python-redis)
12460 ("python-webtest" ,python-webtest)
12461 ("python-mock" ,python-mock)))
12462 (propagated-inputs
12463 `(("python-requests" ,python-requests)
12464 ("python-lockfile" ,python-lockfile)))
12465 (home-page "https://github.com/ionrock/cachecontrol")
12466 (synopsis "The httplib2 caching algorithms for use with requests")
12467 (description "CacheControl is a port of the caching algorithms in
12468 @code{httplib2} for use with @code{requests} session objects.")
12469 (license license:asl2.0)))
12470
12471 (define-public python2-cachecontrol
12472 (package-with-python2 python-cachecontrol))
12473
12474 (define-public python-lit
12475 (package
12476 (name "python-lit")
12477 (version "0.5.0")
12478 (source
12479 (origin
12480 (method url-fetch)
12481 (uri (pypi-uri "lit" version))
12482 (sha256
12483 (base32
12484 "135m2b9cwih85g66rjggavck328z7lj37srgpq3jxszbg0g2b91y"))))
12485 (build-system python-build-system)
12486 (home-page "http://llvm.org/")
12487 (synopsis "LLVM Software Testing Tool")
12488 (description "@code{lit} is a portable tool for executing LLVM and Clang
12489 style test suites, summarizing their results, and providing indication of
12490 failures.")
12491 (license license:ncsa)))
12492
12493 (define-public python2-lit
12494 (package-with-python2 python-lit))
12495
12496 (define-public python-pytest-pep8
12497 (package
12498 (name "python-pytest-pep8")
12499 (version "1.0.6")
12500 (source (origin
12501 (method url-fetch)
12502 (uri (pypi-uri "pytest-pep8" version))
12503 (sha256
12504 (base32
12505 "06032agzhw1i9d9qlhfblnl3dw5hcyxhagn7b120zhrszbjzfbh3"))))
12506 (build-system python-build-system)
12507 (arguments
12508 `(#:tests? #f)) ; Fails with recent pytest and pep8. See upstream issues #8 and #12.
12509 (native-inputs
12510 `(("python-pytest" ,python-pytest)))
12511 (propagated-inputs
12512 `(("python-pep8" ,python-pep8)))
12513 (home-page "https://bitbucket.org/pytest-dev/pytest-pep8")
12514 (synopsis "Py.test plugin to check PEP8 requirements")
12515 (description "Pytest plugin for checking PEP8 compliance.")
12516 (license license:expat)))
12517
12518 (define-public python2-pytest-pep8
12519 (package-with-python2 python-pytest-pep8))
12520
12521 (define-public python-pytest-flakes
12522 (package
12523 (name "python-pytest-flakes")
12524 (version "1.0.1")
12525 (source (origin
12526 (method url-fetch)
12527 (uri (pypi-uri "pytest-flakes" version))
12528 (sha256
12529 (base32
12530 "0flag3n33kbhyjrhzmq990rvg4yb8hhhl0i48q9hw0ll89jp28lw"))))
12531 (build-system python-build-system)
12532 (arguments
12533 `(#:phases
12534 (modify-phases %standard-phases
12535 (delete 'check)
12536 (add-after 'install 'check
12537 (lambda* (#:key outputs inputs #:allow-other-keys)
12538 ;; It's easier to run tests after install.
12539 ;; Make installed package available for running the tests
12540 (add-installed-pythonpath inputs outputs)
12541 (zero? (system* "py.test" "-vv")))))))
12542 (native-inputs
12543 `(("python-coverage" ,python-coverage)
12544 ("python-pytest" ,python-pytest)
12545 ("python-pytest-cache" ,python-pytest-cache)
12546 ("python-pytest-pep8" ,python-pytest-pep8)))
12547 (propagated-inputs
12548 `(("python-pyflakes" ,python-pyflakes)))
12549 (home-page "https://github.com/fschulze/pytest-flakes")
12550 (synopsis "Py.test plugin to check source code with pyflakes")
12551 (description "Pytest plugin for checking Python source code with pyflakes.")
12552 (license license:expat)))
12553
12554 (define-public python2-pytest-flakes
12555 (package-with-python2 python-pytest-flakes))
12556
12557 (define-public python-natsort
12558 (package
12559 (name "python-natsort")
12560 (version "5.0.2")
12561 (source (origin
12562 (method url-fetch)
12563 (uri (pypi-uri "natsort" version))
12564 (sha256
12565 (base32
12566 "0bh6j0l8iapjnsgg3bs6q075cnzjl6zw1vlgqyv3qrygm2cxypkn"))))
12567 (build-system python-build-system)
12568 (arguments
12569 `(#:phases
12570 (modify-phases %standard-phases
12571 (add-before 'check 'set-cachedir
12572 ;; Tests require write access to $HOME by default
12573 (lambda _ (setenv "PYTHON_EGG_CACHE" "/tmp") #t)))))
12574 (native-inputs
12575 `(("python-hypothesis" ,python-hypothesis)
12576 ("python-pytest-cache" ,python-pytest-cache)
12577 ("python-pytest-cov" ,python-pytest-cov)
12578 ("python-pytest-flakes" ,python-pytest-flakes)
12579 ("python-pytest-pep8" ,python-pytest-pep8)))
12580 (propagated-inputs ; TODO: Add python-fastnumbers.
12581 `(("python-pyicu" ,python-pyicu)))
12582 (home-page "https://github.com/SethMMorton/natsort")
12583 (synopsis "Natural sorting for python and shell")
12584 (description
12585 "Natsort lets you apply natural sorting on lists instead of
12586 lexicographical. If you use the built-in @code{sorted} method in python
12587 on a list such as @code{['a20', 'a9', 'a1', 'a4', 'a10']}, it would be
12588 returned as @code{['a1', 'a10', 'a20', 'a4', 'a9']}. Natsort provides a
12589 function @code{natsorted} that identifies numbers and sorts them separately
12590 from strings. It can also sort version numbers, real numbers, mixed types
12591 and more, and comes with a shell command @command{natsort} that exposes this
12592 functionality in the command line.")
12593 (license license:expat)
12594 (properties `((python2-variant . ,(delay python2-natsort))))))
12595
12596 (define-public python2-natsort
12597 (let ((base (package-with-python2 (strip-python2-variant python-natsort))))
12598 (package (inherit base)
12599 (native-inputs
12600 `(("python2-pathlib" ,python2-pathlib)
12601 ("python2-mock" ,python2-mock)
12602 ("python2-enum34" ,python2-enum34)
12603 ,@(package-native-inputs base))))))
12604
12605 (define-public python-glances
12606 (package
12607 (name "python-glances")
12608 (version "2.7.1")
12609 (source
12610 (origin
12611 (method url-fetch)
12612 (uri (pypi-uri "Glances" version))
12613 (sha256
12614 (base32
12615 "11jbq40g8alsbirnd4kiagznqg270247i0m8qhi48ldf2i5xppxg"))))
12616 (build-system python-build-system)
12617 (propagated-inputs
12618 `(("python-psutil" ,python-psutil)))
12619 (home-page
12620 "https://github.com/nicolargo/glances")
12621 (synopsis
12622 "A cross-platform curses-based monitoring tool")
12623 (description
12624 "Glances is a curses-based monitoring tool for a wide variety of platforms.
12625 Glances uses the PsUtil library to get information from your system. It monitors
12626 CPU, load, memory, network bandwidth, disk I/O, disk use, and more.")
12627 (license license:lgpl3+)))
12628
12629 (define-public python2-glances
12630 (package-with-python2 python-glances))
12631
12632 (define-public python-graphql-core
12633 (package
12634 (name "python-graphql-core")
12635 (version "0.5.3")
12636 (source
12637 (origin
12638 (method url-fetch)
12639 (uri (pypi-uri "graphql-core" version))
12640 (sha256
12641 (base32
12642 "0rsaarx2sj4xnw9966rhh4haiqaapm4lm2mfqm48ywd51j5vh1a0"))))
12643 (build-system python-build-system)
12644 (arguments
12645 `(#:tests? #f ; Tests require the unpackaged pytest-benchmark.
12646 #:phases
12647 (modify-phases %standard-phases
12648 (add-after 'unpack 'patch-hardcoded-version
12649 (lambda _ (substitute*
12650 "setup.py"
12651 (("'gevent==1.1rc1'") "'gevent'"))
12652 #t)))))
12653 (native-inputs
12654 `(("python-gevent" ,python-gevent)
12655 ("python-mock" ,python-mock)
12656 ("python-pytest-mock" ,python-pytest-mock)))
12657 (propagated-inputs
12658 `(("python-promise" ,python-promise)
12659 ("python-six" ,python-six)))
12660 (home-page "https://github.com/graphql-python/graphql-core")
12661 (synopsis "GraphQL implementation for Python")
12662 (description
12663 "GraphQL implementation for Python. GraphQL is a data query language and
12664 runtime designed and used to request and deliver data to mobile and web apps.
12665 This library is a port of @url{https://github.com/graphql/graphql-js,graphql-js}
12666 to Python.")
12667 (license license:expat)))
12668
12669 (define-public python2-graphql-core
12670 (package-with-python2 python-graphql-core))
12671
12672 (define-public python-graphql-relay
12673 (package
12674 (name "python-graphql-relay")
12675 (version "0.4.5")
12676 (source
12677 (origin
12678 (method url-fetch)
12679 (uri (pypi-uri "graphql-relay" version))
12680 (sha256
12681 (base32
12682 "1nv5dxcj59zv31qvl8bd142njmxcmymny2dz3br1l2cpbljbf5i7"))))
12683 (build-system python-build-system)
12684 (native-inputs
12685 `(("python-pytest" ,python-pytest)))
12686 (propagated-inputs
12687 `(("python-graphql-core" ,python-graphql-core)
12688 ("python-promise" ,python-promise)
12689 ("python-six" ,python-six)))
12690 (home-page "https://github.com/graphql-python/graphql-relay-py")
12691 (synopsis "Relay implementation for Python")
12692 (description
12693 "This is a library to allow the easy creation of Relay-compliant servers
12694 using the GraphQL Python reference implementation of a GraphQL server. It
12695 should be noted that the code is a exact port of the original
12696 @url{https://github.com/graphql/graphql-relay-js,graphql-relay js implementation}
12697 from Facebook.")
12698 (license license:expat)))
12699
12700 (define-public python2-graphql-relay
12701 (package-with-python2 python-graphql-relay))
12702
12703 (define-public python-graphene
12704 (package
12705 (name "python-graphene")
12706 (version "0.10.2")
12707 (source
12708 (origin
12709 (method url-fetch)
12710 (uri (pypi-uri "graphene" version))
12711 (sha256
12712 (base32
12713 "09zhac7igh9ixdz0ay6csy35b40l1jwbf2wrbxmgxwfhy51iy06q"))))
12714 (build-system python-build-system)
12715 (native-inputs
12716 `(("python-django-filter" ,python-django-filter)
12717 ("python-mock" ,python-mock)
12718 ("python-psycopg2" ,python-psycopg2)
12719 ("python-pytest-django" ,python-pytest-django)
12720 ("python-sqlalchemy-utils" ,python-sqlalchemy-utils)))
12721 (propagated-inputs
12722 `(("python-graphql-core" ,python-graphql-core)
12723 ("python-graphql-relay" ,python-graphql-relay)
12724 ("python-iso8601" ,python-iso8601)
12725 ("python-promise" ,python-promise)
12726 ("python-six" ,python-six)))
12727 (home-page "http://graphene-python.org/")
12728 (synopsis "GraphQL Framework for Python")
12729 (description
12730 "Graphene is a Python library for building GraphQL schemas/types.
12731 A GraphQL schema describes your data model, and provides a GraphQL server
12732 with an associated set of resolve methods that know how to fetch data.")
12733 (properties `((python2-variant . ,(delay python2-graphene))))
12734 (license license:expat)))
12735
12736 (define-public python2-graphene
12737 (let ((base (package-with-python2
12738 (strip-python2-variant python-graphene))))
12739 (package (inherit base)
12740 (native-inputs
12741 `(("python2-sqlalchemy" ,python2-sqlalchemy)
12742 ,@(package-native-inputs base))))))
12743
12744 (define-public python-nautilus
12745 (package
12746 (name "python-nautilus")
12747 (version "0.4.9")
12748 (source
12749 (origin
12750 (method url-fetch)
12751 (uri (pypi-uri "nautilus" version))
12752 (sha256
12753 (base32
12754 "01hwzjc1zshk4vvxrcghm398fpy4jls66dyz06g07mrwqif8878p"))))
12755 (build-system python-build-system)
12756 (arguments `(#:tests? #f)) ; fails to import test modules
12757 (propagated-inputs
12758 `(("python-bcrypt" ,python-bcrypt)
12759 ("python-click" ,python-click)
12760 ("python-consul" ,python-consul)
12761 ("python-graphene" ,python-graphene)
12762 ("python-jinja2" ,python-jinja2)
12763 ("python-peewee" ,python-peewee)
12764 ("python-pika" ,python-pika)
12765 ("python-tornado" ,python-tornado)
12766 ("python-wtforms" ,python-wtforms)))
12767 (native-inputs
12768 `(("python-nose2" ,python-nose2)))
12769 (home-page "https://github.com/AlecAivazis/nautilus")
12770 (synopsis "Library for creating microservice applications")
12771 (description
12772 "Nautilus is a framework for flux based microservices that looks to
12773 provide extendible implementations of common aspects of a cloud so that you can
12774 focus on building massively scalable web applications.")
12775 (license license:expat)))
12776
12777 (define-public python-snowballstemmer
12778 (package
12779 (name "python-snowballstemmer")
12780 (version "1.2.1")
12781 (source (origin
12782 (method url-fetch)
12783 (uri (pypi-uri "snowballstemmer" version))
12784 (sha256
12785 (base32
12786 "0a0idq4y5frv7qsg2x62jd7rd272749xk4x99misf5rcifk2d7wi"))))
12787 (build-system python-build-system)
12788 (arguments
12789 `(;; No tests exist
12790 #:tests? #f))
12791 (home-page "https://github.com/shibukawa/snowball_py")
12792 (synopsis "Snowball stemming library collection for Python")
12793 (description "This package provides 16 word stemmer algorithms generated
12794 from Snowball algorithms. It includes the 15 original ones plus the Poerter
12795 English stemmer.")
12796 (license license:bsd-3)))
12797
12798 (define-public python2-snowballstemmer
12799 (package-with-python2 python-snowballstemmer))
12800
12801 (define-public python-sphinx-cloud-sptheme
12802 (package
12803 (name "python-sphinx-cloud-sptheme")
12804 (version "1.8.0")
12805 (source (origin
12806 (method url-fetch)
12807 (uri (pypi-uri "cloud_sptheme" version))
12808 (sha256
12809 (base32
12810 "1dniqb6a39yh786f86c4jn666rwnyi1jvzn4616zhcchb7sfdshd"))))
12811 (build-system python-build-system)
12812 ;; FIXME: The 'pypi' release archive does not contain tests.
12813 (arguments '(#:tests? #f))
12814 (native-inputs
12815 `(("python-sphinx" ,python-sphinx)))
12816 (home-page "https://bitbucket.org/ecollins/cloud_sptheme")
12817 (synopsis "'Cloud' theme for Sphinx documenter")
12818 (description "This package contains the \"Cloud\" theme for Sphinx and some
12819 related extensions.")
12820 (license license:bsd-3)))
12821
12822 (define-public python2-sphinx-cloud-sptheme
12823 (package-with-python2 python-sphinx-cloud-sptheme))
12824
12825 (define-public python-sphinx-alabaster-theme
12826 (package
12827 (name "python-sphinx-alabaster-theme")
12828 (version "0.7.9")
12829 (source (origin
12830 (method url-fetch)
12831 (uri (pypi-uri "alabaster" version))
12832 (sha256
12833 (base32
12834 "027anxzcb951gjlcc43y3rbn9qrw36d16vj9wd2smv5410xx9bs7"))))
12835 (build-system python-build-system)
12836 (propagated-inputs
12837 `(("python-pygments" ,python-pygments)))
12838 (home-page "https://alabaster.readthedocs.io/")
12839 (synopsis "Configurable sidebar-enabled Sphinx theme")
12840 (description "Alabaster is a visually (c)lean, responsive, configurable
12841 theme for the Sphinx documentation system. It's the default theme of Sphinx.")
12842 (license license:bsd-3)))
12843
12844 (define-public python2-sphinx-alabaster-theme
12845 (package-with-python2 python-sphinx-alabaster-theme))
12846
12847 (define-public python-betamax
12848 (package
12849 (name "python-betamax")
12850 (version "0.8.0")
12851 (source
12852 (origin
12853 (method url-fetch)
12854 (uri (pypi-uri "betamax" version))
12855 (sha256
12856 (base32
12857 "18f8v5gng3j773jlbbzx4rg1i4y2zw3m2l1zpmbvp8bh5a2q1i42"))))
12858 (build-system python-build-system)
12859 (arguments
12860 '(;; Many tests fail because they require networking.
12861 #:tests? #f))
12862 (propagated-inputs
12863 `(("python-requests" ,python-requests)))
12864 (home-page "https://github.com/sigmavirus24/betamax")
12865 (synopsis "Record HTTP interactions with python-requests")
12866 (description "Betamax will record your test suite's HTTP interactions and
12867 replay them during future tests. It is designed to work with python-requests.")
12868 (license license:expat)))
12869
12870 (define-public python2-betamax
12871 (package-with-python2 python-betamax))
12872
12873 (define-public python-s3transfer
12874 (package
12875 (name "python-s3transfer")
12876 (version "0.1.10")
12877 (source (origin
12878 (method url-fetch)
12879 (uri (pypi-uri "s3transfer" version))
12880 (sha256
12881 (base32
12882 "1h8g9bknvxflxkpbnxyfxmk8pvgykbbk9ljdvhqh6z4vjc2926ms"))))
12883 (build-system python-build-system)
12884 (arguments
12885 `(#:phases
12886 (modify-phases %standard-phases
12887 (replace 'check
12888 (lambda _
12889 ;; 7 of the 'integration' tests require network access or login
12890 ;; credentials.
12891 (zero? (system* "nosetests" "--exclude=integration")))))))
12892 (native-inputs
12893 `(("python-docutils" ,python-docutils)
12894 ("python-mock" ,python-mock)
12895 ("python-nose" ,python-nose)))
12896 (propagated-inputs
12897 `(("python-botocore" ,python-botocore)))
12898 (synopsis "Amazon S3 Transfer Manager")
12899 (description "S3transfer is a Python library for managing Amazon S3
12900 transfers.")
12901 (home-page "https://github.com/boto/s3transfer")
12902 (license license:asl2.0)
12903 (properties `((python2-variant . ,(delay python2-s3transfer))))))
12904
12905 (define-public python2-s3transfer
12906 (let ((base (package-with-python2 (strip-python2-variant python-s3transfer))))
12907 (package
12908 (inherit base)
12909 (native-inputs
12910 `(("python2-futures" ,python2-futures)
12911 ,@(package-native-inputs base))))))
12912
12913 (define-public python-setproctitle
12914 (package
12915 (name "python-setproctitle")
12916 (version "1.1.10")
12917 (source
12918 (origin
12919 (method url-fetch)
12920 (uri (pypi-uri "setproctitle" version))
12921 (sha256
12922 (base32
12923 "163kplw9dcrw0lffq1bvli5yws3rngpnvrxrzdw89pbphjjvg0v2"))))
12924 (build-system python-build-system)
12925 (arguments
12926 '(#:phases
12927 (modify-phases %standard-phases
12928 (add-before 'check 'patch-Makefile
12929 ;; Stricly this is only required for the python2 variant.
12930 ;; But adding a phase in an inherited package seems to be
12931 ;; cumbersum. So we patch even for python3.
12932 (lambda _
12933 (let ((nose (assoc-ref %build-inputs "python2-nose")))
12934 (when nose
12935 (substitute* "Makefile"
12936 (("\\$\\(PYTHON\\) [^ ]which nosetests[^ ] ")
12937 (string-append nose "/bin/nosetests "))))
12938 #t)))
12939 (replace 'check
12940 (lambda _
12941 (setenv "PYTHON" (or (which "python3") (which "python")))
12942 (setenv "PYCONFIG" (or (which "python3-config")
12943 (which "python-config")))
12944 (setenv "CC" "gcc")
12945 ;; No need to extend PYTHONPATH to find the built package, since
12946 ;; the Makefile will build anyway
12947 (zero? (system* "make" "check")))))))
12948 (native-inputs
12949 `(("procps" ,procps))) ; required for tests
12950 (home-page
12951 "https://github.com/dvarrazzo/py-setproctitle")
12952 (synopsis
12953 "Setproctitle implementation for Python to customize the process title")
12954 (description "The library allows a process to change its title (as displayed
12955 by system tools such as ps and top).
12956
12957 Changing the title is mostly useful in multi-process systems, for
12958 example when a master process is forked: changing the children's title
12959 allows to identify the task each process is busy with. The technique
12960 is used by PostgreSQL and the OpenSSH Server for example.")
12961 (license license:bsd-3)
12962 (properties `((python2-variant . ,(delay python2-setproctitle))))))
12963
12964 (define-public python2-setproctitle
12965 (let ((base (package-with-python2
12966 (strip-python2-variant python-setproctitle))))
12967 (package
12968 (inherit base)
12969 (native-inputs `(("python2-nose" ,python2-nose)
12970 ,@(package-native-inputs base))))))
12971
12972 (define-public python-validictory
12973 (package
12974 (name "python-validictory")
12975 (version "1.0.1")
12976 (source
12977 (origin
12978 (method url-fetch)
12979 (uri (pypi-uri "validictory" version))
12980 (sha256
12981 (base32
12982 "1zf1g9sw47xzp5f80bd94pb42j9yqv82lcrgcvdwr6nkaphfi37q"))))
12983 (build-system python-build-system)
12984 (arguments
12985 '(#:phases
12986 (modify-phases %standard-phases
12987 (add-after 'unpack 'bootstrap
12988 ;; Move the tests out of the package directory to avoid
12989 ;; packaging them.
12990 (lambda* _
12991 (rename-file "validictory/tests" "tests")
12992 (delete-file "tests/__init__.py")))
12993 (replace 'check
12994 (lambda _
12995 ;; Extend PYTHONPATH so the built package will be found.
12996 (setenv "PYTHONPATH"
12997 (string-append (getcwd) "/build/lib:"
12998 (getenv "PYTHONPATH")))
12999 (zero? (system* "py.test" "-vv" )))))))
13000 (native-inputs
13001 `(("python-pytest" ,python-pytest)))
13002 (home-page
13003 "https://github.com/jamesturk/validictory")
13004 (synopsis "General purpose Python data validator")
13005 (description "It allows validation of arbitrary Python data structures.
13006
13007 The schema format is based on the JSON Schema
13008 proposal (http://json-schema.org), so combined with json the library is also
13009 useful as a validator for JSON data.")
13010 (license license:expat)))
13011
13012 (define-public python2-validictory
13013 (package-with-python2 python-validictory))
13014
13015 (define-public python-aniso8601
13016 (package
13017 (name "python-aniso8601")
13018 (version "1.1.0")
13019 (source
13020 (origin
13021 (method url-fetch)
13022 (uri (pypi-uri "aniso8601" version))
13023 (sha256
13024 (base32
13025 "1k5mjg9iqbjfslb5prrsfz7dhlvi6s35p1jxq8dm87w1b7dn5i2g"))))
13026 (build-system python-build-system)
13027 (propagated-inputs
13028 `(("python-dateutil" ,python-dateutil)))
13029 (home-page
13030 "https://bitbucket.org/nielsenb/aniso8601")
13031 (synopsis
13032 "Python library for parsing ISO 8601 strings")
13033 (description
13034 "This package contains a library for parsing ISO 8601 datetime strings.")
13035 (license license:bsd-3)))
13036
13037 (define-public python-flask-restful
13038 (package
13039 (name "python-flask-restful")
13040 (version "0.3.5")
13041 (source
13042 (origin
13043 (method url-fetch)
13044 (uri (pypi-uri "Flask-RESTful" version))
13045 (sha256
13046 (base32
13047 "0hjcmdb56b7z4bkw848lxfkyrpnkwzmqn2dgnlv12mwvjpzsxr6c"))))
13048 (build-system python-build-system)
13049 (propagated-inputs
13050 `(("python-aniso8601" ,python-aniso8601)
13051 ("python-flask" ,python-flask)
13052 ("python-pycrypto" ,python-pycrypto)
13053 ("python-pytz" ,python-pytz)))
13054 (native-inputs
13055 `(;; Optional dependency of Flask. Tests need it.
13056 ("python-blinker" ,python-blinker)
13057 ("python-mock" ,python-mock) ; For tests
13058 ("python-nose" ,python-nose) ; For tests
13059 ("python-sphinx" ,python-sphinx)))
13060 (home-page
13061 "https://www.github.com/flask-restful/flask-restful/")
13062 (synopsis
13063 "Flask module for creating REST APIs")
13064 (description
13065 "This package contains a Flask module for creating REST APIs.")
13066 (license license:bsd-3)))
13067
13068 (define-public python-flask-basicauth
13069 (package
13070 (name "python-flask-basicauth")
13071 (version "0.2.0")
13072 (source
13073 (origin
13074 (method url-fetch)
13075 (uri (pypi-uri "Flask-BasicAuth" version))
13076 (sha256
13077 (base32
13078 "1zq1spkjr4sjdnalpp8wl242kdqyk6fhbnhr8hi4r4f0km4bspnz"))))
13079 (build-system python-build-system)
13080 (propagated-inputs
13081 `(("python-flask" ,python-flask)))
13082 (home-page
13083 "https://github.com/jpvanhal/flask-basicauth")
13084 (synopsis
13085 "HTTP basic access authentication for Flask")
13086 (description
13087 "This package provides HTTP basic access authentication for Flask.")
13088 (license license:bsd-3)))
13089
13090 (define-public python-flask-sqlalchemy
13091 (package
13092 (name "python-flask-sqlalchemy")
13093 (version "2.1")
13094 (source
13095 (origin
13096 (method url-fetch)
13097 (uri (pypi-uri "Flask-SQLAlchemy" version))
13098 (sha256
13099 (base32
13100 "1i9ps5d5snih9xlqhrvmi3qfiygkmqzxh92n25kj4pf89kj4s965"))))
13101 (build-system python-build-system)
13102 (propagated-inputs
13103 `(("python-flask" ,python-flask)
13104 ("python-sqlalchemy" ,python-sqlalchemy)))
13105 (home-page
13106 "https://github.com/mitsuhiko/flask-sqlalchemy")
13107 (synopsis
13108 "Module adding SQLAlchemy support to your Flask application")
13109 (description
13110 "This package adds SQLAlchemy support to your Flask application.")
13111 (license license:bsd-3)))
13112
13113 (define-public python-pyev
13114 (package
13115 (name "python-pyev")
13116 (version "0.9.0")
13117 (source
13118 (origin
13119 (method url-fetch)
13120 (uri (pypi-uri "pyev" version))
13121 (sha256
13122 (base32
13123 "0rf603lc0s6zpa1nb25vhd8g4y337wg2wyz56i0agsdh7jchl0sx"))))
13124 (build-system python-build-system)
13125 (arguments
13126 `(#:tests? #f ; no test suite
13127 #:phases
13128 (modify-phases %standard-phases
13129 (add-after 'unpack 'patch
13130 (lambda* (#:key inputs #:allow-other-keys)
13131 (let ((libev (string-append (assoc-ref inputs "libev")
13132 "/lib/libev.so.4")))
13133 (substitute* "setup.py"
13134 (("libev_dll_name = find_library\\(\\\"ev\\\"\\)")
13135 (string-append "libev_dll_name = \"" libev "\"")))))))))
13136 (inputs
13137 `(("libev" ,libev)))
13138 (home-page "http://pythonhosted.org/pyev/")
13139 (synopsis "Python libev interface")
13140 (description "Pyev provides a Python interface to libev.")
13141 (license license:gpl3)))
13142
13143 (define-public python2-pyev
13144 (package-with-python2 python-pyev))
13145
13146 (define-public python-imagesize
13147 (package
13148 (name "python-imagesize")
13149 (version "0.7.1")
13150 (source
13151 (origin
13152 (method url-fetch)
13153 (uri (pypi-uri "imagesize" version))
13154 (sha256
13155 (base32
13156 "0qk07k0z4241lkzzjji7z4da04pcvg7bfc4xz1934zlqhwmwdcha"))))
13157 (build-system python-build-system)
13158 (arguments
13159 '(;; Test files are not distributed on PyPi:
13160 ;; https://github.com/shibukawa/imagesize_py/issues/7
13161 #:tests? #f))
13162 (home-page "https://github.com/shibukawa/imagesize_py")
13163 (synopsis "Gets image size of files in variaous formats in Python")
13164 (description
13165 "This package allows determination of image size from
13166 PNG, JPEG, JPEG2000 and GIF files in pure Python.")
13167 (license license:expat)))
13168
13169 (define-public python2-imagesize
13170 (package-with-python2 python-imagesize))
13171
13172 (define-public python-axolotl-curve25519
13173 (package
13174 (name "python-axolotl-curve25519")
13175 (version "0.1")
13176 (source
13177 (origin
13178 (method git-fetch)
13179 (uri (git-reference
13180 (url "git://github.com/tgalal/python-axolotl-curve25519")
13181 (commit "e4a9c4de0eae27223200579c58d1f8f6d20637e2")))
13182 (file-name (string-append name "-" version "-checkout"))
13183 (sha256
13184 (base32
13185 "0agap5q0hmvf6cwzjqc05kw53pjgf6942pcivpazksmg1vk400ra"))))
13186 (build-system python-build-system)
13187 (arguments
13188 `(;; Prevent creation of the egg. This works around
13189 ;; https://debbugs.gnu.org/cgi/bugreport.cgi?bug=20765
13190 #:configure-flags '("--root=/")))
13191 (home-page "https://github.com/tgalal/python-axolotl-curve25519")
13192 (synopsis "Python wrapper for curve25519 library")
13193 (description "This is a python wrapper for the curve25519 library
13194 with ed25519 signatures. The C code was pulled from
13195 libaxolotl-android. At the moment this wrapper is meant for use by
13196 python-axolotl.")
13197 (license (list license:gpl3 ; Most files
13198 license:bsd-3)))) ; curve/curve25519-donna.c
13199
13200 (define-public python2-axolotl-curve25519
13201 (package-with-python2 python-axolotl-curve25519))
13202
13203 (define-public python-axolotl
13204 (package
13205 (name "python-axolotl")
13206 (version "0.1.35")
13207 (source
13208 (origin
13209 (method url-fetch)
13210 (uri (string-append
13211 "https://github.com/tgalal/python-axolotl/archive/"
13212 version ".tar.gz"))
13213 (file-name (string-append name "-" version ".tar.gz"))
13214 (sha256
13215 (base32 "1z8d89p7v40p4bwywjm9h4z28fdvra79ddw06azlkrfjbl7dxmz8"))))
13216 (build-system python-build-system)
13217 (arguments
13218 `(#:phases
13219 (modify-phases %standard-phases
13220 ;; Don't install tests
13221 (add-before 'install 'remove-tests
13222 (lambda _
13223 (for-each delete-file-recursively
13224 '("axolotl/tests" "build/lib/axolotl/tests"))
13225 #t)))))
13226 (propagated-inputs
13227 `(("python-axolotl-curve25519" ,python-axolotl-curve25519)
13228 ("python-dateutil" ,python-dateutil)
13229 ("python-protobuf" ,python-protobuf)
13230 ("python-pycrypto" ,python-pycrypto)))
13231 (home-page "https://github.com/tgalal/python-axolotl")
13232 (synopsis "Python port of libaxolotl-android")
13233 (description "This is a python port of libaxolotl-android. This
13234 is a ratcheting forward secrecy protocol that works in synchronous and
13235 asynchronous messaging environments.")
13236 (license license:gpl3)))
13237
13238 (define-public python2-axolotl
13239 (package-with-python2 python-axolotl))
13240
13241 (define-public python-termstyle
13242 (package
13243 (name "python-termstyle")
13244 (version "0.1.11")
13245 (source
13246 (origin
13247 (method url-fetch)
13248 (uri (pypi-uri "termstyle" version))
13249 (sha256
13250 (base32
13251 "17wzkkcqy5zc0g68xlad3kcv66iw14d2pwqc0h9420gak0vbhx7g"))))
13252 (build-system python-build-system)
13253 (arguments
13254 '(#:phases
13255 (modify-phases %standard-phases
13256 (replace 'check
13257 (lambda _
13258 (zero? (system* "python" "test3.py")))))))
13259 (home-page "https://github.com/gfxmonk/termstyle")
13260 (synopsis "Console text coloring for Python")
13261 (description "This package provides console text coloring for Python.")
13262 (license license:bsd-3)))
13263
13264 (define-public python-rednose
13265 (package
13266 (name "python-rednose")
13267 (version "1.2.1")
13268 (source
13269 (origin
13270 (method url-fetch)
13271 (uri (pypi-uri "rednose" version))
13272 (sha256
13273 (base32
13274 "0b0bsna217lr1nykyhl5fgjly15zhdvqd4prg4wy1zrgfv7al6m0"))))
13275 (build-system python-build-system)
13276 (arguments
13277 `(#:phases
13278 (modify-phases %standard-phases
13279 (add-after 'unpack 'fix-deps
13280 (lambda _
13281 ;; See <https://github.com/JBKahn/rednose/issues/12>
13282 (substitute* "setup.py"
13283 (("python-termstyle") "termstyle"))
13284 #t)))))
13285 (propagated-inputs
13286 `(("python-colorama" ,python-colorama)
13287 ("python-termstyle" ,python-termstyle)))
13288 (native-inputs
13289 `(("python-six" ,python-six)
13290 ("python-nose" ,python-nose)))
13291 (home-page "https://github.com/JBKahn/rednose")
13292 (synopsis "Colored output for Python nosetests")
13293 (description "This package provides colored output for the
13294 @command{nosetests} command of the Python Nose unit test framework.")
13295 (license license:bsd-3)))
13296
13297 (define-public python2-rednose
13298 (package-with-python2 python-rednose))
13299
13300 (define-public python-flask-restplus
13301 (package
13302 (name "python-flask-restplus")
13303 (version "0.9.2")
13304 (source
13305 (origin
13306 (method url-fetch)
13307 (uri (pypi-uri "flask-restplus" version))
13308 (sha256
13309 (base32
13310 "11his6ii5brpkhld0d5bwzjjw4q3vmplpd6fmgzjrvvklsbk0cf4"))))
13311 (build-system python-build-system)
13312 (arguments
13313 '(#:tests? #f)) ; FIXME: 35/882 tests failing.
13314 ;; #:phases
13315 ;; (modify-phases %standard-phases
13316 ;; (replace 'check
13317 ;; (lambda _
13318 ;; (zero? (system* "nosetests")))))))
13319 (propagated-inputs
13320 `(("python-aniso8601" ,python-aniso8601)
13321 ("python-flask" ,python-flask)
13322 ("python-jsonschema" ,python-jsonschema)
13323 ("python-pytz" ,python-pytz)
13324 ("python-six" ,python-six)))
13325 (native-inputs
13326 `(("python-tzlocal" ,python-tzlocal)
13327 ("python-blinker" ,python-blinker)
13328 ("python-nose" ,python-nose)
13329 ("python-rednose" ,python-rednose)))
13330 (home-page "https://github.com/noirbizarre/flask-restplus")
13331 (synopsis "Framework for documented API development with Flask")
13332 (description "This package provides a framework for API development with
13333 the Flask web framework in Python. It is similar to package
13334 @code{python-flask-restful} but supports the @code{python-swagger}
13335 documentation builder.")
13336 (license license:expat)))
13337
13338 (define-public python-sadisplay
13339 (package
13340 (name "python-sadisplay")
13341 (version "0.4.6")
13342 (source
13343 (origin
13344 (method url-fetch)
13345 (uri (pypi-uri "sadisplay" version))
13346 (sha256
13347 (base32
13348 "0zqad2fl7q26p090qmqgmxbm6iwgf9zij1w8da1g3wdgjj72ql05"))))
13349 (build-system python-build-system)
13350 (propagated-inputs
13351 `(("python-sqlalchemy" ,python-sqlalchemy)))
13352 (native-inputs
13353 `(("python-nose" ,python-nose)))
13354 (home-page "https://bitbucket.org/estin/sadisplay")
13355 (synopsis "SQLAlchemy schema displayer")
13356 (description "This package provides a program to build Entity
13357 Relationship diagrams from a SQLAlchemy model (or directly from the
13358 database).")
13359 (license license:bsd-3)))
13360
13361 (define-public python2-sadisplay
13362 (package-with-python2 python-sadisplay))
13363
13364 (define-public python-flask-restful-swagger
13365 (package
13366 (name "python-flask-restful-swagger")
13367 (version "0.19")
13368 (source
13369 (origin
13370 (method url-fetch)
13371 (uri (pypi-uri "flask-restful-swagger" version))
13372 (sha256
13373 (base32
13374 "16msl8hd5xjmj833bpy264v98cpl5hkw5bgl5gf5vgndxbv3rm6v"))))
13375 (build-system python-build-system)
13376 (propagated-inputs
13377 `(("python-flask-restful" ,python-flask-restful)))
13378 (home-page "https://github.com/rantav/flask-restful-swagger")
13379 (synopsis "Extract Swagger specs from Flask-Restful projects")
13380 (description "This package lets you extract Swagger API documentation
13381 specs from your Flask-Restful projects.")
13382 (license license:expat)))
13383
13384 (define-public python2-flask-restful-swagger
13385 (package-with-python2 python-flask-restful-swagger))
13386
13387 (define-public python-argcomplete
13388 (package
13389 (name "python-argcomplete")
13390 (version "1.7.0")
13391 (source
13392 (origin
13393 (method url-fetch)
13394 (uri (pypi-uri "argcomplete" version))
13395 (sha256
13396 (base32
13397 "11bwiw6j0nilgz81xnw6f1npyga3prp8asjqrm87cdr3ria5l03x"))))
13398 (build-system python-build-system)
13399 (native-inputs
13400 `(("python-pexpect" ,python-pexpect)
13401 ("tcsh" ,tcsh)))
13402 (home-page "https://github.com/kislyuk/argcomplete")
13403 (synopsis "Shell tab completion for Python argparse")
13404 (description "argcomplete provides extensible command line tab completion
13405 of arguments and options for Python scripts using @code{argparse}. It's
13406 particularly useful for programs with many options or sub-parsers that can
13407 dynamically suggest completions; for example, when browsing resources over the
13408 network.")
13409 (license license:asl2.0)))
13410
13411 (define-public python2-argcomplete
13412 (package-with-python2 python-argcomplete))
13413
13414 (define-public python-xopen
13415 (package
13416 (name "python-xopen")
13417 (version "0.1.1")
13418 (source
13419 (origin
13420 (method url-fetch)
13421 (uri (pypi-uri "xopen" version))
13422 (sha256
13423 (base32
13424 "1wx6mylzcsyhjl19ycb83qq6iqpmr927lz62njfsar6ldsj0qcni"))
13425 (file-name (string-append name "-" version ".tar.gz"))))
13426 (build-system python-build-system)
13427 (home-page "https://github.com/marcelm/xopen/")
13428 (synopsis "Open compressed files transparently")
13429 (description "This module provides an @code{xopen} function that works like
13430 Python's built-in @code{open} function, but can also deal with compressed files.
13431 Supported compression formats are gzip, bzip2 and, xz, and are automatically
13432 recognized by their file extensions. The focus is on being as efficient as
13433 possible on all supported Python versions.")
13434 (license license:expat)))
13435
13436 (define-public python2-xopen
13437 (package-with-python2 python-xopen))
13438
13439 (define-public python2-cheetah
13440 (package
13441 (name "python2-cheetah")
13442 (version "2.4.4")
13443 (source
13444 (origin
13445 (method url-fetch)
13446 (uri (pypi-uri "Cheetah" version))
13447 (sha256
13448 (base32
13449 "0l5mm4lnysjkzpjr95q5ydm9xc8bv43fxmr79ypybrf1y0lq4c5y"))))
13450 (build-system python-build-system)
13451 (arguments
13452 `(#:python ,python-2))
13453 (propagated-inputs
13454 `(("python2-markdown" ,python2-markdown)))
13455 (home-page "https://pythonhosted.org/Cheetah/")
13456 (synopsis "Template engine")
13457 (description "Cheetah is a text-based template engine and Python code
13458 generator.
13459
13460 Cheetah can be used as a standalone templating utility or referenced as
13461 a library from other Python applications. It has many potential uses,
13462 but web developers looking for a viable alternative to ASP, JSP, PHP and
13463 PSP are expected to be its principle user group.
13464
13465 Features:
13466 @enumerate
13467 @item Generates HTML, SGML, XML, SQL, Postscript, form email, LaTeX, or any other
13468 text-based format.
13469 @item Cleanly separates content, graphic design, and program code.
13470 @item Blends the power and flexibility of Python with a simple template language
13471 that non-programmers can understand.
13472 @item Gives template writers full access to any Python data structure, module,
13473 function, object, or method in their templates.
13474 @item Makes code reuse easy by providing an object-orientated interface to
13475 templates that is accessible from Python code or other Cheetah templates.
13476 One template can subclass another and selectively reimplement sections of it.
13477 @item Provides a simple, yet powerful, caching mechanism that can dramatically
13478 improve the performance of a dynamic website.
13479 @item Compiles templates into optimized, yet readable, Python code.
13480 @end enumerate")
13481 (license (license:x11-style "file://LICENSE"))))
13482
13483 (define-public python-dulwich
13484 (package
13485 (name "python-dulwich")
13486 (version "0.16.3")
13487 (source
13488 (origin
13489 (method url-fetch)
13490 (uri (list (string-append "https://www.dulwich.io/releases/"
13491 "dulwich-" version ".tar.gz")
13492 (pypi-uri "dulwich" version)))
13493 (sha256
13494 (base32 "0fl47vzfgc3w3rmhn8naii905cjqcp0vc68iyvymxp7567hh6als"))))
13495 (build-system python-build-system)
13496 (arguments
13497 `(#:phases
13498 (modify-phases %standard-phases
13499 (add-before 'check 'fix-tests
13500 (lambda* (#:key inputs #:allow-other-keys)
13501 ;; The tests use Popen with a custom environment which doesn't
13502 ;; include PATH.
13503 (substitute* "dulwich/tests/compat/utils.py"
13504 (("'git'") (string-append "'"
13505 (which "git")
13506 "'")))
13507 (substitute* '("dulwich/tests/test_repository.py"
13508 "dulwich/tests/test_hooks.py")
13509 (("#!/bin/sh") (string-append "#!" (which "sh"))))
13510 (setenv "TEST_RUNNER" "unittest")
13511 (setenv "PYTHONHASHSEED" "random")
13512 #t)))))
13513 (propagated-inputs
13514 `(("python-fastimport" ,python-fastimport)))
13515 (native-inputs
13516 `(("python-mock" ,python-mock)
13517 ("python-geventhttpclient" ,python-geventhttpclient)
13518 ("git" ,git)))
13519 (home-page "https://www.dulwich.io/")
13520 (synopsis "Git implementation in Python")
13521 (description "Dulwich is an implementation of the Git file formats and
13522 protocols written in pure Python.")
13523 ;; Can be used with either license.
13524 (license (list license:asl2.0 license:gpl2+))))
13525
13526 (define-public python2-dulwich
13527 (package-with-python2 python-dulwich))
13528
13529 (define-public python-pbkdf2
13530 (package
13531 (name "python-pbkdf2")
13532 (version "1.3")
13533 (source
13534 (origin
13535 (method url-fetch)
13536 (uri (pypi-uri "pbkdf2" version))
13537 (sha256
13538 (base32
13539 "0yb99rl2mbsaamj571s1mf6vgniqh23v98k4632150hjkwv9fqxc"))))
13540 (build-system python-build-system)
13541 (arguments
13542 '(#:phases
13543 (modify-phases %standard-phases
13544 (replace 'check
13545 (lambda _
13546 (setenv "PYTHONPATH"
13547 (string-append (getcwd) "/build/lib:"
13548 (getenv "PYTHONPATH")))
13549 (zero? (system* "python" "test/test_pbkdf2.py")))))))
13550 (propagated-inputs
13551 `(("python-pycrypto" ,python-pycrypto))) ; optional
13552 (home-page "http://www.dlitz.net/software/python-pbkdf2/")
13553 (synopsis "Password-based key derivation")
13554 (description "This module implements the password-based key derivation
13555 function, PBKDF2, specified in RSA PKCS#5 v2.0.
13556
13557 PKCS#5 v2.0 Password-Based Key Derivation is a key derivation function which
13558 is part of the RSA Public Key Cryptography Standards series. The provided
13559 implementation takes a password or a passphrase and a salt value (and
13560 optionally a iteration count, a digest module, and a MAC module) and provides
13561 a file-like object from which an arbitrarly-sized key can be read.")
13562 (license license:expat)))
13563
13564 (define-public python2-pbkdf2
13565 (package-with-python2 python-pbkdf2))
13566
13567 (define-public python-qrcode
13568 (package
13569 (name "python-qrcode")
13570 (version "5.3")
13571 (source
13572 (origin
13573 (method url-fetch)
13574 (uri (pypi-uri "qrcode" version))
13575 (sha256
13576 (base32
13577 "0kljfrfq0c2rmxf8am57333ia41kd0snbm2rnqbdy816hgpcq5a1"))))
13578 (build-system python-build-system)
13579 (arguments
13580 ;; FIXME: Tests require packaging 'pymaging'.
13581 '(#:tests? #f))
13582 (propagated-inputs
13583 `(("python-lxml" ,python-lxml) ; for SVG output
13584 ("python-pillow" ,python-pillow) ; for PNG output
13585 ("python-six" ,python-six)))
13586 (home-page "https://github.com/lincolnloop/python-qrcode")
13587 (synopsis "QR Code image generator")
13588 (description "This package provides a pure Python QR Code generator
13589 module. It uses the Python Imaging Library (PIL) to allow for the generation
13590 of QR Codes.
13591
13592 In addition this package provides a command line tool to generate QR codes and
13593 either write these QR codes to a file or do the output as ascii art at the
13594 console.")
13595 (license license:bsd-3)))
13596
13597 (define-public python2-qrcode
13598 (package-with-python2 python-qrcode))
13599
13600 ;; SlowAES isn't compatible with Python 3.
13601 (define-public python2-slowaes
13602 (package
13603 (name "python2-slowaes")
13604 (version "0.1a1")
13605 (source
13606 (origin
13607 (method url-fetch)
13608 (uri (pypi-uri "slowaes" version))
13609 (sha256
13610 (base32
13611 "02dzajm83a7lqgxf6r3hgj64wfmcxz8gs4nvgxpvj5n19kjqlrc3"))))
13612 (build-system python-build-system)
13613 (arguments `(#:python ,python-2))
13614 (home-page "http://code.google.com/p/slowaes/")
13615 (synopsis "Implementation of AES in Python")
13616 (description "This package contains an implementation of AES in Python.
13617 This implementation is slow (hence the project name) but still useful when
13618 faster ones are not available.")
13619 (license license:asl2.0)))
13620
13621 (define-public python-rst2ansi
13622 (package
13623 (name "python-rst2ansi")
13624 (version "0.1.5")
13625 (source
13626 (origin
13627 (method url-fetch)
13628 (uri (pypi-uri "rst2ansi" version))
13629 (sha256
13630 (base32
13631 "0vzy6gd60l79ff750scl0sz48r1laalkl6md6dwzah4dcadgn5qv"))))
13632 (build-system python-build-system)
13633 (propagated-inputs
13634 `(("python-docutils" ,python-docutils)))
13635 (home-page "https://github.com/Snaipe/python-rst-to-ansi")
13636 (synopsis "Convert RST to ANSI-decorated console output")
13637 (description
13638 "Python module dedicated to rendering RST (reStructuredText) documents
13639 to ansi-escaped strings suitable for display in a terminal.")
13640 (license license:expat)))
13641
13642 (define-public python-ansi2html
13643 (package
13644 (name "python-ansi2html")
13645 (version "1.2.0")
13646 (source
13647 (origin
13648 (method url-fetch)
13649 (uri (pypi-uri "ansi2html" version))
13650 (sha256
13651 (base32
13652 "1wa00zffprb78w1mqq90dk47czz1knanys2a40zbw2vyapd5lp9y"))))
13653 (build-system python-build-system)
13654 (native-inputs
13655 `(("python-mock" ,python-mock)
13656 ("python-nose" ,python-nose)))
13657 (propagated-inputs
13658 `(("python-six" ,python-six)))
13659 (home-page "http://github.com/ralphbean/ansi2html")
13660 (synopsis "Convert ANSI-decorated console output to HTML")
13661 (description
13662 "@command{ansi2html} is a Python library and command line utility for
13663 convering text with ANSI color codes to HTML or LaTeX.")
13664 (license license:gpl3+)))
13665
13666 (define-public python2-ansi2html
13667 (package-with-python2 python-ansi2html))
13668
13669 (define-public python-ddt
13670 (package
13671 (name "python-ddt")
13672 (version "1.1.1")
13673 (source
13674 (origin
13675 (method url-fetch)
13676 (uri (pypi-uri "ddt" version))
13677 (sha256
13678 (base32
13679 "1c00ikkxr7lha97c81k938bzhgd4pbwamkjn0h4nkhr3xk00zp6n"))))
13680 (build-system python-build-system)
13681 (native-inputs
13682 `(("python-mock" ,python-mock)
13683 ("python-nose" ,python-nose)))
13684 (propagated-inputs
13685 `(("python-six" ,python-six)
13686 ("python-pyyaml" ,python-pyyaml)))
13687 (home-page "https://github.com/txels/ddt")
13688 (synopsis "Data-Driven Tests")
13689 (description
13690 "DDT (Data-Driven Tests) allows you to multiply one test case by running
13691 it with different test data, and make it appear as multiple test cases.")
13692 (license license:expat)))
13693
13694 (define-public python2-ddt
13695 (package-with-python2 python-ddt))
13696
13697 (define-public python-pycosat
13698 (package
13699 (name "python-pycosat")
13700 (version "0.6.1")
13701 (source
13702 (origin
13703 (method url-fetch)
13704 (uri (pypi-uri "pycosat" version))
13705 (sha256
13706 (base32
13707 "1kl3wh1f47rc712n4bmwplbx3fqz3x9i1b587jrbpmvdva4c8f6l"))))
13708 ;; TODO: Unundle picosat. http://fmv.jku.at/picosat/
13709 (build-system python-build-system)
13710 (home-page "https://github.com/ContinuumIO/pycosat")
13711 (synopsis "Bindings to picosat (a SAT solver)")
13712 (description
13713 "This package provides efficient Python bindings to @code{picosat} on
13714 the C level. When importing pycosat, the @code{picosat} solver becomes part
13715 of the Python process itself. @code{picosat} is a @dfn{Boolean Satisfiability
13716 Problem} (SAT) solver.")
13717 (license license:expat)))
13718
13719 (define-public python2-pycosat
13720 (package-with-python2 python-pycosat))
13721
13722 (define-public python2-ruamel.ordereddict
13723 (package
13724 (name "python2-ruamel.ordereddict")
13725 (version "0.4.9")
13726 (source
13727 (origin
13728 (method url-fetch)
13729 (uri (pypi-uri "ruamel.ordereddict" version))
13730 (sha256
13731 (base32
13732 "1xmkl8v9l9inm2pyxgc1fm5005yxm7fkd5gv74q7lj1iy5qc8n3h"))))
13733 (build-system python-build-system)
13734 (arguments
13735 `(#:python ,python-2
13736 #:phases
13737 (modify-phases %standard-phases
13738 (delete 'check)
13739 (add-after 'install 'check
13740 (lambda* (#:key inputs outputs #:allow-other-keys)
13741 (add-installed-pythonpath inputs outputs)
13742 (zero? (system* "python" "test/testordereddict.py")))))))
13743 (home-page "https://bitbucket.org/ruamel/ordereddict")
13744 (synopsis "Version of dict that keeps keys in insertion order")
13745 (description
13746 "This is an implementation of an ordered dictionary with @dfn{Key
13747 Insertion Order} (KIO: updates of values do not affect the position of the
13748 key), @dfn{Key Value Insertion Order} (KVIO, an existing key's position is
13749 removed and put at the back). The standard library module @code{OrderedDict},
13750 implemented later, implements a subset of @code{ordereddict} functionality.
13751 Sorted dictionaries are also provided. Currently only with @dfn{Key Sorted
13752 Order} (KSO, no sorting function can be specified, but a transform can be
13753 specified to apply on the key before comparison (e.g. @code{string.lower})).")
13754 (license license:expat)))
13755
13756 (define-public python-pypeg2
13757 (package
13758 (name "python-pypeg2")
13759 (version "2.15.2")
13760 (source
13761 (origin
13762 (method url-fetch)
13763 (uri (pypi-uri "pyPEG2" version))
13764 (sha256
13765 (base32
13766 "0v8ziaam2r637v94ra4dbjw6jzxz99gs5x4i585kgag1v204yb9b"))))
13767 (build-system python-build-system)
13768 (propagated-inputs `(("python-lxml" ,python-lxml)))
13769 (arguments
13770 ;;https://bitbucket.org/fdik/pypeg/issues/36/test-failures-on-py35
13771 '(#:tests? #f))
13772 (home-page "https://fdik.org/pyPEG/")
13773 (synopsis "Parsering Expression Grammars in Python")
13774 (description "PyPEG is an intrinsic parser interpreter framework for
13775 Python. It is based on Parsing Expression Grammars, PEG. With pyPEG you can
13776 parse many formal languages.")
13777 (license license:gpl2)))
13778
13779 (define-public python2-cliapp
13780 (package
13781 (name "python2-cliapp")
13782 (version "1.20160724")
13783 (source
13784 (origin
13785 (method url-fetch)
13786 (uri (string-append
13787 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/cliapp/snapshot/cliapp-"
13788 version ".tar.gz"))
13789 (sha256
13790 (base32
13791 "025cyi75vxyghbm4hav8dz4fzwksshddavy9g9fwr440awcvw74f"))))
13792 (build-system python-build-system)
13793 (arguments
13794 `(#:python ,python-2))
13795 (propagated-inputs
13796 `(("python2-pyaml" ,python2-pyaml)))
13797 (home-page "https://liw.fi/cliapp/")
13798 (synopsis "Python framework for command line programs")
13799 (description "@code{python2-cliapp} is a python framework for
13800 command line programs. It contains the typical stuff such programs
13801 need to do, such as parsing the command line for options, and
13802 iterating over input files.")
13803 (license license:gpl2+)))
13804
13805 (define-public python2-ttystatus
13806 (package
13807 (name "python2-ttystatus")
13808 (version "0.32")
13809 (source
13810 (origin
13811 (method url-fetch)
13812 (uri (string-append
13813 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/ttystatus/snapshot/ttystatus-"
13814 version ".tar.gz"))
13815 (sha256
13816 (base32
13817 "0b5g889jj23r2w1hi300cdldx6jvspanp0ybf5n1qvdvl150aamf"))))
13818 (build-system python-build-system)
13819 (arguments
13820 `(#:python ,python-2))
13821 (home-page "https://liw.fi/ttystatus/")
13822 (synopsis "Python library for showing progress reporting and
13823 status updates on terminals")
13824 (description "@code{python2-ttystatus} is a python library for
13825 showing progress reporting and status updates on terminals, for
13826 command line programs. Output is automatically adapted to the width
13827 of the terminal: truncated if it does not fit, and resized if the
13828 terminal size changes.")
13829 (license license:gpl3+)))
13830
13831 (define-public python2-tracing
13832 (package
13833 (name "python2-tracing")
13834 (version "0.10")
13835 (source
13836 (origin
13837 (method url-fetch)
13838 (uri (string-append
13839 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/python-tracing/snapshot/tracing-"
13840 version ".tar.gz"))
13841 (sha256
13842 (base32
13843 "06cw4zg42fsvqy372vi2whj26w56vzg5axhzwdjc2bgwf03garbw"))))
13844 (build-system python-build-system)
13845 (arguments
13846 `(#:python ,python-2))
13847 (home-page "https://liw.fi/tracing/")
13848 (synopsis "Python debug logging helper")
13849 (description "@code{python2-tracing} is a python library for
13850 logging debug messages. It provides a way to turn debugging messages
13851 on and off, based on the filename they occur in. It is much faster
13852 than using @code{logging.Filter} to accomplish the same thing, which
13853 matters when code is run in production mode. The actual logging still
13854 happens using the @code{logging} library.")
13855 (license license:gpl3+)))
13856
13857 (define-public python2-larch
13858 (package
13859 (name "python2-larch")
13860 (version "1.20151025")
13861 (source
13862 (origin
13863 (method url-fetch)
13864 (uri (string-append
13865 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/larch/snapshot/larch-"
13866 version ".tar.gz"))
13867 (sha256
13868 (base32
13869 "1p4knkkavlqymgciz2wbcnfrdgdbafhg14maplnk4vbw0q8xs663"))))
13870 (build-system python-build-system)
13871 (arguments
13872 `(#:python ,python-2))
13873 (propagated-inputs
13874 `(("python2-tracing" ,python2-tracing)))
13875 (home-page "https://liw.fi/larch/")
13876 (synopsis "Python copy-on-write B-tree library")
13877 (description "@code{python2-larch} is an implementation of
13878 particular kind of B-tree, based on research by Ohad Rodeh. See
13879 @url{http://liw.fi/larch/ohad-btrees-shadowing-clones.pdf} for details
13880 on the data structure.
13881
13882 The distinctive feature of this B-tree is that a node is never
13883 (conceptually) modified. Instead, all updates are done by
13884 copy-on-write. This makes it easy to clone a tree, and modify only the
13885 clone, while other processes access the original tree.")
13886 (license license:gpl3+)))
13887
13888 (define-public python-htmlmin
13889 (package
13890 (name "python-htmlmin")
13891 (version "0.1.10")
13892 (source
13893 (origin
13894 (method url-fetch)
13895 (uri (pypi-uri "htmlmin" version))
13896 (sha256
13897 (base32
13898 "0qxa93j3p1ak32qh8d9kshqv8v3z0hkc13dwbhp5cn7sn3xmsp6a"))))
13899 (arguments
13900 `(#:tests? #f)) ;htmlmin has no tests
13901 (build-system python-build-system)
13902 (home-page "https://htmlmin.readthedocs.org/en/latest/")
13903 (synopsis "HTML minifier")
13904 (description "@code{htmlmin} is an HTML minifier that just works.
13905 It comes with safe defaults and easily configurable options.")
13906 (license license:bsd-3)))
13907
13908 (define-public python2-htmlmin
13909 (package-with-python2 python-htmlmin))
13910
13911 (define-public python-flask-htmlmin
13912 (package
13913 (name "python-flask-htmlmin")
13914 (version "1.2")
13915 (source
13916 (origin
13917 (method url-fetch)
13918 (uri (pypi-uri "Flask-HTMLmin" version))
13919 (sha256
13920 (base32
13921 "1n6zlq72kakkw0z2jpq6nh74lfsmxybm4g053pwhc14fbr809348"))))
13922 (propagated-inputs
13923 `(("python-flask" ,python-flask)
13924 ("python-htmlmin" ,python-htmlmin)))
13925 (build-system python-build-system)
13926 (home-page "https://github.com/hamidfzm/Flask-HTMLmin")
13927 (synopsis "HTML response minifier for Flask")
13928 (description
13929 "Minify @code{text/html} MIME type responses when using @code{Flask}.")
13930 (license license:bsd-3)))
13931
13932 (define-public python2-flask-htmlmin
13933 (package-with-python2 python-flask-htmlmin))
13934
13935 (define-public python-flask-login
13936 (package
13937 (name "python-flask-login")
13938 (version "0.4.0")
13939 (source
13940 (origin
13941 (method url-fetch)
13942 (uri (string-append "https://github.com/maxcountryman/flask-login/archive/"
13943 version ".tar.gz"))
13944 (file-name (string-append name "-" version ".tar.gz"))
13945 (sha256
13946 (base32
13947 "1pdqp7a2gyb7k06xda004x0fi2w66s6kn2i0ndkqndmg12d83f9w"))))
13948 (arguments
13949 ;; Tests fail PEP8 compliance. See:
13950 ;; https://github.com/maxcountryman/flask-login/issues/340
13951 `(#:tests? #f))
13952 (build-system python-build-system)
13953 (home-page "https://github.com/maxcountryman/flask-login")
13954 (synopsis "User session management for Flask")
13955 (description
13956 "@code{Flask-Login} provides user session management for Flask. It
13957 handles the common tasks of logging in, logging out, and remembering your
13958 users' sessions over extended periods of time.")
13959 (license license:expat)))
13960
13961 (define-public python2-flask-login
13962 (package-with-python2 python-flask-login))
13963
13964 (define-public python-astroid
13965 (package
13966 (name "python-astroid")
13967 (version "1.5.3")
13968 (source
13969 (origin
13970 (method url-fetch)
13971 (uri (string-append
13972 "https://github.com/PyCQA/astroid/archive/astroid-"
13973 version ".tar.gz"))
13974 (sha256
13975 (base32
13976 "0isn5p7f9n48hmksgbrj7dkm9dyglnayzn5jngk37qywg8a74ngn"))))
13977 (build-system python-build-system)
13978 (propagated-inputs
13979 `(("python-lazy-object-proxy" ,python-lazy-object-proxy)
13980 ("python-six" ,python-six)
13981 ("python-wrapt" ,python-wrapt)))
13982 (arguments
13983 `(#:phases
13984 (modify-phases %standard-phases
13985 (replace 'check
13986 (lambda _
13987 (zero? (system* "python" "-m" "unittest" "discover"
13988 "-p" "unittest*.py")))))))
13989 (home-page "https://github.com/PyCQA/astroid")
13990 (synopsis "Common base representation of python source code for pylint and
13991 other projects")
13992 (description "@code{python-astroid} provides a common base representation
13993 of python source code for projects such as pychecker, pyreverse, pylint, etc.
13994
13995 It provides a compatible representation which comes from the _ast module. It
13996 rebuilds the tree generated by the builtin _ast module by recursively walking
13997 down the AST and building an extended ast. The new node classes have
13998 additional methods and attributes for different usages. They include some
13999 support for static inference and local name scopes. Furthermore, astroid
14000 builds partial trees by inspecting living objects.")
14001 (license license:lgpl2.1+)
14002 (properties `((python2-variant . ,(delay python2-astroid))))))
14003
14004 (define-public python2-astroid
14005 (let ((base (package-with-python2
14006 (strip-python2-variant python-astroid))))
14007 (package (inherit base)
14008 (propagated-inputs
14009 `(("python2-backports-functools-lru-cache"
14010 ,python2-backports-functools-lru-cache)
14011 ("python2-enum34" ,python2-enum34)
14012 ("python2-singledispatch" ,python2-singledispatch)
14013 ,@(package-propagated-inputs base))))))
14014
14015 (define-public python-isort
14016 (package
14017 (name "python-isort")
14018 (version "4.2.5")
14019 (source
14020 (origin
14021 (method url-fetch)
14022 (uri (string-append
14023 "https://github.com/timothycrosley/isort/archive/"
14024 version ".tar.gz"))
14025 (file-name (string-append name "-" version ".tar.gz"))
14026 (sha256
14027 (base32
14028 "0zsrgkb0krn5476yncy5dd56k7dk34zqb4bnlvwy44ixgilyjmfh"))))
14029 (build-system python-build-system)
14030 (native-inputs
14031 `(("python-mock" ,python-mock)
14032 ("python-pytest" ,python-pytest)))
14033 (home-page "https://github.com/timothycrosley/isort")
14034 (synopsis "Python utility/library to sort python imports")
14035 (description "@code{python-isort} is a python utility/library to sort
14036 imports alphabetically, and automatically separated into sections. It
14037 provides a command line utility, a python library and plugins for various
14038 editors.")
14039 (license license:expat)))
14040
14041 (define-public python2-isort
14042 (package-with-python2 python-isort))
14043
14044 (define-public python2-backports-functools-lru-cache
14045 (package
14046 (name "python2-backports-functools-lru-cache")
14047 (version "1.3")
14048 (source
14049 (origin
14050 (method url-fetch)
14051 ;; only the pypi tarballs contain the necessary metadata
14052 (uri (pypi-uri "backports.functools_lru_cache" version))
14053 (sha256
14054 (base32
14055 "158ysf2hb0q4p4695abfiym9x1ywg0dgh8a3apd7gqaaxjy22jj4"))))
14056 (build-system python-build-system)
14057 (native-inputs
14058 `(("python2-setuptools-scm" ,python2-setuptools-scm)))
14059 (arguments
14060 `(#:python ,python-2))
14061 (home-page "https://github.com/jaraco/backports.functools_lru_cache")
14062 (synopsis "Backport of functools.lru_cache from Python 3.3")
14063 (description "@code{python2-backports-functools-lru-cache} is a backport
14064 of @code{functools.lru_cache} from python 3.3.")
14065 (license license:expat)))
14066
14067 (define-public python-configparser
14068 (package
14069 (name "python-configparser")
14070 (version "3.5.0")
14071 (source
14072 (origin
14073 (method url-fetch)
14074 (uri (string-append
14075 "https://bitbucket.org/ambv/configparser/get/"
14076 version ".tar.bz2"))
14077 (file-name (string-append name "-" version ".tar.gz"))
14078 (sha256
14079 (base32
14080 "0waq40as14abwzbb321hfz4vr1fi363nscy32ga14qvfygrg96wa"))))
14081 (build-system python-build-system)
14082 (home-page "http://docs.python.org/py3k/library/configparser.html")
14083 (synopsis "Backport of configparser from python 3.5")
14084 (description "@code{python-configparser} is a backport of
14085 @code{configparser} from Python 3.5 so that it can be used directly
14086 in other versions.")
14087 (license license:expat)))
14088
14089 (define-public python2-configparser
14090 (package-with-python2 python-configparser))
14091
14092 (define-public python2-coverage-test-runner
14093 (package
14094 (name "python2-coverage-test-runner")
14095 (version "1.11")
14096 (source
14097 (origin
14098 (method url-fetch)
14099 (uri (string-append
14100 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/"
14101 "coverage-test-runner/snapshot/coverage-test-runner-"
14102 version ".tar.gz"))
14103 (sha256
14104 (base32
14105 "0y1m7z3dl63kmhcmydl1mwg0hacnf6ghrx9dah17j9iasssfa3g7"))))
14106 (build-system python-build-system)
14107 (arguments
14108 `(#:python ,python-2
14109 #:phases
14110 (modify-phases %standard-phases
14111 (replace 'check
14112 (lambda _
14113 (zero? (system* "./testrun")))))))
14114 (propagated-inputs
14115 `(("python2-coverage" ,python2-coverage)))
14116 (home-page "https://liw.fi/coverage-test-runner/")
14117 (synopsis "Python module for running unit tests")
14118 (description "@code{CoverageTestRunner} is a python module for running
14119 unit tests and failing them if the unit test module does not exercise all
14120 statements in the module it tests.")
14121 (license license:gpl3+)))
14122
14123 (define-public python-pylint
14124 (package
14125 (name "python-pylint")
14126 (version "1.7.2")
14127 (source
14128 (origin
14129 (method url-fetch)
14130 (uri (string-append
14131 "https://github.com/PyCQA/pylint/archive/pylint-"
14132 version ".tar.gz"))
14133 (sha256
14134 (base32
14135 "0mzn1czhf1mgr2wiqfihb274sja02h899b85kywdpivppa9nwrmp"))))
14136 (build-system python-build-system)
14137 (native-inputs
14138 `(("python-pytest" ,python-pytest)
14139 ("python-pytest-runner" ,python-pytest-runner)
14140 ("python-tox" ,python-tox)))
14141 (propagated-inputs
14142 `(("python-astroid" ,python-astroid)
14143 ("python-isort" ,python-isort)
14144 ("python-mccabe" ,python-mccabe)
14145 ("python-six" ,python-six)))
14146 (arguments
14147 `(#:phases
14148 (modify-phases %standard-phases
14149 (replace 'check
14150 (lambda _
14151 ;; Somehow, tests for python2-pylint
14152 ;; fail if run from the build directory
14153 (let ((work "/tmp/work"))
14154 (mkdir-p work)
14155 (setenv "PYTHONPATH"
14156 (string-append (getenv "PYTHONPATH") ":" work))
14157 (copy-recursively "." work)
14158 (with-directory-excursion "/tmp"
14159 (zero? (system* "python" "-m" "unittest" "discover"
14160 "-s" (string-append work "/pylint/test")
14161 "-p" "*test_*.py")))))))))
14162 (home-page "https://github.com/PyCQA/pylint")
14163 (synopsis "Python source code analyzer which looks for coding standard
14164 errors")
14165 (description "Pylint is a Python source code analyzer which looks
14166 for programming errors, helps enforcing a coding standard and sniffs
14167 for some code smells (as defined in Martin Fowler's Refactoring book).
14168
14169 Pylint has many rules enabled by default, way too much to silence them
14170 all on a minimally sized program. It's highly configurable and handle
14171 pragmas to control it from within your code. Additionally, it is
14172 possible to write plugins to add your own checks.")
14173 (license license:gpl2+)))
14174
14175 (define-public python2-pylint
14176 (let ((pylint (package-with-python2 python-pylint)))
14177 (package (inherit pylint)
14178 (propagated-inputs
14179 `(("python2-backports-functools-lru-cache"
14180 ,python2-backports-functools-lru-cache)
14181 ("python2-configparser" ,python2-configparser)
14182 ,@(package-propagated-inputs pylint))))))
14183
14184 (define-public python-paramunittest
14185 (package
14186 (name "python-paramunittest")
14187 (version "0.2")
14188 (source
14189 (origin
14190 (method url-fetch)
14191 (uri (pypi-uri "ParamUnittest" version))
14192 (sha256
14193 (base32
14194 "0kp793hws5xv1wvycxq7jw2pwy36f35k39jg8hx5qikij5a0jid1"))))
14195 (build-system python-build-system)
14196 (home-page
14197 "https://github.com/rik0/ParamUnittest")
14198 (synopsis
14199 "Simple extension to have parametrized unit tests")
14200 (description
14201 "This package allows to create parametrized unit-tests that work with the standard
14202 unittest package. A parametrized test case is automatically converted to multiple test
14203 cases. Since they are TestCase subclasses, they work with other test suites that
14204 recognize TestCases.")
14205 (license license:bsd-2)))
14206
14207 (define-public python2-python-paramunittest
14208 (package-with-python2 python-paramunittest))
14209
14210 (define-public python-mando
14211 (package
14212 (name "python-mando")
14213 (version "0.5")
14214 (source
14215 (origin
14216 (method url-fetch)
14217 (uri (pypi-uri "mando" version))
14218 (sha256
14219 (base32
14220 "0q05h66439gqdmlk4jqm6xrwrzfdgs4mwk70barxhr2y83qbbdc0"))))
14221 (build-system python-build-system)
14222 (propagated-inputs
14223 `(("python-rst2ansi" ,python-rst2ansi)))
14224 (native-inputs
14225 `(("python-sphinx" ,python-sphinx-1.5.3)
14226 ("python-paramunittest" ,python-paramunittest)))
14227 (home-page "https://mando.readthedocs.org/")
14228 (synopsis
14229 "Wrapper around argparse, allowing creation of complete CLI applications")
14230 (description
14231 "This package is a wrapper around argparse, allowing you to write complete CLI
14232 applications in seconds while maintaining all the flexibility.")
14233 (license license:expat)))
14234
14235 (define-public python2-mando
14236 (package-with-python2 python-mando))
14237
14238 (define-public python-mando-0.3.1
14239 ;; python-radon (version 1.5.0) has a requirement
14240 ;; for mando<0.4,>=0.3
14241 (package
14242 (inherit python-mando)
14243 (name "python-mando")
14244 (version "0.3.1")
14245 (source
14246 (origin
14247 (method url-fetch)
14248 (uri (string-append "https://github.com/rubik/mando/archive/v"
14249 version
14250 ".tar.gz"))
14251 (sha256
14252 (base32
14253 "17jlkdpqw22z1nyml5ybslilqkzmnk0dxxjml8bfghav1l5hbwd2"))))))
14254
14255 (define-public python-fudge
14256 (package
14257 (name "python-fudge")
14258 ;; 0.9.6 is the latest version suitable for testing the "fabric" Python 2
14259 ;; package, which is currently the only use of this package.
14260 (version "0.9.6")
14261 (source
14262 (origin
14263 (method url-fetch)
14264 (uri (pypi-uri "fudge" version))
14265 (sha256
14266 (base32
14267 "185ia3vr3qk4f2s1a9hdxb8ci4qc0x0xidrad96pywg8j930qs9l"))))
14268 (build-system python-build-system)
14269 (arguments
14270 `(#:tests? #f)) ;XXX: Tests require the NoseJS Python package.
14271 (home-page "https://github.com/fudge-py/fudge")
14272 (synopsis "Replace real objects with fakes/mocks/stubs while testing")
14273 (description
14274 "Fudge is a Python module for using fake objects (mocks and stubs) to
14275 test real ones.
14276
14277 In readable Python code, you declare the methods available on your fake object
14278 and how they should be called. Then you inject that into your application and
14279 start testing. This declarative approach means you don’t have to record and
14280 playback actions and you don’t have to inspect your fakes after running code.
14281 If the fake object was used incorrectly then you’ll see an informative
14282 exception message with a traceback that points to the culprit.")
14283 (license license:expat)))
14284
14285 (define-public python2-fudge
14286 (package-with-python2 python-fudge))
14287
14288 (define-public python-oauth2client
14289 (package
14290 (name "python-oauth2client")
14291 (version "4.0.0")
14292 (source
14293 (origin
14294 (method url-fetch)
14295 (uri (pypi-uri "oauth2client" version))
14296 (sha256
14297 (base32
14298 "1irqqap2zibysf8dba8sklfqikia579srd0phm5n754ni0h59gl0"))))
14299 (build-system python-build-system)
14300 (arguments
14301 `(#:tests? #f))
14302 (propagated-inputs
14303 `(("python-httplib2" ,python-httplib2)
14304 ("python-pyasn1" ,python-pyasn1)
14305 ("python-pyasn1-modules" ,python-pyasn1-modules)
14306 ("python-rsa" ,python-rsa)
14307 ("python-six" ,python-six)))
14308 (home-page "http://github.com/google/oauth2client/")
14309 (synopsis "OAuth 2.0 client library")
14310 (description "@code{python-oauth2client} provides an OAuth 2.0 client
14311 library for Python")
14312 (license license:asl2.0)))
14313
14314 (define-public python-flask-oidc
14315 (package
14316 (name "python-flask-oidc")
14317 (version "1.1.1")
14318 (source
14319 (origin
14320 (method url-fetch)
14321 (uri (pypi-uri "flask-oidc" version))
14322 (sha256
14323 (base32
14324 "1ay5j0mf174bix7i67hclr95gv16z81fpx0dijvi0gydvdj3ddy2"))))
14325 (build-system python-build-system)
14326 (propagated-inputs
14327 `(("python-flask" ,python-flask)
14328 ("python-itsdangerous" ,python-itsdangerous)
14329 ("python-oauth2client" ,python-oauth2client)
14330 ("python-six" ,python-six)))
14331 (native-inputs
14332 `(("python-nose" ,python-nose)
14333 ("python-mock" ,python-mock)))
14334 (home-page "https://github.com/puiterwijk/flask-oidc")
14335 (synopsis "OpenID Connect extension for Flask")
14336 (description "@code{python-flask-oidc} provides an OpenID Connect extension
14337 for Flask.")
14338 (license license:bsd-2)))
14339
14340 (define-public python-mwclient
14341 (package
14342 (name "python-mwclient")
14343 (version "0.8.4")
14344 (source
14345 (origin
14346 (method url-fetch)
14347 ;; The PyPI version wouldn't contain tests.
14348 (uri (string-append "https://github.com/mwclient/mwclient/archive/"
14349 "v" version ".tar.gz"))
14350 (sha256
14351 (base32
14352 "1jj0yhilkjir00719fc7w133x7hdyhkxhk6xblla4asig45klsfv"))))
14353 (build-system python-build-system)
14354 (propagated-inputs
14355 `(("python-requests" ,python-requests)
14356 ("python-requests-oauthlib"
14357 ,python-requests-oauthlib)
14358 ("python-six" ,python-six)))
14359 (native-inputs
14360 `(("python-mock" ,python-mock)
14361 ("python-pytest" ,python-pytest)
14362 ("python-pytest-pep8" ,python-pytest-pep8)
14363 ("python-pytest-cache" ,python-pytest-cache)
14364 ("python-pytest-cov" ,python-pytest-cov)
14365 ("python-responses" ,python-responses)))
14366 (home-page "https://github.com/btongminh/mwclient")
14367 (synopsis "MediaWiki API client")
14368 (description "This package provides a MediaWiki API client.")
14369 (license license:expat)))
14370
14371 (define-public python2-mwclient
14372 (package-with-python2 python-mwclient))
14373
14374 (define-public python-pytest-warnings
14375 (package
14376 (name "python-pytest-warnings")
14377 (version "0.2.0")
14378 (source
14379 (origin
14380 (method url-fetch)
14381 (uri (pypi-uri "pytest-warnings" version))
14382 (sha256
14383 (base32
14384 "0gf2dpahpl5igb7jh1sr9acj3z3gp7zahqdqb69nk6wx01c8kc1g"))))
14385 (build-system python-build-system)
14386 (propagated-inputs
14387 `(("pytest" ,python-pytest-3.0)))
14388 (home-page "https://github.com/fschulze/pytest-warnings")
14389 (synopsis "Pytest plugin to list Python warnings in pytest report")
14390 (description
14391 "Python-pytest-warnings is a pytest plugin to list Python warnings in
14392 pytest report.")
14393 (license license:expat)))
14394
14395 (define-public python2-pytest-warnings
14396 (package-with-python2 python-pytest-warnings))
14397
14398 (define-public python-pytest-capturelog
14399 (package
14400 (name "python-pytest-capturelog")
14401 (version "0.7")
14402 (source
14403 (origin
14404 (method url-fetch)
14405 (uri (pypi-uri "pytest-capturelog" version ".tar.gz"))
14406 (sha256
14407 (base32
14408 "038049nyjl7di59ycnxvc9nydivc5m8np3hqq84j2iirkccdbs5n"))))
14409 (build-system python-build-system)
14410 (propagated-inputs
14411 `(("pytest" ,python-pytest-3.0)))
14412 (home-page "http://bitbucket.org/memedough/pytest-capturelog/overview")
14413 (synopsis "Pytest plugin to catch log messages")
14414 (description
14415 "Python-pytest-catchlog is a pytest plugin to catch log messages.")
14416 (license license:expat)))
14417
14418 (define-public python2-pytest-capturelog
14419 (package-with-python2 python-pytest-capturelog))
14420
14421 (define-public python-pytest-catchlog
14422 (package
14423 (name "python-pytest-catchlog")
14424 (version "1.2.2")
14425 (source
14426 (origin
14427 (method url-fetch)
14428 (uri (pypi-uri "pytest-catchlog" version ".zip"))
14429 (sha256
14430 (base32
14431 "1w7wxh27sbqwm4jgwrjr9c2gy384aca5jzw9c0wzhl0pmk2mvqab"))))
14432 (build-system python-build-system)
14433 (native-inputs
14434 `(("unzip" ,unzip)))
14435 (propagated-inputs
14436 `(("pytest" ,python-pytest-3.0)))
14437 (home-page "https://github.com/eisensheng/pytest-catchlog")
14438 (synopsis "Pytest plugin to catch log messages")
14439 (description
14440 "Python-pytest-catchlog is a pytest plugin to catch log messages. This is
14441 a fork of pytest-capturelog.")
14442 (license license:expat)))
14443
14444 (define-public python2-pytest-catchlog
14445 (package-with-python2 python-pytest-catchlog))
14446
14447 (define-public python-utils
14448 (package
14449 (name "python-utils")
14450 (version "2.1.0")
14451 (source (origin
14452 (method url-fetch)
14453 (uri (pypi-uri "python-utils" version))
14454 (sha256
14455 (base32
14456 "1mcsy6q5am4ya72rgkpb6kax6vv7c93cfkkas89xnpa4sj9zf28p"))))
14457 (build-system python-build-system)
14458 (native-inputs
14459 `(("pytest-runner" ,python-pytest-runner)
14460 ("pytest" ,python-pytest)
14461 ("six" ,python-six)))
14462 (home-page "https://github.com/WoLpH/python-utils")
14463 (synopsis "Convenient utilities not included with the standard Python install")
14464 (description
14465 "Python Utils is a collection of small Python functions and classes which
14466 make common patterns shorter and easier.")
14467 (license license:bsd-2)))
14468
14469 (define-public python2-utils
14470 (package-with-python2 python-utils))
14471
14472 (define-public python-webassets
14473 (package
14474 (name "python-webassets")
14475 (version "0.12.1")
14476 (source
14477 (origin
14478 (method url-fetch)
14479 (uri (pypi-uri "webassets" version))
14480 (sha256
14481 (base32
14482 "1nrqkpb7z46h2b77xafxihqv3322cwqv6293ngaky4j3ff4cing7"))))
14483 (build-system python-build-system)
14484 (native-inputs
14485 `(("python-jinja2" ,python-jinja2)
14486 ("python-mock" ,python-mock)
14487 ("python-nose" ,python-nose)
14488 ("python-pytest" ,python-pytest)))
14489 (home-page "https://github.com/miracle2k/webassets")
14490 (synopsis "Media asset management")
14491 (description "Merges, minifies and compresses Javascript and CSS files,
14492 supporting a variety of different filters, including YUI, jsmin, jspacker or
14493 CSS tidy. Also supports URL rewriting in CSS files.")
14494 (license license:bsd-2)))
14495
14496 (define-public python-sphinx-me
14497 (package
14498 (name "python-sphinx-me")
14499 (version "0.3")
14500 (source
14501 (origin
14502 (method url-fetch)
14503 (uri (pypi-uri "sphinx-me" version))
14504 (sha256
14505 (base32
14506 "06jzgp213zihnvpcy2y5jy3ykid3apc2ncp2pg6a2g05lhiziglq"))))
14507 (build-system python-build-system)
14508 (home-page "https://github.com/stephenmcd/sphinx-me")
14509 (synopsis "Create a Sphinx documentation shell")
14510 (description
14511 "Create a Sphinx documentation shell for your project and include the
14512 README file as the documentation index. It handles extracting the required
14513 meta data such as the project name, author and version from your project for
14514 use in your Sphinx docs.")
14515 (license license:bsd-2)))
14516
14517 (define-public python2-sphinx-me
14518 (package-with-python2 python-sphinx-me))
14519
14520 (define-public python-cssmin
14521 (package
14522 (name "python-cssmin")
14523 (version "0.2.0")
14524 (source
14525 (origin
14526 (method url-fetch)
14527 (uri (pypi-uri "cssmin" version))
14528 (sha256
14529 (base32
14530 "1dk723nfm2yf8cp4pj785giqlwv42l0kj8rk40kczvq1hk6g04p0"))))
14531 (build-system python-build-system)
14532 (home-page "https://github.com/zacharyvoase/cssmin")
14533 (synopsis "Python port of the YUI CSS Compressor")
14534 (description "Python port of the YUI CSS Compressor.")
14535 (license (list license:expat license:bsd-3))))
14536
14537 (define-public python2-cssmin
14538 (package-with-python2 python-cssmin))
14539
14540 (define-public python-diff-match-patch
14541 (package
14542 (name "python-diff-match-patch")
14543 (version "20121119")
14544 (source
14545 (origin
14546 (method url-fetch)
14547 (uri (pypi-uri "diff-match-patch" version))
14548 (sha256
14549 (base32
14550 "0k1f3v8nbidcmmrk65m7h8v41jqi37653za9fcs96y7jzc8mdflx"))))
14551 (build-system python-build-system)
14552 (home-page "https://code.google.com/p/google-diff-match-patch")
14553 (synopsis "Synchronize plain text")
14554 (description "Diff Match and Patch libraries offer robust algorithms to
14555 perform the operations required for synchronizing plain text.")
14556 (license license:asl2.0)))
14557
14558 (define-public python2-diff-match-patch
14559 (package-with-python2 python-diff-match-patch))
14560
14561 (define-public python-dirsync
14562 (package
14563 (name "python-dirsync")
14564 (version "2.2.2")
14565 (source
14566 (origin
14567 (method url-fetch)
14568 (uri (pypi-uri "dirsync" version ".zip"))
14569 (sha256
14570 (base32
14571 "1hcdvmkwd5512zbxpin0k7bx5bkgzy3swjx7d0kj1y45af6r75v2"))))
14572 (build-system python-build-system)
14573 (native-inputs
14574 `(("unzip" ,unzip)))
14575 (propagated-inputs
14576 `(("six" ,python-six)))
14577 (home-page "https://bitbucket.org/tkhyn/dirsync")
14578 (synopsis "Advanced directory tree synchronisation tool")
14579 (description "Advanced directory tree synchronisation tool.")
14580 (license license:expat)))
14581
14582 (define-public python2-dirsync
14583 (package-with-python2 python-dirsync))
14584
14585 (define-public python-nosexcover
14586 (package
14587 (name "python-nosexcover")
14588 (version "1.0.11")
14589 (source (origin
14590 (method url-fetch)
14591 (uri (pypi-uri "nosexcover" version))
14592 (sha256
14593 (base32
14594 "10xqr12qv62k2flxwqhh8cr00cjhn7sfjrm6p35gd1x5bmjkr319"))))
14595 (build-system python-build-system)
14596 (propagated-inputs
14597 `(("python-coverage" ,python-coverage)
14598 ("python-nose" ,python-nose)))
14599 (home-page "http://github.com/cmheisel/nose-xcover")
14600 (synopsis "Extends nose.plugins.cover to add Cobertura-style XML reports")
14601 (description "Nose-xcover is a companion to the built-in
14602 @code{nose.plugins.cover}. This plugin will write out an XML coverage report
14603 to a file named coverage.xml.
14604
14605 It will honor all the options you pass to the Nose coverage plugin,
14606 especially -cover-package.")
14607 (license license:expat)))
14608
14609 (define-public python2-nosexcover
14610 (package-with-python2 python-nosexcover))
14611
14612 (define-public python-elasticsearch
14613 (package
14614 (name "python-elasticsearch")
14615 (version "1.0.0")
14616 (source
14617 (origin
14618 (method url-fetch)
14619 (uri (pypi-uri "elasticsearch" version))
14620 (sha256
14621 (base32
14622 "1sdw1r05cw7ihnmng8ra9v968fj7bq6sji8i1dikymsnkcpgc69g"))))
14623 (build-system python-build-system)
14624 (native-inputs
14625 `(("python-mock" ,python-mock)
14626 ("python-nosexcover" ,python-nosexcover)
14627 ("python-pyaml" ,python-pyaml)
14628 ("python-requests" ,python-requests)))
14629 (propagated-inputs
14630 `(("urllib3" ,python-urllib3)))
14631 (arguments
14632 ;; tests require the test_elasticsearch module but it is not distributed.
14633 `(#:tests? #f))
14634 (home-page "https://github.com/elastic/elasticsearch-py")
14635 (synopsis "Low-level client for Elasticsearch")
14636 (description "Official low-level client for Elasticsearch. Its goal is to
14637 provide common ground for all Elasticsearch-related code in Python; because of
14638 this it tries to be opinion-free and very extendable.")
14639 (license license:expat)))
14640
14641 (define-public python2-elasticsearch
14642 (package-with-python2 python-elasticsearch))
14643
14644 (define-public python-levenshtein
14645 (package
14646 (name "python-levenshtein")
14647 (version "0.12.0")
14648 (source
14649 (origin
14650 (method url-fetch)
14651 (uri (pypi-uri "python-Levenshtein" version))
14652 (sha256
14653 (base32
14654 "1c9ybqcja31nghfcc8xxbbz9h60s9qi12b9hr4jyl69xbvg12fh3"))))
14655 (build-system python-build-system)
14656 (home-page "https://github.com/ztane/python-Levenshtein")
14657 (synopsis "Fast computation of Levenshtein distance and string similarity")
14658 (description
14659 "The Levenshtein Python C extension module contains functions for fast computation of
14660 @enumerate
14661 @item Levenshtein (edit) distance, and edit operations
14662 @item string similarity
14663 @item approximate median strings, and generally string averaging
14664 @item string sequence and set similarity
14665 @end enumerate
14666 It supports both normal and Unicode strings.")
14667 (license license:gpl2+)))
14668
14669 (define-public python2-levenshtein
14670 (package-with-python2 python-levenshtein))
14671
14672 (define-public python-scandir
14673 (package
14674 (name "python-scandir")
14675 (version "1.4")
14676 (source
14677 (origin
14678 (method url-fetch)
14679 (uri (pypi-uri "scandir" version))
14680 (sha256
14681 (base32 "0yjrgp0mxp3d8bjkq2m1ac2ys8n76wykksvgyjrnil9gr3fx7a5d"))))
14682 (build-system python-build-system)
14683 (home-page "https://github.com/benhoyt/scandir")
14684 (synopsis "Directory iteration function")
14685 (description
14686 "Directory iteration function like os.listdir(), except that instead of
14687 returning a list of bare filenames, it yields DirEntry objects that include
14688 file type and stat information along with the name. Using scandir() increases
14689 the speed of os.walk() by 2-20 times (depending on the platform and file
14690 system) by avoiding unnecessary calls to os.stat() in most cases.")
14691 (license license:bsd-3)))
14692
14693 (define-public python2-scandir
14694 (package-with-python2 python-scandir))
14695
14696 (define-public python2-stemming
14697 (package
14698 (name "python2-stemming")
14699 (version "1.0.1")
14700 (source
14701 (origin
14702 (method url-fetch)
14703 (uri (pypi-uri "stemming" version))
14704 (sha256
14705 (base32 "0ldwa24gnnxhniv0fhygkpc2mwgd93q10ag8rvzayv6hw418frsr"))))
14706 (build-system python-build-system)
14707 (arguments
14708 `(#:python ,python-2))
14709 (home-page "https://bitbucket.org/mchaput/stemming/overview")
14710 (synopsis "Python implementations of various stemming algorithms")
14711 (description
14712 "Python implementations of the Porter, Porter2, Paice-Husk, and Lovins
14713 stemming algorithms for English. These implementations are straightforward and
14714 efficient, unlike some Python versions of the same algorithms available on the
14715 Web. This package is an extraction of the stemming code included in the Whoosh
14716 search engine.")
14717 (license license:public-domain)))
14718
14719 (define-public python-factory-boy
14720 (package
14721 (name "python-factory-boy")
14722 (version "2.8.1")
14723 (source
14724 (origin
14725 (method url-fetch)
14726 (uri (pypi-uri "factory_boy" version))
14727 (sha256
14728 (base32 "1fvin6san5xsjh2c4y18caj2lnmwxlylyqm8mh1yc6rp38wlwr56"))))
14729 (build-system python-build-system)
14730 (arguments
14731 ;; Tests are not included in the tarball.
14732 `(#:tests? #f))
14733 (propagated-inputs
14734 `(("faker" ,python-faker)))
14735 (home-page "https://github.com/benhoyt/scandir")
14736 (synopsis "Versatile test fixtures replacement")
14737 (description
14738 "Factory_boy is a fixtures replacement based on thoughtbot’s factory_girl.
14739
14740 As a fixtures replacement tool, it aims to replace static, hard to maintain
14741 fixtures with easy-to-use factories for complex object.
14742
14743 Instead of building an exhaustive test setup with every possible combination
14744 of corner cases, factory_boy allows you to use objects customized for the
14745 current test, while only declaring the test-specific fields")
14746 (license license:expat)))
14747
14748 (define-public python2-factory-boy
14749 (package-with-python2 python-factory-boy))
14750
14751 (define-public python-translate-toolkit
14752 (package
14753 (name "python-translate-toolkit")
14754 (version "2.1.0")
14755 (source
14756 (origin
14757 (method url-fetch)
14758 (uri (pypi-uri "translate-toolkit" version ".tar.bz2"))
14759 (sha256
14760 (base32 "1vlkwrg83vb17jc36pmwh2b7jphwf390lz0jw8hakcg16qhwypvq"))))
14761 (build-system python-build-system)
14762 (native-inputs
14763 `(("python-pytest" ,python-pytest)
14764 ("python-sphinx" ,python-sphinx)))
14765 (propagated-inputs
14766 `(("python-babel" ,python-babel)
14767 ("python-beautifulsoup4" ,python-beautifulsoup4)
14768 ("python-chardet" ,python-chardet)
14769 ("python-diff-match-patch" ,python-diff-match-patch)
14770 ("python-levenshtein" ,python-levenshtein)
14771 ("python-lxml" ,python-lxml)
14772 ("python-six" ,python-six)
14773 ("python-vobject" ,python-vobject)
14774 ("python-pyyaml" ,python-pyyaml)))
14775 (arguments
14776 ;; TODO: tests are not run, because they end with
14777 ;; TypeError: parse() missing 2 required positional arguments: 'tree' and
14778 ;; 'parse_funcs'
14779 ;; during test setup.
14780 `(#:tests? #f))
14781 (home-page "http://toolkit.translatehouse.org")
14782 (synopsis "Tools and API for translation and localization engineering")
14783 (description
14784 "Tools and API for translation and localization engineering. It contains
14785 several utilities, as well as an API for building localization tools.")
14786 (license license:gpl2+)))
14787
14788 (define-public python2-translate-toolkit
14789 (package-with-python2 python-translate-toolkit))
14790
14791 (define-public python-mysqlclient
14792 (package
14793 (name "python-mysqlclient")
14794 (version "1.3.10")
14795 (source
14796 (origin
14797 (method url-fetch)
14798 (uri (pypi-uri "mysqlclient" version))
14799 (sha256
14800 (base32
14801 "0qkj570x4rbsblji6frvsvp2v1ap32dqzj1lq62zp9515ffsyaj5"))))
14802 (build-system python-build-system)
14803 (native-inputs
14804 `(("mariadb" ,mariadb)
14805 ("nose" ,python-nose)
14806 ("mock" ,python-mock)
14807 ("py.test" ,python-pytest)))
14808 (inputs
14809 `(("mysql" ,mysql)
14810 ("libz" ,zlib)
14811 ("openssl" ,openssl)))
14812 (home-page "https://github.com/PyMySQL/mysqlclient-python")
14813 (synopsis "MySQLdb is an interface to the popular MySQL database server for Python")
14814 (description "MySQLdb is an interface to the popular MySQL database server
14815 for Python. The design goals are:
14816 @enumerate
14817 @item Compliance with Python database API version 2.0 [PEP-0249],
14818 @item Thread-safety,
14819 @item Thread-friendliness (threads will not block each other).
14820 @end enumerate")
14821 (license license:gpl2)))
14822
14823 (define-public python2-mysqlclient
14824 (package-with-python2 python-mysqlclient))
14825
14826 (define-public python-hiredis
14827 (package
14828 (name "python-hiredis")
14829 (version "0.2.0")
14830 (source
14831 (origin
14832 (method url-fetch)
14833 (uri (pypi-uri "hiredis" version))
14834 (sha256
14835 (base32
14836 "1dfm2k9l9zar9nw9fwmm74zrgraxdxs04vx9li56fjcf289qx5fa"))))
14837 (build-system python-build-system)
14838 (arguments
14839 ;; no tests
14840 `(#:tests? #f))
14841 (home-page "https://github.com/redis/hiredis-py")
14842 (synopsis "Python extension that wraps protocol parsing code in hiredis")
14843 (description "Python-hiredis is a python extension that wraps protocol
14844 parsing code in hiredis. It primarily speeds up parsing of multi bulk replies.")
14845 (license license:bsd-3)))
14846
14847 (define-public python2-hiredis
14848 (package-with-python2 python-hiredis))
14849
14850 (define-public python-fakeredis
14851 (package
14852 (name "python-fakeredis")
14853 (version "0.8.2")
14854 (source
14855 (origin
14856 (method url-fetch)
14857 (uri (pypi-uri "fakeredis" version))
14858 (sha256
14859 (base32
14860 "0zncahj3byyasyfx9i7k991ph0n0lq8v3a21pqri5qxn9564bk9r"))))
14861 (build-system python-build-system)
14862 (arguments
14863 ;; no tests
14864 `(#:tests? #f))
14865 (home-page "https://github.com/jamesls/fakeredis")
14866 (synopsis "Fake implementation of redis API for testing purposes")
14867 (description "Fakeredis is a pure python implementation of the redis-py
14868 python client that simulates talking to a redis server. This was created for a
14869 single purpose: to write unittests. Setting up redis is not hard, but many time
14870 you want to write unittests that do not talk to an external server (such as
14871 redis). This module now allows tests to simply use this module as a reasonable
14872 substitute for redis.")
14873 (license license:bsd-3)))
14874
14875 (define-public python2-fakeredis
14876 (package-with-python2 python-fakeredis))
14877
14878 (define-public python-behave-web-api
14879 (package
14880 (name "python-behave-web-api")
14881 (version "1.0.6")
14882 (source
14883 (origin
14884 (method url-fetch)
14885 (uri (pypi-uri "behave-web-api" version))
14886 (sha256
14887 (base32
14888 "03kpq2xsy1gab3jy0dccbxlsg7vwfy4lagss0qldwmx3xz6b3i19"))))
14889 (build-system python-build-system)
14890 (arguments
14891 `(#:phases
14892 (modify-phases %standard-phases
14893 (add-after 'unpack 'fix-dependencies
14894 (lambda _
14895 (substitute* "setup.py"
14896 (("'wheel'") "") ; We don't use it.
14897 (("'ordereddict==1.1'") ""))))))) ; Python >= 2.7 has it built-in.
14898 (propagated-inputs
14899 `(("behave" ,behave)
14900 ("python-requests" ,python-requests)))
14901 (home-page "https://github.com/jefersondaniel/behave-web-api")
14902 (synopsis "Provides testing for JSON APIs with Behave for Python")
14903 (description "This package provides testing utility modules for testing
14904 JSON APIs with Behave.")
14905 (license license:expat)))
14906
14907 (define-public python2-behave-web-api
14908 (package-with-python2 python-behave-web-api))
14909
14910 (define-public python-flask-script
14911 (package
14912 (name "python-flask-script")
14913 (version "2.0.5")
14914 (source
14915 (origin
14916 (method url-fetch)
14917 (uri (pypi-uri "Flask-Script" version))
14918 (sha256
14919 (base32
14920 "0zqh2yq8zk7m9b4xw1ryqmrljkdigfb3hk5155a3b5hkfnn6xxyf"))))
14921 (build-system python-build-system)
14922 (propagated-inputs
14923 `(("python-flask" ,python-flask)
14924 ("python-argcomplete" ,python-argcomplete)
14925 ("python-werkzeug" ,python-werkzeug)))
14926 (native-inputs
14927 `(("python-pytest" ,python-pytest)))
14928 (home-page
14929 "http://github.com/smurfix/flask-script")
14930 (synopsis "Scripting support for Flask")
14931 (description "The Flask-Script extension provides support for writing
14932 external scripts in Flask. This includes running a development server,
14933 a customised Python shell, scripts to set up your database, cronjobs,
14934 and other command-line tasks that belong outside the web application
14935 itself.")
14936 (license license:bsd-3)))
14937
14938 (define-public python2-flask-script
14939 (package-with-python2 python-flask-script))
14940
14941 (define-public python-flask-migrate
14942 (package
14943 (name "python-flask-migrate")
14944 (version "2.0.3")
14945 (source
14946 (origin
14947 (method url-fetch)
14948 (uri (pypi-uri "Flask-Migrate" version))
14949 (sha256
14950 (base32
14951 "107x78lkqsnbg92dld3dkagg07jvchp3ib3y0sivc4ipz6n1y7rk"))))
14952 (build-system python-build-system)
14953 (propagated-inputs
14954 `(("python-flask" ,python-flask)
14955 ("python-alembic" ,python-alembic)
14956 ("python-sqlalchemy" ,python-sqlalchemy)
14957 ("python-flask-script" ,python-flask-script)
14958 ("python-flask-sqlalchemy" ,python-flask-sqlalchemy)))
14959 (home-page "http://github.com/miguelgrinberg/flask-migrate/")
14960 (synopsis "SQLAlchemy database migrations for Flask programs using
14961 Alembic")
14962 (description "This package contains SQLAlchemy database migration tools
14963 for Flask programs that are using @code{python-alembic}.")
14964 (license license:expat)))
14965
14966 (define-public python2-flask-migrate
14967 (package-with-python2 python-flask-migrate))
14968
14969 (define-public python-packaging
14970 (package
14971 (name "python-packaging")
14972 (version "16.8")
14973 (source
14974 (origin
14975 (method url-fetch)
14976 (uri (pypi-uri "packaging" version))
14977 (sha256
14978 (base32
14979 "17k1xbjshackwvbsnxqixbph8rbqhz4bf4g3al5xyzhavxgq6l2x"))))
14980 (build-system python-build-system)
14981 (native-inputs
14982 `(("python-pretend" ,python-pretend)
14983 ("python-pytest" ,python-pytest)))
14984 (propagated-inputs
14985 `(("python-pyparsing" ,python-pyparsing)
14986 ("python-six" ,python-six)))
14987 (home-page "https://github.com/pypa/packaging")
14988 (synopsis "Core utilities for Python packages")
14989 (description "Packaging is a Python module for dealing with Python packages.
14990 It offers an interface for working with package versions, names, and dependency
14991 information.")
14992 ;; From 'LICENSE': This software is made available under the terms of
14993 ;; *either* of the licenses found in LICENSE.APACHE or LICENSE.BSD.
14994 ;; Contributions to this software is made under the terms of *both* these
14995 ;; licenses.
14996 (license (list license:asl2.0 license:bsd-2))))
14997
14998 (define-public python2-packaging
14999 (package-with-python2 python-packaging))
15000
15001 (define-public python-sql
15002 (package
15003 (name "python-sql")
15004 (version "0.9")
15005 (source
15006 (origin
15007 (method url-fetch)
15008 (uri (pypi-uri "python-sql" version))
15009 (sha256
15010 (base32
15011 "0p6kaqj02vz0habmdx37zjk6hjxdfm8aw737zs059vvpr70ird87"))))
15012 (build-system python-build-system)
15013 (home-page "https://python-sql.tryton.org/")
15014 (synopsis "Library to write SQL queries in a pythonic way")
15015 (description "@code{python-sql} is a library to write SQL queries, that
15016 transforms idiomatic python function calls to well-formed SQL queries.")
15017 (license license:bsd-3)))
15018
15019 (define-public python2-sql
15020 (package-with-python2 python-sql))
15021
15022 (define-public python-genshi
15023 (package
15024 (name "python-genshi")
15025 (version "0.7")
15026 (source
15027 (origin
15028 (method url-fetch)
15029 (uri (string-append
15030 "https://ftp.edgewall.org/pub/genshi/Genshi-"
15031 version ".tar.gz"))
15032 (patches
15033 (search-patches
15034 ;; The first 4 patches are in the master branch upstream.
15035 ;; See this as a reference https://genshi.edgewall.org/ticket/582
15036 ;; The last 2 are NOT in any branch.
15037 ;; They were sent as attachments to a ticket opened at
15038 ;; https://genshi.edgewall.org/ticket/602#no1
15039 "python-genshi-stripping-of-unsafe-script-tags.patch"
15040 "python-genshi-disable-speedups-on-python-3.3.patch"
15041 "python-genshi-isstring-helper.patch"
15042 "python-genshi-add-support-for-python-3.4-AST.patch"
15043 "python-genshi-fix-tests-on-python-3.5.patch"
15044 "python-genshi-buildable-on-python-2.7.patch"))
15045 (sha256
15046 (base32
15047 "0lkkbp6fbwzv0zda5iqc21rr7rdldkwh3hfabfjl9i4bwq14858x"))))
15048 (build-system python-build-system)
15049 (home-page "https://genshi.edgewall.org/")
15050 (synopsis "Toolkit for generation of output for the web")
15051 (description "Genshi is a Python library that provides an integrated set
15052 of components for parsing, generating, and processing HTML, XML or other
15053 textual content for output generation on the web.")
15054 (license license:bsd-3)))
15055
15056 ;; The linter here claims that patch file names should start with the package
15057 ;; name. But, in this case the patches are inherited from python-genshi with
15058 ;; the "python-genshi-" prefix instead of "python2-genshi-".
15059 (define-public python2-genshi
15060 (package-with-python2 python-genshi))
15061
15062 (define-public python-relatorio
15063 (package
15064 (name "python-relatorio")
15065 (version "0.6.4")
15066 (source
15067 (origin
15068 (method url-fetch)
15069 (uri (pypi-uri "relatorio" version))
15070 (sha256
15071 (base32
15072 "0lincq79mzgazwd9gh41dybjh9c3n87r83pl8nk3j79aihyfk84z"))))
15073 (build-system python-build-system)
15074 (propagated-inputs
15075 `(("python-lxml" ,python-lxml)
15076 ("python-genshi" ,python-genshi)))
15077 (home-page "https://relatorio.tryton.org/")
15078 (synopsis "Templating library able to output ODT and PDF files")
15079 (description "Relatorio is a templating library which provides a way to
15080 easily output ODT, ODS, PNG, SVG and several other kinds of files. Support
15081 for more filetypes can be easily added by creating plugins for them.")
15082 (license license:gpl3+)))
15083
15084 (define-public python2-relatorio
15085 (package-with-python2 python-relatorio))
15086
15087 (define-public python-radon
15088 (package
15089 (name "python-radon")
15090 (version "1.5.0")
15091 (source
15092 (origin
15093 (method url-fetch)
15094 (uri (pypi-uri "radon" version))
15095 (sha256
15096 (base32
15097 "1h6jv36am0i827182a04ki6291lyx4kp957xfr5njgprj4nd0qsl"))))
15098 (build-system python-build-system)
15099 (propagated-inputs
15100 `(("python-colorama" ,python-colorama)
15101 ("python-flake8-polyfill" ,python-flake8-polyfill)
15102 ("python-mando" ,python-mando-0.3.1)))
15103 (native-inputs
15104 `(("python-flake8" ,python-flake8)
15105 ("python-tox" ,python-tox)
15106 ("python-pytest" ,python-pytest)
15107 ("python-paramunittest" ,python-paramunittest)))
15108 (home-page "https://radon.readthedocs.org/")
15109 (synopsis "Code Metrics in Python")
15110 (description "Radon is a Python tool which computes various code metrics.
15111 Supported metrics are:
15112 @itemize @bullet
15113 @item raw metrics: SLOC, comment lines, blank lines, &c.
15114 @item Cyclomatic Complexity (i.e. McCabe’s Complexity)
15115 @item Halstead metrics (all of them)
15116 @item the Maintainability Index (a Visual Studio metric)
15117 @end itemize")
15118 (license license:expat)))
15119
15120 (define-public python2-radon
15121 (package-with-python2 python-radon))
15122
15123 (define-public python-sure
15124 (package
15125 (name "python-sure")
15126 (version "1.4.6")
15127 (source
15128 (origin
15129 (method url-fetch)
15130 (uri (pypi-uri "sure" version))
15131 (sha256
15132 (base32
15133 "1iyqsy2d6radi88g1qf0lziy5b39h5cpb3g5jiqyb4xi46ig3x1z"))))
15134 (build-system python-build-system)
15135 (propagated-inputs
15136 `(("python-mock" ,python-mock)
15137 ("python-six" ,python-six)))
15138 (native-inputs
15139 `(("python-nose" ,python-nose)))
15140 (home-page "https://github.com/gabrielfalcao/sure")
15141 (synopsis "Automated testing library in python for python")
15142 (description
15143 "Sure is a python library that leverages a DSL for writing assertions.
15144 Sure is heavily inspired by @code{RSpec Expectations} and @code{should.js}.")
15145 (license license:gpl3+)))
15146
15147 (define-public python2-sure
15148 (package-with-python2 python-sure))
15149
15150 (define-public python2-couleur
15151 ;; This package does not seem to support python3 at all, hence,
15152 ;; only the python2 variant definition is provided.
15153 (package
15154 (name "python2-couleur")
15155 (version "0.6.2")
15156 (source
15157 (origin
15158 (method url-fetch)
15159 (uri (pypi-uri "couleur" version))
15160 (sha256
15161 (base32
15162 "1qqaxyqz74wvid0cr119dhcwz0h0if5b5by44zl49pd5z65v58k1"))))
15163 (build-system python-build-system)
15164 (arguments
15165 `(#:python ,python-2))
15166 (home-page "https://github.com/gabrielfalcao/couleur")
15167 (synopsis
15168 "ANSI terminal tool for python, colored shell and other handy fancy features")
15169 (description
15170 "@code{Couleur} provides python programs a way to use the ANSI features in a unix
15171 terminal such as coloured output in the shell, overwriting output, indentation, etc.")
15172 ;; README.md says ASL2.0, but all source code headers are LGPL3+.
15173 ;; https://github.com/gabrielfalcao/couleur/issues/11
15174 (license license:lgpl3+)))
15175
15176 (define-public python-misaka
15177 (package
15178 (name "python-misaka")
15179 (version "2.1.0")
15180 (source
15181 (origin
15182 (method url-fetch)
15183 (uri (pypi-uri "misaka" version))
15184 (sha256
15185 (base32
15186 "1yqrq3a5rracirmvk52n28nn6ckdaz897gnigv89a9gmyn87sqw7"))))
15187 (build-system python-build-system)
15188 (arguments
15189 `(;; Line 37 of setup.py calls self.run_command('develop')
15190 ;; in the 'check' phase. This command seems to be trying
15191 ;; to write to
15192 ;; /gnu/store/...-python-<version>/lib/python<version>/site-packages/
15193 ;; for which it does not have the permission to write.
15194 #:tests? #f))
15195 (propagated-inputs
15196 `(("python-cffi" ,python-cffi)))
15197 (home-page "https://github.com/FSX/misaka")
15198 (synopsis "Python binding for Hoedown")
15199 (description
15200 "@code{Misaka} is a CFFI-based binding for @code{Hoedown}, a fast markdown processing
15201 library written in C. It features a fast HTML renderer and functionality to make custom
15202 renderers (e.g. man pages or LaTeX).")
15203 (license license:expat)))
15204
15205 (define-public python2-misaka
15206 (package-with-python2 python-misaka))
15207
15208 (define-public python2-steadymark
15209 ;; This is forced into being a python2 only variant
15210 ;; due to its dependence on couleur that has no support
15211 ;; for python3
15212 (package
15213 (name "python2-steadymark")
15214 (version "0.7.3")
15215 (source
15216 (origin
15217 (method url-fetch)
15218 (uri (pypi-uri "steadymark" version))
15219 (sha256
15220 (base32
15221 "1640i9g8dycql3cc8j0bky0jkzj0q39blfbp4lsgpkprkfgcdk8v"))))
15222 (build-system python-build-system)
15223 (native-inputs
15224 `(("python-couleur" ,python2-couleur)
15225 ("python-sure" ,python2-sure)
15226 ("python-misaka" ,python2-misaka)))
15227 (arguments
15228 `(#:python ,python-2
15229 #:phases
15230 (modify-phases %standard-phases
15231 (add-before 'build 'patch-setup-py
15232 (lambda _
15233 ;; Update requirements from dependency==version
15234 ;; to dependency>=version
15235 (substitute* "setup.py"
15236 (("==") ">="))
15237 #t)))))
15238 (home-page "https://github.com/gabrielfalcao/steadymark")
15239 (synopsis "Markdown-based test runner for python")
15240 (description
15241 "@code{Steadymark} allows documentation to be written in github-flavoured
15242 markdown. The documentation may contain snippets of code surrounded by python
15243 code blocks and @code{Steadymark} will find these snippets and run them, making
15244 sure that there are no old malfunctional examples in the documentation examples.")
15245 (license license:expat)))
15246
15247 (define-public python-nose-randomly
15248 (package
15249 (name "python-nose-randomly")
15250 (version "1.2.5")
15251 (source
15252 (origin
15253 (method url-fetch)
15254 (uri (pypi-uri "nose-randomly" version))
15255 (sha256
15256 (base32
15257 "1cw9dlr1zh3w4i438kin7z0rm8092ki52hayisyc43h9pcplq7rn"))))
15258 (build-system python-build-system)
15259 (native-inputs
15260 `(("python-nose" ,python-nose)
15261 ("python-numpy" ,python-numpy)))
15262 (home-page "https://github.com/adamchainz/nose-randomly")
15263 (synopsis
15264 "Nose plugin to randomly order tests and control random.seed")
15265 (description
15266 "This is a @code{Nose} plugin to randomly order tests which can be quite
15267 powerful in discovering hidden flaws in the tests themselves, while helping to
15268 reduce inter-test dependencies. It also helps in controlling @code{random.seed},
15269 by resetting it to a repeatable number for each test, enabling the tests to
15270 create data based on random numbers and yet remain repeatable.")
15271 (license license:bsd-3)))
15272
15273 (define-public python2-nose-randomly
15274 (package-with-python2 python-nose-randomly))
15275
15276 (define-public python-jsonpointer
15277 (package
15278 (name "python-jsonpointer")
15279 (version "1.10")
15280 (source
15281 (origin
15282 (method url-fetch)
15283 (uri (pypi-uri "jsonpointer" version))
15284 (sha256
15285 (base32
15286 "1cg0gvgqjysydv6p45v4jywg1jb3v48c7m3cbpi57zgf6nndr9cz"))))
15287 (build-system python-build-system)
15288 (home-page "https://github.com/stefankoegl/python-json-pointer")
15289 (synopsis "Identify specific nodes in a JSON document")
15290 (description "@code{jsonpointer} allows you to access specific nodes
15291 by path in a JSON document (see RFC 6901).")
15292 (license license:bsd-3)))
15293
15294 (define-public python2-jsonpointer
15295 (package-with-python2 python-jsonpointer))
15296
15297 (define-public python-jsonpatch
15298 (package
15299 (name "python-jsonpatch")
15300 (version "1.16")
15301 (source
15302 (origin
15303 (method url-fetch)
15304 ;; pypi version lacks tests.js
15305 (uri (string-append "https://github.com/stefankoegl/python-json-patch/"
15306 "archive/v" version ".tar.gz"))
15307 (file-name (string-append name "-" version ".tar.gz"))
15308 (sha256
15309 (base32
15310 "085ykisl8v7mv9h7hvhdy3l2fjzs4214gx32r5k6nx4f76hbv6y5"))))
15311 (build-system python-build-system)
15312 (native-inputs
15313 `(("python-jsonpointer" ,python-jsonpointer)))
15314 (home-page "https://github.com/stefankoegl/python-json-patch")
15315 (synopsis "Applying JSON Patches in Python 2.6+ and 3.x")
15316 (description "@code{jsonpatch} is a library and program that allows
15317 applying JSON Patches according to RFC 6902.")
15318 (license license:bsd-3)))
15319
15320 (define-public python2-jsonpatch
15321 (package-with-python2 python-jsonpatch))
15322
15323 (define-public python-jsonpatch-0.4
15324 (package (inherit python-jsonpatch)
15325 (name "python-jsonpatch")
15326 (version "0.4")
15327 (source
15328 (origin
15329 (method url-fetch)
15330 (uri (string-append "https://github.com/stefankoegl/python-json-patch/"
15331 "archive/v" version ".tar.gz"))
15332 (file-name (string-append name "-" version ".tar.gz"))
15333 (sha256
15334 (base32
15335 "0j0cd9z9zyp8kppp464jxrfgrnbgkzl1yi10i5gsv8yz6d95929d"))))))
15336
15337 (define-public python2-jsonpatch-0.4
15338 (package-with-python2 python-jsonpatch-0.4))
15339
15340 (define-public python-rfc3987
15341 (package
15342 (name "python-rfc3987")
15343 (version "1.3.7")
15344 (source
15345 (origin
15346 (method url-fetch)
15347 (uri (pypi-uri "rfc3987" version))
15348 (sha256
15349 (base32
15350 "192pclzs2y0yaywqkrlvd0x73740q310kvqvm6jldhi619mq59wi"))))
15351 (build-system python-build-system)
15352 (home-page "http://pypi.python.org/pypi/rfc3987")
15353 (synopsis "Parsing and validation of URIs (RFC 3986) and IRIs (RFC 3987)")
15354 (description "@code{rfc3987} provides routines for parsing and
15355 validation of URIs (see RFC 3986) and IRIs (see RFC 3987).")
15356 (license license:gpl3+)))
15357
15358 (define-public python2-rfc3987
15359 (package-with-python2 python-rfc3987))
15360
15361 (define-public python-validate-email
15362 (package
15363 (name "python-validate-email")
15364 (version "1.3")
15365 (source
15366 (origin
15367 (method url-fetch)
15368 (uri (pypi-uri "validate_email" version))
15369 (sha256
15370 (base32
15371 "1bxffaf5yz2cph8ki55vdvdypbwkvn2xr1firlcy62vqbzf1jivq"))))
15372 (build-system python-build-system)
15373 (home-page "http://github.com/syrusakbary/validate_email")
15374 (synopsis "Verifies if an email address is valid and really exists")
15375 (description "@code{validate_email} can be used to verify if an email
15376 address is valid and really exists.")
15377 (license license:lgpl3+)))
15378
15379 (define-public python2-validate-email
15380 (package-with-python2 python-validate-email))
15381
15382 (define-public python-flex
15383 (package
15384 (name "python-flex")
15385 (version "6.10.0")
15386 (source
15387 (origin
15388 (method url-fetch)
15389 (uri (pypi-uri "flex" version))
15390 (sha256
15391 (base32
15392 "00pamnwla3khk8nyla7y28dq9jnh69swd7f4jfsl7sn1izs8n8zk"))))
15393 (build-system python-build-system)
15394 (propagated-inputs
15395 `(("python-click" ,python-click)
15396 ("python-iso8601" ,python-iso8601)
15397 ("python-jsonpointer" ,python-jsonpointer)
15398 ("python-pyyaml" ,python-pyyaml)
15399 ("python-requests" ,python-requests)
15400 ("python-rfc3987" ,python-rfc3987)
15401 ("python-six" ,python-six)
15402 ("python-validate-email" ,python-validate-email)))
15403 (home-page "https://github.com/pipermerriam/flex")
15404 (synopsis "Validates Swagger schemata")
15405 (description "@code{flex} can be used to validate Swagger schemata.")
15406 (license license:bsd-3)))
15407
15408 (define-public python2-flex
15409 (package-with-python2 python-flex))
15410
15411 (define-public python-marshmallow
15412 (package
15413 (name "python-marshmallow")
15414 (version "3.0.0b2")
15415 (source
15416 (origin
15417 (method url-fetch)
15418 (uri (pypi-uri "marshmallow" version))
15419 (sha256
15420 (base32
15421 "11bnpvfdbczr74177p295zbkdrax2cahvbj5bqhhlprgz2xxi5d9"))))
15422 (build-system python-build-system)
15423 (propagated-inputs
15424 `(("python-dateutil" ,python-dateutil)
15425 ("python-simplejson" ,python-simplejson)))
15426 (native-inputs
15427 `(("python-pytest-3.0" ,python-pytest-3.0)
15428 ("python-pytz" ,python-pytz)))
15429 (home-page "https://github.com/marshmallow-code/marshmallow")
15430 (synopsis "Convert complex datatypes to and from native
15431 Python datatypes.")
15432 (description "@code{marshmallow} provides a library for converting
15433 complex datatypes to and from native Python datatypes.")
15434 (license license:expat)))
15435
15436 (define-public python2-marshmallow
15437 (package-with-python2 python-marshmallow))
15438
15439 (define-public python-bottle
15440 (package
15441 (name "python-bottle")
15442 (version "0.12.13")
15443 (source
15444 (origin
15445 (method url-fetch)
15446 (uri (pypi-uri "bottle" version))
15447 (sha256
15448 (base32
15449 "0m9k2a7yxvggc4kw8fsvj381vgsvfcdshg5nzy6vwrxiw2p53drr"))))
15450 (build-system python-build-system)
15451 (home-page "http://bottlepy.org/")
15452 (synopsis "WSGI framework for small web-applications.")
15453 (description "@code{python-bottle} is a WSGI framework for small web-applications.")
15454 (license license:expat)))
15455
15456 (define-public python2-bottle
15457 (package-with-python2 python-bottle))
15458
15459 (define-public python-apispec
15460 (package
15461 (name "python-apispec")
15462 (version "0.22.0")
15463 (source
15464 (origin
15465 (method url-fetch)
15466 (uri (pypi-uri "apispec" version))
15467 (sha256
15468 (base32
15469 "0y3jxmgp2d24am3hxl40f5rw9abb0r8037sagax3dv64h4n1azwq"))))
15470 (build-system python-build-system)
15471 (propagated-inputs
15472 `(("python-pyyaml" ,python-pyyaml)))
15473 (native-inputs
15474 `(("python-pytest-3.0" ,python-pytest-3.0)
15475 ("python-flask" ,python-flask)
15476 ("python-marshmallow" ,python-marshmallow)
15477 ("python-tornado" ,python-tornado)
15478 ("python-bottle" ,python-bottle)
15479 ("python-mock" ,python-mock)))
15480 (home-page "https://github.com/marshmallow-code/apispec")
15481 (synopsis "Swagger 2.0 API specification generator")
15482 (description "@code{python-apispec} is a pluggable API specification
15483 generator. Currently supports the OpenAPI specification (f.k.a.
15484 Swagger 2.0).")
15485 (license license:expat)))
15486
15487 (define-public python2-apispec
15488 (package-with-python2 python-apispec))
15489
15490 (define-public python-flasgger
15491 (package
15492 (name "python-flasgger")
15493 (version "0.6.3")
15494 (source
15495 (origin
15496 (method url-fetch)
15497 (uri (string-append "https://github.com/rochacbruno/flasgger/archive/"
15498 version ".tar.gz"))
15499 (file-name (string-append name "-" version ".tar.gz"))
15500 (sha256
15501 (base32
15502 "1gqzlm0rb55fdpsy5ipkganlx9cnpi454fqyycr03jm22zql14ay"))))
15503 (build-system python-build-system)
15504 (arguments
15505 `(#:phases
15506 (modify-phases %standard-phases
15507 (replace 'check
15508 (lambda* (#:key inputs outputs #:allow-other-keys)
15509 (substitute* "Makefile"
15510 (("flake8 flasgger --ignore=F403")
15511 "flake8 flasgger --ignore=E731,F403"))
15512 (setenv "PYTHONPATH" (string-append (getcwd)
15513 ":"
15514 (getenv "PYTHONPATH")))
15515 (zero? (system* "py.test")))))))
15516 (propagated-inputs
15517 `(("python-flask" ,python-flask)
15518 ("python-pyyaml" ,python-pyyaml)
15519 ("python-jsonschema" ,python-jsonschema)
15520 ("python-mistune" ,python-mistune)
15521 ("python-six" ,python-six)))
15522 (native-inputs
15523 `(("python-decorator" ,python-decorator)
15524 ("python-flake8" ,python-flake8)
15525 ("python-flask-restful" ,python-flask-restful)
15526 ("python-flex" ,python-flex)
15527 ("python-pytest-3.0" ,python-pytest-3.0)
15528 ("python-pytest-cov" ,python-pytest-cov)
15529 ("python-marshmallow" ,python-marshmallow)
15530 ("python-apispec" ,python-apispec)))
15531 (home-page "https://github.com/rochacbruno/flasgger/")
15532 (synopsis "Extract Swagger specs from your Flask project")
15533 (description "@code{python-flasgger} allows extracting Swagger specs
15534 from your Flask project. It is a fork of Flask-Swagger.")
15535 (license license:expat)))
15536
15537 (define-public python2-flasgger
15538 (package-with-python2 python-flasgger))
15539
15540 (define-public python-swagger-spec-validator
15541 (package
15542 (name "python-swagger-spec-validator")
15543 (version "2.1.0")
15544 (source
15545 (origin
15546 (method url-fetch)
15547 (uri (pypi-uri "swagger-spec-validator" version))
15548 (sha256
15549 (base32
15550 "13hkpn2lycwr0468yqhjb3kwszqf7hjwlq61w7vdxq1caz31k4nw"))))
15551 (build-system python-build-system)
15552 (propagated-inputs
15553 `(("python-jsonschema" ,python-jsonschema)
15554 ("python-six" ,python-six)))
15555 (home-page
15556 "http://github.com/Yelp/swagger_spec_validator")
15557 (synopsis "Validation of Swagger specifications")
15558 (description "@code{swagger_spec_validator} provides a library for
15559 validating Swagger API specifications.")
15560 (license license:asl2.0)))
15561
15562 (define-public python2-swagger-spec-validator
15563 (package-with-python2 python-swagger-spec-validator))
15564
15565 (define-public python-apache-libcloud
15566 (package
15567 (name "python-apache-libcloud")
15568 (version "2.0.0")
15569 (source
15570 (origin
15571 (method url-fetch)
15572 (uri (pypi-uri "apache-libcloud" version))
15573 (sha256
15574 (base32
15575 "1a71z02ckcxld72k4qgmdnkjan52c4wczncs3p2mp5yafh7dsan7"))))
15576 (build-system python-build-system)
15577 (arguments
15578 `(#:phases
15579 (modify-phases %standard-phases
15580 (add-after 'unpack 'patch-ssh
15581 (lambda* (#:key inputs #:allow-other-keys)
15582 (substitute* "libcloud/compute/ssh.py"
15583 (("'ssh'") (string-append "'" (assoc-ref inputs "openssh")
15584 "/bin/ssh" "'")))
15585 #t))
15586 (add-after 'unpack 'patch-tests
15587 (lambda _
15588 (substitute* "./libcloud/test/test_file_fixtures.py"
15589 ;; See <https://issues.apache.org/jira/browse/LIBCLOUD-923>.
15590 (("def _ascii") "def _raw_data(self, method, url, body, headers):
15591 return (httplib.OK,
15592 \"1234abcd\",
15593 {\"test\": \"value\"},
15594 httplib.responses[httplib.OK])
15595 def _ascii"))
15596 (substitute* "libcloud/test/compute/test_ssh_client.py"
15597 (("class ShellOutSSHClientTests")
15598 "@unittest.skip(\"Guix container doesn't have ssh service\")
15599 class ShellOutSSHClientTests")
15600 ;; See <https://issues.apache.org/jira/browse/LIBCLOUD-924>.
15601 (("'.xf0.x90.x8d.x88'") "b'\\xF0\\x90\\x8D\\x88'")
15602 (("'.xF0', '.x90', '.x8D', '.x88'")
15603 "b'\\xF0', b'\\x90', b'\\x8D', b'\\x88'"))
15604 #t)))))
15605 (inputs
15606 `(("openssh" ,openssh)))
15607 (propagated-inputs
15608 `(("python-paramiko" ,python-paramiko)
15609 ("python-requests" ,python-requests)))
15610 (native-inputs
15611 `(("python-lockfile" ,python-lockfile)
15612 ("python-mock" ,python-mock)
15613 ("python-requests-mock" ,python-requests-mock)))
15614 (home-page "https://libcloud.apache.org/")
15615 (synopsis "Unified Cloud API")
15616 (description "@code{libcloud} is a Python library for interacting with
15617 many of the popular cloud service providers using a unified API.")
15618 (license license:asl2.0)))
15619
15620 (define-public python2-apache-libcloud
15621 (package-with-python2 python-apache-libcloud))
15622
15623 (define-public python-smmap2
15624 (package
15625 (name "python-smmap2")
15626 (version "2.0.3")
15627 (source
15628 (origin
15629 (method url-fetch)
15630 (uri (pypi-uri "smmap2" version))
15631 (sha256
15632 (base32
15633 "1hvn28p3zvxa98sbi9lrqvv2ps4q284j4jq9a619zw0m7yv0sly7"))))
15634 (build-system python-build-system)
15635 (native-inputs
15636 `(("python-nosexcover" ,python-nosexcover)))
15637 (home-page "https://github.com/Byron/smmap")
15638 (synopsis "Python sliding window memory map manager")
15639 (description "@code{smmap2} is a pure Python implementation of a sliding
15640 window memory map manager.")
15641 (license license:bsd-3)))
15642
15643 (define-public python2-smmap2
15644 (package-with-python2 python-smmap2))
15645
15646 (define-public python-regex
15647 (package
15648 (name "python-regex")
15649 (version "2017.06.07")
15650 (source (origin
15651 (method url-fetch)
15652 (uri (pypi-uri "regex" version))
15653 (sha256
15654 (base32
15655 "06r6b7yigikbj3a72whl85r2b64pj1r0ypmw9yalmkm0wnxq8mz4"))))
15656 (build-system python-build-system)
15657 (home-page "https://bitbucket.org/mrabarnett/mrab-regex")
15658 (synopsis "Alternative regular expression module")
15659 (description "This regular expression implementation is backwards-
15660 compatible with the standard @code{re} module, but offers additional
15661 functionality like full case-folding for case-insensitive matches in Unicode.")
15662 (license license:psfl)))
15663
15664 (define-public python2-regex
15665 (package-with-python2 python-regex))
15666
15667 (define-public python2-pyopengl
15668 (package
15669 (name "python2-pyopengl")
15670 (version "3.1.0")
15671 (source
15672 (origin
15673 (method url-fetch)
15674 (uri (pypi-uri "PyOpenGL" version))
15675 (sha256
15676 (base32
15677 "1byxjj6a8rwzhxhjqlc588zdad2qwxdd7vlam2653ylll31waiwv"))))
15678 (arguments
15679 `(#:python ,python-2))
15680 (build-system python-build-system)
15681 (home-page "http://pyopengl.sourceforge.net")
15682 (synopsis "Standard OpenGL bindings for Python")
15683 (description
15684 "PyOpenGL is the most common cross platform Python binding to OpenGL and
15685 related APIs. The binding is created using the standard @code{ctypes}
15686 library.")
15687 (license license:bsd-3)))
15688
15689 (define-public python-rencode
15690 (package
15691 (name "python-rencode")
15692 (version "1.0.3")
15693 (source
15694 (origin
15695 (method url-fetch)
15696 (uri (pypi-uri "rencode" version))
15697 (sha256
15698 (base32
15699 "08if5yax1xn5yfp8p3765ccjmfcv9di7i4m5jckgnwvdsgznwkbj"))))
15700 (build-system python-build-system)
15701 (native-inputs `(("pkg-config" ,pkg-config)
15702 ("python-cython", python-cython)))
15703 (home-page "https://github.com/aresch/rencode")
15704 (synopsis "Serialization of heterogeneous data structures")
15705 (description
15706 "The @code{rencode} module is a data structure serialization library,
15707 similar to @code{bencode} from the BitTorrent project. For complex,
15708 heterogeneous data structures with many small elements, r-encoding stake up
15709 significantly less space than b-encodings. This version of rencode is a
15710 complete rewrite in Cython to attempt to increase the performance over the
15711 pure Python module.")
15712 (license license:bsd-3)))
15713
15714 (define-public python2-rencode
15715 (package-with-python2 python-rencode))